@ai-matrx/design-system 0.49.2 → 0.49.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.
package/dist/index.cjs CHANGED
@@ -161,7 +161,7 @@ __export(src_exports, {
161
161
  Input: () => Input,
162
162
  InputWithPrefix: () => InputWithPrefix,
163
163
  LAYER_FRONT_EVENT: () => LAYER_FRONT_EVENT,
164
- Label: () => Label3,
164
+ Label: () => Label4,
165
165
  MOBILE_BREAKPOINT: () => MOBILE_BREAKPOINT,
166
166
  MODAL_LAYER_Z: () => MODAL_LAYER_Z,
167
167
  MOTION_BOTTOM_SHEET: () => MOTION_BOTTOM_SHEET,
@@ -192,6 +192,7 @@ __export(src_exports, {
192
192
  ScrollBar: () => ScrollBar,
193
193
  SegmentedControl: () => SegmentedControl,
194
194
  Select: () => Select,
195
+ SelectChevron: () => SelectChevron,
195
196
  SelectContent: () => SelectContent,
196
197
  SelectGroup: () => SelectGroup,
197
198
  SelectItem: () => SelectItem,
@@ -335,12 +336,6 @@ function MoreHorizontalIcon(props) {
335
336
  function LucideCheckIcon(props) {
336
337
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { ...lucideProps(props), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M20 6 9 17l-5-5" }) });
337
338
  }
338
- function ChevronsUpDownIcon(props) {
339
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { ...lucideProps(props), children: [
340
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "m7 15 5 5 5-5" }),
341
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "m7 9 5-5 5 5" })
342
- ] });
343
- }
344
339
  function ExternalLinkIcon(props) {
345
340
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { ...lucideProps(props), children: [
346
341
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M15 3h6v6" }),
@@ -2042,17 +2037,177 @@ var ContextMenuShortcut = ({
2042
2037
  );
2043
2038
  ContextMenuShortcut.displayName = "ContextMenuShortcut";
2044
2039
 
2040
+ // src/select.tsx
2041
+ var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
2042
+ var import_class_variance_authority4 = require("class-variance-authority");
2043
+ var React18 = __toESM(require("react"), 1);
2044
+
2045
+ // src/field-surface.ts
2046
+ var FIELD_SURFACE_CLASS = "border border-border bg-card";
2047
+
2048
+ // src/select.tsx
2049
+ var import_jsx_runtime21 = require("react/jsx-runtime");
2050
+ var Select = SelectPrimitive.Root;
2051
+ var SelectGroup = SelectPrimitive.Group;
2052
+ var SelectValue = SelectPrimitive.Value;
2053
+ var selectTriggerVariants = (0, import_class_variance_authority4.cva)(
2054
+ `flex w-full items-center justify-between gap-2 whitespace-nowrap rounded-md ${FIELD_SURFACE_CLASS} text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground transition-colors hover:bg-accent hover:border-accent-foreground/20 focus:outline-none focus:ring-1 focus:ring-primary/30 focus:border-primary/40 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:min-w-0 [&>span]:line-clamp-1`,
2055
+ {
2056
+ variants: {
2057
+ size: {
2058
+ sm: "h-7 px-2 py-1 text-xs",
2059
+ default: "h-9 px-3 py-1",
2060
+ lg: "h-10 px-3 py-2"
2061
+ }
2062
+ },
2063
+ defaultVariants: {
2064
+ size: "default"
2065
+ }
2066
+ }
2067
+ );
2068
+ function SelectChevron({ className, size = "default" }) {
2069
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2070
+ RadixChevronDownIcon,
2071
+ {
2072
+ "aria-hidden": "true",
2073
+ "data-select-chevron": "",
2074
+ className: cn(size === "sm" ? "h-3.5 w-3.5" : "h-4 w-4", "shrink-0 opacity-50", className)
2075
+ }
2076
+ );
2077
+ }
2078
+ var SelectTrigger = React18.forwardRef(({ className, children, hideArrow = false, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2079
+ SelectPrimitive.Trigger,
2080
+ {
2081
+ ref,
2082
+ className: cn(selectTriggerVariants({ size, className })),
2083
+ ...props,
2084
+ children: [
2085
+ children,
2086
+ !hideArrow && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SelectChevron, { size: size === "sm" ? "sm" : "default" }) })
2087
+ ]
2088
+ }
2089
+ ));
2090
+ SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
2091
+ var SelectScrollUpButton = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2092
+ SelectPrimitive.ScrollUpButton,
2093
+ {
2094
+ ref,
2095
+ className: cn(
2096
+ "flex cursor-default items-center justify-center py-1",
2097
+ className
2098
+ ),
2099
+ ...props,
2100
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(RadixChevronUpIcon, {})
2101
+ }
2102
+ ));
2103
+ SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
2104
+ var SelectScrollDownButton = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2105
+ SelectPrimitive.ScrollDownButton,
2106
+ {
2107
+ ref,
2108
+ className: cn(
2109
+ "flex cursor-default items-center justify-center py-1",
2110
+ className
2111
+ ),
2112
+ ...props,
2113
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(RadixChevronDownIcon, {})
2114
+ }
2115
+ ));
2116
+ SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
2117
+ var SelectContent = React18.forwardRef(
2118
+ ({
2119
+ className,
2120
+ children,
2121
+ position = "popper",
2122
+ container,
2123
+ animated = true,
2124
+ ...props
2125
+ }, ref) => {
2126
+ const portalContainer = usePortalContainer(container);
2127
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SelectPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2128
+ SelectPrimitive.Content,
2129
+ {
2130
+ ref,
2131
+ className: cn(
2132
+ "relative z-[10001] max-h-96 min-w-[8rem] max-w-[calc(100vw-2rem)] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md",
2133
+ animated && MOTION_POPPER,
2134
+ // The resting gap from the trigger. It is the `translate` property
2135
+ // (POPPER_OFFSET), never Tailwind translate utilities: those compose
2136
+ // with `transform` on a v4 host and are REPLACED by it on a v3 one,
2137
+ // so on v3 the animation ate the gap and the surface snapped 4px at
2138
+ // the end. Same law as the centred dialog card — see motion.ts.
2139
+ position === "popper" && POPPER_OFFSET,
2140
+ className
2141
+ ),
2142
+ position,
2143
+ ...props,
2144
+ children: [
2145
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SelectScrollUpButton, {}),
2146
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2147
+ SelectPrimitive.Viewport,
2148
+ {
2149
+ className: cn(
2150
+ "max-w-full overflow-y-auto p-0.5",
2151
+ position === "popper" && "w-full min-w-[var(--radix-select-trigger-width)] max-h-[var(--radix-select-content-available-height)]"
2152
+ ),
2153
+ children
2154
+ }
2155
+ ),
2156
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SelectScrollDownButton, {})
2157
+ ]
2158
+ }
2159
+ ) });
2160
+ }
2161
+ );
2162
+ SelectContent.displayName = SelectPrimitive.Content.displayName;
2163
+ var SelectLabel = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2164
+ SelectPrimitive.Label,
2165
+ {
2166
+ ref,
2167
+ className: cn("px-2 py-1.5 text-sm font-semibold", className),
2168
+ ...props
2169
+ }
2170
+ ));
2171
+ SelectLabel.displayName = SelectPrimitive.Label.displayName;
2172
+ var SelectItem = React18.forwardRef(({ className, children, description, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2173
+ SelectPrimitive.Item,
2174
+ {
2175
+ ref,
2176
+ className: cn(
2177
+ "relative flex w-full min-w-0 cursor-default select-none rounded-sm py-1 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
2178
+ description ? "flex-col items-start gap-0.5 py-1.5" : "items-center",
2179
+ className
2180
+ ),
2181
+ ...props,
2182
+ children: [
2183
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CheckIcon, { className: "h-4 w-4" }) }) }),
2184
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "min-w-0 whitespace-normal break-words [overflow-wrap:anywhere]", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SelectPrimitive.ItemText, { children }) }),
2185
+ description ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "block min-w-0 break-words text-xs leading-snug text-muted-foreground [overflow-wrap:anywhere]", children: description }) : null
2186
+ ]
2187
+ }
2188
+ ));
2189
+ SelectItem.displayName = SelectPrimitive.Item.displayName;
2190
+ var SelectSeparator = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2191
+ SelectPrimitive.Separator,
2192
+ {
2193
+ ref,
2194
+ className: cn("-mx-1 my-1 h-px bg-muted", className),
2195
+ ...props
2196
+ }
2197
+ ));
2198
+ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
2199
+
2045
2200
  // src/creatable-picker.tsx
2046
2201
  var import_react = require("react");
2047
2202
 
2048
2203
  // src/popover.tsx
2049
2204
  var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"), 1);
2050
- var React18 = __toESM(require("react"), 1);
2051
- var import_jsx_runtime21 = require("react/jsx-runtime");
2205
+ var React19 = __toESM(require("react"), 1);
2206
+ var import_jsx_runtime22 = require("react/jsx-runtime");
2052
2207
  var Popover = PopoverPrimitive.Root;
2053
2208
  var PopoverTrigger = PopoverPrimitive.Trigger;
2054
2209
  var PopoverAnchor = PopoverPrimitive.Anchor;
2055
- var PopoverContent = React18.forwardRef(
2210
+ var PopoverContent = React19.forwardRef(
2056
2211
  ({
2057
2212
  className,
2058
2213
  align = "center",
@@ -2064,7 +2219,7 @@ var PopoverContent = React18.forwardRef(
2064
2219
  ...props
2065
2220
  }, ref) => {
2066
2221
  const portalContainer = usePortalContainer(container);
2067
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(PopoverPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2222
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(PopoverPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2068
2223
  PopoverPrimitive.Content,
2069
2224
  {
2070
2225
  ref,
@@ -2091,7 +2246,7 @@ var PopoverContent = React18.forwardRef(
2091
2246
  PopoverContent.displayName = PopoverPrimitive.Content.displayName;
2092
2247
 
2093
2248
  // src/creatable-picker.tsx
2094
- var import_jsx_runtime22 = require("react/jsx-runtime");
2249
+ var import_jsx_runtime23 = require("react/jsx-runtime");
2095
2250
  function article(noun) {
2096
2251
  return /^[aeiou]/i.test(noun.trim()) ? `an ${noun}` : `a ${noun}`;
2097
2252
  }
@@ -2166,8 +2321,8 @@ function CreatablePicker({
2166
2321
  setBusy(false);
2167
2322
  }
2168
2323
  };
2169
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Popover, { open, onOpenChange: (next) => next ? setOpen(true) : close(), children: [
2170
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(PopoverTrigger, { asChild: true, disabled, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
2324
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Popover, { open, onOpenChange: (next) => next ? setOpen(true) : close(), children: [
2325
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(PopoverTrigger, { asChild: true, disabled, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
2171
2326
  "button",
2172
2327
  {
2173
2328
  type: "button",
@@ -2181,12 +2336,12 @@ function CreatablePicker({
2181
2336
  triggerClassName
2182
2337
  ),
2183
2338
  children: [
2184
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "min-w-0 flex-1 truncate", children: selected ? renderSelected ?? selected.render ?? selected.label : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "text-muted-foreground", children: loading ? "Loading\u2026" : placeholder }) }),
2185
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ChevronsUpDownIcon, { className: "size-3.5 shrink-0 opacity-50" })
2339
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "min-w-0 flex-1 truncate", children: selected ? renderSelected ?? selected.render ?? selected.label : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-muted-foreground", children: loading ? "Loading\u2026" : placeholder }) }),
2340
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(SelectChevron, { size: "sm" })
2186
2341
  ]
2187
2342
  }
2188
2343
  ) }),
2189
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(PopoverContent, { sizing: "content", align: "start", className: "p-0", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
2344
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(PopoverContent, { sizing: "content", align: "start", className: "p-0", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
2190
2345
  Command,
2191
2346
  {
2192
2347
  filter: (itemValue, search, keywords) => {
@@ -2194,7 +2349,7 @@ function CreatablePicker({
2194
2349
  return haystack.includes(search.toLowerCase()) ? 1 : 0;
2195
2350
  },
2196
2351
  children: [
2197
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2352
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2198
2353
  CommandInput,
2199
2354
  {
2200
2355
  ref: inputRef,
@@ -2206,13 +2361,13 @@ function CreatablePicker({
2206
2361
  placeholder: searchPlaceholder ?? `Search or add ${article(noun)}\u2026`
2207
2362
  }
2208
2363
  ),
2209
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(CommandList, { children: [
2210
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CommandEmpty, { children: emptyLabel }),
2211
- groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2364
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(CommandList, { children: [
2365
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(CommandEmpty, { children: emptyLabel }),
2366
+ groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2212
2367
  CommandGroup,
2213
2368
  {
2214
2369
  ...group.heading === void 0 ? {} : { heading: group.heading },
2215
- children: group.options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
2370
+ children: group.options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
2216
2371
  CommandItem,
2217
2372
  {
2218
2373
  value: option.label,
@@ -2223,7 +2378,7 @@ function CreatablePicker({
2223
2378
  },
2224
2379
  className: "gap-2 text-xs",
2225
2380
  children: [
2226
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2381
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2227
2382
  LucideCheckIcon,
2228
2383
  {
2229
2384
  className: cn(
@@ -2232,8 +2387,8 @@ function CreatablePicker({
2232
2387
  )
2233
2388
  }
2234
2389
  ),
2235
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "min-w-0 flex-1 truncate", children: option.render ?? option.label }),
2236
- option.hint ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "shrink-0 text-[10px] text-muted-foreground", children: option.hint }) : null
2390
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "min-w-0 flex-1 truncate", children: option.render ?? option.label }),
2391
+ option.hint ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "shrink-0 text-[10px] text-muted-foreground", children: option.hint }) : null
2237
2392
  ]
2238
2393
  },
2239
2394
  option.value
@@ -2242,9 +2397,9 @@ function CreatablePicker({
2242
2397
  group.heading ?? "__ungrouped__"
2243
2398
  ))
2244
2399
  ] }),
2245
- canCreate ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "space-y-1 border-t border-border p-1", children: [
2246
- createExtra && typed && !exactMatch ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "px-1 pt-0.5", children: typeof createExtra === "function" ? createExtra(typed) : createExtra }) : null,
2247
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
2400
+ canCreate ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "space-y-1 border-t border-border p-1", children: [
2401
+ createExtra && typed && !exactMatch ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "px-1 pt-0.5", children: typeof createExtra === "function" ? createExtra(typed) : createExtra }) : null,
2402
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
2248
2403
  "button",
2249
2404
  {
2250
2405
  type: "button",
@@ -2252,22 +2407,22 @@ function CreatablePicker({
2252
2407
  onClick: () => void create(typed),
2253
2408
  className: "flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-left text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground disabled:opacity-50",
2254
2409
  children: [
2255
- busy ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Loader2Icon, { className: "size-3.5 shrink-0 matrx-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(PlusIcon, { className: "size-3.5 shrink-0" }),
2256
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "min-w-0 truncate", children: typed && !exactMatch ? `Create \u201C${typed}\u201D` : `Add ${article(noun)}\u2026` })
2410
+ busy ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Loader2Icon, { className: "size-3.5 shrink-0 matrx-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(PlusIcon, { className: "size-3.5 shrink-0" }),
2411
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "min-w-0 truncate", children: typed && !exactMatch ? `Create \u201C${typed}\u201D` : `Add ${article(noun)}\u2026` })
2257
2412
  ]
2258
2413
  }
2259
2414
  ),
2260
- needsName ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("p", { className: "px-2 pb-0.5 text-[11px] leading-snug text-muted-foreground", children: [
2415
+ needsName ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("p", { className: "px-2 pb-0.5 text-[11px] leading-snug text-muted-foreground", children: [
2261
2416
  "Type the name of the ",
2262
2417
  noun,
2263
2418
  " you want to add \u2014 then this creates it."
2264
2419
  ] }) : null
2265
2420
  ] }) : null,
2266
- footerActions?.length || manageAction ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "space-y-0.5 border-t border-border p-1", children: [
2421
+ footerActions?.length || manageAction ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "space-y-0.5 border-t border-border p-1", children: [
2267
2422
  footerActions?.map((action) => {
2268
2423
  const Icon2 = action.icon;
2269
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { children: [
2270
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
2424
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { children: [
2425
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
2271
2426
  "button",
2272
2427
  {
2273
2428
  type: "button",
@@ -2277,15 +2432,15 @@ function CreatablePicker({
2277
2432
  },
2278
2433
  className: "flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-left text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
2279
2434
  children: [
2280
- Icon2 ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon2, { className: "size-3.5 shrink-0" }) : null,
2281
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "min-w-0 truncate", children: action.label })
2435
+ Icon2 ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon2, { className: "size-3.5 shrink-0" }) : null,
2436
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "min-w-0 truncate", children: action.label })
2282
2437
  ]
2283
2438
  }
2284
2439
  ),
2285
- action.note ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "px-2 pb-1 text-[10px] leading-snug text-muted-foreground", children: action.note }) : null
2440
+ action.note ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "px-2 pb-1 text-[10px] leading-snug text-muted-foreground", children: action.note }) : null
2286
2441
  ] }, action.label);
2287
2442
  }),
2288
- manageAction ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
2443
+ manageAction ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
2289
2444
  "a",
2290
2445
  {
2291
2446
  href: manageAction.href,
@@ -2294,18 +2449,18 @@ function CreatablePicker({
2294
2449
  onClick: close,
2295
2450
  className: "flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-left text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
2296
2451
  children: [
2297
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ExternalLinkIcon, { className: "size-3.5 shrink-0" }),
2298
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "min-w-0 truncate", children: manageAction.label })
2452
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ExternalLinkIcon, { className: "size-3.5 shrink-0" }),
2453
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "min-w-0 truncate", children: manageAction.label })
2299
2454
  ]
2300
2455
  }
2301
2456
  ) : null
2302
2457
  ] }) : null,
2303
- lockedNote ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "space-y-1 border-t border-border p-2", children: [
2304
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("p", { className: "flex gap-1.5 text-[11px] leading-snug text-muted-foreground", children: [
2305
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(LockIcon, { className: "mt-px size-3 shrink-0" }),
2306
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: lockedNote })
2458
+ lockedNote ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "space-y-1 border-t border-border p-2", children: [
2459
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("p", { className: "flex gap-1.5 text-[11px] leading-snug text-muted-foreground", children: [
2460
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(LockIcon, { className: "mt-px size-3 shrink-0" }),
2461
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { children: lockedNote })
2307
2462
  ] }),
2308
- lockedAction ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
2463
+ lockedAction ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
2309
2464
  "button",
2310
2465
  {
2311
2466
  type: "button",
@@ -2315,8 +2470,8 @@ function CreatablePicker({
2315
2470
  },
2316
2471
  className: "flex w-full items-center gap-2 rounded-sm px-1 py-1 text-left text-xs font-medium text-primary transition-colors hover:bg-accent",
2317
2472
  children: [
2318
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(PlusIcon, { className: "size-3.5 shrink-0" }),
2319
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "min-w-0 truncate", children: lockedAction.label })
2473
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(PlusIcon, { className: "size-3.5 shrink-0" }),
2474
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "min-w-0 truncate", children: lockedAction.label })
2320
2475
  ]
2321
2476
  }
2322
2477
  ) : null
@@ -2331,7 +2486,7 @@ function CreatablePicker({
2331
2486
  var DialogPrimitive2 = __toESM(require("@radix-ui/react-dialog"), 1);
2332
2487
  var VisuallyHidden2 = __toESM(require("@radix-ui/react-visually-hidden"), 1);
2333
2488
  var import_react_tree3 = require("@ai-matrx/kit/react-tree");
2334
- var React19 = __toESM(require("react"), 1);
2489
+ var React20 = __toESM(require("react"), 1);
2335
2490
 
2336
2491
  // src/layer-front.ts
2337
2492
  var LAYER_FRONT_EVENT = "matrx:layer-front";
@@ -2343,15 +2498,15 @@ function announceLayerFront(element) {
2343
2498
  }
2344
2499
 
2345
2500
  // src/dialog.tsx
2346
- var import_jsx_runtime23 = require("react/jsx-runtime");
2347
- var DialogWindowedByDefaultContext = React19.createContext(false);
2501
+ var import_jsx_runtime24 = require("react/jsx-runtime");
2502
+ var DialogWindowedByDefaultContext = React20.createContext(false);
2348
2503
  var Dialog = ({
2349
2504
  children,
2350
2505
  ...props
2351
2506
  }) => {
2352
2507
  const isMobile = useIsMobile();
2353
2508
  const modal = props.modal ?? isMobile;
2354
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DialogWindowedByDefaultContext.Provider, { value: props.modal === void 0, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(RadixDialogModalProvider, { modal, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DialogPrimitive2.Root, { ...props, modal, children }) }) });
2509
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DialogWindowedByDefaultContext.Provider, { value: props.modal === void 0, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(RadixDialogModalProvider, { modal, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DialogPrimitive2.Root, { ...props, modal, children }) }) });
2355
2510
  };
2356
2511
  Dialog.displayName = "Dialog";
2357
2512
  var DialogTrigger = DialogPrimitive2.Trigger;
@@ -2361,14 +2516,14 @@ var DialogPortal = ({
2361
2516
  ...props
2362
2517
  }) => {
2363
2518
  const resolved = usePortalContainer(container);
2364
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DialogPrimitive2.Portal, { container: resolved ?? null, ...props });
2519
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DialogPrimitive2.Portal, { container: resolved ?? null, ...props });
2365
2520
  };
2366
2521
  DialogPortal.displayName = "DialogPortal";
2367
2522
  var CONTEXT_SLOT3 = /* @__PURE__ */ Symbol.for("ai-matrx.design-system.dialog-container-context");
2368
2523
  var contextRegistry3 = globalThis;
2369
- var DialogContainerContext = contextRegistry3[CONTEXT_SLOT3] ??= React19.createContext(null);
2370
- var useDialogContainer = () => React19.useContext(DialogContainerContext);
2371
- var DialogOverlay = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2524
+ var DialogContainerContext = contextRegistry3[CONTEXT_SLOT3] ??= React20.createContext(null);
2525
+ var useDialogContainer = () => React20.useContext(DialogContainerContext);
2526
+ var DialogOverlay = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2372
2527
  DialogPrimitive2.Overlay,
2373
2528
  {
2374
2529
  ref,
@@ -2384,10 +2539,10 @@ var DialogOverlay = React19.forwardRef(({ className, ...props }, ref) => /* @__P
2384
2539
  }
2385
2540
  ));
2386
2541
  DialogOverlay.displayName = DialogPrimitive2.Overlay.displayName;
2387
- var DialogContentPrimitive = React19.forwardRef(({ onInteractOutside, ...props }, ref) => {
2542
+ var DialogContentPrimitive = React20.forwardRef(({ onInteractOutside, ...props }, ref) => {
2388
2543
  const isModal = useRadixDialogModal();
2389
2544
  useModalLayer(isModal);
2390
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2545
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2391
2546
  DialogPrimitive2.Content,
2392
2547
  {
2393
2548
  ...props,
@@ -2401,12 +2556,12 @@ DialogContentPrimitive.displayName = "DialogContentPrimitive";
2401
2556
  var DIALOG_DESKTOP_CLASSES2 = "matrx-dialog-card fixed inset-0 z-[10000] m-auto grid h-fit min-w-0 w-full max-w-lg gap-4 max-h-[85dvh] overflow-y-auto overscroll-contain [--dialog-pad:1.5rem] overflow-x-clip border bg-background p-6 shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full sm:rounded-lg";
2402
2557
  var DIALOG_MOBILE_SHEET_CLASSES2 = "matrx-mobile-sheet matrx-dialog-card fixed inset-x-0 bottom-0 left-0 right-0 top-auto z-[10000] flex min-w-0 flex-col w-full max-w-full max-h-[90dvh] gap-4 [--dialog-pad:1rem] overflow-x-clip border-t bg-background p-4 pb-safe shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full rounded-t-2xl rounded-b-none overflow-y-auto overscroll-contain";
2403
2558
  var DIALOG_MOBILE_SHEET_OVERRIDE2 = "inset-x-0 bottom-0 left-0 right-0 top-auto translate-none w-full max-w-full max-h-[90dvh] rounded-b-none rounded-t-2xl overflow-y-auto";
2404
- var DialogWindowHandleContext = React19.createContext(null);
2559
+ var DialogWindowHandleContext = React20.createContext(null);
2405
2560
  var WINDOW_KEEP_VISIBLE = 80;
2406
2561
  function isInteractiveTarget(target) {
2407
2562
  return target instanceof Element && Boolean(target.closest("button, a, input, textarea, select, [role='button'], [contenteditable='true']"));
2408
2563
  }
2409
- var DialogContent = React19.forwardRef(
2564
+ var DialogContent = React20.forwardRef(
2410
2565
  ({
2411
2566
  className,
2412
2567
  children,
@@ -2427,13 +2582,13 @@ var DialogContent = React19.forwardRef(
2427
2582
  const injectedContainer = usePortalContainer(container);
2428
2583
  const asSheet = mobileSheet && isMobile;
2429
2584
  const windowed = !isModal && !asSheet;
2430
- const windowedByDefault = React19.useContext(DialogWindowedByDefaultContext);
2431
- const [containerEl, setContainerEl] = React19.useState(
2585
+ const windowedByDefault = React20.useContext(DialogWindowedByDefaultContext);
2586
+ const [containerEl, setContainerEl] = React20.useState(
2432
2587
  null
2433
2588
  );
2434
2589
  const stacks = windowed && windowedByDefault;
2435
- const [behind, setBehind] = React19.useState(false);
2436
- React19.useEffect(() => {
2590
+ const [behind, setBehind] = React20.useState(false);
2591
+ React20.useEffect(() => {
2437
2592
  if (!stacks || !containerEl) return;
2438
2593
  const onFront = (event) => {
2439
2594
  const element = event.detail?.element ?? null;
@@ -2449,9 +2604,9 @@ var DialogContent = React19.forwardRef(
2449
2604
  setBehind(false);
2450
2605
  announceLayerFront(containerEl);
2451
2606
  };
2452
- const [offset, setOffset] = React19.useState({ x: 0, y: 0 });
2453
- const dragRef = React19.useRef(null);
2454
- const handle = React19.useMemo(() => {
2607
+ const [offset, setOffset] = React20.useState({ x: 0, y: 0 });
2608
+ const dragRef = React20.useRef(null);
2609
+ const handle = React20.useMemo(() => {
2455
2610
  if (!windowed) return null;
2456
2611
  const clamp = (value, limit) => Math.max(-limit, Math.min(limit, value));
2457
2612
  return {
@@ -2479,7 +2634,7 @@ var DialogContent = React19.forwardRef(
2479
2634
  onDoubleClick: () => setOffset({ x: 0, y: 0 })
2480
2635
  };
2481
2636
  }, [windowed, offset.x, offset.y]);
2482
- const mergedRef = React19.useCallback(
2637
+ const mergedRef = React20.useCallback(
2483
2638
  (node) => {
2484
2639
  setContainerEl(node);
2485
2640
  if (typeof ref === "function") ref(node);
@@ -2490,9 +2645,9 @@ var DialogContent = React19.forwardRef(
2490
2645
  );
2491
2646
  const hasTitle = (0, import_react_tree3.treeContainsComponent)(children, DialogTitle) || (0, import_react_tree3.treeContainsComponent)(children, DialogPrimitive2.Title);
2492
2647
  const hasDescription = (0, import_react_tree3.treeContainsComponent)(children, DialogDescription) || (0, import_react_tree3.treeContainsComponent)(children, DialogPrimitive2.Description);
2493
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(DialogPortal, { container, children: [
2494
- isModal ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DialogOverlay, {}) : null,
2495
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
2648
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(DialogPortal, { container, children: [
2649
+ isModal ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DialogOverlay, {}) : null,
2650
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
2496
2651
  DialogContentPrimitive,
2497
2652
  {
2498
2653
  ref: mergedRef,
@@ -2535,23 +2690,23 @@ var DialogContent = React19.forwardRef(
2535
2690
  ...hasDescription ? {} : { "aria-describedby": void 0 },
2536
2691
  ...props,
2537
2692
  children: [
2538
- hasTitle ? null : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(VisuallyHidden2.Root, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DialogPrimitive2.Title, { children: "Dialog" }) }),
2539
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DialogContainerContext.Provider, { value: containerEl, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DialogWindowHandleContext.Provider, { value: handle, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2693
+ hasTitle ? null : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(VisuallyHidden2.Root, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DialogPrimitive2.Title, { children: "Dialog" }) }),
2694
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DialogContainerContext.Provider, { value: containerEl, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DialogWindowHandleContext.Provider, { value: handle, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2540
2695
  PortalContainerProvider,
2541
2696
  {
2542
2697
  container: containerEl ?? injectedContainer ?? null,
2543
2698
  children
2544
2699
  }
2545
2700
  ) }) }),
2546
- showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
2701
+ showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
2547
2702
  DialogPrimitive2.Close,
2548
2703
  {
2549
2704
  "data-slot": "dialog-close",
2550
2705
  "aria-label": "Close",
2551
2706
  className: "absolute right-2 top-4 flex h-11 w-11 items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground sm:right-4 lg:h-10 lg:w-10",
2552
2707
  children: [
2553
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(XIcon, { className: "h-4 w-4" }),
2554
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "sr-only", children: "Close" })
2708
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(XIcon, { className: "h-4 w-4" }),
2709
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "sr-only", children: "Close" })
2555
2710
  ]
2556
2711
  }
2557
2712
  ) : null
@@ -2566,8 +2721,8 @@ var DialogHeader = ({
2566
2721
  className,
2567
2722
  ...props
2568
2723
  }) => {
2569
- const handle = React19.useContext(DialogWindowHandleContext);
2570
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2724
+ const handle = React20.useContext(DialogWindowHandleContext);
2725
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2571
2726
  "div",
2572
2727
  {
2573
2728
  "data-slot": "dialog-header",
@@ -2591,7 +2746,7 @@ DialogHeader.displayName = "DialogHeader";
2591
2746
  var DialogFooter = ({
2592
2747
  className,
2593
2748
  ...props
2594
- }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2749
+ }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2595
2750
  "div",
2596
2751
  {
2597
2752
  "data-slot": "dialog-footer",
@@ -2623,7 +2778,7 @@ var DialogFooter = ({
2623
2778
  }
2624
2779
  );
2625
2780
  DialogFooter.displayName = "DialogFooter";
2626
- var DialogTitle = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2781
+ var DialogTitle = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2627
2782
  DialogPrimitive2.Title,
2628
2783
  {
2629
2784
  ref,
@@ -2633,7 +2788,7 @@ var DialogTitle = React19.forwardRef(({ className, ...props }, ref) => /* @__PUR
2633
2788
  }
2634
2789
  ));
2635
2790
  DialogTitle.displayName = DialogPrimitive2.Title.displayName;
2636
- var DialogDescription = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2791
+ var DialogDescription = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2637
2792
  DialogPrimitive2.Description,
2638
2793
  {
2639
2794
  ref,
@@ -2646,8 +2801,8 @@ DialogDescription.displayName = DialogPrimitive2.Description.displayName;
2646
2801
 
2647
2802
  // src/dropdown-menu.tsx
2648
2803
  var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
2649
- var React20 = __toESM(require("react"), 1);
2650
- var import_jsx_runtime24 = require("react/jsx-runtime");
2804
+ var React21 = __toESM(require("react"), 1);
2805
+ var import_jsx_runtime25 = require("react/jsx-runtime");
2651
2806
  var DropdownMenu = DropdownMenuPrimitive.Root;
2652
2807
  var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
2653
2808
  var DropdownMenuGroup = DropdownMenuPrimitive.Group;
@@ -2657,7 +2812,7 @@ var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
2657
2812
  var MENU_SURFACE_CLASS = "z-[10001] min-w-[8rem] max-h-[var(--radix-dropdown-menu-content-available-height)] overflow-y-auto overflow-x-hidden overscroll-contain rounded-md border bg-popover p-1 text-popover-foreground";
2658
2813
  var MENU_ITEM_CLASS = "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
2659
2814
  var MENU_INDICATOR_ITEM_CLASS = "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
2660
- var DropdownMenuSubTrigger = React20.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
2815
+ var DropdownMenuSubTrigger = React21.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
2661
2816
  DropdownMenuPrimitive.SubTrigger,
2662
2817
  {
2663
2818
  ref,
@@ -2670,14 +2825,14 @@ var DropdownMenuSubTrigger = React20.forwardRef(({ className, inset, children, .
2670
2825
  ...props,
2671
2826
  children: [
2672
2827
  children,
2673
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(RadixChevronRightIcon, { className: "ml-auto h-4 w-4" })
2828
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(RadixChevronRightIcon, { className: "ml-auto h-4 w-4" })
2674
2829
  ]
2675
2830
  }
2676
2831
  ));
2677
2832
  DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
2678
- var DropdownMenuSubContent = React20.forwardRef(({ className, container, sideOffset = 2, alignOffset = -4, collisionPadding = 8, ...props }, ref) => {
2833
+ var DropdownMenuSubContent = React21.forwardRef(({ className, container, sideOffset = 2, alignOffset = -4, collisionPadding = 8, ...props }, ref) => {
2679
2834
  const portalContainer = usePortalContainer(container);
2680
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DropdownMenuPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2835
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DropdownMenuPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2681
2836
  DropdownMenuPrimitive.SubContent,
2682
2837
  {
2683
2838
  ref,
@@ -2691,9 +2846,9 @@ var DropdownMenuSubContent = React20.forwardRef(({ className, container, sideOff
2691
2846
  ) });
2692
2847
  });
2693
2848
  DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
2694
- var DropdownMenuContent = React20.forwardRef(({ className, sideOffset = 4, container, ...props }, ref) => {
2849
+ var DropdownMenuContent = React21.forwardRef(({ className, sideOffset = 4, container, ...props }, ref) => {
2695
2850
  const portalContainer = usePortalContainer(container);
2696
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DropdownMenuPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2851
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DropdownMenuPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2697
2852
  DropdownMenuPrimitive.Content,
2698
2853
  {
2699
2854
  ref,
@@ -2710,7 +2865,7 @@ var DropdownMenuContent = React20.forwardRef(({ className, sideOffset = 4, conta
2710
2865
  ) });
2711
2866
  });
2712
2867
  DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
2713
- var DropdownMenuItem = React20.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2868
+ var DropdownMenuItem = React21.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2714
2869
  DropdownMenuPrimitive.Item,
2715
2870
  {
2716
2871
  ref,
@@ -2720,7 +2875,7 @@ var DropdownMenuItem = React20.forwardRef(({ className, inset, ...props }, ref)
2720
2875
  }
2721
2876
  ));
2722
2877
  DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
2723
- var DropdownMenuCheckboxItem = React20.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
2878
+ var DropdownMenuCheckboxItem = React21.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
2724
2879
  DropdownMenuPrimitive.CheckboxItem,
2725
2880
  {
2726
2881
  ref,
@@ -2728,13 +2883,13 @@ var DropdownMenuCheckboxItem = React20.forwardRef(({ className, children, ...pro
2728
2883
  className: cn(MENU_INDICATOR_ITEM_CLASS, className),
2729
2884
  ...props,
2730
2885
  children: [
2731
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(CheckIcon, { className: "h-4 w-4" }) }) }),
2886
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(CheckIcon, { className: "h-4 w-4" }) }) }),
2732
2887
  children
2733
2888
  ]
2734
2889
  }
2735
2890
  ));
2736
2891
  DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
2737
- var DropdownMenuRadioItem = React20.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
2892
+ var DropdownMenuRadioItem = React21.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
2738
2893
  DropdownMenuPrimitive.RadioItem,
2739
2894
  {
2740
2895
  ref,
@@ -2742,13 +2897,13 @@ var DropdownMenuRadioItem = React20.forwardRef(({ className, children, ...props
2742
2897
  className: cn(MENU_INDICATOR_ITEM_CLASS, className),
2743
2898
  ...props,
2744
2899
  children: [
2745
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DotFilledIcon, { className: "h-4 w-4 fill-current" }) }) }),
2900
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DotFilledIcon, { className: "h-4 w-4 fill-current" }) }) }),
2746
2901
  children
2747
2902
  ]
2748
2903
  }
2749
2904
  ));
2750
2905
  DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
2751
- var DropdownMenuLabel = React20.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2906
+ var DropdownMenuLabel = React21.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2752
2907
  DropdownMenuPrimitive.Label,
2753
2908
  {
2754
2909
  ref,
@@ -2758,7 +2913,7 @@ var DropdownMenuLabel = React20.forwardRef(({ className, inset, ...props }, ref)
2758
2913
  }
2759
2914
  ));
2760
2915
  DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
2761
- var DropdownMenuSeparator = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2916
+ var DropdownMenuSeparator = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2762
2917
  DropdownMenuPrimitive.Separator,
2763
2918
  {
2764
2919
  ref,
@@ -2771,7 +2926,7 @@ DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
2771
2926
  var DropdownMenuShortcut = ({
2772
2927
  className,
2773
2928
  ...props
2774
- }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2929
+ }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2775
2930
  "span",
2776
2931
  {
2777
2932
  "data-slot": "dropdown-menu-shortcut",
@@ -2783,7 +2938,7 @@ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
2783
2938
 
2784
2939
  // src/editable-label.tsx
2785
2940
  var import_react2 = require("react");
2786
- var import_jsx_runtime25 = require("react/jsx-runtime");
2941
+ var import_jsx_runtime26 = require("react/jsx-runtime");
2787
2942
  function EditableLabel({
2788
2943
  value,
2789
2944
  onCommit,
@@ -2890,8 +3045,8 @@ function EditableLabel({
2890
3045
  setEditing
2891
3046
  ]);
2892
3047
  if (editing) {
2893
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: cn("relative flex min-w-0 flex-1 items-center", className), children: [
2894
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3048
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { className: cn("relative flex min-w-0 flex-1 items-center", className), children: [
3049
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2895
3050
  "input",
2896
3051
  {
2897
3052
  ref: inputRef,
@@ -2931,12 +3086,12 @@ function EditableLabel({
2931
3086
  )
2932
3087
  }
2933
3088
  ),
2934
- busy && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Loader2Icon, { className: "absolute right-1 h-3.5 w-3.5 matrx-spin text-muted-foreground" }),
2935
- error && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "absolute left-0 top-full mt-0.5 whitespace-nowrap text-xs text-destructive", children: error })
3089
+ busy && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Loader2Icon, { className: "absolute right-1 h-3.5 w-3.5 matrx-spin text-muted-foreground" }),
3090
+ error && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "absolute left-0 top-full mt-0.5 whitespace-nowrap text-xs text-destructive", children: error })
2936
3091
  ] });
2937
3092
  }
2938
3093
  if (controlled) return null;
2939
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3094
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2940
3095
  "button",
2941
3096
  {
2942
3097
  type: "button",
@@ -2970,13 +3125,8 @@ function EditableLabel({
2970
3125
  }
2971
3126
 
2972
3127
  // src/input.tsx
2973
- var React21 = __toESM(require("react"), 1);
2974
-
2975
- // src/field-surface.ts
2976
- var FIELD_SURFACE_CLASS = "border border-border bg-card";
2977
-
2978
- // src/input.tsx
2979
- var import_jsx_runtime26 = require("react/jsx-runtime");
3128
+ var React22 = __toESM(require("react"), 1);
3129
+ var import_jsx_runtime27 = require("react/jsx-runtime");
2980
3130
  var getVariantStyles = (variant = "default") => {
2981
3131
  const baseStyles = `flex h-10 w-full ${FIELD_SURFACE_CLASS} text-foreground shadow-input rounded-md px-3 py-2 text-sm file:border-0 file:bg-transparent
2982
3132
  file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground
@@ -3004,9 +3154,9 @@ var getVariantStyles = (variant = "default") => {
3004
3154
  return baseStyles;
3005
3155
  }
3006
3156
  };
3007
- var Input = React21.forwardRef(
3157
+ var Input = React22.forwardRef(
3008
3158
  ({ className, type, variant = "default", ...props }, ref) => {
3009
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3159
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3010
3160
  "input",
3011
3161
  {
3012
3162
  type,
@@ -3018,7 +3168,7 @@ var Input = React21.forwardRef(
3018
3168
  }
3019
3169
  );
3020
3170
  Input.displayName = "Input";
3021
- var EnterInput = React21.forwardRef(
3171
+ var EnterInput = React22.forwardRef(
3022
3172
  ({ onEnter, ...props }, ref) => {
3023
3173
  const handleKeyDown = (e) => {
3024
3174
  if (e.key === "Enter" && onEnter) {
@@ -3026,7 +3176,7 @@ var EnterInput = React21.forwardRef(
3026
3176
  onEnter();
3027
3177
  }
3028
3178
  };
3029
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3179
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3030
3180
  Input,
3031
3181
  {
3032
3182
  ...props,
@@ -3042,11 +3192,11 @@ var EnterInput = React21.forwardRef(
3042
3192
  }
3043
3193
  );
3044
3194
  EnterInput.displayName = "EnterInput";
3045
- var BasicInput = React21.forwardRef(
3195
+ var BasicInput = React22.forwardRef(
3046
3196
  // `variant` is accepted (prop-compatible with Input) but intentionally
3047
3197
  // unused — and destructured so it never leaks onto the DOM element.
3048
3198
  ({ className, type, variant: _variant = "default", ...props }, ref) => {
3049
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3199
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3050
3200
  "input",
3051
3201
  {
3052
3202
  type,
@@ -3061,10 +3211,10 @@ var BasicInput = React21.forwardRef(
3061
3211
  }
3062
3212
  );
3063
3213
  BasicInput.displayName = "BasicInput";
3064
- var InputWithPrefix = React21.forwardRef(({ prefix, className, wrapperClassName, ...props }, ref) => {
3065
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: cn("relative", wrapperClassName), children: [
3066
- prefix && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground", children: prefix }),
3067
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3214
+ var InputWithPrefix = React22.forwardRef(({ prefix, className, wrapperClassName, ...props }, ref) => {
3215
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: cn("relative", wrapperClassName), children: [
3216
+ prefix && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground", children: prefix }),
3217
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3068
3218
  Input,
3069
3219
  {
3070
3220
  ref,
@@ -3078,9 +3228,9 @@ InputWithPrefix.displayName = "InputWithPrefix";
3078
3228
 
3079
3229
  // src/label.tsx
3080
3230
  var LabelPrimitive = __toESM(require("@radix-ui/react-label"), 1);
3081
- var React22 = __toESM(require("react"), 1);
3082
- var import_jsx_runtime27 = require("react/jsx-runtime");
3083
- var Label3 = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3231
+ var React23 = __toESM(require("react"), 1);
3232
+ var import_jsx_runtime28 = require("react/jsx-runtime");
3233
+ var Label4 = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3084
3234
  LabelPrimitive.Root,
3085
3235
  {
3086
3236
  ref,
@@ -3091,11 +3241,11 @@ var Label3 = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
3091
3241
  ...props
3092
3242
  }
3093
3243
  ));
3094
- Label3.displayName = LabelPrimitive.Root.displayName;
3244
+ Label4.displayName = LabelPrimitive.Root.displayName;
3095
3245
 
3096
3246
  // src/overflow-toolbar.tsx
3097
3247
  var import_react3 = require("react");
3098
- var import_jsx_runtime28 = require("react/jsx-runtime");
3248
+ var import_jsx_runtime29 = require("react/jsx-runtime");
3099
3249
  var GAP_PX = 6;
3100
3250
  var TONE = {
3101
3251
  default: "border border-border bg-background hover:bg-accent text-foreground",
@@ -3117,16 +3267,16 @@ function ToolbarButton({
3117
3267
  action.hideLabel && !action.running ? "w-7 justify-center px-0" : "px-2",
3118
3268
  TONE[tone]
3119
3269
  );
3120
- const inner = /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
3121
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3270
+ const inner = /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
3271
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3122
3272
  Icon2,
3123
3273
  {
3124
3274
  className: cn("w-3.5 h-3.5 shrink-0", action.running && "matrx-spin")
3125
3275
  }
3126
3276
  ),
3127
- showLabel && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { children: text })
3277
+ showLabel && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { children: text })
3128
3278
  ] });
3129
- const control = action.href && !action.disabled ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3279
+ const control = action.href && !action.disabled ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3130
3280
  "a",
3131
3281
  {
3132
3282
  href: action.href,
@@ -3136,7 +3286,7 @@ function ToolbarButton({
3136
3286
  "aria-label": action.label,
3137
3287
  children: inner
3138
3288
  }
3139
- ) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3289
+ ) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3140
3290
  "button",
3141
3291
  {
3142
3292
  type: "button",
@@ -3148,12 +3298,12 @@ function ToolbarButton({
3148
3298
  }
3149
3299
  );
3150
3300
  if (enableTooltip && action.hideLabel && renderTooltip) {
3151
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_jsx_runtime28.Fragment, { children: renderTooltip(control, action.label) });
3301
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_jsx_runtime29.Fragment, { children: renderTooltip(control, action.label) });
3152
3302
  }
3153
3303
  return control;
3154
3304
  }
3155
3305
  function OverflowTrigger({ ariaLabel }) {
3156
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3306
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3157
3307
  "button",
3158
3308
  {
3159
3309
  type: "button",
@@ -3164,7 +3314,7 @@ function OverflowTrigger({ ariaLabel }) {
3164
3314
  "inline-flex items-center justify-center h-7 w-7 rounded-md transition-colors",
3165
3315
  "border border-border bg-background hover:bg-accent text-foreground"
3166
3316
  ),
3167
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(MoreHorizontalIcon, { className: "w-3.5 h-3.5" })
3317
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(MoreHorizontalIcon, { className: "w-3.5 h-3.5" })
3168
3318
  }
3169
3319
  );
3170
3320
  }
@@ -3224,22 +3374,22 @@ function OverflowToolbar({
3224
3374
  }, [signature, leading != null]);
3225
3375
  const shown = visibleActions.slice(0, visibleCount);
3226
3376
  const hidden = visibleActions.slice(visibleCount);
3227
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { ref: containerRef, className: cn("relative min-w-0", className), children: [
3228
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
3377
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { ref: containerRef, className: cn("relative min-w-0", className), children: [
3378
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
3229
3379
  "div",
3230
3380
  {
3231
3381
  ref: ghostRef,
3232
3382
  "aria-hidden": true,
3233
3383
  className: "pointer-events-none absolute left-0 top-0 flex items-center gap-1.5 opacity-0",
3234
3384
  children: [
3235
- visibleActions.map((a) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ToolbarButton, { action: a }, a.id)),
3236
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(OverflowTrigger, { ariaLabel: overflowAriaLabel })
3385
+ visibleActions.map((a) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ToolbarButton, { action: a }, a.id)),
3386
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(OverflowTrigger, { ariaLabel: overflowAriaLabel })
3237
3387
  ]
3238
3388
  }
3239
3389
  ),
3240
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center justify-end gap-1.5", children: [
3241
- leading != null && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { ref: leadingRef, className: "shrink-0", children: leading }),
3242
- shown.map((a) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3390
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex items-center justify-end gap-1.5", children: [
3391
+ leading != null && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { ref: leadingRef, className: "shrink-0", children: leading }),
3392
+ shown.map((a) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3243
3393
  ToolbarButton,
3244
3394
  {
3245
3395
  action: a,
@@ -3250,7 +3400,7 @@ function OverflowToolbar({
3250
3400
  )),
3251
3401
  hidden.length > 0 && renderOverflowMenu({
3252
3402
  actions: hidden,
3253
- trigger: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(OverflowTrigger, { ariaLabel: overflowAriaLabel })
3403
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(OverflowTrigger, { ariaLabel: overflowAriaLabel })
3254
3404
  })
3255
3405
  ] })
3256
3406
  ] });
@@ -3258,20 +3408,20 @@ function OverflowToolbar({
3258
3408
 
3259
3409
  // src/progress.tsx
3260
3410
  var ProgressPrimitive = __toESM(require("@radix-ui/react-progress"), 1);
3261
- var React24 = __toESM(require("react"), 1);
3262
- var import_jsx_runtime29 = require("react/jsx-runtime");
3411
+ var React25 = __toESM(require("react"), 1);
3412
+ var import_jsx_runtime30 = require("react/jsx-runtime");
3263
3413
  var PROGRESS_TONES = {
3264
3414
  default: "bg-primary",
3265
3415
  success: "bg-success",
3266
3416
  warning: "bg-warning",
3267
3417
  destructive: "bg-destructive"
3268
3418
  };
3269
- var Progress = React24.forwardRef(({ className, tone = "default", indicatorClassName, ...props }, ref) => {
3419
+ var Progress = React25.forwardRef(({ className, tone = "default", indicatorClassName, ...props }, ref) => {
3270
3420
  const { value, max } = props;
3271
3421
  const ceiling = max ?? 100;
3272
3422
  const isIndeterminate = value === null || value === void 0;
3273
3423
  const pct = isIndeterminate ? 0 : Math.min(100, Math.max(0, value / ceiling * 100));
3274
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3424
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3275
3425
  ProgressPrimitive.Root,
3276
3426
  {
3277
3427
  ref,
@@ -3281,7 +3431,7 @@ var Progress = React24.forwardRef(({ className, tone = "default", indicatorClass
3281
3431
  className
3282
3432
  ),
3283
3433
  ...props,
3284
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3434
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3285
3435
  ProgressPrimitive.Indicator,
3286
3436
  {
3287
3437
  "data-slot": "progress-indicator",
@@ -3303,9 +3453,9 @@ Progress.displayName = ProgressPrimitive.Root.displayName;
3303
3453
 
3304
3454
  // src/scroll-area.tsx
3305
3455
  var ScrollAreaPrimitive = __toESM(require("@radix-ui/react-scroll-area"), 1);
3306
- var React25 = __toESM(require("react"), 1);
3307
- var import_jsx_runtime30 = require("react/jsx-runtime");
3308
- var ScrollArea = React25.forwardRef(
3456
+ var React26 = __toESM(require("react"), 1);
3457
+ var import_jsx_runtime31 = require("react/jsx-runtime");
3458
+ var ScrollArea = React26.forwardRef(
3309
3459
  ({
3310
3460
  className,
3311
3461
  children,
@@ -3314,7 +3464,7 @@ var ScrollArea = React25.forwardRef(
3314
3464
  scrollBarClassName,
3315
3465
  orientation = "vertical",
3316
3466
  ...props
3317
- }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
3467
+ }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
3318
3468
  ScrollAreaPrimitive.Root,
3319
3469
  {
3320
3470
  ref,
@@ -3322,7 +3472,7 @@ var ScrollArea = React25.forwardRef(
3322
3472
  className: cn("relative overflow-hidden", className),
3323
3473
  ...props,
3324
3474
  children: [
3325
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3475
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3326
3476
  ScrollAreaPrimitive.Viewport,
3327
3477
  {
3328
3478
  ref: viewportRef,
@@ -3331,14 +3481,14 @@ var ScrollArea = React25.forwardRef(
3331
3481
  children
3332
3482
  }
3333
3483
  ),
3334
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ScrollBar, { orientation, className: scrollBarClassName }),
3335
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ScrollAreaPrimitive.Corner, {})
3484
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ScrollBar, { orientation, className: scrollBarClassName }),
3485
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ScrollAreaPrimitive.Corner, {})
3336
3486
  ]
3337
3487
  }
3338
3488
  )
3339
3489
  );
3340
3490
  ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
3341
- var ScrollBar = React25.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3491
+ var ScrollBar = React26.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3342
3492
  ScrollAreaPrimitive.ScrollAreaScrollbar,
3343
3493
  {
3344
3494
  ref,
@@ -3351,7 +3501,7 @@ var ScrollBar = React25.forwardRef(({ className, orientation = "vertical", ...pr
3351
3501
  className
3352
3502
  ),
3353
3503
  ...props,
3354
- children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3504
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3355
3505
  ScrollAreaPrimitive.ScrollAreaThumb,
3356
3506
  {
3357
3507
  "data-slot": "scroll-area-thumb",
@@ -3363,7 +3513,7 @@ var ScrollBar = React25.forwardRef(({ className, orientation = "vertical", ...pr
3363
3513
  ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
3364
3514
 
3365
3515
  // src/score-ring.tsx
3366
- var import_jsx_runtime31 = require("react/jsx-runtime");
3516
+ var import_jsx_runtime32 = require("react/jsx-runtime");
3367
3517
  var DEFAULT_SCORE_THRESHOLDS = {
3368
3518
  good: 75,
3369
3519
  warning: 50
@@ -3394,7 +3544,7 @@ function ScoreRing({
3394
3544
  const circumference = 2 * Math.PI * radius;
3395
3545
  const boundedPct = pct === null ? 0 : Math.max(0, Math.min(100, pct));
3396
3546
  const dashOffset = circumference * (1 - boundedPct / 100);
3397
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
3547
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
3398
3548
  "div",
3399
3549
  {
3400
3550
  className: cn(
@@ -3405,8 +3555,8 @@ function ScoreRing({
3405
3555
  role: "img",
3406
3556
  "aria-label": `${label ?? "Score"}: ${pct === null ? "not available" : `${pct} out of 100`}`,
3407
3557
  children: [
3408
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("svg", { viewBox: "0 0 100 100", className: "h-full w-full -rotate-90", children: [
3409
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3558
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("svg", { viewBox: "0 0 100 100", className: "h-full w-full -rotate-90", children: [
3559
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
3410
3560
  "circle",
3411
3561
  {
3412
3562
  cx: "50",
@@ -3417,7 +3567,7 @@ function ScoreRing({
3417
3567
  fill: "none"
3418
3568
  }
3419
3569
  ),
3420
- pct !== null ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3570
+ pct !== null ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
3421
3571
  "circle",
3422
3572
  {
3423
3573
  cx: "50",
@@ -3436,8 +3586,8 @@ function ScoreRing({
3436
3586
  }
3437
3587
  ) : null
3438
3588
  ] }),
3439
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "absolute flex flex-col items-center justify-center", children: [
3440
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3589
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "absolute flex flex-col items-center justify-center", children: [
3590
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
3441
3591
  "span",
3442
3592
  {
3443
3593
  className: cn(
@@ -3447,7 +3597,7 @@ function ScoreRing({
3447
3597
  children: pct === null ? "\u2014" : `${pct}${suffix}`
3448
3598
  }
3449
3599
  ),
3450
- label ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "max-w-[74px] truncate text-[9px] font-semibold uppercase tracking-wide text-muted-foreground", children: label }) : null
3600
+ label ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "max-w-[74px] truncate text-[9px] font-semibold uppercase tracking-wide text-muted-foreground", children: label }) : null
3451
3601
  ] })
3452
3602
  ]
3453
3603
  }
@@ -3455,7 +3605,7 @@ function ScoreRing({
3455
3605
  }
3456
3606
 
3457
3607
  // src/segmented-control.tsx
3458
- var import_jsx_runtime32 = require("react/jsx-runtime");
3608
+ var import_jsx_runtime33 = require("react/jsx-runtime");
3459
3609
  function SegmentedControl({
3460
3610
  value,
3461
3611
  onValueChange,
@@ -3470,7 +3620,7 @@ function SegmentedControl({
3470
3620
  md: "h-9 text-sm",
3471
3621
  lg: "h-10 text-base"
3472
3622
  };
3473
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
3623
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
3474
3624
  "div",
3475
3625
  {
3476
3626
  className: cn(
@@ -3481,7 +3631,7 @@ function SegmentedControl({
3481
3631
  role: "tablist",
3482
3632
  children: data.map((option) => {
3483
3633
  const isActive = value === option.value;
3484
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
3634
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
3485
3635
  "button",
3486
3636
  {
3487
3637
  type: "button",
@@ -3507,8 +3657,8 @@ function SegmentedControl({
3507
3657
  }
3508
3658
 
3509
3659
  // src/archive-filter.tsx
3510
- var React26 = __toESM(require("react"), 1);
3511
- var import_jsx_runtime33 = require("react/jsx-runtime");
3660
+ var React27 = __toESM(require("react"), 1);
3661
+ var import_jsx_runtime34 = require("react/jsx-runtime");
3512
3662
  var ARCHIVE_FILTER_VALUES = ["active", "archived", "all"];
3513
3663
  var DEFAULT_ARCHIVE_FILTER = "active";
3514
3664
  var ARCHIVE_LABEL = "Archived";
@@ -3533,7 +3683,7 @@ function ArchiveFilter({
3533
3683
  "aria-label": ariaLabel = "Archive filter",
3534
3684
  disabled = false
3535
3685
  }) {
3536
- const data = React26.useMemo(
3686
+ const data = React27.useMemo(
3537
3687
  () => ARCHIVE_FILTER_VALUES.map((state) => {
3538
3688
  const text = labels?.[state] ?? ARCHIVE_FILTER_LABELS[state];
3539
3689
  const count = counts?.[state];
@@ -3541,15 +3691,15 @@ function ArchiveFilter({
3541
3691
  value: state,
3542
3692
  disabled,
3543
3693
  ariaLabel: typeof count === "number" ? `${text} ${count}` : text,
3544
- label: typeof count === "number" ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { className: "inline-flex items-center gap-1.5", children: [
3545
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { children: text }),
3546
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-muted-foreground tabular-nums", children: count })
3694
+ label: typeof count === "number" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { className: "inline-flex items-center gap-1.5", children: [
3695
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: text }),
3696
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "text-muted-foreground tabular-nums", children: count })
3547
3697
  ] }) : text
3548
3698
  };
3549
3699
  }),
3550
3700
  [counts, labels, disabled]
3551
3701
  );
3552
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { role: "group", "aria-label": ariaLabel, className: cn("inline-flex", className), children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
3702
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { role: "group", "aria-label": ariaLabel, className: cn("inline-flex", className), children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
3553
3703
  SegmentedControl,
3554
3704
  {
3555
3705
  value,
@@ -3561,7 +3711,7 @@ function ArchiveFilter({
3561
3711
  }
3562
3712
 
3563
3713
  // src/archived-disclosure.tsx
3564
- var import_jsx_runtime34 = require("react/jsx-runtime");
3714
+ var import_jsx_runtime35 = require("react/jsx-runtime");
3565
3715
  function ArchivedDisclosure({
3566
3716
  count,
3567
3717
  open,
@@ -3575,8 +3725,8 @@ function ArchivedDisclosure({
3575
3725
  }) {
3576
3726
  if (count <= 0 && !(open && keepWhileOpen)) return null;
3577
3727
  const parenthetical = countLabel === void 0 ? String(count) : countLabel;
3578
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: cn("min-w-0", className), children: [
3579
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
3728
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: cn("min-w-0", className), children: [
3729
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
3580
3730
  "button",
3581
3731
  {
3582
3732
  type: "button",
@@ -3584,161 +3734,16 @@ function ArchivedDisclosure({
3584
3734
  "aria-expanded": open,
3585
3735
  className: "flex w-full items-center gap-2 rounded-lg px-2 py-2 text-sm text-muted-foreground hover:bg-accent active:bg-accent",
3586
3736
  children: [
3587
- open ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ChevronDownIcon, { className: "h-4 w-4 shrink-0" }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ChevronRightIcon, { className: "h-4 w-4 shrink-0" }),
3588
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ArchiveIcon, { className: "h-4 w-4 shrink-0" }),
3589
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "truncate", children: parenthetical === null ? label : `${label} (${parenthetical})` })
3737
+ open ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ChevronDownIcon, { className: "h-4 w-4 shrink-0" }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ChevronRightIcon, { className: "h-4 w-4 shrink-0" }),
3738
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ArchiveIcon, { className: "h-4 w-4 shrink-0" }),
3739
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "truncate", children: parenthetical === null ? label : `${label} (${parenthetical})` })
3590
3740
  ]
3591
3741
  }
3592
3742
  ),
3593
- open && children ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: cn("mt-1", contentClassName), children }) : null
3743
+ open && children ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: cn("mt-1", contentClassName), children }) : null
3594
3744
  ] });
3595
3745
  }
3596
3746
 
3597
- // src/select.tsx
3598
- var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
3599
- var import_class_variance_authority4 = require("class-variance-authority");
3600
- var React27 = __toESM(require("react"), 1);
3601
- var import_jsx_runtime35 = require("react/jsx-runtime");
3602
- var Select = SelectPrimitive.Root;
3603
- var SelectGroup = SelectPrimitive.Group;
3604
- var SelectValue = SelectPrimitive.Value;
3605
- var selectTriggerVariants = (0, import_class_variance_authority4.cva)(
3606
- `flex w-full items-center justify-between gap-2 whitespace-nowrap rounded-md ${FIELD_SURFACE_CLASS} text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground transition-colors hover:bg-accent hover:border-accent-foreground/20 focus:outline-none focus:ring-1 focus:ring-primary/30 focus:border-primary/40 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:min-w-0 [&>span]:line-clamp-1`,
3607
- {
3608
- variants: {
3609
- size: {
3610
- sm: "h-7 px-2 py-1 text-xs",
3611
- default: "h-9 px-3 py-1",
3612
- lg: "h-10 px-3 py-2"
3613
- }
3614
- },
3615
- defaultVariants: {
3616
- size: "default"
3617
- }
3618
- }
3619
- );
3620
- var SelectTrigger = React27.forwardRef(({ className, children, hideArrow = false, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
3621
- SelectPrimitive.Trigger,
3622
- {
3623
- ref,
3624
- className: cn(selectTriggerVariants({ size, className })),
3625
- ...props,
3626
- children: [
3627
- children,
3628
- !hideArrow && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(RadixChevronDownIcon, { className: "h-4 w-4 shrink-0 opacity-50" }) })
3629
- ]
3630
- }
3631
- ));
3632
- SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
3633
- var SelectScrollUpButton = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3634
- SelectPrimitive.ScrollUpButton,
3635
- {
3636
- ref,
3637
- className: cn(
3638
- "flex cursor-default items-center justify-center py-1",
3639
- className
3640
- ),
3641
- ...props,
3642
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(RadixChevronUpIcon, {})
3643
- }
3644
- ));
3645
- SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
3646
- var SelectScrollDownButton = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3647
- SelectPrimitive.ScrollDownButton,
3648
- {
3649
- ref,
3650
- className: cn(
3651
- "flex cursor-default items-center justify-center py-1",
3652
- className
3653
- ),
3654
- ...props,
3655
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(RadixChevronDownIcon, {})
3656
- }
3657
- ));
3658
- SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
3659
- var SelectContent = React27.forwardRef(
3660
- ({
3661
- className,
3662
- children,
3663
- position = "popper",
3664
- container,
3665
- animated = true,
3666
- ...props
3667
- }, ref) => {
3668
- const portalContainer = usePortalContainer(container);
3669
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SelectPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
3670
- SelectPrimitive.Content,
3671
- {
3672
- ref,
3673
- className: cn(
3674
- "relative z-[10001] max-h-96 min-w-[8rem] max-w-[calc(100vw-2rem)] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md",
3675
- animated && MOTION_POPPER,
3676
- // The resting gap from the trigger. It is the `translate` property
3677
- // (POPPER_OFFSET), never Tailwind translate utilities: those compose
3678
- // with `transform` on a v4 host and are REPLACED by it on a v3 one,
3679
- // so on v3 the animation ate the gap and the surface snapped 4px at
3680
- // the end. Same law as the centred dialog card — see motion.ts.
3681
- position === "popper" && POPPER_OFFSET,
3682
- className
3683
- ),
3684
- position,
3685
- ...props,
3686
- children: [
3687
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SelectScrollUpButton, {}),
3688
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3689
- SelectPrimitive.Viewport,
3690
- {
3691
- className: cn(
3692
- "max-w-full overflow-y-auto p-0.5",
3693
- position === "popper" && "w-full min-w-[var(--radix-select-trigger-width)] max-h-[var(--radix-select-content-available-height)]"
3694
- ),
3695
- children
3696
- }
3697
- ),
3698
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SelectScrollDownButton, {})
3699
- ]
3700
- }
3701
- ) });
3702
- }
3703
- );
3704
- SelectContent.displayName = SelectPrimitive.Content.displayName;
3705
- var SelectLabel = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3706
- SelectPrimitive.Label,
3707
- {
3708
- ref,
3709
- className: cn("px-2 py-1.5 text-sm font-semibold", className),
3710
- ...props
3711
- }
3712
- ));
3713
- SelectLabel.displayName = SelectPrimitive.Label.displayName;
3714
- var SelectItem = React27.forwardRef(({ className, children, description, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
3715
- SelectPrimitive.Item,
3716
- {
3717
- ref,
3718
- className: cn(
3719
- "relative flex w-full min-w-0 cursor-default select-none rounded-sm py-1 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
3720
- description ? "flex-col items-start gap-0.5 py-1.5" : "items-center",
3721
- className
3722
- ),
3723
- ...props,
3724
- children: [
3725
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(CheckIcon, { className: "h-4 w-4" }) }) }),
3726
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "min-w-0 whitespace-normal break-words [overflow-wrap:anywhere]", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SelectPrimitive.ItemText, { children }) }),
3727
- description ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "block min-w-0 break-words text-xs leading-snug text-muted-foreground [overflow-wrap:anywhere]", children: description }) : null
3728
- ]
3729
- }
3730
- ));
3731
- SelectItem.displayName = SelectPrimitive.Item.displayName;
3732
- var SelectSeparator = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3733
- SelectPrimitive.Separator,
3734
- {
3735
- ref,
3736
- className: cn("-mx-1 my-1 h-px bg-muted", className),
3737
- ...props
3738
- }
3739
- ));
3740
- SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
3741
-
3742
3747
  // src/separator.tsx
3743
3748
  var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"), 1);
3744
3749
  var React28 = __toESM(require("react"), 1);