@opensite/ui 2.0.2 → 2.0.4

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