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.
Files changed (197) hide show
  1. package/dist/components/puck-base/button.js +2 -1
  2. package/dist/components/puck-base/core/fields.d.ts +1 -127
  3. package/dist/components/puck-base/core/fields.js +1 -76
  4. package/dist/components/puck-base/core/styles.d.ts +1877 -0
  5. package/dist/components/puck-base/core/styles.js +286 -0
  6. package/dist/components/puck-base/core/with-editable.d.ts +4 -1
  7. package/dist/components/puck-base/core/with-editable.js +51 -27
  8. package/dist/components/puck-block/banner-sections/announcement-banner-1/announcement-banner.d.ts +9 -7
  9. package/dist/components/puck-block/banner-sections/announcement-banner-1/announcement-banner.js +11 -8
  10. package/dist/components/puck-block/banner-sections/announcement-banner-1/index.js +19 -37
  11. package/dist/components/puck-block/banner-sections/marquee-1/index.js +26 -24
  12. package/dist/components/puck-block/banner-sections/marquee-1/marquee.d.ts +9 -9
  13. package/dist/components/puck-block/banner-sections/marquee-1/marquee.js +28 -21
  14. package/dist/components/puck-block/banner-sections/props.d.ts +22 -0
  15. package/dist/components/puck-block/contact-sections/contact-us-1/contact-us.d.ts +13 -4
  16. package/dist/components/puck-block/contact-sections/contact-us-1/contact-us.js +114 -105
  17. package/dist/components/puck-block/contact-sections/contact-us-1/index.js +87 -7
  18. package/dist/components/puck-block/contact-sections/contact-us-2/contact-us-2.d.ts +15 -11
  19. package/dist/components/puck-block/contact-sections/contact-us-2/contact-us-2.js +27 -22
  20. package/dist/components/puck-block/contact-sections/contact-us-2/index.js +54 -52
  21. package/dist/components/puck-block/contact-sections/contact-us-3/contact-us-3.d.ts +15 -12
  22. package/dist/components/puck-block/contact-sections/contact-us-3/contact-us-3.js +29 -24
  23. package/dist/components/puck-block/contact-sections/contact-us-3/index.js +73 -60
  24. package/dist/components/puck-block/contact-sections/props.d.ts +65 -0
  25. package/dist/components/puck-block/cta-sections/banner-cta-1/banner-cta.d.ts +12 -9
  26. package/dist/components/puck-block/cta-sections/banner-cta-1/banner-cta.js +27 -30
  27. package/dist/components/puck-block/cta-sections/banner-cta-1/index.js +23 -25
  28. package/dist/components/puck-block/cta-sections/cta-1/cta.d.ts +6 -4
  29. package/dist/components/puck-block/cta-sections/cta-1/cta.js +5 -7
  30. package/dist/components/puck-block/cta-sections/cta-1/index.js +5 -9
  31. package/dist/components/puck-block/cta-sections/gradient-cta-1/gradient-cta.d.ts +10 -10
  32. package/dist/components/puck-block/cta-sections/gradient-cta-1/gradient-cta.js +24 -20
  33. package/dist/components/puck-block/cta-sections/gradient-cta-1/index.js +36 -29
  34. package/dist/components/puck-block/cta-sections/newsletter-signup-1/index.js +13 -5
  35. package/dist/components/puck-block/cta-sections/newsletter-signup-1/newsletter-signup.d.ts +7 -3
  36. package/dist/components/puck-block/cta-sections/newsletter-signup-1/newsletter-signup.js +35 -32
  37. package/dist/components/puck-block/cta-sections/promo-section-1/index.js +4 -5
  38. package/dist/components/puck-block/cta-sections/promo-section-1/promo-section.d.ts +6 -4
  39. package/dist/components/puck-block/cta-sections/promo-section-1/promo-section.js +93 -79
  40. package/dist/components/puck-block/cta-sections/props.d.ts +47 -0
  41. package/dist/components/puck-block/faq-sections/accordion-1/accordion.d.ts +6 -4
  42. package/dist/components/puck-block/faq-sections/accordion-1/accordion.js +39 -33
  43. package/dist/components/puck-block/faq-sections/accordion-1/index.js +3 -5
  44. package/dist/components/puck-block/faq-sections/faq-1/faq.d.ts +9 -7
  45. package/dist/components/puck-block/faq-sections/faq-1/faq.js +50 -44
  46. package/dist/components/puck-block/faq-sections/faq-1/index.js +12 -14
  47. package/dist/components/puck-block/faq-sections/faq-2/faq-2.d.ts +6 -4
  48. package/dist/components/puck-block/faq-sections/faq-2/faq-2.js +4 -6
  49. package/dist/components/puck-block/faq-sections/faq-2/index.js +4 -5
  50. package/dist/components/puck-block/faq-sections/props.d.ts +30 -0
  51. package/dist/components/puck-block/feature-sections/bento-1/bento.d.ts +6 -4
  52. package/dist/components/puck-block/feature-sections/bento-1/bento.js +2 -4
  53. package/dist/components/puck-block/feature-sections/bento-1/index.js +4 -5
  54. package/dist/components/puck-block/feature-sections/feature-cards-1/feature-cards.d.ts +6 -4
  55. package/dist/components/puck-block/feature-sections/feature-cards-1/feature-cards.js +2 -4
  56. package/dist/components/puck-block/feature-sections/feature-cards-1/index.js +4 -5
  57. package/dist/components/puck-block/feature-sections/feature-showcase-1/feature-showcase.d.ts +6 -4
  58. package/dist/components/puck-block/feature-sections/feature-showcase-1/feature-showcase.js +2 -4
  59. package/dist/components/puck-block/feature-sections/feature-showcase-1/index.js +4 -5
  60. package/dist/components/puck-block/feature-sections/icon-grid-1/icon-grid.d.ts +6 -4
  61. package/dist/components/puck-block/feature-sections/icon-grid-1/icon-grid.js +59 -53
  62. package/dist/components/puck-block/feature-sections/icon-grid-1/index.js +7 -8
  63. package/dist/components/puck-block/feature-sections/product-features-1/index.js +4 -5
  64. package/dist/components/puck-block/feature-sections/product-features-1/product-features.d.ts +6 -4
  65. package/dist/components/puck-block/feature-sections/product-features-1/product-features.js +2 -4
  66. package/dist/components/puck-block/feature-sections/props.d.ts +48 -0
  67. package/dist/components/puck-block/footer-sections/footer-1/footer.d.ts +5 -3
  68. package/dist/components/puck-block/footer-sections/footer-1/footer.js +6 -6
  69. package/dist/components/puck-block/footer-sections/footer-1/index.js +3 -5
  70. package/dist/components/puck-block/footer-sections/props.d.ts +31 -0
  71. package/dist/components/puck-block/gallery-sections/gallery-1/gallery.d.ts +9 -7
  72. package/dist/components/puck-block/gallery-sections/gallery-1/gallery.js +48 -40
  73. package/dist/components/puck-block/gallery-sections/gallery-1/index.js +32 -34
  74. package/dist/components/puck-block/gallery-sections/gallery-2/gallery-2.d.ts +6 -4
  75. package/dist/components/puck-block/gallery-sections/gallery-2/gallery-2.js +5 -7
  76. package/dist/components/puck-block/gallery-sections/gallery-2/index.js +3 -5
  77. package/dist/components/puck-block/gallery-sections/gallery-3/gallery-3.d.ts +7 -5
  78. package/dist/components/puck-block/gallery-sections/gallery-3/gallery-3.js +5 -7
  79. package/dist/components/puck-block/gallery-sections/gallery-3/index.js +13 -14
  80. package/dist/components/puck-block/gallery-sections/props.d.ts +26 -0
  81. package/dist/components/puck-block/header-sections/header-1/header.d.ts +7 -5
  82. package/dist/components/puck-block/header-sections/header-1/header.js +8 -9
  83. package/dist/components/puck-block/header-sections/header-1/index.d.ts +1 -1
  84. package/dist/components/puck-block/header-sections/header-1/index.js +13 -12
  85. package/dist/components/puck-block/header-sections/props.d.ts +41 -0
  86. package/dist/components/puck-block/header-sections/sticky-nav-1/index.js +12 -12
  87. package/dist/components/puck-block/header-sections/sticky-nav-1/sticky-nav.d.ts +8 -6
  88. package/dist/components/puck-block/header-sections/sticky-nav-1/sticky-nav.js +5 -5
  89. package/dist/components/puck-block/hero-sections/fullscreen-hero-1/fullscreen-hero.d.ts +7 -5
  90. package/dist/components/puck-block/hero-sections/fullscreen-hero-1/fullscreen-hero.js +5 -4
  91. package/dist/components/puck-block/hero-sections/fullscreen-hero-1/index.js +17 -16
  92. package/dist/components/puck-block/hero-sections/gradient-hero-1/gradient-hero.d.ts +8 -4
  93. package/dist/components/puck-block/hero-sections/gradient-hero-1/gradient-hero.js +36 -26
  94. package/dist/components/puck-block/hero-sections/gradient-hero-1/index.js +18 -15
  95. package/dist/components/puck-block/hero-sections/grid-hero-1/grid-hero.d.ts +7 -6
  96. package/dist/components/puck-block/hero-sections/grid-hero-1/grid-hero.js +7 -10
  97. package/dist/components/puck-block/hero-sections/grid-hero-1/index.js +43 -11
  98. package/dist/components/puck-block/hero-sections/hero-1/hero.d.ts +6 -4
  99. package/dist/components/puck-block/hero-sections/hero-1/hero.js +5 -7
  100. package/dist/components/puck-block/hero-sections/hero-1/index.js +4 -4
  101. package/dist/components/puck-block/hero-sections/image-hero-1/image-hero.d.ts +10 -7
  102. package/dist/components/puck-block/hero-sections/image-hero-1/image-hero.js +65 -59
  103. package/dist/components/puck-block/hero-sections/image-hero-1/index.js +16 -34
  104. package/dist/components/puck-block/hero-sections/props.d.ts +71 -0
  105. package/dist/components/puck-block/hero-sections/split-hero-1/index.js +6 -5
  106. package/dist/components/puck-block/hero-sections/split-hero-1/split-hero.d.ts +8 -8
  107. package/dist/components/puck-block/hero-sections/split-hero-1/split-hero.js +48 -47
  108. package/dist/components/puck-block/hero-sections/video-hero-1/index.js +4 -3
  109. package/dist/components/puck-block/hero-sections/video-hero-1/video-hero.d.ts +6 -2
  110. package/dist/components/puck-block/hero-sections/video-hero-1/video-hero.js +30 -22
  111. package/dist/components/puck-block/location-sections/location-1/index.js +47 -42
  112. package/dist/components/puck-block/location-sections/location-1/location.d.ts +7 -6
  113. package/dist/components/puck-block/location-sections/location-1/location.js +7 -13
  114. package/dist/components/puck-block/location-sections/location-2/index.js +69 -57
  115. package/dist/components/puck-block/location-sections/location-2/location.d.ts +11 -6
  116. package/dist/components/puck-block/location-sections/location-2/location.js +7 -12
  117. package/dist/components/puck-block/location-sections/location-3/index.js +25 -24
  118. package/dist/components/puck-block/location-sections/location-3/location.d.ts +8 -6
  119. package/dist/components/puck-block/location-sections/location-3/location.js +7 -9
  120. package/dist/components/puck-block/location-sections/props.d.ts +45 -0
  121. package/dist/components/puck-block/metrics-sections/props.d.ts +43 -0
  122. package/dist/components/puck-block/metrics-sections/stats-1/index.js +6 -7
  123. package/dist/components/puck-block/metrics-sections/stats-1/stats.d.ts +7 -5
  124. package/dist/components/puck-block/metrics-sections/stats-1/stats.js +61 -55
  125. package/dist/components/puck-block/metrics-sections/stats-2/index.js +4 -5
  126. package/dist/components/puck-block/metrics-sections/stats-2/stats-2.d.ts +6 -4
  127. package/dist/components/puck-block/metrics-sections/stats-2/stats-2.js +4 -6
  128. package/dist/components/puck-block/metrics-sections/stats-3/index.js +21 -29
  129. package/dist/components/puck-block/metrics-sections/stats-3/stats-3.d.ts +7 -6
  130. package/dist/components/puck-block/metrics-sections/stats-3/stats-3.js +9 -13
  131. package/dist/components/puck-block/pricing-sections/comparison-1/comparison.d.ts +7 -5
  132. package/dist/components/puck-block/pricing-sections/comparison-1/comparison.js +45 -39
  133. package/dist/components/puck-block/pricing-sections/comparison-1/index.js +5 -7
  134. package/dist/components/puck-block/pricing-sections/pricing-1/index.js +10 -11
  135. package/dist/components/puck-block/pricing-sections/pricing-1/pricing.d.ts +8 -6
  136. package/dist/components/puck-block/pricing-sections/pricing-1/pricing.js +47 -35
  137. package/dist/components/puck-block/pricing-sections/pricing-2/index.js +7 -8
  138. package/dist/components/puck-block/pricing-sections/pricing-2/pricing-2.d.ts +6 -4
  139. package/dist/components/puck-block/pricing-sections/pricing-2/pricing-2.js +60 -57
  140. package/dist/components/puck-block/pricing-sections/props.d.ts +46 -0
  141. package/dist/components/puck-block/showcase-sections/before-after-1/before-after.d.ts +7 -5
  142. package/dist/components/puck-block/showcase-sections/before-after-1/before-after.js +8 -10
  143. package/dist/components/puck-block/showcase-sections/before-after-1/index.js +6 -7
  144. package/dist/components/puck-block/showcase-sections/case-study-1/case-study.d.ts +6 -2
  145. package/dist/components/puck-block/showcase-sections/case-study-1/case-study.js +29 -21
  146. package/dist/components/puck-block/showcase-sections/case-study-1/index.js +4 -3
  147. package/dist/components/puck-block/showcase-sections/props.d.ts +48 -0
  148. package/dist/components/puck-block/showcase-sections/step-by-step-1/index.js +3 -5
  149. package/dist/components/puck-block/showcase-sections/step-by-step-1/step-by-step.d.ts +6 -4
  150. package/dist/components/puck-block/showcase-sections/step-by-step-1/step-by-step.js +38 -41
  151. package/dist/components/puck-block/team-sections/props.d.ts +39 -0
  152. package/dist/components/puck-block/team-sections/team-grid-1/index.js +4 -5
  153. package/dist/components/puck-block/team-sections/team-grid-1/team-grid.d.ts +6 -4
  154. package/dist/components/puck-block/team-sections/team-grid-1/team-grid.js +23 -17
  155. package/dist/components/puck-block/team-sections/team-grid-2/index.js +4 -5
  156. package/dist/components/puck-block/team-sections/team-grid-2/team-grid-2.d.ts +6 -4
  157. package/dist/components/puck-block/team-sections/team-grid-2/team-grid-2.js +5 -7
  158. package/dist/components/puck-block/team-sections/team-profiles-1/index.js +4 -5
  159. package/dist/components/puck-block/team-sections/team-profiles-1/team-profiles.d.ts +6 -4
  160. package/dist/components/puck-block/team-sections/team-profiles-1/team-profiles.js +5 -7
  161. package/dist/components/puck-block/testimonial-sections/customers-1/customers.d.ts +9 -7
  162. package/dist/components/puck-block/testimonial-sections/customers-1/customers.js +8 -11
  163. package/dist/components/puck-block/testimonial-sections/customers-1/index.js +17 -17
  164. package/dist/components/puck-block/testimonial-sections/logo-marquee-1/index.js +15 -12
  165. package/dist/components/puck-block/testimonial-sections/logo-marquee-1/logo-marquee.d.ts +7 -3
  166. package/dist/components/puck-block/testimonial-sections/logo-marquee-1/logo-marquee.js +33 -24
  167. package/dist/components/puck-block/testimonial-sections/logo-wall-1/index.js +17 -16
  168. package/dist/components/puck-block/testimonial-sections/logo-wall-1/logo-wall.d.ts +6 -4
  169. package/dist/components/puck-block/testimonial-sections/logo-wall-1/logo-wall.js +5 -7
  170. package/dist/components/puck-block/testimonial-sections/props.d.ts +34 -0
  171. package/dist/components/puck-block/testimonial-sections/review-section-1/index.js +16 -15
  172. package/dist/components/puck-block/testimonial-sections/review-section-1/review-section.d.ts +8 -6
  173. package/dist/components/puck-block/testimonial-sections/review-section-1/review-section.js +22 -17
  174. package/dist/components/puck-block/testimonial-sections/testimonials-1/index.js +17 -17
  175. package/dist/components/puck-block/testimonial-sections/testimonials-1/testimonials.d.ts +8 -6
  176. package/dist/components/puck-block/testimonial-sections/testimonials-1/testimonials.js +76 -63
  177. package/dist/components/puck-block/text-sections/articles-1/articles.d.ts +7 -5
  178. package/dist/components/puck-block/text-sections/articles-1/articles.js +41 -34
  179. package/dist/components/puck-block/text-sections/articles-1/index.js +24 -24
  180. package/dist/components/puck-block/text-sections/content-section-1/content-section.d.ts +7 -5
  181. package/dist/components/puck-block/text-sections/content-section-1/content-section.js +6 -8
  182. package/dist/components/puck-block/text-sections/content-section-1/index.js +14 -14
  183. package/dist/components/puck-block/text-sections/props.d.ts +58 -0
  184. package/dist/components/puck-block/text-sections/rich-text-1/index.js +13 -15
  185. package/dist/components/puck-block/text-sections/rich-text-1/rich-text.d.ts +7 -5
  186. package/dist/components/puck-block/text-sections/rich-text-1/rich-text.js +11 -11
  187. package/dist/components/puck-block/text-sections/tab-section-1/index.js +4 -5
  188. package/dist/components/puck-block/text-sections/tab-section-1/tab-section.d.ts +6 -4
  189. package/dist/components/puck-block/text-sections/tab-section-1/tab-section.js +3 -5
  190. package/dist/components/puck-block/text-sections/timeline-1/index.js +3 -5
  191. package/dist/components/puck-block/text-sections/timeline-1/timeline.d.ts +6 -4
  192. package/dist/components/puck-block/text-sections/timeline-1/timeline.js +3 -5
  193. package/dist/components/puck-block/text-sections/two-column-1/index.js +4 -6
  194. package/dist/components/puck-block/text-sections/two-column-1/two-column.d.ts +6 -4
  195. package/dist/components/puck-block/text-sections/two-column-1/two-column.js +5 -7
  196. package/dist/index.js +2 -1
  197. package/package.json +1 -1
@@ -3,15 +3,13 @@ import { cn } from "../../../../utils/css-utils.js";
3
3
  import { CompoundContainer } from "../../../puck-base/container.js";
4
4
  import { CompoundImage } from "../../../puck-base/image.js";
5
5
  const FeatureShowcase = ({
6
- padding,
7
- sectionStyle,
8
- backgroundColor,
6
+ styles,
9
7
  heading,
10
8
  description,
11
9
  image,
12
10
  features = [],
13
11
  layout = "image-right"
14
- }) => /* @__PURE__ */ jsxs(CompoundContainer, { padding, sectionStyle, backgroundColor, children: [
12
+ }) => /* @__PURE__ */ jsxs(CompoundContainer, { padding: styles == null ? void 0 : styles.padding, sectionStyle: styles == null ? void 0 : styles.sectionStyle, backgroundColor: styles == null ? void 0 : styles.backgroundColor, children: [
15
13
  /* @__PURE__ */ jsxs("div", { className: "mb-12 max-w-2xl", children: [
16
14
  heading && /* @__PURE__ */ jsx("h2", { className: "text-foreground text-3xl font-bold tracking-tight md:text-4xl", children: heading }),
17
15
  description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mt-4 text-lg", children: description })
@@ -1,5 +1,6 @@
1
- import { paddingDefaults, image16x9Placeholder, backgroundColor, sectionStyle, padding, image } from "../../../puck-base/core/fields.js";
1
+ import { image16x9Placeholder, image } from "../../../puck-base/core/fields.js";
2
2
  import { FeatureShowcase } from "./feature-showcase.js";
3
+ import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
3
4
  const conf = {
4
5
  fields: {
5
6
  heading: { type: "text", contentEditable: true },
@@ -25,9 +26,7 @@ const conf = {
25
26
  { label: "Image Right", value: "image-right" }
26
27
  ]
27
28
  },
28
- padding,
29
- sectionStyle,
30
- backgroundColor
29
+ styles: createStylesField()
31
30
  },
32
31
  defaultProps: {
33
32
  heading: "Everything you need",
@@ -48,7 +47,7 @@ const conf = {
48
47
  }
49
48
  ],
50
49
  layout: "image-right",
51
- padding: paddingDefaults
50
+ styles: createStylesDefaults()
52
51
  },
53
52
  render: FeatureShowcase
54
53
  };
@@ -1,17 +1,19 @@
1
1
  import { CompoundContainerProps } from "@/components/puck-base/container";
2
2
  import { CompoundButtonProps } from "@/components/puck-base/button";
3
3
  export interface IconGridProps {
4
- padding?: CompoundContainerProps["padding"];
5
- sectionStyle?: CompoundContainerProps["sectionStyle"];
6
- backgroundColor?: string;
7
4
  heading?: string;
8
5
  description?: string;
9
6
  buttons?: CompoundButtonProps[];
10
7
  columns?: 2 | 3 | 4;
11
- items?: Array<{
8
+ features?: Array<{
12
9
  icon: string;
13
10
  title: string;
14
11
  description: string;
15
12
  }>;
13
+ styles?: {
14
+ padding?: CompoundContainerProps["padding"];
15
+ sectionStyle?: CompoundContainerProps["sectionStyle"];
16
+ backgroundColor?: string;
17
+ };
16
18
  }
17
19
  export declare const IconGrid: (allProps: IconGridProps) => import("react/jsx-runtime").JSX.Element;
@@ -16,64 +16,70 @@ function getLucideIcon(name) {
16
16
  const IconGrid = (allProps) => {
17
17
  const componentId = allProps.id;
18
18
  const {
19
- padding,
20
- sectionStyle,
21
- backgroundColor,
22
19
  heading,
23
20
  description,
24
21
  buttons,
25
22
  columns = 3,
26
- items = []
23
+ features = [],
24
+ styles
27
25
  } = allProps;
28
- return /* @__PURE__ */ jsxs(CompoundContainer, { padding, sectionStyle, backgroundColor, children: [
29
- heading && /* @__PURE__ */ jsx("h2", { className: "text-foreground font-serif text-2xl md:text-3xl leading-snug mb-16 max-w-3xl", children: heading }),
30
- description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mt-4 text-lg mb-8", children: description }),
31
- Array.isArray(buttons) && buttons.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-4 mb-8", children: buttons.filter((b) => b.label).map((button, idx) => /* @__PURE__ */ jsx(
32
- CompoundButton,
33
- {
34
- label: button.label,
35
- url: button.url,
36
- variant: button.variant,
37
- size: button.size,
38
- icon: button.icon
39
- },
40
- idx
41
- )) }),
42
- /* @__PURE__ */ jsx("div", { className: cn(
43
- "grid grid-cols-1 gap-x-12",
44
- gridColsClass[columns] || ""
45
- ), children: items.map((item, i) => /* @__PURE__ */ jsxs("div", { children: [
46
- /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-6 py-6", children: [
47
- /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 mt-1 text-muted-foreground", children: (() => {
48
- const Icon = getLucideIcon(item.icon);
49
- return Icon ? /* @__PURE__ */ jsx(Icon, { className: "h-9 w-9 stroke-[1.5]" }) : /* @__PURE__ */ jsx("span", { className: "text-3xl", children: "📦" });
50
- })() }),
51
- /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
52
- /* @__PURE__ */ jsx(
53
- InlineEditable,
54
- {
55
- tag: "h3",
56
- className: "text-foreground font-serif text-xl font-medium mb-3",
57
- value: item.title,
58
- componentId: componentId || "",
59
- propPath: `items[${i}].title`
60
- }
61
- ),
62
- /* @__PURE__ */ jsx(
63
- InlineEditable,
64
- {
65
- tag: "p",
66
- className: "text-muted-foreground text-sm leading-relaxed max-w-2xl",
67
- value: item.description,
68
- componentId: componentId || "",
69
- propPath: `items[${i}].description`
70
- }
71
- )
72
- ] })
73
- ] }),
74
- /* @__PURE__ */ jsx("hr", { className: "border-foreground/10" })
75
- ] }, i)) })
76
- ] });
26
+ return /* @__PURE__ */ jsxs(
27
+ CompoundContainer,
28
+ {
29
+ padding: styles == null ? void 0 : styles.padding,
30
+ sectionStyle: styles == null ? void 0 : styles.sectionStyle,
31
+ backgroundColor: styles == null ? void 0 : styles.backgroundColor,
32
+ children: [
33
+ heading && /* @__PURE__ */ jsx("h2", { className: "text-foreground font-serif text-2xl md:text-3xl leading-snug mb-16 max-w-3xl", children: heading }),
34
+ description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mt-4 text-lg mb-8", children: description }),
35
+ Array.isArray(buttons) && buttons.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-4 mb-8", children: buttons.filter((b) => b.label).map((button, idx) => /* @__PURE__ */ jsx(
36
+ CompoundButton,
37
+ {
38
+ label: button.label,
39
+ url: button.url,
40
+ variant: button.variant,
41
+ size: button.size,
42
+ icon: button.icon
43
+ },
44
+ idx
45
+ )) }),
46
+ /* @__PURE__ */ jsx("div", { className: cn(
47
+ "grid grid-cols-1 gap-x-12",
48
+ gridColsClass[columns] || ""
49
+ ), children: features.map((item, i) => /* @__PURE__ */ jsxs("div", { children: [
50
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-6 py-6", children: [
51
+ /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 mt-1 text-muted-foreground", children: (() => {
52
+ const Icon = getLucideIcon(item.icon);
53
+ return Icon ? /* @__PURE__ */ jsx(Icon, { className: "h-9 w-9 stroke-[1.5]" }) : /* @__PURE__ */ jsx("span", { className: "text-3xl", children: "📦" });
54
+ })() }),
55
+ /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
56
+ /* @__PURE__ */ jsx(
57
+ InlineEditable,
58
+ {
59
+ tag: "h3",
60
+ className: "text-foreground font-serif text-xl font-medium mb-3",
61
+ value: item.title,
62
+ componentId: componentId || "",
63
+ propPath: `features[${i}].title`
64
+ }
65
+ ),
66
+ /* @__PURE__ */ jsx(
67
+ InlineEditable,
68
+ {
69
+ tag: "p",
70
+ className: "text-muted-foreground text-sm leading-relaxed max-w-2xl",
71
+ value: item.description,
72
+ componentId: componentId || "",
73
+ propPath: `features[${i}].description`
74
+ }
75
+ )
76
+ ] })
77
+ ] }),
78
+ /* @__PURE__ */ jsx("hr", { className: "border-foreground/10" })
79
+ ] }, i)) })
80
+ ]
81
+ }
82
+ );
77
83
  };
78
84
  export {
79
85
  IconGrid
@@ -1,5 +1,6 @@
1
- import { paddingDefaults, backgroundColor, sectionStyle, padding, buttons } from "../../../puck-base/core/fields.js";
1
+ import { buttons } from "../../../puck-base/core/fields.js";
2
2
  import { IconGrid } from "./icon-grid.js";
3
+ import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
3
4
  const conf = {
4
5
  fields: {
5
6
  heading: { type: "text", contentEditable: true },
@@ -13,10 +14,10 @@ const conf = {
13
14
  { label: "4 Columns", value: 4 }
14
15
  ]
15
16
  },
16
- items: {
17
+ features: {
17
18
  type: "array",
18
19
  max: 12,
19
- getItemSummary: (item, i = 0) => item.title || `Item ${i + 1}`,
20
+ getItemSummary: (item, i = 0) => item.title || `Feature ${i + 1}`,
20
21
  arrayFields: {
21
22
  icon: {
22
23
  type: "text",
@@ -33,15 +34,13 @@ const conf = {
33
34
  description: "Description"
34
35
  }
35
36
  },
36
- padding,
37
- sectionStyle,
38
- backgroundColor
37
+ styles: createStylesField()
39
38
  },
40
39
  defaultProps: {
41
40
  heading: "Why choose us",
42
41
  description: "Features that set us apart.",
43
42
  columns: 3,
44
- items: [
43
+ features: [
45
44
  {
46
45
  icon: "zap",
47
46
  title: "Fast",
@@ -61,7 +60,7 @@ const conf = {
61
60
  description: "Built with latest tech."
62
61
  }
63
62
  ],
64
- padding: paddingDefaults
63
+ styles: createStylesDefaults()
65
64
  },
66
65
  render: IconGrid
67
66
  };
@@ -1,5 +1,6 @@
1
- import { paddingDefaults, backgroundColor, sectionStyle, padding, image, icon, description, heading, getPlaceholderImageUrl } from "../../../puck-base/core/fields.js";
1
+ import { image, icon, description, heading, getPlaceholderImageUrl } from "../../../puck-base/core/fields.js";
2
2
  import { ProductFeatures } from "./product-features.js";
3
+ import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
3
4
  const defaultFeature = {
4
5
  icon: "box",
5
6
  title: "Feature Name",
@@ -38,9 +39,7 @@ const conf = {
38
39
  ]
39
40
  },
40
41
  image,
41
- padding,
42
- sectionStyle,
43
- backgroundColor
42
+ styles: createStylesField()
44
43
  },
45
44
  defaultProps: {
46
45
  heading: "Built for the Trail",
@@ -83,7 +82,7 @@ const conf = {
83
82
  src: getPlaceholderImageUrl("1200x800", "Product Image"),
84
83
  alt: "Summit 32L hiking backpack"
85
84
  },
86
- padding: paddingDefaults
85
+ styles: createStylesDefaults()
87
86
  },
88
87
  render: ProductFeatures
89
88
  };
@@ -9,9 +9,11 @@ export interface ProductFeature {
9
9
  };
10
10
  }
11
11
  export interface ProductFeaturesProps {
12
- padding?: CompoundContainerProps["padding"];
13
- sectionStyle?: CompoundContainerProps["sectionStyle"];
14
- backgroundColor?: string;
12
+ styles?: {
13
+ padding?: CompoundContainerProps["padding"];
14
+ sectionStyle?: CompoundContainerProps["sectionStyle"];
15
+ backgroundColor?: string;
16
+ };
15
17
  heading?: string;
16
18
  description?: string;
17
19
  features?: ProductFeature[];
@@ -22,4 +24,4 @@ export interface ProductFeaturesProps {
22
24
  alt?: string;
23
25
  };
24
26
  }
25
- export declare const ProductFeatures: ({ padding, sectionStyle, backgroundColor, heading, description, features, layout, columns, image, }: ProductFeaturesProps) => import("react/jsx-runtime").JSX.Element;
27
+ export declare const ProductFeatures: ({ styles, heading, description, features, layout, columns, image, }: ProductFeaturesProps) => import("react/jsx-runtime").JSX.Element;
@@ -97,16 +97,14 @@ const ListLayout = ({
97
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" }) })
98
98
  ] });
99
99
  const ProductFeatures = ({
100
- padding,
101
- sectionStyle,
102
- backgroundColor,
100
+ styles,
103
101
  heading,
104
102
  description,
105
103
  features = [],
106
104
  layout = "grid",
107
105
  columns = 3,
108
106
  image
109
- }) => /* @__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: [
110
108
  (heading || description) && /* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-2xl text-center", children: [
111
109
  heading && /* @__PURE__ */ jsx("h2", { className: "text-3xl font-bold tracking-tight md:text-4xl", children: heading }),
112
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: (_a = props.legalLinks) == null ? void 0 : _a.map((link, index) => /* @__PURE__ */ jsx("a", { href: link.url, children: link.label }, index)) })
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: (_b = props.navigation) == null ? void 0 : _b.map((item, index) => {
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 { paddingDefaults, backgroundColor, sectionStyle, padding } from "../../../puck-base/core/fields.js";
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
- padding,
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
- columns?: 2 | 3 | 4;
15
- gap?: "sm" | "md" | "lg";
16
- aspectRatio?: "square" | "landscape" | "auto";
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: ({ padding, sectionStyle, backgroundColor, heading, description, images, columns, gap, aspectRatio, }: GalleryProps) => import("react/jsx-runtime").JSX.Element;
20
+ export declare const Gallery: ({ heading, description, images, styles, }: GalleryProps) => import("react/jsx-runtime").JSX.Element;
@@ -18,52 +18,60 @@ const aspectClasses = {
18
18
  auto: ""
19
19
  };
20
20
  const Gallery = ({
21
- padding,
22
- sectionStyle,
23
- backgroundColor,
24
21
  heading,
25
22
  description,
26
23
  images = [],
27
- columns = 3,
28
- gap = "md",
29
- aspectRatio = "auto"
30
- }) => /* @__PURE__ */ jsx(CompoundContainer, { padding, sectionStyle, backgroundColor, children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-10", children: [
31
- (heading || description) && /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
32
- heading && /* @__PURE__ */ jsx("h2", { className: "font-serif text-3xl font-bold tracking-tight md:text-4xl", children: heading }),
33
- description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mx-auto mt-4 max-w-2xl text-lg", children: description })
34
- ] }),
35
- /* @__PURE__ */ jsx(
36
- "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,
37
31
  {
38
- className: cn(
39
- "grid",
40
- columnClasses[columns] ?? columnClasses[3],
41
- gapClasses[gap] ?? gapClasses.md
42
- ),
43
- children: images.map((image, index) => /* @__PURE__ */ jsxs(
44
- "div",
45
- {
46
- className: "group bg-muted relative overflow-hidden rounded-lg",
47
- children: [
48
- /* @__PURE__ */ jsx("div", { className: cn(aspectClasses[aspectRatio], "[&>span]:w-full", aspectRatio !== "auto" && "[&>span]:h-full"), children: image.src && /* @__PURE__ */ jsx(
49
- CompoundImage,
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",
50
50
  {
51
- src: image.src,
52
- alt: image.alt ?? `Gallery image ${index + 1}`,
53
- className: cn(
54
- "w-full object-cover transition-transform duration-300 group-hover:scale-105",
55
- aspectRatio !== "auto" && "h-full"
56
- )
57
- }
58
- ) }),
59
- 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 }) })
60
- ]
61
- },
62
- index
63
- ))
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
+ ] })
64
72
  }
65
- )
66
- ] }) });
73
+ );
74
+ };
67
75
  export {
68
76
  Gallery
69
77
  };