@polymarbot/nuxt-layer-shadcn-ui 0.6.1 → 0.6.3
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/Button/index.stories.ts +5 -5
- package/app/components/ui/DatePicker/index.stories.ts +3 -4
- package/app/components/ui/DateRangePicker/index.stories.ts +8 -6
- package/app/components/ui/InputOtp/index.stories.ts +3 -4
- package/app/components/ui/InputRange/en.json +4 -0
- package/app/components/ui/InputRange/index.stories.ts +13 -7
- package/app/components/ui/InputRange/index.vue +5 -0
- package/app/components/ui/InputRange/types.ts +4 -0
- package/app/components/ui/RadioCardGroup/index.stories.ts +3 -4
- package/i18n/messages/ar.json +4 -0
- package/i18n/messages/de.json +4 -0
- package/i18n/messages/en.json +4 -0
- package/i18n/messages/es.json +4 -0
- package/i18n/messages/fr.json +4 -0
- package/i18n/messages/hi.json +4 -0
- package/i18n/messages/id.json +4 -0
- package/i18n/messages/it.json +4 -0
- package/i18n/messages/ja.json +4 -0
- package/i18n/messages/ko.json +4 -0
- package/i18n/messages/nl.json +4 -0
- package/i18n/messages/pl.json +4 -0
- package/i18n/messages/pt.json +4 -0
- package/i18n/messages/ru.json +4 -0
- package/i18n/messages/th.json +4 -0
- package/i18n/messages/tr.json +4 -0
- package/i18n/messages/vi.json +4 -0
- package/i18n/messages/zh-CN.json +4 -0
- package/i18n/messages/zh-TW.json +4 -0
- package/package.json +2 -2
|
@@ -201,9 +201,9 @@ export const Disabled: Story = {
|
|
|
201
201
|
code: `
|
|
202
202
|
<template>
|
|
203
203
|
<Button variant="default" disabled>default</Button>
|
|
204
|
+
<Button variant="secondary" disabled>secondary</Button>
|
|
204
205
|
<Button variant="destructive" disabled>destructive</Button>
|
|
205
206
|
<Button variant="outline" disabled>outline</Button>
|
|
206
|
-
<Button variant="secondary" disabled>secondary</Button>
|
|
207
207
|
<Button variant="ghost" disabled>ghost</Button>
|
|
208
208
|
<Button variant="link" disabled>link</Button>
|
|
209
209
|
</template>
|
|
@@ -230,10 +230,10 @@ export const Rounded: Story = {
|
|
|
230
230
|
code: `
|
|
231
231
|
<template>
|
|
232
232
|
<Button rounded>Rounded</Button>
|
|
233
|
-
<Button rounded variant="outline">Outline</Button>
|
|
234
233
|
<Button rounded variant="secondary">Secondary</Button>
|
|
235
|
-
<Button rounded
|
|
234
|
+
<Button rounded variant="outline">Outline</Button>
|
|
236
235
|
<Button rounded size="icon" variant="secondary" icon="sun" />
|
|
236
|
+
<Button rounded size="icon" variant="outline" icon="plus" />
|
|
237
237
|
</template>
|
|
238
238
|
`.trim(),
|
|
239
239
|
},
|
|
@@ -244,10 +244,10 @@ export const Rounded: Story = {
|
|
|
244
244
|
template: `
|
|
245
245
|
<div class="flex flex-wrap items-center gap-3">
|
|
246
246
|
<Button rounded>Rounded</Button>
|
|
247
|
-
<Button rounded variant="outline">Outline</Button>
|
|
248
247
|
<Button rounded variant="secondary">Secondary</Button>
|
|
249
|
-
<Button rounded
|
|
248
|
+
<Button rounded variant="outline">Outline</Button>
|
|
250
249
|
<Button rounded size="icon" variant="secondary" icon="sun" />
|
|
250
|
+
<Button rounded size="icon" variant="outline" icon="plus" />
|
|
251
251
|
</div>
|
|
252
252
|
`,
|
|
253
253
|
}),
|
|
@@ -38,13 +38,12 @@ const meta = {
|
|
|
38
38
|
render: args => ({
|
|
39
39
|
components: { DatePicker },
|
|
40
40
|
setup () {
|
|
41
|
-
|
|
42
|
-
return { args, value }
|
|
41
|
+
return { args }
|
|
43
42
|
},
|
|
44
43
|
template: `
|
|
45
44
|
<div class="max-w-xs">
|
|
46
|
-
<DatePicker v-bind="args" v
|
|
47
|
-
<div class="mt-2 text-sm text-muted-foreground">Value: {{
|
|
45
|
+
<DatePicker v-bind="args" @update:modelValue="v => args.modelValue = v" />
|
|
46
|
+
<div class="mt-2 text-sm text-muted-foreground">Value: {{ args.modelValue }}</div>
|
|
48
47
|
</div>
|
|
49
48
|
`,
|
|
50
49
|
}),
|
|
@@ -37,16 +37,18 @@ const meta = {
|
|
|
37
37
|
render: args => ({
|
|
38
38
|
components: { DateRangePicker },
|
|
39
39
|
setup () {
|
|
40
|
-
|
|
41
|
-
const end = ref<Date | string | null>(args.end ?? null)
|
|
42
|
-
return { args, start, end }
|
|
40
|
+
return { args }
|
|
43
41
|
},
|
|
44
42
|
template: `
|
|
45
43
|
<div class="max-w-lg">
|
|
46
|
-
<DateRangePicker
|
|
44
|
+
<DateRangePicker
|
|
45
|
+
v-bind="args"
|
|
46
|
+
@update:start="v => args.start = v"
|
|
47
|
+
@update:end="v => args.end = v"
|
|
48
|
+
/>
|
|
47
49
|
<div class="mt-2 text-sm text-muted-foreground">
|
|
48
|
-
<div>Start: {{ start }}</div>
|
|
49
|
-
<div>End: {{ end }}</div>
|
|
50
|
+
<div>Start: {{ args.start }}</div>
|
|
51
|
+
<div>End: {{ args.end }}</div>
|
|
50
52
|
</div>
|
|
51
53
|
</div>
|
|
52
54
|
`,
|
|
@@ -18,13 +18,12 @@ const meta = {
|
|
|
18
18
|
render: args => ({
|
|
19
19
|
components: { InputOtp },
|
|
20
20
|
setup () {
|
|
21
|
-
|
|
22
|
-
return { args, otp }
|
|
21
|
+
return { args }
|
|
23
22
|
},
|
|
24
23
|
template: `
|
|
25
24
|
<div class="space-y-4">
|
|
26
|
-
<InputOtp v-bind="args" v
|
|
27
|
-
<div class="text-sm text-muted-foreground">Value: {{
|
|
25
|
+
<InputOtp v-bind="args" @update:modelValue="v => args.modelValue = v" />
|
|
26
|
+
<div class="text-sm text-muted-foreground">Value: {{ args.modelValue }}</div>
|
|
28
27
|
</div>
|
|
29
28
|
`,
|
|
30
29
|
}),
|
|
@@ -10,26 +10,32 @@ const meta = {
|
|
|
10
10
|
end: { control: 'number' },
|
|
11
11
|
min: { control: 'number' },
|
|
12
12
|
max: { control: 'number' },
|
|
13
|
+
startPlaceholder: { control: 'text' },
|
|
14
|
+
endPlaceholder: { control: 'text' },
|
|
13
15
|
disabled: { control: 'boolean' },
|
|
14
16
|
},
|
|
15
17
|
args: {
|
|
16
|
-
start:
|
|
17
|
-
end:
|
|
18
|
+
start: undefined,
|
|
19
|
+
end: undefined,
|
|
18
20
|
min: 0,
|
|
19
21
|
max: 100,
|
|
22
|
+
startPlaceholder: undefined,
|
|
23
|
+
endPlaceholder: undefined,
|
|
20
24
|
disabled: false,
|
|
21
25
|
},
|
|
22
26
|
render: args => ({
|
|
23
27
|
components: { InputRange },
|
|
24
28
|
setup () {
|
|
25
|
-
|
|
26
|
-
const end = ref<number | undefined>(args.end)
|
|
27
|
-
return { args, start, end }
|
|
29
|
+
return { args }
|
|
28
30
|
},
|
|
29
31
|
template: `
|
|
30
32
|
<div class="max-w-md">
|
|
31
|
-
<InputRange
|
|
32
|
-
|
|
33
|
+
<InputRange
|
|
34
|
+
v-bind="args"
|
|
35
|
+
@update:start="v => args.start = v"
|
|
36
|
+
@update:end="v => args.end = v"
|
|
37
|
+
/>
|
|
38
|
+
<div class="mt-2 text-sm text-muted-foreground">Start: {{ args.start }}, End: {{ args.end }}</div>
|
|
33
39
|
</div>
|
|
34
40
|
`,
|
|
35
41
|
}),
|
|
@@ -8,6 +8,8 @@ const props = withDefaults(defineProps<InputRangeProps>(), {
|
|
|
8
8
|
end: undefined,
|
|
9
9
|
min: 0,
|
|
10
10
|
max: undefined,
|
|
11
|
+
startPlaceholder: undefined,
|
|
12
|
+
endPlaceholder: undefined,
|
|
11
13
|
})
|
|
12
14
|
|
|
13
15
|
const emit = defineEmits<{
|
|
@@ -16,6 +18,7 @@ const emit = defineEmits<{
|
|
|
16
18
|
}>()
|
|
17
19
|
|
|
18
20
|
const { t } = useI18n()
|
|
21
|
+
const T = useTranslations('components.ui.InputRange')
|
|
19
22
|
|
|
20
23
|
const start = computed({
|
|
21
24
|
get: () => props.start,
|
|
@@ -35,6 +38,7 @@ const end = computed({
|
|
|
35
38
|
v-bind="$attrs"
|
|
36
39
|
:min="min"
|
|
37
40
|
:max="end ?? max"
|
|
41
|
+
:placeholder="startPlaceholder ?? T('startPlaceholder')"
|
|
38
42
|
fluid
|
|
39
43
|
/>
|
|
40
44
|
<span class="leading-0 text-muted-foreground">
|
|
@@ -45,6 +49,7 @@ const end = computed({
|
|
|
45
49
|
v-bind="$attrs"
|
|
46
50
|
:min="start ?? min"
|
|
47
51
|
:max="max"
|
|
52
|
+
:placeholder="endPlaceholder ?? T('endPlaceholder')"
|
|
48
53
|
fluid
|
|
49
54
|
/>
|
|
50
55
|
</div>
|
|
@@ -51,13 +51,12 @@ const meta = {
|
|
|
51
51
|
render: args => ({
|
|
52
52
|
components: { RadioCardGroup },
|
|
53
53
|
setup () {
|
|
54
|
-
|
|
55
|
-
return { args, selected }
|
|
54
|
+
return { args }
|
|
56
55
|
},
|
|
57
56
|
template: `
|
|
58
57
|
<div class="max-w-md space-y-4">
|
|
59
|
-
<RadioCardGroup v-bind="args" v
|
|
60
|
-
<div class="text-sm text-muted-foreground">Selected: {{
|
|
58
|
+
<RadioCardGroup v-bind="args" @update:modelValue="v => args.modelValue = v" />
|
|
59
|
+
<div class="text-sm text-muted-foreground">Selected: {{ args.modelValue }}</div>
|
|
61
60
|
</div>
|
|
62
61
|
`,
|
|
63
62
|
}),
|
package/i18n/messages/ar.json
CHANGED
package/i18n/messages/de.json
CHANGED
package/i18n/messages/en.json
CHANGED
package/i18n/messages/es.json
CHANGED
package/i18n/messages/fr.json
CHANGED
package/i18n/messages/hi.json
CHANGED
package/i18n/messages/id.json
CHANGED
package/i18n/messages/it.json
CHANGED
package/i18n/messages/ja.json
CHANGED
package/i18n/messages/ko.json
CHANGED
package/i18n/messages/nl.json
CHANGED
package/i18n/messages/pl.json
CHANGED
package/i18n/messages/pt.json
CHANGED
package/i18n/messages/ru.json
CHANGED
package/i18n/messages/th.json
CHANGED
package/i18n/messages/tr.json
CHANGED
package/i18n/messages/vi.json
CHANGED
package/i18n/messages/zh-CN.json
CHANGED
package/i18n/messages/zh-TW.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@polymarbot/nuxt-layer-shadcn-ui",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
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": "93045d977de0e19a823787d21ba9631a3d5b7ee8"
|
|
46
46
|
}
|