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