@moontra/moonui 2.1.9 → 2.2.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.
Files changed (64) hide show
  1. package/dist/index.d.mts +1656 -0
  2. package/dist/index.d.ts +1656 -0
  3. package/dist/index.js +1847 -469
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +1679 -471
  6. package/dist/index.mjs.map +1 -1
  7. package/package.json +4 -4
  8. package/src/components/ui/accordion.tsx +1 -1
  9. package/src/components/ui/alert.tsx +123 -93
  10. package/src/components/ui/aspect-ratio.tsx +1 -1
  11. package/src/components/ui/avatar.tsx +8 -6
  12. package/src/components/ui/badge.tsx +20 -18
  13. package/src/components/ui/breadcrumb.tsx +12 -10
  14. package/src/components/ui/button.stories.tsx +4 -2
  15. package/src/components/ui/button.tsx +71 -68
  16. package/src/components/ui/calendar.tsx +2 -2
  17. package/src/components/ui/card-input.tsx +231 -0
  18. package/src/components/ui/card.stories.tsx +2 -0
  19. package/src/components/ui/card.tsx +9 -7
  20. package/src/components/ui/checkbox.tsx +1 -1
  21. package/src/components/ui/collapsible.tsx +3 -3
  22. package/src/components/ui/color-picker.tsx +2 -2
  23. package/src/components/ui/command.tsx +4 -4
  24. package/src/components/ui/data-table.stories.tsx +4 -2
  25. package/src/components/ui/data-table.tsx +8 -8
  26. package/src/components/ui/date-picker.stories.tsx +2 -0
  27. package/src/components/ui/date-picker.tsx +25 -15
  28. package/src/components/ui/dialog.tsx +2 -2
  29. package/src/components/ui/draggable-list.tsx +3 -1
  30. package/src/components/ui/dropdown-menu.tsx +2 -2
  31. package/src/components/ui/file-upload.tsx +2 -2
  32. package/src/components/ui/github-stars.tsx +1 -1
  33. package/src/components/ui/index.ts +357 -45
  34. package/src/components/ui/input.stories.tsx +2 -0
  35. package/src/components/ui/input.tsx +3 -1
  36. package/src/components/ui/locked-component.tsx +222 -0
  37. package/src/components/ui/moon-logo.tsx +1 -1
  38. package/src/components/ui/pagination.tsx +10 -8
  39. package/src/components/ui/phone-input.tsx +172 -0
  40. package/src/components/ui/popover-pro.tsx +424 -0
  41. package/src/components/ui/popover.tsx +3 -3
  42. package/src/components/ui/progress.tsx +1 -1
  43. package/src/components/ui/radio-group.tsx +1 -1
  44. package/src/components/ui/rich-text-editor/index.tsx +2 -1
  45. package/src/components/ui/scroll-area.tsx +48 -0
  46. package/src/components/ui/select.tsx +7 -3
  47. package/src/components/ui/separator.tsx +2 -2
  48. package/src/components/ui/skeleton.tsx +19 -7
  49. package/src/components/ui/slider.tsx +1 -1
  50. package/src/components/ui/swipeable-card.tsx +2 -0
  51. package/src/components/ui/switch.tsx +1 -1
  52. package/src/components/ui/table.tsx +7 -5
  53. package/src/components/ui/tabs.tsx +6 -1
  54. package/src/components/ui/tags-input.tsx +130 -0
  55. package/src/components/ui/textarea.tsx +3 -1
  56. package/src/components/ui/toast.tsx +5 -3
  57. package/src/components/ui/toggle.tsx +2 -3
  58. package/src/components/ui/tooltip.tsx +2 -5
  59. package/src/index.tsx +4 -46
  60. package/src/lib/micro-interactions.ts +2 -1
  61. package/src/lib/performance-profiler.ts +79 -0
  62. package/src/styles/index.css +315 -2
  63. package/src/use-performance-optimizer.ts +26 -26
  64. package/src/use-scroll-animation.ts +5 -7
package/dist/index.mjs CHANGED
@@ -1,10 +1,12 @@
1
- import { clsx } from 'clsx';
2
- import { twMerge } from 'tailwind-merge';
1
+ 'use client';
2
+
3
3
  import * as t from 'react';
4
4
  import t__default, { useState, useCallback, useEffect } from 'react';
5
5
  import * as AccordionPrimitive from '@radix-ui/react-accordion';
6
- import { ChevronDown, Info, AlertCircle, AlertTriangle, Check, X, MoreHorizontal, Loader2, Minus, Search, ChevronUp, ChevronRight, Circle, Upload, Bold, Italic, Underline, Strikethrough, AlignLeft, AlignCenter, AlignRight, AlignJustify, List, ListOrdered, Quote, Code, Link, Image, Palette, Undo, Redo, Edit, Eye, Copy, Download, RefreshCw, Columns, ArrowDown, ArrowUp, ArrowUpDown, ChevronsLeft, ChevronLeft, ChevronsRight, Calendar as Calendar$1, Clock, CheckCircle, Star, GitFork, ExternalLink, Video, Music, FileText, File } from 'lucide-react';
6
+ import { ChevronDown, Info, AlertCircle, AlertTriangle, Check, X, MoreHorizontal, Loader2, CreditCard, Minus, Search, ChevronUp, ChevronRight, Circle, Upload, Phone, Bold, Italic, Underline, Strikethrough, AlignLeft, AlignCenter, AlignRight, AlignJustify, List, ListOrdered, Quote, Code, Link, Image, Palette, Undo, Redo, Edit, Eye, Copy, Download, RefreshCw, Columns, ArrowDown, ArrowUp, ArrowUpDown, ChevronsLeft, ChevronLeft, ChevronsRight, Calendar as Calendar$1, Clock, CheckCircle, Star, GitFork, ExternalLink, Crown, Lock, Zap, Video, Music, FileText, File } from 'lucide-react';
7
7
  export { Palette, Pipette } from 'lucide-react';
8
+ import { clsx } from 'clsx';
9
+ import { twMerge } from 'tailwind-merge';
8
10
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
9
11
  import { cva } from 'class-variance-authority';
10
12
  import * as AvatarPrimitive from '@radix-ui/react-avatar';
@@ -25,8 +27,6 @@ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
25
27
  import * as SwitchPrimitives from '@radix-ui/react-switch';
26
28
  import * as ToastPrimitives from '@radix-ui/react-toast';
27
29
 
28
- /** @license MoonUI v1.0.0 - MIT License - https://moonui.dev */
29
-
30
30
  function cn(...inputs) {
31
31
  return twMerge(clsx(inputs));
32
32
  }
@@ -35,7 +35,7 @@ var AccordionItem = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__
35
35
  AccordionPrimitive.Item,
36
36
  {
37
37
  ref,
38
- className: cn("border-b border-gray-200 dark:border-gray-800", className),
38
+ className: cn("moonui-theme", "border-b border-gray-200 dark:border-gray-800", className),
39
39
  ...props
40
40
  }
41
41
  ));
@@ -109,7 +109,17 @@ var alertVariants = cva(
109
109
  }
110
110
  );
111
111
  var Alert = t.forwardRef(
112
- ({ className, variant = "default", size, radius, hideIcon = false, closable = false, onClose, children, ...props }, ref) => {
112
+ ({
113
+ className,
114
+ variant = "default",
115
+ size,
116
+ radius,
117
+ hideIcon = false,
118
+ closable = false,
119
+ onClose,
120
+ children,
121
+ ...props
122
+ }, ref) => {
113
123
  const Icon2 = t.useMemo(() => {
114
124
  switch (variant) {
115
125
  case "success":
@@ -129,7 +139,16 @@ var Alert = t.forwardRef(
129
139
  {
130
140
  ref,
131
141
  role: "alert",
132
- className: cn(alertVariants({ variant, size, radius, withClose: closable }), className),
142
+ className: cn(
143
+ "moonui-theme",
144
+ alertVariants({
145
+ variant,
146
+ size,
147
+ radius,
148
+ withClose: closable
149
+ }),
150
+ className
151
+ ),
133
152
  ...props,
134
153
  children: [
135
154
  !hideIcon && /* @__PURE__ */ jsx(Icon2, { className: "h-5 w-5" }),
@@ -153,7 +172,11 @@ var AlertTitle = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
153
172
  "h5",
154
173
  {
155
174
  ref,
156
- className: cn("font-semibold leading-tight tracking-tight mb-1", className),
175
+ className: cn(
176
+ "moonui-theme",
177
+ "font-semibold leading-tight tracking-tight mb-1",
178
+ className
179
+ ),
157
180
  ...props
158
181
  }
159
182
  ));
@@ -162,7 +185,11 @@ var AlertDescription = t.forwardRef(({ className, ...props }, ref) => /* @__PURE
162
185
  "div",
163
186
  {
164
187
  ref,
165
- className: cn("text-sm leading-5 text-muted-foreground", className),
188
+ className: cn(
189
+ "moonui-theme",
190
+ "text-sm leading-5 text-muted-foreground",
191
+ className
192
+ ),
166
193
  ...props
167
194
  }
168
195
  ));
@@ -194,7 +221,7 @@ var AspectRatio = t.forwardRef(({ className, variant, radius, ratio = 16 / 9, st
194
221
  "div",
195
222
  {
196
223
  ref,
197
- className: cn(aspectRatioVariants({ variant, radius }), className),
224
+ className: cn("moonui-theme", aspectRatioVariants({ variant, radius }), className),
198
225
  style: {
199
226
  position: "relative",
200
227
  paddingBottom: `${1 / ratio * 100}%`,
@@ -227,9 +254,9 @@ var avatarVariants = cva(
227
254
  },
228
255
  variant: {
229
256
  default: "",
230
- ring: "ring-2 ring-gray-300 dark:ring-gray-600",
231
- ringOffset: "ring-2 ring-gray-300 dark:ring-gray-600 ring-offset-2 ring-offset-background dark:ring-offset-gray-950",
232
- border: "border-2 border-gray-200 dark:border-gray-800"
257
+ ring: "ring-2 ring-border",
258
+ ringOffset: "ring-2 ring-border ring-offset-2 ring-offset-background",
259
+ border: "border-2 border-border"
233
260
  }
234
261
  },
235
262
  defaultVariants: {
@@ -243,7 +270,7 @@ var Avatar = t.forwardRef(({ className, size, radius, variant, ...props }, ref)
243
270
  AvatarPrimitive.Root,
244
271
  {
245
272
  ref,
246
- className: cn(avatarVariants({ size, radius, variant }), className),
273
+ className: cn("moonui-theme", avatarVariants({ size, radius, variant }), className),
247
274
  ...props
248
275
  }
249
276
  ));
@@ -252,7 +279,7 @@ var AvatarImage = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
252
279
  AvatarPrimitive.Image,
253
280
  {
254
281
  ref,
255
- className: cn("aspect-square h-full w-full", className),
282
+ className: cn("moonui-theme", "aspect-square h-full w-full", className),
256
283
  ...props
257
284
  }
258
285
  ));
@@ -277,7 +304,7 @@ var AvatarGroup = t.forwardRef(
277
304
  "div",
278
305
  {
279
306
  ref,
280
- className: cn("flex items-center", className),
307
+ className: cn("moonui-theme", "flex items-center", className),
281
308
  ...props,
282
309
  children: /* @__PURE__ */ jsxs("div", { className: "flex", children: [
283
310
  visibleAvatars.map((avatar, index) => /* @__PURE__ */ jsx(
@@ -311,7 +338,7 @@ var AvatarGroup = t.forwardRef(
311
338
  AvatarGroup.displayName = "AvatarGroup";
312
339
  var badgeVariants = cva(
313
340
  [
314
- "inline-flex items-center gap-1.5",
341
+ "inline-flex items-center justify-center gap-1.5",
315
342
  "font-medium transition-colors duration-200",
316
343
  "border focus:outline-none",
317
344
  "focus-visible:ring-2 focus-visible:ring-offset-1"
@@ -320,23 +347,23 @@ var badgeVariants = cva(
320
347
  variants: {
321
348
  variant: {
322
349
  primary: [
323
- "border-transparent bg-primary text-primary-foreground",
324
- "hover:bg-primary-hover dark:hover:bg-primary/90",
325
- "focus-visible:ring-primary/30 dark:focus-visible:ring-primary/40",
326
- "dark:bg-primary/90 dark:text-white dark:shadow-inner dark:shadow-primary/10"
350
+ "border-transparent bg-gray-900 text-white",
351
+ "hover:bg-gray-800 dark:hover:bg-gray-700",
352
+ "focus-visible:ring-gray-500/30 dark:focus-visible:ring-gray-400/40",
353
+ "dark:bg-gray-700 dark:text-gray-50 dark:shadow-inner dark:shadow-gray-950/10"
327
354
  ],
328
355
  secondary: [
329
356
  "border-transparent bg-secondary text-secondary-foreground",
330
- "hover:bg-gray-200 dark:hover:bg-gray-700/90",
357
+ "hover:bg-gray-200 dark:hover:bg-gray-600",
331
358
  "focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40",
332
- "dark:bg-gray-800 dark:text-gray-100 dark:shadow-inner dark:shadow-gray-950/10"
359
+ "dark:bg-gray-700/50 dark:text-gray-50 dark:shadow-inner dark:shadow-gray-950/10"
333
360
  ],
334
361
  outline: [
335
- "border-gray-200 dark:border-gray-700",
362
+ "border-gray-200 dark:border-gray-600",
336
363
  "bg-transparent text-foreground",
337
- "hover:border-gray-300 dark:hover:border-gray-600",
364
+ "hover:border-gray-300 dark:hover:border-gray-500",
338
365
  "focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40",
339
- "dark:text-gray-200 dark:bg-transparent dark:backdrop-blur-sm"
366
+ "dark:text-gray-100 dark:bg-transparent dark:backdrop-blur-sm"
340
367
  ],
341
368
  destructive: [
342
369
  "border-transparent bg-error text-white",
@@ -357,11 +384,11 @@ var badgeVariants = cva(
357
384
  "dark:bg-warning/90 dark:text-gray-900 dark:shadow-inner dark:shadow-warning/10"
358
385
  ],
359
386
  ghost: [
360
- "border-transparent bg-transparent text-foreground",
361
- "hover:bg-gray-100 dark:hover:bg-gray-800/80",
387
+ "border border-gray-200 bg-gray-50/50 text-gray-700",
388
+ "hover:bg-gray-100 dark:hover:bg-gray-800/60",
362
389
  "focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40",
363
- "dark:text-gray-200 dark:backdrop-blur-sm",
364
- "transition-colors duration-200"
390
+ "dark:border-gray-700 dark:bg-gray-800/30 dark:text-gray-300",
391
+ "transition-all duration-200"
365
392
  ],
366
393
  pro: [
367
394
  "border-transparent bg-gradient-to-r from-purple-600 to-pink-600 text-white",
@@ -426,7 +453,7 @@ function Badge({
426
453
  return /* @__PURE__ */ jsxs(
427
454
  "div",
428
455
  {
429
- className: cn(badgeVariants({ variant, size, radius }), className),
456
+ className: cn("moonui-theme", badgeVariants({ variant, size, radius }), className),
430
457
  "data-removable": removable ? "" : void 0,
431
458
  ...props,
432
459
  children: [
@@ -440,9 +467,9 @@ function Badge({
440
467
  "aria-hidden": "true"
441
468
  }
442
469
  ),
443
- autoLeftIcon && /* @__PURE__ */ jsx("span", { className: "inline-flex shrink-0", children: autoLeftIcon }),
444
- /* @__PURE__ */ jsx("span", { className: "truncate", children: autoChildren }),
445
- rightIcon && /* @__PURE__ */ jsx("span", { className: "inline-flex shrink-0", children: rightIcon }),
470
+ autoLeftIcon && /* @__PURE__ */ jsx("span", { className: "inline-flex shrink-0 items-center", children: autoLeftIcon }),
471
+ /* @__PURE__ */ jsx("span", { className: "inline-flex items-center", children: autoChildren }),
472
+ rightIcon && /* @__PURE__ */ jsx("span", { className: "inline-flex shrink-0 items-center", children: rightIcon }),
446
473
  removable && onRemove && /* @__PURE__ */ jsx(
447
474
  "button",
448
475
  {
@@ -477,9 +504,9 @@ var breadcrumbVariants = cva(
477
504
  {
478
505
  variants: {
479
506
  variant: {
480
- default: "dark:text-gray-100 transition-colors",
481
- muted: "text-muted-foreground dark:text-gray-400 transition-colors",
482
- ghost: "text-foreground/60 dark:text-gray-300/60 transition-colors"
507
+ default: "text-foreground transition-colors",
508
+ muted: "text-muted-foreground transition-colors",
509
+ ghost: "text-foreground/60 transition-colors"
483
510
  },
484
511
  size: {
485
512
  default: "text-sm",
@@ -498,7 +525,7 @@ var Breadcrumb = t.forwardRef(
498
525
  "nav",
499
526
  {
500
527
  ref,
501
- className: cn(breadcrumbVariants({ variant, size }), className),
528
+ className: cn("moonui-theme", breadcrumbVariants({ variant, size }), className),
502
529
  "aria-label": "breadcrumb",
503
530
  ...props
504
531
  }
@@ -551,7 +578,7 @@ var BreadcrumbItem = t.forwardRef(
551
578
  "li",
552
579
  {
553
580
  ref,
554
- className: cn("inline-flex items-center gap-1.5", className),
581
+ className: cn("moonui-theme", "inline-flex items-center gap-1.5", className),
555
582
  "aria-current": isCurrent ? "page" : void 0,
556
583
  ...props,
557
584
  children: /* @__PURE__ */ jsx(
@@ -559,7 +586,7 @@ var BreadcrumbItem = t.forwardRef(
559
586
  {
560
587
  className: cn(
561
588
  "transition-colors duration-200 hover:text-foreground",
562
- isCurrent ? "font-medium text-foreground dark:text-white dark:text-opacity-95" : "text-muted-foreground hover:text-foreground dark:text-gray-400 dark:hover:text-gray-200 dark:hover:text-opacity-95 hover:underline hover:underline-offset-4 hover:decoration-gray-300/30"
589
+ isCurrent ? "font-medium text-foreground" : "text-muted-foreground hover:text-foreground hover:underline hover:underline-offset-4 hover:decoration-muted-foreground/30"
563
590
  ),
564
591
  ...itemProps,
565
592
  children: props.children
@@ -579,7 +606,7 @@ var BreadcrumbSeparator = ({
579
606
  {
580
607
  role: "presentation",
581
608
  "aria-hidden": "true",
582
- className: cn("text-muted-foreground dark:text-gray-500 opacity-70", className),
609
+ className: cn("moonui-theme", "text-muted-foreground opacity-70", className),
583
610
  ...props,
584
611
  children: children || /* @__PURE__ */ jsx(ChevronRight, { className: "h-3.5 w-3.5" })
585
612
  }
@@ -593,7 +620,7 @@ var BreadcrumbEllipsis = ({
593
620
  {
594
621
  role: "presentation",
595
622
  "aria-hidden": "true",
596
- className: cn("flex items-center text-muted-foreground dark:text-gray-500 dark:hover:text-gray-400 transition-colors duration-200", className),
623
+ className: cn("moonui-theme", "flex items-center text-muted-foreground hover:text-foreground/80 transition-colors duration-200", className),
597
624
  ...props,
598
625
  children: [
599
626
  /* @__PURE__ */ jsx(MoreHorizontal, { className: "h-4 w-4" }),
@@ -609,7 +636,7 @@ var BreadcrumbLink = t.forwardRef(
609
636
  ref,
610
637
  href,
611
638
  className: cn(
612
- "transition-colors duration-200 hover:text-foreground text-muted-foreground hover:underline hover:underline-offset-4 hover:decoration-gray-300/30 dark:text-gray-400 dark:hover:text-gray-200",
639
+ "transition-colors duration-200 hover:text-foreground text-muted-foreground hover:underline hover:underline-offset-4 hover:decoration-muted-foreground/30",
613
640
  className
614
641
  ),
615
642
  ...props
@@ -636,91 +663,89 @@ var buttonVariants = cva(
636
663
  "inline-flex items-center justify-center gap-2 whitespace-nowrap",
637
664
  "font-medium relative",
638
665
  "transition-all duration-200 ease-out",
639
- "premium-hover",
640
- /* Standart premium hover efekti */
666
+ "transform active:scale-[0.98]",
641
667
  "focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
642
- "disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none"
668
+ "disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none disabled:transform-none"
643
669
  ],
644
670
  {
645
671
  variants: {
646
672
  variant: {
647
673
  primary: [
648
674
  "bg-primary text-primary-foreground",
649
- "hover:bg-primary-hover dark:hover:bg-primary/90",
650
- "active:bg-primary-active dark:active:bg-primary/80",
651
- "shadow-sm dark:shadow-primary/20 dark:shadow-md",
652
- "focus-visible:ring-primary/50 dark:focus-visible:ring-primary/30",
653
- "dark:bg-primary dark:text-white",
675
+ "dark:bg-primary dark:text-primary-foreground",
676
+ "hover:bg-primary/90 dark:hover:bg-primary/90",
677
+ "active:bg-primary/80 dark:active:bg-primary/80",
678
+ "shadow-sm hover:shadow-md",
679
+ "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
654
680
  "transition-all duration-200"
655
681
  ],
656
682
  secondary: [
657
- "bg-secondary text-secondary-foreground",
658
- "hover:bg-gray-200 dark:hover:bg-gray-700/90",
659
- "active:bg-gray-300 dark:active:bg-gray-600/90",
660
- "border border-transparent dark:border-gray-700",
661
- "focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40",
683
+ "bg-gray-100 text-gray-900",
662
684
  "dark:bg-gray-800 dark:text-gray-100",
663
- "dark:shadow-sm dark:shadow-gray-900/20"
685
+ "hover:bg-gray-200 dark:hover:bg-gray-700",
686
+ "active:bg-gray-300 dark:active:bg-gray-600",
687
+ "border border-gray-200 dark:border-gray-700",
688
+ "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
689
+ "shadow-sm hover:shadow-md"
664
690
  ],
665
691
  outline: [
666
692
  "bg-background text-foreground",
667
- "border border-gray-300 dark:border-gray-700",
668
- "hover:border-gray-400 dark:hover:border-gray-500",
669
- "hover:bg-gray-50 dark:hover:bg-gray-800/80",
670
- "active:bg-gray-100 dark:active:bg-gray-800/90",
671
- "focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40",
672
- "dark:text-gray-200 dark:bg-gray-900/50",
673
- "dark:shadow-sm dark:shadow-gray-950/10"
693
+ "dark:bg-background dark:text-foreground",
694
+ "border border-input dark:border-input",
695
+ "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent dark:hover:text-accent-foreground",
696
+ "active:bg-accent/80 dark:active:bg-accent/80",
697
+ "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
698
+ "transition-all duration-200"
674
699
  ],
675
700
  ghost: [
676
- "text-foreground",
677
- "hover:bg-gray-100 dark:hover:bg-gray-800/90",
678
- "active:bg-gray-200 dark:active:bg-gray-700/90",
679
- "focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40",
680
- "dark:text-gray-200",
681
- "transition-colors duration-200"
701
+ "text-gray-700",
702
+ "dark:text-gray-300",
703
+ "hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-gray-800 dark:hover:text-gray-100",
704
+ "active:bg-gray-200 dark:active:bg-gray-700",
705
+ "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
706
+ "transition-all duration-200"
682
707
  ],
683
708
  destructive: [
684
- "bg-error text-white",
685
- "hover:bg-error/90 dark:hover:bg-error/80",
686
- "active:bg-error/80 dark:active:bg-error/70",
687
- "shadow-sm dark:shadow-error/10 dark:shadow-md",
688
- "focus-visible:ring-error/50 dark:focus-visible:ring-error/30",
689
- "dark:text-white dark:border-error/20",
690
- "transition-colors duration-200"
709
+ "bg-destructive text-destructive-foreground",
710
+ "dark:bg-destructive dark:text-destructive-foreground",
711
+ "hover:bg-destructive/90 dark:hover:bg-destructive/90",
712
+ "active:bg-destructive/80 dark:active:bg-destructive/80",
713
+ "shadow-sm hover:shadow-md",
714
+ "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
715
+ "transition-all duration-200"
691
716
  ],
692
717
  success: [
693
- "bg-success text-white",
694
- "hover:bg-success/90 dark:hover:bg-success/80",
695
- "active:bg-success/80 dark:active:bg-success/70",
696
- "shadow-sm dark:shadow-success/10 dark:shadow-md",
697
- "focus-visible:ring-success/50 dark:focus-visible:ring-success/30",
698
- "dark:text-white dark:border-success/20",
699
- "transition-colors duration-200"
718
+ "bg-success text-success-foreground",
719
+ "dark:bg-success dark:text-success-foreground",
720
+ "hover:bg-success/90 dark:hover:bg-success/90",
721
+ "active:bg-success/80 dark:active:bg-success/80",
722
+ "shadow-sm hover:shadow-md",
723
+ "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
724
+ "transition-all duration-200"
700
725
  ],
701
726
  link: [
702
727
  "text-primary bg-transparent",
703
728
  "underline-offset-4 hover:underline",
704
- "hover:text-primary-hover active:text-primary-active",
729
+ "hover:text-primary/80 active:text-primary/70",
705
730
  "p-0 h-auto",
706
- "dark:text-blue-400 dark:hover:text-blue-300",
707
- "dark:active:text-blue-500",
708
731
  "transition-colors duration-200"
709
732
  ],
710
733
  gradient: [
711
- "bg-gradient-to-r from-blue-600 to-purple-600 text-white",
712
- "hover:from-blue-700 hover:to-purple-700",
713
- "active:from-blue-800 active:to-purple-800",
714
- "shadow-lg shadow-purple-500/25",
734
+ "bg-gradient-to-r from-purple-500 to-pink-500 text-white",
735
+ "hover:from-purple-600 hover:to-pink-600",
736
+ "active:from-purple-700 active:to-pink-700",
737
+ "shadow-xl shadow-purple-500/40",
738
+ "hover:shadow-2xl hover:shadow-purple-500/50",
715
739
  "focus-visible:ring-purple-500/50",
716
740
  "transition-all duration-300"
717
741
  ],
718
742
  glow: [
719
- "bg-primary text-primary-foreground",
720
- "shadow-lg shadow-primary/50",
721
- "hover:shadow-xl hover:shadow-primary/60",
722
- "active:shadow-md active:shadow-primary/40",
723
- "focus-visible:ring-primary/50",
743
+ "bg-blue-500 text-white",
744
+ "shadow-[0_0_30px_rgba(59,130,246,0.5)]",
745
+ "hover:shadow-[0_0_40px_rgba(59,130,246,0.7)]",
746
+ "active:shadow-[0_0_20px_rgba(59,130,246,0.4)]",
747
+ "hover:bg-blue-600",
748
+ "focus-visible:ring-blue-500/50",
724
749
  "transition-all duration-300"
725
750
  ],
726
751
  soft: [
@@ -744,29 +769,31 @@ var buttonVariants = cva(
744
769
  "transition-all duration-200"
745
770
  ],
746
771
  neon: [
747
- "bg-transparent text-primary",
748
- "border-2 border-primary",
749
- "hover:bg-primary hover:text-primary-foreground",
750
- "hover:shadow-[0_0_20px_rgba(var(--primary),0.5)]",
751
- "active:shadow-[0_0_10px_rgba(var(--primary),0.3)]",
752
- "focus-visible:ring-primary/50",
772
+ "bg-transparent text-green-400",
773
+ "border-2 border-green-400",
774
+ "hover:bg-green-400 hover:text-gray-900",
775
+ "hover:shadow-[0_0_30px_rgba(74,222,128,0.6)]",
776
+ "active:shadow-[0_0_15px_rgba(74,222,128,0.4)]",
777
+ "focus-visible:ring-green-400/50",
753
778
  "transition-all duration-300"
754
779
  ]
755
780
  },
756
781
  size: {
757
- xs: "h-7 px-2.5 text-xs rounded",
758
- sm: "h-8 px-3 text-sm rounded",
759
- md: "h-10 px-4 text-base rounded-md",
760
- lg: "h-12 px-6 text-lg rounded-lg",
761
- xl: "h-14 px-8 text-xl rounded-lg",
762
- icon: "h-10 w-10 p-2 rounded-md",
763
- "icon-sm": "h-8 w-8 p-1.5 rounded",
764
- "icon-lg": "h-12 w-12 p-3 rounded-lg"
782
+ xs: "h-7 px-2.5 text-xs",
783
+ sm: "h-8 px-3 text-sm",
784
+ md: "h-10 px-4 text-base",
785
+ lg: "h-12 px-6 text-lg",
786
+ xl: "h-14 px-8 text-xl",
787
+ icon: "h-10 w-10 p-2",
788
+ "icon-sm": "h-8 w-8 p-1.5",
789
+ "icon-lg": "h-12 w-12 p-3"
765
790
  },
766
791
  rounded: {
767
- default: "",
792
+ default: "rounded-xl",
768
793
  full: "rounded-full",
769
- none: "rounded-none"
794
+ none: "rounded-none",
795
+ sm: "rounded-lg",
796
+ lg: "rounded-2xl"
770
797
  },
771
798
  fullWidth: {
772
799
  true: "w-full"
@@ -799,7 +826,7 @@ var Button = t.forwardRef(
799
826
  return /* @__PURE__ */ jsxs(
800
827
  Comp,
801
828
  {
802
- className: cn(buttonVariants({ variant, size, rounded, fullWidth, className })),
829
+ className: cn("moonui-theme", buttonVariants({ variant, size, rounded, fullWidth, className })),
803
830
  ref,
804
831
  disabled: disabled || loading,
805
832
  "data-loading": loading ? "" : void 0,
@@ -815,7 +842,7 @@ var Button = t.forwardRef(
815
842
  }
816
843
  );
817
844
  Button.displayName = "Button";
818
- var microInteractionVariants = cva("", {
845
+ cva("", {
819
846
  variants: {
820
847
  hover: {
821
848
  lift: [
@@ -1005,7 +1032,7 @@ var Card = t.forwardRef(
1005
1032
  motion.div,
1006
1033
  {
1007
1034
  ref,
1008
- className: cn(cardVariants({ variant, size, radius, interactive, className })),
1035
+ className: cn("moonui-theme", cardVariants({ variant, size, radius, interactive, className })),
1009
1036
  ...interactionProps,
1010
1037
  ...props
1011
1038
  }
@@ -1015,7 +1042,7 @@ var Card = t.forwardRef(
1015
1042
  "div",
1016
1043
  {
1017
1044
  ref,
1018
- className: cn(cardVariants({ variant, size, radius, interactive, className })),
1045
+ className: cn("moonui-theme", cardVariants({ variant, size, radius, interactive, className })),
1019
1046
  ...props
1020
1047
  }
1021
1048
  );
@@ -1026,7 +1053,7 @@ var CardHeader = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
1026
1053
  "div",
1027
1054
  {
1028
1055
  ref,
1029
- className: cn("flex flex-col space-y-1.5", className),
1056
+ className: cn("moonui-theme", "flex flex-col space-y-1.5", className),
1030
1057
  ...props
1031
1058
  }
1032
1059
  ));
@@ -1035,7 +1062,7 @@ var CardTitle = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ j
1035
1062
  "h3",
1036
1063
  {
1037
1064
  ref,
1038
- className: cn("text-lg font-semibold leading-none tracking-tight", className),
1065
+ className: cn("moonui-theme", "text-lg font-semibold leading-none tracking-tight", className),
1039
1066
  ...props
1040
1067
  }
1041
1068
  ));
@@ -1044,22 +1071,199 @@ var CardDescription = t.forwardRef(({ className, ...props }, ref) => /* @__PURE_
1044
1071
  "p",
1045
1072
  {
1046
1073
  ref,
1047
- className: cn("text-sm text-muted-foreground", className),
1074
+ className: cn("moonui-theme", "text-sm text-muted-foreground", className),
1048
1075
  ...props
1049
1076
  }
1050
1077
  ));
1051
1078
  CardDescription.displayName = "CardDescription";
1052
- var CardContent = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("pt-0", className), ...props }));
1079
+ var CardContent = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("moonui-theme", "pt-0", className), ...props }));
1053
1080
  CardContent.displayName = "CardContent";
1054
1081
  var CardFooter = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1055
1082
  "div",
1056
1083
  {
1057
1084
  ref,
1058
- className: cn("flex items-center pt-4", className),
1085
+ className: cn("moonui-theme", "flex items-center pt-4", className),
1059
1086
  ...props
1060
1087
  }
1061
1088
  ));
1062
1089
  CardFooter.displayName = "CardFooter";
1090
+ var getCardType = (number) => {
1091
+ const patterns = {
1092
+ visa: /^4/,
1093
+ mastercard: /^5[1-5]/,
1094
+ amex: /^3[47]/,
1095
+ discover: /^6(?:011|5)/,
1096
+ diners: /^3(?:0[0-5]|[68])/,
1097
+ jcb: /^35/
1098
+ };
1099
+ for (const [type, pattern] of Object.entries(patterns)) {
1100
+ if (pattern.test(number))
1101
+ return type;
1102
+ }
1103
+ return "unknown";
1104
+ };
1105
+ var formatCardNumber = (value, cardType) => {
1106
+ const cleaned = value.replace(/\s+/g, "");
1107
+ const groups = cardType === "amex" ? [4, 6, 5] : [4, 4, 4, 4];
1108
+ let formatted = "";
1109
+ let position = 0;
1110
+ for (const group of groups) {
1111
+ if (position >= cleaned.length)
1112
+ break;
1113
+ if (formatted)
1114
+ formatted += " ";
1115
+ formatted += cleaned.slice(position, position + group);
1116
+ position += group;
1117
+ }
1118
+ return formatted;
1119
+ };
1120
+ var CardNumberInput = t.forwardRef(
1121
+ ({ className, value = "", onChange, showIcon = true, size, ...props }, ref) => {
1122
+ const [cardType, setCardType] = t.useState("unknown");
1123
+ const handleChange = (e) => {
1124
+ const rawValue = e.target.value.replace(/\D/g, "");
1125
+ const detectedType = getCardType(rawValue);
1126
+ setCardType(detectedType);
1127
+ const maxLength = detectedType === "amex" ? 15 : 16;
1128
+ const truncated = rawValue.slice(0, maxLength);
1129
+ const formatted = formatCardNumber(truncated, detectedType);
1130
+ onChange?.(truncated, detectedType);
1131
+ e.target.value = formatted;
1132
+ };
1133
+ return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
1134
+ /* @__PURE__ */ jsx(
1135
+ Input,
1136
+ {
1137
+ ref,
1138
+ type: "text",
1139
+ inputMode: "numeric",
1140
+ autoComplete: "cc-number",
1141
+ placeholder: "1234 5678 9012 3456",
1142
+ value: formatCardNumber(value, cardType),
1143
+ onChange: handleChange,
1144
+ className: cn(showIcon && "pl-10", className),
1145
+ ...props
1146
+ }
1147
+ ),
1148
+ showIcon && /* @__PURE__ */ jsx(CreditCard, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" })
1149
+ ] });
1150
+ }
1151
+ );
1152
+ CardNumberInput.displayName = "CardNumberInput";
1153
+ var CardExpiryInput = t.forwardRef(
1154
+ ({ className, value = "", onChange, size, ...props }, ref) => {
1155
+ const handleChange = (e) => {
1156
+ let rawValue = e.target.value.replace(/\D/g, "");
1157
+ if (rawValue.length >= 2) {
1158
+ const month = parseInt(rawValue.slice(0, 2));
1159
+ if (month > 12) {
1160
+ rawValue = "12" + rawValue.slice(2);
1161
+ } else if (month === 0) {
1162
+ rawValue = "01" + rawValue.slice(2);
1163
+ }
1164
+ }
1165
+ rawValue = rawValue.slice(0, 4);
1166
+ let formatted = rawValue;
1167
+ if (rawValue.length >= 2) {
1168
+ formatted = rawValue.slice(0, 2) + "/" + rawValue.slice(2);
1169
+ }
1170
+ onChange?.(rawValue);
1171
+ e.target.value = formatted;
1172
+ };
1173
+ const formattedValue = value.length >= 2 ? value.slice(0, 2) + "/" + value.slice(2) : value;
1174
+ return /* @__PURE__ */ jsx(
1175
+ Input,
1176
+ {
1177
+ ref,
1178
+ type: "text",
1179
+ inputMode: "numeric",
1180
+ autoComplete: "cc-exp",
1181
+ placeholder: "MM/YY",
1182
+ value: formattedValue,
1183
+ onChange: handleChange,
1184
+ className,
1185
+ ...props
1186
+ }
1187
+ );
1188
+ }
1189
+ );
1190
+ CardExpiryInput.displayName = "CardExpiryInput";
1191
+ var CardCVCInput = t.forwardRef(
1192
+ ({ className, value = "", onChange, cardType = "unknown", size, ...props }, ref) => {
1193
+ const maxLength = cardType === "amex" ? 4 : 3;
1194
+ const handleChange = (e) => {
1195
+ const rawValue = e.target.value.replace(/\D/g, "").slice(0, maxLength);
1196
+ onChange?.(rawValue);
1197
+ };
1198
+ return /* @__PURE__ */ jsx(
1199
+ Input,
1200
+ {
1201
+ ref,
1202
+ type: "text",
1203
+ inputMode: "numeric",
1204
+ autoComplete: "cc-csc",
1205
+ placeholder: cardType === "amex" ? "1234" : "123",
1206
+ value,
1207
+ onChange: handleChange,
1208
+ maxLength,
1209
+ className,
1210
+ ...props
1211
+ }
1212
+ );
1213
+ }
1214
+ );
1215
+ CardCVCInput.displayName = "CardCVCInput";
1216
+ var CardZipInput = t.forwardRef(
1217
+ ({ className, value = "", onChange, format: format4 = "US", size, ...props }, ref) => {
1218
+ const handleChange = (e) => {
1219
+ let rawValue = e.target.value;
1220
+ switch (format4) {
1221
+ case "US":
1222
+ rawValue = rawValue.replace(/\D/g, "").slice(0, 5);
1223
+ break;
1224
+ case "CA":
1225
+ rawValue = rawValue.toUpperCase().replace(/[^A-Z0-9]/g, "").slice(0, 6);
1226
+ if (rawValue.length >= 3) {
1227
+ rawValue = rawValue.slice(0, 3) + " " + rawValue.slice(3);
1228
+ }
1229
+ break;
1230
+ case "UK":
1231
+ rawValue = rawValue.toUpperCase().replace(/[^A-Z0-9\s]/g, "").slice(0, 8);
1232
+ break;
1233
+ default:
1234
+ rawValue = rawValue.slice(0, 10);
1235
+ }
1236
+ onChange?.(rawValue.replace(/\s/g, ""));
1237
+ e.target.value = rawValue;
1238
+ };
1239
+ const getPlaceholder = () => {
1240
+ switch (format4) {
1241
+ case "US":
1242
+ return "12345";
1243
+ case "CA":
1244
+ return "K1A 0B1";
1245
+ case "UK":
1246
+ return "SW1A 1AA";
1247
+ default:
1248
+ return "Postal Code";
1249
+ }
1250
+ };
1251
+ return /* @__PURE__ */ jsx(
1252
+ Input,
1253
+ {
1254
+ ref,
1255
+ type: "text",
1256
+ autoComplete: "postal-code",
1257
+ placeholder: getPlaceholder(),
1258
+ value,
1259
+ onChange: handleChange,
1260
+ className,
1261
+ ...props
1262
+ }
1263
+ );
1264
+ }
1265
+ );
1266
+ CardZipInput.displayName = "CardZipInput";
1063
1267
  var checkboxVariants = cva(
1064
1268
  "peer shrink-0 border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:text-primary-foreground",
1065
1269
  {
@@ -1119,7 +1323,7 @@ var Checkbox = t.forwardRef(({
1119
1323
  {
1120
1324
  ref,
1121
1325
  checked: effectiveChecked,
1122
- className: cn(checkboxVariants({ variant, size, radius, animation }), className),
1326
+ className: cn("moonui-theme", checkboxVariants({ variant, size, radius, animation }), className),
1123
1327
  ...props,
1124
1328
  children: /* @__PURE__ */ jsx(
1125
1329
  CheckboxPrimitive.Indicator,
@@ -1210,7 +1414,7 @@ var CheckboxWithLabel = t.forwardRef(({
1210
1414
  });
1211
1415
  CheckboxWithLabel.displayName = "CheckboxWithLabel";
1212
1416
 
1213
- // node_modules/@radix-ui/primitive/dist/index.mjs
1417
+ // ../../node_modules/@radix-ui/primitive/dist/index.mjs
1214
1418
  function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
1215
1419
  return function handleEvent(event) {
1216
1420
  originalEventHandler?.(event);
@@ -1704,7 +1908,7 @@ var CollapsibleTrigger2 = t.forwardRef(({ className, children, variant, size, as
1704
1908
  Trigger2,
1705
1909
  {
1706
1910
  ref,
1707
- className: cn(collapsibleTriggerVariants({ variant, size }), className),
1911
+ className: cn("moonui-theme", collapsibleTriggerVariants({ variant, size }), className),
1708
1912
  asChild,
1709
1913
  ...props,
1710
1914
  children
@@ -1715,7 +1919,7 @@ var CollapsibleTrigger2 = t.forwardRef(({ className, children, variant, size, as
1715
1919
  Trigger2,
1716
1920
  {
1717
1921
  ref,
1718
- className: cn(collapsibleTriggerVariants({ variant, size }), className),
1922
+ className: cn("moonui-theme", collapsibleTriggerVariants({ variant, size }), className),
1719
1923
  ...props,
1720
1924
  children: [
1721
1925
  children,
@@ -1751,7 +1955,7 @@ var CollapsibleContent2 = t.forwardRef(({ className, children, variant, size, ..
1751
1955
  Content2,
1752
1956
  {
1753
1957
  ref,
1754
- className: cn(collapsibleContentVariants({ variant, size }), className),
1958
+ className: cn("moonui-theme", collapsibleContentVariants({ variant, size }), className),
1755
1959
  ...props,
1756
1960
  children: /* @__PURE__ */ jsx("div", { className: "p-4", children })
1757
1961
  }
@@ -1851,7 +2055,7 @@ var Input = t.forwardRef(
1851
2055
  const showMessage = alwaysShowMessage || error || success;
1852
2056
  const messageType = error ? "error" : success ? "success" : "normal";
1853
2057
  return /* @__PURE__ */ jsxs("div", { className: "space-y-1.5 w-full", children: [
1854
- /* @__PURE__ */ jsxs("div", { className: cn(inputWrapperVariants({ size }), wrapperClassName), children: [
2058
+ /* @__PURE__ */ jsxs("div", { className: cn("moonui-theme", inputWrapperVariants({ size }), wrapperClassName), children: [
1855
2059
  leftIcon && /* @__PURE__ */ jsx("div", { className: "absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none", children: loading ? /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }) : leftIcon }),
1856
2060
  /* @__PURE__ */ jsx(
1857
2061
  "input",
@@ -2012,7 +2216,7 @@ var PopoverClose = PopoverPrimitive.Close;
2012
2216
  var PopoverSeparator = ({ className, ...props }) => /* @__PURE__ */ jsx(
2013
2217
  "div",
2014
2218
  {
2015
- className: cn("my-2 h-px bg-border", className),
2219
+ className: cn("moonui-theme", "my-2 h-px bg-border", className),
2016
2220
  ...props
2017
2221
  }
2018
2222
  );
@@ -2020,7 +2224,7 @@ PopoverSeparator.displayName = "PopoverSeparator";
2020
2224
  var PopoverHeader = ({ className, ...props }) => /* @__PURE__ */ jsx(
2021
2225
  "div",
2022
2226
  {
2023
- className: cn("-mx-4 -mt-4 mb-3 px-4 pt-4 pb-3 border-b border-border", className),
2227
+ className: cn("moonui-theme", "-mx-4 -mt-4 mb-3 px-4 pt-4 pb-3 border-b border-border", className),
2024
2228
  ...props
2025
2229
  }
2026
2230
  );
@@ -2028,7 +2232,7 @@ PopoverHeader.displayName = "PopoverHeader";
2028
2232
  var PopoverFooter = ({ className, ...props }) => /* @__PURE__ */ jsx(
2029
2233
  "div",
2030
2234
  {
2031
- className: cn("-mx-4 -mb-4 mt-3 px-4 pt-3 pb-4 border-t border-border", className),
2235
+ className: cn("moonui-theme", "-mx-4 -mb-4 mt-3 px-4 pt-3 pb-4 border-t border-border", className),
2032
2236
  ...props
2033
2237
  }
2034
2238
  );
@@ -2037,6 +2241,7 @@ var Tabs = t.forwardRef(({ vertical = false, ...props }, ref) => /* @__PURE__ */
2037
2241
  TabsPrimitive.Root,
2038
2242
  {
2039
2243
  ref,
2244
+ className: cn("moonui-theme", props.className),
2040
2245
  orientation: vertical ? "vertical" : "horizontal",
2041
2246
  ...props
2042
2247
  }
@@ -2072,7 +2277,7 @@ var TabsList = t.forwardRef(({ className, variant, orientation, fullWidth, ...pr
2072
2277
  TabsPrimitive.List,
2073
2278
  {
2074
2279
  ref,
2075
- className: cn(tabsListVariants({ variant, orientation, fullWidth, className })),
2280
+ className: cn("moonui-theme", tabsListVariants({ variant, orientation, fullWidth, className })),
2076
2281
  ...props
2077
2282
  }
2078
2283
  ));
@@ -2126,6 +2331,7 @@ var TabsTrigger = t.forwardRef(({
2126
2331
  {
2127
2332
  ref,
2128
2333
  className: cn(
2334
+ "moonui-theme",
2129
2335
  tabsTriggerVariants({ variant, size, orientation, fullWidth }),
2130
2336
  fadeTabs && "data-[state=inactive]:opacity-60",
2131
2337
  className
@@ -2145,6 +2351,7 @@ var TabsContent = t.forwardRef(({ className, animated = false, ...props }, ref)
2145
2351
  {
2146
2352
  ref,
2147
2353
  className: cn(
2354
+ "moonui-theme",
2148
2355
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
2149
2356
  animated && "data-[state=active]:animate-fadeIn data-[state=inactive]:animate-fadeOut",
2150
2357
  className
@@ -2335,7 +2542,7 @@ var Slider = t.forwardRef(({
2335
2542
  /* @__PURE__ */ jsxs(
2336
2543
  "div",
2337
2544
  {
2338
- className: cn(sliderVariants({ size }), className),
2545
+ className: cn("moonui-theme", sliderVariants({ size }), className),
2339
2546
  "data-disabled": disabled ? true : void 0,
2340
2547
  children: [
2341
2548
  /* @__PURE__ */ jsx(
@@ -2915,7 +3122,7 @@ function SimpleColorPicker({
2915
3122
  default: "h-8 w-8",
2916
3123
  lg: "h-10 w-10"
2917
3124
  };
2918
- return /* @__PURE__ */ jsx("div", { className: cn("flex flex-wrap gap-2", className), children: colors.map((color) => /* @__PURE__ */ jsx(
3125
+ return /* @__PURE__ */ jsx("div", { className: cn("moonui-theme", "flex flex-wrap gap-2", className), children: colors.map((color) => /* @__PURE__ */ jsx(
2919
3126
  "button",
2920
3127
  {
2921
3128
  className: cn(
@@ -2940,7 +3147,7 @@ function GradientPicker({
2940
3147
  setGradient(newGradient);
2941
3148
  onChange?.(newGradient);
2942
3149
  };
2943
- return /* @__PURE__ */ jsxs("div", { className: cn("space-y-4", className), children: [
3150
+ return /* @__PURE__ */ jsxs("div", { className: cn("moonui-theme", "space-y-4", className), children: [
2944
3151
  /* @__PURE__ */ jsx(
2945
3152
  "div",
2946
3153
  {
@@ -3024,85 +3231,6 @@ function D(_) {
3024
3231
  function W(_, C, h) {
3025
3232
  return _ = h && h.length > 0 ? `${_ + " " + h.join(" ")}` : _, G(_, C, D(_), D(C), 0, 0, {});
3026
3233
  }
3027
- var NODES2 = [
3028
- "a",
3029
- "button",
3030
- "div",
3031
- "form",
3032
- "h2",
3033
- "h3",
3034
- "img",
3035
- "input",
3036
- "label",
3037
- "li",
3038
- "nav",
3039
- "ol",
3040
- "p",
3041
- "select",
3042
- "span",
3043
- "svg",
3044
- "ul"
3045
- ];
3046
- var Primitive2 = NODES2.reduce((primitive, node) => {
3047
- const Slot = createSlot(`Primitive.${node}`);
3048
- const Node = t.forwardRef((props, forwardedRef) => {
3049
- const { asChild, ...primitiveProps } = props;
3050
- const Comp = asChild ? Slot : node;
3051
- if (typeof window !== "undefined") {
3052
- window[Symbol.for("radix-ui")] = true;
3053
- }
3054
- return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
3055
- });
3056
- Node.displayName = `Primitive.${node}`;
3057
- return { ...primitive, [node]: Node };
3058
- }, {});
3059
- var useLayoutEffect22 = globalThis?.document ? t.useLayoutEffect : () => {
3060
- };
3061
-
3062
- // ../../node_modules/@radix-ui/react-id/dist/index.mjs
3063
- var useReactId2 = t[" useId ".trim().toString()] || (() => void 0);
3064
- var count2 = 0;
3065
- function useId3(deterministicId) {
3066
- const [id, setId] = t.useState(useReactId2());
3067
- useLayoutEffect22(() => {
3068
- if (!deterministicId)
3069
- setId((reactId) => reactId ?? String(count2++));
3070
- }, [deterministicId]);
3071
- return deterministicId || (id ? `radix-${id}` : "");
3072
- }
3073
- function setRef2(ref, value) {
3074
- if (typeof ref === "function") {
3075
- return ref(value);
3076
- } else if (ref !== null && ref !== void 0) {
3077
- ref.current = value;
3078
- }
3079
- }
3080
- function composeRefs2(...refs) {
3081
- return (node) => {
3082
- let hasCleanup = false;
3083
- const cleanups = refs.map((ref) => {
3084
- const cleanup = setRef2(ref, node);
3085
- if (!hasCleanup && typeof cleanup == "function") {
3086
- hasCleanup = true;
3087
- }
3088
- return cleanup;
3089
- });
3090
- if (hasCleanup) {
3091
- return () => {
3092
- for (let i = 0; i < cleanups.length; i++) {
3093
- const cleanup = cleanups[i];
3094
- if (typeof cleanup == "function") {
3095
- cleanup();
3096
- } else {
3097
- setRef2(refs[i], null);
3098
- }
3099
- }
3100
- };
3101
- }
3102
- };
3103
- }
3104
-
3105
- // ../../node_modules/cmdk/dist/index.mjs
3106
3234
  var N = '[cmdk-group=""]';
3107
3235
  var Y2 = '[cmdk-group-items=""]';
3108
3236
  var be = '[cmdk-group-heading=""]';
@@ -3120,7 +3248,7 @@ var me = t.forwardRef((r, o) => {
3120
3248
  let n = L(() => {
3121
3249
  var e, a;
3122
3250
  return { search: "", value: (a = (e = r.value) != null ? e : r.defaultValue) != null ? a : "", selectedItemId: void 0, filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
3123
- }), u2 = L(() => /* @__PURE__ */ new Set()), c = L(() => /* @__PURE__ */ new Map()), d = L(() => /* @__PURE__ */ new Map()), f = L(() => /* @__PURE__ */ new Set()), p2 = pe(r), { label: b, children: m2, value: R, onValueChange: x, filter: C, shouldFilter: S, loop: A, disablePointerSelection: ge = false, vimBindings: j = true, ...O } = r, $2 = useId3(), q = useId3(), _ = useId3(), I = t.useRef(null), v = ke();
3251
+ }), u2 = L(() => /* @__PURE__ */ new Set()), c = L(() => /* @__PURE__ */ new Map()), d = L(() => /* @__PURE__ */ new Map()), f = L(() => /* @__PURE__ */ new Set()), p2 = pe(r), { label: b, children: m2, value: R, onValueChange: x, filter: C, shouldFilter: S, loop: A, disablePointerSelection: ge = false, vimBindings: j = true, ...O } = r, $2 = useId2(), q = useId2(), _ = useId2(), I = t.useRef(null), v = ke();
3124
3252
  k2(() => {
3125
3253
  if (R !== void 0) {
3126
3254
  let e = R.trim();
@@ -3235,7 +3363,7 @@ var me = t.forwardRef((r, o) => {
3235
3363
  var e;
3236
3364
  return Array.from(((e = I.current) == null ? void 0 : e.querySelectorAll(ce)) || []);
3237
3365
  }
3238
- function X7(e) {
3366
+ function X8(e) {
3239
3367
  let s = V()[e];
3240
3368
  s && E.setState("value", s.getAttribute(T));
3241
3369
  }
@@ -3250,12 +3378,12 @@ var me = t.forwardRef((r, o) => {
3250
3378
  s = e > 0 ? we(s, N) : De(s, N), i = s == null ? void 0 : s.querySelector(ce);
3251
3379
  i ? E.setState("value", i.getAttribute(T)) : Q(e);
3252
3380
  }
3253
- let oe = () => X7(V().length - 1), ie = (e) => {
3381
+ let oe = () => X8(V().length - 1), ie = (e) => {
3254
3382
  e.preventDefault(), e.metaKey ? oe() : e.altKey ? re(1) : Q(1);
3255
3383
  }, se = (e) => {
3256
- e.preventDefault(), e.metaKey ? X7(0) : e.altKey ? re(-1) : Q(-1);
3384
+ e.preventDefault(), e.metaKey ? X8(0) : e.altKey ? re(-1) : Q(-1);
3257
3385
  };
3258
- return t.createElement(Primitive2.div, { ref: o, tabIndex: -1, ...O, "cmdk-root": "", onKeyDown: (e) => {
3386
+ return t.createElement(Primitive.div, { ref: o, tabIndex: -1, ...O, "cmdk-root": "", onKeyDown: (e) => {
3259
3387
  var s;
3260
3388
  (s = O.onKeyDown) == null || s.call(O, e);
3261
3389
  let a = e.nativeEvent.isComposing || e.keyCode === 229;
@@ -3280,7 +3408,7 @@ var me = t.forwardRef((r, o) => {
3280
3408
  break;
3281
3409
  }
3282
3410
  case "Home": {
3283
- e.preventDefault(), X7(0);
3411
+ e.preventDefault(), X8(0);
3284
3412
  break;
3285
3413
  }
3286
3414
  case "End": {
@@ -3300,7 +3428,7 @@ var me = t.forwardRef((r, o) => {
3300
3428
  });
3301
3429
  var he = t.forwardRef((r, o) => {
3302
3430
  var _, I;
3303
- let n = useId3(), u2 = t.useRef(null), c = t.useContext(fe), d = K2(), f = pe(r), p2 = (I = (_ = f.current) == null ? void 0 : _.forceMount) != null ? I : c == null ? void 0 : c.forceMount;
3431
+ let n = useId2(), u2 = t.useRef(null), c = t.useContext(fe), d = K2(), f = pe(r), p2 = (I = (_ = f.current) == null ? void 0 : _.forceMount) != null ? I : c == null ? void 0 : c.forceMount;
3304
3432
  k2(() => {
3305
3433
  if (!p2)
3306
3434
  return d.item(n, c == null ? void 0 : c.id);
@@ -3321,23 +3449,23 @@ var he = t.forwardRef((r, o) => {
3321
3449
  if (!x)
3322
3450
  return null;
3323
3451
  let { disabled: A, value: ge, onSelect: j, forceMount: O, keywords: $2, ...q } = r;
3324
- return t.createElement(Primitive2.div, { ref: composeRefs2(u2, o), ...q, id: n, "cmdk-item": "", role: "option", "aria-disabled": !!A, "aria-selected": !!R, "data-disabled": !!A, "data-selected": !!R, onPointerMove: A || d.getDisablePointerSelection() ? void 0 : S, onClick: A ? void 0 : C }, r.children);
3452
+ return t.createElement(Primitive.div, { ref: composeRefs(u2, o), ...q, id: n, "cmdk-item": "", role: "option", "aria-disabled": !!A, "aria-selected": !!R, "data-disabled": !!A, "data-selected": !!R, onPointerMove: A || d.getDisablePointerSelection() ? void 0 : S, onClick: A ? void 0 : C }, r.children);
3325
3453
  });
3326
3454
  var Ee = t.forwardRef((r, o) => {
3327
- let { heading: n, children: u2, forceMount: c, ...d } = r, f = useId3(), p2 = t.useRef(null), b = t.useRef(null), m2 = useId3(), R = K2(), x = P((S) => c || R.filter() === false ? true : S.search ? S.filtered.groups.has(f) : true);
3455
+ let { heading: n, children: u2, forceMount: c, ...d } = r, f = useId2(), p2 = t.useRef(null), b = t.useRef(null), m2 = useId2(), R = K2(), x = P((S) => c || R.filter() === false ? true : S.search ? S.filtered.groups.has(f) : true);
3328
3456
  k2(() => R.group(f), []), ve(f, p2, [r.value, r.heading, b]);
3329
3457
  let C = t.useMemo(() => ({ id: f, forceMount: c }), [c]);
3330
- return t.createElement(Primitive2.div, { ref: composeRefs2(p2, o), ...d, "cmdk-group": "", role: "presentation", hidden: x ? void 0 : true }, n && t.createElement("div", { ref: b, "cmdk-group-heading": "", "aria-hidden": true, id: m2 }, n), B2(r, (S) => t.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n ? m2 : void 0 }, t.createElement(fe.Provider, { value: C }, S))));
3458
+ return t.createElement(Primitive.div, { ref: composeRefs(p2, o), ...d, "cmdk-group": "", role: "presentation", hidden: x ? void 0 : true }, n && t.createElement("div", { ref: b, "cmdk-group-heading": "", "aria-hidden": true, id: m2 }, n), B2(r, (S) => t.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n ? m2 : void 0 }, t.createElement(fe.Provider, { value: C }, S))));
3331
3459
  });
3332
3460
  var ye = t.forwardRef((r, o) => {
3333
3461
  let { alwaysRender: n, ...u2 } = r, c = t.useRef(null), d = P((f) => !f.search);
3334
- return !n && !d ? null : t.createElement(Primitive2.div, { ref: composeRefs2(c, o), ...u2, "cmdk-separator": "", role: "separator" });
3462
+ return !n && !d ? null : t.createElement(Primitive.div, { ref: composeRefs(c, o), ...u2, "cmdk-separator": "", role: "separator" });
3335
3463
  });
3336
3464
  var Se = t.forwardRef((r, o) => {
3337
3465
  let { onValueChange: n, ...u2 } = r, c = r.value != null, d = ee(), f = P((m2) => m2.search), p2 = P((m2) => m2.selectedItemId), b = K2();
3338
3466
  return t.useEffect(() => {
3339
3467
  r.value != null && d.setState("search", r.value);
3340
- }, [r.value]), t.createElement(Primitive2.input, { ref: o, ...u2, "cmdk-input": "", autoComplete: "off", autoCorrect: "off", spellCheck: false, "aria-autocomplete": "list", role: "combobox", "aria-expanded": true, "aria-controls": b.listId, "aria-labelledby": b.labelId, "aria-activedescendant": p2, id: b.inputId, type: "text", value: c ? r.value : f, onChange: (m2) => {
3468
+ }, [r.value]), t.createElement(Primitive.input, { ref: o, ...u2, "cmdk-input": "", autoComplete: "off", autoCorrect: "off", spellCheck: false, "aria-autocomplete": "list", role: "combobox", "aria-expanded": true, "aria-controls": b.listId, "aria-labelledby": b.labelId, "aria-activedescendant": p2, id: b.inputId, type: "text", value: c ? r.value : f, onChange: (m2) => {
3341
3469
  c || d.setState("search", m2.target.value), n == null || n(m2.target.value);
3342
3470
  } });
3343
3471
  });
@@ -3355,16 +3483,16 @@ var Ce = t.forwardRef((r, o) => {
3355
3483
  cancelAnimationFrame(x), C.unobserve(m2);
3356
3484
  };
3357
3485
  }
3358
- }, []), t.createElement(Primitive2.div, { ref: composeRefs2(d, o), ...c, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": p2, "aria-label": u2, id: b.listId }, B2(r, (m2) => t.createElement("div", { ref: composeRefs2(f, b.listInnerRef), "cmdk-list-sizer": "" }, m2)));
3486
+ }, []), t.createElement(Primitive.div, { ref: composeRefs(d, o), ...c, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": p2, "aria-label": u2, id: b.listId }, B2(r, (m2) => t.createElement("div", { ref: composeRefs(f, b.listInnerRef), "cmdk-list-sizer": "" }, m2)));
3359
3487
  });
3360
3488
  var xe = t.forwardRef((r, o) => {
3361
3489
  let { open: n, onOpenChange: u2, overlayClassName: c, contentClassName: d, container: f, ...p2 } = r;
3362
3490
  return t.createElement(DialogPrimitive.Root, { open: n, onOpenChange: u2 }, t.createElement(DialogPrimitive.Portal, { container: f }, t.createElement(DialogPrimitive.Overlay, { "cmdk-overlay": "", className: c }), t.createElement(DialogPrimitive.Content, { "aria-label": r.label, "cmdk-dialog": "", className: d }, t.createElement(me, { ref: o, ...p2 }))));
3363
3491
  });
3364
- var Ie = t.forwardRef((r, o) => P((u2) => u2.filtered.count === 0) ? t.createElement(Primitive2.div, { ref: o, ...r, "cmdk-empty": "", role: "presentation" }) : null);
3492
+ var Ie = t.forwardRef((r, o) => P((u2) => u2.filtered.count === 0) ? t.createElement(Primitive.div, { ref: o, ...r, "cmdk-empty": "", role: "presentation" }) : null);
3365
3493
  var Pe = t.forwardRef((r, o) => {
3366
3494
  let { progress: n, children: u2, label: c = "Loading...", ...d } = r;
3367
- return t.createElement(Primitive2.div, { ref: o, ...d, "cmdk-loading": "", role: "progressbar", "aria-valuenow": n, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": c }, B2(r, (f) => t.createElement("div", { "aria-hidden": true }, f)));
3495
+ return t.createElement(Primitive.div, { ref: o, ...d, "cmdk-loading": "", role: "progressbar", "aria-valuenow": n, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": c }, B2(r, (f) => t.createElement("div", { "aria-hidden": true }, f)));
3368
3496
  });
3369
3497
  var _e = Object.assign(me, { List: Ce, Item: he, Input: Se, Group: Ee, Separator: ye, Dialog: xe, Empty: Ie, Loading: Pe });
3370
3498
  function we(r, o) {
@@ -3460,7 +3588,7 @@ var DialogOverlay = t.forwardRef(({ className, variant, animation, ...props }, r
3460
3588
  DialogPrimitive.Overlay,
3461
3589
  {
3462
3590
  ref,
3463
- className: cn(overlayVariants({ variant, animation }), className),
3591
+ className: cn("moonui-theme", overlayVariants({ variant, animation }), className),
3464
3592
  ...props
3465
3593
  }
3466
3594
  ));
@@ -3656,7 +3784,7 @@ var DialogForm = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
3656
3784
  "form",
3657
3785
  {
3658
3786
  ref,
3659
- className: cn("flex flex-col gap-4", className),
3787
+ className: cn("moonui-theme", "flex flex-col gap-4", className),
3660
3788
  ...props
3661
3789
  }
3662
3790
  ));
@@ -3686,7 +3814,7 @@ var Command = t.forwardRef(({ className, variant, size, ...props }, ref) => /* @
3686
3814
  _e,
3687
3815
  {
3688
3816
  ref,
3689
- className: cn(commandVariants({ variant, size }), className),
3817
+ className: cn("moonui-theme", commandVariants({ variant, size }), className),
3690
3818
  ...props
3691
3819
  }
3692
3820
  ));
@@ -3723,7 +3851,7 @@ var CommandList = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
3723
3851
  _e.List,
3724
3852
  {
3725
3853
  ref,
3726
- className: cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className),
3854
+ className: cn("moonui-theme", "max-h-[300px] overflow-y-auto overflow-x-hidden", className),
3727
3855
  ...props
3728
3856
  }
3729
3857
  ));
@@ -3732,7 +3860,7 @@ var CommandEmpty = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
3732
3860
  _e.Empty,
3733
3861
  {
3734
3862
  ref,
3735
- className: cn("py-6 text-center text-sm text-muted-foreground", className),
3863
+ className: cn("moonui-theme", "py-6 text-center text-sm text-muted-foreground", className),
3736
3864
  ...props
3737
3865
  }
3738
3866
  ));
@@ -3753,7 +3881,7 @@ var CommandSeparator = t.forwardRef(({ className, ...props }, ref) => /* @__PURE
3753
3881
  _e.Separator,
3754
3882
  {
3755
3883
  ref,
3756
- className: cn("-mx-1 h-px bg-border", className),
3884
+ className: cn("moonui-theme", "-mx-1 h-px bg-border", className),
3757
3885
  ...props
3758
3886
  }
3759
3887
  ));
@@ -4517,16 +4645,16 @@ var extent = (columnId, _leafRows, childRows) => {
4517
4645
  return [min2, max2];
4518
4646
  };
4519
4647
  var mean = (columnId, leafRows) => {
4520
- let count4 = 0;
4648
+ let count3 = 0;
4521
4649
  let sum2 = 0;
4522
4650
  leafRows.forEach((row) => {
4523
4651
  let value = row.getValue(columnId);
4524
4652
  if (value != null && (value = +value) >= value) {
4525
- ++count4, sum2 += value;
4653
+ ++count3, sum2 += value;
4526
4654
  }
4527
4655
  });
4528
- if (count4)
4529
- return sum2 / count4;
4656
+ if (count3)
4657
+ return sum2 / count3;
4530
4658
  return;
4531
4659
  };
4532
4660
  var median = (columnId, leafRows) => {
@@ -4550,7 +4678,7 @@ var unique = (columnId, leafRows) => {
4550
4678
  var uniqueCount = (columnId, leafRows) => {
4551
4679
  return new Set(leafRows.map((d) => d.getValue(columnId))).size;
4552
4680
  };
4553
- var count3 = (_columnId, leafRows) => {
4681
+ var count2 = (_columnId, leafRows) => {
4554
4682
  return leafRows.length;
4555
4683
  };
4556
4684
  var aggregationFns = {
@@ -4562,7 +4690,7 @@ var aggregationFns = {
4562
4690
  median,
4563
4691
  unique,
4564
4692
  uniqueCount,
4565
- count: count3
4693
+ count: count2
4566
4694
  };
4567
4695
  var ColumnGrouping = {
4568
4696
  getDefaultColumnDef: () => {
@@ -6886,7 +7014,7 @@ var Table = t.forwardRef(({
6886
7014
  ] });
6887
7015
  });
6888
7016
  Table.displayName = "Table";
6889
- var TableHeader = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
7017
+ var TableHeader = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className: cn("moonui-theme", "[&_tr]:border-b", className), ...props }));
6890
7018
  TableHeader.displayName = "TableHeader";
6891
7019
  var TableBody = t.forwardRef(({ className, emptyContent, emptyMessage = "No data available", children, ...props }, ref) => {
6892
7020
  const hasChildren = t.Children.count(children) > 0;
@@ -6894,7 +7022,7 @@ var TableBody = t.forwardRef(({ className, emptyContent, emptyMessage = "No data
6894
7022
  "tbody",
6895
7023
  {
6896
7024
  ref,
6897
- className: cn("[&_tr:last-child]:border-0", className),
7025
+ className: cn("moonui-theme", "[&_tr:last-child]:border-0", className),
6898
7026
  ...props,
6899
7027
  children: hasChildren ? children : /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { colSpan: 100, className: "h-24 text-center", children: emptyContent || /* @__PURE__ */ jsx("div", { className: "py-6 text-muted-foreground", children: /* @__PURE__ */ jsx("div", { className: "text-sm", children: emptyMessage }) }) }) })
6900
7028
  }
@@ -6905,7 +7033,7 @@ var TableFooter = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
6905
7033
  "tfoot",
6906
7034
  {
6907
7035
  ref,
6908
- className: cn("bg-primary text-primary-foreground font-medium", className),
7036
+ className: cn("moonui-theme", "bg-primary text-primary-foreground font-medium", className),
6909
7037
  ...props
6910
7038
  }
6911
7039
  ));
@@ -7007,7 +7135,7 @@ var TableCell = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ j
7007
7135
  "td",
7008
7136
  {
7009
7137
  ref,
7010
- className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className),
7138
+ className: cn("moonui-theme", "p-4 align-middle [&:has([role=checkbox])]:pr-0", className),
7011
7139
  ...props
7012
7140
  }
7013
7141
  ));
@@ -7016,7 +7144,7 @@ var TableCaption = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
7016
7144
  "caption",
7017
7145
  {
7018
7146
  ref,
7019
- className: cn("mt-4 text-sm text-muted-foreground", className),
7147
+ className: cn("moonui-theme", "mt-4 text-sm text-muted-foreground", className),
7020
7148
  ...props
7021
7149
  }
7022
7150
  ));
@@ -7093,10 +7221,14 @@ var SelectScrollDownButton = t.forwardRef(({ className, ...props }, ref) => /* @
7093
7221
  }
7094
7222
  ));
7095
7223
  SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
7096
- var SelectContent = t.forwardRef(({ className, children, position = "item-aligned", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
7224
+ var SelectContent = t.forwardRef(({ className, children, position = "popper", side = "bottom", sideOffset = 4, align = "start", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
7097
7225
  SelectPrimitive.Content,
7098
7226
  {
7099
7227
  ref,
7228
+ side,
7229
+ sideOffset,
7230
+ align,
7231
+ avoidCollisions: false,
7100
7232
  className: cn(
7101
7233
  [
7102
7234
  "relative z-50 max-h-96 min-w-[8rem] overflow-hidden",
@@ -7134,7 +7266,7 @@ var SelectLabel = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
7134
7266
  SelectPrimitive.Label,
7135
7267
  {
7136
7268
  ref,
7137
- className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
7269
+ className: cn("moonui-theme", "py-1.5 pl-8 pr-2 text-sm font-semibold", className),
7138
7270
  ...props
7139
7271
  }
7140
7272
  ));
@@ -7170,7 +7302,7 @@ var SelectSeparator = t.forwardRef(({ className, ...props }, ref) => /* @__PURE_
7170
7302
  SelectPrimitive.Separator,
7171
7303
  {
7172
7304
  ref,
7173
- className: cn("-mx-1 my-1 h-px bg-muted dark:bg-gray-700", className),
7305
+ className: cn("moonui-theme", "-mx-1 my-1 h-px bg-muted dark:bg-gray-700", className),
7174
7306
  ...props
7175
7307
  }
7176
7308
  ));
@@ -7286,7 +7418,7 @@ var DropdownMenuSeparator = t.forwardRef(({ className, ...props }, ref) => /* @_
7286
7418
  DropdownMenuPrimitive.Separator,
7287
7419
  {
7288
7420
  ref,
7289
- className: cn("-mx-1 my-1 h-px bg-muted", className),
7421
+ className: cn("moonui-theme", "-mx-1 my-1 h-px bg-muted", className),
7290
7422
  ...props
7291
7423
  }
7292
7424
  ));
@@ -7298,7 +7430,7 @@ var DropdownMenuShortcut = ({
7298
7430
  return /* @__PURE__ */ jsx(
7299
7431
  "span",
7300
7432
  {
7301
- className: cn("ml-auto text-xs tracking-widest opacity-60", className),
7433
+ className: cn("moonui-theme", "ml-auto text-xs tracking-widest opacity-60", className),
7302
7434
  ...props
7303
7435
  }
7304
7436
  );
@@ -7354,6 +7486,15 @@ var Skeleton = t.forwardRef(
7354
7486
  style,
7355
7487
  ...props
7356
7488
  }, ref) => {
7489
+ const {
7490
+ onDrag,
7491
+ onDragEnd,
7492
+ onDragStart,
7493
+ onAnimationStart,
7494
+ onAnimationEnd,
7495
+ onAnimationIteration,
7496
+ ...filteredProps
7497
+ } = props;
7357
7498
  if (isLoaded && children) {
7358
7499
  if (useMotion) {
7359
7500
  return /* @__PURE__ */ jsx(
@@ -7363,13 +7504,13 @@ var Skeleton = t.forwardRef(
7363
7504
  initial: { opacity: 0 },
7364
7505
  animate: { opacity: 1 },
7365
7506
  transition: { duration: fadeInDuration / 1e3 },
7366
- className,
7507
+ className: cn("moonui-theme", className),
7367
7508
  style: {
7368
7509
  height,
7369
7510
  width,
7370
7511
  ...style
7371
7512
  },
7372
- ...props,
7513
+ ...filteredProps,
7373
7514
  children
7374
7515
  }
7375
7516
  );
@@ -7378,7 +7519,7 @@ var Skeleton = t.forwardRef(
7378
7519
  "div",
7379
7520
  {
7380
7521
  ref,
7381
- className: cn("animate-fade-in", className),
7522
+ className: cn("moonui-theme", "animate-fade-in", className),
7382
7523
  style: {
7383
7524
  animationDuration: `${fadeInDuration}ms`,
7384
7525
  height,
@@ -7396,6 +7537,7 @@ var Skeleton = t.forwardRef(
7396
7537
  {
7397
7538
  ref,
7398
7539
  className: cn(
7540
+ "moonui-theme",
7399
7541
  skeletonVariants({ variant, size, shape, animation }),
7400
7542
  "relative isolate",
7401
7543
  className
@@ -7406,7 +7548,7 @@ var Skeleton = t.forwardRef(
7406
7548
  ...style
7407
7549
  },
7408
7550
  ...useMotion ? skeletonAnimation : {},
7409
- ...props
7551
+ ...filteredProps
7410
7552
  }
7411
7553
  );
7412
7554
  }
@@ -7428,7 +7570,7 @@ var SkeletonText = t.forwardRef(
7428
7570
  "div",
7429
7571
  {
7430
7572
  ref,
7431
- className: cn("flex flex-col", className),
7573
+ className: cn("moonui-theme", "flex flex-col", className),
7432
7574
  style: { gap: spacing },
7433
7575
  ...props,
7434
7576
  children: Array.from({ length: lines }).map((_, i) => {
@@ -7468,7 +7610,7 @@ var SkeletonAvatar = t.forwardRef(
7468
7610
  variant,
7469
7611
  animation,
7470
7612
  shape: "circle",
7471
- className: cn("shrink-0", className),
7613
+ className: cn("moonui-theme", "shrink-0", className),
7472
7614
  style: {
7473
7615
  height: size,
7474
7616
  width: size
@@ -7660,54 +7802,52 @@ function DataTable({
7660
7802
  return /* @__PURE__ */ jsx(DataTableLoading, {});
7661
7803
  }
7662
7804
  const selectedRows = table.getFilteredSelectedRowModel().rows;
7663
- return /* @__PURE__ */ jsxs("div", { className: cn("space-y-4", className), children: [
7805
+ return /* @__PURE__ */ jsxs("div", { className: cn("moonui-theme", "space-y-4", className), children: [
7664
7806
  (title || description) && /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
7665
7807
  title && /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold", children: title }),
7666
7808
  description && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: description })
7667
7809
  ] }),
7668
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 md:flex-row md:items-center md:justify-between", children: [
7669
- /* @__PURE__ */ jsxs("div", { className: "flex flex-1 items-center gap-2", children: [
7670
- enableFiltering && /* @__PURE__ */ jsx(Fragment, { children: customFilter || /* @__PURE__ */ jsxs("div", { className: "relative flex-1 max-w-sm", children: [
7671
- /* @__PURE__ */ jsx(Search, { className: "absolute left-2 top-2.5 h-4 w-4 text-muted-foreground" }),
7672
- /* @__PURE__ */ jsx(
7673
- Input,
7674
- {
7675
- placeholder: filterPlaceholder,
7676
- value: filterColumn ? table.getColumn(filterColumn)?.getFilterValue() ?? "" : globalFilter,
7677
- onChange: (event) => {
7678
- const value = event.target.value;
7679
- if (filterColumn) {
7680
- table.getColumn(filterColumn)?.setFilterValue(value);
7681
- } else {
7682
- setGlobalFilter(value);
7683
- }
7684
- },
7685
- className: "pl-8"
7686
- }
7687
- ),
7688
- (filterColumn && table.getColumn(filterColumn)?.getFilterValue() || !filterColumn && globalFilter) && /* @__PURE__ */ jsx(
7689
- Button,
7690
- {
7691
- variant: "ghost",
7692
- size: "sm",
7693
- className: "absolute right-0 top-0 h-full px-2",
7694
- onClick: () => {
7695
- if (filterColumn) {
7696
- table.getColumn(filterColumn)?.setFilterValue("");
7697
- } else {
7698
- setGlobalFilter("");
7699
- }
7700
- },
7701
- children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
7702
- }
7703
- )
7704
- ] }) }),
7810
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4", children: [
7811
+ /* @__PURE__ */ jsx("div", { className: "flex-1 max-w-sm", children: enableFiltering && /* @__PURE__ */ jsx(Fragment, { children: customFilter || /* @__PURE__ */ jsxs("div", { className: "relative", children: [
7812
+ /* @__PURE__ */ jsx(Search, { className: "absolute left-2 top-2.5 h-4 w-4 text-muted-foreground" }),
7813
+ /* @__PURE__ */ jsx(
7814
+ Input,
7815
+ {
7816
+ placeholder: filterPlaceholder,
7817
+ value: filterColumn ? table.getColumn(filterColumn)?.getFilterValue() ?? "" : globalFilter,
7818
+ onChange: (event) => {
7819
+ const value = event.target.value;
7820
+ if (filterColumn) {
7821
+ table.getColumn(filterColumn)?.setFilterValue(value);
7822
+ } else {
7823
+ setGlobalFilter(value);
7824
+ }
7825
+ },
7826
+ className: "pl-8"
7827
+ }
7828
+ ),
7829
+ (filterColumn && table.getColumn(filterColumn)?.getFilterValue() || !filterColumn && globalFilter) && /* @__PURE__ */ jsx(
7830
+ Button,
7831
+ {
7832
+ variant: "ghost",
7833
+ size: "sm",
7834
+ className: "absolute right-0 top-0 h-full px-2",
7835
+ onClick: () => {
7836
+ if (filterColumn) {
7837
+ table.getColumn(filterColumn)?.setFilterValue("");
7838
+ } else {
7839
+ setGlobalFilter("");
7840
+ }
7841
+ },
7842
+ children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
7843
+ }
7844
+ )
7845
+ ] }) }) }),
7846
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
7705
7847
  enableRowSelection && selectedRows.length > 0 && /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className: "whitespace-nowrap", children: [
7706
7848
  selectedRows.length,
7707
7849
  " selected"
7708
- ] })
7709
- ] }),
7710
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
7850
+ ] }),
7711
7851
  toolbarActions,
7712
7852
  enableExport && onExport && /* @__PURE__ */ jsxs(
7713
7853
  Button,
@@ -8025,8 +8165,8 @@ function Calendar({
8025
8165
  return [...previousMonthDays, ...emptyCells, ...days2, ...nextMonthDays];
8026
8166
  };
8027
8167
  const days = getDaysInMonth();
8028
- return /* @__PURE__ */ jsxs("div", { className: cn("p-0", className), children: [
8029
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-6 py-4", children: [
8168
+ return /* @__PURE__ */ jsxs("div", { className: cn("moonui-theme", "p-0", className), children: [
8169
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-6 py-4 border-b border-border/50 dark:border-gray-700/50", children: [
8030
8170
  /* @__PURE__ */ jsx(
8031
8171
  "button",
8032
8172
  {
@@ -8104,6 +8244,11 @@ function Calendar({
8104
8244
  ] });
8105
8245
  }
8106
8246
  Calendar.displayName = "Calendar";
8247
+ var pageTransitions2 = {
8248
+ initial: { opacity: 0, x: 20 },
8249
+ animate: { opacity: 1, x: 0 },
8250
+ exit: { opacity: 0, x: -20 }
8251
+ };
8107
8252
  var datePickerVariants = cva(
8108
8253
  "w-full justify-start text-left font-normal",
8109
8254
  {
@@ -8111,8 +8256,7 @@ var datePickerVariants = cva(
8111
8256
  variant: {
8112
8257
  default: "",
8113
8258
  outline: "border-2",
8114
- ghost: "hover:bg-accent hover:text-accent-foreground",
8115
- minimal: "h-auto p-0 border-0 shadow-none"
8259
+ ghost: "hover:bg-accent hover:text-accent-foreground"
8116
8260
  },
8117
8261
  size: {
8118
8262
  default: "h-10 px-4 py-2",
@@ -8163,9 +8307,10 @@ function DatePicker({
8163
8307
  setInternalDate(value);
8164
8308
  }, [value]);
8165
8309
  const handleSelect = (date) => {
8166
- setInternalDate(date);
8167
- onChange?.(date);
8168
- if (date) {
8310
+ const singleDate = Array.isArray(date) ? date[0] : date && typeof date === "object" && "from" in date ? date.from : date;
8311
+ setInternalDate(singleDate);
8312
+ onChange?.(singleDate);
8313
+ if (singleDate) {
8169
8314
  setOpen(false);
8170
8315
  }
8171
8316
  };
@@ -8190,11 +8335,11 @@ function DatePicker({
8190
8335
  };
8191
8336
  const displayValue = internalDate && isValid(internalDate) ? format(internalDate, formatString) : null;
8192
8337
  const iconElement = icon || /* @__PURE__ */ jsx(Calendar$1, { className: "h-4 w-4" });
8193
- return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
8338
+ return /* @__PURE__ */ jsx("div", { className: "moonui-theme", children: /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
8194
8339
  /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
8195
8340
  Button,
8196
8341
  {
8197
- variant: variant === "minimal" ? "ghost" : variant || "outline",
8342
+ variant: variant === "ghost" ? "ghost" : "outline",
8198
8343
  className: cn(
8199
8344
  datePickerVariants({ variant, size, state }),
8200
8345
  !displayValue && "text-muted-foreground",
@@ -8267,13 +8412,13 @@ function DatePicker({
8267
8412
  /* @__PURE__ */ jsx(
8268
8413
  PopoverContent,
8269
8414
  {
8270
- className: "w-[360px] p-0 shadow-xl rounded-2xl border-0 bg-background/95 backdrop-blur-sm",
8415
+ className: "w-[360px] p-0 shadow-2xl rounded-2xl border border-gray-200 dark:border-gray-700 bg-background/95 backdrop-blur-sm z-[1000]",
8271
8416
  align: "start",
8272
8417
  sideOffset: 12,
8273
8418
  children: /* @__PURE__ */ jsxs(
8274
8419
  motion.div,
8275
8420
  {
8276
- ...microInteractionVariants.fadeIn,
8421
+ ...pageTransitions2,
8277
8422
  className: "rounded-2xl bg-background overflow-hidden",
8278
8423
  children: [
8279
8424
  /* @__PURE__ */ jsx(
@@ -8303,7 +8448,7 @@ function DatePicker({
8303
8448
  )
8304
8449
  }
8305
8450
  )
8306
- ] });
8451
+ ] }) });
8307
8452
  }
8308
8453
  function DateRangePicker({
8309
8454
  className,
@@ -8341,7 +8486,7 @@ function DateRangePicker({
8341
8486
  /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
8342
8487
  Button,
8343
8488
  {
8344
- variant: props.variant === "minimal" ? "ghost" : props.variant || "outline",
8489
+ variant: props.variant === "ghost" ? "ghost" : "outline",
8345
8490
  className: cn(
8346
8491
  datePickerVariants({
8347
8492
  variant: props.variant,
@@ -8358,7 +8503,7 @@ function DateRangePicker({
8358
8503
  ]
8359
8504
  }
8360
8505
  ) }),
8361
- /* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-0 shadow-xl rounded-2xl border-0 bg-background/95 backdrop-blur-sm", align: "start", sideOffset: 12, children: /* @__PURE__ */ jsx(
8506
+ /* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-0 shadow-2xl rounded-2xl border border-gray-200 dark:border-gray-700 bg-background/95 backdrop-blur-sm z-[1000]", align: "start", sideOffset: 12, children: /* @__PURE__ */ jsx(
8362
8507
  Calendar,
8363
8508
  {
8364
8509
  mode: "range",
@@ -8499,7 +8644,7 @@ function MonthPicker({
8499
8644
  /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
8500
8645
  Button,
8501
8646
  {
8502
- variant: props.variant || "outline",
8647
+ variant: props.variant === "default" ? "outline" : props.variant || "outline",
8503
8648
  className: cn(
8504
8649
  datePickerVariants({
8505
8650
  variant: props.variant,
@@ -8516,7 +8661,7 @@ function MonthPicker({
8516
8661
  ]
8517
8662
  }
8518
8663
  ) }),
8519
- /* @__PURE__ */ jsx(PopoverContent, { className: "w-64 p-0", align: "start", children: /* @__PURE__ */ jsxs("div", { className: "p-3", children: [
8664
+ /* @__PURE__ */ jsx(PopoverContent, { className: "w-64 p-0 shadow-2xl border border-gray-200 dark:border-gray-700 bg-background z-[1000]", align: "start", children: /* @__PURE__ */ jsxs("div", { className: "p-3", children: [
8520
8665
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-3", children: [
8521
8666
  /* @__PURE__ */ jsx(
8522
8667
  Button,
@@ -8541,7 +8686,7 @@ function MonthPicker({
8541
8686
  /* @__PURE__ */ jsx("div", { className: "grid grid-cols-3 gap-2", children: months.map((month, index) => /* @__PURE__ */ jsx(
8542
8687
  Button,
8543
8688
  {
8544
- variant: value && value.getMonth() === index ? "default" : "outline",
8689
+ variant: value && value.getMonth() === index ? "primary" : "outline",
8545
8690
  size: "sm",
8546
8691
  onClick: () => handleMonthSelect(index),
8547
8692
  className: "h-8 text-xs",
@@ -8587,7 +8732,7 @@ function DraggableList({
8587
8732
  const handleDragEnd = () => {
8588
8733
  setDraggedIndex(null);
8589
8734
  };
8590
- return /* @__PURE__ */ jsx("div", { className: cn("space-y-2", className), children: items.map((item, index) => /* @__PURE__ */ jsx(
8735
+ return /* @__PURE__ */ jsx("div", { className: cn("moonui-theme", "space-y-2", className), children: items.map((item, index) => /* @__PURE__ */ jsx(
8591
8736
  "div",
8592
8737
  {
8593
8738
  draggable: !disabled,
@@ -8706,7 +8851,7 @@ var Progress = t.forwardRef(({
8706
8851
  "div",
8707
8852
  {
8708
8853
  ref,
8709
- className: cn(progressVariants({ variant, size, radius, animation }), className),
8854
+ className: cn("moonui-theme", progressVariants({ variant, size, radius, animation }), className),
8710
8855
  role: "progressbar",
8711
8856
  "aria-valuemin": 0,
8712
8857
  "aria-valuemax": max2,
@@ -8787,7 +8932,7 @@ var FileItem = ({
8787
8932
  /* @__PURE__ */ jsx(Loader2, { className: "h-3 w-3 mr-1 animate-spin" }),
8788
8933
  "Uploading"
8789
8934
  ] }),
8790
- status === "success" && /* @__PURE__ */ jsxs(Badge, { variant: "default", className: "h-5 bg-green-500", children: [
8935
+ status === "success" && /* @__PURE__ */ jsxs(Badge, { variant: "success", className: "h-5", children: [
8791
8936
  /* @__PURE__ */ jsx(CheckCircle, { className: "h-3 w-3 mr-1" }),
8792
8937
  "Done"
8793
8938
  ] }),
@@ -8936,7 +9081,7 @@ var FileUpload = t__default.forwardRef(
8936
9081
  onRemove(fileId);
8937
9082
  }
8938
9083
  }, [onRemove]);
8939
- return /* @__PURE__ */ jsxs("div", { ref, className: cn("space-y-4", className), ...props, children: [
9084
+ return /* @__PURE__ */ jsxs("div", { ref, className: cn("moonui-theme", "space-y-4", className), ...props, children: [
8940
9085
  /* @__PURE__ */ jsxs(
8941
9086
  motion.div,
8942
9087
  {
@@ -9275,7 +9420,7 @@ function GitHubStarButton({
9275
9420
  {
9276
9421
  variant: "outline",
9277
9422
  size,
9278
- className: cn("group", className),
9423
+ className: cn("moonui-theme", "group", className),
9279
9424
  asChild: true,
9280
9425
  children: /* @__PURE__ */ jsxs(
9281
9426
  "a",
@@ -9295,57 +9440,191 @@ function GitHubStarButton({
9295
9440
  }
9296
9441
  );
9297
9442
  }
9298
- function MoonLogo({
9443
+ function LockedComponent({
9444
+ children,
9445
+ componentName,
9299
9446
  className,
9300
- variant = "default",
9301
- showText = true,
9302
- ...props
9447
+ showPreview = true,
9448
+ previewDuration = 2e3
9303
9449
  }) {
9304
- const logoId = t.useId();
9305
- const gradientId = `moon-gradient-${logoId}`;
9306
- return /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-2", className), children: [
9307
- /* @__PURE__ */ jsxs(
9308
- "svg",
9309
- {
9310
- width: "32",
9311
- height: "32",
9312
- viewBox: "0 0 32 32",
9313
- fill: "none",
9314
- xmlns: "http://www.w3.org/2000/svg",
9315
- className: "flex-shrink-0",
9316
- ...props,
9317
- children: [
9318
- variant === "gradient" && /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("linearGradient", { id: gradientId, x1: "0%", y1: "0%", x2: "100%", y2: "100%", children: [
9319
- /* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: "#3B82F6" }),
9320
- /* @__PURE__ */ jsx("stop", { offset: "50%", stopColor: "#8B5CF6" }),
9321
- /* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: "#EC4899" })
9322
- ] }) }),
9323
- /* @__PURE__ */ jsx(
9324
- "circle",
9325
- {
9326
- cx: "16",
9327
- cy: "16",
9328
- r: "14",
9329
- fill: variant === "gradient" ? `url(#${gradientId})` : "currentColor",
9330
- className: variant === "default" ? "fill-primary" : ""
9331
- }
9332
- ),
9333
- /* @__PURE__ */ jsx(
9334
- "circle",
9335
- {
9336
- cx: "22",
9337
- cy: "10",
9338
- r: "10",
9339
- fill: "white",
9340
- className: "dark:fill-background"
9341
- }
9342
- )
9343
- ]
9344
- }
9345
- ),
9346
- showText && /* @__PURE__ */ jsxs("span", { className: "text-xl font-bold", children: [
9347
- /* @__PURE__ */ jsx("span", { className: "text-foreground", children: "Moon" }),
9348
- /* @__PURE__ */ jsx("span", { className: "text-primary", children: "UI" })
9450
+ const [isPreviewActive, setIsPreviewActive] = useState(false);
9451
+ const [previewTimeout, setPreviewTimeout] = useState(null);
9452
+ const handleMouseEnter = () => {
9453
+ if (!showPreview)
9454
+ return;
9455
+ setIsPreviewActive(true);
9456
+ if (previewTimeout) {
9457
+ clearTimeout(previewTimeout);
9458
+ }
9459
+ const timeout = setTimeout(() => {
9460
+ setIsPreviewActive(false);
9461
+ }, previewDuration);
9462
+ setPreviewTimeout(timeout);
9463
+ };
9464
+ const handleMouseLeave = () => {
9465
+ if (previewTimeout) {
9466
+ clearTimeout(previewTimeout);
9467
+ setPreviewTimeout(null);
9468
+ }
9469
+ setIsPreviewActive(false);
9470
+ };
9471
+ return /* @__PURE__ */ jsxs(
9472
+ "div",
9473
+ {
9474
+ className: cn(
9475
+ "relative group cursor-pointer transition-all duration-300",
9476
+ className
9477
+ ),
9478
+ onMouseEnter: handleMouseEnter,
9479
+ onMouseLeave: handleMouseLeave,
9480
+ children: [
9481
+ /* @__PURE__ */ jsx(
9482
+ "div",
9483
+ {
9484
+ className: cn(
9485
+ "transition-all duration-300",
9486
+ !isPreviewActive && "blur-sm grayscale-[0.3] opacity-60"
9487
+ ),
9488
+ children
9489
+ }
9490
+ ),
9491
+ /* @__PURE__ */ jsx(
9492
+ "div",
9493
+ {
9494
+ className: cn(
9495
+ "absolute inset-0 bg-gradient-to-br from-amber-500/10 via-transparent to-purple-500/10",
9496
+ "border-2 border-dashed border-amber-400/30 rounded-lg",
9497
+ "flex items-center justify-center",
9498
+ "transition-all duration-300",
9499
+ isPreviewActive ? "opacity-0" : "opacity-100"
9500
+ ),
9501
+ children: /* @__PURE__ */ jsxs("div", { className: "text-center space-y-3 p-6", children: [
9502
+ /* @__PURE__ */ jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxs(
9503
+ Badge,
9504
+ {
9505
+ variant: "secondary",
9506
+ className: "bg-gradient-to-r from-amber-500 to-orange-500 text-white border-0 px-3 py-1",
9507
+ children: [
9508
+ /* @__PURE__ */ jsx(Crown, { className: "w-3 h-3 mr-1" }),
9509
+ "PRO ONLY"
9510
+ ]
9511
+ }
9512
+ ) }),
9513
+ /* @__PURE__ */ jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsx("div", { className: "p-3 rounded-full bg-amber-100 dark:bg-amber-900/30", children: /* @__PURE__ */ jsx(Lock, { className: "w-6 h-6 text-amber-600 dark:text-amber-400" }) }) }),
9514
+ /* @__PURE__ */ jsx("h3", { className: "font-semibold text-gray-900 dark:text-gray-100", children: componentName }),
9515
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-600 dark:text-gray-400 max-w-xs", children: "This premium component is available with Pro subscription" }),
9516
+ /* @__PURE__ */ jsxs(
9517
+ Button,
9518
+ {
9519
+ size: "sm",
9520
+ className: "bg-gradient-to-r from-amber-500 to-orange-500 hover:from-amber-600 hover:to-orange-600 border-0",
9521
+ onClick: () => {
9522
+ if (typeof window !== "undefined") {
9523
+ window.location.href = "/pricing";
9524
+ }
9525
+ },
9526
+ children: [
9527
+ /* @__PURE__ */ jsx(Zap, { className: "w-4 h-4 mr-2" }),
9528
+ "Upgrade to Pro"
9529
+ ]
9530
+ }
9531
+ )
9532
+ ] })
9533
+ }
9534
+ ),
9535
+ showPreview && !isPreviewActive && /* @__PURE__ */ jsx("div", { className: "absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity duration-200", children: /* @__PURE__ */ jsx("div", { className: "bg-black/80 text-white text-xs px-2 py-1 rounded", children: "Hover to preview" }) })
9536
+ ]
9537
+ }
9538
+ );
9539
+ }
9540
+ function ProComponentWrapper({
9541
+ children,
9542
+ componentId,
9543
+ componentName,
9544
+ className,
9545
+ fallback
9546
+ }) {
9547
+ {
9548
+ return /* @__PURE__ */ jsx("div", { className, children });
9549
+ }
9550
+ }
9551
+ function ProBadge({ className }) {
9552
+ return /* @__PURE__ */ jsxs(
9553
+ Badge,
9554
+ {
9555
+ variant: "secondary",
9556
+ className: cn(
9557
+ "bg-gradient-to-r from-amber-500 to-orange-500 text-white border-0 text-xs",
9558
+ className
9559
+ ),
9560
+ children: [
9561
+ /* @__PURE__ */ jsx(Crown, { className: "w-3 h-3 mr-1" }),
9562
+ "PRO"
9563
+ ]
9564
+ }
9565
+ );
9566
+ }
9567
+ function FreeBadge({ className }) {
9568
+ return /* @__PURE__ */ jsx(
9569
+ Badge,
9570
+ {
9571
+ variant: "outline",
9572
+ className: cn("border-green-500 text-green-600 dark:text-green-400 text-xs", className),
9573
+ children: "FREE"
9574
+ }
9575
+ );
9576
+ }
9577
+ function MoonLogo({
9578
+ className,
9579
+ variant = "default",
9580
+ showText = true,
9581
+ ...props
9582
+ }) {
9583
+ const logoId = t.useId();
9584
+ const gradientId = `moon-gradient-${logoId}`;
9585
+ return /* @__PURE__ */ jsxs("div", { className: cn("moonui-theme", "flex items-center gap-2", className), children: [
9586
+ /* @__PURE__ */ jsxs(
9587
+ "svg",
9588
+ {
9589
+ width: "32",
9590
+ height: "32",
9591
+ viewBox: "0 0 32 32",
9592
+ fill: "none",
9593
+ xmlns: "http://www.w3.org/2000/svg",
9594
+ className: "flex-shrink-0",
9595
+ ...props,
9596
+ children: [
9597
+ variant === "gradient" && /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("linearGradient", { id: gradientId, x1: "0%", y1: "0%", x2: "100%", y2: "100%", children: [
9598
+ /* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: "#3B82F6" }),
9599
+ /* @__PURE__ */ jsx("stop", { offset: "50%", stopColor: "#8B5CF6" }),
9600
+ /* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: "#EC4899" })
9601
+ ] }) }),
9602
+ /* @__PURE__ */ jsx(
9603
+ "circle",
9604
+ {
9605
+ cx: "16",
9606
+ cy: "16",
9607
+ r: "14",
9608
+ fill: variant === "gradient" ? `url(#${gradientId})` : "currentColor",
9609
+ className: variant === "default" ? "fill-primary" : ""
9610
+ }
9611
+ ),
9612
+ /* @__PURE__ */ jsx(
9613
+ "circle",
9614
+ {
9615
+ cx: "22",
9616
+ cy: "10",
9617
+ r: "10",
9618
+ fill: "white",
9619
+ className: "dark:fill-background"
9620
+ }
9621
+ )
9622
+ ]
9623
+ }
9624
+ ),
9625
+ showText && /* @__PURE__ */ jsxs("span", { className: "text-xl font-bold", children: [
9626
+ /* @__PURE__ */ jsx("span", { className: "text-foreground", children: "Moon" }),
9627
+ /* @__PURE__ */ jsx("span", { className: "text-primary", children: "UI" })
9349
9628
  ] })
9350
9629
  ] });
9351
9630
  }
@@ -9380,7 +9659,7 @@ var Pagination = ({ className, ...props }) => /* @__PURE__ */ jsx(
9380
9659
  {
9381
9660
  role: "navigation",
9382
9661
  "aria-label": "pagination",
9383
- className: cn("mx-auto flex w-full justify-center", className),
9662
+ className: cn("moonui-theme", "mx-auto flex w-full justify-center", className),
9384
9663
  ...props
9385
9664
  }
9386
9665
  );
@@ -9389,12 +9668,12 @@ var PaginationContent = t.forwardRef(({ className, ...props }, ref) => /* @__PUR
9389
9668
  "ul",
9390
9669
  {
9391
9670
  ref,
9392
- className: cn("flex flex-row items-center gap-1", className),
9671
+ className: cn("moonui-theme", "flex flex-row items-center gap-1", className),
9393
9672
  ...props
9394
9673
  }
9395
9674
  ));
9396
9675
  PaginationContent.displayName = "PaginationContent";
9397
- var PaginationItem = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("li", { ref, className: cn("", className), ...props }));
9676
+ var PaginationItem = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("li", { ref, className: cn("moonui-theme", "", className), ...props }));
9398
9677
  PaginationItem.displayName = "PaginationItem";
9399
9678
  var PaginationLink = ({
9400
9679
  className,
@@ -9423,8 +9702,8 @@ var PaginationPrevious = ({
9423
9702
  PaginationLink,
9424
9703
  {
9425
9704
  "aria-label": "Go to previous page",
9426
- size: "default",
9427
- className: cn("gap-1 pl-2.5", className),
9705
+ size: "md",
9706
+ className: cn("moonui-theme", "gap-1 pl-2.5", className),
9428
9707
  ...props,
9429
9708
  children: [
9430
9709
  /* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" }),
@@ -9440,8 +9719,8 @@ var PaginationNext = ({
9440
9719
  PaginationLink,
9441
9720
  {
9442
9721
  "aria-label": "Go to next page",
9443
- size: "default",
9444
- className: cn("gap-1 pr-2.5", className),
9722
+ size: "md",
9723
+ className: cn("moonui-theme", "gap-1 pr-2.5", className),
9445
9724
  ...props,
9446
9725
  children: [
9447
9726
  /* @__PURE__ */ jsx("span", { children: "Next" }),
@@ -9457,7 +9736,7 @@ var PaginationEllipsis = ({
9457
9736
  "span",
9458
9737
  {
9459
9738
  "aria-hidden": true,
9460
- className: cn("flex h-9 w-9 items-center justify-center", className),
9739
+ className: cn("moonui-theme", "flex h-9 w-9 items-center justify-center", className),
9461
9740
  ...props,
9462
9741
  children: [
9463
9742
  /* @__PURE__ */ jsx(MoreHorizontal, { className: "h-4 w-4" }),
@@ -9466,6 +9745,141 @@ var PaginationEllipsis = ({
9466
9745
  }
9467
9746
  );
9468
9747
  PaginationEllipsis.displayName = "PaginationEllipsis";
9748
+ var countryCodes = [
9749
+ { code: "+1", country: "US", flag: "\u{1F1FA}\u{1F1F8}", name: "United States" },
9750
+ { code: "+44", country: "GB", flag: "\u{1F1EC}\u{1F1E7}", name: "United Kingdom" },
9751
+ { code: "+49", country: "DE", flag: "\u{1F1E9}\u{1F1EA}", name: "Germany" },
9752
+ { code: "+33", country: "FR", flag: "\u{1F1EB}\u{1F1F7}", name: "France" },
9753
+ { code: "+39", country: "IT", flag: "\u{1F1EE}\u{1F1F9}", name: "Italy" },
9754
+ { code: "+34", country: "ES", flag: "\u{1F1EA}\u{1F1F8}", name: "Spain" },
9755
+ { code: "+31", country: "NL", flag: "\u{1F1F3}\u{1F1F1}", name: "Netherlands" },
9756
+ { code: "+46", country: "SE", flag: "\u{1F1F8}\u{1F1EA}", name: "Sweden" },
9757
+ { code: "+47", country: "NO", flag: "\u{1F1F3}\u{1F1F4}", name: "Norway" },
9758
+ { code: "+45", country: "DK", flag: "\u{1F1E9}\u{1F1F0}", name: "Denmark" },
9759
+ { code: "+358", country: "FI", flag: "\u{1F1EB}\u{1F1EE}", name: "Finland" },
9760
+ { code: "+48", country: "PL", flag: "\u{1F1F5}\u{1F1F1}", name: "Poland" },
9761
+ { code: "+90", country: "TR", flag: "\u{1F1F9}\u{1F1F7}", name: "Turkey" },
9762
+ { code: "+86", country: "CN", flag: "\u{1F1E8}\u{1F1F3}", name: "China" },
9763
+ { code: "+81", country: "JP", flag: "\u{1F1EF}\u{1F1F5}", name: "Japan" },
9764
+ { code: "+82", country: "KR", flag: "\u{1F1F0}\u{1F1F7}", name: "South Korea" },
9765
+ { code: "+91", country: "IN", flag: "\u{1F1EE}\u{1F1F3}", name: "India" },
9766
+ { code: "+61", country: "AU", flag: "\u{1F1E6}\u{1F1FA}", name: "Australia" },
9767
+ { code: "+64", country: "NZ", flag: "\u{1F1F3}\u{1F1FF}", name: "New Zealand" },
9768
+ { code: "+27", country: "ZA", flag: "\u{1F1FF}\u{1F1E6}", name: "South Africa" },
9769
+ { code: "+55", country: "BR", flag: "\u{1F1E7}\u{1F1F7}", name: "Brazil" },
9770
+ { code: "+52", country: "MX", flag: "\u{1F1F2}\u{1F1FD}", name: "Mexico" },
9771
+ { code: "+54", country: "AR", flag: "\u{1F1E6}\u{1F1F7}", name: "Argentina" },
9772
+ { code: "+20", country: "EG", flag: "\u{1F1EA}\u{1F1EC}", name: "Egypt" },
9773
+ { code: "+966", country: "SA", flag: "\u{1F1F8}\u{1F1E6}", name: "Saudi Arabia" },
9774
+ { code: "+971", country: "AE", flag: "\u{1F1E6}\u{1F1EA}", name: "UAE" }
9775
+ ];
9776
+ var formatPhoneNumber = (value, countryCode) => {
9777
+ const cleaned = value.replace(/\D/g, "");
9778
+ switch (countryCode) {
9779
+ case "+1":
9780
+ if (cleaned.length <= 3)
9781
+ return cleaned;
9782
+ if (cleaned.length <= 6)
9783
+ return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3)}`;
9784
+ return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3, 6)}-${cleaned.slice(6, 10)}`;
9785
+ case "+44":
9786
+ if (cleaned.length <= 4)
9787
+ return cleaned;
9788
+ if (cleaned.length <= 7)
9789
+ return `${cleaned.slice(0, 4)} ${cleaned.slice(4)}`;
9790
+ return `${cleaned.slice(0, 4)} ${cleaned.slice(4, 7)} ${cleaned.slice(7, 11)}`;
9791
+ case "+90":
9792
+ if (cleaned.length <= 3)
9793
+ return cleaned;
9794
+ if (cleaned.length <= 6)
9795
+ return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3)}`;
9796
+ if (cleaned.length <= 9)
9797
+ return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3, 6)} ${cleaned.slice(6)}`;
9798
+ return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3, 6)} ${cleaned.slice(6, 8)} ${cleaned.slice(8, 10)}`;
9799
+ default:
9800
+ let formatted = "";
9801
+ for (let i = 0; i < cleaned.length; i++) {
9802
+ if (i > 0 && i % 3 === 0)
9803
+ formatted += " ";
9804
+ formatted += cleaned[i];
9805
+ }
9806
+ return formatted;
9807
+ }
9808
+ };
9809
+ var getMaxLength = (countryCode) => {
9810
+ switch (countryCode) {
9811
+ case "+1":
9812
+ return 10;
9813
+ case "+44":
9814
+ return 11;
9815
+ case "+90":
9816
+ return 10;
9817
+ default:
9818
+ return 15;
9819
+ }
9820
+ };
9821
+ var PhoneInput = t.forwardRef(
9822
+ ({
9823
+ className,
9824
+ value = "",
9825
+ onChange,
9826
+ defaultCountry = "+1",
9827
+ showIcon = true,
9828
+ showCountrySelect = true,
9829
+ countries = countryCodes,
9830
+ size,
9831
+ ...props
9832
+ }, ref) => {
9833
+ const [countryCode, setCountryCode] = t.useState(defaultCountry);
9834
+ const [phoneNumber, setPhoneNumber] = t.useState(value);
9835
+ const selectedCountry = countries.find((c) => c.code === countryCode) || countries[0];
9836
+ const handlePhoneChange = (e) => {
9837
+ const rawValue = e.target.value.replace(/\D/g, "");
9838
+ const maxLength = getMaxLength(countryCode);
9839
+ const truncated = rawValue.slice(0, maxLength);
9840
+ const formatted = formatPhoneNumber(truncated, countryCode);
9841
+ setPhoneNumber(truncated);
9842
+ onChange?.(truncated, countryCode);
9843
+ e.target.value = formatted;
9844
+ };
9845
+ const handleCountryChange = (newCountryCode) => {
9846
+ setCountryCode(newCountryCode);
9847
+ onChange?.(phoneNumber, newCountryCode);
9848
+ };
9849
+ const formattedValue = formatPhoneNumber(phoneNumber, countryCode);
9850
+ return /* @__PURE__ */ jsxs("div", { className: cn("relative flex gap-2", className), children: [
9851
+ showCountrySelect && /* @__PURE__ */ jsxs(Select, { value: countryCode, onValueChange: handleCountryChange, children: [
9852
+ /* @__PURE__ */ jsx(SelectTrigger, { className: "w-[120px]", children: /* @__PURE__ */ jsx(SelectValue, { children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
9853
+ /* @__PURE__ */ jsx("span", { children: selectedCountry.flag }),
9854
+ /* @__PURE__ */ jsx("span", { children: selectedCountry.code })
9855
+ ] }) }) }),
9856
+ /* @__PURE__ */ jsx(SelectContent, { children: countries.map((country) => /* @__PURE__ */ jsx(SelectItem, { value: country.code, children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
9857
+ /* @__PURE__ */ jsx("span", { children: country.flag }),
9858
+ /* @__PURE__ */ jsx("span", { children: country.code }),
9859
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: country.name })
9860
+ ] }) }, country.code)) })
9861
+ ] }),
9862
+ /* @__PURE__ */ jsxs("div", { className: "relative flex-1", children: [
9863
+ /* @__PURE__ */ jsx(
9864
+ Input,
9865
+ {
9866
+ ref,
9867
+ type: "tel",
9868
+ inputMode: "numeric",
9869
+ autoComplete: "tel",
9870
+ placeholder: countryCode === "+1" ? "(555) 123-4567" : "123 456 789",
9871
+ value: formattedValue,
9872
+ onChange: handlePhoneChange,
9873
+ className: cn(showIcon && "pl-10", className),
9874
+ ...props
9875
+ }
9876
+ ),
9877
+ showIcon && /* @__PURE__ */ jsx(Phone, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" })
9878
+ ] })
9879
+ ] });
9880
+ }
9881
+ );
9882
+ PhoneInput.displayName = "PhoneInput";
9469
9883
  var radioGroupItemVariants = cva(
9470
9884
  "aspect-square border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
9471
9885
  {
@@ -9496,7 +9910,7 @@ var RadioGroup2 = t.forwardRef(
9496
9910
  {
9497
9911
  ref,
9498
9912
  role: "radiogroup",
9499
- className: cn("grid gap-2", className),
9913
+ className: cn("moonui-theme", "grid gap-2", className),
9500
9914
  ...props
9501
9915
  }
9502
9916
  ) });
@@ -9655,6 +10069,767 @@ function RichTextEditor({
9655
10069
  )
9656
10070
  ] });
9657
10071
  }
10072
+ function useCallbackRef(callback) {
10073
+ const callbackRef = t.useRef(callback);
10074
+ t.useEffect(() => {
10075
+ callbackRef.current = callback;
10076
+ });
10077
+ return t.useMemo(() => (...args) => callbackRef.current?.(...args), []);
10078
+ }
10079
+ var DirectionContext = t.createContext(void 0);
10080
+ function useDirection(localDir) {
10081
+ const globalDir = t.useContext(DirectionContext);
10082
+ return localDir || globalDir || "ltr";
10083
+ }
10084
+
10085
+ // ../../node_modules/@radix-ui/number/dist/index.mjs
10086
+ function clamp(value, [min2, max2]) {
10087
+ return Math.min(max2, Math.max(min2, value));
10088
+ }
10089
+ function useStateMachine2(initialState, machine) {
10090
+ return t.useReducer((state, event) => {
10091
+ const nextState = machine[state][event];
10092
+ return nextState ?? state;
10093
+ }, initialState);
10094
+ }
10095
+ var SCROLL_AREA_NAME = "ScrollArea";
10096
+ var [createScrollAreaContext, createScrollAreaScope] = createContextScope(SCROLL_AREA_NAME);
10097
+ var [ScrollAreaProvider, useScrollAreaContext] = createScrollAreaContext(SCROLL_AREA_NAME);
10098
+ var ScrollArea = t.forwardRef(
10099
+ (props, forwardedRef) => {
10100
+ const {
10101
+ __scopeScrollArea,
10102
+ type = "hover",
10103
+ dir,
10104
+ scrollHideDelay = 600,
10105
+ ...scrollAreaProps
10106
+ } = props;
10107
+ const [scrollArea, setScrollArea] = t.useState(null);
10108
+ const [viewport, setViewport] = t.useState(null);
10109
+ const [content, setContent] = t.useState(null);
10110
+ const [scrollbarX, setScrollbarX] = t.useState(null);
10111
+ const [scrollbarY, setScrollbarY] = t.useState(null);
10112
+ const [cornerWidth, setCornerWidth] = t.useState(0);
10113
+ const [cornerHeight, setCornerHeight] = t.useState(0);
10114
+ const [scrollbarXEnabled, setScrollbarXEnabled] = t.useState(false);
10115
+ const [scrollbarYEnabled, setScrollbarYEnabled] = t.useState(false);
10116
+ const composedRefs = useComposedRefs(forwardedRef, (node) => setScrollArea(node));
10117
+ const direction = useDirection(dir);
10118
+ return /* @__PURE__ */ jsx(
10119
+ ScrollAreaProvider,
10120
+ {
10121
+ scope: __scopeScrollArea,
10122
+ type,
10123
+ dir: direction,
10124
+ scrollHideDelay,
10125
+ scrollArea,
10126
+ viewport,
10127
+ onViewportChange: setViewport,
10128
+ content,
10129
+ onContentChange: setContent,
10130
+ scrollbarX,
10131
+ onScrollbarXChange: setScrollbarX,
10132
+ scrollbarXEnabled,
10133
+ onScrollbarXEnabledChange: setScrollbarXEnabled,
10134
+ scrollbarY,
10135
+ onScrollbarYChange: setScrollbarY,
10136
+ scrollbarYEnabled,
10137
+ onScrollbarYEnabledChange: setScrollbarYEnabled,
10138
+ onCornerWidthChange: setCornerWidth,
10139
+ onCornerHeightChange: setCornerHeight,
10140
+ children: /* @__PURE__ */ jsx(
10141
+ Primitive.div,
10142
+ {
10143
+ dir: direction,
10144
+ ...scrollAreaProps,
10145
+ ref: composedRefs,
10146
+ style: {
10147
+ position: "relative",
10148
+ // Pass corner sizes as CSS vars to reduce re-renders of context consumers
10149
+ ["--radix-scroll-area-corner-width"]: cornerWidth + "px",
10150
+ ["--radix-scroll-area-corner-height"]: cornerHeight + "px",
10151
+ ...props.style
10152
+ }
10153
+ }
10154
+ )
10155
+ }
10156
+ );
10157
+ }
10158
+ );
10159
+ ScrollArea.displayName = SCROLL_AREA_NAME;
10160
+ var VIEWPORT_NAME = "ScrollAreaViewport";
10161
+ var ScrollAreaViewport = t.forwardRef(
10162
+ (props, forwardedRef) => {
10163
+ const { __scopeScrollArea, children, nonce, ...viewportProps } = props;
10164
+ const context = useScrollAreaContext(VIEWPORT_NAME, __scopeScrollArea);
10165
+ const ref = t.useRef(null);
10166
+ const composedRefs = useComposedRefs(forwardedRef, ref, context.onViewportChange);
10167
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
10168
+ /* @__PURE__ */ jsx(
10169
+ "style",
10170
+ {
10171
+ dangerouslySetInnerHTML: {
10172
+ __html: `[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}`
10173
+ },
10174
+ nonce
10175
+ }
10176
+ ),
10177
+ /* @__PURE__ */ jsx(
10178
+ Primitive.div,
10179
+ {
10180
+ "data-radix-scroll-area-viewport": "",
10181
+ ...viewportProps,
10182
+ ref: composedRefs,
10183
+ style: {
10184
+ /**
10185
+ * We don't support `visible` because the intention is to have at least one scrollbar
10186
+ * if this component is used and `visible` will behave like `auto` in that case
10187
+ * https://developer.mozilla.org/en-US/docs/Web/CSS/overflow#description
10188
+ *
10189
+ * We don't handle `auto` because the intention is for the native implementation
10190
+ * to be hidden if using this component. We just want to ensure the node is scrollable
10191
+ * so could have used either `scroll` or `auto` here. We picked `scroll` to prevent
10192
+ * the browser from having to work out whether to render native scrollbars or not,
10193
+ * we tell it to with the intention of hiding them in CSS.
10194
+ */
10195
+ overflowX: context.scrollbarXEnabled ? "scroll" : "hidden",
10196
+ overflowY: context.scrollbarYEnabled ? "scroll" : "hidden",
10197
+ ...props.style
10198
+ },
10199
+ children: /* @__PURE__ */ jsx("div", { ref: context.onContentChange, style: { minWidth: "100%", display: "table" }, children })
10200
+ }
10201
+ )
10202
+ ] });
10203
+ }
10204
+ );
10205
+ ScrollAreaViewport.displayName = VIEWPORT_NAME;
10206
+ var SCROLLBAR_NAME = "ScrollAreaScrollbar";
10207
+ var ScrollAreaScrollbar = t.forwardRef(
10208
+ (props, forwardedRef) => {
10209
+ const { forceMount, ...scrollbarProps } = props;
10210
+ const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
10211
+ const { onScrollbarXEnabledChange, onScrollbarYEnabledChange } = context;
10212
+ const isHorizontal = props.orientation === "horizontal";
10213
+ t.useEffect(() => {
10214
+ isHorizontal ? onScrollbarXEnabledChange(true) : onScrollbarYEnabledChange(true);
10215
+ return () => {
10216
+ isHorizontal ? onScrollbarXEnabledChange(false) : onScrollbarYEnabledChange(false);
10217
+ };
10218
+ }, [isHorizontal, onScrollbarXEnabledChange, onScrollbarYEnabledChange]);
10219
+ return context.type === "hover" ? /* @__PURE__ */ jsx(ScrollAreaScrollbarHover, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === "scroll" ? /* @__PURE__ */ jsx(ScrollAreaScrollbarScroll, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === "auto" ? /* @__PURE__ */ jsx(ScrollAreaScrollbarAuto, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === "always" ? /* @__PURE__ */ jsx(ScrollAreaScrollbarVisible, { ...scrollbarProps, ref: forwardedRef }) : null;
10220
+ }
10221
+ );
10222
+ ScrollAreaScrollbar.displayName = SCROLLBAR_NAME;
10223
+ var ScrollAreaScrollbarHover = t.forwardRef((props, forwardedRef) => {
10224
+ const { forceMount, ...scrollbarProps } = props;
10225
+ const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
10226
+ const [visible, setVisible] = t.useState(false);
10227
+ t.useEffect(() => {
10228
+ const scrollArea = context.scrollArea;
10229
+ let hideTimer = 0;
10230
+ if (scrollArea) {
10231
+ const handlePointerEnter = () => {
10232
+ window.clearTimeout(hideTimer);
10233
+ setVisible(true);
10234
+ };
10235
+ const handlePointerLeave = () => {
10236
+ hideTimer = window.setTimeout(() => setVisible(false), context.scrollHideDelay);
10237
+ };
10238
+ scrollArea.addEventListener("pointerenter", handlePointerEnter);
10239
+ scrollArea.addEventListener("pointerleave", handlePointerLeave);
10240
+ return () => {
10241
+ window.clearTimeout(hideTimer);
10242
+ scrollArea.removeEventListener("pointerenter", handlePointerEnter);
10243
+ scrollArea.removeEventListener("pointerleave", handlePointerLeave);
10244
+ };
10245
+ }
10246
+ }, [context.scrollArea, context.scrollHideDelay]);
10247
+ return /* @__PURE__ */ jsx(Presence, { present: forceMount || visible, children: /* @__PURE__ */ jsx(
10248
+ ScrollAreaScrollbarAuto,
10249
+ {
10250
+ "data-state": visible ? "visible" : "hidden",
10251
+ ...scrollbarProps,
10252
+ ref: forwardedRef
10253
+ }
10254
+ ) });
10255
+ });
10256
+ var ScrollAreaScrollbarScroll = t.forwardRef((props, forwardedRef) => {
10257
+ const { forceMount, ...scrollbarProps } = props;
10258
+ const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
10259
+ const isHorizontal = props.orientation === "horizontal";
10260
+ const debounceScrollEnd = useDebounceCallback(() => send("SCROLL_END"), 100);
10261
+ const [state, send] = useStateMachine2("hidden", {
10262
+ hidden: {
10263
+ SCROLL: "scrolling"
10264
+ },
10265
+ scrolling: {
10266
+ SCROLL_END: "idle",
10267
+ POINTER_ENTER: "interacting"
10268
+ },
10269
+ interacting: {
10270
+ SCROLL: "interacting",
10271
+ POINTER_LEAVE: "idle"
10272
+ },
10273
+ idle: {
10274
+ HIDE: "hidden",
10275
+ SCROLL: "scrolling",
10276
+ POINTER_ENTER: "interacting"
10277
+ }
10278
+ });
10279
+ t.useEffect(() => {
10280
+ if (state === "idle") {
10281
+ const hideTimer = window.setTimeout(() => send("HIDE"), context.scrollHideDelay);
10282
+ return () => window.clearTimeout(hideTimer);
10283
+ }
10284
+ }, [state, context.scrollHideDelay, send]);
10285
+ t.useEffect(() => {
10286
+ const viewport = context.viewport;
10287
+ const scrollDirection = isHorizontal ? "scrollLeft" : "scrollTop";
10288
+ if (viewport) {
10289
+ let prevScrollPos = viewport[scrollDirection];
10290
+ const handleScroll = () => {
10291
+ const scrollPos = viewport[scrollDirection];
10292
+ const hasScrollInDirectionChanged = prevScrollPos !== scrollPos;
10293
+ if (hasScrollInDirectionChanged) {
10294
+ send("SCROLL");
10295
+ debounceScrollEnd();
10296
+ }
10297
+ prevScrollPos = scrollPos;
10298
+ };
10299
+ viewport.addEventListener("scroll", handleScroll);
10300
+ return () => viewport.removeEventListener("scroll", handleScroll);
10301
+ }
10302
+ }, [context.viewport, isHorizontal, send, debounceScrollEnd]);
10303
+ return /* @__PURE__ */ jsx(Presence, { present: forceMount || state !== "hidden", children: /* @__PURE__ */ jsx(
10304
+ ScrollAreaScrollbarVisible,
10305
+ {
10306
+ "data-state": state === "hidden" ? "hidden" : "visible",
10307
+ ...scrollbarProps,
10308
+ ref: forwardedRef,
10309
+ onPointerEnter: composeEventHandlers(props.onPointerEnter, () => send("POINTER_ENTER")),
10310
+ onPointerLeave: composeEventHandlers(props.onPointerLeave, () => send("POINTER_LEAVE"))
10311
+ }
10312
+ ) });
10313
+ });
10314
+ var ScrollAreaScrollbarAuto = t.forwardRef((props, forwardedRef) => {
10315
+ const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
10316
+ const { forceMount, ...scrollbarProps } = props;
10317
+ const [visible, setVisible] = t.useState(false);
10318
+ const isHorizontal = props.orientation === "horizontal";
10319
+ const handleResize = useDebounceCallback(() => {
10320
+ if (context.viewport) {
10321
+ const isOverflowX = context.viewport.offsetWidth < context.viewport.scrollWidth;
10322
+ const isOverflowY = context.viewport.offsetHeight < context.viewport.scrollHeight;
10323
+ setVisible(isHorizontal ? isOverflowX : isOverflowY);
10324
+ }
10325
+ }, 10);
10326
+ useResizeObserver(context.viewport, handleResize);
10327
+ useResizeObserver(context.content, handleResize);
10328
+ return /* @__PURE__ */ jsx(Presence, { present: forceMount || visible, children: /* @__PURE__ */ jsx(
10329
+ ScrollAreaScrollbarVisible,
10330
+ {
10331
+ "data-state": visible ? "visible" : "hidden",
10332
+ ...scrollbarProps,
10333
+ ref: forwardedRef
10334
+ }
10335
+ ) });
10336
+ });
10337
+ var ScrollAreaScrollbarVisible = t.forwardRef((props, forwardedRef) => {
10338
+ const { orientation = "vertical", ...scrollbarProps } = props;
10339
+ const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
10340
+ const thumbRef = t.useRef(null);
10341
+ const pointerOffsetRef = t.useRef(0);
10342
+ const [sizes, setSizes] = t.useState({
10343
+ content: 0,
10344
+ viewport: 0,
10345
+ scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
10346
+ });
10347
+ const thumbRatio = getThumbRatio(sizes.viewport, sizes.content);
10348
+ const commonProps = {
10349
+ ...scrollbarProps,
10350
+ sizes,
10351
+ onSizesChange: setSizes,
10352
+ hasThumb: Boolean(thumbRatio > 0 && thumbRatio < 1),
10353
+ onThumbChange: (thumb) => thumbRef.current = thumb,
10354
+ onThumbPointerUp: () => pointerOffsetRef.current = 0,
10355
+ onThumbPointerDown: (pointerPos) => pointerOffsetRef.current = pointerPos
10356
+ };
10357
+ function getScrollPosition(pointerPos, dir) {
10358
+ return getScrollPositionFromPointer(pointerPos, pointerOffsetRef.current, sizes, dir);
10359
+ }
10360
+ if (orientation === "horizontal") {
10361
+ return /* @__PURE__ */ jsx(
10362
+ ScrollAreaScrollbarX,
10363
+ {
10364
+ ...commonProps,
10365
+ ref: forwardedRef,
10366
+ onThumbPositionChange: () => {
10367
+ if (context.viewport && thumbRef.current) {
10368
+ const scrollPos = context.viewport.scrollLeft;
10369
+ const offset = getThumbOffsetFromScroll(scrollPos, sizes, context.dir);
10370
+ thumbRef.current.style.transform = `translate3d(${offset}px, 0, 0)`;
10371
+ }
10372
+ },
10373
+ onWheelScroll: (scrollPos) => {
10374
+ if (context.viewport)
10375
+ context.viewport.scrollLeft = scrollPos;
10376
+ },
10377
+ onDragScroll: (pointerPos) => {
10378
+ if (context.viewport) {
10379
+ context.viewport.scrollLeft = getScrollPosition(pointerPos, context.dir);
10380
+ }
10381
+ }
10382
+ }
10383
+ );
10384
+ }
10385
+ if (orientation === "vertical") {
10386
+ return /* @__PURE__ */ jsx(
10387
+ ScrollAreaScrollbarY,
10388
+ {
10389
+ ...commonProps,
10390
+ ref: forwardedRef,
10391
+ onThumbPositionChange: () => {
10392
+ if (context.viewport && thumbRef.current) {
10393
+ const scrollPos = context.viewport.scrollTop;
10394
+ const offset = getThumbOffsetFromScroll(scrollPos, sizes);
10395
+ thumbRef.current.style.transform = `translate3d(0, ${offset}px, 0)`;
10396
+ }
10397
+ },
10398
+ onWheelScroll: (scrollPos) => {
10399
+ if (context.viewport)
10400
+ context.viewport.scrollTop = scrollPos;
10401
+ },
10402
+ onDragScroll: (pointerPos) => {
10403
+ if (context.viewport)
10404
+ context.viewport.scrollTop = getScrollPosition(pointerPos);
10405
+ }
10406
+ }
10407
+ );
10408
+ }
10409
+ return null;
10410
+ });
10411
+ var ScrollAreaScrollbarX = t.forwardRef((props, forwardedRef) => {
10412
+ const { sizes, onSizesChange, ...scrollbarProps } = props;
10413
+ const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
10414
+ const [computedStyle, setComputedStyle] = t.useState();
10415
+ const ref = t.useRef(null);
10416
+ const composeRefs2 = useComposedRefs(forwardedRef, ref, context.onScrollbarXChange);
10417
+ t.useEffect(() => {
10418
+ if (ref.current)
10419
+ setComputedStyle(getComputedStyle(ref.current));
10420
+ }, [ref]);
10421
+ return /* @__PURE__ */ jsx(
10422
+ ScrollAreaScrollbarImpl,
10423
+ {
10424
+ "data-orientation": "horizontal",
10425
+ ...scrollbarProps,
10426
+ ref: composeRefs2,
10427
+ sizes,
10428
+ style: {
10429
+ bottom: 0,
10430
+ left: context.dir === "rtl" ? "var(--radix-scroll-area-corner-width)" : 0,
10431
+ right: context.dir === "ltr" ? "var(--radix-scroll-area-corner-width)" : 0,
10432
+ ["--radix-scroll-area-thumb-width"]: getThumbSize(sizes) + "px",
10433
+ ...props.style
10434
+ },
10435
+ onThumbPointerDown: (pointerPos) => props.onThumbPointerDown(pointerPos.x),
10436
+ onDragScroll: (pointerPos) => props.onDragScroll(pointerPos.x),
10437
+ onWheelScroll: (event, maxScrollPos) => {
10438
+ if (context.viewport) {
10439
+ const scrollPos = context.viewport.scrollLeft + event.deltaX;
10440
+ props.onWheelScroll(scrollPos);
10441
+ if (isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos)) {
10442
+ event.preventDefault();
10443
+ }
10444
+ }
10445
+ },
10446
+ onResize: () => {
10447
+ if (ref.current && context.viewport && computedStyle) {
10448
+ onSizesChange({
10449
+ content: context.viewport.scrollWidth,
10450
+ viewport: context.viewport.offsetWidth,
10451
+ scrollbar: {
10452
+ size: ref.current.clientWidth,
10453
+ paddingStart: toInt(computedStyle.paddingLeft),
10454
+ paddingEnd: toInt(computedStyle.paddingRight)
10455
+ }
10456
+ });
10457
+ }
10458
+ }
10459
+ }
10460
+ );
10461
+ });
10462
+ var ScrollAreaScrollbarY = t.forwardRef((props, forwardedRef) => {
10463
+ const { sizes, onSizesChange, ...scrollbarProps } = props;
10464
+ const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
10465
+ const [computedStyle, setComputedStyle] = t.useState();
10466
+ const ref = t.useRef(null);
10467
+ const composeRefs2 = useComposedRefs(forwardedRef, ref, context.onScrollbarYChange);
10468
+ t.useEffect(() => {
10469
+ if (ref.current)
10470
+ setComputedStyle(getComputedStyle(ref.current));
10471
+ }, [ref]);
10472
+ return /* @__PURE__ */ jsx(
10473
+ ScrollAreaScrollbarImpl,
10474
+ {
10475
+ "data-orientation": "vertical",
10476
+ ...scrollbarProps,
10477
+ ref: composeRefs2,
10478
+ sizes,
10479
+ style: {
10480
+ top: 0,
10481
+ right: context.dir === "ltr" ? 0 : void 0,
10482
+ left: context.dir === "rtl" ? 0 : void 0,
10483
+ bottom: "var(--radix-scroll-area-corner-height)",
10484
+ ["--radix-scroll-area-thumb-height"]: getThumbSize(sizes) + "px",
10485
+ ...props.style
10486
+ },
10487
+ onThumbPointerDown: (pointerPos) => props.onThumbPointerDown(pointerPos.y),
10488
+ onDragScroll: (pointerPos) => props.onDragScroll(pointerPos.y),
10489
+ onWheelScroll: (event, maxScrollPos) => {
10490
+ if (context.viewport) {
10491
+ const scrollPos = context.viewport.scrollTop + event.deltaY;
10492
+ props.onWheelScroll(scrollPos);
10493
+ if (isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos)) {
10494
+ event.preventDefault();
10495
+ }
10496
+ }
10497
+ },
10498
+ onResize: () => {
10499
+ if (ref.current && context.viewport && computedStyle) {
10500
+ onSizesChange({
10501
+ content: context.viewport.scrollHeight,
10502
+ viewport: context.viewport.offsetHeight,
10503
+ scrollbar: {
10504
+ size: ref.current.clientHeight,
10505
+ paddingStart: toInt(computedStyle.paddingTop),
10506
+ paddingEnd: toInt(computedStyle.paddingBottom)
10507
+ }
10508
+ });
10509
+ }
10510
+ }
10511
+ }
10512
+ );
10513
+ });
10514
+ var [ScrollbarProvider, useScrollbarContext] = createScrollAreaContext(SCROLLBAR_NAME);
10515
+ var ScrollAreaScrollbarImpl = t.forwardRef((props, forwardedRef) => {
10516
+ const {
10517
+ __scopeScrollArea,
10518
+ sizes,
10519
+ hasThumb,
10520
+ onThumbChange,
10521
+ onThumbPointerUp,
10522
+ onThumbPointerDown,
10523
+ onThumbPositionChange,
10524
+ onDragScroll,
10525
+ onWheelScroll,
10526
+ onResize,
10527
+ ...scrollbarProps
10528
+ } = props;
10529
+ const context = useScrollAreaContext(SCROLLBAR_NAME, __scopeScrollArea);
10530
+ const [scrollbar, setScrollbar] = t.useState(null);
10531
+ const composeRefs2 = useComposedRefs(forwardedRef, (node) => setScrollbar(node));
10532
+ const rectRef = t.useRef(null);
10533
+ const prevWebkitUserSelectRef = t.useRef("");
10534
+ const viewport = context.viewport;
10535
+ const maxScrollPos = sizes.content - sizes.viewport;
10536
+ const handleWheelScroll = useCallbackRef(onWheelScroll);
10537
+ const handleThumbPositionChange = useCallbackRef(onThumbPositionChange);
10538
+ const handleResize = useDebounceCallback(onResize, 10);
10539
+ function handleDragScroll(event) {
10540
+ if (rectRef.current) {
10541
+ const x = event.clientX - rectRef.current.left;
10542
+ const y = event.clientY - rectRef.current.top;
10543
+ onDragScroll({ x, y });
10544
+ }
10545
+ }
10546
+ t.useEffect(() => {
10547
+ const handleWheel = (event) => {
10548
+ const element = event.target;
10549
+ const isScrollbarWheel = scrollbar?.contains(element);
10550
+ if (isScrollbarWheel)
10551
+ handleWheelScroll(event, maxScrollPos);
10552
+ };
10553
+ document.addEventListener("wheel", handleWheel, { passive: false });
10554
+ return () => document.removeEventListener("wheel", handleWheel, { passive: false });
10555
+ }, [viewport, scrollbar, maxScrollPos, handleWheelScroll]);
10556
+ t.useEffect(handleThumbPositionChange, [sizes, handleThumbPositionChange]);
10557
+ useResizeObserver(scrollbar, handleResize);
10558
+ useResizeObserver(context.content, handleResize);
10559
+ return /* @__PURE__ */ jsx(
10560
+ ScrollbarProvider,
10561
+ {
10562
+ scope: __scopeScrollArea,
10563
+ scrollbar,
10564
+ hasThumb,
10565
+ onThumbChange: useCallbackRef(onThumbChange),
10566
+ onThumbPointerUp: useCallbackRef(onThumbPointerUp),
10567
+ onThumbPositionChange: handleThumbPositionChange,
10568
+ onThumbPointerDown: useCallbackRef(onThumbPointerDown),
10569
+ children: /* @__PURE__ */ jsx(
10570
+ Primitive.div,
10571
+ {
10572
+ ...scrollbarProps,
10573
+ ref: composeRefs2,
10574
+ style: { position: "absolute", ...scrollbarProps.style },
10575
+ onPointerDown: composeEventHandlers(props.onPointerDown, (event) => {
10576
+ const mainPointer = 0;
10577
+ if (event.button === mainPointer) {
10578
+ const element = event.target;
10579
+ element.setPointerCapture(event.pointerId);
10580
+ rectRef.current = scrollbar.getBoundingClientRect();
10581
+ prevWebkitUserSelectRef.current = document.body.style.webkitUserSelect;
10582
+ document.body.style.webkitUserSelect = "none";
10583
+ if (context.viewport)
10584
+ context.viewport.style.scrollBehavior = "auto";
10585
+ handleDragScroll(event);
10586
+ }
10587
+ }),
10588
+ onPointerMove: composeEventHandlers(props.onPointerMove, handleDragScroll),
10589
+ onPointerUp: composeEventHandlers(props.onPointerUp, (event) => {
10590
+ const element = event.target;
10591
+ if (element.hasPointerCapture(event.pointerId)) {
10592
+ element.releasePointerCapture(event.pointerId);
10593
+ }
10594
+ document.body.style.webkitUserSelect = prevWebkitUserSelectRef.current;
10595
+ if (context.viewport)
10596
+ context.viewport.style.scrollBehavior = "";
10597
+ rectRef.current = null;
10598
+ })
10599
+ }
10600
+ )
10601
+ }
10602
+ );
10603
+ });
10604
+ var THUMB_NAME = "ScrollAreaThumb";
10605
+ var ScrollAreaThumb = t.forwardRef(
10606
+ (props, forwardedRef) => {
10607
+ const { forceMount, ...thumbProps } = props;
10608
+ const scrollbarContext = useScrollbarContext(THUMB_NAME, props.__scopeScrollArea);
10609
+ return /* @__PURE__ */ jsx(Presence, { present: forceMount || scrollbarContext.hasThumb, children: /* @__PURE__ */ jsx(ScrollAreaThumbImpl, { ref: forwardedRef, ...thumbProps }) });
10610
+ }
10611
+ );
10612
+ var ScrollAreaThumbImpl = t.forwardRef(
10613
+ (props, forwardedRef) => {
10614
+ const { __scopeScrollArea, style, ...thumbProps } = props;
10615
+ const scrollAreaContext = useScrollAreaContext(THUMB_NAME, __scopeScrollArea);
10616
+ const scrollbarContext = useScrollbarContext(THUMB_NAME, __scopeScrollArea);
10617
+ const { onThumbPositionChange } = scrollbarContext;
10618
+ const composedRef = useComposedRefs(
10619
+ forwardedRef,
10620
+ (node) => scrollbarContext.onThumbChange(node)
10621
+ );
10622
+ const removeUnlinkedScrollListenerRef = t.useRef(void 0);
10623
+ const debounceScrollEnd = useDebounceCallback(() => {
10624
+ if (removeUnlinkedScrollListenerRef.current) {
10625
+ removeUnlinkedScrollListenerRef.current();
10626
+ removeUnlinkedScrollListenerRef.current = void 0;
10627
+ }
10628
+ }, 100);
10629
+ t.useEffect(() => {
10630
+ const viewport = scrollAreaContext.viewport;
10631
+ if (viewport) {
10632
+ const handleScroll = () => {
10633
+ debounceScrollEnd();
10634
+ if (!removeUnlinkedScrollListenerRef.current) {
10635
+ const listener = addUnlinkedScrollListener(viewport, onThumbPositionChange);
10636
+ removeUnlinkedScrollListenerRef.current = listener;
10637
+ onThumbPositionChange();
10638
+ }
10639
+ };
10640
+ onThumbPositionChange();
10641
+ viewport.addEventListener("scroll", handleScroll);
10642
+ return () => viewport.removeEventListener("scroll", handleScroll);
10643
+ }
10644
+ }, [scrollAreaContext.viewport, debounceScrollEnd, onThumbPositionChange]);
10645
+ return /* @__PURE__ */ jsx(
10646
+ Primitive.div,
10647
+ {
10648
+ "data-state": scrollbarContext.hasThumb ? "visible" : "hidden",
10649
+ ...thumbProps,
10650
+ ref: composedRef,
10651
+ style: {
10652
+ width: "var(--radix-scroll-area-thumb-width)",
10653
+ height: "var(--radix-scroll-area-thumb-height)",
10654
+ ...style
10655
+ },
10656
+ onPointerDownCapture: composeEventHandlers(props.onPointerDownCapture, (event) => {
10657
+ const thumb = event.target;
10658
+ const thumbRect = thumb.getBoundingClientRect();
10659
+ const x = event.clientX - thumbRect.left;
10660
+ const y = event.clientY - thumbRect.top;
10661
+ scrollbarContext.onThumbPointerDown({ x, y });
10662
+ }),
10663
+ onPointerUp: composeEventHandlers(props.onPointerUp, scrollbarContext.onThumbPointerUp)
10664
+ }
10665
+ );
10666
+ }
10667
+ );
10668
+ ScrollAreaThumb.displayName = THUMB_NAME;
10669
+ var CORNER_NAME = "ScrollAreaCorner";
10670
+ var ScrollAreaCorner = t.forwardRef(
10671
+ (props, forwardedRef) => {
10672
+ const context = useScrollAreaContext(CORNER_NAME, props.__scopeScrollArea);
10673
+ const hasBothScrollbarsVisible = Boolean(context.scrollbarX && context.scrollbarY);
10674
+ const hasCorner = context.type !== "scroll" && hasBothScrollbarsVisible;
10675
+ return hasCorner ? /* @__PURE__ */ jsx(ScrollAreaCornerImpl, { ...props, ref: forwardedRef }) : null;
10676
+ }
10677
+ );
10678
+ ScrollAreaCorner.displayName = CORNER_NAME;
10679
+ var ScrollAreaCornerImpl = t.forwardRef((props, forwardedRef) => {
10680
+ const { __scopeScrollArea, ...cornerProps } = props;
10681
+ const context = useScrollAreaContext(CORNER_NAME, __scopeScrollArea);
10682
+ const [width, setWidth] = t.useState(0);
10683
+ const [height, setHeight] = t.useState(0);
10684
+ const hasSize = Boolean(width && height);
10685
+ useResizeObserver(context.scrollbarX, () => {
10686
+ const height2 = context.scrollbarX?.offsetHeight || 0;
10687
+ context.onCornerHeightChange(height2);
10688
+ setHeight(height2);
10689
+ });
10690
+ useResizeObserver(context.scrollbarY, () => {
10691
+ const width2 = context.scrollbarY?.offsetWidth || 0;
10692
+ context.onCornerWidthChange(width2);
10693
+ setWidth(width2);
10694
+ });
10695
+ return hasSize ? /* @__PURE__ */ jsx(
10696
+ Primitive.div,
10697
+ {
10698
+ ...cornerProps,
10699
+ ref: forwardedRef,
10700
+ style: {
10701
+ width,
10702
+ height,
10703
+ position: "absolute",
10704
+ right: context.dir === "ltr" ? 0 : void 0,
10705
+ left: context.dir === "rtl" ? 0 : void 0,
10706
+ bottom: 0,
10707
+ ...props.style
10708
+ }
10709
+ }
10710
+ ) : null;
10711
+ });
10712
+ function toInt(value) {
10713
+ return value ? parseInt(value, 10) : 0;
10714
+ }
10715
+ function getThumbRatio(viewportSize, contentSize) {
10716
+ const ratio = viewportSize / contentSize;
10717
+ return isNaN(ratio) ? 0 : ratio;
10718
+ }
10719
+ function getThumbSize(sizes) {
10720
+ const ratio = getThumbRatio(sizes.viewport, sizes.content);
10721
+ const scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd;
10722
+ const thumbSize = (sizes.scrollbar.size - scrollbarPadding) * ratio;
10723
+ return Math.max(thumbSize, 18);
10724
+ }
10725
+ function getScrollPositionFromPointer(pointerPos, pointerOffset, sizes, dir = "ltr") {
10726
+ const thumbSizePx = getThumbSize(sizes);
10727
+ const thumbCenter = thumbSizePx / 2;
10728
+ const offset = pointerOffset || thumbCenter;
10729
+ const thumbOffsetFromEnd = thumbSizePx - offset;
10730
+ const minPointerPos = sizes.scrollbar.paddingStart + offset;
10731
+ const maxPointerPos = sizes.scrollbar.size - sizes.scrollbar.paddingEnd - thumbOffsetFromEnd;
10732
+ const maxScrollPos = sizes.content - sizes.viewport;
10733
+ const scrollRange = dir === "ltr" ? [0, maxScrollPos] : [maxScrollPos * -1, 0];
10734
+ const interpolate = linearScale([minPointerPos, maxPointerPos], scrollRange);
10735
+ return interpolate(pointerPos);
10736
+ }
10737
+ function getThumbOffsetFromScroll(scrollPos, sizes, dir = "ltr") {
10738
+ const thumbSizePx = getThumbSize(sizes);
10739
+ const scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd;
10740
+ const scrollbar = sizes.scrollbar.size - scrollbarPadding;
10741
+ const maxScrollPos = sizes.content - sizes.viewport;
10742
+ const maxThumbPos = scrollbar - thumbSizePx;
10743
+ const scrollClampRange = dir === "ltr" ? [0, maxScrollPos] : [maxScrollPos * -1, 0];
10744
+ const scrollWithoutMomentum = clamp(scrollPos, scrollClampRange);
10745
+ const interpolate = linearScale([0, maxScrollPos], [0, maxThumbPos]);
10746
+ return interpolate(scrollWithoutMomentum);
10747
+ }
10748
+ function linearScale(input, output) {
10749
+ return (value) => {
10750
+ if (input[0] === input[1] || output[0] === output[1])
10751
+ return output[0];
10752
+ const ratio = (output[1] - output[0]) / (input[1] - input[0]);
10753
+ return output[0] + ratio * (value - input[0]);
10754
+ };
10755
+ }
10756
+ function isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos) {
10757
+ return scrollPos > 0 && scrollPos < maxScrollPos;
10758
+ }
10759
+ var addUnlinkedScrollListener = (node, handler = () => {
10760
+ }) => {
10761
+ let prevPosition = { left: node.scrollLeft, top: node.scrollTop };
10762
+ let rAF = 0;
10763
+ (function loop() {
10764
+ const position = { left: node.scrollLeft, top: node.scrollTop };
10765
+ const isHorizontalScroll = prevPosition.left !== position.left;
10766
+ const isVerticalScroll = prevPosition.top !== position.top;
10767
+ if (isHorizontalScroll || isVerticalScroll)
10768
+ handler();
10769
+ prevPosition = position;
10770
+ rAF = window.requestAnimationFrame(loop);
10771
+ })();
10772
+ return () => window.cancelAnimationFrame(rAF);
10773
+ };
10774
+ function useDebounceCallback(callback, delay) {
10775
+ const handleCallback = useCallbackRef(callback);
10776
+ const debounceTimerRef = t.useRef(0);
10777
+ t.useEffect(() => () => window.clearTimeout(debounceTimerRef.current), []);
10778
+ return t.useCallback(() => {
10779
+ window.clearTimeout(debounceTimerRef.current);
10780
+ debounceTimerRef.current = window.setTimeout(handleCallback, delay);
10781
+ }, [handleCallback, delay]);
10782
+ }
10783
+ function useResizeObserver(element, onResize) {
10784
+ const handleResize = useCallbackRef(onResize);
10785
+ useLayoutEffect2(() => {
10786
+ let rAF = 0;
10787
+ if (element) {
10788
+ const resizeObserver = new ResizeObserver(() => {
10789
+ cancelAnimationFrame(rAF);
10790
+ rAF = window.requestAnimationFrame(handleResize);
10791
+ });
10792
+ resizeObserver.observe(element);
10793
+ return () => {
10794
+ window.cancelAnimationFrame(rAF);
10795
+ resizeObserver.unobserve(element);
10796
+ };
10797
+ }
10798
+ }, [element, handleResize]);
10799
+ }
10800
+ var Root12 = ScrollArea;
10801
+ var Viewport2 = ScrollAreaViewport;
10802
+ var Corner = ScrollAreaCorner;
10803
+ var ScrollArea2 = t.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
10804
+ Root12,
10805
+ {
10806
+ ref,
10807
+ className: cn("relative overflow-hidden", className),
10808
+ ...props,
10809
+ children: [
10810
+ /* @__PURE__ */ jsx(Viewport2, { className: "h-full w-full rounded-[inherit]", children }),
10811
+ /* @__PURE__ */ jsx(ScrollBar, {}),
10812
+ /* @__PURE__ */ jsx(Corner, {})
10813
+ ]
10814
+ }
10815
+ ));
10816
+ ScrollArea2.displayName = Root12.displayName;
10817
+ var ScrollBar = t.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
10818
+ ScrollAreaScrollbar,
10819
+ {
10820
+ ref,
10821
+ orientation,
10822
+ className: cn(
10823
+ "flex touch-none select-none transition-colors",
10824
+ orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
10825
+ orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
10826
+ className
10827
+ ),
10828
+ ...props,
10829
+ children: /* @__PURE__ */ jsx(ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
10830
+ }
10831
+ ));
10832
+ ScrollBar.displayName = ScrollAreaScrollbar.displayName;
9658
10833
  var separatorVariants = cva(
9659
10834
  "shrink-0 bg-border",
9660
10835
  {
@@ -9765,7 +10940,7 @@ var Separator3 = t.forwardRef(
9765
10940
  {
9766
10941
  ref,
9767
10942
  decorative,
9768
- orientation,
10943
+ orientation: orientation || void 0,
9769
10944
  className: cn(
9770
10945
  separatorVariants({ orientation, variant, size }),
9771
10946
  className
@@ -9775,91 +10950,17 @@ var Separator3 = t.forwardRef(
9775
10950
  )
9776
10951
  );
9777
10952
  Separator3.displayName = SeparatorPrimitive.Root.displayName;
9778
-
9779
- // ../../node_modules/@radix-ui/primitive/dist/index.mjs
9780
- function composeEventHandlers2(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
9781
- return function handleEvent(event) {
9782
- originalEventHandler?.(event);
9783
- if (checkForDefaultPrevented === false || !event.defaultPrevented) {
9784
- return ourEventHandler?.(event);
9785
- }
9786
- };
9787
- }
9788
- var useInsertionEffect2 = t[" useInsertionEffect ".trim().toString()] || useLayoutEffect22;
9789
- function useControllableState2({
9790
- prop,
9791
- defaultProp,
9792
- onChange = () => {
9793
- },
9794
- caller
9795
- }) {
9796
- const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState2({
9797
- defaultProp,
9798
- onChange
9799
- });
9800
- const isControlled = prop !== void 0;
9801
- const value = isControlled ? prop : uncontrolledProp;
9802
- {
9803
- const isControlledRef = t.useRef(prop !== void 0);
9804
- t.useEffect(() => {
9805
- const wasControlled = isControlledRef.current;
9806
- if (wasControlled !== isControlled) {
9807
- const from = wasControlled ? "controlled" : "uncontrolled";
9808
- const to = isControlled ? "controlled" : "uncontrolled";
9809
- console.warn(
9810
- `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
9811
- );
9812
- }
9813
- isControlledRef.current = isControlled;
9814
- }, [isControlled, caller]);
9815
- }
9816
- const setValue = t.useCallback(
9817
- (nextValue) => {
9818
- if (isControlled) {
9819
- const value2 = isFunction3(nextValue) ? nextValue(prop) : nextValue;
9820
- if (value2 !== prop) {
9821
- onChangeRef.current?.(value2);
9822
- }
9823
- } else {
9824
- setUncontrolledProp(nextValue);
9825
- }
9826
- },
9827
- [isControlled, prop, setUncontrolledProp, onChangeRef]
9828
- );
9829
- return [value, setValue];
9830
- }
9831
- function useUncontrolledState2({
9832
- defaultProp,
9833
- onChange
9834
- }) {
9835
- const [value, setValue] = t.useState(defaultProp);
9836
- const prevValueRef = t.useRef(value);
9837
- const onChangeRef = t.useRef(onChange);
9838
- useInsertionEffect2(() => {
9839
- onChangeRef.current = onChange;
9840
- }, [onChange]);
9841
- t.useEffect(() => {
9842
- if (prevValueRef.current !== value) {
9843
- onChangeRef.current?.(value);
9844
- prevValueRef.current = value;
9845
- }
9846
- }, [value, prevValueRef]);
9847
- return [value, setValue, onChangeRef];
9848
- }
9849
- function isFunction3(value) {
9850
- return typeof value === "function";
9851
- }
9852
10953
  var NAME = "Toggle";
9853
10954
  var Toggle = t.forwardRef((props, forwardedRef) => {
9854
10955
  const { pressed: pressedProp, defaultPressed, onPressedChange, ...buttonProps } = props;
9855
- const [pressed, setPressed] = useControllableState2({
10956
+ const [pressed, setPressed] = useControllableState({
9856
10957
  prop: pressedProp,
9857
10958
  onChange: onPressedChange,
9858
10959
  defaultProp: defaultPressed ?? false,
9859
10960
  caller: NAME
9860
10961
  });
9861
10962
  return /* @__PURE__ */ jsx(
9862
- Primitive2.button,
10963
+ Primitive.button,
9863
10964
  {
9864
10965
  type: "button",
9865
10966
  "aria-pressed": pressed,
@@ -9867,7 +10968,7 @@ var Toggle = t.forwardRef((props, forwardedRef) => {
9867
10968
  "data-disabled": props.disabled ? "" : void 0,
9868
10969
  ...buttonProps,
9869
10970
  ref: forwardedRef,
9870
- onClick: composeEventHandlers2(props.onClick, () => {
10971
+ onClick: composeEventHandlers(props.onClick, () => {
9871
10972
  if (!props.disabled) {
9872
10973
  setPressed(!pressed);
9873
10974
  }
@@ -9876,7 +10977,7 @@ var Toggle = t.forwardRef((props, forwardedRef) => {
9876
10977
  );
9877
10978
  });
9878
10979
  Toggle.displayName = NAME;
9879
- var Root13 = Toggle;
10980
+ var Root14 = Toggle;
9880
10981
  var toggleVariants = cva(
9881
10982
  "inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",
9882
10983
  {
@@ -9898,14 +10999,14 @@ var toggleVariants = cva(
9898
10999
  }
9899
11000
  );
9900
11001
  var Toggle2 = t.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx(
9901
- Root13,
11002
+ Root14,
9902
11003
  {
9903
11004
  ref,
9904
- className: cn(toggleVariants({ variant, size, className })),
11005
+ className: cn("moonui-theme", toggleVariants({ variant, size, className })),
9905
11006
  ...props
9906
11007
  }
9907
11008
  ));
9908
- Toggle2.displayName = Root13.displayName;
11009
+ Toggle2.displayName = Root14.displayName;
9909
11010
  var TooltipProvider = TooltipPrimitive.Provider;
9910
11011
  var tooltipVariants = cva(
9911
11012
  "z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
@@ -9937,7 +11038,7 @@ var TooltipArrow = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
9937
11038
  TooltipPrimitive.Arrow,
9938
11039
  {
9939
11040
  ref,
9940
- className: cn("fill-current", className),
11041
+ className: cn("moonui-theme", "fill-current", className),
9941
11042
  ...props
9942
11043
  }
9943
11044
  ));
@@ -9947,7 +11048,7 @@ var TooltipContent = t.forwardRef(({ className, variant, size, showArrow = false
9947
11048
  {
9948
11049
  ref,
9949
11050
  sideOffset,
9950
- className: cn(tooltipVariants({ variant, size }), className),
11051
+ className: cn("moonui-theme", tooltipVariants({ variant, size }), className),
9951
11052
  ...props,
9952
11053
  children: [
9953
11054
  props.children,
@@ -9965,7 +11066,6 @@ var SimpleTooltip = t.forwardRef(
9965
11066
  side = "top",
9966
11067
  align = "center",
9967
11068
  delayDuration = 400,
9968
- skipDelayDuration = 300,
9969
11069
  sideOffset = 4,
9970
11070
  showArrow = false,
9971
11071
  className,
@@ -9981,7 +11081,6 @@ var SimpleTooltip = t.forwardRef(
9981
11081
  defaultOpen,
9982
11082
  onOpenChange,
9983
11083
  delayDuration,
9984
- skipDelayDuration,
9985
11084
  children: [
9986
11085
  /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children }),
9987
11086
  /* @__PURE__ */ jsx(
@@ -10555,7 +11654,7 @@ var SimpleEditor = t__default.forwardRef(
10555
11654
  );
10556
11655
  SimpleEditor.displayName = "SimpleEditor";
10557
11656
  var CharacterCount = ({ content }) => {
10558
- const [count4, setCount] = useState(0);
11657
+ const [count3, setCount] = useState(0);
10559
11658
  useEffect(() => {
10560
11659
  const getPlainText = (html) => {
10561
11660
  const div = document.createElement("div");
@@ -10565,7 +11664,7 @@ var CharacterCount = ({ content }) => {
10565
11664
  setCount(getPlainText(content).length);
10566
11665
  }, [content]);
10567
11666
  return /* @__PURE__ */ jsxs(Fragment, { children: [
10568
- count4,
11667
+ count3,
10569
11668
  " characters"
10570
11669
  ] });
10571
11670
  };
@@ -10619,7 +11718,7 @@ var SwipeableCard = t.forwardRef(
10619
11718
  }
10620
11719
  );
10621
11720
  SwipeableCard.displayName = "SwipeableCard";
10622
- var Switch = t.forwardRef(({ className, size = "md", variant = "primary", loading, leftIcon, rightIcon, description, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "inline-flex items-center gap-2", children: [
11721
+ var Switch = t.forwardRef(({ className, size = "md", variant = "primary", loading, leftIcon, rightIcon, description, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "moonui-theme inline-flex items-center gap-2", children: [
10623
11722
  leftIcon && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: leftIcon }),
10624
11723
  /* @__PURE__ */ jsxs(
10625
11724
  SwitchPrimitives.Root,
@@ -10666,6 +11765,112 @@ var Switch = t.forwardRef(({ className, size = "md", variant = "primary", loadin
10666
11765
  description && /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: description })
10667
11766
  ] }));
10668
11767
  Switch.displayName = SwitchPrimitives.Root.displayName;
11768
+ var TagsInput = t.forwardRef(
11769
+ ({
11770
+ value = [],
11771
+ onChange,
11772
+ maxTags,
11773
+ variant = "primary",
11774
+ allowDuplicates = false,
11775
+ delimiter = ",",
11776
+ placeholder = "Add tag and press Enter",
11777
+ className,
11778
+ disabled,
11779
+ ...props
11780
+ }, ref) => {
11781
+ const [inputValue, setInputValue] = t.useState("");
11782
+ const [error, setError] = t.useState("");
11783
+ const handleKeyDown = (e) => {
11784
+ if (e.key === "Enter" || e.key === delimiter) {
11785
+ e.preventDefault();
11786
+ addTag();
11787
+ } else if (e.key === "Backspace" && inputValue === "" && value.length > 0) {
11788
+ removeTag(value.length - 1);
11789
+ }
11790
+ };
11791
+ const addTag = () => {
11792
+ const tag = inputValue.trim();
11793
+ if (!tag)
11794
+ return;
11795
+ if (!allowDuplicates && value.includes(tag)) {
11796
+ setError("This tag already exists");
11797
+ setTimeout(() => setError(""), 2e3);
11798
+ return;
11799
+ }
11800
+ if (maxTags && value.length >= maxTags) {
11801
+ setError(`Maximum ${maxTags} tags allowed`);
11802
+ setTimeout(() => setError(""), 2e3);
11803
+ return;
11804
+ }
11805
+ onChange([...value, tag]);
11806
+ setInputValue("");
11807
+ setError("");
11808
+ };
11809
+ const removeTag = (index) => {
11810
+ if (disabled)
11811
+ return;
11812
+ onChange(value.filter((_, i) => i !== index));
11813
+ };
11814
+ return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
11815
+ /* @__PURE__ */ jsxs(
11816
+ "div",
11817
+ {
11818
+ className: cn(
11819
+ "flex min-h-[2.5rem] w-full flex-wrap gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background",
11820
+ "dark:bg-zinc-950/50 dark:border-zinc-800",
11821
+ "focus-within:outline-none focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",
11822
+ disabled && "cursor-not-allowed opacity-50",
11823
+ className
11824
+ ),
11825
+ children: [
11826
+ value.map((tag, index) => /* @__PURE__ */ jsxs(
11827
+ Badge,
11828
+ {
11829
+ variant,
11830
+ className: "gap-1 pr-1.5",
11831
+ children: [
11832
+ /* @__PURE__ */ jsx("span", { className: "text-xs", children: tag }),
11833
+ !disabled && /* @__PURE__ */ jsx(
11834
+ "button",
11835
+ {
11836
+ type: "button",
11837
+ onClick: () => removeTag(index),
11838
+ className: "ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",
11839
+ children: /* @__PURE__ */ jsx(X, { className: "h-3 w-3 text-muted-foreground hover:text-foreground transition-colors" })
11840
+ }
11841
+ )
11842
+ ]
11843
+ },
11844
+ index
11845
+ )),
11846
+ /* @__PURE__ */ jsx(
11847
+ "input",
11848
+ {
11849
+ ref,
11850
+ type: "text",
11851
+ value: inputValue,
11852
+ onChange: (e) => setInputValue(e.target.value),
11853
+ onKeyDown: handleKeyDown,
11854
+ onBlur: addTag,
11855
+ disabled,
11856
+ placeholder: value.length === 0 ? placeholder : "",
11857
+ className: cn(
11858
+ "flex-1 bg-transparent outline-none placeholder:text-muted-foreground",
11859
+ "dark:placeholder:text-zinc-500",
11860
+ "min-w-[120px]",
11861
+ disabled && "cursor-not-allowed"
11862
+ ),
11863
+ ...props
11864
+ }
11865
+ )
11866
+ ]
11867
+ }
11868
+ ),
11869
+ error && /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-destructive", children: error })
11870
+ ] });
11871
+ }
11872
+ );
11873
+ TagsInput.displayName = "TagsInput";
10669
11874
  var Textarea = t.forwardRef(
10670
11875
  ({
10671
11876
  className,
@@ -10684,6 +11889,7 @@ var Textarea = t.forwardRef(
10684
11889
  "textarea",
10685
11890
  {
10686
11891
  className: cn(
11892
+ "moonui-theme",
10687
11893
  "flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
10688
11894
  className
10689
11895
  ),
@@ -10729,7 +11935,7 @@ var Toast = t.forwardRef(({ className, variant, ...props }, ref) => {
10729
11935
  ToastPrimitives.Root,
10730
11936
  {
10731
11937
  ref,
10732
- className: cn(toastVariants({ variant }), className),
11938
+ className: cn("moonui-theme", toastVariants({ variant }), className),
10733
11939
  ...props
10734
11940
  }
10735
11941
  );
@@ -10765,7 +11971,7 @@ var ToastTitle = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
10765
11971
  ToastPrimitives.Title,
10766
11972
  {
10767
11973
  ref,
10768
- className: cn("text-sm font-semibold [&+div]:text-xs", className),
11974
+ className: cn("moonui-theme", "text-sm font-semibold [&+div]:text-xs", className),
10769
11975
  ...props
10770
11976
  }
10771
11977
  ));
@@ -10774,7 +11980,7 @@ var ToastDescription = t.forwardRef(({ className, ...props }, ref) => /* @__PURE
10774
11980
  ToastPrimitives.Description,
10775
11981
  {
10776
11982
  ref,
10777
- className: cn("text-sm opacity-90", className),
11983
+ className: cn("moonui-theme", "text-sm opacity-90", className),
10778
11984
  ...props
10779
11985
  }
10780
11986
  ));
@@ -10839,6 +12045,8 @@ var reducer = (state, action) => {
10839
12045
  ...state,
10840
12046
  toasts: state.toasts.filter((t2) => t2.id !== action.toastId)
10841
12047
  };
12048
+ default:
12049
+ return state;
10842
12050
  }
10843
12051
  };
10844
12052
  var listeners = [];
@@ -10935,6 +12143,6 @@ function Toaster() {
10935
12143
  *)
10936
12144
  */
10937
12145
 
10938
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarGroup, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CheckboxGroup, CheckboxLabel, CheckboxWithLabel, Collapsible2 as Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, ColorPicker, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DataTable, DatePicker, DateRangePicker, DateTimePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogForm, DialogHeader, DialogTitle, DialogTrigger, DraggableList, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FileUpload, GestureDrawer, GitHubStarButton, GitHubStars, GradientPicker, Input, Label, MonthPicker, MoonLogo, MoonLogoAnimated, MoonLogoIcon, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverFooter, PopoverHeader, PopoverSeparator, PopoverTrigger, Progress, RadioGroup2 as RadioGroup, RadioGroupItem, RadioItemWithLabel, RadioLabel, RichTextEditor, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, SimpleColorPicker, SimpleEditor, SimpleTooltip, Skeleton, SkeletonAvatar, SkeletonCard, SkeletonText, Slider, SwipeableCard, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, Toggle2 as Toggle, Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger, aspectRatioVariants, badgeVariants, buttonVariants, cn, collapsibleContentVariants, collapsibleTriggerVariants, createFilterableColumn, createSortableHeader, popoverContentVariants, progressVariants, separatorVariants, skeletonVariants, toast, toggleVariants, tooltipVariants, useToast };
12146
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarGroup, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Card, CardCVCInput, CardContent, CardDescription, CardExpiryInput, CardFooter, CardHeader, CardNumberInput, CardTitle, CardZipInput, Checkbox, CheckboxGroup, CheckboxLabel, CheckboxWithLabel, Collapsible2 as Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, ColorPicker, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DataTable, DatePicker, DateRangePicker, DateTimePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogForm, DialogHeader, DialogTitle, DialogTrigger, DraggableList, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FileUpload, FreeBadge, GestureDrawer, GitHubStarButton, GitHubStars, GradientPicker, Input, Label, LockedComponent, MonthPicker, MoonLogo, MoonLogoAnimated, MoonLogoIcon, Accordion as MoonUIAccordion, AccordionContent as MoonUIAccordionContent, AccordionItem as MoonUIAccordionItem, AccordionTrigger as MoonUIAccordionTrigger, Alert as MoonUIAlert, AlertDescription as MoonUIAlertDescription, AlertTitle as MoonUIAlertTitle, AspectRatio as MoonUIAspectRatio, Avatar as MoonUIAvatar, AvatarFallback as MoonUIAvatarFallback, AvatarGroup as MoonUIAvatarGroup, AvatarImage as MoonUIAvatarImage, Badge as MoonUIBadge, Breadcrumb as MoonUIBreadcrumb, BreadcrumbEllipsis as MoonUIBreadcrumbEllipsis, BreadcrumbItem as MoonUIBreadcrumbItem, BreadcrumbLink as MoonUIBreadcrumbLink, BreadcrumbList as MoonUIBreadcrumbList, BreadcrumbPage as MoonUIBreadcrumbPage, BreadcrumbSeparator as MoonUIBreadcrumbSeparator, Button as MoonUIButton, Card as MoonUICard, CardCVCInput as MoonUICardCVCInput, CardContent as MoonUICardContent, CardDescription as MoonUICardDescription, CardExpiryInput as MoonUICardExpiryInput, CardFooter as MoonUICardFooter, CardHeader as MoonUICardHeader, CardNumberInput as MoonUICardNumberInput, CardTitle as MoonUICardTitle, CardZipInput as MoonUICardZipInput, Checkbox as MoonUICheckbox, CheckboxGroup as MoonUICheckboxGroup, CheckboxLabel as MoonUICheckboxLabel, CheckboxWithLabel as MoonUICheckboxWithLabel, Collapsible2 as MoonUICollapsible, CollapsibleContent2 as MoonUICollapsibleContent, CollapsibleTrigger2 as MoonUICollapsibleTrigger, ColorPicker as MoonUIColorPicker, Command as MoonUICommand, CommandDialog as MoonUICommandDialog, CommandEmpty as MoonUICommandEmpty, CommandGroup as MoonUICommandGroup, CommandInput as MoonUICommandInput, CommandItem as MoonUICommandItem, CommandList as MoonUICommandList, CommandSeparator as MoonUICommandSeparator, CommandShortcut as MoonUICommandShortcut, DataTable as MoonUIDataTable, DatePicker as MoonUIDatePicker, DateRangePicker as MoonUIDateRangePicker, DateTimePicker as MoonUIDateTimePicker, Dialog as MoonUIDialog, DialogClose as MoonUIDialogClose, DialogContent as MoonUIDialogContent, DialogDescription as MoonUIDialogDescription, DialogFooter as MoonUIDialogFooter, DialogHeader as MoonUIDialogHeader, DialogTitle as MoonUIDialogTitle, DialogTrigger as MoonUIDialogTrigger, DraggableList as MoonUIDraggableList, DropdownMenu as MoonUIDropdownMenu, DropdownMenuCheckboxItem as MoonUIDropdownMenuCheckboxItem, DropdownMenuContent as MoonUIDropdownMenuContent, DropdownMenuGroup as MoonUIDropdownMenuGroup, DropdownMenuItem as MoonUIDropdownMenuItem, DropdownMenuLabel as MoonUIDropdownMenuLabel, DropdownMenuPortal as MoonUIDropdownMenuPortal, DropdownMenuRadioGroup as MoonUIDropdownMenuRadioGroup, DropdownMenuRadioItem as MoonUIDropdownMenuRadioItem, DropdownMenuSeparator as MoonUIDropdownMenuSeparator, DropdownMenuShortcut as MoonUIDropdownMenuShortcut, DropdownMenuSub as MoonUIDropdownMenuSub, DropdownMenuSubContent as MoonUIDropdownMenuSubContent, DropdownMenuSubTrigger as MoonUIDropdownMenuSubTrigger, DropdownMenuTrigger as MoonUIDropdownMenuTrigger, FileUpload as MoonUIFileUpload, FreeBadge as MoonUIFreeBadge, GestureDrawer as MoonUIGestureDrawer, GitHubStars as MoonUIGitHubStars, GradientPicker as MoonUIGradientPicker, Input as MoonUIInput, Label as MoonUILabel, LockedComponent as MoonUILockedComponent, MonthPicker as MoonUIMonthPicker, MoonLogo as MoonUIMoonLogo, Pagination as MoonUIPagination, PaginationContent as MoonUIPaginationContent, PaginationEllipsis as MoonUIPaginationEllipsis, PaginationItem as MoonUIPaginationItem, PaginationLink as MoonUIPaginationLink, PaginationNext as MoonUIPaginationNext, PaginationPrevious as MoonUIPaginationPrevious, PhoneInput as MoonUIPhoneInput, Popover as MoonUIPopover, PopoverContent as MoonUIPopoverContent, PopoverTrigger as MoonUIPopoverTrigger, ProBadge as MoonUIProBadge, ProComponentWrapper as MoonUIProComponentWrapper, Progress as MoonUIProgress, RadioGroup2 as MoonUIRadioGroup, RadioGroupItem as MoonUIRadioGroupItem, RadioItemWithLabel as MoonUIRadioItemWithLabel, RadioLabel as MoonUIRadioLabel, RichTextEditor as MoonUIRichTextEditor, ScrollArea2 as MoonUIScrollArea, ScrollBar as MoonUIScrollBar, Select as MoonUISelect, SelectContent as MoonUISelectContent, SelectGroup as MoonUISelectGroup, SelectItem as MoonUISelectItem, SelectLabel as MoonUISelectLabel, SelectScrollDownButton as MoonUISelectScrollDownButton, SelectScrollUpButton as MoonUISelectScrollUpButton, SelectSeparator as MoonUISelectSeparator, SelectTrigger as MoonUISelectTrigger, SelectValue as MoonUISelectValue, Separator3 as MoonUISeparator, SimpleColorPicker as MoonUISimpleColorPicker, SimpleEditor as MoonUISimpleEditor, Skeleton as MoonUISkeleton, SkeletonAvatar as MoonUISkeletonAvatar, SkeletonCard as MoonUISkeletonCard, SkeletonText as MoonUISkeletonText, Slider as MoonUISlider, SwipeableCard as MoonUISwipeableCard, Switch as MoonUISwitch, Table as MoonUITable, TableBody as MoonUITableBody, TableCaption as MoonUITableCaption, TableCell as MoonUITableCell, TableFooter as MoonUITableFooter, TableHead as MoonUITableHead, TableHeader as MoonUITableHeader, TableRow as MoonUITableRow, Tabs as MoonUITabs, TabsContent as MoonUITabsContent, TabsList as MoonUITabsList, TabsTrigger as MoonUITabsTrigger, TagsInput as MoonUITagsInput, Textarea as MoonUITextarea, Toast as MoonUIToast, ToastAction as MoonUIToastAction, ToastClose as MoonUIToastClose, ToastDescription as MoonUIToastDescription, ToastProvider as MoonUIToastProvider, ToastTitle as MoonUIToastTitle, ToastViewport as MoonUIToastViewport, Toaster as MoonUIToaster, Toggle2 as MoonUIToggle, Tooltip as MoonUITooltip, TooltipContent as MoonUITooltipContent, TooltipProvider as MoonUITooltipProvider, TooltipTrigger as MoonUITooltipTrigger, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PhoneInput, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverFooter, PopoverHeader, PopoverSeparator, PopoverTrigger, ProBadge, ProComponentWrapper, Progress, RadioGroup2 as RadioGroup, RadioGroupItem, RadioItemWithLabel, RadioLabel, RichTextEditor, ScrollArea2 as ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, SimpleColorPicker, SimpleEditor, SimpleTooltip, Skeleton, SkeletonAvatar, SkeletonCard, SkeletonText, Slider, SwipeableCard, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TagsInput, Textarea, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, Toggle2 as Toggle, Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger, aspectRatioVariants, badgeVariants, buttonVariants, cn, collapsibleContentVariants, collapsibleTriggerVariants, createFilterableColumn, createSortableHeader, badgeVariants as moonUIBadgeVariants, buttonVariants as moonUIButtonVariants, skeletonVariants as moonUISkeletonVariants, toggleVariants as moonUIToggleVariants, popoverContentVariants, progressVariants, separatorVariants, skeletonVariants, toast, toggleVariants, tooltipVariants, useToast };
10939
12147
  //# sourceMappingURL=out.js.map
10940
12148
  //# sourceMappingURL=index.mjs.map