@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,27 @@
|
|
|
1
|
+
import type { UseResizableProps } from '../composables/useResizable';
|
|
2
|
+
export interface DashboardGroupProps extends Pick<UseResizableProps, 'storage' | 'storageKey' | 'persistent' | 'unit'> {
|
|
3
|
+
/**
|
|
4
|
+
* The element or component this component should render as.
|
|
5
|
+
* @defaultValue 'div'
|
|
6
|
+
*/
|
|
7
|
+
as?: any;
|
|
8
|
+
class?: any;
|
|
9
|
+
}
|
|
10
|
+
export interface DashboardGroupSlots {
|
|
11
|
+
default(props?: {}): any;
|
|
12
|
+
}
|
|
13
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<DashboardGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DashboardGroupProps> & Readonly<{}>, {
|
|
14
|
+
storage: "cookie" | "local";
|
|
15
|
+
as: any;
|
|
16
|
+
storageKey: string;
|
|
17
|
+
persistent: boolean;
|
|
18
|
+
unit: "%" | "rem" | "px";
|
|
19
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
20
|
+
default?: (props: {}) => any;
|
|
21
|
+
}>;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
24
|
+
new (): {
|
|
25
|
+
$slots: S;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/dashboard-navbar";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { computed } from "vue";
|
|
7
|
+
import { Primitive } from "reka-ui";
|
|
8
|
+
import { createReusableTemplate } from "@vueuse/core";
|
|
9
|
+
import { useAppConfig } from "#imports";
|
|
10
|
+
import { useDashboard } from "../utils/dashboard";
|
|
11
|
+
import { tv } from "../utils/tv";
|
|
12
|
+
const props = defineProps({
|
|
13
|
+
as: { type: null, required: false, default: "div" },
|
|
14
|
+
icon: { type: String, required: false },
|
|
15
|
+
title: { type: String, required: false },
|
|
16
|
+
toggle: { type: [Boolean, Object], required: false, default: true },
|
|
17
|
+
toggleSide: { type: String, required: false, default: "left" },
|
|
18
|
+
class: { type: null, required: false },
|
|
19
|
+
ui: { type: null, required: false }
|
|
20
|
+
});
|
|
21
|
+
defineSlots();
|
|
22
|
+
const dashboardContext = useDashboard();
|
|
23
|
+
const appConfig = useAppConfig();
|
|
24
|
+
const [DefineToggleTemplate, ReuseToggleTemplate] = createReusableTemplate();
|
|
25
|
+
const uiPro = computed(
|
|
26
|
+
() => tv({
|
|
27
|
+
extend: tv(theme),
|
|
28
|
+
...appConfig.ui?.dashboardNavbar
|
|
29
|
+
})
|
|
30
|
+
);
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<template>
|
|
34
|
+
<DefineToggleTemplate>
|
|
35
|
+
<slot name="toggle" v-bind="dashboardContext">
|
|
36
|
+
<UDashboardSidebarToggle
|
|
37
|
+
v-if="props.toggle"
|
|
38
|
+
v-bind="typeof props.toggle === 'object' ? props.toggle : {}"
|
|
39
|
+
:side="props.toggleSide"
|
|
40
|
+
:class="uiPro.toggle({ class: props.ui?.toggle, toggleSide: props.toggleSide })"
|
|
41
|
+
/>
|
|
42
|
+
</slot>
|
|
43
|
+
</DefineToggleTemplate>
|
|
44
|
+
|
|
45
|
+
<Primitive :as="props.as" :class="uiPro.root({ class: [props.ui?.root, props.class] })">
|
|
46
|
+
<div :class="uiPro.left({ class: props.ui?.left })">
|
|
47
|
+
<ReuseToggleTemplate v-if="props.toggleSide === 'left'" />
|
|
48
|
+
|
|
49
|
+
<slot name="left" v-bind="dashboardContext">
|
|
50
|
+
<slot name="leading" v-bind="dashboardContext">
|
|
51
|
+
<UIcon v-if="props.icon" :name="props.icon" :class="uiPro.icon({ class: props.ui?.icon })" />
|
|
52
|
+
</slot>
|
|
53
|
+
|
|
54
|
+
<h1 :class="uiPro.title({ class: props.ui?.title })">
|
|
55
|
+
<slot name="title">
|
|
56
|
+
{{ props.title }}
|
|
57
|
+
</slot>
|
|
58
|
+
</h1>
|
|
59
|
+
|
|
60
|
+
<slot name="trailing" v-bind="dashboardContext" />
|
|
61
|
+
</slot>
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<div v-if="!!slots.default" :class="uiPro.center({ class: props.ui?.center })">
|
|
65
|
+
<slot v-bind="dashboardContext" />
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
<div :class="uiPro.right({ class: props.ui?.right })">
|
|
69
|
+
<slot name="right" v-bind="dashboardContext" />
|
|
70
|
+
|
|
71
|
+
<ReuseToggleTemplate v-if="props.toggleSide === 'right'" />
|
|
72
|
+
</div>
|
|
73
|
+
</Primitive>
|
|
74
|
+
</template>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
2
|
+
import type { ButtonProps, ComponentConfig } from '@nuxt/ui';
|
|
3
|
+
import type { DashboardContext } from '../utils/dashboard';
|
|
4
|
+
import theme from '#build/ui/dashboard-navbar';
|
|
5
|
+
type DashboardNavbar = ComponentConfig<typeof theme, AppConfig, 'dashboardNavbar'>;
|
|
6
|
+
export interface DashboardNavbarProps {
|
|
7
|
+
/**
|
|
8
|
+
* The element or component this component should render as.
|
|
9
|
+
* @defaultValue 'div'
|
|
10
|
+
*/
|
|
11
|
+
as?: any;
|
|
12
|
+
/**
|
|
13
|
+
* The icon displayed next to the title.
|
|
14
|
+
* @IconifyIcon
|
|
15
|
+
*/
|
|
16
|
+
icon?: string;
|
|
17
|
+
title?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Customize the toggle button to open the sidebar.
|
|
20
|
+
* `{ color: 'neutral', variant: 'ghost' }`
|
|
21
|
+
* @defaultValue true
|
|
22
|
+
*/
|
|
23
|
+
toggle?: boolean | Partial<ButtonProps>;
|
|
24
|
+
/**
|
|
25
|
+
* The side to render the toggle button on.
|
|
26
|
+
* @defaultValue 'left'
|
|
27
|
+
*/
|
|
28
|
+
toggleSide?: 'left' | 'right';
|
|
29
|
+
class?: any;
|
|
30
|
+
ui?: DashboardNavbar['slots'];
|
|
31
|
+
}
|
|
32
|
+
export interface DashboardNavbarSlotsProps extends Omit<DashboardContext, 'storage' | 'storageKey' | 'persistent' | 'unit'> {
|
|
33
|
+
}
|
|
34
|
+
export interface DashboardNavbarSlots {
|
|
35
|
+
title(props?: {}): any;
|
|
36
|
+
leading(props: DashboardNavbarSlotsProps): any;
|
|
37
|
+
trailing(props: DashboardNavbarSlotsProps): any;
|
|
38
|
+
left(props: DashboardNavbarSlotsProps): any;
|
|
39
|
+
default(props: DashboardNavbarSlotsProps): any;
|
|
40
|
+
right(props: DashboardNavbarSlotsProps): any;
|
|
41
|
+
toggle(props: DashboardNavbarSlotsProps): any;
|
|
42
|
+
}
|
|
43
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<DashboardNavbarProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DashboardNavbarProps> & Readonly<{}>, {
|
|
44
|
+
toggle: boolean | Partial<ButtonProps>;
|
|
45
|
+
as: any;
|
|
46
|
+
toggleSide: "left" | "right";
|
|
47
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, DashboardNavbarSlots>;
|
|
48
|
+
export default _default;
|
|
49
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
50
|
+
new (): {
|
|
51
|
+
$slots: S;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/dashboard-panel";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { useId, toRef } from "vue";
|
|
7
|
+
import { useAppConfig } from "#imports";
|
|
8
|
+
import { useResizable } from "../composables/useResizable";
|
|
9
|
+
import { useDashboard } from "../utils/dashboard";
|
|
10
|
+
import { tv } from "../utils/tv";
|
|
11
|
+
const props = defineProps({
|
|
12
|
+
class: { type: null, required: false },
|
|
13
|
+
ui: { type: null, required: false },
|
|
14
|
+
id: { type: String, required: false },
|
|
15
|
+
minSize: { type: Number, required: false },
|
|
16
|
+
maxSize: { type: Number, required: false },
|
|
17
|
+
defaultSize: { type: Number, required: false },
|
|
18
|
+
resizable: { type: Boolean, required: false, default: false }
|
|
19
|
+
});
|
|
20
|
+
defineSlots();
|
|
21
|
+
const appConfig = useAppConfig();
|
|
22
|
+
const dashboardContext = useDashboard({ storageKey: "dashboard", unit: "%" });
|
|
23
|
+
const panelId = `${dashboardContext.storageKey}-panel-${props.id || useId()}`;
|
|
24
|
+
const { el, size, isDragging, onMouseDown, onTouchStart } = useResizable(panelId, toRef(() => ({ ...dashboardContext, ...props })));
|
|
25
|
+
const uiPro = tv({ extend: tv(theme), ...appConfig.ui?.dashboardPanel });
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<div
|
|
30
|
+
:id="panelId"
|
|
31
|
+
ref="el"
|
|
32
|
+
:data-dragging="isDragging"
|
|
33
|
+
:class="uiPro.root({ class: [props.ui?.root, props.class] })"
|
|
34
|
+
:style="size ? { '--width': `${size}${dashboardContext.unit}` } : void 0"
|
|
35
|
+
>
|
|
36
|
+
<slot>
|
|
37
|
+
<slot name="header" />
|
|
38
|
+
|
|
39
|
+
<div :class="uiPro.body({ class: props.ui?.body })">
|
|
40
|
+
<slot name="body" />
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<slot name="footer" />
|
|
44
|
+
</slot>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<slot name="resize-handle" :on-mouse-down="onMouseDown" :on-touch-start="onTouchStart">
|
|
48
|
+
<UDashboardResizeHandle
|
|
49
|
+
v-if="props.resizable"
|
|
50
|
+
:aria-controls="panelId"
|
|
51
|
+
:class="uiPro.handle({ class: props.ui?.handle })"
|
|
52
|
+
@mousedown="onMouseDown"
|
|
53
|
+
@touchstart="onTouchStart"
|
|
54
|
+
/>
|
|
55
|
+
</slot>
|
|
56
|
+
</template>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
2
|
+
import type { ComponentConfig } from '@nuxt/ui';
|
|
3
|
+
import type { UseResizableProps } from '../composables/useResizable';
|
|
4
|
+
import theme from '#build/ui/dashboard-panel';
|
|
5
|
+
type DashboardPanel = ComponentConfig<typeof theme, AppConfig, 'dashboardPanel'>;
|
|
6
|
+
export interface DashboardPanelProps extends Pick<UseResizableProps, 'id' | 'minSize' | 'maxSize' | 'defaultSize' | 'resizable'> {
|
|
7
|
+
class?: any;
|
|
8
|
+
ui?: DashboardPanel['slots'];
|
|
9
|
+
}
|
|
10
|
+
export interface DashboardPanelSlots {
|
|
11
|
+
'default'(props?: {}): any;
|
|
12
|
+
'header'(props?: {}): any;
|
|
13
|
+
'body'(props?: {}): any;
|
|
14
|
+
'footer'(props?: {}): any;
|
|
15
|
+
'resize-handle'(props: {
|
|
16
|
+
onMouseDown: (e: MouseEvent) => void;
|
|
17
|
+
onTouchStart: (e: TouchEvent) => void;
|
|
18
|
+
}): any;
|
|
19
|
+
}
|
|
20
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<DashboardPanelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DashboardPanelProps> & Readonly<{}>, {
|
|
21
|
+
resizable: boolean;
|
|
22
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, DashboardPanelSlots>;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
25
|
+
new (): {
|
|
26
|
+
$slots: S;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/dashboard-resize-handle";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { computed } from "vue";
|
|
7
|
+
import { Primitive } from "reka-ui";
|
|
8
|
+
import { useAppConfig } from "#imports";
|
|
9
|
+
import { tv } from "../utils/tv";
|
|
10
|
+
const props = defineProps({
|
|
11
|
+
as: { type: null, required: false },
|
|
12
|
+
class: { type: null, required: false }
|
|
13
|
+
});
|
|
14
|
+
defineSlots();
|
|
15
|
+
const appConfig = useAppConfig();
|
|
16
|
+
const ui = computed(
|
|
17
|
+
() => tv({
|
|
18
|
+
extend: tv(theme),
|
|
19
|
+
...appConfig.ui?.dashboardResizeHandle
|
|
20
|
+
})
|
|
21
|
+
);
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<Primitive
|
|
26
|
+
:as="as"
|
|
27
|
+
role="separator"
|
|
28
|
+
:class="ui({ class: props.class })"
|
|
29
|
+
>
|
|
30
|
+
<slot />
|
|
31
|
+
</Primitive>
|
|
32
|
+
</template>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
2
|
+
import theme from '#build/ui/dashboard-resize-handle';
|
|
3
|
+
import type { ComponentConfig } from '../types';
|
|
4
|
+
export type DashboardResizeHandle = ComponentConfig<typeof theme, AppConfig, 'dashboardResizeHandle'>;
|
|
5
|
+
export interface DashboardResizeHandleProps {
|
|
6
|
+
/**
|
|
7
|
+
* The element or component this component should render as.
|
|
8
|
+
* @defaultValue 'div'
|
|
9
|
+
*/
|
|
10
|
+
as?: any;
|
|
11
|
+
class?: any;
|
|
12
|
+
}
|
|
13
|
+
export interface DashboardResizeHandleSlots {
|
|
14
|
+
default(props?: {}): any;
|
|
15
|
+
}
|
|
16
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<DashboardResizeHandleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DashboardResizeHandleProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, __VLS_Slots>;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/dashboard-search";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { computed, useTemplateRef } from "vue";
|
|
7
|
+
import { useForwardProps } from "reka-ui";
|
|
8
|
+
import { defu } from "defu";
|
|
9
|
+
import { reactivePick } from "@vueuse/core";
|
|
10
|
+
import { omit } from "@nuxt/ui/utils";
|
|
11
|
+
import { useAppConfig, useColorMode, defineShortcuts, useRuntimeHook } from "#imports";
|
|
12
|
+
import { useLocalePro } from "../composables/useLocalePro";
|
|
13
|
+
import { transformUI } from "../utils";
|
|
14
|
+
import { tv } from "../utils/tv";
|
|
15
|
+
const props = defineProps({
|
|
16
|
+
icon: { type: String, required: false },
|
|
17
|
+
placeholder: { type: null, required: false },
|
|
18
|
+
autofocus: { type: Boolean, required: false },
|
|
19
|
+
loading: { type: Boolean, required: false },
|
|
20
|
+
loadingIcon: { type: String, required: false },
|
|
21
|
+
close: { type: [Boolean, Object], required: false, default: true },
|
|
22
|
+
closeIcon: { type: String, required: false },
|
|
23
|
+
shortcut: { type: String, required: false, default: "meta_k" },
|
|
24
|
+
groups: { type: Array, required: false },
|
|
25
|
+
fuse: { type: Object, required: false },
|
|
26
|
+
colorMode: { type: Boolean, required: false, default: true },
|
|
27
|
+
class: { type: null, required: false },
|
|
28
|
+
ui: { type: void 0, required: false }
|
|
29
|
+
});
|
|
30
|
+
const slots = defineSlots();
|
|
31
|
+
const open = defineModel("open", { type: Boolean, default: false });
|
|
32
|
+
const searchTerm = defineModel("searchTerm", { type: String, default: "" });
|
|
33
|
+
useRuntimeHook("dashboard:search:toggle", () => {
|
|
34
|
+
open.value = !open.value;
|
|
35
|
+
});
|
|
36
|
+
const { t } = useLocalePro();
|
|
37
|
+
const colorModeComposable = useColorMode();
|
|
38
|
+
const appConfig = useAppConfig();
|
|
39
|
+
const commandPaletteProps = useForwardProps(
|
|
40
|
+
reactivePick(props, "icon", "placeholder", "autofocus", "loading", "loadingIcon", "close", "closeIcon")
|
|
41
|
+
);
|
|
42
|
+
const proxySlots = omit(slots, ["content"]);
|
|
43
|
+
const fuse = computed(
|
|
44
|
+
() => defu({}, props.fuse, {
|
|
45
|
+
fuseOptions: {}
|
|
46
|
+
})
|
|
47
|
+
);
|
|
48
|
+
const uiPro = tv({
|
|
49
|
+
extend: tv(theme),
|
|
50
|
+
...appConfig.ui?.dashboardSearch
|
|
51
|
+
});
|
|
52
|
+
const groups = computed(() => {
|
|
53
|
+
const arr = [...props.groups || []];
|
|
54
|
+
if (props.colorMode && !colorModeComposable?.forced) {
|
|
55
|
+
arr.push({
|
|
56
|
+
id: "theme",
|
|
57
|
+
label: t("dashboardSearch.theme"),
|
|
58
|
+
items: [
|
|
59
|
+
{
|
|
60
|
+
label: t("colorMode.system"),
|
|
61
|
+
icon: appConfig.ui.icons.system,
|
|
62
|
+
active: colorModeComposable.preference === "system",
|
|
63
|
+
onSelect: () => {
|
|
64
|
+
colorModeComposable.preference = "system";
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
label: t("colorMode.light"),
|
|
69
|
+
icon: appConfig.ui.icons.light,
|
|
70
|
+
active: colorModeComposable.preference === "light",
|
|
71
|
+
onSelect: () => {
|
|
72
|
+
colorModeComposable.preference = "light";
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
label: t("colorMode.dark"),
|
|
77
|
+
icon: appConfig.ui.icons.dark,
|
|
78
|
+
active: colorModeComposable.preference === "dark",
|
|
79
|
+
onSelect: () => {
|
|
80
|
+
colorModeComposable.preference = "dark";
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
return arr;
|
|
87
|
+
});
|
|
88
|
+
function onSelect(item) {
|
|
89
|
+
if (item.disabled) return;
|
|
90
|
+
open.value = false;
|
|
91
|
+
searchTerm.value = "";
|
|
92
|
+
}
|
|
93
|
+
defineShortcuts({
|
|
94
|
+
[props.shortcut]: {
|
|
95
|
+
usingInput: true,
|
|
96
|
+
handler: () => open.value = !open.value
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
const commandPaletteRef = useTemplateRef("commandPaletteRef");
|
|
100
|
+
defineExpose({ commandPaletteRef });
|
|
101
|
+
</script>
|
|
102
|
+
|
|
103
|
+
<template>
|
|
104
|
+
<UModal v-model:open="open" :class="uiPro.modal({ class: props.class })">
|
|
105
|
+
<template #content>
|
|
106
|
+
<slot name="content">
|
|
107
|
+
<UCommandPalette
|
|
108
|
+
ref="commandPaletteRef"
|
|
109
|
+
v-model:search-term="searchTerm"
|
|
110
|
+
v-bind="commandPaletteProps"
|
|
111
|
+
:groups="groups"
|
|
112
|
+
:fuse="fuse"
|
|
113
|
+
:ui="transformUI(uiPro, props.ui)"
|
|
114
|
+
@update:model-value="onSelect"
|
|
115
|
+
@update:open="open = $event"
|
|
116
|
+
>
|
|
117
|
+
<template v-for="(_, name) in proxySlots" :key="name" #[name]="slotProps">
|
|
118
|
+
<slot :name="name" v-bind="slotProps" />
|
|
119
|
+
</template>
|
|
120
|
+
</UCommandPalette>
|
|
121
|
+
</slot>
|
|
122
|
+
</template>
|
|
123
|
+
</UModal>
|
|
124
|
+
</template>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
2
|
+
import type { ButtonProps, InputProps, CommandPaletteProps, CommandPaletteSlots, CommandPaletteGroup, CommandPaletteItem, ComponentConfig } from '@eslamdevui/ui';
|
|
3
|
+
import type { UseFuseOptions } from '@vueuse/integrations/useFuse';
|
|
4
|
+
import theme from '#build/ui/dashboard-search';
|
|
5
|
+
export type DashboardSearch<_T extends CommandPaletteItem = CommandPaletteItem> = ComponentConfig<typeof theme, AppConfig, 'dashboardSearch'>;
|
|
6
|
+
export interface DashboardSearchProps<T extends CommandPaletteItem = CommandPaletteItem> {
|
|
7
|
+
icon?: string;
|
|
8
|
+
placeholder?: InputProps['placeholder'];
|
|
9
|
+
autofocus?: boolean;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
loadingIcon?: string;
|
|
12
|
+
close?: boolean | Partial<ButtonProps>;
|
|
13
|
+
closeIcon?: string;
|
|
14
|
+
shortcut?: string;
|
|
15
|
+
groups?: CommandPaletteGroup<T>[];
|
|
16
|
+
fuse?: UseFuseOptions<T>;
|
|
17
|
+
colorMode?: boolean;
|
|
18
|
+
class?: any;
|
|
19
|
+
ui?: DashboardSearch<T>['slots'] & CommandPaletteProps<CommandPaletteGroup<T>, T>['ui'];
|
|
20
|
+
}
|
|
21
|
+
export type DashboardSearchSlots<T extends CommandPaletteItem = CommandPaletteItem> = CommandPaletteSlots<CommandPaletteGroup<T>, T> & {
|
|
22
|
+
content(props?: {}): any;
|
|
23
|
+
};
|
|
24
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<DashboardSearchProps<CommandPaletteItem> & {
|
|
25
|
+
open?: boolean;
|
|
26
|
+
searchTerm?: string;
|
|
27
|
+
}, {
|
|
28
|
+
commandPaletteRef: Readonly<import("vue").ShallowRef<unknown>>;
|
|
29
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
30
|
+
"update:open": (value: boolean) => any;
|
|
31
|
+
"update:searchTerm": (value: string) => any;
|
|
32
|
+
}, string, import("vue").PublicProps, Readonly<DashboardSearchProps<CommandPaletteItem> & {
|
|
33
|
+
open?: boolean;
|
|
34
|
+
searchTerm?: string;
|
|
35
|
+
}> & Readonly<{
|
|
36
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
37
|
+
"onUpdate:searchTerm"?: ((value: string) => any) | undefined;
|
|
38
|
+
}>, {
|
|
39
|
+
close: boolean | Partial<ButtonProps>;
|
|
40
|
+
colorMode: boolean;
|
|
41
|
+
shortcut: string;
|
|
42
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, any>;
|
|
43
|
+
export default _default;
|
|
44
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
45
|
+
new (): {
|
|
46
|
+
$slots: S;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/dashboard-search-button";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { computed } from "vue";
|
|
7
|
+
import { useForwardProps } from "reka-ui";
|
|
8
|
+
import { reactivePick } from "@vueuse/core";
|
|
9
|
+
import { omit } from "@nuxt/ui/utils";
|
|
10
|
+
import { useAppConfig } from "#imports";
|
|
11
|
+
import { useLocalePro } from "../composables/useLocalePro";
|
|
12
|
+
import { useDashboard } from "../utils/dashboard";
|
|
13
|
+
import { transformUI } from "../utils";
|
|
14
|
+
import { tv } from "../utils/tv";
|
|
15
|
+
const props = defineProps({
|
|
16
|
+
icon: { type: String, required: false },
|
|
17
|
+
label: { type: String, required: false },
|
|
18
|
+
color: { type: null, required: false, default: "neutral" },
|
|
19
|
+
variant: { type: null, required: false },
|
|
20
|
+
size: { type: null, required: false },
|
|
21
|
+
collapsed: { type: Boolean, required: false, default: false },
|
|
22
|
+
kbds: { type: Array, required: false, default: () => ["meta", "k"] },
|
|
23
|
+
ui: { type: void 0, required: false },
|
|
24
|
+
class: { type: null, required: false }
|
|
25
|
+
});
|
|
26
|
+
defineSlots();
|
|
27
|
+
const proxySlots = omit(defineSlots(), ["trailing"]);
|
|
28
|
+
const rootProps = useForwardProps(reactivePick(props, "color", "size", "variant"));
|
|
29
|
+
const { t } = useLocalePro();
|
|
30
|
+
const appConfig = useAppConfig();
|
|
31
|
+
const { toggleSearch } = useDashboard();
|
|
32
|
+
const dashboardSearchButtonUI = computed(
|
|
33
|
+
() => tv({
|
|
34
|
+
extend: tv(theme),
|
|
35
|
+
...appConfig.ui?.dashboardSearchButton
|
|
36
|
+
})
|
|
37
|
+
);
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<template>
|
|
41
|
+
<UButton
|
|
42
|
+
:icon="props.icon || appConfig.ui.icons.search"
|
|
43
|
+
:label="props.label || t('dashboardSearchButton.label')"
|
|
44
|
+
v-bind="{
|
|
45
|
+
...rootProps,
|
|
46
|
+
...props.collapsed ? { 'square': true, 'label': void 0, 'aria-label': props.label || t('dashboardSearchButton.label') } : {}
|
|
47
|
+
}"
|
|
48
|
+
:variant="props.variant || (props.collapsed ? 'ghost' : 'outline')"
|
|
49
|
+
:class="dashboardSearchButtonUI.base({ class: [props.ui?.base, props.class] })"
|
|
50
|
+
:ui="transformUI(dashboardSearchButtonUI, props.ui)"
|
|
51
|
+
@click="toggleSearch"
|
|
52
|
+
>
|
|
53
|
+
<template v-for="(_, name) in proxySlots" #[name]="slotData">
|
|
54
|
+
<slot :name="name" v-bind="slotData" />
|
|
55
|
+
</template>
|
|
56
|
+
|
|
57
|
+
<template v-if="!props.collapsed" #trailing>
|
|
58
|
+
<div :class="dashboardSearchButtonUI.trailing({ class: props.ui?.trailing })">
|
|
59
|
+
<slot name="trailing">
|
|
60
|
+
<template v-if="props.kbds?.length">
|
|
61
|
+
<UKbd
|
|
62
|
+
v-for="(kbd, idx) in props.kbds"
|
|
63
|
+
:key="idx"
|
|
64
|
+
variant="subtle"
|
|
65
|
+
v-bind="typeof kbd === 'string' ? { value: kbd } : kbd"
|
|
66
|
+
/>
|
|
67
|
+
</template>
|
|
68
|
+
</slot>
|
|
69
|
+
</div>
|
|
70
|
+
</template>
|
|
71
|
+
</UButton>
|
|
72
|
+
</template>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
2
|
+
import type { ButtonProps, KbdProps, ComponentConfig } from '@nuxt/ui';
|
|
3
|
+
import theme from '#build/ui/dashboard-search-button';
|
|
4
|
+
export type DashboardSearchButton = ComponentConfig<typeof theme, AppConfig, 'dashboardSearchButton'>;
|
|
5
|
+
export interface DashboardSearchButtonProps {
|
|
6
|
+
/**
|
|
7
|
+
* The icon displayed in the button.
|
|
8
|
+
* @defaultValue appConfig.ui.icons.search
|
|
9
|
+
* @IconifyIcon
|
|
10
|
+
*/
|
|
11
|
+
icon?: string;
|
|
12
|
+
/**
|
|
13
|
+
* The label displayed in the button.
|
|
14
|
+
* @defaultValue t('dashboardSearchButton.label')
|
|
15
|
+
*/
|
|
16
|
+
label?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The color of the button.
|
|
19
|
+
* @defaultValue 'neutral'
|
|
20
|
+
*/
|
|
21
|
+
color?: ButtonProps['color'];
|
|
22
|
+
/**
|
|
23
|
+
* The variant of the button.
|
|
24
|
+
* Defaults to 'outline' when not collapsed, 'ghost' when collapsed.
|
|
25
|
+
*/
|
|
26
|
+
variant?: ButtonProps['variant'];
|
|
27
|
+
size?: ButtonProps['size'];
|
|
28
|
+
/**
|
|
29
|
+
* Whether the button is collapsed.
|
|
30
|
+
* @defaultValue false
|
|
31
|
+
*/
|
|
32
|
+
collapsed?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* The keyboard keys to display in the button.
|
|
35
|
+
* `{ variant: 'subtle' }`{lang="ts-type"}
|
|
36
|
+
* @defaultValue ['meta', 'k']
|
|
37
|
+
*/
|
|
38
|
+
kbds?: KbdProps['value'][] | KbdProps[];
|
|
39
|
+
ui?: DashboardSearchButton['slots'] & ButtonProps['ui'];
|
|
40
|
+
class?: any;
|
|
41
|
+
}
|
|
42
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<DashboardSearchButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DashboardSearchButtonProps> & Readonly<{}>, {
|
|
43
|
+
color: "error" | "info" | "primary" | "secondary" | "success" | "warning" | "neutral";
|
|
44
|
+
kbds: KbdProps["value"][] | KbdProps[];
|
|
45
|
+
collapsed: boolean;
|
|
46
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, __VLS_Slots>;
|
|
47
|
+
export default _default;
|
|
48
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
49
|
+
new (): {
|
|
50
|
+
$slots: S;
|
|
51
|
+
};
|
|
52
|
+
};
|