@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,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
|
+
import { usePrefix } from "../../composables/usePrefix";
|
|
12
13
|
import { tv } from "../../utils/tv";
|
|
13
14
|
import ULink from "../Link.vue";
|
|
14
15
|
import UIcon from "../Icon.vue";
|
|
15
16
|
defineOptions({ inheritAttrs: false });
|
|
16
|
-
const
|
|
17
|
+
const _props = defineProps({
|
|
17
18
|
as: { type: null, required: false },
|
|
18
19
|
prevIcon: { type: null, required: false },
|
|
19
20
|
nextIcon: { type: null, required: false },
|
|
@@ -22,9 +23,10 @@ const props = defineProps({
|
|
|
22
23
|
ui: { type: Object, required: false }
|
|
23
24
|
});
|
|
24
25
|
defineSlots();
|
|
26
|
+
const props = useComponentProps("contentSurround", _props);
|
|
25
27
|
const { dir } = useLocale();
|
|
26
28
|
const appConfig = useAppConfig();
|
|
27
|
-
const
|
|
29
|
+
const prefix = usePrefix();
|
|
28
30
|
const [DefineLinkTemplate, ReuseLinkTemplate] = createReusableTemplate({
|
|
29
31
|
props: {
|
|
30
32
|
link: Object,
|
|
@@ -39,32 +41,32 @@ const nextIcon = computed(() => props.nextIcon || (dir.value === "rtl" ? appConf
|
|
|
39
41
|
|
|
40
42
|
<template>
|
|
41
43
|
<DefineLinkTemplate v-slot="{ link, icon, direction }">
|
|
42
|
-
<ULink v-if="link" :to="link.path" raw data-slot="link" :class="ui.link({ class: [
|
|
44
|
+
<ULink v-if="link" :to="link.path" raw data-slot="link" :class="ui.link({ class: [props.ui?.link, link.ui?.link, link.class], direction })">
|
|
43
45
|
<slot name="link" :link="link" :ui="ui">
|
|
44
|
-
<div data-slot="linkLeading" :class="ui.linkLeading({ class: [
|
|
46
|
+
<div data-slot="linkLeading" :class="ui.linkLeading({ class: [props.ui?.linkLeading, link.ui?.linkLeading] })">
|
|
45
47
|
<slot name="link-leading" :link="link" :ui="ui">
|
|
46
|
-
<UIcon :name="link.icon || icon" data-slot="linkLeadingIcon" :class="ui.linkLeadingIcon({ class: [
|
|
48
|
+
<UIcon :name="link.icon || icon" data-slot="linkLeadingIcon" :class="ui.linkLeadingIcon({ class: [props.ui?.linkLeadingIcon, link.ui?.linkLeadingIcon], direction })" />
|
|
47
49
|
</slot>
|
|
48
50
|
</div>
|
|
49
51
|
|
|
50
|
-
<p data-slot="linkTitle" :class="ui.linkTitle({ class: [
|
|
52
|
+
<p data-slot="linkTitle" :class="ui.linkTitle({ class: [props.ui?.linkTitle, link.ui?.linkTitle] })">
|
|
51
53
|
<slot name="link-title" :link="link" :ui="ui">
|
|
52
54
|
{{ link.title }}
|
|
53
55
|
</slot>
|
|
54
56
|
</p>
|
|
55
57
|
|
|
56
|
-
<p data-slot="linkDescription" :class="ui.linkDescription({ class: [
|
|
58
|
+
<p data-slot="linkDescription" :class="ui.linkDescription({ class: [props.ui?.linkDescription, link.ui?.linkDescription] })">
|
|
57
59
|
<slot name="link-description" :link="link" :ui="ui">
|
|
58
60
|
{{ link.description }}
|
|
59
61
|
</slot>
|
|
60
62
|
</p>
|
|
61
63
|
</slot>
|
|
62
64
|
</ULink>
|
|
63
|
-
<span v-else class="hidden sm:block"> </span>
|
|
65
|
+
<span v-else :class="prefix('hidden sm:block')"> </span>
|
|
64
66
|
</DefineLinkTemplate>
|
|
65
67
|
|
|
66
|
-
<Primitive v-if="surround" :as="as" v-bind="$attrs" data-slot="root" :class="ui.root({ class: [
|
|
67
|
-
<ReuseLinkTemplate :link="surround[0]" :icon="prevIcon" direction="left" />
|
|
68
|
-
<ReuseLinkTemplate :link="surround[1]" :icon="nextIcon" direction="right" />
|
|
68
|
+
<Primitive v-if="props.surround" :as="props.as" v-bind="$attrs" data-slot="root" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
69
|
+
<ReuseLinkTemplate :link="props.surround[0]" :icon="prevIcon" direction="left" />
|
|
70
|
+
<ReuseLinkTemplate :link="props.surround[1]" :icon="nextIcon" direction="right" />
|
|
69
71
|
</Primitive>
|
|
70
72
|
</template>
|
|
@@ -4,17 +4,18 @@ import theme from "#build/ui/content/content-toc";
|
|
|
4
4
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { computed, onUnmounted } from "vue";
|
|
7
|
-
import { CollapsibleRoot, CollapsibleTrigger, CollapsibleContent
|
|
7
|
+
import { CollapsibleRoot, CollapsibleTrigger, CollapsibleContent } from "reka-ui";
|
|
8
8
|
import { reactivePick, createReusableTemplate } from "@vueuse/core";
|
|
9
9
|
import { useRouter, useAppConfig, useNuxtApp } from "#imports";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { useComponentProps } from "../../composables/useComponentProps";
|
|
11
|
+
import { useForwardProps } from "../../composables/useForwardProps";
|
|
12
12
|
import { useScrollspy } from "../../composables/useScrollspy";
|
|
13
13
|
import { useLocale } from "../../composables/useLocale";
|
|
14
|
+
import { usePrefix } from "../../composables/usePrefix";
|
|
14
15
|
import { tv } from "../../utils/tv";
|
|
15
16
|
import UIcon from "../Icon.vue";
|
|
16
17
|
defineOptions({ inheritAttrs: false });
|
|
17
|
-
const
|
|
18
|
+
const _props = defineProps({
|
|
18
19
|
as: { type: null, required: false, default: "nav" },
|
|
19
20
|
trailingIcon: { type: null, required: false },
|
|
20
21
|
title: { type: String, required: false },
|
|
@@ -30,13 +31,13 @@ const props = defineProps({
|
|
|
30
31
|
});
|
|
31
32
|
const emits = defineEmits(["update:open", "move"]);
|
|
32
33
|
const slots = defineSlots();
|
|
33
|
-
const
|
|
34
|
+
const props = useComponentProps("contentToc", _props);
|
|
35
|
+
const rootProps = useForwardProps(reactivePick(props, "as", "open", "defaultOpen"), emits);
|
|
34
36
|
const { t } = useLocale();
|
|
35
37
|
const router = useRouter();
|
|
36
38
|
const appConfig = useAppConfig();
|
|
37
|
-
const uiProp = useComponentUI("contentToc", props);
|
|
38
|
-
const { highlightVariant } = useResolvedVariants("contentToc", props, theme, ["highlightVariant"]);
|
|
39
39
|
const { activeHeadings, updateHeadings } = useScrollspy();
|
|
40
|
+
const prefix = usePrefix();
|
|
40
41
|
const [DefineListTemplate, ReuseListTemplate] = createReusableTemplate({
|
|
41
42
|
props: {
|
|
42
43
|
links: Array,
|
|
@@ -48,7 +49,7 @@ const [DefineContentTemplate, ReuseContentTemplate] = createReusableTemplate();
|
|
|
48
49
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.contentToc || {} })({
|
|
49
50
|
color: props.color,
|
|
50
51
|
highlight: props.highlight,
|
|
51
|
-
highlightVariant: highlightVariant
|
|
52
|
+
highlightVariant: props.highlightVariant,
|
|
52
53
|
highlightColor: props.highlightColor || props.color
|
|
53
54
|
}));
|
|
54
55
|
function scrollToHeading(id) {
|
|
@@ -78,7 +79,7 @@ const indicatorStyle = computed(() => {
|
|
|
78
79
|
};
|
|
79
80
|
});
|
|
80
81
|
const circuitMaskStyle = computed(() => {
|
|
81
|
-
if (!props.highlight || highlightVariant
|
|
82
|
+
if (!props.highlight || props.highlightVariant !== "circuit" || !props.links?.length) {
|
|
82
83
|
return;
|
|
83
84
|
}
|
|
84
85
|
const flatLinks = flattenLinksWithLevel(props.links);
|
|
@@ -133,11 +134,11 @@ onUnmounted(() => {
|
|
|
133
134
|
<template>
|
|
134
135
|
<!-- eslint-disable-next-line vue/no-template-shadow -->
|
|
135
136
|
<DefineListTemplate v-slot="{ links, level }">
|
|
136
|
-
<ul :class="level > 0 ? ui.listWithChildren({ class:
|
|
137
|
-
<li v-for="(link, index) in links" :key="index" :class="link.children && link.children.length > 0 ? ui.itemWithChildren({ class: [
|
|
138
|
-
<a :href="`#${link.id}`" data-slot="link" :class="ui.link({ class: [
|
|
137
|
+
<ul :class="level > 0 ? ui.listWithChildren({ class: props.ui?.listWithChildren }) : ui.list({ class: props.ui?.list })">
|
|
138
|
+
<li v-for="(link, index) in links" :key="index" :class="link.children && link.children.length > 0 ? ui.itemWithChildren({ class: [props.ui?.itemWithChildren, link.ui?.itemWithChildren] }) : ui.item({ class: [props.ui?.item, link.ui?.item] })">
|
|
139
|
+
<a :href="`#${link.id}`" data-slot="link" :class="ui.link({ class: [props.ui?.link, link.ui?.link, link.class], active: activeHeadings.includes(link.id) })" @click.prevent="scrollToHeading(link.id)">
|
|
139
140
|
<slot name="link" :link="link">
|
|
140
|
-
<span data-slot="linkText" :class="ui.linkText({ class: [
|
|
141
|
+
<span data-slot="linkText" :class="ui.linkText({ class: [props.ui?.linkText, link.ui?.linkText] })">
|
|
141
142
|
{{ link.text }}
|
|
142
143
|
</span>
|
|
143
144
|
</slot>
|
|
@@ -151,54 +152,54 @@ onUnmounted(() => {
|
|
|
151
152
|
<DefineTriggerTemplate v-slot="{ open }">
|
|
152
153
|
<slot name="leading" :open="open" :ui="ui" />
|
|
153
154
|
|
|
154
|
-
<span data-slot="title" :class="ui.title({ class:
|
|
155
|
-
<slot :open="open">{{ title || t("contentToc.title") }}</slot>
|
|
155
|
+
<span data-slot="title" :class="ui.title({ class: props.ui?.title })">
|
|
156
|
+
<slot :open="open">{{ props.title || t("contentToc.title") }}</slot>
|
|
156
157
|
</span>
|
|
157
158
|
|
|
158
|
-
<span data-slot="trailing" :class="ui.trailing({ class:
|
|
159
|
+
<span data-slot="trailing" :class="ui.trailing({ class: props.ui?.trailing })">
|
|
159
160
|
<slot name="trailing" :open="open" :ui="ui">
|
|
160
|
-
<UIcon :name="trailingIcon || appConfig.ui.icons.chevronDown" data-slot="trailingIcon" :class="ui.trailingIcon({ class:
|
|
161
|
+
<UIcon :name="props.trailingIcon || appConfig.ui.icons.chevronDown" data-slot="trailingIcon" :class="ui.trailingIcon({ class: props.ui?.trailingIcon })" />
|
|
161
162
|
</slot>
|
|
162
163
|
</span>
|
|
163
164
|
</DefineTriggerTemplate>
|
|
164
165
|
|
|
165
166
|
<DefineContentTemplate>
|
|
166
|
-
<div v-if="highlight" data-slot="indicator" :class="ui.indicator({ class:
|
|
167
|
-
<div data-slot="indicatorLine" :class="ui.indicatorLine({ class:
|
|
168
|
-
<div v-if="indicatorStyle" data-slot="indicatorActive" :class="ui.indicatorActive({ class:
|
|
167
|
+
<div v-if="props.highlight" data-slot="indicator" :class="ui.indicator({ class: props.ui?.indicator })" :style="{ ...indicatorStyle, ...circuitMaskStyle || {} }">
|
|
168
|
+
<div data-slot="indicatorLine" :class="ui.indicatorLine({ class: props.ui?.indicatorLine })" />
|
|
169
|
+
<div v-if="indicatorStyle" data-slot="indicatorActive" :class="ui.indicatorActive({ class: props.ui?.indicatorActive })" />
|
|
169
170
|
</div>
|
|
170
171
|
|
|
171
|
-
<slot name="content" :links="links">
|
|
172
|
-
<ReuseListTemplate :links="links" :level="0" />
|
|
172
|
+
<slot name="content" :links="props.links">
|
|
173
|
+
<ReuseListTemplate :links="props.links" :level="0" />
|
|
173
174
|
</slot>
|
|
174
175
|
</DefineContentTemplate>
|
|
175
176
|
|
|
176
|
-
<CollapsibleRoot v-slot="{ open }" v-bind="{ ...rootProps, ...$attrs }" :default-open="defaultOpen" data-slot="root" :class="ui.root({ class: [
|
|
177
|
-
<div data-slot="container" :class="ui.container({ class:
|
|
178
|
-
<div v-if="!!slots.top" data-slot="top" :class="ui.top({ class:
|
|
179
|
-
<slot name="top" :links="links" />
|
|
177
|
+
<CollapsibleRoot v-slot="{ open }" v-bind="{ ...rootProps, ...$attrs }" :default-open="props.defaultOpen" data-slot="root" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
178
|
+
<div data-slot="container" :class="ui.container({ class: props.ui?.container })">
|
|
179
|
+
<div v-if="!!slots.top" data-slot="top" :class="ui.top({ class: props.ui?.top })">
|
|
180
|
+
<slot name="top" :links="props.links" />
|
|
180
181
|
</div>
|
|
181
182
|
|
|
182
|
-
<template v-if="links?.length">
|
|
183
|
-
<CollapsibleTrigger data-slot="trigger" :class="ui.trigger({ class: 'lg:hidden' })">
|
|
183
|
+
<template v-if="props.links?.length">
|
|
184
|
+
<CollapsibleTrigger data-slot="trigger" :class="ui.trigger({ class: [props.ui?.trigger, prefix('lg:hidden')] })">
|
|
184
185
|
<ReuseTriggerTemplate :open="open" />
|
|
185
186
|
</CollapsibleTrigger>
|
|
186
187
|
|
|
187
|
-
<CollapsibleContent data-slot="content" :class="ui.content({ class: [
|
|
188
|
+
<CollapsibleContent data-slot="content" :class="ui.content({ class: [props.ui?.content, prefix('lg:hidden')] })">
|
|
188
189
|
<ReuseContentTemplate />
|
|
189
190
|
</CollapsibleContent>
|
|
190
191
|
|
|
191
|
-
<p data-slot="trigger" :class="ui.trigger({ class: 'hidden lg:flex' })">
|
|
192
|
+
<p data-slot="trigger" :class="ui.trigger({ class: [props.ui?.trigger, prefix('hidden lg:flex')] })">
|
|
192
193
|
<ReuseTriggerTemplate :open="open" />
|
|
193
194
|
</p>
|
|
194
195
|
|
|
195
|
-
<div data-slot="content" :class="ui.content({ class: [
|
|
196
|
+
<div data-slot="content" :class="ui.content({ class: [props.ui?.content, prefix('hidden lg:flex')] })">
|
|
196
197
|
<ReuseContentTemplate />
|
|
197
198
|
</div>
|
|
198
199
|
</template>
|
|
199
200
|
|
|
200
|
-
<div v-if="!!slots.bottom" data-slot="bottom" :class="ui.bottom({ class:
|
|
201
|
-
<slot name="bottom" :links="links" />
|
|
201
|
+
<div v-if="!!slots.bottom" data-slot="bottom" :class="ui.bottom({ class: props.ui?.bottom, body: !!slots.top || !!props.links?.length })">
|
|
202
|
+
<slot name="bottom" :links="props.links" />
|
|
202
203
|
</div>
|
|
203
204
|
</div>
|
|
204
205
|
</CollapsibleRoot>
|
|
@@ -5,23 +5,23 @@ import theme from "#build/ui/prose/a";
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { computed } from "vue";
|
|
7
7
|
import { useAppConfig } from "#imports";
|
|
8
|
-
import {
|
|
8
|
+
import { useComponentProps } from "../../composables/useComponentProps";
|
|
9
9
|
import { tv } from "../../utils/tv";
|
|
10
10
|
import ULink from "../Link.vue";
|
|
11
|
-
const
|
|
11
|
+
const _props = defineProps({
|
|
12
12
|
href: { type: String, required: false },
|
|
13
13
|
target: { type: null, required: false },
|
|
14
14
|
class: { type: null, required: false },
|
|
15
15
|
ui: { type: Object, required: false }
|
|
16
16
|
});
|
|
17
17
|
defineSlots();
|
|
18
|
+
const props = useComponentProps("prose.a", _props);
|
|
18
19
|
const appConfig = useAppConfig();
|
|
19
|
-
const uiProp = useComponentUI("prose.a", props);
|
|
20
20
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.prose?.a || {} }));
|
|
21
21
|
</script>
|
|
22
22
|
|
|
23
23
|
<template>
|
|
24
|
-
<ULink :href="href" :target="target" :class="ui({ class: [
|
|
24
|
+
<ULink :href="props.href" :target="props.target" :class="ui({ class: [props.ui?.base, props.class] })" raw>
|
|
25
25
|
<slot />
|
|
26
26
|
</ULink>
|
|
27
27
|
</template>
|
|
@@ -5,18 +5,18 @@ import theme from "#build/ui/prose/accordion";
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { computed, ref, onBeforeUpdate } from "vue";
|
|
7
7
|
import { useAppConfig } from "#imports";
|
|
8
|
-
import {
|
|
8
|
+
import { useComponentProps } from "../../composables/useComponentProps";
|
|
9
9
|
import { transformUI } from "../../utils";
|
|
10
10
|
import { tv } from "../../utils/tv";
|
|
11
11
|
import UAccordion from "../Accordion.vue";
|
|
12
|
-
const
|
|
12
|
+
const _props = defineProps({
|
|
13
13
|
type: { type: String, required: false, default: "multiple" },
|
|
14
14
|
class: { type: null, required: false },
|
|
15
15
|
ui: { type: Object, required: false }
|
|
16
16
|
});
|
|
17
17
|
const slots = defineSlots();
|
|
18
|
+
const props = useComponentProps("prose.accordion", _props);
|
|
18
19
|
const appConfig = useAppConfig();
|
|
19
|
-
const uiProp = useComponentUI("prose.accordion", props);
|
|
20
20
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.prose?.accordion || {} }));
|
|
21
21
|
const rerenderCount = ref(1);
|
|
22
22
|
const items = computed(() => {
|
|
@@ -39,7 +39,7 @@ onBeforeUpdate(() => rerenderCount.value++);
|
|
|
39
39
|
</script>
|
|
40
40
|
|
|
41
41
|
<template>
|
|
42
|
-
<UAccordion :type="type" :items="items" :unmount-on-hide="false" :class="props.class" :ui="transformUI(ui(),
|
|
42
|
+
<UAccordion :type="props.type" :items="items" :unmount-on-hide="false" :class="props.class" :ui="transformUI(ui(), props.ui)">
|
|
43
43
|
<template #content="{ item }">
|
|
44
44
|
<component :is="item.component" />
|
|
45
45
|
</template>
|
|
@@ -5,24 +5,24 @@ import theme from "#build/ui/prose/accordion-item";
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { computed } from "vue";
|
|
7
7
|
import { useAppConfig } from "#imports";
|
|
8
|
-
import {
|
|
8
|
+
import { useComponentProps } from "../../composables/useComponentProps";
|
|
9
9
|
import { tv } from "../../utils/tv";
|
|
10
|
-
const
|
|
10
|
+
const _props = defineProps({
|
|
11
11
|
label: { type: String, required: true },
|
|
12
12
|
description: { type: String, required: false },
|
|
13
13
|
class: { type: null, required: false },
|
|
14
14
|
ui: { type: Object, required: false }
|
|
15
15
|
});
|
|
16
16
|
defineSlots();
|
|
17
|
+
const props = useComponentProps("prose.accordionItem", _props);
|
|
17
18
|
const appConfig = useAppConfig();
|
|
18
|
-
const uiProp = useComponentUI("prose.accordionItem", props);
|
|
19
19
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.prose?.accordionItem || {} }));
|
|
20
20
|
</script>
|
|
21
21
|
|
|
22
22
|
<template>
|
|
23
|
-
<div :class="ui({ class: [
|
|
23
|
+
<div :class="ui({ class: [props.ui?.base, props.class] })">
|
|
24
24
|
<slot>
|
|
25
|
-
{{ description }}
|
|
25
|
+
{{ props.description }}
|
|
26
26
|
</slot>
|
|
27
27
|
</div>
|
|
28
28
|
</template>
|
|
@@ -5,21 +5,21 @@ import theme from "#build/ui/prose/badge";
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { computed } from "vue";
|
|
7
7
|
import { useAppConfig } from "#imports";
|
|
8
|
-
import {
|
|
8
|
+
import { useComponentProps } from "../../composables/useComponentProps";
|
|
9
9
|
import { tv } from "../../utils/tv";
|
|
10
10
|
import UBadge from "../Badge.vue";
|
|
11
|
-
const
|
|
11
|
+
const _props = defineProps({
|
|
12
12
|
class: { type: null, required: false },
|
|
13
13
|
ui: { type: Object, required: false }
|
|
14
14
|
});
|
|
15
15
|
defineSlots();
|
|
16
|
+
const props = useComponentProps("prose.badge", _props);
|
|
16
17
|
const appConfig = useAppConfig();
|
|
17
|
-
const uiProp = useComponentUI("prose.badge", props);
|
|
18
18
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.prose?.badge || {} }));
|
|
19
19
|
</script>
|
|
20
20
|
|
|
21
21
|
<template>
|
|
22
|
-
<UBadge color="primary" variant="subtle" :class="ui({ class: [
|
|
22
|
+
<UBadge color="primary" variant="subtle" :class="ui({ class: [props.ui?.base, props.class] })">
|
|
23
23
|
<slot mdc-unwrap="p" />
|
|
24
24
|
</UBadge>
|
|
25
25
|
</template>
|
|
@@ -5,20 +5,20 @@ import theme from "#build/ui/prose/blockquote";
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { computed } from "vue";
|
|
7
7
|
import { useAppConfig } from "#imports";
|
|
8
|
-
import {
|
|
8
|
+
import { useComponentProps } from "../../composables/useComponentProps";
|
|
9
9
|
import { tv } from "../../utils/tv";
|
|
10
|
-
const
|
|
10
|
+
const _props = defineProps({
|
|
11
11
|
class: { type: null, required: false },
|
|
12
12
|
ui: { type: Object, required: false }
|
|
13
13
|
});
|
|
14
14
|
defineSlots();
|
|
15
|
+
const props = useComponentProps("prose.blockquote", _props);
|
|
15
16
|
const appConfig = useAppConfig();
|
|
16
|
-
const uiProp = useComponentUI("prose.blockquote", props);
|
|
17
17
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.prose?.blockquote || {} }));
|
|
18
18
|
</script>
|
|
19
19
|
|
|
20
20
|
<template>
|
|
21
|
-
<blockquote :class="ui({ class: [
|
|
21
|
+
<blockquote :class="ui({ class: [props.ui?.base, props.class] })">
|
|
22
22
|
<slot />
|
|
23
23
|
</blockquote>
|
|
24
24
|
</template>
|
|
@@ -5,12 +5,12 @@ import theme from "#build/ui/prose/callout";
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { computed } from "vue";
|
|
7
7
|
import { useAppConfig } from "#imports";
|
|
8
|
-
import {
|
|
8
|
+
import { useComponentProps } from "../../composables/useComponentProps";
|
|
9
9
|
import { tv } from "../../utils/tv";
|
|
10
10
|
import ULink from "../Link.vue";
|
|
11
11
|
import UIcon from "../Icon.vue";
|
|
12
12
|
defineOptions({ inheritAttrs: false });
|
|
13
|
-
const
|
|
13
|
+
const _props = defineProps({
|
|
14
14
|
to: { type: null, required: false },
|
|
15
15
|
target: { type: [String, Object, null], required: false },
|
|
16
16
|
icon: { type: null, required: false },
|
|
@@ -19,8 +19,8 @@ const props = defineProps({
|
|
|
19
19
|
ui: { type: Object, required: false }
|
|
20
20
|
});
|
|
21
21
|
defineSlots();
|
|
22
|
+
const props = useComponentProps("prose.callout", _props);
|
|
22
23
|
const appConfig = useAppConfig();
|
|
23
|
-
const uiProp = useComponentUI("prose.callout", props);
|
|
24
24
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.prose?.callout || {} })({
|
|
25
25
|
color: props.color,
|
|
26
26
|
to: !!props.to
|
|
@@ -29,18 +29,18 @@ const target = computed(() => props.target || (!!props.to && typeof props.to ===
|
|
|
29
29
|
</script>
|
|
30
30
|
|
|
31
31
|
<template>
|
|
32
|
-
<div :class="ui.base({ class: [
|
|
32
|
+
<div :class="ui.base({ class: [props.ui?.base, props.class] })">
|
|
33
33
|
<ULink
|
|
34
|
-
v-if="to"
|
|
35
|
-
v-bind="{ to, target, ...$attrs }"
|
|
34
|
+
v-if="props.to"
|
|
35
|
+
v-bind="{ to: props.to, target, ...$attrs }"
|
|
36
36
|
class="focus:outline-none"
|
|
37
37
|
raw
|
|
38
38
|
>
|
|
39
39
|
<span class="absolute inset-0" aria-hidden="true" />
|
|
40
40
|
</ULink>
|
|
41
41
|
|
|
42
|
-
<UIcon v-if="icon" :name="icon" :class="ui.icon({ class:
|
|
43
|
-
<UIcon v-if="!!to && target === '_blank'" :name="appConfig.ui.icons.external" :class="ui.externalIcon({ class:
|
|
42
|
+
<UIcon v-if="props.icon" :name="props.icon" :class="ui.icon({ class: props.ui?.icon })" />
|
|
43
|
+
<UIcon v-if="!!props.to && target === '_blank'" :name="appConfig.ui.icons.external" :class="ui.externalIcon({ class: props.ui?.externalIcon })" />
|
|
44
44
|
|
|
45
45
|
<slot mdc-unwrap="p" />
|
|
46
46
|
</div>
|
|
@@ -5,12 +5,12 @@ import theme from "#build/ui/prose/card";
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { computed } from "vue";
|
|
7
7
|
import { useAppConfig } from "#imports";
|
|
8
|
-
import {
|
|
8
|
+
import { useComponentProps } from "../../composables/useComponentProps";
|
|
9
9
|
import { tv } from "../../utils/tv";
|
|
10
10
|
import ULink from "../Link.vue";
|
|
11
11
|
import UIcon from "../Icon.vue";
|
|
12
12
|
defineOptions({ inheritAttrs: false });
|
|
13
|
-
const
|
|
13
|
+
const _props = defineProps({
|
|
14
14
|
to: { type: null, required: false },
|
|
15
15
|
target: { type: [String, Object, null], required: false },
|
|
16
16
|
icon: { type: null, required: false },
|
|
@@ -21,8 +21,8 @@ const props = defineProps({
|
|
|
21
21
|
ui: { type: Object, required: false }
|
|
22
22
|
});
|
|
23
23
|
const slots = defineSlots();
|
|
24
|
+
const props = useComponentProps("prose.card", _props);
|
|
24
25
|
const appConfig = useAppConfig();
|
|
25
|
-
const uiProp = useComponentUI("prose.card", props);
|
|
26
26
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.prose?.card || {} })({
|
|
27
27
|
color: props.color,
|
|
28
28
|
to: !!props.to,
|
|
@@ -33,29 +33,29 @@ const ariaLabel = computed(() => (props.title || "Card link").trim());
|
|
|
33
33
|
</script>
|
|
34
34
|
|
|
35
35
|
<template>
|
|
36
|
-
<div :class="ui.base({ class: [
|
|
36
|
+
<div :class="ui.base({ class: [props.ui?.base, props.class] })">
|
|
37
37
|
<ULink
|
|
38
|
-
v-if="to"
|
|
38
|
+
v-if="props.to"
|
|
39
39
|
:aria-label="ariaLabel"
|
|
40
|
-
v-bind="{ to, target, ...$attrs }"
|
|
40
|
+
v-bind="{ to: props.to, target, ...$attrs }"
|
|
41
41
|
class="focus:outline-none"
|
|
42
42
|
raw
|
|
43
43
|
>
|
|
44
44
|
<span class="absolute inset-0" aria-hidden="true" />
|
|
45
45
|
</ULink>
|
|
46
46
|
|
|
47
|
-
<UIcon v-if="icon" :name="icon" :class="ui.icon({ class:
|
|
48
|
-
<UIcon v-if="!!to && target === '_blank'" :name="appConfig.ui.icons.external" :class="ui.externalIcon({ class:
|
|
47
|
+
<UIcon v-if="props.icon" :name="props.icon" :class="ui.icon({ class: props.ui?.icon })" />
|
|
48
|
+
<UIcon v-if="!!props.to && target === '_blank'" :name="appConfig.ui.icons.external" :class="ui.externalIcon({ class: props.ui?.externalIcon })" />
|
|
49
49
|
|
|
50
|
-
<p v-if="title || !!slots.title" :class="ui.title({ class:
|
|
50
|
+
<p v-if="props.title || !!slots.title" :class="ui.title({ class: props.ui?.title })">
|
|
51
51
|
<slot name="title" mdc-unwrap="p">
|
|
52
|
-
{{ title }}
|
|
52
|
+
{{ props.title }}
|
|
53
53
|
</slot>
|
|
54
54
|
</p>
|
|
55
55
|
|
|
56
|
-
<div v-if="!!slots.default" :class="ui.description({ class:
|
|
56
|
+
<div v-if="!!slots.default" :class="ui.description({ class: props.ui?.description })">
|
|
57
57
|
<slot>
|
|
58
|
-
{{ description }}
|
|
58
|
+
{{ props.description }}
|
|
59
59
|
</slot>
|
|
60
60
|
</div>
|
|
61
61
|
</div>
|
|
@@ -5,20 +5,20 @@ import theme from "#build/ui/prose/card-group";
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { computed } from "vue";
|
|
7
7
|
import { useAppConfig } from "#imports";
|
|
8
|
-
import {
|
|
8
|
+
import { useComponentProps } from "../../composables/useComponentProps";
|
|
9
9
|
import { tv } from "../../utils/tv";
|
|
10
|
-
const
|
|
10
|
+
const _props = defineProps({
|
|
11
11
|
class: { type: null, required: false },
|
|
12
12
|
ui: { type: Object, required: false }
|
|
13
13
|
});
|
|
14
14
|
defineSlots();
|
|
15
|
+
const props = useComponentProps("prose.cardGroup", _props);
|
|
15
16
|
const appConfig = useAppConfig();
|
|
16
|
-
const uiProp = useComponentUI("prose.cardGroup", props);
|
|
17
17
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.prose?.cardGroup || {} }));
|
|
18
18
|
</script>
|
|
19
19
|
|
|
20
20
|
<template>
|
|
21
|
-
<div :class="ui({ class: [
|
|
21
|
+
<div :class="ui({ class: [props.ui?.base, props.class] })">
|
|
22
22
|
<slot />
|
|
23
23
|
</div>
|
|
24
24
|
</template>
|
|
@@ -5,22 +5,22 @@ import theme from "#build/ui/prose/code";
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { computed } from "vue";
|
|
7
7
|
import { useAppConfig } from "#imports";
|
|
8
|
-
import {
|
|
8
|
+
import { useComponentProps } from "../../composables/useComponentProps";
|
|
9
9
|
import { tv } from "../../utils/tv";
|
|
10
|
-
const
|
|
10
|
+
const _props = defineProps({
|
|
11
11
|
lang: { type: String, required: false },
|
|
12
12
|
color: { type: null, required: false },
|
|
13
13
|
class: { type: null, required: false },
|
|
14
14
|
ui: { type: Object, required: false }
|
|
15
15
|
});
|
|
16
16
|
defineSlots();
|
|
17
|
+
const props = useComponentProps("prose.code", _props);
|
|
17
18
|
const appConfig = useAppConfig();
|
|
18
|
-
const uiProp = useComponentUI("prose.code", props);
|
|
19
19
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.prose?.code || {} }));
|
|
20
20
|
</script>
|
|
21
21
|
|
|
22
22
|
<template>
|
|
23
|
-
<code :class="ui({ class: [
|
|
23
|
+
<code :class="ui({ class: [props.ui?.base, (props.class || '').split(',').join(' ')], color: props.color })">
|
|
24
24
|
<slot />
|
|
25
25
|
</code>
|
|
26
26
|
</template>
|
|
@@ -5,11 +5,11 @@ import theme from "#build/ui/prose/code-collapse";
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { computed } from "vue";
|
|
7
7
|
import { useAppConfig } from "#imports";
|
|
8
|
-
import {
|
|
8
|
+
import { useComponentProps } from "../../composables/useComponentProps";
|
|
9
9
|
import { useLocale } from "../../composables/useLocale";
|
|
10
10
|
import { tv } from "../../utils/tv";
|
|
11
11
|
import UButton from "../Button.vue";
|
|
12
|
-
const
|
|
12
|
+
const _props = defineProps({
|
|
13
13
|
icon: { type: null, required: false },
|
|
14
14
|
name: { type: String, required: false },
|
|
15
15
|
openText: { type: String, required: false },
|
|
@@ -18,28 +18,28 @@ const props = defineProps({
|
|
|
18
18
|
ui: { type: Object, required: false }
|
|
19
19
|
});
|
|
20
20
|
defineSlots();
|
|
21
|
+
const props = useComponentProps("prose.codeCollapse", _props);
|
|
21
22
|
const open = defineModel("open", { type: Boolean, ...{ default: false } });
|
|
22
23
|
const { t } = useLocale();
|
|
23
24
|
const appConfig = useAppConfig();
|
|
24
|
-
const uiProp = useComponentUI("prose.codeCollapse", props);
|
|
25
25
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.prose?.codeCollapse || {} })({
|
|
26
26
|
open: open.value
|
|
27
27
|
}));
|
|
28
28
|
</script>
|
|
29
29
|
|
|
30
30
|
<template>
|
|
31
|
-
<div :class="ui.root({ class: [
|
|
31
|
+
<div :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
32
32
|
<slot />
|
|
33
33
|
|
|
34
|
-
<div :class="ui.footer({ class:
|
|
34
|
+
<div :class="ui.footer({ class: props.ui?.footer })">
|
|
35
35
|
<UButton
|
|
36
|
-
:icon="icon || appConfig.ui.icons.chevronDown"
|
|
36
|
+
:icon="props.icon || appConfig.ui.icons.chevronDown"
|
|
37
37
|
color="neutral"
|
|
38
38
|
variant="outline"
|
|
39
39
|
:data-state="open ? 'open' : 'closed'"
|
|
40
40
|
:label="`${open ? props.closeText || t('prose.codeCollapse.closeText') : props.openText || t('prose.codeCollapse.openText')} ${props.name || t('prose.codeCollapse.name')}`"
|
|
41
|
-
:class="ui.trigger({ class:
|
|
42
|
-
:ui="{ leadingIcon: ui.triggerIcon({ class:
|
|
41
|
+
:class="ui.trigger({ class: props.ui?.trigger })"
|
|
42
|
+
:ui="{ leadingIcon: ui.triggerIcon({ class: props.ui?.triggerIcon }) }"
|
|
43
43
|
@click="open = !open"
|
|
44
44
|
/>
|
|
45
45
|
</div>
|
|
@@ -6,19 +6,19 @@ import theme from "#build/ui/prose/code-group";
|
|
|
6
6
|
import { computed, watch, onMounted, ref, onBeforeUpdate } from "vue";
|
|
7
7
|
import { TabsRoot, TabsList, TabsIndicator, TabsTrigger, TabsContent } from "reka-ui";
|
|
8
8
|
import { useState, useAppConfig } from "#imports";
|
|
9
|
-
import {
|
|
9
|
+
import { useComponentProps } from "../../composables/useComponentProps";
|
|
10
10
|
import { tv } from "../../utils/tv";
|
|
11
11
|
import UCodeIcon from "./CodeIcon.vue";
|
|
12
|
-
const
|
|
12
|
+
const _props = defineProps({
|
|
13
13
|
defaultValue: { type: String, required: false, default: "0" },
|
|
14
14
|
sync: { type: String, required: false },
|
|
15
15
|
class: { type: null, required: false },
|
|
16
16
|
ui: { type: Object, required: false }
|
|
17
17
|
});
|
|
18
18
|
const slots = defineSlots();
|
|
19
|
+
const props = useComponentProps("prose.codeGroup", _props);
|
|
19
20
|
const model = defineModel({ type: String });
|
|
20
21
|
const appConfig = useAppConfig();
|
|
21
|
-
const uiProp = useComponentUI("prose.codeGroup", props);
|
|
22
22
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.prose?.codeGroup || {} })());
|
|
23
23
|
const rerenderCount = ref(1);
|
|
24
24
|
const items = computed(() => {
|
|
@@ -54,14 +54,14 @@ onBeforeUpdate(() => rerenderCount.value++);
|
|
|
54
54
|
</script>
|
|
55
55
|
|
|
56
56
|
<template>
|
|
57
|
-
<TabsRoot v-model="model" :default-value="defaultValue" :unmount-on-hide="false" :class="ui.root({ class: [
|
|
58
|
-
<TabsList :class="ui.list({ class:
|
|
59
|
-
<TabsIndicator :class="ui.indicator({ class:
|
|
57
|
+
<TabsRoot v-model="model" :default-value="props.defaultValue" :unmount-on-hide="false" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
58
|
+
<TabsList :class="ui.list({ class: props.ui?.list })">
|
|
59
|
+
<TabsIndicator :class="ui.indicator({ class: props.ui?.indicator })" />
|
|
60
60
|
|
|
61
|
-
<TabsTrigger v-for="(item, index) of items" :key="index" :value="String(index)" :class="ui.trigger({ class:
|
|
62
|
-
<UCodeIcon :icon="item.icon" :filename="item.label" :class="ui.triggerIcon({ class:
|
|
61
|
+
<TabsTrigger v-for="(item, index) of items" :key="index" :value="String(index)" :class="ui.trigger({ class: props.ui?.trigger })">
|
|
62
|
+
<UCodeIcon :icon="item.icon" :filename="item.label" :class="ui.triggerIcon({ class: props.ui?.triggerIcon })" />
|
|
63
63
|
|
|
64
|
-
<span :class="ui.triggerLabel({ class:
|
|
64
|
+
<span :class="ui.triggerLabel({ class: props.ui?.triggerLabel })">{{ item.label }}</span>
|
|
65
65
|
</TabsTrigger>
|
|
66
66
|
</TabsList>
|
|
67
67
|
|