dune-react 0.0.9 → 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/button.js +2 -1
- 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/with-editable.d.ts +4 -1
- package/dist/components/puck-base/core/with-editable.js +51 -27
- 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 +12 -9
- package/dist/components/puck-block/cta-sections/banner-cta-1/banner-cta.js +27 -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 +35 -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 +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 +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 +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 -5
- 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 +32 -34
- 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 +5 -7
- package/dist/components/puck-block/gallery-sections/gallery-2/index.js +3 -5
- 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 +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 +7 -5
- package/dist/components/puck-block/hero-sections/fullscreen-hero-1/fullscreen-hero.js +5 -4
- package/dist/components/puck-block/hero-sections/fullscreen-hero-1/index.js +17 -16
- 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 +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 +10 -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 +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/location-sections/location-1/index.js +47 -42
- package/dist/components/puck-block/location-sections/location-1/location.d.ts +7 -6
- package/dist/components/puck-block/location-sections/location-1/location.js +7 -13
- package/dist/components/puck-block/location-sections/location-2/index.js +69 -57
- package/dist/components/puck-block/location-sections/location-2/location.d.ts +11 -6
- package/dist/components/puck-block/location-sections/location-2/location.js +7 -12
- 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 +8 -6
- package/dist/components/puck-block/location-sections/location-3/location.js +7 -9
- 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 -5
- 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 -6
- package/dist/components/puck-block/metrics-sections/stats-3/index.js +21 -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 +9 -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 -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.js +7 -8
- 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 -7
- 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 +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 +23 -17
- package/dist/components/puck-block/team-sections/team-grid-2/index.js +4 -5
- 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 +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 +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 +76 -63
- 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 -24
- 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 -8
- 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 +3 -5
- 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/index.js +2 -1
- package/package.json +1 -1
|
@@ -1,49 +1,26 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { buttons, badge } from "../../../puck-base/core/fields.js";
|
|
2
2
|
import { ImageHero } from "./image-hero.js";
|
|
3
|
+
import { heroStylesDefaults, heroStylesField } from "../../../puck-base/core/styles.js";
|
|
3
4
|
const conf = {
|
|
4
5
|
fields: {
|
|
5
6
|
heading: { type: "text", contentEditable: true },
|
|
6
7
|
description: { type: "textarea", contentEditable: true },
|
|
7
8
|
badge,
|
|
8
9
|
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
|
-
]
|
|
10
|
+
backgroundImage: {
|
|
11
|
+
type: "text",
|
|
12
|
+
label: "Background Image URL",
|
|
13
|
+
ai: {
|
|
14
|
+
instructions: "URL for a full-width background image behind the section.",
|
|
15
|
+
stream: false
|
|
16
|
+
}
|
|
35
17
|
},
|
|
36
|
-
|
|
37
|
-
sectionStyle,
|
|
38
|
-
backgroundColor
|
|
18
|
+
styles: heroStylesField
|
|
39
19
|
},
|
|
40
20
|
defaultProps: {
|
|
41
21
|
heading: "Your Story Starts Here",
|
|
42
22
|
description: "Create something extraordinary with our platform. Built for dreamers, makers, and innovators.",
|
|
43
23
|
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
24
|
buttons: [
|
|
48
25
|
{
|
|
49
26
|
label: "Get Started",
|
|
@@ -60,7 +37,12 @@ const conf = {
|
|
|
60
37
|
icon: "none"
|
|
61
38
|
}
|
|
62
39
|
],
|
|
63
|
-
|
|
40
|
+
styles: {
|
|
41
|
+
...heroStylesDefaults,
|
|
42
|
+
overlay: "dark",
|
|
43
|
+
align: "center",
|
|
44
|
+
minHeight: "large"
|
|
45
|
+
}
|
|
64
46
|
},
|
|
65
47
|
render: ImageHero
|
|
66
48
|
};
|
|
@@ -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) ?? "dark",
|
|
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
|
};
|
|
@@ -1,19 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { button } from "../../../puck-base/core/fields.js";
|
|
2
2
|
import { LocationSection } from "./location.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
objectFields
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
3
|
+
import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
|
|
4
|
+
const locationButtonFields = {
|
|
5
|
+
...button.objectFields,
|
|
6
|
+
colorMode: {
|
|
7
|
+
type: "select",
|
|
8
|
+
options: [
|
|
9
|
+
{ label: "Theme", value: "theme" },
|
|
10
|
+
{ label: "Custom", value: "custom" }
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
backgroundColor: { type: "text" },
|
|
14
|
+
textColor: { type: "text" }
|
|
15
|
+
};
|
|
16
|
+
const locationButtonDefaults = {
|
|
17
|
+
label: "Button",
|
|
18
|
+
url: "",
|
|
19
|
+
variant: "default",
|
|
20
|
+
size: "default",
|
|
21
|
+
icon: "none",
|
|
22
|
+
colorMode: "theme"
|
|
17
23
|
};
|
|
18
24
|
const conf = {
|
|
19
25
|
fields: {
|
|
@@ -55,17 +61,14 @@ const conf = {
|
|
|
55
61
|
max: 1,
|
|
56
62
|
step: 0.01
|
|
57
63
|
},
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
label: "Secondary Button"
|
|
64
|
+
buttons: {
|
|
65
|
+
type: "array",
|
|
66
|
+
max: 3,
|
|
67
|
+
getItemSummary: (item, index = 0) => item.label || `Button ${index + 1}`,
|
|
68
|
+
arrayFields: locationButtonFields,
|
|
69
|
+
defaultItemProps: locationButtonDefaults
|
|
65
70
|
},
|
|
66
|
-
|
|
67
|
-
sectionStyle,
|
|
68
|
-
backgroundColor
|
|
71
|
+
styles: createStylesField()
|
|
69
72
|
},
|
|
70
73
|
defaultProps: {
|
|
71
74
|
heading: "Find us in\nLos Angeles",
|
|
@@ -78,23 +81,25 @@ const conf = {
|
|
|
78
81
|
mapTintMode: "theme",
|
|
79
82
|
mapTintColor: "var(--primary)",
|
|
80
83
|
mapTintOpacity: 0.21,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
84
|
+
buttons: [
|
|
85
|
+
{
|
|
86
|
+
label: "Call to visit",
|
|
87
|
+
url: "tel:+12345678900",
|
|
88
|
+
variant: "default",
|
|
89
|
+
size: "default",
|
|
90
|
+
icon: "none",
|
|
91
|
+
colorMode: "theme"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
label: "Get directions",
|
|
95
|
+
url: "mailto:email@mybusiness.com",
|
|
96
|
+
variant: "secondary",
|
|
97
|
+
size: "default",
|
|
98
|
+
icon: "none",
|
|
99
|
+
colorMode: "theme"
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
styles: createStylesDefaults()
|
|
98
103
|
},
|
|
99
104
|
render: LocationSection
|
|
100
105
|
};
|
|
@@ -7,9 +7,6 @@ interface LocationButton extends Omit<CompoundButtonProps, "label"> {
|
|
|
7
7
|
textColor?: string;
|
|
8
8
|
}
|
|
9
9
|
export interface LocationSectionProps {
|
|
10
|
-
padding?: CompoundContainerProps["padding"];
|
|
11
|
-
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
12
|
-
backgroundColor?: string;
|
|
13
10
|
heading?: string;
|
|
14
11
|
description?: string;
|
|
15
12
|
contentAlign?: "left" | "right";
|
|
@@ -20,8 +17,12 @@ export interface LocationSectionProps {
|
|
|
20
17
|
mapTintMode?: "theme" | "custom" | "none";
|
|
21
18
|
mapTintColor?: string;
|
|
22
19
|
mapTintOpacity?: number;
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
buttons?: LocationButton[];
|
|
21
|
+
styles?: {
|
|
22
|
+
padding?: CompoundContainerProps["padding"];
|
|
23
|
+
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
24
|
+
backgroundColor?: string;
|
|
25
|
+
};
|
|
25
26
|
}
|
|
26
|
-
export declare const LocationSection: ({
|
|
27
|
+
export declare const LocationSection: ({ heading, description, contentAlign, contentPosition, mapEmbedUrl, mapTitle, mapFilter, mapTintMode, mapTintColor, mapTintOpacity, buttons, styles, }: LocationSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
28
|
export {};
|
|
@@ -37,9 +37,6 @@ const LocationActionButton = ({
|
|
|
37
37
|
) });
|
|
38
38
|
};
|
|
39
39
|
const LocationSection = ({
|
|
40
|
-
padding,
|
|
41
|
-
sectionStyle,
|
|
42
|
-
backgroundColor,
|
|
43
40
|
heading,
|
|
44
41
|
description,
|
|
45
42
|
contentAlign = "left",
|
|
@@ -50,8 +47,8 @@ const LocationSection = ({
|
|
|
50
47
|
mapTintMode = "theme",
|
|
51
48
|
mapTintColor,
|
|
52
49
|
mapTintOpacity = 0.2,
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
buttons = [],
|
|
51
|
+
styles
|
|
55
52
|
}) => {
|
|
56
53
|
const isTextRight = contentAlign === "right";
|
|
57
54
|
const isContentRight = contentPosition === "right";
|
|
@@ -60,9 +57,9 @@ const LocationSection = ({
|
|
|
60
57
|
return /* @__PURE__ */ jsx(
|
|
61
58
|
CompoundContainer,
|
|
62
59
|
{
|
|
63
|
-
padding,
|
|
64
|
-
sectionStyle,
|
|
65
|
-
backgroundColor,
|
|
60
|
+
padding: styles == null ? void 0 : styles.padding,
|
|
61
|
+
sectionStyle: styles == null ? void 0 : styles.sectionStyle,
|
|
62
|
+
backgroundColor: styles == null ? void 0 : styles.backgroundColor,
|
|
66
63
|
className: "relative overflow-hidden",
|
|
67
64
|
children: /* @__PURE__ */ jsxs(
|
|
68
65
|
"div",
|
|
@@ -91,17 +88,14 @@ const LocationSection = ({
|
|
|
91
88
|
children: description
|
|
92
89
|
}
|
|
93
90
|
) : null,
|
|
94
|
-
((
|
|
91
|
+
buttons.some((button) => button == null ? void 0 : button.label) && /* @__PURE__ */ jsx(
|
|
95
92
|
"div",
|
|
96
93
|
{
|
|
97
94
|
className: cn(
|
|
98
95
|
"grid grid-cols-1 gap-4 sm:flex sm:flex-row",
|
|
99
96
|
isTextRight ? "items-end sm:justify-end" : "items-start sm:justify-start"
|
|
100
97
|
),
|
|
101
|
-
children:
|
|
102
|
-
/* @__PURE__ */ jsx(LocationActionButton, { ...primaryButton }),
|
|
103
|
-
/* @__PURE__ */ jsx(LocationActionButton, { ...secondaryButton })
|
|
104
|
-
]
|
|
98
|
+
children: buttons.map((button, index) => /* @__PURE__ */ jsx(LocationActionButton, { ...button }, index))
|
|
105
99
|
}
|
|
106
100
|
)
|
|
107
101
|
]
|