@nuxt/ui 4.7.1 → 4.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.nuxt/{ui.css → ui.static.css} +0 -10
- package/LICENSE.md +1 -1
- package/cli/commands/make/component.mjs +6 -2
- package/cli/templates.mjs +46 -20
- package/cli/utils.mjs +19 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +4 -4
- package/dist/runtime/components/Accordion.vue +15 -14
- package/dist/runtime/components/Alert.vue +20 -20
- package/dist/runtime/components/AuthForm.vue +37 -37
- package/dist/runtime/components/Avatar.d.vue.ts +4 -0
- package/dist/runtime/components/Avatar.vue +14 -12
- package/dist/runtime/components/Avatar.vue.d.ts +4 -0
- package/dist/runtime/components/AvatarGroup.d.vue.ts +4 -0
- package/dist/runtime/components/AvatarGroup.vue +11 -8
- package/dist/runtime/components/AvatarGroup.vue.d.ts +4 -0
- package/dist/runtime/components/Badge.vue +11 -11
- package/dist/runtime/components/Banner.vue +25 -23
- package/dist/runtime/components/BlogPost.d.vue.ts +1 -1
- package/dist/runtime/components/BlogPost.vue +30 -28
- package/dist/runtime/components/BlogPost.vue.d.ts +1 -1
- package/dist/runtime/components/BlogPosts.vue +6 -6
- package/dist/runtime/components/Breadcrumb.d.vue.ts +4 -0
- package/dist/runtime/components/Breadcrumb.vue +21 -18
- package/dist/runtime/components/Breadcrumb.vue.d.ts +4 -0
- package/dist/runtime/components/Button.vue +16 -16
- package/dist/runtime/components/Calendar.vue +21 -20
- package/dist/runtime/components/Card.vue +11 -11
- package/dist/runtime/components/Carousel.vue +23 -22
- package/dist/runtime/components/ChangelogVersion.vue +31 -29
- package/dist/runtime/components/ChangelogVersions.vue +8 -8
- package/dist/runtime/components/ChatMessage.d.vue.ts +6 -0
- package/dist/runtime/components/ChatMessage.vue +46 -36
- package/dist/runtime/components/ChatMessage.vue.d.ts +6 -0
- package/dist/runtime/components/ChatMessages.vue +14 -14
- package/dist/runtime/components/ChatPalette.vue +6 -6
- package/dist/runtime/components/ChatPrompt.d.vue.ts +7 -0
- package/dist/runtime/components/ChatPrompt.vue +22 -12
- package/dist/runtime/components/ChatPrompt.vue.d.ts +7 -0
- package/dist/runtime/components/ChatPromptSubmit.d.vue.ts +3 -3
- package/dist/runtime/components/ChatPromptSubmit.vue +6 -6
- package/dist/runtime/components/ChatPromptSubmit.vue.d.ts +3 -3
- package/dist/runtime/components/ChatReasoning.vue +20 -20
- package/dist/runtime/components/ChatShimmer.vue +7 -7
- package/dist/runtime/components/ChatTool.d.vue.ts +1 -1
- package/dist/runtime/components/ChatTool.vue +19 -19
- package/dist/runtime/components/ChatTool.vue.d.ts +1 -1
- package/dist/runtime/components/Checkbox.d.vue.ts +2 -0
- package/dist/runtime/components/Checkbox.vue +25 -24
- package/dist/runtime/components/Checkbox.vue.d.ts +2 -0
- package/dist/runtime/components/CheckboxGroup.d.vue.ts +1 -1
- package/dist/runtime/components/CheckboxGroup.vue +17 -14
- package/dist/runtime/components/CheckboxGroup.vue.d.ts +1 -1
- package/dist/runtime/components/Chip.vue +8 -8
- package/dist/runtime/components/Collapsible.vue +8 -7
- package/dist/runtime/components/ColorPicker.d.vue.ts +2 -0
- package/dist/runtime/components/ColorPicker.vue +10 -10
- package/dist/runtime/components/ColorPicker.vue.d.ts +2 -0
- package/dist/runtime/components/CommandPalette.d.vue.ts +5 -5
- package/dist/runtime/components/CommandPalette.vue +92 -69
- package/dist/runtime/components/CommandPalette.vue.d.ts +5 -5
- package/dist/runtime/components/Container.vue +4 -4
- package/dist/runtime/components/ContextMenu.vue +16 -15
- package/dist/runtime/components/DashboardGroup.d.vue.ts +1 -1
- package/dist/runtime/components/DashboardGroup.vue +6 -4
- package/dist/runtime/components/DashboardGroup.vue.d.ts +1 -1
- package/dist/runtime/components/DashboardNavbar.vue +16 -16
- package/dist/runtime/components/DashboardPanel.vue +7 -7
- package/dist/runtime/components/DashboardResizeHandle.vue +5 -5
- package/dist/runtime/components/DashboardSearch.d.vue.ts +16 -1
- package/dist/runtime/components/DashboardSearch.vue +25 -12
- package/dist/runtime/components/DashboardSearch.vue.d.ts +16 -1
- package/dist/runtime/components/DashboardSearchButton.d.vue.ts +2 -2
- package/dist/runtime/components/DashboardSearchButton.vue +15 -15
- package/dist/runtime/components/DashboardSearchButton.vue.d.ts +2 -2
- package/dist/runtime/components/DashboardSidebar.d.vue.ts +1 -1
- package/dist/runtime/components/DashboardSidebar.vue +22 -22
- package/dist/runtime/components/DashboardSidebar.vue.d.ts +1 -1
- package/dist/runtime/components/DashboardSidebarCollapse.d.vue.ts +1 -1
- package/dist/runtime/components/DashboardSidebarCollapse.vue +5 -5
- package/dist/runtime/components/DashboardSidebarCollapse.vue.d.ts +1 -1
- package/dist/runtime/components/DashboardSidebarToggle.d.vue.ts +1 -1
- package/dist/runtime/components/DashboardSidebarToggle.vue +5 -5
- package/dist/runtime/components/DashboardSidebarToggle.vue.d.ts +1 -1
- package/dist/runtime/components/DashboardToolbar.vue +6 -6
- package/dist/runtime/components/Drawer.d.vue.ts +1 -1
- package/dist/runtime/components/Drawer.vue +23 -22
- package/dist/runtime/components/Drawer.vue.d.ts +1 -1
- package/dist/runtime/components/DropdownMenu.vue +21 -20
- package/dist/runtime/components/Editor.vue +8 -7
- package/dist/runtime/components/EditorDragHandle.d.vue.ts +2 -2
- package/dist/runtime/components/EditorDragHandle.vue +9 -8
- package/dist/runtime/components/EditorDragHandle.vue.d.ts +2 -2
- package/dist/runtime/components/EditorToolbar.vue +10 -9
- package/dist/runtime/components/Empty.vue +14 -14
- package/dist/runtime/components/Error.d.vue.ts +9 -1
- package/dist/runtime/components/Error.vue +17 -10
- package/dist/runtime/components/Error.vue.d.ts +9 -1
- package/dist/runtime/components/FieldGroup.vue +4 -4
- package/dist/runtime/components/FileUpload.vue +36 -37
- package/dist/runtime/components/Footer.vue +10 -10
- package/dist/runtime/components/FooterColumns.vue +15 -15
- package/dist/runtime/components/Form.d.vue.ts +1 -1
- package/dist/runtime/components/Form.vue +6 -5
- package/dist/runtime/components/Form.vue.d.ts +1 -1
- package/dist/runtime/components/FormField.d.vue.ts +1 -0
- package/dist/runtime/components/FormField.vue +21 -21
- package/dist/runtime/components/FormField.vue.d.ts +1 -0
- package/dist/runtime/components/Header.vue +19 -19
- package/dist/runtime/components/Icon.vue +2 -1
- package/dist/runtime/components/Input.vue +19 -19
- package/dist/runtime/components/InputDate.vue +21 -20
- package/dist/runtime/components/InputMenu.d.vue.ts +52 -51
- package/dist/runtime/components/InputMenu.vue +66 -63
- package/dist/runtime/components/InputMenu.vue.d.ts +52 -51
- package/dist/runtime/components/InputNumber.vue +25 -24
- package/dist/runtime/components/InputTags.vue +26 -25
- package/dist/runtime/components/InputTime.vue +21 -20
- package/dist/runtime/components/Kbd.vue +5 -5
- package/dist/runtime/components/Link.d.vue.ts +2 -2
- package/dist/runtime/components/Link.vue.d.ts +2 -2
- package/dist/runtime/components/LinkBase.d.vue.ts +1 -1
- package/dist/runtime/components/LinkBase.vue.d.ts +1 -1
- package/dist/runtime/components/Listbox.d.vue.ts +13 -9
- package/dist/runtime/components/Listbox.vue +34 -32
- package/dist/runtime/components/Listbox.vue.d.ts +13 -9
- package/dist/runtime/components/Main.vue +4 -4
- package/dist/runtime/components/Marquee.vue +5 -5
- package/dist/runtime/components/Modal.d.vue.ts +2 -2
- package/dist/runtime/components/Modal.vue +25 -24
- package/dist/runtime/components/Modal.vue.d.ts +2 -2
- package/dist/runtime/components/NavigationMenu.vue +66 -65
- package/dist/runtime/components/Page.vue +7 -7
- package/dist/runtime/components/PageAnchors.vue +11 -11
- package/dist/runtime/components/PageAside.vue +9 -9
- package/dist/runtime/components/PageBody.vue +4 -4
- package/dist/runtime/components/PageCTA.vue +18 -16
- package/dist/runtime/components/PageCard.vue +25 -23
- package/dist/runtime/components/PageColumns.vue +4 -4
- package/dist/runtime/components/PageFeature.vue +17 -15
- package/dist/runtime/components/PageGrid.vue +4 -4
- package/dist/runtime/components/PageHeader.vue +14 -14
- package/dist/runtime/components/PageHero.vue +20 -18
- package/dist/runtime/components/PageLinks.vue +12 -12
- package/dist/runtime/components/PageList.vue +4 -4
- package/dist/runtime/components/PageLogos.vue +16 -16
- package/dist/runtime/components/PageSection.d.vue.ts +1 -1
- package/dist/runtime/components/PageSection.vue +24 -22
- package/dist/runtime/components/PageSection.vue.d.ts +1 -1
- package/dist/runtime/components/Pagination.d.vue.ts +2 -2
- package/dist/runtime/components/Pagination.vue +23 -22
- package/dist/runtime/components/Pagination.vue.d.ts +2 -2
- package/dist/runtime/components/PinInput.vue +15 -14
- package/dist/runtime/components/Popover.vue +9 -8
- package/dist/runtime/components/PricingPlan.vue +36 -36
- package/dist/runtime/components/PricingPlans.vue +6 -6
- package/dist/runtime/components/PricingTable.vue +44 -44
- package/dist/runtime/components/Progress.d.vue.ts +1 -1
- package/dist/runtime/components/Progress.vue +12 -11
- package/dist/runtime/components/Progress.vue.d.ts +1 -1
- package/dist/runtime/components/RadioGroup.d.vue.ts +2 -0
- package/dist/runtime/components/RadioGroup.vue +28 -27
- package/dist/runtime/components/RadioGroup.vue.d.ts +2 -0
- package/dist/runtime/components/ScrollArea.vue +13 -13
- package/dist/runtime/components/Select.vue +38 -40
- package/dist/runtime/components/SelectMenu.d.vue.ts +46 -46
- package/dist/runtime/components/SelectMenu.vue +49 -48
- package/dist/runtime/components/SelectMenu.vue.d.ts +46 -46
- package/dist/runtime/components/Separator.d.vue.ts +9 -3
- package/dist/runtime/components/Separator.vue +29 -16
- package/dist/runtime/components/Separator.vue.d.ts +9 -3
- package/dist/runtime/components/Sidebar.vue +28 -28
- package/dist/runtime/components/Skeleton.vue +5 -5
- package/dist/runtime/components/Slideover.d.vue.ts +3 -3
- package/dist/runtime/components/Slideover.vue +24 -23
- package/dist/runtime/components/Slideover.vue.d.ts +3 -3
- package/dist/runtime/components/Slider.vue +16 -15
- package/dist/runtime/components/Stepper.vue +19 -18
- package/dist/runtime/components/Switch.d.vue.ts +2 -0
- package/dist/runtime/components/Switch.vue +26 -23
- package/dist/runtime/components/Switch.vue.d.ts +2 -0
- package/dist/runtime/components/Table.vue +26 -25
- package/dist/runtime/components/Tabs.vue +22 -21
- package/dist/runtime/components/Textarea.vue +19 -18
- package/dist/runtime/components/Theme.d.vue.ts +13 -5
- package/dist/runtime/components/Theme.vue +32 -4
- package/dist/runtime/components/Theme.vue.d.ts +13 -5
- package/dist/runtime/components/Timeline.vue +15 -15
- package/dist/runtime/components/Toast.vue +35 -34
- package/dist/runtime/components/Toaster.d.vue.ts +1 -1
- package/dist/runtime/components/Toaster.vue +10 -9
- package/dist/runtime/components/Toaster.vue.d.ts +1 -1
- package/dist/runtime/components/Tooltip.vue +13 -12
- package/dist/runtime/components/Tree.vue +24 -23
- package/dist/runtime/components/User.vue +23 -21
- package/dist/runtime/components/color-mode/ColorModeAvatar.vue +5 -2
- package/dist/runtime/components/color-mode/ColorModeButton.d.vue.ts +1 -1
- package/dist/runtime/components/color-mode/ColorModeButton.vue +8 -6
- package/dist/runtime/components/color-mode/ColorModeButton.vue.d.ts +1 -1
- package/dist/runtime/components/color-mode/ColorModeImage.vue +4 -2
- package/dist/runtime/components/color-mode/ColorModeSwitch.vue +1 -0
- package/dist/runtime/components/content/ContentNavigation.vue +31 -30
- package/dist/runtime/components/content/ContentSearch.d.vue.ts +31 -4
- package/dist/runtime/components/content/ContentSearch.vue +78 -33
- package/dist/runtime/components/content/ContentSearch.vue.d.ts +31 -4
- package/dist/runtime/components/content/ContentSearchButton.d.vue.ts +2 -2
- package/dist/runtime/components/content/ContentSearchButton.vue +15 -15
- package/dist/runtime/components/content/ContentSearchButton.vue.d.ts +2 -2
- package/dist/runtime/components/content/ContentSurround.vue +14 -12
- package/dist/runtime/components/content/ContentToc.vue +34 -33
- package/dist/runtime/components/prose/A.vue +4 -4
- package/dist/runtime/components/prose/Accordion.vue +4 -4
- package/dist/runtime/components/prose/AccordionItem.vue +5 -5
- package/dist/runtime/components/prose/Badge.vue +4 -4
- package/dist/runtime/components/prose/Blockquote.vue +4 -4
- package/dist/runtime/components/prose/Callout.vue +8 -8
- package/dist/runtime/components/prose/Card.vue +12 -12
- package/dist/runtime/components/prose/CardGroup.vue +4 -4
- package/dist/runtime/components/prose/Code.vue +4 -4
- package/dist/runtime/components/prose/CodeCollapse.vue +8 -8
- package/dist/runtime/components/prose/CodeGroup.vue +9 -9
- package/dist/runtime/components/prose/CodePreview.vue +6 -6
- package/dist/runtime/components/prose/CodeTree.vue +14 -14
- package/dist/runtime/components/prose/Collapsible.vue +7 -7
- package/dist/runtime/components/prose/Em.vue +4 -4
- package/dist/runtime/components/prose/Field.vue +13 -13
- package/dist/runtime/components/prose/FieldGroup.vue +4 -4
- package/dist/runtime/components/prose/H1.vue +5 -5
- package/dist/runtime/components/prose/H2.vue +7 -7
- package/dist/runtime/components/prose/H3.vue +7 -7
- package/dist/runtime/components/prose/H4.vue +5 -5
- package/dist/runtime/components/prose/Hr.vue +4 -4
- package/dist/runtime/components/prose/Icon.vue +4 -4
- package/dist/runtime/components/prose/Img.vue +12 -12
- package/dist/runtime/components/prose/Kbd.d.vue.ts +10 -2
- package/dist/runtime/components/prose/Kbd.vue +8 -5
- package/dist/runtime/components/prose/Kbd.vue.d.ts +10 -2
- package/dist/runtime/components/prose/Li.vue +4 -4
- package/dist/runtime/components/prose/Ol.vue +4 -4
- package/dist/runtime/components/prose/P.vue +4 -4
- package/dist/runtime/components/prose/Pre.vue +9 -9
- package/dist/runtime/components/prose/Prompt.vue +12 -12
- package/dist/runtime/components/prose/Steps.vue +4 -4
- package/dist/runtime/components/prose/Strong.vue +4 -4
- package/dist/runtime/components/prose/Table.vue +5 -5
- package/dist/runtime/components/prose/Tabs.vue +4 -4
- package/dist/runtime/components/prose/TabsItem.vue +5 -5
- package/dist/runtime/components/prose/Tbody.vue +4 -4
- package/dist/runtime/components/prose/Td.vue +4 -4
- package/dist/runtime/components/prose/Th.vue +4 -4
- package/dist/runtime/components/prose/Thead.vue +4 -4
- package/dist/runtime/components/prose/Tr.vue +4 -4
- package/dist/runtime/components/prose/Ul.vue +4 -4
- package/dist/runtime/composables/defineShortcuts.js +7 -2
- package/dist/runtime/composables/index.d.ts +1 -2
- package/dist/runtime/composables/index.js +1 -2
- package/dist/runtime/composables/useAvatarGroup.d.ts +12 -1
- package/dist/runtime/composables/useAvatarGroup.js +4 -2
- package/dist/runtime/composables/useComponentIcons.js +1 -1
- package/dist/runtime/composables/useComponentProps.d.ts +180 -0
- package/dist/runtime/composables/useComponentProps.js +59 -0
- package/dist/runtime/composables/useContentSearch.d.ts +4 -2
- package/dist/runtime/composables/useContentSearch.js +64 -7
- package/dist/runtime/composables/useFieldGroup.d.ts +9 -1
- package/dist/runtime/composables/useFormField.d.ts +21 -1
- package/dist/runtime/composables/useForwardProps.d.ts +13 -0
- package/dist/runtime/composables/useForwardProps.js +14 -0
- package/dist/runtime/composables/usePrefix.d.ts +6 -0
- package/dist/runtime/composables/usePrefix.js +11 -0
- package/dist/runtime/composables/useResizable.d.ts +4 -0
- package/dist/runtime/composables/useResizable.js +1 -1
- package/dist/runtime/locale/ar.js +1 -0
- package/dist/runtime/locale/az.js +1 -0
- package/dist/runtime/locale/be.js +1 -0
- package/dist/runtime/locale/bg.js +1 -0
- package/dist/runtime/locale/bn.js +1 -0
- package/dist/runtime/locale/ca.js +1 -0
- package/dist/runtime/locale/ckb.js +1 -0
- package/dist/runtime/locale/cs.js +1 -0
- package/dist/runtime/locale/da.js +1 -0
- package/dist/runtime/locale/de.js +1 -0
- package/dist/runtime/locale/de_ch.js +1 -0
- package/dist/runtime/locale/el.js +1 -0
- package/dist/runtime/locale/en.js +1 -0
- package/dist/runtime/locale/es.js +1 -0
- package/dist/runtime/locale/et.js +1 -0
- package/dist/runtime/locale/eu.js +1 -0
- package/dist/runtime/locale/fa_ir.js +1 -0
- package/dist/runtime/locale/fi.js +1 -0
- package/dist/runtime/locale/fr.js +1 -0
- package/dist/runtime/locale/gl.js +1 -0
- package/dist/runtime/locale/he.js +1 -0
- package/dist/runtime/locale/hi.js +1 -0
- package/dist/runtime/locale/hr.js +1 -0
- package/dist/runtime/locale/hu.js +1 -0
- package/dist/runtime/locale/hy.js +1 -0
- package/dist/runtime/locale/id.js +1 -0
- package/dist/runtime/locale/is.js +1 -0
- package/dist/runtime/locale/it.js +1 -0
- package/dist/runtime/locale/ja.js +1 -0
- package/dist/runtime/locale/ka.js +1 -0
- package/dist/runtime/locale/kk.js +1 -0
- package/dist/runtime/locale/km.js +1 -0
- package/dist/runtime/locale/ko.js +1 -0
- package/dist/runtime/locale/ky.js +1 -0
- package/dist/runtime/locale/lb.js +1 -0
- package/dist/runtime/locale/lo.js +1 -0
- package/dist/runtime/locale/lt.js +1 -0
- package/dist/runtime/locale/mn.js +1 -0
- package/dist/runtime/locale/ms.js +1 -0
- package/dist/runtime/locale/nb_no.js +1 -0
- package/dist/runtime/locale/nl.js +1 -0
- package/dist/runtime/locale/pl.js +1 -0
- package/dist/runtime/locale/pt.js +1 -0
- package/dist/runtime/locale/pt_br.js +1 -0
- package/dist/runtime/locale/ro.js +1 -0
- package/dist/runtime/locale/ru.js +1 -0
- package/dist/runtime/locale/sk.js +1 -0
- package/dist/runtime/locale/sl.js +1 -0
- package/dist/runtime/locale/sq.js +1 -0
- package/dist/runtime/locale/sv.js +1 -0
- package/dist/runtime/locale/th.js +7 -6
- package/dist/runtime/locale/tj.js +1 -0
- package/dist/runtime/locale/tr.js +1 -0
- package/dist/runtime/locale/ug_cn.js +1 -0
- package/dist/runtime/locale/uk.js +1 -0
- package/dist/runtime/locale/ur.js +1 -0
- package/dist/runtime/locale/uz.js +1 -0
- package/dist/runtime/locale/vi.js +1 -0
- package/dist/runtime/locale/zh_cn.js +1 -0
- package/dist/runtime/locale/zh_tw.js +1 -0
- package/dist/runtime/plugins/colors.js +1 -1
- package/dist/runtime/types/content.d.ts +1 -0
- package/dist/runtime/types/content.js +1 -0
- package/dist/runtime/types/form.d.ts +2 -2
- package/dist/runtime/types/locale.d.ts +1 -0
- package/dist/runtime/types/tv.d.ts +13 -7
- package/dist/runtime/types/utils.d.ts +3 -0
- package/dist/runtime/utils/dashboard.d.ts +1 -1
- package/dist/runtime/utils/{fuse.d.ts → search.d.ts} +2 -1
- package/dist/runtime/utils/{fuse.js → search.js} +11 -2
- package/dist/runtime/vue/components/color-mode/ColorModeSwitch.vue +1 -0
- package/dist/runtime/vue/overrides/inertia/Link.d.vue.ts +2 -2
- package/dist/runtime/vue/overrides/inertia/Link.vue +5 -0
- package/dist/runtime/vue/overrides/inertia/Link.vue.d.ts +2 -2
- package/dist/runtime/vue/overrides/inertia/LinkBase.d.vue.ts +1 -1
- package/dist/runtime/vue/overrides/inertia/LinkBase.vue.d.ts +1 -1
- package/dist/runtime/vue/overrides/none/Link.d.vue.ts +2 -2
- package/dist/runtime/vue/overrides/none/Link.vue.d.ts +2 -2
- package/dist/runtime/vue/overrides/vue-router/Link.d.vue.ts +2 -2
- package/dist/runtime/vue/overrides/vue-router/Link.vue.d.ts +2 -2
- package/dist/shared/{ui.C6mn7iap.mjs → ui.BzjkAvk7.mjs} +244 -78
- package/dist/unplugin.mjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +46 -53
- package/dist/runtime/composables/useComponentUI.d.ts +0 -33
- package/dist/runtime/composables/useComponentUI.js +0 -13
- package/dist/runtime/composables/useResolvedVariants.d.ts +0 -21
- package/dist/runtime/composables/useResolvedVariants.js +0 -14
|
@@ -8,7 +8,7 @@ import { Primitive } from "reka-ui";
|
|
|
8
8
|
import { defu } from "defu";
|
|
9
9
|
import { createReusableTemplate } from "@vueuse/core";
|
|
10
10
|
import { useAppConfig, useRoute } from "#imports";
|
|
11
|
-
import {
|
|
11
|
+
import { useComponentProps } from "../composables/useComponentProps";
|
|
12
12
|
import { useLocale } from "../composables/useLocale";
|
|
13
13
|
import { getSlotChildrenText } from "../utils";
|
|
14
14
|
import { tv } from "../utils/tv";
|
|
@@ -19,7 +19,7 @@ import USlideover from "./Slideover.vue";
|
|
|
19
19
|
import UModal from "./Modal.vue";
|
|
20
20
|
import UDrawer from "./Drawer.vue";
|
|
21
21
|
defineOptions({ inheritAttrs: false });
|
|
22
|
-
const
|
|
22
|
+
const _props = defineProps({
|
|
23
23
|
as: { type: null, required: false, default: "header" },
|
|
24
24
|
title: { type: String, required: false, default: "Nuxt UI" },
|
|
25
25
|
to: { type: String, required: false, default: "/" },
|
|
@@ -32,11 +32,11 @@ const props = defineProps({
|
|
|
32
32
|
ui: { type: Object, required: false }
|
|
33
33
|
});
|
|
34
34
|
const slots = defineSlots();
|
|
35
|
+
const props = useComponentProps("header", _props);
|
|
35
36
|
const open = defineModel("open", { type: Boolean, ...{ default: false } });
|
|
36
37
|
const route = useRoute();
|
|
37
38
|
const { t } = useLocale();
|
|
38
39
|
const appConfig = useAppConfig();
|
|
39
|
-
const uiProp = useComponentUI("header", props);
|
|
40
40
|
const [DefineLeftTemplate, ReuseLeftTemplate] = createReusableTemplate();
|
|
41
41
|
const [DefineRightTemplate, ReuseRightTemplate] = createReusableTemplate();
|
|
42
42
|
const [DefineToggleTemplate, ReuseToggleTemplate] = createReusableTemplate();
|
|
@@ -64,27 +64,27 @@ function toggleOpen() {
|
|
|
64
64
|
<DefineToggleTemplate>
|
|
65
65
|
<slot name="toggle" :open="open" :toggle="toggleOpen" :ui="ui">
|
|
66
66
|
<UButton
|
|
67
|
-
v-if="toggle"
|
|
67
|
+
v-if="props.toggle"
|
|
68
68
|
color="neutral"
|
|
69
69
|
variant="ghost"
|
|
70
70
|
:aria-label="open ? t('header.close') : t('header.open')"
|
|
71
71
|
:icon="open ? appConfig.ui.icons.close : appConfig.ui.icons.menu"
|
|
72
|
-
v-bind="typeof toggle === 'object' ? toggle : {}"
|
|
72
|
+
v-bind="typeof props.toggle === 'object' ? props.toggle : {}"
|
|
73
73
|
data-slot="toggle"
|
|
74
|
-
:class="ui.toggle({ class:
|
|
74
|
+
:class="ui.toggle({ class: props.ui?.toggle, toggleSide: props.toggleSide })"
|
|
75
75
|
@click="toggleOpen"
|
|
76
76
|
/>
|
|
77
77
|
</slot>
|
|
78
78
|
</DefineToggleTemplate>
|
|
79
79
|
|
|
80
80
|
<DefineLeftTemplate>
|
|
81
|
-
<div data-slot="left" :class="ui.left({ class:
|
|
82
|
-
<ReuseToggleTemplate v-if="toggleSide === 'left'" />
|
|
81
|
+
<div data-slot="left" :class="ui.left({ class: props.ui?.left })">
|
|
82
|
+
<ReuseToggleTemplate v-if="props.toggleSide === 'left'" />
|
|
83
83
|
|
|
84
84
|
<slot name="left">
|
|
85
|
-
<ULink :to="to" :aria-label="ariaLabel" data-slot="title" :class="ui.title({ class:
|
|
85
|
+
<ULink :to="props.to" :aria-label="ariaLabel" data-slot="title" :class="ui.title({ class: props.ui?.title })">
|
|
86
86
|
<slot name="title">
|
|
87
|
-
{{ title }}
|
|
87
|
+
{{ props.title }}
|
|
88
88
|
</slot>
|
|
89
89
|
</ULink>
|
|
90
90
|
</slot>
|
|
@@ -92,20 +92,20 @@ function toggleOpen() {
|
|
|
92
92
|
</DefineLeftTemplate>
|
|
93
93
|
|
|
94
94
|
<DefineRightTemplate>
|
|
95
|
-
<div data-slot="right" :class="ui.right({ class:
|
|
95
|
+
<div data-slot="right" :class="ui.right({ class: props.ui?.right })">
|
|
96
96
|
<slot name="right" />
|
|
97
97
|
|
|
98
|
-
<ReuseToggleTemplate v-if="toggleSide === 'right'" />
|
|
98
|
+
<ReuseToggleTemplate v-if="props.toggleSide === 'right'" />
|
|
99
99
|
</div>
|
|
100
100
|
</DefineRightTemplate>
|
|
101
101
|
|
|
102
|
-
<Primitive :as="as" v-bind="$attrs" data-slot="root" :class="ui.root({ class: [
|
|
102
|
+
<Primitive :as="props.as" v-bind="$attrs" data-slot="root" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
103
103
|
<slot name="top" />
|
|
104
104
|
|
|
105
|
-
<UContainer data-slot="container" :class="ui.container({ class:
|
|
105
|
+
<UContainer data-slot="container" :class="ui.container({ class: props.ui?.container })">
|
|
106
106
|
<ReuseLeftTemplate />
|
|
107
107
|
|
|
108
|
-
<div data-slot="center" :class="ui.center({ class:
|
|
108
|
+
<div data-slot="center" :class="ui.center({ class: props.ui?.center })">
|
|
109
109
|
<slot />
|
|
110
110
|
</div>
|
|
111
111
|
|
|
@@ -121,19 +121,19 @@ function toggleOpen() {
|
|
|
121
121
|
:description="t('header.description')"
|
|
122
122
|
v-bind="menuProps"
|
|
123
123
|
:ui="{
|
|
124
|
-
overlay: ui.overlay({ class:
|
|
125
|
-
content: ui.content({ class:
|
|
124
|
+
overlay: ui.overlay({ class: props.ui?.overlay }),
|
|
125
|
+
content: ui.content({ class: props.ui?.content })
|
|
126
126
|
}"
|
|
127
127
|
>
|
|
128
128
|
<template #content="contentData">
|
|
129
129
|
<slot name="content" v-bind="contentData">
|
|
130
|
-
<div v-if="mode !== 'drawer'" data-slot="header" :class="ui.header({ class:
|
|
130
|
+
<div v-if="props.mode !== 'drawer'" data-slot="header" :class="ui.header({ class: props.ui?.header })">
|
|
131
131
|
<ReuseLeftTemplate />
|
|
132
132
|
|
|
133
133
|
<ReuseRightTemplate />
|
|
134
134
|
</div>
|
|
135
135
|
|
|
136
|
-
<div data-slot="body" :class="ui.body({ class:
|
|
136
|
+
<div data-slot="body" :class="ui.body({ class: props.ui?.body })">
|
|
137
137
|
<slot name="body" />
|
|
138
138
|
</div>
|
|
139
139
|
</slot>
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { useForwardProps } from "reka-ui";
|
|
7
7
|
import { reactivePick } from "@vueuse/core";
|
|
8
|
+
import NuxtIcon from "@nuxt/icon/runtime/components/index.js";
|
|
8
9
|
const props = defineProps({
|
|
9
10
|
name: { type: null, required: true },
|
|
10
11
|
mode: { type: String, required: false },
|
|
@@ -15,6 +16,6 @@ const iconProps = useForwardProps(reactivePick(props, "mode", "size", "customize
|
|
|
15
16
|
</script>
|
|
16
17
|
|
|
17
18
|
<template>
|
|
18
|
-
<
|
|
19
|
+
<NuxtIcon v-if="typeof name === 'string'" :name="name" v-bind="iconProps" />
|
|
19
20
|
<component :is="name" v-else />
|
|
20
21
|
</template>
|
|
@@ -7,7 +7,7 @@ import { useTemplateRef, computed, onMounted } from "vue";
|
|
|
7
7
|
import { Primitive } from "reka-ui";
|
|
8
8
|
import { useVModel } from "@vueuse/core";
|
|
9
9
|
import { useAppConfig } from "#imports";
|
|
10
|
-
import {
|
|
10
|
+
import { useComponentProps } from "../composables/useComponentProps";
|
|
11
11
|
import { useFieldGroup } from "../composables/useFieldGroup";
|
|
12
12
|
import { useComponentIcons } from "../composables/useComponentIcons";
|
|
13
13
|
import { useFormField } from "../composables/useFormField";
|
|
@@ -16,7 +16,7 @@ import { tv } from "../utils/tv";
|
|
|
16
16
|
import UIcon from "./Icon.vue";
|
|
17
17
|
import UAvatar from "./Avatar.vue";
|
|
18
18
|
defineOptions({ inheritAttrs: false });
|
|
19
|
-
const
|
|
19
|
+
const _props = defineProps({
|
|
20
20
|
as: { type: null, required: false },
|
|
21
21
|
id: { type: String, required: false },
|
|
22
22
|
name: { type: String, required: false },
|
|
@@ -48,20 +48,20 @@ const props = defineProps({
|
|
|
48
48
|
});
|
|
49
49
|
const emits = defineEmits(["update:modelValue", "blur", "change"]);
|
|
50
50
|
const slots = defineSlots();
|
|
51
|
+
const props = useComponentProps("input", _props);
|
|
51
52
|
const modelValue = useVModel(props, "modelValue", emits, { defaultValue: props.defaultValue });
|
|
52
53
|
const appConfig = useAppConfig();
|
|
53
|
-
const
|
|
54
|
-
const {
|
|
55
|
-
const { orientation, size: fieldGroupSize } = useFieldGroup(props);
|
|
54
|
+
const { emitFormBlur, emitFormInput, emitFormChange, size: formFieldSize, color, id, name, highlight, disabled, emitFormFocus, ariaAttrs } = useFormField(_props, { deferInputValidation: true });
|
|
55
|
+
const { orientation, size: fieldGroupSize } = useFieldGroup(_props);
|
|
56
56
|
const { isLeading, isTrailing, leadingIconName, trailingIconName } = useComponentIcons(props);
|
|
57
57
|
const inputSize = computed(() => fieldGroupSize.value || formFieldSize.value);
|
|
58
58
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.input || {} })({
|
|
59
59
|
type: props.type,
|
|
60
|
-
color: color.value,
|
|
60
|
+
color: color.value ?? props.color,
|
|
61
61
|
variant: props.variant,
|
|
62
|
-
size: inputSize?.value,
|
|
62
|
+
size: inputSize?.value ?? props.size,
|
|
63
63
|
loading: props.loading,
|
|
64
|
-
highlight: highlight.value,
|
|
64
|
+
highlight: highlight.value ?? props.highlight,
|
|
65
65
|
fixed: props.fixed,
|
|
66
66
|
leading: isLeading.value || !!props.avatar || !!slots.leading,
|
|
67
67
|
trailing: isTrailing.value || !!slots.trailing,
|
|
@@ -120,19 +120,19 @@ defineExpose({
|
|
|
120
120
|
</script>
|
|
121
121
|
|
|
122
122
|
<template>
|
|
123
|
-
<Primitive :as="as" data-slot="root" :class="ui.root({ class: [
|
|
123
|
+
<Primitive :as="props.as" data-slot="root" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
124
124
|
<input
|
|
125
125
|
:id="id"
|
|
126
126
|
ref="inputRef"
|
|
127
|
-
:type="type"
|
|
127
|
+
:type="props.type"
|
|
128
128
|
:value="modelValue"
|
|
129
129
|
:name="name"
|
|
130
|
-
:placeholder="placeholder"
|
|
130
|
+
:placeholder="props.placeholder"
|
|
131
131
|
data-slot="base"
|
|
132
|
-
:class="ui.base({ class:
|
|
132
|
+
:class="ui.base({ class: props.ui?.base })"
|
|
133
133
|
:disabled="disabled"
|
|
134
|
-
:required="required"
|
|
135
|
-
:autocomplete="autocomplete"
|
|
134
|
+
:required="props.required"
|
|
135
|
+
:autocomplete="props.autocomplete"
|
|
136
136
|
v-bind="{ ...$attrs, ...ariaAttrs }"
|
|
137
137
|
@input="onInput"
|
|
138
138
|
@blur="onBlur"
|
|
@@ -142,16 +142,16 @@ defineExpose({
|
|
|
142
142
|
|
|
143
143
|
<slot :ui="ui" />
|
|
144
144
|
|
|
145
|
-
<span v-if="isLeading || !!avatar || !!slots.leading" data-slot="leading" :class="ui.leading({ class:
|
|
145
|
+
<span v-if="isLeading || !!props.avatar || !!slots.leading" data-slot="leading" :class="ui.leading({ class: props.ui?.leading })">
|
|
146
146
|
<slot name="leading" :ui="ui">
|
|
147
|
-
<UIcon v-if="isLeading && leadingIconName" :name="leadingIconName" data-slot="leadingIcon" :class="ui.leadingIcon({ class:
|
|
148
|
-
<UAvatar v-else-if="!!avatar" :size="
|
|
147
|
+
<UIcon v-if="isLeading && leadingIconName" :name="leadingIconName" data-slot="leadingIcon" :class="ui.leadingIcon({ class: props.ui?.leadingIcon })" />
|
|
148
|
+
<UAvatar v-else-if="!!props.avatar" :size="props.ui?.leadingAvatarSize || ui.leadingAvatarSize()" v-bind="props.avatar" data-slot="leadingAvatar" :class="ui.leadingAvatar({ class: props.ui?.leadingAvatar })" />
|
|
149
149
|
</slot>
|
|
150
150
|
</span>
|
|
151
151
|
|
|
152
|
-
<span v-if="isTrailing || !!slots.trailing" data-slot="trailing" :class="ui.trailing({ class:
|
|
152
|
+
<span v-if="isTrailing || !!slots.trailing" data-slot="trailing" :class="ui.trailing({ class: props.ui?.trailing })">
|
|
153
153
|
<slot name="trailing" :ui="ui">
|
|
154
|
-
<UIcon v-if="trailingIconName" :name="trailingIconName" data-slot="trailingIcon" :class="ui.trailingIcon({ class:
|
|
154
|
+
<UIcon v-if="trailingIconName" :name="trailingIconName" data-slot="trailingIcon" :class="ui.trailingIcon({ class: props.ui?.trailingIcon })" />
|
|
155
155
|
</slot>
|
|
156
156
|
</span>
|
|
157
157
|
</Primitive>
|
|
@@ -4,11 +4,12 @@ import theme from "#build/ui/input-date";
|
|
|
4
4
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { computed, onMounted, ref } from "vue";
|
|
7
|
-
import {
|
|
7
|
+
import {} from "reka-ui";
|
|
8
|
+
import { useForwardProps } from "../composables/useForwardProps";
|
|
8
9
|
import { DateField as SingleDateField, DateRangeField as RangeDateField } from "reka-ui/namespaced";
|
|
9
10
|
import { reactiveOmit, createReusableTemplate } from "@vueuse/core";
|
|
10
11
|
import { useAppConfig } from "#imports";
|
|
11
|
-
import {
|
|
12
|
+
import { useComponentProps } from "../composables/useComponentProps";
|
|
12
13
|
import { useFieldGroup } from "../composables/useFieldGroup";
|
|
13
14
|
import { useComponentIcons } from "../composables/useComponentIcons";
|
|
14
15
|
import { useFormField } from "../composables/useFormField";
|
|
@@ -16,7 +17,7 @@ import { tv } from "../utils/tv";
|
|
|
16
17
|
import UIcon from "./Icon.vue";
|
|
17
18
|
import UAvatar from "./Avatar.vue";
|
|
18
19
|
defineOptions({ inheritAttrs: false });
|
|
19
|
-
const
|
|
20
|
+
const _props = defineProps({
|
|
20
21
|
as: { type: null, required: false },
|
|
21
22
|
color: { type: null, required: false },
|
|
22
23
|
variant: { type: null, required: false },
|
|
@@ -56,19 +57,19 @@ const props = defineProps({
|
|
|
56
57
|
});
|
|
57
58
|
const emits = defineEmits(["update:modelValue", "change", "blur", "focus", "update:placeholder"]);
|
|
58
59
|
const slots = defineSlots();
|
|
60
|
+
const props = useComponentProps("inputDate", _props);
|
|
59
61
|
const appConfig = useAppConfig();
|
|
60
|
-
const
|
|
61
|
-
const
|
|
62
|
-
const {
|
|
63
|
-
const { orientation, size: fieldGroupSize } = useFieldGroup(props);
|
|
62
|
+
const rootProps = useForwardProps(reactiveOmit(props, "id", "name", "range", "modelValue", "defaultValue", "color", "variant", "size", "highlight", "fixed", "disabled", "autofocus", "autofocusDelay", "icon", "avatar", "leading", "leadingIcon", "trailing", "trailingIcon", "loading", "loadingIcon", "separatorIcon", "class", "ui"), emits);
|
|
63
|
+
const { emitFormBlur, emitFormFocus, emitFormChange, emitFormInput, size: formFieldSize, color, id, name, highlight, disabled, ariaAttrs } = useFormField(_props);
|
|
64
|
+
const { orientation, size: fieldGroupSize } = useFieldGroup(_props);
|
|
64
65
|
const { isLeading, isTrailing, leadingIconName, trailingIconName } = useComponentIcons(props);
|
|
65
66
|
const [DefineSegmentsTemplate, ReuseSegmentsTemplate] = createReusableTemplate();
|
|
66
67
|
const inputSize = computed(() => fieldGroupSize.value || formFieldSize.value);
|
|
67
68
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.inputDate || {} })({
|
|
68
|
-
color: color.value,
|
|
69
|
+
color: color.value ?? props.color,
|
|
69
70
|
variant: props.variant,
|
|
70
|
-
size: inputSize.value,
|
|
71
|
-
highlight: highlight.value,
|
|
71
|
+
size: inputSize.value ?? props.size,
|
|
72
|
+
highlight: highlight.value ?? props.highlight,
|
|
72
73
|
fixed: props.fixed,
|
|
73
74
|
loading: props.loading,
|
|
74
75
|
leading: isLeading.value || !!props.avatar || !!slots.leading,
|
|
@@ -118,7 +119,7 @@ defineExpose({
|
|
|
118
119
|
:type="type"
|
|
119
120
|
:part="segment.part"
|
|
120
121
|
data-slot="segment"
|
|
121
|
-
:class="ui.segment({ class:
|
|
122
|
+
:class="ui.segment({ class: props.ui?.segment })"
|
|
122
123
|
:data-segment="segment.part"
|
|
123
124
|
>
|
|
124
125
|
{{ segment.value.trim() }}
|
|
@@ -129,12 +130,12 @@ defineExpose({
|
|
|
129
130
|
v-bind="{ ...rootProps, ...$attrs, ...ariaAttrs }"
|
|
130
131
|
:id="id"
|
|
131
132
|
v-slot="{ segments }"
|
|
132
|
-
:model-value="modelValue"
|
|
133
|
-
:default-value="defaultValue"
|
|
133
|
+
:model-value="props.modelValue"
|
|
134
|
+
:default-value="props.defaultValue"
|
|
134
135
|
:name="name"
|
|
135
136
|
:disabled="disabled"
|
|
136
137
|
data-slot="base"
|
|
137
|
-
:class="ui.base({ class: [
|
|
138
|
+
:class="ui.base({ class: [props.ui?.base, props.class] })"
|
|
138
139
|
@update:model-value="onUpdate"
|
|
139
140
|
@blur="onBlur"
|
|
140
141
|
@focus="onFocus"
|
|
@@ -145,23 +146,23 @@ defineExpose({
|
|
|
145
146
|
<template v-else>
|
|
146
147
|
<ReuseSegmentsTemplate :segments="segments.start" type="start" />
|
|
147
148
|
<slot name="separator" :ui="ui">
|
|
148
|
-
<UIcon :name="separatorIcon || appConfig.ui.icons.minus" data-slot="separatorIcon" :class="ui.separatorIcon({ class:
|
|
149
|
+
<UIcon :name="props.separatorIcon || appConfig.ui.icons.minus" data-slot="separatorIcon" :class="ui.separatorIcon({ class: props.ui?.separatorIcon })" />
|
|
149
150
|
</slot>
|
|
150
151
|
<ReuseSegmentsTemplate :segments="segments.end" type="end" />
|
|
151
152
|
</template>
|
|
152
153
|
|
|
153
154
|
<slot :ui="ui" />
|
|
154
155
|
|
|
155
|
-
<span v-if="isLeading || !!avatar || !!slots.leading" data-slot="leading" :class="ui.leading({ class:
|
|
156
|
+
<span v-if="isLeading || !!props.avatar || !!slots.leading" data-slot="leading" :class="ui.leading({ class: props.ui?.leading })">
|
|
156
157
|
<slot name="leading" :ui="ui">
|
|
157
|
-
<UIcon v-if="isLeading && leadingIconName" :name="leadingIconName" data-slot="leadingIcon" :class="ui.leadingIcon({ class:
|
|
158
|
-
<UAvatar v-else-if="!!avatar" :size="
|
|
158
|
+
<UIcon v-if="isLeading && leadingIconName" :name="leadingIconName" data-slot="leadingIcon" :class="ui.leadingIcon({ class: props.ui?.leadingIcon })" />
|
|
159
|
+
<UAvatar v-else-if="!!props.avatar" :size="props.ui?.leadingAvatarSize || ui.leadingAvatarSize()" v-bind="props.avatar" data-slot="leadingAvatar" :class="ui.leadingAvatar({ class: props.ui?.leadingAvatar })" />
|
|
159
160
|
</slot>
|
|
160
161
|
</span>
|
|
161
162
|
|
|
162
|
-
<span v-if="isTrailing || !!slots.trailing" data-slot="trailing" :class="ui.trailing({ class:
|
|
163
|
+
<span v-if="isTrailing || !!slots.trailing" data-slot="trailing" :class="ui.trailing({ class: props.ui?.trailing })">
|
|
163
164
|
<slot name="trailing" :ui="ui">
|
|
164
|
-
<UIcon v-if="trailingIconName" :name="trailingIconName" data-slot="trailingIcon" :class="ui.trailingIcon({ class:
|
|
165
|
+
<UIcon v-if="trailingIconName" :name="trailingIconName" data-slot="trailingIcon" :class="ui.trailingIcon({ class: props.ui?.trailingIcon })" />
|
|
165
166
|
</slot>
|
|
166
167
|
</span>
|
|
167
168
|
</DateField.Root>
|
|
@@ -34,7 +34,7 @@ type ExcludeItem = {
|
|
|
34
34
|
type: 'label' | 'separator';
|
|
35
35
|
};
|
|
36
36
|
type IsClearUsed<M extends boolean, C extends boolean | object> = M extends false ? (C extends true ? null : C extends object ? null : never) : never;
|
|
37
|
-
export interface InputMenuProps<T extends ArrayOrNested<InputMenuItem> = ArrayOrNested<InputMenuItem>, VK extends GetItemKeys<T> | undefined = undefined, M extends boolean = false, Mod extends Omit<ModelModifiers, 'lazy'> = Omit<ModelModifiers, 'lazy'>, C extends boolean | object = false> extends Pick<ComboboxRootProps<T>, 'open' | 'defaultOpen' | 'disabled' | 'name' | 'resetSearchTermOnBlur' | 'resetSearchTermOnSelect' | 'resetModelValueOnClear' | 'highlightOnHover' | 'openOnClick' | 'openOnFocus' | 'by'>, UseComponentIconsProps, /** @vue-ignore */ Omit<InputHTMLAttributes, '
|
|
37
|
+
export interface InputMenuProps<T extends ArrayOrNested<InputMenuItem> = ArrayOrNested<InputMenuItem>, VK extends GetItemKeys<T> | undefined = undefined, M extends boolean = false, Mod extends Omit<ModelModifiers, 'lazy'> = Omit<ModelModifiers, 'lazy'>, C extends boolean | object = false> extends Pick<ComboboxRootProps<T>, 'open' | 'defaultOpen' | 'disabled' | 'name' | 'resetSearchTermOnBlur' | 'resetSearchTermOnSelect' | 'resetModelValueOnClear' | 'highlightOnHover' | 'openOnClick' | 'openOnFocus' | 'by'>, UseComponentIconsProps, /** @vue-ignore */ Omit<InputHTMLAttributes, 'disabled' | 'name' | 'type' | 'placeholder' | 'autofocus' | 'maxlength' | 'minlength' | 'pattern' | 'size' | 'min' | 'max' | 'step'> {
|
|
38
38
|
/**
|
|
39
39
|
* The element or component this component should render as.
|
|
40
40
|
* @defaultValue 'div'
|
|
@@ -151,11 +151,12 @@ export interface InputMenuProps<T extends ArrayOrNested<InputMenuItem> = ArrayOr
|
|
|
151
151
|
/** Keep the mobile text size on all breakpoints. */
|
|
152
152
|
fixed?: boolean;
|
|
153
153
|
/**
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
154
|
+
* The behavior of the InputMenu.
|
|
155
|
+
* - `combobox`: select one (or many) items from a list of suggestions.
|
|
156
|
+
* - `autocomplete`: free-form text input with optional suggestions. The `modelValue` becomes the input text (`string`) instead of a selected item.
|
|
157
|
+
* @defaultValue 'combobox'
|
|
157
158
|
*/
|
|
158
|
-
|
|
159
|
+
mode?: 'combobox' | 'autocomplete';
|
|
159
160
|
/**
|
|
160
161
|
* Determines if custom user input that does not exist in options can be added.
|
|
161
162
|
* @defaultValue false
|
|
@@ -244,6 +245,30 @@ declare const __VLS_export: <T extends ArrayOrNested<InputMenuItem>, VK extends
|
|
|
244
245
|
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
245
246
|
onChange?: ((event: Event) => any) | undefined;
|
|
246
247
|
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
248
|
+
onClear?: (() => any) | undefined;
|
|
249
|
+
onCreate?: ((item: string) => any) | undefined;
|
|
250
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
251
|
+
"onUpdate:modelValue"?: ((value: (Mod extends {
|
|
252
|
+
number: true;
|
|
253
|
+
} ? (Mod extends {
|
|
254
|
+
optional: true;
|
|
255
|
+
} ? (Mod extends {
|
|
256
|
+
nullable: true;
|
|
257
|
+
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
|
|
258
|
+
nullable: true;
|
|
259
|
+
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) extends infer T_1 ? T_1 extends (Mod extends {
|
|
260
|
+
optional: true;
|
|
261
|
+
} ? (Mod extends {
|
|
262
|
+
nullable: true;
|
|
263
|
+
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
|
|
264
|
+
nullable: true;
|
|
265
|
+
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) ? T_1 extends string ? number | T_1 : T_1 : never : never : Mod extends {
|
|
266
|
+
optional: true;
|
|
267
|
+
} ? (Mod extends {
|
|
268
|
+
nullable: true;
|
|
269
|
+
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
|
|
270
|
+
nullable: true;
|
|
271
|
+
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | IsClearUsed<M, C>) => any) | undefined;
|
|
247
272
|
onHighlight?: ((payload: {
|
|
248
273
|
ref: HTMLElement;
|
|
249
274
|
value: (Mod extends {
|
|
@@ -268,30 +293,6 @@ declare const __VLS_export: <T extends ArrayOrNested<InputMenuItem>, VK extends
|
|
|
268
293
|
nullable: true;
|
|
269
294
|
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | IsClearUsed<M, C>;
|
|
270
295
|
} | undefined) => any) | undefined;
|
|
271
|
-
onClear?: (() => any) | undefined;
|
|
272
|
-
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
273
|
-
onCreate?: ((item: string) => any) | undefined;
|
|
274
|
-
"onUpdate:modelValue"?: ((value: (Mod extends {
|
|
275
|
-
number: true;
|
|
276
|
-
} ? (Mod extends {
|
|
277
|
-
optional: true;
|
|
278
|
-
} ? (Mod extends {
|
|
279
|
-
nullable: true;
|
|
280
|
-
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
|
|
281
|
-
nullable: true;
|
|
282
|
-
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) extends infer T_1 ? T_1 extends (Mod extends {
|
|
283
|
-
optional: true;
|
|
284
|
-
} ? (Mod extends {
|
|
285
|
-
nullable: true;
|
|
286
|
-
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
|
|
287
|
-
nullable: true;
|
|
288
|
-
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) ? T_1 extends string ? number | T_1 : T_1 : never : never : Mod extends {
|
|
289
|
-
optional: true;
|
|
290
|
-
} ? (Mod extends {
|
|
291
|
-
nullable: true;
|
|
292
|
-
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
|
|
293
|
-
nullable: true;
|
|
294
|
-
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | IsClearUsed<M, C>) => any) | undefined;
|
|
295
296
|
"onUpdate:searchTerm"?: ((value: string) => any) | undefined;
|
|
296
297
|
"onRemove-tag"?: ((item: (Mod extends {
|
|
297
298
|
number: true;
|
|
@@ -323,7 +324,27 @@ declare const __VLS_export: <T extends ArrayOrNested<InputMenuItem>, VK extends
|
|
|
323
324
|
}>) => void;
|
|
324
325
|
attrs: any;
|
|
325
326
|
slots: InputMenuSlots<T, VK, M, Mod, C, NestedItem<T>>;
|
|
326
|
-
emit: (((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "focus", event: FocusEvent) => void) & ((evt: "
|
|
327
|
+
emit: (((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "focus", event: FocusEvent) => void) & ((evt: "clear") => void) & ((evt: "create", item: string) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "update:modelValue", value: (Mod extends {
|
|
328
|
+
number: true;
|
|
329
|
+
} ? (Mod extends {
|
|
330
|
+
optional: true;
|
|
331
|
+
} ? (Mod extends {
|
|
332
|
+
nullable: true;
|
|
333
|
+
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
|
|
334
|
+
nullable: true;
|
|
335
|
+
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) extends infer T_1 ? T_1 extends (Mod extends {
|
|
336
|
+
optional: true;
|
|
337
|
+
} ? (Mod extends {
|
|
338
|
+
nullable: true;
|
|
339
|
+
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
|
|
340
|
+
nullable: true;
|
|
341
|
+
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) ? T_1 extends string ? number | T_1 : T_1 : never : never : Mod extends {
|
|
342
|
+
optional: true;
|
|
343
|
+
} ? (Mod extends {
|
|
344
|
+
nullable: true;
|
|
345
|
+
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
|
|
346
|
+
nullable: true;
|
|
347
|
+
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | IsClearUsed<M, C>) => void) & ((evt: "highlight", payload: {
|
|
327
348
|
ref: HTMLElement;
|
|
328
349
|
value: (Mod extends {
|
|
329
350
|
number: true;
|
|
@@ -346,27 +367,7 @@ declare const __VLS_export: <T extends ArrayOrNested<InputMenuItem>, VK extends
|
|
|
346
367
|
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
|
|
347
368
|
nullable: true;
|
|
348
369
|
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | IsClearUsed<M, C>;
|
|
349
|
-
} | undefined) => void) & ((evt: "
|
|
350
|
-
number: true;
|
|
351
|
-
} ? (Mod extends {
|
|
352
|
-
optional: true;
|
|
353
|
-
} ? (Mod extends {
|
|
354
|
-
nullable: true;
|
|
355
|
-
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
|
|
356
|
-
nullable: true;
|
|
357
|
-
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) extends infer T_1 ? T_1 extends (Mod extends {
|
|
358
|
-
optional: true;
|
|
359
|
-
} ? (Mod extends {
|
|
360
|
-
nullable: true;
|
|
361
|
-
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
|
|
362
|
-
nullable: true;
|
|
363
|
-
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) ? T_1 extends string ? number | T_1 : T_1 : never : never : Mod extends {
|
|
364
|
-
optional: true;
|
|
365
|
-
} ? (Mod extends {
|
|
366
|
-
nullable: true;
|
|
367
|
-
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | undefined : Mod extends {
|
|
368
|
-
nullable: true;
|
|
369
|
-
} ? GetModelValue<T, VK, M, ExcludeItem> | null : GetModelValue<T, VK, M, ExcludeItem>) | IsClearUsed<M, C>) => void) & ((evt: "remove-tag", item: (Mod extends {
|
|
370
|
+
} | undefined) => void) & ((evt: "remove-tag", item: (Mod extends {
|
|
370
371
|
number: true;
|
|
371
372
|
} ? (Mod extends {
|
|
372
373
|
optional: true;
|