@opensite/ui 0.8.4 → 0.8.6
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/article-breadcrumb-social.cjs +57 -73
- package/dist/article-breadcrumb-social.d.cts +2 -24
- package/dist/article-breadcrumb-social.d.ts +2 -24
- package/dist/article-breadcrumb-social.js +57 -73
- package/dist/article-compact-toc.cjs +1 -1
- package/dist/article-compact-toc.js +1 -1
- package/dist/article-sidebar-sticky.cjs +73 -26
- package/dist/article-sidebar-sticky.js +73 -26
- package/dist/blog-horizontal-timeline.cjs +7 -4
- package/dist/blog-horizontal-timeline.js +7 -4
- package/dist/faq-badge-support.cjs +18 -5
- package/dist/faq-badge-support.js +18 -5
- package/dist/faq-bordered-badge.cjs +23 -7
- package/dist/faq-bordered-badge.js +23 -7
- package/dist/faq-card-categories.cjs +20 -4
- package/dist/faq-card-categories.js +20 -4
- package/dist/faq-categorized-sections.cjs +19 -4
- package/dist/faq-categorized-sections.js +19 -4
- package/dist/faq-centered-accordion.cjs +18 -5
- package/dist/faq-centered-accordion.js +18 -5
- package/dist/faq-gradient-categories.cjs +19 -4
- package/dist/faq-gradient-categories.js +19 -4
- package/dist/faq-icon-benefits.cjs +11 -2
- package/dist/faq-icon-benefits.js +11 -2
- package/dist/faq-muted-cards.cjs +19 -6
- package/dist/faq-muted-cards.js +19 -6
- package/dist/faq-numbered-grid.cjs +11 -3
- package/dist/faq-numbered-grid.js +11 -3
- package/dist/faq-numbered-list.cjs +11 -3
- package/dist/faq-numbered-list.js +11 -3
- package/dist/faq-profile-sidebar.cjs +57 -20
- package/dist/faq-profile-sidebar.js +57 -20
- package/dist/faq-rounded-cards.cjs +26 -19
- package/dist/faq-rounded-cards.js +26 -19
- package/dist/faq-sidebar-navigation.cjs +48 -28
- package/dist/faq-sidebar-navigation.js +48 -28
- package/dist/faq-simple-accordion.cjs +17 -4
- package/dist/faq-simple-accordion.js +17 -4
- package/dist/faq-split-help.cjs +25 -6
- package/dist/faq-split-help.js +25 -6
- package/dist/faq-split-hero.cjs +604 -0
- package/dist/faq-split-hero.d.cts +116 -0
- package/dist/faq-split-hero.d.ts +116 -0
- package/dist/faq-split-hero.js +582 -0
- package/dist/faq-static-list.cjs +9 -2
- package/dist/faq-static-list.js +9 -2
- package/dist/feature-accordion-image.cjs +8 -2
- package/dist/feature-accordion-image.js +8 -2
- package/dist/feature-badge-grid-six.cjs +1 -1
- package/dist/feature-badge-grid-six.js +1 -1
- package/dist/feature-card-grid-linked.cjs +92 -22
- package/dist/feature-card-grid-linked.js +92 -22
- package/dist/feature-carousel-progress.cjs +1 -1
- package/dist/feature-carousel-progress.js +1 -1
- package/dist/feature-checklist-image.cjs +88 -15
- package/dist/feature-checklist-image.js +88 -15
- package/dist/feature-checklist-three-column.cjs +1 -1
- package/dist/feature-checklist-three-column.js +1 -1
- package/dist/feature-icon-grid-accent.cjs +50 -8
- package/dist/feature-icon-grid-accent.js +50 -8
- package/dist/feature-icon-grid-bordered.cjs +84 -14
- package/dist/feature-icon-grid-bordered.js +84 -14
- package/dist/feature-icon-tabs-content.cjs +217 -84
- package/dist/feature-icon-tabs-content.js +217 -84
- package/dist/feature-image-overlay-badge.cjs +106 -33
- package/dist/feature-image-overlay-badge.js +106 -33
- package/dist/feature-numbered-cards.cjs +154 -35
- package/dist/feature-numbered-cards.js +154 -35
- package/dist/feature-showcase.cjs +66 -71
- package/dist/feature-showcase.d.cts +1 -5
- package/dist/feature-showcase.d.ts +1 -5
- package/dist/feature-showcase.js +67 -72
- package/dist/feature-split-image-reverse.cjs +84 -15
- package/dist/feature-split-image-reverse.js +84 -15
- package/dist/feature-split-image.cjs +87 -15
- package/dist/feature-split-image.js +87 -15
- package/dist/feature-stats-highlight.cjs +50 -13
- package/dist/feature-stats-highlight.js +50 -13
- package/dist/feature-tabbed-content-image.cjs +198 -72
- package/dist/feature-tabbed-content-image.js +198 -72
- package/dist/feature-three-column-values.cjs +67 -14
- package/dist/feature-three-column-values.js +67 -14
- package/dist/feature-utility-cards-grid.cjs +83 -36
- package/dist/feature-utility-cards-grid.js +83 -36
- package/dist/navbar-animated-preview.cjs +8 -2
- package/dist/navbar-animated-preview.js +8 -2
- package/dist/navbar-centered-menu.cjs +8 -2
- package/dist/navbar-centered-menu.js +8 -2
- package/dist/navbar-dark-icons.cjs +8 -2
- package/dist/navbar-dark-icons.js +8 -2
- package/dist/navbar-dropdown-menu.cjs +8 -2
- package/dist/navbar-dropdown-menu.js +8 -2
- package/dist/navbar-education-platform.cjs +8 -2
- package/dist/navbar-education-platform.js +8 -2
- package/dist/navbar-enterprise-mega.cjs +8 -2
- package/dist/navbar-enterprise-mega.js +8 -2
- package/dist/navbar-feature-grid.cjs +8 -2
- package/dist/navbar-feature-grid.js +8 -2
- package/dist/navbar-multi-column-groups.cjs +8 -2
- package/dist/navbar-multi-column-groups.js +8 -2
- package/dist/navbar-platform-resources.cjs +8 -2
- package/dist/navbar-platform-resources.js +8 -2
- package/dist/navbar-sidebar-mobile.cjs +8 -2
- package/dist/navbar-sidebar-mobile.js +8 -2
- package/dist/registry.cjs +1873 -680
- package/dist/registry.js +1873 -680
- package/package.json +1 -1
|
@@ -0,0 +1,582 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { 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 ", 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(
|
|
154
|
+
DynamicIcon,
|
|
155
|
+
{
|
|
156
|
+
name: "lucide/chevron-down",
|
|
157
|
+
className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"
|
|
158
|
+
}
|
|
159
|
+
)
|
|
160
|
+
]
|
|
161
|
+
}
|
|
162
|
+
) });
|
|
163
|
+
}
|
|
164
|
+
function AccordionContent({
|
|
165
|
+
className,
|
|
166
|
+
children,
|
|
167
|
+
...props
|
|
168
|
+
}) {
|
|
169
|
+
return /* @__PURE__ */ jsx(
|
|
170
|
+
AccordionPrimitive.Content,
|
|
171
|
+
{
|
|
172
|
+
"data-slot": "accordion-content",
|
|
173
|
+
className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
|
|
174
|
+
...props,
|
|
175
|
+
children: /* @__PURE__ */ jsx("div", { className: cn("pt-0 pb-4", className), children })
|
|
176
|
+
}
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// lib/patternSvgs.ts
|
|
181
|
+
var patternSvgs = {
|
|
182
|
+
squareAltGrid: "https://cdn.ing/assets/files/record/286187/4gpn0yq2ptra8iwlvmwwv860ggwv",
|
|
183
|
+
grid1: "https://cdn.ing/assets/files/record/286186/nbdflpgp4ostrno079hygibsflp3",
|
|
184
|
+
noise: "https://cdn.ing/assets/i/r/286188/zrqcp9hynh3j7p2laihwzfbujgrl/noise.png",
|
|
185
|
+
dots: "https://cdn.ing/assets/files/record/286198/yfsjx9thvtxzhl2qtshxyhkrm524",
|
|
186
|
+
dotPattern: "https://cdn.ing/assets/files/record/286192/7ig0cku8aqbboiza8nuk6hw0nnsr",
|
|
187
|
+
dotPattern2: "https://cdn.ing/assets/files/record/286189/arez6gd2s7isn9i1o6c7sexdq7bl",
|
|
188
|
+
circles: "https://cdn.ing/assets/files/record/286190/gtmia3sncjtzetdshc20zf1d3c17",
|
|
189
|
+
waves: "https://cdn.ing/assets/files/record/286191/mqlb33fzxz9cdth1bx7if0wmpkp1",
|
|
190
|
+
crossPattern: "https://cdn.ing/assets/files/record/286193/9yfqwdbnqaipbp7fsb3wbzzmq472",
|
|
191
|
+
architect: "https://cdn.ing/assets/files/record/286194/vgs88ugpvyhxu13wqgy0acvae6re",
|
|
192
|
+
tinyCheckers: "https://cdn.ing/assets/files/record/286195/65efaknsw8kcpf9o3c2gybytsl5b",
|
|
193
|
+
p6: "https://cdn.ing/assets/i/r/286196/6kl0rqnd6mjk8j7e525fo8fo0vkc/p6.webp"
|
|
194
|
+
};
|
|
195
|
+
var maskTop = "radial-gradient(ellipse 70% 60% at 50% 0%, #000 60%, transparent 100%)";
|
|
196
|
+
var maskBottom = "radial-gradient(ellipse 100% 80% at 50% 100%, #000 50%, transparent 90%)";
|
|
197
|
+
var maskCenter = "radial-gradient(ellipse 60% 60% at 50% 50%, #000 30%, transparent 70%)";
|
|
198
|
+
var maskTopLeft = "radial-gradient(ellipse 80% 80% at 0% 0%, #000 50%, transparent 90%)";
|
|
199
|
+
var maskTopRight = "radial-gradient(ellipse 80% 80% at 100% 0%, #000 50%, transparent 90%)";
|
|
200
|
+
var maskBottomLeft = "radial-gradient(ellipse 80% 80% at 0% 100%, #000 50%, transparent 90%)";
|
|
201
|
+
var maskBottomRight = "radial-gradient(ellipse 80% 80% at 100% 100%, #000 50%, transparent 90%)";
|
|
202
|
+
var circuitBoardPattern = (id, mask) => /* @__PURE__ */ jsxs(
|
|
203
|
+
"svg",
|
|
204
|
+
{
|
|
205
|
+
className: "h-full w-full",
|
|
206
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
207
|
+
style: mask ? {
|
|
208
|
+
maskImage: mask,
|
|
209
|
+
WebkitMaskImage: mask
|
|
210
|
+
} : void 0,
|
|
211
|
+
children: [
|
|
212
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs(
|
|
213
|
+
"pattern",
|
|
214
|
+
{
|
|
215
|
+
id,
|
|
216
|
+
x: "0",
|
|
217
|
+
y: "0",
|
|
218
|
+
width: "100",
|
|
219
|
+
height: "100",
|
|
220
|
+
patternUnits: "userSpaceOnUse",
|
|
221
|
+
children: [
|
|
222
|
+
/* @__PURE__ */ jsx(
|
|
223
|
+
"path",
|
|
224
|
+
{
|
|
225
|
+
d: "M0 50h40M60 50h40M50 0v40M50 60v40",
|
|
226
|
+
stroke: "hsl(var(--muted))",
|
|
227
|
+
strokeWidth: "1",
|
|
228
|
+
fill: "none"
|
|
229
|
+
}
|
|
230
|
+
),
|
|
231
|
+
/* @__PURE__ */ jsx("circle", { cx: "50", cy: "50", r: "3", fill: "hsl(var(--muted))" }),
|
|
232
|
+
/* @__PURE__ */ jsx("circle", { cx: "0", cy: "50", r: "2", fill: "hsl(var(--muted))" }),
|
|
233
|
+
/* @__PURE__ */ jsx("circle", { cx: "100", cy: "50", r: "2", fill: "hsl(var(--muted))" }),
|
|
234
|
+
/* @__PURE__ */ jsx("circle", { cx: "50", cy: "0", r: "2", fill: "hsl(var(--muted))" }),
|
|
235
|
+
/* @__PURE__ */ jsx("circle", { cx: "50", cy: "100", r: "2", fill: "hsl(var(--muted))" })
|
|
236
|
+
]
|
|
237
|
+
}
|
|
238
|
+
) }),
|
|
239
|
+
/* @__PURE__ */ jsx("rect", { width: "100%", height: "100%", fill: `url(#${id})` })
|
|
240
|
+
]
|
|
241
|
+
}
|
|
242
|
+
);
|
|
243
|
+
var gridDotsPattern = (id, mask) => /* @__PURE__ */ jsxs(
|
|
244
|
+
"svg",
|
|
245
|
+
{
|
|
246
|
+
className: "h-full w-full",
|
|
247
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
248
|
+
style: mask ? {
|
|
249
|
+
maskImage: mask,
|
|
250
|
+
WebkitMaskImage: mask
|
|
251
|
+
} : void 0,
|
|
252
|
+
children: [
|
|
253
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs(
|
|
254
|
+
"pattern",
|
|
255
|
+
{
|
|
256
|
+
id,
|
|
257
|
+
x: "0",
|
|
258
|
+
y: "0",
|
|
259
|
+
width: "40",
|
|
260
|
+
height: "40",
|
|
261
|
+
patternUnits: "userSpaceOnUse",
|
|
262
|
+
children: [
|
|
263
|
+
/* @__PURE__ */ jsx(
|
|
264
|
+
"path",
|
|
265
|
+
{
|
|
266
|
+
d: "M0 20h40M20 0v40",
|
|
267
|
+
stroke: "hsl(var(--muted))",
|
|
268
|
+
strokeWidth: "0.5",
|
|
269
|
+
fill: "none"
|
|
270
|
+
}
|
|
271
|
+
),
|
|
272
|
+
/* @__PURE__ */ jsx("circle", { cx: "20", cy: "20", r: "2", fill: "hsl(var(--muted))" })
|
|
273
|
+
]
|
|
274
|
+
}
|
|
275
|
+
) }),
|
|
276
|
+
/* @__PURE__ */ jsx("rect", { width: "100%", height: "100%", fill: `url(#${id})` })
|
|
277
|
+
]
|
|
278
|
+
}
|
|
279
|
+
);
|
|
280
|
+
var gridPattern = (size, mask) => /* @__PURE__ */ jsx(
|
|
281
|
+
"div",
|
|
282
|
+
{
|
|
283
|
+
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)]",
|
|
284
|
+
style: {
|
|
285
|
+
backgroundSize: `${size}px ${size}px`,
|
|
286
|
+
...mask ? {
|
|
287
|
+
maskImage: mask,
|
|
288
|
+
WebkitMaskImage: mask
|
|
289
|
+
} : {}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
);
|
|
293
|
+
var diagonalCrossPattern = (mask) => /* @__PURE__ */ jsx(
|
|
294
|
+
"div",
|
|
295
|
+
{
|
|
296
|
+
className: "h-full w-full",
|
|
297
|
+
style: {
|
|
298
|
+
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)",
|
|
299
|
+
...mask ? {
|
|
300
|
+
maskImage: mask,
|
|
301
|
+
WebkitMaskImage: mask
|
|
302
|
+
} : {}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
);
|
|
306
|
+
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)";
|
|
307
|
+
var dashedGridPattern = (fadeMask) => {
|
|
308
|
+
const mask = fadeMask ? `${dashedGridMaskBase}, ${fadeMask}` : dashedGridMaskBase;
|
|
309
|
+
return /* @__PURE__ */ jsx(
|
|
310
|
+
"div",
|
|
311
|
+
{
|
|
312
|
+
className: "h-full w-full",
|
|
313
|
+
style: {
|
|
314
|
+
backgroundImage: "linear-gradient(to right, hsl(var(--muted)) 1px, transparent 1px), linear-gradient(to bottom, hsl(var(--muted)) 1px, transparent 1px)",
|
|
315
|
+
backgroundSize: "20px 20px",
|
|
316
|
+
backgroundPosition: "0 0, 0 0",
|
|
317
|
+
maskImage: mask,
|
|
318
|
+
WebkitMaskImage: mask,
|
|
319
|
+
maskComposite: "intersect",
|
|
320
|
+
WebkitMaskComposite: "source-in"
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
);
|
|
324
|
+
};
|
|
325
|
+
var gradientGlow = (position) => /* @__PURE__ */ jsx(
|
|
326
|
+
"div",
|
|
327
|
+
{
|
|
328
|
+
className: cn(
|
|
329
|
+
"pointer-events-none absolute left-1/2 z-0 aspect-square w-3/4 -translate-x-1/2 rounded-full opacity-50 blur-3xl",
|
|
330
|
+
position === "top" ? "-top-1/4" : "-bottom-1/4"
|
|
331
|
+
),
|
|
332
|
+
style: {
|
|
333
|
+
background: "radial-gradient(circle, hsl(var(--primary)) 0%, transparent 70%)"
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
);
|
|
337
|
+
var spotlight = (position) => /* @__PURE__ */ jsx(
|
|
338
|
+
"div",
|
|
339
|
+
{
|
|
340
|
+
className: cn(
|
|
341
|
+
"pointer-events-none absolute top-1/2 z-0 aspect-square w-3/4 -translate-y-1/2 rounded-full opacity-40 blur-3xl",
|
|
342
|
+
position === "left" ? "-left-1/4" : "-right-1/4"
|
|
343
|
+
),
|
|
344
|
+
style: {
|
|
345
|
+
background: "radial-gradient(circle, hsl(var(--primary)) 0%, transparent 70%)"
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
);
|
|
349
|
+
var patternOverlays = {
|
|
350
|
+
circuitBoardBasic: () => circuitBoardPattern("circuit-board-basic"),
|
|
351
|
+
circuitBoardFadeTop: () => circuitBoardPattern("circuit-board-fade-top", maskTop),
|
|
352
|
+
circuitBoardFadeBottom: () => circuitBoardPattern("circuit-board-fade-bottom", maskBottom),
|
|
353
|
+
circuitBoardFadeCenter: () => circuitBoardPattern("circuit-board-fade-center", maskCenter),
|
|
354
|
+
circuitBoardFadeTopLeft: () => circuitBoardPattern("circuit-board-fade-top-left", maskTopLeft),
|
|
355
|
+
circuitBoardFadeTopRight: () => circuitBoardPattern("circuit-board-fade-top-right", maskTopRight),
|
|
356
|
+
circuitBoardFadeBottomLeft: () => circuitBoardPattern("circuit-board-fade-bottom-left", maskBottomLeft),
|
|
357
|
+
circuitBoardFadeBottomRight: () => circuitBoardPattern("circuit-board-fade-bottom-right", maskBottomRight),
|
|
358
|
+
dashedGridBasic: () => dashedGridPattern(),
|
|
359
|
+
dashedGridFadeTop: () => dashedGridPattern(maskTop),
|
|
360
|
+
dashedGridFadeBottom: () => dashedGridPattern(maskBottom),
|
|
361
|
+
dashedGridFadeCenter: () => dashedGridPattern(maskCenter),
|
|
362
|
+
dashedGridFadeTopLeft: () => dashedGridPattern(maskTopLeft),
|
|
363
|
+
dashedGridFadeTopRight: () => dashedGridPattern(maskTopRight),
|
|
364
|
+
dashedGridFadeBottomLeft: () => dashedGridPattern(maskBottomLeft),
|
|
365
|
+
dashedGridFadeBottomRight: () => dashedGridPattern(maskBottomRight),
|
|
366
|
+
diagonalCrossBasic: () => diagonalCrossPattern(),
|
|
367
|
+
diagonalCrossFadeTop: () => diagonalCrossPattern(maskTop),
|
|
368
|
+
diagonalCrossFadeBottom: () => diagonalCrossPattern(maskBottom),
|
|
369
|
+
diagonalCrossFadeCenter: () => diagonalCrossPattern(maskCenter),
|
|
370
|
+
diagonalCrossFadeTopLeft: () => diagonalCrossPattern(maskTopLeft),
|
|
371
|
+
diagonalCrossFadeTopRight: () => diagonalCrossPattern(maskTopRight),
|
|
372
|
+
diagonalCrossFadeBottomLeft: () => diagonalCrossPattern(maskBottomLeft),
|
|
373
|
+
diagonalCrossFadeBottomRight: () => diagonalCrossPattern(maskBottomRight),
|
|
374
|
+
gridBasic: () => gridPattern(40),
|
|
375
|
+
gridFadeTop: () => gridPattern(32, maskTop),
|
|
376
|
+
gridFadeBottom: () => gridPattern(32, maskBottom),
|
|
377
|
+
gridFadeCenter: () => gridPattern(40, maskCenter),
|
|
378
|
+
gridFadeTopLeft: () => gridPattern(32, maskTopLeft),
|
|
379
|
+
gridFadeTopRight: () => gridPattern(32, maskTopRight),
|
|
380
|
+
gridFadeBottomLeft: () => gridPattern(32, maskBottomLeft),
|
|
381
|
+
gridFadeBottomRight: () => gridPattern(32, maskBottomRight),
|
|
382
|
+
gridDotsBasic: () => gridDotsPattern("grid-dots-basic"),
|
|
383
|
+
gridDotsFadeCenter: () => gridDotsPattern("grid-dots-fade-center", maskCenter),
|
|
384
|
+
gradientGlowTop: () => gradientGlow("top"),
|
|
385
|
+
gradientGlowBottom: () => gradientGlow("bottom"),
|
|
386
|
+
spotlightLeft: () => spotlight("left"),
|
|
387
|
+
spotlightRight: () => spotlight("right")
|
|
388
|
+
};
|
|
389
|
+
var inlinePatternStyles = {
|
|
390
|
+
radialGradientTop: {
|
|
391
|
+
background: "radial-gradient(125% 125% at 50% 10%, hsl(var(--background)) 40%, hsl(var(--primary)) 100%)"
|
|
392
|
+
},
|
|
393
|
+
radialGradientBottom: {
|
|
394
|
+
background: "radial-gradient(125% 125% at 50% 90%, hsl(var(--background)) 40%, hsl(var(--primary)) 100%)"
|
|
395
|
+
}
|
|
396
|
+
};
|
|
397
|
+
function PatternBackground({
|
|
398
|
+
pattern,
|
|
399
|
+
opacity = 0.08,
|
|
400
|
+
className,
|
|
401
|
+
style
|
|
402
|
+
}) {
|
|
403
|
+
if (!pattern) {
|
|
404
|
+
return null;
|
|
405
|
+
}
|
|
406
|
+
if (pattern in inlinePatternStyles) {
|
|
407
|
+
const inlineStyle = inlinePatternStyles[pattern];
|
|
408
|
+
return /* @__PURE__ */ jsx(
|
|
409
|
+
"div",
|
|
410
|
+
{
|
|
411
|
+
className: cn("pointer-events-none absolute inset-0 z-0", className),
|
|
412
|
+
style: { ...inlineStyle, opacity, ...style },
|
|
413
|
+
"aria-hidden": "true"
|
|
414
|
+
}
|
|
415
|
+
);
|
|
416
|
+
}
|
|
417
|
+
if (pattern in patternOverlays) {
|
|
418
|
+
const Overlay = patternOverlays[pattern];
|
|
419
|
+
return /* @__PURE__ */ jsx(
|
|
420
|
+
"div",
|
|
421
|
+
{
|
|
422
|
+
className: cn("pointer-events-none absolute inset-0 z-0", className),
|
|
423
|
+
style: { opacity, ...style },
|
|
424
|
+
"aria-hidden": "true",
|
|
425
|
+
children: Overlay()
|
|
426
|
+
}
|
|
427
|
+
);
|
|
428
|
+
}
|
|
429
|
+
const patternUrl = pattern in patternSvgs ? patternSvgs[pattern] : pattern;
|
|
430
|
+
return /* @__PURE__ */ jsx(
|
|
431
|
+
"div",
|
|
432
|
+
{
|
|
433
|
+
className: cn("pointer-events-none absolute inset-0 z-0", className),
|
|
434
|
+
style: {
|
|
435
|
+
backgroundImage: `url(${patternUrl})`,
|
|
436
|
+
backgroundRepeat: "repeat",
|
|
437
|
+
backgroundSize: "auto",
|
|
438
|
+
opacity,
|
|
439
|
+
...style
|
|
440
|
+
},
|
|
441
|
+
"aria-hidden": "true"
|
|
442
|
+
}
|
|
443
|
+
);
|
|
444
|
+
}
|
|
445
|
+
function FaqSplitHero({
|
|
446
|
+
heading,
|
|
447
|
+
subheading,
|
|
448
|
+
items,
|
|
449
|
+
itemsSlot,
|
|
450
|
+
imageSlot,
|
|
451
|
+
imageSrc,
|
|
452
|
+
imageAlt,
|
|
453
|
+
background = "dark",
|
|
454
|
+
pattern,
|
|
455
|
+
patternOpacity,
|
|
456
|
+
className,
|
|
457
|
+
contentClassName,
|
|
458
|
+
headerClassName,
|
|
459
|
+
headingClassName,
|
|
460
|
+
subheadingClassName,
|
|
461
|
+
accordionClassName,
|
|
462
|
+
accordionItemClassName,
|
|
463
|
+
accordionTriggerClassName,
|
|
464
|
+
accordionContentClassName,
|
|
465
|
+
imageClassName,
|
|
466
|
+
optixFlowConfig,
|
|
467
|
+
directionConfig = { desktop: "mediaRight", mobile: "mediaTop" }
|
|
468
|
+
}) {
|
|
469
|
+
const bgColorClass = useMemo(() => {
|
|
470
|
+
switch (background) {
|
|
471
|
+
case "dark":
|
|
472
|
+
return "bg-gray-900 text-white";
|
|
473
|
+
case "gray":
|
|
474
|
+
return "bg-gray-100 text-gray-900";
|
|
475
|
+
case "white":
|
|
476
|
+
return "bg-white text-gray-900";
|
|
477
|
+
default:
|
|
478
|
+
return "bg-background text-foreground";
|
|
479
|
+
}
|
|
480
|
+
}, [background]);
|
|
481
|
+
const desktopOrder = directionConfig.desktop === "mediaRight" ? "lg:flex-row" : "lg:flex-row-reverse";
|
|
482
|
+
const mobileOrder = directionConfig.mobile === "mediaTop" ? "flex-col" : "flex-col-reverse";
|
|
483
|
+
const itemsContent = useMemo(() => {
|
|
484
|
+
if (itemsSlot) return itemsSlot;
|
|
485
|
+
if (!items || items.length === 0) return null;
|
|
486
|
+
return /* @__PURE__ */ jsx(
|
|
487
|
+
Accordion,
|
|
488
|
+
{
|
|
489
|
+
type: "single",
|
|
490
|
+
collapsible: true,
|
|
491
|
+
className: cn("w-full", accordionClassName),
|
|
492
|
+
children: items.map((item) => /* @__PURE__ */ jsxs(
|
|
493
|
+
AccordionItem,
|
|
494
|
+
{
|
|
495
|
+
value: item.id,
|
|
496
|
+
className: cn("border-b border-current/20", accordionItemClassName),
|
|
497
|
+
children: [
|
|
498
|
+
/* @__PURE__ */ jsx(
|
|
499
|
+
AccordionTrigger,
|
|
500
|
+
{
|
|
501
|
+
className: cn(
|
|
502
|
+
"py-4 text-left text-base font-medium transition-opacity hover:opacity-70 hover:no-underline lg:text-lg",
|
|
503
|
+
accordionTriggerClassName
|
|
504
|
+
),
|
|
505
|
+
children: item.question
|
|
506
|
+
}
|
|
507
|
+
),
|
|
508
|
+
/* @__PURE__ */ jsx(
|
|
509
|
+
AccordionContent,
|
|
510
|
+
{
|
|
511
|
+
className: cn("pb-4 opacity-80", accordionContentClassName),
|
|
512
|
+
children: item.answer
|
|
513
|
+
}
|
|
514
|
+
)
|
|
515
|
+
]
|
|
516
|
+
},
|
|
517
|
+
item.id
|
|
518
|
+
))
|
|
519
|
+
}
|
|
520
|
+
);
|
|
521
|
+
}, [
|
|
522
|
+
itemsSlot,
|
|
523
|
+
items,
|
|
524
|
+
accordionClassName,
|
|
525
|
+
accordionItemClassName,
|
|
526
|
+
accordionTriggerClassName,
|
|
527
|
+
accordionContentClassName
|
|
528
|
+
]);
|
|
529
|
+
const contentArea = /* @__PURE__ */ jsxs(
|
|
530
|
+
"div",
|
|
531
|
+
{
|
|
532
|
+
className: cn(
|
|
533
|
+
"relative flex w-full items-center lg:w-1/2",
|
|
534
|
+
bgColorClass,
|
|
535
|
+
contentClassName
|
|
536
|
+
),
|
|
537
|
+
children: [
|
|
538
|
+
pattern && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 overflow-hidden", children: /* @__PURE__ */ jsx(PatternBackground, { pattern, opacity: patternOpacity }) }),
|
|
539
|
+
/* @__PURE__ */ jsx("div", { className: "relative z-10 w-full px-8 py-16 sm:px-12 sm:py-20 lg:px-16 lg:py-24 xl:px-24", children: /* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-xl space-y-8", children: [
|
|
540
|
+
/* @__PURE__ */ jsxs("div", { className: cn("space-y-4", headerClassName), children: [
|
|
541
|
+
heading && (typeof heading === "string" ? /* @__PURE__ */ jsx(
|
|
542
|
+
"h2",
|
|
543
|
+
{
|
|
544
|
+
className: cn(
|
|
545
|
+
"text-3xl font-bold leading-tight tracking-tight sm:text-4xl lg:text-5xl",
|
|
546
|
+
headingClassName
|
|
547
|
+
),
|
|
548
|
+
children: heading
|
|
549
|
+
}
|
|
550
|
+
) : /* @__PURE__ */ jsx("div", { className: headingClassName, children: heading })),
|
|
551
|
+
subheading && (typeof subheading === "string" ? /* @__PURE__ */ jsx(
|
|
552
|
+
"p",
|
|
553
|
+
{
|
|
554
|
+
className: cn(
|
|
555
|
+
"text-base leading-relaxed opacity-80 sm:text-lg",
|
|
556
|
+
subheadingClassName
|
|
557
|
+
),
|
|
558
|
+
children: subheading
|
|
559
|
+
}
|
|
560
|
+
) : /* @__PURE__ */ jsx("div", { className: subheadingClassName, children: subheading }))
|
|
561
|
+
] }),
|
|
562
|
+
itemsContent
|
|
563
|
+
] }) })
|
|
564
|
+
]
|
|
565
|
+
}
|
|
566
|
+
);
|
|
567
|
+
const imageArea = imageSlot ? /* @__PURE__ */ jsx("div", { className: "relative h-64 w-full sm:h-96 lg:h-auto lg:w-1/2", children: imageSlot }) : imageSrc ? /* @__PURE__ */ jsx("div", { className: "relative h-64 w-full sm:h-96 lg:h-auto lg:w-1/2", children: /* @__PURE__ */ jsx(
|
|
568
|
+
Img,
|
|
569
|
+
{
|
|
570
|
+
src: imageSrc,
|
|
571
|
+
alt: imageAlt || "FAQ section image",
|
|
572
|
+
className: cn("h-full w-full object-cover", imageClassName),
|
|
573
|
+
optixFlowConfig
|
|
574
|
+
}
|
|
575
|
+
) }) : null;
|
|
576
|
+
return /* @__PURE__ */ jsx("section", { className: cn("relative w-full overflow-hidden", className), children: /* @__PURE__ */ jsxs("div", { className: cn("flex min-h-screen", mobileOrder, desktopOrder), children: [
|
|
577
|
+
contentArea,
|
|
578
|
+
imageArea
|
|
579
|
+
] }) });
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
export { FaqSplitHero };
|
package/dist/faq-static-list.cjs
CHANGED
|
@@ -394,7 +394,7 @@ function FaqStaticList({
|
|
|
394
394
|
items,
|
|
395
395
|
itemsSlot,
|
|
396
396
|
background,
|
|
397
|
-
spacing,
|
|
397
|
+
spacing = "py-6 md:py-32",
|
|
398
398
|
pattern,
|
|
399
399
|
patternOpacity,
|
|
400
400
|
patternClassName,
|
|
@@ -413,7 +413,14 @@ function FaqStaticList({
|
|
|
413
413
|
typeof item.question === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h3", { className: cn("mb-2 font-semibold", questionClassName), children: item.question }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: questionClassName, children: item.question }),
|
|
414
414
|
typeof item.answer === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-muted-foreground", answerClassName), children: item.answer }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: answerClassName, children: item.answer })
|
|
415
415
|
] }, index)) });
|
|
416
|
-
}, [
|
|
416
|
+
}, [
|
|
417
|
+
itemsSlot,
|
|
418
|
+
items,
|
|
419
|
+
itemsWrapperClassName,
|
|
420
|
+
itemClassName,
|
|
421
|
+
questionClassName,
|
|
422
|
+
answerClassName
|
|
423
|
+
]);
|
|
417
424
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
418
425
|
Section,
|
|
419
426
|
{
|
package/dist/faq-static-list.js
CHANGED
|
@@ -388,7 +388,7 @@ function FaqStaticList({
|
|
|
388
388
|
items,
|
|
389
389
|
itemsSlot,
|
|
390
390
|
background,
|
|
391
|
-
spacing,
|
|
391
|
+
spacing = "py-6 md:py-32",
|
|
392
392
|
pattern,
|
|
393
393
|
patternOpacity,
|
|
394
394
|
patternClassName,
|
|
@@ -407,7 +407,14 @@ function FaqStaticList({
|
|
|
407
407
|
typeof item.question === "string" ? /* @__PURE__ */ jsx("h3", { className: cn("mb-2 font-semibold", questionClassName), children: item.question }) : /* @__PURE__ */ jsx("div", { className: questionClassName, children: item.question }),
|
|
408
408
|
typeof item.answer === "string" ? /* @__PURE__ */ jsx("p", { className: cn("text-muted-foreground", answerClassName), children: item.answer }) : /* @__PURE__ */ jsx("div", { className: answerClassName, children: item.answer })
|
|
409
409
|
] }, index)) });
|
|
410
|
-
}, [
|
|
410
|
+
}, [
|
|
411
|
+
itemsSlot,
|
|
412
|
+
items,
|
|
413
|
+
itemsWrapperClassName,
|
|
414
|
+
itemClassName,
|
|
415
|
+
questionClassName,
|
|
416
|
+
answerClassName
|
|
417
|
+
]);
|
|
411
418
|
return /* @__PURE__ */ jsx(
|
|
412
419
|
Section,
|
|
413
420
|
{
|
|
@@ -151,7 +151,7 @@ function AccordionItem({
|
|
|
151
151
|
AccordionPrimitive__namespace.Item,
|
|
152
152
|
{
|
|
153
153
|
"data-slot": "accordion-item",
|
|
154
|
-
className: cn("border-b
|
|
154
|
+
className: cn("border-b ", className),
|
|
155
155
|
...props
|
|
156
156
|
}
|
|
157
157
|
);
|
|
@@ -172,7 +172,13 @@ function AccordionTrigger({
|
|
|
172
172
|
...props,
|
|
173
173
|
children: [
|
|
174
174
|
children,
|
|
175
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
175
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
176
|
+
DynamicIcon,
|
|
177
|
+
{
|
|
178
|
+
name: "lucide/chevron-down",
|
|
179
|
+
className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"
|
|
180
|
+
}
|
|
181
|
+
)
|
|
176
182
|
]
|
|
177
183
|
}
|
|
178
184
|
) });
|
|
@@ -129,7 +129,7 @@ function AccordionItem({
|
|
|
129
129
|
AccordionPrimitive.Item,
|
|
130
130
|
{
|
|
131
131
|
"data-slot": "accordion-item",
|
|
132
|
-
className: cn("border-b
|
|
132
|
+
className: cn("border-b ", className),
|
|
133
133
|
...props
|
|
134
134
|
}
|
|
135
135
|
);
|
|
@@ -150,7 +150,13 @@ function AccordionTrigger({
|
|
|
150
150
|
...props,
|
|
151
151
|
children: [
|
|
152
152
|
children,
|
|
153
|
-
/* @__PURE__ */ jsx(
|
|
153
|
+
/* @__PURE__ */ jsx(
|
|
154
|
+
DynamicIcon,
|
|
155
|
+
{
|
|
156
|
+
name: "lucide/chevron-down",
|
|
157
|
+
className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"
|
|
158
|
+
}
|
|
159
|
+
)
|
|
154
160
|
]
|
|
155
161
|
}
|
|
156
162
|
) });
|
|
@@ -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-
|
|
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 }))
|