@ai-matrx/design-system 0.31.0 → 0.34.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.cjs CHANGED
@@ -3583,6 +3583,9 @@ var SheetTitle = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE
3583
3583
  ));
3584
3584
  SheetTitle.displayName = SheetPrimitive.Title.displayName;
3585
3585
 
3586
+ // src/organization-picker.tsx
3587
+ var React29 = __toESM(require("react"), 1);
3588
+
3586
3589
  // src/skeleton.tsx
3587
3590
  var import_jsx_runtime36 = require("react/jsx-runtime");
3588
3591
  function Skeleton({ className, animated = true, ...props }) {
@@ -3641,6 +3644,14 @@ Switch.displayName = SwitchPrimitives.Root.displayName;
3641
3644
 
3642
3645
  // src/organization-picker.tsx
3643
3646
  var import_jsx_runtime38 = require("react/jsx-runtime");
3647
+ var SEARCH_APPEARS_ABOVE = 8;
3648
+ function matchesQuery(org, query) {
3649
+ const q = query.trim().toLowerCase();
3650
+ if (!q) return true;
3651
+ if (org.name.toLowerCase().includes(q)) return true;
3652
+ const abbreviation = org.abbreviation?.trim().toLowerCase();
3653
+ return !!abbreviation && abbreviation.includes(q);
3654
+ }
3644
3655
  function OrganizationAbbreviation({
3645
3656
  abbreviation,
3646
3657
  name,
@@ -3672,13 +3683,66 @@ function OrganizationPicker({
3672
3683
  itemClassName,
3673
3684
  className
3674
3685
  }) {
3686
+ const [query, setQuery] = React29.useState("");
3687
+ const [showFixtures, setShowFixtures] = React29.useState(false);
3675
3688
  const active = organizations.find((o) => o.id === activeOrganizationId) ?? null;
3676
3689
  const isDefault = (id) => !!defaultOrganizationId && id === defaultOrganizationId;
3677
- const listed = defaultOrganizationId === null ? organizations : [
3678
- ...organizations.filter((o) => o.id === defaultOrganizationId),
3679
- ...organizations.filter((o) => o.id !== defaultOrganizationId)
3680
- ];
3690
+ const rank = (org) => org.id === defaultOrganizationId ? 0 : org.isOwn ? 1 : 2;
3691
+ const ordered = [...organizations].sort((a, b) => rank(a) - rank(b));
3692
+ const matching = ordered.filter((org) => matchesQuery(org, query));
3693
+ const listed = matching.filter((org) => !org.isTestFixture);
3694
+ const fixtures = matching.filter((org) => org.isTestFixture);
3695
+ const searchable = organizations.length > SEARCH_APPEARS_ABOVE;
3681
3696
  const sharesItsName = (org) => organizations.filter((other) => other.name.trim() === org.name.trim()).length > 1;
3697
+ const renderRow = (org) => {
3698
+ const isActive = org.id === activeOrganizationId;
3699
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("li", { role: "none", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
3700
+ "button",
3701
+ {
3702
+ type: "button",
3703
+ role: "option",
3704
+ "aria-selected": isActive,
3705
+ "aria-pressed": isActive,
3706
+ onClick: (event) => {
3707
+ event.stopPropagation();
3708
+ onSelect(org);
3709
+ },
3710
+ className: cn(
3711
+ "flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm text-foreground transition-colors hover:bg-accent",
3712
+ isActive && "bg-primary/10 font-medium text-primary",
3713
+ itemClassName
3714
+ ),
3715
+ children: [
3716
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3717
+ OrganizationAbbreviation,
3718
+ {
3719
+ abbreviation: org.abbreviation,
3720
+ name: org.name,
3721
+ className: cn(
3722
+ "h-5 min-w-8 rounded border border-border bg-muted px-1 text-[9px]",
3723
+ isActive ? "text-primary" : "text-muted-foreground"
3724
+ )
3725
+ }
3726
+ ),
3727
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: "flex min-w-0 flex-1 flex-col", children: [
3728
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "truncate", children: org.name }),
3729
+ sharesItsName(org) && org.distinguisher ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "truncate text-[10px] font-normal text-muted-foreground", children: org.distinguisher }) : null
3730
+ ] }),
3731
+ org.isPersonal && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "shrink-0 rounded-full bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground", children: "Personal" }),
3732
+ isDefault(org.id) && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3733
+ StarIcon,
3734
+ {
3735
+ className: "h-[13px] w-[13px] shrink-0 fill-warning text-warning",
3736
+ "aria-hidden": false,
3737
+ "aria-label": "Default organization",
3738
+ role: "img"
3739
+ }
3740
+ ),
3741
+ isActive && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(LucideCheckIcon, { className: "h-[15px] w-[15px] shrink-0 text-primary" })
3742
+ ]
3743
+ }
3744
+ ) }, org.id);
3745
+ };
3682
3746
  return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: cn("flex flex-col", className), "data-slot": "organization-picker", children: [
3683
3747
  !hideHeading && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "px-2 py-1.5 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground", children: "Organization" }),
3684
3748
  loading ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "space-y-1 px-1 py-1", "aria-busy": "true", "aria-label": "Loading organizations", children: [
@@ -3690,55 +3754,89 @@ function OrganizationPicker({
3690
3754
  " ",
3691
3755
  /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "font-medium text-foreground", children: active.name })
3692
3756
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "px-2 pb-1 text-[11px] text-destructive", "data-slot": "organization-picker-status", children: "No organization selected \u2014 pick one below." }),
3693
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("ul", { className: "max-h-72 overflow-y-auto", role: "listbox", "aria-label": "Organizations", children: listed.map((org) => {
3694
- const isActive = org.id === activeOrganizationId;
3695
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("li", { role: "none", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
3696
- "button",
3757
+ searchable && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "px-2 pb-1.5", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3758
+ Input,
3759
+ {
3760
+ type: "search",
3761
+ value: query,
3762
+ onChange: (event) => setQuery(event.target.value),
3763
+ onClick: (event) => event.stopPropagation(),
3764
+ onKeyDown: (event) => event.stopPropagation(),
3765
+ placeholder: "Search organizations",
3766
+ "aria-label": "Search organizations by name or abbreviation",
3767
+ className: "h-8 text-sm",
3768
+ "data-slot": "organization-picker-search"
3769
+ }
3770
+ ) }),
3771
+ listed.length === 0 && fixtures.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
3772
+ "p",
3773
+ {
3774
+ className: "px-2 py-2 text-xs text-muted-foreground",
3775
+ "data-slot": "organization-picker-no-match",
3776
+ children: [
3777
+ "No organization matches \u201C",
3778
+ query.trim(),
3779
+ "\u201D."
3780
+ ]
3781
+ }
3782
+ ) : listed.length === 0 ? (
3783
+ /* THE ARCHIVED-ITEMS LAW, honesty half: "nothing" may only be said
3784
+ when both halves are empty. Here the other half is one line down.
3785
+ AND IT SAYS WHAT IS TRUE, NOT WHAT IS EMPTY. The earlier sentence
3786
+ read "Nothing matches “X” outside the test organizations below" —
3787
+ which opens by negating the very rows sitting one click away, and
3788
+ `fixtures` IS query-filtered, so those rows ARE matches for X. A
3789
+ person reading "nothing matches" retypes their search instead of
3790
+ clicking. So: count the matches, say where they are, and carry
3791
+ the click that reveals them — the same shape as the honest
3792
+ empty-filter twin one line down. (TAILS-3) */
3793
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3794
+ "p",
3697
3795
  {
3698
- type: "button",
3699
- role: "option",
3700
- "aria-selected": isActive,
3701
- "aria-pressed": isActive,
3702
- onClick: (event) => {
3703
- event.stopPropagation();
3704
- onSelect(org);
3705
- },
3706
- className: cn(
3707
- "flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm text-foreground transition-colors hover:bg-accent",
3708
- isActive && "bg-primary/10 font-medium text-primary",
3709
- itemClassName
3710
- ),
3711
- children: [
3712
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3713
- OrganizationAbbreviation,
3714
- {
3715
- abbreviation: org.abbreviation,
3716
- name: org.name,
3717
- className: cn(
3718
- "h-5 min-w-8 rounded border border-border bg-muted px-1 text-[9px]",
3719
- isActive ? "text-primary" : "text-muted-foreground"
3720
- )
3721
- }
3722
- ),
3723
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: "flex min-w-0 flex-1 flex-col", children: [
3724
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "truncate", children: org.name }),
3725
- sharesItsName(org) && org.distinguisher ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "truncate text-[10px] font-normal text-muted-foreground", children: org.distinguisher }) : null
3726
- ] }),
3727
- org.isPersonal && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "shrink-0 rounded-full bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground", children: "Personal" }),
3728
- isDefault(org.id) && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3729
- StarIcon,
3730
- {
3731
- className: "h-[13px] w-[13px] shrink-0 fill-warning text-warning",
3732
- "aria-hidden": false,
3733
- "aria-label": "Default organization",
3734
- role: "img"
3735
- }
3736
- ),
3737
- isActive && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(LucideCheckIcon, { className: "h-[15px] w-[15px] shrink-0 text-primary" })
3738
- ]
3796
+ className: "px-2 py-2 text-xs text-muted-foreground",
3797
+ "data-slot": "organization-picker-only-fixtures",
3798
+ children: query.trim() ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
3799
+ fixtures.length === 1 ? `1 match for \u201C${query.trim()}\u201D is in your test organizations` : `All ${fixtures.length} matches for \u201C${query.trim()}\u201D are in your test organizations`,
3800
+ showFixtures ? ", listed below." : /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
3801
+ " \u2014 ",
3802
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3803
+ "button",
3804
+ {
3805
+ type: "button",
3806
+ className: "underline underline-offset-2 hover:text-foreground",
3807
+ "data-slot": "organization-picker-show-fixtures",
3808
+ onClick: (event) => {
3809
+ event.stopPropagation();
3810
+ setShowFixtures(true);
3811
+ },
3812
+ children: "show them"
3813
+ }
3814
+ ),
3815
+ "."
3816
+ ] })
3817
+ ] }) : `Every organization you belong to is a test organization \u2014 all ${fixtures.length} are below.`
3739
3818
  }
3740
- ) }, org.id);
3741
- }) }),
3819
+ )
3820
+ ) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("ul", { className: "max-h-72 overflow-y-auto", role: "listbox", "aria-label": "Organizations", children: listed.map(renderRow) }),
3821
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3822
+ ArchivedDisclosure,
3823
+ {
3824
+ count: fixtures.length,
3825
+ open: showFixtures,
3826
+ onOpenChange: setShowFixtures,
3827
+ label: "Test organizations",
3828
+ className: "mt-0.5",
3829
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3830
+ "ul",
3831
+ {
3832
+ className: "max-h-72 overflow-y-auto",
3833
+ role: "listbox",
3834
+ "aria-label": "Test organizations",
3835
+ children: fixtures.map(renderRow)
3836
+ }
3837
+ )
3838
+ }
3839
+ ),
3742
3840
  onSetDefault && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
3743
3841
  /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "my-1 border-t border-border" }),
3744
3842
  /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
@@ -3839,17 +3937,17 @@ function TabbedBottomSheet({
3839
3937
  }
3840
3938
 
3841
3939
  // src/table.tsx
3842
- var React29 = __toESM(require("react"), 1);
3940
+ var React30 = __toESM(require("react"), 1);
3843
3941
  var import_jsx_runtime40 = require("react/jsx-runtime");
3844
3942
  var TABLE_SIZES = {
3845
3943
  sm: { head: "px-2", cell: "p-2" },
3846
3944
  md: { head: "px-3", cell: "p-3" }
3847
3945
  };
3848
- var TableSizeContext = React29.createContext("md");
3946
+ var TableSizeContext = React30.createContext("md");
3849
3947
  function useTableSize() {
3850
- return React29.useContext(TableSizeContext);
3948
+ return React30.useContext(TableSizeContext);
3851
3949
  }
3852
- var Table = React29.forwardRef(
3950
+ var Table = React30.forwardRef(
3853
3951
  ({ className, size = "md", wrap = true, wrapperClassName, ...props }, ref) => {
3854
3952
  const table = /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3855
3953
  "table",
@@ -3872,7 +3970,7 @@ var Table = React29.forwardRef(
3872
3970
  }
3873
3971
  );
3874
3972
  Table.displayName = "Table";
3875
- var TableHeader = React29.forwardRef(({ className, sticky = false, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3973
+ var TableHeader = React30.forwardRef(({ className, sticky = false, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3876
3974
  "thead",
3877
3975
  {
3878
3976
  ref,
@@ -3886,7 +3984,7 @@ var TableHeader = React29.forwardRef(({ className, sticky = false, ...props }, r
3886
3984
  }
3887
3985
  ));
3888
3986
  TableHeader.displayName = "TableHeader";
3889
- var TableBody = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3987
+ var TableBody = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3890
3988
  "tbody",
3891
3989
  {
3892
3990
  ref,
@@ -3896,7 +3994,7 @@ var TableBody = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE_
3896
3994
  }
3897
3995
  ));
3898
3996
  TableBody.displayName = "TableBody";
3899
- var TableFooter = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3997
+ var TableFooter = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3900
3998
  "tfoot",
3901
3999
  {
3902
4000
  ref,
@@ -3909,7 +4007,7 @@ var TableFooter = React29.forwardRef(({ className, ...props }, ref) => /* @__PUR
3909
4007
  }
3910
4008
  ));
3911
4009
  TableFooter.displayName = "TableFooter";
3912
- var TableRow = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
4010
+ var TableRow = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3913
4011
  "tr",
3914
4012
  {
3915
4013
  ref,
@@ -3922,7 +4020,7 @@ var TableRow = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__
3922
4020
  }
3923
4021
  ));
3924
4022
  TableRow.displayName = "TableRow";
3925
- var TableHead = React29.forwardRef(({ className, ...props }, ref) => {
4023
+ var TableHead = React30.forwardRef(({ className, ...props }, ref) => {
3926
4024
  const size = useTableSize();
3927
4025
  return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3928
4026
  "th",
@@ -3939,7 +4037,7 @@ var TableHead = React29.forwardRef(({ className, ...props }, ref) => {
3939
4037
  );
3940
4038
  });
3941
4039
  TableHead.displayName = "TableHead";
3942
- var TableCell = React29.forwardRef(({ className, ...props }, ref) => {
4040
+ var TableCell = React30.forwardRef(({ className, ...props }, ref) => {
3943
4041
  const size = useTableSize();
3944
4042
  return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3945
4043
  "td",
@@ -3956,7 +4054,7 @@ var TableCell = React29.forwardRef(({ className, ...props }, ref) => {
3956
4054
  );
3957
4055
  });
3958
4056
  TableCell.displayName = "TableCell";
3959
- var TableCaption = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
4057
+ var TableCaption = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3960
4058
  "caption",
3961
4059
  {
3962
4060
  ref,
@@ -3969,11 +4067,11 @@ TableCaption.displayName = "TableCaption";
3969
4067
 
3970
4068
  // src/tabs.tsx
3971
4069
  var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"), 1);
3972
- var React30 = __toESM(require("react"), 1);
4070
+ var React31 = __toESM(require("react"), 1);
3973
4071
  var import_jsx_runtime41 = require("react/jsx-runtime");
3974
4072
  var Tabs = TabsPrimitive.Root;
3975
4073
  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";
3976
- var TabsList = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4074
+ var TabsList = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3977
4075
  TabsPrimitive.List,
3978
4076
  {
3979
4077
  ref,
@@ -3986,7 +4084,7 @@ var TabsList = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__
3986
4084
  }
3987
4085
  ));
3988
4086
  TabsList.displayName = TabsPrimitive.List.displayName;
3989
- var TabsTrigger = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4087
+ var TabsTrigger = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3990
4088
  TabsPrimitive.Trigger,
3991
4089
  {
3992
4090
  ref,
@@ -4000,7 +4098,7 @@ var TabsTrigger = React30.forwardRef(({ className, ...props }, ref) => /* @__PUR
4000
4098
  }
4001
4099
  ));
4002
4100
  TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
4003
- var TabsTriggerCore = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4101
+ var TabsTriggerCore = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4004
4102
  TabsPrimitive.Trigger,
4005
4103
  {
4006
4104
  ref,
@@ -4010,7 +4108,7 @@ var TabsTriggerCore = React30.forwardRef(({ className, ...props }, ref) => /* @_
4010
4108
  }
4011
4109
  ));
4012
4110
  TabsTriggerCore.displayName = TabsPrimitive.Trigger.displayName;
4013
- var TabsContent = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4111
+ var TabsContent = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4014
4112
  TabsPrimitive.Content,
4015
4113
  {
4016
4114
  ref,
@@ -4026,7 +4124,7 @@ var TabsContent = React30.forwardRef(({ className, ...props }, ref) => /* @__PUR
4026
4124
  TabsContent.displayName = TabsPrimitive.Content.displayName;
4027
4125
 
4028
4126
  // src/textarea.tsx
4029
- var React31 = __toESM(require("react"), 1);
4127
+ var React32 = __toESM(require("react"), 1);
4030
4128
  var import_jsx_runtime42 = require("react/jsx-runtime");
4031
4129
  var FILL_HEIGHT_REGEX = /(?:^|\s)(h-full|h-dvh|flex-1|grow)(?:\s|$)/;
4032
4130
  var FILL_WIDTH_REGEX = /(?:^|\s)(w-full|w-screen)(?:\s|$)/;
@@ -4040,7 +4138,7 @@ function getStretchClasses(className) {
4040
4138
  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";
4041
4139
  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";
4042
4140
  function useAutoGrow(ref, value, autoGrow = false, minHeight, maxHeight) {
4043
- React31.useEffect(() => {
4141
+ React32.useEffect(() => {
4044
4142
  if (!autoGrow || !ref.current) return;
4045
4143
  const textarea = ref.current;
4046
4144
  textarea.style.height = "auto";
@@ -4056,8 +4154,8 @@ function useAutoGrow(ref, value, autoGrow = false, minHeight, maxHeight) {
4056
4154
  }, [value, autoGrow, minHeight, maxHeight, ref]);
4057
4155
  }
4058
4156
  function useMergedTextareaRef(forwarded) {
4059
- const internal = React31.useRef(null);
4060
- const callback = React31.useCallback(
4157
+ const internal = React32.useRef(null);
4158
+ const callback = React32.useCallback(
4061
4159
  (node) => {
4062
4160
  internal.current = node;
4063
4161
  if (typeof forwarded === "function") forwarded(node);
@@ -4074,7 +4172,7 @@ function boxStyle(minHeight, maxHeight) {
4074
4172
  maxHeight: maxHeight ? `${maxHeight}px` : void 0
4075
4173
  };
4076
4174
  }
4077
- var Textarea = React31.forwardRef(
4175
+ var Textarea = React32.forwardRef(
4078
4176
  ({ className, autoGrow, minHeight, maxHeight, wrapperClassName, ...props }, forwarded) => {
4079
4177
  const { ref, callback } = useMergedTextareaRef(forwarded);
4080
4178
  const stretchClasses = getStretchClasses(className);
@@ -4100,7 +4198,7 @@ var Textarea = React31.forwardRef(
4100
4198
  }
4101
4199
  );
4102
4200
  Textarea.displayName = "Textarea";
4103
- var BasicTextarea = React31.forwardRef(
4201
+ var BasicTextarea = React32.forwardRef(
4104
4202
  ({ className, autoGrow, minHeight, maxHeight, ...props }, forwarded) => {
4105
4203
  const { ref, callback } = useMergedTextareaRef(forwarded);
4106
4204
  useAutoGrow(ref, props.value, autoGrow, minHeight, maxHeight);
@@ -4122,7 +4220,7 @@ var BasicTextarea = React31.forwardRef(
4122
4220
  }
4123
4221
  );
4124
4222
  BasicTextarea.displayName = "BasicTextarea";
4125
- var TextareaWithPrefix = React31.forwardRef(
4223
+ var TextareaWithPrefix = React32.forwardRef(
4126
4224
  ({
4127
4225
  prefix,
4128
4226
  className,
@@ -4219,11 +4317,11 @@ function useScrollFade() {
4219
4317
 
4220
4318
  // src/hover-card.tsx
4221
4319
  var HoverCardPrimitive = __toESM(require("@radix-ui/react-hover-card"), 1);
4222
- var React32 = __toESM(require("react"), 1);
4320
+ var React33 = __toESM(require("react"), 1);
4223
4321
  var import_jsx_runtime43 = require("react/jsx-runtime");
4224
4322
  var HoverCard = HoverCardPrimitive.Root;
4225
4323
  var HoverCardTrigger = HoverCardPrimitive.Trigger;
4226
- var HoverCardContent = React32.forwardRef(
4324
+ var HoverCardContent = React33.forwardRef(
4227
4325
  ({ className, align = "center", sideOffset = 4, container, animated = true, ...props }, ref) => {
4228
4326
  const resolved = usePortalContainer(container);
4229
4327
  return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(HoverCardPrimitive.Portal, { container: resolved ?? null, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
@@ -4247,9 +4345,9 @@ HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
4247
4345
 
4248
4346
  // src/radio-group.tsx
4249
4347
  var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"), 1);
4250
- var React33 = __toESM(require("react"), 1);
4348
+ var React34 = __toESM(require("react"), 1);
4251
4349
  var import_jsx_runtime44 = require("react/jsx-runtime");
4252
- var RadioGroupSizeContext = React33.createContext("md");
4350
+ var RadioGroupSizeContext = React34.createContext("md");
4253
4351
  var CONTROL_CLASSES = {
4254
4352
  sm: "h-3.5 w-3.5",
4255
4353
  md: "h-4 w-4",
@@ -4260,7 +4358,7 @@ var DOT_CLASSES = {
4260
4358
  md: "h-1.5 w-1.5",
4261
4359
  lg: "h-2 w-2"
4262
4360
  };
4263
- var RadioGroup3 = React33.forwardRef(({ className, size = "md", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(RadioGroupSizeContext.Provider, { value: size, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
4361
+ var RadioGroup3 = React34.forwardRef(({ className, size = "md", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(RadioGroupSizeContext.Provider, { value: size, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
4264
4362
  RadioGroupPrimitive.Root,
4265
4363
  {
4266
4364
  ref,
@@ -4270,8 +4368,8 @@ var RadioGroup3 = React33.forwardRef(({ className, size = "md", ...props }, ref)
4270
4368
  }
4271
4369
  ) }));
4272
4370
  RadioGroup3.displayName = RadioGroupPrimitive.Root.displayName;
4273
- var RadioGroupItem = React33.forwardRef(({ className, size, ...props }, ref) => {
4274
- const groupSize = React33.useContext(RadioGroupSizeContext);
4371
+ var RadioGroupItem = React34.forwardRef(({ className, size, ...props }, ref) => {
4372
+ const groupSize = React34.useContext(RadioGroupSizeContext);
4275
4373
  const resolved = size ?? groupSize;
4276
4374
  return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
4277
4375
  RadioGroupPrimitive.Item,
@@ -4359,7 +4457,7 @@ ResizableHandle.displayName = "ResizableHandle";
4359
4457
 
4360
4458
  // src/slider.tsx
4361
4459
  var SliderPrimitive = __toESM(require("@radix-ui/react-slider"), 1);
4362
- var React34 = __toESM(require("react"), 1);
4460
+ var React35 = __toESM(require("react"), 1);
4363
4461
  var import_jsx_runtime46 = require("react/jsx-runtime");
4364
4462
  var TRACK_CLASSES = {
4365
4463
  sm: "h-1",
@@ -4371,7 +4469,7 @@ var THUMB_CLASSES = {
4371
4469
  md: "h-4 w-4",
4372
4470
  lg: "h-5 w-5"
4373
4471
  };
4374
- var Slider = React34.forwardRef(({ className, size = "md", ...props }, ref) => {
4472
+ var Slider = React35.forwardRef(({ className, size = "md", ...props }, ref) => {
4375
4473
  const thumbCount = Math.max(
4376
4474
  1,
4377
4475
  (props.value ?? props.defaultValue ?? [0]).length
@@ -4433,7 +4531,7 @@ Slider.displayName = SliderPrimitive.Root.displayName;
4433
4531
  var ToggleGroupPrimitive = __toESM(require("@radix-ui/react-toggle-group"), 1);
4434
4532
  var TogglePrimitive = __toESM(require("@radix-ui/react-toggle"), 1);
4435
4533
  var import_class_variance_authority6 = require("class-variance-authority");
4436
- var React35 = __toESM(require("react"), 1);
4534
+ var React36 = __toESM(require("react"), 1);
4437
4535
  var import_jsx_runtime47 = require("react/jsx-runtime");
4438
4536
  var toggleVariants = (0, import_class_variance_authority6.cva)(
4439
4537
  "inline-flex cursor-pointer items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
@@ -4455,7 +4553,7 @@ var toggleVariants = (0, import_class_variance_authority6.cva)(
4455
4553
  }
4456
4554
  }
4457
4555
  );
4458
- var Toggle = React35.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4556
+ var Toggle = React36.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4459
4557
  TogglePrimitive.Root,
4460
4558
  {
4461
4559
  ref,
@@ -4465,8 +4563,8 @@ var Toggle = React35.forwardRef(({ className, variant, size, ...props }, ref) =>
4465
4563
  }
4466
4564
  ));
4467
4565
  Toggle.displayName = TogglePrimitive.Root.displayName;
4468
- var ToggleGroupContext = React35.createContext({ size: "default", variant: "default" });
4469
- var ToggleGroup = React35.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4566
+ var ToggleGroupContext = React36.createContext({ size: "default", variant: "default" });
4567
+ var ToggleGroup = React36.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4470
4568
  ToggleGroupPrimitive.Root,
4471
4569
  {
4472
4570
  ref,
@@ -4477,8 +4575,8 @@ var ToggleGroup = React35.forwardRef(({ className, variant, size, children, ...p
4477
4575
  }
4478
4576
  ));
4479
4577
  ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
4480
- var ToggleGroupItem = React35.forwardRef(({ className, children, variant, size, ...props }, ref) => {
4481
- const context = React35.useContext(ToggleGroupContext);
4578
+ var ToggleGroupItem = React36.forwardRef(({ className, children, variant, size, ...props }, ref) => {
4579
+ const context = React36.useContext(ToggleGroupContext);
4482
4580
  return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4483
4581
  ToggleGroupPrimitive.Item,
4484
4582
  {
@@ -4500,12 +4598,12 @@ ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
4500
4598
 
4501
4599
  // src/tooltip.tsx
4502
4600
  var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
4503
- var React36 = __toESM(require("react"), 1);
4601
+ var React37 = __toESM(require("react"), 1);
4504
4602
  var import_jsx_runtime48 = require("react/jsx-runtime");
4505
4603
  var TooltipProvider = TooltipPrimitive.Provider;
4506
4604
  var Tooltip = TooltipPrimitive.Root;
4507
4605
  var TooltipTrigger = TooltipPrimitive.Trigger;
4508
- var TooltipContent = React36.forwardRef(({ className, sideOffset = 4, container, animated = true, ...props }, ref) => {
4606
+ var TooltipContent = React37.forwardRef(({ className, sideOffset = 4, container, animated = true, ...props }, ref) => {
4509
4607
  const resolved = usePortalContainer(container);
4510
4608
  return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TooltipPrimitive.Portal, { container: resolved ?? null, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4511
4609
  TooltipPrimitive.Content,