@eslamdevui/ui 3.2.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.nuxt/ui/accordion.ts +20 -0
- package/.nuxt/ui/alert.ts +264 -0
- package/.nuxt/ui/avatar-group.ts +52 -0
- package/.nuxt/ui/avatar.ts +54 -0
- package/.nuxt/ui/badge.ts +263 -0
- package/.nuxt/ui/breadcrumb.ts +45 -0
- package/.nuxt/ui/button-group.ts +16 -0
- package/.nuxt/ui/button.ts +378 -0
- package/.nuxt/ui/calendar.ts +103 -0
- package/.nuxt/ui/card.ts +34 -0
- package/.nuxt/ui/carousel.ts +38 -0
- package/.nuxt/ui/chat-message.ts +129 -0
- package/.nuxt/ui/chat-messages.ts +14 -0
- package/.nuxt/ui/chat-prompt-submit.ts +5 -0
- package/.nuxt/ui/chat-prompt.ts +35 -0
- package/.nuxt/ui/checkbox-group.ts +204 -0
- package/.nuxt/ui/checkbox.ts +236 -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 +51 -0
- package/.nuxt/ui/container.ts +3 -0
- package/.nuxt/ui/content-navigation.ts +339 -0
- package/.nuxt/ui/content-search-button.ts +6 -0
- package/.nuxt/ui/content-search.ts +6 -0
- package/.nuxt/ui/content-surround.ts +34 -0
- package/.nuxt/ui/content-toc.ts +150 -0
- package/.nuxt/ui/context-menu.ts +217 -0
- package/.nuxt/ui/dashboard-group.ts +3 -0
- package/.nuxt/ui/dashboard-navbar.ts +21 -0
- package/.nuxt/ui/dashboard-panel.ts +17 -0
- package/.nuxt/ui/dashboard-resize-handle.ts +3 -0
- package/.nuxt/ui/dashboard-search-button.ts +6 -0
- package/.nuxt/ui/dashboard-search.ts +6 -0
- package/.nuxt/ui/dashboard-sidebar-collapse.ts +9 -0
- package/.nuxt/ui/dashboard-sidebar-toggle.ts +9 -0
- package/.nuxt/ui/dashboard-sidebar.ts +37 -0
- package/.nuxt/ui/drawer.ts +126 -0
- package/.nuxt/ui/dropdown-menu.ts +218 -0
- package/.nuxt/ui/form-field.ts +48 -0
- package/.nuxt/ui/form.ts +3 -0
- package/.nuxt/ui/index.ts +71 -0
- package/.nuxt/ui/input-menu.ts +450 -0
- package/.nuxt/ui/input-number.ts +245 -0
- package/.nuxt/ui/input-tags.ts +310 -0
- package/.nuxt/ui/input.ts +289 -0
- package/.nuxt/ui/kbd.ts +31 -0
- package/.nuxt/ui/link.ts +22 -0
- package/.nuxt/ui/modal.ts +29 -0
- package/.nuxt/ui/navigation-menu.ts +510 -0
- package/.nuxt/ui/pagination.ts +13 -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/prose.ts +321 -0
- package/.nuxt/ui/radio-group.ts +350 -0
- package/.nuxt/ui/select-menu.ts +351 -0
- package/.nuxt/ui/select.ts +346 -0
- package/.nuxt/ui/separator.ts +172 -0
- package/.nuxt/ui/skeleton.ts +3 -0
- package/.nuxt/ui/slideover.ts +71 -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 +148 -0
- package/.nuxt/ui/tabs.ts +256 -0
- package/.nuxt/ui/textarea.ts +294 -0
- package/.nuxt/ui/timeline.ts +321 -0
- package/.nuxt/ui/toast.ts +81 -0
- package/.nuxt/ui/toaster.ts +91 -0
- package/.nuxt/ui/tooltip.ts +9 -0
- package/.nuxt/ui/tree.ts +154 -0
- package/.nuxt/ui.css +146 -0
- package/LICENSE.md +9 -0
- package/README.md +147 -0
- package/cli/commands/make/component.mjs +95 -0
- package/cli/commands/make/index.mjs +14 -0
- package/cli/commands/make/locale.mjs +64 -0
- package/cli/index.mjs +15 -0
- package/cli/package.json +13 -0
- package/cli/templates.mjs +228 -0
- package/cli/utils.mjs +31 -0
- package/dist/module.d.mts +63 -0
- package/dist/module.json +13 -0
- package/dist/module.mjs +135 -0
- package/dist/runtime/components/Accordion.vue +73 -0
- package/dist/runtime/components/Accordion.vue.d.ts +77 -0
- package/dist/runtime/components/Alert.vue +88 -0
- package/dist/runtime/components/Alert.vue.d.ts +81 -0
- package/dist/runtime/components/App.vue +44 -0
- package/dist/runtime/components/App.vue.d.ts +24 -0
- package/dist/runtime/components/Avatar.vue +83 -0
- package/dist/runtime/components/Avatar.vue.d.ts +41 -0
- package/dist/runtime/components/AvatarGroup.vue +65 -0
- package/dist/runtime/components/AvatarGroup.vue.d.ts +31 -0
- package/dist/runtime/components/Badge.vue +60 -0
- package/dist/runtime/components/Badge.vue.d.ts +43 -0
- package/dist/runtime/components/Breadcrumb.vue +65 -0
- package/dist/runtime/components/Breadcrumb.vue.d.ts +66 -0
- package/dist/runtime/components/Button.vue +147 -0
- package/dist/runtime/components/Button.vue.d.ts +48 -0
- package/dist/runtime/components/ButtonGroup.vue +31 -0
- package/dist/runtime/components/ButtonGroup.vue.d.ts +34 -0
- package/dist/runtime/components/Calendar.vue +154 -0
- package/dist/runtime/components/Calendar.vue.d.ts +111 -0
- package/dist/runtime/components/Card.vue +37 -0
- package/dist/runtime/components/Card.vue.d.ts +29 -0
- package/dist/runtime/components/Carousel.vue +210 -0
- package/dist/runtime/components/Carousel.vue.d.ts +127 -0
- package/dist/runtime/components/ChatMessage.vue +87 -0
- package/dist/runtime/components/ChatMessage.vue.d.ts +130 -0
- package/dist/runtime/components/ChatMessages.vue +225 -0
- package/dist/runtime/components/ChatMessages.vue.d.ts +83 -0
- package/dist/runtime/components/ChatPrompt.vue +77 -0
- package/dist/runtime/components/ChatPrompt.vue.d.ts +60 -0
- package/dist/runtime/components/ChatPromptSubmit.vue +74 -0
- package/dist/runtime/components/ChatPromptSubmit.vue.d.ts +99 -0
- package/dist/runtime/components/Checkbox.vue +90 -0
- package/dist/runtime/components/Checkbox.vue.d.ts +73 -0
- package/dist/runtime/components/CheckboxGroup.vue +124 -0
- package/dist/runtime/components/CheckboxGroup.vue.d.ts +84 -0
- package/dist/runtime/components/Chip.vue +48 -0
- package/dist/runtime/components/Chip.vue.d.ts +57 -0
- package/dist/runtime/components/Collapsible.vue +37 -0
- package/dist/runtime/components/Collapsible.vue.d.ts +35 -0
- package/dist/runtime/components/ColorPicker.vue +216 -0
- package/dist/runtime/components/ColorPicker.vue.d.ts +48 -0
- package/dist/runtime/components/CommandPalette.vue +275 -0
- package/dist/runtime/components/CommandPalette.vue.d.ts +187 -0
- package/dist/runtime/components/Container.vue +23 -0
- package/dist/runtime/components/Container.vue.d.ts +18 -0
- package/dist/runtime/components/ContextMenu.vue +61 -0
- package/dist/runtime/components/ContextMenu.vue.d.ts +109 -0
- package/dist/runtime/components/ContextMenuContent.vue +164 -0
- package/dist/runtime/components/ContextMenuContent.vue.d.ts +49 -0
- package/dist/runtime/components/DashboardGroup.vue +46 -0
- package/dist/runtime/components/DashboardGroup.vue.d.ts +27 -0
- package/dist/runtime/components/DashboardNavbar.vue +74 -0
- package/dist/runtime/components/DashboardNavbar.vue.d.ts +53 -0
- package/dist/runtime/components/DashboardPanel.vue +56 -0
- package/dist/runtime/components/DashboardPanel.vue.d.ts +28 -0
- package/dist/runtime/components/DashboardResizeHandle.vue +32 -0
- package/dist/runtime/components/DashboardResizeHandle.vue.d.ts +22 -0
- package/dist/runtime/components/DashboardSearch.vue +124 -0
- package/dist/runtime/components/DashboardSearch.vue.d.ts +48 -0
- package/dist/runtime/components/DashboardSearchButton.vue +72 -0
- package/dist/runtime/components/DashboardSearchButton.vue.d.ts +52 -0
- package/dist/runtime/components/DashboardSidebar.vue +170 -0
- package/dist/runtime/components/DashboardSidebar.vue.d.ts +72 -0
- package/dist/runtime/components/DashboardSidebarCollapse.vue +46 -0
- package/dist/runtime/components/DashboardSidebarCollapse.vue.d.ts +15 -0
- package/dist/runtime/components/DashboardSidebarToggle.vue +43 -0
- package/dist/runtime/components/DashboardSidebarToggle.vue.d.ts +19 -0
- package/dist/runtime/components/Drawer.vue +112 -0
- package/dist/runtime/components/Drawer.vue.d.ts +78 -0
- package/dist/runtime/components/DropdownMenu.vue +68 -0
- package/dist/runtime/components/DropdownMenu.vue.d.ts +119 -0
- package/dist/runtime/components/DropdownMenuContent.vue +171 -0
- package/dist/runtime/components/DropdownMenuContent.vue.d.ts +52 -0
- package/dist/runtime/components/Form.vue +210 -0
- package/dist/runtime/components/Form.vue.d.ts +70 -0
- package/dist/runtime/components/FormField.vue +90 -0
- package/dist/runtime/components/FormField.vue.d.ts +61 -0
- package/dist/runtime/components/Icon.vue +19 -0
- package/dist/runtime/components/Icon.vue.d.ts +8 -0
- package/dist/runtime/components/Input.vue +147 -0
- package/dist/runtime/components/Input.vue.d.ts +77 -0
- package/dist/runtime/components/InputMenu.vue +373 -0
- package/dist/runtime/components/InputMenu.vue.d.ts +534 -0
- package/dist/runtime/components/InputNumber.vue +144 -0
- package/dist/runtime/components/InputNumber.vue.d.ts +260 -0
- package/dist/runtime/components/InputTags.vue +159 -0
- package/dist/runtime/components/InputTags.vue.d.ts +183 -0
- package/dist/runtime/components/Kbd.vue +30 -0
- package/dist/runtime/components/Kbd.vue.d.ts +34 -0
- package/dist/runtime/components/Link.vue +127 -0
- package/dist/runtime/components/Link.vue.d.ts +93 -0
- package/dist/runtime/components/LinkBase.vue +57 -0
- package/dist/runtime/components/LinkBase.vue.d.ts +25 -0
- package/dist/runtime/components/Modal.vue +130 -0
- package/dist/runtime/components/Modal.vue.d.ts +106 -0
- package/dist/runtime/components/NavigationMenu.vue +275 -0
- package/dist/runtime/components/NavigationMenu.vue.d.ts +170 -0
- package/dist/runtime/components/OverlayProvider.vue +25 -0
- package/dist/runtime/components/OverlayProvider.vue.d.ts +2 -0
- package/dist/runtime/components/Pagination.vue +97 -0
- package/dist/runtime/components/Pagination.vue.d.ts +118 -0
- package/dist/runtime/components/PinInput.vue +94 -0
- package/dist/runtime/components/PinInput.vue.d.ts +60 -0
- package/dist/runtime/components/Popover.vue +73 -0
- package/dist/runtime/components/Popover.vue.d.ts +64 -0
- package/dist/runtime/components/Progress.vue +132 -0
- package/dist/runtime/components/Progress.vue.d.ts +66 -0
- package/dist/runtime/components/RadioGroup.vue +133 -0
- package/dist/runtime/components/RadioGroup.vue.d.ts +93 -0
- package/dist/runtime/components/Select.vue +225 -0
- package/dist/runtime/components/Select.vue.d.ts +253 -0
- package/dist/runtime/components/SelectMenu.vue +328 -0
- package/dist/runtime/components/SelectMenu.vue.d.ts +302 -0
- package/dist/runtime/components/Separator.vue +53 -0
- package/dist/runtime/components/Separator.vue.d.ts +54 -0
- package/dist/runtime/components/Skeleton.vue +29 -0
- package/dist/runtime/components/Skeleton.vue.d.ts +17 -0
- package/dist/runtime/components/Slideover.vue +137 -0
- package/dist/runtime/components/Slideover.vue.d.ts +107 -0
- package/dist/runtime/components/Slider.vue +94 -0
- package/dist/runtime/components/Slider.vue.d.ts +58 -0
- package/dist/runtime/components/Stepper.vue +116 -0
- package/dist/runtime/components/Stepper.vue.d.ts +85 -0
- package/dist/runtime/components/Switch.vue +89 -0
- package/dist/runtime/components/Switch.vue.d.ts +70 -0
- package/dist/runtime/components/Table.vue +286 -0
- package/dist/runtime/components/Table.vue.d.ts +185 -0
- package/dist/runtime/components/Tabs.vue +84 -0
- package/dist/runtime/components/Tabs.vue.d.ts +93 -0
- package/dist/runtime/components/Textarea.vue +169 -0
- package/dist/runtime/components/Textarea.vue.d.ts +78 -0
- package/dist/runtime/components/Timeline.vue +92 -0
- package/dist/runtime/components/Timeline.vue.d.ts +70 -0
- package/dist/runtime/components/Toast.vue +129 -0
- package/dist/runtime/components/Toast.vue.d.ts +163 -0
- package/dist/runtime/components/Toaster.vue +111 -0
- package/dist/runtime/components/Toaster.vue.d.ts +44 -0
- package/dist/runtime/components/Tooltip.vue +62 -0
- package/dist/runtime/components/Tooltip.vue.d.ts +50 -0
- package/dist/runtime/components/Tree.vue +121 -0
- package/dist/runtime/components/Tree.vue.d.ts +113 -0
- package/dist/runtime/components/color-mode/ColorModeAvatar.vue +16 -0
- package/dist/runtime/components/color-mode/ColorModeAvatar.vue.d.ts +7 -0
- package/dist/runtime/components/color-mode/ColorModeButton.vue +45 -0
- package/dist/runtime/components/color-mode/ColorModeButton.vue.d.ts +24 -0
- package/dist/runtime/components/color-mode/ColorModeImage.vue +17 -0
- package/dist/runtime/components/color-mode/ColorModeImage.vue.d.ts +6 -0
- package/dist/runtime/components/color-mode/ColorModeSelect.vue +49 -0
- package/dist/runtime/components/color-mode/ColorModeSelect.vue.d.ts +7 -0
- package/dist/runtime/components/color-mode/ColorModeSwitch.vue +44 -0
- package/dist/runtime/components/color-mode/ColorModeSwitch.vue.d.ts +7 -0
- package/dist/runtime/components/locale/LocaleSelect.vue +61 -0
- package/dist/runtime/components/locale/LocaleSelect.vue.d.ts +16 -0
- package/dist/runtime/composables/color-mode/useColorMode.d.ts +3 -0
- package/dist/runtime/composables/color-mode/useColorMode.js +5 -0
- package/dist/runtime/composables/defineLocale.d.ts +11 -0
- package/dist/runtime/composables/defineLocale.js +9 -0
- package/dist/runtime/composables/defineShortcuts.d.ts +15 -0
- package/dist/runtime/composables/defineShortcuts.js +141 -0
- package/dist/runtime/composables/useAvatarGroup.d.ts +10 -0
- package/dist/runtime/composables/useAvatarGroup.js +10 -0
- package/dist/runtime/composables/useButtonGroup.d.ts +15 -0
- package/dist/runtime/composables/useButtonGroup.js +9 -0
- package/dist/runtime/composables/useComponentIcons.d.ts +39 -0
- package/dist/runtime/composables/useComponentIcons.js +26 -0
- package/dist/runtime/composables/useContentSearch.d.ts +6 -0
- package/dist/runtime/composables/useContentSearch.js +9 -0
- package/dist/runtime/composables/useFormField.d.ts +42 -0
- package/dist/runtime/composables/useFormField.js +66 -0
- package/dist/runtime/composables/useKbd.d.ts +36 -0
- package/dist/runtime/composables/useKbd.js +53 -0
- package/dist/runtime/composables/useLocale.d.ts +4 -0
- package/dist/runtime/composables/useLocale.js +10 -0
- package/dist/runtime/composables/useLocalePro.d.ts +3 -0
- package/dist/runtime/composables/useLocalePro.js +11 -0
- package/dist/runtime/composables/useOverlay.d.ts +38 -0
- package/dist/runtime/composables/useOverlay.js +85 -0
- package/dist/runtime/composables/usePortal.d.ts +6 -0
- package/dist/runtime/composables/usePortal.js +17 -0
- package/dist/runtime/composables/useResizable.d.ts +27 -0
- package/dist/runtime/composables/useResizable.js +173 -0
- package/dist/runtime/composables/useScrollspy.d.ts +6 -0
- package/dist/runtime/composables/useScrollspy.js +38 -0
- package/dist/runtime/composables/useToast.d.ts +13 -0
- package/dist/runtime/composables/useToast.js +62 -0
- package/dist/runtime/index.css +1 -0
- package/dist/runtime/inertia/components/Link.vue +132 -0
- package/dist/runtime/inertia/components/Link.vue.d.ts +63 -0
- package/dist/runtime/inertia/components/LinkBase.vue +68 -0
- package/dist/runtime/inertia/components/LinkBase.vue.d.ts +25 -0
- package/dist/runtime/inertia/stubs.d.ts +43 -0
- package/dist/runtime/inertia/stubs.js +82 -0
- package/dist/runtime/keyframes.css +1 -0
- package/dist/runtime/locale/ar.d.ts +3 -0
- package/dist/runtime/locale/ar.js +56 -0
- package/dist/runtime/locale/az.d.ts +3 -0
- package/dist/runtime/locale/az.js +55 -0
- package/dist/runtime/locale/bg.d.ts +3 -0
- package/dist/runtime/locale/bg.js +55 -0
- package/dist/runtime/locale/bn.d.ts +3 -0
- package/dist/runtime/locale/bn.js +55 -0
- package/dist/runtime/locale/ca.d.ts +3 -0
- package/dist/runtime/locale/ca.js +55 -0
- package/dist/runtime/locale/ckb.d.ts +3 -0
- package/dist/runtime/locale/ckb.js +56 -0
- package/dist/runtime/locale/cs.d.ts +3 -0
- package/dist/runtime/locale/cs.js +55 -0
- package/dist/runtime/locale/da.d.ts +3 -0
- package/dist/runtime/locale/da.js +55 -0
- package/dist/runtime/locale/de.d.ts +3 -0
- package/dist/runtime/locale/de.js +55 -0
- package/dist/runtime/locale/el.d.ts +3 -0
- package/dist/runtime/locale/el.js +55 -0
- package/dist/runtime/locale/en.d.ts +3 -0
- package/dist/runtime/locale/en.js +125 -0
- package/dist/runtime/locale/es.d.ts +3 -0
- package/dist/runtime/locale/es.js +55 -0
- package/dist/runtime/locale/et.d.ts +3 -0
- package/dist/runtime/locale/et.js +55 -0
- package/dist/runtime/locale/fa_ir.d.ts +3 -0
- package/dist/runtime/locale/fa_ir.js +56 -0
- package/dist/runtime/locale/fi.d.ts +3 -0
- package/dist/runtime/locale/fi.js +55 -0
- package/dist/runtime/locale/fr.d.ts +3 -0
- package/dist/runtime/locale/fr.js +55 -0
- package/dist/runtime/locale/he.d.ts +3 -0
- package/dist/runtime/locale/he.js +54 -0
- package/dist/runtime/locale/hi.d.ts +3 -0
- package/dist/runtime/locale/hi.js +55 -0
- package/dist/runtime/locale/hu.d.ts +3 -0
- package/dist/runtime/locale/hu.js +55 -0
- package/dist/runtime/locale/hy.d.ts +3 -0
- package/dist/runtime/locale/hy.js +55 -0
- package/dist/runtime/locale/id.d.ts +3 -0
- package/dist/runtime/locale/id.js +55 -0
- package/dist/runtime/locale/index.d.ts +51 -0
- package/dist/runtime/locale/index.js +51 -0
- package/dist/runtime/locale/it.d.ts +3 -0
- package/dist/runtime/locale/it.js +55 -0
- package/dist/runtime/locale/ja.d.ts +3 -0
- package/dist/runtime/locale/ja.js +55 -0
- package/dist/runtime/locale/kk.d.ts +3 -0
- package/dist/runtime/locale/kk.js +55 -0
- package/dist/runtime/locale/km.d.ts +3 -0
- package/dist/runtime/locale/km.js +55 -0
- package/dist/runtime/locale/ko.d.ts +3 -0
- package/dist/runtime/locale/ko.js +55 -0
- package/dist/runtime/locale/ky.d.ts +3 -0
- package/dist/runtime/locale/ky.js +55 -0
- package/dist/runtime/locale/lb.d.ts +3 -0
- package/dist/runtime/locale/lb.js +55 -0
- package/dist/runtime/locale/lt.d.ts +3 -0
- package/dist/runtime/locale/lt.js +55 -0
- package/dist/runtime/locale/mn.d.ts +3 -0
- package/dist/runtime/locale/mn.js +55 -0
- package/dist/runtime/locale/ms.d.ts +3 -0
- package/dist/runtime/locale/ms.js +55 -0
- package/dist/runtime/locale/nb_no.d.ts +3 -0
- package/dist/runtime/locale/nb_no.js +55 -0
- package/dist/runtime/locale/nl.d.ts +3 -0
- package/dist/runtime/locale/nl.js +55 -0
- package/dist/runtime/locale/pl.d.ts +3 -0
- package/dist/runtime/locale/pl.js +55 -0
- package/dist/runtime/locale/pt.d.ts +3 -0
- package/dist/runtime/locale/pt.js +55 -0
- package/dist/runtime/locale/pt_br.d.ts +3 -0
- package/dist/runtime/locale/pt_br.js +55 -0
- package/dist/runtime/locale/ro.d.ts +3 -0
- package/dist/runtime/locale/ro.js +55 -0
- package/dist/runtime/locale/ru.d.ts +3 -0
- package/dist/runtime/locale/ru.js +55 -0
- package/dist/runtime/locale/sk.d.ts +3 -0
- package/dist/runtime/locale/sk.js +55 -0
- package/dist/runtime/locale/sl.d.ts +3 -0
- package/dist/runtime/locale/sl.js +55 -0
- package/dist/runtime/locale/sv.d.ts +3 -0
- package/dist/runtime/locale/sv.js +55 -0
- package/dist/runtime/locale/th.d.ts +3 -0
- package/dist/runtime/locale/th.js +55 -0
- package/dist/runtime/locale/tj.d.ts +3 -0
- package/dist/runtime/locale/tj.js +55 -0
- package/dist/runtime/locale/tr.d.ts +3 -0
- package/dist/runtime/locale/tr.js +55 -0
- package/dist/runtime/locale/ug_cn.d.ts +3 -0
- package/dist/runtime/locale/ug_cn.js +56 -0
- package/dist/runtime/locale/uk.d.ts +3 -0
- package/dist/runtime/locale/uk.js +55 -0
- package/dist/runtime/locale/ur.d.ts +3 -0
- package/dist/runtime/locale/ur.js +56 -0
- package/dist/runtime/locale/uz.d.ts +3 -0
- package/dist/runtime/locale/uz.js +55 -0
- package/dist/runtime/locale/vi.d.ts +3 -0
- package/dist/runtime/locale/vi.js +55 -0
- package/dist/runtime/locale/zh_cn.d.ts +3 -0
- package/dist/runtime/locale/zh_cn.js +55 -0
- package/dist/runtime/locale/zh_tw.d.ts +3 -0
- package/dist/runtime/locale/zh_tw.js +55 -0
- package/dist/runtime/plugins/colors.d.ts +2 -0
- package/dist/runtime/plugins/colors.js +51 -0
- package/dist/runtime/types/app.config.d.ts +6 -0
- package/dist/runtime/types/content.d.ts +1 -0
- package/dist/runtime/types/content.js +0 -0
- package/dist/runtime/types/form.d.ts +87 -0
- package/dist/runtime/types/form.js +12 -0
- package/dist/runtime/types/index.d.ts +76 -0
- package/dist/runtime/types/index.js +76 -0
- package/dist/runtime/types/locale.d.ts +127 -0
- package/dist/runtime/types/locale.js +0 -0
- package/dist/runtime/types/prose.d.ts +1 -0
- package/dist/runtime/types/prose.js +0 -0
- package/dist/runtime/types/tv.d.ts +53 -0
- package/dist/runtime/types/tv.js +0 -0
- package/dist/runtime/types/utils.d.ts +41 -0
- package/dist/runtime/types/utils.js +1 -0
- package/dist/runtime/utils/content.d.ts +13 -0
- package/dist/runtime/utils/content.js +51 -0
- package/dist/runtime/utils/dashboard.d.ts +10 -0
- package/dist/runtime/utils/dashboard.js +5 -0
- package/dist/runtime/utils/form.d.ts +13 -0
- package/dist/runtime/utils/form.js +108 -0
- package/dist/runtime/utils/fuse.d.ts +4 -0
- package/dist/runtime/utils/fuse.js +63 -0
- package/dist/runtime/utils/index.d.ts +12 -0
- package/dist/runtime/utils/index.js +89 -0
- package/dist/runtime/utils/link.d.ts +7 -0
- package/dist/runtime/utils/link.js +47 -0
- 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 +14 -0
- package/dist/runtime/vue/components/Icon.vue.d.ts +5 -0
- package/dist/runtime/vue/components/Link.vue +169 -0
- package/dist/runtime/vue/components/Link.vue.d.ts +93 -0
- package/dist/runtime/vue/components/color-mode/ColorModeButton.vue +34 -0
- package/dist/runtime/vue/components/color-mode/ColorModeButton.vue.d.ts +38 -0
- package/dist/runtime/vue/components/color-mode/ColorModeSelect.vue +37 -0
- package/dist/runtime/vue/components/color-mode/ColorModeSelect.vue.d.ts +5 -0
- package/dist/runtime/vue/components/color-mode/ColorModeSwitch.vue +32 -0
- package/dist/runtime/vue/components/color-mode/ColorModeSwitch.vue.d.ts +5 -0
- package/dist/runtime/vue/composables/useAppConfig.d.ts +1 -0
- package/dist/runtime/vue/composables/useAppConfig.js +4 -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 +10 -0
- package/dist/runtime/vue/stubs.d.ts +40 -0
- package/dist/runtime/vue/stubs.js +74 -0
- package/dist/shared/ui.BcVNrqyb.mjs +5374 -0
- package/dist/types.d.mts +5 -0
- package/dist/unplugin.d.mts +88 -0
- package/dist/unplugin.mjs +242 -0
- package/dist/vite.d.mts +15 -0
- package/dist/vite.mjs +21 -0
- package/package.json +255 -0
- package/vue-plugin.d.ts +5 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/input-number";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { onMounted, ref, computed } from "vue";
|
|
7
|
+
import { NumberFieldRoot, NumberFieldInput, NumberFieldDecrement, NumberFieldIncrement, useForwardPropsEmits } from "reka-ui";
|
|
8
|
+
import { reactivePick } from "@vueuse/core";
|
|
9
|
+
import { useAppConfig } from "#imports";
|
|
10
|
+
import { useButtonGroup } from "../composables/useButtonGroup";
|
|
11
|
+
import { useFormField } from "../composables/useFormField";
|
|
12
|
+
import { useLocale } from "../composables/useLocale";
|
|
13
|
+
import { tv } from "../utils/tv";
|
|
14
|
+
import UButton from "./Button.vue";
|
|
15
|
+
defineOptions({ inheritAttrs: false });
|
|
16
|
+
const props = defineProps({
|
|
17
|
+
as: { type: null, required: false },
|
|
18
|
+
placeholder: { type: String, required: false },
|
|
19
|
+
color: { type: null, required: false },
|
|
20
|
+
variant: { type: null, required: false },
|
|
21
|
+
size: { type: null, required: false },
|
|
22
|
+
highlight: { type: Boolean, required: false },
|
|
23
|
+
orientation: { type: String, required: false, default: "horizontal" },
|
|
24
|
+
increment: { type: Object, required: false },
|
|
25
|
+
incrementIcon: { type: String, required: false },
|
|
26
|
+
incrementDisabled: { type: Boolean, required: false },
|
|
27
|
+
decrement: { type: Object, required: false },
|
|
28
|
+
decrementIcon: { type: String, required: false },
|
|
29
|
+
decrementDisabled: { type: Boolean, required: false },
|
|
30
|
+
autofocus: { type: Boolean, required: false },
|
|
31
|
+
autofocusDelay: { type: Number, required: false },
|
|
32
|
+
locale: { type: String, required: false },
|
|
33
|
+
class: { type: null, required: false },
|
|
34
|
+
ui: { type: null, required: false },
|
|
35
|
+
modelValue: { type: [Number, null], required: false },
|
|
36
|
+
defaultValue: { type: Number, required: false },
|
|
37
|
+
min: { type: Number, required: false },
|
|
38
|
+
max: { type: Number, required: false },
|
|
39
|
+
step: { type: Number, required: false },
|
|
40
|
+
stepSnapping: { type: Boolean, required: false },
|
|
41
|
+
disabled: { type: Boolean, required: false },
|
|
42
|
+
required: { type: Boolean, required: false },
|
|
43
|
+
id: { type: String, required: false },
|
|
44
|
+
name: { type: String, required: false },
|
|
45
|
+
formatOptions: { type: null, required: false },
|
|
46
|
+
disableWheelChange: { type: Boolean, required: false },
|
|
47
|
+
invertWheelChange: { type: Boolean, required: false }
|
|
48
|
+
});
|
|
49
|
+
const emits = defineEmits(["update:modelValue", "blur", "change"]);
|
|
50
|
+
defineSlots();
|
|
51
|
+
const { t, code: codeLocale } = useLocale();
|
|
52
|
+
const appConfig = useAppConfig();
|
|
53
|
+
const rootProps = useForwardPropsEmits(reactivePick(props, "as", "modelValue", "defaultValue", "min", "max", "step", "stepSnapping", "formatOptions", "disableWheelChange", "invertWheelChange"), emits);
|
|
54
|
+
const { emitFormBlur, emitFormFocus, emitFormChange, emitFormInput, id, color, size: formGroupSize, name, highlight, disabled, ariaAttrs } = useFormField(props);
|
|
55
|
+
const { orientation, size: buttonGroupSize } = useButtonGroup(props);
|
|
56
|
+
const locale = computed(() => props.locale || codeLocale.value);
|
|
57
|
+
const inputSize = computed(() => buttonGroupSize.value || formGroupSize.value);
|
|
58
|
+
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.inputNumber || {} })({
|
|
59
|
+
color: color.value,
|
|
60
|
+
variant: props.variant,
|
|
61
|
+
size: inputSize.value,
|
|
62
|
+
highlight: highlight.value,
|
|
63
|
+
orientation: props.orientation,
|
|
64
|
+
buttonGroup: orientation.value
|
|
65
|
+
}));
|
|
66
|
+
const incrementIcon = computed(() => props.incrementIcon || (props.orientation === "horizontal" ? appConfig.ui.icons.plus : appConfig.ui.icons.chevronUp));
|
|
67
|
+
const decrementIcon = computed(() => props.decrementIcon || (props.orientation === "horizontal" ? appConfig.ui.icons.minus : appConfig.ui.icons.chevronDown));
|
|
68
|
+
const inputRef = ref(null);
|
|
69
|
+
function onUpdate(value) {
|
|
70
|
+
const event = new Event("change", { target: { value } });
|
|
71
|
+
emits("change", event);
|
|
72
|
+
emitFormChange();
|
|
73
|
+
emitFormInput();
|
|
74
|
+
}
|
|
75
|
+
function onBlur(event) {
|
|
76
|
+
emitFormBlur();
|
|
77
|
+
emits("blur", event);
|
|
78
|
+
}
|
|
79
|
+
function autoFocus() {
|
|
80
|
+
if (props.autofocus) {
|
|
81
|
+
inputRef.value?.$el?.focus();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
onMounted(() => {
|
|
85
|
+
setTimeout(() => {
|
|
86
|
+
autoFocus();
|
|
87
|
+
}, props.autofocusDelay);
|
|
88
|
+
});
|
|
89
|
+
defineExpose({
|
|
90
|
+
inputRef
|
|
91
|
+
});
|
|
92
|
+
</script>
|
|
93
|
+
|
|
94
|
+
<template>
|
|
95
|
+
<NumberFieldRoot
|
|
96
|
+
v-bind="rootProps"
|
|
97
|
+
:id="id"
|
|
98
|
+
:class="ui.root({ class: [props.ui?.root, props.class] })"
|
|
99
|
+
:name="name"
|
|
100
|
+
:disabled="disabled"
|
|
101
|
+
:locale="locale"
|
|
102
|
+
@update:model-value="onUpdate"
|
|
103
|
+
>
|
|
104
|
+
<NumberFieldInput
|
|
105
|
+
v-bind="{ ...$attrs, ...ariaAttrs }"
|
|
106
|
+
ref="inputRef"
|
|
107
|
+
:placeholder="placeholder"
|
|
108
|
+
:required="required"
|
|
109
|
+
:class="ui.base({ class: props.ui?.base })"
|
|
110
|
+
@blur="onBlur"
|
|
111
|
+
@focus="emitFormFocus"
|
|
112
|
+
/>
|
|
113
|
+
|
|
114
|
+
<div :class="ui.increment({ class: props.ui?.increment })">
|
|
115
|
+
<NumberFieldIncrement as-child :disabled="disabled || incrementDisabled">
|
|
116
|
+
<slot name="increment">
|
|
117
|
+
<UButton
|
|
118
|
+
:icon="incrementIcon"
|
|
119
|
+
:color="color"
|
|
120
|
+
:size="size"
|
|
121
|
+
variant="link"
|
|
122
|
+
:aria-label="t('inputNumber.increment')"
|
|
123
|
+
v-bind="typeof increment === 'object' ? increment : void 0"
|
|
124
|
+
/>
|
|
125
|
+
</slot>
|
|
126
|
+
</NumberFieldIncrement>
|
|
127
|
+
</div>
|
|
128
|
+
|
|
129
|
+
<div :class="ui.decrement({ class: props.ui?.decrement })">
|
|
130
|
+
<NumberFieldDecrement as-child :disabled="disabled || decrementDisabled">
|
|
131
|
+
<slot name="decrement">
|
|
132
|
+
<UButton
|
|
133
|
+
:icon="decrementIcon"
|
|
134
|
+
:color="color"
|
|
135
|
+
:size="size"
|
|
136
|
+
variant="link"
|
|
137
|
+
:aria-label="t('inputNumber.decrement')"
|
|
138
|
+
v-bind="typeof decrement === 'object' ? decrement : void 0"
|
|
139
|
+
/>
|
|
140
|
+
</slot>
|
|
141
|
+
</NumberFieldDecrement>
|
|
142
|
+
</div>
|
|
143
|
+
</NumberFieldRoot>
|
|
144
|
+
</template>
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import type { NumberFieldRootProps } from 'reka-ui';
|
|
2
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
3
|
+
import theme from '#build/ui/input-number';
|
|
4
|
+
import type { ButtonProps } from '../types';
|
|
5
|
+
import type { ComponentConfig } from '../types/utils';
|
|
6
|
+
type InputNumber = ComponentConfig<typeof theme, AppConfig, 'inputNumber'>;
|
|
7
|
+
export interface InputNumberProps extends Pick<NumberFieldRootProps, 'modelValue' | 'defaultValue' | 'min' | 'max' | 'step' | 'stepSnapping' | 'disabled' | 'required' | 'id' | 'name' | 'formatOptions' | 'disableWheelChange' | 'invertWheelChange'> {
|
|
8
|
+
/**
|
|
9
|
+
* The element or component this component should render as.
|
|
10
|
+
* @defaultValue 'div'
|
|
11
|
+
*/
|
|
12
|
+
as?: any;
|
|
13
|
+
/** The placeholder text when the input is empty. */
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
color?: InputNumber['variants']['color'];
|
|
16
|
+
variant?: InputNumber['variants']['variant'];
|
|
17
|
+
size?: InputNumber['variants']['size'];
|
|
18
|
+
/** Highlight the ring color like a focus state. */
|
|
19
|
+
highlight?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* The orientation of the input menu.
|
|
22
|
+
* @defaultValue 'horizontal'
|
|
23
|
+
*/
|
|
24
|
+
orientation?: 'vertical' | 'horizontal';
|
|
25
|
+
/**
|
|
26
|
+
* Configure the increment button. The `color` and `size` are inherited.
|
|
27
|
+
* @defaultValue { variant: 'link' }
|
|
28
|
+
*/
|
|
29
|
+
increment?: ButtonProps;
|
|
30
|
+
/**
|
|
31
|
+
* The icon displayed to increment the value.
|
|
32
|
+
* @defaultValue appConfig.ui.icons.plus
|
|
33
|
+
* @IconifyIcon
|
|
34
|
+
*/
|
|
35
|
+
incrementIcon?: string;
|
|
36
|
+
/** Disable the increment button. */
|
|
37
|
+
incrementDisabled?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Configure the decrement button. The `color` and `size` are inherited.
|
|
40
|
+
* @defaultValue { variant: 'link' }
|
|
41
|
+
*/
|
|
42
|
+
decrement?: ButtonProps;
|
|
43
|
+
/**
|
|
44
|
+
* The icon displayed to decrement the value.
|
|
45
|
+
* @defaultValue appConfig.ui.icons.minus
|
|
46
|
+
* @IconifyIcon
|
|
47
|
+
*/
|
|
48
|
+
decrementIcon?: string;
|
|
49
|
+
/** Disable the decrement button. */
|
|
50
|
+
decrementDisabled?: boolean;
|
|
51
|
+
autofocus?: boolean;
|
|
52
|
+
autofocusDelay?: number;
|
|
53
|
+
/**
|
|
54
|
+
* The locale to use for formatting and parsing numbers.
|
|
55
|
+
* @defaultValue UApp.locale.code
|
|
56
|
+
*/
|
|
57
|
+
locale?: string;
|
|
58
|
+
class?: any;
|
|
59
|
+
ui?: InputNumber['slots'];
|
|
60
|
+
}
|
|
61
|
+
export interface InputNumberEmits {
|
|
62
|
+
(e: 'update:modelValue', payload: number): void;
|
|
63
|
+
(e: 'blur', event: FocusEvent): void;
|
|
64
|
+
(e: 'change', payload: Event): void;
|
|
65
|
+
}
|
|
66
|
+
export interface InputNumberSlots {
|
|
67
|
+
increment(props?: {}): any;
|
|
68
|
+
decrement(props?: {}): any;
|
|
69
|
+
}
|
|
70
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<InputNumberProps, {
|
|
71
|
+
inputRef: import("vue").Ref<({
|
|
72
|
+
$: import("vue").ComponentInternalInstance;
|
|
73
|
+
$data: {};
|
|
74
|
+
$props: {
|
|
75
|
+
readonly asChild?: boolean | undefined;
|
|
76
|
+
readonly as?: (import("reka-ui").AsTag | import("vue").Component) | undefined;
|
|
77
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
78
|
+
$attrs: {
|
|
79
|
+
[x: string]: unknown;
|
|
80
|
+
};
|
|
81
|
+
$refs: {
|
|
82
|
+
[x: string]: unknown;
|
|
83
|
+
} & {
|
|
84
|
+
primitiveElement: import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
85
|
+
asChild: {
|
|
86
|
+
type: BooleanConstructor;
|
|
87
|
+
default: boolean;
|
|
88
|
+
};
|
|
89
|
+
as: {
|
|
90
|
+
type: import("vue").PropType<import("reka-ui").AsTag | import("vue").Component>;
|
|
91
|
+
default: string;
|
|
92
|
+
};
|
|
93
|
+
}>> & Readonly<{}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
94
|
+
[key: string]: any;
|
|
95
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
96
|
+
asChild: boolean;
|
|
97
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
98
|
+
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
99
|
+
P: {};
|
|
100
|
+
B: {};
|
|
101
|
+
D: {};
|
|
102
|
+
C: {};
|
|
103
|
+
M: {};
|
|
104
|
+
Defaults: {};
|
|
105
|
+
}, Readonly<import("vue").ExtractPropTypes<{
|
|
106
|
+
asChild: {
|
|
107
|
+
type: BooleanConstructor;
|
|
108
|
+
default: boolean;
|
|
109
|
+
};
|
|
110
|
+
as: {
|
|
111
|
+
type: import("vue").PropType<import("reka-ui").AsTag | import("vue").Component>;
|
|
112
|
+
default: string;
|
|
113
|
+
};
|
|
114
|
+
}>> & Readonly<{}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
115
|
+
[key: string]: any;
|
|
116
|
+
}>, {}, {}, {}, {
|
|
117
|
+
asChild: boolean;
|
|
118
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
119
|
+
}> | null;
|
|
120
|
+
};
|
|
121
|
+
$slots: Readonly<{
|
|
122
|
+
[name: string]: import("vue").Slot<any> | undefined;
|
|
123
|
+
}>;
|
|
124
|
+
$root: import("vue").ComponentPublicInstance | null;
|
|
125
|
+
$parent: import("vue").ComponentPublicInstance | null;
|
|
126
|
+
$host: Element | null;
|
|
127
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
128
|
+
$el: any;
|
|
129
|
+
$options: import("vue").ComponentOptionsBase<Readonly<import("reka-ui").NumberFieldInputProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
130
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
131
|
+
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
|
|
132
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
133
|
+
created?: (() => void) | (() => void)[];
|
|
134
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
135
|
+
mounted?: (() => void) | (() => void)[];
|
|
136
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
137
|
+
updated?: (() => void) | (() => void)[];
|
|
138
|
+
activated?: (() => void) | (() => void)[];
|
|
139
|
+
deactivated?: (() => void) | (() => void)[];
|
|
140
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
141
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
142
|
+
destroyed?: (() => void) | (() => void)[];
|
|
143
|
+
unmounted?: (() => void) | (() => void)[];
|
|
144
|
+
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
145
|
+
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
146
|
+
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
147
|
+
};
|
|
148
|
+
$forceUpdate: () => void;
|
|
149
|
+
$nextTick: typeof import("vue").nextTick;
|
|
150
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
|
|
151
|
+
} & Readonly<{
|
|
152
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
153
|
+
}> & Omit<Readonly<import("reka-ui").NumberFieldInputProps> & Readonly<{}>, "as"> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
|
|
154
|
+
$slots: {
|
|
155
|
+
default?(_: {}): any;
|
|
156
|
+
};
|
|
157
|
+
}) | null, ({
|
|
158
|
+
$: import("vue").ComponentInternalInstance;
|
|
159
|
+
$data: {};
|
|
160
|
+
$props: {
|
|
161
|
+
readonly asChild?: boolean | undefined;
|
|
162
|
+
readonly as?: (import("reka-ui").AsTag | import("vue").Component) | undefined;
|
|
163
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
164
|
+
$attrs: {
|
|
165
|
+
[x: string]: unknown;
|
|
166
|
+
};
|
|
167
|
+
$refs: {
|
|
168
|
+
[x: string]: unknown;
|
|
169
|
+
} & {
|
|
170
|
+
primitiveElement: import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
171
|
+
asChild: {
|
|
172
|
+
type: BooleanConstructor;
|
|
173
|
+
default: boolean;
|
|
174
|
+
};
|
|
175
|
+
as: {
|
|
176
|
+
type: import("vue").PropType<import("reka-ui").AsTag | import("vue").Component>;
|
|
177
|
+
default: string;
|
|
178
|
+
};
|
|
179
|
+
}>> & Readonly<{}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
180
|
+
[key: string]: any;
|
|
181
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
182
|
+
asChild: boolean;
|
|
183
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
184
|
+
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
185
|
+
P: {};
|
|
186
|
+
B: {};
|
|
187
|
+
D: {};
|
|
188
|
+
C: {};
|
|
189
|
+
M: {};
|
|
190
|
+
Defaults: {};
|
|
191
|
+
}, Readonly<import("vue").ExtractPropTypes<{
|
|
192
|
+
asChild: {
|
|
193
|
+
type: BooleanConstructor;
|
|
194
|
+
default: boolean;
|
|
195
|
+
};
|
|
196
|
+
as: {
|
|
197
|
+
type: import("vue").PropType<import("reka-ui").AsTag | import("vue").Component>;
|
|
198
|
+
default: string;
|
|
199
|
+
};
|
|
200
|
+
}>> & Readonly<{}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
201
|
+
[key: string]: any;
|
|
202
|
+
}>, {}, {}, {}, {
|
|
203
|
+
asChild: boolean;
|
|
204
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
205
|
+
}> | null;
|
|
206
|
+
};
|
|
207
|
+
$slots: Readonly<{
|
|
208
|
+
[name: string]: import("vue").Slot<any> | undefined;
|
|
209
|
+
}>;
|
|
210
|
+
$root: import("vue").ComponentPublicInstance | null;
|
|
211
|
+
$parent: import("vue").ComponentPublicInstance | null;
|
|
212
|
+
$host: Element | null;
|
|
213
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
214
|
+
$el: any;
|
|
215
|
+
$options: import("vue").ComponentOptionsBase<Readonly<import("reka-ui").NumberFieldInputProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
216
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
217
|
+
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
|
|
218
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
219
|
+
created?: (() => void) | (() => void)[];
|
|
220
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
221
|
+
mounted?: (() => void) | (() => void)[];
|
|
222
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
223
|
+
updated?: (() => void) | (() => void)[];
|
|
224
|
+
activated?: (() => void) | (() => void)[];
|
|
225
|
+
deactivated?: (() => void) | (() => void)[];
|
|
226
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
227
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
228
|
+
destroyed?: (() => void) | (() => void)[];
|
|
229
|
+
unmounted?: (() => void) | (() => void)[];
|
|
230
|
+
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
231
|
+
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
232
|
+
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
233
|
+
};
|
|
234
|
+
$forceUpdate: () => void;
|
|
235
|
+
$nextTick: typeof import("vue").nextTick;
|
|
236
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
|
|
237
|
+
} & Readonly<{
|
|
238
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
239
|
+
}> & Omit<Readonly<import("reka-ui").NumberFieldInputProps> & Readonly<{}>, "as"> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
|
|
240
|
+
$slots: {
|
|
241
|
+
default?(_: {}): any;
|
|
242
|
+
};
|
|
243
|
+
}) | null>;
|
|
244
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
245
|
+
blur: (event: FocusEvent) => any;
|
|
246
|
+
change: (payload: Event) => any;
|
|
247
|
+
"update:modelValue": (payload: number) => any;
|
|
248
|
+
}, string, import("vue").PublicProps, Readonly<InputNumberProps> & Readonly<{
|
|
249
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
250
|
+
onChange?: ((payload: Event) => any) | undefined;
|
|
251
|
+
"onUpdate:modelValue"?: ((payload: number) => any) | undefined;
|
|
252
|
+
}>, {
|
|
253
|
+
orientation: "vertical" | "horizontal";
|
|
254
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, InputNumberSlots>;
|
|
255
|
+
export default _default;
|
|
256
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
257
|
+
new (): {
|
|
258
|
+
$slots: S;
|
|
259
|
+
};
|
|
260
|
+
};
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/input-tags";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { computed, ref, onMounted, toRaw } from "vue";
|
|
7
|
+
import { TagsInputRoot, TagsInputItem, TagsInputItemText, TagsInputItemDelete, TagsInputInput, useForwardPropsEmits } from "reka-ui";
|
|
8
|
+
import { reactivePick } from "@vueuse/core";
|
|
9
|
+
import { useAppConfig } from "#imports";
|
|
10
|
+
import { useButtonGroup } from "../composables/useButtonGroup";
|
|
11
|
+
import { useComponentIcons } from "../composables/useComponentIcons";
|
|
12
|
+
import { useFormField } from "../composables/useFormField";
|
|
13
|
+
import { tv } from "../utils/tv";
|
|
14
|
+
import UIcon from "./Icon.vue";
|
|
15
|
+
import UAvatar from "./Avatar.vue";
|
|
16
|
+
defineOptions({ inheritAttrs: false });
|
|
17
|
+
const props = defineProps({
|
|
18
|
+
as: { type: null, required: false },
|
|
19
|
+
placeholder: { type: String, required: false },
|
|
20
|
+
color: { type: null, required: false },
|
|
21
|
+
variant: { type: null, required: false },
|
|
22
|
+
size: { type: null, required: false },
|
|
23
|
+
autofocus: { type: Boolean, required: false },
|
|
24
|
+
autofocusDelay: { type: Number, required: false, default: 0 },
|
|
25
|
+
deleteIcon: { type: String, required: false },
|
|
26
|
+
highlight: { type: Boolean, required: false },
|
|
27
|
+
class: { type: null, required: false },
|
|
28
|
+
ui: { type: null, required: false },
|
|
29
|
+
modelValue: { type: [Array, null], required: false },
|
|
30
|
+
defaultValue: { type: Array, required: false },
|
|
31
|
+
addOnPaste: { type: Boolean, required: false },
|
|
32
|
+
addOnTab: { type: Boolean, required: false },
|
|
33
|
+
addOnBlur: { type: Boolean, required: false },
|
|
34
|
+
duplicate: { type: Boolean, required: false },
|
|
35
|
+
disabled: { type: Boolean, required: false },
|
|
36
|
+
delimiter: { type: null, required: false },
|
|
37
|
+
max: { type: Number, required: false },
|
|
38
|
+
id: { type: String, required: false },
|
|
39
|
+
convertValue: { type: Function, required: false },
|
|
40
|
+
displayValue: { type: Function, required: false },
|
|
41
|
+
name: { type: String, required: false },
|
|
42
|
+
required: { type: Boolean, required: false },
|
|
43
|
+
icon: { type: String, required: false },
|
|
44
|
+
avatar: { type: Object, required: false },
|
|
45
|
+
leading: { type: Boolean, required: false },
|
|
46
|
+
leadingIcon: { type: String, required: false },
|
|
47
|
+
trailing: { type: Boolean, required: false },
|
|
48
|
+
trailingIcon: { type: String, required: false },
|
|
49
|
+
loading: { type: Boolean, required: false },
|
|
50
|
+
loadingIcon: { type: String, required: false }
|
|
51
|
+
});
|
|
52
|
+
const emits = defineEmits(["change", "blur", "focus", "update:modelValue", "invalid", "addTag", "removeTag"]);
|
|
53
|
+
const slots = defineSlots();
|
|
54
|
+
const appConfig = useAppConfig();
|
|
55
|
+
const rootProps = useForwardPropsEmits(reactivePick(props, "as", "addOnPaste", "addOnTab", "addOnBlur", "duplicate", "delimiter", "max", "convertValue", "displayValue", "required"), emits);
|
|
56
|
+
const { emitFormBlur, emitFormFocus, emitFormChange, emitFormInput, size: formGroupSize, color, id, name, highlight, disabled, ariaAttrs } = useFormField(props);
|
|
57
|
+
const { orientation, size: buttonGroupSize } = useButtonGroup(props);
|
|
58
|
+
const { isLeading, isTrailing, leadingIconName, trailingIconName } = useComponentIcons(props);
|
|
59
|
+
const inputSize = computed(() => buttonGroupSize.value || formGroupSize.value);
|
|
60
|
+
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.inputTags || {} })({
|
|
61
|
+
color: color.value,
|
|
62
|
+
variant: props.variant,
|
|
63
|
+
size: inputSize?.value,
|
|
64
|
+
loading: props.loading,
|
|
65
|
+
highlight: highlight.value,
|
|
66
|
+
leading: isLeading.value || !!props.avatar || !!slots.leading,
|
|
67
|
+
trailing: isTrailing.value || !!slots.trailing,
|
|
68
|
+
buttonGroup: orientation.value
|
|
69
|
+
}));
|
|
70
|
+
const inputRef = ref(null);
|
|
71
|
+
onMounted(() => {
|
|
72
|
+
setTimeout(() => {
|
|
73
|
+
autoFocus();
|
|
74
|
+
}, props.autofocusDelay);
|
|
75
|
+
});
|
|
76
|
+
function autoFocus() {
|
|
77
|
+
if (props.autofocus) {
|
|
78
|
+
inputRef.value?.$el?.focus();
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
function onUpdate(value) {
|
|
82
|
+
if (toRaw(props.modelValue) === value) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
const event = new Event("change", { target: { value } });
|
|
86
|
+
emits("change", event);
|
|
87
|
+
emitFormChange();
|
|
88
|
+
emitFormInput();
|
|
89
|
+
}
|
|
90
|
+
function onBlur(event) {
|
|
91
|
+
emits("blur", event);
|
|
92
|
+
emitFormBlur();
|
|
93
|
+
}
|
|
94
|
+
function onFocus(event) {
|
|
95
|
+
emits("focus", event);
|
|
96
|
+
emitFormFocus();
|
|
97
|
+
}
|
|
98
|
+
defineExpose({
|
|
99
|
+
inputRef
|
|
100
|
+
});
|
|
101
|
+
</script>
|
|
102
|
+
|
|
103
|
+
<template>
|
|
104
|
+
<TagsInputRoot
|
|
105
|
+
:id="id"
|
|
106
|
+
v-slot="{ modelValue: tags }"
|
|
107
|
+
:model-value="modelValue"
|
|
108
|
+
:default-value="defaultValue"
|
|
109
|
+
:class="ui.root({ class: [ui.base({ class: props.ui?.base }), props.ui?.root, props.class] })"
|
|
110
|
+
v-bind="rootProps"
|
|
111
|
+
:name="name"
|
|
112
|
+
:disabled="disabled"
|
|
113
|
+
@update:model-value="onUpdate"
|
|
114
|
+
@blur="onBlur"
|
|
115
|
+
@focus="onFocus"
|
|
116
|
+
>
|
|
117
|
+
<TagsInputItem
|
|
118
|
+
v-for="(item, index) in tags"
|
|
119
|
+
:key="index"
|
|
120
|
+
:value="item"
|
|
121
|
+
:class="ui.item({ class: [props.ui?.item] })"
|
|
122
|
+
>
|
|
123
|
+
<TagsInputItemText :class="ui.itemText({ class: [props.ui?.itemText] })">
|
|
124
|
+
<slot v-if="!!slots['item-text']" name="item-text" :item="item" :index="index" />
|
|
125
|
+
</TagsInputItemText>
|
|
126
|
+
|
|
127
|
+
<TagsInputItemDelete
|
|
128
|
+
:class="ui.itemDelete({ class: [props.ui?.itemDelete] })"
|
|
129
|
+
:disabled="disabled"
|
|
130
|
+
>
|
|
131
|
+
<slot name="item-delete" :item="item" :index="index">
|
|
132
|
+
<UIcon :name="deleteIcon || appConfig.ui.icons.close" :class="ui.itemDeleteIcon({ class: [props.ui?.itemDeleteIcon] })" />
|
|
133
|
+
</slot>
|
|
134
|
+
</TagsInputItemDelete>
|
|
135
|
+
</TagsInputItem>
|
|
136
|
+
|
|
137
|
+
<TagsInputInput
|
|
138
|
+
ref="inputRef"
|
|
139
|
+
v-bind="{ ...$attrs, ...ariaAttrs }"
|
|
140
|
+
:placeholder="placeholder"
|
|
141
|
+
:class="ui.input({ class: props.ui?.input })"
|
|
142
|
+
/>
|
|
143
|
+
|
|
144
|
+
<slot />
|
|
145
|
+
|
|
146
|
+
<span v-if="isLeading || !!avatar || !!slots.leading" :class="ui.leading({ class: props.ui?.leading })">
|
|
147
|
+
<slot name="leading">
|
|
148
|
+
<UIcon v-if="isLeading && leadingIconName" :name="leadingIconName" :class="ui.leadingIcon({ class: props.ui?.leadingIcon })" />
|
|
149
|
+
<UAvatar v-else-if="!!avatar" :size="props.ui?.leadingAvatarSize || ui.leadingAvatarSize()" v-bind="avatar" :class="ui.leadingAvatar({ class: props.ui?.leadingAvatar })" />
|
|
150
|
+
</slot>
|
|
151
|
+
</span>
|
|
152
|
+
|
|
153
|
+
<span v-if="isTrailing || !!slots.trailing" :class="ui.trailing({ class: props.ui?.trailing })">
|
|
154
|
+
<slot name="trailing">
|
|
155
|
+
<UIcon v-if="trailingIconName" :name="trailingIconName" :class="ui.trailingIcon({ class: props.ui?.trailingIcon })" />
|
|
156
|
+
</slot>
|
|
157
|
+
</span>
|
|
158
|
+
</TagsInputRoot>
|
|
159
|
+
</template>
|