@still-void/ui 2.0.1 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -31,6 +31,17 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  // src/react/client/index.ts
32
32
  var client_exports = {};
33
33
  __export(client_exports, {
34
+ AlertDialog: () => AlertDialog,
35
+ AlertDialogAction: () => AlertDialogAction,
36
+ AlertDialogCancel: () => AlertDialogCancel,
37
+ AlertDialogContent: () => AlertDialogContent,
38
+ AlertDialogDescription: () => AlertDialogDescription,
39
+ AlertDialogFooter: () => AlertDialogFooter,
40
+ AlertDialogHeader: () => AlertDialogHeader,
41
+ AlertDialogOverlay: () => AlertDialogOverlay,
42
+ AlertDialogPortal: () => AlertDialogPortal,
43
+ AlertDialogTitle: () => AlertDialogTitle,
44
+ AlertDialogTrigger: () => AlertDialogTrigger,
34
45
  CopyButton: () => CopyButton,
35
46
  DEFAULT_STORAGE_KEY: () => DEFAULT_STORAGE_KEY,
36
47
  Dialog: () => Dialog,
@@ -489,7 +500,7 @@ function ReadingProgress({ target, announce, className, ...rest }) {
489
500
  }
490
501
 
491
502
  // src/components/ui/dialog.tsx
492
- var React = __toESM(require("react"), 1);
503
+ var React2 = __toESM(require("react"), 1);
493
504
  var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
494
505
 
495
506
  // src/lib/utils.ts
@@ -499,373 +510,475 @@ function cn(...inputs) {
499
510
  return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
500
511
  }
501
512
 
502
- // src/components/ui/dialog.tsx
513
+ // src/components/ui/icon.tsx
514
+ var React = __toESM(require("react"), 1);
515
+
516
+ // src/components/ui/icon-set.ts
517
+ var import_outline = require("@heroicons/react/24/outline");
518
+ var ICON_GLYPHS = {
519
+ x: import_outline.XMarkIcon,
520
+ check: import_outline.CheckIcon,
521
+ "chevron-down": import_outline.ChevronDownIcon,
522
+ "chevron-up": import_outline.ChevronUpIcon,
523
+ "chevron-right": import_outline.ChevronRightIcon,
524
+ "chevron-left": import_outline.ChevronLeftIcon,
525
+ info: import_outline.InformationCircleIcon,
526
+ "alert-triangle": import_outline.ExclamationTriangleIcon,
527
+ "alert-circle": import_outline.ExclamationCircleIcon,
528
+ "check-circle": import_outline.CheckCircleIcon,
529
+ copy: import_outline.DocumentDuplicateIcon,
530
+ sun: import_outline.SunIcon,
531
+ moon: import_outline.MoonIcon,
532
+ search: import_outline.MagnifyingGlassIcon,
533
+ menu: import_outline.Bars3Icon
534
+ };
535
+ var ICON_NAMES = Object.keys(ICON_GLYPHS);
536
+ var ICON_FALLBACK_NAME = "alert-circle";
537
+
538
+ // src/components/ui/icon.tsx
503
539
  var import_jsx_runtime6 = require("react/jsx-runtime");
540
+ var Icon = React.forwardRef(
541
+ ({ name, size = "md", label, className, ...props }, ref) => {
542
+ const Glyph = ICON_GLYPHS[name] ?? ICON_GLYPHS[ICON_FALLBACK_NAME];
543
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
544
+ Glyph,
545
+ {
546
+ ...props,
547
+ ref,
548
+ className: cn(
549
+ "sv-icon",
550
+ size === "sm" && "sv-icon--sm",
551
+ size === "lg" && "sv-icon--lg",
552
+ className
553
+ ),
554
+ "aria-hidden": label === void 0 ? "true" : void 0,
555
+ role: label === void 0 ? void 0 : "img",
556
+ "aria-label": label
557
+ }
558
+ );
559
+ }
560
+ );
561
+ Icon.displayName = "Icon";
562
+
563
+ // src/components/ui/dialog.tsx
564
+ var import_jsx_runtime7 = require("react/jsx-runtime");
504
565
  var Dialog = DialogPrimitive.Root;
505
566
  var DialogTrigger = DialogPrimitive.Trigger;
506
567
  var DialogPortal = DialogPrimitive.Portal;
507
568
  var DialogClose = DialogPrimitive.Close;
508
- var DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
569
+ var DialogOverlay = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
509
570
  DialogPrimitive.Overlay,
510
571
  {
511
572
  ref,
512
- className: cn(
513
- "fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
514
- className
515
- ),
573
+ className: cn("sv-overlay", className),
516
574
  ...props
517
575
  }
518
576
  ));
519
- DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
520
- var DialogContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(DialogPortal, { children: [
521
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogOverlay, {}),
522
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
577
+ DialogOverlay.displayName = "DialogOverlay";
578
+ var DialogContent = React2.forwardRef(({ className, children, showCloseButton = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(DialogPortal, { children: [
579
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DialogOverlay, {}),
580
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
523
581
  DialogPrimitive.Content,
524
582
  {
525
583
  ref,
526
- className: cn(
527
- "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-sv-border bg-sv-surface p-6 shadow-lg 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",
528
- className
529
- ),
530
- ...props
584
+ className: cn("sv-dialog", className),
585
+ ...props,
586
+ "aria-modal": "true",
587
+ children: [
588
+ children,
589
+ showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(DialogPrimitive.Close, { className: "sv-dialog__close", children: [
590
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { name: "x" }),
591
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "sv-sr-only", children: "Close dialog" })
592
+ ] }) : null
593
+ ]
531
594
  }
532
595
  )
533
596
  ] }));
534
- DialogContent.displayName = DialogPrimitive.Content.displayName;
597
+ DialogContent.displayName = "DialogContent";
535
598
  var DialogHeader = ({
536
599
  className,
537
600
  ...props
538
- }) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
539
- "div",
601
+ }) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: cn("sv-dialog__header", className), ...props });
602
+ DialogHeader.displayName = "DialogHeader";
603
+ var DialogFooter = ({
604
+ className,
605
+ ...props
606
+ }) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: cn("sv-dialog__footer", className), ...props });
607
+ DialogFooter.displayName = "DialogFooter";
608
+ var DialogTitle = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
609
+ DialogPrimitive.Title,
540
610
  {
541
- className: cn(
542
- "flex flex-col space-y-1.5 text-center sm:text-left",
543
- className
544
- ),
611
+ ref,
612
+ className: cn("sv-dialog__title", className),
545
613
  ...props
546
614
  }
547
- );
548
- DialogHeader.displayName = "DialogHeader";
549
- var DialogFooter = ({
615
+ ));
616
+ DialogTitle.displayName = "DialogTitle";
617
+ var DialogDescription = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
618
+ DialogPrimitive.Description,
619
+ {
620
+ ref,
621
+ className: cn("sv-dialog__description", className),
622
+ ...props
623
+ }
624
+ ));
625
+ DialogDescription.displayName = "DialogDescription";
626
+
627
+ // src/components/ui/alert-dialog.tsx
628
+ var React3 = __toESM(require("react"), 1);
629
+ var AlertDialogPrimitive = __toESM(require("@radix-ui/react-alert-dialog"), 1);
630
+ var import_jsx_runtime8 = require("react/jsx-runtime");
631
+ var AlertDialog = AlertDialogPrimitive.Root;
632
+ var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
633
+ var AlertDialogPortal = AlertDialogPrimitive.Portal;
634
+ var AlertDialogOverlay = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
635
+ AlertDialogPrimitive.Overlay,
636
+ {
637
+ ref,
638
+ className: cn("sv-overlay", className),
639
+ ...props
640
+ }
641
+ ));
642
+ AlertDialogOverlay.displayName = "AlertDialogOverlay";
643
+ var AlertDialogContent = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(AlertDialogPortal, { children: [
644
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(AlertDialogOverlay, {}),
645
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
646
+ AlertDialogPrimitive.Content,
647
+ {
648
+ ref,
649
+ "aria-modal": "true",
650
+ className: cn("sv-dialog", className),
651
+ ...props
652
+ }
653
+ )
654
+ ] }));
655
+ AlertDialogContent.displayName = "AlertDialogContent";
656
+ var AlertDialogHeader = ({
657
+ className,
658
+ ...props
659
+ }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: cn("sv-dialog__header", className), ...props });
660
+ AlertDialogHeader.displayName = "AlertDialogHeader";
661
+ var AlertDialogFooter = ({
550
662
  className,
551
663
  ...props
552
- }) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
553
- "div",
664
+ }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: cn("sv-dialog__footer", className), ...props });
665
+ AlertDialogFooter.displayName = "AlertDialogFooter";
666
+ var AlertDialogTitle = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
667
+ AlertDialogPrimitive.Title,
554
668
  {
555
- className: cn(
556
- "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
557
- className
558
- ),
669
+ ref,
670
+ className: cn("sv-dialog__title", className),
559
671
  ...props
560
672
  }
561
- );
562
- DialogFooter.displayName = "DialogFooter";
563
- var DialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
564
- DialogPrimitive.Title,
673
+ ));
674
+ AlertDialogTitle.displayName = "AlertDialogTitle";
675
+ var AlertDialogDescription = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
676
+ AlertDialogPrimitive.Description,
565
677
  {
566
678
  ref,
567
- className: cn(
568
- "text-lg font-semibold leading-none tracking-tight",
569
- className
570
- ),
679
+ className: cn("sv-dialog__description", className),
571
680
  ...props
572
681
  }
573
682
  ));
574
- DialogTitle.displayName = DialogPrimitive.Title.displayName;
575
- var DialogDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
576
- DialogPrimitive.Description,
683
+ AlertDialogDescription.displayName = "AlertDialogDescription";
684
+ var AlertDialogAction = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
685
+ AlertDialogPrimitive.Action,
577
686
  {
578
687
  ref,
579
- className: cn("text-sm text-sv-text-2", className),
688
+ className: cn(className),
580
689
  ...props
581
690
  }
582
691
  ));
583
- DialogDescription.displayName = DialogPrimitive.Description.displayName;
692
+ AlertDialogAction.displayName = "AlertDialogAction";
693
+ var AlertDialogCancel = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
694
+ AlertDialogPrimitive.Cancel,
695
+ {
696
+ ref,
697
+ className: cn(className),
698
+ ...props
699
+ }
700
+ ));
701
+ AlertDialogCancel.displayName = "AlertDialogCancel";
584
702
 
585
703
  // src/components/ui/select.tsx
586
- var React2 = __toESM(require("react"), 1);
704
+ var React4 = __toESM(require("react"), 1);
587
705
  var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
588
- var import_jsx_runtime7 = require("react/jsx-runtime");
706
+ var import_jsx_runtime9 = require("react/jsx-runtime");
589
707
  var Select = SelectPrimitive.Root;
590
708
  var SelectGroup = SelectPrimitive.Group;
591
709
  var SelectValue = SelectPrimitive.Value;
592
- var SelectTrigger = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
593
- SelectPrimitive.Trigger,
594
- {
595
- ref,
596
- className: cn(
597
- "flex h-10 w-full items-center justify-between rounded-md border border-sv-border bg-sv-surface px-3 py-2 text-sm ring-offset-background placeholder:text-sv-text-2 focus:outline-none focus:ring-2 focus:ring-accent focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
598
- className
599
- ),
600
- ...props
601
- }
602
- ));
603
- SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
604
- var SelectScrollUpButton = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
710
+ var SelectTrigger = React4.forwardRef(
711
+ ({ className, children, icon = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Icon, { name: "chevron-down" }), ...props }, ref) => (
712
+ // The trigger IS a form field, so it shares .sv-field with Input, Textarea
713
+ // and NativeSelect rather than restating the frame. The utility string this
714
+ // replaces named `ring-offset-background` and `focus:ring-accent`, neither
715
+ // of which this package ever declared: the field had no visible focus.
716
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
717
+ SelectPrimitive.Trigger,
718
+ {
719
+ ref,
720
+ className: cn("sv-field", className),
721
+ ...props,
722
+ children: [
723
+ children,
724
+ icon === null ? null : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SelectPrimitive.Icon, { children: icon })
725
+ ]
726
+ }
727
+ )
728
+ )
729
+ );
730
+ SelectTrigger.displayName = "SelectTrigger";
731
+ var SelectScrollUpButton = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
605
732
  SelectPrimitive.ScrollUpButton,
606
733
  {
607
734
  ref,
608
- className: cn(
609
- "flex cursor-pointer items-center justify-center py-1",
610
- className
611
- ),
612
- ...props
735
+ className: cn("sv-pop__scroll", className),
736
+ ...props,
737
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Icon, { name: "chevron-up" })
613
738
  }
614
739
  ));
615
- SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
616
- var SelectScrollDownButton = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
740
+ SelectScrollUpButton.displayName = "SelectScrollUpButton";
741
+ var SelectScrollDownButton = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
617
742
  SelectPrimitive.ScrollDownButton,
618
743
  {
619
744
  ref,
620
- className: cn(
621
- "flex cursor-pointer items-center justify-center py-1",
622
- className
623
- ),
624
- ...props
745
+ className: cn("sv-pop__scroll", className),
746
+ ...props,
747
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Icon, { name: "chevron-down" })
625
748
  }
626
749
  ));
627
- SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
628
- var SelectContent = React2.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
750
+ SelectScrollDownButton.displayName = "SelectScrollDownButton";
751
+ var SelectContent = React4.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
629
752
  SelectPrimitive.Content,
630
753
  {
631
754
  ref,
632
- className: cn(
633
- "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-sv-border bg-sv-surface text-sv-text shadow-md 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",
634
- position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
635
- className
636
- ),
755
+ className: cn("sv-pop", position === "popper" && "sv-pop--popper", className),
637
756
  position,
638
757
  ...props,
639
758
  children: [
640
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SelectScrollUpButton, {}),
641
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
759
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SelectScrollUpButton, {}),
760
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
642
761
  SelectPrimitive.Viewport,
643
762
  {
644
763
  className: cn(
645
- "p-1",
646
- position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
764
+ "sv-pop__viewport",
765
+ position === "popper" && "sv-pop__viewport--popper"
647
766
  ),
648
767
  children
649
768
  }
650
769
  ),
651
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SelectScrollDownButton, {})
770
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SelectScrollDownButton, {})
652
771
  ]
653
772
  }
654
773
  ) }));
655
- SelectContent.displayName = SelectPrimitive.Content.displayName;
656
- var SelectItem = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
774
+ SelectContent.displayName = "SelectContent";
775
+ var SelectItem = React4.forwardRef(({ className, children, icon = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Icon, { name: "check" }), ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
657
776
  SelectPrimitive.Item,
658
777
  {
659
778
  ref,
660
- className: cn(
661
- "relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-sv-surface-2 focus:text-sv-text data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
662
- className
663
- ),
664
- ...props
779
+ className: cn("sv-menu-item", className),
780
+ ...props,
781
+ children: [
782
+ icon === null ? null : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SelectPrimitive.ItemIndicator, { className: "sv-menu-item__indicator", children: icon }),
783
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SelectPrimitive.ItemText, { children })
784
+ ]
665
785
  }
666
786
  ));
667
- SelectItem.displayName = SelectPrimitive.Item.displayName;
668
- var SelectLabel = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
787
+ SelectItem.displayName = "SelectItem";
788
+ var SelectLabel = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
669
789
  SelectPrimitive.Label,
670
790
  {
671
791
  ref,
672
- className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
792
+ className: cn("sv-menu-label", className),
673
793
  ...props
674
794
  }
675
795
  ));
676
- SelectLabel.displayName = SelectPrimitive.Label.displayName;
677
- var SelectSeparator = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
796
+ SelectLabel.displayName = "SelectLabel";
797
+ var SelectSeparator = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
678
798
  SelectPrimitive.Separator,
679
799
  {
680
800
  ref,
681
- className: cn("-mx-1 my-1 h-px bg-sv-border", className),
801
+ className: cn("sv-menu-separator", className),
682
802
  ...props
683
803
  }
684
804
  ));
685
- SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
805
+ SelectSeparator.displayName = "SelectSeparator";
686
806
 
687
807
  // src/components/ui/dropdown-menu.tsx
688
- var React3 = __toESM(require("react"), 1);
808
+ var React5 = __toESM(require("react"), 1);
689
809
  var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
690
- var import_jsx_runtime8 = require("react/jsx-runtime");
810
+ var import_jsx_runtime10 = require("react/jsx-runtime");
691
811
  var DropdownMenu = DropdownMenuPrimitive.Root;
692
812
  var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
693
813
  var DropdownMenuGroup = DropdownMenuPrimitive.Group;
694
814
  var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
695
815
  var DropdownMenuSub = DropdownMenuPrimitive.Sub;
696
816
  var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
697
- var DropdownMenuSubTrigger = React3.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
698
- DropdownMenuPrimitive.SubTrigger,
699
- {
700
- ref,
701
- className: cn(
702
- "flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm font-medium outline-none focus:bg-sv-surface data-[state=open]:bg-sv-surface-2",
703
- inset && "pl-8",
704
- className
705
- ),
706
- ...props
707
- }
708
- ));
709
- DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
710
- var DropdownMenuSubContent = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
817
+ var DropdownMenuSubTrigger = React5.forwardRef(
818
+ ({ className, inset, children, icon = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Icon, { name: "chevron-right" }), ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
819
+ DropdownMenuPrimitive.SubTrigger,
820
+ {
821
+ ref,
822
+ className: cn("sv-menu-item", inset && "sv-menu-item--inset", className),
823
+ ...props,
824
+ children: [
825
+ children,
826
+ icon
827
+ ]
828
+ }
829
+ )
830
+ );
831
+ DropdownMenuSubTrigger.displayName = "DropdownMenuSubTrigger";
832
+ var DropdownMenuSubContent = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
711
833
  DropdownMenuPrimitive.SubContent,
712
834
  {
713
835
  ref,
714
- className: cn(
715
- "min-w-[8rem] overflow-hidden rounded-md border border-sv-border bg-sv-surface p-1 text-sv-text",
716
- className
717
- ),
836
+ className: cn("sv-pop", className),
718
837
  ...props
719
838
  }
720
839
  ));
721
- DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
722
- var DropdownMenuContent = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
840
+ DropdownMenuSubContent.displayName = "DropdownMenuSubContent";
841
+ var DropdownMenuContent = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
723
842
  DropdownMenuPrimitive.Content,
724
843
  {
725
844
  ref,
726
- className: cn(
727
- "min-w-[8rem] overflow-hidden rounded-md border border-sv-border bg-sv-surface p-1 text-sv-text",
728
- className
729
- ),
845
+ className: cn("sv-pop", className),
730
846
  ...props
731
847
  }
732
848
  ) }));
733
- DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
734
- var DropdownMenuItem = React3.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
849
+ DropdownMenuContent.displayName = "DropdownMenuContent";
850
+ var DropdownMenuItem = React5.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
735
851
  DropdownMenuPrimitive.Item,
736
852
  {
737
853
  ref,
738
- className: cn(
739
- "relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-sv-surface-2 focus:text-sv-text data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
740
- inset && "pl-8",
741
- className
742
- ),
854
+ className: cn("sv-menu-item", inset && "sv-menu-item--inset", className),
743
855
  ...props
744
856
  }
745
857
  ));
746
- DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
747
- var DropdownMenuCheckboxItem = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
858
+ DropdownMenuItem.displayName = "DropdownMenuItem";
859
+ var DropdownMenuCheckboxItem = React5.forwardRef(({ className, children, icon = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Icon, { name: "check" }), ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
748
860
  DropdownMenuPrimitive.CheckboxItem,
749
861
  {
750
862
  ref,
751
- className: cn(
752
- "relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-sv-surface-2 focus:text-sv-text data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
753
- className
754
- ),
755
- ...props
756
- }
757
- ));
758
- DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
759
- var DropdownMenuRadioItem = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
760
- DropdownMenuPrimitive.RadioItem,
761
- {
762
- ref,
763
- className: cn(
764
- "relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-sv-surface-2 focus:text-sv-text data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
765
- className
766
- ),
767
- ...props
863
+ className: cn("sv-menu-item", className),
864
+ ...props,
865
+ children: [
866
+ icon === null ? null : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DropdownMenuPrimitive.ItemIndicator, { className: "sv-menu-item__indicator", children: icon }),
867
+ children
868
+ ]
768
869
  }
769
870
  ));
770
- DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
771
- var DropdownMenuLabel = React3.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
871
+ DropdownMenuCheckboxItem.displayName = "DropdownMenuCheckboxItem";
872
+ var DropdownMenuRadioItem = React5.forwardRef(
873
+ ({ className, children, icon = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "sv-menu-item__dot" }), ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
874
+ DropdownMenuPrimitive.RadioItem,
875
+ {
876
+ ref,
877
+ className: cn("sv-menu-item", className),
878
+ ...props,
879
+ children: [
880
+ icon === null ? null : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DropdownMenuPrimitive.ItemIndicator, { className: "sv-menu-item__indicator", children: icon }),
881
+ children
882
+ ]
883
+ }
884
+ )
885
+ );
886
+ DropdownMenuRadioItem.displayName = "DropdownMenuRadioItem";
887
+ var DropdownMenuLabel = React5.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
772
888
  DropdownMenuPrimitive.Label,
773
889
  {
774
890
  ref,
775
- className: cn(
776
- "px-2 py-1.5 text-sm font-semibold",
777
- inset && "pl-8",
778
- className
779
- ),
891
+ className: cn("sv-menu-label", inset && "sv-menu-item--inset", className),
780
892
  ...props
781
893
  }
782
894
  ));
783
- DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
784
- var DropdownMenuSeparator = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
895
+ DropdownMenuLabel.displayName = "DropdownMenuLabel";
896
+ var DropdownMenuSeparator = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
785
897
  DropdownMenuPrimitive.Separator,
786
898
  {
787
899
  ref,
788
- className: cn("-mx-1 my-1 h-px bg-sv-border", className),
900
+ className: cn("sv-menu-separator", className),
789
901
  ...props
790
902
  }
791
903
  ));
792
- DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
904
+ DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
793
905
  var DropdownMenuShortcut = ({
794
906
  className,
795
907
  ...props
796
- }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
797
- "span",
798
- {
799
- className: cn("ml-auto text-xs tracking-widest opacity-60", className),
800
- ...props
801
- }
802
- );
908
+ }) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: cn("sv-menu-shortcut", className), ...props });
803
909
  DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
804
910
 
805
911
  // src/components/ui/tabs.tsx
806
- var React4 = __toESM(require("react"), 1);
912
+ var React6 = __toESM(require("react"), 1);
807
913
  var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"), 1);
808
- var import_jsx_runtime9 = require("react/jsx-runtime");
809
- var Tabs = TabsPrimitive.Root;
810
- var TabsList = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
914
+ var import_jsx_runtime11 = require("react/jsx-runtime");
915
+ var Tabs = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
916
+ TabsPrimitive.Root,
917
+ {
918
+ ref,
919
+ className: cn("sv-tabs", className),
920
+ ...props
921
+ }
922
+ ));
923
+ Tabs.displayName = "Tabs";
924
+ var TabsList = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
811
925
  TabsPrimitive.List,
812
926
  {
813
927
  ref,
814
- className: cn(
815
- "inline-flex h-10 items-center justify-center rounded-md bg-sv-surface-2 p-1 text-sv-text-2",
816
- className
817
- ),
928
+ className: cn("sv-tabs__list", className),
818
929
  ...props
819
930
  }
820
931
  ));
821
- TabsList.displayName = TabsPrimitive.List.displayName;
822
- var TabsTrigger = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
932
+ TabsList.displayName = "TabsList";
933
+ var TabsTrigger = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
823
934
  TabsPrimitive.Trigger,
824
935
  {
825
936
  ref,
826
- className: cn(
827
- "inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 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-sv-surface data-[state=active]:text-sv-text data-[state=active]:shadow-sm",
828
- className
829
- ),
937
+ className: cn("sv-tabs__trigger", className),
830
938
  ...props
831
939
  }
832
940
  ));
833
- TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
834
- var TabsContent = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
941
+ TabsTrigger.displayName = "TabsTrigger";
942
+ var TabsContent = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
835
943
  TabsPrimitive.Content,
836
944
  {
837
945
  ref,
838
- className: cn(
839
- "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
840
- className
841
- ),
946
+ className: cn("sv-tabs__content", className),
842
947
  ...props
843
948
  }
844
949
  ));
845
- TabsContent.displayName = TabsPrimitive.Content.displayName;
950
+ TabsContent.displayName = "TabsContent";
846
951
 
847
952
  // src/components/ui/tooltip.tsx
848
- var React5 = __toESM(require("react"), 1);
953
+ var React7 = __toESM(require("react"), 1);
849
954
  var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
850
- var import_jsx_runtime10 = require("react/jsx-runtime");
955
+ var import_jsx_runtime12 = require("react/jsx-runtime");
851
956
  var TooltipProvider = TooltipPrimitive.Provider;
852
957
  var Tooltip = TooltipPrimitive.Root;
853
958
  var TooltipTrigger = TooltipPrimitive.Trigger;
854
- var TooltipContent = React5.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
959
+ var TooltipContent = React7.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
855
960
  TooltipPrimitive.Content,
856
961
  {
857
962
  ref,
858
963
  sideOffset,
859
- className: cn(
860
- "z-50 overflow-hidden rounded-md border border-sv-border bg-sv-surface px-3 py-1.5 text-sm text-sv-text animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
861
- className
862
- ),
964
+ className: cn("sv-pop", "sv-tooltip", className),
863
965
  ...props
864
966
  }
865
967
  ));
866
- TooltipContent.displayName = TooltipPrimitive.Content.displayName;
968
+ TooltipContent.displayName = "TooltipContent";
867
969
  // Annotate the CommonJS export names for ESM import in node:
868
970
  0 && (module.exports = {
971
+ AlertDialog,
972
+ AlertDialogAction,
973
+ AlertDialogCancel,
974
+ AlertDialogContent,
975
+ AlertDialogDescription,
976
+ AlertDialogFooter,
977
+ AlertDialogHeader,
978
+ AlertDialogOverlay,
979
+ AlertDialogPortal,
980
+ AlertDialogTitle,
981
+ AlertDialogTrigger,
869
982
  CopyButton,
870
983
  DEFAULT_STORAGE_KEY,
871
984
  Dialog,