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