@mediaradar/design-components 0.53.0 → 0.54.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -28,8 +28,10 @@ __export(index_exports, {
28
28
  AllFiltersButton: () => AllFiltersButton,
29
29
  Badge: () => Badge,
30
30
  BarChartPlaceholder: () => BarChartPlaceholder,
31
+ BarList: () => BarList,
31
32
  Button: () => Button,
32
33
  Card: () => Card,
34
+ ChartLegend: () => ChartLegend,
33
35
  CheckBox: () => CheckBox,
34
36
  CheckBoxBox: () => CheckBoxBox,
35
37
  ChipContent: () => ChipContent,
@@ -48,6 +50,7 @@ __export(index_exports, {
48
50
  Freshness: () => Freshness,
49
51
  InfoTip: () => InfoTip,
50
52
  InlineMessage: () => InlineMessage,
53
+ LegendItem: () => LegendItem,
51
54
  LineChartPlaceholder: () => LineChartPlaceholder,
52
55
  MediaLabel: () => MediaLabel,
53
56
  Menu: () => Menu,
@@ -76,6 +79,8 @@ __export(index_exports, {
76
79
  SelectionPicker: () => SelectionPicker,
77
80
  SortButton: () => SortButton,
78
81
  StackedColumnPlaceholder: () => StackedColumnPlaceholder,
82
+ StatStrip: () => StatStrip,
83
+ StatTile: () => StatTile,
79
84
  SuggestionChip: () => SuggestionChip,
80
85
  TablePagination: () => TablePagination,
81
86
  Tabs: () => Tabs,
@@ -2233,23 +2238,28 @@ function SelectFilter({
2233
2238
  // src/Card.tsx
2234
2239
  var import_react9 = require("react");
2235
2240
  var import_jsx_runtime14 = require("react/jsx-runtime");
2236
- var Card = (0, import_react9.forwardRef)(function Card2({ staticCard, title, titleAs: TitleTag = "h3", subtitle, action, className, testIdPrefix, children, ...rest }, ref) {
2241
+ var Card = (0, import_react9.forwardRef)(function Card2({ staticCard, title, titleAs: TitleTag = "h3", subtitle, info, variant = "default", action, className, testIdPrefix, children, ...rest }, ref) {
2242
+ const chart = variant === "chart";
2237
2243
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2238
2244
  "article",
2239
2245
  {
2240
2246
  ref,
2241
2247
  className: cn(
2242
- "flex h-full flex-col overflow-hidden rounded-card border border-border-default bg-surface shadow-raised",
2248
+ "flex h-full flex-col overflow-hidden rounded-card border border-border-default bg-surface",
2249
+ !chart && "shadow-raised",
2243
2250
  // Interactive hover: deeper drop shadow only -- no elevation/transform.
2244
- !staticCard && "group transition-shadow hover:shadow-overlay",
2251
+ !staticCard && !chart && "group transition-shadow hover:shadow-overlay",
2245
2252
  className
2246
2253
  ),
2247
2254
  "data-testid": testIdPrefix,
2248
2255
  ...rest,
2249
2256
  children: title ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-1 flex-col p-card-padding", children: [
2250
2257
  /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-start justify-between gap-2", children: [
2251
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { children: [
2252
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(TitleTag, { className: "text-style-card-title", children: title }),
2258
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "min-w-0", children: [
2259
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center gap-1.5", children: [
2260
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(TitleTag, { className: chart ? "text-panel-title font-semibold text-text-primary" : "text-style-card-title", children: title }),
2261
+ info && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(InfoTip, { text: info, label: `About ${title.toLowerCase()}` })
2262
+ ] }),
2253
2263
  subtitle && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "mt-0.5 text-xs leading-snug text-text-tertiary", children: subtitle })
2254
2264
  ] }),
2255
2265
  action && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "shrink-0 text-text-tertiary", children: action })
@@ -2260,9 +2270,162 @@ var Card = (0, import_react9.forwardRef)(function Card2({ staticCard, title, tit
2260
2270
  );
2261
2271
  });
2262
2272
 
2273
+ // src/StatStrip.tsx
2274
+ var import_react10 = require("react");
2275
+ var import_jsx_runtime15 = require("react/jsx-runtime");
2276
+ var StatStrip = (0, import_react10.forwardRef)(
2277
+ ({ className, testIdPrefix, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2278
+ "div",
2279
+ {
2280
+ ref,
2281
+ role: "group",
2282
+ "data-testid": testIdPrefix,
2283
+ className: cn(
2284
+ "grid divide-y divide-border-default rounded-card border border-border-default bg-surface",
2285
+ "sm:auto-cols-fr sm:grid-flow-col sm:divide-x sm:divide-y-0",
2286
+ className
2287
+ ),
2288
+ ...props,
2289
+ children
2290
+ }
2291
+ )
2292
+ );
2293
+ StatStrip.displayName = "StatStrip";
2294
+ function StatTile({ label, value, unit, change, note, icon, info, children, className, testIdPrefix }) {
2295
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { "data-testid": testIdPrefix, className: cn("flex min-w-0 flex-col gap-1 px-5 py-3", className), children: [
2296
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "flex items-center gap-1.5 text-micro font-semibold uppercase tracking-wide text-text-tertiary", children: [
2297
+ icon && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { "aria-hidden": "true", className: "flex shrink-0 text-brand-primaryAction", children: icon }),
2298
+ label,
2299
+ info && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(InfoTip, { text: info, label: `About ${label.toLowerCase()}` })
2300
+ ] }),
2301
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "flex flex-wrap items-baseline gap-x-2.5 gap-y-0.5", children: [
2302
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "text-xl font-bold leading-tight tracking-tight tabular-nums text-text-primary", children: [
2303
+ value,
2304
+ unit && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "text-dense font-medium tracking-normal text-text-tertiary", children: [
2305
+ " ",
2306
+ unit
2307
+ ] })
2308
+ ] }),
2309
+ change && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-card-title font-medium", children: change })
2310
+ ] }),
2311
+ note && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-xs text-text-tertiary", children: note }),
2312
+ children && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "text-xs text-text-secondary", children })
2313
+ ] });
2314
+ }
2315
+
2316
+ // src/ChartLegend.tsx
2317
+ var import_react11 = require("react");
2318
+ var import_jsx_runtime16 = require("react/jsx-runtime");
2319
+ var ChartLegend = (0, import_react11.forwardRef)(
2320
+ ({ className, testIdPrefix, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2321
+ "ul",
2322
+ {
2323
+ ref,
2324
+ "data-testid": testIdPrefix,
2325
+ className: cn("flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-text-tertiary", className),
2326
+ ...props,
2327
+ children
2328
+ }
2329
+ )
2330
+ );
2331
+ ChartLegend.displayName = "ChartLegend";
2332
+ var MARK = {
2333
+ dot: "size-2 rounded-pill",
2334
+ square: "size-2.5 rounded-xs",
2335
+ line: "h-px w-4 rounded-pill",
2336
+ dashed: "w-4 border-t border-dashed"
2337
+ };
2338
+ function LegendItem({ mark = "dot", color, you = false, children, className, testIdPrefix }) {
2339
+ const dashed = mark === "dashed";
2340
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("li", { "data-testid": testIdPrefix, className: cn("flex items-center gap-1.5", you && "text-text-secondary", className), children: [
2341
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2342
+ "span",
2343
+ {
2344
+ "aria-hidden": "true",
2345
+ className: cn(
2346
+ "shrink-0",
2347
+ MARK[mark],
2348
+ you && mark === "line" && "h-0.75",
2349
+ you && mark === "dot" && "size-2.5",
2350
+ !color && (dashed ? "border-text-tertiary" : "bg-text-tertiary")
2351
+ ),
2352
+ style: color ? dashed ? { borderColor: color } : { background: color } : void 0
2353
+ }
2354
+ ),
2355
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { children: [
2356
+ children,
2357
+ you && " (you)"
2358
+ ] })
2359
+ ] });
2360
+ }
2361
+
2362
+ // src/BarList.tsx
2363
+ var import_jsx_runtime17 = require("react/jsx-runtime");
2364
+ var COL_WIDTH = ["w-16", "w-13"];
2365
+ function BarList({ rows, columns, empty, className, testIdPrefix, "aria-label": ariaLabel }) {
2366
+ if (!rows.length) {
2367
+ return empty ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: cn("text-xs text-text-tertiary", className), children: empty }) : null;
2368
+ }
2369
+ const max = Math.max(...rows.flatMap((r) => [r.bar, r.tick ?? 0]), 1);
2370
+ const full = !!columns?.length;
2371
+ const colClass = (i) => full ? COL_WIDTH[i] ?? "w-13" : "";
2372
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { "data-testid": testIdPrefix, className: cn("flex flex-col", className), children: [
2373
+ full && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { "aria-hidden": "true", className: "flex items-baseline gap-2 pb-1", children: [
2374
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "flex-1" }),
2375
+ columns.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: cn("shrink-0 text-right text-micro font-medium text-text-tertiary", colClass(i)), children: c }, c))
2376
+ ] }),
2377
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("ul", { "aria-label": ariaLabel, className: "flex flex-col", children: rows.map((r) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("li", { className: "py-2", children: [
2378
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "mb-1.5 flex items-baseline gap-2", children: [
2379
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "min-w-0 flex-1 truncate text-dense font-semibold text-text-primary", children: [
2380
+ r.label,
2381
+ r.note && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "font-normal text-text-tertiary", children: [
2382
+ " \xB7 ",
2383
+ r.note
2384
+ ] })
2385
+ ] }),
2386
+ r.values?.map((v, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
2387
+ "span",
2388
+ {
2389
+ className: cn(
2390
+ "shrink-0 whitespace-nowrap text-right text-xs tabular-nums",
2391
+ full && i === 0 ? "font-semibold text-text-primary" : "text-text-secondary",
2392
+ colClass(i)
2393
+ ),
2394
+ children: [
2395
+ full && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "sr-only", children: [
2396
+ columns[i],
2397
+ ": "
2398
+ ] }),
2399
+ v
2400
+ ]
2401
+ },
2402
+ i
2403
+ ))
2404
+ ] }),
2405
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { "aria-hidden": "true", className: "relative h-2 rounded-pill bg-subtle", children: [
2406
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2407
+ "div",
2408
+ {
2409
+ className: cn("h-full rounded-pill", !r.color && "bg-brand-primaryAction"),
2410
+ style: { width: `${Math.max(r.bar, 0) / max * 100}%`, background: r.color }
2411
+ }
2412
+ ),
2413
+ r.tick !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2414
+ "span",
2415
+ {
2416
+ className: "absolute -bottom-1 -top-1 w-0.5 -translate-x-1/2 rounded-pill bg-text-primary",
2417
+ style: { left: `${r.tick / max * 100}%` }
2418
+ }
2419
+ )
2420
+ ] }),
2421
+ r.tickLabel && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "sr-only", children: r.tickLabel })
2422
+ ] }, r.key)) })
2423
+ ] });
2424
+ }
2425
+
2263
2426
  // src/NoResultsEmptyState.tsx
2264
2427
  var import_lucide_react11 = require("lucide-react");
2265
- var import_jsx_runtime15 = require("react/jsx-runtime");
2428
+ var import_jsx_runtime18 = require("react/jsx-runtime");
2266
2429
  var NO_RESULTS_TITLE = "No results match your filters";
2267
2430
  var NO_RESULTS_BODY = "Your filters may be too narrow, conflict with each other, or have no activity in this period.";
2268
2431
  function noResultsBody(workspaceName) {
@@ -2285,12 +2448,12 @@ function NoResultsEmptyState({
2285
2448
  const showClear = hasFilters !== false && Boolean(onClearFilters);
2286
2449
  const showEdit = Boolean(onEditFilters);
2287
2450
  const hasActions = showClear || showEdit || Boolean(actions && actions.length > 0);
2288
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: cn("flex flex-col items-center justify-center gap-3 text-center", className), "data-testid": testIdPrefix, children: [
2289
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "flex h-11 w-11 items-center justify-center rounded-full bg-subtle text-text-tertiary", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react11.FilterX, { size: 20, "aria-hidden": "true" }) }),
2290
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h2", { className: "text-base font-semibold text-text-primary", children: title }),
2291
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "max-w-105 text-dense leading-relaxed text-text-secondary", children: bodyText }),
2292
- hasActions && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "mt-1 flex flex-col items-center gap-3", children: [
2293
- showClear && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2451
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: cn("flex flex-col items-center justify-center gap-3 text-center", className), "data-testid": testIdPrefix, children: [
2452
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "flex h-11 w-11 items-center justify-center rounded-full bg-subtle text-text-tertiary", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react11.FilterX, { size: 20, "aria-hidden": "true" }) }),
2453
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h2", { className: "text-base font-semibold text-text-primary", children: title }),
2454
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "max-w-105 text-dense leading-relaxed text-text-secondary", children: bodyText }),
2455
+ hasActions && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "mt-1 flex flex-col items-center gap-3", children: [
2456
+ showClear && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2294
2457
  "button",
2295
2458
  {
2296
2459
  type: "button",
@@ -2300,7 +2463,7 @@ function NoResultsEmptyState({
2300
2463
  children: "Clear all filters"
2301
2464
  }
2302
2465
  ),
2303
- showEdit && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2466
+ showEdit && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2304
2467
  "button",
2305
2468
  {
2306
2469
  type: "button",
@@ -2310,7 +2473,7 @@ function NoResultsEmptyState({
2310
2473
  children: "Edit filters"
2311
2474
  }
2312
2475
  ),
2313
- actions?.map((action, i) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2476
+ actions?.map((action, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2314
2477
  "button",
2315
2478
  {
2316
2479
  type: "button",
@@ -2325,11 +2488,11 @@ function NoResultsEmptyState({
2325
2488
  }
2326
2489
 
2327
2490
  // src/WorkspaceSelectedCard.tsx
2328
- var import_react10 = require("react");
2491
+ var import_react12 = require("react");
2329
2492
  var import_lucide_react12 = require("lucide-react");
2330
- var import_jsx_runtime16 = require("react/jsx-runtime");
2493
+ var import_jsx_runtime19 = require("react/jsx-runtime");
2331
2494
  function WorkspaceSelectedCard({ groups, className, testIdPrefix }) {
2332
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2495
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2333
2496
  "aside",
2334
2497
  {
2335
2498
  className: cn(
@@ -2337,7 +2500,7 @@ function WorkspaceSelectedCard({ groups, className, testIdPrefix }) {
2337
2500
  className
2338
2501
  ),
2339
2502
  "data-testid": testIdPrefix,
2340
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex flex-col divide-y divide-border-default", children: groups.map((g) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SummaryGroupItem, { group: g, testIdPrefix }, g.id)) })
2503
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "flex flex-col divide-y divide-border-default", children: groups.map((g) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SummaryGroupItem, { group: g, testIdPrefix }, g.id)) })
2341
2504
  }
2342
2505
  );
2343
2506
  }
@@ -2349,15 +2512,15 @@ function SummaryGroupItem({
2349
2512
  const ownCount = group.items.length;
2350
2513
  const subCount = (group.subGroups ?? []).reduce((n, sg) => n + sg.items.length, 0);
2351
2514
  const expandCount = ownCount + subCount;
2352
- const [open, setOpen] = (0, import_react10.useState)(expandCount > 0);
2353
- const wasEmpty = (0, import_react10.useRef)(expandCount === 0);
2354
- (0, import_react10.useEffect)(() => {
2515
+ const [open, setOpen] = (0, import_react12.useState)(expandCount > 0);
2516
+ const wasEmpty = (0, import_react12.useRef)(expandCount === 0);
2517
+ (0, import_react12.useEffect)(() => {
2355
2518
  if (wasEmpty.current && expandCount > 0) setOpen(true);
2356
2519
  else if (expandCount === 0) setOpen(false);
2357
2520
  wasEmpty.current = expandCount === 0;
2358
2521
  }, [expandCount]);
2359
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: nested ? "" : "py-3 first:pt-0 last:pb-0", children: [
2360
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
2522
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: nested ? "" : "py-3 first:pt-0 last:pb-0", children: [
2523
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
2361
2524
  "button",
2362
2525
  {
2363
2526
  type: "button",
@@ -2366,7 +2529,7 @@ function SummaryGroupItem({
2366
2529
  "data-testid": testIdPrefix && `${testIdPrefix}-group-${group.id}`,
2367
2530
  className: "flex w-full min-w-0 items-center gap-2 text-left focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
2368
2531
  children: [
2369
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2532
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2370
2533
  import_lucide_react12.ChevronDown,
2371
2534
  {
2372
2535
  size: 14,
@@ -2374,37 +2537,37 @@ function SummaryGroupItem({
2374
2537
  className: cn("shrink-0 text-text-secondary transition-transform", !open && "-rotate-90")
2375
2538
  }
2376
2539
  ),
2377
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: cn("truncate font-semibold text-text-primary", nested ? "text-xs" : "text-dense"), children: group.label }),
2378
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "shrink-0 rounded-full bg-subtle px-1.5 py-0.5 text-micro font-semibold text-text-secondary", children: ownCount })
2540
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: cn("truncate font-semibold text-text-primary", nested ? "text-xs" : "text-dense"), children: group.label }),
2541
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "shrink-0 rounded-full bg-subtle px-1.5 py-0.5 text-micro font-semibold text-text-secondary", children: ownCount })
2379
2542
  ]
2380
2543
  }
2381
2544
  ),
2382
- open && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "pt-2.5", children: ownCount === 0 && subCount === 0 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-xs text-text-secondary", children: "Nothing selected." }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex flex-col gap-2.5", children: [
2383
- ownCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
2384
- group.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
2545
+ open && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "pt-2.5", children: ownCount === 0 && subCount === 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-xs text-text-secondary", children: "Nothing selected." }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex flex-col gap-2.5", children: [
2546
+ ownCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
2547
+ group.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
2385
2548
  "div",
2386
2549
  {
2387
2550
  className: "flex items-center justify-between gap-2 rounded-control border border-border-default bg-canvas px-2 py-1",
2388
2551
  children: [
2389
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "min-w-0 flex-1", children: [
2390
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "block truncate text-xs text-text-primary", children: item.name }),
2391
- item.meta && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "block truncate text-micro text-text-secondary", children: item.meta })
2552
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: "min-w-0 flex-1", children: [
2553
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "block truncate text-xs text-text-primary", children: item.name }),
2554
+ item.meta && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "block truncate text-micro text-text-secondary", children: item.meta })
2392
2555
  ] }),
2393
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2556
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2394
2557
  "button",
2395
2558
  {
2396
2559
  type: "button",
2397
2560
  "aria-label": `Remove ${item.name}`,
2398
2561
  onClick: () => group.onRemove(item.id),
2399
2562
  className: "flex h-5 w-5 shrink-0 items-center justify-center rounded-control text-text-secondary hover:bg-subtle hover:text-text-danger focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
2400
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react12.X, { size: 12, "aria-hidden": "true" })
2563
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react12.X, { size: 12, "aria-hidden": "true" })
2401
2564
  }
2402
2565
  )
2403
2566
  ]
2404
2567
  },
2405
2568
  item.id
2406
2569
  )),
2407
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2570
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2408
2571
  "button",
2409
2572
  {
2410
2573
  type: "button",
@@ -2415,13 +2578,13 @@ function SummaryGroupItem({
2415
2578
  }
2416
2579
  )
2417
2580
  ] }),
2418
- group.subGroups?.map((sg) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SummaryGroupItem, { group: sg, nested: true, testIdPrefix }, sg.id))
2581
+ group.subGroups?.map((sg) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SummaryGroupItem, { group: sg, nested: true, testIdPrefix }, sg.id))
2419
2582
  ] }) })
2420
2583
  ] });
2421
2584
  }
2422
2585
 
2423
2586
  // src/chart-placeholder-shared.tsx
2424
- var import_jsx_runtime17 = require("react/jsx-runtime");
2587
+ var import_jsx_runtime20 = require("react/jsx-runtime");
2425
2588
  var GRID_ROWS = [0, 25, 50, 75, 100];
2426
2589
  var Y_TICK_WIDTHS = [26, 30, 30, 26, 20];
2427
2590
  var Y_AXIS_W = 48;
@@ -2435,9 +2598,9 @@ function AxisFrame({
2435
2598
  testIdPrefix
2436
2599
  }) {
2437
2600
  const gutter = xTicks > 0 ? X_AXIS_H : 0;
2438
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: cn("w-full", className), style: { height }, role: "presentation", "aria-hidden": "true", "data-testid": testIdPrefix, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "relative h-full w-full", children: [
2439
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "absolute inset-y-0 right-0", style: { left: Y_AXIS_W, bottom: gutter }, children: [
2440
- GRID_ROWS.map((pct) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2601
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: cn("w-full", className), style: { height }, role: "presentation", "aria-hidden": "true", "data-testid": testIdPrefix, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "relative h-full w-full", children: [
2602
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "absolute inset-y-0 right-0", style: { left: Y_AXIS_W, bottom: gutter }, children: [
2603
+ GRID_ROWS.map((pct) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2441
2604
  "div",
2442
2605
  {
2443
2606
  className: "absolute inset-x-0 border-t border-dashed",
@@ -2445,9 +2608,9 @@ function AxisFrame({
2445
2608
  },
2446
2609
  pct
2447
2610
  )),
2448
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "absolute inset-0", children })
2611
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "absolute inset-0", children })
2449
2612
  ] }),
2450
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "absolute left-0 top-0", style: { width: Y_AXIS_W, bottom: gutter }, children: GRID_ROWS.map((pct, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2613
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "absolute left-0 top-0", style: { width: Y_AXIS_W, bottom: gutter }, children: GRID_ROWS.map((pct, i) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2451
2614
  "div",
2452
2615
  {
2453
2616
  className: "absolute right-2 h-2 -translate-y-1/2 rounded-xs bg-subtle",
@@ -2455,27 +2618,27 @@ function AxisFrame({
2455
2618
  },
2456
2619
  pct
2457
2620
  )) }),
2458
- xTicks > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2621
+ xTicks > 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2459
2622
  "div",
2460
2623
  {
2461
2624
  className: "absolute bottom-0 right-0 flex items-center",
2462
2625
  style: { left: Y_AXIS_W, height: X_AXIS_H },
2463
- children: Array.from({ length: xTicks }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex flex-1 justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "h-2 w-full max-w-6.5 rounded-xs bg-subtle" }) }, i))
2626
+ children: Array.from({ length: xTicks }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "flex flex-1 justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "h-2 w-full max-w-6.5 rounded-xs bg-subtle" }) }, i))
2464
2627
  }
2465
2628
  )
2466
2629
  ] }) });
2467
2630
  }
2468
2631
  function BlankLegend({ rows, reverse = false }) {
2469
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2632
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2470
2633
  "ul",
2471
2634
  {
2472
2635
  className: `flex flex-1 justify-center gap-1.5 ${reverse ? "flex-col-reverse" : "flex-col"}`,
2473
2636
  role: "presentation",
2474
2637
  "aria-hidden": "true",
2475
- children: Array.from({ length: rows }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("li", { className: "flex items-center justify-between gap-2", children: [
2476
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "flex items-center gap-1.5", children: [
2477
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "h-2.5 w-2.5 rounded-xs bg-subtle" }),
2478
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2638
+ children: Array.from({ length: rows }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("li", { className: "flex items-center justify-between gap-2", children: [
2639
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { className: "flex items-center gap-1.5", children: [
2640
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "h-2.5 w-2.5 rounded-xs bg-subtle" }),
2641
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2479
2642
  "span",
2480
2643
  {
2481
2644
  className: "h-2 rounded-xs bg-subtle",
@@ -2483,21 +2646,21 @@ function BlankLegend({ rows, reverse = false }) {
2483
2646
  }
2484
2647
  )
2485
2648
  ] }),
2486
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "h-2 w-6 rounded-xs bg-subtle" })
2649
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "h-2 w-6 rounded-xs bg-subtle" })
2487
2650
  ] }, i))
2488
2651
  }
2489
2652
  );
2490
2653
  }
2491
2654
 
2492
2655
  // src/BarChartPlaceholder.tsx
2493
- var import_jsx_runtime18 = require("react/jsx-runtime");
2656
+ var import_jsx_runtime21 = require("react/jsx-runtime");
2494
2657
  var BAR_PROFILE = [92, 86, 76, 65, 57, 40, 30, 24, 18, 13];
2495
2658
  function BarChartPlaceholder({ height = 220, className, testIdPrefix }) {
2496
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AxisFrame, { height, xTicks: BAR_PROFILE.length, className, testIdPrefix, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex h-full w-full items-end gap-2", children: BAR_PROFILE.map((pct, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex-1 rounded-t-small bg-subtle", style: { height: `${pct}%` } }, i)) }) });
2659
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(AxisFrame, { height, xTicks: BAR_PROFILE.length, className, testIdPrefix, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex h-full w-full items-end gap-2", children: BAR_PROFILE.map((pct, i) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex-1 rounded-t-small bg-subtle", style: { height: `${pct}%` } }, i)) }) });
2497
2660
  }
2498
2661
 
2499
2662
  // src/LineChartPlaceholder.tsx
2500
- var import_jsx_runtime19 = require("react/jsx-runtime");
2663
+ var import_jsx_runtime22 = require("react/jsx-runtime");
2501
2664
  var LINE_SERIES = [
2502
2665
  [58, 52, 55, 41, 45, 33, 36, 25, 28, 17],
2503
2666
  [74, 71, 66, 68, 59, 61, 54, 56, 48, 45],
@@ -2507,9 +2670,9 @@ var LINE_SERIES = [
2507
2670
  var LINE_FORECAST_FROM = 7;
2508
2671
  function LineChartPlaceholder({ height = 280, className, testIdPrefix }) {
2509
2672
  const toPath = (pts, from, to) => pts.slice(from, to).map((y, i) => `${(i + from) / (pts.length - 1) * 100},${y}`).join(" ");
2510
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(AxisFrame, { height, xTicks: LINE_SERIES[0].length, className, testIdPrefix, children: [
2511
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("svg", { viewBox: "0 0 100 100", preserveAspectRatio: "none", className: "absolute inset-0 h-full w-full", children: LINE_SERIES.map((pts, s) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("g", { children: [
2512
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2673
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(AxisFrame, { height, xTicks: LINE_SERIES[0].length, className, testIdPrefix, children: [
2674
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("svg", { viewBox: "0 0 100 100", preserveAspectRatio: "none", className: "absolute inset-0 h-full w-full", children: LINE_SERIES.map((pts, s) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("g", { children: [
2675
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2513
2676
  "polyline",
2514
2677
  {
2515
2678
  points: toPath(pts, 0, LINE_FORECAST_FROM + 1),
@@ -2521,7 +2684,7 @@ function LineChartPlaceholder({ height = 280, className, testIdPrefix }) {
2521
2684
  strokeLinejoin: "round"
2522
2685
  }
2523
2686
  ),
2524
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2687
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2525
2688
  "polyline",
2526
2689
  {
2527
2690
  points: toPath(pts, LINE_FORECAST_FROM, pts.length),
@@ -2536,7 +2699,7 @@ function LineChartPlaceholder({ height = 280, className, testIdPrefix }) {
2536
2699
  )
2537
2700
  ] }, s)) }),
2538
2701
  LINE_SERIES.map(
2539
- (pts, s) => pts.map((y, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2702
+ (pts, s) => pts.map((y, i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2540
2703
  "div",
2541
2704
  {
2542
2705
  className: "absolute h-1.5 w-1.5 -translate-x-1/2 -translate-y-1/2 rounded-full",
@@ -2553,16 +2716,16 @@ function LineChartPlaceholder({ height = 280, className, testIdPrefix }) {
2553
2716
  }
2554
2717
 
2555
2718
  // src/PieChartPlaceholder.tsx
2556
- var import_jsx_runtime20 = require("react/jsx-runtime");
2719
+ var import_jsx_runtime23 = require("react/jsx-runtime");
2557
2720
  var PIE_SEAMS = [0, 115, 180, 230, 262, 288, 310, 332];
2558
2721
  function PieChartPlaceholder({ height = 220, legendRows = 8, className, testIdPrefix }) {
2559
2722
  const r = 45;
2560
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: cn("flex w-full items-center gap-3", className), style: { height }, role: "presentation", "aria-hidden": "true", "data-testid": testIdPrefix, children: [
2561
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "flex h-full items-center justify-center", style: { width: "60%" }, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("svg", { viewBox: "0 0 100 100", className: "h-full", style: { aspectRatio: "1 / 1" }, children: [
2562
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("circle", { cx: "50", cy: "50", r, fill: "var(--mr-color-subtle)" }),
2723
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: cn("flex w-full items-center gap-3", className), style: { height }, role: "presentation", "aria-hidden": "true", "data-testid": testIdPrefix, children: [
2724
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "flex h-full items-center justify-center", style: { width: "60%" }, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("svg", { viewBox: "0 0 100 100", className: "h-full", style: { aspectRatio: "1 / 1" }, children: [
2725
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("circle", { cx: "50", cy: "50", r, fill: "var(--mr-color-subtle)" }),
2563
2726
  PIE_SEAMS.map((deg) => {
2564
2727
  const rad = (deg - 90) * Math.PI / 180;
2565
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2728
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2566
2729
  "line",
2567
2730
  {
2568
2731
  x1: "50",
@@ -2576,12 +2739,12 @@ function PieChartPlaceholder({ height = 220, legendRows = 8, className, testIdPr
2576
2739
  );
2577
2740
  })
2578
2741
  ] }) }),
2579
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(BlankLegend, { rows: legendRows })
2742
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(BlankLegend, { rows: legendRows })
2580
2743
  ] });
2581
2744
  }
2582
2745
 
2583
2746
  // src/StackedColumnPlaceholder.tsx
2584
- var import_jsx_runtime21 = require("react/jsx-runtime");
2747
+ var import_jsx_runtime24 = require("react/jsx-runtime");
2585
2748
  var COLUMN_WEIGHTS = [20, 30, 15, 35, 24, 12, 28, 18];
2586
2749
  function columnBands(count) {
2587
2750
  const weights = Array.from({ length: count }, (_, i) => COLUMN_WEIGHTS[i % COLUMN_WEIGHTS.length]);
@@ -2596,7 +2759,7 @@ function StackedColumnPlaceholder({
2596
2759
  className,
2597
2760
  testIdPrefix
2598
2761
  }) {
2599
- const column = /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex h-full flex-col overflow-hidden rounded-control bg-subtle", style: { width }, children: columnBands(legendRows).map((pct, i) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2762
+ const column = /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "flex h-full flex-col overflow-hidden rounded-control bg-subtle", style: { width }, children: columnBands(legendRows).map((pct, i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2600
2763
  "div",
2601
2764
  {
2602
2765
  style: {
@@ -2608,16 +2771,16 @@ function StackedColumnPlaceholder({
2608
2771
  },
2609
2772
  i
2610
2773
  )) });
2611
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: cn("flex w-full gap-4", className), style: { height }, role: "presentation", "aria-hidden": "true", "data-testid": testIdPrefix, children: [
2612
- axis ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: { width: "55%" }, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(AxisFrame, { height, xTicks: 0, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex h-full items-stretch justify-center", children: column }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex items-stretch py-1", children: column }),
2613
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(BlankLegend, { rows: legendRows, reverse: !axis })
2774
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: cn("flex w-full gap-4", className), style: { height }, role: "presentation", "aria-hidden": "true", "data-testid": testIdPrefix, children: [
2775
+ axis ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { style: { width: "55%" }, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(AxisFrame, { height, xTicks: 0, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "flex h-full items-stretch justify-center", children: column }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "flex items-stretch py-1", children: column }),
2776
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(BlankLegend, { rows: legendRows, reverse: !axis })
2614
2777
  ] });
2615
2778
  }
2616
2779
 
2617
2780
  // src/Tooltip.tsx
2618
- var import_react11 = require("react");
2781
+ var import_react13 = require("react");
2619
2782
  var import_react_dom3 = require("react-dom");
2620
- var import_jsx_runtime22 = require("react/jsx-runtime");
2783
+ var import_jsx_runtime25 = require("react/jsx-runtime");
2621
2784
  function addDescribedBy(el, id) {
2622
2785
  const ids = (el.getAttribute("aria-describedby") ?? "").split(" ").filter(Boolean);
2623
2786
  if (!ids.includes(id)) el.setAttribute("aria-describedby", [...ids, id].join(" "));
@@ -2653,18 +2816,18 @@ function Tooltip({
2653
2816
  variant = "surface",
2654
2817
  testIdPrefix
2655
2818
  }) {
2656
- const [anchor, setAnchor] = (0, import_react11.useState)(null);
2657
- const [boxWidth, setBoxWidth] = (0, import_react11.useState)(null);
2658
- const ref = (0, import_react11.useRef)(null);
2659
- const boxRef = (0, import_react11.useRef)(null);
2660
- const hideTimer = (0, import_react11.useRef)(null);
2661
- const showTimer = (0, import_react11.useRef)(null);
2662
- const exitTimer = (0, import_react11.useRef)(null);
2663
- const [shown, setShown] = (0, import_react11.useState)(false);
2664
- const openRef = (0, import_react11.useRef)(false);
2665
- const mountedRef = (0, import_react11.useRef)(false);
2666
- const id = (0, import_react11.useId)();
2667
- const describedRef = (0, import_react11.useRef)(null);
2819
+ const [anchor, setAnchor] = (0, import_react13.useState)(null);
2820
+ const [boxWidth, setBoxWidth] = (0, import_react13.useState)(null);
2821
+ const ref = (0, import_react13.useRef)(null);
2822
+ const boxRef = (0, import_react13.useRef)(null);
2823
+ const hideTimer = (0, import_react13.useRef)(null);
2824
+ const showTimer = (0, import_react13.useRef)(null);
2825
+ const exitTimer = (0, import_react13.useRef)(null);
2826
+ const [shown, setShown] = (0, import_react13.useState)(false);
2827
+ const openRef = (0, import_react13.useRef)(false);
2828
+ const mountedRef = (0, import_react13.useRef)(false);
2829
+ const id = (0, import_react13.useId)();
2830
+ const describedRef = (0, import_react13.useRef)(null);
2668
2831
  const clearHideTimer = () => {
2669
2832
  if (hideTimer.current) {
2670
2833
  clearTimeout(hideTimer.current);
@@ -2683,7 +2846,7 @@ function Tooltip({
2683
2846
  exitTimer.current = null;
2684
2847
  }
2685
2848
  };
2686
- (0, import_react11.useEffect)(
2849
+ (0, import_react13.useEffect)(
2687
2850
  () => () => {
2688
2851
  clearHideTimer();
2689
2852
  clearShowTimer();
@@ -2757,7 +2920,7 @@ function Tooltip({
2757
2920
  clearHideTimer();
2758
2921
  hideTimer.current = setTimeout(hideNow, 120);
2759
2922
  };
2760
- (0, import_react11.useEffect)(() => {
2923
+ (0, import_react13.useEffect)(() => {
2761
2924
  if (!anchorRef) return;
2762
2925
  const el = anchorRef.current;
2763
2926
  if (!el) return;
@@ -2772,13 +2935,13 @@ function Tooltip({
2772
2935
  el.removeEventListener("blur", hide);
2773
2936
  };
2774
2937
  }, [anchorRef, placement, delay]);
2775
- (0, import_react11.useEffect)(() => {
2938
+ (0, import_react13.useEffect)(() => {
2776
2939
  if (!anchor) return;
2777
2940
  const onKey = (e) => e.key === "Escape" && hideNow();
2778
2941
  window.addEventListener("keydown", onKey);
2779
2942
  return () => window.removeEventListener("keydown", onKey);
2780
2943
  }, [anchor]);
2781
- (0, import_react11.useLayoutEffect)(() => {
2944
+ (0, import_react13.useLayoutEffect)(() => {
2782
2945
  if (!anchor) return;
2783
2946
  const el = boxRef.current;
2784
2947
  if (!el) return;
@@ -2803,7 +2966,7 @@ function Tooltip({
2803
2966
  }
2804
2967
  }
2805
2968
  const floating = anchor != null && typeof document !== "undefined" ? (0, import_react_dom3.createPortal)(
2806
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2969
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2807
2970
  "span",
2808
2971
  {
2809
2972
  ref: boxRef,
@@ -2834,7 +2997,7 @@ function Tooltip({
2834
2997
  document.body
2835
2998
  ) : null;
2836
2999
  if (anchorRef) return floating;
2837
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
3000
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
2838
3001
  "span",
2839
3002
  {
2840
3003
  ref,
@@ -2856,28 +3019,28 @@ function Tooltip({
2856
3019
  }
2857
3020
 
2858
3021
  // src/AdvertiserNoResults.tsx
2859
- var import_jsx_runtime23 = require("react/jsx-runtime");
3022
+ var import_jsx_runtime26 = require("react/jsx-runtime");
2860
3023
  function AdvertiserNoResults({
2861
3024
  query,
2862
3025
  hint = "Try checking your spelling or searching for a broader brand name.",
2863
3026
  className,
2864
3027
  testIdPrefix
2865
3028
  }) {
2866
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: cn("flex flex-col items-center gap-1.5 px-4 py-8 text-center", className), "data-testid": testIdPrefix, children: [
2867
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("p", { className: "text-dense font-medium text-text-primary", children: [
3029
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: cn("flex flex-col items-center gap-1.5 px-4 py-8 text-center", className), "data-testid": testIdPrefix, children: [
3030
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("p", { className: "text-dense font-medium text-text-primary", children: [
2868
3031
  "No results found for \u201C",
2869
3032
  query,
2870
3033
  "\u201D"
2871
3034
  ] }),
2872
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-xs leading-snug text-text-tertiary", children: hint })
3035
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-xs leading-snug text-text-tertiary", children: hint })
2873
3036
  ] });
2874
3037
  }
2875
3038
 
2876
3039
  // src/SelectAllVisible.tsx
2877
3040
  var import_lucide_react13 = require("lucide-react");
2878
- var import_jsx_runtime24 = require("react/jsx-runtime");
3041
+ var import_jsx_runtime27 = require("react/jsx-runtime");
2879
3042
  function SelectAllVisible({ count, allSelected, onToggle, className, testIdPrefix }) {
2880
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
3043
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
2881
3044
  "button",
2882
3045
  {
2883
3046
  type: "button",
@@ -2888,7 +3051,7 @@ function SelectAllVisible({ count, allSelected, onToggle, className, testIdPrefi
2888
3051
  className
2889
3052
  ),
2890
3053
  children: [
2891
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react13.ListChecks, { size: 14, "aria-hidden": "true" }),
3054
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react13.ListChecks, { size: 14, "aria-hidden": "true" }),
2892
3055
  allSelected ? `Deselect ${count} visible` : `Select all ${count} visible`
2893
3056
  ]
2894
3057
  }
@@ -2897,11 +3060,11 @@ function SelectAllVisible({ count, allSelected, onToggle, className, testIdPrefi
2897
3060
 
2898
3061
  // src/SelectedSection.tsx
2899
3062
  var import_lucide_react14 = require("lucide-react");
2900
- var import_jsx_runtime25 = require("react/jsx-runtime");
3063
+ var import_jsx_runtime28 = require("react/jsx-runtime");
2901
3064
  function SelectedSection({ count, open, onToggle, children, className, testIdPrefix }) {
2902
3065
  if (count === 0) return null;
2903
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: cn("flex flex-col", className), "data-testid": testIdPrefix, children: [
2904
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
3066
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: cn("flex flex-col", className), "data-testid": testIdPrefix, children: [
3067
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
2905
3068
  "button",
2906
3069
  {
2907
3070
  type: "button",
@@ -2910,25 +3073,25 @@ function SelectedSection({ count, open, onToggle, children, className, testIdPre
2910
3073
  "aria-expanded": open,
2911
3074
  className: "flex w-full items-center gap-1.5 rounded-control px-2 py-1 text-left text-micro font-semibold uppercase tracking-wide text-text-tertiary transition-colors hover:text-text-primary focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-border-focus",
2912
3075
  children: [
2913
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react14.ChevronDown, { size: 13, "aria-hidden": "true", className: cn("transition-transform", !open && "-rotate-90") }),
3076
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react14.ChevronDown, { size: 13, "aria-hidden": "true", className: cn("transition-transform", !open && "-rotate-90") }),
2914
3077
  "Selected (",
2915
3078
  count,
2916
3079
  ")"
2917
3080
  ]
2918
3081
  }
2919
3082
  ),
2920
- open && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "flex flex-col gap-0.5", children })
3083
+ open && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "flex flex-col gap-0.5", children })
2921
3084
  ] });
2922
3085
  }
2923
3086
 
2924
3087
  // src/SelectionPicker.tsx
2925
- var import_react13 = require("react");
3088
+ var import_react15 = require("react");
2926
3089
  var import_react_dom4 = require("react-dom");
2927
3090
  var import_lucide_react15 = require("lucide-react");
2928
3091
 
2929
3092
  // src/Tabs.tsx
2930
- var import_react12 = require("react");
2931
- var import_jsx_runtime26 = require("react/jsx-runtime");
3093
+ var import_react14 = require("react");
3094
+ var import_jsx_runtime29 = require("react/jsx-runtime");
2932
3095
  function arrowKeys(e, row) {
2933
3096
  if (!row || !["ArrowLeft", "ArrowRight", "Home", "End"].includes(e.key)) return;
2934
3097
  const items = Array.from(row.querySelectorAll("button:not([disabled])"));
@@ -2939,8 +3102,8 @@ function arrowKeys(e, row) {
2939
3102
  items[next]?.click();
2940
3103
  }
2941
3104
  function Tabs({ items, value, onChange, idPrefix = "tabs", className, testIdPrefix, ...rest }) {
2942
- const row = (0, import_react12.useRef)(null);
2943
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3105
+ const row = (0, import_react14.useRef)(null);
3106
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2944
3107
  "div",
2945
3108
  {
2946
3109
  ref: row,
@@ -2951,7 +3114,7 @@ function Tabs({ items, value, onChange, idPrefix = "tabs", className, testIdPref
2951
3114
  className: cn("flex gap-6 border-b border-border-default", className),
2952
3115
  children: items.map((item) => {
2953
3116
  const on = item.value === value;
2954
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
3117
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
2955
3118
  "button",
2956
3119
  {
2957
3120
  type: "button",
@@ -2969,7 +3132,7 @@ function Tabs({ items, value, onChange, idPrefix = "tabs", className, testIdPref
2969
3132
  ),
2970
3133
  children: [
2971
3134
  item.label,
2972
- item.count !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "text-xs text-text-tertiary", children: item.count })
3135
+ item.count !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-xs text-text-tertiary", children: item.count })
2973
3136
  ]
2974
3137
  },
2975
3138
  item.value
@@ -2987,8 +3150,8 @@ function SegmentedControl({
2987
3150
  testIdPrefix,
2988
3151
  ...rest
2989
3152
  }) {
2990
- const row = (0, import_react12.useRef)(null);
2991
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3153
+ const row = (0, import_react14.useRef)(null);
3154
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2992
3155
  "div",
2993
3156
  {
2994
3157
  ref: row,
@@ -2999,7 +3162,7 @@ function SegmentedControl({
2999
3162
  className: cn("inline-flex w-fit items-stretch gap-0.5 rounded-full bg-subtle p-1", size === "md" ? "h-10" : "h-8", className),
3000
3163
  children: options.map((o) => {
3001
3164
  const on = o.value === value;
3002
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3165
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3003
3166
  "button",
3004
3167
  {
3005
3168
  type: "button",
@@ -3023,7 +3186,7 @@ function SegmentedControl({
3023
3186
  }
3024
3187
 
3025
3188
  // src/SelectionPicker.tsx
3026
- var import_jsx_runtime27 = require("react/jsx-runtime");
3189
+ var import_jsx_runtime30 = require("react/jsx-runtime");
3027
3190
  function slug5(value) {
3028
3191
  return value.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "");
3029
3192
  }
@@ -3057,15 +3220,15 @@ function SelectionPicker({
3057
3220
  testIdPrefix
3058
3221
  }) {
3059
3222
  const hasAccountLists = !!accountLists;
3060
- const [source, setSource] = (0, import_react13.useState)("search");
3061
- const [query, setQuery] = (0, import_react13.useState)("");
3062
- const [activeFilters, setActiveFilters] = (0, import_react13.useState)(() => {
3223
+ const [source, setSource] = (0, import_react15.useState)("search");
3224
+ const [query, setQuery] = (0, import_react15.useState)("");
3225
+ const [activeFilters, setActiveFilters] = (0, import_react15.useState)(() => {
3063
3226
  const init = {};
3064
3227
  if (defaultFilters) for (const [label, opts] of Object.entries(defaultFilters)) init[label] = new Set(opts);
3065
3228
  return init;
3066
3229
  });
3067
- const [expanded, setExpanded] = (0, import_react13.useState)(/* @__PURE__ */ new Set());
3068
- const selectedIds = (0, import_react13.useMemo)(() => new Set(selected.map((s) => s.id)), [selected]);
3230
+ const [expanded, setExpanded] = (0, import_react15.useState)(/* @__PURE__ */ new Set());
3231
+ const selectedIds = (0, import_react15.useMemo)(() => new Set(selected.map((s) => s.id)), [selected]);
3069
3232
  const toggleFilter = (label, opt) => {
3070
3233
  setActiveFilters((prev) => {
3071
3234
  const next = { ...prev };
@@ -3077,7 +3240,7 @@ function SelectionPicker({
3077
3240
  };
3078
3241
  const activeFilterCount = filters.reduce((n, f) => n + (activeFilters[f.label]?.size ?? 0), 0);
3079
3242
  const hasSearched = showResultsWithoutSearch || query.trim().length > 0 || !requireQuery && activeFilterCount > 0;
3080
- const filteredCatalog = (0, import_react13.useMemo)(() => {
3243
+ const filteredCatalog = (0, import_react15.useMemo)(() => {
3081
3244
  if (!hasSearched || results !== void 0) return [];
3082
3245
  const q = query.trim().toLowerCase();
3083
3246
  return catalog.filter((row) => {
@@ -3116,12 +3279,12 @@ function SelectionPicker({
3116
3279
  }
3117
3280
  };
3118
3281
  const rowGridCols = showInfoColumn ? "grid-cols-[36px_1fr_44px]" : "grid-cols-[36px_1fr]";
3119
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: cn("flex flex-col gap-4", className), "data-testid": testIdPrefix, children: [
3120
- helper && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
3121
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "text-dense text-text-secondary", children: helper }),
3122
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("hr", { className: "-mx-5 -mt-2 border-border-default sm:-mx-6" })
3282
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: cn("flex flex-col gap-4", className), "data-testid": testIdPrefix, children: [
3283
+ helper && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
3284
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-dense text-text-secondary", children: helper }),
3285
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("hr", { className: "-mx-5 -mt-2 border-border-default sm:-mx-6" })
3123
3286
  ] }),
3124
- hasAccountLists && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3287
+ hasAccountLists && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3125
3288
  SegmentedControl,
3126
3289
  {
3127
3290
  "aria-label": "Add from",
@@ -3134,11 +3297,11 @@ function SelectionPicker({
3134
3297
  ]
3135
3298
  }
3136
3299
  ),
3137
- source === "search" && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex min-w-0 flex-col gap-3", children: [
3138
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex flex-wrap items-center gap-2", children: [
3139
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex h-8 min-w-50 flex-1 items-center gap-2 rounded-control border border-border-strong bg-input px-3 focus-within:outline-2 focus-within:outline-offset-1 focus-within:outline-border-focus", children: [
3140
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react15.Search, { size: 15, className: "text-text-secondary", "aria-hidden": "true" }),
3141
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3300
+ source === "search" && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex min-w-0 flex-col gap-3", children: [
3301
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-wrap items-center gap-2", children: [
3302
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex h-8 min-w-50 flex-1 items-center gap-2 rounded-control border border-border-strong bg-input px-3 focus-within:outline-2 focus-within:outline-offset-1 focus-within:outline-border-focus", children: [
3303
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react15.Search, { size: 15, className: "text-text-secondary", "aria-hidden": "true" }),
3304
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3142
3305
  "input",
3143
3306
  {
3144
3307
  value: query,
@@ -3154,7 +3317,7 @@ function SelectionPicker({
3154
3317
  }
3155
3318
  )
3156
3319
  ] }),
3157
- filters.map((f) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3320
+ filters.map((f) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3158
3321
  FilterDropdown,
3159
3322
  {
3160
3323
  filter: f,
@@ -3166,14 +3329,14 @@ function SelectionPicker({
3166
3329
  )),
3167
3330
  toolbarExtra
3168
3331
  ] }),
3169
- !hasSearched ? /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex flex-col items-center gap-3 rounded-card border border-dashed border-border-default py-10 text-center", children: [
3170
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "flex h-12 w-12 items-center justify-center rounded-full bg-subtle", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react15.Search, { size: 20, className: "text-text-tertiary", "aria-hidden": "true" }) }),
3171
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex flex-col gap-1", children: [
3172
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "text-sm font-semibold text-text-primary", children: "Search to get started" }),
3173
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "text-dense text-text-tertiary", children: "Use the search or filters above to find and add options." })
3332
+ !hasSearched ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-col items-center gap-3 rounded-card border border-dashed border-border-default py-10 text-center", children: [
3333
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex h-12 w-12 items-center justify-center rounded-full bg-subtle", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react15.Search, { size: 20, className: "text-text-tertiary", "aria-hidden": "true" }) }),
3334
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-col gap-1", children: [
3335
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-sm font-semibold text-text-primary", children: "Search to get started" }),
3336
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-dense text-text-tertiary", children: "Use the search or filters above to find and add options." })
3174
3337
  ] })
3175
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "overflow-hidden rounded-control border border-border-default", children: [
3176
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
3338
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "overflow-hidden rounded-control border border-border-default", children: [
3339
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
3177
3340
  "div",
3178
3341
  {
3179
3342
  className: cn(
@@ -3181,7 +3344,7 @@ function SelectionPicker({
3181
3344
  rowGridCols
3182
3345
  ),
3183
3346
  children: [
3184
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3347
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3185
3348
  CheckBox,
3186
3349
  {
3187
3350
  checked: allSelected,
@@ -3192,18 +3355,18 @@ function SelectionPicker({
3192
3355
  testIdPrefix: testIdPrefix && `${testIdPrefix}-select-all`
3193
3356
  }
3194
3357
  ),
3195
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: cn("grid gap-2", gridForColumns(columns)), children: columns.map((c) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: c.className, children: c.header }, c.key)) }),
3196
- showInfoColumn && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "text-right", children: "Info" })
3358
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: cn("grid gap-2", gridForColumns(columns)), children: columns.map((c) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: c.className, children: c.header }, c.key)) }),
3359
+ showInfoColumn && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-right", children: "Info" })
3197
3360
  ]
3198
3361
  }
3199
3362
  ),
3200
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "max-h-90 overflow-y-auto", children: loading ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "flex items-center justify-center py-6", role: "status", "aria-label": "Loading", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react15.Loader2, { size: 18, className: "animate-spin text-text-tertiary", "aria-hidden": "true" }) }) : error ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "px-3 py-8 text-center text-dense text-text-tertiary", children: errorMessage }) : rows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "px-3 py-8 text-center text-dense text-text-tertiary", children: "No matches. Try a different search or filter." }) : rows.map((row) => {
3363
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "max-h-90 overflow-y-auto", children: loading ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex items-center justify-center py-6", role: "status", "aria-label": "Loading", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react15.Loader2, { size: 18, className: "animate-spin text-text-tertiary", "aria-hidden": "true" }) }) : error ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "px-3 py-8 text-center text-dense text-text-tertiary", children: errorMessage }) : rows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "px-3 py-8 text-center text-dense text-text-tertiary", children: "No matches. Try a different search or filter." }) : rows.map((row) => {
3201
3364
  const isSel = selectedIds.has(row.id);
3202
3365
  const isLocked = lockedIds?.has(row.id) ?? false;
3203
3366
  const kids = getChildren?.(row);
3204
3367
  const isOpen = expanded.has(row.id);
3205
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "border-t border-border-default/60 first:border-t-0", children: [
3206
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
3368
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "border-t border-border-default/60 first:border-t-0", children: [
3369
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
3207
3370
  "div",
3208
3371
  {
3209
3372
  onClick: isLocked ? void 0 : () => toggleRow(row),
@@ -3216,7 +3379,7 @@ function SelectionPicker({
3216
3379
  !isLocked && isSel && "opacity-70"
3217
3380
  ),
3218
3381
  children: [
3219
- isLocked ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { "aria-hidden": "true" }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3382
+ isLocked ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { "aria-hidden": "true" }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3220
3383
  CheckBox,
3221
3384
  {
3222
3385
  checked: isSel,
@@ -3225,8 +3388,8 @@ function SelectionPicker({
3225
3388
  testIdPrefix: testIdPrefix && `${testIdPrefix}-row-${slug5(row.id)}`
3226
3389
  }
3227
3390
  ),
3228
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: cn("grid gap-2 text-dense text-text-primary", gridForColumns(columns)), children: columns.map((c) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: cn("truncate", c.className), children: c.render(row) }, c.key)) }),
3229
- showInfoColumn && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "flex items-center justify-end", children: kids && kids.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3391
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: cn("grid gap-2 text-dense text-text-primary", gridForColumns(columns)), children: columns.map((c) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: cn("truncate", c.className), children: c.render(row) }, c.key)) }),
3392
+ showInfoColumn && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex items-center justify-end", children: kids && kids.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3230
3393
  "button",
3231
3394
  {
3232
3395
  type: "button",
@@ -3240,28 +3403,28 @@ function SelectionPicker({
3240
3403
  });
3241
3404
  },
3242
3405
  className: "flex h-7 w-7 items-center justify-center rounded-control text-text-secondary hover:bg-canvas hover:text-text-primary focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
3243
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react15.ChevronRight, { size: 15, className: cn("transition-transform", isOpen && "rotate-90") })
3406
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react15.ChevronRight, { size: 15, className: cn("transition-transform", isOpen && "rotate-90") })
3244
3407
  }
3245
- ) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3408
+ ) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3246
3409
  "span",
3247
3410
  {
3248
3411
  className: "flex h-7 w-7 items-center justify-center text-text-tertiary",
3249
3412
  title: "No additional details",
3250
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react15.Info, { size: 14 })
3413
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react15.Info, { size: 14 })
3251
3414
  }
3252
3415
  ) })
3253
3416
  ]
3254
3417
  }
3255
3418
  ),
3256
- isOpen && kids && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "bg-canvas/60 pb-1.5 pl-10 pr-3", children: kids.map((kid) => {
3419
+ isOpen && kids && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "bg-canvas/60 pb-1.5 pl-10 pr-3", children: kids.map((kid) => {
3257
3420
  const kidSel = selectedIds.has(kid.id);
3258
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
3421
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
3259
3422
  "div",
3260
3423
  {
3261
3424
  className: "flex items-center justify-between gap-2 border-t border-border-default/40 py-2 first:border-t-0",
3262
3425
  children: [
3263
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "truncate text-dense text-text-secondary", children: kid.name }),
3264
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
3426
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "truncate text-dense text-text-secondary", children: kid.name }),
3427
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
3265
3428
  "button",
3266
3429
  {
3267
3430
  type: "button",
@@ -3272,7 +3435,7 @@ function SelectionPicker({
3272
3435
  kidSel ? "text-text-tertiary" : "text-text-link hover:bg-subtle"
3273
3436
  ),
3274
3437
  children: [
3275
- kidSel ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react15.Check, { size: 13 }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react15.Plus, { size: 13 }),
3438
+ kidSel ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react15.Check, { size: 13 }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react15.Plus, { size: 13 }),
3276
3439
  kidSel ? "Added" : "Add"
3277
3440
  ]
3278
3441
  }
@@ -3284,7 +3447,7 @@ function SelectionPicker({
3284
3447
  }) })
3285
3448
  ] }, row.id);
3286
3449
  }) }),
3287
- !loading && !error && hasMore && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
3450
+ !loading && !error && hasMore && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
3288
3451
  "button",
3289
3452
  {
3290
3453
  type: "button",
@@ -3293,19 +3456,19 @@ function SelectionPicker({
3293
3456
  "data-testid": testIdPrefix && `${testIdPrefix}-load-more`,
3294
3457
  className: "flex w-full items-center justify-center gap-2 border-t border-border-default px-2 py-1.5 text-dense text-brand-primaryAction transition-colors hover:bg-subtle disabled:opacity-50 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-border-focus",
3295
3458
  children: [
3296
- loadingMore ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react15.Loader2, { size: 13, className: "animate-spin", "aria-hidden": "true" }) : null,
3459
+ loadingMore ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react15.Loader2, { size: 13, className: "animate-spin", "aria-hidden": "true" }) : null,
3297
3460
  loadingMore ? "Loading\u2026" : "Load more"
3298
3461
  ]
3299
3462
  }
3300
3463
  )
3301
3464
  ] })
3302
3465
  ] }),
3303
- source === "lists" && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex min-w-0 flex-col gap-3", children: [
3304
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "text-dense text-text-secondary", children: "Select an account list to add all of its accounts at once. Your workspace stays in sync as the list is updated." }),
3305
- accountLists && accountLists.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
3306
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ScrollFade, { className: "flex max-h-99 flex-col gap-2 overflow-y-auto pr-0.5", children: accountLists.map((list) => {
3466
+ source === "lists" && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex min-w-0 flex-col gap-3", children: [
3467
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-dense text-text-secondary", children: "Select an account list to add all of its accounts at once. Your workspace stays in sync as the list is updated." }),
3468
+ accountLists && accountLists.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
3469
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ScrollFade, { className: "flex max-h-99 flex-col gap-2 overflow-y-auto pr-0.5", children: accountLists.map((list) => {
3307
3470
  const on = (selectedListIds ?? []).includes(list.id);
3308
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
3471
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
3309
3472
  "button",
3310
3473
  {
3311
3474
  type: "button",
@@ -3317,19 +3480,19 @@ function SelectionPicker({
3317
3480
  on ? "border-brand-primaryAction bg-brand-primarySoft" : "border-border-default bg-surface hover:bg-subtle"
3318
3481
  ),
3319
3482
  children: [
3320
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3483
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3321
3484
  "span",
3322
3485
  {
3323
3486
  className: cn(
3324
3487
  "flex h-5 w-5 shrink-0 items-center justify-center rounded-full",
3325
3488
  on ? "text-brand-primaryAction" : "text-text-secondary"
3326
3489
  ),
3327
- children: on ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react15.Check, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react15.Plus, { size: 16 })
3490
+ children: on ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react15.Check, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react15.Plus, { size: 16 })
3328
3491
  }
3329
3492
  ),
3330
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("span", { className: "min-w-0 flex-1", children: [
3331
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "flex min-w-0 items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "truncate text-sm font-medium text-text-primary", children: list.name }) }),
3332
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("span", { className: "block truncate text-xs text-text-secondary", children: [
3493
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "min-w-0 flex-1", children: [
3494
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "flex min-w-0 items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "truncate text-sm font-medium text-text-primary", children: list.name }) }),
3495
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "block truncate text-xs text-text-secondary", children: [
3333
3496
  list.count,
3334
3497
  " accounts \xB7 ",
3335
3498
  list.entityTypes.join(", "),
@@ -3337,13 +3500,13 @@ function SelectionPicker({
3337
3500
  formatListDate(list.updatedAt)
3338
3501
  ] })
3339
3502
  ] }),
3340
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: cn("shrink-0 text-xs font-medium", on ? "text-brand-primaryAction" : "text-text-secondary"), children: on ? "Added" : "Add" })
3503
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: cn("shrink-0 text-xs font-medium", on ? "text-brand-primaryAction" : "text-text-secondary"), children: on ? "Added" : "Add" })
3341
3504
  ]
3342
3505
  },
3343
3506
  list.id
3344
3507
  );
3345
3508
  }) }),
3346
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
3509
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
3347
3510
  "p",
3348
3511
  {
3349
3512
  className: "border-t border-border-default pt-2 text-right text-xs font-medium text-text-tertiary",
@@ -3355,11 +3518,11 @@ function SelectionPicker({
3355
3518
  ]
3356
3519
  }
3357
3520
  )
3358
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex flex-col items-center gap-3 rounded-card border border-dashed border-border-default py-10 text-center", children: [
3359
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "flex h-12 w-12 items-center justify-center rounded-full bg-subtle", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react15.List, { size: 20, className: "text-text-tertiary", "aria-hidden": "true" }) }),
3360
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex flex-col gap-1", children: [
3361
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "text-sm font-semibold text-text-primary", children: "No account lists yet" }),
3362
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "text-dense text-text-tertiary", children: "Account lists set up for you will appear here." })
3521
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-col items-center gap-3 rounded-card border border-dashed border-border-default py-10 text-center", children: [
3522
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex h-12 w-12 items-center justify-center rounded-full bg-subtle", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react15.List, { size: 20, className: "text-text-tertiary", "aria-hidden": "true" }) }),
3523
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-col gap-1", children: [
3524
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-sm font-semibold text-text-primary", children: "No account lists yet" }),
3525
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-dense text-text-tertiary", children: "Account lists set up for you will appear here." })
3363
3526
  ] })
3364
3527
  ] })
3365
3528
  ] })
@@ -3367,16 +3530,16 @@ function SelectionPicker({
3367
3530
  }
3368
3531
  var EDGE_FADE = 44;
3369
3532
  function ScrollFade({ className, children }) {
3370
- const elRef = (0, import_react13.useRef)(null);
3371
- const [edges, setEdges] = (0, import_react13.useState)({ top: false, bottom: false });
3372
- const sync = (0, import_react13.useCallback)(() => {
3533
+ const elRef = (0, import_react15.useRef)(null);
3534
+ const [edges, setEdges] = (0, import_react15.useState)({ top: false, bottom: false });
3535
+ const sync = (0, import_react15.useCallback)(() => {
3373
3536
  const el = elRef.current;
3374
3537
  if (!el) return;
3375
3538
  const top = el.scrollTop > 2;
3376
3539
  const bottom = el.scrollTop + el.clientHeight < el.scrollHeight - 2;
3377
3540
  setEdges((prev) => prev.top === top && prev.bottom === bottom ? prev : { top, bottom });
3378
3541
  }, []);
3379
- const attach = (0, import_react13.useCallback)(
3542
+ const attach = (0, import_react15.useCallback)(
3380
3543
  (el) => {
3381
3544
  elRef.current = el;
3382
3545
  if (!el) return;
@@ -3391,7 +3554,7 @@ function ScrollFade({ className, children }) {
3391
3554
  [sync]
3392
3555
  );
3393
3556
  const mask = edges.top || edges.bottom ? `linear-gradient(to bottom, transparent 0, #000 ${edges.top ? EDGE_FADE : 0}px, #000 calc(100% - ${edges.bottom ? EDGE_FADE : 0}px), transparent 100%)` : void 0;
3394
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { ref: attach, onScroll: sync, className, style: { maskImage: mask, WebkitMaskImage: mask }, children });
3557
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { ref: attach, onScroll: sync, className, style: { maskImage: mask, WebkitMaskImage: mask }, children });
3395
3558
  }
3396
3559
  function formatListDate(iso) {
3397
3560
  try {
@@ -3406,19 +3569,19 @@ function FilterDropdown({
3406
3569
  onToggle,
3407
3570
  testIdPrefix
3408
3571
  }) {
3409
- const [open, setOpen] = (0, import_react13.useState)(false);
3410
- const [q, setQ] = (0, import_react13.useState)("");
3411
- const btnRef = (0, import_react13.useRef)(null);
3412
- const menuRef = (0, import_react13.useRef)(null);
3413
- const [pos, setPos] = (0, import_react13.useState)(null);
3572
+ const [open, setOpen] = (0, import_react15.useState)(false);
3573
+ const [q, setQ] = (0, import_react15.useState)("");
3574
+ const btnRef = (0, import_react15.useRef)(null);
3575
+ const menuRef = (0, import_react15.useRef)(null);
3576
+ const [pos, setPos] = (0, import_react15.useState)(null);
3414
3577
  const searchable = filter.options.length > 8;
3415
3578
  const shownOptions = searchable && q.trim() ? filter.options.filter((o) => o.toLowerCase().includes(q.trim().toLowerCase())) : filter.options;
3416
- (0, import_react13.useLayoutEffect)(() => {
3579
+ (0, import_react15.useLayoutEffect)(() => {
3417
3580
  if (!open || !btnRef.current) return;
3418
3581
  const r = btnRef.current.getBoundingClientRect();
3419
3582
  setPos({ top: r.bottom + 6, left: r.left });
3420
3583
  }, [open]);
3421
- (0, import_react13.useEffect)(() => {
3584
+ (0, import_react15.useEffect)(() => {
3422
3585
  if (!open) {
3423
3586
  setQ("");
3424
3587
  return;
@@ -3441,8 +3604,8 @@ function FilterDropdown({
3441
3604
  const count = active.size;
3442
3605
  const label = count === 0 ? filter.label : count === 1 ? [...active][0] : "Multiple";
3443
3606
  const filterSlug = slug5(filter.label);
3444
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "relative", children: [
3445
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
3607
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "relative", children: [
3608
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
3446
3609
  "button",
3447
3610
  {
3448
3611
  ref: btnRef,
@@ -3453,12 +3616,12 @@ function FilterDropdown({
3453
3616
  className: "inline-flex h-8 items-center gap-1.5 whitespace-nowrap rounded-control border border-border-strong bg-input px-3 text-dense font-medium text-text-secondary transition-colors hover:bg-subtle focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
3454
3617
  children: [
3455
3618
  label,
3456
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react15.ChevronDown, { size: 13, "aria-hidden": "true", className: cn("transition-transform", open && "rotate-180") })
3619
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react15.ChevronDown, { size: 13, "aria-hidden": "true", className: cn("transition-transform", open && "rotate-180") })
3457
3620
  ]
3458
3621
  }
3459
3622
  ),
3460
3623
  open && pos && (0, import_react_dom4.createPortal)(
3461
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
3624
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
3462
3625
  "div",
3463
3626
  {
3464
3627
  ref: menuRef,
@@ -3467,9 +3630,9 @@ function FilterDropdown({
3467
3630
  style: { top: pos.top, left: pos.left },
3468
3631
  className: "fixed z-dropdown min-w-55 rounded-card border border-border-default bg-surface p-2 shadow-overlay",
3469
3632
  children: [
3470
- searchable && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "mb-1.5 flex h-8 items-center gap-2 rounded-control border border-border-strong bg-input px-2.5", children: [
3471
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react15.Search, { size: 14, className: "shrink-0 text-text-secondary", "aria-hidden": "true" }),
3472
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3633
+ searchable && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "mb-1.5 flex h-8 items-center gap-2 rounded-control border border-border-strong bg-input px-2.5", children: [
3634
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react15.Search, { size: 14, className: "shrink-0 text-text-secondary", "aria-hidden": "true" }),
3635
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3473
3636
  "input",
3474
3637
  {
3475
3638
  autoFocus: true,
@@ -3480,14 +3643,14 @@ function FilterDropdown({
3480
3643
  }
3481
3644
  )
3482
3645
  ] }),
3483
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: cn("flex flex-col gap-0.5", searchable && "max-h-60 overflow-y-auto"), children: shownOptions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "px-2 py-3 text-center text-xs text-text-secondary", children: "No matches." }) : shownOptions.map((opt) => {
3646
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: cn("flex flex-col gap-0.5", searchable && "max-h-60 overflow-y-auto"), children: shownOptions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "px-2 py-3 text-center text-xs text-text-secondary", children: "No matches." }) : shownOptions.map((opt) => {
3484
3647
  const on = active.has(opt);
3485
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
3648
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
3486
3649
  "label",
3487
3650
  {
3488
3651
  className: "flex cursor-pointer items-center gap-2 rounded-control px-2 py-1.5 text-dense text-text-primary hover:bg-subtle",
3489
3652
  children: [
3490
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3653
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3491
3654
  CheckBox,
3492
3655
  {
3493
3656
  checked: on,
@@ -3517,8 +3680,8 @@ function gridForColumns(columns) {
3517
3680
  }
3518
3681
 
3519
3682
  // src/PublisherBreakdownList.tsx
3520
- var import_react14 = require("react");
3521
- var import_jsx_runtime28 = require("react/jsx-runtime");
3683
+ var import_react16 = require("react");
3684
+ var import_jsx_runtime31 = require("react/jsx-runtime");
3522
3685
  var fmtM = (v) => v >= 100 ? `$${Math.round(v)}M` : `$${v.toFixed(1)}M`;
3523
3686
  function priorYearAmt(spendN, yoy) {
3524
3687
  if (yoy === "NEW" || yoy <= -100) return null;
@@ -3530,7 +3693,7 @@ function initials(name) {
3530
3693
  return name.replace(/[^a-zA-Z0-9]/g, "").slice(0, 2).toUpperCase();
3531
3694
  }
3532
3695
  function Monogram({ name, size = 28 }) {
3533
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3696
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3534
3697
  "span",
3535
3698
  {
3536
3699
  "aria-hidden": "true",
@@ -3541,12 +3704,12 @@ function Monogram({ name, size = 28 }) {
3541
3704
  );
3542
3705
  }
3543
3706
  function BreakdownTag({ children }) {
3544
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "inline-flex items-center whitespace-nowrap rounded-full bg-subtle px-2 py-0.5 text-micro font-medium text-text-secondary", children });
3707
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "inline-flex items-center whitespace-nowrap rounded-full bg-subtle px-2 py-0.5 text-micro font-medium text-text-secondary", children });
3545
3708
  }
3546
3709
  function DelayedTip({ label, children }) {
3547
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "group/dt relative inline-flex", tabIndex: 0, "aria-label": label, children: [
3710
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("span", { className: "group/dt relative inline-flex", tabIndex: 0, "aria-label": label, children: [
3548
3711
  children,
3549
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3712
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3550
3713
  "span",
3551
3714
  {
3552
3715
  role: "tooltip",
@@ -3560,22 +3723,22 @@ var COL_CURRENT = 76;
3560
3723
  var COL_PREVIOUS = 76;
3561
3724
  var COL_YOY = 44;
3562
3725
  function MetricListHeader({ className }) {
3563
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: cn("flex items-baseline gap-2 pb-2", className), children: [
3564
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "flex-1" }),
3565
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "flex shrink-0 items-center gap-2 pr-1.5", children: [
3566
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-right text-micro font-medium text-text-tertiary", style: { width: COL_CURRENT }, children: "Current" }),
3567
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DelayedTip, { label: "Spend during the same time period one year ago.", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-right text-micro font-medium text-text-tertiary", style: { width: COL_PREVIOUS }, children: "Previous" }) }),
3568
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DelayedTip, { label: "Percent change from this time period vs. the same time one year ago.", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-right text-micro font-medium text-text-tertiary", style: { width: COL_YOY }, children: "YoY" }) })
3726
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: cn("flex items-baseline gap-2 pb-2", className), children: [
3727
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "flex-1" }),
3728
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("span", { className: "flex shrink-0 items-center gap-2 pr-1.5", children: [
3729
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-right text-micro font-medium text-text-tertiary", style: { width: COL_CURRENT }, children: "Current" }),
3730
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DelayedTip, { label: "Spend during the same time period one year ago.", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-right text-micro font-medium text-text-tertiary", style: { width: COL_PREVIOUS }, children: "Previous" }) }),
3731
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DelayedTip, { label: "Percent change from this time period vs. the same time one year ago.", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-right text-micro font-medium text-text-tertiary", style: { width: COL_YOY }, children: "YoY" }) })
3569
3732
  ] })
3570
3733
  ] });
3571
3734
  }
3572
3735
  function MetricCells({ spendN, yoy }) {
3573
3736
  const prior = priorYearAmt(spendN, yoy);
3574
3737
  const up = yoy !== "NEW" && yoy >= 0;
3575
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "flex shrink-0 items-center gap-2 pr-1.5", children: [
3576
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-right text-xs font-bold tabular-nums text-text-primary", style: { width: COL_CURRENT }, children: fmtM(spendN) }),
3577
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-right text-xs font-normal tabular-nums text-text-primary", style: { width: COL_PREVIOUS }, children: prior ?? "\u2014" }),
3578
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "flex justify-end", style: { width: COL_YOY }, children: yoy === "NEW" ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "rounded-full bg-status-warning/15 px-1.5 text-badge font-semibold text-text-warning", children: "NEW" }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: cn("text-right text-xs font-semibold tabular-nums", up ? "text-text-success" : "text-text-danger"), children: [
3738
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("span", { className: "flex shrink-0 items-center gap-2 pr-1.5", children: [
3739
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-right text-xs font-bold tabular-nums text-text-primary", style: { width: COL_CURRENT }, children: fmtM(spendN) }),
3740
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-right text-xs font-normal tabular-nums text-text-primary", style: { width: COL_PREVIOUS }, children: prior ?? "\u2014" }),
3741
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "flex justify-end", style: { width: COL_YOY }, children: yoy === "NEW" ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "rounded-full bg-status-warning/15 px-1.5 text-badge font-semibold text-text-warning", children: "NEW" }) : /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("span", { className: cn("text-right text-xs font-semibold tabular-nums", up ? "text-text-success" : "text-text-danger"), children: [
3579
3742
  up ? "+" : "\u2212",
3580
3743
  Math.abs(yoy),
3581
3744
  "%"
@@ -3591,48 +3754,48 @@ function PublisherBreakdownList({
3591
3754
  className,
3592
3755
  testIdPrefix
3593
3756
  }) {
3594
- const [showAll, setShowAll] = (0, import_react14.useState)(false);
3757
+ const [showAll, setShowAll] = (0, import_react16.useState)(false);
3595
3758
  const visible = showAll ? rows : rows.slice(0, defaultVisibleCount);
3596
3759
  const rowPad = padded ? "px-5" : "";
3597
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: cn("flex flex-col", className), "data-testid": testIdPrefix, children: [
3598
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-col", children: [
3599
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(MetricListHeader, { className: rowPad }),
3600
- visible.map((p) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: cn("flex items-center justify-between gap-3 border-t border-border-default/60 py-2.5 first:border-t-0", rowPad), children: [
3601
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex min-w-0 items-center gap-2.5", children: [
3602
- renderLogo ? renderLogo(p) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Monogram, { name: p.brand, size: 28 }),
3603
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "min-w-0", children: [
3604
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-wrap items-center gap-1.5", children: [
3605
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-sm font-semibold text-text-primary", children: p.brand }),
3606
- p.tags.map((t) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(BreakdownTag, { children: t }, t))
3760
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: cn("flex flex-col", className), "data-testid": testIdPrefix, children: [
3761
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-col", children: [
3762
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(MetricListHeader, { className: rowPad }),
3763
+ visible.map((p) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: cn("flex items-center justify-between gap-3 border-t border-border-default/60 py-2.5 first:border-t-0", rowPad), children: [
3764
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex min-w-0 items-center gap-2.5", children: [
3765
+ renderLogo ? renderLogo(p) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Monogram, { name: p.brand, size: 28 }),
3766
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "min-w-0", children: [
3767
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-wrap items-center gap-1.5", children: [
3768
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-sm font-semibold text-text-primary", children: p.brand }),
3769
+ p.tags.map((t) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(BreakdownTag, { children: t }, t))
3607
3770
  ] }),
3608
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "truncate text-micro text-text-tertiary", children: p.owner })
3771
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "truncate text-micro text-text-tertiary", children: p.owner })
3609
3772
  ] })
3610
3773
  ] }),
3611
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(MetricCells, { spendN: p.spendN, yoy: p.yoy })
3774
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(MetricCells, { spendN: p.spendN, yoy: p.yoy })
3612
3775
  ] }, p.brand))
3613
3776
  ] }),
3614
- rows.length > defaultVisibleCount && (viewAllHref ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: cn("border-t border-border-default py-3", rowPad), children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("a", { href: viewAllHref, className: "text-xs font-semibold text-text-link hover:underline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus", children: "See all publishers" }) }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: cn("flex items-center gap-2 border-t border-border-default py-3 text-xs text-text-tertiary", rowPad), children: [
3615
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { children: [
3777
+ rows.length > defaultVisibleCount && (viewAllHref ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: cn("border-t border-border-default py-3", rowPad), children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("a", { href: viewAllHref, className: "text-xs font-semibold text-text-link hover:underline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus", children: "See all publishers" }) }) : /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: cn("flex items-center gap-2 border-t border-border-default py-3 text-xs text-text-tertiary", rowPad), children: [
3778
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("span", { children: [
3616
3779
  "Showing ",
3617
3780
  visible.length,
3618
3781
  " of ",
3619
3782
  rows.length
3620
3783
  ] }),
3621
- !showAll ? /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("button", { type: "button", onClick: () => setShowAll(true), className: "font-semibold text-text-link hover:underline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus", children: [
3784
+ !showAll ? /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("button", { type: "button", onClick: () => setShowAll(true), className: "font-semibold text-text-link hover:underline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus", children: [
3622
3785
  "See all (",
3623
3786
  rows.length - defaultVisibleCount,
3624
3787
  " more)"
3625
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("button", { type: "button", onClick: () => setShowAll(false), className: "font-semibold text-text-link hover:underline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus", children: "Show less" })
3788
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("button", { type: "button", onClick: () => setShowAll(false), className: "font-semibold text-text-link hover:underline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus", children: "Show less" })
3626
3789
  ] }))
3627
3790
  ] });
3628
3791
  }
3629
3792
 
3630
3793
  // src/Button.tsx
3631
- var import_react15 = require("react");
3794
+ var import_react17 = require("react");
3632
3795
  var import_react_slot = require("@radix-ui/react-slot");
3633
3796
  var import_class_variance_authority = require("class-variance-authority");
3634
3797
  var import_lucide_react16 = require("lucide-react");
3635
- var import_jsx_runtime29 = require("react/jsx-runtime");
3798
+ var import_jsx_runtime32 = require("react/jsx-runtime");
3636
3799
  var buttonVariants = (0, import_class_variance_authority.cva)(
3637
3800
  "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-control transition-all duration-(--mr-motion-duration-interactive) ease-interactive disabled:pointer-events-none disabled:opacity-40 focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
3638
3801
  {
@@ -3693,7 +3856,7 @@ var buttonVariants = (0, import_class_variance_authority.cva)(
3693
3856
  }
3694
3857
  }
3695
3858
  );
3696
- var Button = (0, import_react15.forwardRef)(
3859
+ var Button = (0, import_react17.forwardRef)(
3697
3860
  ({ className, testIdPrefix, variant, size, iconOnly, asChild = false, loading = false, disabled, children, ...props }, ref) => {
3698
3861
  const shared = {
3699
3862
  className: cn(buttonVariants({ variant, size, iconOnly, className })),
@@ -3703,10 +3866,10 @@ var Button = (0, import_react15.forwardRef)(
3703
3866
  ...props
3704
3867
  };
3705
3868
  if (asChild) {
3706
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_slot.Slot, { ref, ...shared, children });
3869
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_slot.Slot, { ref, ...shared, children });
3707
3870
  }
3708
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("button", { ref, ...shared, children: [
3709
- loading && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react16.Loader2, { className: "size-4 shrink-0 animate-spin", "aria-hidden": "true" }),
3871
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("button", { ref, ...shared, children: [
3872
+ loading && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react16.Loader2, { className: "size-4 shrink-0 animate-spin", "aria-hidden": "true" }),
3710
3873
  children
3711
3874
  ] });
3712
3875
  }
@@ -3714,7 +3877,7 @@ var Button = (0, import_react15.forwardRef)(
3714
3877
  Button.displayName = "Button";
3715
3878
 
3716
3879
  // src/FilterDropdownFooter.tsx
3717
- var import_jsx_runtime30 = require("react/jsx-runtime");
3880
+ var import_jsx_runtime33 = require("react/jsx-runtime");
3718
3881
  function FilterDropdownFooter({
3719
3882
  onClear,
3720
3883
  onApply,
@@ -3723,7 +3886,7 @@ function FilterDropdownFooter({
3723
3886
  className,
3724
3887
  testIdPrefix
3725
3888
  }) {
3726
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
3889
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
3727
3890
  "div",
3728
3891
  {
3729
3892
  className: cn(
@@ -3733,17 +3896,17 @@ function FilterDropdownFooter({
3733
3896
  ),
3734
3897
  "data-testid": testIdPrefix,
3735
3898
  children: [
3736
- onClear && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Button, { type: "button", variant: "ghost", size: "sm", onClick: onClear, children: clearLabel }),
3737
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Button, { type: "button", variant: "primary", size: "sm", onClick: onApply, children: applyLabel })
3899
+ onClear && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Button, { type: "button", variant: "ghost", size: "sm", onClick: onClear, children: clearLabel }),
3900
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Button, { type: "button", variant: "primary", size: "sm", onClick: onApply, children: applyLabel })
3738
3901
  ]
3739
3902
  }
3740
3903
  );
3741
3904
  }
3742
3905
 
3743
3906
  // src/NameListModal.tsx
3744
- var import_react16 = require("react");
3907
+ var import_react18 = require("react");
3745
3908
  var import_react_dom5 = require("react-dom");
3746
- var import_jsx_runtime31 = require("react/jsx-runtime");
3909
+ var import_jsx_runtime34 = require("react/jsx-runtime");
3747
3910
  function NameListModal({
3748
3911
  title,
3749
3912
  initialName,
@@ -3756,21 +3919,21 @@ function NameListModal({
3756
3919
  className,
3757
3920
  testIdPrefix
3758
3921
  }) {
3759
- const [name, setName] = (0, import_react16.useState)(initialName);
3760
- const [checked, setChecked] = (0, import_react16.useState)(
3922
+ const [name, setName] = (0, import_react18.useState)(initialName);
3923
+ const [checked, setChecked] = (0, import_react18.useState)(
3761
3924
  () => Object.fromEntries((options ?? []).map((o) => [o.key, !!o.initial]))
3762
3925
  );
3763
3926
  const toggle = (key) => setChecked((c) => ({ ...c, [key]: !c[key] }));
3764
- const dialogRef = (0, import_react16.useRef)(null);
3765
- const titleId = (0, import_react16.useId)();
3766
- const fieldId = (0, import_react16.useId)();
3767
- (0, import_react16.useEffect)(() => {
3927
+ const dialogRef = (0, import_react18.useRef)(null);
3928
+ const titleId = (0, import_react18.useId)();
3929
+ const fieldId = (0, import_react18.useId)();
3930
+ (0, import_react18.useEffect)(() => {
3768
3931
  const onKey = (e) => e.key === "Escape" && onCancel();
3769
3932
  window.addEventListener("keydown", onKey);
3770
3933
  return () => window.removeEventListener("keydown", onKey);
3771
3934
  }, [onCancel]);
3772
- const [opener] = (0, import_react16.useState)(() => typeof document === "undefined" ? null : document.activeElement);
3773
- (0, import_react16.useEffect)(
3935
+ const [opener] = (0, import_react18.useState)(() => typeof document === "undefined" ? null : document.activeElement);
3936
+ (0, import_react18.useEffect)(
3774
3937
  () => () => {
3775
3938
  const active = document.activeElement;
3776
3939
  if (!active || active === document.body) opener?.focus?.();
@@ -3797,12 +3960,12 @@ function NameListModal({
3797
3960
  // bg-scrim, not a literal: design-tokens gained a scrim token in 2.5.0.
3798
3961
  // No in-data-[theme=dark] override needed any more -- the token redefines
3799
3962
  // itself under that attribute in dark.css, so one class covers both themes.
3800
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3963
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
3801
3964
  "div",
3802
3965
  {
3803
3966
  className: "fixed inset-0 z-modal flex items-center justify-center bg-scrim px-4",
3804
3967
  onMouseDown: (e) => e.target === e.currentTarget && onCancel(),
3805
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
3968
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
3806
3969
  "div",
3807
3970
  {
3808
3971
  ref: dialogRef,
@@ -3813,10 +3976,10 @@ function NameListModal({
3813
3976
  "data-testid": testIdPrefix,
3814
3977
  className: cn("w-full max-w-110 rounded-card border border-border-default bg-surface p-5 shadow-overlay", className),
3815
3978
  children: [
3816
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("h2", { id: titleId, className: "text-base font-semibold text-text-primary", children: title }),
3817
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "mt-4 flex flex-col gap-1.5", children: [
3818
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("label", { htmlFor: fieldId, className: "text-xs font-medium text-text-secondary", children: fieldLabel }),
3819
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3979
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("h2", { id: titleId, className: "text-base font-semibold text-text-primary", children: title }),
3980
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "mt-4 flex flex-col gap-1.5", children: [
3981
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("label", { htmlFor: fieldId, className: "text-xs font-medium text-text-secondary", children: fieldLabel }),
3982
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
3820
3983
  "input",
3821
3984
  {
3822
3985
  id: fieldId,
@@ -3828,13 +3991,13 @@ function NameListModal({
3828
3991
  }
3829
3992
  )
3830
3993
  ] }),
3831
- options && options.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "mt-4 flex flex-col gap-2.5", children: options.map((o) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("label", { className: "flex cursor-pointer items-center gap-2.5 text-dense text-text-primary", children: [
3832
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CheckBox, { checked: !!checked[o.key], onChange: () => toggle(o.key), ariaLabel: o.label }),
3994
+ options && options.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "mt-4 flex flex-col gap-2.5", children: options.map((o) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("label", { className: "flex cursor-pointer items-center gap-2.5 text-dense text-text-primary", children: [
3995
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(CheckBox, { checked: !!checked[o.key], onChange: () => toggle(o.key), ariaLabel: o.label }),
3833
3996
  o.label
3834
3997
  ] }, o.key)) }),
3835
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "mt-5 flex items-center justify-end gap-2", children: [
3836
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Button, { variant: "secondary", onClick: onCancel, children: "Cancel" }),
3837
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Button, { disabled: !name.trim(), onClick: () => onSubmit(name.trim(), checked), children: submitLabel })
3998
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "mt-5 flex items-center justify-end gap-2", children: [
3999
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Button, { variant: "secondary", onClick: onCancel, children: "Cancel" }),
4000
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Button, { disabled: !name.trim(), onClick: () => onSubmit(name.trim(), checked), children: submitLabel })
3838
4001
  ] })
3839
4002
  ]
3840
4003
  }
@@ -3847,11 +4010,11 @@ function NameListModal({
3847
4010
 
3848
4011
  // src/FilterChipBar.tsx
3849
4012
  var import_lucide_react17 = require("lucide-react");
3850
- var import_jsx_runtime32 = require("react/jsx-runtime");
4013
+ var import_jsx_runtime35 = require("react/jsx-runtime");
3851
4014
  function FilterChipBar({ chips, onRemove, onClearAll, parkedKeys, className, testIdPrefix }) {
3852
4015
  if (chips.length === 0) return null;
3853
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: cn("flex flex-wrap items-center gap-1.5 border-t border-border-default pt-2.5", className), "data-testid": testIdPrefix, children: [
3854
- chips.map((c) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4016
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: cn("flex flex-wrap items-center gap-1.5 border-t border-border-default pt-2.5", className), "data-testid": testIdPrefix, children: [
4017
+ chips.map((c) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3855
4018
  Chip,
3856
4019
  {
3857
4020
  label: c.label,
@@ -3861,7 +4024,7 @@ function FilterChipBar({ chips, onRemove, onClearAll, parkedKeys, className, tes
3861
4024
  },
3862
4025
  c.key
3863
4026
  )),
3864
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4027
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3865
4028
  "button",
3866
4029
  {
3867
4030
  type: "button",
@@ -3878,8 +4041,8 @@ function Chip({
3878
4041
  parked,
3879
4042
  onRemove
3880
4043
  }) {
3881
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { className: "group relative inline-flex", children: [
3882
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
4044
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "group relative inline-flex", children: [
4045
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
3883
4046
  "span",
3884
4047
  {
3885
4048
  className: cn(
@@ -3891,22 +4054,22 @@ function Chip({
3891
4054
  ) : "bg-subtle text-text-secondary ring-transparent group-hover:bg-border-default group-hover:text-text-primary group-hover:ring-border-interactive"
3892
4055
  ),
3893
4056
  children: [
3894
- parked && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react17.CircleSlash, { size: 11, "aria-hidden": "true", className: "shrink-0 text-text-tertiary" }),
4057
+ parked && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react17.CircleSlash, { size: 11, "aria-hidden": "true", className: "shrink-0 text-text-tertiary" }),
3895
4058
  label,
3896
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4059
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3897
4060
  "button",
3898
4061
  {
3899
4062
  type: "button",
3900
4063
  onClick: onRemove,
3901
4064
  "aria-label": `Remove ${groupLabel}: ${label}`,
3902
4065
  className: "rounded-full text-text-tertiary transition-colors hover:text-text-primary focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
3903
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react17.X, { size: 12 })
4066
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react17.X, { size: 12 })
3904
4067
  }
3905
4068
  )
3906
4069
  ]
3907
4070
  }
3908
4071
  ),
3909
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4072
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3910
4073
  "span",
3911
4074
  {
3912
4075
  role: "tooltip",
@@ -3918,15 +4081,15 @@ function Chip({
3918
4081
  }
3919
4082
 
3920
4083
  // src/SortButton.tsx
3921
- var import_react17 = require("react");
4084
+ var import_react19 = require("react");
3922
4085
  var import_lucide_react18 = require("lucide-react");
3923
- var import_jsx_runtime33 = require("react/jsx-runtime");
4086
+ var import_jsx_runtime36 = require("react/jsx-runtime");
3924
4087
  var ALIGN = {
3925
4088
  left: "justify-start text-left",
3926
4089
  center: "justify-center text-center",
3927
4090
  right: "justify-end text-right"
3928
4091
  };
3929
- var SortButton = (0, import_react17.forwardRef)(
4092
+ var SortButton = (0, import_react19.forwardRef)(
3930
4093
  function SortButton2({
3931
4094
  label,
3932
4095
  sortKey,
@@ -3938,9 +4101,9 @@ var SortButton = (0, import_react17.forwardRef)(
3938
4101
  className,
3939
4102
  testIdPrefix
3940
4103
  }, ref) {
3941
- if (!sortable) return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: cn("inline-flex", ALIGN[align], className), children: label });
4104
+ if (!sortable) return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: cn("inline-flex", ALIGN[align], className), children: label });
3942
4105
  const active = !disabled && sort.key === sortKey;
3943
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
4106
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
3944
4107
  "button",
3945
4108
  {
3946
4109
  ref,
@@ -3971,7 +4134,7 @@ var SortButton = (0, import_react17.forwardRef)(
3971
4134
  ),
3972
4135
  children: [
3973
4136
  label,
3974
- !disabled && (active ? sort.dir === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react18.ArrowUp, { size: 12, "aria-hidden": "true", className: "shrink-0 text-brand-primaryAction" }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react18.ArrowDown, { size: 12, "aria-hidden": "true", className: "shrink-0 text-brand-primaryAction" }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4137
+ !disabled && (active ? sort.dir === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react18.ArrowUp, { size: 12, "aria-hidden": "true", className: "shrink-0 text-brand-primaryAction" }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react18.ArrowDown, { size: 12, "aria-hidden": "true", className: "shrink-0 text-brand-primaryAction" }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3975
4138
  import_lucide_react18.ArrowUpDown,
3976
4139
  {
3977
4140
  size: 12,
@@ -4002,7 +4165,7 @@ function ariaSortFor(sort, key) {
4002
4165
 
4003
4166
  // src/Pager.tsx
4004
4167
  var import_lucide_react19 = require("lucide-react");
4005
- var import_jsx_runtime34 = require("react/jsx-runtime");
4168
+ var import_jsx_runtime37 = require("react/jsx-runtime");
4006
4169
  function pageWindow(current, total) {
4007
4170
  if (total <= 7) return Array.from({ length: total }, (_, i) => i + 1);
4008
4171
  const keep = /* @__PURE__ */ new Set([1, total, current, current - 1, current + 1]);
@@ -4018,8 +4181,8 @@ function pageWindow(current, total) {
4018
4181
  }
4019
4182
  function Pager({ page, totalPages, onPage, disabled = false, label = "Pagination", className, testIdPrefix }) {
4020
4183
  const btn = "flex h-8 min-w-8 items-center justify-center rounded-control px-2 text-dense transition-colors disabled:pointer-events-none disabled:opacity-30 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus";
4021
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("nav", { "aria-label": label, className: cn("flex items-center gap-1", className), "data-testid": testIdPrefix, children: [
4022
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4184
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("nav", { "aria-label": label, className: cn("flex items-center gap-1", className), "data-testid": testIdPrefix, children: [
4185
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
4023
4186
  "button",
4024
4187
  {
4025
4188
  type: "button",
@@ -4027,11 +4190,11 @@ function Pager({ page, totalPages, onPage, disabled = false, label = "Pagination
4027
4190
  disabled: disabled || page === 1,
4028
4191
  "aria-label": "Previous page",
4029
4192
  className: cn(btn, "text-text-secondary hover:bg-subtle hover:text-text-primary"),
4030
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react19.ChevronLeft, { size: 16 })
4193
+ children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react19.ChevronLeft, { size: 16 })
4031
4194
  }
4032
4195
  ),
4033
4196
  pageWindow(page, totalPages).map(
4034
- (p) => typeof p === "string" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "px-1 text-dense text-text-tertiary", children: "\u2026" }, p) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4197
+ (p) => typeof p === "string" ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "px-1 text-dense text-text-tertiary", children: "\u2026" }, p) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
4035
4198
  "button",
4036
4199
  {
4037
4200
  type: "button",
@@ -4047,7 +4210,7 @@ function Pager({ page, totalPages, onPage, disabled = false, label = "Pagination
4047
4210
  p
4048
4211
  )
4049
4212
  ),
4050
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4213
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
4051
4214
  "button",
4052
4215
  {
4053
4216
  type: "button",
@@ -4055,14 +4218,14 @@ function Pager({ page, totalPages, onPage, disabled = false, label = "Pagination
4055
4218
  disabled: disabled || page === totalPages,
4056
4219
  "aria-label": "Next page",
4057
4220
  className: cn(btn, "text-text-secondary hover:bg-subtle hover:text-text-primary"),
4058
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react19.ChevronRight, { size: 16 })
4221
+ children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react19.ChevronRight, { size: 16 })
4059
4222
  }
4060
4223
  )
4061
4224
  ] });
4062
4225
  }
4063
4226
 
4064
4227
  // src/WorkspaceAvatar.tsx
4065
- var import_jsx_runtime35 = require("react/jsx-runtime");
4228
+ var import_jsx_runtime38 = require("react/jsx-runtime");
4066
4229
  function workspaceInitials(name) {
4067
4230
  const words = name.trim().split(/\s+/).filter(Boolean);
4068
4231
  if (words.length === 0) return "\xB7";
@@ -4081,7 +4244,7 @@ var SIZES = {
4081
4244
  lg: "h-11 w-11 text-panel-title"
4082
4245
  };
4083
4246
  function WorkspaceAvatar({ name, size = "md", className, testIdPrefix }) {
4084
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4247
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
4085
4248
  "span",
4086
4249
  {
4087
4250
  "aria-hidden": "true",
@@ -4097,20 +4260,20 @@ function WorkspaceAvatar({ name, size = "md", className, testIdPrefix }) {
4097
4260
  }
4098
4261
 
4099
4262
  // src/Toast.tsx
4100
- var import_react18 = require("react");
4263
+ var import_react20 = require("react");
4101
4264
  var import_react_dom6 = require("react-dom");
4102
4265
  var import_lucide_react20 = require("lucide-react");
4103
- var import_jsx_runtime36 = require("react/jsx-runtime");
4266
+ var import_jsx_runtime39 = require("react/jsx-runtime");
4104
4267
  var ICON = {
4105
4268
  neutral: null,
4106
- success: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react20.Check, { size: 15, className: "shrink-0", "aria-hidden": "true" }),
4107
- warning: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react20.AlertTriangle, { size: 15, className: "shrink-0", "aria-hidden": "true" })
4269
+ success: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react20.Check, { size: 15, className: "shrink-0", "aria-hidden": "true" }),
4270
+ warning: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react20.AlertTriangle, { size: 15, className: "shrink-0", "aria-hidden": "true" })
4108
4271
  };
4109
4272
  function Toast({ message, action, onClose, tone = "neutral", duration, className, testIdPrefix }) {
4110
4273
  const ms = duration ?? (action ? 1e4 : 5e3);
4111
- const [paused, setPaused] = (0, import_react18.useState)(false);
4112
- const closed = (0, import_react18.useRef)(false);
4113
- (0, import_react18.useEffect)(() => {
4274
+ const [paused, setPaused] = (0, import_react20.useState)(false);
4275
+ const closed = (0, import_react20.useRef)(false);
4276
+ (0, import_react20.useEffect)(() => {
4114
4277
  if (paused) return;
4115
4278
  const t = window.setTimeout(() => {
4116
4279
  if (closed.current) return;
@@ -4120,7 +4283,7 @@ function Toast({ message, action, onClose, tone = "neutral", duration, className
4120
4283
  return () => window.clearTimeout(t);
4121
4284
  }, [message, ms, paused]);
4122
4285
  return (0, import_react_dom6.createPortal)(
4123
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
4286
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
4124
4287
  "div",
4125
4288
  {
4126
4289
  role: "status",
@@ -4138,7 +4301,7 @@ function Toast({ message, action, onClose, tone = "neutral", duration, className
4138
4301
  children: [
4139
4302
  ICON[tone] && // The inverse pair, not text-success / text-warning: those are tuned
4140
4303
  // for the page, and on the toast's flipped surface amber drops to 2:1.
4141
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
4304
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4142
4305
  "span",
4143
4306
  {
4144
4307
  className: cn(
@@ -4148,8 +4311,8 @@ function Toast({ message, action, onClose, tone = "neutral", duration, className
4148
4311
  children: ICON[tone]
4149
4312
  }
4150
4313
  ),
4151
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "min-w-0", children: message }),
4152
- action && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
4314
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "min-w-0", children: message }),
4315
+ action && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4153
4316
  "button",
4154
4317
  {
4155
4318
  type: "button",
@@ -4171,14 +4334,14 @@ function Toast({ message, action, onClose, tone = "neutral", duration, className
4171
4334
  }
4172
4335
 
4173
4336
  // src/Tag.tsx
4174
- var import_jsx_runtime37 = require("react/jsx-runtime");
4337
+ var import_jsx_runtime40 = require("react/jsx-runtime");
4175
4338
  function Tag({ children, className, testIdPrefix }) {
4176
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Badge, { kind: "category", className, testIdPrefix, children });
4339
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Badge, { kind: "category", className, testIdPrefix, children });
4177
4340
  }
4178
4341
 
4179
4342
  // src/TablePagination.tsx
4180
4343
  var import_lucide_react21 = require("lucide-react");
4181
- var import_jsx_runtime38 = require("react/jsx-runtime");
4344
+ var import_jsx_runtime41 = require("react/jsx-runtime");
4182
4345
  function TablePagination({
4183
4346
  page,
4184
4347
  perPage,
@@ -4198,7 +4361,7 @@ function TablePagination({
4198
4361
  const btn = "flex h-8 min-w-8 items-center justify-center rounded-control px-2 text-dense transition-colors focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus";
4199
4362
  const off = "disabled:pointer-events-none disabled:opacity-30";
4200
4363
  const stepBtn = cn(btn, "text-text-secondary hover:bg-subtle hover:text-text-primary", off);
4201
- const range = /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: "text-dense text-text-tertiary tabular-nums", children: [
4364
+ const range = /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("span", { className: "text-dense text-text-tertiary tabular-nums", children: [
4202
4365
  rangeStart.toLocaleString(),
4203
4366
  " \u2013 ",
4204
4367
  rangeEnd.toLocaleString(),
@@ -4207,13 +4370,13 @@ function TablePagination({
4207
4370
  " ",
4208
4371
  itemLabel
4209
4372
  ] });
4210
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: cn("flex flex-wrap items-center justify-between gap-x-4 gap-y-2", className), "data-testid": testIdPrefix, children: [
4211
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
4373
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: cn("flex flex-wrap items-center justify-between gap-x-4 gap-y-2", className), "data-testid": testIdPrefix, children: [
4374
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
4212
4375
  "div",
4213
4376
  {
4214
4377
  className: cn("flex items-center gap-2 text-dense text-text-secondary", !onPerPageChange && "invisible"),
4215
4378
  children: [
4216
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
4379
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4217
4380
  SelectFilter,
4218
4381
  {
4219
4382
  size: "sm",
@@ -4229,8 +4392,8 @@ function TablePagination({
4229
4392
  ]
4230
4393
  }
4231
4394
  ),
4232
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("nav", { className: "flex items-center gap-1", "aria-label": "Pagination", children: [
4233
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
4395
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("nav", { className: "flex items-center gap-1", "aria-label": "Pagination", children: [
4396
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4234
4397
  "button",
4235
4398
  {
4236
4399
  type: "button",
@@ -4239,10 +4402,10 @@ function TablePagination({
4239
4402
  "aria-label": "First page",
4240
4403
  "data-testid": testIdPrefix && `${testIdPrefix}-first`,
4241
4404
  className: stepBtn,
4242
- children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react21.ChevronFirst, { size: 16, "aria-hidden": "true" })
4405
+ children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react21.ChevronFirst, { size: 16, "aria-hidden": "true" })
4243
4406
  }
4244
4407
  ),
4245
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
4408
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4246
4409
  "button",
4247
4410
  {
4248
4411
  type: "button",
@@ -4251,11 +4414,11 @@ function TablePagination({
4251
4414
  "aria-label": "Previous page",
4252
4415
  "data-testid": testIdPrefix && `${testIdPrefix}-prev`,
4253
4416
  className: stepBtn,
4254
- children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react21.ChevronLeft, { size: 16, "aria-hidden": "true" })
4417
+ children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react21.ChevronLeft, { size: 16, "aria-hidden": "true" })
4255
4418
  }
4256
4419
  ),
4257
4420
  pageWindow(current, totalPages).map(
4258
- (p) => typeof p === "string" ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "px-1 text-dense text-text-tertiary", children: "\u2026" }, p) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
4421
+ (p) => typeof p === "string" ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "px-1 text-dense text-text-tertiary", children: "\u2026" }, p) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4259
4422
  "button",
4260
4423
  {
4261
4424
  type: "button",
@@ -4273,7 +4436,7 @@ function TablePagination({
4273
4436
  p
4274
4437
  )
4275
4438
  ),
4276
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
4439
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4277
4440
  "button",
4278
4441
  {
4279
4442
  type: "button",
@@ -4282,10 +4445,10 @@ function TablePagination({
4282
4445
  "aria-label": "Next page",
4283
4446
  "data-testid": testIdPrefix && `${testIdPrefix}-next`,
4284
4447
  className: stepBtn,
4285
- children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react21.ChevronRight, { size: 16, "aria-hidden": "true" })
4448
+ children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react21.ChevronRight, { size: 16, "aria-hidden": "true" })
4286
4449
  }
4287
4450
  ),
4288
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
4451
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4289
4452
  "button",
4290
4453
  {
4291
4454
  type: "button",
@@ -4294,7 +4457,7 @@ function TablePagination({
4294
4457
  "aria-label": "Last page",
4295
4458
  "data-testid": testIdPrefix && `${testIdPrefix}-last`,
4296
4459
  className: stepBtn,
4297
- children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react21.ChevronLast, { size: 16, "aria-hidden": "true" })
4460
+ children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react21.ChevronLast, { size: 16, "aria-hidden": "true" })
4298
4461
  }
4299
4462
  )
4300
4463
  ] }),
@@ -4303,9 +4466,9 @@ function TablePagination({
4303
4466
  }
4304
4467
 
4305
4468
  // src/DateRangePicker.tsx
4306
- var import_react19 = require("react");
4469
+ var import_react21 = require("react");
4307
4470
  var import_lucide_react22 = require("lucide-react");
4308
- var import_jsx_runtime39 = require("react/jsx-runtime");
4471
+ var import_jsx_runtime42 = require("react/jsx-runtime");
4309
4472
  var MONTH_ABBR = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
4310
4473
  var QUARTER_ABBR = ["Q1", "Q2", "Q3", "Q4"];
4311
4474
  var PRESETS = ["Rolling 3 months", "Rolling 6 months", "Rolling 12 months"];
@@ -4343,7 +4506,7 @@ function spanLabel2(label, today, formatDate, formatRange) {
4343
4506
  return `${f(s)} \u2013 ${f(e)}`;
4344
4507
  }
4345
4508
  function MiniSelect({ value, onChange, options }) {
4346
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4509
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
4347
4510
  "select",
4348
4511
  {
4349
4512
  value: String(value),
@@ -4352,7 +4515,7 @@ function MiniSelect({ value, onChange, options }) {
4352
4515
  if (opt) onChange(opt.value);
4353
4516
  },
4354
4517
  className: "rounded-control border border-border-strong bg-input px-1.5 py-1 text-xs text-text-primary focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
4355
- children: options.map((o) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("option", { value: String(o.value), children: o.label }, String(o.value)))
4518
+ children: options.map((o) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("option", { value: String(o.value), children: o.label }, String(o.value)))
4356
4519
  }
4357
4520
  );
4358
4521
  }
@@ -4371,19 +4534,19 @@ function DateRangePicker({
4371
4534
  className,
4372
4535
  testIdPrefix
4373
4536
  }) {
4374
- const end = (0, import_react19.useMemo)(() => today ?? startOfToday(), [today]);
4537
+ const end = (0, import_react21.useMemo)(() => today ?? startOfToday(), [today]);
4375
4538
  const yearOptions = years ?? [3, 2, 1, 0].map((n) => end.getFullYear() - n);
4376
- const [open, setOpen] = (0, import_react19.useState)(false);
4377
- const [value, setValue] = (0, import_react19.useState)(defaultValue);
4378
- const [draft, setDraft] = (0, import_react19.useState)(defaultValue);
4379
- const ref = (0, import_react19.useRef)(null);
4380
- const [fromMo, setFromMo] = (0, import_react19.useState)(end.getMonth());
4381
- const [fromYr, setFromYr] = (0, import_react19.useState)(end.getFullYear() - 1);
4382
- const [toMo, setToMo] = (0, import_react19.useState)(end.getMonth());
4383
- const [toYr, setToYr] = (0, import_react19.useState)(end.getFullYear());
4384
- const [fromQ, setFromQ] = (0, import_react19.useState)(Math.floor(end.getMonth() / 3));
4385
- const [toQ, setToQ] = (0, import_react19.useState)(Math.floor(end.getMonth() / 3));
4386
- (0, import_react19.useEffect)(() => {
4539
+ const [open, setOpen] = (0, import_react21.useState)(false);
4540
+ const [value, setValue] = (0, import_react21.useState)(defaultValue);
4541
+ const [draft, setDraft] = (0, import_react21.useState)(defaultValue);
4542
+ const ref = (0, import_react21.useRef)(null);
4543
+ const [fromMo, setFromMo] = (0, import_react21.useState)(end.getMonth());
4544
+ const [fromYr, setFromYr] = (0, import_react21.useState)(end.getFullYear() - 1);
4545
+ const [toMo, setToMo] = (0, import_react21.useState)(end.getMonth());
4546
+ const [toYr, setToYr] = (0, import_react21.useState)(end.getFullYear());
4547
+ const [fromQ, setFromQ] = (0, import_react21.useState)(Math.floor(end.getMonth() / 3));
4548
+ const [toQ, setToQ] = (0, import_react21.useState)(Math.floor(end.getMonth() / 3));
4549
+ (0, import_react21.useEffect)(() => {
4387
4550
  const [s, e] = resolveRange(value, end);
4388
4551
  onRangeChange?.(s, e);
4389
4552
  }, [value]);
@@ -4391,7 +4554,7 @@ function DateRangePicker({
4391
4554
  if (!open) setDraft(value);
4392
4555
  setOpen((o) => !o);
4393
4556
  };
4394
- (0, import_react19.useEffect)(() => {
4557
+ (0, import_react21.useEffect)(() => {
4395
4558
  if (!open) return;
4396
4559
  const onDown = (e) => {
4397
4560
  if (ref.current && !ref.current.contains(e.target)) setOpen(false);
@@ -4417,8 +4580,8 @@ function DateRangePicker({
4417
4580
  if (showFooter) setDraft(label);
4418
4581
  else commit(label);
4419
4582
  };
4420
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: cn("relative", className), ref, "data-testid": testIdPrefix, children: [
4421
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
4583
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: cn("relative", className), ref, "data-testid": testIdPrefix, children: [
4584
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
4422
4585
  "button",
4423
4586
  {
4424
4587
  type: "button",
@@ -4427,16 +4590,16 @@ function DateRangePicker({
4427
4590
  "aria-haspopup": "listbox",
4428
4591
  className: chipTriggerClass(),
4429
4592
  children: [
4430
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "flex flex-col gap-1 text-left leading-none", children: [
4431
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "text-control-caption leading-none text-text-tertiary", children: spanLabel2(value, end, formatDate, formatRange) }),
4432
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "text-xs leading-none font-medium text-text-primary", children: value })
4593
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { className: "flex flex-col gap-1 text-left leading-none", children: [
4594
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-control-caption leading-none text-text-tertiary", children: spanLabel2(value, end, formatDate, formatRange) }),
4595
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-xs leading-none font-medium text-text-primary", children: value })
4433
4596
  ] }),
4434
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react22.ChevronDown, { size: 14, "aria-hidden": "true", className: cn("shrink-0 text-text-secondary transition-transform", open && "rotate-180") })
4597
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react22.ChevronDown, { size: 14, "aria-hidden": "true", className: cn("shrink-0 text-text-secondary transition-transform", open && "rotate-180") })
4435
4598
  ]
4436
4599
  }
4437
4600
  ),
4438
- open && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: cn("absolute top-full mt-2 z-30 w-70 overflow-hidden rounded-card border border-border-default bg-surface py-1 shadow-overlay", align === "right" ? "right-0" : "left-0"), children: [
4439
- presets.map((p) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4601
+ open && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: cn("absolute top-full mt-2 z-30 w-70 overflow-hidden rounded-card border border-border-default bg-surface py-1 shadow-overlay", align === "right" ? "right-0" : "left-0"), children: [
4602
+ presets.map((p) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
4440
4603
  "button",
4441
4604
  {
4442
4605
  type: "button",
@@ -4446,26 +4609,26 @@ function DateRangePicker({
4446
4609
  },
4447
4610
  p
4448
4611
  )),
4449
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "mt-1 border-t border-border-default px-3 pb-2 pt-2", children: [
4450
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "text-dense font-semibold text-text-primary", children: "Custom range" }),
4451
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "mt-2 flex flex-col gap-2", children: [
4452
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("label", { className: "flex items-center justify-between gap-2 text-xs text-text-secondary", children: [
4612
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "mt-1 border-t border-border-default px-3 pb-2 pt-2", children: [
4613
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "text-dense font-semibold text-text-primary", children: "Custom range" }),
4614
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "mt-2 flex flex-col gap-2", children: [
4615
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("label", { className: "flex items-center justify-between gap-2 text-xs text-text-secondary", children: [
4453
4616
  "From",
4454
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "flex gap-1", children: [
4455
- granularity === "month" && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(MiniSelect, { value: fromMo, onChange: setFromMo, options: MONTH_ABBR.map((mm, i) => ({ label: mm, value: i })) }),
4456
- granularity === "quarter" && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(MiniSelect, { value: fromQ, onChange: setFromQ, options: QUARTER_ABBR.map((qq, i) => ({ label: qq, value: i })) }),
4457
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(MiniSelect, { value: fromYr, onChange: setFromYr, options: yearOptions.map((y) => ({ label: String(y), value: y })) })
4617
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { className: "flex gap-1", children: [
4618
+ granularity === "month" && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(MiniSelect, { value: fromMo, onChange: setFromMo, options: MONTH_ABBR.map((mm, i) => ({ label: mm, value: i })) }),
4619
+ granularity === "quarter" && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(MiniSelect, { value: fromQ, onChange: setFromQ, options: QUARTER_ABBR.map((qq, i) => ({ label: qq, value: i })) }),
4620
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(MiniSelect, { value: fromYr, onChange: setFromYr, options: yearOptions.map((y) => ({ label: String(y), value: y })) })
4458
4621
  ] })
4459
4622
  ] }),
4460
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("label", { className: "flex items-center justify-between gap-2 text-xs text-text-secondary", children: [
4623
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("label", { className: "flex items-center justify-between gap-2 text-xs text-text-secondary", children: [
4461
4624
  "To",
4462
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "flex gap-1", children: [
4463
- granularity === "month" && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(MiniSelect, { value: toMo, onChange: setToMo, options: MONTH_ABBR.map((mm, i) => ({ label: mm, value: i })) }),
4464
- granularity === "quarter" && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(MiniSelect, { value: toQ, onChange: setToQ, options: QUARTER_ABBR.map((qq, i) => ({ label: qq, value: i })) }),
4465
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(MiniSelect, { value: toYr, onChange: setToYr, options: yearOptions.map((y) => ({ label: String(y), value: y })) })
4625
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { className: "flex gap-1", children: [
4626
+ granularity === "month" && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(MiniSelect, { value: toMo, onChange: setToMo, options: MONTH_ABBR.map((mm, i) => ({ label: mm, value: i })) }),
4627
+ granularity === "quarter" && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(MiniSelect, { value: toQ, onChange: setToQ, options: QUARTER_ABBR.map((qq, i) => ({ label: qq, value: i })) }),
4628
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(MiniSelect, { value: toYr, onChange: setToYr, options: yearOptions.map((y) => ({ label: String(y), value: y })) })
4466
4629
  ] })
4467
4630
  ] }),
4468
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4631
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
4469
4632
  "button",
4470
4633
  {
4471
4634
  type: "button",
@@ -4477,15 +4640,15 @@ function DateRangePicker({
4477
4640
  )
4478
4641
  ] })
4479
4642
  ] }),
4480
- showFooter && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(FilterDropdownFooter, { onApply: () => commit(draft) })
4643
+ showFooter && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(FilterDropdownFooter, { onApply: () => commit(draft) })
4481
4644
  ] })
4482
4645
  ] });
4483
4646
  }
4484
4647
 
4485
4648
  // src/MultiSelectFilter.tsx
4486
- var import_react20 = require("react");
4649
+ var import_react22 = require("react");
4487
4650
  var import_lucide_react23 = require("lucide-react");
4488
- var import_jsx_runtime40 = require("react/jsx-runtime");
4651
+ var import_jsx_runtime43 = require("react/jsx-runtime");
4489
4652
  var SEARCH_AFTER = 8;
4490
4653
  function MultiSelectFilter({
4491
4654
  caption,
@@ -4519,11 +4682,11 @@ function MultiSelectFilter({
4519
4682
  const groupLeaves = (g) => g.children.length ? g.children : [{ id: g.id, label: g.label }];
4520
4683
  const leafOptions = groups ? groups.flatMap(groupLeaves) : options;
4521
4684
  const showSearch = searchable ?? leafOptions.length > SEARCH_AFTER;
4522
- const [open, setOpen] = (0, import_react20.useState)(false);
4523
- const [q, setQ] = (0, import_react20.useState)("");
4524
- const [draft, setDraft] = (0, import_react20.useState)(selected);
4525
- const ref = (0, import_react20.useRef)(null);
4526
- const close = (0, import_react20.useCallback)(() => {
4685
+ const [open, setOpen] = (0, import_react22.useState)(false);
4686
+ const [q, setQ] = (0, import_react22.useState)("");
4687
+ const [draft, setDraft] = (0, import_react22.useState)(selected);
4688
+ const ref = (0, import_react22.useRef)(null);
4689
+ const close = (0, import_react22.useCallback)(() => {
4527
4690
  setOpen(false);
4528
4691
  setQ("");
4529
4692
  if (showFooter) return;
@@ -4546,7 +4709,7 @@ function MultiSelectFilter({
4546
4709
  setOpen(false);
4547
4710
  setQ("");
4548
4711
  };
4549
- (0, import_react20.useEffect)(() => {
4712
+ (0, import_react22.useEffect)(() => {
4550
4713
  if (!open) return;
4551
4714
  const onKey = (e) => e.key === "Escape" && close();
4552
4715
  const onClick = (e) => {
@@ -4583,9 +4746,9 @@ function MultiSelectFilter({
4583
4746
  const shown = open && !showFooter ? draft : selected;
4584
4747
  const isAll = shown.length === 0 || fullIsAll && shown.length === leafOptions.length;
4585
4748
  const value = valueLabel ?? (isAll ? allLabel : shown.length === 1 ? leafOptions.find((o) => o.id === shown[0])?.label ?? `${shown.length} selected` : `${shown.length} selected`);
4586
- const labelled = (id, label) => hints?.[id] ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("span", { className: "flex flex-col", children: [
4587
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { children: label }),
4588
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "text-xs font-normal text-text-tertiary", children: hints[id] })
4749
+ const labelled = (id, label) => hints?.[id] ? /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("span", { className: "flex flex-col", children: [
4750
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { children: label }),
4751
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "text-xs font-normal text-text-tertiary", children: hints[id] })
4589
4752
  ] }) : label;
4590
4753
  const ql = q.trim().toLowerCase();
4591
4754
  const items = options.filter((o) => isAvailable(o.id) && (!ql || o.label.toLowerCase().includes(ql)));
@@ -4596,8 +4759,8 @@ function MultiSelectFilter({
4596
4759
  const kids = live.filter((c) => c.label.toLowerCase().includes(ql));
4597
4760
  return kids.length ? { ...g, children: kids } : null;
4598
4761
  }).filter((g) => g !== null) : [];
4599
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: cn("relative", fullWidth && "w-full", className), ref, "data-testid": testIdPrefix, children: [
4600
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
4762
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: cn("relative", fullWidth && "w-full", className), ref, "data-testid": testIdPrefix, children: [
4763
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
4601
4764
  "button",
4602
4765
  {
4603
4766
  type: "button",
@@ -4606,8 +4769,8 @@ function MultiSelectFilter({
4606
4769
  "data-testid": testIdPrefix && `${testIdPrefix}-trigger`,
4607
4770
  className: cn(chipTriggerClass(variant), fullWidth && "w-full justify-between"),
4608
4771
  children: [
4609
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ChipContent, { caption, value, icon }),
4610
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
4772
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ChipContent, { caption, value, icon }),
4773
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
4611
4774
  import_lucide_react23.ChevronDown,
4612
4775
  {
4613
4776
  size: 14,
@@ -4618,7 +4781,7 @@ function MultiSelectFilter({
4618
4781
  ]
4619
4782
  }
4620
4783
  ),
4621
- open && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
4784
+ open && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
4622
4785
  "div",
4623
4786
  {
4624
4787
  className: cn(
@@ -4629,10 +4792,10 @@ function MultiSelectFilter({
4629
4792
  "data-testid": testIdPrefix && `${testIdPrefix}-popover`,
4630
4793
  role: "dialog",
4631
4794
  "aria-label": caption,
4632
- children: loading ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(MenuLoading, {}) : error ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(MenuError, { onRetry }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
4633
- showSearch && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "border-b border-border-default p-2", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex h-8 items-center gap-2 rounded-control border border-border-strong bg-input px-2.5 focus-within:outline-2 focus-within:outline-offset-1 focus-within:outline-border-focus", children: [
4634
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react23.Search, { size: 14, className: "text-text-secondary", "aria-hidden": "true" }),
4635
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
4795
+ children: loading ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(MenuLoading, {}) : error ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(MenuError, { onRetry }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
4796
+ showSearch && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "border-b border-border-default p-2", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex h-8 items-center gap-2 rounded-control border border-border-strong bg-input px-2.5 focus-within:outline-2 focus-within:outline-offset-1 focus-within:outline-border-focus", children: [
4797
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react23.Search, { size: 14, className: "text-text-secondary", "aria-hidden": "true" }),
4798
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
4636
4799
  "input",
4637
4800
  {
4638
4801
  type: "text",
@@ -4642,37 +4805,37 @@ function MultiSelectFilter({
4642
4805
  className: "h-full flex-1 bg-transparent text-dense outline-hidden placeholder:text-text-tertiary"
4643
4806
  }
4644
4807
  ),
4645
- q && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("button", { type: "button", onClick: () => setQ(""), "aria-label": "Clear search", className: "text-text-tertiary hover:text-text-primary focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react23.X, { size: 13 }) })
4808
+ q && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("button", { type: "button", onClick: () => setQ(""), "aria-label": "Clear search", className: "text-text-tertiary hover:text-text-primary focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react23.X, { size: 13 }) })
4646
4809
  ] }) }),
4647
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "max-h-70 overflow-y-auto p-1", children: [
4810
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "max-h-70 overflow-y-auto p-1", children: [
4648
4811
  groups ? visibleGroups.map((g) => {
4649
4812
  const state = groupState(g);
4650
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { children: [
4651
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
4813
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { children: [
4814
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
4652
4815
  "button",
4653
4816
  {
4654
4817
  type: "button",
4655
4818
  onClick: () => toggleGroup(g),
4656
4819
  className: "flex w-full items-center gap-2.5 rounded-control px-2 py-2 text-left transition-colors hover:bg-subtle focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-border-focus",
4657
4820
  children: [
4658
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(CheckBoxBox, { checked: state === "all", indeterminate: state === "some" }),
4659
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: cn("flex-1 text-sm text-text-primary", !plainParent && "font-semibold"), children: labelled(g.id, g.label) }),
4660
- counts && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(OptionCount, { n: countFor(g.id) })
4821
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(CheckBoxBox, { checked: state === "all", indeterminate: state === "some" }),
4822
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: cn("flex-1 text-sm text-text-primary", !plainParent && "font-semibold"), children: labelled(g.id, g.label) }),
4823
+ counts && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(OptionCount, { n: countFor(g.id) })
4661
4824
  ]
4662
4825
  }
4663
4826
  ),
4664
4827
  g.children.map((c) => {
4665
4828
  const checked = draft.includes(c.id);
4666
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
4829
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
4667
4830
  "button",
4668
4831
  {
4669
4832
  type: "button",
4670
4833
  onClick: () => toggle(c.id),
4671
4834
  className: "flex w-full items-center gap-2.5 rounded-control py-2 pl-9 pr-2 text-left transition-colors hover:bg-subtle focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-border-focus",
4672
4835
  children: [
4673
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(CheckBoxBox, { checked }),
4674
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "flex-1 text-sm text-text-primary", children: labelled(c.id, c.label) }),
4675
- counts && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(OptionCount, { n: countFor(c.id) })
4836
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(CheckBoxBox, { checked }),
4837
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "flex-1 text-sm text-text-primary", children: labelled(c.id, c.label) }),
4838
+ counts && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(OptionCount, { n: countFor(c.id) })
4676
4839
  ]
4677
4840
  },
4678
4841
  c.id
@@ -4681,25 +4844,25 @@ function MultiSelectFilter({
4681
4844
  ] }, g.id);
4682
4845
  }) : items.map((o) => {
4683
4846
  const checked = draft.includes(o.id);
4684
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
4847
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
4685
4848
  "button",
4686
4849
  {
4687
4850
  type: "button",
4688
4851
  onClick: () => toggle(o.id),
4689
4852
  className: "flex w-full items-center gap-2.5 rounded-control px-2 py-2 text-left transition-colors hover:bg-subtle focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-border-focus",
4690
4853
  children: [
4691
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(CheckBoxBox, { checked }),
4692
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "flex-1 text-sm text-text-primary", children: labelled(o.id, o.label) }),
4693
- counts && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(OptionCount, { n: countFor(o.id) })
4854
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(CheckBoxBox, { checked }),
4855
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "flex-1 text-sm text-text-primary", children: labelled(o.id, o.label) }),
4856
+ counts && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(OptionCount, { n: countFor(o.id) })
4694
4857
  ]
4695
4858
  },
4696
4859
  o.id
4697
4860
  );
4698
4861
  }),
4699
- (groups && !visibleGroups.length || !groups && !items.length) && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "py-6 text-center text-dense text-text-tertiary", children: "No matches." })
4862
+ (groups && !visibleGroups.length || !groups && !items.length) && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "py-6 text-center text-dense text-text-tertiary", children: "No matches." })
4700
4863
  ] }),
4701
- note && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "border-t border-border-default px-3 py-2 text-xs text-text-tertiary", children: note }),
4702
- showFooter ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(FilterDropdownFooter, { onClear: clearAll, onApply: apply }) : min === 0 && draft.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "border-t border-border-default p-2", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
4864
+ note && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "border-t border-border-default px-3 py-2 text-xs text-text-tertiary", children: note }),
4865
+ showFooter ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(FilterDropdownFooter, { onClear: clearAll, onApply: apply }) : min === 0 && draft.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "border-t border-border-default p-2", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
4703
4866
  "button",
4704
4867
  {
4705
4868
  type: "button",
@@ -4717,7 +4880,7 @@ function MultiSelectFilter({
4717
4880
  ] });
4718
4881
  }
4719
4882
  function OptionCount({ n }) {
4720
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("span", { className: "shrink-0 text-xs tabular-nums text-text-tertiary", children: [
4883
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("span", { className: "shrink-0 text-xs tabular-nums text-text-tertiary", children: [
4721
4884
  "(",
4722
4885
  n.toLocaleString(),
4723
4886
  ")"
@@ -4725,16 +4888,16 @@ function OptionCount({ n }) {
4725
4888
  }
4726
4889
 
4727
4890
  // src/Toggle.tsx
4728
- var import_react21 = require("react");
4729
- var import_jsx_runtime41 = require("react/jsx-runtime");
4891
+ var import_react23 = require("react");
4892
+ var import_jsx_runtime44 = require("react/jsx-runtime");
4730
4893
  var SIZES2 = {
4731
4894
  sm: { track: "h-5 w-9", knob: "h-4 w-4", on: "translate-x-4.5" },
4732
4895
  md: { track: "h-6 w-11", knob: "h-5 w-5", on: "translate-x-5.5" }
4733
4896
  };
4734
4897
  var OFF_TRACK = "color-mix(in srgb, var(--mr-color-border-interactive) 70%, var(--mr-color-text-secondary))";
4735
- var Toggle = (0, import_react21.forwardRef)(function Toggle2({ checked, onChange, label, size = "md", disabled, className, testIdPrefix }, ref) {
4898
+ var Toggle = (0, import_react23.forwardRef)(function Toggle2({ checked, onChange, label, size = "md", disabled, className, testIdPrefix }, ref) {
4736
4899
  const s = SIZES2[size];
4737
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4900
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
4738
4901
  "button",
4739
4902
  {
4740
4903
  ref,
@@ -4753,7 +4916,7 @@ var Toggle = (0, import_react21.forwardRef)(function Toggle2({ checked, onChange
4753
4916
  disabled && "cursor-not-allowed opacity-50",
4754
4917
  className
4755
4918
  ),
4756
- children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4919
+ children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
4757
4920
  "span",
4758
4921
  {
4759
4922
  className: cn(
@@ -4769,22 +4932,22 @@ var Toggle = (0, import_react21.forwardRef)(function Toggle2({ checked, onChange
4769
4932
  Toggle.displayName = "Toggle";
4770
4933
 
4771
4934
  // src/AISpark.tsx
4772
- var import_react22 = require("react");
4935
+ var import_react24 = require("react");
4773
4936
  var import_lucide_react24 = require("lucide-react");
4774
- var import_jsx_runtime42 = require("react/jsx-runtime");
4937
+ var import_jsx_runtime45 = require("react/jsx-runtime");
4775
4938
  function AISpark({ size = 16, className, testIdPrefix }) {
4776
- const id = (0, import_react22.useId)();
4777
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
4778
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("svg", { width: "0", height: "0", "aria-hidden": "true", style: { position: "absolute" }, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("linearGradient", { id, x1: "0", y1: "0", x2: "1", y2: "1", children: [
4779
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("stop", { offset: "0%", stopColor: "var(--mr-color-brand-primary)" }),
4780
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("stop", { offset: "100%", stopColor: "var(--mr-color-ai-violet)" })
4939
+ const id = (0, import_react24.useId)();
4940
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
4941
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("svg", { width: "0", height: "0", "aria-hidden": "true", style: { position: "absolute" }, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("linearGradient", { id, x1: "0", y1: "0", x2: "1", y2: "1", children: [
4942
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("stop", { offset: "0%", stopColor: "var(--mr-color-brand-primary)" }),
4943
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("stop", { offset: "100%", stopColor: "var(--mr-color-ai-violet)" })
4781
4944
  ] }) }) }),
4782
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react24.Sparkles, { size, stroke: `url(#${id})`, className, "data-testid": testIdPrefix, "aria-hidden": "true" })
4945
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react24.Sparkles, { size, stroke: `url(#${id})`, className, "data-testid": testIdPrefix, "aria-hidden": "true" })
4783
4946
  ] });
4784
4947
  }
4785
4948
 
4786
4949
  // src/Freshness.tsx
4787
- var import_jsx_runtime43 = require("react/jsx-runtime");
4950
+ var import_jsx_runtime46 = require("react/jsx-runtime");
4788
4951
  var dotColor = {
4789
4952
  fresh: "bg-status-success",
4790
4953
  recent: "bg-status-warning",
@@ -4796,7 +4959,7 @@ var srLabel = {
4796
4959
  stale: "Older than a day"
4797
4960
  };
4798
4961
  function Freshness({ level, className, testIdPrefix }) {
4799
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
4962
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
4800
4963
  "span",
4801
4964
  {
4802
4965
  className: cn("inline-block h-1.5 w-1.5 shrink-0 rounded-full", dotColor[level], className),
@@ -4808,50 +4971,50 @@ function Freshness({ level, className, testIdPrefix }) {
4808
4971
  }
4809
4972
 
4810
4973
  // src/SectionHeading.tsx
4811
- var import_jsx_runtime44 = require("react/jsx-runtime");
4974
+ var import_jsx_runtime47 = require("react/jsx-runtime");
4812
4975
  function SectionHeading({ title, description, actions, as: Tag2 = "h2", id, className, testIdPrefix }) {
4813
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: cn("flex flex-wrap items-end justify-between gap-x-4 gap-y-2", className), "data-testid": testIdPrefix, children: [
4814
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "min-w-0", children: [
4815
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Tag2, { id, className: "text-base font-semibold text-text-primary", children: title }),
4816
- description && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "mt-0.5 text-dense text-text-secondary", children: description })
4976
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: cn("flex flex-wrap items-end justify-between gap-x-4 gap-y-2", className), "data-testid": testIdPrefix, children: [
4977
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "min-w-0", children: [
4978
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Tag2, { id, className: "text-base font-semibold text-text-primary", children: title }),
4979
+ description && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "mt-0.5 text-dense text-text-secondary", children: description })
4817
4980
  ] }),
4818
- actions && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "flex shrink-0 items-center gap-2", children: actions })
4981
+ actions && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex shrink-0 items-center gap-2", children: actions })
4819
4982
  ] });
4820
4983
  }
4821
4984
 
4822
4985
  // src/PageHeader.tsx
4823
4986
  var import_lucide_react25 = require("lucide-react");
4824
- var import_jsx_runtime45 = require("react/jsx-runtime");
4987
+ var import_jsx_runtime48 = require("react/jsx-runtime");
4825
4988
  function PageHeader({ title, description, actions, meta, back, className, testIdPrefix }) {
4826
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("header", { className: cn("flex flex-wrap items-center justify-between gap-x-6 gap-y-3", className), "data-testid": testIdPrefix, children: [
4827
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "min-w-0", children: [
4828
- back && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
4989
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("header", { className: cn("flex flex-wrap items-center justify-between gap-x-6 gap-y-3", className), "data-testid": testIdPrefix, children: [
4990
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "min-w-0", children: [
4991
+ back && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
4829
4992
  "a",
4830
4993
  {
4831
4994
  href: back.href ?? "#",
4832
4995
  onClick: back.onClick,
4833
4996
  className: "mb-1.5 inline-flex items-center gap-1.5 rounded-control text-micro font-semibold uppercase tracking-wider text-text-tertiary hover:text-text-primary focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
4834
4997
  children: [
4835
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react25.ArrowLeft, { size: 13, "aria-hidden": "true" }),
4998
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react25.ArrowLeft, { size: 13, "aria-hidden": "true" }),
4836
4999
  back.label
4837
5000
  ]
4838
5001
  }
4839
5002
  ),
4840
- meta ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex flex-wrap items-center gap-x-2.5 gap-y-1", children: [
4841
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("h1", { className: "text-xl font-semibold tracking-tight text-text-primary", children: title }),
5003
+ meta ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex flex-wrap items-center gap-x-2.5 gap-y-1", children: [
5004
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("h1", { className: "text-xl font-semibold tracking-tight text-text-primary", children: title }),
4842
5005
  meta
4843
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("h1", { className: "text-xl font-semibold tracking-tight text-text-primary", children: title }),
4844
- description && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "mt-0.5 max-w-2xl text-sm text-text-secondary", children: description })
5006
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("h1", { className: "text-xl font-semibold tracking-tight text-text-primary", children: title }),
5007
+ description && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "mt-0.5 max-w-2xl text-sm text-text-secondary", children: description })
4845
5008
  ] }),
4846
- actions && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "flex shrink-0 items-center gap-2", children: actions })
5009
+ actions && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "flex shrink-0 items-center gap-2", children: actions })
4847
5010
  ] });
4848
5011
  }
4849
5012
 
4850
5013
  // src/Modal.tsx
4851
- var import_react23 = require("react");
5014
+ var import_react25 = require("react");
4852
5015
  var import_react_dom7 = require("react-dom");
4853
5016
  var import_lucide_react26 = require("lucide-react");
4854
- var import_jsx_runtime46 = require("react/jsx-runtime");
5017
+ var import_jsx_runtime49 = require("react/jsx-runtime");
4855
5018
  var WIDTH = {
4856
5019
  sm: "max-w-110",
4857
5020
  md: "max-w-160",
@@ -4860,15 +5023,28 @@ var WIDTH = {
4860
5023
  // own tabs, a grid of events. 880 squeezed their tables into scrolling.
4861
5024
  xl: "max-w-300"
4862
5025
  };
5026
+ var EXIT_MS = 200;
4863
5027
  var FOCUSABLE = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
4864
5028
  function Modal({ open, onClose, title, description, size = "md", footer, children, className, testIdPrefix }) {
4865
- const titleId = (0, import_react23.useId)();
4866
- const descId = (0, import_react23.useId)();
4867
- const panel = (0, import_react23.useRef)(null);
4868
- const close = (0, import_react23.useRef)(onClose);
5029
+ const titleId = (0, import_react25.useId)();
5030
+ const descId = (0, import_react25.useId)();
5031
+ const panel = (0, import_react25.useRef)(null);
5032
+ const close = (0, import_react25.useRef)(onClose);
4869
5033
  close.current = onClose;
4870
- (0, import_react23.useEffect)(() => {
4871
- if (!open) return;
5034
+ const [mounted, setMounted] = (0, import_react25.useState)(open);
5035
+ const [shown, setShown] = (0, import_react25.useState)(false);
5036
+ (0, import_react25.useEffect)(() => {
5037
+ if (open) {
5038
+ setMounted(true);
5039
+ const raf = requestAnimationFrame(() => requestAnimationFrame(() => setShown(true)));
5040
+ return () => cancelAnimationFrame(raf);
5041
+ }
5042
+ setShown(false);
5043
+ const t = setTimeout(() => setMounted(false), EXIT_MS);
5044
+ return () => clearTimeout(t);
5045
+ }, [open]);
5046
+ (0, import_react25.useEffect)(() => {
5047
+ if (!open || !mounted) return;
4872
5048
  const opener = document.activeElement;
4873
5049
  const firstIn = (region) => panel.current?.querySelector(region)?.querySelector(FOCUSABLE) ?? null;
4874
5050
  const first = firstIn("[data-modal-body]") ?? firstIn("[data-modal-footer]");
@@ -4899,15 +5075,18 @@ function Modal({ open, onClose, title, description, size = "md", footer, childre
4899
5075
  document.body.style.overflow = overflow;
4900
5076
  opener?.focus?.();
4901
5077
  };
4902
- }, [open]);
4903
- if (!open || typeof document === "undefined") return null;
5078
+ }, [open, mounted]);
5079
+ if (!mounted || typeof document === "undefined") return null;
4904
5080
  return (0, import_react_dom7.createPortal)(
4905
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
5081
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
4906
5082
  "div",
4907
5083
  {
4908
- className: "fixed inset-0 z-modal flex items-center justify-center bg-scrim px-4 py-6",
5084
+ className: cn(
5085
+ "fixed inset-0 z-modal flex items-center justify-center bg-scrim px-4 py-6 transition-opacity duration-(--mr-motion-duration-interactive) ease-interactive motion-reduce:transition-none",
5086
+ shown ? "opacity-100" : "opacity-0"
5087
+ ),
4909
5088
  onMouseDown: (e) => e.target === e.currentTarget && onClose(),
4910
- children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
5089
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
4911
5090
  "div",
4912
5091
  {
4913
5092
  ref: panel,
@@ -4918,29 +5097,31 @@ function Modal({ open, onClose, title, description, size = "md", footer, childre
4918
5097
  "aria-describedby": description ? descId : void 0,
4919
5098
  tabIndex: -1,
4920
5099
  className: cn(
4921
- "flex max-h-full w-full flex-col rounded-card border border-border-default bg-surface shadow-overlay outline-hidden",
5100
+ "flex max-h-full w-full flex-col rounded-card border border-border-default bg-surface shadow-overlay outline-hidden transition-transform duration-(--mr-motion-duration-interactive) ease-interactive motion-reduce:transition-none",
5101
+ // Settles in from 98%; the scrim's opacity carries the panel's fade.
5102
+ shown ? "scale-100" : "scale-98",
4922
5103
  WIDTH[size],
4923
5104
  className
4924
5105
  ),
4925
5106
  children: [
4926
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-start gap-3 px-5 pt-5 pb-3", children: [
4927
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "min-w-0 flex-1", children: [
4928
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("h2", { id: titleId, className: "text-base font-semibold text-text-primary", children: title }),
4929
- description && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { id: descId, className: "mt-0.5 text-sm text-text-secondary", children: description })
5107
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-start gap-3 px-5 pt-5 pb-2", children: [
5108
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "min-w-0 flex-1", children: [
5109
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("h2", { id: titleId, className: "text-base font-semibold text-text-primary", children: title }),
5110
+ description && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { id: descId, className: "mt-0.5 text-sm text-text-secondary", children: description })
4930
5111
  ] }),
4931
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
5112
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
4932
5113
  "button",
4933
5114
  {
4934
5115
  type: "button",
4935
5116
  onClick: onClose,
4936
5117
  "aria-label": "Close",
4937
5118
  className: "-mr-1.5 -mt-1 flex size-8 shrink-0 items-center justify-center rounded-control text-text-tertiary hover:bg-subtle hover:text-text-primary focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
4938
- children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react26.X, { size: 16, "aria-hidden": "true" })
5119
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react26.X, { size: 16, "aria-hidden": "true" })
4939
5120
  }
4940
5121
  )
4941
5122
  ] }),
4942
- children && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { "data-modal-body": true, className: "min-h-0 flex-1 overflow-y-auto px-5 pb-5 text-sm text-text-primary", children }),
4943
- footer && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { "data-modal-footer": true, className: "flex items-center justify-end gap-2 border-t border-border-default px-5 py-3", children: footer })
5123
+ children && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { "data-modal-body": true, className: "min-h-0 flex-1 overflow-y-auto px-5 pt-1 pb-5 text-sm text-text-primary", children }),
5124
+ footer && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { "data-modal-footer": true, className: "flex items-center justify-end gap-2 border-t border-border-default px-5 py-3", children: footer })
4944
5125
  ]
4945
5126
  }
4946
5127
  )
@@ -4951,10 +5132,10 @@ function Modal({ open, onClose, title, description, size = "md", footer, childre
4951
5132
  }
4952
5133
 
4953
5134
  // src/EmptyState.tsx
4954
- var import_jsx_runtime47 = require("react/jsx-runtime");
5135
+ var import_jsx_runtime50 = require("react/jsx-runtime");
4955
5136
  function EmptyState({ icon, title, description, action, size = "sm", className, testIdPrefix }) {
4956
5137
  const md = size === "md";
4957
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
5138
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
4958
5139
  "div",
4959
5140
  {
4960
5141
  className: cn(
@@ -4964,7 +5145,7 @@ function EmptyState({ icon, title, description, action, size = "sm", className,
4964
5145
  ),
4965
5146
  "data-testid": testIdPrefix,
4966
5147
  children: [
4967
- icon && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
5148
+ icon && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4968
5149
  "span",
4969
5150
  {
4970
5151
  "aria-hidden": "true",
@@ -4975,27 +5156,27 @@ function EmptyState({ icon, title, description, action, size = "sm", className,
4975
5156
  children: icon
4976
5157
  }
4977
5158
  ),
4978
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: cn("font-semibold text-text-primary", md ? "text-base" : "text-sm"), children: title }),
4979
- description && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: cn("max-w-sm text-text-secondary", md ? "text-sm" : "text-xs"), children: description }),
4980
- action && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: md ? "mt-3" : "mt-2", children: action })
5159
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: cn("font-semibold text-text-primary", md ? "text-base" : "text-sm"), children: title }),
5160
+ description && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: cn("max-w-sm text-text-secondary", md ? "text-sm" : "text-xs"), children: description }),
5161
+ action && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: md ? "mt-3" : "mt-2", children: action })
4981
5162
  ]
4982
5163
  }
4983
5164
  );
4984
5165
  }
4985
5166
 
4986
5167
  // src/TextField.tsx
4987
- var import_react24 = require("react");
4988
- var import_jsx_runtime48 = require("react/jsx-runtime");
5168
+ var import_react26 = require("react");
5169
+ var import_jsx_runtime51 = require("react/jsx-runtime");
4989
5170
  var HEIGHT2 = { sm: "h-8", md: "h-10", lg: "h-11" };
4990
- var TextField = (0, import_react24.forwardRef)(
5171
+ var TextField = (0, import_react26.forwardRef)(
4991
5172
  ({ label, hint, error, size = "md", icon, className, testIdPrefix, id, disabled, ...props }, ref) => {
4992
- const auto = (0, import_react24.useId)();
5173
+ const auto = (0, import_react26.useId)();
4993
5174
  const fieldId = id ?? auto;
4994
5175
  const noteId = `${fieldId}-note`;
4995
5176
  const note = error ?? hint;
4996
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: cn("flex flex-col gap-1.5", className), "data-testid": testIdPrefix, children: [
4997
- label && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("label", { htmlFor: fieldId, className: "text-xs font-medium text-text-secondary", children: label }),
4998
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
5177
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: cn("flex flex-col gap-1.5", className), "data-testid": testIdPrefix, children: [
5178
+ label && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("label", { htmlFor: fieldId, className: "text-xs font-medium text-text-secondary", children: label }),
5179
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
4999
5180
  "div",
5000
5181
  {
5001
5182
  className: cn(
@@ -5005,8 +5186,8 @@ var TextField = (0, import_react24.forwardRef)(
5005
5186
  disabled && "opacity-50"
5006
5187
  ),
5007
5188
  children: [
5008
- icon && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { "aria-hidden": "true", className: "flex shrink-0 text-text-tertiary", children: icon }),
5009
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
5189
+ icon && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { "aria-hidden": "true", className: "flex shrink-0 text-text-tertiary", children: icon }),
5190
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
5010
5191
  "input",
5011
5192
  {
5012
5193
  ref,
@@ -5021,43 +5202,43 @@ var TextField = (0, import_react24.forwardRef)(
5021
5202
  ]
5022
5203
  }
5023
5204
  ),
5024
- note && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { id: noteId, className: cn("text-xs", error ? "text-text-danger" : "text-text-tertiary"), children: note })
5205
+ note && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { id: noteId, className: cn("text-xs", error ? "text-text-danger" : "text-text-tertiary"), children: note })
5025
5206
  ] });
5026
5207
  }
5027
5208
  );
5028
5209
  TextField.displayName = "TextField";
5029
5210
 
5030
5211
  // src/Drawer.tsx
5031
- var import_react25 = require("react");
5212
+ var import_react27 = require("react");
5032
5213
  var import_react_dom8 = require("react-dom");
5033
5214
  var import_lucide_react27 = require("lucide-react");
5034
- var import_jsx_runtime49 = require("react/jsx-runtime");
5215
+ var import_jsx_runtime52 = require("react/jsx-runtime");
5035
5216
  var WIDTH2 = {
5036
5217
  sm: "max-w-110",
5037
5218
  md: "max-w-160",
5038
5219
  lg: "max-w-230"
5039
5220
  };
5040
- var EXIT_MS = 200;
5221
+ var EXIT_MS2 = 200;
5041
5222
  var FOCUSABLE2 = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
5042
5223
  function Drawer({ open, onClose, title, description, size = "sm", footer, children, className, testIdPrefix }) {
5043
- const titleId = (0, import_react25.useId)();
5044
- const descId = (0, import_react25.useId)();
5045
- const panel = (0, import_react25.useRef)(null);
5046
- const close = (0, import_react25.useRef)(onClose);
5224
+ const titleId = (0, import_react27.useId)();
5225
+ const descId = (0, import_react27.useId)();
5226
+ const panel = (0, import_react27.useRef)(null);
5227
+ const close = (0, import_react27.useRef)(onClose);
5047
5228
  close.current = onClose;
5048
- const [mounted, setMounted] = (0, import_react25.useState)(open);
5049
- const [shown, setShown] = (0, import_react25.useState)(false);
5050
- (0, import_react25.useEffect)(() => {
5229
+ const [mounted, setMounted] = (0, import_react27.useState)(open);
5230
+ const [shown, setShown] = (0, import_react27.useState)(false);
5231
+ (0, import_react27.useEffect)(() => {
5051
5232
  if (open) {
5052
5233
  setMounted(true);
5053
5234
  const raf = requestAnimationFrame(() => requestAnimationFrame(() => setShown(true)));
5054
5235
  return () => cancelAnimationFrame(raf);
5055
5236
  }
5056
5237
  setShown(false);
5057
- const t = setTimeout(() => setMounted(false), EXIT_MS);
5238
+ const t = setTimeout(() => setMounted(false), EXIT_MS2);
5058
5239
  return () => clearTimeout(t);
5059
5240
  }, [open]);
5060
- (0, import_react25.useEffect)(() => {
5241
+ (0, import_react27.useEffect)(() => {
5061
5242
  if (!open || !mounted) return;
5062
5243
  const opener = document.activeElement;
5063
5244
  const firstIn = (region) => panel.current?.querySelector(region)?.querySelector(FOCUSABLE2) ?? null;
@@ -5092,8 +5273,8 @@ function Drawer({ open, onClose, title, description, size = "sm", footer, childr
5092
5273
  }, [open, mounted]);
5093
5274
  if (!mounted || typeof document === "undefined") return null;
5094
5275
  return (0, import_react_dom8.createPortal)(
5095
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "fixed inset-0 z-modal", children: [
5096
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
5276
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "fixed inset-0 z-modal", children: [
5277
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
5097
5278
  "div",
5098
5279
  {
5099
5280
  "aria-hidden": "true",
@@ -5107,7 +5288,7 @@ function Drawer({ open, onClose, title, description, size = "sm", footer, childr
5107
5288
  )
5108
5289
  }
5109
5290
  ),
5110
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
5291
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
5111
5292
  "div",
5112
5293
  {
5113
5294
  ref: panel,
@@ -5124,24 +5305,24 @@ function Drawer({ open, onClose, title, description, size = "sm", footer, childr
5124
5305
  className
5125
5306
  ),
5126
5307
  children: [
5127
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-start gap-3 px-5 pt-5 pb-3", children: [
5128
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "min-w-0 flex-1", children: [
5129
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("h2", { id: titleId, className: "text-base font-semibold text-text-primary", children: title }),
5130
- description && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { id: descId, className: "mt-0.5 text-sm text-text-secondary", children: description })
5308
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex items-start gap-3 px-5 pt-5 pb-2", children: [
5309
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "min-w-0 flex-1", children: [
5310
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("h2", { id: titleId, className: "text-base font-semibold text-text-primary", children: title }),
5311
+ description && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { id: descId, className: "mt-0.5 text-sm text-text-secondary", children: description })
5131
5312
  ] }),
5132
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
5313
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
5133
5314
  "button",
5134
5315
  {
5135
5316
  type: "button",
5136
5317
  onClick: onClose,
5137
5318
  "aria-label": "Close",
5138
5319
  className: "-mr-1.5 -mt-1 flex size-8 shrink-0 items-center justify-center rounded-control text-text-tertiary hover:bg-subtle hover:text-text-primary focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
5139
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react27.X, { size: 16, "aria-hidden": "true" })
5320
+ children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react27.X, { size: 16, "aria-hidden": "true" })
5140
5321
  }
5141
5322
  )
5142
5323
  ] }),
5143
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { "data-drawer-body": true, className: "min-h-0 flex-1 overflow-y-auto px-5 pb-5 text-sm text-text-primary", children }),
5144
- footer && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { "data-drawer-footer": true, className: "flex items-center justify-end gap-2 border-t border-border-default px-5 py-3", children: footer })
5324
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { "data-drawer-body": true, className: "min-h-0 flex-1 overflow-y-auto px-5 pt-1 pb-5 text-sm text-text-primary", children }),
5325
+ footer && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { "data-drawer-footer": true, className: "flex items-center justify-end gap-2 border-t border-border-default px-5 py-3", children: footer })
5145
5326
  ]
5146
5327
  }
5147
5328
  )
@@ -5151,8 +5332,8 @@ function Drawer({ open, onClose, title, description, size = "sm", footer, childr
5151
5332
  }
5152
5333
 
5153
5334
  // src/DataTable.tsx
5154
- var import_react26 = require("react");
5155
- var import_jsx_runtime50 = require("react/jsx-runtime");
5335
+ var import_react28 = require("react");
5336
+ var import_jsx_runtime53 = require("react/jsx-runtime");
5156
5337
  var WIDTH3 = { fill: "", sm: "w-24", md: "w-36", lg: "w-48" };
5157
5338
  var MAX_H = { sm: "max-h-80", md: "max-h-120", lg: "max-h-160" };
5158
5339
  var HEAD_PAD = { default: "px-4 py-3", compact: "px-3 py-2" };
@@ -5176,7 +5357,7 @@ function DataTable({
5176
5357
  testIdPrefix,
5177
5358
  ...rest
5178
5359
  }) {
5179
- const titleId = (0, import_react26.useId)();
5360
+ const titleId = (0, import_react28.useId)();
5180
5361
  const head = HEAD_PAD[density];
5181
5362
  const pad = CELL_PAD[density];
5182
5363
  const align = (c) => c.numeric ? "text-right" : "text-left";
@@ -5185,20 +5366,20 @@ function DataTable({
5185
5366
  const col = columns.find((c) => c.key === key);
5186
5367
  onSortChange?.(cycleSort(sort, key, col?.firstDir ?? (col?.numeric ? "desc" : "asc")));
5187
5368
  };
5188
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
5369
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
5189
5370
  "div",
5190
5371
  {
5191
5372
  className: cn("flex w-full flex-col overflow-hidden rounded-card border border-border-default bg-surface", className),
5192
5373
  "data-testid": testIdPrefix,
5193
5374
  children: [
5194
- title && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-start justify-between gap-2 p-card-padding", children: [
5195
- /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "min-w-0", children: [
5196
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("h3", { id: titleId, className: "text-style-card-title", children: title }),
5197
- subtitle && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: "mt-0.5 text-xs text-text-tertiary", children: subtitle })
5375
+ title && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex items-start justify-between gap-2 p-card-padding", children: [
5376
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "min-w-0", children: [
5377
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("h3", { id: titleId, className: "text-style-card-title", children: title }),
5378
+ subtitle && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "mt-0.5 text-xs text-text-tertiary", children: subtitle })
5198
5379
  ] }),
5199
- action && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "shrink-0", children: action })
5380
+ action && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "shrink-0", children: action })
5200
5381
  ] }),
5201
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: cn("overflow-x-auto", maxHeight && cn("overflow-y-auto", MAX_H[maxHeight])), children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
5382
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: cn("overflow-x-auto", maxHeight && cn("overflow-y-auto", MAX_H[maxHeight])), children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
5202
5383
  "table",
5203
5384
  {
5204
5385
  "aria-labelledby": title ? titleId : void 0,
@@ -5206,13 +5387,13 @@ function DataTable({
5206
5387
  "aria-busy": loading || void 0,
5207
5388
  className: "w-full border-collapse text-left",
5208
5389
  children: [
5209
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("thead", { className: cn(maxHeight && "sticky top-0 z-10"), children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("tr", { className: "bg-subtle text-micro font-semibold uppercase tracking-wider text-text-secondary", children: columns.map((c) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
5390
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("thead", { className: cn(maxHeight && "sticky top-0 z-10"), children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("tr", { className: "bg-subtle text-micro font-semibold uppercase tracking-wider text-text-secondary", children: columns.map((c) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
5210
5391
  "th",
5211
5392
  {
5212
5393
  scope: "col",
5213
5394
  "aria-sort": c.sortable ? ariaSortFor(sort, c.key) : void 0,
5214
5395
  className: cn("border-b border-border-default font-semibold", head, align(c), width(c)),
5215
- children: c.sortable && onSortChange ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
5396
+ children: c.sortable && onSortChange ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
5216
5397
  SortButton,
5217
5398
  {
5218
5399
  label: c.label,
@@ -5226,7 +5407,7 @@ function DataTable({
5226
5407
  },
5227
5408
  c.key
5228
5409
  )) }) }),
5229
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("tbody", { className: "text-dense text-text-primary", children: loading ? Array.from({ length: loadingRows }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("tr", { "aria-hidden": "true", className: "[&:last-child>td]:border-b-0", children: columns.map((c) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("td", { className: cn("border-b border-border-default", pad, align(c)), children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
5410
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("tbody", { className: "text-dense text-text-primary", children: loading ? Array.from({ length: loadingRows }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("tr", { "aria-hidden": "true", className: "[&:last-child>td]:border-b-0", children: columns.map((c) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("td", { className: cn("border-b border-border-default", pad, align(c)), children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
5230
5411
  "span",
5231
5412
  {
5232
5413
  className: cn(
@@ -5234,7 +5415,7 @@ function DataTable({
5234
5415
  c.numeric ? "w-12" : "w-2/3"
5235
5416
  )
5236
5417
  }
5237
- ) }, c.key)) }, i)) : rows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("td", { colSpan: columns.length, className: "px-6 py-12", children: empty ?? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(NoResultsEmptyState, {}) }) }) : rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("tr", { className: "hover:bg-subtle [&:last-child>td]:border-b-0", children: columns.map((c) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
5418
+ ) }, c.key)) }, i)) : rows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("td", { colSpan: columns.length, className: "px-6 py-12", children: empty ?? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(NoResultsEmptyState, {}) }) }) : rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("tr", { className: "hover:bg-subtle [&:last-child>td]:border-b-0", children: columns.map((c) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
5238
5419
  "td",
5239
5420
  {
5240
5421
  className: cn("border-b border-border-default", pad, align(c), c.numeric && "tabular-nums"),
@@ -5245,14 +5426,14 @@ function DataTable({
5245
5426
  ]
5246
5427
  }
5247
5428
  ) }),
5248
- footer && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "border-t border-border-default px-4 py-3", children: footer })
5429
+ footer && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "border-t border-border-default px-4 py-3", children: footer })
5249
5430
  ]
5250
5431
  }
5251
5432
  );
5252
5433
  }
5253
5434
 
5254
5435
  // src/MediaLabel.tsx
5255
- var import_jsx_runtime51 = require("react/jsx-runtime");
5436
+ var import_jsx_runtime54 = require("react/jsx-runtime");
5256
5437
  var FILL = {
5257
5438
  TV: "bg-media-tv",
5258
5439
  CTV: "bg-media-ctv",
@@ -5263,7 +5444,7 @@ var FILL = {
5263
5444
  Magazine: "bg-media-magazine"
5264
5445
  };
5265
5446
  function MediaLabel({ type, className, testIdPrefix }) {
5266
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
5447
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
5267
5448
  "span",
5268
5449
  {
5269
5450
  className: cn(
@@ -5278,10 +5459,10 @@ function MediaLabel({ type, className, testIdPrefix }) {
5278
5459
  }
5279
5460
 
5280
5461
  // src/SuggestionChip.tsx
5281
- var import_react27 = require("react");
5282
- var import_jsx_runtime52 = require("react/jsx-runtime");
5283
- var SuggestionChip = (0, import_react27.forwardRef)(function SuggestionChip2({ children, className, testIdPrefix, type = "button", ...props }, ref) {
5284
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
5462
+ var import_react29 = require("react");
5463
+ var import_jsx_runtime55 = require("react/jsx-runtime");
5464
+ var SuggestionChip = (0, import_react29.forwardRef)(function SuggestionChip2({ children, className, testIdPrefix, type = "button", ...props }, ref) {
5465
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
5285
5466
  "button",
5286
5467
  {
5287
5468
  ref,
@@ -5292,18 +5473,18 @@ var SuggestionChip = (0, import_react27.forwardRef)(function SuggestionChip2({ c
5292
5473
  "inline-flex h-8 max-w-full items-center rounded-full border border-border-default bg-surface px-3 text-sm text-text-primary transition-colors duration-(--mr-motion-duration-interactive) ease-interactive hover:border-border-strong hover:bg-subtle focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
5293
5474
  className
5294
5475
  ),
5295
- children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "truncate", children })
5476
+ children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "truncate", children })
5296
5477
  }
5297
5478
  );
5298
5479
  });
5299
5480
  SuggestionChip.displayName = "SuggestionChip";
5300
5481
 
5301
5482
  // src/ToggleChip.tsx
5302
- var import_react28 = require("react");
5483
+ var import_react30 = require("react");
5303
5484
  var import_lucide_react28 = require("lucide-react");
5304
- var import_jsx_runtime53 = require("react/jsx-runtime");
5305
- var ToggleChip = (0, import_react28.forwardRef)(function ToggleChip2({ selected, onChange, children, className, testIdPrefix, type = "button", onClick, ...props }, ref) {
5306
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
5485
+ var import_jsx_runtime56 = require("react/jsx-runtime");
5486
+ var ToggleChip = (0, import_react30.forwardRef)(function ToggleChip2({ selected, onChange, children, className, testIdPrefix, type = "button", onClick, ...props }, ref) {
5487
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
5307
5488
  "button",
5308
5489
  {
5309
5490
  ref,
@@ -5321,7 +5502,7 @@ var ToggleChip = (0, import_react28.forwardRef)(function ToggleChip2({ selected,
5321
5502
  className
5322
5503
  ),
5323
5504
  children: [
5324
- selected && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_lucide_react28.Check, { size: 14, "aria-hidden": "true", className: "-ml-0.5 shrink-0" }),
5505
+ selected && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_lucide_react28.Check, { size: 14, "aria-hidden": "true", className: "-ml-0.5 shrink-0" }),
5325
5506
  children
5326
5507
  ]
5327
5508
  }
@@ -5330,14 +5511,14 @@ var ToggleChip = (0, import_react28.forwardRef)(function ToggleChip2({ selected,
5330
5511
  ToggleChip.displayName = "ToggleChip";
5331
5512
 
5332
5513
  // src/CopyButton.tsx
5333
- var import_react29 = require("react");
5514
+ var import_react31 = require("react");
5334
5515
  var import_lucide_react29 = require("lucide-react");
5335
- var import_jsx_runtime54 = require("react/jsx-runtime");
5516
+ var import_jsx_runtime57 = require("react/jsx-runtime");
5336
5517
  var CONFIRM_MS = 2e3;
5337
- var CopyButton = (0, import_react29.forwardRef)(function CopyButton2({ value, label, "aria-label": ariaLabel, size = "xs", className, testIdPrefix }, ref) {
5338
- const [copied, setCopied] = (0, import_react29.useState)(false);
5339
- const timer = (0, import_react29.useRef)(void 0);
5340
- (0, import_react29.useEffect)(() => () => clearTimeout(timer.current), []);
5518
+ var CopyButton = (0, import_react31.forwardRef)(function CopyButton2({ value, label, "aria-label": ariaLabel, size = "xs", className, testIdPrefix }, ref) {
5519
+ const [copied, setCopied] = (0, import_react31.useState)(false);
5520
+ const timer = (0, import_react31.useRef)(void 0);
5521
+ (0, import_react31.useEffect)(() => () => clearTimeout(timer.current), []);
5341
5522
  const copy = async () => {
5342
5523
  try {
5343
5524
  await navigator.clipboard.writeText(typeof value === "function" ? value() : value);
@@ -5349,8 +5530,8 @@ var CopyButton = (0, import_react29.forwardRef)(function CopyButton2({ value, la
5349
5530
  timer.current = setTimeout(() => setCopied(false), CONFIRM_MS);
5350
5531
  };
5351
5532
  const iconSize = size === "xs" ? 13 : 15;
5352
- const icon = copied ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_lucide_react29.Check, { size: iconSize, "aria-hidden": "true", className: "shrink-0 text-text-success" }) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_lucide_react29.Copy, { size: iconSize, "aria-hidden": "true", className: "shrink-0" });
5353
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
5533
+ const icon = copied ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react29.Check, { size: iconSize, "aria-hidden": "true", className: "shrink-0 text-text-success" }) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react29.Copy, { size: iconSize, "aria-hidden": "true", className: "shrink-0" });
5534
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
5354
5535
  Button,
5355
5536
  {
5356
5537
  ref,
@@ -5364,8 +5545,8 @@ var CopyButton = (0, import_react29.forwardRef)(function CopyButton2({ value, la
5364
5545
  className: cn(!copied && "text-text-secondary", className),
5365
5546
  children: [
5366
5547
  icon,
5367
- label && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { children: copied ? "Copied" : label }),
5368
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { role: "status", className: "sr-only", children: copied ? "Copied" : "" })
5548
+ label && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { children: copied ? "Copied" : label }),
5549
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { role: "status", className: "sr-only", children: copied ? "Copied" : "" })
5369
5550
  ]
5370
5551
  }
5371
5552
  );
@@ -5374,7 +5555,7 @@ CopyButton.displayName = "CopyButton";
5374
5555
 
5375
5556
  // src/InlineMessage.tsx
5376
5557
  var import_lucide_react30 = require("lucide-react");
5377
- var import_jsx_runtime55 = require("react/jsx-runtime");
5558
+ var import_jsx_runtime58 = require("react/jsx-runtime");
5378
5559
  var BOX = {
5379
5560
  info: "border-brand-primaryAction/30 bg-brand-primaryAction/10",
5380
5561
  success: "border-status-success/40 bg-status-success/10",
@@ -5391,27 +5572,27 @@ var ICON_INK = {
5391
5572
  var ICON2 = { info: import_lucide_react30.Info, success: import_lucide_react30.CheckCircle2, warning: import_lucide_react30.AlertTriangle, danger: import_lucide_react30.XCircle };
5392
5573
  function InlineMessage({ tone = "info", title, children, actions, onDismiss, className, testIdPrefix }) {
5393
5574
  const Icon = ICON2[tone];
5394
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
5575
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
5395
5576
  "div",
5396
5577
  {
5397
5578
  role: tone === "warning" || tone === "danger" ? "alert" : "status",
5398
5579
  className: cn("flex items-start gap-2.5 rounded-control border px-3 py-2.5 text-sm", BOX[tone], className),
5399
5580
  "data-testid": testIdPrefix,
5400
5581
  children: [
5401
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Icon, { size: 16, "aria-hidden": "true", className: cn("mt-0.5 shrink-0", ICON_INK[tone]) }),
5402
- /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "min-w-0 flex-1", children: [
5403
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "font-semibold text-text-primary", children: title }),
5404
- children && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "mt-0.5 text-text-secondary", children }),
5405
- actions && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "mt-2 flex flex-wrap items-center gap-2", children: actions })
5582
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Icon, { size: 16, "aria-hidden": "true", className: cn("mt-0.5 shrink-0", ICON_INK[tone]) }),
5583
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "min-w-0 flex-1", children: [
5584
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "font-semibold text-text-primary", children: title }),
5585
+ children && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "mt-0.5 text-text-secondary", children }),
5586
+ actions && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "mt-2 flex flex-wrap items-center gap-2", children: actions })
5406
5587
  ] }),
5407
- onDismiss && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
5588
+ onDismiss && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
5408
5589
  "button",
5409
5590
  {
5410
5591
  type: "button",
5411
5592
  onClick: onDismiss,
5412
5593
  "aria-label": "Dismiss",
5413
5594
  className: "-mr-1 -mt-0.5 flex size-6 shrink-0 items-center justify-center rounded-control text-text-tertiary hover:bg-subtle hover:text-text-primary focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
5414
- children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_lucide_react30.X, { size: 14, "aria-hidden": "true" })
5595
+ children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react30.X, { size: 14, "aria-hidden": "true" })
5415
5596
  }
5416
5597
  )
5417
5598
  ]
@@ -5420,9 +5601,9 @@ function InlineMessage({ tone = "info", title, children, actions, onDismiss, cla
5420
5601
  }
5421
5602
 
5422
5603
  // src/FilterDrawer.tsx
5423
- var import_react30 = require("react");
5604
+ var import_react32 = require("react");
5424
5605
  var import_lucide_react31 = require("lucide-react");
5425
- var import_jsx_runtime56 = require("react/jsx-runtime");
5606
+ var import_jsx_runtime59 = require("react/jsx-runtime");
5426
5607
  var SLIDE_MS = 200;
5427
5608
  function reducedMotion() {
5428
5609
  return typeof window !== "undefined" && !!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
@@ -5440,10 +5621,10 @@ function FilterDrawer({
5440
5621
  size = "sm",
5441
5622
  testIdPrefix
5442
5623
  }) {
5443
- const [view, setViewState] = (0, import_react30.useState)(focus);
5444
- const [leaving, setLeaving] = (0, import_react30.useState)(null);
5445
- const [phase, setPhase] = (0, import_react30.useState)("run");
5446
- const [wasOpen, setWasOpen] = (0, import_react30.useState)(open);
5624
+ const [view, setViewState] = (0, import_react32.useState)(focus);
5625
+ const [leaving, setLeaving] = (0, import_react32.useState)(null);
5626
+ const [phase, setPhase] = (0, import_react32.useState)("run");
5627
+ const [wasOpen, setWasOpen] = (0, import_react32.useState)(open);
5447
5628
  if (open !== wasOpen) {
5448
5629
  setWasOpen(open);
5449
5630
  if (open) {
@@ -5458,20 +5639,20 @@ function FilterDrawer({
5458
5639
  }
5459
5640
  setViewState(next);
5460
5641
  };
5461
- (0, import_react30.useLayoutEffect)(() => {
5642
+ (0, import_react32.useLayoutEffect)(() => {
5462
5643
  if (phase !== "start") return;
5463
5644
  const raf = requestAnimationFrame(() => requestAnimationFrame(() => setPhase("run")));
5464
5645
  return () => cancelAnimationFrame(raf);
5465
5646
  }, [phase]);
5466
- (0, import_react30.useEffect)(() => {
5647
+ (0, import_react32.useEffect)(() => {
5467
5648
  if (!leaving || phase !== "run") return;
5468
5649
  const t = setTimeout(() => setLeaving(null), SLIDE_MS);
5469
5650
  return () => clearTimeout(t);
5470
5651
  }, [leaving, phase]);
5471
- const backRef = (0, import_react30.useRef)(null);
5472
- const rowRefs = (0, import_react30.useRef)(/* @__PURE__ */ new Map());
5473
- const lastView = (0, import_react30.useRef)(null);
5474
- (0, import_react30.useEffect)(() => {
5652
+ const backRef = (0, import_react32.useRef)(null);
5653
+ const rowRefs = (0, import_react32.useRef)(/* @__PURE__ */ new Map());
5654
+ const lastView = (0, import_react32.useRef)(null);
5655
+ (0, import_react32.useEffect)(() => {
5475
5656
  if (!open) return;
5476
5657
  if (view) backRef.current?.focus();
5477
5658
  else if (lastView.current) rowRefs.current.get(lastView.current)?.focus();
@@ -5484,8 +5665,8 @@ function FilterDrawer({
5484
5665
  const outgoing = phase === "start" ? void 0 : dir > 0 ? "translateX(-33%)" : "translateX(100%)";
5485
5666
  const panel = (v, rows = true) => {
5486
5667
  const s = v ? sections.find((x) => x.id === v) : void 0;
5487
- if (s) return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "border-t border-border-default px-5 pt-4", children: renderSection(s.id) });
5488
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("ul", { className: "border-t border-border-default", children: sections.map((x) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("li", { className: "border-b border-border-default", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
5668
+ if (s) return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "border-t border-border-default px-5 pt-4", children: renderSection(s.id) });
5669
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("ul", { className: "border-t border-border-default", children: sections.map((x) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("li", { className: "border-b border-border-default", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
5489
5670
  "button",
5490
5671
  {
5491
5672
  ref: rows ? (el) => {
@@ -5497,7 +5678,7 @@ function FilterDrawer({
5497
5678
  "data-testid": testIdPrefix && `${testIdPrefix}-row-${x.id}`,
5498
5679
  className: "flex w-full items-center gap-3 px-5 py-3.5 text-left transition-colors hover:bg-subtle focus-visible:outline-solid focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-border-focus",
5499
5680
  children: [
5500
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5681
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
5501
5682
  x.icon,
5502
5683
  {
5503
5684
  size: 17,
@@ -5505,22 +5686,22 @@ function FilterDrawer({
5505
5686
  className: x.badge ? "text-brand-primaryAction" : "text-text-secondary"
5506
5687
  }
5507
5688
  ),
5508
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "flex-1 text-sm font-medium text-text-primary", children: x.label }),
5509
- x.badge && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Badge, { tone: "brand", children: x.badge }),
5510
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_lucide_react31.ChevronRight, { size: 16, "aria-hidden": "true", className: "shrink-0 text-text-secondary" })
5689
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "flex-1 text-sm font-medium text-text-primary", children: x.label }),
5690
+ x.badge && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Badge, { tone: "brand", children: x.badge }),
5691
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react31.ChevronRight, { size: 16, "aria-hidden": "true", className: "shrink-0 text-text-secondary" })
5511
5692
  ]
5512
5693
  }
5513
5694
  ) }, x.id)) });
5514
5695
  };
5515
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5696
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
5516
5697
  Drawer,
5517
5698
  {
5518
5699
  open,
5519
5700
  onClose,
5520
5701
  size,
5521
5702
  testIdPrefix,
5522
- title: focused ? /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { className: "flex items-center gap-1.5", children: [
5523
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5703
+ title: focused ? /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("span", { className: "flex items-center gap-1.5", children: [
5704
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
5524
5705
  "button",
5525
5706
  {
5526
5707
  ref: backRef,
@@ -5529,23 +5710,23 @@ function FilterDrawer({
5529
5710
  "aria-label": "Back to all filters",
5530
5711
  "data-testid": testIdPrefix && `${testIdPrefix}-back`,
5531
5712
  className: "-ml-1.5 rounded-control p-1 text-text-secondary hover:bg-subtle hover:text-text-primary focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
5532
- children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_lucide_react31.ChevronLeft, { size: 18, "aria-hidden": "true" })
5713
+ children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react31.ChevronLeft, { size: 18, "aria-hidden": "true" })
5533
5714
  }
5534
5715
  ),
5535
5716
  focused.label,
5536
- focused.info && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(InfoTip, { text: focused.info, label: `About ${focused.label}` })
5537
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { className: "flex items-center gap-2.5", children: [
5717
+ focused.info && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(InfoTip, { text: focused.info, label: `About ${focused.label}` })
5718
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("span", { className: "flex items-center gap-2.5", children: [
5538
5719
  "Filters",
5539
- activeCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Badge, { tone: "brandSolid", kind: "count", children: activeCount })
5720
+ activeCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Badge, { tone: "brandSolid", kind: "count", children: activeCount })
5540
5721
  ] }),
5541
5722
  footer: focused ? (
5542
5723
  // Picks are kept as they're made; only See results, on the list, applies them.
5543
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "flex w-full items-center", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Button, { variant: "link", size: "md", onClick: () => onClearSection(focused.id), className: "px-0", children: "Clear" }) })
5544
- ) : /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex w-full items-center justify-between gap-2", children: [
5545
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Button, { variant: "link", size: "md", onClick: onClearAll, className: "px-0", children: "Clear all" }),
5546
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex items-center gap-2", children: [
5547
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Button, { variant: "secondary", size: "md", onClick: onClose, children: "Cancel" }),
5548
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5724
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "flex w-full items-center", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Button, { variant: "link", size: "md", onClick: () => onClearSection(focused.id), className: "px-0", children: "Clear" }) })
5725
+ ) : /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex w-full items-center justify-between gap-2", children: [
5726
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Button, { variant: "link", size: "md", onClick: onClearAll, className: "px-0", children: "Clear all" }),
5727
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex items-center gap-2", children: [
5728
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Button, { variant: "secondary", size: "md", onClick: onClose, children: "Cancel" }),
5729
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
5549
5730
  Button,
5550
5731
  {
5551
5732
  variant: "primary",
@@ -5559,8 +5740,8 @@ function FilterDrawer({
5559
5740
  )
5560
5741
  ] })
5561
5742
  ] }),
5562
- children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "relative -mx-5 overflow-x-clip", children: [
5563
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5743
+ children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "relative -mx-5 overflow-x-clip", children: [
5744
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
5564
5745
  "div",
5565
5746
  {
5566
5747
  style: { transform: incoming },
@@ -5569,7 +5750,7 @@ function FilterDrawer({
5569
5750
  },
5570
5751
  view ?? "__list"
5571
5752
  ),
5572
- leaving && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5753
+ leaving && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
5573
5754
  "div",
5574
5755
  {
5575
5756
  "aria-hidden": "true",
@@ -5585,11 +5766,11 @@ function FilterDrawer({
5585
5766
  }
5586
5767
 
5587
5768
  // src/AllFiltersButton.tsx
5588
- var import_react31 = require("react");
5769
+ var import_react33 = require("react");
5589
5770
  var import_lucide_react32 = require("lucide-react");
5590
- var import_jsx_runtime57 = require("react/jsx-runtime");
5591
- var AllFiltersButton = (0, import_react31.forwardRef)(function AllFiltersButton2({ count = 0, open, className, testIdPrefix, ...rest }, ref) {
5592
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
5771
+ var import_jsx_runtime60 = require("react/jsx-runtime");
5772
+ var AllFiltersButton = (0, import_react33.forwardRef)(function AllFiltersButton2({ count = 0, open, className, testIdPrefix, ...rest }, ref) {
5773
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
5593
5774
  "button",
5594
5775
  {
5595
5776
  ref,
@@ -5601,19 +5782,19 @@ var AllFiltersButton = (0, import_react31.forwardRef)(function AllFiltersButton2
5601
5782
  className: cn(chipTriggerClass(), className),
5602
5783
  ...rest,
5603
5784
  children: [
5604
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react32.SlidersHorizontal, { size: 15, "aria-hidden": "true", className: "text-text-secondary" }),
5605
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "text-dense font-medium text-text-primary", children: "All filters" }),
5606
- count > 0 && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Badge, { tone: "brandSolid", kind: "count", children: count })
5785
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_lucide_react32.SlidersHorizontal, { size: 15, "aria-hidden": "true", className: "text-text-secondary" }),
5786
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "text-dense font-medium text-text-primary", children: "All filters" }),
5787
+ count > 0 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Badge, { tone: "brandSolid", kind: "count", children: count })
5607
5788
  ]
5608
5789
  }
5609
5790
  );
5610
5791
  });
5611
5792
 
5612
5793
  // src/Menu.tsx
5613
- var import_react32 = require("react");
5794
+ var import_react34 = require("react");
5614
5795
  var import_react_slot2 = require("@radix-ui/react-slot");
5615
5796
  var import_lucide_react33 = require("lucide-react");
5616
- var import_jsx_runtime58 = require("react/jsx-runtime");
5797
+ var import_jsx_runtime61 = require("react/jsx-runtime");
5617
5798
  var ROW_SELECTOR = '[role^="menuitem"]:not([aria-disabled="true"]):not(:disabled)';
5618
5799
  function moveFocus(e) {
5619
5800
  const keys = ["ArrowDown", "ArrowUp", "Home", "End"];
@@ -5625,8 +5806,8 @@ function moveFocus(e) {
5625
5806
  const next = e.key === "Home" ? 0 : e.key === "End" ? rows.length - 1 : e.key === "ArrowDown" ? (i + 1) % rows.length : (i - 1 + rows.length) % rows.length;
5626
5807
  rows[next].focus();
5627
5808
  }
5628
- var Menu = (0, import_react32.forwardRef)(
5629
- ({ className, testIdPrefix, onKeyDown, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
5809
+ var Menu = (0, import_react34.forwardRef)(
5810
+ ({ className, testIdPrefix, onKeyDown, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
5630
5811
  "div",
5631
5812
  {
5632
5813
  ref,
@@ -5643,24 +5824,24 @@ var Menu = (0, import_react32.forwardRef)(
5643
5824
  )
5644
5825
  );
5645
5826
  Menu.displayName = "Menu";
5646
- var MenuItem = (0, import_react32.forwardRef)(
5827
+ var MenuItem = (0, import_react34.forwardRef)(
5647
5828
  ({ className, testIdPrefix, icon, trailing, description, submenu, checked, danger, disabled, asChild = false, children, ...props }, ref) => {
5648
5829
  const Comp = asChild ? import_react_slot2.Slot : "button";
5649
5830
  const radio = checked !== void 0;
5650
- const body = /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
5651
- icon && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { "aria-hidden": "true", className: cn("flex shrink-0", danger ? "text-text-danger" : "text-text-secondary"), children: icon }),
5831
+ const body = /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_jsx_runtime61.Fragment, { children: [
5832
+ icon && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { "aria-hidden": "true", className: cn("flex shrink-0", danger ? "text-text-danger" : "text-text-secondary"), children: icon }),
5652
5833
  asChild ? (
5653
5834
  // The link's own text lands here; the link becomes the row.
5654
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react_slot2.Slottable, { children })
5655
- ) : /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("span", { className: "min-w-0 flex-1", children: [
5656
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "block truncate", children }),
5657
- description && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "block truncate text-xs text-text-tertiary", children: description })
5835
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react_slot2.Slottable, { children })
5836
+ ) : /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("span", { className: "min-w-0 flex-1", children: [
5837
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "block truncate", children }),
5838
+ description && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "block truncate text-xs text-text-tertiary", children: description })
5658
5839
  ] }),
5659
- trailing && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "ml-auto flex shrink-0 items-center text-xs text-text-secondary", children: trailing }),
5660
- radio && checked && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react33.Check, { size: 16, "aria-hidden": "true", className: "shrink-0 text-brand-primaryAction" }),
5661
- submenu && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react33.ChevronRight, { size: 16, "aria-hidden": "true", className: "shrink-0 text-text-secondary" })
5840
+ trailing && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "ml-auto flex shrink-0 items-center text-xs text-text-secondary", children: trailing }),
5841
+ radio && checked && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_lucide_react33.Check, { size: 16, "aria-hidden": "true", className: "shrink-0 text-brand-primaryAction" }),
5842
+ submenu && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_lucide_react33.ChevronRight, { size: 16, "aria-hidden": "true", className: "shrink-0 text-text-secondary" })
5662
5843
  ] });
5663
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
5844
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
5664
5845
  Comp,
5665
5846
  {
5666
5847
  ref,
@@ -5687,7 +5868,7 @@ var MenuItem = (0, import_react32.forwardRef)(
5687
5868
  );
5688
5869
  MenuItem.displayName = "MenuItem";
5689
5870
  function MenuLabel({ className, testIdPrefix, children }) {
5690
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
5871
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
5691
5872
  "div",
5692
5873
  {
5693
5874
  role: "presentation",
@@ -5698,7 +5879,7 @@ function MenuLabel({ className, testIdPrefix, children }) {
5698
5879
  );
5699
5880
  }
5700
5881
  function MenuSeparator({ className, testIdPrefix }) {
5701
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { role: "separator", "data-testid": testIdPrefix, className: cn("-mx-1 my-1 border-t border-border-default", className) });
5882
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { role: "separator", "data-testid": testIdPrefix, className: cn("-mx-1 my-1 border-t border-border-default", className) });
5702
5883
  }
5703
5884
  // Annotate the CommonJS export names for ESM import in node:
5704
5885
  0 && (module.exports = {
@@ -5709,8 +5890,10 @@ function MenuSeparator({ className, testIdPrefix }) {
5709
5890
  AllFiltersButton,
5710
5891
  Badge,
5711
5892
  BarChartPlaceholder,
5893
+ BarList,
5712
5894
  Button,
5713
5895
  Card,
5896
+ ChartLegend,
5714
5897
  CheckBox,
5715
5898
  CheckBoxBox,
5716
5899
  ChipContent,
@@ -5729,6 +5912,7 @@ function MenuSeparator({ className, testIdPrefix }) {
5729
5912
  Freshness,
5730
5913
  InfoTip,
5731
5914
  InlineMessage,
5915
+ LegendItem,
5732
5916
  LineChartPlaceholder,
5733
5917
  MediaLabel,
5734
5918
  Menu,
@@ -5757,6 +5941,8 @@ function MenuSeparator({ className, testIdPrefix }) {
5757
5941
  SelectionPicker,
5758
5942
  SortButton,
5759
5943
  StackedColumnPlaceholder,
5944
+ StatStrip,
5945
+ StatTile,
5760
5946
  SuggestionChip,
5761
5947
  TablePagination,
5762
5948
  Tabs,