dune-react 0.0.8 → 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.
- package/dist/components/puck-base/article-card.js +1 -1
- package/dist/components/puck-base/button.js +2 -1
- package/dist/components/puck-base/container.d.ts +7 -1
- package/dist/components/puck-base/container.js +2 -1
- package/dist/components/puck-base/content.d.ts +1 -4
- package/dist/components/puck-base/content.js +15 -17
- package/dist/components/puck-base/core/fields.d.ts +1 -127
- package/dist/components/puck-base/core/fields.js +1 -76
- package/dist/components/puck-base/core/styles.d.ts +1877 -0
- package/dist/components/puck-base/core/styles.js +286 -0
- package/dist/components/puck-base/core/types.d.ts +2 -2
- package/dist/components/puck-base/core/with-editable.d.ts +4 -1
- package/dist/components/puck-base/core/with-editable.js +51 -27
- package/dist/components/puck-base/editor-context.d.ts +8 -0
- package/dist/components/puck-base/fields/auto-field.d.ts +1 -0
- package/dist/components/puck-base/fields/auto-field.js +131 -49
- package/dist/components/puck-base/gradient-text.js +12 -3
- package/dist/components/puck-block/banner-sections/announcement-banner-1/announcement-banner.d.ts +9 -7
- package/dist/components/puck-block/banner-sections/announcement-banner-1/announcement-banner.js +11 -8
- package/dist/components/puck-block/banner-sections/announcement-banner-1/index.js +19 -37
- package/dist/components/puck-block/banner-sections/marquee-1/index.js +26 -24
- package/dist/components/puck-block/banner-sections/marquee-1/marquee.d.ts +9 -9
- package/dist/components/puck-block/banner-sections/marquee-1/marquee.js +28 -21
- package/dist/components/puck-block/banner-sections/props.d.ts +22 -0
- package/dist/components/puck-block/contact-sections/api/form-leads.d.ts +16 -0
- package/dist/components/puck-block/contact-sections/api/form-leads.js +25 -0
- package/dist/components/puck-block/contact-sections/contact-us-1/contact-us.d.ts +13 -4
- package/dist/components/puck-block/contact-sections/contact-us-1/contact-us.js +122 -121
- package/dist/components/puck-block/contact-sections/contact-us-1/index.js +87 -7
- package/dist/components/puck-block/contact-sections/contact-us-2/contact-us-2.d.ts +30 -0
- package/dist/components/puck-block/contact-sections/contact-us-2/contact-us-2.js +234 -0
- package/dist/components/puck-block/contact-sections/contact-us-2/index.d.ts +5 -0
- package/dist/components/puck-block/contact-sections/contact-us-2/index.js +74 -0
- package/dist/components/puck-block/contact-sections/contact-us-3/contact-us-3.d.ts +32 -0
- package/dist/components/puck-block/contact-sections/contact-us-3/contact-us-3.js +250 -0
- package/dist/components/puck-block/contact-sections/contact-us-3/index.d.ts +5 -0
- package/dist/components/puck-block/contact-sections/contact-us-3/index.js +114 -0
- package/dist/components/puck-block/contact-sections/props.d.ts +65 -0
- package/dist/components/puck-block/cta-sections/banner-cta-1/banner-cta.d.ts +12 -9
- package/dist/components/puck-block/cta-sections/banner-cta-1/banner-cta.js +28 -30
- package/dist/components/puck-block/cta-sections/banner-cta-1/index.js +23 -25
- package/dist/components/puck-block/cta-sections/cta-1/cta.d.ts +6 -4
- package/dist/components/puck-block/cta-sections/cta-1/cta.js +5 -7
- package/dist/components/puck-block/cta-sections/cta-1/index.js +5 -9
- package/dist/components/puck-block/cta-sections/gradient-cta-1/gradient-cta.d.ts +10 -10
- package/dist/components/puck-block/cta-sections/gradient-cta-1/gradient-cta.js +24 -20
- package/dist/components/puck-block/cta-sections/gradient-cta-1/index.js +36 -29
- package/dist/components/puck-block/cta-sections/newsletter-signup-1/index.js +13 -5
- package/dist/components/puck-block/cta-sections/newsletter-signup-1/newsletter-signup.d.ts +7 -3
- package/dist/components/puck-block/cta-sections/newsletter-signup-1/newsletter-signup.js +36 -32
- package/dist/components/puck-block/cta-sections/promo-section-1/index.js +4 -5
- package/dist/components/puck-block/cta-sections/promo-section-1/promo-section.d.ts +6 -4
- package/dist/components/puck-block/cta-sections/promo-section-1/promo-section.js +94 -79
- package/dist/components/puck-block/cta-sections/props.d.ts +47 -0
- package/dist/components/puck-block/faq-sections/accordion-1/accordion.d.ts +6 -4
- package/dist/components/puck-block/faq-sections/accordion-1/accordion.js +39 -33
- package/dist/components/puck-block/faq-sections/accordion-1/index.js +3 -5
- package/dist/components/puck-block/faq-sections/faq-1/faq.d.ts +9 -7
- package/dist/components/puck-block/faq-sections/faq-1/faq.js +50 -44
- package/dist/components/puck-block/faq-sections/faq-1/index.js +12 -14
- package/dist/components/puck-block/faq-sections/faq-2/faq-2.d.ts +18 -0
- package/dist/components/puck-block/faq-sections/faq-2/faq-2.js +54 -0
- package/dist/components/puck-block/faq-sections/faq-2/index.d.ts +5 -0
- package/dist/components/puck-block/faq-sections/faq-2/index.js +61 -0
- package/dist/components/puck-block/faq-sections/props.d.ts +30 -0
- package/dist/components/puck-block/feature-sections/bento-1/bento.d.ts +6 -4
- package/dist/components/puck-block/feature-sections/bento-1/bento.js +2 -4
- package/dist/components/puck-block/feature-sections/bento-1/index.js +4 -5
- package/dist/components/puck-block/feature-sections/feature-cards-1/feature-cards.d.ts +8 -7
- package/dist/components/puck-block/feature-sections/feature-cards-1/feature-cards.js +15 -7
- package/dist/components/puck-block/feature-sections/feature-cards-1/index.js +37 -18
- package/dist/components/puck-block/feature-sections/feature-showcase-1/feature-showcase.d.ts +6 -4
- package/dist/components/puck-block/feature-sections/feature-showcase-1/feature-showcase.js +4 -12
- package/dist/components/puck-block/feature-sections/feature-showcase-1/index.js +4 -5
- package/dist/components/puck-block/feature-sections/icon-grid-1/icon-grid.d.ts +6 -4
- package/dist/components/puck-block/feature-sections/icon-grid-1/icon-grid.js +59 -53
- package/dist/components/puck-block/feature-sections/icon-grid-1/index.js +7 -8
- package/dist/components/puck-block/feature-sections/product-features-1/index.js +4 -5
- package/dist/components/puck-block/feature-sections/product-features-1/product-features.d.ts +6 -4
- package/dist/components/puck-block/feature-sections/product-features-1/product-features.js +7 -29
- package/dist/components/puck-block/feature-sections/props.d.ts +48 -0
- package/dist/components/puck-block/footer-sections/footer-1/footer.d.ts +5 -3
- package/dist/components/puck-block/footer-sections/footer-1/footer.js +6 -6
- package/dist/components/puck-block/footer-sections/footer-1/index.js +3 -5
- package/dist/components/puck-block/footer-sections/props.d.ts +31 -0
- package/dist/components/puck-block/gallery-sections/gallery-1/gallery.d.ts +9 -7
- package/dist/components/puck-block/gallery-sections/gallery-1/gallery.js +49 -40
- package/dist/components/puck-block/gallery-sections/gallery-1/index.js +32 -34
- package/dist/components/puck-block/gallery-sections/gallery-2/gallery-2.d.ts +16 -0
- package/dist/components/puck-block/gallery-sections/gallery-2/gallery-2.js +86 -0
- package/dist/components/puck-block/gallery-sections/gallery-2/index.d.ts +5 -0
- package/dist/components/puck-block/gallery-sections/gallery-2/index.js +42 -0
- package/dist/components/puck-block/gallery-sections/gallery-3/gallery-3.d.ts +19 -0
- package/dist/components/puck-block/gallery-sections/gallery-3/gallery-3.js +119 -0
- package/dist/components/puck-block/gallery-sections/gallery-3/index.d.ts +5 -0
- package/dist/components/puck-block/gallery-sections/gallery-3/index.js +59 -0
- package/dist/components/puck-block/gallery-sections/props.d.ts +26 -0
- package/dist/components/puck-block/header-sections/header-1/header.d.ts +7 -5
- package/dist/components/puck-block/header-sections/header-1/header.js +8 -9
- package/dist/components/puck-block/header-sections/header-1/index.d.ts +1 -1
- package/dist/components/puck-block/header-sections/header-1/index.js +13 -12
- package/dist/components/puck-block/header-sections/props.d.ts +41 -0
- package/dist/components/puck-block/header-sections/sticky-nav-1/index.js +12 -12
- package/dist/components/puck-block/header-sections/sticky-nav-1/sticky-nav.d.ts +8 -6
- package/dist/components/puck-block/header-sections/sticky-nav-1/sticky-nav.js +5 -5
- package/dist/components/puck-block/hero-sections/fullscreen-hero-1/fullscreen-hero.d.ts +11 -4
- package/dist/components/puck-block/hero-sections/fullscreen-hero-1/fullscreen-hero.js +60 -23
- package/dist/components/puck-block/hero-sections/fullscreen-hero-1/index.js +18 -6
- package/dist/components/puck-block/hero-sections/gradient-hero-1/gradient-hero.d.ts +9 -5
- package/dist/components/puck-block/hero-sections/gradient-hero-1/gradient-hero.js +37 -24
- package/dist/components/puck-block/hero-sections/gradient-hero-1/index.js +18 -15
- package/dist/components/puck-block/hero-sections/grid-hero-1/grid-hero.d.ts +7 -6
- package/dist/components/puck-block/hero-sections/grid-hero-1/grid-hero.js +7 -10
- package/dist/components/puck-block/hero-sections/grid-hero-1/index.js +43 -11
- package/dist/components/puck-block/hero-sections/hero-1/hero.d.ts +6 -4
- package/dist/components/puck-block/hero-sections/hero-1/hero.js +5 -7
- package/dist/components/puck-block/hero-sections/hero-1/index.js +4 -4
- package/dist/components/puck-block/hero-sections/image-hero-1/image-hero.d.ts +14 -8
- package/dist/components/puck-block/hero-sections/image-hero-1/image-hero.js +64 -60
- package/dist/components/puck-block/hero-sections/image-hero-1/index.js +16 -34
- package/dist/components/puck-block/hero-sections/props.d.ts +71 -0
- package/dist/components/puck-block/hero-sections/split-hero-1/index.js +6 -5
- package/dist/components/puck-block/hero-sections/split-hero-1/split-hero.d.ts +8 -8
- package/dist/components/puck-block/hero-sections/split-hero-1/split-hero.js +48 -47
- package/dist/components/puck-block/hero-sections/video-hero-1/index.js +4 -3
- package/dist/components/puck-block/hero-sections/video-hero-1/video-hero.d.ts +6 -2
- package/dist/components/puck-block/hero-sections/video-hero-1/video-hero.js +30 -22
- package/dist/components/puck-block/index.d.ts +15 -0
- package/dist/components/puck-block/location-sections/location-1/index.d.ts +5 -0
- package/dist/components/puck-block/location-sections/location-1/index.js +108 -0
- package/dist/components/puck-block/location-sections/location-1/location.d.ts +28 -0
- package/dist/components/puck-block/location-sections/location-1/location.js +137 -0
- package/dist/components/puck-block/location-sections/location-2/index.d.ts +5 -0
- package/dist/components/puck-block/location-sections/location-2/index.js +123 -0
- package/dist/components/puck-block/location-sections/location-2/location.d.ts +30 -0
- package/dist/components/puck-block/location-sections/location-2/location.js +131 -0
- package/dist/components/puck-block/location-sections/location-3/index.d.ts +5 -0
- package/dist/components/puck-block/location-sections/location-3/index.js +84 -0
- package/dist/components/puck-block/location-sections/location-3/location.d.ts +24 -0
- package/dist/components/puck-block/location-sections/location-3/location.js +127 -0
- package/dist/components/puck-block/location-sections/props.d.ts +45 -0
- package/dist/components/puck-block/metrics-sections/props.d.ts +43 -0
- package/dist/components/puck-block/metrics-sections/stats-1/index.js +6 -7
- package/dist/components/puck-block/metrics-sections/stats-1/stats.d.ts +7 -5
- package/dist/components/puck-block/metrics-sections/stats-1/stats.js +61 -55
- package/dist/components/puck-block/metrics-sections/stats-2/index.d.ts +5 -0
- package/dist/components/puck-block/metrics-sections/stats-2/index.js +76 -0
- package/dist/components/puck-block/metrics-sections/stats-2/stats-2.d.ts +18 -0
- package/dist/components/puck-block/metrics-sections/stats-2/stats-2.js +57 -0
- package/dist/components/puck-block/metrics-sections/stats-3/index.d.ts +5 -0
- package/dist/components/puck-block/metrics-sections/stats-3/index.js +86 -0
- package/dist/components/puck-block/metrics-sections/stats-3/stats-3.d.ts +18 -0
- package/dist/components/puck-block/metrics-sections/stats-3/stats-3.js +56 -0
- package/dist/components/puck-block/pricing-sections/comparison-1/comparison.d.ts +7 -5
- package/dist/components/puck-block/pricing-sections/comparison-1/comparison.js +45 -39
- package/dist/components/puck-block/pricing-sections/comparison-1/index.js +5 -7
- package/dist/components/puck-block/pricing-sections/pricing-1/index.js +10 -11
- package/dist/components/puck-block/pricing-sections/pricing-1/pricing.d.ts +8 -6
- package/dist/components/puck-block/pricing-sections/pricing-1/pricing.js +47 -35
- package/dist/components/puck-block/pricing-sections/pricing-2/index.d.ts +5 -0
- package/dist/components/puck-block/pricing-sections/pricing-2/index.js +151 -0
- package/dist/components/puck-block/pricing-sections/pricing-2/pricing-2.d.ts +26 -0
- package/dist/components/puck-block/pricing-sections/pricing-2/pricing-2.js +71 -0
- package/dist/components/puck-block/pricing-sections/props.d.ts +46 -0
- package/dist/components/puck-block/showcase-sections/before-after-1/before-after.d.ts +22 -0
- package/dist/components/puck-block/showcase-sections/before-after-1/before-after.js +71 -0
- package/dist/components/puck-block/showcase-sections/before-after-1/index.d.ts +5 -0
- package/dist/components/puck-block/showcase-sections/before-after-1/index.js +73 -0
- package/dist/components/puck-block/showcase-sections/case-study-1/case-study.d.ts +6 -2
- package/dist/components/puck-block/showcase-sections/case-study-1/case-study.js +30 -28
- package/dist/components/puck-block/showcase-sections/case-study-1/index.js +4 -3
- package/dist/components/puck-block/showcase-sections/props.d.ts +48 -0
- package/dist/components/puck-block/showcase-sections/step-by-step-1/index.js +3 -5
- package/dist/components/puck-block/showcase-sections/step-by-step-1/step-by-step.d.ts +6 -4
- package/dist/components/puck-block/showcase-sections/step-by-step-1/step-by-step.js +38 -41
- package/dist/components/puck-block/team-sections/props.d.ts +39 -0
- package/dist/components/puck-block/team-sections/team-grid-1/index.js +4 -5
- package/dist/components/puck-block/team-sections/team-grid-1/team-grid.d.ts +6 -4
- package/dist/components/puck-block/team-sections/team-grid-1/team-grid.js +27 -41
- package/dist/components/puck-block/team-sections/team-grid-2/index.d.ts +5 -0
- package/dist/components/puck-block/team-sections/team-grid-2/index.js +62 -0
- package/dist/components/puck-block/team-sections/team-grid-2/team-grid-2.d.ts +23 -0
- package/dist/components/puck-block/team-sections/team-grid-2/team-grid-2.js +44 -0
- package/dist/components/puck-block/team-sections/team-profiles-1/index.d.ts +5 -0
- package/dist/components/puck-block/team-sections/team-profiles-1/index.js +53 -0
- package/dist/components/puck-block/team-sections/team-profiles-1/team-profiles.d.ts +23 -0
- package/dist/components/puck-block/team-sections/team-profiles-1/team-profiles.js +105 -0
- package/dist/components/puck-block/testimonial-sections/customers-1/customers.d.ts +9 -7
- package/dist/components/puck-block/testimonial-sections/customers-1/customers.js +8 -11
- package/dist/components/puck-block/testimonial-sections/customers-1/index.js +17 -17
- package/dist/components/puck-block/testimonial-sections/logo-marquee-1/index.js +15 -12
- package/dist/components/puck-block/testimonial-sections/logo-marquee-1/logo-marquee.d.ts +7 -3
- package/dist/components/puck-block/testimonial-sections/logo-marquee-1/logo-marquee.js +34 -24
- package/dist/components/puck-block/testimonial-sections/logo-wall-1/index.d.ts +5 -0
- package/dist/components/puck-block/testimonial-sections/logo-wall-1/index.js +51 -0
- package/dist/components/puck-block/testimonial-sections/logo-wall-1/logo-wall.d.ts +17 -0
- package/dist/components/puck-block/testimonial-sections/logo-wall-1/logo-wall.js +55 -0
- package/dist/components/puck-block/testimonial-sections/props.d.ts +34 -0
- package/dist/components/puck-block/testimonial-sections/review-section-1/index.js +16 -15
- package/dist/components/puck-block/testimonial-sections/review-section-1/review-section.d.ts +8 -6
- package/dist/components/puck-block/testimonial-sections/review-section-1/review-section.js +25 -19
- package/dist/components/puck-block/testimonial-sections/testimonials-1/index.js +17 -17
- package/dist/components/puck-block/testimonial-sections/testimonials-1/testimonials.d.ts +8 -6
- package/dist/components/puck-block/testimonial-sections/testimonials-1/testimonials.js +76 -63
- package/dist/components/puck-block/text-sections/articles-1/articles.d.ts +7 -4
- package/dist/components/puck-block/text-sections/articles-1/articles.js +42 -22
- package/dist/components/puck-block/text-sections/articles-1/index.js +31 -19
- package/dist/components/puck-block/text-sections/content-section-1/content-section.d.ts +7 -5
- package/dist/components/puck-block/text-sections/content-section-1/content-section.js +11 -12
- package/dist/components/puck-block/text-sections/content-section-1/index.js +14 -14
- package/dist/components/puck-block/text-sections/props.d.ts +58 -0
- package/dist/components/puck-block/text-sections/rich-text-1/index.js +13 -15
- package/dist/components/puck-block/text-sections/rich-text-1/rich-text.d.ts +7 -5
- package/dist/components/puck-block/text-sections/rich-text-1/rich-text.js +11 -11
- package/dist/components/puck-block/text-sections/tab-section-1/index.js +4 -5
- package/dist/components/puck-block/text-sections/tab-section-1/tab-section.d.ts +6 -4
- package/dist/components/puck-block/text-sections/tab-section-1/tab-section.js +6 -7
- package/dist/components/puck-block/text-sections/timeline-1/index.js +3 -5
- package/dist/components/puck-block/text-sections/timeline-1/timeline.d.ts +6 -4
- package/dist/components/puck-block/text-sections/timeline-1/timeline.js +3 -5
- package/dist/components/puck-block/text-sections/two-column-1/index.js +4 -6
- package/dist/components/puck-block/text-sections/two-column-1/two-column.d.ts +6 -4
- package/dist/components/puck-block/text-sections/two-column-1/two-column.js +5 -7
- package/dist/components/shadcn/navigation-menu.d.ts +1 -1
- package/dist/components/shadcn/navigation-menu.js +33 -0
- package/dist/index.js +106 -75
- package/package.json +1 -1
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { image1x1Placeholder, image, icon } from "../../../puck-base/core/fields.js";
|
|
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
|
+
});
|
|
14
|
+
const conf = {
|
|
15
|
+
fields: {
|
|
16
|
+
heading: { type: "text", contentEditable: true },
|
|
17
|
+
description: { type: "textarea", contentEditable: true },
|
|
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" }
|
|
27
|
+
},
|
|
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",
|
|
40
|
+
options: [
|
|
41
|
+
{ label: "Default", value: "default" },
|
|
42
|
+
{ label: "Small", value: "sm" },
|
|
43
|
+
{ label: "Large", value: "lg" }
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
submitIcon: icon,
|
|
47
|
+
image,
|
|
48
|
+
styles: contactUs2StylesField
|
|
49
|
+
},
|
|
50
|
+
defaultProps: {
|
|
51
|
+
heading: "Ready to transform your fitness?",
|
|
52
|
+
description: "Tell us about your goals and we'll reach out within 24 hours to schedule your first session.",
|
|
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
|
+
image: image1x1Placeholder,
|
|
65
|
+
styles: {
|
|
66
|
+
...createStylesDefaults(),
|
|
67
|
+
imagePosition: "end"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
render: ContactUs2
|
|
71
|
+
};
|
|
72
|
+
export {
|
|
73
|
+
conf
|
|
74
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CompoundContainerProps } from "@/components/puck-base/container";
|
|
2
|
+
export interface ContactUs3Button {
|
|
3
|
+
label: string;
|
|
4
|
+
variant?: string;
|
|
5
|
+
size?: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ContactInfoItem {
|
|
9
|
+
icon: "phone" | "mail" | "map-pin" | "clock";
|
|
10
|
+
label: string;
|
|
11
|
+
value: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ContactUs3Props {
|
|
14
|
+
heading?: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
infoItems?: ContactInfoItem[];
|
|
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
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export declare const ContactUs3: ({ heading, description, infoItems, fields, submitLabel, submitVariant, submitSize, submitIcon, styles, }: ContactUs3Props) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { toast } from "sonner";
|
|
5
|
+
import { cn } from "../../../../utils/css-utils.js";
|
|
6
|
+
import { CompoundContainer } from "../../../puck-base/container.js";
|
|
7
|
+
import { CompoundButton } from "../../../puck-base/button.js";
|
|
8
|
+
import { Input } from "../../../shadcn/input.js";
|
|
9
|
+
import { Label } from "../../../shadcn/label.js";
|
|
10
|
+
import { Textarea } from "../../../shadcn/textarea.js";
|
|
11
|
+
import { useEditorContext } from "../../../puck-base/editor-context.js";
|
|
12
|
+
import { submitFormLead } from "../api/form-leads.js";
|
|
13
|
+
const ICON_PATHS = {
|
|
14
|
+
phone: "M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07A19.5 19.5 0 0 1 4.69 14a19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 3.62 3h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L8.09 10.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 17.92Z",
|
|
15
|
+
mail: "M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z M22 6l-10 7L2 6",
|
|
16
|
+
"map-pin": "M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z M12 10m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",
|
|
17
|
+
clock: "M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Z M12 6v6l4 2"
|
|
18
|
+
};
|
|
19
|
+
const InfoIcon = ({ type }) => /* @__PURE__ */ jsx(
|
|
20
|
+
"svg",
|
|
21
|
+
{
|
|
22
|
+
width: "18",
|
|
23
|
+
height: "18",
|
|
24
|
+
viewBox: "0 0 24 24",
|
|
25
|
+
fill: "none",
|
|
26
|
+
stroke: "currentColor",
|
|
27
|
+
strokeWidth: "1.8",
|
|
28
|
+
strokeLinecap: "round",
|
|
29
|
+
strokeLinejoin: "round",
|
|
30
|
+
className: "shrink-0",
|
|
31
|
+
children: /* @__PURE__ */ jsx("path", { d: ICON_PATHS[type] })
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
const PANEL_VARS = {
|
|
35
|
+
dark: {
|
|
36
|
+
wrapper: "bg-foreground text-background",
|
|
37
|
+
heading: "text-background",
|
|
38
|
+
desc: "text-background/70",
|
|
39
|
+
iconBox: "bg-background/10",
|
|
40
|
+
label: "text-background/50",
|
|
41
|
+
value: "text-background"
|
|
42
|
+
},
|
|
43
|
+
primary: {
|
|
44
|
+
wrapper: "bg-primary text-primary-foreground",
|
|
45
|
+
heading: "text-primary-foreground",
|
|
46
|
+
desc: "text-primary-foreground/75",
|
|
47
|
+
iconBox: "bg-primary-foreground/15",
|
|
48
|
+
label: "text-primary-foreground/55",
|
|
49
|
+
value: "text-primary-foreground"
|
|
50
|
+
},
|
|
51
|
+
muted: {
|
|
52
|
+
wrapper: "bg-muted text-foreground",
|
|
53
|
+
heading: "text-foreground",
|
|
54
|
+
desc: "text-muted-foreground",
|
|
55
|
+
iconBox: "bg-background",
|
|
56
|
+
label: "text-muted-foreground",
|
|
57
|
+
value: "text-foreground"
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
const ContactUs3 = ({
|
|
61
|
+
heading,
|
|
62
|
+
description,
|
|
63
|
+
infoItems = [],
|
|
64
|
+
fields = [],
|
|
65
|
+
submitLabel,
|
|
66
|
+
submitVariant,
|
|
67
|
+
submitSize,
|
|
68
|
+
submitIcon,
|
|
69
|
+
styles
|
|
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
|
+
};
|
|
81
|
+
const { isEditor: isEditorMode, siteId, domain } = useEditorContext();
|
|
82
|
+
const [values, setValues] = useState({
|
|
83
|
+
name: "",
|
|
84
|
+
email: "",
|
|
85
|
+
phone: "",
|
|
86
|
+
company: "",
|
|
87
|
+
subject: "",
|
|
88
|
+
message: ""
|
|
89
|
+
});
|
|
90
|
+
const [submitting, setSubmitting] = useState(false);
|
|
91
|
+
const vars = PANEL_VARS[panelStyle];
|
|
92
|
+
const setValue = (field) => (e) => setValues((prev) => ({ ...prev, [field]: e.target.value }));
|
|
93
|
+
const handleSubmit = async (e) => {
|
|
94
|
+
e.preventDefault();
|
|
95
|
+
if (isEditorMode) return;
|
|
96
|
+
const subjectTrim = values.subject.trim();
|
|
97
|
+
const messageForApi = subjectTrim ? `${subjectTrim}
|
|
98
|
+
|
|
99
|
+
${values.message}` : values.message;
|
|
100
|
+
setSubmitting(true);
|
|
101
|
+
try {
|
|
102
|
+
await submitFormLead(domain, {
|
|
103
|
+
site_id: siteId,
|
|
104
|
+
name: values.name || "",
|
|
105
|
+
email: values.email || "",
|
|
106
|
+
phone: values.phone || "",
|
|
107
|
+
message: messageForApi || "",
|
|
108
|
+
source_page: typeof window !== "undefined" ? window.location.pathname : ""
|
|
109
|
+
});
|
|
110
|
+
toast.success("Message sent successfully!");
|
|
111
|
+
setValues({ name: "", email: "", phone: "", company: "", subject: "", message: "" });
|
|
112
|
+
} catch (err) {
|
|
113
|
+
const msg = err instanceof Error ? err.message : "Failed to send message";
|
|
114
|
+
toast.error(msg);
|
|
115
|
+
} finally {
|
|
116
|
+
setSubmitting(false);
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
return /* @__PURE__ */ jsx(
|
|
120
|
+
CompoundContainer,
|
|
121
|
+
{
|
|
122
|
+
padding: styles == null ? void 0 : styles.padding,
|
|
123
|
+
sectionStyle: styles == null ? void 0 : styles.sectionStyle,
|
|
124
|
+
backgroundColor: styles == null ? void 0 : styles.backgroundColor,
|
|
125
|
+
className: "!p-0",
|
|
126
|
+
children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 overflow-hidden rounded-2xl border border-border lg:grid-cols-5", children: [
|
|
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: [
|
|
128
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
129
|
+
heading && /* @__PURE__ */ jsx("h2", { className: cn("font-serif text-3xl leading-tight tracking-tighter xl:text-4xl", vars.heading), children: heading }),
|
|
130
|
+
description && /* @__PURE__ */ jsx("p", { className: cn("text-sm leading-relaxed", vars.desc), children: description })
|
|
131
|
+
] }),
|
|
132
|
+
infoItems.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-4", children: infoItems.map((item, i) => /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
|
|
133
|
+
/* @__PURE__ */ jsx("div", { className: cn("flex h-9 w-9 shrink-0 items-center justify-center rounded-lg", vars.iconBox), children: /* @__PURE__ */ jsx(InfoIcon, { type: item.icon }) }),
|
|
134
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5", children: [
|
|
135
|
+
/* @__PURE__ */ jsx("span", { className: cn("text-xs font-medium uppercase tracking-wide", vars.label), children: item.label }),
|
|
136
|
+
/* @__PURE__ */ jsx("span", { className: cn("whitespace-pre-line text-sm font-medium", vars.value), children: item.value })
|
|
137
|
+
] })
|
|
138
|
+
] }, i)) })
|
|
139
|
+
] }),
|
|
140
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-col justify-center p-8 lg:col-span-3 lg:p-10 xl:p-12", children: /* @__PURE__ */ jsxs("form", { className: "flex flex-col gap-5", onSubmit: handleSubmit, children: [
|
|
141
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-5 sm:grid-cols-2", children: [
|
|
142
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
143
|
+
/* @__PURE__ */ jsxs(Label, { htmlFor: "cu3-name", className: "text-sm font-medium", children: [
|
|
144
|
+
labels.name,
|
|
145
|
+
" ",
|
|
146
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "*" })
|
|
147
|
+
] }),
|
|
148
|
+
/* @__PURE__ */ jsx(
|
|
149
|
+
Input,
|
|
150
|
+
{
|
|
151
|
+
id: "cu3-name",
|
|
152
|
+
type: "text",
|
|
153
|
+
required: true,
|
|
154
|
+
value: values.name,
|
|
155
|
+
onChange: setValue("name")
|
|
156
|
+
}
|
|
157
|
+
)
|
|
158
|
+
] }),
|
|
159
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
160
|
+
/* @__PURE__ */ jsxs(Label, { htmlFor: "cu3-email", className: "text-sm font-medium", children: [
|
|
161
|
+
labels.email,
|
|
162
|
+
" ",
|
|
163
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "*" })
|
|
164
|
+
] }),
|
|
165
|
+
/* @__PURE__ */ jsx(
|
|
166
|
+
Input,
|
|
167
|
+
{
|
|
168
|
+
id: "cu3-email",
|
|
169
|
+
type: "email",
|
|
170
|
+
required: true,
|
|
171
|
+
value: values.email,
|
|
172
|
+
onChange: setValue("email")
|
|
173
|
+
}
|
|
174
|
+
)
|
|
175
|
+
] })
|
|
176
|
+
] }),
|
|
177
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-5 sm:grid-cols-2", children: [
|
|
178
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
179
|
+
/* @__PURE__ */ jsx(Label, { htmlFor: "cu3-phone", className: "text-sm font-medium", children: labels.phone }),
|
|
180
|
+
/* @__PURE__ */ jsx(
|
|
181
|
+
Input,
|
|
182
|
+
{
|
|
183
|
+
id: "cu3-phone",
|
|
184
|
+
type: "tel",
|
|
185
|
+
value: values.phone,
|
|
186
|
+
onChange: setValue("phone")
|
|
187
|
+
}
|
|
188
|
+
)
|
|
189
|
+
] }),
|
|
190
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
191
|
+
/* @__PURE__ */ jsx(Label, { htmlFor: "cu3-company", className: "text-sm font-medium", children: labels.company }),
|
|
192
|
+
/* @__PURE__ */ jsx(
|
|
193
|
+
Input,
|
|
194
|
+
{
|
|
195
|
+
id: "cu3-company",
|
|
196
|
+
type: "text",
|
|
197
|
+
value: values.company,
|
|
198
|
+
onChange: setValue("company")
|
|
199
|
+
}
|
|
200
|
+
)
|
|
201
|
+
] })
|
|
202
|
+
] }),
|
|
203
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
204
|
+
/* @__PURE__ */ jsx(Label, { htmlFor: "cu3-subject", className: "text-sm font-medium", children: labels.subject }),
|
|
205
|
+
/* @__PURE__ */ jsx(
|
|
206
|
+
Input,
|
|
207
|
+
{
|
|
208
|
+
id: "cu3-subject",
|
|
209
|
+
type: "text",
|
|
210
|
+
value: values.subject,
|
|
211
|
+
onChange: setValue("subject")
|
|
212
|
+
}
|
|
213
|
+
)
|
|
214
|
+
] }),
|
|
215
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
216
|
+
/* @__PURE__ */ jsxs(Label, { htmlFor: "cu3-message", className: "text-sm font-medium", children: [
|
|
217
|
+
labels.message,
|
|
218
|
+
" ",
|
|
219
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "*" })
|
|
220
|
+
] }),
|
|
221
|
+
/* @__PURE__ */ jsx(
|
|
222
|
+
Textarea,
|
|
223
|
+
{
|
|
224
|
+
id: "cu3-message",
|
|
225
|
+
required: true,
|
|
226
|
+
className: "min-h-36 resize-y",
|
|
227
|
+
value: values.message,
|
|
228
|
+
onChange: setValue("message")
|
|
229
|
+
}
|
|
230
|
+
)
|
|
231
|
+
] }),
|
|
232
|
+
/* @__PURE__ */ jsx("div", { className: "pt-1", children: /* @__PURE__ */ jsx(
|
|
233
|
+
CompoundButton,
|
|
234
|
+
{
|
|
235
|
+
label: submitting ? "Sending..." : submitLabel ?? "Send Message",
|
|
236
|
+
variant: submitVariant ?? "default",
|
|
237
|
+
size: submitSize ?? "default",
|
|
238
|
+
icon: submitting ? "loader" : submitIcon ?? "send",
|
|
239
|
+
type: "submit",
|
|
240
|
+
disabled: submitting
|
|
241
|
+
}
|
|
242
|
+
) })
|
|
243
|
+
] }) })
|
|
244
|
+
] })
|
|
245
|
+
}
|
|
246
|
+
);
|
|
247
|
+
};
|
|
248
|
+
export {
|
|
249
|
+
ContactUs3
|
|
250
|
+
};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { icon } from "../../../puck-base/core/fields.js";
|
|
2
|
+
import { ContactUs3 } from "./contact-us-3.js";
|
|
3
|
+
import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
|
|
4
|
+
const defaultInfoItems = [
|
|
5
|
+
{ icon: "phone", label: "Phone", value: "+1 (555) 000-0000" },
|
|
6
|
+
{ icon: "mail", label: "Email", value: "hello@mybusiness.com" },
|
|
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
|
+
}
|
|
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
|
+
});
|
|
29
|
+
const conf = {
|
|
30
|
+
fields: {
|
|
31
|
+
heading: { type: "textarea", contentEditable: true },
|
|
32
|
+
description: { type: "textarea", contentEditable: true },
|
|
33
|
+
infoItems: {
|
|
34
|
+
type: "array",
|
|
35
|
+
min: 0,
|
|
36
|
+
max: 6,
|
|
37
|
+
getItemSummary: (item, index = 0) => item.label || `Info ${index + 1}`,
|
|
38
|
+
arrayFields: {
|
|
39
|
+
icon: {
|
|
40
|
+
type: "select",
|
|
41
|
+
label: "Icon",
|
|
42
|
+
options: [
|
|
43
|
+
{ label: "Phone", value: "phone" },
|
|
44
|
+
{ label: "Email", value: "mail" },
|
|
45
|
+
{ label: "Location", value: "map-pin" },
|
|
46
|
+
{ label: "Clock", value: "clock" }
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
label: { type: "text", contentEditable: true },
|
|
50
|
+
value: { type: "textarea", contentEditable: true }
|
|
51
|
+
},
|
|
52
|
+
defaultItemProps: {
|
|
53
|
+
icon: "phone",
|
|
54
|
+
label: "Phone",
|
|
55
|
+
value: "+1 (555) 000-0000"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
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
|
|
88
|
+
},
|
|
89
|
+
defaultProps: {
|
|
90
|
+
heading: "Let's start a\nconversation",
|
|
91
|
+
description: "Have a question or ready to get started? Fill out the form and we'll get back to you within 24 hours.",
|
|
92
|
+
infoItems: defaultInfoItems,
|
|
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
|
+
}
|
|
109
|
+
},
|
|
110
|
+
render: ContactUs3
|
|
111
|
+
};
|
|
112
|
+
export {
|
|
113
|
+
conf
|
|
114
|
+
};
|
|
@@ -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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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: ({
|
|
17
|
+
export declare const BannerCta: ({ heading, description, buttons, styles, }: BannerCtaProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,43 +1,41 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { CompoundContainer } from "../../../puck-base/container.js";
|
|
3
|
+
import { CompoundButton } from "../../../puck-base/button.js";
|
|
3
4
|
const variantStyles = {
|
|
4
5
|
primary: "bg-primary text-primary-foreground",
|
|
5
6
|
dark: "bg-foreground text-background",
|
|
6
7
|
gradient: "bg-gradient-to-r from-primary to-primary/70 text-primary-foreground"
|
|
7
8
|
};
|
|
8
9
|
const BannerCta = ({
|
|
9
|
-
padding,
|
|
10
|
-
sectionStyle,
|
|
11
|
-
backgroundColor,
|
|
12
10
|
heading = "Ready to get started?",
|
|
13
11
|
description,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
)
|
|
39
|
-
] })
|
|
40
|
-
|
|
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
|
+
};
|
|
41
39
|
export {
|
|
42
40
|
BannerCta
|
|
43
41
|
};
|