fulldev-ui 0.6.5 → 0.7.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.prettierrc.yaml +10 -3
- package/README.md +2 -1
- package/astro.config.ts +20 -17
- package/components.json +18 -0
- package/package.json +63 -34
- package/pnpm-lock.yaml +3690 -1465
- package/public/images/categories/journals.jpg +0 -0
- package/public/images/categories/productivity.jpg +0 -0
- package/public/images/categories/workspace.jpg +0 -0
- package/public/images/leather-long-wallet.jpg +0 -0
- package/public/images/products/earthen-mug.jpg +0 -0
- package/public/images/products/leather-long-wallet.jpg +0 -0
- package/public/images/products/leatherbound-daily-journal-set.jpg +0 -0
- package/public/images/products/leatherbound-daily-journal.jpg +0 -0
- package/public/images/products/machines-pen.jpg +0 -0
- package/public/images/products/machines-pencil-and-pen-set.jpg +0 -0
- package/public/images/products/mini-sketchbooks.jpg +0 -0
- package/public/images/products/organizer-set.jpg +0 -0
- package/src/blocks/CategoryGroup1.astro +43 -0
- package/src/blocks/CategoryList1.astro +55 -0
- package/src/blocks/Contact1.astro +34 -77
- package/src/blocks/Contact2.astro +31 -77
- package/src/blocks/Content1.astro +18 -30
- package/src/blocks/Cta1.astro +18 -58
- package/src/blocks/Faqs1.astro +29 -0
- package/src/blocks/Faqs2.astro +29 -0
- package/src/blocks/Features1.astro +25 -61
- package/src/blocks/Footer.astro +47 -71
- package/src/blocks/Header.astro +64 -124
- package/src/blocks/Hero1.astro +23 -54
- package/src/blocks/Intro1.astro +16 -58
- package/src/blocks/PostSingle1.astro +29 -0
- package/src/blocks/ProductGroup1.astro +82 -0
- package/src/blocks/ProductList1.astro +60 -0
- package/src/blocks/ProductSingle1.astro +65 -0
- package/src/blocks/Reviews1.astro +23 -67
- package/src/components/Abstract.astro +36 -0
- package/src/components/Accordion.vue +31 -0
- package/src/components/Avatar.astro +23 -32
- package/src/components/Badge.astro +10 -58
- package/src/components/Box.astro +28 -0
- package/src/components/Button.astro +38 -78
- package/src/components/Buttons.astro +41 -19
- package/src/components/Card.astro +20 -0
- package/src/components/Carousel.vue +44 -0
- package/src/components/Chip.astro +27 -0
- package/src/{structures → components}/Code.astro +27 -8
- package/src/components/Collapsible.vue +21 -0
- package/src/components/Container.astro +25 -0
- package/src/components/Drawer.vue +53 -0
- package/src/components/Form.vue +82 -0
- package/src/components/Gallery.vue +85 -0
- package/src/components/Grid.astro +35 -0
- package/src/components/Icon.astro +12 -45
- package/src/components/Image.astro +6 -28
- package/src/components/Layout.astro +126 -0
- package/src/components/Link.astro +7 -65
- package/src/components/List.astro +13 -77
- package/src/components/Logo.astro +16 -35
- package/src/components/Masonry.astro +35 -0
- package/src/components/Menu.astro +31 -36
- package/src/components/Menus.astro +15 -10
- package/src/components/Navigation.vue +93 -0
- package/src/components/Panel.astro +18 -0
- package/src/components/Person.astro +43 -0
- package/src/components/Price.astro +26 -11
- package/src/components/Proof.astro +16 -37
- package/src/components/{docs/Props.astro → Props.astro} +3 -3
- package/src/components/Prose.astro +28 -0
- package/src/components/Rating.astro +5 -24
- package/src/components/Search.vue +65 -0
- package/src/components/Section.astro +18 -0
- package/src/components/Select.vue +41 -0
- package/src/components/Separator.astro +0 -0
- package/src/components/Sidebar.astro +50 -0
- package/src/components/Social.astro +8 -15
- package/src/components/Socials.astro +21 -19
- package/src/components/Sort.vue +46 -0
- package/src/components/Split.astro +27 -0
- package/src/components/Table.astro +17 -17
- package/src/components/Tabs.vue +17 -0
- package/src/components/Themer.astro +12 -3
- package/src/components/Toc.astro +24 -21
- package/src/components/Toolbar.vue +115 -0
- package/src/components/Writeup.astro +37 -0
- package/src/components/ui/accordion/Accordion.vue +19 -0
- package/src/components/ui/accordion/AccordionContent.vue +24 -0
- package/src/components/ui/accordion/AccordionItem.vue +24 -0
- package/src/components/ui/accordion/AccordionTrigger.vue +33 -0
- package/src/components/ui/accordion/index.ts +4 -0
- package/src/components/ui/auto-form/AutoForm.vue +115 -0
- package/src/components/ui/auto-form/AutoFormField.vue +45 -0
- package/src/components/ui/auto-form/AutoFormFieldArray.vue +127 -0
- package/src/components/ui/auto-form/AutoFormFieldBoolean.vue +47 -0
- package/src/components/ui/auto-form/AutoFormFieldDate.vue +78 -0
- package/src/components/ui/auto-form/AutoFormFieldEnum.vue +77 -0
- package/src/components/ui/auto-form/AutoFormFieldFile.vue +87 -0
- package/src/components/ui/auto-form/AutoFormFieldInput.vue +42 -0
- package/src/components/ui/auto-form/AutoFormFieldNumber.vue +42 -0
- package/src/components/ui/auto-form/AutoFormFieldObject.vue +90 -0
- package/src/components/ui/auto-form/AutoFormLabel.vue +19 -0
- package/src/components/ui/auto-form/constant.ts +40 -0
- package/src/components/ui/auto-form/dependencies.ts +92 -0
- package/src/components/ui/auto-form/index.ts +15 -0
- package/src/components/ui/auto-form/interface.ts +95 -0
- package/src/components/ui/auto-form/utils.ts +188 -0
- package/src/components/ui/avatar/Avatar.vue +24 -0
- package/src/components/ui/avatar/AvatarFallback.vue +11 -0
- package/src/components/ui/avatar/AvatarImage.vue +9 -0
- package/src/components/ui/avatar/index.ts +24 -0
- package/src/components/ui/badge/Badge.vue +16 -0
- package/src/components/ui/badge/index.ts +22 -0
- package/src/components/ui/breadcrumb/Breadcrumb.vue +13 -0
- package/src/components/ui/breadcrumb/BreadcrumbEllipsis.vue +22 -0
- package/src/components/ui/breadcrumb/BreadcrumbItem.vue +14 -0
- package/src/components/ui/breadcrumb/BreadcrumbLink.vue +19 -0
- package/src/components/ui/breadcrumb/BreadcrumbList.vue +16 -0
- package/src/components/ui/breadcrumb/BreadcrumbPage.vue +19 -0
- package/src/components/ui/breadcrumb/BreadcrumbSeparator.vue +21 -0
- package/src/components/ui/breadcrumb/index.ts +7 -0
- package/src/components/ui/button/Button.vue +26 -0
- package/src/components/ui/button/index.ts +31 -0
- package/src/components/ui/calendar/Calendar.vue +80 -0
- package/src/components/ui/calendar/CalendarCell.vue +29 -0
- package/src/components/ui/calendar/CalendarCellTrigger.vue +40 -0
- package/src/components/ui/calendar/CalendarGrid.vue +24 -0
- package/src/components/ui/calendar/CalendarGridBody.vue +11 -0
- package/src/components/ui/calendar/CalendarGridHead.vue +11 -0
- package/src/components/ui/calendar/CalendarGridRow.vue +24 -0
- package/src/components/ui/calendar/CalendarHeadCell.vue +24 -0
- package/src/components/ui/calendar/CalendarHeader.vue +24 -0
- package/src/components/ui/calendar/CalendarHeading.vue +27 -0
- package/src/components/ui/calendar/CalendarNextButton.vue +30 -0
- package/src/components/ui/calendar/CalendarPrevButton.vue +30 -0
- package/src/components/ui/calendar/index.ts +12 -0
- package/src/components/ui/card/Card.vue +14 -0
- package/src/components/ui/card/CardContent.vue +14 -0
- package/src/components/ui/card/CardDescription.vue +14 -0
- package/src/components/ui/card/CardFooter.vue +14 -0
- package/src/components/ui/card/CardHeader.vue +14 -0
- package/src/components/ui/card/CardTitle.vue +14 -0
- package/src/components/ui/card/index.ts +6 -0
- package/src/components/ui/carousel/Carousel.vue +61 -0
- package/src/components/ui/carousel/CarouselContent.vue +27 -0
- package/src/components/ui/carousel/CarouselItem.vue +19 -0
- package/src/components/ui/carousel/CarouselNext.vue +33 -0
- package/src/components/ui/carousel/CarouselPrevious.vue +33 -0
- package/src/components/ui/carousel/index.ts +10 -0
- package/src/components/ui/carousel/interface.ts +26 -0
- package/src/components/ui/carousel/useCarousel.ts +56 -0
- package/src/components/ui/checkbox/Checkbox.vue +36 -0
- package/src/components/ui/checkbox/index.ts +1 -0
- package/src/components/ui/collapsible/Collapsible.vue +15 -0
- package/src/components/ui/collapsible/CollapsibleContent.vue +11 -0
- package/src/components/ui/collapsible/CollapsibleTrigger.vue +11 -0
- package/src/components/ui/collapsible/index.ts +3 -0
- package/src/components/ui/command/Command.vue +32 -0
- package/src/components/ui/command/CommandDialog.vue +23 -0
- package/src/components/ui/command/CommandEmpty.vue +23 -0
- package/src/components/ui/command/CommandGroup.vue +39 -0
- package/src/components/ui/command/CommandInput.vue +43 -0
- package/src/components/ui/command/CommandItem.vue +31 -0
- package/src/components/ui/command/CommandList.vue +30 -0
- package/src/components/ui/command/CommandSeparator.vue +23 -0
- package/src/components/ui/command/CommandShortcut.vue +14 -0
- package/src/components/ui/command/index.ts +9 -0
- package/src/components/ui/dialog/Dialog.vue +14 -0
- package/src/components/ui/dialog/DialogClose.vue +11 -0
- package/src/components/ui/dialog/DialogContent.vue +51 -0
- package/src/components/ui/dialog/DialogDescription.vue +24 -0
- package/src/components/ui/dialog/DialogFooter.vue +12 -0
- package/src/components/ui/dialog/DialogHeader.vue +14 -0
- package/src/components/ui/dialog/DialogScrollContent.vue +59 -0
- package/src/components/ui/dialog/DialogTitle.vue +24 -0
- package/src/components/ui/dialog/DialogTrigger.vue +11 -0
- package/src/components/ui/dialog/index.ts +9 -0
- package/src/components/ui/drawer/Drawer.vue +19 -0
- package/src/components/ui/drawer/DrawerContent.vue +31 -0
- package/src/components/ui/drawer/DrawerDescription.vue +23 -0
- package/src/components/ui/drawer/DrawerFooter.vue +14 -0
- package/src/components/ui/drawer/DrawerHeader.vue +14 -0
- package/src/components/ui/drawer/DrawerOverlay.vue +21 -0
- package/src/components/ui/drawer/DrawerTitle.vue +23 -0
- package/src/components/ui/drawer/index.ts +8 -0
- package/src/components/ui/form/FormControl.vue +16 -0
- package/src/components/ui/form/FormDescription.vue +20 -0
- package/src/components/ui/form/FormItem.vue +19 -0
- package/src/components/ui/form/FormLabel.vue +20 -0
- package/src/components/ui/form/FormMessage.vue +16 -0
- package/src/components/ui/form/index.ts +7 -0
- package/src/components/ui/form/injectionKeys.ts +4 -0
- package/src/components/ui/form/useFormField.ts +30 -0
- package/src/components/ui/input/Input.vue +32 -0
- package/src/components/ui/input/index.ts +1 -0
- package/src/components/ui/label/Label.vue +24 -0
- package/src/components/ui/label/index.ts +1 -0
- package/src/components/ui/menubar/Menubar.vue +25 -0
- package/src/components/ui/menubar/MenubarCheckboxItem.vue +42 -0
- package/src/components/ui/menubar/MenubarContent.vue +35 -0
- package/src/components/ui/menubar/MenubarGroup.vue +11 -0
- package/src/components/ui/menubar/MenubarItem.vue +32 -0
- package/src/components/ui/menubar/MenubarLabel.vue +13 -0
- package/src/components/ui/menubar/MenubarMenu.vue +11 -0
- package/src/components/ui/menubar/MenubarRadioGroup.vue +20 -0
- package/src/components/ui/menubar/MenubarRadioItem.vue +42 -0
- package/src/components/ui/menubar/MenubarSeparator.vue +22 -0
- package/src/components/ui/menubar/MenubarShortcut.vue +14 -0
- package/src/components/ui/menubar/MenubarSub.vue +19 -0
- package/src/components/ui/menubar/MenubarSubContent.vue +39 -0
- package/src/components/ui/menubar/MenubarSubTrigger.vue +32 -0
- package/src/components/ui/menubar/MenubarTrigger.vue +29 -0
- package/src/components/ui/menubar/index.ts +15 -0
- package/src/components/ui/navigation-menu/NavigationMenu.vue +33 -0
- package/src/components/ui/navigation-menu/NavigationMenuContent.vue +36 -0
- package/src/components/ui/navigation-menu/NavigationMenuIndicator.vue +29 -0
- package/src/components/ui/navigation-menu/NavigationMenuItem.vue +11 -0
- package/src/components/ui/navigation-menu/NavigationMenuLink.vue +19 -0
- package/src/components/ui/navigation-menu/NavigationMenuList.vue +24 -0
- package/src/components/ui/navigation-menu/NavigationMenuTrigger.vue +30 -0
- package/src/components/ui/navigation-menu/NavigationMenuViewport.vue +29 -0
- package/src/components/ui/navigation-menu/index.ts +14 -0
- package/src/components/ui/popover/Popover.vue +15 -0
- package/src/components/ui/popover/PopoverContent.vue +45 -0
- package/src/components/ui/popover/PopoverTrigger.vue +11 -0
- package/src/components/ui/popover/index.ts +3 -0
- package/src/components/ui/radio-group/RadioGroup.vue +25 -0
- package/src/components/ui/radio-group/RadioGroupItem.vue +32 -0
- package/src/components/ui/radio-group/index.ts +2 -0
- package/src/components/ui/select/Select.vue +15 -0
- package/src/components/ui/select/SelectContent.vue +59 -0
- package/src/components/ui/select/SelectGroup.vue +22 -0
- package/src/components/ui/select/SelectItem.vue +38 -0
- package/src/components/ui/select/SelectItemText.vue +11 -0
- package/src/components/ui/select/SelectLabel.vue +13 -0
- package/src/components/ui/select/SelectScrollDownButton.vue +27 -0
- package/src/components/ui/select/SelectScrollUpButton.vue +27 -0
- package/src/components/ui/select/SelectSeparator.vue +20 -0
- package/src/components/ui/select/SelectTrigger.vue +33 -0
- package/src/components/ui/select/SelectValue.vue +11 -0
- package/src/components/ui/select/index.ts +11 -0
- package/src/components/ui/separator/Separator.vue +33 -0
- package/src/components/ui/separator/index.ts +1 -0
- package/src/components/ui/switch/Switch.vue +39 -0
- package/src/components/ui/switch/index.ts +1 -0
- package/src/components/ui/tabs/Tabs.vue +15 -0
- package/src/components/ui/tabs/TabsContent.vue +27 -0
- package/src/components/ui/tabs/TabsList.vue +22 -0
- package/src/components/ui/tabs/TabsTrigger.vue +31 -0
- package/src/components/ui/tabs/index.ts +4 -0
- package/src/components/ui/textarea/Textarea.vue +32 -0
- package/src/components/ui/textarea/index.ts +1 -0
- package/src/lib/utils.ts +6 -0
- package/src/schemas/blocks/categoryGroup.ts +17 -0
- package/src/schemas/blocks/categoryList.ts +18 -0
- package/src/schemas/blocks/categorySingle.ts +12 -0
- package/src/schemas/blocks/contact.ts +13 -0
- package/src/schemas/blocks/content.ts +13 -0
- package/src/schemas/blocks/cta.ts +11 -0
- package/src/schemas/blocks/faqs.ts +17 -0
- package/src/schemas/blocks/features.ts +16 -0
- package/src/schemas/blocks/footer.ts +16 -0
- package/src/schemas/{header.ts → blocks/header.ts} +5 -8
- package/src/schemas/blocks/hero.ts +15 -0
- package/src/schemas/blocks/intro.ts +9 -0
- package/src/schemas/blocks/postSingle.ts +12 -0
- package/src/schemas/blocks/productGroup.ts +17 -0
- package/src/schemas/blocks/productList.ts +18 -0
- package/src/schemas/blocks/productSingle.ts +15 -0
- package/src/schemas/blocks/reviews.ts +16 -0
- package/src/schemas/fields/badge.ts +9 -0
- package/src/schemas/fields/block.ts +60 -0
- package/src/schemas/fields/button.ts +12 -0
- package/src/schemas/fields/card.ts +28 -0
- package/src/schemas/fields/channel.ts +10 -0
- package/src/schemas/fields/form.ts +20 -0
- package/src/schemas/fields/image.ts +8 -0
- package/src/schemas/fields/link.ts +9 -0
- package/src/schemas/fields/logo.ts +10 -0
- package/src/schemas/fields/menu.ts +10 -0
- package/src/schemas/fields/meta.ts +14 -0
- package/src/schemas/fields/proof.ts +11 -0
- package/src/schemas/fields/section.ts +48 -0
- package/tailwind.config.js +111 -0
- package/tsconfig.json +5 -7
- package/.env.example +0 -3
- package/.vscode/settings.json +0 -25
- package/CONTRIBUTING.md +0 -124
- package/cloudcannon.config.yml +0 -207
- package/public/favicon/android-chrome-192x192.png +0 -0
- package/public/favicon/android-chrome-512x512.png +0 -0
- package/public/favicon/apple-touch-icon.png +0 -0
- package/public/favicon/browserconfig.xml +0 -9
- package/public/favicon/favicon-16x16.png +0 -0
- package/public/favicon/favicon-32x32.png +0 -0
- package/public/favicon/favicon-48x48.png +0 -0
- package/public/favicon/favicon.ico +0 -0
- package/public/favicon/favicon.svg +0 -16
- package/public/favicon/manifest.webmanifest +0 -30
- package/public/favicon/mstile-150x150.png +0 -0
- package/public/favicon/safari-pinned-tab.svg +0 -16
- package/public/favicon/yandex-browser-50x50.png +0 -0
- package/public/favicon/yandex-browser-manifest.json +0 -9
- package/siteicon.png +0 -0
- package/src/blocks/Banner.astro +0 -31
- package/src/blocks/Colleagues1.astro +0 -74
- package/src/blocks/Compare1.astro +0 -64
- package/src/blocks/Content2.astro +0 -47
- package/src/blocks/Content3.astro +0 -47
- package/src/blocks/Content4.astro +0 -52
- package/src/blocks/Content5.astro +0 -43
- package/src/blocks/Content6.astro +0 -57
- package/src/blocks/Content7.astro +0 -65
- package/src/blocks/Content8.astro +0 -48
- package/src/blocks/Cta2.astro +0 -52
- package/src/blocks/Features2.astro +0 -71
- package/src/blocks/JobCategories1.astro +0 -61
- package/src/blocks/JobCategory1.astro +0 -92
- package/src/blocks/Jobs1.astro +0 -74
- package/src/blocks/Logos1.astro +0 -55
- package/src/blocks/Pages1.astro +0 -85
- package/src/blocks/Pricings1.astro +0 -61
- package/src/blocks/Products1.astro +0 -87
- package/src/blocks/Projects1.astro +0 -79
- package/src/blocks/Subheader.astro +0 -53
- package/src/components/Avatars.astro +0 -20
- package/src/components/Badges.astro +0 -20
- package/src/components/Block.astro +0 -46
- package/src/components/Cart.astro +0 -42
- package/src/components/CartAdd.svelte +0 -76
- package/src/components/CartCheckout.svelte +0 -58
- package/src/components/CartForm.svelte +0 -130
- package/src/components/CartList.svelte +0 -88
- package/src/components/CartQuantity.svelte +0 -81
- package/src/components/CartSummary.astro +0 -59
- package/src/components/CartTotal.svelte +0 -15
- package/src/components/Channel.astro +0 -89
- package/src/components/Channels.astro +0 -20
- package/src/components/Checkbox.astro +0 -76
- package/src/components/Element.astro +0 -70
- package/src/components/Field.astro +0 -33
- package/src/components/Fields.astro +0 -20
- package/src/components/Form.astro +0 -34
- package/src/components/Gallery.astro +0 -175
- package/src/components/Head.astro +0 -94
- package/src/components/Heading.astro +0 -91
- package/src/components/Input.astro +0 -115
- package/src/components/Label.astro +0 -42
- package/src/components/Links.astro +0 -20
- package/src/components/Paragraph.astro +0 -54
- package/src/components/Search.astro +0 -118
- package/src/components/Select.astro +0 -114
- package/src/components/Switch.astro +0 -81
- package/src/components/Tagline.astro +0 -49
- package/src/components/Textarea.astro +0 -78
- package/src/components/Toggle.astro +0 -45
- package/src/components/_Breadcrumb.astro +0 -58
- package/src/components/_Image.astro +0 -79
- package/src/components/_LocaleSwitcher.astro +0 -25
- package/src/content/config.ts +0 -18
- package/src/content/layouts/base.yml +0 -166
- package/src/content/pages/_base/toggle.mdx +0 -28
- package/src/content/pages/_posts/post.md +0 -7
- package/src/content/pages/_showcase/anti-slip-profiles.md +0 -5
- package/src/content/pages/_showcase/fulldev-ui.md +0 -5
- package/src/content/pages/_showcase/lavis-detailing.md +0 -5
- package/src/content/pages/_showcase/leren-trainingsacteren.md +0 -5
- package/src/content/pages/_showcase/miele-witgoedcenter-amsterdam.md +0 -5
- package/src/content/pages/_showcase/sloepverhuur-bolsward.md +0 -5
- package/src/content/pages/_showcase/stark-vulcanising-products.md +0 -4
- package/src/content/pages/_showcase/the-gym-haren.md +0 -5
- package/src/content/pages/_showcase/van-dillen-antieke-bouwmaterialen.md +0 -5
- package/src/content/pages/docs/blocks/_categories.mdx +0 -129
- package/src/content/pages/docs/blocks/_contact.mdx +0 -67
- package/src/content/pages/docs/blocks/_jobs.mdx +0 -34
- package/src/content/pages/docs/blocks/_posts.mdx +0 -45
- package/src/content/pages/docs/blocks/_stats.mdx +0 -32
- package/src/content/pages/docs/blocks/banner.mdx +0 -12
- package/src/content/pages/docs/blocks/colleagues.mdx +0 -49
- package/src/content/pages/docs/blocks/content.mdx +0 -316
- package/src/content/pages/docs/blocks/cta.mdx +0 -16
- package/src/content/pages/docs/blocks/features.mdx +0 -100
- package/src/content/pages/docs/blocks/footer.mdx +0 -46
- package/src/content/pages/docs/blocks/header.mdx +0 -60
- package/src/content/pages/docs/blocks/hero.mdx +0 -18
- package/src/content/pages/docs/blocks/intro.mdx +0 -16
- package/src/content/pages/docs/blocks/logos.mdx +0 -37
- package/src/content/pages/docs/blocks/projects.mdx +0 -36
- package/src/content/pages/docs/blocks/reviews.mdx +0 -65
- package/src/content/pages/docs/blocks.mdx +0 -52
- package/src/content/pages/docs/collections/images.mdx +0 -102
- package/src/content/pages/docs/collections/pages.mdx +0 -119
- package/src/content/pages/docs/collections/presets.mdx +0 -60
- package/src/content/pages/docs/components/_localeswitcher.mdx +0 -16
- package/src/content/pages/docs/components/_table.mdx +0 -101
- package/src/content/pages/docs/components/_tagline.mdx +0 -34
- package/src/content/pages/docs/components/_themer.mdx +0 -47
- package/src/content/pages/docs/components/_toggle.mdx +0 -30
- package/src/content/pages/docs/components/avatar.mdx +0 -32
- package/src/content/pages/docs/components/badge.mdx +0 -42
- package/src/content/pages/docs/components/badges.mdx +0 -33
- package/src/content/pages/docs/components/button.mdx +0 -76
- package/src/content/pages/docs/components/buttons.mdx +0 -50
- package/src/content/pages/docs/components/channel.mdx +0 -89
- package/src/content/pages/docs/components/channels.mdx +0 -90
- package/src/content/pages/docs/components/checkbox.mdx +0 -32
- package/src/content/pages/docs/components/heading.mdx +0 -49
- package/src/content/pages/docs/components/icon.mdx +0 -46
- package/src/content/pages/docs/components/image.mdx +0 -20
- package/src/content/pages/docs/components/input.mdx +0 -38
- package/src/content/pages/docs/components/label.mdx +0 -42
- package/src/content/pages/docs/components/link.mdx +0 -63
- package/src/content/pages/docs/components/links.mdx +0 -57
- package/src/content/pages/docs/components/list.mdx +0 -53
- package/src/content/pages/docs/components/logo.mdx +0 -24
- package/src/content/pages/docs/components/menu.mdx +0 -48
- package/src/content/pages/docs/components/paragraph.mdx +0 -44
- package/src/content/pages/docs/components/rating.mdx +0 -43
- package/src/content/pages/docs/components/select.mdx +0 -46
- package/src/content/pages/docs/components/social.mdx +0 -92
- package/src/content/pages/docs/components/socials.mdx +0 -103
- package/src/content/pages/docs/components/switch.mdx +0 -32
- package/src/content/pages/docs/components/tagline.mdx +0 -42
- package/src/content/pages/docs/components/textarea.mdx +0 -32
- package/src/content/pages/docs/components.mdx +0 -36
- package/src/content/pages/docs/customization.mdx +0 -183
- package/src/content/pages/docs/frameworks.mdx +0 -30
- package/src/content/pages/docs/index.mdx +0 -21
- package/src/content/pages/docs/installation.mdx +0 -30
- package/src/content/pages/docs/layouts/doc.mdx +0 -15
- package/src/content/pages/docs/layouts/page.mdx +0 -15
- package/src/content/pages/docs/pages.mdx +0 -130
- package/src/content/pages/docs/structures/_card.mdx +0 -84
- package/src/content/pages/docs/structures/_dialog.mdx +0 -15
- package/src/content/pages/docs/structures/_drawer.mdx +0 -15
- package/src/content/pages/docs/structures/card.mdx +0 -15
- package/src/content/pages/docs/structures/carousel.mdx +0 -14
- package/src/content/pages/docs/structures/code.mdx +0 -42
- package/src/content/pages/docs/structures/container.mdx +0 -15
- package/src/content/pages/docs/structures/drawer.mdx +0 -15
- package/src/content/pages/docs/structures/group.mdx +0 -15
- package/src/content/pages/docs/structures/layout.mdx +0 -15
- package/src/content/pages/docs/structures/masonry.mdx +0 -15
- package/src/content/pages/docs/structures/matrix.mdx +0 -15
- package/src/content/pages/docs/structures/panel.mdx +0 -15
- package/src/content/pages/docs/structures/prose.mdx +0 -33
- package/src/content/pages/docs/structures/section.mdx +0 -15
- package/src/content/pages/docs/structures/stack.mdx +0 -15
- package/src/content/pages/docs/structures/writeup.mdx +0 -15
- package/src/content/pages/docs/structures.mdx +0 -7
- package/src/content/pages/index.mdx +0 -52
- package/src/content/pages/showcase.mdx +0 -30
- package/src/css/custom.css +0 -24
- package/src/css/theme.css +0 -62
- package/src/env.d.ts +0 -3
- package/src/integration/index.ts +0 -185
- package/src/layouts/Page.astro +0 -64
- package/src/layouts/_Product.astro +0 -115
- package/src/pages/[...page].astro +0 -49
- package/src/pages/test.astro +0 -16
- package/src/schemas/badge.ts +0 -14
- package/src/schemas/block.ts +0 -42
- package/src/schemas/button.ts +0 -17
- package/src/schemas/card.ts +0 -43
- package/src/schemas/channel.ts +0 -15
- package/src/schemas/checkbox.ts +0 -13
- package/src/schemas/footer.ts +0 -17
- package/src/schemas/head.ts +0 -17
- package/src/schemas/image.ts +0 -53
- package/src/schemas/input.ts +0 -13
- package/src/schemas/link.ts +0 -14
- package/src/schemas/logo.ts +0 -13
- package/src/schemas/menu.ts +0 -11
- package/src/schemas/page.ts +0 -23
- package/src/schemas/proof.ts +0 -12
- package/src/schemas/textarea.ts +0 -11
- package/src/stores/cart.svelte.ts +0 -78
- package/src/stores/cart.ts +0 -76
- package/src/structures/Card.astro +0 -35
- package/src/structures/Carousel.astro +0 -106
- package/src/structures/Container.astro +0 -25
- package/src/structures/Drawer.astro +0 -81
- package/src/structures/Group.astro +0 -25
- package/src/structures/Layout.astro +0 -34
- package/src/structures/Masonry.astro +0 -42
- package/src/structures/Matrix.astro +0 -39
- package/src/structures/Panel.astro +0 -25
- package/src/structures/Prose.astro +0 -96
- package/src/structures/Section.astro +0 -26
- package/src/structures/Sidebar.astro +0 -36
- package/src/structures/Split.astro +0 -38
- package/src/structures/Stack.astro +0 -25
- package/src/structures/Writeup.astro +0 -67
- package/src/structures/_Bento.astro +0 -34
- package/src/utils/cart.ts +0 -27
- package/src/utils/getHref.ts +0 -6
- package/src/utils/slugify.ts +0 -6
- package/svelte.config.js +0 -5
- package/tailwind.config.ts +0 -72
- package/virtual.d.ts +0 -5
- /package/src/schemas/{path.ts → fields/path.ts} +0 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import Select from 'fulldev-ui/components/Select.vue'
|
|
3
|
+
import type { SelectRootProps } from 'radix-vue'
|
|
4
|
+
|
|
5
|
+
interface Props extends SelectRootProps {
|
|
6
|
+
options: {
|
|
7
|
+
label: string
|
|
8
|
+
value: string
|
|
9
|
+
}[]
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const { options } = defineProps<Props>()
|
|
13
|
+
|
|
14
|
+
const handleChange = (value: string) => {
|
|
15
|
+
const container = document.querySelector('[data-sort]')
|
|
16
|
+
if (!container) throw new Error('Container not found')
|
|
17
|
+
|
|
18
|
+
const childElements = container.querySelectorAll(`[data-sort-${value}]`)
|
|
19
|
+
const childrenArray = Array.from(childElements)
|
|
20
|
+
|
|
21
|
+
const sortedChildrenArray = childrenArray.sort((a, b) => {
|
|
22
|
+
const aValue = a.getAttribute(`data-sort-${value}`)
|
|
23
|
+
const bValue = b.getAttribute(`data-sort-${value}`)
|
|
24
|
+
if (!aValue || !bValue) return 0
|
|
25
|
+
|
|
26
|
+
const aNum = parseFloat(aValue)
|
|
27
|
+
const bNum = parseFloat(bValue)
|
|
28
|
+
|
|
29
|
+
//
|
|
30
|
+
if (isNaN(aNum) || isNaN(bNum)) throw new Error('Sort value is not a number')
|
|
31
|
+
|
|
32
|
+
return aNum - bNum
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
// Append the sorted children to the container
|
|
36
|
+
sortedChildrenArray.forEach((child) => container.appendChild(child))
|
|
37
|
+
}
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<template>
|
|
41
|
+
<Select
|
|
42
|
+
class="w-auto"
|
|
43
|
+
:options="options"
|
|
44
|
+
@update:modelValue="handleChange"
|
|
45
|
+
/>
|
|
46
|
+
</template>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLAttributes } from 'astro/types'
|
|
3
|
+
import Box from 'fulldev-ui/components/Box.astro'
|
|
4
|
+
|
|
5
|
+
interface Props extends HTMLAttributes<'div'> {
|
|
6
|
+
align?: 'start' | 'center' | 'end'
|
|
7
|
+
reverse?: boolean | 'auto'
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { align = 'start', reverse = false, class: className, ...rest } = Astro.props
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
<Box
|
|
14
|
+
{...rest}
|
|
15
|
+
class:list={[
|
|
16
|
+
'grid items-start gap-x-8 gap-y-16 lg:grid-cols-2',
|
|
17
|
+
{
|
|
18
|
+
'items-start lg:child:sticky lg:child:top-[7.5rem]': align === 'start',
|
|
19
|
+
'items-center': align === 'center',
|
|
20
|
+
'lg:first:child:order-last lg:last:child:order-first': reverse === true,
|
|
21
|
+
'lg:first:child:even:order-last lg:last:child:even:order-first': reverse === 'auto',
|
|
22
|
+
},
|
|
23
|
+
className,
|
|
24
|
+
]}
|
|
25
|
+
>
|
|
26
|
+
<slot />
|
|
27
|
+
</Box>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { HTMLAttributes } from 'astro/types'
|
|
3
|
-
import
|
|
3
|
+
import Box from 'fulldev-ui/components/Box.astro'
|
|
4
4
|
|
|
5
5
|
interface Props extends HTMLAttributes<'table'> {
|
|
6
6
|
header?: string[] | undefined
|
|
@@ -11,34 +11,34 @@ interface Props extends HTMLAttributes<'table'> {
|
|
|
11
11
|
const { header, body, footer, ...rest } = Astro.props
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
<
|
|
14
|
+
<Box
|
|
15
15
|
class:list="table"
|
|
16
16
|
{...rest}
|
|
17
17
|
>
|
|
18
|
-
<
|
|
19
|
-
<
|
|
20
|
-
<
|
|
18
|
+
<Box as="table">
|
|
19
|
+
<Box as="thead">
|
|
20
|
+
<Box as="tr">
|
|
21
21
|
{header?.map((cell) => <th>{cell}</th>)}
|
|
22
|
-
</
|
|
23
|
-
</
|
|
24
|
-
<
|
|
22
|
+
</Box>
|
|
23
|
+
</Box>
|
|
24
|
+
<Box as="tbody">
|
|
25
25
|
{
|
|
26
26
|
body?.map((row: string[]) => (
|
|
27
|
-
<
|
|
27
|
+
<Box as="tr">
|
|
28
28
|
{row?.map((cell) => (
|
|
29
29
|
<td>{cell}</td>
|
|
30
30
|
))}
|
|
31
|
-
</
|
|
31
|
+
</Box>
|
|
32
32
|
))
|
|
33
33
|
}
|
|
34
|
-
</
|
|
35
|
-
<
|
|
36
|
-
<
|
|
34
|
+
</Box>
|
|
35
|
+
<Box as="tfoot">
|
|
36
|
+
<Box as="tr">
|
|
37
37
|
{footer?.map((cell) => <td>{cell}</td>)}
|
|
38
|
-
</
|
|
39
|
-
</
|
|
40
|
-
</
|
|
41
|
-
</
|
|
38
|
+
</Box>
|
|
39
|
+
</Box>
|
|
40
|
+
</Box>
|
|
41
|
+
</Box>
|
|
42
42
|
|
|
43
43
|
<style is:global>
|
|
44
44
|
@layer fulldev {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from 'fulldev-ui/components/ui/tabs'
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<Tabs
|
|
7
|
+
default-value="account"
|
|
8
|
+
class="w-[400px]"
|
|
9
|
+
>
|
|
10
|
+
<TabsList class="grid w-full grid-cols-2">
|
|
11
|
+
<TabsTrigger value="account"> Account </TabsTrigger>
|
|
12
|
+
<TabsTrigger value="password"> Password </TabsTrigger>
|
|
13
|
+
</TabsList>
|
|
14
|
+
<TabsContent value="account"> Account </TabsContent>
|
|
15
|
+
<TabsContent value="password"> Password </TabsContent>
|
|
16
|
+
</Tabs>
|
|
17
|
+
</template>
|
|
@@ -5,7 +5,7 @@ import Icon from 'fulldev-ui/components/Icon.astro'
|
|
|
5
5
|
interface Props {
|
|
6
6
|
show?: any
|
|
7
7
|
size?: any
|
|
8
|
-
variant?: '
|
|
8
|
+
variant?: 'default' | 'secondary' | 'outline' | 'ghost' | undefined
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
const { variant = 'secondary', ...rest } = Astro.props
|
|
@@ -59,10 +59,19 @@ const { variant = 'secondary', ...rest } = Astro.props
|
|
|
59
59
|
|
|
60
60
|
<style is:global>
|
|
61
61
|
.themer {
|
|
62
|
-
|
|
62
|
+
position: relative;
|
|
63
|
+
padding-right: 0;
|
|
64
|
+
padding-left: 0;
|
|
63
65
|
|
|
64
66
|
.themer-select {
|
|
65
|
-
|
|
67
|
+
position: absolute;
|
|
68
|
+
top: 0;
|
|
69
|
+
right: 0;
|
|
70
|
+
bottom: 0;
|
|
71
|
+
left: 0;
|
|
72
|
+
appearance: none;
|
|
73
|
+
opacity: 0;
|
|
74
|
+
cursor: pointer;
|
|
66
75
|
}
|
|
67
76
|
}
|
|
68
77
|
|
package/src/components/Toc.astro
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
---
|
|
1
|
+
<!-- ---
|
|
2
2
|
import type { MarkdownHeading } from 'astro'
|
|
3
3
|
import type { HTMLAttributes } from 'astro/types'
|
|
4
|
-
import
|
|
4
|
+
import Box from 'fulldev-ui/components/Box.astro'
|
|
5
5
|
import Heading from 'fulldev-ui/components/Heading.astro'
|
|
6
6
|
import Links from './Links.astro'
|
|
7
7
|
|
|
@@ -17,12 +17,12 @@ const filteredHeadings = headings?.filter((heading: any) => heading.depth <= 4)
|
|
|
17
17
|
|
|
18
18
|
const links = filteredHeadings?.map((button: any) => ({
|
|
19
19
|
text: button.text,
|
|
20
|
-
href: `#${button
|
|
21
|
-
class: `depth-${button
|
|
20
|
+
href: `#${button?.slug}`,
|
|
21
|
+
class: `depth-${button?.depth}`,
|
|
22
22
|
}))
|
|
23
23
|
---
|
|
24
24
|
|
|
25
|
-
<
|
|
25
|
+
<Box
|
|
26
26
|
class:list="toc"
|
|
27
27
|
{...rest}
|
|
28
28
|
>
|
|
@@ -30,7 +30,7 @@ const links = filteredHeadings?.map((button: any) => ({
|
|
|
30
30
|
(links?.length || 0) > 0 && (
|
|
31
31
|
<Heading
|
|
32
32
|
as="h6"
|
|
33
|
-
text={
|
|
33
|
+
text={'On this page'}
|
|
34
34
|
size="sm"
|
|
35
35
|
/>
|
|
36
36
|
)
|
|
@@ -39,24 +39,27 @@ const links = filteredHeadings?.map((button: any) => ({
|
|
|
39
39
|
{size}
|
|
40
40
|
{links}
|
|
41
41
|
/>
|
|
42
|
+
</Box>
|
|
42
43
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
<style is:global>
|
|
45
|
+
@layer fulldev {
|
|
46
|
+
.toc {
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-direction: column;
|
|
49
|
+
gap: var(--spacing-2);
|
|
47
50
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
+
.link:first-child {
|
|
52
|
+
color: var(--color-foreground);
|
|
53
|
+
font-weight: var(--font-weight-bold);
|
|
54
|
+
}
|
|
51
55
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
56
|
+
.link.depth-3 {
|
|
57
|
+
padding-left: var(--spacing-3);
|
|
58
|
+
}
|
|
55
59
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
60
|
+
.link.depth-4 {
|
|
61
|
+
padding-left: var(--spacing-6);
|
|
59
62
|
}
|
|
60
63
|
}
|
|
61
|
-
|
|
62
|
-
</
|
|
64
|
+
}
|
|
65
|
+
</style> -->
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import {
|
|
3
|
+
Menubar,
|
|
4
|
+
MenubarCheckboxItem,
|
|
5
|
+
MenubarContent,
|
|
6
|
+
MenubarItem,
|
|
7
|
+
MenubarMenu,
|
|
8
|
+
MenubarRadioGroup,
|
|
9
|
+
MenubarRadioItem,
|
|
10
|
+
MenubarSeparator,
|
|
11
|
+
MenubarShortcut,
|
|
12
|
+
MenubarSub,
|
|
13
|
+
MenubarSubContent,
|
|
14
|
+
MenubarSubTrigger,
|
|
15
|
+
MenubarTrigger,
|
|
16
|
+
} from 'fulldev-ui/components/ui/menubar'
|
|
17
|
+
|
|
18
|
+
interface Props {
|
|
19
|
+
sort?: {
|
|
20
|
+
name: string
|
|
21
|
+
options: {
|
|
22
|
+
label: string
|
|
23
|
+
value: string
|
|
24
|
+
}[]
|
|
25
|
+
}
|
|
26
|
+
filters?: {
|
|
27
|
+
name: string
|
|
28
|
+
options: {
|
|
29
|
+
label: string
|
|
30
|
+
value: string
|
|
31
|
+
}[]
|
|
32
|
+
}[]
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const { sort, filters } = defineProps<Props>()
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<template>
|
|
39
|
+
<Menubar>
|
|
40
|
+
<MenubarMenu>
|
|
41
|
+
<MenubarTrigger>File</MenubarTrigger>
|
|
42
|
+
<MenubarContent>
|
|
43
|
+
<MenubarItem> New Tab <MenubarShortcut>⌘T</MenubarShortcut> </MenubarItem>
|
|
44
|
+
<MenubarItem> New Window <MenubarShortcut>⌘N</MenubarShortcut> </MenubarItem>
|
|
45
|
+
<MenubarItem disabled> New Incognito Window </MenubarItem>
|
|
46
|
+
<MenubarSeparator />
|
|
47
|
+
<MenubarSub>
|
|
48
|
+
<MenubarSubTrigger>Share</MenubarSubTrigger>
|
|
49
|
+
<MenubarSubContent>
|
|
50
|
+
<MenubarItem>Email link</MenubarItem>
|
|
51
|
+
<MenubarItem>Messages</MenubarItem>
|
|
52
|
+
<MenubarItem>Notes</MenubarItem>
|
|
53
|
+
</MenubarSubContent>
|
|
54
|
+
</MenubarSub>
|
|
55
|
+
<MenubarSeparator />
|
|
56
|
+
<MenubarItem> Print... <MenubarShortcut>⌘P</MenubarShortcut> </MenubarItem>
|
|
57
|
+
</MenubarContent>
|
|
58
|
+
</MenubarMenu>
|
|
59
|
+
<MenubarMenu>
|
|
60
|
+
<MenubarTrigger>Edit</MenubarTrigger>
|
|
61
|
+
<MenubarContent>
|
|
62
|
+
<MenubarItem> Undo <MenubarShortcut>⌘Z</MenubarShortcut> </MenubarItem>
|
|
63
|
+
<MenubarItem> Redo <MenubarShortcut>⇧⌘Z</MenubarShortcut> </MenubarItem>
|
|
64
|
+
<MenubarSeparator />
|
|
65
|
+
<MenubarSub>
|
|
66
|
+
<MenubarSubTrigger>Find</MenubarSubTrigger>
|
|
67
|
+
<MenubarSubContent>
|
|
68
|
+
<MenubarItem>Search the web</MenubarItem>
|
|
69
|
+
<MenubarSeparator />
|
|
70
|
+
<MenubarItem>Find...</MenubarItem>
|
|
71
|
+
<MenubarItem>Find Next</MenubarItem>
|
|
72
|
+
<MenubarItem>Find Previous</MenubarItem>
|
|
73
|
+
</MenubarSubContent>
|
|
74
|
+
</MenubarSub>
|
|
75
|
+
<MenubarSeparator />
|
|
76
|
+
<MenubarItem>Cut</MenubarItem>
|
|
77
|
+
<MenubarItem>Copy</MenubarItem>
|
|
78
|
+
<MenubarItem>Paste</MenubarItem>
|
|
79
|
+
</MenubarContent>
|
|
80
|
+
</MenubarMenu>
|
|
81
|
+
<MenubarMenu>
|
|
82
|
+
<MenubarTrigger>View</MenubarTrigger>
|
|
83
|
+
<MenubarContent>
|
|
84
|
+
<MenubarCheckboxItem>Always Show Bookmarks Bar</MenubarCheckboxItem>
|
|
85
|
+
<MenubarCheckboxItem checked> Always Show Full URLs </MenubarCheckboxItem>
|
|
86
|
+
<MenubarSeparator />
|
|
87
|
+
<MenubarItem inset> Reload <MenubarShortcut>⌘R</MenubarShortcut> </MenubarItem>
|
|
88
|
+
<MenubarItem
|
|
89
|
+
disabled
|
|
90
|
+
inset
|
|
91
|
+
>
|
|
92
|
+
Force Reload <MenubarShortcut>⇧⌘R</MenubarShortcut>
|
|
93
|
+
</MenubarItem>
|
|
94
|
+
<MenubarSeparator />
|
|
95
|
+
<MenubarItem inset> Toggle Fullscreen </MenubarItem>
|
|
96
|
+
<MenubarSeparator />
|
|
97
|
+
<MenubarItem inset> Hide Sidebar </MenubarItem>
|
|
98
|
+
</MenubarContent>
|
|
99
|
+
</MenubarMenu>
|
|
100
|
+
<MenubarMenu>
|
|
101
|
+
<MenubarTrigger>Profiles</MenubarTrigger>
|
|
102
|
+
<MenubarContent>
|
|
103
|
+
<MenubarRadioGroup value="benoit">
|
|
104
|
+
<MenubarRadioItem value="andy"> Andy </MenubarRadioItem>
|
|
105
|
+
<MenubarRadioItem value="benoit"> Benoit </MenubarRadioItem>
|
|
106
|
+
<MenubarRadioItem value="Luis"> Luis </MenubarRadioItem>
|
|
107
|
+
</MenubarRadioGroup>
|
|
108
|
+
<MenubarSeparator />
|
|
109
|
+
<MenubarItem inset> Edit... </MenubarItem>
|
|
110
|
+
<MenubarSeparator />
|
|
111
|
+
<MenubarItem inset> Add Profile... </MenubarItem>
|
|
112
|
+
</MenubarContent>
|
|
113
|
+
</MenubarMenu>
|
|
114
|
+
</Menubar>
|
|
115
|
+
</template>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLAttributes } from 'astro/types'
|
|
3
|
+
import Box from 'fulldev-ui/components/Box.astro'
|
|
4
|
+
|
|
5
|
+
interface Props extends HTMLAttributes<'div'> {
|
|
6
|
+
size?: 'sm' | 'default' | 'lg' | 'xl' | undefined
|
|
7
|
+
align?: 'start' | 'center' | 'end' | undefined
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { size = 'default', align = 'start', ...rest } = Astro.props
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
<Box
|
|
14
|
+
class:list={[
|
|
15
|
+
'writeup',
|
|
16
|
+
'flex-flex-col w-full max-w-screen-md',
|
|
17
|
+
'first:child:mt-0',
|
|
18
|
+
'headings:scroll-mt-20 headings:text-pretty headings:font-semibold headings:tracking-tight',
|
|
19
|
+
'p:max-w-[85%] p:text-pretty p:leading-[1.75] p:text-muted-foreground',
|
|
20
|
+
'lead:leading-[1.75]',
|
|
21
|
+
'ul:my-6 ul:ml-4 ul:list-disc ul:li:mt-2',
|
|
22
|
+
{
|
|
23
|
+
// size
|
|
24
|
+
'text-sm headings:mt-2 headings:text-2xl p:mt-2': size === 'sm',
|
|
25
|
+
'child:mt-6 headings:mt-4 headings:text-4xl p:mt-4': size === 'default',
|
|
26
|
+
'text-lg child:mt-8 headings:mt-6 headings:text-4xl p:mt-6 md:headings:text-5xl': size === 'lg',
|
|
27
|
+
'text-lg child:mt-8 headings:mt-6 headings:text-5xl p:mt-6 md:text-xl md:headings:text-6xl': size === 'xl',
|
|
28
|
+
// align
|
|
29
|
+
'mr-auto items-start text-left child:mr-auto': align === 'start',
|
|
30
|
+
'mx-auto items-center text-center child:mx-auto': align === 'center',
|
|
31
|
+
'ml-auto items-end text-right child:ml-auto': align === 'end',
|
|
32
|
+
},
|
|
33
|
+
]}
|
|
34
|
+
{...rest}
|
|
35
|
+
>
|
|
36
|
+
<slot />
|
|
37
|
+
</Box>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import {
|
|
3
|
+
AccordionRoot,
|
|
4
|
+
type AccordionRootEmits,
|
|
5
|
+
type AccordionRootProps,
|
|
6
|
+
useForwardPropsEmits,
|
|
7
|
+
} from 'radix-vue'
|
|
8
|
+
|
|
9
|
+
const props = defineProps<AccordionRootProps>()
|
|
10
|
+
const emits = defineEmits<AccordionRootEmits>()
|
|
11
|
+
|
|
12
|
+
const forwarded = useForwardPropsEmits(props, emits)
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<AccordionRoot v-bind="forwarded">
|
|
17
|
+
<slot />
|
|
18
|
+
</AccordionRoot>
|
|
19
|
+
</template>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { cn } from 'fulldev-ui/lib/utils'
|
|
3
|
+
import { AccordionContent, type AccordionContentProps } from 'radix-vue'
|
|
4
|
+
import { computed, type HTMLAttributes } from 'vue'
|
|
5
|
+
|
|
6
|
+
const props = defineProps<AccordionContentProps & { class?: HTMLAttributes['class'] }>()
|
|
7
|
+
|
|
8
|
+
const delegatedProps = computed(() => {
|
|
9
|
+
const { class: _, ...delegated } = props
|
|
10
|
+
|
|
11
|
+
return delegated
|
|
12
|
+
})
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<AccordionContent
|
|
17
|
+
v-bind="delegatedProps"
|
|
18
|
+
class="overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
|
|
19
|
+
>
|
|
20
|
+
<div :class="cn('pb-4 pt-0', props.class)">
|
|
21
|
+
<slot />
|
|
22
|
+
</div>
|
|
23
|
+
</AccordionContent>
|
|
24
|
+
</template>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { cn } from 'fulldev-ui/lib/utils'
|
|
3
|
+
import { AccordionItem, type AccordionItemProps, useForwardProps } from 'radix-vue'
|
|
4
|
+
import { computed, type HTMLAttributes } from 'vue'
|
|
5
|
+
|
|
6
|
+
const props = defineProps<AccordionItemProps & { class?: HTMLAttributes['class'] }>()
|
|
7
|
+
|
|
8
|
+
const delegatedProps = computed(() => {
|
|
9
|
+
const { class: _, ...delegated } = props
|
|
10
|
+
|
|
11
|
+
return delegated
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<AccordionItem
|
|
19
|
+
v-bind="forwardedProps"
|
|
20
|
+
:class="cn('border-b', props.class)"
|
|
21
|
+
>
|
|
22
|
+
<slot />
|
|
23
|
+
</AccordionItem>
|
|
24
|
+
</template>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { cn } from 'fulldev-ui/lib/utils'
|
|
3
|
+
import { ChevronDown } from 'lucide-vue-next'
|
|
4
|
+
import { AccordionHeader, AccordionTrigger, type AccordionTriggerProps } from 'radix-vue'
|
|
5
|
+
import { computed, type HTMLAttributes } from 'vue'
|
|
6
|
+
|
|
7
|
+
const props = defineProps<AccordionTriggerProps & { class?: HTMLAttributes['class'] }>()
|
|
8
|
+
|
|
9
|
+
const delegatedProps = computed(() => {
|
|
10
|
+
const { class: _, ...delegated } = props
|
|
11
|
+
|
|
12
|
+
return delegated
|
|
13
|
+
})
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<AccordionHeader class="flex">
|
|
18
|
+
<AccordionTrigger
|
|
19
|
+
v-bind="delegatedProps"
|
|
20
|
+
:class="
|
|
21
|
+
cn(
|
|
22
|
+
'flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180',
|
|
23
|
+
props.class
|
|
24
|
+
)
|
|
25
|
+
"
|
|
26
|
+
>
|
|
27
|
+
<slot />
|
|
28
|
+
<slot name="icon">
|
|
29
|
+
<ChevronDown class="h-4 w-4 shrink-0 transition-transform duration-200" />
|
|
30
|
+
</slot>
|
|
31
|
+
</AccordionTrigger>
|
|
32
|
+
</AccordionHeader>
|
|
33
|
+
</template>
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
<script setup lang="ts" generic="T extends ZodObjectOrWrapped">
|
|
2
|
+
import { toTypedSchema } from '@vee-validate/zod'
|
|
3
|
+
import { Form } from 'fulldev-ui/components/ui/form'
|
|
4
|
+
import type { FormContext, GenericObject } from 'vee-validate'
|
|
5
|
+
import { computed, toRefs } from 'vue'
|
|
6
|
+
import type { z, ZodAny } from 'zod'
|
|
7
|
+
import AutoFormField from './AutoFormField.vue'
|
|
8
|
+
import { provideDependencies } from './dependencies'
|
|
9
|
+
import type { Config, ConfigItem, Dependency, Shape } from './interface'
|
|
10
|
+
import {
|
|
11
|
+
getBaseSchema,
|
|
12
|
+
getBaseType,
|
|
13
|
+
getDefaultValueInZodStack,
|
|
14
|
+
getObjectFormSchema,
|
|
15
|
+
type ZodObjectOrWrapped,
|
|
16
|
+
} from './utils'
|
|
17
|
+
|
|
18
|
+
const props = defineProps<{
|
|
19
|
+
schema: T
|
|
20
|
+
form?: FormContext<GenericObject>
|
|
21
|
+
fieldConfig?: Config<z.infer<T>>
|
|
22
|
+
dependencies?: Dependency<z.infer<T>>[]
|
|
23
|
+
}>()
|
|
24
|
+
|
|
25
|
+
const emits = defineEmits<{
|
|
26
|
+
submit: [event: z.infer<T>]
|
|
27
|
+
}>()
|
|
28
|
+
|
|
29
|
+
const { dependencies } = toRefs(props)
|
|
30
|
+
provideDependencies(dependencies)
|
|
31
|
+
|
|
32
|
+
const shapes = computed(() => {
|
|
33
|
+
// @ts-expect-error ignore {} not assignable to object
|
|
34
|
+
const val: { [key in keyof T]: Shape } = {}
|
|
35
|
+
const baseSchema = getObjectFormSchema(props.schema)
|
|
36
|
+
const shape = baseSchema.shape
|
|
37
|
+
Object.keys(shape).forEach((name) => {
|
|
38
|
+
const item = shape[name] as ZodAny
|
|
39
|
+
const baseItem = getBaseSchema(item) as ZodAny
|
|
40
|
+
let options = baseItem && 'values' in baseItem._def ? (baseItem._def.values as string[]) : undefined
|
|
41
|
+
if (!Array.isArray(options) && typeof options === 'object') options = Object.values(options)
|
|
42
|
+
|
|
43
|
+
val[name as keyof T] = {
|
|
44
|
+
type: getBaseType(item),
|
|
45
|
+
default: getDefaultValueInZodStack(item),
|
|
46
|
+
options,
|
|
47
|
+
required: !['ZodOptional', 'ZodNullable'].includes(item._def.typeName),
|
|
48
|
+
schema: baseItem,
|
|
49
|
+
}
|
|
50
|
+
})
|
|
51
|
+
return val
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
const fields = computed(() => {
|
|
55
|
+
// @ts-expect-error ignore {} not assignable to object
|
|
56
|
+
const val: { [key in keyof z.infer<T>]: { shape: Shape; fieldName: string; config: ConfigItem } } = {}
|
|
57
|
+
for (const key in shapes.value) {
|
|
58
|
+
const shape = shapes.value[key]
|
|
59
|
+
val[key as keyof z.infer<T>] = {
|
|
60
|
+
shape,
|
|
61
|
+
config: props.fieldConfig?.[key] as ConfigItem,
|
|
62
|
+
fieldName: key,
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return val
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
const formComponent = computed(() => (props.form ? 'form' : Form))
|
|
69
|
+
const formComponentProps = computed(() => {
|
|
70
|
+
if (props.form) {
|
|
71
|
+
return {
|
|
72
|
+
onSubmit: props.form.handleSubmit((val) => emits('submit', val)),
|
|
73
|
+
}
|
|
74
|
+
} else {
|
|
75
|
+
const formSchema = toTypedSchema(props.schema)
|
|
76
|
+
return {
|
|
77
|
+
keepValues: true,
|
|
78
|
+
validationSchema: formSchema,
|
|
79
|
+
onSubmit: (val: GenericObject) => emits('submit', val),
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
})
|
|
83
|
+
</script>
|
|
84
|
+
|
|
85
|
+
<template>
|
|
86
|
+
<component
|
|
87
|
+
:is="formComponent"
|
|
88
|
+
v-bind="formComponentProps"
|
|
89
|
+
>
|
|
90
|
+
<slot
|
|
91
|
+
name="customAutoForm"
|
|
92
|
+
:fields="fields"
|
|
93
|
+
>
|
|
94
|
+
<template
|
|
95
|
+
v-for="(shape, key) of shapes"
|
|
96
|
+
:key="key"
|
|
97
|
+
>
|
|
98
|
+
<slot
|
|
99
|
+
:shape="shape"
|
|
100
|
+
:name="key.toString() as keyof z.infer<T>"
|
|
101
|
+
:field-name="key.toString()"
|
|
102
|
+
:config="fieldConfig?.[key as keyof typeof fieldConfig] as ConfigItem"
|
|
103
|
+
>
|
|
104
|
+
<AutoFormField
|
|
105
|
+
:config="fieldConfig?.[key as keyof typeof fieldConfig] as ConfigItem"
|
|
106
|
+
:field-name="key.toString()"
|
|
107
|
+
:shape="shape"
|
|
108
|
+
/>
|
|
109
|
+
</slot>
|
|
110
|
+
</template>
|
|
111
|
+
</slot>
|
|
112
|
+
|
|
113
|
+
<slot :shapes="shapes" />
|
|
114
|
+
</component>
|
|
115
|
+
</template>
|