kofi-stack-template-generator 2.1.37 → 2.1.38
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/.turbo/turbo-build.log +6 -6
- package/dist/index.js +8057 -440
- package/package.json +1 -1
- package/src/templates.generated.ts +248 -94
- package/templates/integrations/posthog/src/components/providers/posthog-provider.tsx.hbs +4 -1
- package/templates/marketing/payload/package.json.hbs +41 -26
- package/templates/marketing/payload/src/Footer/Component.client.tsx +288 -0
- package/templates/marketing/payload/src/Footer/Component.tsx +11 -0
- package/templates/marketing/payload/src/Footer/RowLabel.tsx +15 -0
- package/templates/marketing/payload/src/Footer/config.ts +178 -0
- package/templates/marketing/payload/src/Footer/hooks/{revalidateFooter.ts.hbs → revalidateFooter.ts} +5 -5
- package/templates/marketing/payload/src/Header/Component.client.tsx +94 -0
- package/templates/marketing/payload/src/Header/Component.tsx +10 -0
- package/templates/marketing/payload/src/Header/MegaMenu/index.tsx +197 -0
- package/templates/marketing/payload/src/Header/MobileMenu/HamburgerIcon.tsx +48 -0
- package/templates/marketing/payload/src/Header/MobileMenu/index.tsx +299 -0
- package/templates/marketing/payload/src/Header/Nav/index.tsx +76 -0
- package/templates/marketing/payload/src/Header/RowLabel.tsx +21 -0
- package/templates/marketing/payload/src/Header/config.ts +208 -0
- package/templates/marketing/payload/src/Header/hooks/{revalidateHeader.ts.hbs → revalidateHeader.ts} +5 -5
- package/templates/marketing/payload/src/access/{authenticated.ts.hbs → authenticated.ts} +1 -1
- package/templates/marketing/payload/src/access/{authenticatedOrPublished.ts.hbs → authenticatedOrPublished.ts} +8 -8
- package/templates/marketing/payload/src/app/(docs)/docs/[[...slug]]/page.tsx +117 -0
- package/templates/marketing/payload/src/app/(docs)/docs/layout.tsx +39 -0
- package/templates/marketing/payload/src/app/(docs)/layout.tsx +44 -0
- package/templates/marketing/payload/src/app/(frontend)/(sitemaps)/pages-sitemap.xml/route.ts +68 -0
- package/templates/marketing/payload/src/app/(frontend)/(sitemaps)/posts-sitemap.xml/route.ts +55 -0
- package/templates/marketing/payload/src/app/(frontend)/[slug]/page.client.tsx +15 -0
- package/templates/marketing/payload/src/app/(frontend)/[slug]/page.tsx +114 -0
- package/templates/marketing/payload/src/app/(frontend)/api/docs-search/route.ts +67 -0
- package/templates/marketing/payload/src/app/(frontend)/api/newsletter/route.ts +260 -0
- package/templates/marketing/payload/src/app/(frontend)/api/pricing/route.ts +266 -0
- package/templates/marketing/payload/src/app/(frontend)/globals.css +1019 -0
- package/templates/marketing/payload/src/app/(frontend)/layout.tsx +114 -0
- package/templates/marketing/payload/src/app/(frontend)/next/exit-preview/route.ts +7 -0
- package/templates/marketing/payload/src/app/(frontend)/next/preview/route.ts +56 -0
- package/templates/marketing/payload/src/app/(frontend)/next/seed/route.ts +31 -0
- package/templates/marketing/payload/src/app/(frontend)/not-found.tsx +17 -0
- package/templates/marketing/payload/src/app/(frontend)/page.tsx +5 -0
- package/templates/marketing/payload/src/app/(frontend)/posts/BlogPageClient.tsx +190 -0
- package/templates/marketing/payload/src/app/(frontend)/posts/[slug]/BlogPostContent.tsx +67 -0
- package/templates/marketing/payload/src/app/(frontend)/posts/[slug]/page.client.tsx +15 -0
- package/templates/marketing/payload/src/app/(frontend)/posts/[slug]/page.tsx +118 -0
- package/templates/marketing/payload/src/app/(frontend)/posts/page/[pageNumber]/page.client.tsx +15 -0
- package/templates/marketing/payload/src/app/(frontend)/posts/page/[pageNumber]/page.tsx +87 -0
- package/templates/marketing/payload/src/app/(frontend)/posts/page.tsx +49 -0
- package/templates/marketing/payload/src/app/(frontend)/search/page.client.tsx +15 -0
- package/templates/marketing/payload/src/app/(frontend)/search/page.tsx +87 -0
- package/templates/marketing/payload/src/app/(payload)/admin/[[...segments]]/not-found.tsx +24 -0
- package/templates/marketing/payload/src/app/(payload)/admin/[[...segments]]/page.tsx +24 -0
- package/templates/marketing/payload/src/app/(payload)/admin/importMap.js +83 -0
- package/templates/marketing/payload/src/app/(payload)/api/[...slug]/{route.ts.hbs → route.ts} +13 -9
- package/templates/marketing/payload/src/app/(payload)/api/graphql/{route.ts.hbs → route.ts} +2 -2
- package/templates/marketing/payload/src/app/(payload)/api/graphql-playground/{route.ts.hbs → route.ts} +3 -3
- package/templates/marketing/payload/src/app/(payload)/custom.scss +0 -0
- package/templates/marketing/payload/src/app/(payload)/layout.tsx +31 -0
- package/templates/marketing/payload/src/blocks/ArchiveBlock/Component.tsx +65 -0
- package/templates/marketing/payload/src/blocks/ArchiveBlock/config.ts +120 -0
- package/templates/marketing/payload/src/blocks/Banner/Component.tsx +26 -0
- package/templates/marketing/payload/src/blocks/Banner/config.ts +67 -0
- package/templates/marketing/payload/src/blocks/BentoFeatures/Component.tsx +243 -0
- package/templates/marketing/payload/src/blocks/BentoFeatures/config.ts +147 -0
- package/templates/marketing/payload/src/blocks/CallToAction/Component.tsx +31 -0
- package/templates/marketing/payload/src/blocks/CallToAction/config.ts +68 -0
- package/templates/marketing/payload/src/blocks/Code/Component.client.tsx +33 -0
- package/templates/marketing/payload/src/blocks/Code/Component.tsx +21 -0
- package/templates/marketing/payload/src/blocks/Code/CopyButton.tsx +33 -0
- package/templates/marketing/payload/src/blocks/Code/config.ts +33 -0
- package/templates/marketing/payload/src/blocks/Content/Component.tsx +41 -0
- package/templates/marketing/payload/src/blocks/Content/config.ts +105 -0
- package/templates/marketing/payload/src/blocks/FAQAccordion/Component.tsx +90 -0
- package/templates/marketing/payload/src/blocks/FAQAccordion/config.ts +75 -0
- package/templates/marketing/payload/src/blocks/FeatureGrid/Component.tsx +108 -0
- package/templates/marketing/payload/src/blocks/FeatureGrid/config.ts +109 -0
- package/templates/marketing/payload/src/blocks/FeatureShowcase/Component.tsx +107 -0
- package/templates/marketing/payload/src/blocks/FeatureShowcase/config.ts +111 -0
- package/templates/marketing/payload/src/blocks/FinalCTA/Component.tsx +117 -0
- package/templates/marketing/payload/src/blocks/FinalCTA/config.ts +50 -0
- package/templates/marketing/payload/src/blocks/Form/Checkbox/index.tsx +45 -0
- package/templates/marketing/payload/src/blocks/Form/Component.tsx +170 -0
- package/templates/marketing/payload/src/blocks/Form/Country/index.tsx +65 -0
- package/templates/marketing/payload/src/blocks/Form/Country/options.ts +982 -0
- package/templates/marketing/payload/src/blocks/Form/Email/index.tsx +38 -0
- package/templates/marketing/payload/src/blocks/Form/Error/index.tsx +13 -0
- package/templates/marketing/payload/src/blocks/Form/Message/index.tsx +13 -0
- package/templates/marketing/payload/src/blocks/Form/Number/index.tsx +36 -0
- package/templates/marketing/payload/src/blocks/Form/Select/index.tsx +63 -0
- package/templates/marketing/payload/src/blocks/Form/State/index.tsx +64 -0
- package/templates/marketing/payload/src/blocks/Form/State/options.ts +52 -0
- package/templates/marketing/payload/src/blocks/Form/Text/index.tsx +32 -0
- package/templates/marketing/payload/src/blocks/Form/Textarea/index.tsx +40 -0
- package/templates/marketing/payload/src/blocks/Form/Width/index.tsx +13 -0
- package/templates/marketing/payload/src/blocks/Form/config.ts +77 -0
- package/templates/marketing/payload/src/blocks/Form/fields.tsx +21 -0
- package/templates/marketing/payload/src/blocks/HowItWorks/Component.tsx +59 -0
- package/templates/marketing/payload/src/blocks/HowItWorks/config.ts +88 -0
- package/templates/marketing/payload/src/blocks/IndustryTabs/Component.tsx +132 -0
- package/templates/marketing/payload/src/blocks/IndustryTabs/config.ts +77 -0
- package/templates/marketing/payload/src/blocks/LogoBanner/Component.tsx +95 -0
- package/templates/marketing/payload/src/blocks/LogoBanner/config.ts +48 -0
- package/templates/marketing/payload/src/blocks/MediaBlock/Component.tsx +67 -0
- package/templates/marketing/payload/src/blocks/MediaBlock/config.ts +14 -0
- package/templates/marketing/payload/src/blocks/Personas/Component.tsx +69 -0
- package/templates/marketing/payload/src/blocks/Personas/config.ts +96 -0
- package/templates/marketing/payload/src/blocks/PricingTable/ComparisonTable.tsx +250 -0
- package/templates/marketing/payload/src/blocks/PricingTable/Component.tsx +443 -0
- package/templates/marketing/payload/src/blocks/PricingTable/config.ts +142 -0
- package/templates/marketing/payload/src/blocks/ProofBanner/Component.tsx +65 -0
- package/templates/marketing/payload/src/blocks/ProofBanner/config.ts +42 -0
- package/templates/marketing/payload/src/blocks/RelatedPosts/Component.tsx +32 -0
- package/templates/marketing/payload/src/blocks/RenderBlocks.tsx +92 -0
- package/templates/marketing/payload/src/blocks/TestimonialsGrid/Component.tsx +107 -0
- package/templates/marketing/payload/src/blocks/TestimonialsGrid/config.ts +76 -0
- package/templates/marketing/payload/src/blocks/TrustColumns/Component.tsx +83 -0
- package/templates/marketing/payload/src/blocks/TrustColumns/config.ts +70 -0
- package/templates/marketing/payload/src/collections/Categories.ts +28 -0
- package/templates/marketing/payload/src/collections/FAQs/index.ts +100 -0
- package/templates/marketing/payload/src/collections/Media.ts +160 -0
- package/templates/marketing/payload/src/collections/Pages/hooks/revalidatePage.ts +43 -0
- package/templates/marketing/payload/src/collections/Pages/index.ts +168 -0
- package/templates/marketing/payload/src/collections/Posts/hooks/populateAuthors.ts +41 -0
- package/templates/marketing/payload/src/collections/Posts/hooks/revalidatePost.ts +44 -0
- package/templates/marketing/payload/src/collections/Posts/index.ts +259 -0
- package/templates/marketing/payload/src/collections/Users/index.ts +26 -0
- package/templates/marketing/payload/src/components/AdminBar/index.scss +7 -0
- package/templates/marketing/payload/src/components/AdminBar/index.tsx +89 -0
- package/templates/marketing/payload/src/components/Analytics/CTATracker.tsx +33 -0
- package/templates/marketing/payload/src/components/Analytics/FeatureSectionTracker.tsx +47 -0
- package/templates/marketing/payload/src/components/Analytics/PricingViewTracker.tsx +46 -0
- package/templates/marketing/payload/src/components/Analytics/index.tsx +3 -0
- package/templates/marketing/payload/src/components/BeforeDashboard/SeedButton/index.tsx +89 -0
- package/templates/marketing/payload/src/components/BeforeDashboard/index.tsx +69 -0
- package/templates/marketing/payload/src/components/BeforeLogin/index.tsx +14 -0
- package/templates/marketing/payload/src/components/BlogCTA/index.tsx +77 -0
- package/templates/marketing/payload/src/components/Card/index.tsx +85 -0
- package/templates/marketing/payload/src/components/CollectionArchive/index.tsx +32 -0
- package/templates/marketing/payload/src/components/JsonLd/index.tsx +138 -0
- package/templates/marketing/payload/src/components/Link/index.tsx +66 -0
- package/templates/marketing/payload/src/components/LivePreviewListener/index.tsx +10 -0
- package/templates/marketing/payload/src/components/Logo/Logo.tsx +46 -0
- package/templates/marketing/payload/src/components/Media/ImageMedia/index.tsx +80 -0
- package/templates/marketing/payload/src/components/Media/VideoMedia/index.tsx +47 -0
- package/templates/marketing/payload/src/components/Media/index.tsx +26 -0
- package/templates/marketing/payload/src/components/Media/types.ts +22 -0
- package/templates/marketing/payload/src/components/PageRange/index.tsx +57 -0
- package/templates/marketing/payload/src/components/Pagination/index.tsx +101 -0
- package/templates/marketing/payload/src/components/PayloadRedirects/index.tsx +48 -0
- package/templates/marketing/payload/src/components/RichText/index.tsx +152 -0
- package/templates/marketing/payload/src/components/TableOfContents/index.tsx +128 -0
- package/templates/marketing/payload/src/components/ui/accordion.tsx +64 -0
- package/templates/marketing/payload/src/components/ui/button.tsx +52 -0
- package/templates/marketing/payload/src/components/ui/card.tsx +48 -0
- package/templates/marketing/payload/src/components/ui/checkbox.tsx +27 -0
- package/templates/marketing/payload/src/components/ui/input.tsx +22 -0
- package/templates/marketing/payload/src/components/ui/label.tsx +19 -0
- package/templates/marketing/payload/src/components/ui/pagination.tsx +92 -0
- package/templates/marketing/payload/src/components/ui/select.tsx +144 -0
- package/templates/marketing/payload/src/components/ui/textarea.tsx +21 -0
- package/templates/marketing/payload/src/endpoints/seed/contact-form.ts +111 -0
- package/templates/marketing/payload/src/endpoints/seed/contact-page.ts +56 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/about.ts +281 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/faqs.ts +224 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/features/automation.ts +229 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/features/custom-fields.ts +229 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/features/dashboard.ts +228 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/features/index.ts +6 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/features/monetization.ts +230 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/features/seo.ts +229 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/features/templates.ts +218 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/home.ts +555 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/index.ts +767 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/posts.ts +623 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/pricing.ts +251 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/privacy.ts +457 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/richtext-helper.ts +88 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/terms.ts +478 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/use-cases/b2b-vendor-hubs.ts +229 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/use-cases/communities.ts +230 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/use-cases/index.ts +4 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/use-cases/local-services.ts +230 -0
- package/templates/marketing/payload/src/endpoints/seed/directoryhub/use-cases/marketplaces.ts +230 -0
- package/templates/marketing/payload/src/endpoints/seed/home-static.ts +691 -0
- package/templates/marketing/payload/src/endpoints/seed/home.ts +675 -0
- package/templates/marketing/payload/src/endpoints/seed/image-1.ts +67 -0
- package/templates/marketing/payload/src/endpoints/seed/image-2.ts +67 -0
- package/templates/marketing/payload/src/endpoints/seed/image-3.ts +67 -0
- package/templates/marketing/payload/src/endpoints/seed/image-hero-1.ts +5 -0
- package/templates/marketing/payload/src/endpoints/seed/image-hero1.webp +0 -0
- package/templates/marketing/payload/src/endpoints/seed/image-post1.webp +0 -0
- package/templates/marketing/payload/src/endpoints/seed/image-post2.webp +0 -0
- package/templates/marketing/payload/src/endpoints/seed/image-post3.webp +0 -0
- package/templates/marketing/payload/src/endpoints/seed/index.ts +335 -0
- package/templates/marketing/payload/src/endpoints/seed/post-1.ts +315 -0
- package/templates/marketing/payload/src/endpoints/seed/post-2.ts +232 -0
- package/templates/marketing/payload/src/endpoints/seed/post-3.ts +268 -0
- package/templates/marketing/payload/src/fields/defaultLexical.ts +73 -0
- package/templates/marketing/payload/src/fields/link.ts +139 -0
- package/templates/marketing/payload/src/fields/linkGroup.ts +28 -0
- package/templates/marketing/payload/src/heros/HighImpact/index.tsx +56 -0
- package/templates/marketing/payload/src/heros/LowImpact/index.tsx +48 -0
- package/templates/marketing/payload/src/heros/MediumImpact/index.tsx +50 -0
- package/templates/marketing/payload/src/heros/PostHero/index.tsx +73 -0
- package/templates/marketing/payload/src/heros/ProductShowcase/AnimatedMockup.tsx +241 -0
- package/templates/marketing/payload/src/heros/ProductShowcase/index.tsx +108 -0
- package/templates/marketing/payload/src/heros/{RenderHero.tsx.hbs → RenderHero.tsx} +9 -9
- package/templates/marketing/payload/src/heros/config.ts +121 -0
- package/templates/marketing/payload/src/hooks/populatePublishedAt.ts +15 -0
- package/templates/marketing/payload/src/hooks/{revalidateRedirects.ts.hbs → revalidateRedirects.ts} +3 -3
- package/templates/marketing/payload/src/lib/convex.ts +13 -0
- package/templates/marketing/payload/src/lib/docs-source.ts +138 -0
- package/templates/marketing/payload/src/lib/mdx.tsx +191 -0
- package/templates/marketing/payload/src/payload.config.ts.hbs +95 -145
- package/templates/marketing/payload/src/plugins/index.ts +107 -0
- package/templates/marketing/payload/src/providers/HeaderTheme/index.tsx +34 -0
- package/templates/marketing/payload/src/providers/PostHogProvider.tsx +33 -0
- package/templates/marketing/payload/src/providers/Theme/InitTheme/{index.tsx.hbs → index.tsx} +11 -10
- package/templates/marketing/payload/src/providers/Theme/ThemeSelector/index.tsx +133 -0
- package/templates/marketing/payload/src/providers/Theme/ThemeSelector/types.ts +7 -0
- package/templates/marketing/payload/src/providers/Theme/index.tsx +60 -0
- package/templates/marketing/payload/src/providers/Theme/shared.ts +17 -0
- package/templates/marketing/payload/src/providers/Theme/{types.ts.hbs → types.ts} +3 -3
- package/templates/marketing/payload/src/providers/index.tsx +17 -0
- package/templates/marketing/payload/src/search/Component.tsx +42 -0
- package/templates/marketing/payload/src/search/beforeSync.ts +56 -0
- package/templates/marketing/payload/src/search/fieldOverrides.ts +61 -0
- package/templates/marketing/payload/src/utilities/deepMerge.ts +35 -0
- package/templates/marketing/payload/src/utilities/extractHeadings.ts +78 -0
- package/templates/marketing/payload/src/utilities/formatAuthors.ts +24 -0
- package/templates/marketing/payload/src/utilities/formatDateTime.ts +20 -0
- package/templates/marketing/payload/src/utilities/generateMeta.ts +93 -0
- package/templates/marketing/payload/src/utilities/generatePreviewPath.ts +33 -0
- package/templates/marketing/payload/src/utilities/getDocument.ts +32 -0
- package/templates/marketing/payload/src/utilities/getGlobals.ts +26 -0
- package/templates/marketing/payload/src/utilities/getMeUser.ts +43 -0
- package/templates/marketing/payload/src/utilities/getMediaUrl.ts +24 -0
- package/templates/marketing/payload/src/utilities/getRedirects.ts +26 -0
- package/templates/marketing/payload/src/utilities/getURL.ts +26 -0
- package/templates/marketing/payload/src/utilities/mergeOpenGraph.ts +26 -0
- package/templates/marketing/payload/src/utilities/toKebabCase.ts +5 -0
- package/templates/marketing/payload/src/utilities/ui.ts +12 -0
- package/templates/marketing/payload/src/utilities/useClickableCard.ts +108 -0
- package/templates/marketing/payload/src/utilities/useDebounce.ts +17 -0
- package/templates/packages/ui/src/components/button.tsx.hbs +53 -0
- package/templates/packages/ui/src/components/card.tsx.hbs +76 -0
- package/templates/packages/ui/src/components/separator.tsx.hbs +26 -0
- package/templates/marketing/payload/src/Footer/config.ts.hbs +0 -178
- package/templates/marketing/payload/src/Footer/index.ts.hbs +0 -1
- package/templates/marketing/payload/src/Header/RowLabel.tsx.hbs +0 -21
- package/templates/marketing/payload/src/Header/config.ts.hbs +0 -208
- package/templates/marketing/payload/src/Header/index.ts.hbs +0 -1
- package/templates/marketing/payload/src/access/index.ts.hbs +0 -3
- package/templates/marketing/payload/src/app/(frontend)/layout.tsx.hbs +0 -19
- package/templates/marketing/payload/src/app/(frontend)/next/seed/route.ts.hbs +0 -31
- package/templates/marketing/payload/src/app/(frontend)/page.tsx.hbs +0 -83
- package/templates/marketing/payload/src/app/(payload)/admin/[[...segments]]/not-found.tsx.hbs +0 -24
- package/templates/marketing/payload/src/app/(payload)/admin/[[...segments]]/page.tsx.hbs +0 -24
- package/templates/marketing/payload/src/app/(payload)/admin/importMap.js.hbs +0 -1
- package/templates/marketing/payload/src/app/(payload)/custom.scss.hbs +0 -1
- package/templates/marketing/payload/src/app/(payload)/layout.tsx.hbs +0 -31
- package/templates/marketing/payload/src/app/globals.css.hbs +0 -83
- package/templates/marketing/payload/src/app/layout.tsx.hbs +0 -10
- package/templates/marketing/payload/src/blocks/Benefits.ts.hbs +0 -34
- package/templates/marketing/payload/src/blocks/CTA.ts.hbs +0 -39
- package/templates/marketing/payload/src/blocks/Content.ts.hbs +0 -9
- package/templates/marketing/payload/src/blocks/FAQ.ts.hbs +0 -18
- package/templates/marketing/payload/src/blocks/Features.ts.hbs +0 -34
- package/templates/marketing/payload/src/blocks/Hero.ts.hbs +0 -40
- package/templates/marketing/payload/src/blocks/LogoBanner.ts.hbs +0 -17
- package/templates/marketing/payload/src/blocks/Pricing.ts.hbs +0 -37
- package/templates/marketing/payload/src/blocks/Testimonials.ts.hbs +0 -21
- package/templates/marketing/payload/src/blocks/index.ts.hbs +0 -9
- package/templates/marketing/payload/src/collections/Categories/index.ts.hbs +0 -28
- package/templates/marketing/payload/src/collections/FAQs/index.ts.hbs +0 -100
- package/templates/marketing/payload/src/collections/Media.ts.hbs +0 -164
- package/templates/marketing/payload/src/collections/Pages/hooks/revalidatePage.ts.hbs +0 -43
- package/templates/marketing/payload/src/collections/Pages/index.ts.hbs +0 -142
- package/templates/marketing/payload/src/collections/Posts/hooks/populateAuthors.ts.hbs +0 -41
- package/templates/marketing/payload/src/collections/Posts/hooks/revalidatePost.ts.hbs +0 -44
- package/templates/marketing/payload/src/collections/Posts/index.ts.hbs +0 -244
- package/templates/marketing/payload/src/collections/Users/index.ts.hbs +0 -26
- package/templates/marketing/payload/src/collections/index.ts.hbs +0 -6
- package/templates/marketing/payload/src/components/BeforeDashboard/SeedButton/index.tsx.hbs +0 -89
- package/templates/marketing/payload/src/components/BeforeDashboard/index.tsx.hbs +0 -69
- package/templates/marketing/payload/src/components/BeforeLogin/index.tsx.hbs +0 -14
- package/templates/marketing/payload/src/components/Link/index.tsx.hbs +0 -79
- package/templates/marketing/payload/src/components/Media/index.tsx.hbs +0 -67
- package/templates/marketing/payload/src/components/RichText/index.tsx.hbs +0 -44
- package/templates/marketing/payload/src/endpoints/seed/home.ts.hbs +0 -76
- package/templates/marketing/payload/src/endpoints/seed/image-1.ts.hbs +0 -5
- package/templates/marketing/payload/src/endpoints/seed/image-2.ts.hbs +0 -5
- package/templates/marketing/payload/src/endpoints/seed/image-hero.ts.hbs +0 -5
- package/templates/marketing/payload/src/endpoints/seed/index.ts.hbs +0 -235
- package/templates/marketing/payload/src/endpoints/seed/post-1.ts.hbs +0 -252
- package/templates/marketing/payload/src/fields/defaultLexical.ts.hbs +0 -73
- package/templates/marketing/payload/src/fields/link.ts.hbs +0 -139
- package/templates/marketing/payload/src/fields/linkGroup.ts.hbs +0 -28
- package/templates/marketing/payload/src/globals/index.ts.hbs +0 -2
- package/templates/marketing/payload/src/heros/HighImpact/index.tsx.hbs +0 -53
- package/templates/marketing/payload/src/heros/LowImpact/index.tsx.hbs +0 -48
- package/templates/marketing/payload/src/heros/MediumImpact/index.tsx.hbs +0 -46
- package/templates/marketing/payload/src/heros/PostHero/index.tsx.hbs +0 -68
- package/templates/marketing/payload/src/heros/ProductShowcase/index.tsx.hbs +0 -88
- package/templates/marketing/payload/src/heros/config.ts.hbs +0 -112
- package/templates/marketing/payload/src/heros/index.ts.hbs +0 -7
- package/templates/marketing/payload/src/hooks/index.ts.hbs +0 -2
- package/templates/marketing/payload/src/hooks/populatePublishedAt.ts.hbs +0 -15
- package/templates/marketing/payload/src/providers/HeaderTheme/index.tsx.hbs +0 -34
- package/templates/marketing/payload/src/providers/Theme/index.tsx.hbs +0 -60
- package/templates/marketing/payload/src/providers/Theme/shared.ts.hbs +0 -17
- package/templates/marketing/payload/src/providers/index.tsx.hbs +0 -18
- package/templates/marketing/payload/src/utilities/deepMerge.ts.hbs +0 -35
- package/templates/marketing/payload/src/utilities/formatAuthors.ts.hbs +0 -24
- package/templates/marketing/payload/src/utilities/formatDateTime.ts.hbs +0 -13
- package/templates/marketing/payload/src/utilities/generateMeta.ts.hbs +0 -87
- package/templates/marketing/payload/src/utilities/generatePreviewPath.ts.hbs +0 -33
- package/templates/marketing/payload/src/utilities/getURL.ts.hbs +0 -26
- package/templates/marketing/payload/src/utilities/index.ts.hbs +0 -8
- package/templates/marketing/payload/src/utilities/mergeOpenGraph.ts.hbs +0 -26
- /package/templates/marketing/payload/src/access/{anyone.ts.hbs → anyone.ts} +0 -0
- /package/templates/marketing/payload/src/components/BeforeDashboard/SeedButton/{index.scss.hbs → index.scss} +0 -0
- /package/templates/marketing/payload/src/components/BeforeDashboard/{index.scss.hbs → index.scss} +0 -0
- /package/templates/marketing/payload/src/fields/{index.ts.hbs → index.ts} +0 -0
- /package/templates/marketing/payload/src/utilities/{canUseDOM.ts.hbs → canUseDOM.ts} +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { cn } from "@/utilities/ui"
|
|
2
|
+
import type * as React from "react"
|
|
3
|
+
|
|
4
|
+
const Input: React.FC<
|
|
5
|
+
{
|
|
6
|
+
ref?: React.Ref<HTMLInputElement>
|
|
7
|
+
} & React.InputHTMLAttributes<HTMLInputElement>
|
|
8
|
+
> = ({ type, className, ref, ...props }) => {
|
|
9
|
+
return (
|
|
10
|
+
<input
|
|
11
|
+
className={cn(
|
|
12
|
+
"flex h-10 w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
13
|
+
className,
|
|
14
|
+
)}
|
|
15
|
+
ref={ref}
|
|
16
|
+
type={type}
|
|
17
|
+
{...props}
|
|
18
|
+
/>
|
|
19
|
+
)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { Input }
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { cn } from "@/utilities/ui"
|
|
4
|
+
import * as LabelPrimitive from "@radix-ui/react-label"
|
|
5
|
+
import { type VariantProps, cva } from "class-variance-authority"
|
|
6
|
+
import type * as React from "react"
|
|
7
|
+
|
|
8
|
+
const labelVariants = cva(
|
|
9
|
+
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
const Label: React.FC<
|
|
13
|
+
{ ref?: React.Ref<HTMLLabelElement> } & React.ComponentProps<typeof LabelPrimitive.Root> &
|
|
14
|
+
VariantProps<typeof labelVariants>
|
|
15
|
+
> = ({ className, ref, ...props }) => (
|
|
16
|
+
<LabelPrimitive.Root className={cn(labelVariants(), className)} ref={ref} {...props} />
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
export { Label }
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import type { ButtonProps } from "@/components/ui/button"
|
|
2
|
+
|
|
3
|
+
import { buttonVariants } from "@/components/ui/button"
|
|
4
|
+
import { cn } from "@/utilities/ui"
|
|
5
|
+
import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react"
|
|
6
|
+
import type * as React from "react"
|
|
7
|
+
|
|
8
|
+
const Pagination = ({ className, ...props }: React.ComponentProps<"nav">) => (
|
|
9
|
+
<nav
|
|
10
|
+
aria-label="pagination"
|
|
11
|
+
className={cn("mx-auto flex w-full justify-center", className)}
|
|
12
|
+
role="navigation"
|
|
13
|
+
{...props}
|
|
14
|
+
/>
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
const PaginationContent: React.FC<
|
|
18
|
+
{ ref?: React.Ref<HTMLUListElement> } & React.HTMLAttributes<HTMLUListElement>
|
|
19
|
+
> = ({ className, ref, ...props }) => (
|
|
20
|
+
<ul className={cn("flex flex-row items-center gap-1", className)} ref={ref} {...props} />
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
const PaginationItem: React.FC<
|
|
24
|
+
{ ref?: React.Ref<HTMLLIElement> } & React.HTMLAttributes<HTMLLIElement>
|
|
25
|
+
> = ({ className, ref, ...props }) => <li className={cn("", className)} ref={ref} {...props} />
|
|
26
|
+
|
|
27
|
+
type PaginationLinkProps = {
|
|
28
|
+
isActive?: boolean
|
|
29
|
+
} & Pick<ButtonProps, "size"> &
|
|
30
|
+
React.ComponentProps<"button">
|
|
31
|
+
|
|
32
|
+
const PaginationLink = ({ className, isActive, size = "icon", ...props }: PaginationLinkProps) => (
|
|
33
|
+
<button
|
|
34
|
+
aria-current={isActive ? "page" : undefined}
|
|
35
|
+
className={cn(
|
|
36
|
+
buttonVariants({
|
|
37
|
+
size,
|
|
38
|
+
variant: isActive ? "outline" : "ghost",
|
|
39
|
+
}),
|
|
40
|
+
className,
|
|
41
|
+
)}
|
|
42
|
+
{...props}
|
|
43
|
+
/>
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
const PaginationPrevious = ({
|
|
47
|
+
className,
|
|
48
|
+
...props
|
|
49
|
+
}: React.ComponentProps<typeof PaginationLink>) => (
|
|
50
|
+
<PaginationLink
|
|
51
|
+
aria-label="Go to previous page"
|
|
52
|
+
className={cn("gap-1 pl-2.5", className)}
|
|
53
|
+
size="default"
|
|
54
|
+
{...props}
|
|
55
|
+
>
|
|
56
|
+
<ChevronLeft className="h-4 w-4" />
|
|
57
|
+
<span>Previous</span>
|
|
58
|
+
</PaginationLink>
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
const PaginationNext = ({ className, ...props }: React.ComponentProps<typeof PaginationLink>) => (
|
|
62
|
+
<PaginationLink
|
|
63
|
+
aria-label="Go to next page"
|
|
64
|
+
className={cn("gap-1 pr-2.5", className)}
|
|
65
|
+
size="default"
|
|
66
|
+
{...props}
|
|
67
|
+
>
|
|
68
|
+
<span>Next</span>
|
|
69
|
+
<ChevronRight className="h-4 w-4" />
|
|
70
|
+
</PaginationLink>
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
const PaginationEllipsis = ({ className, ...props }: React.ComponentProps<"span">) => (
|
|
74
|
+
<span
|
|
75
|
+
aria-hidden
|
|
76
|
+
className={cn("flex h-9 w-9 items-center justify-center", className)}
|
|
77
|
+
{...props}
|
|
78
|
+
>
|
|
79
|
+
<MoreHorizontal className="h-4 w-4" />
|
|
80
|
+
<span className="sr-only">More pages</span>
|
|
81
|
+
</span>
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
export {
|
|
85
|
+
Pagination,
|
|
86
|
+
PaginationContent,
|
|
87
|
+
PaginationEllipsis,
|
|
88
|
+
PaginationItem,
|
|
89
|
+
PaginationLink,
|
|
90
|
+
PaginationNext,
|
|
91
|
+
PaginationPrevious,
|
|
92
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { cn } from "@/utilities/ui"
|
|
4
|
+
import * as SelectPrimitive from "@radix-ui/react-select"
|
|
5
|
+
import { Check, ChevronDown, ChevronUp } from "lucide-react"
|
|
6
|
+
import type * as React from "react"
|
|
7
|
+
|
|
8
|
+
const Select = SelectPrimitive.Root
|
|
9
|
+
|
|
10
|
+
const SelectGroup = SelectPrimitive.Group
|
|
11
|
+
|
|
12
|
+
const SelectValue = SelectPrimitive.Value
|
|
13
|
+
|
|
14
|
+
const SelectTrigger: React.FC<
|
|
15
|
+
{ ref?: React.Ref<HTMLButtonElement> } & React.ComponentProps<typeof SelectPrimitive.Trigger>
|
|
16
|
+
> = ({ children, className, ref, ...props }) => (
|
|
17
|
+
<SelectPrimitive.Trigger
|
|
18
|
+
className={cn(
|
|
19
|
+
"flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
20
|
+
className,
|
|
21
|
+
)}
|
|
22
|
+
ref={ref}
|
|
23
|
+
{...props}
|
|
24
|
+
>
|
|
25
|
+
{children}
|
|
26
|
+
<SelectPrimitive.Icon asChild>
|
|
27
|
+
<ChevronDown className="h-4 w-4 opacity-50" />
|
|
28
|
+
</SelectPrimitive.Icon>
|
|
29
|
+
</SelectPrimitive.Trigger>
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
const SelectScrollUpButton: React.FC<
|
|
33
|
+
{ ref?: React.Ref<HTMLDivElement> } & React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>
|
|
34
|
+
> = ({ className, ref, ...props }) => (
|
|
35
|
+
<SelectPrimitive.ScrollUpButton
|
|
36
|
+
className={cn("flex cursor-default items-center justify-center py-1", className)}
|
|
37
|
+
ref={ref}
|
|
38
|
+
{...props}
|
|
39
|
+
>
|
|
40
|
+
<ChevronUp className="h-4 w-4" />
|
|
41
|
+
</SelectPrimitive.ScrollUpButton>
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
const SelectScrollDownButton: React.FC<
|
|
45
|
+
{ ref?: React.Ref<HTMLDivElement> } & React.ComponentProps<
|
|
46
|
+
typeof SelectPrimitive.ScrollDownButton
|
|
47
|
+
>
|
|
48
|
+
> = ({ className, ref, ...props }) => (
|
|
49
|
+
<SelectPrimitive.ScrollDownButton
|
|
50
|
+
className={cn("flex cursor-default items-center justify-center py-1", className)}
|
|
51
|
+
ref={ref}
|
|
52
|
+
{...props}
|
|
53
|
+
>
|
|
54
|
+
<ChevronDown className="h-4 w-4" />
|
|
55
|
+
</SelectPrimitive.ScrollDownButton>
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
const SelectContent: React.FC<
|
|
59
|
+
{
|
|
60
|
+
ref?: React.Ref<HTMLDivElement>
|
|
61
|
+
} & React.ComponentProps<typeof SelectPrimitive.Content>
|
|
62
|
+
> = ({ children, className, position = "popper", ref, ...props }) => (
|
|
63
|
+
<SelectPrimitive.Portal>
|
|
64
|
+
<SelectPrimitive.Content
|
|
65
|
+
className={cn(
|
|
66
|
+
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
67
|
+
position === "popper" &&
|
|
68
|
+
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
69
|
+
className,
|
|
70
|
+
)}
|
|
71
|
+
position={position}
|
|
72
|
+
ref={ref}
|
|
73
|
+
{...props}
|
|
74
|
+
>
|
|
75
|
+
<SelectScrollUpButton />
|
|
76
|
+
<SelectPrimitive.Viewport
|
|
77
|
+
className={cn(
|
|
78
|
+
"p-1",
|
|
79
|
+
position === "popper" &&
|
|
80
|
+
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]",
|
|
81
|
+
)}
|
|
82
|
+
>
|
|
83
|
+
{children}
|
|
84
|
+
</SelectPrimitive.Viewport>
|
|
85
|
+
<SelectScrollDownButton />
|
|
86
|
+
</SelectPrimitive.Content>
|
|
87
|
+
</SelectPrimitive.Portal>
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
const SelectLabel: React.FC<
|
|
91
|
+
{ ref?: React.Ref<HTMLDivElement> } & React.ComponentProps<typeof SelectPrimitive.Label>
|
|
92
|
+
> = ({ className, ref, ...props }) => (
|
|
93
|
+
<SelectPrimitive.Label
|
|
94
|
+
className={cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className)}
|
|
95
|
+
ref={ref}
|
|
96
|
+
{...props}
|
|
97
|
+
/>
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
const SelectItem: React.FC<
|
|
101
|
+
{ ref?: React.Ref<HTMLDivElement>; value: string } & React.ComponentProps<
|
|
102
|
+
typeof SelectPrimitive.Item
|
|
103
|
+
>
|
|
104
|
+
> = ({ children, className, ref, ...props }) => (
|
|
105
|
+
<SelectPrimitive.Item
|
|
106
|
+
className={cn(
|
|
107
|
+
"relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
108
|
+
className,
|
|
109
|
+
)}
|
|
110
|
+
ref={ref}
|
|
111
|
+
{...props}
|
|
112
|
+
>
|
|
113
|
+
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
114
|
+
<SelectPrimitive.ItemIndicator>
|
|
115
|
+
<Check className="h-4 w-4" />
|
|
116
|
+
</SelectPrimitive.ItemIndicator>
|
|
117
|
+
</span>
|
|
118
|
+
|
|
119
|
+
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
|
|
120
|
+
</SelectPrimitive.Item>
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
const SelectSeparator: React.FC<
|
|
124
|
+
{ ref?: React.Ref<HTMLDivElement> } & React.ComponentProps<typeof SelectPrimitive.Separator>
|
|
125
|
+
> = ({ className, ref, ...props }) => (
|
|
126
|
+
<SelectPrimitive.Separator
|
|
127
|
+
className={cn("-mx-1 my-1 h-px bg-muted", className)}
|
|
128
|
+
ref={ref}
|
|
129
|
+
{...props}
|
|
130
|
+
/>
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
export {
|
|
134
|
+
Select,
|
|
135
|
+
SelectContent,
|
|
136
|
+
SelectGroup,
|
|
137
|
+
SelectItem,
|
|
138
|
+
SelectLabel,
|
|
139
|
+
SelectScrollDownButton,
|
|
140
|
+
SelectScrollUpButton,
|
|
141
|
+
SelectSeparator,
|
|
142
|
+
SelectTrigger,
|
|
143
|
+
SelectValue,
|
|
144
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { cn } from "@/utilities/ui"
|
|
2
|
+
import type * as React from "react"
|
|
3
|
+
|
|
4
|
+
const Textarea: React.FC<
|
|
5
|
+
{
|
|
6
|
+
ref?: React.Ref<HTMLTextAreaElement>
|
|
7
|
+
} & React.TextareaHTMLAttributes<HTMLTextAreaElement>
|
|
8
|
+
> = ({ className, ref, ...props }) => {
|
|
9
|
+
return (
|
|
10
|
+
<textarea
|
|
11
|
+
className={cn(
|
|
12
|
+
"flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
13
|
+
className,
|
|
14
|
+
)}
|
|
15
|
+
ref={ref}
|
|
16
|
+
{...props}
|
|
17
|
+
/>
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { Textarea }
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import type { RequiredDataFromCollectionSlug } from "payload"
|
|
2
|
+
|
|
3
|
+
export const contactForm: RequiredDataFromCollectionSlug<"forms"> = {
|
|
4
|
+
confirmationMessage: {
|
|
5
|
+
root: {
|
|
6
|
+
type: "root",
|
|
7
|
+
children: [
|
|
8
|
+
{
|
|
9
|
+
type: "heading",
|
|
10
|
+
children: [
|
|
11
|
+
{
|
|
12
|
+
type: "text",
|
|
13
|
+
detail: 0,
|
|
14
|
+
format: 0,
|
|
15
|
+
mode: "normal",
|
|
16
|
+
style: "",
|
|
17
|
+
text: "The contact form has been submitted successfully.",
|
|
18
|
+
version: 1,
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
direction: "ltr",
|
|
22
|
+
format: "",
|
|
23
|
+
indent: 0,
|
|
24
|
+
tag: "h2",
|
|
25
|
+
version: 1,
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
direction: "ltr",
|
|
29
|
+
format: "",
|
|
30
|
+
indent: 0,
|
|
31
|
+
version: 1,
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
confirmationType: "message",
|
|
35
|
+
createdAt: "2023-01-12T21:47:41.374Z",
|
|
36
|
+
emails: [
|
|
37
|
+
{
|
|
38
|
+
emailFrom: '"Payload" \u003Cdemo@payloadcms.com\u003E',
|
|
39
|
+
emailTo: "{{email}}",
|
|
40
|
+
message: {
|
|
41
|
+
root: {
|
|
42
|
+
type: "root",
|
|
43
|
+
children: [
|
|
44
|
+
{
|
|
45
|
+
type: "paragraph",
|
|
46
|
+
children: [
|
|
47
|
+
{
|
|
48
|
+
type: "text",
|
|
49
|
+
detail: 0,
|
|
50
|
+
format: 0,
|
|
51
|
+
mode: "normal",
|
|
52
|
+
style: "",
|
|
53
|
+
text: "Your contact form submission was successfully received.",
|
|
54
|
+
version: 1,
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
direction: "ltr",
|
|
58
|
+
format: "",
|
|
59
|
+
indent: 0,
|
|
60
|
+
textFormat: 0,
|
|
61
|
+
version: 1,
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
direction: "ltr",
|
|
65
|
+
format: "",
|
|
66
|
+
indent: 0,
|
|
67
|
+
version: 1,
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
subject: "You've received a new message.",
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
fields: [
|
|
74
|
+
{
|
|
75
|
+
name: "full-name",
|
|
76
|
+
blockName: "full-name",
|
|
77
|
+
blockType: "text",
|
|
78
|
+
label: "Full Name",
|
|
79
|
+
required: true,
|
|
80
|
+
width: 100,
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: "email",
|
|
84
|
+
blockName: "email",
|
|
85
|
+
blockType: "email",
|
|
86
|
+
label: "Email",
|
|
87
|
+
required: true,
|
|
88
|
+
width: 100,
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: "phone",
|
|
92
|
+
blockName: "phone",
|
|
93
|
+
blockType: "number",
|
|
94
|
+
label: "Phone",
|
|
95
|
+
required: false,
|
|
96
|
+
width: 100,
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: "message",
|
|
100
|
+
blockName: "message",
|
|
101
|
+
blockType: "textarea",
|
|
102
|
+
label: "Message",
|
|
103
|
+
required: true,
|
|
104
|
+
width: 100,
|
|
105
|
+
},
|
|
106
|
+
],
|
|
107
|
+
redirect: undefined,
|
|
108
|
+
submitButtonLabel: "Submit",
|
|
109
|
+
title: "Contact Form",
|
|
110
|
+
updatedAt: "2023-01-12T21:47:41.374Z",
|
|
111
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { Form } from "@/payload-types"
|
|
2
|
+
import type { RequiredDataFromCollectionSlug } from "payload"
|
|
3
|
+
|
|
4
|
+
type ContactArgs = {
|
|
5
|
+
contactForm: Form
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const contact: (args: ContactArgs) => RequiredDataFromCollectionSlug<"pages"> = ({
|
|
9
|
+
contactForm,
|
|
10
|
+
}) => {
|
|
11
|
+
return {
|
|
12
|
+
slug: "contact",
|
|
13
|
+
_status: "published",
|
|
14
|
+
hero: {
|
|
15
|
+
type: "none",
|
|
16
|
+
},
|
|
17
|
+
layout: [
|
|
18
|
+
{
|
|
19
|
+
blockType: "formBlock",
|
|
20
|
+
enableIntro: true,
|
|
21
|
+
form: contactForm,
|
|
22
|
+
introContent: {
|
|
23
|
+
root: {
|
|
24
|
+
type: "root",
|
|
25
|
+
children: [
|
|
26
|
+
{
|
|
27
|
+
type: "heading",
|
|
28
|
+
children: [
|
|
29
|
+
{
|
|
30
|
+
type: "text",
|
|
31
|
+
detail: 0,
|
|
32
|
+
format: 0,
|
|
33
|
+
mode: "normal",
|
|
34
|
+
style: "",
|
|
35
|
+
text: "Example contact form:",
|
|
36
|
+
version: 1,
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
direction: "ltr",
|
|
40
|
+
format: "",
|
|
41
|
+
indent: 0,
|
|
42
|
+
tag: "h3",
|
|
43
|
+
version: 1,
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
direction: "ltr",
|
|
47
|
+
format: "",
|
|
48
|
+
indent: 0,
|
|
49
|
+
version: 1,
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
title: "Contact",
|
|
55
|
+
}
|
|
56
|
+
}
|