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