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,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { contentFields } from "../../../puck-base/core/fields.js";
|
|
2
2
|
import { FullscreenHero } from "./fullscreen-hero.js";
|
|
3
|
+
import { backgroundImage, createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
|
|
3
4
|
const conf = {
|
|
4
5
|
fields: {
|
|
5
6
|
badge: contentFields.badge,
|
|
@@ -13,24 +14,21 @@ const conf = {
|
|
|
13
14
|
},
|
|
14
15
|
buttons: contentFields.buttons,
|
|
15
16
|
backgroundImage,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
padding
|
|
17
|
+
styles: createStylesField({
|
|
18
|
+
overlay: {
|
|
19
|
+
type: "select",
|
|
20
|
+
label: "Overlay",
|
|
21
|
+
options: [
|
|
22
|
+
{ label: "None", value: "none" },
|
|
23
|
+
{ label: "Dark", value: "dark" },
|
|
24
|
+
{ label: "Gradient", value: "gradient" }
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
})
|
|
28
28
|
},
|
|
29
29
|
defaultProps: {
|
|
30
30
|
heading: "Your bold headline here.",
|
|
31
31
|
description: "A compelling description that supports your headline and encourages visitors to take action.",
|
|
32
|
-
sectionStyle: "dark",
|
|
33
|
-
overlay: "dark",
|
|
34
32
|
buttons: [
|
|
35
33
|
{
|
|
36
34
|
label: "Get Started",
|
|
@@ -40,7 +38,10 @@ const conf = {
|
|
|
40
38
|
icon: "none"
|
|
41
39
|
}
|
|
42
40
|
],
|
|
43
|
-
|
|
41
|
+
styles: createStylesDefaults({
|
|
42
|
+
sectionStyle: "dark",
|
|
43
|
+
overlay: "dark"
|
|
44
|
+
})
|
|
44
45
|
},
|
|
45
46
|
render: FullscreenHero
|
|
46
47
|
};
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { CompoundContainerProps } from "@/components/puck-base/container";
|
|
2
2
|
import { CompoundContentProps } from "@/components/puck-base/content";
|
|
3
3
|
export interface GradientHeroProps extends CompoundContentProps {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
styles?: {
|
|
5
|
+
padding?: CompoundContainerProps["padding"];
|
|
6
|
+
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
7
|
+
backgroundColor?: string;
|
|
8
|
+
gradientFrom?: string;
|
|
9
|
+
gradientTo?: string;
|
|
10
|
+
};
|
|
7
11
|
}
|
|
8
|
-
export declare const GradientHero: ({
|
|
12
|
+
export declare const GradientHero: ({ badge, heading, description, buttons, styles, }: GradientHeroProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,38 +3,48 @@ import { CompoundContainer } from "../../../puck-base/container.js";
|
|
|
3
3
|
import { CompoundButton } from "../../../puck-base/button.js";
|
|
4
4
|
import { GradientText } from "../../../puck-base/gradient-text.js";
|
|
5
5
|
const GradientHero = ({
|
|
6
|
-
padding,
|
|
7
6
|
badge,
|
|
8
7
|
heading = "",
|
|
9
8
|
description,
|
|
10
9
|
buttons,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
/* @__PURE__ */ jsx(
|
|
16
|
-
|
|
10
|
+
styles
|
|
11
|
+
}) => {
|
|
12
|
+
const gradientFrom = (styles == null ? void 0 : styles.gradientFrom) ?? "var(--primary)";
|
|
13
|
+
const gradientTo = (styles == null ? void 0 : styles.gradientTo) ?? "var(--chart-2)";
|
|
14
|
+
return /* @__PURE__ */ jsx(
|
|
15
|
+
CompoundContainer,
|
|
17
16
|
{
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
padding: styles == null ? void 0 : styles.padding,
|
|
18
|
+
sectionStyle: (styles == null ? void 0 : styles.sectionStyle) ?? "dark",
|
|
19
|
+
backgroundColor: styles == null ? void 0 : styles.backgroundColor,
|
|
20
|
+
children: /* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-4xl text-center", children: [
|
|
21
|
+
badge && /* @__PURE__ */ jsx("span", { className: "bg-primary/10 text-primary mb-6 inline-block rounded-full px-3 py-1 text-xs font-medium", children: badge.label }),
|
|
22
|
+
/* @__PURE__ */ jsx(
|
|
23
|
+
GradientText,
|
|
24
|
+
{
|
|
25
|
+
text: heading,
|
|
26
|
+
as: "h1",
|
|
27
|
+
gradientFrom,
|
|
28
|
+
gradientTo,
|
|
29
|
+
className: "mb-6"
|
|
30
|
+
}
|
|
31
|
+
),
|
|
32
|
+
description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mx-auto mb-8 max-w-2xl text-lg md:text-xl", children: description }),
|
|
33
|
+
buttons && buttons.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex justify-center gap-4", children: buttons.map((btn, i) => /* @__PURE__ */ jsx(
|
|
34
|
+
CompoundButton,
|
|
35
|
+
{
|
|
36
|
+
label: btn.label,
|
|
37
|
+
url: btn.url,
|
|
38
|
+
variant: btn.variant,
|
|
39
|
+
size: btn.size,
|
|
40
|
+
icon: btn.icon
|
|
41
|
+
},
|
|
42
|
+
i
|
|
43
|
+
)) })
|
|
44
|
+
] })
|
|
23
45
|
}
|
|
24
|
-
)
|
|
25
|
-
|
|
26
|
-
buttons && buttons.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex justify-center gap-4", children: buttons.map((btn, i) => /* @__PURE__ */ jsx(
|
|
27
|
-
CompoundButton,
|
|
28
|
-
{
|
|
29
|
-
label: btn.label,
|
|
30
|
-
url: btn.url,
|
|
31
|
-
variant: btn.variant,
|
|
32
|
-
size: btn.size,
|
|
33
|
-
icon: btn.icon
|
|
34
|
-
},
|
|
35
|
-
i
|
|
36
|
-
)) })
|
|
37
|
-
] }) });
|
|
46
|
+
);
|
|
47
|
+
};
|
|
38
48
|
export {
|
|
39
49
|
GradientHero
|
|
40
50
|
};
|
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { contentFields } from "../../../puck-base/core/fields.js";
|
|
2
2
|
import { GradientHero } from "./gradient-hero.js";
|
|
3
|
+
import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
|
|
3
4
|
const conf = {
|
|
4
5
|
fields: {
|
|
5
6
|
...contentFields,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
styles: createStylesField({
|
|
8
|
+
gradientFrom: {
|
|
9
|
+
type: "text",
|
|
10
|
+
label: "Gradient Start",
|
|
11
|
+
ai: { instructions: "Use a CSS variable from the template theme, e.g. 'var(--primary)', 'var(--chart-1)'. Also accepts oklch format." }
|
|
12
|
+
},
|
|
13
|
+
gradientTo: {
|
|
14
|
+
type: "text",
|
|
15
|
+
label: "Gradient End",
|
|
16
|
+
ai: { instructions: "Use a CSS variable from the template theme, e.g. 'var(--chart-2)', 'var(--accent)'. Also accepts oklch format." }
|
|
17
|
+
}
|
|
18
|
+
})
|
|
17
19
|
},
|
|
18
20
|
defaultProps: {
|
|
19
21
|
heading: "Build something amazing",
|
|
@@ -22,9 +24,10 @@ const conf = {
|
|
|
22
24
|
buttons: [
|
|
23
25
|
{ label: "Get Started Free", icon: "move-right", variant: "default" }
|
|
24
26
|
],
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
styles: createStylesDefaults({
|
|
28
|
+
gradientFrom: "var(--primary)",
|
|
29
|
+
gradientTo: "var(--chart-2)"
|
|
30
|
+
})
|
|
28
31
|
},
|
|
29
32
|
render: GradientHero
|
|
30
33
|
};
|
|
@@ -8,9 +8,6 @@ export interface SidebarItem {
|
|
|
8
8
|
url?: string;
|
|
9
9
|
}
|
|
10
10
|
export interface GridHeroProps {
|
|
11
|
-
padding?: CompoundContainerProps["padding"];
|
|
12
|
-
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
13
|
-
backgroundColor?: string;
|
|
14
11
|
badge?: CompoundBadgeProps;
|
|
15
12
|
heading: string;
|
|
16
13
|
description?: string;
|
|
@@ -19,7 +16,11 @@ export interface GridHeroProps {
|
|
|
19
16
|
leftSidebar?: SidebarItem[];
|
|
20
17
|
rightSidebar?: SidebarItem[];
|
|
21
18
|
rightSidebarTitle?: string;
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
styles?: {
|
|
20
|
+
padding?: CompoundContainerProps["padding"];
|
|
21
|
+
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
22
|
+
backgroundColor?: string;
|
|
23
|
+
showGridLines?: boolean;
|
|
24
|
+
};
|
|
24
25
|
}
|
|
25
|
-
export declare const GridHero: ({
|
|
26
|
+
export declare const GridHero: ({ badge, heading, description, buttons, leftSidebarTitle, leftSidebar, rightSidebar, rightSidebarTitle, styles, }: GridHeroProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,9 +4,6 @@ import { CompoundContainer } from "../../../puck-base/container.js";
|
|
|
4
4
|
import { CompoundBadge } from "../../../puck-base/badge.js";
|
|
5
5
|
import { CompoundButton } from "../../../puck-base/button.js";
|
|
6
6
|
const GridHero = ({
|
|
7
|
-
padding,
|
|
8
|
-
sectionStyle,
|
|
9
|
-
backgroundColor,
|
|
10
7
|
badge,
|
|
11
8
|
heading,
|
|
12
9
|
description,
|
|
@@ -15,17 +12,17 @@ const GridHero = ({
|
|
|
15
12
|
leftSidebar = [],
|
|
16
13
|
rightSidebar = [],
|
|
17
14
|
rightSidebarTitle,
|
|
18
|
-
|
|
19
|
-
showGridLines = true
|
|
15
|
+
styles
|
|
20
16
|
}) => {
|
|
17
|
+
const showGridLines = (styles == null ? void 0 : styles.showGridLines) ?? true;
|
|
21
18
|
const hasLeftSidebar = leftSidebar.length > 0 || !!leftSidebarTitle;
|
|
22
|
-
const hasRightSidebar = rightSidebar.length > 0
|
|
19
|
+
const hasRightSidebar = rightSidebar.length > 0;
|
|
23
20
|
return /* @__PURE__ */ jsx(
|
|
24
21
|
CompoundContainer,
|
|
25
22
|
{
|
|
26
|
-
padding,
|
|
27
|
-
sectionStyle,
|
|
28
|
-
backgroundColor,
|
|
23
|
+
padding: styles == null ? void 0 : styles.padding,
|
|
24
|
+
sectionStyle: styles == null ? void 0 : styles.sectionStyle,
|
|
25
|
+
backgroundColor: styles == null ? void 0 : styles.backgroundColor,
|
|
29
26
|
children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
30
27
|
showGridLines && /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-0", "aria-hidden": true, children: /* @__PURE__ */ jsx("div", { className: "mx-auto flex h-full max-w-7xl justify-between px-4", children: [...Array(7)].map((_, i) => /* @__PURE__ */ jsx("div", { className: "h-full w-px bg-gray-200/60" }, i)) }) }),
|
|
31
28
|
/* @__PURE__ */ jsxs(
|
|
@@ -103,7 +100,7 @@ const GridHero = ({
|
|
|
103
100
|
] }) }, i)) }),
|
|
104
101
|
rightSidebarTitle && /* @__PURE__ */ jsxs("div", { className: "mt-6 border-t border-dotted border-gray-400 pt-4", children: [
|
|
105
102
|
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground font-mono text-[10px] font-medium tracking-wider", children: rightSidebarTitle }),
|
|
106
|
-
|
|
103
|
+
rightSidebar.length > 0 && /* @__PURE__ */ jsx("div", { className: "mt-2 flex flex-col gap-1", children: rightSidebar.map((item, i) => /* @__PURE__ */ jsxs(
|
|
107
104
|
"div",
|
|
108
105
|
{
|
|
109
106
|
className: "flex items-baseline justify-between gap-2",
|
|
@@ -1,17 +1,50 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { contentFields } from "../../../puck-base/core/fields.js";
|
|
2
2
|
import { GridHero } from "./grid-hero.js";
|
|
3
|
+
import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
|
|
3
4
|
const conf = {
|
|
4
5
|
fields: {
|
|
5
6
|
...contentFields,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
leftSidebarTitle: { type: "text", label: "Left Sidebar Title" },
|
|
8
|
+
leftSidebar: {
|
|
9
|
+
type: "array",
|
|
10
|
+
max: 5,
|
|
11
|
+
getItemSummary: (item, i = 0) => item.label || `Item ${i + 1}`,
|
|
12
|
+
arrayFields: {
|
|
13
|
+
label: { type: "text" },
|
|
14
|
+
value: { type: "text" },
|
|
15
|
+
description: { type: "text" },
|
|
16
|
+
url: { type: "text" }
|
|
17
|
+
},
|
|
18
|
+
defaultItemProps: {
|
|
19
|
+
label: "Label",
|
|
20
|
+
value: "Value"
|
|
21
|
+
}
|
|
13
22
|
},
|
|
14
|
-
|
|
23
|
+
rightSidebarTitle: { type: "text", label: "Right Sidebar Title" },
|
|
24
|
+
rightSidebar: {
|
|
25
|
+
type: "array",
|
|
26
|
+
max: 5,
|
|
27
|
+
getItemSummary: (item, i = 0) => item.label || `Item ${i + 1}`,
|
|
28
|
+
arrayFields: {
|
|
29
|
+
label: { type: "text" },
|
|
30
|
+
value: { type: "text" },
|
|
31
|
+
url: { type: "text" }
|
|
32
|
+
},
|
|
33
|
+
defaultItemProps: {
|
|
34
|
+
label: "Link",
|
|
35
|
+
url: "#"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
styles: createStylesField({
|
|
39
|
+
showGridLines: {
|
|
40
|
+
type: "radio",
|
|
41
|
+
label: "Show Grid Lines",
|
|
42
|
+
options: [
|
|
43
|
+
{ label: "Yes", value: true },
|
|
44
|
+
{ label: "No", value: false }
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
})
|
|
15
48
|
},
|
|
16
49
|
defaultProps: {
|
|
17
50
|
heading: "Scale without lock-in. Build without limits.",
|
|
@@ -29,8 +62,7 @@ const conf = {
|
|
|
29
62
|
{ label: "Open Source", value: "22.6k", url: "#" },
|
|
30
63
|
{ label: "Docs", url: "#" }
|
|
31
64
|
],
|
|
32
|
-
showGridLines: true
|
|
33
|
-
padding: paddingDefaults
|
|
65
|
+
styles: createStylesDefaults({ showGridLines: true })
|
|
34
66
|
},
|
|
35
67
|
render: GridHero
|
|
36
68
|
};
|
|
@@ -3,9 +3,6 @@ import { CompoundBadgeProps } from "@/components/puck-base/badge";
|
|
|
3
3
|
import { CompoundButtonProps } from "@/components/puck-base/button";
|
|
4
4
|
import { CompoundImageProps } from "@/components/puck-base/image";
|
|
5
5
|
export interface HeroProps {
|
|
6
|
-
padding?: CompoundContainerProps["padding"];
|
|
7
|
-
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
8
|
-
backgroundColor?: string;
|
|
9
6
|
badge?: CompoundBadgeProps;
|
|
10
7
|
heading: string;
|
|
11
8
|
adjectives?: {
|
|
@@ -17,5 +14,10 @@ export interface HeroProps {
|
|
|
17
14
|
imageLayout: "1x1" | "1x1-9x16-1x1" | "16x9";
|
|
18
15
|
align?: "left" | "center";
|
|
19
16
|
displaySize?: "default" | "display";
|
|
17
|
+
styles?: {
|
|
18
|
+
padding?: CompoundContainerProps["padding"];
|
|
19
|
+
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
20
|
+
backgroundColor?: string;
|
|
21
|
+
};
|
|
20
22
|
}
|
|
21
|
-
export declare const Hero: ({
|
|
23
|
+
export declare const Hero: ({ badge, heading, adjectives, description, buttons, images, imageLayout, align, displaySize, styles, }: HeroProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -9,9 +9,6 @@ import { CompoundButton } from "../../../puck-base/button.js";
|
|
|
9
9
|
import { CompoundImage } from "../../../puck-base/image.js";
|
|
10
10
|
import { motion } from "framer-motion";
|
|
11
11
|
const Hero = ({
|
|
12
|
-
padding,
|
|
13
|
-
sectionStyle,
|
|
14
|
-
backgroundColor,
|
|
15
12
|
badge,
|
|
16
13
|
heading,
|
|
17
14
|
adjectives,
|
|
@@ -20,7 +17,8 @@ const Hero = ({
|
|
|
20
17
|
images,
|
|
21
18
|
imageLayout,
|
|
22
19
|
align = "center",
|
|
23
|
-
displaySize = "default"
|
|
20
|
+
displaySize = "default",
|
|
21
|
+
styles
|
|
24
22
|
}) => {
|
|
25
23
|
const hasImages = Array.isArray(images) && images.length > 0;
|
|
26
24
|
const isTwoColumnLayout = imageLayout === "1x1" || imageLayout === "1x1-9x16-1x1";
|
|
@@ -28,9 +26,9 @@ const Hero = ({
|
|
|
28
26
|
return /* @__PURE__ */ jsx(
|
|
29
27
|
CompoundContainer,
|
|
30
28
|
{
|
|
31
|
-
padding,
|
|
32
|
-
sectionStyle,
|
|
33
|
-
backgroundColor,
|
|
29
|
+
padding: styles == null ? void 0 : styles.padding,
|
|
30
|
+
sectionStyle: styles == null ? void 0 : styles.sectionStyle,
|
|
31
|
+
backgroundColor: styles == null ? void 0 : styles.backgroundColor,
|
|
34
32
|
children: /* @__PURE__ */ jsxs(
|
|
35
33
|
"div",
|
|
36
34
|
{
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { image1x1Placeholder, image9x16Placeholder, images, buttons, badge } from "../../../puck-base/core/fields.js";
|
|
2
2
|
import { Hero } from "./hero.js";
|
|
3
3
|
import { getRandomAdjective } from "../../../puck-base/core/utils.js";
|
|
4
|
+
import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
|
|
4
5
|
const conf = {
|
|
5
6
|
fields: {
|
|
6
7
|
displaySize: {
|
|
@@ -27,7 +28,6 @@ const conf = {
|
|
|
27
28
|
badge,
|
|
28
29
|
buttons,
|
|
29
30
|
imageLayout: {
|
|
30
|
-
// TODO: puck should format labels automatically so I don't have to define this
|
|
31
31
|
label: "image layout",
|
|
32
32
|
type: "select",
|
|
33
33
|
options: [
|
|
@@ -40,7 +40,7 @@ const conf = {
|
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
images: { ...images, max: 3 },
|
|
43
|
-
|
|
43
|
+
styles: createStylesField()
|
|
44
44
|
},
|
|
45
45
|
defaultProps: {
|
|
46
46
|
displaySize: "default",
|
|
@@ -66,7 +66,7 @@ const conf = {
|
|
|
66
66
|
],
|
|
67
67
|
imageLayout: "1x1-9x16-1x1",
|
|
68
68
|
images: [image1x1Placeholder, image9x16Placeholder, image1x1Placeholder],
|
|
69
|
-
|
|
69
|
+
styles: createStylesDefaults()
|
|
70
70
|
},
|
|
71
71
|
render: Hero
|
|
72
72
|
};
|
|
@@ -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 ImageHeroProps {
|
|
5
|
-
padding?: CompoundContainerProps["padding"];
|
|
6
|
-
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
7
|
-
backgroundColor?: string;
|
|
8
5
|
heading?: string;
|
|
9
6
|
description?: string;
|
|
10
7
|
badge?: CompoundBadgeProps;
|
|
@@ -13,8 +10,14 @@ export interface ImageHeroProps {
|
|
|
13
10
|
src: string;
|
|
14
11
|
alt?: string;
|
|
15
12
|
} | string;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
styles?: {
|
|
14
|
+
padding?: CompoundContainerProps["padding"];
|
|
15
|
+
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
16
|
+
backgroundColor?: string;
|
|
17
|
+
backgroundImage?: string;
|
|
18
|
+
overlay?: "none" | "dark" | "gradient";
|
|
19
|
+
align?: "left" | "center";
|
|
20
|
+
minHeight?: "medium" | "large" | "full";
|
|
21
|
+
};
|
|
19
22
|
}
|
|
20
|
-
export declare const ImageHero: ({
|
|
23
|
+
export declare const ImageHero: ({ heading, description, badge, buttons, backgroundImage, styles, }: ImageHeroProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -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
|
+
url: button.url,
|
|
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
|