@nuxt/ui 3.0.0-alpha.9 → 3.0.0-beta.2
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 +29 -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 +71 -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
|
@@ -6,11 +6,13 @@ export * from '../components/AvatarGroup.vue';
|
|
|
6
6
|
export * from '../components/Badge.vue';
|
|
7
7
|
export * from '../components/Breadcrumb.vue';
|
|
8
8
|
export * from '../components/Button.vue';
|
|
9
|
+
export * from '../components/Calendar.vue';
|
|
9
10
|
export * from '../components/Card.vue';
|
|
10
11
|
export * from '../components/Carousel.vue';
|
|
11
12
|
export * from '../components/Checkbox.vue';
|
|
12
13
|
export * from '../components/Chip.vue';
|
|
13
14
|
export * from '../components/Collapsible.vue';
|
|
15
|
+
export * from '../components/ColorPicker.vue';
|
|
14
16
|
export * from '../components/CommandPalette.vue';
|
|
15
17
|
export * from '../components/Container.vue';
|
|
16
18
|
export * from '../components/ContextMenu.vue';
|
|
@@ -36,6 +38,7 @@ export * from '../components/Separator.vue';
|
|
|
36
38
|
export * from '../components/Skeleton.vue';
|
|
37
39
|
export * from '../components/Slideover.vue';
|
|
38
40
|
export * from '../components/Slider.vue';
|
|
41
|
+
export * from '../components/Stepper.vue';
|
|
39
42
|
export * from '../components/Switch.vue';
|
|
40
43
|
export * from '../components/Table.vue';
|
|
41
44
|
export * from '../components/Tabs.vue';
|
|
@@ -43,5 +46,7 @@ export * from '../components/Textarea.vue';
|
|
|
43
46
|
export * from '../components/Toast.vue';
|
|
44
47
|
export * from '../components/Toaster.vue';
|
|
45
48
|
export * from '../components/Tooltip.vue';
|
|
49
|
+
export * from '../components/Tree.vue';
|
|
46
50
|
export * from './form';
|
|
47
51
|
export * from './locale';
|
|
52
|
+
export * from './utils';
|
|
@@ -6,11 +6,13 @@ export * from "../components/AvatarGroup.vue";
|
|
|
6
6
|
export * from "../components/Badge.vue";
|
|
7
7
|
export * from "../components/Breadcrumb.vue";
|
|
8
8
|
export * from "../components/Button.vue";
|
|
9
|
+
export * from "../components/Calendar.vue";
|
|
9
10
|
export * from "../components/Card.vue";
|
|
10
11
|
export * from "../components/Carousel.vue";
|
|
11
12
|
export * from "../components/Checkbox.vue";
|
|
12
13
|
export * from "../components/Chip.vue";
|
|
13
14
|
export * from "../components/Collapsible.vue";
|
|
15
|
+
export * from "../components/ColorPicker.vue";
|
|
14
16
|
export * from "../components/CommandPalette.vue";
|
|
15
17
|
export * from "../components/Container.vue";
|
|
16
18
|
export * from "../components/ContextMenu.vue";
|
|
@@ -36,6 +38,7 @@ export * from "../components/Separator.vue";
|
|
|
36
38
|
export * from "../components/Skeleton.vue";
|
|
37
39
|
export * from "../components/Slideover.vue";
|
|
38
40
|
export * from "../components/Slider.vue";
|
|
41
|
+
export * from "../components/Stepper.vue";
|
|
39
42
|
export * from "../components/Switch.vue";
|
|
40
43
|
export * from "../components/Table.vue";
|
|
41
44
|
export * from "../components/Tabs.vue";
|
|
@@ -43,5 +46,7 @@ export * from "../components/Textarea.vue";
|
|
|
43
46
|
export * from "../components/Toast.vue";
|
|
44
47
|
export * from "../components/Toaster.vue";
|
|
45
48
|
export * from "../components/Tooltip.vue";
|
|
49
|
+
export * from "../components/Tree.vue";
|
|
46
50
|
export * from "./form.js";
|
|
47
51
|
export * from "./locale.js";
|
|
52
|
+
export * from "./utils.js";
|
|
@@ -4,11 +4,18 @@ export type Messages = {
|
|
|
4
4
|
noData: string;
|
|
5
5
|
create: string;
|
|
6
6
|
};
|
|
7
|
+
calendar: {
|
|
8
|
+
prevYear: string;
|
|
9
|
+
nextYear: string;
|
|
10
|
+
prevMonth: string;
|
|
11
|
+
nextMonth: string;
|
|
12
|
+
};
|
|
7
13
|
inputNumber: {
|
|
8
14
|
increment: string;
|
|
9
15
|
decrement: string;
|
|
10
16
|
};
|
|
11
17
|
commandPalette: {
|
|
18
|
+
placeholder: string;
|
|
12
19
|
noMatch: string;
|
|
13
20
|
noData: string;
|
|
14
21
|
close: string;
|
|
@@ -17,6 +24,7 @@ export type Messages = {
|
|
|
17
24
|
noMatch: string;
|
|
18
25
|
noData: string;
|
|
19
26
|
create: string;
|
|
27
|
+
search: string;
|
|
20
28
|
};
|
|
21
29
|
toast: {
|
|
22
30
|
close: string;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type { VNode } from 'vue';
|
|
1
2
|
export interface TightMap<O = any> {
|
|
2
3
|
[key: string]: TightMap | O;
|
|
3
4
|
}
|
|
4
5
|
export type DeepPartial<T, O = any> = {
|
|
5
|
-
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P], O> : T[P];
|
|
6
|
+
[P in keyof T]?: T[P] extends Array<string> ? string : T[P] extends object ? DeepPartial<T[P], O> : T[P];
|
|
6
7
|
} & {
|
|
7
8
|
[key: string]: O | TightMap<O>;
|
|
8
9
|
};
|
|
@@ -10,8 +11,6 @@ export type DynamicSlots<T extends {
|
|
|
10
11
|
slot?: string;
|
|
11
12
|
}, SlotProps, Slot = T['slot']> = Record<string, SlotProps> & (Slot extends string ? Record<Slot, SlotProps> : Record<string, never>);
|
|
12
13
|
export type GetObjectField<MaybeObject, Key extends string> = MaybeObject extends Record<string, any> ? MaybeObject[Key] : never;
|
|
13
|
-
export type AcceptableValue = string | number | boolean | Record<string, any>;
|
|
14
|
-
export type ArrayOrWrapped<T> = T extends any[] ? T : Array<T>;
|
|
15
14
|
export type PartialString<T> = {
|
|
16
15
|
[K in keyof T]?: string;
|
|
17
16
|
};
|
|
@@ -22,3 +21,8 @@ export type SelectItemKey<T> = T extends Record<string, any> ? keyof T : string;
|
|
|
22
21
|
export type SelectModelValueEmits<T, V, M extends boolean = false, DV = T> = {
|
|
23
22
|
'update:modelValue': [payload: SelectModelValue<T, V, M, DV>];
|
|
24
23
|
};
|
|
24
|
+
export type MaybeMultipleModelValue<T, M extends boolean = false> = (T extends infer U ? M extends true ? U[] : U : never);
|
|
25
|
+
export type StringOrVNode = string | VNode | (() => VNode);
|
|
26
|
+
export type EmitsToProps<T> = {
|
|
27
|
+
[K in keyof T as `on${Capitalize<string & K>}`]: T[K] extends [...args: infer Args] ? (...args: Args) => void : never;
|
|
28
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { StandardSchemaV1 } from '@standard-schema/spec';
|
|
2
2
|
import type { ZodSchema } from 'zod';
|
|
3
3
|
import type { ValidationError as JoiError, Schema as JoiSchema } from 'joi';
|
|
4
4
|
import type { ObjectSchema as YupObjectSchema, ValidationError as YupError } from 'yup';
|
|
@@ -12,6 +12,6 @@ export declare function isZodSchema(schema: any): schema is ZodSchema;
|
|
|
12
12
|
export declare function isJoiSchema(schema: any): schema is JoiSchema;
|
|
13
13
|
export declare function isJoiError(error: any): error is JoiError;
|
|
14
14
|
export declare function isValibotSchema(schema: any): schema is ValibotSchema | ValibotSchemaAsync | ValibotSafeParser<any, any> | ValibotSafeParserAsync<any, any>;
|
|
15
|
-
export declare function isStandardSchema(schema: any): schema is
|
|
16
|
-
export declare function
|
|
17
|
-
export declare function
|
|
15
|
+
export declare function isStandardSchema(schema: any): schema is StandardSchemaV1;
|
|
16
|
+
export declare function validateStandardSchema(state: any, schema: StandardSchemaV1): Promise<ValidateReturnSchema<typeof state>>;
|
|
17
|
+
export declare function validateSchema<T extends object>(state: T, schema: FormSchema<T>): Promise<ValidateReturnSchema<typeof state>>;
|
|
@@ -22,10 +22,8 @@ export function isValibotSchema(schema) {
|
|
|
22
22
|
export function isStandardSchema(schema) {
|
|
23
23
|
return "~standard" in schema;
|
|
24
24
|
}
|
|
25
|
-
export async function
|
|
26
|
-
const result = await schema["~standard"].validate(
|
|
27
|
-
value: state
|
|
28
|
-
});
|
|
25
|
+
export async function validateStandardSchema(state, schema) {
|
|
26
|
+
const result = await schema["~standard"].validate(state);
|
|
29
27
|
if (result.issues) {
|
|
30
28
|
return {
|
|
31
29
|
errors: result.issues?.map((issue) => ({
|
|
@@ -42,7 +40,7 @@ export async function validateStandarSchema(state, schema) {
|
|
|
42
40
|
}
|
|
43
41
|
async function validateYupSchema(state, schema) {
|
|
44
42
|
try {
|
|
45
|
-
const result = schema.
|
|
43
|
+
const result = await schema.validate(state, { abortEarly: false });
|
|
46
44
|
return {
|
|
47
45
|
errors: null,
|
|
48
46
|
result
|
|
@@ -136,19 +134,19 @@ async function validateValibotSchema(state, schema) {
|
|
|
136
134
|
result: null
|
|
137
135
|
};
|
|
138
136
|
}
|
|
139
|
-
export function
|
|
137
|
+
export function validateSchema(state, schema) {
|
|
140
138
|
if (isZodSchema(schema)) {
|
|
141
139
|
return validateZodSchema(state, schema);
|
|
142
140
|
} else if (isJoiSchema(schema)) {
|
|
143
141
|
return validateJoiSchema(state, schema);
|
|
142
|
+
} else if (isStandardSchema(schema)) {
|
|
143
|
+
return validateStandardSchema(state, schema);
|
|
144
144
|
} else if (isValibotSchema(schema)) {
|
|
145
145
|
return validateValibotSchema(state, schema);
|
|
146
146
|
} else if (isYupSchema(schema)) {
|
|
147
147
|
return validateYupSchema(state, schema);
|
|
148
148
|
} else if (isSuperStructSchema(schema)) {
|
|
149
149
|
return validateSuperstructSchema(state, schema);
|
|
150
|
-
} else if (isStandardSchema(schema)) {
|
|
151
|
-
return validateStandarSchema(state, schema);
|
|
152
150
|
} else {
|
|
153
151
|
throw new Error("Form validation failed: Unsupported form schema");
|
|
154
152
|
}
|
|
@@ -3,4 +3,4 @@ export declare function omit<Data extends object, Keys extends keyof Data>(data:
|
|
|
3
3
|
export declare function get(object: Record<string, any> | undefined, path: (string | number)[] | string, defaultValue?: any): any;
|
|
4
4
|
export declare function set(object: Record<string, any>, path: (string | number)[] | string, value: any): void;
|
|
5
5
|
export declare function looseToNumber(val: any): any;
|
|
6
|
-
export declare function
|
|
6
|
+
export declare function compare<T>(value?: T, currentValue?: T, comparator?: string | ((a: T, b: T) => boolean)): boolean;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isEqual } from "ohash";
|
|
1
2
|
export function pick(data, keys) {
|
|
2
3
|
const result = {};
|
|
3
4
|
for (const key of keys) {
|
|
@@ -45,6 +46,18 @@ export function looseToNumber(val) {
|
|
|
45
46
|
const n = Number.parseFloat(val);
|
|
46
47
|
return Number.isNaN(n) ? val : n;
|
|
47
48
|
}
|
|
48
|
-
export function
|
|
49
|
-
|
|
49
|
+
export function compare(value, currentValue, comparator) {
|
|
50
|
+
if (value === void 0 || currentValue === void 0) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
if (typeof value === "string") {
|
|
54
|
+
return value === currentValue;
|
|
55
|
+
}
|
|
56
|
+
if (typeof comparator === "function") {
|
|
57
|
+
return comparator(value, currentValue);
|
|
58
|
+
}
|
|
59
|
+
if (typeof comparator === "string") {
|
|
60
|
+
return get(value, comparator) === get(currentValue, comparator);
|
|
61
|
+
}
|
|
62
|
+
return isEqual(value, currentValue);
|
|
50
63
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const tv: import("tailwind-variants").CreateTV<boolean | (string | number | symbol)[] | {} | undefined>;
|
|
@@ -5,11 +5,11 @@ export interface IconProps {
|
|
|
5
5
|
</script>
|
|
6
6
|
|
|
7
7
|
<script setup lang="ts">
|
|
8
|
-
import { Icon } from '@iconify/vue'
|
|
8
|
+
import { Icon as IconifyIcon } from '@iconify/vue'
|
|
9
9
|
|
|
10
10
|
defineProps<IconProps>()
|
|
11
11
|
</script>
|
|
12
12
|
|
|
13
13
|
<template>
|
|
14
|
-
<
|
|
14
|
+
<IconifyIcon :icon="name.replace(/^i-/, '')" />
|
|
15
15
|
</template>
|
|
@@ -52,9 +52,9 @@ interface NuxtLinkProps extends Omit<RouterLinkProps, 'to'> {
|
|
|
52
52
|
noPrefetch?: boolean
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
const
|
|
55
|
+
const appConfigLink = _appConfig as AppConfig & { ui: { link: Partial<typeof theme> } }
|
|
56
56
|
|
|
57
|
-
const link = tv({ extend: tv(theme), ...(
|
|
57
|
+
const link = tv({ extend: tv(theme), ...(appConfigLink.ui?.link || {}) })
|
|
58
58
|
|
|
59
59
|
export interface LinkProps extends NuxtLinkProps {
|
|
60
60
|
/**
|
|
@@ -73,7 +73,7 @@ export interface LinkProps extends NuxtLinkProps {
|
|
|
73
73
|
/** Will only be active if the current route is an exact match. */
|
|
74
74
|
exact?: boolean
|
|
75
75
|
/** Will only be active if the current route query is an exact match. */
|
|
76
|
-
exactQuery?: boolean
|
|
76
|
+
exactQuery?: boolean | 'partial'
|
|
77
77
|
/** Will only be active if the current route hash is an exact match. */
|
|
78
78
|
exactHash?: boolean
|
|
79
79
|
/** The class to apply when the link is inactive. */
|
|
@@ -90,9 +90,9 @@ export interface LinkSlots {
|
|
|
90
90
|
</script>
|
|
91
91
|
|
|
92
92
|
<script setup lang="ts">
|
|
93
|
-
import { computed } from 'vue'
|
|
94
|
-
import { isEqual } from 'ohash'
|
|
95
|
-
import { useForwardProps } from '
|
|
93
|
+
import { computed, getCurrentInstance } from 'vue'
|
|
94
|
+
import { isEqual, diff } from 'ohash'
|
|
95
|
+
import { useForwardProps } from 'reka-ui'
|
|
96
96
|
import { reactiveOmit } from '@vueuse/core'
|
|
97
97
|
import { hasProtocol } from 'ufo'
|
|
98
98
|
import { useRoute } from '#imports'
|
|
@@ -109,8 +109,23 @@ const props = withDefaults(defineProps<LinkProps>(), {
|
|
|
109
109
|
})
|
|
110
110
|
defineSlots<LinkSlots>()
|
|
111
111
|
|
|
112
|
-
|
|
113
|
-
const
|
|
112
|
+
// Check if vue-router is available by checking for the injection key
|
|
113
|
+
const hasRouter = computed(() => {
|
|
114
|
+
const app = getCurrentInstance()?.appContext.app
|
|
115
|
+
return !!(app?.config?.globalProperties?.$router)
|
|
116
|
+
})
|
|
117
|
+
|
|
118
|
+
// Only try to get route if router exists
|
|
119
|
+
const route = computed(() => {
|
|
120
|
+
if (!hasRouter.value) return null
|
|
121
|
+
try {
|
|
122
|
+
return useRoute()
|
|
123
|
+
} catch {
|
|
124
|
+
return null
|
|
125
|
+
}
|
|
126
|
+
})
|
|
127
|
+
|
|
128
|
+
const routerLinkProps = useForwardProps(reactiveOmit(props, 'as', 'type', 'disabled', 'active', 'exact', 'exactQuery', 'exactHash', 'activeClass', 'inactiveClass', 'to', 'raw', 'class'))
|
|
114
129
|
|
|
115
130
|
const ui = computed(() => tv({
|
|
116
131
|
extend: link,
|
|
@@ -122,21 +137,37 @@ const ui = computed(() => tv({
|
|
|
122
137
|
}
|
|
123
138
|
}))
|
|
124
139
|
|
|
125
|
-
|
|
140
|
+
function isPartiallyEqual(item1: any, item2: any) {
|
|
141
|
+
const diffedKeys = diff(item1, item2).reduce((filtered, q) => {
|
|
142
|
+
if (q.type === 'added') {
|
|
143
|
+
filtered.push(q.key)
|
|
144
|
+
}
|
|
145
|
+
return filtered
|
|
146
|
+
}, [] as string[])
|
|
147
|
+
return isEqual(item1, item2, { excludeKeys: key => diffedKeys.includes(key) })
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
const isExternal = computed(() => {
|
|
151
|
+
if (!props.to) return false
|
|
152
|
+
return typeof props.to === 'string' && hasProtocol(props.to, { acceptRelative: true })
|
|
153
|
+
})
|
|
126
154
|
|
|
127
155
|
function isLinkActive({ route: linkRoute, isActive, isExactActive }: any) {
|
|
128
156
|
if (props.active !== undefined) {
|
|
129
157
|
return props.active
|
|
130
158
|
}
|
|
131
159
|
|
|
132
|
-
if (!props.to) {
|
|
160
|
+
if (!props.to || !route.value) {
|
|
133
161
|
return false
|
|
134
162
|
}
|
|
135
163
|
|
|
136
|
-
if (props.exactQuery
|
|
137
|
-
return false
|
|
164
|
+
if (props.exactQuery === 'partial') {
|
|
165
|
+
if (!isPartiallyEqual(linkRoute.query, route.value.query)) return false
|
|
166
|
+
} else if (props.exactQuery === true) {
|
|
167
|
+
if (!isEqual(linkRoute.query, route.value.query)) return false
|
|
138
168
|
}
|
|
139
|
-
|
|
169
|
+
|
|
170
|
+
if (props.exactHash && linkRoute.hash !== route.value.hash) {
|
|
140
171
|
return false
|
|
141
172
|
}
|
|
142
173
|
|
|
@@ -151,7 +182,7 @@ function isLinkActive({ route: linkRoute, isActive, isExactActive }: any) {
|
|
|
151
182
|
return false
|
|
152
183
|
}
|
|
153
184
|
|
|
154
|
-
function resolveLinkClass({ route, isActive, isExactActive }: any) {
|
|
185
|
+
function resolveLinkClass({ route, isActive, isExactActive }: any = {}) {
|
|
155
186
|
const active = isLinkActive({ route, isActive, isExactActive })
|
|
156
187
|
|
|
157
188
|
if (props.raw) {
|
|
@@ -163,7 +194,39 @@ function resolveLinkClass({ route, isActive, isExactActive }: any) {
|
|
|
163
194
|
</script>
|
|
164
195
|
|
|
165
196
|
<template>
|
|
166
|
-
<
|
|
197
|
+
<template v-if="hasRouter && !isExternal">
|
|
198
|
+
<RouterLink v-slot="{ href, navigate, route: linkRoute, isActive, isExactActive }" v-bind="routerLinkProps" :to="to || '#'" custom>
|
|
199
|
+
<template v-if="custom">
|
|
200
|
+
<slot
|
|
201
|
+
v-bind="{
|
|
202
|
+
...$attrs,
|
|
203
|
+
as,
|
|
204
|
+
type,
|
|
205
|
+
disabled,
|
|
206
|
+
href: to ? href : undefined,
|
|
207
|
+
navigate,
|
|
208
|
+
active: isLinkActive({ route: linkRoute, isActive, isExactActive })
|
|
209
|
+
}"
|
|
210
|
+
/>
|
|
211
|
+
</template>
|
|
212
|
+
<ULinkBase
|
|
213
|
+
v-else
|
|
214
|
+
v-bind="{
|
|
215
|
+
...$attrs,
|
|
216
|
+
as,
|
|
217
|
+
type,
|
|
218
|
+
disabled,
|
|
219
|
+
href: to ? href : undefined,
|
|
220
|
+
navigate
|
|
221
|
+
}"
|
|
222
|
+
:class="resolveLinkClass({ route: linkRoute, isActive, isExactActive })"
|
|
223
|
+
>
|
|
224
|
+
<slot :active="isLinkActive({ route: linkRoute, isActive, isExactActive })" />
|
|
225
|
+
</ULinkBase>
|
|
226
|
+
</RouterLink>
|
|
227
|
+
</template>
|
|
228
|
+
|
|
229
|
+
<template v-else>
|
|
167
230
|
<template v-if="custom">
|
|
168
231
|
<slot
|
|
169
232
|
v-bind="{
|
|
@@ -171,9 +234,9 @@ function resolveLinkClass({ route, isActive, isExactActive }: any) {
|
|
|
171
234
|
as,
|
|
172
235
|
type,
|
|
173
236
|
disabled,
|
|
174
|
-
href: to
|
|
175
|
-
|
|
176
|
-
active:
|
|
237
|
+
href: to,
|
|
238
|
+
target: isExternal ? '_blank' : undefined,
|
|
239
|
+
active: false
|
|
177
240
|
}"
|
|
178
241
|
/>
|
|
179
242
|
</template>
|
|
@@ -184,12 +247,13 @@ function resolveLinkClass({ route, isActive, isExactActive }: any) {
|
|
|
184
247
|
as,
|
|
185
248
|
type,
|
|
186
249
|
disabled,
|
|
187
|
-
href:
|
|
188
|
-
|
|
250
|
+
href: (to as string),
|
|
251
|
+
target: isExternal ? '_blank' : undefined
|
|
189
252
|
}"
|
|
190
|
-
:
|
|
253
|
+
:is-external="isExternal"
|
|
254
|
+
:class="resolveLinkClass()"
|
|
191
255
|
>
|
|
192
|
-
<slot :active="
|
|
256
|
+
<slot :active="false" />
|
|
193
257
|
</ULinkBase>
|
|
194
|
-
</
|
|
258
|
+
</template>
|
|
195
259
|
</template>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useAppConfig: () => any;
|
|
@@ -2,7 +2,26 @@ import type { Ref } from 'vue';
|
|
|
2
2
|
import type { NuxtApp } from '#app';
|
|
3
3
|
export { useHead } from '@unhead/vue';
|
|
4
4
|
export { useRoute, useRouter } from 'vue-router';
|
|
5
|
+
export { defineShortcuts } from '../composables/defineShortcuts';
|
|
6
|
+
export { useLocale } from '../composables/useLocale';
|
|
7
|
+
export declare const useColorMode: () => {
|
|
8
|
+
forced: boolean;
|
|
9
|
+
preference?: undefined;
|
|
10
|
+
readonly value?: undefined;
|
|
11
|
+
} | {
|
|
12
|
+
preference: "system" | "light" | "dark";
|
|
13
|
+
readonly value: import("@vueuse/core").BasicColorMode;
|
|
14
|
+
forced: boolean;
|
|
15
|
+
};
|
|
5
16
|
export declare const useAppConfig: () => any;
|
|
17
|
+
export declare const useCookie: <T = string>(_name: string, _options?: Record<string, any>) => {
|
|
18
|
+
value: Ref<T, T>;
|
|
19
|
+
get: () => T;
|
|
20
|
+
set: () => void;
|
|
21
|
+
update: () => void;
|
|
22
|
+
refresh: () => Promise<Awaited<T>>;
|
|
23
|
+
remove: () => void;
|
|
24
|
+
};
|
|
6
25
|
export declare const useState: <T>(key: string, init: () => T) => Ref<T>;
|
|
7
26
|
export declare function useNuxtApp(): {
|
|
8
27
|
isHydrating: boolean;
|
|
@@ -1,8 +1,45 @@
|
|
|
1
1
|
import { ref } from "vue";
|
|
2
2
|
import appConfig from "#build/app.config";
|
|
3
|
+
import { useColorMode as useColorModeVueUse } from "@vueuse/core";
|
|
3
4
|
export { useHead } from "@unhead/vue";
|
|
4
5
|
export { useRoute, useRouter } from "vue-router";
|
|
6
|
+
export { defineShortcuts } from "../composables/defineShortcuts.js";
|
|
7
|
+
export { useLocale } from "../composables/useLocale.js";
|
|
8
|
+
export const useColorMode = () => {
|
|
9
|
+
if (!appConfig.colorMode) {
|
|
10
|
+
return {
|
|
11
|
+
forced: true
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
const { store, system } = useColorModeVueUse();
|
|
15
|
+
return {
|
|
16
|
+
get preference() {
|
|
17
|
+
return store.value === "auto" ? "system" : store.value;
|
|
18
|
+
},
|
|
19
|
+
set preference(value) {
|
|
20
|
+
store.value = value === "system" ? "auto" : value;
|
|
21
|
+
},
|
|
22
|
+
get value() {
|
|
23
|
+
return store.value === "auto" ? system.value : store.value;
|
|
24
|
+
},
|
|
25
|
+
forced: false
|
|
26
|
+
};
|
|
27
|
+
};
|
|
5
28
|
export const useAppConfig = () => appConfig;
|
|
29
|
+
export const useCookie = (_name, _options = {}) => {
|
|
30
|
+
const value = ref(null);
|
|
31
|
+
return {
|
|
32
|
+
value,
|
|
33
|
+
get: () => value.value,
|
|
34
|
+
set: () => {
|
|
35
|
+
},
|
|
36
|
+
update: () => {
|
|
37
|
+
},
|
|
38
|
+
refresh: () => Promise.resolve(value.value),
|
|
39
|
+
remove: () => {
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
};
|
|
6
43
|
const state = {};
|
|
7
44
|
export const useState = (key, init) => {
|
|
8
45
|
if (state[key]) {
|