@nuxt/ui 3.1.1 → 3.1.2

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.
Files changed (105) hide show
  1. package/.nuxt/ui/alert.ts +0 -5
  2. package/.nuxt/ui/badge.ts +30 -7
  3. package/.nuxt/ui/button-group.ts +0 -13
  4. package/.nuxt/ui/button.ts +2 -7
  5. package/.nuxt/ui/calendar.ts +1 -1
  6. package/.nuxt/ui/carousel.ts +0 -5
  7. package/.nuxt/ui/checkbox-group.ts +144 -1
  8. package/.nuxt/ui/color-picker.ts +2 -2
  9. package/.nuxt/ui/input-menu.ts +2 -11
  10. package/.nuxt/ui/input-number.ts +10 -0
  11. package/.nuxt/ui/input.ts +2 -11
  12. package/.nuxt/ui/link.ts +12 -5
  13. package/.nuxt/ui/select-menu.ts +2 -11
  14. package/.nuxt/ui/select.ts +2 -11
  15. package/.nuxt/ui/tabs.ts +4 -3
  16. package/.nuxt/ui/textarea.ts +2 -11
  17. package/.nuxt/ui/toast.ts +0 -5
  18. package/cli/templates.mjs +2 -2
  19. package/dist/module.json +1 -1
  20. package/dist/module.mjs +14 -5
  21. package/dist/runtime/components/Accordion.vue +9 -9
  22. package/dist/runtime/components/Accordion.vue.d.ts +2 -0
  23. package/dist/runtime/components/Alert.vue +1 -1
  24. package/dist/runtime/components/Avatar.vue +2 -2
  25. package/dist/runtime/components/AvatarGroup.vue +1 -1
  26. package/dist/runtime/components/Badge.vue +5 -3
  27. package/dist/runtime/components/Badge.vue.d.ts +2 -0
  28. package/dist/runtime/components/Breadcrumb.vue +8 -8
  29. package/dist/runtime/components/Breadcrumb.vue.d.ts +2 -0
  30. package/dist/runtime/components/Button.vue +2 -3
  31. package/dist/runtime/components/Button.vue.d.ts +1 -1
  32. package/dist/runtime/components/Calendar.vue +2 -1
  33. package/dist/runtime/components/Card.vue +1 -1
  34. package/dist/runtime/components/Carousel.vue +5 -2
  35. package/dist/runtime/components/Carousel.vue.d.ts +6 -1
  36. package/dist/runtime/components/Checkbox.vue +2 -2
  37. package/dist/runtime/components/CheckboxGroup.vue +8 -5
  38. package/dist/runtime/components/CheckboxGroup.vue.d.ts +7 -1
  39. package/dist/runtime/components/Chip.vue +1 -1
  40. package/dist/runtime/components/Collapsible.vue +1 -1
  41. package/dist/runtime/components/ColorPicker.vue +1 -1
  42. package/dist/runtime/components/CommandPalette.vue +17 -17
  43. package/dist/runtime/components/CommandPalette.vue.d.ts +2 -0
  44. package/dist/runtime/components/ContextMenu.vue.d.ts +2 -0
  45. package/dist/runtime/components/ContextMenuContent.vue +15 -15
  46. package/dist/runtime/components/DropdownMenu.vue.d.ts +2 -0
  47. package/dist/runtime/components/DropdownMenuContent.vue +15 -15
  48. package/dist/runtime/components/FormField.vue +5 -5
  49. package/dist/runtime/components/Input.vue +2 -2
  50. package/dist/runtime/components/Input.vue.d.ts +23 -29
  51. package/dist/runtime/components/InputMenu.vue +17 -17
  52. package/dist/runtime/components/InputMenu.vue.d.ts +210 -0
  53. package/dist/runtime/components/InputNumber.vue +13 -7
  54. package/dist/runtime/components/InputNumber.vue.d.ts +78 -0
  55. package/dist/runtime/components/Link.vue +5 -14
  56. package/dist/runtime/components/NavigationMenu.vue +35 -28
  57. package/dist/runtime/components/NavigationMenu.vue.d.ts +20 -2
  58. package/dist/runtime/components/Pagination.vue +1 -1
  59. package/dist/runtime/components/PinInput.vue +1 -1
  60. package/dist/runtime/components/Progress.vue +1 -1
  61. package/dist/runtime/components/RadioGroup.vue +8 -8
  62. package/dist/runtime/components/RadioGroup.vue.d.ts +2 -0
  63. package/dist/runtime/components/Select.vue +12 -12
  64. package/dist/runtime/components/Select.vue.d.ts +3 -1
  65. package/dist/runtime/components/SelectMenu.vue +13 -13
  66. package/dist/runtime/components/SelectMenu.vue.d.ts +2 -0
  67. package/dist/runtime/components/Separator.vue +1 -1
  68. package/dist/runtime/components/Slider.vue +16 -4
  69. package/dist/runtime/components/Slider.vue.d.ts +26 -20
  70. package/dist/runtime/components/Stepper.vue +10 -10
  71. package/dist/runtime/components/Stepper.vue.d.ts +2 -0
  72. package/dist/runtime/components/Switch.vue +1 -1
  73. package/dist/runtime/components/Table.vue +2 -2
  74. package/dist/runtime/components/Tabs.vue +6 -6
  75. package/dist/runtime/components/Tabs.vue.d.ts +2 -0
  76. package/dist/runtime/components/Textarea.vue +3 -3
  77. package/dist/runtime/components/Textarea.vue.d.ts +23 -30
  78. package/dist/runtime/components/Toast.vue +3 -2
  79. package/dist/runtime/components/Toast.vue.d.ts +6 -0
  80. package/dist/runtime/components/Toaster.vue +4 -4
  81. package/dist/runtime/components/Toaster.vue.d.ts +6 -0
  82. package/dist/runtime/components/Tree.vue +10 -10
  83. package/dist/runtime/components/Tree.vue.d.ts +2 -0
  84. package/dist/runtime/composables/useFormField.d.ts +1 -1
  85. package/dist/runtime/composables/useFormField.js +2 -1
  86. package/dist/runtime/inertia/components/Link.vue +46 -60
  87. package/dist/runtime/inertia/components/Link.vue.d.ts +1 -1
  88. package/dist/runtime/inertia/components/LinkBase.vue +68 -0
  89. package/dist/runtime/inertia/components/LinkBase.vue.d.ts +25 -0
  90. package/dist/runtime/inertia/stubs.d.ts +1 -1
  91. package/dist/runtime/inertia/stubs.js +1 -1
  92. package/dist/runtime/locale/index.d.ts +1 -0
  93. package/dist/runtime/locale/index.js +1 -0
  94. package/dist/runtime/locale/sl.d.ts +3 -0
  95. package/dist/runtime/locale/sl.js +54 -0
  96. package/dist/runtime/utils/link.d.ts +1 -0
  97. package/dist/runtime/utils/link.js +12 -0
  98. package/dist/runtime/vue/components/Link.vue +27 -40
  99. package/dist/runtime/vue/composables/useAppConfig.js +3 -1
  100. package/dist/runtime/vue/stubs.d.ts +1 -1
  101. package/dist/runtime/vue/stubs.js +1 -1
  102. package/dist/shared/{ui.CbtTMMzt.mjs → ui.BvUP-pSb.mjs} +103 -16
  103. package/dist/unplugin.mjs +1 -1
  104. package/dist/vite.mjs +1 -1
  105. package/package.json +21 -21
package/.nuxt/ui/alert.ts CHANGED
@@ -15,11 +15,6 @@ const variant = [
15
15
  "subtle"
16
16
  ] as const
17
17
 
18
- const orientation = [
19
- "horizontal",
20
- "vertical"
21
- ] as const
22
-
23
18
  export default {
24
19
  "slots": {
25
20
  "root": "relative overflow-hidden w-full rounded-lg p-4 flex gap-2.5",
package/.nuxt/ui/badge.ts CHANGED
@@ -1,8 +1,3 @@
1
- const buttonGroup = [
2
- "horizontal",
3
- "vertical"
4
- ] as const
5
-
6
1
  const color = [
7
2
  "primary",
8
3
  "secondary",
@@ -39,8 +34,8 @@ export default {
39
34
  },
40
35
  "variants": {
41
36
  "buttonGroup": {
42
- "horizontal": "not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none",
43
- "vertical": "not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none"
37
+ "horizontal": "not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none focus-visible:z-[1]",
38
+ "vertical": "not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none focus-visible:z-[1]"
44
39
  },
45
40
  "color": {
46
41
  "primary": "",
@@ -88,6 +83,9 @@ export default {
88
83
  "leadingAvatarSize": "2xs",
89
84
  "trailingIcon": "size-6"
90
85
  }
86
+ },
87
+ "square": {
88
+ "true": ""
91
89
  }
92
90
  },
93
91
  "compoundVariants": [
@@ -230,6 +228,31 @@ export default {
230
228
  "color": "neutral" as typeof color[number],
231
229
  "variant": "subtle" as typeof variant[number],
232
230
  "class": "ring ring-inset ring-accented text-default bg-elevated"
231
+ },
232
+ {
233
+ "size": "xs" as typeof size[number],
234
+ "square": true,
235
+ "class": "p-0.5"
236
+ },
237
+ {
238
+ "size": "sm" as typeof size[number],
239
+ "square": true,
240
+ "class": "p-1"
241
+ },
242
+ {
243
+ "size": "md" as typeof size[number],
244
+ "square": true,
245
+ "class": "p-1"
246
+ },
247
+ {
248
+ "size": "lg" as typeof size[number],
249
+ "square": true,
250
+ "class": "p-1"
251
+ },
252
+ {
253
+ "size": "xl" as typeof size[number],
254
+ "square": true,
255
+ "class": "p-1"
233
256
  }
234
257
  ],
235
258
  "defaultVariants": {
@@ -1,16 +1,3 @@
1
- const size = [
2
- "xs",
3
- "sm",
4
- "md",
5
- "lg",
6
- "xl"
7
- ] as const
8
-
9
- const orientation = [
10
- "horizontal",
11
- "vertical"
12
- ] as const
13
-
14
1
  export default {
15
2
  "base": "relative",
16
3
  "variants": {
@@ -1,8 +1,3 @@
1
- const buttonGroup = [
2
- "horizontal",
3
- "vertical"
4
- ] as const
5
-
6
1
  const color = [
7
2
  "primary",
8
3
  "secondary",
@@ -44,8 +39,8 @@ export default {
44
39
  },
45
40
  "variants": {
46
41
  "buttonGroup": {
47
- "horizontal": "not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none",
48
- "vertical": "not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none"
42
+ "horizontal": "not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none focus-visible:z-[1]",
43
+ "vertical": "not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none focus-visible:z-[1]"
49
44
  },
50
45
  "color": {
51
46
  "primary": "",
@@ -61,7 +61,7 @@ export default {
61
61
  },
62
62
  "neutral": {
63
63
  "headCell": "text-highlighted",
64
- "cellTrigger": "focus-visible:ring-inverted data-[selected]:bg-inverted data-today:not-data-[selected]:text-inverted data-[highlighted]:bg-inverted/20 hover:not-data-[selected]:bg-inverted/10"
64
+ "cellTrigger": "focus-visible:ring-inverted data-[selected]:bg-inverted data-today:not-data-[selected]:text-highlighted data-[highlighted]:bg-inverted/20 hover:not-data-[selected]:bg-inverted/10"
65
65
  }
66
66
  },
67
67
  "size": {
@@ -1,8 +1,3 @@
1
- const orientation = [
2
- "vertical",
3
- "horizontal"
4
- ] as const
5
-
6
1
  export default {
7
2
  "slots": {
8
3
  "root": "relative focus:outline-none",
@@ -3,6 +3,22 @@ const orientation = [
3
3
  "vertical"
4
4
  ] as const
5
5
 
6
+ const color = [
7
+ "primary",
8
+ "secondary",
9
+ "success",
10
+ "info",
11
+ "warning",
12
+ "error",
13
+ "neutral"
14
+ ] as const
15
+
16
+ const variant = [
17
+ "list",
18
+ "card",
19
+ "table"
20
+ ] as const
21
+
6
22
  const size = [
7
23
  "xs",
8
24
  "sm",
@@ -27,6 +43,22 @@ export default {
27
43
  "fieldset": "flex-col"
28
44
  }
29
45
  },
46
+ "color": {
47
+ "primary": {},
48
+ "secondary": {},
49
+ "success": {},
50
+ "info": {},
51
+ "warning": {},
52
+ "error": {},
53
+ "neutral": {}
54
+ },
55
+ "variant": {
56
+ "list": {},
57
+ "card": {},
58
+ "table": {
59
+ "item": "border border-muted"
60
+ }
61
+ },
30
62
  "size": {
31
63
  "xs": {
32
64
  "fieldset": "gap-y-0.5",
@@ -55,7 +87,118 @@ export default {
55
87
  }
56
88
  }
57
89
  },
90
+ "compoundVariants": [
91
+ {
92
+ "size": "xs" as typeof size[number],
93
+ "variant": "table" as typeof variant[number],
94
+ "class": {
95
+ "item": "p-2.5"
96
+ }
97
+ },
98
+ {
99
+ "size": "sm" as typeof size[number],
100
+ "variant": "table" as typeof variant[number],
101
+ "class": {
102
+ "item": "p-3"
103
+ }
104
+ },
105
+ {
106
+ "size": "md" as typeof size[number],
107
+ "variant": "table" as typeof variant[number],
108
+ "class": {
109
+ "item": "p-3.5"
110
+ }
111
+ },
112
+ {
113
+ "size": "lg" as typeof size[number],
114
+ "variant": "table" as typeof variant[number],
115
+ "class": {
116
+ "item": "p-4"
117
+ }
118
+ },
119
+ {
120
+ "size": "xl" as typeof size[number],
121
+ "variant": "table" as typeof variant[number],
122
+ "class": {
123
+ "item": "p-4.5"
124
+ }
125
+ },
126
+ {
127
+ "orientation": "horizontal" as typeof orientation[number],
128
+ "variant": "table" as typeof variant[number],
129
+ "class": {
130
+ "item": "first-of-type:rounded-l-lg last-of-type:rounded-r-lg",
131
+ "fieldset": "gap-0 -space-x-px"
132
+ }
133
+ },
134
+ {
135
+ "orientation": "vertical" as typeof orientation[number],
136
+ "variant": "table" as typeof variant[number],
137
+ "class": {
138
+ "item": "first-of-type:rounded-t-lg last-of-type:rounded-b-lg",
139
+ "fieldset": "gap-0 -space-y-px"
140
+ }
141
+ },
142
+ {
143
+ "color": "primary" as typeof color[number],
144
+ "variant": "table" as typeof variant[number],
145
+ "class": {
146
+ "item": "has-data-[state=checked]:bg-primary/10 has-data-[state=checked]:border-primary/50 has-data-[state=checked]:z-[1]"
147
+ }
148
+ },
149
+ {
150
+ "color": "secondary" as typeof color[number],
151
+ "variant": "table" as typeof variant[number],
152
+ "class": {
153
+ "item": "has-data-[state=checked]:bg-secondary/10 has-data-[state=checked]:border-secondary/50 has-data-[state=checked]:z-[1]"
154
+ }
155
+ },
156
+ {
157
+ "color": "success" as typeof color[number],
158
+ "variant": "table" as typeof variant[number],
159
+ "class": {
160
+ "item": "has-data-[state=checked]:bg-success/10 has-data-[state=checked]:border-success/50 has-data-[state=checked]:z-[1]"
161
+ }
162
+ },
163
+ {
164
+ "color": "info" as typeof color[number],
165
+ "variant": "table" as typeof variant[number],
166
+ "class": {
167
+ "item": "has-data-[state=checked]:bg-info/10 has-data-[state=checked]:border-info/50 has-data-[state=checked]:z-[1]"
168
+ }
169
+ },
170
+ {
171
+ "color": "warning" as typeof color[number],
172
+ "variant": "table" as typeof variant[number],
173
+ "class": {
174
+ "item": "has-data-[state=checked]:bg-warning/10 has-data-[state=checked]:border-warning/50 has-data-[state=checked]:z-[1]"
175
+ }
176
+ },
177
+ {
178
+ "color": "error" as typeof color[number],
179
+ "variant": "table" as typeof variant[number],
180
+ "class": {
181
+ "item": "has-data-[state=checked]:bg-error/10 has-data-[state=checked]:border-error/50 has-data-[state=checked]:z-[1]"
182
+ }
183
+ },
184
+ {
185
+ "color": "neutral" as typeof color[number],
186
+ "variant": "table" as typeof variant[number],
187
+ "class": {
188
+ "item": "has-data-[state=checked]:bg-elevated has-data-[state=checked]:border-inverted/50 has-data-[state=checked]:z-[1]"
189
+ }
190
+ },
191
+ {
192
+ "variant": "table" as typeof variant[number],
193
+ "disabled": true,
194
+ "class": {
195
+ "item": "cursor-not-allowed opacity-75"
196
+ }
197
+ }
198
+ ],
58
199
  "defaultVariants": {
59
- "size": "md" as typeof size[number]
200
+ "size": "md" as typeof size[number],
201
+ "variant": "list" as typeof variant[number],
202
+ "color": "primary" as typeof color[number]
60
203
  }
61
204
  }
@@ -10,10 +10,10 @@ export default {
10
10
  "slots": {
11
11
  "root": "data-[disabled]:opacity-75",
12
12
  "picker": "flex gap-4",
13
- "selector": "rounded-md",
13
+ "selector": "rounded-md touch-none",
14
14
  "selectorBackground": "w-full h-full relative rounded-md",
15
15
  "selectorThumb": "-translate-y-1/2 -translate-x-1/2 absolute size-4 ring-2 ring-(--color-white) rounded-full cursor-pointer data-[disabled]:cursor-not-allowed",
16
- "track": "w-[8px] relative rounded-md",
16
+ "track": "w-[8px] relative rounded-md touch-none",
17
17
  "trackThumb": "absolute transform -translate-y-1/2 -translate-x-[4px] rtl:translate-x-[4px] size-4 rounded-full ring-2 ring-(--color-white) cursor-pointer data-[disabled]:cursor-not-allowed"
18
18
  },
19
19
  "variants": {
@@ -1,8 +1,3 @@
1
- const buttonGroup = [
2
- "horizontal",
3
- "vertical"
4
- ] as const
5
-
6
1
  const size = [
7
2
  "xs",
8
3
  "sm",
@@ -29,10 +24,6 @@ const color = [
29
24
  "neutral"
30
25
  ] as const
31
26
 
32
- const type = [
33
- "file"
34
- ] as const
35
-
36
27
  export default {
37
28
  "slots": {
38
29
  "root": "relative inline-flex items-center",
@@ -80,11 +71,11 @@ export default {
80
71
  "variants": {
81
72
  "buttonGroup": {
82
73
  "horizontal": {
83
- "root": "group",
74
+ "root": "group has-focus-visible:z-[1]",
84
75
  "base": "group-not-only:group-first:rounded-e-none group-not-only:group-last:rounded-s-none group-not-last:group-not-first:rounded-none"
85
76
  },
86
77
  "vertical": {
87
- "root": "group",
78
+ "root": "group has-focus-visible:z-[1]",
88
79
  "base": "group-not-only:group-first:rounded-b-none group-not-only:group-last:rounded-t-none group-not-last:group-not-first:rounded-none"
89
80
  }
90
81
  },
@@ -40,6 +40,16 @@ export default {
40
40
  "decrement": "absolute flex items-center"
41
41
  },
42
42
  "variants": {
43
+ "buttonGroup": {
44
+ "horizontal": {
45
+ "root": "group has-focus-visible:z-[1]",
46
+ "base": "group-not-only:group-first:rounded-e-none group-not-only:group-last:rounded-s-none group-not-last:group-not-first:rounded-none"
47
+ },
48
+ "vertical": {
49
+ "root": "group has-focus-visible:z-[1]",
50
+ "base": "group-not-only:group-first:rounded-b-none group-not-only:group-last:rounded-t-none group-not-last:group-not-first:rounded-none"
51
+ }
52
+ },
43
53
  "color": {
44
54
  "primary": "",
45
55
  "secondary": "",
package/.nuxt/ui/input.ts CHANGED
@@ -1,8 +1,3 @@
1
- const buttonGroup = [
2
- "horizontal",
3
- "vertical"
4
- ] as const
5
-
6
1
  const size = [
7
2
  "xs",
8
3
  "sm",
@@ -29,10 +24,6 @@ const color = [
29
24
  "neutral"
30
25
  ] as const
31
26
 
32
- const type = [
33
- "file"
34
- ] as const
35
-
36
27
  export default {
37
28
  "slots": {
38
29
  "root": "relative inline-flex items-center",
@@ -50,11 +41,11 @@ export default {
50
41
  "variants": {
51
42
  "buttonGroup": {
52
43
  "horizontal": {
53
- "root": "group",
44
+ "root": "group has-focus-visible:z-[1]",
54
45
  "base": "group-not-only:group-first:rounded-e-none group-not-only:group-last:rounded-s-none group-not-last:group-not-first:rounded-none"
55
46
  },
56
47
  "vertical": {
57
- "root": "group",
48
+ "root": "group has-focus-visible:z-[1]",
58
49
  "base": "group-not-only:group-first:rounded-b-none group-not-only:group-last:rounded-t-none group-not-last:group-not-first:rounded-none"
59
50
  }
60
51
  },
package/.nuxt/ui/link.ts CHANGED
@@ -3,13 +3,20 @@ export default {
3
3
  "variants": {
4
4
  "active": {
5
5
  "true": "text-primary",
6
- "false": [
7
- "text-muted hover:text-default",
8
- "transition-colors"
9
- ]
6
+ "false": "text-muted"
10
7
  },
11
8
  "disabled": {
12
9
  "true": "cursor-not-allowed opacity-75"
13
10
  }
14
- }
11
+ },
12
+ "compoundVariants": [
13
+ {
14
+ "active": false,
15
+ "disabled": false,
16
+ "class": [
17
+ "hover:text-default",
18
+ "transition-colors"
19
+ ]
20
+ }
21
+ ]
15
22
  }
@@ -1,8 +1,3 @@
1
- const buttonGroup = [
2
- "horizontal",
3
- "vertical"
4
- ] as const
5
-
6
1
  const size = [
7
2
  "xs",
8
3
  "sm",
@@ -29,10 +24,6 @@ const color = [
29
24
  "neutral"
30
25
  ] as const
31
26
 
32
- const type = [
33
- "file"
34
- ] as const
35
-
36
27
  export default {
37
28
  "slots": {
38
29
  "base": [
@@ -77,8 +68,8 @@ export default {
77
68
  },
78
69
  "variants": {
79
70
  "buttonGroup": {
80
- "horizontal": "not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none",
81
- "vertical": "not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none"
71
+ "horizontal": "not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none focus-visible:z-[1]",
72
+ "vertical": "not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none focus-visible:z-[1]"
82
73
  },
83
74
  "size": {
84
75
  "xs": {
@@ -1,8 +1,3 @@
1
- const buttonGroup = [
2
- "horizontal",
3
- "vertical"
4
- ] as const
5
-
6
1
  const size = [
7
2
  "xs",
8
3
  "sm",
@@ -29,10 +24,6 @@ const color = [
29
24
  "neutral"
30
25
  ] as const
31
26
 
32
- const type = [
33
- "file"
34
- ] as const
35
-
36
27
  export default {
37
28
  "slots": {
38
29
  "base": [
@@ -72,8 +63,8 @@ export default {
72
63
  },
73
64
  "variants": {
74
65
  "buttonGroup": {
75
- "horizontal": "not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none",
76
- "vertical": "not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none"
66
+ "horizontal": "not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none focus-visible:z-[1]",
67
+ "vertical": "not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none focus-visible:z-[1]"
77
68
  },
78
69
  "size": {
79
70
  "xs": {
package/.nuxt/ui/tabs.ts CHANGED
@@ -32,7 +32,7 @@ export default {
32
32
  "list": "relative flex p-1 group",
33
33
  "indicator": "absolute transition-[translate,width] duration-200",
34
34
  "trigger": [
35
- "group relative inline-flex items-center shrink-0 min-w-0 data-[state=inactive]:text-muted hover:data-[state=inactive]:not-disabled:text-default font-medium rounded-md disabled:cursor-not-allowed disabled:opacity-75",
35
+ "group relative inline-flex items-center min-w-0 data-[state=inactive]:text-muted hover:data-[state=inactive]:not-disabled:text-default font-medium rounded-md disabled:cursor-not-allowed disabled:opacity-75",
36
36
  "transition-colors"
37
37
  ],
38
38
  "content": "focus:outline-none w-full",
@@ -54,12 +54,13 @@ export default {
54
54
  "variant": {
55
55
  "pill": {
56
56
  "list": "bg-elevated rounded-lg",
57
- "trigger": "flex-1 w-full",
57
+ "trigger": "grow",
58
58
  "indicator": "rounded-md shadow-xs"
59
59
  },
60
60
  "link": {
61
61
  "list": "border-default",
62
- "indicator": "rounded-full"
62
+ "indicator": "rounded-full",
63
+ "trigger": "focus:outline-none"
63
64
  }
64
65
  },
65
66
  "orientation": {
@@ -1,8 +1,3 @@
1
- const buttonGroup = [
2
- "horizontal",
3
- "vertical"
4
- ] as const
5
-
6
1
  const size = [
7
2
  "xs",
8
3
  "sm",
@@ -29,10 +24,6 @@ const color = [
29
24
  "neutral"
30
25
  ] as const
31
26
 
32
- const type = [
33
- "file"
34
- ] as const
35
-
36
27
  export default {
37
28
  "slots": {
38
29
  "root": "relative inline-flex items-center",
@@ -50,11 +41,11 @@ export default {
50
41
  "variants": {
51
42
  "buttonGroup": {
52
43
  "horizontal": {
53
- "root": "group",
44
+ "root": "group has-focus-visible:z-[1]",
54
45
  "base": "group-not-only:group-first:rounded-e-none group-not-only:group-last:rounded-s-none group-not-last:group-not-first:rounded-none"
55
46
  },
56
47
  "vertical": {
57
- "root": "group",
48
+ "root": "group has-focus-visible:z-[1]",
58
49
  "base": "group-not-only:group-first:rounded-b-none group-not-only:group-last:rounded-t-none group-not-last:group-not-first:rounded-none"
59
50
  }
60
51
  },
package/.nuxt/ui/toast.ts CHANGED
@@ -8,11 +8,6 @@ const color = [
8
8
  "neutral"
9
9
  ] as const
10
10
 
11
- const orientation = [
12
- "horizontal",
13
- "vertical"
14
- ] as const
15
-
16
11
  export default {
17
12
  "slots": {
18
13
  "root": "relative group overflow-hidden bg-default shadow-lg rounded-lg ring ring-default p-4 flex gap-2.5 focus:outline-none",
package/cli/templates.mjs CHANGED
@@ -66,7 +66,7 @@ const ui = computed(() => tv({ extend: tv(theme), ...(appConfig.ui?.${camelName}
66
66
  </script>
67
67
 
68
68
  <template>
69
- <Primitive :as="as" :class="ui.root({ class: [props.class, props.ui?.root] })">
69
+ <Primitive :as="as" :class="ui.root({ class: [props.ui?.root, props.class] })">
70
70
  <slot />
71
71
  </Primitive>
72
72
  </template>
@@ -109,7 +109,7 @@ const ui = computed(() => tv({ extend: tv(theme), ...(appConfig.ui?.${camelName}
109
109
  </script>
110
110
 
111
111
  <template>
112
- <${upperName}Root v-bind="rootProps" :class="ui.root({ class: [props.class, props.ui?.root] })" />
112
+ <${upperName}Root v-bind="rootProps" :class="ui.root({ class: [props.ui?.root, props.class] })" />
113
113
  </template>
114
114
  `
115
115
  }
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/ui",
3
- "version": "3.1.1",
3
+ "version": "3.1.2",
4
4
  "docs": "https://ui.nuxt.com/getting-started/installation/nuxt",
5
5
  "configKey": "ui",
6
6
  "compatibility": {
package/dist/module.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { defu } from 'defu';
2
2
  import { defineNuxtModule, createResolver, addVitePlugin, addPlugin, addComponentsDir, addImportsDir, hasNuxtModule, installModule } from '@nuxt/kit';
3
- import { d as defaultOptions, r as resolveColors, a as getDefaultUiConfig, b as addTemplates } from './shared/ui.CbtTMMzt.mjs';
3
+ import { d as defaultOptions, r as resolveColors, a as getDefaultUiConfig, b as addTemplates } from './shared/ui.BvUP-pSb.mjs';
4
4
  import '../dist/runtime/utils/index.js';
5
5
  import 'node:url';
6
6
  import 'scule';
@@ -8,7 +8,7 @@ import 'tailwindcss/colors';
8
8
  import 'knitwork';
9
9
 
10
10
  const name = "@nuxt/ui";
11
- const version = "3.1.1";
11
+ const version = "3.1.2";
12
12
 
13
13
  const module = defineNuxtModule({
14
14
  meta: {
@@ -43,12 +43,21 @@ const module = defineNuxtModule({
43
43
  nuxt.options[key] = defu(nuxt.options[key], options2);
44
44
  }
45
45
  }
46
- await registerModule("@nuxt/icon", "icon", { cssLayer: "components" });
46
+ await registerModule("@nuxt/icon", "icon", {
47
+ cssLayer: "components"
48
+ });
47
49
  if (options.fonts) {
48
- await registerModule("@nuxt/fonts", "fonts", { experimental: { processCSSVariables: true } });
50
+ await registerModule("@nuxt/fonts", "fonts", {
51
+ defaults: {
52
+ weights: [400, 500, 600, 700]
53
+ }
54
+ });
49
55
  }
50
56
  if (options.colorMode) {
51
- await registerModule("@nuxtjs/color-mode", "colorMode", { classSuffix: "", disableTransition: true });
57
+ await registerModule("@nuxtjs/color-mode", "colorMode", {
58
+ classSuffix: "",
59
+ disableTransition: true
60
+ });
52
61
  }
53
62
  addPlugin({ src: resolve("./runtime/plugins/colors") });
54
63
  addComponentsDir({
@@ -34,34 +34,34 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.accordion ||
34
34
  </script>
35
35
 
36
36
  <template>
37
- <AccordionRoot v-bind="rootProps" :class="ui.root({ class: [props.class, props.ui?.root] })">
37
+ <AccordionRoot v-bind="rootProps" :class="ui.root({ class: [props.ui?.root, props.class] })">
38
38
  <AccordionItem
39
39
  v-for="(item, index) in props.items"
40
40
  v-slot="{ open }"
41
41
  :key="index"
42
42
  :value="item.value || String(index)"
43
43
  :disabled="item.disabled"
44
- :class="ui.item({ class: props.ui?.item })"
44
+ :class="ui.item({ class: [props.ui?.item, item.ui?.item, item.class] })"
45
45
  >
46
- <AccordionHeader as="div" :class="ui.header({ class: props.ui?.header })">
47
- <AccordionTrigger :class="ui.trigger({ class: props.ui?.trigger, disabled: item.disabled })">
46
+ <AccordionHeader as="div" :class="ui.header({ class: [props.ui?.header, item.ui?.header] })">
47
+ <AccordionTrigger :class="ui.trigger({ class: [props.ui?.trigger, item.ui?.trigger], disabled: item.disabled })">
48
48
  <slot name="leading" :item="item" :index="index" :open="open">
49
- <UIcon v-if="item.icon" :name="item.icon" :class="ui.leadingIcon({ class: props.ui?.leadingIcon })" />
49
+ <UIcon v-if="item.icon" :name="item.icon" :class="ui.leadingIcon({ class: [props.ui?.leadingIcon, item?.ui?.leadingIcon] })" />
50
50
  </slot>
51
51
 
52
- <span v-if="get(item, props.labelKey) || !!slots.default" :class="ui.label({ class: props.ui?.label })">
52
+ <span v-if="get(item, props.labelKey) || !!slots.default" :class="ui.label({ class: [props.ui?.label, item.ui?.label] })">
53
53
  <slot :item="item" :index="index" :open="open">{{ get(item, props.labelKey) }}</slot>
54
54
  </span>
55
55
 
56
56
  <slot name="trailing" :item="item" :index="index" :open="open">
57
- <UIcon :name="item.trailingIcon || trailingIcon || appConfig.ui.icons.chevronDown" :class="ui.trailingIcon({ class: props.ui?.trailingIcon })" />
57
+ <UIcon :name="item.trailingIcon || trailingIcon || appConfig.ui.icons.chevronDown" :class="ui.trailingIcon({ class: [props.ui?.trailingIcon, item.ui?.trailingIcon] })" />
58
58
  </slot>
59
59
  </AccordionTrigger>
60
60
  </AccordionHeader>
61
61
 
62
- <AccordionContent v-if="item.content || !!slots.content || item.slot && !!slots[item.slot] || !!slots.body || item.slot && !!slots[`${item.slot}-body`]" :class="ui.content({ class: props.ui?.content })">
62
+ <AccordionContent v-if="item.content || !!slots.content || item.slot && !!slots[item.slot] || !!slots.body || item.slot && !!slots[`${item.slot}-body`]" :class="ui.content({ class: [props.ui?.content, item.ui?.content] })">
63
63
  <slot :name="item.slot || 'content'" :item="item" :index="index" :open="open">
64
- <div :class="ui.body({ class: props.ui?.body })">
64
+ <div :class="ui.body({ class: [props.ui?.body, item.ui?.body] })">
65
65
  <slot :name="item.slot ? `${item.slot}-body` : 'body'" :item="item" :index="index" :open="open">
66
66
  {{ item.content }}
67
67
  </slot>