@nuxt/ui 3.1.3 → 3.3.0

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 (208) hide show
  1. package/.nuxt/ui/avatar.ts +1 -1
  2. package/.nuxt/ui/button.ts +42 -42
  3. package/.nuxt/ui/card.ts +1 -1
  4. package/.nuxt/ui/carousel.ts +1 -1
  5. package/.nuxt/ui/command-palette.ts +3 -1
  6. package/.nuxt/ui/drawer.ts +1 -1
  7. package/.nuxt/ui/file-upload.ts +290 -0
  8. package/.nuxt/ui/index.ts +3 -0
  9. package/.nuxt/ui/input-menu.ts +24 -10
  10. package/.nuxt/ui/input-tags.ts +310 -0
  11. package/.nuxt/ui/kbd.ts +167 -3
  12. package/.nuxt/ui/modal.ts +1 -1
  13. package/.nuxt/ui/navigation-menu.ts +1 -1
  14. package/.nuxt/ui/select-menu.ts +11 -6
  15. package/.nuxt/ui/select.ts +11 -6
  16. package/.nuxt/ui/table.ts +11 -2
  17. package/.nuxt/ui/tabs.ts +4 -2
  18. package/.nuxt/ui/timeline.ts +321 -0
  19. package/.nuxt/ui/toast.ts +8 -15
  20. package/.nuxt/ui/toaster.ts +1 -1
  21. package/.nuxt/ui/tooltip.ts +1 -1
  22. package/cli/templates.mjs +11 -7
  23. package/dist/module.d.mts +15 -1
  24. package/dist/module.json +1 -1
  25. package/dist/module.mjs +3 -3
  26. package/dist/runtime/components/Accordion.vue.d.ts +1 -1
  27. package/dist/runtime/components/Alert.vue +0 -1
  28. package/dist/runtime/components/Alert.vue.d.ts +2 -2
  29. package/dist/runtime/components/App.vue.d.ts +1 -1
  30. package/dist/runtime/components/Avatar.vue +10 -2
  31. package/dist/runtime/components/Avatar.vue.d.ts +3 -1
  32. package/dist/runtime/components/AvatarGroup.vue.d.ts +1 -1
  33. package/dist/runtime/components/Badge.vue.d.ts +1 -1
  34. package/dist/runtime/components/Breadcrumb.vue.d.ts +1 -1
  35. package/dist/runtime/components/Button.vue +6 -6
  36. package/dist/runtime/components/Button.vue.d.ts +1 -5
  37. package/dist/runtime/components/ButtonGroup.vue.d.ts +1 -1
  38. package/dist/runtime/components/Calendar.vue +4 -1
  39. package/dist/runtime/components/Calendar.vue.d.ts +1 -1
  40. package/dist/runtime/components/Card.vue.d.ts +1 -1
  41. package/dist/runtime/components/Carousel.vue +19 -16
  42. package/dist/runtime/components/Carousel.vue.d.ts +1 -1
  43. package/dist/runtime/components/Checkbox.vue +1 -1
  44. package/dist/runtime/components/Checkbox.vue.d.ts +1 -1
  45. package/dist/runtime/components/CheckboxGroup.vue.d.ts +1 -1
  46. package/dist/runtime/components/Chip.vue.d.ts +2 -2
  47. package/dist/runtime/components/Collapsible.vue.d.ts +1 -1
  48. package/dist/runtime/components/ColorPicker.vue +1 -2
  49. package/dist/runtime/components/ColorPicker.vue.d.ts +1 -1
  50. package/dist/runtime/components/CommandPalette.vue +84 -16
  51. package/dist/runtime/components/CommandPalette.vue.d.ts +38 -9
  52. package/dist/runtime/components/Container.vue.d.ts +1 -1
  53. package/dist/runtime/components/ContextMenu.vue.d.ts +1 -1
  54. package/dist/runtime/components/ContextMenuContent.vue.d.ts +5 -21
  55. package/dist/runtime/components/Drawer.vue +4 -4
  56. package/dist/runtime/components/Drawer.vue.d.ts +6 -1
  57. package/dist/runtime/components/DropdownMenu.vue.d.ts +1 -1
  58. package/dist/runtime/components/DropdownMenuContent.vue.d.ts +12 -25
  59. package/dist/runtime/components/FileUpload.vue +242 -0
  60. package/dist/runtime/components/FileUpload.vue.d.ts +167 -0
  61. package/dist/runtime/components/Form.vue +6 -6
  62. package/dist/runtime/components/Form.vue.d.ts +15 -13
  63. package/dist/runtime/components/FormField.vue +2 -2
  64. package/dist/runtime/components/FormField.vue.d.ts +4 -4
  65. package/dist/runtime/components/Icon.vue.d.ts +1 -1
  66. package/dist/runtime/components/Input.vue +10 -7
  67. package/dist/runtime/components/Input.vue.d.ts +9 -9
  68. package/dist/runtime/components/InputMenu.vue +17 -10
  69. package/dist/runtime/components/InputMenu.vue.d.ts +19 -16
  70. package/dist/runtime/components/InputNumber.vue +3 -2
  71. package/dist/runtime/components/InputNumber.vue.d.ts +5 -5
  72. package/dist/runtime/components/InputTags.vue +161 -0
  73. package/dist/runtime/components/InputTags.vue.d.ts +185 -0
  74. package/dist/runtime/components/Kbd.vue +2 -1
  75. package/dist/runtime/components/Kbd.vue.d.ts +5 -1
  76. package/dist/runtime/components/Link.vue +6 -5
  77. package/dist/runtime/components/Link.vue.d.ts +1 -3
  78. package/dist/runtime/components/LinkBase.vue.d.ts +1 -1
  79. package/dist/runtime/components/Modal.vue +14 -13
  80. package/dist/runtime/components/Modal.vue.d.ts +16 -6
  81. package/dist/runtime/components/NavigationMenu.vue +19 -17
  82. package/dist/runtime/components/NavigationMenu.vue.d.ts +1 -1
  83. package/dist/runtime/components/OverlayProvider.vue +2 -2
  84. package/dist/runtime/components/OverlayProvider.vue.d.ts +1 -1
  85. package/dist/runtime/components/Pagination.vue +1 -1
  86. package/dist/runtime/components/Pagination.vue.d.ts +1 -2
  87. package/dist/runtime/components/PinInput.vue +4 -3
  88. package/dist/runtime/components/PinInput.vue.d.ts +22 -19
  89. package/dist/runtime/components/Popover.vue +2 -1
  90. package/dist/runtime/components/Popover.vue.d.ts +8 -2
  91. package/dist/runtime/components/Progress.vue +2 -1
  92. package/dist/runtime/components/Progress.vue.d.ts +2 -2
  93. package/dist/runtime/components/RadioGroup.vue +3 -3
  94. package/dist/runtime/components/RadioGroup.vue.d.ts +5 -4
  95. package/dist/runtime/components/Select.vue +23 -4
  96. package/dist/runtime/components/Select.vue.d.ts +108 -2
  97. package/dist/runtime/components/SelectMenu.vue +33 -11
  98. package/dist/runtime/components/SelectMenu.vue.d.ts +106 -2
  99. package/dist/runtime/components/Separator.vue.d.ts +1 -1
  100. package/dist/runtime/components/Skeleton.vue.d.ts +1 -1
  101. package/dist/runtime/components/Slideover.vue +14 -13
  102. package/dist/runtime/components/Slideover.vue.d.ts +16 -6
  103. package/dist/runtime/components/Slider.vue.d.ts +5 -5
  104. package/dist/runtime/components/Stepper.vue.d.ts +1 -1
  105. package/dist/runtime/components/Switch.vue.d.ts +1 -1
  106. package/dist/runtime/components/Table.vue +90 -9
  107. package/dist/runtime/components/Table.vue.d.ts +30 -12
  108. package/dist/runtime/components/Tabs.vue +24 -4
  109. package/dist/runtime/components/Tabs.vue.d.ts +12 -4
  110. package/dist/runtime/components/Textarea.vue +10 -7
  111. package/dist/runtime/components/Textarea.vue.d.ts +14 -12
  112. package/dist/runtime/components/Timeline.vue +92 -0
  113. package/dist/runtime/components/Timeline.vue.d.ts +70 -0
  114. package/dist/runtime/components/Toast.vue +16 -9
  115. package/dist/runtime/components/Toast.vue.d.ts +14 -13
  116. package/dist/runtime/components/Toaster.vue.d.ts +1 -1
  117. package/dist/runtime/components/Tooltip.vue +2 -1
  118. package/dist/runtime/components/Tooltip.vue.d.ts +8 -2
  119. package/dist/runtime/components/Tree.vue +6 -4
  120. package/dist/runtime/components/Tree.vue.d.ts +2 -2
  121. package/dist/runtime/composables/defineLocale.d.ts +2 -0
  122. package/dist/runtime/composables/defineLocale.js +4 -0
  123. package/dist/runtime/composables/defineShortcuts.js +7 -5
  124. package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
  125. package/dist/runtime/composables/useComponentIcons.d.ts +1 -1
  126. package/dist/runtime/composables/useFileUpload.d.ts +19 -0
  127. package/dist/runtime/composables/useFileUpload.js +63 -0
  128. package/dist/runtime/composables/useFormField.d.ts +3 -6
  129. package/dist/runtime/composables/useFormField.js +5 -2
  130. package/dist/runtime/composables/useKbd.d.ts +1 -1
  131. package/dist/runtime/composables/useLocale.js +2 -2
  132. package/dist/runtime/composables/useOverlay.d.ts +30 -2
  133. package/dist/runtime/composables/useOverlay.js +8 -7
  134. package/dist/runtime/composables/usePortal.d.ts +1 -1
  135. package/dist/runtime/inertia/components/Link.vue.d.ts +1 -1
  136. package/dist/runtime/inertia/components/LinkBase.vue.d.ts +1 -1
  137. package/dist/runtime/inertia/stubs.d.ts +1 -0
  138. package/dist/runtime/inertia/stubs.js +4 -2
  139. package/dist/runtime/locale/ar.js +4 -2
  140. package/dist/runtime/locale/az.js +3 -1
  141. package/dist/runtime/locale/bg.js +3 -1
  142. package/dist/runtime/locale/bn.js +3 -1
  143. package/dist/runtime/locale/ca.js +3 -1
  144. package/dist/runtime/locale/ckb.js +4 -2
  145. package/dist/runtime/locale/cs.js +3 -1
  146. package/dist/runtime/locale/da.js +3 -1
  147. package/dist/runtime/locale/de.js +3 -1
  148. package/dist/runtime/locale/el.js +3 -1
  149. package/dist/runtime/locale/en.js +3 -1
  150. package/dist/runtime/locale/es.js +3 -1
  151. package/dist/runtime/locale/et.js +3 -1
  152. package/dist/runtime/locale/fa_ir.js +3 -1
  153. package/dist/runtime/locale/fi.js +3 -1
  154. package/dist/runtime/locale/fr.js +3 -1
  155. package/dist/runtime/locale/he.js +3 -1
  156. package/dist/runtime/locale/hi.js +4 -2
  157. package/dist/runtime/locale/hu.js +3 -1
  158. package/dist/runtime/locale/hy.js +3 -1
  159. package/dist/runtime/locale/id.js +3 -1
  160. package/dist/runtime/locale/index.d.ts +1 -0
  161. package/dist/runtime/locale/index.js +1 -0
  162. package/dist/runtime/locale/it.js +3 -1
  163. package/dist/runtime/locale/ja.js +3 -1
  164. package/dist/runtime/locale/kk.js +3 -1
  165. package/dist/runtime/locale/km.js +4 -2
  166. package/dist/runtime/locale/ko.js +3 -1
  167. package/dist/runtime/locale/ky.js +3 -1
  168. package/dist/runtime/locale/lb.d.ts +3 -0
  169. package/dist/runtime/locale/lb.js +56 -0
  170. package/dist/runtime/locale/lt.js +3 -1
  171. package/dist/runtime/locale/mn.js +3 -1
  172. package/dist/runtime/locale/ms.js +3 -1
  173. package/dist/runtime/locale/nb_no.js +3 -1
  174. package/dist/runtime/locale/nl.js +3 -1
  175. package/dist/runtime/locale/pl.js +3 -1
  176. package/dist/runtime/locale/pt.js +3 -1
  177. package/dist/runtime/locale/pt_br.js +3 -1
  178. package/dist/runtime/locale/ro.js +3 -1
  179. package/dist/runtime/locale/ru.js +3 -1
  180. package/dist/runtime/locale/sk.js +3 -1
  181. package/dist/runtime/locale/sl.js +3 -1
  182. package/dist/runtime/locale/sv.js +3 -1
  183. package/dist/runtime/locale/th.js +3 -1
  184. package/dist/runtime/locale/tj.js +3 -1
  185. package/dist/runtime/locale/tr.js +3 -1
  186. package/dist/runtime/locale/ug_cn.js +3 -1
  187. package/dist/runtime/locale/uk.js +3 -1
  188. package/dist/runtime/locale/ur.js +3 -1
  189. package/dist/runtime/locale/uz.js +3 -1
  190. package/dist/runtime/locale/vi.js +3 -1
  191. package/dist/runtime/locale/zh_cn.js +3 -1
  192. package/dist/runtime/locale/zh_tw.js +3 -1
  193. package/dist/runtime/types/form.d.ts +11 -10
  194. package/dist/runtime/types/index.d.ts +3 -0
  195. package/dist/runtime/types/index.js +3 -0
  196. package/dist/runtime/types/locale.d.ts +2 -0
  197. package/dist/runtime/types/utils.d.ts +3 -0
  198. package/dist/runtime/utils/index.d.ts +1 -0
  199. package/dist/runtime/utils/index.js +9 -0
  200. package/dist/runtime/vue/components/Icon.vue.d.ts +1 -1
  201. package/dist/runtime/vue/components/Link.vue.d.ts +1 -1
  202. package/dist/runtime/vue/stubs.d.ts +1 -0
  203. package/dist/runtime/vue/stubs.js +3 -1
  204. package/dist/shared/{ui.Bix4DSU4.mjs → ui.BkSj2DmF.mjs} +560 -55
  205. package/dist/unplugin.d.mts +2 -0
  206. package/dist/unplugin.mjs +6 -3
  207. package/dist/vite.mjs +1 -1
  208. package/package.json +37 -38
@@ -42,7 +42,7 @@ export default {
42
42
  "content": "max-h-60 w-(--reka-select-trigger-width) bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-select-content-transform-origin) pointer-events-auto flex flex-col",
43
43
  "viewport": "relative divide-y divide-default scroll-py-1 overflow-y-auto flex-1",
44
44
  "group": "p-1 isolate",
45
- "empty": "py-2 text-center text-sm text-muted",
45
+ "empty": "text-center text-muted",
46
46
  "label": "font-semibold text-highlighted",
47
47
  "separator": "-mx-1 my-1 h-px bg-border",
48
48
  "item": [
@@ -80,7 +80,8 @@ export default {
80
80
  "itemLeadingAvatarSize": "3xs",
81
81
  "itemLeadingChip": "size-4",
82
82
  "itemLeadingChipSize": "sm",
83
- "itemTrailingIcon": "size-4"
83
+ "itemTrailingIcon": "size-4",
84
+ "empty": "p-1 text-xs"
84
85
  },
85
86
  "sm": {
86
87
  "base": "px-2.5 py-1.5 text-xs gap-1.5",
@@ -95,7 +96,8 @@ export default {
95
96
  "itemLeadingAvatarSize": "3xs",
96
97
  "itemLeadingChip": "size-4",
97
98
  "itemLeadingChipSize": "sm",
98
- "itemTrailingIcon": "size-4"
99
+ "itemTrailingIcon": "size-4",
100
+ "empty": "p-1.5 text-xs"
99
101
  },
100
102
  "md": {
101
103
  "base": "px-2.5 py-1.5 text-sm gap-1.5",
@@ -110,7 +112,8 @@ export default {
110
112
  "itemLeadingAvatarSize": "2xs",
111
113
  "itemLeadingChip": "size-5",
112
114
  "itemLeadingChipSize": "md",
113
- "itemTrailingIcon": "size-5"
115
+ "itemTrailingIcon": "size-5",
116
+ "empty": "p-1.5 text-sm"
114
117
  },
115
118
  "lg": {
116
119
  "base": "px-3 py-2 text-sm gap-2",
@@ -125,7 +128,8 @@ export default {
125
128
  "itemLeadingAvatarSize": "2xs",
126
129
  "itemLeadingChip": "size-5",
127
130
  "itemLeadingChipSize": "md",
128
- "itemTrailingIcon": "size-5"
131
+ "itemTrailingIcon": "size-5",
132
+ "empty": "p-2 text-sm"
129
133
  },
130
134
  "xl": {
131
135
  "base": "px-3 py-2 text-base gap-2",
@@ -140,7 +144,8 @@ export default {
140
144
  "itemLeadingAvatarSize": "xs",
141
145
  "itemLeadingChip": "size-6",
142
146
  "itemLeadingChipSize": "lg",
143
- "itemTrailingIcon": "size-6"
147
+ "itemTrailingIcon": "size-6",
148
+ "empty": "p-2 text-base"
144
149
  }
145
150
  },
146
151
  "variant": {
package/.nuxt/ui/table.ts CHANGED
@@ -20,11 +20,13 @@ export default {
20
20
  "root": "relative overflow-auto",
21
21
  "base": "min-w-full overflow-clip",
22
22
  "caption": "sr-only",
23
- "thead": "relative [&>tr]:after:absolute [&>tr]:after:inset-x-0 [&>tr]:after:bottom-0 [&>tr]:after:h-px [&>tr]:after:bg-(--ui-border-accented)",
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",
29
+ "separator": "absolute z-[1] left-0 w-full h-px bg-(--ui-border-accented)",
28
30
  "empty": "py-6 text-center text-sm text-muted",
29
31
  "loading": "py-6 text-center"
30
32
  },
@@ -37,12 +39,19 @@ export default {
37
39
  },
38
40
  "sticky": {
39
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": {
40
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"
41
50
  }
42
51
  },
43
52
  "loading": {
44
53
  "true": {
45
- "thead": "after:absolute after:bottom-0 after:inset-x-0 after:h-px"
54
+ "thead": "after:absolute after:z-[1] after:h-px"
46
55
  }
47
56
  },
48
57
  "loadingAnimation": {
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": {
@@ -0,0 +1,321 @@
1
+ const orientation = [
2
+ "horizontal",
3
+ "vertical"
4
+ ] as const
5
+
6
+ const color = [
7
+ "primary",
8
+ "secondary",
9
+ "success",
10
+ "info",
11
+ "warning",
12
+ "error",
13
+ "neutral"
14
+ ] as const
15
+
16
+ const size = [
17
+ "3xs",
18
+ "2xs",
19
+ "xs",
20
+ "sm",
21
+ "md",
22
+ "lg",
23
+ "xl",
24
+ "2xl",
25
+ "3xl"
26
+ ] as const
27
+
28
+ export default {
29
+ "slots": {
30
+ "root": "flex gap-1.5",
31
+ "item": "group relative flex flex-1 gap-3",
32
+ "container": "relative flex items-center gap-1.5",
33
+ "indicator": "group-data-[state=completed]:text-inverted group-data-[state=active]:text-inverted text-muted",
34
+ "separator": "flex-1 rounded-full bg-elevated",
35
+ "wrapper": "w-full",
36
+ "date": "text-dimmed text-xs/5",
37
+ "title": "font-medium text-highlighted text-sm",
38
+ "description": "text-muted text-wrap text-sm"
39
+ },
40
+ "variants": {
41
+ "orientation": {
42
+ "horizontal": {
43
+ "root": "flex-row w-full",
44
+ "item": "flex-col",
45
+ "separator": "h-0.5"
46
+ },
47
+ "vertical": {
48
+ "root": "flex-col",
49
+ "container": "flex-col",
50
+ "separator": "w-0.5"
51
+ }
52
+ },
53
+ "color": {
54
+ "primary": {
55
+ "indicator": "group-data-[state=completed]:bg-primary group-data-[state=active]:bg-primary"
56
+ },
57
+ "secondary": {
58
+ "indicator": "group-data-[state=completed]:bg-secondary group-data-[state=active]:bg-secondary"
59
+ },
60
+ "success": {
61
+ "indicator": "group-data-[state=completed]:bg-success group-data-[state=active]:bg-success"
62
+ },
63
+ "info": {
64
+ "indicator": "group-data-[state=completed]:bg-info group-data-[state=active]:bg-info"
65
+ },
66
+ "warning": {
67
+ "indicator": "group-data-[state=completed]:bg-warning group-data-[state=active]:bg-warning"
68
+ },
69
+ "error": {
70
+ "indicator": "group-data-[state=completed]:bg-error group-data-[state=active]:bg-error"
71
+ },
72
+ "neutral": {
73
+ "indicator": "group-data-[state=completed]:bg-inverted group-data-[state=active]:bg-inverted"
74
+ }
75
+ },
76
+ "size": {
77
+ "3xs": "",
78
+ "2xs": "",
79
+ "xs": "",
80
+ "sm": "",
81
+ "md": "",
82
+ "lg": "",
83
+ "xl": "",
84
+ "2xl": "",
85
+ "3xl": ""
86
+ },
87
+ "reverse": {
88
+ "true": ""
89
+ }
90
+ },
91
+ "compoundVariants": [
92
+ {
93
+ "color": "primary" as typeof color[number],
94
+ "reverse": false,
95
+ "class": {
96
+ "separator": "group-data-[state=completed]:bg-primary"
97
+ }
98
+ },
99
+ {
100
+ "color": "secondary" as typeof color[number],
101
+ "reverse": false,
102
+ "class": {
103
+ "separator": "group-data-[state=completed]:bg-secondary"
104
+ }
105
+ },
106
+ {
107
+ "color": "success" as typeof color[number],
108
+ "reverse": false,
109
+ "class": {
110
+ "separator": "group-data-[state=completed]:bg-success"
111
+ }
112
+ },
113
+ {
114
+ "color": "info" as typeof color[number],
115
+ "reverse": false,
116
+ "class": {
117
+ "separator": "group-data-[state=completed]:bg-info"
118
+ }
119
+ },
120
+ {
121
+ "color": "warning" as typeof color[number],
122
+ "reverse": false,
123
+ "class": {
124
+ "separator": "group-data-[state=completed]:bg-warning"
125
+ }
126
+ },
127
+ {
128
+ "color": "error" as typeof color[number],
129
+ "reverse": false,
130
+ "class": {
131
+ "separator": "group-data-[state=completed]:bg-error"
132
+ }
133
+ },
134
+ {
135
+ "color": "primary" as typeof color[number],
136
+ "reverse": true,
137
+ "class": {
138
+ "separator": "group-data-[state=active]:bg-primary group-data-[state=completed]:bg-primary"
139
+ }
140
+ },
141
+ {
142
+ "color": "secondary" as typeof color[number],
143
+ "reverse": true,
144
+ "class": {
145
+ "separator": "group-data-[state=active]:bg-secondary group-data-[state=completed]:bg-secondary"
146
+ }
147
+ },
148
+ {
149
+ "color": "success" as typeof color[number],
150
+ "reverse": true,
151
+ "class": {
152
+ "separator": "group-data-[state=active]:bg-success group-data-[state=completed]:bg-success"
153
+ }
154
+ },
155
+ {
156
+ "color": "info" as typeof color[number],
157
+ "reverse": true,
158
+ "class": {
159
+ "separator": "group-data-[state=active]:bg-info group-data-[state=completed]:bg-info"
160
+ }
161
+ },
162
+ {
163
+ "color": "warning" as typeof color[number],
164
+ "reverse": true,
165
+ "class": {
166
+ "separator": "group-data-[state=active]:bg-warning group-data-[state=completed]:bg-warning"
167
+ }
168
+ },
169
+ {
170
+ "color": "error" as typeof color[number],
171
+ "reverse": true,
172
+ "class": {
173
+ "separator": "group-data-[state=active]:bg-error group-data-[state=completed]:bg-error"
174
+ }
175
+ },
176
+ {
177
+ "color": "neutral" as typeof color[number],
178
+ "reverse": false,
179
+ "class": {
180
+ "separator": "group-data-[state=completed]:bg-inverted"
181
+ }
182
+ },
183
+ {
184
+ "color": "neutral" as typeof color[number],
185
+ "reverse": true,
186
+ "class": {
187
+ "separator": "group-data-[state=active]:bg-inverted group-data-[state=completed]:bg-inverted"
188
+ }
189
+ },
190
+ {
191
+ "orientation": "horizontal" as typeof orientation[number],
192
+ "size": "3xs" as typeof size[number],
193
+ "class": {
194
+ "wrapper": "pe-4.5"
195
+ }
196
+ },
197
+ {
198
+ "orientation": "horizontal" as typeof orientation[number],
199
+ "size": "2xs" as typeof size[number],
200
+ "class": {
201
+ "wrapper": "pe-5"
202
+ }
203
+ },
204
+ {
205
+ "orientation": "horizontal" as typeof orientation[number],
206
+ "size": "xs" as typeof size[number],
207
+ "class": {
208
+ "wrapper": "pe-5.5"
209
+ }
210
+ },
211
+ {
212
+ "orientation": "horizontal" as typeof orientation[number],
213
+ "size": "sm" as typeof size[number],
214
+ "class": {
215
+ "wrapper": "pe-6"
216
+ }
217
+ },
218
+ {
219
+ "orientation": "horizontal" as typeof orientation[number],
220
+ "size": "md" as typeof size[number],
221
+ "class": {
222
+ "wrapper": "pe-6.5"
223
+ }
224
+ },
225
+ {
226
+ "orientation": "horizontal" as typeof orientation[number],
227
+ "size": "lg" as typeof size[number],
228
+ "class": {
229
+ "wrapper": "pe-7"
230
+ }
231
+ },
232
+ {
233
+ "orientation": "horizontal" as typeof orientation[number],
234
+ "size": "xl" as typeof size[number],
235
+ "class": {
236
+ "wrapper": "pe-7.5"
237
+ }
238
+ },
239
+ {
240
+ "orientation": "horizontal" as typeof orientation[number],
241
+ "size": "2xl" as typeof size[number],
242
+ "class": {
243
+ "wrapper": "pe-8"
244
+ }
245
+ },
246
+ {
247
+ "orientation": "horizontal" as typeof orientation[number],
248
+ "size": "3xl" as typeof size[number],
249
+ "class": {
250
+ "wrapper": "pe-8.5"
251
+ }
252
+ },
253
+ {
254
+ "orientation": "vertical" as typeof orientation[number],
255
+ "size": "3xs" as typeof size[number],
256
+ "class": {
257
+ "wrapper": "-mt-0.5 pb-4.5"
258
+ }
259
+ },
260
+ {
261
+ "orientation": "vertical" as typeof orientation[number],
262
+ "size": "2xs" as typeof size[number],
263
+ "class": {
264
+ "wrapper": "pb-5"
265
+ }
266
+ },
267
+ {
268
+ "orientation": "vertical" as typeof orientation[number],
269
+ "size": "xs" as typeof size[number],
270
+ "class": {
271
+ "wrapper": "mt-0.5 pb-5.5"
272
+ }
273
+ },
274
+ {
275
+ "orientation": "vertical" as typeof orientation[number],
276
+ "size": "sm" as typeof size[number],
277
+ "class": {
278
+ "wrapper": "mt-1 pb-6"
279
+ }
280
+ },
281
+ {
282
+ "orientation": "vertical" as typeof orientation[number],
283
+ "size": "md" as typeof size[number],
284
+ "class": {
285
+ "wrapper": "mt-1.5 pb-6.5"
286
+ }
287
+ },
288
+ {
289
+ "orientation": "vertical" as typeof orientation[number],
290
+ "size": "lg" as typeof size[number],
291
+ "class": {
292
+ "wrapper": "mt-2 pb-7"
293
+ }
294
+ },
295
+ {
296
+ "orientation": "vertical" as typeof orientation[number],
297
+ "size": "xl" as typeof size[number],
298
+ "class": {
299
+ "wrapper": "mt-2.5 pb-7.5"
300
+ }
301
+ },
302
+ {
303
+ "orientation": "vertical" as typeof orientation[number],
304
+ "size": "2xl" as typeof size[number],
305
+ "class": {
306
+ "wrapper": "mt-3 pb-8"
307
+ }
308
+ },
309
+ {
310
+ "orientation": "vertical" as typeof orientation[number],
311
+ "size": "3xl" as typeof size[number],
312
+ "class": {
313
+ "wrapper": "mt-3.5 pb-8.5"
314
+ }
315
+ }
316
+ ],
317
+ "defaultVariants": {
318
+ "size": "md" as typeof size[number],
319
+ "color": "primary" as typeof color[number]
320
+ }
321
+ }
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": {
@@ -17,7 +17,7 @@ const swipeDirection = [
17
17
  export default {
18
18
  "slots": {
19
19
  "viewport": "fixed flex flex-col w-[calc(100%-2rem)] sm:w-96 z-[100] data-[expanded=true]:h-(--height) focus:outline-none",
20
- "base": "pointer-events-auto absolute inset-x-0 z-(--index) transform-(--transform) data-[expanded=false]:data-[front=false]:h-(--front-height) data-[expanded=false]:data-[front=false]:*:invisible data-[state=closed]:animate-[toast-closed_200ms_ease-in-out] data-[state=closed]:data-[expanded=false]:data-[front=false]:animate-[toast-collapsed-closed_200ms_ease-in-out] data-[swipe=move]:transition-none transition-[transform,translate,height] duration-200 ease-out"
20
+ "base": "pointer-events-auto absolute inset-x-0 z-(--index) transform-(--transform) data-[expanded=false]:data-[front=false]:h-(--front-height) data-[expanded=false]:data-[front=false]:*:opacity-0 data-[front=false]:*:transition-opacity data-[front=false]:*:duration-100 data-[state=closed]:animate-[toast-closed_200ms_ease-in-out] data-[state=closed]:data-[expanded=false]:data-[front=false]:animate-[toast-collapsed-closed_200ms_ease-in-out] data-[swipe=move]:transition-none transition-[transform,translate,height] duration-200 ease-out"
21
21
  },
22
22
  "variants": {
23
23
  "position": {
@@ -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
@@ -31,10 +31,11 @@ const component = ({ name, primitive, pro, prose, content }) => {
31
31
  ? `
32
32
  <script lang="ts">
33
33
  import type { AppConfig } from '@nuxt/schema'
34
+ ${pro ? `import type { ComponentConfig } from '@nuxt/ui'` : ''}
34
35
  import theme from '#build/${path}/${prose ? 'prose/' : ''}${content ? 'content/' : ''}${kebabName}'
35
- import type { ComponentConfig } from '../types/utils'
36
+ ${!pro ? `import type { ComponentConfig } from '../types/utils'` : ''}
36
37
 
37
- type ${upperName} = ComponentConfig<typeof theme, AppConfig, ${upperName}${pro ? `, '${key}'` : ''}>
38
+ type ${upperName} = ComponentConfig<typeof theme, AppConfig, '${camelName}'${pro ? `, '${key}'` : ''}>
38
39
 
39
40
  export interface ${upperName}Props {
40
41
  /**
@@ -62,7 +63,7 @@ defineSlots<${upperName}Slots>()
62
63
 
63
64
  const appConfig = useAppConfig() as ${upperName}['AppConfig']
64
65
 
65
- const ui = computed(() => tv({ extend: tv(theme), ...(appConfig.ui?.${camelName} || {}) })())
66
+ const ui = computed(() => tv({ extend: tv(theme), ...(appConfig.${pro ? 'uiPro' : 'ui'}?.${camelName} || {}) })())
66
67
  </script>
67
68
 
68
69
  <template>
@@ -75,10 +76,11 @@ const ui = computed(() => tv({ extend: tv(theme), ...(appConfig.ui?.${camelName}
75
76
  <script lang="ts">
76
77
  import type { ${upperName}RootProps, ${upperName}RootEmits } from 'reka-ui'
77
78
  import type { AppConfig } from '@nuxt/schema'
79
+ ${pro ? `import type { ComponentConfig } from '@nuxt/ui'` : ''}
78
80
  import theme from '#build/${path}/${prose ? 'prose/' : ''}${content ? 'content/' : ''}${kebabName}'
79
- import type { ComponentConfig } from '../types/utils'
81
+ ${!pro ? `import type { ComponentConfig } from '../types/utils'` : ''}
80
82
 
81
- type ${upperName} = ComponentConfig<typeof theme, AppConfig, ${upperName}${pro ? `, '${key}'` : ''}>
83
+ type ${upperName} = ComponentConfig<typeof theme, AppConfig, '${camelName}'${pro ? `, '${key}'` : ''}>
82
84
 
83
85
  export interface ${upperName}Props extends Pick<${upperName}RootProps> {
84
86
  class?: any
@@ -105,7 +107,7 @@ const appConfig = useAppConfig() as ${upperName}['AppConfig']
105
107
 
106
108
  const rootProps = useForwardPropsEmits(reactivePick(props), emits)
107
109
 
108
- const ui = computed(() => tv({ extend: tv(theme), ...(appConfig.ui?.${camelName} || {}) })())
110
+ const ui = computed(() => tv({ extend: tv(theme), ...(appConfig.${pro ? 'uiPro' : 'ui'}?.${camelName} || {}) })())
109
111
  </script>
110
112
 
111
113
  <template>
@@ -145,7 +147,8 @@ const test = ({ name, prose, content }) => {
145
147
  ? undefined
146
148
  : `
147
149
  import { describe, it, expect } from 'vitest'
148
- 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'
149
152
  import ComponentRender from '../${content ? '../' : ''}component-render'
150
153
 
151
154
  describe('${upperName}', () => {
@@ -186,6 +189,7 @@ links:${primitive
186
189
  - label: GitHub
187
190
  icon: i-simple-icons-github
188
191
  to: https://github.com/nuxt/${pro ? 'ui-pro' : 'ui'}/tree/v3/src/runtime/components/${upperName}.vue
192
+ navigation.badge: Soon
189
193
  ---
190
194
 
191
195
  ## Usage
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.1.3",
3
+ "version": "3.3.0",
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.Bix4DSU4.mjs';
3
+ import { d as defaultOptions, r as resolveColors, a as getDefaultUiConfig, b as addTemplates } from './shared/ui.BkSj2DmF.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.3";
11
+ const version = "3.3.0";
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
  } & {};
@@ -75,7 +75,6 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.alert || {} }
75
75
  <UButton
76
76
  v-if="close"
77
77
  :icon="closeIcon || appConfig.ui.icons.close"
78
- size="md"
79
78
  color="neutral"
80
79
  variant="link"
81
80
  :aria-label="t('alert.close')"