dune-react 0.0.9 → 0.0.11
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.d.ts +0 -1
- package/dist/components/puck-base/button.js +5 -4
- package/dist/components/puck-base/card.js +0 -1
- package/dist/components/puck-base/content.js +0 -1
- package/dist/components/puck-base/core/fields.d.ts +2 -150
- package/dist/components/puck-base/core/fields.js +7 -83
- package/dist/components/puck-base/core/styles.d.ts +1946 -0
- package/dist/components/puck-base/core/styles.js +250 -0
- package/dist/components/puck-base/core/with-editable.d.ts +5 -7
- package/dist/components/puck-base/core/with-editable.js +69 -64
- package/dist/components/puck-base/{action-field.d.ts → fields/action-field.d.ts} +1 -1
- package/dist/components/puck-base/{action-field.js → fields/action-field.js} +91 -16
- package/dist/components/puck-base/fields/auto-field.d.ts +0 -1
- package/dist/components/puck-base/fields/auto-field.js +2 -90
- package/dist/components/puck-base/form.js +0 -1
- package/dist/components/puck-base/index.d.ts +1 -1
- package/dist/components/puck-base/navigation-menu.d.ts +18 -0
- package/dist/components/puck-base/navigation-menu.js +202 -0
- 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/contact-us-1/contact-us.d.ts +13 -4
- package/dist/components/puck-block/contact-sections/contact-us-1/contact-us.js +114 -105
- 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 +15 -11
- package/dist/components/puck-block/contact-sections/contact-us-2/contact-us-2.js +27 -22
- package/dist/components/puck-block/contact-sections/contact-us-2/index.js +54 -52
- package/dist/components/puck-block/contact-sections/contact-us-3/contact-us-3.d.ts +15 -12
- package/dist/components/puck-block/contact-sections/contact-us-3/contact-us-3.js +29 -24
- package/dist/components/puck-block/contact-sections/contact-us-3/index.js +73 -60
- 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 +13 -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 +48 -22
- 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 +35 -32
- package/dist/components/puck-block/cta-sections/promo-section-1/index.js +5 -7
- 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 +93 -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 +44 -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 +6 -4
- package/dist/components/puck-block/faq-sections/faq-2/faq-2.js +4 -6
- package/dist/components/puck-block/faq-sections/faq-2/index.js +4 -5
- 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 +6 -4
- package/dist/components/puck-block/feature-sections/feature-cards-1/feature-cards.js +2 -4
- package/dist/components/puck-block/feature-sections/feature-cards-1/index.js +4 -7
- 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 +2 -4
- 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 +2 -4
- 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 +48 -40
- package/dist/components/puck-block/gallery-sections/gallery-1/index.js +33 -35
- package/dist/components/puck-block/gallery-sections/gallery-2/gallery-2.d.ts +6 -4
- package/dist/components/puck-block/gallery-sections/gallery-2/gallery-2.js +19 -13
- package/dist/components/puck-block/gallery-sections/gallery-2/index.js +4 -6
- package/dist/components/puck-block/gallery-sections/gallery-3/gallery-3.d.ts +7 -5
- package/dist/components/puck-block/gallery-sections/gallery-3/gallery-3.js +5 -7
- package/dist/components/puck-block/gallery-sections/gallery-3/index.js +13 -14
- package/dist/components/puck-block/gallery-sections/props.d.ts +26 -0
- package/dist/components/puck-block/header-sections/header-1/header.d.ts +11 -6
- package/dist/components/puck-block/header-sections/header-1/header.js +34 -28
- 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 +26 -30
- 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 +7 -5
- package/dist/components/puck-block/hero-sections/fullscreen-hero-1/fullscreen-hero.js +19 -5
- package/dist/components/puck-block/hero-sections/fullscreen-hero-1/index.js +17 -17
- package/dist/components/puck-block/hero-sections/gradient-hero-1/gradient-hero.d.ts +8 -4
- package/dist/components/puck-block/hero-sections/gradient-hero-1/gradient-hero.js +36 -26
- package/dist/components/puck-block/hero-sections/gradient-hero-1/index.js +19 -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 +8 -11
- 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 +6 -8
- 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 +9 -7
- package/dist/components/puck-block/hero-sections/image-hero-1/image-hero.js +65 -59
- package/dist/components/puck-block/hero-sections/image-hero-1/index.js +35 -36
- 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/location-sections/location-1/index.js +44 -42
- package/dist/components/puck-block/location-sections/location-1/location.d.ts +8 -6
- package/dist/components/puck-block/location-sections/location-1/location.js +8 -15
- package/dist/components/puck-block/location-sections/location-2/index.js +66 -57
- package/dist/components/puck-block/location-sections/location-2/location.d.ts +12 -6
- package/dist/components/puck-block/location-sections/location-2/location.js +8 -14
- package/dist/components/puck-block/location-sections/location-3/index.js +25 -24
- package/dist/components/puck-block/location-sections/location-3/location.d.ts +10 -6
- package/dist/components/puck-block/location-sections/location-3/location.js +12 -11
- 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.js +4 -7
- package/dist/components/puck-block/metrics-sections/stats-2/stats-2.d.ts +6 -4
- package/dist/components/puck-block/metrics-sections/stats-2/stats-2.js +4 -7
- package/dist/components/puck-block/metrics-sections/stats-3/index.js +19 -29
- package/dist/components/puck-block/metrics-sections/stats-3/stats-3.d.ts +7 -6
- package/dist/components/puck-block/metrics-sections/stats-3/stats-3.js +22 -13
- 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 -13
- 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.js +7 -12
- package/dist/components/puck-block/pricing-sections/pricing-2/pricing-2.d.ts +6 -4
- package/dist/components/puck-block/pricing-sections/pricing-2/pricing-2.js +60 -57
- 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 +7 -5
- package/dist/components/puck-block/showcase-sections/before-after-1/before-after.js +8 -10
- package/dist/components/puck-block/showcase-sections/before-after-1/index.js +6 -8
- 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 +29 -21
- 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 +5 -6
- 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 +23 -17
- package/dist/components/puck-block/team-sections/team-grid-2/index.js +4 -7
- package/dist/components/puck-block/team-sections/team-grid-2/team-grid-2.d.ts +6 -4
- package/dist/components/puck-block/team-sections/team-grid-2/team-grid-2.js +5 -7
- package/dist/components/puck-block/team-sections/team-profiles-1/index.js +4 -5
- package/dist/components/puck-block/team-sections/team-profiles-1/team-profiles.d.ts +6 -4
- package/dist/components/puck-block/team-sections/team-profiles-1/team-profiles.js +5 -7
- 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 +33 -24
- package/dist/components/puck-block/testimonial-sections/logo-wall-1/index.js +17 -16
- package/dist/components/puck-block/testimonial-sections/logo-wall-1/logo-wall.d.ts +6 -4
- package/dist/components/puck-block/testimonial-sections/logo-wall-1/logo-wall.js +5 -7
- package/dist/components/puck-block/testimonial-sections/props.d.ts +34 -0
- package/dist/components/puck-block/testimonial-sections/review-section-1/index.js +17 -16
- 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 +22 -17
- 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 +100 -67
- package/dist/components/puck-block/text-sections/articles-1/articles.d.ts +7 -5
- package/dist/components/puck-block/text-sections/articles-1/articles.js +41 -34
- package/dist/components/puck-block/text-sections/articles-1/index.js +24 -25
- 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 +6 -9
- package/dist/components/puck-block/text-sections/content-section-1/index.js +14 -16
- 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 +10 -8
- 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.js +8 -33
- package/dist/index.js +3 -2
- package/package.json +2 -2
|
@@ -14,76 +14,82 @@ const minHeightStyles = {
|
|
|
14
14
|
full: "min-h-screen"
|
|
15
15
|
};
|
|
16
16
|
const ImageHero = ({
|
|
17
|
-
padding,
|
|
18
|
-
sectionStyle,
|
|
19
|
-
backgroundColor,
|
|
20
17
|
heading = "Your Story Starts Here",
|
|
21
18
|
description,
|
|
22
19
|
badge,
|
|
23
20
|
buttons,
|
|
24
21
|
backgroundImage,
|
|
25
|
-
|
|
26
|
-
align = "center",
|
|
27
|
-
minHeight = "large"
|
|
22
|
+
styles
|
|
28
23
|
}) => {
|
|
24
|
+
const overlay = (styles == null ? void 0 : styles.overlay) ?? "dark";
|
|
25
|
+
const align = (styles == null ? void 0 : styles.align) ?? "center";
|
|
26
|
+
const minHeight = (styles == null ? void 0 : styles.minHeight) ?? "large";
|
|
29
27
|
const bgSrc = typeof backgroundImage === "string" ? backgroundImage : backgroundImage == null ? void 0 : backgroundImage.src;
|
|
30
28
|
const bgAlt = typeof backgroundImage === "string" ? "" : (backgroundImage == null ? void 0 : backgroundImage.alt) ?? "";
|
|
31
|
-
return /* @__PURE__ */ jsx(
|
|
32
|
-
|
|
29
|
+
return /* @__PURE__ */ jsx(
|
|
30
|
+
CompoundContainer,
|
|
33
31
|
{
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
align === "center" && "items-center text-center",
|
|
55
|
-
align === "left" && "items-start text-left"
|
|
32
|
+
padding: styles == null ? void 0 : styles.padding,
|
|
33
|
+
sectionStyle: styles == null ? void 0 : styles.sectionStyle,
|
|
34
|
+
backgroundColor: styles == null ? void 0 : styles.backgroundColor,
|
|
35
|
+
children: /* @__PURE__ */ jsxs(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
className: cn(
|
|
39
|
+
"relative flex items-center overflow-hidden rounded-2xl",
|
|
40
|
+
minHeightStyles[minHeight] ?? minHeightStyles.large
|
|
41
|
+
),
|
|
42
|
+
children: [
|
|
43
|
+
bgSrc && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 [&>span]:h-full [&>span]:w-full", children: /* @__PURE__ */ jsx(CompoundImage, { src: bgSrc, alt: bgAlt, className: "h-full w-full object-cover" }) }),
|
|
44
|
+
overlay !== "none" && /* @__PURE__ */ jsx(
|
|
45
|
+
"div",
|
|
46
|
+
{
|
|
47
|
+
className: cn(
|
|
48
|
+
"absolute inset-0",
|
|
49
|
+
overlayStyles[overlay] ?? overlayStyles.dark
|
|
50
|
+
)
|
|
51
|
+
}
|
|
56
52
|
),
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
53
|
+
/* @__PURE__ */ jsxs(
|
|
54
|
+
"div",
|
|
55
|
+
{
|
|
56
|
+
className: cn(
|
|
57
|
+
"relative z-50 flex w-full flex-col gap-6 px-8 py-16 md:px-16",
|
|
58
|
+
align === "center" && "items-center text-center",
|
|
59
|
+
align === "left" && "items-start text-left"
|
|
60
|
+
),
|
|
61
|
+
children: [
|
|
62
|
+
badge && /* @__PURE__ */ jsx(
|
|
63
|
+
CompoundBadge,
|
|
64
|
+
{
|
|
65
|
+
label: badge.label,
|
|
66
|
+
variant: badge.variant,
|
|
67
|
+
url: badge.url
|
|
68
|
+
}
|
|
69
|
+
),
|
|
70
|
+
heading && /* @__PURE__ */ jsx("h1", { className: "text-white max-w-3xl text-4xl font-bold tracking-tight md:text-6xl lg:text-7xl", children: heading }),
|
|
71
|
+
description && /* @__PURE__ */ jsx("p", { className: "text-white/80 max-w-2xl text-lg md:text-xl", children: description }),
|
|
72
|
+
Array.isArray(buttons) && buttons.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-4", children: buttons.map(
|
|
73
|
+
(button, index) => button.label ? /* @__PURE__ */ jsx(
|
|
74
|
+
CompoundButton,
|
|
75
|
+
{
|
|
76
|
+
label: button.label,
|
|
77
|
+
action: button.action,
|
|
78
|
+
variant: button.variant,
|
|
79
|
+
size: button.size,
|
|
80
|
+
icon: button.icon
|
|
81
|
+
},
|
|
82
|
+
index
|
|
83
|
+
) : null
|
|
84
|
+
) })
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
)
|
|
85
91
|
}
|
|
86
|
-
)
|
|
92
|
+
);
|
|
87
93
|
};
|
|
88
94
|
export {
|
|
89
95
|
ImageHero
|
|
@@ -1,66 +1,65 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { buttons, badge } from "../../../puck-base/core/fields.js";
|
|
2
|
+
import { heroStylesDefaults, createStylesField, sectionOverlay } from "../../../puck-base/core/styles.js";
|
|
2
3
|
import { ImageHero } from "./image-hero.js";
|
|
4
|
+
const imageHeroStylesField = createStylesField({
|
|
5
|
+
overlay: sectionOverlay,
|
|
6
|
+
align: {
|
|
7
|
+
type: "radio",
|
|
8
|
+
options: [
|
|
9
|
+
{ label: "Left", value: "left" },
|
|
10
|
+
{ label: "Center", value: "center" }
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
minHeight: {
|
|
14
|
+
type: "select",
|
|
15
|
+
label: "Min Height",
|
|
16
|
+
options: [
|
|
17
|
+
{ label: "Medium", value: "medium" },
|
|
18
|
+
{ label: "Large", value: "large" },
|
|
19
|
+
{ label: "Full", value: "full" }
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
});
|
|
3
23
|
const conf = {
|
|
4
24
|
fields: {
|
|
5
25
|
heading: { type: "text", contentEditable: true },
|
|
6
26
|
description: { type: "textarea", contentEditable: true },
|
|
7
27
|
badge,
|
|
8
28
|
buttons,
|
|
9
|
-
backgroundImage
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
{ label: "Gradient", value: "gradient" }
|
|
17
|
-
]
|
|
18
|
-
},
|
|
19
|
-
align: {
|
|
20
|
-
type: "radio",
|
|
21
|
-
label: "Alignment",
|
|
22
|
-
options: [
|
|
23
|
-
{ label: "Left", value: "left" },
|
|
24
|
-
{ label: "Center", value: "center" }
|
|
25
|
-
]
|
|
26
|
-
},
|
|
27
|
-
minHeight: {
|
|
28
|
-
type: "select",
|
|
29
|
-
label: "Min Height",
|
|
30
|
-
options: [
|
|
31
|
-
{ label: "Medium", value: "medium" },
|
|
32
|
-
{ label: "Large", value: "large" },
|
|
33
|
-
{ label: "Full Screen", value: "full" }
|
|
34
|
-
]
|
|
29
|
+
backgroundImage: {
|
|
30
|
+
type: "text",
|
|
31
|
+
label: "Background Image URL",
|
|
32
|
+
ai: {
|
|
33
|
+
instructions: "URL for a full-width background image behind the section.",
|
|
34
|
+
stream: false
|
|
35
|
+
}
|
|
35
36
|
},
|
|
36
|
-
|
|
37
|
-
sectionStyle,
|
|
38
|
-
backgroundColor
|
|
37
|
+
styles: imageHeroStylesField
|
|
39
38
|
},
|
|
40
39
|
defaultProps: {
|
|
41
40
|
heading: "Your Story Starts Here",
|
|
42
41
|
description: "Create something extraordinary with our platform. Built for dreamers, makers, and innovators.",
|
|
43
42
|
backgroundImage: "https://images.pexels.com/photos/3184291/pexels-photo-3184291.jpeg?auto=compress&cs=tinysrgb&w=1920",
|
|
44
|
-
overlay: "dark",
|
|
45
|
-
align: "center",
|
|
46
|
-
minHeight: "large",
|
|
47
43
|
buttons: [
|
|
48
44
|
{
|
|
49
45
|
label: "Get Started",
|
|
50
|
-
url: "#",
|
|
51
46
|
variant: "default",
|
|
52
47
|
size: "lg",
|
|
53
48
|
icon: "none"
|
|
54
49
|
},
|
|
55
50
|
{
|
|
56
51
|
label: "Learn More",
|
|
57
|
-
url: "#",
|
|
58
52
|
variant: "outline",
|
|
59
53
|
size: "lg",
|
|
60
54
|
icon: "none"
|
|
61
55
|
}
|
|
62
56
|
],
|
|
63
|
-
|
|
57
|
+
styles: {
|
|
58
|
+
...heroStylesDefaults,
|
|
59
|
+
overlay: "dark",
|
|
60
|
+
align: "center",
|
|
61
|
+
minHeight: "large"
|
|
62
|
+
}
|
|
64
63
|
},
|
|
65
64
|
render: ImageHero
|
|
66
65
|
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
type HeroVariant = "hero-1" | "split-hero-1" | "grid-hero-1" | "image-hero-1" | "video-hero-1" | "gradient-hero-1" | "fullscreen-hero-1";
|
|
2
|
+
type HeroPadding = {
|
|
3
|
+
top?: "none" | "small" | "medium" | "large";
|
|
4
|
+
bottom?: "none" | "small" | "medium" | "large";
|
|
5
|
+
};
|
|
6
|
+
type HeroSectionStyle = "default" | "dark" | "muted" | "inverted" | "custom";
|
|
7
|
+
type HeroBadge = {
|
|
8
|
+
label: string;
|
|
9
|
+
url?: string;
|
|
10
|
+
variant?: "default" | "secondary" | "destructive" | "outline" | string;
|
|
11
|
+
};
|
|
12
|
+
type HeroButton = {
|
|
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 HeroFeature = {
|
|
20
|
+
icon?: string;
|
|
21
|
+
name?: string;
|
|
22
|
+
description?: string;
|
|
23
|
+
};
|
|
24
|
+
type HeroImage = {
|
|
25
|
+
src: string;
|
|
26
|
+
alt?: string;
|
|
27
|
+
aspectRatio?: "16x9" | "1x1";
|
|
28
|
+
};
|
|
29
|
+
type HeroSidebarItem = {
|
|
30
|
+
label: string;
|
|
31
|
+
value?: string;
|
|
32
|
+
description?: string;
|
|
33
|
+
url?: string;
|
|
34
|
+
};
|
|
35
|
+
type HeroSectionProps = {
|
|
36
|
+
variant?: HeroVariant;
|
|
37
|
+
badge?: HeroBadge;
|
|
38
|
+
heading?: string;
|
|
39
|
+
description?: string;
|
|
40
|
+
buttons?: HeroButton[];
|
|
41
|
+
features?: HeroFeature[];
|
|
42
|
+
alignContent?: "start" | "center" | "end";
|
|
43
|
+
spacing?: "tight" | "normal" | "relaxed";
|
|
44
|
+
align?: "left" | "center";
|
|
45
|
+
displaySize?: "default" | "display";
|
|
46
|
+
images?: HeroImage | HeroImage[];
|
|
47
|
+
backgroundImage?: HeroImage | string;
|
|
48
|
+
posterImage?: HeroImage;
|
|
49
|
+
videoUrl?: string;
|
|
50
|
+
adjectives?: {
|
|
51
|
+
adjective: string;
|
|
52
|
+
}[];
|
|
53
|
+
displayText?: string;
|
|
54
|
+
imageLayout?: "1x1" | "1x1-9x16-1x1" | "16x9";
|
|
55
|
+
imagePosition?: "left" | "right";
|
|
56
|
+
leftSidebarTitle?: string;
|
|
57
|
+
leftSidebar?: HeroSidebarItem[];
|
|
58
|
+
rightSidebarTitle?: string;
|
|
59
|
+
rightSidebar?: HeroSidebarItem[];
|
|
60
|
+
styles?: {
|
|
61
|
+
padding?: HeroPadding;
|
|
62
|
+
sectionStyle?: HeroSectionStyle;
|
|
63
|
+
backgroundColor?: string;
|
|
64
|
+
className?: string;
|
|
65
|
+
showGridLines?: boolean;
|
|
66
|
+
overlay?: "none" | "dark" | "gradient";
|
|
67
|
+
minHeight?: "medium" | "large" | "full";
|
|
68
|
+
gradientFrom?: string;
|
|
69
|
+
gradientTo?: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { image16x9Placeholder, images, contentFields } from "../../../puck-base/core/fields.js";
|
|
2
2
|
import { SplitHero } from "./split-hero.js";
|
|
3
|
+
import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
|
|
3
4
|
const conf = {
|
|
4
5
|
fields: {
|
|
5
6
|
...contentFields,
|
|
6
7
|
displayText: { type: "text" },
|
|
7
|
-
|
|
8
|
+
images: { ...images, max: 1 },
|
|
8
9
|
imagePosition: {
|
|
9
10
|
type: "radio",
|
|
10
11
|
options: [
|
|
@@ -12,7 +13,7 @@ const conf = {
|
|
|
12
13
|
{ label: "Right", value: "right" }
|
|
13
14
|
]
|
|
14
15
|
},
|
|
15
|
-
|
|
16
|
+
styles: createStylesField()
|
|
16
17
|
},
|
|
17
18
|
defaultProps: {
|
|
18
19
|
heading: "Launch your next big idea",
|
|
@@ -22,9 +23,9 @@ const conf = {
|
|
|
22
23
|
{ label: "Start building", icon: "move-right", variant: "default" },
|
|
23
24
|
{ label: "See demo", icon: "play", variant: "outline" }
|
|
24
25
|
],
|
|
25
|
-
|
|
26
|
+
images: [image16x9Placeholder],
|
|
26
27
|
imagePosition: "right",
|
|
27
|
-
|
|
28
|
+
styles: createStylesDefaults()
|
|
28
29
|
},
|
|
29
30
|
render: SplitHero
|
|
30
31
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { CompoundContainerProps } from "@/components/puck-base/container";
|
|
2
2
|
import { CompoundContentProps } from "@/components/puck-base/content";
|
|
3
|
+
import { CompoundImageProps } from "@/components/puck-base/image";
|
|
3
4
|
export interface SplitHeroProps extends CompoundContentProps {
|
|
4
|
-
|
|
5
|
-
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
6
|
-
backgroundColor?: string;
|
|
7
|
-
image?: {
|
|
8
|
-
src: string;
|
|
9
|
-
alt: string;
|
|
10
|
-
};
|
|
5
|
+
images?: CompoundImageProps | CompoundImageProps[];
|
|
11
6
|
imagePosition?: "left" | "right";
|
|
12
7
|
displayText?: string;
|
|
8
|
+
styles?: {
|
|
9
|
+
padding?: CompoundContainerProps["padding"];
|
|
10
|
+
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
11
|
+
backgroundColor?: string;
|
|
12
|
+
};
|
|
13
13
|
}
|
|
14
|
-
export declare const SplitHero: ({
|
|
14
|
+
export declare const SplitHero: ({ badge, heading, description, buttons, images, imagePosition, displayText, styles, }: SplitHeroProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,58 +4,59 @@ import { CompoundContainer } from "../../../puck-base/container.js";
|
|
|
4
4
|
import { CompoundContent } from "../../../puck-base/content.js";
|
|
5
5
|
import { CompoundImage } from "../../../puck-base/image.js";
|
|
6
6
|
const SplitHero = ({
|
|
7
|
-
padding,
|
|
8
|
-
sectionStyle,
|
|
9
|
-
backgroundColor,
|
|
10
7
|
badge,
|
|
11
8
|
heading,
|
|
12
9
|
description,
|
|
13
10
|
buttons,
|
|
14
|
-
|
|
11
|
+
images,
|
|
15
12
|
imagePosition = "right",
|
|
16
|
-
displayText
|
|
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
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
{
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
13
|
+
displayText,
|
|
14
|
+
styles
|
|
15
|
+
}) => {
|
|
16
|
+
const primaryImage = Array.isArray(images) ? images[0] : images;
|
|
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(
|
|
24
|
+
"div",
|
|
25
|
+
{
|
|
26
|
+
className: cn(
|
|
27
|
+
"grid grid-cols-1 items-center gap-8 lg:grid-cols-2 lg:gap-16",
|
|
28
|
+
imagePosition === "left" && "lg:[direction:rtl] lg:[&>*]:[direction:ltr]"
|
|
29
|
+
),
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
32
|
+
displayText && /* @__PURE__ */ jsx("p", { className: "mb-4 font-serif text-5xl font-bold tracking-tighter md:text-7xl lg:text-8xl", children: displayText }),
|
|
33
|
+
/* @__PURE__ */ jsx(
|
|
34
|
+
CompoundContent,
|
|
35
|
+
{
|
|
36
|
+
badge,
|
|
37
|
+
heading: displayText ? void 0 : heading,
|
|
38
|
+
description,
|
|
39
|
+
buttons
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
] }),
|
|
43
|
+
/* @__PURE__ */ jsxs("div", { className: "border-border/50 relative aspect-[4/3] overflow-hidden rounded-xl border bg-muted [&>span]:h-full [&>span]:w-full", children: [
|
|
44
|
+
!(primaryImage == null ? void 0 : primaryImage.src) && /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Image" }) }),
|
|
45
|
+
/* @__PURE__ */ jsx(
|
|
46
|
+
CompoundImage,
|
|
47
|
+
{
|
|
48
|
+
src: (primaryImage == null ? void 0 : primaryImage.src) || "",
|
|
49
|
+
alt: (primaryImage == null ? void 0 : primaryImage.alt) || "",
|
|
50
|
+
className: "h-full w-full object-cover"
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
] })
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
};
|
|
59
60
|
export {
|
|
60
61
|
SplitHero
|
|
61
62
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { image16x9Placeholder, image, contentFields } from "../../../puck-base/core/fields.js";
|
|
2
2
|
import { VideoHero } from "./video-hero.js";
|
|
3
|
+
import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
|
|
3
4
|
const conf = {
|
|
4
5
|
fields: {
|
|
5
6
|
...contentFields,
|
|
@@ -9,14 +10,14 @@ const conf = {
|
|
|
9
10
|
ai: { instructions: "Direct URL to an MP4 video" }
|
|
10
11
|
},
|
|
11
12
|
posterImage: image,
|
|
12
|
-
|
|
13
|
+
styles: createStylesField()
|
|
13
14
|
},
|
|
14
15
|
defaultProps: {
|
|
15
16
|
heading: "See it in action",
|
|
16
17
|
description: "Watch how our platform helps teams build faster.",
|
|
17
18
|
buttons: [{ label: "Try it free", icon: "move-right", variant: "default" }],
|
|
18
19
|
posterImage: image16x9Placeholder,
|
|
19
|
-
|
|
20
|
+
styles: createStylesDefaults()
|
|
20
21
|
},
|
|
21
22
|
render: VideoHero
|
|
22
23
|
};
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { CompoundContainerProps } from "@/components/puck-base/container";
|
|
2
2
|
import { CompoundContentProps } from "@/components/puck-base/content";
|
|
3
3
|
export interface VideoHeroProps extends CompoundContentProps {
|
|
4
|
-
padding?: CompoundContainerProps["padding"];
|
|
5
4
|
videoUrl?: string;
|
|
6
5
|
posterImage?: {
|
|
7
6
|
src: string;
|
|
8
7
|
alt: string;
|
|
9
8
|
};
|
|
9
|
+
styles?: {
|
|
10
|
+
padding?: CompoundContainerProps["padding"];
|
|
11
|
+
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
12
|
+
backgroundColor?: string;
|
|
13
|
+
};
|
|
10
14
|
}
|
|
11
|
-
export declare const VideoHero: ({
|
|
15
|
+
export declare const VideoHero: ({ badge, heading, description, buttons, videoUrl, posterImage, styles, }: VideoHeroProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,33 +2,41 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { CompoundContainer } from "../../../puck-base/container.js";
|
|
3
3
|
import { CompoundContent } from "../../../puck-base/content.js";
|
|
4
4
|
const VideoHero = ({
|
|
5
|
-
padding,
|
|
6
5
|
badge,
|
|
7
6
|
heading,
|
|
8
7
|
description,
|
|
9
8
|
buttons,
|
|
10
9
|
videoUrl,
|
|
11
|
-
posterImage
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
10
|
+
posterImage,
|
|
11
|
+
styles
|
|
12
|
+
}) => /* @__PURE__ */ jsx(
|
|
13
|
+
CompoundContainer,
|
|
14
|
+
{
|
|
15
|
+
padding: styles == null ? void 0 : styles.padding,
|
|
16
|
+
sectionStyle: styles == null ? void 0 : styles.sectionStyle,
|
|
17
|
+
backgroundColor: styles == null ? void 0 : styles.backgroundColor,
|
|
18
|
+
children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 items-center gap-12 lg:grid-cols-2", children: [
|
|
19
|
+
/* @__PURE__ */ jsx(
|
|
20
|
+
CompoundContent,
|
|
21
|
+
{
|
|
22
|
+
badge,
|
|
23
|
+
heading,
|
|
24
|
+
description,
|
|
25
|
+
buttons
|
|
26
|
+
}
|
|
27
|
+
),
|
|
28
|
+
/* @__PURE__ */ jsx("div", { className: "border-border/20 overflow-hidden rounded-xl border bg-black/50", children: videoUrl ? /* @__PURE__ */ jsx(
|
|
29
|
+
"video",
|
|
30
|
+
{
|
|
31
|
+
src: videoUrl,
|
|
32
|
+
poster: posterImage == null ? void 0 : posterImage.src,
|
|
33
|
+
controls: true,
|
|
34
|
+
className: "aspect-video w-full object-cover"
|
|
35
|
+
}
|
|
36
|
+
) : /* @__PURE__ */ jsx("div", { className: "flex aspect-video w-full items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "bg-primary/20 flex h-16 w-16 items-center justify-center rounded-full", children: /* @__PURE__ */ jsx("span", { className: "text-primary text-2xl", children: "▶" }) }) }) })
|
|
37
|
+
] })
|
|
38
|
+
}
|
|
39
|
+
);
|
|
32
40
|
export {
|
|
33
41
|
VideoHero
|
|
34
42
|
};
|