@opensite/ui 2.0.6 → 2.0.8

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