@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,64 @@
|
|
|
1
|
+
import { Popover } from 'reka-ui/namespaced';
|
|
2
|
+
import type { PopoverRootProps, HoverCardRootProps, PopoverRootEmits, PopoverContentProps, PopoverContentEmits, PopoverArrowProps } from 'reka-ui';
|
|
3
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
4
|
+
import theme from '#build/ui/popover';
|
|
5
|
+
import type { EmitsToProps, ComponentConfig } from '../types/utils';
|
|
6
|
+
type Popover = ComponentConfig<typeof theme, AppConfig, 'popover'>;
|
|
7
|
+
export interface PopoverProps extends PopoverRootProps, Pick<HoverCardRootProps, 'openDelay' | 'closeDelay'> {
|
|
8
|
+
/**
|
|
9
|
+
* The display mode of the popover.
|
|
10
|
+
* @defaultValue 'click'
|
|
11
|
+
*/
|
|
12
|
+
mode?: 'click' | 'hover';
|
|
13
|
+
/**
|
|
14
|
+
* The content of the popover.
|
|
15
|
+
* @defaultValue { side: 'bottom', sideOffset: 8, collisionPadding: 8 }
|
|
16
|
+
*/
|
|
17
|
+
content?: Omit<PopoverContentProps, 'as' | 'asChild' | 'forceMount'> & Partial<EmitsToProps<PopoverContentEmits>>;
|
|
18
|
+
/**
|
|
19
|
+
* Display an arrow alongside the popover.
|
|
20
|
+
* @defaultValue false
|
|
21
|
+
*/
|
|
22
|
+
arrow?: boolean | Omit<PopoverArrowProps, 'as' | 'asChild'>;
|
|
23
|
+
/**
|
|
24
|
+
* Render the popover in a portal.
|
|
25
|
+
* @defaultValue true
|
|
26
|
+
*/
|
|
27
|
+
portal?: boolean | string | HTMLElement;
|
|
28
|
+
/**
|
|
29
|
+
* When `false`, the popover will not close when clicking outside or pressing escape.
|
|
30
|
+
* @defaultValue true
|
|
31
|
+
*/
|
|
32
|
+
dismissible?: boolean;
|
|
33
|
+
class?: any;
|
|
34
|
+
ui?: Popover['slots'];
|
|
35
|
+
}
|
|
36
|
+
export interface PopoverEmits extends PopoverRootEmits {
|
|
37
|
+
'close:prevent': [];
|
|
38
|
+
}
|
|
39
|
+
export interface PopoverSlots {
|
|
40
|
+
default(props: {
|
|
41
|
+
open: boolean;
|
|
42
|
+
}): any;
|
|
43
|
+
content(props?: {}): any;
|
|
44
|
+
anchor(props?: {}): any;
|
|
45
|
+
}
|
|
46
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<PopoverProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
47
|
+
"update:open": (value: boolean) => any;
|
|
48
|
+
"close:prevent": () => any;
|
|
49
|
+
}, string, import("vue").PublicProps, Readonly<PopoverProps> & Readonly<{
|
|
50
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
51
|
+
"onClose:prevent"?: (() => any) | undefined;
|
|
52
|
+
}>, {
|
|
53
|
+
mode: "click" | "hover";
|
|
54
|
+
portal: boolean | string | HTMLElement;
|
|
55
|
+
dismissible: boolean;
|
|
56
|
+
openDelay: number;
|
|
57
|
+
closeDelay: number;
|
|
58
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, PopoverSlots>;
|
|
59
|
+
export default _default;
|
|
60
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
61
|
+
new (): {
|
|
62
|
+
$slots: S;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/progress";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { computed } from "vue";
|
|
7
|
+
import { Primitive, ProgressRoot, ProgressIndicator, useForwardPropsEmits } from "reka-ui";
|
|
8
|
+
import { reactivePick } from "@vueuse/core";
|
|
9
|
+
import { useAppConfig } from "#imports";
|
|
10
|
+
import { useLocale } from "../composables/useLocale";
|
|
11
|
+
import { tv } from "../utils/tv";
|
|
12
|
+
const props = defineProps({
|
|
13
|
+
as: { type: null, required: false },
|
|
14
|
+
max: { type: [Number, Array], required: false },
|
|
15
|
+
status: { type: Boolean, required: false },
|
|
16
|
+
inverted: { type: Boolean, required: false, default: false },
|
|
17
|
+
size: { type: null, required: false },
|
|
18
|
+
color: { type: null, required: false },
|
|
19
|
+
orientation: { type: null, required: false, default: "horizontal" },
|
|
20
|
+
animation: { type: null, required: false },
|
|
21
|
+
class: { type: null, required: false },
|
|
22
|
+
ui: { type: null, required: false },
|
|
23
|
+
getValueLabel: { type: Function, required: false },
|
|
24
|
+
getValueText: { type: Function, required: false },
|
|
25
|
+
modelValue: { type: [Number, null], required: false, default: null }
|
|
26
|
+
});
|
|
27
|
+
const emits = defineEmits(["update:modelValue", "update:max"]);
|
|
28
|
+
const slots = defineSlots();
|
|
29
|
+
const { dir } = useLocale();
|
|
30
|
+
const appConfig = useAppConfig();
|
|
31
|
+
const rootProps = useForwardPropsEmits(reactivePick(props, "getValueLabel", "getValueText", "modelValue"), emits);
|
|
32
|
+
const isIndeterminate = computed(() => rootProps.value.modelValue === null);
|
|
33
|
+
const hasSteps = computed(() => Array.isArray(props.max));
|
|
34
|
+
const realMax = computed(() => {
|
|
35
|
+
if (isIndeterminate.value || !props.max) {
|
|
36
|
+
return void 0;
|
|
37
|
+
}
|
|
38
|
+
if (Array.isArray(props.max)) {
|
|
39
|
+
return props.max.length - 1;
|
|
40
|
+
}
|
|
41
|
+
return Number(props.max);
|
|
42
|
+
});
|
|
43
|
+
const percent = computed(() => {
|
|
44
|
+
if (isIndeterminate.value) {
|
|
45
|
+
return void 0;
|
|
46
|
+
}
|
|
47
|
+
switch (true) {
|
|
48
|
+
case rootProps.value.modelValue < 0:
|
|
49
|
+
return 0;
|
|
50
|
+
case rootProps.value.modelValue > (realMax.value ?? 100):
|
|
51
|
+
return 100;
|
|
52
|
+
default:
|
|
53
|
+
return Math.round(rootProps.value.modelValue / (realMax.value ?? 100) * 100);
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
const indicatorStyle = computed(() => {
|
|
57
|
+
if (percent.value === void 0) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (props.orientation === "vertical") {
|
|
61
|
+
return {
|
|
62
|
+
transform: `translateY(${props.inverted ? "" : "-"}${100 - percent.value}%)`
|
|
63
|
+
};
|
|
64
|
+
} else {
|
|
65
|
+
if (dir.value === "rtl") {
|
|
66
|
+
return {
|
|
67
|
+
transform: `translateX(${props.inverted ? "-" : ""}${100 - percent.value}%)`
|
|
68
|
+
};
|
|
69
|
+
} else {
|
|
70
|
+
return {
|
|
71
|
+
transform: `translateX(${props.inverted ? "" : "-"}${100 - percent.value}%)`
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
const statusStyle = computed(() => {
|
|
77
|
+
return {
|
|
78
|
+
[props.orientation === "vertical" ? "height" : "width"]: percent.value ? `${percent.value}%` : "fit-content"
|
|
79
|
+
};
|
|
80
|
+
});
|
|
81
|
+
function isActive(index) {
|
|
82
|
+
return index === Number(props.modelValue);
|
|
83
|
+
}
|
|
84
|
+
function isFirst(index) {
|
|
85
|
+
return index === 0;
|
|
86
|
+
}
|
|
87
|
+
function isLast(index) {
|
|
88
|
+
return index === realMax.value;
|
|
89
|
+
}
|
|
90
|
+
function stepVariant(index) {
|
|
91
|
+
index = Number(index);
|
|
92
|
+
if (isActive(index) && !isFirst(index)) {
|
|
93
|
+
return "active";
|
|
94
|
+
}
|
|
95
|
+
if (isFirst(index) && isActive(index)) {
|
|
96
|
+
return "first";
|
|
97
|
+
}
|
|
98
|
+
if (isLast(index) && isActive(index)) {
|
|
99
|
+
return "last";
|
|
100
|
+
}
|
|
101
|
+
return "other";
|
|
102
|
+
}
|
|
103
|
+
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.progress || {} })({
|
|
104
|
+
animation: props.animation,
|
|
105
|
+
size: props.size,
|
|
106
|
+
color: props.color,
|
|
107
|
+
orientation: props.orientation,
|
|
108
|
+
inverted: props.inverted
|
|
109
|
+
}));
|
|
110
|
+
</script>
|
|
111
|
+
|
|
112
|
+
<template>
|
|
113
|
+
<Primitive :as="as" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
114
|
+
<div v-if="!isIndeterminate && (status || !!slots.status)" :class="ui.status({ class: props.ui?.status })" :style="statusStyle">
|
|
115
|
+
<slot name="status" :percent="percent">
|
|
116
|
+
{{ percent }}%
|
|
117
|
+
</slot>
|
|
118
|
+
</div>
|
|
119
|
+
|
|
120
|
+
<ProgressRoot v-bind="rootProps" :max="realMax" :class="ui.base({ class: props.ui?.base })" style="transform: translateZ(0)">
|
|
121
|
+
<ProgressIndicator :class="ui.indicator({ class: props.ui?.indicator })" :style="indicatorStyle" />
|
|
122
|
+
</ProgressRoot>
|
|
123
|
+
|
|
124
|
+
<div v-if="hasSteps" :class="ui.steps({ class: props.ui?.steps })">
|
|
125
|
+
<div v-for="(step, index) in max" :key="index" :class="ui.step({ class: props.ui?.step, step: stepVariant(index) })">
|
|
126
|
+
<slot :name="`step-${index}`" :step="step">
|
|
127
|
+
{{ step }}
|
|
128
|
+
</slot>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
</Primitive>
|
|
132
|
+
</template>
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { ProgressRootProps, ProgressRootEmits } from 'reka-ui';
|
|
2
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
3
|
+
import theme from '#build/ui/progress';
|
|
4
|
+
import type { ComponentConfig } from '../types/utils';
|
|
5
|
+
type Progress = ComponentConfig<typeof theme, AppConfig, 'progress'>;
|
|
6
|
+
export interface ProgressProps extends Pick<ProgressRootProps, 'getValueLabel' | 'getValueText' | 'modelValue'> {
|
|
7
|
+
/**
|
|
8
|
+
* The element or component this component should render as.
|
|
9
|
+
* @defaultValue 'div'
|
|
10
|
+
*/
|
|
11
|
+
as?: any;
|
|
12
|
+
/** The maximum progress value. */
|
|
13
|
+
max?: number | Array<any>;
|
|
14
|
+
/** Display the current progress value. */
|
|
15
|
+
status?: boolean;
|
|
16
|
+
/** Whether the progress is visually inverted. */
|
|
17
|
+
inverted?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* @defaultValue 'md'
|
|
20
|
+
*/
|
|
21
|
+
size?: Progress['variants']['size'];
|
|
22
|
+
/**
|
|
23
|
+
* @defaultValue 'primary'
|
|
24
|
+
*/
|
|
25
|
+
color?: Progress['variants']['color'];
|
|
26
|
+
/**
|
|
27
|
+
* The orientation of the progress bar.
|
|
28
|
+
* @defaultValue 'horizontal'
|
|
29
|
+
*/
|
|
30
|
+
orientation?: Progress['variants']['orientation'];
|
|
31
|
+
/**
|
|
32
|
+
* The animation of the progress bar.
|
|
33
|
+
* @defaultValue 'carousel'
|
|
34
|
+
*/
|
|
35
|
+
animation?: Progress['variants']['animation'];
|
|
36
|
+
class?: any;
|
|
37
|
+
ui?: Progress['slots'];
|
|
38
|
+
}
|
|
39
|
+
export interface ProgressEmits extends ProgressRootEmits {
|
|
40
|
+
}
|
|
41
|
+
export type ProgressSlots = {
|
|
42
|
+
status(props: {
|
|
43
|
+
percent?: number;
|
|
44
|
+
}): any;
|
|
45
|
+
} & {
|
|
46
|
+
[key: string]: (props: {
|
|
47
|
+
step: number;
|
|
48
|
+
}) => any;
|
|
49
|
+
};
|
|
50
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ProgressProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
51
|
+
"update:modelValue": (value: string[] | undefined) => any;
|
|
52
|
+
"update:max": (value: number) => any;
|
|
53
|
+
}, string, import("vue").PublicProps, Readonly<ProgressProps> & Readonly<{
|
|
54
|
+
"onUpdate:modelValue"?: ((value: string[] | undefined) => any) | undefined;
|
|
55
|
+
"onUpdate:max"?: ((value: number) => any) | undefined;
|
|
56
|
+
}>, {
|
|
57
|
+
orientation: Progress["variants"]["orientation"];
|
|
58
|
+
modelValue: number | null;
|
|
59
|
+
inverted: boolean;
|
|
60
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ProgressSlots>;
|
|
61
|
+
export default _default;
|
|
62
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
63
|
+
new (): {
|
|
64
|
+
$slots: S;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/radio-group";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { computed, useId } from "vue";
|
|
7
|
+
import { RadioGroupRoot, RadioGroupItem, RadioGroupIndicator, Label, useForwardPropsEmits } from "reka-ui";
|
|
8
|
+
import { reactivePick } from "@vueuse/core";
|
|
9
|
+
import { useAppConfig } from "#imports";
|
|
10
|
+
import { useFormField } from "../composables/useFormField";
|
|
11
|
+
import { get } from "../utils";
|
|
12
|
+
import { tv } from "../utils/tv";
|
|
13
|
+
const props = defineProps({
|
|
14
|
+
as: { type: null, required: false },
|
|
15
|
+
legend: { type: String, required: false },
|
|
16
|
+
valueKey: { type: String, required: false, default: "value" },
|
|
17
|
+
labelKey: { type: String, required: false, default: "label" },
|
|
18
|
+
descriptionKey: { type: String, required: false, default: "description" },
|
|
19
|
+
items: { type: Array, required: false },
|
|
20
|
+
size: { type: null, required: false },
|
|
21
|
+
variant: { type: null, required: false },
|
|
22
|
+
color: { type: null, required: false },
|
|
23
|
+
orientation: { type: null, required: false, default: "vertical" },
|
|
24
|
+
indicator: { type: null, required: false },
|
|
25
|
+
class: { type: null, required: false },
|
|
26
|
+
ui: { type: null, required: false },
|
|
27
|
+
defaultValue: { type: null, required: false },
|
|
28
|
+
disabled: { type: Boolean, required: false },
|
|
29
|
+
loop: { type: Boolean, required: false },
|
|
30
|
+
modelValue: { type: null, required: false },
|
|
31
|
+
name: { type: String, required: false },
|
|
32
|
+
required: { type: Boolean, required: false }
|
|
33
|
+
});
|
|
34
|
+
const emits = defineEmits(["update:modelValue", "change"]);
|
|
35
|
+
const slots = defineSlots();
|
|
36
|
+
const appConfig = useAppConfig();
|
|
37
|
+
const rootProps = useForwardPropsEmits(reactivePick(props, "as", "modelValue", "defaultValue", "orientation", "loop", "required"), emits);
|
|
38
|
+
const { emitFormChange, emitFormInput, color, name, size, id: _id, disabled, ariaAttrs } = useFormField(props, { bind: false });
|
|
39
|
+
const id = _id.value ?? useId();
|
|
40
|
+
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.radioGroup || {} })({
|
|
41
|
+
size: size.value,
|
|
42
|
+
color: color.value,
|
|
43
|
+
disabled: disabled.value,
|
|
44
|
+
required: props.required,
|
|
45
|
+
orientation: props.orientation,
|
|
46
|
+
variant: props.variant,
|
|
47
|
+
indicator: props.indicator
|
|
48
|
+
}));
|
|
49
|
+
function normalizeItem(item) {
|
|
50
|
+
if (item === null) {
|
|
51
|
+
return {
|
|
52
|
+
id: `${id}:null`,
|
|
53
|
+
value: void 0,
|
|
54
|
+
label: void 0
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
if (typeof item === "string" || typeof item === "number") {
|
|
58
|
+
return {
|
|
59
|
+
id: `${id}:${item}`,
|
|
60
|
+
value: String(item),
|
|
61
|
+
label: String(item)
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
const value = get(item, props.valueKey);
|
|
65
|
+
const label = get(item, props.labelKey);
|
|
66
|
+
const description = get(item, props.descriptionKey);
|
|
67
|
+
return {
|
|
68
|
+
...item,
|
|
69
|
+
value,
|
|
70
|
+
label,
|
|
71
|
+
description,
|
|
72
|
+
id: `${id}:${value}`
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
const normalizedItems = computed(() => {
|
|
76
|
+
if (!props.items) {
|
|
77
|
+
return [];
|
|
78
|
+
}
|
|
79
|
+
return props.items.map(normalizeItem);
|
|
80
|
+
});
|
|
81
|
+
function onUpdate(value) {
|
|
82
|
+
const event = new Event("change", { target: { value } });
|
|
83
|
+
emits("change", event);
|
|
84
|
+
emitFormChange();
|
|
85
|
+
emitFormInput();
|
|
86
|
+
}
|
|
87
|
+
</script>
|
|
88
|
+
|
|
89
|
+
<template>
|
|
90
|
+
<RadioGroupRoot
|
|
91
|
+
:id="id"
|
|
92
|
+
v-slot="{ modelValue }"
|
|
93
|
+
v-bind="rootProps"
|
|
94
|
+
:name="name"
|
|
95
|
+
:disabled="disabled"
|
|
96
|
+
:class="ui.root({ class: [props.ui?.root, props.class] })"
|
|
97
|
+
@update:model-value="onUpdate"
|
|
98
|
+
>
|
|
99
|
+
<fieldset :class="ui.fieldset({ class: props.ui?.fieldset })" v-bind="ariaAttrs">
|
|
100
|
+
<legend v-if="legend || !!slots.legend" :class="ui.legend({ class: props.ui?.legend })">
|
|
101
|
+
<slot name="legend">
|
|
102
|
+
{{ legend }}
|
|
103
|
+
</slot>
|
|
104
|
+
</legend>
|
|
105
|
+
|
|
106
|
+
<component :is="!variant || variant === 'list' ? 'div' : Label" v-for="item in normalizedItems" :key="item.value" :class="ui.item({ class: [props.ui?.item, item.ui?.item, item.class] })">
|
|
107
|
+
<div :class="ui.container({ class: [props.ui?.container, item.ui?.container] })">
|
|
108
|
+
<RadioGroupItem
|
|
109
|
+
:id="item.id"
|
|
110
|
+
:value="item.value"
|
|
111
|
+
:disabled="item.disabled"
|
|
112
|
+
:class="ui.base({ class: [props.ui?.base, item.ui?.base], disabled: item.disabled })"
|
|
113
|
+
>
|
|
114
|
+
<RadioGroupIndicator :class="ui.indicator({ class: [props.ui?.indicator, item.ui?.indicator] })" />
|
|
115
|
+
</RadioGroupItem>
|
|
116
|
+
</div>
|
|
117
|
+
|
|
118
|
+
<div v-if="item.label || !!slots.label || (item.description || !!slots.description)" :class="ui.wrapper({ class: [props.ui?.wrapper, item.ui?.wrapper] })">
|
|
119
|
+
<component :is="!variant || variant === 'list' ? Label : 'p'" v-if="item.label || !!slots.label" :for="item.id" :class="ui.label({ class: [props.ui?.label, item.ui?.label] })">
|
|
120
|
+
<slot name="label" :item="item" :model-value="modelValue">
|
|
121
|
+
{{ item.label }}
|
|
122
|
+
</slot>
|
|
123
|
+
</component>
|
|
124
|
+
<p v-if="item.description || !!slots.description" :class="ui.description({ class: [props.ui?.description, item.ui?.description] })">
|
|
125
|
+
<slot name="description" :item="item" :model-value="modelValue">
|
|
126
|
+
{{ item.description }}
|
|
127
|
+
</slot>
|
|
128
|
+
</p>
|
|
129
|
+
</div>
|
|
130
|
+
</component>
|
|
131
|
+
</fieldset>
|
|
132
|
+
</RadioGroupRoot>
|
|
133
|
+
</template>
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import type { RadioGroupRootProps, RadioGroupRootEmits } from 'reka-ui';
|
|
2
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
3
|
+
import theme from '#build/ui/radio-group';
|
|
4
|
+
import type { AcceptableValue, ComponentConfig } from '../types/utils';
|
|
5
|
+
type RadioGroup = ComponentConfig<typeof theme, AppConfig, 'radioGroup'>;
|
|
6
|
+
export type RadioGroupValue = AcceptableValue;
|
|
7
|
+
export type RadioGroupItem = {
|
|
8
|
+
label?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
value?: RadioGroupValue;
|
|
12
|
+
class?: any;
|
|
13
|
+
ui?: Pick<RadioGroup['slots'], 'item' | 'container' | 'base' | 'indicator' | 'wrapper' | 'label' | 'description'>;
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
} | RadioGroupValue;
|
|
16
|
+
export interface RadioGroupProps<T extends RadioGroupItem = RadioGroupItem> extends Pick<RadioGroupRootProps, 'defaultValue' | 'disabled' | 'loop' | 'modelValue' | 'name' | 'required'> {
|
|
17
|
+
/**
|
|
18
|
+
* The element or component this component should render as.
|
|
19
|
+
* @defaultValue 'div'
|
|
20
|
+
*/
|
|
21
|
+
as?: any;
|
|
22
|
+
legend?: string;
|
|
23
|
+
/**
|
|
24
|
+
* When `items` is an array of objects, select the field to use as the value.
|
|
25
|
+
* @defaultValue 'value'
|
|
26
|
+
*/
|
|
27
|
+
valueKey?: string;
|
|
28
|
+
/**
|
|
29
|
+
* When `items` is an array of objects, select the field to use as the label.
|
|
30
|
+
* @defaultValue 'label'
|
|
31
|
+
*/
|
|
32
|
+
labelKey?: string;
|
|
33
|
+
/**
|
|
34
|
+
* When `items` is an array of objects, select the field to use as the description.
|
|
35
|
+
* @defaultValue 'description'
|
|
36
|
+
*/
|
|
37
|
+
descriptionKey?: string;
|
|
38
|
+
items?: T[];
|
|
39
|
+
/**
|
|
40
|
+
* @defaultValue 'md'
|
|
41
|
+
*/
|
|
42
|
+
size?: RadioGroup['variants']['size'];
|
|
43
|
+
/**
|
|
44
|
+
* @defaultValue 'list'
|
|
45
|
+
*/
|
|
46
|
+
variant?: RadioGroup['variants']['variant'];
|
|
47
|
+
/**
|
|
48
|
+
* @defaultValue 'primary'
|
|
49
|
+
*/
|
|
50
|
+
color?: RadioGroup['variants']['color'];
|
|
51
|
+
/**
|
|
52
|
+
* The orientation the radio buttons are laid out.
|
|
53
|
+
* @defaultValue 'vertical'
|
|
54
|
+
*/
|
|
55
|
+
orientation?: RadioGroupRootProps['orientation'];
|
|
56
|
+
/**
|
|
57
|
+
* Position of the indicator.
|
|
58
|
+
* @defaultValue 'start'
|
|
59
|
+
*/
|
|
60
|
+
indicator?: RadioGroup['variants']['indicator'];
|
|
61
|
+
class?: any;
|
|
62
|
+
ui?: RadioGroup['slots'];
|
|
63
|
+
}
|
|
64
|
+
export type RadioGroupEmits = RadioGroupRootEmits & {
|
|
65
|
+
change: [payload: Event];
|
|
66
|
+
};
|
|
67
|
+
type SlotProps<T extends RadioGroupItem> = (props: {
|
|
68
|
+
item: T & {
|
|
69
|
+
id: string;
|
|
70
|
+
};
|
|
71
|
+
modelValue?: RadioGroupValue;
|
|
72
|
+
}) => any;
|
|
73
|
+
export interface RadioGroupSlots<T extends RadioGroupItem = RadioGroupItem> {
|
|
74
|
+
legend(props?: {}): any;
|
|
75
|
+
label: SlotProps<T>;
|
|
76
|
+
description: SlotProps<T>;
|
|
77
|
+
}
|
|
78
|
+
declare const _default: <T extends RadioGroupItem>(__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<{
|
|
79
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
80
|
+
readonly onChange?: ((payload: Event) => any) | undefined;
|
|
81
|
+
readonly "onUpdate:modelValue"?: ((payload: string) => any) | undefined;
|
|
82
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onChange" | "onUpdate:modelValue"> & RadioGroupProps<T> & Partial<{}>> & import("vue").PublicProps;
|
|
83
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
84
|
+
attrs: any;
|
|
85
|
+
slots: RadioGroupSlots<T>;
|
|
86
|
+
emit: ((evt: "change", payload: Event) => void) & ((evt: "update:modelValue", payload: string) => void);
|
|
87
|
+
}>) => import("vue").VNode & {
|
|
88
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
89
|
+
};
|
|
90
|
+
export default _default;
|
|
91
|
+
type __VLS_PrettifyLocal<T> = {
|
|
92
|
+
[K in keyof T]: T[K];
|
|
93
|
+
} & {};
|