@ai-matrx/design-system 0.11.6 → 0.12.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/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.12.0 — 2026-09-08
4
+
5
+ ### `OrganizationPicker` — the ONE "which organization am I acting in" control
6
+
7
+ Three surfaces, three UIs for one fact: matrx-frontend had the full picker
8
+ (list with abbreviation tile, Personal badge, default star, active check, the
9
+ "Set as my default" switch, and the sentence naming the working organization);
10
+ Workflow Studio's sidebar and the admin dashboard's settings each had a bare
11
+ `<Select>` with different copy, different placement and no default control.
12
+ `OrganizationPicker` is the matrx-frontend panel ported verbatim
13
+ (`OrganizationPickerPanel` + `UserMenuOrgSection` + `DefaultOrgSwitch`), made
14
+ presentational: the host supplies memberships, the active id, the default id,
15
+ `onSelect` and (optionally) `onSetDefault`; it owns no fetch, storage or
16
+ resolution. Omit `onSetDefault` and the switch is not rendered — a host with no
17
+ write path must not show a control that does nothing. `OrganizationAbbreviation`
18
+ ships alongside (falls back to the name's first letter, so a tile is never
19
+ empty). Icons are package SVGs (C19: `StarIcon`, `Building2Icon` added
20
+ internally); the loading rows are this package's `Skeleton`; the default star
21
+ uses the semantic `warning` token — both caught by the package's own guards on
22
+ the first attempt. Adopted in the same session by matrx-frontend (user menu +
23
+ header nudge), workflow-studio (sidebar popover) and the admin dashboard
24
+ (Settings → Organization).
25
+
3
26
  ## 0.11.6 — 2026-09-08
4
27
 
5
28
  **THE PATCH TO TAKE.** 0.11.3, 0.11.4 and 0.11.5 are all superseded; the
package/dist/index.cjs CHANGED
@@ -157,6 +157,8 @@ __export(src_exports, {
157
157
  MOTION_PULSE: () => MOTION_PULSE,
158
158
  MOTION_SHEET: () => MOTION_SHEET,
159
159
  MOTION_SPIN: () => MOTION_SPIN,
160
+ OrganizationAbbreviation: () => OrganizationAbbreviation,
161
+ OrganizationPicker: () => OrganizationPicker,
160
162
  OverflowToolbar: () => OverflowToolbar,
161
163
  POPPER_OFFSET: () => POPPER_OFFSET,
162
164
  Popover: () => Popover,
@@ -437,6 +439,9 @@ function DragHandleDots2Icon(props) {
437
439
  }
438
440
  ) });
439
441
  }
442
+ function StarIcon(props) {
443
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { ...lucideProps(props), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z" }) });
444
+ }
440
445
 
441
446
  // src/accordion.tsx
442
447
  var import_jsx_runtime2 = require("react/jsx-runtime");
@@ -3512,9 +3517,145 @@ var Switch = React27.forwardRef(({ className, size = "md", ...props }, ref) => /
3512
3517
  ));
3513
3518
  Switch.displayName = SwitchPrimitives.Root.displayName;
3514
3519
 
3520
+ // src/organization-picker.tsx
3521
+ var import_jsx_runtime36 = require("react/jsx-runtime");
3522
+ function OrganizationAbbreviation({
3523
+ abbreviation,
3524
+ name,
3525
+ className
3526
+ }) {
3527
+ const mark = abbreviation && abbreviation.trim() || name.trim().slice(0, 1) || "?";
3528
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3529
+ "span",
3530
+ {
3531
+ className: cn(
3532
+ "inline-flex shrink-0 items-center justify-center font-bold uppercase tracking-wide",
3533
+ className
3534
+ ),
3535
+ "aria-label": `Organization abbreviation ${mark}`,
3536
+ title: mark,
3537
+ children: mark
3538
+ }
3539
+ );
3540
+ }
3541
+ function OrganizationPicker({
3542
+ organizations,
3543
+ activeOrganizationId,
3544
+ defaultOrganizationId = null,
3545
+ loading = false,
3546
+ loadFailed = false,
3547
+ onSelect,
3548
+ onSetDefault,
3549
+ hideHeading = false,
3550
+ itemClassName,
3551
+ className
3552
+ }) {
3553
+ const active = organizations.find((o) => o.id === activeOrganizationId) ?? null;
3554
+ const isDefault = (id) => !!defaultOrganizationId && id === defaultOrganizationId;
3555
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: cn("flex flex-col", className), "data-slot": "organization-picker", children: [
3556
+ !hideHeading && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "px-2 py-1.5 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground", children: "Organization" }),
3557
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "space-y-1 px-1 py-1", "aria-busy": "true", "aria-label": "Loading organizations", children: [
3558
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Skeleton, { className: "h-7 rounded-md" }),
3559
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Skeleton, { className: "h-7 rounded-md" })
3560
+ ] }) : loadFailed ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "px-2 py-2 text-xs text-destructive", role: "alert", children: "Could not load organizations." }) : organizations.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "px-2 py-2 text-xs text-muted-foreground", children: "Your account is not a member of any organization. Ask an administrator to add you to one." }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
3561
+ active ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("p", { className: "px-2 pb-1 text-[11px] text-muted-foreground", "data-slot": "organization-picker-status", children: [
3562
+ "Working in",
3563
+ " ",
3564
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "font-medium text-foreground", children: active.name })
3565
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "px-2 pb-1 text-[11px] text-destructive", "data-slot": "organization-picker-status", children: "No organization selected \u2014 pick one below." }),
3566
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("ul", { className: "max-h-72 overflow-y-auto", role: "listbox", "aria-label": "Organizations", children: organizations.map((org) => {
3567
+ const isActive = org.id === activeOrganizationId;
3568
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("li", { role: "none", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
3569
+ "button",
3570
+ {
3571
+ type: "button",
3572
+ role: "option",
3573
+ "aria-selected": isActive,
3574
+ "aria-pressed": isActive,
3575
+ onClick: (event) => {
3576
+ event.stopPropagation();
3577
+ onSelect(org);
3578
+ },
3579
+ className: cn(
3580
+ "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",
3581
+ isActive && "bg-primary/10 font-medium text-primary",
3582
+ itemClassName
3583
+ ),
3584
+ children: [
3585
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3586
+ OrganizationAbbreviation,
3587
+ {
3588
+ abbreviation: org.abbreviation,
3589
+ name: org.name,
3590
+ className: cn(
3591
+ "h-5 min-w-8 rounded border border-border bg-muted px-1 text-[9px]",
3592
+ isActive ? "text-primary" : "text-muted-foreground"
3593
+ )
3594
+ }
3595
+ ),
3596
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "min-w-0 flex-1 truncate", children: org.name }),
3597
+ org.isPersonal && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "shrink-0 rounded-full bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground", children: "Personal" }),
3598
+ isDefault(org.id) && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3599
+ StarIcon,
3600
+ {
3601
+ className: "h-[13px] w-[13px] shrink-0 fill-warning text-warning",
3602
+ "aria-hidden": false,
3603
+ "aria-label": "Default organization",
3604
+ role: "img"
3605
+ }
3606
+ ),
3607
+ isActive && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(LucideCheckIcon, { className: "h-[15px] w-[15px] shrink-0 text-primary" })
3608
+ ]
3609
+ }
3610
+ ) }, org.id);
3611
+ }) }),
3612
+ onSetDefault && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
3613
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "my-1 border-t border-border" }),
3614
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3615
+ DefaultOrganizationSwitch,
3616
+ {
3617
+ active,
3618
+ checked: !!active && isDefault(active.id),
3619
+ onChange: (on) => onSetDefault(on && active ? active.id : null)
3620
+ }
3621
+ )
3622
+ ] })
3623
+ ] })
3624
+ ] });
3625
+ }
3626
+ function DefaultOrganizationSwitch({
3627
+ active,
3628
+ checked,
3629
+ onChange
3630
+ }) {
3631
+ const disabled = !active;
3632
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
3633
+ "div",
3634
+ {
3635
+ className: "flex items-center justify-between gap-3 rounded-md px-2 py-1.5",
3636
+ "data-slot": "organization-picker-default",
3637
+ children: [
3638
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "min-w-0", children: [
3639
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "text-xs font-medium text-foreground", children: "Set as my default" }),
3640
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "truncate text-[11px] text-muted-foreground", children: disabled ? "Select an organization first" : checked ? `Next startup opens ${active.name}` : "Auto-select this at startup" })
3641
+ ] }),
3642
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3643
+ Switch,
3644
+ {
3645
+ checked,
3646
+ disabled,
3647
+ onCheckedChange: onChange,
3648
+ "aria-label": "Set this organization as my default"
3649
+ }
3650
+ )
3651
+ ]
3652
+ }
3653
+ );
3654
+ }
3655
+
3515
3656
  // src/tabbed-bottom-sheet.tsx
3516
3657
  var import_react4 = require("react");
3517
- var import_jsx_runtime36 = require("react/jsx-runtime");
3658
+ var import_jsx_runtime37 = require("react/jsx-runtime");
3518
3659
  function TabbedBottomSheet({
3519
3660
  open,
3520
3661
  onOpenChange,
@@ -3528,15 +3669,15 @@ function TabbedBottomSheet({
3528
3669
  if (open) setSelectedTabId(null);
3529
3670
  }
3530
3671
  const selectedTab = selectedTabId ? tabs.find((tab) => tab.id === selectedTabId) : null;
3531
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3672
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3532
3673
  BottomSheet,
3533
3674
  {
3534
3675
  open,
3535
3676
  onOpenChange,
3536
3677
  title,
3537
3678
  size: "full",
3538
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "matrx-mobile-sheet flex min-h-0 flex-1 flex-col", children: [
3539
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3679
+ children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "matrx-mobile-sheet flex min-h-0 flex-1 flex-col", children: [
3680
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3540
3681
  BottomSheetHeader,
3541
3682
  {
3542
3683
  title: selectedTab ? selectedTab.label : title,
@@ -3544,19 +3685,19 @@ function TabbedBottomSheet({
3544
3685
  onBack: () => setSelectedTabId(null)
3545
3686
  }
3546
3687
  ),
3547
- selectedTab ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "flex min-h-0 flex-1 flex-col overflow-hidden pb-safe", children: selectedTab.content }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(BottomSheetBody, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("ul", { className: "divide-y divide-border", children: tabs.map((tab) => {
3688
+ selectedTab ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "flex min-h-0 flex-1 flex-col overflow-hidden pb-safe", children: selectedTab.content }) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(BottomSheetBody, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("ul", { className: "divide-y divide-border", children: tabs.map((tab) => {
3548
3689
  const Icon2 = tab.icon;
3549
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
3690
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
3550
3691
  "button",
3551
3692
  {
3552
3693
  type: "button",
3553
3694
  onClick: () => setSelectedTabId(tab.id),
3554
3695
  className: "flex w-full items-center gap-3 px-4 py-3.5 text-left transition-colors hover:bg-muted/60 active:bg-muted",
3555
3696
  children: [
3556
- Icon2 ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Icon2, { className: "h-5 w-5 shrink-0 text-muted-foreground" }) : null,
3557
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "min-w-0 flex-1 text-base text-foreground", children: tab.label }),
3697
+ Icon2 ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Icon2, { className: "h-5 w-5 shrink-0 text-muted-foreground" }) : null,
3698
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "min-w-0 flex-1 text-base text-foreground", children: tab.label }),
3558
3699
  tab.trailing,
3559
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ChevronRightIcon, { className: "h-5 w-5 shrink-0 text-muted-foreground" })
3700
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ChevronRightIcon, { className: "h-5 w-5 shrink-0 text-muted-foreground" })
3560
3701
  ]
3561
3702
  }
3562
3703
  ) }, tab.id);
@@ -3568,7 +3709,7 @@ function TabbedBottomSheet({
3568
3709
 
3569
3710
  // src/table.tsx
3570
3711
  var React28 = __toESM(require("react"), 1);
3571
- var import_jsx_runtime37 = require("react/jsx-runtime");
3712
+ var import_jsx_runtime38 = require("react/jsx-runtime");
3572
3713
  var TABLE_SIZES = {
3573
3714
  sm: { head: "px-2", cell: "p-2" },
3574
3715
  md: { head: "px-3", cell: "p-3" }
@@ -3579,7 +3720,7 @@ function useTableSize() {
3579
3720
  }
3580
3721
  var Table = React28.forwardRef(
3581
3722
  ({ className, size = "md", wrap = true, wrapperClassName, ...props }, ref) => {
3582
- const table = /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3723
+ const table = /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3583
3724
  "table",
3584
3725
  {
3585
3726
  ref,
@@ -3589,7 +3730,7 @@ var Table = React28.forwardRef(
3589
3730
  ...props
3590
3731
  }
3591
3732
  );
3592
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TableSizeContext.Provider, { value: size, children: wrap ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3733
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TableSizeContext.Provider, { value: size, children: wrap ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3593
3734
  "div",
3594
3735
  {
3595
3736
  "data-slot": "table-wrapper",
@@ -3600,7 +3741,7 @@ var Table = React28.forwardRef(
3600
3741
  }
3601
3742
  );
3602
3743
  Table.displayName = "Table";
3603
- var TableHeader = React28.forwardRef(({ className, sticky = false, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3744
+ var TableHeader = React28.forwardRef(({ className, sticky = false, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3604
3745
  "thead",
3605
3746
  {
3606
3747
  ref,
@@ -3614,7 +3755,7 @@ var TableHeader = React28.forwardRef(({ className, sticky = false, ...props }, r
3614
3755
  }
3615
3756
  ));
3616
3757
  TableHeader.displayName = "TableHeader";
3617
- var TableBody = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3758
+ var TableBody = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3618
3759
  "tbody",
3619
3760
  {
3620
3761
  ref,
@@ -3624,7 +3765,7 @@ var TableBody = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE_
3624
3765
  }
3625
3766
  ));
3626
3767
  TableBody.displayName = "TableBody";
3627
- var TableFooter = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3768
+ var TableFooter = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3628
3769
  "tfoot",
3629
3770
  {
3630
3771
  ref,
@@ -3637,7 +3778,7 @@ var TableFooter = React28.forwardRef(({ className, ...props }, ref) => /* @__PUR
3637
3778
  }
3638
3779
  ));
3639
3780
  TableFooter.displayName = "TableFooter";
3640
- var TableRow = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3781
+ var TableRow = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3641
3782
  "tr",
3642
3783
  {
3643
3784
  ref,
@@ -3652,7 +3793,7 @@ var TableRow = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__
3652
3793
  TableRow.displayName = "TableRow";
3653
3794
  var TableHead = React28.forwardRef(({ className, ...props }, ref) => {
3654
3795
  const size = useTableSize();
3655
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3796
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3656
3797
  "th",
3657
3798
  {
3658
3799
  ref,
@@ -3669,7 +3810,7 @@ var TableHead = React28.forwardRef(({ className, ...props }, ref) => {
3669
3810
  TableHead.displayName = "TableHead";
3670
3811
  var TableCell = React28.forwardRef(({ className, ...props }, ref) => {
3671
3812
  const size = useTableSize();
3672
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3813
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3673
3814
  "td",
3674
3815
  {
3675
3816
  ref,
@@ -3684,7 +3825,7 @@ var TableCell = React28.forwardRef(({ className, ...props }, ref) => {
3684
3825
  );
3685
3826
  });
3686
3827
  TableCell.displayName = "TableCell";
3687
- var TableCaption = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3828
+ var TableCaption = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3688
3829
  "caption",
3689
3830
  {
3690
3831
  ref,
@@ -3698,10 +3839,10 @@ TableCaption.displayName = "TableCaption";
3698
3839
  // src/tabs.tsx
3699
3840
  var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"), 1);
3700
3841
  var React29 = __toESM(require("react"), 1);
3701
- var import_jsx_runtime38 = require("react/jsx-runtime");
3842
+ var import_jsx_runtime39 = require("react/jsx-runtime");
3702
3843
  var Tabs = TabsPrimitive.Root;
3703
3844
  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";
3704
- var TabsList = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3845
+ var TabsList = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3705
3846
  TabsPrimitive.List,
3706
3847
  {
3707
3848
  ref,
@@ -3714,7 +3855,7 @@ var TabsList = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__
3714
3855
  }
3715
3856
  ));
3716
3857
  TabsList.displayName = TabsPrimitive.List.displayName;
3717
- var TabsTrigger = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3858
+ var TabsTrigger = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3718
3859
  TabsPrimitive.Trigger,
3719
3860
  {
3720
3861
  ref,
@@ -3728,7 +3869,7 @@ var TabsTrigger = React29.forwardRef(({ className, ...props }, ref) => /* @__PUR
3728
3869
  }
3729
3870
  ));
3730
3871
  TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
3731
- var TabsTriggerCore = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3872
+ var TabsTriggerCore = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3732
3873
  TabsPrimitive.Trigger,
3733
3874
  {
3734
3875
  ref,
@@ -3738,7 +3879,7 @@ var TabsTriggerCore = React29.forwardRef(({ className, ...props }, ref) => /* @_
3738
3879
  }
3739
3880
  ));
3740
3881
  TabsTriggerCore.displayName = TabsPrimitive.Trigger.displayName;
3741
- var TabsContent = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3882
+ var TabsContent = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3742
3883
  TabsPrimitive.Content,
3743
3884
  {
3744
3885
  ref,
@@ -3755,7 +3896,7 @@ TabsContent.displayName = TabsPrimitive.Content.displayName;
3755
3896
 
3756
3897
  // src/textarea.tsx
3757
3898
  var React30 = __toESM(require("react"), 1);
3758
- var import_jsx_runtime39 = require("react/jsx-runtime");
3899
+ var import_jsx_runtime40 = require("react/jsx-runtime");
3759
3900
  var FILL_HEIGHT_REGEX = /(?:^|\s)(h-full|h-dvh|flex-1|grow)(?:\s|$)/;
3760
3901
  var FILL_WIDTH_REGEX = /(?:^|\s)(w-full|w-screen)(?:\s|$)/;
3761
3902
  function getStretchClasses(className) {
@@ -3808,7 +3949,7 @@ var Textarea = React30.forwardRef(
3808
3949
  const stretchClasses = getStretchClasses(className);
3809
3950
  const needsWrapper = Boolean(wrapperClassName || stretchClasses);
3810
3951
  useAutoGrow(ref, props.value, autoGrow, minHeight, maxHeight);
3811
- const textarea = /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3952
+ const textarea = /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3812
3953
  "textarea",
3813
3954
  {
3814
3955
  ref: callback,
@@ -3824,7 +3965,7 @@ var Textarea = React30.forwardRef(
3824
3965
  }
3825
3966
  );
3826
3967
  if (!needsWrapper) return textarea;
3827
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: cn(stretchClasses, wrapperClassName), children: textarea });
3968
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: cn(stretchClasses, wrapperClassName), children: textarea });
3828
3969
  }
3829
3970
  );
3830
3971
  Textarea.displayName = "Textarea";
@@ -3832,7 +3973,7 @@ var BasicTextarea = React30.forwardRef(
3832
3973
  ({ className, autoGrow, minHeight, maxHeight, ...props }, forwarded) => {
3833
3974
  const { ref, callback } = useMergedTextareaRef(forwarded);
3834
3975
  useAutoGrow(ref, props.value, autoGrow, minHeight, maxHeight);
3835
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3976
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3836
3977
  "textarea",
3837
3978
  {
3838
3979
  ref: callback,
@@ -3862,13 +4003,13 @@ var TextareaWithPrefix = React30.forwardRef(
3862
4003
  }, forwarded) => {
3863
4004
  const { ref, callback } = useMergedTextareaRef(forwarded);
3864
4005
  useAutoGrow(ref, props.value, autoGrow, minHeight, maxHeight);
3865
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
4006
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
3866
4007
  "div",
3867
4008
  {
3868
4009
  className: cn("relative", getStretchClasses(className), wrapperClassName),
3869
4010
  children: [
3870
- prefix ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "pointer-events-none absolute left-3 top-3 z-10 text-muted-foreground", children: prefix }) : null,
3871
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4011
+ prefix ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "pointer-events-none absolute left-3 top-3 z-10 text-muted-foreground", children: prefix }) : null,
4012
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3872
4013
  "textarea",
3873
4014
  {
3874
4015
  ref: callback,
@@ -3948,13 +4089,13 @@ function useScrollFade() {
3948
4089
  // src/hover-card.tsx
3949
4090
  var HoverCardPrimitive = __toESM(require("@radix-ui/react-hover-card"), 1);
3950
4091
  var React31 = __toESM(require("react"), 1);
3951
- var import_jsx_runtime40 = require("react/jsx-runtime");
4092
+ var import_jsx_runtime41 = require("react/jsx-runtime");
3952
4093
  var HoverCard = HoverCardPrimitive.Root;
3953
4094
  var HoverCardTrigger = HoverCardPrimitive.Trigger;
3954
4095
  var HoverCardContent = React31.forwardRef(
3955
4096
  ({ className, align = "center", sideOffset = 4, container, animated = true, ...props }, ref) => {
3956
4097
  const resolved = usePortalContainer(container);
3957
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(HoverCardPrimitive.Portal, { container: resolved ?? null, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
4098
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(HoverCardPrimitive.Portal, { container: resolved ?? null, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3958
4099
  HoverCardPrimitive.Content,
3959
4100
  {
3960
4101
  ref,
@@ -3976,7 +4117,7 @@ HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
3976
4117
  // src/radio-group.tsx
3977
4118
  var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"), 1);
3978
4119
  var React32 = __toESM(require("react"), 1);
3979
- var import_jsx_runtime41 = require("react/jsx-runtime");
4120
+ var import_jsx_runtime42 = require("react/jsx-runtime");
3980
4121
  var RadioGroupSizeContext = React32.createContext("md");
3981
4122
  var CONTROL_CLASSES = {
3982
4123
  sm: "h-3.5 w-3.5",
@@ -3988,7 +4129,7 @@ var DOT_CLASSES = {
3988
4129
  md: "h-1.5 w-1.5",
3989
4130
  lg: "h-2 w-2"
3990
4131
  };
3991
- var RadioGroup3 = React32.forwardRef(({ className, size = "md", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(RadioGroupSizeContext.Provider, { value: size, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4132
+ var RadioGroup3 = React32.forwardRef(({ className, size = "md", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(RadioGroupSizeContext.Provider, { value: size, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3992
4133
  RadioGroupPrimitive.Root,
3993
4134
  {
3994
4135
  ref,
@@ -4001,7 +4142,7 @@ RadioGroup3.displayName = RadioGroupPrimitive.Root.displayName;
4001
4142
  var RadioGroupItem = React32.forwardRef(({ className, size, ...props }, ref) => {
4002
4143
  const groupSize = React32.useContext(RadioGroupSizeContext);
4003
4144
  const resolved = size ?? groupSize;
4004
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4145
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
4005
4146
  RadioGroupPrimitive.Item,
4006
4147
  {
4007
4148
  ref,
@@ -4018,7 +4159,7 @@ var RadioGroupItem = React32.forwardRef(({ className, size, ...props }, ref) =>
4018
4159
  className
4019
4160
  ),
4020
4161
  ...props,
4021
- children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4162
+ children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
4022
4163
  "div",
4023
4164
  {
4024
4165
  className: cn("rounded-full bg-primary-foreground", DOT_CLASSES[resolved])
@@ -4031,7 +4172,7 @@ RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
4031
4172
 
4032
4173
  // src/resizable.tsx
4033
4174
  var import_react_resizable_panels = require("react-resizable-panels");
4034
- var import_jsx_runtime42 = require("react/jsx-runtime");
4175
+ var import_jsx_runtime43 = require("react/jsx-runtime");
4035
4176
  var HANDLE_SIZES = {
4036
4177
  xs: "w-0.5 [&[aria-orientation=horizontal]]:h-0.5 [&[aria-orientation=horizontal]]:w-full",
4037
4178
  sm: "w-1 [&[aria-orientation=horizontal]]:h-1 [&[aria-orientation=horizontal]]:w-full",
@@ -4045,7 +4186,7 @@ var HANDLE_SIZES = {
4045
4186
  var ResizablePanelGroup = ({
4046
4187
  className,
4047
4188
  ...props
4048
- }) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
4189
+ }) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
4049
4190
  import_react_resizable_panels.Group,
4050
4191
  {
4051
4192
  "data-slot": "resizable-group",
@@ -4060,7 +4201,7 @@ var ResizableHandle = ({
4060
4201
  size = "xs",
4061
4202
  className,
4062
4203
  ...props
4063
- }) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
4204
+ }) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
4064
4205
  import_react_resizable_panels.Separator,
4065
4206
  {
4066
4207
  "data-slot": "resizable-handle",
@@ -4080,7 +4221,7 @@ var ResizableHandle = ({
4080
4221
  className
4081
4222
  ),
4082
4223
  ...props,
4083
- children: withHandle ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "z-10 flex h-8 w-4 items-center justify-center rounded-sm border bg-border group-aria-[orientation=horizontal]/handle:h-4 group-aria-[orientation=horizontal]/handle:w-8", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DragHandleDots2Icon, { className: "h-2.5 w-2.5 group-aria-[orientation=horizontal]/handle:rotate-90" }) }) : null
4224
+ children: withHandle ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "z-10 flex h-8 w-4 items-center justify-center rounded-sm border bg-border group-aria-[orientation=horizontal]/handle:h-4 group-aria-[orientation=horizontal]/handle:w-8", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DragHandleDots2Icon, { className: "h-2.5 w-2.5 group-aria-[orientation=horizontal]/handle:rotate-90" }) }) : null
4084
4225
  }
4085
4226
  );
4086
4227
  ResizableHandle.displayName = "ResizableHandle";
@@ -4088,7 +4229,7 @@ ResizableHandle.displayName = "ResizableHandle";
4088
4229
  // src/slider.tsx
4089
4230
  var SliderPrimitive = __toESM(require("@radix-ui/react-slider"), 1);
4090
4231
  var React33 = __toESM(require("react"), 1);
4091
- var import_jsx_runtime43 = require("react/jsx-runtime");
4232
+ var import_jsx_runtime44 = require("react/jsx-runtime");
4092
4233
  var TRACK_CLASSES = {
4093
4234
  sm: "h-1",
4094
4235
  md: "h-1.5",
@@ -4104,7 +4245,7 @@ var Slider = React33.forwardRef(({ className, size = "md", ...props }, ref) => {
4104
4245
  1,
4105
4246
  (props.value ?? props.defaultValue ?? [0]).length
4106
4247
  );
4107
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
4248
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
4108
4249
  SliderPrimitive.Root,
4109
4250
  {
4110
4251
  ref,
@@ -4116,7 +4257,7 @@ var Slider = React33.forwardRef(({ className, size = "md", ...props }, ref) => {
4116
4257
  ),
4117
4258
  ...props,
4118
4259
  children: [
4119
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
4260
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
4120
4261
  SliderPrimitive.Track,
4121
4262
  {
4122
4263
  "data-slot": "slider-track",
@@ -4125,7 +4266,7 @@ var Slider = React33.forwardRef(({ className, size = "md", ...props }, ref) => {
4125
4266
  TRACK_CLASSES[size],
4126
4267
  "data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"
4127
4268
  ),
4128
- children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
4269
+ children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
4129
4270
  SliderPrimitive.Range,
4130
4271
  {
4131
4272
  "data-slot": "slider-range",
@@ -4134,7 +4275,7 @@ var Slider = React33.forwardRef(({ className, size = "md", ...props }, ref) => {
4134
4275
  )
4135
4276
  }
4136
4277
  ),
4137
- Array.from({ length: thumbCount }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
4278
+ Array.from({ length: thumbCount }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
4138
4279
  SliderPrimitive.Thumb,
4139
4280
  {
4140
4281
  "data-slot": "slider-thumb",
@@ -4162,7 +4303,7 @@ var ToggleGroupPrimitive = __toESM(require("@radix-ui/react-toggle-group"), 1);
4162
4303
  var TogglePrimitive = __toESM(require("@radix-ui/react-toggle"), 1);
4163
4304
  var import_class_variance_authority6 = require("class-variance-authority");
4164
4305
  var React34 = __toESM(require("react"), 1);
4165
- var import_jsx_runtime44 = require("react/jsx-runtime");
4306
+ var import_jsx_runtime45 = require("react/jsx-runtime");
4166
4307
  var toggleVariants = (0, import_class_variance_authority6.cva)(
4167
4308
  "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",
4168
4309
  {
@@ -4183,7 +4324,7 @@ var toggleVariants = (0, import_class_variance_authority6.cva)(
4183
4324
  }
4184
4325
  }
4185
4326
  );
4186
- var Toggle = React34.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
4327
+ var Toggle = React34.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
4187
4328
  TogglePrimitive.Root,
4188
4329
  {
4189
4330
  ref,
@@ -4194,20 +4335,20 @@ var Toggle = React34.forwardRef(({ className, variant, size, ...props }, ref) =>
4194
4335
  ));
4195
4336
  Toggle.displayName = TogglePrimitive.Root.displayName;
4196
4337
  var ToggleGroupContext = React34.createContext({ size: "default", variant: "default" });
4197
- var ToggleGroup = React34.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
4338
+ var ToggleGroup = React34.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
4198
4339
  ToggleGroupPrimitive.Root,
4199
4340
  {
4200
4341
  ref,
4201
4342
  "data-slot": "toggle-group",
4202
4343
  className: cn("flex items-center justify-center gap-1", className),
4203
4344
  ...props,
4204
- children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ToggleGroupContext.Provider, { value: { variant, size }, children })
4345
+ children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ToggleGroupContext.Provider, { value: { variant, size }, children })
4205
4346
  }
4206
4347
  ));
4207
4348
  ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
4208
4349
  var ToggleGroupItem = React34.forwardRef(({ className, children, variant, size, ...props }, ref) => {
4209
4350
  const context = React34.useContext(ToggleGroupContext);
4210
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
4351
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
4211
4352
  ToggleGroupPrimitive.Item,
4212
4353
  {
4213
4354
  ref,
@@ -4229,13 +4370,13 @@ ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
4229
4370
  // src/tooltip.tsx
4230
4371
  var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
4231
4372
  var React35 = __toESM(require("react"), 1);
4232
- var import_jsx_runtime45 = require("react/jsx-runtime");
4373
+ var import_jsx_runtime46 = require("react/jsx-runtime");
4233
4374
  var TooltipProvider = TooltipPrimitive.Provider;
4234
4375
  var Tooltip = TooltipPrimitive.Root;
4235
4376
  var TooltipTrigger = TooltipPrimitive.Trigger;
4236
4377
  var TooltipContent = React35.forwardRef(({ className, sideOffset = 4, container, animated = true, ...props }, ref) => {
4237
4378
  const resolved = usePortalContainer(container);
4238
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TooltipPrimitive.Portal, { container: resolved ?? null, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
4379
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(TooltipPrimitive.Portal, { container: resolved ?? null, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
4239
4380
  TooltipPrimitive.Content,
4240
4381
  {
4241
4382
  ref,