@polymarbot/nuxt-layer-shadcn-ui 0.3.9 → 0.3.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/components/ui/Input/index.stories.ts +0 -17
- package/app/components/ui/Input/index.vue +1 -0
- package/app/components/ui/Pagination/index.stories.ts +0 -27
- package/app/components/ui/Popover/index.stories.ts +0 -24
- package/app/components/ui/RadioGroup/index.stories.ts +0 -17
- package/app/components/ui/Select/index.vue +7 -6
- package/app/components/ui/Tabs/index.stories.ts +0 -17
- package/app/components/ui/Textarea/index.stories.ts +0 -17
- package/package.json +2 -2
|
@@ -35,23 +35,6 @@ const noControls = { controls: { disable: true }} satisfies Story['parameters']
|
|
|
35
35
|
|
|
36
36
|
export const Default: Story = {}
|
|
37
37
|
|
|
38
|
-
export const Controlled: Story = {
|
|
39
|
-
parameters: noControls,
|
|
40
|
-
render: () => ({
|
|
41
|
-
components: { Input },
|
|
42
|
-
setup () {
|
|
43
|
-
const value = ref('')
|
|
44
|
-
return { value }
|
|
45
|
-
},
|
|
46
|
-
template: `
|
|
47
|
-
<div class="max-w-sm space-y-2">
|
|
48
|
-
<Input v-model="value" placeholder="Enter your name..." />
|
|
49
|
-
<div class="text-sm text-muted-foreground">Value: {{ value }}</div>
|
|
50
|
-
</div>
|
|
51
|
-
`,
|
|
52
|
-
}),
|
|
53
|
-
}
|
|
54
|
-
|
|
55
38
|
export const WithPrefix: Story = {
|
|
56
39
|
parameters: noControls,
|
|
57
40
|
render: () => ({
|
|
@@ -38,33 +38,6 @@ const noControls = { controls: { disable: true }} satisfies Story['parameters']
|
|
|
38
38
|
|
|
39
39
|
export const Default: Story = {}
|
|
40
40
|
|
|
41
|
-
export const Controlled: Story = {
|
|
42
|
-
parameters: noControls,
|
|
43
|
-
render: () => ({
|
|
44
|
-
components: { Pagination },
|
|
45
|
-
setup () {
|
|
46
|
-
const page = ref(1)
|
|
47
|
-
const pageSize = ref(10)
|
|
48
|
-
return { page, pageSize }
|
|
49
|
-
},
|
|
50
|
-
template: `
|
|
51
|
-
<div>
|
|
52
|
-
<Pagination
|
|
53
|
-
:page="page"
|
|
54
|
-
:total="85"
|
|
55
|
-
:pageSize="pageSize"
|
|
56
|
-
:pageSizeOptions="[10, 20, 50]"
|
|
57
|
-
@update:page="page = $event"
|
|
58
|
-
@update:pageSize="v => { pageSize = v; page = 1 }"
|
|
59
|
-
/>
|
|
60
|
-
<div class="mt-2 text-sm text-muted-foreground">
|
|
61
|
-
Page: {{ page }}, Size: {{ pageSize }}
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
64
|
-
`,
|
|
65
|
-
}),
|
|
66
|
-
}
|
|
67
|
-
|
|
68
41
|
export const Sizes: Story = {
|
|
69
42
|
parameters: noControls,
|
|
70
43
|
render: () => ({
|
|
@@ -47,27 +47,3 @@ export const WithForm: Story = {
|
|
|
47
47
|
`,
|
|
48
48
|
}),
|
|
49
49
|
}
|
|
50
|
-
|
|
51
|
-
export const Controlled: Story = {
|
|
52
|
-
parameters: noControls,
|
|
53
|
-
render: () => ({
|
|
54
|
-
components: { Popover, Button },
|
|
55
|
-
setup () {
|
|
56
|
-
const open = ref(false)
|
|
57
|
-
return { open }
|
|
58
|
-
},
|
|
59
|
-
template: `
|
|
60
|
-
<div class="flex items-center gap-2">
|
|
61
|
-
<Popover v-model:open="open">
|
|
62
|
-
<template #trigger>
|
|
63
|
-
<Button variant="outline">Controlled Popover</Button>
|
|
64
|
-
</template>
|
|
65
|
-
<p class="text-sm">This popover is controlled externally.</p>
|
|
66
|
-
</Popover>
|
|
67
|
-
<Button variant="ghost" size="sm" @click="open = !open">
|
|
68
|
-
Toggle ({{ open ? 'Open' : 'Closed' }})
|
|
69
|
-
</Button>
|
|
70
|
-
</div>
|
|
71
|
-
`,
|
|
72
|
-
}),
|
|
73
|
-
}
|
|
@@ -43,23 +43,6 @@ const noControls = { controls: { disable: true }} satisfies Story['parameters']
|
|
|
43
43
|
|
|
44
44
|
export const Default: Story = {}
|
|
45
45
|
|
|
46
|
-
export const Controlled: Story = {
|
|
47
|
-
parameters: noControls,
|
|
48
|
-
render: () => ({
|
|
49
|
-
components: { RadioGroup },
|
|
50
|
-
setup () {
|
|
51
|
-
const selected = ref('option1')
|
|
52
|
-
return { options, selected }
|
|
53
|
-
},
|
|
54
|
-
template: `
|
|
55
|
-
<div class="space-y-2">
|
|
56
|
-
<RadioGroup v-model="selected" :items="options" />
|
|
57
|
-
<div class="text-sm text-muted-foreground">Selected: {{ selected }}</div>
|
|
58
|
-
</div>
|
|
59
|
-
`,
|
|
60
|
-
}),
|
|
61
|
-
}
|
|
62
|
-
|
|
63
46
|
export const Horizontal: Story = {
|
|
64
47
|
parameters: noControls,
|
|
65
48
|
render: () => ({
|
|
@@ -156,16 +156,16 @@ function handleClear (event: MouseEvent) {
|
|
|
156
156
|
:data-disabled="disabled || undefined"
|
|
157
157
|
:data-state="open ? 'open' : 'closed'"
|
|
158
158
|
class="
|
|
159
|
+
data-[state=open]:border-ring data-[state=open]:ring-ring/50
|
|
159
160
|
cursor-pointer
|
|
160
|
-
data-[state=open]:
|
|
161
|
-
data-[state=open]:ring-ring/50
|
|
161
|
+
data-[state=open]:ring-[3px]
|
|
162
162
|
"
|
|
163
163
|
>
|
|
164
164
|
<span
|
|
165
165
|
class="
|
|
166
|
-
|
|
167
|
-
whitespace-nowrap
|
|
166
|
+
gap-2 px-3 py-1 text-base
|
|
168
167
|
md:text-sm
|
|
168
|
+
line-clamp-1 flex flex-1 items-center whitespace-nowrap
|
|
169
169
|
"
|
|
170
170
|
>
|
|
171
171
|
<template v-if="multiple && selectedOptions.length > 0">
|
|
@@ -196,6 +196,7 @@ function handleClear (event: MouseEvent) {
|
|
|
196
196
|
align="inline-end"
|
|
197
197
|
>
|
|
198
198
|
<InputGroupButton
|
|
199
|
+
type="button"
|
|
199
200
|
size="icon-xs"
|
|
200
201
|
@click="handleClear"
|
|
201
202
|
>
|
|
@@ -210,7 +211,7 @@ function handleClear (event: MouseEvent) {
|
|
|
210
211
|
</InputGroupAddon>
|
|
211
212
|
</InputGroup>
|
|
212
213
|
</PopoverTrigger>
|
|
213
|
-
<PopoverContent class="w-(--reka-popover-trigger-width)
|
|
214
|
+
<PopoverContent class="p-0 w-(--reka-popover-trigger-width)">
|
|
214
215
|
<Command
|
|
215
216
|
:modelValue="commandModelValue"
|
|
216
217
|
:filterFunction="commandFilterFunction"
|
|
@@ -250,7 +251,7 @@ function handleClear (event: MouseEvent) {
|
|
|
250
251
|
<Icon
|
|
251
252
|
name="check"
|
|
252
253
|
:class="cn(
|
|
253
|
-
'ml-auto
|
|
254
|
+
'size-4 ml-auto shrink-0',
|
|
254
255
|
isSelected(option.value) ? 'opacity-100' : 'opacity-0',
|
|
255
256
|
)"
|
|
256
257
|
/>
|
|
@@ -61,23 +61,6 @@ const noControls = { controls: { disable: true }} satisfies Story['parameters']
|
|
|
61
61
|
|
|
62
62
|
export const Default: Story = {}
|
|
63
63
|
|
|
64
|
-
export const Controlled: Story = {
|
|
65
|
-
parameters: noControls,
|
|
66
|
-
render: () => ({
|
|
67
|
-
components: { Tabs },
|
|
68
|
-
setup () {
|
|
69
|
-
const value = ref<string>('account')
|
|
70
|
-
return { items, value }
|
|
71
|
-
},
|
|
72
|
-
template: `
|
|
73
|
-
<div class="max-w-md space-y-3">
|
|
74
|
-
<Tabs v-model="value" :items="items" />
|
|
75
|
-
<div class="text-sm text-muted-foreground">Active: {{ value }}</div>
|
|
76
|
-
</div>
|
|
77
|
-
`,
|
|
78
|
-
}),
|
|
79
|
-
}
|
|
80
|
-
|
|
81
64
|
export const IconOnly: Story = {
|
|
82
65
|
parameters: noControls,
|
|
83
66
|
render: () => ({
|
|
@@ -40,23 +40,6 @@ const noControls = { controls: { disable: true }} satisfies Story['parameters']
|
|
|
40
40
|
|
|
41
41
|
export const Default: Story = {}
|
|
42
42
|
|
|
43
|
-
export const Controlled: Story = {
|
|
44
|
-
parameters: noControls,
|
|
45
|
-
render: () => ({
|
|
46
|
-
components: { Textarea },
|
|
47
|
-
setup () {
|
|
48
|
-
const value = ref('')
|
|
49
|
-
return { value }
|
|
50
|
-
},
|
|
51
|
-
template: `
|
|
52
|
-
<div class="max-w-sm space-y-2">
|
|
53
|
-
<Textarea v-model="value" placeholder="Type your message here..." />
|
|
54
|
-
<div class="text-sm text-muted-foreground">Value: {{ value }}</div>
|
|
55
|
-
</div>
|
|
56
|
-
`,
|
|
57
|
-
}),
|
|
58
|
-
}
|
|
59
|
-
|
|
60
43
|
export const WithRows: Story = {
|
|
61
44
|
parameters: noControls,
|
|
62
45
|
render: () => ({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@polymarbot/nuxt-layer-shadcn-ui",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.10",
|
|
4
4
|
"description": "Nuxt layer providing shadcn-vue based UI components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./nuxt.config.ts",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"vue-i18n": "^11",
|
|
43
43
|
"vue-router": "^4 || ^5"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "aba25283d8cf93bf3223b3b59da5ff8016615f98"
|
|
46
46
|
}
|