@mediaradar/design-components 0.50.1 → 0.54.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -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,8 +50,13 @@ __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,
56
+ Menu: () => Menu,
57
+ MenuItem: () => MenuItem,
58
+ MenuLabel: () => MenuLabel,
59
+ MenuSeparator: () => MenuSeparator,
53
60
  Modal: () => Modal,
54
61
  MultiSelectFilter: () => MultiSelectFilter,
55
62
  NO_RESULTS_BODY: () => NO_RESULTS_BODY,
@@ -72,6 +79,8 @@ __export(index_exports, {
72
79
  SelectionPicker: () => SelectionPicker,
73
80
  SortButton: () => SortButton,
74
81
  StackedColumnPlaceholder: () => StackedColumnPlaceholder,
82
+ StatStrip: () => StatStrip,
83
+ StatTile: () => StatTile,
75
84
  SuggestionChip: () => SuggestionChip,
76
85
  TablePagination: () => TablePagination,
77
86
  Tabs: () => Tabs,
@@ -317,6 +326,12 @@ function AdvertiserQuickFilter({
317
326
  setOpen(false);
318
327
  setQ("");
319
328
  };
329
+ const clearAll = () => {
330
+ setDraft(clearValue);
331
+ onChange(clearValue);
332
+ setOpen(false);
333
+ setQ("");
334
+ };
320
335
  (0, import_react2.useEffect)(() => {
321
336
  if (!open) return;
322
337
  inputRef.current?.focus();
@@ -394,7 +409,7 @@ function AdvertiserQuickFilter({
394
409
  "div",
395
410
  {
396
411
  className: cn(
397
- "absolute top-[calc(100%+8px)] z-30 flex w-72 flex-col overflow-hidden rounded-card border border-border-default bg-surface shadow-overlay",
412
+ "absolute top-full mt-2 z-30 flex w-72 flex-col overflow-hidden rounded-card border border-border-default bg-surface shadow-overlay",
398
413
  align === "right" ? "right-0" : "left-0"
399
414
  ),
400
415
  role: "dialog",
@@ -428,7 +443,7 @@ function AdvertiserQuickFilter({
428
443
  }
429
444
  )
430
445
  ] }) }),
431
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "max-h-[300px] overflow-y-auto p-1", children: [
446
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "max-h-75 overflow-y-auto p-1", children: [
432
447
  selectedOptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "mb-1 border-b border-border-default pb-1", children: [
433
448
  /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
434
449
  "button",
@@ -522,7 +537,7 @@ function AdvertiserQuickFilter({
522
537
  {
523
538
  type: "button",
524
539
  "data-testid": testIdPrefix && `${testIdPrefix}-clear-all`,
525
- onClick: () => setDraft(clearValue),
540
+ onClick: clearAll,
526
541
  disabled: draft.length === 0,
527
542
  className: "text-dense font-medium text-text-secondary transition-colors hover:text-text-primary disabled:opacity-40 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
528
543
  children: "Clear all"
@@ -585,7 +600,7 @@ function OptionRow({
585
600
  className: cn(
586
601
  // scroll-my-1: Tab scrolls the list just far enough to show the box,
587
602
  // which would leave its 3px ring cut off at the list's edge.
588
- "flex h-[18px] w-[18px] shrink-0 scroll-my-1 items-center justify-center rounded-[5px] border transition-colors",
603
+ "flex h-4.5 w-4.5 shrink-0 scroll-my-1 items-center justify-center rounded-small border transition-colors",
589
604
  "focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
590
605
  checked ? "border-transparent bg-brand-primaryAction text-brand-onprimary" : "border-border-interactive bg-surface hover:border-brand-primaryAction"
591
606
  ),
@@ -647,7 +662,7 @@ var KIND = {
647
662
  // Square-ish and centred, with a floor width so a 1-digit and a 3-digit
648
663
  // count are the same shape, and lining figures so the width does not shift
649
664
  // as the number changes.
650
- count: "h-[18px] min-w-[18px] justify-center px-1.5 tabular-nums",
665
+ count: "h-4.5 min-w-4.5 justify-center px-1.5 tabular-nums",
651
666
  // The only kind that shouts. Caps need the letterspacing -- caps set tight
652
667
  // are harder to read than the sentence case they replaced.
653
668
  eyebrow: "px-2.5 py-1 uppercase tracking-wider",
@@ -1091,7 +1106,7 @@ function DateRangeFilter({
1091
1106
  {
1092
1107
  "data-testid": testIdPrefix && `${testIdPrefix}-popover`,
1093
1108
  ref: popRef,
1094
- className: `absolute z-30 flex overflow-hidden rounded-card border border-border-default bg-surface shadow-overlay ${placement === "right" ? "bottom-0 left-full ml-2" : `${above ? "bottom-full mb-2" : "top-[calc(100%+8px)]"} ${align === "right" ? "right-0" : "left-0"}`}`,
1109
+ className: `absolute z-30 flex overflow-hidden rounded-card border border-border-default bg-surface shadow-overlay ${placement === "right" ? "bottom-0 left-full ml-2" : `${above ? "bottom-full mb-2" : "top-full mt-2"} ${align === "right" ? "right-0" : "left-0"}`}`,
1095
1110
  role: "dialog",
1096
1111
  "aria-label": "Select date range",
1097
1112
  children: [
@@ -1116,7 +1131,7 @@ function DateRangeFilter({
1116
1131
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex gap-8", children: [0, 1].map((offset) => {
1117
1132
  const m = addMonths(leftMonth, offset);
1118
1133
  const grid = monthGrid(m.getFullYear(), m.getMonth());
1119
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w-[252px]", children: [
1134
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w-63", children: [
1120
1135
  /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "mb-2 flex items-center justify-between", children: [
1121
1136
  offset === 0 ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(NavBtn, { onClick: () => setLeftMonth(addMonths(leftMonth, -1)), "aria-label": "Previous month", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.ChevronLeft, { size: 16 }) }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "h-7 w-7" }),
1122
1137
  /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { id: `${monthIdBase}-m${offset}`, "aria-live": "polite", className: "text-panel-title font-semibold text-text-primary", children: [
@@ -1151,7 +1166,7 @@ function DateRangeFilter({
1151
1166
  "aria-pressed": endpoint || inRange,
1152
1167
  className: "relative flex h-9 items-center justify-center focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-border-focus",
1153
1168
  children: [
1154
- band && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: `absolute inset-y-[3px] bg-ai-tint ${band}`, "aria-hidden": "true" }),
1169
+ band && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: `absolute inset-y-1 bg-ai-tint ${band}`, "aria-hidden": "true" }),
1155
1170
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1156
1171
  "span",
1157
1172
  {
@@ -1213,7 +1228,7 @@ function DateRangeFilter({
1213
1228
  function Field({ label, value }) {
1214
1229
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
1215
1230
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "text-xs font-medium text-text-secondary", children: label }),
1216
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex h-10 min-w-[140px] items-center rounded-control border border-border-strong bg-input px-3 text-sm font-medium text-text-primary", children: value })
1231
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex h-10 min-w-35 items-center rounded-control border border-border-strong bg-input px-3 text-sm font-medium text-text-primary", children: value })
1217
1232
  ] });
1218
1233
  }
1219
1234
  function NavBtn({ children, onClick, ...rest }) {
@@ -1332,7 +1347,7 @@ var SearchBar = (0, import_react5.forwardRef)(function SearchBar2({
1332
1347
  // flex-auto, not flex-1: flex-1's 0% basis took the height away in a
1333
1348
  // column (a filter panel's stack), squashing the sm box from 32px to
1334
1349
  // its text's 22px. auto keeps the h-8/10/11 and still fills a row.
1335
- "relative flex min-w-[200px] flex-auto items-stretch rounded-control border border-border-strong bg-input focus-within:outline-2 focus-within:outline-offset-1 focus-within:outline-border-focus",
1350
+ "relative flex min-w-50 flex-auto items-stretch rounded-control border border-border-strong bg-input focus-within:outline-2 focus-within:outline-offset-1 focus-within:outline-border-focus",
1336
1351
  HEIGHT[size],
1337
1352
  className
1338
1353
  ),
@@ -1540,7 +1555,7 @@ var SearchBar = (0, import_react5.forwardRef)(function SearchBar2({
1540
1555
  role: "dialog",
1541
1556
  "aria-label": "Search match type",
1542
1557
  "data-testid": testIdPrefix && `${testIdPrefix}-mode-popover`,
1543
- className: "absolute right-0 top-[calc(100%+8px)] z-50 w-[400px] rounded-card border border-border-default bg-surface p-3 shadow-overlay",
1558
+ className: "absolute right-0 top-full mt-2 z-50 w-100 rounded-card border border-border-default bg-surface p-3 shadow-overlay",
1544
1559
  children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { role: "radiogroup", "aria-label": "Search match type", className: "flex flex-col", children: [
1545
1560
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1546
1561
  ModeRow,
@@ -1737,7 +1752,7 @@ function RowInfoTip({ text }) {
1737
1752
  {
1738
1753
  id,
1739
1754
  hidden: !open,
1740
- className: "absolute left-0 top-[calc(100%+6px)] z-40 w-[220px] rounded-control border border-border-default bg-surface px-2.5 py-1.5 text-xs font-normal leading-snug text-text-secondary shadow-overlay",
1755
+ className: "absolute left-0 top-full mt-1.5 z-40 w-55 rounded-control border border-border-default bg-surface px-2.5 py-1.5 text-xs font-normal leading-snug text-text-secondary shadow-overlay",
1741
1756
  children: text
1742
1757
  }
1743
1758
  )
@@ -1990,7 +2005,7 @@ function DataScopeFilter({ value, onChange, align = "right", className, testIdPr
1990
2005
  "aria-label": "Data",
1991
2006
  "data-testid": testIdPrefix && `${testIdPrefix}-popover`,
1992
2007
  className: cn(
1993
- "absolute top-[calc(100%+8px)] z-30 min-w-[220px] overflow-hidden rounded-card border border-border-default bg-surface p-1 shadow-overlay",
2008
+ "absolute top-full mt-2 z-30 min-w-55 overflow-hidden rounded-card border border-border-default bg-surface p-1 shadow-overlay",
1994
2009
  align === "right" ? "right-0" : "left-0"
1995
2010
  ),
1996
2011
  children: [
@@ -2184,7 +2199,7 @@ function SelectFilter({
2184
2199
  ),
2185
2200
  role: loading || error ? "group" : "listbox",
2186
2201
  "aria-label": caption,
2187
- children: loading ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(MenuLoading, {}) : error ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(MenuError, { onRetry }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "max-h-[280px] overflow-y-auto p-1", children: options.map((o) => {
2202
+ children: loading ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(MenuLoading, {}) : error ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(MenuError, { onRetry }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "max-h-70 overflow-y-auto p-1", children: options.map((o) => {
2188
2203
  const selected = o === value;
2189
2204
  return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
2190
2205
  "button",
@@ -2223,23 +2238,28 @@ function SelectFilter({
2223
2238
  // src/Card.tsx
2224
2239
  var import_react9 = require("react");
2225
2240
  var import_jsx_runtime14 = require("react/jsx-runtime");
2226
- 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";
2227
2243
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2228
2244
  "article",
2229
2245
  {
2230
2246
  ref,
2231
2247
  className: cn(
2232
- "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",
2233
2250
  // Interactive hover: deeper drop shadow only -- no elevation/transform.
2234
- !staticCard && "group transition-shadow hover:shadow-overlay",
2251
+ !staticCard && !chart && "group transition-shadow hover:shadow-overlay",
2235
2252
  className
2236
2253
  ),
2237
2254
  "data-testid": testIdPrefix,
2238
2255
  ...rest,
2239
2256
  children: title ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-1 flex-col p-card-padding", children: [
2240
2257
  /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-start justify-between gap-2", children: [
2241
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { children: [
2242
- /* @__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
+ ] }),
2243
2263
  subtitle && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "mt-0.5 text-xs leading-snug text-text-tertiary", children: subtitle })
2244
2264
  ] }),
2245
2265
  action && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "shrink-0 text-text-tertiary", children: action })
@@ -2250,9 +2270,162 @@ var Card = (0, import_react9.forwardRef)(function Card2({ staticCard, title, tit
2250
2270
  );
2251
2271
  });
2252
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
+
2253
2426
  // src/NoResultsEmptyState.tsx
2254
2427
  var import_lucide_react11 = require("lucide-react");
2255
- var import_jsx_runtime15 = require("react/jsx-runtime");
2428
+ var import_jsx_runtime18 = require("react/jsx-runtime");
2256
2429
  var NO_RESULTS_TITLE = "No results match your filters";
2257
2430
  var NO_RESULTS_BODY = "Your filters may be too narrow, conflict with each other, or have no activity in this period.";
2258
2431
  function noResultsBody(workspaceName) {
@@ -2275,12 +2448,12 @@ function NoResultsEmptyState({
2275
2448
  const showClear = hasFilters !== false && Boolean(onClearFilters);
2276
2449
  const showEdit = Boolean(onEditFilters);
2277
2450
  const hasActions = showClear || showEdit || Boolean(actions && actions.length > 0);
2278
- 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: [
2279
- /* @__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" }) }),
2280
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h2", { className: "text-base font-semibold text-text-primary", children: title }),
2281
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "max-w-[420px] text-dense leading-relaxed text-text-secondary", children: bodyText }),
2282
- hasActions && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "mt-1 flex flex-col items-center gap-3", children: [
2283
- 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)(
2284
2457
  "button",
2285
2458
  {
2286
2459
  type: "button",
@@ -2290,7 +2463,7 @@ function NoResultsEmptyState({
2290
2463
  children: "Clear all filters"
2291
2464
  }
2292
2465
  ),
2293
- showEdit && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2466
+ showEdit && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2294
2467
  "button",
2295
2468
  {
2296
2469
  type: "button",
@@ -2300,7 +2473,7 @@ function NoResultsEmptyState({
2300
2473
  children: "Edit filters"
2301
2474
  }
2302
2475
  ),
2303
- actions?.map((action, i) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2476
+ actions?.map((action, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2304
2477
  "button",
2305
2478
  {
2306
2479
  type: "button",
@@ -2315,11 +2488,11 @@ function NoResultsEmptyState({
2315
2488
  }
2316
2489
 
2317
2490
  // src/WorkspaceSelectedCard.tsx
2318
- var import_react10 = require("react");
2491
+ var import_react12 = require("react");
2319
2492
  var import_lucide_react12 = require("lucide-react");
2320
- var import_jsx_runtime16 = require("react/jsx-runtime");
2493
+ var import_jsx_runtime19 = require("react/jsx-runtime");
2321
2494
  function WorkspaceSelectedCard({ groups, className, testIdPrefix }) {
2322
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2495
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2323
2496
  "aside",
2324
2497
  {
2325
2498
  className: cn(
@@ -2327,7 +2500,7 @@ function WorkspaceSelectedCard({ groups, className, testIdPrefix }) {
2327
2500
  className
2328
2501
  ),
2329
2502
  "data-testid": testIdPrefix,
2330
- 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)) })
2331
2504
  }
2332
2505
  );
2333
2506
  }
@@ -2339,15 +2512,15 @@ function SummaryGroupItem({
2339
2512
  const ownCount = group.items.length;
2340
2513
  const subCount = (group.subGroups ?? []).reduce((n, sg) => n + sg.items.length, 0);
2341
2514
  const expandCount = ownCount + subCount;
2342
- const [open, setOpen] = (0, import_react10.useState)(expandCount > 0);
2343
- const wasEmpty = (0, import_react10.useRef)(expandCount === 0);
2344
- (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)(() => {
2345
2518
  if (wasEmpty.current && expandCount > 0) setOpen(true);
2346
2519
  else if (expandCount === 0) setOpen(false);
2347
2520
  wasEmpty.current = expandCount === 0;
2348
2521
  }, [expandCount]);
2349
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: nested ? "" : "py-3 first:pt-0 last:pb-0", children: [
2350
- /* @__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)(
2351
2524
  "button",
2352
2525
  {
2353
2526
  type: "button",
@@ -2356,7 +2529,7 @@ function SummaryGroupItem({
2356
2529
  "data-testid": testIdPrefix && `${testIdPrefix}-group-${group.id}`,
2357
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",
2358
2531
  children: [
2359
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2532
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2360
2533
  import_lucide_react12.ChevronDown,
2361
2534
  {
2362
2535
  size: 14,
@@ -2364,37 +2537,37 @@ function SummaryGroupItem({
2364
2537
  className: cn("shrink-0 text-text-secondary transition-transform", !open && "-rotate-90")
2365
2538
  }
2366
2539
  ),
2367
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: cn("truncate font-semibold text-text-primary", nested ? "text-xs" : "text-dense"), children: group.label }),
2368
- /* @__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 })
2369
2542
  ]
2370
2543
  }
2371
2544
  ),
2372
- 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: [
2373
- ownCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
2374
- 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)(
2375
2548
  "div",
2376
2549
  {
2377
2550
  className: "flex items-center justify-between gap-2 rounded-control border border-border-default bg-canvas px-2 py-1",
2378
2551
  children: [
2379
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "min-w-0 flex-1", children: [
2380
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "block truncate text-xs text-text-primary", children: item.name }),
2381
- 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 })
2382
2555
  ] }),
2383
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2556
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2384
2557
  "button",
2385
2558
  {
2386
2559
  type: "button",
2387
2560
  "aria-label": `Remove ${item.name}`,
2388
2561
  onClick: () => group.onRemove(item.id),
2389
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",
2390
- 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" })
2391
2564
  }
2392
2565
  )
2393
2566
  ]
2394
2567
  },
2395
2568
  item.id
2396
2569
  )),
2397
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2570
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2398
2571
  "button",
2399
2572
  {
2400
2573
  type: "button",
@@ -2405,13 +2578,13 @@ function SummaryGroupItem({
2405
2578
  }
2406
2579
  )
2407
2580
  ] }),
2408
- 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))
2409
2582
  ] }) })
2410
2583
  ] });
2411
2584
  }
2412
2585
 
2413
2586
  // src/chart-placeholder-shared.tsx
2414
- var import_jsx_runtime17 = require("react/jsx-runtime");
2587
+ var import_jsx_runtime20 = require("react/jsx-runtime");
2415
2588
  var GRID_ROWS = [0, 25, 50, 75, 100];
2416
2589
  var Y_TICK_WIDTHS = [26, 30, 30, 26, 20];
2417
2590
  var Y_AXIS_W = 48;
@@ -2425,9 +2598,9 @@ function AxisFrame({
2425
2598
  testIdPrefix
2426
2599
  }) {
2427
2600
  const gutter = xTicks > 0 ? X_AXIS_H : 0;
2428
- 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: [
2429
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "absolute inset-y-0 right-0", style: { left: Y_AXIS_W, bottom: gutter }, children: [
2430
- 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)(
2431
2604
  "div",
2432
2605
  {
2433
2606
  className: "absolute inset-x-0 border-t border-dashed",
@@ -2435,9 +2608,9 @@ function AxisFrame({
2435
2608
  },
2436
2609
  pct
2437
2610
  )),
2438
- /* @__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 })
2439
2612
  ] }),
2440
- /* @__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)(
2441
2614
  "div",
2442
2615
  {
2443
2616
  className: "absolute right-2 h-2 -translate-y-1/2 rounded-xs bg-subtle",
@@ -2445,27 +2618,27 @@ function AxisFrame({
2445
2618
  },
2446
2619
  pct
2447
2620
  )) }),
2448
- xTicks > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2621
+ xTicks > 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2449
2622
  "div",
2450
2623
  {
2451
2624
  className: "absolute bottom-0 right-0 flex items-center",
2452
2625
  style: { left: Y_AXIS_W, height: X_AXIS_H },
2453
- 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-[26px] 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))
2454
2627
  }
2455
2628
  )
2456
2629
  ] }) });
2457
2630
  }
2458
2631
  function BlankLegend({ rows, reverse = false }) {
2459
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2632
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2460
2633
  "ul",
2461
2634
  {
2462
2635
  className: `flex flex-1 justify-center gap-1.5 ${reverse ? "flex-col-reverse" : "flex-col"}`,
2463
2636
  role: "presentation",
2464
2637
  "aria-hidden": "true",
2465
- children: Array.from({ length: rows }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("li", { className: "flex items-center justify-between gap-2", children: [
2466
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "flex items-center gap-1.5", children: [
2467
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "h-2.5 w-2.5 rounded-xs bg-subtle" }),
2468
- /* @__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)(
2469
2642
  "span",
2470
2643
  {
2471
2644
  className: "h-2 rounded-xs bg-subtle",
@@ -2473,21 +2646,21 @@ function BlankLegend({ rows, reverse = false }) {
2473
2646
  }
2474
2647
  )
2475
2648
  ] }),
2476
- /* @__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" })
2477
2650
  ] }, i))
2478
2651
  }
2479
2652
  );
2480
2653
  }
2481
2654
 
2482
2655
  // src/BarChartPlaceholder.tsx
2483
- var import_jsx_runtime18 = require("react/jsx-runtime");
2656
+ var import_jsx_runtime21 = require("react/jsx-runtime");
2484
2657
  var BAR_PROFILE = [92, 86, 76, 65, 57, 40, 30, 24, 18, 13];
2485
2658
  function BarChartPlaceholder({ height = 220, className, testIdPrefix }) {
2486
- 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)) }) });
2487
2660
  }
2488
2661
 
2489
2662
  // src/LineChartPlaceholder.tsx
2490
- var import_jsx_runtime19 = require("react/jsx-runtime");
2663
+ var import_jsx_runtime22 = require("react/jsx-runtime");
2491
2664
  var LINE_SERIES = [
2492
2665
  [58, 52, 55, 41, 45, 33, 36, 25, 28, 17],
2493
2666
  [74, 71, 66, 68, 59, 61, 54, 56, 48, 45],
@@ -2497,9 +2670,9 @@ var LINE_SERIES = [
2497
2670
  var LINE_FORECAST_FROM = 7;
2498
2671
  function LineChartPlaceholder({ height = 280, className, testIdPrefix }) {
2499
2672
  const toPath = (pts, from, to) => pts.slice(from, to).map((y, i) => `${(i + from) / (pts.length - 1) * 100},${y}`).join(" ");
2500
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(AxisFrame, { height, xTicks: LINE_SERIES[0].length, className, testIdPrefix, children: [
2501
- /* @__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: [
2502
- /* @__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)(
2503
2676
  "polyline",
2504
2677
  {
2505
2678
  points: toPath(pts, 0, LINE_FORECAST_FROM + 1),
@@ -2511,7 +2684,7 @@ function LineChartPlaceholder({ height = 280, className, testIdPrefix }) {
2511
2684
  strokeLinejoin: "round"
2512
2685
  }
2513
2686
  ),
2514
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2687
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2515
2688
  "polyline",
2516
2689
  {
2517
2690
  points: toPath(pts, LINE_FORECAST_FROM, pts.length),
@@ -2526,7 +2699,7 @@ function LineChartPlaceholder({ height = 280, className, testIdPrefix }) {
2526
2699
  )
2527
2700
  ] }, s)) }),
2528
2701
  LINE_SERIES.map(
2529
- (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)(
2530
2703
  "div",
2531
2704
  {
2532
2705
  className: "absolute h-1.5 w-1.5 -translate-x-1/2 -translate-y-1/2 rounded-full",
@@ -2543,16 +2716,16 @@ function LineChartPlaceholder({ height = 280, className, testIdPrefix }) {
2543
2716
  }
2544
2717
 
2545
2718
  // src/PieChartPlaceholder.tsx
2546
- var import_jsx_runtime20 = require("react/jsx-runtime");
2719
+ var import_jsx_runtime23 = require("react/jsx-runtime");
2547
2720
  var PIE_SEAMS = [0, 115, 180, 230, 262, 288, 310, 332];
2548
2721
  function PieChartPlaceholder({ height = 220, legendRows = 8, className, testIdPrefix }) {
2549
2722
  const r = 45;
2550
- 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: [
2551
- /* @__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: [
2552
- /* @__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)" }),
2553
2726
  PIE_SEAMS.map((deg) => {
2554
2727
  const rad = (deg - 90) * Math.PI / 180;
2555
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2728
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2556
2729
  "line",
2557
2730
  {
2558
2731
  x1: "50",
@@ -2566,12 +2739,12 @@ function PieChartPlaceholder({ height = 220, legendRows = 8, className, testIdPr
2566
2739
  );
2567
2740
  })
2568
2741
  ] }) }),
2569
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(BlankLegend, { rows: legendRows })
2742
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(BlankLegend, { rows: legendRows })
2570
2743
  ] });
2571
2744
  }
2572
2745
 
2573
2746
  // src/StackedColumnPlaceholder.tsx
2574
- var import_jsx_runtime21 = require("react/jsx-runtime");
2747
+ var import_jsx_runtime24 = require("react/jsx-runtime");
2575
2748
  var COLUMN_WEIGHTS = [20, 30, 15, 35, 24, 12, 28, 18];
2576
2749
  function columnBands(count) {
2577
2750
  const weights = Array.from({ length: count }, (_, i) => COLUMN_WEIGHTS[i % COLUMN_WEIGHTS.length]);
@@ -2586,7 +2759,7 @@ function StackedColumnPlaceholder({
2586
2759
  className,
2587
2760
  testIdPrefix
2588
2761
  }) {
2589
- 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)(
2590
2763
  "div",
2591
2764
  {
2592
2765
  style: {
@@ -2598,16 +2771,16 @@ function StackedColumnPlaceholder({
2598
2771
  },
2599
2772
  i
2600
2773
  )) });
2601
- 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: [
2602
- 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 }),
2603
- /* @__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 })
2604
2777
  ] });
2605
2778
  }
2606
2779
 
2607
2780
  // src/Tooltip.tsx
2608
- var import_react11 = require("react");
2781
+ var import_react13 = require("react");
2609
2782
  var import_react_dom3 = require("react-dom");
2610
- var import_jsx_runtime22 = require("react/jsx-runtime");
2783
+ var import_jsx_runtime25 = require("react/jsx-runtime");
2611
2784
  function addDescribedBy(el, id) {
2612
2785
  const ids = (el.getAttribute("aria-describedby") ?? "").split(" ").filter(Boolean);
2613
2786
  if (!ids.includes(id)) el.setAttribute("aria-describedby", [...ids, id].join(" "));
@@ -2643,18 +2816,18 @@ function Tooltip({
2643
2816
  variant = "surface",
2644
2817
  testIdPrefix
2645
2818
  }) {
2646
- const [anchor, setAnchor] = (0, import_react11.useState)(null);
2647
- const [boxWidth, setBoxWidth] = (0, import_react11.useState)(null);
2648
- const ref = (0, import_react11.useRef)(null);
2649
- const boxRef = (0, import_react11.useRef)(null);
2650
- const hideTimer = (0, import_react11.useRef)(null);
2651
- const showTimer = (0, import_react11.useRef)(null);
2652
- const exitTimer = (0, import_react11.useRef)(null);
2653
- const [shown, setShown] = (0, import_react11.useState)(false);
2654
- const openRef = (0, import_react11.useRef)(false);
2655
- const mountedRef = (0, import_react11.useRef)(false);
2656
- const id = (0, import_react11.useId)();
2657
- 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);
2658
2831
  const clearHideTimer = () => {
2659
2832
  if (hideTimer.current) {
2660
2833
  clearTimeout(hideTimer.current);
@@ -2673,7 +2846,7 @@ function Tooltip({
2673
2846
  exitTimer.current = null;
2674
2847
  }
2675
2848
  };
2676
- (0, import_react11.useEffect)(
2849
+ (0, import_react13.useEffect)(
2677
2850
  () => () => {
2678
2851
  clearHideTimer();
2679
2852
  clearShowTimer();
@@ -2747,7 +2920,7 @@ function Tooltip({
2747
2920
  clearHideTimer();
2748
2921
  hideTimer.current = setTimeout(hideNow, 120);
2749
2922
  };
2750
- (0, import_react11.useEffect)(() => {
2923
+ (0, import_react13.useEffect)(() => {
2751
2924
  if (!anchorRef) return;
2752
2925
  const el = anchorRef.current;
2753
2926
  if (!el) return;
@@ -2762,13 +2935,13 @@ function Tooltip({
2762
2935
  el.removeEventListener("blur", hide);
2763
2936
  };
2764
2937
  }, [anchorRef, placement, delay]);
2765
- (0, import_react11.useEffect)(() => {
2938
+ (0, import_react13.useEffect)(() => {
2766
2939
  if (!anchor) return;
2767
2940
  const onKey = (e) => e.key === "Escape" && hideNow();
2768
2941
  window.addEventListener("keydown", onKey);
2769
2942
  return () => window.removeEventListener("keydown", onKey);
2770
2943
  }, [anchor]);
2771
- (0, import_react11.useLayoutEffect)(() => {
2944
+ (0, import_react13.useLayoutEffect)(() => {
2772
2945
  if (!anchor) return;
2773
2946
  const el = boxRef.current;
2774
2947
  if (!el) return;
@@ -2793,7 +2966,7 @@ function Tooltip({
2793
2966
  }
2794
2967
  }
2795
2968
  const floating = anchor != null && typeof document !== "undefined" ? (0, import_react_dom3.createPortal)(
2796
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2969
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2797
2970
  "span",
2798
2971
  {
2799
2972
  ref: boxRef,
@@ -2824,7 +2997,7 @@ function Tooltip({
2824
2997
  document.body
2825
2998
  ) : null;
2826
2999
  if (anchorRef) return floating;
2827
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
3000
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
2828
3001
  "span",
2829
3002
  {
2830
3003
  ref,
@@ -2846,28 +3019,28 @@ function Tooltip({
2846
3019
  }
2847
3020
 
2848
3021
  // src/AdvertiserNoResults.tsx
2849
- var import_jsx_runtime23 = require("react/jsx-runtime");
3022
+ var import_jsx_runtime26 = require("react/jsx-runtime");
2850
3023
  function AdvertiserNoResults({
2851
3024
  query,
2852
3025
  hint = "Try checking your spelling or searching for a broader brand name.",
2853
3026
  className,
2854
3027
  testIdPrefix
2855
3028
  }) {
2856
- 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: [
2857
- /* @__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: [
2858
3031
  "No results found for \u201C",
2859
3032
  query,
2860
3033
  "\u201D"
2861
3034
  ] }),
2862
- /* @__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 })
2863
3036
  ] });
2864
3037
  }
2865
3038
 
2866
3039
  // src/SelectAllVisible.tsx
2867
3040
  var import_lucide_react13 = require("lucide-react");
2868
- var import_jsx_runtime24 = require("react/jsx-runtime");
3041
+ var import_jsx_runtime27 = require("react/jsx-runtime");
2869
3042
  function SelectAllVisible({ count, allSelected, onToggle, className, testIdPrefix }) {
2870
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
3043
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
2871
3044
  "button",
2872
3045
  {
2873
3046
  type: "button",
@@ -2878,7 +3051,7 @@ function SelectAllVisible({ count, allSelected, onToggle, className, testIdPrefi
2878
3051
  className
2879
3052
  ),
2880
3053
  children: [
2881
- /* @__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" }),
2882
3055
  allSelected ? `Deselect ${count} visible` : `Select all ${count} visible`
2883
3056
  ]
2884
3057
  }
@@ -2887,11 +3060,11 @@ function SelectAllVisible({ count, allSelected, onToggle, className, testIdPrefi
2887
3060
 
2888
3061
  // src/SelectedSection.tsx
2889
3062
  var import_lucide_react14 = require("lucide-react");
2890
- var import_jsx_runtime25 = require("react/jsx-runtime");
3063
+ var import_jsx_runtime28 = require("react/jsx-runtime");
2891
3064
  function SelectedSection({ count, open, onToggle, children, className, testIdPrefix }) {
2892
3065
  if (count === 0) return null;
2893
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: cn("flex flex-col", className), "data-testid": testIdPrefix, children: [
2894
- /* @__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)(
2895
3068
  "button",
2896
3069
  {
2897
3070
  type: "button",
@@ -2900,25 +3073,25 @@ function SelectedSection({ count, open, onToggle, children, className, testIdPre
2900
3073
  "aria-expanded": open,
2901
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",
2902
3075
  children: [
2903
- /* @__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") }),
2904
3077
  "Selected (",
2905
3078
  count,
2906
3079
  ")"
2907
3080
  ]
2908
3081
  }
2909
3082
  ),
2910
- 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 })
2911
3084
  ] });
2912
3085
  }
2913
3086
 
2914
3087
  // src/SelectionPicker.tsx
2915
- var import_react13 = require("react");
3088
+ var import_react15 = require("react");
2916
3089
  var import_react_dom4 = require("react-dom");
2917
3090
  var import_lucide_react15 = require("lucide-react");
2918
3091
 
2919
3092
  // src/Tabs.tsx
2920
- var import_react12 = require("react");
2921
- var import_jsx_runtime26 = require("react/jsx-runtime");
3093
+ var import_react14 = require("react");
3094
+ var import_jsx_runtime29 = require("react/jsx-runtime");
2922
3095
  function arrowKeys(e, row) {
2923
3096
  if (!row || !["ArrowLeft", "ArrowRight", "Home", "End"].includes(e.key)) return;
2924
3097
  const items = Array.from(row.querySelectorAll("button:not([disabled])"));
@@ -2929,8 +3102,8 @@ function arrowKeys(e, row) {
2929
3102
  items[next]?.click();
2930
3103
  }
2931
3104
  function Tabs({ items, value, onChange, idPrefix = "tabs", className, testIdPrefix, ...rest }) {
2932
- const row = (0, import_react12.useRef)(null);
2933
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3105
+ const row = (0, import_react14.useRef)(null);
3106
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2934
3107
  "div",
2935
3108
  {
2936
3109
  ref: row,
@@ -2941,7 +3114,7 @@ function Tabs({ items, value, onChange, idPrefix = "tabs", className, testIdPref
2941
3114
  className: cn("flex gap-6 border-b border-border-default", className),
2942
3115
  children: items.map((item) => {
2943
3116
  const on = item.value === value;
2944
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
3117
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
2945
3118
  "button",
2946
3119
  {
2947
3120
  type: "button",
@@ -2959,7 +3132,7 @@ function Tabs({ items, value, onChange, idPrefix = "tabs", className, testIdPref
2959
3132
  ),
2960
3133
  children: [
2961
3134
  item.label,
2962
- 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 })
2963
3136
  ]
2964
3137
  },
2965
3138
  item.value
@@ -2977,8 +3150,8 @@ function SegmentedControl({
2977
3150
  testIdPrefix,
2978
3151
  ...rest
2979
3152
  }) {
2980
- const row = (0, import_react12.useRef)(null);
2981
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3153
+ const row = (0, import_react14.useRef)(null);
3154
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2982
3155
  "div",
2983
3156
  {
2984
3157
  ref: row,
@@ -2989,7 +3162,7 @@ function SegmentedControl({
2989
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),
2990
3163
  children: options.map((o) => {
2991
3164
  const on = o.value === value;
2992
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3165
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2993
3166
  "button",
2994
3167
  {
2995
3168
  type: "button",
@@ -3013,7 +3186,7 @@ function SegmentedControl({
3013
3186
  }
3014
3187
 
3015
3188
  // src/SelectionPicker.tsx
3016
- var import_jsx_runtime27 = require("react/jsx-runtime");
3189
+ var import_jsx_runtime30 = require("react/jsx-runtime");
3017
3190
  function slug5(value) {
3018
3191
  return value.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "");
3019
3192
  }
@@ -3047,15 +3220,15 @@ function SelectionPicker({
3047
3220
  testIdPrefix
3048
3221
  }) {
3049
3222
  const hasAccountLists = !!accountLists;
3050
- const [source, setSource] = (0, import_react13.useState)("search");
3051
- const [query, setQuery] = (0, import_react13.useState)("");
3052
- 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)(() => {
3053
3226
  const init = {};
3054
3227
  if (defaultFilters) for (const [label, opts] of Object.entries(defaultFilters)) init[label] = new Set(opts);
3055
3228
  return init;
3056
3229
  });
3057
- const [expanded, setExpanded] = (0, import_react13.useState)(/* @__PURE__ */ new Set());
3058
- 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]);
3059
3232
  const toggleFilter = (label, opt) => {
3060
3233
  setActiveFilters((prev) => {
3061
3234
  const next = { ...prev };
@@ -3067,7 +3240,7 @@ function SelectionPicker({
3067
3240
  };
3068
3241
  const activeFilterCount = filters.reduce((n, f) => n + (activeFilters[f.label]?.size ?? 0), 0);
3069
3242
  const hasSearched = showResultsWithoutSearch || query.trim().length > 0 || !requireQuery && activeFilterCount > 0;
3070
- const filteredCatalog = (0, import_react13.useMemo)(() => {
3243
+ const filteredCatalog = (0, import_react15.useMemo)(() => {
3071
3244
  if (!hasSearched || results !== void 0) return [];
3072
3245
  const q = query.trim().toLowerCase();
3073
3246
  return catalog.filter((row) => {
@@ -3106,12 +3279,12 @@ function SelectionPicker({
3106
3279
  }
3107
3280
  };
3108
3281
  const rowGridCols = showInfoColumn ? "grid-cols-[36px_1fr_44px]" : "grid-cols-[36px_1fr]";
3109
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: cn("flex flex-col gap-4", className), "data-testid": testIdPrefix, children: [
3110
- helper && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
3111
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "text-dense text-text-secondary", children: helper }),
3112
- /* @__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" })
3113
3286
  ] }),
3114
- hasAccountLists && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3287
+ hasAccountLists && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3115
3288
  SegmentedControl,
3116
3289
  {
3117
3290
  "aria-label": "Add from",
@@ -3124,11 +3297,11 @@ function SelectionPicker({
3124
3297
  ]
3125
3298
  }
3126
3299
  ),
3127
- source === "search" && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex min-w-0 flex-col gap-3", children: [
3128
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex flex-wrap items-center gap-2", children: [
3129
- /* @__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: [
3130
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react15.Search, { size: 15, className: "text-text-secondary", "aria-hidden": "true" }),
3131
- /* @__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)(
3132
3305
  "input",
3133
3306
  {
3134
3307
  value: query,
@@ -3144,7 +3317,7 @@ function SelectionPicker({
3144
3317
  }
3145
3318
  )
3146
3319
  ] }),
3147
- filters.map((f) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3320
+ filters.map((f) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3148
3321
  FilterDropdown,
3149
3322
  {
3150
3323
  filter: f,
@@ -3156,14 +3329,14 @@ function SelectionPicker({
3156
3329
  )),
3157
3330
  toolbarExtra
3158
3331
  ] }),
3159
- !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: [
3160
- /* @__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" }) }),
3161
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex flex-col gap-1", children: [
3162
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "text-sm font-semibold text-text-primary", children: "Search to get started" }),
3163
- /* @__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." })
3164
3337
  ] })
3165
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "overflow-hidden rounded-control border border-border-default", children: [
3166
- /* @__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)(
3167
3340
  "div",
3168
3341
  {
3169
3342
  className: cn(
@@ -3171,7 +3344,7 @@ function SelectionPicker({
3171
3344
  rowGridCols
3172
3345
  ),
3173
3346
  children: [
3174
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3347
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3175
3348
  CheckBox,
3176
3349
  {
3177
3350
  checked: allSelected,
@@ -3182,18 +3355,18 @@ function SelectionPicker({
3182
3355
  testIdPrefix: testIdPrefix && `${testIdPrefix}-select-all`
3183
3356
  }
3184
3357
  ),
3185
- /* @__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)) }),
3186
- 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" })
3187
3360
  ]
3188
3361
  }
3189
3362
  ),
3190
- /* @__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) => {
3191
3364
  const isSel = selectedIds.has(row.id);
3192
3365
  const isLocked = lockedIds?.has(row.id) ?? false;
3193
3366
  const kids = getChildren?.(row);
3194
3367
  const isOpen = expanded.has(row.id);
3195
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "border-t border-border-default/60 first:border-t-0", children: [
3196
- /* @__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)(
3197
3370
  "div",
3198
3371
  {
3199
3372
  onClick: isLocked ? void 0 : () => toggleRow(row),
@@ -3206,7 +3379,7 @@ function SelectionPicker({
3206
3379
  !isLocked && isSel && "opacity-70"
3207
3380
  ),
3208
3381
  children: [
3209
- 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)(
3210
3383
  CheckBox,
3211
3384
  {
3212
3385
  checked: isSel,
@@ -3215,8 +3388,8 @@ function SelectionPicker({
3215
3388
  testIdPrefix: testIdPrefix && `${testIdPrefix}-row-${slug5(row.id)}`
3216
3389
  }
3217
3390
  ),
3218
- /* @__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)) }),
3219
- 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)(
3220
3393
  "button",
3221
3394
  {
3222
3395
  type: "button",
@@ -3230,28 +3403,28 @@ function SelectionPicker({
3230
3403
  });
3231
3404
  },
3232
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",
3233
- 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") })
3234
3407
  }
3235
- ) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3408
+ ) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3236
3409
  "span",
3237
3410
  {
3238
3411
  className: "flex h-7 w-7 items-center justify-center text-text-tertiary",
3239
3412
  title: "No additional details",
3240
- 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 })
3241
3414
  }
3242
3415
  ) })
3243
3416
  ]
3244
3417
  }
3245
3418
  ),
3246
- 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) => {
3247
3420
  const kidSel = selectedIds.has(kid.id);
3248
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
3421
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
3249
3422
  "div",
3250
3423
  {
3251
3424
  className: "flex items-center justify-between gap-2 border-t border-border-default/40 py-2 first:border-t-0",
3252
3425
  children: [
3253
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "truncate text-dense text-text-secondary", children: kid.name }),
3254
- /* @__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)(
3255
3428
  "button",
3256
3429
  {
3257
3430
  type: "button",
@@ -3262,7 +3435,7 @@ function SelectionPicker({
3262
3435
  kidSel ? "text-text-tertiary" : "text-text-link hover:bg-subtle"
3263
3436
  ),
3264
3437
  children: [
3265
- 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 }),
3266
3439
  kidSel ? "Added" : "Add"
3267
3440
  ]
3268
3441
  }
@@ -3274,7 +3447,7 @@ function SelectionPicker({
3274
3447
  }) })
3275
3448
  ] }, row.id);
3276
3449
  }) }),
3277
- !loading && !error && hasMore && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
3450
+ !loading && !error && hasMore && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
3278
3451
  "button",
3279
3452
  {
3280
3453
  type: "button",
@@ -3283,19 +3456,19 @@ function SelectionPicker({
3283
3456
  "data-testid": testIdPrefix && `${testIdPrefix}-load-more`,
3284
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",
3285
3458
  children: [
3286
- 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,
3287
3460
  loadingMore ? "Loading\u2026" : "Load more"
3288
3461
  ]
3289
3462
  }
3290
3463
  )
3291
3464
  ] })
3292
3465
  ] }),
3293
- source === "lists" && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex min-w-0 flex-col gap-3", children: [
3294
- /* @__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." }),
3295
- accountLists && accountLists.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
3296
- /* @__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) => {
3297
3470
  const on = (selectedListIds ?? []).includes(list.id);
3298
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
3471
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
3299
3472
  "button",
3300
3473
  {
3301
3474
  type: "button",
@@ -3307,19 +3480,19 @@ function SelectionPicker({
3307
3480
  on ? "border-brand-primaryAction bg-brand-primarySoft" : "border-border-default bg-surface hover:bg-subtle"
3308
3481
  ),
3309
3482
  children: [
3310
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3483
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3311
3484
  "span",
3312
3485
  {
3313
3486
  className: cn(
3314
3487
  "flex h-5 w-5 shrink-0 items-center justify-center rounded-full",
3315
3488
  on ? "text-brand-primaryAction" : "text-text-secondary"
3316
3489
  ),
3317
- 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 })
3318
3491
  }
3319
3492
  ),
3320
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("span", { className: "min-w-0 flex-1", children: [
3321
- /* @__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 }) }),
3322
- /* @__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: [
3323
3496
  list.count,
3324
3497
  " accounts \xB7 ",
3325
3498
  list.entityTypes.join(", "),
@@ -3327,13 +3500,13 @@ function SelectionPicker({
3327
3500
  formatListDate(list.updatedAt)
3328
3501
  ] })
3329
3502
  ] }),
3330
- /* @__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" })
3331
3504
  ]
3332
3505
  },
3333
3506
  list.id
3334
3507
  );
3335
3508
  }) }),
3336
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
3509
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
3337
3510
  "p",
3338
3511
  {
3339
3512
  className: "border-t border-border-default pt-2 text-right text-xs font-medium text-text-tertiary",
@@ -3345,11 +3518,11 @@ function SelectionPicker({
3345
3518
  ]
3346
3519
  }
3347
3520
  )
3348
- ] }) : /* @__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: [
3349
- /* @__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" }) }),
3350
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex flex-col gap-1", children: [
3351
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "text-sm font-semibold text-text-primary", children: "No account lists yet" }),
3352
- /* @__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." })
3353
3526
  ] })
3354
3527
  ] })
3355
3528
  ] })
@@ -3357,16 +3530,16 @@ function SelectionPicker({
3357
3530
  }
3358
3531
  var EDGE_FADE = 44;
3359
3532
  function ScrollFade({ className, children }) {
3360
- const elRef = (0, import_react13.useRef)(null);
3361
- const [edges, setEdges] = (0, import_react13.useState)({ top: false, bottom: false });
3362
- 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)(() => {
3363
3536
  const el = elRef.current;
3364
3537
  if (!el) return;
3365
3538
  const top = el.scrollTop > 2;
3366
3539
  const bottom = el.scrollTop + el.clientHeight < el.scrollHeight - 2;
3367
3540
  setEdges((prev) => prev.top === top && prev.bottom === bottom ? prev : { top, bottom });
3368
3541
  }, []);
3369
- const attach = (0, import_react13.useCallback)(
3542
+ const attach = (0, import_react15.useCallback)(
3370
3543
  (el) => {
3371
3544
  elRef.current = el;
3372
3545
  if (!el) return;
@@ -3381,7 +3554,7 @@ function ScrollFade({ className, children }) {
3381
3554
  [sync]
3382
3555
  );
3383
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;
3384
- 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 });
3385
3558
  }
3386
3559
  function formatListDate(iso) {
3387
3560
  try {
@@ -3396,19 +3569,19 @@ function FilterDropdown({
3396
3569
  onToggle,
3397
3570
  testIdPrefix
3398
3571
  }) {
3399
- const [open, setOpen] = (0, import_react13.useState)(false);
3400
- const [q, setQ] = (0, import_react13.useState)("");
3401
- const btnRef = (0, import_react13.useRef)(null);
3402
- const menuRef = (0, import_react13.useRef)(null);
3403
- 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);
3404
3577
  const searchable = filter.options.length > 8;
3405
3578
  const shownOptions = searchable && q.trim() ? filter.options.filter((o) => o.toLowerCase().includes(q.trim().toLowerCase())) : filter.options;
3406
- (0, import_react13.useLayoutEffect)(() => {
3579
+ (0, import_react15.useLayoutEffect)(() => {
3407
3580
  if (!open || !btnRef.current) return;
3408
3581
  const r = btnRef.current.getBoundingClientRect();
3409
3582
  setPos({ top: r.bottom + 6, left: r.left });
3410
3583
  }, [open]);
3411
- (0, import_react13.useEffect)(() => {
3584
+ (0, import_react15.useEffect)(() => {
3412
3585
  if (!open) {
3413
3586
  setQ("");
3414
3587
  return;
@@ -3431,8 +3604,8 @@ function FilterDropdown({
3431
3604
  const count = active.size;
3432
3605
  const label = count === 0 ? filter.label : count === 1 ? [...active][0] : "Multiple";
3433
3606
  const filterSlug = slug5(filter.label);
3434
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "relative", children: [
3435
- /* @__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)(
3436
3609
  "button",
3437
3610
  {
3438
3611
  ref: btnRef,
@@ -3443,12 +3616,12 @@ function FilterDropdown({
3443
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",
3444
3617
  children: [
3445
3618
  label,
3446
- /* @__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") })
3447
3620
  ]
3448
3621
  }
3449
3622
  ),
3450
3623
  open && pos && (0, import_react_dom4.createPortal)(
3451
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
3624
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
3452
3625
  "div",
3453
3626
  {
3454
3627
  ref: menuRef,
@@ -3457,9 +3630,9 @@ function FilterDropdown({
3457
3630
  style: { top: pos.top, left: pos.left },
3458
3631
  className: "fixed z-dropdown min-w-55 rounded-card border border-border-default bg-surface p-2 shadow-overlay",
3459
3632
  children: [
3460
- 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: [
3461
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react15.Search, { size: 14, className: "shrink-0 text-text-secondary", "aria-hidden": "true" }),
3462
- /* @__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)(
3463
3636
  "input",
3464
3637
  {
3465
3638
  autoFocus: true,
@@ -3470,14 +3643,14 @@ function FilterDropdown({
3470
3643
  }
3471
3644
  )
3472
3645
  ] }),
3473
- /* @__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) => {
3474
3647
  const on = active.has(opt);
3475
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
3648
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
3476
3649
  "label",
3477
3650
  {
3478
3651
  className: "flex cursor-pointer items-center gap-2 rounded-control px-2 py-1.5 text-dense text-text-primary hover:bg-subtle",
3479
3652
  children: [
3480
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3653
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3481
3654
  CheckBox,
3482
3655
  {
3483
3656
  checked: on,
@@ -3507,8 +3680,8 @@ function gridForColumns(columns) {
3507
3680
  }
3508
3681
 
3509
3682
  // src/PublisherBreakdownList.tsx
3510
- var import_react14 = require("react");
3511
- var import_jsx_runtime28 = require("react/jsx-runtime");
3683
+ var import_react16 = require("react");
3684
+ var import_jsx_runtime31 = require("react/jsx-runtime");
3512
3685
  var fmtM = (v) => v >= 100 ? `$${Math.round(v)}M` : `$${v.toFixed(1)}M`;
3513
3686
  function priorYearAmt(spendN, yoy) {
3514
3687
  if (yoy === "NEW" || yoy <= -100) return null;
@@ -3520,27 +3693,27 @@ function initials(name) {
3520
3693
  return name.replace(/[^a-zA-Z0-9]/g, "").slice(0, 2).toUpperCase();
3521
3694
  }
3522
3695
  function Monogram({ name, size = 28 }) {
3523
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3696
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3524
3697
  "span",
3525
3698
  {
3526
3699
  "aria-hidden": "true",
3527
- className: "flex shrink-0 items-center justify-center rounded-[6px] bg-subtle font-bold leading-none text-text-secondary",
3700
+ className: "flex shrink-0 items-center justify-center rounded-control bg-subtle font-bold leading-none text-text-secondary",
3528
3701
  style: { width: size, height: size, fontSize: Math.round(size * 0.36) },
3529
3702
  children: initials(name)
3530
3703
  }
3531
3704
  );
3532
3705
  }
3533
3706
  function BreakdownTag({ children }) {
3534
- 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 });
3535
3708
  }
3536
3709
  function DelayedTip({ label, children }) {
3537
- 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: [
3538
3711
  children,
3539
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3712
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3540
3713
  "span",
3541
3714
  {
3542
3715
  role: "tooltip",
3543
- className: "pointer-events-none invisible absolute bottom-[calc(100%+6px)] left-1/2 z-40 w-[160px] -translate-x-1/2 rounded-control border border-border-default bg-surface px-2 py-1.5 text-center text-micro font-medium leading-snug text-text-secondary opacity-0 shadow-overlay transition-[opacity,visibility] delay-1000 duration-150 group-hover/dt:visible group-hover/dt:opacity-100 group-focus/dt:visible group-focus/dt:opacity-100",
3716
+ className: "pointer-events-none invisible absolute bottom-full mb-1.5 left-1/2 z-40 w-40 -translate-x-1/2 rounded-control border border-border-default bg-surface px-2 py-1.5 text-center text-micro font-medium leading-snug text-text-secondary opacity-0 shadow-overlay transition-[opacity,visibility] delay-1000 duration-150 group-hover/dt:visible group-hover/dt:opacity-100 group-focus/dt:visible group-focus/dt:opacity-100",
3544
3717
  children: label
3545
3718
  }
3546
3719
  )
@@ -3550,22 +3723,22 @@ var COL_CURRENT = 76;
3550
3723
  var COL_PREVIOUS = 76;
3551
3724
  var COL_YOY = 44;
3552
3725
  function MetricListHeader({ className }) {
3553
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: cn("flex items-baseline gap-2 pb-2", className), children: [
3554
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "flex-1" }),
3555
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "flex shrink-0 items-center gap-2 pr-1.5", children: [
3556
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-right text-micro font-medium text-text-tertiary", style: { width: COL_CURRENT }, children: "Current" }),
3557
- /* @__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" }) }),
3558
- /* @__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" }) })
3559
3732
  ] })
3560
3733
  ] });
3561
3734
  }
3562
3735
  function MetricCells({ spendN, yoy }) {
3563
3736
  const prior = priorYearAmt(spendN, yoy);
3564
3737
  const up = yoy !== "NEW" && yoy >= 0;
3565
- return /* @__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-xs font-bold tabular-nums text-text-primary", style: { width: COL_CURRENT }, children: fmtM(spendN) }),
3567
- /* @__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" }),
3568
- /* @__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: [
3569
3742
  up ? "+" : "\u2212",
3570
3743
  Math.abs(yoy),
3571
3744
  "%"
@@ -3581,48 +3754,48 @@ function PublisherBreakdownList({
3581
3754
  className,
3582
3755
  testIdPrefix
3583
3756
  }) {
3584
- const [showAll, setShowAll] = (0, import_react14.useState)(false);
3757
+ const [showAll, setShowAll] = (0, import_react16.useState)(false);
3585
3758
  const visible = showAll ? rows : rows.slice(0, defaultVisibleCount);
3586
3759
  const rowPad = padded ? "px-5" : "";
3587
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: cn("flex flex-col", className), "data-testid": testIdPrefix, children: [
3588
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-col", children: [
3589
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(MetricListHeader, { className: rowPad }),
3590
- 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: [
3591
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex min-w-0 items-center gap-2.5", children: [
3592
- renderLogo ? renderLogo(p) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Monogram, { name: p.brand, size: 28 }),
3593
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "min-w-0", children: [
3594
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-wrap items-center gap-1.5", children: [
3595
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-sm font-semibold text-text-primary", children: p.brand }),
3596
- 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))
3597
3770
  ] }),
3598
- /* @__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 })
3599
3772
  ] })
3600
3773
  ] }),
3601
- /* @__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 })
3602
3775
  ] }, p.brand))
3603
3776
  ] }),
3604
- 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: [
3605
- /* @__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: [
3606
3779
  "Showing ",
3607
3780
  visible.length,
3608
3781
  " of ",
3609
3782
  rows.length
3610
3783
  ] }),
3611
- !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: [
3612
3785
  "See all (",
3613
3786
  rows.length - defaultVisibleCount,
3614
3787
  " more)"
3615
- ] }) : /* @__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" })
3616
3789
  ] }))
3617
3790
  ] });
3618
3791
  }
3619
3792
 
3620
3793
  // src/Button.tsx
3621
- var import_react15 = require("react");
3794
+ var import_react17 = require("react");
3622
3795
  var import_react_slot = require("@radix-ui/react-slot");
3623
3796
  var import_class_variance_authority = require("class-variance-authority");
3624
3797
  var import_lucide_react16 = require("lucide-react");
3625
- var import_jsx_runtime29 = require("react/jsx-runtime");
3798
+ var import_jsx_runtime32 = require("react/jsx-runtime");
3626
3799
  var buttonVariants = (0, import_class_variance_authority.cva)(
3627
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",
3628
3801
  {
@@ -3683,7 +3856,7 @@ var buttonVariants = (0, import_class_variance_authority.cva)(
3683
3856
  }
3684
3857
  }
3685
3858
  );
3686
- var Button = (0, import_react15.forwardRef)(
3859
+ var Button = (0, import_react17.forwardRef)(
3687
3860
  ({ className, testIdPrefix, variant, size, iconOnly, asChild = false, loading = false, disabled, children, ...props }, ref) => {
3688
3861
  const shared = {
3689
3862
  className: cn(buttonVariants({ variant, size, iconOnly, className })),
@@ -3693,10 +3866,10 @@ var Button = (0, import_react15.forwardRef)(
3693
3866
  ...props
3694
3867
  };
3695
3868
  if (asChild) {
3696
- 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 });
3697
3870
  }
3698
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("button", { ref, ...shared, children: [
3699
- 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" }),
3700
3873
  children
3701
3874
  ] });
3702
3875
  }
@@ -3704,7 +3877,7 @@ var Button = (0, import_react15.forwardRef)(
3704
3877
  Button.displayName = "Button";
3705
3878
 
3706
3879
  // src/FilterDropdownFooter.tsx
3707
- var import_jsx_runtime30 = require("react/jsx-runtime");
3880
+ var import_jsx_runtime33 = require("react/jsx-runtime");
3708
3881
  function FilterDropdownFooter({
3709
3882
  onClear,
3710
3883
  onApply,
@@ -3713,7 +3886,7 @@ function FilterDropdownFooter({
3713
3886
  className,
3714
3887
  testIdPrefix
3715
3888
  }) {
3716
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
3889
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
3717
3890
  "div",
3718
3891
  {
3719
3892
  className: cn(
@@ -3723,17 +3896,17 @@ function FilterDropdownFooter({
3723
3896
  ),
3724
3897
  "data-testid": testIdPrefix,
3725
3898
  children: [
3726
- onClear && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Button, { type: "button", variant: "ghost", size: "sm", onClick: onClear, children: clearLabel }),
3727
- /* @__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 })
3728
3901
  ]
3729
3902
  }
3730
3903
  );
3731
3904
  }
3732
3905
 
3733
3906
  // src/NameListModal.tsx
3734
- var import_react16 = require("react");
3907
+ var import_react18 = require("react");
3735
3908
  var import_react_dom5 = require("react-dom");
3736
- var import_jsx_runtime31 = require("react/jsx-runtime");
3909
+ var import_jsx_runtime34 = require("react/jsx-runtime");
3737
3910
  function NameListModal({
3738
3911
  title,
3739
3912
  initialName,
@@ -3746,21 +3919,21 @@ function NameListModal({
3746
3919
  className,
3747
3920
  testIdPrefix
3748
3921
  }) {
3749
- const [name, setName] = (0, import_react16.useState)(initialName);
3750
- const [checked, setChecked] = (0, import_react16.useState)(
3922
+ const [name, setName] = (0, import_react18.useState)(initialName);
3923
+ const [checked, setChecked] = (0, import_react18.useState)(
3751
3924
  () => Object.fromEntries((options ?? []).map((o) => [o.key, !!o.initial]))
3752
3925
  );
3753
3926
  const toggle = (key) => setChecked((c) => ({ ...c, [key]: !c[key] }));
3754
- const dialogRef = (0, import_react16.useRef)(null);
3755
- const titleId = (0, import_react16.useId)();
3756
- const fieldId = (0, import_react16.useId)();
3757
- (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)(() => {
3758
3931
  const onKey = (e) => e.key === "Escape" && onCancel();
3759
3932
  window.addEventListener("keydown", onKey);
3760
3933
  return () => window.removeEventListener("keydown", onKey);
3761
3934
  }, [onCancel]);
3762
- const [opener] = (0, import_react16.useState)(() => typeof document === "undefined" ? null : document.activeElement);
3763
- (0, import_react16.useEffect)(
3935
+ const [opener] = (0, import_react18.useState)(() => typeof document === "undefined" ? null : document.activeElement);
3936
+ (0, import_react18.useEffect)(
3764
3937
  () => () => {
3765
3938
  const active = document.activeElement;
3766
3939
  if (!active || active === document.body) opener?.focus?.();
@@ -3787,12 +3960,12 @@ function NameListModal({
3787
3960
  // bg-scrim, not a literal: design-tokens gained a scrim token in 2.5.0.
3788
3961
  // No in-data-[theme=dark] override needed any more -- the token redefines
3789
3962
  // itself under that attribute in dark.css, so one class covers both themes.
3790
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3963
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
3791
3964
  "div",
3792
3965
  {
3793
3966
  className: "fixed inset-0 z-modal flex items-center justify-center bg-scrim px-4",
3794
3967
  onMouseDown: (e) => e.target === e.currentTarget && onCancel(),
3795
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
3968
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
3796
3969
  "div",
3797
3970
  {
3798
3971
  ref: dialogRef,
@@ -3803,10 +3976,10 @@ function NameListModal({
3803
3976
  "data-testid": testIdPrefix,
3804
3977
  className: cn("w-full max-w-110 rounded-card border border-border-default bg-surface p-5 shadow-overlay", className),
3805
3978
  children: [
3806
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("h2", { id: titleId, className: "text-base font-semibold text-text-primary", children: title }),
3807
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "mt-4 flex flex-col gap-1.5", children: [
3808
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("label", { htmlFor: fieldId, className: "text-xs font-medium text-text-secondary", children: fieldLabel }),
3809
- /* @__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)(
3810
3983
  "input",
3811
3984
  {
3812
3985
  id: fieldId,
@@ -3818,13 +3991,13 @@ function NameListModal({
3818
3991
  }
3819
3992
  )
3820
3993
  ] }),
3821
- 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: [
3822
- /* @__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 }),
3823
3996
  o.label
3824
3997
  ] }, o.key)) }),
3825
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "mt-5 flex items-center justify-end gap-2", children: [
3826
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Button, { variant: "secondary", onClick: onCancel, children: "Cancel" }),
3827
- /* @__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 })
3828
4001
  ] })
3829
4002
  ]
3830
4003
  }
@@ -3837,11 +4010,11 @@ function NameListModal({
3837
4010
 
3838
4011
  // src/FilterChipBar.tsx
3839
4012
  var import_lucide_react17 = require("lucide-react");
3840
- var import_jsx_runtime32 = require("react/jsx-runtime");
4013
+ var import_jsx_runtime35 = require("react/jsx-runtime");
3841
4014
  function FilterChipBar({ chips, onRemove, onClearAll, parkedKeys, className, testIdPrefix }) {
3842
4015
  if (chips.length === 0) return null;
3843
- 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: [
3844
- 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)(
3845
4018
  Chip,
3846
4019
  {
3847
4020
  label: c.label,
@@ -3851,7 +4024,7 @@ function FilterChipBar({ chips, onRemove, onClearAll, parkedKeys, className, tes
3851
4024
  },
3852
4025
  c.key
3853
4026
  )),
3854
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4027
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3855
4028
  "button",
3856
4029
  {
3857
4030
  type: "button",
@@ -3868,8 +4041,8 @@ function Chip({
3868
4041
  parked,
3869
4042
  onRemove
3870
4043
  }) {
3871
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { className: "group relative inline-flex", children: [
3872
- /* @__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)(
3873
4046
  "span",
3874
4047
  {
3875
4048
  className: cn(
@@ -3881,22 +4054,22 @@ function Chip({
3881
4054
  ) : "bg-subtle text-text-secondary ring-transparent group-hover:bg-border-default group-hover:text-text-primary group-hover:ring-border-interactive"
3882
4055
  ),
3883
4056
  children: [
3884
- 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" }),
3885
4058
  label,
3886
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4059
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3887
4060
  "button",
3888
4061
  {
3889
4062
  type: "button",
3890
4063
  onClick: onRemove,
3891
4064
  "aria-label": `Remove ${groupLabel}: ${label}`,
3892
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",
3893
- 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 })
3894
4067
  }
3895
4068
  )
3896
4069
  ]
3897
4070
  }
3898
4071
  ),
3899
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4072
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3900
4073
  "span",
3901
4074
  {
3902
4075
  role: "tooltip",
@@ -3908,15 +4081,15 @@ function Chip({
3908
4081
  }
3909
4082
 
3910
4083
  // src/SortButton.tsx
3911
- var import_react17 = require("react");
4084
+ var import_react19 = require("react");
3912
4085
  var import_lucide_react18 = require("lucide-react");
3913
- var import_jsx_runtime33 = require("react/jsx-runtime");
4086
+ var import_jsx_runtime36 = require("react/jsx-runtime");
3914
4087
  var ALIGN = {
3915
4088
  left: "justify-start text-left",
3916
4089
  center: "justify-center text-center",
3917
4090
  right: "justify-end text-right"
3918
4091
  };
3919
- var SortButton = (0, import_react17.forwardRef)(
4092
+ var SortButton = (0, import_react19.forwardRef)(
3920
4093
  function SortButton2({
3921
4094
  label,
3922
4095
  sortKey,
@@ -3928,9 +4101,9 @@ var SortButton = (0, import_react17.forwardRef)(
3928
4101
  className,
3929
4102
  testIdPrefix
3930
4103
  }, ref) {
3931
- 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 });
3932
4105
  const active = !disabled && sort.key === sortKey;
3933
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
4106
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
3934
4107
  "button",
3935
4108
  {
3936
4109
  ref,
@@ -3961,7 +4134,7 @@ var SortButton = (0, import_react17.forwardRef)(
3961
4134
  ),
3962
4135
  children: [
3963
4136
  label,
3964
- !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)(
3965
4138
  import_lucide_react18.ArrowUpDown,
3966
4139
  {
3967
4140
  size: 12,
@@ -3992,7 +4165,7 @@ function ariaSortFor(sort, key) {
3992
4165
 
3993
4166
  // src/Pager.tsx
3994
4167
  var import_lucide_react19 = require("lucide-react");
3995
- var import_jsx_runtime34 = require("react/jsx-runtime");
4168
+ var import_jsx_runtime37 = require("react/jsx-runtime");
3996
4169
  function pageWindow(current, total) {
3997
4170
  if (total <= 7) return Array.from({ length: total }, (_, i) => i + 1);
3998
4171
  const keep = /* @__PURE__ */ new Set([1, total, current, current - 1, current + 1]);
@@ -4008,8 +4181,8 @@ function pageWindow(current, total) {
4008
4181
  }
4009
4182
  function Pager({ page, totalPages, onPage, disabled = false, label = "Pagination", className, testIdPrefix }) {
4010
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";
4011
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("nav", { "aria-label": label, className: cn("flex items-center gap-1", className), "data-testid": testIdPrefix, children: [
4012
- /* @__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)(
4013
4186
  "button",
4014
4187
  {
4015
4188
  type: "button",
@@ -4017,11 +4190,11 @@ function Pager({ page, totalPages, onPage, disabled = false, label = "Pagination
4017
4190
  disabled: disabled || page === 1,
4018
4191
  "aria-label": "Previous page",
4019
4192
  className: cn(btn, "text-text-secondary hover:bg-subtle hover:text-text-primary"),
4020
- 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 })
4021
4194
  }
4022
4195
  ),
4023
4196
  pageWindow(page, totalPages).map(
4024
- (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)(
4025
4198
  "button",
4026
4199
  {
4027
4200
  type: "button",
@@ -4037,7 +4210,7 @@ function Pager({ page, totalPages, onPage, disabled = false, label = "Pagination
4037
4210
  p
4038
4211
  )
4039
4212
  ),
4040
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4213
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
4041
4214
  "button",
4042
4215
  {
4043
4216
  type: "button",
@@ -4045,14 +4218,14 @@ function Pager({ page, totalPages, onPage, disabled = false, label = "Pagination
4045
4218
  disabled: disabled || page === totalPages,
4046
4219
  "aria-label": "Next page",
4047
4220
  className: cn(btn, "text-text-secondary hover:bg-subtle hover:text-text-primary"),
4048
- 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 })
4049
4222
  }
4050
4223
  )
4051
4224
  ] });
4052
4225
  }
4053
4226
 
4054
4227
  // src/WorkspaceAvatar.tsx
4055
- var import_jsx_runtime35 = require("react/jsx-runtime");
4228
+ var import_jsx_runtime38 = require("react/jsx-runtime");
4056
4229
  function workspaceInitials(name) {
4057
4230
  const words = name.trim().split(/\s+/).filter(Boolean);
4058
4231
  if (words.length === 0) return "\xB7";
@@ -4071,7 +4244,7 @@ var SIZES = {
4071
4244
  lg: "h-11 w-11 text-panel-title"
4072
4245
  };
4073
4246
  function WorkspaceAvatar({ name, size = "md", className, testIdPrefix }) {
4074
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4247
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
4075
4248
  "span",
4076
4249
  {
4077
4250
  "aria-hidden": "true",
@@ -4087,20 +4260,20 @@ function WorkspaceAvatar({ name, size = "md", className, testIdPrefix }) {
4087
4260
  }
4088
4261
 
4089
4262
  // src/Toast.tsx
4090
- var import_react18 = require("react");
4263
+ var import_react20 = require("react");
4091
4264
  var import_react_dom6 = require("react-dom");
4092
4265
  var import_lucide_react20 = require("lucide-react");
4093
- var import_jsx_runtime36 = require("react/jsx-runtime");
4266
+ var import_jsx_runtime39 = require("react/jsx-runtime");
4094
4267
  var ICON = {
4095
4268
  neutral: null,
4096
- success: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react20.Check, { size: 15, className: "shrink-0", "aria-hidden": "true" }),
4097
- 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" })
4098
4271
  };
4099
4272
  function Toast({ message, action, onClose, tone = "neutral", duration, className, testIdPrefix }) {
4100
4273
  const ms = duration ?? (action ? 1e4 : 5e3);
4101
- const [paused, setPaused] = (0, import_react18.useState)(false);
4102
- const closed = (0, import_react18.useRef)(false);
4103
- (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)(() => {
4104
4277
  if (paused) return;
4105
4278
  const t = window.setTimeout(() => {
4106
4279
  if (closed.current) return;
@@ -4110,7 +4283,7 @@ function Toast({ message, action, onClose, tone = "neutral", duration, className
4110
4283
  return () => window.clearTimeout(t);
4111
4284
  }, [message, ms, paused]);
4112
4285
  return (0, import_react_dom6.createPortal)(
4113
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
4286
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
4114
4287
  "div",
4115
4288
  {
4116
4289
  role: "status",
@@ -4128,7 +4301,7 @@ function Toast({ message, action, onClose, tone = "neutral", duration, className
4128
4301
  children: [
4129
4302
  ICON[tone] && // The inverse pair, not text-success / text-warning: those are tuned
4130
4303
  // for the page, and on the toast's flipped surface amber drops to 2:1.
4131
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
4304
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4132
4305
  "span",
4133
4306
  {
4134
4307
  className: cn(
@@ -4138,8 +4311,8 @@ function Toast({ message, action, onClose, tone = "neutral", duration, className
4138
4311
  children: ICON[tone]
4139
4312
  }
4140
4313
  ),
4141
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "min-w-0", children: message }),
4142
- 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)(
4143
4316
  "button",
4144
4317
  {
4145
4318
  type: "button",
@@ -4161,14 +4334,14 @@ function Toast({ message, action, onClose, tone = "neutral", duration, className
4161
4334
  }
4162
4335
 
4163
4336
  // src/Tag.tsx
4164
- var import_jsx_runtime37 = require("react/jsx-runtime");
4337
+ var import_jsx_runtime40 = require("react/jsx-runtime");
4165
4338
  function Tag({ children, className, testIdPrefix }) {
4166
- 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 });
4167
4340
  }
4168
4341
 
4169
4342
  // src/TablePagination.tsx
4170
4343
  var import_lucide_react21 = require("lucide-react");
4171
- var import_jsx_runtime38 = require("react/jsx-runtime");
4344
+ var import_jsx_runtime41 = require("react/jsx-runtime");
4172
4345
  function TablePagination({
4173
4346
  page,
4174
4347
  perPage,
@@ -4188,7 +4361,7 @@ function TablePagination({
4188
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";
4189
4362
  const off = "disabled:pointer-events-none disabled:opacity-30";
4190
4363
  const stepBtn = cn(btn, "text-text-secondary hover:bg-subtle hover:text-text-primary", off);
4191
- 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: [
4192
4365
  rangeStart.toLocaleString(),
4193
4366
  " \u2013 ",
4194
4367
  rangeEnd.toLocaleString(),
@@ -4197,13 +4370,13 @@ function TablePagination({
4197
4370
  " ",
4198
4371
  itemLabel
4199
4372
  ] });
4200
- 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: [
4201
- /* @__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)(
4202
4375
  "div",
4203
4376
  {
4204
4377
  className: cn("flex items-center gap-2 text-dense text-text-secondary", !onPerPageChange && "invisible"),
4205
4378
  children: [
4206
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
4379
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4207
4380
  SelectFilter,
4208
4381
  {
4209
4382
  size: "sm",
@@ -4219,8 +4392,8 @@ function TablePagination({
4219
4392
  ]
4220
4393
  }
4221
4394
  ),
4222
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("nav", { className: "flex items-center gap-1", "aria-label": "Pagination", children: [
4223
- /* @__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)(
4224
4397
  "button",
4225
4398
  {
4226
4399
  type: "button",
@@ -4229,10 +4402,10 @@ function TablePagination({
4229
4402
  "aria-label": "First page",
4230
4403
  "data-testid": testIdPrefix && `${testIdPrefix}-first`,
4231
4404
  className: stepBtn,
4232
- 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" })
4233
4406
  }
4234
4407
  ),
4235
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
4408
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4236
4409
  "button",
4237
4410
  {
4238
4411
  type: "button",
@@ -4241,11 +4414,11 @@ function TablePagination({
4241
4414
  "aria-label": "Previous page",
4242
4415
  "data-testid": testIdPrefix && `${testIdPrefix}-prev`,
4243
4416
  className: stepBtn,
4244
- 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" })
4245
4418
  }
4246
4419
  ),
4247
4420
  pageWindow(current, totalPages).map(
4248
- (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)(
4249
4422
  "button",
4250
4423
  {
4251
4424
  type: "button",
@@ -4263,7 +4436,7 @@ function TablePagination({
4263
4436
  p
4264
4437
  )
4265
4438
  ),
4266
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
4439
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4267
4440
  "button",
4268
4441
  {
4269
4442
  type: "button",
@@ -4272,10 +4445,10 @@ function TablePagination({
4272
4445
  "aria-label": "Next page",
4273
4446
  "data-testid": testIdPrefix && `${testIdPrefix}-next`,
4274
4447
  className: stepBtn,
4275
- 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" })
4276
4449
  }
4277
4450
  ),
4278
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
4451
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4279
4452
  "button",
4280
4453
  {
4281
4454
  type: "button",
@@ -4284,7 +4457,7 @@ function TablePagination({
4284
4457
  "aria-label": "Last page",
4285
4458
  "data-testid": testIdPrefix && `${testIdPrefix}-last`,
4286
4459
  className: stepBtn,
4287
- 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" })
4288
4461
  }
4289
4462
  )
4290
4463
  ] }),
@@ -4293,9 +4466,9 @@ function TablePagination({
4293
4466
  }
4294
4467
 
4295
4468
  // src/DateRangePicker.tsx
4296
- var import_react19 = require("react");
4469
+ var import_react21 = require("react");
4297
4470
  var import_lucide_react22 = require("lucide-react");
4298
- var import_jsx_runtime39 = require("react/jsx-runtime");
4471
+ var import_jsx_runtime42 = require("react/jsx-runtime");
4299
4472
  var MONTH_ABBR = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
4300
4473
  var QUARTER_ABBR = ["Q1", "Q2", "Q3", "Q4"];
4301
4474
  var PRESETS = ["Rolling 3 months", "Rolling 6 months", "Rolling 12 months"];
@@ -4333,7 +4506,7 @@ function spanLabel2(label, today, formatDate, formatRange) {
4333
4506
  return `${f(s)} \u2013 ${f(e)}`;
4334
4507
  }
4335
4508
  function MiniSelect({ value, onChange, options }) {
4336
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4509
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
4337
4510
  "select",
4338
4511
  {
4339
4512
  value: String(value),
@@ -4342,7 +4515,7 @@ function MiniSelect({ value, onChange, options }) {
4342
4515
  if (opt) onChange(opt.value);
4343
4516
  },
4344
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",
4345
- 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)))
4346
4519
  }
4347
4520
  );
4348
4521
  }
@@ -4361,19 +4534,19 @@ function DateRangePicker({
4361
4534
  className,
4362
4535
  testIdPrefix
4363
4536
  }) {
4364
- const end = (0, import_react19.useMemo)(() => today ?? startOfToday(), [today]);
4537
+ const end = (0, import_react21.useMemo)(() => today ?? startOfToday(), [today]);
4365
4538
  const yearOptions = years ?? [3, 2, 1, 0].map((n) => end.getFullYear() - n);
4366
- const [open, setOpen] = (0, import_react19.useState)(false);
4367
- const [value, setValue] = (0, import_react19.useState)(defaultValue);
4368
- const [draft, setDraft] = (0, import_react19.useState)(defaultValue);
4369
- const ref = (0, import_react19.useRef)(null);
4370
- const [fromMo, setFromMo] = (0, import_react19.useState)(end.getMonth());
4371
- const [fromYr, setFromYr] = (0, import_react19.useState)(end.getFullYear() - 1);
4372
- const [toMo, setToMo] = (0, import_react19.useState)(end.getMonth());
4373
- const [toYr, setToYr] = (0, import_react19.useState)(end.getFullYear());
4374
- const [fromQ, setFromQ] = (0, import_react19.useState)(Math.floor(end.getMonth() / 3));
4375
- const [toQ, setToQ] = (0, import_react19.useState)(Math.floor(end.getMonth() / 3));
4376
- (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)(() => {
4377
4550
  const [s, e] = resolveRange(value, end);
4378
4551
  onRangeChange?.(s, e);
4379
4552
  }, [value]);
@@ -4381,7 +4554,7 @@ function DateRangePicker({
4381
4554
  if (!open) setDraft(value);
4382
4555
  setOpen((o) => !o);
4383
4556
  };
4384
- (0, import_react19.useEffect)(() => {
4557
+ (0, import_react21.useEffect)(() => {
4385
4558
  if (!open) return;
4386
4559
  const onDown = (e) => {
4387
4560
  if (ref.current && !ref.current.contains(e.target)) setOpen(false);
@@ -4407,8 +4580,8 @@ function DateRangePicker({
4407
4580
  if (showFooter) setDraft(label);
4408
4581
  else commit(label);
4409
4582
  };
4410
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: cn("relative", className), ref, "data-testid": testIdPrefix, children: [
4411
- /* @__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)(
4412
4585
  "button",
4413
4586
  {
4414
4587
  type: "button",
@@ -4417,16 +4590,16 @@ function DateRangePicker({
4417
4590
  "aria-haspopup": "listbox",
4418
4591
  className: chipTriggerClass(),
4419
4592
  children: [
4420
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "flex flex-col gap-1 text-left leading-none", children: [
4421
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "text-control-caption leading-none text-text-tertiary", children: spanLabel2(value, end, formatDate, formatRange) }),
4422
- /* @__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 })
4423
4596
  ] }),
4424
- /* @__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") })
4425
4598
  ]
4426
4599
  }
4427
4600
  ),
4428
- open && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: cn("absolute top-[calc(100%+8px)] z-30 w-[280px] overflow-hidden rounded-card border border-border-default bg-surface py-1 shadow-overlay", align === "right" ? "right-0" : "left-0"), children: [
4429
- 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)(
4430
4603
  "button",
4431
4604
  {
4432
4605
  type: "button",
@@ -4436,26 +4609,26 @@ function DateRangePicker({
4436
4609
  },
4437
4610
  p
4438
4611
  )),
4439
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "mt-1 border-t border-border-default px-3 pb-2 pt-2", children: [
4440
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "text-dense font-semibold text-text-primary", children: "Custom range" }),
4441
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "mt-2 flex flex-col gap-2", children: [
4442
- /* @__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: [
4443
4616
  "From",
4444
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "flex gap-1", children: [
4445
- granularity === "month" && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(MiniSelect, { value: fromMo, onChange: setFromMo, options: MONTH_ABBR.map((mm, i) => ({ label: mm, value: i })) }),
4446
- granularity === "quarter" && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(MiniSelect, { value: fromQ, onChange: setFromQ, options: QUARTER_ABBR.map((qq, i) => ({ label: qq, value: i })) }),
4447
- /* @__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 })) })
4448
4621
  ] })
4449
4622
  ] }),
4450
- /* @__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: [
4451
4624
  "To",
4452
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "flex gap-1", children: [
4453
- granularity === "month" && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(MiniSelect, { value: toMo, onChange: setToMo, options: MONTH_ABBR.map((mm, i) => ({ label: mm, value: i })) }),
4454
- granularity === "quarter" && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(MiniSelect, { value: toQ, onChange: setToQ, options: QUARTER_ABBR.map((qq, i) => ({ label: qq, value: i })) }),
4455
- /* @__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 })) })
4456
4629
  ] })
4457
4630
  ] }),
4458
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4631
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
4459
4632
  "button",
4460
4633
  {
4461
4634
  type: "button",
@@ -4467,15 +4640,16 @@ function DateRangePicker({
4467
4640
  )
4468
4641
  ] })
4469
4642
  ] }),
4470
- showFooter && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(FilterDropdownFooter, { onApply: () => commit(draft) })
4643
+ showFooter && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(FilterDropdownFooter, { onApply: () => commit(draft) })
4471
4644
  ] })
4472
4645
  ] });
4473
4646
  }
4474
4647
 
4475
4648
  // src/MultiSelectFilter.tsx
4476
- var import_react20 = require("react");
4649
+ var import_react22 = require("react");
4477
4650
  var import_lucide_react23 = require("lucide-react");
4478
- var import_jsx_runtime40 = require("react/jsx-runtime");
4651
+ var import_jsx_runtime43 = require("react/jsx-runtime");
4652
+ var SEARCH_AFTER = 8;
4479
4653
  function MultiSelectFilter({
4480
4654
  caption,
4481
4655
  options = [],
@@ -4485,7 +4659,7 @@ function MultiSelectFilter({
4485
4659
  selected,
4486
4660
  onChange,
4487
4661
  allLabel = "All",
4488
- searchable = false,
4662
+ searchable,
4489
4663
  searchPlaceholder,
4490
4664
  align = "left",
4491
4665
  fullIsAll = false,
@@ -4507,11 +4681,12 @@ function MultiSelectFilter({
4507
4681
  }) {
4508
4682
  const groupLeaves = (g) => g.children.length ? g.children : [{ id: g.id, label: g.label }];
4509
4683
  const leafOptions = groups ? groups.flatMap(groupLeaves) : options;
4510
- const [open, setOpen] = (0, import_react20.useState)(false);
4511
- const [q, setQ] = (0, import_react20.useState)("");
4512
- const [draft, setDraft] = (0, import_react20.useState)(selected);
4513
- const ref = (0, import_react20.useRef)(null);
4514
- const close = (0, import_react20.useCallback)(() => {
4684
+ const showSearch = searchable ?? leafOptions.length > SEARCH_AFTER;
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)(() => {
4515
4690
  setOpen(false);
4516
4691
  setQ("");
4517
4692
  if (showFooter) return;
@@ -4528,7 +4703,13 @@ function MultiSelectFilter({
4528
4703
  setOpen(false);
4529
4704
  setQ("");
4530
4705
  };
4531
- (0, import_react20.useEffect)(() => {
4706
+ const clearAll = () => {
4707
+ setDraft(clearValue);
4708
+ onChange(clearValue);
4709
+ setOpen(false);
4710
+ setQ("");
4711
+ };
4712
+ (0, import_react22.useEffect)(() => {
4532
4713
  if (!open) return;
4533
4714
  const onKey = (e) => e.key === "Escape" && close();
4534
4715
  const onClick = (e) => {
@@ -4565,9 +4746,9 @@ function MultiSelectFilter({
4565
4746
  const shown = open && !showFooter ? draft : selected;
4566
4747
  const isAll = shown.length === 0 || fullIsAll && shown.length === leafOptions.length;
4567
4748
  const value = valueLabel ?? (isAll ? allLabel : shown.length === 1 ? leafOptions.find((o) => o.id === shown[0])?.label ?? `${shown.length} selected` : `${shown.length} selected`);
4568
- const labelled = (id, label) => hints?.[id] ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("span", { className: "flex flex-col", children: [
4569
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { children: label }),
4570
- /* @__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] })
4571
4752
  ] }) : label;
4572
4753
  const ql = q.trim().toLowerCase();
4573
4754
  const items = options.filter((o) => isAvailable(o.id) && (!ql || o.label.toLowerCase().includes(ql)));
@@ -4578,8 +4759,8 @@ function MultiSelectFilter({
4578
4759
  const kids = live.filter((c) => c.label.toLowerCase().includes(ql));
4579
4760
  return kids.length ? { ...g, children: kids } : null;
4580
4761
  }).filter((g) => g !== null) : [];
4581
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: cn("relative", fullWidth && "w-full", className), ref, "data-testid": testIdPrefix, children: [
4582
- /* @__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)(
4583
4764
  "button",
4584
4765
  {
4585
4766
  type: "button",
@@ -4588,8 +4769,8 @@ function MultiSelectFilter({
4588
4769
  "data-testid": testIdPrefix && `${testIdPrefix}-trigger`,
4589
4770
  className: cn(chipTriggerClass(variant), fullWidth && "w-full justify-between"),
4590
4771
  children: [
4591
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ChipContent, { caption, value, icon }),
4592
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
4772
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ChipContent, { caption, value, icon }),
4773
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
4593
4774
  import_lucide_react23.ChevronDown,
4594
4775
  {
4595
4776
  size: 14,
@@ -4600,21 +4781,21 @@ function MultiSelectFilter({
4600
4781
  ]
4601
4782
  }
4602
4783
  ),
4603
- open && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
4784
+ open && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
4604
4785
  "div",
4605
4786
  {
4606
4787
  className: cn(
4607
- "absolute top-[calc(100%+8px)] z-30 flex flex-col overflow-hidden rounded-card border border-border-default bg-surface shadow-overlay",
4788
+ "absolute top-full mt-2 z-30 flex flex-col overflow-hidden rounded-card border border-border-default bg-surface shadow-overlay",
4608
4789
  menuWidthClass,
4609
4790
  align === "right" ? "right-0" : "left-0"
4610
4791
  ),
4611
4792
  "data-testid": testIdPrefix && `${testIdPrefix}-popover`,
4612
4793
  role: "dialog",
4613
4794
  "aria-label": caption,
4614
- 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: [
4615
- searchable && /* @__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: [
4616
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react23.Search, { size: 14, className: "text-text-secondary", "aria-hidden": "true" }),
4617
- /* @__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)(
4618
4799
  "input",
4619
4800
  {
4620
4801
  type: "text",
@@ -4624,37 +4805,37 @@ function MultiSelectFilter({
4624
4805
  className: "h-full flex-1 bg-transparent text-dense outline-hidden placeholder:text-text-tertiary"
4625
4806
  }
4626
4807
  ),
4627
- 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 }) })
4628
4809
  ] }) }),
4629
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "max-h-[280px] overflow-y-auto p-1", children: [
4810
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "max-h-70 overflow-y-auto p-1", children: [
4630
4811
  groups ? visibleGroups.map((g) => {
4631
4812
  const state = groupState(g);
4632
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { children: [
4633
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
4813
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { children: [
4814
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
4634
4815
  "button",
4635
4816
  {
4636
4817
  type: "button",
4637
4818
  onClick: () => toggleGroup(g),
4638
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",
4639
4820
  children: [
4640
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(CheckBoxBox, { checked: state === "all", indeterminate: state === "some" }),
4641
- /* @__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) }),
4642
- 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) })
4643
4824
  ]
4644
4825
  }
4645
4826
  ),
4646
4827
  g.children.map((c) => {
4647
4828
  const checked = draft.includes(c.id);
4648
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
4829
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
4649
4830
  "button",
4650
4831
  {
4651
4832
  type: "button",
4652
4833
  onClick: () => toggle(c.id),
4653
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",
4654
4835
  children: [
4655
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(CheckBoxBox, { checked }),
4656
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "flex-1 text-sm text-text-primary", children: labelled(c.id, c.label) }),
4657
- 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) })
4658
4839
  ]
4659
4840
  },
4660
4841
  c.id
@@ -4663,25 +4844,25 @@ function MultiSelectFilter({
4663
4844
  ] }, g.id);
4664
4845
  }) : items.map((o) => {
4665
4846
  const checked = draft.includes(o.id);
4666
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
4847
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
4667
4848
  "button",
4668
4849
  {
4669
4850
  type: "button",
4670
4851
  onClick: () => toggle(o.id),
4671
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",
4672
4853
  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(o.id, o.label) }),
4675
- 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) })
4676
4857
  ]
4677
4858
  },
4678
4859
  o.id
4679
4860
  );
4680
4861
  }),
4681
- (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." })
4682
4863
  ] }),
4683
- 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 }),
4684
- showFooter ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(FilterDropdownFooter, { onClear: () => setDraft(clearValue), 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)(
4685
4866
  "button",
4686
4867
  {
4687
4868
  type: "button",
@@ -4699,7 +4880,7 @@ function MultiSelectFilter({
4699
4880
  ] });
4700
4881
  }
4701
4882
  function OptionCount({ n }) {
4702
- 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: [
4703
4884
  "(",
4704
4885
  n.toLocaleString(),
4705
4886
  ")"
@@ -4707,16 +4888,16 @@ function OptionCount({ n }) {
4707
4888
  }
4708
4889
 
4709
4890
  // src/Toggle.tsx
4710
- var import_react21 = require("react");
4711
- var import_jsx_runtime41 = require("react/jsx-runtime");
4891
+ var import_react23 = require("react");
4892
+ var import_jsx_runtime44 = require("react/jsx-runtime");
4712
4893
  var SIZES2 = {
4713
- sm: { track: "h-5 w-9", knob: "h-4 w-4", on: "translate-x-[18px]" },
4714
- md: { track: "h-6 w-11", knob: "h-5 w-5", on: "translate-x-[22px]" }
4894
+ sm: { track: "h-5 w-9", knob: "h-4 w-4", on: "translate-x-4.5" },
4895
+ md: { track: "h-6 w-11", knob: "h-5 w-5", on: "translate-x-5.5" }
4715
4896
  };
4716
4897
  var OFF_TRACK = "color-mix(in srgb, var(--mr-color-border-interactive) 70%, var(--mr-color-text-secondary))";
4717
- 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) {
4718
4899
  const s = SIZES2[size];
4719
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4900
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
4720
4901
  "button",
4721
4902
  {
4722
4903
  ref,
@@ -4735,7 +4916,7 @@ var Toggle = (0, import_react21.forwardRef)(function Toggle2({ checked, onChange
4735
4916
  disabled && "cursor-not-allowed opacity-50",
4736
4917
  className
4737
4918
  ),
4738
- children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4919
+ children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
4739
4920
  "span",
4740
4921
  {
4741
4922
  className: cn(
@@ -4751,22 +4932,22 @@ var Toggle = (0, import_react21.forwardRef)(function Toggle2({ checked, onChange
4751
4932
  Toggle.displayName = "Toggle";
4752
4933
 
4753
4934
  // src/AISpark.tsx
4754
- var import_react22 = require("react");
4935
+ var import_react24 = require("react");
4755
4936
  var import_lucide_react24 = require("lucide-react");
4756
- var import_jsx_runtime42 = require("react/jsx-runtime");
4937
+ var import_jsx_runtime45 = require("react/jsx-runtime");
4757
4938
  function AISpark({ size = 16, className, testIdPrefix }) {
4758
- const id = (0, import_react22.useId)();
4759
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
4760
- /* @__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: [
4761
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("stop", { offset: "0%", stopColor: "var(--mr-color-brand-primary)" }),
4762
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("stop", { offset: "100%", className: "[stop-color:#9474ff] in-data-[theme=dark]:[stop-color:#a488ff]" })
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)" })
4763
4944
  ] }) }) }),
4764
- /* @__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" })
4765
4946
  ] });
4766
4947
  }
4767
4948
 
4768
4949
  // src/Freshness.tsx
4769
- var import_jsx_runtime43 = require("react/jsx-runtime");
4950
+ var import_jsx_runtime46 = require("react/jsx-runtime");
4770
4951
  var dotColor = {
4771
4952
  fresh: "bg-status-success",
4772
4953
  recent: "bg-status-warning",
@@ -4778,7 +4959,7 @@ var srLabel = {
4778
4959
  stale: "Older than a day"
4779
4960
  };
4780
4961
  function Freshness({ level, className, testIdPrefix }) {
4781
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
4962
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
4782
4963
  "span",
4783
4964
  {
4784
4965
  className: cn("inline-block h-1.5 w-1.5 shrink-0 rounded-full", dotColor[level], className),
@@ -4790,50 +4971,50 @@ function Freshness({ level, className, testIdPrefix }) {
4790
4971
  }
4791
4972
 
4792
4973
  // src/SectionHeading.tsx
4793
- var import_jsx_runtime44 = require("react/jsx-runtime");
4974
+ var import_jsx_runtime47 = require("react/jsx-runtime");
4794
4975
  function SectionHeading({ title, description, actions, as: Tag2 = "h2", id, className, testIdPrefix }) {
4795
- 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: [
4796
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "min-w-0", children: [
4797
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Tag2, { id, className: "text-base font-semibold text-text-primary", children: title }),
4798
- 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 })
4799
4980
  ] }),
4800
- 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 })
4801
4982
  ] });
4802
4983
  }
4803
4984
 
4804
4985
  // src/PageHeader.tsx
4805
4986
  var import_lucide_react25 = require("lucide-react");
4806
- var import_jsx_runtime45 = require("react/jsx-runtime");
4987
+ var import_jsx_runtime48 = require("react/jsx-runtime");
4807
4988
  function PageHeader({ title, description, actions, meta, back, className, testIdPrefix }) {
4808
- 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: [
4809
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "min-w-0", children: [
4810
- 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)(
4811
4992
  "a",
4812
4993
  {
4813
4994
  href: back.href ?? "#",
4814
4995
  onClick: back.onClick,
4815
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",
4816
4997
  children: [
4817
- /* @__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" }),
4818
4999
  back.label
4819
5000
  ]
4820
5001
  }
4821
5002
  ),
4822
- meta ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex flex-wrap items-center gap-x-2.5 gap-y-1", children: [
4823
- /* @__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 }),
4824
5005
  meta
4825
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("h1", { className: "text-xl font-semibold tracking-tight text-text-primary", children: title }),
4826
- 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 })
4827
5008
  ] }),
4828
- 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 })
4829
5010
  ] });
4830
5011
  }
4831
5012
 
4832
5013
  // src/Modal.tsx
4833
- var import_react23 = require("react");
5014
+ var import_react25 = require("react");
4834
5015
  var import_react_dom7 = require("react-dom");
4835
5016
  var import_lucide_react26 = require("lucide-react");
4836
- var import_jsx_runtime46 = require("react/jsx-runtime");
5017
+ var import_jsx_runtime49 = require("react/jsx-runtime");
4837
5018
  var WIDTH = {
4838
5019
  sm: "max-w-110",
4839
5020
  md: "max-w-160",
@@ -4844,12 +5025,12 @@ var WIDTH = {
4844
5025
  };
4845
5026
  var FOCUSABLE = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
4846
5027
  function Modal({ open, onClose, title, description, size = "md", footer, children, className, testIdPrefix }) {
4847
- const titleId = (0, import_react23.useId)();
4848
- const descId = (0, import_react23.useId)();
4849
- const panel = (0, import_react23.useRef)(null);
4850
- const close = (0, import_react23.useRef)(onClose);
5028
+ const titleId = (0, import_react25.useId)();
5029
+ const descId = (0, import_react25.useId)();
5030
+ const panel = (0, import_react25.useRef)(null);
5031
+ const close = (0, import_react25.useRef)(onClose);
4851
5032
  close.current = onClose;
4852
- (0, import_react23.useEffect)(() => {
5033
+ (0, import_react25.useEffect)(() => {
4853
5034
  if (!open) return;
4854
5035
  const opener = document.activeElement;
4855
5036
  const firstIn = (region) => panel.current?.querySelector(region)?.querySelector(FOCUSABLE) ?? null;
@@ -4884,12 +5065,12 @@ function Modal({ open, onClose, title, description, size = "md", footer, childre
4884
5065
  }, [open]);
4885
5066
  if (!open || typeof document === "undefined") return null;
4886
5067
  return (0, import_react_dom7.createPortal)(
4887
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
5068
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
4888
5069
  "div",
4889
5070
  {
4890
5071
  className: "fixed inset-0 z-modal flex items-center justify-center bg-scrim px-4 py-6",
4891
5072
  onMouseDown: (e) => e.target === e.currentTarget && onClose(),
4892
- children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
5073
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
4893
5074
  "div",
4894
5075
  {
4895
5076
  ref: panel,
@@ -4905,24 +5086,24 @@ function Modal({ open, onClose, title, description, size = "md", footer, childre
4905
5086
  className
4906
5087
  ),
4907
5088
  children: [
4908
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-start gap-3 px-5 pt-5 pb-3", children: [
4909
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "min-w-0 flex-1", children: [
4910
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("h2", { id: titleId, className: "text-base font-semibold text-text-primary", children: title }),
4911
- description && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { id: descId, className: "mt-0.5 text-sm text-text-secondary", children: description })
5089
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-start gap-3 px-5 pt-5 pb-3", children: [
5090
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "min-w-0 flex-1", children: [
5091
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("h2", { id: titleId, className: "text-base font-semibold text-text-primary", children: title }),
5092
+ description && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { id: descId, className: "mt-0.5 text-sm text-text-secondary", children: description })
4912
5093
  ] }),
4913
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
5094
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
4914
5095
  "button",
4915
5096
  {
4916
5097
  type: "button",
4917
5098
  onClick: onClose,
4918
5099
  "aria-label": "Close",
4919
5100
  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",
4920
- children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react26.X, { size: 16, "aria-hidden": "true" })
5101
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react26.X, { size: 16, "aria-hidden": "true" })
4921
5102
  }
4922
5103
  )
4923
5104
  ] }),
4924
- 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 }),
4925
- 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 })
5105
+ children && /* @__PURE__ */ (0, import_jsx_runtime49.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 }),
5106
+ 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 })
4926
5107
  ]
4927
5108
  }
4928
5109
  )
@@ -4933,10 +5114,10 @@ function Modal({ open, onClose, title, description, size = "md", footer, childre
4933
5114
  }
4934
5115
 
4935
5116
  // src/EmptyState.tsx
4936
- var import_jsx_runtime47 = require("react/jsx-runtime");
5117
+ var import_jsx_runtime50 = require("react/jsx-runtime");
4937
5118
  function EmptyState({ icon, title, description, action, size = "sm", className, testIdPrefix }) {
4938
5119
  const md = size === "md";
4939
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
5120
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
4940
5121
  "div",
4941
5122
  {
4942
5123
  className: cn(
@@ -4946,7 +5127,7 @@ function EmptyState({ icon, title, description, action, size = "sm", className,
4946
5127
  ),
4947
5128
  "data-testid": testIdPrefix,
4948
5129
  children: [
4949
- icon && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
5130
+ icon && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4950
5131
  "span",
4951
5132
  {
4952
5133
  "aria-hidden": "true",
@@ -4957,27 +5138,27 @@ function EmptyState({ icon, title, description, action, size = "sm", className,
4957
5138
  children: icon
4958
5139
  }
4959
5140
  ),
4960
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: cn("font-semibold text-text-primary", md ? "text-base" : "text-sm"), children: title }),
4961
- description && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: cn("max-w-sm text-text-secondary", md ? "text-sm" : "text-xs"), children: description }),
4962
- action && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: md ? "mt-3" : "mt-2", children: action })
5141
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: cn("font-semibold text-text-primary", md ? "text-base" : "text-sm"), children: title }),
5142
+ description && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: cn("max-w-sm text-text-secondary", md ? "text-sm" : "text-xs"), children: description }),
5143
+ action && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: md ? "mt-3" : "mt-2", children: action })
4963
5144
  ]
4964
5145
  }
4965
5146
  );
4966
5147
  }
4967
5148
 
4968
5149
  // src/TextField.tsx
4969
- var import_react24 = require("react");
4970
- var import_jsx_runtime48 = require("react/jsx-runtime");
5150
+ var import_react26 = require("react");
5151
+ var import_jsx_runtime51 = require("react/jsx-runtime");
4971
5152
  var HEIGHT2 = { sm: "h-8", md: "h-10", lg: "h-11" };
4972
- var TextField = (0, import_react24.forwardRef)(
5153
+ var TextField = (0, import_react26.forwardRef)(
4973
5154
  ({ label, hint, error, size = "md", icon, className, testIdPrefix, id, disabled, ...props }, ref) => {
4974
- const auto = (0, import_react24.useId)();
5155
+ const auto = (0, import_react26.useId)();
4975
5156
  const fieldId = id ?? auto;
4976
5157
  const noteId = `${fieldId}-note`;
4977
5158
  const note = error ?? hint;
4978
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: cn("flex flex-col gap-1.5", className), "data-testid": testIdPrefix, children: [
4979
- label && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("label", { htmlFor: fieldId, className: "text-xs font-medium text-text-secondary", children: label }),
4980
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
5159
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: cn("flex flex-col gap-1.5", className), "data-testid": testIdPrefix, children: [
5160
+ label && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("label", { htmlFor: fieldId, className: "text-xs font-medium text-text-secondary", children: label }),
5161
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
4981
5162
  "div",
4982
5163
  {
4983
5164
  className: cn(
@@ -4987,8 +5168,8 @@ var TextField = (0, import_react24.forwardRef)(
4987
5168
  disabled && "opacity-50"
4988
5169
  ),
4989
5170
  children: [
4990
- icon && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { "aria-hidden": "true", className: "flex shrink-0 text-text-tertiary", children: icon }),
4991
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
5171
+ icon && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { "aria-hidden": "true", className: "flex shrink-0 text-text-tertiary", children: icon }),
5172
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4992
5173
  "input",
4993
5174
  {
4994
5175
  ref,
@@ -5003,17 +5184,17 @@ var TextField = (0, import_react24.forwardRef)(
5003
5184
  ]
5004
5185
  }
5005
5186
  ),
5006
- note && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { id: noteId, className: cn("text-xs", error ? "text-text-danger" : "text-text-tertiary"), children: note })
5187
+ note && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { id: noteId, className: cn("text-xs", error ? "text-text-danger" : "text-text-tertiary"), children: note })
5007
5188
  ] });
5008
5189
  }
5009
5190
  );
5010
5191
  TextField.displayName = "TextField";
5011
5192
 
5012
5193
  // src/Drawer.tsx
5013
- var import_react25 = require("react");
5194
+ var import_react27 = require("react");
5014
5195
  var import_react_dom8 = require("react-dom");
5015
5196
  var import_lucide_react27 = require("lucide-react");
5016
- var import_jsx_runtime49 = require("react/jsx-runtime");
5197
+ var import_jsx_runtime52 = require("react/jsx-runtime");
5017
5198
  var WIDTH2 = {
5018
5199
  sm: "max-w-110",
5019
5200
  md: "max-w-160",
@@ -5022,14 +5203,14 @@ var WIDTH2 = {
5022
5203
  var EXIT_MS = 200;
5023
5204
  var FOCUSABLE2 = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
5024
5205
  function Drawer({ open, onClose, title, description, size = "sm", footer, children, className, testIdPrefix }) {
5025
- const titleId = (0, import_react25.useId)();
5026
- const descId = (0, import_react25.useId)();
5027
- const panel = (0, import_react25.useRef)(null);
5028
- const close = (0, import_react25.useRef)(onClose);
5206
+ const titleId = (0, import_react27.useId)();
5207
+ const descId = (0, import_react27.useId)();
5208
+ const panel = (0, import_react27.useRef)(null);
5209
+ const close = (0, import_react27.useRef)(onClose);
5029
5210
  close.current = onClose;
5030
- const [mounted, setMounted] = (0, import_react25.useState)(open);
5031
- const [shown, setShown] = (0, import_react25.useState)(false);
5032
- (0, import_react25.useEffect)(() => {
5211
+ const [mounted, setMounted] = (0, import_react27.useState)(open);
5212
+ const [shown, setShown] = (0, import_react27.useState)(false);
5213
+ (0, import_react27.useEffect)(() => {
5033
5214
  if (open) {
5034
5215
  setMounted(true);
5035
5216
  const raf = requestAnimationFrame(() => requestAnimationFrame(() => setShown(true)));
@@ -5039,7 +5220,7 @@ function Drawer({ open, onClose, title, description, size = "sm", footer, childr
5039
5220
  const t = setTimeout(() => setMounted(false), EXIT_MS);
5040
5221
  return () => clearTimeout(t);
5041
5222
  }, [open]);
5042
- (0, import_react25.useEffect)(() => {
5223
+ (0, import_react27.useEffect)(() => {
5043
5224
  if (!open || !mounted) return;
5044
5225
  const opener = document.activeElement;
5045
5226
  const firstIn = (region) => panel.current?.querySelector(region)?.querySelector(FOCUSABLE2) ?? null;
@@ -5074,8 +5255,8 @@ function Drawer({ open, onClose, title, description, size = "sm", footer, childr
5074
5255
  }, [open, mounted]);
5075
5256
  if (!mounted || typeof document === "undefined") return null;
5076
5257
  return (0, import_react_dom8.createPortal)(
5077
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "fixed inset-0 z-modal", children: [
5078
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
5258
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "fixed inset-0 z-modal", children: [
5259
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
5079
5260
  "div",
5080
5261
  {
5081
5262
  "aria-hidden": "true",
@@ -5089,7 +5270,7 @@ function Drawer({ open, onClose, title, description, size = "sm", footer, childr
5089
5270
  )
5090
5271
  }
5091
5272
  ),
5092
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
5273
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
5093
5274
  "div",
5094
5275
  {
5095
5276
  ref: panel,
@@ -5106,24 +5287,24 @@ function Drawer({ open, onClose, title, description, size = "sm", footer, childr
5106
5287
  className
5107
5288
  ),
5108
5289
  children: [
5109
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-start gap-3 px-5 pt-5 pb-3", children: [
5110
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "min-w-0 flex-1", children: [
5111
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("h2", { id: titleId, className: "text-base font-semibold text-text-primary", children: title }),
5112
- description && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { id: descId, className: "mt-0.5 text-sm text-text-secondary", children: description })
5290
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex items-start gap-3 px-5 pt-5 pb-3", children: [
5291
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "min-w-0 flex-1", children: [
5292
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("h2", { id: titleId, className: "text-base font-semibold text-text-primary", children: title }),
5293
+ description && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { id: descId, className: "mt-0.5 text-sm text-text-secondary", children: description })
5113
5294
  ] }),
5114
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
5295
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
5115
5296
  "button",
5116
5297
  {
5117
5298
  type: "button",
5118
5299
  onClick: onClose,
5119
5300
  "aria-label": "Close",
5120
5301
  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",
5121
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react27.X, { size: 16, "aria-hidden": "true" })
5302
+ children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react27.X, { size: 16, "aria-hidden": "true" })
5122
5303
  }
5123
5304
  )
5124
5305
  ] }),
5125
- /* @__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 }),
5126
- 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 })
5306
+ /* @__PURE__ */ (0, import_jsx_runtime52.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 }),
5307
+ 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 })
5127
5308
  ]
5128
5309
  }
5129
5310
  )
@@ -5133,8 +5314,8 @@ function Drawer({ open, onClose, title, description, size = "sm", footer, childr
5133
5314
  }
5134
5315
 
5135
5316
  // src/DataTable.tsx
5136
- var import_react26 = require("react");
5137
- var import_jsx_runtime50 = require("react/jsx-runtime");
5317
+ var import_react28 = require("react");
5318
+ var import_jsx_runtime53 = require("react/jsx-runtime");
5138
5319
  var WIDTH3 = { fill: "", sm: "w-24", md: "w-36", lg: "w-48" };
5139
5320
  var MAX_H = { sm: "max-h-80", md: "max-h-120", lg: "max-h-160" };
5140
5321
  var HEAD_PAD = { default: "px-4 py-3", compact: "px-3 py-2" };
@@ -5158,7 +5339,7 @@ function DataTable({
5158
5339
  testIdPrefix,
5159
5340
  ...rest
5160
5341
  }) {
5161
- const titleId = (0, import_react26.useId)();
5342
+ const titleId = (0, import_react28.useId)();
5162
5343
  const head = HEAD_PAD[density];
5163
5344
  const pad = CELL_PAD[density];
5164
5345
  const align = (c) => c.numeric ? "text-right" : "text-left";
@@ -5167,20 +5348,20 @@ function DataTable({
5167
5348
  const col = columns.find((c) => c.key === key);
5168
5349
  onSortChange?.(cycleSort(sort, key, col?.firstDir ?? (col?.numeric ? "desc" : "asc")));
5169
5350
  };
5170
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
5351
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
5171
5352
  "div",
5172
5353
  {
5173
5354
  className: cn("flex w-full flex-col overflow-hidden rounded-card border border-border-default bg-surface", className),
5174
5355
  "data-testid": testIdPrefix,
5175
5356
  children: [
5176
- title && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-start justify-between gap-2 p-card-padding", children: [
5177
- /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "min-w-0", children: [
5178
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("h3", { id: titleId, className: "text-style-card-title", children: title }),
5179
- subtitle && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: "mt-0.5 text-xs text-text-tertiary", children: subtitle })
5357
+ title && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex items-start justify-between gap-2 p-card-padding", children: [
5358
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "min-w-0", children: [
5359
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("h3", { id: titleId, className: "text-style-card-title", children: title }),
5360
+ subtitle && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "mt-0.5 text-xs text-text-tertiary", children: subtitle })
5180
5361
  ] }),
5181
- action && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "shrink-0", children: action })
5362
+ action && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "shrink-0", children: action })
5182
5363
  ] }),
5183
- /* @__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)(
5364
+ /* @__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)(
5184
5365
  "table",
5185
5366
  {
5186
5367
  "aria-labelledby": title ? titleId : void 0,
@@ -5188,13 +5369,13 @@ function DataTable({
5188
5369
  "aria-busy": loading || void 0,
5189
5370
  className: "w-full border-collapse text-left",
5190
5371
  children: [
5191
- /* @__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)(
5372
+ /* @__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)(
5192
5373
  "th",
5193
5374
  {
5194
5375
  scope: "col",
5195
5376
  "aria-sort": c.sortable ? ariaSortFor(sort, c.key) : void 0,
5196
5377
  className: cn("border-b border-border-default font-semibold", head, align(c), width(c)),
5197
- children: c.sortable && onSortChange ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
5378
+ children: c.sortable && onSortChange ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
5198
5379
  SortButton,
5199
5380
  {
5200
5381
  label: c.label,
@@ -5208,7 +5389,7 @@ function DataTable({
5208
5389
  },
5209
5390
  c.key
5210
5391
  )) }) }),
5211
- /* @__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)(
5392
+ /* @__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)(
5212
5393
  "span",
5213
5394
  {
5214
5395
  className: cn(
@@ -5216,7 +5397,7 @@ function DataTable({
5216
5397
  c.numeric ? "w-12" : "w-2/3"
5217
5398
  )
5218
5399
  }
5219
- ) }, 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)(
5400
+ ) }, 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)(
5220
5401
  "td",
5221
5402
  {
5222
5403
  className: cn("border-b border-border-default", pad, align(c), c.numeric && "tabular-nums"),
@@ -5227,14 +5408,14 @@ function DataTable({
5227
5408
  ]
5228
5409
  }
5229
5410
  ) }),
5230
- footer && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "border-t border-border-default px-4 py-3", children: footer })
5411
+ footer && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "border-t border-border-default px-4 py-3", children: footer })
5231
5412
  ]
5232
5413
  }
5233
5414
  );
5234
5415
  }
5235
5416
 
5236
5417
  // src/MediaLabel.tsx
5237
- var import_jsx_runtime51 = require("react/jsx-runtime");
5418
+ var import_jsx_runtime54 = require("react/jsx-runtime");
5238
5419
  var FILL = {
5239
5420
  TV: "bg-media-tv",
5240
5421
  CTV: "bg-media-ctv",
@@ -5245,7 +5426,7 @@ var FILL = {
5245
5426
  Magazine: "bg-media-magazine"
5246
5427
  };
5247
5428
  function MediaLabel({ type, className, testIdPrefix }) {
5248
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
5429
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
5249
5430
  "span",
5250
5431
  {
5251
5432
  className: cn(
@@ -5260,10 +5441,10 @@ function MediaLabel({ type, className, testIdPrefix }) {
5260
5441
  }
5261
5442
 
5262
5443
  // src/SuggestionChip.tsx
5263
- var import_react27 = require("react");
5264
- var import_jsx_runtime52 = require("react/jsx-runtime");
5265
- var SuggestionChip = (0, import_react27.forwardRef)(function SuggestionChip2({ children, className, testIdPrefix, type = "button", ...props }, ref) {
5266
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
5444
+ var import_react29 = require("react");
5445
+ var import_jsx_runtime55 = require("react/jsx-runtime");
5446
+ var SuggestionChip = (0, import_react29.forwardRef)(function SuggestionChip2({ children, className, testIdPrefix, type = "button", ...props }, ref) {
5447
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
5267
5448
  "button",
5268
5449
  {
5269
5450
  ref,
@@ -5274,18 +5455,18 @@ var SuggestionChip = (0, import_react27.forwardRef)(function SuggestionChip2({ c
5274
5455
  "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",
5275
5456
  className
5276
5457
  ),
5277
- children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "truncate", children })
5458
+ children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "truncate", children })
5278
5459
  }
5279
5460
  );
5280
5461
  });
5281
5462
  SuggestionChip.displayName = "SuggestionChip";
5282
5463
 
5283
5464
  // src/ToggleChip.tsx
5284
- var import_react28 = require("react");
5465
+ var import_react30 = require("react");
5285
5466
  var import_lucide_react28 = require("lucide-react");
5286
- var import_jsx_runtime53 = require("react/jsx-runtime");
5287
- var ToggleChip = (0, import_react28.forwardRef)(function ToggleChip2({ selected, onChange, children, className, testIdPrefix, type = "button", onClick, ...props }, ref) {
5288
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
5467
+ var import_jsx_runtime56 = require("react/jsx-runtime");
5468
+ var ToggleChip = (0, import_react30.forwardRef)(function ToggleChip2({ selected, onChange, children, className, testIdPrefix, type = "button", onClick, ...props }, ref) {
5469
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
5289
5470
  "button",
5290
5471
  {
5291
5472
  ref,
@@ -5303,7 +5484,7 @@ var ToggleChip = (0, import_react28.forwardRef)(function ToggleChip2({ selected,
5303
5484
  className
5304
5485
  ),
5305
5486
  children: [
5306
- selected && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_lucide_react28.Check, { size: 14, "aria-hidden": "true", className: "-ml-0.5 shrink-0" }),
5487
+ selected && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_lucide_react28.Check, { size: 14, "aria-hidden": "true", className: "-ml-0.5 shrink-0" }),
5307
5488
  children
5308
5489
  ]
5309
5490
  }
@@ -5312,14 +5493,14 @@ var ToggleChip = (0, import_react28.forwardRef)(function ToggleChip2({ selected,
5312
5493
  ToggleChip.displayName = "ToggleChip";
5313
5494
 
5314
5495
  // src/CopyButton.tsx
5315
- var import_react29 = require("react");
5496
+ var import_react31 = require("react");
5316
5497
  var import_lucide_react29 = require("lucide-react");
5317
- var import_jsx_runtime54 = require("react/jsx-runtime");
5498
+ var import_jsx_runtime57 = require("react/jsx-runtime");
5318
5499
  var CONFIRM_MS = 2e3;
5319
- var CopyButton = (0, import_react29.forwardRef)(function CopyButton2({ value, label, "aria-label": ariaLabel, size = "xs", className, testIdPrefix }, ref) {
5320
- const [copied, setCopied] = (0, import_react29.useState)(false);
5321
- const timer = (0, import_react29.useRef)(void 0);
5322
- (0, import_react29.useEffect)(() => () => clearTimeout(timer.current), []);
5500
+ var CopyButton = (0, import_react31.forwardRef)(function CopyButton2({ value, label, "aria-label": ariaLabel, size = "xs", className, testIdPrefix }, ref) {
5501
+ const [copied, setCopied] = (0, import_react31.useState)(false);
5502
+ const timer = (0, import_react31.useRef)(void 0);
5503
+ (0, import_react31.useEffect)(() => () => clearTimeout(timer.current), []);
5323
5504
  const copy = async () => {
5324
5505
  try {
5325
5506
  await navigator.clipboard.writeText(typeof value === "function" ? value() : value);
@@ -5331,8 +5512,8 @@ var CopyButton = (0, import_react29.forwardRef)(function CopyButton2({ value, la
5331
5512
  timer.current = setTimeout(() => setCopied(false), CONFIRM_MS);
5332
5513
  };
5333
5514
  const iconSize = size === "xs" ? 13 : 15;
5334
- 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" });
5335
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
5515
+ 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" });
5516
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
5336
5517
  Button,
5337
5518
  {
5338
5519
  ref,
@@ -5346,8 +5527,8 @@ var CopyButton = (0, import_react29.forwardRef)(function CopyButton2({ value, la
5346
5527
  className: cn(!copied && "text-text-secondary", className),
5347
5528
  children: [
5348
5529
  icon,
5349
- label && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { children: copied ? "Copied" : label }),
5350
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { role: "status", className: "sr-only", children: copied ? "Copied" : "" })
5530
+ label && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { children: copied ? "Copied" : label }),
5531
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { role: "status", className: "sr-only", children: copied ? "Copied" : "" })
5351
5532
  ]
5352
5533
  }
5353
5534
  );
@@ -5356,7 +5537,7 @@ CopyButton.displayName = "CopyButton";
5356
5537
 
5357
5538
  // src/InlineMessage.tsx
5358
5539
  var import_lucide_react30 = require("lucide-react");
5359
- var import_jsx_runtime55 = require("react/jsx-runtime");
5540
+ var import_jsx_runtime58 = require("react/jsx-runtime");
5360
5541
  var BOX = {
5361
5542
  info: "border-brand-primaryAction/30 bg-brand-primaryAction/10",
5362
5543
  success: "border-status-success/40 bg-status-success/10",
@@ -5373,27 +5554,27 @@ var ICON_INK = {
5373
5554
  var ICON2 = { info: import_lucide_react30.Info, success: import_lucide_react30.CheckCircle2, warning: import_lucide_react30.AlertTriangle, danger: import_lucide_react30.XCircle };
5374
5555
  function InlineMessage({ tone = "info", title, children, actions, onDismiss, className, testIdPrefix }) {
5375
5556
  const Icon = ICON2[tone];
5376
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
5557
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
5377
5558
  "div",
5378
5559
  {
5379
5560
  role: tone === "warning" || tone === "danger" ? "alert" : "status",
5380
5561
  className: cn("flex items-start gap-2.5 rounded-control border px-3 py-2.5 text-sm", BOX[tone], className),
5381
5562
  "data-testid": testIdPrefix,
5382
5563
  children: [
5383
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Icon, { size: 16, "aria-hidden": "true", className: cn("mt-0.5 shrink-0", ICON_INK[tone]) }),
5384
- /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "min-w-0 flex-1", children: [
5385
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "font-semibold text-text-primary", children: title }),
5386
- children && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "mt-0.5 text-text-secondary", children }),
5387
- actions && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "mt-2 flex flex-wrap items-center gap-2", children: actions })
5564
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Icon, { size: 16, "aria-hidden": "true", className: cn("mt-0.5 shrink-0", ICON_INK[tone]) }),
5565
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "min-w-0 flex-1", children: [
5566
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "font-semibold text-text-primary", children: title }),
5567
+ children && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "mt-0.5 text-text-secondary", children }),
5568
+ actions && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "mt-2 flex flex-wrap items-center gap-2", children: actions })
5388
5569
  ] }),
5389
- onDismiss && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
5570
+ onDismiss && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
5390
5571
  "button",
5391
5572
  {
5392
5573
  type: "button",
5393
5574
  onClick: onDismiss,
5394
5575
  "aria-label": "Dismiss",
5395
5576
  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",
5396
- children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_lucide_react30.X, { size: 14, "aria-hidden": "true" })
5577
+ children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react30.X, { size: 14, "aria-hidden": "true" })
5397
5578
  }
5398
5579
  )
5399
5580
  ]
@@ -5402,9 +5583,9 @@ function InlineMessage({ tone = "info", title, children, actions, onDismiss, cla
5402
5583
  }
5403
5584
 
5404
5585
  // src/FilterDrawer.tsx
5405
- var import_react30 = require("react");
5586
+ var import_react32 = require("react");
5406
5587
  var import_lucide_react31 = require("lucide-react");
5407
- var import_jsx_runtime56 = require("react/jsx-runtime");
5588
+ var import_jsx_runtime59 = require("react/jsx-runtime");
5408
5589
  var SLIDE_MS = 200;
5409
5590
  function reducedMotion() {
5410
5591
  return typeof window !== "undefined" && !!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
@@ -5422,10 +5603,10 @@ function FilterDrawer({
5422
5603
  size = "sm",
5423
5604
  testIdPrefix
5424
5605
  }) {
5425
- const [view, setViewState] = (0, import_react30.useState)(focus);
5426
- const [leaving, setLeaving] = (0, import_react30.useState)(null);
5427
- const [phase, setPhase] = (0, import_react30.useState)("run");
5428
- const [wasOpen, setWasOpen] = (0, import_react30.useState)(open);
5606
+ const [view, setViewState] = (0, import_react32.useState)(focus);
5607
+ const [leaving, setLeaving] = (0, import_react32.useState)(null);
5608
+ const [phase, setPhase] = (0, import_react32.useState)("run");
5609
+ const [wasOpen, setWasOpen] = (0, import_react32.useState)(open);
5429
5610
  if (open !== wasOpen) {
5430
5611
  setWasOpen(open);
5431
5612
  if (open) {
@@ -5440,20 +5621,20 @@ function FilterDrawer({
5440
5621
  }
5441
5622
  setViewState(next);
5442
5623
  };
5443
- (0, import_react30.useLayoutEffect)(() => {
5624
+ (0, import_react32.useLayoutEffect)(() => {
5444
5625
  if (phase !== "start") return;
5445
5626
  const raf = requestAnimationFrame(() => requestAnimationFrame(() => setPhase("run")));
5446
5627
  return () => cancelAnimationFrame(raf);
5447
5628
  }, [phase]);
5448
- (0, import_react30.useEffect)(() => {
5629
+ (0, import_react32.useEffect)(() => {
5449
5630
  if (!leaving || phase !== "run") return;
5450
5631
  const t = setTimeout(() => setLeaving(null), SLIDE_MS);
5451
5632
  return () => clearTimeout(t);
5452
5633
  }, [leaving, phase]);
5453
- const backRef = (0, import_react30.useRef)(null);
5454
- const rowRefs = (0, import_react30.useRef)(/* @__PURE__ */ new Map());
5455
- const lastView = (0, import_react30.useRef)(null);
5456
- (0, import_react30.useEffect)(() => {
5634
+ const backRef = (0, import_react32.useRef)(null);
5635
+ const rowRefs = (0, import_react32.useRef)(/* @__PURE__ */ new Map());
5636
+ const lastView = (0, import_react32.useRef)(null);
5637
+ (0, import_react32.useEffect)(() => {
5457
5638
  if (!open) return;
5458
5639
  if (view) backRef.current?.focus();
5459
5640
  else if (lastView.current) rowRefs.current.get(lastView.current)?.focus();
@@ -5466,8 +5647,8 @@ function FilterDrawer({
5466
5647
  const outgoing = phase === "start" ? void 0 : dir > 0 ? "translateX(-33%)" : "translateX(100%)";
5467
5648
  const panel = (v, rows = true) => {
5468
5649
  const s = v ? sections.find((x) => x.id === v) : void 0;
5469
- if (s) return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "px-5 pt-1", children: renderSection(s.id) });
5470
- 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)(
5650
+ if (s) return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "border-t border-border-default px-5 pt-4", children: renderSection(s.id) });
5651
+ 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)(
5471
5652
  "button",
5472
5653
  {
5473
5654
  ref: rows ? (el) => {
@@ -5479,7 +5660,7 @@ function FilterDrawer({
5479
5660
  "data-testid": testIdPrefix && `${testIdPrefix}-row-${x.id}`,
5480
5661
  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",
5481
5662
  children: [
5482
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5663
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
5483
5664
  x.icon,
5484
5665
  {
5485
5666
  size: 17,
@@ -5487,22 +5668,22 @@ function FilterDrawer({
5487
5668
  className: x.badge ? "text-brand-primaryAction" : "text-text-secondary"
5488
5669
  }
5489
5670
  ),
5490
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "flex-1 text-sm font-medium text-text-primary", children: x.label }),
5491
- x.badge && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Badge, { tone: "brand", children: x.badge }),
5492
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_lucide_react31.ChevronRight, { size: 16, "aria-hidden": "true", className: "shrink-0 text-text-secondary" })
5671
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "flex-1 text-sm font-medium text-text-primary", children: x.label }),
5672
+ x.badge && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Badge, { tone: "brand", children: x.badge }),
5673
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react31.ChevronRight, { size: 16, "aria-hidden": "true", className: "shrink-0 text-text-secondary" })
5493
5674
  ]
5494
5675
  }
5495
5676
  ) }, x.id)) });
5496
5677
  };
5497
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5678
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
5498
5679
  Drawer,
5499
5680
  {
5500
5681
  open,
5501
5682
  onClose,
5502
5683
  size,
5503
5684
  testIdPrefix,
5504
- title: focused ? /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { className: "flex items-center gap-1.5", children: [
5505
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5685
+ title: focused ? /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("span", { className: "flex items-center gap-1.5", children: [
5686
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
5506
5687
  "button",
5507
5688
  {
5508
5689
  ref: backRef,
@@ -5511,20 +5692,23 @@ function FilterDrawer({
5511
5692
  "aria-label": "Back to all filters",
5512
5693
  "data-testid": testIdPrefix && `${testIdPrefix}-back`,
5513
5694
  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",
5514
- children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_lucide_react31.ChevronLeft, { size: 18, "aria-hidden": "true" })
5695
+ children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react31.ChevronLeft, { size: 18, "aria-hidden": "true" })
5515
5696
  }
5516
5697
  ),
5517
5698
  focused.label,
5518
- focused.info && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(InfoTip, { text: focused.info, label: `About ${focused.label}` })
5519
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { className: "flex items-center gap-2.5", children: [
5699
+ focused.info && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(InfoTip, { text: focused.info, label: `About ${focused.label}` })
5700
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("span", { className: "flex items-center gap-2.5", children: [
5520
5701
  "Filters",
5521
- activeCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Badge, { tone: "brandSolid", kind: "count", children: activeCount })
5702
+ activeCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Badge, { tone: "brandSolid", kind: "count", children: activeCount })
5522
5703
  ] }),
5523
- footer: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex w-full items-center justify-between gap-2", children: [
5524
- focused ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Button, { variant: "link", size: "md", onClick: () => onClearSection(focused.id), className: "px-0", children: "Clear" }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Button, { variant: "link", size: "md", onClick: onClearAll, className: "px-0", children: "Clear all" }),
5525
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex items-center gap-2", children: [
5526
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Button, { variant: "secondary", size: "md", onClick: onClose, children: "Cancel" }),
5527
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5704
+ footer: focused ? (
5705
+ // Picks are kept as they're made; only See results, on the list, applies them.
5706
+ /* @__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" }) })
5707
+ ) : /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex w-full items-center justify-between gap-2", children: [
5708
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Button, { variant: "link", size: "md", onClick: onClearAll, className: "px-0", children: "Clear all" }),
5709
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex items-center gap-2", children: [
5710
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Button, { variant: "secondary", size: "md", onClick: onClose, children: "Cancel" }),
5711
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
5528
5712
  Button,
5529
5713
  {
5530
5714
  variant: "primary",
@@ -5533,13 +5717,13 @@ function FilterDrawer({
5533
5717
  onApply();
5534
5718
  onClose();
5535
5719
  },
5536
- children: "Apply"
5720
+ children: "See results"
5537
5721
  }
5538
5722
  )
5539
5723
  ] })
5540
5724
  ] }),
5541
- children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "relative -mx-5 overflow-x-clip", children: [
5542
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5725
+ children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "relative -mx-5 overflow-x-clip", children: [
5726
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
5543
5727
  "div",
5544
5728
  {
5545
5729
  style: { transform: incoming },
@@ -5548,7 +5732,7 @@ function FilterDrawer({
5548
5732
  },
5549
5733
  view ?? "__list"
5550
5734
  ),
5551
- leaving && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5735
+ leaving && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
5552
5736
  "div",
5553
5737
  {
5554
5738
  "aria-hidden": "true",
@@ -5564,11 +5748,11 @@ function FilterDrawer({
5564
5748
  }
5565
5749
 
5566
5750
  // src/AllFiltersButton.tsx
5567
- var import_react31 = require("react");
5751
+ var import_react33 = require("react");
5568
5752
  var import_lucide_react32 = require("lucide-react");
5569
- var import_jsx_runtime57 = require("react/jsx-runtime");
5570
- var AllFiltersButton = (0, import_react31.forwardRef)(function AllFiltersButton2({ count = 0, open, className, testIdPrefix, ...rest }, ref) {
5571
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
5753
+ var import_jsx_runtime60 = require("react/jsx-runtime");
5754
+ var AllFiltersButton = (0, import_react33.forwardRef)(function AllFiltersButton2({ count = 0, open, className, testIdPrefix, ...rest }, ref) {
5755
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
5572
5756
  "button",
5573
5757
  {
5574
5758
  ref,
@@ -5580,13 +5764,105 @@ var AllFiltersButton = (0, import_react31.forwardRef)(function AllFiltersButton2
5580
5764
  className: cn(chipTriggerClass(), className),
5581
5765
  ...rest,
5582
5766
  children: [
5583
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react32.SlidersHorizontal, { size: 15, "aria-hidden": "true", className: "text-text-secondary" }),
5584
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "text-dense font-medium text-text-primary", children: "All filters" }),
5585
- count > 0 && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Badge, { tone: "brandSolid", kind: "count", children: count })
5767
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_lucide_react32.SlidersHorizontal, { size: 15, "aria-hidden": "true", className: "text-text-secondary" }),
5768
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "text-dense font-medium text-text-primary", children: "All filters" }),
5769
+ count > 0 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Badge, { tone: "brandSolid", kind: "count", children: count })
5586
5770
  ]
5587
5771
  }
5588
5772
  );
5589
5773
  });
5774
+
5775
+ // src/Menu.tsx
5776
+ var import_react34 = require("react");
5777
+ var import_react_slot2 = require("@radix-ui/react-slot");
5778
+ var import_lucide_react33 = require("lucide-react");
5779
+ var import_jsx_runtime61 = require("react/jsx-runtime");
5780
+ var ROW_SELECTOR = '[role^="menuitem"]:not([aria-disabled="true"]):not(:disabled)';
5781
+ function moveFocus(e) {
5782
+ const keys = ["ArrowDown", "ArrowUp", "Home", "End"];
5783
+ if (!keys.includes(e.key)) return;
5784
+ const rows = Array.from(e.currentTarget.querySelectorAll(ROW_SELECTOR));
5785
+ if (!rows.length) return;
5786
+ e.preventDefault();
5787
+ const i = rows.indexOf(document.activeElement);
5788
+ 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;
5789
+ rows[next].focus();
5790
+ }
5791
+ var Menu = (0, import_react34.forwardRef)(
5792
+ ({ className, testIdPrefix, onKeyDown, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
5793
+ "div",
5794
+ {
5795
+ ref,
5796
+ role: "menu",
5797
+ "data-testid": testIdPrefix,
5798
+ onKeyDown: (e) => {
5799
+ moveFocus(e);
5800
+ onKeyDown?.(e);
5801
+ },
5802
+ className: cn("flex flex-col p-1", className),
5803
+ ...props,
5804
+ children
5805
+ }
5806
+ )
5807
+ );
5808
+ Menu.displayName = "Menu";
5809
+ var MenuItem = (0, import_react34.forwardRef)(
5810
+ ({ className, testIdPrefix, icon, trailing, description, submenu, checked, danger, disabled, asChild = false, children, ...props }, ref) => {
5811
+ const Comp = asChild ? import_react_slot2.Slot : "button";
5812
+ const radio = checked !== void 0;
5813
+ const body = /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_jsx_runtime61.Fragment, { children: [
5814
+ 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 }),
5815
+ asChild ? (
5816
+ // The link's own text lands here; the link becomes the row.
5817
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react_slot2.Slottable, { children })
5818
+ ) : /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("span", { className: "min-w-0 flex-1", children: [
5819
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "block truncate", children }),
5820
+ description && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "block truncate text-xs text-text-tertiary", children: description })
5821
+ ] }),
5822
+ trailing && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "ml-auto flex shrink-0 items-center text-xs text-text-secondary", children: trailing }),
5823
+ radio && checked && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_lucide_react33.Check, { size: 16, "aria-hidden": "true", className: "shrink-0 text-brand-primaryAction" }),
5824
+ submenu && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_lucide_react33.ChevronRight, { size: 16, "aria-hidden": "true", className: "shrink-0 text-text-secondary" })
5825
+ ] });
5826
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
5827
+ Comp,
5828
+ {
5829
+ ref,
5830
+ type: asChild ? void 0 : "button",
5831
+ role: radio ? "menuitemradio" : "menuitem",
5832
+ "aria-checked": radio ? checked : void 0,
5833
+ "aria-haspopup": submenu ? "menu" : void 0,
5834
+ "aria-disabled": disabled || void 0,
5835
+ disabled: asChild ? void 0 : disabled,
5836
+ tabIndex: -1,
5837
+ "data-testid": testIdPrefix,
5838
+ className: cn(
5839
+ "flex min-h-9 w-full items-center gap-2.5 rounded-control px-3 py-1.5 text-left text-sm transition-colors",
5840
+ "focus-visible:outline-solid focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-border-focus",
5841
+ danger ? "text-text-danger" : "text-text-primary",
5842
+ disabled ? "cursor-not-allowed opacity-40" : "hover:bg-subtle focus-visible:bg-subtle",
5843
+ className
5844
+ ),
5845
+ ...props,
5846
+ children: body
5847
+ }
5848
+ );
5849
+ }
5850
+ );
5851
+ MenuItem.displayName = "MenuItem";
5852
+ function MenuLabel({ className, testIdPrefix, children }) {
5853
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
5854
+ "div",
5855
+ {
5856
+ role: "presentation",
5857
+ "data-testid": testIdPrefix,
5858
+ className: cn("px-3 pb-1 pt-2 text-micro font-semibold uppercase tracking-wide text-text-tertiary", className),
5859
+ children
5860
+ }
5861
+ );
5862
+ }
5863
+ function MenuSeparator({ className, testIdPrefix }) {
5864
+ 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) });
5865
+ }
5590
5866
  // Annotate the CommonJS export names for ESM import in node:
5591
5867
  0 && (module.exports = {
5592
5868
  AISpark,
@@ -5596,8 +5872,10 @@ var AllFiltersButton = (0, import_react31.forwardRef)(function AllFiltersButton2
5596
5872
  AllFiltersButton,
5597
5873
  Badge,
5598
5874
  BarChartPlaceholder,
5875
+ BarList,
5599
5876
  Button,
5600
5877
  Card,
5878
+ ChartLegend,
5601
5879
  CheckBox,
5602
5880
  CheckBoxBox,
5603
5881
  ChipContent,
@@ -5616,8 +5894,13 @@ var AllFiltersButton = (0, import_react31.forwardRef)(function AllFiltersButton2
5616
5894
  Freshness,
5617
5895
  InfoTip,
5618
5896
  InlineMessage,
5897
+ LegendItem,
5619
5898
  LineChartPlaceholder,
5620
5899
  MediaLabel,
5900
+ Menu,
5901
+ MenuItem,
5902
+ MenuLabel,
5903
+ MenuSeparator,
5621
5904
  Modal,
5622
5905
  MultiSelectFilter,
5623
5906
  NO_RESULTS_BODY,
@@ -5640,6 +5923,8 @@ var AllFiltersButton = (0, import_react31.forwardRef)(function AllFiltersButton2
5640
5923
  SelectionPicker,
5641
5924
  SortButton,
5642
5925
  StackedColumnPlaceholder,
5926
+ StatStrip,
5927
+ StatTile,
5643
5928
  SuggestionChip,
5644
5929
  TablePagination,
5645
5930
  Tabs,