@nuxt/ui 3.0.0-alpha.11 → 3.0.0-alpha.12
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.
- package/.nuxt/ui/alert.ts +1 -1
- package/.nuxt/ui/avatar.ts +1 -1
- package/.nuxt/ui/button.ts +0 -1
- package/.nuxt/ui/context-menu.ts +1 -1
- package/.nuxt/ui/dropdown-menu.ts +1 -1
- package/.nuxt/ui/navigation-menu.ts +79 -11
- package/cli/package.json +2 -2
- package/cli/templates.mjs +6 -6
- package/dist/chunks/component-meta.cjs +2590 -2511
- package/dist/chunks/component-meta.mjs +2590 -2511
- package/dist/client/devtools/200.html +1 -1
- package/dist/client/devtools/404.html +1 -1
- package/dist/client/devtools/_nuxt/{CQ-XZFu7.js → CgoQwOTV.js} +26 -23
- package/dist/client/devtools/_nuxt/{DNZFyo26.js → DLmPhbaq.js} +1 -1
- package/dist/client/devtools/_nuxt/{Dtz-o9GB.js → DYuJNiSW.js} +1 -1
- package/dist/client/devtools/_nuxt/builds/latest.json +1 -1
- package/dist/client/devtools/_nuxt/builds/meta/3184ffe2-7577-4441-af98-fe6e81c30e3a.json +1 -0
- package/dist/client/devtools/_nuxt/entry.ChJczkiN.css +1 -0
- package/dist/client/devtools/_nuxt/error-404.DyY3rYaL.css +1 -0
- package/dist/client/devtools/_nuxt/error-500.D_1PCaJh.css +1 -0
- package/dist/client/devtools/index.html +1 -1
- package/dist/module.cjs +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/Accordion.vue +2 -2
- package/dist/runtime/components/Alert.vue +2 -2
- package/dist/runtime/components/Avatar.vue +31 -10
- package/dist/runtime/components/AvatarGroup.vue +2 -2
- package/dist/runtime/components/Badge.vue +2 -2
- package/dist/runtime/components/Breadcrumb.vue +2 -2
- package/dist/runtime/components/Button.vue +2 -2
- package/dist/runtime/components/ButtonGroup.vue +2 -2
- package/dist/runtime/components/Calendar.vue +4 -2
- package/dist/runtime/components/Card.vue +2 -2
- package/dist/runtime/components/Carousel.vue +2 -2
- package/dist/runtime/components/Checkbox.vue +4 -4
- package/dist/runtime/components/Chip.vue +2 -2
- package/dist/runtime/components/Collapsible.vue +2 -2
- package/dist/runtime/components/ColorPicker.vue +46 -15
- package/dist/runtime/components/CommandPalette.vue +2 -2
- package/dist/runtime/components/Container.vue +2 -2
- package/dist/runtime/components/ContextMenu.vue +2 -2
- package/dist/runtime/components/ContextMenuContent.vue +1 -1
- package/dist/runtime/components/Drawer.vue +2 -2
- package/dist/runtime/components/DropdownMenu.vue +2 -2
- package/dist/runtime/components/DropdownMenuContent.vue +1 -1
- package/dist/runtime/components/Form.vue +46 -17
- package/dist/runtime/components/FormField.vue +12 -6
- package/dist/runtime/components/Input.vue +5 -4
- package/dist/runtime/components/InputMenu.vue +6 -5
- package/dist/runtime/components/InputNumber.vue +7 -4
- package/dist/runtime/components/Kbd.vue +2 -2
- package/dist/runtime/components/Link.vue +2 -2
- package/dist/runtime/components/Modal.vue +2 -2
- package/dist/runtime/components/NavigationMenu.vue +89 -66
- package/dist/runtime/components/Pagination.vue +2 -2
- package/dist/runtime/components/PinInput.vue +5 -4
- package/dist/runtime/components/Popover.vue +2 -2
- package/dist/runtime/components/Progress.vue +2 -2
- package/dist/runtime/components/RadioGroup.vue +4 -4
- package/dist/runtime/components/Select.vue +9 -7
- package/dist/runtime/components/SelectMenu.vue +5 -4
- package/dist/runtime/components/Separator.vue +2 -2
- package/dist/runtime/components/Skeleton.vue +2 -2
- package/dist/runtime/components/Slideover.vue +2 -2
- package/dist/runtime/components/Slider.vue +4 -4
- package/dist/runtime/components/Stepper.vue +2 -2
- package/dist/runtime/components/Switch.vue +4 -4
- package/dist/runtime/components/Table.vue +2 -2
- package/dist/runtime/components/Tabs.vue +2 -2
- package/dist/runtime/components/Textarea.vue +5 -4
- package/dist/runtime/components/Toast.vue +2 -2
- package/dist/runtime/components/Toaster.vue +2 -2
- package/dist/runtime/components/Tooltip.vue +2 -2
- package/dist/runtime/composables/useFormField.d.ts +6 -2
- package/dist/runtime/composables/useFormField.js +18 -11
- package/dist/runtime/composables/useToast.d.ts +1 -1
- package/dist/runtime/composables/useToast.js +21 -7
- package/dist/runtime/index.css +1 -1
- package/dist/runtime/locale/es.js +2 -2
- package/dist/runtime/locale/he.js +53 -0
- package/dist/runtime/locale/hi.js +54 -0
- package/dist/runtime/locale/hu.d.ts +2 -0
- package/dist/runtime/locale/hu.js +54 -0
- package/dist/runtime/locale/index.d.ts +5 -2
- package/dist/runtime/locale/index.js +5 -2
- package/dist/runtime/locale/km.d.ts +2 -0
- package/dist/runtime/locale/km.js +54 -0
- package/dist/runtime/locale/nb_no.d.ts +2 -0
- package/dist/runtime/locale/nb_no.js +54 -0
- package/dist/runtime/locale/zh_cn.d.ts +2 -0
- package/dist/runtime/locale/{zh_hans.js → zh_cn.js} +1 -1
- package/dist/runtime/locale/zh_tw.d.ts +2 -0
- package/dist/runtime/locale/{zh_hant.js → zh_tw.js} +1 -1
- package/dist/runtime/plugins/colors.js +7 -4
- package/dist/runtime/types/form.d.ts +21 -12
- package/dist/runtime/utils/form.js +3 -5
- package/dist/runtime/utils/tv.js +2 -2
- package/dist/runtime/vue/components/Link.vue +2 -2
- package/dist/shared/{ui.BKsd22-Q.mjs → ui.CENZ17mM.mjs} +72 -16
- package/dist/shared/{ui.DCjJwb6l.cjs → ui.ClMXjgLK.cjs} +72 -16
- package/dist/unplugin.cjs +1 -1
- package/dist/unplugin.mjs +1 -1
- package/dist/vite.cjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +22 -23
- package/dist/client/devtools/_nuxt/builds/meta/1f5fbd7b-9d97-480e-9ae4-e02b4ff7018b.json +0 -1
- package/dist/client/devtools/_nuxt/entry.qOdop8tq.css +0 -1
- package/dist/client/devtools/_nuxt/error-404.D-rS9BDk.css +0 -1
- package/dist/client/devtools/_nuxt/error-500.CfcCHs91.css +0 -1
- /package/dist/runtime/locale/{zh_hans.d.ts → he.d.ts} +0 -0
- /package/dist/runtime/locale/{zh_hant.d.ts → hi.d.ts} +0 -0
package/.nuxt/ui/alert.ts
CHANGED
package/.nuxt/ui/avatar.ts
CHANGED
|
@@ -13,7 +13,7 @@ const size = [
|
|
|
13
13
|
export default {
|
|
14
14
|
"slots": {
|
|
15
15
|
"root": "inline-flex items-center justify-center shrink-0 select-none overflow-hidden rounded-full align-middle bg-[var(--ui-bg-elevated)]",
|
|
16
|
-
"image": "h-full w-full rounded-[inherit] object-cover",
|
|
16
|
+
"image": "h-full w-full rounded-[inherit] object-cover data-[error]:hidden",
|
|
17
17
|
"fallback": "font-medium leading-none text-[var(--ui-text-muted)] truncate",
|
|
18
18
|
"icon": "text-[var(--ui-text-muted)] shrink-0"
|
|
19
19
|
},
|
package/.nuxt/ui/button.ts
CHANGED
package/.nuxt/ui/context-menu.ts
CHANGED
|
@@ -18,7 +18,7 @@ const size = [
|
|
|
18
18
|
|
|
19
19
|
export default {
|
|
20
20
|
"slots": {
|
|
21
|
-
"content": "min-w-32 bg-[var(--ui-bg)] shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-[var(--ui-border)] divide-y divide-[var(--ui-border)] overflow-y-auto scroll-py-1 data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]
|
|
21
|
+
"content": "min-w-32 bg-[var(--ui-bg)] shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-[var(--ui-border)] divide-y divide-[var(--ui-border)] overflow-y-auto scroll-py-1 data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
|
|
22
22
|
"group": "p-1 isolate",
|
|
23
23
|
"label": "w-full flex items-center font-semibold text-[var(--ui-text-highlighted)]",
|
|
24
24
|
"separator": "-mx-1 my-1 h-px bg-[var(--ui-border)]",
|
|
@@ -18,7 +18,7 @@ const size = [
|
|
|
18
18
|
|
|
19
19
|
export default {
|
|
20
20
|
"slots": {
|
|
21
|
-
"content": "min-w-32 bg-[var(--ui-bg)] shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-[var(--ui-border)] divide-y divide-[var(--ui-border)] overflow-y-auto scroll-py-1 data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]
|
|
21
|
+
"content": "min-w-32 bg-[var(--ui-bg)] shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-[var(--ui-border)] divide-y divide-[var(--ui-border)] overflow-y-auto scroll-py-1 data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
|
|
22
22
|
"arrow": "fill-[var(--ui-border)]",
|
|
23
23
|
"group": "p-1 isolate",
|
|
24
24
|
"label": "w-full flex items-center font-semibold text-[var(--ui-text-highlighted)]",
|
|
@@ -28,10 +28,16 @@ const orientation = [
|
|
|
28
28
|
"vertical"
|
|
29
29
|
] as const
|
|
30
30
|
|
|
31
|
+
const contentOrientation = [
|
|
32
|
+
"horizontal",
|
|
33
|
+
"vertical"
|
|
34
|
+
] as const
|
|
35
|
+
|
|
31
36
|
export default {
|
|
32
37
|
"slots": {
|
|
33
38
|
"root": "relative flex gap-1.5 [&>div]:min-w-0",
|
|
34
39
|
"list": "isolate min-w-0",
|
|
40
|
+
"label": "w-full flex items-center gap-1.5 font-semibold text-xs/5 text-[var(--ui-text-highlighted)] px-2.5 py-1.5",
|
|
35
41
|
"item": "min-w-0",
|
|
36
42
|
"link": "group relative w-full flex items-center gap-1.5 font-medium text-sm before:absolute before:z-[-1] before:rounded-[calc(var(--ui-radius)*1.5)] focus:outline-none focus-visible:outline-none dark:focus-visible:outline-none focus-visible:before:ring-inset focus-visible:before:ring-2",
|
|
37
43
|
"linkLeadingIcon": "shrink-0 size-5",
|
|
@@ -52,9 +58,9 @@ export default {
|
|
|
52
58
|
"childLinkLabelExternalIcon": "inline-block size-3 align-top text-[var(--ui-text-dimmed)]",
|
|
53
59
|
"childLinkDescription": "text-sm text-[var(--ui-text-muted)]",
|
|
54
60
|
"separator": "px-2 h-px bg-[var(--ui-border)]",
|
|
55
|
-
"viewportWrapper": "absolute top-full left-0 flex w-full
|
|
56
|
-
"viewport": "relative overflow-hidden bg-[var(--ui-bg)] shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-[var(--ui-border)] h-[var(--reka-navigation-menu-viewport-height)] w-full transition-[width,height] origin-[top_center] data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
|
|
57
|
-
"content": "absolute top-0 left-0 w-full
|
|
61
|
+
"viewportWrapper": "absolute top-full left-0 flex w-full",
|
|
62
|
+
"viewport": "relative overflow-hidden bg-[var(--ui-bg)] shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-[var(--ui-border)] h-[var(--reka-navigation-menu-viewport-height)] w-full transition-[width,height,left] duration-200 origin-[top_center] data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
|
|
63
|
+
"content": "absolute top-0 left-0 w-full",
|
|
58
64
|
"indicator": "absolute data-[state=visible]:animate-[fade-in_100ms_ease-out] data-[state=hidden]:animate-[fade-out_100ms_ease-in] data-[state=hidden]:opacity-0 bottom-0 z-[1] w-[var(--reka-navigation-menu-indicator-size)] translate-x-[var(--reka-navigation-menu-indicator-position)] flex h-2.5 items-end justify-center overflow-hidden transition-[translate,width] duration-200",
|
|
59
65
|
"arrow": "relative top-[50%] size-2.5 rotate-45 border border-[var(--ui-border)] bg-[var(--ui-bg)] z-[1] rounded-[calc(var(--ui-radius)/2)]"
|
|
60
66
|
},
|
|
@@ -108,13 +114,22 @@ export default {
|
|
|
108
114
|
"list": "flex items-center",
|
|
109
115
|
"item": "py-2",
|
|
110
116
|
"link": "px-2.5 py-1.5 before:inset-x-px before:inset-y-0",
|
|
111
|
-
"childList": "grid
|
|
117
|
+
"childList": "grid p-2"
|
|
112
118
|
},
|
|
113
119
|
"vertical": {
|
|
114
120
|
"root": "flex-col",
|
|
115
|
-
"link": "flex-row px-2.5 py-1.5 before:inset-y-px before:inset-x-0"
|
|
116
|
-
|
|
117
|
-
|
|
121
|
+
"link": "flex-row px-2.5 py-1.5 before:inset-y-px before:inset-x-0"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"contentOrientation": {
|
|
125
|
+
"horizontal": {
|
|
126
|
+
"viewport": "",
|
|
127
|
+
"viewportWrapper": "justify-center",
|
|
128
|
+
"content": "data-[motion=from-start]:animate-[enter-from-left_200ms_ease] data-[motion=from-end]:animate-[enter-from-right_200ms_ease] data-[motion=to-start]:animate-[exit-to-left_200ms_ease] data-[motion=to-end]:animate-[exit-to-right_200ms_ease]"
|
|
129
|
+
},
|
|
130
|
+
"vertical": {
|
|
131
|
+
"viewport": "sm:w-[var(--reka-navigation-menu-viewport-width)] left-[var(--reka-navigation-menu-viewport-left)]",
|
|
132
|
+
"content": ""
|
|
118
133
|
}
|
|
119
134
|
},
|
|
120
135
|
"active": {
|
|
@@ -145,9 +160,27 @@ export default {
|
|
|
145
160
|
},
|
|
146
161
|
"level": {
|
|
147
162
|
"true": ""
|
|
163
|
+
},
|
|
164
|
+
"collapsed": {
|
|
165
|
+
"true": ""
|
|
148
166
|
}
|
|
149
167
|
},
|
|
150
168
|
"compoundVariants": [
|
|
169
|
+
{
|
|
170
|
+
"orientation": "horizontal" as typeof orientation[number],
|
|
171
|
+
"contentOrientation": "horizontal" as typeof contentOrientation[number],
|
|
172
|
+
"class": {
|
|
173
|
+
"childList": "grid-cols-2 gap-2"
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"orientation": "horizontal" as typeof orientation[number],
|
|
178
|
+
"contentOrientation": "vertical" as typeof contentOrientation[number],
|
|
179
|
+
"class": {
|
|
180
|
+
"childList": "gap-1",
|
|
181
|
+
"content": "w-60"
|
|
182
|
+
}
|
|
183
|
+
},
|
|
151
184
|
{
|
|
152
185
|
"orientation": "horizontal" as typeof orientation[number],
|
|
153
186
|
"highlight": true,
|
|
@@ -176,15 +209,25 @@ export default {
|
|
|
176
209
|
"variant": "pill" as typeof variant[number],
|
|
177
210
|
"class": {
|
|
178
211
|
"link": [
|
|
179
|
-
"hover:text-[var(--ui-text-highlighted)] hover:before:bg-[var(--ui-bg-elevated)]/50
|
|
212
|
+
"hover:text-[var(--ui-text-highlighted)] hover:before:bg-[var(--ui-bg-elevated)]/50",
|
|
180
213
|
"transition-colors before:transition-colors"
|
|
181
214
|
],
|
|
182
215
|
"linkLeadingIcon": [
|
|
183
|
-
"group-hover:text-[var(--ui-text)]
|
|
216
|
+
"group-hover:text-[var(--ui-text)]",
|
|
184
217
|
"transition-colors"
|
|
185
218
|
]
|
|
186
219
|
}
|
|
187
220
|
},
|
|
221
|
+
{
|
|
222
|
+
"disabled": false,
|
|
223
|
+
"active": false,
|
|
224
|
+
"variant": "pill" as typeof variant[number],
|
|
225
|
+
"orientation": "horizontal" as typeof orientation[number],
|
|
226
|
+
"class": {
|
|
227
|
+
"link": "data-[state=open]:text-[var(--ui-text-highlighted)]",
|
|
228
|
+
"linkLeadingIcon": "group-data-[state=open]:text-[var(--ui-text)]"
|
|
229
|
+
}
|
|
230
|
+
},
|
|
188
231
|
{
|
|
189
232
|
"disabled": false,
|
|
190
233
|
"variant": "pill" as typeof variant[number],
|
|
@@ -292,15 +335,25 @@ export default {
|
|
|
292
335
|
"variant": "link" as typeof variant[number],
|
|
293
336
|
"class": {
|
|
294
337
|
"link": [
|
|
295
|
-
"hover:text-[var(--ui-text-highlighted)]
|
|
338
|
+
"hover:text-[var(--ui-text-highlighted)]",
|
|
296
339
|
"transition-colors"
|
|
297
340
|
],
|
|
298
341
|
"linkLeadingIcon": [
|
|
299
|
-
"group-hover:text-[var(--ui-text)]
|
|
342
|
+
"group-hover:text-[var(--ui-text)]",
|
|
300
343
|
"transition-colors"
|
|
301
344
|
]
|
|
302
345
|
}
|
|
303
346
|
},
|
|
347
|
+
{
|
|
348
|
+
"disabled": false,
|
|
349
|
+
"active": false,
|
|
350
|
+
"variant": "link" as typeof variant[number],
|
|
351
|
+
"orientation": "horizontal" as typeof orientation[number],
|
|
352
|
+
"class": {
|
|
353
|
+
"link": "data-[state=open]:text-[var(--ui-text-highlighted)]",
|
|
354
|
+
"linkLeadingIcon": "group-data-[state=open]:text-[var(--ui-text)]"
|
|
355
|
+
}
|
|
356
|
+
},
|
|
304
357
|
{
|
|
305
358
|
"color": "primary" as typeof color[number],
|
|
306
359
|
"variant": "link" as typeof variant[number],
|
|
@@ -426,6 +479,21 @@ export default {
|
|
|
426
479
|
"class": {
|
|
427
480
|
"link": "after:bg-[var(--ui-bg-inverted)]"
|
|
428
481
|
}
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
"orientation": "vertical" as typeof orientation[number],
|
|
485
|
+
"collapsed": false,
|
|
486
|
+
"class": {
|
|
487
|
+
"childList": "ms-5 border-s border-[var(--ui-border)]",
|
|
488
|
+
"childItem": "ps-1.5 -ms-px"
|
|
489
|
+
}
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
"orientation": "vertical" as typeof orientation[number],
|
|
493
|
+
"collapsed": true,
|
|
494
|
+
"class": {
|
|
495
|
+
"link": "px-1.5"
|
|
496
|
+
}
|
|
429
497
|
}
|
|
430
498
|
],
|
|
431
499
|
"defaultVariants": {
|
package/cli/package.json
CHANGED
package/cli/templates.mjs
CHANGED
|
@@ -33,11 +33,11 @@ const component = ({ name, primitive, pro, prose, content }) => {
|
|
|
33
33
|
import type { AppConfig } from '@nuxt/schema'
|
|
34
34
|
import _appConfig from '#build/app.config'
|
|
35
35
|
import theme from '#build/${path}/${prose ? 'prose/' : ''}${content ? 'content/' : ''}${kebabName}'
|
|
36
|
-
import { tv } from ${pro ? '#ui/utils/tv' : '../utils/tv'}
|
|
36
|
+
import { tv } from '${pro ? '#ui/utils/tv' : '../utils/tv'}'
|
|
37
37
|
|
|
38
|
-
const appConfig = _appConfig as AppConfig & { ${key}: { ${prose ? 'prose: { ' : ''}${camelName}: Partial<typeof theme> } }${prose ? ' }' : ''}
|
|
38
|
+
const appConfig${camelName} = _appConfig as AppConfig & { ${key}: { ${prose ? 'prose: { ' : ''}${camelName}: Partial<typeof theme> } }${prose ? ' }' : ''}
|
|
39
39
|
|
|
40
|
-
const ${camelName} = tv({ extend: tv(theme), ...(appConfig.${key}?.${prose ? 'prose?.' : ''}${camelName} || {}) })
|
|
40
|
+
const ${camelName} = tv({ extend: tv(theme), ...(appConfig${camelName}.${key}?.${prose ? 'prose?.' : ''}${camelName} || {}) })
|
|
41
41
|
|
|
42
42
|
export interface ${upperName}Props {
|
|
43
43
|
/**
|
|
@@ -76,11 +76,11 @@ import type { ${upperName}RootProps, ${upperName}RootEmits } from 'reka-ui'
|
|
|
76
76
|
import type { AppConfig } from '@nuxt/schema'
|
|
77
77
|
import _appConfig from '#build/app.config'
|
|
78
78
|
import theme from '#build/${path}/${prose ? 'prose/' : ''}${content ? 'content/' : ''}${kebabName}'
|
|
79
|
-
import { tv } from ${pro ? '#ui/utils/tv' : '../utils/tv'}
|
|
79
|
+
import { tv } from '${pro ? '#ui/utils/tv' : '../utils/tv'}'
|
|
80
80
|
|
|
81
|
-
const appConfig = _appConfig as AppConfig & { ${key}: { ${prose ? 'prose: { ' : ''}${camelName}: Partial<typeof theme> } }${prose ? ' }' : ''}
|
|
81
|
+
const appConfig${camelName} = _appConfig as AppConfig & { ${key}: { ${prose ? 'prose: { ' : ''}${camelName}: Partial<typeof theme> } }${prose ? ' }' : ''}
|
|
82
82
|
|
|
83
|
-
const ${camelName} = tv({ extend: tv(theme), ...(appConfig.${key}?.${prose ? 'prose?.' : ''}${camelName} || {}) })
|
|
83
|
+
const ${camelName} = tv({ extend: tv(theme), ...(appConfig${camelName}.${key}?.${prose ? 'prose?.' : ''}${camelName} || {}) })
|
|
84
84
|
|
|
85
85
|
type ${upperName}Variants = VariantProps<typeof ${camelName}>
|
|
86
86
|
|