dune-react 0.0.8 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/puck-base/article-card.js +1 -1
- package/dist/components/puck-base/button.js +2 -1
- package/dist/components/puck-base/container.d.ts +7 -1
- package/dist/components/puck-base/container.js +2 -1
- package/dist/components/puck-base/content.d.ts +1 -4
- package/dist/components/puck-base/content.js +15 -17
- package/dist/components/puck-base/core/fields.d.ts +1 -127
- package/dist/components/puck-base/core/fields.js +1 -76
- package/dist/components/puck-base/core/styles.d.ts +1877 -0
- package/dist/components/puck-base/core/styles.js +286 -0
- package/dist/components/puck-base/core/types.d.ts +2 -2
- package/dist/components/puck-base/core/with-editable.d.ts +4 -1
- package/dist/components/puck-base/core/with-editable.js +51 -27
- package/dist/components/puck-base/editor-context.d.ts +8 -0
- package/dist/components/puck-base/fields/auto-field.d.ts +1 -0
- package/dist/components/puck-base/fields/auto-field.js +131 -49
- package/dist/components/puck-base/gradient-text.js +12 -3
- package/dist/components/puck-block/banner-sections/announcement-banner-1/announcement-banner.d.ts +9 -7
- package/dist/components/puck-block/banner-sections/announcement-banner-1/announcement-banner.js +11 -8
- package/dist/components/puck-block/banner-sections/announcement-banner-1/index.js +19 -37
- package/dist/components/puck-block/banner-sections/marquee-1/index.js +26 -24
- package/dist/components/puck-block/banner-sections/marquee-1/marquee.d.ts +9 -9
- package/dist/components/puck-block/banner-sections/marquee-1/marquee.js +28 -21
- package/dist/components/puck-block/banner-sections/props.d.ts +22 -0
- package/dist/components/puck-block/contact-sections/api/form-leads.d.ts +16 -0
- package/dist/components/puck-block/contact-sections/api/form-leads.js +25 -0
- package/dist/components/puck-block/contact-sections/contact-us-1/contact-us.d.ts +13 -4
- package/dist/components/puck-block/contact-sections/contact-us-1/contact-us.js +122 -121
- package/dist/components/puck-block/contact-sections/contact-us-1/index.js +87 -7
- package/dist/components/puck-block/contact-sections/contact-us-2/contact-us-2.d.ts +30 -0
- package/dist/components/puck-block/contact-sections/contact-us-2/contact-us-2.js +234 -0
- package/dist/components/puck-block/contact-sections/contact-us-2/index.d.ts +5 -0
- package/dist/components/puck-block/contact-sections/contact-us-2/index.js +74 -0
- package/dist/components/puck-block/contact-sections/contact-us-3/contact-us-3.d.ts +32 -0
- package/dist/components/puck-block/contact-sections/contact-us-3/contact-us-3.js +250 -0
- package/dist/components/puck-block/contact-sections/contact-us-3/index.d.ts +5 -0
- package/dist/components/puck-block/contact-sections/contact-us-3/index.js +114 -0
- package/dist/components/puck-block/contact-sections/props.d.ts +65 -0
- package/dist/components/puck-block/cta-sections/banner-cta-1/banner-cta.d.ts +12 -9
- package/dist/components/puck-block/cta-sections/banner-cta-1/banner-cta.js +28 -30
- package/dist/components/puck-block/cta-sections/banner-cta-1/index.js +23 -25
- package/dist/components/puck-block/cta-sections/cta-1/cta.d.ts +6 -4
- package/dist/components/puck-block/cta-sections/cta-1/cta.js +5 -7
- package/dist/components/puck-block/cta-sections/cta-1/index.js +5 -9
- package/dist/components/puck-block/cta-sections/gradient-cta-1/gradient-cta.d.ts +10 -10
- package/dist/components/puck-block/cta-sections/gradient-cta-1/gradient-cta.js +24 -20
- package/dist/components/puck-block/cta-sections/gradient-cta-1/index.js +36 -29
- package/dist/components/puck-block/cta-sections/newsletter-signup-1/index.js +13 -5
- package/dist/components/puck-block/cta-sections/newsletter-signup-1/newsletter-signup.d.ts +7 -3
- package/dist/components/puck-block/cta-sections/newsletter-signup-1/newsletter-signup.js +36 -32
- package/dist/components/puck-block/cta-sections/promo-section-1/index.js +4 -5
- package/dist/components/puck-block/cta-sections/promo-section-1/promo-section.d.ts +6 -4
- package/dist/components/puck-block/cta-sections/promo-section-1/promo-section.js +94 -79
- package/dist/components/puck-block/cta-sections/props.d.ts +47 -0
- package/dist/components/puck-block/faq-sections/accordion-1/accordion.d.ts +6 -4
- package/dist/components/puck-block/faq-sections/accordion-1/accordion.js +39 -33
- package/dist/components/puck-block/faq-sections/accordion-1/index.js +3 -5
- package/dist/components/puck-block/faq-sections/faq-1/faq.d.ts +9 -7
- package/dist/components/puck-block/faq-sections/faq-1/faq.js +50 -44
- package/dist/components/puck-block/faq-sections/faq-1/index.js +12 -14
- package/dist/components/puck-block/faq-sections/faq-2/faq-2.d.ts +18 -0
- package/dist/components/puck-block/faq-sections/faq-2/faq-2.js +54 -0
- package/dist/components/puck-block/faq-sections/faq-2/index.d.ts +5 -0
- package/dist/components/puck-block/faq-sections/faq-2/index.js +61 -0
- package/dist/components/puck-block/faq-sections/props.d.ts +30 -0
- package/dist/components/puck-block/feature-sections/bento-1/bento.d.ts +6 -4
- package/dist/components/puck-block/feature-sections/bento-1/bento.js +2 -4
- package/dist/components/puck-block/feature-sections/bento-1/index.js +4 -5
- package/dist/components/puck-block/feature-sections/feature-cards-1/feature-cards.d.ts +8 -7
- package/dist/components/puck-block/feature-sections/feature-cards-1/feature-cards.js +15 -7
- package/dist/components/puck-block/feature-sections/feature-cards-1/index.js +37 -18
- package/dist/components/puck-block/feature-sections/feature-showcase-1/feature-showcase.d.ts +6 -4
- package/dist/components/puck-block/feature-sections/feature-showcase-1/feature-showcase.js +4 -12
- package/dist/components/puck-block/feature-sections/feature-showcase-1/index.js +4 -5
- package/dist/components/puck-block/feature-sections/icon-grid-1/icon-grid.d.ts +6 -4
- package/dist/components/puck-block/feature-sections/icon-grid-1/icon-grid.js +59 -53
- package/dist/components/puck-block/feature-sections/icon-grid-1/index.js +7 -8
- package/dist/components/puck-block/feature-sections/product-features-1/index.js +4 -5
- package/dist/components/puck-block/feature-sections/product-features-1/product-features.d.ts +6 -4
- package/dist/components/puck-block/feature-sections/product-features-1/product-features.js +7 -29
- package/dist/components/puck-block/feature-sections/props.d.ts +48 -0
- package/dist/components/puck-block/footer-sections/footer-1/footer.d.ts +5 -3
- package/dist/components/puck-block/footer-sections/footer-1/footer.js +6 -6
- package/dist/components/puck-block/footer-sections/footer-1/index.js +3 -5
- package/dist/components/puck-block/footer-sections/props.d.ts +31 -0
- package/dist/components/puck-block/gallery-sections/gallery-1/gallery.d.ts +9 -7
- package/dist/components/puck-block/gallery-sections/gallery-1/gallery.js +49 -40
- package/dist/components/puck-block/gallery-sections/gallery-1/index.js +32 -34
- package/dist/components/puck-block/gallery-sections/gallery-2/gallery-2.d.ts +16 -0
- package/dist/components/puck-block/gallery-sections/gallery-2/gallery-2.js +86 -0
- package/dist/components/puck-block/gallery-sections/gallery-2/index.d.ts +5 -0
- package/dist/components/puck-block/gallery-sections/gallery-2/index.js +42 -0
- package/dist/components/puck-block/gallery-sections/gallery-3/gallery-3.d.ts +19 -0
- package/dist/components/puck-block/gallery-sections/gallery-3/gallery-3.js +119 -0
- package/dist/components/puck-block/gallery-sections/gallery-3/index.d.ts +5 -0
- package/dist/components/puck-block/gallery-sections/gallery-3/index.js +59 -0
- package/dist/components/puck-block/gallery-sections/props.d.ts +26 -0
- package/dist/components/puck-block/header-sections/header-1/header.d.ts +7 -5
- package/dist/components/puck-block/header-sections/header-1/header.js +8 -9
- package/dist/components/puck-block/header-sections/header-1/index.d.ts +1 -1
- package/dist/components/puck-block/header-sections/header-1/index.js +13 -12
- package/dist/components/puck-block/header-sections/props.d.ts +41 -0
- package/dist/components/puck-block/header-sections/sticky-nav-1/index.js +12 -12
- package/dist/components/puck-block/header-sections/sticky-nav-1/sticky-nav.d.ts +8 -6
- package/dist/components/puck-block/header-sections/sticky-nav-1/sticky-nav.js +5 -5
- package/dist/components/puck-block/hero-sections/fullscreen-hero-1/fullscreen-hero.d.ts +11 -4
- package/dist/components/puck-block/hero-sections/fullscreen-hero-1/fullscreen-hero.js +60 -23
- package/dist/components/puck-block/hero-sections/fullscreen-hero-1/index.js +18 -6
- package/dist/components/puck-block/hero-sections/gradient-hero-1/gradient-hero.d.ts +9 -5
- package/dist/components/puck-block/hero-sections/gradient-hero-1/gradient-hero.js +37 -24
- package/dist/components/puck-block/hero-sections/gradient-hero-1/index.js +18 -15
- package/dist/components/puck-block/hero-sections/grid-hero-1/grid-hero.d.ts +7 -6
- package/dist/components/puck-block/hero-sections/grid-hero-1/grid-hero.js +7 -10
- package/dist/components/puck-block/hero-sections/grid-hero-1/index.js +43 -11
- package/dist/components/puck-block/hero-sections/hero-1/hero.d.ts +6 -4
- package/dist/components/puck-block/hero-sections/hero-1/hero.js +5 -7
- package/dist/components/puck-block/hero-sections/hero-1/index.js +4 -4
- package/dist/components/puck-block/hero-sections/image-hero-1/image-hero.d.ts +14 -8
- package/dist/components/puck-block/hero-sections/image-hero-1/image-hero.js +64 -60
- package/dist/components/puck-block/hero-sections/image-hero-1/index.js +16 -34
- package/dist/components/puck-block/hero-sections/props.d.ts +71 -0
- package/dist/components/puck-block/hero-sections/split-hero-1/index.js +6 -5
- package/dist/components/puck-block/hero-sections/split-hero-1/split-hero.d.ts +8 -8
- package/dist/components/puck-block/hero-sections/split-hero-1/split-hero.js +48 -47
- package/dist/components/puck-block/hero-sections/video-hero-1/index.js +4 -3
- package/dist/components/puck-block/hero-sections/video-hero-1/video-hero.d.ts +6 -2
- package/dist/components/puck-block/hero-sections/video-hero-1/video-hero.js +30 -22
- package/dist/components/puck-block/index.d.ts +15 -0
- package/dist/components/puck-block/location-sections/location-1/index.d.ts +5 -0
- package/dist/components/puck-block/location-sections/location-1/index.js +108 -0
- package/dist/components/puck-block/location-sections/location-1/location.d.ts +28 -0
- package/dist/components/puck-block/location-sections/location-1/location.js +137 -0
- package/dist/components/puck-block/location-sections/location-2/index.d.ts +5 -0
- package/dist/components/puck-block/location-sections/location-2/index.js +123 -0
- package/dist/components/puck-block/location-sections/location-2/location.d.ts +30 -0
- package/dist/components/puck-block/location-sections/location-2/location.js +131 -0
- package/dist/components/puck-block/location-sections/location-3/index.d.ts +5 -0
- package/dist/components/puck-block/location-sections/location-3/index.js +84 -0
- package/dist/components/puck-block/location-sections/location-3/location.d.ts +24 -0
- package/dist/components/puck-block/location-sections/location-3/location.js +127 -0
- package/dist/components/puck-block/location-sections/props.d.ts +45 -0
- package/dist/components/puck-block/metrics-sections/props.d.ts +43 -0
- package/dist/components/puck-block/metrics-sections/stats-1/index.js +6 -7
- package/dist/components/puck-block/metrics-sections/stats-1/stats.d.ts +7 -5
- package/dist/components/puck-block/metrics-sections/stats-1/stats.js +61 -55
- package/dist/components/puck-block/metrics-sections/stats-2/index.d.ts +5 -0
- package/dist/components/puck-block/metrics-sections/stats-2/index.js +76 -0
- package/dist/components/puck-block/metrics-sections/stats-2/stats-2.d.ts +18 -0
- package/dist/components/puck-block/metrics-sections/stats-2/stats-2.js +57 -0
- package/dist/components/puck-block/metrics-sections/stats-3/index.d.ts +5 -0
- package/dist/components/puck-block/metrics-sections/stats-3/index.js +86 -0
- package/dist/components/puck-block/metrics-sections/stats-3/stats-3.d.ts +18 -0
- package/dist/components/puck-block/metrics-sections/stats-3/stats-3.js +56 -0
- package/dist/components/puck-block/pricing-sections/comparison-1/comparison.d.ts +7 -5
- package/dist/components/puck-block/pricing-sections/comparison-1/comparison.js +45 -39
- package/dist/components/puck-block/pricing-sections/comparison-1/index.js +5 -7
- package/dist/components/puck-block/pricing-sections/pricing-1/index.js +10 -11
- package/dist/components/puck-block/pricing-sections/pricing-1/pricing.d.ts +8 -6
- package/dist/components/puck-block/pricing-sections/pricing-1/pricing.js +47 -35
- package/dist/components/puck-block/pricing-sections/pricing-2/index.d.ts +5 -0
- package/dist/components/puck-block/pricing-sections/pricing-2/index.js +151 -0
- package/dist/components/puck-block/pricing-sections/pricing-2/pricing-2.d.ts +26 -0
- package/dist/components/puck-block/pricing-sections/pricing-2/pricing-2.js +71 -0
- package/dist/components/puck-block/pricing-sections/props.d.ts +46 -0
- package/dist/components/puck-block/showcase-sections/before-after-1/before-after.d.ts +22 -0
- package/dist/components/puck-block/showcase-sections/before-after-1/before-after.js +71 -0
- package/dist/components/puck-block/showcase-sections/before-after-1/index.d.ts +5 -0
- package/dist/components/puck-block/showcase-sections/before-after-1/index.js +73 -0
- package/dist/components/puck-block/showcase-sections/case-study-1/case-study.d.ts +6 -2
- package/dist/components/puck-block/showcase-sections/case-study-1/case-study.js +30 -28
- package/dist/components/puck-block/showcase-sections/case-study-1/index.js +4 -3
- package/dist/components/puck-block/showcase-sections/props.d.ts +48 -0
- package/dist/components/puck-block/showcase-sections/step-by-step-1/index.js +3 -5
- package/dist/components/puck-block/showcase-sections/step-by-step-1/step-by-step.d.ts +6 -4
- package/dist/components/puck-block/showcase-sections/step-by-step-1/step-by-step.js +38 -41
- package/dist/components/puck-block/team-sections/props.d.ts +39 -0
- package/dist/components/puck-block/team-sections/team-grid-1/index.js +4 -5
- package/dist/components/puck-block/team-sections/team-grid-1/team-grid.d.ts +6 -4
- package/dist/components/puck-block/team-sections/team-grid-1/team-grid.js +27 -41
- package/dist/components/puck-block/team-sections/team-grid-2/index.d.ts +5 -0
- package/dist/components/puck-block/team-sections/team-grid-2/index.js +62 -0
- package/dist/components/puck-block/team-sections/team-grid-2/team-grid-2.d.ts +23 -0
- package/dist/components/puck-block/team-sections/team-grid-2/team-grid-2.js +44 -0
- package/dist/components/puck-block/team-sections/team-profiles-1/index.d.ts +5 -0
- package/dist/components/puck-block/team-sections/team-profiles-1/index.js +53 -0
- package/dist/components/puck-block/team-sections/team-profiles-1/team-profiles.d.ts +23 -0
- package/dist/components/puck-block/team-sections/team-profiles-1/team-profiles.js +105 -0
- package/dist/components/puck-block/testimonial-sections/customers-1/customers.d.ts +9 -7
- package/dist/components/puck-block/testimonial-sections/customers-1/customers.js +8 -11
- package/dist/components/puck-block/testimonial-sections/customers-1/index.js +17 -17
- package/dist/components/puck-block/testimonial-sections/logo-marquee-1/index.js +15 -12
- package/dist/components/puck-block/testimonial-sections/logo-marquee-1/logo-marquee.d.ts +7 -3
- package/dist/components/puck-block/testimonial-sections/logo-marquee-1/logo-marquee.js +34 -24
- package/dist/components/puck-block/testimonial-sections/logo-wall-1/index.d.ts +5 -0
- package/dist/components/puck-block/testimonial-sections/logo-wall-1/index.js +51 -0
- package/dist/components/puck-block/testimonial-sections/logo-wall-1/logo-wall.d.ts +17 -0
- package/dist/components/puck-block/testimonial-sections/logo-wall-1/logo-wall.js +55 -0
- package/dist/components/puck-block/testimonial-sections/props.d.ts +34 -0
- package/dist/components/puck-block/testimonial-sections/review-section-1/index.js +16 -15
- package/dist/components/puck-block/testimonial-sections/review-section-1/review-section.d.ts +8 -6
- package/dist/components/puck-block/testimonial-sections/review-section-1/review-section.js +25 -19
- package/dist/components/puck-block/testimonial-sections/testimonials-1/index.js +17 -17
- package/dist/components/puck-block/testimonial-sections/testimonials-1/testimonials.d.ts +8 -6
- package/dist/components/puck-block/testimonial-sections/testimonials-1/testimonials.js +76 -63
- package/dist/components/puck-block/text-sections/articles-1/articles.d.ts +7 -4
- package/dist/components/puck-block/text-sections/articles-1/articles.js +42 -22
- package/dist/components/puck-block/text-sections/articles-1/index.js +31 -19
- package/dist/components/puck-block/text-sections/content-section-1/content-section.d.ts +7 -5
- package/dist/components/puck-block/text-sections/content-section-1/content-section.js +11 -12
- package/dist/components/puck-block/text-sections/content-section-1/index.js +14 -14
- package/dist/components/puck-block/text-sections/props.d.ts +58 -0
- package/dist/components/puck-block/text-sections/rich-text-1/index.js +13 -15
- package/dist/components/puck-block/text-sections/rich-text-1/rich-text.d.ts +7 -5
- package/dist/components/puck-block/text-sections/rich-text-1/rich-text.js +11 -11
- package/dist/components/puck-block/text-sections/tab-section-1/index.js +4 -5
- package/dist/components/puck-block/text-sections/tab-section-1/tab-section.d.ts +6 -4
- package/dist/components/puck-block/text-sections/tab-section-1/tab-section.js +6 -7
- package/dist/components/puck-block/text-sections/timeline-1/index.js +3 -5
- package/dist/components/puck-block/text-sections/timeline-1/timeline.d.ts +6 -4
- package/dist/components/puck-block/text-sections/timeline-1/timeline.js +3 -5
- package/dist/components/puck-block/text-sections/two-column-1/index.js +4 -6
- package/dist/components/puck-block/text-sections/two-column-1/two-column.d.ts +6 -4
- package/dist/components/puck-block/text-sections/two-column-1/two-column.js +5 -7
- package/dist/components/shadcn/navigation-menu.d.ts +1 -1
- package/dist/components/shadcn/navigation-menu.js +33 -0
- package/dist/index.js +106 -75
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { CompoundContainer } from "../../../puck-base/container.js";
|
|
3
|
+
import { CompoundImage } from "../../../puck-base/image.js";
|
|
3
4
|
import { cn } from "../../../../utils/css-utils.js";
|
|
4
5
|
import DynamicIcon from "../../../../node_modules/.pnpm/lucide-react@0.540.0_react@19.2.4/node_modules/lucide-react/dist/esm/DynamicIcon.js";
|
|
5
6
|
const GridLayout = ({
|
|
@@ -7,14 +8,7 @@ const GridLayout = ({
|
|
|
7
8
|
columns,
|
|
8
9
|
image
|
|
9
10
|
}) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-10", children: [
|
|
10
|
-
(image == null ? void 0 : image.src) && /* @__PURE__ */ jsx("div", { className: "overflow-hidden rounded-xl", children: /* @__PURE__ */ jsx(
|
|
11
|
-
"img",
|
|
12
|
-
{
|
|
13
|
-
src: image.src,
|
|
14
|
-
alt: image.alt || "",
|
|
15
|
-
className: "h-auto w-full object-cover"
|
|
16
|
-
}
|
|
17
|
-
) }),
|
|
11
|
+
(image == null ? void 0 : image.src) && /* @__PURE__ */ jsx("div", { className: "[&>span]:w-full overflow-hidden rounded-xl", children: /* @__PURE__ */ jsx(CompoundImage, { src: image.src, alt: image.alt || "", className: "w-full object-cover" }) }),
|
|
18
12
|
/* @__PURE__ */ jsx(
|
|
19
13
|
"div",
|
|
20
14
|
{
|
|
@@ -48,17 +42,10 @@ const AlternatingLayout = ({ features }) => /* @__PURE__ */ jsx("div", { classNa
|
|
|
48
42
|
"div",
|
|
49
43
|
{
|
|
50
44
|
className: cn(
|
|
51
|
-
"bg-muted overflow-hidden rounded-xl",
|
|
45
|
+
"bg-muted [&>span]:w-full overflow-hidden rounded-xl",
|
|
52
46
|
!isEven && "lg:order-2"
|
|
53
47
|
),
|
|
54
|
-
children: ((_a = feature.image) == null ? void 0 : _a.src) ? /* @__PURE__ */ jsx(
|
|
55
|
-
"img",
|
|
56
|
-
{
|
|
57
|
-
src: feature.image.src,
|
|
58
|
-
alt: feature.image.alt || "",
|
|
59
|
-
className: "h-auto w-full object-cover"
|
|
60
|
-
}
|
|
61
|
-
) : /* @__PURE__ */ jsx("div", { className: "flex aspect-video items-center justify-center", children: feature.icon && feature.icon !== "none" && /* @__PURE__ */ jsx(
|
|
48
|
+
children: ((_a = feature.image) == null ? void 0 : _a.src) ? /* @__PURE__ */ jsx(CompoundImage, { src: feature.image.src, alt: feature.image.alt || "", className: "w-full object-cover" }) : /* @__PURE__ */ jsx("div", { className: "flex aspect-video items-center justify-center", children: feature.icon && feature.icon !== "none" && /* @__PURE__ */ jsx(
|
|
62
49
|
DynamicIcon,
|
|
63
50
|
{
|
|
64
51
|
name: feature.icon,
|
|
@@ -107,26 +94,17 @@ const ListLayout = ({
|
|
|
107
94
|
},
|
|
108
95
|
index
|
|
109
96
|
)) }),
|
|
110
|
-
(image == null ? void 0 : image.src) && /* @__PURE__ */ jsx("div", { className: "overflow-hidden rounded-xl", children: /* @__PURE__ */ jsx(
|
|
111
|
-
"img",
|
|
112
|
-
{
|
|
113
|
-
src: image.src,
|
|
114
|
-
alt: image.alt || "",
|
|
115
|
-
className: "sticky top-8 h-auto w-full rounded-xl object-cover"
|
|
116
|
-
}
|
|
117
|
-
) })
|
|
97
|
+
(image == null ? void 0 : image.src) && /* @__PURE__ */ jsx("div", { className: "[&>span]:w-full overflow-hidden rounded-xl", children: /* @__PURE__ */ jsx(CompoundImage, { src: image.src, alt: image.alt || "", className: "sticky top-8 w-full rounded-xl object-cover" }) })
|
|
118
98
|
] });
|
|
119
99
|
const ProductFeatures = ({
|
|
120
|
-
|
|
121
|
-
sectionStyle,
|
|
122
|
-
backgroundColor,
|
|
100
|
+
styles,
|
|
123
101
|
heading,
|
|
124
102
|
description,
|
|
125
103
|
features = [],
|
|
126
104
|
layout = "grid",
|
|
127
105
|
columns = 3,
|
|
128
106
|
image
|
|
129
|
-
}) => /* @__PURE__ */ jsx(CompoundContainer, { padding, sectionStyle, backgroundColor, children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-12", children: [
|
|
107
|
+
}) => /* @__PURE__ */ jsx(CompoundContainer, { padding: styles == null ? void 0 : styles.padding, sectionStyle: styles == null ? void 0 : styles.sectionStyle, backgroundColor: styles == null ? void 0 : styles.backgroundColor, children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-12", children: [
|
|
130
108
|
(heading || description) && /* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-2xl text-center", children: [
|
|
131
109
|
heading && /* @__PURE__ */ jsx("h2", { className: "text-3xl font-bold tracking-tight md:text-4xl", children: heading }),
|
|
132
110
|
description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mt-4 text-lg", children: description })
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
type FeatureVariant = "bento-1" | "feature-cards-1" | "feature-showcase-1" | "icon-grid-1" | "product-features-1";
|
|
2
|
+
type FeaturePadding = {
|
|
3
|
+
top?: "none" | "small" | "medium" | "large";
|
|
4
|
+
bottom?: "none" | "small" | "medium" | "large";
|
|
5
|
+
};
|
|
6
|
+
type FeatureSectionStyle = "default" | "dark" | "muted" | "inverted" | "custom";
|
|
7
|
+
type FeatureButton = {
|
|
8
|
+
label: string;
|
|
9
|
+
url?: string;
|
|
10
|
+
variant?: "default" | "secondary" | "outline" | "ghost" | "link" | "destructive";
|
|
11
|
+
size?: "default" | "sm" | "lg" | "icon";
|
|
12
|
+
icon?: string;
|
|
13
|
+
};
|
|
14
|
+
type FeatureImage = {
|
|
15
|
+
src: string;
|
|
16
|
+
alt?: string;
|
|
17
|
+
};
|
|
18
|
+
type FeatureItem = {
|
|
19
|
+
title?: string;
|
|
20
|
+
name?: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
icon?: string;
|
|
23
|
+
image?: FeatureImage;
|
|
24
|
+
};
|
|
25
|
+
type FeatureCard = {
|
|
26
|
+
title?: string;
|
|
27
|
+
description?: string;
|
|
28
|
+
image?: FeatureImage;
|
|
29
|
+
badge?: string;
|
|
30
|
+
icon?: string;
|
|
31
|
+
href?: string;
|
|
32
|
+
};
|
|
33
|
+
type FeatureSectionProps = {
|
|
34
|
+
variant?: FeatureVariant;
|
|
35
|
+
heading?: string;
|
|
36
|
+
description?: string;
|
|
37
|
+
buttons?: FeatureButton[];
|
|
38
|
+
features?: FeatureItem[];
|
|
39
|
+
cards?: FeatureCard[];
|
|
40
|
+
image?: FeatureImage;
|
|
41
|
+
layout?: "image-left" | "image-right" | "grid" | "alternating" | "list";
|
|
42
|
+
columns?: 1 | 2 | 3 | 4;
|
|
43
|
+
styles?: {
|
|
44
|
+
padding?: FeaturePadding;
|
|
45
|
+
sectionStyle?: FeatureSectionStyle;
|
|
46
|
+
backgroundColor?: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -11,12 +11,14 @@ interface PrimaryLinks extends Omit<Link, "url"> {
|
|
|
11
11
|
export interface FooterProps extends ILayoutProps {
|
|
12
12
|
companyName: string;
|
|
13
13
|
tagLine?: string;
|
|
14
|
-
padding: CompoundContainerProps["padding"];
|
|
15
|
-
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
16
|
-
backgroundColor?: string;
|
|
17
14
|
address?: string;
|
|
18
15
|
legalLinks: Link[];
|
|
19
16
|
navigation: PrimaryLinks[];
|
|
17
|
+
styles?: {
|
|
18
|
+
padding?: CompoundContainerProps["padding"];
|
|
19
|
+
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
20
|
+
backgroundColor?: string;
|
|
21
|
+
};
|
|
20
22
|
}
|
|
21
23
|
export declare const Footer: (props: FooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
24
|
export {};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { CompoundContainer } from "../../../puck-base/container.js";
|
|
3
3
|
const Footer = (props) => {
|
|
4
|
-
var _a, _b;
|
|
4
|
+
var _a, _b, _c, _d, _e;
|
|
5
5
|
return /* @__PURE__ */ jsx(
|
|
6
6
|
CompoundContainer,
|
|
7
7
|
{
|
|
8
|
-
padding: props.padding,
|
|
9
|
-
sectionStyle: props.sectionStyle,
|
|
10
|
-
backgroundColor: props.backgroundColor,
|
|
8
|
+
padding: (_a = props.styles) == null ? void 0 : _a.padding,
|
|
9
|
+
sectionStyle: (_b = props.styles) == null ? void 0 : _b.sectionStyle,
|
|
10
|
+
backgroundColor: (_c = props.styles) == null ? void 0 : _c.backgroundColor,
|
|
11
11
|
className: "bg-background/95 text-muted-foreground",
|
|
12
12
|
children: /* @__PURE__ */ jsxs("div", { className: "grid items-center gap-10 lg:grid-cols-2", children: [
|
|
13
13
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-start gap-8", children: [
|
|
@@ -17,10 +17,10 @@ const Footer = (props) => {
|
|
|
17
17
|
] }),
|
|
18
18
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-row gap-20", children: [
|
|
19
19
|
/* @__PURE__ */ jsx("div", { className: "flex max-w-lg flex-col text-left text-sm leading-relaxed tracking-tight", children: /* @__PURE__ */ jsx("p", { style: { whiteSpace: "pre-line" }, children: props.address }) }),
|
|
20
|
-
/* @__PURE__ */ jsx("div", { className: "flex max-w-lg flex-col text-left text-sm leading-relaxed tracking-tight", children: (
|
|
20
|
+
/* @__PURE__ */ jsx("div", { className: "flex max-w-lg flex-col text-left text-sm leading-relaxed tracking-tight", children: (_d = props.legalLinks) == null ? void 0 : _d.map((link, index) => /* @__PURE__ */ jsx("a", { href: link.url, children: link.label }, index)) })
|
|
21
21
|
] })
|
|
22
22
|
] }),
|
|
23
|
-
/* @__PURE__ */ jsx("div", { className: "grid items-start gap-10 lg:grid-cols-3", children: (
|
|
23
|
+
/* @__PURE__ */ jsx("div", { className: "grid items-start gap-10 lg:grid-cols-3", children: (_e = props.navigation) == null ? void 0 : _e.map((item, index) => {
|
|
24
24
|
var _a2;
|
|
25
25
|
return /* @__PURE__ */ jsx(
|
|
26
26
|
"div",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Footer } from "./footer.js";
|
|
2
|
-
import {
|
|
2
|
+
import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
|
|
3
3
|
const conf = {
|
|
4
4
|
fields: {
|
|
5
5
|
companyName: {
|
|
@@ -58,12 +58,9 @@ const conf = {
|
|
|
58
58
|
url: ""
|
|
59
59
|
}
|
|
60
60
|
},
|
|
61
|
-
|
|
62
|
-
sectionStyle,
|
|
63
|
-
backgroundColor
|
|
61
|
+
styles: createStylesField()
|
|
64
62
|
},
|
|
65
63
|
defaultProps: {
|
|
66
|
-
padding: paddingDefaults,
|
|
67
64
|
companyName: "Puck Visual Editor",
|
|
68
65
|
tagLine: "Build visually. Launch instantly.",
|
|
69
66
|
address: "1 Puck Avenue\nVisual Park\nCA 123123\n© 2024 Puck, Inc.",
|
|
@@ -126,6 +123,7 @@ const conf = {
|
|
|
126
123
|
url: "/privacy"
|
|
127
124
|
}
|
|
128
125
|
],
|
|
126
|
+
styles: createStylesDefaults(),
|
|
129
127
|
__metadata: {
|
|
130
128
|
type: "layout"
|
|
131
129
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
type FooterVariant = "footer-1";
|
|
2
|
+
type FooterPadding = {
|
|
3
|
+
top?: "none" | "small" | "medium" | "large";
|
|
4
|
+
bottom?: "none" | "small" | "medium" | "large";
|
|
5
|
+
};
|
|
6
|
+
type FooterSectionStyle = "default" | "dark" | "muted" | "inverted" | "custom";
|
|
7
|
+
type FooterLink = {
|
|
8
|
+
label: string;
|
|
9
|
+
url?: string;
|
|
10
|
+
};
|
|
11
|
+
type FooterNavigationGroup = {
|
|
12
|
+
label: string;
|
|
13
|
+
url?: string;
|
|
14
|
+
items?: FooterLink[];
|
|
15
|
+
};
|
|
16
|
+
type FooterSectionProps = {
|
|
17
|
+
variant?: FooterVariant;
|
|
18
|
+
__metadata?: {
|
|
19
|
+
type: "layout";
|
|
20
|
+
};
|
|
21
|
+
companyName?: string;
|
|
22
|
+
tagLine?: string;
|
|
23
|
+
address?: string;
|
|
24
|
+
legalLinks?: FooterLink[];
|
|
25
|
+
navigation?: FooterNavigationGroup[];
|
|
26
|
+
styles?: {
|
|
27
|
+
padding?: FooterPadding;
|
|
28
|
+
sectionStyle?: FooterSectionStyle;
|
|
29
|
+
backgroundColor?: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -5,14 +5,16 @@ export interface GalleryImage {
|
|
|
5
5
|
caption?: string;
|
|
6
6
|
}
|
|
7
7
|
export interface GalleryProps {
|
|
8
|
-
padding?: CompoundContainerProps["padding"];
|
|
9
|
-
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
10
|
-
backgroundColor?: string;
|
|
11
8
|
heading?: string;
|
|
12
9
|
description?: string;
|
|
13
10
|
images?: GalleryImage[];
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
styles?: {
|
|
12
|
+
padding?: CompoundContainerProps["padding"];
|
|
13
|
+
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
14
|
+
backgroundColor?: string;
|
|
15
|
+
columns?: 2 | 3 | 4;
|
|
16
|
+
gap?: "sm" | "md" | "lg";
|
|
17
|
+
aspectRatio?: "square" | "landscape" | "auto";
|
|
18
|
+
};
|
|
17
19
|
}
|
|
18
|
-
export declare const Gallery: ({
|
|
20
|
+
export declare const Gallery: ({ heading, description, images, styles, }: GalleryProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { CompoundContainer } from "../../../puck-base/container.js";
|
|
3
|
+
import { CompoundImage } from "../../../puck-base/image.js";
|
|
3
4
|
import { cn } from "../../../../utils/css-utils.js";
|
|
4
5
|
const columnClasses = {
|
|
5
6
|
2: "grid-cols-1 sm:grid-cols-2",
|
|
@@ -17,52 +18,60 @@ const aspectClasses = {
|
|
|
17
18
|
auto: ""
|
|
18
19
|
};
|
|
19
20
|
const Gallery = ({
|
|
20
|
-
padding,
|
|
21
|
-
sectionStyle,
|
|
22
|
-
backgroundColor,
|
|
23
21
|
heading,
|
|
24
22
|
description,
|
|
25
23
|
images = [],
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
] }),
|
|
34
|
-
/* @__PURE__ */ jsx(
|
|
35
|
-
"div",
|
|
24
|
+
styles
|
|
25
|
+
}) => {
|
|
26
|
+
const columns = (styles == null ? void 0 : styles.columns) ?? 3;
|
|
27
|
+
const gap = (styles == null ? void 0 : styles.gap) ?? "md";
|
|
28
|
+
const aspectRatio = (styles == null ? void 0 : styles.aspectRatio) ?? "auto";
|
|
29
|
+
return /* @__PURE__ */ jsx(
|
|
30
|
+
CompoundContainer,
|
|
36
31
|
{
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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("div", { className: "flex flex-col gap-10", children: [
|
|
36
|
+
(heading || description) && /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
|
|
37
|
+
heading && /* @__PURE__ */ jsx("h2", { className: "font-serif text-3xl font-bold tracking-tight md:text-4xl", children: heading }),
|
|
38
|
+
description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mx-auto mt-4 max-w-2xl text-lg", children: description })
|
|
39
|
+
] }),
|
|
40
|
+
/* @__PURE__ */ jsx(
|
|
41
|
+
"div",
|
|
42
|
+
{
|
|
43
|
+
className: cn(
|
|
44
|
+
"grid",
|
|
45
|
+
columnClasses[columns] ?? columnClasses[3],
|
|
46
|
+
gapClasses[gap] ?? gapClasses.md
|
|
47
|
+
),
|
|
48
|
+
children: images.map((image, index) => /* @__PURE__ */ jsxs(
|
|
49
|
+
"div",
|
|
49
50
|
{
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
51
|
+
className: "group bg-muted relative overflow-hidden rounded-lg",
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ jsx("div", { className: cn(aspectClasses[aspectRatio], "[&>span]:w-full", aspectRatio !== "auto" && "[&>span]:h-full"), children: image.src && /* @__PURE__ */ jsx(
|
|
54
|
+
CompoundImage,
|
|
55
|
+
{
|
|
56
|
+
src: image.src,
|
|
57
|
+
alt: image.alt ?? `Gallery image ${index + 1}`,
|
|
58
|
+
className: cn(
|
|
59
|
+
"w-full object-cover transition-transform duration-300 group-hover:scale-105",
|
|
60
|
+
aspectRatio !== "auto" && "h-full"
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
) }),
|
|
64
|
+
image.caption && /* @__PURE__ */ jsx("div", { className: "from-foreground/60 absolute inset-x-0 bottom-0 bg-gradient-to-t to-transparent p-4", children: /* @__PURE__ */ jsx("p", { className: "text-background text-sm", children: image.caption }) })
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
index
|
|
68
|
+
))
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
] })
|
|
63
72
|
}
|
|
64
|
-
)
|
|
65
|
-
|
|
73
|
+
);
|
|
74
|
+
};
|
|
66
75
|
export {
|
|
67
76
|
Gallery
|
|
68
77
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { description, heading } from "../../../puck-base/core/fields.js";
|
|
2
2
|
import { Gallery } from "./gallery.js";
|
|
3
|
+
import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
|
|
3
4
|
const defaultImage = {
|
|
4
5
|
src: "https://dummyimage.com/800x600/f5f4f4/101010.png&text=Gallery+Image",
|
|
5
6
|
alt: "Gallery image",
|
|
@@ -20,47 +21,44 @@ const conf = {
|
|
|
20
21
|
},
|
|
21
22
|
defaultItemProps: defaultImage
|
|
22
23
|
},
|
|
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
|
-
|
|
24
|
+
styles: createStylesField({
|
|
25
|
+
columns: {
|
|
26
|
+
type: "select",
|
|
27
|
+
label: "Columns",
|
|
28
|
+
options: [
|
|
29
|
+
{ label: "2 Columns", value: 2 },
|
|
30
|
+
{ label: "3 Columns", value: 3 },
|
|
31
|
+
{ label: "4 Columns", value: 4 }
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
gap: {
|
|
35
|
+
type: "select",
|
|
36
|
+
label: "Gap Size",
|
|
37
|
+
options: [
|
|
38
|
+
{ label: "Small", value: "sm" },
|
|
39
|
+
{ label: "Medium", value: "md" },
|
|
40
|
+
{ label: "Large", value: "lg" }
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
aspectRatio: {
|
|
44
|
+
type: "select",
|
|
45
|
+
label: "Aspect Ratio",
|
|
46
|
+
options: [
|
|
47
|
+
{ label: "Square", value: "square" },
|
|
48
|
+
{ label: "Landscape (16:9)", value: "landscape" },
|
|
49
|
+
{ label: "Auto (original)", value: "auto" }
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
})
|
|
52
53
|
},
|
|
53
54
|
defaultProps: {
|
|
54
55
|
heading: "Our Gallery",
|
|
55
56
|
description: "A showcase of our finest work and moments.",
|
|
56
|
-
columns: 3,
|
|
57
|
-
gap: "md",
|
|
58
|
-
aspectRatio: "auto",
|
|
59
57
|
images: Array.from({ length: 6 }).map((_, i) => ({
|
|
60
58
|
...defaultImage,
|
|
61
59
|
alt: `Gallery image ${i + 1}`
|
|
62
60
|
})),
|
|
63
|
-
|
|
61
|
+
styles: createStylesDefaults({ columns: 3, gap: "md", aspectRatio: "auto" })
|
|
64
62
|
},
|
|
65
63
|
render: Gallery
|
|
66
64
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CompoundContainerProps } from "@/components/puck-base/container";
|
|
2
|
+
export interface Gallery2Image {
|
|
3
|
+
src: string;
|
|
4
|
+
alt?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface Gallery2Props {
|
|
7
|
+
heading?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
images?: Gallery2Image[];
|
|
10
|
+
styles?: {
|
|
11
|
+
padding?: CompoundContainerProps["padding"];
|
|
12
|
+
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
13
|
+
backgroundColor?: string;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export declare const Gallery2: ({ heading, description, images, styles, }: Gallery2Props) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import useEmblaCarousel from "embla-carousel-react";
|
|
4
|
+
import { useState, useCallback, useEffect } from "react";
|
|
5
|
+
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
6
|
+
import { CompoundContainer } from "../../../puck-base/container.js";
|
|
7
|
+
import { CompoundImage } from "../../../puck-base/image.js";
|
|
8
|
+
const Gallery2 = ({
|
|
9
|
+
heading,
|
|
10
|
+
description,
|
|
11
|
+
images = [],
|
|
12
|
+
styles
|
|
13
|
+
}) => {
|
|
14
|
+
const [emblaRef, emblaApi] = useEmblaCarousel({ align: "start", loop: false });
|
|
15
|
+
const [canScrollPrev, setCanScrollPrev] = useState(false);
|
|
16
|
+
const [canScrollNext, setCanScrollNext] = useState(false);
|
|
17
|
+
const onSelect = useCallback(() => {
|
|
18
|
+
if (!emblaApi) return;
|
|
19
|
+
setCanScrollPrev(emblaApi.canScrollPrev());
|
|
20
|
+
setCanScrollNext(emblaApi.canScrollNext());
|
|
21
|
+
}, [emblaApi]);
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
if (!emblaApi) return;
|
|
24
|
+
onSelect();
|
|
25
|
+
emblaApi.on("select", onSelect);
|
|
26
|
+
emblaApi.on("reInit", onSelect);
|
|
27
|
+
return () => {
|
|
28
|
+
emblaApi.off("select", onSelect);
|
|
29
|
+
emblaApi.off("reInit", onSelect);
|
|
30
|
+
};
|
|
31
|
+
}, [emblaApi, onSelect]);
|
|
32
|
+
return /* @__PURE__ */ jsx(
|
|
33
|
+
CompoundContainer,
|
|
34
|
+
{
|
|
35
|
+
padding: styles == null ? void 0 : styles.padding,
|
|
36
|
+
sectionStyle: styles == null ? void 0 : styles.sectionStyle,
|
|
37
|
+
backgroundColor: styles == null ? void 0 : styles.backgroundColor,
|
|
38
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 lg:gap-8", children: [
|
|
39
|
+
(heading || description) && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between lg:gap-8", children: [
|
|
40
|
+
heading && /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-3 lg:basis-1/2", children: /* @__PURE__ */ jsx("h2", { className: "text-3xl font-bold tracking-tight text-foreground lg:text-4xl", children: heading }) }),
|
|
41
|
+
description && /* @__PURE__ */ jsx("div", { className: "lg:basis-1/2 lg:pt-11", children: /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-base leading-relaxed", children: description }) })
|
|
42
|
+
] }),
|
|
43
|
+
images.length > 0 && /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
44
|
+
/* @__PURE__ */ jsx("div", { className: "overflow-hidden", ref: emblaRef, children: /* @__PURE__ */ jsx("div", { className: "flex -ml-4 lg:-ml-6", children: images.map((image, index) => /* @__PURE__ */ jsx(
|
|
45
|
+
"div",
|
|
46
|
+
{
|
|
47
|
+
className: "min-w-0 shrink-0 grow-0 pl-4 lg:pl-6 basis-[97%] lg:basis-[92%]",
|
|
48
|
+
children: /* @__PURE__ */ jsx("div", { className: "relative w-full overflow-hidden aspect-[2/1]", children: /* @__PURE__ */ jsx("div", { className: "rounded-3xl overflow-hidden absolute inset-0 size-full [&>span]:h-full [&>span]:w-full", children: image.src ? /* @__PURE__ */ jsx(
|
|
49
|
+
CompoundImage,
|
|
50
|
+
{
|
|
51
|
+
src: image.src,
|
|
52
|
+
alt: image.alt ?? `Gallery image ${index + 1}`,
|
|
53
|
+
className: "h-full w-full object-cover"
|
|
54
|
+
}
|
|
55
|
+
) : /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-muted flex items-center justify-center", children: /* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-sm", children: image.alt ?? `Image ${index + 1}` }) }) }) })
|
|
56
|
+
},
|
|
57
|
+
index
|
|
58
|
+
)) }) }),
|
|
59
|
+
/* @__PURE__ */ jsx(
|
|
60
|
+
"button",
|
|
61
|
+
{
|
|
62
|
+
onClick: () => emblaApi == null ? void 0 : emblaApi.scrollPrev(),
|
|
63
|
+
disabled: !canScrollPrev,
|
|
64
|
+
className: "absolute left-4 top-1/2 -translate-y-1/2 z-10 flex h-10 w-10 items-center justify-center rounded-full bg-background/90 shadow-md transition hover:bg-background disabled:opacity-30",
|
|
65
|
+
"aria-label": "Previous image",
|
|
66
|
+
children: /* @__PURE__ */ jsx(ChevronLeft, { className: "h-5 w-5 text-foreground" })
|
|
67
|
+
}
|
|
68
|
+
),
|
|
69
|
+
/* @__PURE__ */ jsx(
|
|
70
|
+
"button",
|
|
71
|
+
{
|
|
72
|
+
onClick: () => emblaApi == null ? void 0 : emblaApi.scrollNext(),
|
|
73
|
+
disabled: !canScrollNext,
|
|
74
|
+
className: "absolute right-4 top-1/2 -translate-y-1/2 z-10 flex h-10 w-10 items-center justify-center rounded-full bg-background/90 shadow-md transition hover:bg-background disabled:opacity-30",
|
|
75
|
+
"aria-label": "Next image",
|
|
76
|
+
children: /* @__PURE__ */ jsx(ChevronRight, { className: "h-5 w-5 text-foreground" })
|
|
77
|
+
}
|
|
78
|
+
)
|
|
79
|
+
] })
|
|
80
|
+
] })
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
};
|
|
84
|
+
export {
|
|
85
|
+
Gallery2
|
|
86
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Gallery2 } from "./gallery-2.js";
|
|
2
|
+
import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
|
|
3
|
+
const defaultImage = {
|
|
4
|
+
src: "https://dummyimage.com/1400x700/f5f4f4/101010.png&text=Gallery+Image",
|
|
5
|
+
alt: "Gallery image"
|
|
6
|
+
};
|
|
7
|
+
const conf = {
|
|
8
|
+
fields: {
|
|
9
|
+
heading: {
|
|
10
|
+
type: "text",
|
|
11
|
+
contentEditable: true
|
|
12
|
+
},
|
|
13
|
+
description: {
|
|
14
|
+
type: "textarea",
|
|
15
|
+
contentEditable: true
|
|
16
|
+
},
|
|
17
|
+
images: {
|
|
18
|
+
type: "array",
|
|
19
|
+
max: 10,
|
|
20
|
+
getItemSummary: (item, index = 0) => item.alt || `Image ${index + 1}`,
|
|
21
|
+
arrayFields: {
|
|
22
|
+
src: { type: "image", label: "图片" },
|
|
23
|
+
alt: { type: "text", label: "Alt Text" }
|
|
24
|
+
},
|
|
25
|
+
defaultItemProps: defaultImage
|
|
26
|
+
},
|
|
27
|
+
styles: createStylesField()
|
|
28
|
+
},
|
|
29
|
+
defaultProps: {
|
|
30
|
+
heading: "Real transformations from real training",
|
|
31
|
+
description: "Watch how customized programs and one-on-one coaching help clients reach their fitness goals. Every session is built around your needs.",
|
|
32
|
+
images: Array.from({ length: 3 }).map((_, i) => ({
|
|
33
|
+
...defaultImage,
|
|
34
|
+
alt: `Gallery image ${i + 1}`
|
|
35
|
+
})),
|
|
36
|
+
styles: createStylesDefaults()
|
|
37
|
+
},
|
|
38
|
+
render: Gallery2
|
|
39
|
+
};
|
|
40
|
+
export {
|
|
41
|
+
conf
|
|
42
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CompoundContainerProps } from "@/components/puck-base/container";
|
|
2
|
+
export interface Gallery3Image {
|
|
3
|
+
src: string;
|
|
4
|
+
alt?: string;
|
|
5
|
+
caption?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface Gallery3Props {
|
|
8
|
+
heading?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
images?: Gallery3Image[];
|
|
11
|
+
showCaptions?: boolean;
|
|
12
|
+
styles?: {
|
|
13
|
+
padding?: CompoundContainerProps["padding"];
|
|
14
|
+
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
15
|
+
backgroundColor?: string;
|
|
16
|
+
gap?: "sm" | "md" | "lg";
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export declare const Gallery3: ({ heading, description, images, showCaptions, styles, }: Gallery3Props) => import("react/jsx-runtime").JSX.Element;
|