dune-react 0.0.8 → 0.0.10
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/dist/components/puck-base/article-card.js +1 -1
- package/dist/components/puck-base/button.js +2 -1
- package/dist/components/puck-base/container.d.ts +7 -1
- package/dist/components/puck-base/container.js +2 -1
- package/dist/components/puck-base/content.d.ts +1 -4
- package/dist/components/puck-base/content.js +15 -17
- package/dist/components/puck-base/core/fields.d.ts +1 -127
- package/dist/components/puck-base/core/fields.js +1 -76
- package/dist/components/puck-base/core/styles.d.ts +1877 -0
- package/dist/components/puck-base/core/styles.js +286 -0
- package/dist/components/puck-base/core/types.d.ts +2 -2
- package/dist/components/puck-base/core/with-editable.d.ts +4 -1
- package/dist/components/puck-base/core/with-editable.js +51 -27
- package/dist/components/puck-base/editor-context.d.ts +8 -0
- package/dist/components/puck-base/fields/auto-field.d.ts +1 -0
- package/dist/components/puck-base/fields/auto-field.js +131 -49
- package/dist/components/puck-base/gradient-text.js +12 -3
- package/dist/components/puck-block/banner-sections/announcement-banner-1/announcement-banner.d.ts +9 -7
- package/dist/components/puck-block/banner-sections/announcement-banner-1/announcement-banner.js +11 -8
- package/dist/components/puck-block/banner-sections/announcement-banner-1/index.js +19 -37
- package/dist/components/puck-block/banner-sections/marquee-1/index.js +26 -24
- package/dist/components/puck-block/banner-sections/marquee-1/marquee.d.ts +9 -9
- package/dist/components/puck-block/banner-sections/marquee-1/marquee.js +28 -21
- package/dist/components/puck-block/banner-sections/props.d.ts +22 -0
- package/dist/components/puck-block/contact-sections/api/form-leads.d.ts +16 -0
- package/dist/components/puck-block/contact-sections/api/form-leads.js +25 -0
- package/dist/components/puck-block/contact-sections/contact-us-1/contact-us.d.ts +13 -4
- package/dist/components/puck-block/contact-sections/contact-us-1/contact-us.js +122 -121
- package/dist/components/puck-block/contact-sections/contact-us-1/index.js +87 -7
- package/dist/components/puck-block/contact-sections/contact-us-2/contact-us-2.d.ts +30 -0
- package/dist/components/puck-block/contact-sections/contact-us-2/contact-us-2.js +234 -0
- package/dist/components/puck-block/contact-sections/contact-us-2/index.d.ts +5 -0
- package/dist/components/puck-block/contact-sections/contact-us-2/index.js +74 -0
- package/dist/components/puck-block/contact-sections/contact-us-3/contact-us-3.d.ts +32 -0
- package/dist/components/puck-block/contact-sections/contact-us-3/contact-us-3.js +250 -0
- package/dist/components/puck-block/contact-sections/contact-us-3/index.d.ts +5 -0
- package/dist/components/puck-block/contact-sections/contact-us-3/index.js +114 -0
- package/dist/components/puck-block/contact-sections/props.d.ts +65 -0
- package/dist/components/puck-block/cta-sections/banner-cta-1/banner-cta.d.ts +12 -9
- package/dist/components/puck-block/cta-sections/banner-cta-1/banner-cta.js +28 -30
- package/dist/components/puck-block/cta-sections/banner-cta-1/index.js +23 -25
- package/dist/components/puck-block/cta-sections/cta-1/cta.d.ts +6 -4
- package/dist/components/puck-block/cta-sections/cta-1/cta.js +5 -7
- package/dist/components/puck-block/cta-sections/cta-1/index.js +5 -9
- package/dist/components/puck-block/cta-sections/gradient-cta-1/gradient-cta.d.ts +10 -10
- package/dist/components/puck-block/cta-sections/gradient-cta-1/gradient-cta.js +24 -20
- package/dist/components/puck-block/cta-sections/gradient-cta-1/index.js +36 -29
- package/dist/components/puck-block/cta-sections/newsletter-signup-1/index.js +13 -5
- package/dist/components/puck-block/cta-sections/newsletter-signup-1/newsletter-signup.d.ts +7 -3
- package/dist/components/puck-block/cta-sections/newsletter-signup-1/newsletter-signup.js +36 -32
- package/dist/components/puck-block/cta-sections/promo-section-1/index.js +4 -5
- package/dist/components/puck-block/cta-sections/promo-section-1/promo-section.d.ts +6 -4
- package/dist/components/puck-block/cta-sections/promo-section-1/promo-section.js +94 -79
- package/dist/components/puck-block/cta-sections/props.d.ts +47 -0
- package/dist/components/puck-block/faq-sections/accordion-1/accordion.d.ts +6 -4
- package/dist/components/puck-block/faq-sections/accordion-1/accordion.js +39 -33
- package/dist/components/puck-block/faq-sections/accordion-1/index.js +3 -5
- package/dist/components/puck-block/faq-sections/faq-1/faq.d.ts +9 -7
- package/dist/components/puck-block/faq-sections/faq-1/faq.js +50 -44
- package/dist/components/puck-block/faq-sections/faq-1/index.js +12 -14
- package/dist/components/puck-block/faq-sections/faq-2/faq-2.d.ts +18 -0
- package/dist/components/puck-block/faq-sections/faq-2/faq-2.js +54 -0
- package/dist/components/puck-block/faq-sections/faq-2/index.d.ts +5 -0
- package/dist/components/puck-block/faq-sections/faq-2/index.js +61 -0
- package/dist/components/puck-block/faq-sections/props.d.ts +30 -0
- package/dist/components/puck-block/feature-sections/bento-1/bento.d.ts +6 -4
- package/dist/components/puck-block/feature-sections/bento-1/bento.js +2 -4
- package/dist/components/puck-block/feature-sections/bento-1/index.js +4 -5
- package/dist/components/puck-block/feature-sections/feature-cards-1/feature-cards.d.ts +8 -7
- package/dist/components/puck-block/feature-sections/feature-cards-1/feature-cards.js +15 -7
- package/dist/components/puck-block/feature-sections/feature-cards-1/index.js +37 -18
- package/dist/components/puck-block/feature-sections/feature-showcase-1/feature-showcase.d.ts +6 -4
- package/dist/components/puck-block/feature-sections/feature-showcase-1/feature-showcase.js +4 -12
- package/dist/components/puck-block/feature-sections/feature-showcase-1/index.js +4 -5
- package/dist/components/puck-block/feature-sections/icon-grid-1/icon-grid.d.ts +6 -4
- package/dist/components/puck-block/feature-sections/icon-grid-1/icon-grid.js +59 -53
- package/dist/components/puck-block/feature-sections/icon-grid-1/index.js +7 -8
- package/dist/components/puck-block/feature-sections/product-features-1/index.js +4 -5
- package/dist/components/puck-block/feature-sections/product-features-1/product-features.d.ts +6 -4
- package/dist/components/puck-block/feature-sections/product-features-1/product-features.js +7 -29
- package/dist/components/puck-block/feature-sections/props.d.ts +48 -0
- package/dist/components/puck-block/footer-sections/footer-1/footer.d.ts +5 -3
- package/dist/components/puck-block/footer-sections/footer-1/footer.js +6 -6
- package/dist/components/puck-block/footer-sections/footer-1/index.js +3 -5
- package/dist/components/puck-block/footer-sections/props.d.ts +31 -0
- package/dist/components/puck-block/gallery-sections/gallery-1/gallery.d.ts +9 -7
- package/dist/components/puck-block/gallery-sections/gallery-1/gallery.js +49 -40
- package/dist/components/puck-block/gallery-sections/gallery-1/index.js +32 -34
- package/dist/components/puck-block/gallery-sections/gallery-2/gallery-2.d.ts +16 -0
- package/dist/components/puck-block/gallery-sections/gallery-2/gallery-2.js +86 -0
- package/dist/components/puck-block/gallery-sections/gallery-2/index.d.ts +5 -0
- package/dist/components/puck-block/gallery-sections/gallery-2/index.js +42 -0
- package/dist/components/puck-block/gallery-sections/gallery-3/gallery-3.d.ts +19 -0
- package/dist/components/puck-block/gallery-sections/gallery-3/gallery-3.js +119 -0
- package/dist/components/puck-block/gallery-sections/gallery-3/index.d.ts +5 -0
- package/dist/components/puck-block/gallery-sections/gallery-3/index.js +59 -0
- package/dist/components/puck-block/gallery-sections/props.d.ts +26 -0
- package/dist/components/puck-block/header-sections/header-1/header.d.ts +7 -5
- package/dist/components/puck-block/header-sections/header-1/header.js +8 -9
- package/dist/components/puck-block/header-sections/header-1/index.d.ts +1 -1
- package/dist/components/puck-block/header-sections/header-1/index.js +13 -12
- package/dist/components/puck-block/header-sections/props.d.ts +41 -0
- package/dist/components/puck-block/header-sections/sticky-nav-1/index.js +12 -12
- package/dist/components/puck-block/header-sections/sticky-nav-1/sticky-nav.d.ts +8 -6
- package/dist/components/puck-block/header-sections/sticky-nav-1/sticky-nav.js +5 -5
- package/dist/components/puck-block/hero-sections/fullscreen-hero-1/fullscreen-hero.d.ts +11 -4
- package/dist/components/puck-block/hero-sections/fullscreen-hero-1/fullscreen-hero.js +60 -23
- package/dist/components/puck-block/hero-sections/fullscreen-hero-1/index.js +18 -6
- package/dist/components/puck-block/hero-sections/gradient-hero-1/gradient-hero.d.ts +9 -5
- package/dist/components/puck-block/hero-sections/gradient-hero-1/gradient-hero.js +37 -24
- package/dist/components/puck-block/hero-sections/gradient-hero-1/index.js +18 -15
- package/dist/components/puck-block/hero-sections/grid-hero-1/grid-hero.d.ts +7 -6
- package/dist/components/puck-block/hero-sections/grid-hero-1/grid-hero.js +7 -10
- package/dist/components/puck-block/hero-sections/grid-hero-1/index.js +43 -11
- package/dist/components/puck-block/hero-sections/hero-1/hero.d.ts +6 -4
- package/dist/components/puck-block/hero-sections/hero-1/hero.js +5 -7
- package/dist/components/puck-block/hero-sections/hero-1/index.js +4 -4
- package/dist/components/puck-block/hero-sections/image-hero-1/image-hero.d.ts +14 -8
- package/dist/components/puck-block/hero-sections/image-hero-1/image-hero.js +64 -60
- package/dist/components/puck-block/hero-sections/image-hero-1/index.js +16 -34
- package/dist/components/puck-block/hero-sections/props.d.ts +71 -0
- package/dist/components/puck-block/hero-sections/split-hero-1/index.js +6 -5
- package/dist/components/puck-block/hero-sections/split-hero-1/split-hero.d.ts +8 -8
- package/dist/components/puck-block/hero-sections/split-hero-1/split-hero.js +48 -47
- package/dist/components/puck-block/hero-sections/video-hero-1/index.js +4 -3
- package/dist/components/puck-block/hero-sections/video-hero-1/video-hero.d.ts +6 -2
- package/dist/components/puck-block/hero-sections/video-hero-1/video-hero.js +30 -22
- package/dist/components/puck-block/index.d.ts +15 -0
- package/dist/components/puck-block/location-sections/location-1/index.d.ts +5 -0
- package/dist/components/puck-block/location-sections/location-1/index.js +108 -0
- package/dist/components/puck-block/location-sections/location-1/location.d.ts +28 -0
- package/dist/components/puck-block/location-sections/location-1/location.js +137 -0
- package/dist/components/puck-block/location-sections/location-2/index.d.ts +5 -0
- package/dist/components/puck-block/location-sections/location-2/index.js +123 -0
- package/dist/components/puck-block/location-sections/location-2/location.d.ts +30 -0
- package/dist/components/puck-block/location-sections/location-2/location.js +131 -0
- package/dist/components/puck-block/location-sections/location-3/index.d.ts +5 -0
- package/dist/components/puck-block/location-sections/location-3/index.js +84 -0
- package/dist/components/puck-block/location-sections/location-3/location.d.ts +24 -0
- package/dist/components/puck-block/location-sections/location-3/location.js +127 -0
- package/dist/components/puck-block/location-sections/props.d.ts +45 -0
- package/dist/components/puck-block/metrics-sections/props.d.ts +43 -0
- package/dist/components/puck-block/metrics-sections/stats-1/index.js +6 -7
- package/dist/components/puck-block/metrics-sections/stats-1/stats.d.ts +7 -5
- package/dist/components/puck-block/metrics-sections/stats-1/stats.js +61 -55
- package/dist/components/puck-block/metrics-sections/stats-2/index.d.ts +5 -0
- package/dist/components/puck-block/metrics-sections/stats-2/index.js +76 -0
- package/dist/components/puck-block/metrics-sections/stats-2/stats-2.d.ts +18 -0
- package/dist/components/puck-block/metrics-sections/stats-2/stats-2.js +57 -0
- package/dist/components/puck-block/metrics-sections/stats-3/index.d.ts +5 -0
- package/dist/components/puck-block/metrics-sections/stats-3/index.js +86 -0
- package/dist/components/puck-block/metrics-sections/stats-3/stats-3.d.ts +18 -0
- package/dist/components/puck-block/metrics-sections/stats-3/stats-3.js +56 -0
- package/dist/components/puck-block/pricing-sections/comparison-1/comparison.d.ts +7 -5
- package/dist/components/puck-block/pricing-sections/comparison-1/comparison.js +45 -39
- package/dist/components/puck-block/pricing-sections/comparison-1/index.js +5 -7
- package/dist/components/puck-block/pricing-sections/pricing-1/index.js +10 -11
- package/dist/components/puck-block/pricing-sections/pricing-1/pricing.d.ts +8 -6
- package/dist/components/puck-block/pricing-sections/pricing-1/pricing.js +47 -35
- package/dist/components/puck-block/pricing-sections/pricing-2/index.d.ts +5 -0
- package/dist/components/puck-block/pricing-sections/pricing-2/index.js +151 -0
- package/dist/components/puck-block/pricing-sections/pricing-2/pricing-2.d.ts +26 -0
- package/dist/components/puck-block/pricing-sections/pricing-2/pricing-2.js +71 -0
- package/dist/components/puck-block/pricing-sections/props.d.ts +46 -0
- package/dist/components/puck-block/showcase-sections/before-after-1/before-after.d.ts +22 -0
- package/dist/components/puck-block/showcase-sections/before-after-1/before-after.js +71 -0
- package/dist/components/puck-block/showcase-sections/before-after-1/index.d.ts +5 -0
- package/dist/components/puck-block/showcase-sections/before-after-1/index.js +73 -0
- package/dist/components/puck-block/showcase-sections/case-study-1/case-study.d.ts +6 -2
- package/dist/components/puck-block/showcase-sections/case-study-1/case-study.js +30 -28
- package/dist/components/puck-block/showcase-sections/case-study-1/index.js +4 -3
- package/dist/components/puck-block/showcase-sections/props.d.ts +48 -0
- package/dist/components/puck-block/showcase-sections/step-by-step-1/index.js +3 -5
- package/dist/components/puck-block/showcase-sections/step-by-step-1/step-by-step.d.ts +6 -4
- package/dist/components/puck-block/showcase-sections/step-by-step-1/step-by-step.js +38 -41
- package/dist/components/puck-block/team-sections/props.d.ts +39 -0
- package/dist/components/puck-block/team-sections/team-grid-1/index.js +4 -5
- package/dist/components/puck-block/team-sections/team-grid-1/team-grid.d.ts +6 -4
- package/dist/components/puck-block/team-sections/team-grid-1/team-grid.js +27 -41
- package/dist/components/puck-block/team-sections/team-grid-2/index.d.ts +5 -0
- package/dist/components/puck-block/team-sections/team-grid-2/index.js +62 -0
- package/dist/components/puck-block/team-sections/team-grid-2/team-grid-2.d.ts +23 -0
- package/dist/components/puck-block/team-sections/team-grid-2/team-grid-2.js +44 -0
- package/dist/components/puck-block/team-sections/team-profiles-1/index.d.ts +5 -0
- package/dist/components/puck-block/team-sections/team-profiles-1/index.js +53 -0
- package/dist/components/puck-block/team-sections/team-profiles-1/team-profiles.d.ts +23 -0
- package/dist/components/puck-block/team-sections/team-profiles-1/team-profiles.js +105 -0
- package/dist/components/puck-block/testimonial-sections/customers-1/customers.d.ts +9 -7
- package/dist/components/puck-block/testimonial-sections/customers-1/customers.js +8 -11
- package/dist/components/puck-block/testimonial-sections/customers-1/index.js +17 -17
- package/dist/components/puck-block/testimonial-sections/logo-marquee-1/index.js +15 -12
- package/dist/components/puck-block/testimonial-sections/logo-marquee-1/logo-marquee.d.ts +7 -3
- package/dist/components/puck-block/testimonial-sections/logo-marquee-1/logo-marquee.js +34 -24
- package/dist/components/puck-block/testimonial-sections/logo-wall-1/index.d.ts +5 -0
- package/dist/components/puck-block/testimonial-sections/logo-wall-1/index.js +51 -0
- package/dist/components/puck-block/testimonial-sections/logo-wall-1/logo-wall.d.ts +17 -0
- package/dist/components/puck-block/testimonial-sections/logo-wall-1/logo-wall.js +55 -0
- package/dist/components/puck-block/testimonial-sections/props.d.ts +34 -0
- package/dist/components/puck-block/testimonial-sections/review-section-1/index.js +16 -15
- package/dist/components/puck-block/testimonial-sections/review-section-1/review-section.d.ts +8 -6
- package/dist/components/puck-block/testimonial-sections/review-section-1/review-section.js +25 -19
- package/dist/components/puck-block/testimonial-sections/testimonials-1/index.js +17 -17
- package/dist/components/puck-block/testimonial-sections/testimonials-1/testimonials.d.ts +8 -6
- package/dist/components/puck-block/testimonial-sections/testimonials-1/testimonials.js +76 -63
- package/dist/components/puck-block/text-sections/articles-1/articles.d.ts +7 -4
- package/dist/components/puck-block/text-sections/articles-1/articles.js +42 -22
- package/dist/components/puck-block/text-sections/articles-1/index.js +31 -19
- package/dist/components/puck-block/text-sections/content-section-1/content-section.d.ts +7 -5
- package/dist/components/puck-block/text-sections/content-section-1/content-section.js +11 -12
- package/dist/components/puck-block/text-sections/content-section-1/index.js +14 -14
- package/dist/components/puck-block/text-sections/props.d.ts +58 -0
- package/dist/components/puck-block/text-sections/rich-text-1/index.js +13 -15
- package/dist/components/puck-block/text-sections/rich-text-1/rich-text.d.ts +7 -5
- package/dist/components/puck-block/text-sections/rich-text-1/rich-text.js +11 -11
- package/dist/components/puck-block/text-sections/tab-section-1/index.js +4 -5
- package/dist/components/puck-block/text-sections/tab-section-1/tab-section.d.ts +6 -4
- package/dist/components/puck-block/text-sections/tab-section-1/tab-section.js +6 -7
- package/dist/components/puck-block/text-sections/timeline-1/index.js +3 -5
- package/dist/components/puck-block/text-sections/timeline-1/timeline.d.ts +6 -4
- package/dist/components/puck-block/text-sections/timeline-1/timeline.js +3 -5
- package/dist/components/puck-block/text-sections/two-column-1/index.js +4 -6
- package/dist/components/puck-block/text-sections/two-column-1/two-column.d.ts +6 -4
- package/dist/components/puck-block/text-sections/two-column-1/two-column.js +5 -7
- package/dist/components/shadcn/navigation-menu.d.ts +1 -1
- package/dist/components/shadcn/navigation-menu.js +33 -0
- package/dist/index.js +106 -75
- package/package.json +1 -1
|
@@ -2,100 +2,115 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { CompoundContainer } from "../../../puck-base/container.js";
|
|
3
3
|
import { CompoundBadge } from "../../../puck-base/badge.js";
|
|
4
4
|
import { CompoundButton } from "../../../puck-base/button.js";
|
|
5
|
+
import { CompoundImage } from "../../../puck-base/image.js";
|
|
5
6
|
import { cn } from "../../../../utils/css-utils.js";
|
|
6
7
|
const PromoSection = ({
|
|
7
|
-
padding,
|
|
8
|
-
sectionStyle,
|
|
9
|
-
backgroundColor,
|
|
10
8
|
heading,
|
|
11
9
|
description,
|
|
12
10
|
image,
|
|
13
11
|
imagePosition = "right",
|
|
14
12
|
buttons,
|
|
15
|
-
badge
|
|
13
|
+
badge,
|
|
14
|
+
styles
|
|
16
15
|
}) => {
|
|
17
16
|
if (imagePosition === "background") {
|
|
18
|
-
return /* @__PURE__ */ jsx(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
/* @__PURE__ */ jsx("div", { className: "bg-foreground/50 absolute inset-0" }),
|
|
28
|
-
/* @__PURE__ */ jsxs("div", { className: "relative z-10 flex max-w-xl flex-col gap-6 p-8 md:p-16", children: [
|
|
29
|
-
badge && /* @__PURE__ */ jsx(
|
|
30
|
-
CompoundBadge,
|
|
31
|
-
{
|
|
32
|
-
label: badge.label,
|
|
33
|
-
variant: badge.variant,
|
|
34
|
-
url: badge.url
|
|
35
|
-
}
|
|
36
|
-
),
|
|
37
|
-
/* @__PURE__ */ jsx("h2", { className: "text-background text-3xl font-bold tracking-tight md:text-5xl", children: heading }),
|
|
38
|
-
description && /* @__PURE__ */ jsx("p", { className: "text-background/80 text-lg", children: description }),
|
|
39
|
-
Array.isArray(buttons) && buttons.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-4", children: buttons.map(
|
|
40
|
-
(button, index) => button.label ? /* @__PURE__ */ jsx(
|
|
41
|
-
CompoundButton,
|
|
17
|
+
return /* @__PURE__ */ jsx(
|
|
18
|
+
CompoundContainer,
|
|
19
|
+
{
|
|
20
|
+
padding: styles == null ? void 0 : styles.padding,
|
|
21
|
+
sectionStyle: styles == null ? void 0 : styles.sectionStyle,
|
|
22
|
+
backgroundColor: styles == null ? void 0 : styles.backgroundColor,
|
|
23
|
+
children: /* @__PURE__ */ jsxs("div", { className: "relative flex min-h-[400px] items-center overflow-hidden rounded-2xl [&>span]:h-full [&>span]:w-full", children: [
|
|
24
|
+
(image == null ? void 0 : image.src) && /* @__PURE__ */ jsx(
|
|
25
|
+
CompoundImage,
|
|
42
26
|
{
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
27
|
+
src: image.src,
|
|
28
|
+
alt: image.alt ?? "",
|
|
29
|
+
className: "h-full w-full object-cover"
|
|
30
|
+
}
|
|
31
|
+
),
|
|
32
|
+
/* @__PURE__ */ jsx("div", { className: "bg-foreground/50 absolute inset-0" }),
|
|
33
|
+
/* @__PURE__ */ jsxs("div", { className: "relative z-10 flex max-w-xl flex-col gap-6 p-8 md:p-16", children: [
|
|
34
|
+
badge && /* @__PURE__ */ jsx(
|
|
35
|
+
CompoundBadge,
|
|
36
|
+
{
|
|
37
|
+
label: badge.label,
|
|
38
|
+
variant: badge.variant,
|
|
39
|
+
url: badge.url
|
|
40
|
+
}
|
|
41
|
+
),
|
|
42
|
+
/* @__PURE__ */ jsx("h2", { className: "text-background text-3xl font-bold tracking-tight md:text-5xl", children: heading }),
|
|
43
|
+
description && /* @__PURE__ */ jsx("p", { className: "text-background/80 text-lg", children: description }),
|
|
44
|
+
Array.isArray(buttons) && buttons.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-4", children: buttons.map(
|
|
45
|
+
(button, index) => button.label ? /* @__PURE__ */ jsx(
|
|
46
|
+
CompoundButton,
|
|
47
|
+
{
|
|
48
|
+
label: button.label,
|
|
49
|
+
url: button.url,
|
|
50
|
+
variant: button.variant,
|
|
51
|
+
size: button.size,
|
|
52
|
+
icon: button.icon
|
|
53
|
+
},
|
|
54
|
+
index
|
|
55
|
+
) : null
|
|
56
|
+
) })
|
|
57
|
+
] })
|
|
58
|
+
] })
|
|
59
|
+
}
|
|
60
|
+
);
|
|
54
61
|
}
|
|
55
|
-
return /* @__PURE__ */ jsx(
|
|
56
|
-
|
|
62
|
+
return /* @__PURE__ */ jsx(
|
|
63
|
+
CompoundContainer,
|
|
57
64
|
{
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
label: badge.label,
|
|
68
|
-
variant: badge.variant,
|
|
69
|
-
url: badge.url
|
|
70
|
-
}
|
|
65
|
+
padding: styles == null ? void 0 : styles.padding,
|
|
66
|
+
sectionStyle: styles == null ? void 0 : styles.sectionStyle,
|
|
67
|
+
backgroundColor: styles == null ? void 0 : styles.backgroundColor,
|
|
68
|
+
children: /* @__PURE__ */ jsxs(
|
|
69
|
+
"div",
|
|
70
|
+
{
|
|
71
|
+
className: cn(
|
|
72
|
+
"grid grid-cols-1 items-center gap-10 lg:grid-cols-2",
|
|
73
|
+
imagePosition === "left" && "lg:[&>*:first-child]:order-2"
|
|
71
74
|
),
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
children: [
|
|
76
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-6", children: [
|
|
77
|
+
badge && /* @__PURE__ */ jsx(
|
|
78
|
+
CompoundBadge,
|
|
79
|
+
{
|
|
80
|
+
label: badge.label,
|
|
81
|
+
variant: badge.variant,
|
|
82
|
+
url: badge.url
|
|
83
|
+
}
|
|
84
|
+
),
|
|
85
|
+
/* @__PURE__ */ jsx("h2", { className: "text-3xl font-bold tracking-tight md:text-5xl", children: heading }),
|
|
86
|
+
description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-lg", children: description }),
|
|
87
|
+
Array.isArray(buttons) && buttons.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-4", children: buttons.map(
|
|
88
|
+
(button, index) => button.label ? /* @__PURE__ */ jsx(
|
|
89
|
+
CompoundButton,
|
|
90
|
+
{
|
|
91
|
+
label: button.label,
|
|
92
|
+
url: button.url,
|
|
93
|
+
variant: button.variant,
|
|
94
|
+
size: button.size,
|
|
95
|
+
icon: button.icon
|
|
96
|
+
},
|
|
97
|
+
index
|
|
98
|
+
) : null
|
|
99
|
+
) })
|
|
100
|
+
] }),
|
|
101
|
+
/* @__PURE__ */ jsx("div", { className: "bg-muted aspect-[4/3] overflow-hidden rounded-xl [&>span]:h-full [&>span]:w-full", children: (image == null ? void 0 : image.src) && /* @__PURE__ */ jsx(
|
|
102
|
+
CompoundImage,
|
|
77
103
|
{
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
) })
|
|
87
|
-
] }),
|
|
88
|
-
/* @__PURE__ */ jsx("div", { className: "bg-muted aspect-[4/3] overflow-hidden rounded-xl", children: (image == null ? void 0 : image.src) && /* @__PURE__ */ jsx(
|
|
89
|
-
"img",
|
|
90
|
-
{
|
|
91
|
-
src: image.src,
|
|
92
|
-
alt: image.alt ?? "",
|
|
93
|
-
className: "h-full w-full object-cover"
|
|
94
|
-
}
|
|
95
|
-
) })
|
|
96
|
-
]
|
|
104
|
+
src: image.src,
|
|
105
|
+
alt: image.alt ?? "",
|
|
106
|
+
className: "h-full w-full object-cover"
|
|
107
|
+
}
|
|
108
|
+
) })
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
)
|
|
97
112
|
}
|
|
98
|
-
)
|
|
113
|
+
);
|
|
99
114
|
};
|
|
100
115
|
export {
|
|
101
116
|
PromoSection
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
type CtaVariant = "banner-cta-1" | "cta-1" | "gradient-cta-1" | "newsletter-signup-1" | "promo-section-1";
|
|
2
|
+
type CtaPadding = {
|
|
3
|
+
top?: "none" | "small" | "medium" | "large";
|
|
4
|
+
bottom?: "none" | "small" | "medium" | "large";
|
|
5
|
+
};
|
|
6
|
+
type CtaSectionStyle = "default" | "dark" | "muted" | "inverted" | "custom";
|
|
7
|
+
type CtaBadge = {
|
|
8
|
+
label: string;
|
|
9
|
+
url?: string;
|
|
10
|
+
variant?: "default" | "secondary" | "destructive" | "outline";
|
|
11
|
+
};
|
|
12
|
+
type CtaButton = {
|
|
13
|
+
label: string;
|
|
14
|
+
url?: string;
|
|
15
|
+
variant?: "default" | "secondary" | "outline" | "ghost" | "link" | "destructive";
|
|
16
|
+
size?: "default" | "sm" | "lg" | "icon";
|
|
17
|
+
icon?: string;
|
|
18
|
+
};
|
|
19
|
+
type CtaImage = {
|
|
20
|
+
src: string;
|
|
21
|
+
alt?: string;
|
|
22
|
+
};
|
|
23
|
+
type CtaSectionProps = {
|
|
24
|
+
variant?: CtaVariant;
|
|
25
|
+
badge?: CtaBadge;
|
|
26
|
+
heading?: string;
|
|
27
|
+
description?: string;
|
|
28
|
+
buttons?: CtaButton[];
|
|
29
|
+
alignContent?: "start" | "center" | "end";
|
|
30
|
+
spacing?: "tight" | "normal" | "relaxed";
|
|
31
|
+
layout?: "contained" | "full-bleed";
|
|
32
|
+
displayText?: string;
|
|
33
|
+
placeholder?: string;
|
|
34
|
+
image?: CtaImage;
|
|
35
|
+
imagePosition?: "left" | "right" | "background";
|
|
36
|
+
styles?: {
|
|
37
|
+
padding?: CtaPadding;
|
|
38
|
+
sectionStyle?: CtaSectionStyle;
|
|
39
|
+
backgroundColor?: string;
|
|
40
|
+
className?: string;
|
|
41
|
+
gradientFrom?: string;
|
|
42
|
+
gradientTo?: string;
|
|
43
|
+
backgroundCSS?: string;
|
|
44
|
+
textColor?: string;
|
|
45
|
+
visualVariant?: "primary" | "dark" | "gradient";
|
|
46
|
+
};
|
|
47
|
+
};
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { CompoundContainerProps } from "@/components/puck-base/container";
|
|
2
2
|
export interface AccordionProps {
|
|
3
|
-
padding?: CompoundContainerProps["padding"];
|
|
4
|
-
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
5
|
-
backgroundColor?: string;
|
|
6
3
|
heading?: string;
|
|
7
4
|
description?: string;
|
|
8
5
|
items?: Array<{
|
|
9
6
|
title: string;
|
|
10
7
|
content: string;
|
|
11
8
|
}>;
|
|
9
|
+
styles?: {
|
|
10
|
+
padding?: CompoundContainerProps["padding"];
|
|
11
|
+
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
12
|
+
backgroundColor?: string;
|
|
13
|
+
};
|
|
12
14
|
}
|
|
13
|
-
export declare const Accordion: ({
|
|
15
|
+
export declare const Accordion: ({ heading, description, items, styles, }: AccordionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,43 +4,49 @@ import { useState } from "react";
|
|
|
4
4
|
import { cn } from "../../../../utils/css-utils.js";
|
|
5
5
|
import { CompoundContainer } from "../../../puck-base/container.js";
|
|
6
6
|
const Accordion = ({
|
|
7
|
-
padding,
|
|
8
|
-
sectionStyle,
|
|
9
|
-
backgroundColor,
|
|
10
7
|
heading,
|
|
11
8
|
description,
|
|
12
|
-
items = []
|
|
9
|
+
items = [],
|
|
10
|
+
styles
|
|
13
11
|
}) => {
|
|
14
12
|
const [openIndex, setOpenIndex] = useState(null);
|
|
15
|
-
return /* @__PURE__ */ jsxs(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
13
|
+
return /* @__PURE__ */ jsxs(
|
|
14
|
+
CompoundContainer,
|
|
15
|
+
{
|
|
16
|
+
padding: styles == null ? void 0 : styles.padding,
|
|
17
|
+
sectionStyle: styles == null ? void 0 : styles.sectionStyle,
|
|
18
|
+
backgroundColor: styles == null ? void 0 : styles.backgroundColor,
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-12 max-w-2xl", children: [
|
|
21
|
+
heading && /* @__PURE__ */ jsx("h2", { className: "text-foreground text-3xl font-bold tracking-tight md:text-4xl", children: heading }),
|
|
22
|
+
description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mt-4 text-lg", children: description })
|
|
23
|
+
] }),
|
|
24
|
+
/* @__PURE__ */ jsx("div", { className: "divide-border max-w-3xl divide-y", children: items.map((item, i) => /* @__PURE__ */ jsxs("div", { children: [
|
|
25
|
+
/* @__PURE__ */ jsxs(
|
|
26
|
+
"button",
|
|
27
|
+
{
|
|
28
|
+
onClick: () => setOpenIndex(openIndex === i ? null : i),
|
|
29
|
+
className: "flex w-full items-center justify-between py-4 text-left",
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ jsx("span", { className: "text-foreground font-medium", children: item.title }),
|
|
32
|
+
/* @__PURE__ */ jsx(
|
|
33
|
+
"span",
|
|
34
|
+
{
|
|
35
|
+
className: cn(
|
|
36
|
+
"text-muted-foreground transition-transform",
|
|
37
|
+
openIndex === i && "rotate-45"
|
|
38
|
+
),
|
|
39
|
+
children: "+"
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
),
|
|
45
|
+
openIndex === i && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground pb-4 leading-relaxed", children: item.content })
|
|
46
|
+
] }, i)) })
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
);
|
|
44
50
|
};
|
|
45
51
|
export {
|
|
46
52
|
Accordion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { paddingDefaults, backgroundColor, sectionStyle, padding } from "../../../puck-base/core/fields.js";
|
|
2
1
|
import { Accordion } from "./accordion.js";
|
|
2
|
+
import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
|
|
3
3
|
const conf = {
|
|
4
4
|
fields: {
|
|
5
5
|
heading: { type: "text", contentEditable: true },
|
|
@@ -11,9 +11,7 @@ const conf = {
|
|
|
11
11
|
arrayFields: { title: { type: "text" }, content: { type: "textarea" } },
|
|
12
12
|
defaultItemProps: { title: "Question?", content: "Answer here." }
|
|
13
13
|
},
|
|
14
|
-
|
|
15
|
-
sectionStyle,
|
|
16
|
-
backgroundColor
|
|
14
|
+
styles: createStylesField()
|
|
17
15
|
},
|
|
18
16
|
defaultProps: {
|
|
19
17
|
heading: "Frequently Asked Questions",
|
|
@@ -32,7 +30,7 @@ const conf = {
|
|
|
32
30
|
content: "Yes, you can cancel your subscription at any time."
|
|
33
31
|
}
|
|
34
32
|
],
|
|
35
|
-
|
|
33
|
+
styles: createStylesDefaults()
|
|
36
34
|
},
|
|
37
35
|
render: Accordion
|
|
38
36
|
};
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { CompoundContainerProps } from "@/components/puck-base/container";
|
|
2
2
|
import { CompoundContentProps } from "@/components/puck-base/content";
|
|
3
3
|
export interface FaqProps extends CompoundContentProps {
|
|
4
|
-
padding?: CompoundContainerProps["padding"];
|
|
5
|
-
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
6
|
-
backgroundColor?: string;
|
|
7
4
|
layout?: "single-col" | "two-col";
|
|
8
|
-
|
|
9
|
-
collapsible?:
|
|
10
|
-
|
|
5
|
+
expandMode?: "single" | "multiple";
|
|
6
|
+
collapsible?: boolean;
|
|
7
|
+
items: {
|
|
11
8
|
question: string;
|
|
12
9
|
answer: string;
|
|
13
10
|
}[];
|
|
11
|
+
styles?: {
|
|
12
|
+
padding?: CompoundContainerProps["padding"];
|
|
13
|
+
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
14
|
+
backgroundColor?: string;
|
|
15
|
+
};
|
|
14
16
|
}
|
|
15
|
-
export declare const Faq: ({
|
|
17
|
+
export declare const Faq: ({ layout, badge, heading, description, buttons, expandMode, collapsible, items, styles, }: FaqProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,58 +5,64 @@ import { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from "..
|
|
|
5
5
|
import { CompoundContainer } from "../../../puck-base/container.js";
|
|
6
6
|
import { CompoundContent } from "../../../puck-base/content.js";
|
|
7
7
|
const Faq = ({
|
|
8
|
-
padding,
|
|
9
|
-
sectionStyle,
|
|
10
|
-
backgroundColor,
|
|
11
8
|
layout = "two-col",
|
|
12
9
|
badge,
|
|
13
10
|
heading,
|
|
14
11
|
description,
|
|
15
12
|
buttons,
|
|
16
|
-
|
|
17
|
-
collapsible =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
expandMode = "single",
|
|
14
|
+
collapsible = true,
|
|
15
|
+
items,
|
|
16
|
+
styles
|
|
17
|
+
}) => /* @__PURE__ */ jsx(
|
|
18
|
+
CompoundContainer,
|
|
21
19
|
{
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
),
|
|
37
|
-
/* @__PURE__ */ jsx(
|
|
38
|
-
Accordion,
|
|
39
|
-
{
|
|
40
|
-
type,
|
|
41
|
-
collapsible: collapsible === "true",
|
|
42
|
-
className: "w-full",
|
|
43
|
-
children: faqs.map((faq, index) => /* @__PURE__ */ jsxs(
|
|
44
|
-
AccordionItem,
|
|
20
|
+
padding: styles == null ? void 0 : styles.padding,
|
|
21
|
+
sectionStyle: styles == null ? void 0 : styles.sectionStyle,
|
|
22
|
+
backgroundColor: styles == null ? void 0 : styles.backgroundColor,
|
|
23
|
+
children: /* @__PURE__ */ jsxs(
|
|
24
|
+
"div",
|
|
25
|
+
{
|
|
26
|
+
className: cn("grid gap-10", {
|
|
27
|
+
"items-center lg:grid-cols-1": layout === "single-col",
|
|
28
|
+
"lg:grid-cols-2": layout === "two-col"
|
|
29
|
+
}),
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ jsx(
|
|
32
|
+
CompoundContent,
|
|
45
33
|
{
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
34
|
+
badge,
|
|
35
|
+
heading,
|
|
36
|
+
description,
|
|
37
|
+
buttons,
|
|
38
|
+
alignContent: layout === "single-col" ? "center" : "start"
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
/* @__PURE__ */ jsx(
|
|
42
|
+
Accordion,
|
|
43
|
+
{
|
|
44
|
+
type: expandMode,
|
|
45
|
+
collapsible,
|
|
46
|
+
className: "w-full",
|
|
47
|
+
children: items.map((faq, index) => /* @__PURE__ */ jsxs(
|
|
48
|
+
AccordionItem,
|
|
49
|
+
{
|
|
50
|
+
value: "index-" + index,
|
|
51
|
+
ref: registerOverlayPortal,
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ jsx(AccordionTrigger, { children: faq.question }),
|
|
54
|
+
/* @__PURE__ */ jsx(AccordionContent, { children: faq.answer })
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
index
|
|
58
|
+
))
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
)
|
|
58
64
|
}
|
|
59
|
-
)
|
|
65
|
+
);
|
|
60
66
|
export {
|
|
61
67
|
Faq
|
|
62
68
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { contentFields } from "../../../puck-base/core/fields.js";
|
|
2
2
|
import { Faq } from "./faq.js";
|
|
3
|
+
import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
|
|
3
4
|
const conf = {
|
|
4
5
|
fields: {
|
|
5
6
|
...contentFields,
|
|
6
|
-
|
|
7
|
+
expandMode: {
|
|
7
8
|
type: "radio",
|
|
8
9
|
label: "answer display",
|
|
9
10
|
options: [
|
|
@@ -12,15 +13,14 @@ const conf = {
|
|
|
12
13
|
]
|
|
13
14
|
},
|
|
14
15
|
collapsible: {
|
|
15
|
-
// TODO: would be good to have boolean values
|
|
16
16
|
type: "radio",
|
|
17
17
|
label: "can close answers",
|
|
18
18
|
options: [
|
|
19
|
-
{ label: "yes", value:
|
|
20
|
-
{ label: "no", value:
|
|
19
|
+
{ label: "yes", value: true },
|
|
20
|
+
{ label: "no", value: false }
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
|
-
|
|
23
|
+
items: {
|
|
24
24
|
type: "array",
|
|
25
25
|
max: 20,
|
|
26
26
|
getItemSummary: (item, index = 0) => {
|
|
@@ -45,9 +45,7 @@ const conf = {
|
|
|
45
45
|
{ label: "two Column", value: "two-col" }
|
|
46
46
|
]
|
|
47
47
|
},
|
|
48
|
-
|
|
49
|
-
sectionStyle,
|
|
50
|
-
backgroundColor
|
|
48
|
+
styles: createStylesField()
|
|
51
49
|
},
|
|
52
50
|
defaultProps: {
|
|
53
51
|
badge: {
|
|
@@ -64,19 +62,19 @@ const conf = {
|
|
|
64
62
|
variant: "secondary"
|
|
65
63
|
}
|
|
66
64
|
],
|
|
67
|
-
|
|
68
|
-
collapsible:
|
|
69
|
-
|
|
65
|
+
expandMode: "single",
|
|
66
|
+
collapsible: true,
|
|
67
|
+
items: [
|
|
70
68
|
{
|
|
71
69
|
question: "Question",
|
|
72
70
|
answer: "Answer"
|
|
73
71
|
}
|
|
74
72
|
],
|
|
75
73
|
layout: "two-col",
|
|
76
|
-
|
|
74
|
+
styles: createStylesDefaults()
|
|
77
75
|
},
|
|
78
76
|
resolveFields: (data, params) => {
|
|
79
|
-
if (data.props.
|
|
77
|
+
if (data.props.expandMode === "multiple") {
|
|
80
78
|
const { collapsible, ...newFields } = params.fields;
|
|
81
79
|
return newFields;
|
|
82
80
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CompoundContainerProps } from "@/components/puck-base/container";
|
|
2
|
+
import { CompoundImageProps } from "@/components/puck-base/image";
|
|
3
|
+
export interface Faq2Item {
|
|
4
|
+
question: string;
|
|
5
|
+
answer: string;
|
|
6
|
+
}
|
|
7
|
+
export interface Faq2Props {
|
|
8
|
+
heading?: string;
|
|
9
|
+
items?: Faq2Item[];
|
|
10
|
+
image?: CompoundImageProps;
|
|
11
|
+
imagePosition?: "left" | "right";
|
|
12
|
+
styles?: {
|
|
13
|
+
padding?: CompoundContainerProps["padding"];
|
|
14
|
+
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
15
|
+
backgroundColor?: string;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export declare const Faq2: ({ heading, items, image, imagePosition, styles, }: Faq2Props) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { CompoundContainer } from "../../../puck-base/container.js";
|
|
4
|
+
import { CompoundImage } from "../../../puck-base/image.js";
|
|
5
|
+
import { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from "../../../shadcn/accordion.js";
|
|
6
|
+
const Faq2 = ({
|
|
7
|
+
heading,
|
|
8
|
+
items = [],
|
|
9
|
+
image,
|
|
10
|
+
imagePosition = "right",
|
|
11
|
+
styles
|
|
12
|
+
}) => {
|
|
13
|
+
const imageCol = /* @__PURE__ */ jsx("div", { className: "hidden lg:block lg:sticky lg:top-8 aspect-square overflow-hidden rounded-3xl", children: /* @__PURE__ */ jsx(
|
|
14
|
+
CompoundImage,
|
|
15
|
+
{
|
|
16
|
+
src: (image == null ? void 0 : image.src) ?? "",
|
|
17
|
+
alt: (image == null ? void 0 : image.alt) ?? "",
|
|
18
|
+
className: "h-full w-full object-cover"
|
|
19
|
+
}
|
|
20
|
+
) });
|
|
21
|
+
const accordionCol = /* @__PURE__ */ jsx(Accordion, { type: "single", collapsible: true, className: "flex flex-col gap-3", children: items.map((item, i) => /* @__PURE__ */ jsxs(
|
|
22
|
+
AccordionItem,
|
|
23
|
+
{
|
|
24
|
+
value: `faq2-${i}`,
|
|
25
|
+
className: "border-0 bg-foreground/[0.047] rounded-3xl px-6",
|
|
26
|
+
children: [
|
|
27
|
+
/* @__PURE__ */ jsx(AccordionTrigger, { className: "text-base font-medium hover:no-underline py-5 text-left", children: item.question }),
|
|
28
|
+
/* @__PURE__ */ jsx(AccordionContent, { className: "text-muted-foreground pb-5 text-sm leading-relaxed", children: item.answer })
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
i
|
|
32
|
+
)) });
|
|
33
|
+
return /* @__PURE__ */ jsx(
|
|
34
|
+
CompoundContainer,
|
|
35
|
+
{
|
|
36
|
+
padding: styles == null ? void 0 : styles.padding,
|
|
37
|
+
sectionStyle: styles == null ? void 0 : styles.sectionStyle,
|
|
38
|
+
backgroundColor: styles == null ? void 0 : styles.backgroundColor,
|
|
39
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-10", children: [
|
|
40
|
+
heading && /* @__PURE__ */ jsx("div", { className: "text-center", children: /* @__PURE__ */ jsx("h2", { className: "text-foreground font-serif text-3xl font-semibold tracking-tight md:text-4xl lg:text-5xl", children: heading }) }),
|
|
41
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-12 lg:grid-cols-2 lg:items-start lg:gap-16", children: imagePosition === "left" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
42
|
+
imageCol,
|
|
43
|
+
accordionCol
|
|
44
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
45
|
+
accordionCol,
|
|
46
|
+
imageCol
|
|
47
|
+
] }) })
|
|
48
|
+
] })
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
export {
|
|
53
|
+
Faq2
|
|
54
|
+
};
|