dune-react 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/puck-base/button.js +2 -1
- 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/with-editable.d.ts +4 -1
- package/dist/components/puck-base/core/with-editable.js +51 -27
- 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/contact-us-1/contact-us.d.ts +13 -4
- package/dist/components/puck-block/contact-sections/contact-us-1/contact-us.js +114 -105
- 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 +15 -11
- package/dist/components/puck-block/contact-sections/contact-us-2/contact-us-2.js +27 -22
- package/dist/components/puck-block/contact-sections/contact-us-2/index.js +54 -52
- package/dist/components/puck-block/contact-sections/contact-us-3/contact-us-3.d.ts +15 -12
- package/dist/components/puck-block/contact-sections/contact-us-3/contact-us-3.js +29 -24
- package/dist/components/puck-block/contact-sections/contact-us-3/index.js +73 -60
- 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 +27 -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 +35 -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 +93 -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 +6 -4
- package/dist/components/puck-block/faq-sections/faq-2/faq-2.js +4 -6
- package/dist/components/puck-block/faq-sections/faq-2/index.js +4 -5
- 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 +6 -4
- package/dist/components/puck-block/feature-sections/feature-cards-1/feature-cards.js +2 -4
- package/dist/components/puck-block/feature-sections/feature-cards-1/index.js +4 -5
- 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 +2 -4
- 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 +2 -4
- 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 +48 -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 +6 -4
- package/dist/components/puck-block/gallery-sections/gallery-2/gallery-2.js +5 -7
- package/dist/components/puck-block/gallery-sections/gallery-2/index.js +3 -5
- package/dist/components/puck-block/gallery-sections/gallery-3/gallery-3.d.ts +7 -5
- package/dist/components/puck-block/gallery-sections/gallery-3/gallery-3.js +5 -7
- package/dist/components/puck-block/gallery-sections/gallery-3/index.js +13 -14
- 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 +7 -5
- package/dist/components/puck-block/hero-sections/fullscreen-hero-1/fullscreen-hero.js +5 -4
- package/dist/components/puck-block/hero-sections/fullscreen-hero-1/index.js +17 -16
- package/dist/components/puck-block/hero-sections/gradient-hero-1/gradient-hero.d.ts +8 -4
- package/dist/components/puck-block/hero-sections/gradient-hero-1/gradient-hero.js +36 -26
- 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 +10 -7
- package/dist/components/puck-block/hero-sections/image-hero-1/image-hero.js +65 -59
- 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/location-sections/location-1/index.js +47 -42
- package/dist/components/puck-block/location-sections/location-1/location.d.ts +7 -6
- package/dist/components/puck-block/location-sections/location-1/location.js +7 -13
- package/dist/components/puck-block/location-sections/location-2/index.js +69 -57
- package/dist/components/puck-block/location-sections/location-2/location.d.ts +11 -6
- package/dist/components/puck-block/location-sections/location-2/location.js +7 -12
- package/dist/components/puck-block/location-sections/location-3/index.js +25 -24
- package/dist/components/puck-block/location-sections/location-3/location.d.ts +8 -6
- package/dist/components/puck-block/location-sections/location-3/location.js +7 -9
- 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.js +4 -5
- package/dist/components/puck-block/metrics-sections/stats-2/stats-2.d.ts +6 -4
- package/dist/components/puck-block/metrics-sections/stats-2/stats-2.js +4 -6
- package/dist/components/puck-block/metrics-sections/stats-3/index.js +21 -29
- package/dist/components/puck-block/metrics-sections/stats-3/stats-3.d.ts +7 -6
- package/dist/components/puck-block/metrics-sections/stats-3/stats-3.js +9 -13
- 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.js +7 -8
- package/dist/components/puck-block/pricing-sections/pricing-2/pricing-2.d.ts +6 -4
- package/dist/components/puck-block/pricing-sections/pricing-2/pricing-2.js +60 -57
- 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 +7 -5
- package/dist/components/puck-block/showcase-sections/before-after-1/before-after.js +8 -10
- package/dist/components/puck-block/showcase-sections/before-after-1/index.js +6 -7
- 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 +29 -21
- 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 +23 -17
- package/dist/components/puck-block/team-sections/team-grid-2/index.js +4 -5
- package/dist/components/puck-block/team-sections/team-grid-2/team-grid-2.d.ts +6 -4
- package/dist/components/puck-block/team-sections/team-grid-2/team-grid-2.js +5 -7
- package/dist/components/puck-block/team-sections/team-profiles-1/index.js +4 -5
- package/dist/components/puck-block/team-sections/team-profiles-1/team-profiles.d.ts +6 -4
- package/dist/components/puck-block/team-sections/team-profiles-1/team-profiles.js +5 -7
- 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 +33 -24
- package/dist/components/puck-block/testimonial-sections/logo-wall-1/index.js +17 -16
- package/dist/components/puck-block/testimonial-sections/logo-wall-1/logo-wall.d.ts +6 -4
- package/dist/components/puck-block/testimonial-sections/logo-wall-1/logo-wall.js +5 -7
- 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 +22 -17
- 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 -5
- package/dist/components/puck-block/text-sections/articles-1/articles.js +41 -34
- package/dist/components/puck-block/text-sections/articles-1/index.js +24 -24
- 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 +6 -8
- 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 +3 -5
- 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/index.js +2 -1
- package/package.json +1 -1
|
@@ -1,18 +1,43 @@
|
|
|
1
1
|
import { button } from "../../../puck-base/core/fields.js";
|
|
2
2
|
import { Location2 } from "./location.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
objectFields
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
3
|
+
import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
|
|
4
|
+
const locationButtonFields = {
|
|
5
|
+
...button.objectFields,
|
|
6
|
+
colorMode: {
|
|
7
|
+
type: "select",
|
|
8
|
+
options: [
|
|
9
|
+
{ label: "Theme", value: "theme" },
|
|
10
|
+
{ label: "Custom", value: "custom" }
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
backgroundColor: { type: "text" },
|
|
14
|
+
textColor: { type: "text" }
|
|
15
|
+
};
|
|
16
|
+
const locationButtonDefaults = {
|
|
17
|
+
label: "Button",
|
|
18
|
+
url: "",
|
|
19
|
+
variant: "default",
|
|
20
|
+
size: "default",
|
|
21
|
+
icon: "none",
|
|
22
|
+
colorMode: "theme"
|
|
23
|
+
};
|
|
24
|
+
const location2ExtraStyleFields = {
|
|
25
|
+
cardStyle: {
|
|
26
|
+
type: "radio",
|
|
27
|
+
label: "Card Style",
|
|
28
|
+
options: [
|
|
29
|
+
{ label: "Solid", value: "solid" },
|
|
30
|
+
{ label: "Glass", value: "glass" }
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
sectionHeight: {
|
|
34
|
+
type: "radio",
|
|
35
|
+
label: "Section Height",
|
|
36
|
+
options: [
|
|
37
|
+
{ label: "Compact", value: "sm" },
|
|
38
|
+
{ label: "Medium", value: "md" },
|
|
39
|
+
{ label: "Tall", value: "lg" }
|
|
40
|
+
]
|
|
16
41
|
}
|
|
17
42
|
};
|
|
18
43
|
const conf = {
|
|
@@ -20,7 +45,7 @@ const conf = {
|
|
|
20
45
|
heading: { type: "textarea", contentEditable: true },
|
|
21
46
|
description: { type: "textarea", contentEditable: true },
|
|
22
47
|
address: { type: "textarea", label: "Address", contentEditable: true },
|
|
23
|
-
|
|
48
|
+
contentPosition: {
|
|
24
49
|
type: "radio",
|
|
25
50
|
label: "Card Position",
|
|
26
51
|
options: [
|
|
@@ -28,23 +53,6 @@ const conf = {
|
|
|
28
53
|
{ label: "Right", value: "right" }
|
|
29
54
|
]
|
|
30
55
|
},
|
|
31
|
-
cardStyle: {
|
|
32
|
-
type: "radio",
|
|
33
|
-
label: "Card Style",
|
|
34
|
-
options: [
|
|
35
|
-
{ label: "Solid", value: "solid" },
|
|
36
|
-
{ label: "Glass", value: "glass" }
|
|
37
|
-
]
|
|
38
|
-
},
|
|
39
|
-
sectionHeight: {
|
|
40
|
-
type: "radio",
|
|
41
|
-
label: "Section Height",
|
|
42
|
-
options: [
|
|
43
|
-
{ label: "Compact", value: "sm" },
|
|
44
|
-
{ label: "Medium", value: "md" },
|
|
45
|
-
{ label: "Tall", value: "lg" }
|
|
46
|
-
]
|
|
47
|
-
},
|
|
48
56
|
mapEmbedUrl: { type: "text", label: "Google Map Embed URL" },
|
|
49
57
|
mapTitle: { type: "text", label: "Map Title" },
|
|
50
58
|
mapFilter: { type: "text", label: "Map Filter (CSS)" },
|
|
@@ -65,44 +73,48 @@ const conf = {
|
|
|
65
73
|
max: 1,
|
|
66
74
|
step: 0.01
|
|
67
75
|
},
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
76
|
+
buttons: {
|
|
77
|
+
type: "array",
|
|
78
|
+
max: 3,
|
|
79
|
+
getItemSummary: (item, index = 0) => item.label || `Button ${index + 1}`,
|
|
80
|
+
arrayFields: locationButtonFields,
|
|
81
|
+
defaultItemProps: locationButtonDefaults
|
|
71
82
|
},
|
|
72
|
-
|
|
73
|
-
...locationButtonField,
|
|
74
|
-
label: "Secondary Button"
|
|
75
|
-
}
|
|
83
|
+
styles: createStylesField(location2ExtraStyleFields)
|
|
76
84
|
},
|
|
77
85
|
defaultProps: {
|
|
78
86
|
heading: "Come visit\nus today",
|
|
79
87
|
description: "We're in the heart of the city, easy to reach by public transport or car. Drop by any time.",
|
|
80
88
|
address: "123 Main Street\nNew York, NY 10001",
|
|
81
|
-
|
|
82
|
-
cardStyle: "solid",
|
|
83
|
-
sectionHeight: "md",
|
|
89
|
+
contentPosition: "left",
|
|
84
90
|
mapEmbedUrl: "https://maps.google.com/maps?q=New%20York%2C%20NY%2C%20United%20States&z=13&t=m&output=embed",
|
|
85
91
|
mapTitle: "Google Maps",
|
|
86
92
|
mapFilter: "grayscale(40%) contrast(1.05) brightness(1.0) saturate(0.85)",
|
|
87
93
|
mapTintMode: "none",
|
|
88
94
|
mapTintColor: "var(--primary)",
|
|
89
95
|
mapTintOpacity: 0.15,
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
96
|
+
buttons: [
|
|
97
|
+
{
|
|
98
|
+
label: "Get Directions",
|
|
99
|
+
url: "https://maps.google.com",
|
|
100
|
+
variant: "default",
|
|
101
|
+
size: "default",
|
|
102
|
+
icon: "none",
|
|
103
|
+
colorMode: "theme"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
label: "Call Us",
|
|
107
|
+
url: "tel:+12345678900",
|
|
108
|
+
variant: "outline",
|
|
109
|
+
size: "default",
|
|
110
|
+
icon: "none",
|
|
111
|
+
colorMode: "theme"
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
styles: createStylesDefaults({
|
|
115
|
+
cardStyle: "solid",
|
|
116
|
+
sectionHeight: "md"
|
|
117
|
+
})
|
|
106
118
|
},
|
|
107
119
|
render: Location2
|
|
108
120
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CompoundContainerProps } from "@/components/puck-base/container";
|
|
1
2
|
import { CompoundButtonProps } from "@/components/puck-base/button";
|
|
2
3
|
interface LocationButton extends Omit<CompoundButtonProps, "label"> {
|
|
3
4
|
label?: string;
|
|
@@ -9,17 +10,21 @@ export interface Location2Props {
|
|
|
9
10
|
heading?: string;
|
|
10
11
|
description?: string;
|
|
11
12
|
address?: string;
|
|
12
|
-
|
|
13
|
-
cardStyle?: "solid" | "glass";
|
|
14
|
-
sectionHeight?: "sm" | "md" | "lg";
|
|
13
|
+
contentPosition?: "left" | "right";
|
|
15
14
|
mapEmbedUrl?: string;
|
|
16
15
|
mapTitle?: string;
|
|
17
16
|
mapFilter?: string;
|
|
18
17
|
mapTintMode?: "none" | "theme" | "custom";
|
|
19
18
|
mapTintColor?: string;
|
|
20
19
|
mapTintOpacity?: number;
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
buttons?: LocationButton[];
|
|
21
|
+
styles?: {
|
|
22
|
+
padding?: CompoundContainerProps["padding"];
|
|
23
|
+
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
24
|
+
backgroundColor?: string;
|
|
25
|
+
cardStyle?: "solid" | "glass";
|
|
26
|
+
sectionHeight?: "sm" | "md" | "lg";
|
|
27
|
+
};
|
|
23
28
|
}
|
|
24
|
-
export declare const Location2: ({ heading, description, address,
|
|
29
|
+
export declare const Location2: ({ heading, description, address, contentPosition, mapEmbedUrl, mapTitle, mapFilter, mapTintMode, mapTintColor, mapTintOpacity, buttons, styles, }: Location2Props) => import("react/jsx-runtime").JSX.Element;
|
|
25
30
|
export {};
|
|
@@ -39,23 +39,21 @@ const Location2 = ({
|
|
|
39
39
|
heading,
|
|
40
40
|
description,
|
|
41
41
|
address,
|
|
42
|
-
|
|
43
|
-
cardStyle = "solid",
|
|
44
|
-
sectionHeight = "md",
|
|
42
|
+
contentPosition = "left",
|
|
45
43
|
mapEmbedUrl,
|
|
46
44
|
mapTitle = "Google Maps",
|
|
47
45
|
mapFilter,
|
|
48
46
|
mapTintMode = "none",
|
|
49
47
|
mapTintColor,
|
|
50
48
|
mapTintOpacity = 0.15,
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
buttons = [],
|
|
50
|
+
styles
|
|
53
51
|
}) => {
|
|
54
|
-
const isRight =
|
|
55
|
-
const isGlass = cardStyle === "glass";
|
|
52
|
+
const isRight = contentPosition === "right";
|
|
53
|
+
const isGlass = (styles == null ? void 0 : styles.cardStyle) === "glass";
|
|
56
54
|
const showMapTint = mapTintMode !== "none" && mapTintOpacity > 0;
|
|
57
55
|
const tintColor = mapTintMode === "custom" ? mapTintColor || void 0 : void 0;
|
|
58
|
-
const heightClass = sectionHeight === "sm" ? "h-[480px]" : sectionHeight === "lg" ? "h-[75vh] min-h-[520px]" : "h-[600px]";
|
|
56
|
+
const heightClass = (styles == null ? void 0 : styles.sectionHeight) === "sm" ? "h-[480px]" : (styles == null ? void 0 : styles.sectionHeight) === "lg" ? "h-[75vh] min-h-[520px]" : "h-[600px]";
|
|
59
57
|
return /* @__PURE__ */ jsxs("div", { className: cn("relative w-full overflow-hidden", heightClass), children: [
|
|
60
58
|
/* @__PURE__ */ jsxs("div", { className: "absolute inset-0", children: [
|
|
61
59
|
mapEmbedUrl ? /* @__PURE__ */ jsx(
|
|
@@ -120,10 +118,7 @@ const Location2 = ({
|
|
|
120
118
|
),
|
|
121
119
|
/* @__PURE__ */ jsx("span", { className: "whitespace-pre-line", children: address })
|
|
122
120
|
] }),
|
|
123
|
-
((
|
|
124
|
-
/* @__PURE__ */ jsx(ActionButton, { ...primaryButton }),
|
|
125
|
-
/* @__PURE__ */ jsx(ActionButton, { ...secondaryButton })
|
|
126
|
-
] })
|
|
121
|
+
buttons.some((button) => button == null ? void 0 : button.label) && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-3 pt-1", children: buttons.map((button, index) => /* @__PURE__ */ jsx(ActionButton, { ...button }, index)) })
|
|
127
122
|
] })
|
|
128
123
|
}
|
|
129
124
|
)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { paddingDefaults, backgroundColor, sectionStyle, padding } from "../../../puck-base/core/fields.js";
|
|
2
1
|
import { Location3 } from "./location.js";
|
|
2
|
+
import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
|
|
3
3
|
const defaultLocation = {
|
|
4
4
|
name: "Downtown",
|
|
5
5
|
address: "123 Main Street\nNew York, NY 10001",
|
|
@@ -7,6 +7,25 @@ const defaultLocation = {
|
|
|
7
7
|
hours: "Mon–Fri: 9am–6pm\nSat: 10am–4pm",
|
|
8
8
|
directionsUrl: "https://maps.google.com"
|
|
9
9
|
};
|
|
10
|
+
const location3ExtraStyleFields = {
|
|
11
|
+
mapHeight: {
|
|
12
|
+
type: "radio",
|
|
13
|
+
label: "Map Height",
|
|
14
|
+
options: [
|
|
15
|
+
{ label: "Compact", value: "sm" },
|
|
16
|
+
{ label: "Medium", value: "md" },
|
|
17
|
+
{ label: "Tall", value: "lg" }
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
columns: {
|
|
21
|
+
type: "radio",
|
|
22
|
+
label: "Grid Columns",
|
|
23
|
+
options: [
|
|
24
|
+
{ label: "2 Columns", value: "2" },
|
|
25
|
+
{ label: "3 Columns", value: "3" }
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
};
|
|
10
29
|
const conf = {
|
|
11
30
|
fields: {
|
|
12
31
|
heading: { type: "textarea", contentEditable: true },
|
|
@@ -14,23 +33,6 @@ const conf = {
|
|
|
14
33
|
mapEmbedUrl: { type: "text", label: "Google Map Embed URL" },
|
|
15
34
|
mapTitle: { type: "text", label: "Map Title" },
|
|
16
35
|
mapFilter: { type: "text", label: "Map Filter (CSS)" },
|
|
17
|
-
mapHeight: {
|
|
18
|
-
type: "radio",
|
|
19
|
-
label: "Map Height",
|
|
20
|
-
options: [
|
|
21
|
-
{ label: "Compact", value: "sm" },
|
|
22
|
-
{ label: "Medium", value: "md" },
|
|
23
|
-
{ label: "Tall", value: "lg" }
|
|
24
|
-
]
|
|
25
|
-
},
|
|
26
|
-
columns: {
|
|
27
|
-
type: "radio",
|
|
28
|
-
label: "Grid Columns",
|
|
29
|
-
options: [
|
|
30
|
-
{ label: "2 Columns", value: "2" },
|
|
31
|
-
{ label: "3 Columns", value: "3" }
|
|
32
|
-
]
|
|
33
|
-
},
|
|
34
36
|
locations: {
|
|
35
37
|
type: "array",
|
|
36
38
|
min: 1,
|
|
@@ -45,9 +47,7 @@ const conf = {
|
|
|
45
47
|
},
|
|
46
48
|
defaultItemProps: defaultLocation
|
|
47
49
|
},
|
|
48
|
-
|
|
49
|
-
sectionStyle,
|
|
50
|
-
backgroundColor
|
|
50
|
+
styles: createStylesField(location3ExtraStyleFields)
|
|
51
51
|
},
|
|
52
52
|
defaultProps: {
|
|
53
53
|
heading: "Find us\nnear you",
|
|
@@ -55,8 +55,6 @@ const conf = {
|
|
|
55
55
|
mapEmbedUrl: "https://maps.google.com/maps?q=New%20York%2C%20NY%2C%20United%20States&z=11&t=m&output=embed",
|
|
56
56
|
mapTitle: "Google Maps",
|
|
57
57
|
mapFilter: "grayscale(35%) contrast(1.05) brightness(1.0)",
|
|
58
|
-
mapHeight: "md",
|
|
59
|
-
columns: "3",
|
|
60
58
|
locations: [
|
|
61
59
|
defaultLocation,
|
|
62
60
|
{
|
|
@@ -74,7 +72,10 @@ const conf = {
|
|
|
74
72
|
directionsUrl: "https://maps.google.com"
|
|
75
73
|
}
|
|
76
74
|
],
|
|
77
|
-
|
|
75
|
+
styles: createStylesDefaults({
|
|
76
|
+
mapHeight: "md",
|
|
77
|
+
columns: "3"
|
|
78
|
+
})
|
|
78
79
|
},
|
|
79
80
|
render: Location3
|
|
80
81
|
};
|
|
@@ -7,16 +7,18 @@ export interface LocationEntry {
|
|
|
7
7
|
directionsUrl?: string;
|
|
8
8
|
}
|
|
9
9
|
export interface Location3Props {
|
|
10
|
-
padding?: CompoundContainerProps["padding"];
|
|
11
|
-
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
12
|
-
backgroundColor?: string;
|
|
13
10
|
heading?: string;
|
|
14
11
|
description?: string;
|
|
15
12
|
mapEmbedUrl?: string;
|
|
16
13
|
mapTitle?: string;
|
|
17
14
|
mapFilter?: string;
|
|
18
|
-
mapHeight?: "sm" | "md" | "lg";
|
|
19
|
-
columns?: "2" | "3";
|
|
20
15
|
locations: LocationEntry[];
|
|
16
|
+
styles?: {
|
|
17
|
+
padding?: CompoundContainerProps["padding"];
|
|
18
|
+
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
19
|
+
backgroundColor?: string;
|
|
20
|
+
mapHeight?: "sm" | "md" | "lg";
|
|
21
|
+
columns?: "2" | "3";
|
|
22
|
+
};
|
|
21
23
|
}
|
|
22
|
-
export declare const Location3: ({
|
|
24
|
+
export declare const Location3: ({ heading, description, mapEmbedUrl, mapTitle, mapFilter, locations, styles, }: Location3Props) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,26 +3,24 @@ import { CompoundContainer } from "../../../puck-base/container.js";
|
|
|
3
3
|
import { CompoundButton } from "../../../puck-base/button.js";
|
|
4
4
|
import { cn } from "../../../../utils/css-utils.js";
|
|
5
5
|
const Location3 = ({
|
|
6
|
-
padding,
|
|
7
|
-
sectionStyle,
|
|
8
|
-
backgroundColor,
|
|
9
6
|
heading,
|
|
10
7
|
description,
|
|
11
8
|
mapEmbedUrl,
|
|
12
9
|
mapTitle = "Google Maps",
|
|
13
10
|
mapFilter,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
locations = []
|
|
11
|
+
locations = [],
|
|
12
|
+
styles
|
|
17
13
|
}) => {
|
|
14
|
+
const mapHeight = (styles == null ? void 0 : styles.mapHeight) ?? "md";
|
|
15
|
+
const columns = (styles == null ? void 0 : styles.columns) ?? "3";
|
|
18
16
|
const mapHeightClass = mapHeight === "sm" ? "h-[220px] md:h-[260px]" : mapHeight === "lg" ? "h-[360px] md:h-[440px]" : "h-[280px] md:h-[340px]";
|
|
19
17
|
const colClass = columns === "2" ? "sm:grid-cols-2" : "sm:grid-cols-2 lg:grid-cols-3";
|
|
20
18
|
return /* @__PURE__ */ jsx(
|
|
21
19
|
CompoundContainer,
|
|
22
20
|
{
|
|
23
|
-
padding,
|
|
24
|
-
sectionStyle,
|
|
25
|
-
backgroundColor,
|
|
21
|
+
padding: styles == null ? void 0 : styles.padding,
|
|
22
|
+
sectionStyle: styles == null ? void 0 : styles.sectionStyle,
|
|
23
|
+
backgroundColor: styles == null ? void 0 : styles.backgroundColor,
|
|
26
24
|
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-10", children: [
|
|
27
25
|
(heading || description) && /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-4 text-center", children: [
|
|
28
26
|
heading && /* @__PURE__ */ jsx("h2", { className: "text-foreground whitespace-pre-line font-serif text-3xl leading-tight tracking-tighter md:text-5xl", children: heading }),
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
type LocationVariant = "location-1" | "location-2" | "location-3";
|
|
2
|
+
type LocationPadding = {
|
|
3
|
+
top?: "none" | "small" | "medium" | "large";
|
|
4
|
+
bottom?: "none" | "small" | "medium" | "large";
|
|
5
|
+
};
|
|
6
|
+
type LocationSectionStyle = "default" | "dark" | "muted" | "inverted" | "custom";
|
|
7
|
+
type LocationButton = {
|
|
8
|
+
label: string;
|
|
9
|
+
url?: string;
|
|
10
|
+
variant?: "default" | "secondary" | "outline" | "ghost" | "link" | "destructive";
|
|
11
|
+
size?: "default" | "sm" | "lg" | "icon";
|
|
12
|
+
icon?: string;
|
|
13
|
+
};
|
|
14
|
+
type LocationItem = {
|
|
15
|
+
name: string;
|
|
16
|
+
address?: string;
|
|
17
|
+
phone?: string;
|
|
18
|
+
hours?: string;
|
|
19
|
+
directionsUrl?: string;
|
|
20
|
+
};
|
|
21
|
+
type LocationSectionProps = {
|
|
22
|
+
variant?: LocationVariant;
|
|
23
|
+
heading?: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
address?: string;
|
|
26
|
+
mapEmbedUrl?: string;
|
|
27
|
+
mapTitle?: string;
|
|
28
|
+
mapFilter?: string;
|
|
29
|
+
mapTintMode?: "none" | "theme" | "custom";
|
|
30
|
+
mapTintColor?: string;
|
|
31
|
+
mapTintOpacity?: number;
|
|
32
|
+
buttons?: LocationButton[];
|
|
33
|
+
locations?: LocationItem[];
|
|
34
|
+
contentPosition?: "left" | "right";
|
|
35
|
+
contentAlign?: "left" | "right";
|
|
36
|
+
columns?: "2" | "3";
|
|
37
|
+
styles?: {
|
|
38
|
+
padding?: LocationPadding;
|
|
39
|
+
sectionStyle?: LocationSectionStyle;
|
|
40
|
+
backgroundColor?: string;
|
|
41
|
+
mapHeight?: "sm" | "md" | "lg";
|
|
42
|
+
cardStyle?: "solid" | "glass";
|
|
43
|
+
sectionHeight?: "sm" | "md" | "lg";
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
type MetricsVariant = "stats-1" | "stats-2" | "stats-3";
|
|
2
|
+
type MetricsPadding = {
|
|
3
|
+
top?: "none" | "small" | "medium" | "large";
|
|
4
|
+
bottom?: "none" | "small" | "medium" | "large";
|
|
5
|
+
};
|
|
6
|
+
type MetricsSectionStyle = "default" | "dark" | "muted" | "inverted" | "custom";
|
|
7
|
+
type MetricsButton = {
|
|
8
|
+
label: string;
|
|
9
|
+
url?: string;
|
|
10
|
+
variant?: "default" | "secondary" | "outline" | "ghost" | "link" | "destructive";
|
|
11
|
+
size?: "default" | "sm" | "lg" | "icon";
|
|
12
|
+
icon?: string;
|
|
13
|
+
};
|
|
14
|
+
type MetricsBadge = {
|
|
15
|
+
label: string;
|
|
16
|
+
url?: string;
|
|
17
|
+
variant?: "default" | "secondary" | "destructive" | "outline";
|
|
18
|
+
};
|
|
19
|
+
type MetricItem = {
|
|
20
|
+
value?: string;
|
|
21
|
+
metric?: string;
|
|
22
|
+
label?: string;
|
|
23
|
+
title?: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
percentage?: number;
|
|
26
|
+
direction?: "none" | "increase" | "decrease";
|
|
27
|
+
polarity?: "none" | "positive" | "negative";
|
|
28
|
+
tone?: "dark" | "light";
|
|
29
|
+
};
|
|
30
|
+
type MetricsSectionProps = {
|
|
31
|
+
variant?: MetricsVariant;
|
|
32
|
+
badge?: MetricsBadge;
|
|
33
|
+
heading?: string;
|
|
34
|
+
description?: string;
|
|
35
|
+
buttons?: MetricsButton[];
|
|
36
|
+
layout?: "section" | "inline" | "centered";
|
|
37
|
+
items?: MetricItem[];
|
|
38
|
+
styles?: {
|
|
39
|
+
padding?: MetricsPadding;
|
|
40
|
+
sectionStyle?: MetricsSectionStyle;
|
|
41
|
+
backgroundColor?: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { contentFields } from "../../../puck-base/core/fields.js";
|
|
2
2
|
import { Stats } from "./stats.js";
|
|
3
|
+
import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
|
|
3
4
|
const conf = {
|
|
4
5
|
fields: {
|
|
5
6
|
...contentFields,
|
|
6
|
-
|
|
7
|
+
items: {
|
|
7
8
|
type: "array",
|
|
8
9
|
max: 8,
|
|
9
10
|
getItemSummary: (item, index = 0) => item.label || `Statistic ${index + 1}`,
|
|
@@ -63,9 +64,7 @@ const conf = {
|
|
|
63
64
|
{ label: "centered", value: "centered" }
|
|
64
65
|
]
|
|
65
66
|
},
|
|
66
|
-
|
|
67
|
-
sectionStyle,
|
|
68
|
-
backgroundColor
|
|
67
|
+
styles: createStylesField()
|
|
69
68
|
},
|
|
70
69
|
defaultProps: {
|
|
71
70
|
heading: "The numbers speak for themselves",
|
|
@@ -83,7 +82,7 @@ const conf = {
|
|
|
83
82
|
size: "default"
|
|
84
83
|
}
|
|
85
84
|
],
|
|
86
|
-
|
|
85
|
+
items: [
|
|
87
86
|
{
|
|
88
87
|
label: "Monthly active users",
|
|
89
88
|
value: "500",
|
|
@@ -114,7 +113,7 @@ const conf = {
|
|
|
114
113
|
}
|
|
115
114
|
],
|
|
116
115
|
layout: "section",
|
|
117
|
-
|
|
116
|
+
styles: createStylesDefaults()
|
|
118
117
|
},
|
|
119
118
|
resolveFields: (data, params) => {
|
|
120
119
|
if (data.props.layout === "inline") {
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { CompoundContainerProps } from "@/components/puck-base/container";
|
|
2
2
|
import { CompoundContentProps } from "@/components/puck-base/content";
|
|
3
3
|
export interface StatsProps extends CompoundContentProps {
|
|
4
|
-
padding?: CompoundContainerProps["padding"];
|
|
5
|
-
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
6
|
-
backgroundColor?: string;
|
|
7
4
|
layout?: "section" | "inline" | "centered";
|
|
8
|
-
|
|
5
|
+
items: {
|
|
9
6
|
value: string;
|
|
10
7
|
label: string;
|
|
11
8
|
percentage?: number;
|
|
12
9
|
direction?: "none" | "increase" | "decrease";
|
|
13
10
|
polarity?: "none" | "positive" | "negative";
|
|
14
11
|
}[];
|
|
12
|
+
styles?: {
|
|
13
|
+
padding?: CompoundContainerProps["padding"];
|
|
14
|
+
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
15
|
+
backgroundColor?: string;
|
|
16
|
+
};
|
|
15
17
|
}
|
|
16
|
-
export declare const Stats: ({
|
|
18
|
+
export declare const Stats: ({ layout, badge, heading, description, buttons, items, styles, }: StatsProps) => import("react/jsx-runtime").JSX.Element;
|