@baybreezy/docd 0.0.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/app/app.config.ts +239 -0
- package/app/app.vue +19 -0
- package/app/assets/css/tailwind.css +335 -0
- package/app/assets/css/theme.css +1171 -0
- package/app/components/OgImage/Docs.takumi.vue +69 -0
- package/app/components/OgImage/Landing.takumi.vue +64 -0
- package/app/components/OgImage/Site.takumi.vue +32 -0
- package/app/components/Ui/Avatar/Avatar.vue +75 -0
- package/app/components/Ui/Avatar/Badge.vue +34 -0
- package/app/components/Ui/Avatar/Fallback.vue +30 -0
- package/app/components/Ui/Avatar/Group.vue +29 -0
- package/app/components/Ui/Avatar/GroupCount.vue +29 -0
- package/app/components/Ui/Avatar/Image.vue +29 -0
- package/app/components/Ui/Badge.vue +86 -0
- package/app/components/Ui/BadgeGroup.vue +314 -0
- package/app/components/Ui/BgPattern/Grid.vue +137 -0
- package/app/components/Ui/BorderBeam.vue +97 -0
- package/app/components/Ui/Breadcrumbs.vue +103 -0
- package/app/components/Ui/Button.vue +169 -0
- package/app/components/Ui/ButtonGroup/ButtonGroup.vue +54 -0
- package/app/components/Ui/ButtonGroup/Separator.vue +38 -0
- package/app/components/Ui/ButtonGroup/Text.vue +33 -0
- package/app/components/Ui/Card/Action.vue +31 -0
- package/app/components/Ui/Card/Card.vue +58 -0
- package/app/components/Ui/Card/Content.vue +34 -0
- package/app/components/Ui/Card/Description.vue +36 -0
- package/app/components/Ui/Card/Footer.vue +31 -0
- package/app/components/Ui/Card/Header.vue +31 -0
- package/app/components/Ui/Card/Title.vue +37 -0
- package/app/components/Ui/Collapsible/Collapsible.vue +16 -0
- package/app/components/Ui/Collapsible/Content.vue +27 -0
- package/app/components/Ui/Collapsible/Trigger.vue +13 -0
- package/app/components/Ui/Command/Command.vue +115 -0
- package/app/components/Ui/Command/Dialog.vue +65 -0
- package/app/components/Ui/Command/Empty.vue +32 -0
- package/app/components/Ui/Command/Footer.vue +40 -0
- package/app/components/Ui/Command/Group.vue +58 -0
- package/app/components/Ui/Command/Input.vue +57 -0
- package/app/components/Ui/Command/Item.vue +102 -0
- package/app/components/Ui/Command/List.vue +33 -0
- package/app/components/Ui/Command/Separator.vue +30 -0
- package/app/components/Ui/Command/Shortcut.vue +28 -0
- package/app/components/Ui/Container.vue +46 -0
- package/app/components/Ui/ContextMenu/Arrow.vue +43 -0
- package/app/components/Ui/ContextMenu/CheckboxItem.vue +42 -0
- package/app/components/Ui/ContextMenu/Content.vue +53 -0
- package/app/components/Ui/ContextMenu/ContextMenu.vue +14 -0
- package/app/components/Ui/ContextMenu/Group.vue +12 -0
- package/app/components/Ui/ContextMenu/Item.vue +65 -0
- package/app/components/Ui/ContextMenu/ItemIndicator.vue +30 -0
- package/app/components/Ui/ContextMenu/Label.vue +35 -0
- package/app/components/Ui/ContextMenu/Portal.vue +12 -0
- package/app/components/Ui/ContextMenu/RadioGroup.vue +16 -0
- package/app/components/Ui/ContextMenu/RadioItem.vue +40 -0
- package/app/components/Ui/ContextMenu/Separator.vue +25 -0
- package/app/components/Ui/ContextMenu/Shortcut.vue +30 -0
- package/app/components/Ui/ContextMenu/Sub.vue +15 -0
- package/app/components/Ui/ContextMenu/SubContent.vue +55 -0
- package/app/components/Ui/ContextMenu/SubTrigger.vue +42 -0
- package/app/components/Ui/ContextMenu/Trigger.vue +12 -0
- package/app/components/Ui/Dialog/Close.vue +12 -0
- package/app/components/Ui/Dialog/Content.vue +79 -0
- package/app/components/Ui/Dialog/Description.vue +29 -0
- package/app/components/Ui/Dialog/Dialog.vue +14 -0
- package/app/components/Ui/Dialog/Footer.vue +32 -0
- package/app/components/Ui/Dialog/Header.vue +32 -0
- package/app/components/Ui/Dialog/Overlay.vue +25 -0
- package/app/components/Ui/Dialog/Portal.vue +12 -0
- package/app/components/Ui/Dialog/Title.vue +29 -0
- package/app/components/Ui/Dialog/Trigger.vue +12 -0
- package/app/components/Ui/Divider.vue +102 -0
- package/app/components/Ui/Drawer/Close.vue +12 -0
- package/app/components/Ui/Drawer/Content.vue +67 -0
- package/app/components/Ui/Drawer/Description.vue +33 -0
- package/app/components/Ui/Drawer/Drawer.vue +17 -0
- package/app/components/Ui/Drawer/Footer.vue +35 -0
- package/app/components/Ui/Drawer/Header.vue +34 -0
- package/app/components/Ui/Drawer/Overlay.vue +20 -0
- package/app/components/Ui/Drawer/Portal.vue +12 -0
- package/app/components/Ui/Drawer/Title.vue +35 -0
- package/app/components/Ui/Drawer/Trigger.vue +12 -0
- package/app/components/Ui/DropdownMenu/Arrow.vue +43 -0
- package/app/components/Ui/DropdownMenu/CheckboxItem.vue +41 -0
- package/app/components/Ui/DropdownMenu/Content.vue +56 -0
- package/app/components/Ui/DropdownMenu/DropdownMenu.vue +15 -0
- package/app/components/Ui/DropdownMenu/Group.vue +12 -0
- package/app/components/Ui/DropdownMenu/Item.vue +64 -0
- package/app/components/Ui/DropdownMenu/ItemIndicator.vue +32 -0
- package/app/components/Ui/DropdownMenu/Label.vue +34 -0
- package/app/components/Ui/DropdownMenu/Portal.vue +12 -0
- package/app/components/Ui/DropdownMenu/RadioGroup.vue +16 -0
- package/app/components/Ui/DropdownMenu/RadioItem.vue +40 -0
- package/app/components/Ui/DropdownMenu/Separator.vue +25 -0
- package/app/components/Ui/DropdownMenu/Shortcut.vue +44 -0
- package/app/components/Ui/DropdownMenu/Sub.vue +14 -0
- package/app/components/Ui/DropdownMenu/SubContent.vue +56 -0
- package/app/components/Ui/DropdownMenu/SubTrigger.vue +47 -0
- package/app/components/Ui/DropdownMenu/Trigger.vue +12 -0
- package/app/components/Ui/FancyIcon.vue +243 -0
- package/app/components/Ui/GradientDivider.vue +26 -0
- package/app/components/Ui/IframeLazy.vue +97 -0
- package/app/components/Ui/Input.vue +97 -0
- package/app/components/Ui/InputGroup/Addon.vue +66 -0
- package/app/components/Ui/InputGroup/Button.vue +50 -0
- package/app/components/Ui/InputGroup/Input.vue +25 -0
- package/app/components/Ui/InputGroup/InputGroup.vue +44 -0
- package/app/components/Ui/InputGroup/Text.vue +33 -0
- package/app/components/Ui/InputGroup/Textarea.vue +25 -0
- package/app/components/Ui/Kbd/Group.vue +32 -0
- package/app/components/Ui/Kbd/Kbd.vue +62 -0
- package/app/components/Ui/Label.vue +40 -0
- package/app/components/Ui/Popover/Anchor.vue +13 -0
- package/app/components/Ui/Popover/Arrow.vue +42 -0
- package/app/components/Ui/Popover/Close.vue +13 -0
- package/app/components/Ui/Popover/Content.vue +55 -0
- package/app/components/Ui/Popover/Popover.vue +15 -0
- package/app/components/Ui/Popover/Portal.vue +13 -0
- package/app/components/Ui/Popover/Trigger.vue +12 -0
- package/app/components/Ui/Popover/X.vue +38 -0
- package/app/components/Ui/ScrollArea/Corner.vue +12 -0
- package/app/components/Ui/ScrollArea/ScrollArea.vue +38 -0
- package/app/components/Ui/ScrollArea/Scrollbar.vue +39 -0
- package/app/components/Ui/ScrollArea/Thumb.vue +39 -0
- package/app/components/Ui/ScrollArea/Viewport.vue +27 -0
- package/app/components/Ui/Scrollspy.vue +61 -0
- package/app/components/Ui/Separator.vue +40 -0
- package/app/components/Ui/Skeleton.vue +39 -0
- package/app/components/Ui/Sonner.vue +25 -0
- package/app/components/Ui/Tabs/Content.vue +27 -0
- package/app/components/Ui/Tabs/Indicator.vue +37 -0
- package/app/components/Ui/Tabs/List.vue +37 -0
- package/app/components/Ui/Tabs/Tabs.vue +25 -0
- package/app/components/Ui/Tabs/Trigger.vue +41 -0
- package/app/components/Ui/Textarea.vue +81 -0
- package/app/components/Ui/Tooltip/Arrow.vue +30 -0
- package/app/components/Ui/Tooltip/Content.vue +50 -0
- package/app/components/Ui/Tooltip/Portal.vue +12 -0
- package/app/components/Ui/Tooltip/Provider.vue +14 -0
- package/app/components/Ui/Tooltip/Tooltip.vue +25 -0
- package/app/components/Ui/Tooltip/Trigger.vue +12 -0
- package/app/components/Ui/Tree/Item.vue +15 -0
- package/app/components/Ui/Tree/Tree.vue +15 -0
- package/app/components/Ui/Tree/Virtualizer.vue +13 -0
- package/app/components/component-api/ComponentApiSection.vue +135 -0
- package/app/components/content/docs/Callout/DocsCallout.vue +99 -0
- package/app/components/content/prose/ProseA.global.vue +31 -0
- package/app/components/content/prose/ProseBlockquote.global.vue +28 -0
- package/app/components/content/prose/ProseCallout.global.vue +306 -0
- package/app/components/content/prose/ProseCard.global.vue +100 -0
- package/app/components/content/prose/ProseCodeCollapse.global.vue +125 -0
- package/app/components/content/prose/ProseCodeCopy.global.vue +67 -0
- package/app/components/content/prose/ProseCodeGroup.global.vue +104 -0
- package/app/components/content/prose/ProseCodeTree.global.vue +277 -0
- package/app/components/content/prose/ProseCollapsible.global.vue +64 -0
- package/app/components/content/prose/ProseColorModeImage.global.vue +58 -0
- package/app/components/content/prose/ProseComponentApi.global.vue +104 -0
- package/app/components/content/prose/ProseComponentEvents.global.vue +27 -0
- package/app/components/content/prose/ProseComponentExposed.global.vue +27 -0
- package/app/components/content/prose/ProseComponentProps.global.vue +27 -0
- package/app/components/content/prose/ProseComponentSlots.global.vue +27 -0
- package/app/components/content/prose/ProseEm.global.vue +5 -0
- package/app/components/content/prose/ProseField.global.vue +118 -0
- package/app/components/content/prose/ProseFieldGroup.global.vue +62 -0
- package/app/components/content/prose/ProseH1.global.vue +58 -0
- package/app/components/content/prose/ProseH2.global.vue +58 -0
- package/app/components/content/prose/ProseH3.global.vue +58 -0
- package/app/components/content/prose/ProseH4.global.vue +58 -0
- package/app/components/content/prose/ProseH5.global.vue +47 -0
- package/app/components/content/prose/ProseH6.global.vue +47 -0
- package/app/components/content/prose/ProseHr.global.vue +33 -0
- package/app/components/content/prose/ProseIconList.global.vue +113 -0
- package/app/components/content/prose/ProseImg.global.vue +119 -0
- package/app/components/content/prose/ProseLead.global.vue +28 -0
- package/app/components/content/prose/ProseLi.global.vue +25 -0
- package/app/components/content/prose/ProseMermaid.global.vue +127 -0
- package/app/components/content/prose/ProseOl.global.vue +25 -0
- package/app/components/content/prose/ProseP.global.vue +25 -0
- package/app/components/content/prose/ProsePmInstall.global.vue +60 -0
- package/app/components/content/prose/ProsePmRun.global.vue +51 -0
- package/app/components/content/prose/ProsePmX.global.vue +56 -0
- package/app/components/content/prose/ProsePre.global.vue +181 -0
- package/app/components/content/prose/ProseShowCase.global.vue +56 -0
- package/app/components/content/prose/ProseSmartIcon.global.vue +54 -0
- package/app/components/content/prose/ProseStep.global.vue +22 -0
- package/app/components/content/prose/ProseSteps.global.vue +22 -0
- package/app/components/content/prose/ProseStrong.global.vue +34 -0
- package/app/components/content/prose/ProseTable.global.vue +34 -0
- package/app/components/content/prose/ProseTabs.global.vue +104 -0
- package/app/components/content/prose/ProseTabsInner.global.vue +274 -0
- package/app/components/content/prose/ProseTbody.global.vue +5 -0
- package/app/components/content/prose/ProseTd.global.vue +25 -0
- package/app/components/content/prose/ProseTh.global.vue +25 -0
- package/app/components/content/prose/ProseThead.global.vue +9 -0
- package/app/components/content/prose/ProseTr.global.vue +35 -0
- package/app/components/content/prose/ProseUl.global.vue +25 -0
- package/app/components/docs/DocsExtraStuff.vue +39 -0
- package/app/components/docs/DocsGithubLink.vue +11 -0
- package/app/components/docs/DocsHeader.vue +3 -0
- package/app/components/docs/DocsLogo.vue +74 -0
- package/app/components/docs/DocsMobileBar.vue +26 -0
- package/app/components/docs/DocsMobileNav.vue +49 -0
- package/app/components/docs/DocsNav.vue +161 -0
- package/app/components/docs/DocsPageTransition.vue +32 -0
- package/app/components/docs/DocsSearch.vue +220 -0
- package/app/components/docs/DocsSearchButton.vue +20 -0
- package/app/components/docs/DocsThemeCustomizer.vue +229 -0
- package/app/components/docs/DocsThemeToggler.vue +98 -0
- package/app/components/docs/DocsTocRail.vue +162 -0
- package/app/components/docs/DocsToclink.vue +52 -0
- package/app/components/docs/DocsZigZagRail.vue +70 -0
- package/app/components/landing/Hero.vue +222 -0
- package/app/components/page/PageFooter.vue +49 -0
- package/app/components/page/PageHeader.vue +68 -0
- package/app/components/page/PageHeaderLinks.vue +138 -0
- package/app/components/page/PageMobileToc.vue +162 -0
- package/app/components/page/PageToc.vue +33 -0
- package/app/composables/useDefaultSlotItems.ts +90 -0
- package/app/composables/useDocPage.ts +66 -0
- package/app/composables/useDocSearch.ts +23 -0
- package/app/composables/useDocd.ts +107 -0
- package/app/composables/useLogoAssets.ts +319 -0
- package/app/composables/usePm.ts +73 -0
- package/app/composables/useProseComponentMeta.ts +30 -0
- package/app/composables/useScrollspy.ts +327 -0
- package/app/composables/useSeo.ts +240 -0
- package/app/composables/useUIConfig.ts +36 -0
- package/app/layouts/default.vue +5 -0
- package/app/layouts/docs.vue +64 -0
- package/app/middleware/colorMode.global.ts +8 -0
- package/app/middleware/doc-page-layout.ts +11 -0
- package/app/middleware/landing-page-layout.ts +11 -0
- package/app/pages/[...slug].vue +63 -0
- package/app/plugins/mermaid.client.ts +35 -0
- package/app/plugins/navigation-direction.client.ts +15 -0
- package/app/plugins/theme-restore.client.ts +7 -0
- package/app/templates/landing.vue +40 -0
- package/app/transitions/presets.ts +71 -0
- package/app/types/prose-component-meta.d.ts +4 -0
- package/app/utils/og.ts +26 -0
- package/app/utils/prerender.ts +9 -0
- package/app/utils/translucent.ts +56 -0
- package/app/utils/tw-helper.ts +4 -0
- package/content.config.ts +81 -0
- package/index.d.ts +25 -0
- package/modules/config.ts +89 -0
- package/modules/custom-icons.ts +17 -0
- package/modules/markdown-rewrite.ts +96 -0
- package/modules/prose-component-meta.ts +150 -0
- package/modules/routing.ts +22 -0
- package/modules/skills/index.ts +167 -0
- package/modules/skills/runtime/server/routes/skills-files.ts +49 -0
- package/modules/skills/runtime/server/routes/skills-index.ts +8 -0
- package/nuxt.config.ts +96 -0
- package/nuxt.schema.ts +288 -0
- package/package.json +95 -0
- package/server/mcp/tools/get-page.ts +66 -0
- package/server/mcp/tools/list-pages.ts +61 -0
- package/server/routes/sitemap.xml.ts +73 -0
- package/server/utils/content.ts +3 -0
- package/tailwind.config.cjs +55 -0
- package/utils/component-api-content.ts +467 -0
- package/utils/component-api-discovery.ts +165 -0
- package/utils/component-api-schema.ts +28 -0
- package/utils/component-api.ts +243 -0
- package/utils/generate-prose-component-meta.ts +303 -0
- package/utils/git.ts +123 -0
- package/utils/meta.ts +40 -0
- package/utils/pages.ts +21 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Toaster
|
|
3
|
+
class="toaster group"
|
|
4
|
+
:visible-toasts="5"
|
|
5
|
+
close-button
|
|
6
|
+
:duration="7000"
|
|
7
|
+
:theme="$colorMode.value == 'dark' ? 'dark' : 'light'"
|
|
8
|
+
:style="{
|
|
9
|
+
'--normal-bg': 'var(--popover)',
|
|
10
|
+
'--normal-text': 'var(--popover-foreground)',
|
|
11
|
+
'--normal-border': 'var(--border)',
|
|
12
|
+
}"
|
|
13
|
+
:toast-options="{
|
|
14
|
+
class: 'items-start!',
|
|
15
|
+
classes: {
|
|
16
|
+
icon: 'mt-0.5',
|
|
17
|
+
toast:
|
|
18
|
+
'group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg',
|
|
19
|
+
description: 'group-[.toast]:text-muted-foreground',
|
|
20
|
+
actionButton: 'group-[.toast]:bg-primary group-[.toast]:text-primary-foreground',
|
|
21
|
+
cancelButton: 'group-[.toast]:bg-muted group-[.toast]:text-muted-foreground',
|
|
22
|
+
},
|
|
23
|
+
}"
|
|
24
|
+
/>
|
|
25
|
+
</template>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<TabsContent
|
|
3
|
+
data-slot="tabs-content"
|
|
4
|
+
v-bind="forwarded"
|
|
5
|
+
:class="styles({ class: normalizeClass(props.class) || undefined })"
|
|
6
|
+
>
|
|
7
|
+
<slot />
|
|
8
|
+
</TabsContent>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script lang="ts" setup>
|
|
12
|
+
import { TabsContent } from "reka-ui";
|
|
13
|
+
import type { TabsContentProps } from "reka-ui";
|
|
14
|
+
import { normalizeClass } from "vue";
|
|
15
|
+
import type { HTMLAttributes } from "vue";
|
|
16
|
+
|
|
17
|
+
const props = defineProps<
|
|
18
|
+
TabsContentProps & {
|
|
19
|
+
/** Custom class(es) to add to parent element */
|
|
20
|
+
class?: HTMLAttributes["class"];
|
|
21
|
+
}
|
|
22
|
+
>();
|
|
23
|
+
const forwarded = reactiveOmit(props, "class");
|
|
24
|
+
const styles = tv({
|
|
25
|
+
base: "flex-1 outline-none",
|
|
26
|
+
});
|
|
27
|
+
</script>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<ClientOnly>
|
|
3
|
+
<TabsIndicator
|
|
4
|
+
data-slot="tabs-indicator"
|
|
5
|
+
v-bind="{ ...forwarded, ...$attrs }"
|
|
6
|
+
:class="styles({ class: normalizeClass(props.class) || undefined })"
|
|
7
|
+
:style="{
|
|
8
|
+
width: 'var(--reka-tabs-indicator-size)',
|
|
9
|
+
transform: 'translateX(var(--reka-tabs-indicator-position))',
|
|
10
|
+
}"
|
|
11
|
+
>
|
|
12
|
+
<slot>
|
|
13
|
+
<div class="h-full w-full rounded-md bg-primary" />
|
|
14
|
+
</slot>
|
|
15
|
+
</TabsIndicator>
|
|
16
|
+
</ClientOnly>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script lang="ts" setup>
|
|
20
|
+
import { TabsIndicator } from "reka-ui";
|
|
21
|
+
import type { TabsIndicatorProps } from "reka-ui";
|
|
22
|
+
import { normalizeClass } from "vue";
|
|
23
|
+
import type { HTMLAttributes } from "vue";
|
|
24
|
+
|
|
25
|
+
defineOptions({ inheritAttrs: false });
|
|
26
|
+
|
|
27
|
+
const props = defineProps<
|
|
28
|
+
TabsIndicatorProps & {
|
|
29
|
+
/** Custom class(es) to add to parent element */
|
|
30
|
+
class?: HTMLAttributes["class"];
|
|
31
|
+
}
|
|
32
|
+
>();
|
|
33
|
+
const forwarded = reactiveOmit(props, "class");
|
|
34
|
+
const styles = tv({
|
|
35
|
+
base: "absolute bottom-0 left-0 h-[3px] rounded-full px-2 transition-[width,transform] duration-300",
|
|
36
|
+
});
|
|
37
|
+
</script>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<TabsList
|
|
3
|
+
data-slot="tabs-list"
|
|
4
|
+
:class="styles({ pill, class: normalizeClass(props.class) || undefined })"
|
|
5
|
+
v-bind="forwarded"
|
|
6
|
+
>
|
|
7
|
+
<slot />
|
|
8
|
+
</TabsList>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script lang="ts" setup>
|
|
12
|
+
import { TabsList } from "reka-ui";
|
|
13
|
+
import type { TabsListProps } from "reka-ui";
|
|
14
|
+
import { normalizeClass } from "vue";
|
|
15
|
+
import type { HTMLAttributes } from "vue";
|
|
16
|
+
|
|
17
|
+
const props = withDefaults(
|
|
18
|
+
defineProps<
|
|
19
|
+
TabsListProps & {
|
|
20
|
+
/** Custom class(es) to add to parent element */
|
|
21
|
+
class?: HTMLAttributes["class"];
|
|
22
|
+
pill?: boolean;
|
|
23
|
+
}
|
|
24
|
+
>(),
|
|
25
|
+
{ pill: true }
|
|
26
|
+
);
|
|
27
|
+
const forwarded = reactiveOmit(props, "class");
|
|
28
|
+
const styles = tv({
|
|
29
|
+
base: "inline-flex w-fit items-center justify-center rounded-md p-0.5 text-muted-foreground/70",
|
|
30
|
+
variants: {
|
|
31
|
+
pill: {
|
|
32
|
+
true: "bg-muted",
|
|
33
|
+
false: "",
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
</script>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<TabsRoot
|
|
3
|
+
data-slot="tabs"
|
|
4
|
+
v-bind="forwarded"
|
|
5
|
+
:class="styles({ class: normalizeClass(props.class) || undefined })"
|
|
6
|
+
>
|
|
7
|
+
<slot />
|
|
8
|
+
</TabsRoot>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script lang="ts" setup>
|
|
12
|
+
import { TabsRoot, useForwardPropsEmits } from "reka-ui";
|
|
13
|
+
import type { TabsRootEmits, TabsRootProps } from "reka-ui";
|
|
14
|
+
import { normalizeClass } from "vue";
|
|
15
|
+
import type { HTMLAttributes } from "vue";
|
|
16
|
+
|
|
17
|
+
const props = withDefaults(defineProps<TabsRootProps & { class?: HTMLAttributes["class"] }>(), {
|
|
18
|
+
orientation: "horizontal",
|
|
19
|
+
activationMode: "automatic",
|
|
20
|
+
});
|
|
21
|
+
const emits = defineEmits<TabsRootEmits>();
|
|
22
|
+
const forwarded = useForwardPropsEmits(reactiveOmit(props, "class"), emits);
|
|
23
|
+
|
|
24
|
+
const styles = tv({ base: "flex flex-col gap-2" });
|
|
25
|
+
</script>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<TabsTrigger
|
|
3
|
+
data-slot="tabs-trigger"
|
|
4
|
+
v-bind="forwarded"
|
|
5
|
+
:class="styles({ pill, class: normalizeClass(props.class) || undefined })"
|
|
6
|
+
>
|
|
7
|
+
<slot />
|
|
8
|
+
</TabsTrigger>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script lang="ts" setup>
|
|
12
|
+
import { TabsTrigger } from "reka-ui";
|
|
13
|
+
import type { TabsTriggerProps } from "reka-ui";
|
|
14
|
+
import { normalizeClass } from "vue";
|
|
15
|
+
import type { HTMLAttributes } from "vue";
|
|
16
|
+
|
|
17
|
+
const props = withDefaults(
|
|
18
|
+
defineProps<
|
|
19
|
+
TabsTriggerProps & {
|
|
20
|
+
/** Custom class(es) to add to parent element */
|
|
21
|
+
class?: HTMLAttributes["class"];
|
|
22
|
+
/** Whether the trigger should be pill-shaped */
|
|
23
|
+
pill?: boolean;
|
|
24
|
+
}
|
|
25
|
+
>(),
|
|
26
|
+
{
|
|
27
|
+
pill: true,
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
const forwarded = reactiveOmit(props, "class");
|
|
31
|
+
const styles = tv({
|
|
32
|
+
base: "inline-flex items-center justify-center rounded-sm px-3 py-1.5 text-sm font-medium whitespace-nowrap transition-all outline-none hover:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-xs [&_svg]:shrink-0",
|
|
33
|
+
variants: {
|
|
34
|
+
pill: {
|
|
35
|
+
true: "",
|
|
36
|
+
false:
|
|
37
|
+
"hover:text-foreground focus-visible:border-none focus-visible:ring-1 data-[state=active]:shadow-none",
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
</script>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<textarea
|
|
3
|
+
v-bind="props"
|
|
4
|
+
ref="textarea"
|
|
5
|
+
data-slot="textarea"
|
|
6
|
+
:value="modelValue"
|
|
7
|
+
:class="styles({ class: normalizeClass(props.class) || undefined })"
|
|
8
|
+
@input="handleInput"
|
|
9
|
+
/>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script lang="ts">
|
|
13
|
+
import { normalizeClass } from "vue";
|
|
14
|
+
import type { HTMLAttributes, TextareaHTMLAttributes } from "vue";
|
|
15
|
+
|
|
16
|
+
export type TextareaProps = {
|
|
17
|
+
/** Additional classes to add to the textarea */
|
|
18
|
+
class?: HTMLAttributes["class"];
|
|
19
|
+
/** The name of the textarea */
|
|
20
|
+
name?: TextareaHTMLAttributes["name"];
|
|
21
|
+
/** The id of the textarea */
|
|
22
|
+
id?: TextareaHTMLAttributes["id"];
|
|
23
|
+
/** The placeholder of the textarea */
|
|
24
|
+
placeholder?: TextareaHTMLAttributes["placeholder"];
|
|
25
|
+
/** Whether the textarea is required */
|
|
26
|
+
required?: boolean;
|
|
27
|
+
/** Whether the textarea is disabled */
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
/** The number of rows to display */
|
|
30
|
+
rows?: number;
|
|
31
|
+
/** The value of the textarea */
|
|
32
|
+
modelValue?: string;
|
|
33
|
+
/** The maximum number of characters allowed */
|
|
34
|
+
maxlength?: number;
|
|
35
|
+
/** The `RegExp` pattern of the textarea */
|
|
36
|
+
pattern?: string;
|
|
37
|
+
/** Whether the textarea should be focused when mounted. */
|
|
38
|
+
autofocus?: boolean;
|
|
39
|
+
};
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<script lang="ts" setup>
|
|
43
|
+
const props = withDefaults(defineProps<TextareaProps>(), {
|
|
44
|
+
modelValue: "",
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
const emit = defineEmits<{
|
|
48
|
+
"update:modelValue": [value: string];
|
|
49
|
+
}>();
|
|
50
|
+
|
|
51
|
+
const textarea = useTemplateRef("textarea");
|
|
52
|
+
|
|
53
|
+
const handleInput = (event: Event) => {
|
|
54
|
+
const target = event.target as HTMLTextAreaElement;
|
|
55
|
+
let value = target.value;
|
|
56
|
+
|
|
57
|
+
/* Validate input with pattern */
|
|
58
|
+
if (props.pattern) {
|
|
59
|
+
const regex = new RegExp(props.pattern);
|
|
60
|
+
value = Array.from(value)
|
|
61
|
+
.filter((char) => regex.test(char))
|
|
62
|
+
.join("");
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* Handle maxlength */
|
|
66
|
+
if (props.maxlength) {
|
|
67
|
+
value = value.slice(0, props.maxlength);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
target.value = value;
|
|
71
|
+
emit("update:modelValue", value);
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const styles = tv({
|
|
75
|
+
base: "flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
onMounted(() => {
|
|
79
|
+
if (props.autofocus) textarea.value?.focus();
|
|
80
|
+
});
|
|
81
|
+
</script>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<TooltipArrow
|
|
3
|
+
data-slot="tooltip-arrow"
|
|
4
|
+
v-bind="forwarded"
|
|
5
|
+
:class="styles({ class: normalizeClass(props.class) || undefined })"
|
|
6
|
+
/>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script lang="ts" setup>
|
|
10
|
+
import { TooltipArrow, useForwardProps } from "reka-ui";
|
|
11
|
+
import type { TooltipArrowProps } from "reka-ui";
|
|
12
|
+
import { normalizeClass } from "vue";
|
|
13
|
+
import type { HTMLAttributes } from "vue";
|
|
14
|
+
|
|
15
|
+
const props = withDefaults(
|
|
16
|
+
defineProps<
|
|
17
|
+
TooltipArrowProps & {
|
|
18
|
+
/** Additional classes for the tooltip arrow */
|
|
19
|
+
class?: HTMLAttributes["class"];
|
|
20
|
+
}
|
|
21
|
+
>(),
|
|
22
|
+
{
|
|
23
|
+
width: 12,
|
|
24
|
+
height: 6,
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
const styles = tv({ base: "fill-popover stroke-border" });
|
|
29
|
+
const forwarded = useForwardProps(reactiveOmit(props, "class"));
|
|
30
|
+
</script>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<UiTooltipPortal :to="to">
|
|
3
|
+
<TooltipContent
|
|
4
|
+
data-slot="tooltip-content"
|
|
5
|
+
v-bind="{ ...forwarded, ...$attrs }"
|
|
6
|
+
:class="styles({ class: normalizeClass(props.class) || undefined })"
|
|
7
|
+
>
|
|
8
|
+
<slot />
|
|
9
|
+
<slot name="arrow">
|
|
10
|
+
<UiTooltipArrow v-if="showArrow" />
|
|
11
|
+
</slot>
|
|
12
|
+
</TooltipContent>
|
|
13
|
+
</UiTooltipPortal>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script lang="ts" setup>
|
|
17
|
+
import { TooltipContent, useForwardPropsEmits } from "reka-ui";
|
|
18
|
+
import type { TooltipContentEmits, TooltipContentProps } from "reka-ui";
|
|
19
|
+
import { normalizeClass } from "vue";
|
|
20
|
+
import type { HTMLAttributes } from "vue";
|
|
21
|
+
|
|
22
|
+
defineOptions({ inheritAttrs: false });
|
|
23
|
+
|
|
24
|
+
const props = withDefaults(
|
|
25
|
+
defineProps<
|
|
26
|
+
TooltipContentProps & {
|
|
27
|
+
to?: string | HTMLElement;
|
|
28
|
+
class?: HTMLAttributes["class"];
|
|
29
|
+
showArrow?: boolean;
|
|
30
|
+
}
|
|
31
|
+
>(),
|
|
32
|
+
{
|
|
33
|
+
side: "top",
|
|
34
|
+
sideOffset: 4,
|
|
35
|
+
align: "center",
|
|
36
|
+
alignOffset: -4,
|
|
37
|
+
avoidCollisions: true,
|
|
38
|
+
collisionBoundary: () => [],
|
|
39
|
+
collisionPadding: 0,
|
|
40
|
+
sticky: "partial",
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
const emits = defineEmits<TooltipContentEmits>();
|
|
45
|
+
const forwarded = useForwardPropsEmits(reactiveOmit(props, "class", "to"), emits);
|
|
46
|
+
|
|
47
|
+
const styles = tv({
|
|
48
|
+
base: "relative z-50 max-w-70 animate-in rounded-md border bg-popover px-3 py-1.5 text-xs text-popover-foreground fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
49
|
+
});
|
|
50
|
+
</script>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<TooltipPortal data-slot="tooltip-portal" v-bind="props">
|
|
3
|
+
<slot />
|
|
4
|
+
</TooltipPortal>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script lang="ts" setup>
|
|
8
|
+
import { TooltipPortal } from "reka-ui";
|
|
9
|
+
import type { TooltipPortalProps } from "reka-ui";
|
|
10
|
+
|
|
11
|
+
const props = defineProps<TooltipPortalProps>();
|
|
12
|
+
</script>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<TooltipProvider data-slot="tooltip-provider" v-bind="props">
|
|
3
|
+
<slot />
|
|
4
|
+
</TooltipProvider>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script lang="ts" setup>
|
|
8
|
+
import { TooltipProvider } from "reka-ui";
|
|
9
|
+
import type { TooltipProviderProps } from "reka-ui";
|
|
10
|
+
|
|
11
|
+
const props = withDefaults(defineProps<TooltipProviderProps>(), {
|
|
12
|
+
delayDuration: 0,
|
|
13
|
+
});
|
|
14
|
+
</script>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<UiTooltipProvider v-bind="props">
|
|
3
|
+
<TooltipRoot v-slot="slotProps" data-slot="tooltip" v-bind="{ ...forwarded, ...$attrs }">
|
|
4
|
+
<slot v-bind="slotProps">
|
|
5
|
+
<slot v-bind="slotProps" name="trigger" />
|
|
6
|
+
<slot v-bind="slotProps" name="content" />
|
|
7
|
+
</slot>
|
|
8
|
+
</TooltipRoot>
|
|
9
|
+
</UiTooltipProvider>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script lang="ts" setup>
|
|
13
|
+
import { TooltipRoot, useForwardPropsEmits } from "reka-ui";
|
|
14
|
+
import type { TooltipProviderProps, TooltipRootEmits, TooltipRootProps } from "reka-ui";
|
|
15
|
+
|
|
16
|
+
defineOptions({ inheritAttrs: false });
|
|
17
|
+
|
|
18
|
+
const props = withDefaults(defineProps<TooltipRootProps & TooltipProviderProps>(), {
|
|
19
|
+
delayDuration: 0,
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const emits = defineEmits<TooltipRootEmits>();
|
|
23
|
+
|
|
24
|
+
const forwarded = useForwardPropsEmits(props, emits);
|
|
25
|
+
</script>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<TooltipTrigger data-slot="tooltip-trigger" v-bind="props">
|
|
3
|
+
<slot />
|
|
4
|
+
</TooltipTrigger>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script lang="ts" setup>
|
|
8
|
+
import { TooltipTrigger } from "reka-ui";
|
|
9
|
+
import type { TooltipTriggerProps } from "reka-ui";
|
|
10
|
+
|
|
11
|
+
const props = defineProps<TooltipTriggerProps>();
|
|
12
|
+
</script>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<TreeItem v-slot="slotProps" data-slot="tree-item" v-bind="forwarded">
|
|
3
|
+
<slot v-bind="slotProps" />
|
|
4
|
+
</TreeItem>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script lang="ts" setup generic="T extends Record<string, any>">
|
|
8
|
+
import { TreeItem, useForwardPropsEmits } from "reka-ui";
|
|
9
|
+
import type { TreeItemEmits, TreeItemProps } from "reka-ui";
|
|
10
|
+
|
|
11
|
+
const props = defineProps<TreeItemProps<T>>();
|
|
12
|
+
const emit = defineEmits<TreeItemEmits<T>>();
|
|
13
|
+
|
|
14
|
+
const forwarded = useForwardPropsEmits(props, emit);
|
|
15
|
+
</script>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<TreeRoot v-slot="slotProps" data-slot="tree" v-bind="forwarded">
|
|
3
|
+
<slot v-bind="slotProps" />
|
|
4
|
+
</TreeRoot>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script lang="ts" setup>
|
|
8
|
+
import { TreeRoot, useForwardPropsEmits } from "reka-ui";
|
|
9
|
+
import type { TreeRootEmits, TreeRootProps } from "reka-ui";
|
|
10
|
+
|
|
11
|
+
const props = defineProps<TreeRootProps>();
|
|
12
|
+
const emit = defineEmits<TreeRootEmits>();
|
|
13
|
+
|
|
14
|
+
const forwarded = useForwardPropsEmits(props, emit);
|
|
15
|
+
</script>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<TreeVirtualizer v-slot="slotProps" data-slot="tree-virtualizer" v-bind="forwarded">
|
|
3
|
+
<slot v-bind="slotProps" />
|
|
4
|
+
</TreeVirtualizer>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script lang="ts" setup>
|
|
8
|
+
import { TreeVirtualizer, useForwardPropsEmits } from "reka-ui";
|
|
9
|
+
import type { TreeVirtualizerProps } from "reka-ui";
|
|
10
|
+
|
|
11
|
+
const props = defineProps<TreeVirtualizerProps>();
|
|
12
|
+
const forwarded = useForwardPropsEmits(props);
|
|
13
|
+
</script>
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div v-if="items.length" class="not-prose">
|
|
3
|
+
<ProseFieldGroup v-if="layout === 'field'" variant="all">
|
|
4
|
+
<ProseField
|
|
5
|
+
v-for="item in items"
|
|
6
|
+
:key="item.name"
|
|
7
|
+
:name="item.name"
|
|
8
|
+
:type="itemType(item)"
|
|
9
|
+
:default-value="itemDefault(item)"
|
|
10
|
+
:required="itemRequired(item)"
|
|
11
|
+
>
|
|
12
|
+
<template #default>
|
|
13
|
+
<p v-if="item.description">{{ item.description }}</p>
|
|
14
|
+
<p v-else class="text-muted-foreground">No description provided.</p>
|
|
15
|
+
|
|
16
|
+
<div v-if="itemSignature(item)" class="mt-2 flex flex-wrap items-center gap-2 text-xs">
|
|
17
|
+
<span class="font-medium text-foreground">Signature</span>
|
|
18
|
+
<code class="rounded-md bg-muted px-1.5 py-0.5 font-mono text-[11px]">
|
|
19
|
+
{{ itemSignature(item) }}
|
|
20
|
+
</code>
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
23
|
+
</ProseField>
|
|
24
|
+
</ProseFieldGroup>
|
|
25
|
+
|
|
26
|
+
<ProseTable v-else>
|
|
27
|
+
<thead>
|
|
28
|
+
<tr class="border-b border-border text-left">
|
|
29
|
+
<th class="px-4 py-3 text-sm font-semibold text-foreground">Name</th>
|
|
30
|
+
<th class="px-4 py-3 text-sm font-semibold text-foreground">
|
|
31
|
+
{{ kind === "events" ? "Signature" : "Type" }}
|
|
32
|
+
</th>
|
|
33
|
+
<th v-if="kind === 'props'" class="px-4 py-3 text-sm font-semibold text-foreground">
|
|
34
|
+
Default
|
|
35
|
+
</th>
|
|
36
|
+
<th v-if="kind === 'props'" class="px-4 py-3 text-sm font-semibold text-foreground">
|
|
37
|
+
Required
|
|
38
|
+
</th>
|
|
39
|
+
<th class="px-4 py-3 text-sm font-semibold text-foreground">Description</th>
|
|
40
|
+
</tr>
|
|
41
|
+
</thead>
|
|
42
|
+
<tbody>
|
|
43
|
+
<tr v-for="item in items" :key="item.name" class="border-b border-border last:border-b-0">
|
|
44
|
+
<td class="px-4 py-3 align-top">
|
|
45
|
+
<code class="font-mono text-xs text-foreground">{{ item.name }}</code>
|
|
46
|
+
</td>
|
|
47
|
+
<td class="px-4 py-3 align-top">
|
|
48
|
+
<code class="font-mono text-xs text-foreground">
|
|
49
|
+
{{ kind === "events" ? itemSignature(item) : itemType(item) }}
|
|
50
|
+
</code>
|
|
51
|
+
</td>
|
|
52
|
+
<td v-if="kind === 'props'" class="px-4 py-3 align-top text-sm text-muted-foreground">
|
|
53
|
+
<code v-if="itemDefault(item)" class="font-mono text-xs text-foreground">
|
|
54
|
+
{{ itemDefault(item) }}
|
|
55
|
+
</code>
|
|
56
|
+
<span v-else>—</span>
|
|
57
|
+
</td>
|
|
58
|
+
<td v-if="kind === 'props'" class="px-4 py-3 align-top text-sm text-muted-foreground">
|
|
59
|
+
{{ itemRequired(item) ? "Yes" : "No" }}
|
|
60
|
+
</td>
|
|
61
|
+
<td class="px-4 py-3 align-top text-sm text-muted-foreground">
|
|
62
|
+
{{ item.description || "No description provided." }}
|
|
63
|
+
</td>
|
|
64
|
+
</tr>
|
|
65
|
+
</tbody>
|
|
66
|
+
</ProseTable>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
<p v-else class="not-prose text-sm text-muted-foreground">No {{ emptyLabel }} documented.</p>
|
|
70
|
+
</template>
|
|
71
|
+
|
|
72
|
+
<script lang="ts">
|
|
73
|
+
import type { ComponentApiSectionKind } from "../../../utils/component-api";
|
|
74
|
+
import type {
|
|
75
|
+
ProseComponentApiLayout,
|
|
76
|
+
ProseComponentMetaEvent,
|
|
77
|
+
ProseComponentMetaExposed,
|
|
78
|
+
ProseComponentMetaProp,
|
|
79
|
+
ProseComponentMetaSlot,
|
|
80
|
+
} from "../../../utils/generate-prose-component-meta";
|
|
81
|
+
export type ComponentApiSectionItem =
|
|
82
|
+
| ProseComponentMetaProp
|
|
83
|
+
| ProseComponentMetaSlot
|
|
84
|
+
| ProseComponentMetaEvent
|
|
85
|
+
| ProseComponentMetaExposed;
|
|
86
|
+
|
|
87
|
+
export type ComponentApiSectionProps = {
|
|
88
|
+
kind: ComponentApiSectionKind;
|
|
89
|
+
items: ComponentApiSectionItem[];
|
|
90
|
+
layout?: ProseComponentApiLayout;
|
|
91
|
+
};
|
|
92
|
+
</script>
|
|
93
|
+
|
|
94
|
+
<script lang="ts" setup>
|
|
95
|
+
const props = withDefaults(defineProps<ComponentApiSectionProps>(), {
|
|
96
|
+
layout: "field",
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
function isPropItem(item: ComponentApiSectionItem): item is ProseComponentMetaProp {
|
|
100
|
+
return "required" in item;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function isEventItem(item: ComponentApiSectionItem): item is ProseComponentMetaEvent {
|
|
104
|
+
return "signature" in item;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function itemType(item: ComponentApiSectionItem) {
|
|
108
|
+
return item.type || "unknown";
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function itemDefault(item: ComponentApiSectionItem) {
|
|
112
|
+
return isPropItem(item) ? item.default : undefined;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function itemRequired(item: ComponentApiSectionItem) {
|
|
116
|
+
return isPropItem(item) ? item.required : false;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function itemSignature(item: ComponentApiSectionItem) {
|
|
120
|
+
return isEventItem(item) ? item.signature : "";
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
const emptyLabel = computed(() => {
|
|
124
|
+
switch (props.kind) {
|
|
125
|
+
case "props":
|
|
126
|
+
return "props";
|
|
127
|
+
case "slots":
|
|
128
|
+
return "slots";
|
|
129
|
+
case "events":
|
|
130
|
+
return "events";
|
|
131
|
+
case "exposed":
|
|
132
|
+
return "exposed members";
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
</script>
|