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
@@ -1,49 +1,26 @@
1
- import { paddingDefaults, backgroundColor, sectionStyle, padding, backgroundImage, buttons, badge } from "../../../puck-base/core/fields.js";
1
+ import { buttons, badge } from "../../../puck-base/core/fields.js";
2
2
  import { ImageHero } from "./image-hero.js";
3
+ import { heroStylesDefaults, heroStylesField } from "../../../puck-base/core/styles.js";
3
4
  const conf = {
4
5
  fields: {
5
6
  heading: { type: "text", contentEditable: true },
6
7
  description: { type: "textarea", contentEditable: true },
7
8
  badge,
8
9
  buttons,
9
- backgroundImage,
10
- overlay: {
11
- type: "select",
12
- label: "Overlay",
13
- options: [
14
- { label: "None", value: "none" },
15
- { label: "Dark", value: "dark" },
16
- { label: "Gradient", value: "gradient" }
17
- ]
18
- },
19
- align: {
20
- type: "radio",
21
- label: "Alignment",
22
- options: [
23
- { label: "Left", value: "left" },
24
- { label: "Center", value: "center" }
25
- ]
26
- },
27
- minHeight: {
28
- type: "select",
29
- label: "Min Height",
30
- options: [
31
- { label: "Medium", value: "medium" },
32
- { label: "Large", value: "large" },
33
- { label: "Full Screen", value: "full" }
34
- ]
10
+ backgroundImage: {
11
+ type: "text",
12
+ label: "Background Image URL",
13
+ ai: {
14
+ instructions: "URL for a full-width background image behind the section.",
15
+ stream: false
16
+ }
35
17
  },
36
- padding,
37
- sectionStyle,
38
- backgroundColor
18
+ styles: heroStylesField
39
19
  },
40
20
  defaultProps: {
41
21
  heading: "Your Story Starts Here",
42
22
  description: "Create something extraordinary with our platform. Built for dreamers, makers, and innovators.",
43
23
  backgroundImage: "https://images.pexels.com/photos/3184291/pexels-photo-3184291.jpeg?auto=compress&cs=tinysrgb&w=1920",
44
- overlay: "dark",
45
- align: "center",
46
- minHeight: "large",
47
24
  buttons: [
48
25
  {
49
26
  label: "Get Started",
@@ -60,7 +37,12 @@ const conf = {
60
37
  icon: "none"
61
38
  }
62
39
  ],
63
- padding: paddingDefaults
40
+ styles: {
41
+ ...heroStylesDefaults,
42
+ overlay: "dark",
43
+ align: "center",
44
+ minHeight: "large"
45
+ }
64
46
  },
65
47
  render: ImageHero
66
48
  };
@@ -0,0 +1,71 @@
1
+ type HeroVariant = "hero-1" | "split-hero-1" | "grid-hero-1" | "image-hero-1" | "video-hero-1" | "gradient-hero-1" | "fullscreen-hero-1";
2
+ type HeroPadding = {
3
+ top?: "none" | "small" | "medium" | "large";
4
+ bottom?: "none" | "small" | "medium" | "large";
5
+ };
6
+ type HeroSectionStyle = "default" | "dark" | "muted" | "inverted" | "custom";
7
+ type HeroBadge = {
8
+ label: string;
9
+ url?: string;
10
+ variant?: "default" | "secondary" | "destructive" | "outline" | string;
11
+ };
12
+ type HeroButton = {
13
+ label: string;
14
+ url?: string;
15
+ variant?: "default" | "secondary" | "outline" | "ghost" | "link" | "destructive";
16
+ size?: "default" | "sm" | "lg" | "icon";
17
+ icon?: string;
18
+ };
19
+ type HeroFeature = {
20
+ icon?: string;
21
+ name?: string;
22
+ description?: string;
23
+ };
24
+ type HeroImage = {
25
+ src: string;
26
+ alt?: string;
27
+ aspectRatio?: "16x9" | "1x1";
28
+ };
29
+ type HeroSidebarItem = {
30
+ label: string;
31
+ value?: string;
32
+ description?: string;
33
+ url?: string;
34
+ };
35
+ type HeroSectionProps = {
36
+ variant?: HeroVariant;
37
+ badge?: HeroBadge;
38
+ heading?: string;
39
+ description?: string;
40
+ buttons?: HeroButton[];
41
+ features?: HeroFeature[];
42
+ alignContent?: "start" | "center" | "end";
43
+ spacing?: "tight" | "normal" | "relaxed";
44
+ align?: "left" | "center";
45
+ displaySize?: "default" | "display";
46
+ images?: HeroImage | HeroImage[];
47
+ backgroundImage?: HeroImage | string;
48
+ posterImage?: HeroImage;
49
+ videoUrl?: string;
50
+ adjectives?: {
51
+ adjective: string;
52
+ }[];
53
+ displayText?: string;
54
+ imageLayout?: "1x1" | "1x1-9x16-1x1" | "16x9";
55
+ imagePosition?: "left" | "right";
56
+ leftSidebarTitle?: string;
57
+ leftSidebar?: HeroSidebarItem[];
58
+ rightSidebarTitle?: string;
59
+ rightSidebar?: HeroSidebarItem[];
60
+ styles?: {
61
+ padding?: HeroPadding;
62
+ sectionStyle?: HeroSectionStyle;
63
+ backgroundColor?: string;
64
+ className?: string;
65
+ showGridLines?: boolean;
66
+ overlay?: "none" | "dark" | "gradient";
67
+ minHeight?: "medium" | "large" | "full";
68
+ gradientFrom?: string;
69
+ gradientTo?: string;
70
+ };
71
+ };
@@ -1,10 +1,11 @@
1
- import { paddingDefaults, image16x9Placeholder, padding, image, contentFields } from "../../../puck-base/core/fields.js";
1
+ import { image16x9Placeholder, images, contentFields } from "../../../puck-base/core/fields.js";
2
2
  import { SplitHero } from "./split-hero.js";
3
+ import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
3
4
  const conf = {
4
5
  fields: {
5
6
  ...contentFields,
6
7
  displayText: { type: "text" },
7
- image,
8
+ images: { ...images, max: 1 },
8
9
  imagePosition: {
9
10
  type: "radio",
10
11
  options: [
@@ -12,7 +13,7 @@ const conf = {
12
13
  { label: "Right", value: "right" }
13
14
  ]
14
15
  },
15
- padding
16
+ styles: createStylesField()
16
17
  },
17
18
  defaultProps: {
18
19
  heading: "Launch your next big idea",
@@ -22,9 +23,9 @@ const conf = {
22
23
  { label: "Start building", icon: "move-right", variant: "default" },
23
24
  { label: "See demo", icon: "play", variant: "outline" }
24
25
  ],
25
- image: image16x9Placeholder,
26
+ images: [image16x9Placeholder],
26
27
  imagePosition: "right",
27
- padding: paddingDefaults
28
+ styles: createStylesDefaults()
28
29
  },
29
30
  render: SplitHero
30
31
  };
@@ -1,14 +1,14 @@
1
1
  import { CompoundContainerProps } from "@/components/puck-base/container";
2
2
  import { CompoundContentProps } from "@/components/puck-base/content";
3
+ import { CompoundImageProps } from "@/components/puck-base/image";
3
4
  export interface SplitHeroProps extends CompoundContentProps {
4
- padding?: CompoundContainerProps["padding"];
5
- sectionStyle?: CompoundContainerProps["sectionStyle"];
6
- backgroundColor?: string;
7
- image?: {
8
- src: string;
9
- alt: string;
10
- };
5
+ images?: CompoundImageProps | CompoundImageProps[];
11
6
  imagePosition?: "left" | "right";
12
7
  displayText?: string;
8
+ styles?: {
9
+ padding?: CompoundContainerProps["padding"];
10
+ sectionStyle?: CompoundContainerProps["sectionStyle"];
11
+ backgroundColor?: string;
12
+ };
13
13
  }
14
- export declare const SplitHero: ({ padding, sectionStyle, backgroundColor, badge, heading, description, buttons, image, imagePosition, displayText, }: SplitHeroProps) => import("react/jsx-runtime").JSX.Element;
14
+ export declare const SplitHero: ({ badge, heading, description, buttons, images, imagePosition, displayText, styles, }: SplitHeroProps) => import("react/jsx-runtime").JSX.Element;
@@ -4,58 +4,59 @@ import { CompoundContainer } from "../../../puck-base/container.js";
4
4
  import { CompoundContent } from "../../../puck-base/content.js";
5
5
  import { CompoundImage } from "../../../puck-base/image.js";
6
6
  const SplitHero = ({
7
- padding,
8
- sectionStyle,
9
- backgroundColor,
10
7
  badge,
11
8
  heading,
12
9
  description,
13
10
  buttons,
14
- image,
11
+ images,
15
12
  imagePosition = "right",
16
- displayText
17
- }) => /* @__PURE__ */ jsx(
18
- CompoundContainer,
19
- {
20
- padding,
21
- sectionStyle,
22
- backgroundColor,
23
- children: /* @__PURE__ */ jsxs(
24
- "div",
25
- {
26
- className: cn(
27
- "grid grid-cols-1 items-center gap-8 lg:grid-cols-2 lg:gap-16",
28
- imagePosition === "left" && "lg:[direction:rtl] lg:[&>*]:[direction:ltr]"
29
- ),
30
- children: [
31
- /* @__PURE__ */ jsxs("div", { children: [
32
- displayText && /* @__PURE__ */ jsx("p", { className: "font-serif text-5xl md:text-7xl lg:text-8xl font-bold tracking-tighter mb-4", children: displayText }),
33
- /* @__PURE__ */ jsx(
34
- CompoundContent,
35
- {
36
- badge,
37
- heading: displayText ? void 0 : heading,
38
- description,
39
- buttons
40
- }
41
- )
42
- ] }),
43
- /* @__PURE__ */ jsxs("div", { className: "border-border/50 aspect-[4/3] overflow-hidden rounded-xl border bg-muted relative [&>span]:h-full [&>span]:w-full", children: [
44
- !(image == null ? void 0 : image.src) && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center pointer-events-none", children: /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Image" }) }),
45
- /* @__PURE__ */ jsx(
46
- CompoundImage,
47
- {
48
- src: (image == null ? void 0 : image.src) || "",
49
- alt: (image == null ? void 0 : image.alt) || "",
50
- className: "h-full w-full object-cover"
51
- }
52
- )
53
- ] })
54
- ]
55
- }
56
- )
57
- }
58
- );
13
+ displayText,
14
+ styles
15
+ }) => {
16
+ const primaryImage = Array.isArray(images) ? images[0] : images;
17
+ return /* @__PURE__ */ jsx(
18
+ CompoundContainer,
19
+ {
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(
27
+ "grid grid-cols-1 items-center gap-8 lg:grid-cols-2 lg:gap-16",
28
+ imagePosition === "left" && "lg:[direction:rtl] lg:[&>*]:[direction:ltr]"
29
+ ),
30
+ children: [
31
+ /* @__PURE__ */ jsxs("div", { children: [
32
+ displayText && /* @__PURE__ */ jsx("p", { className: "mb-4 font-serif text-5xl font-bold tracking-tighter md:text-7xl lg:text-8xl", children: displayText }),
33
+ /* @__PURE__ */ jsx(
34
+ CompoundContent,
35
+ {
36
+ badge,
37
+ heading: displayText ? void 0 : heading,
38
+ description,
39
+ buttons
40
+ }
41
+ )
42
+ ] }),
43
+ /* @__PURE__ */ jsxs("div", { className: "border-border/50 relative aspect-[4/3] overflow-hidden rounded-xl border bg-muted [&>span]:h-full [&>span]:w-full", children: [
44
+ !(primaryImage == null ? void 0 : primaryImage.src) && /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Image" }) }),
45
+ /* @__PURE__ */ jsx(
46
+ CompoundImage,
47
+ {
48
+ src: (primaryImage == null ? void 0 : primaryImage.src) || "",
49
+ alt: (primaryImage == null ? void 0 : primaryImage.alt) || "",
50
+ className: "h-full w-full object-cover"
51
+ }
52
+ )
53
+ ] })
54
+ ]
55
+ }
56
+ )
57
+ }
58
+ );
59
+ };
59
60
  export {
60
61
  SplitHero
61
62
  };
@@ -1,5 +1,6 @@
1
- import { paddingDefaults, image16x9Placeholder, padding, image, contentFields } from "../../../puck-base/core/fields.js";
1
+ import { image16x9Placeholder, image, contentFields } from "../../../puck-base/core/fields.js";
2
2
  import { VideoHero } from "./video-hero.js";
3
+ import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
3
4
  const conf = {
4
5
  fields: {
5
6
  ...contentFields,
@@ -9,14 +10,14 @@ const conf = {
9
10
  ai: { instructions: "Direct URL to an MP4 video" }
10
11
  },
11
12
  posterImage: image,
12
- padding
13
+ styles: createStylesField()
13
14
  },
14
15
  defaultProps: {
15
16
  heading: "See it in action",
16
17
  description: "Watch how our platform helps teams build faster.",
17
18
  buttons: [{ label: "Try it free", icon: "move-right", variant: "default" }],
18
19
  posterImage: image16x9Placeholder,
19
- padding: paddingDefaults
20
+ styles: createStylesDefaults()
20
21
  },
21
22
  render: VideoHero
22
23
  };
@@ -1,11 +1,15 @@
1
1
  import { CompoundContainerProps } from "@/components/puck-base/container";
2
2
  import { CompoundContentProps } from "@/components/puck-base/content";
3
3
  export interface VideoHeroProps extends CompoundContentProps {
4
- padding?: CompoundContainerProps["padding"];
5
4
  videoUrl?: string;
6
5
  posterImage?: {
7
6
  src: string;
8
7
  alt: string;
9
8
  };
9
+ styles?: {
10
+ padding?: CompoundContainerProps["padding"];
11
+ sectionStyle?: CompoundContainerProps["sectionStyle"];
12
+ backgroundColor?: string;
13
+ };
10
14
  }
11
- export declare const VideoHero: ({ padding, badge, heading, description, buttons, videoUrl, posterImage, }: VideoHeroProps) => import("react/jsx-runtime").JSX.Element;
15
+ export declare const VideoHero: ({ badge, heading, description, buttons, videoUrl, posterImage, styles, }: VideoHeroProps) => import("react/jsx-runtime").JSX.Element;
@@ -2,33 +2,41 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { CompoundContainer } from "../../../puck-base/container.js";
3
3
  import { CompoundContent } from "../../../puck-base/content.js";
4
4
  const VideoHero = ({
5
- padding,
6
5
  badge,
7
6
  heading,
8
7
  description,
9
8
  buttons,
10
9
  videoUrl,
11
- posterImage
12
- }) => /* @__PURE__ */ jsx(CompoundContainer, { padding, sectionStyle: "dark", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 items-center gap-12 lg:grid-cols-2", children: [
13
- /* @__PURE__ */ jsx(
14
- CompoundContent,
15
- {
16
- badge,
17
- heading,
18
- description,
19
- buttons
20
- }
21
- ),
22
- /* @__PURE__ */ jsx("div", { className: "border-border/20 overflow-hidden rounded-xl border bg-black/50", children: videoUrl ? /* @__PURE__ */ jsx(
23
- "video",
24
- {
25
- src: videoUrl,
26
- poster: posterImage == null ? void 0 : posterImage.src,
27
- controls: true,
28
- className: "aspect-video w-full object-cover"
29
- }
30
- ) : /* @__PURE__ */ jsx("div", { className: "flex aspect-video w-full items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "bg-primary/20 flex h-16 w-16 items-center justify-center rounded-full", children: /* @__PURE__ */ jsx("span", { className: "text-primary text-2xl", children: "▶" }) }) }) })
31
- ] }) });
10
+ posterImage,
11
+ styles
12
+ }) => /* @__PURE__ */ jsx(
13
+ CompoundContainer,
14
+ {
15
+ padding: styles == null ? void 0 : styles.padding,
16
+ sectionStyle: (styles == null ? void 0 : styles.sectionStyle) ?? "dark",
17
+ backgroundColor: styles == null ? void 0 : styles.backgroundColor,
18
+ children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 items-center gap-12 lg:grid-cols-2", children: [
19
+ /* @__PURE__ */ jsx(
20
+ CompoundContent,
21
+ {
22
+ badge,
23
+ heading,
24
+ description,
25
+ buttons
26
+ }
27
+ ),
28
+ /* @__PURE__ */ jsx("div", { className: "border-border/20 overflow-hidden rounded-xl border bg-black/50", children: videoUrl ? /* @__PURE__ */ jsx(
29
+ "video",
30
+ {
31
+ src: videoUrl,
32
+ poster: posterImage == null ? void 0 : posterImage.src,
33
+ controls: true,
34
+ className: "aspect-video w-full object-cover"
35
+ }
36
+ ) : /* @__PURE__ */ jsx("div", { className: "flex aspect-video w-full items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "bg-primary/20 flex h-16 w-16 items-center justify-center rounded-full", children: /* @__PURE__ */ jsx("span", { className: "text-primary text-2xl", children: "▶" }) }) }) })
37
+ ] })
38
+ }
39
+ );
32
40
  export {
33
41
  VideoHero
34
42
  };
@@ -1,19 +1,25 @@
1
- import { paddingDefaults, backgroundColor, sectionStyle, padding, button } from "../../../puck-base/core/fields.js";
1
+ import { button } from "../../../puck-base/core/fields.js";
2
2
  import { LocationSection } from "./location.js";
3
- const locationButtonField = {
4
- type: "object",
5
- objectFields: {
6
- ...button.objectFields,
7
- colorMode: {
8
- type: "select",
9
- options: [
10
- { label: "Theme", value: "theme" },
11
- { label: "Custom", value: "custom" }
12
- ]
13
- },
14
- backgroundColor: { type: "text" },
15
- textColor: { type: "text" }
16
- }
3
+ import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
4
+ const locationButtonFields = {
5
+ ...button.objectFields,
6
+ colorMode: {
7
+ type: "select",
8
+ options: [
9
+ { label: "Theme", value: "theme" },
10
+ { label: "Custom", value: "custom" }
11
+ ]
12
+ },
13
+ backgroundColor: { type: "text" },
14
+ textColor: { type: "text" }
15
+ };
16
+ const locationButtonDefaults = {
17
+ label: "Button",
18
+ url: "",
19
+ variant: "default",
20
+ size: "default",
21
+ icon: "none",
22
+ colorMode: "theme"
17
23
  };
18
24
  const conf = {
19
25
  fields: {
@@ -55,17 +61,14 @@ const conf = {
55
61
  max: 1,
56
62
  step: 0.01
57
63
  },
58
- primaryButton: {
59
- ...locationButtonField,
60
- label: "Primary Button"
61
- },
62
- secondaryButton: {
63
- ...locationButtonField,
64
- label: "Secondary Button"
64
+ buttons: {
65
+ type: "array",
66
+ max: 3,
67
+ getItemSummary: (item, index = 0) => item.label || `Button ${index + 1}`,
68
+ arrayFields: locationButtonFields,
69
+ defaultItemProps: locationButtonDefaults
65
70
  },
66
- padding,
67
- sectionStyle,
68
- backgroundColor
71
+ styles: createStylesField()
69
72
  },
70
73
  defaultProps: {
71
74
  heading: "Find us in\nLos Angeles",
@@ -78,23 +81,25 @@ const conf = {
78
81
  mapTintMode: "theme",
79
82
  mapTintColor: "var(--primary)",
80
83
  mapTintOpacity: 0.21,
81
- primaryButton: {
82
- label: "Call to visit",
83
- url: "tel:+12345678900",
84
- variant: "default",
85
- size: "default",
86
- icon: "none",
87
- colorMode: "theme"
88
- },
89
- secondaryButton: {
90
- label: "Get directions",
91
- url: "mailto:email@mybusiness.com",
92
- variant: "secondary",
93
- size: "default",
94
- icon: "none",
95
- colorMode: "theme"
96
- },
97
- padding: paddingDefaults
84
+ buttons: [
85
+ {
86
+ label: "Call to visit",
87
+ url: "tel:+12345678900",
88
+ variant: "default",
89
+ size: "default",
90
+ icon: "none",
91
+ colorMode: "theme"
92
+ },
93
+ {
94
+ label: "Get directions",
95
+ url: "mailto:email@mybusiness.com",
96
+ variant: "secondary",
97
+ size: "default",
98
+ icon: "none",
99
+ colorMode: "theme"
100
+ }
101
+ ],
102
+ styles: createStylesDefaults()
98
103
  },
99
104
  render: LocationSection
100
105
  };
@@ -7,9 +7,6 @@ interface LocationButton extends Omit<CompoundButtonProps, "label"> {
7
7
  textColor?: string;
8
8
  }
9
9
  export interface LocationSectionProps {
10
- padding?: CompoundContainerProps["padding"];
11
- sectionStyle?: CompoundContainerProps["sectionStyle"];
12
- backgroundColor?: string;
13
10
  heading?: string;
14
11
  description?: string;
15
12
  contentAlign?: "left" | "right";
@@ -20,8 +17,12 @@ export interface LocationSectionProps {
20
17
  mapTintMode?: "theme" | "custom" | "none";
21
18
  mapTintColor?: string;
22
19
  mapTintOpacity?: number;
23
- primaryButton?: LocationButton;
24
- secondaryButton?: LocationButton;
20
+ buttons?: LocationButton[];
21
+ styles?: {
22
+ padding?: CompoundContainerProps["padding"];
23
+ sectionStyle?: CompoundContainerProps["sectionStyle"];
24
+ backgroundColor?: string;
25
+ };
25
26
  }
26
- export declare const LocationSection: ({ padding, sectionStyle, backgroundColor, heading, description, contentAlign, contentPosition, mapEmbedUrl, mapTitle, mapFilter, mapTintMode, mapTintColor, mapTintOpacity, primaryButton, secondaryButton, }: LocationSectionProps) => import("react/jsx-runtime").JSX.Element;
27
+ export declare const LocationSection: ({ heading, description, contentAlign, contentPosition, mapEmbedUrl, mapTitle, mapFilter, mapTintMode, mapTintColor, mapTintOpacity, buttons, styles, }: LocationSectionProps) => import("react/jsx-runtime").JSX.Element;
27
28
  export {};
@@ -37,9 +37,6 @@ const LocationActionButton = ({
37
37
  ) });
38
38
  };
39
39
  const LocationSection = ({
40
- padding,
41
- sectionStyle,
42
- backgroundColor,
43
40
  heading,
44
41
  description,
45
42
  contentAlign = "left",
@@ -50,8 +47,8 @@ const LocationSection = ({
50
47
  mapTintMode = "theme",
51
48
  mapTintColor,
52
49
  mapTintOpacity = 0.2,
53
- primaryButton,
54
- secondaryButton
50
+ buttons = [],
51
+ styles
55
52
  }) => {
56
53
  const isTextRight = contentAlign === "right";
57
54
  const isContentRight = contentPosition === "right";
@@ -60,9 +57,9 @@ const LocationSection = ({
60
57
  return /* @__PURE__ */ jsx(
61
58
  CompoundContainer,
62
59
  {
63
- padding,
64
- sectionStyle,
65
- backgroundColor,
60
+ padding: styles == null ? void 0 : styles.padding,
61
+ sectionStyle: styles == null ? void 0 : styles.sectionStyle,
62
+ backgroundColor: styles == null ? void 0 : styles.backgroundColor,
66
63
  className: "relative overflow-hidden",
67
64
  children: /* @__PURE__ */ jsxs(
68
65
  "div",
@@ -91,17 +88,14 @@ const LocationSection = ({
91
88
  children: description
92
89
  }
93
90
  ) : null,
94
- ((primaryButton == null ? void 0 : primaryButton.label) || (secondaryButton == null ? void 0 : secondaryButton.label)) && /* @__PURE__ */ jsxs(
91
+ buttons.some((button) => button == null ? void 0 : button.label) && /* @__PURE__ */ jsx(
95
92
  "div",
96
93
  {
97
94
  className: cn(
98
95
  "grid grid-cols-1 gap-4 sm:flex sm:flex-row",
99
96
  isTextRight ? "items-end sm:justify-end" : "items-start sm:justify-start"
100
97
  ),
101
- children: [
102
- /* @__PURE__ */ jsx(LocationActionButton, { ...primaryButton }),
103
- /* @__PURE__ */ jsx(LocationActionButton, { ...secondaryButton })
104
- ]
98
+ children: buttons.map((button, index) => /* @__PURE__ */ jsx(LocationActionButton, { ...button }, index))
105
99
  }
106
100
  )
107
101
  ]