@lupinum/ginko-docs 0.2.2 → 0.2.3

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.
Files changed (196) hide show
  1. package/README.md +130 -73
  2. package/app/app.config.ts +14 -12
  3. package/app/app.vue +2 -2
  4. package/app/assets/css/prose.css +2203 -149
  5. package/app/assets/css/tailwind.css +60 -38
  6. package/app/assets/css/theme-palettes.css +309 -0
  7. package/app/components/content/DocumentPageShell.vue +1 -1
  8. package/app/components/content/Feedback.vue +12 -11
  9. package/app/components/content/ImageZoomDialog.vue +84 -0
  10. package/app/components/content/PageMarkdownCopy.vue +2 -0
  11. package/app/components/content/imageZoom.ts +25 -0
  12. package/app/components/mdc/MdcAccordion.vue +6 -3
  13. package/app/components/mdc/MdcAccordionItem.vue +7 -16
  14. package/app/components/mdc/MdcApi.vue +159 -0
  15. package/app/components/mdc/MdcAside.vue +6 -10
  16. package/app/components/mdc/MdcCallout.vue +9 -10
  17. package/app/components/mdc/MdcCard.vue +36 -47
  18. package/app/components/mdc/MdcCards.vue +30 -0
  19. package/app/components/mdc/MdcCodeGroup.vue +4 -0
  20. package/app/components/mdc/MdcCodeTree.vue +234 -0
  21. package/app/components/mdc/MdcCollapse.vue +61 -0
  22. package/app/components/mdc/MdcError.vue +8 -1
  23. package/app/components/mdc/MdcExcerpt.vue +26 -0
  24. package/app/components/mdc/MdcFigure.vue +54 -20
  25. package/app/components/mdc/MdcFiles.vue +120 -0
  26. package/app/components/mdc/MdcIdea.vue +2 -1
  27. package/app/components/mdc/MdcInfo.vue +2 -1
  28. package/app/components/mdc/MdcInlineToc.vue +51 -0
  29. package/app/components/{ui/dialog/DialogHeader.vue → mdc/MdcKbd.vue} +2 -4
  30. package/app/components/mdc/MdcNote.vue +2 -1
  31. package/app/components/mdc/MdcQuiz.vue +43 -83
  32. package/app/components/mdc/MdcQuizQuestion.vue +104 -109
  33. package/app/components/mdc/MdcReadMore.vue +57 -77
  34. package/app/components/mdc/MdcSteps.vue +45 -11
  35. package/app/components/mdc/MdcSuccess.vue +8 -1
  36. package/app/components/mdc/MdcTabs.vue +44 -26
  37. package/app/components/mdc/MdcTimeline.vue +4 -1
  38. package/app/components/mdc/MdcTimelineItem.vue +18 -27
  39. package/app/components/mdc/MdcWarning.vue +8 -1
  40. package/app/components/mdc/api.utils.ts +132 -0
  41. package/app/components/mdc/code-tree.utils.ts +22 -0
  42. package/app/components/mdc/quiz.utils.ts +38 -0
  43. package/app/components/prose/ProseBlockquote.vue +17 -1
  44. package/app/components/prose/ProseH1.vue +1 -1
  45. package/app/components/prose/ProseH2.vue +7 -2
  46. package/app/components/prose/ProseH3.vue +7 -2
  47. package/app/components/prose/ProseH4.vue +17 -2
  48. package/app/components/{ui/kbd/KbdGroup.vue → prose/ProseH5.vue} +4 -3
  49. package/app/components/{ui/card/CardTitle.vue → prose/ProseH6.vue} +4 -3
  50. package/app/components/prose/ProseImg.vue +19 -112
  51. package/app/components/prose/ProsePre.vue +63 -100
  52. package/app/components/prose/ProseTable.vue +5 -3
  53. package/app/components/site/ModeToggle.vue +12 -3
  54. package/app/components/site/SiteBanner.vue +43 -2
  55. package/app/components/site/SiteFooter.vue +3 -5
  56. package/app/components/site/SiteHeader.vue +255 -132
  57. package/app/components/site/SiteHeroCode.vue +164 -0
  58. package/app/components/site/SiteLocaleSwitcher.vue +22 -4
  59. package/app/components/ui/badge/Badge.vue +1 -1
  60. package/app/components/ui/button/Button.vue +1 -1
  61. package/app/components/ui/collapsible/CollapsibleContent.vue +1 -1
  62. package/app/components/ui/dropdown-menu/DropdownMenuContent.vue +14 -4
  63. package/app/components/ui/dropdown-menu/DropdownMenuItem.vue +1 -1
  64. package/app/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +1 -1
  65. package/app/components/ui/dropdown-menu/DropdownMenuSeparator.vue +1 -1
  66. package/app/components/ui/dropdown-menu/index.ts +0 -9
  67. package/app/components/ui/kbd/Kbd.vue +1 -1
  68. package/app/components/ui/kbd/index.ts +0 -1
  69. package/app/components/ui/scroll-area/ScrollArea.vue +1 -1
  70. package/app/components/ui/scroll-area/ScrollBar.vue +1 -1
  71. package/app/components/ui/separator/Separator.vue +1 -1
  72. package/app/components/ui/sheet/SheetContent.vue +1 -1
  73. package/app/components/ui/sheet/SheetDescription.vue +1 -1
  74. package/app/components/ui/sheet/SheetOverlay.vue +1 -1
  75. package/app/components/ui/sheet/SheetTitle.vue +1 -1
  76. package/app/components/ui/sheet/index.ts +0 -3
  77. package/app/components/ui/tabs/Tabs.vue +1 -1
  78. package/app/components/ui/tabs/TabsList.vue +1 -1
  79. package/app/components/ui/tabs/TabsTrigger.vue +1 -1
  80. package/app/components/ui/tabs/index.ts +0 -1
  81. package/app/composables/site-navigation.utils.ts +29 -11
  82. package/app/composables/useContentRouteAlternates.ts +13 -21
  83. package/app/composables/useLocalizedRouteSwitch.ts +1 -1
  84. package/app/composables/useMetaKey.ts +18 -0
  85. package/app/composables/useProseAppearance.ts +24 -0
  86. package/app/composables/useSiteNavigation.ts +3 -18
  87. package/app/config/site.utils.ts +1 -1
  88. package/app/error.vue +1 -5
  89. package/app/features/docs/components/DocsBreadcrumb.vue +37 -0
  90. package/app/features/docs/components/DocsContributeLinks.vue +28 -18
  91. package/app/features/docs/components/DocsMobileToc.vue +12 -8
  92. package/app/features/docs/components/DocsPageContent.vue +84 -47
  93. package/app/features/docs/components/DocsPageNav.vue +1 -1
  94. package/app/features/docs/components/DocsSidebar.vue +30 -20
  95. package/app/features/docs/components/DocsSidebarItem.vue +53 -100
  96. package/app/features/docs/components/DocsSidebarRow.vue +27 -0
  97. package/app/features/docs/components/DocsSidebarTabs.vue +46 -22
  98. package/app/features/docs/components/DocsToc.vue +80 -34
  99. package/app/features/docs/composables/useDocsNavigation.ts +2 -2
  100. package/app/features/docs/composables/useDocsNavigationData.ts +4 -1
  101. package/app/features/docs/composables/useRevealActive.ts +58 -0
  102. package/app/features/docs/composables/useScrollspy.ts +87 -19
  103. package/app/features/docs/docs-navigation.ts +17 -30
  104. package/app/features/docs/toc-context.ts +6 -0
  105. package/app/features/search/command-center.ts +11 -90
  106. package/app/features/search/components/SiteCommandCenter.vue +58 -38
  107. package/app/features/search/useCommandCenter.ts +46 -46
  108. package/app/layouts/docs.vue +1 -1
  109. package/app/lib/errors.ts +2 -49
  110. package/app/pages/blog/[slug].vue +16 -8
  111. package/app/pages/blog/index.vue +26 -13
  112. package/app/pages/docs/index.vue +10 -14
  113. package/app/pages/index.vue +174 -59
  114. package/app/plugins/ginko-docs-theme.ts +12 -0
  115. package/app/utils/content.ts +11 -0
  116. package/app/utils/file-icons.ts +90 -0
  117. package/app/utils/index.ts +7 -1
  118. package/app/utils/repository.ts +20 -0
  119. package/content.js +23 -26
  120. package/content.ts +30 -28
  121. package/i18n/messages/global/blog.ts +4 -0
  122. package/i18n/messages/global/command.ts +6 -2
  123. package/i18n/messages/global/docs.ts +3 -0
  124. package/i18n/messages/global/nav.ts +6 -2
  125. package/i18n/messages/index.ts +3 -3
  126. package/icon-bundle.ts +5 -0
  127. package/index.d.ts +7 -1
  128. package/nuxt.config.ts +2 -2
  129. package/package.json +9 -6
  130. package/runtime/server/agent-markdown.ts +0 -2
  131. package/shared/theme-palettes.ts +37 -0
  132. package/shared/types/app-config.ts +63 -6
  133. package/tags.ts +47 -59
  134. package/app/components/mdc/MdcAlert.vue +0 -34
  135. package/app/components/mdc/MdcCardGroup.vue +0 -47
  136. package/app/components/mdc/MdcDocImg.vue +0 -25
  137. package/app/components/mdc/MdcField.vue +0 -62
  138. package/app/components/mdc/MdcFieldGroup.vue +0 -18
  139. package/app/components/mdc/MdcPassage.vue +0 -32
  140. package/app/components/mdc/MdcQuizOption.vue +0 -91
  141. package/app/components/mdc/MdcReadMoreGroup.vue +0 -18
  142. package/app/components/mdc/MdcShortcut.vue +0 -46
  143. package/app/components/mdc/MdcStep.vue +0 -42
  144. package/app/components/ui/accordion/Accordion.vue +0 -15
  145. package/app/components/ui/accordion/AccordionContent.vue +0 -23
  146. package/app/components/ui/accordion/AccordionItem.vue +0 -24
  147. package/app/components/ui/accordion/AccordionTrigger.vue +0 -35
  148. package/app/components/ui/accordion/index.ts +0 -4
  149. package/app/components/ui/alert/Alert.vue +0 -21
  150. package/app/components/ui/alert/AlertDescription.vue +0 -22
  151. package/app/components/ui/alert/AlertTitle.vue +0 -22
  152. package/app/components/ui/alert/index.ts +0 -34
  153. package/app/components/ui/card/Card.vue +0 -16
  154. package/app/components/ui/card/CardAction.vue +0 -17
  155. package/app/components/ui/card/CardContent.vue +0 -14
  156. package/app/components/ui/card/CardDescription.vue +0 -14
  157. package/app/components/ui/card/CardFooter.vue +0 -14
  158. package/app/components/ui/card/CardHeader.vue +0 -22
  159. package/app/components/ui/card/card-variants.ts +0 -15
  160. package/app/components/ui/card/index.ts +0 -8
  161. package/app/components/ui/checkbox/Checkbox.vue +0 -35
  162. package/app/components/ui/checkbox/index.ts +0 -1
  163. package/app/components/ui/dialog/Dialog.vue +0 -15
  164. package/app/components/ui/dialog/DialogClose.vue +0 -12
  165. package/app/components/ui/dialog/DialogContent.vue +0 -69
  166. package/app/components/ui/dialog/DialogDescription.vue +0 -21
  167. package/app/components/ui/dialog/DialogFooter.vue +0 -15
  168. package/app/components/ui/dialog/DialogOverlay.vue +0 -26
  169. package/app/components/ui/dialog/DialogPortal.vue +0 -12
  170. package/app/components/ui/dialog/DialogTitle.vue +0 -21
  171. package/app/components/ui/dialog/DialogTrigger.vue +0 -12
  172. package/app/components/ui/dialog/index.ts +0 -10
  173. package/app/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +0 -36
  174. package/app/components/ui/dropdown-menu/DropdownMenuGroup.vue +0 -12
  175. package/app/components/ui/dropdown-menu/DropdownMenuLabel.vue +0 -25
  176. package/app/components/ui/dropdown-menu/DropdownMenuShortcut.vue +0 -17
  177. package/app/components/ui/dropdown-menu/DropdownMenuSub.vue +0 -15
  178. package/app/components/ui/dropdown-menu/DropdownMenuSubContent.vue +0 -29
  179. package/app/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +0 -31
  180. package/app/components/ui/input/Input.vue +0 -23
  181. package/app/components/ui/input/index.ts +0 -1
  182. package/app/components/ui/label/Label.vue +0 -14
  183. package/app/components/ui/label/index.ts +0 -1
  184. package/app/components/ui/sheet/SheetClose.vue +0 -12
  185. package/app/components/ui/sheet/SheetFooter.vue +0 -12
  186. package/app/components/ui/sheet/SheetHeader.vue +0 -12
  187. package/app/components/ui/switch/Switch.vue +0 -39
  188. package/app/components/ui/switch/index.ts +0 -1
  189. package/app/components/ui/tabs/TabsContent.vue +0 -21
  190. package/app/components/ui/textarea/Textarea.vue +0 -31
  191. package/app/components/ui/textarea/index.ts +0 -1
  192. package/app/features/docs/composables/useDocsEntryPath.ts +0 -13
  193. package/app/lib/utils.ts +0 -7
  194. package/i18n/messages/source.ts +0 -5
  195. package/runtime/markdown/inline-code-highlight.ts +0 -155
  196. package/runtime/utils.ts +0 -7
@@ -1,25 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed } from "vue";
3
-
4
- /**
5
- * Wrap standalone `![alt](url)` lines in markdown with this block so Comark can
6
- * keep the image outside paragraph wrappers.
7
- * Avoids invalid `<p><figure>...</figure></p>` and hydration mismatches.
8
- *
9
- * @example
10
- * ::doc-img
11
- * ![Alt text](https://shadcn-starter.ginko-content.dev/images/example.jpg)
12
- * ::
13
- */
14
- const props = withDefaults(defineProps<{ bleed?: boolean | string }>(), { bleed: undefined });
15
-
16
- const shouldBleed = computed(
17
- () => props.bleed === true || props.bleed === "true" || props.bleed === "outside",
18
- );
19
- </script>
20
-
21
- <template>
22
- <div class="content-doc-img" :data-bleed="shouldBleed ? 'true' : undefined">
23
- <slot unwrap="p" />
24
- </div>
25
- </template>
@@ -1,62 +0,0 @@
1
- <script setup lang="ts">
2
- import { inject } from "vue";
3
-
4
- const MDC_FIELD_GROUP = Symbol.for("mdc.fieldGroup");
5
- const inFieldGroup = inject(MDC_FIELD_GROUP, false);
6
-
7
- defineProps<{
8
- name: string;
9
- type?: string;
10
- required?: boolean;
11
- description?: string;
12
- defaultValue?: string;
13
- }>();
14
- </script>
15
-
16
- <template>
17
- <div
18
- data-slot="card"
19
- :class="
20
- inFieldGroup
21
- ? 'not-prose flex flex-col gap-0 rounded-none border-0 bg-transparent py-0 text-card-foreground shadow-none ring-0 outline-none'
22
- : 'not-prose my-4 flex flex-col gap-0 rounded-xl border bg-card py-0 text-card-foreground shadow-xs'
23
- "
24
- >
25
- <div data-slot="card-content" class="space-y-4 px-6 py-6">
26
- <div class="flex flex-col gap-3 sm:flex-row sm:items-center">
27
- <div class="flex flex-wrap items-center gap-2">
28
- <code class="relative rounded-md bg-muted px-1 font-sans font-normal text-foreground">
29
- {{ name }}
30
- </code>
31
-
32
- <span
33
- v-if="required"
34
- class="inline-flex items-center rounded-full border border-transparent bg-secondary px-2.5 py-0.5 text-xs font-semibold text-secondary-foreground"
35
- >
36
- Required
37
- </span>
38
- </div>
39
-
40
- <span v-if="type" class="font-mono text-sm text-muted-foreground sm:ml-auto">
41
- {{ type }}
42
- </span>
43
- </div>
44
-
45
- <div class="content-prose content-prose-trim text-muted-foreground">
46
- <slot v-if="$slots.default" unwrap="p" />
47
- <span v-else-if="description">{{ description }}</span>
48
- </div>
49
- </div>
50
-
51
- <div
52
- v-if="defaultValue"
53
- data-slot="card-footer"
54
- class="flex flex-wrap items-center gap-2 border-t border-border pb-6 text-sm"
55
- >
56
- <span class="font-medium text-foreground">Default:</span>
57
- <code class="relative rounded-md bg-muted px-1 font-sans font-normal text-muted-foreground">
58
- {{ defaultValue }}
59
- </code>
60
- </div>
61
- </div>
62
- </template>
@@ -1,18 +0,0 @@
1
- <script setup lang="ts">
2
- import { provide } from "vue";
3
-
4
- const MDC_FIELD_GROUP = Symbol.for("mdc.fieldGroup");
5
-
6
- provide(MDC_FIELD_GROUP, true);
7
- </script>
8
-
9
- <template>
10
- <div
11
- data-slot="card"
12
- class="not-prose my-4 flex flex-col gap-0 overflow-hidden rounded-xl border bg-card py-0 text-card-foreground shadow-xs"
13
- >
14
- <div class="flex flex-col divide-y divide-border">
15
- <slot />
16
- </div>
17
- </div>
18
- </template>
@@ -1,32 +0,0 @@
1
- <script setup lang="ts">
2
- import type { HTMLAttributes } from "vue";
3
- import { cn } from "../../utils";
4
-
5
- const props = defineProps<{
6
- /** Short label above the block (e.g. excerpt, chapter). */
7
- label?: string;
8
- class?: HTMLAttributes["class"];
9
- }>();
10
- </script>
11
-
12
- <template>
13
- <aside class="not-prose my-4">
14
- <div
15
- data-slot="card"
16
- :class="
17
- cn(
18
- 'content-prose content-prose-trim gap-0 rounded-xl border border-border bg-muted/40 px-4 py-3 text-muted-foreground shadow-xs',
19
- props.class,
20
- )
21
- "
22
- >
23
- <p
24
- v-if="label"
25
- class="mb-3 text-xs font-medium tracking-wider text-muted-foreground uppercase"
26
- >
27
- {{ label }}
28
- </p>
29
- <slot />
30
- </div>
31
- </aside>
32
- </template>
@@ -1,91 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed } from "vue";
3
- import { cn } from "../../utils";
4
-
5
- const props = withDefaults(
6
- defineProps<{
7
- correct?: boolean;
8
- selected?: boolean;
9
- disabled?: boolean;
10
- showResult?: boolean;
11
- optionIndex?: number;
12
- label?: string;
13
- }>(),
14
- {
15
- correct: false,
16
- selected: false,
17
- disabled: false,
18
- showResult: false,
19
- optionIndex: 0,
20
- },
21
- );
22
-
23
- const emit = defineEmits<{
24
- select: [];
25
- }>();
26
-
27
- const letter = computed(() => String.fromCharCode(65 + props.optionIndex));
28
-
29
- const stateClass = computed(() => {
30
- if (props.showResult && props.correct) {
31
- return "border-success bg-success/10 text-foreground";
32
- }
33
- if (props.showResult && props.selected && !props.correct) {
34
- return "border-destructive bg-destructive/10 text-foreground";
35
- }
36
- if (props.selected) {
37
- return "border-primary bg-primary/5 ring-2 ring-primary/20";
38
- }
39
- return "";
40
- });
41
-
42
- const iconName = computed(() => {
43
- if (!props.showResult) return null;
44
- if (props.correct) return "lucide:circle-check";
45
- if (props.selected) return "lucide:circle-x";
46
- return null;
47
- });
48
- </script>
49
-
50
- <template>
51
- <button
52
- type="button"
53
- :disabled="disabled"
54
- :class="
55
- cn(
56
- 'flex w-full items-center gap-3 rounded-lg border bg-background px-4 py-3 text-left text-sm transition-all',
57
- !disabled && !showResult && 'cursor-pointer hover:bg-accent/50',
58
- disabled && 'cursor-default',
59
- stateClass,
60
- )
61
- "
62
- @click="!disabled && emit('select')"
63
- >
64
- <span
65
- :class="
66
- cn(
67
- 'flex size-6 shrink-0 items-center justify-center rounded-md text-xs font-semibold',
68
- selected && !showResult && 'bg-primary text-primary-foreground',
69
- showResult && correct && 'bg-success text-success-foreground',
70
- showResult && selected && !correct && 'bg-destructive text-destructive-foreground',
71
- !selected && !showResult && 'bg-muted text-muted-foreground',
72
- showResult && !correct && !selected && 'bg-muted text-muted-foreground',
73
- )
74
- "
75
- >
76
- {{ letter }}
77
- </span>
78
- <span class="min-w-0 flex-1">
79
- <template v-if="label">{{ label }}</template>
80
- <slot v-else />
81
- </span>
82
- <Icon
83
- v-if="iconName"
84
- :name="iconName"
85
- :class="
86
- cn('size-4 shrink-0', correct && 'text-success', selected && !correct && 'text-destructive')
87
- "
88
- aria-hidden="true"
89
- />
90
- </button>
91
- </template>
@@ -1,18 +0,0 @@
1
- <script setup lang="ts">
2
- import { provide } from "vue";
3
-
4
- const MDC_READ_MORE_GROUP = Symbol.for("mdc.readMoreGroup");
5
-
6
- provide(MDC_READ_MORE_GROUP, true);
7
- </script>
8
-
9
- <template>
10
- <div
11
- data-slot="card"
12
- class="not-prose my-6 gap-0 overflow-hidden rounded-xl border bg-card py-0 text-card-foreground shadow-xs transition-colors hover:border-foreground/20"
13
- >
14
- <div class="flex flex-col divide-y divide-border">
15
- <slot />
16
- </div>
17
- </div>
18
- </template>
@@ -1,46 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed, onMounted, ref } from "vue";
3
- import type { HTMLAttributes } from "vue";
4
- import { cn } from "../../utils";
5
-
6
- interface Props {
7
- value?: string;
8
- size?: "sm" | "md";
9
- class?: HTMLAttributes["class"];
10
- }
11
-
12
- const props = withDefaults(defineProps<Props>(), {
13
- size: "md",
14
- });
15
-
16
- const metaSymbol = ref("Ctrl");
17
-
18
- // Safe from Nuxt SSR because onMounted only fires on the client
19
- onMounted(() => {
20
- if (typeof navigator !== "undefined" && navigator.userAgent.includes("Macintosh")) {
21
- metaSymbol.value = "⌘";
22
- }
23
- });
24
-
25
- const resolvedValue = computed(() => {
26
- if (props.value === "meta") return metaSymbol.value;
27
- return props.value;
28
- });
29
- </script>
30
-
31
- <template>
32
- <kbd
33
- :class="
34
- cn(
35
- 'pointer-events-none inline-flex w-fit items-center justify-center gap-1 rounded-sm bg-muted font-sans font-medium text-muted-foreground ring-1 ring-border select-none [&_svg:not([class*=size-])]:size-3',
36
- size === 'md' ? 'h-7 min-w-7 px-1.5 text-sm' : 'h-5 min-w-5 px-1 text-xs',
37
- props.class,
38
- )
39
- "
40
- >
41
- <!-- Provide a slot so users can inject custom icons instead of strings if needed -->
42
- <slot>
43
- {{ resolvedValue }}
44
- </slot>
45
- </kbd>
46
- </template>
@@ -1,42 +0,0 @@
1
- <script setup lang="ts">
2
- import type { ComputedRef, HTMLAttributes } from "vue";
3
- import { computed, inject } from "vue";
4
- import { cn } from "../../utils";
5
- import { resolveIconifyIcon } from "./icons";
6
-
7
- type StepsVariant = "icons" | "numbered";
8
-
9
- const props = defineProps<{
10
- title?: string;
11
- icon?: string;
12
- class?: HTMLAttributes["class"];
13
- }>();
14
-
15
- const stepsVariant = inject<ComputedRef<StepsVariant>>(
16
- "mdcStepsVariant",
17
- computed(() => "icons"),
18
- );
19
-
20
- const isNumbered = computed(() => stepsVariant.value === "numbered");
21
-
22
- const iconName = computed(() => {
23
- const icon = props.icon?.trim();
24
- if (!icon) return "lucide:circle";
25
- return resolveIconifyIcon(icon) ?? "lucide:circle";
26
- });
27
- </script>
28
-
29
- <template>
30
- <div :class="cn('content-step', props.class)">
31
- <div class="content-step-marker" aria-hidden="true">
32
- <Icon v-if="!isNumbered" :name="iconName" class="size-3.5" />
33
- </div>
34
-
35
- <div class="content-step-body content-prose content-prose-trim">
36
- <p v-if="title" class="content-step-title">
37
- {{ title }}
38
- </p>
39
- <slot />
40
- </div>
41
- </div>
42
- </template>
@@ -1,15 +0,0 @@
1
- <script setup lang="ts">
2
- import type { AccordionRootEmits, AccordionRootProps } from "reka-ui";
3
- import { AccordionRoot, useForwardPropsEmits } from "reka-ui";
4
-
5
- const props = defineProps<AccordionRootProps>();
6
- const emits = defineEmits<AccordionRootEmits>();
7
-
8
- const forwarded = useForwardPropsEmits(props, emits);
9
- </script>
10
-
11
- <template>
12
- <AccordionRoot v-slot="slotProps" data-slot="accordion" v-bind="forwarded">
13
- <slot v-bind="slotProps" />
14
- </AccordionRoot>
15
- </template>
@@ -1,23 +0,0 @@
1
- <script setup lang="ts">
2
- import type { AccordionContentProps } from "reka-ui";
3
- import type { HTMLAttributes } from "vue";
4
- import { reactiveOmit } from "@vueuse/core";
5
- import { AccordionContent } from "reka-ui";
6
- import { cn } from "#ginko-docs/lib/utils";
7
-
8
- const props = defineProps<AccordionContentProps & { class?: HTMLAttributes["class"] }>();
9
-
10
- const delegatedProps = reactiveOmit(props, "class");
11
- </script>
12
-
13
- <template>
14
- <AccordionContent
15
- data-slot="accordion-content"
16
- v-bind="delegatedProps"
17
- class="accordion-content overflow-hidden text-sm"
18
- >
19
- <div :class="cn('pt-0 pb-4', props.class)">
20
- <slot />
21
- </div>
22
- </AccordionContent>
23
- </template>
@@ -1,24 +0,0 @@
1
- <script setup lang="ts">
2
- import type { AccordionItemProps } from "reka-ui";
3
- import type { HTMLAttributes } from "vue";
4
- import { reactiveOmit } from "@vueuse/core";
5
- import { AccordionItem, useForwardProps } from "reka-ui";
6
- import { cn } from "#ginko-docs/lib/utils";
7
-
8
- const props = defineProps<AccordionItemProps & { class?: HTMLAttributes["class"] }>();
9
-
10
- const delegatedProps = reactiveOmit(props, "class");
11
-
12
- const forwardedProps = useForwardProps(delegatedProps);
13
- </script>
14
-
15
- <template>
16
- <AccordionItem
17
- v-slot="slotProps"
18
- data-slot="accordion-item"
19
- v-bind="forwardedProps"
20
- :class="cn('border-b last:border-b-0', props.class)"
21
- >
22
- <slot v-bind="slotProps" />
23
- </AccordionItem>
24
- </template>
@@ -1,35 +0,0 @@
1
- <script setup lang="ts">
2
- import type { AccordionTriggerProps } from "reka-ui";
3
- import type { HTMLAttributes } from "vue";
4
- import { reactiveOmit } from "@vueuse/core";
5
- import { AccordionHeader, AccordionTrigger } from "reka-ui";
6
- import { cn } from "#ginko-docs/lib/utils";
7
-
8
- const props = defineProps<AccordionTriggerProps & { class?: HTMLAttributes["class"] }>();
9
-
10
- const delegatedProps = reactiveOmit(props, "class");
11
- </script>
12
-
13
- <template>
14
- <AccordionHeader class="flex">
15
- <AccordionTrigger
16
- data-slot="accordion-trigger"
17
- v-bind="delegatedProps"
18
- :class="
19
- cn(
20
- 'flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180',
21
- props.class,
22
- )
23
- "
24
- >
25
- <slot />
26
- <slot name="icon">
27
- <Icon
28
- name="lucide:chevron-down"
29
- class="pointer-events-none size-4 shrink-0 translate-y-0.5 text-muted-foreground transition-transform duration-200"
30
- aria-hidden="true"
31
- />
32
- </slot>
33
- </AccordionTrigger>
34
- </AccordionHeader>
35
- </template>
@@ -1,4 +0,0 @@
1
- export { default as Accordion } from "./Accordion.vue";
2
- export { default as AccordionContent } from "./AccordionContent.vue";
3
- export { default as AccordionItem } from "./AccordionItem.vue";
4
- export { default as AccordionTrigger } from "./AccordionTrigger.vue";
@@ -1,21 +0,0 @@
1
- <script setup lang="ts">
2
- import type { HTMLAttributes } from "vue";
3
- import type { AlertVariants } from ".";
4
- import { cn } from "#ginko-docs/lib/utils";
5
- import { alertVariants } from ".";
6
-
7
- const props = defineProps<{
8
- class?: HTMLAttributes["class"];
9
- variant?: AlertVariants["variant"];
10
- }>();
11
- </script>
12
-
13
- <template>
14
- <div
15
- data-slot="alert"
16
- :class="cn(alertVariants({ variant: props.variant }), props.class)"
17
- role="alert"
18
- >
19
- <slot />
20
- </div>
21
- </template>
@@ -1,22 +0,0 @@
1
- <script setup lang="ts">
2
- import type { HTMLAttributes } from "vue";
3
- import { cn } from "#ginko-docs/lib/utils";
4
-
5
- const props = defineProps<{
6
- class?: HTMLAttributes["class"];
7
- }>();
8
- </script>
9
-
10
- <template>
11
- <div
12
- data-slot="alert-description"
13
- :class="
14
- cn(
15
- 'col-start-2 text-sm text-balance text-muted-foreground group-has-[>[data-slot=alert-icon]]/alert:col-start-2 md:text-pretty',
16
- props.class,
17
- )
18
- "
19
- >
20
- <slot />
21
- </div>
22
- </template>
@@ -1,22 +0,0 @@
1
- <script setup lang="ts">
2
- import type { HTMLAttributes } from "vue";
3
- import { cn } from "#ginko-docs/lib/utils";
4
-
5
- const props = defineProps<{
6
- class?: HTMLAttributes["class"];
7
- }>();
8
- </script>
9
-
10
- <template>
11
- <div
12
- data-slot="alert-title"
13
- :class="
14
- cn(
15
- 'col-start-2 font-medium group-has-[>[data-slot=alert-icon]]/alert:col-start-2',
16
- props.class,
17
- )
18
- "
19
- >
20
- <slot />
21
- </div>
22
- </template>
@@ -1,34 +0,0 @@
1
- import type { VariantProps } from "class-variance-authority";
2
- import { cva } from "class-variance-authority";
3
-
4
- export { default as Alert } from "./Alert.vue";
5
- export { default as AlertDescription } from "./AlertDescription.vue";
6
- export { default as AlertTitle } from "./AlertTitle.vue";
7
-
8
- export const alertVariants = cva(
9
- [
10
- "group/alert relative grid w-full gap-y-0.5 rounded-lg border px-4 py-3 text-left text-sm items-start",
11
- "grid-cols-[0_1fr]",
12
- "has-[>[data-slot=alert-icon]]:grid-cols-[auto_1fr]",
13
- "has-[>[data-slot=alert-icon]]:gap-x-2.5",
14
- "[&>[data-slot=alert-icon]]:col-start-1",
15
- "[&>[data-slot=alert-icon]]:row-span-2",
16
- "[&>[data-slot=alert-icon]]:size-4",
17
- "[&>[data-slot=alert-icon]]:translate-y-0.5",
18
- "[&>[data-slot=alert-icon]]:shrink-0",
19
- ].join(" "),
20
- {
21
- variants: {
22
- variant: {
23
- default: "bg-card text-card-foreground",
24
- destructive:
25
- "text-destructive bg-card [&>[data-slot=alert-icon]]:text-current *:data-[slot=alert-description]:text-destructive/90",
26
- },
27
- },
28
- defaultVariants: {
29
- variant: "default",
30
- },
31
- },
32
- );
33
-
34
- export type AlertVariants = VariantProps<typeof alertVariants>;
@@ -1,16 +0,0 @@
1
- <script setup lang="ts">
2
- import type { HTMLAttributes } from "vue";
3
- import { cn } from "#ginko-docs/lib/utils";
4
- import { cardVariants, type CardVariants } from "./card-variants";
5
-
6
- const props = defineProps<{
7
- class?: HTMLAttributes["class"];
8
- variant?: CardVariants["variant"];
9
- }>();
10
- </script>
11
-
12
- <template>
13
- <div data-slot="card" :class="cn(cardVariants({ variant: props.variant }), props.class)">
14
- <slot />
15
- </div>
16
- </template>
@@ -1,17 +0,0 @@
1
- <script setup lang="ts">
2
- import type { HTMLAttributes } from "vue";
3
- import { cn } from "#ginko-docs/lib/utils";
4
-
5
- const props = defineProps<{
6
- class?: HTMLAttributes["class"];
7
- }>();
8
- </script>
9
-
10
- <template>
11
- <div
12
- data-slot="card-action"
13
- :class="cn('col-start-2 row-span-2 row-start-1 self-start justify-self-end', props.class)"
14
- >
15
- <slot />
16
- </div>
17
- </template>
@@ -1,14 +0,0 @@
1
- <script setup lang="ts">
2
- import type { HTMLAttributes } from "vue";
3
- import { cn } from "#ginko-docs/lib/utils";
4
-
5
- const props = defineProps<{
6
- class?: HTMLAttributes["class"];
7
- }>();
8
- </script>
9
-
10
- <template>
11
- <div data-slot="card-content" :class="cn('px-6', props.class)">
12
- <slot />
13
- </div>
14
- </template>
@@ -1,14 +0,0 @@
1
- <script setup lang="ts">
2
- import type { HTMLAttributes } from "vue";
3
- import { cn } from "#ginko-docs/lib/utils";
4
-
5
- const props = defineProps<{
6
- class?: HTMLAttributes["class"];
7
- }>();
8
- </script>
9
-
10
- <template>
11
- <p data-slot="card-description" :class="cn('text-sm text-muted-foreground', props.class)">
12
- <slot />
13
- </p>
14
- </template>
@@ -1,14 +0,0 @@
1
- <script setup lang="ts">
2
- import type { HTMLAttributes } from "vue";
3
- import { cn } from "#ginko-docs/lib/utils";
4
-
5
- const props = defineProps<{
6
- class?: HTMLAttributes["class"];
7
- }>();
8
- </script>
9
-
10
- <template>
11
- <div data-slot="card-footer" :class="cn('flex items-center px-6 [.border-t]:pt-6', props.class)">
12
- <slot />
13
- </div>
14
- </template>
@@ -1,22 +0,0 @@
1
- <script setup lang="ts">
2
- import type { HTMLAttributes } from "vue";
3
- import { cn } from "#ginko-docs/lib/utils";
4
-
5
- const props = defineProps<{
6
- class?: HTMLAttributes["class"];
7
- }>();
8
- </script>
9
-
10
- <template>
11
- <div
12
- data-slot="card-header"
13
- :class="
14
- cn(
15
- '@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6',
16
- props.class,
17
- )
18
- "
19
- >
20
- <slot />
21
- </div>
22
- </template>
@@ -1,15 +0,0 @@
1
- import type { VariantProps } from "class-variance-authority";
2
- import { cva } from "class-variance-authority";
3
-
4
- export const cardVariants = cva("bg-card text-card-foreground border shadow-xs", {
5
- variants: {
6
- variant: {
7
- default: "flex flex-col gap-6 rounded-xl py-6",
8
- },
9
- },
10
- defaultVariants: {
11
- variant: "default",
12
- },
13
- });
14
-
15
- export type CardVariants = VariantProps<typeof cardVariants>;