@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,170 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/dashboard-sidebar";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { ref, computed, toRef, useId, watch } from "vue";
|
|
7
|
+
import { defu } from "defu";
|
|
8
|
+
import { createReusableTemplate } from "@vueuse/core";
|
|
9
|
+
import USlideover from "@nuxt/ui/components/Slideover.vue";
|
|
10
|
+
import UModal from "@nuxt/ui/components/Modal.vue";
|
|
11
|
+
import UDrawer from "@nuxt/ui/components/Drawer.vue";
|
|
12
|
+
import { useAppConfig, useRuntimeHook, useRoute } from "#imports";
|
|
13
|
+
import { useResizable } from "../composables/useResizable";
|
|
14
|
+
import { useDashboard } from "../utils/dashboard";
|
|
15
|
+
import { tv } from "../utils/tv";
|
|
16
|
+
const props = defineProps({
|
|
17
|
+
mode: { type: null, required: false, default: "slideover" },
|
|
18
|
+
menu: { type: null, required: false },
|
|
19
|
+
toggle: { type: [Boolean, Object], required: false, default: true },
|
|
20
|
+
toggleSide: { type: String, required: false, default: "left" },
|
|
21
|
+
class: { type: null, required: false },
|
|
22
|
+
ui: { type: null, required: false },
|
|
23
|
+
id: { type: String, required: false },
|
|
24
|
+
side: { type: String, required: false, default: "left" },
|
|
25
|
+
minSize: { type: Number, required: false, default: 10 },
|
|
26
|
+
maxSize: { type: Number, required: false, default: 20 },
|
|
27
|
+
defaultSize: { type: Number, required: false, default: 15 },
|
|
28
|
+
resizable: { type: Boolean, required: false, default: false },
|
|
29
|
+
collapsible: { type: Boolean, required: false, default: false },
|
|
30
|
+
collapsedSize: { type: Number, required: false, default: 0 }
|
|
31
|
+
});
|
|
32
|
+
defineSlots();
|
|
33
|
+
const open = defineModel("open", { type: Boolean, default: false });
|
|
34
|
+
const collapsed = defineModel("collapsed", { type: Boolean, default: false });
|
|
35
|
+
const route = useRoute();
|
|
36
|
+
const appConfig = useAppConfig();
|
|
37
|
+
const dashboardCtx = useDashboard({
|
|
38
|
+
storageKey: "dashboard",
|
|
39
|
+
unit: "%",
|
|
40
|
+
sidebarOpen: ref(false),
|
|
41
|
+
sidebarCollapsed: ref(false)
|
|
42
|
+
});
|
|
43
|
+
const id = `${dashboardCtx.storageKey}-sidebar-${props.id || useId()}`;
|
|
44
|
+
const {
|
|
45
|
+
el,
|
|
46
|
+
size,
|
|
47
|
+
collapse,
|
|
48
|
+
isCollapsed,
|
|
49
|
+
isDragging,
|
|
50
|
+
onMouseDown,
|
|
51
|
+
onTouchStart
|
|
52
|
+
} = useResizable(
|
|
53
|
+
id,
|
|
54
|
+
toRef(() => ({ ...dashboardCtx, ...props })),
|
|
55
|
+
{ collapsed }
|
|
56
|
+
);
|
|
57
|
+
const [DefineToggle, ReuseToggle] = createReusableTemplate();
|
|
58
|
+
const [DefineHandle, ReuseHandle] = createReusableTemplate();
|
|
59
|
+
useRuntimeHook("dashboard:sidebar:toggle", () => {
|
|
60
|
+
open.value = !open.value;
|
|
61
|
+
});
|
|
62
|
+
useRuntimeHook("dashboard:sidebar:collapse", (v) => {
|
|
63
|
+
isCollapsed.value = v;
|
|
64
|
+
});
|
|
65
|
+
watch(open, () => {
|
|
66
|
+
if (dashboardCtx.sidebarOpen) {
|
|
67
|
+
dashboardCtx.sidebarOpen.value = open.value;
|
|
68
|
+
}
|
|
69
|
+
}, { immediate: true });
|
|
70
|
+
watch(isCollapsed, () => {
|
|
71
|
+
if (dashboardCtx.sidebarCollapsed) {
|
|
72
|
+
dashboardCtx.sidebarCollapsed.value = isCollapsed.value;
|
|
73
|
+
}
|
|
74
|
+
}, { immediate: true });
|
|
75
|
+
watch(() => route.fullPath, () => {
|
|
76
|
+
open.value = false;
|
|
77
|
+
});
|
|
78
|
+
const ui = computed(
|
|
79
|
+
() => tv({ extend: tv(theme), ...appConfig.ui?.dashboardSidebar })({ side: props.side })
|
|
80
|
+
);
|
|
81
|
+
const Menu = computed(() => ({ slideover: USlideover, modal: UModal, drawer: UDrawer })[props.mode]);
|
|
82
|
+
const menuProps = toRef(() => defu(
|
|
83
|
+
props.menu,
|
|
84
|
+
{ content: { onOpenAutoFocus: (e) => e.preventDefault() } },
|
|
85
|
+
props.mode === "modal" ? { fullscreen: true, transition: false } : props.mode === "slideover" ? { side: "left" } : {}
|
|
86
|
+
));
|
|
87
|
+
function toggleOpen() {
|
|
88
|
+
open.value = !open.value;
|
|
89
|
+
}
|
|
90
|
+
</script>
|
|
91
|
+
|
|
92
|
+
<template>
|
|
93
|
+
<DefineToggle>
|
|
94
|
+
<slot name="toggle" :open="open" :toggle="toggleOpen">
|
|
95
|
+
<UDashboardSidebarToggle
|
|
96
|
+
v-if="props.toggle"
|
|
97
|
+
v-bind="typeof props.toggle === 'object' ? props.toggle : {}"
|
|
98
|
+
:side="props.toggleSide"
|
|
99
|
+
:class="ui.toggle({ class: props.ui?.toggle, toggleSide: props.toggleSide })"
|
|
100
|
+
/>
|
|
101
|
+
</slot>
|
|
102
|
+
</DefineToggle>
|
|
103
|
+
|
|
104
|
+
<DefineHandle>
|
|
105
|
+
<slot name="resize-handle" :on-mouse-down="onMouseDown" :on-touch-start="onTouchStart">
|
|
106
|
+
<UDashboardResizeHandle
|
|
107
|
+
v-if="props.resizable"
|
|
108
|
+
:aria-controls="id"
|
|
109
|
+
:class="ui.handle({ class: props.ui?.handle })"
|
|
110
|
+
@mousedown="onMouseDown"
|
|
111
|
+
@touchstart="onTouchStart"
|
|
112
|
+
/>
|
|
113
|
+
</slot>
|
|
114
|
+
</DefineHandle>
|
|
115
|
+
|
|
116
|
+
<ReuseHandle v-if="props.side === 'right'" />
|
|
117
|
+
|
|
118
|
+
<div
|
|
119
|
+
:id="id"
|
|
120
|
+
ref="el"
|
|
121
|
+
:data-collapsed="isCollapsed"
|
|
122
|
+
:data-dragging="isDragging"
|
|
123
|
+
:class="ui.root({ class: [props.ui?.root, props.class] })"
|
|
124
|
+
:style="{ '--width': `${size}${dashboardCtx.unit}` }"
|
|
125
|
+
>
|
|
126
|
+
<div v-if="$slots.header" :class="ui.header({ class: props.ui?.header })">
|
|
127
|
+
<slot name="header" :collapsed="isCollapsed" :collapse="collapse" />
|
|
128
|
+
</div>
|
|
129
|
+
|
|
130
|
+
<div :class="ui.body({ class: props.ui?.body })">
|
|
131
|
+
<slot :collapsed="isCollapsed" :collapse="collapse" />
|
|
132
|
+
</div>
|
|
133
|
+
|
|
134
|
+
<div v-if="$slots.footer" :class="ui.footer({ class: props.ui?.footer })">
|
|
135
|
+
<slot name="footer" :collapsed="isCollapsed" :collapse="collapse" />
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
<ReuseHandle v-if="props.side === 'left'" />
|
|
140
|
+
|
|
141
|
+
<Menu
|
|
142
|
+
v-model:open="open"
|
|
143
|
+
v-bind="menuProps"
|
|
144
|
+
:ui="{
|
|
145
|
+
overlay: ui.overlay({ class: props.ui?.overlay }),
|
|
146
|
+
content: ui.content({ class: props.ui?.content })
|
|
147
|
+
}"
|
|
148
|
+
>
|
|
149
|
+
<template #content>
|
|
150
|
+
<slot name="content">
|
|
151
|
+
<div
|
|
152
|
+
v-if="$slots.header || props.mode !== 'drawer'"
|
|
153
|
+
:class="ui.header({ class: props.ui?.header, menu: true })"
|
|
154
|
+
>
|
|
155
|
+
<ReuseToggle v-if="props.mode !== 'drawer' && props.toggleSide === 'left'" />
|
|
156
|
+
<slot name="header" />
|
|
157
|
+
<ReuseToggle v-if="props.mode !== 'drawer' && props.toggleSide === 'right'" />
|
|
158
|
+
</div>
|
|
159
|
+
|
|
160
|
+
<div :class="ui.body({ class: props.ui?.body, menu: true })">
|
|
161
|
+
<slot />
|
|
162
|
+
</div>
|
|
163
|
+
|
|
164
|
+
<div v-if="$slots.footer" :class="ui.footer({ class: props.ui?.footer, menu: true })">
|
|
165
|
+
<slot name="footer" />
|
|
166
|
+
</div>
|
|
167
|
+
</slot>
|
|
168
|
+
</template>
|
|
169
|
+
</Menu>
|
|
170
|
+
</template>
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
2
|
+
import type { ButtonProps, DrawerProps, ModalProps, SlideoverProps, ComponentConfig } from '../types';
|
|
3
|
+
import type { UseResizableProps } from '../composables/useResizable';
|
|
4
|
+
import theme from '#build/ui/dashboard-sidebar';
|
|
5
|
+
export type DashboardSidebar = ComponentConfig<typeof theme, AppConfig, 'dashboardSidebar'>;
|
|
6
|
+
export type DashboardSidebarMode = 'modal' | 'slideover' | 'drawer';
|
|
7
|
+
export type DashboardSidebarMenu<T extends DashboardSidebarMode> = T extends 'modal' ? ModalProps : T extends 'slideover' ? SlideoverProps : T extends 'drawer' ? DrawerProps : never;
|
|
8
|
+
export interface DashboardSidebarProps<T extends DashboardSidebarMode = DashboardSidebarMode> extends Pick<UseResizableProps, 'id' | 'side' | 'minSize' | 'maxSize' | 'defaultSize' | 'resizable' | 'collapsible' | 'collapsedSize'> {
|
|
9
|
+
/** @defaultValue 'slideover' */
|
|
10
|
+
mode?: T;
|
|
11
|
+
/** Props for the sidebar menu component */
|
|
12
|
+
menu?: DashboardSidebarMenu<T>;
|
|
13
|
+
/** Customize the toggle button */
|
|
14
|
+
toggle?: boolean | Partial<ButtonProps>;
|
|
15
|
+
/** @defaultValue 'left' */
|
|
16
|
+
toggleSide?: 'left' | 'right';
|
|
17
|
+
class?: any;
|
|
18
|
+
ui?: DashboardSidebar['slots'];
|
|
19
|
+
}
|
|
20
|
+
export interface DashboardSidebarSlots {
|
|
21
|
+
'header'(props: {
|
|
22
|
+
collapsed?: boolean;
|
|
23
|
+
collapse?: (value: boolean) => void;
|
|
24
|
+
}): any;
|
|
25
|
+
'default'(props: {
|
|
26
|
+
collapsed?: boolean;
|
|
27
|
+
collapse?: (value: boolean) => void;
|
|
28
|
+
}): any;
|
|
29
|
+
'footer'(props: {
|
|
30
|
+
collapsed?: boolean;
|
|
31
|
+
collapse?: (value: boolean) => void;
|
|
32
|
+
}): any;
|
|
33
|
+
'toggle'(props: {
|
|
34
|
+
open: boolean;
|
|
35
|
+
toggle: () => void;
|
|
36
|
+
}): any;
|
|
37
|
+
'content'(props?: {}): any;
|
|
38
|
+
'resize-handle'(props: {
|
|
39
|
+
onMouseDown: (e: MouseEvent) => void;
|
|
40
|
+
onTouchStart: (e: TouchEvent) => void;
|
|
41
|
+
}): any;
|
|
42
|
+
}
|
|
43
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<DashboardSidebarProps<DashboardSidebarMode> & {
|
|
44
|
+
open?: boolean;
|
|
45
|
+
collapsed?: boolean;
|
|
46
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
47
|
+
"update:open": (value: boolean) => any;
|
|
48
|
+
"update:collapsed": (value: boolean) => any;
|
|
49
|
+
}, string, import("vue").PublicProps, Readonly<DashboardSidebarProps<DashboardSidebarMode> & {
|
|
50
|
+
open?: boolean;
|
|
51
|
+
collapsed?: boolean;
|
|
52
|
+
}> & Readonly<{
|
|
53
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
54
|
+
"onUpdate:collapsed"?: ((value: boolean) => any) | undefined;
|
|
55
|
+
}>, {
|
|
56
|
+
toggle: boolean | Partial<ButtonProps>;
|
|
57
|
+
collapsible: boolean;
|
|
58
|
+
mode: DashboardSidebarMode;
|
|
59
|
+
side: "left" | "right";
|
|
60
|
+
minSize: number;
|
|
61
|
+
maxSize: number;
|
|
62
|
+
defaultSize: number;
|
|
63
|
+
resizable: boolean;
|
|
64
|
+
collapsedSize: number;
|
|
65
|
+
toggleSide: "left" | "right";
|
|
66
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, DashboardSidebarSlots>;
|
|
67
|
+
export default _default;
|
|
68
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
69
|
+
new (): {
|
|
70
|
+
$slots: S;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/dashboard-sidebar-collapse";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { ref, computed } from "vue";
|
|
7
|
+
import { useForwardProps } from "reka-ui";
|
|
8
|
+
import { reactivePick } from "@vueuse/core";
|
|
9
|
+
import { useAppConfig } from "#imports";
|
|
10
|
+
import { useLocalePro } from "../composables/useLocalePro";
|
|
11
|
+
import { useDashboard } from "../utils/dashboard";
|
|
12
|
+
import { tv } from "../utils/tv";
|
|
13
|
+
const props = defineProps({
|
|
14
|
+
side: { type: String, required: false, default: "left" },
|
|
15
|
+
color: { type: null, required: false, default: "neutral" },
|
|
16
|
+
variant: { type: null, required: false, default: "ghost" },
|
|
17
|
+
class: { type: null, required: false }
|
|
18
|
+
});
|
|
19
|
+
const rootProps = useForwardProps(
|
|
20
|
+
reactivePick(props, "color", "variant", "size", "as", "disabled", "ui")
|
|
21
|
+
);
|
|
22
|
+
const { t } = useLocalePro();
|
|
23
|
+
const appConfig = useAppConfig();
|
|
24
|
+
const { sidebarCollapsed, collapseSidebar } = useDashboard({ sidebarCollapsed: ref(false), collapseSidebar: () => {
|
|
25
|
+
} });
|
|
26
|
+
const ui = computed(
|
|
27
|
+
() => tv({ extend: tv(theme), ...appConfig.ui?.dashboardSidebarCollapse })
|
|
28
|
+
);
|
|
29
|
+
function toggleCollapse() {
|
|
30
|
+
collapseSidebar?.(!(sidebarCollapsed?.value ?? false));
|
|
31
|
+
}
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<template>
|
|
35
|
+
<UButton
|
|
36
|
+
v-bind="rootProps"
|
|
37
|
+
:aria-label="
|
|
38
|
+
sidebarCollapsed ? t('dashboardSidebarCollapse.expand') : t('dashboardSidebarCollapse.collapse')
|
|
39
|
+
"
|
|
40
|
+
:icon="
|
|
41
|
+
sidebarCollapsed ? appConfig.ui.icons.panelOpen : appConfig.ui.icons.panelClose
|
|
42
|
+
"
|
|
43
|
+
:class="ui({ class: props.class })"
|
|
44
|
+
@click="toggleCollapse"
|
|
45
|
+
/>
|
|
46
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ButtonProps } from '@nuxt/ui';
|
|
2
|
+
export interface DashboardSidebarCollapseProps extends /** @vue-ignore */ Pick<ButtonProps, 'as' | 'size' | 'disabled' | 'ui'> {
|
|
3
|
+
side?: 'left' | 'right';
|
|
4
|
+
/** @defaultValue 'neutral' */
|
|
5
|
+
color?: ButtonProps['color'];
|
|
6
|
+
/** @defaultValue 'ghost' */
|
|
7
|
+
variant?: ButtonProps['variant'];
|
|
8
|
+
class?: any;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: import("vue").DefineComponent<DashboardSidebarCollapseProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DashboardSidebarCollapseProps> & Readonly<{}>, {
|
|
11
|
+
color: "error" | "info" | "primary" | "secondary" | "success" | "warning" | "neutral";
|
|
12
|
+
variant: "link" | "solid" | "outline" | "soft" | "subtle" | "ghost";
|
|
13
|
+
side: "left" | "right";
|
|
14
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/dashboard-sidebar-toggle";
|
|
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 { useAppConfig } from "#imports";
|
|
10
|
+
import { useLocalePro } from "../composables/useLocalePro";
|
|
11
|
+
import { useDashboard } from "../utils/dashboard";
|
|
12
|
+
import { tv } from "../utils/tv";
|
|
13
|
+
const props = defineProps({
|
|
14
|
+
side: { type: String, required: false },
|
|
15
|
+
color: { type: null, required: false },
|
|
16
|
+
variant: { type: null, required: false },
|
|
17
|
+
class: { type: null, required: false },
|
|
18
|
+
ui: { type: null, required: false },
|
|
19
|
+
as: { type: null, required: false },
|
|
20
|
+
size: { type: null, required: false },
|
|
21
|
+
disabled: { type: Boolean, required: false }
|
|
22
|
+
});
|
|
23
|
+
const rootProps = useForwardProps(reactivePick(props, "color", "variant", "size", "as", "disabled", "ui"));
|
|
24
|
+
const { t } = useLocalePro();
|
|
25
|
+
const appConfig = useAppConfig();
|
|
26
|
+
const { sidebarOpen, toggleSidebar } = useDashboard();
|
|
27
|
+
const uiPro = computed(
|
|
28
|
+
() => tv({
|
|
29
|
+
extend: tv(theme),
|
|
30
|
+
...appConfig.ui?.dashboardSidebarToggle
|
|
31
|
+
})()
|
|
32
|
+
);
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<template>
|
|
36
|
+
<UButton
|
|
37
|
+
v-bind="rootProps"
|
|
38
|
+
:aria-label="sidebarOpen ? t('dashboardSidebarToggle.close') : t('dashboardSidebarToggle.open')"
|
|
39
|
+
:icon="sidebarOpen ? appConfig.ui.icons.close : appConfig.ui.icons.menu"
|
|
40
|
+
:class="uiPro({ class: props.class, side: props.side })"
|
|
41
|
+
@click="toggleSidebar"
|
|
42
|
+
/>
|
|
43
|
+
</template>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
2
|
+
import type { ButtonProps, ComponentConfig } from '../types';
|
|
3
|
+
import theme from '#build/ui/dashboard-sidebar-toggle';
|
|
4
|
+
export type DashboardSidebarToggle = ComponentConfig<typeof theme, AppConfig, 'dashboardSidebarToggle'>;
|
|
5
|
+
export interface DashboardSidebarToggleProps extends Pick<ButtonProps, 'as' | 'size' | 'disabled' | 'ui'> {
|
|
6
|
+
side?: 'left' | 'right';
|
|
7
|
+
/**
|
|
8
|
+
* @defaultValue 'neutral'
|
|
9
|
+
*/
|
|
10
|
+
color?: ButtonProps['color'];
|
|
11
|
+
/**
|
|
12
|
+
* @defaultValue 'ghost'
|
|
13
|
+
*/
|
|
14
|
+
variant?: ButtonProps['variant'];
|
|
15
|
+
class?: any;
|
|
16
|
+
ui?: DashboardSidebarToggle['slots'];
|
|
17
|
+
}
|
|
18
|
+
declare const _default: import("vue").DefineComponent<DashboardSidebarToggleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DashboardSidebarToggleProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/drawer";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { computed, toRef } from "vue";
|
|
7
|
+
import { VisuallyHidden, useForwardPropsEmits } from "reka-ui";
|
|
8
|
+
import { DrawerRoot, DrawerTrigger, DrawerPortal, DrawerOverlay, DrawerContent, DrawerTitle, DrawerDescription, DrawerHandle } from "vaul-vue";
|
|
9
|
+
import { reactivePick } from "@vueuse/core";
|
|
10
|
+
import { useAppConfig } from "#imports";
|
|
11
|
+
import { usePortal } from "../composables/usePortal";
|
|
12
|
+
import { tv } from "../utils/tv";
|
|
13
|
+
const props = defineProps({
|
|
14
|
+
as: { type: null, required: false },
|
|
15
|
+
title: { type: String, required: false },
|
|
16
|
+
description: { type: String, required: false },
|
|
17
|
+
inset: { type: Boolean, required: false },
|
|
18
|
+
content: { type: Object, required: false },
|
|
19
|
+
overlay: { type: Boolean, required: false, default: true },
|
|
20
|
+
handle: { type: Boolean, required: false, default: true },
|
|
21
|
+
portal: { type: [Boolean, String], required: false, skipCheck: true, default: true },
|
|
22
|
+
class: { type: null, required: false },
|
|
23
|
+
ui: { type: null, required: false },
|
|
24
|
+
activeSnapPoint: { type: [Number, String, null], required: false },
|
|
25
|
+
closeThreshold: { type: Number, required: false },
|
|
26
|
+
shouldScaleBackground: { type: Boolean, required: false },
|
|
27
|
+
setBackgroundColorOnScale: { type: Boolean, required: false },
|
|
28
|
+
scrollLockTimeout: { type: Number, required: false },
|
|
29
|
+
fixed: { type: Boolean, required: false },
|
|
30
|
+
dismissible: { type: Boolean, required: false, default: true },
|
|
31
|
+
modal: { type: Boolean, required: false, default: true },
|
|
32
|
+
open: { type: Boolean, required: false },
|
|
33
|
+
defaultOpen: { type: Boolean, required: false },
|
|
34
|
+
nested: { type: Boolean, required: false },
|
|
35
|
+
direction: { type: String, required: false, default: "bottom" },
|
|
36
|
+
noBodyStyles: { type: Boolean, required: false },
|
|
37
|
+
handleOnly: { type: Boolean, required: false },
|
|
38
|
+
preventScrollRestoration: { type: Boolean, required: false },
|
|
39
|
+
snapPoints: { type: Array, required: false }
|
|
40
|
+
});
|
|
41
|
+
const emits = defineEmits(["drag", "release", "close", "update:open", "update:activeSnapPoint", "animationEnd"]);
|
|
42
|
+
const slots = defineSlots();
|
|
43
|
+
const appConfig = useAppConfig();
|
|
44
|
+
const rootProps = useForwardPropsEmits(reactivePick(props, "activeSnapPoint", "closeThreshold", "shouldScaleBackground", "setBackgroundColorOnScale", "scrollLockTimeout", "fixed", "dismissible", "modal", "open", "defaultOpen", "nested", "direction", "noBodyStyles", "handleOnly", "preventScrollRestoration", "snapPoints"), emits);
|
|
45
|
+
const portalProps = usePortal(toRef(() => props.portal));
|
|
46
|
+
const contentProps = toRef(() => props.content);
|
|
47
|
+
const contentEvents = {
|
|
48
|
+
closeAutoFocus: (e) => e.preventDefault()
|
|
49
|
+
};
|
|
50
|
+
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.drawer || {} })({
|
|
51
|
+
direction: props.direction,
|
|
52
|
+
inset: props.inset
|
|
53
|
+
}));
|
|
54
|
+
</script>
|
|
55
|
+
|
|
56
|
+
<template>
|
|
57
|
+
<DrawerRoot v-bind="rootProps">
|
|
58
|
+
<DrawerTrigger v-if="!!slots.default" as-child :class="props.class">
|
|
59
|
+
<slot />
|
|
60
|
+
</DrawerTrigger>
|
|
61
|
+
|
|
62
|
+
<DrawerPortal v-bind="portalProps">
|
|
63
|
+
<DrawerOverlay v-if="overlay" :class="ui.overlay({ class: props.ui?.overlay })" />
|
|
64
|
+
|
|
65
|
+
<DrawerContent :class="ui.content({ class: [!slots.default && props.class, props.ui?.content] })" v-bind="contentProps" v-on="contentEvents">
|
|
66
|
+
<DrawerHandle v-if="handle" :class="ui.handle({ class: props.ui?.handle })" />
|
|
67
|
+
|
|
68
|
+
<VisuallyHidden v-if="!!slots.content && (title || !!slots.title || (description || !!slots.description))">
|
|
69
|
+
<DrawerTitle v-if="title || !!slots.title">
|
|
70
|
+
<slot name="title">
|
|
71
|
+
{{ title }}
|
|
72
|
+
</slot>
|
|
73
|
+
</DrawerTitle>
|
|
74
|
+
|
|
75
|
+
<DrawerDescription v-if="description || !!slots.description">
|
|
76
|
+
<slot name="description">
|
|
77
|
+
{{ description }}
|
|
78
|
+
</slot>
|
|
79
|
+
</DrawerDescription>
|
|
80
|
+
</VisuallyHidden>
|
|
81
|
+
|
|
82
|
+
<slot name="content">
|
|
83
|
+
<div :class="ui.container({ class: props.ui?.container })">
|
|
84
|
+
<div v-if="!!slots.header || (title || !!slots.title) || (description || !!slots.description)" :class="ui.header({ class: props.ui?.header })">
|
|
85
|
+
<slot name="header">
|
|
86
|
+
<DrawerTitle v-if="title || !!slots.title" :class="ui.title({ class: props.ui?.title })">
|
|
87
|
+
<slot name="title">
|
|
88
|
+
{{ title }}
|
|
89
|
+
</slot>
|
|
90
|
+
</DrawerTitle>
|
|
91
|
+
|
|
92
|
+
<DrawerDescription v-if="description || !!slots.description" :class="ui.description({ class: props.ui?.description })">
|
|
93
|
+
<slot name="description">
|
|
94
|
+
{{ description }}
|
|
95
|
+
</slot>
|
|
96
|
+
</DrawerDescription>
|
|
97
|
+
</slot>
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
<div v-if="!!slots.body" :class="ui.body({ class: props.ui?.body })">
|
|
101
|
+
<slot name="body" />
|
|
102
|
+
</div>
|
|
103
|
+
|
|
104
|
+
<div v-if="!!slots.footer" :class="ui.footer({ class: props.ui?.footer })">
|
|
105
|
+
<slot name="footer" />
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
</slot>
|
|
109
|
+
</DrawerContent>
|
|
110
|
+
</DrawerPortal>
|
|
111
|
+
</DrawerRoot>
|
|
112
|
+
</template>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { DrawerRootProps, DrawerRootEmits } from 'vaul-vue';
|
|
2
|
+
import type { DialogContentProps, DialogContentEmits } from 'reka-ui';
|
|
3
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
4
|
+
import theme from '#build/ui/drawer';
|
|
5
|
+
import type { EmitsToProps, ComponentConfig } from '../types/utils';
|
|
6
|
+
type Drawer = ComponentConfig<typeof theme, AppConfig, 'drawer'>;
|
|
7
|
+
export interface DrawerProps extends Pick<DrawerRootProps, 'activeSnapPoint' | 'closeThreshold' | 'shouldScaleBackground' | 'setBackgroundColorOnScale' | 'scrollLockTimeout' | 'fixed' | 'dismissible' | 'modal' | 'open' | 'defaultOpen' | 'nested' | 'direction' | 'noBodyStyles' | 'handleOnly' | 'preventScrollRestoration' | 'snapPoints'> {
|
|
8
|
+
/**
|
|
9
|
+
* The element or component this component should render as.
|
|
10
|
+
* @defaultValue 'div'
|
|
11
|
+
*/
|
|
12
|
+
as?: any;
|
|
13
|
+
title?: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Whether to inset the drawer from the edges.
|
|
17
|
+
* @defaultValue false
|
|
18
|
+
*/
|
|
19
|
+
inset?: boolean;
|
|
20
|
+
/** The content of the drawer. */
|
|
21
|
+
content?: Omit<DialogContentProps, 'as' | 'asChild' | 'forceMount'> & Partial<EmitsToProps<DialogContentEmits>>;
|
|
22
|
+
/**
|
|
23
|
+
* Render an overlay behind the drawer.
|
|
24
|
+
* @defaultValue true
|
|
25
|
+
*/
|
|
26
|
+
overlay?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Render a handle on the drawer.
|
|
29
|
+
* @defaultValue true
|
|
30
|
+
*/
|
|
31
|
+
handle?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Render the drawer in a portal.
|
|
34
|
+
* @defaultValue true
|
|
35
|
+
*/
|
|
36
|
+
portal?: boolean | string | HTMLElement;
|
|
37
|
+
class?: any;
|
|
38
|
+
ui?: Drawer['slots'];
|
|
39
|
+
}
|
|
40
|
+
export interface DrawerEmits extends DrawerRootEmits {
|
|
41
|
+
}
|
|
42
|
+
export interface DrawerSlots {
|
|
43
|
+
default(props?: {}): any;
|
|
44
|
+
content(props?: {}): any;
|
|
45
|
+
header(props?: {}): any;
|
|
46
|
+
title(props?: {}): any;
|
|
47
|
+
description(props?: {}): any;
|
|
48
|
+
body(props?: {}): any;
|
|
49
|
+
footer(props?: {}): any;
|
|
50
|
+
}
|
|
51
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<DrawerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
52
|
+
close: () => any;
|
|
53
|
+
drag: (percentageDragged: number) => any;
|
|
54
|
+
"update:open": (open: boolean) => any;
|
|
55
|
+
release: (open: boolean) => any;
|
|
56
|
+
"update:activeSnapPoint": (val: string | number) => any;
|
|
57
|
+
animationEnd: (open: boolean) => any;
|
|
58
|
+
}, string, import("vue").PublicProps, Readonly<DrawerProps> & Readonly<{
|
|
59
|
+
onClose?: (() => any) | undefined;
|
|
60
|
+
onDrag?: ((percentageDragged: number) => any) | undefined;
|
|
61
|
+
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
|
62
|
+
onRelease?: ((open: boolean) => any) | undefined;
|
|
63
|
+
"onUpdate:activeSnapPoint"?: ((val: string | number) => any) | undefined;
|
|
64
|
+
onAnimationEnd?: ((open: boolean) => any) | undefined;
|
|
65
|
+
}>, {
|
|
66
|
+
modal: boolean;
|
|
67
|
+
portal: boolean | string | HTMLElement;
|
|
68
|
+
overlay: boolean;
|
|
69
|
+
direction: import("vaul-vue").DrawerDirection;
|
|
70
|
+
handle: boolean;
|
|
71
|
+
dismissible: boolean;
|
|
72
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, DrawerSlots>;
|
|
73
|
+
export default _default;
|
|
74
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
75
|
+
new (): {
|
|
76
|
+
$slots: S;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/dropdown-menu";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { computed, toRef } from "vue";
|
|
7
|
+
import { defu } from "defu";
|
|
8
|
+
import { DropdownMenuRoot, DropdownMenuTrigger, DropdownMenuArrow, useForwardPropsEmits } from "reka-ui";
|
|
9
|
+
import { reactivePick } from "@vueuse/core";
|
|
10
|
+
import { useAppConfig } from "#imports";
|
|
11
|
+
import { omit } from "../utils";
|
|
12
|
+
import { tv } from "../utils/tv";
|
|
13
|
+
import UDropdownMenuContent from "./DropdownMenuContent.vue";
|
|
14
|
+
const props = defineProps({
|
|
15
|
+
size: { type: null, required: false },
|
|
16
|
+
items: { type: null, required: false },
|
|
17
|
+
checkedIcon: { type: String, required: false },
|
|
18
|
+
loadingIcon: { type: String, required: false },
|
|
19
|
+
externalIcon: { type: [Boolean, String], required: false, default: true },
|
|
20
|
+
content: { type: Object, required: false },
|
|
21
|
+
arrow: { type: [Boolean, Object], required: false },
|
|
22
|
+
portal: { type: [Boolean, String], required: false, skipCheck: true, default: true },
|
|
23
|
+
labelKey: { type: null, required: false, default: "label" },
|
|
24
|
+
disabled: { type: Boolean, required: false },
|
|
25
|
+
class: { type: null, required: false },
|
|
26
|
+
ui: { type: null, required: false },
|
|
27
|
+
defaultOpen: { type: Boolean, required: false },
|
|
28
|
+
open: { type: Boolean, required: false },
|
|
29
|
+
modal: { type: Boolean, required: false, default: true }
|
|
30
|
+
});
|
|
31
|
+
const emits = defineEmits(["update:open"]);
|
|
32
|
+
const slots = defineSlots();
|
|
33
|
+
const appConfig = useAppConfig();
|
|
34
|
+
const rootProps = useForwardPropsEmits(reactivePick(props, "defaultOpen", "open", "modal"), emits);
|
|
35
|
+
const contentProps = toRef(() => defu(props.content, { side: "bottom", sideOffset: 8, collisionPadding: 8 }));
|
|
36
|
+
const arrowProps = toRef(() => props.arrow);
|
|
37
|
+
const proxySlots = omit(slots, ["default"]);
|
|
38
|
+
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.dropdownMenu || {} })({
|
|
39
|
+
size: props.size
|
|
40
|
+
}));
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
<template>
|
|
44
|
+
<DropdownMenuRoot v-slot="{ open }" v-bind="rootProps">
|
|
45
|
+
<DropdownMenuTrigger v-if="!!slots.default" as-child :class="props.class" :disabled="disabled">
|
|
46
|
+
<slot :open="open" />
|
|
47
|
+
</DropdownMenuTrigger>
|
|
48
|
+
|
|
49
|
+
<UDropdownMenuContent
|
|
50
|
+
:class="ui.content({ class: [!slots.default && props.class, props.ui?.content] })"
|
|
51
|
+
:ui="ui"
|
|
52
|
+
:ui-override="props.ui"
|
|
53
|
+
v-bind="contentProps"
|
|
54
|
+
:items="items"
|
|
55
|
+
:portal="portal"
|
|
56
|
+
:label-key="labelKey"
|
|
57
|
+
:checked-icon="checkedIcon"
|
|
58
|
+
:loading-icon="loadingIcon"
|
|
59
|
+
:external-icon="externalIcon"
|
|
60
|
+
>
|
|
61
|
+
<template v-for="(_, name) in proxySlots" #[name]="slotData">
|
|
62
|
+
<slot :name="name" v-bind="slotData" />
|
|
63
|
+
</template>
|
|
64
|
+
|
|
65
|
+
<DropdownMenuArrow v-if="!!arrow" v-bind="arrowProps" :class="ui.arrow({ class: props.ui?.arrow })" />
|
|
66
|
+
</UDropdownMenuContent>
|
|
67
|
+
</DropdownMenuRoot>
|
|
68
|
+
</template>
|