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,10 +1,12 @@
|
|
|
1
1
|
import { CompoundContainerProps } from "@/components/puck-base/container";
|
|
2
2
|
import { CompoundContentProps } from "@/components/puck-base/content";
|
|
3
3
|
export interface CtaProps extends CompoundContentProps {
|
|
4
|
-
padding?: CompoundContainerProps["padding"];
|
|
5
|
-
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
6
|
-
backgroundColor?: string;
|
|
7
4
|
layout?: "contained" | "full-bleed";
|
|
8
5
|
displayText?: string;
|
|
6
|
+
styles?: {
|
|
7
|
+
padding?: CompoundContainerProps["padding"];
|
|
8
|
+
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
9
|
+
backgroundColor?: string;
|
|
10
|
+
};
|
|
9
11
|
}
|
|
10
|
-
export declare const Cta: ({
|
|
12
|
+
export declare const Cta: ({ layout, badge, heading, description, buttons, displayText, styles, }: CtaProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,21 +3,19 @@ import { cn } from "../../../../utils/css-utils.js";
|
|
|
3
3
|
import { CompoundContainer } from "../../../puck-base/container.js";
|
|
4
4
|
import { CompoundContent } from "../../../puck-base/content.js";
|
|
5
5
|
const Cta = ({
|
|
6
|
-
padding,
|
|
7
|
-
sectionStyle,
|
|
8
|
-
backgroundColor,
|
|
9
6
|
layout,
|
|
10
7
|
badge,
|
|
11
8
|
heading,
|
|
12
9
|
description,
|
|
13
10
|
buttons,
|
|
14
|
-
displayText
|
|
11
|
+
displayText,
|
|
12
|
+
styles
|
|
15
13
|
}) => /* @__PURE__ */ jsxs(
|
|
16
14
|
CompoundContainer,
|
|
17
15
|
{
|
|
18
|
-
padding,
|
|
19
|
-
sectionStyle,
|
|
20
|
-
backgroundColor,
|
|
16
|
+
padding: styles == null ? void 0 : styles.padding,
|
|
17
|
+
sectionStyle: styles == null ? void 0 : styles.sectionStyle,
|
|
18
|
+
backgroundColor: styles == null ? void 0 : styles.backgroundColor,
|
|
21
19
|
className: cn({ "bg-muted": layout === "full-bleed" }),
|
|
22
20
|
children: [
|
|
23
21
|
/* @__PURE__ */ jsx(
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { contentFields } from "../../../puck-base/core/fields.js";
|
|
2
2
|
import { Cta } from "./cta.js";
|
|
3
|
+
import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
|
|
3
4
|
const conf = {
|
|
4
5
|
fields: {
|
|
5
6
|
...contentFields,
|
|
@@ -7,16 +8,11 @@ const conf = {
|
|
|
7
8
|
layout: {
|
|
8
9
|
type: "radio",
|
|
9
10
|
options: [
|
|
10
|
-
{
|
|
11
|
-
label: "contained",
|
|
12
|
-
value: "contained"
|
|
13
|
-
},
|
|
11
|
+
{ label: "contained", value: "contained" },
|
|
14
12
|
{ label: "full bleed", value: "full-bleed" }
|
|
15
13
|
]
|
|
16
14
|
},
|
|
17
|
-
|
|
18
|
-
sectionStyle,
|
|
19
|
-
backgroundColor
|
|
15
|
+
styles: createStylesField()
|
|
20
16
|
},
|
|
21
17
|
defaultProps: {
|
|
22
18
|
heading: "Try our platform today!",
|
|
@@ -39,7 +35,7 @@ const conf = {
|
|
|
39
35
|
}
|
|
40
36
|
],
|
|
41
37
|
layout: "contained",
|
|
42
|
-
|
|
38
|
+
styles: createStylesDefaults()
|
|
43
39
|
},
|
|
44
40
|
render: Cta
|
|
45
41
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { CompoundContainerProps } from "@/components/puck-base/container";
|
|
2
2
|
import { CompoundContentProps } from "@/components/puck-base/content";
|
|
3
3
|
export interface GradientCtaProps extends CompoundContentProps {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
styles?: {
|
|
5
|
+
padding?: CompoundContainerProps["padding"];
|
|
6
|
+
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
7
|
+
backgroundColor?: string;
|
|
8
|
+
gradientFrom?: string;
|
|
9
|
+
gradientTo?: string;
|
|
10
|
+
backgroundCSS?: string;
|
|
11
|
+
textColor?: string;
|
|
12
|
+
};
|
|
13
13
|
}
|
|
14
|
-
export declare const GradientCta: ({
|
|
14
|
+
export declare const GradientCta: ({ badge, heading, description, buttons, styles, }: GradientCtaProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,37 +2,41 @@ import { jsx } 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 GradientCta = ({
|
|
5
|
-
padding,
|
|
6
|
-
sectionStyle,
|
|
7
|
-
backgroundColor,
|
|
8
5
|
badge,
|
|
9
6
|
heading,
|
|
10
7
|
description,
|
|
11
8
|
buttons,
|
|
12
|
-
|
|
13
|
-
gradientTo = "var(--chart-2)",
|
|
14
|
-
backgroundCSS,
|
|
15
|
-
textColor
|
|
9
|
+
styles
|
|
16
10
|
}) => {
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
11
|
+
const gradientFrom = (styles == null ? void 0 : styles.gradientFrom) ?? "var(--primary)";
|
|
12
|
+
const gradientTo = (styles == null ? void 0 : styles.gradientTo) ?? "var(--chart-2)";
|
|
13
|
+
const bg = (styles == null ? void 0 : styles.backgroundCSS) || `linear-gradient(135deg, ${gradientFrom}, ${gradientTo})`;
|
|
14
|
+
const color = (styles == null ? void 0 : styles.textColor) || ((styles == null ? void 0 : styles.backgroundCSS) ? void 0 : "var(--primary-foreground)");
|
|
15
|
+
return /* @__PURE__ */ jsx(
|
|
16
|
+
CompoundContainer,
|
|
21
17
|
{
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
padding: styles == null ? void 0 : styles.padding,
|
|
19
|
+
sectionStyle: styles == null ? void 0 : styles.sectionStyle,
|
|
20
|
+
backgroundColor: styles == null ? void 0 : styles.backgroundColor,
|
|
24
21
|
children: /* @__PURE__ */ jsx(
|
|
25
|
-
|
|
22
|
+
"div",
|
|
26
23
|
{
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
className: "rounded-2xl p-8 text-center md:p-14",
|
|
25
|
+
style: { background: bg, color },
|
|
26
|
+
children: /* @__PURE__ */ jsx(
|
|
27
|
+
CompoundContent,
|
|
28
|
+
{
|
|
29
|
+
badge,
|
|
30
|
+
heading,
|
|
31
|
+
description,
|
|
32
|
+
buttons,
|
|
33
|
+
alignContent: "center"
|
|
34
|
+
}
|
|
35
|
+
)
|
|
32
36
|
}
|
|
33
37
|
)
|
|
34
38
|
}
|
|
35
|
-
)
|
|
39
|
+
);
|
|
36
40
|
};
|
|
37
41
|
export {
|
|
38
42
|
GradientCta
|
|
@@ -1,33 +1,38 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { contentFields } from "../../../puck-base/core/fields.js";
|
|
2
2
|
import { GradientCta } from "./gradient-cta.js";
|
|
3
|
+
import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
|
|
4
|
+
const gradientCtaStylesField = createStylesField({
|
|
5
|
+
gradientFrom: {
|
|
6
|
+
type: "text",
|
|
7
|
+
label: "Gradient Start",
|
|
8
|
+
ai: {
|
|
9
|
+
instructions: "Use a CSS variable from the template theme, e.g. 'var(--primary)', 'var(--chart-1)'. Also accepts oklch format."
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
gradientTo: {
|
|
13
|
+
type: "text",
|
|
14
|
+
label: "Gradient End",
|
|
15
|
+
ai: {
|
|
16
|
+
instructions: "Use a CSS variable from the template theme, e.g. 'var(--chart-2)', 'var(--accent)'. Also accepts oklch format."
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
backgroundCSS: {
|
|
20
|
+
type: "textarea",
|
|
21
|
+
label: "Full CSS Background",
|
|
22
|
+
ai: {
|
|
23
|
+
instructions: "Full CSS background value (radial-gradient, multi-layer). Overrides gradientFrom/To."
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
textColor: {
|
|
27
|
+
type: "text",
|
|
28
|
+
label: "Text Color",
|
|
29
|
+
ai: { instructions: "Override text color, e.g. #333 or white" }
|
|
30
|
+
}
|
|
31
|
+
});
|
|
3
32
|
const conf = {
|
|
4
33
|
fields: {
|
|
5
34
|
...contentFields,
|
|
6
|
-
|
|
7
|
-
type: "text",
|
|
8
|
-
label: "Gradient Start",
|
|
9
|
-
ai: { instructions: "Use a CSS variable from the template theme, e.g. 'var(--primary)', 'var(--chart-1)'. Also accepts oklch format." }
|
|
10
|
-
},
|
|
11
|
-
gradientTo: {
|
|
12
|
-
type: "text",
|
|
13
|
-
label: "Gradient End",
|
|
14
|
-
ai: { instructions: "Use a CSS variable from the template theme, e.g. 'var(--chart-2)', 'var(--accent)'. Also accepts oklch format." }
|
|
15
|
-
},
|
|
16
|
-
backgroundCSS: {
|
|
17
|
-
type: "textarea",
|
|
18
|
-
label: "Full CSS Background",
|
|
19
|
-
ai: {
|
|
20
|
-
instructions: "Full CSS background value (radial-gradient, multi-layer). Overrides gradientFrom/To."
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
textColor: {
|
|
24
|
-
type: "text",
|
|
25
|
-
label: "Text Color",
|
|
26
|
-
ai: { instructions: "Override text color, e.g. #333 or white" }
|
|
27
|
-
},
|
|
28
|
-
padding,
|
|
29
|
-
sectionStyle,
|
|
30
|
-
backgroundColor
|
|
35
|
+
styles: gradientCtaStylesField
|
|
31
36
|
},
|
|
32
37
|
defaultProps: {
|
|
33
38
|
heading: "Ready to get started?",
|
|
@@ -35,9 +40,11 @@ const conf = {
|
|
|
35
40
|
buttons: [
|
|
36
41
|
{ label: "Start Free Trial", icon: "move-right", variant: "default" }
|
|
37
42
|
],
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
43
|
+
styles: {
|
|
44
|
+
...createStylesDefaults(),
|
|
45
|
+
gradientFrom: "var(--primary)",
|
|
46
|
+
gradientTo: "var(--chart-2)"
|
|
47
|
+
}
|
|
41
48
|
},
|
|
42
49
|
render: GradientCta
|
|
43
50
|
};
|
|
@@ -1,19 +1,27 @@
|
|
|
1
|
-
import { paddingDefaults, padding } from "../../../puck-base/core/fields.js";
|
|
2
1
|
import { NewsletterSignup } from "./newsletter-signup.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 },
|
|
6
6
|
description: { type: "textarea", contentEditable: true },
|
|
7
|
-
|
|
7
|
+
buttons: {
|
|
8
|
+
type: "array",
|
|
9
|
+
max: 1,
|
|
10
|
+
getItemSummary: (item, i = 0) => item.label || `Button ${i + 1}`,
|
|
11
|
+
arrayFields: {
|
|
12
|
+
label: { type: "text" }
|
|
13
|
+
},
|
|
14
|
+
defaultItemProps: { label: "Subscribe" }
|
|
15
|
+
},
|
|
8
16
|
placeholder: { type: "text" },
|
|
9
|
-
|
|
17
|
+
styles: createStylesField()
|
|
10
18
|
},
|
|
11
19
|
defaultProps: {
|
|
12
20
|
heading: "Stay in the loop",
|
|
13
21
|
description: "Get the latest updates delivered to your inbox.",
|
|
14
|
-
|
|
22
|
+
buttons: [{ label: "Subscribe" }],
|
|
15
23
|
placeholder: "Enter your email",
|
|
16
|
-
|
|
24
|
+
styles: createStylesDefaults()
|
|
17
25
|
},
|
|
18
26
|
render: NewsletterSignup
|
|
19
27
|
};
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { CompoundContainerProps } from "@/components/puck-base/container";
|
|
2
2
|
export interface NewsletterSignupProps {
|
|
3
|
-
padding?: CompoundContainerProps["padding"];
|
|
4
3
|
heading?: string;
|
|
5
4
|
description?: string;
|
|
6
|
-
|
|
5
|
+
buttons?: Array<{
|
|
6
|
+
label: string;
|
|
7
|
+
}>;
|
|
7
8
|
placeholder?: string;
|
|
9
|
+
styles?: {
|
|
10
|
+
padding?: CompoundContainerProps["padding"];
|
|
11
|
+
};
|
|
8
12
|
}
|
|
9
|
-
export declare const NewsletterSignup: ({
|
|
13
|
+
export declare const NewsletterSignup: ({ heading, description, buttons, placeholder, styles, }: NewsletterSignupProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,40 +2,43 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { CompoundContainer } from "../../../puck-base/container.js";
|
|
3
3
|
import { CompoundButton } from "../../../puck-base/button.js";
|
|
4
4
|
const NewsletterSignup = ({
|
|
5
|
-
padding,
|
|
6
5
|
heading,
|
|
7
6
|
description,
|
|
8
|
-
|
|
9
|
-
placeholder = "Enter your email"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
/* @__PURE__ */ jsxs(
|
|
14
|
-
"
|
|
15
|
-
{
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
]
|
|
7
|
+
buttons = [],
|
|
8
|
+
placeholder = "Enter your email",
|
|
9
|
+
styles
|
|
10
|
+
}) => {
|
|
11
|
+
var _a;
|
|
12
|
+
return /* @__PURE__ */ jsx(CompoundContainer, { padding: styles == null ? void 0 : styles.padding, sectionStyle: "muted", children: /* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-xl text-center", children: [
|
|
13
|
+
heading && /* @__PURE__ */ jsx("h2", { className: "text-foreground font-serif mb-2 text-2xl font-bold tracking-tight md:text-3xl", children: heading }),
|
|
14
|
+
description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mb-6", children: description }),
|
|
15
|
+
/* @__PURE__ */ jsxs(
|
|
16
|
+
"form",
|
|
17
|
+
{
|
|
18
|
+
className: "mx-auto flex max-w-md gap-2",
|
|
19
|
+
onSubmit: (e) => e.preventDefault(),
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ jsx(
|
|
22
|
+
"input",
|
|
23
|
+
{
|
|
24
|
+
type: "email",
|
|
25
|
+
placeholder,
|
|
26
|
+
className: "border-border bg-background text-foreground placeholder:text-muted-foreground focus:ring-primary flex-1 rounded-lg border px-4 py-2.5 focus:ring-2 focus:outline-none"
|
|
27
|
+
}
|
|
28
|
+
),
|
|
29
|
+
/* @__PURE__ */ jsx(
|
|
30
|
+
CompoundButton,
|
|
31
|
+
{
|
|
32
|
+
label: ((_a = buttons[0]) == null ? void 0 : _a.label) ?? "Subscribe",
|
|
33
|
+
variant: "default",
|
|
34
|
+
type: "submit"
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
] }) });
|
|
41
|
+
};
|
|
39
42
|
export {
|
|
40
43
|
NewsletterSignup
|
|
41
44
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { buttons, badge, image } from "../../../puck-base/core/fields.js";
|
|
2
2
|
import { PromoSection } from "./promo-section.js";
|
|
3
|
+
import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
|
|
3
4
|
const conf = {
|
|
4
5
|
fields: {
|
|
5
6
|
heading: { type: "text", contentEditable: true },
|
|
@@ -16,9 +17,7 @@ const conf = {
|
|
|
16
17
|
},
|
|
17
18
|
badge,
|
|
18
19
|
buttons,
|
|
19
|
-
|
|
20
|
-
sectionStyle,
|
|
21
|
-
backgroundColor
|
|
20
|
+
styles: createStylesField()
|
|
22
21
|
},
|
|
23
22
|
defaultProps: {
|
|
24
23
|
heading: "Summer Sale — Up to 50% Off",
|
|
@@ -37,7 +36,7 @@ const conf = {
|
|
|
37
36
|
icon: "none"
|
|
38
37
|
}
|
|
39
38
|
],
|
|
40
|
-
|
|
39
|
+
styles: createStylesDefaults()
|
|
41
40
|
},
|
|
42
41
|
render: PromoSection
|
|
43
42
|
};
|
|
@@ -2,9 +2,6 @@ import { CompoundContainerProps } from "@/components/puck-base/container";
|
|
|
2
2
|
import { CompoundBadgeProps } from "@/components/puck-base/badge";
|
|
3
3
|
import { CompoundButtonProps } from "@/components/puck-base/button";
|
|
4
4
|
export interface PromoSectionProps {
|
|
5
|
-
padding?: CompoundContainerProps["padding"];
|
|
6
|
-
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
7
|
-
backgroundColor?: string;
|
|
8
5
|
heading: string;
|
|
9
6
|
description?: string;
|
|
10
7
|
image?: {
|
|
@@ -14,5 +11,10 @@ export interface PromoSectionProps {
|
|
|
14
11
|
imagePosition?: "left" | "right" | "background";
|
|
15
12
|
buttons?: CompoundButtonProps[];
|
|
16
13
|
badge?: CompoundBadgeProps;
|
|
14
|
+
styles?: {
|
|
15
|
+
padding?: CompoundContainerProps["padding"];
|
|
16
|
+
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
17
|
+
backgroundColor?: string;
|
|
18
|
+
};
|
|
17
19
|
}
|
|
18
|
-
export declare const PromoSection: ({
|
|
20
|
+
export declare const PromoSection: ({ heading, description, image, imagePosition, buttons, badge, styles, }: PromoSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,98 +5,112 @@ import { CompoundButton } from "../../../puck-base/button.js";
|
|
|
5
5
|
import { CompoundImage } from "../../../puck-base/image.js";
|
|
6
6
|
import { cn } from "../../../../utils/css-utils.js";
|
|
7
7
|
const PromoSection = ({
|
|
8
|
-
padding,
|
|
9
|
-
sectionStyle,
|
|
10
|
-
backgroundColor,
|
|
11
8
|
heading,
|
|
12
9
|
description,
|
|
13
10
|
image,
|
|
14
11
|
imagePosition = "right",
|
|
15
12
|
buttons,
|
|
16
|
-
badge
|
|
13
|
+
badge,
|
|
14
|
+
styles
|
|
17
15
|
}) => {
|
|
18
16
|
if (imagePosition === "background") {
|
|
19
|
-
return /* @__PURE__ */ jsx(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
/* @__PURE__ */ jsx("div", { className: "bg-foreground/50 absolute inset-0" }),
|
|
29
|
-
/* @__PURE__ */ jsxs("div", { className: "relative z-10 flex max-w-xl flex-col gap-6 p-8 md:p-16", children: [
|
|
30
|
-
badge && /* @__PURE__ */ jsx(
|
|
31
|
-
CompoundBadge,
|
|
32
|
-
{
|
|
33
|
-
label: badge.label,
|
|
34
|
-
variant: badge.variant,
|
|
35
|
-
url: badge.url
|
|
36
|
-
}
|
|
37
|
-
),
|
|
38
|
-
/* @__PURE__ */ jsx("h2", { className: "text-background text-3xl font-bold tracking-tight md:text-5xl", children: heading }),
|
|
39
|
-
description && /* @__PURE__ */ jsx("p", { className: "text-background/80 text-lg", children: description }),
|
|
40
|
-
Array.isArray(buttons) && buttons.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-4", children: buttons.map(
|
|
41
|
-
(button, index) => button.label ? /* @__PURE__ */ jsx(
|
|
42
|
-
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,
|
|
43
26
|
{
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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
|
+
);
|
|
55
61
|
}
|
|
56
|
-
return /* @__PURE__ */ jsx(
|
|
57
|
-
|
|
62
|
+
return /* @__PURE__ */ jsx(
|
|
63
|
+
CompoundContainer,
|
|
58
64
|
{
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
label: badge.label,
|
|
69
|
-
variant: badge.variant,
|
|
70
|
-
url: badge.url
|
|
71
|
-
}
|
|
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"
|
|
72
74
|
),
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
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,
|
|
78
103
|
{
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
) })
|
|
88
|
-
] }),
|
|
89
|
-
/* @__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(
|
|
90
|
-
CompoundImage,
|
|
91
|
-
{
|
|
92
|
-
src: image.src,
|
|
93
|
-
alt: image.alt ?? "",
|
|
94
|
-
className: "h-full w-full object-cover"
|
|
95
|
-
}
|
|
96
|
-
) })
|
|
97
|
-
]
|
|
104
|
+
src: image.src,
|
|
105
|
+
alt: image.alt ?? "",
|
|
106
|
+
className: "h-full w-full object-cover"
|
|
107
|
+
}
|
|
108
|
+
) })
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
)
|
|
98
112
|
}
|
|
99
|
-
)
|
|
113
|
+
);
|
|
100
114
|
};
|
|
101
115
|
export {
|
|
102
116
|
PromoSection
|