@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,225 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/select";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { ref, computed, onMounted, toRef } from "vue";
|
|
7
|
+
import { SelectRoot, SelectArrow, SelectTrigger, SelectPortal, SelectContent, SelectLabel, SelectGroup, SelectItem, SelectItemIndicator, SelectItemText, SelectSeparator, useForwardPropsEmits } from "reka-ui";
|
|
8
|
+
import { defu } from "defu";
|
|
9
|
+
import { reactivePick } from "@vueuse/core";
|
|
10
|
+
import { useAppConfig } from "#imports";
|
|
11
|
+
import { useButtonGroup } from "../composables/useButtonGroup";
|
|
12
|
+
import { useComponentIcons } from "../composables/useComponentIcons";
|
|
13
|
+
import { useFormField } from "../composables/useFormField";
|
|
14
|
+
import { usePortal } from "../composables/usePortal";
|
|
15
|
+
import { compare, get, isArrayOfArray } from "../utils";
|
|
16
|
+
import { tv } from "../utils/tv";
|
|
17
|
+
import UIcon from "./Icon.vue";
|
|
18
|
+
import UAvatar from "./Avatar.vue";
|
|
19
|
+
import UChip from "./Chip.vue";
|
|
20
|
+
defineOptions({ inheritAttrs: false });
|
|
21
|
+
const props = defineProps({
|
|
22
|
+
id: { type: String, required: false },
|
|
23
|
+
placeholder: { type: String, required: false },
|
|
24
|
+
color: { type: null, required: false },
|
|
25
|
+
variant: { type: null, required: false },
|
|
26
|
+
size: { type: null, required: false },
|
|
27
|
+
trailingIcon: { type: String, required: false },
|
|
28
|
+
selectedIcon: { type: String, required: false },
|
|
29
|
+
content: { type: Object, required: false },
|
|
30
|
+
arrow: { type: [Boolean, Object], required: false },
|
|
31
|
+
portal: { type: [Boolean, String], required: false, skipCheck: true, default: true },
|
|
32
|
+
valueKey: { type: null, required: false, default: "value" },
|
|
33
|
+
labelKey: { type: null, required: false, default: "label" },
|
|
34
|
+
items: { type: null, required: false },
|
|
35
|
+
defaultValue: { type: null, required: false },
|
|
36
|
+
modelValue: { type: null, required: false },
|
|
37
|
+
multiple: { type: Boolean, required: false },
|
|
38
|
+
highlight: { type: Boolean, required: false },
|
|
39
|
+
autofocus: { type: Boolean, required: false },
|
|
40
|
+
autofocusDelay: { type: Number, required: false, default: 0 },
|
|
41
|
+
class: { type: null, required: false },
|
|
42
|
+
ui: { type: null, required: false },
|
|
43
|
+
open: { type: Boolean, required: false },
|
|
44
|
+
defaultOpen: { type: Boolean, required: false },
|
|
45
|
+
autocomplete: { type: String, required: false },
|
|
46
|
+
disabled: { type: Boolean, required: false },
|
|
47
|
+
name: { type: String, required: false },
|
|
48
|
+
required: { type: Boolean, required: false },
|
|
49
|
+
icon: { type: String, required: false },
|
|
50
|
+
avatar: { type: Object, required: false },
|
|
51
|
+
leading: { type: Boolean, required: false },
|
|
52
|
+
leadingIcon: { type: String, required: false },
|
|
53
|
+
trailing: { type: Boolean, required: false },
|
|
54
|
+
loading: { type: Boolean, required: false },
|
|
55
|
+
loadingIcon: { type: String, required: false }
|
|
56
|
+
});
|
|
57
|
+
const emits = defineEmits(["update:open", "change", "blur", "focus", "update:modelValue"]);
|
|
58
|
+
const slots = defineSlots();
|
|
59
|
+
const appConfig = useAppConfig();
|
|
60
|
+
const rootProps = useForwardPropsEmits(reactivePick(props, "open", "defaultOpen", "disabled", "autocomplete", "required", "multiple"), emits);
|
|
61
|
+
const portalProps = usePortal(toRef(() => props.portal));
|
|
62
|
+
const contentProps = toRef(() => defu(props.content, { side: "bottom", sideOffset: 8, collisionPadding: 8, position: "popper" }));
|
|
63
|
+
const arrowProps = toRef(() => props.arrow);
|
|
64
|
+
const { emitFormChange, emitFormInput, emitFormBlur, emitFormFocus, size: formGroupSize, color, id, name, highlight, disabled, ariaAttrs } = useFormField(props);
|
|
65
|
+
const { orientation, size: buttonGroupSize } = useButtonGroup(props);
|
|
66
|
+
const { isLeading, isTrailing, leadingIconName, trailingIconName } = useComponentIcons(toRef(() => defu(props, { trailingIcon: appConfig.ui.icons.chevronDown })));
|
|
67
|
+
const selectSize = computed(() => buttonGroupSize.value || formGroupSize.value);
|
|
68
|
+
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.select || {} })({
|
|
69
|
+
color: color.value,
|
|
70
|
+
variant: props.variant,
|
|
71
|
+
size: selectSize?.value,
|
|
72
|
+
loading: props.loading,
|
|
73
|
+
highlight: highlight.value,
|
|
74
|
+
leading: isLeading.value || !!props.avatar || !!slots.leading,
|
|
75
|
+
trailing: isTrailing.value || !!slots.trailing,
|
|
76
|
+
buttonGroup: orientation.value
|
|
77
|
+
}));
|
|
78
|
+
const groups = computed(
|
|
79
|
+
() => props.items?.length ? isArrayOfArray(props.items) ? props.items : [props.items] : []
|
|
80
|
+
);
|
|
81
|
+
const items = computed(() => groups.value.flatMap((group) => group));
|
|
82
|
+
function displayValue(value) {
|
|
83
|
+
if (props.multiple && Array.isArray(value)) {
|
|
84
|
+
const values = value.map((v) => displayValue(v)).filter(Boolean);
|
|
85
|
+
return values?.length ? values.join(", ") : void 0;
|
|
86
|
+
}
|
|
87
|
+
const item = items.value.find((item2) => compare(typeof item2 === "object" ? get(item2, props.valueKey) : item2, value));
|
|
88
|
+
return item && (typeof item === "object" ? get(item, props.labelKey) : item);
|
|
89
|
+
}
|
|
90
|
+
const triggerRef = ref(null);
|
|
91
|
+
function autoFocus() {
|
|
92
|
+
if (props.autofocus) {
|
|
93
|
+
triggerRef.value?.$el?.focus({
|
|
94
|
+
focusVisible: true
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
onMounted(() => {
|
|
99
|
+
setTimeout(() => {
|
|
100
|
+
autoFocus();
|
|
101
|
+
}, props.autofocusDelay);
|
|
102
|
+
});
|
|
103
|
+
function onUpdate(value) {
|
|
104
|
+
const event = new Event("change", { target: { value } });
|
|
105
|
+
emits("change", event);
|
|
106
|
+
emitFormChange();
|
|
107
|
+
emitFormInput();
|
|
108
|
+
}
|
|
109
|
+
function onUpdateOpen(value) {
|
|
110
|
+
if (!value) {
|
|
111
|
+
const event = new FocusEvent("blur");
|
|
112
|
+
emits("blur", event);
|
|
113
|
+
emitFormBlur();
|
|
114
|
+
} else {
|
|
115
|
+
const event = new FocusEvent("focus");
|
|
116
|
+
emits("focus", event);
|
|
117
|
+
emitFormFocus();
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
function isSelectItem(item) {
|
|
121
|
+
return typeof item === "object" && item !== null;
|
|
122
|
+
}
|
|
123
|
+
defineExpose({
|
|
124
|
+
triggerRef
|
|
125
|
+
});
|
|
126
|
+
</script>
|
|
127
|
+
|
|
128
|
+
<template>
|
|
129
|
+
<SelectRoot
|
|
130
|
+
v-slot="{ modelValue, open }"
|
|
131
|
+
:name="name"
|
|
132
|
+
v-bind="rootProps"
|
|
133
|
+
:autocomplete="autocomplete"
|
|
134
|
+
:disabled="disabled"
|
|
135
|
+
:default-value="defaultValue"
|
|
136
|
+
:model-value="modelValue"
|
|
137
|
+
@update:model-value="onUpdate"
|
|
138
|
+
@update:open="onUpdateOpen"
|
|
139
|
+
>
|
|
140
|
+
<SelectTrigger :id="id" ref="triggerRef" :class="ui.base({ class: [props.ui?.base, props.class] })" v-bind="{ ...$attrs, ...ariaAttrs }">
|
|
141
|
+
<span v-if="isLeading || !!avatar || !!slots.leading" :class="ui.leading({ class: props.ui?.leading })">
|
|
142
|
+
<slot name="leading" :model-value="modelValue" :open="open" :ui="ui">
|
|
143
|
+
<UIcon v-if="isLeading && leadingIconName" :name="leadingIconName" :class="ui.leadingIcon({ class: props.ui?.leadingIcon })" />
|
|
144
|
+
<UAvatar v-else-if="!!avatar" :size="props.ui?.itemLeadingAvatarSize || ui.itemLeadingAvatarSize()" v-bind="avatar" :class="ui.itemLeadingAvatar({ class: props.ui?.itemLeadingAvatar })" />
|
|
145
|
+
</slot>
|
|
146
|
+
</span>
|
|
147
|
+
|
|
148
|
+
<slot :model-value="modelValue" :open="open">
|
|
149
|
+
<template v-for="displayedModelValue in [displayValue(modelValue)]" :key="displayedModelValue">
|
|
150
|
+
<span v-if="displayedModelValue !== void 0 && displayedModelValue !== null" :class="ui.value({ class: props.ui?.value })">
|
|
151
|
+
{{ displayedModelValue }}
|
|
152
|
+
</span>
|
|
153
|
+
<span v-else :class="ui.placeholder({ class: props.ui?.placeholder })">
|
|
154
|
+
{{ placeholder ?? "\xA0" }}
|
|
155
|
+
</span>
|
|
156
|
+
</template>
|
|
157
|
+
</slot>
|
|
158
|
+
|
|
159
|
+
<span v-if="isTrailing || !!slots.trailing" :class="ui.trailing({ class: props.ui?.trailing })">
|
|
160
|
+
<slot name="trailing" :model-value="modelValue" :open="open" :ui="ui">
|
|
161
|
+
<UIcon v-if="trailingIconName" :name="trailingIconName" :class="ui.trailingIcon({ class: props.ui?.trailingIcon })" />
|
|
162
|
+
</slot>
|
|
163
|
+
</span>
|
|
164
|
+
</SelectTrigger>
|
|
165
|
+
|
|
166
|
+
<SelectPortal v-bind="portalProps">
|
|
167
|
+
<SelectContent :class="ui.content({ class: props.ui?.content })" v-bind="contentProps">
|
|
168
|
+
<slot name="content-top" />
|
|
169
|
+
|
|
170
|
+
<div role="presentation" :class="ui.viewport({ class: props.ui?.viewport })">
|
|
171
|
+
<SelectGroup v-for="(group, groupIndex) in groups" :key="`group-${groupIndex}`" :class="ui.group({ class: props.ui?.group })">
|
|
172
|
+
<template v-for="(item, index) in group" :key="`group-${groupIndex}-${index}`">
|
|
173
|
+
<SelectLabel v-if="isSelectItem(item) && item.type === 'label'" :class="ui.label({ class: [props.ui?.label, item.ui?.label, item.class] })">
|
|
174
|
+
{{ get(item, props.labelKey) }}
|
|
175
|
+
</SelectLabel>
|
|
176
|
+
|
|
177
|
+
<SelectSeparator v-else-if="isSelectItem(item) && item.type === 'separator'" :class="ui.separator({ class: [props.ui?.separator, item.ui?.separator, item.class] })" />
|
|
178
|
+
|
|
179
|
+
<SelectItem
|
|
180
|
+
v-else
|
|
181
|
+
:class="ui.item({ class: [props.ui?.item, isSelectItem(item) && item.ui?.item, isSelectItem(item) && item.class] })"
|
|
182
|
+
:disabled="isSelectItem(item) && item.disabled"
|
|
183
|
+
:value="isSelectItem(item) ? get(item, props.valueKey) : item"
|
|
184
|
+
@select="isSelectItem(item) && item.onSelect?.($event)"
|
|
185
|
+
>
|
|
186
|
+
<slot name="item" :item="item" :index="index">
|
|
187
|
+
<slot name="item-leading" :item="item" :index="index">
|
|
188
|
+
<UIcon v-if="isSelectItem(item) && item.icon" :name="item.icon" :class="ui.itemLeadingIcon({ class: [props.ui?.itemLeadingIcon, item.ui?.itemLeadingIcon] })" />
|
|
189
|
+
<UAvatar v-else-if="isSelectItem(item) && item.avatar" :size="item.ui?.itemLeadingAvatarSize || props.ui?.itemLeadingAvatarSize || ui.itemLeadingAvatarSize()" v-bind="item.avatar" :class="ui.itemLeadingAvatar({ class: [props.ui?.itemLeadingAvatar, item.ui?.itemLeadingAvatar] })" />
|
|
190
|
+
<UChip
|
|
191
|
+
v-else-if="isSelectItem(item) && item.chip"
|
|
192
|
+
:size="item.ui?.itemLeadingChipSize || props.ui?.itemLeadingChipSize || ui.itemLeadingChipSize()"
|
|
193
|
+
inset
|
|
194
|
+
standalone
|
|
195
|
+
v-bind="item.chip"
|
|
196
|
+
:class="ui.itemLeadingChip({ class: [props.ui?.itemLeadingChip, item.ui?.itemLeadingChip] })"
|
|
197
|
+
/>
|
|
198
|
+
</slot>
|
|
199
|
+
|
|
200
|
+
<SelectItemText :class="ui.itemLabel({ class: [props.ui?.itemLabel, isSelectItem(item) && item.ui?.itemLabel] })">
|
|
201
|
+
<slot name="item-label" :item="item" :index="index">
|
|
202
|
+
{{ isSelectItem(item) ? get(item, props.labelKey) : item }}
|
|
203
|
+
</slot>
|
|
204
|
+
</SelectItemText>
|
|
205
|
+
|
|
206
|
+
<span :class="ui.itemTrailing({ class: [props.ui?.itemTrailing, isSelectItem(item) && item.ui?.itemTrailing] })">
|
|
207
|
+
<slot name="item-trailing" :item="item" :index="index" />
|
|
208
|
+
|
|
209
|
+
<SelectItemIndicator as-child>
|
|
210
|
+
<UIcon :name="selectedIcon || appConfig.ui.icons.check" :class="ui.itemTrailingIcon({ class: [props.ui?.itemTrailingIcon, isSelectItem(item) && item.ui?.itemTrailingIcon] })" />
|
|
211
|
+
</SelectItemIndicator>
|
|
212
|
+
</span>
|
|
213
|
+
</slot>
|
|
214
|
+
</SelectItem>
|
|
215
|
+
</template>
|
|
216
|
+
</SelectGroup>
|
|
217
|
+
</div>
|
|
218
|
+
|
|
219
|
+
<slot name="content-bottom" />
|
|
220
|
+
|
|
221
|
+
<SelectArrow v-if="!!arrow" v-bind="arrowProps" :class="ui.arrow({ class: props.ui?.arrow })" />
|
|
222
|
+
</SelectContent>
|
|
223
|
+
</SelectPortal>
|
|
224
|
+
</SelectRoot>
|
|
225
|
+
</template>
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
import type { SelectRootProps, SelectRootEmits, SelectContentProps, SelectContentEmits, SelectArrowProps } from 'reka-ui';
|
|
2
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
3
|
+
import theme from '#build/ui/select';
|
|
4
|
+
import type { UseComponentIconsProps } from '../composables/useComponentIcons';
|
|
5
|
+
import type { AvatarProps, ChipProps } from '../types';
|
|
6
|
+
import type { AcceptableValue, ArrayOrNested, GetItemKeys, GetModelValue, GetModelValueEmits, NestedItem, EmitsToProps, ComponentConfig } from '../types/utils';
|
|
7
|
+
type Select = ComponentConfig<typeof theme, AppConfig, 'select'>;
|
|
8
|
+
interface SelectItemBase {
|
|
9
|
+
label?: string;
|
|
10
|
+
/**
|
|
11
|
+
* @IconifyIcon
|
|
12
|
+
*/
|
|
13
|
+
icon?: string;
|
|
14
|
+
avatar?: AvatarProps;
|
|
15
|
+
chip?: ChipProps;
|
|
16
|
+
/**
|
|
17
|
+
* The item type.
|
|
18
|
+
* @defaultValue 'item'
|
|
19
|
+
*/
|
|
20
|
+
type?: 'label' | 'separator' | 'item';
|
|
21
|
+
value?: AcceptableValue | boolean;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
onSelect?(e?: Event): void;
|
|
24
|
+
class?: any;
|
|
25
|
+
ui?: Pick<Select['slots'], 'label' | 'separator' | 'item' | 'itemLeadingIcon' | 'itemLeadingAvatarSize' | 'itemLeadingAvatar' | 'itemLeadingChipSize' | 'itemLeadingChip' | 'itemLabel' | 'itemTrailing' | 'itemTrailingIcon'>;
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
}
|
|
28
|
+
export type SelectItem = SelectItemBase | AcceptableValue | boolean;
|
|
29
|
+
export interface SelectProps<T extends ArrayOrNested<SelectItem> = ArrayOrNested<SelectItem>, VK extends GetItemKeys<T> = 'value', M extends boolean = false> extends Omit<SelectRootProps<T>, 'dir' | 'multiple' | 'modelValue' | 'defaultValue' | 'by'>, UseComponentIconsProps {
|
|
30
|
+
id?: string;
|
|
31
|
+
/** The placeholder text when the select is empty. */
|
|
32
|
+
placeholder?: string;
|
|
33
|
+
/**
|
|
34
|
+
* @defaultValue 'primary'
|
|
35
|
+
*/
|
|
36
|
+
color?: Select['variants']['color'];
|
|
37
|
+
/**
|
|
38
|
+
* @defaultValue 'outline'
|
|
39
|
+
*/
|
|
40
|
+
variant?: Select['variants']['variant'];
|
|
41
|
+
/**
|
|
42
|
+
* @defaultValue 'md'
|
|
43
|
+
*/
|
|
44
|
+
size?: Select['variants']['size'];
|
|
45
|
+
/**
|
|
46
|
+
* The icon displayed to open the menu.
|
|
47
|
+
* @defaultValue appConfig.ui.icons.chevronDown
|
|
48
|
+
* @IconifyIcon
|
|
49
|
+
*/
|
|
50
|
+
trailingIcon?: string;
|
|
51
|
+
/**
|
|
52
|
+
* The icon displayed when an item is selected.
|
|
53
|
+
* @defaultValue appConfig.ui.icons.check
|
|
54
|
+
* @IconifyIcon
|
|
55
|
+
*/
|
|
56
|
+
selectedIcon?: string;
|
|
57
|
+
/**
|
|
58
|
+
* The content of the menu.
|
|
59
|
+
* @defaultValue { side: 'bottom', sideOffset: 8, collisionPadding: 8, position: 'popper' }
|
|
60
|
+
*/
|
|
61
|
+
content?: Omit<SelectContentProps, 'as' | 'asChild' | 'forceMount'> & Partial<EmitsToProps<SelectContentEmits>>;
|
|
62
|
+
/**
|
|
63
|
+
* Display an arrow alongside the menu.
|
|
64
|
+
* @defaultValue false
|
|
65
|
+
*/
|
|
66
|
+
arrow?: boolean | Omit<SelectArrowProps, 'as' | 'asChild'>;
|
|
67
|
+
/**
|
|
68
|
+
* Render the menu in a portal.
|
|
69
|
+
* @defaultValue true
|
|
70
|
+
*/
|
|
71
|
+
portal?: boolean | string | HTMLElement;
|
|
72
|
+
/**
|
|
73
|
+
* When `items` is an array of objects, select the field to use as the value.
|
|
74
|
+
* @defaultValue 'value'
|
|
75
|
+
*/
|
|
76
|
+
valueKey?: VK;
|
|
77
|
+
/**
|
|
78
|
+
* When `items` is an array of objects, select the field to use as the label.
|
|
79
|
+
* @defaultValue 'label'
|
|
80
|
+
*/
|
|
81
|
+
labelKey?: keyof NestedItem<T>;
|
|
82
|
+
items?: T;
|
|
83
|
+
/** The value of the Select when initially rendered. Use when you do not need to control the state of the Select. */
|
|
84
|
+
defaultValue?: GetModelValue<T, VK, M>;
|
|
85
|
+
/** The controlled value of the Select. Can be bind as `v-model`. */
|
|
86
|
+
modelValue?: GetModelValue<T, VK, M>;
|
|
87
|
+
/** Whether multiple options can be selected or not. */
|
|
88
|
+
multiple?: M & boolean;
|
|
89
|
+
/** Highlight the ring color like a focus state. */
|
|
90
|
+
highlight?: boolean;
|
|
91
|
+
autofocus?: boolean;
|
|
92
|
+
autofocusDelay?: number;
|
|
93
|
+
class?: any;
|
|
94
|
+
ui?: Select['slots'];
|
|
95
|
+
}
|
|
96
|
+
export type SelectEmits<A extends ArrayOrNested<SelectItem>, VK extends GetItemKeys<A> | undefined, M extends boolean> = Omit<SelectRootEmits, 'update:modelValue'> & {
|
|
97
|
+
change: [payload: Event];
|
|
98
|
+
blur: [payload: FocusEvent];
|
|
99
|
+
focus: [payload: FocusEvent];
|
|
100
|
+
} & GetModelValueEmits<A, VK, M>;
|
|
101
|
+
type SlotProps<T extends SelectItem> = (props: {
|
|
102
|
+
item: T;
|
|
103
|
+
index: number;
|
|
104
|
+
}) => any;
|
|
105
|
+
export interface SelectSlots<A extends ArrayOrNested<SelectItem> = ArrayOrNested<SelectItem>, VK extends GetItemKeys<A> | undefined = undefined, M extends boolean = false, T extends NestedItem<A> = NestedItem<A>> {
|
|
106
|
+
'leading'(props: {
|
|
107
|
+
modelValue?: GetModelValue<A, VK, M>;
|
|
108
|
+
open: boolean;
|
|
109
|
+
ui: {
|
|
110
|
+
[K in keyof Required<Select['slots']>]: (props?: Record<string, any>) => string;
|
|
111
|
+
};
|
|
112
|
+
}): any;
|
|
113
|
+
'default'(props: {
|
|
114
|
+
modelValue?: GetModelValue<A, VK, M>;
|
|
115
|
+
open: boolean;
|
|
116
|
+
}): any;
|
|
117
|
+
'trailing'(props: {
|
|
118
|
+
modelValue?: GetModelValue<A, VK, M>;
|
|
119
|
+
open: boolean;
|
|
120
|
+
ui: {
|
|
121
|
+
[K in keyof Required<Select['slots']>]: (props?: Record<string, any>) => string;
|
|
122
|
+
};
|
|
123
|
+
}): any;
|
|
124
|
+
'item': SlotProps<T>;
|
|
125
|
+
'item-leading': SlotProps<T>;
|
|
126
|
+
'item-label': SlotProps<T>;
|
|
127
|
+
'item-trailing': SlotProps<T>;
|
|
128
|
+
'content-top': (props?: {}) => any;
|
|
129
|
+
'content-bottom': (props?: {}) => any;
|
|
130
|
+
}
|
|
131
|
+
declare const _default: <T extends ArrayOrNested<SelectItem>, VK extends GetItemKeys<T> = "value", M extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
132
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
133
|
+
readonly onBlur?: ((payload: FocusEvent) => any) | undefined;
|
|
134
|
+
readonly onChange?: ((payload: Event) => any) | undefined;
|
|
135
|
+
readonly onFocus?: ((payload: FocusEvent) => any) | undefined;
|
|
136
|
+
readonly "onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
137
|
+
readonly "onUpdate:modelValue"?: ((payload: GetModelValue<T, VK, M>) => any) | undefined;
|
|
138
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onFocus" | "onBlur" | "onChange" | "onUpdate:open" | "onUpdate:modelValue"> & SelectProps<T, VK, M> & Partial<{}>> & import("vue").PublicProps;
|
|
139
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
140
|
+
triggerRef: import("vue").Ref<({
|
|
141
|
+
$: import("vue").ComponentInternalInstance;
|
|
142
|
+
$data: {};
|
|
143
|
+
$props: {
|
|
144
|
+
readonly disabled?: boolean | undefined;
|
|
145
|
+
readonly reference?: import("reka-ui").ReferenceElement | undefined;
|
|
146
|
+
readonly asChild?: boolean | undefined;
|
|
147
|
+
readonly as?: (import("reka-ui").AsTag | import("vue").Component) | undefined;
|
|
148
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
149
|
+
$attrs: {
|
|
150
|
+
[x: string]: unknown;
|
|
151
|
+
};
|
|
152
|
+
$refs: {
|
|
153
|
+
[x: string]: unknown;
|
|
154
|
+
};
|
|
155
|
+
$slots: Readonly<{
|
|
156
|
+
[name: string]: import("vue").Slot<any> | undefined;
|
|
157
|
+
}>;
|
|
158
|
+
$root: import("vue").ComponentPublicInstance | null;
|
|
159
|
+
$parent: import("vue").ComponentPublicInstance | null;
|
|
160
|
+
$host: Element | null;
|
|
161
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
162
|
+
$el: any;
|
|
163
|
+
$options: import("vue").ComponentOptionsBase<Readonly<import("reka-ui").SelectTriggerProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
164
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
165
|
+
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
|
|
166
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
167
|
+
created?: (() => void) | (() => void)[];
|
|
168
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
169
|
+
mounted?: (() => void) | (() => void)[];
|
|
170
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
171
|
+
updated?: (() => void) | (() => void)[];
|
|
172
|
+
activated?: (() => void) | (() => void)[];
|
|
173
|
+
deactivated?: (() => void) | (() => void)[];
|
|
174
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
175
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
176
|
+
destroyed?: (() => void) | (() => void)[];
|
|
177
|
+
unmounted?: (() => void) | (() => void)[];
|
|
178
|
+
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
179
|
+
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
180
|
+
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
181
|
+
};
|
|
182
|
+
$forceUpdate: () => void;
|
|
183
|
+
$nextTick: typeof import("vue").nextTick;
|
|
184
|
+
$watch<T_1 extends string | ((...args: any) => any)>(source: T_1, cb: T_1 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;
|
|
185
|
+
} & Readonly<{
|
|
186
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
187
|
+
}> & Omit<Readonly<import("reka-ui").SelectTriggerProps> & Readonly<{}>, "as"> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
|
|
188
|
+
$slots: {
|
|
189
|
+
default?(_: {}): any;
|
|
190
|
+
};
|
|
191
|
+
}) | null, ({
|
|
192
|
+
$: import("vue").ComponentInternalInstance;
|
|
193
|
+
$data: {};
|
|
194
|
+
$props: {
|
|
195
|
+
readonly disabled?: boolean | undefined;
|
|
196
|
+
readonly reference?: import("reka-ui").ReferenceElement | undefined;
|
|
197
|
+
readonly asChild?: boolean | undefined;
|
|
198
|
+
readonly as?: (import("reka-ui").AsTag | import("vue").Component) | undefined;
|
|
199
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
200
|
+
$attrs: {
|
|
201
|
+
[x: string]: unknown;
|
|
202
|
+
};
|
|
203
|
+
$refs: {
|
|
204
|
+
[x: string]: unknown;
|
|
205
|
+
};
|
|
206
|
+
$slots: Readonly<{
|
|
207
|
+
[name: string]: import("vue").Slot<any> | undefined;
|
|
208
|
+
}>;
|
|
209
|
+
$root: import("vue").ComponentPublicInstance | null;
|
|
210
|
+
$parent: import("vue").ComponentPublicInstance | null;
|
|
211
|
+
$host: Element | null;
|
|
212
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
213
|
+
$el: any;
|
|
214
|
+
$options: import("vue").ComponentOptionsBase<Readonly<import("reka-ui").SelectTriggerProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
215
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
216
|
+
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
|
|
217
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
218
|
+
created?: (() => void) | (() => void)[];
|
|
219
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
220
|
+
mounted?: (() => void) | (() => void)[];
|
|
221
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
222
|
+
updated?: (() => void) | (() => void)[];
|
|
223
|
+
activated?: (() => void) | (() => void)[];
|
|
224
|
+
deactivated?: (() => void) | (() => void)[];
|
|
225
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
226
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
227
|
+
destroyed?: (() => void) | (() => void)[];
|
|
228
|
+
unmounted?: (() => void) | (() => void)[];
|
|
229
|
+
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
230
|
+
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
231
|
+
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
232
|
+
};
|
|
233
|
+
$forceUpdate: () => void;
|
|
234
|
+
$nextTick: typeof import("vue").nextTick;
|
|
235
|
+
$watch<T_1 extends string | ((...args: any) => any)>(source: T_1, cb: T_1 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;
|
|
236
|
+
} & Readonly<{
|
|
237
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
238
|
+
}> & Omit<Readonly<import("reka-ui").SelectTriggerProps> & Readonly<{}>, "as"> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
|
|
239
|
+
$slots: {
|
|
240
|
+
default?(_: {}): any;
|
|
241
|
+
};
|
|
242
|
+
}) | null>;
|
|
243
|
+
}>): void;
|
|
244
|
+
attrs: any;
|
|
245
|
+
slots: SelectSlots<T, VK, M, NestedItem<T>>;
|
|
246
|
+
emit: ((evt: "blur", payload: FocusEvent) => void) & ((evt: "change", payload: Event) => void) & ((evt: "focus", payload: FocusEvent) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "update:modelValue", payload: GetModelValue<T, VK, M>) => void);
|
|
247
|
+
}>) => import("vue").VNode & {
|
|
248
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
249
|
+
};
|
|
250
|
+
export default _default;
|
|
251
|
+
type __VLS_PrettifyLocal<T> = {
|
|
252
|
+
[K in keyof T]: T[K];
|
|
253
|
+
} & {};
|