@nuxt/ui 3.2.0 → 3.3.1

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 (185) hide show
  1. package/.nuxt/ui/button.ts +42 -42
  2. package/.nuxt/ui/command-palette.ts +2 -1
  3. package/.nuxt/ui/drawer.ts +1 -1
  4. package/.nuxt/ui/file-upload.ts +290 -0
  5. package/.nuxt/ui/index.ts +1 -0
  6. package/.nuxt/ui/input.ts +1 -1
  7. package/.nuxt/ui/kbd.ts +167 -3
  8. package/.nuxt/ui/select.ts +7 -7
  9. package/.nuxt/ui/table.ts +8 -0
  10. package/.nuxt/ui/tabs.ts +4 -2
  11. package/.nuxt/ui/textarea.ts +1 -1
  12. package/.nuxt/ui/toast.ts +8 -15
  13. package/.nuxt/ui/tooltip.ts +1 -1
  14. package/cli/templates.mjs +8 -3
  15. package/dist/module.d.mts +15 -1
  16. package/dist/module.json +2 -2
  17. package/dist/module.mjs +3 -3
  18. package/dist/runtime/components/Accordion.vue.d.ts +1 -1
  19. package/dist/runtime/components/Alert.vue.d.ts +2 -2
  20. package/dist/runtime/components/App.vue.d.ts +1 -1
  21. package/dist/runtime/components/Avatar.vue.d.ts +1 -1
  22. package/dist/runtime/components/AvatarGroup.vue.d.ts +1 -1
  23. package/dist/runtime/components/Badge.vue.d.ts +1 -1
  24. package/dist/runtime/components/Breadcrumb.vue.d.ts +1 -1
  25. package/dist/runtime/components/Button.vue +6 -6
  26. package/dist/runtime/components/Button.vue.d.ts +1 -5
  27. package/dist/runtime/components/ButtonGroup.vue.d.ts +1 -1
  28. package/dist/runtime/components/Calendar.vue.d.ts +1 -1
  29. package/dist/runtime/components/Card.vue.d.ts +1 -1
  30. package/dist/runtime/components/Carousel.vue +18 -14
  31. package/dist/runtime/components/Carousel.vue.d.ts +1 -1
  32. package/dist/runtime/components/Checkbox.vue.d.ts +1 -1
  33. package/dist/runtime/components/CheckboxGroup.vue.d.ts +1 -1
  34. package/dist/runtime/components/Chip.vue.d.ts +2 -2
  35. package/dist/runtime/components/Collapsible.vue.d.ts +1 -1
  36. package/dist/runtime/components/ColorPicker.vue +1 -2
  37. package/dist/runtime/components/ColorPicker.vue.d.ts +1 -1
  38. package/dist/runtime/components/CommandPalette.vue +4 -0
  39. package/dist/runtime/components/CommandPalette.vue.d.ts +6 -1
  40. package/dist/runtime/components/Container.vue.d.ts +1 -1
  41. package/dist/runtime/components/ContextMenu.vue.d.ts +1 -1
  42. package/dist/runtime/components/ContextMenuContent.vue +5 -3
  43. package/dist/runtime/components/ContextMenuContent.vue.d.ts +1 -1
  44. package/dist/runtime/components/Drawer.vue +4 -4
  45. package/dist/runtime/components/Drawer.vue.d.ts +6 -1
  46. package/dist/runtime/components/DropdownMenu.vue.d.ts +1 -1
  47. package/dist/runtime/components/DropdownMenuContent.vue +5 -3
  48. package/dist/runtime/components/DropdownMenuContent.vue.d.ts +8 -5
  49. package/dist/runtime/components/FileUpload.vue +248 -0
  50. package/dist/runtime/components/FileUpload.vue.d.ts +167 -0
  51. package/dist/runtime/components/Form.vue +3 -3
  52. package/dist/runtime/components/Form.vue.d.ts +6 -5
  53. package/dist/runtime/components/FormField.vue +2 -2
  54. package/dist/runtime/components/FormField.vue.d.ts +4 -4
  55. package/dist/runtime/components/Icon.vue.d.ts +1 -1
  56. package/dist/runtime/components/Input.vue +10 -7
  57. package/dist/runtime/components/Input.vue.d.ts +9 -9
  58. package/dist/runtime/components/InputMenu.vue +25 -13
  59. package/dist/runtime/components/InputMenu.vue.d.ts +16 -221
  60. package/dist/runtime/components/InputNumber.vue +3 -2
  61. package/dist/runtime/components/InputNumber.vue.d.ts +7 -81
  62. package/dist/runtime/components/InputTags.vue +2 -0
  63. package/dist/runtime/components/InputTags.vue.d.ts +7 -5
  64. package/dist/runtime/components/Kbd.vue +2 -1
  65. package/dist/runtime/components/Kbd.vue.d.ts +5 -1
  66. package/dist/runtime/components/Link.vue +6 -5
  67. package/dist/runtime/components/Link.vue.d.ts +1 -3
  68. package/dist/runtime/components/LinkBase.vue.d.ts +1 -1
  69. package/dist/runtime/components/Modal.vue.d.ts +2 -2
  70. package/dist/runtime/components/NavigationMenu.vue +3 -2
  71. package/dist/runtime/components/NavigationMenu.vue.d.ts +1 -1
  72. package/dist/runtime/components/OverlayProvider.vue.d.ts +1 -1
  73. package/dist/runtime/components/Pagination.vue.d.ts +1 -1
  74. package/dist/runtime/components/PinInput.vue +3 -1
  75. package/dist/runtime/components/PinInput.vue.d.ts +5 -5
  76. package/dist/runtime/components/Popover.vue +2 -1
  77. package/dist/runtime/components/Popover.vue.d.ts +8 -2
  78. package/dist/runtime/components/Progress.vue.d.ts +1 -1
  79. package/dist/runtime/components/RadioGroup.vue +1 -1
  80. package/dist/runtime/components/RadioGroup.vue.d.ts +5 -4
  81. package/dist/runtime/components/Select.vue +16 -6
  82. package/dist/runtime/components/Select.vue.d.ts +3 -3
  83. package/dist/runtime/components/SelectMenu.vue +18 -10
  84. package/dist/runtime/components/SelectMenu.vue.d.ts +3 -3
  85. package/dist/runtime/components/Separator.vue.d.ts +1 -1
  86. package/dist/runtime/components/Skeleton.vue.d.ts +1 -1
  87. package/dist/runtime/components/Slideover.vue.d.ts +2 -2
  88. package/dist/runtime/components/Slider.vue.d.ts +5 -5
  89. package/dist/runtime/components/Stepper.vue.d.ts +1 -1
  90. package/dist/runtime/components/Switch.vue.d.ts +1 -1
  91. package/dist/runtime/components/Table.vue +83 -8
  92. package/dist/runtime/components/Table.vue.d.ts +20 -4
  93. package/dist/runtime/components/Tabs.vue +12 -2
  94. package/dist/runtime/components/Tabs.vue.d.ts +8 -3
  95. package/dist/runtime/components/Textarea.vue +10 -7
  96. package/dist/runtime/components/Textarea.vue.d.ts +10 -9
  97. package/dist/runtime/components/Timeline.vue.d.ts +1 -1
  98. package/dist/runtime/components/Toast.vue +12 -4
  99. package/dist/runtime/components/Toast.vue.d.ts +14 -13
  100. package/dist/runtime/components/Toaster.vue.d.ts +1 -1
  101. package/dist/runtime/components/Tooltip.vue +4 -3
  102. package/dist/runtime/components/Tooltip.vue.d.ts +8 -2
  103. package/dist/runtime/components/Tree.vue +31 -28
  104. package/dist/runtime/components/Tree.vue.d.ts +2 -1
  105. package/dist/runtime/composables/defineShortcuts.js +5 -3
  106. package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
  107. package/dist/runtime/composables/useComponentIcons.d.ts +1 -1
  108. package/dist/runtime/composables/useFileUpload.d.ts +19 -0
  109. package/dist/runtime/composables/useFileUpload.js +69 -0
  110. package/dist/runtime/composables/useFormField.d.ts +3 -6
  111. package/dist/runtime/composables/useFormField.js +5 -2
  112. package/dist/runtime/composables/useKbd.d.ts +1 -1
  113. package/dist/runtime/composables/useLocale.js +2 -2
  114. package/dist/runtime/composables/useOverlay.d.ts +29 -2
  115. package/dist/runtime/composables/useOverlay.js +8 -7
  116. package/dist/runtime/composables/usePortal.d.ts +1 -1
  117. package/dist/runtime/inertia/components/Link.vue.d.ts +1 -1
  118. package/dist/runtime/inertia/components/LinkBase.vue.d.ts +1 -1
  119. package/dist/runtime/inertia/stubs.d.ts +1 -0
  120. package/dist/runtime/inertia/stubs.js +4 -2
  121. package/dist/runtime/locale/ar.js +5 -1
  122. package/dist/runtime/locale/az.js +4 -0
  123. package/dist/runtime/locale/bg.js +4 -0
  124. package/dist/runtime/locale/bn.js +4 -0
  125. package/dist/runtime/locale/ca.js +4 -0
  126. package/dist/runtime/locale/ckb.js +5 -1
  127. package/dist/runtime/locale/cs.js +4 -0
  128. package/dist/runtime/locale/da.js +4 -0
  129. package/dist/runtime/locale/de.js +4 -0
  130. package/dist/runtime/locale/el.js +4 -0
  131. package/dist/runtime/locale/en.js +4 -0
  132. package/dist/runtime/locale/es.js +4 -0
  133. package/dist/runtime/locale/et.js +4 -0
  134. package/dist/runtime/locale/fa_ir.js +4 -0
  135. package/dist/runtime/locale/fi.js +4 -0
  136. package/dist/runtime/locale/fr.js +4 -0
  137. package/dist/runtime/locale/he.js +4 -0
  138. package/dist/runtime/locale/hi.js +5 -1
  139. package/dist/runtime/locale/hu.js +4 -0
  140. package/dist/runtime/locale/hy.js +4 -0
  141. package/dist/runtime/locale/id.js +4 -0
  142. package/dist/runtime/locale/it.js +4 -0
  143. package/dist/runtime/locale/ja.js +4 -0
  144. package/dist/runtime/locale/kk.js +4 -0
  145. package/dist/runtime/locale/km.js +5 -1
  146. package/dist/runtime/locale/ko.js +4 -0
  147. package/dist/runtime/locale/ky.js +4 -0
  148. package/dist/runtime/locale/lb.js +4 -0
  149. package/dist/runtime/locale/lt.js +4 -0
  150. package/dist/runtime/locale/mn.js +4 -0
  151. package/dist/runtime/locale/ms.js +4 -0
  152. package/dist/runtime/locale/nb_no.js +4 -0
  153. package/dist/runtime/locale/nl.js +4 -0
  154. package/dist/runtime/locale/pl.js +4 -0
  155. package/dist/runtime/locale/pt.js +4 -0
  156. package/dist/runtime/locale/pt_br.js +4 -0
  157. package/dist/runtime/locale/ro.js +4 -0
  158. package/dist/runtime/locale/ru.js +4 -0
  159. package/dist/runtime/locale/sk.js +4 -0
  160. package/dist/runtime/locale/sl.js +4 -0
  161. package/dist/runtime/locale/sv.js +4 -0
  162. package/dist/runtime/locale/th.js +4 -0
  163. package/dist/runtime/locale/tj.js +4 -0
  164. package/dist/runtime/locale/tr.js +4 -0
  165. package/dist/runtime/locale/ug_cn.js +4 -0
  166. package/dist/runtime/locale/uk.js +4 -0
  167. package/dist/runtime/locale/ur.js +4 -0
  168. package/dist/runtime/locale/uz.js +4 -0
  169. package/dist/runtime/locale/vi.js +4 -0
  170. package/dist/runtime/locale/zh_cn.js +4 -0
  171. package/dist/runtime/locale/zh_tw.js +4 -0
  172. package/dist/runtime/types/index.d.ts +1 -0
  173. package/dist/runtime/types/index.js +1 -0
  174. package/dist/runtime/types/locale.d.ts +4 -0
  175. package/dist/runtime/utils/index.d.ts +6 -0
  176. package/dist/runtime/utils/index.js +27 -0
  177. package/dist/runtime/vue/components/Icon.vue.d.ts +1 -1
  178. package/dist/runtime/vue/components/Link.vue.d.ts +1 -1
  179. package/dist/runtime/vue/stubs.d.ts +1 -0
  180. package/dist/runtime/vue/stubs.js +3 -1
  181. package/dist/shared/{ui.BPVxSPGY.mjs → ui.BTUFJHYJ.mjs} +299 -36
  182. package/dist/unplugin.d.mts +2 -0
  183. package/dist/unplugin.mjs +6 -3
  184. package/dist/vite.mjs +1 -1
  185. package/package.json +31 -27
package/.nuxt/ui/kbd.ts CHANGED
@@ -1,6 +1,17 @@
1
+ const color = [
2
+ "primary",
3
+ "secondary",
4
+ "success",
5
+ "info",
6
+ "warning",
7
+ "error",
8
+ "neutral"
9
+ ] as const
10
+
1
11
  const variant = [
2
12
  "solid",
3
13
  "outline",
14
+ "soft",
4
15
  "subtle"
5
16
  ] as const
6
17
 
@@ -13,10 +24,20 @@ const size = [
13
24
  export default {
14
25
  "base": "inline-flex items-center justify-center px-1 rounded-sm font-medium font-sans",
15
26
  "variants": {
27
+ "color": {
28
+ "primary": "",
29
+ "secondary": "",
30
+ "success": "",
31
+ "info": "",
32
+ "warning": "",
33
+ "error": "",
34
+ "neutral": ""
35
+ },
16
36
  "variant": {
17
- "solid": "bg-inverted text-inverted",
18
- "outline": "bg-default text-highlighted ring ring-inset ring-accented",
19
- "subtle": "bg-elevated text-default ring ring-inset ring-accented"
37
+ "solid": "",
38
+ "outline": "",
39
+ "soft": "",
40
+ "subtle": ""
20
41
  },
21
42
  "size": {
22
43
  "sm": "h-4 min-w-[16px] text-[10px]",
@@ -24,8 +45,151 @@ export default {
24
45
  "lg": "h-6 min-w-[24px] text-[12px]"
25
46
  }
26
47
  },
48
+ "compoundVariants": [
49
+ {
50
+ "color": "primary" as typeof color[number],
51
+ "variant": "solid" as typeof variant[number],
52
+ "class": "text-inverted bg-primary"
53
+ },
54
+ {
55
+ "color": "secondary" as typeof color[number],
56
+ "variant": "solid" as typeof variant[number],
57
+ "class": "text-inverted bg-secondary"
58
+ },
59
+ {
60
+ "color": "success" as typeof color[number],
61
+ "variant": "solid" as typeof variant[number],
62
+ "class": "text-inverted bg-success"
63
+ },
64
+ {
65
+ "color": "info" as typeof color[number],
66
+ "variant": "solid" as typeof variant[number],
67
+ "class": "text-inverted bg-info"
68
+ },
69
+ {
70
+ "color": "warning" as typeof color[number],
71
+ "variant": "solid" as typeof variant[number],
72
+ "class": "text-inverted bg-warning"
73
+ },
74
+ {
75
+ "color": "error" as typeof color[number],
76
+ "variant": "solid" as typeof variant[number],
77
+ "class": "text-inverted bg-error"
78
+ },
79
+ {
80
+ "color": "primary" as typeof color[number],
81
+ "variant": "outline" as typeof variant[number],
82
+ "class": "ring ring-inset ring-primary/50 text-primary"
83
+ },
84
+ {
85
+ "color": "secondary" as typeof color[number],
86
+ "variant": "outline" as typeof variant[number],
87
+ "class": "ring ring-inset ring-secondary/50 text-secondary"
88
+ },
89
+ {
90
+ "color": "success" as typeof color[number],
91
+ "variant": "outline" as typeof variant[number],
92
+ "class": "ring ring-inset ring-success/50 text-success"
93
+ },
94
+ {
95
+ "color": "info" as typeof color[number],
96
+ "variant": "outline" as typeof variant[number],
97
+ "class": "ring ring-inset ring-info/50 text-info"
98
+ },
99
+ {
100
+ "color": "warning" as typeof color[number],
101
+ "variant": "outline" as typeof variant[number],
102
+ "class": "ring ring-inset ring-warning/50 text-warning"
103
+ },
104
+ {
105
+ "color": "error" as typeof color[number],
106
+ "variant": "outline" as typeof variant[number],
107
+ "class": "ring ring-inset ring-error/50 text-error"
108
+ },
109
+ {
110
+ "color": "primary" as typeof color[number],
111
+ "variant": "soft" as typeof variant[number],
112
+ "class": "text-primary bg-primary/10"
113
+ },
114
+ {
115
+ "color": "secondary" as typeof color[number],
116
+ "variant": "soft" as typeof variant[number],
117
+ "class": "text-secondary bg-secondary/10"
118
+ },
119
+ {
120
+ "color": "success" as typeof color[number],
121
+ "variant": "soft" as typeof variant[number],
122
+ "class": "text-success bg-success/10"
123
+ },
124
+ {
125
+ "color": "info" as typeof color[number],
126
+ "variant": "soft" as typeof variant[number],
127
+ "class": "text-info bg-info/10"
128
+ },
129
+ {
130
+ "color": "warning" as typeof color[number],
131
+ "variant": "soft" as typeof variant[number],
132
+ "class": "text-warning bg-warning/10"
133
+ },
134
+ {
135
+ "color": "error" as typeof color[number],
136
+ "variant": "soft" as typeof variant[number],
137
+ "class": "text-error bg-error/10"
138
+ },
139
+ {
140
+ "color": "primary" as typeof color[number],
141
+ "variant": "subtle" as typeof variant[number],
142
+ "class": "text-primary ring ring-inset ring-primary/25 bg-primary/10"
143
+ },
144
+ {
145
+ "color": "secondary" as typeof color[number],
146
+ "variant": "subtle" as typeof variant[number],
147
+ "class": "text-secondary ring ring-inset ring-secondary/25 bg-secondary/10"
148
+ },
149
+ {
150
+ "color": "success" as typeof color[number],
151
+ "variant": "subtle" as typeof variant[number],
152
+ "class": "text-success ring ring-inset ring-success/25 bg-success/10"
153
+ },
154
+ {
155
+ "color": "info" as typeof color[number],
156
+ "variant": "subtle" as typeof variant[number],
157
+ "class": "text-info ring ring-inset ring-info/25 bg-info/10"
158
+ },
159
+ {
160
+ "color": "warning" as typeof color[number],
161
+ "variant": "subtle" as typeof variant[number],
162
+ "class": "text-warning ring ring-inset ring-warning/25 bg-warning/10"
163
+ },
164
+ {
165
+ "color": "error" as typeof color[number],
166
+ "variant": "subtle" as typeof variant[number],
167
+ "class": "text-error ring ring-inset ring-error/25 bg-error/10"
168
+ },
169
+ {
170
+ "color": "neutral" as typeof color[number],
171
+ "variant": "solid" as typeof variant[number],
172
+ "class": "text-inverted bg-inverted"
173
+ },
174
+ {
175
+ "color": "neutral" as typeof color[number],
176
+ "variant": "outline" as typeof variant[number],
177
+ "class": "ring ring-inset ring-accented text-default bg-default"
178
+ },
179
+ {
180
+ "color": "neutral" as typeof color[number],
181
+ "variant": "soft" as typeof variant[number],
182
+ "class": "text-default bg-elevated"
183
+ },
184
+ {
185
+ "color": "neutral" as typeof color[number],
186
+ "variant": "subtle" as typeof variant[number],
187
+ "class": "ring ring-inset ring-accented text-default bg-elevated"
188
+ }
189
+ ],
27
190
  "defaultVariants": {
28
191
  "variant": "outline" as typeof variant[number],
192
+ "color": "neutral" as typeof color[number],
29
193
  "size": "md" as typeof size[number]
30
194
  }
31
195
  }
@@ -187,7 +187,7 @@ export default {
187
187
  "outline" as typeof variant[number],
188
188
  "subtle" as typeof variant[number]
189
189
  ],
190
- "class": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary"
190
+ "class": "focus:ring-2 focus:ring-inset focus:ring-primary"
191
191
  },
192
192
  {
193
193
  "color": "secondary" as typeof color[number],
@@ -195,7 +195,7 @@ export default {
195
195
  "outline" as typeof variant[number],
196
196
  "subtle" as typeof variant[number]
197
197
  ],
198
- "class": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary"
198
+ "class": "focus:ring-2 focus:ring-inset focus:ring-secondary"
199
199
  },
200
200
  {
201
201
  "color": "success" as typeof color[number],
@@ -203,7 +203,7 @@ export default {
203
203
  "outline" as typeof variant[number],
204
204
  "subtle" as typeof variant[number]
205
205
  ],
206
- "class": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-success"
206
+ "class": "focus:ring-2 focus:ring-inset focus:ring-success"
207
207
  },
208
208
  {
209
209
  "color": "info" as typeof color[number],
@@ -211,7 +211,7 @@ export default {
211
211
  "outline" as typeof variant[number],
212
212
  "subtle" as typeof variant[number]
213
213
  ],
214
- "class": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-info"
214
+ "class": "focus:ring-2 focus:ring-inset focus:ring-info"
215
215
  },
216
216
  {
217
217
  "color": "warning" as typeof color[number],
@@ -219,7 +219,7 @@ export default {
219
219
  "outline" as typeof variant[number],
220
220
  "subtle" as typeof variant[number]
221
221
  ],
222
- "class": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-warning"
222
+ "class": "focus:ring-2 focus:ring-inset focus:ring-warning"
223
223
  },
224
224
  {
225
225
  "color": "error" as typeof color[number],
@@ -227,7 +227,7 @@ export default {
227
227
  "outline" as typeof variant[number],
228
228
  "subtle" as typeof variant[number]
229
229
  ],
230
- "class": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-error"
230
+ "class": "focus:ring-2 focus:ring-inset focus:ring-error"
231
231
  },
232
232
  {
233
233
  "color": "primary" as typeof color[number],
@@ -265,7 +265,7 @@ export default {
265
265
  "outline" as typeof variant[number],
266
266
  "subtle" as typeof variant[number]
267
267
  ],
268
- "class": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-inverted"
268
+ "class": "focus:ring-2 focus:ring-inset focus:ring-inverted"
269
269
  },
270
270
  {
271
271
  "color": "neutral" as typeof color[number],
package/.nuxt/ui/table.ts CHANGED
@@ -22,6 +22,7 @@ export default {
22
22
  "caption": "sr-only",
23
23
  "thead": "relative",
24
24
  "tbody": "divide-y divide-default [&>tr]:data-[selectable=true]:hover:bg-elevated/50 [&>tr]:data-[selectable=true]:focus-visible:outline-primary",
25
+ "tfoot": "relative",
25
26
  "tr": "data-[selected=true]:bg-elevated/50",
26
27
  "th": "px-4 py-3.5 text-sm text-highlighted text-left rtl:text-right font-semibold [&:has([role=checkbox])]:pe-0",
27
28
  "td": "p-4 text-sm text-muted whitespace-nowrap [&:has([role=checkbox])]:pe-0",
@@ -38,7 +39,14 @@ export default {
38
39
  },
39
40
  "sticky": {
40
41
  "true": {
42
+ "thead": "sticky top-0 inset-x-0 bg-default/75 z-[1] backdrop-blur",
43
+ "tfoot": "sticky bottom-0 inset-x-0 bg-default/75 z-[1] backdrop-blur"
44
+ },
45
+ "header": {
41
46
  "thead": "sticky top-0 inset-x-0 bg-default/75 z-[1] backdrop-blur"
47
+ },
48
+ "footer": {
49
+ "tfoot": "sticky bottom-0 inset-x-0 bg-default/75 z-[1] backdrop-blur"
42
50
  }
43
51
  },
44
52
  "loading": {
package/.nuxt/ui/tabs.ts CHANGED
@@ -35,11 +35,13 @@ export default {
35
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
- "content": "focus:outline-none w-full",
39
38
  "leadingIcon": "shrink-0",
40
39
  "leadingAvatar": "shrink-0",
41
40
  "leadingAvatarSize": "",
42
- "label": "truncate"
41
+ "label": "truncate",
42
+ "trailingBadge": "shrink-0",
43
+ "trailingBadgeSize": "sm",
44
+ "content": "focus:outline-none w-full"
43
45
  },
44
46
  "variants": {
45
47
  "color": {
@@ -28,7 +28,7 @@ export default {
28
28
  "slots": {
29
29
  "root": "relative inline-flex items-center",
30
30
  "base": [
31
- "w-full rounded-md border-0 placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75",
31
+ "w-full rounded-md border-0 appearance-none placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75",
32
32
  "transition-colors"
33
33
  ],
34
34
  "leading": "absolute start-0 flex items-start",
package/.nuxt/ui/toast.ts CHANGED
@@ -18,45 +18,38 @@ export default {
18
18
  "avatar": "shrink-0",
19
19
  "avatarSize": "2xl",
20
20
  "actions": "flex gap-1.5 shrink-0",
21
- "progress": "absolute inset-x-0 bottom-0 h-1 z-[-1]",
21
+ "progress": "absolute inset-x-0 bottom-0",
22
22
  "close": "p-0"
23
23
  },
24
24
  "variants": {
25
25
  "color": {
26
26
  "primary": {
27
27
  "root": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary",
28
- "icon": "text-primary",
29
- "progress": "bg-primary"
28
+ "icon": "text-primary"
30
29
  },
31
30
  "secondary": {
32
31
  "root": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary",
33
- "icon": "text-secondary",
34
- "progress": "bg-secondary"
32
+ "icon": "text-secondary"
35
33
  },
36
34
  "success": {
37
35
  "root": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-success",
38
- "icon": "text-success",
39
- "progress": "bg-success"
36
+ "icon": "text-success"
40
37
  },
41
38
  "info": {
42
39
  "root": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-info",
43
- "icon": "text-info",
44
- "progress": "bg-info"
40
+ "icon": "text-info"
45
41
  },
46
42
  "warning": {
47
43
  "root": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-warning",
48
- "icon": "text-warning",
49
- "progress": "bg-warning"
44
+ "icon": "text-warning"
50
45
  },
51
46
  "error": {
52
47
  "root": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-error",
53
- "icon": "text-error",
54
- "progress": "bg-error"
48
+ "icon": "text-error"
55
49
  },
56
50
  "neutral": {
57
51
  "root": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-inverted",
58
- "icon": "text-highlighted",
59
- "progress": "bg-inverted"
52
+ "icon": "text-highlighted"
60
53
  }
61
54
  },
62
55
  "orientation": {
@@ -3,7 +3,7 @@ export default {
3
3
  "content": "flex items-center gap-1 bg-default text-highlighted shadow-sm rounded-sm ring ring-default h-6 px-2.5 py-1 text-xs select-none data-[state=delayed-open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-tooltip-content-transform-origin) pointer-events-auto",
4
4
  "arrow": "fill-default",
5
5
  "text": "truncate",
6
- "kbds": "hidden lg:inline-flex items-center shrink-0 gap-0.5 before:content-['·'] before:me-0.5",
6
+ "kbds": "hidden lg:inline-flex items-center shrink-0 gap-0.5 not-first-of-type:before:content-['·'] not-first-of-type:before:me-0.5",
7
7
  "kbdsSize": "sm"
8
8
  }
9
9
  }
package/cli/templates.mjs CHANGED
@@ -35,7 +35,7 @@ ${pro ? `import type { ComponentConfig } from '@nuxt/ui'` : ''}
35
35
  import theme from '#build/${path}/${prose ? 'prose/' : ''}${content ? 'content/' : ''}${kebabName}'
36
36
  ${!pro ? `import type { ComponentConfig } from '../types/utils'` : ''}
37
37
 
38
- type ${upperName} = ComponentConfig<typeof theme, AppConfig, ${upperName}${pro ? `, '${key}'` : ''}>
38
+ type ${upperName} = ComponentConfig<typeof theme, AppConfig, '${camelName}'${pro ? `, '${key}'` : ''}>
39
39
 
40
40
  export interface ${upperName}Props {
41
41
  /**
@@ -80,7 +80,7 @@ ${pro ? `import type { ComponentConfig } from '@nuxt/ui'` : ''}
80
80
  import theme from '#build/${path}/${prose ? 'prose/' : ''}${content ? 'content/' : ''}${kebabName}'
81
81
  ${!pro ? `import type { ComponentConfig } from '../types/utils'` : ''}
82
82
 
83
- type ${upperName} = ComponentConfig<typeof theme, AppConfig, ${upperName}${pro ? `, '${key}'` : ''}>
83
+ type ${upperName} = ComponentConfig<typeof theme, AppConfig, '${camelName}'${pro ? `, '${key}'` : ''}>
84
84
 
85
85
  export interface ${upperName}Props extends Pick<${upperName}RootProps> {
86
86
  class?: any
@@ -147,7 +147,8 @@ const test = ({ name, prose, content }) => {
147
147
  ? undefined
148
148
  : `
149
149
  import { describe, it, expect } from 'vitest'
150
- import ${upperName}, { type ${upperName}Props, type ${upperName}Slots } from '../../${content ? '../' : ''}src/runtime/components/${content ? 'content/' : ''}${upperName}.vue'
150
+ import ${upperName} from '../../${content ? '../' : ''}src/runtime/components/${content ? 'content/' : ''}${upperName}.vue'
151
+ import type { ${upperName}Props, ${upperName}Slots } from '../../${content ? '../' : ''}src/runtime/components/${content ? 'content/' : ''}${upperName}.vue'
151
152
  import ComponentRender from '../${content ? '../' : ''}component-render'
152
153
 
153
154
  describe('${upperName}', () => {
@@ -212,6 +213,10 @@ navigation.badge: Soon
212
213
  ## Theme
213
214
 
214
215
  :component-theme${pro ? '{pro}' : ''}
216
+
217
+ ## Changelog
218
+
219
+ :component-changelog
215
220
  `
216
221
  }
217
222
  }
package/dist/module.d.mts CHANGED
@@ -1,6 +1,8 @@
1
1
  import * as _nuxt_schema from '@nuxt/schema';
2
2
  export * from '../dist/runtime/types/index.js';
3
3
 
4
+ type Color = 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'error' | (string & {});
5
+ type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | (string & {});
4
6
  interface ModuleOptions {
5
7
  /**
6
8
  * Prefix for components
@@ -30,13 +32,25 @@ interface ModuleOptions {
30
32
  * @defaultValue `['primary', 'secondary', 'success', 'info', 'warning', 'error']`
31
33
  * @link https://ui.nuxt.com/getting-started/installation/nuxt#themecolors
32
34
  */
33
- colors?: string[];
35
+ colors?: Color[];
34
36
  /**
35
37
  * Enable or disable transitions on components
36
38
  * @defaultValue `true`
37
39
  * @link https://ui.nuxt.com/getting-started/installation/nuxt#themetransitions
38
40
  */
39
41
  transitions?: boolean;
42
+ defaultVariants?: {
43
+ /**
44
+ * The default color variant to use for components
45
+ * @defaultValue `'primary'`
46
+ */
47
+ color?: Color;
48
+ /**
49
+ * The default size variant to use for components
50
+ * @defaultValue `'md'`
51
+ */
52
+ size?: Size;
53
+ };
40
54
  };
41
55
  }
42
56
  declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/ui",
3
- "version": "3.2.0",
3
+ "version": "3.3.1",
4
4
  "docs": "https://ui.nuxt.com/getting-started/installation/nuxt",
5
5
  "configKey": "ui",
6
6
  "compatibility": {
@@ -8,6 +8,6 @@
8
8
  },
9
9
  "builder": {
10
10
  "@nuxt/module-builder": "1.0.1",
11
- "unbuild": "3.5.0"
11
+ "unbuild": "3.6.0"
12
12
  }
13
13
  }
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.BPVxSPGY.mjs';
3
+ import { d as defaultOptions, r as resolveColors, a as getDefaultUiConfig, b as addTemplates } from './shared/ui.BTUFJHYJ.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.2.0";
11
+ const version = "3.3.1";
12
12
 
13
13
  const module = defineNuxtModule({
14
14
  meta: {
@@ -38,7 +38,7 @@ const module = defineNuxtModule({
38
38
  }
39
39
  async function registerModule(name2, key, options2) {
40
40
  if (!hasNuxtModule(name2)) {
41
- await installModule(name2, options2);
41
+ await installModule(name2, defu(nuxt.options[key], options2));
42
42
  } else {
43
43
  nuxt.options[key] = defu(nuxt.options[key], options2);
44
44
  }
@@ -73,5 +73,5 @@ declare const _default: <T extends AccordionItem>(__VLS_props: NonNullable<Await
73
73
  };
74
74
  export default _default;
75
75
  type __VLS_PrettifyLocal<T> = {
76
- [K in keyof T]: T[K];
76
+ [K in keyof T as K]: T[K];
77
77
  } & {};
@@ -53,7 +53,7 @@ export interface AlertProps {
53
53
  ui?: Alert['slots'];
54
54
  }
55
55
  export interface AlertEmits {
56
- (e: 'update:open', value: boolean): void;
56
+ 'update:open': [value: boolean];
57
57
  }
58
58
  export interface AlertSlots {
59
59
  leading(props?: {}): any;
@@ -66,7 +66,7 @@ export interface AlertSlots {
66
66
  };
67
67
  }): any;
68
68
  }
69
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AlertProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
69
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AlertProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
70
70
  "update:open": (value: boolean) => any;
71
71
  }, string, import("vue").PublicProps, Readonly<AlertProps> & Readonly<{
72
72
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
@@ -20,5 +20,5 @@ declare const _default: <T extends Messages>(__VLS_props: NonNullable<Awaited<ty
20
20
  };
21
21
  export default _default;
22
22
  type __VLS_PrettifyLocal<T> = {
23
- [K in keyof T]: T[K];
23
+ [K in keyof T as K]: T[K];
24
24
  } & {};
@@ -28,7 +28,7 @@ export interface AvatarProps {
28
28
  export interface AvatarSlots {
29
29
  default(props?: {}): any;
30
30
  }
31
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AvatarProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AvatarProps> & Readonly<{}>, {
31
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AvatarProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AvatarProps> & Readonly<{}>, {
32
32
  as: any;
33
33
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
34
34
  default?: (props: {}) => any;
@@ -22,7 +22,7 @@ export interface AvatarGroupProps {
22
22
  export interface AvatarGroupSlots {
23
23
  default(props?: {}): any;
24
24
  }
25
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AvatarGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AvatarGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, AvatarGroupSlots>;
25
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AvatarGroupProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AvatarGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, AvatarGroupSlots>;
26
26
  export default _default;
27
27
  type __VLS_WithSlots<T, S> = T & {
28
28
  new (): {
@@ -32,7 +32,7 @@ export interface BadgeSlots {
32
32
  default(props?: {}): any;
33
33
  trailing(props?: {}): any;
34
34
  }
35
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<BadgeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BadgeProps> & Readonly<{}>, {
35
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<BadgeProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BadgeProps> & Readonly<{}>, {
36
36
  as: any;
37
37
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, BadgeSlots>;
38
38
  export default _default;
@@ -62,5 +62,5 @@ declare const _default: <T extends BreadcrumbItem>(__VLS_props: NonNullable<Awai
62
62
  };
63
63
  export default _default;
64
64
  type __VLS_PrettifyLocal<T> = {
65
- [K in keyof T]: T[K];
65
+ [K in keyof T as K]: T[K];
66
66
  } & {};
@@ -10,7 +10,7 @@ import { useAppConfig } from "#imports";
10
10
  import { useComponentIcons } from "../composables/useComponentIcons";
11
11
  import { useButtonGroup } from "../composables/useButtonGroup";
12
12
  import { formLoadingInjectionKey } from "../composables/useFormField";
13
- import { omit } from "../utils";
13
+ import { omit, mergeClasses } from "../utils";
14
14
  import { tv } from "../utils/tv";
15
15
  import { pickLinkProps } from "../utils/link";
16
16
  import UIcon from "./Icon.vue";
@@ -41,11 +41,11 @@ const props = defineProps({
41
41
  as: { type: null, required: false },
42
42
  type: { type: null, required: false },
43
43
  disabled: { type: Boolean, required: false },
44
- active: { type: Boolean, required: false, default: void 0 },
44
+ active: { type: Boolean, required: false },
45
45
  exact: { type: Boolean, required: false },
46
46
  exactQuery: { type: [Boolean, String], required: false },
47
47
  exactHash: { type: Boolean, required: false },
48
- inactiveClass: { type: String, required: false, default: "" },
48
+ inactiveClass: { type: String, required: false },
49
49
  to: { type: null, required: false },
50
50
  href: { type: null, required: false },
51
51
  external: { type: Boolean, required: false },
@@ -56,7 +56,7 @@ const props = defineProps({
56
56
  prefetch: { type: Boolean, required: false },
57
57
  prefetchOn: { type: [String, Object], required: false },
58
58
  noPrefetch: { type: Boolean, required: false },
59
- activeClass: { type: String, required: false, default: "" },
59
+ activeClass: { type: String, required: false },
60
60
  exactActiveClass: { type: String, required: false },
61
61
  ariaCurrentValue: { type: String, required: false },
62
62
  viewTransition: { type: Boolean, required: false },
@@ -89,10 +89,10 @@ const ui = computed(() => tv({
89
89
  variants: {
90
90
  active: {
91
91
  true: {
92
- base: props.activeClass
92
+ base: mergeClasses(appConfig.ui?.button?.variants?.active?.true?.base, props.activeClass)
93
93
  },
94
94
  false: {
95
- base: props.inactiveClass
95
+ base: mergeClasses(appConfig.ui?.button?.variants?.active?.false?.base, props.inactiveClass)
96
96
  }
97
97
  }
98
98
  }
@@ -35,11 +35,7 @@ export interface ButtonSlots {
35
35
  default(props?: {}): any;
36
36
  trailing(props?: {}): any;
37
37
  }
38
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ButtonProps> & Readonly<{}>, {
39
- activeClass: string;
40
- active: boolean;
41
- inactiveClass: string;
42
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ButtonSlots>;
38
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ButtonProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ButtonSlots>;
43
39
  export default _default;
44
40
  type __VLS_WithSlots<T, S> = T & {
45
41
  new (): {
@@ -23,7 +23,7 @@ export interface ButtonGroupProps {
23
23
  export interface ButtonGroupSlots {
24
24
  default(props?: {}): any;
25
25
  }
26
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ButtonGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ButtonGroupProps> & Readonly<{}>, {
26
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ButtonGroupProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ButtonGroupProps> & Readonly<{}>, {
27
27
  orientation: ButtonGroup["variants"]["orientation"];
28
28
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ButtonGroupSlots>;
29
29
  export default _default;
@@ -107,5 +107,5 @@ declare const _default: <R extends boolean, M extends boolean>(__VLS_props: NonN
107
107
  };
108
108
  export default _default;
109
109
  type __VLS_PrettifyLocal<T> = {
110
- [K in keyof T]: T[K];
110
+ [K in keyof T as K]: T[K];
111
111
  } & {};
@@ -20,7 +20,7 @@ export interface CardSlots {
20
20
  default(props?: {}): any;
21
21
  footer(props?: {}): any;
22
22
  }
23
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<CardProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CardProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, CardSlots>;
23
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<CardProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CardProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, CardSlots>;
24
24
  export default _default;
25
25
  type __VLS_WithSlots<T, S> = T & {
26
26
  new (): {