@nuxt/ui 4.7.0 → 4.8.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/.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 +17 -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 +13 -11
- 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 +8 -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 +5 -5
- package/dist/runtime/components/Form.vue.d.ts +1 -1
- package/dist/runtime/components/FormField.d.vue.ts +2 -1
- package/dist/runtime/components/FormField.vue +21 -21
- package/dist/runtime/components/FormField.vue.d.ts +2 -1
- package/dist/runtime/components/Header.vue +19 -19
- 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 +11 -2
- package/dist/runtime/components/Link.vue +13 -4
- package/dist/runtime/components/Link.vue.d.ts +11 -2
- 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 +30 -3
- package/dist/runtime/components/content/ContentSearch.vue +66 -32
- package/dist/runtime/components/content/ContentSearch.vue.d.ts +30 -3
- 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 +17 -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 +1 -0
- 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/utils/dashboard.d.ts +1 -1
- package/dist/runtime/utils/link.d.ts +1 -1
- package/dist/runtime/utils/link.js +1 -0
- 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 +1 -1
- package/dist/runtime/vue/overrides/inertia/Link.vue +5 -0
- 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/shared/{ui.BIQuJqNV.mjs → ui.CoJ8bnb0.mjs} +244 -83
- package/dist/unplugin.mjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +27 -34
- 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
|
@@ -6,11 +6,11 @@ import theme from "#build/ui/chat-tool";
|
|
|
6
6
|
import { ref, computed } from "vue";
|
|
7
7
|
import { CollapsibleRoot, CollapsibleTrigger, CollapsibleContent } from "reka-ui";
|
|
8
8
|
import { useAppConfig } from "#imports";
|
|
9
|
-
import {
|
|
9
|
+
import { useComponentProps } from "../composables/useComponentProps";
|
|
10
10
|
import { tv } from "../utils/tv";
|
|
11
11
|
import UIcon from "./Icon.vue";
|
|
12
12
|
import UChatShimmer from "./ChatShimmer.vue";
|
|
13
|
-
const
|
|
13
|
+
const _props = defineProps({
|
|
14
14
|
text: { type: String, required: false },
|
|
15
15
|
suffix: { type: String, required: false },
|
|
16
16
|
icon: { type: null, required: false },
|
|
@@ -30,8 +30,8 @@ const props = defineProps({
|
|
|
30
30
|
});
|
|
31
31
|
const emits = defineEmits(["update:open"]);
|
|
32
32
|
const slots = defineSlots();
|
|
33
|
+
const props = useComponentProps("chatTool", _props);
|
|
33
34
|
const appConfig = useAppConfig();
|
|
34
|
-
const uiProp = useComponentUI("chatTool", props);
|
|
35
35
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.chatTool || {} })({
|
|
36
36
|
variant: props.variant,
|
|
37
37
|
chevron: props.chevron,
|
|
@@ -54,50 +54,50 @@ const chevronIconName = computed(() => props.chevronIcon || appConfig.ui.icons?.
|
|
|
54
54
|
<CollapsibleRoot
|
|
55
55
|
v-slot="{ open: isOpen }"
|
|
56
56
|
:open="resolvedOpen"
|
|
57
|
-
:disabled="disabled"
|
|
58
|
-
:unmount-on-hide="unmountOnHide"
|
|
57
|
+
:disabled="props.disabled"
|
|
58
|
+
:unmount-on-hide="props.unmountOnHide"
|
|
59
59
|
data-slot="root"
|
|
60
|
-
:class="ui.root({ class: [
|
|
60
|
+
:class="ui.root({ class: [props.ui?.root, props.class] })"
|
|
61
61
|
@update:open="setOpen"
|
|
62
62
|
>
|
|
63
63
|
<CollapsibleTrigger as-child :disabled="!hasContent">
|
|
64
64
|
<button
|
|
65
65
|
type="button"
|
|
66
66
|
data-slot="trigger"
|
|
67
|
-
:class="ui.trigger({ class:
|
|
67
|
+
:class="ui.trigger({ class: props.ui?.trigger })"
|
|
68
68
|
>
|
|
69
|
-
<span v-if="resolvedIcon || hasContent && chevron === 'leading'" data-slot="leading" :class="ui.leading({ class:
|
|
69
|
+
<span v-if="resolvedIcon || hasContent && props.chevron === 'leading'" data-slot="leading" :class="ui.leading({ class: props.ui?.leading })">
|
|
70
70
|
<UIcon
|
|
71
71
|
v-if="resolvedIcon"
|
|
72
72
|
:name="resolvedIcon"
|
|
73
73
|
data-slot="leadingIcon"
|
|
74
|
-
:class="ui.leadingIcon({ class:
|
|
74
|
+
:class="ui.leadingIcon({ class: props.ui?.leadingIcon, alone: !(hasContent && props.chevron === 'leading') })"
|
|
75
75
|
/>
|
|
76
76
|
<UIcon
|
|
77
|
-
v-if="hasContent && chevron === 'leading'"
|
|
77
|
+
v-if="hasContent && props.chevron === 'leading'"
|
|
78
78
|
:name="chevronIconName"
|
|
79
79
|
data-slot="chevronIcon"
|
|
80
|
-
:class="ui.chevronIcon({ class:
|
|
80
|
+
:class="ui.chevronIcon({ class: props.ui?.chevronIcon, alone: !resolvedIcon })"
|
|
81
81
|
/>
|
|
82
82
|
</span>
|
|
83
83
|
|
|
84
|
-
<span data-slot="label" :class="ui.label({ class:
|
|
85
|
-
<UChatShimmer v-if="streaming && text" :text="text" v-bind="props.shimmer" />
|
|
86
|
-
<template v-else>{{ text }}</template>
|
|
87
|
-
<span v-if="suffix" data-slot="suffix" :class="ui.suffix({ class:
|
|
84
|
+
<span data-slot="label" :class="ui.label({ class: props.ui?.label })">
|
|
85
|
+
<UChatShimmer v-if="props.streaming && props.text" :text="props.text" v-bind="props.shimmer" />
|
|
86
|
+
<template v-else>{{ props.text }}</template>
|
|
87
|
+
<span v-if="props.suffix" data-slot="suffix" :class="ui.suffix({ class: props.ui?.suffix })">{{ props.suffix }}</span>
|
|
88
88
|
</span>
|
|
89
89
|
|
|
90
90
|
<UIcon
|
|
91
|
-
v-if="hasContent && chevron === 'trailing'"
|
|
91
|
+
v-if="hasContent && props.chevron === 'trailing'"
|
|
92
92
|
:name="chevronIconName"
|
|
93
93
|
data-slot="trailingIcon"
|
|
94
|
-
:class="ui.trailingIcon({ class:
|
|
94
|
+
:class="ui.trailingIcon({ class: props.ui?.trailingIcon })"
|
|
95
95
|
/>
|
|
96
96
|
</button>
|
|
97
97
|
</CollapsibleTrigger>
|
|
98
98
|
|
|
99
|
-
<CollapsibleContent data-slot="content" :class="ui.content({ class:
|
|
100
|
-
<div data-slot="body" :class="ui.body({ class:
|
|
99
|
+
<CollapsibleContent data-slot="content" :class="ui.content({ class: props.ui?.content })">
|
|
100
|
+
<div data-slot="body" :class="ui.body({ class: props.ui?.body })">
|
|
101
101
|
<slot :open="isOpen" />
|
|
102
102
|
</div>
|
|
103
103
|
</CollapsibleContent>
|
|
@@ -74,9 +74,9 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ChatTo
|
|
|
74
74
|
}, string, import("vue").PublicProps, Readonly<ChatToolProps> & Readonly<{
|
|
75
75
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
76
76
|
}>, {
|
|
77
|
+
open: boolean;
|
|
77
78
|
loading: boolean;
|
|
78
79
|
variant: ChatTool["variants"]["variant"];
|
|
79
|
-
open: boolean;
|
|
80
80
|
streaming: boolean;
|
|
81
81
|
unmountOnHide: boolean;
|
|
82
82
|
chevron: "leading" | "trailing";
|
|
@@ -31,6 +31,8 @@ export interface CheckboxProps<T = boolean> extends Pick<CheckboxRootProps<T>, '
|
|
|
31
31
|
* @defaultValue 'start'
|
|
32
32
|
*/
|
|
33
33
|
indicator?: Checkbox['variants']['indicator'];
|
|
34
|
+
/** Highlight the ring color like a focus state. */
|
|
35
|
+
highlight?: boolean;
|
|
34
36
|
/**
|
|
35
37
|
* The icon displayed when checked.
|
|
36
38
|
* @defaultValue appConfig.ui.icons.check
|
|
@@ -4,16 +4,16 @@ import theme from "#build/ui/checkbox";
|
|
|
4
4
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { computed, useAttrs, useId } from "vue";
|
|
7
|
-
import { Primitive, CheckboxRoot, CheckboxIndicator, Label
|
|
7
|
+
import { Primitive, CheckboxRoot, CheckboxIndicator, Label } from "reka-ui";
|
|
8
8
|
import { reactivePick } from "@vueuse/core";
|
|
9
9
|
import { useAppConfig } from "#imports";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { useComponentProps } from "../composables/useComponentProps";
|
|
11
|
+
import { useForwardProps } from "../composables/useForwardProps";
|
|
12
12
|
import { useFormField } from "../composables/useFormField";
|
|
13
13
|
import { tv } from "../utils/tv";
|
|
14
14
|
import UIcon from "./Icon.vue";
|
|
15
15
|
defineOptions({ inheritAttrs: false });
|
|
16
|
-
const
|
|
16
|
+
const _props = defineProps({
|
|
17
17
|
as: { type: null, required: false },
|
|
18
18
|
label: { type: String, required: false },
|
|
19
19
|
description: { type: String, required: false },
|
|
@@ -21,6 +21,7 @@ const props = defineProps({
|
|
|
21
21
|
variant: { type: null, required: false },
|
|
22
22
|
size: { type: null, required: false },
|
|
23
23
|
indicator: { type: null, required: false },
|
|
24
|
+
highlight: { type: Boolean, required: false },
|
|
24
25
|
icon: { type: null, required: false },
|
|
25
26
|
indeterminateIcon: { type: null, required: false },
|
|
26
27
|
class: { type: null, required: false },
|
|
@@ -37,22 +38,22 @@ const props = defineProps({
|
|
|
37
38
|
});
|
|
38
39
|
const slots = defineSlots();
|
|
39
40
|
const emits = defineEmits(["change", "update:modelValue"]);
|
|
41
|
+
const props = useComponentProps("checkbox", _props);
|
|
40
42
|
const appConfig = useAppConfig();
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
const { id: _id, emitFormChange, emitFormInput, size, color, name, disabled, ariaAttrs } = useFormField(props);
|
|
43
|
+
const rootProps = useForwardProps(reactivePick(props, "required", "value", "defaultValue", "modelValue", "trueValue", "falseValue"), emits);
|
|
44
|
+
const { id: _id, emitFormChange, emitFormInput, size, color, highlight, name, disabled, ariaAttrs } = useFormField(_props);
|
|
44
45
|
const id = _id.value ?? useId();
|
|
45
|
-
const { variant } = useResolvedVariants("checkbox", props, theme, ["variant"]);
|
|
46
46
|
const attrs = useAttrs();
|
|
47
47
|
const forwardedAttrs = computed(() => {
|
|
48
48
|
const { "data-state": _, ...rest } = attrs;
|
|
49
49
|
return rest;
|
|
50
50
|
});
|
|
51
51
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.checkbox || {} })({
|
|
52
|
-
size: size.value,
|
|
53
|
-
color: color.value,
|
|
54
|
-
variant: variant
|
|
52
|
+
size: size.value ?? props.size,
|
|
53
|
+
color: color.value ?? props.color,
|
|
54
|
+
variant: props.variant,
|
|
55
55
|
indicator: props.indicator,
|
|
56
|
+
highlight: highlight.value ?? props.highlight,
|
|
56
57
|
required: props.required,
|
|
57
58
|
disabled: disabled.value
|
|
58
59
|
}));
|
|
@@ -65,35 +66,35 @@ function onUpdate(value) {
|
|
|
65
66
|
</script>
|
|
66
67
|
|
|
67
68
|
<template>
|
|
68
|
-
<Primitive :as="variant === 'list' ? as : Label" data-slot="root" :class="ui.root({ class: [
|
|
69
|
-
<div data-slot="container" :class="ui.container({ class:
|
|
69
|
+
<Primitive :as="!props.variant || props.variant === 'list' ? props.as : Label" data-slot="root" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
70
|
+
<div data-slot="container" :class="ui.container({ class: props.ui?.container })">
|
|
70
71
|
<CheckboxRoot
|
|
71
72
|
:id="id"
|
|
72
73
|
v-bind="{ ...rootProps, ...forwardedAttrs, ...ariaAttrs }"
|
|
73
74
|
:name="name"
|
|
74
75
|
:disabled="disabled"
|
|
75
76
|
data-slot="base"
|
|
76
|
-
:class="ui.base({ class:
|
|
77
|
+
:class="ui.base({ class: props.ui?.base })"
|
|
77
78
|
@update:model-value="onUpdate"
|
|
78
79
|
>
|
|
79
80
|
<template #default="{ state }">
|
|
80
|
-
<CheckboxIndicator data-slot="indicator" :class="ui.indicator({ class:
|
|
81
|
-
<UIcon v-if="state === 'indeterminate'" :name="indeterminateIcon || appConfig.ui.icons.minus" data-slot="icon" :class="ui.icon({ class:
|
|
82
|
-
<UIcon v-else :name="icon || appConfig.ui.icons.check" data-slot="icon" :class="ui.icon({ class:
|
|
81
|
+
<CheckboxIndicator data-slot="indicator" :class="ui.indicator({ class: props.ui?.indicator })">
|
|
82
|
+
<UIcon v-if="state === 'indeterminate'" :name="props.indeterminateIcon || appConfig.ui.icons.minus" data-slot="icon" :class="ui.icon({ class: props.ui?.icon })" />
|
|
83
|
+
<UIcon v-else :name="props.icon || appConfig.ui.icons.check" data-slot="icon" :class="ui.icon({ class: props.ui?.icon })" />
|
|
83
84
|
</CheckboxIndicator>
|
|
84
85
|
</template>
|
|
85
86
|
</CheckboxRoot>
|
|
86
87
|
</div>
|
|
87
88
|
|
|
88
|
-
<div v-if="label || !!slots.label || (description || !!slots.description)" data-slot="wrapper" :class="ui.wrapper({ class:
|
|
89
|
-
<component :is="variant === 'list' ? Label : 'p'" v-if="label || !!slots.label" :for="id" data-slot="label" :class="ui.label({ class:
|
|
90
|
-
<slot name="label" :label="label">
|
|
91
|
-
{{ label }}
|
|
89
|
+
<div v-if="props.label || !!slots.label || (props.description || !!slots.description)" data-slot="wrapper" :class="ui.wrapper({ class: props.ui?.wrapper })">
|
|
90
|
+
<component :is="!props.variant || props.variant === 'list' ? Label : 'p'" v-if="props.label || !!slots.label" :for="id" data-slot="label" :class="ui.label({ class: props.ui?.label })">
|
|
91
|
+
<slot name="label" :label="props.label">
|
|
92
|
+
{{ props.label }}
|
|
92
93
|
</slot>
|
|
93
94
|
</component>
|
|
94
|
-
<p v-if="description || !!slots.description" data-slot="description" :class="ui.description({ class:
|
|
95
|
-
<slot name="description" :description="description">
|
|
96
|
-
{{ description }}
|
|
95
|
+
<p v-if="props.description || !!slots.description" data-slot="description" :class="ui.description({ class: props.ui?.description })">
|
|
96
|
+
<slot name="description" :description="props.description">
|
|
97
|
+
{{ props.description }}
|
|
97
98
|
</slot>
|
|
98
99
|
</p>
|
|
99
100
|
</div>
|
|
@@ -31,6 +31,8 @@ export interface CheckboxProps<T = boolean> extends Pick<CheckboxRootProps<T>, '
|
|
|
31
31
|
* @defaultValue 'start'
|
|
32
32
|
*/
|
|
33
33
|
indicator?: Checkbox['variants']['indicator'];
|
|
34
|
+
/** Highlight the ring color like a focus state. */
|
|
35
|
+
highlight?: boolean;
|
|
34
36
|
/**
|
|
35
37
|
* The icon displayed when checked.
|
|
36
38
|
* @defaultValue appConfig.ui.icons.check
|
|
@@ -16,7 +16,7 @@ export type CheckboxGroupItem = CheckboxGroupValue | {
|
|
|
16
16
|
ui?: Pick<CheckboxGroup['slots'], 'item'> & Omit<Required<CheckboxProps>['ui'], 'root'>;
|
|
17
17
|
[key: string]: any;
|
|
18
18
|
};
|
|
19
|
-
export interface CheckboxGroupProps<T extends CheckboxGroupItem[] = CheckboxGroupItem[], VK extends GetItemKeys<T> = 'value'> extends Pick<CheckboxGroupRootProps, 'disabled' | 'loop' | 'name' | 'required'>, Pick<CheckboxProps, 'color' | 'indicator' | 'icon'> {
|
|
19
|
+
export interface CheckboxGroupProps<T extends CheckboxGroupItem[] = CheckboxGroupItem[], VK extends GetItemKeys<T> = 'value'> extends Pick<CheckboxGroupRootProps, 'disabled' | 'loop' | 'name' | 'required'>, Pick<CheckboxProps, 'color' | 'highlight' | 'indicator' | 'icon'> {
|
|
20
20
|
/**
|
|
21
21
|
* The element or component this component should render as.
|
|
22
22
|
* @defaultValue 'div'
|
|
@@ -4,15 +4,16 @@ import theme from "#build/ui/checkbox-group";
|
|
|
4
4
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { computed, useId } from "vue";
|
|
7
|
-
import { CheckboxGroupRoot
|
|
7
|
+
import { CheckboxGroupRoot } from "reka-ui";
|
|
8
|
+
import { useForwardProps } from "../composables/useForwardProps";
|
|
8
9
|
import { reactivePick } from "@vueuse/core";
|
|
9
10
|
import { useAppConfig } from "#imports";
|
|
10
|
-
import {
|
|
11
|
+
import { useComponentProps } from "../composables/useComponentProps";
|
|
11
12
|
import { useFormField } from "../composables/useFormField";
|
|
12
13
|
import { get, omit } from "../utils";
|
|
13
14
|
import { tv } from "../utils/tv";
|
|
14
15
|
import UCheckbox from "./Checkbox.vue";
|
|
15
|
-
const
|
|
16
|
+
const _props = defineProps({
|
|
16
17
|
as: { type: null, required: false },
|
|
17
18
|
legend: { type: String, required: false },
|
|
18
19
|
valueKey: { type: null, required: false, default: "value" },
|
|
@@ -31,23 +32,24 @@ const props = defineProps({
|
|
|
31
32
|
name: { type: String, required: false },
|
|
32
33
|
required: { type: Boolean, required: false },
|
|
33
34
|
color: { type: null, required: false },
|
|
35
|
+
highlight: { type: Boolean, required: false },
|
|
34
36
|
indicator: { type: null, required: false },
|
|
35
37
|
icon: { type: null, required: false }
|
|
36
38
|
});
|
|
37
39
|
const emits = defineEmits(["change", "update:modelValue"]);
|
|
38
40
|
const slots = defineSlots();
|
|
41
|
+
const props = useComponentProps("checkboxGroup", _props);
|
|
39
42
|
const appConfig = useAppConfig();
|
|
40
|
-
const
|
|
41
|
-
const rootProps = useForwardPropsEmits(reactivePick(props, "as", "modelValue", "defaultValue", "orientation", "loop", "required"), emits);
|
|
43
|
+
const rootProps = useForwardProps(reactivePick(props, "as", "modelValue", "defaultValue", "orientation", "loop", "required"), emits);
|
|
42
44
|
const checkboxProps = useForwardProps(reactivePick(props, "variant", "indicator", "icon"));
|
|
43
45
|
const getProxySlots = () => omit(slots, ["legend"]);
|
|
44
|
-
const { emitFormChange, emitFormInput, color, name, size, id: _id, disabled, ariaAttrs } = useFormField(
|
|
46
|
+
const { emitFormChange, emitFormInput, color, highlight, name, size, id: _id, disabled, ariaAttrs } = useFormField(_props, { bind: false });
|
|
45
47
|
const id = _id.value ?? useId();
|
|
46
48
|
const ui = computed(() => tv({ extend: theme, ...appConfig.ui?.checkboxGroup || {} })({
|
|
47
|
-
size: size.value,
|
|
49
|
+
size: size.value ?? props.size,
|
|
48
50
|
required: props.required,
|
|
49
51
|
orientation: props.orientation,
|
|
50
|
-
color: props.color,
|
|
52
|
+
color: color.value ?? props.color,
|
|
51
53
|
variant: props.variant,
|
|
52
54
|
disabled: disabled.value
|
|
53
55
|
}));
|
|
@@ -98,13 +100,13 @@ function onUpdate(value) {
|
|
|
98
100
|
:name="name"
|
|
99
101
|
:disabled="disabled"
|
|
100
102
|
data-slot="root"
|
|
101
|
-
:class="ui.root({ class: [
|
|
103
|
+
:class="ui.root({ class: [props.ui?.root, props.class] })"
|
|
102
104
|
@update:model-value="onUpdate"
|
|
103
105
|
>
|
|
104
|
-
<fieldset data-slot="fieldset" :class="ui.fieldset({ class:
|
|
105
|
-
<legend v-if="legend || !!slots.legend" data-slot="legend" :class="ui.legend({ class:
|
|
106
|
+
<fieldset data-slot="fieldset" :class="ui.fieldset({ class: props.ui?.fieldset })" v-bind="ariaAttrs">
|
|
107
|
+
<legend v-if="props.legend || !!slots.legend" data-slot="legend" :class="ui.legend({ class: props.ui?.legend })">
|
|
106
108
|
<slot name="legend">
|
|
107
|
-
{{ legend }}
|
|
109
|
+
{{ props.legend }}
|
|
108
110
|
</slot>
|
|
109
111
|
</legend>
|
|
110
112
|
|
|
@@ -113,12 +115,13 @@ function onUpdate(value) {
|
|
|
113
115
|
:key="item.value"
|
|
114
116
|
v-bind="{ ...item, ...checkboxProps }"
|
|
115
117
|
:color="color"
|
|
118
|
+
:highlight="highlight"
|
|
116
119
|
:size="size"
|
|
117
120
|
:name="name"
|
|
118
121
|
:disabled="item.disabled || disabled"
|
|
119
|
-
:ui="{ ...
|
|
122
|
+
:ui="{ ...props.ui ? omit(props.ui, ['root']) : void 0, ...item.ui || {} }"
|
|
120
123
|
data-slot="item"
|
|
121
|
-
:class="ui.item({ class: [
|
|
124
|
+
:class="ui.item({ class: [props.ui?.item, item.ui?.item, item.class], disabled: item.disabled || disabled })"
|
|
122
125
|
>
|
|
123
126
|
<template v-for="(_, name) in getProxySlots()" #[name]>
|
|
124
127
|
<slot :name="name" :item="item" />
|
|
@@ -16,7 +16,7 @@ export type CheckboxGroupItem = CheckboxGroupValue | {
|
|
|
16
16
|
ui?: Pick<CheckboxGroup['slots'], 'item'> & Omit<Required<CheckboxProps>['ui'], 'root'>;
|
|
17
17
|
[key: string]: any;
|
|
18
18
|
};
|
|
19
|
-
export interface CheckboxGroupProps<T extends CheckboxGroupItem[] = CheckboxGroupItem[], VK extends GetItemKeys<T> = 'value'> extends Pick<CheckboxGroupRootProps, 'disabled' | 'loop' | 'name' | 'required'>, Pick<CheckboxProps, 'color' | 'indicator' | 'icon'> {
|
|
19
|
+
export interface CheckboxGroupProps<T extends CheckboxGroupItem[] = CheckboxGroupItem[], VK extends GetItemKeys<T> = 'value'> extends Pick<CheckboxGroupRootProps, 'disabled' | 'loop' | 'name' | 'required'>, Pick<CheckboxProps, 'color' | 'highlight' | 'indicator' | 'icon'> {
|
|
20
20
|
/**
|
|
21
21
|
* The element or component this component should render as.
|
|
22
22
|
* @defaultValue 'div'
|
|
@@ -6,11 +6,11 @@ import theme from "#build/ui/chip";
|
|
|
6
6
|
import { computed } from "vue";
|
|
7
7
|
import { Primitive, Slot } from "reka-ui";
|
|
8
8
|
import { useAppConfig } from "#imports";
|
|
9
|
-
import {
|
|
9
|
+
import { useComponentProps } from "../composables/useComponentProps";
|
|
10
10
|
import { useAvatarGroup } from "../composables/useAvatarGroup";
|
|
11
11
|
import { tv } from "../utils/tv";
|
|
12
12
|
defineOptions({ inheritAttrs: false });
|
|
13
|
-
const
|
|
13
|
+
const _props = defineProps({
|
|
14
14
|
as: { type: null, required: false },
|
|
15
15
|
text: { type: [String, Number], required: false },
|
|
16
16
|
color: { type: null, required: false },
|
|
@@ -22,13 +22,13 @@ const props = defineProps({
|
|
|
22
22
|
ui: { type: Object, required: false }
|
|
23
23
|
});
|
|
24
24
|
defineSlots();
|
|
25
|
+
const props = useComponentProps("chip", _props);
|
|
25
26
|
const show = defineModel("show", { type: Boolean, ...{ default: true } });
|
|
26
|
-
const { size } = useAvatarGroup(
|
|
27
|
+
const { size } = useAvatarGroup(_props);
|
|
27
28
|
const appConfig = useAppConfig();
|
|
28
|
-
const uiProp = useComponentUI("chip", props);
|
|
29
29
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.chip || {} })({
|
|
30
30
|
color: props.color,
|
|
31
|
-
size: size.value,
|
|
31
|
+
size: size.value ?? props.size,
|
|
32
32
|
position: props.position,
|
|
33
33
|
inset: props.inset,
|
|
34
34
|
standalone: props.standalone
|
|
@@ -36,14 +36,14 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.chip || {} })
|
|
|
36
36
|
</script>
|
|
37
37
|
|
|
38
38
|
<template>
|
|
39
|
-
<Primitive :as="as" data-slot="root" :class="ui.root({ class: [
|
|
39
|
+
<Primitive :as="props.as" data-slot="root" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
40
40
|
<Slot v-bind="$attrs">
|
|
41
41
|
<slot />
|
|
42
42
|
</Slot>
|
|
43
43
|
|
|
44
|
-
<span v-if="show" data-slot="base" :class="ui.base({ class:
|
|
44
|
+
<span v-if="show" data-slot="base" :class="ui.base({ class: props.ui?.base })">
|
|
45
45
|
<slot name="content">
|
|
46
|
-
{{ text }}
|
|
46
|
+
{{ props.text }}
|
|
47
47
|
</slot>
|
|
48
48
|
</span>
|
|
49
49
|
</Primitive>
|
|
@@ -4,12 +4,13 @@ import theme from "#build/ui/collapsible";
|
|
|
4
4
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { computed } from "vue";
|
|
7
|
-
import { CollapsibleRoot, CollapsibleTrigger, CollapsibleContent
|
|
7
|
+
import { CollapsibleRoot, CollapsibleTrigger, CollapsibleContent } from "reka-ui";
|
|
8
|
+
import { useForwardProps } from "../composables/useForwardProps";
|
|
8
9
|
import { reactivePick } from "@vueuse/core";
|
|
9
10
|
import { useAppConfig } from "#imports";
|
|
10
|
-
import {
|
|
11
|
+
import { useComponentProps } from "../composables/useComponentProps";
|
|
11
12
|
import { tv } from "../utils/tv";
|
|
12
|
-
const
|
|
13
|
+
const _props = defineProps({
|
|
13
14
|
as: { type: null, required: false },
|
|
14
15
|
class: { type: null, required: false },
|
|
15
16
|
ui: { type: Object, required: false },
|
|
@@ -20,19 +21,19 @@ const props = defineProps({
|
|
|
20
21
|
});
|
|
21
22
|
const emits = defineEmits(["update:open"]);
|
|
22
23
|
const slots = defineSlots();
|
|
24
|
+
const props = useComponentProps("collapsible", _props);
|
|
23
25
|
const appConfig = useAppConfig();
|
|
24
|
-
const
|
|
25
|
-
const rootProps = useForwardPropsEmits(reactivePick(props, "as", "defaultOpen", "open", "disabled", "unmountOnHide"), emits);
|
|
26
|
+
const rootProps = useForwardProps(reactivePick(props, "as", "defaultOpen", "open", "disabled", "unmountOnHide"), emits);
|
|
26
27
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.collapsible || {} })());
|
|
27
28
|
</script>
|
|
28
29
|
|
|
29
30
|
<template>
|
|
30
|
-
<CollapsibleRoot v-slot="{ open }" v-bind="rootProps" data-slot="root" :class="ui.root({ class: [
|
|
31
|
+
<CollapsibleRoot v-slot="{ open }" v-bind="rootProps" data-slot="root" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
31
32
|
<CollapsibleTrigger v-if="!!slots.default" as-child>
|
|
32
33
|
<slot :open="open" />
|
|
33
34
|
</CollapsibleTrigger>
|
|
34
35
|
|
|
35
|
-
<CollapsibleContent data-slot="content" :class="ui.content({ class:
|
|
36
|
+
<CollapsibleContent data-slot="content" :class="ui.content({ class: props.ui?.content })">
|
|
36
37
|
<slot name="content" />
|
|
37
38
|
</CollapsibleContent>
|
|
38
39
|
</CollapsibleRoot>
|
|
@@ -10,6 +10,7 @@ export type ColorPickerProps = {
|
|
|
10
10
|
as?: any;
|
|
11
11
|
/**
|
|
12
12
|
* Throttle time in ms for the color picker
|
|
13
|
+
* @defaultValue 50
|
|
13
14
|
*/
|
|
14
15
|
throttle?: number;
|
|
15
16
|
/**
|
|
@@ -18,6 +19,7 @@ export type ColorPickerProps = {
|
|
|
18
19
|
disabled?: boolean;
|
|
19
20
|
/**
|
|
20
21
|
* The default value of the color picker
|
|
22
|
+
* @defaultValue '#FFFFFF'
|
|
21
23
|
*/
|
|
22
24
|
defaultValue?: string;
|
|
23
25
|
/**
|
|
@@ -26,9 +26,9 @@ import { useEventListener, useElementBounding, watchThrottled, watchPausable } f
|
|
|
26
26
|
import { isClient } from "@vueuse/shared";
|
|
27
27
|
import { ColorTranslator } from "colortranslator";
|
|
28
28
|
import { useAppConfig } from "#imports";
|
|
29
|
-
import {
|
|
29
|
+
import { useComponentProps } from "../composables/useComponentProps";
|
|
30
30
|
import { tv } from "../utils/tv";
|
|
31
|
-
const
|
|
31
|
+
const _props = defineProps({
|
|
32
32
|
as: { type: null, required: false },
|
|
33
33
|
throttle: { type: Number, required: false, default: 50 },
|
|
34
34
|
disabled: { type: Boolean, required: false },
|
|
@@ -38,9 +38,9 @@ const props = defineProps({
|
|
|
38
38
|
class: { type: null, required: false },
|
|
39
39
|
ui: { type: Object, required: false }
|
|
40
40
|
});
|
|
41
|
+
const props = useComponentProps("colorPicker", _props);
|
|
41
42
|
const modelValue = defineModel({ type: String, ...void 0 });
|
|
42
43
|
const appConfig = useAppConfig();
|
|
43
|
-
const uiProp = useComponentUI("colorPicker", props);
|
|
44
44
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.colorPicker || {} })({
|
|
45
45
|
size: props.size
|
|
46
46
|
}));
|
|
@@ -180,19 +180,19 @@ const trackThumbStyle = computed(() => ({
|
|
|
180
180
|
</script>
|
|
181
181
|
|
|
182
182
|
<template>
|
|
183
|
-
<Primitive :as="as" data-slot="root" :class="ui.root({ class: [
|
|
184
|
-
<div data-slot="picker" :class="ui.picker({ class:
|
|
183
|
+
<Primitive :as="props.as" data-slot="root" :class="ui.root({ class: [props.ui?.root, props.class] })" :data-disabled="disabled ? true : void 0">
|
|
184
|
+
<div data-slot="picker" :class="ui.picker({ class: props.ui?.picker })">
|
|
185
185
|
<div
|
|
186
186
|
ref="selectorRef"
|
|
187
187
|
data-slot="selector"
|
|
188
|
-
:class="ui.selector({ class:
|
|
188
|
+
:class="ui.selector({ class: props.ui?.selector })"
|
|
189
189
|
:style="selectorStyle"
|
|
190
190
|
>
|
|
191
|
-
<div data-slot="selectorBackground" :class="ui.selectorBackground({ class:
|
|
191
|
+
<div data-slot="selectorBackground" :class="ui.selectorBackground({ class: props.ui?.selectorBackground })" data-color-picker-background>
|
|
192
192
|
<div
|
|
193
193
|
ref="selectorThumbRef"
|
|
194
194
|
data-slot="selectorThumb"
|
|
195
|
-
:class="ui.selectorThumb({ class:
|
|
195
|
+
:class="ui.selectorThumb({ class: props.ui?.selectorThumb })"
|
|
196
196
|
:style="selectorThumbStyle"
|
|
197
197
|
:data-disabled="disabled ? true : void 0"
|
|
198
198
|
/>
|
|
@@ -201,13 +201,13 @@ const trackThumbStyle = computed(() => ({
|
|
|
201
201
|
<div
|
|
202
202
|
ref="trackRef"
|
|
203
203
|
data-slot="track"
|
|
204
|
-
:class="ui.track({ class:
|
|
204
|
+
:class="ui.track({ class: props.ui?.track })"
|
|
205
205
|
data-color-picker-track
|
|
206
206
|
>
|
|
207
207
|
<div
|
|
208
208
|
ref="trackThumbRef"
|
|
209
209
|
data-slot="trackThumb"
|
|
210
|
-
:class="ui.trackThumb({ class:
|
|
210
|
+
:class="ui.trackThumb({ class: props.ui?.trackThumb })"
|
|
211
211
|
:style="trackThumbStyle"
|
|
212
212
|
:data-disabled="disabled ? true : void 0"
|
|
213
213
|
/>
|
|
@@ -10,6 +10,7 @@ export type ColorPickerProps = {
|
|
|
10
10
|
as?: any;
|
|
11
11
|
/**
|
|
12
12
|
* Throttle time in ms for the color picker
|
|
13
|
+
* @defaultValue 50
|
|
13
14
|
*/
|
|
14
15
|
throttle?: number;
|
|
15
16
|
/**
|
|
@@ -18,6 +19,7 @@ export type ColorPickerProps = {
|
|
|
18
19
|
disabled?: boolean;
|
|
19
20
|
/**
|
|
20
21
|
* The default value of the color picker
|
|
22
|
+
* @defaultValue '#FFFFFF'
|
|
21
23
|
*/
|
|
22
24
|
defaultValue?: string;
|
|
23
25
|
/**
|
|
@@ -134,7 +134,7 @@ export interface CommandPaletteProps<G extends CommandPaletteGroup<T> = CommandP
|
|
|
134
134
|
fuseOptions: {
|
|
135
135
|
ignoreLocation: true,
|
|
136
136
|
threshold: 0.1,
|
|
137
|
-
keys: ['label', 'suffix']
|
|
137
|
+
keys: ['label', 'description', 'suffix']
|
|
138
138
|
},
|
|
139
139
|
resultLimit: 12,
|
|
140
140
|
matchAllWhenSearchEmpty: true
|
|
@@ -230,12 +230,12 @@ declare const __VLS_export: <G extends CommandPaletteGroup<T>, T extends Command
|
|
|
230
230
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<(CommandPaletteProps<G, T> & {
|
|
231
231
|
searchTerm?: string;
|
|
232
232
|
}) & {
|
|
233
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
234
|
+
"onUpdate:modelValue"?: ((value: T) => any) | undefined;
|
|
233
235
|
onHighlight?: ((payload: {
|
|
234
236
|
ref: HTMLElement;
|
|
235
237
|
value: T;
|
|
236
238
|
} | undefined) => any) | undefined;
|
|
237
|
-
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
238
|
-
"onUpdate:modelValue"?: ((value: T) => any) | undefined;
|
|
239
239
|
"onUpdate:searchTerm"?: ((value: string) => any) | undefined;
|
|
240
240
|
onEntryFocus?: ((event: CustomEvent<any>) => any) | undefined;
|
|
241
241
|
onLeave?: ((event: Event) => any) | undefined;
|
|
@@ -245,10 +245,10 @@ declare const __VLS_export: <G extends CommandPaletteGroup<T>, T extends Command
|
|
|
245
245
|
expose: (exposed: {}) => void;
|
|
246
246
|
attrs: any;
|
|
247
247
|
slots: CommandPaletteSlots<T, G>;
|
|
248
|
-
emit: (((evt: "highlight", payload: {
|
|
248
|
+
emit: (((evt: "update:open", value: boolean) => void) & ((evt: "update:modelValue", value: T) => void) & ((evt: "highlight", payload: {
|
|
249
249
|
ref: HTMLElement;
|
|
250
250
|
value: T;
|
|
251
|
-
} | undefined) => void) & ((evt: "
|
|
251
|
+
} | undefined) => void) & ((evt: "entryFocus", event: CustomEvent<any>) => void) & ((evt: "leave", event: Event) => void)) & ((event: "update:searchTerm", value: string) => void);
|
|
252
252
|
}>) => import("vue").VNode & {
|
|
253
253
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
254
254
|
};
|