@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
|
@@ -7,8 +7,10 @@ import { computed, toRef } from "vue";
|
|
|
7
7
|
import { DialogRoot, DialogTrigger, DialogPortal, DialogOverlay, DialogContent, DialogTitle, DialogDescription, DialogClose, VisuallyHidden, useForwardPropsEmits } 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 { useLocale } from "../composables/useLocale";
|
|
11
12
|
import { usePortal } from "../composables/usePortal";
|
|
13
|
+
import { pointerDownOutside } from "../utils/overlay";
|
|
12
14
|
import { tv } from "../utils/tv";
|
|
13
15
|
import UButton from "./Button.vue";
|
|
14
16
|
const props = defineProps({
|
|
@@ -24,7 +26,7 @@ const props = defineProps({
|
|
|
24
26
|
closeIcon: { type: null, required: false },
|
|
25
27
|
dismissible: { type: Boolean, required: false, default: true },
|
|
26
28
|
class: { type: null, required: false },
|
|
27
|
-
ui: { type:
|
|
29
|
+
ui: { type: Object, required: false },
|
|
28
30
|
open: { type: Boolean, required: false },
|
|
29
31
|
defaultOpen: { type: Boolean, required: false },
|
|
30
32
|
modal: { type: Boolean, required: false, default: true }
|
|
@@ -33,6 +35,7 @@ const emits = defineEmits(["after:leave", "after:enter", "close:prevent", "updat
|
|
|
33
35
|
const slots = defineSlots();
|
|
34
36
|
const { t } = useLocale();
|
|
35
37
|
const appConfig = useAppConfig();
|
|
38
|
+
const uiProp = useComponentUI("slideover", props);
|
|
36
39
|
const rootProps = useForwardPropsEmits(reactivePick(props, "open", "defaultOpen", "modal"), emits);
|
|
37
40
|
const portalProps = usePortal(toRef(() => props.portal));
|
|
38
41
|
const contentProps = toRef(() => props.content);
|
|
@@ -47,7 +50,9 @@ const contentEvents = computed(() => {
|
|
|
47
50
|
return acc;
|
|
48
51
|
}, {});
|
|
49
52
|
}
|
|
50
|
-
return {
|
|
53
|
+
return {
|
|
54
|
+
pointerDownOutside
|
|
55
|
+
};
|
|
51
56
|
});
|
|
52
57
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.slideover || {} })({
|
|
53
58
|
transition: props.transition,
|
|
@@ -63,12 +68,12 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.slideover ||
|
|
|
63
68
|
</DialogTrigger>
|
|
64
69
|
|
|
65
70
|
<DialogPortal v-bind="portalProps">
|
|
66
|
-
<DialogOverlay v-if="overlay" data-slot="overlay" :class="ui.overlay({ class:
|
|
71
|
+
<DialogOverlay v-if="overlay" data-slot="overlay" :class="ui.overlay({ class: uiProp?.overlay })" />
|
|
67
72
|
|
|
68
73
|
<DialogContent
|
|
69
74
|
:data-side="side"
|
|
70
75
|
data-slot="content"
|
|
71
|
-
:class="ui.content({ class: [!slots.default && props.class,
|
|
76
|
+
:class="ui.content({ class: [!slots.default && props.class, uiProp?.content] })"
|
|
72
77
|
v-bind="contentProps"
|
|
73
78
|
@after-enter="emits('after:enter')"
|
|
74
79
|
@after-leave="emits('after:leave')"
|
|
@@ -89,16 +94,16 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.slideover ||
|
|
|
89
94
|
</VisuallyHidden>
|
|
90
95
|
|
|
91
96
|
<slot name="content" :close="close">
|
|
92
|
-
<div v-if="!!slots.header || (title || !!slots.title) || (description || !!slots.description) || (props.close || !!slots.close)" data-slot="header" :class="ui.header({ class:
|
|
97
|
+
<div v-if="!!slots.header || (title || !!slots.title) || (description || !!slots.description) || (props.close || !!slots.close)" data-slot="header" :class="ui.header({ class: uiProp?.header })">
|
|
93
98
|
<slot name="header" :close="close">
|
|
94
|
-
<div data-slot="wrapper" :class="ui.wrapper({ class:
|
|
95
|
-
<DialogTitle v-if="title || !!slots.title" data-slot="title" :class="ui.title({ class:
|
|
99
|
+
<div data-slot="wrapper" :class="ui.wrapper({ class: uiProp?.wrapper })">
|
|
100
|
+
<DialogTitle v-if="title || !!slots.title" data-slot="title" :class="ui.title({ class: uiProp?.title })">
|
|
96
101
|
<slot name="title">
|
|
97
102
|
{{ title }}
|
|
98
103
|
</slot>
|
|
99
104
|
</DialogTitle>
|
|
100
105
|
|
|
101
|
-
<DialogDescription v-if="description || !!slots.description" data-slot="description" :class="ui.description({ class:
|
|
106
|
+
<DialogDescription v-if="description || !!slots.description" data-slot="description" :class="ui.description({ class: uiProp?.description })">
|
|
102
107
|
<slot name="description">
|
|
103
108
|
{{ description }}
|
|
104
109
|
</slot>
|
|
@@ -117,18 +122,18 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.slideover ||
|
|
|
117
122
|
:aria-label="t('slideover.close')"
|
|
118
123
|
v-bind="typeof props.close === 'object' ? props.close : {}"
|
|
119
124
|
data-slot="close"
|
|
120
|
-
:class="ui.close({ class:
|
|
125
|
+
:class="ui.close({ class: uiProp?.close })"
|
|
121
126
|
/>
|
|
122
127
|
</slot>
|
|
123
128
|
</DialogClose>
|
|
124
129
|
</slot>
|
|
125
130
|
</div>
|
|
126
131
|
|
|
127
|
-
<div data-slot="body" :class="ui.body({ class:
|
|
132
|
+
<div data-slot="body" :class="ui.body({ class: uiProp?.body })">
|
|
128
133
|
<slot name="body" :close="close" />
|
|
129
134
|
</div>
|
|
130
135
|
|
|
131
|
-
<div v-if="!!slots.footer" data-slot="footer" :class="ui.footer({ class:
|
|
136
|
+
<div v-if="!!slots.footer" data-slot="footer" :class="ui.footer({ class: uiProp?.footer })">
|
|
132
137
|
<slot name="footer" :close="close" />
|
|
133
138
|
</div>
|
|
134
139
|
</slot>
|
|
@@ -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 & {
|
|
@@ -51,7 +51,7 @@ declare const __VLS_export: <T extends number | number[]>(__VLS_props: NonNullab
|
|
|
51
51
|
expose: (exposed: {}) => void;
|
|
52
52
|
attrs: any;
|
|
53
53
|
slots: {};
|
|
54
|
-
emit: ((evt: "change", event: Event) => void) & ((
|
|
54
|
+
emit: ((evt: "change", event: Event) => void) & ((event: "update:modelValue", value: T | undefined) => void);
|
|
55
55
|
}>) => import("vue").VNode & {
|
|
56
56
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
57
57
|
};
|
|
@@ -7,6 +7,7 @@ import { computed } from "vue";
|
|
|
7
7
|
import { SliderRoot, SliderRange, SliderTrack, SliderThumb, useForwardPropsEmits } 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 { useFormField } from "../composables/useFormField";
|
|
11
12
|
import { tv } from "../utils/tv";
|
|
12
13
|
import UTooltip from "./Tooltip.vue";
|
|
@@ -18,7 +19,7 @@ const props = defineProps({
|
|
|
18
19
|
tooltip: { type: [Boolean, Object], required: false },
|
|
19
20
|
defaultValue: { type: [Number, Array], required: false },
|
|
20
21
|
class: { type: null, required: false },
|
|
21
|
-
ui: { type:
|
|
22
|
+
ui: { type: Object, required: false },
|
|
22
23
|
name: { type: String, required: false },
|
|
23
24
|
disabled: { type: Boolean, required: false },
|
|
24
25
|
inverted: { type: Boolean, required: false },
|
|
@@ -30,6 +31,7 @@ const props = defineProps({
|
|
|
30
31
|
const emits = defineEmits(["change"]);
|
|
31
32
|
const modelValue = defineModel({ type: null });
|
|
32
33
|
const appConfig = useAppConfig();
|
|
34
|
+
const uiProp = useComponentUI("slider", props);
|
|
33
35
|
const rootProps = useForwardPropsEmits(reactivePick(props, "as", "orientation", "min", "max", "step", "minStepsBetweenThumbs", "inverted"), emits);
|
|
34
36
|
const { id, emitFormChange, emitFormInput, size, color, name, disabled, ariaAttrs } = useFormField(props);
|
|
35
37
|
const defaultSliderValue = computed(() => {
|
|
@@ -71,13 +73,13 @@ function onChange(value) {
|
|
|
71
73
|
:name="name"
|
|
72
74
|
:disabled="disabled"
|
|
73
75
|
data-slot="root"
|
|
74
|
-
:class="ui.root({ class: [
|
|
76
|
+
:class="ui.root({ class: [uiProp?.root, props.class] })"
|
|
75
77
|
:default-value="defaultSliderValue"
|
|
76
78
|
@update:model-value="emitFormInput()"
|
|
77
79
|
@value-commit="onChange"
|
|
78
80
|
>
|
|
79
|
-
<SliderTrack data-slot="track" :class="ui.track({ class:
|
|
80
|
-
<SliderRange data-slot="range" :class="ui.range({ class:
|
|
81
|
+
<SliderTrack data-slot="track" :class="ui.track({ class: uiProp?.track })">
|
|
82
|
+
<SliderRange data-slot="range" :class="ui.range({ class: uiProp?.range })" />
|
|
81
83
|
</SliderTrack>
|
|
82
84
|
|
|
83
85
|
<template v-for="thumb in thumbs" :key="thumb">
|
|
@@ -87,9 +89,9 @@ function onChange(value) {
|
|
|
87
89
|
disable-closing-trigger
|
|
88
90
|
v-bind="typeof tooltip === 'object' ? tooltip : {}"
|
|
89
91
|
>
|
|
90
|
-
<SliderThumb data-slot="thumb" :class="ui.thumb({ class:
|
|
92
|
+
<SliderThumb data-slot="thumb" :class="ui.thumb({ class: uiProp?.thumb })" :aria-label="thumbs === 1 ? 'Thumb' : `Thumb ${thumb} of ${thumbs}`" />
|
|
91
93
|
</UTooltip>
|
|
92
|
-
<SliderThumb v-else data-slot="thumb" :class="ui.thumb({ class:
|
|
94
|
+
<SliderThumb v-else data-slot="thumb" :class="ui.thumb({ class: uiProp?.thumb })" :aria-label="thumbs === 1 ? 'Thumb' : `Thumb ${thumb} of ${thumbs}`" />
|
|
93
95
|
</template>
|
|
94
96
|
</SliderRoot>
|
|
95
97
|
</template>
|
|
@@ -51,7 +51,7 @@ declare const __VLS_export: <T extends number | number[]>(__VLS_props: NonNullab
|
|
|
51
51
|
expose: (exposed: {}) => void;
|
|
52
52
|
attrs: any;
|
|
53
53
|
slots: {};
|
|
54
|
-
emit: ((evt: "change", event: Event) => void) & ((
|
|
54
|
+
emit: ((evt: "change", event: Event) => void) & ((event: "update:modelValue", value: T | undefined) => void);
|
|
55
55
|
}>) => import("vue").VNode & {
|
|
56
56
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
57
57
|
};
|
|
@@ -92,7 +92,7 @@ declare const __VLS_export: <T extends StepperItem>(__VLS_props: NonNullable<Awa
|
|
|
92
92
|
}>) => void;
|
|
93
93
|
attrs: any;
|
|
94
94
|
slots: StepperSlots<T>;
|
|
95
|
-
emit: (((evt: "next", value: T) => void) & ((evt: "prev", value: T) => void)) & ((
|
|
95
|
+
emit: (((evt: "next", value: T) => void) & ((evt: "prev", value: T) => void)) & ((event: "update:modelValue", value: string | number | undefined) => void);
|
|
96
96
|
}>) => import("vue").VNode & {
|
|
97
97
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
98
98
|
};
|
|
@@ -7,6 +7,7 @@ import { computed } from "vue";
|
|
|
7
7
|
import { StepperRoot, StepperItem, StepperTrigger, StepperIndicator, StepperSeparator, StepperTitle, StepperDescription, 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 { get } from "../utils";
|
|
12
13
|
import UIcon from "./Icon.vue";
|
|
@@ -20,13 +21,14 @@ const props = defineProps({
|
|
|
20
21
|
defaultValue: { type: [String, Number], required: false },
|
|
21
22
|
disabled: { type: Boolean, required: false },
|
|
22
23
|
class: { type: null, required: false },
|
|
23
|
-
ui: { type:
|
|
24
|
+
ui: { type: Object, required: false },
|
|
24
25
|
linear: { type: Boolean, required: false, default: true }
|
|
25
26
|
});
|
|
26
27
|
const emits = defineEmits(["next", "prev"]);
|
|
27
28
|
const slots = defineSlots();
|
|
28
29
|
const modelValue = defineModel({ type: [String, Number] });
|
|
29
30
|
const appConfig = useAppConfig();
|
|
31
|
+
const uiProp = useComponentUI("stepper", props);
|
|
30
32
|
const rootProps = useForwardProps(reactivePick(props, "as", "linear"));
|
|
31
33
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.stepper || {} })({
|
|
32
34
|
orientation: props.orientation,
|
|
@@ -64,21 +66,21 @@ defineExpose({
|
|
|
64
66
|
</script>
|
|
65
67
|
|
|
66
68
|
<template>
|
|
67
|
-
<StepperRoot v-bind="rootProps" v-model="currentStepIndex" :orientation="orientation" data-slot="root" :class="ui.root({ class: [
|
|
68
|
-
<div data-slot="header" :class="ui.header({ class:
|
|
69
|
+
<StepperRoot v-bind="rootProps" v-model="currentStepIndex" :orientation="orientation" data-slot="root" :class="ui.root({ class: [uiProp?.root, props.class] })">
|
|
70
|
+
<div data-slot="header" :class="ui.header({ class: uiProp?.header })">
|
|
69
71
|
<StepperItem
|
|
70
72
|
v-for="(item, count) in items"
|
|
71
73
|
:key="count"
|
|
72
74
|
:step="count"
|
|
73
75
|
:disabled="item.disabled || props.disabled"
|
|
74
76
|
data-slot="item"
|
|
75
|
-
:class="ui.item({ class: [
|
|
77
|
+
:class="ui.item({ class: [uiProp?.item, item.ui?.item, item.class] })"
|
|
76
78
|
>
|
|
77
|
-
<div data-slot="container" :class="ui.container({ class: [
|
|
78
|
-
<StepperTrigger data-slot="trigger" :class="ui.trigger({ class: [
|
|
79
|
-
<StepperIndicator data-slot="indicator" :class="ui.indicator({ class: [
|
|
79
|
+
<div data-slot="container" :class="ui.container({ class: [uiProp?.container, item.ui?.container] })">
|
|
80
|
+
<StepperTrigger data-slot="trigger" :class="ui.trigger({ class: [uiProp?.trigger, item.ui?.trigger] })">
|
|
81
|
+
<StepperIndicator data-slot="indicator" :class="ui.indicator({ class: [uiProp?.indicator, item.ui?.indicator] })">
|
|
80
82
|
<slot name="indicator" :item="item" :ui="ui">
|
|
81
|
-
<UIcon v-if="item.icon" :name="item.icon" data-slot="icon" :class="ui.icon({ class: [
|
|
83
|
+
<UIcon v-if="item.icon" :name="item.icon" data-slot="icon" :class="ui.icon({ class: [uiProp?.icon, item.ui?.icon] })" />
|
|
82
84
|
<template v-else>
|
|
83
85
|
{{ count + 1 }}
|
|
84
86
|
</template>
|
|
@@ -89,18 +91,18 @@ defineExpose({
|
|
|
89
91
|
<StepperSeparator
|
|
90
92
|
v-if="count < items.length - 1"
|
|
91
93
|
data-slot="separator"
|
|
92
|
-
:class="ui.separator({ class: [
|
|
94
|
+
:class="ui.separator({ class: [uiProp?.separator, item.ui?.separator] })"
|
|
93
95
|
/>
|
|
94
96
|
</div>
|
|
95
97
|
|
|
96
|
-
<div data-slot="wrapper" :class="ui.wrapper({ class: [
|
|
98
|
+
<div data-slot="wrapper" :class="ui.wrapper({ class: [uiProp?.wrapper, item.ui?.wrapper] })">
|
|
97
99
|
<slot :name="item.slot ? `${item.slot}-wrapper` : 'wrapper'" :item="item">
|
|
98
|
-
<StepperTitle v-if="item.title || !!slots[item.slot ? `${item.slot}-title` : 'title']" as="div" data-slot="title" :class="ui.title({ class: [
|
|
100
|
+
<StepperTitle v-if="item.title || !!slots[item.slot ? `${item.slot}-title` : 'title']" as="div" data-slot="title" :class="ui.title({ class: [uiProp?.title, item.ui?.title] })">
|
|
99
101
|
<slot :name="item.slot ? `${item.slot}-title` : 'title'" :item="item">
|
|
100
102
|
{{ item.title }}
|
|
101
103
|
</slot>
|
|
102
104
|
</StepperTitle>
|
|
103
|
-
<StepperDescription v-if="item.description || !!slots[item.slot ? `${item.slot}-description` : 'description']" as="div" data-slot="description" :class="ui.description({ class: [
|
|
105
|
+
<StepperDescription v-if="item.description || !!slots[item.slot ? `${item.slot}-description` : 'description']" as="div" data-slot="description" :class="ui.description({ class: [uiProp?.description, item.ui?.description] })">
|
|
104
106
|
<slot :name="item.slot ? `${item.slot}-description` : 'description'" :item="item">
|
|
105
107
|
{{ item.description }}
|
|
106
108
|
</slot>
|
|
@@ -110,7 +112,7 @@ defineExpose({
|
|
|
110
112
|
</StepperItem>
|
|
111
113
|
</div>
|
|
112
114
|
|
|
113
|
-
<div v-if="currentStep?.content || !!slots.content || currentStep?.slot && !!slots[currentStep.slot]" data-slot="content" :class="ui.content({ class:
|
|
115
|
+
<div v-if="currentStep?.content || !!slots.content || currentStep?.slot && !!slots[currentStep.slot]" data-slot="content" :class="ui.content({ class: uiProp?.content })">
|
|
114
116
|
<slot
|
|
115
117
|
:name="currentStep?.slot || 'content'"
|
|
116
118
|
:item="currentStep"
|
|
@@ -92,7 +92,7 @@ declare const __VLS_export: <T extends StepperItem>(__VLS_props: NonNullable<Awa
|
|
|
92
92
|
}>) => void;
|
|
93
93
|
attrs: any;
|
|
94
94
|
slots: StepperSlots<T>;
|
|
95
|
-
emit: (((evt: "next", value: T) => void) & ((evt: "prev", value: T) => void)) & ((
|
|
95
|
+
emit: (((evt: "next", value: T) => void) & ((evt: "prev", value: T) => void)) & ((event: "update:modelValue", value: string | number | undefined) => void);
|
|
96
96
|
}>) => import("vue").VNode & {
|
|
97
97
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
98
98
|
};
|
|
@@ -3,10 +3,11 @@ import theme from "#build/ui/switch";
|
|
|
3
3
|
</script>
|
|
4
4
|
|
|
5
5
|
<script setup>
|
|
6
|
-
import { computed, useId } from "vue";
|
|
6
|
+
import { computed, useAttrs, useId } from "vue";
|
|
7
7
|
import { Primitive, SwitchRoot, SwitchThumb, useForwardProps, Label } 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 { useFormField } from "../composables/useFormField";
|
|
11
12
|
import { tv } from "../utils/tv";
|
|
12
13
|
import UIcon from "./Icon.vue";
|
|
@@ -22,7 +23,7 @@ const props = defineProps({
|
|
|
22
23
|
label: { type: String, required: false },
|
|
23
24
|
description: { type: String, required: false },
|
|
24
25
|
class: { type: null, required: false },
|
|
25
|
-
ui: { type:
|
|
26
|
+
ui: { type: Object, required: false },
|
|
26
27
|
disabled: { type: Boolean, required: false },
|
|
27
28
|
id: { type: String, required: false },
|
|
28
29
|
name: { type: String, required: false },
|
|
@@ -34,9 +35,15 @@ const slots = defineSlots();
|
|
|
34
35
|
const emits = defineEmits(["change"]);
|
|
35
36
|
const modelValue = defineModel({ type: Boolean, ...{ default: void 0 } });
|
|
36
37
|
const appConfig = useAppConfig();
|
|
38
|
+
const uiProp = useComponentUI("switch", props);
|
|
37
39
|
const rootProps = useForwardProps(reactivePick(props, "required", "value", "defaultValue"));
|
|
38
40
|
const { id: _id, emitFormChange, emitFormInput, size, color, name, disabled, ariaAttrs } = useFormField(props);
|
|
39
41
|
const id = _id.value ?? useId();
|
|
42
|
+
const attrs = useAttrs();
|
|
43
|
+
const forwardedAttrs = computed(() => {
|
|
44
|
+
const { "data-state": _, ...rest } = attrs;
|
|
45
|
+
return rest;
|
|
46
|
+
});
|
|
40
47
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.switch || {} })({
|
|
41
48
|
size: size.value,
|
|
42
49
|
color: color.value,
|
|
@@ -53,34 +60,34 @@ function onUpdate(value) {
|
|
|
53
60
|
</script>
|
|
54
61
|
|
|
55
62
|
<template>
|
|
56
|
-
<Primitive :as="as" data-slot="root" :class="ui.root({ class: [
|
|
57
|
-
<div data-slot="container" :class="ui.container({ class:
|
|
63
|
+
<Primitive :as="as" data-slot="root" :class="ui.root({ class: [uiProp?.root, props.class] })">
|
|
64
|
+
<div data-slot="container" :class="ui.container({ class: uiProp?.container })">
|
|
58
65
|
<SwitchRoot
|
|
59
66
|
:id="id"
|
|
60
|
-
v-bind="{ ...rootProps,
|
|
67
|
+
v-bind="{ ...rootProps, ...forwardedAttrs, ...ariaAttrs }"
|
|
61
68
|
v-model="modelValue"
|
|
62
69
|
:name="name"
|
|
63
70
|
:disabled="disabled || loading"
|
|
64
71
|
data-slot="base"
|
|
65
|
-
:class="ui.base({ class:
|
|
72
|
+
:class="ui.base({ class: uiProp?.base })"
|
|
66
73
|
@update:model-value="onUpdate"
|
|
67
74
|
>
|
|
68
|
-
<SwitchThumb data-slot="thumb" :class="ui.thumb({ class:
|
|
69
|
-
<UIcon v-if="loading" :name="loadingIcon || appConfig.ui.icons.loading" data-slot="icon" :class="ui.icon({ class:
|
|
75
|
+
<SwitchThumb data-slot="thumb" :class="ui.thumb({ class: uiProp?.thumb })">
|
|
76
|
+
<UIcon v-if="loading" :name="loadingIcon || appConfig.ui.icons.loading" data-slot="icon" :class="ui.icon({ class: uiProp?.icon, checked: true, unchecked: true })" />
|
|
70
77
|
<template v-else>
|
|
71
|
-
<UIcon v-if="checkedIcon" :name="checkedIcon" data-slot="icon" :class="ui.icon({ class:
|
|
72
|
-
<UIcon v-if="uncheckedIcon" :name="uncheckedIcon" data-slot="icon" :class="ui.icon({ class:
|
|
78
|
+
<UIcon v-if="checkedIcon" :name="checkedIcon" data-slot="icon" :class="ui.icon({ class: uiProp?.icon, checked: true })" />
|
|
79
|
+
<UIcon v-if="uncheckedIcon" :name="uncheckedIcon" data-slot="icon" :class="ui.icon({ class: uiProp?.icon, unchecked: true })" />
|
|
73
80
|
</template>
|
|
74
81
|
</SwitchThumb>
|
|
75
82
|
</SwitchRoot>
|
|
76
83
|
</div>
|
|
77
|
-
<div v-if="label || !!slots.label || (description || !!slots.description)" data-slot="wrapper" :class="ui.wrapper({ class:
|
|
78
|
-
<Label v-if="label || !!slots.label" :for="id" data-slot="label" :class="ui.label({ class:
|
|
84
|
+
<div v-if="label || !!slots.label || (description || !!slots.description)" data-slot="wrapper" :class="ui.wrapper({ class: uiProp?.wrapper })">
|
|
85
|
+
<Label v-if="label || !!slots.label" :for="id" data-slot="label" :class="ui.label({ class: uiProp?.label })">
|
|
79
86
|
<slot name="label" :label="label">
|
|
80
87
|
{{ label }}
|
|
81
88
|
</slot>
|
|
82
89
|
</Label>
|
|
83
|
-
<p v-if="description || !!slots.description" data-slot="description" :class="ui.description({ class:
|
|
90
|
+
<p v-if="description || !!slots.description" data-slot="description" :class="ui.description({ class: uiProp?.description })">
|
|
84
91
|
<slot name="description" :description="description">
|
|
85
92
|
{{ description }}
|
|
86
93
|
</slot>
|
|
@@ -216,7 +216,7 @@ declare const __VLS_export: <T extends TableData>(__VLS_props: NonNullable<Await
|
|
|
216
216
|
}>) => void;
|
|
217
217
|
attrs: any;
|
|
218
218
|
slots: TableSlots<T>;
|
|
219
|
-
emit: ((
|
|
219
|
+
emit: ((event: "update:globalFilter", value: string | undefined) => void) & ((event: "update:columnFilters", value: ColumnFiltersState | undefined) => void) & ((event: "update:columnOrder", value: ColumnOrderState | undefined) => void) & ((event: "update:columnVisibility", value: VisibilityState | undefined) => void) & ((event: "update:columnPinning", value: ColumnPinningState | undefined) => void) & ((event: "update:columnSizing", value: ColumnSizingState | undefined) => void) & ((event: "update:columnSizingInfo", value: ColumnSizingInfoState | undefined) => void) & ((event: "update:rowSelection", value: RowSelectionState | undefined) => void) & ((event: "update:rowPinning", value: RowPinningState | undefined) => void) & ((event: "update:sorting", value: SortingState | undefined) => void) & ((event: "update:grouping", value: GroupingState | undefined) => void) & ((event: "update:expanded", value: ExpandedState | undefined) => void) & ((event: "update:pagination", value: PaginationState | undefined) => void);
|
|
220
220
|
}>) => import("vue").VNode & {
|
|
221
221
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
222
222
|
};
|
|
@@ -3,14 +3,15 @@ import theme from "#build/ui/table";
|
|
|
3
3
|
</script>
|
|
4
4
|
|
|
5
5
|
<script setup>
|
|
6
|
-
import {
|
|
6
|
+
import { computed, useTemplateRef, watch, toRef } from "vue";
|
|
7
7
|
import { Primitive, useForwardProps } from "reka-ui";
|
|
8
8
|
import { upperFirst } from "scule";
|
|
9
9
|
import { defu } from "defu";
|
|
10
10
|
import { FlexRender, getCoreRowModel, getFilteredRowModel, getSortedRowModel, getExpandedRowModel, useVueTable } from "@tanstack/vue-table";
|
|
11
11
|
import { useVirtualizer } from "@tanstack/vue-virtual";
|
|
12
|
-
import { reactivePick, createReusableTemplate } from "@vueuse/core";
|
|
12
|
+
import { reactivePick, createReusableTemplate, createRef } from "@vueuse/core";
|
|
13
13
|
import { useAppConfig } from "#imports";
|
|
14
|
+
import { useComponentUI } from "../composables/useComponentUI";
|
|
14
15
|
import { useLocale } from "../composables/useLocale";
|
|
15
16
|
import { tv } from "../utils/tv";
|
|
16
17
|
defineOptions({ inheritAttrs: false });
|
|
@@ -45,7 +46,7 @@ const props = defineProps({
|
|
|
45
46
|
onHover: { type: Function, required: false },
|
|
46
47
|
onContextmenu: { type: [Function, Array], required: false },
|
|
47
48
|
class: { type: null, required: false },
|
|
48
|
-
ui: { type:
|
|
49
|
+
ui: { type: Object, required: false },
|
|
49
50
|
state: { type: Object, required: false },
|
|
50
51
|
onStateChange: { type: Function, required: false },
|
|
51
52
|
renderFallbackValue: { type: null, required: false },
|
|
@@ -66,7 +67,8 @@ const props = defineProps({
|
|
|
66
67
|
const slots = defineSlots();
|
|
67
68
|
const { t } = useLocale();
|
|
68
69
|
const appConfig = useAppConfig();
|
|
69
|
-
const
|
|
70
|
+
const uiProp = useComponentUI("table", props);
|
|
71
|
+
const data = createRef(props.data ?? [], props.watchOptions?.deep !== false);
|
|
70
72
|
const meta = computed(() => props.meta ?? {});
|
|
71
73
|
const columns = computed(() => processColumns(props.columns ?? Object.keys(data.value[0] ?? {}).map((accessorKey) => ({ accessorKey, header: upperFirst(accessorKey) }))));
|
|
72
74
|
function processColumns(columns2) {
|
|
@@ -243,8 +245,8 @@ const renderedSize = computed(() => {
|
|
|
243
245
|
}
|
|
244
246
|
return virtualItems.reduce((sum, item) => sum + item.size, 0);
|
|
245
247
|
});
|
|
246
|
-
function valueUpdater(updaterOrValue,
|
|
247
|
-
|
|
248
|
+
function valueUpdater(updaterOrValue, ref) {
|
|
249
|
+
ref.value = typeof updaterOrValue === "function" ? updaterOrValue(ref.value) : updaterOrValue;
|
|
248
250
|
}
|
|
249
251
|
function onRowSelect(e, row) {
|
|
250
252
|
if (!props.onSelect) {
|
|
@@ -314,7 +316,7 @@ defineExpose({
|
|
|
314
316
|
data-slot="tr"
|
|
315
317
|
:class="ui.tr({
|
|
316
318
|
class: [
|
|
317
|
-
|
|
319
|
+
uiProp?.tr,
|
|
318
320
|
resolveValue(tableApi.options.meta?.class?.tr, row)
|
|
319
321
|
]
|
|
320
322
|
})"
|
|
@@ -333,7 +335,7 @@ defineExpose({
|
|
|
333
335
|
data-slot="td"
|
|
334
336
|
:class="ui.td({
|
|
335
337
|
class: [
|
|
336
|
-
|
|
338
|
+
uiProp?.td,
|
|
337
339
|
resolveValue(cell.column.columnDef.meta?.class?.td, cell)
|
|
338
340
|
],
|
|
339
341
|
pinned: !!cell.column.getIsPinned()
|
|
@@ -349,23 +351,23 @@ defineExpose({
|
|
|
349
351
|
</td>
|
|
350
352
|
</tr>
|
|
351
353
|
|
|
352
|
-
<tr v-if="row.getIsExpanded()" data-slot="tr" :class="ui.tr({ class: [
|
|
353
|
-
<td :colspan="row.getAllCells().length" data-slot="td" :class="ui.td({ class: [
|
|
354
|
+
<tr v-if="row.getIsExpanded()" data-slot="tr" :class="ui.tr({ class: [uiProp?.tr] })">
|
|
355
|
+
<td :colspan="row.getAllCells().length" data-slot="td" :class="ui.td({ class: [uiProp?.td] })">
|
|
354
356
|
<slot name="expanded" :row="row" />
|
|
355
357
|
</td>
|
|
356
358
|
</tr>
|
|
357
359
|
</DefineRowTemplate>
|
|
358
360
|
|
|
359
361
|
<DefineTableTemplate>
|
|
360
|
-
<table ref="tableRef" data-slot="base" :class="ui.base({ class: [
|
|
361
|
-
<caption v-if="caption || !!slots.caption" data-slot="caption" :class="ui.caption({ class: [
|
|
362
|
+
<table ref="tableRef" data-slot="base" :class="ui.base({ class: [uiProp?.base] })">
|
|
363
|
+
<caption v-if="caption || !!slots.caption" data-slot="caption" :class="ui.caption({ class: [uiProp?.caption] })">
|
|
362
364
|
<slot name="caption">
|
|
363
365
|
{{ caption }}
|
|
364
366
|
</slot>
|
|
365
367
|
</caption>
|
|
366
368
|
|
|
367
|
-
<thead data-slot="thead" :class="ui.thead({ class: [
|
|
368
|
-
<tr v-for="headerGroup in tableApi.getHeaderGroups()" :key="headerGroup.id" data-slot="tr" :class="ui.tr({ class: [
|
|
369
|
+
<thead data-slot="thead" :class="ui.thead({ class: [uiProp?.thead] })">
|
|
370
|
+
<tr v-for="headerGroup in tableApi.getHeaderGroups()" :key="headerGroup.id" data-slot="tr" :class="ui.tr({ class: [uiProp?.tr] })">
|
|
369
371
|
<th
|
|
370
372
|
v-for="header in headerGroup.headers"
|
|
371
373
|
:key="header.id"
|
|
@@ -376,7 +378,7 @@ defineExpose({
|
|
|
376
378
|
data-slot="th"
|
|
377
379
|
:class="ui.th({
|
|
378
380
|
class: [
|
|
379
|
-
|
|
381
|
+
uiProp?.th,
|
|
380
382
|
resolveValue(header.column.columnDef.meta?.class?.th, header)
|
|
381
383
|
],
|
|
382
384
|
pinned: !!header.column.getIsPinned()
|
|
@@ -392,10 +394,10 @@ defineExpose({
|
|
|
392
394
|
</th>
|
|
393
395
|
</tr>
|
|
394
396
|
|
|
395
|
-
<tr data-slot="separator" :class="ui.separator({ class: [
|
|
397
|
+
<tr data-slot="separator" :class="ui.separator({ class: [uiProp?.separator] })" />
|
|
396
398
|
</thead>
|
|
397
399
|
|
|
398
|
-
<tbody data-slot="tbody" :class="ui.tbody({ class: [
|
|
400
|
+
<tbody data-slot="tbody" :class="ui.tbody({ class: [uiProp?.tbody] })">
|
|
399
401
|
<slot name="body-top" />
|
|
400
402
|
|
|
401
403
|
<template v-if="rows.length">
|
|
@@ -417,13 +419,13 @@ defineExpose({
|
|
|
417
419
|
</template>
|
|
418
420
|
|
|
419
421
|
<tr v-else-if="loading && !!slots['loading']">
|
|
420
|
-
<td :colspan="tableApi.getAllLeafColumns().length" data-slot="loading" :class="ui.loading({ class:
|
|
422
|
+
<td :colspan="tableApi.getAllLeafColumns().length" data-slot="loading" :class="ui.loading({ class: uiProp?.loading })">
|
|
421
423
|
<slot name="loading" />
|
|
422
424
|
</td>
|
|
423
425
|
</tr>
|
|
424
426
|
|
|
425
427
|
<tr v-else>
|
|
426
|
-
<td :colspan="tableApi.getAllLeafColumns().length" data-slot="empty" :class="ui.empty({ class:
|
|
428
|
+
<td :colspan="tableApi.getAllLeafColumns().length" data-slot="empty" :class="ui.empty({ class: uiProp?.empty })">
|
|
427
429
|
<slot name="empty">
|
|
428
430
|
{{ empty || t("table.noData") }}
|
|
429
431
|
</slot>
|
|
@@ -436,14 +438,14 @@ defineExpose({
|
|
|
436
438
|
<tfoot
|
|
437
439
|
v-if="hasFooter"
|
|
438
440
|
data-slot="tfoot"
|
|
439
|
-
:class="ui.tfoot({ class: [
|
|
441
|
+
:class="ui.tfoot({ class: [uiProp?.tfoot] })"
|
|
440
442
|
:style="virtualizer ? {
|
|
441
443
|
transform: `translateY(${virtualizer.getTotalSize() - renderedSize}px)`
|
|
442
444
|
} : void 0"
|
|
443
445
|
>
|
|
444
|
-
<tr data-slot="separator" :class="ui.separator({ class: [
|
|
446
|
+
<tr data-slot="separator" :class="ui.separator({ class: [uiProp?.separator] })" />
|
|
445
447
|
|
|
446
|
-
<tr v-for="footerGroup in tableApi.getFooterGroups()" :key="footerGroup.id" data-slot="tr" :class="ui.tr({ class: [
|
|
448
|
+
<tr v-for="footerGroup in tableApi.getFooterGroups()" :key="footerGroup.id" data-slot="tr" :class="ui.tr({ class: [uiProp?.tr] })">
|
|
447
449
|
<th
|
|
448
450
|
v-for="header in footerGroup.headers"
|
|
449
451
|
:key="header.id"
|
|
@@ -453,7 +455,7 @@ defineExpose({
|
|
|
453
455
|
data-slot="th"
|
|
454
456
|
:class="ui.th({
|
|
455
457
|
class: [
|
|
456
|
-
|
|
458
|
+
uiProp?.th,
|
|
457
459
|
resolveValue(header.column.columnDef.meta?.class?.th, header)
|
|
458
460
|
],
|
|
459
461
|
pinned: !!header.column.getIsPinned()
|
|
@@ -472,7 +474,7 @@ defineExpose({
|
|
|
472
474
|
</table>
|
|
473
475
|
</DefineTableTemplate>
|
|
474
476
|
|
|
475
|
-
<Primitive ref="rootRef" :as="as" v-bind="$attrs" data-slot="root" :class="ui.root({ class: [
|
|
477
|
+
<Primitive ref="rootRef" :as="as" v-bind="$attrs" data-slot="root" :class="ui.root({ class: [uiProp?.root, props.class] })">
|
|
476
478
|
<div
|
|
477
479
|
v-if="virtualizer"
|
|
478
480
|
:style="{
|
|
@@ -216,7 +216,7 @@ declare const __VLS_export: <T extends TableData>(__VLS_props: NonNullable<Await
|
|
|
216
216
|
}>) => void;
|
|
217
217
|
attrs: any;
|
|
218
218
|
slots: TableSlots<T>;
|
|
219
|
-
emit: ((
|
|
219
|
+
emit: ((event: "update:globalFilter", value: string | undefined) => void) & ((event: "update:columnFilters", value: ColumnFiltersState | undefined) => void) & ((event: "update:columnOrder", value: ColumnOrderState | undefined) => void) & ((event: "update:columnVisibility", value: VisibilityState | undefined) => void) & ((event: "update:columnPinning", value: ColumnPinningState | undefined) => void) & ((event: "update:columnSizing", value: ColumnSizingState | undefined) => void) & ((event: "update:columnSizingInfo", value: ColumnSizingInfoState | undefined) => void) & ((event: "update:rowSelection", value: RowSelectionState | undefined) => void) & ((event: "update:rowPinning", value: RowPinningState | undefined) => void) & ((event: "update:sorting", value: SortingState | undefined) => void) & ((event: "update:grouping", value: GroupingState | undefined) => void) & ((event: "update:expanded", value: ExpandedState | undefined) => void) & ((event: "update:pagination", value: PaginationState | undefined) => void);
|
|
220
220
|
}>) => import("vue").VNode & {
|
|
221
221
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
222
222
|
};
|