@reinvented/design 0.1.0

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,1721 @@
1
+ "use client";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
19
+
20
+ // src/lib/utils.ts
21
+ import { clsx } from "clsx";
22
+ import { twMerge } from "tailwind-merge";
23
+ function cn(...inputs) {
24
+ return twMerge(clsx(inputs));
25
+ }
26
+
27
+ // src/hooks/useMediaQuery.ts
28
+ import { useCallback, useEffect, useState } from "react";
29
+ function useMediaQuery(query) {
30
+ const getMatches = useCallback(() => {
31
+ if (typeof window === "undefined") return false;
32
+ return window.matchMedia(query).matches;
33
+ }, [query]);
34
+ const [matches, setMatches] = useState(getMatches);
35
+ useEffect(() => {
36
+ if (typeof window === "undefined") return;
37
+ const mql = window.matchMedia(query);
38
+ const handler = (e) => setMatches(e.matches);
39
+ setMatches(mql.matches);
40
+ mql.addEventListener("change", handler);
41
+ return () => mql.removeEventListener("change", handler);
42
+ }, [query]);
43
+ return matches;
44
+ }
45
+
46
+ // src/hooks/useTheme.ts
47
+ import { useCallback as useCallback2, useEffect as useEffect2, useState as useState2 } from "react";
48
+ function useTheme() {
49
+ const [theme, setThemeState] = useState2(() => {
50
+ if (typeof window === "undefined") return "dark";
51
+ return document.documentElement.getAttribute("data-theme") || "dark";
52
+ });
53
+ const setTheme = useCallback2((next) => {
54
+ document.documentElement.setAttribute("data-theme", next);
55
+ setThemeState(next);
56
+ try {
57
+ localStorage.setItem("ri-theme", next);
58
+ } catch {
59
+ }
60
+ }, []);
61
+ const toggleTheme = useCallback2(() => {
62
+ setTheme(theme === "dark" ? "light" : "dark");
63
+ }, [theme, setTheme]);
64
+ useEffect2(() => {
65
+ if (typeof window === "undefined") return;
66
+ const stored = localStorage.getItem("ri-theme");
67
+ if (stored) {
68
+ setTheme(stored);
69
+ return;
70
+ }
71
+ const prefersDark = window.matchMedia(
72
+ "(prefers-color-scheme: dark)"
73
+ ).matches;
74
+ setTheme(prefersDark ? "dark" : "light");
75
+ }, [setTheme]);
76
+ return { theme, setTheme, toggleTheme, isDark: theme === "dark" };
77
+ }
78
+
79
+ // src/icons/index.ts
80
+ var icons_exports = {};
81
+ __export(icons_exports, {
82
+ DynamicIcon: () => DynamicIcon,
83
+ icons: () => icons2
84
+ });
85
+ __reExport(icons_exports, lucide_react_star);
86
+ import React from "react";
87
+ import { icons } from "lucide-react";
88
+ import { icons as icons2 } from "lucide-react";
89
+ import * as lucide_react_star from "lucide-react";
90
+ function DynamicIcon({ name, ...props }) {
91
+ const Icon2 = icons[name];
92
+ if (!Icon2) return null;
93
+ return React.createElement(Icon2, props);
94
+ }
95
+
96
+ // src/components/Button.tsx
97
+ import React2 from "react";
98
+ import { Slot } from "@radix-ui/react-slot";
99
+ import { cva } from "class-variance-authority";
100
+ import { jsx } from "react/jsx-runtime";
101
+ var buttonVariants = cva(
102
+ [
103
+ "inline-flex items-center justify-center gap-2",
104
+ "whitespace-nowrap rounded-md font-medium",
105
+ "transition-all duration-fast ease-default",
106
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50 focus-visible:ring-offset-2 focus-visible:ring-offset-bg-base",
107
+ "disabled:pointer-events-none disabled:opacity-40",
108
+ "select-none cursor-pointer"
109
+ ].join(" "),
110
+ {
111
+ variants: {
112
+ variant: {
113
+ primary: "bg-accent text-accent-foreground hover:bg-accent-hover active:brightness-90",
114
+ secondary: "bg-bg-elevated text-fg-primary border border-border hover:bg-bg-surface hover:border-border-strong",
115
+ ghost: "text-fg-secondary hover:text-fg-primary hover:bg-bg-elevated",
116
+ destructive: "bg-semantic-error text-white hover:bg-semantic-error/90 active:brightness-90",
117
+ link: "text-accent underline-offset-4 hover:underline p-0 h-auto"
118
+ },
119
+ size: {
120
+ sm: "h-7 px-3 text-xs rounded-md",
121
+ md: "h-8 px-4 text-sm rounded-md",
122
+ lg: "h-10 px-5 text-base rounded-lg",
123
+ icon: "h-8 w-8 rounded-md"
124
+ }
125
+ },
126
+ defaultVariants: {
127
+ variant: "primary",
128
+ size: "md"
129
+ }
130
+ }
131
+ );
132
+ var Button = React2.forwardRef(
133
+ ({ className, variant, size, asChild = false, ...props }, ref) => {
134
+ const Comp = asChild ? Slot : "button";
135
+ return /* @__PURE__ */ jsx(
136
+ Comp,
137
+ {
138
+ className: cn(buttonVariants({ variant, size, className })),
139
+ ref,
140
+ ...props
141
+ }
142
+ );
143
+ }
144
+ );
145
+ Button.displayName = "Button";
146
+
147
+ // src/components/Input.tsx
148
+ import React3 from "react";
149
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
150
+ var Input = React3.forwardRef(
151
+ ({ className, label, helperText, error, id, ...props }, ref) => {
152
+ const inputId = id || label?.toLowerCase().replace(/\s+/g, "-");
153
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", children: [
154
+ label && /* @__PURE__ */ jsx2(
155
+ "label",
156
+ {
157
+ htmlFor: inputId,
158
+ className: "text-sm font-medium text-fg-secondary",
159
+ children: label
160
+ }
161
+ ),
162
+ /* @__PURE__ */ jsx2(
163
+ "input",
164
+ {
165
+ id: inputId,
166
+ className: cn(
167
+ "flex h-8 w-full rounded-md border bg-bg-surface px-3 text-sm text-fg-primary",
168
+ "placeholder:text-fg-muted",
169
+ "transition-colors duration-fast ease-default",
170
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50 focus-visible:border-accent",
171
+ "disabled:cursor-not-allowed disabled:opacity-40",
172
+ error ? "border-semantic-error focus-visible:ring-semantic-error/50" : "border-border hover:border-border-strong",
173
+ className
174
+ ),
175
+ ref,
176
+ ...props
177
+ }
178
+ ),
179
+ error && /* @__PURE__ */ jsx2("p", { className: "text-xs text-semantic-error", children: error }),
180
+ !error && helperText && /* @__PURE__ */ jsx2("p", { className: "text-xs text-fg-muted", children: helperText })
181
+ ] });
182
+ }
183
+ );
184
+ Input.displayName = "Input";
185
+
186
+ // src/components/Badge.tsx
187
+ import { cva as cva2 } from "class-variance-authority";
188
+ import { jsx as jsx3 } from "react/jsx-runtime";
189
+ var badgeVariants = cva2(
190
+ "inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium transition-colors select-none",
191
+ {
192
+ variants: {
193
+ variant: {
194
+ default: "bg-bg-elevated text-fg-secondary border border-border",
195
+ accent: "bg-accent-muted text-accent border border-accent/20",
196
+ success: "bg-semantic-success-muted text-semantic-success border border-semantic-success/20",
197
+ warning: "bg-semantic-warning-muted text-semantic-warning border border-semantic-warning/20",
198
+ error: "bg-semantic-error-muted text-semantic-error border border-semantic-error/20",
199
+ info: "bg-semantic-info-muted text-semantic-info border border-semantic-info/20"
200
+ }
201
+ },
202
+ defaultVariants: {
203
+ variant: "default"
204
+ }
205
+ }
206
+ );
207
+ function Badge({ className, variant, ...props }) {
208
+ return /* @__PURE__ */ jsx3("span", { className: cn(badgeVariants({ variant, className })), ...props });
209
+ }
210
+
211
+ // src/components/Avatar.tsx
212
+ import React4 from "react";
213
+ import * as AvatarPrimitive from "@radix-ui/react-avatar";
214
+ import { jsx as jsx4 } from "react/jsx-runtime";
215
+ var Avatar = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
216
+ AvatarPrimitive.Root,
217
+ {
218
+ ref,
219
+ className: cn(
220
+ "relative flex h-8 w-8 shrink-0 overflow-hidden rounded-full",
221
+ className
222
+ ),
223
+ ...props
224
+ }
225
+ ));
226
+ Avatar.displayName = "Avatar";
227
+ var AvatarImage = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
228
+ AvatarPrimitive.Image,
229
+ {
230
+ ref,
231
+ className: cn("aspect-square h-full w-full object-cover", className),
232
+ ...props
233
+ }
234
+ ));
235
+ AvatarImage.displayName = "AvatarImage";
236
+ var AvatarFallback = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
237
+ AvatarPrimitive.Fallback,
238
+ {
239
+ ref,
240
+ className: cn(
241
+ "flex h-full w-full items-center justify-center rounded-full bg-bg-elevated text-xs font-medium text-fg-secondary",
242
+ className
243
+ ),
244
+ ...props
245
+ }
246
+ ));
247
+ AvatarFallback.displayName = "AvatarFallback";
248
+
249
+ // src/components/Card.tsx
250
+ import React5 from "react";
251
+ import { jsx as jsx5 } from "react/jsx-runtime";
252
+ var Card = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
253
+ "div",
254
+ {
255
+ ref,
256
+ className: cn(
257
+ "rounded-lg border border-border-subtle bg-bg-surface",
258
+ "transition-colors duration-fast ease-default",
259
+ className
260
+ ),
261
+ ...props
262
+ }
263
+ ));
264
+ Card.displayName = "Card";
265
+ var CardHeader = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
266
+ "div",
267
+ {
268
+ ref,
269
+ className: cn("flex flex-col gap-1 px-4 pt-4", className),
270
+ ...props
271
+ }
272
+ ));
273
+ CardHeader.displayName = "CardHeader";
274
+ var CardTitle = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
275
+ "h3",
276
+ {
277
+ ref,
278
+ className: cn("text-sm font-semibold text-fg-primary tracking-tight", className),
279
+ ...props
280
+ }
281
+ ));
282
+ CardTitle.displayName = "CardTitle";
283
+ var CardDescription = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
284
+ "p",
285
+ {
286
+ ref,
287
+ className: cn("text-xs text-fg-muted", className),
288
+ ...props
289
+ }
290
+ ));
291
+ CardDescription.displayName = "CardDescription";
292
+ var CardContent = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx5("div", { ref, className: cn("px-4 py-3", className), ...props }));
293
+ CardContent.displayName = "CardContent";
294
+ var CardFooter = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
295
+ "div",
296
+ {
297
+ ref,
298
+ className: cn("flex items-center px-4 pb-4 pt-0", className),
299
+ ...props
300
+ }
301
+ ));
302
+ CardFooter.displayName = "CardFooter";
303
+
304
+ // src/components/Label.tsx
305
+ import React6 from "react";
306
+ import * as LabelPrimitive from "@radix-ui/react-label";
307
+ import { jsx as jsx6 } from "react/jsx-runtime";
308
+ var Label = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx6(
309
+ LabelPrimitive.Root,
310
+ {
311
+ ref,
312
+ className: cn(
313
+ "text-sm font-medium text-fg-secondary leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-40",
314
+ className
315
+ ),
316
+ ...props
317
+ }
318
+ ));
319
+ Label.displayName = "Label";
320
+
321
+ // src/components/Dialog.tsx
322
+ import React7 from "react";
323
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
324
+ import { X } from "lucide-react";
325
+ import { jsx as jsx7, jsxs as jsxs2 } from "react/jsx-runtime";
326
+ var Dialog = DialogPrimitive.Root;
327
+ var DialogTrigger = DialogPrimitive.Trigger;
328
+ var DialogClose = DialogPrimitive.Close;
329
+ var DialogPortal = DialogPrimitive.Portal;
330
+ var DialogOverlay = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx7(
331
+ DialogPrimitive.Overlay,
332
+ {
333
+ ref,
334
+ className: cn(
335
+ "fixed inset-0 z-overlay bg-bg-overlay backdrop-blur-sm",
336
+ "data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out",
337
+ className
338
+ ),
339
+ ...props
340
+ }
341
+ ));
342
+ DialogOverlay.displayName = "DialogOverlay";
343
+ var DialogContent = React7.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs2(DialogPortal, { children: [
344
+ /* @__PURE__ */ jsx7(DialogOverlay, {}),
345
+ /* @__PURE__ */ jsxs2(
346
+ DialogPrimitive.Content,
347
+ {
348
+ ref,
349
+ className: cn(
350
+ "fixed left-1/2 top-1/2 z-modal -translate-x-1/2 -translate-y-1/2",
351
+ "w-full max-w-lg rounded-lg border border-border-subtle bg-bg-surface p-6 shadow-xl",
352
+ "data-[state=open]:animate-scale-in data-[state=closed]:animate-fade-out",
353
+ "focus:outline-none",
354
+ className
355
+ ),
356
+ ...props,
357
+ children: [
358
+ children,
359
+ /* @__PURE__ */ jsxs2(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm text-fg-muted hover:text-fg-primary transition-colors duration-fast", children: [
360
+ /* @__PURE__ */ jsx7(X, { className: "h-4 w-4" }),
361
+ /* @__PURE__ */ jsx7("span", { className: "sr-only", children: "Close" })
362
+ ] })
363
+ ]
364
+ }
365
+ )
366
+ ] }));
367
+ DialogContent.displayName = "DialogContent";
368
+ var DialogHeader = ({
369
+ className,
370
+ ...props
371
+ }) => /* @__PURE__ */ jsx7(
372
+ "div",
373
+ {
374
+ className: cn("flex flex-col gap-1 text-left", className),
375
+ ...props
376
+ }
377
+ );
378
+ var DialogTitle = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx7(
379
+ DialogPrimitive.Title,
380
+ {
381
+ ref,
382
+ className: cn("text-lg font-semibold text-fg-primary tracking-tight", className),
383
+ ...props
384
+ }
385
+ ));
386
+ DialogTitle.displayName = "DialogTitle";
387
+ var DialogDescription = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx7(
388
+ DialogPrimitive.Description,
389
+ {
390
+ ref,
391
+ className: cn("text-sm text-fg-muted", className),
392
+ ...props
393
+ }
394
+ ));
395
+ DialogDescription.displayName = "DialogDescription";
396
+ var DialogFooter = ({
397
+ className,
398
+ ...props
399
+ }) => /* @__PURE__ */ jsx7(
400
+ "div",
401
+ {
402
+ className: cn("flex justify-end gap-2 pt-4", className),
403
+ ...props
404
+ }
405
+ );
406
+
407
+ // src/components/DropdownMenu.tsx
408
+ import React8 from "react";
409
+ import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
410
+ import { jsx as jsx8 } from "react/jsx-runtime";
411
+ var DropdownMenu = DropdownMenuPrimitive.Root;
412
+ var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
413
+ var DropdownMenuGroup = DropdownMenuPrimitive.Group;
414
+ var DropdownMenuSub = DropdownMenuPrimitive.Sub;
415
+ var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
416
+ var DropdownMenuContent = React8.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx8(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx8(
417
+ DropdownMenuPrimitive.Content,
418
+ {
419
+ ref,
420
+ sideOffset,
421
+ className: cn(
422
+ "z-dropdown min-w-[8rem] overflow-hidden rounded-md border border-border-subtle bg-bg-elevated p-1 shadow-lg",
423
+ "data-[state=open]:animate-scale-in data-[state=closed]:animate-fade-out",
424
+ className
425
+ ),
426
+ ...props
427
+ }
428
+ ) }));
429
+ DropdownMenuContent.displayName = "DropdownMenuContent";
430
+ var DropdownMenuItem = React8.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx8(
431
+ DropdownMenuPrimitive.Item,
432
+ {
433
+ ref,
434
+ className: cn(
435
+ "relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-fg-secondary outline-none",
436
+ "hover:bg-bg-surface hover:text-fg-primary",
437
+ "focus:bg-bg-surface focus:text-fg-primary",
438
+ "data-[disabled]:pointer-events-none data-[disabled]:opacity-40",
439
+ "transition-colors duration-fast",
440
+ inset && "pl-8",
441
+ className
442
+ ),
443
+ ...props
444
+ }
445
+ ));
446
+ DropdownMenuItem.displayName = "DropdownMenuItem";
447
+ var DropdownMenuSeparator = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx8(
448
+ DropdownMenuPrimitive.Separator,
449
+ {
450
+ ref,
451
+ className: cn("-mx-1 my-1 h-px bg-border", className),
452
+ ...props
453
+ }
454
+ ));
455
+ DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
456
+ var DropdownMenuLabel = React8.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx8(
457
+ DropdownMenuPrimitive.Label,
458
+ {
459
+ ref,
460
+ className: cn(
461
+ "px-2 py-1.5 text-xs font-medium text-fg-muted",
462
+ inset && "pl-8",
463
+ className
464
+ ),
465
+ ...props
466
+ }
467
+ ));
468
+ DropdownMenuLabel.displayName = "DropdownMenuLabel";
469
+
470
+ // src/components/Toast.tsx
471
+ import React9 from "react";
472
+ import * as ToastPrimitive from "@radix-ui/react-toast";
473
+ import { cva as cva3 } from "class-variance-authority";
474
+ import { X as X2 } from "lucide-react";
475
+ import { jsx as jsx9 } from "react/jsx-runtime";
476
+ var ToastProvider = ToastPrimitive.Provider;
477
+ var ToastViewport = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx9(
478
+ ToastPrimitive.Viewport,
479
+ {
480
+ ref,
481
+ className: cn(
482
+ "fixed bottom-0 right-0 z-toast flex max-h-screen w-full flex-col-reverse gap-2 p-4 sm:max-w-[420px]",
483
+ className
484
+ ),
485
+ ...props
486
+ }
487
+ ));
488
+ ToastViewport.displayName = "ToastViewport";
489
+ var toastVariants = cva3(
490
+ [
491
+ "group pointer-events-auto relative flex w-full items-center gap-3 overflow-hidden rounded-lg border px-4 py-3 shadow-lg",
492
+ "transition-all duration-normal ease-default",
493
+ "data-[state=open]:animate-slide-up data-[state=closed]:animate-fade-out",
494
+ "data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)]",
495
+ "data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none"
496
+ ].join(" "),
497
+ {
498
+ variants: {
499
+ variant: {
500
+ default: "border-border-subtle bg-bg-elevated text-fg-primary",
501
+ success: "border-semantic-success/20 bg-semantic-success-muted text-fg-primary",
502
+ error: "border-semantic-error/20 bg-semantic-error-muted text-fg-primary",
503
+ info: "border-semantic-info/20 bg-semantic-info-muted text-fg-primary"
504
+ }
505
+ },
506
+ defaultVariants: {
507
+ variant: "default"
508
+ }
509
+ }
510
+ );
511
+ var Toast = React9.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx9(
512
+ ToastPrimitive.Root,
513
+ {
514
+ ref,
515
+ className: cn(toastVariants({ variant }), className),
516
+ ...props
517
+ }
518
+ ));
519
+ Toast.displayName = "Toast";
520
+ var ToastAction = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx9(
521
+ ToastPrimitive.Action,
522
+ {
523
+ ref,
524
+ className: cn(
525
+ "inline-flex h-7 shrink-0 items-center justify-center rounded-md border border-border bg-transparent px-3 text-xs font-medium",
526
+ "hover:bg-bg-surface transition-colors duration-fast",
527
+ "focus:outline-none focus:ring-2 focus:ring-accent/50",
528
+ "disabled:pointer-events-none disabled:opacity-40",
529
+ className
530
+ ),
531
+ ...props
532
+ }
533
+ ));
534
+ ToastAction.displayName = "ToastAction";
535
+ var ToastClose = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx9(
536
+ ToastPrimitive.Close,
537
+ {
538
+ ref,
539
+ className: cn(
540
+ "absolute right-2 top-2 rounded-sm text-fg-muted hover:text-fg-primary transition-colors duration-fast",
541
+ className
542
+ ),
543
+ ...props,
544
+ children: /* @__PURE__ */ jsx9(X2, { className: "h-3.5 w-3.5" })
545
+ }
546
+ ));
547
+ ToastClose.displayName = "ToastClose";
548
+ var ToastTitle = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx9(
549
+ ToastPrimitive.Title,
550
+ {
551
+ ref,
552
+ className: cn("text-sm font-semibold", className),
553
+ ...props
554
+ }
555
+ ));
556
+ ToastTitle.displayName = "ToastTitle";
557
+ var ToastDescription = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx9(
558
+ ToastPrimitive.Description,
559
+ {
560
+ ref,
561
+ className: cn("text-xs text-fg-secondary", className),
562
+ ...props
563
+ }
564
+ ));
565
+ ToastDescription.displayName = "ToastDescription";
566
+
567
+ // src/components/Separator.tsx
568
+ import React10 from "react";
569
+ import * as SeparatorPrimitive from "@radix-ui/react-separator";
570
+ import { jsx as jsx10 } from "react/jsx-runtime";
571
+ var Separator2 = React10.forwardRef(
572
+ ({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx10(
573
+ SeparatorPrimitive.Root,
574
+ {
575
+ ref,
576
+ decorative,
577
+ orientation,
578
+ className: cn(
579
+ "shrink-0 bg-border",
580
+ orientation === "horizontal" ? "h-px w-full" : "h-full w-px",
581
+ className
582
+ ),
583
+ ...props
584
+ }
585
+ )
586
+ );
587
+ Separator2.displayName = "Separator";
588
+
589
+ // src/components/ScrollArea.tsx
590
+ import React11 from "react";
591
+ import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
592
+ import { jsx as jsx11, jsxs as jsxs3 } from "react/jsx-runtime";
593
+ var ScrollArea = React11.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs3(
594
+ ScrollAreaPrimitive.Root,
595
+ {
596
+ ref,
597
+ className: cn("relative overflow-hidden", className),
598
+ ...props,
599
+ children: [
600
+ /* @__PURE__ */ jsx11(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
601
+ /* @__PURE__ */ jsx11(ScrollBar, {}),
602
+ /* @__PURE__ */ jsx11(ScrollAreaPrimitive.Corner, {})
603
+ ]
604
+ }
605
+ ));
606
+ ScrollArea.displayName = "ScrollArea";
607
+ var ScrollBar = React11.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx11(
608
+ ScrollAreaPrimitive.ScrollAreaScrollbar,
609
+ {
610
+ ref,
611
+ orientation,
612
+ className: cn(
613
+ "flex touch-none select-none transition-colors duration-fast",
614
+ orientation === "vertical" && "h-full w-1.5 border-l border-l-transparent p-px",
615
+ orientation === "horizontal" && "h-1.5 flex-col border-t border-t-transparent p-px",
616
+ className
617
+ ),
618
+ ...props,
619
+ children: /* @__PURE__ */ jsx11(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border-strong" })
620
+ }
621
+ ));
622
+ ScrollBar.displayName = "ScrollBar";
623
+
624
+ // src/components/Select.tsx
625
+ import React12 from "react";
626
+ import * as SelectPrimitive from "@radix-ui/react-select";
627
+ import { ChevronDown, Check } from "lucide-react";
628
+ import { jsx as jsx12, jsxs as jsxs4 } from "react/jsx-runtime";
629
+ var Select = SelectPrimitive.Root;
630
+ var SelectGroup = SelectPrimitive.Group;
631
+ var SelectValue = SelectPrimitive.Value;
632
+ var SelectTrigger = React12.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs4(
633
+ SelectPrimitive.Trigger,
634
+ {
635
+ ref,
636
+ className: cn(
637
+ "flex h-8 w-full items-center justify-between rounded-md border border-border bg-bg-surface px-3 text-sm text-fg-primary",
638
+ "placeholder:text-fg-muted",
639
+ "hover:border-border-strong",
640
+ "focus:outline-none focus:ring-2 focus:ring-accent/50 focus:border-accent",
641
+ "disabled:cursor-not-allowed disabled:opacity-40",
642
+ "transition-colors duration-fast",
643
+ className
644
+ ),
645
+ ...props,
646
+ children: [
647
+ children,
648
+ /* @__PURE__ */ jsx12(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx12(ChevronDown, { className: "h-3.5 w-3.5 text-fg-muted" }) })
649
+ ]
650
+ }
651
+ ));
652
+ SelectTrigger.displayName = "SelectTrigger";
653
+ var SelectContent = React12.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx12(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsx12(
654
+ SelectPrimitive.Content,
655
+ {
656
+ ref,
657
+ className: cn(
658
+ "relative z-dropdown max-h-60 min-w-[8rem] overflow-hidden rounded-md border border-border-subtle bg-bg-elevated shadow-lg",
659
+ "data-[state=open]:animate-scale-in data-[state=closed]:animate-fade-out",
660
+ position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",
661
+ className
662
+ ),
663
+ position,
664
+ ...props,
665
+ children: /* @__PURE__ */ jsx12(
666
+ SelectPrimitive.Viewport,
667
+ {
668
+ className: cn(
669
+ "p-1",
670
+ position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
671
+ ),
672
+ children
673
+ }
674
+ )
675
+ }
676
+ ) }));
677
+ SelectContent.displayName = "SelectContent";
678
+ var SelectItem = React12.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs4(
679
+ SelectPrimitive.Item,
680
+ {
681
+ ref,
682
+ className: cn(
683
+ "relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm text-fg-secondary outline-none",
684
+ "hover:bg-bg-surface hover:text-fg-primary",
685
+ "focus:bg-bg-surface focus:text-fg-primary",
686
+ "data-[disabled]:pointer-events-none data-[disabled]:opacity-40",
687
+ "transition-colors duration-fast",
688
+ className
689
+ ),
690
+ ...props,
691
+ children: [
692
+ /* @__PURE__ */ jsx12("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx12(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx12(Check, { className: "h-3.5 w-3.5 text-accent" }) }) }),
693
+ /* @__PURE__ */ jsx12(SelectPrimitive.ItemText, { children })
694
+ ]
695
+ }
696
+ ));
697
+ SelectItem.displayName = "SelectItem";
698
+ var SelectLabel = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12(
699
+ SelectPrimitive.Label,
700
+ {
701
+ ref,
702
+ className: cn("py-1.5 pl-8 pr-2 text-xs font-medium text-fg-muted", className),
703
+ ...props
704
+ }
705
+ ));
706
+ SelectLabel.displayName = "SelectLabel";
707
+ var SelectSeparator = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12(
708
+ SelectPrimitive.Separator,
709
+ {
710
+ ref,
711
+ className: cn("-mx-1 my-1 h-px bg-border", className),
712
+ ...props
713
+ }
714
+ ));
715
+ SelectSeparator.displayName = "SelectSeparator";
716
+
717
+ // src/components/Switch.tsx
718
+ import React13 from "react";
719
+ import * as SwitchPrimitive from "@radix-ui/react-switch";
720
+ import { jsx as jsx13 } from "react/jsx-runtime";
721
+ var Switch = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
722
+ SwitchPrimitive.Root,
723
+ {
724
+ className: cn(
725
+ "peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent",
726
+ "transition-colors duration-fast ease-default",
727
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50 focus-visible:ring-offset-2 focus-visible:ring-offset-bg-base",
728
+ "disabled:cursor-not-allowed disabled:opacity-40",
729
+ "data-[state=checked]:bg-accent data-[state=unchecked]:bg-bg-elevated",
730
+ className
731
+ ),
732
+ ...props,
733
+ ref,
734
+ children: /* @__PURE__ */ jsx13(
735
+ SwitchPrimitive.Thumb,
736
+ {
737
+ className: cn(
738
+ "pointer-events-none block h-4 w-4 rounded-full bg-white shadow-sm",
739
+ "transition-transform duration-fast ease-default",
740
+ "data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
741
+ )
742
+ }
743
+ )
744
+ }
745
+ ));
746
+ Switch.displayName = "Switch";
747
+
748
+ // src/components/Checkbox.tsx
749
+ import React14 from "react";
750
+ import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
751
+ import { Check as Check2 } from "lucide-react";
752
+ import { jsx as jsx14 } from "react/jsx-runtime";
753
+ var Checkbox = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
754
+ CheckboxPrimitive.Root,
755
+ {
756
+ ref,
757
+ className: cn(
758
+ "peer h-4 w-4 shrink-0 rounded-sm border border-border bg-bg-surface",
759
+ "transition-colors duration-fast ease-default",
760
+ "hover:border-border-strong",
761
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50 focus-visible:ring-offset-2 focus-visible:ring-offset-bg-base",
762
+ "disabled:cursor-not-allowed disabled:opacity-40",
763
+ "data-[state=checked]:bg-accent data-[state=checked]:border-accent data-[state=checked]:text-accent-foreground",
764
+ className
765
+ ),
766
+ ...props,
767
+ children: /* @__PURE__ */ jsx14(CheckboxPrimitive.Indicator, { className: "flex items-center justify-center text-current", children: /* @__PURE__ */ jsx14(Check2, { className: "h-3 w-3" }) })
768
+ }
769
+ ));
770
+ Checkbox.displayName = "Checkbox";
771
+
772
+ // src/components/Tabs.tsx
773
+ import React15 from "react";
774
+ import * as TabsPrimitive from "@radix-ui/react-tabs";
775
+ import { jsx as jsx15 } from "react/jsx-runtime";
776
+ var Tabs = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx15(TabsPrimitive.Root, { ref, className: cn("", className), ...props }));
777
+ Tabs.displayName = "Tabs";
778
+ var TabsList = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx15(
779
+ TabsPrimitive.List,
780
+ {
781
+ ref,
782
+ className: cn(
783
+ "inline-flex h-8 items-center gap-1 rounded-md bg-bg-surface p-0.5",
784
+ className
785
+ ),
786
+ ...props
787
+ }
788
+ ));
789
+ TabsList.displayName = "TabsList";
790
+ var TabsTrigger = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx15(
791
+ TabsPrimitive.Trigger,
792
+ {
793
+ ref,
794
+ className: cn(
795
+ "inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1 text-xs font-medium text-fg-muted",
796
+ "ring-offset-bg-base transition-all duration-fast",
797
+ "hover:text-fg-secondary",
798
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50 focus-visible:ring-offset-2",
799
+ "disabled:pointer-events-none disabled:opacity-40",
800
+ "data-[state=active]:bg-bg-elevated data-[state=active]:text-fg-primary data-[state=active]:shadow-sm",
801
+ className
802
+ ),
803
+ ...props
804
+ }
805
+ ));
806
+ TabsTrigger.displayName = "TabsTrigger";
807
+ var TabsContent = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx15(
808
+ TabsPrimitive.Content,
809
+ {
810
+ ref,
811
+ className: cn(
812
+ "mt-2 ring-offset-bg-base",
813
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50 focus-visible:ring-offset-2",
814
+ "data-[state=active]:animate-fade-in",
815
+ className
816
+ ),
817
+ ...props
818
+ }
819
+ ));
820
+ TabsContent.displayName = "TabsContent";
821
+
822
+ // src/components/Tooltip.tsx
823
+ import React16 from "react";
824
+ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
825
+ import { jsx as jsx16 } from "react/jsx-runtime";
826
+ var TooltipProvider = TooltipPrimitive.Provider;
827
+ var Tooltip = TooltipPrimitive.Root;
828
+ var TooltipTrigger = TooltipPrimitive.Trigger;
829
+ var TooltipContent = React16.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx16(
830
+ TooltipPrimitive.Content,
831
+ {
832
+ ref,
833
+ sideOffset,
834
+ className: cn(
835
+ "z-tooltip overflow-hidden rounded-md border border-border-subtle bg-bg-elevated px-3 py-1.5 text-xs text-fg-secondary shadow-md",
836
+ "animate-scale-in",
837
+ className
838
+ ),
839
+ ...props
840
+ }
841
+ ));
842
+ TooltipContent.displayName = "TooltipContent";
843
+
844
+ // src/components/Skeleton.tsx
845
+ import { jsx as jsx17 } from "react/jsx-runtime";
846
+ function Skeleton({
847
+ className,
848
+ ...props
849
+ }) {
850
+ return /* @__PURE__ */ jsx17(
851
+ "div",
852
+ {
853
+ className: cn(
854
+ "animate-pulse-subtle rounded-md bg-bg-elevated",
855
+ className
856
+ ),
857
+ ...props
858
+ }
859
+ );
860
+ }
861
+
862
+ // src/components/Sheet.tsx
863
+ import React17 from "react";
864
+ import * as DialogPrimitive2 from "@radix-ui/react-dialog";
865
+ import { cva as cva4 } from "class-variance-authority";
866
+ import { X as X3 } from "lucide-react";
867
+ import { jsx as jsx18, jsxs as jsxs5 } from "react/jsx-runtime";
868
+ var Sheet = DialogPrimitive2.Root;
869
+ var SheetTrigger = DialogPrimitive2.Trigger;
870
+ var SheetClose = DialogPrimitive2.Close;
871
+ var SheetPortal = DialogPrimitive2.Portal;
872
+ var SheetOverlay = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx18(
873
+ DialogPrimitive2.Overlay,
874
+ {
875
+ className: cn(
876
+ "fixed inset-0 z-overlay bg-bg-overlay backdrop-blur-sm",
877
+ "data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out",
878
+ className
879
+ ),
880
+ ...props,
881
+ ref
882
+ }
883
+ ));
884
+ SheetOverlay.displayName = "SheetOverlay";
885
+ var sheetVariants = cva4(
886
+ "fixed z-modal bg-bg-surface border-border-subtle shadow-xl transition-transform duration-slow ease-default focus:outline-none",
887
+ {
888
+ variants: {
889
+ side: {
890
+ top: "inset-x-0 top-0 border-b",
891
+ bottom: "inset-x-0 bottom-0 border-t",
892
+ left: "inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
893
+ right: "inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm"
894
+ }
895
+ },
896
+ defaultVariants: {
897
+ side: "right"
898
+ }
899
+ }
900
+ );
901
+ var SheetContent = React17.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(SheetPortal, { children: [
902
+ /* @__PURE__ */ jsx18(SheetOverlay, {}),
903
+ /* @__PURE__ */ jsxs5(
904
+ DialogPrimitive2.Content,
905
+ {
906
+ ref,
907
+ className: cn(sheetVariants({ side }), className),
908
+ ...props,
909
+ children: [
910
+ children,
911
+ /* @__PURE__ */ jsxs5(DialogPrimitive2.Close, { className: "absolute right-4 top-4 rounded-sm text-fg-muted hover:text-fg-primary transition-colors duration-fast", children: [
912
+ /* @__PURE__ */ jsx18(X3, { className: "h-4 w-4" }),
913
+ /* @__PURE__ */ jsx18("span", { className: "sr-only", children: "Close" })
914
+ ] })
915
+ ]
916
+ }
917
+ )
918
+ ] }));
919
+ SheetContent.displayName = "SheetContent";
920
+ var SheetHeader = ({
921
+ className,
922
+ ...props
923
+ }) => /* @__PURE__ */ jsx18(
924
+ "div",
925
+ {
926
+ className: cn("flex flex-col gap-1 p-4", className),
927
+ ...props
928
+ }
929
+ );
930
+ var SheetTitle = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx18(
931
+ DialogPrimitive2.Title,
932
+ {
933
+ ref,
934
+ className: cn("text-lg font-semibold text-fg-primary", className),
935
+ ...props
936
+ }
937
+ ));
938
+ SheetTitle.displayName = "SheetTitle";
939
+ var SheetDescription = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx18(
940
+ DialogPrimitive2.Description,
941
+ {
942
+ ref,
943
+ className: cn("text-sm text-fg-muted", className),
944
+ ...props
945
+ }
946
+ ));
947
+ SheetDescription.displayName = "SheetDescription";
948
+
949
+ // src/components/Spinner.tsx
950
+ import { jsx as jsx19, jsxs as jsxs6 } from "react/jsx-runtime";
951
+ function Spinner({ size = 16, className }) {
952
+ return /* @__PURE__ */ jsxs6(
953
+ "svg",
954
+ {
955
+ className: cn("animate-spin-slow text-fg-muted", className),
956
+ xmlns: "http://www.w3.org/2000/svg",
957
+ fill: "none",
958
+ viewBox: "0 0 24 24",
959
+ width: size,
960
+ height: size,
961
+ children: [
962
+ /* @__PURE__ */ jsx19(
963
+ "circle",
964
+ {
965
+ className: "opacity-25",
966
+ cx: "12",
967
+ cy: "12",
968
+ r: "10",
969
+ stroke: "currentColor",
970
+ strokeWidth: "3"
971
+ }
972
+ ),
973
+ /* @__PURE__ */ jsx19(
974
+ "path",
975
+ {
976
+ className: "opacity-75",
977
+ fill: "currentColor",
978
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
979
+ }
980
+ )
981
+ ]
982
+ }
983
+ );
984
+ }
985
+
986
+ // src/components/ErrorBoundary.tsx
987
+ import React18 from "react";
988
+ var ErrorBoundary = class extends React18.Component {
989
+ constructor(props) {
990
+ super(props);
991
+ this.state = { hasError: false, error: null };
992
+ }
993
+ static getDerivedStateFromError(error) {
994
+ return { hasError: true, error };
995
+ }
996
+ componentDidCatch(error, errorInfo) {
997
+ console.error("[ErrorBoundary]", error, errorInfo);
998
+ }
999
+ render() {
1000
+ if (this.state.hasError) {
1001
+ if (this.props.fallback) {
1002
+ return this.props.fallback;
1003
+ }
1004
+ return React18.createElement(
1005
+ "div",
1006
+ {
1007
+ style: {
1008
+ display: "flex",
1009
+ flexDirection: "column",
1010
+ alignItems: "center",
1011
+ justifyContent: "center",
1012
+ gap: "8px",
1013
+ padding: "32px",
1014
+ textAlign: "center"
1015
+ }
1016
+ },
1017
+ React18.createElement(
1018
+ "p",
1019
+ {
1020
+ style: {
1021
+ fontSize: "14px",
1022
+ fontWeight: 500,
1023
+ color: "var(--fg-primary)"
1024
+ }
1025
+ },
1026
+ "Something went wrong"
1027
+ ),
1028
+ React18.createElement(
1029
+ "p",
1030
+ {
1031
+ style: {
1032
+ fontSize: "13px",
1033
+ color: "var(--fg-muted)"
1034
+ }
1035
+ },
1036
+ this.state.error?.message || "An unexpected error occurred"
1037
+ ),
1038
+ React18.createElement(
1039
+ "button",
1040
+ {
1041
+ onClick: () => this.setState({ hasError: false, error: null }),
1042
+ style: {
1043
+ marginTop: "8px",
1044
+ padding: "4px 12px",
1045
+ fontSize: "13px",
1046
+ fontWeight: 500,
1047
+ color: "var(--accent-foreground)",
1048
+ background: "var(--accent)",
1049
+ border: "none",
1050
+ borderRadius: "6px",
1051
+ cursor: "pointer"
1052
+ }
1053
+ },
1054
+ "Try again"
1055
+ )
1056
+ );
1057
+ }
1058
+ return this.props.children;
1059
+ }
1060
+ };
1061
+
1062
+ // src/components/CommandPalette.tsx
1063
+ import React19, { useCallback as useCallback3, useEffect as useEffect3, useState as useState3 } from "react";
1064
+ import { Command as CommandPrimitive } from "cmdk";
1065
+ import { Search } from "lucide-react";
1066
+ import { jsx as jsx20, jsxs as jsxs7 } from "react/jsx-runtime";
1067
+ var Command = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx20(
1068
+ CommandPrimitive,
1069
+ {
1070
+ ref,
1071
+ className: cn(
1072
+ "flex h-full w-full flex-col overflow-hidden rounded-lg bg-bg-elevated text-fg-primary",
1073
+ className
1074
+ ),
1075
+ ...props
1076
+ }
1077
+ ));
1078
+ Command.displayName = "Command";
1079
+ var CommandInput = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs7("div", { className: "flex items-center gap-2 border-b border-border px-3", children: [
1080
+ /* @__PURE__ */ jsx20(Search, { className: "h-4 w-4 shrink-0 text-fg-muted" }),
1081
+ /* @__PURE__ */ jsx20(
1082
+ CommandPrimitive.Input,
1083
+ {
1084
+ ref,
1085
+ className: cn(
1086
+ "flex h-10 w-full bg-transparent text-sm text-fg-primary outline-none",
1087
+ "placeholder:text-fg-muted",
1088
+ "disabled:cursor-not-allowed disabled:opacity-40",
1089
+ className
1090
+ ),
1091
+ ...props
1092
+ }
1093
+ )
1094
+ ] }));
1095
+ CommandInput.displayName = "CommandInput";
1096
+ var CommandList = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx20(
1097
+ CommandPrimitive.List,
1098
+ {
1099
+ ref,
1100
+ className: cn(
1101
+ "max-h-[300px] overflow-y-auto overflow-x-hidden p-1",
1102
+ className
1103
+ ),
1104
+ ...props
1105
+ }
1106
+ ));
1107
+ CommandList.displayName = "CommandList";
1108
+ var CommandEmpty = React19.forwardRef((props, ref) => /* @__PURE__ */ jsx20(
1109
+ CommandPrimitive.Empty,
1110
+ {
1111
+ ref,
1112
+ className: "py-6 text-center text-sm text-fg-muted",
1113
+ ...props
1114
+ }
1115
+ ));
1116
+ CommandEmpty.displayName = "CommandEmpty";
1117
+ var CommandGroup = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx20(
1118
+ CommandPrimitive.Group,
1119
+ {
1120
+ ref,
1121
+ className: cn(
1122
+ "overflow-hidden py-1 text-fg-primary [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-fg-muted",
1123
+ className
1124
+ ),
1125
+ ...props
1126
+ }
1127
+ ));
1128
+ CommandGroup.displayName = "CommandGroup";
1129
+ var CommandItem = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx20(
1130
+ CommandPrimitive.Item,
1131
+ {
1132
+ ref,
1133
+ className: cn(
1134
+ "relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-fg-secondary outline-none",
1135
+ "data-[selected=true]:bg-bg-surface data-[selected=true]:text-fg-primary",
1136
+ "data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-40",
1137
+ "transition-colors duration-fast",
1138
+ className
1139
+ ),
1140
+ ...props
1141
+ }
1142
+ ));
1143
+ CommandItem.displayName = "CommandItem";
1144
+ var CommandSeparator = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx20(
1145
+ CommandPrimitive.Separator,
1146
+ {
1147
+ ref,
1148
+ className: cn("-mx-1 h-px bg-border", className),
1149
+ ...props
1150
+ }
1151
+ ));
1152
+ CommandSeparator.displayName = "CommandSeparator";
1153
+ var CommandShortcut = ({
1154
+ className,
1155
+ ...props
1156
+ }) => /* @__PURE__ */ jsx20(
1157
+ "span",
1158
+ {
1159
+ className: cn("ml-auto text-xs tracking-wide text-fg-muted", className),
1160
+ ...props
1161
+ }
1162
+ );
1163
+ function CommandPalette({
1164
+ open: controlledOpen,
1165
+ onOpenChange,
1166
+ placeholder = "Type a command or search\u2026",
1167
+ children
1168
+ }) {
1169
+ const [internalOpen, setInternalOpen] = useState3(false);
1170
+ const isOpen = controlledOpen ?? internalOpen;
1171
+ const handleOpenChange = useCallback3(
1172
+ (next) => {
1173
+ setInternalOpen(next);
1174
+ onOpenChange?.(next);
1175
+ },
1176
+ [onOpenChange]
1177
+ );
1178
+ useEffect3(() => {
1179
+ const handleKeyDown = (e) => {
1180
+ if ((e.metaKey || e.ctrlKey) && e.key === "k") {
1181
+ e.preventDefault();
1182
+ handleOpenChange(!isOpen);
1183
+ }
1184
+ };
1185
+ document.addEventListener("keydown", handleKeyDown);
1186
+ return () => document.removeEventListener("keydown", handleKeyDown);
1187
+ }, [isOpen, handleOpenChange]);
1188
+ if (!isOpen) return null;
1189
+ return /* @__PURE__ */ jsxs7("div", { className: "fixed inset-0 z-modal", children: [
1190
+ /* @__PURE__ */ jsx20(
1191
+ "div",
1192
+ {
1193
+ className: "fixed inset-0 bg-bg-overlay backdrop-blur-sm animate-fade-in",
1194
+ onClick: () => handleOpenChange(false)
1195
+ }
1196
+ ),
1197
+ /* @__PURE__ */ jsx20("div", { className: "fixed left-1/2 top-[20%] z-modal w-full max-w-lg -translate-x-1/2 animate-scale-in", children: /* @__PURE__ */ jsxs7(
1198
+ Command,
1199
+ {
1200
+ className: "rounded-lg border border-border-subtle shadow-xl",
1201
+ onKeyDown: (e) => {
1202
+ if (e.key === "Escape") {
1203
+ handleOpenChange(false);
1204
+ }
1205
+ },
1206
+ children: [
1207
+ /* @__PURE__ */ jsx20(CommandInput, { placeholder }),
1208
+ /* @__PURE__ */ jsx20(CommandList, { children })
1209
+ ]
1210
+ }
1211
+ ) })
1212
+ ] });
1213
+ }
1214
+
1215
+ // src/components/ContentCard.tsx
1216
+ import { jsx as jsx21, jsxs as jsxs8 } from "react/jsx-runtime";
1217
+ function ContentCard({ title, description, children }) {
1218
+ return /* @__PURE__ */ jsxs8(
1219
+ "div",
1220
+ {
1221
+ style: {
1222
+ borderRadius: "var(--radius-lg)",
1223
+ border: "1px solid var(--border-subtle)",
1224
+ background: "var(--bg-surface)",
1225
+ padding: "var(--space-4)",
1226
+ display: "flex",
1227
+ flexDirection: "column",
1228
+ gap: "var(--space-3)"
1229
+ },
1230
+ children: [
1231
+ (title || description) && /* @__PURE__ */ jsxs8("div", { style: { display: "flex", flexDirection: "column", gap: "var(--space-1)" }, children: [
1232
+ title && /* @__PURE__ */ jsx21(
1233
+ "h3",
1234
+ {
1235
+ style: {
1236
+ fontSize: "var(--text-sm)",
1237
+ fontWeight: "var(--font-semibold)",
1238
+ color: "var(--fg-primary)",
1239
+ letterSpacing: "var(--tracking-tight)",
1240
+ lineHeight: "var(--leading-tight)",
1241
+ margin: 0
1242
+ },
1243
+ children: title
1244
+ }
1245
+ ),
1246
+ description && /* @__PURE__ */ jsx21(
1247
+ "p",
1248
+ {
1249
+ style: {
1250
+ fontSize: "var(--text-xs)",
1251
+ color: "var(--fg-muted)",
1252
+ lineHeight: "var(--leading-normal)",
1253
+ margin: 0
1254
+ },
1255
+ children: description
1256
+ }
1257
+ )
1258
+ ] }),
1259
+ children
1260
+ ]
1261
+ }
1262
+ );
1263
+ }
1264
+
1265
+ // src/components/PageHeader.tsx
1266
+ import { jsx as jsx22, jsxs as jsxs9 } from "react/jsx-runtime";
1267
+ function PageHeader({ title, description, actions }) {
1268
+ return /* @__PURE__ */ jsxs9(
1269
+ "div",
1270
+ {
1271
+ style: {
1272
+ display: "flex",
1273
+ alignItems: "flex-start",
1274
+ justifyContent: "space-between",
1275
+ gap: "var(--space-4)",
1276
+ paddingBottom: "var(--space-6)"
1277
+ },
1278
+ children: [
1279
+ /* @__PURE__ */ jsxs9("div", { style: { display: "flex", flexDirection: "column", gap: "var(--space-1)" }, children: [
1280
+ /* @__PURE__ */ jsx22(
1281
+ "h1",
1282
+ {
1283
+ style: {
1284
+ fontSize: "var(--text-2xl)",
1285
+ fontWeight: "var(--font-semibold)",
1286
+ color: "var(--fg-primary)",
1287
+ letterSpacing: "var(--tracking-tight)",
1288
+ lineHeight: "var(--leading-tight)",
1289
+ margin: 0
1290
+ },
1291
+ children: title
1292
+ }
1293
+ ),
1294
+ description && /* @__PURE__ */ jsx22(
1295
+ "p",
1296
+ {
1297
+ style: {
1298
+ fontSize: "var(--text-sm)",
1299
+ color: "var(--fg-muted)",
1300
+ lineHeight: "var(--leading-normal)",
1301
+ margin: 0
1302
+ },
1303
+ children: description
1304
+ }
1305
+ )
1306
+ ] }),
1307
+ actions && /* @__PURE__ */ jsx22("div", { style: { display: "flex", alignItems: "center", gap: "var(--space-2)", flexShrink: 0 }, children: actions })
1308
+ ]
1309
+ }
1310
+ );
1311
+ }
1312
+
1313
+ // src/components/ListItem.tsx
1314
+ import { jsx as jsx23, jsxs as jsxs10 } from "react/jsx-runtime";
1315
+ function ListItem({
1316
+ leading,
1317
+ title,
1318
+ description,
1319
+ trailing,
1320
+ onClick
1321
+ }) {
1322
+ const interactive = !!onClick;
1323
+ return /* @__PURE__ */ jsxs10(
1324
+ "div",
1325
+ {
1326
+ role: interactive ? "button" : void 0,
1327
+ tabIndex: interactive ? 0 : void 0,
1328
+ onClick,
1329
+ onKeyDown: interactive ? (e) => {
1330
+ if (e.key === "Enter" || e.key === " ") {
1331
+ e.preventDefault();
1332
+ onClick?.();
1333
+ }
1334
+ } : void 0,
1335
+ style: {
1336
+ display: "flex",
1337
+ alignItems: "center",
1338
+ gap: "var(--space-3)",
1339
+ padding: "var(--space-2) var(--space-3)",
1340
+ borderRadius: "var(--radius-md)",
1341
+ cursor: interactive ? "pointer" : "default",
1342
+ transition: "background var(--duration-fast) var(--ease-default)"
1343
+ },
1344
+ onMouseEnter: (e) => {
1345
+ if (interactive) {
1346
+ e.currentTarget.style.background = "var(--bg-elevated)";
1347
+ }
1348
+ },
1349
+ onMouseLeave: (e) => {
1350
+ if (interactive) {
1351
+ e.currentTarget.style.background = "transparent";
1352
+ }
1353
+ },
1354
+ children: [
1355
+ leading && /* @__PURE__ */ jsx23(
1356
+ "div",
1357
+ {
1358
+ style: {
1359
+ flexShrink: 0,
1360
+ display: "flex",
1361
+ alignItems: "center",
1362
+ justifyContent: "center",
1363
+ color: "var(--fg-muted)"
1364
+ },
1365
+ children: leading
1366
+ }
1367
+ ),
1368
+ /* @__PURE__ */ jsxs10("div", { style: { flex: 1, minWidth: 0 }, children: [
1369
+ /* @__PURE__ */ jsx23(
1370
+ "div",
1371
+ {
1372
+ style: {
1373
+ fontSize: "var(--text-sm)",
1374
+ fontWeight: "var(--font-medium)",
1375
+ color: "var(--fg-primary)",
1376
+ lineHeight: "var(--leading-tight)",
1377
+ whiteSpace: "nowrap",
1378
+ overflow: "hidden",
1379
+ textOverflow: "ellipsis"
1380
+ },
1381
+ children: title
1382
+ }
1383
+ ),
1384
+ description && /* @__PURE__ */ jsx23(
1385
+ "div",
1386
+ {
1387
+ style: {
1388
+ fontSize: "var(--text-xs)",
1389
+ color: "var(--fg-muted)",
1390
+ lineHeight: "var(--leading-normal)",
1391
+ whiteSpace: "nowrap",
1392
+ overflow: "hidden",
1393
+ textOverflow: "ellipsis"
1394
+ },
1395
+ children: description
1396
+ }
1397
+ )
1398
+ ] }),
1399
+ trailing && /* @__PURE__ */ jsx23("div", { style: { flexShrink: 0, display: "flex", alignItems: "center" }, children: trailing })
1400
+ ]
1401
+ }
1402
+ );
1403
+ }
1404
+
1405
+ // src/components/FormSection.tsx
1406
+ import { jsx as jsx24, jsxs as jsxs11 } from "react/jsx-runtime";
1407
+ function FormSection({ title, description, children }) {
1408
+ return /* @__PURE__ */ jsxs11(
1409
+ "div",
1410
+ {
1411
+ style: {
1412
+ display: "flex",
1413
+ flexDirection: "column",
1414
+ gap: "var(--space-4)",
1415
+ paddingBottom: "var(--space-6)",
1416
+ borderBottom: "1px solid var(--border-subtle)"
1417
+ },
1418
+ children: [
1419
+ /* @__PURE__ */ jsxs11("div", { style: { display: "flex", flexDirection: "column", gap: "var(--space-1)" }, children: [
1420
+ /* @__PURE__ */ jsx24(
1421
+ "h2",
1422
+ {
1423
+ style: {
1424
+ fontSize: "var(--text-base)",
1425
+ fontWeight: "var(--font-semibold)",
1426
+ color: "var(--fg-primary)",
1427
+ letterSpacing: "var(--tracking-tight)",
1428
+ margin: 0
1429
+ },
1430
+ children: title
1431
+ }
1432
+ ),
1433
+ description && /* @__PURE__ */ jsx24(
1434
+ "p",
1435
+ {
1436
+ style: {
1437
+ fontSize: "var(--text-sm)",
1438
+ color: "var(--fg-muted)",
1439
+ lineHeight: "var(--leading-normal)",
1440
+ margin: 0
1441
+ },
1442
+ children: description
1443
+ }
1444
+ )
1445
+ ] }),
1446
+ /* @__PURE__ */ jsx24("div", { style: { display: "flex", flexDirection: "column", gap: "var(--space-4)" }, children })
1447
+ ]
1448
+ }
1449
+ );
1450
+ }
1451
+
1452
+ // src/components/ActionBar.tsx
1453
+ import { jsx as jsx25, jsxs as jsxs12 } from "react/jsx-runtime";
1454
+ function ActionBar({ primaryAction, secondaryAction }) {
1455
+ return /* @__PURE__ */ jsxs12(
1456
+ "div",
1457
+ {
1458
+ style: {
1459
+ position: "sticky",
1460
+ bottom: 0,
1461
+ display: "flex",
1462
+ alignItems: "center",
1463
+ justifyContent: "space-between",
1464
+ gap: "var(--space-3)",
1465
+ padding: "var(--space-3) var(--space-4)",
1466
+ borderTop: "1px solid var(--border-subtle)",
1467
+ background: "var(--bg-surface)"
1468
+ },
1469
+ children: [
1470
+ /* @__PURE__ */ jsx25("div", { style: { display: "flex", alignItems: "center", gap: "var(--space-2)" }, children: secondaryAction }),
1471
+ /* @__PURE__ */ jsx25("div", { style: { display: "flex", alignItems: "center", gap: "var(--space-2)" }, children: primaryAction })
1472
+ ]
1473
+ }
1474
+ );
1475
+ }
1476
+
1477
+ // src/components/EmptyState.tsx
1478
+ import { jsx as jsx26, jsxs as jsxs13 } from "react/jsx-runtime";
1479
+ function EmptyState({ icon, title, description, action }) {
1480
+ return /* @__PURE__ */ jsxs13(
1481
+ "div",
1482
+ {
1483
+ style: {
1484
+ display: "flex",
1485
+ flexDirection: "column",
1486
+ alignItems: "center",
1487
+ justifyContent: "center",
1488
+ textAlign: "center",
1489
+ padding: "var(--space-12) var(--space-6)",
1490
+ gap: "var(--space-3)"
1491
+ },
1492
+ children: [
1493
+ icon && /* @__PURE__ */ jsx26("div", { style: { color: "var(--fg-disabled)", marginBottom: "var(--space-1)" }, children: icon }),
1494
+ /* @__PURE__ */ jsx26(
1495
+ "h3",
1496
+ {
1497
+ style: {
1498
+ fontSize: "var(--text-base)",
1499
+ fontWeight: "var(--font-semibold)",
1500
+ color: "var(--fg-primary)",
1501
+ margin: 0
1502
+ },
1503
+ children: title
1504
+ }
1505
+ ),
1506
+ description && /* @__PURE__ */ jsx26(
1507
+ "p",
1508
+ {
1509
+ style: {
1510
+ fontSize: "var(--text-sm)",
1511
+ color: "var(--fg-muted)",
1512
+ lineHeight: "var(--leading-normal)",
1513
+ maxWidth: "320px",
1514
+ margin: 0
1515
+ },
1516
+ children: description
1517
+ }
1518
+ ),
1519
+ action && /* @__PURE__ */ jsx26("div", { style: { marginTop: "var(--space-2)" }, children: action })
1520
+ ]
1521
+ }
1522
+ );
1523
+ }
1524
+
1525
+ // src/components/Layout.tsx
1526
+ import { jsx as jsx27, jsxs as jsxs14 } from "react/jsx-runtime";
1527
+ function AppShell({ topBar, sideRail, bottomBar, children, className }) {
1528
+ return /* @__PURE__ */ jsxs14("div", { className: cn("flex h-screen w-screen flex-col bg-bg-base text-fg-primary overflow-hidden", className), children: [
1529
+ topBar,
1530
+ /* @__PURE__ */ jsxs14("div", { className: "flex flex-1 overflow-hidden", children: [
1531
+ sideRail,
1532
+ /* @__PURE__ */ jsx27("main", { className: "flex-1 overflow-y-auto", children })
1533
+ ] }),
1534
+ bottomBar
1535
+ ] });
1536
+ }
1537
+ function TopBar({ brand, center, actions, className }) {
1538
+ return /* @__PURE__ */ jsxs14(
1539
+ "header",
1540
+ {
1541
+ className: cn(
1542
+ "flex h-12 shrink-0 items-center justify-between gap-4 border-b border-border-subtle bg-bg-base px-4",
1543
+ className
1544
+ ),
1545
+ children: [
1546
+ /* @__PURE__ */ jsx27("div", { className: "flex items-center gap-3", children: brand }),
1547
+ /* @__PURE__ */ jsx27("div", { className: "flex flex-1 items-center justify-center", children: center }),
1548
+ /* @__PURE__ */ jsx27("div", { className: "flex items-center gap-2", children: actions })
1549
+ ]
1550
+ }
1551
+ );
1552
+ }
1553
+ function SideRail({ children, className }) {
1554
+ return /* @__PURE__ */ jsx27(
1555
+ "nav",
1556
+ {
1557
+ className: cn(
1558
+ "flex w-12 shrink-0 flex-col items-center gap-1 border-r border-border-subtle bg-bg-base py-2",
1559
+ className
1560
+ ),
1561
+ children
1562
+ }
1563
+ );
1564
+ }
1565
+ function SideRailItem({ children, active, onClick, tooltip }) {
1566
+ return /* @__PURE__ */ jsx27(
1567
+ "button",
1568
+ {
1569
+ title: tooltip,
1570
+ onClick,
1571
+ className: cn(
1572
+ "flex h-8 w-8 items-center justify-center rounded-md transition-colors duration-fast",
1573
+ active ? "bg-accent-muted text-accent" : "text-fg-muted hover:text-fg-secondary hover:bg-bg-elevated"
1574
+ ),
1575
+ children
1576
+ }
1577
+ );
1578
+ }
1579
+ function BottomBar({ children, className }) {
1580
+ return /* @__PURE__ */ jsx27(
1581
+ "nav",
1582
+ {
1583
+ className: cn(
1584
+ "flex shrink-0 items-center justify-around border-t border-border-subtle bg-bg-base px-2 py-1 md:hidden",
1585
+ className
1586
+ ),
1587
+ children
1588
+ }
1589
+ );
1590
+ }
1591
+ function BottomBarItem({ children, label, active, onClick }) {
1592
+ return /* @__PURE__ */ jsxs14(
1593
+ "button",
1594
+ {
1595
+ onClick,
1596
+ className: cn(
1597
+ "flex flex-col items-center gap-0.5 px-3 py-1 text-xs transition-colors duration-fast",
1598
+ active ? "text-accent" : "text-fg-muted"
1599
+ ),
1600
+ children: [
1601
+ children,
1602
+ label && /* @__PURE__ */ jsx27("span", { children: label })
1603
+ ]
1604
+ }
1605
+ );
1606
+ }
1607
+ function PageContainer({ children, className }) {
1608
+ return /* @__PURE__ */ jsx27(
1609
+ "div",
1610
+ {
1611
+ className: cn(
1612
+ "mx-auto w-full max-w-5xl px-4 py-6 sm:px-6 lg:px-8",
1613
+ className
1614
+ ),
1615
+ children
1616
+ }
1617
+ );
1618
+ }
1619
+ export {
1620
+ ActionBar,
1621
+ AppShell,
1622
+ Avatar,
1623
+ AvatarFallback,
1624
+ AvatarImage,
1625
+ Badge,
1626
+ BottomBar,
1627
+ BottomBarItem,
1628
+ Button,
1629
+ Card,
1630
+ CardContent,
1631
+ CardDescription,
1632
+ CardFooter,
1633
+ CardHeader,
1634
+ CardTitle,
1635
+ Checkbox,
1636
+ Command,
1637
+ CommandEmpty,
1638
+ CommandGroup,
1639
+ CommandInput,
1640
+ CommandItem,
1641
+ CommandList,
1642
+ CommandPalette,
1643
+ CommandSeparator,
1644
+ CommandShortcut,
1645
+ ContentCard,
1646
+ Dialog,
1647
+ DialogClose,
1648
+ DialogContent,
1649
+ DialogDescription,
1650
+ DialogFooter,
1651
+ DialogHeader,
1652
+ DialogOverlay,
1653
+ DialogPortal,
1654
+ DialogTitle,
1655
+ DialogTrigger,
1656
+ DropdownMenu,
1657
+ DropdownMenuContent,
1658
+ DropdownMenuGroup,
1659
+ DropdownMenuItem,
1660
+ DropdownMenuLabel,
1661
+ DropdownMenuRadioGroup,
1662
+ DropdownMenuSeparator,
1663
+ DropdownMenuSub,
1664
+ DropdownMenuTrigger,
1665
+ DynamicIcon,
1666
+ EmptyState,
1667
+ ErrorBoundary,
1668
+ FormSection,
1669
+ Input,
1670
+ Label,
1671
+ ListItem,
1672
+ PageContainer,
1673
+ PageHeader,
1674
+ ScrollArea,
1675
+ ScrollBar,
1676
+ Select,
1677
+ SelectContent,
1678
+ SelectGroup,
1679
+ SelectItem,
1680
+ SelectLabel,
1681
+ SelectSeparator,
1682
+ SelectTrigger,
1683
+ SelectValue,
1684
+ Separator2 as Separator,
1685
+ Sheet,
1686
+ SheetClose,
1687
+ SheetContent,
1688
+ SheetDescription,
1689
+ SheetHeader,
1690
+ SheetTitle,
1691
+ SheetTrigger,
1692
+ SideRail,
1693
+ SideRailItem,
1694
+ Skeleton,
1695
+ Spinner,
1696
+ Switch,
1697
+ Tabs,
1698
+ TabsContent,
1699
+ TabsList,
1700
+ TabsTrigger,
1701
+ Toast,
1702
+ ToastAction,
1703
+ ToastClose,
1704
+ ToastDescription,
1705
+ ToastProvider,
1706
+ ToastTitle,
1707
+ ToastViewport,
1708
+ Tooltip,
1709
+ TooltipContent,
1710
+ TooltipProvider,
1711
+ TooltipTrigger,
1712
+ TopBar,
1713
+ badgeVariants,
1714
+ buttonVariants,
1715
+ cn,
1716
+ icons2 as icons,
1717
+ toastVariants,
1718
+ useMediaQuery,
1719
+ useTheme
1720
+ };
1721
+ //# sourceMappingURL=index.js.map