@opensite/ui 0.8.4 → 0.8.5

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 (51) hide show
  1. package/dist/article-breadcrumb-social.cjs +57 -73
  2. package/dist/article-breadcrumb-social.d.cts +2 -24
  3. package/dist/article-breadcrumb-social.d.ts +2 -24
  4. package/dist/article-breadcrumb-social.js +57 -73
  5. package/dist/article-compact-toc.cjs +1 -1
  6. package/dist/article-compact-toc.js +1 -1
  7. package/dist/article-sidebar-sticky.cjs +73 -26
  8. package/dist/article-sidebar-sticky.js +73 -26
  9. package/dist/blog-horizontal-timeline.cjs +7 -4
  10. package/dist/blog-horizontal-timeline.js +7 -4
  11. package/dist/faq-split-hero.cjs +704 -0
  12. package/dist/faq-split-hero.d.cts +118 -0
  13. package/dist/faq-split-hero.d.ts +118 -0
  14. package/dist/faq-split-hero.js +682 -0
  15. package/dist/feature-badge-grid-six.cjs +1 -1
  16. package/dist/feature-badge-grid-six.js +1 -1
  17. package/dist/feature-card-grid-linked.cjs +92 -22
  18. package/dist/feature-card-grid-linked.js +92 -22
  19. package/dist/feature-carousel-progress.cjs +1 -1
  20. package/dist/feature-carousel-progress.js +1 -1
  21. package/dist/feature-checklist-image.cjs +88 -15
  22. package/dist/feature-checklist-image.js +88 -15
  23. package/dist/feature-checklist-three-column.cjs +1 -1
  24. package/dist/feature-checklist-three-column.js +1 -1
  25. package/dist/feature-icon-grid-accent.cjs +50 -8
  26. package/dist/feature-icon-grid-accent.js +50 -8
  27. package/dist/feature-icon-grid-bordered.cjs +84 -14
  28. package/dist/feature-icon-grid-bordered.js +84 -14
  29. package/dist/feature-icon-tabs-content.cjs +217 -84
  30. package/dist/feature-icon-tabs-content.js +217 -84
  31. package/dist/feature-image-overlay-badge.cjs +106 -33
  32. package/dist/feature-image-overlay-badge.js +106 -33
  33. package/dist/feature-numbered-cards.cjs +154 -35
  34. package/dist/feature-numbered-cards.js +154 -35
  35. package/dist/feature-showcase.cjs +67 -71
  36. package/dist/feature-showcase.d.cts +1 -5
  37. package/dist/feature-showcase.d.ts +1 -5
  38. package/dist/feature-showcase.js +68 -72
  39. package/dist/feature-split-image-reverse.cjs +90 -15
  40. package/dist/feature-split-image-reverse.js +90 -15
  41. package/dist/feature-split-image.cjs +87 -15
  42. package/dist/feature-split-image.js +87 -15
  43. package/dist/feature-stats-highlight.cjs +2 -2
  44. package/dist/feature-stats-highlight.js +2 -2
  45. package/dist/feature-tabbed-content-image.cjs +207 -72
  46. package/dist/feature-tabbed-content-image.js +207 -72
  47. package/dist/feature-three-column-values.cjs +107 -14
  48. package/dist/feature-three-column-values.js +107 -14
  49. package/dist/registry.cjs +1460 -461
  50. package/dist/registry.js +1460 -461
  51. package/package.json +1 -1
@@ -0,0 +1,704 @@
1
+ "use client";
2
+ 'use strict';
3
+
4
+ var React = require('react');
5
+ var clsx = require('clsx');
6
+ var tailwindMerge = require('tailwind-merge');
7
+ var img = require('@page-speed/img');
8
+ var AccordionPrimitive = require('@radix-ui/react-accordion');
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 React__namespace = /*#__PURE__*/_interopNamespace(React);
30
+ var AccordionPrimitive__namespace = /*#__PURE__*/_interopNamespace(AccordionPrimitive);
31
+
32
+ // components/blocks/faq/faq-split-hero.tsx
33
+ function cn(...inputs) {
34
+ return tailwindMerge.twMerge(clsx.clsx(inputs));
35
+ }
36
+ var svgCache = /* @__PURE__ */ new Map();
37
+ function DynamicIcon({
38
+ name,
39
+ size = 28,
40
+ color,
41
+ className,
42
+ alt
43
+ }) {
44
+ const [svgContent, setSvgContent] = React__namespace.useState(null);
45
+ const [isLoading, setIsLoading] = React__namespace.useState(true);
46
+ const [error, setError] = React__namespace.useState(null);
47
+ const { url, iconName } = React__namespace.useMemo(() => {
48
+ const separator = name.includes("/") ? "/" : ":";
49
+ const [prefix, iconName2] = name.split(separator);
50
+ const baseUrl = `https://icons.opensite.ai/api/icon/${prefix}/${iconName2}?format=svg&width=${size}&height=${size}`;
51
+ return {
52
+ url: baseUrl,
53
+ iconName: iconName2
54
+ };
55
+ }, [name, size]);
56
+ React__namespace.useEffect(() => {
57
+ let isMounted = true;
58
+ const fetchSvg = async () => {
59
+ const cached = svgCache.get(url);
60
+ if (cached) {
61
+ if (isMounted) {
62
+ setSvgContent(cached);
63
+ setIsLoading(false);
64
+ }
65
+ return;
66
+ }
67
+ try {
68
+ setIsLoading(true);
69
+ setError(null);
70
+ const response = await fetch(url);
71
+ if (!response.ok) {
72
+ throw new Error(`Failed to fetch icon: ${response.status}`);
73
+ }
74
+ let svg = await response.text();
75
+ svg = processSvgForCurrentColor(svg);
76
+ svgCache.set(url, svg);
77
+ if (isMounted) {
78
+ setSvgContent(svg);
79
+ setIsLoading(false);
80
+ }
81
+ } catch (err) {
82
+ if (isMounted) {
83
+ setError(err instanceof Error ? err.message : "Failed to load icon");
84
+ setIsLoading(false);
85
+ }
86
+ }
87
+ };
88
+ fetchSvg();
89
+ return () => {
90
+ isMounted = false;
91
+ };
92
+ }, [url]);
93
+ if (isLoading) {
94
+ return /* @__PURE__ */ jsxRuntime.jsx(
95
+ "span",
96
+ {
97
+ className: cn("inline-block", className),
98
+ style: { width: size, height: size },
99
+ "aria-hidden": "true"
100
+ }
101
+ );
102
+ }
103
+ if (error || !svgContent) {
104
+ return /* @__PURE__ */ jsxRuntime.jsx(
105
+ "span",
106
+ {
107
+ className: cn("inline-block", className),
108
+ style: { width: size, height: size },
109
+ role: "img",
110
+ "aria-label": alt || iconName
111
+ }
112
+ );
113
+ }
114
+ return /* @__PURE__ */ jsxRuntime.jsx(
115
+ "span",
116
+ {
117
+ className: cn("inline-flex items-center justify-center", className),
118
+ style: {
119
+ width: size,
120
+ height: size,
121
+ color: color || "inherit"
122
+ },
123
+ role: "img",
124
+ "aria-label": alt || iconName,
125
+ dangerouslySetInnerHTML: { __html: svgContent }
126
+ }
127
+ );
128
+ }
129
+ function processSvgForCurrentColor(svg) {
130
+ let processed = svg;
131
+ processed = processed.replace(
132
+ /stroke=["'](#000000|#000|black)["']/gi,
133
+ 'stroke="currentColor"'
134
+ );
135
+ processed = processed.replace(
136
+ /fill=["'](#000000|#000|black)["']/gi,
137
+ 'fill="currentColor"'
138
+ );
139
+ return processed;
140
+ }
141
+ function Accordion({
142
+ ...props
143
+ }) {
144
+ return /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Root, { "data-slot": "accordion", ...props });
145
+ }
146
+ function AccordionItem({
147
+ className,
148
+ ...props
149
+ }) {
150
+ return /* @__PURE__ */ jsxRuntime.jsx(
151
+ AccordionPrimitive__namespace.Item,
152
+ {
153
+ "data-slot": "accordion-item",
154
+ className: cn("border-b last:border-b-0", className),
155
+ ...props
156
+ }
157
+ );
158
+ }
159
+ function AccordionTrigger({
160
+ className,
161
+ children,
162
+ ...props
163
+ }) {
164
+ return /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Header, { className: "flex", children: /* @__PURE__ */ jsxRuntime.jsxs(
165
+ AccordionPrimitive__namespace.Trigger,
166
+ {
167
+ "data-slot": "accordion-trigger",
168
+ className: cn(
169
+ "focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
170
+ className
171
+ ),
172
+ ...props,
173
+ children: [
174
+ children,
175
+ /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/chevron-down", className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })
176
+ ]
177
+ }
178
+ ) });
179
+ }
180
+ function AccordionContent({
181
+ className,
182
+ children,
183
+ ...props
184
+ }) {
185
+ return /* @__PURE__ */ jsxRuntime.jsx(
186
+ AccordionPrimitive__namespace.Content,
187
+ {
188
+ "data-slot": "accordion-content",
189
+ className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
190
+ ...props,
191
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("pt-0 pb-4", className), children })
192
+ }
193
+ );
194
+ }
195
+ var maxWidthStyles = {
196
+ sm: "max-w-screen-sm",
197
+ md: "max-w-screen-md",
198
+ lg: "max-w-screen-lg",
199
+ xl: "max-w-7xl",
200
+ "2xl": "max-w-screen-2xl",
201
+ "4xl": "max-w-[1536px]",
202
+ full: "max-w-full"
203
+ };
204
+ var Container = React__namespace.default.forwardRef(
205
+ ({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
206
+ const Component = as;
207
+ return /* @__PURE__ */ jsxRuntime.jsx(
208
+ Component,
209
+ {
210
+ ref,
211
+ className: cn(
212
+ "mx-auto w-full px-2 sm:px-4 lg:px-8",
213
+ maxWidthStyles[maxWidth],
214
+ className
215
+ ),
216
+ ...props,
217
+ children
218
+ }
219
+ );
220
+ }
221
+ );
222
+ Container.displayName = "Container";
223
+
224
+ // lib/patternSvgs.ts
225
+ var patternSvgs = {
226
+ squareAltGrid: "https://cdn.ing/assets/files/record/286187/4gpn0yq2ptra8iwlvmwwv860ggwv",
227
+ grid1: "https://cdn.ing/assets/files/record/286186/nbdflpgp4ostrno079hygibsflp3",
228
+ noise: "https://cdn.ing/assets/i/r/286188/zrqcp9hynh3j7p2laihwzfbujgrl/noise.png",
229
+ dots: "https://cdn.ing/assets/files/record/286198/yfsjx9thvtxzhl2qtshxyhkrm524",
230
+ dotPattern: "https://cdn.ing/assets/files/record/286192/7ig0cku8aqbboiza8nuk6hw0nnsr",
231
+ dotPattern2: "https://cdn.ing/assets/files/record/286189/arez6gd2s7isn9i1o6c7sexdq7bl",
232
+ circles: "https://cdn.ing/assets/files/record/286190/gtmia3sncjtzetdshc20zf1d3c17",
233
+ waves: "https://cdn.ing/assets/files/record/286191/mqlb33fzxz9cdth1bx7if0wmpkp1",
234
+ crossPattern: "https://cdn.ing/assets/files/record/286193/9yfqwdbnqaipbp7fsb3wbzzmq472",
235
+ architect: "https://cdn.ing/assets/files/record/286194/vgs88ugpvyhxu13wqgy0acvae6re",
236
+ tinyCheckers: "https://cdn.ing/assets/files/record/286195/65efaknsw8kcpf9o3c2gybytsl5b",
237
+ p6: "https://cdn.ing/assets/i/r/286196/6kl0rqnd6mjk8j7e525fo8fo0vkc/p6.webp"
238
+ };
239
+ var maskTop = "radial-gradient(ellipse 70% 60% at 50% 0%, #000 60%, transparent 100%)";
240
+ var maskBottom = "radial-gradient(ellipse 100% 80% at 50% 100%, #000 50%, transparent 90%)";
241
+ var maskCenter = "radial-gradient(ellipse 60% 60% at 50% 50%, #000 30%, transparent 70%)";
242
+ var maskTopLeft = "radial-gradient(ellipse 80% 80% at 0% 0%, #000 50%, transparent 90%)";
243
+ var maskTopRight = "radial-gradient(ellipse 80% 80% at 100% 0%, #000 50%, transparent 90%)";
244
+ var maskBottomLeft = "radial-gradient(ellipse 80% 80% at 0% 100%, #000 50%, transparent 90%)";
245
+ var maskBottomRight = "radial-gradient(ellipse 80% 80% at 100% 100%, #000 50%, transparent 90%)";
246
+ var circuitBoardPattern = (id, mask) => /* @__PURE__ */ jsxRuntime.jsxs(
247
+ "svg",
248
+ {
249
+ className: "h-full w-full",
250
+ xmlns: "http://www.w3.org/2000/svg",
251
+ style: mask ? {
252
+ maskImage: mask,
253
+ WebkitMaskImage: mask
254
+ } : void 0,
255
+ children: [
256
+ /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs(
257
+ "pattern",
258
+ {
259
+ id,
260
+ x: "0",
261
+ y: "0",
262
+ width: "100",
263
+ height: "100",
264
+ patternUnits: "userSpaceOnUse",
265
+ children: [
266
+ /* @__PURE__ */ jsxRuntime.jsx(
267
+ "path",
268
+ {
269
+ d: "M0 50h40M60 50h40M50 0v40M50 60v40",
270
+ stroke: "hsl(var(--muted))",
271
+ strokeWidth: "1",
272
+ fill: "none"
273
+ }
274
+ ),
275
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "50", cy: "50", r: "3", fill: "hsl(var(--muted))" }),
276
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "0", cy: "50", r: "2", fill: "hsl(var(--muted))" }),
277
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "100", cy: "50", r: "2", fill: "hsl(var(--muted))" }),
278
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "50", cy: "0", r: "2", fill: "hsl(var(--muted))" }),
279
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "50", cy: "100", r: "2", fill: "hsl(var(--muted))" })
280
+ ]
281
+ }
282
+ ) }),
283
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { width: "100%", height: "100%", fill: `url(#${id})` })
284
+ ]
285
+ }
286
+ );
287
+ var gridDotsPattern = (id, mask) => /* @__PURE__ */ jsxRuntime.jsxs(
288
+ "svg",
289
+ {
290
+ className: "h-full w-full",
291
+ xmlns: "http://www.w3.org/2000/svg",
292
+ style: mask ? {
293
+ maskImage: mask,
294
+ WebkitMaskImage: mask
295
+ } : void 0,
296
+ children: [
297
+ /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs(
298
+ "pattern",
299
+ {
300
+ id,
301
+ x: "0",
302
+ y: "0",
303
+ width: "40",
304
+ height: "40",
305
+ patternUnits: "userSpaceOnUse",
306
+ children: [
307
+ /* @__PURE__ */ jsxRuntime.jsx(
308
+ "path",
309
+ {
310
+ d: "M0 20h40M20 0v40",
311
+ stroke: "hsl(var(--muted))",
312
+ strokeWidth: "0.5",
313
+ fill: "none"
314
+ }
315
+ ),
316
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "20", cy: "20", r: "2", fill: "hsl(var(--muted))" })
317
+ ]
318
+ }
319
+ ) }),
320
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { width: "100%", height: "100%", fill: `url(#${id})` })
321
+ ]
322
+ }
323
+ );
324
+ var gridPattern = (size, mask) => /* @__PURE__ */ jsxRuntime.jsx(
325
+ "div",
326
+ {
327
+ 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)]",
328
+ style: {
329
+ backgroundSize: `${size}px ${size}px`,
330
+ ...mask ? {
331
+ maskImage: mask,
332
+ WebkitMaskImage: mask
333
+ } : {}
334
+ }
335
+ }
336
+ );
337
+ var diagonalCrossPattern = (mask) => /* @__PURE__ */ jsxRuntime.jsx(
338
+ "div",
339
+ {
340
+ className: "h-full w-full",
341
+ style: {
342
+ 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)",
343
+ ...mask ? {
344
+ maskImage: mask,
345
+ WebkitMaskImage: mask
346
+ } : {}
347
+ }
348
+ }
349
+ );
350
+ 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)";
351
+ var dashedGridPattern = (fadeMask) => {
352
+ const mask = fadeMask ? `${dashedGridMaskBase}, ${fadeMask}` : dashedGridMaskBase;
353
+ return /* @__PURE__ */ jsxRuntime.jsx(
354
+ "div",
355
+ {
356
+ className: "h-full w-full",
357
+ style: {
358
+ backgroundImage: "linear-gradient(to right, hsl(var(--muted)) 1px, transparent 1px), linear-gradient(to bottom, hsl(var(--muted)) 1px, transparent 1px)",
359
+ backgroundSize: "20px 20px",
360
+ backgroundPosition: "0 0, 0 0",
361
+ maskImage: mask,
362
+ WebkitMaskImage: mask,
363
+ maskComposite: "intersect",
364
+ WebkitMaskComposite: "source-in"
365
+ }
366
+ }
367
+ );
368
+ };
369
+ var gradientGlow = (position) => /* @__PURE__ */ jsxRuntime.jsx(
370
+ "div",
371
+ {
372
+ className: cn(
373
+ "pointer-events-none absolute left-1/2 z-0 aspect-square w-3/4 -translate-x-1/2 rounded-full opacity-50 blur-3xl",
374
+ position === "top" ? "-top-1/4" : "-bottom-1/4"
375
+ ),
376
+ style: {
377
+ background: "radial-gradient(circle, hsl(var(--primary)) 0%, transparent 70%)"
378
+ }
379
+ }
380
+ );
381
+ var spotlight = (position) => /* @__PURE__ */ jsxRuntime.jsx(
382
+ "div",
383
+ {
384
+ className: cn(
385
+ "pointer-events-none absolute top-1/2 z-0 aspect-square w-3/4 -translate-y-1/2 rounded-full opacity-40 blur-3xl",
386
+ position === "left" ? "-left-1/4" : "-right-1/4"
387
+ ),
388
+ style: {
389
+ background: "radial-gradient(circle, hsl(var(--primary)) 0%, transparent 70%)"
390
+ }
391
+ }
392
+ );
393
+ var patternOverlays = {
394
+ circuitBoardBasic: () => circuitBoardPattern("circuit-board-basic"),
395
+ circuitBoardFadeTop: () => circuitBoardPattern("circuit-board-fade-top", maskTop),
396
+ circuitBoardFadeBottom: () => circuitBoardPattern("circuit-board-fade-bottom", maskBottom),
397
+ circuitBoardFadeCenter: () => circuitBoardPattern("circuit-board-fade-center", maskCenter),
398
+ circuitBoardFadeTopLeft: () => circuitBoardPattern("circuit-board-fade-top-left", maskTopLeft),
399
+ circuitBoardFadeTopRight: () => circuitBoardPattern("circuit-board-fade-top-right", maskTopRight),
400
+ circuitBoardFadeBottomLeft: () => circuitBoardPattern("circuit-board-fade-bottom-left", maskBottomLeft),
401
+ circuitBoardFadeBottomRight: () => circuitBoardPattern("circuit-board-fade-bottom-right", maskBottomRight),
402
+ dashedGridBasic: () => dashedGridPattern(),
403
+ dashedGridFadeTop: () => dashedGridPattern(maskTop),
404
+ dashedGridFadeBottom: () => dashedGridPattern(maskBottom),
405
+ dashedGridFadeCenter: () => dashedGridPattern(maskCenter),
406
+ dashedGridFadeTopLeft: () => dashedGridPattern(maskTopLeft),
407
+ dashedGridFadeTopRight: () => dashedGridPattern(maskTopRight),
408
+ dashedGridFadeBottomLeft: () => dashedGridPattern(maskBottomLeft),
409
+ dashedGridFadeBottomRight: () => dashedGridPattern(maskBottomRight),
410
+ diagonalCrossBasic: () => diagonalCrossPattern(),
411
+ diagonalCrossFadeTop: () => diagonalCrossPattern(maskTop),
412
+ diagonalCrossFadeBottom: () => diagonalCrossPattern(maskBottom),
413
+ diagonalCrossFadeCenter: () => diagonalCrossPattern(maskCenter),
414
+ diagonalCrossFadeTopLeft: () => diagonalCrossPattern(maskTopLeft),
415
+ diagonalCrossFadeTopRight: () => diagonalCrossPattern(maskTopRight),
416
+ diagonalCrossFadeBottomLeft: () => diagonalCrossPattern(maskBottomLeft),
417
+ diagonalCrossFadeBottomRight: () => diagonalCrossPattern(maskBottomRight),
418
+ gridBasic: () => gridPattern(40),
419
+ gridFadeTop: () => gridPattern(32, maskTop),
420
+ gridFadeBottom: () => gridPattern(32, maskBottom),
421
+ gridFadeCenter: () => gridPattern(40, maskCenter),
422
+ gridFadeTopLeft: () => gridPattern(32, maskTopLeft),
423
+ gridFadeTopRight: () => gridPattern(32, maskTopRight),
424
+ gridFadeBottomLeft: () => gridPattern(32, maskBottomLeft),
425
+ gridFadeBottomRight: () => gridPattern(32, maskBottomRight),
426
+ gridDotsBasic: () => gridDotsPattern("grid-dots-basic"),
427
+ gridDotsFadeCenter: () => gridDotsPattern("grid-dots-fade-center", maskCenter),
428
+ gradientGlowTop: () => gradientGlow("top"),
429
+ gradientGlowBottom: () => gradientGlow("bottom"),
430
+ spotlightLeft: () => spotlight("left"),
431
+ spotlightRight: () => spotlight("right")
432
+ };
433
+ var inlinePatternStyles = {
434
+ radialGradientTop: {
435
+ background: "radial-gradient(125% 125% at 50% 10%, hsl(var(--background)) 40%, hsl(var(--primary)) 100%)"
436
+ },
437
+ radialGradientBottom: {
438
+ background: "radial-gradient(125% 125% at 50% 90%, hsl(var(--background)) 40%, hsl(var(--primary)) 100%)"
439
+ }
440
+ };
441
+ function PatternBackground({
442
+ pattern,
443
+ opacity = 0.08,
444
+ className,
445
+ style
446
+ }) {
447
+ if (!pattern) {
448
+ return null;
449
+ }
450
+ if (pattern in inlinePatternStyles) {
451
+ const inlineStyle = inlinePatternStyles[pattern];
452
+ return /* @__PURE__ */ jsxRuntime.jsx(
453
+ "div",
454
+ {
455
+ className: cn("pointer-events-none absolute inset-0 z-0", className),
456
+ style: { ...inlineStyle, opacity, ...style },
457
+ "aria-hidden": "true"
458
+ }
459
+ );
460
+ }
461
+ if (pattern in patternOverlays) {
462
+ const Overlay = patternOverlays[pattern];
463
+ return /* @__PURE__ */ jsxRuntime.jsx(
464
+ "div",
465
+ {
466
+ className: cn("pointer-events-none absolute inset-0 z-0", className),
467
+ style: { opacity, ...style },
468
+ "aria-hidden": "true",
469
+ children: Overlay()
470
+ }
471
+ );
472
+ }
473
+ const patternUrl = pattern in patternSvgs ? patternSvgs[pattern] : pattern;
474
+ return /* @__PURE__ */ jsxRuntime.jsx(
475
+ "div",
476
+ {
477
+ className: cn("pointer-events-none absolute inset-0 z-0", className),
478
+ style: {
479
+ backgroundImage: `url(${patternUrl})`,
480
+ backgroundRepeat: "repeat",
481
+ backgroundSize: "auto",
482
+ opacity,
483
+ ...style
484
+ },
485
+ "aria-hidden": "true"
486
+ }
487
+ );
488
+ }
489
+ var backgroundStyles = {
490
+ default: "bg-background text-foreground",
491
+ white: "bg-white text-dark",
492
+ gray: "bg-muted/30 text-foreground",
493
+ dark: "bg-foreground text-background",
494
+ transparent: "bg-transparent text-foreground",
495
+ gradient: "bg-linear-to-br from-primary via-primary/90 to-foreground text-primary-foreground",
496
+ primary: "bg-primary text-primary-foreground",
497
+ secondary: "bg-secondary text-secondary-foreground",
498
+ muted: "bg-muted text-muted-foreground"
499
+ };
500
+ var spacingStyles = {
501
+ none: "py-0 md:py-0",
502
+ sm: "py-12 md:py-16",
503
+ md: "py-16 md:py-24",
504
+ lg: "py-20 md:py-32",
505
+ xl: "py-24 md:py-40"
506
+ };
507
+ var predefinedSpacings = ["none", "sm", "md", "lg", "xl"];
508
+ var isPredefinedSpacing = (spacing) => predefinedSpacings.includes(spacing);
509
+ var Section = React__namespace.default.forwardRef(
510
+ ({
511
+ id,
512
+ title,
513
+ subtitle,
514
+ children,
515
+ className,
516
+ style,
517
+ background = "default",
518
+ spacing = "lg",
519
+ pattern,
520
+ patternOpacity,
521
+ patternClassName,
522
+ containerClassName,
523
+ containerMaxWidth = "xl",
524
+ ...props
525
+ }, ref) => {
526
+ const effectivePatternOpacity = patternOpacity !== void 0 ? patternOpacity : pattern ? 1 : 0;
527
+ return /* @__PURE__ */ jsxRuntime.jsxs(
528
+ "section",
529
+ {
530
+ ref,
531
+ id,
532
+ className: cn(
533
+ "relative",
534
+ pattern ? "overflow-hidden" : null,
535
+ backgroundStyles[background],
536
+ isPredefinedSpacing(spacing) ? spacingStyles[spacing] : spacing,
537
+ className
538
+ ),
539
+ style,
540
+ ...props,
541
+ children: [
542
+ /* @__PURE__ */ jsxRuntime.jsx(
543
+ PatternBackground,
544
+ {
545
+ pattern,
546
+ opacity: effectivePatternOpacity,
547
+ className: patternClassName
548
+ }
549
+ ),
550
+ /* @__PURE__ */ jsxRuntime.jsxs(
551
+ Container,
552
+ {
553
+ maxWidth: containerMaxWidth,
554
+ className: cn("relative z-10", containerClassName),
555
+ children: [
556
+ (title || subtitle) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-6 text-center md:mb-16", children: [
557
+ subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-sm font-semibold uppercase tracking-wider text-primary", children: subtitle }),
558
+ title && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-3xl font-bold tracking-tight md:text-4xl lg:text-5xl", children: title })
559
+ ] }),
560
+ children
561
+ ]
562
+ }
563
+ )
564
+ ]
565
+ }
566
+ );
567
+ }
568
+ );
569
+ Section.displayName = "Section";
570
+ function FaqSplitHero({
571
+ heading,
572
+ subheading,
573
+ items,
574
+ itemsSlot,
575
+ imageSlot,
576
+ imageSrc,
577
+ imageAlt,
578
+ background,
579
+ spacing,
580
+ pattern,
581
+ patternOpacity,
582
+ patternClassName,
583
+ className,
584
+ contentWrapperClassName,
585
+ leftColumnClassName,
586
+ headerClassName,
587
+ headingClassName,
588
+ subheadingClassName,
589
+ accordionClassName,
590
+ accordionItemClassName,
591
+ accordionTriggerClassName,
592
+ accordionContentClassName,
593
+ imageClassName,
594
+ optixFlowConfig
595
+ }) {
596
+ const itemsContent = React.useMemo(() => {
597
+ if (itemsSlot) return itemsSlot;
598
+ if (!items || items.length === 0) return null;
599
+ return /* @__PURE__ */ jsxRuntime.jsx(
600
+ Accordion,
601
+ {
602
+ type: "single",
603
+ collapsible: true,
604
+ className: cn("w-full", accordionClassName),
605
+ children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
606
+ AccordionItem,
607
+ {
608
+ value: item.id,
609
+ className: cn("border-b border-border/50", accordionItemClassName),
610
+ children: [
611
+ /* @__PURE__ */ jsxRuntime.jsx(
612
+ AccordionTrigger,
613
+ {
614
+ className: cn(
615
+ "py-4 text-left text-base font-medium text-foreground transition-colors hover:text-primary hover:no-underline lg:text-lg",
616
+ accordionTriggerClassName
617
+ ),
618
+ children: item.question
619
+ }
620
+ ),
621
+ /* @__PURE__ */ jsxRuntime.jsx(
622
+ AccordionContent,
623
+ {
624
+ className: cn(
625
+ "pb-4 text-muted-foreground",
626
+ accordionContentClassName
627
+ ),
628
+ children: item.answer
629
+ }
630
+ )
631
+ ]
632
+ },
633
+ item.id
634
+ ))
635
+ }
636
+ );
637
+ }, [itemsSlot, items, accordionClassName, accordionItemClassName, accordionTriggerClassName, accordionContentClassName]);
638
+ const imageContent = React.useMemo(() => {
639
+ if (imageSlot) return imageSlot;
640
+ if (!imageSrc) return null;
641
+ return /* @__PURE__ */ jsxRuntime.jsx(
642
+ img.Img,
643
+ {
644
+ src: imageSrc,
645
+ alt: imageAlt || "FAQ section image",
646
+ className: cn(
647
+ "hidden h-screen w-1/2 object-cover lg:block",
648
+ imageClassName
649
+ ),
650
+ optixFlowConfig
651
+ }
652
+ );
653
+ }, [imageSlot, imageSrc, imageAlt, imageClassName, optixFlowConfig]);
654
+ return /* @__PURE__ */ jsxRuntime.jsx(
655
+ Section,
656
+ {
657
+ background,
658
+ spacing,
659
+ pattern,
660
+ patternOpacity,
661
+ patternClassName,
662
+ className: cn("dark flex", className),
663
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex", contentWrapperClassName), children: [
664
+ /* @__PURE__ */ jsxRuntime.jsx(
665
+ "div",
666
+ {
667
+ className: cn(
668
+ "flex w-full items-center justify-center bg-background lg:w-1/2",
669
+ leftColumnClassName
670
+ ),
671
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "container my-10 flex w-full max-w-[600px] flex-col gap-8 px-6 lg:px-10", children: [
672
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("space-y-4", headerClassName), children: [
673
+ heading && (typeof heading === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
674
+ "h2",
675
+ {
676
+ className: cn(
677
+ "text-3xl font-bold text-foreground lg:text-4xl",
678
+ headingClassName
679
+ ),
680
+ children: heading
681
+ }
682
+ ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: headingClassName, children: heading })),
683
+ subheading && (typeof subheading === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
684
+ "p",
685
+ {
686
+ className: cn(
687
+ "text-lg text-muted-foreground",
688
+ subheadingClassName
689
+ ),
690
+ children: subheading
691
+ }
692
+ ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: subheadingClassName, children: subheading }))
693
+ ] }),
694
+ itemsContent
695
+ ] })
696
+ }
697
+ ),
698
+ imageContent
699
+ ] })
700
+ }
701
+ );
702
+ }
703
+
704
+ exports.FaqSplitHero = FaqSplitHero;