fulldev-ui 0.6.5 → 0.7.0-beta.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 (476) hide show
  1. package/.prettierrc.yaml +10 -3
  2. package/README.md +2 -1
  3. package/astro.config.ts +20 -17
  4. package/components.json +18 -0
  5. package/package.json +61 -34
  6. package/pnpm-lock.yaml +3690 -1465
  7. package/public/images/categories/journals.jpg +0 -0
  8. package/public/images/categories/productivity.jpg +0 -0
  9. package/public/images/categories/workspace.jpg +0 -0
  10. package/public/images/leather-long-wallet.jpg +0 -0
  11. package/public/images/products/earthen-mug.jpg +0 -0
  12. package/public/images/products/leather-long-wallet.jpg +0 -0
  13. package/public/images/products/leatherbound-daily-journal-set.jpg +0 -0
  14. package/public/images/products/leatherbound-daily-journal.jpg +0 -0
  15. package/public/images/products/machines-pen.jpg +0 -0
  16. package/public/images/products/machines-pencil-and-pen-set.jpg +0 -0
  17. package/public/images/products/mini-sketchbooks.jpg +0 -0
  18. package/public/images/products/organizer-set.jpg +0 -0
  19. package/src/blocks/CategoryGroup1.astro +43 -0
  20. package/src/blocks/CategoryList1.astro +55 -0
  21. package/src/blocks/Contact1.astro +34 -77
  22. package/src/blocks/Contact2.astro +31 -77
  23. package/src/blocks/Content1.astro +18 -30
  24. package/src/blocks/Cta1.astro +18 -58
  25. package/src/blocks/Faqs1.astro +29 -0
  26. package/src/blocks/Faqs2.astro +29 -0
  27. package/src/blocks/Features1.astro +25 -61
  28. package/src/blocks/Footer.astro +47 -71
  29. package/src/blocks/Header.astro +68 -123
  30. package/src/blocks/Hero1.astro +23 -54
  31. package/src/blocks/Intro1.astro +16 -58
  32. package/src/blocks/PostSingle1.astro +29 -0
  33. package/src/blocks/ProductGroup1.astro +82 -0
  34. package/src/blocks/ProductList1.astro +60 -0
  35. package/src/blocks/ProductSingle1.astro +64 -0
  36. package/src/blocks/Reviews1.astro +23 -67
  37. package/src/components/Abstract.astro +36 -0
  38. package/src/components/Accordion.vue +31 -0
  39. package/src/components/Avatar.astro +23 -32
  40. package/src/components/Badge.astro +10 -58
  41. package/src/components/Block.astro +20 -20
  42. package/src/components/Box.astro +28 -0
  43. package/src/components/Button.astro +38 -78
  44. package/src/components/Buttons.astro +41 -19
  45. package/src/components/Card.astro +20 -0
  46. package/src/components/Carousel.vue +44 -0
  47. package/src/components/Chip.astro +27 -0
  48. package/src/{structures → components}/Code.astro +27 -8
  49. package/src/components/Container.astro +25 -0
  50. package/src/components/Drawer.vue +53 -0
  51. package/src/components/Form.vue +82 -0
  52. package/src/components/Gallery.vue +85 -0
  53. package/src/components/Grid.astro +35 -0
  54. package/src/components/Icon.astro +12 -45
  55. package/src/components/Image.astro +6 -28
  56. package/src/components/Layout.astro +126 -0
  57. package/src/components/Link.astro +7 -65
  58. package/src/components/List.astro +13 -77
  59. package/src/components/Logo.astro +16 -35
  60. package/src/components/Masonry.astro +35 -0
  61. package/src/components/Menu.astro +31 -36
  62. package/src/components/Menus.astro +15 -10
  63. package/src/components/Navigation.vue +93 -0
  64. package/src/components/Panel.astro +18 -0
  65. package/src/components/Person.astro +43 -0
  66. package/src/components/Price.astro +26 -11
  67. package/src/components/Proof.astro +16 -37
  68. package/src/components/{docs/Props.astro → Props.astro} +3 -3
  69. package/src/components/Prose.astro +28 -0
  70. package/src/components/Rating.astro +5 -24
  71. package/src/components/Search.vue +65 -0
  72. package/src/components/Section.astro +18 -0
  73. package/src/components/Select.vue +41 -0
  74. package/src/components/Separator.astro +0 -0
  75. package/src/components/Sidebar.astro +50 -0
  76. package/src/components/Social.astro +8 -15
  77. package/src/components/Socials.astro +21 -19
  78. package/src/components/Sort.vue +46 -0
  79. package/src/components/Split.astro +27 -0
  80. package/src/components/Table.astro +17 -17
  81. package/src/components/Themer.astro +12 -3
  82. package/src/components/Toc.astro +24 -21
  83. package/src/components/Writeup.astro +37 -0
  84. package/src/components/ui/accordion/Accordion.vue +19 -0
  85. package/src/components/ui/accordion/AccordionContent.vue +24 -0
  86. package/src/components/ui/accordion/AccordionItem.vue +24 -0
  87. package/src/components/ui/accordion/AccordionTrigger.vue +33 -0
  88. package/src/components/ui/accordion/index.ts +4 -0
  89. package/src/components/ui/auto-form/AutoForm.vue +115 -0
  90. package/src/components/ui/auto-form/AutoFormField.vue +45 -0
  91. package/src/components/ui/auto-form/AutoFormFieldArray.vue +127 -0
  92. package/src/components/ui/auto-form/AutoFormFieldBoolean.vue +47 -0
  93. package/src/components/ui/auto-form/AutoFormFieldDate.vue +78 -0
  94. package/src/components/ui/auto-form/AutoFormFieldEnum.vue +77 -0
  95. package/src/components/ui/auto-form/AutoFormFieldFile.vue +87 -0
  96. package/src/components/ui/auto-form/AutoFormFieldInput.vue +42 -0
  97. package/src/components/ui/auto-form/AutoFormFieldNumber.vue +42 -0
  98. package/src/components/ui/auto-form/AutoFormFieldObject.vue +90 -0
  99. package/src/components/ui/auto-form/AutoFormLabel.vue +19 -0
  100. package/src/components/ui/auto-form/constant.ts +40 -0
  101. package/src/components/ui/auto-form/dependencies.ts +92 -0
  102. package/src/components/ui/auto-form/index.ts +15 -0
  103. package/src/components/ui/auto-form/interface.ts +95 -0
  104. package/src/components/ui/auto-form/utils.ts +188 -0
  105. package/src/components/ui/avatar/Avatar.vue +24 -0
  106. package/src/components/ui/avatar/AvatarFallback.vue +11 -0
  107. package/src/components/ui/avatar/AvatarImage.vue +9 -0
  108. package/src/components/ui/avatar/index.ts +24 -0
  109. package/src/components/ui/badge/Badge.vue +16 -0
  110. package/src/components/ui/badge/index.ts +22 -0
  111. package/src/components/ui/breadcrumb/Breadcrumb.vue +13 -0
  112. package/src/components/ui/breadcrumb/BreadcrumbEllipsis.vue +22 -0
  113. package/src/components/ui/breadcrumb/BreadcrumbItem.vue +14 -0
  114. package/src/components/ui/breadcrumb/BreadcrumbLink.vue +19 -0
  115. package/src/components/ui/breadcrumb/BreadcrumbList.vue +16 -0
  116. package/src/components/ui/breadcrumb/BreadcrumbPage.vue +19 -0
  117. package/src/components/ui/breadcrumb/BreadcrumbSeparator.vue +21 -0
  118. package/src/components/ui/breadcrumb/index.ts +7 -0
  119. package/src/components/ui/button/Button.vue +26 -0
  120. package/src/components/ui/button/index.ts +31 -0
  121. package/src/components/ui/calendar/Calendar.vue +80 -0
  122. package/src/components/ui/calendar/CalendarCell.vue +29 -0
  123. package/src/components/ui/calendar/CalendarCellTrigger.vue +40 -0
  124. package/src/components/ui/calendar/CalendarGrid.vue +24 -0
  125. package/src/components/ui/calendar/CalendarGridBody.vue +11 -0
  126. package/src/components/ui/calendar/CalendarGridHead.vue +11 -0
  127. package/src/components/ui/calendar/CalendarGridRow.vue +24 -0
  128. package/src/components/ui/calendar/CalendarHeadCell.vue +24 -0
  129. package/src/components/ui/calendar/CalendarHeader.vue +24 -0
  130. package/src/components/ui/calendar/CalendarHeading.vue +27 -0
  131. package/src/components/ui/calendar/CalendarNextButton.vue +30 -0
  132. package/src/components/ui/calendar/CalendarPrevButton.vue +30 -0
  133. package/src/components/ui/calendar/index.ts +12 -0
  134. package/src/components/ui/card/Card.vue +14 -0
  135. package/src/components/ui/card/CardContent.vue +14 -0
  136. package/src/components/ui/card/CardDescription.vue +14 -0
  137. package/src/components/ui/card/CardFooter.vue +14 -0
  138. package/src/components/ui/card/CardHeader.vue +14 -0
  139. package/src/components/ui/card/CardTitle.vue +14 -0
  140. package/src/components/ui/card/index.ts +6 -0
  141. package/src/components/ui/carousel/Carousel.vue +61 -0
  142. package/src/components/ui/carousel/CarouselContent.vue +27 -0
  143. package/src/components/ui/carousel/CarouselItem.vue +19 -0
  144. package/src/components/ui/carousel/CarouselNext.vue +33 -0
  145. package/src/components/ui/carousel/CarouselPrevious.vue +33 -0
  146. package/src/components/ui/carousel/index.ts +10 -0
  147. package/src/components/ui/carousel/interface.ts +26 -0
  148. package/src/components/ui/carousel/useCarousel.ts +56 -0
  149. package/src/components/ui/checkbox/Checkbox.vue +36 -0
  150. package/src/components/ui/checkbox/index.ts +1 -0
  151. package/src/components/ui/collapsible/Collapsible.vue +15 -0
  152. package/src/components/ui/collapsible/CollapsibleContent.vue +11 -0
  153. package/src/components/ui/collapsible/CollapsibleTrigger.vue +11 -0
  154. package/src/components/ui/collapsible/index.ts +3 -0
  155. package/src/components/ui/command/Command.vue +32 -0
  156. package/src/components/ui/command/CommandDialog.vue +23 -0
  157. package/src/components/ui/command/CommandEmpty.vue +23 -0
  158. package/src/components/ui/command/CommandGroup.vue +39 -0
  159. package/src/components/ui/command/CommandInput.vue +43 -0
  160. package/src/components/ui/command/CommandItem.vue +31 -0
  161. package/src/components/ui/command/CommandList.vue +30 -0
  162. package/src/components/ui/command/CommandSeparator.vue +23 -0
  163. package/src/components/ui/command/CommandShortcut.vue +14 -0
  164. package/src/components/ui/command/index.ts +9 -0
  165. package/src/components/ui/dialog/Dialog.vue +14 -0
  166. package/src/components/ui/dialog/DialogClose.vue +11 -0
  167. package/src/components/ui/dialog/DialogContent.vue +51 -0
  168. package/src/components/ui/dialog/DialogDescription.vue +24 -0
  169. package/src/components/ui/dialog/DialogFooter.vue +12 -0
  170. package/src/components/ui/dialog/DialogHeader.vue +14 -0
  171. package/src/components/ui/dialog/DialogScrollContent.vue +59 -0
  172. package/src/components/ui/dialog/DialogTitle.vue +24 -0
  173. package/src/components/ui/dialog/DialogTrigger.vue +11 -0
  174. package/src/components/ui/dialog/index.ts +9 -0
  175. package/src/components/ui/drawer/Drawer.vue +19 -0
  176. package/src/components/ui/drawer/DrawerContent.vue +31 -0
  177. package/src/components/ui/drawer/DrawerDescription.vue +23 -0
  178. package/src/components/ui/drawer/DrawerFooter.vue +14 -0
  179. package/src/components/ui/drawer/DrawerHeader.vue +14 -0
  180. package/src/components/ui/drawer/DrawerOverlay.vue +21 -0
  181. package/src/components/ui/drawer/DrawerTitle.vue +23 -0
  182. package/src/components/ui/drawer/index.ts +8 -0
  183. package/src/components/ui/form/FormControl.vue +16 -0
  184. package/src/components/ui/form/FormDescription.vue +20 -0
  185. package/src/components/ui/form/FormItem.vue +19 -0
  186. package/src/components/ui/form/FormLabel.vue +20 -0
  187. package/src/components/ui/form/FormMessage.vue +16 -0
  188. package/src/components/ui/form/index.ts +7 -0
  189. package/src/components/ui/form/injectionKeys.ts +4 -0
  190. package/src/components/ui/form/useFormField.ts +30 -0
  191. package/src/components/ui/input/Input.vue +32 -0
  192. package/src/components/ui/input/index.ts +1 -0
  193. package/src/components/ui/label/Label.vue +24 -0
  194. package/src/components/ui/label/index.ts +1 -0
  195. package/src/components/ui/navigation-menu/NavigationMenu.vue +33 -0
  196. package/src/components/ui/navigation-menu/NavigationMenuContent.vue +36 -0
  197. package/src/components/ui/navigation-menu/NavigationMenuIndicator.vue +29 -0
  198. package/src/components/ui/navigation-menu/NavigationMenuItem.vue +11 -0
  199. package/src/components/ui/navigation-menu/NavigationMenuLink.vue +19 -0
  200. package/src/components/ui/navigation-menu/NavigationMenuList.vue +24 -0
  201. package/src/components/ui/navigation-menu/NavigationMenuTrigger.vue +30 -0
  202. package/src/components/ui/navigation-menu/NavigationMenuViewport.vue +29 -0
  203. package/src/components/ui/navigation-menu/index.ts +14 -0
  204. package/src/components/ui/popover/Popover.vue +15 -0
  205. package/src/components/ui/popover/PopoverContent.vue +45 -0
  206. package/src/components/ui/popover/PopoverTrigger.vue +11 -0
  207. package/src/components/ui/popover/index.ts +3 -0
  208. package/src/components/ui/radio-group/RadioGroup.vue +25 -0
  209. package/src/components/ui/radio-group/RadioGroupItem.vue +32 -0
  210. package/src/components/ui/radio-group/index.ts +2 -0
  211. package/src/components/ui/select/Select.vue +15 -0
  212. package/src/components/ui/select/SelectContent.vue +59 -0
  213. package/src/components/ui/select/SelectGroup.vue +22 -0
  214. package/src/components/ui/select/SelectItem.vue +38 -0
  215. package/src/components/ui/select/SelectItemText.vue +11 -0
  216. package/src/components/ui/select/SelectLabel.vue +13 -0
  217. package/src/components/ui/select/SelectScrollDownButton.vue +27 -0
  218. package/src/components/ui/select/SelectScrollUpButton.vue +27 -0
  219. package/src/components/ui/select/SelectSeparator.vue +20 -0
  220. package/src/components/ui/select/SelectTrigger.vue +33 -0
  221. package/src/components/ui/select/SelectValue.vue +11 -0
  222. package/src/components/ui/select/index.ts +11 -0
  223. package/src/components/ui/separator/Separator.vue +33 -0
  224. package/src/components/ui/separator/index.ts +1 -0
  225. package/src/components/ui/switch/Switch.vue +39 -0
  226. package/src/components/ui/switch/index.ts +1 -0
  227. package/src/components/ui/textarea/Textarea.vue +32 -0
  228. package/src/components/ui/textarea/index.ts +1 -0
  229. package/src/lib/utils.ts +6 -0
  230. package/src/schemas/blocks/categoryGroup.ts +17 -0
  231. package/src/schemas/blocks/categoryList.ts +18 -0
  232. package/src/schemas/blocks/categorySingle.ts +12 -0
  233. package/src/schemas/blocks/contact.ts +13 -0
  234. package/src/schemas/blocks/content.ts +13 -0
  235. package/src/schemas/blocks/cta.ts +11 -0
  236. package/src/schemas/blocks/faqs.ts +17 -0
  237. package/src/schemas/blocks/features.ts +16 -0
  238. package/src/schemas/blocks/footer.ts +16 -0
  239. package/src/schemas/{header.ts → blocks/header.ts} +5 -8
  240. package/src/schemas/blocks/hero.ts +15 -0
  241. package/src/schemas/blocks/intro.ts +9 -0
  242. package/src/schemas/blocks/postSingle.ts +12 -0
  243. package/src/schemas/blocks/productGroup.ts +17 -0
  244. package/src/schemas/blocks/productList.ts +18 -0
  245. package/src/schemas/blocks/productSingle.ts +17 -0
  246. package/src/schemas/blocks/reviews.ts +16 -0
  247. package/src/schemas/fields/badge.ts +9 -0
  248. package/src/schemas/fields/block.ts +60 -0
  249. package/src/schemas/fields/button.ts +12 -0
  250. package/src/schemas/fields/card.ts +28 -0
  251. package/src/schemas/fields/channel.ts +10 -0
  252. package/src/schemas/fields/form.ts +20 -0
  253. package/src/schemas/fields/image.ts +8 -0
  254. package/src/schemas/fields/link.ts +9 -0
  255. package/src/schemas/fields/logo.ts +10 -0
  256. package/src/schemas/fields/menu.ts +10 -0
  257. package/src/schemas/fields/meta.ts +14 -0
  258. package/src/schemas/fields/proof.ts +11 -0
  259. package/src/schemas/fields/section.ts +48 -0
  260. package/tailwind.config.js +111 -0
  261. package/tsconfig.json +5 -7
  262. package/.env.example +0 -3
  263. package/.vscode/settings.json +0 -25
  264. package/CONTRIBUTING.md +0 -124
  265. package/cloudcannon.config.yml +0 -207
  266. package/public/favicon/android-chrome-192x192.png +0 -0
  267. package/public/favicon/android-chrome-512x512.png +0 -0
  268. package/public/favicon/apple-touch-icon.png +0 -0
  269. package/public/favicon/browserconfig.xml +0 -9
  270. package/public/favicon/favicon-16x16.png +0 -0
  271. package/public/favicon/favicon-32x32.png +0 -0
  272. package/public/favicon/favicon-48x48.png +0 -0
  273. package/public/favicon/favicon.ico +0 -0
  274. package/public/favicon/favicon.svg +0 -16
  275. package/public/favicon/manifest.webmanifest +0 -30
  276. package/public/favicon/mstile-150x150.png +0 -0
  277. package/public/favicon/safari-pinned-tab.svg +0 -16
  278. package/public/favicon/yandex-browser-50x50.png +0 -0
  279. package/public/favicon/yandex-browser-manifest.json +0 -9
  280. package/siteicon.png +0 -0
  281. package/src/blocks/Banner.astro +0 -31
  282. package/src/blocks/Colleagues1.astro +0 -74
  283. package/src/blocks/Compare1.astro +0 -64
  284. package/src/blocks/Content2.astro +0 -47
  285. package/src/blocks/Content3.astro +0 -47
  286. package/src/blocks/Content4.astro +0 -52
  287. package/src/blocks/Content5.astro +0 -43
  288. package/src/blocks/Content6.astro +0 -57
  289. package/src/blocks/Content7.astro +0 -65
  290. package/src/blocks/Content8.astro +0 -48
  291. package/src/blocks/Cta2.astro +0 -52
  292. package/src/blocks/Features2.astro +0 -71
  293. package/src/blocks/JobCategories1.astro +0 -61
  294. package/src/blocks/JobCategory1.astro +0 -92
  295. package/src/blocks/Jobs1.astro +0 -74
  296. package/src/blocks/Logos1.astro +0 -55
  297. package/src/blocks/Pages1.astro +0 -85
  298. package/src/blocks/Pricings1.astro +0 -61
  299. package/src/blocks/Products1.astro +0 -87
  300. package/src/blocks/Projects1.astro +0 -79
  301. package/src/blocks/Subheader.astro +0 -53
  302. package/src/components/Avatars.astro +0 -20
  303. package/src/components/Badges.astro +0 -20
  304. package/src/components/Cart.astro +0 -42
  305. package/src/components/CartAdd.svelte +0 -76
  306. package/src/components/CartCheckout.svelte +0 -58
  307. package/src/components/CartForm.svelte +0 -130
  308. package/src/components/CartList.svelte +0 -88
  309. package/src/components/CartQuantity.svelte +0 -81
  310. package/src/components/CartSummary.astro +0 -59
  311. package/src/components/CartTotal.svelte +0 -15
  312. package/src/components/Channel.astro +0 -89
  313. package/src/components/Channels.astro +0 -20
  314. package/src/components/Checkbox.astro +0 -76
  315. package/src/components/Element.astro +0 -70
  316. package/src/components/Field.astro +0 -33
  317. package/src/components/Fields.astro +0 -20
  318. package/src/components/Form.astro +0 -34
  319. package/src/components/Gallery.astro +0 -175
  320. package/src/components/Head.astro +0 -94
  321. package/src/components/Heading.astro +0 -91
  322. package/src/components/Input.astro +0 -115
  323. package/src/components/Label.astro +0 -42
  324. package/src/components/Links.astro +0 -20
  325. package/src/components/Paragraph.astro +0 -54
  326. package/src/components/Search.astro +0 -118
  327. package/src/components/Select.astro +0 -114
  328. package/src/components/Switch.astro +0 -81
  329. package/src/components/Tagline.astro +0 -49
  330. package/src/components/Textarea.astro +0 -78
  331. package/src/components/Toggle.astro +0 -45
  332. package/src/components/_Breadcrumb.astro +0 -58
  333. package/src/components/_Image.astro +0 -79
  334. package/src/components/_LocaleSwitcher.astro +0 -25
  335. package/src/content/config.ts +0 -18
  336. package/src/content/layouts/base.yml +0 -166
  337. package/src/content/pages/_base/toggle.mdx +0 -28
  338. package/src/content/pages/_posts/post.md +0 -7
  339. package/src/content/pages/_showcase/anti-slip-profiles.md +0 -5
  340. package/src/content/pages/_showcase/fulldev-ui.md +0 -5
  341. package/src/content/pages/_showcase/lavis-detailing.md +0 -5
  342. package/src/content/pages/_showcase/leren-trainingsacteren.md +0 -5
  343. package/src/content/pages/_showcase/miele-witgoedcenter-amsterdam.md +0 -5
  344. package/src/content/pages/_showcase/sloepverhuur-bolsward.md +0 -5
  345. package/src/content/pages/_showcase/stark-vulcanising-products.md +0 -4
  346. package/src/content/pages/_showcase/the-gym-haren.md +0 -5
  347. package/src/content/pages/_showcase/van-dillen-antieke-bouwmaterialen.md +0 -5
  348. package/src/content/pages/docs/blocks/_categories.mdx +0 -129
  349. package/src/content/pages/docs/blocks/_contact.mdx +0 -67
  350. package/src/content/pages/docs/blocks/_jobs.mdx +0 -34
  351. package/src/content/pages/docs/blocks/_posts.mdx +0 -45
  352. package/src/content/pages/docs/blocks/_stats.mdx +0 -32
  353. package/src/content/pages/docs/blocks/banner.mdx +0 -12
  354. package/src/content/pages/docs/blocks/colleagues.mdx +0 -49
  355. package/src/content/pages/docs/blocks/content.mdx +0 -316
  356. package/src/content/pages/docs/blocks/cta.mdx +0 -16
  357. package/src/content/pages/docs/blocks/features.mdx +0 -100
  358. package/src/content/pages/docs/blocks/footer.mdx +0 -46
  359. package/src/content/pages/docs/blocks/header.mdx +0 -60
  360. package/src/content/pages/docs/blocks/hero.mdx +0 -18
  361. package/src/content/pages/docs/blocks/intro.mdx +0 -16
  362. package/src/content/pages/docs/blocks/logos.mdx +0 -37
  363. package/src/content/pages/docs/blocks/projects.mdx +0 -36
  364. package/src/content/pages/docs/blocks/reviews.mdx +0 -65
  365. package/src/content/pages/docs/blocks.mdx +0 -52
  366. package/src/content/pages/docs/collections/images.mdx +0 -102
  367. package/src/content/pages/docs/collections/pages.mdx +0 -119
  368. package/src/content/pages/docs/collections/presets.mdx +0 -60
  369. package/src/content/pages/docs/components/_localeswitcher.mdx +0 -16
  370. package/src/content/pages/docs/components/_table.mdx +0 -101
  371. package/src/content/pages/docs/components/_tagline.mdx +0 -34
  372. package/src/content/pages/docs/components/_themer.mdx +0 -47
  373. package/src/content/pages/docs/components/_toggle.mdx +0 -30
  374. package/src/content/pages/docs/components/avatar.mdx +0 -32
  375. package/src/content/pages/docs/components/badge.mdx +0 -42
  376. package/src/content/pages/docs/components/badges.mdx +0 -33
  377. package/src/content/pages/docs/components/button.mdx +0 -76
  378. package/src/content/pages/docs/components/buttons.mdx +0 -50
  379. package/src/content/pages/docs/components/channel.mdx +0 -89
  380. package/src/content/pages/docs/components/channels.mdx +0 -90
  381. package/src/content/pages/docs/components/checkbox.mdx +0 -32
  382. package/src/content/pages/docs/components/heading.mdx +0 -49
  383. package/src/content/pages/docs/components/icon.mdx +0 -46
  384. package/src/content/pages/docs/components/image.mdx +0 -20
  385. package/src/content/pages/docs/components/input.mdx +0 -38
  386. package/src/content/pages/docs/components/label.mdx +0 -42
  387. package/src/content/pages/docs/components/link.mdx +0 -63
  388. package/src/content/pages/docs/components/links.mdx +0 -57
  389. package/src/content/pages/docs/components/list.mdx +0 -53
  390. package/src/content/pages/docs/components/logo.mdx +0 -24
  391. package/src/content/pages/docs/components/menu.mdx +0 -48
  392. package/src/content/pages/docs/components/paragraph.mdx +0 -44
  393. package/src/content/pages/docs/components/rating.mdx +0 -43
  394. package/src/content/pages/docs/components/select.mdx +0 -46
  395. package/src/content/pages/docs/components/social.mdx +0 -92
  396. package/src/content/pages/docs/components/socials.mdx +0 -103
  397. package/src/content/pages/docs/components/switch.mdx +0 -32
  398. package/src/content/pages/docs/components/tagline.mdx +0 -42
  399. package/src/content/pages/docs/components/textarea.mdx +0 -32
  400. package/src/content/pages/docs/components.mdx +0 -36
  401. package/src/content/pages/docs/customization.mdx +0 -183
  402. package/src/content/pages/docs/frameworks.mdx +0 -30
  403. package/src/content/pages/docs/index.mdx +0 -21
  404. package/src/content/pages/docs/installation.mdx +0 -30
  405. package/src/content/pages/docs/layouts/doc.mdx +0 -15
  406. package/src/content/pages/docs/layouts/page.mdx +0 -15
  407. package/src/content/pages/docs/pages.mdx +0 -130
  408. package/src/content/pages/docs/structures/_card.mdx +0 -84
  409. package/src/content/pages/docs/structures/_dialog.mdx +0 -15
  410. package/src/content/pages/docs/structures/_drawer.mdx +0 -15
  411. package/src/content/pages/docs/structures/card.mdx +0 -15
  412. package/src/content/pages/docs/structures/carousel.mdx +0 -14
  413. package/src/content/pages/docs/structures/code.mdx +0 -42
  414. package/src/content/pages/docs/structures/container.mdx +0 -15
  415. package/src/content/pages/docs/structures/drawer.mdx +0 -15
  416. package/src/content/pages/docs/structures/group.mdx +0 -15
  417. package/src/content/pages/docs/structures/layout.mdx +0 -15
  418. package/src/content/pages/docs/structures/masonry.mdx +0 -15
  419. package/src/content/pages/docs/structures/matrix.mdx +0 -15
  420. package/src/content/pages/docs/structures/panel.mdx +0 -15
  421. package/src/content/pages/docs/structures/prose.mdx +0 -33
  422. package/src/content/pages/docs/structures/section.mdx +0 -15
  423. package/src/content/pages/docs/structures/stack.mdx +0 -15
  424. package/src/content/pages/docs/structures/writeup.mdx +0 -15
  425. package/src/content/pages/docs/structures.mdx +0 -7
  426. package/src/content/pages/index.mdx +0 -52
  427. package/src/content/pages/showcase.mdx +0 -30
  428. package/src/css/custom.css +0 -24
  429. package/src/css/theme.css +0 -62
  430. package/src/env.d.ts +0 -3
  431. package/src/integration/index.ts +0 -185
  432. package/src/layouts/Page.astro +0 -64
  433. package/src/layouts/_Product.astro +0 -115
  434. package/src/pages/[...page].astro +0 -49
  435. package/src/pages/test.astro +0 -16
  436. package/src/schemas/badge.ts +0 -14
  437. package/src/schemas/block.ts +0 -42
  438. package/src/schemas/button.ts +0 -17
  439. package/src/schemas/card.ts +0 -43
  440. package/src/schemas/channel.ts +0 -15
  441. package/src/schemas/checkbox.ts +0 -13
  442. package/src/schemas/footer.ts +0 -17
  443. package/src/schemas/head.ts +0 -17
  444. package/src/schemas/image.ts +0 -53
  445. package/src/schemas/input.ts +0 -13
  446. package/src/schemas/link.ts +0 -14
  447. package/src/schemas/logo.ts +0 -13
  448. package/src/schemas/menu.ts +0 -11
  449. package/src/schemas/page.ts +0 -23
  450. package/src/schemas/proof.ts +0 -12
  451. package/src/schemas/textarea.ts +0 -11
  452. package/src/stores/cart.svelte.ts +0 -78
  453. package/src/stores/cart.ts +0 -76
  454. package/src/structures/Card.astro +0 -35
  455. package/src/structures/Carousel.astro +0 -106
  456. package/src/structures/Container.astro +0 -25
  457. package/src/structures/Drawer.astro +0 -81
  458. package/src/structures/Group.astro +0 -25
  459. package/src/structures/Layout.astro +0 -34
  460. package/src/structures/Masonry.astro +0 -42
  461. package/src/structures/Matrix.astro +0 -39
  462. package/src/structures/Panel.astro +0 -25
  463. package/src/structures/Prose.astro +0 -96
  464. package/src/structures/Section.astro +0 -26
  465. package/src/structures/Sidebar.astro +0 -36
  466. package/src/structures/Split.astro +0 -38
  467. package/src/structures/Stack.astro +0 -25
  468. package/src/structures/Writeup.astro +0 -67
  469. package/src/structures/_Bento.astro +0 -34
  470. package/src/utils/cart.ts +0 -27
  471. package/src/utils/getHref.ts +0 -6
  472. package/src/utils/slugify.ts +0 -6
  473. package/svelte.config.js +0 -5
  474. package/tailwind.config.ts +0 -72
  475. package/virtual.d.ts +0 -5
  476. /package/src/schemas/{path.ts → fields/path.ts} +0 -0
@@ -0,0 +1,82 @@
1
+ ---
2
+ import Box from 'fulldev-ui/components/Box.astro'
3
+ import Container from 'fulldev-ui/components/Container.astro'
4
+ import Grid from 'fulldev-ui/components/Grid.astro'
5
+ import Image from 'fulldev-ui/components/Image.astro'
6
+ import Price from 'fulldev-ui/components/Price.astro'
7
+ import Prose from 'fulldev-ui/components/Prose.astro'
8
+ import Section from 'fulldev-ui/components/Section.astro'
9
+ // import Sort from 'fulldev-ui/components/Sort.vue'
10
+ import Writeup from 'fulldev-ui/components/Writeup.astro'
11
+ import type { ProductGroupSchema } from 'fulldev-ui/schemas/blocks/productGroup'
12
+
13
+ interface Props extends ProductGroupSchema {}
14
+
15
+ const { title, description, products } = Astro.props
16
+ ---
17
+
18
+ <Section class="pt-0">
19
+ <Container class="flex flex-col gap-12">
20
+ <Box class="border-b py-12">
21
+ <Writeup
22
+ align="start"
23
+ size="sm"
24
+ >
25
+ <Box as="h1">{title}</Box>
26
+ <Box as="p">{description}</Box>
27
+ </Writeup>
28
+ </Box>
29
+ <!-- <Box class="flex shrink items-center justify-between gap-4 border-t py-4">
30
+ <Box
31
+ as="p"
32
+ class="text-sm text-muted-foreground"
33
+ >
34
+ {products?.length} producten
35
+ </Box>
36
+ <Sort
37
+ client:load
38
+ options={[
39
+ { label: 'Aanbevolen', value: 'recommended' },
40
+ { label: 'Prijs (laag - hoog)', value: 'price-low' },
41
+ { label: 'Prijs (hoog - laag)', value: 'price-high' },
42
+ ]}
43
+ />
44
+ </Box> -->
45
+ <Grid
46
+ length={products?.length}
47
+ data-sort
48
+ >
49
+ {
50
+ products?.map(({ href, images, title, price }, i) => (
51
+ <Box
52
+ data-sort-recommended={i}
53
+ data-sort-price-low={price}
54
+ data-sort-price-high={(price || 0) * -1}
55
+ class="group flex flex-col gap-4"
56
+ {href}
57
+ >
58
+ <Image
59
+ class="aspect-square rounded-lg object-contain ring-1 ring-inset ring-border transition-opacity group-hover:opacity-75"
60
+ {...images?.[0]}
61
+ />
62
+ <Box class="flex flex-col gap-1">
63
+ <Box
64
+ as="h3"
65
+ class="text-sm font-medium"
66
+ >
67
+ {title}
68
+ </Box>
69
+ <Price
70
+ class="text-sm text-muted-foreground"
71
+ amount={price}
72
+ />
73
+ </Box>
74
+ </Box>
75
+ ))
76
+ }
77
+ </Grid>
78
+ <Prose>
79
+ <slot />
80
+ </Prose>
81
+ </Container>
82
+ </Section>
@@ -0,0 +1,60 @@
1
+ ---
2
+ import Abstract from 'fulldev-ui/components/Abstract.astro'
3
+ import Box from 'fulldev-ui/components/Box.astro'
4
+ import Button from 'fulldev-ui/components/Button.astro'
5
+ import Container from 'fulldev-ui/components/Container.astro'
6
+ import Grid from 'fulldev-ui/components/Grid.astro'
7
+ import Image from 'fulldev-ui/components/Image.astro'
8
+ import Price from 'fulldev-ui/components/Price.astro'
9
+ import Section from 'fulldev-ui/components/Section.astro'
10
+ import Writeup from 'fulldev-ui/components/Writeup.astro'
11
+ import type { ProductListSchema } from 'fulldev-ui/schemas/blocks/productList'
12
+
13
+ interface Props extends ProductListSchema {}
14
+
15
+ const { writeup, button, products } = Astro.props
16
+ ---
17
+
18
+ <Section class="products products-1">
19
+ <Container class="flex flex-col items-start gap-8">
20
+ <Writeup class="flex w-full items-center justify-between gap-8">
21
+ <Writeup size="sm">
22
+ <Fragment set:html={writeup} />
23
+ <slot />
24
+ </Writeup>
25
+ <Button
26
+ class="max-lg:hidden"
27
+ variant="link"
28
+ size="sm"
29
+ {...button}
30
+ />
31
+ </Writeup>
32
+ <Grid
33
+ length={products?.length}
34
+ class="gap-4"
35
+ >
36
+ {
37
+ products?.map(({ href, title, images, price }) => (
38
+ <Box
39
+ class="group flex flex-col gap-3"
40
+ {href}
41
+ >
42
+ <Image
43
+ class="aspect-square rounded-lg bg-muted object-contain transition-opacity group-hover:opacity-75"
44
+ {...images?.[0]}
45
+ />
46
+ <Abstract>
47
+ <Box as="h3">{title}</Box>
48
+ <Price amount={price} />
49
+ </Abstract>
50
+ </Box>
51
+ ))
52
+ }
53
+ </Grid>
54
+ <Button
55
+ class="hidden"
56
+ variant="secondary"
57
+ {...button}
58
+ />
59
+ </Container>
60
+ </Section>
@@ -0,0 +1,64 @@
1
+ ---
2
+ import Box from 'fulldev-ui/components/Box.astro'
3
+ import Button from 'fulldev-ui/components/Button.astro'
4
+ import Container from 'fulldev-ui/components/Container.astro'
5
+ import Gallery from 'fulldev-ui/components/Gallery.vue'
6
+ import Image from 'fulldev-ui/components/Image.astro'
7
+ import List from 'fulldev-ui/components/List.astro'
8
+ import Price from 'fulldev-ui/components/Price.astro'
9
+ import Prose from 'fulldev-ui/components/Prose.astro'
10
+ import Section from 'fulldev-ui/components/Section.astro'
11
+ import Split from 'fulldev-ui/components/Split.astro'
12
+ import Writeup from 'fulldev-ui/components/Writeup.astro'
13
+ import type { ProductSingleSchema } from 'fulldev-ui/schemas/blocks/productSingle'
14
+
15
+ interface Props extends ProductSingleSchema {}
16
+
17
+ const { title, description, list, images, price, button } = Astro.props
18
+ ---
19
+
20
+ <Section class="pt-4 lg:pt-16">
21
+ <Container>
22
+ <Split>
23
+ <Box class="flex flex-col gap-16">
24
+ <Gallery client:load>
25
+ {
26
+ images?.map((image) => (
27
+ <Image
28
+ class="aspect-square h-full w-full object-contain"
29
+ src={image.src}
30
+ alt={image.alt}
31
+ />
32
+ ))
33
+ }
34
+ </Gallery>
35
+ <Prose class="max-lg:hidden">
36
+ <slot />
37
+ </Prose>
38
+ </Box>
39
+ <Writeup
40
+ size="sm"
41
+ class="lg:pl-8"
42
+ >
43
+ <Box as="h1">{title}</Box>
44
+ <Box as="p">{description}</Box>
45
+ <Price
46
+ class="mt-4 text-xl font-medium"
47
+ amount={price}
48
+ />
49
+ <Button
50
+ class="mt-4"
51
+ size="lg"
52
+ {...button}
53
+ />
54
+ <List
55
+ class="pt-4 text-muted-foreground"
56
+ items={list}
57
+ />
58
+ </Writeup>
59
+ <Prose class="lg:hidden">
60
+ <slot />
61
+ </Prose>
62
+ </Split>
63
+ </Container>
64
+ </Section>
@@ -1,81 +1,37 @@
1
1
  ---
2
- import Heading from 'fulldev-ui/components/Heading.astro'
3
- import Paragraph from 'fulldev-ui/components/Paragraph.astro'
4
- import Proof from 'fulldev-ui/components/Proof.astro'
5
- import Tagline from 'fulldev-ui/components/Tagline.astro'
6
- import type { BlockSchema } from 'fulldev-ui/schemas/block'
7
- import Card from 'fulldev-ui/structures/Card.astro'
8
- import Container from 'fulldev-ui/structures/Container.astro'
9
- import Masonry from 'fulldev-ui/structures/Masonry.astro'
10
- import Section from 'fulldev-ui/structures/Section.astro'
11
- import Writeup from 'fulldev-ui/structures/Writeup.astro'
2
+ import Abstract from 'fulldev-ui/components/Abstract.astro'
3
+ import Box from 'fulldev-ui/components/Box.astro'
4
+ import Card from 'fulldev-ui/components/Card.astro'
5
+ import Container from 'fulldev-ui/components/Container.astro'
6
+ import Masonry from 'fulldev-ui/components/Masonry.astro'
7
+ import Rating from 'fulldev-ui/components/Rating.astro'
8
+ import Section from 'fulldev-ui/components/Section.astro'
9
+ import Writeup from 'fulldev-ui/components/Writeup.astro'
10
+ import type { ReviewsSchema } from 'fulldev-ui/schemas/blocks/reviews'
12
11
 
13
- interface Props extends BlockSchema {}
12
+ interface Props extends ReviewsSchema {}
14
13
 
15
- const { depth = 2, tagline, heading, paragraph, cards, ...rest } = Astro.props
14
+ const { writeup, reviews } = Astro.props
16
15
  ---
17
16
 
18
- <Section
19
- class:list="reviews-1"
20
- {...rest}
21
- >
22
- <Container>
17
+ <Section class="reviews reviews-1">
18
+ <Container class="flex flex-col gap-12">
23
19
  <Writeup align="center">
24
- <Tagline
25
- size="sm"
26
- text={tagline}
27
- />
28
- <Heading
29
- size="3xl"
30
- text={heading}
31
- {depth}
32
- />
33
- <Paragraph text={paragraph} />
20
+ <Fragment set:html={writeup} />
21
+ <slot />
34
22
  </Writeup>
35
- <Masonry>
23
+ <Masonry length={reviews?.length}>
36
24
  {
37
- cards?.map(({ tagline, avatar, rating, heading, paragraph }) => (
38
- <Card class="reviews-1-card">
39
- <Proof
40
- text={tagline}
41
- {rating}
42
- {avatar}
43
- />
44
- <Heading
45
- depth={(depth + 1) as 3}
46
- as="h3"
47
- size="md"
48
- text={heading}
49
- />
50
- <Paragraph
51
- size="sm"
52
- text={paragraph}
53
- />
25
+ reviews?.map(({ rating, title, description }) => (
26
+ <Card class="flex flex-col">
27
+ <Abstract size="lg">
28
+ <Rating score={rating} />
29
+ <Box as="h3">{title}</Box>
30
+ <Box as="p">{description}</Box>
31
+ </Abstract>
54
32
  </Card>
55
33
  ))
56
34
  }
57
35
  </Masonry>
58
36
  </Container>
59
37
  </Section>
60
-
61
- <style is:global>
62
- @layer fulldev {
63
- .reviews-1 {
64
- .container {
65
- @apply flex flex-col items-center gap-16;
66
- }
67
-
68
- .reviews-1-cards {
69
- @apply grid grid-cols-1 gap-6 lg:grid-cols-3;
70
- }
71
-
72
- .reviews-1-card {
73
- @apply flex flex-col gap-3;
74
- }
75
-
76
- .icon {
77
- @apply text-primary;
78
- }
79
- }
80
- }
81
- </style>
@@ -0,0 +1,36 @@
1
+ ---
2
+ import type { HTMLAttributes } from 'astro/types'
3
+ import Box from './Box.astro'
4
+
5
+ interface Props extends HTMLAttributes<'div'> {
6
+ size?: 'sm' | 'default' | 'lg' | 'xl'
7
+ align?: 'start' | 'center' | 'end'
8
+ }
9
+
10
+ const { size = 'default', align = 'start', class: className, ...rest } = Astro.props
11
+ ---
12
+
13
+ <Box
14
+ class:list={[
15
+ 'abstract',
16
+ 'flex-flex-col w-full max-w-lg',
17
+ 'first:child:mt-0',
18
+ 'headings:text-pretty headings:font-medium headings:tracking-tight',
19
+ 'p:max-w-[90%] p:text-pretty p:leading-[1.8] p:text-muted-foreground',
20
+ {
21
+ // size
22
+ 'text-sm child:mt-1 headings:text-sm': size === 'sm',
23
+ 'text-sm child:mt-1 headings:text-base': size === 'default',
24
+ 'text-base child:mt-1.5 headings:mt-3 headings:text-lg': size === 'lg',
25
+ 'text-base child:mt-2.5 headings:mt-5 headings:text-xl': size === 'xl',
26
+ // align
27
+ 'mr-auto items-start text-left child:mr-auto': align === 'start',
28
+ 'mx-auto items-center text-center child:mx-auto': align === 'center',
29
+ 'ml-auto items-end text-right child:ml-auto': align === 'end',
30
+ },
31
+ className,
32
+ ]}
33
+ {...rest}
34
+ >
35
+ <slot />
36
+ </Box>
@@ -0,0 +1,31 @@
1
+ <script setup lang="ts">
2
+ import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from 'fulldev-ui/components/ui/accordion'
3
+
4
+ interface Props {
5
+ items?: {
6
+ title?: string
7
+ description?: string
8
+ }[]
9
+ }
10
+
11
+ const { items } = defineProps<Props>()
12
+ </script>
13
+
14
+ <template v-if="items">
15
+ <Accordion
16
+ type="single"
17
+ class="w-full"
18
+ collapsible
19
+ >
20
+ <AccordionItem
21
+ v-for="item in items"
22
+ :key="item.title"
23
+ :value="item.title ?? ''"
24
+ >
25
+ <AccordionTrigger>{{ item.title }}</AccordionTrigger>
26
+ <AccordionContent>
27
+ {{ item.description }}
28
+ </AccordionContent>
29
+ </AccordionItem>
30
+ </Accordion>
31
+ </template>
@@ -1,40 +1,31 @@
1
1
  ---
2
- import type { ComponentProps } from 'astro/types'
3
- import Image from 'fulldev-ui/components/Image.astro'
2
+ import type { HTMLAttributes } from 'astro/types'
3
+ import { Image } from 'astro:assets'
4
+ import { avatarVariant, type AvatarVariants } from 'fulldev-ui/components/ui/avatar'
5
+ import Box from './Box.astro'
4
6
 
5
- interface Props extends ComponentProps<typeof Image> {
6
- size?: 'sm' | 'md' | 'lg' | undefined
7
+ interface Props extends HTMLAttributes<'span'>, AvatarVariants {
8
+ src?: string
9
+ alt?: string
7
10
  }
8
11
 
9
- const { size = 'md', ...rest } = Astro.props
12
+ const { class: className, size, shape, alt = '', src, ...rest } = Astro.props
10
13
  ---
11
14
 
12
- <Image
13
- class:list={[
14
- 'avatar',
15
- {
16
- [`size-${size}`]: size,
17
- },
18
- ]}
15
+ <Box
16
+ class:list={['avatar', avatarVariant({ size, shape }), className]}
17
+ as="span"
19
18
  {...rest}
20
- />
21
-
22
- <style is:global>
23
- @layer fulldev {
24
- .avatar {
25
- @apply !rounded-full object-cover;
26
-
27
- &.size-sm {
28
- @apply h-9 w-9;
29
- }
30
-
31
- &.size-md {
32
- @apply h-10 w-10;
33
- }
34
-
35
- &.size-lg {
36
- @apply h-11 w-11;
37
- }
38
- }
19
+ >
20
+ {
21
+ src && (
22
+ <Image
23
+ class:list="h-full w-full object-cover"
24
+ width={40}
25
+ height={40}
26
+ {alt}
27
+ {src}
28
+ />
29
+ )
39
30
  }
40
- </style>
31
+ </Box>
@@ -1,69 +1,21 @@
1
1
  ---
2
2
  import type { HTMLAttributes } from 'astro/types'
3
- import Element from 'fulldev-ui/components/Element.astro'
3
+ import type { BadgeVariants } from 'fulldev-ui/components/ui/badge'
4
+ import { badgeVariants } from 'fulldev-ui/components/ui/badge/index.ts'
5
+ import Box from './Box.astro'
4
6
 
5
- interface Props extends HTMLAttributes<'a'>, HTMLAttributes<'div'> {
6
- variant?: 'primary' | 'secondary' | 'outline' | undefined
7
- size?: 'sm' | 'md' | 'lg' | undefined
8
- text?: string | undefined
9
- icon?: string | undefined
10
- href?: string | undefined
7
+ interface Props extends HTMLAttributes<'span'>, BadgeVariants {
8
+ text?: string
11
9
  }
12
10
 
13
- const {
14
- variant = 'outline',
15
- size = 'md',
16
- text,
17
- icon,
18
- href,
19
- target = href?.startsWith('http') ? '_blank' : undefined,
20
- ...rest
21
- } = Astro.props
11
+ const { variant, text, class: className, ...rest } = Astro.props
22
12
  ---
23
13
 
24
- <Element
25
- class:list="badge"
26
- as={href ? 'a' : 'div'}
27
- {variant}
28
- {size}
29
- {href}
30
- {target}
14
+ <Box
15
+ class:list={['badge', badgeVariants({ variant }), className]}
16
+ as="span"
31
17
  {...rest}
32
18
  >
33
19
  <Fragment set:html={text} />
34
20
  <slot />
35
- </Element>
36
-
37
- <style is:global>
38
- @layer fulldev {
39
- .badge {
40
- @apply inline-flex h-6 items-center justify-center whitespace-nowrap rounded-full px-2.5 text-xs font-medium leading-none ring-offset-background;
41
- @apply focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2;
42
- @apply disabled:pointer-events-none disabled:opacity-50;
43
-
44
- &.size-sm {
45
- @apply h-6 min-w-6 px-2;
46
- }
47
-
48
- &.size-md {
49
- @apply h-7 min-w-7 px-3;
50
- }
51
-
52
- &.size-lg {
53
- @apply h-8 min-w-8 px-3.5;
54
- }
55
-
56
- &.variant-primary {
57
- @apply bg-primary text-primary-foreground;
58
- }
59
-
60
- &.variant-secondary {
61
- @apply bg-secondary text-secondary-foreground;
62
- }
63
-
64
- &.variant-outline {
65
- @apply border border-input text-accent-foreground;
66
- }
67
- }
68
- }
69
- </style>
21
+ </Box>
@@ -1,35 +1,34 @@
1
1
  ---
2
+ // @ts-nocheck
3
+ // FIXME
2
4
  import { getEntries } from 'astro:content'
3
- import type { BlockSchema } from 'fulldev-ui/schemas/block'
4
- import { getHref } from 'fulldev-ui/utils/getHref'
5
5
 
6
- interface Props extends BlockSchema {}
6
+ // interface Props extends BlockSchema {}
7
7
 
8
- let { _block, cards, pages, records, ...rest } = Astro.props
8
+ let { block, cards, pages, categories, products, ...rest } = Astro.props
9
9
 
10
10
  const blocks = {
11
11
  ...import.meta.glob('/src/blocks/**/*.astro'),
12
12
  ...import.meta.glob('../blocks/**/*.astro'),
13
13
  }
14
14
 
15
- const path = Object.keys(blocks).find(
16
- (path) => path.split('/').pop()?.split('.')[0] === _block
17
- )
15
+ const path = Object.keys(blocks).find((path) => path.split('/').pop()?.split('.')[0] === block)
18
16
 
19
17
  const BlockComponent = path && (await (blocks[path] as any)()).default
20
18
 
21
- cards = [
22
- ...(cards || []),
23
- ...(await getEntries(records || [])).map(({ data }) => ({
24
- ...data,
25
- })),
26
- ...(await getEntries(pages || [])).map(({ slug, data }) => ({
27
- href: getHref(slug),
28
- heading: data.title,
29
- paragraph: data.description,
30
- ...data,
31
- })),
32
- ]
19
+ const categoriesEntries =
20
+ categories &&
21
+ (await getEntries(categories)).map((category) => ({
22
+ slug: category.id,
23
+ ...category.data,
24
+ }))
25
+
26
+ const productsEntries =
27
+ products &&
28
+ (await getEntries(products)).map((product) => ({
29
+ slug: product.id,
30
+ ...product.data,
31
+ }))
33
32
  ---
34
33
 
35
34
  {
@@ -37,7 +36,8 @@ cards = [
37
36
  <BlockComponent
38
37
  {cards}
39
38
  {pages}
40
- {records}
39
+ categories={categoriesEntries}
40
+ products={productsEntries}
41
41
  {...rest}
42
42
  >
43
43
  <slot />
@@ -0,0 +1,28 @@
1
+ ---
2
+ import { cn } from 'fulldev-ui/lib/utils'
3
+
4
+ const {
5
+ href,
6
+ as: As = href ? 'a' : 'div',
7
+ show = 'content',
8
+ target = href?.startsWith('http') ? '_blank' : undefined,
9
+ class: className,
10
+ ...rest
11
+ } = Astro.props
12
+
13
+ const slot = await Astro.slots.render('default')
14
+ const render = show === 'content' ? slot?.trim().length > 0 : show
15
+ ---
16
+
17
+ {
18
+ render && (
19
+ <As
20
+ class:list={cn('box', className)}
21
+ {href}
22
+ {target}
23
+ {...rest}
24
+ >
25
+ <Fragment set:html={slot} />
26
+ </As>
27
+ )
28
+ }