dune-react 0.0.21 → 0.0.23
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/index.d.ts +1 -0
- package/dist/components/puck-base/button.d.ts +1 -1
- package/dist/components/puck-base/button.js +5 -6
- package/dist/components/puck-base/card.d.ts +1 -1
- package/dist/components/puck-base/container.js +1 -1
- package/dist/components/puck-base/content.d.ts +1 -1
- package/dist/components/puck-base/image.js +16 -16
- package/dist/components/puck-base/index.d.ts +1 -13
- package/dist/components/puck-block/banner-sections/css-marquee-banner/css-marquee-banner.js +13 -13
- package/dist/components/puck-block/banner-sections/dismissible-banner/index.d.ts +3 -25
- package/dist/components/puck-block/banner-sections/dual-row-marquee/dual-row-marquee.js +8 -8
- package/dist/components/puck-block/banner-sections/scroll-driven-marquee/scroll-driven-marquee.js +8 -6
- package/dist/components/puck-block/banner-sections/scroll-parallax-text/scroll-parallax-text.js +3 -1
- package/dist/components/puck-block/contact-sections/centered-form/index.d.ts +1 -1
- package/dist/components/puck-block/contact-sections/contact-cards-grid/contact-cards-grid.js +1 -1
- package/dist/components/puck-block/contact-sections/contact-modal/contact-modal.js +1 -1
- package/dist/components/puck-block/contact-sections/contact-modal/index.d.ts +1 -1
- package/dist/components/puck-block/contact-sections/form-with-media/form-with-media.js +1 -1
- package/dist/components/puck-block/contact-sections/form-with-media/index.d.ts +1 -1
- package/dist/components/puck-block/contact-sections/header-form-cards/header-form-cards.js +1 -1
- package/dist/components/puck-block/contact-sections/header-form-cards/index.d.ts +1 -1
- package/dist/components/puck-block/contact-sections/header-info-fullwidth/header-info-fullwidth.js +2 -2
- package/dist/components/puck-block/contact-sections/info-cards-media/info-cards-media.js +2 -2
- package/dist/components/puck-block/contact-sections/location-cards-grid/index.d.ts +1 -1
- package/dist/components/puck-block/contact-sections/split-info-form/index.d.ts +1 -1
- package/dist/components/puck-block/contact-sections/split-info-form/split-info-form.js +1 -1
- package/dist/components/puck-block/cta-sections/feature-card-cta/index.d.ts +1 -1
- package/dist/components/puck-block/cta-sections/index.d.ts +2 -0
- package/dist/components/puck-block/cta-sections/mouse-track-cta/index.d.ts +1 -1
- package/dist/components/puck-block/cta-sections/mouse-track-cta/mouse-track-cta.js +92 -63
- package/dist/components/puck-block/cta-sections/props.js +46 -0
- package/dist/components/puck-block/cta-sections/side-media-cta/index.d.ts +1 -73
- package/dist/components/puck-block/cta-sections/side-media-cta/index.js +35 -0
- package/dist/components/puck-block/cta-sections/side-media-cta/side-media-cta.js +84 -0
- package/dist/components/puck-block/cta-sections/text-block-cta/index.d.ts +2 -74
- package/dist/components/puck-block/cta-sections/text-block-cta/index.js +38 -0
- package/dist/components/puck-block/cta-sections/text-block-cta/text-block-cta.d.ts +1 -1
- package/dist/components/puck-block/cta-sections/text-block-cta/text-block-cta.js +165 -0
- package/dist/components/puck-block/faq-sections/dual-column-accordion-faq/index.d.ts +1 -1
- package/dist/components/puck-block/faq-sections/icon-card-faq/index.d.ts +1 -1
- package/dist/components/puck-block/faq-sections/stacked-accordion-faq/index.d.ts +1 -1
- package/dist/components/puck-block/faq-sections/stacked-static-faq/index.d.ts +1 -1
- package/dist/components/puck-block/faq-sections/two-column-accordion-faq/index.d.ts +1 -1
- package/dist/components/puck-block/faq-sections/two-column-static-faq/index.d.ts +1 -1
- package/dist/components/puck-block/feature-sections/feature-cards-grid/component.js +1 -1
- package/dist/components/puck-block/feature-sections/feature-cards-grid/index.d.ts +2 -2
- package/dist/components/puck-block/feature-sections/feature-list-split/component.js +1 -1
- package/dist/components/puck-block/feature-sections/feature-list-split/index.d.ts +2 -2
- package/dist/components/puck-block/feature-sections/tab-feature/component.js +80 -64
- package/dist/components/puck-block/feature-sections/text-media-split/component.js +1 -1
- package/dist/components/puck-block/feature-sections/text-media-split/index.d.ts +1 -1
- package/dist/components/puck-block/feature-sections/text-only-section/index.d.ts +1 -1
- package/dist/components/puck-block/footer-sections/centered-minimal-footer/centered-minimal-footer.js +72 -18
- package/dist/components/puck-block/footer-sections/centered-minimal-footer/index.d.ts +79 -0
- package/dist/components/puck-block/footer-sections/centered-minimal-footer/index.js +43 -1
- package/dist/components/puck-block/footer-sections/compact-newsletter-footer/index.d.ts +42 -1
- package/dist/components/puck-block/footer-sections/contact-links-footer/contact-links-footer.js +4 -3
- package/dist/components/puck-block/footer-sections/contact-links-footer/index.d.ts +86 -0
- package/dist/components/puck-block/footer-sections/contact-links-footer/index.js +1 -1
- package/dist/components/puck-block/footer-sections/cta-links-footer/cta-links-footer.js +3 -2
- package/dist/components/puck-block/footer-sections/cta-links-footer/index.d.ts +38 -1
- package/dist/components/puck-block/footer-sections/cta-links-footer/index.js +1 -1
- package/dist/components/puck-block/footer-sections/links-newsletter-footer/index.d.ts +55 -1
- package/dist/components/puck-block/footer-sections/newsletter-links-footer/index.d.ts +42 -1
- package/dist/components/puck-block/footer-sections/newsletter-top-links-footer/index.d.ts +55 -1
- package/dist/components/puck-block/footer-sections/props.d.ts +3 -0
- package/dist/components/puck-block/gallery-sections/fullscreen-portfolio/fullscreen-portfolio.js +1 -1
- package/dist/components/puck-block/gallery-sections/fullscreen-portfolio/index.d.ts +25 -28
- package/dist/components/puck-block/gallery-sections/fullscreen-portfolio/index.js +3 -2
- package/dist/components/puck-block/gallery-sections/interactive-portfolio/interactive-portfolio.js +1 -1
- package/dist/components/puck-block/gallery-sections/portfolio-cards/index.d.ts +2 -2
- package/dist/components/puck-block/gallery-sections/portfolio-cards/portfolio-cards.js +1 -1
- package/dist/components/puck-block/gallery-sections/portfolio-divider/index.d.ts +2 -2
- package/dist/components/puck-block/gallery-sections/portfolio-divider/portfolio-divider.js +68 -65
- package/dist/components/puck-block/gallery-sections/props.d.ts +11 -1
- package/dist/components/puck-block/gallery-sections/props.js +7 -2
- package/dist/components/puck-block/gallery-sections/scroll-parallax/scroll-parallax.js +18 -0
- package/dist/components/puck-block/gallery-sections/scroll-parallax-portfolio/index.d.ts +24 -27
- package/dist/components/puck-block/gallery-sections/scroll-parallax-portfolio/index.js +3 -2
- package/dist/components/puck-block/gallery-sections/scroll-parallax-portfolio/scroll-parallax-portfolio.js +25 -22
- package/dist/components/puck-block/gallery-sections/split-carousel/index.d.ts +11 -1
- package/dist/components/puck-block/header-sections/centered-navbar/centered-navbar.js +3 -2
- package/dist/components/puck-block/header-sections/centered-navbar/index.d.ts +1 -1
- package/dist/components/puck-block/header-sections/drawer-navbar/drawer-navbar.js +119 -17
- package/dist/components/puck-block/header-sections/drawer-navbar/index.d.ts +1 -1
- package/dist/components/puck-block/header-sections/floating-bordered-navbar/floating-bordered-navbar.js +162 -22
- package/dist/components/puck-block/header-sections/floating-bordered-navbar/index.d.ts +1 -1
- package/dist/components/puck-block/header-sections/fullscreen-overlay-navbar/fullscreen-overlay-navbar.js +143 -19
- package/dist/components/puck-block/header-sections/fullscreen-overlay-navbar/index.d.ts +1 -1
- package/dist/components/puck-block/header-sections/mega-menu-navbar/index.d.ts +1 -1
- package/dist/components/puck-block/header-sections/mega-menu-navbar/mega-menu-navbar.js +3 -2
- package/dist/components/puck-block/header-sections/props.d.ts +3 -0
- package/dist/components/puck-block/header-sections/standard-navbar/index.d.ts +1 -1
- package/dist/components/puck-block/header-sections/standard-navbar/standard-navbar.js +3 -2
- package/dist/components/puck-block/hero-sections/carousel-hero/component.js +50 -9
- package/dist/components/puck-block/hero-sections/carousel-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/centered-hero/index.d.ts +2 -2
- package/dist/components/puck-block/hero-sections/column-scroll-hero/component.js +8 -8
- package/dist/components/puck-block/hero-sections/column-scroll-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/dual-marquee-hero/component.js +6 -6
- package/dist/components/puck-block/hero-sections/dual-marquee-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/fullscreen-hero/index.d.ts +2 -2
- package/dist/components/puck-block/hero-sections/fullscreen-video-hero/component.js +5 -3
- package/dist/components/puck-block/hero-sections/fullscreen-video-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/grid-expand-hero/component.js +26 -17
- package/dist/components/puck-block/hero-sections/grid-expand-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/horizontal-marquee-hero/component.js +3 -3
- package/dist/components/puck-block/hero-sections/horizontal-marquee-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/inline-image-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/media-text-hero/index.d.ts +26 -29
- package/dist/components/puck-block/hero-sections/mouse-track-hero/component.js +60 -19
- package/dist/components/puck-block/hero-sections/mouse-track-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/multi-image-grid-hero/index.d.ts +25 -28
- package/dist/components/puck-block/hero-sections/multi-image-grid-hero/index.js +3 -2
- package/dist/components/puck-block/hero-sections/multi-image-grid-hero/multi-image-grid-hero.js +2 -2
- package/dist/components/puck-block/hero-sections/overlapping-image-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/overlapping-image-hero/overlapping-image-hero.js +3 -3
- package/dist/components/puck-block/hero-sections/parallax-images-hero/component.js +18 -6
- package/dist/components/puck-block/hero-sections/parallax-images-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/scatter-parallax-hero/component.js +9 -7
- package/dist/components/puck-block/hero-sections/scatter-parallax-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/scroll-expand-video-hero/component.js +7 -5
- package/dist/components/puck-block/hero-sections/scroll-expand-video-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/scroll-zoom-hero/component.js +93 -44
- package/dist/components/puck-block/hero-sections/scroll-zoom-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/split-hero/index.d.ts +2 -2
- package/dist/components/puck-block/hero-sections/stacked-hero/index.d.ts +2 -2
- package/dist/components/puck-block/hero-sections/sticky-expand-hero/component.js +1 -1
- package/dist/components/puck-block/hero-sections/sticky-expand-hero/index.d.ts +14 -6
- package/dist/components/puck-block/hero-sections/sticky-expand-hero/index.js +2 -2
- package/dist/components/puck-block/hero-sections/sticky-video-hero/component.js +2 -2
- package/dist/components/puck-block/hero-sections/sticky-video-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/tab-hero/component.js +4 -4
- package/dist/components/puck-block/hero-sections/tab-hero/index.d.ts +28 -44
- package/dist/components/puck-block/hero-sections/tab-hero/index.js +7 -2
- package/dist/components/puck-block/hero-sections/three-image-parallax-hero/component.js +96 -46
- package/dist/components/puck-block/hero-sections/three-image-parallax-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/vertical-gallery-hero/component.js +33 -10
- package/dist/components/puck-block/hero-sections/vertical-gallery-hero/index.d.ts +1 -1
- package/dist/components/puck-block/hero-sections/zoom-grid-hero/component.js +14 -12
- package/dist/components/puck-block/hero-sections/zoom-grid-hero/index.d.ts +1 -1
- package/dist/components/puck-block/index.d.ts +2 -0
- package/dist/components/puck-block/location-sections/location-1/location.d.ts +1 -1
- package/dist/components/puck-block/location-sections/location-2/location.d.ts +1 -1
- package/dist/components/puck-block/location-sections/location-3/location.d.ts +2 -2
- package/dist/components/puck-block/location-sections/props.d.ts +1 -1
- package/dist/components/puck-block/metrics-sections/center-media-stats/center-media-stats.js +1 -1
- package/dist/components/puck-block/metrics-sections/header-stats-row/header-stats-row.js +1 -1
- package/dist/components/puck-block/metrics-sections/header-stats-row/index.d.ts +1 -1
- package/dist/components/puck-block/metrics-sections/mixed-grid-stats/index.d.ts +1 -1
- package/dist/components/puck-block/metrics-sections/mixed-grid-stats/mixed-grid-stats.js +2 -2
- package/dist/components/puck-block/metrics-sections/split-stats/index.d.ts +1 -1
- package/dist/components/puck-block/metrics-sections/split-stats/split-stats.js +1 -1
- package/dist/components/puck-block/metrics-sections/tab-stats/index.d.ts +0 -22
- package/dist/components/puck-block/metrics-sections/tab-stats/index.js +1 -1
- package/dist/components/puck-block/metrics-sections/tab-stats/tab-stats.js +39 -26
- package/dist/components/puck-block/pricing-sections/pricing-comparison-table/index.d.ts +47 -0
- package/dist/components/puck-block/pricing-sections/pricing-comparison-table/index.js +34 -0
- package/dist/components/puck-block/pricing-sections/single-pricing-card/index.d.ts +0 -22
- package/dist/components/puck-block/pricing-sections/single-pricing-card/index.js +1 -1
- package/dist/components/puck-block/pricing-sections/split-pricing/component.js +3 -3
- package/dist/components/puck-block/pricing-sections/split-pricing/index.d.ts +28 -22
- package/dist/components/puck-block/pricing-sections/split-pricing/index.js +8 -1
- package/dist/components/puck-block/registry.generated.d.ts +13408 -0
- package/dist/components/puck-block/registry.generated.js +558 -0
- package/dist/components/puck-block/showcase-sections/compact-timeline/index.d.ts +1 -1
- package/dist/components/puck-block/showcase-sections/horizontal-timeline/index.d.ts +1 -1
- package/dist/components/puck-block/showcase-sections/single-column-timeline/index.d.ts +2 -2
- package/dist/components/puck-block/showcase-sections/sticky-scroll-timeline/index.d.ts +2 -2
- package/dist/components/puck-block/showcase-sections/tab-timeline/component.js +1 -1
- package/dist/components/puck-block/showcase-sections/tab-timeline/index.d.ts +1 -23
- package/dist/components/puck-block/showcase-sections/tab-timeline/index.js +1 -1
- package/dist/components/puck-block/showcase-sections/zigzag-timeline/index.d.ts +2 -2
- package/dist/components/puck-block/team-sections/team-carousel/index.d.ts +1 -23
- package/dist/components/puck-block/team-sections/team-carousel/index.js +1 -2
- package/dist/components/puck-block/team-sections/team-grid/index.d.ts +1 -23
- package/dist/components/puck-block/team-sections/team-grid/index.js +1 -2
- package/dist/components/puck-block/team-sections/team-inline-card/index.d.ts +1 -23
- package/dist/components/puck-block/team-sections/team-inline-card/index.js +1 -2
- package/dist/components/puck-block/team-sections/team-two-column/index.d.ts +1 -1
- package/dist/components/puck-block/testimonial-sections/bento-testimonial/component.js +2 -2
- package/dist/components/puck-block/testimonial-sections/sticky-testimonial/index.d.ts +1 -1
- package/dist/components/puck-block/testimonial-sections/tab-testimonial/component.js +2 -2
- package/dist/components/puck-block/text-sections/aside-nav-content/index.d.ts +0 -22
- package/dist/components/puck-block/text-sections/aside-nav-content/index.js +1 -1
- package/dist/components/puck-block/text-sections/blog-article/index.d.ts +0 -22
- package/dist/components/puck-block/text-sections/blog-article/index.js +1 -1
- package/dist/components/puck-block/text-sections/prose-content/component.js +1 -1
- package/dist/components/puck-block/text-sections/prose-sidebar/index.d.ts +1 -23
- package/dist/components/puck-block/text-sections/side-media-content/component.js +1 -1
- package/dist/components/puck-block/text-sections/sticky-text-multi-image/component.js +3 -3
- package/dist/components/puck-block/text-sections/text-header/index.d.ts +2 -2
- package/dist/components/puck-core/core/props/content.js +41 -1
- package/dist/components/puck-core/core/props/form.js +76 -0
- package/dist/components/puck-core/core/props/index.js +34 -0
- package/dist/components/puck-core/core/props/interactive.js +17 -0
- package/dist/components/puck-core/core/props/media.js +14 -5
- package/dist/components/puck-core/core/styles.d.ts +1 -1
- package/dist/components/{puck-base → puck-core}/core/styles.js +3 -1
- package/dist/components/{puck-base → puck-core}/core/with-editable.js +1 -1
- package/dist/components/puck-core/fields/action-field.js +1 -1
- package/dist/components/puck-core/fields/array-field.d.ts +7 -0
- package/dist/components/puck-core/fields/array-field.js +229 -0
- package/dist/components/{puck-base → puck-core}/fields/auto-field.js +11 -0
- package/dist/components/{puck-base → puck-core/fields}/image-upload-field.js +5 -5
- package/dist/components/puck-core/fields/index.d.ts +1 -0
- package/dist/components/{puck-base → puck-core}/fields/location-field.js +1 -1
- package/dist/components/{puck-base → puck-core}/fields/object-field.js +1 -1
- package/dist/components/puck-core/index.d.ts +1 -0
- package/dist/components/{puck-base → puck-core}/inline-editable.js +1 -1
- package/dist/index.js +121 -104
- package/dist/node_modules/.pnpm/@dnd-kit_accessibility@3.1.1_react@19.2.4/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js +59 -0
- package/dist/node_modules/.pnpm/@dnd-kit_core@6.3.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@dnd-kit/core/dist/core.esm.js +3093 -0
- package/dist/node_modules/.pnpm/@dnd-kit_sortable@10.0.0_@dnd-kit_core@6.3.1_react-dom@19.2.4_react@19.2.4__react@19.2.4__react@19.2.4/node_modules/@dnd-kit/sortable/dist/sortable.esm.js +592 -0
- package/dist/node_modules/.pnpm/@dnd-kit_utilities@3.2.2_react@19.2.4/node_modules/@dnd-kit/utilities/dist/utilities.esm.js +301 -0
- package/package.json +4 -1
- package/dist/components/puck-base/core/fields.d.ts +0 -827
- package/dist/components/puck-base/core/fields.js +0 -267
- package/dist/components/puck-base/core/hooks.d.ts +0 -19
- package/dist/components/puck-base/core/icon-catalog.d.ts +0 -14
- package/dist/components/puck-base/core/icon-catalog.js +0 -193
- package/dist/components/puck-base/core/styles.d.ts +0 -1942
- package/dist/components/puck-base/core/types.d.ts +0 -20
- package/dist/components/puck-base/core/types.js +0 -26
- package/dist/components/puck-base/core/utils.d.ts +0 -5
- package/dist/components/puck-base/core/with-editable.d.ts +0 -16
- package/dist/components/puck-base/error-boundary.d.ts +0 -4
- package/dist/components/puck-base/fields/action-field.d.ts +0 -30
- package/dist/components/puck-base/fields/action-field.js +0 -265
- package/dist/components/puck-base/fields/auto-field.d.ts +0 -2
- package/dist/components/puck-base/fields/color-field.d.ts +0 -6
- package/dist/components/puck-base/fields/index.d.ts +0 -8
- package/dist/components/puck-base/fields/location-field.d.ts +0 -44
- package/dist/components/puck-base/fields/object-field.d.ts +0 -8
- package/dist/components/puck-base/fields/radio-toggle-field.d.ts +0 -10
- package/dist/components/puck-base/fields/types.d.ts +0 -29
- package/dist/components/puck-base/fields/virtualized-select-field.d.ts +0 -13
- package/dist/components/puck-base/icon-picker-field.d.ts +0 -8
- package/dist/components/puck-base/icon-picker-field.js +0 -153
- package/dist/components/puck-base/image-upload-field.d.ts +0 -7
- package/dist/components/puck-base/inline-editable.d.ts +0 -14
- package/dist/components/puck-base/use-upload.d.ts +0 -42
- /package/dist/components/{puck-base → puck-core}/core/hooks.js +0 -0
- /package/dist/components/{puck-base → puck-core}/core/utils.js +0 -0
- /package/dist/components/{puck-base → puck-core}/error-boundary.js +0 -0
- /package/dist/components/{puck-base → puck-core}/fields/color-field.js +0 -0
- /package/dist/components/{puck-base → puck-core}/fields/radio-toggle-field.js +0 -0
- /package/dist/components/{puck-base → puck-core}/fields/virtualized-select-field.js +0 -0
- /package/dist/components/{puck-base → puck-core}/use-upload.js +0 -0
|
@@ -7,6 +7,7 @@ import { SectionWrapper } from "../../../puck-core/section-wrapper.js";
|
|
|
7
7
|
import { cn } from "../../../../utils/css-utils.js";
|
|
8
8
|
import { motion, useMotionValue, useSpring, useTransform } from "framer-motion";
|
|
9
9
|
import { useCallback } from "react";
|
|
10
|
+
import { useEditorContext } from "../../../puck-core/core/context/editor-context.js";
|
|
10
11
|
const imagePositions = {
|
|
11
12
|
group1: [
|
|
12
13
|
"bottom-[5%] left-[-8%] z-10 max-w-[18%] sm:bottom-[10%] lg:bottom-auto",
|
|
@@ -46,14 +47,27 @@ const getTransformStyles = (smoothMouseX, smoothMouseY, xRange, yRange) => {
|
|
|
46
47
|
};
|
|
47
48
|
};
|
|
48
49
|
const MouseTrackHero = (props) => {
|
|
49
|
-
const {
|
|
50
|
+
const {
|
|
51
|
+
heading,
|
|
52
|
+
description,
|
|
53
|
+
buttons = [],
|
|
54
|
+
group1Images = [],
|
|
55
|
+
group2Images = [],
|
|
56
|
+
styles
|
|
57
|
+
} = {
|
|
50
58
|
...MouseTrackHeroDefaults,
|
|
51
59
|
...props
|
|
52
60
|
};
|
|
53
|
-
const {
|
|
61
|
+
const {
|
|
62
|
+
className: sectionClassName,
|
|
63
|
+
style: sectionStyle,
|
|
64
|
+
css
|
|
65
|
+
} = styles ?? {};
|
|
66
|
+
const { isEditor } = useEditorContext();
|
|
54
67
|
const { smoothMouseX, smoothMouseY, handleMouseMove } = useMouseMove();
|
|
55
68
|
const isMobile = useMediaQuery("(max-width: 991px)");
|
|
56
|
-
const
|
|
69
|
+
const disableMotion = isMobile || isEditor;
|
|
70
|
+
const Animate = disableMotion ? "div" : motion.div;
|
|
57
71
|
const canvasTransform = getTransformStyles(
|
|
58
72
|
smoothMouseX,
|
|
59
73
|
smoothMouseY,
|
|
@@ -77,26 +91,53 @@ const MouseTrackHero = (props) => {
|
|
|
77
91
|
{
|
|
78
92
|
className: "absolute inset-0 flex origin-bottom items-center justify-center",
|
|
79
93
|
style: transformStyles,
|
|
80
|
-
children: images.map((image, index) => /* @__PURE__ */ jsx("div", { className: `absolute w-full ${positions[index]}`, children: /* @__PURE__ */ jsx(
|
|
94
|
+
children: images.map((image, index) => /* @__PURE__ */ jsx("div", { className: `absolute w-full ${positions[index]}`, children: /* @__PURE__ */ jsx(
|
|
95
|
+
CompoundImage,
|
|
96
|
+
{
|
|
97
|
+
src: image.src,
|
|
98
|
+
alt: image.alt,
|
|
99
|
+
className: "size-full"
|
|
100
|
+
}
|
|
101
|
+
) }, index))
|
|
81
102
|
}
|
|
82
103
|
);
|
|
83
104
|
return /* @__PURE__ */ jsxs(
|
|
84
105
|
SectionWrapper,
|
|
85
106
|
{
|
|
86
|
-
className: cn(
|
|
107
|
+
className: cn(
|
|
108
|
+
"relative flex h-svh items-center justify-center overflow-hidden lg:h-screen",
|
|
109
|
+
sectionClassName
|
|
110
|
+
),
|
|
87
111
|
style: sectionStyle,
|
|
88
112
|
css,
|
|
89
|
-
onMouseMove: handleMouseMove,
|
|
113
|
+
onMouseMove: isEditor ? void 0 : handleMouseMove,
|
|
90
114
|
children: [
|
|
91
115
|
/* @__PURE__ */ jsx("div", { className: "px-[5%] py-8 md:py-12 lg:py-14", children: /* @__PURE__ */ jsx("div", { className: "container max-w-lg", children: /* @__PURE__ */ jsxs("div", { className: "relative z-10 text-center", children: [
|
|
92
116
|
/* @__PURE__ */ jsx("h1", { className: "mb-5 text-6xl font-bold md:mb-6 md:text-9xl lg:text-10xl", children: heading }),
|
|
93
117
|
/* @__PURE__ */ jsx("p", { className: "md:text-md", children: description }),
|
|
94
|
-
/* @__PURE__ */ jsx("div", { className: "mt-6 flex items-center justify-center gap-4 md:mt-8", children: buttons.map((button, index) => /* @__PURE__ */ jsx(
|
|
118
|
+
/* @__PURE__ */ jsx("div", { className: "mt-6 flex items-center justify-center gap-4 md:mt-8", children: buttons.map((button, index) => /* @__PURE__ */ jsx(
|
|
119
|
+
CompoundButton,
|
|
120
|
+
{
|
|
121
|
+
label: button.label,
|
|
122
|
+
variant: button.variant,
|
|
123
|
+
size: button.size,
|
|
124
|
+
action: button.action,
|
|
125
|
+
icon: button.icon
|
|
126
|
+
},
|
|
127
|
+
index
|
|
128
|
+
)) })
|
|
95
129
|
] }) }) }),
|
|
96
|
-
/* @__PURE__ */ jsxs(
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
130
|
+
/* @__PURE__ */ jsxs(
|
|
131
|
+
Animate,
|
|
132
|
+
{
|
|
133
|
+
className: "absolute size-full",
|
|
134
|
+
style: canvasTransform,
|
|
135
|
+
children: [
|
|
136
|
+
renderImages(group1Images, imagePositions.group1, group1Transform),
|
|
137
|
+
renderImages(group2Images, imagePositions.group2, group2Transform)
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
)
|
|
100
141
|
]
|
|
101
142
|
}
|
|
102
143
|
);
|
|
@@ -108,37 +149,37 @@ const MouseTrackHeroDefaults = {
|
|
|
108
149
|
group1Images: [
|
|
109
150
|
{
|
|
110
151
|
src: "https://picsum.photos/seed/hero-square/1200/1200",
|
|
111
|
-
alt: "
|
|
152
|
+
alt: "Placeholder image 1"
|
|
112
153
|
},
|
|
113
154
|
{
|
|
114
155
|
src: "https://picsum.photos/seed/hero-square/1200/1200",
|
|
115
|
-
alt: "
|
|
156
|
+
alt: "Placeholder image 2"
|
|
116
157
|
},
|
|
117
158
|
{
|
|
118
159
|
src: "https://picsum.photos/seed/hero-square/1200/1200",
|
|
119
|
-
alt: "
|
|
160
|
+
alt: "Placeholder image 3"
|
|
120
161
|
},
|
|
121
162
|
{
|
|
122
163
|
src: "https://picsum.photos/seed/hero-square/1200/1200",
|
|
123
|
-
alt: "
|
|
164
|
+
alt: "Placeholder image 4"
|
|
124
165
|
}
|
|
125
166
|
],
|
|
126
167
|
group2Images: [
|
|
127
168
|
{
|
|
128
169
|
src: "https://picsum.photos/seed/hero-landscape/1200/800",
|
|
129
|
-
alt: "
|
|
170
|
+
alt: "Placeholder image 5"
|
|
130
171
|
},
|
|
131
172
|
{
|
|
132
173
|
src: "https://picsum.photos/seed/hero-square/1200/1200",
|
|
133
|
-
alt: "
|
|
174
|
+
alt: "Placeholder image 6"
|
|
134
175
|
},
|
|
135
176
|
{
|
|
136
177
|
src: "https://picsum.photos/seed/hero-landscape/1200/800",
|
|
137
|
-
alt: "
|
|
178
|
+
alt: "Placeholder image 7"
|
|
138
179
|
},
|
|
139
180
|
{
|
|
140
181
|
src: "https://picsum.photos/seed/hero-landscape/1200/800",
|
|
141
|
-
alt: "
|
|
182
|
+
alt: "Placeholder image 8"
|
|
142
183
|
}
|
|
143
184
|
]
|
|
144
185
|
};
|
|
@@ -25,7 +25,7 @@ declare const conf: {
|
|
|
25
25
|
readonly action: {
|
|
26
26
|
type: "custom";
|
|
27
27
|
label: string;
|
|
28
|
-
render: typeof import("
|
|
28
|
+
render: typeof import("../../..").ActionField;
|
|
29
29
|
};
|
|
30
30
|
readonly variant: {
|
|
31
31
|
readonly type: "select";
|
|
@@ -112,38 +112,35 @@ declare const conf: {
|
|
|
112
112
|
type: string;
|
|
113
113
|
label: string;
|
|
114
114
|
objectFields: {
|
|
115
|
+
className: {
|
|
116
|
+
readonly type: "text";
|
|
117
|
+
readonly label: "Class Name";
|
|
118
|
+
readonly ai: {
|
|
119
|
+
readonly instructions: "Additional Tailwind CSS classes to apply to the section wrapper.";
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
style: {
|
|
123
|
+
readonly type: "object";
|
|
124
|
+
readonly label: "Style";
|
|
125
|
+
readonly objectFields: {};
|
|
126
|
+
readonly ai: {
|
|
127
|
+
readonly instructions: "Inline CSSProperties object for the section wrapper, e.g. { backgroundColor: 'red', minHeight: '100vh' }.";
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
css: {
|
|
131
|
+
readonly type: "textarea";
|
|
132
|
+
readonly label: "Custom CSS";
|
|
133
|
+
readonly ai: {
|
|
134
|
+
readonly instructions: "Custom CSS rules. Use & as a placeholder for the section selector.";
|
|
135
|
+
};
|
|
136
|
+
};
|
|
115
137
|
textLayout: {
|
|
116
138
|
type: "select";
|
|
117
139
|
label: string;
|
|
118
|
-
options:
|
|
119
|
-
className: {
|
|
120
|
-
readonly type: "text";
|
|
121
|
-
readonly label: "Class Name";
|
|
122
|
-
readonly ai: {
|
|
123
|
-
readonly instructions: "Additional Tailwind CSS classes to apply to the section wrapper.";
|
|
124
|
-
};
|
|
125
|
-
};
|
|
126
|
-
style: {
|
|
127
|
-
readonly type: "object";
|
|
128
|
-
readonly label: "Style";
|
|
129
|
-
readonly objectFields: {};
|
|
130
|
-
readonly ai: {
|
|
131
|
-
readonly instructions: "Inline CSSProperties object for the section wrapper, e.g. { backgroundColor: 'red', minHeight: '100vh' }.";
|
|
132
|
-
};
|
|
133
|
-
};
|
|
134
|
-
css: {
|
|
135
|
-
readonly type: "textarea";
|
|
136
|
-
readonly label: "Custom CSS";
|
|
137
|
-
readonly ai: {
|
|
138
|
-
readonly instructions: "Custom CSS rules. Use & as a placeholder for the section selector.";
|
|
139
|
-
};
|
|
140
|
-
};
|
|
141
|
-
label: string;
|
|
142
|
-
value: string;
|
|
143
|
-
} | {
|
|
140
|
+
options: {
|
|
144
141
|
label: string;
|
|
145
142
|
value: string;
|
|
146
|
-
}
|
|
143
|
+
}[];
|
|
147
144
|
};
|
|
148
145
|
imageGridRatio: {
|
|
149
146
|
readonly type: "text";
|
|
@@ -18,12 +18,13 @@ const conf = {
|
|
|
18
18
|
type: "select",
|
|
19
19
|
label: "Text Layout",
|
|
20
20
|
options: [
|
|
21
|
-
{ label: "Two Column Top", value: "two-column-top"
|
|
21
|
+
{ label: "Two Column Top", value: "two-column-top" },
|
|
22
22
|
{ label: "Left Block", value: "left-block" },
|
|
23
23
|
{ label: "Centered", value: "centered" }
|
|
24
24
|
]
|
|
25
25
|
},
|
|
26
|
-
imageGridRatio: heroStyleFields.imageGridRatio
|
|
26
|
+
imageGridRatio: heroStyleFields.imageGridRatio,
|
|
27
|
+
...sectionWrapperFields
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
30
|
},
|
package/dist/components/puck-block/hero-sections/multi-image-grid-hero/multi-image-grid-hero.js
CHANGED
|
@@ -68,11 +68,11 @@ const MultiImageGridHeroDefaults = {
|
|
|
68
68
|
images: [
|
|
69
69
|
{
|
|
70
70
|
src: "https://picsum.photos/seed/hero-landscape/1200/800",
|
|
71
|
-
alt: "
|
|
71
|
+
alt: "Placeholder image 1"
|
|
72
72
|
},
|
|
73
73
|
{
|
|
74
74
|
src: "https://picsum.photos/seed/hero-square/1200/1200",
|
|
75
|
-
alt: "
|
|
75
|
+
alt: "Placeholder image 2"
|
|
76
76
|
}
|
|
77
77
|
],
|
|
78
78
|
styles: {
|
package/dist/components/puck-block/hero-sections/overlapping-image-hero/overlapping-image-hero.js
CHANGED
|
@@ -199,15 +199,15 @@ const OverlappingImageHeroDefaults = {
|
|
|
199
199
|
buttons: [{ label: "Button" }, { label: "Button", variant: "secondary" }],
|
|
200
200
|
firstImage: {
|
|
201
201
|
src: "https://picsum.photos/seed/hero-square/1200/1200",
|
|
202
|
-
alt: "
|
|
202
|
+
alt: "Placeholder image 1"
|
|
203
203
|
},
|
|
204
204
|
secondImage: {
|
|
205
205
|
src: "https://picsum.photos/seed/hero-portrait/800/1200",
|
|
206
|
-
alt: "
|
|
206
|
+
alt: "Placeholder image 2"
|
|
207
207
|
},
|
|
208
208
|
thirdImage: {
|
|
209
209
|
src: "https://picsum.photos/seed/hero-dim/1200/800",
|
|
210
|
-
alt: "
|
|
210
|
+
alt: "Placeholder image 3"
|
|
211
211
|
},
|
|
212
212
|
styles: {
|
|
213
213
|
textPosition: "left",
|
|
@@ -6,6 +6,7 @@ import { CompoundImage } from "../../../puck-base/image.js";
|
|
|
6
6
|
import { useRef } from "react";
|
|
7
7
|
import { SectionWrapper } from "../../../puck-core/section-wrapper.js";
|
|
8
8
|
import { useScrollContainer } from "../../../../hooks/use-scroll-container.js";
|
|
9
|
+
import { useEditorContext } from "../../../puck-core/core/context/editor-context.js";
|
|
9
10
|
import { cn } from "../../../../utils/css-utils.js";
|
|
10
11
|
const ParallaxImagesHero = (props) => {
|
|
11
12
|
const { heading, description, buttons = [], images = [], styles } = {
|
|
@@ -13,6 +14,7 @@ const ParallaxImagesHero = (props) => {
|
|
|
13
14
|
...props
|
|
14
15
|
};
|
|
15
16
|
const { className: sectionClassName, style: sectionStyle, css } = styles ?? {};
|
|
17
|
+
const { isEditor } = useEditorContext();
|
|
16
18
|
const transformRef = useRef(null);
|
|
17
19
|
const [scrollContainerRef] = useScrollContainer(transformRef);
|
|
18
20
|
const { scrollYProgress } = useScroll({
|
|
@@ -24,6 +26,16 @@ const ParallaxImagesHero = (props) => {
|
|
|
24
26
|
});
|
|
25
27
|
const yFirst = useTransform(animatedScrollYProgress, [0, 1], ["0vh", "-87.5vh"]);
|
|
26
28
|
const ySecond = useTransform(animatedScrollYProgress, [0, 1], ["0vh", "-39.6vh"]);
|
|
29
|
+
if (isEditor) {
|
|
30
|
+
return /* @__PURE__ */ jsx(SectionWrapper, { ref: transformRef, className: cn("relative px-[5%]", sectionClassName), style: sectionStyle, css, children: /* @__PURE__ */ jsxs("div", { className: "relative overflow-hidden", children: [
|
|
31
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-3 gap-4 py-8", children: images.slice(0, 6).map((image, index) => /* @__PURE__ */ jsx("div", { className: "relative aspect-square", children: /* @__PURE__ */ jsx(CompoundImage, { src: image.src, className: "absolute inset-0 size-full object-cover", alt: image.alt }) }, index)) }),
|
|
32
|
+
/* @__PURE__ */ jsx("div", { className: "container relative flex max-w-lg items-center py-16 text-center", children: /* @__PURE__ */ jsxs("div", { children: [
|
|
33
|
+
/* @__PURE__ */ jsx("h1", { className: "mb-5 text-6xl font-bold md:mb-6 md:text-9xl lg:text-10xl", children: heading }),
|
|
34
|
+
/* @__PURE__ */ jsx("p", { className: "relative z-20 md:text-md", children: description }),
|
|
35
|
+
/* @__PURE__ */ jsx("div", { className: "relative z-20 mt-6 flex items-center justify-center gap-x-4 md:mt-8", children: buttons.map((button, index) => /* @__PURE__ */ jsx(CompoundButton, { label: button.label, variant: button.variant, size: button.size, action: button.action, icon: button.icon }, index)) })
|
|
36
|
+
] }) })
|
|
37
|
+
] }) });
|
|
38
|
+
}
|
|
27
39
|
return /* @__PURE__ */ jsx(SectionWrapper, { ref: transformRef, className: cn("relative h-[150vh] px-[5%] md:h-[300vh]", sectionClassName), style: sectionStyle, css, children: /* @__PURE__ */ jsxs("div", { className: "sticky top-0 h-screen overflow-hidden", children: [
|
|
28
40
|
/* @__PURE__ */ jsx("div", { className: "absolute bottom-0 left-0 right-auto top-0 z-10", children: /* @__PURE__ */ jsx(motion.div, { className: "flex flex-col gap-[26vw] pt-[70vh]", style: { y: yFirst }, children: images.slice(0, 4).map((image, index) => /* @__PURE__ */ jsx(
|
|
29
41
|
"div",
|
|
@@ -93,27 +105,27 @@ const ParallaxImagesHeroDefaults = {
|
|
|
93
105
|
images: [
|
|
94
106
|
{
|
|
95
107
|
src: "https://picsum.photos/seed/hero-square/1200/1200",
|
|
96
|
-
alt: "
|
|
108
|
+
alt: "Placeholder image 1"
|
|
97
109
|
},
|
|
98
110
|
{
|
|
99
111
|
src: "https://picsum.photos/seed/hero-square/1200/1200",
|
|
100
|
-
alt: "
|
|
112
|
+
alt: "Placeholder image 2"
|
|
101
113
|
},
|
|
102
114
|
{
|
|
103
115
|
src: "https://picsum.photos/seed/hero-square/1200/1200",
|
|
104
|
-
alt: "
|
|
116
|
+
alt: "Placeholder image 3"
|
|
105
117
|
},
|
|
106
118
|
{
|
|
107
119
|
src: "https://picsum.photos/seed/hero-square/1200/1200",
|
|
108
|
-
alt: "
|
|
120
|
+
alt: "Placeholder image 4"
|
|
109
121
|
},
|
|
110
122
|
{
|
|
111
123
|
src: "https://picsum.photos/seed/hero-square/1200/1200",
|
|
112
|
-
alt: "
|
|
124
|
+
alt: "Placeholder image 5"
|
|
113
125
|
},
|
|
114
126
|
{
|
|
115
127
|
src: "https://picsum.photos/seed/hero-square/1200/1200",
|
|
116
|
-
alt: "
|
|
128
|
+
alt: "Placeholder image 6"
|
|
117
129
|
}
|
|
118
130
|
]
|
|
119
131
|
};
|
|
@@ -6,6 +6,7 @@ import { CompoundButton } from "../../../puck-base/button.js";
|
|
|
6
6
|
import { CompoundImage } from "../../../puck-base/image.js";
|
|
7
7
|
import { SectionWrapper } from "../../../puck-core/section-wrapper.js";
|
|
8
8
|
import { useScrollContainer } from "../../../../hooks/use-scroll-container.js";
|
|
9
|
+
import { useEditorContext } from "../../../puck-core/core/context/editor-context.js";
|
|
9
10
|
import { useScroll, useTransform, motion } from "framer-motion";
|
|
10
11
|
const ScatterParallaxHero = (props) => {
|
|
11
12
|
const { heading, description, buttons = [], images = [], styles } = {
|
|
@@ -13,6 +14,7 @@ const ScatterParallaxHero = (props) => {
|
|
|
13
14
|
...props
|
|
14
15
|
};
|
|
15
16
|
const { className: sectionClassName, style: sectionStyle, css } = styles ?? {};
|
|
17
|
+
const { isEditor } = useEditorContext();
|
|
16
18
|
const sectionRef = useRef(null);
|
|
17
19
|
const [scrollContainerRef] = useScrollContainer(sectionRef);
|
|
18
20
|
const { scrollYProgress } = useScroll(
|
|
@@ -52,12 +54,12 @@ const ScatterParallaxHero = (props) => {
|
|
|
52
54
|
/* @__PURE__ */ jsx(
|
|
53
55
|
motion.div,
|
|
54
56
|
{
|
|
55
|
-
style: containerMotion,
|
|
57
|
+
style: isEditor ? { y: "0%", scale: 1, opacity: 1 } : containerMotion,
|
|
56
58
|
className: "absolute inset-0 z-10 flex origin-bottom items-end justify-center",
|
|
57
59
|
children: images.map((image, index) => /* @__PURE__ */ jsx(
|
|
58
60
|
motion.div,
|
|
59
61
|
{
|
|
60
|
-
style: imageMotions[index],
|
|
62
|
+
style: isEditor ? { x: 0, y: 0 } : imageMotions[index],
|
|
61
63
|
className: cn("absolute w-full max-w-[9rem] sm:max-w-[15rem] lg:max-w-xs", {
|
|
62
64
|
"left-[-25%] top-[65%] sm:top-[45%] md:left-[-20%] lg:left-[-10%] lg:top-[12%] ": index === 0,
|
|
63
65
|
"bottom-[5%] left-[-8%] md:left-[5%] lg:bottom-[10%]": index === 1,
|
|
@@ -82,23 +84,23 @@ const ScatterParallaxHeroDefaults = {
|
|
|
82
84
|
images: [
|
|
83
85
|
{
|
|
84
86
|
src: "https://picsum.photos/seed/hero-square/1200/1200",
|
|
85
|
-
alt: "
|
|
87
|
+
alt: "Placeholder image 1"
|
|
86
88
|
},
|
|
87
89
|
{
|
|
88
90
|
src: "https://picsum.photos/seed/hero-square/1200/1200",
|
|
89
|
-
alt: "
|
|
91
|
+
alt: "Placeholder image 2"
|
|
90
92
|
},
|
|
91
93
|
{
|
|
92
94
|
src: "https://picsum.photos/seed/hero-square/1200/1200",
|
|
93
|
-
alt: "
|
|
95
|
+
alt: "Placeholder image 3"
|
|
94
96
|
},
|
|
95
97
|
{
|
|
96
98
|
src: "https://picsum.photos/seed/hero-square/1200/1200",
|
|
97
|
-
alt: "
|
|
99
|
+
alt: "Placeholder image 4"
|
|
98
100
|
},
|
|
99
101
|
{
|
|
100
102
|
src: "https://picsum.photos/seed/hero-square/1200/1200",
|
|
101
|
-
alt: "
|
|
103
|
+
alt: "Placeholder image 5"
|
|
102
104
|
}
|
|
103
105
|
]
|
|
104
106
|
};
|
|
@@ -8,6 +8,7 @@ import { useScroll, useSpring, useTransform, motion } from "framer-motion";
|
|
|
8
8
|
import { SectionWrapper } from "../../../puck-core/section-wrapper.js";
|
|
9
9
|
import { useScrollContainer } from "../../../../hooks/use-scroll-container.js";
|
|
10
10
|
import { cn } from "../../../../utils/css-utils.js";
|
|
11
|
+
import { useEditorContext } from "../../../puck-core/core/context/editor-context.js";
|
|
11
12
|
import { FaCirclePlay } from "../../../../node_modules/.pnpm/react-icons@5.6.0_react@19.2.4/node_modules/react-icons/fa6/index.js";
|
|
12
13
|
import { CgSpinner } from "../../../../node_modules/.pnpm/react-icons@5.6.0_react@19.2.4/node_modules/react-icons/cg/index.js";
|
|
13
14
|
const ScrollExpandVideoHero = (props) => {
|
|
@@ -17,6 +18,7 @@ const ScrollExpandVideoHero = (props) => {
|
|
|
17
18
|
};
|
|
18
19
|
const image = images == null ? void 0 : images[0];
|
|
19
20
|
const { className: sectionClassName, style: sectionStyle, css } = styles ?? {};
|
|
21
|
+
const { isEditor } = useEditorContext();
|
|
20
22
|
const [isIframeLoaded, setIsIframeLoaded] = useState(false);
|
|
21
23
|
const transformRef = useRef(null);
|
|
22
24
|
const [scrollContainerRef] = useScrollContainer(transformRef);
|
|
@@ -37,11 +39,11 @@ const ScrollExpandVideoHero = (props) => {
|
|
|
37
39
|
SectionWrapper,
|
|
38
40
|
{
|
|
39
41
|
ref: transformRef,
|
|
40
|
-
className: cn("relative flex
|
|
42
|
+
className: cn("relative flex flex-col items-center", isEditor ? "h-auto" : "h-[300vh]", sectionClassName),
|
|
41
43
|
style: sectionStyle,
|
|
42
44
|
css,
|
|
43
45
|
children: [
|
|
44
|
-
/* @__PURE__ */ jsx("div", { className: "px-[5%]", children: /* @__PURE__ */ jsx("div", { className: "
|
|
46
|
+
/* @__PURE__ */ jsx("div", { className: "px-[5%]", children: /* @__PURE__ */ jsx("div", { className: cn("z-0 mx-auto flex min-h-[80vh] max-w-lg items-center justify-center py-16 text-center md:py-24 lg:py-28", !isEditor && "sticky top-0"), children: /* @__PURE__ */ jsxs(motion.div, { style: isEditor ? { opacity: 1, scale: 1 } : { opacity: fadeOut, scale: scaleDown }, children: [
|
|
45
47
|
/* @__PURE__ */ jsx("h1", { className: "mb-5 text-6xl font-bold md:mb-6 md:text-9xl lg:text-10xl", children: heading }),
|
|
46
48
|
/* @__PURE__ */ jsx("p", { className: "md:text-md", children: description }),
|
|
47
49
|
/* @__PURE__ */ jsx("div", { className: "mt-6 flex items-center justify-center gap-x-4 md:mt-8", children: buttons.map((button, index) => /* @__PURE__ */ jsx(CompoundButton, { label: button.label, variant: button.variant, size: button.size, action: button.action, icon: button.icon }, index)) })
|
|
@@ -49,8 +51,8 @@ const ScrollExpandVideoHero = (props) => {
|
|
|
49
51
|
/* @__PURE__ */ jsx(
|
|
50
52
|
motion.div,
|
|
51
53
|
{
|
|
52
|
-
style: { width, height, y },
|
|
53
|
-
className: "sticky top-[10vh]
|
|
54
|
+
style: isEditor ? { width: "100%", height: "100vh", y: 0 } : { width, height, y },
|
|
55
|
+
className: cn("z-10 flex flex-col justify-start", isEditor ? "relative" : "sticky top-[10vh] mb-[-10vh]"),
|
|
54
56
|
children: /* @__PURE__ */ jsxs(Dialog, { children: [
|
|
55
57
|
/* @__PURE__ */ jsx(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsxs("button", { className: "relative flex size-full items-center justify-center", children: [
|
|
56
58
|
/* @__PURE__ */ jsx(CompoundImage, { src: image.src, alt: image.alt, className: "size-full object-cover" }),
|
|
@@ -88,7 +90,7 @@ const ScrollExpandVideoHeroDefaults = {
|
|
|
88
90
|
video: "https://www.youtube.com/embed/8DKLYsikxTs?si=Ch9W0KrDWWUiCMMW",
|
|
89
91
|
images: [{
|
|
90
92
|
src: "https://picsum.photos/seed/hero-video/1200/800",
|
|
91
|
-
alt: "
|
|
93
|
+
alt: "Placeholder image"
|
|
92
94
|
}]
|
|
93
95
|
};
|
|
94
96
|
export {
|