@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
|
@@ -5,25 +5,25 @@ import theme from "#build/ui/prose/code-preview";
|
|
|
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
|
const slots = defineSlots();
|
|
15
|
+
const props = useComponentProps("prose.codePreview", _props);
|
|
15
16
|
const appConfig = useAppConfig();
|
|
16
|
-
const uiProp = useComponentUI("prose.codePreview", props);
|
|
17
17
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.prose?.codePreview || {} })({ code: !!slots.code }));
|
|
18
18
|
</script>
|
|
19
19
|
|
|
20
20
|
<template>
|
|
21
|
-
<div :class="ui.root({ class: [
|
|
22
|
-
<div :class="ui.preview({ class: [
|
|
21
|
+
<div :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
22
|
+
<div :class="ui.preview({ class: [props.ui?.preview] })">
|
|
23
23
|
<slot />
|
|
24
24
|
</div>
|
|
25
25
|
|
|
26
|
-
<div v-if="!!slots.code" :class="ui.code({ class: [
|
|
26
|
+
<div v-if="!!slots.code" :class="ui.code({ class: [props.ui?.code] })">
|
|
27
27
|
<slot name="code" />
|
|
28
28
|
</div>
|
|
29
29
|
</div>
|
|
@@ -7,12 +7,12 @@ import { computed, watch, onBeforeUpdate, ref } from "vue";
|
|
|
7
7
|
import { TreeRoot, TreeItem } 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 UCodeIcon from "./CodeIcon.vue";
|
|
13
13
|
import UIcon from "../Icon.vue";
|
|
14
14
|
defineOptions({ inheritAttrs: false });
|
|
15
|
-
const
|
|
15
|
+
const _props = defineProps({
|
|
16
16
|
items: { type: Array, required: false },
|
|
17
17
|
modelValue: { type: String, required: false },
|
|
18
18
|
defaultValue: { type: String, required: false },
|
|
@@ -22,8 +22,8 @@ const props = defineProps({
|
|
|
22
22
|
});
|
|
23
23
|
const emits = defineEmits(["update:modelValue"]);
|
|
24
24
|
const slots = defineSlots();
|
|
25
|
+
const props = useComponentProps("prose.codeTree", _props);
|
|
25
26
|
const appConfig = useAppConfig();
|
|
26
|
-
const uiProp = useComponentUI("prose.codeTree", props);
|
|
27
27
|
const [DefineTreeTemplate, ReuseTreeTemplate] = createReusableTemplate();
|
|
28
28
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.prose?.codeTree || {} })());
|
|
29
29
|
const initialPath = props.modelValue ?? props.defaultValue;
|
|
@@ -125,7 +125,7 @@ onBeforeUpdate(() => rerenderCount.value++);
|
|
|
125
125
|
v-for="(item, index) in items"
|
|
126
126
|
:key="`${level}-${index}`"
|
|
127
127
|
role="presentation"
|
|
128
|
-
:class="level > 1 ? ui.itemWithChildren({ class:
|
|
128
|
+
:class="level > 1 ? ui.itemWithChildren({ class: props.ui?.itemWithChildren }) : ui.item({ class: props.ui?.item })"
|
|
129
129
|
>
|
|
130
130
|
<TreeItem
|
|
131
131
|
v-slot="{ isExpanded, isSelected }"
|
|
@@ -135,27 +135,27 @@ onBeforeUpdate(() => rerenderCount.value++);
|
|
|
135
135
|
>
|
|
136
136
|
<button
|
|
137
137
|
type="button"
|
|
138
|
-
:class="ui.link({ class:
|
|
138
|
+
:class="ui.link({ class: props.ui?.link, active: isSelected })"
|
|
139
139
|
>
|
|
140
140
|
<UIcon
|
|
141
141
|
v-if="item.children?.length"
|
|
142
142
|
:name="isExpanded ? appConfig.ui.icons.folderOpen : appConfig.ui.icons.folder"
|
|
143
|
-
:class="ui.linkLeadingIcon({ class:
|
|
143
|
+
:class="ui.linkLeadingIcon({ class: props.ui?.linkLeadingIcon })"
|
|
144
144
|
/>
|
|
145
145
|
<UCodeIcon
|
|
146
146
|
v-else
|
|
147
147
|
:filename="item.label"
|
|
148
|
-
:class="ui.linkLeadingIcon({ class:
|
|
148
|
+
:class="ui.linkLeadingIcon({ class: props.ui?.linkLeadingIcon })"
|
|
149
149
|
/>
|
|
150
150
|
|
|
151
|
-
<span :class="ui.linkLabel({ class:
|
|
151
|
+
<span :class="ui.linkLabel({ class: props.ui?.linkLabel })">
|
|
152
152
|
{{ item.label }}
|
|
153
153
|
</span>
|
|
154
154
|
|
|
155
|
-
<span v-if="item.children?.length" :class="ui.linkTrailing({ class:
|
|
155
|
+
<span v-if="item.children?.length" :class="ui.linkTrailing({ class: props.ui?.linkTrailing })">
|
|
156
156
|
<UIcon
|
|
157
157
|
:name="appConfig.ui.icons.chevronDown"
|
|
158
|
-
:class="ui.linkTrailingIcon({ class:
|
|
158
|
+
:class="ui.linkTrailingIcon({ class: props.ui?.linkTrailingIcon })"
|
|
159
159
|
/>
|
|
160
160
|
</span>
|
|
161
161
|
</button>
|
|
@@ -163,7 +163,7 @@ onBeforeUpdate(() => rerenderCount.value++);
|
|
|
163
163
|
<ul
|
|
164
164
|
v-if="item.children?.length && isExpanded"
|
|
165
165
|
role="group"
|
|
166
|
-
:class="ui.listWithChildren({ class:
|
|
166
|
+
:class="ui.listWithChildren({ class: props.ui?.listWithChildren })"
|
|
167
167
|
>
|
|
168
168
|
<ReuseTreeTemplate :items="item.children" :level="level + 1" />
|
|
169
169
|
</ul>
|
|
@@ -171,18 +171,18 @@ onBeforeUpdate(() => rerenderCount.value++);
|
|
|
171
171
|
</li>
|
|
172
172
|
</DefineTreeTemplate>
|
|
173
173
|
|
|
174
|
-
<div v-bind="$attrs" :class="ui.root({ class: [
|
|
174
|
+
<div v-bind="$attrs" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
175
175
|
<TreeRoot
|
|
176
176
|
v-model="model"
|
|
177
177
|
v-model:expanded="expanded"
|
|
178
|
-
:class="ui.list({ class:
|
|
178
|
+
:class="ui.list({ class: props.ui?.list })"
|
|
179
179
|
:items="items"
|
|
180
180
|
:get-key="(item2) => item2.path"
|
|
181
181
|
>
|
|
182
182
|
<ReuseTreeTemplate :items="items" :level="1" />
|
|
183
183
|
</TreeRoot>
|
|
184
184
|
|
|
185
|
-
<div :class="ui.content({ class:
|
|
185
|
+
<div :class="ui.content({ class: props.ui?.content })">
|
|
186
186
|
<component :is="lastSelectedItem?.component" />
|
|
187
187
|
</div>
|
|
188
188
|
</div>
|
|
@@ -5,13 +5,13 @@ import theme from "#build/ui/prose/collapsible";
|
|
|
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 { transformUI } from "../../utils";
|
|
11
11
|
import { tv } from "../../utils/tv";
|
|
12
12
|
import UCollapsible from "../Collapsible.vue";
|
|
13
13
|
import UIcon from "../Icon.vue";
|
|
14
|
-
const
|
|
14
|
+
const _props = defineProps({
|
|
15
15
|
icon: { type: null, required: false },
|
|
16
16
|
name: { type: String, required: false },
|
|
17
17
|
openText: { type: String, required: false },
|
|
@@ -20,19 +20,19 @@ const props = defineProps({
|
|
|
20
20
|
ui: { type: Object, required: false }
|
|
21
21
|
});
|
|
22
22
|
defineSlots();
|
|
23
|
+
const props = useComponentProps("prose.collapsible", _props);
|
|
23
24
|
const { t } = useLocale();
|
|
24
25
|
const appConfig = useAppConfig();
|
|
25
|
-
const uiProp = useComponentUI("prose.collapsible", props);
|
|
26
26
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.prose?.collapsible || {} })());
|
|
27
27
|
</script>
|
|
28
28
|
|
|
29
29
|
<template>
|
|
30
|
-
<UCollapsible :unmount-on-hide="false" :class="props.class" :ui="transformUI(ui,
|
|
30
|
+
<UCollapsible :unmount-on-hide="false" :class="props.class" :ui="transformUI(ui, props.ui)">
|
|
31
31
|
<template #default="{ open }">
|
|
32
|
-
<button :class="ui.trigger({ class:
|
|
33
|
-
<UIcon :name="icon || appConfig.ui.icons.chevronDown" :class="ui.triggerIcon({ class:
|
|
32
|
+
<button :class="ui.trigger({ class: props.ui?.trigger })">
|
|
33
|
+
<UIcon :name="props.icon || appConfig.ui.icons.chevronDown" :class="ui.triggerIcon({ class: props.ui?.triggerIcon })" />
|
|
34
34
|
|
|
35
|
-
<span :class="ui.triggerLabel({ class:
|
|
35
|
+
<span :class="ui.triggerLabel({ class: props.ui?.triggerLabel })">
|
|
36
36
|
{{ open ? props.closeText || t("prose.collapsible.closeText") : props.openText || t("prose.collapsible.openText") }} {{ props.name || t("prose.collapsible.name") }}
|
|
37
37
|
</span>
|
|
38
38
|
</button>
|
|
@@ -5,18 +5,18 @@ import theme from "#build/ui/prose/em";
|
|
|
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: String, required: false },
|
|
12
12
|
ui: { type: Object, required: false }
|
|
13
13
|
});
|
|
14
14
|
defineSlots();
|
|
15
|
+
const props = useComponentProps("prose.em", _props);
|
|
15
16
|
const appConfig = useAppConfig();
|
|
16
|
-
const uiProp = useComponentUI("prose.em", props);
|
|
17
17
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.prose?.em || {} }));
|
|
18
18
|
</script>
|
|
19
19
|
|
|
20
20
|
<template>
|
|
21
|
-
<em :class="ui({ class: [
|
|
21
|
+
<em :class="ui({ class: [props.ui?.base, props.class] })"><slot /></em>
|
|
22
22
|
</template>
|
|
@@ -6,9 +6,9 @@ import theme from "#build/ui/prose/field";
|
|
|
6
6
|
import { computed } from "vue";
|
|
7
7
|
import { Primitive } from "reka-ui";
|
|
8
8
|
import { useAppConfig } from "#imports";
|
|
9
|
-
import {
|
|
9
|
+
import { useComponentProps } from "../../composables/useComponentProps";
|
|
10
10
|
import { tv } from "../../utils/tv";
|
|
11
|
-
const
|
|
11
|
+
const _props = defineProps({
|
|
12
12
|
as: { type: null, required: false },
|
|
13
13
|
name: { type: String, required: false },
|
|
14
14
|
type: { type: String, required: false },
|
|
@@ -18,32 +18,32 @@ const props = defineProps({
|
|
|
18
18
|
ui: { type: Object, required: false }
|
|
19
19
|
});
|
|
20
20
|
const slots = defineSlots();
|
|
21
|
+
const props = useComponentProps("prose.field", _props);
|
|
21
22
|
const appConfig = useAppConfig();
|
|
22
|
-
const uiProp = useComponentUI("prose.field", props);
|
|
23
23
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.prose?.field || {} })());
|
|
24
24
|
</script>
|
|
25
25
|
|
|
26
26
|
<template>
|
|
27
|
-
<Primitive :as="as" :class="ui.root({ class: [
|
|
28
|
-
<div :class="ui.container({ class:
|
|
29
|
-
<span v-if="name" :class="ui.name({ class:
|
|
30
|
-
{{ name }}
|
|
27
|
+
<Primitive :as="props.as" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
28
|
+
<div :class="ui.container({ class: props.ui?.container })">
|
|
29
|
+
<span v-if="props.name" :class="ui.name({ class: props.ui?.name })">
|
|
30
|
+
{{ props.name }}
|
|
31
31
|
</span>
|
|
32
32
|
|
|
33
|
-
<div v-if="type || required" :class="ui.wrapper({ class:
|
|
34
|
-
<span v-if="type" :class="ui.type({ class:
|
|
35
|
-
{{ type }}
|
|
33
|
+
<div v-if="props.type || props.required" :class="ui.wrapper({ class: props.ui?.wrapper })">
|
|
34
|
+
<span v-if="props.type" :class="ui.type({ class: props.ui?.type })">
|
|
35
|
+
{{ props.type }}
|
|
36
36
|
</span>
|
|
37
37
|
|
|
38
|
-
<span v-if="required" :class="ui.required({ class:
|
|
38
|
+
<span v-if="props.required" :class="ui.required({ class: props.ui?.required })">
|
|
39
39
|
required
|
|
40
40
|
</span>
|
|
41
41
|
</div>
|
|
42
42
|
</div>
|
|
43
43
|
|
|
44
|
-
<div v-if="!!slots.default || description" :class="ui.description({ class:
|
|
44
|
+
<div v-if="!!slots.default || props.description" :class="ui.description({ class: props.ui?.description })">
|
|
45
45
|
<slot mdc-unwrap="p">
|
|
46
|
-
{{ description }}
|
|
46
|
+
{{ props.description }}
|
|
47
47
|
</slot>
|
|
48
48
|
</div>
|
|
49
49
|
</Primitive>
|
|
@@ -6,21 +6,21 @@ import theme from "#build/ui/prose/field-group";
|
|
|
6
6
|
import { computed } from "vue";
|
|
7
7
|
import { Primitive } from "reka-ui";
|
|
8
8
|
import { useAppConfig } from "#imports";
|
|
9
|
-
import {
|
|
9
|
+
import { useComponentProps } from "../../composables/useComponentProps";
|
|
10
10
|
import { tv } from "../../utils/tv";
|
|
11
|
-
const
|
|
11
|
+
const _props = defineProps({
|
|
12
12
|
as: { type: null, required: false },
|
|
13
13
|
class: { type: null, required: false },
|
|
14
14
|
ui: { type: Object, required: false }
|
|
15
15
|
});
|
|
16
16
|
defineSlots();
|
|
17
|
+
const props = useComponentProps("prose.fieldGroup", _props);
|
|
17
18
|
const appConfig = useAppConfig();
|
|
18
|
-
const uiProp = useComponentUI("prose.fieldGroup", props);
|
|
19
19
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.prose?.fieldGroup || {} }));
|
|
20
20
|
</script>
|
|
21
21
|
|
|
22
22
|
<template>
|
|
23
|
-
<Primitive :as="as" :class="ui({ class: [
|
|
23
|
+
<Primitive :as="props.as" :class="ui({ class: [props.ui?.base, props.class] })">
|
|
24
24
|
<slot />
|
|
25
25
|
</Primitive>
|
|
26
26
|
</template>
|
|
@@ -5,24 +5,24 @@ import theme from "#build/ui/prose/h1";
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { computed } from "vue";
|
|
7
7
|
import { useAppConfig, useRuntimeConfig } 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
|
id: { type: String, required: false },
|
|
12
12
|
class: { type: null, required: false },
|
|
13
13
|
ui: { type: Object, required: false }
|
|
14
14
|
});
|
|
15
15
|
defineSlots();
|
|
16
|
+
const props = useComponentProps("prose.h1", _props);
|
|
16
17
|
const appConfig = useAppConfig();
|
|
17
|
-
const uiProp = useComponentUI("prose.h1", props);
|
|
18
18
|
const { headings } = useRuntimeConfig().public?.mdc || {};
|
|
19
19
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.prose?.h1 || {} })());
|
|
20
20
|
const generate = computed(() => props.id && typeof headings?.anchorLinks === "object" && headings.anchorLinks.h1);
|
|
21
21
|
</script>
|
|
22
22
|
|
|
23
23
|
<template>
|
|
24
|
-
<h1 :id="id" :class="ui.base({ class: [
|
|
25
|
-
<a v-if="id && generate" :href="`#${id}`" :class="ui.link({ class:
|
|
24
|
+
<h1 :id="props.id" :class="ui.base({ class: [props.ui?.base, props.class] })">
|
|
25
|
+
<a v-if="props.id && generate" :href="`#${props.id}`" :class="ui.link({ class: props.ui?.link })">
|
|
26
26
|
<slot />
|
|
27
27
|
</a>
|
|
28
28
|
<slot v-else />
|
|
@@ -5,27 +5,27 @@ import theme from "#build/ui/prose/h2";
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { computed } from "vue";
|
|
7
7
|
import { useRuntimeConfig, useAppConfig } from "#imports";
|
|
8
|
-
import {
|
|
8
|
+
import { useComponentProps } from "../../composables/useComponentProps";
|
|
9
9
|
import { tv } from "../../utils/tv";
|
|
10
10
|
import UIcon from "../Icon.vue";
|
|
11
|
-
const
|
|
11
|
+
const _props = defineProps({
|
|
12
12
|
id: { 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.h2", _props);
|
|
17
18
|
const appConfig = useAppConfig();
|
|
18
|
-
const uiProp = useComponentUI("prose.h2", props);
|
|
19
19
|
const { headings } = useRuntimeConfig().public?.mdc || {};
|
|
20
20
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.prose?.h2 || {} })());
|
|
21
21
|
const generate = computed(() => props.id && typeof headings?.anchorLinks === "object" && headings.anchorLinks.h2);
|
|
22
22
|
</script>
|
|
23
23
|
|
|
24
24
|
<template>
|
|
25
|
-
<h2 :id="id" :class="ui.base({ class: [
|
|
26
|
-
<a v-if="id && generate" :href="`#${id}`" :class="ui.link({ class:
|
|
27
|
-
<span :class="ui.leading({ class:
|
|
28
|
-
<UIcon :name="appConfig.ui.icons.hash" :class="ui.leadingIcon({ class:
|
|
25
|
+
<h2 :id="props.id" :class="ui.base({ class: [props.ui?.base, props.class] })">
|
|
26
|
+
<a v-if="props.id && generate" :href="`#${props.id}`" :class="ui.link({ class: props.ui?.link })">
|
|
27
|
+
<span :class="ui.leading({ class: props.ui?.leading })">
|
|
28
|
+
<UIcon :name="appConfig.ui.icons.hash" :class="ui.leadingIcon({ class: props.ui?.leadingIcon })" />
|
|
29
29
|
</span>
|
|
30
30
|
|
|
31
31
|
<slot />
|
|
@@ -5,27 +5,27 @@ import theme from "#build/ui/prose/h3";
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { computed } from "vue";
|
|
7
7
|
import { useRuntimeConfig, useAppConfig } from "#imports";
|
|
8
|
-
import {
|
|
8
|
+
import { useComponentProps } from "../../composables/useComponentProps";
|
|
9
9
|
import { tv } from "../../utils/tv";
|
|
10
10
|
import UIcon from "../Icon.vue";
|
|
11
|
-
const
|
|
11
|
+
const _props = defineProps({
|
|
12
12
|
id: { 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.h3", _props);
|
|
17
18
|
const appConfig = useAppConfig();
|
|
18
|
-
const uiProp = useComponentUI("prose.h3", props);
|
|
19
19
|
const { headings } = useRuntimeConfig().public?.mdc || {};
|
|
20
20
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.prose?.h3 || {} })());
|
|
21
21
|
const generate = computed(() => props.id && typeof headings?.anchorLinks === "object" && headings.anchorLinks.h3);
|
|
22
22
|
</script>
|
|
23
23
|
|
|
24
24
|
<template>
|
|
25
|
-
<h3 :id="id" :class="ui.base({ class: [
|
|
26
|
-
<a v-if="id && generate" :href="`#${id}`" :class="ui.link({ class:
|
|
27
|
-
<span :class="ui.leading({ class:
|
|
28
|
-
<UIcon :name="appConfig.ui.icons.hash" :class="ui.leadingIcon({ class:
|
|
25
|
+
<h3 :id="props.id" :class="ui.base({ class: [props.ui?.base, props.class] })">
|
|
26
|
+
<a v-if="props.id && generate" :href="`#${props.id}`" :class="ui.link({ class: props.ui?.link })">
|
|
27
|
+
<span :class="ui.leading({ class: props.ui?.leading })">
|
|
28
|
+
<UIcon :name="appConfig.ui.icons.hash" :class="ui.leadingIcon({ class: props.ui?.leadingIcon })" />
|
|
29
29
|
</span>
|
|
30
30
|
|
|
31
31
|
<slot />
|
|
@@ -5,24 +5,24 @@ import theme from "#build/ui/prose/h4";
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { computed } from "vue";
|
|
7
7
|
import { useRuntimeConfig, 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
|
id: { type: String, required: false },
|
|
12
12
|
class: { type: null, required: false },
|
|
13
13
|
ui: { type: Object, required: false }
|
|
14
14
|
});
|
|
15
15
|
defineSlots();
|
|
16
|
+
const props = useComponentProps("prose.h4", _props);
|
|
16
17
|
const appConfig = useAppConfig();
|
|
17
|
-
const uiProp = useComponentUI("prose.h4", props);
|
|
18
18
|
const { headings } = useRuntimeConfig().public?.mdc || {};
|
|
19
19
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.prose?.h4 || {} })());
|
|
20
20
|
const generate = computed(() => props.id && typeof headings?.anchorLinks === "object" && headings.anchorLinks.h4);
|
|
21
21
|
</script>
|
|
22
22
|
|
|
23
23
|
<template>
|
|
24
|
-
<h4 :id="id" :class="ui.base({ class: [
|
|
25
|
-
<a v-if="id && generate" :href="`#${id}`" :class="ui.link({ class:
|
|
24
|
+
<h4 :id="props.id" :class="ui.base({ class: [props.ui?.base, props.class] })">
|
|
25
|
+
<a v-if="props.id && generate" :href="`#${props.id}`" :class="ui.link({ class: props.ui?.link })">
|
|
26
26
|
<slot />
|
|
27
27
|
</a>
|
|
28
28
|
<slot v-else />
|
|
@@ -5,17 +5,17 @@ import theme from "#build/ui/prose/hr";
|
|
|
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
|
+
const props = useComponentProps("prose.hr", _props);
|
|
14
15
|
const appConfig = useAppConfig();
|
|
15
|
-
const uiProp = useComponentUI("prose.hr", props);
|
|
16
16
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.prose?.hr || {} }));
|
|
17
17
|
</script>
|
|
18
18
|
|
|
19
19
|
<template>
|
|
20
|
-
<hr :class="ui({ class: [
|
|
20
|
+
<hr :class="ui({ class: [props.ui?.base, props.class] })">
|
|
21
21
|
</template>
|
|
@@ -5,19 +5,19 @@ import theme from "#build/ui/prose/icon";
|
|
|
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 UIcon from "../Icon.vue";
|
|
11
|
-
const
|
|
11
|
+
const _props = defineProps({
|
|
12
12
|
name: { type: String, required: true },
|
|
13
13
|
class: { type: null, required: false },
|
|
14
14
|
ui: { type: Object, required: false }
|
|
15
15
|
});
|
|
16
|
+
const props = useComponentProps("prose.icon", _props);
|
|
16
17
|
const appConfig = useAppConfig();
|
|
17
|
-
const uiProp = useComponentUI("prose.icon", props);
|
|
18
18
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.prose?.icon || {} }));
|
|
19
19
|
</script>
|
|
20
20
|
|
|
21
21
|
<template>
|
|
22
|
-
<UIcon :name="name" :class="ui({ class: [
|
|
22
|
+
<UIcon :name="props.name" :class="ui({ class: [props.ui?.base, props.class] })" />
|
|
23
23
|
</template>
|
|
@@ -9,11 +9,11 @@ import { AnimatePresence, Motion } from "motion-v";
|
|
|
9
9
|
import { useEventListener, createReusableTemplate } from "@vueuse/core";
|
|
10
10
|
import { useRuntimeConfig, useAppConfig } from "#imports";
|
|
11
11
|
import ImageComponent from "#build/ui-image-component";
|
|
12
|
-
import {
|
|
12
|
+
import { useComponentProps } from "../../composables/useComponentProps";
|
|
13
13
|
import { resolveBaseURL } from "../../utils";
|
|
14
14
|
import { tv } from "../../utils/tv";
|
|
15
15
|
defineOptions({ inheritAttrs: false });
|
|
16
|
-
const
|
|
16
|
+
const _props = defineProps({
|
|
17
17
|
src: { type: String, required: true },
|
|
18
18
|
alt: { type: String, required: true },
|
|
19
19
|
width: { type: [String, Number], required: false },
|
|
@@ -22,8 +22,8 @@ const props = defineProps({
|
|
|
22
22
|
zoom: { type: Boolean, required: false, default: true },
|
|
23
23
|
ui: { type: Object, required: false }
|
|
24
24
|
});
|
|
25
|
+
const props = useComponentProps("prose.img", _props);
|
|
25
26
|
const appConfig = useAppConfig();
|
|
26
|
-
const uiProp = useComponentUI("prose.img", props);
|
|
27
27
|
const [DefineImageTemplate, ReuseImageTemplate] = createReusableTemplate();
|
|
28
28
|
const [DefineZoomedImageTemplate, ReuseZoomedImageTemplate] = createReusableTemplate();
|
|
29
29
|
const open = ref(false);
|
|
@@ -51,11 +51,11 @@ if (props.zoom) {
|
|
|
51
51
|
<component
|
|
52
52
|
:is="ImageComponent"
|
|
53
53
|
:src="refinedSrc"
|
|
54
|
-
:alt="alt"
|
|
55
|
-
:width="width"
|
|
56
|
-
:height="height"
|
|
54
|
+
:alt="props.alt"
|
|
55
|
+
:width="props.width"
|
|
56
|
+
:height="props.height"
|
|
57
57
|
v-bind="$attrs"
|
|
58
|
-
:class="ui.base({ class: [
|
|
58
|
+
:class="ui.base({ class: [props.ui?.base, props.class] })"
|
|
59
59
|
/>
|
|
60
60
|
</DefineImageTemplate>
|
|
61
61
|
|
|
@@ -63,13 +63,13 @@ if (props.zoom) {
|
|
|
63
63
|
<component
|
|
64
64
|
:is="ImageComponent"
|
|
65
65
|
:src="refinedSrc"
|
|
66
|
-
:alt="alt"
|
|
66
|
+
:alt="props.alt"
|
|
67
67
|
v-bind="$attrs"
|
|
68
|
-
:class="ui.zoomedImage({ class: [
|
|
68
|
+
:class="ui.zoomedImage({ class: [props.ui?.zoomedImage] })"
|
|
69
69
|
/>
|
|
70
70
|
</DefineZoomedImageTemplate>
|
|
71
71
|
|
|
72
|
-
<DialogRoot v-if="zoom" v-slot="{ close }" v-model:open="open" :modal="false">
|
|
72
|
+
<DialogRoot v-if="props.zoom" v-slot="{ close }" v-model:open="open" :modal="false">
|
|
73
73
|
<DialogTrigger as-child>
|
|
74
74
|
<Motion :layout-id="layoutId" as-child :transition="{ type: 'spring', bounce: 0.15, duration: 0.5, ease: 'easeInOut' }">
|
|
75
75
|
<ReuseImageTemplate />
|
|
@@ -78,9 +78,9 @@ if (props.zoom) {
|
|
|
78
78
|
|
|
79
79
|
<DialogPortal>
|
|
80
80
|
<AnimatePresence>
|
|
81
|
-
<Motion v-if="open" :initial="{ opacity: 0 }" :animate="{ opacity: 1 }" :exit="{ opacity: 0 }" :class="ui.overlay({ class: [
|
|
81
|
+
<Motion v-if="open" :initial="{ opacity: 0 }" :animate="{ opacity: 1 }" :exit="{ opacity: 0 }" :class="ui.overlay({ class: [props.ui?.overlay] })" />
|
|
82
82
|
|
|
83
|
-
<div v-if="open" :class="ui.content({ class: [
|
|
83
|
+
<div v-if="open" :class="ui.content({ class: [props.ui?.content] })" @click="close">
|
|
84
84
|
<Motion as-child :layout-id="layoutId" :transition="{ type: 'spring', bounce: 0.15, duration: 0.5, ease: 'easeInOut' }">
|
|
85
85
|
<ReuseZoomedImageTemplate />
|
|
86
86
|
</Motion>
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
export interface ProseKbdProps {
|
|
2
|
-
value
|
|
2
|
+
value?: string;
|
|
3
3
|
class?: any;
|
|
4
4
|
ui?: {
|
|
5
5
|
base?: any;
|
|
6
6
|
};
|
|
7
7
|
}
|
|
8
|
+
export interface ProseKbdSlots {
|
|
9
|
+
default?(props?: {}): any;
|
|
10
|
+
}
|
|
8
11
|
declare const _default: typeof __VLS_export;
|
|
9
12
|
export default _default;
|
|
10
|
-
declare const __VLS_export: import("vue").DefineComponent<ProseKbdProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ProseKbdProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ProseKbdProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ProseKbdProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ProseKbdSlots>;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -5,19 +5,22 @@ import theme from "#build/ui/prose/kbd";
|
|
|
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 UKbd from "../Kbd.vue";
|
|
11
|
-
const
|
|
12
|
-
value: { type: String, required:
|
|
11
|
+
const _props = defineProps({
|
|
12
|
+
value: { type: String, required: false },
|
|
13
13
|
class: { type: null, required: false },
|
|
14
14
|
ui: { type: Object, required: false }
|
|
15
15
|
});
|
|
16
|
+
defineSlots();
|
|
17
|
+
const props = useComponentProps("prose.kbd", _props);
|
|
16
18
|
const appConfig = useAppConfig();
|
|
17
|
-
const uiProp = useComponentUI("prose.kbd", props);
|
|
18
19
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.prose?.kbd || {} }));
|
|
19
20
|
</script>
|
|
20
21
|
|
|
21
22
|
<template>
|
|
22
|
-
<UKbd :value="value" :class="ui({ class: [
|
|
23
|
+
<UKbd :value="props.value" :class="ui({ class: [props.ui?.base, props.class] })">
|
|
24
|
+
<slot />
|
|
25
|
+
</UKbd>
|
|
23
26
|
</template>
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
export interface ProseKbdProps {
|
|
2
|
-
value
|
|
2
|
+
value?: string;
|
|
3
3
|
class?: any;
|
|
4
4
|
ui?: {
|
|
5
5
|
base?: any;
|
|
6
6
|
};
|
|
7
7
|
}
|
|
8
|
+
export interface ProseKbdSlots {
|
|
9
|
+
default?(props?: {}): any;
|
|
10
|
+
}
|
|
8
11
|
declare const _default: typeof __VLS_export;
|
|
9
12
|
export default _default;
|
|
10
|
-
declare const __VLS_export: import("vue").DefineComponent<ProseKbdProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ProseKbdProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ProseKbdProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ProseKbdProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ProseKbdSlots>;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -5,20 +5,20 @@ import theme from "#build/ui/prose/li";
|
|
|
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.li", _props);
|
|
15
16
|
const appConfig = useAppConfig();
|
|
16
|
-
const uiProp = useComponentUI("prose.li", props);
|
|
17
17
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.prose?.li || {} }));
|
|
18
18
|
</script>
|
|
19
19
|
|
|
20
20
|
<template>
|
|
21
|
-
<li :class="ui({ class: [
|
|
21
|
+
<li :class="ui({ class: [props.ui?.base, props.class] })">
|
|
22
22
|
<slot />
|
|
23
23
|
</li>
|
|
24
24
|
</template>
|