@nuxt/ui 3.0.0-alpha.10 → 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 +76 -59
- package/.nuxt/ui/avatar-group.ts +13 -1
- package/.nuxt/ui/avatar.ts +14 -2
- package/.nuxt/ui/badge.ts +102 -65
- package/.nuxt/ui/button-group.ts +13 -0
- package/.nuxt/ui/button.ts +124 -93
- package/.nuxt/ui/calendar.ts +20 -2
- package/.nuxt/ui/carousel.ts +5 -3
- package/.nuxt/ui/checkbox.ts +27 -9
- package/.nuxt/ui/chip.ts +36 -7
- package/.nuxt/ui/color-picker.ts +9 -1
- package/.nuxt/ui/context-menu.ts +31 -13
- package/.nuxt/ui/drawer.ts +11 -4
- package/.nuxt/ui/dropdown-menu.ts +31 -13
- package/.nuxt/ui/form-field.ts +9 -1
- package/.nuxt/ui/input-menu.ts +110 -75
- package/.nuxt/ui/input-number.ts +82 -51
- package/.nuxt/ui/input.ts +88 -53
- package/.nuxt/ui/kbd.ts +14 -2
- package/.nuxt/ui/navigation-menu.ts +193 -79
- package/.nuxt/ui/pin-input.ts +57 -31
- package/.nuxt/ui/popover.ts +1 -1
- package/.nuxt/ui/progress.ts +93 -54
- package/.nuxt/ui/radio-group.ts +25 -2
- package/.nuxt/ui/select-menu.ts +89 -54
- package/.nuxt/ui/select.ts +89 -54
- package/.nuxt/ui/separator.ts +52 -23
- package/.nuxt/ui/slideover.ts +11 -4
- package/.nuxt/ui/slider.ts +45 -22
- package/.nuxt/ui/stepper.ts +45 -23
- package/.nuxt/ui/switch.ts +20 -2
- package/.nuxt/ui/table.ts +30 -13
- package/.nuxt/ui/tabs.ts +67 -39
- package/.nuxt/ui/textarea.ts +88 -53
- package/.nuxt/ui/toast.ts +11 -1
- package/.nuxt/ui/toaster.ts +27 -11
- package/.nuxt/ui/tooltip.ts +1 -1
- package/README.md +8 -1
- package/cli/commands/make/component.mjs +12 -0
- package/cli/package.json +2 -2
- package/cli/templates.mjs +21 -16
- 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/CgoQwOTV.js +57 -0
- package/dist/client/devtools/_nuxt/DLmPhbaq.js +1 -0
- package/dist/client/devtools/_nuxt/DYuJNiSW.js +1 -0
- 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 +4 -3
- package/dist/runtime/components/Alert.vue +5 -4
- package/dist/runtime/components/Avatar.vue +35 -13
- package/dist/runtime/components/AvatarGroup.vue +4 -3
- package/dist/runtime/components/Badge.vue +4 -3
- package/dist/runtime/components/Breadcrumb.vue +3 -3
- package/dist/runtime/components/Button.vue +4 -3
- package/dist/runtime/components/ButtonGroup.vue +4 -3
- package/dist/runtime/components/Calendar.vue +6 -3
- package/dist/runtime/components/Card.vue +3 -3
- package/dist/runtime/components/Carousel.vue +4 -3
- package/dist/runtime/components/Checkbox.vue +6 -5
- package/dist/runtime/components/Chip.vue +5 -4
- package/dist/runtime/components/Collapsible.vue +6 -4
- package/dist/runtime/components/ColorPicker.vue +48 -16
- package/dist/runtime/components/CommandPalette.vue +14 -7
- package/dist/runtime/components/Container.vue +3 -3
- package/dist/runtime/components/ContextMenu.vue +4 -3
- package/dist/runtime/components/ContextMenuContent.vue +4 -4
- package/dist/runtime/components/Drawer.vue +9 -4
- package/dist/runtime/components/DropdownMenu.vue +4 -3
- package/dist/runtime/components/DropdownMenuContent.vue +4 -4
- package/dist/runtime/components/Form.vue +59 -29
- package/dist/runtime/components/FormField.vue +14 -7
- package/dist/runtime/components/Input.vue +7 -5
- package/dist/runtime/components/InputMenu.vue +19 -7
- package/dist/runtime/components/InputNumber.vue +9 -5
- package/dist/runtime/components/Kbd.vue +4 -3
- package/dist/runtime/components/Link.vue +3 -3
- package/dist/runtime/components/Modal.vue +10 -15
- package/dist/runtime/components/NavigationMenu.vue +97 -69
- package/dist/runtime/components/Pagination.vue +3 -3
- package/dist/runtime/components/PinInput.vue +9 -7
- package/dist/runtime/components/Popover.vue +9 -8
- package/dist/runtime/components/Progress.vue +6 -5
- package/dist/runtime/components/RadioGroup.vue +6 -5
- package/dist/runtime/components/Select.vue +12 -9
- package/dist/runtime/components/SelectMenu.vue +25 -8
- package/dist/runtime/components/Separator.vue +4 -3
- package/dist/runtime/components/Skeleton.vue +3 -3
- package/dist/runtime/components/Slideover.vue +10 -14
- package/dist/runtime/components/Slider.vue +6 -5
- package/dist/runtime/components/Stepper.vue +8 -6
- package/dist/runtime/components/Switch.vue +6 -5
- package/dist/runtime/components/Table.vue +4 -3
- package/dist/runtime/components/Tabs.vue +5 -3
- package/dist/runtime/components/Textarea.vue +7 -5
- package/dist/runtime/components/Toast.vue +4 -3
- package/dist/runtime/components/Toaster.vue +4 -3
- package/dist/runtime/components/Tooltip.vue +3 -3
- package/dist/runtime/composables/defineShortcuts.js +1 -1
- package/dist/runtime/composables/useFormField.d.ts +7 -3
- package/dist/runtime/composables/useFormField.js +18 -8
- 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/ar.js +3 -1
- package/dist/runtime/locale/cs.js +3 -1
- package/dist/runtime/locale/da.js +54 -0
- package/dist/runtime/locale/de.js +3 -1
- package/dist/runtime/locale/el.js +54 -0
- package/dist/runtime/locale/en.js +3 -1
- package/dist/runtime/locale/es.js +5 -3
- package/dist/runtime/locale/et.d.ts +2 -0
- package/dist/runtime/locale/et.js +54 -0
- package/dist/runtime/locale/fa_ir.js +3 -1
- package/dist/runtime/locale/fi.d.ts +2 -0
- package/dist/runtime/locale/fi.js +54 -0
- package/dist/runtime/locale/fr.js +3 -1
- package/dist/runtime/locale/he.d.ts +2 -0
- package/dist/runtime/locale/he.js +53 -0
- package/dist/runtime/locale/hi.d.ts +2 -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/id.d.ts +2 -0
- package/dist/runtime/locale/id.js +54 -0
- package/dist/runtime/locale/index.d.ts +14 -2
- package/dist/runtime/locale/index.js +14 -2
- package/dist/runtime/locale/it.js +3 -1
- package/dist/runtime/locale/ja.js +3 -1
- package/dist/runtime/locale/km.d.ts +2 -0
- package/dist/runtime/locale/km.js +54 -0
- package/dist/runtime/locale/ko.js +3 -1
- package/dist/runtime/locale/nb_no.d.ts +2 -0
- package/dist/runtime/locale/nb_no.js +54 -0
- package/dist/runtime/locale/nl.js +3 -1
- package/dist/runtime/locale/pl.js +3 -1
- package/dist/runtime/locale/pt.js +3 -1
- package/dist/runtime/locale/pt_br.js +3 -1
- package/dist/runtime/locale/ru.js +3 -1
- package/dist/runtime/locale/sk.js +3 -1
- package/dist/runtime/locale/sv.d.ts +2 -0
- package/dist/runtime/locale/sv.js +54 -0
- package/dist/runtime/locale/th.d.ts +2 -0
- package/dist/runtime/locale/th.js +54 -0
- package/dist/runtime/locale/tr.js +3 -1
- package/dist/runtime/locale/uk.d.ts +2 -0
- package/dist/runtime/locale/uk.js +54 -0
- package/dist/runtime/locale/vi.d.ts +2 -0
- package/dist/runtime/locale/vi.js +54 -0
- package/dist/runtime/locale/zh_cn.d.ts +2 -0
- package/dist/runtime/locale/{zh_hans.js → zh_cn.js} +4 -2
- package/dist/runtime/locale/zh_tw.d.ts +2 -0
- package/dist/runtime/locale/{zh_hant.js → zh_tw.js} +12 -10
- package/dist/runtime/plugins/colors.js +7 -4
- package/dist/runtime/types/form.d.ts +23 -14
- package/dist/runtime/types/form.js +2 -2
- package/dist/runtime/types/locale.d.ts +2 -0
- package/dist/runtime/utils/form.d.ts +2 -2
- package/dist/runtime/utils/form.js +5 -7
- package/dist/runtime/utils/tv.d.ts +1 -0
- package/dist/runtime/utils/tv.js +4 -0
- package/dist/runtime/vue/components/Icon.vue +2 -2
- package/dist/runtime/vue/components/Link.vue +2 -2
- package/dist/runtime/vue/plugins/head.d.ts +1 -1
- package/dist/runtime/vue/plugins/head.js +3 -3
- package/dist/shared/{ui.D_93iuwH.mjs → ui.CENZ17mM.mjs} +131 -48
- package/dist/shared/{ui.CwmIkD_Y.cjs → ui.ClMXjgLK.cjs} +131 -48
- package/dist/unplugin.cjs +5 -5
- package/dist/unplugin.mjs +5 -5
- package/dist/vite.cjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +55 -51
- package/dist/client/devtools/_nuxt/B1fTd_Rf.js +0 -1
- package/dist/client/devtools/_nuxt/CSUxkedg.js +0 -1
- package/dist/client/devtools/_nuxt/CbRTGpb7.js +0 -1
- package/dist/client/devtools/_nuxt/YQTlxbcT.js +0 -53
- package/dist/client/devtools/_nuxt/builds/meta/b3465abc-0a92-4ee7-ba6b-e5174891fcc0.json +0 -1
- package/dist/client/devtools/_nuxt/entry.DXXceQev.css +0 -1
- package/dist/client/devtools/_nuxt/error-404.BJpkZFyY.css +0 -1
- package/dist/client/devtools/_nuxt/error-500.D3i9VDlt.css +0 -1
- /package/dist/runtime/locale/{zh_hans.d.ts → da.d.ts} +0 -0
- /package/dist/runtime/locale/{zh_hant.d.ts → el.d.ts} +0 -0
|
@@ -42,7 +42,7 @@ const defaultOptions = {
|
|
|
42
42
|
fonts: true,
|
|
43
43
|
colorMode: true,
|
|
44
44
|
theme: {
|
|
45
|
-
colors:
|
|
45
|
+
colors: undefined,
|
|
46
46
|
transitions: true
|
|
47
47
|
},
|
|
48
48
|
devtools: {
|
|
@@ -83,7 +83,7 @@ const alert = (options) => ({
|
|
|
83
83
|
icon: "shrink-0 size-5",
|
|
84
84
|
avatar: "shrink-0",
|
|
85
85
|
avatarSize: "2xl",
|
|
86
|
-
actions: "flex gap-1.5 shrink-0",
|
|
86
|
+
actions: "flex flex-wrap gap-1.5 shrink-0",
|
|
87
87
|
close: "p-0.5"
|
|
88
88
|
},
|
|
89
89
|
variants: {
|
|
@@ -166,7 +166,7 @@ const alert = (options) => ({
|
|
|
166
166
|
const avatar = {
|
|
167
167
|
slots: {
|
|
168
168
|
root: "inline-flex items-center justify-center shrink-0 select-none overflow-hidden rounded-full align-middle bg-[var(--ui-bg-elevated)]",
|
|
169
|
-
image: "h-full w-full rounded-[inherit] object-cover",
|
|
169
|
+
image: "h-full w-full rounded-[inherit] object-cover data-[error]:hidden",
|
|
170
170
|
fallback: "font-medium leading-none text-[var(--ui-text-muted)] truncate",
|
|
171
171
|
icon: "text-[var(--ui-text-muted)] shrink-0"
|
|
172
172
|
},
|
|
@@ -249,7 +249,7 @@ const avatarGroup = {
|
|
|
249
249
|
|
|
250
250
|
const badge = (options) => ({
|
|
251
251
|
slots: {
|
|
252
|
-
base: "
|
|
252
|
+
base: "font-medium inline-flex items-center",
|
|
253
253
|
label: "truncate",
|
|
254
254
|
leadingIcon: "shrink-0",
|
|
255
255
|
leadingAvatar: "shrink-0",
|
|
@@ -268,23 +268,35 @@ const badge = (options) => ({
|
|
|
268
268
|
subtle: ""
|
|
269
269
|
},
|
|
270
270
|
size: {
|
|
271
|
+
xs: {
|
|
272
|
+
base: "text-[8px]/3 px-1 py-0.5 gap-1 rounded-[calc(var(--ui-radius))]",
|
|
273
|
+
leadingIcon: "size-3",
|
|
274
|
+
leadingAvatarSize: "3xs",
|
|
275
|
+
trailingIcon: "size-3"
|
|
276
|
+
},
|
|
271
277
|
sm: {
|
|
272
|
-
base: "text-
|
|
273
|
-
leadingIcon: "size-
|
|
278
|
+
base: "text-[10px]/3 px-1.5 py-1 gap-1 rounded-[calc(var(--ui-radius))]",
|
|
279
|
+
leadingIcon: "size-3",
|
|
274
280
|
leadingAvatarSize: "3xs",
|
|
275
|
-
trailingIcon: "size-
|
|
281
|
+
trailingIcon: "size-3"
|
|
276
282
|
},
|
|
277
283
|
md: {
|
|
278
|
-
base: "text-xs px-2 py-1 gap-1",
|
|
284
|
+
base: "text-xs px-2 py-1 gap-1 rounded-[calc(var(--ui-radius)*1.5)]",
|
|
279
285
|
leadingIcon: "size-4",
|
|
280
286
|
leadingAvatarSize: "3xs",
|
|
281
287
|
trailingIcon: "size-4"
|
|
282
288
|
},
|
|
283
289
|
lg: {
|
|
284
|
-
base: "text-sm px-2 py-1 gap-1.5",
|
|
290
|
+
base: "text-sm px-2 py-1 gap-1.5 rounded-[calc(var(--ui-radius)*1.5)]",
|
|
285
291
|
leadingIcon: "size-5",
|
|
286
292
|
leadingAvatarSize: "2xs",
|
|
287
293
|
trailingIcon: "size-5"
|
|
294
|
+
},
|
|
295
|
+
xl: {
|
|
296
|
+
base: "text-base px-2.5 py-1 gap-1.5 rounded-[calc(var(--ui-radius)*1.5)]",
|
|
297
|
+
leadingIcon: "size-6",
|
|
298
|
+
leadingAvatarSize: "2xs",
|
|
299
|
+
trailingIcon: "size-6"
|
|
288
300
|
}
|
|
289
301
|
}
|
|
290
302
|
},
|
|
@@ -462,7 +474,6 @@ const button = (options) => ({
|
|
|
462
474
|
block: {
|
|
463
475
|
true: {
|
|
464
476
|
base: "w-full justify-center",
|
|
465
|
-
leadingAvatarSize: "xs",
|
|
466
477
|
trailingIcon: "ms-auto"
|
|
467
478
|
}
|
|
468
479
|
},
|
|
@@ -673,9 +684,6 @@ const carousel = (options) => ({
|
|
|
673
684
|
dot: "bg-[var(--ui-border-inverted)]"
|
|
674
685
|
}
|
|
675
686
|
}
|
|
676
|
-
},
|
|
677
|
-
defaultVariants: {
|
|
678
|
-
orientation: "horizontal"
|
|
679
687
|
}
|
|
680
688
|
});
|
|
681
689
|
|
|
@@ -1364,7 +1372,7 @@ const inputMenu = (options) => {
|
|
|
1364
1372
|
base: () => ["rounded-[calc(var(--ui-radius)*1.5)]", options.theme.transitions && "transition-colors"],
|
|
1365
1373
|
trailing: "group absolute inset-y-0 end-0 flex items-center disabled:cursor-not-allowed disabled:opacity-75",
|
|
1366
1374
|
arrow: "fill-[var(--ui-border)]",
|
|
1367
|
-
content: "max-h-60 w-[var(--reka-popper-anchor-width)] bg-[var(--ui-bg)] shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-[var(--ui-border)] overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
|
|
1375
|
+
content: "max-h-60 w-[var(--reka-popper-anchor-width)] bg-[var(--ui-bg)] shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-[var(--ui-border)] overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] pointer-events-auto",
|
|
1368
1376
|
viewport: "divide-y divide-[var(--ui-border)] scroll-py-1",
|
|
1369
1377
|
group: "p-1 isolate",
|
|
1370
1378
|
empty: "py-2 text-center text-sm text-[var(--ui-text-muted)]",
|
|
@@ -1643,13 +1651,14 @@ const navigationMenu = (options) => ({
|
|
|
1643
1651
|
slots: {
|
|
1644
1652
|
root: "relative flex gap-1.5 [&>div]:min-w-0",
|
|
1645
1653
|
list: "isolate min-w-0",
|
|
1654
|
+
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",
|
|
1646
1655
|
item: "min-w-0",
|
|
1647
1656
|
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",
|
|
1648
1657
|
linkLeadingIcon: "shrink-0 size-5",
|
|
1649
1658
|
linkLeadingAvatar: "shrink-0",
|
|
1650
1659
|
linkLeadingAvatarSize: "2xs",
|
|
1651
1660
|
linkTrailing: "ms-auto inline-flex gap-1.5 items-center",
|
|
1652
|
-
linkTrailingBadge: "shrink-0
|
|
1661
|
+
linkTrailingBadge: "shrink-0",
|
|
1653
1662
|
linkTrailingBadgeSize: "sm",
|
|
1654
1663
|
linkTrailingIcon: "size-5 transform shrink-0 group-data-[state=open]:rotate-180 transition-transform duration-200",
|
|
1655
1664
|
linkLabel: "truncate",
|
|
@@ -1663,10 +1672,10 @@ const navigationMenu = (options) => ({
|
|
|
1663
1672
|
childLinkLabelExternalIcon: "inline-block size-3 align-top text-[var(--ui-text-dimmed)]",
|
|
1664
1673
|
childLinkDescription: "text-sm text-[var(--ui-text-muted)]",
|
|
1665
1674
|
separator: "px-2 h-px bg-[var(--ui-border)]",
|
|
1666
|
-
viewportWrapper: "absolute top-full left-0 flex w-full
|
|
1667
|
-
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]",
|
|
1668
|
-
content: "absolute top-0 left-0 w-full
|
|
1669
|
-
indicator: "data-[state=visible]:animate-[fade-in_100ms_ease-out] data-[state=hidden]:animate-[fade-out_100ms_ease-in] bottom-0 z-[1] flex h-2.5 items-end justify-center overflow-hidden transition-
|
|
1675
|
+
viewportWrapper: "absolute top-full left-0 flex w-full",
|
|
1676
|
+
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]",
|
|
1677
|
+
content: "absolute top-0 left-0 w-full",
|
|
1678
|
+
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",
|
|
1670
1679
|
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)]"
|
|
1671
1680
|
},
|
|
1672
1681
|
variants: {
|
|
@@ -1690,17 +1699,26 @@ const navigationMenu = (options) => ({
|
|
|
1690
1699
|
},
|
|
1691
1700
|
orientation: {
|
|
1692
1701
|
horizontal: {
|
|
1693
|
-
root: "
|
|
1702
|
+
root: "items-center justify-between",
|
|
1694
1703
|
list: "flex items-center",
|
|
1695
1704
|
item: "py-2",
|
|
1696
1705
|
link: "px-2.5 py-1.5 before:inset-x-px before:inset-y-0",
|
|
1697
|
-
childList: "grid
|
|
1706
|
+
childList: "grid p-2"
|
|
1698
1707
|
},
|
|
1699
1708
|
vertical: {
|
|
1700
1709
|
root: "flex-col",
|
|
1701
|
-
link: "flex-row px-2.5 py-1.5 before:inset-y-px before:inset-x-0"
|
|
1702
|
-
|
|
1703
|
-
|
|
1710
|
+
link: "flex-row px-2.5 py-1.5 before:inset-y-px before:inset-x-0"
|
|
1711
|
+
}
|
|
1712
|
+
},
|
|
1713
|
+
contentOrientation: {
|
|
1714
|
+
horizontal: {
|
|
1715
|
+
viewport: "",
|
|
1716
|
+
viewportWrapper: "justify-center",
|
|
1717
|
+
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]"
|
|
1718
|
+
},
|
|
1719
|
+
vertical: {
|
|
1720
|
+
viewport: "sm:w-[var(--reka-navigation-menu-viewport-width)] left-[var(--reka-navigation-menu-viewport-left)]",
|
|
1721
|
+
content: ""
|
|
1704
1722
|
}
|
|
1705
1723
|
},
|
|
1706
1724
|
active: {
|
|
@@ -1722,29 +1740,57 @@ const navigationMenu = (options) => ({
|
|
|
1722
1740
|
},
|
|
1723
1741
|
highlight: {
|
|
1724
1742
|
true: ""
|
|
1743
|
+
},
|
|
1744
|
+
level: {
|
|
1745
|
+
true: ""
|
|
1746
|
+
},
|
|
1747
|
+
collapsed: {
|
|
1748
|
+
true: ""
|
|
1725
1749
|
}
|
|
1726
1750
|
},
|
|
1727
1751
|
compoundVariants: [{
|
|
1728
|
-
highlight: true,
|
|
1729
1752
|
orientation: "horizontal",
|
|
1753
|
+
contentOrientation: "horizontal",
|
|
1730
1754
|
class: {
|
|
1731
|
-
|
|
1732
|
-
link: "after:absolute after:-bottom-2 after:inset-x-2.5 after:block after:h-px after:rounded-full"
|
|
1755
|
+
childList: "grid-cols-2 gap-2"
|
|
1733
1756
|
}
|
|
1734
1757
|
}, {
|
|
1758
|
+
orientation: "horizontal",
|
|
1759
|
+
contentOrientation: "vertical",
|
|
1760
|
+
class: {
|
|
1761
|
+
childList: "gap-1",
|
|
1762
|
+
content: "w-60"
|
|
1763
|
+
}
|
|
1764
|
+
}, {
|
|
1765
|
+
orientation: "horizontal",
|
|
1735
1766
|
highlight: true,
|
|
1767
|
+
class: {
|
|
1768
|
+
item: "-mb-px",
|
|
1769
|
+
link: ["after:absolute after:-bottom-2 after:inset-x-2.5 after:block after:h-px after:rounded-full", options.theme.transitions && "after:transition-colors"]
|
|
1770
|
+
}
|
|
1771
|
+
}, {
|
|
1736
1772
|
orientation: "vertical",
|
|
1773
|
+
highlight: true,
|
|
1774
|
+
level: true,
|
|
1737
1775
|
class: {
|
|
1738
|
-
|
|
1739
|
-
link: "after:absolute after:-start-1.5 after:inset-y-0.5 after:block after:w-px after:rounded-full"
|
|
1776
|
+
link: ["after:absolute after:-start-1.5 after:inset-y-0.5 after:block after:w-px after:rounded-full", options.theme.transitions && "after:transition-colors"]
|
|
1740
1777
|
}
|
|
1741
1778
|
}, {
|
|
1742
1779
|
disabled: false,
|
|
1743
1780
|
active: false,
|
|
1744
1781
|
variant: "pill",
|
|
1745
1782
|
class: {
|
|
1746
|
-
link: ["hover:text-[var(--ui-text-highlighted)] hover:before:bg-[var(--ui-bg-elevated)]/50
|
|
1747
|
-
linkLeadingIcon: ["group-hover:text-[var(--ui-text)]
|
|
1783
|
+
link: ["hover:text-[var(--ui-text-highlighted)] hover:before:bg-[var(--ui-bg-elevated)]/50", options.theme.transitions && "transition-colors before:transition-colors"],
|
|
1784
|
+
linkLeadingIcon: ["group-hover:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"]
|
|
1785
|
+
}
|
|
1786
|
+
}, {
|
|
1787
|
+
disabled: false,
|
|
1788
|
+
active: false,
|
|
1789
|
+
variant: "pill",
|
|
1790
|
+
orientation: "horizontal",
|
|
1791
|
+
class: {
|
|
1792
|
+
link: "data-[state=open]:text-[var(--ui-text-highlighted)]",
|
|
1793
|
+
linkLeadingIcon: "group-data-[state=open]:text-[var(--ui-text)]"
|
|
1748
1794
|
}
|
|
1749
1795
|
}, {
|
|
1750
1796
|
disabled: false,
|
|
@@ -1769,7 +1815,7 @@ const navigationMenu = (options) => ({
|
|
|
1769
1815
|
active: true,
|
|
1770
1816
|
class: {
|
|
1771
1817
|
link: `text-[var(--ui-${color})]`,
|
|
1772
|
-
linkLeadingIcon: `text-[var(--ui-${color})]`
|
|
1818
|
+
linkLeadingIcon: `text-[var(--ui-${color})] group-data-[state=open]:text-[var(--ui-${color})]`
|
|
1773
1819
|
}
|
|
1774
1820
|
})), {
|
|
1775
1821
|
color: "neutral",
|
|
@@ -1777,7 +1823,7 @@ const navigationMenu = (options) => ({
|
|
|
1777
1823
|
active: true,
|
|
1778
1824
|
class: {
|
|
1779
1825
|
link: "text-[var(--ui-text-highlighted)]",
|
|
1780
|
-
linkLeadingIcon: "text-[var(--ui-text-highlighted)]"
|
|
1826
|
+
linkLeadingIcon: "text-[var(--ui-text-highlighted)] group-data-[state=open]:text-[var(--ui-text-highlighted)]"
|
|
1781
1827
|
}
|
|
1782
1828
|
}, {
|
|
1783
1829
|
variant: "pill",
|
|
@@ -1798,8 +1844,17 @@ const navigationMenu = (options) => ({
|
|
|
1798
1844
|
active: false,
|
|
1799
1845
|
variant: "link",
|
|
1800
1846
|
class: {
|
|
1801
|
-
link: ["hover:text-[var(--ui-text-highlighted)]
|
|
1802
|
-
linkLeadingIcon: ["group-hover:text-[var(--ui-text)]
|
|
1847
|
+
link: ["hover:text-[var(--ui-text-highlighted)]", options.theme.transitions && "transition-colors"],
|
|
1848
|
+
linkLeadingIcon: ["group-hover:text-[var(--ui-text)]", options.theme.transitions && "transition-colors"]
|
|
1849
|
+
}
|
|
1850
|
+
}, {
|
|
1851
|
+
disabled: false,
|
|
1852
|
+
active: false,
|
|
1853
|
+
variant: "link",
|
|
1854
|
+
orientation: "horizontal",
|
|
1855
|
+
class: {
|
|
1856
|
+
link: "data-[state=open]:text-[var(--ui-text-highlighted)]",
|
|
1857
|
+
linkLeadingIcon: "group-data-[state=open]:text-[var(--ui-text)]"
|
|
1803
1858
|
}
|
|
1804
1859
|
}, ...(options.theme.colors || []).map((color) => ({
|
|
1805
1860
|
color,
|
|
@@ -1807,7 +1862,7 @@ const navigationMenu = (options) => ({
|
|
|
1807
1862
|
active: true,
|
|
1808
1863
|
class: {
|
|
1809
1864
|
link: `text-[var(--ui-${color})]`,
|
|
1810
|
-
linkLeadingIcon: `text-[var(--ui-${color})]`
|
|
1865
|
+
linkLeadingIcon: `text-[var(--ui-${color})] group-data-[state=open]:text-[var(--ui-${color})]`
|
|
1811
1866
|
}
|
|
1812
1867
|
})), {
|
|
1813
1868
|
color: "neutral",
|
|
@@ -1815,11 +1870,12 @@ const navigationMenu = (options) => ({
|
|
|
1815
1870
|
active: true,
|
|
1816
1871
|
class: {
|
|
1817
1872
|
link: "text-[var(--ui-text-highlighted)]",
|
|
1818
|
-
linkLeadingIcon: "text-[var(--ui-text-highlighted)]"
|
|
1873
|
+
linkLeadingIcon: "text-[var(--ui-text-highlighted)] group-data-[state=open]:text-[var(--ui-text-highlighted)]"
|
|
1819
1874
|
}
|
|
1820
1875
|
}, ...(options.theme.colors || []).map((highlightColor) => ({
|
|
1821
1876
|
highlightColor,
|
|
1822
1877
|
highlight: true,
|
|
1878
|
+
level: true,
|
|
1823
1879
|
active: true,
|
|
1824
1880
|
class: {
|
|
1825
1881
|
link: `after:bg-[var(--ui-${highlightColor})]`
|
|
@@ -1827,10 +1883,24 @@ const navigationMenu = (options) => ({
|
|
|
1827
1883
|
})), {
|
|
1828
1884
|
highlightColor: "neutral",
|
|
1829
1885
|
highlight: true,
|
|
1886
|
+
level: true,
|
|
1830
1887
|
active: true,
|
|
1831
1888
|
class: {
|
|
1832
1889
|
link: "after:bg-[var(--ui-bg-inverted)]"
|
|
1833
1890
|
}
|
|
1891
|
+
}, {
|
|
1892
|
+
orientation: "vertical",
|
|
1893
|
+
collapsed: false,
|
|
1894
|
+
class: {
|
|
1895
|
+
childList: "ms-5 border-s border-[var(--ui-border)]",
|
|
1896
|
+
childItem: "ps-1.5 -ms-px"
|
|
1897
|
+
}
|
|
1898
|
+
}, {
|
|
1899
|
+
orientation: "vertical",
|
|
1900
|
+
collapsed: true,
|
|
1901
|
+
class: {
|
|
1902
|
+
link: "px-1.5"
|
|
1903
|
+
}
|
|
1834
1904
|
}],
|
|
1835
1905
|
defaultVariants: {
|
|
1836
1906
|
color: "primary",
|
|
@@ -1912,7 +1982,7 @@ const pinInput = (options) => ({
|
|
|
1912
1982
|
|
|
1913
1983
|
const popover = {
|
|
1914
1984
|
slots: {
|
|
1915
|
-
content: "bg-[var(--ui-bg)] shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-[var(--ui-border)] data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] focus:outline-none",
|
|
1985
|
+
content: "bg-[var(--ui-bg)] shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-[var(--ui-border)] data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] focus:outline-none pointer-events-auto",
|
|
1916
1986
|
arrow: "fill-[var(--ui-border)]"
|
|
1917
1987
|
}
|
|
1918
1988
|
};
|
|
@@ -2227,12 +2297,12 @@ const radioGroup = (options) => ({
|
|
|
2227
2297
|
const select = (options) => {
|
|
2228
2298
|
return defu.defuFn({
|
|
2229
2299
|
slots: {
|
|
2230
|
-
root: () =>
|
|
2300
|
+
root: () => undefined,
|
|
2231
2301
|
base: () => ["relative group rounded-[calc(var(--ui-radius)*1.5)] inline-flex items-center focus:outline-none disabled:cursor-not-allowed disabled:opacity-75", options.theme.transitions && "transition-colors"],
|
|
2232
2302
|
value: "truncate pointer-events-none",
|
|
2233
2303
|
placeholder: "truncate text-[var(--ui-text-dimmed)]",
|
|
2234
2304
|
arrow: "fill-[var(--ui-border)]",
|
|
2235
|
-
content: "max-h-60 w-[var(--reka-popper-anchor-width)] bg-[var(--ui-bg)] shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-[var(--ui-border)] overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]",
|
|
2305
|
+
content: "max-h-60 w-[var(--reka-popper-anchor-width)] bg-[var(--ui-bg)] shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-[var(--ui-border)] overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] pointer-events-auto",
|
|
2236
2306
|
viewport: "divide-y divide-[var(--ui-border)] scroll-py-1",
|
|
2237
2307
|
group: "p-1 isolate",
|
|
2238
2308
|
empty: "py-2 text-center text-sm text-[var(--ui-text-muted)]",
|
|
@@ -2703,7 +2773,6 @@ const stepper = (options) => ({
|
|
|
2703
2773
|
class: { separator: "top-[62px]", item: "gap-3.5" }
|
|
2704
2774
|
}],
|
|
2705
2775
|
defaultVariants: {
|
|
2706
|
-
orientation: "horizontal",
|
|
2707
2776
|
size: "md",
|
|
2708
2777
|
color: "primary"
|
|
2709
2778
|
}
|
|
@@ -3116,7 +3185,7 @@ const toaster = {
|
|
|
3116
3185
|
|
|
3117
3186
|
const tooltip = {
|
|
3118
3187
|
slots: {
|
|
3119
|
-
content: "flex items-center gap-1 bg-[var(--ui-bg)] text-[var(--ui-text-highlighted)] shadow-sm rounded-[var(--ui-radius)] ring ring-[var(--ui-border)] h-6 px-2 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]",
|
|
3188
|
+
content: "flex items-center gap-1 bg-[var(--ui-bg)] text-[var(--ui-text-highlighted)] shadow-sm rounded-[var(--ui-radius)] ring ring-[var(--ui-border)] h-6 px-2 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] pointer-events-auto",
|
|
3120
3189
|
arrow: "fill-[var(--ui-border)]",
|
|
3121
3190
|
text: "truncate",
|
|
3122
3191
|
kbds: `hidden lg:inline-flex items-center shrink-0 gap-0.5 before:content-['\xB7'] before:me-0.5`,
|
|
@@ -3191,16 +3260,28 @@ function getTemplates(options, uiConfig) {
|
|
|
3191
3260
|
getContents: async () => {
|
|
3192
3261
|
const template = theme[component];
|
|
3193
3262
|
const result = typeof template === "function" ? template(options) : template;
|
|
3194
|
-
const variants = Object.
|
|
3263
|
+
const variants = Object.entries(result.variants || {}).filter(([_, values]) => {
|
|
3264
|
+
const keys = Object.keys(values);
|
|
3265
|
+
return keys.some((key) => key !== "true" && key !== "false");
|
|
3266
|
+
}).map(([key]) => key);
|
|
3195
3267
|
let json = JSON.stringify(result, null, 2);
|
|
3196
3268
|
for (const variant of variants) {
|
|
3197
|
-
json = json.replace(new RegExp(`("${variant}": "[^"]+")`, "g"),
|
|
3269
|
+
json = json.replace(new RegExp(`("${variant}": "[^"]+")`, "g"), `$1 as typeof ${variant}[number]`);
|
|
3198
3270
|
json = json.replace(new RegExp(`("${variant}": \\[\\s*)((?:"[^"]+",?\\s*)+)(\\])`, "g"), (_, before, match, after) => {
|
|
3199
|
-
const replaced = match.replace(/("[^"]+")/g,
|
|
3271
|
+
const replaced = match.replace(/("[^"]+")/g, `$1 as typeof ${variant}[number]`);
|
|
3200
3272
|
return `${before}${replaced}${after}`;
|
|
3201
3273
|
});
|
|
3202
3274
|
}
|
|
3203
|
-
|
|
3275
|
+
function generateVariantDeclarations(variants2) {
|
|
3276
|
+
return variants2.map((variant) => {
|
|
3277
|
+
const keys = Object.keys(result.variants[variant]);
|
|
3278
|
+
return `const ${variant} = ${JSON.stringify(keys, null, 2)} as const`;
|
|
3279
|
+
});
|
|
3280
|
+
}
|
|
3281
|
+
return [
|
|
3282
|
+
...generateVariantDeclarations(variants),
|
|
3283
|
+
`export default ${json}`
|
|
3284
|
+
].join("\n\n");
|
|
3204
3285
|
}
|
|
3205
3286
|
});
|
|
3206
3287
|
}
|
|
@@ -3213,12 +3294,13 @@ function getTemplates(options, uiConfig) {
|
|
|
3213
3294
|
filename: "types/ui.d.ts",
|
|
3214
3295
|
getContents: () => `import * as ui from '#build/ui'
|
|
3215
3296
|
import type { DeepPartial } from '#ui/types/utils'
|
|
3297
|
+
import type { defaultConfig } from 'tailwind-variants'
|
|
3216
3298
|
import colors from 'tailwindcss/colors'
|
|
3217
3299
|
|
|
3218
3300
|
const icons = ${JSON.stringify(uiConfig.icons)};
|
|
3219
3301
|
|
|
3220
|
-
type NeutralColor = 'slate' | 'gray' | 'zinc' | 'neutral' | 'stone'
|
|
3221
|
-
type Color = Exclude<keyof typeof colors, 'inherit' | 'current' | 'transparent' | 'black' | 'white' | NeutralColor>
|
|
3302
|
+
type NeutralColor = 'slate' | 'gray' | 'zinc' | 'neutral' | 'stone' | (string & {})
|
|
3303
|
+
type Color = Exclude<keyof typeof colors, 'inherit' | 'current' | 'transparent' | 'black' | 'white' | NeutralColor> | (string & {})
|
|
3222
3304
|
|
|
3223
3305
|
type AppConfigUI = {
|
|
3224
3306
|
colors?: {
|
|
@@ -3226,6 +3308,7 @@ type AppConfigUI = {
|
|
|
3226
3308
|
neutral?: NeutralColor
|
|
3227
3309
|
}
|
|
3228
3310
|
icons?: Partial<typeof icons>
|
|
3311
|
+
tv?: typeof defaultConfig
|
|
3229
3312
|
} & DeepPartial<typeof ui>
|
|
3230
3313
|
|
|
3231
3314
|
declare module '@nuxt/schema' {
|
package/dist/unplugin.cjs
CHANGED
|
@@ -6,7 +6,7 @@ const unplugin = require('unplugin');
|
|
|
6
6
|
const AutoImport = require('unplugin-auto-import');
|
|
7
7
|
const defu = require('defu');
|
|
8
8
|
const tailwind = require('@tailwindcss/vite');
|
|
9
|
-
const templates = require('./shared/ui.
|
|
9
|
+
const templates = require('./shared/ui.ClMXjgLK.cjs');
|
|
10
10
|
const tinyglobby = require('tinyglobby');
|
|
11
11
|
const knitwork = require('knitwork');
|
|
12
12
|
const MagicString = require('magic-string');
|
|
@@ -45,9 +45,9 @@ function TemplatePlugin(options, appConfig) {
|
|
|
45
45
|
|
|
46
46
|
function PluginsPlugin(options) {
|
|
47
47
|
const plugins = tinyglobby.globSync(["**/*", "!*.d.ts"], { cwd: pathe.join(runtimeDir, "plugins"), absolute: true });
|
|
48
|
-
plugins.unshift(mlly.resolvePathSync(
|
|
48
|
+
plugins.unshift(mlly.resolvePathSync("../runtime/vue/plugins/head", { extensions: [".ts", ".mjs", ".js"], url: (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('unplugin.cjs', document.baseURI).href)) }));
|
|
49
49
|
if (options.colorMode) {
|
|
50
|
-
plugins.push(mlly.resolvePathSync(
|
|
50
|
+
plugins.push(mlly.resolvePathSync("../runtime/vue/plugins/color-mode", { extensions: [".ts", ".mjs", ".js"], url: (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('unplugin.cjs', document.baseURI).href)) }));
|
|
51
51
|
}
|
|
52
52
|
return {
|
|
53
53
|
name: "nuxt:ui:plugins",
|
|
@@ -144,7 +144,7 @@ function ComponentImportPlugin(framework, options) {
|
|
|
144
144
|
const RELATIVE_IMPORT_RE = /^\.{1,2}\//;
|
|
145
145
|
|
|
146
146
|
function NuxtEnvironmentPlugin() {
|
|
147
|
-
const stubPath = mlly.resolvePathSync(
|
|
147
|
+
const stubPath = mlly.resolvePathSync("../runtime/vue/stubs", { extensions: [".ts", ".mjs", ".js"], url: (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('unplugin.cjs', document.baseURI).href)) });
|
|
148
148
|
return {
|
|
149
149
|
name: "nuxt:ui",
|
|
150
150
|
enforce: "pre",
|
|
@@ -171,7 +171,7 @@ function NuxtEnvironmentPlugin() {
|
|
|
171
171
|
};
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
const runtimeDir = node_url.fileURLToPath(new URL("./runtime", (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('unplugin.cjs', document.baseURI).href))));
|
|
174
|
+
const runtimeDir = pathe.normalize(node_url.fileURLToPath(new URL("./runtime", (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('unplugin.cjs', document.baseURI).href)))));
|
|
175
175
|
const NuxtUIPlugin = unplugin.createUnplugin((_options = {}, meta) => {
|
|
176
176
|
const options = defu.defu(_options, { fonts: false, devtools: { enabled: false } }, templates.defaultOptions);
|
|
177
177
|
options.theme = options.theme || {};
|
package/dist/unplugin.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { createUnplugin } from 'unplugin';
|
|
|
4
4
|
import AutoImport from 'unplugin-auto-import';
|
|
5
5
|
import { defu } from 'defu';
|
|
6
6
|
import tailwind from '@tailwindcss/vite';
|
|
7
|
-
import { g as getTemplates, d as defaultOptions, r as resolveColors, a as getDefaultUiConfig } from './shared/ui.
|
|
7
|
+
import { g as getTemplates, d as defaultOptions, r as resolveColors, a as getDefaultUiConfig } from './shared/ui.CENZ17mM.mjs';
|
|
8
8
|
import { globSync } from 'tinyglobby';
|
|
9
9
|
import { genSafeVariableName } from 'knitwork';
|
|
10
10
|
import MagicString from 'magic-string';
|
|
@@ -35,9 +35,9 @@ function TemplatePlugin(options, appConfig) {
|
|
|
35
35
|
|
|
36
36
|
function PluginsPlugin(options) {
|
|
37
37
|
const plugins = globSync(["**/*", "!*.d.ts"], { cwd: join(runtimeDir, "plugins"), absolute: true });
|
|
38
|
-
plugins.unshift(resolvePathSync(
|
|
38
|
+
plugins.unshift(resolvePathSync("../runtime/vue/plugins/head", { extensions: [".ts", ".mjs", ".js"], url: import.meta.url }));
|
|
39
39
|
if (options.colorMode) {
|
|
40
|
-
plugins.push(resolvePathSync(
|
|
40
|
+
plugins.push(resolvePathSync("../runtime/vue/plugins/color-mode", { extensions: [".ts", ".mjs", ".js"], url: import.meta.url }));
|
|
41
41
|
}
|
|
42
42
|
return {
|
|
43
43
|
name: "nuxt:ui:plugins",
|
|
@@ -134,7 +134,7 @@ function ComponentImportPlugin(framework, options) {
|
|
|
134
134
|
const RELATIVE_IMPORT_RE = /^\.{1,2}\//;
|
|
135
135
|
|
|
136
136
|
function NuxtEnvironmentPlugin() {
|
|
137
|
-
const stubPath = resolvePathSync(
|
|
137
|
+
const stubPath = resolvePathSync("../runtime/vue/stubs", { extensions: [".ts", ".mjs", ".js"], url: import.meta.url });
|
|
138
138
|
return {
|
|
139
139
|
name: "nuxt:ui",
|
|
140
140
|
enforce: "pre",
|
|
@@ -161,7 +161,7 @@ function NuxtEnvironmentPlugin() {
|
|
|
161
161
|
};
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
const runtimeDir = fileURLToPath(new URL("./runtime", import.meta.url));
|
|
164
|
+
const runtimeDir = normalize(fileURLToPath(new URL("./runtime", import.meta.url)));
|
|
165
165
|
const NuxtUIPlugin = createUnplugin((_options = {}, meta) => {
|
|
166
166
|
const options = defu(_options, { fonts: false, devtools: { enabled: false } }, defaultOptions);
|
|
167
167
|
options.theme = options.theme || {};
|
package/dist/vite.cjs
CHANGED
|
@@ -7,7 +7,7 @@ require('unplugin');
|
|
|
7
7
|
require('unplugin-auto-import');
|
|
8
8
|
require('defu');
|
|
9
9
|
require('@tailwindcss/vite');
|
|
10
|
-
require('./shared/ui.
|
|
10
|
+
require('./shared/ui.ClMXjgLK.cjs');
|
|
11
11
|
require('../dist/runtime/utils/index.js');
|
|
12
12
|
require('scule');
|
|
13
13
|
require('@nuxt/kit');
|
package/dist/vite.mjs
CHANGED