dune-react 0.0.9 → 0.0.11

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 (210) hide show
  1. package/dist/components/puck-base/article-card.js +1 -1
  2. package/dist/components/puck-base/button.d.ts +0 -1
  3. package/dist/components/puck-base/button.js +5 -4
  4. package/dist/components/puck-base/card.js +0 -1
  5. package/dist/components/puck-base/content.js +0 -1
  6. package/dist/components/puck-base/core/fields.d.ts +2 -150
  7. package/dist/components/puck-base/core/fields.js +7 -83
  8. package/dist/components/puck-base/core/styles.d.ts +1946 -0
  9. package/dist/components/puck-base/core/styles.js +250 -0
  10. package/dist/components/puck-base/core/with-editable.d.ts +5 -7
  11. package/dist/components/puck-base/core/with-editable.js +69 -64
  12. package/dist/components/puck-base/{action-field.d.ts → fields/action-field.d.ts} +1 -1
  13. package/dist/components/puck-base/{action-field.js → fields/action-field.js} +91 -16
  14. package/dist/components/puck-base/fields/auto-field.d.ts +0 -1
  15. package/dist/components/puck-base/fields/auto-field.js +2 -90
  16. package/dist/components/puck-base/form.js +0 -1
  17. package/dist/components/puck-base/index.d.ts +1 -1
  18. package/dist/components/puck-base/navigation-menu.d.ts +18 -0
  19. package/dist/components/puck-base/navigation-menu.js +202 -0
  20. package/dist/components/puck-block/banner-sections/announcement-banner-1/announcement-banner.d.ts +9 -7
  21. package/dist/components/puck-block/banner-sections/announcement-banner-1/announcement-banner.js +11 -8
  22. package/dist/components/puck-block/banner-sections/announcement-banner-1/index.js +19 -37
  23. package/dist/components/puck-block/banner-sections/marquee-1/index.js +26 -24
  24. package/dist/components/puck-block/banner-sections/marquee-1/marquee.d.ts +9 -9
  25. package/dist/components/puck-block/banner-sections/marquee-1/marquee.js +28 -21
  26. package/dist/components/puck-block/banner-sections/props.d.ts +22 -0
  27. package/dist/components/puck-block/contact-sections/contact-us-1/contact-us.d.ts +13 -4
  28. package/dist/components/puck-block/contact-sections/contact-us-1/contact-us.js +114 -105
  29. package/dist/components/puck-block/contact-sections/contact-us-1/index.js +87 -7
  30. package/dist/components/puck-block/contact-sections/contact-us-2/contact-us-2.d.ts +15 -11
  31. package/dist/components/puck-block/contact-sections/contact-us-2/contact-us-2.js +27 -22
  32. package/dist/components/puck-block/contact-sections/contact-us-2/index.js +54 -52
  33. package/dist/components/puck-block/contact-sections/contact-us-3/contact-us-3.d.ts +15 -12
  34. package/dist/components/puck-block/contact-sections/contact-us-3/contact-us-3.js +29 -24
  35. package/dist/components/puck-block/contact-sections/contact-us-3/index.js +73 -60
  36. package/dist/components/puck-block/contact-sections/props.d.ts +65 -0
  37. package/dist/components/puck-block/cta-sections/banner-cta-1/banner-cta.d.ts +13 -9
  38. package/dist/components/puck-block/cta-sections/banner-cta-1/banner-cta.js +28 -30
  39. package/dist/components/puck-block/cta-sections/banner-cta-1/index.js +23 -25
  40. package/dist/components/puck-block/cta-sections/cta-1/cta.d.ts +6 -4
  41. package/dist/components/puck-block/cta-sections/cta-1/cta.js +5 -7
  42. package/dist/components/puck-block/cta-sections/cta-1/index.js +5 -9
  43. package/dist/components/puck-block/cta-sections/gradient-cta-1/gradient-cta.d.ts +10 -10
  44. package/dist/components/puck-block/cta-sections/gradient-cta-1/gradient-cta.js +48 -22
  45. package/dist/components/puck-block/cta-sections/gradient-cta-1/index.js +36 -29
  46. package/dist/components/puck-block/cta-sections/newsletter-signup-1/index.js +13 -5
  47. package/dist/components/puck-block/cta-sections/newsletter-signup-1/newsletter-signup.d.ts +7 -3
  48. package/dist/components/puck-block/cta-sections/newsletter-signup-1/newsletter-signup.js +35 -32
  49. package/dist/components/puck-block/cta-sections/promo-section-1/index.js +5 -7
  50. package/dist/components/puck-block/cta-sections/promo-section-1/promo-section.d.ts +6 -4
  51. package/dist/components/puck-block/cta-sections/promo-section-1/promo-section.js +93 -79
  52. package/dist/components/puck-block/cta-sections/props.d.ts +47 -0
  53. package/dist/components/puck-block/faq-sections/accordion-1/accordion.d.ts +6 -4
  54. package/dist/components/puck-block/faq-sections/accordion-1/accordion.js +44 -33
  55. package/dist/components/puck-block/faq-sections/accordion-1/index.js +3 -5
  56. package/dist/components/puck-block/faq-sections/faq-1/faq.d.ts +9 -7
  57. package/dist/components/puck-block/faq-sections/faq-1/faq.js +50 -44
  58. package/dist/components/puck-block/faq-sections/faq-1/index.js +12 -14
  59. package/dist/components/puck-block/faq-sections/faq-2/faq-2.d.ts +6 -4
  60. package/dist/components/puck-block/faq-sections/faq-2/faq-2.js +4 -6
  61. package/dist/components/puck-block/faq-sections/faq-2/index.js +4 -5
  62. package/dist/components/puck-block/faq-sections/props.d.ts +30 -0
  63. package/dist/components/puck-block/feature-sections/bento-1/bento.d.ts +6 -4
  64. package/dist/components/puck-block/feature-sections/bento-1/bento.js +2 -4
  65. package/dist/components/puck-block/feature-sections/bento-1/index.js +4 -5
  66. package/dist/components/puck-block/feature-sections/feature-cards-1/feature-cards.d.ts +6 -4
  67. package/dist/components/puck-block/feature-sections/feature-cards-1/feature-cards.js +2 -4
  68. package/dist/components/puck-block/feature-sections/feature-cards-1/index.js +4 -7
  69. package/dist/components/puck-block/feature-sections/feature-showcase-1/feature-showcase.d.ts +6 -4
  70. package/dist/components/puck-block/feature-sections/feature-showcase-1/feature-showcase.js +2 -4
  71. package/dist/components/puck-block/feature-sections/feature-showcase-1/index.js +4 -5
  72. package/dist/components/puck-block/feature-sections/icon-grid-1/icon-grid.d.ts +6 -4
  73. package/dist/components/puck-block/feature-sections/icon-grid-1/icon-grid.js +59 -53
  74. package/dist/components/puck-block/feature-sections/icon-grid-1/index.js +7 -8
  75. package/dist/components/puck-block/feature-sections/product-features-1/index.js +4 -5
  76. package/dist/components/puck-block/feature-sections/product-features-1/product-features.d.ts +6 -4
  77. package/dist/components/puck-block/feature-sections/product-features-1/product-features.js +2 -4
  78. package/dist/components/puck-block/feature-sections/props.d.ts +48 -0
  79. package/dist/components/puck-block/footer-sections/footer-1/footer.d.ts +5 -3
  80. package/dist/components/puck-block/footer-sections/footer-1/footer.js +6 -6
  81. package/dist/components/puck-block/footer-sections/footer-1/index.js +3 -5
  82. package/dist/components/puck-block/footer-sections/props.d.ts +31 -0
  83. package/dist/components/puck-block/gallery-sections/gallery-1/gallery.d.ts +9 -7
  84. package/dist/components/puck-block/gallery-sections/gallery-1/gallery.js +48 -40
  85. package/dist/components/puck-block/gallery-sections/gallery-1/index.js +33 -35
  86. package/dist/components/puck-block/gallery-sections/gallery-2/gallery-2.d.ts +6 -4
  87. package/dist/components/puck-block/gallery-sections/gallery-2/gallery-2.js +19 -13
  88. package/dist/components/puck-block/gallery-sections/gallery-2/index.js +4 -6
  89. package/dist/components/puck-block/gallery-sections/gallery-3/gallery-3.d.ts +7 -5
  90. package/dist/components/puck-block/gallery-sections/gallery-3/gallery-3.js +5 -7
  91. package/dist/components/puck-block/gallery-sections/gallery-3/index.js +13 -14
  92. package/dist/components/puck-block/gallery-sections/props.d.ts +26 -0
  93. package/dist/components/puck-block/header-sections/header-1/header.d.ts +11 -6
  94. package/dist/components/puck-block/header-sections/header-1/header.js +34 -28
  95. package/dist/components/puck-block/header-sections/header-1/index.d.ts +1 -1
  96. package/dist/components/puck-block/header-sections/header-1/index.js +26 -30
  97. package/dist/components/puck-block/header-sections/props.d.ts +41 -0
  98. package/dist/components/puck-block/header-sections/sticky-nav-1/index.js +12 -12
  99. package/dist/components/puck-block/header-sections/sticky-nav-1/sticky-nav.d.ts +8 -6
  100. package/dist/components/puck-block/header-sections/sticky-nav-1/sticky-nav.js +5 -5
  101. package/dist/components/puck-block/hero-sections/fullscreen-hero-1/fullscreen-hero.d.ts +7 -5
  102. package/dist/components/puck-block/hero-sections/fullscreen-hero-1/fullscreen-hero.js +19 -5
  103. package/dist/components/puck-block/hero-sections/fullscreen-hero-1/index.js +17 -17
  104. package/dist/components/puck-block/hero-sections/gradient-hero-1/gradient-hero.d.ts +8 -4
  105. package/dist/components/puck-block/hero-sections/gradient-hero-1/gradient-hero.js +36 -26
  106. package/dist/components/puck-block/hero-sections/gradient-hero-1/index.js +19 -15
  107. package/dist/components/puck-block/hero-sections/grid-hero-1/grid-hero.d.ts +7 -6
  108. package/dist/components/puck-block/hero-sections/grid-hero-1/grid-hero.js +8 -11
  109. package/dist/components/puck-block/hero-sections/grid-hero-1/index.js +43 -11
  110. package/dist/components/puck-block/hero-sections/hero-1/hero.d.ts +6 -4
  111. package/dist/components/puck-block/hero-sections/hero-1/hero.js +6 -8
  112. package/dist/components/puck-block/hero-sections/hero-1/index.js +4 -4
  113. package/dist/components/puck-block/hero-sections/image-hero-1/image-hero.d.ts +9 -7
  114. package/dist/components/puck-block/hero-sections/image-hero-1/image-hero.js +65 -59
  115. package/dist/components/puck-block/hero-sections/image-hero-1/index.js +35 -36
  116. package/dist/components/puck-block/hero-sections/props.d.ts +71 -0
  117. package/dist/components/puck-block/hero-sections/split-hero-1/index.js +6 -5
  118. package/dist/components/puck-block/hero-sections/split-hero-1/split-hero.d.ts +8 -8
  119. package/dist/components/puck-block/hero-sections/split-hero-1/split-hero.js +48 -47
  120. package/dist/components/puck-block/hero-sections/video-hero-1/index.js +4 -3
  121. package/dist/components/puck-block/hero-sections/video-hero-1/video-hero.d.ts +6 -2
  122. package/dist/components/puck-block/hero-sections/video-hero-1/video-hero.js +30 -22
  123. package/dist/components/puck-block/location-sections/location-1/index.js +44 -42
  124. package/dist/components/puck-block/location-sections/location-1/location.d.ts +8 -6
  125. package/dist/components/puck-block/location-sections/location-1/location.js +8 -15
  126. package/dist/components/puck-block/location-sections/location-2/index.js +66 -57
  127. package/dist/components/puck-block/location-sections/location-2/location.d.ts +12 -6
  128. package/dist/components/puck-block/location-sections/location-2/location.js +8 -14
  129. package/dist/components/puck-block/location-sections/location-3/index.js +25 -24
  130. package/dist/components/puck-block/location-sections/location-3/location.d.ts +10 -6
  131. package/dist/components/puck-block/location-sections/location-3/location.js +12 -11
  132. package/dist/components/puck-block/location-sections/props.d.ts +45 -0
  133. package/dist/components/puck-block/metrics-sections/props.d.ts +43 -0
  134. package/dist/components/puck-block/metrics-sections/stats-1/index.js +6 -7
  135. package/dist/components/puck-block/metrics-sections/stats-1/stats.d.ts +7 -5
  136. package/dist/components/puck-block/metrics-sections/stats-1/stats.js +61 -55
  137. package/dist/components/puck-block/metrics-sections/stats-2/index.js +4 -7
  138. package/dist/components/puck-block/metrics-sections/stats-2/stats-2.d.ts +6 -4
  139. package/dist/components/puck-block/metrics-sections/stats-2/stats-2.js +4 -7
  140. package/dist/components/puck-block/metrics-sections/stats-3/index.js +19 -29
  141. package/dist/components/puck-block/metrics-sections/stats-3/stats-3.d.ts +7 -6
  142. package/dist/components/puck-block/metrics-sections/stats-3/stats-3.js +22 -13
  143. package/dist/components/puck-block/pricing-sections/comparison-1/comparison.d.ts +7 -5
  144. package/dist/components/puck-block/pricing-sections/comparison-1/comparison.js +45 -39
  145. package/dist/components/puck-block/pricing-sections/comparison-1/index.js +5 -7
  146. package/dist/components/puck-block/pricing-sections/pricing-1/index.js +10 -13
  147. package/dist/components/puck-block/pricing-sections/pricing-1/pricing.d.ts +8 -6
  148. package/dist/components/puck-block/pricing-sections/pricing-1/pricing.js +47 -35
  149. package/dist/components/puck-block/pricing-sections/pricing-2/index.js +7 -12
  150. package/dist/components/puck-block/pricing-sections/pricing-2/pricing-2.d.ts +6 -4
  151. package/dist/components/puck-block/pricing-sections/pricing-2/pricing-2.js +60 -57
  152. package/dist/components/puck-block/pricing-sections/props.d.ts +46 -0
  153. package/dist/components/puck-block/showcase-sections/before-after-1/before-after.d.ts +7 -5
  154. package/dist/components/puck-block/showcase-sections/before-after-1/before-after.js +8 -10
  155. package/dist/components/puck-block/showcase-sections/before-after-1/index.js +6 -8
  156. package/dist/components/puck-block/showcase-sections/case-study-1/case-study.d.ts +6 -2
  157. package/dist/components/puck-block/showcase-sections/case-study-1/case-study.js +29 -21
  158. package/dist/components/puck-block/showcase-sections/case-study-1/index.js +4 -3
  159. package/dist/components/puck-block/showcase-sections/props.d.ts +48 -0
  160. package/dist/components/puck-block/showcase-sections/step-by-step-1/index.js +3 -5
  161. package/dist/components/puck-block/showcase-sections/step-by-step-1/step-by-step.d.ts +6 -4
  162. package/dist/components/puck-block/showcase-sections/step-by-step-1/step-by-step.js +38 -41
  163. package/dist/components/puck-block/team-sections/props.d.ts +39 -0
  164. package/dist/components/puck-block/team-sections/team-grid-1/index.js +5 -6
  165. package/dist/components/puck-block/team-sections/team-grid-1/team-grid.d.ts +6 -4
  166. package/dist/components/puck-block/team-sections/team-grid-1/team-grid.js +23 -17
  167. package/dist/components/puck-block/team-sections/team-grid-2/index.js +4 -7
  168. package/dist/components/puck-block/team-sections/team-grid-2/team-grid-2.d.ts +6 -4
  169. package/dist/components/puck-block/team-sections/team-grid-2/team-grid-2.js +5 -7
  170. package/dist/components/puck-block/team-sections/team-profiles-1/index.js +4 -5
  171. package/dist/components/puck-block/team-sections/team-profiles-1/team-profiles.d.ts +6 -4
  172. package/dist/components/puck-block/team-sections/team-profiles-1/team-profiles.js +5 -7
  173. package/dist/components/puck-block/testimonial-sections/customers-1/customers.d.ts +9 -7
  174. package/dist/components/puck-block/testimonial-sections/customers-1/customers.js +8 -11
  175. package/dist/components/puck-block/testimonial-sections/customers-1/index.js +17 -17
  176. package/dist/components/puck-block/testimonial-sections/logo-marquee-1/index.js +15 -12
  177. package/dist/components/puck-block/testimonial-sections/logo-marquee-1/logo-marquee.d.ts +7 -3
  178. package/dist/components/puck-block/testimonial-sections/logo-marquee-1/logo-marquee.js +33 -24
  179. package/dist/components/puck-block/testimonial-sections/logo-wall-1/index.js +17 -16
  180. package/dist/components/puck-block/testimonial-sections/logo-wall-1/logo-wall.d.ts +6 -4
  181. package/dist/components/puck-block/testimonial-sections/logo-wall-1/logo-wall.js +5 -7
  182. package/dist/components/puck-block/testimonial-sections/props.d.ts +34 -0
  183. package/dist/components/puck-block/testimonial-sections/review-section-1/index.js +17 -16
  184. package/dist/components/puck-block/testimonial-sections/review-section-1/review-section.d.ts +8 -6
  185. package/dist/components/puck-block/testimonial-sections/review-section-1/review-section.js +22 -17
  186. package/dist/components/puck-block/testimonial-sections/testimonials-1/index.js +17 -17
  187. package/dist/components/puck-block/testimonial-sections/testimonials-1/testimonials.d.ts +8 -6
  188. package/dist/components/puck-block/testimonial-sections/testimonials-1/testimonials.js +100 -67
  189. package/dist/components/puck-block/text-sections/articles-1/articles.d.ts +7 -5
  190. package/dist/components/puck-block/text-sections/articles-1/articles.js +41 -34
  191. package/dist/components/puck-block/text-sections/articles-1/index.js +24 -25
  192. package/dist/components/puck-block/text-sections/content-section-1/content-section.d.ts +7 -5
  193. package/dist/components/puck-block/text-sections/content-section-1/content-section.js +6 -9
  194. package/dist/components/puck-block/text-sections/content-section-1/index.js +14 -16
  195. package/dist/components/puck-block/text-sections/props.d.ts +58 -0
  196. package/dist/components/puck-block/text-sections/rich-text-1/index.js +13 -15
  197. package/dist/components/puck-block/text-sections/rich-text-1/rich-text.d.ts +7 -5
  198. package/dist/components/puck-block/text-sections/rich-text-1/rich-text.js +11 -11
  199. package/dist/components/puck-block/text-sections/tab-section-1/index.js +4 -5
  200. package/dist/components/puck-block/text-sections/tab-section-1/tab-section.d.ts +6 -4
  201. package/dist/components/puck-block/text-sections/tab-section-1/tab-section.js +10 -8
  202. package/dist/components/puck-block/text-sections/timeline-1/index.js +3 -5
  203. package/dist/components/puck-block/text-sections/timeline-1/timeline.d.ts +6 -4
  204. package/dist/components/puck-block/text-sections/timeline-1/timeline.js +3 -5
  205. package/dist/components/puck-block/text-sections/two-column-1/index.js +4 -6
  206. package/dist/components/puck-block/text-sections/two-column-1/two-column.d.ts +6 -4
  207. package/dist/components/puck-block/text-sections/two-column-1/two-column.js +5 -7
  208. package/dist/components/shadcn/navigation-menu.js +8 -33
  209. package/dist/index.js +3 -2
  210. package/package.json +2 -2
@@ -4,43 +4,54 @@ import { useState } from "react";
4
4
  import { cn } from "../../../../utils/css-utils.js";
5
5
  import { CompoundContainer } from "../../../puck-base/container.js";
6
6
  const Accordion = ({
7
- padding,
8
- sectionStyle,
9
- backgroundColor,
10
7
  heading,
11
8
  description,
12
- items = []
9
+ items = [],
10
+ styles
13
11
  }) => {
14
12
  const [openIndex, setOpenIndex] = useState(null);
15
- return /* @__PURE__ */ jsxs(CompoundContainer, { padding, sectionStyle, backgroundColor, children: [
16
- /* @__PURE__ */ jsxs("div", { className: "mb-12 max-w-2xl", children: [
17
- heading && /* @__PURE__ */ jsx("h2", { className: "text-foreground text-3xl font-bold tracking-tight md:text-4xl", children: heading }),
18
- description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mt-4 text-lg", children: description })
19
- ] }),
20
- /* @__PURE__ */ jsx("div", { className: "divide-border max-w-3xl divide-y", children: items.map((item, i) => /* @__PURE__ */ jsxs("div", { children: [
21
- /* @__PURE__ */ jsxs(
22
- "button",
23
- {
24
- onClick: () => setOpenIndex(openIndex === i ? null : i),
25
- className: "flex w-full items-center justify-between py-4 text-left",
26
- children: [
27
- /* @__PURE__ */ jsx("span", { className: "text-foreground font-medium", children: item.title }),
28
- /* @__PURE__ */ jsx(
29
- "span",
30
- {
31
- className: cn(
32
- "text-muted-foreground transition-transform",
33
- openIndex === i && "rotate-45"
34
- ),
35
- children: "+"
36
- }
37
- )
38
- ]
39
- }
40
- ),
41
- openIndex === i && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground pb-4 leading-relaxed", children: item.content })
42
- ] }, i)) })
43
- ] });
13
+ return /* @__PURE__ */ jsxs(
14
+ CompoundContainer,
15
+ {
16
+ padding: styles == null ? void 0 : styles.padding,
17
+ sectionStyle: styles == null ? void 0 : styles.sectionStyle,
18
+ backgroundColor: styles == null ? void 0 : styles.backgroundColor,
19
+ children: [
20
+ /* @__PURE__ */ jsxs("div", { className: "mb-12 max-w-2xl", children: [
21
+ heading && /* @__PURE__ */ jsx("h2", { className: "text-foreground text-3xl font-bold tracking-tight md:text-4xl", children: heading }),
22
+ description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mt-4 text-lg", children: description })
23
+ ] }),
24
+ /* @__PURE__ */ jsx("div", { className: "divide-border max-w-3xl divide-y", children: items.map((item, i) => /* @__PURE__ */ jsxs("div", { children: [
25
+ /* @__PURE__ */ jsxs(
26
+ "button",
27
+ {
28
+ onClick: (e) => {
29
+ e.stopPropagation();
30
+ setOpenIndex(openIndex === i ? null : i);
31
+ },
32
+ style: { pointerEvents: "auto" },
33
+ className: "flex w-full items-center justify-between py-4 text-left cursor-pointer",
34
+ children: [
35
+ /* @__PURE__ */ jsx("span", { className: "text-foreground font-medium", style: { pointerEvents: "none" }, children: item.title }),
36
+ /* @__PURE__ */ jsx(
37
+ "span",
38
+ {
39
+ className: cn(
40
+ "text-muted-foreground transition-transform",
41
+ openIndex === i && "rotate-45"
42
+ ),
43
+ style: { pointerEvents: "none" },
44
+ children: "+"
45
+ }
46
+ )
47
+ ]
48
+ }
49
+ ),
50
+ openIndex === i && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground pb-4 leading-relaxed", children: item.content })
51
+ ] }, i)) })
52
+ ]
53
+ }
54
+ );
44
55
  };
45
56
  export {
46
57
  Accordion
@@ -1,5 +1,5 @@
1
- import { paddingDefaults, backgroundColor, sectionStyle, padding } from "../../../puck-base/core/fields.js";
2
1
  import { Accordion } from "./accordion.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 },
@@ -11,9 +11,7 @@ const conf = {
11
11
  arrayFields: { title: { type: "text" }, content: { type: "textarea" } },
12
12
  defaultItemProps: { title: "Question?", content: "Answer here." }
13
13
  },
14
- padding,
15
- sectionStyle,
16
- backgroundColor
14
+ styles: createStylesField()
17
15
  },
18
16
  defaultProps: {
19
17
  heading: "Frequently Asked Questions",
@@ -32,7 +30,7 @@ const conf = {
32
30
  content: "Yes, you can cancel your subscription at any time."
33
31
  }
34
32
  ],
35
- padding: paddingDefaults
33
+ styles: createStylesDefaults()
36
34
  },
37
35
  render: Accordion
38
36
  };
@@ -1,15 +1,17 @@
1
1
  import { CompoundContainerProps } from "@/components/puck-base/container";
2
2
  import { CompoundContentProps } from "@/components/puck-base/content";
3
3
  export interface FaqProps extends CompoundContentProps {
4
- padding?: CompoundContainerProps["padding"];
5
- sectionStyle?: CompoundContainerProps["sectionStyle"];
6
- backgroundColor?: string;
7
4
  layout?: "single-col" | "two-col";
8
- type?: "single" | "multiple";
9
- collapsible?: "true" | "false";
10
- faqs: {
5
+ expandMode?: "single" | "multiple";
6
+ collapsible?: boolean;
7
+ items: {
11
8
  question: string;
12
9
  answer: string;
13
10
  }[];
11
+ styles?: {
12
+ padding?: CompoundContainerProps["padding"];
13
+ sectionStyle?: CompoundContainerProps["sectionStyle"];
14
+ backgroundColor?: string;
15
+ };
14
16
  }
15
- export declare const Faq: ({ padding, sectionStyle, backgroundColor, layout, badge, heading, description, buttons, type, collapsible, faqs, }: FaqProps) => import("react/jsx-runtime").JSX.Element;
17
+ export declare const Faq: ({ layout, badge, heading, description, buttons, expandMode, collapsible, items, styles, }: FaqProps) => import("react/jsx-runtime").JSX.Element;
@@ -5,58 +5,64 @@ import { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from "..
5
5
  import { CompoundContainer } from "../../../puck-base/container.js";
6
6
  import { CompoundContent } from "../../../puck-base/content.js";
7
7
  const Faq = ({
8
- padding,
9
- sectionStyle,
10
- backgroundColor,
11
8
  layout = "two-col",
12
9
  badge,
13
10
  heading,
14
11
  description,
15
12
  buttons,
16
- type = "single",
17
- collapsible = "true",
18
- faqs
19
- }) => /* @__PURE__ */ jsx(CompoundContainer, { padding, sectionStyle, backgroundColor, children: /* @__PURE__ */ jsxs(
20
- "div",
13
+ expandMode = "single",
14
+ collapsible = true,
15
+ items,
16
+ styles
17
+ }) => /* @__PURE__ */ jsx(
18
+ CompoundContainer,
21
19
  {
22
- className: cn("grid gap-10", {
23
- "items-center lg:grid-cols-1": layout === "single-col",
24
- "lg:grid-cols-2": layout === "two-col"
25
- }),
26
- children: [
27
- /* @__PURE__ */ jsx(
28
- CompoundContent,
29
- {
30
- badge,
31
- heading,
32
- description,
33
- buttons,
34
- alignContent: layout === "single-col" ? "center" : "start"
35
- }
36
- ),
37
- /* @__PURE__ */ jsx(
38
- Accordion,
39
- {
40
- type,
41
- collapsible: collapsible === "true",
42
- className: "w-full",
43
- children: faqs.map((faq, index) => /* @__PURE__ */ jsxs(
44
- AccordionItem,
20
+ padding: styles == null ? void 0 : styles.padding,
21
+ sectionStyle: styles == null ? void 0 : styles.sectionStyle,
22
+ backgroundColor: styles == null ? void 0 : styles.backgroundColor,
23
+ children: /* @__PURE__ */ jsxs(
24
+ "div",
25
+ {
26
+ className: cn("grid gap-10", {
27
+ "items-center lg:grid-cols-1": layout === "single-col",
28
+ "lg:grid-cols-2": layout === "two-col"
29
+ }),
30
+ children: [
31
+ /* @__PURE__ */ jsx(
32
+ CompoundContent,
45
33
  {
46
- value: "index-" + index,
47
- ref: registerOverlayPortal,
48
- children: [
49
- /* @__PURE__ */ jsx(AccordionTrigger, { children: faq.question }),
50
- /* @__PURE__ */ jsx(AccordionContent, { children: faq.answer })
51
- ]
52
- },
53
- index
54
- ))
55
- }
56
- )
57
- ]
34
+ badge,
35
+ heading,
36
+ description,
37
+ buttons,
38
+ alignContent: layout === "single-col" ? "center" : "start"
39
+ }
40
+ ),
41
+ /* @__PURE__ */ jsx(
42
+ Accordion,
43
+ {
44
+ type: expandMode,
45
+ collapsible,
46
+ className: "w-full",
47
+ children: items.map((faq, index) => /* @__PURE__ */ jsxs(
48
+ AccordionItem,
49
+ {
50
+ value: "index-" + index,
51
+ ref: registerOverlayPortal,
52
+ children: [
53
+ /* @__PURE__ */ jsx(AccordionTrigger, { children: faq.question }),
54
+ /* @__PURE__ */ jsx(AccordionContent, { children: faq.answer })
55
+ ]
56
+ },
57
+ index
58
+ ))
59
+ }
60
+ )
61
+ ]
62
+ }
63
+ )
58
64
  }
59
- ) });
65
+ );
60
66
  export {
61
67
  Faq
62
68
  };
@@ -1,9 +1,10 @@
1
- import { paddingDefaults, backgroundColor, sectionStyle, padding, contentFields } from "../../../puck-base/core/fields.js";
1
+ import { contentFields } from "../../../puck-base/core/fields.js";
2
2
  import { Faq } from "./faq.js";
3
+ import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
3
4
  const conf = {
4
5
  fields: {
5
6
  ...contentFields,
6
- type: {
7
+ expandMode: {
7
8
  type: "radio",
8
9
  label: "answer display",
9
10
  options: [
@@ -12,15 +13,14 @@ const conf = {
12
13
  ]
13
14
  },
14
15
  collapsible: {
15
- // TODO: would be good to have boolean values
16
16
  type: "radio",
17
17
  label: "can close answers",
18
18
  options: [
19
- { label: "yes", value: "true" },
20
- { label: "no", value: "false" }
19
+ { label: "yes", value: true },
20
+ { label: "no", value: false }
21
21
  ]
22
22
  },
23
- faqs: {
23
+ items: {
24
24
  type: "array",
25
25
  max: 20,
26
26
  getItemSummary: (item, index = 0) => {
@@ -45,9 +45,7 @@ const conf = {
45
45
  { label: "two Column", value: "two-col" }
46
46
  ]
47
47
  },
48
- padding,
49
- sectionStyle,
50
- backgroundColor
48
+ styles: createStylesField()
51
49
  },
52
50
  defaultProps: {
53
51
  badge: {
@@ -64,19 +62,19 @@ const conf = {
64
62
  variant: "secondary"
65
63
  }
66
64
  ],
67
- type: "single",
68
- collapsible: "true",
69
- faqs: [
65
+ expandMode: "single",
66
+ collapsible: true,
67
+ items: [
70
68
  {
71
69
  question: "Question",
72
70
  answer: "Answer"
73
71
  }
74
72
  ],
75
73
  layout: "two-col",
76
- padding: paddingDefaults
74
+ styles: createStylesDefaults()
77
75
  },
78
76
  resolveFields: (data, params) => {
79
- if (data.props.type === "multiple") {
77
+ if (data.props.expandMode === "multiple") {
80
78
  const { collapsible, ...newFields } = params.fields;
81
79
  return newFields;
82
80
  }
@@ -9,8 +9,10 @@ export interface Faq2Props {
9
9
  items?: Faq2Item[];
10
10
  image?: CompoundImageProps;
11
11
  imagePosition?: "left" | "right";
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
  }
16
- export declare const Faq2: ({ heading, items, image, imagePosition, padding, sectionStyle, backgroundColor, }: Faq2Props) => import("react/jsx-runtime").JSX.Element;
18
+ export declare const Faq2: ({ heading, items, image, imagePosition, styles, }: Faq2Props) => import("react/jsx-runtime").JSX.Element;
@@ -8,9 +8,7 @@ const Faq2 = ({
8
8
  items = [],
9
9
  image,
10
10
  imagePosition = "right",
11
- padding,
12
- sectionStyle,
13
- backgroundColor
11
+ styles
14
12
  }) => {
15
13
  const imageCol = /* @__PURE__ */ jsx("div", { className: "hidden lg:block lg:sticky lg:top-8 aspect-square overflow-hidden rounded-3xl", children: /* @__PURE__ */ jsx(
16
14
  CompoundImage,
@@ -35,9 +33,9 @@ const Faq2 = ({
35
33
  return /* @__PURE__ */ jsx(
36
34
  CompoundContainer,
37
35
  {
38
- padding,
39
- sectionStyle,
40
- backgroundColor,
36
+ padding: styles == null ? void 0 : styles.padding,
37
+ sectionStyle: styles == null ? void 0 : styles.sectionStyle,
38
+ backgroundColor: styles == null ? void 0 : styles.backgroundColor,
41
39
  children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-10", children: [
42
40
  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
41
  /* @__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: [
@@ -1,5 +1,6 @@
1
- import { paddingDefaults, image1x1Placeholder, backgroundColor, sectionStyle, padding, image } from "../../../puck-base/core/fields.js";
1
+ import { image1x1Placeholder, image } from "../../../puck-base/core/fields.js";
2
2
  import { Faq2 } from "./faq-2.js";
3
+ import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
3
4
  const defaultItems = [
4
5
  {
5
6
  question: "What's included in a session?",
@@ -44,16 +45,14 @@ const conf = {
44
45
  { label: "Right", value: "right" }
45
46
  ]
46
47
  },
47
- padding,
48
- sectionStyle,
49
- backgroundColor
48
+ styles: createStylesField()
50
49
  },
51
50
  defaultProps: {
52
51
  heading: "Questions about getting started",
53
52
  items: defaultItems,
54
53
  image: image1x1Placeholder,
55
54
  imagePosition: "right",
56
- padding: paddingDefaults
55
+ styles: createStylesDefaults()
57
56
  },
58
57
  render: Faq2
59
58
  };
@@ -0,0 +1,30 @@
1
+ type FaqVariant = "accordion-1" | "faq-1" | "faq-2";
2
+ type FaqPadding = {
3
+ top?: "none" | "small" | "medium" | "large";
4
+ bottom?: "none" | "small" | "medium" | "large";
5
+ };
6
+ type FaqSectionStyle = "default" | "dark" | "muted" | "inverted" | "custom";
7
+ type FaqImage = {
8
+ src: string;
9
+ alt?: string;
10
+ };
11
+ type FaqItem = {
12
+ question: string;
13
+ answer: string;
14
+ };
15
+ type FaqSectionProps = {
16
+ variant?: FaqVariant;
17
+ heading?: string;
18
+ description?: string;
19
+ items?: FaqItem[];
20
+ layout?: "single-col" | "two-col";
21
+ expandMode?: "single" | "multiple";
22
+ collapsible?: boolean;
23
+ image?: FaqImage;
24
+ styles?: {
25
+ padding?: FaqPadding;
26
+ sectionStyle?: FaqSectionStyle;
27
+ backgroundColor?: string;
28
+ imagePosition?: "left" | "right";
29
+ };
30
+ };
@@ -2,9 +2,11 @@ import { CompoundContainerProps } from "@/components/puck-base/container";
2
2
  import { CompoundContentProps } from "@/components/puck-base/content";
3
3
  import { CompoundCardProps } from "@/components/puck-base/card";
4
4
  export interface BentoProps extends CompoundContentProps {
5
- padding?: CompoundContainerProps["padding"];
6
- sectionStyle?: CompoundContainerProps["sectionStyle"];
7
- backgroundColor?: string;
5
+ styles?: {
6
+ padding?: CompoundContainerProps["padding"];
7
+ sectionStyle?: CompoundContainerProps["sectionStyle"];
8
+ backgroundColor?: string;
9
+ };
8
10
  cards?: CompoundCardProps[];
9
11
  }
10
- export declare const Bento: ({ padding, sectionStyle, backgroundColor, badge, heading, description, buttons, cards, }: BentoProps) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const Bento: ({ styles, badge, heading, description, buttons, cards, }: BentoProps) => import("react/jsx-runtime").JSX.Element;
@@ -4,16 +4,14 @@ import { CompoundContainer } from "../../../puck-base/container.js";
4
4
  import { CompoundContent } from "../../../puck-base/content.js";
5
5
  import { CompoundCard } from "../../../puck-base/card.js";
6
6
  const Bento = ({
7
- padding,
8
- sectionStyle,
9
- backgroundColor,
7
+ styles,
10
8
  badge,
11
9
  heading,
12
10
  description,
13
11
  buttons,
14
12
  cards = []
15
13
  }) => {
16
- return /* @__PURE__ */ jsx(CompoundContainer, { padding, sectionStyle, backgroundColor, children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-10", children: [
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__ */ jsxs("div", { className: "flex flex-col gap-10", children: [
17
15
  /* @__PURE__ */ jsx(
18
16
  CompoundContent,
19
17
  {
@@ -1,5 +1,6 @@
1
- import { paddingDefaults, backgroundColor, sectionStyle, padding, cards, contentFields } from "../../../puck-base/core/fields.js";
1
+ import { cards, contentFields } from "../../../puck-base/core/fields.js";
2
2
  import { Bento } from "./bento.js";
3
+ import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
3
4
  const conf = {
4
5
  fields: {
5
6
  ...contentFields,
@@ -8,9 +9,7 @@ const conf = {
8
9
  min: 1,
9
10
  max: 4
10
11
  },
11
- padding,
12
- sectionStyle,
13
- backgroundColor
12
+ styles: createStylesField()
14
13
  },
15
14
  defaultProps: {
16
15
  badge: {
@@ -25,7 +24,7 @@ const conf = {
25
24
  ...cards.defaultItemProps,
26
25
  heading: `Card ${index + 1}`
27
26
  })),
28
- padding: paddingDefaults
27
+ styles: createStylesDefaults()
29
28
  },
30
29
  render: Bento
31
30
  };
@@ -2,10 +2,12 @@ import { CompoundContentProps } from "@/components/puck-base/content";
2
2
  import { CompoundContainerProps } from "@/components/puck-base/container";
3
3
  import { CompoundArticleCardProps } from "@/components/puck-base/article-card";
4
4
  export interface FeatureCardsProps extends CompoundContentProps {
5
- padding?: CompoundContainerProps["padding"];
6
- sectionStyle?: CompoundContainerProps["sectionStyle"];
7
- backgroundColor?: string;
5
+ styles?: {
6
+ padding?: CompoundContainerProps["padding"];
7
+ sectionStyle?: CompoundContainerProps["sectionStyle"];
8
+ backgroundColor?: string;
9
+ };
8
10
  columns?: 1 | 2 | 3;
9
11
  cards?: CompoundArticleCardProps[];
10
12
  }
11
- export declare const FeatureCards: ({ padding, sectionStyle, backgroundColor, badge, heading, description, buttons, columns, cards, alignContent, className, }: FeatureCardsProps) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const FeatureCards: ({ styles, badge, heading, description, buttons, columns, cards, alignContent, className, }: FeatureCardsProps) => import("react/jsx-runtime").JSX.Element;
@@ -4,9 +4,7 @@ import { CompoundContainer } from "../../../puck-base/container.js";
4
4
  import { CompoundArticleCard } from "../../../puck-base/article-card.js";
5
5
  import { cn } from "../../../../utils/css-utils.js";
6
6
  const FeatureCards = ({
7
- padding,
8
- sectionStyle,
9
- backgroundColor,
7
+ styles,
10
8
  badge,
11
9
  heading,
12
10
  description,
@@ -16,7 +14,7 @@ const FeatureCards = ({
16
14
  alignContent = "start",
17
15
  className
18
16
  }) => {
19
- return /* @__PURE__ */ jsx(CompoundContainer, { padding, sectionStyle, backgroundColor, className, children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-10", children: [
17
+ 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, className, children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-10", children: [
20
18
  /* @__PURE__ */ jsx(
21
19
  CompoundContent,
22
20
  {
@@ -1,5 +1,6 @@
1
- import { paddingDefaults, image16x9Placeholder, backgroundColor, sectionStyle, padding, button, image, contentFields } from "../../../puck-base/core/fields.js";
1
+ import { image16x9Placeholder, button, image, contentFields } from "../../../puck-base/core/fields.js";
2
2
  import { FeatureCards } from "./feature-cards.js";
3
+ import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
3
4
  const conf = {
4
5
  fields: {
5
6
  ...contentFields,
@@ -35,16 +36,13 @@ const conf = {
35
36
  description: "Card description goes here.",
36
37
  button: {
37
38
  label: "",
38
- url: "",
39
39
  variant: "link",
40
40
  size: "default",
41
41
  icon: "move-right"
42
42
  }
43
43
  }
44
44
  },
45
- padding,
46
- sectionStyle,
47
- backgroundColor
45
+ styles: createStylesField()
48
46
  },
49
47
  defaultProps: {
50
48
  heading: "Something new!",
@@ -64,14 +62,13 @@ const conf = {
64
62
  description: "Card description goes here.",
65
63
  button: {
66
64
  label: "",
67
- url: "",
68
65
  variant: "link",
69
66
  size: "default",
70
67
  icon: "move-right"
71
68
  }
72
69
  }
73
70
  ],
74
- padding: paddingDefaults
71
+ styles: createStylesDefaults()
75
72
  },
76
73
  render: FeatureCards
77
74
  };
@@ -1,8 +1,10 @@
1
1
  import { CompoundContainerProps } from "@/components/puck-base/container";
2
2
  export interface FeatureShowcaseProps {
3
- padding?: CompoundContainerProps["padding"];
4
- sectionStyle?: CompoundContainerProps["sectionStyle"];
5
- backgroundColor?: string;
3
+ styles?: {
4
+ padding?: CompoundContainerProps["padding"];
5
+ sectionStyle?: CompoundContainerProps["sectionStyle"];
6
+ backgroundColor?: string;
7
+ };
6
8
  heading?: string;
7
9
  description?: string;
8
10
  image?: {
@@ -16,4 +18,4 @@ export interface FeatureShowcaseProps {
16
18
  }>;
17
19
  layout?: "image-left" | "image-right";
18
20
  }
19
- export declare const FeatureShowcase: ({ padding, sectionStyle, backgroundColor, heading, description, image, features, layout, }: FeatureShowcaseProps) => import("react/jsx-runtime").JSX.Element;
21
+ export declare const FeatureShowcase: ({ styles, heading, description, image, features, layout, }: FeatureShowcaseProps) => import("react/jsx-runtime").JSX.Element;
@@ -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
  };