@nuxt/ui 3.0.0-alpha.9 → 3.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.nuxt/ui/accordion.ts +2 -2
- package/.nuxt/ui/alert.ts +122 -95
- package/.nuxt/ui/avatar-group.ts +14 -2
- package/.nuxt/ui/avatar.ts +16 -4
- package/.nuxt/ui/badge.ts +139 -93
- package/.nuxt/ui/breadcrumb.ts +5 -5
- package/.nuxt/ui/button-group.ts +13 -0
- package/.nuxt/ui/button.ts +167 -136
- package/.nuxt/ui/calendar.ts +103 -0
- package/.nuxt/ui/card.ts +27 -1
- package/.nuxt/ui/carousel.ts +7 -5
- package/.nuxt/ui/checkbox.ts +45 -27
- package/.nuxt/ui/chip.ts +44 -15
- package/.nuxt/ui/color-picker.ts +47 -0
- package/.nuxt/ui/command-palette.ts +28 -18
- package/.nuxt/ui/container.ts +1 -1
- package/.nuxt/ui/context-menu.ts +64 -46
- package/.nuxt/ui/drawer.ts +83 -15
- package/.nuxt/ui/dropdown-menu.ts +65 -47
- package/.nuxt/ui/form-field.ts +15 -7
- package/.nuxt/ui/index.ts +5 -1
- package/.nuxt/ui/input-menu.ts +150 -116
- package/.nuxt/ui/input-number.ts +102 -71
- package/.nuxt/ui/input.ts +111 -76
- package/.nuxt/ui/kbd.ts +18 -6
- package/.nuxt/ui/link.ts +3 -3
- package/.nuxt/ui/modal.ts +8 -7
- package/.nuxt/ui/navigation-menu.ts +244 -131
- package/.nuxt/ui/pin-input.ts +77 -51
- package/.nuxt/ui/popover.ts +2 -2
- package/.nuxt/ui/progress.ts +111 -72
- package/.nuxt/ui/radio-group.ts +45 -22
- package/.nuxt/ui/select-menu.ts +122 -86
- package/.nuxt/ui/select.ts +120 -84
- package/.nuxt/ui/separator.ts +60 -31
- package/.nuxt/ui/skeleton.ts +1 -1
- package/.nuxt/ui/slideover.ts +17 -9
- package/.nuxt/ui/slider.ts +61 -38
- package/.nuxt/ui/stepper.ts +202 -0
- package/.nuxt/ui/switch.ts +40 -22
- package/.nuxt/ui/table.ts +48 -31
- package/.nuxt/ui/tabs.ts +100 -72
- package/.nuxt/ui/textarea.ts +111 -76
- package/.nuxt/ui/toast.ts +53 -33
- package/.nuxt/ui/toaster.ts +31 -15
- package/.nuxt/ui/tooltip.ts +2 -2
- package/.nuxt/ui/tree.ts +154 -0
- package/.nuxt/ui.css +92 -0
- package/README.md +19 -8
- package/cli/commands/make/component.mjs +12 -0
- package/cli/package.json +2 -2
- package/cli/templates.mjs +27 -22
- package/dist/module.cjs +9 -171
- package/dist/module.d.cts +5 -15
- package/dist/module.d.mts +5 -15
- package/dist/module.d.ts +5 -15
- package/dist/module.json +2 -2
- package/dist/module.mjs +12 -168
- package/dist/runtime/components/Accordion.vue +8 -39
- package/dist/runtime/components/Alert.vue +22 -21
- package/dist/runtime/components/App.vue +9 -15
- package/dist/runtime/components/Avatar.vue +33 -21
- package/dist/runtime/components/AvatarGroup.vue +5 -7
- package/dist/runtime/components/Badge.vue +10 -8
- package/dist/runtime/components/Breadcrumb.vue +5 -31
- package/dist/runtime/components/Button.vue +5 -8
- package/dist/runtime/components/ButtonGroup.vue +5 -7
- package/dist/runtime/components/Calendar.vue +194 -0
- package/dist/runtime/components/Card.vue +10 -9
- package/dist/runtime/components/Carousel.vue +15 -10
- package/dist/runtime/components/Checkbox.vue +32 -38
- package/dist/runtime/components/Chip.vue +6 -8
- package/dist/runtime/components/Collapsible.vue +10 -11
- package/dist/runtime/components/ColorPicker.vue +297 -0
- package/dist/runtime/components/CommandPalette.vue +111 -97
- package/dist/runtime/components/Container.vue +4 -7
- package/dist/runtime/components/ContextMenu.vue +16 -69
- package/dist/runtime/components/ContextMenuContent.vue +12 -10
- package/dist/runtime/components/Drawer.vue +23 -12
- package/dist/runtime/components/DropdownMenu.vue +18 -59
- package/dist/runtime/components/DropdownMenuContent.vue +12 -10
- package/dist/runtime/components/Form.vue +65 -34
- package/dist/runtime/components/FormField.vue +22 -13
- package/dist/runtime/components/Icon.vue +1 -1
- package/dist/runtime/components/Input.vue +15 -7
- package/dist/runtime/components/InputMenu.vue +95 -104
- package/dist/runtime/components/InputNumber.vue +14 -9
- package/dist/runtime/components/Kbd.vue +5 -6
- package/dist/runtime/components/Link.vue +5 -8
- package/dist/runtime/components/LinkBase.vue +1 -1
- package/dist/runtime/components/Modal.vue +51 -38
- package/dist/runtime/components/NavigationMenu.vue +129 -114
- package/dist/runtime/components/OverlayProvider.vue +28 -0
- package/dist/runtime/components/Pagination.vue +6 -9
- package/dist/runtime/components/PinInput.vue +10 -11
- package/dist/runtime/components/Popover.vue +16 -18
- package/dist/runtime/components/Progress.vue +28 -12
- package/dist/runtime/components/RadioGroup.vue +9 -12
- package/dist/runtime/components/Select.vue +60 -34
- package/dist/runtime/components/SelectMenu.vue +160 -165
- package/dist/runtime/components/Separator.vue +6 -5
- package/dist/runtime/components/Skeleton.vue +4 -7
- package/dist/runtime/components/Slideover.vue +51 -37
- package/dist/runtime/components/Slider.vue +8 -7
- package/dist/runtime/components/Stepper.vue +170 -0
- package/dist/runtime/components/Switch.vue +19 -23
- package/dist/runtime/components/Table.vue +146 -31
- package/dist/runtime/components/Tabs.vue +12 -31
- package/dist/runtime/components/Textarea.vue +17 -8
- package/dist/runtime/components/Toast.vue +36 -25
- package/dist/runtime/components/Toaster.vue +10 -11
- package/dist/runtime/components/Tooltip.vue +9 -12
- package/dist/runtime/components/Tree.vue +196 -0
- package/dist/runtime/composables/defineShortcuts.d.ts +1 -1
- package/dist/runtime/composables/defineShortcuts.js +2 -2
- package/dist/runtime/composables/useFormField.d.ts +7 -3
- package/dist/runtime/composables/useFormField.js +18 -8
- package/dist/runtime/composables/useLocale.js +1 -1
- package/dist/runtime/composables/useOverlay.d.ts +30 -0
- package/dist/runtime/composables/useOverlay.js +70 -0
- package/dist/runtime/composables/useToast.d.ts +4 -3
- package/dist/runtime/composables/useToast.js +20 -6
- package/dist/runtime/index.css +1 -1
- package/dist/runtime/keyframes.css +1 -1
- package/dist/runtime/locale/ar.js +9 -1
- package/dist/runtime/locale/az.js +54 -0
- package/dist/runtime/locale/bn.js +54 -0
- package/dist/runtime/locale/cs.js +9 -1
- package/dist/runtime/locale/da.d.ts +2 -0
- package/dist/runtime/locale/da.js +54 -0
- package/dist/runtime/locale/de.js +11 -3
- package/dist/runtime/locale/el.d.ts +2 -0
- package/dist/runtime/locale/el.js +54 -0
- package/dist/runtime/locale/en.js +9 -1
- package/dist/runtime/locale/es.js +9 -1
- package/dist/runtime/locale/et.d.ts +2 -0
- package/dist/runtime/locale/et.js +54 -0
- package/dist/runtime/locale/fa_ir.js +9 -1
- package/dist/runtime/locale/fi.d.ts +2 -0
- package/dist/runtime/locale/fi.js +54 -0
- package/dist/runtime/locale/fr.js +9 -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 +25 -3
- package/dist/runtime/locale/index.js +25 -3
- package/dist/runtime/locale/it.js +9 -1
- package/dist/runtime/locale/ja.d.ts +2 -0
- package/dist/runtime/locale/ja.js +54 -0
- package/dist/runtime/locale/km.d.ts +2 -0
- package/dist/runtime/locale/km.js +54 -0
- package/dist/runtime/locale/ko.d.ts +2 -0
- package/dist/runtime/locale/ko.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/nl.d.ts +2 -0
- package/dist/runtime/locale/nl.js +54 -0
- package/dist/runtime/locale/pl.js +9 -1
- package/dist/runtime/locale/pt.d.ts +2 -0
- package/dist/runtime/locale/pt.js +54 -0
- package/dist/runtime/locale/pt_br.d.ts +2 -0
- package/dist/runtime/locale/pt_br.js +54 -0
- package/dist/runtime/locale/ru.js +9 -1
- package/dist/runtime/locale/sk.d.ts +2 -0
- package/dist/runtime/locale/sk.js +54 -0
- 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.d.ts +2 -0
- package/dist/runtime/locale/tr.js +54 -0
- 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} +10 -2
- package/dist/runtime/locale/zh_tw.d.ts +2 -0
- package/dist/runtime/locale/{zh_hant.js → zh_tw.js} +16 -8
- package/dist/runtime/plugins/colors.js +8 -5
- package/dist/runtime/types/form.d.ts +24 -15
- package/dist/runtime/types/form.js +2 -2
- package/dist/runtime/types/index.d.ts +5 -0
- package/dist/runtime/types/index.js +5 -0
- package/dist/runtime/types/locale.d.ts +8 -0
- package/dist/runtime/types/utils.d.ts +7 -3
- package/dist/runtime/utils/form.d.ts +4 -4
- package/dist/runtime/utils/form.js +6 -8
- package/dist/runtime/utils/index.d.ts +1 -1
- package/dist/runtime/utils/index.js +15 -2
- 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 +87 -23
- package/dist/runtime/vue/composables/useAppConfig.d.ts +1 -0
- package/dist/runtime/vue/composables/useAppConfig.js +2 -0
- package/dist/runtime/vue/plugins/head.d.ts +1 -1
- package/dist/runtime/vue/plugins/head.js +3 -3
- package/dist/runtime/vue/stubs.d.ts +19 -0
- package/dist/runtime/vue/stubs.js +37 -0
- package/dist/shared/{ui.d52SSCwA.mjs → ui.DSPu6Y8j.mjs} +905 -401
- package/dist/shared/{ui.BPnAe4QS.cjs → ui.DfK2RX6G.cjs} +908 -401
- package/dist/unplugin.cjs +62 -26
- package/dist/unplugin.d.cts +13 -1
- package/dist/unplugin.d.mts +13 -1
- package/dist/unplugin.d.ts +13 -1
- package/dist/unplugin.mjs +61 -25
- package/dist/vite.cjs +3 -2
- package/dist/vite.d.cts +2 -0
- package/dist/vite.d.mts +2 -0
- package/dist/vite.d.ts +2 -0
- package/dist/vite.mjs +3 -2
- package/package.json +103 -67
- package/dist/chunks/component-meta.cjs +0 -77249
- package/dist/chunks/component-meta.mjs +0 -77247
- package/dist/client/devtools/200.html +0 -1
- package/dist/client/devtools/404.html +0 -1
- package/dist/client/devtools/_fonts/rP2Wp2ywxg089UriCZaSExd86J3t9jz86MvyyKK58UfivUw4aw-SK92LTmKP0.woff2 +0 -0
- package/dist/client/devtools/_fonts/rP2Wp2ywxg089UriCZaSExd86J3t9jz86MvyyKy58UfivUw-9uYm8d48E4.woff2 +0 -0
- package/dist/client/devtools/_fonts/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu0-K6z9mXg-VNw7NHvqnp.woff2 +0 -0
- package/dist/client/devtools/_fonts/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu6-K6z9mXgjU0-EkYdMs3MAX.woff2 +0 -0
- package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat-7DW3w-R7n06NbhGy.woff +0 -0
- package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat-JDG3w-leGNfkTmsj.woff +0 -0
- package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat-JDW3w-ciElMF03ku.woff +0 -0
- package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat8JCm3w-sB722Uoa0f.woff +0 -0
- package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat8JDW3w-PBDI1JDjwV.woff +0 -0
- package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat8gCm3w-0q1hqVn09O.woff +0 -0
- package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat9XCm3w-ByvzuLy2fa.woff +0 -0
- package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat9uCm3w-5TKCIs6EEw.woff +0 -0
- package/dist/client/devtools/_fonts/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat_XDW3w-r2swRDGfn2.woff +0 -0
- package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAC5thTQ-ldB60l5U8r.woff +0 -0
- package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAIpthTQ-wbFKGFDrgo.woff +0 -0
- package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAIpxhTQ-LLUBv5jskj.woff +0 -0
- package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwARZthTQ-F71RdTRbNg.woff +0 -0
- package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwA_JxhTQ-6nh65gZkc0.woff +0 -0
- package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAfJthTQ-aMoWEJLmTt.woff +0 -0
- package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAkJxhTQ-WMBvmLOgKm.woff +0 -0
- package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAop1hTQ-utGC2hnWq2.woff +0 -0
- package/dist/client/devtools/_fonts/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAopxhTQ-YpyTieVa5B.woff +0 -0
- package/dist/client/devtools/_nuxt/BDC8ywlR.js +0 -1
- package/dist/client/devtools/_nuxt/BT004Uxp.js +0 -53
- package/dist/client/devtools/_nuxt/C1H2Soz3.js +0 -1
- package/dist/client/devtools/_nuxt/builds/latest.json +0 -1
- package/dist/client/devtools/_nuxt/builds/meta/f98c13ea-d751-4b37-8ce3-94e99708745f.json +0 -1
- package/dist/client/devtools/_nuxt/entry.Bx6WJjrx.css +0 -1
- package/dist/client/devtools/_nuxt/error-404.Cq4qshcf.css +0 -1
- package/dist/client/devtools/_nuxt/error-500.ax1aM34m.css +0 -1
- package/dist/client/devtools/favicon.svg +0 -1
- package/dist/client/devtools/index.html +0 -1
- package/dist/devtools/runtime/DevtoolsRenderer.vue +0 -53
- package/dist/devtools/runtime/examples/AvatarGroupExample.vue +0 -7
- package/dist/devtools/runtime/examples/ButtonGroupExample.vue +0 -8
- package/dist/devtools/runtime/examples/CardExample.vue +0 -13
- package/dist/devtools/runtime/examples/CarouselExample.vue +0 -13
- package/dist/devtools/runtime/examples/ChipExample.vue +0 -5
- package/dist/devtools/runtime/examples/CollapsibleExample.vue +0 -8
- package/dist/devtools/runtime/examples/CommandPaletteExample.vue +0 -29
- package/dist/devtools/runtime/examples/ContainerExample.vue +0 -5
- package/dist/devtools/runtime/examples/ContextMenuExample.vue +0 -5
- package/dist/devtools/runtime/examples/DrawerExample.vue +0 -8
- package/dist/devtools/runtime/examples/DropdownMenuExample.vue +0 -5
- package/dist/devtools/runtime/examples/FormExample.vue +0 -30
- package/dist/devtools/runtime/examples/FormFieldExample.vue +0 -5
- package/dist/devtools/runtime/examples/LinkExample.vue +0 -5
- package/dist/devtools/runtime/examples/ModalExample.vue +0 -8
- package/dist/devtools/runtime/examples/PopoverExample.vue +0 -8
- package/dist/devtools/runtime/examples/SkeletonExample.vue +0 -3
- package/dist/devtools/runtime/examples/SlideoverExample.vue +0 -8
- package/dist/devtools/runtime/examples/ToasterExample.vue +0 -11
- package/dist/devtools/runtime/examples/TooltipExample.vue +0 -5
- package/dist/runtime/components/ModalProvider.vue +0 -12
- package/dist/runtime/components/SlideoverProvider.vue +0 -12
- package/dist/runtime/composables/extendDevtoolsMeta.d.ts +0 -7
- package/dist/runtime/composables/extendDevtoolsMeta.js +0 -2
- package/dist/runtime/composables/useModal.d.ts +0 -17
- package/dist/runtime/composables/useModal.js +0 -46
- package/dist/runtime/composables/useSlideover.d.ts +0 -17
- package/dist/runtime/composables/useSlideover.js +0 -46
- package/dist/runtime/plugins/modal.d.ts +0 -2
- package/dist/runtime/plugins/modal.js +0 -10
- package/dist/runtime/plugins/slideover.d.ts +0 -2
- package/dist/runtime/plugins/slideover.js +0 -10
- /package/dist/runtime/locale/{zh_hans.d.ts → az.d.ts} +0 -0
- /package/dist/runtime/locale/{zh_hant.d.ts → bn.d.ts} +0 -0
package/.nuxt/ui/toast.ts
CHANGED
|
@@ -1,66 +1,86 @@
|
|
|
1
|
+
const color = [
|
|
2
|
+
"primary",
|
|
3
|
+
"secondary",
|
|
4
|
+
"success",
|
|
5
|
+
"info",
|
|
6
|
+
"warning",
|
|
7
|
+
"error",
|
|
8
|
+
"neutral"
|
|
9
|
+
] as const
|
|
10
|
+
|
|
11
|
+
const orientation = [
|
|
12
|
+
"horizontal",
|
|
13
|
+
"vertical"
|
|
14
|
+
] as const
|
|
15
|
+
|
|
1
16
|
export default {
|
|
2
17
|
"slots": {
|
|
3
|
-
"root": "relative group overflow-hidden bg-
|
|
4
|
-
"wrapper": "w-0 flex-1 flex flex-col
|
|
5
|
-
"title": "text-sm font-medium text-
|
|
6
|
-
"description": "text-sm text-
|
|
18
|
+
"root": "relative group overflow-hidden bg-(--ui-bg) shadow-lg rounded-[calc(var(--ui-radius)*2)] ring ring-(--ui-border) p-4 flex gap-2.5 focus:outline-none",
|
|
19
|
+
"wrapper": "w-0 flex-1 flex flex-col",
|
|
20
|
+
"title": "text-sm font-medium text-(--ui-text-highlighted)",
|
|
21
|
+
"description": "text-sm text-(--ui-text-muted)",
|
|
7
22
|
"icon": "shrink-0 size-5",
|
|
8
23
|
"avatar": "shrink-0",
|
|
9
24
|
"avatarSize": "2xl",
|
|
10
25
|
"actions": "flex gap-1.5 shrink-0",
|
|
11
26
|
"progress": "absolute inset-x-0 bottom-0 h-1 z-[-1]",
|
|
12
|
-
"close": "p-0
|
|
27
|
+
"close": "p-0"
|
|
13
28
|
},
|
|
14
29
|
"variants": {
|
|
15
30
|
"color": {
|
|
16
31
|
"primary": {
|
|
17
|
-
"root": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-
|
|
18
|
-
"icon": "text-
|
|
19
|
-
"progress": "bg-
|
|
32
|
+
"root": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-primary)",
|
|
33
|
+
"icon": "text-(--ui-primary)",
|
|
34
|
+
"progress": "bg-(--ui-primary)"
|
|
20
35
|
},
|
|
21
36
|
"secondary": {
|
|
22
|
-
"root": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-
|
|
23
|
-
"icon": "text-
|
|
24
|
-
"progress": "bg-
|
|
37
|
+
"root": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-secondary)",
|
|
38
|
+
"icon": "text-(--ui-secondary)",
|
|
39
|
+
"progress": "bg-(--ui-secondary)"
|
|
25
40
|
},
|
|
26
41
|
"success": {
|
|
27
|
-
"root": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-
|
|
28
|
-
"icon": "text-
|
|
29
|
-
"progress": "bg-
|
|
42
|
+
"root": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-success)",
|
|
43
|
+
"icon": "text-(--ui-success)",
|
|
44
|
+
"progress": "bg-(--ui-success)"
|
|
30
45
|
},
|
|
31
46
|
"info": {
|
|
32
|
-
"root": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-
|
|
33
|
-
"icon": "text-
|
|
34
|
-
"progress": "bg-
|
|
47
|
+
"root": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-info)",
|
|
48
|
+
"icon": "text-(--ui-info)",
|
|
49
|
+
"progress": "bg-(--ui-info)"
|
|
35
50
|
},
|
|
36
51
|
"warning": {
|
|
37
|
-
"root": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-
|
|
38
|
-
"icon": "text-
|
|
39
|
-
"progress": "bg-
|
|
52
|
+
"root": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-warning)",
|
|
53
|
+
"icon": "text-(--ui-warning)",
|
|
54
|
+
"progress": "bg-(--ui-warning)"
|
|
40
55
|
},
|
|
41
56
|
"error": {
|
|
42
|
-
"root": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-
|
|
43
|
-
"icon": "text-
|
|
44
|
-
"progress": "bg-
|
|
57
|
+
"root": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-error)",
|
|
58
|
+
"icon": "text-(--ui-error)",
|
|
59
|
+
"progress": "bg-(--ui-error)"
|
|
45
60
|
},
|
|
46
61
|
"neutral": {
|
|
47
|
-
"root": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-
|
|
48
|
-
"icon": "text-
|
|
49
|
-
"progress": "bg-
|
|
62
|
+
"root": "focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--ui-border-inverted)",
|
|
63
|
+
"icon": "text-(--ui-text-highlighted)",
|
|
64
|
+
"progress": "bg-(--ui-bg-inverted)"
|
|
50
65
|
}
|
|
51
66
|
},
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"root": "items-start",
|
|
55
|
-
"actions": "items-start mt-1"
|
|
56
|
-
},
|
|
57
|
-
"false": {
|
|
67
|
+
"orientation": {
|
|
68
|
+
"horizontal": {
|
|
58
69
|
"root": "items-center",
|
|
59
70
|
"actions": "items-center"
|
|
71
|
+
},
|
|
72
|
+
"vertical": {
|
|
73
|
+
"root": "items-start",
|
|
74
|
+
"actions": "items-start mt-2.5"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"title": {
|
|
78
|
+
"true": {
|
|
79
|
+
"description": "mt-1"
|
|
60
80
|
}
|
|
61
81
|
}
|
|
62
82
|
},
|
|
63
83
|
"defaultVariants": {
|
|
64
|
-
"color": "primary" as
|
|
84
|
+
"color": "primary" as typeof color[number]
|
|
65
85
|
}
|
|
66
86
|
}
|
package/.nuxt/ui/toaster.ts
CHANGED
|
@@ -1,7 +1,23 @@
|
|
|
1
|
+
const position = [
|
|
2
|
+
"top-left",
|
|
3
|
+
"top-center",
|
|
4
|
+
"top-right",
|
|
5
|
+
"bottom-left",
|
|
6
|
+
"bottom-center",
|
|
7
|
+
"bottom-right"
|
|
8
|
+
] as const
|
|
9
|
+
|
|
10
|
+
const swipeDirection = [
|
|
11
|
+
"up",
|
|
12
|
+
"right",
|
|
13
|
+
"down",
|
|
14
|
+
"left"
|
|
15
|
+
] as const
|
|
16
|
+
|
|
1
17
|
export default {
|
|
2
18
|
"slots": {
|
|
3
|
-
"viewport": "fixed flex flex-col w-[calc(100%-2rem)] sm:w-96 z-[100] data-[expanded=true]:h-
|
|
4
|
-
"base": "pointer-events-auto absolute inset-x-0 z-
|
|
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"
|
|
5
21
|
},
|
|
6
22
|
"variants": {
|
|
7
23
|
"position": {
|
|
@@ -34,9 +50,9 @@ export default {
|
|
|
34
50
|
"compoundVariants": [
|
|
35
51
|
{
|
|
36
52
|
"position": [
|
|
37
|
-
"top-left" as
|
|
38
|
-
"top-center" as
|
|
39
|
-
"top-right" as
|
|
53
|
+
"top-left" as typeof position[number],
|
|
54
|
+
"top-center" as typeof position[number],
|
|
55
|
+
"top-right" as typeof position[number]
|
|
40
56
|
],
|
|
41
57
|
"class": {
|
|
42
58
|
"viewport": "top-4",
|
|
@@ -45,9 +61,9 @@ export default {
|
|
|
45
61
|
},
|
|
46
62
|
{
|
|
47
63
|
"position": [
|
|
48
|
-
"bottom-left" as
|
|
49
|
-
"bottom-center" as
|
|
50
|
-
"bottom-right" as
|
|
64
|
+
"bottom-left" as typeof position[number],
|
|
65
|
+
"bottom-center" as typeof position[number],
|
|
66
|
+
"bottom-right" as typeof position[number]
|
|
51
67
|
],
|
|
52
68
|
"class": {
|
|
53
69
|
"viewport": "bottom-4",
|
|
@@ -56,20 +72,20 @@ export default {
|
|
|
56
72
|
},
|
|
57
73
|
{
|
|
58
74
|
"swipeDirection": [
|
|
59
|
-
"left" as
|
|
60
|
-
"right" as
|
|
75
|
+
"left" as typeof swipeDirection[number],
|
|
76
|
+
"right" as typeof swipeDirection[number]
|
|
61
77
|
],
|
|
62
|
-
"class": "data-[swipe=move]:translate-x-
|
|
78
|
+
"class": "data-[swipe=move]:translate-x-(--reka-toast-swipe-move-x) data-[swipe=end]:translate-x-(--reka-toast-swipe-end-x) data-[swipe=cancel]:translate-x-0"
|
|
63
79
|
},
|
|
64
80
|
{
|
|
65
81
|
"swipeDirection": [
|
|
66
|
-
"up" as
|
|
67
|
-
"down" as
|
|
82
|
+
"up" as typeof swipeDirection[number],
|
|
83
|
+
"down" as typeof swipeDirection[number]
|
|
68
84
|
],
|
|
69
|
-
"class": "data-[swipe=move]:translate-y-
|
|
85
|
+
"class": "data-[swipe=move]:translate-y-(--reka-toast-swipe-move-y) data-[swipe=end]:translate-y-(--reka-toast-swipe-end-y) data-[swipe=cancel]:translate-y-0"
|
|
70
86
|
}
|
|
71
87
|
],
|
|
72
88
|
"defaultVariants": {
|
|
73
|
-
"position": "bottom-right" as
|
|
89
|
+
"position": "bottom-right" as typeof position[number]
|
|
74
90
|
}
|
|
75
91
|
}
|
package/.nuxt/ui/tooltip.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
"slots": {
|
|
3
|
-
"content": "flex items-center gap-1 bg-
|
|
4
|
-
"arrow": "fill-
|
|
3
|
+
"content": "flex items-center gap-1 bg-(--ui-bg) text-(--ui-text-highlighted) shadow-sm rounded-(--ui-radius) ring ring-(--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",
|
|
4
|
+
"arrow": "fill-(--ui-border)",
|
|
5
5
|
"text": "truncate",
|
|
6
6
|
"kbds": "hidden lg:inline-flex items-center shrink-0 gap-0.5 before:content-['·'] before:me-0.5",
|
|
7
7
|
"kbdsSize": "sm"
|
package/.nuxt/ui/tree.ts
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
const color = [
|
|
2
|
+
"primary",
|
|
3
|
+
"secondary",
|
|
4
|
+
"success",
|
|
5
|
+
"info",
|
|
6
|
+
"warning",
|
|
7
|
+
"error",
|
|
8
|
+
"neutral"
|
|
9
|
+
] as const
|
|
10
|
+
|
|
11
|
+
const size = [
|
|
12
|
+
"xs",
|
|
13
|
+
"sm",
|
|
14
|
+
"md",
|
|
15
|
+
"lg",
|
|
16
|
+
"xl"
|
|
17
|
+
] as const
|
|
18
|
+
|
|
19
|
+
export default {
|
|
20
|
+
"slots": {
|
|
21
|
+
"root": "relative isolate",
|
|
22
|
+
"item": "",
|
|
23
|
+
"listWithChildren": "ms-4.5 border-s border-(--ui-border)",
|
|
24
|
+
"itemWithChildren": "ps-1.5 -ms-px",
|
|
25
|
+
"link": "relative group w-full flex items-center text-sm before:absolute before:inset-y-px before:inset-x-0 before:z-[-1] before:rounded-[calc(var(--ui-radius)*1.5)] focus:outline-none focus-visible:outline-none focus-visible:before:ring-inset focus-visible:before:ring-2",
|
|
26
|
+
"linkLeadingIcon": "shrink-0",
|
|
27
|
+
"linkLabel": "truncate",
|
|
28
|
+
"linkTrailing": "ms-auto inline-flex gap-1.5 items-center",
|
|
29
|
+
"linkTrailingIcon": "shrink-0 transform transition-transform duration-200 group-data-expanded:rotate-180"
|
|
30
|
+
},
|
|
31
|
+
"variants": {
|
|
32
|
+
"color": {
|
|
33
|
+
"primary": {
|
|
34
|
+
"link": "focus-visible:before:ring-(--ui-primary)"
|
|
35
|
+
},
|
|
36
|
+
"secondary": {
|
|
37
|
+
"link": "focus-visible:before:ring-(--ui-secondary)"
|
|
38
|
+
},
|
|
39
|
+
"success": {
|
|
40
|
+
"link": "focus-visible:before:ring-(--ui-success)"
|
|
41
|
+
},
|
|
42
|
+
"info": {
|
|
43
|
+
"link": "focus-visible:before:ring-(--ui-info)"
|
|
44
|
+
},
|
|
45
|
+
"warning": {
|
|
46
|
+
"link": "focus-visible:before:ring-(--ui-warning)"
|
|
47
|
+
},
|
|
48
|
+
"error": {
|
|
49
|
+
"link": "focus-visible:before:ring-(--ui-error)"
|
|
50
|
+
},
|
|
51
|
+
"neutral": {
|
|
52
|
+
"link": "focus-visible:before:ring-(--ui-border-inverted)"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"size": {
|
|
56
|
+
"xs": {
|
|
57
|
+
"link": "px-2 py-1 text-xs gap-1",
|
|
58
|
+
"linkLeadingIcon": "size-4",
|
|
59
|
+
"linkTrailingIcon": "size-4"
|
|
60
|
+
},
|
|
61
|
+
"sm": {
|
|
62
|
+
"link": "px-2.5 py-1.5 text-xs gap-1.5",
|
|
63
|
+
"linkLeadingIcon": "size-4",
|
|
64
|
+
"linkTrailingIcon": "size-4"
|
|
65
|
+
},
|
|
66
|
+
"md": {
|
|
67
|
+
"link": "px-2.5 py-1.5 text-sm gap-1.5",
|
|
68
|
+
"linkLeadingIcon": "size-5",
|
|
69
|
+
"linkTrailingIcon": "size-5"
|
|
70
|
+
},
|
|
71
|
+
"lg": {
|
|
72
|
+
"link": "px-3 py-2 text-sm gap-2",
|
|
73
|
+
"linkLeadingIcon": "size-5",
|
|
74
|
+
"linkTrailingIcon": "size-5"
|
|
75
|
+
},
|
|
76
|
+
"xl": {
|
|
77
|
+
"link": "px-3 py-2 text-base gap-2",
|
|
78
|
+
"linkLeadingIcon": "size-6",
|
|
79
|
+
"linkTrailingIcon": "size-6"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"selected": {
|
|
83
|
+
"true": {
|
|
84
|
+
"link": "before:bg-(--ui-bg-elevated)"
|
|
85
|
+
},
|
|
86
|
+
"false": {
|
|
87
|
+
"link": [
|
|
88
|
+
"hover:not-disabled:text-(--ui-text-highlighted) hover:not-disabled:before:bg-(--ui-bg-elevated)/50",
|
|
89
|
+
"transition-colors before:transition-colors"
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"disabled": {
|
|
94
|
+
"true": {
|
|
95
|
+
"link": "cursor-not-allowed opacity-75"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"compoundVariants": [
|
|
100
|
+
{
|
|
101
|
+
"color": "primary" as typeof color[number],
|
|
102
|
+
"selected": true,
|
|
103
|
+
"class": {
|
|
104
|
+
"link": "text-(--ui-primary)"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"color": "secondary" as typeof color[number],
|
|
109
|
+
"selected": true,
|
|
110
|
+
"class": {
|
|
111
|
+
"link": "text-(--ui-secondary)"
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"color": "success" as typeof color[number],
|
|
116
|
+
"selected": true,
|
|
117
|
+
"class": {
|
|
118
|
+
"link": "text-(--ui-success)"
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"color": "info" as typeof color[number],
|
|
123
|
+
"selected": true,
|
|
124
|
+
"class": {
|
|
125
|
+
"link": "text-(--ui-info)"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"color": "warning" as typeof color[number],
|
|
130
|
+
"selected": true,
|
|
131
|
+
"class": {
|
|
132
|
+
"link": "text-(--ui-warning)"
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"color": "error" as typeof color[number],
|
|
137
|
+
"selected": true,
|
|
138
|
+
"class": {
|
|
139
|
+
"link": "text-(--ui-error)"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"color": "neutral" as typeof color[number],
|
|
144
|
+
"selected": true,
|
|
145
|
+
"class": {
|
|
146
|
+
"link": "text-(--ui-text-highlighted)"
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
],
|
|
150
|
+
"defaultVariants": {
|
|
151
|
+
"color": "primary" as typeof color[number],
|
|
152
|
+
"size": "md" as typeof size[number]
|
|
153
|
+
}
|
|
154
|
+
}
|
package/.nuxt/ui.css
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
@source "./ui";
|
|
2
|
+
|
|
3
|
+
@theme default static {
|
|
4
|
+
--color-old-neutral-50: oklch(0.985 0 0);
|
|
5
|
+
--color-old-neutral-100: oklch(0.97 0 0);
|
|
6
|
+
--color-old-neutral-200: oklch(0.922 0 0);
|
|
7
|
+
--color-old-neutral-300: oklch(0.87 0 0);
|
|
8
|
+
--color-old-neutral-400: oklch(0.708 0 0);
|
|
9
|
+
--color-old-neutral-500: oklch(0.556 0 0);
|
|
10
|
+
--color-old-neutral-600: oklch(0.439 0 0);
|
|
11
|
+
--color-old-neutral-700: oklch(0.371 0 0);
|
|
12
|
+
--color-old-neutral-800: oklch(0.269 0 0);
|
|
13
|
+
--color-old-neutral-900: oklch(0.205 0 0);
|
|
14
|
+
--color-old-neutral-950: oklch(0.145 0 0);
|
|
15
|
+
--color-primary-50: var(--ui-color-primary-50);
|
|
16
|
+
--color-primary-100: var(--ui-color-primary-100);
|
|
17
|
+
--color-primary-200: var(--ui-color-primary-200);
|
|
18
|
+
--color-primary-300: var(--ui-color-primary-300);
|
|
19
|
+
--color-primary-400: var(--ui-color-primary-400);
|
|
20
|
+
--color-primary-500: var(--ui-color-primary-500);
|
|
21
|
+
--color-primary-600: var(--ui-color-primary-600);
|
|
22
|
+
--color-primary-700: var(--ui-color-primary-700);
|
|
23
|
+
--color-primary-800: var(--ui-color-primary-800);
|
|
24
|
+
--color-primary-900: var(--ui-color-primary-900);
|
|
25
|
+
--color-primary-950: var(--ui-color-primary-950);
|
|
26
|
+
--color-secondary-50: var(--ui-color-secondary-50);
|
|
27
|
+
--color-secondary-100: var(--ui-color-secondary-100);
|
|
28
|
+
--color-secondary-200: var(--ui-color-secondary-200);
|
|
29
|
+
--color-secondary-300: var(--ui-color-secondary-300);
|
|
30
|
+
--color-secondary-400: var(--ui-color-secondary-400);
|
|
31
|
+
--color-secondary-500: var(--ui-color-secondary-500);
|
|
32
|
+
--color-secondary-600: var(--ui-color-secondary-600);
|
|
33
|
+
--color-secondary-700: var(--ui-color-secondary-700);
|
|
34
|
+
--color-secondary-800: var(--ui-color-secondary-800);
|
|
35
|
+
--color-secondary-900: var(--ui-color-secondary-900);
|
|
36
|
+
--color-secondary-950: var(--ui-color-secondary-950);
|
|
37
|
+
--color-success-50: var(--ui-color-success-50);
|
|
38
|
+
--color-success-100: var(--ui-color-success-100);
|
|
39
|
+
--color-success-200: var(--ui-color-success-200);
|
|
40
|
+
--color-success-300: var(--ui-color-success-300);
|
|
41
|
+
--color-success-400: var(--ui-color-success-400);
|
|
42
|
+
--color-success-500: var(--ui-color-success-500);
|
|
43
|
+
--color-success-600: var(--ui-color-success-600);
|
|
44
|
+
--color-success-700: var(--ui-color-success-700);
|
|
45
|
+
--color-success-800: var(--ui-color-success-800);
|
|
46
|
+
--color-success-900: var(--ui-color-success-900);
|
|
47
|
+
--color-success-950: var(--ui-color-success-950);
|
|
48
|
+
--color-info-50: var(--ui-color-info-50);
|
|
49
|
+
--color-info-100: var(--ui-color-info-100);
|
|
50
|
+
--color-info-200: var(--ui-color-info-200);
|
|
51
|
+
--color-info-300: var(--ui-color-info-300);
|
|
52
|
+
--color-info-400: var(--ui-color-info-400);
|
|
53
|
+
--color-info-500: var(--ui-color-info-500);
|
|
54
|
+
--color-info-600: var(--ui-color-info-600);
|
|
55
|
+
--color-info-700: var(--ui-color-info-700);
|
|
56
|
+
--color-info-800: var(--ui-color-info-800);
|
|
57
|
+
--color-info-900: var(--ui-color-info-900);
|
|
58
|
+
--color-info-950: var(--ui-color-info-950);
|
|
59
|
+
--color-warning-50: var(--ui-color-warning-50);
|
|
60
|
+
--color-warning-100: var(--ui-color-warning-100);
|
|
61
|
+
--color-warning-200: var(--ui-color-warning-200);
|
|
62
|
+
--color-warning-300: var(--ui-color-warning-300);
|
|
63
|
+
--color-warning-400: var(--ui-color-warning-400);
|
|
64
|
+
--color-warning-500: var(--ui-color-warning-500);
|
|
65
|
+
--color-warning-600: var(--ui-color-warning-600);
|
|
66
|
+
--color-warning-700: var(--ui-color-warning-700);
|
|
67
|
+
--color-warning-800: var(--ui-color-warning-800);
|
|
68
|
+
--color-warning-900: var(--ui-color-warning-900);
|
|
69
|
+
--color-warning-950: var(--ui-color-warning-950);
|
|
70
|
+
--color-error-50: var(--ui-color-error-50);
|
|
71
|
+
--color-error-100: var(--ui-color-error-100);
|
|
72
|
+
--color-error-200: var(--ui-color-error-200);
|
|
73
|
+
--color-error-300: var(--ui-color-error-300);
|
|
74
|
+
--color-error-400: var(--ui-color-error-400);
|
|
75
|
+
--color-error-500: var(--ui-color-error-500);
|
|
76
|
+
--color-error-600: var(--ui-color-error-600);
|
|
77
|
+
--color-error-700: var(--ui-color-error-700);
|
|
78
|
+
--color-error-800: var(--ui-color-error-800);
|
|
79
|
+
--color-error-900: var(--ui-color-error-900);
|
|
80
|
+
--color-error-950: var(--ui-color-error-950);
|
|
81
|
+
--color-neutral-50: var(--ui-color-neutral-50);
|
|
82
|
+
--color-neutral-100: var(--ui-color-neutral-100);
|
|
83
|
+
--color-neutral-200: var(--ui-color-neutral-200);
|
|
84
|
+
--color-neutral-300: var(--ui-color-neutral-300);
|
|
85
|
+
--color-neutral-400: var(--ui-color-neutral-400);
|
|
86
|
+
--color-neutral-500: var(--ui-color-neutral-500);
|
|
87
|
+
--color-neutral-600: var(--ui-color-neutral-600);
|
|
88
|
+
--color-neutral-700: var(--ui-color-neutral-700);
|
|
89
|
+
--color-neutral-800: var(--ui-color-neutral-800);
|
|
90
|
+
--color-neutral-900: var(--ui-color-neutral-900);
|
|
91
|
+
--color-neutral-950: var(--ui-color-neutral-950);
|
|
92
|
+
}
|
package/README.md
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
<picture>
|
|
2
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/91ceab67-89ce-4ef4-8678-4402a92baca5">
|
|
3
|
+
<source media="(prefers-color-scheme: light)" srcset="https://github.com/user-attachments/assets/51526d6d-e5ec-41b4-aa37-242dec1cdb27">
|
|
4
|
+
<img alt="Nuxt UI" src="https://github.com/user-attachments/assets/51526d6d-e5ec-41b4-aa37-242dec1cdb27">
|
|
5
|
+
</picture>
|
|
2
6
|
|
|
3
7
|
# Nuxt UI
|
|
4
8
|
|
|
@@ -7,10 +11,10 @@
|
|
|
7
11
|
[![License][license-src]][license-href]
|
|
8
12
|
[![Nuxt][nuxt-src]][nuxt-href]
|
|
9
13
|
|
|
10
|
-
We're thrilled to introduce Nuxt UI v3, a significant upgrade to our UI library that delivers extensive improvements and robust new capabilities. This major update harnesses the combined strengths of [
|
|
14
|
+
We're thrilled to introduce Nuxt UI v3, a significant upgrade to our UI library that delivers extensive improvements and robust new capabilities. This major update harnesses the combined strengths of [Reka UI](https://reka-ui.com/), [Tailwind CSS v4](https://tailwindcss.com/), and [Tailwind Variants](https://www.tailwind-variants.org/) to offer developers an unparalleled set of tools for creating sophisticated, accessible, and highly performant user interfaces.
|
|
11
15
|
|
|
12
16
|
> [!NOTE]
|
|
13
|
-
> You are on the `v3` development branch, check out the [dev branch](https://github.com/nuxt/ui) for Nuxt UI v2.
|
|
17
|
+
> You are on the `v3` development branch, check out the [dev branch](https://github.com/nuxt/ui/tree/dev) for Nuxt UI v2.
|
|
14
18
|
|
|
15
19
|
## Documentation
|
|
16
20
|
|
|
@@ -47,7 +51,7 @@ export default defineNuxtConfig({
|
|
|
47
51
|
2. Import Tailwind CSS and Nuxt UI in your CSS:
|
|
48
52
|
|
|
49
53
|
```css [assets/css/main.css]
|
|
50
|
-
@import "tailwindcss";
|
|
54
|
+
@import "tailwindcss" theme(static);
|
|
51
55
|
@import "@nuxt/ui";
|
|
52
56
|
```
|
|
53
57
|
|
|
@@ -74,11 +78,18 @@ export default defineConfig({
|
|
|
74
78
|
|
|
75
79
|
```ts [main.ts]
|
|
76
80
|
import { createApp } from 'vue'
|
|
81
|
+
import { createRouter, createWebHistory } from 'vue-router'
|
|
77
82
|
import ui from '@nuxt/ui/vue-plugin'
|
|
78
83
|
import App from './App.vue'
|
|
79
84
|
|
|
80
85
|
const app = createApp(App)
|
|
81
86
|
|
|
87
|
+
const router = createRouter({
|
|
88
|
+
routes: [],
|
|
89
|
+
history: createWebHistory()
|
|
90
|
+
})
|
|
91
|
+
|
|
92
|
+
app.use(router)
|
|
82
93
|
app.use(ui)
|
|
83
94
|
|
|
84
95
|
app.mount('#app')
|
|
@@ -87,7 +98,7 @@ app.mount('#app')
|
|
|
87
98
|
3. Import Tailwind CSS and Nuxt UI in your CSS:
|
|
88
99
|
|
|
89
100
|
```css [assets/main.css]
|
|
90
|
-
@import "tailwindcss";
|
|
101
|
+
@import "tailwindcss" theme(static);
|
|
91
102
|
@import "@nuxt/ui";
|
|
92
103
|
```
|
|
93
104
|
|
|
@@ -99,13 +110,13 @@ Learn more in the [installation guide](https://ui3.nuxt.dev/getting-started/inst
|
|
|
99
110
|
- [nuxt/icon](https://github.com/nuxt/icon)
|
|
100
111
|
- [nuxt/fonts](https://github.com/nuxt/fonts)
|
|
101
112
|
- [nuxt-modules/color-mode](https://github.com/nuxt-modules/color-mode)
|
|
102
|
-
- [
|
|
113
|
+
- [unovue/reka-ui](https://github.com/unovue/reka-ui)
|
|
103
114
|
- [tailwindlabs/tailwindcss](https://github.com/tailwindlabs/tailwindcss)
|
|
104
115
|
- [vueuse/vueuse](https://github.com/vueuse/vueuse)
|
|
105
116
|
|
|
106
117
|
## License
|
|
107
118
|
|
|
108
|
-
Licensed under the [MIT license](https://github.com/nuxt/ui/blob/
|
|
119
|
+
Licensed under the [MIT license](https://github.com/nuxt/ui/blob/v3/LICENSE.md).
|
|
109
120
|
|
|
110
121
|
<!-- Badges -->
|
|
111
122
|
[npm-version-src]: https://img.shields.io/npm/v/@nuxt/ui/next.svg?style=flat&colorA=18181B&colorB=28CF8D
|
|
@@ -115,7 +126,7 @@ Licensed under the [MIT license](https://github.com/nuxt/ui/blob/dev/LICENSE.md)
|
|
|
115
126
|
[npm-downloads-href]: https://npm.chart.dev/@nuxt/ui
|
|
116
127
|
|
|
117
128
|
[license-src]: https://img.shields.io/github/license/nuxt/ui.svg?style=flat&colorA=18181B&colorB=28CF8D
|
|
118
|
-
[license-href]: https://github.com/nuxt/ui/blob/
|
|
129
|
+
[license-href]: https://github.com/nuxt/ui/blob/v3/LICENSE.md
|
|
119
130
|
|
|
120
131
|
[nuxt-src]: https://img.shields.io/badge/Nuxt-18181B?logo=nuxt.js
|
|
121
132
|
[nuxt-href]: https://nuxt.com
|
|
@@ -32,6 +32,10 @@ export default defineCommand({
|
|
|
32
32
|
content: {
|
|
33
33
|
type: 'boolean',
|
|
34
34
|
description: 'Create a content component (with --pro).'
|
|
35
|
+
},
|
|
36
|
+
template: {
|
|
37
|
+
type: 'string',
|
|
38
|
+
description: 'Only generate template.'
|
|
35
39
|
}
|
|
36
40
|
},
|
|
37
41
|
async setup({ args }) {
|
|
@@ -53,6 +57,10 @@ export default defineCommand({
|
|
|
53
57
|
const path = resolve('.')
|
|
54
58
|
|
|
55
59
|
for (const template of Object.keys(templates)) {
|
|
60
|
+
if (args.template && template !== args.template) {
|
|
61
|
+
continue
|
|
62
|
+
}
|
|
63
|
+
|
|
56
64
|
const { filename, contents } = templates[template](args)
|
|
57
65
|
if (!contents) {
|
|
58
66
|
continue
|
|
@@ -70,6 +78,10 @@ export default defineCommand({
|
|
|
70
78
|
consola.success(`🪄 Generated ${filePath}!`)
|
|
71
79
|
}
|
|
72
80
|
|
|
81
|
+
if (args.template) {
|
|
82
|
+
return
|
|
83
|
+
}
|
|
84
|
+
|
|
73
85
|
const themePath = resolve(path, `src/theme/${args.prose ? 'prose/' : ''}${args.content ? 'content/' : ''}index.ts`)
|
|
74
86
|
await appendFile(themePath, `export { default as ${camelCase(name)} } from './${kebabCase(name)}'`)
|
|
75
87
|
await sortFile(themePath)
|