@ai-matrx/design-system 0.4.2 → 0.5.0

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