@mesob/ui 0.5.2 → 0.5.4

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.
@@ -1457,7 +1457,7 @@ import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
1457
1457
  var DROPDOWN_MENU_POSITIONER_CN = "isolate z-50 outline-none";
1458
1458
  var DROPDOWN_MENU_CONTENT_CN = cn(
1459
1459
  "cn-dropdown-menu-content cn-dropdown-menu-content-logical cn-menu-target",
1460
- "z-50 max-h-(--available-height) w-(--anchor-width)",
1460
+ "z-50 max-h-[min(100dvh,var(--available-height,100dvh))] w-[var(--anchor-width,auto)]",
1461
1461
  "origin-(--transform-origin) overflow-x-hidden overflow-y-auto outline-none",
1462
1462
  "data-closed:overflow-hidden"
1463
1463
  );
@@ -1876,7 +1876,6 @@ import { grant } from "@mesob/common/permission";
1876
1876
  import { useMesob as useMesob3 } from "@mesob/ui/providers";
1877
1877
  import { IconChevronDown } from "@tabler/icons-react";
1878
1878
  import { useEffect as useEffect8, useRef as useRef2, useState as useState5 } from "react";
1879
- import { useToggle } from "react-use";
1880
1879
 
1881
1880
  // src/components/ui/sidebar.tsx
1882
1881
  import { useRender as useRender3 } from "@base-ui/react/use-render";
@@ -2807,6 +2806,20 @@ function RowContent({
2807
2806
  )
2808
2807
  ] });
2809
2808
  }
2809
+ function useNavBranchOpen(activeBranch) {
2810
+ const [open, setOpen] = useState5(activeBranch);
2811
+ useEffect8(() => {
2812
+ if (activeBranch) {
2813
+ setOpen(true);
2814
+ } else {
2815
+ setOpen(false);
2816
+ }
2817
+ }, [activeBranch]);
2818
+ const toggle = () => {
2819
+ setOpen((o) => !o);
2820
+ };
2821
+ return { open, toggle };
2822
+ }
2810
2823
  function NavItemRow({
2811
2824
  item,
2812
2825
  level,
@@ -2817,9 +2830,10 @@ function NavItemRow({
2817
2830
  const mesob = useMesob3();
2818
2831
  const Link2 = mesob?.linkComponent ?? mesob?.navigation?.Link;
2819
2832
  const locale = mesob?.locale;
2820
- const [open, toggle] = useToggle(hasActiveDescendant(item, pathname));
2833
+ const activeBranch = hasActiveDescendant(item, pathname);
2834
+ const { open, toggle } = useNavBranchOpen(activeBranch);
2821
2835
  const hasChildren = (item.children?.length ?? 0) > 0;
2822
- const showChildren = (open || hasActiveDescendant(item, pathname)) && hasChildren;
2836
+ const showChildren = open && hasChildren;
2823
2837
  const pathMatch = item.pathMatch ?? "prefix";
2824
2838
  const isActive = isLinkActive(pathname, item.href, pathMatch);
2825
2839
  const lineLeft = 28 + 20 * level;
@@ -2873,7 +2887,7 @@ function NavItemRow({
2873
2887
  ...locale && { locale }
2874
2888
  };
2875
2889
  return /* @__PURE__ */ jsxs14("li", { className: "relative mt-1", children: [
2876
- Link2 ? /* @__PURE__ */ jsx21(Link2, { ...linkProps, children: rowContent }) : /* @__PURE__ */ jsx21("a", { ...linkProps, children: rowContent }),
2890
+ Link2 ? /* @__PURE__ */ jsx21(Link2, { prefetch: false, ...linkProps, children: rowContent }) : /* @__PURE__ */ jsx21("a", { ...linkProps, children: rowContent }),
2877
2891
  showChildren && /* @__PURE__ */ jsxs14("ul", { className: "relative mt-1", children: [
2878
2892
  /* @__PURE__ */ jsx21(
2879
2893
  "div",
@@ -4121,7 +4135,7 @@ import { IconCheck as IconCheck2, IconChevronDown as IconChevronDown3, IconChevr
4121
4135
  import { jsx as jsx36, jsxs as jsxs25 } from "react/jsx-runtime";
4122
4136
  var Select = SelectPrimitive.Root;
4123
4137
  var SELECT_TRIGGER_BASE_CN = "flex w-fit items-center justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center [&_svg]:pointer-events-none [&_svg]:shrink-0";
4124
- var SELECT_CONTENT_BASE_CN = "cn-menu-target relative isolate z-50 max-h-(--available-height) w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto data-[align-trigger=true]:animate-none";
4138
+ var SELECT_CONTENT_BASE_CN = "cn-menu-target relative isolate z-50 max-h-[min(100dvh,var(--available-height,100dvh))] w-[var(--anchor-width,auto)] origin-(--transform-origin) overflow-x-hidden overflow-y-auto data-[align-trigger=true]:animate-none";
4125
4139
  var SELECT_ITEM_BASE_CN = "relative flex w-full cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0";
4126
4140
  function SelectGroup({ className, ...props }) {
4127
4141
  return /* @__PURE__ */ jsx36(
@@ -4170,7 +4184,7 @@ function SelectContent({
4170
4184
  sideOffset = 4,
4171
4185
  align = "center",
4172
4186
  alignOffset = 0,
4173
- alignItemWithTrigger = true,
4187
+ alignItemWithTrigger = false,
4174
4188
  ...props
4175
4189
  }) {
4176
4190
  return /* @__PURE__ */ jsx36(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsx36(
@@ -17891,7 +17905,7 @@ import { Combobox as ComboboxPrimitive } from "@base-ui/react/combobox";
17891
17905
  import { IconCheck as IconCheck4, IconChevronDown as IconChevronDown9 } from "@tabler/icons-react";
17892
17906
  import { useMemo as useMemo13, useState as useState40 } from "react";
17893
17907
  import { jsx as jsx142, jsxs as jsxs85 } from "react/jsx-runtime";
17894
- var COMBOBOX_CONTENT_BASE_CN = "cn-menu-target group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) data-[chips=true]:min-w-(--anchor-width)";
17908
+ var COMBOBOX_CONTENT_BASE_CN = "cn-menu-target group/combobox-content relative max-h-[min(100dvh,var(--available-height,100dvh))] w-[var(--anchor-width,auto)] max-w-[min(100vw,var(--available-width,100vw))] min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) data-[chips=true]:min-w-[var(--anchor-width,auto)]";
17895
17909
  var COMBOBOX_ITEM_BASE_CN = "relative flex w-full cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0";
17896
17910
  function Combobox({
17897
17911
  options,
@@ -18084,7 +18098,7 @@ import { jsx as jsx144, jsxs as jsxs86 } from "react/jsx-runtime";
18084
18098
  var CONTEXT_MENU_POSITIONER_CN = "isolate z-50 outline-none";
18085
18099
  var CONTEXT_MENU_CONTENT_CN = cn(
18086
18100
  "cn-context-menu-content cn-context-menu-content-logical cn-menu-target",
18087
- "z-50 max-h-(--available-height)",
18101
+ "z-50 max-h-[min(100dvh,var(--available-height,100dvh))]",
18088
18102
  "origin-(--transform-origin) overflow-x-hidden overflow-y-auto outline-none",
18089
18103
  "data-closed:overflow-hidden"
18090
18104
  );
@@ -18189,7 +18203,7 @@ function ContextMenuSubContent({
18189
18203
  "data-slot": "context-menu-sub-content",
18190
18204
  className: cn(
18191
18205
  "cn-context-menu-sub-content cn-context-menu-content-logical cn-context-menu-subcontent",
18192
- "z-50 max-h-(--available-height) w-auto origin-(--transform-origin)",
18206
+ "z-50 max-h-[min(100dvh,var(--available-height,100dvh))] w-auto origin-(--transform-origin)",
18193
18207
  "overflow-x-hidden overflow-y-auto outline-none",
18194
18208
  className
18195
18209
  ),
@@ -18849,6 +18863,7 @@ function DropdownButton({
18849
18863
  mainButtonClassName,
18850
18864
  triggerClassName,
18851
18865
  contentClassName,
18866
+ align = "end",
18852
18867
  positionerProps,
18853
18868
  contentProps,
18854
18869
  className,
@@ -18879,7 +18894,7 @@ function DropdownButton({
18879
18894
  children
18880
18895
  }
18881
18896
  ),
18882
- /* @__PURE__ */ jsx151(DropdownMenuPositioner, { ...positionerProps, children: /* @__PURE__ */ jsx151(
18897
+ /* @__PURE__ */ jsx151(DropdownMenuPositioner, { align, ...positionerProps, children: /* @__PURE__ */ jsx151(
18883
18898
  DropdownMenuContent,
18884
18899
  {
18885
18900
  ...contentProps,
@@ -18933,7 +18948,7 @@ function DropdownButton({
18933
18948
  }
18934
18949
  )
18935
18950
  ] }),
18936
- /* @__PURE__ */ jsx151(DropdownMenuPositioner, { ...positionerProps, children: /* @__PURE__ */ jsx151(
18951
+ /* @__PURE__ */ jsx151(DropdownMenuPositioner, { align, ...positionerProps, children: /* @__PURE__ */ jsx151(
18937
18952
  DropdownMenuContent,
18938
18953
  {
18939
18954
  ...contentProps,
@@ -20684,7 +20699,7 @@ import { jsx as jsx169, jsxs as jsxs97 } from "react/jsx-runtime";
20684
20699
  var MENUBAR_POSITIONER_CN = "isolate z-50 outline-none";
20685
20700
  var MENUBAR_CONTENT_CN = cn(
20686
20701
  "cn-menubar-content cn-menubar-content-logical cn-menu-target",
20687
- "z-50 max-h-(--available-height)",
20702
+ "z-50 max-h-[min(100dvh,var(--available-height,100dvh))]",
20688
20703
  "origin-(--transform-origin) overflow-x-hidden overflow-y-auto outline-none",
20689
20704
  "data-closed:overflow-hidden"
20690
20705
  );
@@ -20936,7 +20951,7 @@ function MenubarSubContent({
20936
20951
  "data-slot": "menubar-sub-content",
20937
20952
  className: cn(
20938
20953
  "cn-menubar-sub-content cn-menubar-content-logical",
20939
- "z-50 max-h-(--available-height) w-auto origin-(--transform-origin)",
20954
+ "z-50 max-h-[min(100dvh,var(--available-height,100dvh))] w-auto origin-(--transform-origin)",
20940
20955
  "overflow-x-hidden overflow-y-auto outline-none",
20941
20956
  className
20942
20957
  ),
@@ -22983,10 +22998,165 @@ function Stack({
22983
22998
  );
22984
22999
  }
22985
23000
 
23001
+ // src/components/ui/status-dropdown-button.tsx
23002
+ import { useCallback as useCallback25, useMemo as useMemo16, useState as useState53 } from "react";
23003
+ import { Fragment as Fragment30, jsx as jsx192, jsxs as jsxs110 } from "react/jsx-runtime";
23004
+ var STATUS_MENU_SEPARATOR = "separator";
23005
+ function resolveConfirmConfig(target, entityLabel) {
23006
+ if (!target.confirm) {
23007
+ return null;
23008
+ }
23009
+ const baseVariant = target.variant === "destructive" ? "destructive" : "default";
23010
+ if (target.confirm === true) {
23011
+ return {
23012
+ title: "Confirm status change",
23013
+ description: entityLabel !== void 0 ? `This will update this ${entityLabel}.` : "You can change it again later.",
23014
+ cancelLabel: "Cancel",
23015
+ confirmLabel: "Continue",
23016
+ confirmVariant: baseVariant
23017
+ };
23018
+ }
23019
+ return {
23020
+ cancelLabel: "Cancel",
23021
+ confirmLabel: "Continue",
23022
+ confirmVariant: baseVariant,
23023
+ ...target.confirm
23024
+ };
23025
+ }
23026
+ function buildItems(value, states, transitions, groupLabel, onPick) {
23027
+ const row = transitions !== void 0 && value in transitions ? transitions[value] ?? [] : states.filter((s) => s.value !== value).map((s) => s.value);
23028
+ const items = [];
23029
+ if (groupLabel !== null) {
23030
+ items.push({
23031
+ type: "label",
23032
+ key: "status-group",
23033
+ label: groupLabel === void 0 ? "Change status" : groupLabel
23034
+ });
23035
+ }
23036
+ for (let i = 0; i < row.length; i++) {
23037
+ const slot = row[i];
23038
+ if (slot === STATUS_MENU_SEPARATOR) {
23039
+ items.push({
23040
+ type: "separator",
23041
+ key: `status-sep-${value}-${i}`
23042
+ });
23043
+ continue;
23044
+ }
23045
+ const def = states.find((s) => s.value === slot);
23046
+ if (!def) {
23047
+ continue;
23048
+ }
23049
+ items.push({
23050
+ key: `status-${slot}`,
23051
+ label: def.label,
23052
+ icon: def.icon,
23053
+ variant: def.variant,
23054
+ disabled: def.disabled,
23055
+ inset: def.inset,
23056
+ onSelect: () => onPick(slot)
23057
+ });
23058
+ }
23059
+ return items;
23060
+ }
23061
+ function StatusDropdownButton({
23062
+ value,
23063
+ onStatusChange,
23064
+ states,
23065
+ transitions,
23066
+ groupLabel,
23067
+ labelPrefix,
23068
+ buttonClassName,
23069
+ entityLabel,
23070
+ className,
23071
+ variant,
23072
+ ...dropdownProps
23073
+ }) {
23074
+ const [pending, setPending] = useState53(null);
23075
+ const onPick = useCallback25(
23076
+ (next) => {
23077
+ const target = states.find((s) => s.value === next);
23078
+ if (!target) {
23079
+ onStatusChange(next);
23080
+ return;
23081
+ }
23082
+ const cfg = resolveConfirmConfig(target, entityLabel);
23083
+ if (cfg) {
23084
+ setPending({ next, config: cfg });
23085
+ } else {
23086
+ onStatusChange(next);
23087
+ }
23088
+ },
23089
+ [states, entityLabel, onStatusChange]
23090
+ );
23091
+ const items = useMemo16(
23092
+ () => buildItems(value, states, transitions, groupLabel, onPick),
23093
+ [value, states, transitions, groupLabel, onPick]
23094
+ );
23095
+ const current = states.find((s) => s.value === value);
23096
+ return /* @__PURE__ */ jsxs110(Fragment30, { children: [
23097
+ /* @__PURE__ */ jsx192(
23098
+ DropdownButton,
23099
+ {
23100
+ ...dropdownProps,
23101
+ className,
23102
+ items,
23103
+ variant,
23104
+ children: /* @__PURE__ */ jsxs110(
23105
+ "span",
23106
+ {
23107
+ className: cn(
23108
+ "inline-flex min-w-0 items-center gap-2",
23109
+ buttonClassName
23110
+ ),
23111
+ children: [
23112
+ labelPrefix ? /* @__PURE__ */ jsx192("span", { className: "text-muted-foreground shrink-0", children: labelPrefix }) : null,
23113
+ current?.icon ? /* @__PURE__ */ jsx192("span", { className: "inline-flex shrink-0", children: current.icon }) : null,
23114
+ /* @__PURE__ */ jsx192("span", { className: "min-w-0 truncate", children: current?.label ?? value })
23115
+ ]
23116
+ }
23117
+ )
23118
+ }
23119
+ ),
23120
+ /* @__PURE__ */ jsx192(
23121
+ AlertDialog,
23122
+ {
23123
+ open: pending !== null,
23124
+ onOpenChange: (open) => {
23125
+ if (!open) {
23126
+ setPending(null);
23127
+ }
23128
+ },
23129
+ children: /* @__PURE__ */ jsxs110(AlertDialogContent, { children: [
23130
+ /* @__PURE__ */ jsxs110(AlertDialogHeader, { children: [
23131
+ /* @__PURE__ */ jsx192(AlertDialogTitle, { children: pending?.config.title ?? "Confirm?" }),
23132
+ pending?.config.description != null ? /* @__PURE__ */ jsx192(AlertDialogDescription, { children: pending.config.description }) : null
23133
+ ] }),
23134
+ /* @__PURE__ */ jsxs110(AlertDialogFooter, { children: [
23135
+ /* @__PURE__ */ jsx192(AlertDialogCancel, { children: pending?.config.cancelLabel ?? "Cancel" }),
23136
+ /* @__PURE__ */ jsx192(
23137
+ AlertDialogAction,
23138
+ {
23139
+ variant: pending?.config.confirmVariant ?? "default",
23140
+ onClick: () => {
23141
+ if (pending) {
23142
+ onStatusChange(pending.next);
23143
+ setPending(null);
23144
+ }
23145
+ },
23146
+ children: pending?.config.confirmLabel ?? "Continue"
23147
+ }
23148
+ )
23149
+ ] })
23150
+ ] })
23151
+ }
23152
+ )
23153
+ ] });
23154
+ }
23155
+
22986
23156
  // src/components/ui/stepper.tsx
22987
23157
  import { IconCheck as IconCheck9 } from "@tabler/icons-react";
22988
23158
  import { createContext as createContext8, useContext as useContext9 } from "react";
22989
- import { jsx as jsx192, jsxs as jsxs110 } from "react/jsx-runtime";
23159
+ import { jsx as jsx193, jsxs as jsxs111 } from "react/jsx-runtime";
22990
23160
  var StepperContext = createContext8({
22991
23161
  activeStep: 0,
22992
23162
  orientation: "horizontal"
@@ -22999,7 +23169,7 @@ function Stepper({
22999
23169
  children,
23000
23170
  ...props
23001
23171
  }) {
23002
- return /* @__PURE__ */ jsx192(StepperContext.Provider, { value: { activeStep, orientation }, children: /* @__PURE__ */ jsx192(
23172
+ return /* @__PURE__ */ jsx193(StepperContext.Provider, { value: { activeStep, orientation }, children: /* @__PURE__ */ jsx193(
23003
23173
  "div",
23004
23174
  {
23005
23175
  "data-slot": "stepper",
@@ -23031,7 +23201,7 @@ function Step({
23031
23201
  } else if (isActive) {
23032
23202
  state2 = "active";
23033
23203
  }
23034
- return /* @__PURE__ */ jsxs110(
23204
+ return /* @__PURE__ */ jsxs111(
23035
23205
  "div",
23036
23206
  {
23037
23207
  "data-slot": "step",
@@ -23043,7 +23213,7 @@ function Step({
23043
23213
  ),
23044
23214
  ...props,
23045
23215
  children: [
23046
- /* @__PURE__ */ jsxs110(
23216
+ /* @__PURE__ */ jsxs111(
23047
23217
  "div",
23048
23218
  {
23049
23219
  className: cn(
@@ -23051,16 +23221,16 @@ function Step({
23051
23221
  orientation === "horizontal" && "flex-col gap-2"
23052
23222
  ),
23053
23223
  children: [
23054
- /* @__PURE__ */ jsx192(
23224
+ /* @__PURE__ */ jsx193(
23055
23225
  "div",
23056
23226
  {
23057
23227
  "data-slot": "step-indicator",
23058
23228
  "data-state": state2,
23059
23229
  className: cn("cn-step-indicator"),
23060
- children: isCompleted ? /* @__PURE__ */ jsx192(IconCheck9, { className: "size-5" }) : /* @__PURE__ */ jsx192("span", { children: index + 1 })
23230
+ children: isCompleted ? /* @__PURE__ */ jsx193(IconCheck9, { className: "size-5" }) : /* @__PURE__ */ jsx193("span", { children: index + 1 })
23061
23231
  }
23062
23232
  ),
23063
- (label || description) && /* @__PURE__ */ jsxs110(
23233
+ (label || description) && /* @__PURE__ */ jsxs111(
23064
23234
  "div",
23065
23235
  {
23066
23236
  className: cn(
@@ -23068,15 +23238,15 @@ function Step({
23068
23238
  orientation === "vertical" && "text-left"
23069
23239
  ),
23070
23240
  children: [
23071
- label && /* @__PURE__ */ jsx192("div", { className: cn("cn-step-label"), children: label }),
23072
- description && /* @__PURE__ */ jsx192("div", { className: "cn-step-description", children: description })
23241
+ label && /* @__PURE__ */ jsx193("div", { className: cn("cn-step-label"), children: label }),
23242
+ description && /* @__PURE__ */ jsx193("div", { className: "cn-step-description", children: description })
23073
23243
  ]
23074
23244
  }
23075
23245
  )
23076
23246
  ]
23077
23247
  }
23078
23248
  ),
23079
- orientation === "horizontal" && !isLast && /* @__PURE__ */ jsx192(
23249
+ orientation === "horizontal" && !isLast && /* @__PURE__ */ jsx193(
23080
23250
  "div",
23081
23251
  {
23082
23252
  "data-slot": "step-connector",
@@ -23084,7 +23254,7 @@ function Step({
23084
23254
  className: cn("cn-step-connector")
23085
23255
  }
23086
23256
  ),
23087
- orientation === "vertical" && /* @__PURE__ */ jsx192("div", { className: "flex flex-1 flex-col gap-2", children })
23257
+ orientation === "vertical" && /* @__PURE__ */ jsx193("div", { className: "flex flex-1 flex-col gap-2", children })
23088
23258
  ]
23089
23259
  }
23090
23260
  );
@@ -23092,7 +23262,7 @@ function Step({
23092
23262
 
23093
23263
  // src/components/ui/switch.tsx
23094
23264
  import { Switch as SwitchPrimitive } from "@base-ui/react/switch";
23095
- import { jsx as jsx193 } from "react/jsx-runtime";
23265
+ import { jsx as jsx194 } from "react/jsx-runtime";
23096
23266
  function mapSwitchSize(size) {
23097
23267
  return size === "xs" || size === "sm" ? "sm" : "default";
23098
23268
  }
@@ -23103,7 +23273,7 @@ function Switch({
23103
23273
  ...props
23104
23274
  }) {
23105
23275
  const mappedSize = mapSwitchSize(size);
23106
- return /* @__PURE__ */ jsx193(
23276
+ return /* @__PURE__ */ jsx194(
23107
23277
  SwitchPrimitive.Root,
23108
23278
  {
23109
23279
  "data-slot": "switch",
@@ -23115,7 +23285,7 @@ function Switch({
23115
23285
  className
23116
23286
  ),
23117
23287
  ...props,
23118
- children: /* @__PURE__ */ jsx193(
23288
+ children: /* @__PURE__ */ jsx194(
23119
23289
  SwitchPrimitive.Thumb,
23120
23290
  {
23121
23291
  "data-slot": "switch-thumb",
@@ -23127,7 +23297,7 @@ function Switch({
23127
23297
  }
23128
23298
 
23129
23299
  // src/components/ui/table-of-contents.tsx
23130
- import { jsx as jsx194 } from "react/jsx-runtime";
23300
+ import { jsx as jsx195 } from "react/jsx-runtime";
23131
23301
  function TableOfContents({
23132
23302
  className,
23133
23303
  items,
@@ -23138,7 +23308,7 @@ function TableOfContents({
23138
23308
  minDepth = 1,
23139
23309
  ...props
23140
23310
  }) {
23141
- return /* @__PURE__ */ jsx194(
23311
+ return /* @__PURE__ */ jsx195(
23142
23312
  "nav",
23143
23313
  {
23144
23314
  "data-slot": "table-of-contents",
@@ -23149,7 +23319,7 @@ function TableOfContents({
23149
23319
  const depth = item.depth ?? 1;
23150
23320
  const paddingLeft = Math.max(0, depth - minDepth) * depthOffset;
23151
23321
  const isActive = activeId === item.id;
23152
- return /* @__PURE__ */ jsx194(
23322
+ return /* @__PURE__ */ jsx195(
23153
23323
  UnstyledButton,
23154
23324
  {
23155
23325
  type: "button",
@@ -23171,8 +23341,8 @@ function TableOfContents({
23171
23341
 
23172
23342
  // src/components/ui/tags-input.tsx
23173
23343
  import { IconX as IconX14 } from "@tabler/icons-react";
23174
- import { useState as useState53 } from "react";
23175
- import { jsx as jsx195, jsxs as jsxs111 } from "react/jsx-runtime";
23344
+ import { useState as useState54 } from "react";
23345
+ import { jsx as jsx196, jsxs as jsxs112 } from "react/jsx-runtime";
23176
23346
  function TagsInput({
23177
23347
  className,
23178
23348
  value,
@@ -23185,8 +23355,8 @@ function TagsInput({
23185
23355
  disabled = false,
23186
23356
  ...props
23187
23357
  }) {
23188
- const [internalValue, setInternalValue] = useState53(defaultValue);
23189
- const [inputValue, setInputValue] = useState53("");
23358
+ const [internalValue, setInternalValue] = useState54(defaultValue);
23359
+ const [inputValue, setInputValue] = useState54("");
23190
23360
  const tags = value ?? internalValue;
23191
23361
  const addTag = (tag) => {
23192
23362
  const trimmed = tag.trim();
@@ -23230,21 +23400,21 @@ function TagsInput({
23230
23400
  }
23231
23401
  setInputValue(newValue);
23232
23402
  };
23233
- return /* @__PURE__ */ jsxs111(
23403
+ return /* @__PURE__ */ jsxs112(
23234
23404
  "div",
23235
23405
  {
23236
23406
  "data-slot": "tags-input",
23237
23407
  className: cn("cn-tags-input cn-combobox-chips", className),
23238
23408
  ...props,
23239
23409
  children: [
23240
- tags.map((tag, index) => /* @__PURE__ */ jsxs111(
23410
+ tags.map((tag, index) => /* @__PURE__ */ jsxs112(
23241
23411
  "span",
23242
23412
  {
23243
23413
  "data-slot": "tags-input-tag",
23244
23414
  className: "cn-combobox-chip",
23245
23415
  children: [
23246
23416
  tag,
23247
- /* @__PURE__ */ jsxs111(
23417
+ /* @__PURE__ */ jsxs112(
23248
23418
  "button",
23249
23419
  {
23250
23420
  type: "button",
@@ -23253,8 +23423,8 @@ function TagsInput({
23253
23423
  disabled,
23254
23424
  className: "cn-combobox-chip-remove",
23255
23425
  children: [
23256
- /* @__PURE__ */ jsx195("span", { className: "sr-only", children: "Remove" }),
23257
- /* @__PURE__ */ jsx195(IconX14, { className: "size-3" })
23426
+ /* @__PURE__ */ jsx196("span", { className: "sr-only", children: "Remove" }),
23427
+ /* @__PURE__ */ jsx196(IconX14, { className: "size-3" })
23258
23428
  ]
23259
23429
  }
23260
23430
  )
@@ -23262,7 +23432,7 @@ function TagsInput({
23262
23432
  },
23263
23433
  allowDuplicates ? `${tag}-${index}` : tag
23264
23434
  )),
23265
- /* @__PURE__ */ jsx195(
23435
+ /* @__PURE__ */ jsx196(
23266
23436
  "input",
23267
23437
  {
23268
23438
  type: "text",
@@ -23281,7 +23451,7 @@ function TagsInput({
23281
23451
 
23282
23452
  // src/components/ui/text-input.tsx
23283
23453
  import { forwardRef as forwardRef16 } from "react";
23284
- import { jsx as jsx196, jsxs as jsxs112 } from "react/jsx-runtime";
23454
+ import { jsx as jsx197, jsxs as jsxs113 } from "react/jsx-runtime";
23285
23455
  var TextInput = forwardRef16(
23286
23456
  ({
23287
23457
  label,
@@ -23310,14 +23480,14 @@ var TextInput = forwardRef16(
23310
23480
  xl: "h-12"
23311
23481
  };
23312
23482
  const hasWrapper = label || description || error || required || withAsterisk;
23313
- const inputElement = /* @__PURE__ */ jsxs112(
23483
+ const inputElement = /* @__PURE__ */ jsxs113(
23314
23484
  InputGroup,
23315
23485
  {
23316
23486
  disabled,
23317
23487
  className: cn(size && groupSizeClasses[size]),
23318
23488
  children: [
23319
- leftSection && /* @__PURE__ */ jsx196(InputGroupAddon, { align: "inline-start", className: "pointer-events-none", children: leftSection }),
23320
- /* @__PURE__ */ jsx196(
23489
+ leftSection && /* @__PURE__ */ jsx197(InputGroupAddon, { align: "inline-start", className: "pointer-events-none", children: leftSection }),
23490
+ /* @__PURE__ */ jsx197(
23321
23491
  InputGroupInput,
23322
23492
  {
23323
23493
  ref,
@@ -23328,7 +23498,7 @@ var TextInput = forwardRef16(
23328
23498
  ...inputProps
23329
23499
  }
23330
23500
  ),
23331
- rightSection && /* @__PURE__ */ jsx196(
23501
+ rightSection && /* @__PURE__ */ jsx197(
23332
23502
  InputGroupAddon,
23333
23503
  {
23334
23504
  align: "inline-end",
@@ -23344,7 +23514,7 @@ var TextInput = forwardRef16(
23344
23514
  if (!hasWrapper) {
23345
23515
  return inputElement;
23346
23516
  }
23347
- return /* @__PURE__ */ jsx196(
23517
+ return /* @__PURE__ */ jsx197(
23348
23518
  InputWrapper,
23349
23519
  {
23350
23520
  label,
@@ -23367,7 +23537,7 @@ TextInput.displayName = "TextInput";
23367
23537
 
23368
23538
  // src/components/ui/theme-icon.tsx
23369
23539
  import { cva as cva25 } from "class-variance-authority";
23370
- import { jsx as jsx197 } from "react/jsx-runtime";
23540
+ import { jsx as jsx198 } from "react/jsx-runtime";
23371
23541
  var themeIconVariants = cva25(
23372
23542
  "cn-theme-icon inline-flex items-center justify-center shrink-0 transition-colors",
23373
23543
  {
@@ -23500,7 +23670,7 @@ function ThemeIcon({
23500
23670
  children,
23501
23671
  ...props
23502
23672
  }) {
23503
- return /* @__PURE__ */ jsx197(
23673
+ return /* @__PURE__ */ jsx198(
23504
23674
  "div",
23505
23675
  {
23506
23676
  "data-slot": "theme-icon",
@@ -23515,9 +23685,9 @@ function ThemeIcon({
23515
23685
  }
23516
23686
 
23517
23687
  // src/components/ui/timeline.tsx
23518
- import { jsx as jsx198 } from "react/jsx-runtime";
23688
+ import { jsx as jsx199 } from "react/jsx-runtime";
23519
23689
  function Timeline({ className, ...props }) {
23520
- return /* @__PURE__ */ jsx198(
23690
+ return /* @__PURE__ */ jsx199(
23521
23691
  "ol",
23522
23692
  {
23523
23693
  "data-slot": "timeline",
@@ -23527,7 +23697,7 @@ function Timeline({ className, ...props }) {
23527
23697
  );
23528
23698
  }
23529
23699
  function TimelineItem({ className, ...props }) {
23530
- return /* @__PURE__ */ jsx198(
23700
+ return /* @__PURE__ */ jsx199(
23531
23701
  "li",
23532
23702
  {
23533
23703
  "data-slot": "timeline-item",
@@ -23541,7 +23711,7 @@ function TimelineDot({
23541
23711
  variant = "default",
23542
23712
  ...props
23543
23713
  }) {
23544
- return /* @__PURE__ */ jsx198(
23714
+ return /* @__PURE__ */ jsx199(
23545
23715
  "div",
23546
23716
  {
23547
23717
  "data-slot": "timeline-dot",
@@ -23552,7 +23722,7 @@ function TimelineDot({
23552
23722
  );
23553
23723
  }
23554
23724
  function TimelineContent({ className, ...props }) {
23555
- return /* @__PURE__ */ jsx198(
23725
+ return /* @__PURE__ */ jsx199(
23556
23726
  "div",
23557
23727
  {
23558
23728
  "data-slot": "timeline-content",
@@ -23566,13 +23736,13 @@ function TimelineTitle({
23566
23736
  children,
23567
23737
  ...props
23568
23738
  }) {
23569
- return /* @__PURE__ */ jsx198(
23739
+ return /* @__PURE__ */ jsx199(
23570
23740
  "h3",
23571
23741
  {
23572
23742
  "data-slot": "timeline-title",
23573
23743
  className: cn("cn-timeline-title", className),
23574
23744
  ...props,
23575
- children: children ?? /* @__PURE__ */ jsx198("span", { className: "sr-only", children: "Timeline item" })
23745
+ children: children ?? /* @__PURE__ */ jsx199("span", { className: "sr-only", children: "Timeline item" })
23576
23746
  }
23577
23747
  );
23578
23748
  }
@@ -23580,7 +23750,7 @@ function TimelineDescription({
23580
23750
  className,
23581
23751
  ...props
23582
23752
  }) {
23583
- return /* @__PURE__ */ jsx198(
23753
+ return /* @__PURE__ */ jsx199(
23584
23754
  "p",
23585
23755
  {
23586
23756
  "data-slot": "timeline-description",
@@ -23590,7 +23760,7 @@ function TimelineDescription({
23590
23760
  );
23591
23761
  }
23592
23762
  function TimelineTime({ className, ...props }) {
23593
- return /* @__PURE__ */ jsx198(
23763
+ return /* @__PURE__ */ jsx199(
23594
23764
  "time",
23595
23765
  {
23596
23766
  "data-slot": "timeline-time",
@@ -23602,7 +23772,7 @@ function TimelineTime({ className, ...props }) {
23602
23772
 
23603
23773
  // src/components/ui/title.tsx
23604
23774
  import { cva as cva26 } from "class-variance-authority";
23605
- import { jsx as jsx199 } from "react/jsx-runtime";
23775
+ import { jsx as jsx200 } from "react/jsx-runtime";
23606
23776
  var titleVariants = cva26("font-semibold tracking-tight text-pretty", {
23607
23777
  variants: {
23608
23778
  order: {
@@ -23653,7 +23823,7 @@ function Title({
23653
23823
  ...props
23654
23824
  }) {
23655
23825
  const Component = `h${order}`;
23656
- return /* @__PURE__ */ jsx199(
23826
+ return /* @__PURE__ */ jsx200(
23657
23827
  Component,
23658
23828
  {
23659
23829
  "data-slot": "title",
@@ -23670,7 +23840,7 @@ function Title({
23670
23840
  // src/components/ui/toggle.tsx
23671
23841
  import { Toggle as TogglePrimitive } from "@base-ui/react/toggle";
23672
23842
  import { cva as cva27 } from "class-variance-authority";
23673
- import { jsx as jsx200 } from "react/jsx-runtime";
23843
+ import { jsx as jsx201 } from "react/jsx-runtime";
23674
23844
  var toggleVariants = cva27(
23675
23845
  'cn-toggle inline-flex items-center justify-center gap-2 whitespace-nowrap border border-transparent outline-none transition-colors [&_svg]:pointer-events-none [&_svg:not([class*="size-"])]:size-4 [&_svg]:shrink-0',
23676
23846
  {
@@ -23697,7 +23867,7 @@ function Toggle({
23697
23867
  size,
23698
23868
  ...props
23699
23869
  }) {
23700
- return /* @__PURE__ */ jsx200(
23870
+ return /* @__PURE__ */ jsx201(
23701
23871
  TogglePrimitive,
23702
23872
  {
23703
23873
  "data-slot": "toggle",
@@ -23711,7 +23881,7 @@ function Toggle({
23711
23881
  import { Toggle as TogglePrimitive2 } from "@base-ui/react/toggle";
23712
23882
  import { ToggleGroup as ToggleGroupPrimitive } from "@base-ui/react/toggle-group";
23713
23883
  import * as React16 from "react";
23714
- import { jsx as jsx201 } from "react/jsx-runtime";
23884
+ import { jsx as jsx202 } from "react/jsx-runtime";
23715
23885
  var ToggleGroupContext = React16.createContext({
23716
23886
  size: "default",
23717
23887
  variant: "default",
@@ -23725,7 +23895,7 @@ function ToggleGroup({
23725
23895
  children,
23726
23896
  ...props
23727
23897
  }) {
23728
- return /* @__PURE__ */ jsx201(
23898
+ return /* @__PURE__ */ jsx202(
23729
23899
  ToggleGroupPrimitive,
23730
23900
  {
23731
23901
  "data-slot": "toggle-group",
@@ -23738,7 +23908,7 @@ function ToggleGroup({
23738
23908
  className
23739
23909
  ),
23740
23910
  ...props,
23741
- children: /* @__PURE__ */ jsx201(ToggleGroupContext.Provider, { value: { variant, size, spacing }, children })
23911
+ children: /* @__PURE__ */ jsx202(ToggleGroupContext.Provider, { value: { variant, size, spacing }, children })
23742
23912
  }
23743
23913
  );
23744
23914
  }
@@ -23750,7 +23920,7 @@ function ToggleGroupItem({
23750
23920
  ...props
23751
23921
  }) {
23752
23922
  const context = React16.useContext(ToggleGroupContext);
23753
- return /* @__PURE__ */ jsx201(
23923
+ return /* @__PURE__ */ jsx202(
23754
23924
  TogglePrimitive2,
23755
23925
  {
23756
23926
  "data-slot": "toggle-group-item",
@@ -23772,8 +23942,8 @@ function ToggleGroupItem({
23772
23942
  }
23773
23943
 
23774
23944
  // src/components/ui/transition.tsx
23775
- import { useEffect as useEffect31, useState as useState54 } from "react";
23776
- import { Fragment as Fragment30, jsx as jsx202 } from "react/jsx-runtime";
23945
+ import { useEffect as useEffect31, useState as useState55 } from "react";
23946
+ import { Fragment as Fragment31, jsx as jsx203 } from "react/jsx-runtime";
23777
23947
  var TRANSITIONS = {
23778
23948
  fade: {
23779
23949
  in: { opacity: 1 },
@@ -23827,10 +23997,10 @@ var TRANSITIONS = {
23827
23997
  }
23828
23998
  };
23829
23999
  function useTransitionState(mounted, duration, exitDuration, timingFunction, onEnter, onEntered, onExit, onExited, enterDelay, exitDelay) {
23830
- const [status, setStatus] = useState54(
24000
+ const [status, setStatus] = useState55(
23831
24001
  mounted ? "entered" : "exited"
23832
24002
  );
23833
- const [displayDuration, setDisplayDuration] = useState54(duration);
24003
+ const [displayDuration, setDisplayDuration] = useState55(duration);
23834
24004
  useEffect31(() => {
23835
24005
  if (mounted) {
23836
24006
  setDisplayDuration(duration);
@@ -23913,7 +24083,7 @@ function Transition({
23913
24083
  const t = TRANSITIONS[transition];
23914
24084
  if (!t) {
23915
24085
  if (mounted) {
23916
- return /* @__PURE__ */ jsx202(Fragment30, { children: children({}) });
24086
+ return /* @__PURE__ */ jsx203(Fragment31, { children: children({}) });
23917
24087
  }
23918
24088
  if (keepMounted) {
23919
24089
  return children({ display: "none" });
@@ -23939,13 +24109,13 @@ function Transition({
23939
24109
  transitionDuration: `${d}ms`,
23940
24110
  transitionTimingFunction: tf
23941
24111
  };
23942
- return /* @__PURE__ */ jsx202(Fragment30, { children: children(styles) });
24112
+ return /* @__PURE__ */ jsx203(Fragment31, { children: children(styles) });
23943
24113
  }
23944
24114
 
23945
24115
  // src/components/ui/tree.tsx
23946
24116
  import { IconChevronRight as IconChevronRight11 } from "@tabler/icons-react";
23947
- import { useState as useState55 } from "react";
23948
- import { jsx as jsx203, jsxs as jsxs113 } from "react/jsx-runtime";
24117
+ import { useState as useState56 } from "react";
24118
+ import { jsx as jsx204, jsxs as jsxs114 } from "react/jsx-runtime";
23949
24119
  function Tree({
23950
24120
  className,
23951
24121
  data,
@@ -23959,7 +24129,7 @@ function Tree({
23959
24129
  renderNode,
23960
24130
  ...props
23961
24131
  }) {
23962
- const [internalExpanded, setInternalExpanded] = useState55(
24132
+ const [internalExpanded, setInternalExpanded] = useState56(
23963
24133
  /* @__PURE__ */ new Set()
23964
24134
  );
23965
24135
  const expanded = expandedProp !== void 0 ? expandedProp : internalExpanded;
@@ -23981,14 +24151,14 @@ function Tree({
23981
24151
  onSelectedValueChange?.(node.value);
23982
24152
  }
23983
24153
  };
23984
- return /* @__PURE__ */ jsx203(
24154
+ return /* @__PURE__ */ jsx204(
23985
24155
  "div",
23986
24156
  {
23987
24157
  "data-slot": "tree",
23988
24158
  role: "tree",
23989
24159
  className: cn("cn-tree", className),
23990
24160
  ...props,
23991
- children: data.map((node) => /* @__PURE__ */ jsx203(
24161
+ children: data.map((node) => /* @__PURE__ */ jsx204(
23992
24162
  TreeNode,
23993
24163
  {
23994
24164
  node,
@@ -24026,14 +24196,14 @@ function TreeNode({
24026
24196
  hasChildren,
24027
24197
  selected
24028
24198
  }) ?? node.label;
24029
- return /* @__PURE__ */ jsxs113(
24199
+ return /* @__PURE__ */ jsxs114(
24030
24200
  "div",
24031
24201
  {
24032
24202
  role: "treeitem",
24033
24203
  tabIndex: 0,
24034
24204
  "aria-expanded": hasChildren ? expanded : void 0,
24035
24205
  children: [
24036
- /* @__PURE__ */ jsxs113(
24206
+ /* @__PURE__ */ jsxs114(
24037
24207
  UnstyledButton,
24038
24208
  {
24039
24209
  type: "button",
@@ -24042,21 +24212,21 @@ function TreeNode({
24042
24212
  style: { paddingLeft: `${level * levelOffset + 4}px` },
24043
24213
  onClick: () => handleNodeClick(node, hasChildren),
24044
24214
  children: [
24045
- hasChildren ? /* @__PURE__ */ jsx203(
24215
+ hasChildren ? /* @__PURE__ */ jsx204(
24046
24216
  "span",
24047
24217
  {
24048
24218
  className: cn(
24049
24219
  "cn-tree-node-chevron text-muted-foreground flex shrink-0 transition-transform",
24050
24220
  expanded && "rotate-90"
24051
24221
  ),
24052
- children: /* @__PURE__ */ jsx203(IconChevronRight11, { className: "size-4" })
24222
+ children: /* @__PURE__ */ jsx204(IconChevronRight11, { className: "size-4" })
24053
24223
  }
24054
- ) : /* @__PURE__ */ jsx203("span", { "aria-hidden": true, className: "cn-tree-node-spacer w-4 shrink-0" }),
24055
- /* @__PURE__ */ jsx203("span", { className: "cn-tree-node-label min-w-0 flex-1 truncate", children: label })
24224
+ ) : /* @__PURE__ */ jsx204("span", { "aria-hidden": true, className: "cn-tree-node-spacer w-4 shrink-0" }),
24225
+ /* @__PURE__ */ jsx204("span", { className: "cn-tree-node-label min-w-0 flex-1 truncate", children: label })
24056
24226
  ]
24057
24227
  }
24058
24228
  ),
24059
- hasChildren && expanded && node.children && /* @__PURE__ */ jsx203("fieldset", { className: "cn-tree-node-children list-none border-0 p-0 m-0 min-w-0", children: node.children.map((child) => /* @__PURE__ */ jsx203(
24229
+ hasChildren && expanded && node.children && /* @__PURE__ */ jsx204("fieldset", { className: "cn-tree-node-children list-none border-0 p-0 m-0 min-w-0", children: node.children.map((child) => /* @__PURE__ */ jsx204(
24060
24230
  TreeNode,
24061
24231
  {
24062
24232
  node: child,
@@ -24430,6 +24600,7 @@ export {
24430
24600
  RichTextEditorToolbar,
24431
24601
  RichTextInput,
24432
24602
  RingProgress,
24603
+ STATUS_MENU_SEPARATOR,
24433
24604
  ScrollArea,
24434
24605
  ScrollBar,
24435
24606
  DisplayTableScrollContainer as ScrollContainer,
@@ -24487,6 +24658,7 @@ export {
24487
24658
  Spoiler,
24488
24659
  SpotlightSearch,
24489
24660
  Stack,
24661
+ StatusDropdownButton,
24490
24662
  Step,
24491
24663
  Stepper,
24492
24664
  Switch,