@nuxt/ui 4.4.0 → 4.5.0
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/README.md +4 -1
- package/cli/package.json +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +3 -3
- package/dist/runtime/components/Accordion.vue +12 -10
- package/dist/runtime/components/Alert.vue +12 -10
- package/dist/runtime/components/AuthForm.vue +19 -17
- package/dist/runtime/components/Avatar.vue +7 -5
- package/dist/runtime/components/AvatarGroup.vue +6 -4
- package/dist/runtime/components/Badge.vue +8 -6
- package/dist/runtime/components/Banner.vue +12 -10
- package/dist/runtime/components/BlogPost.d.vue.ts +3 -2
- package/dist/runtime/components/BlogPost.vue +16 -14
- package/dist/runtime/components/BlogPost.vue.d.ts +3 -2
- package/dist/runtime/components/BlogPosts.d.vue.ts +3 -0
- package/dist/runtime/components/BlogPosts.vue +5 -2
- package/dist/runtime/components/BlogPosts.vue.d.ts +3 -0
- package/dist/runtime/components/Breadcrumb.vue +12 -10
- package/dist/runtime/components/Button.vue +8 -6
- package/dist/runtime/components/Calendar.vue +15 -13
- package/dist/runtime/components/Card.vue +7 -5
- package/dist/runtime/components/Carousel.vue +13 -11
- package/dist/runtime/components/ChangelogVersion.d.vue.ts +2 -1
- package/dist/runtime/components/ChangelogVersion.vue +19 -17
- package/dist/runtime/components/ChangelogVersion.vue.d.ts +2 -1
- package/dist/runtime/components/ChangelogVersions.vue +7 -5
- package/dist/runtime/components/ChatMessage.vue +10 -8
- package/dist/runtime/components/ChatMessages.vue +16 -11
- package/dist/runtime/components/ChatPalette.vue +6 -4
- package/dist/runtime/components/ChatPrompt.vue +9 -6
- package/dist/runtime/components/ChatPromptSubmit.vue +5 -3
- package/dist/runtime/components/Checkbox.vue +19 -12
- package/dist/runtime/components/CheckboxGroup.d.vue.ts +5 -5
- package/dist/runtime/components/CheckboxGroup.vue +9 -7
- package/dist/runtime/components/CheckboxGroup.vue.d.ts +5 -5
- package/dist/runtime/components/Chip.vue +5 -3
- package/dist/runtime/components/Collapsible.vue +5 -3
- package/dist/runtime/components/ColorPicker.vue +10 -8
- package/dist/runtime/components/CommandPalette.d.vue.ts +4 -4
- package/dist/runtime/components/CommandPalette.vue +33 -31
- package/dist/runtime/components/CommandPalette.vue.d.ts +4 -4
- package/dist/runtime/components/Container.d.vue.ts +3 -0
- package/dist/runtime/components/Container.vue +5 -2
- package/dist/runtime/components/Container.vue.d.ts +3 -0
- package/dist/runtime/components/ContextMenu.vue +5 -3
- package/dist/runtime/components/ContextMenuContent.vue +1 -0
- package/dist/runtime/components/DashboardGroup.d.vue.ts +3 -0
- package/dist/runtime/components/DashboardGroup.vue +4 -1
- package/dist/runtime/components/DashboardGroup.vue.d.ts +3 -0
- package/dist/runtime/components/DashboardNavbar.vue +10 -8
- package/dist/runtime/components/DashboardPanel.vue +6 -4
- package/dist/runtime/components/DashboardResizeHandle.d.vue.ts +3 -0
- package/dist/runtime/components/DashboardResizeHandle.vue +5 -2
- package/dist/runtime/components/DashboardResizeHandle.vue.d.ts +3 -0
- package/dist/runtime/components/DashboardSearch.vue +6 -3
- package/dist/runtime/components/DashboardSearchButton.d.vue.ts +1 -1
- package/dist/runtime/components/DashboardSearchButton.vue +6 -4
- package/dist/runtime/components/DashboardSearchButton.vue.d.ts +1 -1
- package/dist/runtime/components/DashboardSidebar.d.vue.ts +6 -1
- package/dist/runtime/components/DashboardSidebar.vue +16 -12
- package/dist/runtime/components/DashboardSidebar.vue.d.ts +6 -1
- package/dist/runtime/components/DashboardSidebarCollapse.d.vue.ts +3 -0
- package/dist/runtime/components/DashboardSidebarCollapse.vue +4 -2
- package/dist/runtime/components/DashboardSidebarCollapse.vue.d.ts +3 -0
- package/dist/runtime/components/DashboardSidebarToggle.d.vue.ts +3 -0
- package/dist/runtime/components/DashboardSidebarToggle.vue +4 -2
- package/dist/runtime/components/DashboardSidebarToggle.vue.d.ts +3 -0
- package/dist/runtime/components/DashboardToolbar.vue +6 -4
- package/dist/runtime/components/Drawer.d.vue.ts +1 -1
- package/dist/runtime/components/Drawer.vue +16 -11
- package/dist/runtime/components/Drawer.vue.d.ts +1 -1
- package/dist/runtime/components/DropdownMenu.vue +6 -4
- package/dist/runtime/components/DropdownMenuContent.vue +1 -0
- package/dist/runtime/components/Editor.d.vue.ts +2 -1
- package/dist/runtime/components/Editor.vue +16 -4
- package/dist/runtime/components/Editor.vue.d.ts +2 -1
- package/dist/runtime/components/EditorDragHandle.d.vue.ts +13 -1
- package/dist/runtime/components/EditorDragHandle.vue +17 -8
- package/dist/runtime/components/EditorDragHandle.vue.d.ts +13 -1
- package/dist/runtime/components/EditorEmojiMenu.vue +1 -1
- package/dist/runtime/components/EditorMentionMenu.d.vue.ts +1 -1
- package/dist/runtime/components/EditorMentionMenu.vue +5 -2
- package/dist/runtime/components/EditorMentionMenu.vue.d.ts +1 -1
- package/dist/runtime/components/EditorSuggestionMenu.vue +1 -1
- package/dist/runtime/components/EditorToolbar.vue +10 -7
- package/dist/runtime/components/Empty.vue +11 -9
- package/dist/runtime/components/Error.vue +8 -6
- package/dist/runtime/components/FieldGroup.d.vue.ts +3 -1
- package/dist/runtime/components/FieldGroup.vue +4 -2
- package/dist/runtime/components/FieldGroup.vue.d.ts +3 -1
- package/dist/runtime/components/FileUpload.d.vue.ts +1 -1
- package/dist/runtime/components/FileUpload.vue +18 -16
- package/dist/runtime/components/FileUpload.vue.d.ts +1 -1
- package/dist/runtime/components/Footer.vue +10 -8
- package/dist/runtime/components/FooterColumns.vue +14 -12
- package/dist/runtime/components/Form.d.vue.ts +3 -0
- package/dist/runtime/components/Form.vue +10 -2
- package/dist/runtime/components/Form.vue.d.ts +3 -0
- package/dist/runtime/components/FormField.vue +12 -10
- package/dist/runtime/components/Header.d.vue.ts +6 -1
- package/dist/runtime/components/Header.vue +16 -12
- package/dist/runtime/components/Header.vue.d.ts +6 -1
- package/dist/runtime/components/Input.d.vue.ts +53 -11
- package/dist/runtime/components/Input.vue +16 -12
- package/dist/runtime/components/Input.vue.d.ts +53 -11
- package/dist/runtime/components/InputDate.d.vue.ts +2 -0
- package/dist/runtime/components/InputDate.vue +18 -11
- package/dist/runtime/components/InputDate.vue.d.ts +2 -0
- package/dist/runtime/components/InputMenu.d.vue.ts +153 -25
- package/dist/runtime/components/InputMenu.vue +51 -58
- package/dist/runtime/components/InputMenu.vue.d.ts +153 -25
- package/dist/runtime/components/InputNumber.d.vue.ts +15 -8
- package/dist/runtime/components/InputNumber.vue +23 -14
- package/dist/runtime/components/InputNumber.vue.d.ts +15 -8
- package/dist/runtime/components/InputTags.d.vue.ts +2 -0
- package/dist/runtime/components/InputTags.vue +16 -12
- package/dist/runtime/components/InputTags.vue.d.ts +2 -0
- package/dist/runtime/components/InputTime.d.vue.ts +6 -4
- package/dist/runtime/components/InputTime.vue +18 -10
- package/dist/runtime/components/InputTime.vue.d.ts +6 -4
- package/dist/runtime/components/Kbd.d.vue.ts +3 -0
- package/dist/runtime/components/Kbd.vue +5 -2
- package/dist/runtime/components/Kbd.vue.d.ts +3 -0
- package/dist/runtime/components/Link.d.vue.ts +1 -1
- package/dist/runtime/components/Link.vue +7 -7
- package/dist/runtime/components/Link.vue.d.ts +1 -1
- package/dist/runtime/components/Main.d.vue.ts +3 -0
- package/dist/runtime/components/Main.vue +5 -2
- package/dist/runtime/components/Main.vue.d.ts +3 -0
- package/dist/runtime/components/Marquee.vue +5 -3
- package/dist/runtime/components/Modal.d.vue.ts +2 -2
- package/dist/runtime/components/Modal.vue +17 -24
- package/dist/runtime/components/Modal.vue.d.ts +2 -2
- package/dist/runtime/components/NavigationMenu.d.vue.ts +13 -6
- package/dist/runtime/components/NavigationMenu.vue +77 -53
- package/dist/runtime/components/NavigationMenu.vue.d.ts +13 -6
- package/dist/runtime/components/Page.vue +7 -5
- package/dist/runtime/components/PageAnchors.vue +11 -9
- package/dist/runtime/components/PageAside.vue +9 -7
- package/dist/runtime/components/PageBody.d.vue.ts +3 -0
- package/dist/runtime/components/PageBody.vue +5 -2
- package/dist/runtime/components/PageBody.vue.d.ts +3 -0
- package/dist/runtime/components/PageCTA.vue +12 -10
- package/dist/runtime/components/PageCard.vue +14 -12
- package/dist/runtime/components/PageColumns.d.vue.ts +3 -0
- package/dist/runtime/components/PageColumns.vue +5 -2
- package/dist/runtime/components/PageColumns.vue.d.ts +3 -0
- package/dist/runtime/components/PageFeature.vue +9 -7
- package/dist/runtime/components/PageGrid.d.vue.ts +3 -0
- package/dist/runtime/components/PageGrid.vue +5 -2
- package/dist/runtime/components/PageGrid.vue.d.ts +3 -0
- package/dist/runtime/components/PageHeader.vue +10 -8
- package/dist/runtime/components/PageHero.vue +13 -11
- package/dist/runtime/components/PageLinks.vue +11 -9
- package/dist/runtime/components/PageList.d.vue.ts +3 -0
- package/dist/runtime/components/PageList.vue +5 -2
- package/dist/runtime/components/PageList.vue.d.ts +3 -0
- package/dist/runtime/components/PageLogos.vue +9 -7
- package/dist/runtime/components/PageSection.d.vue.ts +1 -1
- package/dist/runtime/components/PageSection.vue +16 -14
- package/dist/runtime/components/PageSection.vue.d.ts +1 -1
- package/dist/runtime/components/Pagination.d.vue.ts +1 -1
- package/dist/runtime/components/Pagination.vue +11 -9
- package/dist/runtime/components/Pagination.vue.d.ts +1 -1
- package/dist/runtime/components/PinInput.d.vue.ts +2 -0
- package/dist/runtime/components/PinInput.vue +12 -5
- package/dist/runtime/components/PinInput.vue.d.ts +2 -0
- package/dist/runtime/components/Popover.vue +8 -3
- package/dist/runtime/components/PricingPlan.vue +24 -22
- package/dist/runtime/components/PricingPlans.d.vue.ts +3 -0
- package/dist/runtime/components/PricingPlans.vue +5 -2
- package/dist/runtime/components/PricingPlans.vue.d.ts +3 -0
- package/dist/runtime/components/PricingTable.vue +38 -36
- package/dist/runtime/components/Progress.vue +9 -7
- package/dist/runtime/components/RadioGroup.d.vue.ts +2 -2
- package/dist/runtime/components/RadioGroup.vue +13 -11
- package/dist/runtime/components/RadioGroup.vue.d.ts +2 -2
- package/dist/runtime/components/ScrollArea.d.vue.ts +7 -0
- package/dist/runtime/components/ScrollArea.vue +35 -11
- package/dist/runtime/components/ScrollArea.vue.d.ts +7 -0
- package/dist/runtime/components/Select.d.vue.ts +64 -25
- package/dist/runtime/components/Select.vue +34 -35
- package/dist/runtime/components/Select.vue.d.ts +64 -25
- package/dist/runtime/components/SelectMenu.d.vue.ts +115 -30
- package/dist/runtime/components/SelectMenu.vue +51 -57
- package/dist/runtime/components/SelectMenu.vue.d.ts +115 -30
- package/dist/runtime/components/Separator.vue +9 -7
- package/dist/runtime/components/Skeleton.d.vue.ts +3 -0
- package/dist/runtime/components/Skeleton.vue +5 -2
- package/dist/runtime/components/Skeleton.vue.d.ts +3 -0
- package/dist/runtime/components/Slideover.d.vue.ts +3 -3
- package/dist/runtime/components/Slideover.vue +16 -11
- package/dist/runtime/components/Slideover.vue.d.ts +3 -3
- package/dist/runtime/components/Slider.d.vue.ts +1 -1
- package/dist/runtime/components/Slider.vue +8 -6
- package/dist/runtime/components/Slider.vue.d.ts +1 -1
- package/dist/runtime/components/Stepper.d.vue.ts +1 -1
- package/dist/runtime/components/Stepper.vue +15 -13
- package/dist/runtime/components/Stepper.vue.d.ts +1 -1
- package/dist/runtime/components/Switch.vue +20 -13
- package/dist/runtime/components/Table.d.vue.ts +1 -1
- package/dist/runtime/components/Table.vue +26 -24
- package/dist/runtime/components/Table.vue.d.ts +1 -1
- package/dist/runtime/components/Tabs.vue +17 -12
- package/dist/runtime/components/Textarea.d.vue.ts +53 -11
- package/dist/runtime/components/Textarea.vue +16 -12
- package/dist/runtime/components/Textarea.vue.d.ts +53 -11
- package/dist/runtime/components/Theme.d.vue.ts +17 -0
- package/dist/runtime/components/Theme.vue +17 -0
- package/dist/runtime/components/Theme.vue.d.ts +17 -0
- package/dist/runtime/components/Timeline.d.vue.ts +1 -1
- package/dist/runtime/components/Timeline.vue +12 -10
- package/dist/runtime/components/Timeline.vue.d.ts +1 -1
- package/dist/runtime/components/Toast.vue +16 -16
- package/dist/runtime/components/Toaster.vue +7 -4
- package/dist/runtime/components/Tooltip.vue +8 -6
- package/dist/runtime/components/Tree.vue +13 -11
- package/dist/runtime/components/User.vue +9 -7
- package/dist/runtime/components/color-mode/ColorModeAvatar.vue +1 -1
- package/dist/runtime/components/color-mode/ColorModeButton.vue +5 -3
- package/dist/runtime/components/color-mode/ColorModeImage.vue +8 -3
- package/dist/runtime/components/color-mode/ColorModeSelect.vue +2 -2
- package/dist/runtime/components/color-mode/ColorModeSwitch.vue +1 -1
- package/dist/runtime/components/content/ContentNavigation.vue +21 -19
- package/dist/runtime/components/content/ContentSearch.d.vue.ts +1 -1
- package/dist/runtime/components/content/ContentSearch.vue +6 -3
- package/dist/runtime/components/content/ContentSearch.vue.d.ts +1 -1
- package/dist/runtime/components/content/ContentSearchButton.d.vue.ts +1 -1
- package/dist/runtime/components/content/ContentSearchButton.vue +6 -4
- package/dist/runtime/components/content/ContentSearchButton.vue.d.ts +1 -1
- package/dist/runtime/components/content/ContentSurround.vue +9 -7
- package/dist/runtime/components/content/ContentToc.vue +18 -16
- package/dist/runtime/components/locale/LocaleSelect.d.vue.ts +1 -1
- package/dist/runtime/components/locale/LocaleSelect.vue +2 -2
- package/dist/runtime/components/locale/LocaleSelect.vue.d.ts +1 -1
- package/dist/runtime/components/prose/A.d.vue.ts +3 -0
- package/dist/runtime/components/prose/A.vue +7 -4
- package/dist/runtime/components/prose/A.vue.d.ts +3 -0
- package/dist/runtime/components/prose/Accordion.vue +4 -2
- package/dist/runtime/components/prose/AccordionItem.d.vue.ts +3 -0
- package/dist/runtime/components/prose/AccordionItem.vue +5 -2
- package/dist/runtime/components/prose/AccordionItem.vue.d.ts +3 -0
- package/dist/runtime/components/prose/Badge.d.vue.ts +3 -0
- package/dist/runtime/components/prose/Badge.vue +5 -2
- package/dist/runtime/components/prose/Badge.vue.d.ts +3 -0
- package/dist/runtime/components/prose/Blockquote.d.vue.ts +3 -0
- package/dist/runtime/components/prose/Blockquote.vue +5 -2
- package/dist/runtime/components/prose/Blockquote.vue.d.ts +3 -0
- package/dist/runtime/components/prose/Callout.vue +6 -4
- package/dist/runtime/components/prose/Card.vue +8 -6
- package/dist/runtime/components/prose/CardGroup.d.vue.ts +3 -0
- package/dist/runtime/components/prose/CardGroup.vue +5 -2
- package/dist/runtime/components/prose/CardGroup.vue.d.ts +3 -0
- package/dist/runtime/components/prose/Code.d.vue.ts +3 -0
- package/dist/runtime/components/prose/Code.vue +5 -2
- package/dist/runtime/components/prose/Code.vue.d.ts +3 -0
- package/dist/runtime/components/prose/CodeCollapse.vue +7 -5
- package/dist/runtime/components/prose/CodeGroup.vue +9 -7
- package/dist/runtime/components/prose/CodePreview.vue +6 -4
- package/dist/runtime/components/prose/CodeTree.vue +14 -12
- package/dist/runtime/components/prose/Collapsible.vue +7 -5
- package/dist/runtime/components/prose/Em.d.vue.ts +3 -0
- package/dist/runtime/components/prose/Em.vue +5 -2
- package/dist/runtime/components/prose/Em.vue.d.ts +3 -0
- package/dist/runtime/components/prose/Field.vue +10 -8
- package/dist/runtime/components/prose/FieldGroup.d.vue.ts +3 -0
- package/dist/runtime/components/prose/FieldGroup.vue +5 -2
- package/dist/runtime/components/prose/FieldGroup.vue.d.ts +3 -0
- package/dist/runtime/components/prose/H1.vue +5 -3
- package/dist/runtime/components/prose/H2.vue +7 -5
- package/dist/runtime/components/prose/H3.vue +7 -5
- package/dist/runtime/components/prose/H4.vue +5 -3
- package/dist/runtime/components/prose/Hr.d.vue.ts +3 -0
- package/dist/runtime/components/prose/Hr.vue +5 -2
- package/dist/runtime/components/prose/Hr.vue.d.ts +3 -0
- package/dist/runtime/components/prose/Icon.d.vue.ts +3 -0
- package/dist/runtime/components/prose/Icon.vue +5 -2
- package/dist/runtime/components/prose/Icon.vue.d.ts +3 -0
- package/dist/runtime/components/prose/Img.vue +9 -15
- package/dist/runtime/components/prose/Kbd.d.vue.ts +3 -0
- package/dist/runtime/components/prose/Kbd.vue +5 -2
- package/dist/runtime/components/prose/Kbd.vue.d.ts +3 -0
- package/dist/runtime/components/prose/Li.d.vue.ts +3 -0
- package/dist/runtime/components/prose/Li.vue +5 -2
- package/dist/runtime/components/prose/Li.vue.d.ts +3 -0
- package/dist/runtime/components/prose/Ol.d.vue.ts +3 -0
- package/dist/runtime/components/prose/Ol.vue +5 -2
- package/dist/runtime/components/prose/Ol.vue.d.ts +3 -0
- package/dist/runtime/components/prose/P.d.vue.ts +3 -0
- package/dist/runtime/components/prose/P.vue +5 -2
- package/dist/runtime/components/prose/P.vue.d.ts +3 -0
- package/dist/runtime/components/prose/Pre.vue +9 -7
- package/dist/runtime/components/prose/Steps.d.vue.ts +3 -0
- package/dist/runtime/components/prose/Steps.vue +5 -2
- package/dist/runtime/components/prose/Steps.vue.d.ts +3 -0
- package/dist/runtime/components/prose/Strong.d.vue.ts +3 -0
- package/dist/runtime/components/prose/Strong.vue +5 -2
- package/dist/runtime/components/prose/Strong.vue.d.ts +3 -0
- package/dist/runtime/components/prose/Table.vue +5 -3
- package/dist/runtime/components/prose/Tabs.vue +4 -2
- package/dist/runtime/components/prose/TabsItem.d.vue.ts +3 -0
- package/dist/runtime/components/prose/TabsItem.vue +5 -2
- package/dist/runtime/components/prose/TabsItem.vue.d.ts +3 -0
- package/dist/runtime/components/prose/Tbody.d.vue.ts +3 -0
- package/dist/runtime/components/prose/Tbody.vue +5 -2
- package/dist/runtime/components/prose/Tbody.vue.d.ts +3 -0
- package/dist/runtime/components/prose/Td.d.vue.ts +3 -0
- package/dist/runtime/components/prose/Td.vue +5 -2
- package/dist/runtime/components/prose/Td.vue.d.ts +3 -0
- package/dist/runtime/components/prose/Th.d.vue.ts +3 -0
- package/dist/runtime/components/prose/Th.vue +5 -2
- package/dist/runtime/components/prose/Th.vue.d.ts +3 -0
- package/dist/runtime/components/prose/Thead.d.vue.ts +3 -0
- package/dist/runtime/components/prose/Thead.vue +5 -2
- package/dist/runtime/components/prose/Thead.vue.d.ts +3 -0
- package/dist/runtime/components/prose/Tr.d.vue.ts +3 -0
- package/dist/runtime/components/prose/Tr.vue +5 -2
- package/dist/runtime/components/prose/Tr.vue.d.ts +3 -0
- package/dist/runtime/components/prose/Ul.d.vue.ts +3 -0
- package/dist/runtime/components/prose/Ul.vue +5 -2
- package/dist/runtime/components/prose/Ul.vue.d.ts +3 -0
- package/dist/runtime/composables/defineShortcuts.js +4 -1
- package/dist/runtime/composables/internal/useFilter.d.ts +9 -0
- package/dist/runtime/composables/internal/useFilter.js +60 -0
- package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
- package/dist/runtime/composables/useComponentUI.d.ts +33 -0
- package/dist/runtime/composables/useComponentUI.js +13 -0
- package/dist/runtime/composables/useEditorMenu.js +27 -10
- package/dist/runtime/composables/useFieldGroup.d.ts +1 -1
- package/dist/runtime/composables/useFormField.d.ts +1 -1
- package/dist/runtime/composables/useToast.d.ts +4 -0
- package/dist/runtime/composables/useToast.js +25 -1
- package/dist/runtime/keyframes.css +1 -1
- package/dist/runtime/locale/be.d.ts +3 -0
- package/dist/runtime/locale/be.js +129 -0
- package/dist/runtime/locale/index.d.ts +1 -0
- package/dist/runtime/locale/index.js +1 -0
- package/dist/runtime/types/html.d.ts +3 -1
- package/dist/runtime/types/index.d.ts +1 -0
- package/dist/runtime/types/index.js +1 -0
- package/dist/runtime/types/input.d.ts +16 -6
- package/dist/runtime/types/utils.d.ts +10 -8
- package/dist/runtime/utils/index.d.ts +1 -0
- package/dist/runtime/utils/index.js +10 -0
- package/dist/runtime/utils/overlay.d.ts +19 -0
- package/dist/runtime/utils/overlay.js +13 -0
- package/dist/runtime/vue/components/color-mode/ColorModeSelect.vue +2 -2
- package/dist/runtime/vue/components/color-mode/ColorModeSwitch.vue +1 -1
- package/dist/runtime/vue/overrides/inertia/Link.d.vue.ts +1 -1
- package/dist/runtime/vue/overrides/inertia/Link.vue +4 -2
- package/dist/runtime/vue/overrides/inertia/Link.vue.d.ts +1 -1
- package/dist/runtime/vue/overrides/none/Link.d.vue.ts +1 -1
- package/dist/runtime/vue/overrides/none/Link.vue.d.ts +1 -1
- package/dist/runtime/vue/overrides/vue-router/Link.d.vue.ts +1 -1
- package/dist/runtime/vue/overrides/vue-router/Link.vue.d.ts +1 -1
- package/dist/runtime/vue/stubs/base.d.ts +6 -0
- package/dist/runtime/vue/stubs/base.js +8 -0
- package/dist/shared/{ui.Ddb3hKxo.mjs → ui.BrgdrRzy.mjs} +99 -51
- package/dist/unplugin.d.mts +1 -1
- package/dist/unplugin.mjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +50 -51
|
@@ -4,13 +4,15 @@ import theme from "#build/ui/select-menu";
|
|
|
4
4
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { useTemplateRef, computed, onMounted, toRef, toRaw } from "vue";
|
|
7
|
-
import { ComboboxRoot, ComboboxArrow, ComboboxAnchor, ComboboxInput, ComboboxTrigger, ComboboxCancel, ComboboxPortal, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxVirtualizer, ComboboxLabel, ComboboxSeparator, ComboboxItem, ComboboxItemIndicator, FocusScope, useForwardPropsEmits
|
|
7
|
+
import { ComboboxRoot, ComboboxArrow, ComboboxAnchor, ComboboxInput, ComboboxTrigger, ComboboxCancel, ComboboxPortal, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxVirtualizer, ComboboxLabel, ComboboxSeparator, ComboboxItem, ComboboxItemIndicator, FocusScope, useForwardPropsEmits } from "reka-ui";
|
|
8
8
|
import { defu } from "defu";
|
|
9
9
|
import { reactivePick, createReusableTemplate } from "@vueuse/core";
|
|
10
10
|
import { useAppConfig } from "#imports";
|
|
11
|
+
import { useComponentUI } from "../composables/useComponentUI";
|
|
11
12
|
import { useFieldGroup } from "../composables/useFieldGroup";
|
|
12
13
|
import { useComponentIcons } from "../composables/useComponentIcons";
|
|
13
14
|
import { useFormField } from "../composables/useFormField";
|
|
15
|
+
import { useFilter } from "../composables/internal/useFilter";
|
|
14
16
|
import { useLocale } from "../composables/useLocale";
|
|
15
17
|
import { usePortal } from "../composables/usePortal";
|
|
16
18
|
import { compare, get, getDisplayValue, isArrayOfArray, looseToNumber } from "../utils";
|
|
@@ -44,7 +46,7 @@ const props = defineProps({
|
|
|
44
46
|
items: { type: null, required: false },
|
|
45
47
|
defaultValue: { type: null, required: false },
|
|
46
48
|
modelValue: { type: null, required: false },
|
|
47
|
-
modelModifiers: { type:
|
|
49
|
+
modelModifiers: { type: null, required: false },
|
|
48
50
|
multiple: { type: Boolean, required: false },
|
|
49
51
|
highlight: { type: Boolean, required: false },
|
|
50
52
|
createItem: { type: [Boolean, String, Object], required: false },
|
|
@@ -53,7 +55,7 @@ const props = defineProps({
|
|
|
53
55
|
autofocus: { type: Boolean, required: false },
|
|
54
56
|
autofocusDelay: { type: Number, required: false, default: 0 },
|
|
55
57
|
class: { type: null, required: false },
|
|
56
|
-
ui: { type:
|
|
58
|
+
ui: { type: Object, required: false },
|
|
57
59
|
open: { type: Boolean, required: false },
|
|
58
60
|
defaultOpen: { type: Boolean, required: false },
|
|
59
61
|
disabled: { type: Boolean, required: false },
|
|
@@ -71,12 +73,13 @@ const props = defineProps({
|
|
|
71
73
|
loading: { type: Boolean, required: false },
|
|
72
74
|
loadingIcon: { type: null, required: false }
|
|
73
75
|
});
|
|
74
|
-
const emits = defineEmits(["
|
|
76
|
+
const emits = defineEmits(["change", "blur", "focus", "create", "clear", "highlight", "update:modelValue", "update:open"]);
|
|
75
77
|
const slots = defineSlots();
|
|
76
78
|
const searchTerm = defineModel("searchTerm", { type: String, ...{ default: "" } });
|
|
77
79
|
const { t } = useLocale();
|
|
78
80
|
const appConfig = useAppConfig();
|
|
79
|
-
const
|
|
81
|
+
const uiProp = useComponentUI("selectMenu", props);
|
|
82
|
+
const { filterGroups } = useFilter();
|
|
80
83
|
const rootProps = useForwardPropsEmits(reactivePick(props, "modelValue", "defaultValue", "open", "defaultOpen", "required", "multiple", "resetSearchTermOnBlur", "resetSearchTermOnSelect", "resetModelValueOnClear", "highlightOnHover", "by"), emits);
|
|
81
84
|
const portalProps = usePortal(toRef(() => props.portal));
|
|
82
85
|
const contentProps = toRef(() => defu(props.content, { side: "bottom", sideOffset: 8, collisionPadding: 8, position: "popper" }));
|
|
@@ -141,23 +144,10 @@ const filteredGroups = computed(() => {
|
|
|
141
144
|
return groups.value;
|
|
142
145
|
}
|
|
143
146
|
const fields = Array.isArray(props.filterFields) ? props.filterFields : [props.labelKey];
|
|
144
|
-
return groups.value
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
if (typeof item !== "object") {
|
|
149
|
-
return contains(String(item), searchTerm.value);
|
|
150
|
-
}
|
|
151
|
-
if (item.type && ["label", "separator"].includes(item.type)) {
|
|
152
|
-
return true;
|
|
153
|
-
}
|
|
154
|
-
return fields.some((field) => {
|
|
155
|
-
const value = get(item, field);
|
|
156
|
-
return value !== void 0 && value !== null && contains(String(value), searchTerm.value);
|
|
157
|
-
});
|
|
158
|
-
})).filter((group) => group.filter(
|
|
159
|
-
(item) => !isSelectItem(item) || (!item.type || !["label", "separator"].includes(item.type))
|
|
160
|
-
).length > 0);
|
|
147
|
+
return filterGroups(groups.value, searchTerm.value, {
|
|
148
|
+
fields,
|
|
149
|
+
isStructural: (item) => isSelectItem(item) && !!item.type && ["label", "separator"].includes(item.type)
|
|
150
|
+
});
|
|
161
151
|
});
|
|
162
152
|
const filteredItems = computed(() => filteredGroups.value.flatMap((group) => group));
|
|
163
153
|
const createItem = computed(() => {
|
|
@@ -188,7 +178,7 @@ function onUpdate(value) {
|
|
|
188
178
|
if (toRaw(props.modelValue) === value) {
|
|
189
179
|
return;
|
|
190
180
|
}
|
|
191
|
-
if (props.modelModifiers?.trim) {
|
|
181
|
+
if (props.modelModifiers?.trim && (typeof value === "string" || value === null || value === void 0)) {
|
|
192
182
|
value = value?.trim() ?? null;
|
|
193
183
|
}
|
|
194
184
|
if (props.modelModifiers?.number) {
|
|
@@ -197,7 +187,7 @@ function onUpdate(value) {
|
|
|
197
187
|
if (props.modelModifiers?.nullable) {
|
|
198
188
|
value ??= null;
|
|
199
189
|
}
|
|
200
|
-
if (props.modelModifiers?.optional) {
|
|
190
|
+
if (props.modelModifiers?.optional && !props.modelModifiers?.nullable && value !== null) {
|
|
201
191
|
value ??= void 0;
|
|
202
192
|
}
|
|
203
193
|
const event = new Event("change", { target: { value } });
|
|
@@ -265,11 +255,11 @@ defineExpose({
|
|
|
265
255
|
<DefineCreateItemTemplate>
|
|
266
256
|
<ComboboxItem
|
|
267
257
|
data-slot="item"
|
|
268
|
-
:class="ui.item({ class:
|
|
258
|
+
:class="ui.item({ class: uiProp?.item })"
|
|
269
259
|
:value="searchTerm"
|
|
270
260
|
@select="onCreate"
|
|
271
261
|
>
|
|
272
|
-
<span data-slot="itemLabel" :class="ui.itemLabel({ class:
|
|
262
|
+
<span data-slot="itemLabel" :class="ui.itemLabel({ class: uiProp?.itemLabel })">
|
|
273
263
|
<slot name="create-item-label" :item="searchTerm">
|
|
274
264
|
{{ t("selectMenu.create", { label: searchTerm }) }}
|
|
275
265
|
</slot>
|
|
@@ -278,54 +268,54 @@ defineExpose({
|
|
|
278
268
|
</DefineCreateItemTemplate>
|
|
279
269
|
|
|
280
270
|
<DefineItemTemplate v-slot="{ item, index }">
|
|
281
|
-
<ComboboxLabel v-if="isSelectItem(item) && item.type === 'label'" data-slot="label" :class="ui.label({ class: [
|
|
271
|
+
<ComboboxLabel v-if="isSelectItem(item) && item.type === 'label'" data-slot="label" :class="ui.label({ class: [uiProp?.label, item.ui?.label, item.class] })">
|
|
282
272
|
{{ get(item, props.labelKey) }}
|
|
283
273
|
</ComboboxLabel>
|
|
284
274
|
|
|
285
|
-
<ComboboxSeparator v-else-if="isSelectItem(item) && item.type === 'separator'" data-slot="separator" :class="ui.separator({ class: [
|
|
275
|
+
<ComboboxSeparator v-else-if="isSelectItem(item) && item.type === 'separator'" data-slot="separator" :class="ui.separator({ class: [uiProp?.separator, item.ui?.separator, item.class] })" />
|
|
286
276
|
|
|
287
277
|
<ComboboxItem
|
|
288
278
|
v-else
|
|
289
279
|
data-slot="item"
|
|
290
|
-
:class="ui.item({ class: [
|
|
280
|
+
:class="ui.item({ class: [uiProp?.item, isSelectItem(item) && item.ui?.item, isSelectItem(item) && item.class] })"
|
|
291
281
|
:disabled="isSelectItem(item) && item.disabled"
|
|
292
282
|
:value="props.valueKey && isSelectItem(item) ? get(item, props.valueKey) : item"
|
|
293
283
|
@select="onSelect($event, item)"
|
|
294
284
|
>
|
|
295
285
|
<slot name="item" :item="item" :index="index" :ui="ui">
|
|
296
286
|
<slot name="item-leading" :item="item" :index="index" :ui="ui">
|
|
297
|
-
<UIcon v-if="isSelectItem(item) && item.icon" :name="item.icon" data-slot="itemLeadingIcon" :class="ui.itemLeadingIcon({ class: [
|
|
298
|
-
<UAvatar v-else-if="isSelectItem(item) && item.avatar" :size="item.ui?.itemLeadingAvatarSize ||
|
|
287
|
+
<UIcon v-if="isSelectItem(item) && item.icon" :name="item.icon" data-slot="itemLeadingIcon" :class="ui.itemLeadingIcon({ class: [uiProp?.itemLeadingIcon, item.ui?.itemLeadingIcon] })" />
|
|
288
|
+
<UAvatar v-else-if="isSelectItem(item) && item.avatar" :size="item.ui?.itemLeadingAvatarSize || uiProp?.itemLeadingAvatarSize || ui.itemLeadingAvatarSize()" v-bind="item.avatar" data-slot="itemLeadingAvatar" :class="ui.itemLeadingAvatar({ class: [uiProp?.itemLeadingAvatar, item.ui?.itemLeadingAvatar] })" />
|
|
299
289
|
<UChip
|
|
300
290
|
v-else-if="isSelectItem(item) && item.chip"
|
|
301
|
-
:size="
|
|
291
|
+
:size="item.ui?.itemLeadingChipSize || uiProp?.itemLeadingChipSize || ui.itemLeadingChipSize()"
|
|
302
292
|
inset
|
|
303
293
|
standalone
|
|
304
294
|
v-bind="item.chip"
|
|
305
295
|
data-slot="itemLeadingChip"
|
|
306
|
-
:class="ui.itemLeadingChip({ class: [
|
|
296
|
+
:class="ui.itemLeadingChip({ class: [uiProp?.itemLeadingChip, item.ui?.itemLeadingChip] })"
|
|
307
297
|
/>
|
|
308
298
|
</slot>
|
|
309
299
|
|
|
310
|
-
<span data-slot="itemWrapper" :class="ui.itemWrapper({ class: [
|
|
311
|
-
<span data-slot="itemLabel" :class="ui.itemLabel({ class: [
|
|
300
|
+
<span data-slot="itemWrapper" :class="ui.itemWrapper({ class: [uiProp?.itemWrapper, isSelectItem(item) && item.ui?.itemWrapper] })">
|
|
301
|
+
<span data-slot="itemLabel" :class="ui.itemLabel({ class: [uiProp?.itemLabel, isSelectItem(item) && item.ui?.itemLabel] })">
|
|
312
302
|
<slot name="item-label" :item="item" :index="index">
|
|
313
303
|
{{ isSelectItem(item) ? get(item, props.labelKey) : item }}
|
|
314
304
|
</slot>
|
|
315
305
|
</span>
|
|
316
306
|
|
|
317
|
-
<span v-if="isSelectItem(item) && (get(item, props.descriptionKey) || !!slots['item-description'])" data-slot="itemDescription" :class="ui.itemDescription({ class: [
|
|
307
|
+
<span v-if="isSelectItem(item) && (get(item, props.descriptionKey) || !!slots['item-description'])" data-slot="itemDescription" :class="ui.itemDescription({ class: [uiProp?.itemDescription, isSelectItem(item) && item.ui?.itemDescription] })">
|
|
318
308
|
<slot name="item-description" :item="item" :index="index">
|
|
319
309
|
{{ get(item, props.descriptionKey) }}
|
|
320
310
|
</slot>
|
|
321
311
|
</span>
|
|
322
312
|
</span>
|
|
323
313
|
|
|
324
|
-
<span data-slot="itemTrailing" :class="ui.itemTrailing({ class: [
|
|
314
|
+
<span data-slot="itemTrailing" :class="ui.itemTrailing({ class: [uiProp?.itemTrailing, isSelectItem(item) && item.ui?.itemTrailing] })">
|
|
325
315
|
<slot name="item-trailing" :item="item" :index="index" :ui="ui" />
|
|
326
316
|
|
|
327
317
|
<ComboboxItemIndicator as-child>
|
|
328
|
-
<UIcon :name="selectedIcon || appConfig.ui.icons.check" data-slot="itemTrailingIcon" :class="ui.itemTrailingIcon({ class: [
|
|
318
|
+
<UIcon :name="selectedIcon || appConfig.ui.icons.check" data-slot="itemTrailingIcon" :class="ui.itemTrailingIcon({ class: [uiProp?.itemTrailingIcon, isSelectItem(item) && item.ui?.itemTrailingIcon] })" />
|
|
329
319
|
</ComboboxItemIndicator>
|
|
330
320
|
</span>
|
|
331
321
|
</slot>
|
|
@@ -344,71 +334,75 @@ defineExpose({
|
|
|
344
334
|
@update:open="onUpdateOpen"
|
|
345
335
|
>
|
|
346
336
|
<ComboboxAnchor as-child>
|
|
347
|
-
<ComboboxTrigger ref="triggerRef" data-slot="base" :class="ui.base({ class: [
|
|
348
|
-
<span v-if="isLeading || !!avatar || !!slots.leading" data-slot="leading" :class="ui.leading({ class:
|
|
337
|
+
<ComboboxTrigger ref="triggerRef" data-slot="base" :class="ui.base({ class: [uiProp?.base, props.class] })" tabindex="0">
|
|
338
|
+
<span v-if="isLeading || !!avatar || !!slots.leading" data-slot="leading" :class="ui.leading({ class: uiProp?.leading })">
|
|
349
339
|
<slot name="leading" :model-value="modelValue" :open="open" :ui="ui">
|
|
350
|
-
<UIcon v-if="isLeading && leadingIconName" :name="leadingIconName" data-slot="leadingIcon" :class="ui.leadingIcon({ class:
|
|
351
|
-
<UAvatar v-else-if="!!avatar" :size="
|
|
340
|
+
<UIcon v-if="isLeading && leadingIconName" :name="leadingIconName" data-slot="leadingIcon" :class="ui.leadingIcon({ class: uiProp?.leadingIcon })" />
|
|
341
|
+
<UAvatar v-else-if="!!avatar" :size="uiProp?.itemLeadingAvatarSize || ui.itemLeadingAvatarSize()" v-bind="avatar" data-slot="itemLeadingAvatar" :class="ui.itemLeadingAvatar({ class: uiProp?.itemLeadingAvatar })" />
|
|
352
342
|
</slot>
|
|
353
343
|
</span>
|
|
354
344
|
|
|
355
345
|
<slot :model-value="modelValue" :open="open" :ui="ui">
|
|
356
346
|
<template v-for="displayedModelValue in [displayValue(modelValue)]" :key="displayedModelValue">
|
|
357
|
-
<span v-if="displayedModelValue !== void 0 && displayedModelValue !== null" data-slot="value" :class="ui.value({ class:
|
|
347
|
+
<span v-if="displayedModelValue !== void 0 && displayedModelValue !== null" data-slot="value" :class="ui.value({ class: uiProp?.value })">
|
|
358
348
|
{{ displayedModelValue }}
|
|
359
349
|
</span>
|
|
360
|
-
<span v-else data-slot="placeholder" :class="ui.placeholder({ class:
|
|
350
|
+
<span v-else data-slot="placeholder" :class="ui.placeholder({ class: uiProp?.placeholder })">
|
|
361
351
|
{{ placeholder ?? "\xA0" }}
|
|
362
352
|
</span>
|
|
363
353
|
</template>
|
|
364
354
|
</slot>
|
|
365
355
|
|
|
366
|
-
<span v-if="isTrailing || !!slots.trailing || !!clear" data-slot="trailing" :class="ui.trailing({ class:
|
|
356
|
+
<span v-if="isTrailing || !!slots.trailing || !!clear" data-slot="trailing" :class="ui.trailing({ class: uiProp?.trailing })">
|
|
367
357
|
<slot name="trailing" :model-value="modelValue" :open="open" :ui="ui">
|
|
368
358
|
<ComboboxCancel v-if="!!clear && !isModelValueEmpty(modelValue)" as-child>
|
|
369
359
|
<UButton
|
|
370
360
|
as="span"
|
|
371
361
|
:icon="clearIcon || appConfig.ui.icons.close"
|
|
362
|
+
:size="selectSize"
|
|
372
363
|
variant="link"
|
|
373
364
|
color="neutral"
|
|
374
365
|
tabindex="-1"
|
|
375
366
|
v-bind="clearProps"
|
|
376
367
|
data-slot="trailingClear"
|
|
377
|
-
:class="ui.trailingClear({ class:
|
|
368
|
+
:class="ui.trailingClear({ class: uiProp?.trailingClear })"
|
|
378
369
|
@click.stop="onClear"
|
|
379
370
|
/>
|
|
380
371
|
</ComboboxCancel>
|
|
381
372
|
|
|
382
|
-
<UIcon v-else-if="trailingIconName" :name="trailingIconName" data-slot="trailingIcon" :class="ui.trailingIcon({ class:
|
|
373
|
+
<UIcon v-else-if="trailingIconName" :name="trailingIconName" data-slot="trailingIcon" :class="ui.trailingIcon({ class: uiProp?.trailingIcon })" />
|
|
383
374
|
</slot>
|
|
384
375
|
</span>
|
|
385
376
|
</ComboboxTrigger>
|
|
386
377
|
</ComboboxAnchor>
|
|
387
378
|
|
|
388
379
|
<ComboboxPortal v-bind="portalProps">
|
|
389
|
-
<ComboboxContent data-slot="content" :class="ui.content({ class:
|
|
390
|
-
<FocusScope trapped data-slot="focusScope" :class="ui.focusScope({ class:
|
|
380
|
+
<ComboboxContent data-slot="content" :class="ui.content({ class: uiProp?.content })" v-bind="contentProps">
|
|
381
|
+
<FocusScope trapped data-slot="focusScope" :class="ui.focusScope({ class: uiProp?.focusScope })">
|
|
391
382
|
<slot name="content-top" />
|
|
392
383
|
|
|
393
384
|
<ComboboxInput v-if="!!searchInput" v-model="searchTerm" :display-value="() => searchTerm" as-child>
|
|
394
385
|
<UInput
|
|
395
386
|
autofocus
|
|
396
387
|
autocomplete="off"
|
|
397
|
-
:size="
|
|
388
|
+
:size="selectSize"
|
|
398
389
|
v-bind="searchInputProps"
|
|
390
|
+
:model-modifiers="{
|
|
391
|
+
trim: modelModifiers?.trim
|
|
392
|
+
}"
|
|
399
393
|
data-slot="input"
|
|
400
|
-
:class="ui.input({ class:
|
|
394
|
+
:class="ui.input({ class: uiProp?.input })"
|
|
401
395
|
@change.stop
|
|
402
396
|
/>
|
|
403
397
|
</ComboboxInput>
|
|
404
398
|
|
|
405
|
-
<ComboboxEmpty data-slot="empty" :class="ui.empty({ class:
|
|
399
|
+
<ComboboxEmpty data-slot="empty" :class="ui.empty({ class: uiProp?.empty })">
|
|
406
400
|
<slot name="empty" :search-term="searchTerm">
|
|
407
401
|
{{ searchTerm ? t("selectMenu.noMatch", { searchTerm }) : t("selectMenu.noData") }}
|
|
408
402
|
</slot>
|
|
409
403
|
</ComboboxEmpty>
|
|
410
404
|
|
|
411
|
-
<div ref="viewportRef" role="presentation" data-slot="viewport" :class="ui.viewport({ class:
|
|
405
|
+
<div ref="viewportRef" role="presentation" data-slot="viewport" :class="ui.viewport({ class: uiProp?.viewport })">
|
|
412
406
|
<template v-if="!!virtualize">
|
|
413
407
|
<ReuseCreateItemTemplate v-if="createItem && createItemPosition === 'top'" />
|
|
414
408
|
|
|
@@ -425,15 +419,15 @@ defineExpose({
|
|
|
425
419
|
</template>
|
|
426
420
|
|
|
427
421
|
<template v-else>
|
|
428
|
-
<ComboboxGroup v-if="createItem && createItemPosition === 'top'" data-slot="group" :class="ui.group({ class:
|
|
422
|
+
<ComboboxGroup v-if="createItem && createItemPosition === 'top'" data-slot="group" :class="ui.group({ class: uiProp?.group })">
|
|
429
423
|
<ReuseCreateItemTemplate />
|
|
430
424
|
</ComboboxGroup>
|
|
431
425
|
|
|
432
|
-
<ComboboxGroup v-for="(group, groupIndex) in filteredGroups" :key="`group-${groupIndex}`" data-slot="group" :class="ui.group({ class:
|
|
426
|
+
<ComboboxGroup v-for="(group, groupIndex) in filteredGroups" :key="`group-${groupIndex}`" data-slot="group" :class="ui.group({ class: uiProp?.group })">
|
|
433
427
|
<ReuseItemTemplate v-for="(item, index) in group" :key="`group-${groupIndex}-${index}`" :item="item" :index="index" />
|
|
434
428
|
</ComboboxGroup>
|
|
435
429
|
|
|
436
|
-
<ComboboxGroup v-if="createItem && createItemPosition === 'bottom'" data-slot="group" :class="ui.group({ class:
|
|
430
|
+
<ComboboxGroup v-if="createItem && createItemPosition === 'bottom'" data-slot="group" :class="ui.group({ class: uiProp?.group })">
|
|
437
431
|
<ReuseCreateItemTemplate />
|
|
438
432
|
</ComboboxGroup>
|
|
439
433
|
</template>
|
|
@@ -442,7 +436,7 @@ defineExpose({
|
|
|
442
436
|
<slot name="content-bottom" />
|
|
443
437
|
</FocusScope>
|
|
444
438
|
|
|
445
|
-
<ComboboxArrow v-if="!!arrow" v-bind="arrowProps" data-slot="arrow" :class="ui.arrow({ class:
|
|
439
|
+
<ComboboxArrow v-if="!!arrow" v-bind="arrowProps" data-slot="arrow" :class="ui.arrow({ class: uiProp?.arrow })" />
|
|
446
440
|
</ComboboxContent>
|
|
447
441
|
</ComboboxPortal>
|
|
448
442
|
</ComboboxRoot>
|
|
@@ -3,9 +3,9 @@ import type { AppConfig } from '@nuxt/schema';
|
|
|
3
3
|
import theme from '#build/ui/select-menu';
|
|
4
4
|
import type { UseComponentIconsProps } from '../composables/useComponentIcons';
|
|
5
5
|
import type { AvatarProps, ButtonProps, ChipProps, IconProps, InputProps, LinkPropsKeys } from '../types';
|
|
6
|
-
import type { ModelModifiers } from '../types/input';
|
|
6
|
+
import type { ModelModifiers, ApplyModifiers } from '../types/input';
|
|
7
7
|
import type { ButtonHTMLAttributes } from '../types/html';
|
|
8
|
-
import type { AcceptableValue, ArrayOrNested, GetItemKeys, GetModelValue,
|
|
8
|
+
import type { AcceptableValue, ArrayOrNested, GetItemKeys, GetModelValue, NestedItem, EmitsToProps } from '../types/utils';
|
|
9
9
|
import type { ComponentConfig } from '../types/tv';
|
|
10
10
|
type SelectMenu = ComponentConfig<typeof theme, AppConfig, 'selectMenu'>;
|
|
11
11
|
export type SelectMenuValue = AcceptableValue;
|
|
@@ -29,7 +29,11 @@ export type SelectMenuItem = SelectMenuValue | {
|
|
|
29
29
|
ui?: Pick<SelectMenu['slots'], 'label' | 'separator' | 'item' | 'itemLeadingIcon' | 'itemLeadingAvatarSize' | 'itemLeadingAvatar' | 'itemLeadingChipSize' | 'itemLeadingChip' | 'itemWrapper' | 'itemLabel' | 'itemDescription' | 'itemTrailing' | 'itemTrailingIcon'>;
|
|
30
30
|
[key: string]: any;
|
|
31
31
|
};
|
|
32
|
-
|
|
32
|
+
type ExcludeItem = {
|
|
33
|
+
type: 'label' | 'separator';
|
|
34
|
+
};
|
|
35
|
+
type IsClearUsed<M extends boolean, C extends boolean | object> = M extends false ? (C extends true ? null : C extends object ? null : never) : never;
|
|
36
|
+
export interface SelectMenuProps<T extends ArrayOrNested<SelectMenuItem> = ArrayOrNested<SelectMenuItem>, VK extends GetItemKeys<T> | undefined = undefined, M extends boolean = false, Mod extends Omit<ModelModifiers, 'lazy'> = Omit<ModelModifiers, 'lazy'>, C extends boolean | object = false> extends Pick<ComboboxRootProps<T>, 'open' | 'defaultOpen' | 'disabled' | 'name' | 'resetSearchTermOnBlur' | 'resetSearchTermOnSelect' | 'resetModelValueOnClear' | 'highlightOnHover' | 'by'>, UseComponentIconsProps, /** @vue-ignore */ Omit<ButtonHTMLAttributes, 'type' | 'disabled' | 'name'> {
|
|
33
37
|
id?: string;
|
|
34
38
|
/** The placeholder text when the select is empty. */
|
|
35
39
|
placeholder?: string;
|
|
@@ -70,7 +74,7 @@ export interface SelectMenuProps<T extends ArrayOrNested<SelectMenuItem> = Array
|
|
|
70
74
|
* Can be an object to pass additional props to the Button.
|
|
71
75
|
* @defaultValue false
|
|
72
76
|
*/
|
|
73
|
-
clear?: boolean | Partial<Omit<ButtonProps, LinkPropsKeys
|
|
77
|
+
clear?: (C & boolean) | (C & Partial<Omit<ButtonProps, LinkPropsKeys>>);
|
|
74
78
|
/**
|
|
75
79
|
* The icon displayed in the clear button.
|
|
76
80
|
* @defaultValue appConfig.ui.icons.close
|
|
@@ -127,10 +131,10 @@ export interface SelectMenuProps<T extends ArrayOrNested<SelectMenuItem> = Array
|
|
|
127
131
|
descriptionKey?: GetItemKeys<T>;
|
|
128
132
|
items?: T;
|
|
129
133
|
/** The value of the SelectMenu when initially rendered. Use when you do not need to control the state of the SelectMenu. */
|
|
130
|
-
defaultValue?: GetModelValue<T, VK, M>;
|
|
134
|
+
defaultValue?: ApplyModifiers<GetModelValue<T, VK, M, ExcludeItem>, Mod> | IsClearUsed<M, C>;
|
|
131
135
|
/** The controlled value of the SelectMenu. Can be binded-with with `v-model`. */
|
|
132
|
-
modelValue?: GetModelValue<T, VK, M>;
|
|
133
|
-
modelModifiers?:
|
|
136
|
+
modelValue?: ApplyModifiers<GetModelValue<T, VK, M, ExcludeItem>, Mod> | IsClearUsed<M, C>;
|
|
137
|
+
modelModifiers?: Mod;
|
|
134
138
|
/** Whether multiple options can be selected or not. */
|
|
135
139
|
multiple?: M & boolean;
|
|
136
140
|
/** Highlight the ring color like a focus state. */
|
|
@@ -158,38 +162,39 @@ export interface SelectMenuProps<T extends ArrayOrNested<SelectMenuItem> = Array
|
|
|
158
162
|
class?: any;
|
|
159
163
|
ui?: SelectMenu['slots'];
|
|
160
164
|
}
|
|
161
|
-
export
|
|
162
|
-
change: [event: Event];
|
|
163
|
-
blur: [event: FocusEvent];
|
|
164
|
-
focus: [event: FocusEvent];
|
|
165
|
-
create: [item: string];
|
|
166
|
-
clear: [];
|
|
165
|
+
export interface SelectMenuEmits<A extends ArrayOrNested<SelectMenuItem>, VK extends GetItemKeys<A> | undefined, M extends boolean, Mod extends Omit<ModelModifiers, 'lazy'> = Omit<ModelModifiers, 'lazy'>, C extends boolean | object = false> extends Pick<ComboboxRootEmits, 'update:open'> {
|
|
166
|
+
'change': [event: Event];
|
|
167
|
+
'blur': [event: FocusEvent];
|
|
168
|
+
'focus': [event: FocusEvent];
|
|
169
|
+
'create': [item: string];
|
|
170
|
+
'clear': [];
|
|
167
171
|
/** Event handler when highlighted element changes. */
|
|
168
|
-
highlight: [
|
|
172
|
+
'highlight': [
|
|
169
173
|
payload: {
|
|
170
174
|
ref: HTMLElement;
|
|
171
|
-
value: GetModelValue<A, VK, M>;
|
|
175
|
+
value: ApplyModifiers<GetModelValue<A, VK, M, ExcludeItem>, Mod> | IsClearUsed<M, C>;
|
|
172
176
|
} | undefined
|
|
173
177
|
];
|
|
174
|
-
|
|
178
|
+
'update:modelValue': [value: ApplyModifiers<GetModelValue<A, VK, M, ExcludeItem>, Mod> | IsClearUsed<M, C>];
|
|
179
|
+
}
|
|
175
180
|
type SlotProps<T extends SelectMenuItem> = (props: {
|
|
176
181
|
item: T;
|
|
177
182
|
index: number;
|
|
178
183
|
ui: SelectMenu['ui'];
|
|
179
184
|
}) => any;
|
|
180
|
-
export interface SelectMenuSlots<A extends ArrayOrNested<SelectMenuItem> = ArrayOrNested<SelectMenuItem>, VK extends GetItemKeys<A> | undefined = undefined, M extends boolean = false, T extends NestedItem<A> = NestedItem<A>> {
|
|
185
|
+
export interface SelectMenuSlots<A extends ArrayOrNested<SelectMenuItem> = ArrayOrNested<SelectMenuItem>, VK extends GetItemKeys<A> | undefined = undefined, M extends boolean = false, Mod extends Omit<ModelModifiers, 'lazy'> = Omit<ModelModifiers, 'lazy'>, C extends boolean | object = false, T extends NestedItem<A> = NestedItem<A>> {
|
|
181
186
|
'leading'(props: {
|
|
182
|
-
modelValue?: GetModelValue<A, VK, M>;
|
|
187
|
+
modelValue?: ApplyModifiers<GetModelValue<A, VK, M, ExcludeItem>, Mod> | IsClearUsed<M, C>;
|
|
183
188
|
open: boolean;
|
|
184
189
|
ui: SelectMenu['ui'];
|
|
185
190
|
}): any;
|
|
186
191
|
'default'(props: {
|
|
187
|
-
modelValue?: GetModelValue<A, VK, M>;
|
|
192
|
+
modelValue?: ApplyModifiers<GetModelValue<A, VK, M, ExcludeItem>, Mod> | IsClearUsed<M, C>;
|
|
188
193
|
open: boolean;
|
|
189
194
|
ui: SelectMenu['ui'];
|
|
190
195
|
}): any;
|
|
191
196
|
'trailing'(props: {
|
|
192
|
-
modelValue?: GetModelValue<A, VK, M>;
|
|
197
|
+
modelValue?: ApplyModifiers<GetModelValue<A, VK, M, ExcludeItem>, Mod> | IsClearUsed<M, C>;
|
|
193
198
|
open: boolean;
|
|
194
199
|
ui: SelectMenu['ui'];
|
|
195
200
|
}): any;
|
|
@@ -215,21 +220,61 @@ export interface SelectMenuSlots<A extends ArrayOrNested<SelectMenuItem> = Array
|
|
|
215
220
|
}
|
|
216
221
|
declare const _default: typeof __VLS_export;
|
|
217
222
|
export default _default;
|
|
218
|
-
declare const __VLS_export: <T extends ArrayOrNested<SelectMenuItem>, VK extends GetItemKeys<T> | undefined = undefined, M extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
219
|
-
props: import("vue").PublicProps & __VLS_PrettifyLocal<(SelectMenuProps<T, VK, M> & {
|
|
223
|
+
declare const __VLS_export: <T extends ArrayOrNested<SelectMenuItem>, VK extends GetItemKeys<T> | undefined = undefined, M extends boolean = false, Mod extends Omit<ModelModifiers, "lazy"> = Omit<ModelModifiers, "lazy">, C extends boolean | object = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
224
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<(SelectMenuProps<T, VK, M, Mod, C> & {
|
|
220
225
|
searchTerm?: string;
|
|
221
226
|
}) & {
|
|
222
227
|
onClear?: (() => any) | undefined;
|
|
223
228
|
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
224
229
|
onChange?: ((event: Event) => any) | undefined;
|
|
225
230
|
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
226
|
-
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
227
|
-
onCreate?: ((item: string) => any) | undefined;
|
|
228
|
-
"onUpdate:modelValue"?: ((value: GetModelValue<T, VK, M>) => any) | undefined;
|
|
229
231
|
onHighlight?: ((payload: {
|
|
230
232
|
ref: HTMLElement;
|
|
231
|
-
value:
|
|
233
|
+
value: (Mod extends {
|
|
234
|
+
number: true;
|
|
235
|
+
} ? (Mod extends {
|
|
236
|
+
optional: true;
|
|
237
|
+
} ? (Mod extends {
|
|
238
|
+
nullable: true;
|
|
239
|
+
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
|
|
240
|
+
nullable: true;
|
|
241
|
+
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) extends infer T_1 ? T_1 extends (Mod extends {
|
|
242
|
+
optional: true;
|
|
243
|
+
} ? (Mod extends {
|
|
244
|
+
nullable: true;
|
|
245
|
+
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
|
|
246
|
+
nullable: true;
|
|
247
|
+
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) ? T_1 extends string ? number | T_1 : T_1 : never : never : Mod extends {
|
|
248
|
+
optional: true;
|
|
249
|
+
} ? (Mod extends {
|
|
250
|
+
nullable: true;
|
|
251
|
+
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
|
|
252
|
+
nullable: true;
|
|
253
|
+
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | IsClearUsed<M, C>;
|
|
232
254
|
} | undefined) => any) | undefined;
|
|
255
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
256
|
+
onCreate?: ((item: string) => any) | undefined;
|
|
257
|
+
"onUpdate:modelValue"?: ((value: (Mod extends {
|
|
258
|
+
number: true;
|
|
259
|
+
} ? (Mod extends {
|
|
260
|
+
optional: true;
|
|
261
|
+
} ? (Mod extends {
|
|
262
|
+
nullable: true;
|
|
263
|
+
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
|
|
264
|
+
nullable: true;
|
|
265
|
+
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) extends infer T_1 ? T_1 extends (Mod extends {
|
|
266
|
+
optional: true;
|
|
267
|
+
} ? (Mod extends {
|
|
268
|
+
nullable: true;
|
|
269
|
+
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
|
|
270
|
+
nullable: true;
|
|
271
|
+
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) ? T_1 extends string ? number | T_1 : T_1 : never : never : Mod extends {
|
|
272
|
+
optional: true;
|
|
273
|
+
} ? (Mod extends {
|
|
274
|
+
nullable: true;
|
|
275
|
+
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
|
|
276
|
+
nullable: true;
|
|
277
|
+
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | IsClearUsed<M, C>) => any) | undefined;
|
|
233
278
|
"onUpdate:searchTerm"?: ((value: string) => any) | undefined;
|
|
234
279
|
}> & (typeof globalThis extends {
|
|
235
280
|
__VLS_PROPS_FALLBACK: infer P;
|
|
@@ -239,11 +284,51 @@ declare const __VLS_export: <T extends ArrayOrNested<SelectMenuItem>, VK extends
|
|
|
239
284
|
viewportRef: Readonly<import("vue").Ref<HTMLDivElement | null, HTMLDivElement | null>>;
|
|
240
285
|
}>) => void;
|
|
241
286
|
attrs: any;
|
|
242
|
-
slots: SelectMenuSlots<T, VK, M, NestedItem<T>>;
|
|
243
|
-
emit: (((evt: "clear") => void) & ((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "focus", event: FocusEvent) => void) & ((evt: "
|
|
287
|
+
slots: SelectMenuSlots<T, VK, M, Mod, C, NestedItem<T>>;
|
|
288
|
+
emit: (((evt: "clear") => void) & ((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "focus", event: FocusEvent) => void) & ((evt: "highlight", payload: {
|
|
244
289
|
ref: HTMLElement;
|
|
245
|
-
value:
|
|
246
|
-
|
|
290
|
+
value: (Mod extends {
|
|
291
|
+
number: true;
|
|
292
|
+
} ? (Mod extends {
|
|
293
|
+
optional: true;
|
|
294
|
+
} ? (Mod extends {
|
|
295
|
+
nullable: true;
|
|
296
|
+
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
|
|
297
|
+
nullable: true;
|
|
298
|
+
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) extends infer T_1 ? T_1 extends (Mod extends {
|
|
299
|
+
optional: true;
|
|
300
|
+
} ? (Mod extends {
|
|
301
|
+
nullable: true;
|
|
302
|
+
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
|
|
303
|
+
nullable: true;
|
|
304
|
+
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) ? T_1 extends string ? number | T_1 : T_1 : never : never : Mod extends {
|
|
305
|
+
optional: true;
|
|
306
|
+
} ? (Mod extends {
|
|
307
|
+
nullable: true;
|
|
308
|
+
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
|
|
309
|
+
nullable: true;
|
|
310
|
+
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | IsClearUsed<M, C>;
|
|
311
|
+
} | undefined) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "create", item: string) => void) & ((evt: "update:modelValue", value: (Mod extends {
|
|
312
|
+
number: true;
|
|
313
|
+
} ? (Mod extends {
|
|
314
|
+
optional: true;
|
|
315
|
+
} ? (Mod extends {
|
|
316
|
+
nullable: true;
|
|
317
|
+
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
|
|
318
|
+
nullable: true;
|
|
319
|
+
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) extends infer T_1 ? T_1 extends (Mod extends {
|
|
320
|
+
optional: true;
|
|
321
|
+
} ? (Mod extends {
|
|
322
|
+
nullable: true;
|
|
323
|
+
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
|
|
324
|
+
nullable: true;
|
|
325
|
+
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) ? T_1 extends string ? number | T_1 : T_1 : never : never : Mod extends {
|
|
326
|
+
optional: true;
|
|
327
|
+
} ? (Mod extends {
|
|
328
|
+
nullable: true;
|
|
329
|
+
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
|
|
330
|
+
nullable: true;
|
|
331
|
+
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | IsClearUsed<M, C>) => void)) & ((event: "update:searchTerm", value: string) => void);
|
|
247
332
|
}>) => import("vue").VNode & {
|
|
248
333
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
249
334
|
};
|
|
@@ -7,6 +7,7 @@ import { computed } from "vue";
|
|
|
7
7
|
import { Separator, useForwardProps } from "reka-ui";
|
|
8
8
|
import { reactivePick } from "@vueuse/core";
|
|
9
9
|
import { useAppConfig } from "#imports";
|
|
10
|
+
import { useComponentUI } from "../composables/useComponentUI";
|
|
10
11
|
import { tv } from "../utils/tv";
|
|
11
12
|
import UIcon from "./Icon.vue";
|
|
12
13
|
import UAvatar from "./Avatar.vue";
|
|
@@ -25,6 +26,7 @@ const props = defineProps({
|
|
|
25
26
|
});
|
|
26
27
|
const slots = defineSlots();
|
|
27
28
|
const appConfig = useAppConfig();
|
|
29
|
+
const uiProp = useComponentUI("separator", props);
|
|
28
30
|
const rootProps = useForwardProps(reactivePick(props, "as", "decorative", "orientation"));
|
|
29
31
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.separator || {} })({
|
|
30
32
|
color: props.color,
|
|
@@ -35,19 +37,19 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.separator ||
|
|
|
35
37
|
</script>
|
|
36
38
|
|
|
37
39
|
<template>
|
|
38
|
-
<Separator v-bind="rootProps" data-slot="root" :class="ui.root({ class: [
|
|
39
|
-
<div data-slot="border" :class="ui.border({ class:
|
|
40
|
+
<Separator v-bind="rootProps" data-slot="root" :class="ui.root({ class: [uiProp?.root, props.class] })">
|
|
41
|
+
<div data-slot="border" :class="ui.border({ class: uiProp?.border })" />
|
|
40
42
|
|
|
41
43
|
<template v-if="label || icon || avatar || !!slots.default">
|
|
42
|
-
<div data-slot="container" :class="ui.container({ class:
|
|
44
|
+
<div data-slot="container" :class="ui.container({ class: uiProp?.container })">
|
|
43
45
|
<slot :ui="ui">
|
|
44
|
-
<span v-if="label" data-slot="label" :class="ui.label({ class:
|
|
45
|
-
<UIcon v-else-if="icon" :name="icon" data-slot="icon" :class="ui.icon({ class:
|
|
46
|
-
<UAvatar v-else-if="avatar" :size="
|
|
46
|
+
<span v-if="label" data-slot="label" :class="ui.label({ class: uiProp?.label })">{{ label }}</span>
|
|
47
|
+
<UIcon v-else-if="icon" :name="icon" data-slot="icon" :class="ui.icon({ class: uiProp?.icon })" />
|
|
48
|
+
<UAvatar v-else-if="avatar" :size="uiProp?.avatarSize || ui.avatarSize()" v-bind="avatar" data-slot="avatar" :class="ui.avatar({ class: uiProp?.avatar })" />
|
|
47
49
|
</slot>
|
|
48
50
|
</div>
|
|
49
51
|
|
|
50
|
-
<div data-slot="border" :class="ui.border({ class:
|
|
52
|
+
<div data-slot="border" :class="ui.border({ class: uiProp?.border })" />
|
|
51
53
|
</template>
|
|
52
54
|
</Separator>
|
|
53
55
|
</template>
|
|
@@ -7,11 +7,14 @@ import { computed } from "vue";
|
|
|
7
7
|
import { Primitive } from "reka-ui";
|
|
8
8
|
import { useAppConfig } from "#imports";
|
|
9
9
|
import { tv } from "../utils/tv";
|
|
10
|
+
import { useComponentUI } from "../composables/useComponentUI";
|
|
10
11
|
const props = defineProps({
|
|
11
12
|
as: { type: null, required: false },
|
|
12
|
-
class: { type: null, required: false }
|
|
13
|
+
class: { type: null, required: false },
|
|
14
|
+
ui: { type: Object, required: false }
|
|
13
15
|
});
|
|
14
16
|
const appConfig = useAppConfig();
|
|
17
|
+
const uiProp = useComponentUI("skeleton", props);
|
|
15
18
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.skeleton || {} }));
|
|
16
19
|
</script>
|
|
17
20
|
|
|
@@ -22,7 +25,7 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.skeleton || {
|
|
|
22
25
|
aria-label="loading"
|
|
23
26
|
aria-live="polite"
|
|
24
27
|
role="alert"
|
|
25
|
-
:class="ui({ class: props.class })"
|
|
28
|
+
:class="ui({ class: [uiProp?.base, props.class] })"
|
|
26
29
|
>
|
|
27
30
|
<slot />
|
|
28
31
|
</Primitive>
|
|
@@ -97,11 +97,11 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Slideo
|
|
|
97
97
|
"onClose:prevent"?: (() => any) | undefined;
|
|
98
98
|
}>, {
|
|
99
99
|
close: boolean | Omit<ButtonProps, LinkPropsKeys>;
|
|
100
|
+
transition: boolean;
|
|
101
|
+
side: Slideover["variants"]["side"];
|
|
102
|
+
overlay: boolean;
|
|
100
103
|
modal: boolean;
|
|
101
104
|
portal: boolean | string | HTMLElement;
|
|
102
|
-
overlay: boolean;
|
|
103
|
-
side: Slideover["variants"]["side"];
|
|
104
|
-
transition: boolean;
|
|
105
105
|
dismissible: boolean;
|
|
106
106
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, SlideoverSlots>;
|
|
107
107
|
type __VLS_WithSlots<T, S> = T & {
|