dune-react 0.0.23 → 0.0.24
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/image.js +1 -1
- package/dist/components/puck-block/banner-sections/dual-row-marquee/dual-row-marquee.js +77 -53
- package/dist/components/puck-block/contact-sections/tab-locations/tab-locations.js +71 -55
- package/dist/components/puck-block/feature-sections/tab-feature/component.js +1 -1
- package/dist/components/puck-block/gallery-sections/image-carousel/index.d.ts +14 -1
- package/dist/components/puck-block/gallery-sections/interactive-portfolio/interactive-portfolio.js +165 -104
- package/dist/components/puck-block/gallery-sections/masonry-grid/index.d.ts +17 -1
- package/dist/components/puck-block/gallery-sections/masonry-grid/masonry-grid.js +56 -31
- package/dist/components/puck-block/gallery-sections/portfolio-cards/index.d.ts +17 -1
- package/dist/components/puck-block/gallery-sections/portfolio-cards/portfolio-cards.js +40 -12
- package/dist/components/puck-block/gallery-sections/props.d.ts +31 -2
- package/dist/components/puck-block/gallery-sections/props.js +17 -4
- package/dist/components/puck-block/gallery-sections/scroll-parallax/scroll-parallax.js +68 -37
- package/dist/components/puck-block/gallery-sections/scroll-parallax-portfolio/scroll-parallax-portfolio.js +281 -159
- package/dist/components/puck-block/gallery-sections/static-grid/index.d.ts +17 -1
- package/dist/components/puck-block/header-sections/centered-navbar/centered-navbar.js +94 -14
- package/dist/components/puck-block/hero-sections/grid-expand-hero/index.d.ts +17 -1
- package/dist/components/puck-block/hero-sections/inline-image-hero/inline-image-hero.js +59 -28
- package/dist/components/puck-block/hero-sections/multi-image-grid-hero/index.d.ts +17 -1
- package/dist/components/puck-block/hero-sections/props.d.ts +34 -2
- package/dist/components/puck-block/hero-sections/props.js +18 -4
- package/dist/components/puck-block/hero-sections/tab-hero/component.js +1 -1
- package/dist/components/puck-block/index.d.ts +1 -0
- package/dist/components/puck-block/location-sections/index.d.ts +3 -0
- package/dist/components/puck-block/location-sections/location-1/index.js +102 -0
- package/dist/components/puck-block/location-sections/location-1/location.d.ts +0 -3
- package/dist/components/puck-block/location-sections/location-1/location.js +139 -0
- package/dist/components/puck-block/location-sections/location-2/index.js +126 -0
- package/dist/components/puck-block/location-sections/location-2/location.d.ts +0 -3
- package/dist/components/puck-block/location-sections/location-2/location.js +133 -0
- package/dist/components/puck-block/location-sections/location-3/index.js +109 -0
- package/dist/components/puck-block/location-sections/location-3/location.d.ts +0 -3
- package/dist/components/puck-block/location-sections/location-3/location.js +140 -0
- package/dist/components/puck-block/location-sections/props.d.ts +0 -3
- package/dist/components/puck-block/metrics-sections/tab-stats/tab-stats.js +1 -1
- package/dist/components/puck-block/pricing-sections/pricing-comparison-table/component.js +134 -33
- package/dist/components/puck-block/pricing-sections/tab-pricing-grid/component.js +86 -40
- package/dist/components/puck-block/pricing-sections/tab-single-pricing/component.js +1 -1
- package/dist/components/puck-block/registry.generated.d.ts +228 -6
- package/dist/components/puck-block/registry.generated.js +157 -138
- package/dist/components/puck-block/showcase-sections/tab-timeline/component.js +1 -1
- package/dist/components/puck-block/testimonial-sections/bento-testimonial/component.js +157 -83
- package/dist/components/puck-block/testimonial-sections/centered-testimonial/component.js +71 -28
- package/dist/components/puck-block/testimonial-sections/image-testimonial/component.js +66 -29
- package/dist/components/puck-block/testimonial-sections/image-testimonial-carousel/component.js +1 -1
- package/dist/components/puck-block/testimonial-sections/tab-testimonial/component.js +4 -4
- package/dist/components/puck-block/testimonial-sections/testimonial-card-grid/component.js +2 -2
- package/dist/components/puck-block/testimonial-sections/testimonial-carousel/component.js +1 -1
- package/dist/components/puck-core/core/props/form.js +25 -1
- package/dist/components/puck-core/fields/location-field.js +4 -1
- package/dist/index.js +6 -0
- package/package.json +4 -1
|
@@ -12,7 +12,11 @@ const ScrollParallax = (props) => {
|
|
|
12
12
|
...ScrollParallaxDefaults,
|
|
13
13
|
...props
|
|
14
14
|
};
|
|
15
|
-
const {
|
|
15
|
+
const {
|
|
16
|
+
className: sectionClassName,
|
|
17
|
+
style: sectionStyle,
|
|
18
|
+
css
|
|
19
|
+
} = styles ?? {};
|
|
16
20
|
const { isEditor } = useEditorContext();
|
|
17
21
|
const transformRef = useRef(null);
|
|
18
22
|
const [scrollContainerRef] = useScrollContainer(transformRef);
|
|
@@ -22,42 +26,60 @@ const ScrollParallax = (props) => {
|
|
|
22
26
|
});
|
|
23
27
|
const x = useTransform(scrollYProgress, [0, 1], ["0%", "-100%"]);
|
|
24
28
|
if (isEditor) {
|
|
25
|
-
return /* @__PURE__ */ jsxs(
|
|
26
|
-
|
|
27
|
-
/* @__PURE__ */ jsx("h2", { className: "rb-5 mb-5 text-5xl font-bold md:mb-6 md:text-7xl lg:text-8xl", children: heading }),
|
|
28
|
-
/* @__PURE__ */ jsx("p", { className: "md:text-md", children: description })
|
|
29
|
-
] }) }),
|
|
30
|
-
/* @__PURE__ */ jsx("div", { className: "px-[5%] py-12", children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3", children: images.map((image, index) => /* @__PURE__ */ jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ jsx(
|
|
31
|
-
CompoundImage,
|
|
32
|
-
{
|
|
33
|
-
className: "aspect-video w-full object-cover",
|
|
34
|
-
src: image.src,
|
|
35
|
-
alt: image.alt
|
|
36
|
-
}
|
|
37
|
-
) }, index)) }) })
|
|
38
|
-
] });
|
|
39
|
-
}
|
|
40
|
-
return /* @__PURE__ */ jsxs(SectionWrapper, { ref: transformRef, className: cn(sectionClassName), style: sectionStyle, css, children: [
|
|
41
|
-
/* @__PURE__ */ jsx("div", { className: "px-[5%] pt-16 md:pt-24 lg:pt-28", children: /* @__PURE__ */ jsxs("div", { className: "container text-center", children: [
|
|
42
|
-
/* @__PURE__ */ jsx("h2", { className: "rb-5 mb-5 text-5xl font-bold md:mb-6 md:text-7xl lg:text-8xl", children: heading }),
|
|
43
|
-
/* @__PURE__ */ jsx("p", { className: "md:text-md", children: description })
|
|
44
|
-
] }) }),
|
|
45
|
-
/* @__PURE__ */ jsx("div", { className: "h-[400vh]", children: /* @__PURE__ */ jsx("div", { className: "sticky top-0 mt-[-10vh] flex h-screen w-screen max-w-full flex-col items-start justify-center overflow-hidden px-[5%] md:mt-0", children: /* @__PURE__ */ jsx(
|
|
46
|
-
motion.div,
|
|
29
|
+
return /* @__PURE__ */ jsxs(
|
|
30
|
+
SectionWrapper,
|
|
47
31
|
{
|
|
48
|
-
|
|
49
|
-
className:
|
|
50
|
-
|
|
51
|
-
|
|
32
|
+
ref: transformRef,
|
|
33
|
+
className: cn(sectionClassName),
|
|
34
|
+
style: sectionStyle,
|
|
35
|
+
css,
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ jsx("div", { className: "px-[5%] pt-16 md:pt-24 lg:pt-28", children: /* @__PURE__ */ jsxs("div", { className: "container text-center", children: [
|
|
38
|
+
/* @__PURE__ */ jsx("h2", { className: "rb-5 mb-5 text-5xl font-bold md:mb-6 md:text-7xl lg:text-8xl", children: heading }),
|
|
39
|
+
/* @__PURE__ */ jsx("p", { className: "md:text-md", children: description })
|
|
40
|
+
] }) }),
|
|
41
|
+
/* @__PURE__ */ jsx("div", { className: "px-[5%] py-12", children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3", children: images.map((image, index) => /* @__PURE__ */ jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ jsx(
|
|
42
|
+
CompoundImage,
|
|
43
|
+
{
|
|
44
|
+
className: "aspect-video w-full object-cover",
|
|
45
|
+
src: image.src,
|
|
46
|
+
alt: image.alt
|
|
47
|
+
}
|
|
48
|
+
) }, index)) }) })
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
return /* @__PURE__ */ jsxs(
|
|
54
|
+
SectionWrapper,
|
|
55
|
+
{
|
|
56
|
+
ref: transformRef,
|
|
57
|
+
className: cn(sectionClassName),
|
|
58
|
+
style: sectionStyle,
|
|
59
|
+
css,
|
|
60
|
+
children: [
|
|
61
|
+
/* @__PURE__ */ jsx("div", { className: "px-[5%] pt-16 md:pt-24 lg:pt-28", children: /* @__PURE__ */ jsxs("div", { className: "container text-center", children: [
|
|
62
|
+
/* @__PURE__ */ jsx("h2", { className: "rb-5 mb-5 text-5xl font-bold md:mb-6 md:text-7xl lg:text-8xl", children: heading }),
|
|
63
|
+
/* @__PURE__ */ jsx("p", { className: "md:text-md", children: description })
|
|
64
|
+
] }) }),
|
|
65
|
+
/* @__PURE__ */ jsx("div", { className: "h-[400vh]", children: /* @__PURE__ */ jsx("div", { className: "sticky top-0 mt-[-10vh] flex h-screen w-screen max-w-full flex-col items-start justify-center overflow-hidden px-[5%] md:mt-0", children: /* @__PURE__ */ jsx(
|
|
66
|
+
motion.div,
|
|
52
67
|
{
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
68
|
+
style: { x },
|
|
69
|
+
className: "flex w-[150vh] items-center gap-x-6 sm:w-[200vh] md:gap-x-8 lg:w-[400vh]",
|
|
70
|
+
children: images.map((image, index) => /* @__PURE__ */ jsx("a", { className: "inline-block max-w-full", children: /* @__PURE__ */ jsx("div", { className: "relative size-full max-w-full overflow-hidden", children: /* @__PURE__ */ jsx(
|
|
71
|
+
CompoundImage,
|
|
72
|
+
{
|
|
73
|
+
className: "h-[80vh] max-h-[25rem] object-cover sm:max-h-[30rem] sm:w-[90vw] md:max-h-[40rem] md:w-[80vw] lg:max-h-none",
|
|
74
|
+
src: image.src,
|
|
75
|
+
alt: image.alt
|
|
76
|
+
}
|
|
77
|
+
) }) }, index))
|
|
56
78
|
}
|
|
57
|
-
) }) }
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
79
|
+
) }) })
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
);
|
|
61
83
|
};
|
|
62
84
|
const ScrollParallaxDefaults = {
|
|
63
85
|
tagline: "",
|
|
@@ -66,9 +88,18 @@ const ScrollParallaxDefaults = {
|
|
|
66
88
|
button: { label: "View all" },
|
|
67
89
|
buttons: [],
|
|
68
90
|
images: [
|
|
69
|
-
{
|
|
70
|
-
|
|
71
|
-
|
|
91
|
+
{
|
|
92
|
+
src: "https://picsum.photos/seed/scroll-1/1200/800",
|
|
93
|
+
alt: "Gallery image 1"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
src: "https://picsum.photos/seed/scroll-2/1200/800",
|
|
97
|
+
alt: "Gallery image 2"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
src: "https://picsum.photos/seed/scroll-3/1200/800",
|
|
101
|
+
alt: "Gallery image 3"
|
|
102
|
+
}
|
|
72
103
|
],
|
|
73
104
|
projects: [],
|
|
74
105
|
hoverLinks: [],
|
|
@@ -8,18 +8,39 @@ import { useScrollContainer } from "../../../../hooks/use-scroll-container.js";
|
|
|
8
8
|
import { useEditorContext } from "../../../puck-core/core/context/editor-context.js";
|
|
9
9
|
import { CompoundImage } from "../../../puck-base/image.js";
|
|
10
10
|
const ScrollParallaxPortfolio = (props) => {
|
|
11
|
-
const { projects, styles } = {
|
|
11
|
+
const { projects: projects2, styles } = {
|
|
12
12
|
...ScrollParallaxPortfolioDefaults,
|
|
13
13
|
...props
|
|
14
14
|
};
|
|
15
|
-
const {
|
|
15
|
+
const {
|
|
16
|
+
className: sectionClassName,
|
|
17
|
+
style: sectionStyle,
|
|
18
|
+
css,
|
|
19
|
+
animation = "threeImageParallax"
|
|
20
|
+
} = styles ?? {};
|
|
16
21
|
if (animation === "scaleOpacity") {
|
|
17
|
-
return /* @__PURE__ */ jsx(
|
|
22
|
+
return /* @__PURE__ */ jsx(
|
|
23
|
+
ScaleOpacityVariant,
|
|
24
|
+
{
|
|
25
|
+
projects: projects2,
|
|
26
|
+
sectionClassName,
|
|
27
|
+
sectionStyle,
|
|
28
|
+
css
|
|
29
|
+
}
|
|
30
|
+
);
|
|
18
31
|
}
|
|
19
|
-
return /* @__PURE__ */ jsx(
|
|
32
|
+
return /* @__PURE__ */ jsx(
|
|
33
|
+
ThreeImageParallaxVariant,
|
|
34
|
+
{
|
|
35
|
+
projects: projects2,
|
|
36
|
+
sectionClassName,
|
|
37
|
+
sectionStyle,
|
|
38
|
+
css
|
|
39
|
+
}
|
|
40
|
+
);
|
|
20
41
|
};
|
|
21
42
|
const ThreeImageParallaxVariant = ({
|
|
22
|
-
projects,
|
|
43
|
+
projects: projects2,
|
|
23
44
|
sectionClassName,
|
|
24
45
|
sectionStyle,
|
|
25
46
|
css
|
|
@@ -37,19 +58,29 @@ const ThreeImageParallaxVariant = ({
|
|
|
37
58
|
restDelta: 1e-3,
|
|
38
59
|
mass: 0.5
|
|
39
60
|
});
|
|
40
|
-
const computedStyles =
|
|
41
|
-
const blockOffset =
|
|
61
|
+
const computedStyles = projects2.map((_, index) => {
|
|
62
|
+
const blockOffset = projects2.length ? index / projects2.length : 0;
|
|
42
63
|
return {
|
|
43
64
|
headerStyles: {
|
|
44
65
|
opacity: useTransform(
|
|
45
66
|
smoothProgress,
|
|
46
|
-
[
|
|
67
|
+
[
|
|
68
|
+
45e-4 + blockOffset,
|
|
69
|
+
0.022 + blockOffset,
|
|
70
|
+
0.06 + blockOffset,
|
|
71
|
+
0.082 + blockOffset
|
|
72
|
+
],
|
|
47
73
|
[0, 1, 1, 0],
|
|
48
74
|
{ ease: easeInOut }
|
|
49
75
|
),
|
|
50
76
|
scale: useTransform(
|
|
51
77
|
smoothProgress,
|
|
52
|
-
[
|
|
78
|
+
[
|
|
79
|
+
0 + blockOffset,
|
|
80
|
+
0.022 + blockOffset,
|
|
81
|
+
0.06 + blockOffset,
|
|
82
|
+
0.082 + blockOffset
|
|
83
|
+
],
|
|
53
84
|
[0.9, 1, 1, 0.9],
|
|
54
85
|
{ ease: easeInOut }
|
|
55
86
|
)
|
|
@@ -72,78 +103,144 @@ const ThreeImageParallaxVariant = ({
|
|
|
72
103
|
}
|
|
73
104
|
};
|
|
74
105
|
});
|
|
75
|
-
return /* @__PURE__ */ jsxs(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
children: /* @__PURE__ */ jsxs("div", { className: cn("-z-10 flex w-full max-w-lg flex-col items-center text-center", isEditor ? "relative" : "absolute top-[50vh]"), children: [
|
|
91
|
-
/* @__PURE__ */ jsx("h3", { className: "text-5xl font-bold md:text-7xl lg:text-8xl", children: project.title }),
|
|
92
|
-
project.tags && /* @__PURE__ */ jsx("div", { className: "mt-4 flex flex-wrap justify-center gap-2", children: project.tags.map((tag, tagIndex) => /* @__PURE__ */ jsx("li", { className: "flex", children: /* @__PURE__ */ jsx("div", { className: "inline-flex border border-neutral-lightest bg-background-secondary px-2 py-1 text-sm font-semibold text-text-primary", children: tag.label }) }, tagIndex)) })
|
|
93
|
-
] })
|
|
94
|
-
}
|
|
95
|
-
),
|
|
96
|
-
/* @__PURE__ */ jsxs("div", { className: cn("z-10 flex items-center justify-center overflow-hidden", isEditor ? "relative h-auto" : "sticky top-0 h-screen"), children: [
|
|
97
|
-
/* @__PURE__ */ jsx("a", { href: "#", className: "inline-block max-w-full", children: /* @__PURE__ */ jsx("div", { className: cn("flex w-full max-w-lg items-center justify-center overflow-hidden", isEditor ? "h-auto" : "h-screen"), children: /* @__PURE__ */ jsx(
|
|
98
|
-
CompoundImage,
|
|
99
|
-
{
|
|
100
|
-
src: ((_a = project.imageCenter) == null ? void 0 : _a.src) ?? project.image.src,
|
|
101
|
-
alt: ((_b = project.imageCenter) == null ? void 0 : _b.alt) ?? project.image.alt,
|
|
102
|
-
className: "size-full object-contain"
|
|
103
|
-
}
|
|
104
|
-
) }) }),
|
|
105
|
-
/* @__PURE__ */ jsx("div", { className: cn("absolute inset-y-0 left-0 right-auto z-20 hidden w-full max-w-xxs lg:flex", isEditor ? "h-auto" : "h-screen"), children: /* @__PURE__ */ jsx(
|
|
106
|
-
motion.div,
|
|
106
|
+
return /* @__PURE__ */ jsxs(
|
|
107
|
+
SectionWrapper,
|
|
108
|
+
{
|
|
109
|
+
className: cn("relative px-[5%]", sectionClassName),
|
|
110
|
+
style: sectionStyle,
|
|
111
|
+
css,
|
|
112
|
+
children: [
|
|
113
|
+
/* @__PURE__ */ jsx("div", { ref: transformRef, className: "container", children: /* @__PURE__ */ jsx("div", { className: "py-6 md:py-8 lg:py-10", children: projects2.map((project, index) => {
|
|
114
|
+
var _a, _b, _c, _d, _e, _f;
|
|
115
|
+
return /* @__PURE__ */ jsxs(
|
|
116
|
+
"div",
|
|
117
|
+
{
|
|
118
|
+
className: cn(
|
|
119
|
+
"relative flex flex-col",
|
|
120
|
+
isEditor ? "h-auto mb-12" : "h-[500vh]",
|
|
107
121
|
{
|
|
108
|
-
|
|
109
|
-
style: isEditor ? { y: 0 } : computedStyles[index].imageLeftStyles,
|
|
110
|
-
children: /* @__PURE__ */ jsx(
|
|
111
|
-
CompoundImage,
|
|
112
|
-
{
|
|
113
|
-
src: ((_c = project.imageLeft) == null ? void 0 : _c.src) ?? project.image.src,
|
|
114
|
-
alt: ((_d = project.imageLeft) == null ? void 0 : _d.alt) ?? project.image.alt,
|
|
115
|
-
className: "w-full object-contain"
|
|
116
|
-
}
|
|
117
|
-
)
|
|
122
|
+
"mt-[-40vh]": !isEditor && index > 0
|
|
118
123
|
}
|
|
119
|
-
)
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
124
|
+
),
|
|
125
|
+
children: [
|
|
126
|
+
/* @__PURE__ */ jsx(
|
|
127
|
+
motion.div,
|
|
128
|
+
{
|
|
129
|
+
className: cn(
|
|
130
|
+
"flex justify-center",
|
|
131
|
+
isEditor ? "relative h-auto py-8" : "sticky top-0 h-[150vh]"
|
|
132
|
+
),
|
|
133
|
+
style: isEditor ? { opacity: 1, scale: 1 } : computedStyles[index].headerStyles,
|
|
134
|
+
children: /* @__PURE__ */ jsxs(
|
|
135
|
+
"div",
|
|
136
|
+
{
|
|
137
|
+
className: cn(
|
|
138
|
+
"-z-10 flex w-full max-w-lg flex-col items-center text-center",
|
|
139
|
+
isEditor ? "relative" : "absolute top-[50vh]"
|
|
140
|
+
),
|
|
141
|
+
children: [
|
|
142
|
+
/* @__PURE__ */ jsx("h3", { className: "text-5xl font-bold md:text-7xl lg:text-8xl", children: project.title }),
|
|
143
|
+
project.tags && /* @__PURE__ */ jsx("div", { className: "mt-4 flex flex-wrap justify-center gap-2", children: project.tags.map((tag, tagIndex) => /* @__PURE__ */ jsx("li", { className: "flex", children: /* @__PURE__ */ jsx("div", { className: "inline-flex border border-neutral-lightest bg-background-secondary px-2 py-1 text-sm font-semibold text-text-primary", children: tag.label }) }, tagIndex)) })
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
)
|
|
147
|
+
}
|
|
148
|
+
),
|
|
149
|
+
/* @__PURE__ */ jsxs(
|
|
150
|
+
"div",
|
|
151
|
+
{
|
|
152
|
+
className: cn(
|
|
153
|
+
"z-10 flex items-center justify-center overflow-hidden",
|
|
154
|
+
isEditor ? "relative h-auto" : "sticky top-0 h-screen"
|
|
155
|
+
),
|
|
156
|
+
children: [
|
|
157
|
+
/* @__PURE__ */ jsx("a", { href: "#", className: "inline-block max-w-full", children: /* @__PURE__ */ jsx(
|
|
158
|
+
"div",
|
|
159
|
+
{
|
|
160
|
+
className: cn(
|
|
161
|
+
"flex w-full max-w-5xl items-center justify-center overflow-hidden",
|
|
162
|
+
isEditor ? "h-auto" : "h-screen"
|
|
163
|
+
),
|
|
164
|
+
children: /* @__PURE__ */ jsx(
|
|
165
|
+
CompoundImage,
|
|
166
|
+
{
|
|
167
|
+
src: ((_a = project.imageCenter) == null ? void 0 : _a.src) ?? project.image.src,
|
|
168
|
+
alt: ((_b = project.imageCenter) == null ? void 0 : _b.alt) ?? project.image.alt,
|
|
169
|
+
className: "size-full object-contain"
|
|
170
|
+
}
|
|
171
|
+
)
|
|
172
|
+
}
|
|
173
|
+
) }),
|
|
174
|
+
/* @__PURE__ */ jsx(
|
|
175
|
+
"div",
|
|
176
|
+
{
|
|
177
|
+
className: cn(
|
|
178
|
+
"absolute inset-y-0 left-0 right-auto z-20 hidden w-full max-w-xs lg:flex",
|
|
179
|
+
isEditor ? "h-auto" : "h-screen"
|
|
180
|
+
),
|
|
181
|
+
children: /* @__PURE__ */ jsx(
|
|
182
|
+
motion.div,
|
|
183
|
+
{
|
|
184
|
+
className: cn(
|
|
185
|
+
"relative w-full",
|
|
186
|
+
isEditor ? "pt-0" : "pt-[100vh]"
|
|
187
|
+
),
|
|
188
|
+
style: isEditor ? { y: 0 } : computedStyles[index].imageLeftStyles,
|
|
189
|
+
children: /* @__PURE__ */ jsx(
|
|
190
|
+
CompoundImage,
|
|
191
|
+
{
|
|
192
|
+
src: ((_c = project.imageLeft) == null ? void 0 : _c.src) ?? project.image.src,
|
|
193
|
+
alt: ((_d = project.imageLeft) == null ? void 0 : _d.alt) ?? project.image.alt,
|
|
194
|
+
className: "w-full object-contain"
|
|
195
|
+
}
|
|
196
|
+
)
|
|
197
|
+
}
|
|
198
|
+
)
|
|
199
|
+
}
|
|
200
|
+
),
|
|
201
|
+
/* @__PURE__ */ jsx(
|
|
202
|
+
"div",
|
|
203
|
+
{
|
|
204
|
+
className: cn(
|
|
205
|
+
"absolute inset-y-0 left-auto right-0 z-20 hidden w-full max-w-xs lg:flex",
|
|
206
|
+
isEditor ? "h-auto" : "h-screen"
|
|
207
|
+
),
|
|
208
|
+
children: /* @__PURE__ */ jsx(
|
|
209
|
+
motion.div,
|
|
210
|
+
{
|
|
211
|
+
className: cn(
|
|
212
|
+
"relative w-full",
|
|
213
|
+
isEditor ? "pt-0" : "pt-[100vh]"
|
|
214
|
+
),
|
|
215
|
+
style: isEditor ? { y: 0 } : computedStyles[index].imageRightStyles,
|
|
216
|
+
children: /* @__PURE__ */ jsx(
|
|
217
|
+
CompoundImage,
|
|
218
|
+
{
|
|
219
|
+
src: ((_e = project.imageRight) == null ? void 0 : _e.src) ?? project.image.src,
|
|
220
|
+
alt: ((_f = project.imageRight) == null ? void 0 : _f.alt) ?? project.image.alt,
|
|
221
|
+
className: "w-full object-contain"
|
|
222
|
+
}
|
|
223
|
+
)
|
|
224
|
+
}
|
|
225
|
+
)
|
|
226
|
+
}
|
|
227
|
+
)
|
|
228
|
+
]
|
|
229
|
+
}
|
|
230
|
+
),
|
|
231
|
+
!isEditor && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 -z-10 mt-[100vh]" })
|
|
232
|
+
]
|
|
233
|
+
},
|
|
234
|
+
index
|
|
235
|
+
);
|
|
236
|
+
}) }) }),
|
|
237
|
+
!isEditor && /* @__PURE__ */ jsx("div", { className: "h-screen" })
|
|
238
|
+
]
|
|
239
|
+
}
|
|
240
|
+
);
|
|
144
241
|
};
|
|
145
242
|
const ScaleOpacityVariant = ({
|
|
146
|
-
projects,
|
|
243
|
+
projects: projects2,
|
|
147
244
|
sectionClassName,
|
|
148
245
|
sectionStyle,
|
|
149
246
|
css
|
|
@@ -155,77 +252,116 @@ const ScaleOpacityVariant = ({
|
|
|
155
252
|
target: containerRef,
|
|
156
253
|
...scrollContainerRef.current ? { container: scrollContainerRef } : {}
|
|
157
254
|
});
|
|
158
|
-
return /* @__PURE__ */ jsx(
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
255
|
+
return /* @__PURE__ */ jsx(
|
|
256
|
+
SectionWrapper,
|
|
257
|
+
{
|
|
258
|
+
ref: containerRef,
|
|
259
|
+
className: cn("relative px-[5%]", sectionClassName),
|
|
260
|
+
style: sectionStyle,
|
|
261
|
+
css,
|
|
262
|
+
children: /* @__PURE__ */ jsx("div", { className: isEditor ? "h-auto" : "h-[300vh]", children: /* @__PURE__ */ jsx(
|
|
263
|
+
"div",
|
|
264
|
+
{
|
|
265
|
+
className: cn(
|
|
266
|
+
"flex items-center justify-center",
|
|
267
|
+
isEditor ? "relative flex-col gap-8 py-12" : "sticky top-0 h-screen"
|
|
268
|
+
),
|
|
269
|
+
children: projects2.map((project, index) => {
|
|
270
|
+
const segmentSize = 1 / projects2.length;
|
|
271
|
+
const start = index * segmentSize;
|
|
272
|
+
const end = start + segmentSize;
|
|
273
|
+
const opacity = useTransform(
|
|
274
|
+
scrollYProgress,
|
|
275
|
+
[
|
|
276
|
+
start,
|
|
277
|
+
start + segmentSize * 0.15,
|
|
278
|
+
end - segmentSize * 0.15,
|
|
279
|
+
end
|
|
280
|
+
],
|
|
281
|
+
[0, 1, 1, 0]
|
|
282
|
+
);
|
|
283
|
+
const scale = useTransform(
|
|
284
|
+
scrollYProgress,
|
|
285
|
+
[
|
|
286
|
+
start,
|
|
287
|
+
start + segmentSize * 0.15,
|
|
288
|
+
end - segmentSize * 0.15,
|
|
289
|
+
end
|
|
290
|
+
],
|
|
291
|
+
[0.8, 1, 1, 0.8]
|
|
292
|
+
);
|
|
293
|
+
return /* @__PURE__ */ jsx(
|
|
294
|
+
motion.div,
|
|
295
|
+
{
|
|
296
|
+
style: isEditor ? { opacity: 1, scale: 1 } : { opacity, scale },
|
|
297
|
+
className: cn(
|
|
298
|
+
"flex items-center justify-center",
|
|
299
|
+
isEditor ? "relative w-full" : "absolute inset-0"
|
|
300
|
+
),
|
|
301
|
+
children: /* @__PURE__ */ jsxs("div", { className: "container max-w-4xl border border-border-primary bg-background-primary p-8 md:p-12", children: [
|
|
302
|
+
/* @__PURE__ */ jsx("div", { className: "mb-6", children: /* @__PURE__ */ jsx(
|
|
303
|
+
CompoundImage,
|
|
304
|
+
{
|
|
305
|
+
src: project.image.src,
|
|
306
|
+
alt: project.image.alt,
|
|
307
|
+
className: "aspect-video w-full object-cover"
|
|
308
|
+
}
|
|
309
|
+
) }),
|
|
310
|
+
/* @__PURE__ */ jsx("h3", { className: "mb-2 text-2xl font-bold md:text-3xl", children: project.title }),
|
|
311
|
+
/* @__PURE__ */ jsx("p", { children: project.description }),
|
|
312
|
+
project.tags && /* @__PURE__ */ jsx("div", { className: "mt-4 flex flex-wrap gap-2", children: project.tags.map((tag, tagIndex) => /* @__PURE__ */ jsx(
|
|
313
|
+
"span",
|
|
314
|
+
{
|
|
315
|
+
className: "bg-background-secondary px-2 py-1 text-sm font-semibold",
|
|
316
|
+
children: tag.label
|
|
317
|
+
},
|
|
318
|
+
tagIndex
|
|
319
|
+
)) })
|
|
320
|
+
] })
|
|
321
|
+
},
|
|
322
|
+
index
|
|
323
|
+
);
|
|
324
|
+
})
|
|
325
|
+
}
|
|
326
|
+
) })
|
|
327
|
+
}
|
|
328
|
+
);
|
|
201
329
|
};
|
|
202
|
-
const
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
src: "https://
|
|
207
|
-
|
|
330
|
+
const projects = [
|
|
331
|
+
{
|
|
332
|
+
title: "Project name",
|
|
333
|
+
description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.",
|
|
334
|
+
image: { src: "https://images.unsplash.com/photo-1547658719-da2b51169166?w=1200&h=800&fit=crop", alt: "Web design workspace" },
|
|
335
|
+
url: "#",
|
|
336
|
+
button: { label: "View project" },
|
|
337
|
+
tags: [{ label: "Tag one", url: "#" }, { label: "Tag two", url: "#" }, { label: "Tag three", url: "#" }],
|
|
338
|
+
imageCenter: { src: "https://images.unsplash.com/photo-1559028012-481c04fa702d?w=1000&h=660&fit=crop", alt: "Web design process" },
|
|
339
|
+
imageLeft: { src: "https://images.unsplash.com/photo-1581291518857-4e27b48ff24e?w=600&h=400&fit=crop", alt: "Wireframe sketches" },
|
|
340
|
+
imageRight: { src: "https://images.unsplash.com/photo-1551288049-bebda4e38f71?w=600&h=400&fit=crop", alt: "Analytics dashboard" }
|
|
208
341
|
},
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
{
|
|
213
|
-
|
|
214
|
-
{ label: "
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
src: "https://
|
|
218
|
-
alt: "
|
|
342
|
+
{
|
|
343
|
+
title: "Project name",
|
|
344
|
+
description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.",
|
|
345
|
+
image: { src: "https://images.unsplash.com/photo-1626785774573-4b799315345d?w=1200&h=800&fit=crop", alt: "Design studio" },
|
|
346
|
+
url: "#",
|
|
347
|
+
button: { label: "View project" },
|
|
348
|
+
tags: [{ label: "Tag one", url: "#" }, { label: "Tag two", url: "#" }, { label: "Tag three", url: "#" }],
|
|
349
|
+
imageCenter: { src: "https://images.unsplash.com/photo-1618004912476-29818d81ae2e?w=1000&h=660&fit=crop", alt: "Colorful abstract shapes" },
|
|
350
|
+
imageLeft: { src: "https://images.unsplash.com/photo-1561070791-2526d30994b5?w=600&h=400&fit=crop", alt: "Brand color palette" },
|
|
351
|
+
imageRight: { src: "https://images.unsplash.com/photo-1611532736597-de2d4265fba3?w=600&h=400&fit=crop", alt: "Typography design" }
|
|
219
352
|
},
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
353
|
+
{
|
|
354
|
+
title: "Project name",
|
|
355
|
+
description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.",
|
|
356
|
+
image: { src: "https://images.unsplash.com/photo-1512941937669-90a1b58e7e9c?w=1200&h=800&fit=crop", alt: "Mobile device" },
|
|
357
|
+
url: "#",
|
|
358
|
+
button: { label: "View project" },
|
|
359
|
+
tags: [{ label: "Tag one", url: "#" }, { label: "Tag two", url: "#" }, { label: "Tag three", url: "#" }],
|
|
360
|
+
imageCenter: { src: "https://images.unsplash.com/photo-1551650975-87deedd944c3?w=1000&h=660&fit=crop", alt: "App mockup" },
|
|
361
|
+
imageLeft: { src: "https://images.unsplash.com/photo-1522542550221-31fd19575a2d?w=600&h=400&fit=crop", alt: "Wireframe sketches" },
|
|
362
|
+
imageRight: { src: "https://images.unsplash.com/photo-1586953208448-b95a79798f07?w=600&h=400&fit=crop", alt: "Mobile app in use" }
|
|
227
363
|
}
|
|
228
|
-
|
|
364
|
+
];
|
|
229
365
|
const ScrollParallaxPortfolioDefaults = {
|
|
230
366
|
tagline: "",
|
|
231
367
|
heading: "",
|
|
@@ -233,21 +369,7 @@ const ScrollParallaxPortfolioDefaults = {
|
|
|
233
369
|
button: { label: "View all" },
|
|
234
370
|
buttons: [],
|
|
235
371
|
images: [],
|
|
236
|
-
projects
|
|
237
|
-
{ ...defaultProject },
|
|
238
|
-
{
|
|
239
|
-
...defaultProject,
|
|
240
|
-
imageCenter: { src: "https://picsum.photos/seed/spp-c2/800/1000", alt: "Center 2" },
|
|
241
|
-
imageLeft: { src: "https://picsum.photos/seed/spp-l2/400/600", alt: "Left 2" },
|
|
242
|
-
imageRight: { src: "https://picsum.photos/seed/spp-r2/400/600", alt: "Right 2" }
|
|
243
|
-
},
|
|
244
|
-
{
|
|
245
|
-
...defaultProject,
|
|
246
|
-
imageCenter: { src: "https://picsum.photos/seed/spp-c3/800/1000", alt: "Center 3" },
|
|
247
|
-
imageLeft: { src: "https://picsum.photos/seed/spp-l3/400/600", alt: "Left 3" },
|
|
248
|
-
imageRight: { src: "https://picsum.photos/seed/spp-r3/400/600", alt: "Right 3" }
|
|
249
|
-
}
|
|
250
|
-
],
|
|
372
|
+
projects,
|
|
251
373
|
hoverLinks: [],
|
|
252
374
|
styles: {
|
|
253
375
|
animation: "threeImageParallax"
|