dune-react 0.0.9 → 0.0.11
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.d.ts +0 -1
- package/dist/components/puck-base/button.js +5 -4
- package/dist/components/puck-base/card.js +0 -1
- package/dist/components/puck-base/content.js +0 -1
- package/dist/components/puck-base/core/fields.d.ts +2 -150
- package/dist/components/puck-base/core/fields.js +7 -83
- package/dist/components/puck-base/core/styles.d.ts +1946 -0
- package/dist/components/puck-base/core/styles.js +250 -0
- package/dist/components/puck-base/core/with-editable.d.ts +5 -7
- package/dist/components/puck-base/core/with-editable.js +69 -64
- package/dist/components/puck-base/{action-field.d.ts → fields/action-field.d.ts} +1 -1
- package/dist/components/puck-base/{action-field.js → fields/action-field.js} +91 -16
- package/dist/components/puck-base/fields/auto-field.d.ts +0 -1
- package/dist/components/puck-base/fields/auto-field.js +2 -90
- package/dist/components/puck-base/form.js +0 -1
- package/dist/components/puck-base/index.d.ts +1 -1
- package/dist/components/puck-base/navigation-menu.d.ts +18 -0
- package/dist/components/puck-base/navigation-menu.js +202 -0
- 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 +13 -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 +48 -22
- 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 +5 -7
- 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 +44 -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 -7
- 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 +33 -35
- 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 +19 -13
- package/dist/components/puck-block/gallery-sections/gallery-2/index.js +4 -6
- 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 +11 -6
- package/dist/components/puck-block/header-sections/header-1/header.js +34 -28
- 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 +26 -30
- 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 +19 -5
- package/dist/components/puck-block/hero-sections/fullscreen-hero-1/index.js +17 -17
- 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 +19 -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 +8 -11
- 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 +6 -8
- 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 +9 -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 +35 -36
- 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 +44 -42
- package/dist/components/puck-block/location-sections/location-1/location.d.ts +8 -6
- package/dist/components/puck-block/location-sections/location-1/location.js +8 -15
- package/dist/components/puck-block/location-sections/location-2/index.js +66 -57
- package/dist/components/puck-block/location-sections/location-2/location.d.ts +12 -6
- package/dist/components/puck-block/location-sections/location-2/location.js +8 -14
- 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 +10 -6
- package/dist/components/puck-block/location-sections/location-3/location.js +12 -11
- 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 -7
- 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 -7
- package/dist/components/puck-block/metrics-sections/stats-3/index.js +19 -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 +22 -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 -13
- 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 -12
- 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 -8
- 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 +5 -6
- 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 -7
- 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 +17 -16
- 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 +100 -67
- 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 -25
- 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 -9
- package/dist/components/puck-block/text-sections/content-section-1/index.js +14 -16
- 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 +10 -8
- 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.js +8 -33
- package/dist/index.js +3 -2
- package/package.json +2 -2
|
@@ -1,19 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { button } from "../../../puck-base/core/fields.js";
|
|
2
2
|
import { LocationSection } from "./location.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
objectFields
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
+
variant: "default",
|
|
19
|
+
size: "default",
|
|
20
|
+
icon: "none",
|
|
21
|
+
colorMode: "theme"
|
|
17
22
|
};
|
|
18
23
|
const conf = {
|
|
19
24
|
fields: {
|
|
@@ -55,17 +60,14 @@ const conf = {
|
|
|
55
60
|
max: 1,
|
|
56
61
|
step: 0.01
|
|
57
62
|
},
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
label: "Secondary Button"
|
|
63
|
+
buttons: {
|
|
64
|
+
type: "array",
|
|
65
|
+
max: 3,
|
|
66
|
+
getItemSummary: (item, index = 0) => item.label || `Button ${index + 1}`,
|
|
67
|
+
arrayFields: locationButtonFields,
|
|
68
|
+
defaultItemProps: locationButtonDefaults
|
|
65
69
|
},
|
|
66
|
-
|
|
67
|
-
sectionStyle,
|
|
68
|
-
backgroundColor
|
|
70
|
+
styles: createStylesField()
|
|
69
71
|
},
|
|
70
72
|
defaultProps: {
|
|
71
73
|
heading: "Find us in\nLos Angeles",
|
|
@@ -78,23 +80,23 @@ const conf = {
|
|
|
78
80
|
mapTintMode: "theme",
|
|
79
81
|
mapTintColor: "var(--primary)",
|
|
80
82
|
mapTintOpacity: 0.21,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
83
|
+
buttons: [
|
|
84
|
+
{
|
|
85
|
+
label: "Call to visit",
|
|
86
|
+
variant: "default",
|
|
87
|
+
size: "default",
|
|
88
|
+
icon: "none",
|
|
89
|
+
colorMode: "theme"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
label: "Get directions",
|
|
93
|
+
variant: "secondary",
|
|
94
|
+
size: "default",
|
|
95
|
+
icon: "none",
|
|
96
|
+
colorMode: "theme"
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
styles: createStylesDefaults()
|
|
98
100
|
},
|
|
99
101
|
render: LocationSection
|
|
100
102
|
};
|
|
@@ -2,14 +2,12 @@ import { CompoundContainerProps } from "@/components/puck-base/container";
|
|
|
2
2
|
import { CompoundButtonProps } from "@/components/puck-base/button";
|
|
3
3
|
interface LocationButton extends Omit<CompoundButtonProps, "label"> {
|
|
4
4
|
label?: string;
|
|
5
|
+
url?: string;
|
|
5
6
|
colorMode?: "theme" | "custom";
|
|
6
7
|
backgroundColor?: string;
|
|
7
8
|
textColor?: string;
|
|
8
9
|
}
|
|
9
10
|
export interface LocationSectionProps {
|
|
10
|
-
padding?: CompoundContainerProps["padding"];
|
|
11
|
-
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
12
|
-
backgroundColor?: string;
|
|
13
11
|
heading?: string;
|
|
14
12
|
description?: string;
|
|
15
13
|
contentAlign?: "left" | "right";
|
|
@@ -20,8 +18,12 @@ export interface LocationSectionProps {
|
|
|
20
18
|
mapTintMode?: "theme" | "custom" | "none";
|
|
21
19
|
mapTintColor?: string;
|
|
22
20
|
mapTintOpacity?: number;
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
buttons?: LocationButton[];
|
|
22
|
+
styles?: {
|
|
23
|
+
padding?: CompoundContainerProps["padding"];
|
|
24
|
+
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
25
|
+
backgroundColor?: string;
|
|
26
|
+
};
|
|
25
27
|
}
|
|
26
|
-
export declare const LocationSection: ({
|
|
28
|
+
export declare const LocationSection: ({ heading, description, contentAlign, contentPosition, mapEmbedUrl, mapTitle, mapFilter, mapTintMode, mapTintColor, mapTintOpacity, buttons, styles, }: LocationSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
29
|
export {};
|
|
@@ -23,8 +23,7 @@ const LocationActionButton = ({
|
|
|
23
23
|
CompoundButton,
|
|
24
24
|
{
|
|
25
25
|
label,
|
|
26
|
-
url,
|
|
27
|
-
action,
|
|
26
|
+
action: action ?? (url ? /^https?:\/\//i.test(url) ? { type: "external", externalUrl: url } : { type: "page", pageUrl: url } : void 0),
|
|
28
27
|
variant,
|
|
29
28
|
size,
|
|
30
29
|
icon,
|
|
@@ -37,9 +36,6 @@ const LocationActionButton = ({
|
|
|
37
36
|
) });
|
|
38
37
|
};
|
|
39
38
|
const LocationSection = ({
|
|
40
|
-
padding,
|
|
41
|
-
sectionStyle,
|
|
42
|
-
backgroundColor,
|
|
43
39
|
heading,
|
|
44
40
|
description,
|
|
45
41
|
contentAlign = "left",
|
|
@@ -50,8 +46,8 @@ const LocationSection = ({
|
|
|
50
46
|
mapTintMode = "theme",
|
|
51
47
|
mapTintColor,
|
|
52
48
|
mapTintOpacity = 0.2,
|
|
53
|
-
|
|
54
|
-
|
|
49
|
+
buttons = [],
|
|
50
|
+
styles
|
|
55
51
|
}) => {
|
|
56
52
|
const isTextRight = contentAlign === "right";
|
|
57
53
|
const isContentRight = contentPosition === "right";
|
|
@@ -60,9 +56,9 @@ const LocationSection = ({
|
|
|
60
56
|
return /* @__PURE__ */ jsx(
|
|
61
57
|
CompoundContainer,
|
|
62
58
|
{
|
|
63
|
-
padding,
|
|
64
|
-
sectionStyle,
|
|
65
|
-
backgroundColor,
|
|
59
|
+
padding: styles == null ? void 0 : styles.padding,
|
|
60
|
+
sectionStyle: styles == null ? void 0 : styles.sectionStyle,
|
|
61
|
+
backgroundColor: styles == null ? void 0 : styles.backgroundColor,
|
|
66
62
|
className: "relative overflow-hidden",
|
|
67
63
|
children: /* @__PURE__ */ jsxs(
|
|
68
64
|
"div",
|
|
@@ -91,17 +87,14 @@ const LocationSection = ({
|
|
|
91
87
|
children: description
|
|
92
88
|
}
|
|
93
89
|
) : null,
|
|
94
|
-
((
|
|
90
|
+
buttons.some((button) => button == null ? void 0 : button.label) && /* @__PURE__ */ jsx(
|
|
95
91
|
"div",
|
|
96
92
|
{
|
|
97
93
|
className: cn(
|
|
98
94
|
"grid grid-cols-1 gap-4 sm:flex sm:flex-row",
|
|
99
95
|
isTextRight ? "items-end sm:justify-end" : "items-start sm:justify-start"
|
|
100
96
|
),
|
|
101
|
-
children:
|
|
102
|
-
/* @__PURE__ */ jsx(LocationActionButton, { ...primaryButton }),
|
|
103
|
-
/* @__PURE__ */ jsx(LocationActionButton, { ...secondaryButton })
|
|
104
|
-
]
|
|
97
|
+
children: buttons.map((button, index) => /* @__PURE__ */ jsx(LocationActionButton, { ...button }, index))
|
|
105
98
|
}
|
|
106
99
|
)
|
|
107
100
|
]
|
|
@@ -1,18 +1,42 @@
|
|
|
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
|
+
variant: "default",
|
|
19
|
+
size: "default",
|
|
20
|
+
icon: "none",
|
|
21
|
+
colorMode: "theme"
|
|
22
|
+
};
|
|
23
|
+
const location2ExtraStyleFields = {
|
|
24
|
+
cardStyle: {
|
|
25
|
+
type: "radio",
|
|
26
|
+
label: "Card Style",
|
|
27
|
+
options: [
|
|
28
|
+
{ label: "Solid", value: "solid" },
|
|
29
|
+
{ label: "Glass", value: "glass" }
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
sectionHeight: {
|
|
33
|
+
type: "radio",
|
|
34
|
+
label: "Section Height",
|
|
35
|
+
options: [
|
|
36
|
+
{ label: "Compact", value: "sm" },
|
|
37
|
+
{ label: "Medium", value: "md" },
|
|
38
|
+
{ label: "Tall", value: "lg" }
|
|
39
|
+
]
|
|
16
40
|
}
|
|
17
41
|
};
|
|
18
42
|
const conf = {
|
|
@@ -20,7 +44,7 @@ const conf = {
|
|
|
20
44
|
heading: { type: "textarea", contentEditable: true },
|
|
21
45
|
description: { type: "textarea", contentEditable: true },
|
|
22
46
|
address: { type: "textarea", label: "Address", contentEditable: true },
|
|
23
|
-
|
|
47
|
+
contentPosition: {
|
|
24
48
|
type: "radio",
|
|
25
49
|
label: "Card Position",
|
|
26
50
|
options: [
|
|
@@ -28,23 +52,6 @@ const conf = {
|
|
|
28
52
|
{ label: "Right", value: "right" }
|
|
29
53
|
]
|
|
30
54
|
},
|
|
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
55
|
mapEmbedUrl: { type: "text", label: "Google Map Embed URL" },
|
|
49
56
|
mapTitle: { type: "text", label: "Map Title" },
|
|
50
57
|
mapFilter: { type: "text", label: "Map Filter (CSS)" },
|
|
@@ -65,44 +72,46 @@ const conf = {
|
|
|
65
72
|
max: 1,
|
|
66
73
|
step: 0.01
|
|
67
74
|
},
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
75
|
+
buttons: {
|
|
76
|
+
type: "array",
|
|
77
|
+
max: 3,
|
|
78
|
+
getItemSummary: (item, index = 0) => item.label || `Button ${index + 1}`,
|
|
79
|
+
arrayFields: locationButtonFields,
|
|
80
|
+
defaultItemProps: locationButtonDefaults
|
|
71
81
|
},
|
|
72
|
-
|
|
73
|
-
...locationButtonField,
|
|
74
|
-
label: "Secondary Button"
|
|
75
|
-
}
|
|
82
|
+
styles: createStylesField(location2ExtraStyleFields)
|
|
76
83
|
},
|
|
77
84
|
defaultProps: {
|
|
78
85
|
heading: "Come visit\nus today",
|
|
79
86
|
description: "We're in the heart of the city, easy to reach by public transport or car. Drop by any time.",
|
|
80
87
|
address: "123 Main Street\nNew York, NY 10001",
|
|
81
|
-
|
|
82
|
-
cardStyle: "solid",
|
|
83
|
-
sectionHeight: "md",
|
|
88
|
+
contentPosition: "left",
|
|
84
89
|
mapEmbedUrl: "https://maps.google.com/maps?q=New%20York%2C%20NY%2C%20United%20States&z=13&t=m&output=embed",
|
|
85
90
|
mapTitle: "Google Maps",
|
|
86
91
|
mapFilter: "grayscale(40%) contrast(1.05) brightness(1.0) saturate(0.85)",
|
|
87
92
|
mapTintMode: "none",
|
|
88
93
|
mapTintColor: "var(--primary)",
|
|
89
94
|
mapTintOpacity: 0.15,
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
95
|
+
buttons: [
|
|
96
|
+
{
|
|
97
|
+
label: "Get Directions",
|
|
98
|
+
variant: "default",
|
|
99
|
+
size: "default",
|
|
100
|
+
icon: "none",
|
|
101
|
+
colorMode: "theme"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
label: "Call Us",
|
|
105
|
+
variant: "outline",
|
|
106
|
+
size: "default",
|
|
107
|
+
icon: "none",
|
|
108
|
+
colorMode: "theme"
|
|
109
|
+
}
|
|
110
|
+
],
|
|
111
|
+
styles: createStylesDefaults({
|
|
112
|
+
cardStyle: "solid",
|
|
113
|
+
sectionHeight: "md"
|
|
114
|
+
})
|
|
106
115
|
},
|
|
107
116
|
render: Location2
|
|
108
117
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
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;
|
|
5
|
+
url?: string;
|
|
4
6
|
colorMode?: "theme" | "custom";
|
|
5
7
|
backgroundColor?: string;
|
|
6
8
|
textColor?: string;
|
|
@@ -9,17 +11,21 @@ export interface Location2Props {
|
|
|
9
11
|
heading?: string;
|
|
10
12
|
description?: string;
|
|
11
13
|
address?: string;
|
|
12
|
-
|
|
13
|
-
cardStyle?: "solid" | "glass";
|
|
14
|
-
sectionHeight?: "sm" | "md" | "lg";
|
|
14
|
+
contentPosition?: "left" | "right";
|
|
15
15
|
mapEmbedUrl?: string;
|
|
16
16
|
mapTitle?: string;
|
|
17
17
|
mapFilter?: string;
|
|
18
18
|
mapTintMode?: "none" | "theme" | "custom";
|
|
19
19
|
mapTintColor?: string;
|
|
20
20
|
mapTintOpacity?: number;
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
buttons?: LocationButton[];
|
|
22
|
+
styles?: {
|
|
23
|
+
padding?: CompoundContainerProps["padding"];
|
|
24
|
+
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
25
|
+
backgroundColor?: string;
|
|
26
|
+
cardStyle?: "solid" | "glass";
|
|
27
|
+
sectionHeight?: "sm" | "md" | "lg";
|
|
28
|
+
};
|
|
23
29
|
}
|
|
24
|
-
export declare const Location2: ({ heading, description, address,
|
|
30
|
+
export declare const Location2: ({ heading, description, address, contentPosition, mapEmbedUrl, mapTitle, mapFilter, mapTintMode, mapTintColor, mapTintOpacity, buttons, styles, }: Location2Props) => import("react/jsx-runtime").JSX.Element;
|
|
25
31
|
export {};
|
|
@@ -22,8 +22,7 @@ const ActionButton = ({
|
|
|
22
22
|
CompoundButton,
|
|
23
23
|
{
|
|
24
24
|
label,
|
|
25
|
-
url,
|
|
26
|
-
action,
|
|
25
|
+
action: action ?? (url ? /^https?:\/\//i.test(url) ? { type: "external", externalUrl: url } : { type: "page", pageUrl: url } : void 0),
|
|
27
26
|
variant,
|
|
28
27
|
size,
|
|
29
28
|
icon,
|
|
@@ -39,23 +38,21 @@ const Location2 = ({
|
|
|
39
38
|
heading,
|
|
40
39
|
description,
|
|
41
40
|
address,
|
|
42
|
-
|
|
43
|
-
cardStyle = "solid",
|
|
44
|
-
sectionHeight = "md",
|
|
41
|
+
contentPosition = "left",
|
|
45
42
|
mapEmbedUrl,
|
|
46
43
|
mapTitle = "Google Maps",
|
|
47
44
|
mapFilter,
|
|
48
45
|
mapTintMode = "none",
|
|
49
46
|
mapTintColor,
|
|
50
47
|
mapTintOpacity = 0.15,
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
buttons = [],
|
|
49
|
+
styles
|
|
53
50
|
}) => {
|
|
54
|
-
const isRight =
|
|
55
|
-
const isGlass = cardStyle === "glass";
|
|
51
|
+
const isRight = contentPosition === "right";
|
|
52
|
+
const isGlass = (styles == null ? void 0 : styles.cardStyle) === "glass";
|
|
56
53
|
const showMapTint = mapTintMode !== "none" && mapTintOpacity > 0;
|
|
57
54
|
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]";
|
|
55
|
+
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
56
|
return /* @__PURE__ */ jsxs("div", { className: cn("relative w-full overflow-hidden", heightClass), children: [
|
|
60
57
|
/* @__PURE__ */ jsxs("div", { className: "absolute inset-0", children: [
|
|
61
58
|
mapEmbedUrl ? /* @__PURE__ */ jsx(
|
|
@@ -120,10 +117,7 @@ const Location2 = ({
|
|
|
120
117
|
),
|
|
121
118
|
/* @__PURE__ */ jsx("span", { className: "whitespace-pre-line", children: address })
|
|
122
119
|
] }),
|
|
123
|
-
((
|
|
124
|
-
/* @__PURE__ */ jsx(ActionButton, { ...primaryButton }),
|
|
125
|
-
/* @__PURE__ */ jsx(ActionButton, { ...secondaryButton })
|
|
126
|
-
] })
|
|
120
|
+
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
121
|
] })
|
|
128
122
|
}
|
|
129
123
|
)
|
|
@@ -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
|
};
|
|
@@ -1,22 +1,26 @@
|
|
|
1
1
|
import { CompoundContainerProps } from "@/components/puck-base/container";
|
|
2
|
+
import type { Action } from "@/components/puck-base/core/types";
|
|
2
3
|
export interface LocationEntry {
|
|
3
4
|
name: string;
|
|
4
5
|
address?: string;
|
|
5
6
|
phone?: string;
|
|
6
7
|
hours?: string;
|
|
7
8
|
directionsUrl?: string;
|
|
9
|
+
directionsAction?: Action;
|
|
8
10
|
}
|
|
9
11
|
export interface Location3Props {
|
|
10
|
-
padding?: CompoundContainerProps["padding"];
|
|
11
|
-
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
12
|
-
backgroundColor?: string;
|
|
13
12
|
heading?: string;
|
|
14
13
|
description?: string;
|
|
15
14
|
mapEmbedUrl?: string;
|
|
16
15
|
mapTitle?: string;
|
|
17
16
|
mapFilter?: string;
|
|
18
|
-
mapHeight?: "sm" | "md" | "lg";
|
|
19
|
-
columns?: "2" | "3";
|
|
20
17
|
locations: LocationEntry[];
|
|
18
|
+
styles?: {
|
|
19
|
+
padding?: CompoundContainerProps["padding"];
|
|
20
|
+
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
21
|
+
backgroundColor?: string;
|
|
22
|
+
mapHeight?: "sm" | "md" | "lg";
|
|
23
|
+
columns?: "2" | "3";
|
|
24
|
+
};
|
|
21
25
|
}
|
|
22
|
-
export declare const Location3: ({
|
|
26
|
+
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 }),
|
|
@@ -106,11 +104,14 @@ const Location3 = ({
|
|
|
106
104
|
),
|
|
107
105
|
/* @__PURE__ */ jsx("span", { className: "whitespace-pre-line", children: loc.hours })
|
|
108
106
|
] }),
|
|
109
|
-
loc.directionsUrl && /* @__PURE__ */ jsx("div", { className: "mt-auto pt-2", children: /* @__PURE__ */ jsx(
|
|
107
|
+
(loc.directionsAction || loc.directionsUrl) && /* @__PURE__ */ jsx("div", { className: "mt-auto pt-2", children: /* @__PURE__ */ jsx(
|
|
110
108
|
CompoundButton,
|
|
111
109
|
{
|
|
112
110
|
label: "Get Directions",
|
|
113
|
-
|
|
111
|
+
action: loc.directionsAction ?? (loc.directionsUrl ? {
|
|
112
|
+
type: "external",
|
|
113
|
+
externalUrl: loc.directionsUrl
|
|
114
|
+
} : void 0),
|
|
114
115
|
variant: "outline",
|
|
115
116
|
size: "sm",
|
|
116
117
|
icon: "map-pin"
|
|
@@ -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
|
+
};
|