@vantageos/mosaic-blocks 0.1.0-alpha.1
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/README.md +171 -0
- package/dist/index.cjs +1526 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +968 -0
- package/dist/index.d.ts +968 -0
- package/dist/index.js +1467 -0
- package/dist/index.js.map +1 -0
- package/dist/styles.css +67 -0
- package/package.json +66 -0
- package/registry.json +351 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,1526 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var button = require('@base-ui/react/button');
|
|
5
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
6
|
+
var React2 = require('react');
|
|
7
|
+
var avatar = require('@base-ui/react/avatar');
|
|
8
|
+
var input = require('@base-ui/react/input');
|
|
9
|
+
var field = require('@base-ui/react/field');
|
|
10
|
+
var _switch = require('@base-ui/react/switch');
|
|
11
|
+
var select = require('@base-ui/react/select');
|
|
12
|
+
var combobox = require('@base-ui/react/combobox');
|
|
13
|
+
var menu = require('@base-ui/react/menu');
|
|
14
|
+
|
|
15
|
+
function _interopNamespace(e) {
|
|
16
|
+
if (e && e.__esModule) return e;
|
|
17
|
+
var n = Object.create(null);
|
|
18
|
+
if (e) {
|
|
19
|
+
Object.keys(e).forEach(function (k) {
|
|
20
|
+
if (k !== 'default') {
|
|
21
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
22
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function () { return e[k]; }
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
n.default = e;
|
|
30
|
+
return Object.freeze(n);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
var React2__namespace = /*#__PURE__*/_interopNamespace(React2);
|
|
34
|
+
|
|
35
|
+
// src/version.ts
|
|
36
|
+
var version = "0.1.0-alpha.1";
|
|
37
|
+
function Placeholder({ label = "mosaic-blocks placeholder" }) {
|
|
38
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-mosaic-block": "placeholder", children: label });
|
|
39
|
+
}
|
|
40
|
+
function cn(...classes) {
|
|
41
|
+
return classes.filter(Boolean).join(" ");
|
|
42
|
+
}
|
|
43
|
+
var buttonVariants = classVarianceAuthority.cva(
|
|
44
|
+
// Base classes — identical to styleui base (adapted for Tailwind v4)
|
|
45
|
+
[
|
|
46
|
+
"inline-flex items-center justify-center whitespace-nowrap",
|
|
47
|
+
"rounded-md border border-transparent bg-clip-padding",
|
|
48
|
+
"text-sm font-medium select-none",
|
|
49
|
+
"transition-all outline-none",
|
|
50
|
+
"focus-visible:ring-[3px]",
|
|
51
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
52
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
53
|
+
"[&_svg:not([class*='size-'])]:size-4",
|
|
54
|
+
"group/button shrink-0"
|
|
55
|
+
],
|
|
56
|
+
{
|
|
57
|
+
variants: {
|
|
58
|
+
variant: {
|
|
59
|
+
default: "bg-foreground text-primary-foreground hover:bg-foreground/80",
|
|
60
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
61
|
+
ghost: "hover:bg-muted hover:text-foreground",
|
|
62
|
+
destructive: "bg-destructive/10 hover:bg-destructive/20 text-destructive focus-visible:border-destructive/40",
|
|
63
|
+
outline: "border-border bg-background hover:bg-muted hover:text-foreground shadow-xs",
|
|
64
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
65
|
+
},
|
|
66
|
+
size: {
|
|
67
|
+
default: "h-9 gap-1.5 px-4",
|
|
68
|
+
sm: "h-8 gap-1 rounded-[10px] px-2.5",
|
|
69
|
+
lg: "h-10 gap-1.5 px-4",
|
|
70
|
+
icon: "size-9",
|
|
71
|
+
"icon-sm": "size-8 rounded-[10px]",
|
|
72
|
+
"icon-lg": "size-10"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
defaultVariants: {
|
|
76
|
+
variant: "default",
|
|
77
|
+
size: "default"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
var MosaicButton = React2__namespace.forwardRef(function MosaicButton2({ className, variant, size, ...props }, ref) {
|
|
82
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
83
|
+
button.Button,
|
|
84
|
+
{
|
|
85
|
+
ref,
|
|
86
|
+
"data-slot": "button",
|
|
87
|
+
className: cn(buttonVariants({ variant, size }), className),
|
|
88
|
+
...props
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
});
|
|
92
|
+
MosaicButton.displayName = "MosaicButton";
|
|
93
|
+
function cn2(...classes) {
|
|
94
|
+
return classes.filter(Boolean).join(" ");
|
|
95
|
+
}
|
|
96
|
+
var MosaicNavbar = React2__namespace.forwardRef(function MosaicNavbar2({ logo, links, cta, className }, ref) {
|
|
97
|
+
const [isScrolled, setIsScrolled] = React2__namespace.useState(false);
|
|
98
|
+
const [isHidden, setIsHidden] = React2__namespace.useState(false);
|
|
99
|
+
const [isOpen, setIsOpen] = React2__namespace.useState(false);
|
|
100
|
+
const lastScrollY = React2__namespace.useRef(0);
|
|
101
|
+
React2__namespace.useEffect(() => {
|
|
102
|
+
const handleScroll = () => {
|
|
103
|
+
const current = window.scrollY;
|
|
104
|
+
setIsScrolled(current > 50);
|
|
105
|
+
if (current > lastScrollY.current && current > 150) {
|
|
106
|
+
setIsHidden(true);
|
|
107
|
+
setIsOpen(false);
|
|
108
|
+
} else {
|
|
109
|
+
setIsHidden(false);
|
|
110
|
+
}
|
|
111
|
+
lastScrollY.current = current;
|
|
112
|
+
};
|
|
113
|
+
window.addEventListener("scroll", handleScroll, { passive: true });
|
|
114
|
+
return () => window.removeEventListener("scroll", handleScroll);
|
|
115
|
+
}, []);
|
|
116
|
+
React2__namespace.useEffect(() => {
|
|
117
|
+
document.body.style.overflow = isOpen ? "hidden" : "";
|
|
118
|
+
return () => {
|
|
119
|
+
document.body.style.overflow = "";
|
|
120
|
+
};
|
|
121
|
+
}, [isOpen]);
|
|
122
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
123
|
+
"nav",
|
|
124
|
+
{
|
|
125
|
+
ref,
|
|
126
|
+
"aria-label": "Main navigation",
|
|
127
|
+
className: cn2(
|
|
128
|
+
"fixed left-0 right-0 top-0 z-50 px-4 pt-4 mx-auto w-full max-w-6xl transition-all duration-300 ease-out",
|
|
129
|
+
isHidden ? "opacity-0 -translate-y-5 pointer-events-none" : "opacity-100 translate-y-0",
|
|
130
|
+
className
|
|
131
|
+
),
|
|
132
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
133
|
+
"div",
|
|
134
|
+
{
|
|
135
|
+
className: cn2(
|
|
136
|
+
"relative mx-auto transition-transform duration-200",
|
|
137
|
+
isScrolled ? "scale-[0.98]" : "scale-100"
|
|
138
|
+
),
|
|
139
|
+
children: [
|
|
140
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
141
|
+
"div",
|
|
142
|
+
{
|
|
143
|
+
className: cn2(
|
|
144
|
+
"flex flex-row items-center justify-between gap-4 rounded-full border border-[oklch(0.9_0.005_250)] p-2 transition-all duration-300",
|
|
145
|
+
isScrolled ? "bg-[oklch(1_0_0_/_0.8)] backdrop-blur-[12px] shadow-[0_4px_20px_-5px_oklch(0_0_0_/_0.1)]" : "bg-[oklch(1_0_0)]"
|
|
146
|
+
),
|
|
147
|
+
children: [
|
|
148
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-2 flex items-center", children: logo }),
|
|
149
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "hidden flex-row items-center gap-4 lg:flex", children: [
|
|
150
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-row gap-8", children: links.map((link) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
151
|
+
"a",
|
|
152
|
+
{
|
|
153
|
+
href: link.href,
|
|
154
|
+
className: "flex flex-row items-center gap-1 font-medium transition-colors hover:text-[oklch(0.6_0.01_250)]",
|
|
155
|
+
children: link.label
|
|
156
|
+
},
|
|
157
|
+
link.href
|
|
158
|
+
)) }),
|
|
159
|
+
cta && /* @__PURE__ */ jsxRuntime.jsx(
|
|
160
|
+
"a",
|
|
161
|
+
{
|
|
162
|
+
href: cta.href,
|
|
163
|
+
className: "inline-flex items-center justify-center rounded-full bg-[oklch(0.15_0.01_250)] px-5 py-2 text-sm font-medium text-[oklch(0.98_0_0)] transition-colors hover:bg-[oklch(0.25_0.01_250)]",
|
|
164
|
+
children: cta.label
|
|
165
|
+
}
|
|
166
|
+
)
|
|
167
|
+
] }),
|
|
168
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row items-center gap-2 lg:hidden", children: [
|
|
169
|
+
cta && /* @__PURE__ */ jsxRuntime.jsx(
|
|
170
|
+
"a",
|
|
171
|
+
{
|
|
172
|
+
href: cta.href,
|
|
173
|
+
className: "inline-flex items-center justify-center rounded-full bg-[oklch(0.15_0.01_250)] px-4 py-1.5 text-sm font-medium text-[oklch(0.98_0_0)] transition-colors",
|
|
174
|
+
children: cta.label
|
|
175
|
+
}
|
|
176
|
+
),
|
|
177
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
178
|
+
"button",
|
|
179
|
+
{
|
|
180
|
+
type: "button",
|
|
181
|
+
"aria-label": isOpen ? "Close menu" : "Open menu",
|
|
182
|
+
"aria-expanded": isOpen,
|
|
183
|
+
"aria-controls": "mosaic-mobile-menu",
|
|
184
|
+
onClick: () => setIsOpen((v) => !v),
|
|
185
|
+
className: "inline-flex size-9 items-center justify-center rounded-full transition-colors hover:bg-[oklch(0.95_0.005_250)]",
|
|
186
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
187
|
+
"svg",
|
|
188
|
+
{
|
|
189
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
190
|
+
width: "20",
|
|
191
|
+
height: "20",
|
|
192
|
+
viewBox: "0 0 24 24",
|
|
193
|
+
fill: "none",
|
|
194
|
+
stroke: "currentColor",
|
|
195
|
+
strokeWidth: "2",
|
|
196
|
+
strokeLinecap: "round",
|
|
197
|
+
strokeLinejoin: "round",
|
|
198
|
+
"aria-hidden": "true",
|
|
199
|
+
children: isOpen ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
200
|
+
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
201
|
+
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
202
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
203
|
+
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "4", y1: "8", x2: "20", y2: "8" }),
|
|
204
|
+
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "4", y1: "16", x2: "20", y2: "16" })
|
|
205
|
+
] })
|
|
206
|
+
}
|
|
207
|
+
)
|
|
208
|
+
}
|
|
209
|
+
)
|
|
210
|
+
] })
|
|
211
|
+
]
|
|
212
|
+
}
|
|
213
|
+
),
|
|
214
|
+
isOpen && /* @__PURE__ */ jsxRuntime.jsx(
|
|
215
|
+
"div",
|
|
216
|
+
{
|
|
217
|
+
id: "mosaic-mobile-menu",
|
|
218
|
+
className: "absolute left-0 right-0 top-full z-50 mt-2 overflow-hidden lg:hidden",
|
|
219
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-2 rounded-2xl border border-[oklch(0.9_0.005_250)] bg-[oklch(1_0_0_/_0.95)] p-4 backdrop-blur-xl", children: links.map((link) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
220
|
+
"a",
|
|
221
|
+
{
|
|
222
|
+
href: link.href,
|
|
223
|
+
onClick: () => setIsOpen(false),
|
|
224
|
+
className: "flex flex-row items-center justify-between rounded-lg px-4 py-3 font-medium transition-colors hover:bg-[oklch(0.96_0.005_250)]",
|
|
225
|
+
children: link.label
|
|
226
|
+
},
|
|
227
|
+
link.href
|
|
228
|
+
)) })
|
|
229
|
+
}
|
|
230
|
+
)
|
|
231
|
+
]
|
|
232
|
+
}
|
|
233
|
+
)
|
|
234
|
+
}
|
|
235
|
+
);
|
|
236
|
+
});
|
|
237
|
+
MosaicNavbar.displayName = "MosaicNavbar";
|
|
238
|
+
function cn3(...classes) {
|
|
239
|
+
return classes.filter(Boolean).join(" ");
|
|
240
|
+
}
|
|
241
|
+
var MosaicHeroSplit = React2__namespace.forwardRef(
|
|
242
|
+
function MosaicHeroSplit2({ eyebrow, title, subtitle, cta, ctaSecondary, media, className }, ref) {
|
|
243
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
244
|
+
"section",
|
|
245
|
+
{
|
|
246
|
+
ref,
|
|
247
|
+
className: cn3(
|
|
248
|
+
"flex flex-col gap-16 items-center justify-center py-8 lg:pt-16 px-4",
|
|
249
|
+
className
|
|
250
|
+
),
|
|
251
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col lg:flex-row items-center justify-between w-full gap-8 max-w-6xl mx-auto", children: [
|
|
252
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-6 lg:max-w-xl", children: [
|
|
253
|
+
eyebrow && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex w-fit items-center rounded-full border border-[oklch(0.85_0.01_250)] bg-[oklch(0.97_0.005_250)] px-3 py-1 text-xs font-semibold tracking-wide text-[oklch(0.4_0.02_250)] uppercase", children: eyebrow }),
|
|
254
|
+
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl md:text-5xl lg:text-6xl font-medium tracking-tighter text-center lg:text-left text-[oklch(0.12_0.01_250)]", children: title }),
|
|
255
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base md:text-lg text-center lg:text-left text-[oklch(0.45_0.01_250)] leading-relaxed", children: subtitle }),
|
|
256
|
+
(cta ?? ctaSecondary) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row flex-wrap gap-3 justify-center lg:justify-start", children: [
|
|
257
|
+
cta && /* @__PURE__ */ jsxRuntime.jsx(
|
|
258
|
+
"a",
|
|
259
|
+
{
|
|
260
|
+
href: cta.href,
|
|
261
|
+
className: "inline-flex items-center justify-center rounded-full bg-[oklch(0.15_0.01_250)] px-6 py-2.5 text-sm font-medium text-[oklch(0.98_0_0)] transition-colors hover:bg-[oklch(0.25_0.01_250)]",
|
|
262
|
+
children: cta.label
|
|
263
|
+
}
|
|
264
|
+
),
|
|
265
|
+
ctaSecondary && /* @__PURE__ */ jsxRuntime.jsx(
|
|
266
|
+
"a",
|
|
267
|
+
{
|
|
268
|
+
href: ctaSecondary.href,
|
|
269
|
+
className: "inline-flex items-center justify-center rounded-full border border-[oklch(0.75_0.01_250)] bg-transparent px-6 py-2.5 text-sm font-medium text-[oklch(0.15_0.01_250)] transition-colors hover:bg-[oklch(0.96_0.005_250)]",
|
|
270
|
+
children: ctaSecondary.label
|
|
271
|
+
}
|
|
272
|
+
)
|
|
273
|
+
] })
|
|
274
|
+
] }),
|
|
275
|
+
media && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full lg:max-w-lg xl:max-w-2xl flex-shrink-0", children: media })
|
|
276
|
+
] })
|
|
277
|
+
}
|
|
278
|
+
);
|
|
279
|
+
}
|
|
280
|
+
);
|
|
281
|
+
MosaicHeroSplit.displayName = "MosaicHeroSplit";
|
|
282
|
+
function cn4(...classes) {
|
|
283
|
+
return classes.filter(Boolean).join(" ");
|
|
284
|
+
}
|
|
285
|
+
var MosaicFeatureCenteredMedia = React2__namespace.forwardRef(function MosaicFeatureCenteredMedia2({ title, body, features, media, className }, ref) {
|
|
286
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { ref, className: cn4("relative mx-auto w-full max-w-6xl px-4 py-16", className), children: [
|
|
287
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-12 text-center lg:mb-16", children: [
|
|
288
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-3xl font-medium tracking-tight text-[oklch(0.12_0.01_250)] sm:text-4xl", children: title }),
|
|
289
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-4 text-sm text-[oklch(0.5_0.01_250)] sm:text-base max-w-xl mx-auto", children: body })
|
|
290
|
+
] }),
|
|
291
|
+
features && features.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-12 grid grid-cols-1 gap-8 sm:grid-cols-2 lg:grid-cols-4", children: features.map((feature) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
292
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-medium text-[oklch(0.12_0.01_250)]", children: feature.title }),
|
|
293
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm leading-relaxed text-[oklch(0.5_0.01_250)]", children: feature.description })
|
|
294
|
+
] }, feature.id)) }),
|
|
295
|
+
media && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full max-w-4xl", children: media }) })
|
|
296
|
+
] });
|
|
297
|
+
});
|
|
298
|
+
MosaicFeatureCenteredMedia.displayName = "MosaicFeatureCenteredMedia";
|
|
299
|
+
function cn5(...classes) {
|
|
300
|
+
return classes.filter(Boolean).join(" ");
|
|
301
|
+
}
|
|
302
|
+
var MosaicStatsGrid = React2__namespace.forwardRef(
|
|
303
|
+
function MosaicStatsGrid2({ stats, heading, subtext, className }, ref) {
|
|
304
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { ref, className: cn5("w-full py-16", className), children: [
|
|
305
|
+
(heading ?? subtext) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-16 flex flex-col items-center gap-3 px-4 text-center", children: [
|
|
306
|
+
heading && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-3xl font-medium tracking-tight text-[oklch(0.12_0.01_250)] sm:text-4xl", children: heading }),
|
|
307
|
+
subtext && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-md text-sm text-[oklch(0.5_0.01_250)] sm:text-base", children: subtext })
|
|
308
|
+
] }),
|
|
309
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto max-w-5xl px-4", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
310
|
+
"div",
|
|
311
|
+
{
|
|
312
|
+
className: "grid grid-cols-1 border-l border-t border-[oklch(0.9_0.005_250)]",
|
|
313
|
+
style: {
|
|
314
|
+
gridTemplateColumns: `repeat(${Math.min(stats.length, 3)}, minmax(0, 1fr))`
|
|
315
|
+
},
|
|
316
|
+
children: stats.map((stat) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
317
|
+
"div",
|
|
318
|
+
{
|
|
319
|
+
className: "flex flex-col items-center justify-center border-b border-r border-[oklch(0.9_0.005_250)] py-12 px-6 text-center",
|
|
320
|
+
children: [
|
|
321
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-3xl font-semibold tracking-tight text-[oklch(0.12_0.01_250)] md:text-4xl tabular-nums", children: stat.value }),
|
|
322
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-sm text-[oklch(0.5_0.01_250)]", children: stat.label })
|
|
323
|
+
]
|
|
324
|
+
},
|
|
325
|
+
stat.label
|
|
326
|
+
))
|
|
327
|
+
}
|
|
328
|
+
) })
|
|
329
|
+
] });
|
|
330
|
+
}
|
|
331
|
+
);
|
|
332
|
+
MosaicStatsGrid.displayName = "MosaicStatsGrid";
|
|
333
|
+
function cn6(...classes) {
|
|
334
|
+
return classes.filter(Boolean).join(" ");
|
|
335
|
+
}
|
|
336
|
+
var MosaicPricingCard = React2__namespace.forwardRef(
|
|
337
|
+
function MosaicPricingCard2({ tier, price, features, cta, highlighted = false, className }, ref) {
|
|
338
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
339
|
+
"div",
|
|
340
|
+
{
|
|
341
|
+
ref,
|
|
342
|
+
className: cn6(
|
|
343
|
+
"flex min-w-72 flex-col gap-6 rounded-2xl border p-8",
|
|
344
|
+
highlighted ? "border-[oklch(0.6_0.15_250_/_0.5)] bg-[oklch(0.97_0.02_250)]" : "border-[oklch(0.9_0.005_250)] bg-[oklch(1_0_0)]",
|
|
345
|
+
className
|
|
346
|
+
),
|
|
347
|
+
children: [
|
|
348
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
349
|
+
"span",
|
|
350
|
+
{
|
|
351
|
+
className: cn6(
|
|
352
|
+
"inline-flex w-fit items-center rounded-sm border px-2.5 py-0.5 text-xs font-semibold",
|
|
353
|
+
highlighted ? "border-transparent bg-[oklch(0.15_0.01_250)] text-[oklch(0.98_0_0)]" : "border-[oklch(0.85_0.01_250)] bg-[oklch(1_0_0)] text-[oklch(0.2_0.01_250)]"
|
|
354
|
+
),
|
|
355
|
+
children: tier
|
|
356
|
+
}
|
|
357
|
+
),
|
|
358
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xl font-semibold text-[oklch(0.12_0.01_250)]", children: price }),
|
|
359
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
360
|
+
"a",
|
|
361
|
+
{
|
|
362
|
+
href: cta.href,
|
|
363
|
+
className: cn6(
|
|
364
|
+
"inline-flex w-full items-center justify-center rounded-lg px-4 py-2.5 text-sm font-medium transition-colors",
|
|
365
|
+
highlighted ? "bg-[oklch(0.15_0.01_250)] text-[oklch(0.98_0_0)] hover:bg-[oklch(0.25_0.01_250)]" : "border border-[oklch(0.75_0.01_250)] bg-transparent text-[oklch(0.15_0.01_250)] hover:bg-[oklch(0.96_0.005_250)]"
|
|
366
|
+
),
|
|
367
|
+
children: cta.label
|
|
368
|
+
}
|
|
369
|
+
),
|
|
370
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-2", children: features.map((feature) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
371
|
+
"li",
|
|
372
|
+
{
|
|
373
|
+
className: "flex items-center gap-2 text-sm text-[oklch(0.35_0.01_250)]",
|
|
374
|
+
children: [
|
|
375
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
376
|
+
"svg",
|
|
377
|
+
{
|
|
378
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
379
|
+
width: "16",
|
|
380
|
+
height: "16",
|
|
381
|
+
viewBox: "0 0 24 24",
|
|
382
|
+
fill: "none",
|
|
383
|
+
stroke: "currentColor",
|
|
384
|
+
strokeWidth: "2.5",
|
|
385
|
+
strokeLinecap: "round",
|
|
386
|
+
strokeLinejoin: "round",
|
|
387
|
+
className: "shrink-0 text-[oklch(0.5_0.12_145)]",
|
|
388
|
+
"aria-hidden": "true",
|
|
389
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "20 6 9 17 4 12" })
|
|
390
|
+
}
|
|
391
|
+
),
|
|
392
|
+
feature
|
|
393
|
+
]
|
|
394
|
+
},
|
|
395
|
+
feature
|
|
396
|
+
)) })
|
|
397
|
+
]
|
|
398
|
+
}
|
|
399
|
+
);
|
|
400
|
+
}
|
|
401
|
+
);
|
|
402
|
+
MosaicPricingCard.displayName = "MosaicPricingCard";
|
|
403
|
+
function cn7(...classes) {
|
|
404
|
+
return classes.filter(Boolean).join(" ");
|
|
405
|
+
}
|
|
406
|
+
var MosaicLogosGrid = React2__namespace.forwardRef(
|
|
407
|
+
function MosaicLogosGrid2({ logos, heading, className }, ref) {
|
|
408
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
409
|
+
"section",
|
|
410
|
+
{
|
|
411
|
+
ref,
|
|
412
|
+
className: cn7(
|
|
413
|
+
"flex flex-col items-center justify-center gap-8 px-4 py-12 mx-auto max-w-6xl",
|
|
414
|
+
className
|
|
415
|
+
),
|
|
416
|
+
children: [
|
|
417
|
+
heading && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-center text-sm font-light text-[oklch(0.5_0.01_250)]", children: heading }),
|
|
418
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap items-center justify-center gap-6 md:gap-8 lg:gap-12", children: logos.map((logo) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "transition-transform duration-200 hover:scale-110", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
419
|
+
"img",
|
|
420
|
+
{
|
|
421
|
+
src: logo.src,
|
|
422
|
+
alt: logo.name,
|
|
423
|
+
width: logo.width ?? 80,
|
|
424
|
+
height: logo.height ?? 80,
|
|
425
|
+
className: "object-contain opacity-70 grayscale hover:opacity-100 hover:grayscale-0 transition-all duration-200"
|
|
426
|
+
}
|
|
427
|
+
) }, logo.name)) })
|
|
428
|
+
]
|
|
429
|
+
}
|
|
430
|
+
);
|
|
431
|
+
}
|
|
432
|
+
);
|
|
433
|
+
MosaicLogosGrid.displayName = "MosaicLogosGrid";
|
|
434
|
+
function cn8(...classes) {
|
|
435
|
+
return classes.filter(Boolean).join(" ");
|
|
436
|
+
}
|
|
437
|
+
function getInitials(name) {
|
|
438
|
+
return name.split(" ").map((n) => n[0]).slice(0, 2).join("").toUpperCase();
|
|
439
|
+
}
|
|
440
|
+
function TestimonialCard({ item, featured = false }) {
|
|
441
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
442
|
+
"article",
|
|
443
|
+
{
|
|
444
|
+
className: cn8(
|
|
445
|
+
"flex flex-col gap-4 rounded-xl border border-[oklch(0.9_0.005_250)] bg-[oklch(1_0_0)] p-6",
|
|
446
|
+
featured && "h-full"
|
|
447
|
+
),
|
|
448
|
+
children: [
|
|
449
|
+
item.logo && /* @__PURE__ */ jsxRuntime.jsx(
|
|
450
|
+
"img",
|
|
451
|
+
{
|
|
452
|
+
src: item.logo,
|
|
453
|
+
alt: `${item.author} company logo`,
|
|
454
|
+
width: 100,
|
|
455
|
+
height: 32,
|
|
456
|
+
className: "h-8 w-auto object-contain grayscale"
|
|
457
|
+
}
|
|
458
|
+
),
|
|
459
|
+
/* @__PURE__ */ jsxRuntime.jsx("blockquote", { className: "flex-1 text-base leading-relaxed text-[oklch(0.2_0.01_250)]", children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: item.quote }) }),
|
|
460
|
+
/* @__PURE__ */ jsxRuntime.jsxs("footer", { className: "flex items-center gap-3", children: [
|
|
461
|
+
item.avatar ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
462
|
+
"img",
|
|
463
|
+
{
|
|
464
|
+
src: item.avatar,
|
|
465
|
+
alt: item.author,
|
|
466
|
+
width: 40,
|
|
467
|
+
height: 40,
|
|
468
|
+
className: "size-10 rounded-full object-cover"
|
|
469
|
+
}
|
|
470
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
471
|
+
"div",
|
|
472
|
+
{
|
|
473
|
+
"aria-hidden": "true",
|
|
474
|
+
className: "flex size-10 shrink-0 items-center justify-center rounded-full bg-[oklch(0.92_0.02_250)] text-xs font-semibold text-[oklch(0.3_0.02_250)]",
|
|
475
|
+
children: getInitials(item.author)
|
|
476
|
+
}
|
|
477
|
+
),
|
|
478
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
|
|
479
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-[oklch(0.15_0.01_250)]", children: item.author }),
|
|
480
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-[oklch(0.5_0.01_250)]", children: item.role })
|
|
481
|
+
] })
|
|
482
|
+
] })
|
|
483
|
+
]
|
|
484
|
+
}
|
|
485
|
+
);
|
|
486
|
+
}
|
|
487
|
+
var MosaicTestimonialsGrid = React2__namespace.forwardRef(
|
|
488
|
+
function MosaicTestimonialsGrid2({ testimonials, heading, className }, ref) {
|
|
489
|
+
const [featured, ...rest] = testimonials;
|
|
490
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { ref, className: cn8("px-4 py-16 mx-auto max-w-6xl", className), children: [
|
|
491
|
+
heading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-12 text-center", children: /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl font-normal tracking-tight text-[oklch(0.12_0.01_250)] md:text-4xl", children: heading }) }),
|
|
492
|
+
testimonials.length === 0 ? null : testimonials.length === 1 ? /* @__PURE__ */ jsxRuntime.jsx(TestimonialCard, { item: featured }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-6 md:grid-cols-6", children: [
|
|
493
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "md:col-span-3 h-full", children: /* @__PURE__ */ jsxRuntime.jsx(TestimonialCard, { item: featured, featured: true }) }),
|
|
494
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "md:col-span-3 flex flex-col gap-6", children: rest.map((item) => /* @__PURE__ */ jsxRuntime.jsx(TestimonialCard, { item }, item.id)) })
|
|
495
|
+
] })
|
|
496
|
+
] });
|
|
497
|
+
}
|
|
498
|
+
);
|
|
499
|
+
MosaicTestimonialsGrid.displayName = "MosaicTestimonialsGrid";
|
|
500
|
+
function cn9(...classes) {
|
|
501
|
+
return classes.filter(Boolean).join(" ");
|
|
502
|
+
}
|
|
503
|
+
var MosaicFooterSimple = React2__namespace.forwardRef(
|
|
504
|
+
function MosaicFooterSimple2({ columns, legal, logo, social, className }, ref) {
|
|
505
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
506
|
+
"footer",
|
|
507
|
+
{
|
|
508
|
+
ref,
|
|
509
|
+
className: cn9(
|
|
510
|
+
"flex flex-col items-center gap-10 px-4 py-16 border-t border-[oklch(0.9_0.005_250)]",
|
|
511
|
+
className
|
|
512
|
+
),
|
|
513
|
+
children: [
|
|
514
|
+
logo && /* @__PURE__ */ jsxRuntime.jsx("div", { children: logo }),
|
|
515
|
+
columns.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
516
|
+
"div",
|
|
517
|
+
{
|
|
518
|
+
className: "grid w-full max-w-4xl gap-8",
|
|
519
|
+
style: {
|
|
520
|
+
gridTemplateColumns: `repeat(${Math.min(columns.length, 4)}, minmax(0, 1fr))`
|
|
521
|
+
},
|
|
522
|
+
children: columns.map((col) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
523
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-semibold uppercase tracking-widest text-[oklch(0.3_0.01_250)]", children: col.heading }),
|
|
524
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-2", children: col.links.map((link) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
525
|
+
"a",
|
|
526
|
+
{
|
|
527
|
+
href: link.href,
|
|
528
|
+
className: "text-sm text-[oklch(0.5_0.01_250)] transition-colors hover:text-[oklch(0.15_0.01_250)]",
|
|
529
|
+
children: link.label
|
|
530
|
+
}
|
|
531
|
+
) }, link.href)) })
|
|
532
|
+
] }, col.id))
|
|
533
|
+
}
|
|
534
|
+
),
|
|
535
|
+
social && social.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-row gap-4", children: social.map((s) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
536
|
+
"a",
|
|
537
|
+
{
|
|
538
|
+
href: s.href,
|
|
539
|
+
"aria-label": s.label,
|
|
540
|
+
className: "flex items-center justify-center transition-opacity hover:opacity-70",
|
|
541
|
+
rel: "noopener noreferrer",
|
|
542
|
+
target: "_blank",
|
|
543
|
+
children: s.iconSrc ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: s.iconSrc, alt: s.label, width: 24, height: 24, className: "size-6" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-[oklch(0.5_0.01_250)]", children: s.label })
|
|
544
|
+
},
|
|
545
|
+
s.href
|
|
546
|
+
)) }),
|
|
547
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-center text-sm text-[oklch(0.55_0.01_250)]", children: legal })
|
|
548
|
+
]
|
|
549
|
+
}
|
|
550
|
+
);
|
|
551
|
+
}
|
|
552
|
+
);
|
|
553
|
+
MosaicFooterSimple.displayName = "MosaicFooterSimple";
|
|
554
|
+
function easeOutExpo(t) {
|
|
555
|
+
return t === 1 ? 1 : 1 - 2 ** (-10 * t);
|
|
556
|
+
}
|
|
557
|
+
var MosaicCounter = React2__namespace.forwardRef(
|
|
558
|
+
function MosaicCounter2({ value, duration = 1500, format, className }, ref) {
|
|
559
|
+
const [current, setCurrent] = React2__namespace.useState(0);
|
|
560
|
+
const rafRef = React2__namespace.useRef(0);
|
|
561
|
+
const startTimeRef = React2__namespace.useRef(null);
|
|
562
|
+
React2__namespace.useEffect(() => {
|
|
563
|
+
const prefersReduced = typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
564
|
+
if (prefersReduced) {
|
|
565
|
+
setCurrent(value);
|
|
566
|
+
return;
|
|
567
|
+
}
|
|
568
|
+
startTimeRef.current = null;
|
|
569
|
+
const animate = (timestamp) => {
|
|
570
|
+
if (startTimeRef.current === null) {
|
|
571
|
+
startTimeRef.current = timestamp;
|
|
572
|
+
}
|
|
573
|
+
const elapsed = timestamp - startTimeRef.current;
|
|
574
|
+
const progress = Math.min(elapsed / duration, 1);
|
|
575
|
+
const eased = easeOutExpo(progress);
|
|
576
|
+
setCurrent(Math.round(eased * value));
|
|
577
|
+
if (progress < 1) {
|
|
578
|
+
rafRef.current = requestAnimationFrame(animate);
|
|
579
|
+
} else {
|
|
580
|
+
setCurrent(value);
|
|
581
|
+
}
|
|
582
|
+
};
|
|
583
|
+
rafRef.current = requestAnimationFrame(animate);
|
|
584
|
+
return () => {
|
|
585
|
+
if (rafRef.current) cancelAnimationFrame(rafRef.current);
|
|
586
|
+
};
|
|
587
|
+
}, [value, duration]);
|
|
588
|
+
const display = format ? format(current) : String(current);
|
|
589
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
590
|
+
"span",
|
|
591
|
+
{
|
|
592
|
+
ref,
|
|
593
|
+
className,
|
|
594
|
+
style: { fontVariantNumeric: "tabular-nums" },
|
|
595
|
+
"aria-label": format ? format(value) : String(value),
|
|
596
|
+
"aria-live": "polite",
|
|
597
|
+
children: display
|
|
598
|
+
}
|
|
599
|
+
);
|
|
600
|
+
}
|
|
601
|
+
);
|
|
602
|
+
MosaicCounter.displayName = "MosaicCounter";
|
|
603
|
+
function cn10(...classes) {
|
|
604
|
+
return classes.filter(Boolean).join(" ");
|
|
605
|
+
}
|
|
606
|
+
function getSystemTheme() {
|
|
607
|
+
if (typeof window === "undefined") return "light";
|
|
608
|
+
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
609
|
+
}
|
|
610
|
+
var MosaicThemeToggle = React2__namespace.forwardRef(
|
|
611
|
+
function MosaicThemeToggle2({ themes = ["light", "dark"], onChange, className, label }, ref) {
|
|
612
|
+
const [theme, setTheme] = React2__namespace.useState(() => {
|
|
613
|
+
if (typeof document === "undefined") return themes[0];
|
|
614
|
+
const current = document.documentElement.getAttribute("data-theme");
|
|
615
|
+
return current && themes.includes(current) ? current : themes[0];
|
|
616
|
+
});
|
|
617
|
+
const applyTheme = React2__namespace.useCallback(
|
|
618
|
+
(next) => {
|
|
619
|
+
const resolved = next === "system" ? getSystemTheme() : next;
|
|
620
|
+
document.documentElement.setAttribute("data-theme", resolved);
|
|
621
|
+
setTheme(next);
|
|
622
|
+
onChange?.(next);
|
|
623
|
+
},
|
|
624
|
+
[onChange]
|
|
625
|
+
);
|
|
626
|
+
const handleToggle = () => {
|
|
627
|
+
const idx = themes.indexOf(theme);
|
|
628
|
+
const next = themes[(idx + 1) % themes.length];
|
|
629
|
+
applyTheme(next);
|
|
630
|
+
};
|
|
631
|
+
const isDark = theme === "dark" || theme === "system" && typeof window !== "undefined" && getSystemTheme() === "dark";
|
|
632
|
+
const ariaLabel = label ?? (isDark ? "Switch to light theme" : "Switch to dark theme");
|
|
633
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
634
|
+
"button",
|
|
635
|
+
{
|
|
636
|
+
ref,
|
|
637
|
+
type: "button",
|
|
638
|
+
"aria-label": ariaLabel,
|
|
639
|
+
"aria-pressed": isDark,
|
|
640
|
+
onClick: handleToggle,
|
|
641
|
+
className: cn10(
|
|
642
|
+
"inline-flex size-9 items-center justify-center rounded-full border border-[oklch(0.9_0.005_250)] bg-[oklch(var(--mosaic-surface,1_0_0))] transition-colors hover:bg-[oklch(0.95_0.005_250)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[oklch(0.5_0.15_250)]",
|
|
643
|
+
className
|
|
644
|
+
),
|
|
645
|
+
children: isDark ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
646
|
+
"svg",
|
|
647
|
+
{
|
|
648
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
649
|
+
width: "16",
|
|
650
|
+
height: "16",
|
|
651
|
+
viewBox: "0 0 24 24",
|
|
652
|
+
fill: "none",
|
|
653
|
+
stroke: "currentColor",
|
|
654
|
+
strokeWidth: "2",
|
|
655
|
+
strokeLinecap: "round",
|
|
656
|
+
strokeLinejoin: "round",
|
|
657
|
+
"aria-hidden": "true",
|
|
658
|
+
children: [
|
|
659
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "4" }),
|
|
660
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41" })
|
|
661
|
+
]
|
|
662
|
+
}
|
|
663
|
+
) : (
|
|
664
|
+
/* Moon icon — shown in light mode */
|
|
665
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
666
|
+
"svg",
|
|
667
|
+
{
|
|
668
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
669
|
+
width: "16",
|
|
670
|
+
height: "16",
|
|
671
|
+
viewBox: "0 0 24 24",
|
|
672
|
+
fill: "none",
|
|
673
|
+
stroke: "currentColor",
|
|
674
|
+
strokeWidth: "2",
|
|
675
|
+
strokeLinecap: "round",
|
|
676
|
+
strokeLinejoin: "round",
|
|
677
|
+
"aria-hidden": "true",
|
|
678
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" })
|
|
679
|
+
}
|
|
680
|
+
)
|
|
681
|
+
)
|
|
682
|
+
}
|
|
683
|
+
);
|
|
684
|
+
}
|
|
685
|
+
);
|
|
686
|
+
MosaicThemeToggle.displayName = "MosaicThemeToggle";
|
|
687
|
+
var MosaicBlurredOrb = React2__namespace.forwardRef(
|
|
688
|
+
function MosaicBlurredOrb2({
|
|
689
|
+
colors = ["oklch(0.7 0.15 250)", "oklch(0.65 0.18 290)"],
|
|
690
|
+
size = 500,
|
|
691
|
+
position = { top: "-15%", left: "-10%" },
|
|
692
|
+
blur = 80,
|
|
693
|
+
opacity = 0.6,
|
|
694
|
+
className
|
|
695
|
+
}, ref) {
|
|
696
|
+
const gradientStops = colors.map((color, i) => {
|
|
697
|
+
const pct = Math.round(i / Math.max(colors.length - 1, 1) * 100);
|
|
698
|
+
return `${color} ${pct}%`;
|
|
699
|
+
}).join(", ");
|
|
700
|
+
const gradient = colors.length === 1 ? `radial-gradient(circle, ${colors[0]} 0%, transparent 70%)` : `radial-gradient(circle, ${gradientStops}, transparent 75%)`;
|
|
701
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
702
|
+
"div",
|
|
703
|
+
{
|
|
704
|
+
ref,
|
|
705
|
+
"aria-hidden": "true",
|
|
706
|
+
className,
|
|
707
|
+
style: {
|
|
708
|
+
position: "absolute",
|
|
709
|
+
width: size,
|
|
710
|
+
height: size,
|
|
711
|
+
borderRadius: "50%",
|
|
712
|
+
background: gradient,
|
|
713
|
+
filter: `blur(${blur}px)`,
|
|
714
|
+
opacity,
|
|
715
|
+
pointerEvents: "none",
|
|
716
|
+
...position
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
);
|
|
720
|
+
}
|
|
721
|
+
);
|
|
722
|
+
MosaicBlurredOrb.displayName = "MosaicBlurredOrb";
|
|
723
|
+
var ANIMATION_ID = "mosaic-animated-list-kf";
|
|
724
|
+
function injectKeyframes() {
|
|
725
|
+
if (typeof document === "undefined") return;
|
|
726
|
+
if (document.getElementById(ANIMATION_ID)) return;
|
|
727
|
+
const style = document.createElement("style");
|
|
728
|
+
style.id = ANIMATION_ID;
|
|
729
|
+
style.textContent = `
|
|
730
|
+
@keyframes mosaic-list-item-in {
|
|
731
|
+
from { opacity: 0; transform: translateY(12px); }
|
|
732
|
+
to { opacity: 1; transform: translateY(0); }
|
|
733
|
+
}
|
|
734
|
+
@media (prefers-reduced-motion: reduce) {
|
|
735
|
+
.mosaic-list-item { animation: none !important; opacity: 1 !important; transform: none !important; }
|
|
736
|
+
}
|
|
737
|
+
`;
|
|
738
|
+
document.head.appendChild(style);
|
|
739
|
+
}
|
|
740
|
+
var MosaicAnimatedList = React2__namespace.forwardRef(
|
|
741
|
+
function MosaicAnimatedList2({ stagger = 80, children, className, as: Tag = "ul" }, ref) {
|
|
742
|
+
React2__namespace.useEffect(() => {
|
|
743
|
+
injectKeyframes();
|
|
744
|
+
}, []);
|
|
745
|
+
const items = React2__namespace.Children.toArray(children);
|
|
746
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
747
|
+
Tag,
|
|
748
|
+
{
|
|
749
|
+
ref,
|
|
750
|
+
className,
|
|
751
|
+
children: items.map((child, i) => {
|
|
752
|
+
const stableKey = child.key ?? `item-${i}`;
|
|
753
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React2__namespace.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
754
|
+
"div",
|
|
755
|
+
{
|
|
756
|
+
className: "mosaic-list-item",
|
|
757
|
+
style: {
|
|
758
|
+
opacity: 0,
|
|
759
|
+
animation: `mosaic-list-item-in 400ms ease-out ${i * stagger}ms forwards`
|
|
760
|
+
},
|
|
761
|
+
children: child
|
|
762
|
+
}
|
|
763
|
+
) }, stableKey);
|
|
764
|
+
})
|
|
765
|
+
}
|
|
766
|
+
);
|
|
767
|
+
}
|
|
768
|
+
);
|
|
769
|
+
MosaicAnimatedList.displayName = "MosaicAnimatedList";
|
|
770
|
+
function cn11(...classes) {
|
|
771
|
+
return classes.filter(Boolean).join(" ");
|
|
772
|
+
}
|
|
773
|
+
var badgeClass = "inline-flex items-center gap-2 rounded-full border border-[oklch(0.88_0.01_250)] bg-[oklch(0.98_0.005_250)] px-3 py-1.5 text-sm font-medium text-[oklch(0.25_0.01_250)] shadow-[0_1px_3px_oklch(0_0_0_/_0.06)] transition-colors";
|
|
774
|
+
var hoverClass = "hover:border-[oklch(0.8_0.01_250)] hover:bg-[oklch(0.96_0.005_250)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[oklch(0.5_0.15_250)]";
|
|
775
|
+
var MosaicIntegrationsBadge = React2__namespace.forwardRef(function MosaicIntegrationsBadge2({ label, logo, href, target = "_blank", className }, ref) {
|
|
776
|
+
const inner = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
777
|
+
logo && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex shrink-0 items-center", children: logo }),
|
|
778
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: label })
|
|
779
|
+
] });
|
|
780
|
+
if (href) {
|
|
781
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
782
|
+
"a",
|
|
783
|
+
{
|
|
784
|
+
ref,
|
|
785
|
+
href,
|
|
786
|
+
target,
|
|
787
|
+
rel: target === "_blank" ? "noopener noreferrer" : void 0,
|
|
788
|
+
className: cn11(badgeClass, hoverClass, className),
|
|
789
|
+
children: inner
|
|
790
|
+
}
|
|
791
|
+
);
|
|
792
|
+
}
|
|
793
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { ref, className: cn11(badgeClass, className), children: inner });
|
|
794
|
+
});
|
|
795
|
+
MosaicIntegrationsBadge.displayName = "MosaicIntegrationsBadge";
|
|
796
|
+
var PATTERN_ANIM_ID = "mosaic-falling-pattern-kf";
|
|
797
|
+
function injectPatternKeyframes() {
|
|
798
|
+
if (typeof document === "undefined") return;
|
|
799
|
+
if (document.getElementById(PATTERN_ANIM_ID)) return;
|
|
800
|
+
const style = document.createElement("style");
|
|
801
|
+
style.id = PATTERN_ANIM_ID;
|
|
802
|
+
style.textContent = `
|
|
803
|
+
@keyframes mosaic-falling-dots {
|
|
804
|
+
0% { transform: translateY(0); opacity: 1; }
|
|
805
|
+
100% { transform: translateY(48px); opacity: 0; }
|
|
806
|
+
}
|
|
807
|
+
@media (prefers-reduced-motion: reduce) {
|
|
808
|
+
.mosaic-falling-dot { animation: none !important; opacity: 0.5 !important; }
|
|
809
|
+
}
|
|
810
|
+
`;
|
|
811
|
+
document.head.appendChild(style);
|
|
812
|
+
}
|
|
813
|
+
var MosaicFallingPattern = React2__namespace.forwardRef(
|
|
814
|
+
function MosaicFallingPattern2({ density = 12, color = "oklch(0.85 0.005 250)", animationDuration = 4e3, className }, ref) {
|
|
815
|
+
const uniqueId = React2__namespace.useId();
|
|
816
|
+
React2__namespace.useEffect(() => {
|
|
817
|
+
injectPatternKeyframes();
|
|
818
|
+
}, []);
|
|
819
|
+
const cols = density;
|
|
820
|
+
const rows = Math.ceil(density / 2);
|
|
821
|
+
const cellW = 100 / cols;
|
|
822
|
+
const cellH = 100 / rows;
|
|
823
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
824
|
+
"div",
|
|
825
|
+
{
|
|
826
|
+
ref,
|
|
827
|
+
"aria-hidden": "true",
|
|
828
|
+
className,
|
|
829
|
+
style: {
|
|
830
|
+
position: "absolute",
|
|
831
|
+
inset: 0,
|
|
832
|
+
overflow: "hidden",
|
|
833
|
+
pointerEvents: "none"
|
|
834
|
+
},
|
|
835
|
+
children: [
|
|
836
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
837
|
+
"svg",
|
|
838
|
+
{
|
|
839
|
+
width: "100%",
|
|
840
|
+
height: "100%",
|
|
841
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
842
|
+
"aria-hidden": "true",
|
|
843
|
+
style: { position: "absolute", inset: 0 },
|
|
844
|
+
children: [
|
|
845
|
+
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
846
|
+
"pattern",
|
|
847
|
+
{
|
|
848
|
+
id: `mosaic-grid-${uniqueId}`,
|
|
849
|
+
x: "0",
|
|
850
|
+
y: "0",
|
|
851
|
+
width: `${cellW}%`,
|
|
852
|
+
height: `${cellH}%`,
|
|
853
|
+
patternUnits: "userSpaceOnUse",
|
|
854
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "50%", cy: "50%", r: "1.5", fill: color })
|
|
855
|
+
}
|
|
856
|
+
) }),
|
|
857
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { width: "100%", height: "100%", fill: `url(#mosaic-grid-${uniqueId})` })
|
|
858
|
+
]
|
|
859
|
+
}
|
|
860
|
+
),
|
|
861
|
+
Array.from({ length: cols }, (_, i) => {
|
|
862
|
+
const leftPct = (i + 0.5) * cellW;
|
|
863
|
+
const delay = i / cols * animationDuration;
|
|
864
|
+
const colKey = `col-${i}`;
|
|
865
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
866
|
+
"span",
|
|
867
|
+
{
|
|
868
|
+
className: "mosaic-falling-dot",
|
|
869
|
+
style: {
|
|
870
|
+
position: "absolute",
|
|
871
|
+
top: "-12px",
|
|
872
|
+
left: `${leftPct}%`,
|
|
873
|
+
width: 3,
|
|
874
|
+
height: 3,
|
|
875
|
+
borderRadius: "50%",
|
|
876
|
+
background: color,
|
|
877
|
+
animation: `mosaic-falling-dots ${animationDuration}ms ease-in ${delay}ms infinite`,
|
|
878
|
+
opacity: 0
|
|
879
|
+
}
|
|
880
|
+
},
|
|
881
|
+
colKey
|
|
882
|
+
);
|
|
883
|
+
})
|
|
884
|
+
]
|
|
885
|
+
}
|
|
886
|
+
);
|
|
887
|
+
}
|
|
888
|
+
);
|
|
889
|
+
MosaicFallingPattern.displayName = "MosaicFallingPattern";
|
|
890
|
+
function useMediaQuery(query) {
|
|
891
|
+
const [matches, setMatches] = React2.useState(false);
|
|
892
|
+
React2.useEffect(() => {
|
|
893
|
+
const mql = window.matchMedia(query);
|
|
894
|
+
setMatches(mql.matches);
|
|
895
|
+
const handler = (e) => {
|
|
896
|
+
setMatches(e.matches);
|
|
897
|
+
};
|
|
898
|
+
mql.addEventListener("change", handler);
|
|
899
|
+
return () => {
|
|
900
|
+
mql.removeEventListener("change", handler);
|
|
901
|
+
};
|
|
902
|
+
}, [query]);
|
|
903
|
+
return matches;
|
|
904
|
+
}
|
|
905
|
+
function cn12(...classes) {
|
|
906
|
+
return classes.filter(Boolean).join(" ");
|
|
907
|
+
}
|
|
908
|
+
var MosaicCard = React2__namespace.forwardRef(function MosaicCard2({ className, ...props }, ref) {
|
|
909
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
910
|
+
"div",
|
|
911
|
+
{
|
|
912
|
+
ref,
|
|
913
|
+
"data-slot": "card",
|
|
914
|
+
className: cn12(
|
|
915
|
+
"bg-card text-card-foreground rounded-xl border border-border shadow-sm",
|
|
916
|
+
className
|
|
917
|
+
),
|
|
918
|
+
...props
|
|
919
|
+
}
|
|
920
|
+
);
|
|
921
|
+
});
|
|
922
|
+
MosaicCard.displayName = "MosaicCard";
|
|
923
|
+
var MosaicCardHeader = React2__namespace.forwardRef(
|
|
924
|
+
function MosaicCardHeader2({ className, ...props }, ref) {
|
|
925
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
926
|
+
"div",
|
|
927
|
+
{
|
|
928
|
+
ref,
|
|
929
|
+
"data-slot": "card-header",
|
|
930
|
+
className: cn12("flex flex-col gap-1.5 p-6", className),
|
|
931
|
+
...props
|
|
932
|
+
}
|
|
933
|
+
);
|
|
934
|
+
}
|
|
935
|
+
);
|
|
936
|
+
MosaicCardHeader.displayName = "MosaicCardHeader";
|
|
937
|
+
var MosaicCardTitle = React2__namespace.forwardRef(
|
|
938
|
+
function MosaicCardTitle2({ className, ...props }, ref) {
|
|
939
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
940
|
+
"h3",
|
|
941
|
+
{
|
|
942
|
+
ref,
|
|
943
|
+
"data-slot": "card-title",
|
|
944
|
+
className: cn12("text-lg font-semibold leading-none tracking-tight", className),
|
|
945
|
+
...props
|
|
946
|
+
}
|
|
947
|
+
);
|
|
948
|
+
}
|
|
949
|
+
);
|
|
950
|
+
MosaicCardTitle.displayName = "MosaicCardTitle";
|
|
951
|
+
var MosaicCardDescription = React2__namespace.forwardRef(function MosaicCardDescription2({ className, ...props }, ref) {
|
|
952
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
953
|
+
"p",
|
|
954
|
+
{
|
|
955
|
+
ref,
|
|
956
|
+
"data-slot": "card-description",
|
|
957
|
+
className: cn12("text-sm text-muted-foreground", className),
|
|
958
|
+
...props
|
|
959
|
+
}
|
|
960
|
+
);
|
|
961
|
+
});
|
|
962
|
+
MosaicCardDescription.displayName = "MosaicCardDescription";
|
|
963
|
+
var MosaicCardContent = React2__namespace.forwardRef(
|
|
964
|
+
function MosaicCardContent2({ className, ...props }, ref) {
|
|
965
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, "data-slot": "card-content", className: cn12("p-6 pt-0", className), ...props });
|
|
966
|
+
}
|
|
967
|
+
);
|
|
968
|
+
MosaicCardContent.displayName = "MosaicCardContent";
|
|
969
|
+
var MosaicCardFooter = React2__namespace.forwardRef(
|
|
970
|
+
function MosaicCardFooter2({ className, ...props }, ref) {
|
|
971
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
972
|
+
"div",
|
|
973
|
+
{
|
|
974
|
+
ref,
|
|
975
|
+
"data-slot": "card-footer",
|
|
976
|
+
className: cn12("flex items-center p-6 pt-0", className),
|
|
977
|
+
...props
|
|
978
|
+
}
|
|
979
|
+
);
|
|
980
|
+
}
|
|
981
|
+
);
|
|
982
|
+
MosaicCardFooter.displayName = "MosaicCardFooter";
|
|
983
|
+
function cn13(...classes) {
|
|
984
|
+
return classes.filter(Boolean).join(" ");
|
|
985
|
+
}
|
|
986
|
+
var badgeVariants = classVarianceAuthority.cva(
|
|
987
|
+
[
|
|
988
|
+
"inline-flex items-center justify-center",
|
|
989
|
+
"rounded-full border border-transparent",
|
|
990
|
+
"px-2.5 py-0.5",
|
|
991
|
+
"text-xs font-semibold",
|
|
992
|
+
"select-none whitespace-nowrap",
|
|
993
|
+
"transition-colors"
|
|
994
|
+
],
|
|
995
|
+
{
|
|
996
|
+
variants: {
|
|
997
|
+
variant: {
|
|
998
|
+
default: "bg-primary text-primary-foreground border-transparent",
|
|
999
|
+
secondary: "bg-secondary text-secondary-foreground border-transparent",
|
|
1000
|
+
destructive: "bg-destructive text-destructive-foreground border-transparent",
|
|
1001
|
+
outline: "bg-background text-foreground border-border"
|
|
1002
|
+
}
|
|
1003
|
+
},
|
|
1004
|
+
defaultVariants: {
|
|
1005
|
+
variant: "default"
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
);
|
|
1009
|
+
var MosaicBadge = React2__namespace.forwardRef(function MosaicBadge2({ className, variant, ...props }, ref) {
|
|
1010
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1011
|
+
"span",
|
|
1012
|
+
{
|
|
1013
|
+
ref,
|
|
1014
|
+
"data-slot": "badge",
|
|
1015
|
+
className: cn13(badgeVariants({ variant }), className),
|
|
1016
|
+
...props
|
|
1017
|
+
}
|
|
1018
|
+
);
|
|
1019
|
+
});
|
|
1020
|
+
MosaicBadge.displayName = "MosaicBadge";
|
|
1021
|
+
function cn14(...classes) {
|
|
1022
|
+
return classes.filter(Boolean).join(" ");
|
|
1023
|
+
}
|
|
1024
|
+
var MosaicAvatar = React2__namespace.forwardRef(
|
|
1025
|
+
function MosaicAvatar2({ src, alt, fallback, className, ...props }, ref) {
|
|
1026
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1027
|
+
avatar.Avatar.Root,
|
|
1028
|
+
{
|
|
1029
|
+
ref,
|
|
1030
|
+
"data-slot": "avatar",
|
|
1031
|
+
className: cn14(
|
|
1032
|
+
"relative flex size-10 shrink-0 overflow-hidden rounded-full",
|
|
1033
|
+
"bg-muted text-muted-foreground",
|
|
1034
|
+
className
|
|
1035
|
+
),
|
|
1036
|
+
...props,
|
|
1037
|
+
children: [
|
|
1038
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1039
|
+
avatar.Avatar.Image,
|
|
1040
|
+
{
|
|
1041
|
+
src: src ?? "",
|
|
1042
|
+
alt: alt ?? "",
|
|
1043
|
+
"data-slot": "avatar-image",
|
|
1044
|
+
className: "aspect-square size-full object-cover"
|
|
1045
|
+
}
|
|
1046
|
+
),
|
|
1047
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1048
|
+
avatar.Avatar.Fallback,
|
|
1049
|
+
{
|
|
1050
|
+
"data-slot": "avatar-fallback",
|
|
1051
|
+
className: "flex size-full items-center justify-center text-sm font-medium",
|
|
1052
|
+
children: fallback
|
|
1053
|
+
}
|
|
1054
|
+
)
|
|
1055
|
+
]
|
|
1056
|
+
}
|
|
1057
|
+
);
|
|
1058
|
+
}
|
|
1059
|
+
);
|
|
1060
|
+
MosaicAvatar.displayName = "MosaicAvatar";
|
|
1061
|
+
function cn15(...classes) {
|
|
1062
|
+
return classes.filter(Boolean).join(" ");
|
|
1063
|
+
}
|
|
1064
|
+
var MosaicInput = React2__namespace.forwardRef(
|
|
1065
|
+
function MosaicInput2({ className, ...props }, ref) {
|
|
1066
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1067
|
+
input.Input,
|
|
1068
|
+
{
|
|
1069
|
+
ref,
|
|
1070
|
+
"data-slot": "input",
|
|
1071
|
+
className: cn15(
|
|
1072
|
+
"flex h-9 w-full rounded-md border border-border bg-background px-3 py-1",
|
|
1073
|
+
"text-sm text-foreground shadow-xs",
|
|
1074
|
+
"placeholder:text-muted-foreground",
|
|
1075
|
+
"outline-none transition-colors",
|
|
1076
|
+
"focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/20",
|
|
1077
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
1078
|
+
className
|
|
1079
|
+
),
|
|
1080
|
+
...props
|
|
1081
|
+
}
|
|
1082
|
+
);
|
|
1083
|
+
}
|
|
1084
|
+
);
|
|
1085
|
+
MosaicInput.displayName = "MosaicInput";
|
|
1086
|
+
function cn16(...classes) {
|
|
1087
|
+
return classes.filter(Boolean).join(" ");
|
|
1088
|
+
}
|
|
1089
|
+
var MosaicInputGroup = React2__namespace.forwardRef(
|
|
1090
|
+
function MosaicInputGroup2({ prefix, suffix, className, children, ...props }, ref) {
|
|
1091
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1092
|
+
"div",
|
|
1093
|
+
{
|
|
1094
|
+
ref,
|
|
1095
|
+
"data-slot": "input-group",
|
|
1096
|
+
className: cn16("flex items-center", className),
|
|
1097
|
+
...props,
|
|
1098
|
+
children: [
|
|
1099
|
+
prefix ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1100
|
+
"div",
|
|
1101
|
+
{
|
|
1102
|
+
"data-slot": "input-group-prefix",
|
|
1103
|
+
className: "flex shrink-0 items-center text-sm text-muted-foreground",
|
|
1104
|
+
children: prefix
|
|
1105
|
+
}
|
|
1106
|
+
) : null,
|
|
1107
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0 flex-1", children }),
|
|
1108
|
+
suffix ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1109
|
+
"div",
|
|
1110
|
+
{
|
|
1111
|
+
"data-slot": "input-group-suffix",
|
|
1112
|
+
className: "flex shrink-0 items-center text-sm text-muted-foreground",
|
|
1113
|
+
children: suffix
|
|
1114
|
+
}
|
|
1115
|
+
) : null
|
|
1116
|
+
]
|
|
1117
|
+
}
|
|
1118
|
+
);
|
|
1119
|
+
}
|
|
1120
|
+
);
|
|
1121
|
+
MosaicInputGroup.displayName = "MosaicInputGroup";
|
|
1122
|
+
function cn17(...classes) {
|
|
1123
|
+
return classes.filter(Boolean).join(" ");
|
|
1124
|
+
}
|
|
1125
|
+
var MosaicFieldRoot = React2__namespace.forwardRef(function MosaicFieldRoot2({ className, children, ...props }, ref) {
|
|
1126
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1127
|
+
field.Field.Root,
|
|
1128
|
+
{
|
|
1129
|
+
ref,
|
|
1130
|
+
"data-slot": "field",
|
|
1131
|
+
className: cn17("flex flex-col gap-1.5", className),
|
|
1132
|
+
...props,
|
|
1133
|
+
children
|
|
1134
|
+
}
|
|
1135
|
+
);
|
|
1136
|
+
});
|
|
1137
|
+
MosaicFieldRoot.displayName = "MosaicField";
|
|
1138
|
+
var MosaicFieldLabel = React2__namespace.forwardRef(
|
|
1139
|
+
function MosaicFieldLabel2({ className, children, ...props }, ref) {
|
|
1140
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1141
|
+
field.Field.Label,
|
|
1142
|
+
{
|
|
1143
|
+
ref,
|
|
1144
|
+
className: cn17(
|
|
1145
|
+
"text-sm font-medium leading-none text-foreground",
|
|
1146
|
+
"data-[disabled]:opacity-50",
|
|
1147
|
+
className
|
|
1148
|
+
),
|
|
1149
|
+
...props,
|
|
1150
|
+
children
|
|
1151
|
+
}
|
|
1152
|
+
);
|
|
1153
|
+
}
|
|
1154
|
+
);
|
|
1155
|
+
MosaicFieldLabel.displayName = "MosaicField.Label";
|
|
1156
|
+
var MosaicFieldControl = React2__namespace.forwardRef(
|
|
1157
|
+
function MosaicFieldControl2({ className, ...props }, ref) {
|
|
1158
|
+
return /* @__PURE__ */ jsxRuntime.jsx(field.Field.Control, { ref, className: cn17(className), ...props });
|
|
1159
|
+
}
|
|
1160
|
+
);
|
|
1161
|
+
MosaicFieldControl.displayName = "MosaicField.Control";
|
|
1162
|
+
var MosaicFieldDescription = React2__namespace.forwardRef(
|
|
1163
|
+
function MosaicFieldDescription2({ className, children, ...props }, ref) {
|
|
1164
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1165
|
+
field.Field.Description,
|
|
1166
|
+
{
|
|
1167
|
+
ref,
|
|
1168
|
+
className: cn17("text-xs text-muted-foreground", className),
|
|
1169
|
+
...props,
|
|
1170
|
+
children
|
|
1171
|
+
}
|
|
1172
|
+
);
|
|
1173
|
+
}
|
|
1174
|
+
);
|
|
1175
|
+
MosaicFieldDescription.displayName = "MosaicField.Description";
|
|
1176
|
+
var MosaicFieldError = React2__namespace.forwardRef(
|
|
1177
|
+
function MosaicFieldError2({ className, children, show: _show, ...props }, ref) {
|
|
1178
|
+
const show = _show;
|
|
1179
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1180
|
+
field.Field.Error,
|
|
1181
|
+
{
|
|
1182
|
+
ref,
|
|
1183
|
+
match: show === true ? true : void 0,
|
|
1184
|
+
className: cn17("text-xs font-medium text-destructive", className),
|
|
1185
|
+
...props,
|
|
1186
|
+
children
|
|
1187
|
+
}
|
|
1188
|
+
);
|
|
1189
|
+
}
|
|
1190
|
+
);
|
|
1191
|
+
MosaicFieldError.displayName = "MosaicField.Error";
|
|
1192
|
+
var MosaicField = Object.assign(MosaicFieldRoot, {
|
|
1193
|
+
Label: MosaicFieldLabel,
|
|
1194
|
+
Control: MosaicFieldControl,
|
|
1195
|
+
Description: MosaicFieldDescription,
|
|
1196
|
+
Error: MosaicFieldError
|
|
1197
|
+
});
|
|
1198
|
+
function cn18(...classes) {
|
|
1199
|
+
return classes.filter(Boolean).join(" ");
|
|
1200
|
+
}
|
|
1201
|
+
var MosaicSwitch = React2__namespace.forwardRef(function MosaicSwitch2({ className, ...props }, ref) {
|
|
1202
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1203
|
+
_switch.Switch.Root,
|
|
1204
|
+
{
|
|
1205
|
+
ref,
|
|
1206
|
+
"data-slot": "switch",
|
|
1207
|
+
className: cn18(
|
|
1208
|
+
// Track
|
|
1209
|
+
"relative inline-flex h-6 w-10 shrink-0 cursor-pointer items-center",
|
|
1210
|
+
"rounded-full border-2 border-transparent outline-none",
|
|
1211
|
+
"bg-muted transition-colors",
|
|
1212
|
+
// Checked state — bg-foreground when on
|
|
1213
|
+
"data-[checked]:bg-foreground",
|
|
1214
|
+
// Focus ring
|
|
1215
|
+
"focus-visible:ring-ring focus-visible:ring-[3px]",
|
|
1216
|
+
// Disabled
|
|
1217
|
+
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",
|
|
1218
|
+
className
|
|
1219
|
+
),
|
|
1220
|
+
...props,
|
|
1221
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1222
|
+
_switch.Switch.Thumb,
|
|
1223
|
+
{
|
|
1224
|
+
"data-slot": "switch-thumb",
|
|
1225
|
+
className: cn18(
|
|
1226
|
+
"pointer-events-none block h-4 w-4 rounded-full",
|
|
1227
|
+
"bg-background shadow-sm",
|
|
1228
|
+
"translate-x-0 transition-transform",
|
|
1229
|
+
"data-[checked]:translate-x-5"
|
|
1230
|
+
)
|
|
1231
|
+
}
|
|
1232
|
+
)
|
|
1233
|
+
}
|
|
1234
|
+
);
|
|
1235
|
+
});
|
|
1236
|
+
MosaicSwitch.displayName = "MosaicSwitch";
|
|
1237
|
+
function cn19(...classes) {
|
|
1238
|
+
return classes.filter(Boolean).join(" ");
|
|
1239
|
+
}
|
|
1240
|
+
function MosaicSelect({
|
|
1241
|
+
items,
|
|
1242
|
+
value,
|
|
1243
|
+
onValueChange,
|
|
1244
|
+
placeholder = "Select\u2026",
|
|
1245
|
+
defaultValue,
|
|
1246
|
+
disabled,
|
|
1247
|
+
required,
|
|
1248
|
+
name,
|
|
1249
|
+
className
|
|
1250
|
+
}) {
|
|
1251
|
+
const labelMap = React2__namespace.useMemo(
|
|
1252
|
+
() => Object.fromEntries(items.map((item) => [item.value, item.label])),
|
|
1253
|
+
[items]
|
|
1254
|
+
);
|
|
1255
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1256
|
+
select.Select.Root,
|
|
1257
|
+
{
|
|
1258
|
+
value,
|
|
1259
|
+
onValueChange,
|
|
1260
|
+
defaultValue,
|
|
1261
|
+
disabled,
|
|
1262
|
+
required,
|
|
1263
|
+
name,
|
|
1264
|
+
children: [
|
|
1265
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1266
|
+
select.Select.Trigger,
|
|
1267
|
+
{
|
|
1268
|
+
"data-slot": "select",
|
|
1269
|
+
className: cn19(
|
|
1270
|
+
"inline-flex h-9 w-full min-w-[8rem] items-center justify-between gap-2",
|
|
1271
|
+
"rounded-md border border-border bg-background px-3 py-2",
|
|
1272
|
+
"text-sm text-foreground shadow-xs outline-none",
|
|
1273
|
+
"hover:bg-muted",
|
|
1274
|
+
"focus-visible:ring-ring focus-visible:ring-[3px]",
|
|
1275
|
+
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",
|
|
1276
|
+
"data-[popup-open]:ring-ring data-[popup-open]:ring-[3px]",
|
|
1277
|
+
className
|
|
1278
|
+
),
|
|
1279
|
+
children: [
|
|
1280
|
+
/* @__PURE__ */ jsxRuntime.jsx(select.Select.Value, { placeholder, children: (val) => val != null && val in labelMap ? labelMap[val] : placeholder }),
|
|
1281
|
+
/* @__PURE__ */ jsxRuntime.jsx(select.Select.Icon, { className: "size-4 shrink-0 text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(ChevronDownIcon, {}) })
|
|
1282
|
+
]
|
|
1283
|
+
}
|
|
1284
|
+
),
|
|
1285
|
+
/* @__PURE__ */ jsxRuntime.jsx(select.Select.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(select.Select.Positioner, { sideOffset: 4, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1286
|
+
select.Select.Popup,
|
|
1287
|
+
{
|
|
1288
|
+
"data-slot": "select-popup",
|
|
1289
|
+
className: cn19(
|
|
1290
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border border-border",
|
|
1291
|
+
"bg-popover p-1 text-popover-foreground shadow-md",
|
|
1292
|
+
"origin-[var(--transform-origin)]",
|
|
1293
|
+
"transition-[transform,scale,opacity]",
|
|
1294
|
+
"data-[open]:scale-100 data-[open]:opacity-100",
|
|
1295
|
+
"data-[ending-style]:scale-95 data-[ending-style]:opacity-0",
|
|
1296
|
+
"data-[starting-style]:scale-95 data-[starting-style]:opacity-0"
|
|
1297
|
+
),
|
|
1298
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(select.Select.List, { children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1299
|
+
select.Select.Item,
|
|
1300
|
+
{
|
|
1301
|
+
value: item.value,
|
|
1302
|
+
disabled: item.disabled,
|
|
1303
|
+
className: cn19(
|
|
1304
|
+
"relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5",
|
|
1305
|
+
"text-sm text-popover-foreground outline-none",
|
|
1306
|
+
"data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground",
|
|
1307
|
+
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",
|
|
1308
|
+
"data-[selected]:font-medium"
|
|
1309
|
+
),
|
|
1310
|
+
children: [
|
|
1311
|
+
/* @__PURE__ */ jsxRuntime.jsx(select.Select.ItemText, { children: item.label }),
|
|
1312
|
+
/* @__PURE__ */ jsxRuntime.jsx(select.Select.ItemIndicator, { className: "ml-auto size-4", children: /* @__PURE__ */ jsxRuntime.jsx(CheckIcon, {}) })
|
|
1313
|
+
]
|
|
1314
|
+
},
|
|
1315
|
+
item.value
|
|
1316
|
+
)) })
|
|
1317
|
+
}
|
|
1318
|
+
) }) })
|
|
1319
|
+
]
|
|
1320
|
+
}
|
|
1321
|
+
);
|
|
1322
|
+
}
|
|
1323
|
+
function ChevronDownIcon() {
|
|
1324
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1325
|
+
"svg",
|
|
1326
|
+
{
|
|
1327
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1328
|
+
viewBox: "0 0 24 24",
|
|
1329
|
+
fill: "none",
|
|
1330
|
+
stroke: "currentColor",
|
|
1331
|
+
strokeWidth: "2",
|
|
1332
|
+
strokeLinecap: "round",
|
|
1333
|
+
strokeLinejoin: "round",
|
|
1334
|
+
"aria-hidden": "true",
|
|
1335
|
+
className: "size-4",
|
|
1336
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m6 9 6 6 6-6" })
|
|
1337
|
+
}
|
|
1338
|
+
);
|
|
1339
|
+
}
|
|
1340
|
+
function CheckIcon() {
|
|
1341
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1342
|
+
"svg",
|
|
1343
|
+
{
|
|
1344
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1345
|
+
viewBox: "0 0 24 24",
|
|
1346
|
+
fill: "none",
|
|
1347
|
+
stroke: "currentColor",
|
|
1348
|
+
strokeWidth: "2",
|
|
1349
|
+
strokeLinecap: "round",
|
|
1350
|
+
strokeLinejoin: "round",
|
|
1351
|
+
"aria-hidden": "true",
|
|
1352
|
+
className: "size-4",
|
|
1353
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20 6 9 17l-5-5" })
|
|
1354
|
+
}
|
|
1355
|
+
);
|
|
1356
|
+
}
|
|
1357
|
+
function cn20(...classes) {
|
|
1358
|
+
return classes.filter(Boolean).join(" ");
|
|
1359
|
+
}
|
|
1360
|
+
function MosaicCombobox({
|
|
1361
|
+
items,
|
|
1362
|
+
value,
|
|
1363
|
+
onValueChange,
|
|
1364
|
+
defaultValue,
|
|
1365
|
+
placeholder = "Search\u2026",
|
|
1366
|
+
disabled,
|
|
1367
|
+
name,
|
|
1368
|
+
className
|
|
1369
|
+
}) {
|
|
1370
|
+
const [inputValue, setInputValue] = React2__namespace.useState("");
|
|
1371
|
+
const filter = combobox.Combobox.useFilter({ sensitivity: "base" });
|
|
1372
|
+
const filteredItems = React2__namespace.useMemo(() => {
|
|
1373
|
+
if (!inputValue) return items;
|
|
1374
|
+
return items.filter((item) => filter.contains(item.label, inputValue));
|
|
1375
|
+
}, [items, inputValue, filter]);
|
|
1376
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1377
|
+
combobox.Combobox.Root,
|
|
1378
|
+
{
|
|
1379
|
+
value,
|
|
1380
|
+
onValueChange,
|
|
1381
|
+
defaultValue,
|
|
1382
|
+
disabled,
|
|
1383
|
+
name,
|
|
1384
|
+
onInputValueChange: setInputValue,
|
|
1385
|
+
autoHighlight: true,
|
|
1386
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "combobox", className: cn20("relative w-full", className), children: [
|
|
1387
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1388
|
+
combobox.Combobox.Input,
|
|
1389
|
+
{
|
|
1390
|
+
placeholder,
|
|
1391
|
+
className: cn20(
|
|
1392
|
+
"h-9 w-full rounded-md border border-border bg-background px-3 py-2",
|
|
1393
|
+
"text-sm text-foreground shadow-xs outline-none",
|
|
1394
|
+
"placeholder:text-muted-foreground",
|
|
1395
|
+
"focus-visible:ring-ring focus-visible:ring-[3px]",
|
|
1396
|
+
"disabled:cursor-not-allowed disabled:opacity-50"
|
|
1397
|
+
)
|
|
1398
|
+
}
|
|
1399
|
+
),
|
|
1400
|
+
/* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Positioner, { sideOffset: 4, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1401
|
+
combobox.Combobox.Popup,
|
|
1402
|
+
{
|
|
1403
|
+
className: cn20(
|
|
1404
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border border-border",
|
|
1405
|
+
"bg-popover p-1 text-popover-foreground shadow-md",
|
|
1406
|
+
"origin-[var(--transform-origin)]",
|
|
1407
|
+
"transition-[transform,scale,opacity]",
|
|
1408
|
+
"data-[open]:scale-100 data-[open]:opacity-100",
|
|
1409
|
+
"data-[ending-style]:scale-95 data-[ending-style]:opacity-0",
|
|
1410
|
+
"data-[starting-style]:scale-95 data-[starting-style]:opacity-0"
|
|
1411
|
+
),
|
|
1412
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(combobox.Combobox.List, { children: [
|
|
1413
|
+
filteredItems.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1414
|
+
combobox.Combobox.Item,
|
|
1415
|
+
{
|
|
1416
|
+
value: item.value,
|
|
1417
|
+
disabled: item.disabled,
|
|
1418
|
+
className: cn20(
|
|
1419
|
+
"relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5",
|
|
1420
|
+
"text-sm text-popover-foreground outline-none",
|
|
1421
|
+
"data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground",
|
|
1422
|
+
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",
|
|
1423
|
+
"data-[selected]:font-medium"
|
|
1424
|
+
),
|
|
1425
|
+
children: item.label
|
|
1426
|
+
},
|
|
1427
|
+
item.value
|
|
1428
|
+
)),
|
|
1429
|
+
/* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Empty, { className: "py-2 text-center text-sm text-muted-foreground", children: "No results found." })
|
|
1430
|
+
] })
|
|
1431
|
+
}
|
|
1432
|
+
) }) })
|
|
1433
|
+
] })
|
|
1434
|
+
}
|
|
1435
|
+
);
|
|
1436
|
+
}
|
|
1437
|
+
function cn21(...classes) {
|
|
1438
|
+
return classes.filter(Boolean).join(" ");
|
|
1439
|
+
}
|
|
1440
|
+
function MosaicDropdownMenu({
|
|
1441
|
+
trigger,
|
|
1442
|
+
items,
|
|
1443
|
+
onItemSelect,
|
|
1444
|
+
open,
|
|
1445
|
+
onOpenChange,
|
|
1446
|
+
className
|
|
1447
|
+
}) {
|
|
1448
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(menu.Menu.Root, { open, onOpenChange, children: [
|
|
1449
|
+
/* @__PURE__ */ jsxRuntime.jsx(menu.Menu.Trigger, { render: trigger }),
|
|
1450
|
+
/* @__PURE__ */ jsxRuntime.jsx(menu.Menu.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(menu.Menu.Positioner, { sideOffset: 4, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1451
|
+
menu.Menu.Popup,
|
|
1452
|
+
{
|
|
1453
|
+
"data-slot": "dropdown-menu",
|
|
1454
|
+
className: cn21(
|
|
1455
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border border-border",
|
|
1456
|
+
"bg-popover p-1 text-popover-foreground shadow-md",
|
|
1457
|
+
"origin-[var(--transform-origin)]",
|
|
1458
|
+
"transition-[transform,scale,opacity]",
|
|
1459
|
+
"data-[open]:scale-100 data-[open]:opacity-100",
|
|
1460
|
+
"data-[ending-style]:scale-95 data-[ending-style]:opacity-0",
|
|
1461
|
+
"data-[starting-style]:scale-95 data-[starting-style]:opacity-0",
|
|
1462
|
+
className
|
|
1463
|
+
),
|
|
1464
|
+
children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(React2__namespace.Fragment, { children: [
|
|
1465
|
+
item.separator && /* @__PURE__ */ jsxRuntime.jsx(menu.Menu.Separator, { className: "my-1 h-px bg-border" }),
|
|
1466
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1467
|
+
menu.Menu.Item,
|
|
1468
|
+
{
|
|
1469
|
+
disabled: item.disabled,
|
|
1470
|
+
onClick: () => onItemSelect?.(item.id),
|
|
1471
|
+
className: cn21(
|
|
1472
|
+
"relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5",
|
|
1473
|
+
"text-sm text-popover-foreground outline-none",
|
|
1474
|
+
"data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground",
|
|
1475
|
+
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50"
|
|
1476
|
+
),
|
|
1477
|
+
children: item.label
|
|
1478
|
+
}
|
|
1479
|
+
)
|
|
1480
|
+
] }, item.id))
|
|
1481
|
+
}
|
|
1482
|
+
) }) })
|
|
1483
|
+
] });
|
|
1484
|
+
}
|
|
1485
|
+
|
|
1486
|
+
exports.MosaicAnimatedList = MosaicAnimatedList;
|
|
1487
|
+
exports.MosaicAvatar = MosaicAvatar;
|
|
1488
|
+
exports.MosaicBadge = MosaicBadge;
|
|
1489
|
+
exports.MosaicBlurredOrb = MosaicBlurredOrb;
|
|
1490
|
+
exports.MosaicButton = MosaicButton;
|
|
1491
|
+
exports.MosaicCard = MosaicCard;
|
|
1492
|
+
exports.MosaicCardContent = MosaicCardContent;
|
|
1493
|
+
exports.MosaicCardDescription = MosaicCardDescription;
|
|
1494
|
+
exports.MosaicCardFooter = MosaicCardFooter;
|
|
1495
|
+
exports.MosaicCardHeader = MosaicCardHeader;
|
|
1496
|
+
exports.MosaicCardTitle = MosaicCardTitle;
|
|
1497
|
+
exports.MosaicCombobox = MosaicCombobox;
|
|
1498
|
+
exports.MosaicCounter = MosaicCounter;
|
|
1499
|
+
exports.MosaicDropdownMenu = MosaicDropdownMenu;
|
|
1500
|
+
exports.MosaicFallingPattern = MosaicFallingPattern;
|
|
1501
|
+
exports.MosaicFeatureCenteredMedia = MosaicFeatureCenteredMedia;
|
|
1502
|
+
exports.MosaicField = MosaicField;
|
|
1503
|
+
exports.MosaicFieldControl = MosaicFieldControl;
|
|
1504
|
+
exports.MosaicFieldDescription = MosaicFieldDescription;
|
|
1505
|
+
exports.MosaicFieldError = MosaicFieldError;
|
|
1506
|
+
exports.MosaicFieldLabel = MosaicFieldLabel;
|
|
1507
|
+
exports.MosaicFooterSimple = MosaicFooterSimple;
|
|
1508
|
+
exports.MosaicHeroSplit = MosaicHeroSplit;
|
|
1509
|
+
exports.MosaicInput = MosaicInput;
|
|
1510
|
+
exports.MosaicInputGroup = MosaicInputGroup;
|
|
1511
|
+
exports.MosaicIntegrationsBadge = MosaicIntegrationsBadge;
|
|
1512
|
+
exports.MosaicLogosGrid = MosaicLogosGrid;
|
|
1513
|
+
exports.MosaicNavbar = MosaicNavbar;
|
|
1514
|
+
exports.MosaicPricingCard = MosaicPricingCard;
|
|
1515
|
+
exports.MosaicSelect = MosaicSelect;
|
|
1516
|
+
exports.MosaicStatsGrid = MosaicStatsGrid;
|
|
1517
|
+
exports.MosaicSwitch = MosaicSwitch;
|
|
1518
|
+
exports.MosaicTestimonialsGrid = MosaicTestimonialsGrid;
|
|
1519
|
+
exports.MosaicThemeToggle = MosaicThemeToggle;
|
|
1520
|
+
exports.Placeholder = Placeholder;
|
|
1521
|
+
exports.badgeVariants = badgeVariants;
|
|
1522
|
+
exports.buttonVariants = buttonVariants;
|
|
1523
|
+
exports.useMediaQuery = useMediaQuery;
|
|
1524
|
+
exports.version = version;
|
|
1525
|
+
//# sourceMappingURL=index.cjs.map
|
|
1526
|
+
//# sourceMappingURL=index.cjs.map
|