@lupinum/ginko-docs 0.2.2

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 (240) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +112 -0
  3. package/app/app.config.ts +49 -0
  4. package/app/app.vue +71 -0
  5. package/app/assets/css/prose.css +1154 -0
  6. package/app/assets/css/tailwind.css +365 -0
  7. package/app/components/OgImage/GinkoDocs.satori.vue +117 -0
  8. package/app/components/content/DocumentPageShell.vue +55 -0
  9. package/app/components/content/Feedback.vue +97 -0
  10. package/app/components/content/PageMarkdownCopy.vue +102 -0
  11. package/app/components/mdc/MdcAccordion.vue +64 -0
  12. package/app/components/mdc/MdcAccordionItem.vue +51 -0
  13. package/app/components/mdc/MdcAlert.vue +34 -0
  14. package/app/components/mdc/MdcAside.vue +27 -0
  15. package/app/components/mdc/MdcCallout.vue +62 -0
  16. package/app/components/mdc/MdcCard.vue +186 -0
  17. package/app/components/mdc/MdcCardGroup.vue +47 -0
  18. package/app/components/mdc/MdcCenter.vue +71 -0
  19. package/app/components/mdc/MdcCodeGroup.vue +193 -0
  20. package/app/components/mdc/MdcColumn.vue +70 -0
  21. package/app/components/mdc/MdcDocImg.vue +25 -0
  22. package/app/components/mdc/MdcDropcap.vue +84 -0
  23. package/app/components/mdc/MdcError.vue +16 -0
  24. package/app/components/mdc/MdcField.vue +62 -0
  25. package/app/components/mdc/MdcFieldGroup.vue +18 -0
  26. package/app/components/mdc/MdcFigure.vue +51 -0
  27. package/app/components/mdc/MdcIdea.vue +16 -0
  28. package/app/components/mdc/MdcInfo.vue +16 -0
  29. package/app/components/mdc/MdcLayout.vue +57 -0
  30. package/app/components/mdc/MdcNote.vue +16 -0
  31. package/app/components/mdc/MdcPassage.vue +32 -0
  32. package/app/components/mdc/MdcQuiz.vue +281 -0
  33. package/app/components/mdc/MdcQuizOption.vue +91 -0
  34. package/app/components/mdc/MdcQuizQuestion.vue +226 -0
  35. package/app/components/mdc/MdcReadMore.vue +90 -0
  36. package/app/components/mdc/MdcReadMoreGroup.vue +18 -0
  37. package/app/components/mdc/MdcShortcut.vue +46 -0
  38. package/app/components/mdc/MdcStep.vue +42 -0
  39. package/app/components/mdc/MdcSteps.vue +25 -0
  40. package/app/components/mdc/MdcSuccess.vue +16 -0
  41. package/app/components/mdc/MdcTab.vue +17 -0
  42. package/app/components/mdc/MdcTabs.vue +132 -0
  43. package/app/components/mdc/MdcTimeline.vue +14 -0
  44. package/app/components/mdc/MdcTimelineItem.vue +49 -0
  45. package/app/components/mdc/MdcWarning.vue +16 -0
  46. package/app/components/mdc/icons.ts +10 -0
  47. package/app/components/prose/ProseA.vue +27 -0
  48. package/app/components/prose/ProseBlockquote.vue +14 -0
  49. package/app/components/prose/ProseCode.vue +14 -0
  50. package/app/components/prose/ProseEm.vue +14 -0
  51. package/app/components/prose/ProseH1.vue +18 -0
  52. package/app/components/prose/ProseH2.vue +24 -0
  53. package/app/components/prose/ProseH3.vue +24 -0
  54. package/app/components/prose/ProseH4.vue +14 -0
  55. package/app/components/prose/ProseHr.vue +12 -0
  56. package/app/components/prose/ProseImg.vue +120 -0
  57. package/app/components/prose/ProseLi.vue +14 -0
  58. package/app/components/prose/ProseOl.vue +14 -0
  59. package/app/components/prose/ProseP.vue +14 -0
  60. package/app/components/prose/ProsePre.vue +217 -0
  61. package/app/components/prose/ProseStrong.vue +14 -0
  62. package/app/components/prose/ProseTable.vue +16 -0
  63. package/app/components/prose/ProseTbody.vue +14 -0
  64. package/app/components/prose/ProseTd.vue +14 -0
  65. package/app/components/prose/ProseTh.vue +14 -0
  66. package/app/components/prose/ProseThead.vue +14 -0
  67. package/app/components/prose/ProseTr.vue +14 -0
  68. package/app/components/prose/ProseUl.vue +14 -0
  69. package/app/components/site/ModeToggle.vue +123 -0
  70. package/app/components/site/SiteBanner.vue +56 -0
  71. package/app/components/site/SiteFooter.vue +80 -0
  72. package/app/components/site/SiteHeader.vue +250 -0
  73. package/app/components/site/SiteInteractionLayer.vue +35 -0
  74. package/app/components/site/SiteLocaleSwitcher.vue +268 -0
  75. package/app/components/site/SiteLogoMark.vue +12 -0
  76. package/app/components/site/SiteSkipLink.vue +14 -0
  77. package/app/components/ui/accordion/Accordion.vue +15 -0
  78. package/app/components/ui/accordion/AccordionContent.vue +23 -0
  79. package/app/components/ui/accordion/AccordionItem.vue +24 -0
  80. package/app/components/ui/accordion/AccordionTrigger.vue +35 -0
  81. package/app/components/ui/accordion/index.ts +4 -0
  82. package/app/components/ui/alert/Alert.vue +21 -0
  83. package/app/components/ui/alert/AlertDescription.vue +22 -0
  84. package/app/components/ui/alert/AlertTitle.vue +22 -0
  85. package/app/components/ui/alert/index.ts +34 -0
  86. package/app/components/ui/badge/Badge.vue +28 -0
  87. package/app/components/ui/badge/index.ts +24 -0
  88. package/app/components/ui/button/Button.vue +31 -0
  89. package/app/components/ui/button/index.ts +35 -0
  90. package/app/components/ui/card/Card.vue +16 -0
  91. package/app/components/ui/card/CardAction.vue +17 -0
  92. package/app/components/ui/card/CardContent.vue +14 -0
  93. package/app/components/ui/card/CardDescription.vue +14 -0
  94. package/app/components/ui/card/CardFooter.vue +14 -0
  95. package/app/components/ui/card/CardHeader.vue +22 -0
  96. package/app/components/ui/card/CardTitle.vue +14 -0
  97. package/app/components/ui/card/card-variants.ts +15 -0
  98. package/app/components/ui/card/index.ts +8 -0
  99. package/app/components/ui/checkbox/Checkbox.vue +35 -0
  100. package/app/components/ui/checkbox/index.ts +1 -0
  101. package/app/components/ui/collapsible/Collapsible.vue +15 -0
  102. package/app/components/ui/collapsible/CollapsibleContent.vue +25 -0
  103. package/app/components/ui/collapsible/CollapsibleTrigger.vue +12 -0
  104. package/app/components/ui/collapsible/index.ts +3 -0
  105. package/app/components/ui/dialog/Dialog.vue +15 -0
  106. package/app/components/ui/dialog/DialogClose.vue +12 -0
  107. package/app/components/ui/dialog/DialogContent.vue +69 -0
  108. package/app/components/ui/dialog/DialogDescription.vue +21 -0
  109. package/app/components/ui/dialog/DialogFooter.vue +15 -0
  110. package/app/components/ui/dialog/DialogHeader.vue +12 -0
  111. package/app/components/ui/dialog/DialogOverlay.vue +26 -0
  112. package/app/components/ui/dialog/DialogPortal.vue +12 -0
  113. package/app/components/ui/dialog/DialogTitle.vue +21 -0
  114. package/app/components/ui/dialog/DialogTrigger.vue +12 -0
  115. package/app/components/ui/dialog/index.ts +10 -0
  116. package/app/components/ui/dropdown-menu/DropdownMenu.vue +15 -0
  117. package/app/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +36 -0
  118. package/app/components/ui/dropdown-menu/DropdownMenuContent.vue +40 -0
  119. package/app/components/ui/dropdown-menu/DropdownMenuGroup.vue +12 -0
  120. package/app/components/ui/dropdown-menu/DropdownMenuItem.vue +41 -0
  121. package/app/components/ui/dropdown-menu/DropdownMenuLabel.vue +25 -0
  122. package/app/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +15 -0
  123. package/app/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +37 -0
  124. package/app/components/ui/dropdown-menu/DropdownMenuSeparator.vue +23 -0
  125. package/app/components/ui/dropdown-menu/DropdownMenuShortcut.vue +17 -0
  126. package/app/components/ui/dropdown-menu/DropdownMenuSub.vue +15 -0
  127. package/app/components/ui/dropdown-menu/DropdownMenuSubContent.vue +29 -0
  128. package/app/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +31 -0
  129. package/app/components/ui/dropdown-menu/DropdownMenuTrigger.vue +14 -0
  130. package/app/components/ui/dropdown-menu/index.ts +16 -0
  131. package/app/components/ui/input/Input.vue +23 -0
  132. package/app/components/ui/input/index.ts +1 -0
  133. package/app/components/ui/kbd/Kbd.vue +23 -0
  134. package/app/components/ui/kbd/KbdGroup.vue +14 -0
  135. package/app/components/ui/kbd/index.ts +22 -0
  136. package/app/components/ui/label/Label.vue +14 -0
  137. package/app/components/ui/label/index.ts +1 -0
  138. package/app/components/ui/scroll-area/ScrollArea.vue +39 -0
  139. package/app/components/ui/scroll-area/ScrollBar.vue +33 -0
  140. package/app/components/ui/scroll-area/index.ts +2 -0
  141. package/app/components/ui/separator/Separator.vue +27 -0
  142. package/app/components/ui/separator/index.ts +1 -0
  143. package/app/components/ui/sheet/Sheet.vue +15 -0
  144. package/app/components/ui/sheet/SheetClose.vue +12 -0
  145. package/app/components/ui/sheet/SheetContent.vue +59 -0
  146. package/app/components/ui/sheet/SheetDescription.vue +21 -0
  147. package/app/components/ui/sheet/SheetFooter.vue +12 -0
  148. package/app/components/ui/sheet/SheetHeader.vue +12 -0
  149. package/app/components/ui/sheet/SheetOverlay.vue +26 -0
  150. package/app/components/ui/sheet/SheetTitle.vue +21 -0
  151. package/app/components/ui/sheet/SheetTrigger.vue +12 -0
  152. package/app/components/ui/sheet/index.ts +8 -0
  153. package/app/components/ui/switch/Switch.vue +39 -0
  154. package/app/components/ui/switch/index.ts +1 -0
  155. package/app/components/ui/tabs/Tabs.vue +24 -0
  156. package/app/components/ui/tabs/TabsContent.vue +21 -0
  157. package/app/components/ui/tabs/TabsList.vue +26 -0
  158. package/app/components/ui/tabs/TabsTrigger.vue +28 -0
  159. package/app/components/ui/tabs/index.ts +4 -0
  160. package/app/components/ui/textarea/Textarea.vue +31 -0
  161. package/app/components/ui/textarea/index.ts +1 -0
  162. package/app/composables/site-navigation.utils.ts +80 -0
  163. package/app/composables/useCanonicalUrl.ts +9 -0
  164. package/app/composables/useContentRouteAlternates.ts +43 -0
  165. package/app/composables/useGinkoAnalytics.ts +37 -0
  166. package/app/composables/useGinkoDocsConfig.ts +6 -0
  167. package/app/composables/useGinkoOgImage.ts +20 -0
  168. package/app/composables/useLocalizedPath.ts +12 -0
  169. package/app/composables/useLocalizedRouteSwitch.ts +31 -0
  170. package/app/composables/usePageMarkdownActions.ts +79 -0
  171. package/app/composables/useSchemaJsonLd.ts +25 -0
  172. package/app/composables/useSiteNavigation.ts +86 -0
  173. package/app/config/site.utils.ts +36 -0
  174. package/app/error.vue +125 -0
  175. package/app/features/docs/components/DocsContributeLinks.vue +65 -0
  176. package/app/features/docs/components/DocsMobileToc.vue +104 -0
  177. package/app/features/docs/components/DocsPageContent.vue +188 -0
  178. package/app/features/docs/components/DocsPageNav.vue +57 -0
  179. package/app/features/docs/components/DocsSidebar.vue +129 -0
  180. package/app/features/docs/components/DocsSidebarDropdown.vue +70 -0
  181. package/app/features/docs/components/DocsSidebarItem.vue +169 -0
  182. package/app/features/docs/components/DocsSidebarList.vue +35 -0
  183. package/app/features/docs/components/DocsSidebarTabs.vue +35 -0
  184. package/app/features/docs/components/DocsToc.vue +60 -0
  185. package/app/features/docs/composables/useDocsEntryPath.ts +13 -0
  186. package/app/features/docs/composables/useDocsNavigation.ts +29 -0
  187. package/app/features/docs/composables/useDocsNavigationData.ts +15 -0
  188. package/app/features/docs/composables/useScrollspy.ts +67 -0
  189. package/app/features/docs/docs-navigation.ts +170 -0
  190. package/app/features/search/command-center.ts +156 -0
  191. package/app/features/search/components/SiteCommandCenter.vue +323 -0
  192. package/app/features/search/components/SiteSearchPageHighlight.vue +124 -0
  193. package/app/features/search/useCommandCenter.ts +300 -0
  194. package/app/layouts/blog.vue +15 -0
  195. package/app/layouts/default.vue +12 -0
  196. package/app/layouts/docs.vue +20 -0
  197. package/app/lib/errors.ts +84 -0
  198. package/app/lib/schema-org.ts +38 -0
  199. package/app/lib/utils.ts +7 -0
  200. package/app/pages/blog/[slug].vue +211 -0
  201. package/app/pages/blog/index.vue +106 -0
  202. package/app/pages/docs/[...slug].vue +10 -0
  203. package/app/pages/docs/index.vue +23 -0
  204. package/app/pages/index.vue +140 -0
  205. package/app/plugins/ssr-width.ts +6 -0
  206. package/app/utils/content.ts +56 -0
  207. package/app/utils/index.ts +1 -0
  208. package/components.ts +9 -0
  209. package/content.js +175 -0
  210. package/content.ts +148 -0
  211. package/i18n/i18n.config.ts +10 -0
  212. package/i18n/locales.ts +81 -0
  213. package/i18n/messages/global/banner.ts +8 -0
  214. package/i18n/messages/global/blog.ts +14 -0
  215. package/i18n/messages/global/command.ts +44 -0
  216. package/i18n/messages/global/docs.ts +32 -0
  217. package/i18n/messages/global/errors.ts +36 -0
  218. package/i18n/messages/global/feedback.ts +11 -0
  219. package/i18n/messages/global/index.ts +21 -0
  220. package/i18n/messages/global/nav.ts +18 -0
  221. package/i18n/messages/global/site.ts +4 -0
  222. package/i18n/messages/global/theme.ts +7 -0
  223. package/i18n/messages/index.ts +20 -0
  224. package/i18n/messages/localize.ts +35 -0
  225. package/i18n/messages/source.ts +5 -0
  226. package/i18n/routes.ts +33 -0
  227. package/icon-bundle.ts +141 -0
  228. package/index.d.ts +13 -0
  229. package/modules/feature-routing.ts +32 -0
  230. package/nuxt.config.ts +194 -0
  231. package/package.json +91 -0
  232. package/runtime/markdown/inline-code-highlight.ts +155 -0
  233. package/runtime/server/agent-markdown.ts +21 -0
  234. package/runtime/utils.ts +7 -0
  235. package/server/mcp/tools/get-page.ts +14 -0
  236. package/server/mcp/tools/list-pages.ts +10 -0
  237. package/server/plugins/agent-markdown.ts +6 -0
  238. package/shared/route-slugs.ts +5 -0
  239. package/shared/types/app-config.ts +100 -0
  240. package/tags.ts +204 -0
@@ -0,0 +1,4 @@
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";
@@ -0,0 +1,21 @@
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>
@@ -0,0 +1,22 @@
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>
@@ -0,0 +1,22 @@
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>
@@ -0,0 +1,34 @@
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>;
@@ -0,0 +1,28 @@
1
+ <script setup lang="ts">
2
+ import type { PrimitiveProps } from "reka-ui";
3
+ import type { HTMLAttributes } from "vue";
4
+ import type { BadgeVariants } from ".";
5
+ import { reactiveOmit } from "@vueuse/core";
6
+ import { Primitive } from "reka-ui";
7
+ import { cn } from "#ginko-docs/lib/utils";
8
+ import { badgeVariants } from ".";
9
+
10
+ const props = defineProps<
11
+ PrimitiveProps & {
12
+ variant?: BadgeVariants["variant"];
13
+ class?: HTMLAttributes["class"];
14
+ }
15
+ >();
16
+
17
+ const delegatedProps = reactiveOmit(props, "class");
18
+ </script>
19
+
20
+ <template>
21
+ <Primitive
22
+ data-slot="badge"
23
+ :class="cn(badgeVariants({ variant: props.variant }), props.class)"
24
+ v-bind="delegatedProps"
25
+ >
26
+ <slot />
27
+ </Primitive>
28
+ </template>
@@ -0,0 +1,24 @@
1
+ import type { VariantProps } from "class-variance-authority";
2
+ import { cva } from "class-variance-authority";
3
+
4
+ export { default as Badge } from "./Badge.vue";
5
+
6
+ export const badgeVariants = cva(
7
+ "inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
8
+ {
9
+ variants: {
10
+ variant: {
11
+ default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
12
+ secondary:
13
+ "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
14
+ destructive:
15
+ "border-transparent bg-destructive text-destructive-foreground [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",
16
+ outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
17
+ },
18
+ },
19
+ defaultVariants: {
20
+ variant: "default",
21
+ },
22
+ },
23
+ );
24
+ export type BadgeVariants = VariantProps<typeof badgeVariants>;
@@ -0,0 +1,31 @@
1
+ <script setup lang="ts">
2
+ import type { PrimitiveProps } from "reka-ui";
3
+ import type { HTMLAttributes } from "vue";
4
+ import type { ButtonVariants } from ".";
5
+ import { Primitive } from "reka-ui";
6
+ import { cn } from "#ginko-docs/lib/utils";
7
+ import { buttonVariants } from ".";
8
+
9
+ interface Props extends PrimitiveProps {
10
+ variant?: ButtonVariants["variant"];
11
+ size?: ButtonVariants["size"];
12
+ class?: HTMLAttributes["class"];
13
+ }
14
+
15
+ const props = withDefaults(defineProps<Props>(), {
16
+ as: "button",
17
+ });
18
+ </script>
19
+
20
+ <template>
21
+ <Primitive
22
+ data-slot="button"
23
+ :data-variant="variant"
24
+ :data-size="size"
25
+ :as="as"
26
+ :as-child="asChild"
27
+ :class="cn(buttonVariants({ variant, size }), props.class)"
28
+ >
29
+ <slot />
30
+ </Primitive>
31
+ </template>
@@ -0,0 +1,35 @@
1
+ import type { VariantProps } from "class-variance-authority";
2
+ import { cva } from "class-variance-authority";
3
+
4
+ export { default as Button } from "./Button.vue";
5
+
6
+ export const buttonVariants = cva(
7
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
8
+ {
9
+ variants: {
10
+ variant: {
11
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
12
+ destructive:
13
+ "bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",
14
+ outline:
15
+ "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
16
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
17
+ ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
18
+ link: "text-primary underline-offset-4 hover:underline",
19
+ },
20
+ size: {
21
+ default: "h-9 px-4 py-2 has-[>svg]:px-3",
22
+ sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
23
+ lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
24
+ icon: "size-9",
25
+ "icon-sm": "size-8",
26
+ "icon-lg": "size-10",
27
+ },
28
+ },
29
+ defaultVariants: {
30
+ variant: "default",
31
+ size: "default",
32
+ },
33
+ },
34
+ );
35
+ export type ButtonVariants = VariantProps<typeof buttonVariants>;
@@ -0,0 +1,16 @@
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>
@@ -0,0 +1,17 @@
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>
@@ -0,0 +1,14 @@
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>
@@ -0,0 +1,14 @@
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>
@@ -0,0 +1,14 @@
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>
@@ -0,0 +1,22 @@
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>
@@ -0,0 +1,14 @@
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
+ <h3 data-slot="card-title" :class="cn('leading-none font-semibold', props.class)">
12
+ <slot />
13
+ </h3>
14
+ </template>
@@ -0,0 +1,15 @@
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>;
@@ -0,0 +1,8 @@
1
+ export { cardVariants, type CardVariants } from "./card-variants";
2
+ export { default as Card } from "./Card.vue";
3
+ export { default as CardAction } from "./CardAction.vue";
4
+ export { default as CardContent } from "./CardContent.vue";
5
+ export { default as CardDescription } from "./CardDescription.vue";
6
+ export { default as CardFooter } from "./CardFooter.vue";
7
+ export { default as CardHeader } from "./CardHeader.vue";
8
+ export { default as CardTitle } from "./CardTitle.vue";
@@ -0,0 +1,35 @@
1
+ <script setup lang="ts">
2
+ import type { CheckboxRootEmits, CheckboxRootProps } from "reka-ui";
3
+ import type { HTMLAttributes } from "vue";
4
+ import { reactiveOmit } from "@vueuse/core";
5
+ import { CheckboxIndicator, CheckboxRoot, useForwardPropsEmits } from "reka-ui";
6
+ import { cn } from "#ginko-docs/lib/utils";
7
+
8
+ const props = defineProps<CheckboxRootProps & { class?: HTMLAttributes["class"] }>();
9
+ const emits = defineEmits<CheckboxRootEmits>();
10
+
11
+ const delegatedProps = reactiveOmit(props, "class");
12
+ const forwarded = useForwardPropsEmits(delegatedProps, emits);
13
+ </script>
14
+
15
+ <template>
16
+ <CheckboxRoot
17
+ data-slot="checkbox"
18
+ v-bind="forwarded"
19
+ :class="
20
+ cn(
21
+ 'peer size-4 shrink-0 rounded-[4px] border border-input bg-background shadow-xs transition-colors outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40',
22
+ props.class,
23
+ )
24
+ "
25
+ >
26
+ <CheckboxIndicator
27
+ data-slot="checkbox-indicator"
28
+ class="flex items-center justify-center text-current transition-none"
29
+ >
30
+ <slot>
31
+ <Icon name="lucide:check" class="size-3.5" aria-hidden="true" />
32
+ </slot>
33
+ </CheckboxIndicator>
34
+ </CheckboxRoot>
35
+ </template>
@@ -0,0 +1 @@
1
+ export { default as Checkbox } from "./Checkbox.vue";
@@ -0,0 +1,15 @@
1
+ <script setup lang="ts">
2
+ import type { CollapsibleRootEmits, CollapsibleRootProps } from "reka-ui";
3
+ import { CollapsibleRoot, useForwardPropsEmits } from "reka-ui";
4
+
5
+ const props = defineProps<CollapsibleRootProps>();
6
+ const emits = defineEmits<CollapsibleRootEmits>();
7
+
8
+ const forwarded = useForwardPropsEmits(props, emits);
9
+ </script>
10
+
11
+ <template>
12
+ <CollapsibleRoot v-bind="forwarded">
13
+ <slot />
14
+ </CollapsibleRoot>
15
+ </template>
@@ -0,0 +1,25 @@
1
+ <script setup lang="ts">
2
+ import type { CollapsibleContentProps } from "reka-ui";
3
+ import type { HTMLAttributes } from "vue";
4
+ import { reactiveOmit } from "@vueuse/core";
5
+ import { CollapsibleContent } from "reka-ui";
6
+ import { cn } from "#ginko-docs/lib/utils";
7
+
8
+ const props = defineProps<CollapsibleContentProps & { class?: HTMLAttributes["class"] }>();
9
+
10
+ const delegatedProps = reactiveOmit(props, "class");
11
+ </script>
12
+
13
+ <template>
14
+ <CollapsibleContent
15
+ v-bind="delegatedProps"
16
+ :class="
17
+ cn(
18
+ 'overflow-hidden data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down',
19
+ props.class,
20
+ )
21
+ "
22
+ >
23
+ <slot />
24
+ </CollapsibleContent>
25
+ </template>
@@ -0,0 +1,12 @@
1
+ <script setup lang="ts">
2
+ import type { CollapsibleTriggerProps } from "reka-ui";
3
+ import { CollapsibleTrigger } from "reka-ui";
4
+
5
+ const props = defineProps<CollapsibleTriggerProps>();
6
+ </script>
7
+
8
+ <template>
9
+ <CollapsibleTrigger v-bind="props">
10
+ <slot />
11
+ </CollapsibleTrigger>
12
+ </template>
@@ -0,0 +1,3 @@
1
+ export { default as Collapsible } from "./Collapsible.vue";
2
+ export { default as CollapsibleTrigger } from "./CollapsibleTrigger.vue";
3
+ export { default as CollapsibleContent } from "./CollapsibleContent.vue";
@@ -0,0 +1,15 @@
1
+ <script setup lang="ts">
2
+ import type { DialogRootEmits, DialogRootProps } from "reka-ui";
3
+ import { DialogRoot, useForwardPropsEmits } from "reka-ui";
4
+
5
+ const props = defineProps<DialogRootProps>();
6
+ const emits = defineEmits<DialogRootEmits>();
7
+
8
+ const forwarded = useForwardPropsEmits(props, emits);
9
+ </script>
10
+
11
+ <template>
12
+ <DialogRoot v-slot="slotProps" data-slot="dialog" v-bind="forwarded">
13
+ <slot v-bind="slotProps" />
14
+ </DialogRoot>
15
+ </template>
@@ -0,0 +1,12 @@
1
+ <script setup lang="ts">
2
+ import type { DialogCloseProps } from "reka-ui";
3
+ import { DialogClose } from "reka-ui";
4
+
5
+ const props = defineProps<DialogCloseProps>();
6
+ </script>
7
+
8
+ <template>
9
+ <DialogClose data-slot="dialog-close" v-bind="props">
10
+ <slot />
11
+ </DialogClose>
12
+ </template>
@@ -0,0 +1,69 @@
1
+ <script setup lang="ts">
2
+ import { cva, type VariantProps } from "class-variance-authority";
3
+ import type { DialogContentEmits, DialogContentProps } from "reka-ui";
4
+ import type { HTMLAttributes } from "vue";
5
+ import { reactiveOmit } from "@vueuse/core";
6
+ import { DialogClose, DialogContent, useForwardPropsEmits } from "reka-ui";
7
+ import { cn } from "#ginko-docs/lib/utils";
8
+ import DialogOverlay from "./DialogOverlay.vue";
9
+ import DialogPortal from "./DialogPortal.vue";
10
+
11
+ const dialogContentVariants = cva(
12
+ "fixed top-[50%] left-[50%] z-50 grid translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border border-border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
13
+ {
14
+ variants: {
15
+ size: {
16
+ sm: "w-[min(calc(100vw-2rem),24rem)]",
17
+ default: "w-[min(calc(100vw-2rem),32rem)]",
18
+ lg: "w-[min(calc(100vw-2rem),48rem)]",
19
+ xl: "w-[min(calc(100vw-2rem),64rem)]",
20
+ full: "w-[calc(100vw-2rem)]",
21
+ },
22
+ },
23
+ defaultVariants: {
24
+ size: "default",
25
+ },
26
+ },
27
+ );
28
+
29
+ type DialogContentVariants = VariantProps<typeof dialogContentVariants>;
30
+
31
+ interface Props extends DialogContentProps {
32
+ class?: HTMLAttributes["class"];
33
+ showClose?: boolean;
34
+ size?: DialogContentVariants["size"];
35
+ }
36
+
37
+ defineOptions({
38
+ inheritAttrs: false,
39
+ });
40
+
41
+ const props = withDefaults(defineProps<Props>(), {
42
+ showClose: true,
43
+ });
44
+ const emits = defineEmits<DialogContentEmits>();
45
+
46
+ const delegatedProps = reactiveOmit(props, "class", "showClose", "size");
47
+ const forwarded = useForwardPropsEmits(delegatedProps, emits);
48
+ </script>
49
+
50
+ <template>
51
+ <DialogPortal>
52
+ <DialogOverlay />
53
+ <DialogContent
54
+ data-slot="dialog-content"
55
+ :class="cn(dialogContentVariants({ size: props.size }), props.class)"
56
+ v-bind="{ ...$attrs, ...forwarded }"
57
+ >
58
+ <slot />
59
+
60
+ <DialogClose
61
+ v-if="showClose"
62
+ class="absolute top-4 right-4 inline-flex size-8 items-center justify-center rounded-md text-muted-foreground transition-colors outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none"
63
+ >
64
+ <Icon name="lucide:x" class="size-4" aria-hidden="true" />
65
+ <span class="sr-only">Close</span>
66
+ </DialogClose>
67
+ </DialogContent>
68
+ </DialogPortal>
69
+ </template>
@@ -0,0 +1,21 @@
1
+ <script setup lang="ts">
2
+ import type { DialogDescriptionProps } from "reka-ui";
3
+ import type { HTMLAttributes } from "vue";
4
+ import { reactiveOmit } from "@vueuse/core";
5
+ import { DialogDescription } from "reka-ui";
6
+ import { cn } from "#ginko-docs/lib/utils";
7
+
8
+ const props = defineProps<DialogDescriptionProps & { class?: HTMLAttributes["class"] }>();
9
+
10
+ const delegatedProps = reactiveOmit(props, "class");
11
+ </script>
12
+
13
+ <template>
14
+ <DialogDescription
15
+ data-slot="dialog-description"
16
+ :class="cn('text-sm text-muted-foreground', props.class)"
17
+ v-bind="delegatedProps"
18
+ >
19
+ <slot />
20
+ </DialogDescription>
21
+ </template>
@@ -0,0 +1,15 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from "vue";
3
+ import { cn } from "#ginko-docs/lib/utils";
4
+
5
+ const props = defineProps<{ class?: HTMLAttributes["class"] }>();
6
+ </script>
7
+
8
+ <template>
9
+ <div
10
+ data-slot="dialog-footer"
11
+ :class="cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', props.class)"
12
+ >
13
+ <slot />
14
+ </div>
15
+ </template>
@@ -0,0 +1,12 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from "vue";
3
+ import { cn } from "#ginko-docs/lib/utils";
4
+
5
+ const props = defineProps<{ class?: HTMLAttributes["class"] }>();
6
+ </script>
7
+
8
+ <template>
9
+ <div data-slot="dialog-header" :class="cn('flex flex-col gap-1.5', props.class)">
10
+ <slot />
11
+ </div>
12
+ </template>
@@ -0,0 +1,26 @@
1
+ <script setup lang="ts">
2
+ import type { DialogOverlayProps } from "reka-ui";
3
+ import type { HTMLAttributes } from "vue";
4
+ import { reactiveOmit } from "@vueuse/core";
5
+ import { DialogOverlay } from "reka-ui";
6
+ import { cn } from "#ginko-docs/lib/utils";
7
+
8
+ const props = defineProps<DialogOverlayProps & { class?: HTMLAttributes["class"] }>();
9
+
10
+ const delegatedProps = reactiveOmit(props, "class");
11
+ </script>
12
+
13
+ <template>
14
+ <DialogOverlay
15
+ data-slot="dialog-overlay"
16
+ :class="
17
+ cn(
18
+ 'fixed inset-0 z-50 bg-overlay backdrop-blur-sm data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0',
19
+ props.class,
20
+ )
21
+ "
22
+ v-bind="delegatedProps"
23
+ >
24
+ <slot />
25
+ </DialogOverlay>
26
+ </template>