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
@@ -0,0 +1,43 @@
1
+ type MetricsVariant = "stats-1" | "stats-2" | "stats-3";
2
+ type MetricsPadding = {
3
+ top?: "none" | "small" | "medium" | "large";
4
+ bottom?: "none" | "small" | "medium" | "large";
5
+ };
6
+ type MetricsSectionStyle = "default" | "dark" | "muted" | "inverted" | "custom";
7
+ type MetricsButton = {
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 MetricsBadge = {
15
+ label: string;
16
+ url?: string;
17
+ variant?: "default" | "secondary" | "destructive" | "outline";
18
+ };
19
+ type MetricItem = {
20
+ value?: string;
21
+ metric?: string;
22
+ label?: string;
23
+ title?: string;
24
+ description?: string;
25
+ percentage?: number;
26
+ direction?: "none" | "increase" | "decrease";
27
+ polarity?: "none" | "positive" | "negative";
28
+ tone?: "dark" | "light";
29
+ };
30
+ type MetricsSectionProps = {
31
+ variant?: MetricsVariant;
32
+ badge?: MetricsBadge;
33
+ heading?: string;
34
+ description?: string;
35
+ buttons?: MetricsButton[];
36
+ layout?: "section" | "inline" | "centered";
37
+ items?: MetricItem[];
38
+ styles?: {
39
+ padding?: MetricsPadding;
40
+ sectionStyle?: MetricsSectionStyle;
41
+ backgroundColor?: string;
42
+ };
43
+ };
@@ -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 { Stats } from "./stats.js";
3
+ import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
3
4
  const conf = {
4
5
  fields: {
5
6
  ...contentFields,
6
- statistics: {
7
+ items: {
7
8
  type: "array",
8
9
  max: 8,
9
10
  getItemSummary: (item, index = 0) => item.label || `Statistic ${index + 1}`,
@@ -63,9 +64,7 @@ const conf = {
63
64
  { label: "centered", value: "centered" }
64
65
  ]
65
66
  },
66
- padding,
67
- sectionStyle,
68
- backgroundColor
67
+ styles: createStylesField()
69
68
  },
70
69
  defaultProps: {
71
70
  heading: "The numbers speak for themselves",
@@ -83,7 +82,7 @@ const conf = {
83
82
  size: "default"
84
83
  }
85
84
  ],
86
- statistics: [
85
+ items: [
87
86
  {
88
87
  label: "Monthly active users",
89
88
  value: "500",
@@ -114,7 +113,7 @@ const conf = {
114
113
  }
115
114
  ],
116
115
  layout: "section",
117
- padding: paddingDefaults
116
+ styles: createStylesDefaults()
118
117
  },
119
118
  resolveFields: (data, params) => {
120
119
  if (data.props.layout === "inline") {
@@ -1,16 +1,18 @@
1
1
  import { CompoundContainerProps } from "@/components/puck-base/container";
2
2
  import { CompoundContentProps } from "@/components/puck-base/content";
3
3
  export interface StatsProps extends CompoundContentProps {
4
- padding?: CompoundContainerProps["padding"];
5
- sectionStyle?: CompoundContainerProps["sectionStyle"];
6
- backgroundColor?: string;
7
4
  layout?: "section" | "inline" | "centered";
8
- statistics: {
5
+ items: {
9
6
  value: string;
10
7
  label: string;
11
8
  percentage?: number;
12
9
  direction?: "none" | "increase" | "decrease";
13
10
  polarity?: "none" | "positive" | "negative";
14
11
  }[];
12
+ styles?: {
13
+ padding?: CompoundContainerProps["padding"];
14
+ sectionStyle?: CompoundContainerProps["sectionStyle"];
15
+ backgroundColor?: string;
16
+ };
15
17
  }
16
- export declare const Stats: ({ padding, sectionStyle, backgroundColor, layout, badge, heading, description, buttons, statistics, }: StatsProps) => import("react/jsx-runtime").JSX.Element;
18
+ export declare const Stats: ({ layout, badge, heading, description, buttons, items, styles, }: StatsProps) => import("react/jsx-runtime").JSX.Element;
@@ -4,67 +4,73 @@ import { CompoundContainer } from "../../../puck-base/container.js";
4
4
  import { cn } from "../../../../utils/css-utils.js";
5
5
  import { CompoundContent } from "../../../puck-base/content.js";
6
6
  const Stats = ({
7
- padding,
8
- sectionStyle,
9
- backgroundColor,
10
7
  layout = "section",
11
8
  badge,
12
9
  heading,
13
10
  description,
14
11
  buttons,
15
- statistics
12
+ items,
13
+ styles
16
14
  }) => {
17
- return /* @__PURE__ */ jsxs(CompoundContainer, { padding, sectionStyle, backgroundColor, children: [
18
- layout === "inline" ? /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-4 text-start sm:grid-cols-2 lg:grid-cols-4 lg:gap-8", children: (statistics ?? []).map((stat, index) => /* @__PURE__ */ jsx(
19
- Stat,
20
- {
21
- value: stat.value,
22
- label: stat.label,
23
- direction: stat.direction,
24
- polarity: stat.polarity,
25
- percentage: stat.percentage
26
- },
27
- index
28
- )) }) : null,
29
- layout === "section" ? /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-10 lg:grid-cols-2", children: [
30
- /* @__PURE__ */ jsx(
31
- CompoundContent,
32
- {
33
- badge,
34
- heading,
35
- description,
36
- buttons
37
- }
38
- ),
39
- /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "grid w-full grid-cols-1 gap-2 text-start sm:grid-cols-2 lg:grid-cols-2", children: (statistics ?? []).map((stat, index) => /* @__PURE__ */ jsx(
40
- Stat,
41
- {
42
- value: stat.value,
43
- label: stat.label,
44
- direction: stat.direction,
45
- polarity: stat.polarity,
46
- percentage: stat.percentage
47
- },
48
- index
49
- )) }) })
50
- ] }) : null,
51
- layout === "centered" ? /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
52
- /* @__PURE__ */ jsx(
53
- CompoundContent,
54
- {
55
- badge,
56
- heading,
57
- description,
58
- buttons,
59
- alignContent: "center"
60
- }
61
- ),
62
- /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-12 mt-16", children: (statistics ?? []).map((stat, index) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-3", children: [
63
- /* @__PURE__ */ jsx("h2", { className: "font-serif text-5xl md:text-6xl font-medium text-foreground", children: stat.value }),
64
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm leading-relaxed", children: stat.label })
65
- ] }, index)) })
66
- ] }) : null
67
- ] });
15
+ return /* @__PURE__ */ jsxs(
16
+ CompoundContainer,
17
+ {
18
+ padding: styles == null ? void 0 : styles.padding,
19
+ sectionStyle: styles == null ? void 0 : styles.sectionStyle,
20
+ backgroundColor: styles == null ? void 0 : styles.backgroundColor,
21
+ children: [
22
+ layout === "inline" ? /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-4 text-start sm:grid-cols-2 lg:grid-cols-4 lg:gap-8", children: (items ?? []).map((stat, index) => /* @__PURE__ */ jsx(
23
+ Stat,
24
+ {
25
+ value: stat.value,
26
+ label: stat.label,
27
+ direction: stat.direction,
28
+ polarity: stat.polarity,
29
+ percentage: stat.percentage
30
+ },
31
+ index
32
+ )) }) : null,
33
+ layout === "section" ? /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-10 lg:grid-cols-2", children: [
34
+ /* @__PURE__ */ jsx(
35
+ CompoundContent,
36
+ {
37
+ badge,
38
+ heading,
39
+ description,
40
+ buttons
41
+ }
42
+ ),
43
+ /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "grid w-full grid-cols-1 gap-2 text-start sm:grid-cols-2 lg:grid-cols-2", children: (items ?? []).map((stat, index) => /* @__PURE__ */ jsx(
44
+ Stat,
45
+ {
46
+ value: stat.value,
47
+ label: stat.label,
48
+ direction: stat.direction,
49
+ polarity: stat.polarity,
50
+ percentage: stat.percentage
51
+ },
52
+ index
53
+ )) }) })
54
+ ] }) : null,
55
+ layout === "centered" ? /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
56
+ /* @__PURE__ */ jsx(
57
+ CompoundContent,
58
+ {
59
+ badge,
60
+ heading,
61
+ description,
62
+ buttons,
63
+ alignContent: "center"
64
+ }
65
+ ),
66
+ /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-12 mt-16", children: (items ?? []).map((stat, index) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-3", children: [
67
+ /* @__PURE__ */ jsx("h2", { className: "font-serif text-5xl md:text-6xl font-medium text-foreground", children: stat.value }),
68
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm leading-relaxed", children: stat.label })
69
+ ] }, index)) })
70
+ ] }) : null
71
+ ]
72
+ }
73
+ );
68
74
  };
69
75
  const Stat = ({
70
76
  value,
@@ -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 { Stats2 } from "./stats-2.js";
3
+ import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
3
4
  const conf = {
4
5
  fields: {
5
6
  heading: {
@@ -40,9 +41,7 @@ const conf = {
40
41
  variant: "light"
41
42
  }
42
43
  },
43
- padding,
44
- sectionStyle,
45
- backgroundColor
44
+ styles: createStylesField()
46
45
  },
47
46
  defaultProps: {
48
47
  heading: "Real results from dedicated training",
@@ -50,14 +49,12 @@ const conf = {
50
49
  buttons: [
51
50
  {
52
51
  label: "Explore our programs",
53
- url: "/services",
54
52
  variant: "outline",
55
53
  size: "default",
56
54
  icon: "none"
57
55
  },
58
56
  {
59
57
  label: "Schedule your first session",
60
- url: "#",
61
58
  variant: "default",
62
59
  size: "default",
63
60
  icon: "none"
@@ -68,7 +65,7 @@ const conf = {
68
65
  { metric: "1:1", title: "Personalized attention", variant: "light" },
69
66
  { metric: "LA", title: "Local Los Angeles training", variant: "light" }
70
67
  ],
71
- padding: paddingDefaults
68
+ styles: createStylesDefaults()
72
69
  },
73
70
  render: Stats2
74
71
  };
@@ -9,8 +9,10 @@ export interface Stats2Props {
9
9
  title: string;
10
10
  variant: "dark" | "light";
11
11
  }[];
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 Stats2: ({ heading, description, buttons, items, padding, sectionStyle, backgroundColor, }: Stats2Props) => import("react/jsx-runtime").JSX.Element;
18
+ export declare const Stats2: ({ heading, description, buttons, items, styles, }: Stats2Props) => import("react/jsx-runtime").JSX.Element;
@@ -7,16 +7,14 @@ const Stats2 = ({
7
7
  description,
8
8
  buttons,
9
9
  items = [],
10
- padding,
11
- sectionStyle,
12
- backgroundColor
10
+ styles
13
11
  }) => {
14
12
  return /* @__PURE__ */ jsx(
15
13
  CompoundContainer,
16
14
  {
17
- padding,
18
- sectionStyle,
19
- backgroundColor,
15
+ padding: styles == null ? void 0 : styles.padding,
16
+ sectionStyle: styles == null ? void 0 : styles.sectionStyle,
17
+ backgroundColor: styles == null ? void 0 : styles.backgroundColor,
20
18
  children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-8", children: [
21
19
  /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-4", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 md:flex-row md:justify-between", children: [
22
20
  /* @__PURE__ */ jsx("div", { className: "w-full md:w-1/2", children: heading && /* @__PURE__ */ jsx("h2", { className: "max-w-xl text-4xl font-semibold tracking-tight text-foreground", children: heading }) }),
@@ -26,7 +24,6 @@ const Stats2 = ({
26
24
  CompoundButton,
27
25
  {
28
26
  label: btn.label,
29
- url: btn.url,
30
27
  action: btn.action,
31
28
  variant: btn.variant,
32
29
  size: btn.size,
@@ -1,5 +1,6 @@
1
- import { paddingDefaults, actionDefaults, backgroundColor, sectionStyle, padding, button } from "../../../puck-base/core/fields.js";
1
+ import { buttons } from "../../../puck-base/core/fields.js";
2
2
  import { Stats3 } from "./stats-3.js";
3
+ import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
3
4
  const conf = {
4
5
  fields: {
5
6
  heading: {
@@ -10,14 +11,7 @@ const conf = {
10
11
  type: "textarea",
11
12
  contentEditable: true
12
13
  },
13
- primaryButton: {
14
- type: "object",
15
- objectFields: { ...button.objectFields }
16
- },
17
- secondaryButton: {
18
- type: "object",
19
- objectFields: { ...button.objectFields }
20
- },
14
+ buttons,
21
15
  items: {
22
16
  type: "array",
23
17
  max: 6,
@@ -45,29 +39,25 @@ const conf = {
45
39
  description: "A brief description of what this statistic means."
46
40
  }
47
41
  },
48
- padding,
49
- sectionStyle,
50
- backgroundColor
42
+ styles: createStylesField()
51
43
  },
52
44
  defaultProps: {
53
45
  heading: "Real progress from personalized training",
54
46
  description: "We focus on measurable improvements and sustainable habits that fit your life.",
55
- primaryButton: {
56
- label: "Get started",
57
- url: "#",
58
- action: actionDefaults,
59
- variant: "default",
60
- size: "default",
61
- icon: "none"
62
- },
63
- secondaryButton: {
64
- label: "Learn more",
65
- url: "#",
66
- action: actionDefaults,
67
- variant: "outline",
68
- size: "default",
69
- icon: "none"
70
- },
47
+ buttons: [
48
+ {
49
+ label: "Get started",
50
+ variant: "default",
51
+ size: "default",
52
+ icon: "none"
53
+ },
54
+ {
55
+ label: "Learn more",
56
+ variant: "outline",
57
+ size: "default",
58
+ icon: "none"
59
+ }
60
+ ],
71
61
  items: [
72
62
  {
73
63
  metric: "100%",
@@ -85,7 +75,7 @@ const conf = {
85
75
  description: "Most clients see measurable strength and endurance improvements within the first month."
86
76
  }
87
77
  ],
88
- padding: paddingDefaults
78
+ styles: createStylesDefaults()
89
79
  },
90
80
  render: Stats3
91
81
  };
@@ -1,17 +1,18 @@
1
1
  import { CompoundContainerProps } from "@/components/puck-base/container";
2
2
  import { CompoundButtonProps } from "@/components/puck-base/button";
3
3
  export interface Stats3Props {
4
- padding?: CompoundContainerProps["padding"];
5
- sectionStyle?: CompoundContainerProps["sectionStyle"];
6
- backgroundColor?: string;
7
4
  heading?: string;
8
5
  description?: string;
9
- primaryButton?: CompoundButtonProps;
10
- secondaryButton?: CompoundButtonProps;
6
+ buttons?: CompoundButtonProps[];
11
7
  items: {
12
8
  metric: string;
13
9
  title: string;
14
10
  description: string;
15
11
  }[];
12
+ styles?: {
13
+ padding?: CompoundContainerProps["padding"];
14
+ sectionStyle?: CompoundContainerProps["sectionStyle"];
15
+ backgroundColor?: string;
16
+ };
16
17
  }
17
- export declare const Stats3: ({ padding, sectionStyle, backgroundColor, heading, description, primaryButton, secondaryButton, items, }: Stats3Props) => import("react/jsx-runtime").JSX.Element;
18
+ export declare const Stats3: ({ heading, description, buttons, items, styles, }: Stats3Props) => import("react/jsx-runtime").JSX.Element;
@@ -8,30 +8,39 @@ const ITEM_STAGGER = {
8
8
  2: "lg:pt-8"
9
9
  };
10
10
  const Stats3 = ({
11
- padding,
12
- sectionStyle,
13
- backgroundColor,
14
11
  heading,
15
12
  description,
16
- primaryButton,
17
- secondaryButton,
18
- items = []
13
+ buttons = [],
14
+ items = [],
15
+ styles
19
16
  }) => {
20
17
  return /* @__PURE__ */ jsx(
21
18
  CompoundContainer,
22
19
  {
23
- padding,
24
- sectionStyle,
25
- backgroundColor,
20
+ padding: styles == null ? void 0 : styles.padding,
21
+ sectionStyle: styles == null ? void 0 : styles.sectionStyle,
22
+ backgroundColor: styles == null ? void 0 : styles.backgroundColor,
26
23
  children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-8", children: [
27
24
  /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-4", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 md:gap-8 lg:flex-row lg:justify-between", children: [
28
25
  /* @__PURE__ */ jsx("div", { className: "w-full lg:basis-1/2", children: heading && /* @__PURE__ */ jsx("h2", { className: "max-w-xl text-4xl font-semibold tracking-tight text-foreground", children: heading }) }),
29
26
  /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-col gap-8 lg:basis-1/2", children: [
30
27
  description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: description }),
31
- ((primaryButton == null ? void 0 : primaryButton.label) || (secondaryButton == null ? void 0 : secondaryButton.label)) && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 sm:flex-row", children: [
32
- (primaryButton == null ? void 0 : primaryButton.label) && /* @__PURE__ */ jsx(CompoundButton, { ...primaryButton }),
33
- (secondaryButton == null ? void 0 : secondaryButton.label) && /* @__PURE__ */ jsx(CompoundButton, { ...secondaryButton })
34
- ] })
28
+ buttons.some((button) => button == null ? void 0 : button.label) && /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-3 sm:flex-row", children: buttons.map(
29
+ (button, index) => (button == null ? void 0 : button.label) ? /* @__PURE__ */ jsx(
30
+ CompoundButton,
31
+ {
32
+ label: button.label,
33
+ action: button.action,
34
+ variant: button.variant,
35
+ size: button.size,
36
+ icon: button.icon,
37
+ type: button.type,
38
+ disabled: button.disabled,
39
+ className: button.className
40
+ },
41
+ index
42
+ ) : null
43
+ ) })
35
44
  ] })
36
45
  ] }) }),
37
46
  /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-y-6 sm:grid-cols-2 lg:grid-cols-3", children: items.map((item, index) => /* @__PURE__ */ jsx(
@@ -1,14 +1,16 @@
1
1
  import { CompoundContainerProps } from "@/components/puck-base/container";
2
2
  export interface ComparisonProps {
3
- padding?: CompoundContainerProps["padding"];
4
- sectionStyle?: CompoundContainerProps["sectionStyle"];
5
- backgroundColor?: string;
6
3
  heading?: string;
7
4
  description?: string;
8
- columns?: Array<{
5
+ plans?: Array<{
9
6
  name: string;
10
7
  highlighted?: boolean;
11
8
  features: string[];
12
9
  }>;
10
+ styles?: {
11
+ padding?: CompoundContainerProps["padding"];
12
+ sectionStyle?: CompoundContainerProps["sectionStyle"];
13
+ backgroundColor?: string;
14
+ };
13
15
  }
14
- export declare const Comparison: ({ padding, sectionStyle, backgroundColor, heading, description, columns, }: ComparisonProps) => import("react/jsx-runtime").JSX.Element;
16
+ export declare const Comparison: ({ heading, description, plans, styles, }: ComparisonProps) => import("react/jsx-runtime").JSX.Element;
@@ -2,51 +2,57 @@ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { cn } from "../../../../utils/css-utils.js";
3
3
  import { CompoundContainer } from "../../../puck-base/container.js";
4
4
  const Comparison = ({
5
- padding,
6
- sectionStyle,
7
- backgroundColor,
8
5
  heading,
9
6
  description,
10
- columns = []
11
- }) => /* @__PURE__ */ jsxs(CompoundContainer, { padding, sectionStyle, backgroundColor, children: [
12
- /* @__PURE__ */ jsxs("div", { className: "mx-auto mb-12 max-w-2xl text-center", children: [
13
- heading && /* @__PURE__ */ jsx("h2", { className: "text-foreground text-3xl font-bold tracking-tight md:text-4xl", children: heading }),
14
- description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mt-4 text-lg", children: description })
15
- ] }),
16
- /* @__PURE__ */ jsx(
17
- "div",
18
- {
19
- className: cn(
20
- "grid gap-6",
21
- columns.length === 2 ? "grid-cols-1 md:grid-cols-2" : "grid-cols-1 md:grid-cols-3"
22
- ),
23
- children: columns.map((col, i) => /* @__PURE__ */ jsxs(
7
+ plans = [],
8
+ styles
9
+ }) => /* @__PURE__ */ jsxs(
10
+ CompoundContainer,
11
+ {
12
+ padding: styles == null ? void 0 : styles.padding,
13
+ sectionStyle: styles == null ? void 0 : styles.sectionStyle,
14
+ backgroundColor: styles == null ? void 0 : styles.backgroundColor,
15
+ children: [
16
+ /* @__PURE__ */ jsxs("div", { className: "mx-auto mb-12 max-w-2xl text-center", 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(
24
21
  "div",
25
22
  {
26
23
  className: cn(
27
- "rounded-xl border p-6",
28
- col.highlighted ? "border-primary bg-primary/5 shadow-lg" : "border-border bg-card"
24
+ "grid gap-6",
25
+ plans.length === 2 ? "grid-cols-1 md:grid-cols-2" : "grid-cols-1 md:grid-cols-3"
29
26
  ),
30
- children: [
31
- /* @__PURE__ */ jsx("h3", { className: "text-foreground mb-4 text-xl font-bold", children: col.name }),
32
- /* @__PURE__ */ jsx("ul", { className: "space-y-3", children: col.features.map((f, fi) => /* @__PURE__ */ jsxs(
33
- "li",
34
- {
35
- className: "text-muted-foreground flex items-start gap-2",
36
- children: [
37
- /* @__PURE__ */ jsx("span", { className: "text-primary mt-0.5", children: "✓" }),
38
- /* @__PURE__ */ jsx("span", { children: f })
39
- ]
40
- },
41
- fi
42
- )) })
43
- ]
44
- },
45
- i
46
- ))
47
- }
48
- )
49
- ] });
27
+ children: plans.map((col, i) => /* @__PURE__ */ jsxs(
28
+ "div",
29
+ {
30
+ className: cn(
31
+ "rounded-xl border p-6",
32
+ col.highlighted ? "border-primary bg-primary/5 shadow-lg" : "border-border bg-card"
33
+ ),
34
+ children: [
35
+ /* @__PURE__ */ jsx("h3", { className: "text-foreground mb-4 text-xl font-bold", children: col.name }),
36
+ /* @__PURE__ */ jsx("ul", { className: "space-y-3", children: col.features.map((f, fi) => /* @__PURE__ */ jsxs(
37
+ "li",
38
+ {
39
+ className: "text-muted-foreground flex items-start gap-2",
40
+ children: [
41
+ /* @__PURE__ */ jsx("span", { className: "text-primary mt-0.5", children: "✓" }),
42
+ /* @__PURE__ */ jsx("span", { children: f })
43
+ ]
44
+ },
45
+ fi
46
+ )) })
47
+ ]
48
+ },
49
+ i
50
+ ))
51
+ }
52
+ )
53
+ ]
54
+ }
55
+ );
50
56
  export {
51
57
  Comparison
52
58
  };
@@ -1,10 +1,10 @@
1
- import { paddingDefaults, backgroundColor, sectionStyle, padding } from "../../../puck-base/core/fields.js";
2
1
  import { Comparison } from "./comparison.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 },
6
6
  description: { type: "textarea", contentEditable: true },
7
- columns: {
7
+ plans: {
8
8
  type: "array",
9
9
  max: 4,
10
10
  getItemSummary: (item, i = 0) => item.name || `Column ${i + 1}`,
@@ -31,14 +31,12 @@ const conf = {
31
31
  features: ["Feature 1"]
32
32
  }
33
33
  },
34
- padding,
35
- sectionStyle,
36
- backgroundColor
34
+ styles: createStylesField()
37
35
  },
38
36
  defaultProps: {
39
37
  heading: "Compare Plans",
40
38
  description: "Choose the plan that best fits your needs.",
41
- columns: [
39
+ plans: [
42
40
  {
43
41
  name: "Starter",
44
42
  highlighted: false,
@@ -60,7 +58,7 @@ const conf = {
60
58
  features: ["Everything in Pro", "SLA", "Dedicated Manager", "SSO"]
61
59
  }
62
60
  ],
63
- padding: paddingDefaults
61
+ styles: createStylesDefaults()
64
62
  },
65
63
  render: Comparison
66
64
  };