@opensite/ui 0.8.1 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/carousel-horizontal-cards.cjs +8 -6
- package/dist/carousel-horizontal-cards.js +8 -6
- package/dist/carousel-image-hero.cjs +85 -160
- package/dist/carousel-image-hero.d.cts +1 -5
- package/dist/carousel-image-hero.d.ts +1 -5
- package/dist/carousel-image-hero.js +85 -160
- package/dist/carousel-portfolio-hero.cjs +138 -59
- package/dist/carousel-portfolio-hero.js +138 -59
- package/dist/carousel-product-feature-showcase.cjs +148 -95
- package/dist/carousel-product-feature-showcase.js +148 -95
- package/dist/carousel-progress-slider.cjs +13 -9
- package/dist/carousel-progress-slider.js +13 -9
- package/dist/carousel-scrolling-feature-showcase.cjs +105 -54
- package/dist/carousel-scrolling-feature-showcase.js +105 -54
- package/dist/feature-accordion-image.cjs +9 -8
- package/dist/feature-accordion-image.js +9 -8
- package/dist/feature-animated-carousel.cjs +65 -49
- package/dist/feature-animated-carousel.js +65 -49
- package/dist/feature-badge-grid-six.cjs +20 -17
- package/dist/feature-badge-grid-six.js +21 -18
- package/dist/feature-bento-image-grid.cjs +12 -8
- package/dist/feature-bento-image-grid.js +12 -8
- package/dist/feature-bento-utilities.cjs +9 -5
- package/dist/feature-bento-utilities.js +9 -5
- package/dist/feature-capabilities-grid.cjs +41 -38
- package/dist/feature-capabilities-grid.js +41 -38
- package/dist/feature-card-grid-linked.cjs +18 -18
- package/dist/feature-card-grid-linked.js +19 -19
- package/dist/feature-carousel-progress.cjs +3 -3
- package/dist/feature-carousel-progress.js +4 -4
- package/dist/feature-category-image-cards.cjs +3 -3
- package/dist/feature-category-image-cards.js +4 -4
- package/dist/feature-checklist-image.cjs +2 -2
- package/dist/feature-checklist-image.js +2 -2
- package/dist/feature-checklist-three-column.cjs +6 -6
- package/dist/feature-checklist-three-column.js +7 -7
- package/dist/feature-icon-grid-accent.cjs +2 -2
- package/dist/feature-icon-grid-accent.js +2 -2
- package/dist/feature-icon-grid-bordered.cjs +29 -31
- package/dist/feature-icon-grid-bordered.d.cts +9 -9
- package/dist/feature-icon-grid-bordered.d.ts +9 -9
- package/dist/feature-icon-grid-bordered.js +30 -32
- package/dist/feature-icon-grid-muted.cjs +6 -6
- package/dist/feature-icon-grid-muted.d.cts +9 -9
- package/dist/feature-icon-grid-muted.d.ts +9 -9
- package/dist/feature-icon-grid-muted.js +7 -7
- package/dist/feature-icon-tabs-content.cjs +8 -8
- package/dist/feature-icon-tabs-content.d.cts +13 -13
- package/dist/feature-icon-tabs-content.d.ts +13 -13
- package/dist/feature-icon-tabs-content.js +9 -9
- package/dist/feature-image-cards-three-column.cjs +26 -27
- package/dist/feature-image-cards-three-column.js +27 -28
- package/dist/feature-image-overlay-badge.cjs +23 -21
- package/dist/feature-image-overlay-badge.js +24 -22
- package/dist/feature-integration-cards.cjs +19 -18
- package/dist/feature-integration-cards.js +20 -19
- package/dist/feature-numbered-cards.cjs +2 -2
- package/dist/feature-numbered-cards.js +3 -3
- package/dist/feature-pattern-grid-links.cjs +26 -29
- package/dist/feature-pattern-grid-links.d.cts +1 -5
- package/dist/feature-pattern-grid-links.d.ts +1 -5
- package/dist/feature-pattern-grid-links.js +27 -30
- package/dist/feature-showcase.cjs +441 -40
- package/dist/feature-showcase.d.cts +62 -5
- package/dist/feature-showcase.d.ts +62 -5
- package/dist/feature-showcase.js +438 -37
- package/dist/feature-split-image-reverse.cjs +15 -36
- package/dist/feature-split-image-reverse.js +16 -37
- package/dist/feature-split-image.cjs +15 -36
- package/dist/feature-split-image.js +16 -37
- package/dist/feature-stats-highlight.cjs +20 -32
- package/dist/feature-stats-highlight.js +21 -33
- package/dist/feature-tabbed-content-image.cjs +11 -6
- package/dist/feature-tabbed-content-image.js +11 -6
- package/dist/feature-three-column-values.cjs +6 -6
- package/dist/feature-three-column-values.js +6 -6
- package/dist/feature-utility-cards-grid.cjs +17 -15
- package/dist/feature-utility-cards-grid.js +18 -16
- package/dist/navbar-tabbed-sections.cjs +23 -16
- package/dist/navbar-tabbed-sections.js +23 -16
- package/dist/registry.cjs +941 -708
- package/dist/registry.js +943 -710
- package/package.json +1 -1
package/dist/feature-showcase.js
CHANGED
|
@@ -1,16 +1,391 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import * as
|
|
3
|
-
import { useState, useRef, useEffect } from 'react';
|
|
2
|
+
import * as React6 from 'react';
|
|
3
|
+
import React6__default, { useMemo, useState, useRef, useEffect } from 'react';
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
7
|
import useEmblaCarousel from 'embla-carousel-react';
|
|
7
8
|
import { cva } from 'class-variance-authority';
|
|
8
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
9
9
|
|
|
10
10
|
// components/blocks/features/feature-showcase.tsx
|
|
11
11
|
function cn(...inputs) {
|
|
12
12
|
return twMerge(clsx(inputs));
|
|
13
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 = React6__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 = React6__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";
|
|
14
389
|
function normalizePhoneNumber(input) {
|
|
15
390
|
const trimmed = input.trim();
|
|
16
391
|
if (trimmed.toLowerCase().startsWith("tel:")) {
|
|
@@ -86,7 +461,7 @@ function useNavigation({
|
|
|
86
461
|
href,
|
|
87
462
|
onClick
|
|
88
463
|
} = {}) {
|
|
89
|
-
const linkType =
|
|
464
|
+
const linkType = React6.useMemo(() => {
|
|
90
465
|
if (!href || href.trim() === "") {
|
|
91
466
|
return onClick ? "none" : "none";
|
|
92
467
|
}
|
|
@@ -107,7 +482,7 @@ function useNavigation({
|
|
|
107
482
|
return "internal";
|
|
108
483
|
}
|
|
109
484
|
}, [href, onClick]);
|
|
110
|
-
const normalizedHref =
|
|
485
|
+
const normalizedHref = React6.useMemo(() => {
|
|
111
486
|
if (!href || href.trim() === "") {
|
|
112
487
|
return void 0;
|
|
113
488
|
}
|
|
@@ -125,7 +500,7 @@ function useNavigation({
|
|
|
125
500
|
return trimmed;
|
|
126
501
|
}
|
|
127
502
|
}, [href, linkType]);
|
|
128
|
-
const target =
|
|
503
|
+
const target = React6.useMemo(() => {
|
|
129
504
|
switch (linkType) {
|
|
130
505
|
case "external":
|
|
131
506
|
return "_blank";
|
|
@@ -138,7 +513,7 @@ function useNavigation({
|
|
|
138
513
|
return void 0;
|
|
139
514
|
}
|
|
140
515
|
}, [linkType]);
|
|
141
|
-
const rel =
|
|
516
|
+
const rel = React6.useMemo(() => {
|
|
142
517
|
if (linkType === "external") {
|
|
143
518
|
return "noopener noreferrer";
|
|
144
519
|
}
|
|
@@ -147,7 +522,7 @@ function useNavigation({
|
|
|
147
522
|
const isExternal = linkType === "external";
|
|
148
523
|
const isInternal = linkType === "internal";
|
|
149
524
|
const shouldUseRouter = isInternal && typeof normalizedHref === "string" && normalizedHref.startsWith("/");
|
|
150
|
-
const handleClick =
|
|
525
|
+
const handleClick = React6.useCallback(
|
|
151
526
|
(event) => {
|
|
152
527
|
if (onClick) {
|
|
153
528
|
try {
|
|
@@ -331,7 +706,7 @@ var buttonVariants = cva(baseStyles, {
|
|
|
331
706
|
size: "default"
|
|
332
707
|
}
|
|
333
708
|
});
|
|
334
|
-
var Pressable =
|
|
709
|
+
var Pressable = React6.forwardRef(
|
|
335
710
|
({
|
|
336
711
|
children,
|
|
337
712
|
className,
|
|
@@ -437,10 +812,10 @@ function DynamicIcon({
|
|
|
437
812
|
className,
|
|
438
813
|
alt
|
|
439
814
|
}) {
|
|
440
|
-
const [svgContent, setSvgContent] =
|
|
441
|
-
const [isLoading, setIsLoading] =
|
|
442
|
-
const [error, setError] =
|
|
443
|
-
const { url, iconName } =
|
|
815
|
+
const [svgContent, setSvgContent] = React6.useState(null);
|
|
816
|
+
const [isLoading, setIsLoading] = React6.useState(true);
|
|
817
|
+
const [error, setError] = React6.useState(null);
|
|
818
|
+
const { url, iconName } = React6.useMemo(() => {
|
|
444
819
|
const separator = name.includes("/") ? "/" : ":";
|
|
445
820
|
const [prefix, iconName2] = name.split(separator);
|
|
446
821
|
const baseUrl = `https://icons.opensite.ai/api/icon/${prefix}/${iconName2}?format=svg&width=${size}&height=${size}`;
|
|
@@ -449,7 +824,7 @@ function DynamicIcon({
|
|
|
449
824
|
iconName: iconName2
|
|
450
825
|
};
|
|
451
826
|
}, [name, size]);
|
|
452
|
-
|
|
827
|
+
React6.useEffect(() => {
|
|
453
828
|
let isMounted = true;
|
|
454
829
|
const fetchSvg = async () => {
|
|
455
830
|
const cached = svgCache.get(url);
|
|
@@ -534,9 +909,9 @@ function processSvgForCurrentColor(svg) {
|
|
|
534
909
|
);
|
|
535
910
|
return processed;
|
|
536
911
|
}
|
|
537
|
-
var CarouselContext =
|
|
912
|
+
var CarouselContext = React6.createContext(null);
|
|
538
913
|
function useCarousel() {
|
|
539
|
-
const context =
|
|
914
|
+
const context = React6.useContext(CarouselContext);
|
|
540
915
|
if (!context) {
|
|
541
916
|
throw new Error("useCarousel must be used within a <Carousel />");
|
|
542
917
|
}
|
|
@@ -558,20 +933,20 @@ function Carousel({
|
|
|
558
933
|
},
|
|
559
934
|
plugins
|
|
560
935
|
);
|
|
561
|
-
const [canScrollPrev, setCanScrollPrev] =
|
|
562
|
-
const [canScrollNext, setCanScrollNext] =
|
|
563
|
-
const onSelect =
|
|
936
|
+
const [canScrollPrev, setCanScrollPrev] = React6.useState(false);
|
|
937
|
+
const [canScrollNext, setCanScrollNext] = React6.useState(false);
|
|
938
|
+
const onSelect = React6.useCallback((api2) => {
|
|
564
939
|
if (!api2) return;
|
|
565
940
|
setCanScrollPrev(api2.canScrollPrev());
|
|
566
941
|
setCanScrollNext(api2.canScrollNext());
|
|
567
942
|
}, []);
|
|
568
|
-
const scrollPrev =
|
|
943
|
+
const scrollPrev = React6.useCallback(() => {
|
|
569
944
|
api?.scrollPrev();
|
|
570
945
|
}, [api]);
|
|
571
|
-
const scrollNext =
|
|
946
|
+
const scrollNext = React6.useCallback(() => {
|
|
572
947
|
api?.scrollNext();
|
|
573
948
|
}, [api]);
|
|
574
|
-
const handleKeyDown =
|
|
949
|
+
const handleKeyDown = React6.useCallback(
|
|
575
950
|
(event) => {
|
|
576
951
|
if (event.key === "ArrowLeft") {
|
|
577
952
|
event.preventDefault();
|
|
@@ -583,11 +958,11 @@ function Carousel({
|
|
|
583
958
|
},
|
|
584
959
|
[scrollPrev, scrollNext]
|
|
585
960
|
);
|
|
586
|
-
|
|
961
|
+
React6.useEffect(() => {
|
|
587
962
|
if (!api || !setApi) return;
|
|
588
963
|
setApi(api);
|
|
589
964
|
}, [api, setApi]);
|
|
590
|
-
|
|
965
|
+
React6.useEffect(() => {
|
|
591
966
|
if (!api) return;
|
|
592
967
|
onSelect(api);
|
|
593
968
|
api.on("reInit", onSelect);
|
|
@@ -730,17 +1105,28 @@ function FeatureShowcase({
|
|
|
730
1105
|
contentClassName,
|
|
731
1106
|
mediaClassName,
|
|
732
1107
|
arrowClassName,
|
|
733
|
-
equalizeOnMobile
|
|
734
|
-
stretchMediaOnMobile
|
|
1108
|
+
equalizeOnMobile,
|
|
1109
|
+
stretchMediaOnMobile,
|
|
1110
|
+
background,
|
|
1111
|
+
spacing,
|
|
1112
|
+
pattern,
|
|
1113
|
+
patternOpacity,
|
|
1114
|
+
patternClassName
|
|
735
1115
|
}) {
|
|
736
|
-
const baseArrowClassName =
|
|
1116
|
+
const baseArrowClassName = useMemo(
|
|
1117
|
+
() => "bottom-4 top-auto size-12 translate-y-0 rounded-full border border-current bg-transparent text-current shadow-sm focus:ring-current focus:ring-offset-2 focus:ring-offset-transparent hover:bg-current/10 md:bottom-6",
|
|
1118
|
+
[]
|
|
1119
|
+
);
|
|
737
1120
|
const [mobileSlideHeight, setMobileSlideHeight] = useState(
|
|
738
1121
|
null
|
|
739
1122
|
);
|
|
740
1123
|
const slideRefs = useRef([]);
|
|
741
|
-
const mediaWrapperClassName =
|
|
1124
|
+
const mediaWrapperClassName = useMemo(
|
|
1125
|
+
() => equalizeOnMobile && stretchMediaOnMobile ? "flex-1 min-h-0 md:flex-none" : "",
|
|
1126
|
+
[equalizeOnMobile, stretchMediaOnMobile]
|
|
1127
|
+
);
|
|
742
1128
|
useEffect(() => {
|
|
743
|
-
if (!equalizeOnMobile) {
|
|
1129
|
+
if (!equalizeOnMobile || !items || items.length === 0) {
|
|
744
1130
|
setMobileSlideHeight(null);
|
|
745
1131
|
return;
|
|
746
1132
|
}
|
|
@@ -772,10 +1158,10 @@ function FeatureShowcase({
|
|
|
772
1158
|
window.removeEventListener("resize", updateHeights);
|
|
773
1159
|
resizeObserver?.disconnect();
|
|
774
1160
|
};
|
|
775
|
-
}, [equalizeOnMobile, items
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
/* @__PURE__ */ jsxs(Carousel, { className: carouselClassName, children: [
|
|
1161
|
+
}, [equalizeOnMobile, items]);
|
|
1162
|
+
const carouselContent = useMemo(() => {
|
|
1163
|
+
if (!items || items.length === 0) return null;
|
|
1164
|
+
return /* @__PURE__ */ jsxs(Carousel, { className: carouselClassName, children: [
|
|
779
1165
|
/* @__PURE__ */ jsx("div", { className: "pb-18 md:pb-24", children: /* @__PURE__ */ jsx(CarouselContent, { className: "ease-in", children: items.map((item, itemIndex) => /* @__PURE__ */ jsx(CarouselItem, { children: /* @__PURE__ */ jsxs(
|
|
780
1166
|
"div",
|
|
781
1167
|
{
|
|
@@ -788,8 +1174,8 @@ function FeatureShowcase({
|
|
|
788
1174
|
slideClassName
|
|
789
1175
|
),
|
|
790
1176
|
children: [
|
|
791
|
-
/* @__PURE__ */ jsx("div", { className: cn("w-full", contentClassName), children: item.content }),
|
|
792
|
-
/* @__PURE__ */ jsx(
|
|
1177
|
+
item.content && /* @__PURE__ */ jsx("div", { className: cn("w-full", contentClassName), children: item.content }),
|
|
1178
|
+
item.mediaComponent && /* @__PURE__ */ jsx(
|
|
793
1179
|
"div",
|
|
794
1180
|
{
|
|
795
1181
|
className: cn(
|
|
@@ -815,8 +1201,23 @@ function FeatureShowcase({
|
|
|
815
1201
|
className: cn(baseArrowClassName, "right-4 md:right-6", arrowClassName)
|
|
816
1202
|
}
|
|
817
1203
|
)
|
|
818
|
-
] })
|
|
819
|
-
]
|
|
1204
|
+
] });
|
|
1205
|
+
}, [items, carouselClassName, equalizeOnMobile, mobileSlideHeight, slideClassName, contentClassName, mediaWrapperClassName, mediaClassName, baseArrowClassName, arrowClassName]);
|
|
1206
|
+
return /* @__PURE__ */ jsxs(
|
|
1207
|
+
Section,
|
|
1208
|
+
{
|
|
1209
|
+
background,
|
|
1210
|
+
spacing,
|
|
1211
|
+
pattern,
|
|
1212
|
+
patternOpacity,
|
|
1213
|
+
patternClassName,
|
|
1214
|
+
className,
|
|
1215
|
+
children: [
|
|
1216
|
+
children,
|
|
1217
|
+
carouselContent
|
|
1218
|
+
]
|
|
1219
|
+
}
|
|
1220
|
+
);
|
|
820
1221
|
}
|
|
821
1222
|
|
|
822
1223
|
export { FeatureShowcase };
|
|
@@ -852,40 +852,19 @@ function FeatureSplitImageReverse({
|
|
|
852
852
|
if (actionsSlot) return actionsSlot;
|
|
853
853
|
if (!actions || actions.length === 0) return null;
|
|
854
854
|
return actions.map((action, index) => {
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
index
|
|
869
|
-
);
|
|
870
|
-
}
|
|
871
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
872
|
-
Pressable,
|
|
873
|
-
{
|
|
874
|
-
href: action.href,
|
|
875
|
-
onClick: action.onClick,
|
|
876
|
-
variant: action.variant,
|
|
877
|
-
size: action.size,
|
|
878
|
-
className: action.className,
|
|
879
|
-
"aria-label": action["aria-label"],
|
|
880
|
-
asButton: true,
|
|
881
|
-
children: [
|
|
882
|
-
action.icon,
|
|
883
|
-
action.label,
|
|
884
|
-
action.iconAfter
|
|
885
|
-
]
|
|
886
|
-
},
|
|
887
|
-
index
|
|
888
|
-
);
|
|
855
|
+
const {
|
|
856
|
+
label,
|
|
857
|
+
icon,
|
|
858
|
+
iconAfter,
|
|
859
|
+
children,
|
|
860
|
+
className: actionClassName,
|
|
861
|
+
...pressableProps
|
|
862
|
+
} = action;
|
|
863
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Pressable, { className: actionClassName, asButton: true, ...pressableProps, children: children ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
864
|
+
icon,
|
|
865
|
+
label,
|
|
866
|
+
iconAfter
|
|
867
|
+
] }) }, index);
|
|
889
868
|
});
|
|
890
869
|
}, [actionsSlot, actions]);
|
|
891
870
|
const imageContent = React.useMemo(() => {
|
|
@@ -895,7 +874,7 @@ function FeatureSplitImageReverse({
|
|
|
895
874
|
img.Img,
|
|
896
875
|
{
|
|
897
876
|
src: imageSrc,
|
|
898
|
-
alt: imageAlt || "
|
|
877
|
+
alt: imageAlt || "",
|
|
899
878
|
className: cn("max-h-96 w-full rounded-md object-cover", imageClassName),
|
|
900
879
|
loading: "lazy",
|
|
901
880
|
optixFlowConfig
|
|
@@ -917,7 +896,7 @@ function FeatureSplitImageReverse({
|
|
|
917
896
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col items-center text-center lg:items-start lg:text-left", contentClassName), children: [
|
|
918
897
|
title && (typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h2", { className: cn("my-6 mt-0 text-4xl font-semibold text-balance lg:text-5xl", titleClassName), children: title }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("my-6 mt-0 text-4xl font-semibold text-balance lg:text-5xl", titleClassName), children: title })),
|
|
919
898
|
description && (typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("mb-8 max-w-xl text-muted-foreground lg:text-lg", descriptionClassName), children: description }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mb-8 max-w-xl text-muted-foreground lg:text-lg", descriptionClassName), children: description })),
|
|
920
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex w-full flex-col justify-center gap-2 sm:flex-row lg:justify-start", actionsClassName), children: actionsContent })
|
|
899
|
+
(actionsSlot || actions && actions.length > 0) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex w-full flex-col justify-center gap-2 sm:flex-row lg:justify-start", actionsClassName), children: actionsContent })
|
|
921
900
|
] })
|
|
922
901
|
] })
|
|
923
902
|
}
|