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