dune-react 0.0.8 → 0.0.9

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.
Files changed (107) hide show
  1. package/dist/components/puck-base/article-card.js +1 -1
  2. package/dist/components/puck-base/container.d.ts +7 -1
  3. package/dist/components/puck-base/container.js +2 -1
  4. package/dist/components/puck-base/content.d.ts +1 -4
  5. package/dist/components/puck-base/content.js +15 -17
  6. package/dist/components/puck-base/core/types.d.ts +2 -2
  7. package/dist/components/puck-base/editor-context.d.ts +8 -0
  8. package/dist/components/puck-base/fields/auto-field.d.ts +1 -0
  9. package/dist/components/puck-base/fields/auto-field.js +131 -49
  10. package/dist/components/puck-base/gradient-text.js +12 -3
  11. package/dist/components/puck-block/banner-sections/announcement-banner-1/announcement-banner.js +1 -1
  12. package/dist/components/puck-block/contact-sections/api/form-leads.d.ts +16 -0
  13. package/dist/components/puck-block/contact-sections/api/form-leads.js +25 -0
  14. package/dist/components/puck-block/contact-sections/contact-us-1/contact-us.js +8 -16
  15. package/dist/components/puck-block/contact-sections/contact-us-2/contact-us-2.d.ts +26 -0
  16. package/dist/components/puck-block/contact-sections/contact-us-2/contact-us-2.js +229 -0
  17. package/dist/components/puck-block/contact-sections/contact-us-2/index.d.ts +5 -0
  18. package/dist/components/puck-block/contact-sections/contact-us-2/index.js +72 -0
  19. package/dist/components/puck-block/contact-sections/contact-us-3/contact-us-3.d.ts +29 -0
  20. package/dist/components/puck-block/contact-sections/contact-us-3/contact-us-3.js +245 -0
  21. package/dist/components/puck-block/contact-sections/contact-us-3/index.d.ts +5 -0
  22. package/dist/components/puck-block/contact-sections/contact-us-3/index.js +101 -0
  23. package/dist/components/puck-block/cta-sections/banner-cta-1/banner-cta.js +9 -8
  24. package/dist/components/puck-block/cta-sections/gradient-cta-1/gradient-cta.js +3 -3
  25. package/dist/components/puck-block/cta-sections/gradient-cta-1/index.js +4 -4
  26. package/dist/components/puck-block/cta-sections/newsletter-signup-1/newsletter-signup.js +5 -4
  27. package/dist/components/puck-block/cta-sections/promo-section-1/promo-section.js +6 -5
  28. package/dist/components/puck-block/faq-sections/faq-2/faq-2.d.ts +16 -0
  29. package/dist/components/puck-block/faq-sections/faq-2/faq-2.js +56 -0
  30. package/dist/components/puck-block/faq-sections/faq-2/index.d.ts +5 -0
  31. package/dist/components/puck-block/faq-sections/faq-2/index.js +62 -0
  32. package/dist/components/puck-block/feature-sections/feature-cards-1/feature-cards.d.ts +3 -4
  33. package/dist/components/puck-block/feature-sections/feature-cards-1/feature-cards.js +13 -3
  34. package/dist/components/puck-block/feature-sections/feature-cards-1/index.js +34 -14
  35. package/dist/components/puck-block/feature-sections/feature-showcase-1/feature-showcase.js +2 -8
  36. package/dist/components/puck-block/feature-sections/product-features-1/product-features.js +5 -25
  37. package/dist/components/puck-block/gallery-sections/gallery-1/gallery.js +3 -2
  38. package/dist/components/puck-block/gallery-sections/gallery-2/gallery-2.d.ts +14 -0
  39. package/dist/components/puck-block/gallery-sections/gallery-2/gallery-2.js +88 -0
  40. package/dist/components/puck-block/gallery-sections/gallery-2/index.d.ts +5 -0
  41. package/dist/components/puck-block/gallery-sections/gallery-2/index.js +44 -0
  42. package/dist/components/puck-block/gallery-sections/gallery-3/gallery-3.d.ts +17 -0
  43. package/dist/components/puck-block/gallery-sections/gallery-3/gallery-3.js +121 -0
  44. package/dist/components/puck-block/gallery-sections/gallery-3/index.d.ts +5 -0
  45. package/dist/components/puck-block/gallery-sections/gallery-3/index.js +60 -0
  46. package/dist/components/puck-block/hero-sections/fullscreen-hero-1/fullscreen-hero.d.ts +6 -1
  47. package/dist/components/puck-block/hero-sections/fullscreen-hero-1/fullscreen-hero.js +56 -20
  48. package/dist/components/puck-block/hero-sections/fullscreen-hero-1/index.js +12 -1
  49. package/dist/components/puck-block/hero-sections/gradient-hero-1/gradient-hero.d.ts +1 -1
  50. package/dist/components/puck-block/hero-sections/gradient-hero-1/gradient-hero.js +9 -6
  51. package/dist/components/puck-block/hero-sections/gradient-hero-1/index.js +4 -4
  52. package/dist/components/puck-block/hero-sections/image-hero-1/image-hero.d.ts +4 -1
  53. package/dist/components/puck-block/hero-sections/image-hero-1/image-hero.js +60 -62
  54. package/dist/components/puck-block/index.d.ts +15 -0
  55. package/dist/components/puck-block/location-sections/location-1/index.d.ts +5 -0
  56. package/dist/components/puck-block/location-sections/location-1/index.js +103 -0
  57. package/dist/components/puck-block/location-sections/location-1/location.d.ts +27 -0
  58. package/dist/components/puck-block/location-sections/location-1/location.js +143 -0
  59. package/dist/components/puck-block/location-sections/location-2/index.d.ts +5 -0
  60. package/dist/components/puck-block/location-sections/location-2/index.js +111 -0
  61. package/dist/components/puck-block/location-sections/location-2/location.d.ts +25 -0
  62. package/dist/components/puck-block/location-sections/location-2/location.js +136 -0
  63. package/dist/components/puck-block/location-sections/location-3/index.d.ts +5 -0
  64. package/dist/components/puck-block/location-sections/location-3/index.js +83 -0
  65. package/dist/components/puck-block/location-sections/location-3/location.d.ts +22 -0
  66. package/dist/components/puck-block/location-sections/location-3/location.js +129 -0
  67. package/dist/components/puck-block/metrics-sections/stats-2/index.d.ts +5 -0
  68. package/dist/components/puck-block/metrics-sections/stats-2/index.js +77 -0
  69. package/dist/components/puck-block/metrics-sections/stats-2/stats-2.d.ts +16 -0
  70. package/dist/components/puck-block/metrics-sections/stats-2/stats-2.js +59 -0
  71. package/dist/components/puck-block/metrics-sections/stats-3/index.d.ts +5 -0
  72. package/dist/components/puck-block/metrics-sections/stats-3/index.js +94 -0
  73. package/dist/components/puck-block/metrics-sections/stats-3/stats-3.d.ts +17 -0
  74. package/dist/components/puck-block/metrics-sections/stats-3/stats-3.js +60 -0
  75. package/dist/components/puck-block/pricing-sections/pricing-2/index.d.ts +5 -0
  76. package/dist/components/puck-block/pricing-sections/pricing-2/index.js +152 -0
  77. package/dist/components/puck-block/pricing-sections/pricing-2/pricing-2.d.ts +24 -0
  78. package/dist/components/puck-block/pricing-sections/pricing-2/pricing-2.js +68 -0
  79. package/dist/components/puck-block/showcase-sections/before-after-1/before-after.d.ts +20 -0
  80. package/dist/components/puck-block/showcase-sections/before-after-1/before-after.js +73 -0
  81. package/dist/components/puck-block/showcase-sections/before-after-1/index.d.ts +5 -0
  82. package/dist/components/puck-block/showcase-sections/before-after-1/index.js +74 -0
  83. package/dist/components/puck-block/showcase-sections/case-study-1/case-study.js +2 -8
  84. package/dist/components/puck-block/team-sections/team-grid-1/team-grid.js +4 -24
  85. package/dist/components/puck-block/team-sections/team-grid-2/index.d.ts +5 -0
  86. package/dist/components/puck-block/team-sections/team-grid-2/index.js +63 -0
  87. package/dist/components/puck-block/team-sections/team-grid-2/team-grid-2.d.ts +21 -0
  88. package/dist/components/puck-block/team-sections/team-grid-2/team-grid-2.js +46 -0
  89. package/dist/components/puck-block/team-sections/team-profiles-1/index.d.ts +5 -0
  90. package/dist/components/puck-block/team-sections/team-profiles-1/index.js +54 -0
  91. package/dist/components/puck-block/team-sections/team-profiles-1/team-profiles.d.ts +21 -0
  92. package/dist/components/puck-block/team-sections/team-profiles-1/team-profiles.js +107 -0
  93. package/dist/components/puck-block/testimonial-sections/logo-marquee-1/logo-marquee.js +2 -1
  94. package/dist/components/puck-block/testimonial-sections/logo-wall-1/index.d.ts +5 -0
  95. package/dist/components/puck-block/testimonial-sections/logo-wall-1/index.js +50 -0
  96. package/dist/components/puck-block/testimonial-sections/logo-wall-1/logo-wall.d.ts +15 -0
  97. package/dist/components/puck-block/testimonial-sections/logo-wall-1/logo-wall.js +57 -0
  98. package/dist/components/puck-block/testimonial-sections/review-section-1/review-section.js +3 -2
  99. package/dist/components/puck-block/text-sections/articles-1/articles.d.ts +1 -0
  100. package/dist/components/puck-block/text-sections/articles-1/articles.js +19 -6
  101. package/dist/components/puck-block/text-sections/articles-1/index.js +16 -4
  102. package/dist/components/puck-block/text-sections/content-section-1/content-section.js +5 -4
  103. package/dist/components/puck-block/text-sections/tab-section-1/tab-section.js +3 -2
  104. package/dist/components/shadcn/navigation-menu.d.ts +1 -1
  105. package/dist/components/shadcn/navigation-menu.js +33 -0
  106. package/dist/index.js +104 -74
  107. 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 { CompoundButton } from "../../../puck-base/button.js";
3
4
  const variantStyles = {
4
5
  primary: "bg-primary text-primary-foreground",
5
6
  dark: "bg-foreground text-background",
@@ -21,19 +22,19 @@ const BannerCta = ({
21
22
  description && /* @__PURE__ */ jsx("p", { className: "mt-4 text-lg opacity-90 max-w-2xl mx-auto", children: description }),
22
23
  /* @__PURE__ */ jsxs("div", { className: "mt-8 flex flex-wrap items-center justify-center gap-4", children: [
23
24
  /* @__PURE__ */ jsx(
24
- "a",
25
+ CompoundButton,
25
26
  {
26
- href: ctaUrl,
27
- className: "inline-flex items-center rounded-full bg-background text-foreground px-8 py-3 text-sm font-semibold shadow hover:opacity-90 transition-opacity",
28
- children: ctaLabel
27
+ label: ctaLabel,
28
+ url: ctaUrl,
29
+ variant: "secondary"
29
30
  }
30
31
  ),
31
32
  secondaryLabel && secondaryUrl && /* @__PURE__ */ jsx(
32
- "a",
33
+ CompoundButton,
33
34
  {
34
- href: secondaryUrl,
35
- className: "inline-flex items-center rounded-full border border-current px-8 py-3 text-sm font-semibold hover:bg-white/10 transition-colors",
36
- children: secondaryLabel
35
+ label: secondaryLabel,
36
+ url: secondaryUrl,
37
+ variant: "outline"
37
38
  }
38
39
  )
39
40
  ] })
@@ -9,13 +9,13 @@ const GradientCta = ({
9
9
  heading,
10
10
  description,
11
11
  buttons,
12
- gradientFrom = "oklch(0.55 0.2 260)",
13
- gradientTo = "oklch(0.55 0.2 330)",
12
+ gradientFrom = "var(--primary)",
13
+ gradientTo = "var(--chart-2)",
14
14
  backgroundCSS,
15
15
  textColor
16
16
  }) => {
17
17
  const bg = backgroundCSS || `linear-gradient(135deg, ${gradientFrom}, ${gradientTo})`;
18
- const color = textColor || (backgroundCSS ? void 0 : "white");
18
+ const color = textColor || (backgroundCSS ? void 0 : "var(--primary-foreground)");
19
19
  return /* @__PURE__ */ jsx(CompoundContainer, { padding, sectionStyle, backgroundColor, children: /* @__PURE__ */ jsx(
20
20
  "div",
21
21
  {
@@ -6,12 +6,12 @@ const conf = {
6
6
  gradientFrom: {
7
7
  type: "text",
8
8
  label: "Gradient Start",
9
- ai: { instructions: "oklch format" }
9
+ ai: { instructions: "Use a CSS variable from the template theme, e.g. 'var(--primary)', 'var(--chart-1)'. Also accepts oklch format." }
10
10
  },
11
11
  gradientTo: {
12
12
  type: "text",
13
13
  label: "Gradient End",
14
- ai: { instructions: "oklch format" }
14
+ ai: { instructions: "Use a CSS variable from the template theme, e.g. 'var(--chart-2)', 'var(--accent)'. Also accepts oklch format." }
15
15
  },
16
16
  backgroundCSS: {
17
17
  type: "textarea",
@@ -35,8 +35,8 @@ const conf = {
35
35
  buttons: [
36
36
  { label: "Start Free Trial", icon: "move-right", variant: "default" }
37
37
  ],
38
- gradientFrom: "oklch(0.55 0.2 260)",
39
- gradientTo: "oklch(0.55 0.2 330)",
38
+ gradientFrom: "var(--primary)",
39
+ gradientTo: "var(--chart-2)",
40
40
  padding: paddingDefaults
41
41
  },
42
42
  render: GradientCta
@@ -1,5 +1,6 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { CompoundContainer } from "../../../puck-base/container.js";
3
+ import { CompoundButton } from "../../../puck-base/button.js";
3
4
  const NewsletterSignup = ({
4
5
  padding,
5
6
  heading,
@@ -24,11 +25,11 @@ const NewsletterSignup = ({
24
25
  }
25
26
  ),
26
27
  /* @__PURE__ */ jsx(
27
- "button",
28
+ CompoundButton,
28
29
  {
29
- type: "submit",
30
- className: "bg-primary text-primary-foreground rounded-lg px-6 py-2.5 font-medium transition-opacity hover:opacity-90",
31
- children: buttonLabel
30
+ label: buttonLabel,
31
+ variant: "default",
32
+ type: "submit"
32
33
  }
33
34
  )
34
35
  ]
@@ -2,6 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { CompoundContainer } from "../../../puck-base/container.js";
3
3
  import { CompoundBadge } from "../../../puck-base/badge.js";
4
4
  import { CompoundButton } from "../../../puck-base/button.js";
5
+ import { CompoundImage } from "../../../puck-base/image.js";
5
6
  import { cn } from "../../../../utils/css-utils.js";
6
7
  const PromoSection = ({
7
8
  padding,
@@ -15,13 +16,13 @@ const PromoSection = ({
15
16
  badge
16
17
  }) => {
17
18
  if (imagePosition === "background") {
18
- return /* @__PURE__ */ jsx(CompoundContainer, { padding, sectionStyle, backgroundColor, children: /* @__PURE__ */ jsxs("div", { className: "relative flex min-h-[400px] items-center overflow-hidden rounded-2xl", children: [
19
+ return /* @__PURE__ */ jsx(CompoundContainer, { padding, sectionStyle, backgroundColor, children: /* @__PURE__ */ jsxs("div", { className: "relative flex min-h-[400px] items-center overflow-hidden rounded-2xl [&>span]:h-full [&>span]:w-full", children: [
19
20
  (image == null ? void 0 : image.src) && /* @__PURE__ */ jsx(
20
- "img",
21
+ CompoundImage,
21
22
  {
22
23
  src: image.src,
23
24
  alt: image.alt ?? "",
24
- className: "absolute inset-0 h-full w-full object-cover"
25
+ className: "h-full w-full object-cover"
25
26
  }
26
27
  ),
27
28
  /* @__PURE__ */ jsx("div", { className: "bg-foreground/50 absolute inset-0" }),
@@ -85,8 +86,8 @@ const PromoSection = ({
85
86
  ) : null
86
87
  ) })
87
88
  ] }),
88
- /* @__PURE__ */ jsx("div", { className: "bg-muted aspect-[4/3] overflow-hidden rounded-xl", children: (image == null ? void 0 : image.src) && /* @__PURE__ */ jsx(
89
- "img",
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,
90
91
  {
91
92
  src: image.src,
92
93
  alt: image.alt ?? "",
@@ -0,0 +1,16 @@
1
+ import { CompoundContainerProps } from "@/components/puck-base/container";
2
+ import { CompoundImageProps } from "@/components/puck-base/image";
3
+ export interface Faq2Item {
4
+ question: string;
5
+ answer: string;
6
+ }
7
+ export interface Faq2Props {
8
+ heading?: string;
9
+ items?: Faq2Item[];
10
+ image?: CompoundImageProps;
11
+ imagePosition?: "left" | "right";
12
+ padding?: CompoundContainerProps["padding"];
13
+ sectionStyle?: CompoundContainerProps["sectionStyle"];
14
+ backgroundColor?: string;
15
+ }
16
+ export declare const Faq2: ({ heading, items, image, imagePosition, padding, sectionStyle, backgroundColor, }: Faq2Props) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,56 @@
1
+ "use client";
2
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
3
+ import { CompoundContainer } from "../../../puck-base/container.js";
4
+ import { CompoundImage } from "../../../puck-base/image.js";
5
+ import { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from "../../../shadcn/accordion.js";
6
+ const Faq2 = ({
7
+ heading,
8
+ items = [],
9
+ image,
10
+ imagePosition = "right",
11
+ padding,
12
+ sectionStyle,
13
+ backgroundColor
14
+ }) => {
15
+ const imageCol = /* @__PURE__ */ jsx("div", { className: "hidden lg:block lg:sticky lg:top-8 aspect-square overflow-hidden rounded-3xl", children: /* @__PURE__ */ jsx(
16
+ CompoundImage,
17
+ {
18
+ src: (image == null ? void 0 : image.src) ?? "",
19
+ alt: (image == null ? void 0 : image.alt) ?? "",
20
+ className: "h-full w-full object-cover"
21
+ }
22
+ ) });
23
+ const accordionCol = /* @__PURE__ */ jsx(Accordion, { type: "single", collapsible: true, className: "flex flex-col gap-3", children: items.map((item, i) => /* @__PURE__ */ jsxs(
24
+ AccordionItem,
25
+ {
26
+ value: `faq2-${i}`,
27
+ className: "border-0 bg-foreground/[0.047] rounded-3xl px-6",
28
+ children: [
29
+ /* @__PURE__ */ jsx(AccordionTrigger, { className: "text-base font-medium hover:no-underline py-5 text-left", children: item.question }),
30
+ /* @__PURE__ */ jsx(AccordionContent, { className: "text-muted-foreground pb-5 text-sm leading-relaxed", children: item.answer })
31
+ ]
32
+ },
33
+ i
34
+ )) });
35
+ return /* @__PURE__ */ jsx(
36
+ CompoundContainer,
37
+ {
38
+ padding,
39
+ sectionStyle,
40
+ backgroundColor,
41
+ children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-10", children: [
42
+ heading && /* @__PURE__ */ jsx("div", { className: "text-center", children: /* @__PURE__ */ jsx("h2", { className: "text-foreground font-serif text-3xl font-semibold tracking-tight md:text-4xl lg:text-5xl", children: heading }) }),
43
+ /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-12 lg:grid-cols-2 lg:items-start lg:gap-16", children: imagePosition === "left" ? /* @__PURE__ */ jsxs(Fragment, { children: [
44
+ imageCol,
45
+ accordionCol
46
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
47
+ accordionCol,
48
+ imageCol
49
+ ] }) })
50
+ ] })
51
+ }
52
+ );
53
+ };
54
+ export {
55
+ Faq2
56
+ };
@@ -0,0 +1,5 @@
1
+ import { ComponentConfig } from "@puckeditor/core";
2
+ import { Faq2Props } from "./faq-2";
3
+ export type { Faq2Props };
4
+ export declare const conf: ComponentConfig<Faq2Props>;
5
+ export default conf;
@@ -0,0 +1,62 @@
1
+ import { paddingDefaults, image1x1Placeholder, backgroundColor, sectionStyle, padding, image } from "../../../puck-base/core/fields.js";
2
+ import { Faq2 } from "./faq-2.js";
3
+ const defaultItems = [
4
+ {
5
+ question: "What's included in a session?",
6
+ answer: "Each session includes a personalized warm-up, structured training tailored to your goals, form coaching, and a cool-down. You'll also receive guidance on next steps to keep progressing."
7
+ },
8
+ {
9
+ question: "How do I know if this is right for me?",
10
+ answer: "If you have a goal — whether it's losing weight, building strength, improving mobility, or just feeling better — we can help. We offer a free consultation to assess your needs and build a plan."
11
+ },
12
+ {
13
+ question: "How often should I train to see results?",
14
+ answer: "Most clients see meaningful results training 2–3 times per week. We'll work with your schedule and lifestyle to find the right frequency for your goals."
15
+ },
16
+ {
17
+ question: "Do you offer programs for specific goals?",
18
+ answer: "Yes — we tailor every program to your specific objectives, whether that's weight loss, muscle gain, athletic performance, or general wellness."
19
+ }
20
+ ];
21
+ const conf = {
22
+ fields: {
23
+ heading: { type: "textarea", contentEditable: true },
24
+ items: {
25
+ type: "array",
26
+ min: 1,
27
+ max: 20,
28
+ getItemSummary: (item, index = 0) => item.question ? `${item.question.slice(0, 30)}${item.question.length > 30 ? "..." : ""}` : `Question ${index + 1}`,
29
+ arrayFields: {
30
+ question: { type: "text", contentEditable: true },
31
+ answer: { type: "textarea", contentEditable: true }
32
+ },
33
+ defaultItemProps: {
34
+ question: "Your question here",
35
+ answer: "A helpful answer to the question."
36
+ }
37
+ },
38
+ image,
39
+ imagePosition: {
40
+ type: "radio",
41
+ label: "Image Position",
42
+ options: [
43
+ { label: "Left", value: "left" },
44
+ { label: "Right", value: "right" }
45
+ ]
46
+ },
47
+ padding,
48
+ sectionStyle,
49
+ backgroundColor
50
+ },
51
+ defaultProps: {
52
+ heading: "Questions about getting started",
53
+ items: defaultItems,
54
+ image: image1x1Placeholder,
55
+ imagePosition: "right",
56
+ padding: paddingDefaults
57
+ },
58
+ render: Faq2
59
+ };
60
+ export {
61
+ conf
62
+ };
@@ -1,12 +1,11 @@
1
1
  import { CompoundContentProps } from "@/components/puck-base/content";
2
2
  import { CompoundContainerProps } from "@/components/puck-base/container";
3
- import { PuckComponent, Slot } from "@puckeditor/core";
3
+ import { CompoundArticleCardProps } from "@/components/puck-base/article-card";
4
4
  export interface FeatureCardsProps extends CompoundContentProps {
5
5
  padding?: CompoundContainerProps["padding"];
6
6
  sectionStyle?: CompoundContainerProps["sectionStyle"];
7
7
  backgroundColor?: string;
8
8
  columns?: 1 | 2 | 3;
9
- cards: Slot;
9
+ cards?: CompoundArticleCardProps[];
10
10
  }
11
- export declare const FeatureCard: PuckComponent<CompoundContainerProps>;
12
- export declare const FeatureCards: PuckComponent<FeatureCardsProps>;
11
+ export declare const FeatureCards: ({ padding, sectionStyle, backgroundColor, badge, heading, description, buttons, columns, cards, alignContent, className, }: FeatureCardsProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,7 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { CompoundContent } from "../../../puck-base/content.js";
3
3
  import { CompoundContainer } from "../../../puck-base/container.js";
4
+ import { CompoundArticleCard } from "../../../puck-base/article-card.js";
4
5
  import { cn } from "../../../../utils/css-utils.js";
5
6
  const FeatureCards = ({
6
7
  padding,
@@ -11,7 +12,7 @@ const FeatureCards = ({
11
12
  description,
12
13
  buttons,
13
14
  columns = 3,
14
- cards: Cards,
15
+ cards = [],
15
16
  alignContent = "start",
16
17
  className
17
18
  }) => {
@@ -27,10 +28,19 @@ const FeatureCards = ({
27
28
  spacing: "tight"
28
29
  }
29
30
  ),
30
- Cards && /* @__PURE__ */ jsx(Cards, { className: cn("grid grid-cols-1 gap-8", {
31
+ cards.length > 0 && /* @__PURE__ */ jsx("div", { className: cn("grid grid-cols-1 gap-8", {
31
32
  "sm:grid-cols-2": columns >= 2,
32
33
  "lg:grid-cols-3": columns >= 3
33
- }) })
34
+ }), children: cards.map((card, index) => /* @__PURE__ */ jsx(
35
+ CompoundArticleCard,
36
+ {
37
+ image: card.image,
38
+ heading: card.heading,
39
+ description: card.description,
40
+ button: card.button
41
+ },
42
+ index
43
+ )) })
34
44
  ] }) });
35
45
  };
36
46
  export {
@@ -1,10 +1,5 @@
1
- import { paddingDefaults, backgroundColor, sectionStyle, padding, contentFields, image16x9Placeholder, cards } from "../../../puck-base/core/fields.js";
1
+ import { paddingDefaults, image16x9Placeholder, backgroundColor, sectionStyle, padding, button, image, contentFields } from "../../../puck-base/core/fields.js";
2
2
  import { FeatureCards } from "./feature-cards.js";
3
- const { icon: defaultIcon, ...cardsDefaultItemProps } = cards.defaultItemProps;
4
- const defaultCard = {
5
- ...cardsDefaultItemProps,
6
- image: image16x9Placeholder
7
- };
8
3
  const conf = {
9
4
  fields: {
10
5
  ...contentFields,
@@ -26,8 +21,26 @@ const conf = {
26
21
  ]
27
22
  },
28
23
  cards: {
29
- type: "slot",
30
- allow: ["ArticleCard"]
24
+ type: "array",
25
+ getItemSummary: (item, index = 0) => item.heading || `Card ${index + 1}`,
26
+ arrayFields: {
27
+ image,
28
+ heading: { type: "text", contentEditable: true },
29
+ description: { type: "textarea", contentEditable: true },
30
+ button
31
+ },
32
+ defaultItemProps: {
33
+ image: image16x9Placeholder,
34
+ heading: "Card heading",
35
+ description: "Card description goes here.",
36
+ button: {
37
+ label: "",
38
+ url: "",
39
+ variant: "link",
40
+ size: "default",
41
+ icon: "move-right"
42
+ }
43
+ }
31
44
  },
32
45
  padding,
33
46
  sectionStyle,
@@ -44,13 +57,20 @@ const conf = {
44
57
  buttons: [],
45
58
  alignContent: "start",
46
59
  columns: 3,
47
- cards: Array.from({ length: 1 }).map((_, index) => ({
48
- type: "ArticleCard",
49
- props: {
50
- ...defaultCard,
51
- heading: `Card ${index + 1}`
60
+ cards: [
61
+ {
62
+ image: image16x9Placeholder,
63
+ heading: "Card 1",
64
+ description: "Card description goes here.",
65
+ button: {
66
+ label: "",
67
+ url: "",
68
+ variant: "link",
69
+ size: "default",
70
+ icon: "move-right"
71
+ }
52
72
  }
53
- })),
73
+ ],
54
74
  padding: paddingDefaults
55
75
  },
56
76
  render: FeatureCards
@@ -1,6 +1,7 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { cn } from "../../../../utils/css-utils.js";
3
3
  import { CompoundContainer } from "../../../puck-base/container.js";
4
+ import { CompoundImage } from "../../../puck-base/image.js";
4
5
  const FeatureShowcase = ({
5
6
  padding,
6
7
  sectionStyle,
@@ -27,14 +28,7 @@ const FeatureShowcase = ({
27
28
  /* @__PURE__ */ jsx("h3", { className: "text-foreground text-lg font-semibold", children: f.title }),
28
29
  /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mt-1", children: f.description })
29
30
  ] }, i)) }),
30
- /* @__PURE__ */ jsx("div", { className: "border-border/50 bg-muted overflow-hidden rounded-xl border", children: (image == null ? void 0 : image.src) ? /* @__PURE__ */ jsx(
31
- "img",
32
- {
33
- src: image.src,
34
- alt: (image == null ? void 0 : image.alt) || "",
35
- className: "h-full w-full object-cover"
36
- }
37
- ) : /* @__PURE__ */ jsx("div", { className: "flex aspect-[4/3] w-full items-center justify-center", children: /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Feature Image" }) }) })
31
+ /* @__PURE__ */ jsx("div", { className: "border-border/50 bg-muted [&>span]:w-full overflow-hidden rounded-xl border", children: (image == null ? void 0 : image.src) ? /* @__PURE__ */ jsx(CompoundImage, { src: image.src, alt: (image == null ? void 0 : image.alt) || "", className: "w-full object-cover" }) : /* @__PURE__ */ jsx("div", { className: "flex aspect-[4/3] w-full items-center justify-center", children: /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Feature Image" }) }) })
38
32
  ]
39
33
  }
40
34
  )
@@ -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,14 +94,7 @@ 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
100
  padding,
@@ -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",
@@ -44,8 +45,8 @@ const Gallery = ({
44
45
  {
45
46
  className: "group bg-muted relative overflow-hidden rounded-lg",
46
47
  children: [
47
- /* @__PURE__ */ jsx("div", { className: cn(aspectClasses[aspectRatio]), children: image.src && /* @__PURE__ */ jsx(
48
- "img",
48
+ /* @__PURE__ */ jsx("div", { className: cn(aspectClasses[aspectRatio], "[&>span]:w-full", aspectRatio !== "auto" && "[&>span]:h-full"), children: image.src && /* @__PURE__ */ jsx(
49
+ CompoundImage,
49
50
  {
50
51
  src: image.src,
51
52
  alt: image.alt ?? `Gallery image ${index + 1}`,
@@ -0,0 +1,14 @@
1
+ import { CompoundContainerProps } from "@/components/puck-base/container";
2
+ export interface Gallery2Image {
3
+ src: string;
4
+ alt?: string;
5
+ }
6
+ export interface Gallery2Props {
7
+ padding?: CompoundContainerProps["padding"];
8
+ sectionStyle?: CompoundContainerProps["sectionStyle"];
9
+ backgroundColor?: string;
10
+ heading?: string;
11
+ description?: string;
12
+ images?: Gallery2Image[];
13
+ }
14
+ export declare const Gallery2: ({ padding, sectionStyle, backgroundColor, heading, description, images, }: Gallery2Props) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,88 @@
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
+ padding,
10
+ sectionStyle,
11
+ backgroundColor,
12
+ heading,
13
+ description,
14
+ images = []
15
+ }) => {
16
+ const [emblaRef, emblaApi] = useEmblaCarousel({ align: "start", loop: false });
17
+ const [canScrollPrev, setCanScrollPrev] = useState(false);
18
+ const [canScrollNext, setCanScrollNext] = useState(false);
19
+ const onSelect = useCallback(() => {
20
+ if (!emblaApi) return;
21
+ setCanScrollPrev(emblaApi.canScrollPrev());
22
+ setCanScrollNext(emblaApi.canScrollNext());
23
+ }, [emblaApi]);
24
+ useEffect(() => {
25
+ if (!emblaApi) return;
26
+ onSelect();
27
+ emblaApi.on("select", onSelect);
28
+ emblaApi.on("reInit", onSelect);
29
+ return () => {
30
+ emblaApi.off("select", onSelect);
31
+ emblaApi.off("reInit", onSelect);
32
+ };
33
+ }, [emblaApi, onSelect]);
34
+ return /* @__PURE__ */ jsx(
35
+ CompoundContainer,
36
+ {
37
+ padding,
38
+ sectionStyle,
39
+ backgroundColor,
40
+ children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 lg:gap-8", children: [
41
+ (heading || description) && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between lg:gap-8", children: [
42
+ 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 }) }),
43
+ 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 }) })
44
+ ] }),
45
+ images.length > 0 && /* @__PURE__ */ jsxs("div", { className: "relative", children: [
46
+ /* @__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(
47
+ "div",
48
+ {
49
+ className: "min-w-0 shrink-0 grow-0 pl-4 lg:pl-6 basis-[97%] lg:basis-[92%]",
50
+ 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(
51
+ CompoundImage,
52
+ {
53
+ src: image.src,
54
+ alt: image.alt ?? `Gallery image ${index + 1}`,
55
+ className: "h-full w-full object-cover"
56
+ }
57
+ ) : /* @__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}` }) }) }) })
58
+ },
59
+ index
60
+ )) }) }),
61
+ /* @__PURE__ */ jsx(
62
+ "button",
63
+ {
64
+ onClick: () => emblaApi == null ? void 0 : emblaApi.scrollPrev(),
65
+ disabled: !canScrollPrev,
66
+ 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",
67
+ "aria-label": "Previous image",
68
+ children: /* @__PURE__ */ jsx(ChevronLeft, { className: "h-5 w-5 text-foreground" })
69
+ }
70
+ ),
71
+ /* @__PURE__ */ jsx(
72
+ "button",
73
+ {
74
+ onClick: () => emblaApi == null ? void 0 : emblaApi.scrollNext(),
75
+ disabled: !canScrollNext,
76
+ 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",
77
+ "aria-label": "Next image",
78
+ children: /* @__PURE__ */ jsx(ChevronRight, { className: "h-5 w-5 text-foreground" })
79
+ }
80
+ )
81
+ ] })
82
+ ] })
83
+ }
84
+ );
85
+ };
86
+ export {
87
+ Gallery2
88
+ };
@@ -0,0 +1,5 @@
1
+ import { ComponentConfig } from "@puckeditor/core";
2
+ import { Gallery2Props } from "./gallery-2";
3
+ export type { Gallery2Props };
4
+ export declare const conf: ComponentConfig<Gallery2Props>;
5
+ export default conf;