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