@nuxt/ui 3.0.0-alpha.1 → 3.0.0-alpha.11
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 +20 -0
- package/.nuxt/ui/alert.ts +259 -0
- package/.nuxt/ui/avatar-group.ts +52 -0
- package/.nuxt/ui/avatar.ts +54 -0
- package/.nuxt/ui/badge.ts +231 -0
- package/.nuxt/ui/breadcrumb.ts +45 -0
- package/.nuxt/ui/button-group.ts +29 -0
- package/.nuxt/ui/button.ts +376 -0
- package/.nuxt/ui/calendar.ts +103 -0
- package/.nuxt/ui/card.ts +8 -0
- package/.nuxt/ui/carousel.ts +43 -0
- package/.nuxt/ui/checkbox.ts +123 -0
- package/.nuxt/ui/chip.ts +96 -0
- package/.nuxt/ui/collapsible.ts +6 -0
- package/.nuxt/ui/color-picker.ts +47 -0
- package/.nuxt/ui/command-palette.ts +50 -0
- package/.nuxt/ui/container.ts +3 -0
- package/.nuxt/ui/context-menu.ts +216 -0
- package/.nuxt/ui/drawer.ts +62 -0
- package/.nuxt/ui/dropdown-menu.ts +217 -0
- package/.nuxt/ui/form-field.ts +48 -0
- package/.nuxt/ui/form.ts +3 -0
- package/.nuxt/ui/index.ts +48 -0
- package/.nuxt/ui/input-menu.ts +445 -0
- package/.nuxt/ui/input-number.ts +235 -0
- package/.nuxt/ui/input.ts +298 -0
- package/.nuxt/ui/kbd.ts +31 -0
- package/.nuxt/ui/link.ts +15 -0
- package/.nuxt/ui/modal.ts +28 -0
- package/.nuxt/ui/navigation-menu.ts +436 -0
- package/.nuxt/ui/pagination.ts +8 -0
- package/.nuxt/ui/pin-input.ts +171 -0
- package/.nuxt/ui/popover.ts +6 -0
- package/.nuxt/ui/progress.ts +297 -0
- package/.nuxt/ui/radio-group.ts +135 -0
- package/.nuxt/ui/select-menu.ts +351 -0
- package/.nuxt/ui/select.ts +350 -0
- package/.nuxt/ui/separator.ts +172 -0
- package/.nuxt/ui/skeleton.ts +3 -0
- package/.nuxt/ui/slideover.ts +70 -0
- package/.nuxt/ui/slider.ts +171 -0
- package/.nuxt/ui/stepper.ts +202 -0
- package/.nuxt/ui/switch.ts +131 -0
- package/.nuxt/ui/table.ts +146 -0
- package/.nuxt/ui/tabs.ts +255 -0
- package/.nuxt/ui/textarea.ts +298 -0
- package/.nuxt/ui/toast.ts +76 -0
- package/.nuxt/ui/toaster.ts +91 -0
- package/.nuxt/ui/tooltip.ts +9 -0
- package/README.md +82 -54
- package/cli/commands/{init.mjs → make/component.mjs} +17 -5
- package/cli/commands/make/index.mjs +14 -0
- package/cli/commands/make/locale.mjs +64 -0
- package/cli/index.mjs +2 -2
- package/cli/package.json +2 -2
- package/cli/templates.mjs +60 -10
- package/cli/utils.mjs +14 -0
- package/dist/chunks/component-meta.cjs +82802 -0
- package/dist/chunks/component-meta.mjs +82800 -0
- package/dist/client/devtools/200.html +1 -0
- package/dist/client/devtools/404.html +1 -0
- 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/CQ-XZFu7.js +54 -0
- package/dist/client/devtools/_nuxt/DNZFyo26.js +1 -0
- package/dist/client/devtools/_nuxt/Dtz-o9GB.js +1 -0
- package/dist/client/devtools/_nuxt/builds/latest.json +1 -0
- package/dist/client/devtools/_nuxt/builds/meta/1f5fbd7b-9d97-480e-9ae4-e02b4ff7018b.json +1 -0
- package/dist/client/devtools/_nuxt/entry.qOdop8tq.css +1 -0
- package/dist/client/devtools/_nuxt/error-404.D-rS9BDk.css +1 -0
- package/dist/client/devtools/_nuxt/error-500.CfcCHs91.css +1 -0
- package/dist/client/devtools/favicon.svg +1 -0
- package/dist/client/devtools/index.html +1 -0
- package/dist/devtools/runtime/DevtoolsRenderer.vue +54 -0
- package/dist/devtools/runtime/examples/AvatarGroupExample.vue +7 -0
- package/dist/devtools/runtime/examples/ButtonGroupExample.vue +8 -0
- package/dist/devtools/runtime/examples/CardExample.vue +13 -0
- package/dist/devtools/runtime/examples/CarouselExample.vue +13 -0
- package/dist/devtools/runtime/examples/ChipExample.vue +5 -0
- package/dist/devtools/runtime/examples/CollapsibleExample.vue +8 -0
- package/dist/devtools/runtime/examples/CommandPaletteExample.vue +29 -0
- package/dist/devtools/runtime/examples/ContainerExample.vue +5 -0
- package/dist/devtools/runtime/examples/ContextMenuExample.vue +5 -0
- package/dist/devtools/runtime/examples/DrawerExample.vue +8 -0
- package/dist/devtools/runtime/examples/DropdownMenuExample.vue +5 -0
- package/dist/devtools/runtime/examples/FormExample.vue +30 -0
- package/dist/devtools/runtime/examples/FormFieldExample.vue +5 -0
- package/dist/devtools/runtime/examples/LinkExample.vue +5 -0
- package/dist/devtools/runtime/examples/ModalExample.vue +8 -0
- package/dist/devtools/runtime/examples/PopoverExample.vue +8 -0
- package/dist/devtools/runtime/examples/SkeletonExample.vue +3 -0
- package/dist/devtools/runtime/examples/SlideoverExample.vue +8 -0
- package/dist/devtools/runtime/examples/StepperExample.vue +44 -0
- package/dist/devtools/runtime/examples/ToasterExample.vue +11 -0
- package/dist/devtools/runtime/examples/TooltipExample.vue +5 -0
- package/dist/module.cjs +223 -4
- package/dist/module.d.cts +54 -0
- package/dist/module.d.mts +38 -7
- package/dist/module.d.ts +38 -7
- package/dist/module.json +2 -1
- package/dist/module.mjs +179 -2568
- package/dist/runtime/components/Accordion.vue +51 -9
- package/dist/runtime/components/Alert.vue +16 -8
- package/dist/runtime/components/App.vue +20 -7
- package/dist/runtime/components/Avatar.vue +36 -11
- package/dist/runtime/components/AvatarGroup.vue +6 -2
- package/dist/runtime/components/Badge.vue +36 -5
- package/dist/runtime/components/Breadcrumb.vue +53 -14
- package/dist/runtime/components/Button.vue +47 -7
- package/dist/runtime/components/ButtonGroup.vue +7 -3
- package/dist/runtime/components/Calendar.vue +191 -0
- package/dist/runtime/components/Card.vue +5 -2
- package/dist/runtime/components/Carousel.vue +323 -0
- package/dist/runtime/components/Checkbox.vue +30 -34
- package/dist/runtime/components/Chip.vue +12 -4
- package/dist/runtime/components/Collapsible.vue +11 -6
- package/dist/runtime/components/ColorPicker.vue +266 -0
- package/dist/runtime/components/CommandPalette.vue +132 -99
- package/dist/runtime/components/Container.vue +5 -2
- package/dist/runtime/components/ContextMenu.vue +103 -15
- package/dist/runtime/components/ContextMenuContent.vue +49 -19
- package/dist/runtime/components/Drawer.vue +28 -12
- package/dist/runtime/components/DropdownMenu.vue +93 -17
- package/dist/runtime/components/DropdownMenuContent.vue +51 -19
- package/dist/runtime/components/Form.vue +59 -41
- package/dist/runtime/components/FormField.vue +20 -7
- package/dist/runtime/components/Icon.vue +1 -1
- package/dist/runtime/components/Input.vue +18 -8
- package/dist/runtime/components/InputMenu.vue +164 -66
- package/dist/runtime/components/InputNumber.vue +193 -0
- package/dist/runtime/components/Kbd.vue +5 -2
- package/dist/runtime/components/Link.vue +72 -9
- package/dist/runtime/components/LinkBase.vue +10 -7
- package/dist/runtime/components/Modal.vue +23 -16
- package/dist/runtime/components/NavigationMenu.vue +178 -78
- package/dist/runtime/components/Pagination.vue +32 -16
- package/dist/runtime/components/PinInput.vue +97 -0
- package/dist/runtime/components/Popover.vue +29 -9
- package/dist/runtime/components/Progress.vue +29 -11
- package/dist/runtime/components/RadioGroup.vue +30 -8
- package/dist/runtime/components/Select.vue +81 -33
- package/dist/runtime/components/SelectMenu.vue +181 -81
- package/dist/runtime/components/Separator.vue +5 -4
- package/dist/runtime/components/Skeleton.vue +5 -2
- package/dist/runtime/components/Slideover.vue +23 -15
- package/dist/runtime/components/Slider.vue +5 -4
- package/dist/runtime/components/Stepper.vue +173 -0
- package/dist/runtime/components/Switch.vue +18 -17
- package/dist/runtime/components/Table.vue +263 -0
- package/dist/runtime/components/Tabs.vue +45 -16
- package/dist/runtime/components/Textarea.vue +12 -5
- package/dist/runtime/components/Toast.vue +15 -6
- package/dist/runtime/components/Toaster.vue +33 -17
- package/dist/runtime/components/Tooltip.vue +10 -7
- package/dist/runtime/composables/defineLocale.d.ts +9 -0
- package/dist/runtime/composables/defineLocale.js +4 -0
- package/dist/runtime/composables/defineShortcuts.d.ts +1 -1
- package/dist/runtime/composables/defineShortcuts.js +3 -9
- package/dist/runtime/composables/extendDevtoolsMeta.d.ts +7 -0
- package/dist/runtime/composables/extendDevtoolsMeta.js +2 -0
- package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
- package/dist/runtime/composables/useButtonGroup.d.ts +2 -2
- package/dist/runtime/composables/useComponentIcons.d.ts +3 -0
- package/dist/runtime/composables/useFormField.d.ts +9 -5
- package/dist/runtime/composables/useFormField.js +8 -4
- package/dist/runtime/composables/useKbd.d.ts +10 -3
- package/dist/runtime/composables/useKbd.js +14 -8
- package/dist/runtime/composables/useLocale.d.ts +4 -0
- package/dist/runtime/composables/useLocale.js +10 -0
- package/dist/runtime/composables/useModal.d.ts +2 -2
- package/dist/runtime/composables/useSlideover.d.ts +2 -2
- package/dist/runtime/composables/useToast.d.ts +2 -2
- package/dist/runtime/index.css +1 -1
- package/dist/runtime/keyframes.css +1 -0
- package/dist/runtime/locale/ar.d.ts +2 -0
- package/dist/runtime/locale/ar.js +55 -0
- package/dist/runtime/locale/cs.d.ts +2 -0
- package/dist/runtime/locale/cs.js +54 -0
- package/dist/runtime/locale/da.d.ts +2 -0
- package/dist/runtime/locale/da.js +54 -0
- package/dist/runtime/locale/de.d.ts +2 -0
- package/dist/runtime/locale/de.js +54 -0
- package/dist/runtime/locale/el.d.ts +2 -0
- package/dist/runtime/locale/el.js +54 -0
- package/dist/runtime/locale/en.d.ts +2 -0
- package/dist/runtime/locale/en.js +54 -0
- package/dist/runtime/locale/es.d.ts +2 -0
- package/dist/runtime/locale/es.js +54 -0
- package/dist/runtime/locale/et.d.ts +2 -0
- package/dist/runtime/locale/et.js +54 -0
- package/dist/runtime/locale/fa_ir.d.ts +2 -0
- package/dist/runtime/locale/fa_ir.js +55 -0
- package/dist/runtime/locale/fi.d.ts +2 -0
- package/dist/runtime/locale/fi.js +54 -0
- package/dist/runtime/locale/fr.d.ts +2 -0
- package/dist/runtime/locale/fr.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 +28 -0
- package/dist/runtime/locale/index.js +28 -0
- package/dist/runtime/locale/it.d.ts +2 -0
- package/dist/runtime/locale/it.js +54 -0
- package/dist/runtime/locale/ja.d.ts +2 -0
- package/dist/runtime/locale/ja.js +54 -0
- package/dist/runtime/locale/ko.d.ts +2 -0
- package/dist/runtime/locale/ko.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.d.ts +2 -0
- package/dist/runtime/locale/pl.js +54 -0
- 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.d.ts +2 -0
- package/dist/runtime/locale/ru.js +54 -0
- 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_hans.d.ts +2 -0
- package/dist/runtime/locale/zh_hans.js +54 -0
- package/dist/runtime/locale/zh_hant.d.ts +2 -0
- package/dist/runtime/locale/zh_hant.js +54 -0
- package/dist/runtime/plugins/colors.js +12 -8
- package/dist/runtime/types/form.d.ts +11 -4
- package/dist/runtime/types/form.js +2 -2
- package/dist/runtime/types/index.d.ts +50 -42
- package/dist/runtime/types/index.js +8 -0
- package/dist/runtime/types/locale.d.ts +56 -0
- package/dist/runtime/types/utils.d.ts +8 -3
- package/dist/runtime/utils/form.d.ts +7 -5
- package/dist/runtime/utils/form.js +117 -28
- package/dist/runtime/utils/index.d.ts +2 -1
- package/dist/runtime/utils/index.js +16 -0
- package/dist/runtime/utils/link.d.ts +5 -3
- package/dist/runtime/utils/link.js +1 -1
- package/dist/runtime/utils/locale.d.ts +15 -0
- package/dist/runtime/utils/locale.js +25 -0
- package/dist/runtime/utils/tv.d.ts +1 -0
- package/dist/runtime/utils/tv.js +4 -0
- package/dist/runtime/vue/components/Icon.vue +15 -0
- package/dist/runtime/vue/components/Link.vue +208 -0
- package/dist/runtime/vue/plugins/color-mode.d.ts +4 -0
- package/dist/runtime/vue/plugins/color-mode.js +6 -0
- package/dist/runtime/vue/plugins/head.d.ts +4 -0
- package/dist/runtime/vue/plugins/head.js +6 -0
- package/dist/runtime/vue/stubs.d.ts +15 -0
- package/dist/runtime/vue/stubs.js +27 -0
- package/dist/shared/ui.BKsd22-Q.mjs +3289 -0
- package/dist/shared/ui.DCjJwb6l.cjs +3296 -0
- package/dist/unplugin.cjs +192 -0
- package/dist/unplugin.d.cts +49 -0
- package/dist/unplugin.d.mts +49 -0
- package/dist/unplugin.d.ts +49 -0
- package/dist/unplugin.mjs +181 -0
- package/dist/vite.cjs +22 -0
- package/dist/vite.d.cts +13 -0
- package/dist/vite.d.mts +13 -0
- package/dist/vite.d.ts +13 -0
- package/dist/vite.mjs +20 -0
- package/package.json +107 -35
- package/vue-plugin.d.ts +5 -0
- package/cli/node_modules/.ignored/citty/LICENSE +0 -36
- package/cli/node_modules/.ignored/citty/README.md +0 -134
- package/cli/node_modules/.ignored/citty/dist/index.cjs +0 -475
- package/cli/node_modules/.ignored/citty/dist/index.d.cts +0 -80
- package/cli/node_modules/.ignored/citty/dist/index.d.mts +0 -80
- package/cli/node_modules/.ignored/citty/dist/index.d.ts +0 -80
- package/cli/node_modules/.ignored/citty/dist/index.mjs +0 -463
- package/cli/node_modules/.ignored/citty/package.json +0 -49
- package/cli/node_modules/.ignored/consola/LICENSE +0 -47
- package/cli/node_modules/.ignored/consola/README.md +0 -318
- package/cli/node_modules/.ignored/consola/core.d.ts +0 -1
- package/cli/node_modules/.ignored/consola/dist/basic.cjs +0 -32
- package/cli/node_modules/.ignored/consola/dist/basic.d.ts +0 -9
- package/cli/node_modules/.ignored/consola/dist/basic.mjs +0 -24
- package/cli/node_modules/.ignored/consola/dist/browser.cjs +0 -80
- package/cli/node_modules/.ignored/consola/dist/browser.d.ts +0 -7
- package/cli/node_modules/.ignored/consola/dist/browser.mjs +0 -72
- package/cli/node_modules/.ignored/consola/dist/chunks/prompt.cjs +0 -436
- package/cli/node_modules/.ignored/consola/dist/chunks/prompt.mjs +0 -429
- package/cli/node_modules/.ignored/consola/dist/core.cjs +0 -415
- package/cli/node_modules/.ignored/consola/dist/core.d.ts +0 -124
- package/cli/node_modules/.ignored/consola/dist/core.mjs +0 -410
- package/cli/node_modules/.ignored/consola/dist/index.cjs +0 -21
- package/cli/node_modules/.ignored/consola/dist/index.d.ts +0 -9
- package/cli/node_modules/.ignored/consola/dist/index.mjs +0 -8
- package/cli/node_modules/.ignored/consola/dist/shared/consola.06ad8a64.mjs +0 -62
- package/cli/node_modules/.ignored/consola/dist/shared/consola.36c0034f.mjs +0 -636
- package/cli/node_modules/.ignored/consola/dist/shared/consola.4bbae468.cjs +0 -645
- package/cli/node_modules/.ignored/consola/dist/shared/consola.deac7d5a.cjs +0 -65
- package/cli/node_modules/.ignored/consola/dist/utils.cjs +0 -308
- package/cli/node_modules/.ignored/consola/dist/utils.d.ts +0 -169
- package/cli/node_modules/.ignored/consola/dist/utils.mjs +0 -284
- package/cli/node_modules/.ignored/consola/lib/index.cjs +0 -9
- package/cli/node_modules/.ignored/consola/package.json +0 -101
- package/cli/node_modules/.ignored/consola/utils.d.ts +0 -1
- package/cli/node_modules/.ignored/pathe/LICENSE +0 -44
- package/cli/node_modules/.ignored/pathe/README.md +0 -69
- package/cli/node_modules/.ignored/pathe/dist/index.cjs +0 -23
- package/cli/node_modules/.ignored/pathe/dist/index.d.cts +0 -36
- package/cli/node_modules/.ignored/pathe/dist/index.d.mts +0 -36
- package/cli/node_modules/.ignored/pathe/dist/index.d.ts +0 -36
- package/cli/node_modules/.ignored/pathe/dist/index.mjs +0 -1
- package/cli/node_modules/.ignored/pathe/dist/shared/pathe.1f0a373c.cjs +0 -238
- package/cli/node_modules/.ignored/pathe/dist/shared/pathe.ff20891b.mjs +0 -221
- package/cli/node_modules/.ignored/pathe/dist/utils.cjs +0 -58
- package/cli/node_modules/.ignored/pathe/dist/utils.d.cts +0 -5
- package/cli/node_modules/.ignored/pathe/dist/utils.d.mts +0 -5
- package/cli/node_modules/.ignored/pathe/dist/utils.d.ts +0 -5
- package/cli/node_modules/.ignored/pathe/dist/utils.mjs +0 -54
- package/cli/node_modules/.ignored/pathe/package.json +0 -48
- package/cli/node_modules/.ignored/pathe/utils.d.ts +0 -1
- package/cli/node_modules/.ignored/scule/LICENSE +0 -21
- package/cli/node_modules/.ignored/scule/README.md +0 -149
- package/cli/node_modules/.ignored/scule/dist/index.cjs +0 -92
- package/cli/node_modules/.ignored/scule/dist/index.d.cts +0 -57
- package/cli/node_modules/.ignored/scule/dist/index.d.mts +0 -57
- package/cli/node_modules/.ignored/scule/dist/index.d.ts +0 -57
- package/cli/node_modules/.ignored/scule/dist/index.mjs +0 -80
- package/cli/node_modules/.ignored/scule/package.json +0 -43
- package/cli/node_modules/.package-lock.json +0 -33
- package/dist/runtime/types/component.d.ts +0 -17
- /package/dist/runtime/types/{component.js → locale.js} +0 -0
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
import type { TabsRootProps, TabsRootEmits
|
|
2
|
+
import type { VariantProps } from 'tailwind-variants'
|
|
3
|
+
import type { TabsRootProps, TabsRootEmits } from 'reka-ui'
|
|
4
4
|
import type { AppConfig } from '@nuxt/schema'
|
|
5
5
|
import _appConfig from '#build/app.config'
|
|
6
6
|
import theme from '#build/ui/tabs'
|
|
7
|
+
import { extendDevtoolsMeta } from '../composables/extendDevtoolsMeta'
|
|
8
|
+
import { tv } from '../utils/tv'
|
|
7
9
|
import type { AvatarProps } from '../types'
|
|
8
10
|
import type { DynamicSlots, PartialString } from '../types/utils'
|
|
9
11
|
|
|
@@ -11,7 +13,7 @@ const appConfig = _appConfig as AppConfig & { ui: { tabs: Partial<typeof theme>
|
|
|
11
13
|
|
|
12
14
|
const tabs = tv({ extend: tv(theme), ...(appConfig.ui?.tabs || {}) })
|
|
13
15
|
|
|
14
|
-
export interface TabsItem
|
|
16
|
+
export interface TabsItem {
|
|
15
17
|
label?: string
|
|
16
18
|
icon?: string
|
|
17
19
|
avatar?: AvatarProps
|
|
@@ -19,11 +21,12 @@ export interface TabsItem extends Pick<TabsTriggerProps, 'disabled'> {
|
|
|
19
21
|
content?: string
|
|
20
22
|
/** A unique value for the tab item. Defaults to the index. */
|
|
21
23
|
value?: string | number
|
|
24
|
+
disabled?: boolean
|
|
22
25
|
}
|
|
23
26
|
|
|
24
27
|
type TabsVariants = VariantProps<typeof tabs>
|
|
25
28
|
|
|
26
|
-
export interface TabsProps<T> extends Pick<TabsRootProps<string | number>, 'defaultValue' | 'modelValue' | 'activationMode'> {
|
|
29
|
+
export interface TabsProps<T> extends Pick<TabsRootProps<string | number>, 'defaultValue' | 'modelValue' | 'activationMode' | 'unmountOnHide'> {
|
|
27
30
|
/**
|
|
28
31
|
* The element or component this component should render as.
|
|
29
32
|
* @defaultValue 'div'
|
|
@@ -42,7 +45,12 @@ export interface TabsProps<T> extends Pick<TabsRootProps<string | number>, 'defa
|
|
|
42
45
|
* The content of the tabs, can be disabled to prevent rendering the content.
|
|
43
46
|
* @defaultValue true
|
|
44
47
|
*/
|
|
45
|
-
content?: boolean
|
|
48
|
+
content?: boolean
|
|
49
|
+
/**
|
|
50
|
+
* The key used to get the label from the item.
|
|
51
|
+
* @defaultValue 'label'
|
|
52
|
+
*/
|
|
53
|
+
labelKey?: string
|
|
46
54
|
class?: any
|
|
47
55
|
ui?: PartialString<typeof tabs.slots>
|
|
48
56
|
}
|
|
@@ -57,24 +65,45 @@ export type TabsSlots<T extends { slot?: string }> = {
|
|
|
57
65
|
trailing: SlotProps<T>
|
|
58
66
|
content: SlotProps<T>
|
|
59
67
|
} & DynamicSlots<T, SlotProps<T>>
|
|
68
|
+
|
|
69
|
+
extendDevtoolsMeta({
|
|
70
|
+
defaultProps: {
|
|
71
|
+
items: [{
|
|
72
|
+
label: 'Tab1',
|
|
73
|
+
avatar: { src: 'https://avatars.githubusercontent.com/u/739984?v=4' },
|
|
74
|
+
content: 'This is the content shown for Tab1'
|
|
75
|
+
}, {
|
|
76
|
+
label: 'Tab2',
|
|
77
|
+
icon: 'i-lucide-user',
|
|
78
|
+
content: 'And, this is the content for Tab2'
|
|
79
|
+
}, {
|
|
80
|
+
label: 'Tab3',
|
|
81
|
+
icon: 'i-lucide-bell',
|
|
82
|
+
content: 'Finally, this is the content for Tab3'
|
|
83
|
+
}]
|
|
84
|
+
}
|
|
85
|
+
})
|
|
60
86
|
</script>
|
|
61
87
|
|
|
62
88
|
<script setup lang="ts" generic="T extends TabsItem">
|
|
63
|
-
import { computed
|
|
64
|
-
import {
|
|
65
|
-
import { TabsRoot, TabsList, TabsIndicator, TabsTrigger, TabsContent, useForwardPropsEmits } from 'radix-vue'
|
|
89
|
+
import { computed } from 'vue'
|
|
90
|
+
import { TabsRoot, TabsList, TabsIndicator, TabsTrigger, TabsContent, useForwardPropsEmits } from 'reka-ui'
|
|
66
91
|
import { reactivePick } from '@vueuse/core'
|
|
92
|
+
import { get } from '../utils'
|
|
93
|
+
import UIcon from './Icon.vue'
|
|
94
|
+
import UAvatar from './Avatar.vue'
|
|
67
95
|
|
|
68
96
|
const props = withDefaults(defineProps<TabsProps<T>>(), {
|
|
69
97
|
content: true,
|
|
70
98
|
defaultValue: '0',
|
|
71
|
-
orientation: 'horizontal'
|
|
99
|
+
orientation: 'horizontal',
|
|
100
|
+
unmountOnHide: true,
|
|
101
|
+
labelKey: 'label'
|
|
72
102
|
})
|
|
73
103
|
const emits = defineEmits<TabsEmits>()
|
|
74
104
|
const slots = defineSlots<TabsSlots<T>>()
|
|
75
105
|
|
|
76
|
-
const rootProps = useForwardPropsEmits(reactivePick(props, 'as', 'defaultValue', 'orientation', 'activationMode', '
|
|
77
|
-
const contentProps = toRef(() => defu(props.content || {}, { forceMount: true }) as TabsContentProps)
|
|
106
|
+
const rootProps = useForwardPropsEmits(reactivePick(props, 'as', 'modelValue', 'defaultValue', 'orientation', 'activationMode', 'unmountOnHide'), emits)
|
|
78
107
|
|
|
79
108
|
const ui = computed(() => tabs({
|
|
80
109
|
color: props.color,
|
|
@@ -91,12 +120,12 @@ const ui = computed(() => tabs({
|
|
|
91
120
|
|
|
92
121
|
<TabsTrigger v-for="(item, index) of items" :key="index" :value="item.value || String(index)" :disabled="item.disabled" :class="ui.trigger({ class: props.ui?.trigger })">
|
|
93
122
|
<slot name="leading" :item="item" :index="index">
|
|
94
|
-
<
|
|
95
|
-
<
|
|
123
|
+
<UIcon v-if="item.icon" :name="item.icon" :class="ui.leadingIcon({ class: props.ui?.leadingIcon })" />
|
|
124
|
+
<UAvatar v-else-if="item.avatar" :size="((props.ui?.leadingAvatarSize || ui.leadingAvatarSize()) as AvatarProps['size'])" v-bind="item.avatar" :class="ui.leadingAvatar({ class: props.ui?.leadingAvatar })" />
|
|
96
125
|
</slot>
|
|
97
126
|
|
|
98
|
-
<span v-if="item.
|
|
99
|
-
<slot :item="item" :index="index">{{ item.
|
|
127
|
+
<span v-if="get(item, props.labelKey as string) || !!slots.default" :class="ui.label({ class: props.ui?.label })">
|
|
128
|
+
<slot :item="item" :index="index">{{ get(item, props.labelKey as string) }}</slot>
|
|
100
129
|
</span>
|
|
101
130
|
|
|
102
131
|
<slot name="trailing" :item="item" :index="index" />
|
|
@@ -104,7 +133,7 @@ const ui = computed(() => tabs({
|
|
|
104
133
|
</TabsList>
|
|
105
134
|
|
|
106
135
|
<template v-if="!!content">
|
|
107
|
-
<TabsContent v-for="(item, index) of items" :key="index"
|
|
136
|
+
<TabsContent v-for="(item, index) of items" :key="index" :value="item.value || String(index)" :class="ui.content({ class: props.ui?.content })">
|
|
108
137
|
<slot :name="item.slot || 'content'" :item="item" :index="index">
|
|
109
138
|
{{ item.content }}
|
|
110
139
|
</slot>
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import type { VariantProps } from 'tailwind-variants'
|
|
3
3
|
import type { AppConfig } from '@nuxt/schema'
|
|
4
4
|
import _appConfig from '#build/app.config'
|
|
5
5
|
import theme from '#build/ui/textarea'
|
|
6
|
+
import { tv } from '../utils/tv'
|
|
6
7
|
|
|
7
8
|
const appConfig = _appConfig as AppConfig & { ui: { textarea: Partial<typeof theme> } }
|
|
8
9
|
|
|
@@ -11,6 +12,11 @@ const textarea = tv({ extend: tv(theme), ...(appConfig.ui?.textarea || {}) })
|
|
|
11
12
|
type TextareaVariants = VariantProps<typeof textarea>
|
|
12
13
|
|
|
13
14
|
export interface TextareaProps {
|
|
15
|
+
/**
|
|
16
|
+
* The element or component this component should render as.
|
|
17
|
+
* @defaultValue 'div'
|
|
18
|
+
*/
|
|
19
|
+
as?: any
|
|
14
20
|
id?: string
|
|
15
21
|
name?: string
|
|
16
22
|
/** The placeholder text when the textarea is empty. */
|
|
@@ -44,6 +50,7 @@ export interface TextareaSlots {
|
|
|
44
50
|
|
|
45
51
|
<script setup lang="ts">
|
|
46
52
|
import { ref, computed, onMounted, nextTick, watch } from 'vue'
|
|
53
|
+
import { Primitive } from 'reka-ui'
|
|
47
54
|
import { useFormField } from '../composables/useFormField'
|
|
48
55
|
import { looseToNumber } from '../utils'
|
|
49
56
|
|
|
@@ -59,7 +66,7 @@ const emits = defineEmits<TextareaEmits>()
|
|
|
59
66
|
|
|
60
67
|
const [modelValue, modelModifiers] = defineModel<string | number>()
|
|
61
68
|
|
|
62
|
-
const { emitFormBlur, emitFormInput, emitFormChange, size, color, id, name, highlight, disabled } = useFormField<TextareaProps>(props)
|
|
69
|
+
const { emitFormBlur, emitFormInput, emitFormChange, size, color, id, name, highlight, disabled } = useFormField<TextareaProps>(props, { deferInputValidation: true })
|
|
63
70
|
|
|
64
71
|
const ui = computed(() => textarea({
|
|
65
72
|
color: color.value,
|
|
@@ -151,7 +158,7 @@ function autoResize() {
|
|
|
151
158
|
}
|
|
152
159
|
}
|
|
153
160
|
|
|
154
|
-
watch(
|
|
161
|
+
watch(modelValue, () => {
|
|
155
162
|
nextTick(autoResize)
|
|
156
163
|
})
|
|
157
164
|
|
|
@@ -167,7 +174,7 @@ onMounted(() => {
|
|
|
167
174
|
</script>
|
|
168
175
|
|
|
169
176
|
<template>
|
|
170
|
-
<
|
|
177
|
+
<Primitive :as="as" :class="ui.root({ class: [props.class, props.ui?.root] })">
|
|
171
178
|
<textarea
|
|
172
179
|
:id="id"
|
|
173
180
|
ref="textareaRef"
|
|
@@ -185,5 +192,5 @@ onMounted(() => {
|
|
|
185
192
|
/>
|
|
186
193
|
|
|
187
194
|
<slot />
|
|
188
|
-
</
|
|
195
|
+
</Primitive>
|
|
189
196
|
</template>
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
import type { ToastRootProps, ToastRootEmits } from '
|
|
2
|
+
import type { VariantProps } from 'tailwind-variants'
|
|
3
|
+
import type { ToastRootProps, ToastRootEmits } from 'reka-ui'
|
|
4
4
|
import type { AppConfig } from '@nuxt/schema'
|
|
5
5
|
import _appConfig from '#build/app.config'
|
|
6
6
|
import theme from '#build/ui/toast'
|
|
7
|
+
import { extendDevtoolsMeta } from '../composables/extendDevtoolsMeta'
|
|
8
|
+
import { tv } from '../utils/tv'
|
|
7
9
|
import type { AvatarProps, ButtonProps } from '../types'
|
|
8
10
|
|
|
9
11
|
const appConfig = _appConfig as AppConfig & { ui: { toast: Partial<typeof theme> } }
|
|
@@ -27,11 +29,12 @@ export interface ToastProps extends Pick<ToastRootProps, 'defaultOpen' | 'open'
|
|
|
27
29
|
* Display a list of actions:
|
|
28
30
|
* - under the title and description if multiline
|
|
29
31
|
* - next to the close button if not multiline
|
|
32
|
+
* `{ size: 'xs' }`{lang="ts-type"}
|
|
30
33
|
*/
|
|
31
34
|
actions?: ButtonProps[]
|
|
32
35
|
/**
|
|
33
36
|
* Display a close button to dismiss the toast.
|
|
34
|
-
* `{ size: 'md', color: '
|
|
37
|
+
* `{ size: 'md', color: 'neutral', variant: 'link' }`{lang="ts-type"}
|
|
35
38
|
* @defaultValue true
|
|
36
39
|
*/
|
|
37
40
|
close?: ButtonProps | boolean
|
|
@@ -53,15 +56,19 @@ export interface ToastSlots {
|
|
|
53
56
|
actions(props?: {}): any
|
|
54
57
|
close(props: { ui: any }): any
|
|
55
58
|
}
|
|
59
|
+
|
|
60
|
+
extendDevtoolsMeta<ToastProps>({ ignore: true })
|
|
56
61
|
</script>
|
|
57
62
|
|
|
58
63
|
<script setup lang="ts">
|
|
59
64
|
import { ref, computed, onMounted } from 'vue'
|
|
60
|
-
import { ToastRoot, ToastTitle, ToastDescription, ToastAction, ToastClose, useForwardPropsEmits } from '
|
|
65
|
+
import { ToastRoot, ToastTitle, ToastDescription, ToastAction, ToastClose, useForwardPropsEmits } from 'reka-ui'
|
|
61
66
|
import { reactivePick } from '@vueuse/core'
|
|
62
67
|
import { useAppConfig } from '#imports'
|
|
68
|
+
import { useLocale } from '../composables/useLocale'
|
|
63
69
|
import UIcon from './Icon.vue'
|
|
64
70
|
import UAvatar from './Avatar.vue'
|
|
71
|
+
import UButton from './Button.vue'
|
|
65
72
|
|
|
66
73
|
const props = withDefaults(defineProps<ToastProps>(), {
|
|
67
74
|
close: true
|
|
@@ -69,7 +76,9 @@ const props = withDefaults(defineProps<ToastProps>(), {
|
|
|
69
76
|
const emits = defineEmits<ToastEmits>()
|
|
70
77
|
const slots = defineSlots<ToastSlots>()
|
|
71
78
|
|
|
79
|
+
const { t } = useLocale()
|
|
72
80
|
const appConfig = useAppConfig()
|
|
81
|
+
|
|
73
82
|
const rootProps = useForwardPropsEmits(reactivePick(props, 'as', 'defaultOpen', 'open', 'duration', 'type'), emits)
|
|
74
83
|
|
|
75
84
|
const multiline = computed(() => !!props.title && !!props.description)
|
|
@@ -145,9 +154,9 @@ defineExpose({
|
|
|
145
154
|
v-if="close"
|
|
146
155
|
:icon="closeIcon || appConfig.ui.icons.close"
|
|
147
156
|
size="md"
|
|
148
|
-
color="
|
|
157
|
+
color="neutral"
|
|
149
158
|
variant="link"
|
|
150
|
-
aria-label="
|
|
159
|
+
:aria-label="t('toast.close')"
|
|
151
160
|
v-bind="typeof close === 'object' ? close : undefined"
|
|
152
161
|
:class="ui.close({ class: props.ui?.close })"
|
|
153
162
|
@click.stop
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
import type { ToastProviderProps } from '
|
|
2
|
+
import type { VariantProps } from 'tailwind-variants'
|
|
3
|
+
import type { ToastProviderProps } from 'reka-ui'
|
|
4
4
|
import type { AppConfig } from '@nuxt/schema'
|
|
5
5
|
import _appConfig from '#build/app.config'
|
|
6
6
|
import theme from '#build/ui/toaster'
|
|
7
|
+
import { extendDevtoolsMeta } from '../composables/extendDevtoolsMeta'
|
|
8
|
+
import { tv } from '../utils/tv'
|
|
7
9
|
|
|
8
10
|
const appConfig = _appConfig as AppConfig & { ui: { toaster: Partial<typeof theme> } }
|
|
9
11
|
|
|
@@ -18,6 +20,11 @@ export interface ToasterProps extends Omit<ToastProviderProps, 'swipeDirection'>
|
|
|
18
20
|
* @defaultValue true
|
|
19
21
|
*/
|
|
20
22
|
expand?: boolean
|
|
23
|
+
/**
|
|
24
|
+
* Render the toaster in a portal.
|
|
25
|
+
* @defaultValue true
|
|
26
|
+
*/
|
|
27
|
+
portal?: boolean
|
|
21
28
|
class?: any
|
|
22
29
|
ui?: Partial<typeof toaster.slots>
|
|
23
30
|
}
|
|
@@ -25,18 +32,25 @@ export interface ToasterProps extends Omit<ToastProviderProps, 'swipeDirection'>
|
|
|
25
32
|
export interface ToasterSlots {
|
|
26
33
|
default(props?: {}): any
|
|
27
34
|
}
|
|
35
|
+
|
|
36
|
+
export default {
|
|
37
|
+
name: 'Toaster'
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
extendDevtoolsMeta({ example: 'ToasterExample' })
|
|
28
41
|
</script>
|
|
29
42
|
|
|
30
43
|
<script setup lang="ts">
|
|
31
44
|
import { ref, computed } from 'vue'
|
|
32
|
-
import { ToastProvider, ToastViewport, useForwardProps } from '
|
|
45
|
+
import { ToastProvider, ToastViewport, ToastPortal, useForwardProps } from 'reka-ui'
|
|
33
46
|
import { reactivePick } from '@vueuse/core'
|
|
34
47
|
import { useToast } from '../composables/useToast'
|
|
35
|
-
import UToast from './Toast.vue'
|
|
36
48
|
import { omit } from '../utils'
|
|
49
|
+
import UToast from './Toast.vue'
|
|
37
50
|
|
|
38
51
|
const props = withDefaults(defineProps<ToasterProps>(), {
|
|
39
52
|
expand: true,
|
|
53
|
+
portal: true,
|
|
40
54
|
duration: 5000
|
|
41
55
|
})
|
|
42
56
|
defineSlots<ToasterSlots>()
|
|
@@ -113,18 +127,20 @@ function getOffset(index: number) {
|
|
|
113
127
|
@click="toast.click && toast.click(toast)"
|
|
114
128
|
/>
|
|
115
129
|
|
|
116
|
-
<
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
130
|
+
<ToastPortal :disabled="!portal">
|
|
131
|
+
<ToastViewport
|
|
132
|
+
:data-expanded="expanded"
|
|
133
|
+
:class="ui.viewport({ class: [props.class, props.ui?.viewport] })"
|
|
134
|
+
:style="{
|
|
135
|
+
'--scale-factor': '0.05',
|
|
136
|
+
'--translate-factor': position?.startsWith('top') ? '1px' : '-1px',
|
|
137
|
+
'--gap': position?.startsWith('top') ? '16px' : '-16px',
|
|
138
|
+
'--front-height': `${frontHeight}px`,
|
|
139
|
+
'--height': `${height}px`
|
|
140
|
+
}"
|
|
141
|
+
@mouseenter="hovered = true"
|
|
142
|
+
@mouseleave="hovered = false"
|
|
143
|
+
/>
|
|
144
|
+
</ToastPortal>
|
|
129
145
|
</ToastProvider>
|
|
130
146
|
</template>
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
import type { TooltipRootProps, TooltipRootEmits, TooltipContentProps, TooltipArrowProps } from 'radix-vue'
|
|
2
|
+
import type { TooltipRootProps, TooltipRootEmits, TooltipContentProps, TooltipArrowProps } from 'reka-ui'
|
|
4
3
|
import type { AppConfig } from '@nuxt/schema'
|
|
5
4
|
import _appConfig from '#build/app.config'
|
|
6
5
|
import theme from '#build/ui/tooltip'
|
|
6
|
+
import { extendDevtoolsMeta } from '../composables/extendDevtoolsMeta'
|
|
7
|
+
import { tv } from '../utils/tv'
|
|
7
8
|
import type { KbdProps } from '../types'
|
|
8
9
|
|
|
9
10
|
const appConfig = _appConfig as AppConfig & { ui: { tooltip: Partial<typeof theme> } }
|
|
@@ -17,7 +18,7 @@ export interface TooltipProps extends TooltipRootProps {
|
|
|
17
18
|
kbds?: KbdProps['value'][] | KbdProps[]
|
|
18
19
|
/**
|
|
19
20
|
* The content of the tooltip.
|
|
20
|
-
* @defaultValue { side: 'bottom', sideOffset: 8 }
|
|
21
|
+
* @defaultValue { side: 'bottom', sideOffset: 8, collisionPadding: 8 }
|
|
21
22
|
*/
|
|
22
23
|
content?: Omit<TooltipContentProps, 'as' | 'asChild'>
|
|
23
24
|
/**
|
|
@@ -40,12 +41,14 @@ export interface TooltipSlots {
|
|
|
40
41
|
default(props: { open: boolean }): any
|
|
41
42
|
content(props?: {}): any
|
|
42
43
|
}
|
|
44
|
+
|
|
45
|
+
extendDevtoolsMeta({ example: 'TooltipExample', defaultProps: { text: 'Hello world!' } })
|
|
43
46
|
</script>
|
|
44
47
|
|
|
45
48
|
<script setup lang="ts">
|
|
46
49
|
import { computed, toRef } from 'vue'
|
|
47
50
|
import { defu } from 'defu'
|
|
48
|
-
import { TooltipRoot, TooltipTrigger, TooltipPortal, TooltipContent, TooltipArrow, useForwardPropsEmits } from '
|
|
51
|
+
import { TooltipRoot, TooltipTrigger, TooltipPortal, TooltipContent, TooltipArrow, useForwardPropsEmits } from 'reka-ui'
|
|
49
52
|
import { reactivePick } from '@vueuse/core'
|
|
50
53
|
import UKbd from './Kbd.vue'
|
|
51
54
|
|
|
@@ -56,7 +59,7 @@ const emits = defineEmits<TooltipEmits>()
|
|
|
56
59
|
const slots = defineSlots<TooltipSlots>()
|
|
57
60
|
|
|
58
61
|
const rootProps = useForwardPropsEmits(reactivePick(props, 'defaultOpen', 'open', 'delayDuration', 'disableHoverableContent', 'disableClosingTrigger', 'disabled', 'ignoreNonKeyboardFocus'), emits)
|
|
59
|
-
const contentProps = toRef(() => defu(props.content, { side: 'bottom', sideOffset: 8 }) as TooltipContentProps)
|
|
62
|
+
const contentProps = toRef(() => defu(props.content, { side: 'bottom', sideOffset: 8, collisionPadding: 8 }) as TooltipContentProps)
|
|
60
63
|
const arrowProps = toRef(() => props.arrow as TooltipArrowProps)
|
|
61
64
|
|
|
62
65
|
// eslint-disable-next-line vue/no-dupe-keys
|
|
@@ -67,12 +70,12 @@ const ui = computed(() => tooltip({
|
|
|
67
70
|
|
|
68
71
|
<template>
|
|
69
72
|
<TooltipRoot v-slot="{ open }" v-bind="rootProps">
|
|
70
|
-
<TooltipTrigger v-if="!!slots.default" as-child>
|
|
73
|
+
<TooltipTrigger v-if="!!slots.default" as-child :class="props.class">
|
|
71
74
|
<slot :open="open" />
|
|
72
75
|
</TooltipTrigger>
|
|
73
76
|
|
|
74
77
|
<TooltipPortal :disabled="!portal">
|
|
75
|
-
<TooltipContent v-bind="contentProps" :class="ui.content({ class: [props.class, props.ui?.content] })">
|
|
78
|
+
<TooltipContent v-bind="contentProps" :class="ui.content({ class: [!slots.default && props.class, props.ui?.content] })">
|
|
76
79
|
<slot name="content">
|
|
77
80
|
<span v-if="text" :class="ui.text({ class: props.ui?.text })">{{ text }}</span>
|
|
78
81
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Locale, Direction, Messages } from '../types/locale';
|
|
2
|
+
interface DefineLocaleOptions {
|
|
3
|
+
name: string;
|
|
4
|
+
code: string;
|
|
5
|
+
dir?: Direction;
|
|
6
|
+
messages: Messages;
|
|
7
|
+
}
|
|
8
|
+
export declare function defineLocale(options: DefineLocaleOptions): Locale;
|
|
9
|
+
export {};
|
|
@@ -11,5 +11,5 @@ export interface ShortcutsOptions {
|
|
|
11
11
|
chainDelay?: number;
|
|
12
12
|
}
|
|
13
13
|
export declare function extractShortcuts(items: any[] | any[][]): Record<string, Handler>;
|
|
14
|
-
export declare function defineShortcuts(config: MaybeRef<ShortcutsConfig>, options?: ShortcutsOptions):
|
|
14
|
+
export declare function defineShortcuts(config: MaybeRef<ShortcutsConfig>, options?: ShortcutsOptions): import("@vueuse/core").Fn;
|
|
15
15
|
export {};
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { ref, computed, toValue } from "vue";
|
|
2
2
|
import { useEventListener, useActiveElement, useDebounceFn } from "@vueuse/core";
|
|
3
|
-
import { useKbd } from "../composables/useKbd.js";
|
|
4
3
|
const chainedShortcutRegex = /^[^-]+.*-.*[^-]+$/;
|
|
5
4
|
const combinedShortcutRegex = /^[^_]+.*_.*[^_]+$/;
|
|
6
5
|
export function extractShortcuts(items) {
|
|
7
6
|
const shortcuts = {};
|
|
8
7
|
function traverse(items2) {
|
|
9
8
|
items2.forEach((item) => {
|
|
10
|
-
if (item.kbds?.length && (item.
|
|
9
|
+
if (item.kbds?.length && (item.onSelect || item.onClick)) {
|
|
11
10
|
const shortcutKey = item.kbds.join("_");
|
|
12
|
-
shortcuts[shortcutKey] = item.
|
|
11
|
+
shortcuts[shortcutKey] = item.onSelect || item.onClick;
|
|
13
12
|
}
|
|
14
13
|
if (item.children) {
|
|
15
14
|
traverse(item.children.flat());
|
|
@@ -28,7 +27,6 @@ export function defineShortcuts(config, options = {}) {
|
|
|
28
27
|
chainedInputs.value.splice(0, chainedInputs.value.length);
|
|
29
28
|
};
|
|
30
29
|
const debouncedClearChainedInput = useDebounceFn(clearChainedInput, options.chainDelay ?? 800);
|
|
31
|
-
const { macOS } = useKbd();
|
|
32
30
|
const activeElement = useActiveElement();
|
|
33
31
|
const onKeyDown = (e) => {
|
|
34
32
|
if (!e.key) {
|
|
@@ -114,10 +112,6 @@ export function defineShortcuts(config, options = {}) {
|
|
|
114
112
|
};
|
|
115
113
|
}
|
|
116
114
|
shortcut.chained = chained;
|
|
117
|
-
if (!macOS.value && shortcut.metaKey && !shortcut.ctrlKey) {
|
|
118
|
-
shortcut.metaKey = false;
|
|
119
|
-
shortcut.ctrlKey = true;
|
|
120
|
-
}
|
|
121
115
|
if (typeof shortcutConfig === "function") {
|
|
122
116
|
shortcut.handler = shortcutConfig;
|
|
123
117
|
} else if (typeof shortcutConfig === "object") {
|
|
@@ -137,5 +131,5 @@ export function defineShortcuts(config, options = {}) {
|
|
|
137
131
|
return shortcut;
|
|
138
132
|
}).filter(Boolean);
|
|
139
133
|
});
|
|
140
|
-
useEventListener("keydown", onKeyDown);
|
|
134
|
+
return useEventListener("keydown", onKeyDown);
|
|
141
135
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ComputedRef, type InjectionKey } from 'vue';
|
|
2
|
-
import type { AvatarGroupProps } from '../types
|
|
2
|
+
import type { AvatarGroupProps } from '../types';
|
|
3
3
|
export declare const avatarGroupInjectionKey: InjectionKey<ComputedRef<{
|
|
4
4
|
size: AvatarGroupProps['size'];
|
|
5
5
|
}>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { InjectionKey, ComputedRef } from 'vue';
|
|
2
|
-
import type { ButtonGroupProps } from '../components/ButtonGroup.vue
|
|
3
|
-
import type { GetObjectField } from '../types/utils
|
|
2
|
+
import type { ButtonGroupProps } from '../components/ButtonGroup.vue';
|
|
3
|
+
import type { GetObjectField } from '../types/utils';
|
|
4
4
|
export declare const buttonGroupInjectionKey: InjectionKey<ComputedRef<{
|
|
5
5
|
size: ButtonGroupProps['size'];
|
|
6
6
|
orientation: ButtonGroupProps['orientation'];
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { type MaybeRefOrGetter } from 'vue';
|
|
2
|
+
import type { AvatarProps } from '../types';
|
|
2
3
|
export interface UseComponentIconsProps {
|
|
3
4
|
/** Display an icon based on the `leading` and `trailing` props. */
|
|
4
5
|
icon?: string;
|
|
6
|
+
/** Display an avatar on the left side. */
|
|
7
|
+
avatar?: AvatarProps;
|
|
5
8
|
/** When `true`, the icon will be displayed on the left side. */
|
|
6
9
|
leading?: boolean;
|
|
7
10
|
/** Display an icon on the left side. */
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { type InjectionKey, type Ref, type ComputedRef } from 'vue';
|
|
2
2
|
import { type UseEventBusReturn } from '@vueuse/core';
|
|
3
|
-
import type { FormFieldProps } from '../types
|
|
4
|
-
import type { FormEvent, FormFieldInjectedOptions, FormInjectedOptions } from '../types/form
|
|
5
|
-
import type { GetObjectField } from '../types/utils
|
|
3
|
+
import type { FormFieldProps } from '../types';
|
|
4
|
+
import type { FormEvent, FormFieldInjectedOptions, FormInjectedOptions } from '../types/form';
|
|
5
|
+
import type { GetObjectField } from '../types/utils';
|
|
6
6
|
type Props<T> = {
|
|
7
7
|
id?: string;
|
|
8
8
|
name?: string;
|
|
9
9
|
size?: GetObjectField<T, 'size'>;
|
|
10
10
|
color?: GetObjectField<T, 'color'>;
|
|
11
|
-
eagerValidation?: boolean;
|
|
12
11
|
legend?: string;
|
|
13
12
|
highlight?: boolean;
|
|
14
13
|
disabled?: boolean;
|
|
@@ -17,9 +16,14 @@ export declare const formOptionsInjectionKey: InjectionKey<ComputedRef<FormInjec
|
|
|
17
16
|
export declare const formBusInjectionKey: InjectionKey<UseEventBusReturn<FormEvent, string>>;
|
|
18
17
|
export declare const formFieldInjectionKey: InjectionKey<ComputedRef<FormFieldInjectedOptions<FormFieldProps>>>;
|
|
19
18
|
export declare const inputIdInjectionKey: InjectionKey<Ref<string | undefined>>;
|
|
20
|
-
export declare const formInputsInjectionKey: InjectionKey<Ref<Record<string,
|
|
19
|
+
export declare const formInputsInjectionKey: InjectionKey<Ref<Record<string, {
|
|
20
|
+
id?: string;
|
|
21
|
+
pattern?: RegExp;
|
|
22
|
+
}>>>;
|
|
23
|
+
export declare const formLoadingInjectionKey: InjectionKey<Readonly<Ref<boolean>>>;
|
|
21
24
|
export declare function useFormField<T>(props?: Props<T>, opts?: {
|
|
22
25
|
bind?: boolean;
|
|
26
|
+
deferInputValidation?: boolean;
|
|
23
27
|
}): {
|
|
24
28
|
id: ComputedRef<string | undefined>;
|
|
25
29
|
name: ComputedRef<string | undefined>;
|
|
@@ -5,6 +5,7 @@ export const formBusInjectionKey = Symbol("nuxt-ui.form-events");
|
|
|
5
5
|
export const formFieldInjectionKey = Symbol("nuxt-ui.form-field");
|
|
6
6
|
export const inputIdInjectionKey = Symbol("nuxt-ui.input-id");
|
|
7
7
|
export const formInputsInjectionKey = Symbol("nuxt-ui.form-inputs");
|
|
8
|
+
export const formLoadingInjectionKey = Symbol("nuxt-ui.form-loading");
|
|
8
9
|
export function useFormField(props, opts) {
|
|
9
10
|
const formOptions = inject(formOptionsInjectionKey, void 0);
|
|
10
11
|
const formBus = inject(formBusInjectionKey, void 0);
|
|
@@ -18,25 +19,28 @@ export function useFormField(props, opts) {
|
|
|
18
19
|
inputId.value = props?.id;
|
|
19
20
|
}
|
|
20
21
|
if (formInputs && formField.value.name && inputId.value) {
|
|
21
|
-
formInputs.value[formField.value.name] = inputId.value;
|
|
22
|
+
formInputs.value[formField.value.name] = { id: inputId.value, pattern: formField.value.errorPattern };
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
|
-
const
|
|
25
|
+
const touched = ref(false);
|
|
25
26
|
function emitFormEvent(type, name) {
|
|
26
27
|
if (formBus && formField && name) {
|
|
27
28
|
formBus.emit({ type, name });
|
|
28
29
|
}
|
|
29
30
|
}
|
|
30
31
|
function emitFormBlur() {
|
|
32
|
+
touched.value = true;
|
|
31
33
|
emitFormEvent("blur", formField?.value.name);
|
|
32
|
-
blurred.value = true;
|
|
33
34
|
}
|
|
34
35
|
function emitFormChange() {
|
|
36
|
+
touched.value = true;
|
|
35
37
|
emitFormEvent("change", formField?.value.name);
|
|
36
38
|
}
|
|
37
39
|
const emitFormInput = useDebounceFn(
|
|
38
40
|
() => {
|
|
39
|
-
|
|
41
|
+
if (!opts?.deferInputValidation || touched.value || formField?.value.eagerValidation) {
|
|
42
|
+
emitFormEvent("input", formField?.value.name);
|
|
43
|
+
}
|
|
40
44
|
},
|
|
41
45
|
formField?.value.validateOnInputDelay ?? formOptions?.value.validateOnInputDelay ?? 0
|
|
42
46
|
);
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
+
type KbdKeysSpecificMap = {
|
|
2
|
+
meta: string;
|
|
3
|
+
alt: string;
|
|
4
|
+
ctrl: string;
|
|
5
|
+
};
|
|
1
6
|
export declare const kbdKeysMap: {
|
|
2
7
|
meta: string;
|
|
8
|
+
ctrl: string;
|
|
9
|
+
alt: string;
|
|
10
|
+
win: string;
|
|
3
11
|
command: string;
|
|
4
12
|
shift: string;
|
|
5
|
-
ctrl: string;
|
|
6
13
|
option: string;
|
|
7
|
-
alt: string;
|
|
8
14
|
enter: string;
|
|
9
15
|
delete: string;
|
|
10
16
|
backspace: string;
|
|
@@ -21,8 +27,9 @@ export declare const kbdKeysMap: {
|
|
|
21
27
|
end: string;
|
|
22
28
|
};
|
|
23
29
|
export type KbdKey = keyof typeof kbdKeysMap;
|
|
30
|
+
export type KbdKeySpecific = keyof KbdKeysSpecificMap;
|
|
24
31
|
export declare const useKbd: () => {
|
|
25
32
|
macOS: import("vue").ComputedRef<false | "" | RegExpMatchArray | null | undefined>;
|
|
26
|
-
metaSymbol: import("vue").Ref<string, string>;
|
|
27
33
|
getKbdKey: (value?: KbdKey | string) => string | undefined;
|
|
28
34
|
};
|
|
35
|
+
export {};
|