@opensite/ui 1.8.7 → 1.8.9

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.
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var React = require('react');
4
+ var React3 = require('react');
5
5
  var framerMotion = require('framer-motion');
6
6
  var clsx = require('clsx');
7
7
  var tailwindMerge = require('tailwind-merge');
8
8
  var img = require('@page-speed/img');
9
- var classVarianceAuthority = require('class-variance-authority');
10
9
  var jsxRuntime = require('react/jsx-runtime');
10
+ var classVarianceAuthority = require('class-variance-authority');
11
11
 
12
12
  function _interopNamespace(e) {
13
13
  if (e && e.__esModule) return e;
@@ -27,246 +27,387 @@ function _interopNamespace(e) {
27
27
  return Object.freeze(n);
28
28
  }
29
29
 
30
- var React__namespace = /*#__PURE__*/_interopNamespace(React);
30
+ var React3__namespace = /*#__PURE__*/_interopNamespace(React3);
31
31
 
32
32
  // components/blocks/about/about-story-expertise.tsx
33
33
  function cn(...inputs) {
34
34
  return tailwindMerge.twMerge(clsx.clsx(inputs));
35
35
  }
36
- function getNestedCardBg(parentBg, variant = "muted", options) {
37
- const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
38
- if (isDark) {
39
- switch (variant) {
40
- case "muted":
41
- return "bg-background";
42
- case "card":
43
- return "bg-card";
44
- case "accent":
45
- return "bg-accent";
46
- case "subtle":
47
- return "bg-background/50";
36
+ var maxWidthStyles = {
37
+ sm: "max-w-screen-sm",
38
+ md: "max-w-screen-md",
39
+ lg: "max-w-screen-lg",
40
+ xl: "max-w-7xl",
41
+ "2xl": "max-w-screen-2xl",
42
+ "4xl": "max-w-[1536px]",
43
+ full: "max-w-full"
44
+ };
45
+ var Container = React3__namespace.default.forwardRef(
46
+ ({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
47
+ const Component = as;
48
+ return /* @__PURE__ */ jsxRuntime.jsx(
49
+ Component,
50
+ {
51
+ ref,
52
+ className: cn(
53
+ "mx-auto w-full px-2 sm:px-4 lg:px-8",
54
+ maxWidthStyles[maxWidth],
55
+ className
56
+ ),
57
+ ...props,
58
+ children
59
+ }
60
+ );
61
+ }
62
+ );
63
+ Container.displayName = "Container";
64
+
65
+ // lib/patternSvgs.ts
66
+ var patternSvgs = {
67
+ squareAltGrid: "https://cdn.ing/assets/files/record/286187/4gpn0yq2ptra8iwlvmwwv860ggwv",
68
+ grid1: "https://cdn.ing/assets/files/record/286186/nbdflpgp4ostrno079hygibsflp3",
69
+ noise: "https://cdn.ing/assets/i/r/286188/zrqcp9hynh3j7p2laihwzfbujgrl/noise.png",
70
+ dots: "https://cdn.ing/assets/files/record/286198/yfsjx9thvtxzhl2qtshxyhkrm524",
71
+ dotPattern: "https://cdn.ing/assets/files/record/286192/7ig0cku8aqbboiza8nuk6hw0nnsr",
72
+ dotPattern2: "https://cdn.ing/assets/files/record/286189/arez6gd2s7isn9i1o6c7sexdq7bl",
73
+ circles: "https://cdn.ing/assets/files/record/286190/gtmia3sncjtzetdshc20zf1d3c17",
74
+ waves: "https://cdn.ing/assets/files/record/286191/mqlb33fzxz9cdth1bx7if0wmpkp1",
75
+ crossPattern: "https://cdn.ing/assets/files/record/286193/9yfqwdbnqaipbp7fsb3wbzzmq472",
76
+ architect: "https://cdn.ing/assets/files/record/286194/vgs88ugpvyhxu13wqgy0acvae6re",
77
+ tinyCheckers: "https://cdn.ing/assets/files/record/286195/65efaknsw8kcpf9o3c2gybytsl5b",
78
+ p6: "https://cdn.ing/assets/i/r/286196/6kl0rqnd6mjk8j7e525fo8fo0vkc/p6.webp"
79
+ };
80
+ var maskTop = "radial-gradient(ellipse 70% 60% at 50% 0%, #000 60%, transparent 100%)";
81
+ var maskBottom = "radial-gradient(ellipse 100% 80% at 50% 100%, #000 50%, transparent 90%)";
82
+ var maskCenter = "radial-gradient(ellipse 60% 60% at 50% 50%, #000 30%, transparent 70%)";
83
+ var maskTopLeft = "radial-gradient(ellipse 80% 80% at 0% 0%, #000 50%, transparent 90%)";
84
+ var maskTopRight = "radial-gradient(ellipse 80% 80% at 100% 0%, #000 50%, transparent 90%)";
85
+ var maskBottomLeft = "radial-gradient(ellipse 80% 80% at 0% 100%, #000 50%, transparent 90%)";
86
+ var maskBottomRight = "radial-gradient(ellipse 80% 80% at 100% 100%, #000 50%, transparent 90%)";
87
+ var circuitBoardPattern = (id, mask) => /* @__PURE__ */ jsxRuntime.jsxs(
88
+ "svg",
89
+ {
90
+ className: "h-full w-full",
91
+ xmlns: "http://www.w3.org/2000/svg",
92
+ style: mask ? {
93
+ maskImage: mask,
94
+ WebkitMaskImage: mask
95
+ } : void 0,
96
+ children: [
97
+ /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs(
98
+ "pattern",
99
+ {
100
+ id,
101
+ x: "0",
102
+ y: "0",
103
+ width: "100",
104
+ height: "100",
105
+ patternUnits: "userSpaceOnUse",
106
+ children: [
107
+ /* @__PURE__ */ jsxRuntime.jsx(
108
+ "path",
109
+ {
110
+ d: "M0 50h40M60 50h40M50 0v40M50 60v40",
111
+ stroke: "hsl(var(--muted))",
112
+ strokeWidth: "1",
113
+ fill: "none"
114
+ }
115
+ ),
116
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "50", cy: "50", r: "3", fill: "hsl(var(--muted))" }),
117
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "0", cy: "50", r: "2", fill: "hsl(var(--muted))" }),
118
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "100", cy: "50", r: "2", fill: "hsl(var(--muted))" }),
119
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "50", cy: "0", r: "2", fill: "hsl(var(--muted))" }),
120
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "50", cy: "100", r: "2", fill: "hsl(var(--muted))" })
121
+ ]
122
+ }
123
+ ) }),
124
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { width: "100%", height: "100%", fill: `url(#${id})` })
125
+ ]
126
+ }
127
+ );
128
+ var gridDotsPattern = (id, mask) => /* @__PURE__ */ jsxRuntime.jsxs(
129
+ "svg",
130
+ {
131
+ className: "h-full w-full",
132
+ xmlns: "http://www.w3.org/2000/svg",
133
+ style: mask ? {
134
+ maskImage: mask,
135
+ WebkitMaskImage: mask
136
+ } : void 0,
137
+ children: [
138
+ /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs(
139
+ "pattern",
140
+ {
141
+ id,
142
+ x: "0",
143
+ y: "0",
144
+ width: "40",
145
+ height: "40",
146
+ patternUnits: "userSpaceOnUse",
147
+ children: [
148
+ /* @__PURE__ */ jsxRuntime.jsx(
149
+ "path",
150
+ {
151
+ d: "M0 20h40M20 0v40",
152
+ stroke: "hsl(var(--muted))",
153
+ strokeWidth: "0.5",
154
+ fill: "none"
155
+ }
156
+ ),
157
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "20", cy: "20", r: "2", fill: "hsl(var(--muted))" })
158
+ ]
159
+ }
160
+ ) }),
161
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { width: "100%", height: "100%", fill: `url(#${id})` })
162
+ ]
163
+ }
164
+ );
165
+ var gridPattern = (size, mask) => /* @__PURE__ */ jsxRuntime.jsx(
166
+ "div",
167
+ {
168
+ 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)]",
169
+ style: {
170
+ backgroundSize: `${size}px ${size}px`,
171
+ ...mask ? {
172
+ maskImage: mask,
173
+ WebkitMaskImage: mask
174
+ } : {}
48
175
  }
49
- } else {
50
- switch (variant) {
51
- case "muted":
52
- return "bg-muted";
53
- case "card":
54
- return "bg-card";
55
- case "accent":
56
- return "bg-accent";
57
- case "subtle":
58
- return "bg-muted/50";
176
+ }
177
+ );
178
+ var diagonalCrossPattern = (mask) => /* @__PURE__ */ jsxRuntime.jsx(
179
+ "div",
180
+ {
181
+ className: "h-full w-full",
182
+ style: {
183
+ 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)",
184
+ ...mask ? {
185
+ maskImage: mask,
186
+ WebkitMaskImage: mask
187
+ } : {}
59
188
  }
60
189
  }
61
- }
62
- function getTextColor(parentBg, variant = "default", options) {
63
- const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
64
- if (isDark) {
65
- switch (variant) {
66
- case "default":
67
- return "text-foreground";
68
- case "muted":
69
- return "text-foreground/80";
70
- case "subtle":
71
- return "text-foreground/60";
72
- case "accent":
73
- return "text-accent-foreground";
190
+ );
191
+ 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)";
192
+ var dashedGridPattern = (fadeMask) => {
193
+ const mask = fadeMask ? `${dashedGridMaskBase}, ${fadeMask}` : dashedGridMaskBase;
194
+ return /* @__PURE__ */ jsxRuntime.jsx(
195
+ "div",
196
+ {
197
+ className: "h-full w-full",
198
+ style: {
199
+ backgroundImage: "linear-gradient(to right, hsl(var(--muted)) 1px, transparent 1px), linear-gradient(to bottom, hsl(var(--muted)) 1px, transparent 1px)",
200
+ backgroundSize: "20px 20px",
201
+ backgroundPosition: "0 0, 0 0",
202
+ maskImage: mask,
203
+ WebkitMaskImage: mask,
204
+ maskComposite: "intersect",
205
+ WebkitMaskComposite: "source-in"
206
+ }
74
207
  }
75
- } else {
76
- switch (variant) {
77
- case "default":
78
- return "text-foreground";
79
- case "muted":
80
- return "text-muted-foreground";
81
- case "subtle":
82
- return "text-muted-foreground/70";
83
- case "accent":
84
- return "text-primary";
208
+ );
209
+ };
210
+ var gradientGlow = (position) => /* @__PURE__ */ jsxRuntime.jsx(
211
+ "div",
212
+ {
213
+ className: cn(
214
+ "pointer-events-none absolute left-1/2 z-0 aspect-square w-3/4 -translate-x-1/2 rounded-full opacity-50 blur-3xl",
215
+ position === "top" ? "-top-1/4" : "-bottom-1/4"
216
+ ),
217
+ style: {
218
+ background: "radial-gradient(circle, hsl(var(--primary)) 0%, transparent 70%)"
85
219
  }
86
220
  }
87
- }
88
- function getAccentColor(parentBg, options) {
89
- const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
90
- return isDark ? "text-accent-foreground" : "text-primary";
91
- }
92
- function normalizePhoneNumber(input) {
93
- const trimmed = input.trim();
94
- if (trimmed.toLowerCase().startsWith("tel:")) {
95
- return trimmed;
221
+ );
222
+ var spotlight = (position) => /* @__PURE__ */ jsxRuntime.jsx(
223
+ "div",
224
+ {
225
+ className: cn(
226
+ "pointer-events-none absolute top-1/2 z-0 aspect-square w-3/4 -translate-y-1/2 rounded-full opacity-40 blur-3xl",
227
+ position === "left" ? "-left-1/4" : "-right-1/4"
228
+ ),
229
+ style: {
230
+ background: "radial-gradient(circle, hsl(var(--primary)) 0%, transparent 70%)"
231
+ }
96
232
  }
97
- const match = trimmed.match(/^[\s\+\-\(\)]*(\d[\d\s\-\(\)\.]*\d)[\s\-]*(x|ext\.?|extension)?[\s\-]*(\d+)?$/i);
98
- if (match) {
99
- const mainNumber = match[1].replace(/[\s\-\(\)\.]/g, "");
100
- const extension = match[3];
101
- const normalized = mainNumber.length >= 10 && !trimmed.startsWith("+") ? `+${mainNumber}` : mainNumber;
102
- const withExtension = extension ? `${normalized};ext=${extension}` : normalized;
103
- return `tel:${withExtension}`;
233
+ );
234
+ var patternOverlays = {
235
+ circuitBoardBasic: () => circuitBoardPattern("circuit-board-basic"),
236
+ circuitBoardFadeTop: () => circuitBoardPattern("circuit-board-fade-top", maskTop),
237
+ circuitBoardFadeBottom: () => circuitBoardPattern("circuit-board-fade-bottom", maskBottom),
238
+ circuitBoardFadeCenter: () => circuitBoardPattern("circuit-board-fade-center", maskCenter),
239
+ circuitBoardFadeTopLeft: () => circuitBoardPattern("circuit-board-fade-top-left", maskTopLeft),
240
+ circuitBoardFadeTopRight: () => circuitBoardPattern("circuit-board-fade-top-right", maskTopRight),
241
+ circuitBoardFadeBottomLeft: () => circuitBoardPattern("circuit-board-fade-bottom-left", maskBottomLeft),
242
+ circuitBoardFadeBottomRight: () => circuitBoardPattern("circuit-board-fade-bottom-right", maskBottomRight),
243
+ dashedGridBasic: () => dashedGridPattern(),
244
+ dashedGridFadeTop: () => dashedGridPattern(maskTop),
245
+ dashedGridFadeBottom: () => dashedGridPattern(maskBottom),
246
+ dashedGridFadeCenter: () => dashedGridPattern(maskCenter),
247
+ dashedGridFadeTopLeft: () => dashedGridPattern(maskTopLeft),
248
+ dashedGridFadeTopRight: () => dashedGridPattern(maskTopRight),
249
+ dashedGridFadeBottomLeft: () => dashedGridPattern(maskBottomLeft),
250
+ dashedGridFadeBottomRight: () => dashedGridPattern(maskBottomRight),
251
+ diagonalCrossBasic: () => diagonalCrossPattern(),
252
+ diagonalCrossFadeTop: () => diagonalCrossPattern(maskTop),
253
+ diagonalCrossFadeBottom: () => diagonalCrossPattern(maskBottom),
254
+ diagonalCrossFadeCenter: () => diagonalCrossPattern(maskCenter),
255
+ diagonalCrossFadeTopLeft: () => diagonalCrossPattern(maskTopLeft),
256
+ diagonalCrossFadeTopRight: () => diagonalCrossPattern(maskTopRight),
257
+ diagonalCrossFadeBottomLeft: () => diagonalCrossPattern(maskBottomLeft),
258
+ diagonalCrossFadeBottomRight: () => diagonalCrossPattern(maskBottomRight),
259
+ gridBasic: () => gridPattern(40),
260
+ gridFadeTop: () => gridPattern(32, maskTop),
261
+ gridFadeBottom: () => gridPattern(32, maskBottom),
262
+ gridFadeCenter: () => gridPattern(40, maskCenter),
263
+ gridFadeTopLeft: () => gridPattern(32, maskTopLeft),
264
+ gridFadeTopRight: () => gridPattern(32, maskTopRight),
265
+ gridFadeBottomLeft: () => gridPattern(32, maskBottomLeft),
266
+ gridFadeBottomRight: () => gridPattern(32, maskBottomRight),
267
+ gridDotsBasic: () => gridDotsPattern("grid-dots-basic"),
268
+ gridDotsFadeCenter: () => gridDotsPattern("grid-dots-fade-center", maskCenter),
269
+ gradientGlowTop: () => gradientGlow("top"),
270
+ gradientGlowBottom: () => gradientGlow("bottom"),
271
+ spotlightLeft: () => spotlight("left"),
272
+ spotlightRight: () => spotlight("right")
273
+ };
274
+ var inlinePatternStyles = {
275
+ radialGradientTop: {
276
+ background: "radial-gradient(125% 125% at 50% 10%, hsl(var(--background)) 40%, hsl(var(--primary)) 100%)"
277
+ },
278
+ radialGradientBottom: {
279
+ background: "radial-gradient(125% 125% at 50% 90%, hsl(var(--background)) 40%, hsl(var(--primary)) 100%)"
104
280
  }
105
- const cleaned = trimmed.replace(/[\s\-\(\)\.]/g, "");
106
- return `tel:${cleaned}`;
107
- }
108
- function normalizeEmail(input) {
109
- const trimmed = input.trim();
110
- if (trimmed.toLowerCase().startsWith("mailto:")) {
111
- return trimmed;
112
- }
113
- return `mailto:${trimmed}`;
114
- }
115
- function isEmail(input) {
116
- const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
117
- return emailRegex.test(input.trim());
118
- }
119
- function isPhoneNumber(input) {
120
- const trimmed = input.trim();
121
- if (trimmed.toLowerCase().startsWith("tel:")) {
122
- return true;
123
- }
124
- const phoneRegex = /^[\s\+\-\(\)]*\d[\d\s\-\(\)\.]*\d[\s\-]*(x|ext\.?|extension)?[\s\-]*\d*$/i;
125
- return phoneRegex.test(trimmed);
126
- }
127
- function isInternalUrl(href) {
128
- if (typeof window === "undefined") {
129
- return href.startsWith("/") && !href.startsWith("//");
130
- }
131
- const trimmed = href.trim();
132
- if (trimmed.startsWith("/") && !trimmed.startsWith("//")) {
133
- return true;
134
- }
135
- try {
136
- const url = new URL(trimmed, window.location.href);
137
- const currentOrigin = window.location.origin;
138
- const normalizeOrigin = (origin) => origin.replace(/^(https?:\/\/)(www\.)?/, "$1");
139
- return normalizeOrigin(url.origin) === normalizeOrigin(currentOrigin);
140
- } catch {
141
- return false;
281
+ };
282
+ function PatternBackground({
283
+ pattern,
284
+ opacity = 0.08,
285
+ className,
286
+ style
287
+ }) {
288
+ if (!pattern) {
289
+ return null;
142
290
  }
143
- }
144
- function toRelativePath(href) {
145
- if (typeof window === "undefined") {
146
- return href;
291
+ if (pattern in inlinePatternStyles) {
292
+ const inlineStyle = inlinePatternStyles[pattern];
293
+ return /* @__PURE__ */ jsxRuntime.jsx(
294
+ "div",
295
+ {
296
+ className: cn("pointer-events-none absolute inset-0 z-0", className),
297
+ style: { ...inlineStyle, opacity, ...style },
298
+ "aria-hidden": "true"
299
+ }
300
+ );
147
301
  }
148
- const trimmed = href.trim();
149
- if (trimmed.startsWith("/") && !trimmed.startsWith("//")) {
150
- return trimmed;
302
+ if (pattern in patternOverlays) {
303
+ const Overlay = patternOverlays[pattern];
304
+ return /* @__PURE__ */ jsxRuntime.jsx(
305
+ "div",
306
+ {
307
+ className: cn("pointer-events-none absolute inset-0 z-0", className),
308
+ style: { opacity, ...style },
309
+ "aria-hidden": "true",
310
+ children: Overlay()
311
+ }
312
+ );
151
313
  }
152
- try {
153
- const url = new URL(trimmed, window.location.href);
154
- const currentOrigin = window.location.origin;
155
- const normalizeOrigin = (origin) => origin.replace(/^(https?:\/\/)(www\.)?/, "$1");
156
- if (normalizeOrigin(url.origin) === normalizeOrigin(currentOrigin)) {
157
- return url.pathname + url.search + url.hash;
314
+ const patternUrl = pattern in patternSvgs ? patternSvgs[pattern] : pattern;
315
+ return /* @__PURE__ */ jsxRuntime.jsx(
316
+ "div",
317
+ {
318
+ className: cn("pointer-events-none absolute inset-0 z-0", className),
319
+ style: {
320
+ backgroundImage: `url(${patternUrl})`,
321
+ backgroundRepeat: "repeat",
322
+ backgroundSize: "auto",
323
+ opacity,
324
+ ...style
325
+ },
326
+ "aria-hidden": "true"
158
327
  }
159
- } catch {
160
- }
161
- return trimmed;
328
+ );
162
329
  }
163
- function useNavigation({
164
- href,
165
- onClick
166
- } = {}) {
167
- const linkType = React__namespace.useMemo(() => {
168
- if (!href || href.trim() === "") {
169
- return onClick ? "none" : "none";
170
- }
171
- const trimmed = href.trim();
172
- if (trimmed.toLowerCase().startsWith("mailto:") || isEmail(trimmed)) {
173
- return "mailto";
174
- }
175
- if (trimmed.toLowerCase().startsWith("tel:") || isPhoneNumber(trimmed)) {
176
- return "tel";
177
- }
178
- if (isInternalUrl(trimmed)) {
179
- return "internal";
180
- }
181
- try {
182
- new URL(trimmed, typeof window !== "undefined" ? window.location.href : "http://localhost");
183
- return "external";
184
- } catch {
185
- return "internal";
186
- }
187
- }, [href, onClick]);
188
- const normalizedHref = React__namespace.useMemo(() => {
189
- if (!href || href.trim() === "") {
190
- return void 0;
191
- }
192
- const trimmed = href.trim();
193
- switch (linkType) {
194
- case "tel":
195
- return normalizePhoneNumber(trimmed);
196
- case "mailto":
197
- return normalizeEmail(trimmed);
198
- case "internal":
199
- return toRelativePath(trimmed);
200
- case "external":
201
- return trimmed;
202
- default:
203
- return trimmed;
204
- }
205
- }, [href, linkType]);
206
- const target = React__namespace.useMemo(() => {
207
- switch (linkType) {
208
- case "external":
209
- return "_blank";
210
- case "internal":
211
- return "_self";
212
- case "mailto":
213
- case "tel":
214
- return void 0;
215
- default:
216
- return void 0;
217
- }
218
- }, [linkType]);
219
- const rel = React__namespace.useMemo(() => {
220
- if (linkType === "external") {
221
- return "noopener noreferrer";
222
- }
223
- return void 0;
224
- }, [linkType]);
225
- const isExternal = linkType === "external";
226
- const isInternal = linkType === "internal";
227
- const shouldUseRouter = isInternal && typeof normalizedHref === "string" && normalizedHref.startsWith("/");
228
- const handleClick = React__namespace.useCallback(
229
- (event) => {
230
- if (onClick) {
231
- try {
232
- onClick(event);
233
- } catch (error) {
234
- console.error("Error in user onClick handler:", error);
235
- }
236
- }
237
- if (event.defaultPrevented) {
238
- return;
239
- }
240
- if (shouldUseRouter && normalizedHref && event.button === 0 && // left-click only
241
- !event.metaKey && !event.altKey && !event.ctrlKey && !event.shiftKey) {
242
- if (typeof window !== "undefined") {
243
- const handler = window.__opensiteNavigationHandler;
244
- if (typeof handler === "function") {
245
- try {
246
- const handled = handler(normalizedHref, event.nativeEvent || event);
247
- if (handled !== false) {
248
- event.preventDefault();
249
- }
250
- } catch (error) {
251
- console.error("Error in navigation handler:", error);
330
+ var backgroundStyles = {
331
+ default: "bg-background text-foreground",
332
+ white: "bg-white text-dark",
333
+ gray: "bg-muted/30 text-foreground",
334
+ dark: "bg-foreground text-background",
335
+ transparent: "bg-transparent text-foreground",
336
+ gradient: "bg-linear-to-br from-primary via-primary/90 to-foreground text-primary-foreground",
337
+ primary: "bg-primary text-primary-foreground",
338
+ secondary: "bg-secondary text-secondary-foreground",
339
+ muted: "bg-muted text-muted-foreground"
340
+ };
341
+ var spacingStyles = {
342
+ none: "py-0 md:py-0",
343
+ sm: "py-12 md:py-16",
344
+ md: "py-16 md:py-24",
345
+ lg: "py-20 md:py-32",
346
+ xl: "py-24 md:py-40"
347
+ };
348
+ var predefinedSpacings = ["none", "sm", "md", "lg", "xl"];
349
+ var isPredefinedSpacing = (spacing) => predefinedSpacings.includes(spacing);
350
+ var Section = React3__namespace.default.forwardRef(
351
+ ({
352
+ id,
353
+ title,
354
+ subtitle,
355
+ children,
356
+ className,
357
+ style,
358
+ background = "default",
359
+ spacing = "lg",
360
+ pattern,
361
+ patternOpacity,
362
+ patternClassName,
363
+ containerClassName,
364
+ containerMaxWidth = "xl",
365
+ ...props
366
+ }, ref) => {
367
+ const effectivePatternOpacity = patternOpacity !== void 0 ? patternOpacity : pattern ? 1 : 0;
368
+ return /* @__PURE__ */ jsxRuntime.jsxs(
369
+ "section",
370
+ {
371
+ ref,
372
+ id,
373
+ className: cn(
374
+ "relative",
375
+ pattern ? "overflow-hidden" : null,
376
+ backgroundStyles[background],
377
+ isPredefinedSpacing(spacing) ? spacingStyles[spacing] : spacing,
378
+ className
379
+ ),
380
+ style,
381
+ ...props,
382
+ children: [
383
+ /* @__PURE__ */ jsxRuntime.jsx(
384
+ PatternBackground,
385
+ {
386
+ pattern,
387
+ opacity: effectivePatternOpacity,
388
+ className: patternClassName
252
389
  }
253
- }
254
- }
390
+ ),
391
+ /* @__PURE__ */ jsxRuntime.jsxs(
392
+ Container,
393
+ {
394
+ maxWidth: containerMaxWidth,
395
+ className: cn("relative z-10", containerClassName),
396
+ children: [
397
+ (title || subtitle) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-6 text-center md:mb-16", children: [
398
+ subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-sm font-semibold uppercase tracking-wider", children: subtitle }),
399
+ title && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-3xl font-bold tracking-tight md:text-4xl lg:text-5xl", children: title })
400
+ ] }),
401
+ children
402
+ ]
403
+ }
404
+ )
405
+ ]
255
406
  }
256
- },
257
- [onClick, shouldUseRouter, normalizedHref]
258
- );
259
- return {
260
- linkType,
261
- normalizedHref,
262
- target,
263
- rel,
264
- isExternal,
265
- isInternal,
266
- shouldUseRouter,
267
- handleClick
268
- };
269
- }
407
+ );
408
+ }
409
+ );
410
+ Section.displayName = "Section";
270
411
  var baseStyles = [
271
412
  // Layout
272
413
  "inline-flex items-center justify-center gap-2 whitespace-nowrap shrink-0",
@@ -409,479 +550,350 @@ var buttonVariants = classVarianceAuthority.cva(baseStyles, {
409
550
  size: "default"
410
551
  }
411
552
  });
412
- var Pressable = React__namespace.forwardRef(
413
- ({
414
- children,
415
- className,
416
- href,
417
- onClick,
418
- variant,
419
- size,
420
- asButton = false,
421
- fallbackComponentType = "span",
422
- componentType,
423
- "aria-label": ariaLabel,
424
- "aria-describedby": ariaDescribedby,
425
- id,
426
- ...props
427
- }, ref) => {
428
- const navigation = useNavigation({ href, onClick });
429
- const {
430
- normalizedHref,
431
- target,
432
- rel,
433
- linkType,
434
- isInternal,
435
- handleClick
436
- } = navigation;
437
- const shouldRenderLink = normalizedHref && linkType !== "none";
438
- const shouldRenderButton = !shouldRenderLink && onClick;
439
- const effectiveComponentType = componentType || (shouldRenderLink ? "a" : shouldRenderButton ? "button" : fallbackComponentType);
440
- const finalComponentType = isInternal && shouldRenderLink ? "a" : effectiveComponentType;
441
- const shouldApplyButtonStyles = asButton || variant || size;
442
- const combinedClassName = cn(
443
- shouldApplyButtonStyles && buttonVariants({ variant, size }),
444
- className
445
- );
446
- const dataProps = Object.fromEntries(
447
- Object.entries(props).filter(([key]) => key.startsWith("data-"))
448
- );
449
- const buttonDataAttributes = shouldApplyButtonStyles ? {
450
- "data-slot": "button",
451
- "data-variant": variant ?? "default",
452
- "data-size": size ?? "default"
453
- } : {};
454
- const commonProps = {
455
- className: combinedClassName,
456
- onClick: handleClick,
457
- "aria-label": ariaLabel,
458
- "aria-describedby": ariaDescribedby,
459
- id,
460
- ...dataProps,
461
- ...buttonDataAttributes
462
- };
463
- if (finalComponentType === "a" && shouldRenderLink) {
464
- return /* @__PURE__ */ jsxRuntime.jsx(
465
- "a",
466
- {
467
- ref,
468
- href: normalizedHref,
469
- target,
470
- rel,
471
- ...commonProps,
472
- ...props,
473
- children
474
- }
475
- );
476
- }
477
- if (finalComponentType === "button") {
478
- return /* @__PURE__ */ jsxRuntime.jsx(
479
- "button",
480
- {
481
- ref,
482
- type: props.type || "button",
483
- ...commonProps,
484
- ...props,
485
- children
486
- }
487
- );
488
- }
489
- if (finalComponentType === "div") {
490
- return /* @__PURE__ */ jsxRuntime.jsx(
491
- "div",
492
- {
493
- ref,
494
- ...commonProps,
495
- children
496
- }
497
- );
498
- }
499
- return /* @__PURE__ */ jsxRuntime.jsx(
500
- "span",
501
- {
502
- ref,
503
- ...commonProps,
504
- children
505
- }
506
- );
553
+ function normalizePhoneNumber(input) {
554
+ const trimmed = input.trim();
555
+ if (trimmed.toLowerCase().startsWith("tel:")) {
556
+ return trimmed;
507
557
  }
508
- );
509
- Pressable.displayName = "Pressable";
510
- var maxWidthStyles = {
511
- sm: "max-w-screen-sm",
512
- md: "max-w-screen-md",
513
- lg: "max-w-screen-lg",
514
- xl: "max-w-7xl",
515
- "2xl": "max-w-screen-2xl",
516
- "4xl": "max-w-[1536px]",
517
- full: "max-w-full"
518
- };
519
- var Container = React__namespace.default.forwardRef(
520
- ({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
521
- const Component = as;
522
- return /* @__PURE__ */ jsxRuntime.jsx(
523
- Component,
524
- {
525
- ref,
526
- className: cn(
527
- "mx-auto w-full px-2 sm:px-4 lg:px-8",
528
- maxWidthStyles[maxWidth],
529
- className
530
- ),
531
- ...props,
532
- children
533
- }
534
- );
558
+ const match = trimmed.match(/^[\s\+\-\(\)]*(\d[\d\s\-\(\)\.]*\d)[\s\-]*(x|ext\.?|extension)?[\s\-]*(\d+)?$/i);
559
+ if (match) {
560
+ const mainNumber = match[1].replace(/[\s\-\(\)\.]/g, "");
561
+ const extension = match[3];
562
+ const normalized = mainNumber.length >= 10 && !trimmed.startsWith("+") ? `+${mainNumber}` : mainNumber;
563
+ const withExtension = extension ? `${normalized};ext=${extension}` : normalized;
564
+ return `tel:${withExtension}`;
535
565
  }
536
- );
537
- Container.displayName = "Container";
538
-
539
- // lib/patternSvgs.ts
540
- var patternSvgs = {
541
- squareAltGrid: "https://cdn.ing/assets/files/record/286187/4gpn0yq2ptra8iwlvmwwv860ggwv",
542
- grid1: "https://cdn.ing/assets/files/record/286186/nbdflpgp4ostrno079hygibsflp3",
543
- noise: "https://cdn.ing/assets/i/r/286188/zrqcp9hynh3j7p2laihwzfbujgrl/noise.png",
544
- dots: "https://cdn.ing/assets/files/record/286198/yfsjx9thvtxzhl2qtshxyhkrm524",
545
- dotPattern: "https://cdn.ing/assets/files/record/286192/7ig0cku8aqbboiza8nuk6hw0nnsr",
546
- dotPattern2: "https://cdn.ing/assets/files/record/286189/arez6gd2s7isn9i1o6c7sexdq7bl",
547
- circles: "https://cdn.ing/assets/files/record/286190/gtmia3sncjtzetdshc20zf1d3c17",
548
- waves: "https://cdn.ing/assets/files/record/286191/mqlb33fzxz9cdth1bx7if0wmpkp1",
549
- crossPattern: "https://cdn.ing/assets/files/record/286193/9yfqwdbnqaipbp7fsb3wbzzmq472",
550
- architect: "https://cdn.ing/assets/files/record/286194/vgs88ugpvyhxu13wqgy0acvae6re",
551
- tinyCheckers: "https://cdn.ing/assets/files/record/286195/65efaknsw8kcpf9o3c2gybytsl5b",
552
- p6: "https://cdn.ing/assets/i/r/286196/6kl0rqnd6mjk8j7e525fo8fo0vkc/p6.webp"
553
- };
554
- var maskTop = "radial-gradient(ellipse 70% 60% at 50% 0%, #000 60%, transparent 100%)";
555
- var maskBottom = "radial-gradient(ellipse 100% 80% at 50% 100%, #000 50%, transparent 90%)";
556
- var maskCenter = "radial-gradient(ellipse 60% 60% at 50% 50%, #000 30%, transparent 70%)";
557
- var maskTopLeft = "radial-gradient(ellipse 80% 80% at 0% 0%, #000 50%, transparent 90%)";
558
- var maskTopRight = "radial-gradient(ellipse 80% 80% at 100% 0%, #000 50%, transparent 90%)";
559
- var maskBottomLeft = "radial-gradient(ellipse 80% 80% at 0% 100%, #000 50%, transparent 90%)";
560
- var maskBottomRight = "radial-gradient(ellipse 80% 80% at 100% 100%, #000 50%, transparent 90%)";
561
- var circuitBoardPattern = (id, mask) => /* @__PURE__ */ jsxRuntime.jsxs(
562
- "svg",
563
- {
564
- className: "h-full w-full",
565
- xmlns: "http://www.w3.org/2000/svg",
566
- style: mask ? {
567
- maskImage: mask,
568
- WebkitMaskImage: mask
569
- } : void 0,
570
- children: [
571
- /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs(
572
- "pattern",
573
- {
574
- id,
575
- x: "0",
576
- y: "0",
577
- width: "100",
578
- height: "100",
579
- patternUnits: "userSpaceOnUse",
580
- children: [
581
- /* @__PURE__ */ jsxRuntime.jsx(
582
- "path",
583
- {
584
- d: "M0 50h40M60 50h40M50 0v40M50 60v40",
585
- stroke: "hsl(var(--muted))",
586
- strokeWidth: "1",
587
- fill: "none"
588
- }
589
- ),
590
- /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "50", cy: "50", r: "3", fill: "hsl(var(--muted))" }),
591
- /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "0", cy: "50", r: "2", fill: "hsl(var(--muted))" }),
592
- /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "100", cy: "50", r: "2", fill: "hsl(var(--muted))" }),
593
- /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "50", cy: "0", r: "2", fill: "hsl(var(--muted))" }),
594
- /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "50", cy: "100", r: "2", fill: "hsl(var(--muted))" })
595
- ]
596
- }
597
- ) }),
598
- /* @__PURE__ */ jsxRuntime.jsx("rect", { width: "100%", height: "100%", fill: `url(#${id})` })
599
- ]
566
+ const cleaned = trimmed.replace(/[\s\-\(\)\.]/g, "");
567
+ return `tel:${cleaned}`;
568
+ }
569
+ function normalizeEmail(input) {
570
+ const trimmed = input.trim();
571
+ if (trimmed.toLowerCase().startsWith("mailto:")) {
572
+ return trimmed;
573
+ }
574
+ return `mailto:${trimmed}`;
575
+ }
576
+ function isEmail(input) {
577
+ const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
578
+ return emailRegex.test(input.trim());
579
+ }
580
+ function isPhoneNumber(input) {
581
+ const trimmed = input.trim();
582
+ if (trimmed.toLowerCase().startsWith("tel:")) {
583
+ return true;
600
584
  }
601
- );
602
- var gridDotsPattern = (id, mask) => /* @__PURE__ */ jsxRuntime.jsxs(
603
- "svg",
604
- {
605
- className: "h-full w-full",
606
- xmlns: "http://www.w3.org/2000/svg",
607
- style: mask ? {
608
- maskImage: mask,
609
- WebkitMaskImage: mask
610
- } : void 0,
611
- children: [
612
- /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs(
613
- "pattern",
614
- {
615
- id,
616
- x: "0",
617
- y: "0",
618
- width: "40",
619
- height: "40",
620
- patternUnits: "userSpaceOnUse",
621
- children: [
622
- /* @__PURE__ */ jsxRuntime.jsx(
623
- "path",
624
- {
625
- d: "M0 20h40M20 0v40",
626
- stroke: "hsl(var(--muted))",
627
- strokeWidth: "0.5",
628
- fill: "none"
629
- }
630
- ),
631
- /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "20", cy: "20", r: "2", fill: "hsl(var(--muted))" })
632
- ]
633
- }
634
- ) }),
635
- /* @__PURE__ */ jsxRuntime.jsx("rect", { width: "100%", height: "100%", fill: `url(#${id})` })
636
- ]
585
+ const phoneRegex = /^[\s\+\-\(\)]*\d[\d\s\-\(\)\.]*\d[\s\-]*(x|ext\.?|extension)?[\s\-]*\d*$/i;
586
+ return phoneRegex.test(trimmed);
587
+ }
588
+ function isInternalUrl(href) {
589
+ if (typeof window === "undefined") {
590
+ return href.startsWith("/") && !href.startsWith("//");
637
591
  }
638
- );
639
- var gridPattern = (size, mask) => /* @__PURE__ */ jsxRuntime.jsx(
640
- "div",
641
- {
642
- 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)]",
643
- style: {
644
- backgroundSize: `${size}px ${size}px`,
645
- ...mask ? {
646
- maskImage: mask,
647
- WebkitMaskImage: mask
648
- } : {}
649
- }
592
+ const trimmed = href.trim();
593
+ if (trimmed.startsWith("/") && !trimmed.startsWith("//")) {
594
+ return true;
650
595
  }
651
- );
652
- var diagonalCrossPattern = (mask) => /* @__PURE__ */ jsxRuntime.jsx(
653
- "div",
654
- {
655
- className: "h-full w-full",
656
- style: {
657
- 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)",
658
- ...mask ? {
659
- maskImage: mask,
660
- WebkitMaskImage: mask
661
- } : {}
596
+ try {
597
+ const url = new URL(trimmed, window.location.href);
598
+ const currentOrigin = window.location.origin;
599
+ const normalizeOrigin = (origin) => origin.replace(/^(https?:\/\/)(www\.)?/, "$1");
600
+ return normalizeOrigin(url.origin) === normalizeOrigin(currentOrigin);
601
+ } catch {
602
+ return false;
603
+ }
604
+ }
605
+ function toRelativePath(href) {
606
+ if (typeof window === "undefined") {
607
+ return href;
608
+ }
609
+ const trimmed = href.trim();
610
+ if (trimmed.startsWith("/") && !trimmed.startsWith("//")) {
611
+ return trimmed;
612
+ }
613
+ try {
614
+ const url = new URL(trimmed, window.location.href);
615
+ const currentOrigin = window.location.origin;
616
+ const normalizeOrigin = (origin) => origin.replace(/^(https?:\/\/)(www\.)?/, "$1");
617
+ if (normalizeOrigin(url.origin) === normalizeOrigin(currentOrigin)) {
618
+ return url.pathname + url.search + url.hash;
662
619
  }
620
+ } catch {
663
621
  }
664
- );
665
- 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)";
666
- var dashedGridPattern = (fadeMask) => {
667
- const mask = fadeMask ? `${dashedGridMaskBase}, ${fadeMask}` : dashedGridMaskBase;
668
- return /* @__PURE__ */ jsxRuntime.jsx(
669
- "div",
670
- {
671
- className: "h-full w-full",
672
- style: {
673
- backgroundImage: "linear-gradient(to right, hsl(var(--muted)) 1px, transparent 1px), linear-gradient(to bottom, hsl(var(--muted)) 1px, transparent 1px)",
674
- backgroundSize: "20px 20px",
675
- backgroundPosition: "0 0, 0 0",
676
- maskImage: mask,
677
- WebkitMaskImage: mask,
678
- maskComposite: "intersect",
679
- WebkitMaskComposite: "source-in"
680
- }
622
+ return trimmed;
623
+ }
624
+ function useNavigation({
625
+ href,
626
+ onClick
627
+ } = {}) {
628
+ const linkType = React3__namespace.useMemo(() => {
629
+ if (!href || href.trim() === "") {
630
+ return onClick ? "none" : "none";
681
631
  }
682
- );
683
- };
684
- var gradientGlow = (position) => /* @__PURE__ */ jsxRuntime.jsx(
685
- "div",
686
- {
687
- className: cn(
688
- "pointer-events-none absolute left-1/2 z-0 aspect-square w-3/4 -translate-x-1/2 rounded-full opacity-50 blur-3xl",
689
- position === "top" ? "-top-1/4" : "-bottom-1/4"
690
- ),
691
- style: {
692
- background: "radial-gradient(circle, hsl(var(--primary)) 0%, transparent 70%)"
632
+ const trimmed = href.trim();
633
+ if (trimmed.toLowerCase().startsWith("mailto:") || isEmail(trimmed)) {
634
+ return "mailto";
693
635
  }
694
- }
695
- );
696
- var spotlight = (position) => /* @__PURE__ */ jsxRuntime.jsx(
697
- "div",
698
- {
699
- className: cn(
700
- "pointer-events-none absolute top-1/2 z-0 aspect-square w-3/4 -translate-y-1/2 rounded-full opacity-40 blur-3xl",
701
- position === "left" ? "-left-1/4" : "-right-1/4"
702
- ),
703
- style: {
704
- background: "radial-gradient(circle, hsl(var(--primary)) 0%, transparent 70%)"
636
+ if (trimmed.toLowerCase().startsWith("tel:") || isPhoneNumber(trimmed)) {
637
+ return "tel";
705
638
  }
706
- }
707
- );
708
- var patternOverlays = {
709
- circuitBoardBasic: () => circuitBoardPattern("circuit-board-basic"),
710
- circuitBoardFadeTop: () => circuitBoardPattern("circuit-board-fade-top", maskTop),
711
- circuitBoardFadeBottom: () => circuitBoardPattern("circuit-board-fade-bottom", maskBottom),
712
- circuitBoardFadeCenter: () => circuitBoardPattern("circuit-board-fade-center", maskCenter),
713
- circuitBoardFadeTopLeft: () => circuitBoardPattern("circuit-board-fade-top-left", maskTopLeft),
714
- circuitBoardFadeTopRight: () => circuitBoardPattern("circuit-board-fade-top-right", maskTopRight),
715
- circuitBoardFadeBottomLeft: () => circuitBoardPattern("circuit-board-fade-bottom-left", maskBottomLeft),
716
- circuitBoardFadeBottomRight: () => circuitBoardPattern("circuit-board-fade-bottom-right", maskBottomRight),
717
- dashedGridBasic: () => dashedGridPattern(),
718
- dashedGridFadeTop: () => dashedGridPattern(maskTop),
719
- dashedGridFadeBottom: () => dashedGridPattern(maskBottom),
720
- dashedGridFadeCenter: () => dashedGridPattern(maskCenter),
721
- dashedGridFadeTopLeft: () => dashedGridPattern(maskTopLeft),
722
- dashedGridFadeTopRight: () => dashedGridPattern(maskTopRight),
723
- dashedGridFadeBottomLeft: () => dashedGridPattern(maskBottomLeft),
724
- dashedGridFadeBottomRight: () => dashedGridPattern(maskBottomRight),
725
- diagonalCrossBasic: () => diagonalCrossPattern(),
726
- diagonalCrossFadeTop: () => diagonalCrossPattern(maskTop),
727
- diagonalCrossFadeBottom: () => diagonalCrossPattern(maskBottom),
728
- diagonalCrossFadeCenter: () => diagonalCrossPattern(maskCenter),
729
- diagonalCrossFadeTopLeft: () => diagonalCrossPattern(maskTopLeft),
730
- diagonalCrossFadeTopRight: () => diagonalCrossPattern(maskTopRight),
731
- diagonalCrossFadeBottomLeft: () => diagonalCrossPattern(maskBottomLeft),
732
- diagonalCrossFadeBottomRight: () => diagonalCrossPattern(maskBottomRight),
733
- gridBasic: () => gridPattern(40),
734
- gridFadeTop: () => gridPattern(32, maskTop),
735
- gridFadeBottom: () => gridPattern(32, maskBottom),
736
- gridFadeCenter: () => gridPattern(40, maskCenter),
737
- gridFadeTopLeft: () => gridPattern(32, maskTopLeft),
738
- gridFadeTopRight: () => gridPattern(32, maskTopRight),
739
- gridFadeBottomLeft: () => gridPattern(32, maskBottomLeft),
740
- gridFadeBottomRight: () => gridPattern(32, maskBottomRight),
741
- gridDotsBasic: () => gridDotsPattern("grid-dots-basic"),
742
- gridDotsFadeCenter: () => gridDotsPattern("grid-dots-fade-center", maskCenter),
743
- gradientGlowTop: () => gradientGlow("top"),
744
- gradientGlowBottom: () => gradientGlow("bottom"),
745
- spotlightLeft: () => spotlight("left"),
746
- spotlightRight: () => spotlight("right")
747
- };
748
- var inlinePatternStyles = {
749
- radialGradientTop: {
750
- background: "radial-gradient(125% 125% at 50% 10%, hsl(var(--background)) 40%, hsl(var(--primary)) 100%)"
751
- },
752
- radialGradientBottom: {
753
- background: "radial-gradient(125% 125% at 50% 90%, hsl(var(--background)) 40%, hsl(var(--primary)) 100%)"
754
- }
755
- };
756
- function PatternBackground({
757
- pattern,
758
- opacity = 0.08,
759
- className,
760
- style
761
- }) {
762
- if (!pattern) {
763
- return null;
764
- }
765
- if (pattern in inlinePatternStyles) {
766
- const inlineStyle = inlinePatternStyles[pattern];
767
- return /* @__PURE__ */ jsxRuntime.jsx(
768
- "div",
769
- {
770
- className: cn("pointer-events-none absolute inset-0 z-0", className),
771
- style: { ...inlineStyle, opacity, ...style },
772
- "aria-hidden": "true"
639
+ if (isInternalUrl(trimmed)) {
640
+ return "internal";
641
+ }
642
+ try {
643
+ new URL(trimmed, typeof window !== "undefined" ? window.location.href : "http://localhost");
644
+ return "external";
645
+ } catch {
646
+ return "internal";
647
+ }
648
+ }, [href, onClick]);
649
+ const normalizedHref = React3__namespace.useMemo(() => {
650
+ if (!href || href.trim() === "") {
651
+ return void 0;
652
+ }
653
+ const trimmed = href.trim();
654
+ switch (linkType) {
655
+ case "tel":
656
+ return normalizePhoneNumber(trimmed);
657
+ case "mailto":
658
+ return normalizeEmail(trimmed);
659
+ case "internal":
660
+ return toRelativePath(trimmed);
661
+ case "external":
662
+ return trimmed;
663
+ default:
664
+ return trimmed;
665
+ }
666
+ }, [href, linkType]);
667
+ const target = React3__namespace.useMemo(() => {
668
+ switch (linkType) {
669
+ case "external":
670
+ return "_blank";
671
+ case "internal":
672
+ return "_self";
673
+ case "mailto":
674
+ case "tel":
675
+ return void 0;
676
+ default:
677
+ return void 0;
678
+ }
679
+ }, [linkType]);
680
+ const rel = React3__namespace.useMemo(() => {
681
+ if (linkType === "external") {
682
+ return "noopener noreferrer";
683
+ }
684
+ return void 0;
685
+ }, [linkType]);
686
+ const isExternal = linkType === "external";
687
+ const isInternal = linkType === "internal";
688
+ const shouldUseRouter = isInternal && typeof normalizedHref === "string" && normalizedHref.startsWith("/");
689
+ const handleClick = React3__namespace.useCallback(
690
+ (event) => {
691
+ if (onClick) {
692
+ try {
693
+ onClick(event);
694
+ } catch (error) {
695
+ console.error("Error in user onClick handler:", error);
696
+ }
773
697
  }
774
- );
775
- }
776
- if (pattern in patternOverlays) {
777
- const Overlay = patternOverlays[pattern];
778
- return /* @__PURE__ */ jsxRuntime.jsx(
779
- "div",
780
- {
781
- className: cn("pointer-events-none absolute inset-0 z-0", className),
782
- style: { opacity, ...style },
783
- "aria-hidden": "true",
784
- children: Overlay()
698
+ if (event.defaultPrevented) {
699
+ return;
785
700
  }
786
- );
787
- }
788
- const patternUrl = pattern in patternSvgs ? patternSvgs[pattern] : pattern;
789
- return /* @__PURE__ */ jsxRuntime.jsx(
790
- "div",
791
- {
792
- className: cn("pointer-events-none absolute inset-0 z-0", className),
793
- style: {
794
- backgroundImage: `url(${patternUrl})`,
795
- backgroundRepeat: "repeat",
796
- backgroundSize: "auto",
797
- opacity,
798
- ...style
799
- },
800
- "aria-hidden": "true"
801
- }
701
+ if (shouldUseRouter && normalizedHref && event.button === 0 && // left-click only
702
+ !event.metaKey && !event.altKey && !event.ctrlKey && !event.shiftKey) {
703
+ if (typeof window !== "undefined") {
704
+ const handler = window.__opensiteNavigationHandler;
705
+ if (typeof handler === "function") {
706
+ try {
707
+ const handled = handler(normalizedHref, event.nativeEvent || event);
708
+ if (handled !== false) {
709
+ event.preventDefault();
710
+ }
711
+ } catch (error) {
712
+ console.error("Error in navigation handler:", error);
713
+ }
714
+ }
715
+ }
716
+ }
717
+ },
718
+ [onClick, shouldUseRouter, normalizedHref]
802
719
  );
720
+ return {
721
+ linkType,
722
+ normalizedHref,
723
+ target,
724
+ rel,
725
+ isExternal,
726
+ isInternal,
727
+ shouldUseRouter,
728
+ handleClick
729
+ };
803
730
  }
804
- var backgroundStyles = {
805
- default: "bg-background text-foreground",
806
- white: "bg-white text-dark",
807
- gray: "bg-muted/30 text-foreground",
808
- dark: "bg-foreground text-background",
809
- transparent: "bg-transparent text-foreground",
810
- gradient: "bg-linear-to-br from-primary via-primary/90 to-foreground text-primary-foreground",
811
- primary: "bg-primary text-primary-foreground",
812
- secondary: "bg-secondary text-secondary-foreground",
813
- muted: "bg-muted text-muted-foreground"
814
- };
815
- var spacingStyles = {
816
- none: "py-0 md:py-0",
817
- sm: "py-12 md:py-16",
818
- md: "py-16 md:py-24",
819
- lg: "py-20 md:py-32",
820
- xl: "py-24 md:py-40"
821
- };
822
- var predefinedSpacings = ["none", "sm", "md", "lg", "xl"];
823
- var isPredefinedSpacing = (spacing) => predefinedSpacings.includes(spacing);
824
- var Section = React__namespace.default.forwardRef(
731
+ var Pressable = React3__namespace.forwardRef(
825
732
  ({
826
- id,
827
- title,
828
- subtitle,
829
733
  children,
830
734
  className,
831
- style,
832
- background = "default",
833
- spacing = "lg",
834
- pattern,
835
- patternOpacity,
836
- patternClassName,
837
- containerClassName,
838
- containerMaxWidth = "xl",
735
+ href,
736
+ onClick,
737
+ variant,
738
+ size,
739
+ asButton = false,
740
+ fallbackComponentType = "span",
741
+ componentType,
742
+ "aria-label": ariaLabel,
743
+ "aria-describedby": ariaDescribedby,
744
+ id,
839
745
  ...props
840
746
  }, ref) => {
841
- const effectivePatternOpacity = patternOpacity !== void 0 ? patternOpacity : pattern ? 1 : 0;
842
- return /* @__PURE__ */ jsxRuntime.jsxs(
843
- "section",
747
+ const navigation = useNavigation({ href, onClick });
748
+ const {
749
+ normalizedHref,
750
+ target,
751
+ rel,
752
+ linkType,
753
+ isInternal,
754
+ handleClick
755
+ } = navigation;
756
+ const shouldRenderLink = normalizedHref && linkType !== "none";
757
+ const shouldRenderButton = !shouldRenderLink && onClick;
758
+ const effectiveComponentType = componentType || (shouldRenderLink ? "a" : shouldRenderButton ? "button" : fallbackComponentType);
759
+ const finalComponentType = isInternal && shouldRenderLink ? "a" : effectiveComponentType;
760
+ const shouldApplyButtonStyles = asButton || variant || size;
761
+ const combinedClassName = cn(
762
+ shouldApplyButtonStyles && buttonVariants({ variant, size }),
763
+ className
764
+ );
765
+ const dataProps = Object.fromEntries(
766
+ Object.entries(props).filter(([key]) => key.startsWith("data-"))
767
+ );
768
+ const buttonDataAttributes = shouldApplyButtonStyles ? {
769
+ "data-slot": "button",
770
+ "data-variant": variant ?? "default",
771
+ "data-size": size ?? "default"
772
+ } : {};
773
+ const commonProps = {
774
+ className: combinedClassName,
775
+ onClick: handleClick,
776
+ "aria-label": ariaLabel,
777
+ "aria-describedby": ariaDescribedby,
778
+ id,
779
+ ...dataProps,
780
+ ...buttonDataAttributes
781
+ };
782
+ if (finalComponentType === "a" && shouldRenderLink) {
783
+ return /* @__PURE__ */ jsxRuntime.jsx(
784
+ "a",
785
+ {
786
+ ref,
787
+ href: normalizedHref,
788
+ target,
789
+ rel,
790
+ ...commonProps,
791
+ ...props,
792
+ children
793
+ }
794
+ );
795
+ }
796
+ if (finalComponentType === "button") {
797
+ return /* @__PURE__ */ jsxRuntime.jsx(
798
+ "button",
799
+ {
800
+ ref,
801
+ type: props.type || "button",
802
+ ...commonProps,
803
+ ...props,
804
+ children
805
+ }
806
+ );
807
+ }
808
+ if (finalComponentType === "div") {
809
+ return /* @__PURE__ */ jsxRuntime.jsx(
810
+ "div",
811
+ {
812
+ ref,
813
+ ...commonProps,
814
+ children
815
+ }
816
+ );
817
+ }
818
+ return /* @__PURE__ */ jsxRuntime.jsx(
819
+ "span",
844
820
  {
845
821
  ref,
846
- id,
822
+ ...commonProps,
823
+ children
824
+ }
825
+ );
826
+ }
827
+ );
828
+ Pressable.displayName = "Pressable";
829
+ var MOBILE_CLASSES = {
830
+ "fit-left": "items-start md:items-center",
831
+ "fit-center": "items-center",
832
+ "fit-right": "items-end md:items-center",
833
+ "full-left": "items-stretch md:items-center",
834
+ "full-center": "items-stretch md:items-center",
835
+ "full-right": "items-stretch md:items-center"
836
+ };
837
+ function BlockActions({
838
+ mobileConfig,
839
+ actionsClassName,
840
+ verticalSpacing = "mt-4 md:mt-8",
841
+ actions,
842
+ actionsSlot
843
+ }) {
844
+ const renderAction = React3__namespace.useCallback(
845
+ (action, idx) => {
846
+ const {
847
+ label,
848
+ icon,
849
+ iconAfter,
850
+ children,
851
+ href,
852
+ onClick,
853
+ className: actionClassName,
854
+ ...pressableProps
855
+ } = action;
856
+ return /* @__PURE__ */ jsxRuntime.jsx(
857
+ Pressable,
858
+ {
859
+ href,
860
+ onClick,
861
+ asButton: action.asButton || true,
862
+ className: actionClassName,
863
+ ...pressableProps,
864
+ children: children ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
865
+ icon,
866
+ label,
867
+ iconAfter
868
+ ] })
869
+ },
870
+ idx
871
+ );
872
+ },
873
+ []
874
+ );
875
+ const width = mobileConfig?.width ?? "full";
876
+ const position = mobileConfig?.position ?? "center";
877
+ const mobileLayoutClass = MOBILE_CLASSES[`${width}-${position}`];
878
+ if (actionsSlot) {
879
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { children: actionsSlot });
880
+ } else if (actions && actions?.length > 0) {
881
+ return /* @__PURE__ */ jsxRuntime.jsx(
882
+ "div",
883
+ {
847
884
  className: cn(
848
- "relative",
849
- pattern ? "overflow-hidden" : null,
850
- backgroundStyles[background],
851
- isPredefinedSpacing(spacing) ? spacingStyles[spacing] : spacing,
852
- className
885
+ "flex flex-col md:flex-row flex-wrap gap-4",
886
+ mobileLayoutClass,
887
+ actionsClassName,
888
+ verticalSpacing
853
889
  ),
854
- style,
855
- ...props,
856
- children: [
857
- /* @__PURE__ */ jsxRuntime.jsx(
858
- PatternBackground,
859
- {
860
- pattern,
861
- opacity: effectivePatternOpacity,
862
- className: patternClassName
863
- }
864
- ),
865
- /* @__PURE__ */ jsxRuntime.jsxs(
866
- Container,
867
- {
868
- maxWidth: containerMaxWidth,
869
- className: cn("relative z-10", containerClassName),
870
- children: [
871
- (title || subtitle) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-6 text-center md:mb-16", children: [
872
- subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-sm font-semibold uppercase tracking-wider", children: subtitle }),
873
- title && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-3xl font-bold tracking-tight md:text-4xl lg:text-5xl", children: title })
874
- ] }),
875
- children
876
- ]
877
- }
878
- )
879
- ]
890
+ children: actions.map((action, index) => renderAction(action, index))
880
891
  }
881
892
  );
893
+ } else {
894
+ return null;
882
895
  }
883
- );
884
- Section.displayName = "Section";
896
+ }
885
897
  function AboutStoryExpertise({
886
898
  eyebrow,
887
899
  eyebrowClassName,
@@ -913,52 +925,45 @@ function AboutStoryExpertise({
913
925
  patternOpacity,
914
926
  optixFlowConfig
915
927
  }) {
916
- const storyContent = React.useMemo(() => {
928
+ const storyContent = React3.useMemo(() => {
917
929
  if (storySlot) return storySlot;
918
930
  if (!storyParagraphs || storyParagraphs.length === 0) return null;
919
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("space-y-4", getTextColor(background, "muted"), storyClassName), children: storyParagraphs.map(
931
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("space-y-4", storyClassName), children: storyParagraphs.map(
920
932
  (paragraph, idx) => typeof paragraph === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { children: paragraph }, idx) : /* @__PURE__ */ jsxRuntime.jsx("div", { children: paragraph }, idx)
921
933
  ) });
922
934
  }, [storySlot, storyParagraphs, storyClassName]);
923
- const actionsContent = React.useMemo(() => {
924
- if (actionsSlot) return actionsSlot;
925
- if (!actions || actions.length === 0) return null;
926
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-wrap gap-4", actionsClassName), children: actions.map((action, idx) => /* @__PURE__ */ jsxRuntime.jsx(
927
- Pressable,
928
- {
929
- href: action.href,
930
- onClick: action.onClick,
931
- size: action.size || "lg",
932
- variant: action.variant || "default",
933
- children: action.label
934
- },
935
- idx
936
- )) });
937
- }, [actionsSlot, actions, actionsClassName]);
938
- const highlightContent = React.useMemo(() => {
935
+ const highlightContent = React3.useMemo(() => {
939
936
  if (highlightSlot) return highlightSlot;
940
937
  if (!highlight) return null;
941
938
  return /* @__PURE__ */ jsxRuntime.jsxs(
942
939
  "div",
943
940
  {
944
941
  className: cn(
945
- "rounded-2xl border border-border/60 bg-background/90 p-6 shadow-xl",
942
+ "rounded-2xl border border-border/60 p-6 shadow-xl",
946
943
  highlightClassName
947
944
  ),
948
945
  children: [
949
946
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3 flex items-center gap-4", children: [
950
947
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-12 w-12 items-center justify-center rounded-full bg-primary text-primary-foreground", children: highlight.icon }),
951
948
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
952
- highlight.label && (typeof highlight.label === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-xs font-semibold uppercase tracking-[0.2em]", getTextColor(background, "muted")), children: highlight.label }) : highlight.label),
949
+ highlight.label && (typeof highlight.label === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
950
+ "p",
951
+ {
952
+ className: cn(
953
+ "text-xs font-semibold uppercase tracking-[0.2em]"
954
+ ),
955
+ children: highlight.label
956
+ }
957
+ ) : highlight.label),
953
958
  highlight.title && (typeof highlight.title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-bold", children: highlight.title }) : highlight.title)
954
959
  ] })
955
960
  ] }),
956
- highlight.description && (typeof highlight.description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-sm", getTextColor(background, "muted")), children: highlight.description }) : highlight.description)
961
+ highlight.description && (typeof highlight.description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-sm"), children: highlight.description }) : highlight.description)
957
962
  ]
958
963
  }
959
964
  );
960
965
  }, [highlightSlot, highlight, highlightClassName]);
961
- const expertiseAreasContent = React.useMemo(() => {
966
+ const expertiseAreasContent = React3.useMemo(() => {
962
967
  if (expertiseAreasSlot) return expertiseAreasSlot;
963
968
  if (!expertiseAreas || expertiseAreas.length === 0) return null;
964
969
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -977,14 +982,18 @@ function AboutStoryExpertise({
977
982
  transition: { duration: 0.3, delay: idx * 0.05 },
978
983
  className: "flex items-start gap-4 rounded-2xl bg-background p-6 shadow-sm transition-all duration-300 hover:-translate-y-1 hover:shadow-lg",
979
984
  children: [
980
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
981
- "flex h-12 w-12 items-center justify-center rounded-xl",
982
- getNestedCardBg(background, "muted"),
983
- getAccentColor(background)
984
- ), children: area.icon }),
985
+ /* @__PURE__ */ jsxRuntime.jsx(
986
+ "div",
987
+ {
988
+ className: cn(
989
+ "flex h-12 w-12 items-center justify-center rounded-xl"
990
+ ),
991
+ children: area.icon
992
+ }
993
+ ),
985
994
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
986
995
  area.title && (typeof area.title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-lg font-bold", children: area.title }) : area.title),
987
- area.description && (typeof area.description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("mt-1 text-sm", getTextColor(background, "muted")), children: area.description }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1", children: area.description }))
996
+ area.description && (typeof area.description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("mt-1 text-sm"), children: area.description }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1", children: area.description }))
988
997
  ] })
989
998
  ]
990
999
  },
@@ -1018,7 +1027,6 @@ function AboutStoryExpertise({
1018
1027
  {
1019
1028
  className: cn(
1020
1029
  "text-sm font-semibold uppercase tracking-[0.2em]",
1021
- getAccentColor(background),
1022
1030
  eyebrowClassName
1023
1031
  ),
1024
1032
  children: eyebrow
@@ -1036,7 +1044,14 @@ function AboutStoryExpertise({
1036
1044
  ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mt-2", headingClassName), children: heading }))
1037
1045
  ] }),
1038
1046
  storyContent,
1039
- actionsContent
1047
+ /* @__PURE__ */ jsxRuntime.jsx(
1048
+ BlockActions,
1049
+ {
1050
+ actions,
1051
+ actionsClassName,
1052
+ actionsSlot
1053
+ }
1054
+ )
1040
1055
  ]
1041
1056
  }
1042
1057
  ),
@@ -1078,12 +1093,11 @@ function AboutStoryExpertise({
1078
1093
  {
1079
1094
  className: cn(
1080
1095
  "mt-20 rounded-3xl p-8 md:p-12",
1081
- getNestedCardBg(background, "subtle"),
1082
1096
  expertiseSectionClassName
1083
1097
  ),
1084
1098
  children: [
1085
1099
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
1086
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-sm font-semibold uppercase tracking-[0.2em]", getAccentColor(background)), children: "Our Expertise" }),
1100
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-sm font-semibold uppercase tracking-[0.2em]"), children: "Our Expertise" }),
1087
1101
  expertiseHeading && (typeof expertiseHeading === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
1088
1102
  "h3",
1089
1103
  {
@@ -1099,7 +1113,6 @@ function AboutStoryExpertise({
1099
1113
  {
1100
1114
  className: cn(
1101
1115
  "mx-auto mt-3 max-w-2xl",
1102
- getTextColor(background, "muted"),
1103
1116
  expertiseDescriptionClassName
1104
1117
  ),
1105
1118
  children: expertiseDescription