dune-react 0.0.41 → 0.0.43
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.
- package/dist/components/puck-block/contact-sections/centered-form/centered-form.js +1 -1
- package/dist/components/puck-block/contact-sections/centered-form/index.d.ts +96 -0
- package/dist/components/puck-block/contact-sections/centered-form/index.js +6 -1
- package/dist/components/puck-block/contact-sections/contact-cards-grid/contact-cards-grid.js +3 -3
- package/dist/components/puck-block/contact-sections/contact-cards-grid/index.d.ts +159 -0
- package/dist/components/puck-block/contact-sections/contact-cards-grid/index.js +14 -1
- package/dist/components/puck-block/contact-sections/contact-modal/contact-modal.js +1 -1
- package/dist/components/puck-block/contact-sections/contact-modal/index.d.ts +99 -0
- package/dist/components/puck-block/contact-sections/contact-modal/index.js +7 -1
- package/dist/components/puck-block/contact-sections/form-with-media/form-with-media.js +1 -1
- package/dist/components/puck-block/contact-sections/form-with-media/index.d.ts +87 -0
- package/dist/components/puck-block/contact-sections/form-with-media/index.js +4 -1
- package/dist/components/puck-block/contact-sections/header-form-cards/header-form-cards.js +1 -1
- package/dist/components/puck-block/contact-sections/header-form-cards/index.d.ts +104 -0
- package/dist/components/puck-block/contact-sections/header-form-cards/index.js +13 -2
- package/dist/components/puck-block/contact-sections/header-info-fullwidth/index.d.ts +150 -0
- package/dist/components/puck-block/contact-sections/header-info-fullwidth/index.js +12 -1
- package/dist/components/puck-block/contact-sections/info-cards-media/index.d.ts +150 -0
- package/dist/components/puck-block/contact-sections/info-cards-media/index.js +12 -1
- package/dist/components/puck-block/contact-sections/location-cards-grid/index.d.ts +147 -0
- package/dist/components/puck-block/contact-sections/location-cards-grid/index.js +5 -1
- package/dist/components/puck-block/contact-sections/props.d.ts +1 -1
- package/dist/components/puck-block/contact-sections/split-info-form/index.d.ts +96 -0
- package/dist/components/puck-block/contact-sections/split-info-form/index.js +6 -1
- package/dist/components/puck-block/contact-sections/split-info-form/split-info-form.js +135 -50
- package/dist/components/puck-block/contact-sections/tab-locations/index.d.ts +147 -0
- package/dist/components/puck-block/contact-sections/tab-locations/index.js +5 -1
- package/dist/components/puck-block/cta-sections/props.d.ts +1 -1
- package/dist/components/puck-block/cta-sections/props.js +8 -0
- package/dist/components/puck-block/cta-sections/side-media-cta/index.d.ts +75 -0
- package/dist/components/puck-block/cta-sections/side-media-cta/index.js +6 -6
- package/dist/components/puck-block/cta-sections/side-media-cta/side-media-cta.js +3 -3
- package/dist/components/puck-block/cta-sections/text-block-cta/text-block-cta.js +3 -3
- package/dist/components/puck-block/faq-sections/dual-column-accordion-faq/dual-column-accordion-faq.js +2 -2
- package/dist/components/puck-block/faq-sections/props.d.ts +2 -2
- package/dist/components/puck-block/faq-sections/stacked-accordion-faq/stacked-accordion-faq.js +5 -5
- package/dist/components/puck-block/faq-sections/stacked-static-faq/stacked-static-faq.js +3 -3
- package/dist/components/puck-block/faq-sections/two-column-accordion-faq/index.d.ts +6 -0
- package/dist/components/puck-block/faq-sections/two-column-accordion-faq/index.js +2 -0
- package/dist/components/puck-block/faq-sections/two-column-accordion-faq/two-column-accordion-faq.js +2 -2
- package/dist/components/puck-block/faq-sections/two-column-static-faq/index.d.ts +6 -0
- package/dist/components/puck-block/faq-sections/two-column-static-faq/index.js +2 -0
- package/dist/components/puck-block/feature-sections/props.d.ts +3 -3
- package/dist/components/puck-block/feature-sections/text-media-split/component.js +6 -6
- package/dist/components/puck-block/feature-sections/text-only-section/component.js +8 -8
- package/dist/components/puck-block/footer-sections/centered-minimal-footer/index.d.ts +226 -2
- package/dist/components/puck-block/footer-sections/centered-minimal-footer/index.js +34 -1
- package/dist/components/puck-block/footer-sections/contact-links-footer/contact-links-footer.js +2 -2
- package/dist/components/puck-block/footer-sections/contact-links-footer/index.d.ts +159 -2
- package/dist/components/puck-block/footer-sections/contact-links-footer/index.js +32 -2
- package/dist/components/puck-block/footer-sections/cta-links-footer/cta-links-footer.js +2 -2
- package/dist/components/puck-block/footer-sections/cta-links-footer/index.d.ts +114 -2
- package/dist/components/puck-block/footer-sections/cta-links-footer/index.js +44 -2
- package/dist/components/puck-block/footer-sections/props.d.ts +2 -2
- package/dist/components/puck-block/gallery-sections/asymmetric-grid/index.d.ts +145 -0
- package/dist/components/puck-block/gallery-sections/asymmetric-grid/index.js +6 -0
- package/dist/components/puck-block/gallery-sections/fullscreen-portfolio/index.d.ts +169 -0
- package/dist/components/puck-block/gallery-sections/fullscreen-portfolio/index.js +11 -2
- package/dist/components/puck-block/gallery-sections/image-carousel/image-carousel.js +6 -6
- package/dist/components/puck-block/gallery-sections/image-carousel/index.d.ts +145 -0
- package/dist/components/puck-block/gallery-sections/image-carousel/index.js +6 -0
- package/dist/components/puck-block/gallery-sections/interactive-portfolio/index.d.ts +163 -0
- package/dist/components/puck-block/gallery-sections/interactive-portfolio/index.js +9 -1
- package/dist/components/puck-block/gallery-sections/masonry-grid/index.d.ts +145 -0
- package/dist/components/puck-block/gallery-sections/masonry-grid/index.js +6 -0
- package/dist/components/puck-block/gallery-sections/portfolio-cards/index.d.ts +104 -0
- package/dist/components/puck-block/gallery-sections/portfolio-cards/index.js +7 -3
- package/dist/components/puck-block/gallery-sections/portfolio-cards/portfolio-cards.js +3 -3
- package/dist/components/puck-block/gallery-sections/portfolio-divider/index.d.ts +104 -0
- package/dist/components/puck-block/gallery-sections/portfolio-divider/index.js +7 -3
- package/dist/components/puck-block/gallery-sections/props.d.ts +3 -3
- package/dist/components/puck-block/gallery-sections/scroll-parallax/index.d.ts +145 -0
- package/dist/components/puck-block/gallery-sections/scroll-parallax/index.js +7 -1
- package/dist/components/puck-block/gallery-sections/scroll-parallax-portfolio/index.d.ts +228 -0
- package/dist/components/puck-block/gallery-sections/scroll-parallax-portfolio/index.js +13 -1
- package/dist/components/puck-block/gallery-sections/split-carousel/index.d.ts +145 -0
- package/dist/components/puck-block/gallery-sections/split-carousel/index.js +6 -0
- package/dist/components/puck-block/gallery-sections/static-grid/index.d.ts +145 -0
- package/dist/components/puck-block/gallery-sections/static-grid/index.js +6 -0
- package/dist/components/puck-block/header-sections/centered-navbar/index.d.ts +5 -2
- package/dist/components/puck-block/header-sections/centered-navbar/index.js +8 -1
- package/dist/components/puck-block/header-sections/drawer-navbar/index.d.ts +5 -2
- package/dist/components/puck-block/header-sections/drawer-navbar/index.js +1 -1
- package/dist/components/puck-block/header-sections/floating-bordered-navbar/index.d.ts +5 -2
- package/dist/components/puck-block/header-sections/floating-bordered-navbar/index.js +1 -1
- package/dist/components/puck-block/header-sections/fullscreen-overlay-navbar/index.d.ts +5 -2
- package/dist/components/puck-block/header-sections/fullscreen-overlay-navbar/index.js +1 -1
- package/dist/components/puck-block/header-sections/mega-menu-navbar/index.d.ts +5 -2
- package/dist/components/puck-block/header-sections/mega-menu-navbar/index.js +1 -1
- package/dist/components/puck-block/header-sections/standard-navbar/index.d.ts +5 -2
- package/dist/components/puck-block/header-sections/standard-navbar/index.js +8 -1
- package/dist/components/puck-block/hero-sections/carousel-hero/component.d.ts +1 -6
- package/dist/components/puck-block/hero-sections/carousel-hero/component.js +24 -36
- package/dist/components/puck-block/hero-sections/carousel-hero/index.d.ts +0 -6
- package/dist/components/puck-block/hero-sections/carousel-hero/index.js +1 -3
- package/dist/components/puck-block/hero-sections/props.d.ts +2 -2
- package/dist/components/puck-block/hero-sections/three-image-parallax-hero/component.js +5 -5
- package/dist/components/puck-block/metrics-sections/center-media-stats/index.d.ts +79 -0
- package/dist/components/puck-block/metrics-sections/center-media-stats/index.js +2 -0
- package/dist/components/puck-block/metrics-sections/header-stats-row/header-stats-row.js +6 -1
- package/dist/components/puck-block/pricing-sections/pricing-card-grid/index.d.ts +55 -0
- package/dist/components/puck-block/pricing-sections/pricing-card-grid/index.js +3 -1
- package/dist/components/puck-block/pricing-sections/pricing-comparison-table/component.js +7 -7
- package/dist/components/puck-block/pricing-sections/pricing-comparison-table/index.d.ts +55 -0
- package/dist/components/puck-block/pricing-sections/pricing-comparison-table/index.js +3 -1
- package/dist/components/puck-block/pricing-sections/props.d.ts +2 -2
- package/dist/components/puck-block/pricing-sections/single-pricing-card/index.d.ts +64 -0
- package/dist/components/puck-block/pricing-sections/single-pricing-card/index.js +5 -1
- package/dist/components/puck-block/pricing-sections/split-pricing/index.d.ts +70 -0
- package/dist/components/puck-block/pricing-sections/split-pricing/index.js +7 -2
- package/dist/components/puck-block/pricing-sections/tab-pricing-grid/index.d.ts +78 -0
- package/dist/components/puck-block/pricing-sections/tab-pricing-grid/index.js +13 -1
- package/dist/components/puck-block/pricing-sections/tab-single-pricing/index.d.ts +23 -0
- package/dist/components/puck-block/pricing-sections/tab-single-pricing/index.js +10 -1
- package/dist/components/puck-block/registry.generated.d.ts +5732 -2061
- package/dist/components/puck-block/registry.generated.js +14 -14
- package/dist/components/puck-block/showcase-sections/compact-timeline/component.js +3 -3
- package/dist/components/puck-block/showcase-sections/horizontal-timeline/component.js +3 -3
- package/dist/components/puck-block/showcase-sections/props.d.ts +2 -2
- package/dist/components/puck-block/showcase-sections/single-column-timeline/component.js +6 -6
- package/dist/components/puck-block/showcase-sections/sticky-scroll-timeline/component.js +6 -6
- package/dist/components/puck-block/showcase-sections/zigzag-timeline/component.js +6 -6
- package/dist/components/puck-block/team-sections/props.d.ts +1 -1
- package/dist/components/puck-block/team-sections/team-carousel/index.d.ts +25 -0
- package/dist/components/puck-block/team-sections/team-carousel/index.js +22 -1
- package/dist/components/puck-block/team-sections/team-grid/component.js +3 -3
- package/dist/components/puck-block/team-sections/team-grid/index.d.ts +25 -0
- package/dist/components/puck-block/team-sections/team-grid/index.js +22 -1
- package/dist/components/puck-block/team-sections/team-inline-card/index.d.ts +25 -0
- package/dist/components/puck-block/team-sections/team-inline-card/index.js +22 -1
- package/dist/components/puck-block/team-sections/team-sticky-scatter/index.d.ts +25 -0
- package/dist/components/puck-block/team-sections/team-sticky-scatter/index.js +22 -1
- package/dist/components/puck-block/team-sections/team-two-column/index.d.ts +25 -0
- package/dist/components/puck-block/team-sections/team-two-column/index.js +22 -1
- package/dist/components/puck-block/testimonial-sections/bento-testimonial/component.js +2 -2
- package/dist/components/puck-block/testimonial-sections/halfscreen-testimonial-carousel/component.js +3 -3
- package/dist/components/puck-block/testimonial-sections/halfscreen-testimonial-carousel/index.d.ts +9 -0
- package/dist/components/puck-block/testimonial-sections/halfscreen-testimonial-carousel/index.js +3 -1
- package/dist/components/puck-block/testimonial-sections/marquee-testimonial/index.d.ts +9 -0
- package/dist/components/puck-block/testimonial-sections/marquee-testimonial/index.js +3 -1
- package/dist/components/puck-block/testimonial-sections/masonry-testimonial/index.d.ts +9 -0
- package/dist/components/puck-block/testimonial-sections/masonry-testimonial/index.js +3 -1
- package/dist/components/puck-block/testimonial-sections/props.d.ts +5 -5
- package/dist/components/puck-block/testimonial-sections/sticky-testimonial/index.d.ts +9 -0
- package/dist/components/puck-block/testimonial-sections/sticky-testimonial/index.js +3 -1
- package/dist/components/puck-block/testimonial-sections/tab-testimonial/component.js +7 -7
- package/dist/components/puck-block/testimonial-sections/tab-testimonial/index.d.ts +47 -0
- package/dist/components/puck-block/testimonial-sections/tab-testimonial/index.js +5 -1
- package/dist/components/puck-block/testimonial-sections/testimonial-card-grid/component.js +6 -6
- package/dist/components/puck-block/testimonial-sections/testimonial-card-grid/index.d.ts +30 -0
- package/dist/components/puck-block/testimonial-sections/testimonial-card-grid/index.js +6 -1
- package/dist/components/puck-block/testimonial-sections/testimonial-carousel/component.js +9 -9
- package/dist/components/puck-block/testimonial-sections/testimonial-carousel/index.d.ts +21 -0
- package/dist/components/puck-block/testimonial-sections/testimonial-carousel/index.js +5 -1
- package/dist/components/puck-block/text-sections/blog-article/component.js +3 -3
- package/dist/components/puck-block/text-sections/props.d.ts +3 -3
- package/dist/components/puck-block/text-sections/prose-content/component.js +3 -3
- package/dist/components/puck-core/core/props/index.js +0 -7
- package/package.json +20 -20
|
@@ -15,6 +15,153 @@ declare const conf: {
|
|
|
15
15
|
readonly type: "textarea";
|
|
16
16
|
readonly contentEditable: true;
|
|
17
17
|
};
|
|
18
|
+
button: {
|
|
19
|
+
readonly type: "object";
|
|
20
|
+
readonly objectFields: {
|
|
21
|
+
readonly label: {
|
|
22
|
+
readonly type: "text";
|
|
23
|
+
};
|
|
24
|
+
readonly action: {
|
|
25
|
+
type: "custom";
|
|
26
|
+
label: string;
|
|
27
|
+
render: typeof import("../../..").ActionField;
|
|
28
|
+
};
|
|
29
|
+
readonly variant: {
|
|
30
|
+
readonly type: "select";
|
|
31
|
+
readonly options: readonly [{
|
|
32
|
+
readonly label: "primary";
|
|
33
|
+
readonly value: "default";
|
|
34
|
+
}, {
|
|
35
|
+
readonly label: "secondary";
|
|
36
|
+
readonly value: "secondary";
|
|
37
|
+
}, {
|
|
38
|
+
readonly label: "outline";
|
|
39
|
+
readonly value: "outline";
|
|
40
|
+
}, {
|
|
41
|
+
readonly label: "ghost";
|
|
42
|
+
readonly value: "ghost";
|
|
43
|
+
}, {
|
|
44
|
+
readonly label: "link";
|
|
45
|
+
readonly value: "link";
|
|
46
|
+
}, {
|
|
47
|
+
readonly label: "destructive";
|
|
48
|
+
readonly value: "destructive";
|
|
49
|
+
}];
|
|
50
|
+
};
|
|
51
|
+
readonly size: {
|
|
52
|
+
readonly type: "select";
|
|
53
|
+
readonly options: readonly [{
|
|
54
|
+
readonly label: "default";
|
|
55
|
+
readonly value: "default";
|
|
56
|
+
}, {
|
|
57
|
+
readonly label: "sm";
|
|
58
|
+
readonly value: "sm";
|
|
59
|
+
}, {
|
|
60
|
+
readonly label: "lg";
|
|
61
|
+
readonly value: "lg";
|
|
62
|
+
}, {
|
|
63
|
+
readonly label: "icon";
|
|
64
|
+
readonly value: "icon";
|
|
65
|
+
}];
|
|
66
|
+
};
|
|
67
|
+
readonly icon: {
|
|
68
|
+
type: "custom";
|
|
69
|
+
render: typeof import("../../../puck-core/fields/icon-picker-field").IconPickerField;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
buttons: {
|
|
74
|
+
readonly type: "array";
|
|
75
|
+
readonly max: 3;
|
|
76
|
+
readonly getItemSummary: (item: {
|
|
77
|
+
label?: string;
|
|
78
|
+
}, index?: number) => string;
|
|
79
|
+
readonly arrayFields: {
|
|
80
|
+
readonly label: {
|
|
81
|
+
readonly type: "text";
|
|
82
|
+
};
|
|
83
|
+
readonly action: {
|
|
84
|
+
type: "custom";
|
|
85
|
+
label: string;
|
|
86
|
+
render: typeof import("../../..").ActionField;
|
|
87
|
+
};
|
|
88
|
+
readonly variant: {
|
|
89
|
+
readonly type: "select";
|
|
90
|
+
readonly options: readonly [{
|
|
91
|
+
readonly label: "primary";
|
|
92
|
+
readonly value: "default";
|
|
93
|
+
}, {
|
|
94
|
+
readonly label: "secondary";
|
|
95
|
+
readonly value: "secondary";
|
|
96
|
+
}, {
|
|
97
|
+
readonly label: "outline";
|
|
98
|
+
readonly value: "outline";
|
|
99
|
+
}, {
|
|
100
|
+
readonly label: "ghost";
|
|
101
|
+
readonly value: "ghost";
|
|
102
|
+
}, {
|
|
103
|
+
readonly label: "link";
|
|
104
|
+
readonly value: "link";
|
|
105
|
+
}, {
|
|
106
|
+
readonly label: "destructive";
|
|
107
|
+
readonly value: "destructive";
|
|
108
|
+
}];
|
|
109
|
+
};
|
|
110
|
+
readonly size: {
|
|
111
|
+
readonly type: "select";
|
|
112
|
+
readonly options: readonly [{
|
|
113
|
+
readonly label: "default";
|
|
114
|
+
readonly value: "default";
|
|
115
|
+
}, {
|
|
116
|
+
readonly label: "sm";
|
|
117
|
+
readonly value: "sm";
|
|
118
|
+
}, {
|
|
119
|
+
readonly label: "lg";
|
|
120
|
+
readonly value: "lg";
|
|
121
|
+
}, {
|
|
122
|
+
readonly label: "icon";
|
|
123
|
+
readonly value: "icon";
|
|
124
|
+
}];
|
|
125
|
+
};
|
|
126
|
+
readonly icon: {
|
|
127
|
+
type: "custom";
|
|
128
|
+
render: typeof import("../../../puck-core/fields/icon-picker-field").IconPickerField;
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
readonly defaultItemProps: {
|
|
132
|
+
readonly label: "Button";
|
|
133
|
+
readonly action: {
|
|
134
|
+
readonly type: "page";
|
|
135
|
+
readonly pageUrl: "";
|
|
136
|
+
readonly externalUrl: "";
|
|
137
|
+
readonly openInNewTab: "false";
|
|
138
|
+
readonly email: "";
|
|
139
|
+
readonly subject: "";
|
|
140
|
+
readonly phone: "";
|
|
141
|
+
readonly sectionId: "";
|
|
142
|
+
readonly downloadUrl: "";
|
|
143
|
+
};
|
|
144
|
+
readonly variant: "default";
|
|
145
|
+
readonly size: "default";
|
|
146
|
+
readonly icon: "none";
|
|
147
|
+
};
|
|
148
|
+
readonly ai: {
|
|
149
|
+
readonly instructions: "Buttons must use the same size";
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
media: {
|
|
153
|
+
type: "object";
|
|
154
|
+
objectFields: {
|
|
155
|
+
src: import("@puckeditor/core").Field<string>;
|
|
156
|
+
alt: {
|
|
157
|
+
type: "text";
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
contacts: {
|
|
162
|
+
type: string;
|
|
163
|
+
arrayFields: {};
|
|
164
|
+
};
|
|
18
165
|
locations: {
|
|
19
166
|
type: string;
|
|
20
167
|
max: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LocationCardsGrid, LocationCardsGridDefaults } from "./location-cards-grid.js";
|
|
2
2
|
import { descriptionField, headingField } from "../../../puck-core/core/props/content.js";
|
|
3
|
-
import { buttonField } from "../../../puck-core/core/props/interactive.js";
|
|
3
|
+
import { buttonField, buttonsField } from "../../../puck-core/core/props/interactive.js";
|
|
4
4
|
import { mediaField } from "../../../puck-core/core/props/media.js";
|
|
5
5
|
import { contactStyleFields } from "../props.js";
|
|
6
6
|
import { sectionWrapperFields } from "../../../puck-core/section-wrapper.js";
|
|
@@ -9,6 +9,10 @@ const conf = {
|
|
|
9
9
|
tagline: { type: "text" },
|
|
10
10
|
heading: headingField,
|
|
11
11
|
description: descriptionField,
|
|
12
|
+
button: buttonField,
|
|
13
|
+
buttons: buttonsField,
|
|
14
|
+
media: mediaField,
|
|
15
|
+
contacts: { type: "array", arrayFields: {} },
|
|
12
16
|
locations: {
|
|
13
17
|
type: "array",
|
|
14
18
|
max: 6,
|
|
@@ -16,7 +16,7 @@ export interface ContactSectionStyles {
|
|
|
16
16
|
mediaPosition?: "left" | "right";
|
|
17
17
|
mediaType?: "image" | "map";
|
|
18
18
|
columns?: 3 | 4;
|
|
19
|
-
hasHeader?:
|
|
19
|
+
hasHeader?: string;
|
|
20
20
|
headerAlign?: "left" | "center";
|
|
21
21
|
modalType?: "dialog" | "sheet-right" | "sheet-bottom";
|
|
22
22
|
}
|
|
@@ -79,6 +79,102 @@ declare const conf: {
|
|
|
79
79
|
};
|
|
80
80
|
};
|
|
81
81
|
};
|
|
82
|
+
buttons: {
|
|
83
|
+
readonly type: "array";
|
|
84
|
+
readonly max: 3;
|
|
85
|
+
readonly getItemSummary: (item: {
|
|
86
|
+
label?: string;
|
|
87
|
+
}, index?: number) => string;
|
|
88
|
+
readonly arrayFields: {
|
|
89
|
+
readonly label: {
|
|
90
|
+
readonly type: "text";
|
|
91
|
+
};
|
|
92
|
+
readonly action: {
|
|
93
|
+
type: "custom";
|
|
94
|
+
label: string;
|
|
95
|
+
render: typeof import("../../..").ActionField;
|
|
96
|
+
};
|
|
97
|
+
readonly variant: {
|
|
98
|
+
readonly type: "select";
|
|
99
|
+
readonly options: readonly [{
|
|
100
|
+
readonly label: "primary";
|
|
101
|
+
readonly value: "default";
|
|
102
|
+
}, {
|
|
103
|
+
readonly label: "secondary";
|
|
104
|
+
readonly value: "secondary";
|
|
105
|
+
}, {
|
|
106
|
+
readonly label: "outline";
|
|
107
|
+
readonly value: "outline";
|
|
108
|
+
}, {
|
|
109
|
+
readonly label: "ghost";
|
|
110
|
+
readonly value: "ghost";
|
|
111
|
+
}, {
|
|
112
|
+
readonly label: "link";
|
|
113
|
+
readonly value: "link";
|
|
114
|
+
}, {
|
|
115
|
+
readonly label: "destructive";
|
|
116
|
+
readonly value: "destructive";
|
|
117
|
+
}];
|
|
118
|
+
};
|
|
119
|
+
readonly size: {
|
|
120
|
+
readonly type: "select";
|
|
121
|
+
readonly options: readonly [{
|
|
122
|
+
readonly label: "default";
|
|
123
|
+
readonly value: "default";
|
|
124
|
+
}, {
|
|
125
|
+
readonly label: "sm";
|
|
126
|
+
readonly value: "sm";
|
|
127
|
+
}, {
|
|
128
|
+
readonly label: "lg";
|
|
129
|
+
readonly value: "lg";
|
|
130
|
+
}, {
|
|
131
|
+
readonly label: "icon";
|
|
132
|
+
readonly value: "icon";
|
|
133
|
+
}];
|
|
134
|
+
};
|
|
135
|
+
readonly icon: {
|
|
136
|
+
type: "custom";
|
|
137
|
+
render: typeof import("../../../puck-core/fields/icon-picker-field").IconPickerField;
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
readonly defaultItemProps: {
|
|
141
|
+
readonly label: "Button";
|
|
142
|
+
readonly action: {
|
|
143
|
+
readonly type: "page";
|
|
144
|
+
readonly pageUrl: "";
|
|
145
|
+
readonly externalUrl: "";
|
|
146
|
+
readonly openInNewTab: "false";
|
|
147
|
+
readonly email: "";
|
|
148
|
+
readonly subject: "";
|
|
149
|
+
readonly phone: "";
|
|
150
|
+
readonly sectionId: "";
|
|
151
|
+
readonly downloadUrl: "";
|
|
152
|
+
};
|
|
153
|
+
readonly variant: "default";
|
|
154
|
+
readonly size: "default";
|
|
155
|
+
readonly icon: "none";
|
|
156
|
+
};
|
|
157
|
+
readonly ai: {
|
|
158
|
+
readonly instructions: "Buttons must use the same size";
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
media: {
|
|
162
|
+
type: "object";
|
|
163
|
+
objectFields: {
|
|
164
|
+
src: import("@puckeditor/core").Field<string>;
|
|
165
|
+
alt: {
|
|
166
|
+
type: "text";
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
contacts: {
|
|
171
|
+
type: string;
|
|
172
|
+
arrayFields: {};
|
|
173
|
+
};
|
|
174
|
+
locations: {
|
|
175
|
+
type: string;
|
|
176
|
+
arrayFields: {};
|
|
177
|
+
};
|
|
82
178
|
styles: {
|
|
83
179
|
type: string;
|
|
84
180
|
label: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SplitInfoForm, SplitInfoFormDefaults } from "./split-info-form.js";
|
|
2
2
|
import { descriptionField, headingField } from "../../../puck-core/core/props/content.js";
|
|
3
|
-
import { buttonField } from "../../../puck-core/core/props/interactive.js";
|
|
3
|
+
import { buttonsField, buttonField } from "../../../puck-core/core/props/interactive.js";
|
|
4
|
+
import { mediaField } from "../../../puck-core/core/props/media.js";
|
|
4
5
|
import { contactStyleFields } from "../props.js";
|
|
5
6
|
import { sectionWrapperFields } from "../../../puck-core/section-wrapper.js";
|
|
6
7
|
const conf = {
|
|
@@ -12,6 +13,10 @@ const conf = {
|
|
|
12
13
|
phone: { type: "text" },
|
|
13
14
|
address: { type: "text" },
|
|
14
15
|
button: buttonField,
|
|
16
|
+
buttons: buttonsField,
|
|
17
|
+
media: mediaField,
|
|
18
|
+
contacts: { type: "array", arrayFields: {} },
|
|
19
|
+
locations: { type: "array", arrayFields: {} },
|
|
15
20
|
styles: {
|
|
16
21
|
type: "object",
|
|
17
22
|
label: "Styles",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { useState } from "react";
|
|
4
|
-
import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from "../../../shadcn/select.js";
|
|
5
4
|
import { Input } from "../../../shadcn/input.js";
|
|
6
5
|
import { Label } from "../../../shadcn/label.js";
|
|
7
6
|
import { Textarea } from "../../../shadcn/textarea.js";
|
|
@@ -11,11 +10,25 @@ import { BiEnvelope, BiPhone, BiMap } from "../../../../node_modules/.pnpm/react
|
|
|
11
10
|
import { cn } from "../../../../utils/css-utils.js";
|
|
12
11
|
import { SectionWrapper } from "../../../puck-core/section-wrapper.js";
|
|
13
12
|
const SplitInfoForm = (props) => {
|
|
14
|
-
const {
|
|
13
|
+
const {
|
|
14
|
+
tagline,
|
|
15
|
+
heading,
|
|
16
|
+
description,
|
|
17
|
+
email,
|
|
18
|
+
phone,
|
|
19
|
+
address,
|
|
20
|
+
button,
|
|
21
|
+
styles
|
|
22
|
+
} = {
|
|
15
23
|
...SplitInfoFormDefaults,
|
|
16
24
|
...props
|
|
17
25
|
};
|
|
18
|
-
const {
|
|
26
|
+
const {
|
|
27
|
+
className: sectionClassName,
|
|
28
|
+
style: sectionStyle,
|
|
29
|
+
css,
|
|
30
|
+
formType = "simple"
|
|
31
|
+
} = styles ?? {};
|
|
19
32
|
const { createSubmitHandler, submitting } = useContactForm();
|
|
20
33
|
const [nameInput, setNameInput] = useState("");
|
|
21
34
|
const [firstName, setFirstName] = useState("");
|
|
@@ -23,13 +36,12 @@ const SplitInfoForm = (props) => {
|
|
|
23
36
|
const [emailInput, setEmailInput] = useState("");
|
|
24
37
|
const [phoneInput, setPhoneInput] = useState("");
|
|
25
38
|
const [messageInput, setMessageInput] = useState("");
|
|
26
|
-
const [topic, setTopic] = useState("");
|
|
27
39
|
const handleSubmit = createSubmitHandler(
|
|
28
40
|
() => ({
|
|
29
41
|
name: nameInput || `${firstName} ${lastName}`.trim() || "",
|
|
30
42
|
email: emailInput || "",
|
|
31
43
|
phone: phoneInput || "",
|
|
32
|
-
message:
|
|
44
|
+
message: messageInput || ""
|
|
33
45
|
}),
|
|
34
46
|
() => {
|
|
35
47
|
setNameInput("");
|
|
@@ -38,21 +50,44 @@ const SplitInfoForm = (props) => {
|
|
|
38
50
|
setEmailInput("");
|
|
39
51
|
setPhoneInput("");
|
|
40
52
|
setMessageInput("");
|
|
41
|
-
setTopic("");
|
|
42
53
|
}
|
|
43
54
|
);
|
|
44
55
|
const renderSimpleFields = () => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
45
56
|
/* @__PURE__ */ jsxs("div", { className: "grid w-full items-center", children: [
|
|
46
57
|
/* @__PURE__ */ jsx(Label, { htmlFor: "name", className: "mb-2", children: "Name" }),
|
|
47
|
-
/* @__PURE__ */ jsx(
|
|
58
|
+
/* @__PURE__ */ jsx(
|
|
59
|
+
Input,
|
|
60
|
+
{
|
|
61
|
+
type: "text",
|
|
62
|
+
id: "name",
|
|
63
|
+
value: nameInput,
|
|
64
|
+
onChange: (e) => setNameInput(e.target.value)
|
|
65
|
+
}
|
|
66
|
+
)
|
|
48
67
|
] }),
|
|
49
68
|
/* @__PURE__ */ jsxs("div", { className: "grid w-full items-center", children: [
|
|
50
69
|
/* @__PURE__ */ jsx(Label, { htmlFor: "email", className: "mb-2", children: "Email" }),
|
|
51
|
-
/* @__PURE__ */ jsx(
|
|
70
|
+
/* @__PURE__ */ jsx(
|
|
71
|
+
Input,
|
|
72
|
+
{
|
|
73
|
+
type: "email",
|
|
74
|
+
id: "email",
|
|
75
|
+
value: emailInput,
|
|
76
|
+
onChange: (e) => setEmailInput(e.target.value)
|
|
77
|
+
}
|
|
78
|
+
)
|
|
52
79
|
] }),
|
|
53
80
|
/* @__PURE__ */ jsxs("div", { className: "grid w-full items-center", children: [
|
|
54
81
|
/* @__PURE__ */ jsx(Label, { htmlFor: "phone", className: "mb-2", children: "Phone" }),
|
|
55
|
-
/* @__PURE__ */ jsx(
|
|
82
|
+
/* @__PURE__ */ jsx(
|
|
83
|
+
Input,
|
|
84
|
+
{
|
|
85
|
+
type: "tel",
|
|
86
|
+
id: "phone",
|
|
87
|
+
value: phoneInput,
|
|
88
|
+
onChange: (e) => setPhoneInput(e.target.value)
|
|
89
|
+
}
|
|
90
|
+
)
|
|
56
91
|
] }),
|
|
57
92
|
/* @__PURE__ */ jsxs("div", { className: "grid w-full items-center", children: [
|
|
58
93
|
/* @__PURE__ */ jsx(Label, { htmlFor: "message", className: "mb-2", children: "Message" }),
|
|
@@ -72,30 +107,52 @@ const SplitInfoForm = (props) => {
|
|
|
72
107
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-6", children: [
|
|
73
108
|
/* @__PURE__ */ jsxs("div", { className: "grid w-full items-center", children: [
|
|
74
109
|
/* @__PURE__ */ jsx(Label, { htmlFor: "firstName", className: "mb-2", children: "First name" }),
|
|
75
|
-
/* @__PURE__ */ jsx(
|
|
110
|
+
/* @__PURE__ */ jsx(
|
|
111
|
+
Input,
|
|
112
|
+
{
|
|
113
|
+
type: "text",
|
|
114
|
+
id: "firstName",
|
|
115
|
+
value: firstName,
|
|
116
|
+
onChange: (e) => setFirstName(e.target.value)
|
|
117
|
+
}
|
|
118
|
+
)
|
|
76
119
|
] }),
|
|
77
120
|
/* @__PURE__ */ jsxs("div", { className: "grid w-full items-center", children: [
|
|
78
121
|
/* @__PURE__ */ jsx(Label, { htmlFor: "lastName", className: "mb-2", children: "Last name" }),
|
|
79
|
-
/* @__PURE__ */ jsx(
|
|
122
|
+
/* @__PURE__ */ jsx(
|
|
123
|
+
Input,
|
|
124
|
+
{
|
|
125
|
+
type: "text",
|
|
126
|
+
id: "lastName",
|
|
127
|
+
value: lastName,
|
|
128
|
+
onChange: (e) => setLastName(e.target.value)
|
|
129
|
+
}
|
|
130
|
+
)
|
|
80
131
|
] })
|
|
81
132
|
] }),
|
|
82
133
|
/* @__PURE__ */ jsxs("div", { className: "grid w-full items-center", children: [
|
|
83
134
|
/* @__PURE__ */ jsx(Label, { htmlFor: "email", className: "mb-2", children: "Email" }),
|
|
84
|
-
/* @__PURE__ */ jsx(
|
|
135
|
+
/* @__PURE__ */ jsx(
|
|
136
|
+
Input,
|
|
137
|
+
{
|
|
138
|
+
type: "email",
|
|
139
|
+
id: "email",
|
|
140
|
+
value: emailInput,
|
|
141
|
+
onChange: (e) => setEmailInput(e.target.value)
|
|
142
|
+
}
|
|
143
|
+
)
|
|
85
144
|
] }),
|
|
86
145
|
/* @__PURE__ */ jsxs("div", { className: "grid w-full items-center", children: [
|
|
87
146
|
/* @__PURE__ */ jsx(Label, { htmlFor: "phone", className: "mb-2", children: "Phone number" }),
|
|
88
|
-
/* @__PURE__ */ jsx(
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
] })
|
|
98
|
-
] })
|
|
147
|
+
/* @__PURE__ */ jsx(
|
|
148
|
+
Input,
|
|
149
|
+
{
|
|
150
|
+
type: "tel",
|
|
151
|
+
id: "phone",
|
|
152
|
+
value: phoneInput,
|
|
153
|
+
onChange: (e) => setPhoneInput(e.target.value)
|
|
154
|
+
}
|
|
155
|
+
)
|
|
99
156
|
] }),
|
|
100
157
|
/* @__PURE__ */ jsxs("div", { className: "grid w-full items-center", children: [
|
|
101
158
|
/* @__PURE__ */ jsx(Label, { htmlFor: "message", className: "mb-2", children: "Message" }),
|
|
@@ -111,33 +168,58 @@ const SplitInfoForm = (props) => {
|
|
|
111
168
|
)
|
|
112
169
|
] })
|
|
113
170
|
] });
|
|
114
|
-
return /* @__PURE__ */ jsx(
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
/* @__PURE__ */
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
/* @__PURE__ */
|
|
128
|
-
|
|
171
|
+
return /* @__PURE__ */ jsx(
|
|
172
|
+
SectionWrapper,
|
|
173
|
+
{
|
|
174
|
+
className: cn("px-[5%] py-8 md:py-12 lg:py-14", sectionClassName),
|
|
175
|
+
style: sectionStyle,
|
|
176
|
+
css,
|
|
177
|
+
children: /* @__PURE__ */ jsx("div", { className: "container", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 items-start gap-y-12 md:grid-flow-row md:grid-cols-2 md:gap-x-12 lg:grid-flow-col lg:gap-x-20 lg:gap-y-16", children: [
|
|
178
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
179
|
+
/* @__PURE__ */ jsx("p", { className: "mb-3 font-semibold md:mb-4", children: tagline }),
|
|
180
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-6 md:mb-8", children: [
|
|
181
|
+
/* @__PURE__ */ jsx("h2", { className: "mb-5 text-5xl font-bold md:mb-6 md:text-7xl lg:text-8xl", children: heading }),
|
|
182
|
+
/* @__PURE__ */ jsx("p", { className: "md:text-md", children: description })
|
|
183
|
+
] }),
|
|
184
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-4 py-2", children: [
|
|
185
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
|
|
186
|
+
/* @__PURE__ */ jsx(BiEnvelope, { className: "size-6 flex-none" }),
|
|
187
|
+
/* @__PURE__ */ jsx("p", { children: email })
|
|
188
|
+
] }),
|
|
189
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
|
|
190
|
+
/* @__PURE__ */ jsx(BiPhone, { className: "size-6 flex-none" }),
|
|
191
|
+
/* @__PURE__ */ jsx("p", { children: phone })
|
|
192
|
+
] }),
|
|
193
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
|
|
194
|
+
/* @__PURE__ */ jsx(BiMap, { className: "size-6 flex-none" }),
|
|
195
|
+
/* @__PURE__ */ jsx("p", { children: address })
|
|
196
|
+
] })
|
|
197
|
+
] })
|
|
129
198
|
] }),
|
|
130
|
-
/* @__PURE__ */ jsxs(
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
199
|
+
/* @__PURE__ */ jsxs(
|
|
200
|
+
"form",
|
|
201
|
+
{
|
|
202
|
+
className: "grid grid-cols-1 grid-rows-[auto_auto] gap-6",
|
|
203
|
+
onSubmit: handleSubmit,
|
|
204
|
+
children: [
|
|
205
|
+
formType === "advanced" ? renderAdvancedFields() : renderSimpleFields(),
|
|
206
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
207
|
+
CompoundButton,
|
|
208
|
+
{
|
|
209
|
+
type: "submit",
|
|
210
|
+
label: submitting ? "Submitting..." : button.label,
|
|
211
|
+
variant: button.variant,
|
|
212
|
+
size: button.size,
|
|
213
|
+
icon: button.icon,
|
|
214
|
+
disabled: submitting
|
|
215
|
+
}
|
|
216
|
+
) })
|
|
217
|
+
]
|
|
218
|
+
}
|
|
219
|
+
)
|
|
220
|
+
] }) })
|
|
221
|
+
}
|
|
222
|
+
);
|
|
141
223
|
};
|
|
142
224
|
const SplitInfoFormDefaults = {
|
|
143
225
|
tagline: "Tagline",
|
|
@@ -145,7 +227,10 @@ const SplitInfoFormDefaults = {
|
|
|
145
227
|
description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
|
|
146
228
|
button: { label: "Submit" },
|
|
147
229
|
buttons: [],
|
|
148
|
-
media: {
|
|
230
|
+
media: {
|
|
231
|
+
src: "https://picsum.photos/seed/contact-split/800/600",
|
|
232
|
+
alt: "Placeholder"
|
|
233
|
+
},
|
|
149
234
|
email: "hello@example.com",
|
|
150
235
|
phone: "+1 (555) 000-0000",
|
|
151
236
|
address: "123 Sample St, Sydney NSW 2000 AU",
|