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,69 +1,71 @@
1
- import { paddingDefaults, image1x1Placeholder, backgroundColor, sectionStyle, padding, image } from "../../../puck-base/core/fields.js";
1
+ import { image1x1Placeholder, image, icon } from "../../../puck-base/core/fields.js";
2
2
  import { ContactUs2 } from "./contact-us-2.js";
3
+ import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
4
+ const contactUs2StylesField = createStylesField({
5
+ imagePosition: {
6
+ type: "radio",
7
+ label: "Image Position",
8
+ options: [
9
+ { label: "Image Right", value: "end" },
10
+ { label: "Image Left", value: "start" }
11
+ ]
12
+ }
13
+ });
3
14
  const conf = {
4
15
  fields: {
5
16
  heading: { type: "text", contentEditable: true },
6
17
  description: { type: "textarea", contentEditable: true },
7
- nameLabel: { type: "text", contentEditable: true },
8
- emailLabel: { type: "text", contentEditable: true },
9
- phoneLabel: { type: "text", contentEditable: true },
10
- companyLabel: { type: "text", contentEditable: true },
11
- messageLabel: { type: "text", contentEditable: true },
12
- button: {
13
- type: "object",
14
- objectFields: {
15
- label: { type: "text" },
16
- variant: {
17
- type: "select",
18
- options: [
19
- { label: "Primary", value: "default" },
20
- { label: "Secondary", value: "secondary" },
21
- { label: "Outline", value: "outline" },
22
- { label: "Ghost", value: "ghost" }
23
- ]
24
- },
25
- size: {
26
- type: "select",
27
- options: [
28
- { label: "Default", value: "default" },
29
- { label: "Small", value: "sm" },
30
- { label: "Large", value: "lg" }
31
- ]
32
- },
33
- icon: {
34
- type: "text"
35
- }
36
- }
18
+ fields: {
19
+ type: "array",
20
+ max: 10,
21
+ getItemSummary: (item, i = 0) => item.label || `Field ${i + 1}`,
22
+ arrayFields: {
23
+ label: { type: "text", contentEditable: true },
24
+ name: { type: "text" }
25
+ },
26
+ defaultItemProps: { label: "Field", name: "field" }
37
27
  },
38
- image,
39
- imagePosition: {
40
- type: "radio",
28
+ submitLabel: { type: "text" },
29
+ submitVariant: {
30
+ type: "select",
31
+ options: [
32
+ { label: "Primary", value: "default" },
33
+ { label: "Secondary", value: "secondary" },
34
+ { label: "Outline", value: "outline" },
35
+ { label: "Ghost", value: "ghost" }
36
+ ]
37
+ },
38
+ submitSize: {
39
+ type: "select",
41
40
  options: [
42
- { label: "Image Right", value: "end" },
43
- { label: "Image Left", value: "start" }
41
+ { label: "Default", value: "default" },
42
+ { label: "Small", value: "sm" },
43
+ { label: "Large", value: "lg" }
44
44
  ]
45
45
  },
46
- padding,
47
- sectionStyle,
48
- backgroundColor
46
+ submitIcon: icon,
47
+ image,
48
+ styles: contactUs2StylesField
49
49
  },
50
50
  defaultProps: {
51
51
  heading: "Ready to transform your fitness?",
52
52
  description: "Tell us about your goals and we'll reach out within 24 hours to schedule your first session.",
53
- nameLabel: "Your Name",
54
- emailLabel: "Email Address",
55
- phoneLabel: "Phone",
56
- companyLabel: "Company",
57
- messageLabel: "Tell us about your fitness goals",
58
- button: {
59
- label: "Send Message",
60
- variant: "default",
61
- size: "default",
62
- icon: "none"
63
- },
53
+ fields: [
54
+ { label: "Your Name", name: "name" },
55
+ { label: "Email Address", name: "email" },
56
+ { label: "Phone", name: "phone" },
57
+ { label: "Company", name: "company" },
58
+ { label: "Tell us about your fitness goals", name: "message" }
59
+ ],
60
+ submitLabel: "Send Message",
61
+ submitVariant: "default",
62
+ submitSize: "default",
63
+ submitIcon: "none",
64
64
  image: image1x1Placeholder,
65
- imagePosition: "end",
66
- padding: paddingDefaults
65
+ styles: {
66
+ ...createStylesDefaults(),
67
+ imagePosition: "end"
68
+ }
67
69
  },
68
70
  render: ContactUs2
69
71
  };
@@ -13,17 +13,20 @@ export interface ContactInfoItem {
13
13
  export interface ContactUs3Props {
14
14
  heading?: string;
15
15
  description?: string;
16
- panelStyle?: "dark" | "primary" | "muted";
17
16
  infoItems?: ContactInfoItem[];
18
- nameLabel?: string;
19
- emailLabel?: string;
20
- phoneLabel?: string;
21
- companyLabel?: string;
22
- subjectLabel?: string;
23
- messageLabel?: string;
24
- button?: ContactUs3Button;
25
- padding?: CompoundContainerProps["padding"];
26
- sectionStyle?: CompoundContainerProps["sectionStyle"];
27
- backgroundColor?: string;
17
+ fields?: Array<{
18
+ label: string;
19
+ name: string;
20
+ }>;
21
+ submitLabel?: string;
22
+ submitVariant?: string;
23
+ submitSize?: string;
24
+ submitIcon?: string;
25
+ styles?: {
26
+ panelStyle?: "dark" | "primary" | "muted";
27
+ padding?: CompoundContainerProps["padding"];
28
+ sectionStyle?: CompoundContainerProps["sectionStyle"];
29
+ backgroundColor?: string;
30
+ };
28
31
  }
29
- export declare const ContactUs3: ({ heading, description, panelStyle, infoItems, nameLabel, emailLabel, phoneLabel, companyLabel, subjectLabel, messageLabel, button, padding, sectionStyle, backgroundColor, }: ContactUs3Props) => import("react/jsx-runtime").JSX.Element;
32
+ export declare const ContactUs3: ({ heading, description, infoItems, fields, submitLabel, submitVariant, submitSize, submitIcon, styles, }: ContactUs3Props) => import("react/jsx-runtime").JSX.Element;
@@ -60,19 +60,24 @@ const PANEL_VARS = {
60
60
  const ContactUs3 = ({
61
61
  heading,
62
62
  description,
63
- panelStyle = "dark",
64
63
  infoItems = [],
65
- nameLabel = "Full Name",
66
- emailLabel = "Email Address",
67
- phoneLabel = "Phone",
68
- companyLabel = "Company",
69
- subjectLabel = "Subject",
70
- messageLabel = "Your Message",
71
- button,
72
- padding,
73
- sectionStyle,
74
- backgroundColor
64
+ fields = [],
65
+ submitLabel,
66
+ submitVariant,
67
+ submitSize,
68
+ submitIcon,
69
+ styles
75
70
  }) => {
71
+ var _a, _b, _c, _d, _e, _f;
72
+ const panelStyle = (styles == null ? void 0 : styles.panelStyle) ?? "dark";
73
+ const labels = {
74
+ name: ((_a = fields.find((field) => field.name === "name")) == null ? void 0 : _a.label) ?? "Full Name",
75
+ email: ((_b = fields.find((field) => field.name === "email")) == null ? void 0 : _b.label) ?? "Email Address",
76
+ phone: ((_c = fields.find((field) => field.name === "phone")) == null ? void 0 : _c.label) ?? "Phone",
77
+ company: ((_d = fields.find((field) => field.name === "company")) == null ? void 0 : _d.label) ?? "Company",
78
+ subject: ((_e = fields.find((field) => field.name === "subject")) == null ? void 0 : _e.label) ?? "Subject",
79
+ message: ((_f = fields.find((field) => field.name === "message")) == null ? void 0 : _f.label) ?? "Your Message"
80
+ };
76
81
  const { isEditor: isEditorMode, siteId, domain } = useEditorContext();
77
82
  const [values, setValues] = useState({
78
83
  name: "",
@@ -114,9 +119,9 @@ ${values.message}` : values.message;
114
119
  return /* @__PURE__ */ jsx(
115
120
  CompoundContainer,
116
121
  {
117
- padding,
118
- sectionStyle,
119
- backgroundColor,
122
+ padding: styles == null ? void 0 : styles.padding,
123
+ sectionStyle: styles == null ? void 0 : styles.sectionStyle,
124
+ backgroundColor: styles == null ? void 0 : styles.backgroundColor,
120
125
  className: "!p-0",
121
126
  children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 overflow-hidden rounded-2xl border border-border lg:grid-cols-5", children: [
122
127
  /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-8 p-8 lg:col-span-2 lg:p-10 xl:p-12", vars.wrapper), children: [
@@ -136,7 +141,7 @@ ${values.message}` : values.message;
136
141
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-5 sm:grid-cols-2", children: [
137
142
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
138
143
  /* @__PURE__ */ jsxs(Label, { htmlFor: "cu3-name", className: "text-sm font-medium", children: [
139
- nameLabel,
144
+ labels.name,
140
145
  " ",
141
146
  /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "*" })
142
147
  ] }),
@@ -153,7 +158,7 @@ ${values.message}` : values.message;
153
158
  ] }),
154
159
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
155
160
  /* @__PURE__ */ jsxs(Label, { htmlFor: "cu3-email", className: "text-sm font-medium", children: [
156
- emailLabel,
161
+ labels.email,
157
162
  " ",
158
163
  /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "*" })
159
164
  ] }),
@@ -171,7 +176,7 @@ ${values.message}` : values.message;
171
176
  ] }),
172
177
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-5 sm:grid-cols-2", children: [
173
178
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
174
- /* @__PURE__ */ jsx(Label, { htmlFor: "cu3-phone", className: "text-sm font-medium", children: phoneLabel }),
179
+ /* @__PURE__ */ jsx(Label, { htmlFor: "cu3-phone", className: "text-sm font-medium", children: labels.phone }),
175
180
  /* @__PURE__ */ jsx(
176
181
  Input,
177
182
  {
@@ -183,7 +188,7 @@ ${values.message}` : values.message;
183
188
  )
184
189
  ] }),
185
190
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
186
- /* @__PURE__ */ jsx(Label, { htmlFor: "cu3-company", className: "text-sm font-medium", children: companyLabel }),
191
+ /* @__PURE__ */ jsx(Label, { htmlFor: "cu3-company", className: "text-sm font-medium", children: labels.company }),
187
192
  /* @__PURE__ */ jsx(
188
193
  Input,
189
194
  {
@@ -196,7 +201,7 @@ ${values.message}` : values.message;
196
201
  ] })
197
202
  ] }),
198
203
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
199
- /* @__PURE__ */ jsx(Label, { htmlFor: "cu3-subject", className: "text-sm font-medium", children: subjectLabel }),
204
+ /* @__PURE__ */ jsx(Label, { htmlFor: "cu3-subject", className: "text-sm font-medium", children: labels.subject }),
200
205
  /* @__PURE__ */ jsx(
201
206
  Input,
202
207
  {
@@ -209,7 +214,7 @@ ${values.message}` : values.message;
209
214
  ] }),
210
215
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
211
216
  /* @__PURE__ */ jsxs(Label, { htmlFor: "cu3-message", className: "text-sm font-medium", children: [
212
- messageLabel,
217
+ labels.message,
213
218
  " ",
214
219
  /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "*" })
215
220
  ] }),
@@ -227,10 +232,10 @@ ${values.message}` : values.message;
227
232
  /* @__PURE__ */ jsx("div", { className: "pt-1", children: /* @__PURE__ */ jsx(
228
233
  CompoundButton,
229
234
  {
230
- label: submitting ? "Sending..." : (button == null ? void 0 : button.label) ?? "Send Message",
231
- variant: (button == null ? void 0 : button.variant) ?? "default",
232
- size: (button == null ? void 0 : button.size) ?? "default",
233
- icon: submitting ? "loader" : (button == null ? void 0 : button.icon) ?? "send",
235
+ label: submitting ? "Sending..." : submitLabel ?? "Send Message",
236
+ variant: submitVariant ?? "default",
237
+ size: submitSize ?? "default",
238
+ icon: submitting ? "loader" : submitIcon ?? "send",
234
239
  type: "submit",
235
240
  disabled: submitting
236
241
  }
@@ -1,24 +1,35 @@
1
- import { paddingDefaults, backgroundColor, sectionStyle, padding } from "../../../puck-base/core/fields.js";
1
+ import { icon } from "../../../puck-base/core/fields.js";
2
2
  import { ContactUs3 } from "./contact-us-3.js";
3
+ import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
3
4
  const defaultInfoItems = [
4
5
  { icon: "phone", label: "Phone", value: "+1 (555) 000-0000" },
5
6
  { icon: "mail", label: "Email", value: "hello@mybusiness.com" },
6
- { icon: "map-pin", label: "Address", value: "123 Main Street\nNew York, NY 10001" },
7
- { icon: "clock", label: "Hours", value: "Mon–Fri: 9am–6pm\nSat: 10am–4pm" }
7
+ {
8
+ icon: "map-pin",
9
+ label: "Address",
10
+ value: "123 Main Street\nNew York, NY 10001"
11
+ },
12
+ {
13
+ icon: "clock",
14
+ label: "Hours",
15
+ value: "Mon–Fri: 9am–6pm\nSat: 10am–4pm"
16
+ }
8
17
  ];
18
+ const contactUs3StylesField = createStylesField({
19
+ panelStyle: {
20
+ type: "radio",
21
+ label: "Panel Style",
22
+ options: [
23
+ { label: "Dark", value: "dark" },
24
+ { label: "Primary", value: "primary" },
25
+ { label: "Muted", value: "muted" }
26
+ ]
27
+ }
28
+ });
9
29
  const conf = {
10
30
  fields: {
11
31
  heading: { type: "textarea", contentEditable: true },
12
32
  description: { type: "textarea", contentEditable: true },
13
- panelStyle: {
14
- type: "radio",
15
- label: "Panel Style",
16
- options: [
17
- { label: "Dark", value: "dark" },
18
- { label: "Primary", value: "primary" },
19
- { label: "Muted", value: "muted" }
20
- ]
21
- },
22
33
  infoItems: {
23
34
  type: "array",
24
35
  min: 0,
@@ -38,61 +49,63 @@ const conf = {
38
49
  label: { type: "text", contentEditable: true },
39
50
  value: { type: "textarea", contentEditable: true }
40
51
  },
41
- defaultItemProps: { icon: "phone", label: "Phone", value: "+1 (555) 000-0000" }
42
- },
43
- nameLabel: { type: "text", contentEditable: true },
44
- emailLabel: { type: "text", contentEditable: true },
45
- phoneLabel: { type: "text", contentEditable: true },
46
- companyLabel: { type: "text", contentEditable: true },
47
- subjectLabel: { type: "text", contentEditable: true },
48
- messageLabel: { type: "text", contentEditable: true },
49
- button: {
50
- type: "object",
51
- label: "Submit Button",
52
- objectFields: {
53
- label: { type: "text" },
54
- variant: {
55
- type: "select",
56
- options: [
57
- { label: "Primary", value: "default" },
58
- { label: "Secondary", value: "secondary" },
59
- { label: "Outline", value: "outline" },
60
- { label: "Ghost", value: "ghost" }
61
- ]
62
- },
63
- size: {
64
- type: "select",
65
- options: [
66
- { label: "Default", value: "default" },
67
- { label: "Small", value: "sm" },
68
- { label: "Large", value: "lg" }
69
- ]
70
- },
71
- icon: { type: "text" }
52
+ defaultItemProps: {
53
+ icon: "phone",
54
+ label: "Phone",
55
+ value: "+1 (555) 000-0000"
72
56
  }
73
57
  },
74
- padding,
75
- sectionStyle,
76
- backgroundColor
58
+ fields: {
59
+ type: "array",
60
+ max: 10,
61
+ getItemSummary: (item, i = 0) => item.label || `Field ${i + 1}`,
62
+ arrayFields: {
63
+ label: { type: "text", contentEditable: true },
64
+ name: { type: "text" }
65
+ },
66
+ defaultItemProps: { label: "Field", name: "field" }
67
+ },
68
+ submitLabel: { type: "text" },
69
+ submitVariant: {
70
+ type: "select",
71
+ options: [
72
+ { label: "Primary", value: "default" },
73
+ { label: "Secondary", value: "secondary" },
74
+ { label: "Outline", value: "outline" },
75
+ { label: "Ghost", value: "ghost" }
76
+ ]
77
+ },
78
+ submitSize: {
79
+ type: "select",
80
+ options: [
81
+ { label: "Default", value: "default" },
82
+ { label: "Small", value: "sm" },
83
+ { label: "Large", value: "lg" }
84
+ ]
85
+ },
86
+ submitIcon: icon,
87
+ styles: contactUs3StylesField
77
88
  },
78
89
  defaultProps: {
79
90
  heading: "Let's start a\nconversation",
80
91
  description: "Have a question or ready to get started? Fill out the form and we'll get back to you within 24 hours.",
81
- panelStyle: "dark",
82
92
  infoItems: defaultInfoItems,
83
- nameLabel: "Full Name",
84
- emailLabel: "Email Address",
85
- phoneLabel: "Phone",
86
- companyLabel: "Company",
87
- subjectLabel: "Subject",
88
- messageLabel: "Your Message",
89
- button: {
90
- label: "Send Message",
91
- variant: "default",
92
- size: "default",
93
- icon: "send"
94
- },
95
- padding: paddingDefaults
93
+ fields: [
94
+ { label: "Full Name", name: "name" },
95
+ { label: "Email Address", name: "email" },
96
+ { label: "Phone", name: "phone" },
97
+ { label: "Company", name: "company" },
98
+ { label: "Subject", name: "subject" },
99
+ { label: "Your Message", name: "message" }
100
+ ],
101
+ submitLabel: "Send Message",
102
+ submitVariant: "default",
103
+ submitSize: "default",
104
+ submitIcon: "send",
105
+ styles: {
106
+ ...createStylesDefaults(),
107
+ panelStyle: "dark"
108
+ }
96
109
  },
97
110
  render: ContactUs3
98
111
  };
@@ -0,0 +1,65 @@
1
+ type ContactVariant = "contact-us-1" | "contact-us-2" | "contact-us-3";
2
+ type ContactPadding = {
3
+ top?: "none" | "small" | "medium" | "large";
4
+ bottom?: "none" | "small" | "medium" | "large";
5
+ };
6
+ type ContactSectionStyle = "default" | "dark" | "muted" | "inverted" | "custom";
7
+ type ContactBadge = {
8
+ label: string;
9
+ url?: string;
10
+ variant?: "default" | "secondary" | "destructive" | "outline";
11
+ };
12
+ type ContactButton = {
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 ContactFeature = {
20
+ icon?: string;
21
+ name?: string;
22
+ description?: string;
23
+ };
24
+ type ContactField = {
25
+ label: string;
26
+ name: string;
27
+ type?: "text" | "email" | "tel" | "number" | "date" | "url" | "file" | "textarea" | "select";
28
+ options?: string[];
29
+ required?: boolean;
30
+ half?: boolean;
31
+ };
32
+ type ContactImage = {
33
+ src: string;
34
+ alt?: string;
35
+ };
36
+ type ContactInfoItem = {
37
+ icon?: "phone" | "mail" | "map-pin" | "clock" | string;
38
+ label: string;
39
+ value: string;
40
+ };
41
+ type ContactSectionProps = {
42
+ variant?: ContactVariant;
43
+ heading?: string;
44
+ description?: string;
45
+ badge?: ContactBadge;
46
+ features?: ContactFeature[];
47
+ buttons?: ContactButton[];
48
+ formTitle?: string;
49
+ fields?: ContactField[];
50
+ action?: string;
51
+ method?: "get" | "post" | "dialog";
52
+ submitLabel?: string;
53
+ submitVariant?: "default" | "secondary" | "outline" | "ghost" | "link" | "destructive";
54
+ submitSize?: "default" | "sm" | "lg" | "icon";
55
+ submitIcon?: string;
56
+ image?: ContactImage;
57
+ infoItems?: ContactInfoItem[];
58
+ styles?: {
59
+ padding?: ContactPadding;
60
+ sectionStyle?: ContactSectionStyle;
61
+ backgroundColor?: string;
62
+ imagePosition?: "start" | "end";
63
+ panelStyle?: "dark" | "primary" | "muted";
64
+ };
65
+ };
@@ -1,14 +1,17 @@
1
1
  import { CompoundContainerProps } from "@/components/puck-base/container";
2
2
  export interface BannerCtaProps {
3
- padding?: CompoundContainerProps["padding"];
4
- sectionStyle?: CompoundContainerProps["sectionStyle"];
5
- backgroundColor?: string;
6
3
  heading?: string;
7
4
  description?: string;
8
- ctaLabel?: string;
9
- ctaUrl?: string;
10
- secondaryLabel?: string;
11
- secondaryUrl?: string;
12
- variant?: "primary" | "dark" | "gradient";
5
+ buttons?: Array<{
6
+ label: string;
7
+ url?: string;
8
+ variant?: string;
9
+ }>;
10
+ styles?: {
11
+ padding?: CompoundContainerProps["padding"];
12
+ sectionStyle?: CompoundContainerProps["sectionStyle"];
13
+ backgroundColor?: string;
14
+ visualVariant?: "primary" | "dark" | "gradient";
15
+ };
13
16
  }
14
- export declare const BannerCta: ({ padding, sectionStyle, backgroundColor, heading, description, ctaLabel, ctaUrl, secondaryLabel, secondaryUrl, variant, }: BannerCtaProps) => import("react/jsx-runtime").JSX.Element;
17
+ export declare const BannerCta: ({ heading, description, buttons, styles, }: BannerCtaProps) => import("react/jsx-runtime").JSX.Element;
@@ -7,38 +7,35 @@ const variantStyles = {
7
7
  gradient: "bg-gradient-to-r from-primary to-primary/70 text-primary-foreground"
8
8
  };
9
9
  const BannerCta = ({
10
- padding,
11
- sectionStyle,
12
- backgroundColor,
13
10
  heading = "Ready to get started?",
14
11
  description,
15
- ctaLabel = "Get started",
16
- ctaUrl = "#",
17
- secondaryLabel,
18
- secondaryUrl,
19
- variant = "primary"
20
- }) => /* @__PURE__ */ jsx(CompoundContainer, { padding, sectionStyle, backgroundColor, children: /* @__PURE__ */ jsxs("div", { className: `rounded-2xl px-8 py-14 text-center ${variantStyles[variant] ?? variantStyles.primary}`, children: [
21
- heading && /* @__PURE__ */ jsx("h2", { className: "text-3xl font-bold tracking-tight md:text-4xl lg:text-5xl", children: heading }),
22
- description && /* @__PURE__ */ jsx("p", { className: "mt-4 text-lg opacity-90 max-w-2xl mx-auto", children: description }),
23
- /* @__PURE__ */ jsxs("div", { className: "mt-8 flex flex-wrap items-center justify-center gap-4", children: [
24
- /* @__PURE__ */ jsx(
25
- CompoundButton,
26
- {
27
- label: ctaLabel,
28
- url: ctaUrl,
29
- variant: "secondary"
30
- }
31
- ),
32
- secondaryLabel && secondaryUrl && /* @__PURE__ */ jsx(
33
- CompoundButton,
34
- {
35
- label: secondaryLabel,
36
- url: secondaryUrl,
37
- variant: "outline"
38
- }
39
- )
40
- ] })
41
- ] }) });
12
+ buttons = [],
13
+ styles
14
+ }) => {
15
+ var _a, _b, _c, _d, _e;
16
+ 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: `rounded-2xl px-8 py-14 text-center ${variantStyles[(styles == null ? void 0 : styles.visualVariant) ?? "primary"] ?? variantStyles.primary}`, children: [
17
+ heading && /* @__PURE__ */ jsx("h2", { className: "text-3xl font-bold tracking-tight md:text-4xl lg:text-5xl", children: heading }),
18
+ description && /* @__PURE__ */ jsx("p", { className: "mt-4 text-lg opacity-90 max-w-2xl mx-auto", children: description }),
19
+ /* @__PURE__ */ jsxs("div", { className: "mt-8 flex flex-wrap items-center justify-center gap-4", children: [
20
+ /* @__PURE__ */ jsx(
21
+ CompoundButton,
22
+ {
23
+ label: ((_a = buttons[0]) == null ? void 0 : _a.label) ?? "Get started",
24
+ url: ((_b = buttons[0]) == null ? void 0 : _b.url) ?? "#",
25
+ variant: ((_c = buttons[0]) == null ? void 0 : _c.variant) ?? "secondary"
26
+ }
27
+ ),
28
+ ((_d = buttons[1]) == null ? void 0 : _d.label) && ((_e = buttons[1]) == null ? void 0 : _e.url) && /* @__PURE__ */ jsx(
29
+ CompoundButton,
30
+ {
31
+ label: buttons[1].label,
32
+ url: buttons[1].url,
33
+ variant: buttons[1].variant ?? "outline"
34
+ }
35
+ )
36
+ ] })
37
+ ] }) });
38
+ };
42
39
  export {
43
40
  BannerCta
44
41
  };
@@ -1,35 +1,33 @@
1
- import { paddingDefaults, backgroundColor, sectionStyle, padding } from "../../../puck-base/core/fields.js";
1
+ import { contentFields } from "../../../puck-base/core/fields.js";
2
2
  import { BannerCta } from "./banner-cta.js";
3
+ import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
4
+ const bannerCtaStylesField = createStylesField({
5
+ visualVariant: {
6
+ type: "select",
7
+ label: "Background Variant",
8
+ options: [
9
+ { label: "Primary Color", value: "primary" },
10
+ { label: "Dark", value: "dark" },
11
+ { label: "Gradient", value: "gradient" }
12
+ ]
13
+ }
14
+ });
3
15
  const conf = {
4
16
  fields: {
5
- heading: { type: "text", contentEditable: true },
6
- description: { type: "textarea", contentEditable: true },
7
- ctaLabel: { type: "text", contentEditable: true },
8
- ctaUrl: { type: "text" },
9
- secondaryLabel: { type: "text", contentEditable: true },
10
- secondaryUrl: { type: "text" },
11
- variant: {
12
- type: "select",
13
- label: "Background Variant",
14
- options: [
15
- { label: "Primary Color", value: "primary" },
16
- { label: "Dark", value: "dark" },
17
- { label: "Gradient", value: "gradient" }
18
- ]
19
- },
20
- padding,
21
- sectionStyle,
22
- backgroundColor
17
+ ...contentFields,
18
+ styles: bannerCtaStylesField
23
19
  },
24
20
  defaultProps: {
25
21
  heading: "Ready to transform your workflow?",
26
22
  description: "Join thousands of teams already using our platform to ship faster and smarter.",
27
- ctaLabel: "Get started free",
28
- ctaUrl: "#",
29
- secondaryLabel: "Talk to sales",
30
- secondaryUrl: "#",
31
- variant: "primary",
32
- padding: paddingDefaults
23
+ buttons: [
24
+ { label: "Get started free", url: "#", variant: "secondary" },
25
+ { label: "Talk to sales", url: "#", variant: "outline" }
26
+ ],
27
+ styles: {
28
+ ...createStylesDefaults(),
29
+ visualVariant: "primary"
30
+ }
33
31
  },
34
32
  render: BannerCta
35
33
  };