@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
|
@@ -7,13 +7,13 @@ import { computed } from "vue";
|
|
|
7
7
|
import { Primitive } from "reka-ui";
|
|
8
8
|
import { createReusableTemplate } from "@vueuse/core";
|
|
9
9
|
import { useAppConfig } from "#imports";
|
|
10
|
-
import {
|
|
10
|
+
import { useComponentProps } from "../composables/useComponentProps";
|
|
11
11
|
import { tv } from "../utils/tv";
|
|
12
12
|
import UBadge from "./Badge.vue";
|
|
13
13
|
import UButton from "./Button.vue";
|
|
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
|
title: { type: String, required: false },
|
|
19
19
|
description: { type: String, required: false },
|
|
@@ -34,8 +34,8 @@ const props = defineProps({
|
|
|
34
34
|
ui: { type: Object, required: false }
|
|
35
35
|
});
|
|
36
36
|
const slots = defineSlots();
|
|
37
|
+
const props = useComponentProps("pricingPlan", _props);
|
|
37
38
|
const appConfig = useAppConfig();
|
|
38
|
-
const uiProp = useComponentUI("pricingPlan", props);
|
|
39
39
|
const [DefinePriceTemplate, ReusePriceTemplate] = createReusableTemplate();
|
|
40
40
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.pricingPlan || {} })({
|
|
41
41
|
orientation: props.orientation,
|
|
@@ -48,96 +48,96 @@ const features = computed(() => props.features?.map((feature) => typeof feature
|
|
|
48
48
|
|
|
49
49
|
<template>
|
|
50
50
|
<DefinePriceTemplate>
|
|
51
|
-
<div v-if="discount || price || !!slots.discount || !!slots.price || billingCycle || billingPeriod || !!slots.billing" data-slot="priceWrapper" :class="ui.priceWrapper({ class:
|
|
52
|
-
<div v-if="discount && price || !!slots.discount" data-slot="discount" :class="ui.discount({ class:
|
|
51
|
+
<div v-if="props.discount || props.price || !!slots.discount || !!slots.price || props.billingCycle || props.billingPeriod || !!slots.billing" data-slot="priceWrapper" :class="ui.priceWrapper({ class: props.ui?.priceWrapper })">
|
|
52
|
+
<div v-if="props.discount && props.price || !!slots.discount" data-slot="discount" :class="ui.discount({ class: props.ui?.discount })">
|
|
53
53
|
<slot name="discount">
|
|
54
|
-
{{ price }}
|
|
54
|
+
{{ props.price }}
|
|
55
55
|
</slot>
|
|
56
56
|
</div>
|
|
57
57
|
|
|
58
|
-
<div v-if="discount || price || !!slots.price" data-slot="price" :class="ui.price({ class:
|
|
58
|
+
<div v-if="props.discount || props.price || !!slots.price" data-slot="price" :class="ui.price({ class: props.ui?.price })">
|
|
59
59
|
<slot name="price">
|
|
60
|
-
{{ discount || price }}
|
|
60
|
+
{{ props.discount || props.price }}
|
|
61
61
|
</slot>
|
|
62
62
|
</div>
|
|
63
63
|
|
|
64
|
-
<div v-if="billingCycle || billingPeriod || !!slots.billing" data-slot="billing" :class="ui.billing({ class:
|
|
64
|
+
<div v-if="props.billingCycle || props.billingPeriod || !!slots.billing" data-slot="billing" :class="ui.billing({ class: props.ui?.billing })">
|
|
65
65
|
<slot name="billing" :ui="ui">
|
|
66
|
-
<span data-slot="billingPeriod" :class="ui.billingPeriod({ class:
|
|
67
|
-
{{ billingPeriod || "\xA0" }}
|
|
66
|
+
<span data-slot="billingPeriod" :class="ui.billingPeriod({ class: props.ui?.billingPeriod })">
|
|
67
|
+
{{ props.billingPeriod || "\xA0" }}
|
|
68
68
|
</span>
|
|
69
69
|
|
|
70
|
-
<span v-if="billingCycle" data-slot="billingCycle" :class="ui.billingCycle({ class:
|
|
71
|
-
{{ billingCycle }}
|
|
70
|
+
<span v-if="props.billingCycle" data-slot="billingCycle" :class="ui.billingCycle({ class: props.ui?.billingCycle })">
|
|
71
|
+
{{ props.billingCycle }}
|
|
72
72
|
</span>
|
|
73
73
|
</slot>
|
|
74
74
|
</div>
|
|
75
75
|
</div>
|
|
76
76
|
</DefinePriceTemplate>
|
|
77
77
|
|
|
78
|
-
<Primitive :as="as" v-bind="$attrs" :data-orientation="orientation" data-slot="root" :class="ui.root({ class: [
|
|
79
|
-
<div v-if="!!slots.header && orientation === 'vertical'" data-slot="header" :class="ui.header({ class:
|
|
78
|
+
<Primitive :as="props.as" v-bind="$attrs" :data-orientation="props.orientation" data-slot="root" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
79
|
+
<div v-if="!!slots.header && props.orientation === 'vertical'" data-slot="header" :class="ui.header({ class: props.ui?.header })">
|
|
80
80
|
<slot name="header" />
|
|
81
81
|
</div>
|
|
82
82
|
|
|
83
|
-
<div data-slot="body" :class="ui.body({ class:
|
|
83
|
+
<div data-slot="body" :class="ui.body({ class: props.ui?.body })">
|
|
84
84
|
<slot name="body">
|
|
85
|
-
<div data-slot="titleWrapper" :class="ui.titleWrapper({ class:
|
|
86
|
-
<div v-if="title || !!slots.title" data-slot="title" :class="ui.title({ class:
|
|
85
|
+
<div data-slot="titleWrapper" :class="ui.titleWrapper({ class: props.ui?.titleWrapper })">
|
|
86
|
+
<div v-if="props.title || !!slots.title" data-slot="title" :class="ui.title({ class: props.ui?.title })">
|
|
87
87
|
<slot name="title">
|
|
88
|
-
{{ title }}
|
|
88
|
+
{{ props.title }}
|
|
89
89
|
</slot>
|
|
90
90
|
</div>
|
|
91
91
|
|
|
92
92
|
<slot name="badge" :ui="ui">
|
|
93
93
|
<UBadge
|
|
94
|
-
v-if="badge"
|
|
94
|
+
v-if="props.badge"
|
|
95
95
|
color="primary"
|
|
96
96
|
variant="subtle"
|
|
97
|
-
v-bind="typeof badge === 'string' ? { label: badge } : badge"
|
|
97
|
+
v-bind="typeof props.badge === 'string' ? { label: props.badge } : props.badge"
|
|
98
98
|
data-slot="badge"
|
|
99
|
-
:class="ui.badge({ class:
|
|
99
|
+
:class="ui.badge({ class: props.ui?.badge })"
|
|
100
100
|
/>
|
|
101
101
|
</slot>
|
|
102
102
|
</div>
|
|
103
103
|
|
|
104
|
-
<div v-if="description || !!slots.description" data-slot="description" :class="ui.description({ class:
|
|
104
|
+
<div v-if="props.description || !!slots.description" data-slot="description" :class="ui.description({ class: props.ui?.description })">
|
|
105
105
|
<slot name="description">
|
|
106
|
-
{{ description }}
|
|
106
|
+
{{ props.description }}
|
|
107
107
|
</slot>
|
|
108
108
|
</div>
|
|
109
109
|
|
|
110
|
-
<ReusePriceTemplate v-if="orientation === 'vertical'" />
|
|
110
|
+
<ReusePriceTemplate v-if="props.orientation === 'vertical'" />
|
|
111
111
|
|
|
112
|
-
<ul v-if="features?.length || !!slots.features" data-slot="features" :class="ui.features({ class:
|
|
112
|
+
<ul v-if="features?.length || !!slots.features" data-slot="features" :class="ui.features({ class: props.ui?.features })">
|
|
113
113
|
<slot name="features">
|
|
114
|
-
<li v-for="(feature, index) in features" :key="index" data-slot="feature" :class="ui.feature({ class:
|
|
115
|
-
<UIcon :name="feature.icon || appConfig.ui.icons.success" data-slot="featureIcon" :class="ui.featureIcon({ class:
|
|
114
|
+
<li v-for="(feature, index) in features" :key="index" data-slot="feature" :class="ui.feature({ class: props.ui?.feature })">
|
|
115
|
+
<UIcon :name="feature.icon || appConfig.ui.icons.success" data-slot="featureIcon" :class="ui.featureIcon({ class: props.ui?.featureIcon })" />
|
|
116
116
|
|
|
117
|
-
<span data-slot="featureTitle" :class="ui.featureTitle({ class:
|
|
117
|
+
<span data-slot="featureTitle" :class="ui.featureTitle({ class: props.ui?.featureTitle })">{{ feature.title }}</span>
|
|
118
118
|
</li>
|
|
119
119
|
</slot>
|
|
120
120
|
</ul>
|
|
121
121
|
</slot>
|
|
122
122
|
</div>
|
|
123
123
|
|
|
124
|
-
<div v-if="terms || !!slots.terms || (button || !!slots.button) || orientation === 'horizontal' || (tagline || !!slots.tagline) || !!slots.footer" data-slot="footer" :class="ui.footer({ class:
|
|
124
|
+
<div v-if="props.terms || !!slots.terms || (props.button || !!slots.button) || props.orientation === 'horizontal' || (props.tagline || !!slots.tagline) || !!slots.footer" data-slot="footer" :class="ui.footer({ class: props.ui?.footer })">
|
|
125
125
|
<slot name="footer">
|
|
126
|
-
<div v-if="tagline || !!slots.tagline" data-slot="tagline" :class="ui.tagline({ class:
|
|
126
|
+
<div v-if="props.tagline || !!slots.tagline" data-slot="tagline" :class="ui.tagline({ class: props.ui?.tagline })">
|
|
127
127
|
<slot name="tagline">
|
|
128
|
-
{{ tagline }}
|
|
128
|
+
{{ props.tagline }}
|
|
129
129
|
</slot>
|
|
130
130
|
</div>
|
|
131
131
|
|
|
132
|
-
<ReusePriceTemplate v-if="orientation === 'horizontal'" />
|
|
132
|
+
<ReusePriceTemplate v-if="props.orientation === 'horizontal'" />
|
|
133
133
|
|
|
134
134
|
<slot name="button" :ui="ui">
|
|
135
|
-
<UButton v-if="button" v-bind="{ block: true, size: 'lg', ...button }" data-slot="button" :class="ui.button({ class:
|
|
135
|
+
<UButton v-if="props.button" v-bind="{ block: true, size: 'lg', ...props.button }" data-slot="button" :class="ui.button({ class: props.ui?.button })" @click="props.button?.onClick" />
|
|
136
136
|
</slot>
|
|
137
137
|
|
|
138
|
-
<div v-if="terms || !!slots.terms" data-slot="terms" :class="ui.terms({ class:
|
|
138
|
+
<div v-if="props.terms || !!slots.terms" data-slot="terms" :class="ui.terms({ class: props.ui?.terms })">
|
|
139
139
|
<slot name="terms">
|
|
140
|
-
{{ terms }}
|
|
140
|
+
{{ props.terms }}
|
|
141
141
|
</slot>
|
|
142
142
|
</div>
|
|
143
143
|
</slot>
|
|
@@ -8,9 +8,9 @@ import { Primitive } from "reka-ui";
|
|
|
8
8
|
import { useAppConfig } from "#imports";
|
|
9
9
|
import { omit } from "../utils";
|
|
10
10
|
import { tv } from "../utils/tv";
|
|
11
|
-
import {
|
|
11
|
+
import { useComponentProps } from "../composables/useComponentProps";
|
|
12
12
|
import UPricingPlan from "./PricingPlan.vue";
|
|
13
|
-
const
|
|
13
|
+
const _props = defineProps({
|
|
14
14
|
as: { type: null, required: false },
|
|
15
15
|
plans: { type: Array, required: false },
|
|
16
16
|
orientation: { type: null, required: false, default: "horizontal" },
|
|
@@ -20,9 +20,9 @@ const props = defineProps({
|
|
|
20
20
|
ui: { type: Object, required: false }
|
|
21
21
|
});
|
|
22
22
|
const slots = defineSlots();
|
|
23
|
+
const props = useComponentProps("pricingPlans", _props);
|
|
23
24
|
const getProxySlots = () => omit(slots, ["default"]);
|
|
24
25
|
const appConfig = useAppConfig();
|
|
25
|
-
const uiProp = useComponentUI("pricingPlans", props);
|
|
26
26
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.pricingPlans || {} }));
|
|
27
27
|
const count = computed(() => props.plans?.length || slots.default?.()?.flatMap(mapSlot).filter(Boolean)?.length || 3);
|
|
28
28
|
function mapSlot(slot) {
|
|
@@ -37,12 +37,12 @@ function mapSlot(slot) {
|
|
|
37
37
|
</script>
|
|
38
38
|
|
|
39
39
|
<template>
|
|
40
|
-
<Primitive :as="as" :data-orientation="orientation" :class="ui({ class: [
|
|
40
|
+
<Primitive :as="props.as" :data-orientation="props.orientation" :class="ui({ class: [props.ui?.base, props.class], compact: props.compact, scale: props.scale, orientation: props.orientation })" :style="{ '--count': count }">
|
|
41
41
|
<slot>
|
|
42
42
|
<UPricingPlan
|
|
43
|
-
v-for="(plan, index) in plans"
|
|
43
|
+
v-for="(plan, index) in props.plans"
|
|
44
44
|
:key="index"
|
|
45
|
-
:orientation="orientation === 'vertical' ? 'horizontal' : 'vertical'"
|
|
45
|
+
:orientation="props.orientation === 'vertical' ? 'horizontal' : 'vertical'"
|
|
46
46
|
v-bind="plan"
|
|
47
47
|
>
|
|
48
48
|
<template v-for="(_, name) in getProxySlots()" #[name]="slotData">
|
|
@@ -7,14 +7,14 @@ import { computed } from "vue";
|
|
|
7
7
|
import { Primitive } from "reka-ui";
|
|
8
8
|
import { createReusableTemplate } from "@vueuse/core";
|
|
9
9
|
import { useAppConfig } from "#imports";
|
|
10
|
-
import {
|
|
10
|
+
import { useComponentProps } from "../composables/useComponentProps";
|
|
11
11
|
import { useLocale } from "../composables/useLocale";
|
|
12
12
|
import { tv } from "../utils/tv";
|
|
13
13
|
import UBadge from "./Badge.vue";
|
|
14
14
|
import UButton from "./Button.vue";
|
|
15
15
|
import UIcon from "./Icon.vue";
|
|
16
16
|
defineOptions({ inheritAttrs: false });
|
|
17
|
-
const
|
|
17
|
+
const _props = defineProps({
|
|
18
18
|
as: { type: null, required: false },
|
|
19
19
|
caption: { type: String, required: false },
|
|
20
20
|
tiers: { type: Array, required: true },
|
|
@@ -23,9 +23,9 @@ const props = defineProps({
|
|
|
23
23
|
ui: { type: Object, required: false }
|
|
24
24
|
});
|
|
25
25
|
const slots = defineSlots();
|
|
26
|
+
const props = useComponentProps("pricingTable", _props);
|
|
26
27
|
const { t } = useLocale();
|
|
27
28
|
const appConfig = useAppConfig();
|
|
28
|
-
const uiProp = useComponentUI("pricingTable", props);
|
|
29
29
|
const formatSlotName = (item) => {
|
|
30
30
|
if (item.id) return item.id;
|
|
31
31
|
return item.title.toLowerCase().replace(/[^a-z0-9\s-]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
@@ -46,11 +46,11 @@ const [DefineFeatureTemplate, ReuseFeatureTemplate] = createReusableTemplate({
|
|
|
46
46
|
|
|
47
47
|
<template>
|
|
48
48
|
<DefineTierTemplate v-slot="{ tier }">
|
|
49
|
-
<div data-slot="tierWrapper" :class="ui.tierWrapper({ class:
|
|
49
|
+
<div data-slot="tierWrapper" :class="ui.tierWrapper({ class: props.ui?.tierWrapper })">
|
|
50
50
|
<slot :name="tier.id" :tier="tier">
|
|
51
51
|
<slot name="tier" :tier="tier">
|
|
52
|
-
<div data-slot="tierTitleWrapper" :class="ui.tierTitleWrapper({ class:
|
|
53
|
-
<div data-slot="tierTitle" :class="ui.tierTitle({ class:
|
|
52
|
+
<div data-slot="tierTitleWrapper" :class="ui.tierTitleWrapper({ class: props.ui?.tierTitleWrapper })">
|
|
53
|
+
<div data-slot="tierTitle" :class="ui.tierTitle({ class: props.ui?.tierTitle })">
|
|
54
54
|
<slot :name="`${tier.id}-title`" :tier="tier">
|
|
55
55
|
<slot name="tier-title" :tier="tier">
|
|
56
56
|
{{ tier.title }}
|
|
@@ -66,13 +66,13 @@ const [DefineFeatureTemplate, ReuseFeatureTemplate] = createReusableTemplate({
|
|
|
66
66
|
variant="subtle"
|
|
67
67
|
v-bind="typeof tier.badge === 'string' ? { label: tier.badge } : tier.badge"
|
|
68
68
|
data-slot="tierBadge"
|
|
69
|
-
:class="ui.tierBadge({ class:
|
|
69
|
+
:class="ui.tierBadge({ class: props.ui?.tierBadge })"
|
|
70
70
|
/>
|
|
71
71
|
</slot>
|
|
72
72
|
</slot>
|
|
73
73
|
</div>
|
|
74
74
|
|
|
75
|
-
<div data-slot="tierDescription" :class="ui.tierDescription({ class:
|
|
75
|
+
<div data-slot="tierDescription" :class="ui.tierDescription({ class: props.ui?.tierDescription })">
|
|
76
76
|
<slot :name="`${tier.id}-description`" :tier="tier">
|
|
77
77
|
<slot name="tier-description" :tier="tier">
|
|
78
78
|
{{ tier.description }}
|
|
@@ -80,8 +80,8 @@ const [DefineFeatureTemplate, ReuseFeatureTemplate] = createReusableTemplate({
|
|
|
80
80
|
</slot>
|
|
81
81
|
</div>
|
|
82
82
|
|
|
83
|
-
<div data-slot="tierPriceWrapper" :class="ui.tierPriceWrapper({ class:
|
|
84
|
-
<div v-if="tier.discount && tier.price || !!slots[`${tier.id}-discount`] || !!slots['tier-discount']" data-slot="tierDiscount" :class="ui.tierDiscount({ class:
|
|
83
|
+
<div data-slot="tierPriceWrapper" :class="ui.tierPriceWrapper({ class: props.ui?.tierPriceWrapper })">
|
|
84
|
+
<div v-if="tier.discount && tier.price || !!slots[`${tier.id}-discount`] || !!slots['tier-discount']" data-slot="tierDiscount" :class="ui.tierDiscount({ class: props.ui?.tierDiscount })">
|
|
85
85
|
<slot :name="`${tier.id}-discount`" :tier="tier">
|
|
86
86
|
<slot name="tier-discount" :tier="tier">
|
|
87
87
|
{{ tier.price }}
|
|
@@ -89,7 +89,7 @@ const [DefineFeatureTemplate, ReuseFeatureTemplate] = createReusableTemplate({
|
|
|
89
89
|
</slot>
|
|
90
90
|
</div>
|
|
91
91
|
|
|
92
|
-
<div v-if="tier.discount || tier.price || !!slots[`${tier.id}-price`] || !!slots['tier-price']" data-slot="tierPrice" :class="ui.tierPrice({ class:
|
|
92
|
+
<div v-if="tier.discount || tier.price || !!slots[`${tier.id}-price`] || !!slots['tier-price']" data-slot="tierPrice" :class="ui.tierPrice({ class: props.ui?.tierPrice })">
|
|
93
93
|
<slot :name="`${tier.id}-price`" :tier="tier">
|
|
94
94
|
<slot name="tier-price" :tier="tier">
|
|
95
95
|
{{ tier.discount || tier.price }}
|
|
@@ -97,14 +97,14 @@ const [DefineFeatureTemplate, ReuseFeatureTemplate] = createReusableTemplate({
|
|
|
97
97
|
</slot>
|
|
98
98
|
</div>
|
|
99
99
|
|
|
100
|
-
<div v-if="tier.billingCycle || tier.billingPeriod || !!slots[`${tier.id}-billing`] || !!slots['tier-billing']" data-slot="tierBilling" :class="ui.tierBilling({ class:
|
|
100
|
+
<div v-if="tier.billingCycle || tier.billingPeriod || !!slots[`${tier.id}-billing`] || !!slots['tier-billing']" data-slot="tierBilling" :class="ui.tierBilling({ class: props.ui?.tierBilling })">
|
|
101
101
|
<slot :name="`${tier.id}-billing`" :tier="tier">
|
|
102
102
|
<slot name="tier-billing" :tier="tier">
|
|
103
|
-
<span data-slot="tierBillingPeriod" :class="ui.tierBillingPeriod({ class:
|
|
103
|
+
<span data-slot="tierBillingPeriod" :class="ui.tierBillingPeriod({ class: props.ui?.tierBillingPeriod })">
|
|
104
104
|
{{ tier.billingPeriod || "\xA0" }}
|
|
105
105
|
</span>
|
|
106
106
|
|
|
107
|
-
<span v-if="tier.billingCycle" data-slot="tierBillingCycle" :class="ui.tierBillingCycle({ class:
|
|
107
|
+
<span v-if="tier.billingCycle" data-slot="tierBillingCycle" :class="ui.tierBillingCycle({ class: props.ui?.tierBillingCycle })">
|
|
108
108
|
{{ tier.billingCycle }}
|
|
109
109
|
</span>
|
|
110
110
|
</slot>
|
|
@@ -112,7 +112,7 @@ const [DefineFeatureTemplate, ReuseFeatureTemplate] = createReusableTemplate({
|
|
|
112
112
|
</div>
|
|
113
113
|
</div>
|
|
114
114
|
|
|
115
|
-
<div v-if="!!slots[`${tier.id}-button`] || !!slots['tier-button'] || tier.button" data-slot="tierButton" :class="ui.tierButton({ class:
|
|
115
|
+
<div v-if="!!slots[`${tier.id}-button`] || !!slots['tier-button'] || tier.button" data-slot="tierButton" :class="ui.tierButton({ class: props.ui?.tierButton })">
|
|
116
116
|
<slot :name="`${tier.id}-button`" :tier="tier">
|
|
117
117
|
<slot name="tier-button" :tier="tier">
|
|
118
118
|
<UButton v-if="tier.button" block size="lg" v-bind="tier.button" />
|
|
@@ -126,44 +126,44 @@ const [DefineFeatureTemplate, ReuseFeatureTemplate] = createReusableTemplate({
|
|
|
126
126
|
|
|
127
127
|
<DefineFeatureTemplate v-slot="{ feature, tier }">
|
|
128
128
|
<template v-if="feature.tiers?.[tier.id]">
|
|
129
|
-
<UIcon v-if="typeof feature.tiers[tier.id] === 'boolean'" :name="appConfig.ui.icons.success" data-slot="tierFeatureIcon" :class="ui.tierFeatureIcon({ class:
|
|
129
|
+
<UIcon v-if="typeof feature.tiers[tier.id] === 'boolean'" :name="appConfig.ui.icons.success" data-slot="tierFeatureIcon" :class="ui.tierFeatureIcon({ class: props.ui?.tierFeatureIcon, active: true })" />
|
|
130
130
|
<template v-else>
|
|
131
131
|
{{ feature.tiers[tier.id] }}
|
|
132
132
|
</template>
|
|
133
133
|
</template>
|
|
134
134
|
|
|
135
|
-
<UIcon v-else :name="appConfig.ui.icons.minus" data-slot="tierFeatureIcon" :class="ui.tierFeatureIcon({ class:
|
|
135
|
+
<UIcon v-else :name="appConfig.ui.icons.minus" data-slot="tierFeatureIcon" :class="ui.tierFeatureIcon({ class: props.ui?.tierFeatureIcon })" />
|
|
136
136
|
</DefineFeatureTemplate>
|
|
137
137
|
|
|
138
|
-
<Primitive :as="as" v-bind="$attrs" data-slot="root" :class="ui.root({ class: [
|
|
139
|
-
<table data-slot="table" :class="ui.table({ class:
|
|
140
|
-
<caption v-if="caption || !!slots.caption" data-slot="caption" :class="ui.caption({ class: [
|
|
138
|
+
<Primitive :as="props.as" v-bind="$attrs" data-slot="root" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
139
|
+
<table data-slot="table" :class="ui.table({ class: props.ui?.table })">
|
|
140
|
+
<caption v-if="props.caption || !!slots.caption" data-slot="caption" :class="ui.caption({ class: [props.ui?.caption] })">
|
|
141
141
|
<slot name="caption">
|
|
142
|
-
{{ caption || t("pricingTable.caption") }}
|
|
142
|
+
{{ props.caption || t("pricingTable.caption") }}
|
|
143
143
|
</slot>
|
|
144
144
|
</caption>
|
|
145
145
|
|
|
146
|
-
<thead data-slot="thead" :class="ui.thead({ class:
|
|
147
|
-
<tr data-slot="tr" :class="ui.tr({ class:
|
|
146
|
+
<thead data-slot="thead" :class="ui.thead({ class: props.ui?.thead })">
|
|
147
|
+
<tr data-slot="tr" :class="ui.tr({ class: props.ui?.tr })">
|
|
148
148
|
<td />
|
|
149
149
|
|
|
150
150
|
<th
|
|
151
|
-
v-for="(tier, index) in tiers"
|
|
151
|
+
v-for="(tier, index) in props.tiers"
|
|
152
152
|
:key="index"
|
|
153
153
|
scope="col"
|
|
154
154
|
data-slot="tier"
|
|
155
|
-
:class="ui.tier({ class:
|
|
155
|
+
:class="ui.tier({ class: props.ui?.tier, highlight: tier.highlight })"
|
|
156
156
|
>
|
|
157
157
|
<ReuseTierTemplate :tier="tier" />
|
|
158
158
|
</th>
|
|
159
159
|
</tr>
|
|
160
160
|
</thead>
|
|
161
161
|
|
|
162
|
-
<tbody data-slot="tbody" :class="ui.tbody({ class:
|
|
163
|
-
<template v-for="(section, sectionIndex) in sections" :key="sectionIndex">
|
|
164
|
-
<tr data-slot="tr" :class="ui.tr({ class:
|
|
165
|
-
<th scope="row" data-slot="th" :class="ui.th({ class:
|
|
166
|
-
<div v-if="section.title || !!slots['section-title'] || !!slots[`section-${formatSlotName(section)}-title`]" data-slot="sectionTitle" :class="ui.sectionTitle({ class:
|
|
162
|
+
<tbody data-slot="tbody" :class="ui.tbody({ class: props.ui?.tbody })">
|
|
163
|
+
<template v-for="(section, sectionIndex) in props.sections" :key="sectionIndex">
|
|
164
|
+
<tr data-slot="tr" :class="ui.tr({ class: props.ui?.tr, section: sectionIndex > 0 })">
|
|
165
|
+
<th scope="row" data-slot="th" :class="ui.th({ class: props.ui?.th })">
|
|
166
|
+
<div v-if="section.title || !!slots['section-title'] || !!slots[`section-${formatSlotName(section)}-title`]" data-slot="sectionTitle" :class="ui.sectionTitle({ class: props.ui?.sectionTitle })">
|
|
167
167
|
<slot :name="`section-${formatSlotName(section)}-title`" :section="section">
|
|
168
168
|
<slot name="section-title" :section="section">
|
|
169
169
|
{{ section.title }}
|
|
@@ -173,16 +173,16 @@ const [DefineFeatureTemplate, ReuseFeatureTemplate] = createReusableTemplate({
|
|
|
173
173
|
</th>
|
|
174
174
|
|
|
175
175
|
<td
|
|
176
|
-
v-for="(tier, index) in tiers"
|
|
176
|
+
v-for="(tier, index) in props.tiers"
|
|
177
177
|
:key="`${sectionIndex}-tier-${index}`"
|
|
178
178
|
data-slot="td"
|
|
179
|
-
:class="ui.td({ class:
|
|
179
|
+
:class="ui.td({ class: props.ui?.td, highlight: tier.highlight })"
|
|
180
180
|
/>
|
|
181
181
|
</tr>
|
|
182
182
|
|
|
183
183
|
<tr v-for="(feature, featureIndex) in section.features" :key="`${sectionIndex}-feature-${featureIndex}`">
|
|
184
|
-
<th scope="row" data-slot="th" :class="ui.th({ class:
|
|
185
|
-
<div data-slot="featureTitle" :class="ui.featureTitle({ class:
|
|
184
|
+
<th scope="row" data-slot="th" :class="ui.th({ class: props.ui?.th })">
|
|
185
|
+
<div data-slot="featureTitle" :class="ui.featureTitle({ class: props.ui?.featureTitle })">
|
|
186
186
|
<slot :name="`feature-${formatSlotName(feature)}-title`" :feature="feature" :section="section">
|
|
187
187
|
<slot name="feature-title" :feature="feature" :section="section">
|
|
188
188
|
{{ feature.title }}
|
|
@@ -192,12 +192,12 @@ const [DefineFeatureTemplate, ReuseFeatureTemplate] = createReusableTemplate({
|
|
|
192
192
|
</th>
|
|
193
193
|
|
|
194
194
|
<td
|
|
195
|
-
v-for="(tier, index) in tiers"
|
|
195
|
+
v-for="(tier, index) in props.tiers"
|
|
196
196
|
:key="`${sectionIndex}-feature-${featureIndex}-tier-${index}`"
|
|
197
197
|
data-slot="td"
|
|
198
|
-
:class="ui.td({ class:
|
|
198
|
+
:class="ui.td({ class: props.ui?.td, highlight: tier.highlight })"
|
|
199
199
|
>
|
|
200
|
-
<div data-slot="featureValue" :class="ui.featureValue({ class:
|
|
200
|
+
<div data-slot="featureValue" :class="ui.featureValue({ class: props.ui?.featureValue })">
|
|
201
201
|
<slot :name="`feature-${formatSlotName(feature)}-value`" :feature="feature" :tier="tier" :section="section">
|
|
202
202
|
<slot name="feature-value" :feature="feature" :tier="tier" :section="section">
|
|
203
203
|
<ReuseFeatureTemplate :tier="tier" :feature="feature" />
|
|
@@ -210,12 +210,12 @@ const [DefineFeatureTemplate, ReuseFeatureTemplate] = createReusableTemplate({
|
|
|
210
210
|
</tbody>
|
|
211
211
|
</table>
|
|
212
212
|
|
|
213
|
-
<ul data-slot="list" :class="ui.list({ class:
|
|
214
|
-
<li v-for="(tier, index) in tiers" :key="index" data-slot="item" :class="ui.item({ class:
|
|
213
|
+
<ul data-slot="list" :class="ui.list({ class: props.ui?.list })">
|
|
214
|
+
<li v-for="(tier, index) in props.tiers" :key="index" data-slot="item" :class="ui.item({ class: props.ui?.item, highlight: tier.highlight })">
|
|
215
215
|
<ReuseTierTemplate :tier="tier" />
|
|
216
216
|
|
|
217
|
-
<div v-for="(section, sectionIndex) in sections" :key="`section-${sectionIndex}`" data-slot="section" :class="ui.section({ class:
|
|
218
|
-
<div v-if="section.title" data-slot="sectionTitle" :class="ui.sectionTitle({ class:
|
|
217
|
+
<div v-for="(section, sectionIndex) in props.sections" :key="`section-${sectionIndex}`" data-slot="section" :class="ui.section({ class: props.ui?.section })">
|
|
218
|
+
<div v-if="section.title" data-slot="sectionTitle" :class="ui.sectionTitle({ class: props.ui?.sectionTitle })">
|
|
219
219
|
<slot :name="`section-${formatSlotName(section)}-title`" :section="section">
|
|
220
220
|
<slot name="section-title" :section="section">
|
|
221
221
|
{{ section.title }}
|
|
@@ -223,8 +223,8 @@ const [DefineFeatureTemplate, ReuseFeatureTemplate] = createReusableTemplate({
|
|
|
223
223
|
</slot>
|
|
224
224
|
</div>
|
|
225
225
|
|
|
226
|
-
<div v-for="(feature, featureIndex) in section.features" :key="`section-${sectionIndex}-feature-${featureIndex}`" data-slot="feature" :class="ui.feature({ class:
|
|
227
|
-
<div data-slot="featureTitle" :class="ui.featureTitle({ class:
|
|
226
|
+
<div v-for="(feature, featureIndex) in section.features" :key="`section-${sectionIndex}-feature-${featureIndex}`" data-slot="feature" :class="ui.feature({ class: props.ui?.feature })">
|
|
227
|
+
<div data-slot="featureTitle" :class="ui.featureTitle({ class: props.ui?.featureTitle })">
|
|
228
228
|
<slot :name="`feature-${formatSlotName(feature)}-title`" :feature="feature" :section="section">
|
|
229
229
|
<slot name="feature-title" :feature="feature" :section="section">
|
|
230
230
|
{{ feature.title }}
|
|
@@ -232,7 +232,7 @@ const [DefineFeatureTemplate, ReuseFeatureTemplate] = createReusableTemplate({
|
|
|
232
232
|
</slot>
|
|
233
233
|
</div>
|
|
234
234
|
|
|
235
|
-
<div data-slot="featureValue" :class="ui.featureValue({ class:
|
|
235
|
+
<div data-slot="featureValue" :class="ui.featureValue({ class: props.ui?.featureValue })">
|
|
236
236
|
<slot :name="`feature-${formatSlotName(feature)}-value`" :feature="feature" :tier="tier" :section="section">
|
|
237
237
|
<slot name="feature-value" :feature="feature" :tier="tier" :section="section">
|
|
238
238
|
<ReuseFeatureTemplate :tier="tier" :feature="feature" />
|
|
@@ -58,8 +58,8 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Progre
|
|
|
58
58
|
"onUpdate:max"?: ((value: number) => any) | undefined;
|
|
59
59
|
}>, {
|
|
60
60
|
orientation: Progress["variants"]["orientation"];
|
|
61
|
-
inverted: boolean;
|
|
62
61
|
modelValue: number | null;
|
|
62
|
+
inverted: boolean;
|
|
63
63
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ProgressSlots>;
|
|
64
64
|
type __VLS_WithSlots<T, S> = T & {
|
|
65
65
|
new (): {
|
|
@@ -4,13 +4,14 @@ import theme from "#build/ui/progress";
|
|
|
4
4
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { computed } from "vue";
|
|
7
|
-
import { Primitive, ProgressRoot, ProgressIndicator
|
|
7
|
+
import { Primitive, ProgressRoot, ProgressIndicator } 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 { useLocale } from "../composables/useLocale";
|
|
12
13
|
import { tv } from "../utils/tv";
|
|
13
|
-
const
|
|
14
|
+
const _props = defineProps({
|
|
14
15
|
as: { type: null, required: false },
|
|
15
16
|
max: { type: [Number, Array], required: false },
|
|
16
17
|
status: { type: Boolean, required: false },
|
|
@@ -27,10 +28,10 @@ const props = defineProps({
|
|
|
27
28
|
});
|
|
28
29
|
const emits = defineEmits(["update:modelValue", "update:max"]);
|
|
29
30
|
const slots = defineSlots();
|
|
31
|
+
const props = useComponentProps("progress", _props);
|
|
30
32
|
const { dir } = useLocale();
|
|
31
33
|
const appConfig = useAppConfig();
|
|
32
|
-
const
|
|
33
|
-
const rootProps = useForwardPropsEmits(reactivePick(props, "getValueLabel", "getValueText", "modelValue"), emits);
|
|
34
|
+
const rootProps = useForwardProps(reactivePick(props, "getValueLabel", "getValueText", "modelValue"), emits);
|
|
34
35
|
const isIndeterminate = computed(() => rootProps.value.modelValue === null);
|
|
35
36
|
const hasSteps = computed(() => Array.isArray(props.max));
|
|
36
37
|
const realMax = computed(() => {
|
|
@@ -111,19 +112,19 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.progress || {
|
|
|
111
112
|
</script>
|
|
112
113
|
|
|
113
114
|
<template>
|
|
114
|
-
<Primitive :as="as" :data-orientation="orientation" data-slot="root" :class="ui.root({ class: [
|
|
115
|
-
<div v-if="!isIndeterminate && (status || !!slots.status)" data-slot="status" :class="ui.status({ class:
|
|
115
|
+
<Primitive :as="props.as" :data-orientation="props.orientation" data-slot="root" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
116
|
+
<div v-if="!isIndeterminate && (props.status || !!slots.status)" data-slot="status" :class="ui.status({ class: props.ui?.status })" :style="statusStyle">
|
|
116
117
|
<slot name="status" :percent="percent">
|
|
117
118
|
{{ percent }}%
|
|
118
119
|
</slot>
|
|
119
120
|
</div>
|
|
120
121
|
|
|
121
|
-
<ProgressRoot v-bind="rootProps" :max="realMax" data-slot="base" :class="ui.base({ class:
|
|
122
|
-
<ProgressIndicator data-slot="indicator" :class="ui.indicator({ class:
|
|
122
|
+
<ProgressRoot v-bind="rootProps" :max="realMax" data-slot="base" :class="ui.base({ class: props.ui?.base })" style="transform: translateZ(0)">
|
|
123
|
+
<ProgressIndicator data-slot="indicator" :class="ui.indicator({ class: props.ui?.indicator })" :style="indicatorStyle" />
|
|
123
124
|
</ProgressRoot>
|
|
124
125
|
|
|
125
|
-
<div v-if="hasSteps" data-slot="steps" :class="ui.steps({ class:
|
|
126
|
-
<div v-for="(step, index) in max" :key="index" data-slot="step" :class="ui.step({ class:
|
|
126
|
+
<div v-if="hasSteps" data-slot="steps" :class="ui.steps({ class: props.ui?.steps })">
|
|
127
|
+
<div v-for="(step, index) in props.max" :key="index" data-slot="step" :class="ui.step({ class: props.ui?.step, step: stepVariant(index) })">
|
|
127
128
|
<slot :name="`step-${index}`" :step="step">
|
|
128
129
|
{{ step }}
|
|
129
130
|
</slot>
|
|
@@ -58,8 +58,8 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Progre
|
|
|
58
58
|
"onUpdate:max"?: ((value: number) => any) | undefined;
|
|
59
59
|
}>, {
|
|
60
60
|
orientation: Progress["variants"]["orientation"];
|
|
61
|
-
inverted: boolean;
|
|
62
61
|
modelValue: number | null;
|
|
62
|
+
inverted: boolean;
|
|
63
63
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ProgressSlots>;
|
|
64
64
|
type __VLS_WithSlots<T, S> = T & {
|
|
65
65
|
new (): {
|
|
@@ -54,6 +54,8 @@ export interface RadioGroupProps<T extends RadioGroupItem[] = RadioGroupItem[],
|
|
|
54
54
|
* @defaultValue 'primary'
|
|
55
55
|
*/
|
|
56
56
|
color?: RadioGroup['variants']['color'];
|
|
57
|
+
/** Highlight the ring color like a focus state. */
|
|
58
|
+
highlight?: boolean;
|
|
57
59
|
/**
|
|
58
60
|
* The orientation the radio buttons are laid out.
|
|
59
61
|
* @defaultValue 'vertical'
|