@opensite/ui 0.7.0 → 0.7.2
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/blog-cards-read-time.cjs +1 -1
- package/dist/blog-cards-read-time.js +1 -1
- package/dist/blog-cards-tagline-cta.cjs +1 -1
- package/dist/blog-cards-tagline-cta.js +1 -1
- package/dist/blog-category-overlay.cjs +1 -1
- package/dist/blog-category-overlay.js +1 -1
- package/dist/blog-featured-popular.cjs +1 -1
- package/dist/blog-featured-popular.js +1 -1
- package/dist/blog-grid-author-cards.cjs +1 -1
- package/dist/blog-grid-author-cards.js +1 -1
- package/dist/blog-grid-nine-posts.cjs +1 -1
- package/dist/blog-grid-nine-posts.js +1 -1
- package/dist/blog-horizontal-cards.cjs +1 -1
- package/dist/blog-horizontal-cards.js +1 -1
- package/dist/blog-tech-insights.cjs +54 -45
- package/dist/blog-tech-insights.js +54 -45
- package/dist/carousel-animated-sections.cjs +1224 -0
- package/dist/carousel-animated-sections.d.cts +154 -0
- package/dist/carousel-animated-sections.d.ts +154 -0
- package/dist/carousel-animated-sections.js +1203 -0
- package/dist/carousel-auto-progress-slides.cjs +1156 -0
- package/dist/carousel-auto-progress-slides.d.cts +122 -0
- package/dist/carousel-auto-progress-slides.d.ts +122 -0
- package/dist/carousel-auto-progress-slides.js +1135 -0
- package/dist/carousel-autoplay-progress.cjs +1141 -0
- package/dist/carousel-autoplay-progress.d.cts +119 -0
- package/dist/carousel-autoplay-progress.d.ts +119 -0
- package/dist/carousel-autoplay-progress.js +1116 -0
- package/dist/carousel-feature-badge.cjs +1216 -0
- package/dist/carousel-feature-badge.d.cts +99 -0
- package/dist/carousel-feature-badge.d.ts +99 -0
- package/dist/carousel-feature-badge.js +1192 -0
- package/dist/carousel-fullscreen-scroll-fx.cjs +526 -0
- package/dist/carousel-fullscreen-scroll-fx.d.cts +122 -0
- package/dist/carousel-fullscreen-scroll-fx.d.ts +122 -0
- package/dist/carousel-fullscreen-scroll-fx.js +505 -0
- package/dist/carousel-gallery-thumbnails.cjs +1059 -0
- package/dist/carousel-gallery-thumbnails.d.cts +122 -0
- package/dist/carousel-gallery-thumbnails.d.ts +122 -0
- package/dist/carousel-gallery-thumbnails.js +1038 -0
- package/dist/carousel-horizontal-cards.cjs +1083 -0
- package/dist/carousel-horizontal-cards.d.cts +126 -0
- package/dist/carousel-horizontal-cards.d.ts +126 -0
- package/dist/carousel-horizontal-cards.js +1062 -0
- package/dist/carousel-image-hero.cjs +1075 -0
- package/dist/carousel-image-hero.d.cts +116 -0
- package/dist/carousel-image-hero.d.ts +116 -0
- package/dist/carousel-image-hero.js +1054 -0
- package/dist/carousel-multi-step-showcase.cjs +1146 -0
- package/dist/carousel-multi-step-showcase.d.cts +142 -0
- package/dist/carousel-multi-step-showcase.d.ts +142 -0
- package/dist/carousel-multi-step-showcase.js +1125 -0
- package/dist/carousel-portfolio-hero.cjs +1063 -0
- package/dist/carousel-portfolio-hero.d.cts +134 -0
- package/dist/carousel-portfolio-hero.d.ts +134 -0
- package/dist/carousel-portfolio-hero.js +1042 -0
- package/dist/carousel-product-feature-showcase.cjs +1127 -0
- package/dist/carousel-product-feature-showcase.d.cts +161 -0
- package/dist/carousel-product-feature-showcase.d.ts +161 -0
- package/dist/carousel-product-feature-showcase.js +1106 -0
- package/dist/carousel-progress-slider.cjs +597 -0
- package/dist/carousel-progress-slider.d.cts +122 -0
- package/dist/carousel-progress-slider.d.ts +122 -0
- package/dist/carousel-progress-slider.js +576 -0
- package/dist/carousel-scrolling-feature-showcase.cjs +530 -0
- package/dist/carousel-scrolling-feature-showcase.d.cts +126 -0
- package/dist/carousel-scrolling-feature-showcase.d.ts +126 -0
- package/dist/carousel-scrolling-feature-showcase.js +509 -0
- package/dist/registry.cjs +349 -238
- package/dist/registry.js +349 -238
- package/package.json +3 -2
|
@@ -0,0 +1,530 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var React3 = require('react');
|
|
5
|
+
var framerMotion = require('framer-motion');
|
|
6
|
+
var clsx = require('clsx');
|
|
7
|
+
var tailwindMerge = require('tailwind-merge');
|
|
8
|
+
var img = require('@page-speed/img');
|
|
9
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
10
|
+
|
|
11
|
+
function _interopNamespace(e) {
|
|
12
|
+
if (e && e.__esModule) return e;
|
|
13
|
+
var n = Object.create(null);
|
|
14
|
+
if (e) {
|
|
15
|
+
Object.keys(e).forEach(function (k) {
|
|
16
|
+
if (k !== 'default') {
|
|
17
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
18
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return e[k]; }
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
n.default = e;
|
|
26
|
+
return Object.freeze(n);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
var React3__namespace = /*#__PURE__*/_interopNamespace(React3);
|
|
30
|
+
|
|
31
|
+
// components/blocks/carousel/carousel-scrolling-feature-showcase.tsx
|
|
32
|
+
function cn(...inputs) {
|
|
33
|
+
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
34
|
+
}
|
|
35
|
+
var maxWidthStyles = {
|
|
36
|
+
sm: "max-w-screen-sm",
|
|
37
|
+
md: "max-w-screen-md",
|
|
38
|
+
lg: "max-w-screen-lg",
|
|
39
|
+
xl: "max-w-7xl",
|
|
40
|
+
"2xl": "max-w-screen-2xl",
|
|
41
|
+
"4xl": "max-w-[1536px]",
|
|
42
|
+
full: "max-w-full"
|
|
43
|
+
};
|
|
44
|
+
var Container = React3__namespace.default.forwardRef(
|
|
45
|
+
({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
|
|
46
|
+
const Component = as;
|
|
47
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
48
|
+
Component,
|
|
49
|
+
{
|
|
50
|
+
ref,
|
|
51
|
+
className: cn(
|
|
52
|
+
"mx-auto w-full px-2 sm:px-4 lg:px-8",
|
|
53
|
+
maxWidthStyles[maxWidth],
|
|
54
|
+
className
|
|
55
|
+
),
|
|
56
|
+
...props,
|
|
57
|
+
children
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
Container.displayName = "Container";
|
|
63
|
+
|
|
64
|
+
// lib/patternSvgs.ts
|
|
65
|
+
var patternSvgs = {
|
|
66
|
+
squareAltGrid: "https://cdn.ing/assets/files/record/286187/4gpn0yq2ptra8iwlvmwwv860ggwv",
|
|
67
|
+
grid1: "https://cdn.ing/assets/files/record/286186/nbdflpgp4ostrno079hygibsflp3",
|
|
68
|
+
noise: "https://cdn.ing/assets/i/r/286188/zrqcp9hynh3j7p2laihwzfbujgrl/noise.png",
|
|
69
|
+
dots: "https://cdn.ing/assets/files/record/286198/yfsjx9thvtxzhl2qtshxyhkrm524",
|
|
70
|
+
dotPattern: "https://cdn.ing/assets/files/record/286192/7ig0cku8aqbboiza8nuk6hw0nnsr",
|
|
71
|
+
dotPattern2: "https://cdn.ing/assets/files/record/286189/arez6gd2s7isn9i1o6c7sexdq7bl",
|
|
72
|
+
circles: "https://cdn.ing/assets/files/record/286190/gtmia3sncjtzetdshc20zf1d3c17",
|
|
73
|
+
waves: "https://cdn.ing/assets/files/record/286191/mqlb33fzxz9cdth1bx7if0wmpkp1",
|
|
74
|
+
crossPattern: "https://cdn.ing/assets/files/record/286193/9yfqwdbnqaipbp7fsb3wbzzmq472",
|
|
75
|
+
architect: "https://cdn.ing/assets/files/record/286194/vgs88ugpvyhxu13wqgy0acvae6re",
|
|
76
|
+
tinyCheckers: "https://cdn.ing/assets/files/record/286195/65efaknsw8kcpf9o3c2gybytsl5b",
|
|
77
|
+
p6: "https://cdn.ing/assets/i/r/286196/6kl0rqnd6mjk8j7e525fo8fo0vkc/p6.webp"
|
|
78
|
+
};
|
|
79
|
+
var maskTop = "radial-gradient(ellipse 70% 60% at 50% 0%, #000 60%, transparent 100%)";
|
|
80
|
+
var maskBottom = "radial-gradient(ellipse 100% 80% at 50% 100%, #000 50%, transparent 90%)";
|
|
81
|
+
var maskCenter = "radial-gradient(ellipse 60% 60% at 50% 50%, #000 30%, transparent 70%)";
|
|
82
|
+
var maskTopLeft = "radial-gradient(ellipse 80% 80% at 0% 0%, #000 50%, transparent 90%)";
|
|
83
|
+
var maskTopRight = "radial-gradient(ellipse 80% 80% at 100% 0%, #000 50%, transparent 90%)";
|
|
84
|
+
var maskBottomLeft = "radial-gradient(ellipse 80% 80% at 0% 100%, #000 50%, transparent 90%)";
|
|
85
|
+
var maskBottomRight = "radial-gradient(ellipse 80% 80% at 100% 100%, #000 50%, transparent 90%)";
|
|
86
|
+
var circuitBoardPattern = (id, mask) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
87
|
+
"svg",
|
|
88
|
+
{
|
|
89
|
+
className: "h-full w-full",
|
|
90
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
91
|
+
style: mask ? {
|
|
92
|
+
maskImage: mask,
|
|
93
|
+
WebkitMaskImage: mask
|
|
94
|
+
} : void 0,
|
|
95
|
+
children: [
|
|
96
|
+
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
97
|
+
"pattern",
|
|
98
|
+
{
|
|
99
|
+
id,
|
|
100
|
+
x: "0",
|
|
101
|
+
y: "0",
|
|
102
|
+
width: "100",
|
|
103
|
+
height: "100",
|
|
104
|
+
patternUnits: "userSpaceOnUse",
|
|
105
|
+
children: [
|
|
106
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
107
|
+
"path",
|
|
108
|
+
{
|
|
109
|
+
d: "M0 50h40M60 50h40M50 0v40M50 60v40",
|
|
110
|
+
stroke: "hsl(var(--muted))",
|
|
111
|
+
strokeWidth: "1",
|
|
112
|
+
fill: "none"
|
|
113
|
+
}
|
|
114
|
+
),
|
|
115
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "50", cy: "50", r: "3", fill: "hsl(var(--muted))" }),
|
|
116
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "0", cy: "50", r: "2", fill: "hsl(var(--muted))" }),
|
|
117
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "100", cy: "50", r: "2", fill: "hsl(var(--muted))" }),
|
|
118
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "50", cy: "0", r: "2", fill: "hsl(var(--muted))" }),
|
|
119
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "50", cy: "100", r: "2", fill: "hsl(var(--muted))" })
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
) }),
|
|
123
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { width: "100%", height: "100%", fill: `url(#${id})` })
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
);
|
|
127
|
+
var gridDotsPattern = (id, mask) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
128
|
+
"svg",
|
|
129
|
+
{
|
|
130
|
+
className: "h-full w-full",
|
|
131
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
132
|
+
style: mask ? {
|
|
133
|
+
maskImage: mask,
|
|
134
|
+
WebkitMaskImage: mask
|
|
135
|
+
} : void 0,
|
|
136
|
+
children: [
|
|
137
|
+
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
138
|
+
"pattern",
|
|
139
|
+
{
|
|
140
|
+
id,
|
|
141
|
+
x: "0",
|
|
142
|
+
y: "0",
|
|
143
|
+
width: "40",
|
|
144
|
+
height: "40",
|
|
145
|
+
patternUnits: "userSpaceOnUse",
|
|
146
|
+
children: [
|
|
147
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
148
|
+
"path",
|
|
149
|
+
{
|
|
150
|
+
d: "M0 20h40M20 0v40",
|
|
151
|
+
stroke: "hsl(var(--muted))",
|
|
152
|
+
strokeWidth: "0.5",
|
|
153
|
+
fill: "none"
|
|
154
|
+
}
|
|
155
|
+
),
|
|
156
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "20", cy: "20", r: "2", fill: "hsl(var(--muted))" })
|
|
157
|
+
]
|
|
158
|
+
}
|
|
159
|
+
) }),
|
|
160
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { width: "100%", height: "100%", fill: `url(#${id})` })
|
|
161
|
+
]
|
|
162
|
+
}
|
|
163
|
+
);
|
|
164
|
+
var gridPattern = (size, mask) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
165
|
+
"div",
|
|
166
|
+
{
|
|
167
|
+
className: "h-full w-full bg-[linear-gradient(to_right,_hsl(var(--muted))_1px,_transparent_1px),linear-gradient(to_bottom,_hsl(var(--muted))_1px,_transparent_1px)]",
|
|
168
|
+
style: {
|
|
169
|
+
backgroundSize: `${size}px ${size}px`,
|
|
170
|
+
...mask ? {
|
|
171
|
+
maskImage: mask,
|
|
172
|
+
WebkitMaskImage: mask
|
|
173
|
+
} : {}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
);
|
|
177
|
+
var diagonalCrossPattern = (mask) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
178
|
+
"div",
|
|
179
|
+
{
|
|
180
|
+
className: "h-full w-full",
|
|
181
|
+
style: {
|
|
182
|
+
backgroundImage: "repeating-linear-gradient(45deg, transparent, transparent 32px, hsl(var(--muted)) 32px, hsl(var(--muted)) 33px), repeating-linear-gradient(135deg, transparent, transparent 32px, hsl(var(--muted)) 32px, hsl(var(--muted)) 33px)",
|
|
183
|
+
...mask ? {
|
|
184
|
+
maskImage: mask,
|
|
185
|
+
WebkitMaskImage: mask
|
|
186
|
+
} : {}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
);
|
|
190
|
+
var dashedGridMaskBase = "repeating-linear-gradient(to right, black 0px, black 3px, transparent 3px, transparent 8px), repeating-linear-gradient(to bottom, black 0px, black 3px, transparent 3px, transparent 8px)";
|
|
191
|
+
var dashedGridPattern = (fadeMask) => {
|
|
192
|
+
const mask = fadeMask ? `${dashedGridMaskBase}, ${fadeMask}` : dashedGridMaskBase;
|
|
193
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
194
|
+
"div",
|
|
195
|
+
{
|
|
196
|
+
className: "h-full w-full",
|
|
197
|
+
style: {
|
|
198
|
+
backgroundImage: "linear-gradient(to right, hsl(var(--muted)) 1px, transparent 1px), linear-gradient(to bottom, hsl(var(--muted)) 1px, transparent 1px)",
|
|
199
|
+
backgroundSize: "20px 20px",
|
|
200
|
+
backgroundPosition: "0 0, 0 0",
|
|
201
|
+
maskImage: mask,
|
|
202
|
+
WebkitMaskImage: mask,
|
|
203
|
+
maskComposite: "intersect",
|
|
204
|
+
WebkitMaskComposite: "source-in"
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
);
|
|
208
|
+
};
|
|
209
|
+
var gradientGlow = (position) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
210
|
+
"div",
|
|
211
|
+
{
|
|
212
|
+
className: cn(
|
|
213
|
+
"pointer-events-none absolute left-1/2 z-0 aspect-square w-3/4 -translate-x-1/2 rounded-full opacity-50 blur-3xl",
|
|
214
|
+
position === "top" ? "-top-1/4" : "-bottom-1/4"
|
|
215
|
+
),
|
|
216
|
+
style: {
|
|
217
|
+
background: "radial-gradient(circle, hsl(var(--primary)) 0%, transparent 70%)"
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
);
|
|
221
|
+
var spotlight = (position) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
222
|
+
"div",
|
|
223
|
+
{
|
|
224
|
+
className: cn(
|
|
225
|
+
"pointer-events-none absolute top-1/2 z-0 aspect-square w-3/4 -translate-y-1/2 rounded-full opacity-40 blur-3xl",
|
|
226
|
+
position === "left" ? "-left-1/4" : "-right-1/4"
|
|
227
|
+
),
|
|
228
|
+
style: {
|
|
229
|
+
background: "radial-gradient(circle, hsl(var(--primary)) 0%, transparent 70%)"
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
);
|
|
233
|
+
var patternOverlays = {
|
|
234
|
+
circuitBoardBasic: () => circuitBoardPattern("circuit-board-basic"),
|
|
235
|
+
circuitBoardFadeTop: () => circuitBoardPattern("circuit-board-fade-top", maskTop),
|
|
236
|
+
circuitBoardFadeBottom: () => circuitBoardPattern("circuit-board-fade-bottom", maskBottom),
|
|
237
|
+
circuitBoardFadeCenter: () => circuitBoardPattern("circuit-board-fade-center", maskCenter),
|
|
238
|
+
circuitBoardFadeTopLeft: () => circuitBoardPattern("circuit-board-fade-top-left", maskTopLeft),
|
|
239
|
+
circuitBoardFadeTopRight: () => circuitBoardPattern("circuit-board-fade-top-right", maskTopRight),
|
|
240
|
+
circuitBoardFadeBottomLeft: () => circuitBoardPattern("circuit-board-fade-bottom-left", maskBottomLeft),
|
|
241
|
+
circuitBoardFadeBottomRight: () => circuitBoardPattern("circuit-board-fade-bottom-right", maskBottomRight),
|
|
242
|
+
dashedGridBasic: () => dashedGridPattern(),
|
|
243
|
+
dashedGridFadeTop: () => dashedGridPattern(maskTop),
|
|
244
|
+
dashedGridFadeBottom: () => dashedGridPattern(maskBottom),
|
|
245
|
+
dashedGridFadeCenter: () => dashedGridPattern(maskCenter),
|
|
246
|
+
dashedGridFadeTopLeft: () => dashedGridPattern(maskTopLeft),
|
|
247
|
+
dashedGridFadeTopRight: () => dashedGridPattern(maskTopRight),
|
|
248
|
+
dashedGridFadeBottomLeft: () => dashedGridPattern(maskBottomLeft),
|
|
249
|
+
dashedGridFadeBottomRight: () => dashedGridPattern(maskBottomRight),
|
|
250
|
+
diagonalCrossBasic: () => diagonalCrossPattern(),
|
|
251
|
+
diagonalCrossFadeTop: () => diagonalCrossPattern(maskTop),
|
|
252
|
+
diagonalCrossFadeBottom: () => diagonalCrossPattern(maskBottom),
|
|
253
|
+
diagonalCrossFadeCenter: () => diagonalCrossPattern(maskCenter),
|
|
254
|
+
diagonalCrossFadeTopLeft: () => diagonalCrossPattern(maskTopLeft),
|
|
255
|
+
diagonalCrossFadeTopRight: () => diagonalCrossPattern(maskTopRight),
|
|
256
|
+
diagonalCrossFadeBottomLeft: () => diagonalCrossPattern(maskBottomLeft),
|
|
257
|
+
diagonalCrossFadeBottomRight: () => diagonalCrossPattern(maskBottomRight),
|
|
258
|
+
gridBasic: () => gridPattern(40),
|
|
259
|
+
gridFadeTop: () => gridPattern(32, maskTop),
|
|
260
|
+
gridFadeBottom: () => gridPattern(32, maskBottom),
|
|
261
|
+
gridFadeCenter: () => gridPattern(40, maskCenter),
|
|
262
|
+
gridFadeTopLeft: () => gridPattern(32, maskTopLeft),
|
|
263
|
+
gridFadeTopRight: () => gridPattern(32, maskTopRight),
|
|
264
|
+
gridFadeBottomLeft: () => gridPattern(32, maskBottomLeft),
|
|
265
|
+
gridFadeBottomRight: () => gridPattern(32, maskBottomRight),
|
|
266
|
+
gridDotsBasic: () => gridDotsPattern("grid-dots-basic"),
|
|
267
|
+
gridDotsFadeCenter: () => gridDotsPattern("grid-dots-fade-center", maskCenter),
|
|
268
|
+
gradientGlowTop: () => gradientGlow("top"),
|
|
269
|
+
gradientGlowBottom: () => gradientGlow("bottom"),
|
|
270
|
+
spotlightLeft: () => spotlight("left"),
|
|
271
|
+
spotlightRight: () => spotlight("right")
|
|
272
|
+
};
|
|
273
|
+
var inlinePatternStyles = {
|
|
274
|
+
radialGradientTop: {
|
|
275
|
+
background: "radial-gradient(125% 125% at 50% 10%, hsl(var(--background)) 40%, hsl(var(--primary)) 100%)"
|
|
276
|
+
},
|
|
277
|
+
radialGradientBottom: {
|
|
278
|
+
background: "radial-gradient(125% 125% at 50% 90%, hsl(var(--background)) 40%, hsl(var(--primary)) 100%)"
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
function PatternBackground({
|
|
282
|
+
pattern,
|
|
283
|
+
opacity = 0.08,
|
|
284
|
+
className,
|
|
285
|
+
style
|
|
286
|
+
}) {
|
|
287
|
+
if (!pattern) {
|
|
288
|
+
return null;
|
|
289
|
+
}
|
|
290
|
+
if (pattern in inlinePatternStyles) {
|
|
291
|
+
const inlineStyle = inlinePatternStyles[pattern];
|
|
292
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
293
|
+
"div",
|
|
294
|
+
{
|
|
295
|
+
className: cn("pointer-events-none absolute inset-0 z-0", className),
|
|
296
|
+
style: { ...inlineStyle, opacity, ...style },
|
|
297
|
+
"aria-hidden": "true"
|
|
298
|
+
}
|
|
299
|
+
);
|
|
300
|
+
}
|
|
301
|
+
if (pattern in patternOverlays) {
|
|
302
|
+
const Overlay = patternOverlays[pattern];
|
|
303
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
304
|
+
"div",
|
|
305
|
+
{
|
|
306
|
+
className: cn("pointer-events-none absolute inset-0 z-0", className),
|
|
307
|
+
style: { opacity, ...style },
|
|
308
|
+
"aria-hidden": "true",
|
|
309
|
+
children: Overlay()
|
|
310
|
+
}
|
|
311
|
+
);
|
|
312
|
+
}
|
|
313
|
+
const patternUrl = pattern in patternSvgs ? patternSvgs[pattern] : pattern;
|
|
314
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
315
|
+
"div",
|
|
316
|
+
{
|
|
317
|
+
className: cn("pointer-events-none absolute inset-0 z-0", className),
|
|
318
|
+
style: {
|
|
319
|
+
backgroundImage: `url(${patternUrl})`,
|
|
320
|
+
backgroundRepeat: "repeat",
|
|
321
|
+
backgroundSize: "auto",
|
|
322
|
+
opacity,
|
|
323
|
+
...style
|
|
324
|
+
},
|
|
325
|
+
"aria-hidden": "true"
|
|
326
|
+
}
|
|
327
|
+
);
|
|
328
|
+
}
|
|
329
|
+
var backgroundStyles = {
|
|
330
|
+
default: "bg-background text-foreground",
|
|
331
|
+
white: "bg-white text-dark",
|
|
332
|
+
gray: "bg-muted/30 text-foreground",
|
|
333
|
+
dark: "bg-foreground text-background",
|
|
334
|
+
transparent: "bg-transparent text-foreground",
|
|
335
|
+
gradient: "bg-linear-to-br from-primary via-primary/90 to-foreground text-primary-foreground",
|
|
336
|
+
primary: "bg-primary text-primary-foreground",
|
|
337
|
+
secondary: "bg-secondary text-secondary-foreground",
|
|
338
|
+
muted: "bg-muted text-muted-foreground"
|
|
339
|
+
};
|
|
340
|
+
var spacingStyles = {
|
|
341
|
+
none: "py-0 md:py-0",
|
|
342
|
+
sm: "py-12 md:py-16",
|
|
343
|
+
md: "py-16 md:py-24",
|
|
344
|
+
lg: "py-20 md:py-32",
|
|
345
|
+
xl: "py-24 md:py-40"
|
|
346
|
+
};
|
|
347
|
+
var predefinedSpacings = ["none", "sm", "md", "lg", "xl"];
|
|
348
|
+
var isPredefinedSpacing = (spacing) => predefinedSpacings.includes(spacing);
|
|
349
|
+
var Section = React3__namespace.default.forwardRef(
|
|
350
|
+
({
|
|
351
|
+
id,
|
|
352
|
+
title,
|
|
353
|
+
subtitle,
|
|
354
|
+
children,
|
|
355
|
+
className,
|
|
356
|
+
style,
|
|
357
|
+
background = "default",
|
|
358
|
+
spacing = "lg",
|
|
359
|
+
pattern,
|
|
360
|
+
patternOpacity,
|
|
361
|
+
patternClassName,
|
|
362
|
+
containerClassName,
|
|
363
|
+
containerMaxWidth = "xl",
|
|
364
|
+
...props
|
|
365
|
+
}, ref) => {
|
|
366
|
+
const effectivePatternOpacity = patternOpacity !== void 0 ? patternOpacity : pattern ? 1 : 0;
|
|
367
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
368
|
+
"section",
|
|
369
|
+
{
|
|
370
|
+
ref,
|
|
371
|
+
id,
|
|
372
|
+
className: cn(
|
|
373
|
+
"relative",
|
|
374
|
+
pattern ? "overflow-hidden" : null,
|
|
375
|
+
backgroundStyles[background],
|
|
376
|
+
isPredefinedSpacing(spacing) ? spacingStyles[spacing] : spacing,
|
|
377
|
+
className
|
|
378
|
+
),
|
|
379
|
+
style,
|
|
380
|
+
...props,
|
|
381
|
+
children: [
|
|
382
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
383
|
+
PatternBackground,
|
|
384
|
+
{
|
|
385
|
+
pattern,
|
|
386
|
+
opacity: effectivePatternOpacity,
|
|
387
|
+
className: patternClassName
|
|
388
|
+
}
|
|
389
|
+
),
|
|
390
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
391
|
+
Container,
|
|
392
|
+
{
|
|
393
|
+
maxWidth: containerMaxWidth,
|
|
394
|
+
className: cn("relative z-10", containerClassName),
|
|
395
|
+
children: [
|
|
396
|
+
(title || subtitle) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-12 text-center md:mb-16", children: [
|
|
397
|
+
subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-sm font-semibold uppercase tracking-wider text-primary", children: subtitle }),
|
|
398
|
+
title && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-3xl font-bold tracking-tight md:text-4xl lg:text-5xl", children: title })
|
|
399
|
+
] }),
|
|
400
|
+
children
|
|
401
|
+
]
|
|
402
|
+
}
|
|
403
|
+
)
|
|
404
|
+
]
|
|
405
|
+
}
|
|
406
|
+
);
|
|
407
|
+
}
|
|
408
|
+
);
|
|
409
|
+
Section.displayName = "Section";
|
|
410
|
+
function CarouselScrollingFeatureShowcase({
|
|
411
|
+
heading,
|
|
412
|
+
subheading,
|
|
413
|
+
features,
|
|
414
|
+
featuresSlot,
|
|
415
|
+
className,
|
|
416
|
+
containerClassName,
|
|
417
|
+
headerClassName,
|
|
418
|
+
headingClassName,
|
|
419
|
+
subheadingClassName,
|
|
420
|
+
contentClassName,
|
|
421
|
+
imageClassName,
|
|
422
|
+
featuresClassName,
|
|
423
|
+
numberBadgeClassName,
|
|
424
|
+
optixFlowConfig,
|
|
425
|
+
background = "white",
|
|
426
|
+
spacing = "xl",
|
|
427
|
+
pattern,
|
|
428
|
+
patternOpacity
|
|
429
|
+
}) {
|
|
430
|
+
const [activeFeature, setActiveFeature] = React3__namespace.useState(
|
|
431
|
+
features?.[0]?.id ?? ""
|
|
432
|
+
);
|
|
433
|
+
const containerRef = React3__namespace.useRef(null);
|
|
434
|
+
const { scrollYProgress } = framerMotion.useScroll({
|
|
435
|
+
target: containerRef,
|
|
436
|
+
offset: ["start start", "end end"]
|
|
437
|
+
});
|
|
438
|
+
const imageOpacity = framerMotion.useTransform(scrollYProgress, [0, 0.1], [0, 1]);
|
|
439
|
+
React3__namespace.useEffect(() => {
|
|
440
|
+
const observers = [];
|
|
441
|
+
features?.forEach((feature) => {
|
|
442
|
+
const element = document.getElementById(feature.id);
|
|
443
|
+
if (element) {
|
|
444
|
+
const observer = new IntersectionObserver(
|
|
445
|
+
(entries) => {
|
|
446
|
+
entries.forEach((entry) => {
|
|
447
|
+
if (entry.isIntersecting) {
|
|
448
|
+
setActiveFeature(feature.id);
|
|
449
|
+
}
|
|
450
|
+
});
|
|
451
|
+
},
|
|
452
|
+
{ threshold: 0.5 }
|
|
453
|
+
);
|
|
454
|
+
observer.observe(element);
|
|
455
|
+
observers.push(observer);
|
|
456
|
+
}
|
|
457
|
+
});
|
|
458
|
+
return () => {
|
|
459
|
+
observers.forEach((observer) => observer.disconnect());
|
|
460
|
+
};
|
|
461
|
+
}, [features]);
|
|
462
|
+
const activeFeatureData = features?.find((f) => f.id === activeFeature);
|
|
463
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
464
|
+
Section,
|
|
465
|
+
{
|
|
466
|
+
ref: containerRef,
|
|
467
|
+
background,
|
|
468
|
+
spacing,
|
|
469
|
+
className: cn(className),
|
|
470
|
+
pattern,
|
|
471
|
+
patternOpacity,
|
|
472
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("container mx-auto px-4", containerClassName), children: [
|
|
473
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("py-16 text-center", headerClassName), children: [
|
|
474
|
+
heading && (typeof heading === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h2", { className: cn("text-3xl font-bold tracking-tight md:text-4xl", headingClassName), children: heading }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: headingClassName, children: heading })),
|
|
475
|
+
subheading && (typeof subheading === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("mt-4 text-lg text-muted-foreground", subheadingClassName), children: subheading }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mt-4", subheadingClassName), children: subheading }))
|
|
476
|
+
] }),
|
|
477
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("grid gap-8 lg:grid-cols-2", contentClassName), children: [
|
|
478
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden lg:block", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sticky top-24", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
479
|
+
framerMotion.motion.div,
|
|
480
|
+
{
|
|
481
|
+
style: { opacity: imageOpacity },
|
|
482
|
+
className: cn("aspect-video overflow-hidden rounded-xl", imageClassName),
|
|
483
|
+
children: activeFeatureData && /* @__PURE__ */ jsxRuntime.jsx(
|
|
484
|
+
img.Img,
|
|
485
|
+
{
|
|
486
|
+
src: activeFeatureData.image,
|
|
487
|
+
alt: typeof activeFeatureData.title === "string" ? activeFeatureData.title : `Feature ${activeFeatureData.id}`,
|
|
488
|
+
className: cn("h-full w-full object-cover transition-all duration-500", activeFeatureData.imageClassName),
|
|
489
|
+
optixFlowConfig
|
|
490
|
+
}
|
|
491
|
+
)
|
|
492
|
+
}
|
|
493
|
+
) }) }),
|
|
494
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("space-y-32 py-16", featuresClassName), children: featuresSlot ? featuresSlot : features?.map((feature, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
495
|
+
"div",
|
|
496
|
+
{
|
|
497
|
+
id: feature.id,
|
|
498
|
+
className: cn(
|
|
499
|
+
"min-h-[50vh] transition-opacity duration-300",
|
|
500
|
+
activeFeature === feature.id ? "opacity-100" : "opacity-50",
|
|
501
|
+
feature.className
|
|
502
|
+
),
|
|
503
|
+
children: [
|
|
504
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-6 lg:hidden", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "aspect-video overflow-hidden rounded-lg", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
505
|
+
img.Img,
|
|
506
|
+
{
|
|
507
|
+
src: feature.image,
|
|
508
|
+
alt: typeof feature.title === "string" ? feature.title : `Feature ${feature.id}`,
|
|
509
|
+
className: cn("h-full w-full object-cover", feature.imageClassName),
|
|
510
|
+
optixFlowConfig
|
|
511
|
+
}
|
|
512
|
+
) }) }),
|
|
513
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-4", children: [
|
|
514
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-primary text-primary-foreground", numberBadgeClassName), children: index + 1 }),
|
|
515
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
516
|
+
feature.title && (typeof feature.title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-2xl font-semibold", children: feature.title }) : /* @__PURE__ */ jsxRuntime.jsx("div", { children: feature.title })),
|
|
517
|
+
feature.description && (typeof feature.description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-4 text-lg text-muted-foreground", children: feature.description }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4", children: feature.description }))
|
|
518
|
+
] })
|
|
519
|
+
] })
|
|
520
|
+
]
|
|
521
|
+
},
|
|
522
|
+
feature.id
|
|
523
|
+
)) })
|
|
524
|
+
] })
|
|
525
|
+
] })
|
|
526
|
+
}
|
|
527
|
+
);
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
exports.CarouselScrollingFeatureShowcase = CarouselScrollingFeatureShowcase;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { P as PatternName } from './pattern-background-a7gKHzHy.cjs';
|
|
3
|
+
import { f as SectionBackground, g as SectionSpacing } from './community-initiatives-Sm_ZSgyv.cjs';
|
|
4
|
+
import { O as OptixFlowConfig } from './blocks-Cohq4eio.cjs';
|
|
5
|
+
import 'react/jsx-runtime';
|
|
6
|
+
import 'class-variance-authority';
|
|
7
|
+
import './button-variants-lRElsmTc.cjs';
|
|
8
|
+
import 'class-variance-authority/types';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* CarouselScrollingFeatureShowcase
|
|
12
|
+
*
|
|
13
|
+
* A scroll-driven feature showcase with a sticky image panel that updates
|
|
14
|
+
* as users scroll through feature descriptions. Features smooth transitions
|
|
15
|
+
* between feature images with intersection observer-based activation.
|
|
16
|
+
*
|
|
17
|
+
* Use cases:
|
|
18
|
+
* - Product feature deep-dives with visual context
|
|
19
|
+
* - Long-form content with synchronized imagery
|
|
20
|
+
* - Documentation pages with visual examples
|
|
21
|
+
* - Marketing pages with scroll-based storytelling
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
interface FeatureItem {
|
|
25
|
+
/**
|
|
26
|
+
* Unique identifier for the feature
|
|
27
|
+
*/
|
|
28
|
+
id: string;
|
|
29
|
+
/**
|
|
30
|
+
* Feature title
|
|
31
|
+
*/
|
|
32
|
+
title?: React.ReactNode;
|
|
33
|
+
/**
|
|
34
|
+
* Feature description
|
|
35
|
+
*/
|
|
36
|
+
description?: React.ReactNode;
|
|
37
|
+
/**
|
|
38
|
+
* Image source URL
|
|
39
|
+
*/
|
|
40
|
+
image: string;
|
|
41
|
+
/**
|
|
42
|
+
* Additional CSS classes for the feature
|
|
43
|
+
*/
|
|
44
|
+
className?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Additional CSS classes for the image
|
|
47
|
+
*/
|
|
48
|
+
imageClassName?: string;
|
|
49
|
+
}
|
|
50
|
+
interface CarouselScrollingFeatureShowcaseProps {
|
|
51
|
+
/**
|
|
52
|
+
* Main heading content
|
|
53
|
+
*/
|
|
54
|
+
heading?: React.ReactNode;
|
|
55
|
+
/**
|
|
56
|
+
* Subheading/description text
|
|
57
|
+
*/
|
|
58
|
+
subheading?: React.ReactNode;
|
|
59
|
+
/**
|
|
60
|
+
* Array of feature items
|
|
61
|
+
*/
|
|
62
|
+
features?: FeatureItem[];
|
|
63
|
+
/**
|
|
64
|
+
* Custom slot for rendering features (overrides features array)
|
|
65
|
+
*/
|
|
66
|
+
featuresSlot?: React.ReactNode;
|
|
67
|
+
/**
|
|
68
|
+
* Additional CSS classes for the section
|
|
69
|
+
*/
|
|
70
|
+
className?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Additional CSS classes for the container
|
|
73
|
+
*/
|
|
74
|
+
containerClassName?: string;
|
|
75
|
+
/**
|
|
76
|
+
* Additional CSS classes for the header
|
|
77
|
+
*/
|
|
78
|
+
headerClassName?: string;
|
|
79
|
+
/**
|
|
80
|
+
* Additional CSS classes for the heading
|
|
81
|
+
*/
|
|
82
|
+
headingClassName?: string;
|
|
83
|
+
/**
|
|
84
|
+
* Additional CSS classes for the subheading
|
|
85
|
+
*/
|
|
86
|
+
subheadingClassName?: string;
|
|
87
|
+
/**
|
|
88
|
+
* Additional CSS classes for the content grid
|
|
89
|
+
*/
|
|
90
|
+
contentClassName?: string;
|
|
91
|
+
/**
|
|
92
|
+
* Additional CSS classes for the sticky image panel
|
|
93
|
+
*/
|
|
94
|
+
imageClassName?: string;
|
|
95
|
+
/**
|
|
96
|
+
* Additional CSS classes for the feature descriptions area
|
|
97
|
+
*/
|
|
98
|
+
featuresClassName?: string;
|
|
99
|
+
/**
|
|
100
|
+
* Additional CSS classes for the feature number badge
|
|
101
|
+
*/
|
|
102
|
+
numberBadgeClassName?: string;
|
|
103
|
+
/**
|
|
104
|
+
* OptixFlow image optimization configuration
|
|
105
|
+
*/
|
|
106
|
+
optixFlowConfig?: OptixFlowConfig;
|
|
107
|
+
/**
|
|
108
|
+
* Background style for the section
|
|
109
|
+
*/
|
|
110
|
+
background?: SectionBackground;
|
|
111
|
+
/**
|
|
112
|
+
* Vertical spacing for the section
|
|
113
|
+
*/
|
|
114
|
+
spacing?: SectionSpacing;
|
|
115
|
+
/**
|
|
116
|
+
* Optional background pattern name or URL
|
|
117
|
+
*/
|
|
118
|
+
pattern?: PatternName | undefined;
|
|
119
|
+
/**
|
|
120
|
+
* Pattern overlay opacity (0-1)
|
|
121
|
+
*/
|
|
122
|
+
patternOpacity?: number;
|
|
123
|
+
}
|
|
124
|
+
declare function CarouselScrollingFeatureShowcase({ heading, subheading, features, featuresSlot, className, containerClassName, headerClassName, headingClassName, subheadingClassName, contentClassName, imageClassName, featuresClassName, numberBadgeClassName, optixFlowConfig, background, spacing, pattern, patternOpacity, }: CarouselScrollingFeatureShowcaseProps): React.JSX.Element;
|
|
125
|
+
|
|
126
|
+
export { CarouselScrollingFeatureShowcase, type CarouselScrollingFeatureShowcaseProps, type FeatureItem };
|