@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,53 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/separator";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { computed } from "vue";
|
|
7
|
+
import { Separator, useForwardProps } from "reka-ui";
|
|
8
|
+
import { reactivePick } from "@vueuse/core";
|
|
9
|
+
import { useAppConfig } from "#imports";
|
|
10
|
+
import { tv } from "../utils/tv";
|
|
11
|
+
import UIcon from "./Icon.vue";
|
|
12
|
+
import UAvatar from "./Avatar.vue";
|
|
13
|
+
const props = defineProps({
|
|
14
|
+
as: { type: null, required: false },
|
|
15
|
+
label: { type: String, required: false },
|
|
16
|
+
icon: { type: String, required: false },
|
|
17
|
+
avatar: { type: Object, required: false },
|
|
18
|
+
color: { type: null, required: false },
|
|
19
|
+
size: { type: null, required: false },
|
|
20
|
+
type: { type: null, required: false },
|
|
21
|
+
orientation: { type: null, required: false, default: "horizontal" },
|
|
22
|
+
class: { type: null, required: false },
|
|
23
|
+
ui: { type: null, required: false },
|
|
24
|
+
decorative: { type: Boolean, required: false }
|
|
25
|
+
});
|
|
26
|
+
const slots = defineSlots();
|
|
27
|
+
const appConfig = useAppConfig();
|
|
28
|
+
const rootProps = useForwardProps(reactivePick(props, "as", "decorative", "orientation"));
|
|
29
|
+
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.separator || {} })({
|
|
30
|
+
color: props.color,
|
|
31
|
+
orientation: props.orientation,
|
|
32
|
+
size: props.size,
|
|
33
|
+
type: props.type
|
|
34
|
+
}));
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<template>
|
|
38
|
+
<Separator v-bind="rootProps" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
39
|
+
<div :class="ui.border({ class: props.ui?.border })" />
|
|
40
|
+
|
|
41
|
+
<template v-if="label || icon || avatar || !!slots.default">
|
|
42
|
+
<div :class="ui.container({ class: props.ui?.container })">
|
|
43
|
+
<slot>
|
|
44
|
+
<span v-if="label" :class="ui.label({ class: props.ui?.label })">{{ label }}</span>
|
|
45
|
+
<UIcon v-else-if="icon" :name="icon" :class="ui.icon({ class: props.ui?.icon })" />
|
|
46
|
+
<UAvatar v-else-if="avatar" :size="props.ui?.avatarSize || ui.avatarSize()" v-bind="avatar" :class="ui.avatar({ class: props.ui?.avatar })" />
|
|
47
|
+
</slot>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<div :class="ui.border({ class: props.ui?.border })" />
|
|
51
|
+
</template>
|
|
52
|
+
</Separator>
|
|
53
|
+
</template>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Separator } from 'reka-ui';
|
|
2
|
+
import type { SeparatorProps as _SeparatorProps } from 'reka-ui';
|
|
3
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
4
|
+
import theme from '#build/ui/separator';
|
|
5
|
+
import type { AvatarProps } from '../types';
|
|
6
|
+
import type { ComponentConfig } from '../types/utils';
|
|
7
|
+
type Separator = ComponentConfig<typeof theme, AppConfig, 'separator'>;
|
|
8
|
+
export interface SeparatorProps extends Pick<_SeparatorProps, 'decorative'> {
|
|
9
|
+
/**
|
|
10
|
+
* The element or component this component should render as.
|
|
11
|
+
* @defaultValue 'div'
|
|
12
|
+
*/
|
|
13
|
+
as?: any;
|
|
14
|
+
/** Display a label in the middle. */
|
|
15
|
+
label?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Display an icon in the middle.
|
|
18
|
+
* @IconifyIcon
|
|
19
|
+
*/
|
|
20
|
+
icon?: string;
|
|
21
|
+
/** Display an avatar in the middle. */
|
|
22
|
+
avatar?: AvatarProps;
|
|
23
|
+
/**
|
|
24
|
+
* @defaultValue 'neutral'
|
|
25
|
+
*/
|
|
26
|
+
color?: Separator['variants']['color'];
|
|
27
|
+
/**
|
|
28
|
+
* @defaultValue 'xs'
|
|
29
|
+
*/
|
|
30
|
+
size?: Separator['variants']['size'];
|
|
31
|
+
/**
|
|
32
|
+
* @defaultValue 'solid'
|
|
33
|
+
*/
|
|
34
|
+
type?: Separator['variants']['type'];
|
|
35
|
+
/**
|
|
36
|
+
* The orientation of the separator.
|
|
37
|
+
* @defaultValue 'horizontal'
|
|
38
|
+
*/
|
|
39
|
+
orientation?: _SeparatorProps['orientation'];
|
|
40
|
+
class?: any;
|
|
41
|
+
ui?: Separator['slots'];
|
|
42
|
+
}
|
|
43
|
+
export interface SeparatorSlots {
|
|
44
|
+
default(props?: {}): any;
|
|
45
|
+
}
|
|
46
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<SeparatorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SeparatorProps> & Readonly<{}>, {
|
|
47
|
+
orientation: "horizontal" | "vertical";
|
|
48
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, SeparatorSlots>;
|
|
49
|
+
export default _default;
|
|
50
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
51
|
+
new (): {
|
|
52
|
+
$slots: S;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/skeleton";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { computed } from "vue";
|
|
7
|
+
import { Primitive } from "reka-ui";
|
|
8
|
+
import { useAppConfig } from "#imports";
|
|
9
|
+
import { tv } from "../utils/tv";
|
|
10
|
+
const props = defineProps({
|
|
11
|
+
as: { type: null, required: false },
|
|
12
|
+
class: { type: null, required: false }
|
|
13
|
+
});
|
|
14
|
+
const appConfig = useAppConfig();
|
|
15
|
+
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.skeleton || {} }));
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<Primitive
|
|
20
|
+
:as="as"
|
|
21
|
+
aria-busy="true"
|
|
22
|
+
aria-label="loading"
|
|
23
|
+
aria-live="polite"
|
|
24
|
+
role="alert"
|
|
25
|
+
:class="ui({ class: props.class })"
|
|
26
|
+
>
|
|
27
|
+
<slot />
|
|
28
|
+
</Primitive>
|
|
29
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface SkeletonProps {
|
|
2
|
+
/**
|
|
3
|
+
* The element or component this component should render as.
|
|
4
|
+
* @defaultValue 'div'
|
|
5
|
+
*/
|
|
6
|
+
as?: any;
|
|
7
|
+
class?: any;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<SkeletonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SkeletonProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
10
|
+
default?: (props: {}) => any;
|
|
11
|
+
}>;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/slideover";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { computed, toRef } from "vue";
|
|
7
|
+
import { DialogRoot, DialogTrigger, DialogPortal, DialogOverlay, DialogContent, DialogTitle, DialogDescription, DialogClose, VisuallyHidden, useForwardPropsEmits } from "reka-ui";
|
|
8
|
+
import { reactivePick } from "@vueuse/core";
|
|
9
|
+
import { useAppConfig } from "#imports";
|
|
10
|
+
import { useLocale } from "../composables/useLocale";
|
|
11
|
+
import { usePortal } from "../composables/usePortal";
|
|
12
|
+
import { tv } from "../utils/tv";
|
|
13
|
+
import UButton from "./Button.vue";
|
|
14
|
+
const props = defineProps({
|
|
15
|
+
title: { type: String, required: false },
|
|
16
|
+
description: { type: String, required: false },
|
|
17
|
+
content: { type: Object, required: false },
|
|
18
|
+
overlay: { type: Boolean, required: false, default: true },
|
|
19
|
+
transition: { type: Boolean, required: false, default: true },
|
|
20
|
+
side: { type: null, required: false, default: "right" },
|
|
21
|
+
portal: { type: [Boolean, String], required: false, skipCheck: true, default: true },
|
|
22
|
+
close: { type: [Boolean, Object], required: false, default: true },
|
|
23
|
+
closeIcon: { type: String, required: false },
|
|
24
|
+
dismissible: { type: Boolean, required: false, default: true },
|
|
25
|
+
class: { type: null, required: false },
|
|
26
|
+
ui: { type: null, required: false },
|
|
27
|
+
open: { type: Boolean, required: false },
|
|
28
|
+
defaultOpen: { type: Boolean, required: false },
|
|
29
|
+
modal: { type: Boolean, required: false, default: true }
|
|
30
|
+
});
|
|
31
|
+
const emits = defineEmits(["after:leave", "after:enter", "close:prevent", "update:open"]);
|
|
32
|
+
const slots = defineSlots();
|
|
33
|
+
const { t } = useLocale();
|
|
34
|
+
const appConfig = useAppConfig();
|
|
35
|
+
const rootProps = useForwardPropsEmits(reactivePick(props, "open", "defaultOpen", "modal"), emits);
|
|
36
|
+
const portalProps = usePortal(toRef(() => props.portal));
|
|
37
|
+
const contentProps = toRef(() => props.content);
|
|
38
|
+
const contentEvents = computed(() => {
|
|
39
|
+
const defaultEvents = {
|
|
40
|
+
closeAutoFocus: (e) => e.preventDefault()
|
|
41
|
+
};
|
|
42
|
+
if (!props.dismissible) {
|
|
43
|
+
const events = ["pointerDownOutside", "interactOutside", "escapeKeyDown"];
|
|
44
|
+
return events.reduce((acc, curr) => {
|
|
45
|
+
acc[curr] = (e) => {
|
|
46
|
+
e.preventDefault();
|
|
47
|
+
emits("close:prevent");
|
|
48
|
+
};
|
|
49
|
+
return acc;
|
|
50
|
+
}, defaultEvents);
|
|
51
|
+
}
|
|
52
|
+
return defaultEvents;
|
|
53
|
+
});
|
|
54
|
+
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.slideover || {} })({
|
|
55
|
+
transition: props.transition,
|
|
56
|
+
side: props.side
|
|
57
|
+
}));
|
|
58
|
+
</script>
|
|
59
|
+
|
|
60
|
+
<template>
|
|
61
|
+
<DialogRoot v-slot="{ open, close }" v-bind="rootProps">
|
|
62
|
+
<DialogTrigger v-if="!!slots.default" as-child :class="props.class">
|
|
63
|
+
<slot :open="open" />
|
|
64
|
+
</DialogTrigger>
|
|
65
|
+
|
|
66
|
+
<DialogPortal v-bind="portalProps">
|
|
67
|
+
<DialogOverlay v-if="overlay" :class="ui.overlay({ class: props.ui?.overlay })" />
|
|
68
|
+
|
|
69
|
+
<DialogContent
|
|
70
|
+
:data-side="side"
|
|
71
|
+
:class="ui.content({ class: [!slots.default && props.class, props.ui?.content] })"
|
|
72
|
+
v-bind="contentProps"
|
|
73
|
+
@after-enter="emits('after:enter')"
|
|
74
|
+
@after-leave="emits('after:leave')"
|
|
75
|
+
v-on="contentEvents"
|
|
76
|
+
>
|
|
77
|
+
<VisuallyHidden v-if="!!slots.content && (title || !!slots.title || (description || !!slots.description))">
|
|
78
|
+
<DialogTitle v-if="title || !!slots.title">
|
|
79
|
+
<slot name="title">
|
|
80
|
+
{{ title }}
|
|
81
|
+
</slot>
|
|
82
|
+
</DialogTitle>
|
|
83
|
+
|
|
84
|
+
<DialogDescription v-if="description || !!slots.description">
|
|
85
|
+
<slot name="description">
|
|
86
|
+
{{ description }}
|
|
87
|
+
</slot>
|
|
88
|
+
</DialogDescription>
|
|
89
|
+
</VisuallyHidden>
|
|
90
|
+
|
|
91
|
+
<slot name="content" :close="close">
|
|
92
|
+
<div v-if="!!slots.header || (title || !!slots.title) || (description || !!slots.description) || (props.close || !!slots.close)" :class="ui.header({ class: props.ui?.header })">
|
|
93
|
+
<slot name="header" :close="close">
|
|
94
|
+
<div :class="ui.wrapper({ class: props.ui?.wrapper })">
|
|
95
|
+
<DialogTitle v-if="title || !!slots.title" :class="ui.title({ class: props.ui?.title })">
|
|
96
|
+
<slot name="title">
|
|
97
|
+
{{ title }}
|
|
98
|
+
</slot>
|
|
99
|
+
</DialogTitle>
|
|
100
|
+
|
|
101
|
+
<DialogDescription v-if="description || !!slots.description" :class="ui.description({ class: props.ui?.description })">
|
|
102
|
+
<slot name="description">
|
|
103
|
+
{{ description }}
|
|
104
|
+
</slot>
|
|
105
|
+
</DialogDescription>
|
|
106
|
+
</div>
|
|
107
|
+
|
|
108
|
+
<slot name="actions" />
|
|
109
|
+
|
|
110
|
+
<DialogClose v-if="props.close || !!slots.close" as-child>
|
|
111
|
+
<slot name="close" :close="close" :ui="ui">
|
|
112
|
+
<UButton
|
|
113
|
+
v-if="props.close"
|
|
114
|
+
:icon="closeIcon || appConfig.ui.icons.close"
|
|
115
|
+
color="neutral"
|
|
116
|
+
variant="ghost"
|
|
117
|
+
:aria-label="t('slideover.close')"
|
|
118
|
+
v-bind="typeof props.close === 'object' ? props.close : {}"
|
|
119
|
+
:class="ui.close({ class: props.ui?.close })"
|
|
120
|
+
/>
|
|
121
|
+
</slot>
|
|
122
|
+
</DialogClose>
|
|
123
|
+
</slot>
|
|
124
|
+
</div>
|
|
125
|
+
|
|
126
|
+
<div :class="ui.body({ class: props.ui?.body })">
|
|
127
|
+
<slot name="body" :close="close" />
|
|
128
|
+
</div>
|
|
129
|
+
|
|
130
|
+
<div v-if="!!slots.footer" :class="ui.footer({ class: props.ui?.footer })">
|
|
131
|
+
<slot name="footer" :close="close" />
|
|
132
|
+
</div>
|
|
133
|
+
</slot>
|
|
134
|
+
</DialogContent>
|
|
135
|
+
</DialogPortal>
|
|
136
|
+
</DialogRoot>
|
|
137
|
+
</template>
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import type { DialogRootProps, DialogRootEmits, DialogContentProps, DialogContentEmits } from 'reka-ui';
|
|
2
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
3
|
+
import theme from '#build/ui/slideover';
|
|
4
|
+
import type { ButtonProps } from '../types';
|
|
5
|
+
import type { EmitsToProps, ComponentConfig } from '../types/utils';
|
|
6
|
+
type Slideover = ComponentConfig<typeof theme, AppConfig, 'slideover'>;
|
|
7
|
+
export interface SlideoverProps extends DialogRootProps {
|
|
8
|
+
title?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
/** The content of the slideover. */
|
|
11
|
+
content?: Omit<DialogContentProps, 'as' | 'asChild' | 'forceMount'> & Partial<EmitsToProps<DialogContentEmits>>;
|
|
12
|
+
/**
|
|
13
|
+
* Render an overlay behind the slideover.
|
|
14
|
+
* @defaultValue true
|
|
15
|
+
*/
|
|
16
|
+
overlay?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Animate the slideover when opening or closing.
|
|
19
|
+
* @defaultValue true
|
|
20
|
+
*/
|
|
21
|
+
transition?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* The side of the slideover.
|
|
24
|
+
* @defaultValue 'right'
|
|
25
|
+
*/
|
|
26
|
+
side?: Slideover['variants']['side'];
|
|
27
|
+
/**
|
|
28
|
+
* Render the slideover in a portal.
|
|
29
|
+
* @defaultValue true
|
|
30
|
+
*/
|
|
31
|
+
portal?: boolean | string | HTMLElement;
|
|
32
|
+
/**
|
|
33
|
+
* Display a close button to dismiss the slideover.
|
|
34
|
+
* `{ size: 'md', color: 'neutral', variant: 'ghost' }`{lang="ts-type"}
|
|
35
|
+
* @defaultValue true
|
|
36
|
+
*/
|
|
37
|
+
close?: boolean | Partial<ButtonProps>;
|
|
38
|
+
/**
|
|
39
|
+
* The icon displayed in the close button.
|
|
40
|
+
* @defaultValue appConfig.ui.icons.close
|
|
41
|
+
* @IconifyIcon
|
|
42
|
+
*/
|
|
43
|
+
closeIcon?: string;
|
|
44
|
+
/**
|
|
45
|
+
* When `false`, the slideover will not close when clicking outside or pressing escape.
|
|
46
|
+
* @defaultValue true
|
|
47
|
+
*/
|
|
48
|
+
dismissible?: boolean;
|
|
49
|
+
class?: any;
|
|
50
|
+
ui?: Slideover['slots'];
|
|
51
|
+
}
|
|
52
|
+
export interface SlideoverEmits extends DialogRootEmits {
|
|
53
|
+
'after:leave': [];
|
|
54
|
+
'after:enter': [];
|
|
55
|
+
'close:prevent': [];
|
|
56
|
+
}
|
|
57
|
+
export interface SlideoverSlots {
|
|
58
|
+
default(props: {
|
|
59
|
+
open: boolean;
|
|
60
|
+
}): any;
|
|
61
|
+
content(props: {
|
|
62
|
+
close: () => void;
|
|
63
|
+
}): any;
|
|
64
|
+
header(props: {
|
|
65
|
+
close: () => void;
|
|
66
|
+
}): any;
|
|
67
|
+
title(props?: {}): any;
|
|
68
|
+
description(props?: {}): any;
|
|
69
|
+
actions(props?: {}): any;
|
|
70
|
+
close(props: {
|
|
71
|
+
close: () => void;
|
|
72
|
+
ui: {
|
|
73
|
+
[K in keyof Required<Slideover['slots']>]: (props?: Record<string, any>) => string;
|
|
74
|
+
};
|
|
75
|
+
}): any;
|
|
76
|
+
body(props: {
|
|
77
|
+
close: () => void;
|
|
78
|
+
}): any;
|
|
79
|
+
footer(props: {
|
|
80
|
+
close: () => void;
|
|
81
|
+
}): any;
|
|
82
|
+
}
|
|
83
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<SlideoverProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
84
|
+
"update:open": (value: boolean) => any;
|
|
85
|
+
"after:leave": () => any;
|
|
86
|
+
"after:enter": () => any;
|
|
87
|
+
"close:prevent": () => any;
|
|
88
|
+
}, string, import("vue").PublicProps, Readonly<SlideoverProps> & Readonly<{
|
|
89
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
90
|
+
"onAfter:leave"?: (() => any) | undefined;
|
|
91
|
+
"onAfter:enter"?: (() => any) | undefined;
|
|
92
|
+
"onClose:prevent"?: (() => any) | undefined;
|
|
93
|
+
}>, {
|
|
94
|
+
close: boolean | Partial<ButtonProps>;
|
|
95
|
+
modal: boolean;
|
|
96
|
+
transition: boolean;
|
|
97
|
+
portal: boolean | string | HTMLElement;
|
|
98
|
+
overlay: boolean;
|
|
99
|
+
side: Slideover["variants"]["side"];
|
|
100
|
+
dismissible: boolean;
|
|
101
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, SlideoverSlots>;
|
|
102
|
+
export default _default;
|
|
103
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
104
|
+
new (): {
|
|
105
|
+
$slots: S;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/slider";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { computed } from "vue";
|
|
7
|
+
import { SliderRoot, SliderRange, SliderTrack, SliderThumb, useForwardPropsEmits } from "reka-ui";
|
|
8
|
+
import { reactivePick } from "@vueuse/core";
|
|
9
|
+
import { useAppConfig } from "#imports";
|
|
10
|
+
import { useFormField } from "../composables/useFormField";
|
|
11
|
+
import { tv } from "../utils/tv";
|
|
12
|
+
import UTooltip from "./Tooltip.vue";
|
|
13
|
+
const props = defineProps({
|
|
14
|
+
as: { type: null, required: false },
|
|
15
|
+
size: { type: null, required: false },
|
|
16
|
+
color: { type: null, required: false },
|
|
17
|
+
orientation: { type: null, required: false, default: "horizontal" },
|
|
18
|
+
tooltip: { type: [Boolean, Object], required: false },
|
|
19
|
+
defaultValue: { type: [Number, Array], required: false },
|
|
20
|
+
class: { type: null, required: false },
|
|
21
|
+
ui: { type: null, required: false },
|
|
22
|
+
name: { type: String, required: false },
|
|
23
|
+
disabled: { type: Boolean, required: false },
|
|
24
|
+
inverted: { type: Boolean, required: false },
|
|
25
|
+
min: { type: Number, required: false, default: 0 },
|
|
26
|
+
max: { type: Number, required: false, default: 100 },
|
|
27
|
+
step: { type: Number, required: false, default: 1 },
|
|
28
|
+
minStepsBetweenThumbs: { type: Number, required: false }
|
|
29
|
+
});
|
|
30
|
+
const emits = defineEmits(["update:modelValue", "change"]);
|
|
31
|
+
const modelValue = defineModel({ type: null });
|
|
32
|
+
const appConfig = useAppConfig();
|
|
33
|
+
const rootProps = useForwardPropsEmits(reactivePick(props, "as", "orientation", "min", "max", "step", "minStepsBetweenThumbs", "inverted"), emits);
|
|
34
|
+
const { id, emitFormChange, emitFormInput, size, color, name, disabled, ariaAttrs } = useFormField(props);
|
|
35
|
+
const defaultSliderValue = computed(() => {
|
|
36
|
+
if (typeof props.defaultValue === "number") {
|
|
37
|
+
return [props.defaultValue];
|
|
38
|
+
}
|
|
39
|
+
return props.defaultValue;
|
|
40
|
+
});
|
|
41
|
+
const sliderValue = computed({
|
|
42
|
+
get() {
|
|
43
|
+
if (typeof modelValue.value === "number") {
|
|
44
|
+
return [modelValue.value];
|
|
45
|
+
}
|
|
46
|
+
return modelValue.value ?? defaultSliderValue.value;
|
|
47
|
+
},
|
|
48
|
+
set(value) {
|
|
49
|
+
modelValue.value = value?.length !== 1 ? value : value[0];
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
const thumbs = computed(() => sliderValue.value?.length ?? 1);
|
|
53
|
+
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.slider || {} })({
|
|
54
|
+
disabled: disabled.value,
|
|
55
|
+
size: size.value,
|
|
56
|
+
color: color.value,
|
|
57
|
+
orientation: props.orientation
|
|
58
|
+
}));
|
|
59
|
+
function onChange(value) {
|
|
60
|
+
const event = new Event("change", { target: { value } });
|
|
61
|
+
emits("change", event);
|
|
62
|
+
emitFormChange();
|
|
63
|
+
}
|
|
64
|
+
</script>
|
|
65
|
+
|
|
66
|
+
<template>
|
|
67
|
+
<SliderRoot
|
|
68
|
+
v-bind="{ ...rootProps, ...ariaAttrs }"
|
|
69
|
+
:id="id"
|
|
70
|
+
v-model="sliderValue"
|
|
71
|
+
:name="name"
|
|
72
|
+
:disabled="disabled"
|
|
73
|
+
:class="ui.root({ class: [props.ui?.root, props.class] })"
|
|
74
|
+
:default-value="defaultSliderValue"
|
|
75
|
+
@update:model-value="emitFormInput()"
|
|
76
|
+
@value-commit="onChange"
|
|
77
|
+
>
|
|
78
|
+
<SliderTrack :class="ui.track({ class: props.ui?.track })">
|
|
79
|
+
<SliderRange :class="ui.range({ class: props.ui?.range })" />
|
|
80
|
+
</SliderTrack>
|
|
81
|
+
|
|
82
|
+
<template v-for="thumb in thumbs" :key="thumb">
|
|
83
|
+
<UTooltip
|
|
84
|
+
v-if="!!tooltip"
|
|
85
|
+
:text="thumbs > 1 ? String(sliderValue?.[thumb - 1]) : String(sliderValue)"
|
|
86
|
+
disable-closing-trigger
|
|
87
|
+
v-bind="typeof tooltip === 'object' ? tooltip : {}"
|
|
88
|
+
>
|
|
89
|
+
<SliderThumb :class="ui.thumb({ class: props.ui?.thumb })" />
|
|
90
|
+
</UTooltip>
|
|
91
|
+
<SliderThumb v-else :class="ui.thumb({ class: props.ui?.thumb })" />
|
|
92
|
+
</template>
|
|
93
|
+
</SliderRoot>
|
|
94
|
+
</template>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { SliderRootProps } from 'reka-ui';
|
|
2
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
3
|
+
import theme from '#build/ui/slider';
|
|
4
|
+
import type { TooltipProps } from '../types';
|
|
5
|
+
import type { ComponentConfig } from '../types/utils';
|
|
6
|
+
type Slider = ComponentConfig<typeof theme, AppConfig, 'slider'>;
|
|
7
|
+
export interface SliderProps extends Pick<SliderRootProps, 'name' | 'disabled' | 'inverted' | 'min' | 'max' | 'step' | 'minStepsBetweenThumbs'> {
|
|
8
|
+
/**
|
|
9
|
+
* The element or component this component should render as.
|
|
10
|
+
* @defaultValue 'div'
|
|
11
|
+
*/
|
|
12
|
+
as?: any;
|
|
13
|
+
/**
|
|
14
|
+
* @defaultValue 'md'
|
|
15
|
+
*/
|
|
16
|
+
size?: Slider['variants']['size'];
|
|
17
|
+
/**
|
|
18
|
+
* @defaultValue 'primary'
|
|
19
|
+
*/
|
|
20
|
+
color?: Slider['variants']['color'];
|
|
21
|
+
/**
|
|
22
|
+
* The orientation of the slider.
|
|
23
|
+
* @defaultValue 'horizontal'
|
|
24
|
+
*/
|
|
25
|
+
orientation?: SliderRootProps['orientation'];
|
|
26
|
+
/**
|
|
27
|
+
* Display a tooltip around the slider thumbs with the current value.
|
|
28
|
+
* `{ disableClosingTrigger: true }`{lang="ts-type"}
|
|
29
|
+
* @defaultValue false
|
|
30
|
+
*/
|
|
31
|
+
tooltip?: boolean | TooltipProps;
|
|
32
|
+
/** The value of the slider when initially rendered. Use when you do not need to control the state of the slider. */
|
|
33
|
+
defaultValue?: number | number[];
|
|
34
|
+
class?: any;
|
|
35
|
+
ui?: Slider['slots'];
|
|
36
|
+
}
|
|
37
|
+
export interface SliderEmits<T extends number | number[] = number | number[]> {
|
|
38
|
+
(e: 'update:modelValue', payload: T): void;
|
|
39
|
+
(e: 'change', payload: Event): void;
|
|
40
|
+
}
|
|
41
|
+
declare const _default: <T extends number | number[]>(__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 onChange?: ((payload: Event) => any) | undefined;
|
|
44
|
+
readonly "onUpdate:modelValue"?: ((payload: T) => any) | undefined;
|
|
45
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onChange" | "onUpdate:modelValue"> & (SliderProps & {
|
|
46
|
+
modelValue?: T;
|
|
47
|
+
}) & Partial<{}>> & import("vue").PublicProps;
|
|
48
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
49
|
+
attrs: any;
|
|
50
|
+
slots: {};
|
|
51
|
+
emit: SliderEmits<T> & ((evt: "update:modelValue", value: T | undefined) => void);
|
|
52
|
+
}>) => import("vue").VNode & {
|
|
53
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
54
|
+
};
|
|
55
|
+
export default _default;
|
|
56
|
+
type __VLS_PrettifyLocal<T> = {
|
|
57
|
+
[K in keyof T]: T[K];
|
|
58
|
+
} & {};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/stepper";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { computed } from "vue";
|
|
7
|
+
import { StepperRoot, StepperItem, StepperTrigger, StepperIndicator, StepperSeparator, StepperTitle, StepperDescription, useForwardProps } from "reka-ui";
|
|
8
|
+
import { reactivePick } from "@vueuse/core";
|
|
9
|
+
import { useAppConfig } from "#imports";
|
|
10
|
+
import { tv } from "../utils/tv";
|
|
11
|
+
import UIcon from "./Icon.vue";
|
|
12
|
+
const props = defineProps({
|
|
13
|
+
as: { type: null, required: false },
|
|
14
|
+
items: { type: Array, required: true },
|
|
15
|
+
size: { type: null, required: false },
|
|
16
|
+
color: { type: null, required: false },
|
|
17
|
+
orientation: { type: null, required: false, default: "horizontal" },
|
|
18
|
+
defaultValue: { type: [String, Number], required: false },
|
|
19
|
+
disabled: { type: Boolean, required: false },
|
|
20
|
+
class: { type: null, required: false },
|
|
21
|
+
ui: { type: null, required: false },
|
|
22
|
+
linear: { type: Boolean, required: false, default: true }
|
|
23
|
+
});
|
|
24
|
+
const emits = defineEmits(["next", "prev"]);
|
|
25
|
+
const slots = defineSlots();
|
|
26
|
+
const modelValue = defineModel({ type: [String, Number] });
|
|
27
|
+
const appConfig = useAppConfig();
|
|
28
|
+
const rootProps = useForwardProps(reactivePick(props, "as", "orientation", "linear"));
|
|
29
|
+
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.stepper || {} })({
|
|
30
|
+
orientation: props.orientation,
|
|
31
|
+
size: props.size,
|
|
32
|
+
color: props.color
|
|
33
|
+
}));
|
|
34
|
+
const currentStepIndex = computed({
|
|
35
|
+
get() {
|
|
36
|
+
const value = modelValue.value ?? props.defaultValue;
|
|
37
|
+
return (typeof value === "string" ? props.items.findIndex((item) => item.value === value) : value) ?? 0;
|
|
38
|
+
},
|
|
39
|
+
set(value) {
|
|
40
|
+
modelValue.value = props.items?.[value]?.value ?? value;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
const currentStep = computed(() => props.items?.[currentStepIndex.value]);
|
|
44
|
+
const hasNext = computed(() => currentStepIndex.value < props.items?.length - 1);
|
|
45
|
+
const hasPrev = computed(() => currentStepIndex.value > 0);
|
|
46
|
+
defineExpose({
|
|
47
|
+
next() {
|
|
48
|
+
if (hasNext.value) {
|
|
49
|
+
currentStepIndex.value += 1;
|
|
50
|
+
emits("next", currentStep.value);
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
prev() {
|
|
54
|
+
if (hasPrev.value) {
|
|
55
|
+
currentStepIndex.value -= 1;
|
|
56
|
+
emits("prev", currentStep.value);
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
hasNext,
|
|
60
|
+
hasPrev
|
|
61
|
+
});
|
|
62
|
+
</script>
|
|
63
|
+
|
|
64
|
+
<template>
|
|
65
|
+
<StepperRoot v-bind="rootProps" v-model="currentStepIndex" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
66
|
+
<div :class="ui.header({ class: props.ui?.header })">
|
|
67
|
+
<StepperItem
|
|
68
|
+
v-for="(item, count) in items"
|
|
69
|
+
:key="item.value ?? count"
|
|
70
|
+
:step="count"
|
|
71
|
+
:disabled="item.disabled || props.disabled"
|
|
72
|
+
:class="ui.item({ class: [props.ui?.item, item.ui?.item, item.class] })"
|
|
73
|
+
>
|
|
74
|
+
<div :class="ui.container({ class: [props.ui?.container, item.ui?.container] })">
|
|
75
|
+
<StepperTrigger :class="ui.trigger({ class: [props.ui?.trigger, item.ui?.trigger] })">
|
|
76
|
+
<StepperIndicator :class="ui.indicator({ class: [props.ui?.indicator, item.ui?.indicator] })">
|
|
77
|
+
<slot name="indicator" :item="item">
|
|
78
|
+
<UIcon v-if="item.icon" :name="item.icon" :class="ui.icon({ class: [props.ui?.icon, item.ui?.icon] })" />
|
|
79
|
+
<template v-else>
|
|
80
|
+
{{ count + 1 }}
|
|
81
|
+
</template>
|
|
82
|
+
</slot>
|
|
83
|
+
</StepperIndicator>
|
|
84
|
+
</StepperTrigger>
|
|
85
|
+
|
|
86
|
+
<StepperSeparator
|
|
87
|
+
v-if="count < items.length - 1"
|
|
88
|
+
:class="ui.separator({ class: [props.ui?.separator, item.ui?.separator] })"
|
|
89
|
+
/>
|
|
90
|
+
</div>
|
|
91
|
+
|
|
92
|
+
<div :class="ui.wrapper({ class: [props.ui?.wrapper, item.ui?.wrapper] })">
|
|
93
|
+
<StepperTitle as="div" :class="ui.title({ class: [props.ui?.title, item.ui?.title] })">
|
|
94
|
+
<slot name="title" :item="item">
|
|
95
|
+
{{ item.title }}
|
|
96
|
+
</slot>
|
|
97
|
+
</StepperTitle>
|
|
98
|
+
<StepperDescription as="div" :class="ui.description({ class: [props.ui?.description, item.ui?.description] })">
|
|
99
|
+
<slot name="description" :item="item">
|
|
100
|
+
{{ item.description }}
|
|
101
|
+
</slot>
|
|
102
|
+
</StepperDescription>
|
|
103
|
+
</div>
|
|
104
|
+
</StepperItem>
|
|
105
|
+
</div>
|
|
106
|
+
|
|
107
|
+
<div v-if="currentStep?.content || !!slots.content || currentStep?.slot" :class="ui.content({ class: props.ui?.content })">
|
|
108
|
+
<slot
|
|
109
|
+
:name="currentStep?.slot || 'content'"
|
|
110
|
+
:item="currentStep"
|
|
111
|
+
>
|
|
112
|
+
{{ currentStep?.content }}
|
|
113
|
+
</slot>
|
|
114
|
+
</div>
|
|
115
|
+
</StepperRoot>
|
|
116
|
+
</template>
|