@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
|
+
import type { NavigationMenuRootProps, NavigationMenuRootEmits, NavigationMenuContentProps, NavigationMenuContentEmits, AccordionRootProps } from 'reka-ui';
|
|
2
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
3
|
+
import theme from '#build/ui/navigation-menu';
|
|
4
|
+
import type { AvatarProps, BadgeProps, LinkProps, PopoverProps, TooltipProps } from '../types';
|
|
5
|
+
import type { ArrayOrNested, DynamicSlots, MergeTypes, NestedItem, EmitsToProps, ComponentConfig } from '../types/utils';
|
|
6
|
+
type NavigationMenu = ComponentConfig<typeof theme, AppConfig, 'navigationMenu'>;
|
|
7
|
+
export interface NavigationMenuChildItem extends Omit<NavigationMenuItem, 'type' | 'ui'> {
|
|
8
|
+
/** Description is only used when `orientation` is `horizontal`. */
|
|
9
|
+
description?: string;
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}
|
|
12
|
+
export interface NavigationMenuItem extends Omit<LinkProps, 'type' | 'raw' | 'custom'> {
|
|
13
|
+
label?: string;
|
|
14
|
+
/**
|
|
15
|
+
* @IconifyIcon
|
|
16
|
+
*/
|
|
17
|
+
icon?: string;
|
|
18
|
+
avatar?: AvatarProps;
|
|
19
|
+
/**
|
|
20
|
+
* Display a badge on the item.
|
|
21
|
+
* `{ size: 'sm', color: 'neutral', variant: 'outline' }`{lang="ts-type"}
|
|
22
|
+
*/
|
|
23
|
+
badge?: string | number | BadgeProps;
|
|
24
|
+
/**
|
|
25
|
+
* Display a tooltip on the item when the menu is collapsed with the label of the item.
|
|
26
|
+
* This has priority over the global `tooltip` prop.
|
|
27
|
+
*/
|
|
28
|
+
tooltip?: boolean | TooltipProps;
|
|
29
|
+
/**
|
|
30
|
+
* Display a popover on the item when the menu is collapsed with the children list.
|
|
31
|
+
* This has priority over the global `popover` prop.
|
|
32
|
+
*/
|
|
33
|
+
popover?: boolean | PopoverProps;
|
|
34
|
+
/**
|
|
35
|
+
* @IconifyIcon
|
|
36
|
+
*/
|
|
37
|
+
trailingIcon?: string;
|
|
38
|
+
/**
|
|
39
|
+
* The type of the item.
|
|
40
|
+
* The `label` type is only displayed in `vertical` orientation.
|
|
41
|
+
* The `trigger` type is used to force the item to be collapsible when its a link in `vertical` orientation.
|
|
42
|
+
* @defaultValue 'link'
|
|
43
|
+
*/
|
|
44
|
+
type?: 'label' | 'trigger' | 'link';
|
|
45
|
+
slot?: string;
|
|
46
|
+
/**
|
|
47
|
+
* The value of the item. Avoid using `index` as the value to prevent conflicts in horizontal orientation with Reka UI.
|
|
48
|
+
* @defaultValue `item-${index}`
|
|
49
|
+
*/
|
|
50
|
+
value?: string;
|
|
51
|
+
children?: NavigationMenuChildItem[];
|
|
52
|
+
defaultOpen?: boolean;
|
|
53
|
+
open?: boolean;
|
|
54
|
+
onSelect?(e: Event): void;
|
|
55
|
+
class?: any;
|
|
56
|
+
ui?: Pick<NavigationMenu['slots'], 'item' | 'linkLeadingAvatarSize' | 'linkLeadingAvatar' | 'linkLeadingIcon' | 'linkLabel' | 'linkLabelExternalIcon' | 'linkTrailing' | 'linkTrailingBadgeSize' | 'linkTrailingBadge' | 'linkTrailingIcon' | 'label' | 'link' | 'content' | 'childList' | 'childLabel' | 'childItem' | 'childLink' | 'childLinkIcon' | 'childLinkWrapper' | 'childLinkLabel' | 'childLinkLabelExternalIcon' | 'childLinkDescription'>;
|
|
57
|
+
[key: string]: any;
|
|
58
|
+
}
|
|
59
|
+
export interface NavigationMenuProps<T extends ArrayOrNested<NavigationMenuItem> = ArrayOrNested<NavigationMenuItem>> extends Pick<NavigationMenuRootProps, 'modelValue' | 'defaultValue' | 'delayDuration' | 'disableClickTrigger' | 'disableHoverTrigger' | 'skipDelayDuration' | 'disablePointerLeaveClose' | 'unmountOnHide'>, Pick<AccordionRootProps, 'disabled' | 'type' | 'collapsible'> {
|
|
60
|
+
/**
|
|
61
|
+
* The element or component this component should render as.
|
|
62
|
+
* @defaultValue 'div'
|
|
63
|
+
*/
|
|
64
|
+
as?: any;
|
|
65
|
+
/**
|
|
66
|
+
* The icon displayed to open the menu.
|
|
67
|
+
* @defaultValue appConfig.ui.icons.chevronDown
|
|
68
|
+
* @IconifyIcon
|
|
69
|
+
*/
|
|
70
|
+
trailingIcon?: string;
|
|
71
|
+
/**
|
|
72
|
+
* The icon displayed when the item is an external link.
|
|
73
|
+
* Set to `false` to hide the external icon.
|
|
74
|
+
* @defaultValue appConfig.ui.icons.external
|
|
75
|
+
* @IconifyIcon
|
|
76
|
+
*/
|
|
77
|
+
externalIcon?: boolean | string;
|
|
78
|
+
items?: T;
|
|
79
|
+
/**
|
|
80
|
+
* @defaultValue 'primary'
|
|
81
|
+
*/
|
|
82
|
+
color?: NavigationMenu['variants']['color'];
|
|
83
|
+
/**
|
|
84
|
+
* @defaultValue 'pill'
|
|
85
|
+
*/
|
|
86
|
+
variant?: NavigationMenu['variants']['variant'];
|
|
87
|
+
/**
|
|
88
|
+
* The orientation of the menu.
|
|
89
|
+
* @defaultValue 'horizontal'
|
|
90
|
+
*/
|
|
91
|
+
orientation?: NavigationMenuRootProps['orientation'];
|
|
92
|
+
/**
|
|
93
|
+
* Collapse the navigation menu to only show icons.
|
|
94
|
+
* Only works when `orientation` is `vertical`.
|
|
95
|
+
* @defaultValue false
|
|
96
|
+
*/
|
|
97
|
+
collapsed?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Display a tooltip on the items when the menu is collapsed with the label of the item.
|
|
100
|
+
* `{ delayDuration: 0, content: { side: 'right' } }`{lang="ts-type"}
|
|
101
|
+
* @defaultValue false
|
|
102
|
+
*/
|
|
103
|
+
tooltip?: boolean | TooltipProps;
|
|
104
|
+
/**
|
|
105
|
+
* Display a popover on the items when the menu is collapsed with the children list.
|
|
106
|
+
* `{ mode: 'hover', content: { side: 'right', align: 'start', alignOffset: 2 } }`{lang="ts-type"}
|
|
107
|
+
* @defaultValue false
|
|
108
|
+
*/
|
|
109
|
+
popover?: boolean | PopoverProps;
|
|
110
|
+
/** Display a line next to the active item. */
|
|
111
|
+
highlight?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* @defaultValue 'primary'
|
|
114
|
+
*/
|
|
115
|
+
highlightColor?: NavigationMenu['variants']['highlightColor'];
|
|
116
|
+
/** The content of the menu. */
|
|
117
|
+
content?: Omit<NavigationMenuContentProps, 'as' | 'asChild' | 'forceMount'> & Partial<EmitsToProps<NavigationMenuContentEmits>>;
|
|
118
|
+
/**
|
|
119
|
+
* The orientation of the content.
|
|
120
|
+
* Only works when `orientation` is `horizontal`.
|
|
121
|
+
* @defaultValue 'horizontal'
|
|
122
|
+
*/
|
|
123
|
+
contentOrientation?: NavigationMenu['variants']['contentOrientation'];
|
|
124
|
+
/**
|
|
125
|
+
* Display an arrow alongside the menu.
|
|
126
|
+
* @defaultValue false
|
|
127
|
+
*/
|
|
128
|
+
arrow?: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* The key used to get the label from the item.
|
|
131
|
+
* @defaultValue 'label'
|
|
132
|
+
*/
|
|
133
|
+
labelKey?: keyof NestedItem<T>;
|
|
134
|
+
class?: any;
|
|
135
|
+
ui?: NavigationMenu['slots'];
|
|
136
|
+
}
|
|
137
|
+
export interface NavigationMenuEmits extends NavigationMenuRootEmits {
|
|
138
|
+
}
|
|
139
|
+
type SlotProps<T extends NavigationMenuItem> = (props: {
|
|
140
|
+
item: T;
|
|
141
|
+
index: number;
|
|
142
|
+
active?: boolean;
|
|
143
|
+
}) => any;
|
|
144
|
+
export type NavigationMenuSlots<A extends ArrayOrNested<NavigationMenuItem> = ArrayOrNested<NavigationMenuItem>, T extends NestedItem<A> = NestedItem<A>> = {
|
|
145
|
+
'item': SlotProps<T>;
|
|
146
|
+
'item-leading': SlotProps<T>;
|
|
147
|
+
'item-label': SlotProps<T>;
|
|
148
|
+
'item-trailing': SlotProps<T>;
|
|
149
|
+
'item-content': SlotProps<T>;
|
|
150
|
+
'list-leading': (props?: {}) => any;
|
|
151
|
+
'list-trailing': (props?: {}) => any;
|
|
152
|
+
} & DynamicSlots<MergeTypes<T>, 'leading' | 'label' | 'trailing' | 'content', {
|
|
153
|
+
index: number;
|
|
154
|
+
active?: boolean;
|
|
155
|
+
}>;
|
|
156
|
+
declare const _default: <T extends ArrayOrNested<NavigationMenuItem>>(__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<{
|
|
157
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
158
|
+
readonly "onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
159
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue"> & NavigationMenuProps<T> & Partial<{}>> & import("vue").PublicProps;
|
|
160
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
161
|
+
attrs: any;
|
|
162
|
+
slots: NavigationMenuSlots<T, NestedItem<T>>;
|
|
163
|
+
emit: (evt: "update:modelValue", value: string) => void;
|
|
164
|
+
}>) => import("vue").VNode & {
|
|
165
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
166
|
+
};
|
|
167
|
+
export default _default;
|
|
168
|
+
type __VLS_PrettifyLocal<T> = {
|
|
169
|
+
[K in keyof T]: T[K];
|
|
170
|
+
} & {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { useOverlay } from "../composables/useOverlay";
|
|
4
|
+
const { overlays, unmount, close } = useOverlay();
|
|
5
|
+
const mountedOverlays = computed(() => overlays.filter((overlay) => overlay.isMounted));
|
|
6
|
+
const onAfterLeave = (id) => {
|
|
7
|
+
close(id);
|
|
8
|
+
unmount(id);
|
|
9
|
+
};
|
|
10
|
+
const onClose = (id, value) => {
|
|
11
|
+
close(id, value);
|
|
12
|
+
};
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<component
|
|
17
|
+
:is="overlay.component"
|
|
18
|
+
v-for="overlay in mountedOverlays"
|
|
19
|
+
:key="overlay.id"
|
|
20
|
+
v-bind="overlay.props"
|
|
21
|
+
v-model:open="overlay.isOpen"
|
|
22
|
+
@close="(value) => onClose(overlay.id, value)"
|
|
23
|
+
@after:leave="onAfterLeave(overlay.id)"
|
|
24
|
+
/>
|
|
25
|
+
</template>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/pagination";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { computed } from "vue";
|
|
7
|
+
import { PaginationRoot, PaginationList, PaginationListItem, PaginationFirst, PaginationPrev, PaginationEllipsis, PaginationNext, PaginationLast, useForwardPropsEmits } from "reka-ui";
|
|
8
|
+
import { reactivePick } from "@vueuse/core";
|
|
9
|
+
import { useAppConfig } from "#imports";
|
|
10
|
+
import { useLocale } from "../composables/useLocale";
|
|
11
|
+
import { tv } from "../utils/tv";
|
|
12
|
+
import UButton from "./Button.vue";
|
|
13
|
+
const props = defineProps({
|
|
14
|
+
as: { type: null, required: false },
|
|
15
|
+
firstIcon: { type: String, required: false },
|
|
16
|
+
prevIcon: { type: String, required: false },
|
|
17
|
+
nextIcon: { type: String, required: false },
|
|
18
|
+
lastIcon: { type: String, required: false },
|
|
19
|
+
ellipsisIcon: { type: String, required: false },
|
|
20
|
+
color: { type: null, required: false, default: "neutral" },
|
|
21
|
+
variant: { type: null, required: false, default: "outline" },
|
|
22
|
+
activeColor: { type: null, required: false, default: "primary" },
|
|
23
|
+
activeVariant: { type: null, required: false, default: "solid" },
|
|
24
|
+
showControls: { type: Boolean, required: false, default: true },
|
|
25
|
+
size: { type: null, required: false },
|
|
26
|
+
to: { type: Function, required: false },
|
|
27
|
+
class: { type: null, required: false },
|
|
28
|
+
ui: { type: null, required: false },
|
|
29
|
+
defaultPage: { type: Number, required: false },
|
|
30
|
+
disabled: { type: Boolean, required: false },
|
|
31
|
+
itemsPerPage: { type: Number, required: false, default: 10 },
|
|
32
|
+
page: { type: Number, required: false },
|
|
33
|
+
showEdges: { type: Boolean, required: false, default: false },
|
|
34
|
+
siblingCount: { type: Number, required: false, default: 2 },
|
|
35
|
+
total: { type: Number, required: false, default: 0 }
|
|
36
|
+
});
|
|
37
|
+
const emits = defineEmits(["update:page"]);
|
|
38
|
+
const slots = defineSlots();
|
|
39
|
+
const { dir } = useLocale();
|
|
40
|
+
const appConfig = useAppConfig();
|
|
41
|
+
const rootProps = useForwardPropsEmits(reactivePick(props, "as", "defaultPage", "disabled", "itemsPerPage", "page", "showEdges", "siblingCount", "total"), emits);
|
|
42
|
+
const firstIcon = computed(() => props.firstIcon || (dir.value === "rtl" ? appConfig.ui.icons.chevronDoubleRight : appConfig.ui.icons.chevronDoubleLeft));
|
|
43
|
+
const prevIcon = computed(() => props.prevIcon || (dir.value === "rtl" ? appConfig.ui.icons.chevronRight : appConfig.ui.icons.chevronLeft));
|
|
44
|
+
const nextIcon = computed(() => props.nextIcon || (dir.value === "rtl" ? appConfig.ui.icons.chevronLeft : appConfig.ui.icons.chevronRight));
|
|
45
|
+
const lastIcon = computed(() => props.lastIcon || (dir.value === "rtl" ? appConfig.ui.icons.chevronDoubleLeft : appConfig.ui.icons.chevronDoubleRight));
|
|
46
|
+
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.pagination || {} })());
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<template>
|
|
50
|
+
<PaginationRoot v-slot="{ page, pageCount }" v-bind="rootProps" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
51
|
+
<PaginationList v-slot="{ items }" :class="ui.list({ class: props.ui?.list })">
|
|
52
|
+
<PaginationFirst v-if="showControls || !!slots.first" as-child :class="ui.first({ class: props.ui?.first })">
|
|
53
|
+
<slot name="first">
|
|
54
|
+
<UButton :color="color" :variant="variant" :size="size" :icon="firstIcon" :to="to?.(1)" />
|
|
55
|
+
</slot>
|
|
56
|
+
</PaginationFirst>
|
|
57
|
+
<PaginationPrev v-if="showControls || !!slots.prev" as-child :class="ui.prev({ class: props.ui?.prev })">
|
|
58
|
+
<slot name="prev">
|
|
59
|
+
<UButton :color="color" :variant="variant" :size="size" :icon="prevIcon" :to="page > 1 ? to?.(page - 1) : void 0" />
|
|
60
|
+
</slot>
|
|
61
|
+
</PaginationPrev>
|
|
62
|
+
|
|
63
|
+
<template v-for="(item, index) in items">
|
|
64
|
+
<PaginationListItem v-if="item.type === 'page'" :key="index" as-child :value="item.value" :class="ui.item({ class: props.ui?.item })">
|
|
65
|
+
<slot name="item" v-bind="{ item, index, page, pageCount }">
|
|
66
|
+
<UButton
|
|
67
|
+
:color="page === item.value ? activeColor : color"
|
|
68
|
+
:variant="page === item.value ? activeVariant : variant"
|
|
69
|
+
:size="size"
|
|
70
|
+
:label="String(item.value)"
|
|
71
|
+
:ui="{ label: ui.label() }"
|
|
72
|
+
:to="to?.(item.value)"
|
|
73
|
+
square
|
|
74
|
+
/>
|
|
75
|
+
</slot>
|
|
76
|
+
</PaginationListItem>
|
|
77
|
+
|
|
78
|
+
<PaginationEllipsis v-else :key="item.type" :index="index" as-child :class="ui.ellipsis({ class: props.ui?.ellipsis })">
|
|
79
|
+
<slot name="ellipsis">
|
|
80
|
+
<UButton :color="color" :variant="variant" :size="size" :icon="ellipsisIcon || appConfig.ui.icons.ellipsis" />
|
|
81
|
+
</slot>
|
|
82
|
+
</PaginationEllipsis>
|
|
83
|
+
</template>
|
|
84
|
+
|
|
85
|
+
<PaginationNext v-if="showControls || !!slots.next" as-child :class="ui.next({ class: props.ui?.next })">
|
|
86
|
+
<slot name="next">
|
|
87
|
+
<UButton :color="color" :variant="variant" :size="size" :icon="nextIcon" :to="page < pageCount ? to?.(page + 1) : void 0" />
|
|
88
|
+
</slot>
|
|
89
|
+
</PaginationNext>
|
|
90
|
+
<PaginationLast v-if="showControls || !!slots.last" as-child :class="ui.last({ class: props.ui?.last })">
|
|
91
|
+
<slot name="last">
|
|
92
|
+
<UButton :color="color" :variant="variant" :size="size" :icon="lastIcon" :to="to?.(pageCount)" />
|
|
93
|
+
</slot>
|
|
94
|
+
</PaginationLast>
|
|
95
|
+
</PaginationList>
|
|
96
|
+
</PaginationRoot>
|
|
97
|
+
</template>
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import type { PaginationRootProps, PaginationRootEmits } from 'reka-ui';
|
|
2
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
3
|
+
import theme from '#build/ui/pagination';
|
|
4
|
+
import type { ButtonProps } from '../types';
|
|
5
|
+
import type { ComponentConfig } from '../types/utils';
|
|
6
|
+
type Pagination = ComponentConfig<typeof theme, AppConfig, 'pagination'>;
|
|
7
|
+
export interface PaginationProps extends Partial<Pick<PaginationRootProps, 'defaultPage' | 'disabled' | 'itemsPerPage' | 'page' | 'showEdges' | 'siblingCount' | 'total'>> {
|
|
8
|
+
/**
|
|
9
|
+
* The element or component this component should render as.
|
|
10
|
+
* @defaultValue 'div'
|
|
11
|
+
*/
|
|
12
|
+
as?: any;
|
|
13
|
+
/**
|
|
14
|
+
* The icon to use for the first page control.
|
|
15
|
+
* @defaultValue appConfig.ui.icons.chevronDoubleLeft
|
|
16
|
+
* @IconifyIcon
|
|
17
|
+
*/
|
|
18
|
+
firstIcon?: string;
|
|
19
|
+
/**
|
|
20
|
+
* The icon to use for the previous page control.
|
|
21
|
+
* @defaultValue appConfig.ui.icons.chevronLeft
|
|
22
|
+
* @IconifyIcon
|
|
23
|
+
*/
|
|
24
|
+
prevIcon?: string;
|
|
25
|
+
/**
|
|
26
|
+
* The icon to use for the next page control.
|
|
27
|
+
* @defaultValue appConfig.ui.icons.chevronRight
|
|
28
|
+
* @IconifyIcon
|
|
29
|
+
*/
|
|
30
|
+
nextIcon?: string;
|
|
31
|
+
/**
|
|
32
|
+
* The icon to use for the last page control.
|
|
33
|
+
* @defaultValue appConfig.ui.icons.chevronDoubleRight
|
|
34
|
+
* @IconifyIcon
|
|
35
|
+
*/
|
|
36
|
+
lastIcon?: string;
|
|
37
|
+
/**
|
|
38
|
+
* The icon to use for the ellipsis control.
|
|
39
|
+
* @defaultValue appConfig.ui.icons.ellipsis
|
|
40
|
+
* @IconifyIcon
|
|
41
|
+
*/
|
|
42
|
+
ellipsisIcon?: string;
|
|
43
|
+
/**
|
|
44
|
+
* The color of the pagination controls.
|
|
45
|
+
* @defaultValue 'neutral'
|
|
46
|
+
* @IconifyIcon
|
|
47
|
+
*/
|
|
48
|
+
color?: ButtonProps['color'];
|
|
49
|
+
/**
|
|
50
|
+
* The variant of the pagination controls.
|
|
51
|
+
* @defaultValue 'outline'
|
|
52
|
+
*/
|
|
53
|
+
variant?: ButtonProps['variant'];
|
|
54
|
+
/**
|
|
55
|
+
* The color of the active pagination control.
|
|
56
|
+
* @defaultValue 'primary'
|
|
57
|
+
*/
|
|
58
|
+
activeColor?: ButtonProps['color'];
|
|
59
|
+
/**
|
|
60
|
+
* The variant of the active pagination control.
|
|
61
|
+
* @defaultValue 'solid'
|
|
62
|
+
*/
|
|
63
|
+
activeVariant?: ButtonProps['variant'];
|
|
64
|
+
/**
|
|
65
|
+
* Whether to show the first, previous, next, and last controls.
|
|
66
|
+
* @defaultValue true
|
|
67
|
+
*/
|
|
68
|
+
showControls?: boolean;
|
|
69
|
+
size?: ButtonProps['size'];
|
|
70
|
+
/**
|
|
71
|
+
* A function to render page controls as links.
|
|
72
|
+
* @param page The page number to navigate to.
|
|
73
|
+
*/
|
|
74
|
+
to?: (page: number) => ButtonProps['to'];
|
|
75
|
+
class?: any;
|
|
76
|
+
ui?: Pagination['slots'];
|
|
77
|
+
}
|
|
78
|
+
export interface PaginationEmits extends PaginationRootEmits {
|
|
79
|
+
}
|
|
80
|
+
export interface PaginationSlots {
|
|
81
|
+
first(props?: {}): any;
|
|
82
|
+
prev(props?: {}): any;
|
|
83
|
+
next(props?: {}): any;
|
|
84
|
+
last(props?: {}): any;
|
|
85
|
+
ellipsis(props?: {}): any;
|
|
86
|
+
item(props: {
|
|
87
|
+
page: number;
|
|
88
|
+
pageCount: number;
|
|
89
|
+
item: {
|
|
90
|
+
type: 'ellipsis';
|
|
91
|
+
} | {
|
|
92
|
+
type: 'page';
|
|
93
|
+
value: number;
|
|
94
|
+
};
|
|
95
|
+
index: number;
|
|
96
|
+
}): any;
|
|
97
|
+
}
|
|
98
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<PaginationProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
99
|
+
"update:page": (value: number) => any;
|
|
100
|
+
}, string, import("vue").PublicProps, Readonly<PaginationProps> & Readonly<{
|
|
101
|
+
"onUpdate:page"?: ((value: number) => any) | undefined;
|
|
102
|
+
}>, {
|
|
103
|
+
color: "error" | "info" | "primary" | "secondary" | "success" | "warning" | "neutral";
|
|
104
|
+
activeColor: "error" | "info" | "primary" | "secondary" | "success" | "warning" | "neutral";
|
|
105
|
+
variant: "link" | "solid" | "outline" | "soft" | "subtle" | "ghost";
|
|
106
|
+
activeVariant: "link" | "solid" | "outline" | "soft" | "subtle" | "ghost";
|
|
107
|
+
itemsPerPage: number;
|
|
108
|
+
showEdges: boolean;
|
|
109
|
+
siblingCount: number;
|
|
110
|
+
total: number;
|
|
111
|
+
showControls: boolean;
|
|
112
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, PaginationSlots>;
|
|
113
|
+
export default _default;
|
|
114
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
115
|
+
new (): {
|
|
116
|
+
$slots: S;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/pin-input";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { ref, computed, onMounted } from "vue";
|
|
7
|
+
import { PinInputInput, PinInputRoot, useForwardPropsEmits } from "reka-ui";
|
|
8
|
+
import { reactivePick } from "@vueuse/core";
|
|
9
|
+
import { useAppConfig } from "#imports";
|
|
10
|
+
import { useFormField } from "../composables/useFormField";
|
|
11
|
+
import { looseToNumber } from "../utils";
|
|
12
|
+
import { tv } from "../utils/tv";
|
|
13
|
+
const props = defineProps({
|
|
14
|
+
as: { type: null, required: false },
|
|
15
|
+
color: { type: null, required: false },
|
|
16
|
+
variant: { type: null, required: false },
|
|
17
|
+
size: { type: null, required: false },
|
|
18
|
+
length: { type: [Number, String], required: false, default: 5 },
|
|
19
|
+
autofocus: { type: Boolean, required: false },
|
|
20
|
+
autofocusDelay: { type: Number, required: false, default: 0 },
|
|
21
|
+
highlight: { type: Boolean, required: false },
|
|
22
|
+
class: { type: null, required: false },
|
|
23
|
+
ui: { type: null, required: false },
|
|
24
|
+
defaultValue: { type: Array, required: false },
|
|
25
|
+
disabled: { type: Boolean, required: false },
|
|
26
|
+
id: { type: String, required: false },
|
|
27
|
+
mask: { type: Boolean, required: false },
|
|
28
|
+
modelValue: { type: null, required: false },
|
|
29
|
+
name: { type: String, required: false },
|
|
30
|
+
otp: { type: Boolean, required: false },
|
|
31
|
+
placeholder: { type: String, required: false },
|
|
32
|
+
required: { type: Boolean, required: false },
|
|
33
|
+
type: { type: null, required: false, default: "text" }
|
|
34
|
+
});
|
|
35
|
+
const emits = defineEmits(["update:modelValue", "complete", "change", "blur"]);
|
|
36
|
+
const appConfig = useAppConfig();
|
|
37
|
+
const rootProps = useForwardPropsEmits(reactivePick(props, "defaultValue", "disabled", "id", "mask", "modelValue", "name", "otp", "required", "type"), emits);
|
|
38
|
+
const { emitFormInput, emitFormFocus, emitFormChange, emitFormBlur, size, color, id, name, highlight, disabled, ariaAttrs } = useFormField(props);
|
|
39
|
+
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.pinInput || {} })({
|
|
40
|
+
color: color.value,
|
|
41
|
+
variant: props.variant,
|
|
42
|
+
size: size.value,
|
|
43
|
+
highlight: highlight.value
|
|
44
|
+
}));
|
|
45
|
+
const inputsRef = ref([]);
|
|
46
|
+
const completed = ref(false);
|
|
47
|
+
function onComplete(value) {
|
|
48
|
+
const event = new Event("change", { target: { value } });
|
|
49
|
+
emits("change", event);
|
|
50
|
+
emitFormChange();
|
|
51
|
+
}
|
|
52
|
+
function onBlur(event) {
|
|
53
|
+
if (!event.relatedTarget || completed.value) {
|
|
54
|
+
emits("blur", event);
|
|
55
|
+
emitFormBlur();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
function autoFocus() {
|
|
59
|
+
if (props.autofocus) {
|
|
60
|
+
inputsRef.value[0]?.$el?.focus();
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
onMounted(() => {
|
|
64
|
+
setTimeout(() => {
|
|
65
|
+
autoFocus();
|
|
66
|
+
}, props.autofocusDelay);
|
|
67
|
+
});
|
|
68
|
+
defineExpose({
|
|
69
|
+
inputsRef
|
|
70
|
+
});
|
|
71
|
+
</script>
|
|
72
|
+
|
|
73
|
+
<template>
|
|
74
|
+
<PinInputRoot
|
|
75
|
+
v-bind="{ ...rootProps, ...ariaAttrs }"
|
|
76
|
+
:id="id"
|
|
77
|
+
:name="name"
|
|
78
|
+
:placeholder="placeholder"
|
|
79
|
+
:class="ui.root({ class: [props.ui?.root, props.class] })"
|
|
80
|
+
@update:model-value="emitFormInput()"
|
|
81
|
+
@complete="onComplete"
|
|
82
|
+
>
|
|
83
|
+
<PinInputInput
|
|
84
|
+
v-for="(ids, index) in looseToNumber(props.length)"
|
|
85
|
+
:key="ids"
|
|
86
|
+
:ref="(el) => inputsRef[index] = el"
|
|
87
|
+
:index="index"
|
|
88
|
+
:class="ui.base({ class: props.ui?.base })"
|
|
89
|
+
:disabled="disabled"
|
|
90
|
+
@blur="onBlur"
|
|
91
|
+
@focus="emitFormFocus"
|
|
92
|
+
/>
|
|
93
|
+
</PinInputRoot>
|
|
94
|
+
</template>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { ComponentPublicInstance } from 'vue';
|
|
2
|
+
import type { PinInputRootEmits, PinInputRootProps } from 'reka-ui';
|
|
3
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
4
|
+
import theme from '#build/ui/pin-input';
|
|
5
|
+
import type { ComponentConfig } from '../types/utils';
|
|
6
|
+
type PinInput = ComponentConfig<typeof theme, AppConfig, 'pinInput'>;
|
|
7
|
+
type PinInputType = 'text' | 'number';
|
|
8
|
+
export interface PinInputProps<T extends PinInputType = 'text'> extends Pick<PinInputRootProps<T>, 'defaultValue' | 'disabled' | 'id' | 'mask' | 'modelValue' | 'name' | 'otp' | 'placeholder' | 'required' | 'type'> {
|
|
9
|
+
/**
|
|
10
|
+
* The element or component this component should render as.
|
|
11
|
+
* @defaultValue 'div'
|
|
12
|
+
*/
|
|
13
|
+
as?: any;
|
|
14
|
+
/**
|
|
15
|
+
* @defaultValue 'primary'
|
|
16
|
+
*/
|
|
17
|
+
color?: PinInput['variants']['color'];
|
|
18
|
+
/**
|
|
19
|
+
* @defaultValue 'outline'
|
|
20
|
+
*/
|
|
21
|
+
variant?: PinInput['variants']['variant'];
|
|
22
|
+
/**
|
|
23
|
+
* @defaultValue 'md'
|
|
24
|
+
*/
|
|
25
|
+
size?: PinInput['variants']['size'];
|
|
26
|
+
/**
|
|
27
|
+
* The number of input fields.
|
|
28
|
+
* @defaultValue 5
|
|
29
|
+
*/
|
|
30
|
+
length?: number | string;
|
|
31
|
+
autofocus?: boolean;
|
|
32
|
+
autofocusDelay?: number;
|
|
33
|
+
highlight?: boolean;
|
|
34
|
+
class?: any;
|
|
35
|
+
ui?: PinInput['slots'];
|
|
36
|
+
}
|
|
37
|
+
export type PinInputEmits<T extends PinInputType = 'text'> = PinInputRootEmits<T> & {
|
|
38
|
+
change: [payload: Event];
|
|
39
|
+
blur: [payload: Event];
|
|
40
|
+
};
|
|
41
|
+
declare const _default: <T extends PinInputType = "text">(__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<{
|
|
42
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
43
|
+
readonly onBlur?: ((payload: Event) => any) | undefined;
|
|
44
|
+
readonly onComplete?: ((value: T extends "number" ? number[] : string[]) => any) | undefined;
|
|
45
|
+
readonly onChange?: ((payload: Event) => any) | undefined;
|
|
46
|
+
readonly "onUpdate:modelValue"?: ((value: T extends "number" ? number[] : string[]) => any) | undefined;
|
|
47
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onBlur" | "onChange" | "onUpdate:modelValue" | "onComplete"> & PinInputProps<T> & Partial<{}>> & import("vue").PublicProps;
|
|
48
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
49
|
+
inputsRef: import("vue").Ref<ComponentPublicInstance[], ComponentPublicInstance[]>;
|
|
50
|
+
}>): void;
|
|
51
|
+
attrs: any;
|
|
52
|
+
slots: {};
|
|
53
|
+
emit: ((evt: "blur", payload: Event) => void) & ((evt: "complete", value: T extends "number" ? number[] : string[]) => void) & ((evt: "change", payload: Event) => void) & ((evt: "update:modelValue", value: T extends "number" ? number[] : string[]) => void);
|
|
54
|
+
}>) => import("vue").VNode & {
|
|
55
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
56
|
+
};
|
|
57
|
+
export default _default;
|
|
58
|
+
type __VLS_PrettifyLocal<T> = {
|
|
59
|
+
[K in keyof T]: T[K];
|
|
60
|
+
} & {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/popover";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { computed, toRef } from "vue";
|
|
7
|
+
import { defu } from "defu";
|
|
8
|
+
import { useForwardPropsEmits } from "reka-ui";
|
|
9
|
+
import { Popover, HoverCard } from "reka-ui/namespaced";
|
|
10
|
+
import { reactivePick } from "@vueuse/core";
|
|
11
|
+
import { useAppConfig } from "#imports";
|
|
12
|
+
import { usePortal } from "../composables/usePortal";
|
|
13
|
+
import { tv } from "../utils/tv";
|
|
14
|
+
const props = defineProps({
|
|
15
|
+
mode: { type: String, required: false, default: "click" },
|
|
16
|
+
content: { type: Object, required: false },
|
|
17
|
+
arrow: { type: [Boolean, Object], required: false },
|
|
18
|
+
portal: { type: [Boolean, String], required: false, skipCheck: true, default: true },
|
|
19
|
+
dismissible: { type: Boolean, required: false, default: true },
|
|
20
|
+
class: { type: null, required: false },
|
|
21
|
+
ui: { type: null, required: false },
|
|
22
|
+
defaultOpen: { type: Boolean, required: false },
|
|
23
|
+
open: { type: Boolean, required: false },
|
|
24
|
+
modal: { type: Boolean, required: false },
|
|
25
|
+
openDelay: { type: Number, required: false, default: 0 },
|
|
26
|
+
closeDelay: { type: Number, required: false, default: 0 }
|
|
27
|
+
});
|
|
28
|
+
const emits = defineEmits(["close:prevent", "update:open"]);
|
|
29
|
+
const slots = defineSlots();
|
|
30
|
+
const appConfig = useAppConfig();
|
|
31
|
+
const pick = props.mode === "hover" ? reactivePick(props, "defaultOpen", "open", "openDelay", "closeDelay") : reactivePick(props, "defaultOpen", "open", "modal");
|
|
32
|
+
const rootProps = useForwardPropsEmits(pick, emits);
|
|
33
|
+
const portalProps = usePortal(toRef(() => props.portal));
|
|
34
|
+
const contentProps = toRef(() => defu(props.content, { side: "bottom", sideOffset: 8, collisionPadding: 8 }));
|
|
35
|
+
const contentEvents = computed(() => {
|
|
36
|
+
if (!props.dismissible) {
|
|
37
|
+
const events = ["pointerDownOutside", "interactOutside", "escapeKeyDown"];
|
|
38
|
+
return events.reduce((acc, curr) => {
|
|
39
|
+
acc[curr] = (e) => {
|
|
40
|
+
e.preventDefault();
|
|
41
|
+
emits("close:prevent");
|
|
42
|
+
};
|
|
43
|
+
return acc;
|
|
44
|
+
}, {});
|
|
45
|
+
}
|
|
46
|
+
return {};
|
|
47
|
+
});
|
|
48
|
+
const arrowProps = toRef(() => props.arrow);
|
|
49
|
+
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.popover || {} })({
|
|
50
|
+
side: contentProps.value.side
|
|
51
|
+
}));
|
|
52
|
+
const Component = computed(() => props.mode === "hover" ? HoverCard : Popover);
|
|
53
|
+
</script>
|
|
54
|
+
|
|
55
|
+
<template>
|
|
56
|
+
<Component.Root v-slot="{ open }" v-bind="rootProps">
|
|
57
|
+
<Component.Trigger v-if="!!slots.default" as-child :class="props.class">
|
|
58
|
+
<slot :open="open" />
|
|
59
|
+
</Component.Trigger>
|
|
60
|
+
|
|
61
|
+
<Component.Anchor v-if="'Anchor' in Component && !!slots.anchor" as-child>
|
|
62
|
+
<slot name="anchor" />
|
|
63
|
+
</Component.Anchor>
|
|
64
|
+
|
|
65
|
+
<Component.Portal v-bind="portalProps">
|
|
66
|
+
<Component.Content v-bind="contentProps" :class="ui.content({ class: [!slots.default && props.class, props.ui?.content] })" v-on="contentEvents">
|
|
67
|
+
<slot name="content" />
|
|
68
|
+
|
|
69
|
+
<Component.Arrow v-if="!!arrow" v-bind="arrowProps" :class="ui.arrow({ class: props.ui?.arrow })" />
|
|
70
|
+
</Component.Content>
|
|
71
|
+
</Component.Portal>
|
|
72
|
+
</Component.Root>
|
|
73
|
+
</template>
|