@wordup-md/nuxt-layer-shadcn-unocss 0.2.0

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 (359) hide show
  1. package/.cursor/rules/active-context-rule.mdc +8 -0
  2. package/.cursor/rules/memory-bank-overview.mdc +17 -0
  3. package/.cursor/rules/product-context-rule.mdc +8 -0
  4. package/.cursor/rules/progress-rule.mdc +8 -0
  5. package/.cursor/rules/projectbrief-rule.mdc +8 -0
  6. package/.cursor/rules/system-patterns-rule.mdc +8 -0
  7. package/.cursor/rules/tech-context-rule.mdc +8 -0
  8. package/.cursorrules +52 -0
  9. package/.editorconfig +12 -0
  10. package/.nuxtrc +1 -0
  11. package/.playground/app.config.ts +189 -0
  12. package/.playground/assets/style.css +15 -0
  13. package/.playground/components/content/MdcExample.vue +81 -0
  14. package/.playground/components/content/MdcReplay.vue +319 -0
  15. package/.playground/content/1.getting-started/1.introduction.md +8 -0
  16. package/.playground/content/1.getting-started/2.writing/1.markdown.md +56 -0
  17. package/.playground/content/1.getting-started/2.writing/2.pages.md +177 -0
  18. package/.playground/content/1.getting-started/2.writing/3.folders.md +56 -0
  19. package/.playground/content/1.getting-started/2.writing/_dir.yml +3 -0
  20. package/.playground/content/1.getting-started/_dir.yml +3 -0
  21. package/.playground/content/2.content-elements/1.text-formatting.md +60 -0
  22. package/.playground/content/2.content-elements/10.horizontal-rule.md +25 -0
  23. package/.playground/content/2.content-elements/11.tables.md +25 -0
  24. package/.playground/content/2.content-elements/12.overview.md +93 -0
  25. package/.playground/content/2.content-elements/13.text-components.md +36 -0
  26. package/.playground/content/2.content-elements/2.headings.md +32 -0
  27. package/.playground/content/2.content-elements/3.paragraphs.md +39 -0
  28. package/.playground/content/2.content-elements/4.lists.md +37 -0
  29. package/.playground/content/2.content-elements/5.links.md +17 -0
  30. package/.playground/content/2.content-elements/6.images.md +17 -0
  31. package/.playground/content/2.content-elements/7.blockquotes.md +17 -0
  32. package/.playground/content/2.content-elements/8.code-blocks.md +141 -0
  33. package/.playground/content/2.content-elements/9.inline-code.md +21 -0
  34. package/.playground/content/2.content-elements/_dir.yml +3 -0
  35. package/.playground/content/2.content-elements/index.md +8 -0
  36. package/.playground/content/3.components/1.index.md +187 -0
  37. package/.playground/content/3.components/2.docs/_dir.yml +3 -0
  38. package/.playground/content/3.components/2.docs/alert.md +152 -0
  39. package/.playground/content/3.components/2.docs/badge.md +131 -0
  40. package/.playground/content/3.components/2.docs/button-link.md +53 -0
  41. package/.playground/content/3.components/2.docs/callout.md +16 -0
  42. package/.playground/content/3.components/2.docs/code-group.md +77 -0
  43. package/.playground/content/3.components/2.docs/code-snippet.md +129 -0
  44. package/.playground/content/3.components/2.docs/field-group.md +62 -0
  45. package/.playground/content/3.components/2.docs/field.md +39 -0
  46. package/.playground/content/3.components/2.docs/file-tree.md +144 -0
  47. package/.playground/content/3.components/2.docs/icon.md +94 -0
  48. package/.playground/content/3.components/2.docs/pm.md +67 -0
  49. package/.playground/content/3.components/2.docs/read-more.md +44 -0
  50. package/.playground/content/3.components/2.docs/shortcut.md +36 -0
  51. package/.playground/content/3.components/2.docs/stack.md +81 -0
  52. package/.playground/content/3.components/2.docs/steps.md +148 -0
  53. package/.playground/content/3.components/2.docs/tabs.md +375 -0
  54. package/.playground/content/3.components/3.page/_dir.yml +2 -0
  55. package/.playground/content/3.components/3.page/accordion.md +74 -0
  56. package/.playground/content/3.components/3.page/card-group.md +115 -0
  57. package/.playground/content/3.components/3.page/card.md +142 -0
  58. package/.playground/content/3.components/3.page/collapsible.md +61 -0
  59. package/.playground/content/3.components/3.page/hero-alt.md +118 -0
  60. package/.playground/content/3.components/3.page/hero.md +60 -0
  61. package/.playground/content/3.components/3.page/team-card.md +82 -0
  62. package/.playground/content/3.components/_dir.yml +2 -0
  63. package/.playground/content/4.development/1.configuration/1.overview.md +297 -0
  64. package/.playground/content/4.development/1.configuration/2.nuxt-content.md +105 -0
  65. package/.playground/content/4.development/1.configuration/3.og-image.md +86 -0
  66. package/.playground/content/4.development/1.configuration/4.edit-link.md +63 -0
  67. package/.playground/content/4.development/1.configuration/5.banner.md +52 -0
  68. package/.playground/content/4.development/1.configuration/6.carbon-ads.md +65 -0
  69. package/.playground/content/4.development/1.configuration/7.umami.md +41 -0
  70. package/.playground/content/4.development/1.configuration/_dir.yml +3 -0
  71. package/.playground/content/4.development/2.advanced/1.override.md +49 -0
  72. package/.playground/content/4.development/2.advanced/2.math.md +89 -0
  73. package/.playground/content/4.development/2.advanced/_dir.yml +3 -0
  74. package/.playground/content/4.development/3.themes.md +9 -0
  75. package/.playground/content/4.development/4.composables.md +38 -0
  76. package/.playground/content/4.development/5.installation.md +36 -0
  77. package/.playground/content/4.development/_dir.yml +3 -0
  78. package/.playground/content/_menu-footer.md +5 -0
  79. package/.playground/content/index.md +67 -0
  80. package/.playground/content/test-card.md +187 -0
  81. package/.playground/content/test.md +88 -0
  82. package/.playground/content/test2.md +12 -0
  83. package/.playground/content/test3.md +187 -0
  84. package/.playground/nuxt.config.ts +52 -0
  85. package/.playground/public/banner-preview.png +0 -0
  86. package/.playground/public/favicon.ico +0 -0
  87. package/.playground/public/front-matter-showcase/authors.png +0 -0
  88. package/.playground/public/front-matter-showcase/badges.png +0 -0
  89. package/.playground/public/front-matter-showcase/nav-badges.png +0 -0
  90. package/.playground/public/hero.png +0 -0
  91. package/.playground/public/logo-dark.svg +12 -0
  92. package/.playground/public/logo.svg +12 -0
  93. package/.playground/public/og-nuxt-seo.png +0 -0
  94. package/.playground/public/og-nuxt.png +0 -0
  95. package/.playground/public/og-shadcn-docs-dark.png +0 -0
  96. package/.playground/public/og-shadcn-docs.png +0 -0
  97. package/.playground/public/sidebar-default.png +0 -0
  98. package/.playground/public/sidebar-group.png +0 -0
  99. package/.playground/public/sidebar-tree.png +0 -0
  100. package/.playground/uno.config.ts +16 -0
  101. package/README.md +93 -0
  102. package/app.vue +59 -0
  103. package/assets/css/a11y.css +48 -0
  104. package/assets/css/mdc-editor.css +91 -0
  105. package/components/A11yModeToggle.vue +23 -0
  106. package/components/DarkModeToggle.vue +26 -0
  107. package/components/LinkIcon.vue +32 -0
  108. package/components/OgImage/ShadcnDocs.vue +55 -0
  109. package/components/ThemeCustomizer.vue +156 -0
  110. package/components/ThemePopover.vue +27 -0
  111. package/components/content/Accordion.vue +18 -0
  112. package/components/content/AccordionItem.vue +32 -0
  113. package/components/content/Alert.vue +100 -0
  114. package/components/content/Badge.vue +52 -0
  115. package/components/content/ButtonLink.vue +38 -0
  116. package/components/content/Callout.vue +17 -0
  117. package/components/content/Card.vue +173 -0
  118. package/components/content/CardGroup.vue +38 -0
  119. package/components/content/CodeCopy.vue +52 -0
  120. package/components/content/CodeGroup._vue +27 -0
  121. package/components/content/CodeSnippet._vue +78 -0
  122. package/components/content/Collapsible.vue +80 -0
  123. package/components/content/Field.vue +53 -0
  124. package/components/content/FieldGroup.vue +5 -0
  125. package/components/content/FileTree.vue +110 -0
  126. package/components/content/FileTreeItem.vue +64 -0
  127. package/components/content/FileTreeRoot.vue +27 -0
  128. package/components/content/Hero.vue +154 -0
  129. package/components/content/HeroAlt.vue +116 -0
  130. package/components/content/Icon.vue +69 -0
  131. package/components/content/Kbd.vue +20 -0
  132. package/components/content/PmInstall.vue +35 -0
  133. package/components/content/PmRun.vue +31 -0
  134. package/components/content/PmX.vue +31 -0
  135. package/components/content/ProseA.vue +21 -0
  136. package/components/content/ProseBlockquote.vue +5 -0
  137. package/components/content/ProseCode.vue +121 -0
  138. package/components/content/ProseCodeInline.vue +24 -0
  139. package/components/content/ProseEm.vue +5 -0
  140. package/components/content/ProseH1.vue +27 -0
  141. package/components/content/ProseH2.vue +22 -0
  142. package/components/content/ProseH3.vue +21 -0
  143. package/components/content/ProseH4.vue +21 -0
  144. package/components/content/ProseH5.vue +21 -0
  145. package/components/content/ProseH6.vue +21 -0
  146. package/components/content/ProseHr.vue +3 -0
  147. package/components/content/ProseImg.vue +42 -0
  148. package/components/content/ProseLi.vue +5 -0
  149. package/components/content/ProseOl.vue +5 -0
  150. package/components/content/ProseP.vue +5 -0
  151. package/components/content/ProsePre.vue +56 -0
  152. package/components/content/ProseSection.vue +27 -0
  153. package/components/content/ProseStrong.vue +5 -0
  154. package/components/content/ProseTable.vue +7 -0
  155. package/components/content/ProseTbody.vue +5 -0
  156. package/components/content/ProseTd.vue +5 -0
  157. package/components/content/ProseTh.vue +5 -0
  158. package/components/content/ProseThead.vue +5 -0
  159. package/components/content/ProseTr.vue +5 -0
  160. package/components/content/ProseUl.vue +5 -0
  161. package/components/content/ReadMore.vue +41 -0
  162. package/components/content/Shortcut.vue +20 -0
  163. package/components/content/Stack.vue +17 -0
  164. package/components/content/Steps.vue +23 -0
  165. package/components/content/Tabs.vue +52 -0
  166. package/components/content/TabsInner.vue +263 -0
  167. package/components/content/TeamCard.vue +52 -0
  168. package/components/content/TeamCardGroup.vue +5 -0
  169. package/components/content/global/AlertEditor.vue +58 -0
  170. package/components/content/global/BadgeEditor.vue +56 -0
  171. package/components/content/global/BrEditor.vue +3 -0
  172. package/components/content/global/CardEditor.vue +142 -0
  173. package/components/content/global/CardGroupEditor.vue +50 -0
  174. package/components/content/global/CodeGroup.vue +13 -0
  175. package/components/content/global/CodeGroupEditor.vue +50 -0
  176. package/components/content/global/DivEditor.vue +22 -0
  177. package/components/content/global/FieldEditor.vue +38 -0
  178. package/components/content/global/FieldGroupEditor.vue +24 -0
  179. package/components/content/global/HeroEditor.vue +67 -0
  180. package/components/content/global/ProseSectionEditor.vue +180 -0
  181. package/components/content/global/ReadMoreEditor.vue +70 -0
  182. package/components/content/global/SectionEditor.vue +22 -0
  183. package/components/content/global/StackEditor.vue +35 -0
  184. package/components/content/global/StepsEditor.vue +55 -0
  185. package/components/content/global/Tabs._vue +97 -0
  186. package/components/content/global/TabsEditor.vue +38 -0
  187. package/components/layout/Aside.vue +83 -0
  188. package/components/layout/AsideTree.vue +25 -0
  189. package/components/layout/AsideTreeItem.vue +86 -0
  190. package/components/layout/AsideTreeItemButton.vue +32 -0
  191. package/components/layout/Banner.vue +77 -0
  192. package/components/layout/Breadcrumb.vue +34 -0
  193. package/components/layout/DocsFooter.vue +6 -0
  194. package/components/layout/EditLink.vue +23 -0
  195. package/components/layout/Footer.vue +80 -0
  196. package/components/layout/FooterItem.vue +50 -0
  197. package/components/layout/FooterSubmenuItem.vue +39 -0
  198. package/components/layout/Header/Logo.vue +30 -0
  199. package/components/layout/Header/MenuItem.vue +83 -0
  200. package/components/layout/Header/Nav.vue +112 -0
  201. package/components/layout/Header/NavMobile.vue +14 -0
  202. package/components/layout/Header/NavMobileItem.vue +79 -0
  203. package/components/layout/Header/SubmenuItem.vue +39 -0
  204. package/components/layout/Header.vue +160 -0
  205. package/components/layout/LangSwitcher.vue +90 -0
  206. package/components/layout/MobileNav.vue +44 -0
  207. package/components/layout/PrevNext.vue +24 -0
  208. package/components/layout/PrevNextButton.vue +50 -0
  209. package/components/layout/SearchButton.vue +46 -0
  210. package/components/layout/SearchDialog.vue +217 -0
  211. package/components/layout/Title.vue +98 -0
  212. package/components/layout/Toc.vue +99 -0
  213. package/components/layout/TocTree.vue +42 -0
  214. package/components/ui/accordion/Accordion.vue +19 -0
  215. package/components/ui/accordion/AccordionContent.vue +24 -0
  216. package/components/ui/accordion/AccordionItem.vue +24 -0
  217. package/components/ui/accordion/AccordionTrigger.vue +39 -0
  218. package/components/ui/accordion/index.ts +4 -0
  219. package/components/ui/alert/Alert.vue +19 -0
  220. package/components/ui/alert/AlertDescription.vue +14 -0
  221. package/components/ui/alert/AlertTitle.vue +14 -0
  222. package/components/ui/alert/index.ts +23 -0
  223. package/components/ui/avatar/Avatar.vue +25 -0
  224. package/components/ui/avatar/AvatarFallback.vue +11 -0
  225. package/components/ui/avatar/AvatarImage.vue +12 -0
  226. package/components/ui/avatar/index.ts +24 -0
  227. package/components/ui/badge/Badge.vue +17 -0
  228. package/components/ui/badge/index.ts +71 -0
  229. package/components/ui/breadcrumb/Breadcrumb.vue +16 -0
  230. package/components/ui/breadcrumb/BreadcrumbItem.vue +16 -0
  231. package/components/ui/breadcrumb/BreadcrumbLink.vue +23 -0
  232. package/components/ui/breadcrumb/BreadcrumbList.vue +16 -0
  233. package/components/ui/breadcrumb/BreadcrumbPage.vue +19 -0
  234. package/components/ui/breadcrumb/BreadcrumbSeparator.vue +23 -0
  235. package/components/ui/breadcrumb/index.ts +6 -0
  236. package/components/ui/button/Button.vue +29 -0
  237. package/components/ui/button/index.ts +35 -0
  238. package/components/ui/card/Card.vue +21 -0
  239. package/components/ui/card/CardContent.vue +14 -0
  240. package/components/ui/card/CardDescription.vue +14 -0
  241. package/components/ui/card/CardFooter.vue +14 -0
  242. package/components/ui/card/CardHeader.vue +14 -0
  243. package/components/ui/card/CardTitle.vue +18 -0
  244. package/components/ui/card/index.ts +6 -0
  245. package/components/ui/collapsible/Collapsible.vue +18 -0
  246. package/components/ui/collapsible/CollapsibleContent.vue +14 -0
  247. package/components/ui/collapsible/CollapsibleTrigger.vue +11 -0
  248. package/components/ui/collapsible/index.ts +3 -0
  249. package/components/ui/command/Command.vue +89 -0
  250. package/components/ui/command/CommandEmpty.vue +30 -0
  251. package/components/ui/command/CommandGroup.vue +50 -0
  252. package/components/ui/command/CommandInput.vue +44 -0
  253. package/components/ui/command/CommandInputOnly.vue +50 -0
  254. package/components/ui/command/CommandItem.vue +79 -0
  255. package/components/ui/command/CommandList.vue +28 -0
  256. package/components/ui/command/CommandSeparator.vue +24 -0
  257. package/components/ui/command/index.ts +24 -0
  258. package/components/ui/dialog/Dialog.vue +14 -0
  259. package/components/ui/dialog/DialogClose.vue +11 -0
  260. package/components/ui/dialog/DialogContent.vue +52 -0
  261. package/components/ui/dialog/DialogDescription.vue +24 -0
  262. package/components/ui/dialog/DialogFooter.vue +19 -0
  263. package/components/ui/dialog/DialogHeader.vue +16 -0
  264. package/components/ui/dialog/DialogScrollContent.vue +61 -0
  265. package/components/ui/dialog/DialogTitle.vue +29 -0
  266. package/components/ui/dialog/DialogTrigger.vue +11 -0
  267. package/components/ui/dialog/index.ts +9 -0
  268. package/components/ui/input/Input.vue +27 -0
  269. package/components/ui/input/index.ts +1 -0
  270. package/components/ui/label/Label.vue +27 -0
  271. package/components/ui/label/index.ts +1 -0
  272. package/components/ui/navigation-menu/NavigationMenu.vue +33 -0
  273. package/components/ui/navigation-menu/NavigationMenuContent.vue +34 -0
  274. package/components/ui/navigation-menu/NavigationMenuIndicator.vue +24 -0
  275. package/components/ui/navigation-menu/NavigationMenuItem.vue +11 -0
  276. package/components/ui/navigation-menu/NavigationMenuLink.vue +19 -0
  277. package/components/ui/navigation-menu/NavigationMenuList.vue +33 -0
  278. package/components/ui/navigation-menu/NavigationMenuTrigger.vue +34 -0
  279. package/components/ui/navigation-menu/NavigationMenuViewport.vue +33 -0
  280. package/components/ui/navigation-menu/index.ts +14 -0
  281. package/components/ui/popover/Popover.vue +15 -0
  282. package/components/ui/popover/PopoverContent.vue +49 -0
  283. package/components/ui/popover/PopoverTrigger.vue +11 -0
  284. package/components/ui/popover/index.ts +4 -0
  285. package/components/ui/scroll-area/ScrollArea.vue +32 -0
  286. package/components/ui/scroll-area/ScrollBar.vue +41 -0
  287. package/components/ui/scroll-area/index.ts +2 -0
  288. package/components/ui/separator/Separator.vue +20 -0
  289. package/components/ui/separator/index.ts +1 -0
  290. package/components/ui/sheet/Sheet.vue +14 -0
  291. package/components/ui/sheet/SheetClose.vue +11 -0
  292. package/components/ui/sheet/SheetContent.vue +58 -0
  293. package/components/ui/sheet/SheetDescription.vue +22 -0
  294. package/components/ui/sheet/SheetFooter.vue +19 -0
  295. package/components/ui/sheet/SheetHeader.vue +16 -0
  296. package/components/ui/sheet/SheetTitle.vue +22 -0
  297. package/components/ui/sheet/SheetTrigger.vue +11 -0
  298. package/components/ui/sheet/index.ts +31 -0
  299. package/components/ui/slider/Slider.vue +36 -0
  300. package/components/ui/slider/index.ts +1 -0
  301. package/components/ui/tabs/Tabs.vue +15 -0
  302. package/components/ui/tabs/TabsContent.vue +22 -0
  303. package/components/ui/tabs/TabsList.vue +25 -0
  304. package/components/ui/tabs/TabsTrigger.vue +27 -0
  305. package/components/ui/tabs/index.ts +4 -0
  306. package/components/ui/textarea/Textarea.vue +27 -0
  307. package/components/ui/textarea/index.ts +1 -0
  308. package/components/ui/toast/Toast.vue +28 -0
  309. package/components/ui/toast/ToastAction.vue +22 -0
  310. package/components/ui/toast/ToastClose.vue +27 -0
  311. package/components/ui/toast/ToastDescription.vue +22 -0
  312. package/components/ui/toast/ToastProvider.vue +11 -0
  313. package/components/ui/toast/ToastTitle.vue +22 -0
  314. package/components/ui/toast/ToastViewport.vue +20 -0
  315. package/components/ui/toast/Toaster.vue +34 -0
  316. package/components/ui/toast/index.ts +38 -0
  317. package/components/ui/toast/use-toast.ts +165 -0
  318. package/components.json +18 -0
  319. package/composables/useBreadcrumb.ts +47 -0
  320. package/composables/useCollapsedMap.ts +3 -0
  321. package/composables/useConfig.ts +227 -0
  322. package/composables/useEditLink.ts +27 -0
  323. package/composables/useI18nDocs.ts +114 -0
  324. package/composables/useMdcMenu.ts +204 -0
  325. package/composables/usePm.ts +58 -0
  326. package/composables/useScrollspy.ts +51 -0
  327. package/composables/useThemes.ts +46 -0
  328. package/composables/useToast.ts +1 -0
  329. package/content/index.md +45 -0
  330. package/eslint.config.js +3 -0
  331. package/i18n/i18n.config.ts +414 -0
  332. package/index.d.ts +610 -0
  333. package/layouts/blank.vue +5 -0
  334. package/layouts/default.vue +9 -0
  335. package/layouts/editorial.vue +83 -0
  336. package/lib/registry/themes.ts +636 -0
  337. package/lib/uno-preset.ts +143 -0
  338. package/memory-bank/activeContext.md +17 -0
  339. package/memory-bank/productContext.md +21 -0
  340. package/memory-bank/progress.md +16 -0
  341. package/memory-bank/projectbrief.md +20 -0
  342. package/memory-bank/systemPatterns.md +25 -0
  343. package/memory-bank/techContext.md +29 -0
  344. package/modules/inject-css.ts +40 -0
  345. package/nuxt.config.ts +124 -0
  346. package/package.json +71 -0
  347. package/pages/[...slug].vue +109 -0
  348. package/pages/admin/[...slug].vue +145 -0
  349. package/pages/index.vue +24 -0
  350. package/plugins/injectCssHmr.ts +26 -0
  351. package/plugins/wordup.ts +130 -0
  352. package/public/content-doc.json +792 -0
  353. package/public/iconesjs.svg +4 -0
  354. package/scripts/buildContentDoc-cli.ts +8 -0
  355. package/scripts/buildContentDoc.ts +165 -0
  356. package/tailwind.config.js +1 -0
  357. package/tsconfig.json +3 -0
  358. package/uno.config.mjs +58 -0
  359. package/utils/index.ts +12 -0
@@ -0,0 +1,187 @@
1
+ ---
2
+ title: MDC Syntax
3
+ icon: i-zondicons:dots-horizontal-double
4
+ description: MarkDown Components (MDC) supercharges regular Markdown to write
5
+ interactive components.
6
+ ---
7
+
8
+ ## `:` Inline Components
9
+
10
+ Inline components are entries that will stick inside the parent paragraph. Like spans, emojis, icons, etc. Inline components can be defined by a single `:` followed by the component name.
11
+
12
+ ```md
13
+ A simple :inline-component
14
+ ```
15
+
16
+ You may want to pass some text into an inline component; you can do it using the `[TEXT]` syntax.
17
+
18
+ ```md
19
+ A simple :inline-component[John Doe]
20
+ ```
21
+
22
+ If you want to use an inline component followed by specific characters like `-`, `_`, or `:`, you can use a dummy props specifier after it.
23
+
24
+ ```md
25
+ How to say :hello{}-world in Markdown
26
+ ```
27
+
28
+ In this example, `:hello{}` will search for the `<Hello />` component, and `-world` will be plain text.
29
+
30
+ ::alert
31
+ Note: If you put an inline component alone in a single line, it will be transformed into a block component. This is sugar syntax for block components.
32
+
33
+ ```md
34
+ Paragraph a
35
+
36
+ :block-component
37
+
38
+ Paragraph b
39
+ ```
40
+ ::
41
+
42
+ ## `::` Block Components
43
+
44
+ Block components are components that accept Markdown content or another component as a slot.
45
+
46
+ Block components are defined by the `::` identifier.
47
+
48
+ ```md
49
+ ::card
50
+ The content of the card
51
+ ::
52
+ ```
53
+
54
+ Block components can be used without any content.
55
+
56
+ ```md
57
+ ::card
58
+ ::
59
+ ```
60
+
61
+ Or with sugar syntax. Note that in sugar syntax, it is important to put the component alone on a separate line.
62
+
63
+ ```md
64
+ A paragraph
65
+
66
+ :card
67
+ ```
68
+
69
+ ## `#` Slots
70
+
71
+ Block components can accept slots (like Vue slots) with different names. The content of these slots can be anything from a normal markdown paragraph to a nested block component.
72
+
73
+ - The `default` slot renders the top-level content inside the block component.
74
+ - Named slots use the `#` identifier to render the corresponding content.
75
+
76
+ ```md
77
+ ::hero
78
+ Default slot text
79
+
80
+ #description
81
+ This will be rendered inside the `description` slot.
82
+ ::
83
+ ```
84
+
85
+ ## `:::` Nesting
86
+
87
+ MDC supports nested components inside slots by indenting them. To make nested components visually distinguishable, you can indent nested components and add more `:` when you define them.
88
+
89
+ ```md
90
+ ::hero
91
+ :::card
92
+ A nested card
93
+
94
+ ::::card
95
+ A super nested card
96
+ ::::
97
+ :::
98
+ ::
99
+ ```
100
+
101
+ ## `[]` Span
102
+
103
+ To create inline spans in your text, you can use the `[]` identifier.
104
+
105
+ ```md
106
+ Hello [World]
107
+ ```
108
+
109
+ This syntax is useful in combination with inline props to make text visually different from the rest of the paragraph. Check out the inline props section to read more about props.
110
+
111
+ ```md
112
+ Hello [World]{.bg-blue-500}!
113
+ ```
114
+
115
+ ## `{}` Inline Props
116
+
117
+ Using the inline props syntax, you can pass props and attributes to your components. MDC goes a step further and allows you to pass attributes to markdown native elements like images, links, bold texts, and more.
118
+
119
+ To define properties for a component or a markdown element, you need to create a props scope `{}` exactly after the component/element definition. Then you can define the properties inline within this scope using a `key=value` syntax.
120
+
121
+ ```md
122
+ Inline :component{key="value" key2=value2}
123
+
124
+ ::block-component{no-border title="My Component"}
125
+ ::
126
+
127
+ [Link](https://nuxt.com){class="nuxt"}
128
+
129
+ ![Nuxt Logo](https://nuxt.com/assets/design-kit/logo/icon-green.svg){class=".nuxt-logo"}
130
+
131
+ `code`{style="color: red"}
132
+
133
+ _italic_{style="color: blue"}
134
+
135
+ **bold**{style="color: blue"}
136
+ ```
137
+
138
+ There are also a couple of sugar syntaxes for common use-cases:
139
+
140
+ - `id` attribute: `_italic_{#the_italic_text}`
141
+ - `class` attribute: `**bold**{.bold .text.with_attribute}`
142
+ - No value (boolean props): `:component{no-border}`
143
+ - Single string without any space: `**bold**{class=red}`
144
+
145
+ If you want to pass arrays or objects as props to components, you can pass them as a JSON string and prefix the prop key with a colon to automatically decode the JSON string. Note that in this case, you should use single quotes for the value string so you can use double quotes to pass a valid JSON string:
146
+
147
+ ```md
148
+ ::dropdown{:items='["Nuxt", "Vue", "React"]'}
149
+ String Array
150
+ ::
151
+
152
+ ::dropdown{:items='[1,2,3.5]'}
153
+ Number Array
154
+ ::
155
+
156
+ ::chart{:options='{"responsive": true, "scales": {"y": {"beginAtZero": true}}}'}
157
+ Object
158
+ ::
159
+ ```
160
+
161
+ ## `---` Yaml Props
162
+
163
+ The YAML method uses the `---` identifier to declare one prop per line, which can be useful for readability.
164
+
165
+ ```md
166
+ ::icon-card
167
+ ---
168
+ icon: IconNuxt
169
+ description: Harness the full power of Nuxt and the Nuxt ecosystem.
170
+ title: Nuxt Architecture.
171
+ ---
172
+ ::
173
+ ```
174
+
175
+ ## `{{}}` Binding Variables
176
+
177
+ The `{{ $doc.variable || 'defaultValue' }}` syntax allows you to bind variables in your Markdown content. This is especially useful when you want to dynamically insert values into your document.
178
+
179
+ To use this syntax, simply enclose the variable name within double curly braces, like so:
180
+
181
+ ```md
182
+ ---
183
+ color: blue
184
+ ---
185
+
186
+ # The color is {{ $doc.color || 'red' }}.
187
+ ```
@@ -0,0 +1,3 @@
1
+ title: Docs Components
2
+ icon: lucide:book
3
+ navigation.redirect: /components/docs/alert
@@ -0,0 +1,152 @@
1
+ ---
2
+ title: Alert
3
+ icon: lucide:triangle-alert
4
+ badges:
5
+ - value: Docus
6
+ to: https://docus.dev/api/components#alert
7
+ target: _blank
8
+ - value: Source
9
+ icon: lucide:code
10
+ to: https://github.com/ZTL-UwU/shadcn-docs-nuxt/blob/main/components/content/Alert.vue
11
+ target: _blank
12
+ ---
13
+
14
+ ## Usage
15
+
16
+ ::stack
17
+ ::div{class="p-4"}
18
+ ::alert{icon="lucide:info"}
19
+ A **default** alert with `code` and a [link](/).
20
+ ::
21
+
22
+ ::alert{type="success" icon="lucide:info"}
23
+ A **success** alert with `code` and a [link](/).
24
+ ::
25
+ ::
26
+ ```mdc
27
+ ::alert{icon="lucide:info"}
28
+ A **default** alert with `code` and a [link](/).
29
+ ::
30
+
31
+ ::alert{type="success" icon="lucide:info"}
32
+ A **success** alert with `code` and a [link](/).
33
+ ::
34
+ ```
35
+ ::
36
+
37
+ ### Link
38
+
39
+ ::stack
40
+ ::div{class="p-4"}
41
+ ::alert{to="/getting-started/introduction" icon="lucide:rocket"}
42
+ An **internal link** alert.
43
+ ::
44
+ ::alert{to="https://github.com/ZTL-UwU/shadcn-docs-nuxt" target="_blank" icon="lucide:link"}
45
+ An **external link** alert.
46
+ ::
47
+ ::
48
+ ```mdc
49
+ ::alert{to="/getting-started/introduction" icon="lucide:rocket"}
50
+ An **internal link** alert.
51
+ ::
52
+ ::alert{to="https://github.com/ZTL-UwU/shadcn-docs-nuxt" target="_blank" icon="lucide:link"}
53
+ An **external link** alert.
54
+ ::
55
+ ```
56
+ ::
57
+
58
+ ### Variants
59
+
60
+ ::tabs{variant="line"}
61
+ ::stack{label="info" icon="lucide:info"}
62
+ ::div{class="p-3"}
63
+ ::alert{type="info" icon="lucide:info"}
64
+ An **info** alert with `code` and a [link](/).
65
+ ::
66
+ ::
67
+ ```mdc
68
+ ::alert{type="info" icon="lucide:info"}
69
+ An **info** alert with `code` and a [link](/).
70
+ ::
71
+ ```
72
+ ::
73
+
74
+ ::stack{label="success" icon="lucide:lightbulb"}
75
+ ::div{class="p-3"}
76
+ ::alert{type="success" icon="lucide:lightbulb"}
77
+ A **success** alert with `code` and a [link](/).
78
+ ::
79
+ ::
80
+ ```mdc
81
+ ::alert{type="success" icon="lucide:lightbulb"}
82
+ A **success** alert with `code` and a [link](/).
83
+ ::
84
+ ```
85
+ ::
86
+
87
+ ::stack{label="warning" icon="lucide:triangle-alert"}
88
+ ::div{class="p-3"}
89
+ ::alert{type="warning" icon="lucide:triangle-alert"}
90
+ A **warning** alert with `code` and a [link](/).
91
+ ::
92
+ ::
93
+ ```mdc
94
+ ::alert{type="warning" icon="lucide:triangle-alert"}
95
+ A **warning** alert with `code` and a [link](/).
96
+ ::
97
+ ```
98
+ ::
99
+
100
+ ::stack{label="danger" icon="lucide:circle-x"}
101
+ ::div{class="p-3"}
102
+ ::alert{type="danger" icon="lucide:circle-x"}
103
+ A **danger** alert with `code` and a [link](/).
104
+ ::
105
+ ::
106
+ ```mdc
107
+ ::alert{type="danger" icon="lucide:circle-x"}
108
+ A **danger** alert with `code` and a [link](/).
109
+ ::
110
+ ```
111
+ ::
112
+
113
+ ::stack{label="example" icon="lucide:test-tube"}
114
+ ::div{class="p-3"}
115
+ ::alert{type="example" icon="lucide:test-tube"}
116
+ An **example** alert with `code` and a [link](/).
117
+ ::
118
+ ::
119
+ ```mdc
120
+ ::alert{type="example" icon="lucide:test-tube"}
121
+ An **example** alert with `code` and a [link](/).
122
+ ::
123
+ ```
124
+ ::
125
+ ::
126
+
127
+ ### Title
128
+
129
+ ::stack
130
+ ::div{class="p-4"}
131
+ ::alert{title="Title" icon="lucide:layout-list" type="info"}
132
+ An alert with a title.
133
+ ::
134
+ ::
135
+ ```mdc
136
+ ::alert{title="Title" icon="lucide:layout-list" type="info"}
137
+ An alert with a title.
138
+ ::
139
+ ```
140
+ ::
141
+
142
+ ## Props
143
+
144
+ ::field-group
145
+ :field{name="title" type="string"}[Alert title]
146
+ :field{name="icon" type="string"}[Alert icon]
147
+ :field{name="type" type="'default' | 'info' | 'warning' | 'success' | 'danger' | 'secondary'" default-value="'default'"}
148
+ :field{name="to" type="string"}[Link URL]
149
+ :field{name="target" type="Target"}[A `target` attribute value to apply on the link]
150
+ :field{name="external" type="boolean"}[Alias to `target='_blank'`]
151
+ :field{name="showLinkIcon" type="boolean" default-value="true"}[Whether to show the link indicator :icon{name="lucide:arrow-up-right"}]
152
+ ::
@@ -0,0 +1,131 @@
1
+ ---
2
+ title: Badge
3
+ icon: lucide:badge
4
+ badges:
5
+ - value: Docus
6
+ to: https://docus.dev/api/components#badge
7
+ target: _blank
8
+ - value: Source
9
+ icon: lucide:code
10
+ to: https://github.com/ZTL-UwU/shadcn-docs-nuxt/blob/main/components/content/Badge.vue
11
+ target: _blank
12
+ ---
13
+
14
+ ## Usage
15
+
16
+ ::stack
17
+ ::div{class="p-3"}
18
+ ::badge
19
+ Default
20
+ ::
21
+ ::badge{size="sm"}
22
+ Small
23
+ ::
24
+ ::badge{size="lg"}
25
+ Large
26
+ ::
27
+ ::
28
+ ```mdc
29
+ ::badge
30
+ Default
31
+ ::
32
+ ::badge{size="sm"}
33
+ Small
34
+ ::
35
+ ::badge{size="lg"}
36
+ Large
37
+ ::
38
+ ```
39
+ ::
40
+
41
+ ### Types
42
+
43
+ ::stack{label="default"}
44
+ ::div{class="p-3"}
45
+ :badge[Default]
46
+ :badge[Primary]{type="primary"}
47
+ :badge[Secondary]{type="secondary"}
48
+ :badge[Info]{type="info"}
49
+ :badge[Warning]{type="warning"}
50
+ :badge[Success]{type="success"}
51
+ :badge[Danger]{type="danger"}
52
+ :badge[New]{type="new"}
53
+ ::
54
+
55
+ ```mdc
56
+ :badge[Default]
57
+ :badge[Info]{type="info"}
58
+ :badge[Warning]{type="warning"}
59
+ :badge[Success]{type="success"}
60
+ :badge[Danger]{type="danger"}
61
+ :badge[New]{type="new"}
62
+ ```
63
+ ::
64
+
65
+ ### Variants
66
+
67
+ ::stack{label="default"}
68
+ ::div{class="p-3"}
69
+ :badge[Default]{variant="fill"}
70
+ :badge[Primary]{type="primary" variant="fill"}
71
+ :badge[Secondary]{type="secondary" variant="fill"}
72
+ :badge[Info]{type="info" variant="fill"}
73
+ :badge[Warning]{type="warning" variant="fill"}
74
+ :badge[Success]{type="success" variant="fill"}
75
+ :badge[Danger]{type="danger" variant="fill"}
76
+ :badge[New]{type="new" variant="fill"}
77
+ ::
78
+
79
+ ::div{class="p-3"}
80
+ :badge[Default]{variant="outline"}
81
+ :badge[Primary]{type="primary" variant="outline"}
82
+ :badge[Secondary]{type="secondary" variant="outline"}
83
+ :badge[Info]{type="info" variant="outline"}
84
+ :badge[Warning]{type="warning" variant="outline"}
85
+ :badge[Success]{type="success" variant="outline"}
86
+ :badge[Danger]{type="danger" variant="outline"}
87
+ :badge[New]{type="new" variant="outline"}
88
+ ::
89
+
90
+ ::div{class="p-3"}
91
+ :badge[Default]{variant="text"}
92
+ :badge[Primary]{type="primary" variant="text"}
93
+ :badge[Secondary]{type="secondary" variant="text"}
94
+ :badge[Info]{type="info" variant="text"}
95
+ :badge[Warning]{type="warning" variant="text"}
96
+ :badge[Success]{type="success" variant="text"}
97
+ :badge[Danger]{type="danger" variant="text"}
98
+ :badge[New]{type="new" variant="text"}
99
+ ::
100
+
101
+ ```mdc
102
+ :badge[...]{type="..." variant="fill"}
103
+ :badge[...]{type="..." variant="outline"}
104
+ :badge[...]{type="..." variant="text"}
105
+ ```
106
+ ::
107
+
108
+ ### Link
109
+
110
+ ::stack
111
+ ::div{class="p-3"}
112
+ ::badge{variant="outline" type="info" to="https://github.com/ZTL-UwU/shadcn-docs-nuxt" target="_blank"}
113
+ Link
114
+ ::
115
+ ::
116
+ ```mdc
117
+ ::badge{variant="outline" type="info" to="https://github.com/ZTL-UwU/shadcn-docs-nuxt" target="_blank"}
118
+ Link
119
+ ::
120
+ ```
121
+ ::
122
+
123
+ ## Props
124
+
125
+ ::field-group
126
+ :field{name="type" type="'default' | 'info' | 'warning' | 'success' | 'danger' | 'lime'" default-value="'default'"}
127
+ :field{name="variant" type="'default' | 'secondary' | 'destructive' | 'outline'" default-value="'default'"}
128
+ :field{name="size" type="'md' | 'sm'" default-value="'md'"}
129
+ :field{name="to" type="string"}[Link URL]
130
+ :field{name="target" type="Target"}[A `target` attribute value to apply on the link]
131
+ ::
@@ -0,0 +1,53 @@
1
+ ---
2
+ title: Button Link
3
+ icon: lucide:external-link
4
+ badges:
5
+ - value: Docus
6
+ to: https://docus.dev/api/components#buttonlink
7
+ target: _blank
8
+ - value: Source
9
+ icon: lucide:code
10
+ to: https://github.com/ZTL-UwU/shadcn-docs-nuxt/blob/main/components/content/ButtonLink.vue
11
+ target: _blank
12
+ - value: 0.6.5
13
+ ---
14
+
15
+ ## Usage
16
+
17
+ ::stack
18
+ ::div{class="p-3 flex gap-4"}
19
+ ::button-link{right-icon="lucide:arrow-up-right" to="/getting-started" target="_blank"}
20
+ Get Started
21
+ ::
22
+ ::button-link{left-icon="lucide:github" variant="outline" to="https://github.com/ZTL-UwU/shadcn-docs-nuxt" target="_blank"}
23
+ GitHub
24
+ ::
25
+ ::button-link{left-icon="lucide:ghost" variant="ghost" href="https://github.com/ZTL-UwU/shadcn-docs-nuxt" blank}
26
+ Ghost
27
+ ::
28
+ ::
29
+ ```mdc
30
+ ::button-link{right-icon="lucide:arrow-up-right" to="/getting-started" target="_blank"}
31
+ Get Started
32
+ ::
33
+ ::button-link{left-icon="lucide:github" variant="outline" to="https://github.com/ZTL-UwU/shadcn-docs-nuxt" target="_blank"}
34
+ GitHub
35
+ ::
36
+ ::button-link{left-icon="lucide:ghost" variant="ghost" href="https://github.com/ZTL-UwU/shadcn-docs-nuxt" blank}
37
+ Ghost
38
+ ::
39
+ ```
40
+ ::
41
+
42
+ ## Props
43
+
44
+ ::field-group
45
+ :field{name="variant" type="'default' | 'secondary' | 'link' | 'destructive' | 'outline' | 'ghost'" default-value="'default'"}
46
+ :field{name="size" type="'default' | 'icon' | 'sm' | 'xs' | 'lg'" default-value="'default'"}
47
+ :field{name="leftIcon" type="string"}[Icon on the left]
48
+ :field{name="rightIcon" type="string"}[Icon on the right]
49
+ :field{name="to" type="string"}[Link URL]
50
+ :field{name="href" type="string"}[Alias to `to`]
51
+ :field{name="target" type="Target"}[A `target` attribute value to apply on the link]
52
+ :field{name="blank" type="boolean"}[Alias to `target='_blank'`]
53
+ ::
@@ -0,0 +1,16 @@
1
+ ---
2
+ title: Callout
3
+ icon: lucide:megaphone
4
+ badges:
5
+ - value: Nuxt UI Pro
6
+ to: https://ui.nuxt.com/pro/prose/callout
7
+ target: _blank
8
+ - value: Source
9
+ icon: lucide:code
10
+ to: https://github.com/ZTL-UwU/shadcn-docs-nuxt/blob/main/components/content/Callout.vue
11
+ target: _blank
12
+ ---
13
+
14
+ ::alert{to="/components/docs/alert"}
15
+ `::callout`{lang="mdc"} is an alias to `::alert`{lang="mdc"}.
16
+ ::
@@ -0,0 +1,77 @@
1
+ ---
2
+ title: Code Group
3
+ icon: lucide:code-xml
4
+ badges:
5
+ - value: Nuxt UI Pro
6
+ to: https://ui.nuxt.com/pro/prose/code-group
7
+ target: _blank
8
+ - value: Docus
9
+ to: https://docus.dev/api/components#codegroup
10
+ target: _blank
11
+ - value: Source
12
+ icon: lucide:code
13
+ to: https://github.com/ZTL-UwU/shadcn-docs-nuxt/blob/main/components/content/CodeGroup.vue
14
+ target: _blank
15
+ ---
16
+
17
+ ## Usage
18
+
19
+ ::stack
20
+ ::div{class="p-4"}
21
+ ::code-group
22
+ ```vue [app.vue]
23
+ <template>
24
+ <div>
25
+ <NuxtLayout>
26
+ <NuxtPage />
27
+ </NuxtLayout>
28
+ </div>
29
+ </template>
30
+ ```
31
+
32
+ ```vue [pages/index.vue]
33
+ <template>
34
+ <div>
35
+ <h1>Welcome to the homepage</h1>
36
+ <AppAlert>
37
+ This is an auto-imported component
38
+ </AppAlert>
39
+ </div>
40
+ </template>
41
+ ```
42
+ ::
43
+ ::
44
+
45
+ ```mdc
46
+ ::code-group
47
+ ```vue [app.vue]
48
+ <template>
49
+ <div>
50
+ <NuxtLayout>
51
+ <NuxtPage />
52
+ </NuxtLayout>
53
+ </div>
54
+ </template>
55
+ ```
56
+
57
+ ```vue [pages/index.vue]
58
+ <template>
59
+ <div>
60
+ <h1>Welcome to the homepage</h1>
61
+ <AppAlert>
62
+ This is an auto-imported component
63
+ </AppAlert>
64
+ </div>
65
+ </template>
66
+ ```
67
+ ::
68
+ ```
69
+ ::
70
+
71
+ ::alert{to="/components/docs/tabs"}
72
+ `::code-group`{lang="mdc"} is a wrapper around `::tabs{variant="card"}`{lang="mdc"}.
73
+ ::
74
+
75
+ ## Props
76
+
77
+ :field{name="sync" type="string"}[Sync scope for `::tabs`]