@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.
@@ -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 size="icon" variant="outline" icon="plus" />
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 size="icon" variant="outline" icon="plus" />
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
- const value = ref<Date | string | null>(null)
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-model="value" />
47
- <div class="mt-2 text-sm text-muted-foreground">Value: {{ value }}</div>
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
- const start = ref<Date | string | null>(args.start ?? null)
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 v-bind="args" v-model:start="start" v-model:end="end" />
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
- const otp = ref('')
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-model="otp" />
27
- <div class="text-sm text-muted-foreground">Value: {{ otp }}</div>
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
  }),
@@ -0,0 +1,4 @@
1
+ {
2
+ "endPlaceholder": "Max",
3
+ "startPlaceholder": "Min"
4
+ }
@@ -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: 20,
17
- end: 80,
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
- const start = ref<number | undefined>(args.start)
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 v-bind="args" v-model:start="start" v-model:end="end" />
32
- <div class="mt-2 text-sm text-muted-foreground">Start: {{ start }}, End: {{ end }}</div>
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>
@@ -5,4 +5,8 @@ export interface InputRangeProps extends /* @vue-ignore */ InputNumberProps {
5
5
  end?: number
6
6
  min?: number
7
7
  max?: number
8
+ /** Placeholder for start input */
9
+ startPlaceholder?: string
10
+ /** Placeholder for end input */
11
+ endPlaceholder?: string
8
12
  }
@@ -51,13 +51,12 @@ const meta = {
51
51
  render: args => ({
52
52
  components: { RadioCardGroup },
53
53
  setup () {
54
- const selected = ref(args.modelValue ?? '')
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-model="selected" />
60
- <div class="text-sm text-muted-foreground">Selected: {{ selected }}</div>
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
  }),
@@ -51,6 +51,10 @@
51
51
  "Dropdown": {
52
52
  "empty": "لا توجد عناصر"
53
53
  },
54
+ "InputRange": {
55
+ "endPlaceholder": "أقصى",
56
+ "startPlaceholder": "أدنى"
57
+ },
54
58
  "Pagination": {
55
59
  "pageReport": "{first}–{last} من {total}"
56
60
  },
@@ -51,6 +51,10 @@
51
51
  "Dropdown": {
52
52
  "empty": "Keine Elemente"
53
53
  },
54
+ "InputRange": {
55
+ "endPlaceholder": "Maximum",
56
+ "startPlaceholder": "Minimum"
57
+ },
54
58
  "Pagination": {
55
59
  "pageReport": "{first}–{last} von {total}"
56
60
  },
@@ -51,6 +51,10 @@
51
51
  "Dropdown": {
52
52
  "empty": "No items"
53
53
  },
54
+ "InputRange": {
55
+ "endPlaceholder": "Max",
56
+ "startPlaceholder": "Min"
57
+ },
54
58
  "Pagination": {
55
59
  "pageReport": "{first}–{last} of {total}"
56
60
  },
@@ -51,6 +51,10 @@
51
51
  "Dropdown": {
52
52
  "empty": "Sin elementos"
53
53
  },
54
+ "InputRange": {
55
+ "endPlaceholder": "Máximo",
56
+ "startPlaceholder": "Mínimo"
57
+ },
54
58
  "Pagination": {
55
59
  "pageReport": "{first}–{last} de {total}"
56
60
  },
@@ -51,6 +51,10 @@
51
51
  "Dropdown": {
52
52
  "empty": "Aucun élément"
53
53
  },
54
+ "InputRange": {
55
+ "endPlaceholder": "Max",
56
+ "startPlaceholder": "Min"
57
+ },
54
58
  "Pagination": {
55
59
  "pageReport": "{first}–{last} sur {total}"
56
60
  },
@@ -51,6 +51,10 @@
51
51
  "Dropdown": {
52
52
  "empty": "कोई आइटम नहीं"
53
53
  },
54
+ "InputRange": {
55
+ "endPlaceholder": "अधिकतम",
56
+ "startPlaceholder": "न्यूनतम"
57
+ },
54
58
  "Pagination": {
55
59
  "pageReport": "{first}–{last} में से {total}"
56
60
  },
@@ -51,6 +51,10 @@
51
51
  "Dropdown": {
52
52
  "empty": "Tidak ada item"
53
53
  },
54
+ "InputRange": {
55
+ "endPlaceholder": "Maksimal",
56
+ "startPlaceholder": "Minimal"
57
+ },
54
58
  "Pagination": {
55
59
  "pageReport": "{first}–{last} dari {total}"
56
60
  },
@@ -51,6 +51,10 @@
51
51
  "Dropdown": {
52
52
  "empty": "Nessun elemento"
53
53
  },
54
+ "InputRange": {
55
+ "endPlaceholder": "Massimo",
56
+ "startPlaceholder": "Minimo"
57
+ },
54
58
  "Pagination": {
55
59
  "pageReport": "{first}–{last} di {total}"
56
60
  },
@@ -51,6 +51,10 @@
51
51
  "Dropdown": {
52
52
  "empty": "アイテムなし"
53
53
  },
54
+ "InputRange": {
55
+ "endPlaceholder": "最大値",
56
+ "startPlaceholder": "最小値"
57
+ },
54
58
  "Pagination": {
55
59
  "pageReport": "{first}〜{last}件 / 全{total}件"
56
60
  },
@@ -51,6 +51,10 @@
51
51
  "Dropdown": {
52
52
  "empty": "항목 없음"
53
53
  },
54
+ "InputRange": {
55
+ "endPlaceholder": "최대값",
56
+ "startPlaceholder": "최소값"
57
+ },
54
58
  "Pagination": {
55
59
  "pageReport": "{first}–{last} / {total}"
56
60
  },
@@ -51,6 +51,10 @@
51
51
  "Dropdown": {
52
52
  "empty": "Geen items"
53
53
  },
54
+ "InputRange": {
55
+ "endPlaceholder": "Maximum",
56
+ "startPlaceholder": "Minimum"
57
+ },
54
58
  "Pagination": {
55
59
  "pageReport": "{first}–{last} van {total}"
56
60
  },
@@ -51,6 +51,10 @@
51
51
  "Dropdown": {
52
52
  "empty": "Brak elementów"
53
53
  },
54
+ "InputRange": {
55
+ "endPlaceholder": "Maksimum",
56
+ "startPlaceholder": "Minimum"
57
+ },
54
58
  "Pagination": {
55
59
  "pageReport": "{first}–{last} z {total}"
56
60
  },
@@ -51,6 +51,10 @@
51
51
  "Dropdown": {
52
52
  "empty": "Sem itens"
53
53
  },
54
+ "InputRange": {
55
+ "endPlaceholder": "Máximo",
56
+ "startPlaceholder": "Mínimo"
57
+ },
54
58
  "Pagination": {
55
59
  "pageReport": "{first}–{last} de {total}"
56
60
  },
@@ -51,6 +51,10 @@
51
51
  "Dropdown": {
52
52
  "empty": "Нет элементов"
53
53
  },
54
+ "InputRange": {
55
+ "endPlaceholder": "Максимум",
56
+ "startPlaceholder": "Минимум"
57
+ },
54
58
  "Pagination": {
55
59
  "pageReport": "{first}–{last} из {total}"
56
60
  },
@@ -51,6 +51,10 @@
51
51
  "Dropdown": {
52
52
  "empty": "ไม่มีรายการ"
53
53
  },
54
+ "InputRange": {
55
+ "endPlaceholder": "สูงสุด",
56
+ "startPlaceholder": "ต่ำสุด"
57
+ },
54
58
  "Pagination": {
55
59
  "pageReport": "รายการที่ {first}–{last} จากทั้งหมด {total}"
56
60
  },
@@ -51,6 +51,10 @@
51
51
  "Dropdown": {
52
52
  "empty": "Öğe yok"
53
53
  },
54
+ "InputRange": {
55
+ "endPlaceholder": "Maks",
56
+ "startPlaceholder": "Min"
57
+ },
54
58
  "Pagination": {
55
59
  "pageReport": "{first}–{last} / {total}"
56
60
  },
@@ -51,6 +51,10 @@
51
51
  "Dropdown": {
52
52
  "empty": "Không có mục"
53
53
  },
54
+ "InputRange": {
55
+ "endPlaceholder": "Tối đa",
56
+ "startPlaceholder": "Tối thiểu"
57
+ },
54
58
  "Pagination": {
55
59
  "pageReport": "{first}–{last} của {total}"
56
60
  },
@@ -51,6 +51,10 @@
51
51
  "Dropdown": {
52
52
  "empty": "无项目"
53
53
  },
54
+ "InputRange": {
55
+ "endPlaceholder": "最大值",
56
+ "startPlaceholder": "最小值"
57
+ },
54
58
  "Pagination": {
55
59
  "pageReport": "{first}–{last} 共 {total}"
56
60
  },
@@ -51,6 +51,10 @@
51
51
  "Dropdown": {
52
52
  "empty": "沒有項目"
53
53
  },
54
+ "InputRange": {
55
+ "endPlaceholder": "最大值",
56
+ "startPlaceholder": "最小值"
57
+ },
54
58
  "Pagination": {
55
59
  "pageReport": "{first}–{last} 共 {total}"
56
60
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polymarbot/nuxt-layer-shadcn-ui",
3
- "version": "0.6.1",
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": "6d666cbb075bfeae008655dcb644bcac99f70ff4"
45
+ "gitHead": "93045d977de0e19a823787d21ba9631a3d5b7ee8"
46
46
  }