@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,50 @@
|
|
|
1
|
+
import type { TooltipRootProps, TooltipRootEmits, TooltipContentProps, TooltipContentEmits, TooltipArrowProps } from 'reka-ui';
|
|
2
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
3
|
+
import theme from '#build/ui/tooltip';
|
|
4
|
+
import type { KbdProps } from '../types';
|
|
5
|
+
import type { EmitsToProps, ComponentConfig } from '../types/utils';
|
|
6
|
+
type Tooltip = ComponentConfig<typeof theme, AppConfig, 'tooltip'>;
|
|
7
|
+
export interface TooltipProps extends TooltipRootProps {
|
|
8
|
+
/** The text content of the tooltip. */
|
|
9
|
+
text?: string;
|
|
10
|
+
/** The keyboard keys to display in the tooltip. */
|
|
11
|
+
kbds?: KbdProps['value'][] | KbdProps[];
|
|
12
|
+
/**
|
|
13
|
+
* The content of the tooltip.
|
|
14
|
+
* @defaultValue { side: 'bottom', sideOffset: 8, collisionPadding: 8 }
|
|
15
|
+
*/
|
|
16
|
+
content?: Omit<TooltipContentProps, 'as' | 'asChild'> & Partial<EmitsToProps<TooltipContentEmits>>;
|
|
17
|
+
/**
|
|
18
|
+
* Display an arrow alongside the tooltip.
|
|
19
|
+
* @defaultValue false
|
|
20
|
+
*/
|
|
21
|
+
arrow?: boolean | Omit<TooltipArrowProps, 'as' | 'asChild'>;
|
|
22
|
+
/**
|
|
23
|
+
* Render the tooltip in a portal.
|
|
24
|
+
* @defaultValue true
|
|
25
|
+
*/
|
|
26
|
+
portal?: boolean | string | HTMLElement;
|
|
27
|
+
class?: any;
|
|
28
|
+
ui?: Tooltip['slots'];
|
|
29
|
+
}
|
|
30
|
+
export interface TooltipEmits extends TooltipRootEmits {
|
|
31
|
+
}
|
|
32
|
+
export interface TooltipSlots {
|
|
33
|
+
default(props: {
|
|
34
|
+
open: boolean;
|
|
35
|
+
}): any;
|
|
36
|
+
content(props?: {}): any;
|
|
37
|
+
}
|
|
38
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<TooltipProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
39
|
+
"update:open": (value: boolean) => any;
|
|
40
|
+
}, string, import("vue").PublicProps, Readonly<TooltipProps> & Readonly<{
|
|
41
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
42
|
+
}>, {
|
|
43
|
+
portal: boolean | string | HTMLElement;
|
|
44
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, TooltipSlots>;
|
|
45
|
+
export default _default;
|
|
46
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
47
|
+
new (): {
|
|
48
|
+
$slots: S;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/tree";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { computed } from "vue";
|
|
7
|
+
import { TreeRoot, TreeItem, useForwardPropsEmits } from "reka-ui";
|
|
8
|
+
import { reactivePick, createReusableTemplate } from "@vueuse/core";
|
|
9
|
+
import { useAppConfig } from "#imports";
|
|
10
|
+
import { get } from "../utils";
|
|
11
|
+
import { tv } from "../utils/tv";
|
|
12
|
+
import UIcon from "./Icon.vue";
|
|
13
|
+
const props = defineProps({
|
|
14
|
+
as: { type: null, required: false },
|
|
15
|
+
color: { type: null, required: false },
|
|
16
|
+
size: { type: null, required: false },
|
|
17
|
+
valueKey: { type: null, required: false, default: "value" },
|
|
18
|
+
labelKey: { type: null, required: false, default: "label" },
|
|
19
|
+
trailingIcon: { type: String, required: false },
|
|
20
|
+
expandedIcon: { type: String, required: false },
|
|
21
|
+
collapsedIcon: { type: String, required: false },
|
|
22
|
+
items: { type: null, required: false },
|
|
23
|
+
modelValue: { type: null, required: false },
|
|
24
|
+
defaultValue: { type: null, required: false },
|
|
25
|
+
multiple: { type: Boolean, required: false },
|
|
26
|
+
class: { type: null, required: false },
|
|
27
|
+
ui: { type: null, required: false },
|
|
28
|
+
expanded: { type: Array, required: false },
|
|
29
|
+
defaultExpanded: { type: Array, required: false },
|
|
30
|
+
selectionBehavior: { type: String, required: false },
|
|
31
|
+
propagateSelect: { type: Boolean, required: false },
|
|
32
|
+
disabled: { type: Boolean, required: false },
|
|
33
|
+
bubbleSelect: { type: Boolean, required: false }
|
|
34
|
+
});
|
|
35
|
+
const emits = defineEmits(["update:expanded", "update:modelValue"]);
|
|
36
|
+
const slots = defineSlots();
|
|
37
|
+
const appConfig = useAppConfig();
|
|
38
|
+
const rootProps = useForwardPropsEmits(reactivePick(props, "as", "modelValue", "defaultValue", "items", "multiple", "expanded", "disabled", "propagateSelect", "bubbleSelect"), emits);
|
|
39
|
+
const [DefineTreeTemplate, ReuseTreeTemplate] = createReusableTemplate();
|
|
40
|
+
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.tree || {} })({
|
|
41
|
+
color: props.color,
|
|
42
|
+
size: props.size
|
|
43
|
+
}));
|
|
44
|
+
function getItemLabel(item) {
|
|
45
|
+
return get(item, props.labelKey);
|
|
46
|
+
}
|
|
47
|
+
function getItemValue(item) {
|
|
48
|
+
return get(item, props.valueKey) ?? get(item, props.labelKey);
|
|
49
|
+
}
|
|
50
|
+
function getDefaultOpenedItems(item) {
|
|
51
|
+
const currentItem = item.defaultExpanded ? getItemValue(item) : null;
|
|
52
|
+
const childItems = item.children?.flatMap((child) => getDefaultOpenedItems(child)) ?? [];
|
|
53
|
+
return [currentItem, ...childItems].filter(Boolean);
|
|
54
|
+
}
|
|
55
|
+
const defaultExpanded = computed(
|
|
56
|
+
() => props.defaultExpanded ?? props.items?.flatMap((item) => getDefaultOpenedItems(item))
|
|
57
|
+
);
|
|
58
|
+
</script>
|
|
59
|
+
|
|
60
|
+
<template>
|
|
61
|
+
<DefineTreeTemplate v-slot="{ items, level }">
|
|
62
|
+
<li
|
|
63
|
+
v-for="(item, index) in items"
|
|
64
|
+
:key="`${level}-${index}`"
|
|
65
|
+
:class="level > 0 ? ui.itemWithChildren({ class: [props.ui?.itemWithChildren, item.ui?.itemWithChildren] }) : ui.item({ class: [props.ui?.item, item.ui?.item] })"
|
|
66
|
+
>
|
|
67
|
+
<TreeItem
|
|
68
|
+
v-slot="{ isExpanded, isSelected }"
|
|
69
|
+
as-child
|
|
70
|
+
:level="level"
|
|
71
|
+
:value="item"
|
|
72
|
+
@toggle="item.onToggle"
|
|
73
|
+
@select="item.onSelect"
|
|
74
|
+
>
|
|
75
|
+
<button :disabled="item.disabled || disabled" :class="ui.link({ class: [props.ui?.link, item.ui?.link, item.class], selected: isSelected, disabled: item.disabled || disabled })">
|
|
76
|
+
<slot :name="item.slot || 'item'" v-bind="{ index, level, expanded: isExpanded, selected: isSelected }" :item="item">
|
|
77
|
+
<slot :name="item.slot ? `${item.slot}-leading` : 'item-leading'" v-bind="{ index, level, expanded: isExpanded, selected: isSelected }" :item="item">
|
|
78
|
+
<UIcon
|
|
79
|
+
v-if="item.icon"
|
|
80
|
+
:name="item.icon"
|
|
81
|
+
:class="ui.linkLeadingIcon({ class: [props.ui?.linkLeadingIcon, item.ui?.linkLeadingIcon] })"
|
|
82
|
+
/>
|
|
83
|
+
<UIcon
|
|
84
|
+
v-else-if="item.children?.length"
|
|
85
|
+
:name="isExpanded ? expandedIcon ?? appConfig.ui.icons.folderOpen : collapsedIcon ?? appConfig.ui.icons.folder"
|
|
86
|
+
:class="ui.linkLeadingIcon({ class: [props.ui?.linkLeadingIcon, item.ui?.linkLeadingIcon] })"
|
|
87
|
+
/>
|
|
88
|
+
</slot>
|
|
89
|
+
|
|
90
|
+
<span v-if="getItemLabel(item) || !!slots[item.slot ? `${item.slot}-label` : 'item-label']" :class="ui.linkLabel({ class: [props.ui?.linkLabel, item.ui?.linkLabel] })">
|
|
91
|
+
<slot :name="item.slot ? `${item.slot}-label` : 'item-label'" v-bind="{ item, index, level, expanded: isExpanded, selected: isSelected }" :item="item">
|
|
92
|
+
{{ getItemLabel(item) }}
|
|
93
|
+
</slot>
|
|
94
|
+
</span>
|
|
95
|
+
|
|
96
|
+
<span v-if="item.trailingIcon || item.children?.length || !!slots[item.slot ? `${item.slot}-trailing` : 'item-trailing']" :class="ui.linkTrailing({ class: [props.ui?.linkTrailing, item.ui?.linkTrailing] })">
|
|
97
|
+
<slot :name="item.slot ? `${item.slot}-trailing` : 'item-trailing'" v-bind="{ item, index, level, expanded: isExpanded, selected: isSelected }" :item="item">
|
|
98
|
+
<UIcon v-if="item.trailingIcon" :name="item.trailingIcon" :class="ui.linkTrailingIcon({ class: [props.ui?.linkTrailingIcon, item.ui?.linkTrailingIcon] })" />
|
|
99
|
+
<UIcon v-else-if="item.children?.length" :name="trailingIcon ?? appConfig.ui.icons.chevronDown" :class="ui.linkTrailingIcon({ class: [props.ui?.linkTrailingIcon, item.ui?.linkTrailingIcon] })" />
|
|
100
|
+
</slot>
|
|
101
|
+
</span>
|
|
102
|
+
</slot>
|
|
103
|
+
</button>
|
|
104
|
+
|
|
105
|
+
<ul v-if="item.children?.length && isExpanded" :class="ui.listWithChildren({ class: [props.ui?.listWithChildren, item.ui?.listWithChildren] })">
|
|
106
|
+
<ReuseTreeTemplate :items="item.children" :level="level + 1" />
|
|
107
|
+
</ul>
|
|
108
|
+
</TreeItem>
|
|
109
|
+
</li>
|
|
110
|
+
</DefineTreeTemplate>
|
|
111
|
+
|
|
112
|
+
<TreeRoot
|
|
113
|
+
v-bind="rootProps"
|
|
114
|
+
:class="ui.root({ class: [props.ui?.root, props.class] })"
|
|
115
|
+
:get-key="getItemValue"
|
|
116
|
+
:default-expanded="defaultExpanded"
|
|
117
|
+
:selection-behavior="selectionBehavior"
|
|
118
|
+
>
|
|
119
|
+
<ReuseTreeTemplate :items="items" :level="0" />
|
|
120
|
+
</TreeRoot>
|
|
121
|
+
</template>
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import type { TreeRootProps, TreeRootEmits } from 'reka-ui';
|
|
2
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
3
|
+
import theme from '#build/ui/tree';
|
|
4
|
+
import type { DynamicSlots, GetItemKeys, GetModelValue, GetModelValueEmits, NestedItem, ComponentConfig } from '../types/utils';
|
|
5
|
+
type Tree = ComponentConfig<typeof theme, AppConfig, 'tree'>;
|
|
6
|
+
export type TreeItem = {
|
|
7
|
+
/**
|
|
8
|
+
* @IconifyIcon
|
|
9
|
+
*/
|
|
10
|
+
icon?: string;
|
|
11
|
+
label?: string;
|
|
12
|
+
/**
|
|
13
|
+
* @IconifyIcon
|
|
14
|
+
*/
|
|
15
|
+
trailingIcon?: string;
|
|
16
|
+
defaultExpanded?: boolean;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
value?: string;
|
|
19
|
+
slot?: string;
|
|
20
|
+
children?: TreeItem[];
|
|
21
|
+
onToggle?(e: Event): void;
|
|
22
|
+
onSelect?(e?: Event): void;
|
|
23
|
+
class?: any;
|
|
24
|
+
ui?: Pick<Tree['slots'], 'item' | 'itemWithChildren' | 'link' | 'linkLeadingIcon' | 'linkLabel' | 'linkTrailing' | 'linkTrailingIcon' | 'listWithChildren'>;
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
};
|
|
27
|
+
export interface TreeProps<T extends TreeItem[] = TreeItem[], VK extends GetItemKeys<T> = 'value', M extends boolean = false> extends Pick<TreeRootProps<T>, 'expanded' | 'defaultExpanded' | 'selectionBehavior' | 'propagateSelect' | 'disabled' | 'bubbleSelect'> {
|
|
28
|
+
/**
|
|
29
|
+
* The element or component this component should render as.
|
|
30
|
+
* @defaultValue 'ul'
|
|
31
|
+
*/
|
|
32
|
+
as?: any;
|
|
33
|
+
/**
|
|
34
|
+
* @defaultValue 'primary'
|
|
35
|
+
*/
|
|
36
|
+
color?: Tree['variants']['color'];
|
|
37
|
+
/**
|
|
38
|
+
* @defaultValue 'md'
|
|
39
|
+
*/
|
|
40
|
+
size?: Tree['variants']['size'];
|
|
41
|
+
/**
|
|
42
|
+
* The key used to get the value from the item.
|
|
43
|
+
* @defaultValue 'value'
|
|
44
|
+
*/
|
|
45
|
+
valueKey?: VK;
|
|
46
|
+
/**
|
|
47
|
+
* The key used to get the label from the item.
|
|
48
|
+
* @defaultValue 'label'
|
|
49
|
+
*/
|
|
50
|
+
labelKey?: keyof NestedItem<T>;
|
|
51
|
+
/**
|
|
52
|
+
* The icon displayed on the right side of a parent node.
|
|
53
|
+
* @defaultValue appConfig.ui.icons.chevronDown
|
|
54
|
+
* @IconifyIcon
|
|
55
|
+
*/
|
|
56
|
+
trailingIcon?: string;
|
|
57
|
+
/**
|
|
58
|
+
* The icon displayed when a parent node is expanded.
|
|
59
|
+
* @defaultValue appConfig.ui.icons.folderOpen
|
|
60
|
+
* @IconifyIcon
|
|
61
|
+
*/
|
|
62
|
+
expandedIcon?: string;
|
|
63
|
+
/**
|
|
64
|
+
* The icon displayed when a parent node is collapsed.
|
|
65
|
+
* @defaultValue appConfig.ui.icons.folder
|
|
66
|
+
* @IconifyIcon
|
|
67
|
+
*/
|
|
68
|
+
collapsedIcon?: string;
|
|
69
|
+
items?: T;
|
|
70
|
+
/** The controlled value of the Tree. Can be bind as `v-model`. */
|
|
71
|
+
modelValue?: GetModelValue<T, VK, M>;
|
|
72
|
+
/** The value of the Tree when initially rendered. Use when you do not need to control the state of the Tree. */
|
|
73
|
+
defaultValue?: GetModelValue<T, VK, M>;
|
|
74
|
+
/** Whether multiple options can be selected or not. */
|
|
75
|
+
multiple?: M & boolean;
|
|
76
|
+
class?: any;
|
|
77
|
+
ui?: Tree['slots'];
|
|
78
|
+
}
|
|
79
|
+
export type TreeEmits<A extends TreeItem[], VK extends GetItemKeys<A> | undefined, M extends boolean> = Omit<TreeRootEmits, 'update:modelValue'> & GetModelValueEmits<A, VK, M>;
|
|
80
|
+
type SlotProps<T extends TreeItem> = (props: {
|
|
81
|
+
item: T;
|
|
82
|
+
index: number;
|
|
83
|
+
level: number;
|
|
84
|
+
expanded: boolean;
|
|
85
|
+
selected: boolean;
|
|
86
|
+
}) => any;
|
|
87
|
+
export type TreeSlots<A extends TreeItem[] = TreeItem[], T extends NestedItem<A> = NestedItem<A>> = {
|
|
88
|
+
'item': SlotProps<T>;
|
|
89
|
+
'item-leading': SlotProps<T>;
|
|
90
|
+
'item-label': SlotProps<T>;
|
|
91
|
+
'item-trailing': SlotProps<T>;
|
|
92
|
+
} & DynamicSlots<T, undefined, {
|
|
93
|
+
index: number;
|
|
94
|
+
level: number;
|
|
95
|
+
expanded: boolean;
|
|
96
|
+
selected: boolean;
|
|
97
|
+
}>;
|
|
98
|
+
declare const _default: <T extends TreeItem[], VK extends GetItemKeys<T> = "value", M extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
99
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
100
|
+
readonly "onUpdate:modelValue"?: ((payload: GetModelValue<T, VK, M>) => any) | undefined;
|
|
101
|
+
readonly "onUpdate:expanded"?: ((val: string[]) => any) | undefined;
|
|
102
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue" | "onUpdate:expanded"> & TreeProps<T, VK, M> & Partial<{}>> & import("vue").PublicProps;
|
|
103
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
104
|
+
attrs: any;
|
|
105
|
+
slots: TreeSlots<T, NestedItem<T>>;
|
|
106
|
+
emit: ((evt: "update:modelValue", payload: GetModelValue<T, VK, M>) => void) & ((evt: "update:expanded", val: string[]) => void);
|
|
107
|
+
}>) => import("vue").VNode & {
|
|
108
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
109
|
+
};
|
|
110
|
+
export default _default;
|
|
111
|
+
type __VLS_PrettifyLocal<T> = {
|
|
112
|
+
[K in keyof T]: T[K];
|
|
113
|
+
} & {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
defineOptions({ inheritAttrs: false });
|
|
7
|
+
defineProps({
|
|
8
|
+
light: { type: String, required: true },
|
|
9
|
+
dark: { type: String, required: true }
|
|
10
|
+
});
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<UAvatar :src="light" class="dark:hidden" v-bind="$attrs" />
|
|
15
|
+
<UAvatar :src="dark" class="hidden dark:block" v-bind="$attrs" />
|
|
16
|
+
</template>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AvatarProps } from '@eslamdevui/ui';
|
|
2
|
+
export interface ColorModeAvatarProps extends /** @vue-ignore */ Omit<AvatarProps, 'src'> {
|
|
3
|
+
light: string;
|
|
4
|
+
dark: string;
|
|
5
|
+
}
|
|
6
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { computed } from "vue";
|
|
7
|
+
import { useColorMode, useAppConfig } from "#imports";
|
|
8
|
+
import { useLocalePro } from "../../composables/useLocalePro";
|
|
9
|
+
defineOptions({ inheritAttrs: false });
|
|
10
|
+
defineProps({
|
|
11
|
+
color: { type: null, required: false, default: "neutral" },
|
|
12
|
+
variant: { type: null, required: false, default: "ghost" }
|
|
13
|
+
});
|
|
14
|
+
defineSlots();
|
|
15
|
+
const { t } = useLocalePro();
|
|
16
|
+
const colorMode = useColorMode();
|
|
17
|
+
const appConfig = useAppConfig();
|
|
18
|
+
const isDark = computed({
|
|
19
|
+
get() {
|
|
20
|
+
return colorMode.value === "dark";
|
|
21
|
+
},
|
|
22
|
+
set(_isDark) {
|
|
23
|
+
colorMode.preference = _isDark ? "dark" : "light";
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<ClientOnly v-if="!colorMode?.forced">
|
|
30
|
+
<UButton
|
|
31
|
+
:icon="isDark ? appConfig.ui.icons.dark : appConfig.ui.icons.light"
|
|
32
|
+
:color="color"
|
|
33
|
+
:variant="variant"
|
|
34
|
+
:aria-label="isDark ? t('colorMode.switchToLight') : t('colorMode.switchToDark')"
|
|
35
|
+
v-bind="$attrs"
|
|
36
|
+
@click="isDark = !isDark"
|
|
37
|
+
/>
|
|
38
|
+
|
|
39
|
+
<template #fallback>
|
|
40
|
+
<slot name="fallback">
|
|
41
|
+
<div class="size-8" />
|
|
42
|
+
</slot>
|
|
43
|
+
</template>
|
|
44
|
+
</ClientOnly>
|
|
45
|
+
</template>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ButtonProps } from '@eslamdevui/ui';
|
|
2
|
+
export interface ColorModeButtonProps extends /** @vue-ignore */ Pick<ButtonProps, 'as' | 'size' | 'disabled' | 'ui'> {
|
|
3
|
+
/**
|
|
4
|
+
* @defaultValue 'neutral'
|
|
5
|
+
*/
|
|
6
|
+
color?: ButtonProps['color'];
|
|
7
|
+
/**
|
|
8
|
+
* @defaultValue 'ghost'
|
|
9
|
+
*/
|
|
10
|
+
variant?: ButtonProps['variant'];
|
|
11
|
+
}
|
|
12
|
+
export interface ColorModeButtonSlots {
|
|
13
|
+
fallback(props?: {}): any;
|
|
14
|
+
}
|
|
15
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ColorModeButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorModeButtonProps> & Readonly<{}>, {
|
|
16
|
+
color: ButtonProps["color"];
|
|
17
|
+
variant: ButtonProps["variant"];
|
|
18
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ColorModeButtonSlots>;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import ImageComponent from "#build/ui-image-component";
|
|
7
|
+
defineOptions({ inheritAttrs: false });
|
|
8
|
+
defineProps({
|
|
9
|
+
dark: { type: String, required: true },
|
|
10
|
+
light: { type: String, required: true }
|
|
11
|
+
});
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<component :is="ImageComponent" :src="light" class="dark:hidden" v-bind="$attrs" />
|
|
16
|
+
<component :is="ImageComponent" :src="dark" class="hidden dark:block" v-bind="$attrs" />
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface ColorModeImageProps {
|
|
2
|
+
dark: string;
|
|
3
|
+
light: string;
|
|
4
|
+
}
|
|
5
|
+
declare const _default: import("vue").DefineComponent<ColorModeImageProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorModeImageProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { computed } from "vue";
|
|
7
|
+
import { useColorMode, useAppConfig } from "#imports";
|
|
8
|
+
import { useLocalePro } from "../../composables/useLocalePro";
|
|
9
|
+
defineOptions({ inheritAttrs: false });
|
|
10
|
+
defineProps({});
|
|
11
|
+
const { t } = useLocalePro();
|
|
12
|
+
const colorMode = useColorMode();
|
|
13
|
+
const appConfig = useAppConfig();
|
|
14
|
+
const items = computed(() => [
|
|
15
|
+
{ label: t("colorMode.system"), value: "system", icon: appConfig.ui.icons.system },
|
|
16
|
+
{ label: t("colorMode.light"), value: "light", icon: appConfig.ui.icons.light },
|
|
17
|
+
{ label: t("colorMode.dark"), value: "dark", icon: appConfig.ui.icons.dark }
|
|
18
|
+
]);
|
|
19
|
+
const preference = computed({
|
|
20
|
+
get() {
|
|
21
|
+
return items.value.find((option) => option.value === colorMode.preference) || items.value[0];
|
|
22
|
+
},
|
|
23
|
+
set(option) {
|
|
24
|
+
colorMode.preference = option.value;
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<template>
|
|
30
|
+
<ClientOnly v-if="!colorMode?.forced">
|
|
31
|
+
<USelectMenu
|
|
32
|
+
v-model="preference"
|
|
33
|
+
:search-input="false"
|
|
34
|
+
:icon="preference?.icon"
|
|
35
|
+
v-bind="$attrs"
|
|
36
|
+
:items="items"
|
|
37
|
+
/>
|
|
38
|
+
<template #fallback>
|
|
39
|
+
<USelectMenu
|
|
40
|
+
:search-input="false"
|
|
41
|
+
:icon="items[0]?.icon"
|
|
42
|
+
v-bind="$attrs"
|
|
43
|
+
:model-value="items[0]"
|
|
44
|
+
:items="items"
|
|
45
|
+
disabled
|
|
46
|
+
/>
|
|
47
|
+
</template>
|
|
48
|
+
</ClientOnly>
|
|
49
|
+
</template>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SelectMenuProps } from '@eslamdevui/ui';
|
|
2
|
+
export interface ColorModeSelectProps extends
|
|
3
|
+
/** @vue-ignore */
|
|
4
|
+
Pick<SelectMenuProps<any>, 'color' | 'variant' | 'size' | 'trailingIcon' | 'selectedIcon' | 'content' | 'arrow' | 'portal' | 'disabled' | 'ui'> {
|
|
5
|
+
}
|
|
6
|
+
declare const _default: import("vue").DefineComponent<ColorModeSelectProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorModeSelectProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { computed } from "vue";
|
|
7
|
+
import { useColorMode, useAppConfig } from "#imports";
|
|
8
|
+
import { useLocalePro } from "../../composables/useLocalePro";
|
|
9
|
+
defineOptions({ inheritAttrs: false });
|
|
10
|
+
defineProps({});
|
|
11
|
+
const { t } = useLocalePro();
|
|
12
|
+
const colorMode = useColorMode();
|
|
13
|
+
const appConfig = useAppConfig();
|
|
14
|
+
const isDark = computed({
|
|
15
|
+
get() {
|
|
16
|
+
return colorMode.value === "dark";
|
|
17
|
+
},
|
|
18
|
+
set(_isDark) {
|
|
19
|
+
colorMode.preference = _isDark ? "dark" : "light";
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<ClientOnly v-if="!colorMode?.forced">
|
|
26
|
+
<USwitch
|
|
27
|
+
v-model="isDark"
|
|
28
|
+
:checked-icon="appConfig.ui.icons.dark"
|
|
29
|
+
:unchecked-icon="appConfig.ui.icons.light"
|
|
30
|
+
:aria-label="isDark ? t('colorMode.switchToLight') : t('colorMode.switchToDark')"
|
|
31
|
+
v-bind="$attrs"
|
|
32
|
+
/>
|
|
33
|
+
|
|
34
|
+
<template #fallback>
|
|
35
|
+
<USwitch
|
|
36
|
+
:checked-icon="appConfig.ui.icons.dark"
|
|
37
|
+
:unchecked-icon="appConfig.ui.icons.light"
|
|
38
|
+
:aria-label="isDark ? t('colorMode.switchToLight') : t('colorMode.switchToDark')"
|
|
39
|
+
v-bind="$attrs"
|
|
40
|
+
disabled
|
|
41
|
+
/>
|
|
42
|
+
</template>
|
|
43
|
+
</ClientOnly>
|
|
44
|
+
</template>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SwitchProps } from '@eslamdevui/ui';
|
|
2
|
+
export interface ColorModeSwitchProps extends
|
|
3
|
+
/** @vue-ignore */
|
|
4
|
+
Pick<SwitchProps, 'as' | 'color' | 'size' | 'disabled' | 'ui'> {
|
|
5
|
+
}
|
|
6
|
+
declare const _default: import("vue").DefineComponent<ColorModeSwitchProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorModeSwitchProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
defineOptions({ inheritAttrs: false });
|
|
7
|
+
const props = defineProps({
|
|
8
|
+
locales: { type: Array, required: false }
|
|
9
|
+
});
|
|
10
|
+
const modelValue = defineModel({ type: null });
|
|
11
|
+
function getEmojiFlag(locale) {
|
|
12
|
+
const languageToCountry = {
|
|
13
|
+
ar: "sa",
|
|
14
|
+
bn: "bd",
|
|
15
|
+
ca: "es",
|
|
16
|
+
ckb: "iq",
|
|
17
|
+
cs: "cz",
|
|
18
|
+
da: "dk",
|
|
19
|
+
el: "gr",
|
|
20
|
+
en: "gb",
|
|
21
|
+
et: "ee",
|
|
22
|
+
he: "il",
|
|
23
|
+
hi: "in",
|
|
24
|
+
hy: "am",
|
|
25
|
+
ja: "jp",
|
|
26
|
+
km: "kh",
|
|
27
|
+
ko: "kr",
|
|
28
|
+
nb: "no",
|
|
29
|
+
sv: "se",
|
|
30
|
+
uk: "ua",
|
|
31
|
+
ur: "pk",
|
|
32
|
+
vi: "vn"
|
|
33
|
+
};
|
|
34
|
+
const baseLanguage = locale.split("-")[0]?.toLowerCase() || locale;
|
|
35
|
+
const countryCode = languageToCountry[baseLanguage] || locale.replace(/^.*-/, "").slice(0, 2);
|
|
36
|
+
return countryCode.toUpperCase().split("").map((char) => String.fromCodePoint(127397 + char.charCodeAt(0))).join("");
|
|
37
|
+
}
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<template>
|
|
41
|
+
<USelectMenu
|
|
42
|
+
v-model="modelValue"
|
|
43
|
+
:search-input="false"
|
|
44
|
+
value-key="code"
|
|
45
|
+
label-key="name"
|
|
46
|
+
:items="props.locales"
|
|
47
|
+
v-bind="$attrs"
|
|
48
|
+
>
|
|
49
|
+
<template #leading>
|
|
50
|
+
<span v-if="modelValue" class="size-5 text-center">
|
|
51
|
+
{{ getEmojiFlag(modelValue) }}
|
|
52
|
+
</span>
|
|
53
|
+
</template>
|
|
54
|
+
|
|
55
|
+
<template #item-leading="{ item }">
|
|
56
|
+
<span class="size-5 text-center">
|
|
57
|
+
{{ getEmojiFlag(item.code) }}
|
|
58
|
+
</span>
|
|
59
|
+
</template>
|
|
60
|
+
</USelectMenu>
|
|
61
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { SelectMenuProps, Locale } from '@eslamdevui/ui';
|
|
2
|
+
export interface LocaleSelectProps extends
|
|
3
|
+
/** @vue-ignore */
|
|
4
|
+
Pick<SelectMenuProps<any>, 'color' | 'variant' | 'size' | 'trailingIcon' | 'selectedIcon' | 'content' | 'arrow' | 'portal' | 'disabled' | 'ui'> {
|
|
5
|
+
locales?: Locale<any>[];
|
|
6
|
+
}
|
|
7
|
+
declare const _default: import("vue").DefineComponent<LocaleSelectProps & {
|
|
8
|
+
modelValue?: string | undefined;
|
|
9
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<LocaleSelectProps & {
|
|
12
|
+
modelValue?: string | undefined;
|
|
13
|
+
}> & Readonly<{
|
|
14
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Locale, Direction } from '../types/locale';
|
|
2
|
+
import type { DeepPartial } from '../types/utils';
|
|
3
|
+
interface DefineLocaleOptions<M> {
|
|
4
|
+
name: string;
|
|
5
|
+
code: string;
|
|
6
|
+
dir?: Direction;
|
|
7
|
+
messages: M;
|
|
8
|
+
}
|
|
9
|
+
export declare function defineLocale<M>(options: DefineLocaleOptions<M>): Locale<M>;
|
|
10
|
+
export declare function extendLocale<M>(locale: Locale<M>, options: Partial<DefineLocaleOptions<DeepPartial<M>>>): Locale<M>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { MaybeRef } from 'vue';
|
|
2
|
+
type Handler = (e?: any) => void;
|
|
3
|
+
export interface ShortcutConfig {
|
|
4
|
+
handler: Handler;
|
|
5
|
+
usingInput?: string | boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface ShortcutsConfig {
|
|
8
|
+
[key: string]: ShortcutConfig | Handler | false | null | undefined;
|
|
9
|
+
}
|
|
10
|
+
export interface ShortcutsOptions {
|
|
11
|
+
chainDelay?: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function extractShortcuts(items: any[] | any[][]): Record<string, Handler>;
|
|
14
|
+
export declare function defineShortcuts(config: MaybeRef<ShortcutsConfig>, options?: ShortcutsOptions): import("@vueuse/shared").Fn;
|
|
15
|
+
export {};
|