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