@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
|
@@ -30,6 +30,10 @@ export interface BreadcrumbProps<T extends BreadcrumbItem = BreadcrumbItem> {
|
|
|
30
30
|
* @IconifyIcon
|
|
31
31
|
*/
|
|
32
32
|
separatorIcon?: IconProps['name'];
|
|
33
|
+
/**
|
|
34
|
+
* @defaultValue 'primary'
|
|
35
|
+
*/
|
|
36
|
+
color?: Breadcrumb['variants']['color'];
|
|
33
37
|
/**
|
|
34
38
|
* The key used to get the label from the item.
|
|
35
39
|
* @defaultValue 'label'
|
|
@@ -5,9 +5,9 @@ import theme from "#build/ui/button";
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { computed, ref, inject } from "vue";
|
|
7
7
|
import { defu } from "defu";
|
|
8
|
-
import { useForwardProps } from "reka-ui";
|
|
9
8
|
import { useAppConfig } from "#imports";
|
|
10
|
-
import {
|
|
9
|
+
import { useComponentProps } from "../composables/useComponentProps";
|
|
10
|
+
import { useForwardProps } from "../composables/useForwardProps";
|
|
11
11
|
import { useComponentIcons } from "../composables/useComponentIcons";
|
|
12
12
|
import { useFieldGroup } from "../composables/useFieldGroup";
|
|
13
13
|
import { formLoadingInjectionKey } from "../composables/useFormField";
|
|
@@ -18,7 +18,7 @@ import UIcon from "./Icon.vue";
|
|
|
18
18
|
import UAvatar from "./Avatar.vue";
|
|
19
19
|
import ULink from "./Link.vue";
|
|
20
20
|
import ULinkBase from "./LinkBase.vue";
|
|
21
|
-
const
|
|
21
|
+
const _props = defineProps({
|
|
22
22
|
label: { type: String, required: false },
|
|
23
23
|
color: { type: null, required: false },
|
|
24
24
|
activeColor: { type: null, required: false },
|
|
@@ -66,9 +66,9 @@ const props = defineProps({
|
|
|
66
66
|
replace: { type: Boolean, required: false }
|
|
67
67
|
});
|
|
68
68
|
const slots = defineSlots();
|
|
69
|
+
const props = useComponentProps("button", _props);
|
|
69
70
|
const appConfig = useAppConfig();
|
|
70
|
-
const
|
|
71
|
-
const { orientation, size: buttonSize } = useFieldGroup(props);
|
|
71
|
+
const { orientation, size: buttonSize } = useFieldGroup(_props);
|
|
72
72
|
const linkProps = useForwardProps(pickLinkProps(props));
|
|
73
73
|
const loadingAutoState = ref(false);
|
|
74
74
|
const formLoading = inject(formLoadingInjectionKey, void 0);
|
|
@@ -104,7 +104,7 @@ const ui = computed(() => tv({
|
|
|
104
104
|
})({
|
|
105
105
|
color: props.color,
|
|
106
106
|
variant: props.variant,
|
|
107
|
-
size: buttonSize.value,
|
|
107
|
+
size: buttonSize.value ?? props.size,
|
|
108
108
|
loading: isLoading.value,
|
|
109
109
|
block: props.block,
|
|
110
110
|
square: props.square || !slots.default && !props.label,
|
|
@@ -117,8 +117,8 @@ const ui = computed(() => tv({
|
|
|
117
117
|
<template>
|
|
118
118
|
<ULink
|
|
119
119
|
v-slot="{ active, ...slotProps }"
|
|
120
|
-
:type="type"
|
|
121
|
-
:disabled="disabled || isLoading"
|
|
120
|
+
:type="props.type"
|
|
121
|
+
:disabled="props.disabled || isLoading"
|
|
122
122
|
v-bind="omit(linkProps, ['type', 'disabled', 'onClick'])"
|
|
123
123
|
custom
|
|
124
124
|
>
|
|
@@ -126,26 +126,26 @@ const ui = computed(() => tv({
|
|
|
126
126
|
v-bind="slotProps"
|
|
127
127
|
data-slot="base"
|
|
128
128
|
:class="ui.base({
|
|
129
|
-
class: [
|
|
129
|
+
class: [props.ui?.base, props.class],
|
|
130
130
|
active,
|
|
131
|
-
...active && activeVariant ? { variant: activeVariant } : {},
|
|
132
|
-
...active && activeColor ? { color: activeColor } : {}
|
|
131
|
+
...active && props.activeVariant ? { variant: props.activeVariant } : {},
|
|
132
|
+
...active && props.activeColor ? { color: props.activeColor } : {}
|
|
133
133
|
})"
|
|
134
134
|
@click="onClickWrapper"
|
|
135
135
|
>
|
|
136
136
|
<slot name="leading" :ui="ui">
|
|
137
|
-
<UIcon v-if="isLeading && leadingIconName" :name="leadingIconName" data-slot="leadingIcon" :class="ui.leadingIcon({ class:
|
|
138
|
-
<UAvatar v-else-if="!!avatar" :size="
|
|
137
|
+
<UIcon v-if="isLeading && leadingIconName" :name="leadingIconName" data-slot="leadingIcon" :class="ui.leadingIcon({ class: props.ui?.leadingIcon, active })" />
|
|
138
|
+
<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, active })" />
|
|
139
139
|
</slot>
|
|
140
140
|
|
|
141
141
|
<slot :ui="ui">
|
|
142
|
-
<span v-if="label !== void 0 && label !== null" data-slot="label" :class="ui.label({ class:
|
|
143
|
-
{{ label }}
|
|
142
|
+
<span v-if="props.label !== void 0 && props.label !== null" data-slot="label" :class="ui.label({ class: props.ui?.label, active })">
|
|
143
|
+
{{ props.label }}
|
|
144
144
|
</span>
|
|
145
145
|
</slot>
|
|
146
146
|
|
|
147
147
|
<slot name="trailing" :ui="ui">
|
|
148
|
-
<UIcon v-if="isTrailing && trailingIconName" :name="trailingIconName" data-slot="trailingIcon" :class="ui.trailingIcon({ class:
|
|
148
|
+
<UIcon v-if="isTrailing && trailingIconName" :name="trailingIconName" data-slot="trailingIcon" :class="ui.trailingIcon({ class: props.ui?.trailingIcon, active })" />
|
|
149
149
|
</slot>
|
|
150
150
|
</ULinkBase>
|
|
151
151
|
</ULink>
|
|
@@ -5,15 +5,16 @@ import theme from "#build/ui/calendar";
|
|
|
5
5
|
|
|
6
6
|
<script setup>
|
|
7
7
|
import { computed } from "vue";
|
|
8
|
-
import {
|
|
8
|
+
import {} from "reka-ui";
|
|
9
|
+
import { useForwardProps } from "../composables/useForwardProps";
|
|
9
10
|
import { Calendar as SingleCalendar, RangeCalendar } from "reka-ui/namespaced";
|
|
10
11
|
import { reactiveOmit } from "@vueuse/core";
|
|
11
12
|
import { useAppConfig } from "#imports";
|
|
12
|
-
import {
|
|
13
|
+
import { useComponentProps } from "../composables/useComponentProps";
|
|
13
14
|
import { useLocale } from "../composables/useLocale";
|
|
14
15
|
import { tv } from "../utils/tv";
|
|
15
16
|
import UButton from "./Button.vue";
|
|
16
|
-
const
|
|
17
|
+
const _props = defineProps({
|
|
17
18
|
as: { type: null, required: false },
|
|
18
19
|
nextYearIcon: { type: null, required: false },
|
|
19
20
|
nextYear: { type: Object, required: false },
|
|
@@ -60,10 +61,10 @@ const props = defineProps({
|
|
|
60
61
|
});
|
|
61
62
|
const emits = defineEmits(["update:modelValue", "update:placeholder", "update:validModelValue", "update:startValue"]);
|
|
62
63
|
defineSlots();
|
|
64
|
+
const props = useComponentProps("calendar", _props);
|
|
63
65
|
const { dir, t, locale } = useLocale();
|
|
64
66
|
const appConfig = useAppConfig();
|
|
65
|
-
const
|
|
66
|
-
const rootProps = useForwardPropsEmits(reactiveOmit(props, "range", "modelValue", "defaultValue", "color", "variant", "size", "monthControls", "yearControls", "class", "ui"), emits);
|
|
67
|
+
const rootProps = useForwardProps(reactiveOmit(props, "range", "modelValue", "defaultValue", "color", "variant", "size", "monthControls", "yearControls", "class", "ui"), emits);
|
|
67
68
|
const nextYearIcon = computed(() => props.nextYearIcon || (dir.value === "rtl" ? appConfig.ui.icons.chevronDoubleLeft : appConfig.ui.icons.chevronDoubleRight));
|
|
68
69
|
const nextMonthIcon = computed(() => props.nextMonthIcon || (dir.value === "rtl" ? appConfig.ui.icons.chevronLeft : appConfig.ui.icons.chevronRight));
|
|
69
70
|
const prevYearIcon = computed(() => props.prevYearIcon || (dir.value === "rtl" ? appConfig.ui.icons.chevronDoubleRight : appConfig.ui.icons.chevronDoubleLeft));
|
|
@@ -87,19 +88,19 @@ const Calendar = computed(() => props.range ? RangeCalendar : SingleCalendar);
|
|
|
87
88
|
<Calendar.Root
|
|
88
89
|
v-slot="{ weekDays, grid }"
|
|
89
90
|
v-bind="rootProps"
|
|
90
|
-
:model-value="modelValue"
|
|
91
|
-
:default-value="defaultValue"
|
|
91
|
+
:model-value="props.modelValue"
|
|
92
|
+
:default-value="props.defaultValue"
|
|
92
93
|
data-slot="root"
|
|
93
|
-
:class="ui.root({ class: [
|
|
94
|
+
:class="ui.root({ class: [props.ui?.root, props.class] })"
|
|
94
95
|
>
|
|
95
|
-
<Calendar.Header data-slot="header" :class="ui.header({ class:
|
|
96
|
+
<Calendar.Header data-slot="header" :class="ui.header({ class: props.ui?.header })">
|
|
96
97
|
<Calendar.Prev v-if="props.yearControls" :prev-page="(date) => paginateYear(date, -1)" :aria-label="t('calendar.prevYear')" as-child>
|
|
97
98
|
<UButton :icon="prevYearIcon" :size="props.size" color="neutral" variant="ghost" v-bind="props.prevYear" />
|
|
98
99
|
</Calendar.Prev>
|
|
99
100
|
<Calendar.Prev v-if="props.monthControls" :aria-label="t('calendar.prevMonth')" as-child>
|
|
100
101
|
<UButton :icon="prevMonthIcon" :size="props.size" color="neutral" variant="ghost" v-bind="props.prevMonth" />
|
|
101
102
|
</Calendar.Prev>
|
|
102
|
-
<Calendar.Heading v-slot="{ headingValue }" data-slot="heading" :class="ui.heading({ class:
|
|
103
|
+
<Calendar.Heading v-slot="{ headingValue }" data-slot="heading" :class="ui.heading({ class: props.ui?.heading })">
|
|
103
104
|
<slot name="heading" :value="headingValue">
|
|
104
105
|
{{ headingValue }}
|
|
105
106
|
</slot>
|
|
@@ -111,20 +112,20 @@ const Calendar = computed(() => props.range ? RangeCalendar : SingleCalendar);
|
|
|
111
112
|
<UButton :icon="nextYearIcon" :size="props.size" color="neutral" variant="ghost" v-bind="props.nextYear" />
|
|
112
113
|
</Calendar.Next>
|
|
113
114
|
</Calendar.Header>
|
|
114
|
-
<div data-slot="body" :class="ui.body({ class:
|
|
115
|
+
<div data-slot="body" :class="ui.body({ class: props.ui?.body })">
|
|
115
116
|
<Calendar.Grid
|
|
116
117
|
v-for="month in grid"
|
|
117
118
|
:key="month.value.toString()"
|
|
118
119
|
data-slot="grid"
|
|
119
|
-
:class="ui.grid({ class:
|
|
120
|
+
:class="ui.grid({ class: props.ui?.grid })"
|
|
120
121
|
>
|
|
121
122
|
<Calendar.GridHead>
|
|
122
|
-
<Calendar.GridRow data-slot="gridWeekDaysRow" :class="ui.gridWeekDaysRow({ class:
|
|
123
|
+
<Calendar.GridRow data-slot="gridWeekDaysRow" :class="ui.gridWeekDaysRow({ class: props.ui?.gridWeekDaysRow })">
|
|
123
124
|
<Calendar.HeadCell
|
|
124
125
|
v-for="day in weekDays"
|
|
125
126
|
:key="day"
|
|
126
127
|
data-slot="headCell"
|
|
127
|
-
:class="ui.headCell({ class:
|
|
128
|
+
:class="ui.headCell({ class: props.ui?.headCell })"
|
|
128
129
|
>
|
|
129
130
|
<slot name="week-day" :day="day">
|
|
130
131
|
{{ day }}
|
|
@@ -132,18 +133,18 @@ const Calendar = computed(() => props.range ? RangeCalendar : SingleCalendar);
|
|
|
132
133
|
</Calendar.HeadCell>
|
|
133
134
|
</Calendar.GridRow>
|
|
134
135
|
</Calendar.GridHead>
|
|
135
|
-
<Calendar.GridBody data-slot="gridBody" :class="ui.gridBody({ class:
|
|
136
|
+
<Calendar.GridBody data-slot="gridBody" :class="ui.gridBody({ class: props.ui?.gridBody })">
|
|
136
137
|
<Calendar.GridRow
|
|
137
138
|
v-for="(weekDates, index) in month.rows"
|
|
138
139
|
:key="`weekDate-${index}`"
|
|
139
140
|
data-slot="gridRow"
|
|
140
|
-
:class="ui.gridRow({ class:
|
|
141
|
+
:class="ui.gridRow({ class: props.ui?.gridRow })"
|
|
141
142
|
>
|
|
142
143
|
<td
|
|
143
|
-
v-if="weekNumbers && weekDates[0]"
|
|
144
|
+
v-if="props.weekNumbers && weekDates[0]"
|
|
144
145
|
role="gridcell"
|
|
145
146
|
data-slot="cellWeek"
|
|
146
|
-
:class="ui.cellWeek({ class:
|
|
147
|
+
:class="ui.cellWeek({ class: props.ui?.cellWeek })"
|
|
147
148
|
>
|
|
148
149
|
{{ getWeekNumber(weekDates[0], locale.code) }}
|
|
149
150
|
</td>
|
|
@@ -152,13 +153,13 @@ const Calendar = computed(() => props.range ? RangeCalendar : SingleCalendar);
|
|
|
152
153
|
:key="weekDate.toString()"
|
|
153
154
|
:date="weekDate"
|
|
154
155
|
data-slot="cell"
|
|
155
|
-
:class="ui.cell({ class:
|
|
156
|
+
:class="ui.cell({ class: props.ui?.cell })"
|
|
156
157
|
>
|
|
157
158
|
<Calendar.CellTrigger
|
|
158
159
|
:day="weekDate"
|
|
159
160
|
:month="month.value"
|
|
160
161
|
data-slot="cellTrigger"
|
|
161
|
-
:class="ui.cellTrigger({ class:
|
|
162
|
+
:class="ui.cellTrigger({ class: props.ui?.cellTrigger })"
|
|
162
163
|
>
|
|
163
164
|
<slot name="day" :day="weekDate">
|
|
164
165
|
{{ weekDate.day }}
|
|
@@ -6,9 +6,9 @@ import theme from "#build/ui/card";
|
|
|
6
6
|
import { computed } from "vue";
|
|
7
7
|
import { Primitive } 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
|
-
const
|
|
11
|
+
const _props = defineProps({
|
|
12
12
|
as: { type: null, required: false },
|
|
13
13
|
title: { type: String, required: false },
|
|
14
14
|
description: { type: String, required: false },
|
|
@@ -17,36 +17,36 @@ const props = defineProps({
|
|
|
17
17
|
ui: { type: Object, required: false }
|
|
18
18
|
});
|
|
19
19
|
const slots = defineSlots();
|
|
20
|
+
const props = useComponentProps("card", _props);
|
|
20
21
|
const appConfig = useAppConfig();
|
|
21
|
-
const uiProp = useComponentUI("card", props);
|
|
22
22
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.card || {} })({
|
|
23
23
|
variant: props.variant
|
|
24
24
|
}));
|
|
25
25
|
</script>
|
|
26
26
|
|
|
27
27
|
<template>
|
|
28
|
-
<Primitive :as="as" data-slot="root" :class="ui.root({ class: [
|
|
29
|
-
<div v-if="!!slots.header || (title || !!slots.title) || (description || !!slots.description)" data-slot="header" :class="ui.header({ class:
|
|
28
|
+
<Primitive :as="props.as" data-slot="root" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
29
|
+
<div v-if="!!slots.header || (props.title || !!slots.title) || (props.description || !!slots.description)" data-slot="header" :class="ui.header({ class: props.ui?.header })">
|
|
30
30
|
<slot name="header">
|
|
31
|
-
<div v-if="title || !!slots.title" data-slot="title" :class="ui.title({ class:
|
|
31
|
+
<div v-if="props.title || !!slots.title" data-slot="title" :class="ui.title({ class: props.ui?.title })">
|
|
32
32
|
<slot name="title">
|
|
33
|
-
{{ title }}
|
|
33
|
+
{{ props.title }}
|
|
34
34
|
</slot>
|
|
35
35
|
</div>
|
|
36
36
|
|
|
37
|
-
<div v-if="description || !!slots.description" data-slot="description" :class="ui.description({ class:
|
|
37
|
+
<div v-if="props.description || !!slots.description" data-slot="description" :class="ui.description({ class: props.ui?.description })">
|
|
38
38
|
<slot name="description">
|
|
39
|
-
{{ description }}
|
|
39
|
+
{{ props.description }}
|
|
40
40
|
</slot>
|
|
41
41
|
</div>
|
|
42
42
|
</slot>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
|
-
<div v-if="!!slots.default" data-slot="body" :class="ui.body({ class:
|
|
45
|
+
<div v-if="!!slots.default" data-slot="body" :class="ui.body({ class: props.ui?.body })">
|
|
46
46
|
<slot />
|
|
47
47
|
</div>
|
|
48
48
|
|
|
49
|
-
<div v-if="!!slots.footer" data-slot="footer" :class="ui.footer({ class:
|
|
49
|
+
<div v-if="!!slots.footer" data-slot="footer" :class="ui.footer({ class: props.ui?.footer })">
|
|
50
50
|
<slot name="footer" />
|
|
51
51
|
</div>
|
|
52
52
|
</Primitive>
|
|
@@ -5,14 +5,15 @@ import theme from "#build/ui/carousel";
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { computed, ref, watch, onMounted, onBeforeUnmount } from "vue";
|
|
7
7
|
import useEmblaCarousel from "embla-carousel-vue";
|
|
8
|
-
import { Primitive
|
|
8
|
+
import { Primitive } from "reka-ui";
|
|
9
9
|
import { reactivePick } from "@vueuse/core";
|
|
10
10
|
import { useAppConfig } from "#imports";
|
|
11
|
-
import {
|
|
11
|
+
import { useComponentProps } from "../composables/useComponentProps";
|
|
12
|
+
import { useForwardProps } from "../composables/useForwardProps";
|
|
12
13
|
import { useLocale } from "../composables/useLocale";
|
|
13
14
|
import { tv } from "../utils/tv";
|
|
14
15
|
import UButton from "./Button.vue";
|
|
15
|
-
const
|
|
16
|
+
const _props = defineProps({
|
|
16
17
|
as: { type: null, required: false },
|
|
17
18
|
prev: { type: Object, required: false },
|
|
18
19
|
prevIcon: { type: null, required: false },
|
|
@@ -49,9 +50,9 @@ const props = defineProps({
|
|
|
49
50
|
});
|
|
50
51
|
defineSlots();
|
|
51
52
|
const emits = defineEmits(["select"]);
|
|
53
|
+
const props = useComponentProps("carousel", _props);
|
|
52
54
|
const { dir, t } = useLocale();
|
|
53
55
|
const appConfig = useAppConfig();
|
|
54
|
-
const uiProp = useComponentUI("carousel", props);
|
|
55
56
|
const rootProps = useForwardProps(reactivePick(props, "active", "align", "breakpoints", "containScroll", "dragFree", "dragThreshold", "duration", "inViewThreshold", "loop", "skipSnaps", "slidesToScroll", "startIndex", "watchDrag", "watchResize", "watchSlides", "watchFocus"));
|
|
56
57
|
const prevIcon = computed(() => props.prevIcon || (dir.value === "rtl" ? appConfig.ui.icons.arrowRight : appConfig.ui.icons.arrowLeft));
|
|
57
58
|
const nextIcon = computed(() => props.nextIcon || (dir.value === "rtl" ? appConfig.ui.icons.arrowLeft : appConfig.ui.icons.arrowRight));
|
|
@@ -59,13 +60,13 @@ const stopAutoplayOnInteraction = computed(() => {
|
|
|
59
60
|
if (typeof props.autoplay === "boolean") {
|
|
60
61
|
return true;
|
|
61
62
|
}
|
|
62
|
-
return props.autoplay
|
|
63
|
+
return props.autoplay?.stopOnInteraction ?? true;
|
|
63
64
|
});
|
|
64
65
|
const stopAutoScrollOnInteraction = computed(() => {
|
|
65
66
|
if (typeof props.autoScroll === "boolean") {
|
|
66
67
|
return true;
|
|
67
68
|
}
|
|
68
|
-
return props.autoScroll
|
|
69
|
+
return props.autoScroll?.stopOnInteraction ?? true;
|
|
69
70
|
});
|
|
70
71
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.carousel || {} })({
|
|
71
72
|
orientation: props.orientation
|
|
@@ -196,40 +197,40 @@ defineExpose({
|
|
|
196
197
|
|
|
197
198
|
<template>
|
|
198
199
|
<Primitive
|
|
199
|
-
:as="as"
|
|
200
|
+
:as="props.as"
|
|
200
201
|
role="region"
|
|
201
202
|
aria-roledescription="carousel"
|
|
202
|
-
:data-orientation="orientation"
|
|
203
|
+
:data-orientation="props.orientation"
|
|
203
204
|
tabindex="0"
|
|
204
205
|
data-slot="root"
|
|
205
|
-
:class="ui.root({ class: [
|
|
206
|
+
:class="ui.root({ class: [props.ui?.root, props.class] })"
|
|
206
207
|
@keydown="onKeyDown"
|
|
207
208
|
>
|
|
208
|
-
<div ref="emblaRef" data-slot="viewport" :class="ui.viewport({ class:
|
|
209
|
-
<div data-slot="container" :class="ui.container({ class:
|
|
209
|
+
<div ref="emblaRef" data-slot="viewport" :class="ui.viewport({ class: props.ui?.viewport })">
|
|
210
|
+
<div data-slot="container" :class="ui.container({ class: props.ui?.container })">
|
|
210
211
|
<div
|
|
211
|
-
v-for="(item, index) in items"
|
|
212
|
+
v-for="(item, index) in props.items"
|
|
212
213
|
:key="index"
|
|
213
|
-
v-bind="dots ? { role: 'tabpanel' } : { 'role': 'group', 'aria-roledescription': 'slide' }"
|
|
214
|
+
v-bind="props.dots ? { role: 'tabpanel' } : { 'role': 'group', 'aria-roledescription': 'slide' }"
|
|
214
215
|
data-slot="item"
|
|
215
|
-
:class="ui.item({ class: [
|
|
216
|
+
:class="ui.item({ class: [props.ui?.item, isCarouselItem(item) && item.ui?.item, isCarouselItem(item) && item.class] })"
|
|
216
217
|
>
|
|
217
218
|
<slot :item="item" :index="index" />
|
|
218
219
|
</div>
|
|
219
220
|
</div>
|
|
220
221
|
</div>
|
|
221
222
|
|
|
222
|
-
<div v-if="arrows || dots" data-slot="controls" :class="ui.controls({ class:
|
|
223
|
-
<div v-if="arrows" data-slot="arrows" :class="ui.arrows({ class:
|
|
223
|
+
<div v-if="props.arrows || props.dots" data-slot="controls" :class="ui.controls({ class: props.ui?.controls })">
|
|
224
|
+
<div v-if="props.arrows" data-slot="arrows" :class="ui.arrows({ class: props.ui?.arrows })">
|
|
224
225
|
<UButton
|
|
225
226
|
:disabled="!canScrollPrev"
|
|
226
227
|
:icon="prevIcon"
|
|
227
228
|
color="neutral"
|
|
228
229
|
variant="outline"
|
|
229
230
|
:aria-label="t('carousel.prev')"
|
|
230
|
-
v-bind="typeof prev === 'object' ? prev : void 0"
|
|
231
|
+
v-bind="typeof props.prev === 'object' ? props.prev : void 0"
|
|
231
232
|
data-slot="prev"
|
|
232
|
-
:class="ui.prev({ class:
|
|
233
|
+
:class="ui.prev({ class: props.ui?.prev })"
|
|
233
234
|
@click="scrollPrev"
|
|
234
235
|
/>
|
|
235
236
|
<UButton
|
|
@@ -238,14 +239,14 @@ defineExpose({
|
|
|
238
239
|
color="neutral"
|
|
239
240
|
variant="outline"
|
|
240
241
|
:aria-label="t('carousel.next')"
|
|
241
|
-
v-bind="typeof next === 'object' ? next : void 0"
|
|
242
|
+
v-bind="typeof props.next === 'object' ? props.next : void 0"
|
|
242
243
|
data-slot="next"
|
|
243
|
-
:class="ui.next({ class:
|
|
244
|
+
:class="ui.next({ class: props.ui?.next })"
|
|
244
245
|
@click="scrollNext"
|
|
245
246
|
/>
|
|
246
247
|
</div>
|
|
247
248
|
|
|
248
|
-
<div v-if="dots" role="tablist" :aria-label="t('carousel.dots')" data-slot="dots" :class="ui.dots({ class:
|
|
249
|
+
<div v-if="props.dots" role="tablist" :aria-label="t('carousel.dots')" data-slot="dots" :class="ui.dots({ class: props.ui?.dots })">
|
|
249
250
|
<template v-for="(_, index) in scrollSnaps" :key="index">
|
|
250
251
|
<button
|
|
251
252
|
type="button"
|
|
@@ -253,7 +254,7 @@ defineExpose({
|
|
|
253
254
|
:aria-label="t('carousel.goto', { slide: index + 1 })"
|
|
254
255
|
:aria-selected="selectedIndex === index"
|
|
255
256
|
data-slot="dot"
|
|
256
|
-
:class="ui.dot({ class:
|
|
257
|
+
:class="ui.dot({ class: props.ui?.dot, active: selectedIndex === index })"
|
|
257
258
|
:data-state="selectedIndex === index ? 'active' : void 0"
|
|
258
259
|
@click="scrollTo(index)"
|
|
259
260
|
/>
|
|
@@ -8,7 +8,8 @@ import { Primitive, useDateFormatter } from "reka-ui";
|
|
|
8
8
|
import { createReusableTemplate } from "@vueuse/core";
|
|
9
9
|
import { useAppConfig } from "#imports";
|
|
10
10
|
import { useLocale } from "../composables/useLocale";
|
|
11
|
-
import {
|
|
11
|
+
import { useComponentProps } from "../composables/useComponentProps";
|
|
12
|
+
import { usePrefix } from "../composables/usePrefix";
|
|
12
13
|
import ImageComponent from "#build/ui-image-component";
|
|
13
14
|
import { getSlotChildrenText } from "../utils";
|
|
14
15
|
import { tv } from "../utils/tv";
|
|
@@ -16,7 +17,7 @@ import ULink from "./Link.vue";
|
|
|
16
17
|
import UBadge from "./Badge.vue";
|
|
17
18
|
import UUser from "./User.vue";
|
|
18
19
|
defineOptions({ inheritAttrs: false });
|
|
19
|
-
const
|
|
20
|
+
const _props = defineProps({
|
|
20
21
|
as: { type: null, required: false, default: "article" },
|
|
21
22
|
title: { type: String, required: false },
|
|
22
23
|
description: { type: String, required: false },
|
|
@@ -32,10 +33,11 @@ const props = defineProps({
|
|
|
32
33
|
ui: { type: Object, required: false }
|
|
33
34
|
});
|
|
34
35
|
const slots = defineSlots();
|
|
36
|
+
const props = useComponentProps("changelogVersion", _props);
|
|
35
37
|
const { locale } = useLocale();
|
|
36
38
|
const appConfig = useAppConfig();
|
|
37
|
-
const uiProp = useComponentUI("changelogVersion", props);
|
|
38
39
|
const formatter = useDateFormatter(locale.value.code);
|
|
40
|
+
const prefix = usePrefix();
|
|
39
41
|
const [DefineLinkTemplate, ReuseLinkTemplate] = createReusableTemplate();
|
|
40
42
|
const [DefineDateTemplate, ReuseDateTemplate] = createReusableTemplate({
|
|
41
43
|
props: {
|
|
@@ -77,75 +79,75 @@ const ariaLabel = computed(() => {
|
|
|
77
79
|
<template>
|
|
78
80
|
<DefineLinkTemplate>
|
|
79
81
|
<ULink
|
|
80
|
-
v-if="to"
|
|
82
|
+
v-if="props.to"
|
|
81
83
|
:aria-label="ariaLabel"
|
|
82
|
-
v-bind="{ to, target, ...$attrs }"
|
|
83
|
-
class="focus:outline-none peer"
|
|
84
|
+
v-bind="{ to: props.to, target: props.target, ...$attrs }"
|
|
85
|
+
:class="prefix('focus:outline-none peer')"
|
|
84
86
|
raw
|
|
85
87
|
>
|
|
86
|
-
<span class="absolute inset-0" aria-hidden="true" />
|
|
88
|
+
<span :class="prefix('absolute inset-0')" aria-hidden="true" />
|
|
87
89
|
</ULink>
|
|
88
90
|
</DefineLinkTemplate>
|
|
89
91
|
|
|
90
92
|
<DefineDateTemplate v-slot="{ hidden }">
|
|
91
|
-
<time v-if="date" :datetime="datetime" data-slot="date" :class="ui.date({ class:
|
|
93
|
+
<time v-if="date" :datetime="datetime" data-slot="date" :class="ui.date({ class: props.ui?.date, hidden })">
|
|
92
94
|
<slot name="date">
|
|
93
95
|
{{ date }}
|
|
94
96
|
</slot>
|
|
95
97
|
</time>
|
|
96
98
|
</DefineDateTemplate>
|
|
97
99
|
|
|
98
|
-
<Primitive :as="as" data-slot="root" :class="ui.root({ class: [
|
|
99
|
-
<div v-if="!!props.indicator || !!slots.indicator" data-slot="indicator" :class="ui.indicator({ class:
|
|
100
|
+
<Primitive :as="props.as" data-slot="root" :class="ui.root({ class: [props.ui?.root, props.class] })" @click="props.onClick">
|
|
101
|
+
<div v-if="!!props.indicator || !!slots.indicator" data-slot="indicator" :class="ui.indicator({ class: props.ui?.indicator })">
|
|
100
102
|
<slot name="indicator" :ui="ui">
|
|
101
103
|
<ReuseDateTemplate />
|
|
102
104
|
|
|
103
|
-
<div data-slot="dot" :class="ui.dot({ class:
|
|
104
|
-
<div data-slot="dotInner" :class="ui.dotInner({ class:
|
|
105
|
+
<div data-slot="dot" :class="ui.dot({ class: props.ui?.dot })">
|
|
106
|
+
<div data-slot="dotInner" :class="ui.dotInner({ class: props.ui?.dotInner })" />
|
|
105
107
|
</div>
|
|
106
108
|
</slot>
|
|
107
109
|
</div>
|
|
108
110
|
|
|
109
|
-
<div data-slot="container" :class="ui.container({ class:
|
|
110
|
-
<div v-if="!!slots.header || (date || !!slots.date) || (badge || !!slots.badge) || (title || !!slots.title) || (description || !!slots.description) || (image || !!slots.image)" data-slot="header" :class="ui.header({ class:
|
|
111
|
+
<div data-slot="container" :class="ui.container({ class: props.ui?.container })">
|
|
112
|
+
<div v-if="!!slots.header || (date || !!slots.date) || (props.badge || !!slots.badge) || (props.title || !!slots.title) || (props.description || !!slots.description) || (props.image || !!slots.image)" data-slot="header" :class="ui.header({ class: props.ui?.header })">
|
|
111
113
|
<slot name="header">
|
|
112
|
-
<div v-if="date || !!slots.date || (badge || !!slots.badge)" data-slot="meta" :class="ui.meta({ class:
|
|
114
|
+
<div v-if="date || !!slots.date || (props.badge || !!slots.badge)" data-slot="meta" :class="ui.meta({ class: props.ui?.meta, badge: !!props.badge || !!slots.badge || !props.indicator })">
|
|
113
115
|
<slot name="badge" :ui="ui">
|
|
114
116
|
<UBadge
|
|
115
|
-
v-if="badge"
|
|
117
|
+
v-if="props.badge"
|
|
116
118
|
color="neutral"
|
|
117
119
|
variant="solid"
|
|
118
|
-
v-bind="typeof badge === 'string' ? { label: badge } : badge"
|
|
120
|
+
v-bind="typeof props.badge === 'string' ? { label: props.badge } : props.badge"
|
|
119
121
|
data-slot="badge"
|
|
120
|
-
:class="ui.badge({ class:
|
|
122
|
+
:class="ui.badge({ class: props.ui?.badge })"
|
|
121
123
|
/>
|
|
122
124
|
</slot>
|
|
123
125
|
|
|
124
126
|
<ReuseDateTemplate :hidden="!!props.indicator" />
|
|
125
127
|
</div>
|
|
126
128
|
|
|
127
|
-
<h2 v-if="title || !!slots.title" data-slot="title" :class="ui.title({ class:
|
|
129
|
+
<h2 v-if="props.title || !!slots.title" data-slot="title" :class="ui.title({ class: props.ui?.title })">
|
|
128
130
|
<ReuseLinkTemplate />
|
|
129
131
|
|
|
130
132
|
<slot name="title">
|
|
131
|
-
{{ title }}
|
|
133
|
+
{{ props.title }}
|
|
132
134
|
</slot>
|
|
133
135
|
</h2>
|
|
134
136
|
|
|
135
|
-
<div v-if="description || !!slots.description" data-slot="description" :class="ui.description({ class:
|
|
137
|
+
<div v-if="props.description || !!slots.description" data-slot="description" :class="ui.description({ class: props.ui?.description })">
|
|
136
138
|
<slot name="description">
|
|
137
|
-
{{ description }}
|
|
139
|
+
{{ props.description }}
|
|
138
140
|
</slot>
|
|
139
141
|
</div>
|
|
140
142
|
|
|
141
|
-
<div v-if="image || !!slots.image" data-slot="imageWrapper" :class="ui.imageWrapper({ class:
|
|
143
|
+
<div v-if="props.image || !!slots.image" data-slot="imageWrapper" :class="ui.imageWrapper({ class: props.ui?.imageWrapper })">
|
|
142
144
|
<slot name="image" :ui="ui">
|
|
143
145
|
<component
|
|
144
146
|
:is="ImageComponent"
|
|
145
|
-
v-if="image"
|
|
146
|
-
v-bind="typeof image === 'string' ? { src: image, alt: title } : { alt: title, ...image }"
|
|
147
|
+
v-if="props.image"
|
|
148
|
+
v-bind="typeof props.image === 'string' ? { src: props.image, alt: props.title } : { alt: props.title, ...props.image }"
|
|
147
149
|
data-slot="image"
|
|
148
|
-
:class="ui.image({ class:
|
|
150
|
+
:class="ui.image({ class: props.ui?.image, to: !!props.to })"
|
|
149
151
|
/>
|
|
150
152
|
</slot>
|
|
151
153
|
|
|
@@ -156,12 +158,12 @@ const ariaLabel = computed(() => {
|
|
|
156
158
|
|
|
157
159
|
<slot name="body" />
|
|
158
160
|
|
|
159
|
-
<div v-if="!!slots.footer || (authors?.length || !!slots.authors) || !!slots.actions" data-slot="footer" :class="ui.footer({ class:
|
|
161
|
+
<div v-if="!!slots.footer || (props.authors?.length || !!slots.authors) || !!slots.actions" data-slot="footer" :class="ui.footer({ class: props.ui?.footer, body: !!slots.body })">
|
|
160
162
|
<slot name="footer">
|
|
161
|
-
<div v-if="authors?.length || !!slots.authors" data-slot="authors" :class="ui.authors({ class:
|
|
163
|
+
<div v-if="props.authors?.length || !!slots.authors" data-slot="authors" :class="ui.authors({ class: props.ui?.authors })">
|
|
162
164
|
<slot name="authors">
|
|
163
165
|
<UUser
|
|
164
|
-
v-for="(author, index) in authors"
|
|
166
|
+
v-for="(author, index) in props.authors"
|
|
165
167
|
:key="index"
|
|
166
168
|
v-bind="author"
|
|
167
169
|
/>
|
|
@@ -8,11 +8,11 @@ import { Primitive } from "reka-ui";
|
|
|
8
8
|
import { Motion, useScroll, useSpring, useTransform } from "motion-v";
|
|
9
9
|
import { defu } from "defu";
|
|
10
10
|
import { useAppConfig } from "#imports";
|
|
11
|
-
import {
|
|
11
|
+
import { useComponentProps } from "../composables/useComponentProps";
|
|
12
12
|
import { omit } from "../utils";
|
|
13
13
|
import { tv } from "../utils/tv";
|
|
14
14
|
import UChangelogVersion from "./ChangelogVersion.vue";
|
|
15
|
-
const
|
|
15
|
+
const _props = defineProps({
|
|
16
16
|
as: { type: null, required: false },
|
|
17
17
|
versions: { type: Array, required: false },
|
|
18
18
|
indicator: { type: [Boolean, Object], required: false, default: true },
|
|
@@ -21,9 +21,9 @@ const props = defineProps({
|
|
|
21
21
|
ui: { type: Object, required: false }
|
|
22
22
|
});
|
|
23
23
|
const slots = defineSlots();
|
|
24
|
+
const props = useComponentProps("changelogVersions", _props);
|
|
24
25
|
const getProxySlots = () => omit(slots, ["default", "indicator"]);
|
|
25
26
|
const appConfig = useAppConfig();
|
|
26
|
-
const uiProp = useComponentUI("changelogVersions", props);
|
|
27
27
|
const springOptions = computed(() => defu(typeof props.indicatorMotion === "object" ? props.indicatorMotion : {}, { damping: 30, restDelta: 1e-3 }));
|
|
28
28
|
const scrollOptions = computed(() => typeof props.indicator === "object" ? props.indicator : {});
|
|
29
29
|
const { scrollYProgress } = useScroll(scrollOptions.value);
|
|
@@ -33,17 +33,17 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.changelogVers
|
|
|
33
33
|
</script>
|
|
34
34
|
|
|
35
35
|
<template>
|
|
36
|
-
<Primitive :as="as" data-slot="root" :class="ui.root({ class: [
|
|
37
|
-
<div v-if="!!props.indicator || !!slots.indicator" data-slot="indicator" :class="ui.indicator({ class:
|
|
36
|
+
<Primitive :as="props.as" data-slot="root" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
37
|
+
<div v-if="!!props.indicator || !!slots.indicator" data-slot="indicator" :class="ui.indicator({ class: props.ui?.indicator })">
|
|
38
38
|
<slot name="indicator">
|
|
39
|
-
<Motion v-if="!!props.indicatorMotion" data-slot="beam" :class="ui.beam({ class:
|
|
39
|
+
<Motion v-if="!!props.indicatorMotion" data-slot="beam" :class="ui.beam({ class: props.ui?.beam })" :style="{ height }" />
|
|
40
40
|
</slot>
|
|
41
41
|
</div>
|
|
42
42
|
|
|
43
|
-
<div v-if="versions?.length || !!slots.default" data-slot="container" :class="ui.container({ class:
|
|
43
|
+
<div v-if="props.versions?.length || !!slots.default" data-slot="container" :class="ui.container({ class: props.ui?.container })">
|
|
44
44
|
<slot>
|
|
45
45
|
<UChangelogVersion
|
|
46
|
-
v-for="(version, index) in versions"
|
|
46
|
+
v-for="(version, index) in props.versions"
|
|
47
47
|
:key="index"
|
|
48
48
|
:indicator="!!props.indicator"
|
|
49
49
|
v-bind="version"
|
|
@@ -22,6 +22,10 @@ export interface ChatMessageProps<TMetadata = unknown, TDataParts extends UIData
|
|
|
22
22
|
* @defaultValue 'naked'
|
|
23
23
|
*/
|
|
24
24
|
variant?: ChatMessage['variants']['variant'];
|
|
25
|
+
/**
|
|
26
|
+
* @defaultValue 'neutral'
|
|
27
|
+
*/
|
|
28
|
+
color?: ChatMessage['variants']['color'];
|
|
25
29
|
/**
|
|
26
30
|
* @defaultValue 'left'
|
|
27
31
|
*/
|
|
@@ -49,6 +53,7 @@ export interface ChatMessageProps<TMetadata = unknown, TDataParts extends UIData
|
|
|
49
53
|
ui?: ChatMessage['slots'];
|
|
50
54
|
}
|
|
51
55
|
export interface ChatMessageSlots<TMetadata = unknown, TDataParts extends UIDataTypes = UIDataTypes, TTools extends UITools = UITools> {
|
|
56
|
+
header?(props: UIMessage<TMetadata, TDataParts, TTools>): VNode[];
|
|
52
57
|
leading?(props: UIMessage<TMetadata, TDataParts, TTools> & {
|
|
53
58
|
avatar: ChatMessageProps<TMetadata, TDataParts, TTools>['avatar'];
|
|
54
59
|
ui: ChatMessage['ui'];
|
|
@@ -56,6 +61,7 @@ export interface ChatMessageSlots<TMetadata = unknown, TDataParts extends UIData
|
|
|
56
61
|
files?(props: Omit<UIMessage<TMetadata, TDataParts, TTools>, 'parts'> & {
|
|
57
62
|
parts: FileUIPart[];
|
|
58
63
|
}): VNode[];
|
|
64
|
+
body?(props: UIMessage<TMetadata, TDataParts, TTools>): VNode[];
|
|
59
65
|
content?(props: UIMessage<TMetadata, TDataParts, TTools> & {
|
|
60
66
|
content?: string;
|
|
61
67
|
}): VNode[];
|