@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,88 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/alert";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { computed } from "vue";
|
|
7
|
+
import { Primitive } from "reka-ui";
|
|
8
|
+
import { useAppConfig } from "#imports";
|
|
9
|
+
import { useLocale } from "../composables/useLocale";
|
|
10
|
+
import { tv } from "../utils/tv";
|
|
11
|
+
import UIcon from "./Icon.vue";
|
|
12
|
+
import UAvatar from "./Avatar.vue";
|
|
13
|
+
import UButton from "./Button.vue";
|
|
14
|
+
const props = defineProps({
|
|
15
|
+
as: { type: null, required: false },
|
|
16
|
+
title: { type: String, required: false },
|
|
17
|
+
description: { type: String, required: false },
|
|
18
|
+
icon: { type: String, required: false },
|
|
19
|
+
avatar: { type: Object, required: false },
|
|
20
|
+
color: { type: null, required: false },
|
|
21
|
+
variant: { type: null, required: false },
|
|
22
|
+
orientation: { type: null, required: false, default: "vertical" },
|
|
23
|
+
actions: { type: Array, required: false },
|
|
24
|
+
close: { type: [Boolean, Object], required: false },
|
|
25
|
+
closeIcon: { type: String, required: false },
|
|
26
|
+
class: { type: null, required: false },
|
|
27
|
+
ui: { type: null, required: false }
|
|
28
|
+
});
|
|
29
|
+
const emits = defineEmits(["update:open"]);
|
|
30
|
+
const slots = defineSlots();
|
|
31
|
+
const { t } = useLocale();
|
|
32
|
+
const appConfig = useAppConfig();
|
|
33
|
+
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.alert || {} })({
|
|
34
|
+
color: props.color,
|
|
35
|
+
variant: props.variant,
|
|
36
|
+
orientation: props.orientation,
|
|
37
|
+
title: !!props.title || !!slots.title
|
|
38
|
+
}));
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<template>
|
|
42
|
+
<Primitive :as="as" :data-orientation="orientation" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
43
|
+
<slot name="leading">
|
|
44
|
+
<UAvatar v-if="avatar" :size="props.ui?.avatarSize || ui.avatarSize()" v-bind="avatar" :class="ui.avatar({ class: props.ui?.avatar })" />
|
|
45
|
+
<UIcon v-else-if="icon" :name="icon" :class="ui.icon({ class: props.ui?.icon })" />
|
|
46
|
+
</slot>
|
|
47
|
+
|
|
48
|
+
<div :class="ui.wrapper({ class: props.ui?.wrapper })">
|
|
49
|
+
<div v-if="title || !!slots.title" :class="ui.title({ class: props.ui?.title })">
|
|
50
|
+
<slot name="title">
|
|
51
|
+
{{ title }}
|
|
52
|
+
</slot>
|
|
53
|
+
</div>
|
|
54
|
+
<div v-if="description || !!slots.description" :class="ui.description({ class: props.ui?.description })">
|
|
55
|
+
<slot name="description">
|
|
56
|
+
{{ description }}
|
|
57
|
+
</slot>
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
<div v-if="orientation === 'vertical' && (actions?.length || !!slots.actions)" :class="ui.actions({ class: props.ui?.actions })">
|
|
61
|
+
<slot name="actions">
|
|
62
|
+
<UButton v-for="(action, index) in actions" :key="index" size="xs" v-bind="action" />
|
|
63
|
+
</slot>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
<div v-if="orientation === 'horizontal' && (actions?.length || !!slots.actions) || close" :class="ui.actions({ class: props.ui?.actions, orientation: 'horizontal' })">
|
|
68
|
+
<template v-if="orientation === 'horizontal' && (actions?.length || !!slots.actions)">
|
|
69
|
+
<slot name="actions">
|
|
70
|
+
<UButton v-for="(action, index) in actions" :key="index" size="xs" v-bind="action" />
|
|
71
|
+
</slot>
|
|
72
|
+
</template>
|
|
73
|
+
|
|
74
|
+
<slot name="close" :ui="ui">
|
|
75
|
+
<UButton
|
|
76
|
+
v-if="close"
|
|
77
|
+
:icon="closeIcon || appConfig.ui.icons.close"
|
|
78
|
+
color="neutral"
|
|
79
|
+
variant="link"
|
|
80
|
+
:aria-label="t('alert.close')"
|
|
81
|
+
v-bind="typeof close === 'object' ? close : {}"
|
|
82
|
+
:class="ui.close({ class: props.ui?.close })"
|
|
83
|
+
@click="emits('update:open', false)"
|
|
84
|
+
/>
|
|
85
|
+
</slot>
|
|
86
|
+
</div>
|
|
87
|
+
</Primitive>
|
|
88
|
+
</template>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
2
|
+
import theme from '#build/ui/alert';
|
|
3
|
+
import type { AvatarProps, ButtonProps } from '../types';
|
|
4
|
+
import type { ComponentConfig } from '../types/utils';
|
|
5
|
+
type Alert = ComponentConfig<typeof theme, AppConfig, 'alert'>;
|
|
6
|
+
export interface AlertProps {
|
|
7
|
+
/**
|
|
8
|
+
* The element or component this component should render as.
|
|
9
|
+
* @defaultValue 'div'
|
|
10
|
+
*/
|
|
11
|
+
as?: any;
|
|
12
|
+
title?: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
/**
|
|
15
|
+
* @IconifyIcon
|
|
16
|
+
*/
|
|
17
|
+
icon?: string;
|
|
18
|
+
avatar?: AvatarProps;
|
|
19
|
+
/**
|
|
20
|
+
* @defaultValue 'primary'
|
|
21
|
+
*/
|
|
22
|
+
color?: Alert['variants']['color'];
|
|
23
|
+
/**
|
|
24
|
+
* @defaultValue 'solid'
|
|
25
|
+
*/
|
|
26
|
+
variant?: Alert['variants']['variant'];
|
|
27
|
+
/**
|
|
28
|
+
* The orientation between the content and the actions.
|
|
29
|
+
* @defaultValue 'vertical'
|
|
30
|
+
*/
|
|
31
|
+
orientation?: Alert['variants']['orientation'];
|
|
32
|
+
/**
|
|
33
|
+
* Display a list of actions:
|
|
34
|
+
* - under the title and description when orientation is `vertical`
|
|
35
|
+
* - next to the close button when orientation is `horizontal`
|
|
36
|
+
* `{ size: 'xs' }`{lang="ts-type"}
|
|
37
|
+
*/
|
|
38
|
+
actions?: ButtonProps[];
|
|
39
|
+
/**
|
|
40
|
+
* Display a close button to dismiss the alert.
|
|
41
|
+
* `{ size: 'md', color: 'neutral', variant: 'link' }`{lang="ts-type"}
|
|
42
|
+
* @emits 'update:open'
|
|
43
|
+
* @defaultValue false
|
|
44
|
+
*/
|
|
45
|
+
close?: boolean | Partial<ButtonProps>;
|
|
46
|
+
/**
|
|
47
|
+
* The icon displayed in the close button.
|
|
48
|
+
* @defaultValue appConfig.ui.icons.close
|
|
49
|
+
* @IconifyIcon
|
|
50
|
+
*/
|
|
51
|
+
closeIcon?: string;
|
|
52
|
+
class?: any;
|
|
53
|
+
ui?: Alert['slots'];
|
|
54
|
+
}
|
|
55
|
+
export interface AlertEmits {
|
|
56
|
+
(e: 'update:open', value: boolean): void;
|
|
57
|
+
}
|
|
58
|
+
export interface AlertSlots {
|
|
59
|
+
leading(props?: {}): any;
|
|
60
|
+
title(props?: {}): any;
|
|
61
|
+
description(props?: {}): any;
|
|
62
|
+
actions(props?: {}): any;
|
|
63
|
+
close(props: {
|
|
64
|
+
ui: {
|
|
65
|
+
[K in keyof Required<Alert['slots']>]: (props?: Record<string, any>) => string;
|
|
66
|
+
};
|
|
67
|
+
}): any;
|
|
68
|
+
}
|
|
69
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AlertProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
70
|
+
"update:open": (value: boolean) => any;
|
|
71
|
+
}, string, import("vue").PublicProps, Readonly<AlertProps> & Readonly<{
|
|
72
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
73
|
+
}>, {
|
|
74
|
+
orientation: Alert["variants"]["orientation"];
|
|
75
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, AlertSlots>;
|
|
76
|
+
export default _default;
|
|
77
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
78
|
+
new (): {
|
|
79
|
+
$slots: S;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
export default {
|
|
3
|
+
name: "App"
|
|
4
|
+
};
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<script setup>
|
|
8
|
+
import { toRef, useId, provide } from "vue";
|
|
9
|
+
import { ConfigProvider, TooltipProvider, useForwardProps } from "reka-ui";
|
|
10
|
+
import { reactivePick } from "@vueuse/core";
|
|
11
|
+
import { localeContextInjectionKey } from "../composables/useLocale";
|
|
12
|
+
import { portalTargetInjectionKey } from "../composables/usePortal";
|
|
13
|
+
import UToaster from "./Toaster.vue";
|
|
14
|
+
import UOverlayProvider from "./OverlayProvider.vue";
|
|
15
|
+
const props = defineProps({
|
|
16
|
+
tooltip: { type: Object, required: false },
|
|
17
|
+
toaster: { type: [Object, null], required: false },
|
|
18
|
+
locale: { type: null, required: false },
|
|
19
|
+
portal: { type: null, required: false, default: "body" },
|
|
20
|
+
scrollBody: { type: [Boolean, Object], required: false },
|
|
21
|
+
nonce: { type: String, required: false }
|
|
22
|
+
});
|
|
23
|
+
defineSlots();
|
|
24
|
+
const configProviderProps = useForwardProps(reactivePick(props, "scrollBody"));
|
|
25
|
+
const tooltipProps = toRef(() => props.tooltip);
|
|
26
|
+
const toasterProps = toRef(() => props.toaster);
|
|
27
|
+
const locale = toRef(() => props.locale);
|
|
28
|
+
provide(localeContextInjectionKey, locale);
|
|
29
|
+
const portal = toRef(() => props.portal);
|
|
30
|
+
provide(portalTargetInjectionKey, portal);
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<template>
|
|
34
|
+
<ConfigProvider :use-id="() => useId()" :dir="locale?.dir" :locale="locale?.code" v-bind="configProviderProps">
|
|
35
|
+
<TooltipProvider v-bind="tooltipProps">
|
|
36
|
+
<UToaster v-if="toaster !== null" v-bind="toasterProps">
|
|
37
|
+
<slot />
|
|
38
|
+
</UToaster>
|
|
39
|
+
<slot v-else />
|
|
40
|
+
|
|
41
|
+
<UOverlayProvider />
|
|
42
|
+
</TooltipProvider>
|
|
43
|
+
</ConfigProvider>
|
|
44
|
+
</template>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ConfigProviderProps, TooltipProviderProps } from 'reka-ui';
|
|
2
|
+
import type { ToasterProps, Locale, Messages } from '../types';
|
|
3
|
+
export interface AppProps<T extends Messages = Messages> extends Omit<ConfigProviderProps, 'useId' | 'dir' | 'locale'> {
|
|
4
|
+
tooltip?: TooltipProviderProps;
|
|
5
|
+
toaster?: ToasterProps | null;
|
|
6
|
+
locale?: Locale<T>;
|
|
7
|
+
portal?: string | HTMLElement;
|
|
8
|
+
}
|
|
9
|
+
export interface AppSlots {
|
|
10
|
+
default(props?: {}): any;
|
|
11
|
+
}
|
|
12
|
+
declare const _default: <T extends Messages>(__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<{
|
|
13
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & AppProps<T> & Partial<{}>> & import("vue").PublicProps;
|
|
14
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
15
|
+
attrs: any;
|
|
16
|
+
slots: AppSlots;
|
|
17
|
+
emit: {};
|
|
18
|
+
}>) => import("vue").VNode & {
|
|
19
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
20
|
+
};
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_PrettifyLocal<T> = {
|
|
23
|
+
[K in keyof T]: T[K];
|
|
24
|
+
} & {};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/avatar";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { ref, computed, watch } from "vue";
|
|
7
|
+
import { Primitive, Slot } from "reka-ui";
|
|
8
|
+
import { useAppConfig } from "#imports";
|
|
9
|
+
import ImageComponent from "#build/ui-image-component";
|
|
10
|
+
import { useAvatarGroup } from "../composables/useAvatarGroup";
|
|
11
|
+
import { tv } from "../utils/tv";
|
|
12
|
+
import UIcon from "./Icon.vue";
|
|
13
|
+
import UChip from "./Chip.vue";
|
|
14
|
+
defineOptions({ inheritAttrs: false });
|
|
15
|
+
const props = defineProps({
|
|
16
|
+
as: { type: null, required: false, default: "span" },
|
|
17
|
+
src: { type: String, required: false },
|
|
18
|
+
alt: { type: String, required: false },
|
|
19
|
+
icon: { type: String, required: false },
|
|
20
|
+
text: { type: String, required: false },
|
|
21
|
+
size: { type: null, required: false },
|
|
22
|
+
chip: { type: [Boolean, Object], required: false },
|
|
23
|
+
class: { type: null, required: false },
|
|
24
|
+
style: { type: null, required: false },
|
|
25
|
+
ui: { type: null, required: false }
|
|
26
|
+
});
|
|
27
|
+
const fallback = computed(() => props.text || (props.alt || "").split(" ").map((word) => word.charAt(0)).join("").substring(0, 2));
|
|
28
|
+
const appConfig = useAppConfig();
|
|
29
|
+
const { size } = useAvatarGroup(props);
|
|
30
|
+
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.avatar || {} })({
|
|
31
|
+
size: size.value
|
|
32
|
+
}));
|
|
33
|
+
const sizePx = computed(() => ({
|
|
34
|
+
"3xs": 16,
|
|
35
|
+
"2xs": 20,
|
|
36
|
+
"xs": 24,
|
|
37
|
+
"sm": 28,
|
|
38
|
+
"md": 32,
|
|
39
|
+
"lg": 36,
|
|
40
|
+
"xl": 40,
|
|
41
|
+
"2xl": 44,
|
|
42
|
+
"3xl": 48
|
|
43
|
+
})[props.size || "md"]);
|
|
44
|
+
const error = ref(false);
|
|
45
|
+
watch(() => props.src, () => {
|
|
46
|
+
if (error.value) {
|
|
47
|
+
error.value = false;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
function onError() {
|
|
51
|
+
error.value = true;
|
|
52
|
+
}
|
|
53
|
+
</script>
|
|
54
|
+
|
|
55
|
+
<template>
|
|
56
|
+
<component
|
|
57
|
+
:is="props.chip ? UChip : Primitive"
|
|
58
|
+
:as="as"
|
|
59
|
+
v-bind="props.chip ? typeof props.chip === 'object' ? { inset: true, ...props.chip } : { inset: true } : {}"
|
|
60
|
+
:class="ui.root({ class: [props.ui?.root, props.class] })"
|
|
61
|
+
:style="props.style"
|
|
62
|
+
>
|
|
63
|
+
<component
|
|
64
|
+
:is="ImageComponent"
|
|
65
|
+
v-if="src && !error"
|
|
66
|
+
role="img"
|
|
67
|
+
:src="src"
|
|
68
|
+
:alt="alt"
|
|
69
|
+
:width="sizePx"
|
|
70
|
+
:height="sizePx"
|
|
71
|
+
v-bind="$attrs"
|
|
72
|
+
:class="ui.image({ class: props.ui?.image })"
|
|
73
|
+
@error="onError"
|
|
74
|
+
/>
|
|
75
|
+
|
|
76
|
+
<Slot v-else v-bind="$attrs">
|
|
77
|
+
<slot>
|
|
78
|
+
<UIcon v-if="icon" :name="icon" :class="ui.icon({ class: props.ui?.icon })" />
|
|
79
|
+
<span v-else :class="ui.fallback({ class: props.ui?.fallback })">{{ fallback || "\xA0" }}</span>
|
|
80
|
+
</slot>
|
|
81
|
+
</Slot>
|
|
82
|
+
</component>
|
|
83
|
+
</template>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
2
|
+
import theme from '#build/ui/avatar';
|
|
3
|
+
import type { ChipProps } from '../types';
|
|
4
|
+
import type { ComponentConfig } from '../types/utils';
|
|
5
|
+
type Avatar = ComponentConfig<typeof theme, AppConfig, 'avatar'>;
|
|
6
|
+
export interface AvatarProps {
|
|
7
|
+
/**
|
|
8
|
+
* The element or component this component should render as.
|
|
9
|
+
* @defaultValue 'span'
|
|
10
|
+
*/
|
|
11
|
+
as?: any;
|
|
12
|
+
src?: string;
|
|
13
|
+
alt?: string;
|
|
14
|
+
/**
|
|
15
|
+
* @IconifyIcon
|
|
16
|
+
*/
|
|
17
|
+
icon?: string;
|
|
18
|
+
text?: string;
|
|
19
|
+
/**
|
|
20
|
+
* @defaultValue 'md'
|
|
21
|
+
*/
|
|
22
|
+
size?: Avatar['variants']['size'];
|
|
23
|
+
chip?: boolean | ChipProps;
|
|
24
|
+
class?: any;
|
|
25
|
+
style?: any;
|
|
26
|
+
ui?: Avatar['slots'];
|
|
27
|
+
}
|
|
28
|
+
export interface AvatarSlots {
|
|
29
|
+
default(props?: {}): any;
|
|
30
|
+
}
|
|
31
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AvatarProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AvatarProps> & Readonly<{}>, {
|
|
32
|
+
as: any;
|
|
33
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
34
|
+
default?: (props: {}) => any;
|
|
35
|
+
}>;
|
|
36
|
+
export default _default;
|
|
37
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
38
|
+
new (): {
|
|
39
|
+
$slots: S;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/avatar-group";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { computed, provide } from "vue";
|
|
7
|
+
import { Primitive } from "reka-ui";
|
|
8
|
+
import { useAppConfig } from "#imports";
|
|
9
|
+
import { avatarGroupInjectionKey } from "../composables/useAvatarGroup";
|
|
10
|
+
import { tv } from "../utils/tv";
|
|
11
|
+
import UAvatar from "./Avatar.vue";
|
|
12
|
+
const props = defineProps({
|
|
13
|
+
as: { type: null, required: false },
|
|
14
|
+
size: { type: null, required: false },
|
|
15
|
+
max: { type: [Number, String], required: false },
|
|
16
|
+
class: { type: null, required: false },
|
|
17
|
+
ui: { type: null, required: false }
|
|
18
|
+
});
|
|
19
|
+
const slots = defineSlots();
|
|
20
|
+
const appConfig = useAppConfig();
|
|
21
|
+
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.avatarGroup || {} })({
|
|
22
|
+
size: props.size
|
|
23
|
+
}));
|
|
24
|
+
const max = computed(() => typeof props.max === "string" ? Number.parseInt(props.max, 10) : props.max);
|
|
25
|
+
const children = computed(() => {
|
|
26
|
+
let children2 = slots.default?.();
|
|
27
|
+
if (children2?.length) {
|
|
28
|
+
children2 = children2.flatMap((child) => {
|
|
29
|
+
if (typeof child.type === "symbol") {
|
|
30
|
+
if (typeof child.children === "string") {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
return child.children;
|
|
34
|
+
}
|
|
35
|
+
return child;
|
|
36
|
+
}).filter(Boolean);
|
|
37
|
+
}
|
|
38
|
+
return children2 || [];
|
|
39
|
+
});
|
|
40
|
+
const visibleAvatars = computed(() => {
|
|
41
|
+
if (!children.value.length) {
|
|
42
|
+
return [];
|
|
43
|
+
}
|
|
44
|
+
if (!max.value || max.value <= 0) {
|
|
45
|
+
return [...children.value].reverse();
|
|
46
|
+
}
|
|
47
|
+
return [...children.value].slice(0, max.value).reverse();
|
|
48
|
+
});
|
|
49
|
+
const hiddenCount = computed(() => {
|
|
50
|
+
if (!children.value.length) {
|
|
51
|
+
return 0;
|
|
52
|
+
}
|
|
53
|
+
return children.value.length - visibleAvatars.value.length;
|
|
54
|
+
});
|
|
55
|
+
provide(avatarGroupInjectionKey, computed(() => ({
|
|
56
|
+
size: props.size
|
|
57
|
+
})));
|
|
58
|
+
</script>
|
|
59
|
+
|
|
60
|
+
<template>
|
|
61
|
+
<Primitive :as="as" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
62
|
+
<UAvatar v-if="hiddenCount > 0" :text="`+${hiddenCount}`" :class="ui.base({ class: props.ui?.base })" />
|
|
63
|
+
<component :is="avatar" v-for="(avatar, count) in visibleAvatars" :key="count" :class="ui.base({ class: props.ui?.base })" />
|
|
64
|
+
</Primitive>
|
|
65
|
+
</template>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
2
|
+
import theme from '#build/ui/avatar-group';
|
|
3
|
+
import type { ComponentConfig } from '../types/utils';
|
|
4
|
+
type AvatarGroup = ComponentConfig<typeof theme, AppConfig, 'avatarGroup'>;
|
|
5
|
+
export interface AvatarGroupProps {
|
|
6
|
+
/**
|
|
7
|
+
* The element or component this component should render as.
|
|
8
|
+
* @defaultValue 'div'
|
|
9
|
+
*/
|
|
10
|
+
as?: any;
|
|
11
|
+
/**
|
|
12
|
+
* @defaultValue 'md'
|
|
13
|
+
*/
|
|
14
|
+
size?: AvatarGroup['variants']['size'];
|
|
15
|
+
/**
|
|
16
|
+
* The maximum number of avatars to display.
|
|
17
|
+
*/
|
|
18
|
+
max?: number | string;
|
|
19
|
+
class?: any;
|
|
20
|
+
ui?: AvatarGroup['slots'];
|
|
21
|
+
}
|
|
22
|
+
export interface AvatarGroupSlots {
|
|
23
|
+
default(props?: {}): any;
|
|
24
|
+
}
|
|
25
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AvatarGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AvatarGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, AvatarGroupSlots>;
|
|
26
|
+
export default _default;
|
|
27
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
28
|
+
new (): {
|
|
29
|
+
$slots: S;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/badge";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { computed } from "vue";
|
|
7
|
+
import { Primitive } from "reka-ui";
|
|
8
|
+
import { useAppConfig } from "#imports";
|
|
9
|
+
import { useButtonGroup } from "../composables/useButtonGroup";
|
|
10
|
+
import { useComponentIcons } from "../composables/useComponentIcons";
|
|
11
|
+
import { tv } from "../utils/tv";
|
|
12
|
+
import UIcon from "./Icon.vue";
|
|
13
|
+
import UAvatar from "./Avatar.vue";
|
|
14
|
+
const props = defineProps({
|
|
15
|
+
as: { type: null, required: false, default: "span" },
|
|
16
|
+
label: { type: [String, Number], required: false },
|
|
17
|
+
color: { type: null, required: false },
|
|
18
|
+
variant: { type: null, required: false },
|
|
19
|
+
size: { type: null, required: false },
|
|
20
|
+
square: { type: Boolean, required: false },
|
|
21
|
+
class: { type: null, required: false },
|
|
22
|
+
ui: { type: null, required: false },
|
|
23
|
+
icon: { type: String, required: false },
|
|
24
|
+
avatar: { type: Object, required: false },
|
|
25
|
+
leading: { type: Boolean, required: false },
|
|
26
|
+
leadingIcon: { type: String, required: false },
|
|
27
|
+
trailing: { type: Boolean, required: false },
|
|
28
|
+
trailingIcon: { type: String, required: false }
|
|
29
|
+
});
|
|
30
|
+
const slots = defineSlots();
|
|
31
|
+
const appConfig = useAppConfig();
|
|
32
|
+
const { orientation, size: buttonGroupSize } = useButtonGroup(props);
|
|
33
|
+
const { isLeading, isTrailing, leadingIconName, trailingIconName } = useComponentIcons(props);
|
|
34
|
+
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.badge || {} })({
|
|
35
|
+
color: props.color,
|
|
36
|
+
variant: props.variant,
|
|
37
|
+
size: buttonGroupSize.value || props.size,
|
|
38
|
+
square: props.square || !slots.default && !props.label,
|
|
39
|
+
buttonGroup: orientation.value
|
|
40
|
+
}));
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
<template>
|
|
44
|
+
<Primitive :as="as" :class="ui.base({ class: [props.ui?.base, props.class] })">
|
|
45
|
+
<slot name="leading">
|
|
46
|
+
<UIcon v-if="isLeading && leadingIconName" :name="leadingIconName" :class="ui.leadingIcon({ class: props.ui?.leadingIcon })" />
|
|
47
|
+
<UAvatar v-else-if="!!avatar" :size="props.ui?.leadingAvatarSize || ui.leadingAvatarSize()" v-bind="avatar" :class="ui.leadingAvatar({ class: props.ui?.leadingAvatar })" />
|
|
48
|
+
</slot>
|
|
49
|
+
|
|
50
|
+
<slot>
|
|
51
|
+
<span v-if="label !== void 0 && label !== null" :class="ui.label({ class: props.ui?.label })">
|
|
52
|
+
{{ label }}
|
|
53
|
+
</span>
|
|
54
|
+
</slot>
|
|
55
|
+
|
|
56
|
+
<slot name="trailing">
|
|
57
|
+
<UIcon v-if="isTrailing && trailingIconName" :name="trailingIconName" :class="ui.trailingIcon({ class: props.ui?.trailingIcon })" />
|
|
58
|
+
</slot>
|
|
59
|
+
</Primitive>
|
|
60
|
+
</template>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
2
|
+
import theme from '#build/ui/badge';
|
|
3
|
+
import type { UseComponentIconsProps } from '../composables/useComponentIcons';
|
|
4
|
+
import type { ComponentConfig } from '../types/utils';
|
|
5
|
+
type Badge = ComponentConfig<typeof theme, AppConfig, 'badge'>;
|
|
6
|
+
export interface BadgeProps extends Omit<UseComponentIconsProps, 'loading' | 'loadingIcon'> {
|
|
7
|
+
/**
|
|
8
|
+
* The element or component this component should render as.
|
|
9
|
+
* @defaultValue 'span'
|
|
10
|
+
*/
|
|
11
|
+
as?: any;
|
|
12
|
+
label?: string | number;
|
|
13
|
+
/**
|
|
14
|
+
* @defaultValue 'primary'
|
|
15
|
+
*/
|
|
16
|
+
color?: Badge['variants']['color'];
|
|
17
|
+
/**
|
|
18
|
+
* @defaultValue 'solid'
|
|
19
|
+
*/
|
|
20
|
+
variant?: Badge['variants']['variant'];
|
|
21
|
+
/**
|
|
22
|
+
* @defaultValue 'md'
|
|
23
|
+
*/
|
|
24
|
+
size?: Badge['variants']['size'];
|
|
25
|
+
/** Render the badge with equal padding on all sides. */
|
|
26
|
+
square?: boolean;
|
|
27
|
+
class?: any;
|
|
28
|
+
ui?: Badge['slots'];
|
|
29
|
+
}
|
|
30
|
+
export interface BadgeSlots {
|
|
31
|
+
leading(props?: {}): any;
|
|
32
|
+
default(props?: {}): any;
|
|
33
|
+
trailing(props?: {}): any;
|
|
34
|
+
}
|
|
35
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<BadgeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BadgeProps> & Readonly<{}>, {
|
|
36
|
+
as: any;
|
|
37
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, BadgeSlots>;
|
|
38
|
+
export default _default;
|
|
39
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
40
|
+
new (): {
|
|
41
|
+
$slots: S;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/breadcrumb";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { computed } from "vue";
|
|
7
|
+
import { Primitive } from "reka-ui";
|
|
8
|
+
import { useAppConfig } from "#imports";
|
|
9
|
+
import { useLocale } from "../composables/useLocale";
|
|
10
|
+
import { get } from "../utils";
|
|
11
|
+
import { tv } from "../utils/tv";
|
|
12
|
+
import { pickLinkProps } from "../utils/link";
|
|
13
|
+
import UIcon from "./Icon.vue";
|
|
14
|
+
import UAvatar from "./Avatar.vue";
|
|
15
|
+
import ULinkBase from "./LinkBase.vue";
|
|
16
|
+
import ULink from "./Link.vue";
|
|
17
|
+
const props = defineProps({
|
|
18
|
+
as: { type: null, required: false, default: "nav" },
|
|
19
|
+
items: { type: Array, required: false },
|
|
20
|
+
separatorIcon: { type: String, required: false },
|
|
21
|
+
labelKey: { type: String, required: false, default: "label" },
|
|
22
|
+
class: { type: null, required: false },
|
|
23
|
+
ui: { type: null, required: false }
|
|
24
|
+
});
|
|
25
|
+
const slots = defineSlots();
|
|
26
|
+
const { dir } = useLocale();
|
|
27
|
+
const appConfig = useAppConfig();
|
|
28
|
+
const separatorIcon = computed(() => props.separatorIcon || (dir.value === "rtl" ? appConfig.ui.icons.chevronLeft : appConfig.ui.icons.chevronRight));
|
|
29
|
+
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.breadcrumb || {} })());
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<template>
|
|
33
|
+
<Primitive :as="as" aria-label="breadcrumb" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
34
|
+
<ol :class="ui.list({ class: props.ui?.list })">
|
|
35
|
+
<template v-for="(item, index) in items" :key="index">
|
|
36
|
+
<li :class="ui.item({ class: [props.ui?.item, item.ui?.item] })">
|
|
37
|
+
<ULink v-slot="{ active, ...slotProps }" v-bind="pickLinkProps(item)" custom>
|
|
38
|
+
<ULinkBase v-bind="slotProps" as="span" :aria-current="active && index === items.length - 1 ? 'page' : void 0" :class="ui.link({ class: [props.ui?.link, item.ui?.link, item.class], active: index === items.length - 1, disabled: !!item.disabled, to: !!item.to })">
|
|
39
|
+
<slot :name="item.slot || 'item'" :item="item" :index="index">
|
|
40
|
+
<slot :name="item.slot ? `${item.slot}-leading` : 'item-leading'" :item="item" :active="index === items.length - 1" :index="index">
|
|
41
|
+
<UIcon v-if="item.icon" :name="item.icon" :class="ui.linkLeadingIcon({ class: [props.ui?.linkLeadingIcon, item.ui?.linkLeadingIcon], active: index === items.length - 1 })" />
|
|
42
|
+
<UAvatar v-else-if="item.avatar" :size="props.ui?.linkLeadingAvatarSize || ui.linkLeadingAvatarSize()" v-bind="item.avatar" :class="ui.linkLeadingAvatar({ class: [props.ui?.linkLeadingAvatar, item.ui?.linkLeadingAvatar], active: index === items.length - 1 })" />
|
|
43
|
+
</slot>
|
|
44
|
+
|
|
45
|
+
<span v-if="get(item, props.labelKey) || !!slots[item.slot ? `${item.slot}-label` : 'item-label']" :class="ui.linkLabel({ class: [props.ui?.linkLabel, item.ui?.linkLabel] })">
|
|
46
|
+
<slot :name="item.slot ? `${item.slot}-label` : 'item-label'" :item="item" :active="index === items.length - 1" :index="index">
|
|
47
|
+
{{ get(item, props.labelKey) }}
|
|
48
|
+
</slot>
|
|
49
|
+
</span>
|
|
50
|
+
|
|
51
|
+
<slot :name="item.slot ? `${item.slot}-trailing` : 'item-trailing'" :item="item" :active="index === items.length - 1" :index="index" />
|
|
52
|
+
</slot>
|
|
53
|
+
</ULinkBase>
|
|
54
|
+
</ULink>
|
|
55
|
+
</li>
|
|
56
|
+
|
|
57
|
+
<li v-if="index < items.length - 1" role="presentation" aria-hidden="true" :class="ui.separator({ class: [props.ui?.separator, item.ui?.separator] })">
|
|
58
|
+
<slot name="separator">
|
|
59
|
+
<UIcon :name="separatorIcon" :class="ui.separatorIcon({ class: [props.ui?.separatorIcon, item.ui?.separatorIcon] })" />
|
|
60
|
+
</slot>
|
|
61
|
+
</li>
|
|
62
|
+
</template>
|
|
63
|
+
</ol>
|
|
64
|
+
</Primitive>
|
|
65
|
+
</template>
|