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
|
@@ -8,17 +8,26 @@ const TAG_STYLES = {
|
|
|
8
8
|
p: "text-base md:text-lg",
|
|
9
9
|
span: ""
|
|
10
10
|
};
|
|
11
|
+
const DIRECTION_MAP = {
|
|
12
|
+
"to-r": "to right",
|
|
13
|
+
"to-l": "to left",
|
|
14
|
+
"to-t": "to top",
|
|
15
|
+
"to-b": "to bottom",
|
|
16
|
+
"to-br": "to bottom right",
|
|
17
|
+
"to-bl": "to bottom left"
|
|
18
|
+
};
|
|
11
19
|
const GradientText = ({
|
|
12
20
|
text,
|
|
13
21
|
as: Tag = "h2",
|
|
14
|
-
gradientFrom = "
|
|
15
|
-
gradientTo = "
|
|
22
|
+
gradientFrom = "var(--primary)",
|
|
23
|
+
gradientTo = "var(--chart-2)",
|
|
16
24
|
gradientVia,
|
|
17
25
|
direction = "to-r",
|
|
18
26
|
className
|
|
19
27
|
}) => {
|
|
28
|
+
const cssDirection = DIRECTION_MAP[direction] ?? "to right";
|
|
20
29
|
const gradientStyle = {
|
|
21
|
-
backgroundImage: gradientVia ? `linear-gradient(${
|
|
30
|
+
backgroundImage: gradientVia ? `linear-gradient(${cssDirection}, ${gradientFrom}, ${gradientVia}, ${gradientTo})` : `linear-gradient(${cssDirection}, ${gradientFrom}, ${gradientTo})`
|
|
22
31
|
};
|
|
23
32
|
return /* @__PURE__ */ jsx(
|
|
24
33
|
Tag,
|
package/dist/components/puck-block/banner-sections/announcement-banner-1/announcement-banner.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
export interface AnnouncementBannerProps {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
items?: string[];
|
|
3
|
+
linkLabel?: string;
|
|
4
4
|
linkUrl?: string;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
styles?: {
|
|
6
|
+
backgroundColor?: string;
|
|
7
|
+
textColor?: string;
|
|
8
|
+
align?: "left" | "center" | "right";
|
|
9
|
+
size?: "small" | "default";
|
|
10
|
+
};
|
|
9
11
|
}
|
|
10
|
-
export declare const AnnouncementBanner: ({
|
|
12
|
+
export declare const AnnouncementBanner: ({ items, linkLabel, linkUrl, styles, }: AnnouncementBannerProps) => import("react/jsx-runtime").JSX.Element;
|
package/dist/components/puck-block/banner-sections/announcement-banner-1/announcement-banner.js
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "../../../../utils/css-utils.js";
|
|
3
3
|
const AnnouncementBanner = ({
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
items = [],
|
|
5
|
+
linkLabel,
|
|
6
6
|
linkUrl,
|
|
7
|
-
|
|
8
|
-
textColor,
|
|
9
|
-
align = "center",
|
|
10
|
-
size = "default"
|
|
7
|
+
styles
|
|
11
8
|
}) => {
|
|
9
|
+
const normalized = items.map((v) => typeof v === "string" ? v : (v == null ? void 0 : v.text) ?? "");
|
|
10
|
+
const text = normalized[0] ?? "";
|
|
11
|
+
const backgroundColor = (styles == null ? void 0 : styles.backgroundColor) ?? "var(--primary)";
|
|
12
|
+
const textColor = styles == null ? void 0 : styles.textColor;
|
|
13
|
+
const align = (styles == null ? void 0 : styles.align) ?? "center";
|
|
14
|
+
const size = (styles == null ? void 0 : styles.size) ?? "default";
|
|
12
15
|
const style = {
|
|
13
16
|
...backgroundColor ? { backgroundColor } : {},
|
|
14
17
|
...textColor ? { color: textColor } : {}
|
|
@@ -32,13 +35,13 @@ const AnnouncementBanner = ({
|
|
|
32
35
|
}),
|
|
33
36
|
children: [
|
|
34
37
|
/* @__PURE__ */ jsx("span", { children: text }),
|
|
35
|
-
|
|
38
|
+
linkLabel && linkUrl ? /* @__PURE__ */ jsxs(
|
|
36
39
|
"a",
|
|
37
40
|
{
|
|
38
41
|
href: linkUrl,
|
|
39
42
|
className: "underline underline-offset-2 opacity-90 hover:opacity-100",
|
|
40
43
|
children: [
|
|
41
|
-
|
|
44
|
+
linkLabel,
|
|
42
45
|
" →"
|
|
43
46
|
]
|
|
44
47
|
}
|
|
@@ -1,47 +1,29 @@
|
|
|
1
1
|
import { AnnouncementBanner } from "./announcement-banner.js";
|
|
2
|
+
import { bannerStylesDefaults, bannerStylesField } from "../../../puck-base/core/styles.js";
|
|
2
3
|
const conf = {
|
|
3
4
|
fields: {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
type: "text",
|
|
9
|
-
|
|
10
|
-
ai: {
|
|
11
|
-
instructions: "Use the exact background color from the original banner. Common examples: yellow (#FACC15), blue (#3B82F6), green (#22C55E), red (#EF4444), or any brand color. Use hex, rgb, or oklch format."
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
textColor: {
|
|
15
|
-
type: "text",
|
|
16
|
-
label: "Text Color",
|
|
17
|
-
ai: {
|
|
18
|
-
instructions: "Set text color to contrast with the background. Usually black (#000) for light backgrounds or white (#fff) for dark backgrounds."
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
align: {
|
|
22
|
-
type: "radio",
|
|
23
|
-
options: [
|
|
24
|
-
{ label: "Left", value: "left" },
|
|
25
|
-
{ label: "Center", value: "center" },
|
|
26
|
-
{ label: "Right", value: "right" }
|
|
27
|
-
]
|
|
5
|
+
items: {
|
|
6
|
+
type: "array",
|
|
7
|
+
max: 3,
|
|
8
|
+
getItemSummary: (item, i = 0) => (typeof item === "string" ? item : item == null ? void 0 : item.text) || `Item ${i + 1}`,
|
|
9
|
+
arrayFields: { text: { type: "text", contentEditable: true } },
|
|
10
|
+
defaultItemProps: { text: "Text" }
|
|
28
11
|
},
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
{ label: "Small", value: "small" },
|
|
33
|
-
{ label: "Default", value: "default" }
|
|
34
|
-
]
|
|
35
|
-
}
|
|
12
|
+
linkLabel: { type: "text" },
|
|
13
|
+
linkUrl: { type: "text" },
|
|
14
|
+
styles: bannerStylesField
|
|
36
15
|
},
|
|
37
16
|
defaultProps: {
|
|
38
|
-
text: "New: Check out our latest update",
|
|
39
|
-
|
|
17
|
+
items: [{ text: "New: Check out our latest update" }],
|
|
18
|
+
linkLabel: "Learn more",
|
|
40
19
|
linkUrl: "#",
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
20
|
+
styles: {
|
|
21
|
+
...bannerStylesDefaults,
|
|
22
|
+
backgroundColor: "#FACC15",
|
|
23
|
+
textColor: "#000000",
|
|
24
|
+
align: "center",
|
|
25
|
+
size: "default"
|
|
26
|
+
}
|
|
45
27
|
},
|
|
46
28
|
render: AnnouncementBanner
|
|
47
29
|
};
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { paddingDefaults, backgroundColor, sectionStyle, padding } from "../../../puck-base/core/fields.js";
|
|
2
1
|
import { Marquee } from "./marquee.js";
|
|
2
|
+
import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
|
|
3
|
+
const marqueeStylesField = createStylesField({
|
|
4
|
+
speed: {
|
|
5
|
+
type: "radio",
|
|
6
|
+
options: [
|
|
7
|
+
{ label: "Slow", value: "slow" },
|
|
8
|
+
{ label: "Normal", value: "normal" },
|
|
9
|
+
{ label: "Fast", value: "fast" }
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
tone: {
|
|
13
|
+
type: "radio",
|
|
14
|
+
options: [
|
|
15
|
+
{ label: "Default", value: "default" },
|
|
16
|
+
{ label: "Outline", value: "outline" },
|
|
17
|
+
{ label: "Muted", value: "muted" }
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
});
|
|
3
21
|
const conf = {
|
|
4
22
|
fields: {
|
|
5
23
|
items: {
|
|
6
24
|
type: "array",
|
|
7
25
|
max: 10,
|
|
8
|
-
getItemSummary: (item, i = 0) => item.text || `Item ${i + 1}`,
|
|
26
|
+
getItemSummary: (item, i = 0) => (typeof item === "string" ? item : item == null ? void 0 : item.text) || `Item ${i + 1}`,
|
|
9
27
|
arrayFields: { text: { type: "text" } },
|
|
10
28
|
defaultItemProps: { text: "Text" }
|
|
11
29
|
},
|
|
12
|
-
|
|
13
|
-
type: "radio",
|
|
14
|
-
options: [
|
|
15
|
-
{ label: "Slow", value: "slow" },
|
|
16
|
-
{ label: "Normal", value: "normal" },
|
|
17
|
-
{ label: "Fast", value: "fast" }
|
|
18
|
-
]
|
|
19
|
-
},
|
|
20
|
-
variant: {
|
|
21
|
-
type: "radio",
|
|
22
|
-
options: [
|
|
23
|
-
{ label: "Default", value: "default" },
|
|
24
|
-
{ label: "Outline", value: "outline" },
|
|
25
|
-
{ label: "Muted", value: "muted" }
|
|
26
|
-
]
|
|
27
|
-
},
|
|
28
|
-
padding,
|
|
29
|
-
sectionStyle,
|
|
30
|
-
backgroundColor
|
|
30
|
+
styles: marqueeStylesField
|
|
31
31
|
},
|
|
32
32
|
defaultProps: {
|
|
33
33
|
items: [
|
|
@@ -36,9 +36,11 @@ const conf = {
|
|
|
36
36
|
{ text: "Performance" },
|
|
37
37
|
{ text: "Quality" }
|
|
38
38
|
],
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
styles: {
|
|
40
|
+
...createStylesDefaults(),
|
|
41
|
+
speed: "normal",
|
|
42
|
+
tone: "default"
|
|
43
|
+
}
|
|
42
44
|
},
|
|
43
45
|
render: Marquee
|
|
44
46
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { CompoundContainerProps } from "@/components/puck-base/container";
|
|
2
2
|
export interface MarqueeProps {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
items?: string[];
|
|
4
|
+
styles?: {
|
|
5
|
+
padding?: CompoundContainerProps["padding"];
|
|
6
|
+
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
7
|
+
backgroundColor?: string;
|
|
8
|
+
speed?: "slow" | "normal" | "fast";
|
|
9
|
+
tone?: "default" | "outline" | "muted";
|
|
10
|
+
};
|
|
11
11
|
}
|
|
12
|
-
export declare const Marquee: ({
|
|
12
|
+
export declare const Marquee: ({ items, styles, }: MarqueeProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,32 +6,39 @@ const SPEED_DURATION = {
|
|
|
6
6
|
fast: "15s"
|
|
7
7
|
};
|
|
8
8
|
const Marquee = ({
|
|
9
|
-
padding,
|
|
10
|
-
sectionStyle,
|
|
11
|
-
backgroundColor,
|
|
12
9
|
items = [],
|
|
13
|
-
|
|
14
|
-
variant = "default"
|
|
10
|
+
styles
|
|
15
11
|
}) => {
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
const normalized = items.map((v) => typeof v === "string" ? v : (v == null ? void 0 : v.text) ?? "");
|
|
13
|
+
const speed = (styles == null ? void 0 : styles.speed) ?? "normal";
|
|
14
|
+
const tone = (styles == null ? void 0 : styles.tone) ?? "default";
|
|
15
|
+
const textClass = tone === "outline" ? "text-transparent [-webkit-text-stroke:1px_currentColor]" : tone === "muted" ? "text-muted-foreground/30" : "text-foreground";
|
|
16
|
+
return /* @__PURE__ */ jsx(
|
|
17
|
+
CompoundContainer,
|
|
19
18
|
{
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
padding: styles == null ? void 0 : styles.padding,
|
|
20
|
+
sectionStyle: styles == null ? void 0 : styles.sectionStyle,
|
|
21
|
+
backgroundColor: styles == null ? void 0 : styles.backgroundColor,
|
|
22
|
+
children: /* @__PURE__ */ jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ jsx(
|
|
23
|
+
"div",
|
|
24
24
|
{
|
|
25
|
-
className:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
className: "flex w-max animate-[marquee_var(--marquee-speed)_linear_infinite] items-center gap-8",
|
|
26
|
+
style: { "--marquee-speed": SPEED_DURATION[speed] },
|
|
27
|
+
children: [...normalized, ...normalized].map((item, i) => /* @__PURE__ */ jsxs(
|
|
28
|
+
"span",
|
|
29
|
+
{
|
|
30
|
+
className: `font-serif text-4xl font-bold whitespace-nowrap md:text-6xl ${textClass}`,
|
|
31
|
+
children: [
|
|
32
|
+
item,
|
|
33
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground/30 mx-4", children: "•" })
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
i
|
|
37
|
+
))
|
|
38
|
+
}
|
|
39
|
+
) })
|
|
33
40
|
}
|
|
34
|
-
)
|
|
41
|
+
);
|
|
35
42
|
};
|
|
36
43
|
export {
|
|
37
44
|
Marquee
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
type BannerVariant = "announcement-banner-1" | "marquee-1";
|
|
2
|
+
type BannerPadding = {
|
|
3
|
+
top?: "none" | "small" | "medium" | "large";
|
|
4
|
+
bottom?: "none" | "small" | "medium" | "large";
|
|
5
|
+
};
|
|
6
|
+
type BannerSectionStyle = "default" | "dark" | "muted" | "inverted" | "custom";
|
|
7
|
+
type BannerSectionProps = {
|
|
8
|
+
variant?: BannerVariant;
|
|
9
|
+
items?: string[];
|
|
10
|
+
linkLabel?: string;
|
|
11
|
+
linkUrl?: string;
|
|
12
|
+
styles?: {
|
|
13
|
+
padding?: BannerPadding;
|
|
14
|
+
sectionStyle?: BannerSectionStyle;
|
|
15
|
+
backgroundColor?: string;
|
|
16
|
+
textColor?: string;
|
|
17
|
+
align?: "left" | "center" | "right";
|
|
18
|
+
size?: "small" | "default";
|
|
19
|
+
speed?: "slow" | "normal" | "fast";
|
|
20
|
+
tone?: "default" | "outline" | "muted";
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 联系表单线索:POST 到 `{domain}/api/form-leads`,与站点后端约定一致。
|
|
3
|
+
*/
|
|
4
|
+
export interface SubmitFormLeadBody {
|
|
5
|
+
site_id?: string | null;
|
|
6
|
+
name: string;
|
|
7
|
+
email: string;
|
|
8
|
+
phone: string;
|
|
9
|
+
message: string;
|
|
10
|
+
/** 当前页路径,用于归因 */
|
|
11
|
+
source_page: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 提交表单线索。成功 resolve;HTTP 非 2xx 或业务 success !== true 时 throw Error(message 为 errMsg 或 HTTP 状态)。
|
|
15
|
+
*/
|
|
16
|
+
export declare function submitFormLead(domain: string | undefined | null, body: SubmitFormLeadBody): Promise<void>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
function normalizeBaseUrl(domain) {
|
|
2
|
+
return (domain ?? "").replace(/\/$/, "");
|
|
3
|
+
}
|
|
4
|
+
async function submitFormLead(domain, body) {
|
|
5
|
+
const baseUrl = normalizeBaseUrl(domain);
|
|
6
|
+
const res = await fetch(`${baseUrl}/api/form-leads`, {
|
|
7
|
+
method: "POST",
|
|
8
|
+
headers: { "Content-Type": "application/json" },
|
|
9
|
+
body: JSON.stringify({
|
|
10
|
+
site_id: body.site_id,
|
|
11
|
+
name: body.name || "",
|
|
12
|
+
email: body.email || "",
|
|
13
|
+
phone: body.phone || "",
|
|
14
|
+
message: body.message || "",
|
|
15
|
+
source_page: body.source_page
|
|
16
|
+
})
|
|
17
|
+
});
|
|
18
|
+
const data = await res.json().catch(() => null);
|
|
19
|
+
if (!res.ok || !(data == null ? void 0 : data.success)) {
|
|
20
|
+
throw new Error((data == null ? void 0 : data.errMsg) || `HTTP ${res.status}`);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
submitFormLead
|
|
25
|
+
};
|
|
@@ -21,9 +21,18 @@ export interface ContactForm {
|
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
export interface ContactUsProps extends CompoundContentProps {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
fields?: ContactFormField[];
|
|
25
|
+
action?: string;
|
|
26
|
+
method?: "get" | "post" | "dialog";
|
|
27
|
+
formTitle?: string;
|
|
28
|
+
submitLabel?: string;
|
|
29
|
+
submitVariant?: string;
|
|
30
|
+
submitSize?: string;
|
|
31
|
+
submitIcon?: string;
|
|
32
|
+
styles?: {
|
|
33
|
+
padding?: CompoundContainerProps["padding"];
|
|
34
|
+
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
35
|
+
backgroundColor?: string;
|
|
36
|
+
};
|
|
28
37
|
}
|
|
29
38
|
export declare const ContactUs: (props: ContactUsProps) => import("react/jsx-runtime").JSX.Element;
|