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