@ai-matrx/design-system 0.4.2 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -140,6 +140,37 @@ function CheckIcon(props) {
140
140
  }
141
141
  ) });
142
142
  }
143
+ function DividerHorizontalIcon(props) {
144
+ return /* @__PURE__ */ jsx2("svg", { ...radixProps(props), children: /* @__PURE__ */ jsx2(
145
+ "path",
146
+ {
147
+ d: "M2 7.5C2 7.22386 2.22386 7 2.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H2.5C2.22386 8 2 7.77614 2 7.5Z",
148
+ fill: "currentColor",
149
+ fillRule: "evenodd",
150
+ clipRule: "evenodd"
151
+ }
152
+ ) });
153
+ }
154
+ function DotFilledIcon(props) {
155
+ return /* @__PURE__ */ jsx2("svg", { ...radixProps(props), children: /* @__PURE__ */ jsx2(
156
+ "path",
157
+ {
158
+ d: "M9.875 7.5C9.875 8.81168 8.81168 9.875 7.5 9.875C6.18832 9.875 5.125 8.81168 5.125 7.5C5.125 6.18832 6.18832 5.125 7.5 5.125C8.81168 5.125 9.875 6.18832 9.875 7.5Z",
159
+ fill: "currentColor"
160
+ }
161
+ ) });
162
+ }
163
+ function RadixChevronRightIcon(props) {
164
+ return /* @__PURE__ */ jsx2("svg", { ...radixProps(props), children: /* @__PURE__ */ jsx2(
165
+ "path",
166
+ {
167
+ d: "M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",
168
+ fill: "currentColor",
169
+ fillRule: "evenodd",
170
+ clipRule: "evenodd"
171
+ }
172
+ ) });
173
+ }
143
174
  function RadixChevronDownIcon(props) {
144
175
  return /* @__PURE__ */ jsx2("svg", { ...radixProps(props), children: /* @__PURE__ */ jsx2(
145
176
  "path",
@@ -362,56 +393,246 @@ var Button = React3.forwardRef(
362
393
  );
363
394
  Button.displayName = "Button";
364
395
 
396
+ // src/avatar.tsx
397
+ import * as AvatarPrimitive from "@radix-ui/react-avatar";
398
+ import * as React4 from "react";
399
+ import { jsx as jsx6 } from "react/jsx-runtime";
400
+ var AVATAR_SIZES = {
401
+ sm: "h-8 w-8 text-[11px]",
402
+ md: "h-9 w-9 text-xs",
403
+ lg: "h-10 w-10 text-sm"
404
+ };
405
+ var Avatar = React4.forwardRef(({ className, size = "lg", ...props }, ref) => /* @__PURE__ */ jsx6(
406
+ AvatarPrimitive.Root,
407
+ {
408
+ ref,
409
+ "data-slot": "avatar",
410
+ className: cn(
411
+ "relative flex shrink-0 overflow-hidden rounded-full",
412
+ AVATAR_SIZES[size],
413
+ className
414
+ ),
415
+ ...props
416
+ }
417
+ ));
418
+ Avatar.displayName = AvatarPrimitive.Root.displayName;
419
+ var AvatarImage = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx6(
420
+ AvatarPrimitive.Image,
421
+ {
422
+ ref,
423
+ "data-slot": "avatar-image",
424
+ className: cn("aspect-square h-full w-full", className),
425
+ ...props
426
+ }
427
+ ));
428
+ AvatarImage.displayName = AvatarPrimitive.Image.displayName;
429
+ var AvatarFallback = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx6(
430
+ AvatarPrimitive.Fallback,
431
+ {
432
+ ref,
433
+ "data-slot": "avatar-fallback",
434
+ className: cn(
435
+ "flex h-full w-full items-center justify-center rounded-full bg-muted font-medium text-muted-foreground",
436
+ className
437
+ ),
438
+ ...props
439
+ }
440
+ ));
441
+ AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
442
+
443
+ // src/card.tsx
444
+ import * as React5 from "react";
445
+ import { jsx as jsx7 } from "react/jsx-runtime";
446
+ var CARD_SIZES = {
447
+ sm: {
448
+ root: "rounded-xl border bg-card text-card-foreground shadow",
449
+ pad: "p-2",
450
+ padTopless: "p-2 pt-0"
451
+ },
452
+ md: {
453
+ root: "rounded-lg border bg-card text-card-foreground shadow-sm",
454
+ pad: "p-4",
455
+ padTopless: "p-4 pt-0"
456
+ },
457
+ lg: {
458
+ root: "rounded-lg border bg-card text-card-foreground shadow-sm",
459
+ pad: "p-6",
460
+ padTopless: "p-6 pt-0"
461
+ }
462
+ };
463
+ var CardSizeContext = React5.createContext("md");
464
+ function useCardSize() {
465
+ return React5.useContext(CardSizeContext);
466
+ }
467
+ var Card = React5.forwardRef(
468
+ ({ className, size = "md", ...props }, ref) => /* @__PURE__ */ jsx7(CardSizeContext.Provider, { value: size, children: /* @__PURE__ */ jsx7(
469
+ "div",
470
+ {
471
+ ref,
472
+ "data-slot": "card",
473
+ "data-size": size,
474
+ className: cn(CARD_SIZES[size].root, className),
475
+ ...props
476
+ }
477
+ ) })
478
+ );
479
+ Card.displayName = "Card";
480
+ var CardHeader = React5.forwardRef(({ className, ...props }, ref) => {
481
+ const size = useCardSize();
482
+ return /* @__PURE__ */ jsx7(
483
+ "div",
484
+ {
485
+ ref,
486
+ "data-slot": "card-header",
487
+ className: cn(
488
+ "flex flex-col space-y-1.5 rounded-t-[inherit]",
489
+ CARD_SIZES[size].pad,
490
+ className
491
+ ),
492
+ ...props
493
+ }
494
+ );
495
+ });
496
+ CardHeader.displayName = "CardHeader";
497
+ var CardTitle = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx7(
498
+ "h3",
499
+ {
500
+ ref,
501
+ "data-slot": "card-title",
502
+ className: cn("font-semibold leading-none tracking-tight", className),
503
+ ...props
504
+ }
505
+ ));
506
+ CardTitle.displayName = "CardTitle";
507
+ var CardDescription = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx7(
508
+ "p",
509
+ {
510
+ ref,
511
+ "data-slot": "card-description",
512
+ className: cn("text-sm text-muted-foreground", className),
513
+ ...props
514
+ }
515
+ ));
516
+ CardDescription.displayName = "CardDescription";
517
+ var CardAction = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx7(
518
+ "div",
519
+ {
520
+ ref,
521
+ "data-slot": "card-action",
522
+ className: cn("ml-auto self-start", className),
523
+ ...props
524
+ }
525
+ ));
526
+ CardAction.displayName = "CardAction";
527
+ var CardContent = React5.forwardRef(({ className, ...props }, ref) => {
528
+ const size = useCardSize();
529
+ return /* @__PURE__ */ jsx7(
530
+ "div",
531
+ {
532
+ ref,
533
+ "data-slot": "card-content",
534
+ className: cn(CARD_SIZES[size].padTopless, className),
535
+ ...props
536
+ }
537
+ );
538
+ });
539
+ CardContent.displayName = "CardContent";
540
+ var CardFooter = React5.forwardRef(({ className, ...props }, ref) => {
541
+ const size = useCardSize();
542
+ return /* @__PURE__ */ jsx7(
543
+ "div",
544
+ {
545
+ ref,
546
+ "data-slot": "card-footer",
547
+ className: cn(
548
+ "flex items-center rounded-b-[inherit]",
549
+ CARD_SIZES[size].padTopless,
550
+ className
551
+ ),
552
+ ...props
553
+ }
554
+ );
555
+ });
556
+ CardFooter.displayName = "CardFooter";
557
+
558
+ // src/checkbox.tsx
559
+ import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
560
+ import * as React6 from "react";
561
+ import { jsx as jsx8 } from "react/jsx-runtime";
562
+ var CHECKBOX_SIZES = {
563
+ sm: { root: "h-3.5 w-3.5 rounded-xs", glyph: "h-3 w-3" },
564
+ md: { root: "h-4 w-4 rounded-sm", glyph: "h-3.5 w-3.5" }
565
+ };
566
+ var Checkbox = React6.forwardRef(({ className, size = "md", ...props }, ref) => /* @__PURE__ */ jsx8(
567
+ CheckboxPrimitive.Root,
568
+ {
569
+ ref,
570
+ "data-slot": "checkbox",
571
+ className: cn(
572
+ "peer shrink-0 cursor-pointer border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground",
573
+ CHECKBOX_SIZES[size].root,
574
+ className
575
+ ),
576
+ ...props,
577
+ children: /* @__PURE__ */ jsx8(
578
+ CheckboxPrimitive.Indicator,
579
+ {
580
+ "data-slot": "checkbox-indicator",
581
+ className: "flex items-center justify-center text-current",
582
+ children: props.checked === "indeterminate" ? /* @__PURE__ */ jsx8(DividerHorizontalIcon, { className: CHECKBOX_SIZES[size].glyph }) : /* @__PURE__ */ jsx8(CheckIcon, { className: CHECKBOX_SIZES[size].glyph })
583
+ }
584
+ )
585
+ }
586
+ ));
587
+ Checkbox.displayName = CheckboxPrimitive.Root.displayName;
588
+
589
+ // src/collapsible.tsx
590
+ import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
591
+ var Collapsible = CollapsiblePrimitive.Root;
592
+ var CollapsibleTrigger2 = CollapsiblePrimitive.CollapsibleTrigger;
593
+ var CollapsibleContent2 = CollapsiblePrimitive.CollapsibleContent;
594
+
365
595
  // src/command.tsx
366
596
  import * as DialogPrimitive from "@radix-ui/react-dialog";
367
597
  import { Command as CommandPrimitive } from "cmdk";
368
- import * as React5 from "react";
598
+ import * as React9 from "react";
369
599
 
370
600
  // src/portal-container.tsx
371
- import * as React4 from "react";
372
- import { jsx as jsx6 } from "react/jsx-runtime";
373
- var PortalContainerContext = React4.createContext(
601
+ import * as React7 from "react";
602
+ import { jsx as jsx9 } from "react/jsx-runtime";
603
+ var PortalContainerContext = React7.createContext(
374
604
  void 0
375
605
  );
376
606
  function PortalContainerProvider({
377
607
  container,
378
608
  children
379
609
  }) {
380
- return /* @__PURE__ */ jsx6(PortalContainerContext.Provider, { value: container ?? void 0, children });
610
+ return /* @__PURE__ */ jsx9(PortalContainerContext.Provider, { value: container ?? void 0, children });
381
611
  }
382
612
  function usePortalContainer(explicit) {
383
- const injected = React4.useContext(PortalContainerContext);
613
+ const injected = React7.useContext(PortalContainerContext);
384
614
  if (explicit !== void 0) {
385
615
  return explicit ?? void 0;
386
616
  }
387
617
  return injected ?? void 0;
388
618
  }
389
619
 
390
- // src/command.tsx
391
- import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
392
- var Command = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx7(
393
- CommandPrimitive,
394
- {
395
- ref,
396
- className: cn(
397
- "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
398
- className
399
- ),
400
- ...props
401
- }
402
- ));
403
- Command.displayName = CommandPrimitive.displayName;
620
+ // src/use-is-mobile.ts
621
+ import * as React8 from "react";
404
622
  var MOBILE_BREAKPOINT = 768;
405
623
  function useIsMobile() {
406
- const [isMobile, setIsMobile] = React5.useState(false);
407
- const [hasMounted, setHasMounted] = React5.useState(false);
408
- React5.useEffect(() => {
624
+ const [isMobile, setIsMobile] = React8.useState(false);
625
+ const [hasMounted, setHasMounted] = React8.useState(false);
626
+ React8.useEffect(() => {
409
627
  setHasMounted(true);
410
- const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
411
628
  const onChange = () => {
412
629
  setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
413
630
  };
414
631
  onChange();
632
+ if (typeof window.matchMedia !== "function") {
633
+ return void 0;
634
+ }
635
+ const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
415
636
  mql.addEventListener("change", onChange);
416
637
  return () => mql.removeEventListener("change", onChange);
417
638
  }, []);
@@ -420,15 +641,30 @@ function useIsMobile() {
420
641
  }
421
642
  return isMobile;
422
643
  }
644
+
645
+ // src/command.tsx
646
+ import { jsx as jsx10, jsxs as jsxs3 } from "react/jsx-runtime";
647
+ var Command = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx10(
648
+ CommandPrimitive,
649
+ {
650
+ ref,
651
+ className: cn(
652
+ "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
653
+ className
654
+ ),
655
+ ...props
656
+ }
657
+ ));
658
+ Command.displayName = CommandPrimitive.displayName;
423
659
  var DIALOG_DESKTOP_CLASSES = "fixed left-[50%] top-[50%] z-[10000] grid min-w-0 w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 overflow-x-clip border bg-background p-6 shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg";
424
660
  var DIALOG_MOBILE_SHEET_CLASSES = "fixed inset-x-0 bottom-0 left-0 right-0 top-auto z-[10000] flex min-w-0 flex-col w-full max-w-full max-h-[90dvh] translate-x-0 translate-y-0 gap-4 overflow-x-clip border-t bg-background p-4 pb-safe shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full duration-200 rounded-t-2xl rounded-b-none overflow-y-auto overscroll-contain data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom";
425
661
  var DIALOG_MOBILE_SHEET_OVERRIDE = "inset-x-0 bottom-0 left-0 right-0 top-auto translate-x-0 translate-y-0 w-full max-w-full max-h-[90dvh] rounded-b-none rounded-t-2xl overflow-y-auto";
426
- var CommandDialogContent = React5.forwardRef(({ className, children, container, ...props }, ref) => {
662
+ var CommandDialogContent = React9.forwardRef(({ className, children, container, ...props }, ref) => {
427
663
  const isMobile = useIsMobile();
428
664
  const isModal = useRadixDialogModal();
429
665
  const portalContainer = usePortalContainer(container);
430
666
  return /* @__PURE__ */ jsxs3(DialogPrimitive.Portal, { container: portalContainer, children: [
431
- isModal ? /* @__PURE__ */ jsx7(
667
+ isModal ? /* @__PURE__ */ jsx10(
432
668
  DialogPrimitive.Overlay,
433
669
  {
434
670
  className: "fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim-soft)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"
@@ -450,8 +686,8 @@ var CommandDialogContent = React5.forwardRef(({ className, children, container,
450
686
  children: [
451
687
  children,
452
688
  /* @__PURE__ */ jsxs3(DialogPrimitive.Close, { className: "absolute right-2 top-4 flex h-10 w-10 items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground sm:right-4", children: [
453
- /* @__PURE__ */ jsx7(XIcon, { className: "h-4 w-4" }),
454
- /* @__PURE__ */ jsx7("span", { className: "sr-only", children: "Close" })
689
+ /* @__PURE__ */ jsx10(XIcon, { className: "h-4 w-4" }),
690
+ /* @__PURE__ */ jsx10("span", { className: "sr-only", children: "Close" })
455
691
  ] })
456
692
  ]
457
693
  }
@@ -465,21 +701,21 @@ var CommandDialog = ({
465
701
  ...props
466
702
  }) => {
467
703
  const modal = props.modal ?? true;
468
- return /* @__PURE__ */ jsx7(RadixDialogModalProvider, { modal, children: /* @__PURE__ */ jsx7(DialogPrimitive.Root, { ...props, modal, children: /* @__PURE__ */ jsxs3(
704
+ return /* @__PURE__ */ jsx10(RadixDialogModalProvider, { modal, children: /* @__PURE__ */ jsx10(DialogPrimitive.Root, { ...props, modal, children: /* @__PURE__ */ jsxs3(
469
705
  CommandDialogContent,
470
706
  {
471
707
  className: "overflow-hidden p-0",
472
708
  ...container !== void 0 ? { container } : {},
473
709
  children: [
474
- /* @__PURE__ */ jsx7(DialogPrimitive.Title, { className: "sr-only" }),
475
- /* @__PURE__ */ jsx7(Command, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children })
710
+ /* @__PURE__ */ jsx10(DialogPrimitive.Title, { className: "sr-only" }),
711
+ /* @__PURE__ */ jsx10(Command, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children })
476
712
  ]
477
713
  }
478
714
  ) }) });
479
715
  };
480
- var CommandInput = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs3("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
481
- /* @__PURE__ */ jsx7(MagnifyingGlassIcon, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
482
- /* @__PURE__ */ jsx7(
716
+ var CommandInput = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs3("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
717
+ /* @__PURE__ */ jsx10(MagnifyingGlassIcon, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
718
+ /* @__PURE__ */ jsx10(
483
719
  CommandPrimitive.Input,
484
720
  {
485
721
  ref,
@@ -492,7 +728,7 @@ var CommandInput = React5.forwardRef(({ className, ...props }, ref) => /* @__PUR
492
728
  )
493
729
  ] }));
494
730
  CommandInput.displayName = CommandPrimitive.Input.displayName;
495
- var CommandList = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx7(
731
+ var CommandList = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx10(
496
732
  CommandPrimitive.List,
497
733
  {
498
734
  ref,
@@ -501,7 +737,7 @@ var CommandList = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE
501
737
  }
502
738
  ));
503
739
  CommandList.displayName = CommandPrimitive.List.displayName;
504
- var CommandEmpty = React5.forwardRef((props, ref) => /* @__PURE__ */ jsx7(
740
+ var CommandEmpty = React9.forwardRef((props, ref) => /* @__PURE__ */ jsx10(
505
741
  CommandPrimitive.Empty,
506
742
  {
507
743
  ref,
@@ -510,7 +746,7 @@ var CommandEmpty = React5.forwardRef((props, ref) => /* @__PURE__ */ jsx7(
510
746
  }
511
747
  ));
512
748
  CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
513
- var CommandGroup = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx7(
749
+ var CommandGroup = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx10(
514
750
  CommandPrimitive.Group,
515
751
  {
516
752
  ref,
@@ -522,7 +758,7 @@ var CommandGroup = React5.forwardRef(({ className, ...props }, ref) => /* @__PUR
522
758
  }
523
759
  ));
524
760
  CommandGroup.displayName = CommandPrimitive.Group.displayName;
525
- var CommandSeparator = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx7(
761
+ var CommandSeparator = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx10(
526
762
  CommandPrimitive.Separator,
527
763
  {
528
764
  ref,
@@ -531,7 +767,7 @@ var CommandSeparator = React5.forwardRef(({ className, ...props }, ref) => /* @_
531
767
  }
532
768
  ));
533
769
  CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
534
- var CommandItem = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx7(
770
+ var CommandItem = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx10(
535
771
  CommandPrimitive.Item,
536
772
  {
537
773
  ref,
@@ -547,7 +783,7 @@ var CommandShortcut = ({
547
783
  className,
548
784
  ...props
549
785
  }) => {
550
- return /* @__PURE__ */ jsx7(
786
+ return /* @__PURE__ */ jsx10(
551
787
  "span",
552
788
  {
553
789
  className: cn(
@@ -560,6 +796,141 @@ var CommandShortcut = ({
560
796
  };
561
797
  CommandShortcut.displayName = "CommandShortcut";
562
798
 
799
+ // src/context-menu.tsx
800
+ import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
801
+ import * as React10 from "react";
802
+ import { jsx as jsx11, jsxs as jsxs4 } from "react/jsx-runtime";
803
+ var ContextMenu = ContextMenuPrimitive.Root;
804
+ var ContextMenuTrigger = ContextMenuPrimitive.Trigger;
805
+ var ContextMenuGroup = ContextMenuPrimitive.Group;
806
+ var ContextMenuPortal = ContextMenuPrimitive.Portal;
807
+ var ContextMenuSub = ContextMenuPrimitive.Sub;
808
+ var ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
809
+ var SURFACE_CLASS = "z-50 min-w-[8rem] max-h-[var(--radix-context-menu-content-available-height)] overflow-y-auto overflow-x-hidden overscroll-contain rounded-md border bg-popover p-1 text-popover-foreground";
810
+ var MOTION_CLASS = "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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";
811
+ var ITEM_CLASS = "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
812
+ var INDICATOR_ITEM_CLASS = "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
813
+ var ContextMenuSubTrigger = React10.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs4(
814
+ ContextMenuPrimitive.SubTrigger,
815
+ {
816
+ ref,
817
+ "data-slot": "context-menu-sub-trigger",
818
+ className: cn(
819
+ "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
820
+ inset && "pl-8",
821
+ className
822
+ ),
823
+ ...props,
824
+ children: [
825
+ children,
826
+ /* @__PURE__ */ jsx11(RadixChevronRightIcon, { className: "ml-auto h-4 w-4" })
827
+ ]
828
+ }
829
+ ));
830
+ ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
831
+ var ContextMenuSubContent = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx11(
832
+ ContextMenuPrimitive.SubContent,
833
+ {
834
+ ref,
835
+ "data-slot": "context-menu-sub-content",
836
+ className: cn(SURFACE_CLASS, "shadow-lg", MOTION_CLASS, className),
837
+ ...props
838
+ }
839
+ ));
840
+ ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
841
+ var ContextMenuContent = React10.forwardRef(({ className, container, ...props }, ref) => {
842
+ const portalContainer = usePortalContainer(container);
843
+ return /* @__PURE__ */ jsx11(ContextMenuPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsx11(
844
+ ContextMenuPrimitive.Content,
845
+ {
846
+ ref,
847
+ "data-slot": "context-menu-content",
848
+ className: cn(SURFACE_CLASS, "shadow-md", MOTION_CLASS, className),
849
+ ...props
850
+ }
851
+ ) });
852
+ });
853
+ ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
854
+ var ContextMenuItem = React10.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx11(
855
+ ContextMenuPrimitive.Item,
856
+ {
857
+ ref,
858
+ "data-slot": "context-menu-item",
859
+ className: cn(
860
+ ITEM_CLASS,
861
+ "gap-2 [&>svg]:size-4 [&>svg]:shrink-0",
862
+ inset && "pl-8",
863
+ className
864
+ ),
865
+ ...props
866
+ }
867
+ ));
868
+ ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
869
+ var ContextMenuCheckboxItem = React10.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs4(
870
+ ContextMenuPrimitive.CheckboxItem,
871
+ {
872
+ ref,
873
+ "data-slot": "context-menu-checkbox-item",
874
+ className: cn(INDICATOR_ITEM_CLASS, className),
875
+ ...props,
876
+ children: [
877
+ /* @__PURE__ */ jsx11("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx11(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx11(CheckIcon, { className: "h-4 w-4" }) }) }),
878
+ children
879
+ ]
880
+ }
881
+ ));
882
+ ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;
883
+ var ContextMenuRadioItem = React10.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs4(
884
+ ContextMenuPrimitive.RadioItem,
885
+ {
886
+ ref,
887
+ "data-slot": "context-menu-radio-item",
888
+ className: cn(INDICATOR_ITEM_CLASS, className),
889
+ ...props,
890
+ children: [
891
+ /* @__PURE__ */ jsx11("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx11(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx11(DotFilledIcon, { className: "h-4 w-4 fill-current" }) }) }),
892
+ children
893
+ ]
894
+ }
895
+ ));
896
+ ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
897
+ var ContextMenuLabel = React10.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx11(
898
+ ContextMenuPrimitive.Label,
899
+ {
900
+ ref,
901
+ "data-slot": "context-menu-label",
902
+ className: cn(
903
+ "px-2 py-1.5 text-sm font-semibold text-foreground",
904
+ inset && "pl-8",
905
+ className
906
+ ),
907
+ ...props
908
+ }
909
+ ));
910
+ ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
911
+ var ContextMenuSeparator = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx11(
912
+ ContextMenuPrimitive.Separator,
913
+ {
914
+ ref,
915
+ "data-slot": "context-menu-separator",
916
+ className: cn("-mx-1 my-1 h-px bg-border", className),
917
+ ...props
918
+ }
919
+ ));
920
+ ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;
921
+ var ContextMenuShortcut = ({
922
+ className,
923
+ ...props
924
+ }) => /* @__PURE__ */ jsx11(
925
+ "span",
926
+ {
927
+ "data-slot": "context-menu-shortcut",
928
+ className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className),
929
+ ...props
930
+ }
931
+ );
932
+ ContextMenuShortcut.displayName = "ContextMenuShortcut";
933
+
563
934
  // src/creatable-picker.tsx
564
935
  import {
565
936
  useRef,
@@ -568,15 +939,15 @@ import {
568
939
 
569
940
  // src/popover.tsx
570
941
  import * as PopoverPrimitive from "@radix-ui/react-popover";
571
- import * as React6 from "react";
572
- import { jsx as jsx8 } from "react/jsx-runtime";
942
+ import * as React11 from "react";
943
+ import { jsx as jsx12 } from "react/jsx-runtime";
573
944
  var Popover = PopoverPrimitive.Root;
574
945
  var PopoverTrigger = PopoverPrimitive.Trigger;
575
946
  var PopoverAnchor = PopoverPrimitive.Anchor;
576
- var PopoverContent = React6.forwardRef(
947
+ var PopoverContent = React11.forwardRef(
577
948
  ({ className, align = "center", sideOffset = 4, container, ...props }, ref) => {
578
949
  const portalContainer = usePortalContainer(container);
579
- return /* @__PURE__ */ jsx8(PopoverPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsx8(
950
+ return /* @__PURE__ */ jsx12(PopoverPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsx12(
580
951
  PopoverPrimitive.Content,
581
952
  {
582
953
  ref,
@@ -600,7 +971,7 @@ var PopoverContent = React6.forwardRef(
600
971
  PopoverContent.displayName = PopoverPrimitive.Content.displayName;
601
972
 
602
973
  // src/creatable-picker.tsx
603
- import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
974
+ import { jsx as jsx13, jsxs as jsxs5 } from "react/jsx-runtime";
604
975
  function article(noun) {
605
976
  return /^[aeiou]/i.test(noun.trim()) ? `an ${noun}` : `a ${noun}`;
606
977
  }
@@ -675,8 +1046,8 @@ function CreatablePicker({
675
1046
  setBusy(false);
676
1047
  }
677
1048
  };
678
- return /* @__PURE__ */ jsxs4(Popover, { open, onOpenChange: (next) => next ? setOpen(true) : close(), children: [
679
- /* @__PURE__ */ jsx9(PopoverTrigger, { asChild: true, disabled, children: /* @__PURE__ */ jsxs4(
1049
+ return /* @__PURE__ */ jsxs5(Popover, { open, onOpenChange: (next) => next ? setOpen(true) : close(), children: [
1050
+ /* @__PURE__ */ jsx13(PopoverTrigger, { asChild: true, disabled, children: /* @__PURE__ */ jsxs5(
680
1051
  "button",
681
1052
  {
682
1053
  type: "button",
@@ -690,12 +1061,12 @@ function CreatablePicker({
690
1061
  triggerClassName
691
1062
  ),
692
1063
  children: [
693
- /* @__PURE__ */ jsx9("span", { className: "min-w-0 flex-1 truncate", children: selected ? renderSelected ?? selected.render ?? selected.label : /* @__PURE__ */ jsx9("span", { className: "text-muted-foreground", children: loading ? "Loading\u2026" : placeholder }) }),
694
- /* @__PURE__ */ jsx9(ChevronsUpDownIcon, { className: "size-3.5 shrink-0 opacity-50" })
1064
+ /* @__PURE__ */ jsx13("span", { className: "min-w-0 flex-1 truncate", children: selected ? renderSelected ?? selected.render ?? selected.label : /* @__PURE__ */ jsx13("span", { className: "text-muted-foreground", children: loading ? "Loading\u2026" : placeholder }) }),
1065
+ /* @__PURE__ */ jsx13(ChevronsUpDownIcon, { className: "size-3.5 shrink-0 opacity-50" })
695
1066
  ]
696
1067
  }
697
1068
  ) }),
698
- /* @__PURE__ */ jsx9(PopoverContent, { align: "start", className: "w-[--radix-popover-trigger-width] min-w-56 p-0", children: /* @__PURE__ */ jsxs4(
1069
+ /* @__PURE__ */ jsx13(PopoverContent, { align: "start", className: "w-[--radix-popover-trigger-width] min-w-56 p-0", children: /* @__PURE__ */ jsxs5(
699
1070
  Command,
700
1071
  {
701
1072
  filter: (itemValue, search, keywords) => {
@@ -703,7 +1074,7 @@ function CreatablePicker({
703
1074
  return haystack.includes(search.toLowerCase()) ? 1 : 0;
704
1075
  },
705
1076
  children: [
706
- /* @__PURE__ */ jsx9(
1077
+ /* @__PURE__ */ jsx13(
707
1078
  CommandInput,
708
1079
  {
709
1080
  ref: inputRef,
@@ -715,13 +1086,13 @@ function CreatablePicker({
715
1086
  placeholder: searchPlaceholder ?? `Search or add ${article(noun)}\u2026`
716
1087
  }
717
1088
  ),
718
- /* @__PURE__ */ jsxs4(CommandList, { children: [
719
- /* @__PURE__ */ jsx9(CommandEmpty, { children: emptyLabel }),
720
- groups.map((group) => /* @__PURE__ */ jsx9(
1089
+ /* @__PURE__ */ jsxs5(CommandList, { children: [
1090
+ /* @__PURE__ */ jsx13(CommandEmpty, { children: emptyLabel }),
1091
+ groups.map((group) => /* @__PURE__ */ jsx13(
721
1092
  CommandGroup,
722
1093
  {
723
1094
  ...group.heading === void 0 ? {} : { heading: group.heading },
724
- children: group.options.map((option) => /* @__PURE__ */ jsxs4(
1095
+ children: group.options.map((option) => /* @__PURE__ */ jsxs5(
725
1096
  CommandItem,
726
1097
  {
727
1098
  value: option.label,
@@ -732,7 +1103,7 @@ function CreatablePicker({
732
1103
  },
733
1104
  className: "gap-2 text-xs",
734
1105
  children: [
735
- /* @__PURE__ */ jsx9(
1106
+ /* @__PURE__ */ jsx13(
736
1107
  LucideCheckIcon,
737
1108
  {
738
1109
  className: cn(
@@ -741,8 +1112,8 @@ function CreatablePicker({
741
1112
  )
742
1113
  }
743
1114
  ),
744
- /* @__PURE__ */ jsx9("span", { className: "min-w-0 flex-1 truncate", children: option.render ?? option.label }),
745
- option.hint ? /* @__PURE__ */ jsx9("span", { className: "shrink-0 text-[10px] text-muted-foreground", children: option.hint }) : null
1115
+ /* @__PURE__ */ jsx13("span", { className: "min-w-0 flex-1 truncate", children: option.render ?? option.label }),
1116
+ option.hint ? /* @__PURE__ */ jsx13("span", { className: "shrink-0 text-[10px] text-muted-foreground", children: option.hint }) : null
746
1117
  ]
747
1118
  },
748
1119
  option.value
@@ -751,9 +1122,9 @@ function CreatablePicker({
751
1122
  group.heading ?? "__ungrouped__"
752
1123
  ))
753
1124
  ] }),
754
- canCreate ? /* @__PURE__ */ jsxs4("div", { className: "space-y-1 border-t border-border p-1", children: [
755
- createExtra && typed && !exactMatch ? /* @__PURE__ */ jsx9("div", { className: "px-1 pt-0.5", children: typeof createExtra === "function" ? createExtra(typed) : createExtra }) : null,
756
- /* @__PURE__ */ jsxs4(
1125
+ canCreate ? /* @__PURE__ */ jsxs5("div", { className: "space-y-1 border-t border-border p-1", children: [
1126
+ createExtra && typed && !exactMatch ? /* @__PURE__ */ jsx13("div", { className: "px-1 pt-0.5", children: typeof createExtra === "function" ? createExtra(typed) : createExtra }) : null,
1127
+ /* @__PURE__ */ jsxs5(
757
1128
  "button",
758
1129
  {
759
1130
  type: "button",
@@ -761,22 +1132,22 @@ function CreatablePicker({
761
1132
  onClick: () => void create(typed),
762
1133
  className: "flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-left text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground disabled:opacity-50",
763
1134
  children: [
764
- busy ? /* @__PURE__ */ jsx9(Loader2Icon, { className: "size-3.5 shrink-0 animate-spin" }) : /* @__PURE__ */ jsx9(PlusIcon, { className: "size-3.5 shrink-0" }),
765
- /* @__PURE__ */ jsx9("span", { className: "min-w-0 truncate", children: typed && !exactMatch ? `Create \u201C${typed}\u201D` : `Add ${article(noun)}\u2026` })
1135
+ busy ? /* @__PURE__ */ jsx13(Loader2Icon, { className: "size-3.5 shrink-0 animate-spin" }) : /* @__PURE__ */ jsx13(PlusIcon, { className: "size-3.5 shrink-0" }),
1136
+ /* @__PURE__ */ jsx13("span", { className: "min-w-0 truncate", children: typed && !exactMatch ? `Create \u201C${typed}\u201D` : `Add ${article(noun)}\u2026` })
766
1137
  ]
767
1138
  }
768
1139
  ),
769
- needsName ? /* @__PURE__ */ jsxs4("p", { className: "px-2 pb-0.5 text-[11px] leading-snug text-muted-foreground", children: [
1140
+ needsName ? /* @__PURE__ */ jsxs5("p", { className: "px-2 pb-0.5 text-[11px] leading-snug text-muted-foreground", children: [
770
1141
  "Type the name of the ",
771
1142
  noun,
772
1143
  " you want to add \u2014 then this creates it."
773
1144
  ] }) : null
774
1145
  ] }) : null,
775
- footerActions?.length || manageAction ? /* @__PURE__ */ jsxs4("div", { className: "space-y-0.5 border-t border-border p-1", children: [
1146
+ footerActions?.length || manageAction ? /* @__PURE__ */ jsxs5("div", { className: "space-y-0.5 border-t border-border p-1", children: [
776
1147
  footerActions?.map((action) => {
777
1148
  const Icon2 = action.icon;
778
- return /* @__PURE__ */ jsxs4("div", { children: [
779
- /* @__PURE__ */ jsxs4(
1149
+ return /* @__PURE__ */ jsxs5("div", { children: [
1150
+ /* @__PURE__ */ jsxs5(
780
1151
  "button",
781
1152
  {
782
1153
  type: "button",
@@ -786,15 +1157,15 @@ function CreatablePicker({
786
1157
  },
787
1158
  className: "flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-left text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
788
1159
  children: [
789
- Icon2 ? /* @__PURE__ */ jsx9(Icon2, { className: "size-3.5 shrink-0" }) : null,
790
- /* @__PURE__ */ jsx9("span", { className: "min-w-0 truncate", children: action.label })
1160
+ Icon2 ? /* @__PURE__ */ jsx13(Icon2, { className: "size-3.5 shrink-0" }) : null,
1161
+ /* @__PURE__ */ jsx13("span", { className: "min-w-0 truncate", children: action.label })
791
1162
  ]
792
1163
  }
793
1164
  ),
794
- action.note ? /* @__PURE__ */ jsx9("p", { className: "px-2 pb-1 text-[10px] leading-snug text-muted-foreground", children: action.note }) : null
1165
+ action.note ? /* @__PURE__ */ jsx13("p", { className: "px-2 pb-1 text-[10px] leading-snug text-muted-foreground", children: action.note }) : null
795
1166
  ] }, action.label);
796
1167
  }),
797
- manageAction ? /* @__PURE__ */ jsxs4(
1168
+ manageAction ? /* @__PURE__ */ jsxs5(
798
1169
  "a",
799
1170
  {
800
1171
  href: manageAction.href,
@@ -803,18 +1174,18 @@ function CreatablePicker({
803
1174
  onClick: close,
804
1175
  className: "flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-left text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
805
1176
  children: [
806
- /* @__PURE__ */ jsx9(ExternalLinkIcon, { className: "size-3.5 shrink-0" }),
807
- /* @__PURE__ */ jsx9("span", { className: "min-w-0 truncate", children: manageAction.label })
1177
+ /* @__PURE__ */ jsx13(ExternalLinkIcon, { className: "size-3.5 shrink-0" }),
1178
+ /* @__PURE__ */ jsx13("span", { className: "min-w-0 truncate", children: manageAction.label })
808
1179
  ]
809
1180
  }
810
1181
  ) : null
811
1182
  ] }) : null,
812
- lockedNote ? /* @__PURE__ */ jsxs4("div", { className: "space-y-1 border-t border-border p-2", children: [
813
- /* @__PURE__ */ jsxs4("p", { className: "flex gap-1.5 text-[11px] leading-snug text-muted-foreground", children: [
814
- /* @__PURE__ */ jsx9(LockIcon, { className: "mt-px size-3 shrink-0" }),
815
- /* @__PURE__ */ jsx9("span", { children: lockedNote })
1183
+ lockedNote ? /* @__PURE__ */ jsxs5("div", { className: "space-y-1 border-t border-border p-2", children: [
1184
+ /* @__PURE__ */ jsxs5("p", { className: "flex gap-1.5 text-[11px] leading-snug text-muted-foreground", children: [
1185
+ /* @__PURE__ */ jsx13(LockIcon, { className: "mt-px size-3 shrink-0" }),
1186
+ /* @__PURE__ */ jsx13("span", { children: lockedNote })
816
1187
  ] }),
817
- lockedAction ? /* @__PURE__ */ jsxs4(
1188
+ lockedAction ? /* @__PURE__ */ jsxs5(
818
1189
  "button",
819
1190
  {
820
1191
  type: "button",
@@ -824,8 +1195,8 @@ function CreatablePicker({
824
1195
  },
825
1196
  className: "flex w-full items-center gap-2 rounded-sm px-1 py-1 text-left text-xs font-medium text-primary transition-colors hover:bg-accent",
826
1197
  children: [
827
- /* @__PURE__ */ jsx9(PlusIcon, { className: "size-3.5 shrink-0" }),
828
- /* @__PURE__ */ jsx9("span", { className: "min-w-0 truncate", children: lockedAction.label })
1198
+ /* @__PURE__ */ jsx13(PlusIcon, { className: "size-3.5 shrink-0" }),
1199
+ /* @__PURE__ */ jsx13("span", { className: "min-w-0 truncate", children: lockedAction.label })
829
1200
  ]
830
1201
  }
831
1202
  ) : null
@@ -836,9 +1207,326 @@ function CreatablePicker({
836
1207
  ] });
837
1208
  }
838
1209
 
1210
+ // src/dialog.tsx
1211
+ import * as DialogPrimitive2 from "@radix-ui/react-dialog";
1212
+ import * as VisuallyHidden2 from "@radix-ui/react-visually-hidden";
1213
+ import { treeContainsComponent } from "@ai-matrx/kit/react-tree";
1214
+ import * as React12 from "react";
1215
+ import { jsx as jsx14, jsxs as jsxs6 } from "react/jsx-runtime";
1216
+ var Dialog = ({
1217
+ children,
1218
+ ...props
1219
+ }) => {
1220
+ const modal = props.modal ?? true;
1221
+ return /* @__PURE__ */ jsx14(RadixDialogModalProvider, { modal, children: /* @__PURE__ */ jsx14(DialogPrimitive2.Root, { ...props, modal, children }) });
1222
+ };
1223
+ Dialog.displayName = "Dialog";
1224
+ var DialogTrigger = DialogPrimitive2.Trigger;
1225
+ var DialogClose = DialogPrimitive2.Close;
1226
+ var DialogPortal = ({
1227
+ container,
1228
+ ...props
1229
+ }) => {
1230
+ const resolved = usePortalContainer(container);
1231
+ return /* @__PURE__ */ jsx14(DialogPrimitive2.Portal, { container: resolved ?? null, ...props });
1232
+ };
1233
+ DialogPortal.displayName = "DialogPortal";
1234
+ var DialogContainerContext = React12.createContext(null);
1235
+ var useDialogContainer = () => React12.useContext(DialogContainerContext);
1236
+ var DialogOverlay = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
1237
+ DialogPrimitive2.Overlay,
1238
+ {
1239
+ ref,
1240
+ "data-slot": "dialog-overlay",
1241
+ className: cn(
1242
+ // Page context behind the modal stays readable; separation comes from a
1243
+ // light token scrim, not a blur.
1244
+ "fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim-soft)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
1245
+ className
1246
+ ),
1247
+ ...props
1248
+ }
1249
+ ));
1250
+ DialogOverlay.displayName = DialogPrimitive2.Overlay.displayName;
1251
+ var DialogContentPrimitive = React12.forwardRef((props, ref) => {
1252
+ const isModal = useRadixDialogModal();
1253
+ return /* @__PURE__ */ jsx14(
1254
+ DialogPrimitive2.Content,
1255
+ {
1256
+ ...props,
1257
+ ref,
1258
+ "aria-modal": isModal || void 0
1259
+ }
1260
+ );
1261
+ });
1262
+ DialogContentPrimitive.displayName = "DialogContentPrimitive";
1263
+ var DIALOG_DESKTOP_CLASSES2 = "fixed left-[50%] top-[50%] z-[10000] grid min-w-0 w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 max-h-[85dvh] overflow-y-auto overscroll-contain [--dialog-pad:1.5rem] overflow-x-clip border bg-background p-6 shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg";
1264
+ var DIALOG_MOBILE_SHEET_CLASSES2 = "matrx-mobile-sheet fixed inset-x-0 bottom-0 left-0 right-0 top-auto z-[10000] flex min-w-0 flex-col w-full max-w-full max-h-[90dvh] translate-x-0 translate-y-0 gap-4 [--dialog-pad:1rem] overflow-x-clip border-t bg-background p-4 pb-safe shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full duration-200 rounded-t-2xl rounded-b-none overflow-y-auto overscroll-contain data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom";
1265
+ var DIALOG_MOBILE_SHEET_OVERRIDE2 = "inset-x-0 bottom-0 left-0 right-0 top-auto translate-x-0 translate-y-0 w-full max-w-full max-h-[90dvh] rounded-b-none rounded-t-2xl overflow-y-auto";
1266
+ var DialogContent = React12.forwardRef(
1267
+ ({
1268
+ className,
1269
+ children,
1270
+ mobileSheet = true,
1271
+ showCloseButton = true,
1272
+ container,
1273
+ ...props
1274
+ }, ref) => {
1275
+ const isMobile = useIsMobile();
1276
+ const isModal = useRadixDialogModal();
1277
+ const injectedContainer = usePortalContainer(container);
1278
+ const asSheet = mobileSheet && isMobile;
1279
+ const [containerEl, setContainerEl] = React12.useState(
1280
+ null
1281
+ );
1282
+ const mergedRef = React12.useCallback(
1283
+ (node) => {
1284
+ setContainerEl(node);
1285
+ if (typeof ref === "function") ref(node);
1286
+ else if (ref)
1287
+ ref.current = node;
1288
+ },
1289
+ [ref]
1290
+ );
1291
+ const hasTitle = treeContainsComponent(children, DialogTitle) || treeContainsComponent(children, DialogPrimitive2.Title);
1292
+ const hasDescription = treeContainsComponent(children, DialogDescription) || treeContainsComponent(children, DialogPrimitive2.Description);
1293
+ return /* @__PURE__ */ jsxs6(DialogPortal, { container, children: [
1294
+ isModal ? /* @__PURE__ */ jsx14(DialogOverlay, {}) : null,
1295
+ /* @__PURE__ */ jsxs6(
1296
+ DialogContentPrimitive,
1297
+ {
1298
+ ref: mergedRef,
1299
+ "data-slot": "dialog-content",
1300
+ className: cn(
1301
+ asSheet ? DIALOG_MOBILE_SHEET_CLASSES2 : DIALOG_DESKTOP_CLASSES2,
1302
+ className,
1303
+ asSheet && DIALOG_MOBILE_SHEET_OVERRIDE2,
1304
+ // A non-modal dialog is the coexistence contract for content that
1305
+ // can sit beside a host's floating window manager (which starts at
1306
+ // z=1000); staying below that boundary makes a newly focused window
1307
+ // usable without coupling the two systems.
1308
+ !isModal && "z-[900]"
1309
+ ),
1310
+ ...hasDescription ? {} : { "aria-describedby": void 0 },
1311
+ ...props,
1312
+ children: [
1313
+ hasTitle ? null : /* @__PURE__ */ jsx14(VisuallyHidden2.Root, { children: /* @__PURE__ */ jsx14(DialogPrimitive2.Title, { children: "Dialog" }) }),
1314
+ /* @__PURE__ */ jsx14(DialogContainerContext.Provider, { value: containerEl, children: /* @__PURE__ */ jsx14(
1315
+ PortalContainerProvider,
1316
+ {
1317
+ container: containerEl ?? injectedContainer ?? null,
1318
+ children
1319
+ }
1320
+ ) }),
1321
+ showCloseButton ? /* @__PURE__ */ jsxs6(
1322
+ DialogPrimitive2.Close,
1323
+ {
1324
+ "data-slot": "dialog-close",
1325
+ "aria-label": "Close",
1326
+ className: "absolute right-2 top-4 flex h-11 w-11 items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground sm:right-4 lg:h-10 lg:w-10",
1327
+ children: [
1328
+ /* @__PURE__ */ jsx14(XIcon, { className: "h-4 w-4" }),
1329
+ /* @__PURE__ */ jsx14("span", { className: "sr-only", children: "Close" })
1330
+ ]
1331
+ }
1332
+ ) : null
1333
+ ]
1334
+ }
1335
+ )
1336
+ ] });
1337
+ }
1338
+ );
1339
+ DialogContent.displayName = DialogPrimitive2.Content.displayName;
1340
+ var DialogHeader = ({
1341
+ className,
1342
+ ...props
1343
+ }) => /* @__PURE__ */ jsx14(
1344
+ "div",
1345
+ {
1346
+ "data-slot": "dialog-header",
1347
+ className: cn(
1348
+ // DialogContent owns an absolute close control. Reserve its hit area in
1349
+ // every header so trailing actions never render underneath it.
1350
+ "flex flex-col space-y-1.5 pr-12 text-center sm:text-left",
1351
+ className
1352
+ ),
1353
+ ...props
1354
+ }
1355
+ );
1356
+ DialogHeader.displayName = "DialogHeader";
1357
+ var DialogFooter = ({
1358
+ className,
1359
+ ...props
1360
+ }) => /* @__PURE__ */ jsx14(
1361
+ "div",
1362
+ {
1363
+ "data-slot": "dialog-footer",
1364
+ className: cn(
1365
+ "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
1366
+ "sticky bottom-0 z-10 bg-background pt-3",
1367
+ "mx-[calc(var(--dialog-pad,0px)*-1)] mb-[calc(var(--dialog-pad,0px)*-1)] px-[var(--dialog-pad,0px)] pb-[var(--dialog-pad,0px)]",
1368
+ className
1369
+ ),
1370
+ ...props
1371
+ }
1372
+ );
1373
+ DialogFooter.displayName = "DialogFooter";
1374
+ var DialogTitle = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
1375
+ DialogPrimitive2.Title,
1376
+ {
1377
+ ref,
1378
+ "data-slot": "dialog-title",
1379
+ className: cn("text-lg font-semibold leading-none tracking-tight", className),
1380
+ ...props
1381
+ }
1382
+ ));
1383
+ DialogTitle.displayName = DialogPrimitive2.Title.displayName;
1384
+ var DialogDescription = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
1385
+ DialogPrimitive2.Description,
1386
+ {
1387
+ ref,
1388
+ "data-slot": "dialog-description",
1389
+ className: cn("text-sm text-muted-foreground", className),
1390
+ ...props
1391
+ }
1392
+ ));
1393
+ DialogDescription.displayName = DialogPrimitive2.Description.displayName;
1394
+
1395
+ // src/dropdown-menu.tsx
1396
+ import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
1397
+ import * as React13 from "react";
1398
+ import { jsx as jsx15, jsxs as jsxs7 } from "react/jsx-runtime";
1399
+ var DropdownMenu = DropdownMenuPrimitive.Root;
1400
+ var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
1401
+ var DropdownMenuGroup = DropdownMenuPrimitive.Group;
1402
+ var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
1403
+ var DropdownMenuSub = DropdownMenuPrimitive.Sub;
1404
+ var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
1405
+ var MENU_SURFACE_CLASS = "z-[10001] min-w-[8rem] max-h-[var(--radix-dropdown-menu-content-available-height)] overflow-y-auto overflow-x-hidden overscroll-contain rounded-md border bg-popover p-1 text-popover-foreground";
1406
+ var MENU_MOTION_CLASS = "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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";
1407
+ var MENU_ITEM_CLASS = "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
1408
+ var MENU_INDICATOR_ITEM_CLASS = "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
1409
+ var DropdownMenuSubTrigger = React13.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs7(
1410
+ DropdownMenuPrimitive.SubTrigger,
1411
+ {
1412
+ ref,
1413
+ "data-slot": "dropdown-menu-sub-trigger",
1414
+ className: cn(
1415
+ "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
1416
+ inset && "pl-8",
1417
+ className
1418
+ ),
1419
+ ...props,
1420
+ children: [
1421
+ children,
1422
+ /* @__PURE__ */ jsx15(RadixChevronRightIcon, { className: "ml-auto h-4 w-4" })
1423
+ ]
1424
+ }
1425
+ ));
1426
+ DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
1427
+ var DropdownMenuSubContent = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx15(
1428
+ DropdownMenuPrimitive.SubContent,
1429
+ {
1430
+ ref,
1431
+ "data-slot": "dropdown-menu-sub-content",
1432
+ className: cn(MENU_SURFACE_CLASS, "shadow-lg", MENU_MOTION_CLASS, className),
1433
+ ...props
1434
+ }
1435
+ ));
1436
+ DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
1437
+ var DropdownMenuContent = React13.forwardRef(({ className, sideOffset = 4, container, ...props }, ref) => {
1438
+ const portalContainer = usePortalContainer(container);
1439
+ return /* @__PURE__ */ jsx15(DropdownMenuPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsx15(
1440
+ DropdownMenuPrimitive.Content,
1441
+ {
1442
+ ref,
1443
+ "data-slot": "dropdown-menu-content",
1444
+ sideOffset,
1445
+ className: cn(
1446
+ MENU_SURFACE_CLASS,
1447
+ "shadow-md",
1448
+ MENU_MOTION_CLASS,
1449
+ className
1450
+ ),
1451
+ ...props
1452
+ }
1453
+ ) });
1454
+ });
1455
+ DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
1456
+ var DropdownMenuItem = React13.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx15(
1457
+ DropdownMenuPrimitive.Item,
1458
+ {
1459
+ ref,
1460
+ "data-slot": "dropdown-menu-item",
1461
+ className: cn(MENU_ITEM_CLASS, inset && "pl-8", className),
1462
+ ...props
1463
+ }
1464
+ ));
1465
+ DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
1466
+ var DropdownMenuCheckboxItem = React13.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs7(
1467
+ DropdownMenuPrimitive.CheckboxItem,
1468
+ {
1469
+ ref,
1470
+ "data-slot": "dropdown-menu-checkbox-item",
1471
+ className: cn(MENU_INDICATOR_ITEM_CLASS, className),
1472
+ ...props,
1473
+ children: [
1474
+ /* @__PURE__ */ jsx15("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx15(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx15(CheckIcon, { className: "h-4 w-4" }) }) }),
1475
+ children
1476
+ ]
1477
+ }
1478
+ ));
1479
+ DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
1480
+ var DropdownMenuRadioItem = React13.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs7(
1481
+ DropdownMenuPrimitive.RadioItem,
1482
+ {
1483
+ ref,
1484
+ "data-slot": "dropdown-menu-radio-item",
1485
+ className: cn(MENU_INDICATOR_ITEM_CLASS, className),
1486
+ ...props,
1487
+ children: [
1488
+ /* @__PURE__ */ jsx15("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx15(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx15(DotFilledIcon, { className: "h-4 w-4 fill-current" }) }) }),
1489
+ children
1490
+ ]
1491
+ }
1492
+ ));
1493
+ DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
1494
+ var DropdownMenuLabel = React13.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx15(
1495
+ DropdownMenuPrimitive.Label,
1496
+ {
1497
+ ref,
1498
+ "data-slot": "dropdown-menu-label",
1499
+ className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className),
1500
+ ...props
1501
+ }
1502
+ ));
1503
+ DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
1504
+ var DropdownMenuSeparator = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx15(
1505
+ DropdownMenuPrimitive.Separator,
1506
+ {
1507
+ ref,
1508
+ "data-slot": "dropdown-menu-separator",
1509
+ className: cn("-mx-1 my-1 h-px bg-muted", className),
1510
+ ...props
1511
+ }
1512
+ ));
1513
+ DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
1514
+ var DropdownMenuShortcut = ({
1515
+ className,
1516
+ ...props
1517
+ }) => /* @__PURE__ */ jsx15(
1518
+ "span",
1519
+ {
1520
+ "data-slot": "dropdown-menu-shortcut",
1521
+ className: cn("ml-auto text-xs tracking-widest opacity-60", className),
1522
+ ...props
1523
+ }
1524
+ );
1525
+ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
1526
+
839
1527
  // src/editable-label.tsx
840
- import { useCallback, useEffect as useEffect2, useRef as useRef2, useState as useState3 } from "react";
841
- import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
1528
+ import { useCallback as useCallback2, useEffect as useEffect2, useRef as useRef2, useState as useState4 } from "react";
1529
+ import { jsx as jsx16, jsxs as jsxs8 } from "react/jsx-runtime";
842
1530
  function EditableLabel({
843
1531
  value,
844
1532
  onCommit,
@@ -858,11 +1546,11 @@ function EditableLabel({
858
1546
  inputClassName
859
1547
  }) {
860
1548
  const controlled = activation === "controlled";
861
- const [internalEditing, setInternalEditing] = useState3(false);
1549
+ const [internalEditing, setInternalEditing] = useState4(false);
862
1550
  const editing = controlled ? !!editingProp : internalEditing;
863
- const [draft, setDraft] = useState3(value);
864
- const [error, setError] = useState3(null);
865
- const [busy, setBusy] = useState3(false);
1551
+ const [draft, setDraft] = useState4(value);
1552
+ const [error, setError] = useState4(null);
1553
+ const [busy, setBusy] = useState4(false);
866
1554
  const inputRef = useRef2(null);
867
1555
  useEffect2(() => {
868
1556
  if (!editing) setDraft(value);
@@ -873,7 +1561,7 @@ function EditableLabel({
873
1561
  if (selectOnEdit) inputRef.current.select();
874
1562
  }
875
1563
  }, [editing, selectOnEdit]);
876
- const setEditing = useCallback(
1564
+ const setEditing = useCallback2(
877
1565
  (next) => {
878
1566
  if (controlled) {
879
1567
  onEditingChange?.(next);
@@ -884,18 +1572,18 @@ function EditableLabel({
884
1572
  },
885
1573
  [controlled, onEditingChange]
886
1574
  );
887
- const startEdit = useCallback(() => {
1575
+ const startEdit = useCallback2(() => {
888
1576
  setDraft(value);
889
1577
  setError(null);
890
1578
  setEditing(true);
891
1579
  }, [value, setEditing]);
892
- const cancel = useCallback(() => {
1580
+ const cancel = useCallback2(() => {
893
1581
  setDraft(value);
894
1582
  setError(null);
895
1583
  setBusy(false);
896
1584
  setEditing(false);
897
1585
  }, [value, setEditing]);
898
- const commit = useCallback(() => {
1586
+ const commit = useCallback2(() => {
899
1587
  if (busy) return;
900
1588
  const trimmed = draft.trim();
901
1589
  const next = trimmed || emptyFallback;
@@ -945,8 +1633,8 @@ function EditableLabel({
945
1633
  setEditing
946
1634
  ]);
947
1635
  if (editing) {
948
- return /* @__PURE__ */ jsxs5("span", { className: cn("relative flex min-w-0 flex-1 items-center", className), children: [
949
- /* @__PURE__ */ jsx10(
1636
+ return /* @__PURE__ */ jsxs8("span", { className: cn("relative flex min-w-0 flex-1 items-center", className), children: [
1637
+ /* @__PURE__ */ jsx16(
950
1638
  "input",
951
1639
  {
952
1640
  ref: inputRef,
@@ -986,12 +1674,12 @@ function EditableLabel({
986
1674
  )
987
1675
  }
988
1676
  ),
989
- busy && /* @__PURE__ */ jsx10(Loader2Icon, { className: "absolute right-1 h-3.5 w-3.5 animate-spin text-muted-foreground" }),
990
- error && /* @__PURE__ */ jsx10("span", { className: "absolute left-0 top-full mt-0.5 whitespace-nowrap text-xs text-destructive", children: error })
1677
+ busy && /* @__PURE__ */ jsx16(Loader2Icon, { className: "absolute right-1 h-3.5 w-3.5 animate-spin text-muted-foreground" }),
1678
+ error && /* @__PURE__ */ jsx16("span", { className: "absolute left-0 top-full mt-0.5 whitespace-nowrap text-xs text-destructive", children: error })
991
1679
  ] });
992
1680
  }
993
1681
  if (controlled) return null;
994
- return /* @__PURE__ */ jsx10(
1682
+ return /* @__PURE__ */ jsx16(
995
1683
  "button",
996
1684
  {
997
1685
  type: "button",
@@ -1025,11 +1713,11 @@ function EditableLabel({
1025
1713
  }
1026
1714
 
1027
1715
  // src/input.tsx
1028
- import * as React7 from "react";
1029
- import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
1716
+ import * as React14 from "react";
1717
+ import { jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
1030
1718
  var getVariantStyles = (variant = "default") => {
1031
1719
  const baseStyles = `flex h-10 w-full border border-border bg-background text-foreground shadow-input rounded-md px-3 py-2 text-sm file:border-0 file:bg-transparent
1032
- file:text-sm file:font-medium placeholder:text-muted-foreground
1720
+ file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground
1033
1721
  focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-ring
1034
1722
  disabled:cursor-not-allowed disabled:opacity-50
1035
1723
  dark:shadow-none
@@ -1054,9 +1742,9 @@ var getVariantStyles = (variant = "default") => {
1054
1742
  return baseStyles;
1055
1743
  }
1056
1744
  };
1057
- var Input = React7.forwardRef(
1745
+ var Input = React14.forwardRef(
1058
1746
  ({ className, type, variant = "default", ...props }, ref) => {
1059
- return /* @__PURE__ */ jsx11(
1747
+ return /* @__PURE__ */ jsx17(
1060
1748
  "input",
1061
1749
  {
1062
1750
  type,
@@ -1068,7 +1756,7 @@ var Input = React7.forwardRef(
1068
1756
  }
1069
1757
  );
1070
1758
  Input.displayName = "Input";
1071
- var EnterInput = React7.forwardRef(
1759
+ var EnterInput = React14.forwardRef(
1072
1760
  ({ onEnter, ...props }, ref) => {
1073
1761
  const handleKeyDown = (e) => {
1074
1762
  if (e.key === "Enter" && onEnter) {
@@ -1076,7 +1764,7 @@ var EnterInput = React7.forwardRef(
1076
1764
  onEnter();
1077
1765
  }
1078
1766
  };
1079
- return /* @__PURE__ */ jsx11(
1767
+ return /* @__PURE__ */ jsx17(
1080
1768
  Input,
1081
1769
  {
1082
1770
  ...props,
@@ -1092,16 +1780,16 @@ var EnterInput = React7.forwardRef(
1092
1780
  }
1093
1781
  );
1094
1782
  EnterInput.displayName = "EnterInput";
1095
- var BasicInput = React7.forwardRef(
1783
+ var BasicInput = React14.forwardRef(
1096
1784
  // `variant` is accepted (prop-compatible with Input) but intentionally
1097
1785
  // unused — and destructured so it never leaks onto the DOM element.
1098
1786
  ({ className, type, variant: _variant = "default", ...props }, ref) => {
1099
- return /* @__PURE__ */ jsx11(
1787
+ return /* @__PURE__ */ jsx17(
1100
1788
  "input",
1101
1789
  {
1102
1790
  type,
1103
1791
  className: cn(
1104
- "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
1792
+ "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
1105
1793
  className
1106
1794
  ),
1107
1795
  ref,
@@ -1111,10 +1799,10 @@ var BasicInput = React7.forwardRef(
1111
1799
  }
1112
1800
  );
1113
1801
  BasicInput.displayName = "BasicInput";
1114
- var InputWithPrefix = React7.forwardRef(({ prefix, className, wrapperClassName, ...props }, ref) => {
1115
- return /* @__PURE__ */ jsxs6("div", { className: cn("relative", wrapperClassName), children: [
1116
- prefix && /* @__PURE__ */ jsx11("div", { className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground", children: prefix }),
1117
- /* @__PURE__ */ jsx11(
1802
+ var InputWithPrefix = React14.forwardRef(({ prefix, className, wrapperClassName, ...props }, ref) => {
1803
+ return /* @__PURE__ */ jsxs9("div", { className: cn("relative", wrapperClassName), children: [
1804
+ prefix && /* @__PURE__ */ jsx17("div", { className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground", children: prefix }),
1805
+ /* @__PURE__ */ jsx17(
1118
1806
  Input,
1119
1807
  {
1120
1808
  ref,
@@ -1128,9 +1816,9 @@ InputWithPrefix.displayName = "InputWithPrefix";
1128
1816
 
1129
1817
  // src/label.tsx
1130
1818
  import * as LabelPrimitive from "@radix-ui/react-label";
1131
- import * as React8 from "react";
1132
- import { jsx as jsx12 } from "react/jsx-runtime";
1133
- var Label = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12(
1819
+ import * as React15 from "react";
1820
+ import { jsx as jsx18 } from "react/jsx-runtime";
1821
+ var Label3 = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx18(
1134
1822
  LabelPrimitive.Root,
1135
1823
  {
1136
1824
  ref,
@@ -1141,11 +1829,11 @@ var Label = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
1141
1829
  ...props
1142
1830
  }
1143
1831
  ));
1144
- Label.displayName = LabelPrimitive.Root.displayName;
1832
+ Label3.displayName = LabelPrimitive.Root.displayName;
1145
1833
 
1146
1834
  // src/overflow-toolbar.tsx
1147
- import { useLayoutEffect, useMemo, useRef as useRef3, useState as useState4 } from "react";
1148
- import { Fragment, jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
1835
+ import { useLayoutEffect, useMemo, useRef as useRef3, useState as useState5 } from "react";
1836
+ import { Fragment, jsx as jsx19, jsxs as jsxs10 } from "react/jsx-runtime";
1149
1837
  var GAP_PX = 6;
1150
1838
  var TONE = {
1151
1839
  default: "border border-border bg-background hover:bg-accent text-foreground",
@@ -1167,16 +1855,16 @@ function ToolbarButton({
1167
1855
  action.hideLabel && !action.running ? "w-7 justify-center px-0" : "px-2",
1168
1856
  TONE[tone]
1169
1857
  );
1170
- const inner = /* @__PURE__ */ jsxs7(Fragment, { children: [
1171
- /* @__PURE__ */ jsx13(
1858
+ const inner = /* @__PURE__ */ jsxs10(Fragment, { children: [
1859
+ /* @__PURE__ */ jsx19(
1172
1860
  Icon2,
1173
1861
  {
1174
1862
  className: cn("w-3.5 h-3.5 shrink-0", action.running && "animate-spin")
1175
1863
  }
1176
1864
  ),
1177
- showLabel && /* @__PURE__ */ jsx13("span", { children: text })
1865
+ showLabel && /* @__PURE__ */ jsx19("span", { children: text })
1178
1866
  ] });
1179
- const control = action.href && !action.disabled ? /* @__PURE__ */ jsx13(
1867
+ const control = action.href && !action.disabled ? /* @__PURE__ */ jsx19(
1180
1868
  "a",
1181
1869
  {
1182
1870
  href: action.href,
@@ -1186,7 +1874,7 @@ function ToolbarButton({
1186
1874
  "aria-label": action.label,
1187
1875
  children: inner
1188
1876
  }
1189
- ) : /* @__PURE__ */ jsx13(
1877
+ ) : /* @__PURE__ */ jsx19(
1190
1878
  "button",
1191
1879
  {
1192
1880
  type: "button",
@@ -1198,12 +1886,12 @@ function ToolbarButton({
1198
1886
  }
1199
1887
  );
1200
1888
  if (enableTooltip && action.hideLabel && renderTooltip) {
1201
- return /* @__PURE__ */ jsx13(Fragment, { children: renderTooltip(control, action.label) });
1889
+ return /* @__PURE__ */ jsx19(Fragment, { children: renderTooltip(control, action.label) });
1202
1890
  }
1203
1891
  return control;
1204
1892
  }
1205
1893
  function OverflowTrigger({ ariaLabel }) {
1206
- return /* @__PURE__ */ jsx13(
1894
+ return /* @__PURE__ */ jsx19(
1207
1895
  "button",
1208
1896
  {
1209
1897
  type: "button",
@@ -1214,7 +1902,7 @@ function OverflowTrigger({ ariaLabel }) {
1214
1902
  "inline-flex items-center justify-center h-7 w-7 rounded-md transition-colors",
1215
1903
  "border border-border bg-background hover:bg-accent text-foreground"
1216
1904
  ),
1217
- children: /* @__PURE__ */ jsx13(MoreHorizontalIcon, { className: "w-3.5 h-3.5" })
1905
+ children: /* @__PURE__ */ jsx19(MoreHorizontalIcon, { className: "w-3.5 h-3.5" })
1218
1906
  }
1219
1907
  );
1220
1908
  }
@@ -1233,7 +1921,7 @@ function OverflowToolbar({
1233
1921
  const containerRef = useRef3(null);
1234
1922
  const ghostRef = useRef3(null);
1235
1923
  const leadingRef = useRef3(null);
1236
- const [visibleCount, setVisibleCount] = useState4(visibleActions.length);
1924
+ const [visibleCount, setVisibleCount] = useState5(visibleActions.length);
1237
1925
  const signature = visibleActions.map(
1238
1926
  (a) => `${a.id}:${a.hideLabel ? 1 : 0}:${a.running ? 1 : 0}:${a.runningLabel ?? ""}:${a.label}`
1239
1927
  ).join("|");
@@ -1274,22 +1962,22 @@ function OverflowToolbar({
1274
1962
  }, [signature, leading != null]);
1275
1963
  const shown = visibleActions.slice(0, visibleCount);
1276
1964
  const hidden = visibleActions.slice(visibleCount);
1277
- return /* @__PURE__ */ jsxs7("div", { ref: containerRef, className: cn("relative min-w-0", className), children: [
1278
- /* @__PURE__ */ jsxs7(
1965
+ return /* @__PURE__ */ jsxs10("div", { ref: containerRef, className: cn("relative min-w-0", className), children: [
1966
+ /* @__PURE__ */ jsxs10(
1279
1967
  "div",
1280
1968
  {
1281
1969
  ref: ghostRef,
1282
1970
  "aria-hidden": true,
1283
1971
  className: "pointer-events-none absolute left-0 top-0 flex items-center gap-1.5 opacity-0",
1284
1972
  children: [
1285
- visibleActions.map((a) => /* @__PURE__ */ jsx13(ToolbarButton, { action: a }, a.id)),
1286
- /* @__PURE__ */ jsx13(OverflowTrigger, { ariaLabel: overflowAriaLabel })
1973
+ visibleActions.map((a) => /* @__PURE__ */ jsx19(ToolbarButton, { action: a }, a.id)),
1974
+ /* @__PURE__ */ jsx19(OverflowTrigger, { ariaLabel: overflowAriaLabel })
1287
1975
  ]
1288
1976
  }
1289
1977
  ),
1290
- /* @__PURE__ */ jsxs7("div", { className: "flex items-center justify-end gap-1.5", children: [
1291
- leading != null && /* @__PURE__ */ jsx13("span", { ref: leadingRef, className: "shrink-0", children: leading }),
1292
- shown.map((a) => /* @__PURE__ */ jsx13(
1978
+ /* @__PURE__ */ jsxs10("div", { className: "flex items-center justify-end gap-1.5", children: [
1979
+ leading != null && /* @__PURE__ */ jsx19("span", { ref: leadingRef, className: "shrink-0", children: leading }),
1980
+ shown.map((a) => /* @__PURE__ */ jsx19(
1293
1981
  ToolbarButton,
1294
1982
  {
1295
1983
  action: a,
@@ -1300,14 +1988,118 @@ function OverflowToolbar({
1300
1988
  )),
1301
1989
  hidden.length > 0 && renderOverflowMenu({
1302
1990
  actions: hidden,
1303
- trigger: /* @__PURE__ */ jsx13(OverflowTrigger, { ariaLabel: overflowAriaLabel })
1991
+ trigger: /* @__PURE__ */ jsx19(OverflowTrigger, { ariaLabel: overflowAriaLabel })
1304
1992
  })
1305
1993
  ] })
1306
1994
  ] });
1307
1995
  }
1308
1996
 
1997
+ // src/progress.tsx
1998
+ import * as ProgressPrimitive from "@radix-ui/react-progress";
1999
+ import * as React17 from "react";
2000
+ import { jsx as jsx20 } from "react/jsx-runtime";
2001
+ var PROGRESS_TONES = {
2002
+ default: "bg-primary",
2003
+ success: "bg-success",
2004
+ warning: "bg-warning",
2005
+ destructive: "bg-destructive"
2006
+ };
2007
+ var Progress = React17.forwardRef(({ className, tone = "default", indicatorClassName, ...props }, ref) => {
2008
+ const { value, max } = props;
2009
+ const ceiling = max ?? 100;
2010
+ const isIndeterminate = value === null || value === void 0;
2011
+ const pct = isIndeterminate ? 0 : Math.min(100, Math.max(0, value / ceiling * 100));
2012
+ return /* @__PURE__ */ jsx20(
2013
+ ProgressPrimitive.Root,
2014
+ {
2015
+ ref,
2016
+ "data-slot": "progress",
2017
+ className: cn(
2018
+ "relative h-2 w-full overflow-hidden rounded-full bg-primary/20",
2019
+ className
2020
+ ),
2021
+ ...props,
2022
+ children: /* @__PURE__ */ jsx20(
2023
+ ProgressPrimitive.Indicator,
2024
+ {
2025
+ "data-slot": "progress-indicator",
2026
+ className: cn(
2027
+ "h-full w-full flex-1 transition-all",
2028
+ PROGRESS_TONES[tone],
2029
+ isIndeterminate && "matrx-progress-indeterminate",
2030
+ indicatorClassName
2031
+ ),
2032
+ style: isIndeterminate ? void 0 : { transform: `translateX(-${100 - pct}%)` }
2033
+ }
2034
+ )
2035
+ }
2036
+ );
2037
+ });
2038
+ Progress.displayName = ProgressPrimitive.Root.displayName;
2039
+
2040
+ // src/scroll-area.tsx
2041
+ import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
2042
+ import * as React18 from "react";
2043
+ import { jsx as jsx21, jsxs as jsxs11 } from "react/jsx-runtime";
2044
+ var ScrollArea = React18.forwardRef(
2045
+ ({
2046
+ className,
2047
+ children,
2048
+ viewportClassName,
2049
+ viewportRef,
2050
+ scrollBarClassName,
2051
+ orientation = "vertical",
2052
+ ...props
2053
+ }, ref) => /* @__PURE__ */ jsxs11(
2054
+ ScrollAreaPrimitive.Root,
2055
+ {
2056
+ ref,
2057
+ "data-slot": "scroll-area",
2058
+ className: cn("relative overflow-hidden", className),
2059
+ ...props,
2060
+ children: [
2061
+ /* @__PURE__ */ jsx21(
2062
+ ScrollAreaPrimitive.Viewport,
2063
+ {
2064
+ ref: viewportRef,
2065
+ "data-slot": "scroll-area-viewport",
2066
+ className: cn("h-full w-full rounded-[inherit]", viewportClassName),
2067
+ children
2068
+ }
2069
+ ),
2070
+ /* @__PURE__ */ jsx21(ScrollBar, { orientation, className: scrollBarClassName }),
2071
+ /* @__PURE__ */ jsx21(ScrollAreaPrimitive.Corner, {})
2072
+ ]
2073
+ }
2074
+ )
2075
+ );
2076
+ ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
2077
+ var ScrollBar = React18.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx21(
2078
+ ScrollAreaPrimitive.ScrollAreaScrollbar,
2079
+ {
2080
+ ref,
2081
+ "data-slot": "scroll-area-scrollbar",
2082
+ orientation,
2083
+ className: cn(
2084
+ "flex touch-none select-none transition-colors",
2085
+ orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
2086
+ orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
2087
+ className
2088
+ ),
2089
+ ...props,
2090
+ children: /* @__PURE__ */ jsx21(
2091
+ ScrollAreaPrimitive.ScrollAreaThumb,
2092
+ {
2093
+ "data-slot": "scroll-area-thumb",
2094
+ className: "relative flex-1 rounded-full bg-border"
2095
+ }
2096
+ )
2097
+ }
2098
+ ));
2099
+ ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
2100
+
1309
2101
  // src/score-ring.tsx
1310
- import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
2102
+ import { jsx as jsx22, jsxs as jsxs12 } from "react/jsx-runtime";
1311
2103
  var DEFAULT_SCORE_THRESHOLDS = {
1312
2104
  good: 75,
1313
2105
  warning: 50
@@ -1338,7 +2130,7 @@ function ScoreRing({
1338
2130
  const circumference = 2 * Math.PI * radius;
1339
2131
  const boundedPct = pct === null ? 0 : Math.max(0, Math.min(100, pct));
1340
2132
  const dashOffset = circumference * (1 - boundedPct / 100);
1341
- return /* @__PURE__ */ jsxs8(
2133
+ return /* @__PURE__ */ jsxs12(
1342
2134
  "div",
1343
2135
  {
1344
2136
  className: cn(
@@ -1349,8 +2141,8 @@ function ScoreRing({
1349
2141
  role: "img",
1350
2142
  "aria-label": `${label ?? "Score"}: ${pct === null ? "not available" : `${pct} out of 100`}`,
1351
2143
  children: [
1352
- /* @__PURE__ */ jsxs8("svg", { viewBox: "0 0 100 100", className: "h-full w-full -rotate-90", children: [
1353
- /* @__PURE__ */ jsx14(
2144
+ /* @__PURE__ */ jsxs12("svg", { viewBox: "0 0 100 100", className: "h-full w-full -rotate-90", children: [
2145
+ /* @__PURE__ */ jsx22(
1354
2146
  "circle",
1355
2147
  {
1356
2148
  cx: "50",
@@ -1361,7 +2153,7 @@ function ScoreRing({
1361
2153
  fill: "none"
1362
2154
  }
1363
2155
  ),
1364
- pct !== null ? /* @__PURE__ */ jsx14(
2156
+ pct !== null ? /* @__PURE__ */ jsx22(
1365
2157
  "circle",
1366
2158
  {
1367
2159
  cx: "50",
@@ -1380,8 +2172,8 @@ function ScoreRing({
1380
2172
  }
1381
2173
  ) : null
1382
2174
  ] }),
1383
- /* @__PURE__ */ jsxs8("div", { className: "absolute flex flex-col items-center justify-center", children: [
1384
- /* @__PURE__ */ jsx14(
2175
+ /* @__PURE__ */ jsxs12("div", { className: "absolute flex flex-col items-center justify-center", children: [
2176
+ /* @__PURE__ */ jsx22(
1385
2177
  "span",
1386
2178
  {
1387
2179
  className: cn(
@@ -1391,7 +2183,7 @@ function ScoreRing({
1391
2183
  children: pct === null ? "\u2014" : `${pct}${suffix}`
1392
2184
  }
1393
2185
  ),
1394
- label ? /* @__PURE__ */ jsx14("span", { className: "max-w-[74px] truncate text-[9px] font-semibold uppercase tracking-wide text-muted-foreground", children: label }) : null
2186
+ label ? /* @__PURE__ */ jsx22("span", { className: "max-w-[74px] truncate text-[9px] font-semibold uppercase tracking-wide text-muted-foreground", children: label }) : null
1395
2187
  ] })
1396
2188
  ]
1397
2189
  }
@@ -1399,7 +2191,7 @@ function ScoreRing({
1399
2191
  }
1400
2192
 
1401
2193
  // src/segmented-control.tsx
1402
- import { jsx as jsx15 } from "react/jsx-runtime";
2194
+ import { jsx as jsx23 } from "react/jsx-runtime";
1403
2195
  function SegmentedControl({
1404
2196
  value,
1405
2197
  onValueChange,
@@ -1414,7 +2206,7 @@ function SegmentedControl({
1414
2206
  md: "h-9 text-sm",
1415
2207
  lg: "h-10 text-base"
1416
2208
  };
1417
- return /* @__PURE__ */ jsx15(
2209
+ return /* @__PURE__ */ jsx23(
1418
2210
  "div",
1419
2211
  {
1420
2212
  className: cn(
@@ -1425,7 +2217,7 @@ function SegmentedControl({
1425
2217
  role: "tablist",
1426
2218
  children: data.map((option) => {
1427
2219
  const isActive = value === option.value;
1428
- return /* @__PURE__ */ jsx15(
2220
+ return /* @__PURE__ */ jsx23(
1429
2221
  "button",
1430
2222
  {
1431
2223
  type: "button",
@@ -1452,8 +2244,8 @@ function SegmentedControl({
1452
2244
  // src/select.tsx
1453
2245
  import * as SelectPrimitive from "@radix-ui/react-select";
1454
2246
  import { cva as cva3 } from "class-variance-authority";
1455
- import * as React10 from "react";
1456
- import { jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
2247
+ import * as React19 from "react";
2248
+ import { jsx as jsx24, jsxs as jsxs13 } from "react/jsx-runtime";
1457
2249
  var Select = SelectPrimitive.Root;
1458
2250
  var SelectGroup = SelectPrimitive.Group;
1459
2251
  var SelectValue = SelectPrimitive.Value;
@@ -1472,7 +2264,7 @@ var selectTriggerVariants = cva3(
1472
2264
  }
1473
2265
  }
1474
2266
  );
1475
- var SelectTrigger = React10.forwardRef(({ className, children, hideArrow = false, size, ...props }, ref) => /* @__PURE__ */ jsxs9(
2267
+ var SelectTrigger = React19.forwardRef(({ className, children, hideArrow = false, size, ...props }, ref) => /* @__PURE__ */ jsxs13(
1476
2268
  SelectPrimitive.Trigger,
1477
2269
  {
1478
2270
  ref,
@@ -1480,12 +2272,12 @@ var SelectTrigger = React10.forwardRef(({ className, children, hideArrow = false
1480
2272
  ...props,
1481
2273
  children: [
1482
2274
  children,
1483
- !hideArrow && /* @__PURE__ */ jsx16(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx16(RadixChevronDownIcon, { className: "h-4 w-4 opacity-50" }) })
2275
+ !hideArrow && /* @__PURE__ */ jsx24(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx24(RadixChevronDownIcon, { className: "h-4 w-4 opacity-50" }) })
1484
2276
  ]
1485
2277
  }
1486
2278
  ));
1487
2279
  SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
1488
- var SelectScrollUpButton = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx16(
2280
+ var SelectScrollUpButton = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
1489
2281
  SelectPrimitive.ScrollUpButton,
1490
2282
  {
1491
2283
  ref,
@@ -1494,11 +2286,11 @@ var SelectScrollUpButton = React10.forwardRef(({ className, ...props }, ref) =>
1494
2286
  className
1495
2287
  ),
1496
2288
  ...props,
1497
- children: /* @__PURE__ */ jsx16(RadixChevronUpIcon, {})
2289
+ children: /* @__PURE__ */ jsx24(RadixChevronUpIcon, {})
1498
2290
  }
1499
2291
  ));
1500
2292
  SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
1501
- var SelectScrollDownButton = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx16(
2293
+ var SelectScrollDownButton = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
1502
2294
  SelectPrimitive.ScrollDownButton,
1503
2295
  {
1504
2296
  ref,
@@ -1507,13 +2299,13 @@ var SelectScrollDownButton = React10.forwardRef(({ className, ...props }, ref) =
1507
2299
  className
1508
2300
  ),
1509
2301
  ...props,
1510
- children: /* @__PURE__ */ jsx16(RadixChevronDownIcon, {})
2302
+ children: /* @__PURE__ */ jsx24(RadixChevronDownIcon, {})
1511
2303
  }
1512
2304
  ));
1513
2305
  SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
1514
- var SelectContent = React10.forwardRef(({ className, children, position = "popper", container, ...props }, ref) => {
2306
+ var SelectContent = React19.forwardRef(({ className, children, position = "popper", container, ...props }, ref) => {
1515
2307
  const portalContainer = usePortalContainer(container);
1516
- return /* @__PURE__ */ jsx16(SelectPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxs9(
2308
+ return /* @__PURE__ */ jsx24(SelectPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxs13(
1517
2309
  SelectPrimitive.Content,
1518
2310
  {
1519
2311
  ref,
@@ -1525,8 +2317,8 @@ var SelectContent = React10.forwardRef(({ className, children, position = "poppe
1525
2317
  position,
1526
2318
  ...props,
1527
2319
  children: [
1528
- /* @__PURE__ */ jsx16(SelectScrollUpButton, {}),
1529
- /* @__PURE__ */ jsx16(
2320
+ /* @__PURE__ */ jsx24(SelectScrollUpButton, {}),
2321
+ /* @__PURE__ */ jsx24(
1530
2322
  SelectPrimitive.Viewport,
1531
2323
  {
1532
2324
  className: cn(
@@ -1536,13 +2328,13 @@ var SelectContent = React10.forwardRef(({ className, children, position = "poppe
1536
2328
  children
1537
2329
  }
1538
2330
  ),
1539
- /* @__PURE__ */ jsx16(SelectScrollDownButton, {})
2331
+ /* @__PURE__ */ jsx24(SelectScrollDownButton, {})
1540
2332
  ]
1541
2333
  }
1542
2334
  ) });
1543
2335
  });
1544
2336
  SelectContent.displayName = SelectPrimitive.Content.displayName;
1545
- var SelectLabel = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx16(
2337
+ var SelectLabel = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
1546
2338
  SelectPrimitive.Label,
1547
2339
  {
1548
2340
  ref,
@@ -1551,7 +2343,7 @@ var SelectLabel = React10.forwardRef(({ className, ...props }, ref) => /* @__PUR
1551
2343
  }
1552
2344
  ));
1553
2345
  SelectLabel.displayName = SelectPrimitive.Label.displayName;
1554
- var SelectItem = React10.forwardRef(({ className, children, description, ...props }, ref) => /* @__PURE__ */ jsxs9(
2346
+ var SelectItem = React19.forwardRef(({ className, children, description, ...props }, ref) => /* @__PURE__ */ jsxs13(
1555
2347
  SelectPrimitive.Item,
1556
2348
  {
1557
2349
  ref,
@@ -1562,14 +2354,14 @@ var SelectItem = React10.forwardRef(({ className, children, description, ...prop
1562
2354
  ),
1563
2355
  ...props,
1564
2356
  children: [
1565
- /* @__PURE__ */ jsx16("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx16(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx16(CheckIcon, { className: "h-4 w-4" }) }) }),
1566
- /* @__PURE__ */ jsx16(SelectPrimitive.ItemText, { children }),
1567
- description ? /* @__PURE__ */ jsx16("span", { className: "block text-xs leading-snug text-muted-foreground", children: description }) : null
2357
+ /* @__PURE__ */ jsx24("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx24(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx24(CheckIcon, { className: "h-4 w-4" }) }) }),
2358
+ /* @__PURE__ */ jsx24(SelectPrimitive.ItemText, { children }),
2359
+ description ? /* @__PURE__ */ jsx24("span", { className: "block text-xs leading-snug text-muted-foreground", children: description }) : null
1568
2360
  ]
1569
2361
  }
1570
2362
  ));
1571
2363
  SelectItem.displayName = SelectPrimitive.Item.displayName;
1572
- var SelectSeparator = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx16(
2364
+ var SelectSeparator = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
1573
2365
  SelectPrimitive.Separator,
1574
2366
  {
1575
2367
  ref,
@@ -1581,9 +2373,9 @@ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
1581
2373
 
1582
2374
  // src/separator.tsx
1583
2375
  import * as SeparatorPrimitive from "@radix-ui/react-separator";
1584
- import * as React11 from "react";
1585
- import { jsx as jsx17 } from "react/jsx-runtime";
1586
- var Separator2 = React11.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx17(
2376
+ import * as React20 from "react";
2377
+ import { jsx as jsx25 } from "react/jsx-runtime";
2378
+ var Separator4 = React20.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx25(
1587
2379
  SeparatorPrimitive.Root,
1588
2380
  {
1589
2381
  ref,
@@ -1597,17 +2389,17 @@ var Separator2 = React11.forwardRef(({ className, orientation = "horizontal", de
1597
2389
  ...props
1598
2390
  }
1599
2391
  ));
1600
- Separator2.displayName = SeparatorPrimitive.Root.displayName;
2392
+ Separator4.displayName = SeparatorPrimitive.Root.displayName;
1601
2393
 
1602
2394
  // src/sheet.tsx
1603
2395
  import * as SheetPrimitive from "@radix-ui/react-dialog";
1604
- import { treeContainsComponent } from "@ai-matrx/kit/react-tree";
2396
+ import { treeContainsComponent as treeContainsComponent2 } from "@ai-matrx/kit/react-tree";
1605
2397
  import { cva as cva4 } from "class-variance-authority";
1606
- import * as React12 from "react";
1607
- import { jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
1608
- var SheetContentBase = React12.forwardRef(({ ...props }, ref) => {
2398
+ import * as React21 from "react";
2399
+ import { jsx as jsx26, jsxs as jsxs14 } from "react/jsx-runtime";
2400
+ var SheetContentBase = React21.forwardRef(({ ...props }, ref) => {
1609
2401
  const isModal = useRadixDialogModal();
1610
- return /* @__PURE__ */ jsx18(
2402
+ return /* @__PURE__ */ jsx26(
1611
2403
  SheetPrimitive.Content,
1612
2404
  {
1613
2405
  ...props,
@@ -1617,15 +2409,15 @@ var SheetContentBase = React12.forwardRef(({ ...props }, ref) => {
1617
2409
  );
1618
2410
  });
1619
2411
  SheetContentBase.displayName = "SheetContentBase";
1620
- var Sheet = React12.forwardRef(({ children, ...props }, _ref) => {
2412
+ var Sheet = React21.forwardRef(({ children, ...props }, _ref) => {
1621
2413
  const modal = props.modal ?? true;
1622
- return /* @__PURE__ */ jsx18(RadixDialogModalProvider, { modal, children: /* @__PURE__ */ jsx18(SheetPrimitive.Root, { ...props, modal, children }) });
2414
+ return /* @__PURE__ */ jsx26(RadixDialogModalProvider, { modal, children: /* @__PURE__ */ jsx26(SheetPrimitive.Root, { ...props, modal, children }) });
1623
2415
  });
1624
2416
  Sheet.displayName = "Sheet";
1625
2417
  var SheetTrigger = SheetPrimitive.Trigger;
1626
2418
  var SheetClose = SheetPrimitive.Close;
1627
2419
  var SheetPortal = SheetPrimitive.Portal;
1628
- var SheetOverlay = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx18(
2420
+ var SheetOverlay = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
1629
2421
  SheetPrimitive.Overlay,
1630
2422
  {
1631
2423
  className: cn(
@@ -1654,7 +2446,7 @@ var sheetVariants = cva4(
1654
2446
  }
1655
2447
  }
1656
2448
  );
1657
- var SheetDescription = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx18(
2449
+ var SheetDescription = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
1658
2450
  SheetPrimitive.Description,
1659
2451
  {
1660
2452
  ref,
@@ -1663,7 +2455,7 @@ var SheetDescription = React12.forwardRef(({ className, ...props }, ref) => /* @
1663
2455
  }
1664
2456
  ));
1665
2457
  SheetDescription.displayName = SheetPrimitive.Description.displayName;
1666
- var SheetContent = React12.forwardRef(
2458
+ var SheetContent = React21.forwardRef(
1667
2459
  ({
1668
2460
  side = "right",
1669
2461
  className,
@@ -1673,10 +2465,10 @@ var SheetContent = React12.forwardRef(
1673
2465
  overlayClassName,
1674
2466
  ...props
1675
2467
  }, ref) => {
1676
- const hasDescription = treeContainsComponent(children, SheetDescription) || treeContainsComponent(children, SheetPrimitive.Description);
1677
- return /* @__PURE__ */ jsxs10(SheetPortal, { children: [
1678
- !hideOverlay && /* @__PURE__ */ jsx18(SheetOverlay, { className: overlayClassName }),
1679
- /* @__PURE__ */ jsxs10(
2468
+ const hasDescription = treeContainsComponent2(children, SheetDescription) || treeContainsComponent2(children, SheetPrimitive.Description);
2469
+ return /* @__PURE__ */ jsxs14(SheetPortal, { children: [
2470
+ !hideOverlay && /* @__PURE__ */ jsx26(SheetOverlay, { className: overlayClassName }),
2471
+ /* @__PURE__ */ jsxs14(
1680
2472
  SheetContentBase,
1681
2473
  {
1682
2474
  ref,
@@ -1684,9 +2476,9 @@ var SheetContent = React12.forwardRef(
1684
2476
  ...hasDescription ? {} : { "aria-describedby": void 0 },
1685
2477
  ...props,
1686
2478
  children: [
1687
- !hideCloseButton && /* @__PURE__ */ jsxs10(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
1688
- /* @__PURE__ */ jsx18(Cross2Icon, { className: "h-4 w-4" }),
1689
- /* @__PURE__ */ jsx18("span", { className: "sr-only", children: "Close" })
2479
+ !hideCloseButton && /* @__PURE__ */ jsxs14(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
2480
+ /* @__PURE__ */ jsx26(Cross2Icon, { className: "h-4 w-4" }),
2481
+ /* @__PURE__ */ jsx26("span", { className: "sr-only", children: "Close" })
1690
2482
  ] }),
1691
2483
  children
1692
2484
  ]
@@ -1699,7 +2491,7 @@ SheetContent.displayName = SheetPrimitive.Content.displayName;
1699
2491
  var SheetHeader = ({
1700
2492
  className,
1701
2493
  ...props
1702
- }) => /* @__PURE__ */ jsx18(
2494
+ }) => /* @__PURE__ */ jsx26(
1703
2495
  "div",
1704
2496
  {
1705
2497
  className: cn(
@@ -1713,7 +2505,7 @@ SheetHeader.displayName = "SheetHeader";
1713
2505
  var SheetFooter = ({
1714
2506
  className,
1715
2507
  ...props
1716
- }) => /* @__PURE__ */ jsx18(
2508
+ }) => /* @__PURE__ */ jsx26(
1717
2509
  "div",
1718
2510
  {
1719
2511
  className: cn(
@@ -1724,7 +2516,7 @@ var SheetFooter = ({
1724
2516
  }
1725
2517
  );
1726
2518
  SheetFooter.displayName = "SheetFooter";
1727
- var SheetTitle = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx18(
2519
+ var SheetTitle = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
1728
2520
  SheetPrimitive.Title,
1729
2521
  {
1730
2522
  ref,
@@ -1735,12 +2527,12 @@ var SheetTitle = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE
1735
2527
  SheetTitle.displayName = SheetPrimitive.Title.displayName;
1736
2528
 
1737
2529
  // src/skeleton.tsx
1738
- import { jsx as jsx19 } from "react/jsx-runtime";
2530
+ import { jsx as jsx27 } from "react/jsx-runtime";
1739
2531
  function Skeleton({
1740
2532
  className,
1741
2533
  ...props
1742
2534
  }) {
1743
- return /* @__PURE__ */ jsx19(
2535
+ return /* @__PURE__ */ jsx27(
1744
2536
  "div",
1745
2537
  {
1746
2538
  className: cn("animate-pulse rounded-md bg-primary/10", className),
@@ -1749,31 +2541,70 @@ function Skeleton({
1749
2541
  );
1750
2542
  }
1751
2543
 
2544
+ // src/switch.tsx
2545
+ import * as SwitchPrimitives from "@radix-ui/react-switch";
2546
+ import * as React22 from "react";
2547
+ import { jsx as jsx28 } from "react/jsx-runtime";
2548
+ var SWITCH_SIZES = {
2549
+ sm: {
2550
+ root: "h-4 w-9 border-border data-[state=unchecked]:bg-input",
2551
+ thumb: "h-4 w-4 border border-primary data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
2552
+ },
2553
+ md: {
2554
+ root: "h-5 w-9 border-transparent data-[state=unchecked]:bg-input",
2555
+ thumb: "h-4 w-4 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
2556
+ }
2557
+ };
2558
+ var Switch = React22.forwardRef(({ className, size = "md", ...props }, ref) => /* @__PURE__ */ jsx28(
2559
+ SwitchPrimitives.Root,
2560
+ {
2561
+ ref,
2562
+ "data-slot": "switch",
2563
+ className: cn(
2564
+ "peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary",
2565
+ SWITCH_SIZES[size].root,
2566
+ className
2567
+ ),
2568
+ ...props,
2569
+ children: /* @__PURE__ */ jsx28(
2570
+ SwitchPrimitives.Thumb,
2571
+ {
2572
+ "data-slot": "switch-thumb",
2573
+ className: cn(
2574
+ "pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform",
2575
+ SWITCH_SIZES[size].thumb
2576
+ )
2577
+ }
2578
+ )
2579
+ }
2580
+ ));
2581
+ Switch.displayName = SwitchPrimitives.Root.displayName;
2582
+
1752
2583
  // src/tabbed-bottom-sheet.tsx
1753
- import { useState as useState5 } from "react";
1754
- import { jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
2584
+ import { useState as useState6 } from "react";
2585
+ import { jsx as jsx29, jsxs as jsxs15 } from "react/jsx-runtime";
1755
2586
  function TabbedBottomSheet({
1756
2587
  open,
1757
2588
  onOpenChange,
1758
2589
  title,
1759
2590
  tabs
1760
2591
  }) {
1761
- const [selectedTabId, setSelectedTabId] = useState5(null);
1762
- const [wasOpen, setWasOpen] = useState5(open);
2592
+ const [selectedTabId, setSelectedTabId] = useState6(null);
2593
+ const [wasOpen, setWasOpen] = useState6(open);
1763
2594
  if (open !== wasOpen) {
1764
2595
  setWasOpen(open);
1765
2596
  if (open) setSelectedTabId(null);
1766
2597
  }
1767
2598
  const selectedTab = selectedTabId ? tabs.find((tab) => tab.id === selectedTabId) : null;
1768
- return /* @__PURE__ */ jsx20(
2599
+ return /* @__PURE__ */ jsx29(
1769
2600
  BottomSheet,
1770
2601
  {
1771
2602
  open,
1772
2603
  onOpenChange,
1773
2604
  title,
1774
2605
  size: "full",
1775
- children: /* @__PURE__ */ jsxs11("div", { className: "matrx-mobile-sheet flex min-h-0 flex-1 flex-col", children: [
1776
- /* @__PURE__ */ jsx20(
2606
+ children: /* @__PURE__ */ jsxs15("div", { className: "matrx-mobile-sheet flex min-h-0 flex-1 flex-col", children: [
2607
+ /* @__PURE__ */ jsx29(
1777
2608
  BottomSheetHeader,
1778
2609
  {
1779
2610
  title: selectedTab ? selectedTab.label : title,
@@ -1781,19 +2612,19 @@ function TabbedBottomSheet({
1781
2612
  onBack: () => setSelectedTabId(null)
1782
2613
  }
1783
2614
  ),
1784
- selectedTab ? /* @__PURE__ */ jsx20("div", { className: "flex min-h-0 flex-1 flex-col overflow-hidden pb-safe", children: selectedTab.content }) : /* @__PURE__ */ jsx20(BottomSheetBody, { children: /* @__PURE__ */ jsx20("ul", { className: "divide-y divide-border", children: tabs.map((tab) => {
2615
+ selectedTab ? /* @__PURE__ */ jsx29("div", { className: "flex min-h-0 flex-1 flex-col overflow-hidden pb-safe", children: selectedTab.content }) : /* @__PURE__ */ jsx29(BottomSheetBody, { children: /* @__PURE__ */ jsx29("ul", { className: "divide-y divide-border", children: tabs.map((tab) => {
1785
2616
  const Icon2 = tab.icon;
1786
- return /* @__PURE__ */ jsx20("li", { children: /* @__PURE__ */ jsxs11(
2617
+ return /* @__PURE__ */ jsx29("li", { children: /* @__PURE__ */ jsxs15(
1787
2618
  "button",
1788
2619
  {
1789
2620
  type: "button",
1790
2621
  onClick: () => setSelectedTabId(tab.id),
1791
2622
  className: "flex w-full items-center gap-3 px-4 py-3.5 text-left transition-colors hover:bg-muted/60 active:bg-muted",
1792
2623
  children: [
1793
- Icon2 ? /* @__PURE__ */ jsx20(Icon2, { className: "h-5 w-5 shrink-0 text-muted-foreground" }) : null,
1794
- /* @__PURE__ */ jsx20("span", { className: "min-w-0 flex-1 text-base text-foreground", children: tab.label }),
2624
+ Icon2 ? /* @__PURE__ */ jsx29(Icon2, { className: "h-5 w-5 shrink-0 text-muted-foreground" }) : null,
2625
+ /* @__PURE__ */ jsx29("span", { className: "min-w-0 flex-1 text-base text-foreground", children: tab.label }),
1795
2626
  tab.trailing,
1796
- /* @__PURE__ */ jsx20(ChevronRightIcon, { className: "h-5 w-5 shrink-0 text-muted-foreground" })
2627
+ /* @__PURE__ */ jsx29(ChevronRightIcon, { className: "h-5 w-5 shrink-0 text-muted-foreground" })
1797
2628
  ]
1798
2629
  }
1799
2630
  ) }, tab.id);
@@ -1803,17 +2634,342 @@ function TabbedBottomSheet({
1803
2634
  );
1804
2635
  }
1805
2636
 
2637
+ // src/table.tsx
2638
+ import * as React23 from "react";
2639
+ import { jsx as jsx30 } from "react/jsx-runtime";
2640
+ var TABLE_SIZES = {
2641
+ sm: { head: "px-2", cell: "p-2" },
2642
+ md: { head: "px-3", cell: "p-3" }
2643
+ };
2644
+ var TableSizeContext = React23.createContext("md");
2645
+ function useTableSize() {
2646
+ return React23.useContext(TableSizeContext);
2647
+ }
2648
+ var Table = React23.forwardRef(
2649
+ ({ className, size = "md", wrap = true, wrapperClassName, ...props }, ref) => {
2650
+ const table = /* @__PURE__ */ jsx30(
2651
+ "table",
2652
+ {
2653
+ ref,
2654
+ "data-slot": "table",
2655
+ "data-size": size,
2656
+ className: cn("w-full caption-bottom text-sm", className),
2657
+ ...props
2658
+ }
2659
+ );
2660
+ return /* @__PURE__ */ jsx30(TableSizeContext.Provider, { value: size, children: wrap ? /* @__PURE__ */ jsx30(
2661
+ "div",
2662
+ {
2663
+ "data-slot": "table-wrapper",
2664
+ className: cn("relative w-full overflow-auto", wrapperClassName),
2665
+ children: table
2666
+ }
2667
+ ) : table });
2668
+ }
2669
+ );
2670
+ Table.displayName = "Table";
2671
+ var TableHeader = React23.forwardRef(({ className, sticky = false, ...props }, ref) => /* @__PURE__ */ jsx30(
2672
+ "thead",
2673
+ {
2674
+ ref,
2675
+ "data-slot": "table-header",
2676
+ className: cn(
2677
+ "[&_tr]:border-b",
2678
+ sticky && "sticky top-0 z-10 bg-background",
2679
+ className
2680
+ ),
2681
+ ...props
2682
+ }
2683
+ ));
2684
+ TableHeader.displayName = "TableHeader";
2685
+ var TableBody = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
2686
+ "tbody",
2687
+ {
2688
+ ref,
2689
+ "data-slot": "table-body",
2690
+ className: cn("[&_tr:last-child]:border-0", className),
2691
+ ...props
2692
+ }
2693
+ ));
2694
+ TableBody.displayName = "TableBody";
2695
+ var TableFooter = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
2696
+ "tfoot",
2697
+ {
2698
+ ref,
2699
+ "data-slot": "table-footer",
2700
+ className: cn(
2701
+ "border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
2702
+ className
2703
+ ),
2704
+ ...props
2705
+ }
2706
+ ));
2707
+ TableFooter.displayName = "TableFooter";
2708
+ var TableRow = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
2709
+ "tr",
2710
+ {
2711
+ ref,
2712
+ "data-slot": "table-row",
2713
+ className: cn(
2714
+ "border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
2715
+ className
2716
+ ),
2717
+ ...props
2718
+ }
2719
+ ));
2720
+ TableRow.displayName = "TableRow";
2721
+ var TableHead = React23.forwardRef(({ className, ...props }, ref) => {
2722
+ const size = useTableSize();
2723
+ return /* @__PURE__ */ jsx30(
2724
+ "th",
2725
+ {
2726
+ ref,
2727
+ "data-slot": "table-head",
2728
+ className: cn(
2729
+ "h-10 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
2730
+ TABLE_SIZES[size].head,
2731
+ className
2732
+ ),
2733
+ ...props
2734
+ }
2735
+ );
2736
+ });
2737
+ TableHead.displayName = "TableHead";
2738
+ var TableCell = React23.forwardRef(({ className, ...props }, ref) => {
2739
+ const size = useTableSize();
2740
+ return /* @__PURE__ */ jsx30(
2741
+ "td",
2742
+ {
2743
+ ref,
2744
+ "data-slot": "table-cell",
2745
+ className: cn(
2746
+ "align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
2747
+ TABLE_SIZES[size].cell,
2748
+ className
2749
+ ),
2750
+ ...props
2751
+ }
2752
+ );
2753
+ });
2754
+ TableCell.displayName = "TableCell";
2755
+ var TableCaption = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
2756
+ "caption",
2757
+ {
2758
+ ref,
2759
+ "data-slot": "table-caption",
2760
+ className: cn("mt-4 text-sm text-muted-foreground", className),
2761
+ ...props
2762
+ }
2763
+ ));
2764
+ TableCaption.displayName = "TableCaption";
2765
+
2766
+ // src/tabs.tsx
2767
+ import * as TabsPrimitive from "@radix-ui/react-tabs";
2768
+ import * as React24 from "react";
2769
+ import { jsx as jsx31 } from "react/jsx-runtime";
2770
+ var Tabs = TabsPrimitive.Root;
2771
+ var TABS_TRIGGER_BASE = "inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all 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=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm";
2772
+ var TabsList = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx31(
2773
+ TabsPrimitive.List,
2774
+ {
2775
+ ref,
2776
+ "data-slot": "tabs-list",
2777
+ className: cn(
2778
+ "inline-flex h-9 items-center justify-center gap-1 rounded-lg bg-muted p-1 text-muted-foreground",
2779
+ className
2780
+ ),
2781
+ ...props
2782
+ }
2783
+ ));
2784
+ TabsList.displayName = TabsPrimitive.List.displayName;
2785
+ var TabsTrigger = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx31(
2786
+ TabsPrimitive.Trigger,
2787
+ {
2788
+ ref,
2789
+ "data-slot": "tabs-trigger",
2790
+ className: cn(
2791
+ TABS_TRIGGER_BASE,
2792
+ "text-muted-foreground hover:text-foreground",
2793
+ className
2794
+ ),
2795
+ ...props
2796
+ }
2797
+ ));
2798
+ TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
2799
+ var TabsTriggerCore = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx31(
2800
+ TabsPrimitive.Trigger,
2801
+ {
2802
+ ref,
2803
+ "data-slot": "tabs-trigger",
2804
+ className: cn(TABS_TRIGGER_BASE, className),
2805
+ ...props
2806
+ }
2807
+ ));
2808
+ TabsTriggerCore.displayName = TabsPrimitive.Trigger.displayName;
2809
+ var TabsContent = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx31(
2810
+ TabsPrimitive.Content,
2811
+ {
2812
+ ref,
2813
+ "data-slot": "tabs-content",
2814
+ className: cn(
2815
+ "data-[state=inactive]:hidden",
2816
+ "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
2817
+ className
2818
+ ),
2819
+ ...props
2820
+ }
2821
+ ));
2822
+ TabsContent.displayName = TabsPrimitive.Content.displayName;
2823
+
2824
+ // src/textarea.tsx
2825
+ import * as React25 from "react";
2826
+ import { jsx as jsx32, jsxs as jsxs16 } from "react/jsx-runtime";
2827
+ var FILL_HEIGHT_REGEX = /(?:^|\s)(h-full|h-dvh|flex-1|grow)(?:\s|$)/;
2828
+ var FILL_WIDTH_REGEX = /(?:^|\s)(w-full|w-screen)(?:\s|$)/;
2829
+ function getStretchClasses(className) {
2830
+ if (!className) return void 0;
2831
+ const fills = [];
2832
+ if (FILL_HEIGHT_REGEX.test(className)) fills.push("h-full min-h-0");
2833
+ if (FILL_WIDTH_REGEX.test(className)) fills.push("w-full");
2834
+ return fills.length ? fills.join(" ") : void 0;
2835
+ }
2836
+ var TEXTAREA_ELEVATED_CLASS = "flex h-auto w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground shadow-textarea transition duration-400 placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50";
2837
+ var TEXTAREA_CONTROL_CLASS = "flex w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm text-foreground shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50";
2838
+ function useAutoGrow(ref, value, autoGrow = false, minHeight, maxHeight) {
2839
+ React25.useEffect(() => {
2840
+ if (!autoGrow || !ref.current) return;
2841
+ const textarea = ref.current;
2842
+ textarea.style.height = "auto";
2843
+ let newHeight = textarea.scrollHeight;
2844
+ if (minHeight) newHeight = Math.max(newHeight, minHeight);
2845
+ if (maxHeight && newHeight >= maxHeight) {
2846
+ textarea.style.height = `${maxHeight}px`;
2847
+ textarea.style.overflowY = "auto";
2848
+ } else {
2849
+ textarea.style.height = `${newHeight}px`;
2850
+ textarea.style.overflowY = "hidden";
2851
+ }
2852
+ }, [value, autoGrow, minHeight, maxHeight, ref]);
2853
+ }
2854
+ function useMergedTextareaRef(forwarded) {
2855
+ const internal = React25.useRef(null);
2856
+ const callback = React25.useCallback(
2857
+ (node) => {
2858
+ internal.current = node;
2859
+ if (typeof forwarded === "function") forwarded(node);
2860
+ else if (forwarded) forwarded.current = node;
2861
+ },
2862
+ [forwarded]
2863
+ );
2864
+ return { ref: internal, callback };
2865
+ }
2866
+ function boxStyle(minHeight, maxHeight) {
2867
+ if (minHeight === void 0 && maxHeight === void 0) return void 0;
2868
+ return {
2869
+ minHeight: minHeight ? `${minHeight}px` : void 0,
2870
+ maxHeight: maxHeight ? `${maxHeight}px` : void 0
2871
+ };
2872
+ }
2873
+ var Textarea = React25.forwardRef(
2874
+ ({ className, autoGrow, minHeight, maxHeight, wrapperClassName, ...props }, forwarded) => {
2875
+ const { ref, callback } = useMergedTextareaRef(forwarded);
2876
+ const stretchClasses = getStretchClasses(className);
2877
+ const needsWrapper = Boolean(wrapperClassName || stretchClasses);
2878
+ useAutoGrow(ref, props.value, autoGrow, minHeight, maxHeight);
2879
+ const textarea = /* @__PURE__ */ jsx32(
2880
+ "textarea",
2881
+ {
2882
+ ref: callback,
2883
+ "data-slot": "textarea",
2884
+ className: cn(
2885
+ TEXTAREA_ELEVATED_CLASS,
2886
+ autoGrow && "resize-none",
2887
+ stretchClasses,
2888
+ className
2889
+ ),
2890
+ style: boxStyle(minHeight, maxHeight),
2891
+ ...props
2892
+ }
2893
+ );
2894
+ if (!needsWrapper) return textarea;
2895
+ return /* @__PURE__ */ jsx32("div", { className: cn(stretchClasses, wrapperClassName), children: textarea });
2896
+ }
2897
+ );
2898
+ Textarea.displayName = "Textarea";
2899
+ var BasicTextarea = React25.forwardRef(
2900
+ ({ className, autoGrow, minHeight, maxHeight, ...props }, forwarded) => {
2901
+ const { ref, callback } = useMergedTextareaRef(forwarded);
2902
+ useAutoGrow(ref, props.value, autoGrow, minHeight, maxHeight);
2903
+ return /* @__PURE__ */ jsx32(
2904
+ "textarea",
2905
+ {
2906
+ ref: callback,
2907
+ "data-slot": "textarea",
2908
+ className: cn(
2909
+ TEXTAREA_CONTROL_CLASS,
2910
+ "h-auto min-h-[60px]",
2911
+ autoGrow && "resize-none",
2912
+ className
2913
+ ),
2914
+ style: boxStyle(minHeight, maxHeight),
2915
+ ...props
2916
+ }
2917
+ );
2918
+ }
2919
+ );
2920
+ BasicTextarea.displayName = "BasicTextarea";
2921
+ var TextareaWithPrefix = React25.forwardRef(
2922
+ ({
2923
+ prefix,
2924
+ className,
2925
+ wrapperClassName,
2926
+ autoGrow,
2927
+ minHeight,
2928
+ maxHeight,
2929
+ ...props
2930
+ }, forwarded) => {
2931
+ const { ref, callback } = useMergedTextareaRef(forwarded);
2932
+ useAutoGrow(ref, props.value, autoGrow, minHeight, maxHeight);
2933
+ return /* @__PURE__ */ jsxs16(
2934
+ "div",
2935
+ {
2936
+ className: cn("relative", getStretchClasses(className), wrapperClassName),
2937
+ children: [
2938
+ prefix ? /* @__PURE__ */ jsx32("div", { className: "pointer-events-none absolute left-3 top-3 z-10 text-muted-foreground", children: prefix }) : null,
2939
+ /* @__PURE__ */ jsx32(
2940
+ "textarea",
2941
+ {
2942
+ ref: callback,
2943
+ "data-slot": "textarea",
2944
+ className: cn(
2945
+ TEXTAREA_CONTROL_CLASS,
2946
+ "resize-y",
2947
+ prefix && "pl-10",
2948
+ autoGrow && "resize-none",
2949
+ className
2950
+ ),
2951
+ style: boxStyle(minHeight, maxHeight),
2952
+ ...props
2953
+ }
2954
+ )
2955
+ ]
2956
+ }
2957
+ );
2958
+ }
2959
+ );
2960
+ TextareaWithPrefix.displayName = "TextareaWithPrefix";
2961
+
1806
2962
  // src/use-scroll-fade.ts
1807
- import { useCallback as useCallback2, useEffect as useEffect3, useRef as useRef4, useState as useState6 } from "react";
2963
+ import { useCallback as useCallback4, useEffect as useEffect4, useRef as useRef5, useState as useState7 } from "react";
1808
2964
  var EPSILON = 2;
1809
2965
  function useScrollFade() {
1810
- const [state, setState] = useState6({
2966
+ const [state, setState] = useState7({
1811
2967
  top: false,
1812
2968
  bottom: false
1813
2969
  });
1814
- const nodeRef = useRef4(null);
1815
- const cleanupRef = useRef4(null);
1816
- const measure = useCallback2(() => {
2970
+ const nodeRef = useRef5(null);
2971
+ const cleanupRef = useRef5(null);
2972
+ const measure = useCallback4(() => {
1817
2973
  const el = nodeRef.current;
1818
2974
  if (!el) return;
1819
2975
  const overflowing = el.scrollHeight - el.clientHeight > EPSILON;
@@ -1825,7 +2981,7 @@ function useScrollFade() {
1825
2981
  (prev) => prev.top === next.top && prev.bottom === next.bottom ? prev : next
1826
2982
  );
1827
2983
  }, []);
1828
- const ref = useCallback2(
2984
+ const ref = useCallback4(
1829
2985
  (node) => {
1830
2986
  cleanupRef.current?.();
1831
2987
  cleanupRef.current = null;
@@ -1845,7 +3001,7 @@ function useScrollFade() {
1845
3001
  },
1846
3002
  [measure]
1847
3003
  );
1848
- useEffect3(() => () => cleanupRef.current?.(), []);
3004
+ useEffect4(() => () => cleanupRef.current?.(), []);
1849
3005
  return {
1850
3006
  ref,
1851
3007
  state,
@@ -1857,13 +3013,28 @@ function useScrollFade() {
1857
3013
  };
1858
3014
  }
1859
3015
  export {
3016
+ Avatar,
3017
+ AvatarFallback,
3018
+ AvatarImage,
1860
3019
  Badge,
1861
3020
  BasicInput,
3021
+ BasicTextarea,
1862
3022
  BottomSheet,
1863
3023
  BottomSheetBody,
1864
3024
  BottomSheetFooter,
1865
3025
  BottomSheetHeader,
1866
3026
  Button,
3027
+ Card,
3028
+ CardAction,
3029
+ CardContent,
3030
+ CardDescription,
3031
+ CardFooter,
3032
+ CardHeader,
3033
+ CardTitle,
3034
+ Checkbox,
3035
+ Collapsible,
3036
+ CollapsibleContent2 as CollapsibleContent,
3037
+ CollapsibleTrigger2 as CollapsibleTrigger,
1867
3038
  Command,
1868
3039
  CommandDialog,
1869
3040
  CommandEmpty,
@@ -1873,21 +3044,66 @@ export {
1873
3044
  CommandList,
1874
3045
  CommandSeparator,
1875
3046
  CommandShortcut,
3047
+ ContextMenu,
3048
+ ContextMenuCheckboxItem,
3049
+ ContextMenuContent,
3050
+ ContextMenuGroup,
3051
+ ContextMenuItem,
3052
+ ContextMenuLabel,
3053
+ ContextMenuPortal,
3054
+ ContextMenuRadioGroup,
3055
+ ContextMenuRadioItem,
3056
+ ContextMenuSeparator,
3057
+ ContextMenuShortcut,
3058
+ ContextMenuSub,
3059
+ ContextMenuSubContent,
3060
+ ContextMenuSubTrigger,
3061
+ ContextMenuTrigger,
1876
3062
  CreatablePicker,
1877
3063
  DEFAULT_SCORE_THRESHOLDS,
3064
+ Dialog,
3065
+ DialogClose,
3066
+ DialogContent,
3067
+ DialogContentPrimitive,
3068
+ DialogDescription,
3069
+ DialogFooter,
3070
+ DialogHeader,
3071
+ DialogOverlay,
3072
+ DialogPortal,
3073
+ DialogTitle,
3074
+ DialogTrigger,
3075
+ DropdownMenu,
3076
+ DropdownMenuCheckboxItem,
3077
+ DropdownMenuContent,
3078
+ DropdownMenuGroup,
3079
+ DropdownMenuItem,
3080
+ DropdownMenuLabel,
3081
+ DropdownMenuPortal,
3082
+ DropdownMenuRadioGroup,
3083
+ DropdownMenuRadioItem,
3084
+ DropdownMenuSeparator,
3085
+ DropdownMenuShortcut,
3086
+ DropdownMenuSub,
3087
+ DropdownMenuSubContent,
3088
+ DropdownMenuSubTrigger,
3089
+ DropdownMenuTrigger,
1878
3090
  EditableLabel,
1879
3091
  EnterInput,
1880
3092
  Input,
1881
3093
  InputWithPrefix,
1882
- Label,
3094
+ Label3 as Label,
3095
+ MOBILE_BREAKPOINT,
1883
3096
  OverflowToolbar,
1884
3097
  Popover,
1885
3098
  PopoverAnchor,
1886
3099
  PopoverContent,
1887
3100
  PopoverTrigger,
1888
3101
  PortalContainerProvider,
3102
+ Progress,
1889
3103
  RadixDialogModalProvider,
1890
3104
  ScoreRing,
3105
+ ScrollArea,
3106
+ ScrollBar,
1891
3107
  SegmentedControl,
1892
3108
  Select,
1893
3109
  SelectContent,
@@ -1899,7 +3115,7 @@ export {
1899
3115
  SelectSeparator,
1900
3116
  SelectTrigger,
1901
3117
  SelectValue,
1902
- Separator2 as Separator,
3118
+ Separator4 as Separator,
1903
3119
  Sheet,
1904
3120
  SheetClose,
1905
3121
  SheetContent,
@@ -1911,7 +3127,23 @@ export {
1911
3127
  SheetTitle,
1912
3128
  SheetTrigger,
1913
3129
  Skeleton,
3130
+ Switch,
1914
3131
  TabbedBottomSheet,
3132
+ Table,
3133
+ TableBody,
3134
+ TableCaption,
3135
+ TableCell,
3136
+ TableFooter,
3137
+ TableHead,
3138
+ TableHeader,
3139
+ TableRow,
3140
+ Tabs,
3141
+ TabsContent,
3142
+ TabsList,
3143
+ TabsTrigger,
3144
+ TabsTriggerCore,
3145
+ Textarea,
3146
+ TextareaWithPrefix,
1915
3147
  badgeVariants,
1916
3148
  buttonVariants,
1917
3149
  cn,
@@ -1919,8 +3151,12 @@ export {
1919
3151
  scoreRingColorClasses,
1920
3152
  selectTriggerVariants,
1921
3153
  sheetVariants,
3154
+ useCardSize,
3155
+ useDialogContainer,
3156
+ useIsMobile,
1922
3157
  usePortalContainer,
1923
3158
  useRadixDialogModal,
1924
- useScrollFade
3159
+ useScrollFade,
3160
+ useTableSize
1925
3161
  };
1926
3162
  //# sourceMappingURL=index.js.map