@nuxt/ui 3.0.0-alpha.1 → 3.0.0-alpha.10
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 +242 -0
- package/.nuxt/ui/avatar-group.ts +40 -0
- package/.nuxt/ui/avatar.ts +42 -0
- package/.nuxt/ui/badge.ts +194 -0
- package/.nuxt/ui/breadcrumb.ts +45 -0
- package/.nuxt/ui/button-group.ts +16 -0
- package/.nuxt/ui/button.ts +344 -0
- package/.nuxt/ui/calendar.ts +85 -0
- package/.nuxt/ui/card.ts +8 -0
- package/.nuxt/ui/carousel.ts +41 -0
- package/.nuxt/ui/checkbox.ts +105 -0
- package/.nuxt/ui/chip.ts +67 -0
- package/.nuxt/ui/collapsible.ts +6 -0
- package/.nuxt/ui/color-picker.ts +39 -0
- package/.nuxt/ui/command-palette.ts +50 -0
- package/.nuxt/ui/container.ts +3 -0
- package/.nuxt/ui/context-menu.ts +198 -0
- package/.nuxt/ui/drawer.ts +55 -0
- package/.nuxt/ui/dropdown-menu.ts +199 -0
- package/.nuxt/ui/form-field.ts +40 -0
- package/.nuxt/ui/form.ts +3 -0
- package/.nuxt/ui/index.ts +48 -0
- package/.nuxt/ui/input-menu.ts +410 -0
- package/.nuxt/ui/input-number.ts +204 -0
- package/.nuxt/ui/input.ts +263 -0
- package/.nuxt/ui/kbd.ts +19 -0
- package/.nuxt/ui/link.ts +15 -0
- package/.nuxt/ui/modal.ts +28 -0
- package/.nuxt/ui/navigation-menu.ts +390 -0
- package/.nuxt/ui/pagination.ts +8 -0
- package/.nuxt/ui/pin-input.ts +145 -0
- package/.nuxt/ui/popover.ts +6 -0
- package/.nuxt/ui/progress.ts +258 -0
- package/.nuxt/ui/radio-group.ts +112 -0
- package/.nuxt/ui/select-menu.ts +316 -0
- package/.nuxt/ui/select.ts +315 -0
- package/.nuxt/ui/separator.ts +143 -0
- package/.nuxt/ui/skeleton.ts +3 -0
- package/.nuxt/ui/slideover.ts +63 -0
- package/.nuxt/ui/slider.ts +148 -0
- package/.nuxt/ui/stepper.ts +180 -0
- package/.nuxt/ui/switch.ts +113 -0
- package/.nuxt/ui/table.ts +129 -0
- package/.nuxt/ui/tabs.ts +227 -0
- package/.nuxt/ui/textarea.ts +263 -0
- package/.nuxt/ui/toast.ts +66 -0
- package/.nuxt/ui/toaster.ts +75 -0
- package/.nuxt/ui/tooltip.ts +9 -0
- package/README.md +75 -54
- package/cli/commands/{init.mjs → make/component.mjs} +5 -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/templates.mjs +52 -7
- 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/B1fTd_Rf.js +1 -0
- package/dist/client/devtools/_nuxt/CSUxkedg.js +1 -0
- package/dist/client/devtools/_nuxt/CbRTGpb7.js +1 -0
- package/dist/client/devtools/_nuxt/YQTlxbcT.js +53 -0
- package/dist/client/devtools/_nuxt/builds/latest.json +1 -0
- package/dist/client/devtools/_nuxt/builds/meta/b3465abc-0a92-4ee7-ba6b-e5174891fcc0.json +1 -0
- package/dist/client/devtools/_nuxt/entry.DXXceQev.css +1 -0
- package/dist/client/devtools/_nuxt/error-404.BJpkZFyY.css +1 -0
- package/dist/client/devtools/_nuxt/error-500.D3i9VDlt.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 +49 -8
- package/dist/runtime/components/Alert.vue +13 -6
- package/dist/runtime/components/App.vue +20 -7
- package/dist/runtime/components/Avatar.vue +33 -9
- package/dist/runtime/components/AvatarGroup.vue +4 -1
- package/dist/runtime/components/Badge.vue +34 -4
- package/dist/runtime/components/Breadcrumb.vue +52 -13
- package/dist/runtime/components/Button.vue +45 -6
- package/dist/runtime/components/ButtonGroup.vue +5 -2
- package/dist/runtime/components/Calendar.vue +190 -0
- package/dist/runtime/components/Card.vue +4 -1
- package/dist/runtime/components/Carousel.vue +322 -0
- package/dist/runtime/components/Checkbox.vue +28 -33
- package/dist/runtime/components/Chip.vue +9 -2
- package/dist/runtime/components/Collapsible.vue +7 -4
- package/dist/runtime/components/ColorPicker.vue +265 -0
- package/dist/runtime/components/CommandPalette.vue +122 -96
- package/dist/runtime/components/Container.vue +4 -1
- package/dist/runtime/components/ContextMenu.vue +101 -14
- package/dist/runtime/components/ContextMenuContent.vue +48 -18
- package/dist/runtime/components/Drawer.vue +22 -11
- package/dist/runtime/components/DropdownMenu.vue +91 -16
- package/dist/runtime/components/DropdownMenuContent.vue +50 -18
- package/dist/runtime/components/Form.vue +49 -32
- package/dist/runtime/components/FormField.vue +18 -6
- package/dist/runtime/components/Icon.vue +1 -1
- package/dist/runtime/components/Input.vue +15 -6
- package/dist/runtime/components/InputMenu.vue +152 -65
- package/dist/runtime/components/InputNumber.vue +192 -0
- package/dist/runtime/components/Kbd.vue +3 -1
- package/dist/runtime/components/Link.vue +71 -8
- package/dist/runtime/components/LinkBase.vue +10 -7
- package/dist/runtime/components/Modal.vue +23 -11
- package/dist/runtime/components/NavigationMenu.vue +170 -75
- package/dist/runtime/components/Pagination.vue +31 -15
- package/dist/runtime/components/PinInput.vue +96 -0
- package/dist/runtime/components/Popover.vue +26 -7
- package/dist/runtime/components/Progress.vue +25 -8
- package/dist/runtime/components/RadioGroup.vue +28 -7
- package/dist/runtime/components/Select.vue +79 -32
- package/dist/runtime/components/SelectMenu.vue +164 -80
- package/dist/runtime/components/Separator.vue +3 -3
- package/dist/runtime/components/Skeleton.vue +4 -1
- package/dist/runtime/components/Slideover.vue +23 -11
- package/dist/runtime/components/Slider.vue +3 -3
- package/dist/runtime/components/Stepper.vue +171 -0
- package/dist/runtime/components/Switch.vue +16 -16
- package/dist/runtime/components/Table.vue +262 -0
- package/dist/runtime/components/Tabs.vue +42 -15
- package/dist/runtime/components/Textarea.vue +9 -3
- package/dist/runtime/components/Toast.vue +13 -5
- package/dist/runtime/components/Toaster.vue +31 -16
- package/dist/runtime/components/Tooltip.vue +9 -6
- 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 +2 -8
- 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 +8 -4
- package/dist/runtime/composables/useFormField.js +2 -1
- 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 +53 -0
- package/dist/runtime/locale/cs.d.ts +2 -0
- package/dist/runtime/locale/cs.js +52 -0
- package/dist/runtime/locale/de.d.ts +2 -0
- package/dist/runtime/locale/de.js +52 -0
- package/dist/runtime/locale/en.d.ts +2 -0
- package/dist/runtime/locale/en.js +52 -0
- package/dist/runtime/locale/es.d.ts +2 -0
- package/dist/runtime/locale/es.js +52 -0
- package/dist/runtime/locale/fa_ir.d.ts +2 -0
- package/dist/runtime/locale/fa_ir.js +53 -0
- package/dist/runtime/locale/fr.d.ts +2 -0
- package/dist/runtime/locale/fr.js +52 -0
- package/dist/runtime/locale/index.d.ts +19 -0
- package/dist/runtime/locale/index.js +19 -0
- package/dist/runtime/locale/it.d.ts +2 -0
- package/dist/runtime/locale/it.js +52 -0
- package/dist/runtime/locale/ja.d.ts +2 -0
- package/dist/runtime/locale/ja.js +52 -0
- package/dist/runtime/locale/ko.d.ts +2 -0
- package/dist/runtime/locale/ko.js +52 -0
- package/dist/runtime/locale/nl.d.ts +2 -0
- package/dist/runtime/locale/nl.js +52 -0
- package/dist/runtime/locale/pl.d.ts +2 -0
- package/dist/runtime/locale/pl.js +52 -0
- package/dist/runtime/locale/pt.d.ts +2 -0
- package/dist/runtime/locale/pt.js +52 -0
- package/dist/runtime/locale/pt_br.d.ts +2 -0
- package/dist/runtime/locale/pt_br.js +52 -0
- package/dist/runtime/locale/ru.d.ts +2 -0
- package/dist/runtime/locale/ru.js +52 -0
- package/dist/runtime/locale/sk.d.ts +2 -0
- package/dist/runtime/locale/sk.js +52 -0
- package/dist/runtime/locale/tr.d.ts +2 -0
- package/dist/runtime/locale/tr.js +52 -0
- package/dist/runtime/locale/zh_hans.d.ts +2 -0
- package/dist/runtime/locale/zh_hans.js +52 -0
- package/dist/runtime/locale/zh_hant.d.ts +2 -0
- package/dist/runtime/locale/zh_hant.js +52 -0
- package/dist/runtime/plugins/colors.js +12 -8
- package/dist/runtime/types/form.d.ts +9 -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 +54 -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/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.CwmIkD_Y.cjs +3269 -0
- package/dist/shared/ui.D_93iuwH.mjs +3262 -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 +98 -31
- 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
|
@@ -11,6 +11,11 @@ const textarea = tv({ extend: tv(theme), ...(appConfig.ui?.textarea || {}) })
|
|
|
11
11
|
type TextareaVariants = VariantProps<typeof textarea>
|
|
12
12
|
|
|
13
13
|
export interface TextareaProps {
|
|
14
|
+
/**
|
|
15
|
+
* The element or component this component should render as.
|
|
16
|
+
* @defaultValue 'div'
|
|
17
|
+
*/
|
|
18
|
+
as?: any
|
|
14
19
|
id?: string
|
|
15
20
|
name?: string
|
|
16
21
|
/** The placeholder text when the textarea is empty. */
|
|
@@ -44,6 +49,7 @@ export interface TextareaSlots {
|
|
|
44
49
|
|
|
45
50
|
<script setup lang="ts">
|
|
46
51
|
import { ref, computed, onMounted, nextTick, watch } from 'vue'
|
|
52
|
+
import { Primitive } from 'reka-ui'
|
|
47
53
|
import { useFormField } from '../composables/useFormField'
|
|
48
54
|
import { looseToNumber } from '../utils'
|
|
49
55
|
|
|
@@ -151,7 +157,7 @@ function autoResize() {
|
|
|
151
157
|
}
|
|
152
158
|
}
|
|
153
159
|
|
|
154
|
-
watch(
|
|
160
|
+
watch(modelValue, () => {
|
|
155
161
|
nextTick(autoResize)
|
|
156
162
|
})
|
|
157
163
|
|
|
@@ -167,7 +173,7 @@ onMounted(() => {
|
|
|
167
173
|
</script>
|
|
168
174
|
|
|
169
175
|
<template>
|
|
170
|
-
<
|
|
176
|
+
<Primitive :as="as" :class="ui.root({ class: [props.class, props.ui?.root] })">
|
|
171
177
|
<textarea
|
|
172
178
|
:id="id"
|
|
173
179
|
ref="textareaRef"
|
|
@@ -185,5 +191,5 @@ onMounted(() => {
|
|
|
185
191
|
/>
|
|
186
192
|
|
|
187
193
|
<slot />
|
|
188
|
-
</
|
|
194
|
+
</Primitive>
|
|
189
195
|
</template>
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { tv, type VariantProps } from 'tailwind-variants'
|
|
3
|
-
import type { ToastRootProps, ToastRootEmits } from '
|
|
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'
|
|
7
8
|
import type { AvatarProps, ButtonProps } from '../types'
|
|
8
9
|
|
|
9
10
|
const appConfig = _appConfig as AppConfig & { ui: { toast: Partial<typeof theme> } }
|
|
@@ -27,11 +28,12 @@ export interface ToastProps extends Pick<ToastRootProps, 'defaultOpen' | 'open'
|
|
|
27
28
|
* Display a list of actions:
|
|
28
29
|
* - under the title and description if multiline
|
|
29
30
|
* - next to the close button if not multiline
|
|
31
|
+
* `{ size: 'xs' }`{lang="ts-type"}
|
|
30
32
|
*/
|
|
31
33
|
actions?: ButtonProps[]
|
|
32
34
|
/**
|
|
33
35
|
* Display a close button to dismiss the toast.
|
|
34
|
-
* `{ size: 'md', color: '
|
|
36
|
+
* `{ size: 'md', color: 'neutral', variant: 'link' }`{lang="ts-type"}
|
|
35
37
|
* @defaultValue true
|
|
36
38
|
*/
|
|
37
39
|
close?: ButtonProps | boolean
|
|
@@ -53,15 +55,19 @@ export interface ToastSlots {
|
|
|
53
55
|
actions(props?: {}): any
|
|
54
56
|
close(props: { ui: any }): any
|
|
55
57
|
}
|
|
58
|
+
|
|
59
|
+
extendDevtoolsMeta<ToastProps>({ ignore: true })
|
|
56
60
|
</script>
|
|
57
61
|
|
|
58
62
|
<script setup lang="ts">
|
|
59
63
|
import { ref, computed, onMounted } from 'vue'
|
|
60
|
-
import { ToastRoot, ToastTitle, ToastDescription, ToastAction, ToastClose, useForwardPropsEmits } from '
|
|
64
|
+
import { ToastRoot, ToastTitle, ToastDescription, ToastAction, ToastClose, useForwardPropsEmits } from 'reka-ui'
|
|
61
65
|
import { reactivePick } from '@vueuse/core'
|
|
62
66
|
import { useAppConfig } from '#imports'
|
|
67
|
+
import { useLocale } from '../composables/useLocale'
|
|
63
68
|
import UIcon from './Icon.vue'
|
|
64
69
|
import UAvatar from './Avatar.vue'
|
|
70
|
+
import UButton from './Button.vue'
|
|
65
71
|
|
|
66
72
|
const props = withDefaults(defineProps<ToastProps>(), {
|
|
67
73
|
close: true
|
|
@@ -69,7 +75,9 @@ const props = withDefaults(defineProps<ToastProps>(), {
|
|
|
69
75
|
const emits = defineEmits<ToastEmits>()
|
|
70
76
|
const slots = defineSlots<ToastSlots>()
|
|
71
77
|
|
|
78
|
+
const { t } = useLocale()
|
|
72
79
|
const appConfig = useAppConfig()
|
|
80
|
+
|
|
73
81
|
const rootProps = useForwardPropsEmits(reactivePick(props, 'as', 'defaultOpen', 'open', 'duration', 'type'), emits)
|
|
74
82
|
|
|
75
83
|
const multiline = computed(() => !!props.title && !!props.description)
|
|
@@ -145,9 +153,9 @@ defineExpose({
|
|
|
145
153
|
v-if="close"
|
|
146
154
|
:icon="closeIcon || appConfig.ui.icons.close"
|
|
147
155
|
size="md"
|
|
148
|
-
color="
|
|
156
|
+
color="neutral"
|
|
149
157
|
variant="link"
|
|
150
|
-
aria-label="
|
|
158
|
+
:aria-label="t('toast.close')"
|
|
151
159
|
v-bind="typeof close === 'object' ? close : undefined"
|
|
152
160
|
:class="ui.close({ class: props.ui?.close })"
|
|
153
161
|
@click.stop
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { tv, type VariantProps } from 'tailwind-variants'
|
|
3
|
-
import type { ToastProviderProps } from '
|
|
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'
|
|
7
8
|
|
|
8
9
|
const appConfig = _appConfig as AppConfig & { ui: { toaster: Partial<typeof theme> } }
|
|
9
10
|
|
|
@@ -18,6 +19,11 @@ export interface ToasterProps extends Omit<ToastProviderProps, 'swipeDirection'>
|
|
|
18
19
|
* @defaultValue true
|
|
19
20
|
*/
|
|
20
21
|
expand?: boolean
|
|
22
|
+
/**
|
|
23
|
+
* Render the toaster in a portal.
|
|
24
|
+
* @defaultValue true
|
|
25
|
+
*/
|
|
26
|
+
portal?: boolean
|
|
21
27
|
class?: any
|
|
22
28
|
ui?: Partial<typeof toaster.slots>
|
|
23
29
|
}
|
|
@@ -25,18 +31,25 @@ export interface ToasterProps extends Omit<ToastProviderProps, 'swipeDirection'>
|
|
|
25
31
|
export interface ToasterSlots {
|
|
26
32
|
default(props?: {}): any
|
|
27
33
|
}
|
|
34
|
+
|
|
35
|
+
export default {
|
|
36
|
+
name: 'Toaster'
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
extendDevtoolsMeta({ example: 'ToasterExample' })
|
|
28
40
|
</script>
|
|
29
41
|
|
|
30
42
|
<script setup lang="ts">
|
|
31
43
|
import { ref, computed } from 'vue'
|
|
32
|
-
import { ToastProvider, ToastViewport, useForwardProps } from '
|
|
44
|
+
import { ToastProvider, ToastViewport, ToastPortal, useForwardProps } from 'reka-ui'
|
|
33
45
|
import { reactivePick } from '@vueuse/core'
|
|
34
46
|
import { useToast } from '../composables/useToast'
|
|
35
|
-
import UToast from './Toast.vue'
|
|
36
47
|
import { omit } from '../utils'
|
|
48
|
+
import UToast from './Toast.vue'
|
|
37
49
|
|
|
38
50
|
const props = withDefaults(defineProps<ToasterProps>(), {
|
|
39
51
|
expand: true,
|
|
52
|
+
portal: true,
|
|
40
53
|
duration: 5000
|
|
41
54
|
})
|
|
42
55
|
defineSlots<ToasterSlots>()
|
|
@@ -113,18 +126,20 @@ function getOffset(index: number) {
|
|
|
113
126
|
@click="toast.click && toast.click(toast)"
|
|
114
127
|
/>
|
|
115
128
|
|
|
116
|
-
<
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
+
<ToastPortal :disabled="!portal">
|
|
130
|
+
<ToastViewport
|
|
131
|
+
:data-expanded="expanded"
|
|
132
|
+
:class="ui.viewport({ class: [props.class, props.ui?.viewport] })"
|
|
133
|
+
:style="{
|
|
134
|
+
'--scale-factor': '0.05',
|
|
135
|
+
'--translate-factor': position?.startsWith('top') ? '1px' : '-1px',
|
|
136
|
+
'--gap': position?.startsWith('top') ? '16px' : '-16px',
|
|
137
|
+
'--front-height': `${frontHeight}px`,
|
|
138
|
+
'--height': `${height}px`
|
|
139
|
+
}"
|
|
140
|
+
@mouseenter="hovered = true"
|
|
141
|
+
@mouseleave="hovered = false"
|
|
142
|
+
/>
|
|
143
|
+
</ToastPortal>
|
|
129
144
|
</ToastProvider>
|
|
130
145
|
</template>
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { tv } from 'tailwind-variants'
|
|
3
|
-
import type { TooltipRootProps, TooltipRootEmits, TooltipContentProps, TooltipArrowProps } from '
|
|
3
|
+
import type { TooltipRootProps, TooltipRootEmits, TooltipContentProps, TooltipArrowProps } 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/tooltip'
|
|
7
|
+
import { extendDevtoolsMeta } from '../composables/extendDevtoolsMeta'
|
|
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,6 +1,5 @@
|
|
|
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) {
|
|
@@ -9,7 +8,7 @@ export function extractShortcuts(items) {
|
|
|
9
8
|
items2.forEach((item) => {
|
|
10
9
|
if (item.kbds?.length && (item.select || item.click)) {
|
|
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,8 +1,8 @@
|
|
|
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;
|
|
@@ -17,7 +17,11 @@ export declare const formOptionsInjectionKey: InjectionKey<ComputedRef<FormInjec
|
|
|
17
17
|
export declare const formBusInjectionKey: InjectionKey<UseEventBusReturn<FormEvent, string>>;
|
|
18
18
|
export declare const formFieldInjectionKey: InjectionKey<ComputedRef<FormFieldInjectedOptions<FormFieldProps>>>;
|
|
19
19
|
export declare const inputIdInjectionKey: InjectionKey<Ref<string | undefined>>;
|
|
20
|
-
export declare const formInputsInjectionKey: InjectionKey<Ref<Record<string,
|
|
20
|
+
export declare const formInputsInjectionKey: InjectionKey<Ref<Record<string, {
|
|
21
|
+
id?: string;
|
|
22
|
+
pattern?: RegExp;
|
|
23
|
+
}>>>;
|
|
24
|
+
export declare const formLoadingInjectionKey: InjectionKey<Readonly<Ref<boolean>>>;
|
|
21
25
|
export declare function useFormField<T>(props?: Props<T>, opts?: {
|
|
22
26
|
bind?: boolean;
|
|
23
27
|
}): {
|
|
@@ -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,7 +19,7 @@ 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
25
|
const blurred = ref(false);
|
|
@@ -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 {};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import { reactive, computed, onMounted } from "vue";
|
|
1
2
|
import { createSharedComposable } from "@vueuse/core";
|
|
2
|
-
import { ref, computed, onMounted } from "vue";
|
|
3
3
|
export const kbdKeysMap = {
|
|
4
4
|
meta: "",
|
|
5
|
+
ctrl: "",
|
|
6
|
+
alt: "",
|
|
7
|
+
win: "\u229E",
|
|
5
8
|
command: "\u2318",
|
|
6
9
|
shift: "\u21E7",
|
|
7
|
-
ctrl: "\u2303",
|
|
8
10
|
option: "\u2325",
|
|
9
|
-
alt: "\u2387",
|
|
10
11
|
enter: "\u21B5",
|
|
11
12
|
delete: "\u2326",
|
|
12
13
|
backspace: "\u232B",
|
|
@@ -24,22 +25,27 @@ export const kbdKeysMap = {
|
|
|
24
25
|
};
|
|
25
26
|
const _useKbd = () => {
|
|
26
27
|
const macOS = computed(() => import.meta.client && navigator && navigator.userAgent && navigator.userAgent.match(/Macintosh;/));
|
|
27
|
-
const
|
|
28
|
+
const kbdKeysSpecificMap = reactive({
|
|
29
|
+
meta: " ",
|
|
30
|
+
alt: " ",
|
|
31
|
+
ctrl: " "
|
|
32
|
+
});
|
|
28
33
|
onMounted(() => {
|
|
29
|
-
|
|
34
|
+
kbdKeysSpecificMap.meta = macOS.value ? kbdKeysMap.command : kbdKeysMap.win;
|
|
35
|
+
kbdKeysSpecificMap.alt = macOS.value ? kbdKeysMap.option : "alt";
|
|
36
|
+
kbdKeysSpecificMap.ctrl = macOS.value ? "\u2303" : "ctrl";
|
|
30
37
|
});
|
|
31
38
|
function getKbdKey(value) {
|
|
32
39
|
if (!value) {
|
|
33
40
|
return;
|
|
34
41
|
}
|
|
35
|
-
if (
|
|
36
|
-
return
|
|
42
|
+
if (["meta", "alt", "ctrl"].includes(value)) {
|
|
43
|
+
return kbdKeysSpecificMap[value];
|
|
37
44
|
}
|
|
38
45
|
return kbdKeysMap[value] || value.toUpperCase();
|
|
39
46
|
}
|
|
40
47
|
return {
|
|
41
48
|
macOS,
|
|
42
|
-
metaSymbol,
|
|
43
49
|
getKbdKey
|
|
44
50
|
};
|
|
45
51
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { InjectionKey, Ref } from 'vue';
|
|
2
|
+
import type { Locale } from '../types/locale';
|
|
3
|
+
export declare const localeContextInjectionKey: InjectionKey<Ref<Locale | undefined>>;
|
|
4
|
+
export declare const useLocale: (localeOverrides?: Ref<Locale | undefined>) => import("../utils/locale").LocaleContext;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { computed, inject, ref } from "vue";
|
|
2
|
+
import { buildLocaleContext } from "../utils/locale.js";
|
|
3
|
+
import en from "../locale/en.js";
|
|
4
|
+
import { createSharedComposable } from "@vueuse/core";
|
|
5
|
+
export const localeContextInjectionKey = Symbol("nuxt-ui.locale-context");
|
|
6
|
+
const _useLocale = (localeOverrides) => {
|
|
7
|
+
const locale = localeOverrides || inject(localeContextInjectionKey, ref());
|
|
8
|
+
return buildLocaleContext(computed(() => locale.value || en));
|
|
9
|
+
};
|
|
10
|
+
export const useLocale = createSharedComposable(_useLocale);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ShallowRef, Component, InjectionKey } from 'vue';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
2
|
+
import type { ComponentProps } from 'vue-component-type-helpers';
|
|
3
|
+
import type { ModalProps } from '../types';
|
|
4
4
|
export interface ModalState {
|
|
5
5
|
component: Component | string;
|
|
6
6
|
props: ModalProps;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ShallowRef, Component, InjectionKey } from 'vue';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
2
|
+
import type { ComponentProps } from 'vue-component-type-helpers';
|
|
3
|
+
import type { SlideoverProps } from '../types';
|
|
4
4
|
export interface SlideoverState {
|
|
5
5
|
component: Component | string;
|
|
6
6
|
props: SlideoverProps;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ToastProps } from '../types
|
|
1
|
+
import type { ToastProps } from '../types';
|
|
2
2
|
export interface Toast extends Omit<ToastProps, 'defaultOpen'> {
|
|
3
3
|
id: string | number;
|
|
4
4
|
click?: (toast: Toast) => void;
|
|
@@ -6,7 +6,7 @@ export interface Toast extends Omit<ToastProps, 'defaultOpen'> {
|
|
|
6
6
|
export declare function useToast(): {
|
|
7
7
|
toasts: import("vue").Ref<Toast[], Toast[]>;
|
|
8
8
|
add: (toast: Partial<Toast>) => Toast;
|
|
9
|
-
update: (id: string | number, toast: Partial<Toast>) => void;
|
|
9
|
+
update: (id: string | number, toast: Omit<Partial<Toast>, "id">) => void;
|
|
10
10
|
remove: (id: string | number) => void;
|
|
11
11
|
clear: () => void;
|
|
12
12
|
};
|
package/dist/runtime/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@
|
|
1
|
+
@import "./keyframes.css";@variant dark (&:where(.dark, .dark *));@layer base{body{@apply antialiased text-[var(--ui-text)] bg-[var(--ui-bg)] scheme-light dark:scheme-dark}:root{--ui-text-dimmed:var(--ui-color-neutral-400);--ui-text-muted:var(--ui-color-neutral-500);--ui-text-toned:var(--ui-color-neutral-600);--ui-text:var(--ui-color-neutral-700);--ui-text-highlighted:var(--ui-color-neutral-900);--ui-bg:var(--color-white);--ui-bg-muted:var(--ui-color-neutral-50);--ui-bg-elevated:var(--ui-color-neutral-100);--ui-bg-accented:var(--ui-color-neutral-200);--ui-bg-inverted:var(--ui-color-neutral-900);--ui-border:var(--ui-color-neutral-200);--ui-border-muted:var(--ui-color-neutral-200);--ui-border-accented:var(--ui-color-neutral-300);--ui-border-inverted:var(--ui-color-neutral-900);--ui-radius:var(--radius-sm);--ui-container:var(--container-7xl)}.dark{--ui-text-dimmed:var(--ui-color-neutral-500);--ui-text-muted:var(--ui-color-neutral-400);--ui-text-toned:var(--ui-color-neutral-300);--ui-text:var(--ui-color-neutral-200);--ui-text-highlighted:var(--color-white);--ui-bg:var(--ui-color-neutral-900);--ui-bg-muted:var(--ui-color-neutral-800);--ui-bg-elevated:var(--ui-color-neutral-800);--ui-bg-accented:var(--ui-color-neutral-700);--ui-bg-inverted:var(--color-white);--ui-border:var(--ui-color-neutral-800);--ui-border-muted:var(--ui-color-neutral-700);--ui-border-accented:var(--ui-color-neutral-700);--ui-border-inverted:var(--color-white)}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@keyframes accordion-up{0%{height:var(--reka-accordion-content-height)}to{height:0}}@keyframes accordion-down{0%{height:0}to{height:var(--reka-accordion-content-height)}}@keyframes collapsible-up{0%{height:var(--reka-collapsible-content-height)}to{height:0}}@keyframes collapsible-down{0%{height:0}to{height:var(--reka-collapsible-content-height)}}@keyframes toast-collapsed-closed{0%{transform:var(--transform)}to{transform:translateY(calc((var(--before) - var(--height))*var(--gap))) scale(var(--scale))}}@keyframes toast-closed{0%{transform:var(--transform)}to{transform:translateY(calc((var(--offset) - var(--height))*var(--translate-factor)))}}@keyframes toast-slide-left{0%{transform:translateX(0) translateY(var(--translate))}to{transform:translateX(-100%) translateY(var(--translate))}}@keyframes toast-slide-right{0%{transform:translateX(0) translateY(var(--translate))}to{transform:translateX(100%) translateY(var(--translate))}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-out{0%{opacity:1}to{opacity:0}}@keyframes scale-in{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes scale-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.95)}}@keyframes slide-in-from-top{0%{transform:translateY(-100%)}to{transform:translateY(0)}}@keyframes slide-out-to-top{0%{transform:translateY(0)}to{transform:translateY(-100%)}}@keyframes slide-in-from-right{0%{transform:translateX(100%)}to{transform:translateX(0)}}@keyframes slide-out-to-right{0%{transform:translateX(0)}to{transform:translateX(100%)}}@keyframes slide-in-from-bottom{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slide-out-to-bottom{0%{transform:translateY(0)}to{transform:translateY(100%)}}@keyframes slide-in-from-left{0%{transform:translateX(-100%)}to{transform:translateX(0)}}@keyframes slide-out-to-left{0%{transform:translateX(0)}to{transform:translateX(-100%)}}@keyframes slide-in-from-top-and-fade{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@keyframes slide-out-to-top-and-fade{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-4px)}}@keyframes slide-in-from-right-and-fade{0%{opacity:0;transform:translateX(4px)}to{opacity:1;transform:translateX(0)}}@keyframes slide-out-to-right-and-fade{0%{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(4px)}}@keyframes slide-in-from-bottom-and-fade{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@keyframes slide-out-to-bottom-and-fade{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(4px)}}@keyframes slide-in-from-left-and-fade{0%{opacity:0;transform:translateX(-4px)}to{opacity:1;transform:translateX(0)}}@keyframes slide-out-to-left-and-fade{0%{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-4px)}}@keyframes enter-from-right{0%{opacity:0;transform:translateX(200px)}to{opacity:1;transform:translateX(0)}}@keyframes enter-from-left{0%{opacity:0;transform:translateX(-200px)}to{opacity:1;transform:translateX(0)}}@keyframes exit-to-right{0%{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(200px)}}@keyframes exit-to-left{0%{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(-200px)}}@keyframes carousel{0%,to{width:50%}0%{transform:translateX(-100%)}to{transform:translateX(200%)}}@keyframes carousel-rtl{0%,to{width:50%}0%{transform:translateX(100%)}to{transform:translateX(-200%)}}@keyframes carousel-vertical{0%,to{height:50%}0%{transform:translateY(-100%)}to{transform:translateY(200%)}}@keyframes carousel-inverse{0%,to{width:50%}0%{transform:translateX(200%)}to{transform:translateX(-100%)}}@keyframes carousel-inverse-rtl{0%,to{width:50%}0%{transform:translateX(-200%)}to{transform:translateX(100%)}}@keyframes carousel-inverse-vertical{0%,to{height:50%}0%{transform:translateY(200%)}to{transform:translateY(-100%)}}@keyframes swing{0%,to{width:50%}0%,to{transform:translateX(-25%)}50%{transform:translateX(125%)}}@keyframes swing-vertical{0%,to{height:50%}0%,to{transform:translateY(-25%)}50%{transform:translateY(125%)}}@keyframes elastic{0%,to{margin-left:25%;width:50%}50%{margin-left:5%;width:90%}}@keyframes elastic-vertical{0%,to{height:50%;margin-top:25%}50%{height:90%;margin-top:5%}}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { defineLocale } from "../composables/defineLocale.js";
|
|
2
|
+
export default defineLocale({
|
|
3
|
+
name: "\u0627\u0644\u0639\u0631\u0628\u064A\u0629",
|
|
4
|
+
code: "ar",
|
|
5
|
+
dir: "rtl",
|
|
6
|
+
messages: {
|
|
7
|
+
inputMenu: {
|
|
8
|
+
noMatch: "\u0644\u0627 \u062A\u0648\u062C\u062F \u0646\u062A\u0627\u0626\u062C \u0645\u0637\u0627\u0628\u0642\u0629",
|
|
9
|
+
noData: "\u0644\u0627 \u062A\u0648\u062C\u062F \u0628\u064A\u0627\u0646\u0627\u062A",
|
|
10
|
+
create: '\u0625\u0646\u0634\u0627\u0621 "{label}"'
|
|
11
|
+
},
|
|
12
|
+
calendar: {
|
|
13
|
+
prevYear: "\u0627\u0644\u0633\u0646\u0629 \u0627\u0644\u0633\u0627\u0628\u0642\u0629",
|
|
14
|
+
nextYear: "\u0627\u0644\u0633\u0646\u0629 \u0627\u0644\u0645\u0642\u0628\u0644\u0629",
|
|
15
|
+
prevMonth: "\u0627\u0644\u0634\u0647\u0631 \u0627\u0644\u0633\u0627\u0628\u0642",
|
|
16
|
+
nextMonth: "\u0627\u0644\u0634\u0647\u0631 \u0627\u0644\u0645\u0642\u0628\u0644"
|
|
17
|
+
},
|
|
18
|
+
inputNumber: {
|
|
19
|
+
increment: "\u0632\u064A\u0627\u062F\u0629",
|
|
20
|
+
decrement: "\u062A\u0642\u0644\u064A\u0644"
|
|
21
|
+
},
|
|
22
|
+
commandPalette: {
|
|
23
|
+
noMatch: "\u0644\u0627 \u062A\u0648\u062C\u062F \u0646\u062A\u0627\u0626\u062C \u0645\u0637\u0627\u0628\u0642\u0629",
|
|
24
|
+
noData: "\u0644\u0627 \u062A\u0648\u062C\u062F \u0628\u064A\u0627\u0646\u0627\u062A",
|
|
25
|
+
close: "\u0625\u063A\u0644\u0627\u0642"
|
|
26
|
+
},
|
|
27
|
+
selectMenu: {
|
|
28
|
+
noMatch: "\u0644\u0627 \u062A\u0648\u062C\u062F \u0646\u062A\u0627\u0626\u062C \u0645\u0637\u0627\u0628\u0642\u0629",
|
|
29
|
+
noData: "\u0644\u0627 \u062A\u0648\u062C\u062F \u0628\u064A\u0627\u0646\u0627\u062A",
|
|
30
|
+
create: '\u0625\u0646\u0634\u0627\u0621 "{label}"'
|
|
31
|
+
},
|
|
32
|
+
toast: {
|
|
33
|
+
close: "\u0625\u063A\u0644\u0627\u0642"
|
|
34
|
+
},
|
|
35
|
+
carousel: {
|
|
36
|
+
prev: "\u0627\u0644\u0633\u0627\u0628\u0642",
|
|
37
|
+
next: "\u0627\u0644\u062A\u0627\u0644\u064A",
|
|
38
|
+
goto: "\u0627\u0644\u0630\u0647\u0627\u0628 \u0625\u0644\u064A \u0634\u0631\u064A\u062D\u0629 {slide}"
|
|
39
|
+
},
|
|
40
|
+
modal: {
|
|
41
|
+
close: "\u0625\u063A\u0644\u0627\u0642"
|
|
42
|
+
},
|
|
43
|
+
slideover: {
|
|
44
|
+
close: "\u0625\u063A\u0644\u0627\u0642"
|
|
45
|
+
},
|
|
46
|
+
alert: {
|
|
47
|
+
close: "\u0625\u063A\u0644\u0627\u0642"
|
|
48
|
+
},
|
|
49
|
+
table: {
|
|
50
|
+
noData: "\u0644\u0627 \u062A\u0648\u062C\u062F \u0628\u064A\u0627\u0646\u0627\u062A"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
});
|