@nuxt/ui 3.1.3 → 3.2.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 (130) hide show
  1. package/.nuxt/ui/avatar.ts +1 -1
  2. package/.nuxt/ui/card.ts +1 -1
  3. package/.nuxt/ui/carousel.ts +1 -1
  4. package/.nuxt/ui/command-palette.ts +1 -0
  5. package/.nuxt/ui/drawer.ts +1 -1
  6. package/.nuxt/ui/index.ts +2 -0
  7. package/.nuxt/ui/input-menu.ts +24 -10
  8. package/.nuxt/ui/input-tags.ts +310 -0
  9. package/.nuxt/ui/modal.ts +1 -1
  10. package/.nuxt/ui/navigation-menu.ts +1 -1
  11. package/.nuxt/ui/select-menu.ts +11 -6
  12. package/.nuxt/ui/select.ts +11 -6
  13. package/.nuxt/ui/table.ts +3 -2
  14. package/.nuxt/ui/timeline.ts +321 -0
  15. package/.nuxt/ui/toaster.ts +1 -1
  16. package/cli/templates.mjs +7 -4
  17. package/dist/module.json +1 -1
  18. package/dist/module.mjs +2 -2
  19. package/dist/runtime/components/Alert.vue +0 -1
  20. package/dist/runtime/components/Avatar.vue +10 -2
  21. package/dist/runtime/components/Avatar.vue.d.ts +2 -0
  22. package/dist/runtime/components/Calendar.vue +4 -1
  23. package/dist/runtime/components/Carousel.vue +1 -2
  24. package/dist/runtime/components/Checkbox.vue +1 -1
  25. package/dist/runtime/components/CommandPalette.vue +80 -16
  26. package/dist/runtime/components/CommandPalette.vue.d.ts +32 -8
  27. package/dist/runtime/components/ContextMenuContent.vue.d.ts +4 -20
  28. package/dist/runtime/components/DropdownMenuContent.vue.d.ts +4 -20
  29. package/dist/runtime/components/Form.vue +6 -6
  30. package/dist/runtime/components/Form.vue.d.ts +12 -11
  31. package/dist/runtime/components/InputMenu.vue.d.ts +4 -4
  32. package/dist/runtime/components/InputNumber.vue +3 -2
  33. package/dist/runtime/components/InputNumber.vue.d.ts +1 -1
  34. package/dist/runtime/components/InputTags.vue +159 -0
  35. package/dist/runtime/components/InputTags.vue.d.ts +183 -0
  36. package/dist/runtime/components/Modal.vue +14 -13
  37. package/dist/runtime/components/Modal.vue.d.ts +14 -4
  38. package/dist/runtime/components/NavigationMenu.vue +16 -15
  39. package/dist/runtime/components/OverlayProvider.vue +2 -2
  40. package/dist/runtime/components/Pagination.vue +1 -1
  41. package/dist/runtime/components/Pagination.vue.d.ts +0 -1
  42. package/dist/runtime/components/PinInput.vue +4 -3
  43. package/dist/runtime/components/PinInput.vue.d.ts +22 -19
  44. package/dist/runtime/components/Progress.vue +2 -1
  45. package/dist/runtime/components/Progress.vue.d.ts +1 -1
  46. package/dist/runtime/components/RadioGroup.vue +2 -2
  47. package/dist/runtime/components/Select.vue +23 -4
  48. package/dist/runtime/components/Select.vue.d.ts +107 -1
  49. package/dist/runtime/components/SelectMenu.vue +24 -5
  50. package/dist/runtime/components/SelectMenu.vue.d.ts +105 -1
  51. package/dist/runtime/components/Slideover.vue +14 -13
  52. package/dist/runtime/components/Slideover.vue.d.ts +14 -4
  53. package/dist/runtime/components/Table.vue +7 -1
  54. package/dist/runtime/components/Table.vue.d.ts +10 -8
  55. package/dist/runtime/components/Tabs.vue +13 -2
  56. package/dist/runtime/components/Tabs.vue.d.ts +4 -1
  57. package/dist/runtime/components/Textarea.vue.d.ts +4 -3
  58. package/dist/runtime/components/Timeline.vue +92 -0
  59. package/dist/runtime/components/Timeline.vue.d.ts +70 -0
  60. package/dist/runtime/components/Toast.vue +4 -5
  61. package/dist/runtime/components/Tree.vue +3 -2
  62. package/dist/runtime/components/Tree.vue.d.ts +1 -1
  63. package/dist/runtime/composables/defineLocale.d.ts +2 -0
  64. package/dist/runtime/composables/defineLocale.js +4 -0
  65. package/dist/runtime/composables/defineShortcuts.js +2 -2
  66. package/dist/runtime/composables/useOverlay.d.ts +2 -1
  67. package/dist/runtime/composables/useOverlay.js +7 -6
  68. package/dist/runtime/locale/ar.js +2 -1
  69. package/dist/runtime/locale/az.js +2 -1
  70. package/dist/runtime/locale/bg.js +2 -1
  71. package/dist/runtime/locale/bn.js +2 -1
  72. package/dist/runtime/locale/ca.js +2 -1
  73. package/dist/runtime/locale/ckb.js +2 -1
  74. package/dist/runtime/locale/cs.js +2 -1
  75. package/dist/runtime/locale/da.js +2 -1
  76. package/dist/runtime/locale/de.js +2 -1
  77. package/dist/runtime/locale/el.js +2 -1
  78. package/dist/runtime/locale/en.js +2 -1
  79. package/dist/runtime/locale/es.js +2 -1
  80. package/dist/runtime/locale/et.js +2 -1
  81. package/dist/runtime/locale/fa_ir.js +2 -1
  82. package/dist/runtime/locale/fi.js +2 -1
  83. package/dist/runtime/locale/fr.js +2 -1
  84. package/dist/runtime/locale/he.js +2 -1
  85. package/dist/runtime/locale/hi.js +2 -1
  86. package/dist/runtime/locale/hu.js +2 -1
  87. package/dist/runtime/locale/hy.js +2 -1
  88. package/dist/runtime/locale/id.js +2 -1
  89. package/dist/runtime/locale/index.d.ts +1 -0
  90. package/dist/runtime/locale/index.js +1 -0
  91. package/dist/runtime/locale/it.js +2 -1
  92. package/dist/runtime/locale/ja.js +2 -1
  93. package/dist/runtime/locale/kk.js +2 -1
  94. package/dist/runtime/locale/km.js +2 -1
  95. package/dist/runtime/locale/ko.js +2 -1
  96. package/dist/runtime/locale/ky.js +2 -1
  97. package/dist/runtime/locale/lb.d.ts +3 -0
  98. package/dist/runtime/locale/lb.js +55 -0
  99. package/dist/runtime/locale/lt.js +2 -1
  100. package/dist/runtime/locale/mn.js +2 -1
  101. package/dist/runtime/locale/ms.js +2 -1
  102. package/dist/runtime/locale/nb_no.js +2 -1
  103. package/dist/runtime/locale/nl.js +2 -1
  104. package/dist/runtime/locale/pl.js +2 -1
  105. package/dist/runtime/locale/pt.js +2 -1
  106. package/dist/runtime/locale/pt_br.js +2 -1
  107. package/dist/runtime/locale/ro.js +2 -1
  108. package/dist/runtime/locale/ru.js +2 -1
  109. package/dist/runtime/locale/sk.js +2 -1
  110. package/dist/runtime/locale/sl.js +2 -1
  111. package/dist/runtime/locale/sv.js +2 -1
  112. package/dist/runtime/locale/th.js +2 -1
  113. package/dist/runtime/locale/tj.js +2 -1
  114. package/dist/runtime/locale/tr.js +2 -1
  115. package/dist/runtime/locale/ug_cn.js +2 -1
  116. package/dist/runtime/locale/uk.js +2 -1
  117. package/dist/runtime/locale/ur.js +2 -1
  118. package/dist/runtime/locale/uz.js +2 -1
  119. package/dist/runtime/locale/vi.js +2 -1
  120. package/dist/runtime/locale/zh_cn.js +2 -1
  121. package/dist/runtime/locale/zh_tw.js +2 -1
  122. package/dist/runtime/types/form.d.ts +11 -10
  123. package/dist/runtime/types/index.d.ts +2 -0
  124. package/dist/runtime/types/index.js +2 -0
  125. package/dist/runtime/types/locale.d.ts +1 -0
  126. package/dist/runtime/types/utils.d.ts +3 -0
  127. package/dist/shared/{ui.Bix4DSU4.mjs → ui.BPVxSPGY.mjs} +282 -26
  128. package/dist/unplugin.mjs +1 -1
  129. package/dist/vite.mjs +1 -1
  130. package/package.json +28 -29
@@ -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
+ }
@@ -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": {
package/cli/templates.mjs CHANGED
@@ -31,8 +31,9 @@ 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
38
  type ${upperName} = ComponentConfig<typeof theme, AppConfig, ${upperName}${pro ? `, '${key}'` : ''}>
38
39
 
@@ -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,8 +76,9 @@ 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
83
  type ${upperName} = ComponentConfig<typeof theme, AppConfig, ${upperName}${pro ? `, '${key}'` : ''}>
82
84
 
@@ -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>
@@ -186,6 +188,7 @@ links:${primitive
186
188
  - label: GitHub
187
189
  icon: i-simple-icons-github
188
190
  to: https://github.com/nuxt/${pro ? 'ui-pro' : 'ui'}/tree/v3/src/runtime/components/${upperName}.vue
191
+ navigation.badge: Soon
189
192
  ---
190
193
 
191
194
  ## Usage
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/ui",
3
- "version": "3.1.3",
3
+ "version": "3.2.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.BPVxSPGY.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.2.0";
12
12
 
13
13
  const module = defineNuxtModule({
14
14
  meta: {
@@ -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')"
@@ -10,6 +10,7 @@ import ImageComponent from "#build/ui-image-component";
10
10
  import { useAvatarGroup } from "../composables/useAvatarGroup";
11
11
  import { tv } from "../utils/tv";
12
12
  import UIcon from "./Icon.vue";
13
+ import UChip from "./Chip.vue";
13
14
  defineOptions({ inheritAttrs: false });
14
15
  const props = defineProps({
15
16
  as: { type: null, required: false, default: "span" },
@@ -18,6 +19,7 @@ const props = defineProps({
18
19
  icon: { type: String, required: false },
19
20
  text: { type: String, required: false },
20
21
  size: { type: null, required: false },
22
+ chip: { type: [Boolean, Object], required: false },
21
23
  class: { type: null, required: false },
22
24
  style: { type: null, required: false },
23
25
  ui: { type: null, required: false }
@@ -51,7 +53,13 @@ function onError() {
51
53
  </script>
52
54
 
53
55
  <template>
54
- <Primitive :as="as" :class="ui.root({ class: [props.ui?.root, props.class] })" :style="props.style">
56
+ <component
57
+ :is="props.chip ? UChip : Primitive"
58
+ :as="as"
59
+ v-bind="props.chip ? typeof props.chip === 'object' ? { inset: true, ...props.chip } : { inset: true } : {}"
60
+ :class="ui.root({ class: [props.ui?.root, props.class] })"
61
+ :style="props.style"
62
+ >
55
63
  <component
56
64
  :is="ImageComponent"
57
65
  v-if="src && !error"
@@ -71,5 +79,5 @@ function onError() {
71
79
  <span v-else :class="ui.fallback({ class: props.ui?.fallback })">{{ fallback || "\xA0" }}</span>
72
80
  </slot>
73
81
  </Slot>
74
- </Primitive>
82
+ </component>
75
83
  </template>
@@ -1,5 +1,6 @@
1
1
  import type { AppConfig } from '@nuxt/schema';
2
2
  import theme from '#build/ui/avatar';
3
+ import type { ChipProps } from '../types';
3
4
  import type { ComponentConfig } from '../types/utils';
4
5
  type Avatar = ComponentConfig<typeof theme, AppConfig, 'avatar'>;
5
6
  export interface AvatarProps {
@@ -19,6 +20,7 @@ export interface AvatarProps {
19
20
  * @defaultValue 'md'
20
21
  */
21
22
  size?: Avatar['variants']['size'];
23
+ chip?: boolean | ChipProps;
22
24
  class?: any;
23
25
  style?: any;
24
26
  ui?: Avatar['slots'];
@@ -36,6 +36,7 @@ const props = defineProps({
36
36
  allowNonContiguousRanges: { type: Boolean, required: false },
37
37
  pagedNavigation: { type: Boolean, required: false },
38
38
  preventDeselect: { type: Boolean, required: false },
39
+ maximumDays: { type: Number, required: false },
39
40
  weekStartsOn: { type: Number, required: false },
40
41
  weekdayFormat: { type: String, required: false },
41
42
  fixedWeeks: { type: Boolean, required: false, default: true },
@@ -49,7 +50,9 @@ const props = defineProps({
49
50
  isDateUnavailable: { type: Function, required: false },
50
51
  isDateHighlightable: { type: Function, required: false },
51
52
  nextPage: { type: Function, required: false },
52
- prevPage: { type: Function, required: false }
53
+ prevPage: { type: Function, required: false },
54
+ disableDaysOutsideCurrentView: { type: Boolean, required: false },
55
+ fixedDate: { type: String, required: false }
53
56
  });
54
57
  const emits = defineEmits(["update:modelValue", "update:placeholder", "update:startValue"]);
55
58
  defineSlots();
@@ -176,7 +176,6 @@ defineExpose({
176
176
  <UButton
177
177
  :disabled="!canScrollPrev"
178
178
  :icon="prevIcon"
179
- size="md"
180
179
  color="neutral"
181
180
  variant="outline"
182
181
  :aria-label="t('carousel.prev')"
@@ -187,7 +186,6 @@ defineExpose({
187
186
  <UButton
188
187
  :disabled="!canScrollNext"
189
188
  :icon="nextIcon"
190
- size="md"
191
189
  color="neutral"
192
190
  variant="outline"
193
191
  :aria-label="t('carousel.next')"
@@ -202,6 +200,7 @@ defineExpose({
202
200
  <button
203
201
  :aria-label="t('carousel.goto', { slide: index + 1 })"
204
202
  :class="ui.dot({ class: props.ui?.dot, active: selectedIndex === index })"
203
+ :data-state="selectedIndex === index ? 'active' : void 0"
205
204
  @click="scrollTo(index)"
206
205
  />
207
206
  </template>
@@ -26,7 +26,7 @@ const props = defineProps({
26
26
  disabled: { type: Boolean, required: false },
27
27
  required: { type: Boolean, required: false },
28
28
  name: { type: String, required: false },
29
- value: { type: [String, Number, Object, null], required: false },
29
+ value: { type: null, required: false },
30
30
  id: { type: String, required: false },
31
31
  defaultValue: { type: [Boolean, String], required: false }
32
32
  });