Skip to content

Commit 0f0ee9d

Browse files
committed
fix: build
1 parent 6436364 commit 0f0ee9d

39 files changed

+1130
-1448
lines changed
Lines changed: 37 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,46 @@
11
<script setup>
2-
import { TabsContent, TabsList, TabsRoot, TabsTrigger } from 'reka-ui'
2+
import { Tabs } from 'reka-ui/namespaced'
3+
import NqPlayground from './NqPlayground.vue'
34
</script>
45

56
<template>
6-
<TabsRoot w-full default-value="preview" f-my-lg class="nq-raw">
7-
<TabsList relative shrink-0 f-mx-lg flex="~ items-center justify-start gap-x-12" w-max aria-label="See the markdown code and rendered preview">
8-
<!-- <TabsIndicator absolute px-8 left-0 h-3 bottom-2 w="$reka-tabs-indicator-size" bg-blue
9-
translate-x="$reka-tabs-indicator-position" translate-y-1 transition="[width,transform]"
10-
duration-300 /> -->
11-
<TabsTrigger value="code" aria-label="Code Tab" bg-transparent transition-all data-active:font-semibold nq-pill-tertiary data-active:nq-pill-blue translate-y-0 shadow-none ring="1.5 neutral-300 data-active:0">
7+
<Tabs.Root w-full default-value="preview" f-my-lg class="nq-raw component-preview">
8+
<Tabs.List
9+
relative shrink-0 flex="~ items-center justify-start" w-max
10+
aria-label="See the markdown code and rendered preview" bg-neutral-400 rounded-full outline-blue
11+
>
12+
<Tabs.Indicator
13+
w="$reka-tabs-indicator-size" translate-x="$reka-tabs-indicator-position" absolute rounded-full
14+
transition="[width,transform]" bg-neutral-0 inset-y-2 duration-300
15+
/>
16+
<Tabs.Trigger
17+
value="code" aria-label="Code Tab" z-1 font-semibold ml-2 f-px-2xs py-2 outline="blue offset-1"
18+
rounded-full
19+
>
1220
Code
13-
</TabsTrigger>
14-
<TabsTrigger value="preview" aria-label="Preview Tab" bg-transparent transition-all data-active:font-semibold nq-pill-tertiary data-active:nq-pill-blue translate-y-0 shadow-none ring="1.5 neutral-300 data-active:0">
21+
</Tabs.Trigger>
22+
<Tabs.Trigger
23+
value="preview" aria-label="Preview Tab" z-1 font-semibold mr-2 f-px-2xs py-2
24+
outline="blue offset-1" rounded-full
25+
>
1526
Preview
16-
</TabsTrigger>
17-
</TabsList>
18-
<div p-16 f-px-sm>
19-
<TabsContent value="code" grow outline-none f-text-sm>
27+
</Tabs.Trigger>
28+
</Tabs.List>
29+
<div>
30+
<Tabs.Content value="code" grow outline-none>
2031
<slot name="code" />
21-
</TabsContent>
22-
<TabsContent value="preview" grow outline-none>
23-
<slot name="default" />
24-
</TabsContent>
32+
</Tabs.Content>
33+
<Tabs.Content value="preview" grow outline-none my-1lh>
34+
<NqPlayground>
35+
<slot name="default" />
36+
</NqPlayground>
37+
</Tabs.Content>
2538
</div>
26-
</TabsRoot>
39+
</Tabs.Root>
2740
</template>
41+
42+
<style>
43+
.component-preview [class*='language-'] pre {
44+
font-size: 1em;
45+
}
46+
</style>

docs/.vitepress/theme/components/NqPlayground.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="playground" p="$f-px" f="$px $px-min-16 $px-max-40" translate-x="[calc(-1*var(--f-px))]" relative rounded-12 outline="1.5 neutral/10 ~" of-hidden>
2+
<div class="playground" f-p-sm relative rounded-12 outline="1.5 neutral/10 ~" of-hidden>
33
<slot />
44
</div>
55
</template>

docs/.vitepress/theme/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import TwoslashFloatingVue from '@shikijs/vitepress-twoslash/client'
33
import { defineNimiqThemeConfig } from 'nimiq-vitepress-theme/theme.js'
44

55
import ComponentPreview from './components/ComponentPreview.vue'
6-
import NqPlayground from './components/NqPlayground.vue'
76

87
import '@shikijs/vitepress-twoslash/style.css'
98
import 'virtual:uno.css'
@@ -13,6 +12,5 @@ export default defineNimiqThemeConfig({
1312
app.use(TwoslashFloatingVue)
1413

1514
app.component('ComponentPreview', ComponentPreview)
16-
app.component('NqPlayground', NqPlayground)
1715
},
1816
})

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"pathe": "catalog:node",
3636
"render-markdown-it-tokens": "catalog:markdown",
3737
"shiki": "catalog:syntax",
38-
"unocss": "66.4.2",
38+
"unocss": "catalog:style",
3939
"unocss-preset-onmax": "catalog:style",
4040
"unplugin-icons": "catalog:build",
4141
"vite": "catalog:build",
5.26 KB
Binary file not shown.
7.71 KB
Binary file not shown.
3.42 KB
Binary file not shown.
11.7 KB
Binary file not shown.
7.62 KB
Binary file not shown.
22.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)