dune-react 0.0.21 → 0.0.22

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 (180) hide show
  1. package/dist/components/index.d.ts +1 -0
  2. package/dist/components/puck-base/button.d.ts +1 -1
  3. package/dist/components/puck-base/button.js +5 -6
  4. package/dist/components/puck-base/card.d.ts +1 -1
  5. package/dist/components/puck-base/container.js +1 -1
  6. package/dist/components/puck-base/content.d.ts +1 -1
  7. package/dist/components/puck-base/image.js +16 -16
  8. package/dist/components/puck-base/index.d.ts +1 -13
  9. package/dist/components/puck-block/banner-sections/dismissible-banner/index.d.ts +3 -25
  10. package/dist/components/puck-block/contact-sections/centered-form/index.d.ts +1 -1
  11. package/dist/components/puck-block/contact-sections/contact-modal/contact-modal.js +1 -1
  12. package/dist/components/puck-block/contact-sections/contact-modal/index.d.ts +1 -1
  13. package/dist/components/puck-block/contact-sections/form-with-media/index.d.ts +1 -1
  14. package/dist/components/puck-block/contact-sections/header-form-cards/index.d.ts +1 -1
  15. package/dist/components/puck-block/contact-sections/location-cards-grid/index.d.ts +1 -1
  16. package/dist/components/puck-block/contact-sections/split-info-form/index.d.ts +1 -1
  17. package/dist/components/puck-block/cta-sections/feature-card-cta/index.d.ts +1 -1
  18. package/dist/components/puck-block/cta-sections/index.d.ts +2 -0
  19. package/dist/components/puck-block/cta-sections/mouse-track-cta/index.d.ts +1 -1
  20. package/dist/components/puck-block/cta-sections/mouse-track-cta/mouse-track-cta.js +88 -59
  21. package/dist/components/puck-block/cta-sections/props.js +46 -0
  22. package/dist/components/puck-block/cta-sections/side-media-cta/index.d.ts +1 -73
  23. package/dist/components/puck-block/cta-sections/side-media-cta/index.js +35 -0
  24. package/dist/components/puck-block/cta-sections/side-media-cta/side-media-cta.js +84 -0
  25. package/dist/components/puck-block/cta-sections/text-block-cta/index.d.ts +2 -74
  26. package/dist/components/puck-block/cta-sections/text-block-cta/index.js +38 -0
  27. package/dist/components/puck-block/cta-sections/text-block-cta/text-block-cta.d.ts +1 -1
  28. package/dist/components/puck-block/cta-sections/text-block-cta/text-block-cta.js +165 -0
  29. package/dist/components/puck-block/faq-sections/dual-column-accordion-faq/index.d.ts +1 -1
  30. package/dist/components/puck-block/faq-sections/icon-card-faq/index.d.ts +1 -1
  31. package/dist/components/puck-block/faq-sections/stacked-accordion-faq/index.d.ts +1 -1
  32. package/dist/components/puck-block/faq-sections/stacked-static-faq/index.d.ts +1 -1
  33. package/dist/components/puck-block/faq-sections/two-column-accordion-faq/index.d.ts +1 -1
  34. package/dist/components/puck-block/faq-sections/two-column-static-faq/index.d.ts +1 -1
  35. package/dist/components/puck-block/feature-sections/feature-cards-grid/index.d.ts +2 -2
  36. package/dist/components/puck-block/feature-sections/feature-list-split/index.d.ts +2 -2
  37. package/dist/components/puck-block/feature-sections/tab-feature/component.js +77 -61
  38. package/dist/components/puck-block/feature-sections/text-media-split/index.d.ts +1 -1
  39. package/dist/components/puck-block/feature-sections/text-only-section/index.d.ts +1 -1
  40. package/dist/components/puck-block/footer-sections/compact-newsletter-footer/index.d.ts +1 -1
  41. package/dist/components/puck-block/footer-sections/cta-links-footer/index.d.ts +1 -1
  42. package/dist/components/puck-block/footer-sections/links-newsletter-footer/index.d.ts +1 -1
  43. package/dist/components/puck-block/footer-sections/newsletter-links-footer/index.d.ts +1 -1
  44. package/dist/components/puck-block/footer-sections/newsletter-top-links-footer/index.d.ts +1 -1
  45. package/dist/components/puck-block/gallery-sections/fullscreen-portfolio/index.d.ts +25 -28
  46. package/dist/components/puck-block/gallery-sections/fullscreen-portfolio/index.js +3 -2
  47. package/dist/components/puck-block/gallery-sections/portfolio-cards/index.d.ts +2 -2
  48. package/dist/components/puck-block/gallery-sections/portfolio-divider/index.d.ts +2 -2
  49. package/dist/components/puck-block/gallery-sections/portfolio-divider/portfolio-divider.js +67 -64
  50. package/dist/components/puck-block/gallery-sections/scroll-parallax-portfolio/index.d.ts +24 -27
  51. package/dist/components/puck-block/gallery-sections/scroll-parallax-portfolio/index.js +3 -2
  52. package/dist/components/puck-block/header-sections/centered-navbar/index.d.ts +1 -1
  53. package/dist/components/puck-block/header-sections/drawer-navbar/drawer-navbar.js +118 -17
  54. package/dist/components/puck-block/header-sections/drawer-navbar/index.d.ts +1 -1
  55. package/dist/components/puck-block/header-sections/floating-bordered-navbar/floating-bordered-navbar.js +161 -22
  56. package/dist/components/puck-block/header-sections/floating-bordered-navbar/index.d.ts +1 -1
  57. package/dist/components/puck-block/header-sections/fullscreen-overlay-navbar/fullscreen-overlay-navbar.js +142 -19
  58. package/dist/components/puck-block/header-sections/fullscreen-overlay-navbar/index.d.ts +1 -1
  59. package/dist/components/puck-block/header-sections/mega-menu-navbar/index.d.ts +1 -1
  60. package/dist/components/puck-block/header-sections/standard-navbar/index.d.ts +1 -1
  61. package/dist/components/puck-block/hero-sections/carousel-hero/component.js +50 -9
  62. package/dist/components/puck-block/hero-sections/carousel-hero/index.d.ts +1 -1
  63. package/dist/components/puck-block/hero-sections/centered-hero/index.d.ts +2 -2
  64. package/dist/components/puck-block/hero-sections/column-scroll-hero/index.d.ts +1 -1
  65. package/dist/components/puck-block/hero-sections/dual-marquee-hero/index.d.ts +1 -1
  66. package/dist/components/puck-block/hero-sections/fullscreen-hero/index.d.ts +2 -2
  67. package/dist/components/puck-block/hero-sections/fullscreen-video-hero/component.js +4 -2
  68. package/dist/components/puck-block/hero-sections/fullscreen-video-hero/index.d.ts +1 -1
  69. package/dist/components/puck-block/hero-sections/grid-expand-hero/index.d.ts +1 -1
  70. package/dist/components/puck-block/hero-sections/horizontal-marquee-hero/index.d.ts +1 -1
  71. package/dist/components/puck-block/hero-sections/inline-image-hero/index.d.ts +1 -1
  72. package/dist/components/puck-block/hero-sections/media-text-hero/index.d.ts +26 -29
  73. package/dist/components/puck-block/hero-sections/mouse-track-hero/index.d.ts +1 -1
  74. package/dist/components/puck-block/hero-sections/multi-image-grid-hero/index.d.ts +25 -28
  75. package/dist/components/puck-block/hero-sections/multi-image-grid-hero/index.js +3 -2
  76. package/dist/components/puck-block/hero-sections/overlapping-image-hero/index.d.ts +1 -1
  77. package/dist/components/puck-block/hero-sections/parallax-images-hero/index.d.ts +1 -1
  78. package/dist/components/puck-block/hero-sections/scatter-parallax-hero/index.d.ts +1 -1
  79. package/dist/components/puck-block/hero-sections/scroll-expand-video-hero/index.d.ts +1 -1
  80. package/dist/components/puck-block/hero-sections/scroll-zoom-hero/component.js +91 -44
  81. package/dist/components/puck-block/hero-sections/scroll-zoom-hero/index.d.ts +1 -1
  82. package/dist/components/puck-block/hero-sections/split-hero/index.d.ts +2 -2
  83. package/dist/components/puck-block/hero-sections/stacked-hero/index.d.ts +2 -2
  84. package/dist/components/puck-block/hero-sections/sticky-expand-hero/index.d.ts +1 -1
  85. package/dist/components/puck-block/hero-sections/sticky-video-hero/index.d.ts +1 -1
  86. package/dist/components/puck-block/hero-sections/tab-hero/index.d.ts +28 -44
  87. package/dist/components/puck-block/hero-sections/tab-hero/index.js +7 -2
  88. package/dist/components/puck-block/hero-sections/three-image-parallax-hero/component.js +93 -43
  89. package/dist/components/puck-block/hero-sections/three-image-parallax-hero/index.d.ts +1 -1
  90. package/dist/components/puck-block/hero-sections/vertical-gallery-hero/component.js +27 -4
  91. package/dist/components/puck-block/hero-sections/vertical-gallery-hero/index.d.ts +1 -1
  92. package/dist/components/puck-block/hero-sections/zoom-grid-hero/index.d.ts +1 -1
  93. package/dist/components/puck-block/index.d.ts +2 -0
  94. package/dist/components/puck-block/location-sections/location-1/location.d.ts +1 -1
  95. package/dist/components/puck-block/location-sections/location-2/location.d.ts +1 -1
  96. package/dist/components/puck-block/location-sections/location-3/location.d.ts +2 -2
  97. package/dist/components/puck-block/location-sections/props.d.ts +1 -1
  98. package/dist/components/puck-block/metrics-sections/header-stats-row/index.d.ts +1 -1
  99. package/dist/components/puck-block/metrics-sections/mixed-grid-stats/index.d.ts +1 -1
  100. package/dist/components/puck-block/metrics-sections/split-stats/index.d.ts +1 -1
  101. package/dist/components/puck-block/metrics-sections/tab-stats/index.d.ts +0 -22
  102. package/dist/components/puck-block/metrics-sections/tab-stats/index.js +1 -1
  103. package/dist/components/puck-block/metrics-sections/tab-stats/tab-stats.js +36 -23
  104. package/dist/components/puck-block/pricing-sections/single-pricing-card/index.d.ts +0 -22
  105. package/dist/components/puck-block/pricing-sections/single-pricing-card/index.js +1 -1
  106. package/dist/components/puck-block/pricing-sections/split-pricing/index.d.ts +28 -22
  107. package/dist/components/puck-block/pricing-sections/split-pricing/index.js +8 -1
  108. package/dist/components/puck-block/registry.generated.d.ts +13141 -0
  109. package/dist/components/puck-block/registry.generated.js +558 -0
  110. package/dist/components/puck-block/showcase-sections/compact-timeline/index.d.ts +1 -1
  111. package/dist/components/puck-block/showcase-sections/horizontal-timeline/index.d.ts +1 -1
  112. package/dist/components/puck-block/showcase-sections/single-column-timeline/index.d.ts +2 -2
  113. package/dist/components/puck-block/showcase-sections/sticky-scroll-timeline/index.d.ts +2 -2
  114. package/dist/components/puck-block/showcase-sections/tab-timeline/index.d.ts +1 -23
  115. package/dist/components/puck-block/showcase-sections/tab-timeline/index.js +1 -1
  116. package/dist/components/puck-block/showcase-sections/zigzag-timeline/index.d.ts +2 -2
  117. package/dist/components/puck-block/team-sections/team-carousel/index.d.ts +1 -23
  118. package/dist/components/puck-block/team-sections/team-carousel/index.js +1 -2
  119. package/dist/components/puck-block/team-sections/team-grid/index.d.ts +1 -23
  120. package/dist/components/puck-block/team-sections/team-grid/index.js +1 -2
  121. package/dist/components/puck-block/team-sections/team-inline-card/index.d.ts +1 -23
  122. package/dist/components/puck-block/team-sections/team-inline-card/index.js +1 -2
  123. package/dist/components/puck-block/team-sections/team-two-column/index.d.ts +1 -1
  124. package/dist/components/puck-block/testimonial-sections/sticky-testimonial/index.d.ts +1 -1
  125. package/dist/components/puck-block/text-sections/aside-nav-content/index.d.ts +0 -22
  126. package/dist/components/puck-block/text-sections/aside-nav-content/index.js +1 -1
  127. package/dist/components/puck-block/text-sections/blog-article/index.d.ts +0 -22
  128. package/dist/components/puck-block/text-sections/blog-article/index.js +1 -1
  129. package/dist/components/puck-block/text-sections/prose-sidebar/index.d.ts +1 -23
  130. package/dist/components/puck-block/text-sections/text-header/index.d.ts +2 -2
  131. package/dist/components/puck-core/core/props/content.js +41 -1
  132. package/dist/components/puck-core/core/props/form.js +76 -0
  133. package/dist/components/puck-core/core/props/index.js +34 -0
  134. package/dist/components/puck-core/core/props/interactive.js +17 -0
  135. package/dist/components/puck-core/core/props/media.js +8 -4
  136. package/dist/components/puck-core/core/styles.d.ts +1 -1
  137. package/dist/components/{puck-base → puck-core}/core/styles.js +3 -1
  138. package/dist/components/{puck-base → puck-core}/core/with-editable.js +1 -1
  139. package/dist/components/puck-core/fields/action-field.js +1 -1
  140. package/dist/components/{puck-base → puck-core/fields}/image-upload-field.js +4 -4
  141. package/dist/components/{puck-base → puck-core}/fields/location-field.js +1 -1
  142. package/dist/components/puck-core/index.d.ts +1 -0
  143. package/dist/components/{puck-base → puck-core}/inline-editable.js +1 -1
  144. package/dist/index.js +121 -104
  145. package/package.json +1 -1
  146. package/dist/components/puck-base/core/fields.d.ts +0 -827
  147. package/dist/components/puck-base/core/fields.js +0 -267
  148. package/dist/components/puck-base/core/hooks.d.ts +0 -19
  149. package/dist/components/puck-base/core/icon-catalog.d.ts +0 -14
  150. package/dist/components/puck-base/core/icon-catalog.js +0 -193
  151. package/dist/components/puck-base/core/styles.d.ts +0 -1942
  152. package/dist/components/puck-base/core/types.d.ts +0 -20
  153. package/dist/components/puck-base/core/types.js +0 -26
  154. package/dist/components/puck-base/core/utils.d.ts +0 -5
  155. package/dist/components/puck-base/core/with-editable.d.ts +0 -16
  156. package/dist/components/puck-base/error-boundary.d.ts +0 -4
  157. package/dist/components/puck-base/fields/action-field.d.ts +0 -30
  158. package/dist/components/puck-base/fields/action-field.js +0 -265
  159. package/dist/components/puck-base/fields/auto-field.d.ts +0 -2
  160. package/dist/components/puck-base/fields/color-field.d.ts +0 -6
  161. package/dist/components/puck-base/fields/index.d.ts +0 -8
  162. package/dist/components/puck-base/fields/location-field.d.ts +0 -44
  163. package/dist/components/puck-base/fields/object-field.d.ts +0 -8
  164. package/dist/components/puck-base/fields/radio-toggle-field.d.ts +0 -10
  165. package/dist/components/puck-base/fields/types.d.ts +0 -29
  166. package/dist/components/puck-base/fields/virtualized-select-field.d.ts +0 -13
  167. package/dist/components/puck-base/icon-picker-field.d.ts +0 -8
  168. package/dist/components/puck-base/icon-picker-field.js +0 -153
  169. package/dist/components/puck-base/image-upload-field.d.ts +0 -7
  170. package/dist/components/puck-base/inline-editable.d.ts +0 -14
  171. package/dist/components/puck-base/use-upload.d.ts +0 -42
  172. /package/dist/components/{puck-base → puck-core}/core/hooks.js +0 -0
  173. /package/dist/components/{puck-base → puck-core}/core/utils.js +0 -0
  174. /package/dist/components/{puck-base → puck-core}/error-boundary.js +0 -0
  175. /package/dist/components/{puck-base → puck-core}/fields/auto-field.js +0 -0
  176. /package/dist/components/{puck-base → puck-core}/fields/color-field.js +0 -0
  177. /package/dist/components/{puck-base → puck-core}/fields/object-field.js +0 -0
  178. /package/dist/components/{puck-base → puck-core}/fields/radio-toggle-field.js +0 -0
  179. /package/dist/components/{puck-base → puck-core}/fields/virtualized-select-field.js +0 -0
  180. /package/dist/components/{puck-base → puck-core}/use-upload.js +0 -0
@@ -0,0 +1,35 @@
1
+ import { SideMediaCta, SideMediaCtaDefaults } from "./side-media-cta.js";
2
+ import { descriptionField, headingField } from "../../../puck-core/core/props/content.js";
3
+ import { buttonsField } from "../../../puck-core/core/props/interactive.js";
4
+ import { imagesField } from "../../../puck-core/core/props/media.js";
5
+ import { ctaStyleFields } from "../props.js";
6
+ import { sectionWrapperFields } from "../../../puck-core/section-wrapper.js";
7
+ const conf = {
8
+ fields: {
9
+ heading: headingField,
10
+ description: descriptionField,
11
+ buttons: buttonsField,
12
+ images: imagesField,
13
+ // TODO: email form 字段待设计完成后启用
14
+ // inputPlaceholder: { type: "text" },
15
+ // formButton: buttonField,
16
+ // termsAndConditions: { type: "textarea" },
17
+ styles: {
18
+ type: "object",
19
+ label: "Styles",
20
+ objectFields: {
21
+ mediaPosition: ctaStyleFields.mediaPosition,
22
+ bordered: ctaStyleFields.bordered,
23
+ // formType: ctaStyleFields.formType,
24
+ ...sectionWrapperFields
25
+ }
26
+ }
27
+ },
28
+ defaultProps: SideMediaCtaDefaults,
29
+ render: SideMediaCta
30
+ };
31
+ export {
32
+ SideMediaCta,
33
+ SideMediaCtaDefaults,
34
+ conf as default
35
+ };
@@ -0,0 +1,84 @@
1
+ "use client";
2
+ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
3
+ import { CompoundButton } from "../../../puck-base/button.js";
4
+ import { CompoundImage } from "../../../puck-base/image.js";
5
+ import { cn } from "../../../../utils/css-utils.js";
6
+ import { SectionWrapper } from "../../../puck-core/section-wrapper.js";
7
+ const SideMediaCta = (props) => {
8
+ var _a, _b;
9
+ const {
10
+ heading,
11
+ description,
12
+ buttons,
13
+ images,
14
+ // inputPlaceholder,
15
+ // formButton,
16
+ // termsAndConditions,
17
+ styles
18
+ } = {
19
+ ...SideMediaCtaDefaults,
20
+ ...props
21
+ };
22
+ const {
23
+ className: sectionClassName,
24
+ style: sectionStyle,
25
+ css,
26
+ mediaPosition = "right",
27
+ bordered = false
28
+ // formType = "buttons",
29
+ } = styles ?? {};
30
+ const renderActions = () => {
31
+ return /* @__PURE__ */ jsx("div", { className: "mt-6 flex flex-wrap gap-4 md:mt-8", children: buttons.map((button, index) => /* @__PURE__ */ jsx(CompoundButton, { label: button.label, variant: button.variant, size: button.size, action: button.action, icon: button.icon }, index)) });
32
+ };
33
+ const textContent = /* @__PURE__ */ jsxs("div", { className: cn({ "flex flex-col justify-center p-8 md:p-12": bordered }), children: [
34
+ /* @__PURE__ */ jsx("h2", { className: "rb-5 mb-5 text-5xl font-bold md:mb-6 md:text-7xl lg:text-8xl", children: heading }),
35
+ /* @__PURE__ */ jsx("p", { className: "md:text-md", children: description }),
36
+ renderActions()
37
+ ] });
38
+ const mediaContent = /* @__PURE__ */ jsx("div", { className: cn({ "flex items-center justify-center": bordered }), children: /* @__PURE__ */ jsx(CompoundImage, { src: (_a = images == null ? void 0 : images[0]) == null ? void 0 : _a.src, className: "w-full object-cover", alt: (_b = images == null ? void 0 : images[0]) == null ? void 0 : _b.alt }) });
39
+ const isLeftMedia = mediaPosition === "left";
40
+ if (bordered) {
41
+ return /* @__PURE__ */ jsx(SectionWrapper, { className: cn("px-[5%] py-6 md:py-8 lg:py-10", sectionClassName), style: sectionStyle, css, children: /* @__PURE__ */ jsx("div", { className: "container", children: /* @__PURE__ */ jsx("div", { className: "grid auto-cols-fr grid-cols-1 border border-border-primary lg:grid-cols-2", children: isLeftMedia ? /* @__PURE__ */ jsxs(Fragment, { children: [
42
+ mediaContent,
43
+ textContent
44
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
45
+ textContent,
46
+ mediaContent
47
+ ] }) }) }) });
48
+ }
49
+ const textOrder = isLeftMedia ? "order-1 lg:order-2" : "";
50
+ const mediaOrder = isLeftMedia ? "order-2 lg:order-1" : "";
51
+ return /* @__PURE__ */ jsx(SectionWrapper, { className: cn("px-[5%] py-8 md:py-12 lg:py-14", sectionClassName), style: sectionStyle, css, children: /* @__PURE__ */ jsx("div", { className: "container", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-x-20 gap-y-12 md:gap-y-16 lg:grid-cols-2 lg:items-center", children: [
52
+ /* @__PURE__ */ jsx("div", { className: textOrder, children: textContent }),
53
+ /* @__PURE__ */ jsx("div", { className: mediaOrder, children: mediaContent })
54
+ ] }) }) });
55
+ };
56
+ const SideMediaCtaDefaults = {
57
+ heading: "Medium length heading goes here",
58
+ description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.",
59
+ buttons: [{ label: "Button" }, { label: "Button", variant: "secondary" }],
60
+ images: [
61
+ {
62
+ src: "https://picsum.photos/seed/cta-side/800/600",
63
+ alt: "Relume placeholder image"
64
+ }
65
+ ],
66
+ video: "",
67
+ inputPlaceholder: "Enter your email",
68
+ formButton: { label: "Sign up" },
69
+ termsAndConditions: `
70
+ <p class='text-xs'>
71
+ By clicking Sign Up you're confirming that you agree with our
72
+ <a href='#' class='underline'>Terms and Conditions</a>.
73
+ </p>
74
+ `,
75
+ styles: {
76
+ mediaPosition: "right",
77
+ bordered: false,
78
+ formType: "buttons"
79
+ }
80
+ };
81
+ export {
82
+ SideMediaCta,
83
+ SideMediaCtaDefaults
84
+ };
@@ -25,7 +25,7 @@ declare const conf: {
25
25
  readonly action: {
26
26
  type: "custom";
27
27
  label: string;
28
- render: typeof import("../../../puck-core").ActionField;
28
+ render: typeof import("../../..").ActionField;
29
29
  };
30
30
  readonly variant: {
31
31
  readonly type: "select";
@@ -111,67 +111,6 @@ declare const conf: {
111
111
  video: {
112
112
  type: string;
113
113
  };
114
- inputPlaceholder: {
115
- type: string;
116
- };
117
- formButton: {
118
- readonly type: "object";
119
- readonly objectFields: {
120
- readonly label: {
121
- readonly type: "text";
122
- };
123
- readonly action: {
124
- type: "custom";
125
- label: string;
126
- render: typeof import("../../../puck-core").ActionField;
127
- };
128
- readonly variant: {
129
- readonly type: "select";
130
- readonly options: readonly [{
131
- readonly label: "primary";
132
- readonly value: "default";
133
- }, {
134
- readonly label: "secondary";
135
- readonly value: "secondary";
136
- }, {
137
- readonly label: "outline";
138
- readonly value: "outline";
139
- }, {
140
- readonly label: "ghost";
141
- readonly value: "ghost";
142
- }, {
143
- readonly label: "link";
144
- readonly value: "link";
145
- }, {
146
- readonly label: "destructive";
147
- readonly value: "destructive";
148
- }];
149
- };
150
- readonly size: {
151
- readonly type: "select";
152
- readonly options: readonly [{
153
- readonly label: "default";
154
- readonly value: "default";
155
- }, {
156
- readonly label: "sm";
157
- readonly value: "sm";
158
- }, {
159
- readonly label: "lg";
160
- readonly value: "lg";
161
- }, {
162
- readonly label: "icon";
163
- readonly value: "icon";
164
- }];
165
- };
166
- readonly icon: {
167
- type: "custom";
168
- render: typeof import("../../../puck-core/fields/icon-picker-field").IconPickerField;
169
- };
170
- };
171
- };
172
- termsAndConditions: {
173
- type: string;
174
- };
175
114
  logos: {
176
115
  readonly type: "array";
177
116
  readonly max: 10;
@@ -263,17 +202,6 @@ declare const conf: {
263
202
  readonly value: "false";
264
203
  }];
265
204
  };
266
- formType: {
267
- readonly type: "radio";
268
- readonly label: "Form Type";
269
- readonly options: readonly [{
270
- readonly label: "Buttons";
271
- readonly value: "buttons";
272
- }, {
273
- readonly label: "Email";
274
- readonly value: "email";
275
- }];
276
- };
277
205
  bottomContent: {
278
206
  readonly type: "select";
279
207
  readonly label: "Bottom Content";
@@ -291,7 +219,7 @@ declare const conf: {
291
219
  };
292
220
  };
293
221
  };
294
- defaultProps: import("../props").CtaSectionBaseProps & {
222
+ defaultProps: Omit<import("../props").CtaSectionBaseProps, "inputPlaceholder" | "formButton" | "termsAndConditions"> & {
295
223
  logos: import("@/components/puck-core/core/props/media").BaseImage[];
296
224
  };
297
225
  render: (props: TextBlockCtaProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,38 @@
1
+ import { TextBlockCta, TextBlockCtaDefaults } from "./text-block-cta.js";
2
+ import { descriptionField, headingField } from "../../../puck-core/core/props/content.js";
3
+ import { buttonsField } from "../../../puck-core/core/props/interactive.js";
4
+ import { imagesField } from "../../../puck-core/core/props/media.js";
5
+ import { ctaStyleFields } from "../props.js";
6
+ import { sectionWrapperFields } from "../../../puck-core/section-wrapper.js";
7
+ const conf = {
8
+ fields: {
9
+ heading: headingField,
10
+ description: descriptionField,
11
+ buttons: buttonsField,
12
+ images: imagesField,
13
+ video: { type: "text" },
14
+ // inputPlaceholder: { type: "text" },
15
+ // formButton: buttonField,
16
+ // termsAndConditions: { type: "textarea" },
17
+ logos: imagesField,
18
+ styles: {
19
+ type: "object",
20
+ label: "Styles",
21
+ objectFields: {
22
+ textLayout: ctaStyleFields.textLayout,
23
+ bgMedia: ctaStyleFields.bgMedia,
24
+ bordered: ctaStyleFields.bordered,
25
+ // formType: ctaStyleFields.formType,
26
+ bottomContent: ctaStyleFields.bottomContent,
27
+ ...sectionWrapperFields
28
+ }
29
+ }
30
+ },
31
+ defaultProps: TextBlockCtaDefaults,
32
+ render: TextBlockCta
33
+ };
34
+ export {
35
+ TextBlockCta,
36
+ TextBlockCtaDefaults,
37
+ conf as default
38
+ };
@@ -3,6 +3,6 @@ export type TextBlockCtaProps = CtaComponentProps<{
3
3
  logos: BaseImage[];
4
4
  }>;
5
5
  export declare const TextBlockCta: (props: TextBlockCtaProps) => import("react/jsx-runtime").JSX.Element;
6
- export declare const TextBlockCtaDefaults: CtaSectionBaseProps & {
6
+ export declare const TextBlockCtaDefaults: Omit<CtaSectionBaseProps, "inputPlaceholder" | "formButton" | "termsAndConditions"> & {
7
7
  logos: BaseImage[];
8
8
  };
@@ -0,0 +1,165 @@
1
+ "use client";
2
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
3
+ import { CompoundButton } from "../../../puck-base/button.js";
4
+ import { CompoundImage } from "../../../puck-base/image.js";
5
+ import { cn } from "../../../../utils/css-utils.js";
6
+ import { SectionWrapper } from "../../../puck-core/section-wrapper.js";
7
+ const TextBlockCta = (props) => {
8
+ const {
9
+ heading,
10
+ description,
11
+ buttons,
12
+ images,
13
+ video,
14
+ // inputPlaceholder,
15
+ // formButton,
16
+ // termsAndConditions,
17
+ styles,
18
+ logos
19
+ } = {
20
+ ...TextBlockCtaDefaults,
21
+ ...props
22
+ };
23
+ const {
24
+ className: sectionClassName,
25
+ style: sectionStyle,
26
+ css,
27
+ textLayout = "left",
28
+ bgMedia = "none",
29
+ bordered = false,
30
+ // formType = "buttons",
31
+ bottomContent = "none"
32
+ } = styles ?? {};
33
+ const hasBg = bgMedia !== "none";
34
+ const isFullscreenBg = bgMedia === "fullscreenImage" || bgMedia === "fullscreenVideo";
35
+ const isContainerBg = bgMedia === "containerImage" || bgMedia === "containerVideo";
36
+ const isBgImage = bgMedia === "fullscreenImage" || bgMedia === "containerImage";
37
+ const isBgVideo = bgMedia === "fullscreenVideo" || bgMedia === "containerVideo";
38
+ const isCenter = textLayout === "center";
39
+ const isTwoColumn = textLayout === "twoColumn";
40
+ const isInlineRow = textLayout === "inlineRow";
41
+ const renderActions = () => {
42
+ return /* @__PURE__ */ jsx("div", { className: "mt-6 flex flex-wrap gap-4 md:mt-8", children: buttons.map((button, index) => /* @__PURE__ */ jsx(CompoundButton, { label: button.label, variant: button.variant, size: button.size, action: button.action, icon: button.icon }, index)) });
43
+ };
44
+ const renderBottomContent = () => {
45
+ if (bottomContent === "image" && images && images.length > 0) {
46
+ return /* @__PURE__ */ jsx("div", { className: "mt-12 md:mt-18 lg:mt-20", children: /* @__PURE__ */ jsx(
47
+ CompoundImage,
48
+ {
49
+ src: images[0].src,
50
+ alt: images[0].alt,
51
+ className: "w-full object-cover"
52
+ }
53
+ ) });
54
+ }
55
+ if (bottomContent === "logos" && logos && logos.length > 0) {
56
+ return /* @__PURE__ */ jsx("div", { className: "mt-12 flex flex-wrap items-center justify-center gap-x-8 gap-y-6 md:mt-18 lg:mt-20", children: logos.map((logo, index) => /* @__PURE__ */ jsx(CompoundImage, { src: logo.src, alt: logo.alt, className: "max-h-12" }, index)) });
57
+ }
58
+ return null;
59
+ };
60
+ const renderBgMedia = () => {
61
+ var _a, _b;
62
+ if (!hasBg) return null;
63
+ if (isFullscreenBg) {
64
+ return /* @__PURE__ */ jsxs("div", { className: "absolute inset-0 z-0", children: [
65
+ isBgImage && /* @__PURE__ */ jsxs(Fragment, { children: [
66
+ /* @__PURE__ */ jsx(CompoundImage, { src: (_a = images == null ? void 0 : images[0]) == null ? void 0 : _a.src, className: "size-full object-cover", alt: (_b = images == null ? void 0 : images[0]) == null ? void 0 : _b.alt }),
67
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-black/50" })
68
+ ] }),
69
+ isBgVideo && /* @__PURE__ */ jsxs(Fragment, { children: [
70
+ /* @__PURE__ */ jsx("video", { className: "size-full object-cover", autoPlay: true, loop: true, muted: true, children: /* @__PURE__ */ jsx("source", { src: video, type: "video/mp4" }) }),
71
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-black/50" })
72
+ ] })
73
+ ] });
74
+ }
75
+ return null;
76
+ };
77
+ const renderContainerMedia = () => {
78
+ var _a, _b;
79
+ if (!isContainerBg) return null;
80
+ return /* @__PURE__ */ jsxs("div", { className: "mt-12 md:mt-18 lg:mt-20", children: [
81
+ isBgImage && /* @__PURE__ */ jsx(CompoundImage, { src: (_a = images == null ? void 0 : images[0]) == null ? void 0 : _a.src, className: "w-full object-cover", alt: (_b = images == null ? void 0 : images[0]) == null ? void 0 : _b.alt }),
82
+ isBgVideo && /* @__PURE__ */ jsx("video", { className: "w-full object-cover", autoPlay: true, loop: true, muted: true, children: /* @__PURE__ */ jsx("source", { src: video, type: "video/mp4" }) })
83
+ ] });
84
+ };
85
+ const textColorClass = isFullscreenBg ? "text-text-alternative" : "";
86
+ const renderTextContent = () => {
87
+ if (isTwoColumn) {
88
+ return /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-y-5 md:grid-cols-2 md:gap-x-12 lg:gap-x-20", children: [
89
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("h2", { className: cn("mb-5 text-5xl font-bold md:mb-6 md:text-7xl lg:text-8xl", textColorClass), children: heading }) }),
90
+ /* @__PURE__ */ jsxs("div", { children: [
91
+ /* @__PURE__ */ jsx("p", { className: cn("md:text-md", textColorClass), children: description }),
92
+ renderActions()
93
+ ] })
94
+ ] });
95
+ }
96
+ if (isInlineRow) {
97
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col items-start gap-6 md:flex-row md:items-center md:justify-between", {
98
+ "border border-border-primary p-8 md:p-12": bordered && !isFullscreenBg
99
+ }), children: [
100
+ /* @__PURE__ */ jsx("h2", { className: cn("text-5xl font-bold md:text-7xl lg:text-8xl", textColorClass), children: heading }),
101
+ renderActions()
102
+ ] });
103
+ }
104
+ if (isCenter) {
105
+ return /* @__PURE__ */ jsxs("div", { className: cn("mx-auto max-w-lg text-center", textColorClass), children: [
106
+ /* @__PURE__ */ jsx("h2", { className: "mb-5 text-5xl font-bold md:mb-6 md:text-7xl lg:text-8xl", children: heading }),
107
+ /* @__PURE__ */ jsx("p", { className: "md:text-md", children: description }),
108
+ renderActions()
109
+ ] });
110
+ }
111
+ return /* @__PURE__ */ jsxs("div", { className: cn("w-full max-w-lg", textColorClass), children: [
112
+ /* @__PURE__ */ jsx("h2", { className: "mb-5 text-5xl font-bold md:mb-6 md:text-7xl lg:text-8xl", children: heading }),
113
+ /* @__PURE__ */ jsx("p", { className: "md:text-md", children: description }),
114
+ renderActions()
115
+ ] });
116
+ };
117
+ return /* @__PURE__ */ jsxs(SectionWrapper, { className: cn("px-[5%] py-8 md:py-12 lg:py-14", { relative: isFullscreenBg }, sectionClassName), style: sectionStyle, css, children: [
118
+ renderBgMedia(),
119
+ /* @__PURE__ */ jsxs("div", { className: cn("container", { "relative z-10": isFullscreenBg }), children: [
120
+ renderTextContent(),
121
+ renderContainerMedia(),
122
+ renderBottomContent()
123
+ ] })
124
+ ] });
125
+ };
126
+ const TextBlockCtaDefaults = {
127
+ heading: "Medium length heading goes here",
128
+ description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.",
129
+ buttons: [{ label: "Button" }, { label: "Button", variant: "secondary" }],
130
+ images: [
131
+ {
132
+ src: "https://picsum.photos/seed/cta-bg/1920/1080",
133
+ alt: "Relume placeholder image"
134
+ },
135
+ {
136
+ src: "https://picsum.photos/seed/cta-bottom/1200/600",
137
+ alt: "Relume placeholder image"
138
+ }
139
+ ],
140
+ video: "https://www.example.com/video.mp4",
141
+ // inputPlaceholder: "Enter your email",
142
+ // formButton: { label: "Sign up" },
143
+ // termsAndConditions: `
144
+ // <p class='text-xs'>
145
+ // By clicking Sign Up you're confirming that you agree with our
146
+ // <a href='#' class='underline'>Terms and Conditions</a>.
147
+ // </p>
148
+ // `,
149
+ logos: [
150
+ { src: "https://picsum.photos/seed/logo1/120/40", alt: "Logo 1" },
151
+ { src: "https://picsum.photos/seed/logo2/120/40", alt: "Logo 2" },
152
+ { src: "https://picsum.photos/seed/logo3/120/40", alt: "Logo 3" }
153
+ ],
154
+ styles: {
155
+ textLayout: "left",
156
+ bgMedia: "none",
157
+ bordered: false,
158
+ // formType: "buttons",
159
+ bottomContent: "none"
160
+ }
161
+ };
162
+ export {
163
+ TextBlockCta,
164
+ TextBlockCtaDefaults
165
+ };
@@ -46,7 +46,7 @@ declare const conf: {
46
46
  readonly action: {
47
47
  type: "custom";
48
48
  label: string;
49
- render: typeof import("../../../puck-core").ActionField;
49
+ render: typeof import("../../..").ActionField;
50
50
  };
51
51
  readonly variant: {
52
52
  readonly type: "select";
@@ -55,7 +55,7 @@ declare const conf: {
55
55
  readonly action: {
56
56
  type: "custom";
57
57
  label: string;
58
- render: typeof import("../../../puck-core").ActionField;
58
+ render: typeof import("../../..").ActionField;
59
59
  };
60
60
  readonly variant: {
61
61
  readonly type: "select";
@@ -46,7 +46,7 @@ declare const conf: {
46
46
  readonly action: {
47
47
  type: "custom";
48
48
  label: string;
49
- render: typeof import("../../../puck-core").ActionField;
49
+ render: typeof import("../../..").ActionField;
50
50
  };
51
51
  readonly variant: {
52
52
  readonly type: "select";
@@ -46,7 +46,7 @@ declare const conf: {
46
46
  readonly action: {
47
47
  type: "custom";
48
48
  label: string;
49
- render: typeof import("../../../puck-core").ActionField;
49
+ render: typeof import("../../..").ActionField;
50
50
  };
51
51
  readonly variant: {
52
52
  readonly type: "select";
@@ -21,7 +21,7 @@ declare const conf: {
21
21
  readonly action: {
22
22
  type: "custom";
23
23
  label: string;
24
- render: typeof import("../../../puck-core").ActionField;
24
+ render: typeof import("../../..").ActionField;
25
25
  };
26
26
  readonly variant: {
27
27
  readonly type: "select";
@@ -21,7 +21,7 @@ declare const conf: {
21
21
  readonly action: {
22
22
  type: "custom";
23
23
  label: string;
24
- render: typeof import("../../../puck-core").ActionField;
24
+ render: typeof import("../../..").ActionField;
25
25
  };
26
26
  readonly variant: {
27
27
  readonly type: "select";
@@ -38,7 +38,7 @@ declare const conf: {
38
38
  readonly action: {
39
39
  type: "custom";
40
40
  label: string;
41
- render: typeof import("../../../puck-core").ActionField;
41
+ render: typeof import("../../..").ActionField;
42
42
  };
43
43
  readonly variant: {
44
44
  readonly type: "select";
@@ -119,7 +119,7 @@ declare const conf: {
119
119
  readonly action: {
120
120
  type: "custom";
121
121
  label: string;
122
- render: typeof import("../../../puck-core").ActionField;
122
+ render: typeof import("../../..").ActionField;
123
123
  };
124
124
  readonly variant: {
125
125
  readonly type: "select";
@@ -38,7 +38,7 @@ declare const conf: {
38
38
  readonly action: {
39
39
  type: "custom";
40
40
  label: string;
41
- render: typeof import("../../../puck-core").ActionField;
41
+ render: typeof import("../../..").ActionField;
42
42
  };
43
43
  readonly variant: {
44
44
  readonly type: "select";
@@ -119,7 +119,7 @@ declare const conf: {
119
119
  readonly action: {
120
120
  type: "custom";
121
121
  label: string;
122
- render: typeof import("../../../puck-core").ActionField;
122
+ render: typeof import("../../..").ActionField;
123
123
  };
124
124
  readonly variant: {
125
125
  readonly type: "select";