@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,6 +7,7 @@ import { ref, computed } from "vue";
|
|
|
7
7
|
import { TabsRoot, TabsList, TabsIndicator, TabsTrigger, TabsContent, 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 { get } from "../utils";
|
|
11
12
|
import { tv } from "../utils/tv";
|
|
12
13
|
import UIcon from "./Icon.vue";
|
|
@@ -23,7 +24,7 @@ const props = defineProps({
|
|
|
23
24
|
valueKey: { type: null, required: false, default: "value" },
|
|
24
25
|
labelKey: { type: null, required: false, default: "label" },
|
|
25
26
|
class: { type: null, required: false },
|
|
26
|
-
ui: { type:
|
|
27
|
+
ui: { type: Object, required: false },
|
|
27
28
|
defaultValue: { type: [String, Number], required: false, default: "0" },
|
|
28
29
|
modelValue: { type: [String, Number], required: false },
|
|
29
30
|
activationMode: { type: String, required: false },
|
|
@@ -32,6 +33,7 @@ const props = defineProps({
|
|
|
32
33
|
const emits = defineEmits(["update:modelValue"]);
|
|
33
34
|
const slots = defineSlots();
|
|
34
35
|
const appConfig = useAppConfig();
|
|
36
|
+
const uiProp = useComponentUI("tabs", props);
|
|
35
37
|
const rootProps = useForwardPropsEmits(reactivePick(props, "as", "unmountOnHide"), emits);
|
|
36
38
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.tabs || {} })({
|
|
37
39
|
color: props.color,
|
|
@@ -40,6 +42,9 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.tabs || {} })
|
|
|
40
42
|
orientation: props.orientation
|
|
41
43
|
}));
|
|
42
44
|
const triggersRef = ref([]);
|
|
45
|
+
function setTriggerRef(index, el) {
|
|
46
|
+
triggersRef.value[index] = el;
|
|
47
|
+
}
|
|
43
48
|
defineExpose({
|
|
44
49
|
triggersRef
|
|
45
50
|
});
|
|
@@ -53,28 +58,28 @@ defineExpose({
|
|
|
53
58
|
:orientation="orientation"
|
|
54
59
|
:activation-mode="activationMode"
|
|
55
60
|
data-slot="root"
|
|
56
|
-
:class="ui.root({ class: [
|
|
61
|
+
:class="ui.root({ class: [uiProp?.root, props.class] })"
|
|
57
62
|
>
|
|
58
|
-
<TabsList data-slot="list" :class="ui.list({ class:
|
|
59
|
-
<TabsIndicator data-slot="indicator" :class="ui.indicator({ class:
|
|
63
|
+
<TabsList data-slot="list" :class="ui.list({ class: uiProp?.list })">
|
|
64
|
+
<TabsIndicator data-slot="indicator" :class="ui.indicator({ class: uiProp?.indicator })" />
|
|
60
65
|
|
|
61
66
|
<slot name="list-leading" />
|
|
62
67
|
|
|
63
68
|
<TabsTrigger
|
|
64
69
|
v-for="(item, index) of items"
|
|
65
70
|
:key="index"
|
|
66
|
-
:ref="(el) =>
|
|
71
|
+
:ref="(el) => setTriggerRef(index, el)"
|
|
67
72
|
:value="get(item, props.valueKey) ?? String(index)"
|
|
68
73
|
:disabled="item.disabled"
|
|
69
74
|
data-slot="trigger"
|
|
70
|
-
:class="ui.trigger({ class: [
|
|
75
|
+
:class="ui.trigger({ class: [uiProp?.trigger, item.ui?.trigger] })"
|
|
71
76
|
>
|
|
72
77
|
<slot name="leading" :item="item" :index="index" :ui="ui">
|
|
73
|
-
<UIcon v-if="item.icon" :name="item.icon" data-slot="leadingIcon" :class="ui.leadingIcon({ class: [
|
|
74
|
-
<UAvatar v-else-if="item.avatar" :size="item.ui?.leadingAvatarSize ||
|
|
78
|
+
<UIcon v-if="item.icon" :name="item.icon" data-slot="leadingIcon" :class="ui.leadingIcon({ class: [uiProp?.leadingIcon, item.ui?.leadingIcon] })" />
|
|
79
|
+
<UAvatar v-else-if="item.avatar" :size="item.ui?.leadingAvatarSize || uiProp?.leadingAvatarSize || ui.leadingAvatarSize()" v-bind="item.avatar" data-slot="leadingAvatar" :class="ui.leadingAvatar({ class: [uiProp?.leadingAvatar, item.ui?.leadingAvatar] })" />
|
|
75
80
|
</slot>
|
|
76
81
|
|
|
77
|
-
<span v-if="get(item, props.labelKey) || !!slots.default" data-slot="label" :class="ui.label({ class: [
|
|
82
|
+
<span v-if="get(item, props.labelKey) || !!slots.default" data-slot="label" :class="ui.label({ class: [uiProp?.label, item.ui?.label] })">
|
|
78
83
|
<slot :item="item" :index="index">{{ get(item, props.labelKey) }}</slot>
|
|
79
84
|
</span>
|
|
80
85
|
|
|
@@ -83,10 +88,10 @@ defineExpose({
|
|
|
83
88
|
v-if="item.badge || item.badge === 0"
|
|
84
89
|
color="neutral"
|
|
85
90
|
variant="outline"
|
|
86
|
-
:size="item.ui?.trailingBadgeSize ||
|
|
91
|
+
:size="item.ui?.trailingBadgeSize || uiProp?.trailingBadgeSize || ui.trailingBadgeSize()"
|
|
87
92
|
v-bind="typeof item.badge === 'string' || typeof item.badge === 'number' ? { label: item.badge } : item.badge"
|
|
88
93
|
data-slot="trailingBadge"
|
|
89
|
-
:class="ui.trailingBadge({ class: [
|
|
94
|
+
:class="ui.trailingBadge({ class: [uiProp?.trailingBadge, item.ui?.trailingBadge] })"
|
|
90
95
|
/>
|
|
91
96
|
</slot>
|
|
92
97
|
</TabsTrigger>
|
|
@@ -95,7 +100,7 @@ defineExpose({
|
|
|
95
100
|
</TabsList>
|
|
96
101
|
|
|
97
102
|
<template v-if="!!content">
|
|
98
|
-
<TabsContent v-for="(item, index) of items" :key="index" :value="get(item, props.valueKey) ?? String(index)" data-slot="content" :class="ui.content({ class: [
|
|
103
|
+
<TabsContent v-for="(item, index) of items" :key="index" :value="get(item, props.valueKey) ?? String(index)" data-slot="content" :class="ui.content({ class: [uiProp?.content, item.ui?.content, item.class] })">
|
|
99
104
|
<slot :name="item.slot || 'content'" :item="item" :index="index" :ui="ui">
|
|
100
105
|
{{ item.content }}
|
|
101
106
|
</slot>
|
|
@@ -2,11 +2,11 @@ import type { AppConfig } from '@nuxt/schema';
|
|
|
2
2
|
import theme from '#build/ui/textarea';
|
|
3
3
|
import type { UseComponentIconsProps } from '../composables/useComponentIcons';
|
|
4
4
|
import type { TextareaHTMLAttributes } from '../types/html';
|
|
5
|
-
import type { ModelModifiers } from '../types/input';
|
|
5
|
+
import type { ModelModifiers, ApplyModifiers } from '../types/input';
|
|
6
6
|
import type { ComponentConfig } from '../types/tv';
|
|
7
7
|
type Textarea = ComponentConfig<typeof theme, AppConfig, 'textarea'>;
|
|
8
8
|
type TextareaValue = string | number | null;
|
|
9
|
-
export interface TextareaProps<T extends TextareaValue = TextareaValue> extends UseComponentIconsProps, /** @vue-ignore */ Omit<TextareaHTMLAttributes, 'name' | 'placeholder' | 'required' | 'autofocus' | 'disabled' | 'rows'> {
|
|
9
|
+
export interface TextareaProps<T extends TextareaValue = TextareaValue, Mod extends ModelModifiers = ModelModifiers> extends UseComponentIconsProps, /** @vue-ignore */ Omit<TextareaHTMLAttributes, 'name' | 'placeholder' | 'required' | 'autofocus' | 'disabled' | 'rows'> {
|
|
10
10
|
/**
|
|
11
11
|
* The element or component this component should render as.
|
|
12
12
|
* @defaultValue 'div'
|
|
@@ -38,14 +38,16 @@ export interface TextareaProps<T extends TextareaValue = TextareaValue> extends
|
|
|
38
38
|
maxrows?: number;
|
|
39
39
|
/** Highlight the ring color like a focus state. */
|
|
40
40
|
highlight?: boolean;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
/** Keep the mobile text size on all breakpoints. */
|
|
42
|
+
fixed?: boolean;
|
|
43
|
+
defaultValue?: ApplyModifiers<T, Mod>;
|
|
44
|
+
modelValue?: ApplyModifiers<T, Mod>;
|
|
45
|
+
modelModifiers?: Mod;
|
|
44
46
|
class?: any;
|
|
45
47
|
ui?: Textarea['slots'];
|
|
46
48
|
}
|
|
47
|
-
export interface TextareaEmits<T extends TextareaValue = TextareaValue> {
|
|
48
|
-
'update:modelValue': [value: T];
|
|
49
|
+
export interface TextareaEmits<T extends TextareaValue = TextareaValue, Mod extends ModelModifiers = ModelModifiers> {
|
|
50
|
+
'update:modelValue': [value: ApplyModifiers<T, Mod>];
|
|
49
51
|
'blur': [event: FocusEvent];
|
|
50
52
|
'change': [event: Event];
|
|
51
53
|
}
|
|
@@ -62,11 +64,31 @@ export interface TextareaSlots {
|
|
|
62
64
|
}
|
|
63
65
|
declare const _default: typeof __VLS_export;
|
|
64
66
|
export default _default;
|
|
65
|
-
declare const __VLS_export: <T extends TextareaValue>(__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<{
|
|
66
|
-
props: import("vue").PublicProps & __VLS_PrettifyLocal<TextareaProps<T> & {
|
|
67
|
+
declare const __VLS_export: <T extends TextareaValue, Mod extends ModelModifiers = ModelModifiers>(__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<{
|
|
68
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<TextareaProps<T, Mod> & {
|
|
67
69
|
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
68
70
|
onChange?: ((event: Event) => any) | undefined;
|
|
69
|
-
"onUpdate:modelValue"?: ((value:
|
|
71
|
+
"onUpdate:modelValue"?: ((value: Mod extends {
|
|
72
|
+
number: true;
|
|
73
|
+
} ? (Mod extends {
|
|
74
|
+
optional: true;
|
|
75
|
+
} ? (Mod extends {
|
|
76
|
+
nullable: true;
|
|
77
|
+
} ? T | null : T) | undefined : Mod extends {
|
|
78
|
+
nullable: true;
|
|
79
|
+
} ? T | null : T) extends infer T_1 ? T_1 extends (Mod extends {
|
|
80
|
+
optional: true;
|
|
81
|
+
} ? (Mod extends {
|
|
82
|
+
nullable: true;
|
|
83
|
+
} ? T | null : T) | undefined : Mod extends {
|
|
84
|
+
nullable: true;
|
|
85
|
+
} ? T | null : T) ? T_1 extends string ? number | T_1 : T_1 : never : never : Mod extends {
|
|
86
|
+
optional: true;
|
|
87
|
+
} ? (Mod extends {
|
|
88
|
+
nullable: true;
|
|
89
|
+
} ? T | null : T) | undefined : Mod extends {
|
|
90
|
+
nullable: true;
|
|
91
|
+
} ? T | null : T) => any) | undefined;
|
|
70
92
|
}> & (typeof globalThis extends {
|
|
71
93
|
__VLS_PROPS_FALLBACK: infer P;
|
|
72
94
|
} ? P : {});
|
|
@@ -75,7 +97,27 @@ declare const __VLS_export: <T extends TextareaValue>(__VLS_props: NonNullable<A
|
|
|
75
97
|
}>) => void;
|
|
76
98
|
attrs: any;
|
|
77
99
|
slots: TextareaSlots;
|
|
78
|
-
emit: ((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "update:modelValue", value:
|
|
100
|
+
emit: ((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "update:modelValue", value: Mod extends {
|
|
101
|
+
number: true;
|
|
102
|
+
} ? (Mod extends {
|
|
103
|
+
optional: true;
|
|
104
|
+
} ? (Mod extends {
|
|
105
|
+
nullable: true;
|
|
106
|
+
} ? T | null : T) | undefined : Mod extends {
|
|
107
|
+
nullable: true;
|
|
108
|
+
} ? T | null : T) extends infer T_1 ? T_1 extends (Mod extends {
|
|
109
|
+
optional: true;
|
|
110
|
+
} ? (Mod extends {
|
|
111
|
+
nullable: true;
|
|
112
|
+
} ? T | null : T) | undefined : Mod extends {
|
|
113
|
+
nullable: true;
|
|
114
|
+
} ? T | null : T) ? T_1 extends string ? number | T_1 : T_1 : never : never : Mod extends {
|
|
115
|
+
optional: true;
|
|
116
|
+
} ? (Mod extends {
|
|
117
|
+
nullable: true;
|
|
118
|
+
} ? T | null : T) | undefined : Mod extends {
|
|
119
|
+
nullable: true;
|
|
120
|
+
} ? T | null : T) => void);
|
|
79
121
|
}>) => import("vue").VNode & {
|
|
80
122
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
81
123
|
};
|
|
@@ -7,6 +7,7 @@ import { useTemplateRef, computed, onMounted, nextTick, watch } from "vue";
|
|
|
7
7
|
import { Primitive } from "reka-ui";
|
|
8
8
|
import { useVModel } from "@vueuse/core";
|
|
9
9
|
import { useAppConfig } from "#imports";
|
|
10
|
+
import { useComponentUI } from "../composables/useComponentUI";
|
|
10
11
|
import { useComponentIcons } from "../composables/useComponentIcons";
|
|
11
12
|
import { useFormField } from "../composables/useFormField";
|
|
12
13
|
import { looseToNumber } from "../utils";
|
|
@@ -31,11 +32,12 @@ const props = defineProps({
|
|
|
31
32
|
rows: { type: Number, required: false, default: 3 },
|
|
32
33
|
maxrows: { type: Number, required: false, default: 0 },
|
|
33
34
|
highlight: { type: Boolean, required: false },
|
|
34
|
-
|
|
35
|
+
fixed: { type: Boolean, required: false },
|
|
35
36
|
defaultValue: { type: null, required: false },
|
|
36
|
-
|
|
37
|
+
modelValue: { type: null, required: false },
|
|
38
|
+
modelModifiers: { type: null, required: false },
|
|
37
39
|
class: { type: null, required: false },
|
|
38
|
-
ui: { type:
|
|
40
|
+
ui: { type: Object, required: false },
|
|
39
41
|
icon: { type: null, required: false },
|
|
40
42
|
avatar: { type: Object, required: false },
|
|
41
43
|
leading: { type: Boolean, required: false },
|
|
@@ -49,6 +51,7 @@ const emits = defineEmits(["update:modelValue", "blur", "change"]);
|
|
|
49
51
|
const slots = defineSlots();
|
|
50
52
|
const modelValue = useVModel(props, "modelValue", emits, { defaultValue: props.defaultValue });
|
|
51
53
|
const appConfig = useAppConfig();
|
|
54
|
+
const uiProp = useComponentUI("textarea", props);
|
|
52
55
|
const { emitFormFocus, emitFormBlur, emitFormInput, emitFormChange, size, color, id, name, highlight, disabled, ariaAttrs } = useFormField(props, { deferInputValidation: true });
|
|
53
56
|
const { isLeading, isTrailing, leadingIconName, trailingIconName } = useComponentIcons(props);
|
|
54
57
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.textarea || {} })({
|
|
@@ -57,13 +60,14 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.textarea || {
|
|
|
57
60
|
size: size?.value,
|
|
58
61
|
loading: props.loading,
|
|
59
62
|
highlight: highlight.value,
|
|
63
|
+
fixed: props.fixed,
|
|
60
64
|
autoresize: props.autoresize,
|
|
61
65
|
leading: isLeading.value || !!props.avatar || !!slots.leading,
|
|
62
66
|
trailing: isTrailing.value || !!slots.trailing
|
|
63
67
|
}));
|
|
64
68
|
const textareaRef = useTemplateRef("textareaRef");
|
|
65
69
|
function updateInput(value) {
|
|
66
|
-
if (props.modelModifiers?.trim) {
|
|
70
|
+
if (props.modelModifiers?.trim && (typeof value === "string" || value === null || value === void 0)) {
|
|
67
71
|
value = value?.trim() ?? null;
|
|
68
72
|
}
|
|
69
73
|
if (props.modelModifiers?.number) {
|
|
@@ -72,7 +76,7 @@ function updateInput(value) {
|
|
|
72
76
|
if (props.modelModifiers?.nullable) {
|
|
73
77
|
value ||= null;
|
|
74
78
|
}
|
|
75
|
-
if (props.modelModifiers?.optional) {
|
|
79
|
+
if (props.modelModifiers?.optional && !props.modelModifiers?.nullable && value !== null) {
|
|
76
80
|
value ||= void 0;
|
|
77
81
|
}
|
|
78
82
|
modelValue.value = value;
|
|
@@ -139,7 +143,7 @@ defineExpose({
|
|
|
139
143
|
</script>
|
|
140
144
|
|
|
141
145
|
<template>
|
|
142
|
-
<Primitive :as="as" data-slot="root" :class="ui.root({ class: [
|
|
146
|
+
<Primitive :as="as" data-slot="root" :class="ui.root({ class: [uiProp?.root, props.class] })">
|
|
143
147
|
<textarea
|
|
144
148
|
:id="id"
|
|
145
149
|
ref="textareaRef"
|
|
@@ -148,7 +152,7 @@ defineExpose({
|
|
|
148
152
|
:rows="rows"
|
|
149
153
|
:placeholder="placeholder"
|
|
150
154
|
data-slot="base"
|
|
151
|
-
:class="ui.base({ class:
|
|
155
|
+
:class="ui.base({ class: uiProp?.base })"
|
|
152
156
|
:disabled="disabled"
|
|
153
157
|
:required="required"
|
|
154
158
|
v-bind="{ ...$attrs, ...ariaAttrs }"
|
|
@@ -160,16 +164,16 @@ defineExpose({
|
|
|
160
164
|
|
|
161
165
|
<slot :ui="ui" />
|
|
162
166
|
|
|
163
|
-
<span v-if="isLeading || !!avatar || !!slots.leading" data-slot="leading" :class="ui.leading({ class:
|
|
167
|
+
<span v-if="isLeading || !!avatar || !!slots.leading" data-slot="leading" :class="ui.leading({ class: uiProp?.leading })">
|
|
164
168
|
<slot name="leading" :ui="ui">
|
|
165
|
-
<UIcon v-if="isLeading && leadingIconName" :name="leadingIconName" data-slot="leadingIcon" :class="ui.leadingIcon({ class:
|
|
166
|
-
<UAvatar v-else-if="!!avatar" :size="
|
|
169
|
+
<UIcon v-if="isLeading && leadingIconName" :name="leadingIconName" data-slot="leadingIcon" :class="ui.leadingIcon({ class: uiProp?.leadingIcon })" />
|
|
170
|
+
<UAvatar v-else-if="!!avatar" :size="uiProp?.leadingAvatarSize || ui.leadingAvatarSize()" v-bind="avatar" data-slot="leadingAvatar" :class="ui.leadingAvatar({ class: uiProp?.leadingAvatar })" />
|
|
167
171
|
</slot>
|
|
168
172
|
</span>
|
|
169
173
|
|
|
170
|
-
<span v-if="isTrailing || !!slots.trailing" data-slot="trailing" :class="ui.trailing({ class:
|
|
174
|
+
<span v-if="isTrailing || !!slots.trailing" data-slot="trailing" :class="ui.trailing({ class: uiProp?.trailing })">
|
|
171
175
|
<slot name="trailing" :ui="ui">
|
|
172
|
-
<UIcon v-if="trailingIconName" :name="trailingIconName" data-slot="trailingIcon" :class="ui.trailingIcon({ class:
|
|
176
|
+
<UIcon v-if="trailingIconName" :name="trailingIconName" data-slot="trailingIcon" :class="ui.trailingIcon({ class: uiProp?.trailingIcon })" />
|
|
173
177
|
</slot>
|
|
174
178
|
</span>
|
|
175
179
|
</Primitive>
|
|
@@ -2,11 +2,11 @@ import type { AppConfig } from '@nuxt/schema';
|
|
|
2
2
|
import theme from '#build/ui/textarea';
|
|
3
3
|
import type { UseComponentIconsProps } from '../composables/useComponentIcons';
|
|
4
4
|
import type { TextareaHTMLAttributes } from '../types/html';
|
|
5
|
-
import type { ModelModifiers } from '../types/input';
|
|
5
|
+
import type { ModelModifiers, ApplyModifiers } from '../types/input';
|
|
6
6
|
import type { ComponentConfig } from '../types/tv';
|
|
7
7
|
type Textarea = ComponentConfig<typeof theme, AppConfig, 'textarea'>;
|
|
8
8
|
type TextareaValue = string | number | null;
|
|
9
|
-
export interface TextareaProps<T extends TextareaValue = TextareaValue> extends UseComponentIconsProps, /** @vue-ignore */ Omit<TextareaHTMLAttributes, 'name' | 'placeholder' | 'required' | 'autofocus' | 'disabled' | 'rows'> {
|
|
9
|
+
export interface TextareaProps<T extends TextareaValue = TextareaValue, Mod extends ModelModifiers = ModelModifiers> extends UseComponentIconsProps, /** @vue-ignore */ Omit<TextareaHTMLAttributes, 'name' | 'placeholder' | 'required' | 'autofocus' | 'disabled' | 'rows'> {
|
|
10
10
|
/**
|
|
11
11
|
* The element or component this component should render as.
|
|
12
12
|
* @defaultValue 'div'
|
|
@@ -38,14 +38,16 @@ export interface TextareaProps<T extends TextareaValue = TextareaValue> extends
|
|
|
38
38
|
maxrows?: number;
|
|
39
39
|
/** Highlight the ring color like a focus state. */
|
|
40
40
|
highlight?: boolean;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
/** Keep the mobile text size on all breakpoints. */
|
|
42
|
+
fixed?: boolean;
|
|
43
|
+
defaultValue?: ApplyModifiers<T, Mod>;
|
|
44
|
+
modelValue?: ApplyModifiers<T, Mod>;
|
|
45
|
+
modelModifiers?: Mod;
|
|
44
46
|
class?: any;
|
|
45
47
|
ui?: Textarea['slots'];
|
|
46
48
|
}
|
|
47
|
-
export interface TextareaEmits<T extends TextareaValue = TextareaValue> {
|
|
48
|
-
'update:modelValue': [value: T];
|
|
49
|
+
export interface TextareaEmits<T extends TextareaValue = TextareaValue, Mod extends ModelModifiers = ModelModifiers> {
|
|
50
|
+
'update:modelValue': [value: ApplyModifiers<T, Mod>];
|
|
49
51
|
'blur': [event: FocusEvent];
|
|
50
52
|
'change': [event: Event];
|
|
51
53
|
}
|
|
@@ -62,11 +64,31 @@ export interface TextareaSlots {
|
|
|
62
64
|
}
|
|
63
65
|
declare const _default: typeof __VLS_export;
|
|
64
66
|
export default _default;
|
|
65
|
-
declare const __VLS_export: <T extends TextareaValue>(__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<{
|
|
66
|
-
props: import("vue").PublicProps & __VLS_PrettifyLocal<TextareaProps<T> & {
|
|
67
|
+
declare const __VLS_export: <T extends TextareaValue, Mod extends ModelModifiers = ModelModifiers>(__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<{
|
|
68
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<TextareaProps<T, Mod> & {
|
|
67
69
|
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
68
70
|
onChange?: ((event: Event) => any) | undefined;
|
|
69
|
-
"onUpdate:modelValue"?: ((value:
|
|
71
|
+
"onUpdate:modelValue"?: ((value: Mod extends {
|
|
72
|
+
number: true;
|
|
73
|
+
} ? (Mod extends {
|
|
74
|
+
optional: true;
|
|
75
|
+
} ? (Mod extends {
|
|
76
|
+
nullable: true;
|
|
77
|
+
} ? T | null : T) | undefined : Mod extends {
|
|
78
|
+
nullable: true;
|
|
79
|
+
} ? T | null : T) extends infer T_1 ? T_1 extends (Mod extends {
|
|
80
|
+
optional: true;
|
|
81
|
+
} ? (Mod extends {
|
|
82
|
+
nullable: true;
|
|
83
|
+
} ? T | null : T) | undefined : Mod extends {
|
|
84
|
+
nullable: true;
|
|
85
|
+
} ? T | null : T) ? T_1 extends string ? number | T_1 : T_1 : never : never : Mod extends {
|
|
86
|
+
optional: true;
|
|
87
|
+
} ? (Mod extends {
|
|
88
|
+
nullable: true;
|
|
89
|
+
} ? T | null : T) | undefined : Mod extends {
|
|
90
|
+
nullable: true;
|
|
91
|
+
} ? T | null : T) => any) | undefined;
|
|
70
92
|
}> & (typeof globalThis extends {
|
|
71
93
|
__VLS_PROPS_FALLBACK: infer P;
|
|
72
94
|
} ? P : {});
|
|
@@ -75,7 +97,27 @@ declare const __VLS_export: <T extends TextareaValue>(__VLS_props: NonNullable<A
|
|
|
75
97
|
}>) => void;
|
|
76
98
|
attrs: any;
|
|
77
99
|
slots: TextareaSlots;
|
|
78
|
-
emit: ((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "update:modelValue", value:
|
|
100
|
+
emit: ((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "update:modelValue", value: Mod extends {
|
|
101
|
+
number: true;
|
|
102
|
+
} ? (Mod extends {
|
|
103
|
+
optional: true;
|
|
104
|
+
} ? (Mod extends {
|
|
105
|
+
nullable: true;
|
|
106
|
+
} ? T | null : T) | undefined : Mod extends {
|
|
107
|
+
nullable: true;
|
|
108
|
+
} ? T | null : T) extends infer T_1 ? T_1 extends (Mod extends {
|
|
109
|
+
optional: true;
|
|
110
|
+
} ? (Mod extends {
|
|
111
|
+
nullable: true;
|
|
112
|
+
} ? T | null : T) | undefined : Mod extends {
|
|
113
|
+
nullable: true;
|
|
114
|
+
} ? T | null : T) ? T_1 extends string ? number | T_1 : T_1 : never : never : Mod extends {
|
|
115
|
+
optional: true;
|
|
116
|
+
} ? (Mod extends {
|
|
117
|
+
nullable: true;
|
|
118
|
+
} ? T | null : T) | undefined : Mod extends {
|
|
119
|
+
nullable: true;
|
|
120
|
+
} ? T | null : T) => void);
|
|
79
121
|
}>) => import("vue").VNode & {
|
|
80
122
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
81
123
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ThemeUI } from '../composables/useComponentUI';
|
|
2
|
+
export interface ThemeProps {
|
|
3
|
+
ui: ThemeUI;
|
|
4
|
+
}
|
|
5
|
+
export interface ThemeSlots {
|
|
6
|
+
default(props?: {}): any;
|
|
7
|
+
}
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
10
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ThemeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ThemeProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
11
|
+
default?: (props: {}) => any;
|
|
12
|
+
}>;
|
|
13
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { provideThemeContext } from "../composables/useComponentUI";
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<script setup>
|
|
7
|
+
const props = defineProps({
|
|
8
|
+
ui: { type: null, required: true }
|
|
9
|
+
});
|
|
10
|
+
provideThemeContext({
|
|
11
|
+
ui: computed(() => props.ui)
|
|
12
|
+
});
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<slot />
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ThemeUI } from '../composables/useComponentUI';
|
|
2
|
+
export interface ThemeProps {
|
|
3
|
+
ui: ThemeUI;
|
|
4
|
+
}
|
|
5
|
+
export interface ThemeSlots {
|
|
6
|
+
default(props?: {}): any;
|
|
7
|
+
}
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
10
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ThemeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ThemeProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
11
|
+
default?: (props: {}) => any;
|
|
12
|
+
}>;
|
|
13
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -75,7 +75,7 @@ declare const __VLS_export: <T extends TimelineItem>(__VLS_props: NonNullable<Aw
|
|
|
75
75
|
expose: (exposed: {}) => void;
|
|
76
76
|
attrs: any;
|
|
77
77
|
slots: TimelineSlots<T>;
|
|
78
|
-
emit: ((evt: "select", event: Event, item: T) => void) & ((
|
|
78
|
+
emit: ((evt: "select", event: Event, item: T) => void) & ((event: "update:modelValue", value: string | number | undefined) => void);
|
|
79
79
|
}>) => import("vue").VNode & {
|
|
80
80
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
81
81
|
};
|
|
@@ -6,6 +6,7 @@ import theme from "#build/ui/timeline";
|
|
|
6
6
|
import { computed } from "vue";
|
|
7
7
|
import { Primitive, Separator } from "reka-ui";
|
|
8
8
|
import { useAppConfig } from "#imports";
|
|
9
|
+
import { useComponentUI } from "../composables/useComponentUI";
|
|
9
10
|
import { tv } from "../utils/tv";
|
|
10
11
|
import { get } from "../utils";
|
|
11
12
|
import UAvatar from "./Avatar.vue";
|
|
@@ -19,12 +20,13 @@ const props = defineProps({
|
|
|
19
20
|
defaultValue: { type: [String, Number], required: false },
|
|
20
21
|
reverse: { type: Boolean, required: false },
|
|
21
22
|
class: { type: null, required: false },
|
|
22
|
-
ui: { type:
|
|
23
|
+
ui: { type: Object, required: false }
|
|
23
24
|
});
|
|
24
25
|
const emits = defineEmits(["select"]);
|
|
25
26
|
const slots = defineSlots();
|
|
26
27
|
const modelValue = defineModel({ type: [String, Number] });
|
|
27
28
|
const appConfig = useAppConfig();
|
|
29
|
+
const uiProp = useComponentUI("timeline", props);
|
|
28
30
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.timeline || {} })({
|
|
29
31
|
orientation: props.orientation,
|
|
30
32
|
size: props.size,
|
|
@@ -57,22 +59,22 @@ function onSelect(event, item) {
|
|
|
57
59
|
</script>
|
|
58
60
|
|
|
59
61
|
<template>
|
|
60
|
-
<Primitive :as="as" :data-orientation="orientation" data-slot="root" :class="ui.root({ class: [
|
|
62
|
+
<Primitive :as="as" :data-orientation="orientation" data-slot="root" :class="ui.root({ class: [uiProp?.root, props.class] })">
|
|
61
63
|
<div
|
|
62
64
|
v-for="(item, index) in items"
|
|
63
65
|
:key="index"
|
|
64
66
|
data-slot="item"
|
|
65
|
-
:class="ui.item({ class: [
|
|
67
|
+
:class="ui.item({ class: [uiProp?.item, item.ui?.item, item.class] })"
|
|
66
68
|
:data-state="getItemState(index)"
|
|
67
69
|
@click="onSelect($event, item)"
|
|
68
70
|
>
|
|
69
|
-
<div data-slot="container" :class="ui.container({ class: [
|
|
71
|
+
<div data-slot="container" :class="ui.container({ class: [uiProp?.container, item.ui?.container] })">
|
|
70
72
|
<UAvatar
|
|
71
73
|
:size="size"
|
|
72
74
|
:icon="item.icon"
|
|
73
75
|
v-bind="typeof item.avatar === 'object' ? item.avatar : {}"
|
|
74
76
|
data-slot="indicator"
|
|
75
|
-
:class="ui.indicator({ class: [
|
|
77
|
+
:class="ui.indicator({ class: [uiProp?.indicator, item.ui?.indicator] })"
|
|
76
78
|
:ui="{ icon: 'text-inherit', fallback: 'text-inherit' }"
|
|
77
79
|
>
|
|
78
80
|
<slot :name="item.slot ? `${item.slot}-indicator` : 'indicator'" :item="item" />
|
|
@@ -81,24 +83,24 @@ function onSelect(event, item) {
|
|
|
81
83
|
<Separator
|
|
82
84
|
v-if="index < items.length - 1"
|
|
83
85
|
data-slot="separator"
|
|
84
|
-
:class="ui.separator({ class: [
|
|
86
|
+
:class="ui.separator({ class: [uiProp?.separator, item.ui?.separator] })"
|
|
85
87
|
:orientation="props.orientation"
|
|
86
88
|
/>
|
|
87
89
|
</div>
|
|
88
90
|
|
|
89
|
-
<div data-slot="wrapper" :class="ui.wrapper({ class: [
|
|
91
|
+
<div data-slot="wrapper" :class="ui.wrapper({ class: [uiProp?.wrapper, item.ui?.wrapper] })">
|
|
90
92
|
<slot :name="item.slot ? `${item.slot}-wrapper` : 'wrapper'" :item="item">
|
|
91
|
-
<div v-if="item.date || !!slots[item.slot ? `${item.slot}-date` : 'date']" data-slot="date" :class="ui.date({ class: [
|
|
93
|
+
<div v-if="item.date || !!slots[item.slot ? `${item.slot}-date` : 'date']" data-slot="date" :class="ui.date({ class: [uiProp?.date, item.ui?.date] })">
|
|
92
94
|
<slot :name="item.slot ? `${item.slot}-date` : 'date'" :item="item">
|
|
93
95
|
{{ item.date }}
|
|
94
96
|
</slot>
|
|
95
97
|
</div>
|
|
96
|
-
<div v-if="item.title || !!slots[item.slot ? `${item.slot}-title` : 'title']" data-slot="title" :class="ui.title({ class: [
|
|
98
|
+
<div v-if="item.title || !!slots[item.slot ? `${item.slot}-title` : 'title']" data-slot="title" :class="ui.title({ class: [uiProp?.title, item.ui?.title] })">
|
|
97
99
|
<slot :name="item.slot ? `${item.slot}-title` : 'title'" :item="item">
|
|
98
100
|
{{ item.title }}
|
|
99
101
|
</slot>
|
|
100
102
|
</div>
|
|
101
|
-
<div v-if="item.description || !!slots[item.slot ? `${item.slot}-description` : 'description']" data-slot="description" :class="ui.description({ class: [
|
|
103
|
+
<div v-if="item.description || !!slots[item.slot ? `${item.slot}-description` : 'description']" data-slot="description" :class="ui.description({ class: [uiProp?.description, item.ui?.description] })">
|
|
102
104
|
<slot :name="item.slot ? `${item.slot}-description` : 'description'" :item="item">
|
|
103
105
|
{{ item.description }}
|
|
104
106
|
</slot>
|
|
@@ -75,7 +75,7 @@ declare const __VLS_export: <T extends TimelineItem>(__VLS_props: NonNullable<Aw
|
|
|
75
75
|
expose: (exposed: {}) => void;
|
|
76
76
|
attrs: any;
|
|
77
77
|
slots: TimelineSlots<T>;
|
|
78
|
-
emit: ((evt: "select", event: Event, item: T) => void) & ((
|
|
78
|
+
emit: ((evt: "select", event: Event, item: T) => void) & ((event: "update:modelValue", value: string | number | undefined) => void);
|
|
79
79
|
}>) => import("vue").VNode & {
|
|
80
80
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
81
81
|
};
|