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,43 +3,50 @@ import { CompoundContainer } from "../../../puck-base/container.js";
3
3
  import { CompoundButton } from "../../../puck-base/button.js";
4
4
  import { cn } from "../../../../utils/css-utils.js";
5
5
  const Articles = ({
6
- padding,
7
- sectionStyle,
8
- backgroundColor,
9
6
  eyebrow,
10
7
  heading,
11
- button,
12
- columns = 3,
13
- cards: Cards
8
+ buttons,
9
+ cards: Cards,
10
+ styles
14
11
  }) => {
15
- return /* @__PURE__ */ jsxs(CompoundContainer, { padding, sectionStyle, backgroundColor, children: [
16
- /* @__PURE__ */ jsxs("div", { className: "mb-10 flex w-full flex-col gap-6 sm:flex-row sm:items-end sm:justify-between", children: [
17
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
18
- eyebrow && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm font-medium tracking-wide uppercase", children: eyebrow }),
19
- heading && /* @__PURE__ */ jsx("h2", { className: "font-serif font-regular max-w-xl text-3xl tracking-tighter md:text-4xl", children: heading })
20
- ] }),
21
- (button == null ? void 0 : button.label) ? /* @__PURE__ */ jsx("div", { className: "shrink-0", children: /* @__PURE__ */ jsx(
22
- CompoundButton,
23
- {
24
- label: button.label,
25
- url: button.url,
26
- variant: button.variant,
27
- size: button.size,
28
- icon: button.icon
29
- }
30
- ) }) : null
31
- ] }),
32
- Cards && /* @__PURE__ */ jsx(
33
- Cards,
34
- {
35
- className: cn("grid grid-cols-1 gap-8", {
36
- "sm:grid-cols-2": columns === 2,
37
- "sm:grid-cols-2 lg:grid-cols-3": columns === 3,
38
- "sm:grid-cols-2 lg:grid-cols-4": columns === 4
39
- })
40
- }
41
- )
42
- ] });
12
+ var _a;
13
+ const columns = (styles == null ? void 0 : styles.columns) ?? 3;
14
+ return /* @__PURE__ */ jsxs(
15
+ CompoundContainer,
16
+ {
17
+ padding: styles == null ? void 0 : styles.padding,
18
+ sectionStyle: styles == null ? void 0 : styles.sectionStyle,
19
+ backgroundColor: styles == null ? void 0 : styles.backgroundColor,
20
+ children: [
21
+ /* @__PURE__ */ jsxs("div", { className: "mb-10 flex w-full flex-col gap-6 sm:flex-row sm:items-end sm:justify-between", children: [
22
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
23
+ eyebrow && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm font-medium tracking-wide uppercase", children: eyebrow }),
24
+ heading && /* @__PURE__ */ jsx("h2", { className: "font-serif font-regular max-w-xl text-3xl tracking-tighter md:text-4xl", children: heading })
25
+ ] }),
26
+ ((_a = buttons == null ? void 0 : buttons[0]) == null ? void 0 : _a.label) ? /* @__PURE__ */ jsx("div", { className: "shrink-0", children: /* @__PURE__ */ jsx(
27
+ CompoundButton,
28
+ {
29
+ label: buttons[0].label,
30
+ url: buttons[0].url,
31
+ variant: buttons[0].variant,
32
+ size: buttons[0].size,
33
+ icon: buttons[0].icon
34
+ }
35
+ ) }) : null
36
+ ] }),
37
+ Cards && /* @__PURE__ */ jsx(
38
+ Cards,
39
+ {
40
+ className: cn("grid grid-cols-1 gap-8", {
41
+ "sm:grid-cols-2": columns === 2,
42
+ "sm:grid-cols-2 lg:grid-cols-3": columns === 3,
43
+ "sm:grid-cols-2 lg:grid-cols-4": columns === 4
44
+ })
45
+ }
46
+ )
47
+ ]
48
+ }
49
+ );
43
50
  };
44
51
  export {
45
52
  Articles
@@ -1,12 +1,6 @@
1
- import { paddingDefaults, backgroundColor, sectionStyle, padding, button, heading, image16x9Placeholder, cards } from "../../../puck-base/core/fields.js";
1
+ import { buttons, heading, image16x9Placeholder, cards } from "../../../puck-base/core/fields.js";
2
2
  import { Articles } from "./articles.js";
3
- const defaultButton = {
4
- label: "",
5
- url: "",
6
- variant: "default",
7
- size: "default",
8
- icon: "none"
9
- };
3
+ import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
10
4
  const { icon: defaultIcon, ...defaultCardProps } = cards.defaultItemProps;
11
5
  const defaultCard = {
12
6
  ...defaultCardProps,
@@ -16,29 +10,34 @@ const conf = {
16
10
  fields: {
17
11
  eyebrow: { type: "text", contentEditable: true },
18
12
  heading,
19
- button,
20
- columns: {
21
- type: "radio",
22
- options: [
23
- { label: "2", value: 2 },
24
- { label: "3", value: 3 },
25
- { label: "4", value: 4 }
26
- ]
27
- },
13
+ buttons,
28
14
  cards: {
29
15
  type: "slot",
30
16
  allow: ["ArticleCard"]
31
17
  },
32
- padding,
33
- sectionStyle,
34
- backgroundColor
18
+ styles: createStylesField({
19
+ columns: {
20
+ type: "radio",
21
+ options: [
22
+ { label: "2", value: 2 },
23
+ { label: "3", value: 3 },
24
+ { label: "4", value: 4 }
25
+ ]
26
+ }
27
+ })
35
28
  },
36
29
  defaultProps: {
37
- padding: paddingDefaults,
38
30
  eyebrow: "Latest News",
39
31
  heading: "Stories worth reading",
40
- button: defaultButton,
41
- columns: 3,
32
+ buttons: [
33
+ {
34
+ label: "",
35
+ url: "",
36
+ variant: "default",
37
+ size: "default",
38
+ icon: "none"
39
+ }
40
+ ],
42
41
  cards: Array.from({ length: 3 }).map((_, index) => ({
43
42
  type: "ArticleCard",
44
43
  props: {
@@ -47,7 +46,8 @@ const conf = {
47
46
  description: "A short summary of this article goes here.",
48
47
  button: { label: "", url: "", variant: "link", size: "default", icon: "move-right" }
49
48
  }
50
- }))
49
+ })),
50
+ styles: createStylesDefaults({ columns: 3 })
51
51
  },
52
52
  render: Articles
53
53
  };
@@ -1,9 +1,6 @@
1
1
  import { CompoundContainerProps } from "@/components/puck-base/container";
2
2
  import { CompoundButtonProps } from "@/components/puck-base/button";
3
3
  export interface ContentSectionProps {
4
- padding?: CompoundContainerProps["padding"];
5
- sectionStyle?: CompoundContainerProps["sectionStyle"];
6
- backgroundColor?: string;
7
4
  heading?: string;
8
5
  eyebrow?: string;
9
6
  description?: string;
@@ -14,7 +11,12 @@ export interface ContentSectionProps {
14
11
  };
15
12
  imagePosition?: "left" | "right" | "below" | "none";
16
13
  layout?: "centered" | "split" | "prose";
17
- dividers?: "none" | "both" | "top" | "bottom";
18
14
  buttons?: CompoundButtonProps[];
15
+ styles?: {
16
+ padding?: CompoundContainerProps["padding"];
17
+ sectionStyle?: CompoundContainerProps["sectionStyle"];
18
+ backgroundColor?: string;
19
+ dividers?: "none" | "both" | "top" | "bottom";
20
+ };
19
21
  }
20
- export declare const ContentSection: ({ padding, sectionStyle, backgroundColor, heading, eyebrow, description, content, image, imagePosition, layout, dividers, buttons, }: ContentSectionProps) => import("react/jsx-runtime").JSX.Element;
22
+ export declare const ContentSection: ({ heading, eyebrow, description, content, image, imagePosition, layout, buttons, styles, }: ContentSectionProps) => import("react/jsx-runtime").JSX.Element;
@@ -48,9 +48,6 @@ const ImageBlock = ({ image }) => /* @__PURE__ */ jsx("div", { className: "bg-mu
48
48
  }
49
49
  ) : /* @__PURE__ */ jsx("div", { className: "flex aspect-[4/3] w-full items-center justify-center", children: /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Content Image" }) }) });
50
50
  const ContentSection = ({
51
- padding,
52
- sectionStyle,
53
- backgroundColor,
54
51
  heading,
55
52
  eyebrow,
56
53
  description,
@@ -58,11 +55,12 @@ const ContentSection = ({
58
55
  image,
59
56
  imagePosition = "right",
60
57
  layout = "centered",
61
- dividers = "none",
62
- buttons
58
+ buttons,
59
+ styles
63
60
  }) => {
61
+ const dividers = (styles == null ? void 0 : styles.dividers) ?? "none";
64
62
  if (layout === "prose") {
65
- return /* @__PURE__ */ jsx(CompoundContainer, { padding, sectionStyle, backgroundColor, children: /* @__PURE__ */ jsx("div", { className: "mx-auto max-w-3xl", children: /* @__PURE__ */ jsx(
63
+ return /* @__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__ */ jsx("div", { className: "mx-auto max-w-3xl", children: /* @__PURE__ */ jsx(
66
64
  TextBlock,
67
65
  {
68
66
  eyebrow,
@@ -76,7 +74,7 @@ const ContentSection = ({
76
74
  }
77
75
  if (layout === "split" || imagePosition === "left" || imagePosition === "right") {
78
76
  const showImage2 = imagePosition !== "none" && (image == null ? void 0 : image.src);
79
- return /* @__PURE__ */ jsx(CompoundContainer, { padding, sectionStyle, backgroundColor, children: /* @__PURE__ */ jsxs(
77
+ return /* @__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(
80
78
  "div",
81
79
  {
82
80
  className: cn(
@@ -100,7 +98,7 @@ const ContentSection = ({
100
98
  ) });
101
99
  }
102
100
  const showImage = imagePosition !== "none" && (image == null ? void 0 : image.src);
103
- return /* @__PURE__ */ jsxs(CompoundContainer, { padding, sectionStyle, backgroundColor, children: [
101
+ return /* @__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: [
104
102
  (dividers === "both" || dividers === "top") && /* @__PURE__ */ jsx("hr", { className: "mb-12 border-foreground/15" }),
105
103
  /* @__PURE__ */ jsx("div", { className: "mx-auto max-w-3xl", children: /* @__PURE__ */ jsx(
106
104
  TextBlock,
@@ -1,5 +1,6 @@
1
- import { paddingDefaults, image16x9Placeholder, backgroundColor, sectionStyle, padding, buttons, image } from "../../../puck-base/core/fields.js";
1
+ import { image16x9Placeholder, buttons, image } from "../../../puck-base/core/fields.js";
2
2
  import { ContentSection } from "./content-section.js";
3
+ import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
3
4
  const conf = {
4
5
  fields: {
5
6
  eyebrow: { type: "text" },
@@ -24,19 +25,18 @@ const conf = {
24
25
  { label: "Prose", value: "prose" }
25
26
  ]
26
27
  },
27
- dividers: {
28
- type: "radio",
29
- options: [
30
- { label: "None", value: "none" },
31
- { label: "Top", value: "top" },
32
- { label: "Bottom", value: "bottom" },
33
- { label: "Both", value: "both" }
34
- ]
35
- },
36
28
  buttons,
37
- padding,
38
- sectionStyle,
39
- backgroundColor
29
+ styles: createStylesField({
30
+ dividers: {
31
+ type: "radio",
32
+ options: [
33
+ { label: "None", value: "none" },
34
+ { label: "Top", value: "top" },
35
+ { label: "Bottom", value: "bottom" },
36
+ { label: "Both", value: "both" }
37
+ ]
38
+ }
39
+ })
40
40
  },
41
41
  defaultProps: {
42
42
  eyebrow: "Why choose us",
@@ -62,7 +62,7 @@ const conf = {
62
62
  icon: "none"
63
63
  }
64
64
  ],
65
- padding: paddingDefaults
65
+ styles: createStylesDefaults({ dividers: "none" })
66
66
  },
67
67
  render: ContentSection
68
68
  };
@@ -0,0 +1,58 @@
1
+ type TextVariant = "articles-1" | "content-section-1" | "rich-text-1" | "tab-section-1" | "timeline-1" | "two-column-1";
2
+ type TextPadding = {
3
+ top?: "none" | "small" | "medium" | "large";
4
+ bottom?: "none" | "small" | "medium" | "large";
5
+ };
6
+ type TextSectionStyle = "default" | "dark" | "muted" | "inverted" | "custom";
7
+ type TextButton = {
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 TextBadge = {
15
+ label: string;
16
+ url?: string;
17
+ variant?: "default" | "secondary" | "destructive" | "outline";
18
+ };
19
+ type TextImage = {
20
+ src: string;
21
+ alt?: string;
22
+ aspectRatio?: "16x9" | "1x1";
23
+ };
24
+ type TextTab = {
25
+ label: string;
26
+ content: string;
27
+ image?: TextImage;
28
+ };
29
+ type TextTimelineItem = {
30
+ title: string;
31
+ description: string;
32
+ date?: string;
33
+ };
34
+ type TextSectionProps = {
35
+ variant?: TextVariant;
36
+ badge?: TextBadge;
37
+ eyebrow?: string;
38
+ heading?: string;
39
+ description?: string;
40
+ content?: string;
41
+ buttons?: TextButton[];
42
+ image?: TextImage;
43
+ images?: TextImage[];
44
+ imagePosition?: "left" | "right" | "below" | "none";
45
+ layout?: "centered" | "split" | "prose" | "text-start" | "text-end";
46
+ cards?: unknown;
47
+ tabs?: TextTab[];
48
+ items?: TextTimelineItem[];
49
+ styles?: {
50
+ padding?: TextPadding;
51
+ sectionStyle?: TextSectionStyle;
52
+ backgroundColor?: string;
53
+ columns?: 2 | 3 | 4;
54
+ dividers?: "none" | "both" | "top" | "bottom";
55
+ maxWidth?: "sm" | "md" | "lg" | "full";
56
+ border?: boolean;
57
+ };
58
+ };
@@ -1,5 +1,5 @@
1
- import { paddingDefaults, backgroundColor, sectionStyle, padding } from "../../../puck-base/core/fields.js";
2
1
  import { RichText } from "./rich-text.js";
2
+ import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
3
3
  const conf = {
4
4
  fields: {
5
5
  content: {
@@ -9,23 +9,21 @@ const conf = {
9
9
  instructions: "Write rich HTML content with headings, paragraphs, lists, and links."
10
10
  }
11
11
  },
12
- maxWidth: {
13
- type: "select",
14
- options: [
15
- { label: "Small", value: "sm" },
16
- { label: "Medium", value: "md" },
17
- { label: "Large", value: "lg" },
18
- { label: "Full Width", value: "full" }
19
- ]
20
- },
21
- padding,
22
- sectionStyle,
23
- backgroundColor
12
+ styles: createStylesField({
13
+ maxWidth: {
14
+ type: "select",
15
+ options: [
16
+ { label: "Small", value: "sm" },
17
+ { label: "Medium", value: "md" },
18
+ { label: "Large", value: "lg" },
19
+ { label: "Full Width", value: "full" }
20
+ ]
21
+ }
22
+ })
24
23
  },
25
24
  defaultProps: {
26
25
  content: "<h2>About Us</h2><p>We are a team of passionate builders creating tools that empower everyone to build beautiful websites.</p><p>Our mission is to make web design accessible to everyone.</p>",
27
- maxWidth: "md",
28
- padding: paddingDefaults
26
+ styles: createStylesDefaults({ maxWidth: "md" })
29
27
  },
30
28
  render: RichText
31
29
  };
@@ -1,9 +1,11 @@
1
1
  import { CompoundContainerProps } from "@/components/puck-base/container";
2
2
  export interface RichTextProps {
3
- padding?: CompoundContainerProps["padding"];
4
- sectionStyle?: CompoundContainerProps["sectionStyle"];
5
- backgroundColor?: string;
6
3
  content?: string;
7
- maxWidth?: "sm" | "md" | "lg" | "full";
4
+ styles?: {
5
+ padding?: CompoundContainerProps["padding"];
6
+ sectionStyle?: CompoundContainerProps["sectionStyle"];
7
+ backgroundColor?: string;
8
+ maxWidth?: "sm" | "md" | "lg" | "full";
9
+ };
8
10
  }
9
- export declare const RichText: ({ padding, sectionStyle, backgroundColor, content, maxWidth, }: RichTextProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const RichText: ({ content, styles, }: RichTextProps) => import("react/jsx-runtime").JSX.Element;
@@ -7,18 +7,18 @@ const MAX_WIDTH_MAP = {
7
7
  full: "max-w-none"
8
8
  };
9
9
  const RichText = ({
10
- padding,
11
- sectionStyle,
12
- backgroundColor,
13
10
  content = "",
14
- maxWidth = "md"
15
- }) => /* @__PURE__ */ jsx(CompoundContainer, { padding, sectionStyle, backgroundColor, children: /* @__PURE__ */ jsx(
16
- "div",
17
- {
18
- className: `${MAX_WIDTH_MAP[maxWidth]} prose prose-neutral dark:prose-invert mx-auto`,
19
- dangerouslySetInnerHTML: { __html: content }
20
- }
21
- ) });
11
+ styles
12
+ }) => {
13
+ const maxWidth = (styles == null ? void 0 : styles.maxWidth) ?? "md";
14
+ return /* @__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__ */ jsx(
15
+ "div",
16
+ {
17
+ className: `${MAX_WIDTH_MAP[maxWidth]} prose prose-neutral dark:prose-invert mx-auto`,
18
+ dangerouslySetInnerHTML: { __html: content }
19
+ }
20
+ ) });
21
+ };
22
22
  export {
23
23
  RichText
24
24
  };
@@ -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 { TabSection } from "./tab-section.js";
3
+ import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
3
4
  const conf = {
4
5
  fields: {
5
6
  heading: { type: "text", contentEditable: true },
@@ -19,9 +20,7 @@ const conf = {
19
20
  image: image16x9Placeholder
20
21
  }
21
22
  },
22
- padding,
23
- sectionStyle,
24
- backgroundColor
23
+ styles: createStylesField()
25
24
  },
26
25
  defaultProps: {
27
26
  heading: "How it works",
@@ -43,7 +42,7 @@ const conf = {
43
42
  image: image16x9Placeholder
44
43
  }
45
44
  ],
46
- padding: paddingDefaults
45
+ styles: createStylesDefaults()
47
46
  },
48
47
  render: TabSection
49
48
  };
@@ -1,8 +1,5 @@
1
1
  import { CompoundContainerProps } from "@/components/puck-base/container";
2
2
  export interface TabSectionProps {
3
- padding?: CompoundContainerProps["padding"];
4
- sectionStyle?: CompoundContainerProps["sectionStyle"];
5
- backgroundColor?: string;
6
3
  heading?: string;
7
4
  description?: string;
8
5
  tabs?: Array<{
@@ -13,5 +10,10 @@ export interface TabSectionProps {
13
10
  alt: string;
14
11
  };
15
12
  }>;
13
+ styles?: {
14
+ padding?: CompoundContainerProps["padding"];
15
+ sectionStyle?: CompoundContainerProps["sectionStyle"];
16
+ backgroundColor?: string;
17
+ };
16
18
  }
17
- export declare const TabSection: ({ padding, sectionStyle, backgroundColor, heading, description, tabs, }: TabSectionProps) => import("react/jsx-runtime").JSX.Element;
19
+ export declare const TabSection: ({ heading, description, tabs, styles, }: TabSectionProps) => import("react/jsx-runtime").JSX.Element;
@@ -5,16 +5,14 @@ import { cn } from "../../../../utils/css-utils.js";
5
5
  import { CompoundContainer } from "../../../puck-base/container.js";
6
6
  import { CompoundImage } from "../../../puck-base/image.js";
7
7
  const TabSection = ({
8
- padding,
9
- sectionStyle,
10
- backgroundColor,
11
8
  heading,
12
9
  description,
13
- tabs = []
10
+ tabs = [],
11
+ styles
14
12
  }) => {
15
13
  var _a, _b, _c, _d;
16
14
  const [active, setActive] = useState(0);
17
- return /* @__PURE__ */ jsxs(CompoundContainer, { padding, sectionStyle, backgroundColor, children: [
15
+ return /* @__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: [
18
16
  /* @__PURE__ */ jsxs("div", { className: "mb-12 max-w-2xl", children: [
19
17
  heading && /* @__PURE__ */ jsx("h2", { className: "text-foreground text-3xl font-bold tracking-tight md:text-4xl", children: heading }),
20
18
  description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mt-4 text-lg", children: description })
@@ -1,5 +1,5 @@
1
- import { paddingDefaults, backgroundColor, sectionStyle, padding } from "../../../puck-base/core/fields.js";
2
1
  import { Timeline } from "./timeline.js";
2
+ import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
3
3
  const conf = {
4
4
  fields: {
5
5
  heading: { type: "text", contentEditable: true },
@@ -19,9 +19,7 @@ const conf = {
19
19
  date: "2026"
20
20
  }
21
21
  },
22
- padding,
23
- sectionStyle,
24
- backgroundColor
22
+ styles: createStylesField()
25
23
  },
26
24
  defaultProps: {
27
25
  heading: "Our Journey",
@@ -43,7 +41,7 @@ const conf = {
43
41
  date: "2023"
44
42
  }
45
43
  ],
46
- padding: paddingDefaults
44
+ styles: createStylesDefaults()
47
45
  },
48
46
  render: Timeline
49
47
  };
@@ -1,8 +1,5 @@
1
1
  import { CompoundContainerProps } from "@/components/puck-base/container";
2
2
  export interface TimelineProps {
3
- padding?: CompoundContainerProps["padding"];
4
- sectionStyle?: CompoundContainerProps["sectionStyle"];
5
- backgroundColor?: string;
6
3
  heading?: string;
7
4
  description?: string;
8
5
  items?: Array<{
@@ -10,5 +7,10 @@ export interface TimelineProps {
10
7
  description: string;
11
8
  date?: string;
12
9
  }>;
10
+ styles?: {
11
+ padding?: CompoundContainerProps["padding"];
12
+ sectionStyle?: CompoundContainerProps["sectionStyle"];
13
+ backgroundColor?: string;
14
+ };
13
15
  }
14
- export declare const Timeline: ({ padding, sectionStyle, backgroundColor, heading, description, items, }: TimelineProps) => import("react/jsx-runtime").JSX.Element;
16
+ export declare const Timeline: ({ heading, description, items, styles, }: TimelineProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,13 +1,11 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { CompoundContainer } from "../../../puck-base/container.js";
3
3
  const Timeline = ({
4
- padding,
5
- sectionStyle,
6
- backgroundColor,
7
4
  heading,
8
5
  description,
9
- items = []
10
- }) => /* @__PURE__ */ jsxs(CompoundContainer, { padding, sectionStyle, backgroundColor, children: [
6
+ items = [],
7
+ styles
8
+ }) => /* @__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: [
11
9
  /* @__PURE__ */ jsxs("div", { className: "mb-12 max-w-2xl", children: [
12
10
  heading && /* @__PURE__ */ jsx("h2", { className: "text-foreground text-3xl font-bold tracking-tight md:text-4xl", children: heading }),
13
11
  description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mt-4 text-lg", children: description })
@@ -1,5 +1,6 @@
1
- import { paddingDefaults, backgroundColor, sectionStyle, padding, images, contentFieldsWithFeatures, getPlaceholderImageUrl } from "../../../puck-base/core/fields.js";
1
+ import { images, contentFieldsWithFeatures, getPlaceholderImageUrl } from "../../../puck-base/core/fields.js";
2
2
  import { TwoColumn } from "./two-column.js";
3
+ import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
3
4
  const conf = {
4
5
  fields: {
5
6
  ...contentFieldsWithFeatures,
@@ -28,7 +29,6 @@ const conf = {
28
29
  }
29
30
  },
30
31
  border: {
31
- // TODO: would be good to have boolean values
32
32
  type: "radio",
33
33
  options: [
34
34
  { label: "yes", value: "true" },
@@ -48,9 +48,7 @@ const conf = {
48
48
  }
49
49
  ]
50
50
  },
51
- padding,
52
- sectionStyle,
53
- backgroundColor
51
+ styles: createStylesField()
54
52
  },
55
53
  defaultProps: {
56
54
  heading: "This is the start of something new",
@@ -81,7 +79,7 @@ const conf = {
81
79
  }
82
80
  ],
83
81
  layout: "text-start",
84
- padding: paddingDefaults
82
+ styles: createStylesDefaults()
85
83
  },
86
84
  render: TwoColumn
87
85
  };
@@ -5,12 +5,14 @@ type ImageWithAspectRatio = CompoundImageProps & {
5
5
  aspectRatio?: "16x9" | "1x1";
6
6
  };
7
7
  export interface TwoColumnProps extends CompoundContentProps {
8
- padding?: CompoundContainerProps["padding"];
9
- sectionStyle?: CompoundContainerProps["sectionStyle"];
10
- backgroundColor?: string;
11
8
  layout?: "text-start" | "text-end";
12
9
  images?: ImageWithAspectRatio[];
13
10
  border?: "true" | "false";
11
+ styles?: {
12
+ padding?: CompoundContainerProps["padding"];
13
+ sectionStyle?: CompoundContainerProps["sectionStyle"];
14
+ backgroundColor?: string;
15
+ };
14
16
  }
15
- export declare const TwoColumn: ({ padding, sectionStyle, backgroundColor, layout, border, badge, heading, description, features, buttons, images, }: TwoColumnProps) => import("react/jsx-runtime").JSX.Element;
17
+ export declare const TwoColumn: ({ layout, border, badge, heading, description, features, buttons, images, styles, }: TwoColumnProps) => import("react/jsx-runtime").JSX.Element;
16
18
  export {};
@@ -6,9 +6,6 @@ import { CompoundContainer } from "../../../puck-base/container.js";
6
6
  import { CompoundContent } from "../../../puck-base/content.js";
7
7
  import { CompoundImage } from "../../../puck-base/image.js";
8
8
  const TwoColumn = ({
9
- padding,
10
- sectionStyle,
11
- backgroundColor,
12
9
  layout,
13
10
  border = "false",
14
11
  badge,
@@ -16,16 +13,17 @@ const TwoColumn = ({
16
13
  description,
17
14
  features,
18
15
  buttons,
19
- images
16
+ images,
17
+ styles
20
18
  }) => {
21
19
  const hasSingleImage = Array.isArray(images) && images.length === 1;
22
20
  const hasMultipleImages = Array.isArray(images) && images.length > 1;
23
21
  return /* @__PURE__ */ jsx(
24
22
  CompoundContainer,
25
23
  {
26
- padding,
27
- sectionStyle,
28
- backgroundColor,
24
+ padding: styles == null ? void 0 : styles.padding,
25
+ sectionStyle: styles == null ? void 0 : styles.sectionStyle,
26
+ backgroundColor: styles == null ? void 0 : styles.backgroundColor,
29
27
  children: /* @__PURE__ */ jsxs(
30
28
  "div",
31
29
  {