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
|
@@ -7,18 +7,18 @@ const MAX_WIDTH_MAP = {
|
|
|
7
7
|
full: "max-w-none"
|
|
8
8
|
};
|
|
9
9
|
const RichText = ({
|
|
10
|
-
padding,
|
|
11
|
-
sectionStyle,
|
|
12
|
-
backgroundColor,
|
|
13
10
|
content = "",
|
|
14
|
-
|
|
15
|
-
}) =>
|
|
16
|
-
"
|
|
17
|
-
{
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
11
|
+
styles
|
|
12
|
+
}) => {
|
|
13
|
+
const maxWidth = (styles == null ? void 0 : styles.maxWidth) ?? "md";
|
|
14
|
+
return /* @__PURE__ */ jsx(CompoundContainer, { padding: styles == null ? void 0 : styles.padding, sectionStyle: styles == null ? void 0 : styles.sectionStyle, backgroundColor: styles == null ? void 0 : styles.backgroundColor, children: /* @__PURE__ */ jsx(
|
|
15
|
+
"div",
|
|
16
|
+
{
|
|
17
|
+
className: `${MAX_WIDTH_MAP[maxWidth]} prose prose-neutral dark:prose-invert mx-auto`,
|
|
18
|
+
dangerouslySetInnerHTML: { __html: content }
|
|
19
|
+
}
|
|
20
|
+
) });
|
|
21
|
+
};
|
|
22
22
|
export {
|
|
23
23
|
RichText
|
|
24
24
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { image16x9Placeholder, image } from "../../../puck-base/core/fields.js";
|
|
2
2
|
import { TabSection } from "./tab-section.js";
|
|
3
|
+
import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
|
|
3
4
|
const conf = {
|
|
4
5
|
fields: {
|
|
5
6
|
heading: { type: "text", contentEditable: true },
|
|
@@ -19,9 +20,7 @@ const conf = {
|
|
|
19
20
|
image: image16x9Placeholder
|
|
20
21
|
}
|
|
21
22
|
},
|
|
22
|
-
|
|
23
|
-
sectionStyle,
|
|
24
|
-
backgroundColor
|
|
23
|
+
styles: createStylesField()
|
|
25
24
|
},
|
|
26
25
|
defaultProps: {
|
|
27
26
|
heading: "How it works",
|
|
@@ -43,7 +42,7 @@ const conf = {
|
|
|
43
42
|
image: image16x9Placeholder
|
|
44
43
|
}
|
|
45
44
|
],
|
|
46
|
-
|
|
45
|
+
styles: createStylesDefaults()
|
|
47
46
|
},
|
|
48
47
|
render: TabSection
|
|
49
48
|
};
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { CompoundContainerProps } from "@/components/puck-base/container";
|
|
2
2
|
export interface TabSectionProps {
|
|
3
|
-
padding?: CompoundContainerProps["padding"];
|
|
4
|
-
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
5
|
-
backgroundColor?: string;
|
|
6
3
|
heading?: string;
|
|
7
4
|
description?: string;
|
|
8
5
|
tabs?: Array<{
|
|
@@ -13,5 +10,10 @@ export interface TabSectionProps {
|
|
|
13
10
|
alt: string;
|
|
14
11
|
};
|
|
15
12
|
}>;
|
|
13
|
+
styles?: {
|
|
14
|
+
padding?: CompoundContainerProps["padding"];
|
|
15
|
+
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
16
|
+
backgroundColor?: string;
|
|
17
|
+
};
|
|
16
18
|
}
|
|
17
|
-
export declare const TabSection: ({
|
|
19
|
+
export declare const TabSection: ({ heading, description, tabs, styles, }: TabSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,16 +5,14 @@ import { cn } from "../../../../utils/css-utils.js";
|
|
|
5
5
|
import { CompoundContainer } from "../../../puck-base/container.js";
|
|
6
6
|
import { CompoundImage } from "../../../puck-base/image.js";
|
|
7
7
|
const TabSection = ({
|
|
8
|
-
padding,
|
|
9
|
-
sectionStyle,
|
|
10
|
-
backgroundColor,
|
|
11
8
|
heading,
|
|
12
9
|
description,
|
|
13
|
-
tabs = []
|
|
10
|
+
tabs = [],
|
|
11
|
+
styles
|
|
14
12
|
}) => {
|
|
15
13
|
var _a, _b, _c, _d;
|
|
16
14
|
const [active, setActive] = useState(0);
|
|
17
|
-
return /* @__PURE__ */ jsxs(CompoundContainer, { padding, sectionStyle, backgroundColor, children: [
|
|
15
|
+
return /* @__PURE__ */ jsxs(CompoundContainer, { padding: styles == null ? void 0 : styles.padding, sectionStyle: styles == null ? void 0 : styles.sectionStyle, backgroundColor: styles == null ? void 0 : styles.backgroundColor, children: [
|
|
18
16
|
/* @__PURE__ */ jsxs("div", { className: "mb-12 max-w-2xl", children: [
|
|
19
17
|
heading && /* @__PURE__ */ jsx("h2", { className: "text-foreground text-3xl font-bold tracking-tight md:text-4xl", children: heading }),
|
|
20
18
|
description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mt-4 text-lg", children: description })
|
|
@@ -23,12 +21,16 @@ const TabSection = ({
|
|
|
23
21
|
/* @__PURE__ */ jsx("div", { className: "border-border mb-8 flex gap-1 border-b", children: tabs.map((tab, i) => /* @__PURE__ */ jsx(
|
|
24
22
|
"button",
|
|
25
23
|
{
|
|
26
|
-
onClick: () =>
|
|
24
|
+
onClick: (e) => {
|
|
25
|
+
e.stopPropagation();
|
|
26
|
+
setActive(i);
|
|
27
|
+
},
|
|
28
|
+
style: { pointerEvents: "auto" },
|
|
27
29
|
className: cn(
|
|
28
|
-
"-mb-px border-b-2 px-4 py-2 text-sm font-medium transition-colors",
|
|
30
|
+
"-mb-px border-b-2 px-4 py-2 text-sm font-medium transition-colors cursor-pointer",
|
|
29
31
|
active === i ? "border-primary text-foreground" : "text-muted-foreground hover:text-foreground border-transparent"
|
|
30
32
|
),
|
|
31
|
-
children: tab.label
|
|
33
|
+
children: /* @__PURE__ */ jsx("span", { style: { pointerEvents: "none" }, children: tab.label })
|
|
32
34
|
},
|
|
33
35
|
i
|
|
34
36
|
)) }),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { paddingDefaults, backgroundColor, sectionStyle, padding } from "../../../puck-base/core/fields.js";
|
|
2
1
|
import { Timeline } from "./timeline.js";
|
|
2
|
+
import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
|
|
3
3
|
const conf = {
|
|
4
4
|
fields: {
|
|
5
5
|
heading: { type: "text", contentEditable: true },
|
|
@@ -19,9 +19,7 @@ const conf = {
|
|
|
19
19
|
date: "2026"
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
|
-
|
|
23
|
-
sectionStyle,
|
|
24
|
-
backgroundColor
|
|
22
|
+
styles: createStylesField()
|
|
25
23
|
},
|
|
26
24
|
defaultProps: {
|
|
27
25
|
heading: "Our Journey",
|
|
@@ -43,7 +41,7 @@ const conf = {
|
|
|
43
41
|
date: "2023"
|
|
44
42
|
}
|
|
45
43
|
],
|
|
46
|
-
|
|
44
|
+
styles: createStylesDefaults()
|
|
47
45
|
},
|
|
48
46
|
render: Timeline
|
|
49
47
|
};
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { CompoundContainerProps } from "@/components/puck-base/container";
|
|
2
2
|
export interface TimelineProps {
|
|
3
|
-
padding?: CompoundContainerProps["padding"];
|
|
4
|
-
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
5
|
-
backgroundColor?: string;
|
|
6
3
|
heading?: string;
|
|
7
4
|
description?: string;
|
|
8
5
|
items?: Array<{
|
|
@@ -10,5 +7,10 @@ export interface TimelineProps {
|
|
|
10
7
|
description: string;
|
|
11
8
|
date?: string;
|
|
12
9
|
}>;
|
|
10
|
+
styles?: {
|
|
11
|
+
padding?: CompoundContainerProps["padding"];
|
|
12
|
+
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
13
|
+
backgroundColor?: string;
|
|
14
|
+
};
|
|
13
15
|
}
|
|
14
|
-
export declare const Timeline: ({
|
|
16
|
+
export declare const Timeline: ({ heading, description, items, styles, }: TimelineProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { CompoundContainer } from "../../../puck-base/container.js";
|
|
3
3
|
const Timeline = ({
|
|
4
|
-
padding,
|
|
5
|
-
sectionStyle,
|
|
6
|
-
backgroundColor,
|
|
7
4
|
heading,
|
|
8
5
|
description,
|
|
9
|
-
items = []
|
|
10
|
-
|
|
6
|
+
items = [],
|
|
7
|
+
styles
|
|
8
|
+
}) => /* @__PURE__ */ jsxs(CompoundContainer, { padding: styles == null ? void 0 : styles.padding, sectionStyle: styles == null ? void 0 : styles.sectionStyle, backgroundColor: styles == null ? void 0 : styles.backgroundColor, children: [
|
|
11
9
|
/* @__PURE__ */ jsxs("div", { className: "mb-12 max-w-2xl", children: [
|
|
12
10
|
heading && /* @__PURE__ */ jsx("h2", { className: "text-foreground text-3xl font-bold tracking-tight md:text-4xl", children: heading }),
|
|
13
11
|
description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mt-4 text-lg", children: description })
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { images, contentFieldsWithFeatures, getPlaceholderImageUrl } from "../../../puck-base/core/fields.js";
|
|
2
2
|
import { TwoColumn } from "./two-column.js";
|
|
3
|
+
import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
|
|
3
4
|
const conf = {
|
|
4
5
|
fields: {
|
|
5
6
|
...contentFieldsWithFeatures,
|
|
@@ -28,7 +29,6 @@ const conf = {
|
|
|
28
29
|
}
|
|
29
30
|
},
|
|
30
31
|
border: {
|
|
31
|
-
// TODO: would be good to have boolean values
|
|
32
32
|
type: "radio",
|
|
33
33
|
options: [
|
|
34
34
|
{ label: "yes", value: "true" },
|
|
@@ -48,9 +48,7 @@ const conf = {
|
|
|
48
48
|
}
|
|
49
49
|
]
|
|
50
50
|
},
|
|
51
|
-
|
|
52
|
-
sectionStyle,
|
|
53
|
-
backgroundColor
|
|
51
|
+
styles: createStylesField()
|
|
54
52
|
},
|
|
55
53
|
defaultProps: {
|
|
56
54
|
heading: "This is the start of something new",
|
|
@@ -81,7 +79,7 @@ const conf = {
|
|
|
81
79
|
}
|
|
82
80
|
],
|
|
83
81
|
layout: "text-start",
|
|
84
|
-
|
|
82
|
+
styles: createStylesDefaults()
|
|
85
83
|
},
|
|
86
84
|
render: TwoColumn
|
|
87
85
|
};
|
|
@@ -5,12 +5,14 @@ type ImageWithAspectRatio = CompoundImageProps & {
|
|
|
5
5
|
aspectRatio?: "16x9" | "1x1";
|
|
6
6
|
};
|
|
7
7
|
export interface TwoColumnProps extends CompoundContentProps {
|
|
8
|
-
padding?: CompoundContainerProps["padding"];
|
|
9
|
-
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
10
|
-
backgroundColor?: string;
|
|
11
8
|
layout?: "text-start" | "text-end";
|
|
12
9
|
images?: ImageWithAspectRatio[];
|
|
13
10
|
border?: "true" | "false";
|
|
11
|
+
styles?: {
|
|
12
|
+
padding?: CompoundContainerProps["padding"];
|
|
13
|
+
sectionStyle?: CompoundContainerProps["sectionStyle"];
|
|
14
|
+
backgroundColor?: string;
|
|
15
|
+
};
|
|
14
16
|
}
|
|
15
|
-
export declare const TwoColumn: ({
|
|
17
|
+
export declare const TwoColumn: ({ layout, border, badge, heading, description, features, buttons, images, styles, }: TwoColumnProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
18
|
export {};
|
|
@@ -6,9 +6,6 @@ import { CompoundContainer } from "../../../puck-base/container.js";
|
|
|
6
6
|
import { CompoundContent } from "../../../puck-base/content.js";
|
|
7
7
|
import { CompoundImage } from "../../../puck-base/image.js";
|
|
8
8
|
const TwoColumn = ({
|
|
9
|
-
padding,
|
|
10
|
-
sectionStyle,
|
|
11
|
-
backgroundColor,
|
|
12
9
|
layout,
|
|
13
10
|
border = "false",
|
|
14
11
|
badge,
|
|
@@ -16,16 +13,17 @@ const TwoColumn = ({
|
|
|
16
13
|
description,
|
|
17
14
|
features,
|
|
18
15
|
buttons,
|
|
19
|
-
images
|
|
16
|
+
images,
|
|
17
|
+
styles
|
|
20
18
|
}) => {
|
|
21
19
|
const hasSingleImage = Array.isArray(images) && images.length === 1;
|
|
22
20
|
const hasMultipleImages = Array.isArray(images) && images.length > 1;
|
|
23
21
|
return /* @__PURE__ */ jsx(
|
|
24
22
|
CompoundContainer,
|
|
25
23
|
{
|
|
26
|
-
padding,
|
|
27
|
-
sectionStyle,
|
|
28
|
-
backgroundColor,
|
|
24
|
+
padding: styles == null ? void 0 : styles.padding,
|
|
25
|
+
sectionStyle: styles == null ? void 0 : styles.sectionStyle,
|
|
26
|
+
backgroundColor: styles == null ? void 0 : styles.backgroundColor,
|
|
29
27
|
children: /* @__PURE__ */ jsxs(
|
|
30
28
|
"div",
|
|
31
29
|
{
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useState, useCallback } from "react";
|
|
3
2
|
import { NavigationMenu as NavigationMenu$1 } from "@base-ui/react/navigation-menu";
|
|
4
3
|
import { cva } from "class-variance-authority";
|
|
5
4
|
import { cn } from "../../utils/css-utils.js";
|
|
6
5
|
import { ChevronDownIcon } from "lucide-react";
|
|
7
|
-
import { useEditorContext } from "../puck-base/editor-context.js";
|
|
8
6
|
function NavigationMenu({
|
|
9
7
|
align = "start",
|
|
10
8
|
className,
|
|
@@ -12,34 +10,6 @@ function NavigationMenu({
|
|
|
12
10
|
onValueChange,
|
|
13
11
|
...props
|
|
14
12
|
}) {
|
|
15
|
-
const { isEditor } = useEditorContext();
|
|
16
|
-
const [value, setValue] = useState(props.defaultValue ?? null);
|
|
17
|
-
const handleValueChange = useCallback(
|
|
18
|
-
(newValue, details) => {
|
|
19
|
-
if (newValue === null && details.reason === "focus-out") return;
|
|
20
|
-
setValue(newValue);
|
|
21
|
-
onValueChange == null ? void 0 : onValueChange(newValue, details);
|
|
22
|
-
},
|
|
23
|
-
[onValueChange]
|
|
24
|
-
);
|
|
25
|
-
if (!isEditor) {
|
|
26
|
-
return /* @__PURE__ */ jsxs(
|
|
27
|
-
NavigationMenu$1.Root,
|
|
28
|
-
{
|
|
29
|
-
"data-slot": "navigation-menu",
|
|
30
|
-
className: cn(
|
|
31
|
-
"group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",
|
|
32
|
-
className
|
|
33
|
-
),
|
|
34
|
-
onValueChange,
|
|
35
|
-
...props,
|
|
36
|
-
children: [
|
|
37
|
-
children,
|
|
38
|
-
/* @__PURE__ */ jsx(NavigationMenuPositioner, { align })
|
|
39
|
-
]
|
|
40
|
-
}
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
13
|
return /* @__PURE__ */ jsxs(
|
|
44
14
|
NavigationMenu$1.Root,
|
|
45
15
|
{
|
|
@@ -48,8 +18,7 @@ function NavigationMenu({
|
|
|
48
18
|
"group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",
|
|
49
19
|
className
|
|
50
20
|
),
|
|
51
|
-
|
|
52
|
-
onValueChange: handleValueChange,
|
|
21
|
+
onValueChange,
|
|
53
22
|
...props,
|
|
54
23
|
children: [
|
|
55
24
|
children,
|
|
@@ -104,7 +73,13 @@ function NavigationMenuTrigger({
|
|
|
104
73
|
children: [
|
|
105
74
|
children,
|
|
106
75
|
" ",
|
|
107
|
-
/* @__PURE__ */ jsx(
|
|
76
|
+
/* @__PURE__ */ jsx(
|
|
77
|
+
ChevronDownIcon,
|
|
78
|
+
{
|
|
79
|
+
className: "relative top-px ml-1 size-3 transition duration-300 group-data-popup-open/navigation-menu-trigger:rotate-180 group-data-open/navigation-menu-trigger:rotate-180",
|
|
80
|
+
"aria-hidden": "true"
|
|
81
|
+
}
|
|
82
|
+
)
|
|
108
83
|
]
|
|
109
84
|
}
|
|
110
85
|
);
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { default as default4 } from "./components/shadcn/badge-promo.js";
|
|
|
4
4
|
import { default as default5 } from "./components/puck-base/use-upload.js";
|
|
5
5
|
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "./components/shadcn/accordion.js";
|
|
6
6
|
import { conf } from "./components/puck-block/faq-sections/accordion-1/index.js";
|
|
7
|
-
import { ActionField } from "./components/puck-base/action-field.js";
|
|
7
|
+
import { ActionField } from "./components/puck-base/fields/action-field.js";
|
|
8
8
|
import { Alert, AlertAction, AlertDescription, AlertTitle } from "./components/shadcn/alert.js";
|
|
9
9
|
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger } from "./components/shadcn/alert-dialog.js";
|
|
10
10
|
import { AnimatedThemeToggler } from "./components/shadcn/animated-theme-toggler.js";
|
|
@@ -138,7 +138,8 @@ import { TweetCard, truncate } from "./components/shadcn/tweet-card.js";
|
|
|
138
138
|
import { TweetCardClient } from "./components/shadcn/tweet-card-client.js";
|
|
139
139
|
import { conf as conf55 } from "./components/puck-block/text-sections/two-column-1/index.js";
|
|
140
140
|
import { conf as conf56 } from "./components/puck-block/hero-sections/video-hero-1/index.js";
|
|
141
|
-
import { action, actionDefaults,
|
|
141
|
+
import { action, actionDefaults, badge, button, buttons, card, cards, contentFields, contentFieldsWithFeatures, description, features, field, fieldDefaults, form, formDefaults, getPlaceholderImageUrl, heading, icon, image, image16x9Placeholder, image1x1Placeholder, image9x16Placeholder, images } from "./components/puck-base/core/fields.js";
|
|
142
|
+
import { backgroundColor, backgroundImage, padding, paddingDefaults, paddingLevel, sectionOverlay, sectionStyle } from "./components/puck-base/core/styles.js";
|
|
142
143
|
import { base64ToFile, base64ToUrl, blobToBase64, blobToUrl, convertBase64ToBlob, structureFile } from "./utils/utils-canvas.js";
|
|
143
144
|
import { cn, liquidGlass } from "./utils/css-utils.js";
|
|
144
145
|
import { downloadImage, downloadImageClient, fetchHasOnlineFile, getBase64Client, isValidFileSize, isValidFileType } from "./utils/utils-image.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dune-react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"gen:meta": "node --import ./scripts/register-mocks.mjs --import tsx/esm scripts/generate-component-meta.ts",
|
|
9
9
|
"build": "pnpm gen:meta && vite build && tsc --project tsconfig.build.json",
|
|
10
10
|
"watch": "vite build --watch & tsc --project tsconfig.build.json --watch --preserveWatchOutput &",
|
|
11
|
-
"build:sync": "pnpm build && cd
|
|
11
|
+
"build:sync": "pnpm build && cd ../magent && pnpm sync:dune && cd ../canvas-editor && pnpm sync:dune",
|
|
12
12
|
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
13
13
|
"preview": "vite preview",
|
|
14
14
|
"storybook": "storybook dev -p 8080",
|