@mediaradar/design-components 0.26.1 → 0.32.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.js CHANGED
@@ -110,8 +110,46 @@ function AdvertiserSearchPrompt({ label = "an advertiser name" }) {
110
110
  ] });
111
111
  }
112
112
 
113
+ // src/cn.ts
114
+ import { clsx } from "clsx";
115
+ import { extendTailwindMerge } from "tailwind-merge";
116
+ var twMerge = extendTailwindMerge({
117
+ extend: {
118
+ classGroups: {
119
+ "font-size": [{ text: define_FONT_SIZE_KEYS_default }]
120
+ }
121
+ }
122
+ });
123
+ function cn(...inputs) {
124
+ return twMerge(clsx(inputs));
125
+ }
126
+
127
+ // src/ChipTrigger.tsx
128
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
129
+ function chipTriggerClass(_variant = "box") {
130
+ return cn(
131
+ "flex h-11 items-center gap-2 rounded-control border border-border-strong bg-input px-2.5 text-text-secondary transition-colors hover:bg-subtle hover:text-text-primary focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-border-focus"
132
+ // One stroke for every trigger: a `box` chip on the lighter default
133
+ // border sat beside SelectFilter's darker one in the same row and read as
134
+ // a different kind of control. The variant no longer changes anything.
135
+ );
136
+ }
137
+ function ChipContent({ caption, value, icon }) {
138
+ const stack = /* @__PURE__ */ jsxs3("span", { className: "flex flex-col gap-1 text-left leading-none", children: [
139
+ /* @__PURE__ */ jsx3("span", { className: "text-control-caption uppercase tracking-wide text-text-tertiary", children: caption }),
140
+ /* @__PURE__ */ jsx3("span", { className: "text-[12px] font-medium text-text-primary", children: value })
141
+ ] });
142
+ if (icon) {
143
+ return /* @__PURE__ */ jsxs3("span", { className: "flex items-center gap-2", children: [
144
+ /* @__PURE__ */ jsx3("span", { className: "shrink-0 text-text-tertiary", children: icon }),
145
+ stack
146
+ ] });
147
+ }
148
+ return stack;
149
+ }
150
+
113
151
  // src/AdvertiserQuickFilter.tsx
114
- import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
152
+ import { Fragment as Fragment2, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
115
153
  function cx(...parts) {
116
154
  return parts.filter(Boolean).join(" ");
117
155
  }
@@ -195,8 +233,8 @@ function AdvertiserQuickFilter({
195
233
  const shown = open && !showFooter ? draft : selected;
196
234
  const counted = parked.length ? shown.filter((id) => !parked.includes(id)) : shown;
197
235
  const value = counted.length === 0 ? "All" : counted.length === 1 ? options.find((o) => o.id === counted[0])?.label ?? "1 selected" : `${counted.length} selected`;
198
- return /* @__PURE__ */ jsxs3("div", { className: "relative", ref, children: [
199
- /* @__PURE__ */ jsxs3(
236
+ return /* @__PURE__ */ jsxs4("div", { className: "relative", ref, children: [
237
+ /* @__PURE__ */ jsxs4(
200
238
  "button",
201
239
  {
202
240
  type: "button",
@@ -204,14 +242,10 @@ function AdvertiserQuickFilter({
204
242
  onClick: () => open ? close() : openTray(),
205
243
  "aria-haspopup": "dialog",
206
244
  "aria-expanded": open,
207
- className: "flex h-11 items-center gap-2 rounded-control border border-border-strong bg-input px-2.5 text-text-secondary transition-colors hover:bg-subtle hover:text-text-primary focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-border-focus",
245
+ className: chipTriggerClass(),
208
246
  children: [
209
- icon && /* @__PURE__ */ jsx3("span", { className: "shrink-0 text-text-tertiary", children: icon }),
210
- /* @__PURE__ */ jsxs3("span", { className: "flex flex-col gap-1 text-left leading-none", children: [
211
- /* @__PURE__ */ jsx3("span", { className: "text-control-caption uppercase tracking-wide text-text-tertiary", children: caption }),
212
- /* @__PURE__ */ jsx3("span", { className: "text-[12px] font-medium text-text-primary", children: value })
213
- ] }),
214
- /* @__PURE__ */ jsx3(
247
+ /* @__PURE__ */ jsx4(ChipContent, { caption, value, icon }),
248
+ /* @__PURE__ */ jsx4(
215
249
  ChevronDown,
216
250
  {
217
251
  size: 14,
@@ -222,7 +256,7 @@ function AdvertiserQuickFilter({
222
256
  ]
223
257
  }
224
258
  ),
225
- open && /* @__PURE__ */ jsxs3(
259
+ open && /* @__PURE__ */ jsxs4(
226
260
  "div",
227
261
  {
228
262
  className: cx(
@@ -233,9 +267,9 @@ function AdvertiserQuickFilter({
233
267
  "aria-label": caption,
234
268
  "data-testid": testIdPrefix && `${testIdPrefix}-popover`,
235
269
  children: [
236
- /* @__PURE__ */ jsx3("div", { className: "border-b border-border-default p-2", children: /* @__PURE__ */ jsxs3("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: [
237
- /* @__PURE__ */ jsx3(Search2, { size: 14, className: "shrink-0 text-text-secondary", "aria-hidden": "true" }),
238
- /* @__PURE__ */ jsx3(
270
+ /* @__PURE__ */ jsx4("div", { className: "border-b border-border-default p-2", children: /* @__PURE__ */ jsxs4("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: [
271
+ /* @__PURE__ */ jsx4(Search2, { size: 14, className: "shrink-0 text-text-secondary", "aria-hidden": "true" }),
272
+ /* @__PURE__ */ jsx4(
239
273
  "input",
240
274
  {
241
275
  ref: inputRef,
@@ -249,20 +283,20 @@ function AdvertiserQuickFilter({
249
283
  className: "h-full min-w-0 flex-1 bg-transparent text-[13px] outline-hidden placeholder:text-text-tertiary"
250
284
  }
251
285
  ),
252
- q && /* @__PURE__ */ jsx3(
286
+ q && /* @__PURE__ */ jsx4(
253
287
  "button",
254
288
  {
255
289
  type: "button",
256
290
  onClick: clearSearch,
257
291
  "aria-label": "Clear search",
258
292
  className: "shrink-0 text-text-tertiary transition-colors hover:text-text-primary",
259
- children: /* @__PURE__ */ jsx3(X, { size: 13 })
293
+ children: /* @__PURE__ */ jsx4(X, { size: 13 })
260
294
  }
261
295
  )
262
296
  ] }) }),
263
- /* @__PURE__ */ jsxs3("div", { className: "max-h-[300px] overflow-y-auto p-1", children: [
264
- selectedOptions.length > 0 && /* @__PURE__ */ jsxs3("div", { className: "mb-1 border-b border-border-default pb-1", children: [
265
- /* @__PURE__ */ jsxs3(
297
+ /* @__PURE__ */ jsxs4("div", { className: "max-h-[300px] overflow-y-auto p-1", children: [
298
+ selectedOptions.length > 0 && /* @__PURE__ */ jsxs4("div", { className: "mb-1 border-b border-border-default pb-1", children: [
299
+ /* @__PURE__ */ jsxs4(
266
300
  "button",
267
301
  {
268
302
  type: "button",
@@ -271,7 +305,7 @@ function AdvertiserQuickFilter({
271
305
  "aria-expanded": selectedOpen,
272
306
  className: "flex w-full items-center gap-1.5 rounded-control px-2 py-1 text-left text-[11px] font-semibold uppercase tracking-wide text-text-tertiary transition-colors hover:text-text-primary",
273
307
  children: [
274
- /* @__PURE__ */ jsx3(
308
+ /* @__PURE__ */ jsx4(
275
309
  ChevronDown,
276
310
  {
277
311
  size: 13,
@@ -285,7 +319,7 @@ function AdvertiserQuickFilter({
285
319
  ]
286
320
  }
287
321
  ),
288
- selectedOpen && /* @__PURE__ */ jsx3("div", { className: "flex flex-col gap-0.5", children: selectedOptions.map((o) => /* @__PURE__ */ jsx3(
322
+ selectedOpen && /* @__PURE__ */ jsx4("div", { className: "flex flex-col gap-0.5", children: selectedOptions.map((o) => /* @__PURE__ */ jsx4(
289
323
  OptionRow,
290
324
  {
291
325
  label: o.label,
@@ -296,15 +330,15 @@ function AdvertiserQuickFilter({
296
330
  o.id
297
331
  )) })
298
332
  ] }),
299
- !ql ? /* @__PURE__ */ jsx3(AdvertiserSearchPrompt, { label: promptLabel }) : results.length === 0 ? /* @__PURE__ */ jsxs3("div", { className: "flex flex-col items-center gap-1.5 px-4 py-8 text-center", children: [
300
- /* @__PURE__ */ jsxs3("p", { className: "text-[13px] font-medium text-text-primary", children: [
333
+ !ql ? /* @__PURE__ */ jsx4(AdvertiserSearchPrompt, { label: promptLabel }) : results.length === 0 ? /* @__PURE__ */ jsxs4("div", { className: "flex flex-col items-center gap-1.5 px-4 py-8 text-center", children: [
334
+ /* @__PURE__ */ jsxs4("p", { className: "text-[13px] font-medium text-text-primary", children: [
301
335
  "No results found for \u201C",
302
336
  q.trim(),
303
337
  "\u201D"
304
338
  ] }),
305
- /* @__PURE__ */ jsx3("p", { className: "text-[12px] leading-snug text-text-tertiary", children: noResultsHint })
306
- ] }) : /* @__PURE__ */ jsxs3(Fragment2, { children: [
307
- results.length > SELECT_ALL_THRESHOLD && /* @__PURE__ */ jsxs3(
339
+ /* @__PURE__ */ jsx4("p", { className: "text-[12px] leading-snug text-text-tertiary", children: noResultsHint })
340
+ ] }) : /* @__PURE__ */ jsxs4(Fragment2, { children: [
341
+ results.length > SELECT_ALL_THRESHOLD && /* @__PURE__ */ jsxs4(
308
342
  "button",
309
343
  {
310
344
  type: "button",
@@ -312,12 +346,12 @@ function AdvertiserQuickFilter({
312
346
  onClick: toggleAllVisible,
313
347
  className: "flex w-full items-center gap-2 rounded-control px-2 py-1.5 text-left text-[12px] font-semibold text-text-link transition-colors hover:bg-subtle",
314
348
  children: [
315
- /* @__PURE__ */ jsx3(ListChecks, { size: 14, "aria-hidden": "true" }),
349
+ /* @__PURE__ */ jsx4(ListChecks, { size: 14, "aria-hidden": "true" }),
316
350
  allVisibleSelected ? `Deselect ${results.length} visible` : `Select all ${results.length} visible`
317
351
  ]
318
352
  }
319
353
  ),
320
- results.map((o) => /* @__PURE__ */ jsx3(
354
+ results.map((o) => /* @__PURE__ */ jsx4(
321
355
  OptionRow,
322
356
  {
323
357
  label: o.label,
@@ -329,8 +363,8 @@ function AdvertiserQuickFilter({
329
363
  ))
330
364
  ] })
331
365
  ] }),
332
- showFooter ? /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between border-t border-border-default px-3 py-2.5", children: [
333
- /* @__PURE__ */ jsx3(
366
+ showFooter ? /* @__PURE__ */ jsxs4("div", { className: "flex items-center justify-between border-t border-border-default px-3 py-2.5", children: [
367
+ /* @__PURE__ */ jsx4(
334
368
  "button",
335
369
  {
336
370
  type: "button",
@@ -341,7 +375,7 @@ function AdvertiserQuickFilter({
341
375
  children: "Clear all"
342
376
  }
343
377
  ),
344
- /* @__PURE__ */ jsx3(
378
+ /* @__PURE__ */ jsx4(
345
379
  "button",
346
380
  {
347
381
  type: "button",
@@ -351,12 +385,12 @@ function AdvertiserQuickFilter({
351
385
  children: "Apply"
352
386
  }
353
387
  )
354
- ] }) : draft.length > 0 && /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between border-t border-border-default p-2", children: [
355
- /* @__PURE__ */ jsxs3("span", { className: "text-[11px] text-text-tertiary", children: [
388
+ ] }) : draft.length > 0 && /* @__PURE__ */ jsxs4("div", { className: "flex items-center justify-between border-t border-border-default p-2", children: [
389
+ /* @__PURE__ */ jsxs4("span", { className: "text-[11px] text-text-tertiary", children: [
356
390
  draft.length,
357
391
  " selected"
358
392
  ] }),
359
- /* @__PURE__ */ jsx3(
393
+ /* @__PURE__ */ jsx4(
360
394
  "button",
361
395
  {
362
396
  type: "button",
@@ -377,13 +411,13 @@ function OptionRow({
377
411
  onToggle,
378
412
  testId
379
413
  }) {
380
- return /* @__PURE__ */ jsxs3(
414
+ return /* @__PURE__ */ jsxs4(
381
415
  "div",
382
416
  {
383
417
  onClick: onToggle,
384
418
  className: "flex cursor-pointer items-center gap-2.5 rounded-control px-2 py-2 transition-colors hover:bg-subtle",
385
419
  children: [
386
- /* @__PURE__ */ jsx3(
420
+ /* @__PURE__ */ jsx4(
387
421
  "button",
388
422
  {
389
423
  type: "button",
@@ -400,31 +434,17 @@ function OptionRow({
400
434
  "focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-border-focus",
401
435
  checked ? "border-transparent bg-brand-primaryAction text-brand-onprimary" : "border-border-interactive bg-surface hover:border-brand-primaryAction"
402
436
  ),
403
- children: checked && /* @__PURE__ */ jsx3(Check, { size: 13, strokeWidth: 3 })
437
+ children: checked && /* @__PURE__ */ jsx4(Check, { size: 13, strokeWidth: 3 })
404
438
  }
405
439
  ),
406
- /* @__PURE__ */ jsx3("span", { className: "flex-1 text-[14px] text-text-primary", children: label })
440
+ /* @__PURE__ */ jsx4("span", { className: "flex-1 text-[14px] text-text-primary", children: label })
407
441
  ]
408
442
  }
409
443
  );
410
444
  }
411
445
 
412
- // src/cn.ts
413
- import { clsx } from "clsx";
414
- import { extendTailwindMerge } from "tailwind-merge";
415
- var twMerge = extendTailwindMerge({
416
- extend: {
417
- classGroups: {
418
- "font-size": [{ text: define_FONT_SIZE_KEYS_default }]
419
- }
420
- }
421
- });
422
- function cn(...inputs) {
423
- return twMerge(clsx(inputs));
424
- }
425
-
426
446
  // src/Badge.tsx
427
- import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
447
+ import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
428
448
  var TONE = {
429
449
  neutral: "bg-subtle text-text-secondary",
430
450
  brand: "bg-brand-primarySoft text-brand-primaryAction",
@@ -475,25 +495,30 @@ var KIND = {
475
495
  count: "h-[18px] min-w-[18px] justify-center px-1.5 tabular-nums",
476
496
  // The only kind that shouts. Caps need the letterspacing -- caps set tight
477
497
  // are harder to read than the sentence case they replaced.
478
- eyebrow: "px-2.5 py-1 uppercase tracking-wider"
498
+ eyebrow: "px-2.5 py-1 uppercase tracking-wider",
499
+ // What a thing IS (a topic, a category) rather than a signal about it.
500
+ // Always the same quiet grey whatever `tone` says: colour here would read
501
+ // as meaning, and a category has none. This is the old Tag.
502
+ category: "px-2 py-1"
479
503
  };
504
+ var CATEGORY = "bg-subtle font-medium text-text-tertiary";
480
505
  function Badge({ tone = "neutral", kind = "label", dot = false, children, className }) {
481
- return /* @__PURE__ */ jsxs4(
506
+ return /* @__PURE__ */ jsxs5(
482
507
  "span",
483
508
  {
484
- style: TONE_STYLE[tone],
509
+ style: kind === "category" ? void 0 : TONE_STYLE[tone],
485
510
  className: cn(
486
511
  // `inline-flex` + `gap` so a leading icon sits on the text baseline
487
512
  // without every caller re-inventing the spacing. `shrink-0` because a
488
513
  // badge is almost always beside flexible text that would otherwise
489
514
  // squash it. `whitespace-nowrap` because a wrapped badge is a bug.
490
- "inline-flex shrink-0 items-center gap-1 whitespace-nowrap rounded-full text-micro font-semibold leading-none",
491
- TONE[tone],
515
+ "inline-flex shrink-0 items-center gap-1 whitespace-nowrap rounded-full text-micro leading-none",
516
+ kind === "category" ? CATEGORY : cn("font-semibold", TONE[tone]),
492
517
  KIND[kind],
493
518
  className
494
519
  ),
495
520
  children: [
496
- dot && /* @__PURE__ */ jsx4("span", { "aria-hidden": "true", className: "size-1.5 shrink-0 rounded-full bg-current" }),
521
+ dot && /* @__PURE__ */ jsx5("span", { "aria-hidden": "true", className: "size-1.5 shrink-0 rounded-full bg-current" }),
497
522
  children
498
523
  ]
499
524
  }
@@ -502,10 +527,10 @@ function Badge({ tone = "neutral", kind = "label", dot = false, children, classN
502
527
 
503
528
  // src/Delta.tsx
504
529
  import { ArrowDownRight, ArrowUpRight } from "lucide-react";
505
- import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
530
+ import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
506
531
  function Delta({ value, suffix = "%", arrow = false, period, className }) {
507
532
  const up = value >= 0;
508
- return /* @__PURE__ */ jsxs5(
533
+ return /* @__PURE__ */ jsxs6(
509
534
  "span",
510
535
  {
511
536
  className: cn(
@@ -514,11 +539,11 @@ function Delta({ value, suffix = "%", arrow = false, period, className }) {
514
539
  className
515
540
  ),
516
541
  children: [
517
- arrow && (up ? /* @__PURE__ */ jsx5(ArrowUpRight, { size: 13, "aria-hidden": "true" }) : /* @__PURE__ */ jsx5(ArrowDownRight, { size: 13, "aria-hidden": "true" })),
542
+ arrow && (up ? /* @__PURE__ */ jsx6(ArrowUpRight, { size: 13, "aria-hidden": "true" }) : /* @__PURE__ */ jsx6(ArrowDownRight, { size: 13, "aria-hidden": "true" })),
518
543
  up ? "+" : "\u2212",
519
544
  Math.abs(value).toFixed(1),
520
545
  suffix,
521
- period && /* @__PURE__ */ jsx5("span", { className: "ml-0.5", children: period })
546
+ period && /* @__PURE__ */ jsx6("span", { className: "ml-0.5", children: period })
522
547
  ]
523
548
  }
524
549
  );
@@ -526,7 +551,7 @@ function Delta({ value, suffix = "%", arrow = false, period, className }) {
526
551
 
527
552
  // src/CheckBox.tsx
528
553
  import { Check as Check2, Minus } from "lucide-react";
529
- import { jsx as jsx6 } from "react/jsx-runtime";
554
+ import { jsx as jsx7 } from "react/jsx-runtime";
530
555
  function boxClass(on, disabled) {
531
556
  return cn(
532
557
  "flex h-[18px] w-[18px] shrink-0 items-center justify-center rounded-[5px] border transition-colors",
@@ -535,8 +560,8 @@ function boxClass(on, disabled) {
535
560
  );
536
561
  }
537
562
  function Glyph({ checked, indeterminate }) {
538
- if (indeterminate) return /* @__PURE__ */ jsx6(Minus, { size: 13, strokeWidth: 3 });
539
- return checked ? /* @__PURE__ */ jsx6(Check2, { size: 13, strokeWidth: 3 }) : null;
563
+ if (indeterminate) return /* @__PURE__ */ jsx7(Minus, { size: 13, strokeWidth: 3 });
564
+ return checked ? /* @__PURE__ */ jsx7(Check2, { size: 13, strokeWidth: 3 }) : null;
540
565
  }
541
566
  function CheckBox({
542
567
  checked,
@@ -550,7 +575,7 @@ function CheckBox({
550
575
  className
551
576
  }) {
552
577
  const on = checked || !!indeterminate;
553
- return /* @__PURE__ */ jsx6(
578
+ return /* @__PURE__ */ jsx7(
554
579
  "button",
555
580
  {
556
581
  type: "button",
@@ -574,18 +599,18 @@ function CheckBox({
574
599
  disabled && "hover:border-border-interactive",
575
600
  className
576
601
  ),
577
- children: /* @__PURE__ */ jsx6(Glyph, { checked, indeterminate })
602
+ children: /* @__PURE__ */ jsx7(Glyph, { checked, indeterminate })
578
603
  }
579
604
  );
580
605
  }
581
606
  function CheckBoxBox({ checked, indeterminate, disabled, className }) {
582
- return /* @__PURE__ */ jsx6("span", { "aria-hidden": "true", className: cn(boxClass(checked || !!indeterminate, disabled), className), children: /* @__PURE__ */ jsx6(Glyph, { checked, indeterminate }) });
607
+ return /* @__PURE__ */ jsx7("span", { "aria-hidden": "true", className: cn(boxClass(checked || !!indeterminate, disabled), className), children: /* @__PURE__ */ jsx7(Glyph, { checked, indeterminate }) });
583
608
  }
584
609
 
585
610
  // src/DateRangeFilter.tsx
586
611
  import { useEffect as useEffect3, useLayoutEffect, useMemo as useMemo2, useRef as useRef3, useState as useState3 } from "react";
587
612
  import { ChevronDown as ChevronDown2, ChevronLeft, ChevronRight } from "lucide-react";
588
- import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
613
+ import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
589
614
  var DEFAULT_SHORTCUTS = [
590
615
  "Year to date",
591
616
  "Rolling 3 months",
@@ -634,6 +659,9 @@ var addDays = (d, n) => {
634
659
  };
635
660
  var addMonths = (d, n) => new Date(d.getFullYear(), d.getMonth() + n, 1);
636
661
  var sameDay = (a, b) => a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
662
+ var firstOfMonth = (d) => new Date(d.getFullYear(), d.getMonth(), 1);
663
+ var lastOfMonth = (d) => new Date(d.getFullYear(), d.getMonth() + 1, 0);
664
+ var fmtMonth = (d) => `${MONTHS[d.getMonth()].slice(0, 3)} ${d.getFullYear()}`;
637
665
  var fmt = (d) => `${MONTHS[d.getMonth()].slice(0, 3)} ${d.getDate()}, ${d.getFullYear()}`;
638
666
  var fmtFull = (d) => `${MONTHS[d.getMonth()]} ${d.getDate()}, ${d.getFullYear()}`;
639
667
  var fullRangeLabel = (s, e) => `${fmtFull(s)} - ${fmtFull(e)}`;
@@ -714,14 +742,17 @@ function DateRangeFilter({
714
742
  shortDates = false,
715
743
  icon,
716
744
  presetSet = "default",
717
- testIdPrefix
745
+ testIdPrefix,
746
+ granularity = "day"
718
747
  }) {
748
+ const monthly = granularity === "month";
749
+ const snap = (s, e) => monthly ? [firstOfMonth(s), lastOfMonth(e)] : [s, e];
719
750
  const controlled = controlledValue !== void 0 && controlledRange !== void 0;
720
751
  const SHORTCUTS = presetSet === "creativeIntel" ? CREATIVE_INTEL_SHORTCUTS : DEFAULT_SHORTCUTS;
721
752
  const today = useMemo2(() => /* @__PURE__ */ new Date(), []);
722
753
  const initShortcut = matchShortcut(SHORTCUTS, controlled ? controlledValue : defaultValue);
723
- const initRange = controlled ? controlledRange : presetRange(initShortcut === "Custom" ? "Rolling 12 months" : initShortcut, today);
724
- const dateLine = (s, e) => shortDates ? `${fmt(s)} \u2013 ${fmt(e)}` : fullRangeLabel(s, e);
754
+ const initRange = controlled ? controlledRange : snap(...presetRange(initShortcut === "Custom" ? "Rolling 12 months" : initShortcut, today));
755
+ const dateLine = (s, e) => monthly ? `${fmtMonth(s)} \u2013 ${fmtMonth(e)}` : shortDates ? `${fmt(s)} \u2013 ${fmt(e)}` : fullRangeLabel(s, e);
725
756
  const [open, setOpen] = useState3(false);
726
757
  const [uncontrolledValue, setUncontrolledValue] = useState3(
727
758
  showDates ? presetLabel(initShortcut) : defaultValue || "Last 7 days"
@@ -764,25 +795,27 @@ function DateRangeFilter({
764
795
  if (key === "Custom") return;
765
796
  const r = presetRange(key, today);
766
797
  if (r) {
767
- setStart(r[0]);
768
- setEnd(r[1]);
769
- setLeftMonth(new Date(r[0].getFullYear(), r[0].getMonth(), 1));
798
+ const [s, e] = snap(r[0], r[1]);
799
+ setStart(s);
800
+ setEnd(e);
801
+ setLeftMonth(new Date(s.getFullYear(), s.getMonth(), 1));
770
802
  }
771
803
  };
772
804
  const pickDay = (d) => {
773
805
  setShortcut("Custom");
774
806
  if (!start || start && end) {
775
- setStart(d);
807
+ setStart(monthly ? firstOfMonth(d) : d);
776
808
  setEnd(null);
777
809
  } else if (d < start) {
778
- setEnd(start);
779
- setStart(d);
780
- } else setEnd(d);
810
+ const [s, e] = snap(d, start);
811
+ setStart(s);
812
+ setEnd(e);
813
+ } else setEnd(monthly ? lastOfMonth(d) : d);
781
814
  };
782
815
  const apply = () => {
783
- const s = start || initRange[0];
784
- const e = end || s;
785
- const v = showDates ? presetLabel(shortcut) : shortcut === "Custom" ? `${fmt(s)} \u2014 ${fmt(e)}` : shortcut;
816
+ const [s, e] = snap(start || initRange[0], end || start || initRange[0]);
817
+ const custom = monthly ? `${fmtMonth(s)} \u2014 ${fmtMonth(e)}` : `${fmt(s)} \u2014 ${fmt(e)}`;
818
+ const v = showDates ? presetLabel(shortcut) : shortcut === "Custom" ? custom : shortcut;
786
819
  if (!controlled) {
787
820
  committed.current = { shortcut, start: s, end: e };
788
821
  setUncontrolledValue(v);
@@ -799,26 +832,26 @@ function DateRangeFilter({
799
832
  setFlipBelow(ref.current.getBoundingClientRect().top < popRef.current.offsetHeight + 16);
800
833
  }, [open, placement]);
801
834
  const above = placement === "above" && !flipBelow;
802
- return /* @__PURE__ */ jsxs6("div", { className: "relative", ref, children: [
803
- /* @__PURE__ */ jsxs6(
835
+ return /* @__PURE__ */ jsxs7("div", { className: "relative", ref, children: [
836
+ /* @__PURE__ */ jsxs7(
804
837
  "button",
805
838
  {
806
839
  type: "button",
807
840
  "data-testid": testIdPrefix && `${testIdPrefix}-trigger`,
808
841
  onClick: () => setOpen((v) => !v),
809
842
  "aria-expanded": open,
810
- className: "flex h-11 items-center gap-2 rounded-control border border-border-strong bg-input px-2.5 text-text-secondary transition-colors hover:bg-subtle hover:text-text-primary focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-border-focus",
843
+ className: chipTriggerClass(),
811
844
  children: [
812
- icon && /* @__PURE__ */ jsx7("span", { className: "shrink-0 text-text-tertiary", children: icon }),
813
- /* @__PURE__ */ jsxs6("span", { className: "flex flex-col gap-1 text-left leading-none", children: [
814
- /* @__PURE__ */ jsx7("span", { className: showDates ? "text-[11px] text-text-tertiary" : "text-control-caption uppercase tracking-wide text-text-tertiary", children: showDates ? displayDatesLine : caption }),
815
- /* @__PURE__ */ jsx7("span", { className: "text-[12px] font-medium text-text-primary", children: displayValue })
845
+ icon && /* @__PURE__ */ jsx8("span", { className: "shrink-0 text-text-tertiary", children: icon }),
846
+ /* @__PURE__ */ jsxs7("span", { className: "flex flex-col gap-1 text-left leading-none", children: [
847
+ /* @__PURE__ */ jsx8("span", { className: showDates ? "text-[11px] text-text-tertiary" : "text-control-caption uppercase tracking-wide text-text-tertiary", children: showDates ? displayDatesLine : caption }),
848
+ /* @__PURE__ */ jsx8("span", { className: "text-[12px] font-medium text-text-primary", children: displayValue })
816
849
  ] }),
817
- /* @__PURE__ */ jsx7(ChevronDown2, { size: 14, "aria-hidden": "true", className: `shrink-0 text-text-secondary transition-transform ${open ? "rotate-180" : ""}` })
850
+ /* @__PURE__ */ jsx8(ChevronDown2, { size: 14, "aria-hidden": "true", className: `shrink-0 text-text-secondary transition-transform ${open ? "rotate-180" : ""}` })
818
851
  ]
819
852
  }
820
853
  ),
821
- open && /* @__PURE__ */ jsxs6(
854
+ open && /* @__PURE__ */ jsxs7(
822
855
  "div",
823
856
  {
824
857
  "data-testid": testIdPrefix && `${testIdPrefix}-popover`,
@@ -827,7 +860,7 @@ function DateRangeFilter({
827
860
  role: "dialog",
828
861
  "aria-label": "Select date range",
829
862
  children: [
830
- /* @__PURE__ */ jsx7("div", { className: "flex w-44 shrink-0 flex-col gap-0.5 border-r border-border-default p-2", children: SHORTCUTS.map((s) => /* @__PURE__ */ jsx7(
863
+ /* @__PURE__ */ jsx8("div", { className: "flex w-44 shrink-0 flex-col gap-0.5 border-r border-border-default p-2", children: SHORTCUTS.map((s) => /* @__PURE__ */ jsx8(
831
864
  "button",
832
865
  {
833
866
  type: "button",
@@ -838,28 +871,28 @@ function DateRangeFilter({
838
871
  },
839
872
  s
840
873
  )) }),
841
- /* @__PURE__ */ jsxs6("div", { className: "flex flex-col p-4", children: [
842
- /* @__PURE__ */ jsxs6("div", { className: "flex items-end gap-3", children: [
843
- /* @__PURE__ */ jsx7(Field, { label: "Start date", value: start ? fmt(start) : "\u2014" }),
844
- /* @__PURE__ */ jsx7("span", { className: "pb-2.5 text-text-tertiary", children: "\u2014" }),
845
- /* @__PURE__ */ jsx7(Field, { label: "End date", value: end ? fmt(end) : start ? fmt(start) : "\u2014" })
874
+ /* @__PURE__ */ jsxs7("div", { className: "flex flex-col p-4", children: [
875
+ /* @__PURE__ */ jsxs7("div", { className: "flex items-end gap-3", children: [
876
+ /* @__PURE__ */ jsx8(Field, { label: "Start date", value: start ? fmt(start) : "\u2014" }),
877
+ /* @__PURE__ */ jsx8("span", { className: "pb-2.5 text-text-tertiary", children: "\u2014" }),
878
+ /* @__PURE__ */ jsx8(Field, { label: "End date", value: end ? fmt(end) : start ? fmt(start) : "\u2014" })
846
879
  ] }),
847
- /* @__PURE__ */ jsx7("div", { className: "my-4 border-t border-border-default" }),
848
- /* @__PURE__ */ jsx7("div", { className: "flex gap-8", children: [0, 1].map((offset) => {
880
+ /* @__PURE__ */ jsx8("div", { className: "my-4 border-t border-border-default" }),
881
+ /* @__PURE__ */ jsx8("div", { className: "flex gap-8", children: [0, 1].map((offset) => {
849
882
  const m = addMonths(leftMonth, offset);
850
883
  const grid = monthGrid(m.getFullYear(), m.getMonth());
851
- return /* @__PURE__ */ jsxs6("div", { className: "w-[252px]", children: [
852
- /* @__PURE__ */ jsxs6("div", { className: "mb-2 flex items-center justify-between", children: [
853
- offset === 0 ? /* @__PURE__ */ jsx7(NavBtn, { onClick: () => setLeftMonth(addMonths(leftMonth, -1)), "aria-label": "Previous month", children: /* @__PURE__ */ jsx7(ChevronLeft, { size: 16 }) }) : /* @__PURE__ */ jsx7("span", { className: "h-7 w-7" }),
854
- /* @__PURE__ */ jsxs6("span", { className: "text-[15px] font-semibold text-text-primary", children: [
884
+ return /* @__PURE__ */ jsxs7("div", { className: "w-[252px]", children: [
885
+ /* @__PURE__ */ jsxs7("div", { className: "mb-2 flex items-center justify-between", children: [
886
+ offset === 0 ? /* @__PURE__ */ jsx8(NavBtn, { onClick: () => setLeftMonth(addMonths(leftMonth, -1)), "aria-label": "Previous month", children: /* @__PURE__ */ jsx8(ChevronLeft, { size: 16 }) }) : /* @__PURE__ */ jsx8("span", { className: "h-7 w-7" }),
887
+ /* @__PURE__ */ jsxs7("span", { className: "text-[15px] font-semibold text-text-primary", children: [
855
888
  MONTHS[m.getMonth()],
856
889
  " ",
857
890
  m.getFullYear()
858
891
  ] }),
859
- offset === 1 ? /* @__PURE__ */ jsx7(NavBtn, { onClick: () => setLeftMonth(addMonths(leftMonth, 1)), "aria-label": "Next month", children: /* @__PURE__ */ jsx7(ChevronRight, { size: 16 }) }) : /* @__PURE__ */ jsx7("span", { className: "h-7 w-7" })
892
+ offset === 1 ? /* @__PURE__ */ jsx8(NavBtn, { onClick: () => setLeftMonth(addMonths(leftMonth, 1)), "aria-label": "Next month", children: /* @__PURE__ */ jsx8(ChevronRight, { size: 16 }) }) : /* @__PURE__ */ jsx8("span", { className: "h-7 w-7" })
860
893
  ] }),
861
- /* @__PURE__ */ jsxs6("div", { className: "grid grid-cols-7", children: [
862
- WEEKDAYS.map((w) => /* @__PURE__ */ jsx7("div", { className: "flex h-8 items-center justify-center text-[12px] font-semibold text-text-secondary", children: w }, w)),
894
+ /* @__PURE__ */ jsxs7("div", { className: "grid grid-cols-7", children: [
895
+ WEEKDAYS.map((w) => /* @__PURE__ */ jsx8("div", { className: "flex h-8 items-center justify-center text-[12px] font-semibold text-text-secondary", children: w }, w)),
863
896
  grid.map((d, i) => {
864
897
  const inMonth = d.getMonth() === m.getMonth();
865
898
  const hasRange = !!(start && end);
@@ -874,9 +907,9 @@ function DateRangeFilter({
874
907
  else if (end && isEnd) band = "left-0 right-1/2";
875
908
  else band = "left-0 right-0";
876
909
  }
877
- return /* @__PURE__ */ jsxs6("button", { type: "button", onClick: () => pickDay(d), className: "relative flex h-9 items-center justify-center", children: [
878
- band && /* @__PURE__ */ jsx7("span", { className: `absolute inset-y-[3px] bg-ai-tint ${band}`, "aria-hidden": "true" }),
879
- /* @__PURE__ */ jsx7(
910
+ return /* @__PURE__ */ jsxs7("button", { type: "button", onClick: () => pickDay(d), className: "relative flex h-9 items-center justify-center", children: [
911
+ band && /* @__PURE__ */ jsx8("span", { className: `absolute inset-y-[3px] bg-ai-tint ${band}`, "aria-hidden": "true" }),
912
+ /* @__PURE__ */ jsx8(
880
913
  "span",
881
914
  {
882
915
  className: `relative z-10 flex h-8 w-8 items-center justify-center rounded-full text-[13px] tabular-nums ${endpoint ? "bg-brand-primaryAction font-semibold text-brand-onprimary" : inMonth ? "text-text-primary hover:bg-subtle" : "text-text-tertiary"}`,
@@ -888,9 +921,10 @@ function DateRangeFilter({
888
921
  ] })
889
922
  ] }, offset);
890
923
  }) }),
891
- /* @__PURE__ */ jsxs6("div", { className: "mt-4 flex justify-end gap-2", children: [
892
- /* @__PURE__ */ jsx7("button", { type: "button", "data-testid": testIdPrefix && `${testIdPrefix}-cancel`, onClick: () => setOpen(false), className: "rounded-control border border-border-default bg-surface px-5 py-2 text-[13px] font-semibold text-text-primary transition-colors hover:bg-subtle", children: "Cancel" }),
893
- /* @__PURE__ */ jsx7("button", { type: "button", "data-testid": testIdPrefix && `${testIdPrefix}-apply`, onClick: apply, className: "rounded-control bg-brand-primaryAction px-5 py-2 text-[13px] font-semibold text-brand-onprimary transition-[filter] hover:brightness-110", children: "Apply" })
924
+ /* @__PURE__ */ jsxs7("div", { className: "mt-4 flex items-center justify-end gap-2", children: [
925
+ monthly && /* @__PURE__ */ jsx8("span", { className: "mr-auto text-xs text-text-tertiary", children: "Data is monthly, so ranges cover whole months." }),
926
+ /* @__PURE__ */ jsx8("button", { type: "button", "data-testid": testIdPrefix && `${testIdPrefix}-cancel`, onClick: () => setOpen(false), className: "rounded-control border border-border-default bg-surface px-5 py-2 text-[13px] font-semibold text-text-primary transition-colors hover:bg-subtle", children: "Cancel" }),
927
+ /* @__PURE__ */ jsx8("button", { type: "button", "data-testid": testIdPrefix && `${testIdPrefix}-apply`, onClick: apply, className: "rounded-control bg-brand-primaryAction px-5 py-2 text-[13px] font-semibold text-brand-onprimary transition-[filter] hover:brightness-110", children: "Apply" })
894
928
  ] })
895
929
  ] })
896
930
  ]
@@ -899,19 +933,19 @@ function DateRangeFilter({
899
933
  ] });
900
934
  }
901
935
  function Field({ label, value }) {
902
- return /* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-1.5", children: [
903
- /* @__PURE__ */ jsx7("span", { className: "text-[12px] font-medium text-text-secondary", children: label }),
904
- /* @__PURE__ */ jsx7("div", { className: "flex h-10 min-w-[140px] items-center rounded-control border border-border-strong bg-input px-3 text-[14px] font-medium text-text-primary", children: value })
936
+ return /* @__PURE__ */ jsxs7("div", { className: "flex flex-col gap-1.5", children: [
937
+ /* @__PURE__ */ jsx8("span", { className: "text-[12px] font-medium text-text-secondary", children: label }),
938
+ /* @__PURE__ */ jsx8("div", { className: "flex h-10 min-w-[140px] items-center rounded-control border border-border-strong bg-input px-3 text-[14px] font-medium text-text-primary", children: value })
905
939
  ] });
906
940
  }
907
941
  function NavBtn({ children, onClick, ...rest }) {
908
- return /* @__PURE__ */ jsx7("button", { type: "button", onClick, className: "flex h-7 w-7 items-center justify-center rounded-full text-text-secondary transition-colors hover:bg-subtle hover:text-text-primary", ...rest, children });
942
+ return /* @__PURE__ */ jsx8("button", { type: "button", onClick, className: "flex h-7 w-7 items-center justify-center rounded-full text-text-secondary transition-colors hover:bg-subtle hover:text-text-primary", ...rest, children });
909
943
  }
910
944
 
911
945
  // src/SearchBar.tsx
912
946
  import { useEffect as useEffect4, useId as useId2, useRef as useRef4, useState as useState4 } from "react";
913
947
  import { AlertCircle, Check as Check3, ChevronDown as ChevronDown3, Search as Search3, X as X2 } from "lucide-react";
914
- import { Fragment as Fragment3, jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
948
+ import { Fragment as Fragment3, jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
915
949
  var HEIGHT = { sm: "h-8", md: "h-10", lg: "h-11" };
916
950
  var DEFAULT_SEARCH_MATCH = { mode: "anyWord", wordJoin: "Or" };
917
951
  var MODE_LABEL = {
@@ -951,7 +985,7 @@ function SearchBar({
951
985
  };
952
986
  }, [open]);
953
987
  const showMatch = variant === "filterable" && matchValue;
954
- return /* @__PURE__ */ jsxs7(
988
+ return /* @__PURE__ */ jsxs8(
955
989
  "div",
956
990
  {
957
991
  className: cx2(
@@ -960,9 +994,9 @@ function SearchBar({
960
994
  className
961
995
  ),
962
996
  children: [
963
- /* @__PURE__ */ jsxs7("label", { className: "flex min-w-0 flex-1 items-center gap-2 px-2.5", children: [
964
- /* @__PURE__ */ jsx8(Search3, { size: 15, "aria-hidden": "true", className: "shrink-0 text-text-tertiary" }),
965
- /* @__PURE__ */ jsx8(
997
+ /* @__PURE__ */ jsxs8("label", { className: "flex min-w-0 flex-1 items-center gap-2 px-2.5", children: [
998
+ /* @__PURE__ */ jsx9(Search3, { size: 15, "aria-hidden": "true", className: "shrink-0 text-text-tertiary" }),
999
+ /* @__PURE__ */ jsx9(
966
1000
  "input",
967
1001
  {
968
1002
  ref: input,
@@ -976,7 +1010,7 @@ function SearchBar({
976
1010
  }
977
1011
  )
978
1012
  ] }),
979
- value && onChange && /* @__PURE__ */ jsx8(
1013
+ value && onChange && /* @__PURE__ */ jsx9(
980
1014
  "button",
981
1015
  {
982
1016
  type: "button",
@@ -987,7 +1021,7 @@ function SearchBar({
987
1021
  "aria-label": "Clear search",
988
1022
  "data-testid": testIdPrefix && `${testIdPrefix}-clear`,
989
1023
  className: "mr-1.5 flex size-6 shrink-0 items-center justify-center self-center rounded-control text-text-tertiary hover:bg-subtle hover:text-text-primary focus-visible:outline-2 focus-visible:outline-border-focus",
990
- children: /* @__PURE__ */ jsx8(X2, { size: 14, "aria-hidden": "true" })
1024
+ children: /* @__PURE__ */ jsx9(X2, { size: 14, "aria-hidden": "true" })
991
1025
  }
992
1026
  ),
993
1027
  showMatch && // border-border-default, not the bare `border-border` both source
@@ -1001,8 +1035,8 @@ function SearchBar({
1001
1035
  // token package (insights-studio-prototype's own src/index.css;
1002
1036
  // mr-clientapps' own tailwind.config.ts `colors.border.DEFAULT`) --
1003
1037
  // an alias this shared component can't rely on existing.
1004
- /* @__PURE__ */ jsxs7("div", { className: "relative shrink-0 border-l border-border-default", ref, children: [
1005
- /* @__PURE__ */ jsxs7(
1038
+ /* @__PURE__ */ jsxs8("div", { className: "relative shrink-0 border-l border-border-default", ref, children: [
1039
+ /* @__PURE__ */ jsxs8(
1006
1040
  "button",
1007
1041
  {
1008
1042
  type: "button",
@@ -1013,7 +1047,7 @@ function SearchBar({
1013
1047
  className: "flex h-full items-center gap-1 px-2.5 text-[13px] font-medium text-text-primary transition-colors hover:bg-subtle",
1014
1048
  children: [
1015
1049
  matchValue.mode === "anyWord" ? `${MODE_LABEL.anyWord} (${matchValue.wordJoin})` : MODE_LABEL[matchValue.mode],
1016
- /* @__PURE__ */ jsx8(
1050
+ /* @__PURE__ */ jsx9(
1017
1051
  ChevronDown3,
1018
1052
  {
1019
1053
  size: 14,
@@ -1024,25 +1058,25 @@ function SearchBar({
1024
1058
  ]
1025
1059
  }
1026
1060
  ),
1027
- open && /* @__PURE__ */ jsx8(
1061
+ open && /* @__PURE__ */ jsx9(
1028
1062
  "div",
1029
1063
  {
1030
1064
  role: "dialog",
1031
1065
  "aria-label": "Search match type",
1032
1066
  "data-testid": testIdPrefix && `${testIdPrefix}-mode-popover`,
1033
1067
  className: "absolute right-0 top-[calc(100%+8px)] z-50 w-[400px] rounded-card border border-border-default bg-surface p-3 shadow-overlay",
1034
- children: /* @__PURE__ */ jsxs7("div", { role: "radiogroup", "aria-label": "Search match type", className: "flex flex-col", children: [
1035
- /* @__PURE__ */ jsx8(
1068
+ children: /* @__PURE__ */ jsxs8("div", { role: "radiogroup", "aria-label": "Search match type", className: "flex flex-col", children: [
1069
+ /* @__PURE__ */ jsx9(
1036
1070
  ModeRow,
1037
1071
  {
1038
1072
  title: "Any Word Text Search",
1039
1073
  selected: matchValue.mode === "anyWord",
1040
1074
  onSelect: () => onMatchChange?.({ mode: "anyWord", wordJoin: matchValue.wordJoin }),
1041
1075
  testId: testIdPrefix && `${testIdPrefix}-mode-anyWord`,
1042
- description: /* @__PURE__ */ jsx8(Fragment3, { children: "Find creatives that contain your keyword(s) using an \u201COr\u201D (match any) or \u201CAnd\u201D (match all) conditional in any order." }),
1076
+ description: /* @__PURE__ */ jsx9(Fragment3, { children: "Find creatives that contain your keyword(s) using an \u201COr\u201D (match any) or \u201CAnd\u201D (match all) conditional in any order." }),
1043
1077
  infoText: "The Or/And choice applies only when Any Word is the active search mode.",
1044
- extra: /* @__PURE__ */ jsxs7("span", { className: "flex items-center gap-3", children: [
1045
- /* @__PURE__ */ jsx8(
1078
+ extra: /* @__PURE__ */ jsxs8("span", { className: "flex items-center gap-3", children: [
1079
+ /* @__PURE__ */ jsx9(
1046
1080
  RadioOption,
1047
1081
  {
1048
1082
  label: "Or",
@@ -1051,7 +1085,7 @@ function SearchBar({
1051
1085
  testId: testIdPrefix && `${testIdPrefix}-word-join-or`
1052
1086
  }
1053
1087
  ),
1054
- /* @__PURE__ */ jsx8(
1088
+ /* @__PURE__ */ jsx9(
1055
1089
  RadioOption,
1056
1090
  {
1057
1091
  label: "And",
@@ -1063,8 +1097,8 @@ function SearchBar({
1063
1097
  ] })
1064
1098
  }
1065
1099
  ),
1066
- /* @__PURE__ */ jsx8(Divider, {}),
1067
- /* @__PURE__ */ jsx8(
1100
+ /* @__PURE__ */ jsx9(Divider, {}),
1101
+ /* @__PURE__ */ jsx9(
1068
1102
  ModeRow,
1069
1103
  {
1070
1104
  title: "Exact Match Text Search",
@@ -1075,8 +1109,8 @@ function SearchBar({
1075
1109
  infoText: "Keywords are matched as a single contiguous phrase, in the order you typed them."
1076
1110
  }
1077
1111
  ),
1078
- /* @__PURE__ */ jsx8(Divider, {}),
1079
- /* @__PURE__ */ jsx8(
1112
+ /* @__PURE__ */ jsx9(Divider, {}),
1113
+ /* @__PURE__ */ jsx9(
1080
1114
  ModeRow,
1081
1115
  {
1082
1116
  title: "Contextual Search",
@@ -1088,8 +1122,8 @@ function SearchBar({
1088
1122
  infoText: "Uses semantic matching, so results can include related terms even when the exact keyword isn't present."
1089
1123
  }
1090
1124
  ),
1091
- /* @__PURE__ */ jsx8(Divider, {}),
1092
- /* @__PURE__ */ jsx8(
1125
+ /* @__PURE__ */ jsx9(Divider, {}),
1126
+ /* @__PURE__ */ jsx9(
1093
1127
  ModeRow,
1094
1128
  {
1095
1129
  title: "Ad Code Search",
@@ -1109,7 +1143,7 @@ function SearchBar({
1109
1143
  );
1110
1144
  }
1111
1145
  function Divider() {
1112
- return /* @__PURE__ */ jsx8("div", { className: "my-2.5 border-t border-border-default", "aria-hidden": "true" });
1146
+ return /* @__PURE__ */ jsx9("div", { className: "my-2.5 border-t border-border-default", "aria-hidden": "true" });
1113
1147
  }
1114
1148
  function ModeRow({
1115
1149
  title,
@@ -1121,7 +1155,7 @@ function ModeRow({
1121
1155
  onSelect,
1122
1156
  testId
1123
1157
  }) {
1124
- return /* @__PURE__ */ jsxs7(
1158
+ return /* @__PURE__ */ jsxs8(
1125
1159
  "div",
1126
1160
  {
1127
1161
  role: "radio",
@@ -1137,18 +1171,18 @@ function ModeRow({
1137
1171
  },
1138
1172
  className: "flex cursor-pointer flex-col items-stretch gap-1 rounded-control p-1.5 text-left transition-colors hover:bg-subtle focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-border-focus",
1139
1173
  children: [
1140
- /* @__PURE__ */ jsxs7("div", { className: "flex items-center justify-between gap-2", children: [
1141
- /* @__PURE__ */ jsxs7("div", { className: "flex flex-wrap items-center gap-3", children: [
1142
- /* @__PURE__ */ jsxs7("span", { className: "flex items-center gap-1", children: [
1143
- /* @__PURE__ */ jsx8("span", { className: "text-[14px] font-semibold text-text-primary", children: title }),
1144
- /* @__PURE__ */ jsx8(RowInfoTip, { text: infoText })
1174
+ /* @__PURE__ */ jsxs8("div", { className: "flex items-center justify-between gap-2", children: [
1175
+ /* @__PURE__ */ jsxs8("div", { className: "flex flex-wrap items-center gap-3", children: [
1176
+ /* @__PURE__ */ jsxs8("span", { className: "flex items-center gap-1", children: [
1177
+ /* @__PURE__ */ jsx9("span", { className: "text-[14px] font-semibold text-text-primary", children: title }),
1178
+ /* @__PURE__ */ jsx9(RowInfoTip, { text: infoText })
1145
1179
  ] }),
1146
- badge && /* @__PURE__ */ jsx8("span", { className: "rounded-full bg-subtle px-2 py-0.5 text-badge font-semibold uppercase tracking-wide text-text-secondary", children: badge }),
1180
+ badge && /* @__PURE__ */ jsx9("span", { className: "rounded-full bg-subtle px-2 py-0.5 text-badge font-semibold uppercase tracking-wide text-text-secondary", children: badge }),
1147
1181
  extra
1148
1182
  ] }),
1149
- selected && /* @__PURE__ */ jsx8(Check3, { size: 16, strokeWidth: 2.5, "aria-hidden": "true", className: "shrink-0 text-brand-primaryAction" })
1183
+ selected && /* @__PURE__ */ jsx9(Check3, { size: 16, strokeWidth: 2.5, "aria-hidden": "true", className: "shrink-0 text-brand-primaryAction" })
1150
1184
  ] }),
1151
- /* @__PURE__ */ jsx8("span", { className: "block text-[12.5px] leading-snug text-text-secondary", children: description })
1185
+ /* @__PURE__ */ jsx9("span", { className: "block text-[12.5px] leading-snug text-text-secondary", children: description })
1152
1186
  ]
1153
1187
  }
1154
1188
  );
@@ -1159,7 +1193,7 @@ function RadioOption({
1159
1193
  onSelect,
1160
1194
  testId
1161
1195
  }) {
1162
- return /* @__PURE__ */ jsxs7(
1196
+ return /* @__PURE__ */ jsxs8(
1163
1197
  "button",
1164
1198
  {
1165
1199
  type: "button",
@@ -1172,14 +1206,14 @@ function RadioOption({
1172
1206
  "aria-checked": checked,
1173
1207
  className: "flex items-center gap-1.5 text-[13px] font-medium text-text-primary",
1174
1208
  children: [
1175
- /* @__PURE__ */ jsx8(
1209
+ /* @__PURE__ */ jsx9(
1176
1210
  "span",
1177
1211
  {
1178
1212
  className: cx2(
1179
1213
  "flex h-4 w-4 shrink-0 items-center justify-center rounded-full border-2 transition-colors",
1180
1214
  checked ? "border-brand-primaryAction" : "border-border-interactive"
1181
1215
  ),
1182
- children: checked && /* @__PURE__ */ jsx8("span", { className: "h-2 w-2 rounded-full bg-brand-primaryAction" })
1216
+ children: checked && /* @__PURE__ */ jsx9("span", { className: "h-2 w-2 rounded-full bg-brand-primaryAction" })
1183
1217
  }
1184
1218
  ),
1185
1219
  label
@@ -1199,8 +1233,8 @@ function RowInfoTip({ text }) {
1199
1233
  window.addEventListener("mousedown", onDown);
1200
1234
  return () => window.removeEventListener("mousedown", onDown);
1201
1235
  }, [open]);
1202
- return /* @__PURE__ */ jsxs7("span", { className: "relative inline-flex shrink-0 items-center", ref, children: [
1203
- /* @__PURE__ */ jsx8(
1236
+ return /* @__PURE__ */ jsxs8("span", { className: "relative inline-flex shrink-0 items-center", ref, children: [
1237
+ /* @__PURE__ */ jsx9(
1204
1238
  "button",
1205
1239
  {
1206
1240
  type: "button",
@@ -1212,10 +1246,10 @@ function RowInfoTip({ text }) {
1212
1246
  "aria-expanded": open,
1213
1247
  "aria-describedby": id,
1214
1248
  className: "inline-flex text-text-tertiary transition-colors hover:text-text-primary focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-border-focus",
1215
- children: /* @__PURE__ */ jsx8(AlertCircle, { size: 13, "aria-hidden": "true" })
1249
+ children: /* @__PURE__ */ jsx9(AlertCircle, { size: 13, "aria-hidden": "true" })
1216
1250
  }
1217
1251
  ),
1218
- /* @__PURE__ */ jsx8(
1252
+ /* @__PURE__ */ jsx9(
1219
1253
  "span",
1220
1254
  {
1221
1255
  id,
@@ -1230,7 +1264,7 @@ function RowInfoTip({ text }) {
1230
1264
  // src/SectionRail.tsx
1231
1265
  import { useRef as useRef5 } from "react";
1232
1266
  import { ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight2 } from "lucide-react";
1233
- import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
1267
+ import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
1234
1268
  function SectionRail({
1235
1269
  title,
1236
1270
  titleSerif,
@@ -1243,20 +1277,20 @@ function SectionRail({
1243
1277
  const scroll = (direction) => {
1244
1278
  scrollRef.current?.scrollBy({ left: direction * 320, behavior: "smooth" });
1245
1279
  };
1246
- return /* @__PURE__ */ jsxs8("section", { className: "flex flex-col gap-4", children: [
1247
- /* @__PURE__ */ jsxs8("header", { className: "flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between", children: [
1248
- /* @__PURE__ */ jsxs8("div", { children: [
1249
- /* @__PURE__ */ jsx9(
1280
+ return /* @__PURE__ */ jsxs9("section", { className: "flex flex-col gap-4", children: [
1281
+ /* @__PURE__ */ jsxs9("header", { className: "flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between", children: [
1282
+ /* @__PURE__ */ jsxs9("div", { children: [
1283
+ /* @__PURE__ */ jsx10(
1250
1284
  "h2",
1251
1285
  {
1252
1286
  className: titleSerif ? "font-serif text-2xl font-normal tracking-tight text-text-primary sm:text-[28px]" : "text-xl font-medium tracking-tight text-text-primary sm:text-2xl",
1253
1287
  children: title
1254
1288
  }
1255
1289
  ),
1256
- /* @__PURE__ */ jsx9("p", { className: "mt-1 text-sm text-text-secondary", children: subtitle })
1290
+ /* @__PURE__ */ jsx10("p", { className: "mt-1 text-sm text-text-secondary", children: subtitle })
1257
1291
  ] }),
1258
- /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-2", children: [
1259
- viewAllLabel && viewAllHref && /* @__PURE__ */ jsxs8(
1292
+ /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-2", children: [
1293
+ viewAllLabel && viewAllHref && /* @__PURE__ */ jsxs9(
1260
1294
  "a",
1261
1295
  {
1262
1296
  href: viewAllHref,
@@ -1267,29 +1301,29 @@ function SectionRail({
1267
1301
  ]
1268
1302
  }
1269
1303
  ),
1270
- /* @__PURE__ */ jsx9(
1304
+ /* @__PURE__ */ jsx10(
1271
1305
  "button",
1272
1306
  {
1273
1307
  type: "button",
1274
1308
  onClick: () => scroll(-1),
1275
1309
  "aria-label": "Previous",
1276
1310
  className: "hidden h-10 w-10 items-center justify-center rounded-control border border-border-default text-text-secondary transition-colors hover:bg-subtle hover:text-text-primary sm:flex lg:hidden",
1277
- children: /* @__PURE__ */ jsx9(ChevronLeft2, { size: 16 })
1311
+ children: /* @__PURE__ */ jsx10(ChevronLeft2, { size: 16 })
1278
1312
  }
1279
1313
  ),
1280
- /* @__PURE__ */ jsx9(
1314
+ /* @__PURE__ */ jsx10(
1281
1315
  "button",
1282
1316
  {
1283
1317
  type: "button",
1284
1318
  onClick: () => scroll(1),
1285
1319
  "aria-label": "Next",
1286
1320
  className: "hidden h-10 w-10 items-center justify-center rounded-control border border-border-default text-text-secondary transition-colors hover:bg-subtle hover:text-text-primary sm:flex lg:hidden",
1287
- children: /* @__PURE__ */ jsx9(ChevronRight2, { size: 16 })
1321
+ children: /* @__PURE__ */ jsx10(ChevronRight2, { size: 16 })
1288
1322
  }
1289
1323
  )
1290
1324
  ] })
1291
1325
  ] }),
1292
- /* @__PURE__ */ jsx9(
1326
+ /* @__PURE__ */ jsx10(
1293
1327
  "div",
1294
1328
  {
1295
1329
  ref: scrollRef,
@@ -1303,7 +1337,7 @@ function SectionRail({
1303
1337
  // src/DataScopeFilter.tsx
1304
1338
  import { useEffect as useEffect5, useRef as useRef6, useState as useState5 } from "react";
1305
1339
  import { Check as Check4, ChevronDown as ChevronDown4 } from "lucide-react";
1306
- import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
1340
+ import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
1307
1341
  var FINAL_ONLY_TEXT = "Trims time periods to data that has finalized across the selected media formats. Some formats (e.g. Network TV and Cinema) finalize later, so the most recent periods may still change. Turn on for stable, report-ready numbers.";
1308
1342
  function cx3(...classes) {
1309
1343
  return classes.filter(Boolean).join(" ");
@@ -1329,21 +1363,17 @@ function DataScopeFilter({ value, onChange, align = "right" }) {
1329
1363
  onChange(v);
1330
1364
  setOpen(false);
1331
1365
  };
1332
- return /* @__PURE__ */ jsxs9("div", { className: "relative", ref, children: [
1333
- /* @__PURE__ */ jsxs9(
1366
+ return /* @__PURE__ */ jsxs10("div", { className: "relative", ref, children: [
1367
+ /* @__PURE__ */ jsxs10(
1334
1368
  "button",
1335
1369
  {
1336
1370
  type: "button",
1337
1371
  onClick: () => setOpen((o) => !o),
1338
1372
  "aria-expanded": open,
1339
- "aria-haspopup": "listbox",
1340
- className: "flex h-11 items-center gap-2 rounded-control border border-border-strong bg-input px-2.5 text-text-secondary transition-colors hover:bg-subtle hover:text-text-primary focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-border-focus",
1373
+ className: chipTriggerClass(),
1341
1374
  children: [
1342
- /* @__PURE__ */ jsxs9("span", { className: "flex flex-col gap-1 text-left leading-none", children: [
1343
- /* @__PURE__ */ jsx10("span", { className: "text-control-caption uppercase tracking-wide text-text-tertiary", children: "Data" }),
1344
- /* @__PURE__ */ jsx10("span", { className: "text-[12px] font-medium text-text-primary", children: display })
1345
- ] }),
1346
- /* @__PURE__ */ jsx10(
1375
+ /* @__PURE__ */ jsx11(ChipContent, { caption: "Data", value: display }),
1376
+ /* @__PURE__ */ jsx11(
1347
1377
  ChevronDown4,
1348
1378
  {
1349
1379
  size: 14,
@@ -1354,18 +1384,18 @@ function DataScopeFilter({ value, onChange, align = "right" }) {
1354
1384
  ]
1355
1385
  }
1356
1386
  ),
1357
- open && /* @__PURE__ */ jsxs9(
1387
+ open && /* @__PURE__ */ jsxs10(
1358
1388
  "div",
1359
1389
  {
1360
- role: "listbox",
1390
+ role: "group",
1361
1391
  "aria-label": "Data",
1362
1392
  className: cx3(
1363
1393
  "absolute top-[calc(100%+8px)] z-30 min-w-[220px] overflow-hidden rounded-card border border-border-default bg-surface p-1 shadow-overlay",
1364
1394
  align === "right" ? "right-0" : "left-0"
1365
1395
  ),
1366
1396
  children: [
1367
- /* @__PURE__ */ jsx10(Option, { label: "All", selected: !value, onClick: () => choose(false) }),
1368
- /* @__PURE__ */ jsx10(Option, { label: "Final only", selected: value, onClick: () => choose(true), hint: FINAL_ONLY_TEXT })
1397
+ /* @__PURE__ */ jsx11(Option, { label: "All", selected: !value, onClick: () => choose(false) }),
1398
+ /* @__PURE__ */ jsx11(Option, { label: "Final only", selected: value, onClick: () => choose(true), hint: FINAL_ONLY_TEXT })
1369
1399
  ]
1370
1400
  }
1371
1401
  )
@@ -1377,12 +1407,11 @@ function Option({
1377
1407
  onClick,
1378
1408
  hint
1379
1409
  }) {
1380
- const option = /* @__PURE__ */ jsxs9(
1410
+ const option = /* @__PURE__ */ jsxs10(
1381
1411
  "button",
1382
1412
  {
1383
1413
  type: "button",
1384
- role: "option",
1385
- "aria-selected": selected,
1414
+ "aria-pressed": selected,
1386
1415
  onClick,
1387
1416
  className: cx3(
1388
1417
  "flex items-center gap-2 rounded-control px-2.5 py-2 text-left text-[13px] transition-colors hover:bg-subtle",
@@ -1390,15 +1419,15 @@ function Option({
1390
1419
  selected ? "font-semibold text-text-primary" : "text-text-secondary"
1391
1420
  ),
1392
1421
  children: [
1393
- /* @__PURE__ */ jsx10(Check4, { size: 14, "aria-hidden": "true", className: cx3("shrink-0 text-brand-primaryAction", !selected && "invisible") }),
1422
+ /* @__PURE__ */ jsx11(Check4, { size: 14, "aria-hidden": "true", className: cx3("shrink-0 text-brand-primaryAction", !selected && "invisible") }),
1394
1423
  label
1395
1424
  ]
1396
1425
  }
1397
1426
  );
1398
1427
  if (!hint) return option;
1399
- return /* @__PURE__ */ jsxs9("div", { className: "flex items-center pr-2.5", children: [
1428
+ return /* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-2 pr-2.5", children: [
1400
1429
  option,
1401
- /* @__PURE__ */ jsx10(InfoTip, { text: hint, trigger: "hover", label: `About ${label}` })
1430
+ /* @__PURE__ */ jsx11(InfoTip, { text: hint, trigger: "hover", label: `About ${label}` })
1402
1431
  ] });
1403
1432
  }
1404
1433
 
@@ -1406,13 +1435,46 @@ function Option({
1406
1435
  import { useCallback as useCallback2, useEffect as useEffect6, useLayoutEffect as useLayoutEffect2, useRef as useRef7, useState as useState6 } from "react";
1407
1436
  import { createPortal as createPortal2 } from "react-dom";
1408
1437
  import { Check as Check5, ChevronDown as ChevronDown5 } from "lucide-react";
1409
- import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
1438
+
1439
+ // src/MenuStatus.tsx
1440
+ import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
1441
+ var ROW_WIDTHS = ["w-3/4", "w-1/2", "w-4/5", "w-3/5"];
1442
+ function MenuLoading() {
1443
+ return /* @__PURE__ */ jsx12("div", { role: "status", "aria-label": "Loading options", className: "p-1", children: ROW_WIDTHS.map((w) => /* @__PURE__ */ jsx12("div", { className: "flex h-9 items-center px-2", children: /* @__PURE__ */ jsx12("span", { className: `inline-block h-3 ${w} animate-pulse rounded-full bg-subtle`, "aria-hidden": "true" }) }, w)) });
1444
+ }
1445
+ function MenuError({ onRetry }) {
1446
+ return /* @__PURE__ */ jsxs11("div", { role: "alert", className: "px-3 py-5 text-center text-dense text-text-secondary", children: [
1447
+ "Couldn't load options.",
1448
+ onRetry && /* @__PURE__ */ jsx12(
1449
+ "button",
1450
+ {
1451
+ type: "button",
1452
+ onClick: onRetry,
1453
+ className: "mt-1.5 block w-full font-medium text-text-link hover:underline focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-border-focus",
1454
+ children: "Try again"
1455
+ }
1456
+ )
1457
+ ] });
1458
+ }
1459
+
1460
+ // src/SelectFilter.tsx
1461
+ import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
1410
1462
  function cx4(...classes) {
1411
1463
  return classes.filter(Boolean).join(" ");
1412
1464
  }
1413
1465
  function slug3(value) {
1414
1466
  return value.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "");
1415
1467
  }
1468
+ function OptionIcon({ children }) {
1469
+ return /* @__PURE__ */ jsx13(
1470
+ "span",
1471
+ {
1472
+ "aria-hidden": "true",
1473
+ className: "flex h-3 w-4 shrink-0 items-center justify-center overflow-hidden text-text-secondary *:max-h-full *:max-w-full",
1474
+ children
1475
+ }
1476
+ );
1477
+ }
1416
1478
  function SelectFilter({
1417
1479
  caption,
1418
1480
  value,
@@ -1421,8 +1483,15 @@ function SelectFilter({
1421
1483
  align = "left",
1422
1484
  fullWidth = false,
1423
1485
  className,
1424
- testIdPrefix
1486
+ testIdPrefix,
1487
+ loading = false,
1488
+ error = false,
1489
+ onRetry,
1490
+ size = "md",
1491
+ disabled = false,
1492
+ renderIcon
1425
1493
  }) {
1494
+ const sm = size === "sm";
1426
1495
  const [open, setOpen] = useState6(false);
1427
1496
  const [pos, setPos] = useState6(null);
1428
1497
  const ref = useRef7(null);
@@ -1431,8 +1500,10 @@ function SelectFilter({
1431
1500
  const reposition = useCallback2(() => {
1432
1501
  if (!ref.current) return;
1433
1502
  const r = ref.current.getBoundingClientRect();
1434
- setPos({ top: r.bottom + 8, left: align === "right" ? r.right - r.width : r.left, width: r.width });
1435
- }, [align]);
1503
+ const h = Math.min(options.length * 36 + 8, 288);
1504
+ const above = r.bottom + 8 + h > window.innerHeight && r.top - 8 - h > 0;
1505
+ setPos({ top: above ? r.top - 8 - h : r.bottom + 8, left: align === "right" ? r.right - r.width : r.left, width: r.width });
1506
+ }, [align, options.length]);
1436
1507
  useLayoutEffect2(() => {
1437
1508
  if (!open) return;
1438
1509
  reposition();
@@ -1456,8 +1527,12 @@ function SelectFilter({
1456
1527
  window.removeEventListener("scroll", reposition, true);
1457
1528
  };
1458
1529
  }, [open, close, reposition]);
1459
- return /* @__PURE__ */ jsxs10("div", { className: cx4("relative", fullWidth && "w-full"), ref, children: [
1460
- /* @__PURE__ */ jsxs10(
1530
+ const triggerValue = renderIcon ? /* @__PURE__ */ jsxs12("span", { className: "flex items-center gap-1.5", children: [
1531
+ /* @__PURE__ */ jsx13(OptionIcon, { children: renderIcon(value) }),
1532
+ value
1533
+ ] }) : value;
1534
+ return /* @__PURE__ */ jsxs12("div", { className: cx4("relative", fullWidth && "w-full"), ref, children: [
1535
+ /* @__PURE__ */ jsxs12(
1461
1536
  "button",
1462
1537
  {
1463
1538
  type: "button",
@@ -1465,17 +1540,17 @@ function SelectFilter({
1465
1540
  onClick: () => setOpen((o) => !o),
1466
1541
  "aria-expanded": open,
1467
1542
  "aria-haspopup": "listbox",
1543
+ "aria-label": sm ? caption : void 0,
1544
+ disabled,
1468
1545
  className: cx4(
1469
- "flex h-11 items-center gap-2 rounded-control border border-border-strong bg-input px-2.5 text-text-secondary transition-colors hover:bg-subtle hover:text-text-primary focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-border-focus",
1546
+ sm ? "flex h-8 items-center gap-1.5 rounded-control border border-border-strong bg-input pl-2.5 pr-2 text-dense font-medium text-text-primary transition-colors hover:bg-subtle focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-border-focus" : chipTriggerClass(),
1547
+ "disabled:pointer-events-none disabled:opacity-40",
1470
1548
  fullWidth && "w-full justify-between",
1471
1549
  className
1472
1550
  ),
1473
1551
  children: [
1474
- /* @__PURE__ */ jsxs10("span", { className: "flex flex-col gap-1 text-left leading-none", children: [
1475
- /* @__PURE__ */ jsx11("span", { className: "text-control-caption uppercase tracking-wide text-text-tertiary", children: caption }),
1476
- /* @__PURE__ */ jsx11("span", { className: "text-[12px] font-medium text-text-primary", children: value })
1477
- ] }),
1478
- /* @__PURE__ */ jsx11(
1552
+ sm ? triggerValue : /* @__PURE__ */ jsx13(ChipContent, { caption, value: triggerValue }),
1553
+ /* @__PURE__ */ jsx13(
1479
1554
  ChevronDown5,
1480
1555
  {
1481
1556
  size: 14,
@@ -1487,7 +1562,7 @@ function SelectFilter({
1487
1562
  }
1488
1563
  ),
1489
1564
  open && pos && createPortal2(
1490
- /* @__PURE__ */ jsx11(
1565
+ /* @__PURE__ */ jsx13(
1491
1566
  "div",
1492
1567
  {
1493
1568
  ref: popoverRef,
@@ -1495,13 +1570,13 @@ function SelectFilter({
1495
1570
  style: { position: "fixed", top: pos.top, left: pos.left, width: fullWidth ? pos.width : void 0 },
1496
1571
  className: cx4(
1497
1572
  "z-[65] flex flex-col overflow-hidden rounded-card border border-border-default bg-surface shadow-overlay",
1498
- !fullWidth && "w-56"
1573
+ !fullWidth && (sm ? "w-28" : "w-56")
1499
1574
  ),
1500
- role: "listbox",
1575
+ role: loading || error ? "group" : "listbox",
1501
1576
  "aria-label": caption,
1502
- children: /* @__PURE__ */ jsx11("div", { className: "max-h-[280px] overflow-y-auto p-1", children: options.map((o) => {
1577
+ children: loading ? /* @__PURE__ */ jsx13(MenuLoading, {}) : error ? /* @__PURE__ */ jsx13(MenuError, { onRetry }) : /* @__PURE__ */ jsx13("div", { className: "max-h-[280px] overflow-y-auto p-1", children: options.map((o) => {
1503
1578
  const selected = o === value;
1504
- return /* @__PURE__ */ jsxs10(
1579
+ return /* @__PURE__ */ jsxs12(
1505
1580
  "button",
1506
1581
  {
1507
1582
  type: "button",
@@ -1514,8 +1589,9 @@ function SelectFilter({
1514
1589
  },
1515
1590
  className: "flex w-full items-center gap-2.5 rounded-control px-2 py-2 text-left transition-colors hover:bg-subtle",
1516
1591
  children: [
1517
- /* @__PURE__ */ jsx11("span", { className: "flex h-4 w-4 shrink-0 items-center justify-center text-brand-primaryAction", children: selected && /* @__PURE__ */ jsx11(Check5, { size: 15, strokeWidth: 3 }) }),
1518
- /* @__PURE__ */ jsx11(
1592
+ /* @__PURE__ */ jsx13("span", { className: "flex h-4 w-4 shrink-0 items-center justify-center text-brand-primaryAction", children: selected && /* @__PURE__ */ jsx13(Check5, { size: 15, strokeWidth: 3 }) }),
1593
+ renderIcon && /* @__PURE__ */ jsx13(OptionIcon, { children: renderIcon(o) }),
1594
+ /* @__PURE__ */ jsx13(
1519
1595
  "span",
1520
1596
  {
1521
1597
  className: cx4("flex-1 text-[14px]", selected ? "font-semibold text-text-primary" : "text-text-primary"),
@@ -1536,9 +1612,9 @@ function SelectFilter({
1536
1612
 
1537
1613
  // src/Card.tsx
1538
1614
  import { forwardRef } from "react";
1539
- import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
1615
+ import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
1540
1616
  var Card = forwardRef(function Card2({ staticCard, title, titleAs: TitleTag = "h3", subtitle, action, className, children, ...rest }, ref) {
1541
- return /* @__PURE__ */ jsx12(
1617
+ return /* @__PURE__ */ jsx14(
1542
1618
  "article",
1543
1619
  {
1544
1620
  ref,
@@ -1549,15 +1625,15 @@ var Card = forwardRef(function Card2({ staticCard, title, titleAs: TitleTag = "h
1549
1625
  className
1550
1626
  ].filter(Boolean).join(" "),
1551
1627
  ...rest,
1552
- children: title ? /* @__PURE__ */ jsxs11("div", { className: "flex flex-1 flex-col p-card-padding", children: [
1553
- /* @__PURE__ */ jsxs11("div", { className: "flex items-start justify-between gap-2", children: [
1554
- /* @__PURE__ */ jsxs11("div", { children: [
1555
- /* @__PURE__ */ jsx12(TitleTag, { className: "text-style-card-title", children: title }),
1556
- subtitle && /* @__PURE__ */ jsx12("p", { className: "mt-0.5 text-xs leading-snug text-text-tertiary", children: subtitle })
1628
+ children: title ? /* @__PURE__ */ jsxs13("div", { className: "flex flex-1 flex-col p-card-padding", children: [
1629
+ /* @__PURE__ */ jsxs13("div", { className: "flex items-start justify-between gap-2", children: [
1630
+ /* @__PURE__ */ jsxs13("div", { children: [
1631
+ /* @__PURE__ */ jsx14(TitleTag, { className: "text-style-card-title", children: title }),
1632
+ subtitle && /* @__PURE__ */ jsx14("p", { className: "mt-0.5 text-xs leading-snug text-text-tertiary", children: subtitle })
1557
1633
  ] }),
1558
- action && /* @__PURE__ */ jsx12("div", { className: "shrink-0 text-text-tertiary", children: action })
1634
+ action && /* @__PURE__ */ jsx14("div", { className: "shrink-0 text-text-tertiary", children: action })
1559
1635
  ] }),
1560
- /* @__PURE__ */ jsx12("div", { className: "mt-4 flex flex-1 flex-col", children })
1636
+ /* @__PURE__ */ jsx14("div", { className: "mt-4 flex flex-1 flex-col", children })
1561
1637
  ] }) : children
1562
1638
  }
1563
1639
  );
@@ -1565,7 +1641,7 @@ var Card = forwardRef(function Card2({ staticCard, title, titleAs: TitleTag = "h
1565
1641
 
1566
1642
  // src/NoResultsEmptyState.tsx
1567
1643
  import { FilterX } from "lucide-react";
1568
- import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
1644
+ import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
1569
1645
  var NO_RESULTS_TITLE = "No results match your filters";
1570
1646
  var NO_RESULTS_BODY = "Your filters may be too narrow, conflict with each other, or have no activity in this period.";
1571
1647
  function noResultsBody(workspaceName) {
@@ -1587,12 +1663,12 @@ function NoResultsEmptyState({
1587
1663
  const showClear = hasFilters !== false && Boolean(onClearFilters);
1588
1664
  const showEdit = Boolean(onEditFilters);
1589
1665
  const hasActions = showClear || showEdit || Boolean(actions && actions.length > 0);
1590
- return /* @__PURE__ */ jsxs12("div", { className: "flex flex-col items-center justify-center gap-3 text-center", "data-testid": testIdPrefix, children: [
1591
- /* @__PURE__ */ jsx13("span", { className: "flex h-11 w-11 items-center justify-center rounded-full bg-subtle text-text-tertiary", children: /* @__PURE__ */ jsx13(FilterX, { size: 20, "aria-hidden": "true" }) }),
1592
- /* @__PURE__ */ jsx13("h2", { className: "text-base font-semibold text-text-primary", children: title }),
1593
- /* @__PURE__ */ jsx13("p", { className: "max-w-[420px] text-[13px] leading-relaxed text-text-secondary", children: bodyText }),
1594
- hasActions && /* @__PURE__ */ jsxs12("div", { className: "mt-1 flex flex-col items-center gap-3", children: [
1595
- showClear && /* @__PURE__ */ jsx13(
1666
+ return /* @__PURE__ */ jsxs14("div", { className: "flex flex-col items-center justify-center gap-3 text-center", "data-testid": testIdPrefix, children: [
1667
+ /* @__PURE__ */ jsx15("span", { className: "flex h-11 w-11 items-center justify-center rounded-full bg-subtle text-text-tertiary", children: /* @__PURE__ */ jsx15(FilterX, { size: 20, "aria-hidden": "true" }) }),
1668
+ /* @__PURE__ */ jsx15("h2", { className: "text-base font-semibold text-text-primary", children: title }),
1669
+ /* @__PURE__ */ jsx15("p", { className: "max-w-[420px] text-[13px] leading-relaxed text-text-secondary", children: bodyText }),
1670
+ hasActions && /* @__PURE__ */ jsxs14("div", { className: "mt-1 flex flex-col items-center gap-3", children: [
1671
+ showClear && /* @__PURE__ */ jsx15(
1596
1672
  "button",
1597
1673
  {
1598
1674
  type: "button",
@@ -1602,7 +1678,7 @@ function NoResultsEmptyState({
1602
1678
  children: "Clear all filters"
1603
1679
  }
1604
1680
  ),
1605
- showEdit && /* @__PURE__ */ jsx13(
1681
+ showEdit && /* @__PURE__ */ jsx15(
1606
1682
  "button",
1607
1683
  {
1608
1684
  type: "button",
@@ -1612,7 +1688,7 @@ function NoResultsEmptyState({
1612
1688
  children: "Edit filters"
1613
1689
  }
1614
1690
  ),
1615
- actions?.map((action, i) => /* @__PURE__ */ jsx13(
1691
+ actions?.map((action, i) => /* @__PURE__ */ jsx15(
1616
1692
  "button",
1617
1693
  {
1618
1694
  type: "button",
@@ -1629,12 +1705,12 @@ function NoResultsEmptyState({
1629
1705
  // src/WorkspaceSelectedCard.tsx
1630
1706
  import { useEffect as useEffect7, useRef as useRef8, useState as useState7 } from "react";
1631
1707
  import { ChevronDown as ChevronDown6, X as X3 } from "lucide-react";
1632
- import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
1708
+ import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
1633
1709
  function cx5(...parts) {
1634
1710
  return parts.filter(Boolean).join(" ");
1635
1711
  }
1636
1712
  function WorkspaceSelectedCard({ groups, testIdPrefix }) {
1637
- return /* @__PURE__ */ jsx14("aside", { className: "sticky top-4 flex min-w-0 flex-col gap-4 self-start rounded-card border border-border-default bg-surface px-5 pb-5 pt-4 shadow-raised sm:px-6 sm:pb-6", children: /* @__PURE__ */ jsx14("div", { className: "flex flex-col divide-y divide-border-default", children: groups.map((g) => /* @__PURE__ */ jsx14(SummaryGroupItem, { group: g, testIdPrefix }, g.id)) }) });
1713
+ return /* @__PURE__ */ jsx16("aside", { className: "sticky top-4 flex min-w-0 flex-col gap-4 self-start rounded-card border border-border-default bg-surface px-5 pb-5 pt-4 shadow-raised sm:px-6 sm:pb-6", children: /* @__PURE__ */ jsx16("div", { className: "flex flex-col divide-y divide-border-default", children: groups.map((g) => /* @__PURE__ */ jsx16(SummaryGroupItem, { group: g, testIdPrefix }, g.id)) }) });
1638
1714
  }
1639
1715
  function SummaryGroupItem({
1640
1716
  group,
@@ -1651,8 +1727,8 @@ function SummaryGroupItem({
1651
1727
  else if (expandCount === 0) setOpen(false);
1652
1728
  wasEmpty.current = expandCount === 0;
1653
1729
  }, [expandCount]);
1654
- return /* @__PURE__ */ jsxs13("div", { className: nested ? "" : "py-3 first:pt-0 last:pb-0", children: [
1655
- /* @__PURE__ */ jsxs13(
1730
+ return /* @__PURE__ */ jsxs15("div", { className: nested ? "" : "py-3 first:pt-0 last:pb-0", children: [
1731
+ /* @__PURE__ */ jsxs15(
1656
1732
  "button",
1657
1733
  {
1658
1734
  type: "button",
@@ -1661,7 +1737,7 @@ function SummaryGroupItem({
1661
1737
  "data-testid": testIdPrefix && `${testIdPrefix}-group-${group.id}`,
1662
1738
  className: "flex w-full min-w-0 items-center gap-2 text-left",
1663
1739
  children: [
1664
- /* @__PURE__ */ jsx14(
1740
+ /* @__PURE__ */ jsx16(
1665
1741
  ChevronDown6,
1666
1742
  {
1667
1743
  size: 14,
@@ -1669,37 +1745,37 @@ function SummaryGroupItem({
1669
1745
  className: cx5("shrink-0 text-text-secondary transition-transform", !open && "-rotate-90")
1670
1746
  }
1671
1747
  ),
1672
- /* @__PURE__ */ jsx14("span", { className: cx5("truncate font-semibold text-text-primary", nested ? "text-[12px]" : "text-[13px]"), children: group.label }),
1673
- /* @__PURE__ */ jsx14("span", { className: "shrink-0 rounded-full bg-subtle px-1.5 py-0.5 text-[11px] font-semibold text-text-secondary", children: ownCount })
1748
+ /* @__PURE__ */ jsx16("span", { className: cx5("truncate font-semibold text-text-primary", nested ? "text-[12px]" : "text-[13px]"), children: group.label }),
1749
+ /* @__PURE__ */ jsx16("span", { className: "shrink-0 rounded-full bg-subtle px-1.5 py-0.5 text-[11px] font-semibold text-text-secondary", children: ownCount })
1674
1750
  ]
1675
1751
  }
1676
1752
  ),
1677
- open && /* @__PURE__ */ jsx14("div", { className: "pt-2.5", children: ownCount === 0 && subCount === 0 ? /* @__PURE__ */ jsx14("p", { className: "text-[12px] text-text-secondary", children: "Nothing selected." }) : /* @__PURE__ */ jsxs13("div", { className: "flex flex-col gap-2.5", children: [
1678
- ownCount > 0 && /* @__PURE__ */ jsxs13("div", { className: "flex flex-col gap-1.5", children: [
1679
- group.items.map((item) => /* @__PURE__ */ jsxs13(
1753
+ open && /* @__PURE__ */ jsx16("div", { className: "pt-2.5", children: ownCount === 0 && subCount === 0 ? /* @__PURE__ */ jsx16("p", { className: "text-[12px] text-text-secondary", children: "Nothing selected." }) : /* @__PURE__ */ jsxs15("div", { className: "flex flex-col gap-2.5", children: [
1754
+ ownCount > 0 && /* @__PURE__ */ jsxs15("div", { className: "flex flex-col gap-1.5", children: [
1755
+ group.items.map((item) => /* @__PURE__ */ jsxs15(
1680
1756
  "div",
1681
1757
  {
1682
1758
  className: "flex items-center justify-between gap-2 rounded-control border border-border-default bg-canvas px-2 py-1",
1683
1759
  children: [
1684
- /* @__PURE__ */ jsxs13("span", { className: "min-w-0 flex-1", children: [
1685
- /* @__PURE__ */ jsx14("span", { className: "block truncate text-[12px] text-text-primary", children: item.name }),
1686
- item.meta && /* @__PURE__ */ jsx14("span", { className: "block truncate text-[11px] text-text-secondary", children: item.meta })
1760
+ /* @__PURE__ */ jsxs15("span", { className: "min-w-0 flex-1", children: [
1761
+ /* @__PURE__ */ jsx16("span", { className: "block truncate text-[12px] text-text-primary", children: item.name }),
1762
+ item.meta && /* @__PURE__ */ jsx16("span", { className: "block truncate text-[11px] text-text-secondary", children: item.meta })
1687
1763
  ] }),
1688
- /* @__PURE__ */ jsx14(
1764
+ /* @__PURE__ */ jsx16(
1689
1765
  "button",
1690
1766
  {
1691
1767
  type: "button",
1692
1768
  "aria-label": `Remove ${item.name}`,
1693
1769
  onClick: () => group.onRemove(item.id),
1694
1770
  className: "flex h-5 w-5 shrink-0 items-center justify-center rounded-control text-text-secondary hover:bg-subtle hover:text-text-danger",
1695
- children: /* @__PURE__ */ jsx14(X3, { size: 12, "aria-hidden": "true" })
1771
+ children: /* @__PURE__ */ jsx16(X3, { size: 12, "aria-hidden": "true" })
1696
1772
  }
1697
1773
  )
1698
1774
  ]
1699
1775
  },
1700
1776
  item.id
1701
1777
  )),
1702
- /* @__PURE__ */ jsx14(
1778
+ /* @__PURE__ */ jsx16(
1703
1779
  "button",
1704
1780
  {
1705
1781
  type: "button",
@@ -1710,13 +1786,13 @@ function SummaryGroupItem({
1710
1786
  }
1711
1787
  )
1712
1788
  ] }),
1713
- group.subGroups?.map((sg) => /* @__PURE__ */ jsx14(SummaryGroupItem, { group: sg, nested: true, testIdPrefix }, sg.id))
1789
+ group.subGroups?.map((sg) => /* @__PURE__ */ jsx16(SummaryGroupItem, { group: sg, nested: true, testIdPrefix }, sg.id))
1714
1790
  ] }) })
1715
1791
  ] });
1716
1792
  }
1717
1793
 
1718
1794
  // src/chart-placeholder-shared.tsx
1719
- import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
1795
+ import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
1720
1796
  var GRID_ROWS = [0, 25, 50, 75, 100];
1721
1797
  var Y_TICK_WIDTHS = [26, 30, 30, 26, 20];
1722
1798
  var Y_AXIS_W = 48;
@@ -1728,9 +1804,9 @@ function AxisFrame({
1728
1804
  children
1729
1805
  }) {
1730
1806
  const gutter = xTicks > 0 ? X_AXIS_H : 0;
1731
- return /* @__PURE__ */ jsx15("div", { className: "w-full", style: { height }, role: "presentation", "aria-hidden": "true", children: /* @__PURE__ */ jsxs14("div", { className: "relative h-full w-full", children: [
1732
- /* @__PURE__ */ jsxs14("div", { className: "absolute inset-y-0 right-0", style: { left: Y_AXIS_W, bottom: gutter }, children: [
1733
- GRID_ROWS.map((pct) => /* @__PURE__ */ jsx15(
1807
+ return /* @__PURE__ */ jsx17("div", { className: "w-full", style: { height }, role: "presentation", "aria-hidden": "true", children: /* @__PURE__ */ jsxs16("div", { className: "relative h-full w-full", children: [
1808
+ /* @__PURE__ */ jsxs16("div", { className: "absolute inset-y-0 right-0", style: { left: Y_AXIS_W, bottom: gutter }, children: [
1809
+ GRID_ROWS.map((pct) => /* @__PURE__ */ jsx17(
1734
1810
  "div",
1735
1811
  {
1736
1812
  className: "absolute inset-x-0 border-t border-dashed",
@@ -1738,9 +1814,9 @@ function AxisFrame({
1738
1814
  },
1739
1815
  pct
1740
1816
  )),
1741
- /* @__PURE__ */ jsx15("div", { className: "absolute inset-0", children })
1817
+ /* @__PURE__ */ jsx17("div", { className: "absolute inset-0", children })
1742
1818
  ] }),
1743
- /* @__PURE__ */ jsx15("div", { className: "absolute left-0 top-0", style: { width: Y_AXIS_W, bottom: gutter }, children: GRID_ROWS.map((pct, i) => /* @__PURE__ */ jsx15(
1819
+ /* @__PURE__ */ jsx17("div", { className: "absolute left-0 top-0", style: { width: Y_AXIS_W, bottom: gutter }, children: GRID_ROWS.map((pct, i) => /* @__PURE__ */ jsx17(
1744
1820
  "div",
1745
1821
  {
1746
1822
  className: "absolute right-2 h-2 -translate-y-1/2 rounded-xs bg-subtle",
@@ -1748,27 +1824,27 @@ function AxisFrame({
1748
1824
  },
1749
1825
  pct
1750
1826
  )) }),
1751
- xTicks > 0 && /* @__PURE__ */ jsx15(
1827
+ xTicks > 0 && /* @__PURE__ */ jsx17(
1752
1828
  "div",
1753
1829
  {
1754
1830
  className: "absolute bottom-0 right-0 flex items-center",
1755
1831
  style: { left: Y_AXIS_W, height: X_AXIS_H },
1756
- children: Array.from({ length: xTicks }, (_, i) => /* @__PURE__ */ jsx15("div", { className: "flex flex-1 justify-center", children: /* @__PURE__ */ jsx15("div", { className: "h-2 w-full max-w-[26px] rounded-xs bg-subtle" }) }, i))
1832
+ children: Array.from({ length: xTicks }, (_, i) => /* @__PURE__ */ jsx17("div", { className: "flex flex-1 justify-center", children: /* @__PURE__ */ jsx17("div", { className: "h-2 w-full max-w-[26px] rounded-xs bg-subtle" }) }, i))
1757
1833
  }
1758
1834
  )
1759
1835
  ] }) });
1760
1836
  }
1761
1837
  function BlankLegend({ rows, reverse = false }) {
1762
- return /* @__PURE__ */ jsx15(
1838
+ return /* @__PURE__ */ jsx17(
1763
1839
  "ul",
1764
1840
  {
1765
1841
  className: `flex flex-1 justify-center gap-1.5 ${reverse ? "flex-col-reverse" : "flex-col"}`,
1766
1842
  role: "presentation",
1767
1843
  "aria-hidden": "true",
1768
- children: Array.from({ length: rows }, (_, i) => /* @__PURE__ */ jsxs14("li", { className: "flex items-center justify-between gap-2", children: [
1769
- /* @__PURE__ */ jsxs14("span", { className: "flex items-center gap-1.5", children: [
1770
- /* @__PURE__ */ jsx15("span", { className: "h-2.5 w-2.5 rounded-xs bg-subtle" }),
1771
- /* @__PURE__ */ jsx15(
1844
+ children: Array.from({ length: rows }, (_, i) => /* @__PURE__ */ jsxs16("li", { className: "flex items-center justify-between gap-2", children: [
1845
+ /* @__PURE__ */ jsxs16("span", { className: "flex items-center gap-1.5", children: [
1846
+ /* @__PURE__ */ jsx17("span", { className: "h-2.5 w-2.5 rounded-xs bg-subtle" }),
1847
+ /* @__PURE__ */ jsx17(
1772
1848
  "span",
1773
1849
  {
1774
1850
  className: "h-2 rounded-xs bg-subtle",
@@ -1776,21 +1852,21 @@ function BlankLegend({ rows, reverse = false }) {
1776
1852
  }
1777
1853
  )
1778
1854
  ] }),
1779
- /* @__PURE__ */ jsx15("span", { className: "h-2 w-6 rounded-xs bg-subtle" })
1855
+ /* @__PURE__ */ jsx17("span", { className: "h-2 w-6 rounded-xs bg-subtle" })
1780
1856
  ] }, i))
1781
1857
  }
1782
1858
  );
1783
1859
  }
1784
1860
 
1785
1861
  // src/BarChartPlaceholder.tsx
1786
- import { jsx as jsx16 } from "react/jsx-runtime";
1862
+ import { jsx as jsx18 } from "react/jsx-runtime";
1787
1863
  var BAR_PROFILE = [92, 86, 76, 65, 57, 40, 30, 24, 18, 13];
1788
1864
  function BarChartPlaceholder({ height = 220 }) {
1789
- return /* @__PURE__ */ jsx16(AxisFrame, { height, xTicks: BAR_PROFILE.length, children: /* @__PURE__ */ jsx16("div", { className: "flex h-full w-full items-end gap-2", children: BAR_PROFILE.map((pct, i) => /* @__PURE__ */ jsx16("div", { className: "flex-1 rounded-t-[3px] bg-subtle", style: { height: `${pct}%` } }, i)) }) });
1865
+ return /* @__PURE__ */ jsx18(AxisFrame, { height, xTicks: BAR_PROFILE.length, children: /* @__PURE__ */ jsx18("div", { className: "flex h-full w-full items-end gap-2", children: BAR_PROFILE.map((pct, i) => /* @__PURE__ */ jsx18("div", { className: "flex-1 rounded-t-[3px] bg-subtle", style: { height: `${pct}%` } }, i)) }) });
1790
1866
  }
1791
1867
 
1792
1868
  // src/LineChartPlaceholder.tsx
1793
- import { jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
1869
+ import { jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
1794
1870
  var LINE_SERIES = [
1795
1871
  [58, 52, 55, 41, 45, 33, 36, 25, 28, 17],
1796
1872
  [74, 71, 66, 68, 59, 61, 54, 56, 48, 45],
@@ -1800,9 +1876,9 @@ var LINE_SERIES = [
1800
1876
  var LINE_FORECAST_FROM = 7;
1801
1877
  function LineChartPlaceholder({ height = 280 }) {
1802
1878
  const toPath = (pts, from, to) => pts.slice(from, to).map((y, i) => `${(i + from) / (pts.length - 1) * 100},${y}`).join(" ");
1803
- return /* @__PURE__ */ jsxs15(AxisFrame, { height, xTicks: LINE_SERIES[0].length, children: [
1804
- /* @__PURE__ */ jsx17("svg", { viewBox: "0 0 100 100", preserveAspectRatio: "none", className: "absolute inset-0 h-full w-full", children: LINE_SERIES.map((pts, s) => /* @__PURE__ */ jsxs15("g", { children: [
1805
- /* @__PURE__ */ jsx17(
1879
+ return /* @__PURE__ */ jsxs17(AxisFrame, { height, xTicks: LINE_SERIES[0].length, children: [
1880
+ /* @__PURE__ */ jsx19("svg", { viewBox: "0 0 100 100", preserveAspectRatio: "none", className: "absolute inset-0 h-full w-full", children: LINE_SERIES.map((pts, s) => /* @__PURE__ */ jsxs17("g", { children: [
1881
+ /* @__PURE__ */ jsx19(
1806
1882
  "polyline",
1807
1883
  {
1808
1884
  points: toPath(pts, 0, LINE_FORECAST_FROM + 1),
@@ -1814,7 +1890,7 @@ function LineChartPlaceholder({ height = 280 }) {
1814
1890
  strokeLinejoin: "round"
1815
1891
  }
1816
1892
  ),
1817
- /* @__PURE__ */ jsx17(
1893
+ /* @__PURE__ */ jsx19(
1818
1894
  "polyline",
1819
1895
  {
1820
1896
  points: toPath(pts, LINE_FORECAST_FROM, pts.length),
@@ -1829,7 +1905,7 @@ function LineChartPlaceholder({ height = 280 }) {
1829
1905
  )
1830
1906
  ] }, s)) }),
1831
1907
  LINE_SERIES.map(
1832
- (pts, s) => pts.map((y, i) => /* @__PURE__ */ jsx17(
1908
+ (pts, s) => pts.map((y, i) => /* @__PURE__ */ jsx19(
1833
1909
  "div",
1834
1910
  {
1835
1911
  className: "absolute h-1.5 w-1.5 -translate-x-1/2 -translate-y-1/2 rounded-full",
@@ -1846,16 +1922,16 @@ function LineChartPlaceholder({ height = 280 }) {
1846
1922
  }
1847
1923
 
1848
1924
  // src/PieChartPlaceholder.tsx
1849
- import { jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
1925
+ import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
1850
1926
  var PIE_SEAMS = [0, 115, 180, 230, 262, 288, 310, 332];
1851
1927
  function PieChartPlaceholder({ height = 220, legendRows = 8 }) {
1852
1928
  const r = 45;
1853
- return /* @__PURE__ */ jsxs16("div", { className: "flex w-full items-center gap-3", style: { height }, role: "presentation", "aria-hidden": "true", children: [
1854
- /* @__PURE__ */ jsx18("div", { className: "flex h-full items-center justify-center", style: { width: "60%" }, children: /* @__PURE__ */ jsxs16("svg", { viewBox: "0 0 100 100", className: "h-full", style: { aspectRatio: "1 / 1" }, children: [
1855
- /* @__PURE__ */ jsx18("circle", { cx: "50", cy: "50", r, fill: "var(--mr-color-subtle)" }),
1929
+ return /* @__PURE__ */ jsxs18("div", { className: "flex w-full items-center gap-3", style: { height }, role: "presentation", "aria-hidden": "true", children: [
1930
+ /* @__PURE__ */ jsx20("div", { className: "flex h-full items-center justify-center", style: { width: "60%" }, children: /* @__PURE__ */ jsxs18("svg", { viewBox: "0 0 100 100", className: "h-full", style: { aspectRatio: "1 / 1" }, children: [
1931
+ /* @__PURE__ */ jsx20("circle", { cx: "50", cy: "50", r, fill: "var(--mr-color-subtle)" }),
1856
1932
  PIE_SEAMS.map((deg) => {
1857
1933
  const rad = (deg - 90) * Math.PI / 180;
1858
- return /* @__PURE__ */ jsx18(
1934
+ return /* @__PURE__ */ jsx20(
1859
1935
  "line",
1860
1936
  {
1861
1937
  x1: "50",
@@ -1869,12 +1945,12 @@ function PieChartPlaceholder({ height = 220, legendRows = 8 }) {
1869
1945
  );
1870
1946
  })
1871
1947
  ] }) }),
1872
- /* @__PURE__ */ jsx18(BlankLegend, { rows: legendRows })
1948
+ /* @__PURE__ */ jsx20(BlankLegend, { rows: legendRows })
1873
1949
  ] });
1874
1950
  }
1875
1951
 
1876
1952
  // src/StackedColumnPlaceholder.tsx
1877
- import { jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
1953
+ import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
1878
1954
  var COLUMN_WEIGHTS = [20, 30, 15, 35, 24, 12, 28, 18];
1879
1955
  function columnBands(count) {
1880
1956
  const weights = Array.from({ length: count }, (_, i) => COLUMN_WEIGHTS[i % COLUMN_WEIGHTS.length]);
@@ -1887,7 +1963,7 @@ function StackedColumnPlaceholder({
1887
1963
  legendRows = 4,
1888
1964
  axis = false
1889
1965
  }) {
1890
- const column = /* @__PURE__ */ jsx19("div", { className: "flex h-full flex-col overflow-hidden rounded-control bg-subtle", style: { width }, children: columnBands(legendRows).map((pct, i) => /* @__PURE__ */ jsx19(
1966
+ const column = /* @__PURE__ */ jsx21("div", { className: "flex h-full flex-col overflow-hidden rounded-control bg-subtle", style: { width }, children: columnBands(legendRows).map((pct, i) => /* @__PURE__ */ jsx21(
1891
1967
  "div",
1892
1968
  {
1893
1969
  style: {
@@ -1899,16 +1975,16 @@ function StackedColumnPlaceholder({
1899
1975
  },
1900
1976
  i
1901
1977
  )) });
1902
- return /* @__PURE__ */ jsxs17("div", { className: "flex w-full gap-4", style: { height }, role: "presentation", "aria-hidden": "true", children: [
1903
- axis ? /* @__PURE__ */ jsx19("div", { style: { width: "55%" }, children: /* @__PURE__ */ jsx19(AxisFrame, { height, xTicks: 0, children: /* @__PURE__ */ jsx19("div", { className: "flex h-full items-stretch justify-center", children: column }) }) }) : /* @__PURE__ */ jsx19("div", { className: "flex items-stretch py-1", children: column }),
1904
- /* @__PURE__ */ jsx19(BlankLegend, { rows: legendRows, reverse: !axis })
1978
+ return /* @__PURE__ */ jsxs19("div", { className: "flex w-full gap-4", style: { height }, role: "presentation", "aria-hidden": "true", children: [
1979
+ axis ? /* @__PURE__ */ jsx21("div", { style: { width: "55%" }, children: /* @__PURE__ */ jsx21(AxisFrame, { height, xTicks: 0, children: /* @__PURE__ */ jsx21("div", { className: "flex h-full items-stretch justify-center", children: column }) }) }) : /* @__PURE__ */ jsx21("div", { className: "flex items-stretch py-1", children: column }),
1980
+ /* @__PURE__ */ jsx21(BlankLegend, { rows: legendRows, reverse: !axis })
1905
1981
  ] });
1906
1982
  }
1907
1983
 
1908
1984
  // src/Tooltip.tsx
1909
1985
  import { useEffect as useEffect8, useId as useId3, useLayoutEffect as useLayoutEffect3, useRef as useRef9, useState as useState8 } from "react";
1910
1986
  import { createPortal as createPortal3 } from "react-dom";
1911
- import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
1987
+ import { jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
1912
1988
  function cx6(...parts) {
1913
1989
  return parts.filter(Boolean).join(" ");
1914
1990
  }
@@ -2097,7 +2173,7 @@ function Tooltip({
2097
2173
  }
2098
2174
  }
2099
2175
  const floating = anchor != null && typeof document !== "undefined" ? createPortal3(
2100
- /* @__PURE__ */ jsx20(
2176
+ /* @__PURE__ */ jsx22(
2101
2177
  "span",
2102
2178
  {
2103
2179
  ref: boxRef,
@@ -2128,7 +2204,7 @@ function Tooltip({
2128
2204
  document.body
2129
2205
  ) : null;
2130
2206
  if (anchorRef) return floating;
2131
- return /* @__PURE__ */ jsxs18(
2207
+ return /* @__PURE__ */ jsxs20(
2132
2208
  "span",
2133
2209
  {
2134
2210
  ref,
@@ -2149,26 +2225,26 @@ function Tooltip({
2149
2225
  }
2150
2226
 
2151
2227
  // src/AdvertiserNoResults.tsx
2152
- import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
2228
+ import { jsx as jsx23, jsxs as jsxs21 } from "react/jsx-runtime";
2153
2229
  function AdvertiserNoResults({
2154
2230
  query,
2155
2231
  hint = "Try checking your spelling or searching for a broader brand name."
2156
2232
  }) {
2157
- return /* @__PURE__ */ jsxs19("div", { className: "flex flex-col items-center gap-1.5 px-4 py-8 text-center", children: [
2158
- /* @__PURE__ */ jsxs19("p", { className: "text-[13px] font-medium text-text-primary", children: [
2233
+ return /* @__PURE__ */ jsxs21("div", { className: "flex flex-col items-center gap-1.5 px-4 py-8 text-center", children: [
2234
+ /* @__PURE__ */ jsxs21("p", { className: "text-[13px] font-medium text-text-primary", children: [
2159
2235
  "No results found for \u201C",
2160
2236
  query,
2161
2237
  "\u201D"
2162
2238
  ] }),
2163
- /* @__PURE__ */ jsx21("p", { className: "text-[12px] leading-snug text-text-tertiary", children: hint })
2239
+ /* @__PURE__ */ jsx23("p", { className: "text-[12px] leading-snug text-text-tertiary", children: hint })
2164
2240
  ] });
2165
2241
  }
2166
2242
 
2167
2243
  // src/SelectAllVisible.tsx
2168
2244
  import { ListChecks as ListChecks2 } from "lucide-react";
2169
- import { jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
2245
+ import { jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
2170
2246
  function SelectAllVisible({ count, allSelected, onToggle, testIdPrefix }) {
2171
- return /* @__PURE__ */ jsxs20(
2247
+ return /* @__PURE__ */ jsxs22(
2172
2248
  "button",
2173
2249
  {
2174
2250
  type: "button",
@@ -2176,7 +2252,7 @@ function SelectAllVisible({ count, allSelected, onToggle, testIdPrefix }) {
2176
2252
  onClick: onToggle,
2177
2253
  className: "flex w-full items-center gap-2 rounded-control px-2 py-1.5 text-left text-[12px] font-semibold text-text-link transition-colors hover:bg-subtle",
2178
2254
  children: [
2179
- /* @__PURE__ */ jsx22(ListChecks2, { size: 14, "aria-hidden": "true" }),
2255
+ /* @__PURE__ */ jsx24(ListChecks2, { size: 14, "aria-hidden": "true" }),
2180
2256
  allSelected ? `Deselect ${count} visible` : `Select all ${count} visible`
2181
2257
  ]
2182
2258
  }
@@ -2185,14 +2261,14 @@ function SelectAllVisible({ count, allSelected, onToggle, testIdPrefix }) {
2185
2261
 
2186
2262
  // src/SelectedSection.tsx
2187
2263
  import { ChevronDown as ChevronDown7 } from "lucide-react";
2188
- import { jsx as jsx23, jsxs as jsxs21 } from "react/jsx-runtime";
2264
+ import { jsx as jsx25, jsxs as jsxs23 } from "react/jsx-runtime";
2189
2265
  function cx7(...parts) {
2190
2266
  return parts.filter(Boolean).join(" ");
2191
2267
  }
2192
2268
  function SelectedSection({ count, open, onToggle, children, testIdPrefix }) {
2193
2269
  if (count === 0) return null;
2194
- return /* @__PURE__ */ jsxs21("div", { className: "flex flex-col", children: [
2195
- /* @__PURE__ */ jsxs21(
2270
+ return /* @__PURE__ */ jsxs23("div", { className: "flex flex-col", children: [
2271
+ /* @__PURE__ */ jsxs23(
2196
2272
  "button",
2197
2273
  {
2198
2274
  type: "button",
@@ -2201,14 +2277,14 @@ function SelectedSection({ count, open, onToggle, children, testIdPrefix }) {
2201
2277
  "aria-expanded": open,
2202
2278
  className: "flex w-full items-center gap-1.5 rounded-control px-2 py-1 text-left text-[11px] font-semibold uppercase tracking-wide text-text-tertiary transition-colors hover:text-text-primary",
2203
2279
  children: [
2204
- /* @__PURE__ */ jsx23(ChevronDown7, { size: 13, "aria-hidden": "true", className: cx7("transition-transform", !open && "-rotate-90") }),
2280
+ /* @__PURE__ */ jsx25(ChevronDown7, { size: 13, "aria-hidden": "true", className: cx7("transition-transform", !open && "-rotate-90") }),
2205
2281
  "Selected (",
2206
2282
  count,
2207
2283
  ")"
2208
2284
  ]
2209
2285
  }
2210
2286
  ),
2211
- open && /* @__PURE__ */ jsx23("div", { className: "flex flex-col gap-0.5", children })
2287
+ open && /* @__PURE__ */ jsx25("div", { className: "flex flex-col gap-0.5", children })
2212
2288
  ] });
2213
2289
  }
2214
2290
 
@@ -2216,7 +2292,7 @@ function SelectedSection({ count, open, onToggle, children, testIdPrefix }) {
2216
2292
  import { useCallback as useCallback3, useEffect as useEffect9, useLayoutEffect as useLayoutEffect4, useMemo as useMemo3, useRef as useRef10, useState as useState9 } from "react";
2217
2293
  import { createPortal as createPortal4 } from "react-dom";
2218
2294
  import { Search as Search4, Plus, Info as Info2, ChevronRight as ChevronRight3, ChevronDown as ChevronDown8, Check as Check6, List, Loader2 } from "lucide-react";
2219
- import { Fragment as Fragment4, jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
2295
+ import { Fragment as Fragment4, jsx as jsx26, jsxs as jsxs24 } from "react/jsx-runtime";
2220
2296
  function cx8(...parts) {
2221
2297
  return parts.filter(Boolean).join(" ");
2222
2298
  }
@@ -2311,17 +2387,17 @@ function SelectionPicker({
2311
2387
  }
2312
2388
  };
2313
2389
  const rowGridCols = showInfoColumn ? "grid-cols-[36px_1fr_44px]" : "grid-cols-[36px_1fr]";
2314
- return /* @__PURE__ */ jsxs22("div", { className: "flex flex-col gap-4", children: [
2315
- helper && /* @__PURE__ */ jsxs22(Fragment4, { children: [
2316
- /* @__PURE__ */ jsx24("p", { className: "text-[13px] text-text-secondary", children: helper }),
2317
- /* @__PURE__ */ jsx24("hr", { className: "-mx-5 -mt-2 border-border-default sm:-mx-6" })
2390
+ return /* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-4", children: [
2391
+ helper && /* @__PURE__ */ jsxs24(Fragment4, { children: [
2392
+ /* @__PURE__ */ jsx26("p", { className: "text-[13px] text-text-secondary", children: helper }),
2393
+ /* @__PURE__ */ jsx26("hr", { className: "-mx-5 -mt-2 border-border-default sm:-mx-6" })
2318
2394
  ] }),
2319
- hasAccountLists && /* @__PURE__ */ jsx24("div", { className: "inline-flex gap-0.5 self-start rounded-control border border-border-default bg-canvas p-0.5", children: [
2395
+ hasAccountLists && /* @__PURE__ */ jsx26("div", { className: "inline-flex gap-0.5 self-start rounded-control border border-border-default bg-canvas p-0.5", children: [
2320
2396
  { id: "search", label: "Search", icon: Search4 },
2321
2397
  { id: "lists", label: "Account lists", icon: List }
2322
2398
  ].map((t) => {
2323
2399
  const on = source === t.id;
2324
- return /* @__PURE__ */ jsxs22(
2400
+ return /* @__PURE__ */ jsxs24(
2325
2401
  "button",
2326
2402
  {
2327
2403
  type: "button",
@@ -2332,18 +2408,18 @@ function SelectionPicker({
2332
2408
  on ? "bg-surface text-text-primary shadow-raised" : "text-text-secondary hover:text-text-primary"
2333
2409
  ),
2334
2410
  children: [
2335
- /* @__PURE__ */ jsx24(t.icon, { size: 14, "aria-hidden": "true" }),
2411
+ /* @__PURE__ */ jsx26(t.icon, { size: 14, "aria-hidden": "true" }),
2336
2412
  t.label
2337
2413
  ]
2338
2414
  },
2339
2415
  t.id
2340
2416
  );
2341
2417
  }) }),
2342
- source === "search" && /* @__PURE__ */ jsxs22("div", { className: "flex min-w-0 flex-col gap-3", children: [
2343
- /* @__PURE__ */ jsxs22("div", { className: "flex flex-wrap items-center gap-2", children: [
2344
- /* @__PURE__ */ jsxs22("div", { className: "flex h-8 min-w-[200px] 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: [
2345
- /* @__PURE__ */ jsx24(Search4, { size: 15, className: "text-text-secondary", "aria-hidden": "true" }),
2346
- /* @__PURE__ */ jsx24(
2418
+ source === "search" && /* @__PURE__ */ jsxs24("div", { className: "flex min-w-0 flex-col gap-3", children: [
2419
+ /* @__PURE__ */ jsxs24("div", { className: "flex flex-wrap items-center gap-2", children: [
2420
+ /* @__PURE__ */ jsxs24("div", { className: "flex h-8 min-w-[200px] 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: [
2421
+ /* @__PURE__ */ jsx26(Search4, { size: 15, className: "text-text-secondary", "aria-hidden": "true" }),
2422
+ /* @__PURE__ */ jsx26(
2347
2423
  "input",
2348
2424
  {
2349
2425
  value: query,
@@ -2359,7 +2435,7 @@ function SelectionPicker({
2359
2435
  }
2360
2436
  )
2361
2437
  ] }),
2362
- filters.map((f) => /* @__PURE__ */ jsx24(
2438
+ filters.map((f) => /* @__PURE__ */ jsx26(
2363
2439
  FilterDropdown,
2364
2440
  {
2365
2441
  filter: f,
@@ -2371,14 +2447,14 @@ function SelectionPicker({
2371
2447
  )),
2372
2448
  toolbarExtra
2373
2449
  ] }),
2374
- !hasSearched ? /* @__PURE__ */ jsxs22("div", { className: "flex flex-col items-center gap-3 rounded-card border border-dashed border-border-default py-10 text-center", children: [
2375
- /* @__PURE__ */ jsx24("div", { className: "flex h-12 w-12 items-center justify-center rounded-full bg-subtle", children: /* @__PURE__ */ jsx24(Search4, { size: 20, className: "text-text-tertiary", "aria-hidden": "true" }) }),
2376
- /* @__PURE__ */ jsxs22("div", { className: "flex flex-col gap-1", children: [
2377
- /* @__PURE__ */ jsx24("p", { className: "text-[14px] font-semibold text-text-primary", children: "Search to get started" }),
2378
- /* @__PURE__ */ jsx24("p", { className: "text-[13px] text-text-tertiary", children: "Use the search or filters above to find and add options." })
2450
+ !hasSearched ? /* @__PURE__ */ jsxs24("div", { className: "flex flex-col items-center gap-3 rounded-card border border-dashed border-border-default py-10 text-center", children: [
2451
+ /* @__PURE__ */ jsx26("div", { className: "flex h-12 w-12 items-center justify-center rounded-full bg-subtle", children: /* @__PURE__ */ jsx26(Search4, { size: 20, className: "text-text-tertiary", "aria-hidden": "true" }) }),
2452
+ /* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-1", children: [
2453
+ /* @__PURE__ */ jsx26("p", { className: "text-[14px] font-semibold text-text-primary", children: "Search to get started" }),
2454
+ /* @__PURE__ */ jsx26("p", { className: "text-[13px] text-text-tertiary", children: "Use the search or filters above to find and add options." })
2379
2455
  ] })
2380
- ] }) : /* @__PURE__ */ jsxs22("div", { className: "overflow-hidden rounded-control border border-border-default", children: [
2381
- /* @__PURE__ */ jsxs22(
2456
+ ] }) : /* @__PURE__ */ jsxs24("div", { className: "overflow-hidden rounded-control border border-border-default", children: [
2457
+ /* @__PURE__ */ jsxs24(
2382
2458
  "div",
2383
2459
  {
2384
2460
  className: cx8(
@@ -2386,7 +2462,7 @@ function SelectionPicker({
2386
2462
  rowGridCols
2387
2463
  ),
2388
2464
  children: [
2389
- /* @__PURE__ */ jsx24(
2465
+ /* @__PURE__ */ jsx26(
2390
2466
  CheckBox,
2391
2467
  {
2392
2468
  checked: allSelected,
@@ -2397,18 +2473,18 @@ function SelectionPicker({
2397
2473
  testId: testIdPrefix && `${testIdPrefix}-select-all`
2398
2474
  }
2399
2475
  ),
2400
- /* @__PURE__ */ jsx24("div", { className: cx8("grid gap-2", gridForColumns(columns)), children: columns.map((c) => /* @__PURE__ */ jsx24("span", { className: c.className, children: c.header }, c.key)) }),
2401
- showInfoColumn && /* @__PURE__ */ jsx24("span", { className: "text-right", children: "Info" })
2476
+ /* @__PURE__ */ jsx26("div", { className: cx8("grid gap-2", gridForColumns(columns)), children: columns.map((c) => /* @__PURE__ */ jsx26("span", { className: c.className, children: c.header }, c.key)) }),
2477
+ showInfoColumn && /* @__PURE__ */ jsx26("span", { className: "text-right", children: "Info" })
2402
2478
  ]
2403
2479
  }
2404
2480
  ),
2405
- /* @__PURE__ */ jsx24("div", { className: "max-h-[360px] overflow-y-auto", children: loading ? /* @__PURE__ */ jsx24("div", { className: "flex items-center justify-center py-6", role: "status", "aria-label": "Loading", children: /* @__PURE__ */ jsx24(Loader2, { size: 18, className: "animate-spin text-text-tertiary", "aria-hidden": "true" }) }) : error ? /* @__PURE__ */ jsx24("p", { className: "px-3 py-8 text-center text-[13px] text-text-tertiary", children: errorMessage }) : rows.length === 0 ? /* @__PURE__ */ jsx24("div", { className: "px-3 py-8 text-center text-[13px] text-text-tertiary", children: "No matches. Try a different search or filter." }) : rows.map((row) => {
2481
+ /* @__PURE__ */ jsx26("div", { className: "max-h-[360px] overflow-y-auto", children: loading ? /* @__PURE__ */ jsx26("div", { className: "flex items-center justify-center py-6", role: "status", "aria-label": "Loading", children: /* @__PURE__ */ jsx26(Loader2, { size: 18, className: "animate-spin text-text-tertiary", "aria-hidden": "true" }) }) : error ? /* @__PURE__ */ jsx26("p", { className: "px-3 py-8 text-center text-[13px] text-text-tertiary", children: errorMessage }) : rows.length === 0 ? /* @__PURE__ */ jsx26("div", { className: "px-3 py-8 text-center text-[13px] text-text-tertiary", children: "No matches. Try a different search or filter." }) : rows.map((row) => {
2406
2482
  const isSel = selectedIds.has(row.id);
2407
2483
  const isLocked = lockedIds?.has(row.id) ?? false;
2408
2484
  const kids = getChildren?.(row);
2409
2485
  const isOpen = expanded.has(row.id);
2410
- return /* @__PURE__ */ jsxs22("div", { className: "border-t border-border-default/60 first:border-t-0", children: [
2411
- /* @__PURE__ */ jsxs22(
2486
+ return /* @__PURE__ */ jsxs24("div", { className: "border-t border-border-default/60 first:border-t-0", children: [
2487
+ /* @__PURE__ */ jsxs24(
2412
2488
  "div",
2413
2489
  {
2414
2490
  onClick: isLocked ? void 0 : () => toggleRow(row),
@@ -2421,7 +2497,7 @@ function SelectionPicker({
2421
2497
  !isLocked && isSel && "opacity-70"
2422
2498
  ),
2423
2499
  children: [
2424
- isLocked ? /* @__PURE__ */ jsx24("span", { "aria-hidden": "true" }) : /* @__PURE__ */ jsx24(
2500
+ isLocked ? /* @__PURE__ */ jsx26("span", { "aria-hidden": "true" }) : /* @__PURE__ */ jsx26(
2425
2501
  CheckBox,
2426
2502
  {
2427
2503
  checked: isSel,
@@ -2430,8 +2506,8 @@ function SelectionPicker({
2430
2506
  testId: testIdPrefix && `${testIdPrefix}-row-${slug4(row.id)}`
2431
2507
  }
2432
2508
  ),
2433
- /* @__PURE__ */ jsx24("div", { className: cx8("grid gap-2 text-[13px] text-text-primary", gridForColumns(columns)), children: columns.map((c) => /* @__PURE__ */ jsx24("span", { className: cx8("truncate", c.className), children: c.render(row) }, c.key)) }),
2434
- showInfoColumn && /* @__PURE__ */ jsx24("div", { className: "flex items-center justify-end", children: kids && kids.length > 0 ? /* @__PURE__ */ jsx24(
2509
+ /* @__PURE__ */ jsx26("div", { className: cx8("grid gap-2 text-[13px] text-text-primary", gridForColumns(columns)), children: columns.map((c) => /* @__PURE__ */ jsx26("span", { className: cx8("truncate", c.className), children: c.render(row) }, c.key)) }),
2510
+ showInfoColumn && /* @__PURE__ */ jsx26("div", { className: "flex items-center justify-end", children: kids && kids.length > 0 ? /* @__PURE__ */ jsx26(
2435
2511
  "button",
2436
2512
  {
2437
2513
  type: "button",
@@ -2445,28 +2521,28 @@ function SelectionPicker({
2445
2521
  });
2446
2522
  },
2447
2523
  className: "flex h-7 w-7 items-center justify-center rounded-control text-text-secondary hover:bg-canvas hover:text-text-primary",
2448
- children: /* @__PURE__ */ jsx24(ChevronRight3, { size: 15, className: cx8("transition-transform", isOpen && "rotate-90") })
2524
+ children: /* @__PURE__ */ jsx26(ChevronRight3, { size: 15, className: cx8("transition-transform", isOpen && "rotate-90") })
2449
2525
  }
2450
- ) : /* @__PURE__ */ jsx24(
2526
+ ) : /* @__PURE__ */ jsx26(
2451
2527
  "span",
2452
2528
  {
2453
2529
  className: "flex h-7 w-7 items-center justify-center text-text-tertiary",
2454
2530
  title: "No additional details",
2455
- children: /* @__PURE__ */ jsx24(Info2, { size: 14 })
2531
+ children: /* @__PURE__ */ jsx26(Info2, { size: 14 })
2456
2532
  }
2457
2533
  ) })
2458
2534
  ]
2459
2535
  }
2460
2536
  ),
2461
- isOpen && kids && /* @__PURE__ */ jsx24("div", { className: "bg-canvas/60 pb-1.5 pl-10 pr-3", children: kids.map((kid) => {
2537
+ isOpen && kids && /* @__PURE__ */ jsx26("div", { className: "bg-canvas/60 pb-1.5 pl-10 pr-3", children: kids.map((kid) => {
2462
2538
  const kidSel = selectedIds.has(kid.id);
2463
- return /* @__PURE__ */ jsxs22(
2539
+ return /* @__PURE__ */ jsxs24(
2464
2540
  "div",
2465
2541
  {
2466
2542
  className: "flex items-center justify-between gap-2 border-t border-border-default/40 py-2 first:border-t-0",
2467
2543
  children: [
2468
- /* @__PURE__ */ jsx24("span", { className: "truncate text-[13px] text-text-secondary", children: kid.name }),
2469
- /* @__PURE__ */ jsxs22(
2544
+ /* @__PURE__ */ jsx26("span", { className: "truncate text-[13px] text-text-secondary", children: kid.name }),
2545
+ /* @__PURE__ */ jsxs24(
2470
2546
  "button",
2471
2547
  {
2472
2548
  type: "button",
@@ -2477,7 +2553,7 @@ function SelectionPicker({
2477
2553
  kidSel ? "text-text-tertiary" : "text-text-link hover:bg-subtle"
2478
2554
  ),
2479
2555
  children: [
2480
- kidSel ? /* @__PURE__ */ jsx24(Check6, { size: 13 }) : /* @__PURE__ */ jsx24(Plus, { size: 13 }),
2556
+ kidSel ? /* @__PURE__ */ jsx26(Check6, { size: 13 }) : /* @__PURE__ */ jsx26(Plus, { size: 13 }),
2481
2557
  kidSel ? "Added" : "Add"
2482
2558
  ]
2483
2559
  }
@@ -2489,7 +2565,7 @@ function SelectionPicker({
2489
2565
  }) })
2490
2566
  ] }, row.id);
2491
2567
  }) }),
2492
- !loading && !error && hasMore && /* @__PURE__ */ jsxs22(
2568
+ !loading && !error && hasMore && /* @__PURE__ */ jsxs24(
2493
2569
  "button",
2494
2570
  {
2495
2571
  type: "button",
@@ -2498,19 +2574,19 @@ function SelectionPicker({
2498
2574
  "data-testid": testIdPrefix && `${testIdPrefix}-load-more`,
2499
2575
  className: "flex w-full items-center justify-center gap-2 border-t border-border-default px-2 py-1.5 text-[13px] text-brand-primaryAction transition-colors hover:bg-subtle disabled:opacity-50",
2500
2576
  children: [
2501
- loadingMore ? /* @__PURE__ */ jsx24(Loader2, { size: 13, className: "animate-spin", "aria-hidden": "true" }) : null,
2577
+ loadingMore ? /* @__PURE__ */ jsx26(Loader2, { size: 13, className: "animate-spin", "aria-hidden": "true" }) : null,
2502
2578
  loadingMore ? "Loading\u2026" : "Load more"
2503
2579
  ]
2504
2580
  }
2505
2581
  )
2506
2582
  ] })
2507
2583
  ] }),
2508
- source === "lists" && /* @__PURE__ */ jsxs22("div", { className: "flex min-w-0 flex-col gap-3", children: [
2509
- /* @__PURE__ */ jsx24("p", { className: "text-[13px] 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." }),
2510
- accountLists && accountLists.length > 0 ? /* @__PURE__ */ jsxs22(Fragment4, { children: [
2511
- /* @__PURE__ */ jsx24(ScrollFade, { className: "flex max-h-[396px] flex-col gap-2 overflow-y-auto pr-0.5", children: accountLists.map((list) => {
2584
+ source === "lists" && /* @__PURE__ */ jsxs24("div", { className: "flex min-w-0 flex-col gap-3", children: [
2585
+ /* @__PURE__ */ jsx26("p", { className: "text-[13px] 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." }),
2586
+ accountLists && accountLists.length > 0 ? /* @__PURE__ */ jsxs24(Fragment4, { children: [
2587
+ /* @__PURE__ */ jsx26(ScrollFade, { className: "flex max-h-[396px] flex-col gap-2 overflow-y-auto pr-0.5", children: accountLists.map((list) => {
2512
2588
  const on = (selectedListIds ?? []).includes(list.id);
2513
- return /* @__PURE__ */ jsxs22(
2589
+ return /* @__PURE__ */ jsxs24(
2514
2590
  "button",
2515
2591
  {
2516
2592
  type: "button",
@@ -2522,19 +2598,19 @@ function SelectionPicker({
2522
2598
  on ? "border-brand-primaryAction bg-brand-primarySoft" : "border-border-default bg-surface hover:bg-subtle"
2523
2599
  ),
2524
2600
  children: [
2525
- /* @__PURE__ */ jsx24(
2601
+ /* @__PURE__ */ jsx26(
2526
2602
  "span",
2527
2603
  {
2528
2604
  className: cx8(
2529
2605
  "flex h-5 w-5 shrink-0 items-center justify-center rounded-full",
2530
2606
  on ? "text-brand-primaryAction" : "text-text-secondary"
2531
2607
  ),
2532
- children: on ? /* @__PURE__ */ jsx24(Check6, { size: 16 }) : /* @__PURE__ */ jsx24(Plus, { size: 16 })
2608
+ children: on ? /* @__PURE__ */ jsx26(Check6, { size: 16 }) : /* @__PURE__ */ jsx26(Plus, { size: 16 })
2533
2609
  }
2534
2610
  ),
2535
- /* @__PURE__ */ jsxs22("span", { className: "min-w-0 flex-1", children: [
2536
- /* @__PURE__ */ jsx24("span", { className: "flex min-w-0 items-center gap-2", children: /* @__PURE__ */ jsx24("span", { className: "truncate text-[14px] font-medium text-text-primary", children: list.name }) }),
2537
- /* @__PURE__ */ jsxs22("span", { className: "block truncate text-[12px] text-text-secondary", children: [
2611
+ /* @__PURE__ */ jsxs24("span", { className: "min-w-0 flex-1", children: [
2612
+ /* @__PURE__ */ jsx26("span", { className: "flex min-w-0 items-center gap-2", children: /* @__PURE__ */ jsx26("span", { className: "truncate text-[14px] font-medium text-text-primary", children: list.name }) }),
2613
+ /* @__PURE__ */ jsxs24("span", { className: "block truncate text-[12px] text-text-secondary", children: [
2538
2614
  list.count,
2539
2615
  " accounts \xB7 ",
2540
2616
  list.entityTypes.join(", "),
@@ -2542,13 +2618,13 @@ function SelectionPicker({
2542
2618
  formatListDate(list.updatedAt)
2543
2619
  ] })
2544
2620
  ] }),
2545
- /* @__PURE__ */ jsx24("span", { className: cx8("shrink-0 text-[12px] font-medium", on ? "text-brand-primaryAction" : "text-text-secondary"), children: on ? "Added" : "Add" })
2621
+ /* @__PURE__ */ jsx26("span", { className: cx8("shrink-0 text-[12px] font-medium", on ? "text-brand-primaryAction" : "text-text-secondary"), children: on ? "Added" : "Add" })
2546
2622
  ]
2547
2623
  },
2548
2624
  list.id
2549
2625
  );
2550
2626
  }) }),
2551
- /* @__PURE__ */ jsxs22(
2627
+ /* @__PURE__ */ jsxs24(
2552
2628
  "p",
2553
2629
  {
2554
2630
  className: "border-t border-border-default pt-2 text-right text-[12px] font-medium text-text-tertiary",
@@ -2560,11 +2636,11 @@ function SelectionPicker({
2560
2636
  ]
2561
2637
  }
2562
2638
  )
2563
- ] }) : /* @__PURE__ */ jsxs22("div", { className: "flex flex-col items-center gap-3 rounded-card border border-dashed border-border-default py-10 text-center", children: [
2564
- /* @__PURE__ */ jsx24("div", { className: "flex h-12 w-12 items-center justify-center rounded-full bg-subtle", children: /* @__PURE__ */ jsx24(List, { size: 20, className: "text-text-tertiary", "aria-hidden": "true" }) }),
2565
- /* @__PURE__ */ jsxs22("div", { className: "flex flex-col gap-1", children: [
2566
- /* @__PURE__ */ jsx24("p", { className: "text-[14px] font-semibold text-text-primary", children: "No account lists yet" }),
2567
- /* @__PURE__ */ jsx24("p", { className: "text-[13px] text-text-tertiary", children: "Account lists set up for you will appear here." })
2639
+ ] }) : /* @__PURE__ */ jsxs24("div", { className: "flex flex-col items-center gap-3 rounded-card border border-dashed border-border-default py-10 text-center", children: [
2640
+ /* @__PURE__ */ jsx26("div", { className: "flex h-12 w-12 items-center justify-center rounded-full bg-subtle", children: /* @__PURE__ */ jsx26(List, { size: 20, className: "text-text-tertiary", "aria-hidden": "true" }) }),
2641
+ /* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-1", children: [
2642
+ /* @__PURE__ */ jsx26("p", { className: "text-[14px] font-semibold text-text-primary", children: "No account lists yet" }),
2643
+ /* @__PURE__ */ jsx26("p", { className: "text-[13px] text-text-tertiary", children: "Account lists set up for you will appear here." })
2568
2644
  ] })
2569
2645
  ] })
2570
2646
  ] })
@@ -2596,7 +2672,7 @@ function ScrollFade({ className, children }) {
2596
2672
  [sync]
2597
2673
  );
2598
2674
  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;
2599
- return /* @__PURE__ */ jsx24("div", { ref: attach, onScroll: sync, className, style: { maskImage: mask, WebkitMaskImage: mask }, children });
2675
+ return /* @__PURE__ */ jsx26("div", { ref: attach, onScroll: sync, className, style: { maskImage: mask, WebkitMaskImage: mask }, children });
2600
2676
  }
2601
2677
  function formatListDate(iso) {
2602
2678
  try {
@@ -2646,8 +2722,8 @@ function FilterDropdown({
2646
2722
  const count = active.size;
2647
2723
  const label = count === 0 ? filter.label : count === 1 ? [...active][0] : "Multiple";
2648
2724
  const filterSlug = slug4(filter.label);
2649
- return /* @__PURE__ */ jsxs22("div", { className: "relative", children: [
2650
- /* @__PURE__ */ jsxs22(
2725
+ return /* @__PURE__ */ jsxs24("div", { className: "relative", children: [
2726
+ /* @__PURE__ */ jsxs24(
2651
2727
  "button",
2652
2728
  {
2653
2729
  ref: btnRef,
@@ -2658,12 +2734,12 @@ function FilterDropdown({
2658
2734
  className: "inline-flex h-8 items-center gap-1.5 whitespace-nowrap rounded-control border border-border-strong bg-input px-3 text-[13px] font-medium text-text-secondary transition-colors hover:bg-subtle",
2659
2735
  children: [
2660
2736
  label,
2661
- /* @__PURE__ */ jsx24(ChevronDown8, { size: 13, "aria-hidden": "true", className: cx8("transition-transform", open && "rotate-180") })
2737
+ /* @__PURE__ */ jsx26(ChevronDown8, { size: 13, "aria-hidden": "true", className: cx8("transition-transform", open && "rotate-180") })
2662
2738
  ]
2663
2739
  }
2664
2740
  ),
2665
2741
  open && pos && createPortal4(
2666
- /* @__PURE__ */ jsxs22(
2742
+ /* @__PURE__ */ jsxs24(
2667
2743
  "div",
2668
2744
  {
2669
2745
  ref: menuRef,
@@ -2672,9 +2748,9 @@ function FilterDropdown({
2672
2748
  style: { top: pos.top, left: pos.left },
2673
2749
  className: "fixed z-[80] min-w-[220px] rounded-card border border-border-default bg-surface p-2 shadow-overlay",
2674
2750
  children: [
2675
- searchable && /* @__PURE__ */ jsxs22("div", { className: "mb-1.5 flex h-8 items-center gap-2 rounded-control border border-border-strong bg-input px-2.5", children: [
2676
- /* @__PURE__ */ jsx24(Search4, { size: 14, className: "shrink-0 text-text-secondary", "aria-hidden": "true" }),
2677
- /* @__PURE__ */ jsx24(
2751
+ searchable && /* @__PURE__ */ jsxs24("div", { className: "mb-1.5 flex h-8 items-center gap-2 rounded-control border border-border-strong bg-input px-2.5", children: [
2752
+ /* @__PURE__ */ jsx26(Search4, { size: 14, className: "shrink-0 text-text-secondary", "aria-hidden": "true" }),
2753
+ /* @__PURE__ */ jsx26(
2678
2754
  "input",
2679
2755
  {
2680
2756
  autoFocus: true,
@@ -2685,14 +2761,14 @@ function FilterDropdown({
2685
2761
  }
2686
2762
  )
2687
2763
  ] }),
2688
- /* @__PURE__ */ jsx24("div", { className: cx8("flex flex-col gap-0.5", searchable && "max-h-[240px] overflow-y-auto"), children: shownOptions.length === 0 ? /* @__PURE__ */ jsx24("p", { className: "px-2 py-3 text-center text-[12px] text-text-secondary", children: "No matches." }) : shownOptions.map((opt) => {
2764
+ /* @__PURE__ */ jsx26("div", { className: cx8("flex flex-col gap-0.5", searchable && "max-h-[240px] overflow-y-auto"), children: shownOptions.length === 0 ? /* @__PURE__ */ jsx26("p", { className: "px-2 py-3 text-center text-[12px] text-text-secondary", children: "No matches." }) : shownOptions.map((opt) => {
2689
2765
  const on = active.has(opt);
2690
- return /* @__PURE__ */ jsxs22(
2766
+ return /* @__PURE__ */ jsxs24(
2691
2767
  "label",
2692
2768
  {
2693
2769
  className: "flex cursor-pointer items-center gap-2 rounded-control px-2 py-1.5 text-[13px] text-text-primary hover:bg-subtle",
2694
2770
  children: [
2695
- /* @__PURE__ */ jsx24(
2771
+ /* @__PURE__ */ jsx26(
2696
2772
  CheckBox,
2697
2773
  {
2698
2774
  checked: on,
@@ -2723,7 +2799,7 @@ function gridForColumns(columns) {
2723
2799
 
2724
2800
  // src/PublisherBreakdownList.tsx
2725
2801
  import { useState as useState10 } from "react";
2726
- import { jsx as jsx25, jsxs as jsxs23 } from "react/jsx-runtime";
2802
+ import { jsx as jsx27, jsxs as jsxs25 } from "react/jsx-runtime";
2727
2803
  function cx9(...parts) {
2728
2804
  return parts.filter(Boolean).join(" ");
2729
2805
  }
@@ -2738,7 +2814,7 @@ function initials(name) {
2738
2814
  return name.replace(/[^a-zA-Z0-9]/g, "").slice(0, 2).toUpperCase();
2739
2815
  }
2740
2816
  function Monogram({ name, size = 28 }) {
2741
- return /* @__PURE__ */ jsx25(
2817
+ return /* @__PURE__ */ jsx27(
2742
2818
  "span",
2743
2819
  {
2744
2820
  "aria-hidden": "true",
@@ -2749,12 +2825,12 @@ function Monogram({ name, size = 28 }) {
2749
2825
  );
2750
2826
  }
2751
2827
  function BreakdownTag({ children }) {
2752
- return /* @__PURE__ */ jsx25("span", { className: "inline-flex items-center whitespace-nowrap rounded-full bg-subtle px-2 py-0.5 text-[11px] font-medium text-text-secondary", children });
2828
+ return /* @__PURE__ */ jsx27("span", { className: "inline-flex items-center whitespace-nowrap rounded-full bg-subtle px-2 py-0.5 text-[11px] font-medium text-text-secondary", children });
2753
2829
  }
2754
2830
  function DelayedTip({ label, children }) {
2755
- return /* @__PURE__ */ jsxs23("span", { className: "group/dt relative inline-flex", tabIndex: 0, "aria-label": label, children: [
2831
+ return /* @__PURE__ */ jsxs25("span", { className: "group/dt relative inline-flex", tabIndex: 0, "aria-label": label, children: [
2756
2832
  children,
2757
- /* @__PURE__ */ jsx25(
2833
+ /* @__PURE__ */ jsx27(
2758
2834
  "span",
2759
2835
  {
2760
2836
  role: "tooltip",
@@ -2768,22 +2844,22 @@ var COL_CURRENT = 76;
2768
2844
  var COL_PREVIOUS = 76;
2769
2845
  var COL_YOY = 44;
2770
2846
  function MetricListHeader({ className }) {
2771
- return /* @__PURE__ */ jsxs23("div", { className: cx9("flex items-baseline gap-2 pb-2", className), children: [
2772
- /* @__PURE__ */ jsx25("span", { className: "flex-1" }),
2773
- /* @__PURE__ */ jsxs23("span", { className: "flex shrink-0 items-center gap-2 pr-1.5", children: [
2774
- /* @__PURE__ */ jsx25("span", { className: "text-right text-[11px] font-medium text-text-tertiary", style: { width: COL_CURRENT }, children: "Current" }),
2775
- /* @__PURE__ */ jsx25(DelayedTip, { label: "Spend during the same time period one year ago.", children: /* @__PURE__ */ jsx25("span", { className: "text-right text-[11px] font-medium text-text-tertiary", style: { width: COL_PREVIOUS }, children: "Previous" }) }),
2776
- /* @__PURE__ */ jsx25(DelayedTip, { label: "Percent change from this time period vs. the same time one year ago.", children: /* @__PURE__ */ jsx25("span", { className: "text-right text-[11px] font-medium text-text-tertiary", style: { width: COL_YOY }, children: "YoY" }) })
2847
+ return /* @__PURE__ */ jsxs25("div", { className: cx9("flex items-baseline gap-2 pb-2", className), children: [
2848
+ /* @__PURE__ */ jsx27("span", { className: "flex-1" }),
2849
+ /* @__PURE__ */ jsxs25("span", { className: "flex shrink-0 items-center gap-2 pr-1.5", children: [
2850
+ /* @__PURE__ */ jsx27("span", { className: "text-right text-[11px] font-medium text-text-tertiary", style: { width: COL_CURRENT }, children: "Current" }),
2851
+ /* @__PURE__ */ jsx27(DelayedTip, { label: "Spend during the same time period one year ago.", children: /* @__PURE__ */ jsx27("span", { className: "text-right text-[11px] font-medium text-text-tertiary", style: { width: COL_PREVIOUS }, children: "Previous" }) }),
2852
+ /* @__PURE__ */ jsx27(DelayedTip, { label: "Percent change from this time period vs. the same time one year ago.", children: /* @__PURE__ */ jsx27("span", { className: "text-right text-[11px] font-medium text-text-tertiary", style: { width: COL_YOY }, children: "YoY" }) })
2777
2853
  ] })
2778
2854
  ] });
2779
2855
  }
2780
2856
  function MetricCells({ spendN, yoy }) {
2781
2857
  const prior = priorYearAmt(spendN, yoy);
2782
2858
  const up = yoy !== "NEW" && yoy >= 0;
2783
- return /* @__PURE__ */ jsxs23("span", { className: "flex shrink-0 items-center gap-2 pr-1.5", children: [
2784
- /* @__PURE__ */ jsx25("span", { className: "text-right text-[12px] font-bold tabular-nums text-text-primary", style: { width: COL_CURRENT }, children: fmtM(spendN) }),
2785
- /* @__PURE__ */ jsx25("span", { className: "text-right text-[12px] font-normal tabular-nums text-text-primary", style: { width: COL_PREVIOUS }, children: prior ?? "\u2014" }),
2786
- /* @__PURE__ */ jsx25("span", { className: "flex justify-end", style: { width: COL_YOY }, children: yoy === "NEW" ? /* @__PURE__ */ jsx25("span", { className: "rounded-full bg-status-warning/15 px-1.5 text-badge font-semibold text-text-warning", children: "NEW" }) : /* @__PURE__ */ jsxs23("span", { className: cx9("text-right text-[12px] font-semibold tabular-nums", up ? "text-text-success" : "text-text-danger"), children: [
2859
+ return /* @__PURE__ */ jsxs25("span", { className: "flex shrink-0 items-center gap-2 pr-1.5", children: [
2860
+ /* @__PURE__ */ jsx27("span", { className: "text-right text-[12px] font-bold tabular-nums text-text-primary", style: { width: COL_CURRENT }, children: fmtM(spendN) }),
2861
+ /* @__PURE__ */ jsx27("span", { className: "text-right text-[12px] font-normal tabular-nums text-text-primary", style: { width: COL_PREVIOUS }, children: prior ?? "\u2014" }),
2862
+ /* @__PURE__ */ jsx27("span", { className: "flex justify-end", style: { width: COL_YOY }, children: yoy === "NEW" ? /* @__PURE__ */ jsx27("span", { className: "rounded-full bg-status-warning/15 px-1.5 text-badge font-semibold text-text-warning", children: "NEW" }) : /* @__PURE__ */ jsxs25("span", { className: cx9("text-right text-[12px] font-semibold tabular-nums", up ? "text-text-success" : "text-text-danger"), children: [
2787
2863
  up ? "+" : "\u2212",
2788
2864
  Math.abs(yoy),
2789
2865
  "%"
@@ -2794,35 +2870,35 @@ function PublisherBreakdownList({ rows, defaultVisibleCount = 10, padded = true,
2794
2870
  const [showAll, setShowAll] = useState10(false);
2795
2871
  const visible = showAll ? rows : rows.slice(0, defaultVisibleCount);
2796
2872
  const rowPad = padded ? "px-5" : "";
2797
- return /* @__PURE__ */ jsxs23("div", { className: "flex flex-col", children: [
2798
- /* @__PURE__ */ jsxs23("div", { className: "flex flex-col", children: [
2799
- /* @__PURE__ */ jsx25(MetricListHeader, { className: rowPad }),
2800
- visible.map((p) => /* @__PURE__ */ jsxs23("div", { className: cx9("flex items-center justify-between gap-3 border-t border-border-default/60 py-2.5 first:border-t-0", rowPad), children: [
2801
- /* @__PURE__ */ jsxs23("div", { className: "flex min-w-0 items-center gap-2.5", children: [
2802
- renderLogo ? renderLogo(p) : /* @__PURE__ */ jsx25(Monogram, { name: p.brand, size: 28 }),
2803
- /* @__PURE__ */ jsxs23("div", { className: "min-w-0", children: [
2804
- /* @__PURE__ */ jsxs23("div", { className: "flex flex-wrap items-center gap-1.5", children: [
2805
- /* @__PURE__ */ jsx25("span", { className: "text-[14px] font-semibold text-text-primary", children: p.brand }),
2806
- p.tags.map((t) => /* @__PURE__ */ jsx25(BreakdownTag, { children: t }, t))
2873
+ return /* @__PURE__ */ jsxs25("div", { className: "flex flex-col", children: [
2874
+ /* @__PURE__ */ jsxs25("div", { className: "flex flex-col", children: [
2875
+ /* @__PURE__ */ jsx27(MetricListHeader, { className: rowPad }),
2876
+ visible.map((p) => /* @__PURE__ */ jsxs25("div", { className: cx9("flex items-center justify-between gap-3 border-t border-border-default/60 py-2.5 first:border-t-0", rowPad), children: [
2877
+ /* @__PURE__ */ jsxs25("div", { className: "flex min-w-0 items-center gap-2.5", children: [
2878
+ renderLogo ? renderLogo(p) : /* @__PURE__ */ jsx27(Monogram, { name: p.brand, size: 28 }),
2879
+ /* @__PURE__ */ jsxs25("div", { className: "min-w-0", children: [
2880
+ /* @__PURE__ */ jsxs25("div", { className: "flex flex-wrap items-center gap-1.5", children: [
2881
+ /* @__PURE__ */ jsx27("span", { className: "text-[14px] font-semibold text-text-primary", children: p.brand }),
2882
+ p.tags.map((t) => /* @__PURE__ */ jsx27(BreakdownTag, { children: t }, t))
2807
2883
  ] }),
2808
- /* @__PURE__ */ jsx25("div", { className: "truncate text-[11.5px] text-text-tertiary", children: p.owner })
2884
+ /* @__PURE__ */ jsx27("div", { className: "truncate text-[11.5px] text-text-tertiary", children: p.owner })
2809
2885
  ] })
2810
2886
  ] }),
2811
- /* @__PURE__ */ jsx25(MetricCells, { spendN: p.spendN, yoy: p.yoy })
2887
+ /* @__PURE__ */ jsx27(MetricCells, { spendN: p.spendN, yoy: p.yoy })
2812
2888
  ] }, p.brand))
2813
2889
  ] }),
2814
- rows.length > defaultVisibleCount && (viewAllHref ? /* @__PURE__ */ jsx25("div", { className: cx9("border-t border-border-default py-3", rowPad), children: /* @__PURE__ */ jsx25("a", { href: viewAllHref, className: "text-[12px] font-semibold text-text-link hover:underline", children: "See all publishers" }) }) : /* @__PURE__ */ jsxs23("div", { className: cx9("flex items-center gap-2 border-t border-border-default py-3 text-[12px] text-text-tertiary", rowPad), children: [
2815
- /* @__PURE__ */ jsxs23("span", { children: [
2890
+ rows.length > defaultVisibleCount && (viewAllHref ? /* @__PURE__ */ jsx27("div", { className: cx9("border-t border-border-default py-3", rowPad), children: /* @__PURE__ */ jsx27("a", { href: viewAllHref, className: "text-[12px] font-semibold text-text-link hover:underline", children: "See all publishers" }) }) : /* @__PURE__ */ jsxs25("div", { className: cx9("flex items-center gap-2 border-t border-border-default py-3 text-[12px] text-text-tertiary", rowPad), children: [
2891
+ /* @__PURE__ */ jsxs25("span", { children: [
2816
2892
  "Showing ",
2817
2893
  visible.length,
2818
2894
  " of ",
2819
2895
  rows.length
2820
2896
  ] }),
2821
- !showAll ? /* @__PURE__ */ jsxs23("button", { type: "button", onClick: () => setShowAll(true), className: "font-semibold text-text-link hover:underline", children: [
2897
+ !showAll ? /* @__PURE__ */ jsxs25("button", { type: "button", onClick: () => setShowAll(true), className: "font-semibold text-text-link hover:underline", children: [
2822
2898
  "See all (",
2823
2899
  rows.length - defaultVisibleCount,
2824
2900
  " more)"
2825
- ] }) : /* @__PURE__ */ jsx25("button", { type: "button", onClick: () => setShowAll(false), className: "font-semibold text-text-link hover:underline", children: "Show less" })
2901
+ ] }) : /* @__PURE__ */ jsx27("button", { type: "button", onClick: () => setShowAll(false), className: "font-semibold text-text-link hover:underline", children: "Show less" })
2826
2902
  ] }))
2827
2903
  ] });
2828
2904
  }
@@ -2832,7 +2908,7 @@ import { forwardRef as forwardRef2 } from "react";
2832
2908
  import { Slot } from "@radix-ui/react-slot";
2833
2909
  import { cva } from "class-variance-authority";
2834
2910
  import { Loader2 as Loader22 } from "lucide-react";
2835
- import { jsx as jsx26, jsxs as jsxs24 } from "react/jsx-runtime";
2911
+ import { jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
2836
2912
  var buttonVariants = cva(
2837
2913
  "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-2 focus-visible:outline-border-focus",
2838
2914
  {
@@ -2902,10 +2978,10 @@ var Button = forwardRef2(
2902
2978
  ...props
2903
2979
  };
2904
2980
  if (asChild) {
2905
- return /* @__PURE__ */ jsx26(Slot, { ref, ...shared, children });
2981
+ return /* @__PURE__ */ jsx28(Slot, { ref, ...shared, children });
2906
2982
  }
2907
- return /* @__PURE__ */ jsxs24("button", { ref, ...shared, children: [
2908
- loading && /* @__PURE__ */ jsx26(Loader22, { className: "size-4 shrink-0 animate-spin", "aria-hidden": "true" }),
2983
+ return /* @__PURE__ */ jsxs26("button", { ref, ...shared, children: [
2984
+ loading && /* @__PURE__ */ jsx28(Loader22, { className: "size-4 shrink-0 animate-spin", "aria-hidden": "true" }),
2909
2985
  children
2910
2986
  ] });
2911
2987
  }
@@ -2913,14 +2989,14 @@ var Button = forwardRef2(
2913
2989
  Button.displayName = "Button";
2914
2990
 
2915
2991
  // src/FilterDropdownFooter.tsx
2916
- import { jsx as jsx27, jsxs as jsxs25 } from "react/jsx-runtime";
2992
+ import { jsx as jsx29, jsxs as jsxs27 } from "react/jsx-runtime";
2917
2993
  function FilterDropdownFooter({
2918
2994
  onClear,
2919
2995
  onApply,
2920
2996
  clearLabel = "Clear all",
2921
2997
  applyLabel = "Apply"
2922
2998
  }) {
2923
- return /* @__PURE__ */ jsxs25(
2999
+ return /* @__PURE__ */ jsxs27(
2924
3000
  "div",
2925
3001
  {
2926
3002
  className: cn(
@@ -2928,8 +3004,8 @@ function FilterDropdownFooter({
2928
3004
  onClear ? "justify-between" : "justify-end"
2929
3005
  ),
2930
3006
  children: [
2931
- onClear && /* @__PURE__ */ jsx27(Button, { type: "button", variant: "ghost", size: "sm", onClick: onClear, children: clearLabel }),
2932
- /* @__PURE__ */ jsx27(Button, { type: "button", variant: "primary", size: "sm", onClick: onApply, children: applyLabel })
3007
+ onClear && /* @__PURE__ */ jsx29(Button, { type: "button", variant: "ghost", size: "sm", onClick: onClear, children: clearLabel }),
3008
+ /* @__PURE__ */ jsx29(Button, { type: "button", variant: "primary", size: "sm", onClick: onApply, children: applyLabel })
2933
3009
  ]
2934
3010
  }
2935
3011
  );
@@ -2938,7 +3014,7 @@ function FilterDropdownFooter({
2938
3014
  // src/NameListModal.tsx
2939
3015
  import { useEffect as useEffect10, useId as useId4, useRef as useRef11, useState as useState11 } from "react";
2940
3016
  import { createPortal as createPortal5 } from "react-dom";
2941
- import { jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
3017
+ import { jsx as jsx30, jsxs as jsxs28 } from "react/jsx-runtime";
2942
3018
  function NameListModal({
2943
3019
  title,
2944
3020
  initialName,
@@ -2990,12 +3066,12 @@ function NameListModal({
2990
3066
  // bg-scrim, not a literal: design-tokens gained a scrim token in 2.5.0.
2991
3067
  // No in-data-[theme=dark] override needed any more -- the token redefines
2992
3068
  // itself under that attribute in dark.css, so one class covers both themes.
2993
- /* @__PURE__ */ jsx28(
3069
+ /* @__PURE__ */ jsx30(
2994
3070
  "div",
2995
3071
  {
2996
3072
  className: "fixed inset-0 z-modal flex items-center justify-center bg-scrim px-4",
2997
3073
  onMouseDown: (e) => e.target === e.currentTarget && onCancel(),
2998
- children: /* @__PURE__ */ jsxs26(
3074
+ children: /* @__PURE__ */ jsxs28(
2999
3075
  "div",
3000
3076
  {
3001
3077
  ref: dialogRef,
@@ -3005,10 +3081,10 @@ function NameListModal({
3005
3081
  onKeyDown: trapTab,
3006
3082
  className: "w-full max-w-110 rounded-card border border-border-default bg-surface p-5 shadow-overlay",
3007
3083
  children: [
3008
- /* @__PURE__ */ jsx28("h2", { id: titleId, className: "text-[16px] font-semibold text-text-primary", children: title }),
3009
- /* @__PURE__ */ jsxs26("div", { className: "mt-4 flex flex-col gap-1.5", children: [
3010
- /* @__PURE__ */ jsx28("label", { htmlFor: fieldId, className: "text-[12px] font-medium text-text-secondary", children: fieldLabel }),
3011
- /* @__PURE__ */ jsx28(
3084
+ /* @__PURE__ */ jsx30("h2", { id: titleId, className: "text-[16px] font-semibold text-text-primary", children: title }),
3085
+ /* @__PURE__ */ jsxs28("div", { className: "mt-4 flex flex-col gap-1.5", children: [
3086
+ /* @__PURE__ */ jsx30("label", { htmlFor: fieldId, className: "text-[12px] font-medium text-text-secondary", children: fieldLabel }),
3087
+ /* @__PURE__ */ jsx30(
3012
3088
  "input",
3013
3089
  {
3014
3090
  id: fieldId,
@@ -3020,13 +3096,13 @@ function NameListModal({
3020
3096
  }
3021
3097
  )
3022
3098
  ] }),
3023
- options && options.length > 0 && /* @__PURE__ */ jsx28("div", { className: "mt-4 flex flex-col gap-2.5", children: options.map((o) => /* @__PURE__ */ jsxs26("label", { className: "flex cursor-pointer items-center gap-2.5 text-[13px] text-text-primary", children: [
3024
- /* @__PURE__ */ jsx28(CheckBox, { checked: !!checked[o.key], onChange: () => toggle(o.key), ariaLabel: o.label }),
3099
+ options && options.length > 0 && /* @__PURE__ */ jsx30("div", { className: "mt-4 flex flex-col gap-2.5", children: options.map((o) => /* @__PURE__ */ jsxs28("label", { className: "flex cursor-pointer items-center gap-2.5 text-[13px] text-text-primary", children: [
3100
+ /* @__PURE__ */ jsx30(CheckBox, { checked: !!checked[o.key], onChange: () => toggle(o.key), ariaLabel: o.label }),
3025
3101
  o.label
3026
3102
  ] }, o.key)) }),
3027
- /* @__PURE__ */ jsxs26("div", { className: "mt-5 flex items-center justify-end gap-2", children: [
3028
- /* @__PURE__ */ jsx28(Button, { variant: "secondary", onClick: onCancel, children: "Cancel" }),
3029
- /* @__PURE__ */ jsx28(Button, { disabled: !name.trim(), onClick: () => onSubmit(name.trim(), checked), children: submitLabel })
3103
+ /* @__PURE__ */ jsxs28("div", { className: "mt-5 flex items-center justify-end gap-2", children: [
3104
+ /* @__PURE__ */ jsx30(Button, { variant: "secondary", onClick: onCancel, children: "Cancel" }),
3105
+ /* @__PURE__ */ jsx30(Button, { disabled: !name.trim(), onClick: () => onSubmit(name.trim(), checked), children: submitLabel })
3030
3106
  ] })
3031
3107
  ]
3032
3108
  }
@@ -3037,37 +3113,13 @@ function NameListModal({
3037
3113
  );
3038
3114
  }
3039
3115
 
3040
- // src/ChipTrigger.tsx
3041
- import { jsx as jsx29, jsxs as jsxs27 } from "react/jsx-runtime";
3042
- function chipTriggerClass(_variant = "box") {
3043
- return cn(
3044
- "flex h-11 items-center gap-2 rounded-control border border-border-strong bg-input px-2.5 text-text-secondary transition-colors hover:bg-subtle hover:text-text-primary focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-border-focus"
3045
- // One stroke for every trigger: a `box` chip on the lighter default
3046
- // border sat beside SelectFilter's darker one in the same row and read as
3047
- // a different kind of control. The variant no longer changes anything.
3048
- );
3049
- }
3050
- function ChipContent({ caption, value, icon }) {
3051
- const stack = /* @__PURE__ */ jsxs27("span", { className: "flex flex-col gap-1 text-left leading-none", children: [
3052
- /* @__PURE__ */ jsx29("span", { className: "text-control-caption uppercase tracking-wide text-text-tertiary", children: caption }),
3053
- /* @__PURE__ */ jsx29("span", { className: "text-[12px] font-medium text-text-primary", children: value })
3054
- ] });
3055
- if (icon) {
3056
- return /* @__PURE__ */ jsxs27("span", { className: "flex items-center gap-2", children: [
3057
- /* @__PURE__ */ jsx29("span", { className: "shrink-0 text-text-tertiary", children: icon }),
3058
- stack
3059
- ] });
3060
- }
3061
- return stack;
3062
- }
3063
-
3064
3116
  // src/FilterChipBar.tsx
3065
3117
  import { CircleSlash, X as X4 } from "lucide-react";
3066
- import { jsx as jsx30, jsxs as jsxs28 } from "react/jsx-runtime";
3118
+ import { jsx as jsx31, jsxs as jsxs29 } from "react/jsx-runtime";
3067
3119
  function FilterChipBar({ chips, onRemove, onClearAll, parkedKeys }) {
3068
3120
  if (chips.length === 0) return null;
3069
- return /* @__PURE__ */ jsxs28("div", { className: "flex flex-wrap items-center gap-1.5 border-t border-border-default pt-2.5", children: [
3070
- chips.map((c) => /* @__PURE__ */ jsx30(
3121
+ return /* @__PURE__ */ jsxs29("div", { className: "flex flex-wrap items-center gap-1.5 border-t border-border-default pt-2.5", children: [
3122
+ chips.map((c) => /* @__PURE__ */ jsx31(
3071
3123
  Chip,
3072
3124
  {
3073
3125
  label: c.label,
@@ -3077,7 +3129,7 @@ function FilterChipBar({ chips, onRemove, onClearAll, parkedKeys }) {
3077
3129
  },
3078
3130
  c.key
3079
3131
  )),
3080
- /* @__PURE__ */ jsx30("button", { type: "button", onClick: onClearAll, className: "ml-1 text-[12px] font-medium text-text-link hover:underline", children: "Clear all" })
3132
+ /* @__PURE__ */ jsx31("button", { type: "button", onClick: onClearAll, className: "ml-1 text-[12px] font-medium text-text-link hover:underline", children: "Clear all" })
3081
3133
  ] });
3082
3134
  }
3083
3135
  function Chip({
@@ -3086,8 +3138,8 @@ function Chip({
3086
3138
  parked,
3087
3139
  onRemove
3088
3140
  }) {
3089
- return /* @__PURE__ */ jsxs28("span", { className: "group relative inline-flex", children: [
3090
- /* @__PURE__ */ jsxs28(
3141
+ return /* @__PURE__ */ jsxs29("span", { className: "group relative inline-flex", children: [
3142
+ /* @__PURE__ */ jsxs29(
3091
3143
  "span",
3092
3144
  {
3093
3145
  className: cn(
@@ -3099,22 +3151,22 @@ function Chip({
3099
3151
  ) : "bg-subtle text-text-secondary ring-transparent group-hover:bg-border-default group-hover:text-text-primary group-hover:ring-border-interactive"
3100
3152
  ),
3101
3153
  children: [
3102
- parked && /* @__PURE__ */ jsx30(CircleSlash, { size: 11, "aria-hidden": "true", className: "shrink-0 text-text-tertiary" }),
3154
+ parked && /* @__PURE__ */ jsx31(CircleSlash, { size: 11, "aria-hidden": "true", className: "shrink-0 text-text-tertiary" }),
3103
3155
  label,
3104
- /* @__PURE__ */ jsx30(
3156
+ /* @__PURE__ */ jsx31(
3105
3157
  "button",
3106
3158
  {
3107
3159
  type: "button",
3108
3160
  onClick: onRemove,
3109
3161
  "aria-label": `Remove ${groupLabel}: ${label}`,
3110
3162
  className: "text-text-tertiary transition-colors hover:text-text-primary",
3111
- children: /* @__PURE__ */ jsx30(X4, { size: 12 })
3163
+ children: /* @__PURE__ */ jsx31(X4, { size: 12 })
3112
3164
  }
3113
3165
  )
3114
3166
  ]
3115
3167
  }
3116
3168
  ),
3117
- /* @__PURE__ */ jsx30(
3169
+ /* @__PURE__ */ jsx31(
3118
3170
  "span",
3119
3171
  {
3120
3172
  role: "tooltip",
@@ -3127,7 +3179,7 @@ function Chip({
3127
3179
 
3128
3180
  // src/SortButton.tsx
3129
3181
  import { ArrowUp, ArrowDown, ArrowUpDown } from "lucide-react";
3130
- import { jsx as jsx31, jsxs as jsxs29 } from "react/jsx-runtime";
3182
+ import { jsx as jsx32, jsxs as jsxs30 } from "react/jsx-runtime";
3131
3183
  var ALIGN = {
3132
3184
  left: "justify-start text-left",
3133
3185
  center: "justify-center text-center",
@@ -3143,9 +3195,9 @@ function SortButton({
3143
3195
  align = "left",
3144
3196
  testIdPrefix
3145
3197
  }) {
3146
- if (!sortable) return /* @__PURE__ */ jsx31("span", { className: cn("inline-flex", ALIGN[align]), children: label });
3198
+ if (!sortable) return /* @__PURE__ */ jsx32("span", { className: cn("inline-flex", ALIGN[align]), children: label });
3147
3199
  const active = !disabled && sort.key === sortKey;
3148
- return /* @__PURE__ */ jsxs29(
3200
+ return /* @__PURE__ */ jsxs30(
3149
3201
  "button",
3150
3202
  {
3151
3203
  type: "button",
@@ -3174,7 +3226,7 @@ function SortButton({
3174
3226
  ),
3175
3227
  children: [
3176
3228
  label,
3177
- !disabled && (active ? sort.dir === "asc" ? /* @__PURE__ */ jsx31(ArrowUp, { size: 12, "aria-hidden": "true", className: "shrink-0 text-brand-primaryAction" }) : /* @__PURE__ */ jsx31(ArrowDown, { size: 12, "aria-hidden": "true", className: "shrink-0 text-brand-primaryAction" }) : /* @__PURE__ */ jsx31(
3229
+ !disabled && (active ? sort.dir === "asc" ? /* @__PURE__ */ jsx32(ArrowUp, { size: 12, "aria-hidden": "true", className: "shrink-0 text-brand-primaryAction" }) : /* @__PURE__ */ jsx32(ArrowDown, { size: 12, "aria-hidden": "true", className: "shrink-0 text-brand-primaryAction" }) : /* @__PURE__ */ jsx32(
3178
3230
  ArrowUpDown,
3179
3231
  {
3180
3232
  size: 12,
@@ -3203,7 +3255,7 @@ function ariaSortFor(sort, key) {
3203
3255
 
3204
3256
  // src/Pager.tsx
3205
3257
  import { ChevronLeft as ChevronLeft3, ChevronRight as ChevronRight4 } from "lucide-react";
3206
- import { jsx as jsx32, jsxs as jsxs30 } from "react/jsx-runtime";
3258
+ import { jsx as jsx33, jsxs as jsxs31 } from "react/jsx-runtime";
3207
3259
  function pageWindow(current, total) {
3208
3260
  if (total <= 7) return Array.from({ length: total }, (_, i) => i + 1);
3209
3261
  const keep = /* @__PURE__ */ new Set([1, total, current, current - 1, current + 1]);
@@ -3219,8 +3271,8 @@ function pageWindow(current, total) {
3219
3271
  }
3220
3272
  function Pager({ page, totalPages, onPage, disabled = false, label = "Pagination" }) {
3221
3273
  const btn = "flex h-8 min-w-8 items-center justify-center rounded-control px-2 text-[13px] transition-colors disabled:pointer-events-none disabled:opacity-30";
3222
- return /* @__PURE__ */ jsxs30("nav", { "aria-label": label, className: "flex items-center gap-1", children: [
3223
- /* @__PURE__ */ jsx32(
3274
+ return /* @__PURE__ */ jsxs31("nav", { "aria-label": label, className: "flex items-center gap-1", children: [
3275
+ /* @__PURE__ */ jsx33(
3224
3276
  "button",
3225
3277
  {
3226
3278
  type: "button",
@@ -3228,11 +3280,11 @@ function Pager({ page, totalPages, onPage, disabled = false, label = "Pagination
3228
3280
  disabled: disabled || page === 1,
3229
3281
  "aria-label": "Previous page",
3230
3282
  className: cn(btn, "text-text-secondary hover:bg-subtle hover:text-text-primary"),
3231
- children: /* @__PURE__ */ jsx32(ChevronLeft3, { size: 16 })
3283
+ children: /* @__PURE__ */ jsx33(ChevronLeft3, { size: 16 })
3232
3284
  }
3233
3285
  ),
3234
3286
  pageWindow(page, totalPages).map(
3235
- (p) => typeof p === "string" ? /* @__PURE__ */ jsx32("span", { className: "px-1 text-[13px] text-text-tertiary", children: "\u2026" }, p) : /* @__PURE__ */ jsx32(
3287
+ (p) => typeof p === "string" ? /* @__PURE__ */ jsx33("span", { className: "px-1 text-[13px] text-text-tertiary", children: "\u2026" }, p) : /* @__PURE__ */ jsx33(
3236
3288
  "button",
3237
3289
  {
3238
3290
  type: "button",
@@ -3241,14 +3293,14 @@ function Pager({ page, totalPages, onPage, disabled = false, label = "Pagination
3241
3293
  "aria-current": p === page ? "page" : void 0,
3242
3294
  className: cn(
3243
3295
  btn,
3244
- p === page ? "bg-brand-primaryAction font-semibold text-brand-onprimary" : "text-text-secondary hover:bg-subtle hover:text-text-primary"
3296
+ p === page ? "bg-subtle font-semibold text-text-primary" : "text-text-secondary hover:bg-subtle hover:text-text-primary"
3245
3297
  ),
3246
3298
  children: p.toLocaleString()
3247
3299
  },
3248
3300
  p
3249
3301
  )
3250
3302
  ),
3251
- /* @__PURE__ */ jsx32(
3303
+ /* @__PURE__ */ jsx33(
3252
3304
  "button",
3253
3305
  {
3254
3306
  type: "button",
@@ -3256,14 +3308,14 @@ function Pager({ page, totalPages, onPage, disabled = false, label = "Pagination
3256
3308
  disabled: disabled || page === totalPages,
3257
3309
  "aria-label": "Next page",
3258
3310
  className: cn(btn, "text-text-secondary hover:bg-subtle hover:text-text-primary"),
3259
- children: /* @__PURE__ */ jsx32(ChevronRight4, { size: 16 })
3311
+ children: /* @__PURE__ */ jsx33(ChevronRight4, { size: 16 })
3260
3312
  }
3261
3313
  )
3262
3314
  ] });
3263
3315
  }
3264
3316
 
3265
3317
  // src/WorkspaceAvatar.tsx
3266
- import { jsx as jsx33 } from "react/jsx-runtime";
3318
+ import { jsx as jsx34 } from "react/jsx-runtime";
3267
3319
  function workspaceInitials(name) {
3268
3320
  const words = name.trim().split(/\s+/).filter(Boolean);
3269
3321
  if (words.length === 0) return "\xB7";
@@ -3281,7 +3333,7 @@ var SIZES = {
3281
3333
  lg: "h-11 w-11 text-panel-title"
3282
3334
  };
3283
3335
  function WorkspaceAvatar({ name, size = "md" }) {
3284
- return /* @__PURE__ */ jsx33(
3336
+ return /* @__PURE__ */ jsx34(
3285
3337
  "span",
3286
3338
  {
3287
3339
  "aria-hidden": "true",
@@ -3298,11 +3350,11 @@ function WorkspaceAvatar({ name, size = "md" }) {
3298
3350
  import { useEffect as useEffect11, useRef as useRef12, useState as useState12 } from "react";
3299
3351
  import { createPortal as createPortal6 } from "react-dom";
3300
3352
  import { AlertTriangle, Check as Check7 } from "lucide-react";
3301
- import { jsx as jsx34, jsxs as jsxs31 } from "react/jsx-runtime";
3353
+ import { jsx as jsx35, jsxs as jsxs32 } from "react/jsx-runtime";
3302
3354
  var ICON = {
3303
3355
  neutral: null,
3304
- success: /* @__PURE__ */ jsx34(Check7, { size: 15, className: "shrink-0", "aria-hidden": "true" }),
3305
- warning: /* @__PURE__ */ jsx34(AlertTriangle, { size: 15, className: "shrink-0", "aria-hidden": "true" })
3356
+ success: /* @__PURE__ */ jsx35(Check7, { size: 15, className: "shrink-0", "aria-hidden": "true" }),
3357
+ warning: /* @__PURE__ */ jsx35(AlertTriangle, { size: 15, className: "shrink-0", "aria-hidden": "true" })
3306
3358
  };
3307
3359
  function Toast({ message, action, onClose, tone = "neutral", duration, className }) {
3308
3360
  const ms = duration ?? (action ? 1e4 : 5e3);
@@ -3318,7 +3370,7 @@ function Toast({ message, action, onClose, tone = "neutral", duration, className
3318
3370
  return () => window.clearTimeout(t);
3319
3371
  }, [message, ms, paused]);
3320
3372
  return createPortal6(
3321
- /* @__PURE__ */ jsxs31(
3373
+ /* @__PURE__ */ jsxs32(
3322
3374
  "div",
3323
3375
  {
3324
3376
  role: "status",
@@ -3335,7 +3387,7 @@ function Toast({ message, action, onClose, tone = "neutral", duration, className
3335
3387
  children: [
3336
3388
  ICON[tone] && // The inverse pair, not text-success / text-warning: those are tuned
3337
3389
  // for the page, and on the toast's flipped surface amber drops to 2:1.
3338
- /* @__PURE__ */ jsx34(
3390
+ /* @__PURE__ */ jsx35(
3339
3391
  "span",
3340
3392
  {
3341
3393
  className: cn(
@@ -3345,8 +3397,8 @@ function Toast({ message, action, onClose, tone = "neutral", duration, className
3345
3397
  children: ICON[tone]
3346
3398
  }
3347
3399
  ),
3348
- /* @__PURE__ */ jsx34("span", { className: "min-w-0", children: message }),
3349
- action && /* @__PURE__ */ jsx34(
3400
+ /* @__PURE__ */ jsx35("span", { className: "min-w-0", children: message }),
3401
+ action && /* @__PURE__ */ jsx35(
3350
3402
  "button",
3351
3403
  {
3352
3404
  type: "button",
@@ -3368,29 +3420,14 @@ function Toast({ message, action, onClose, tone = "neutral", duration, className
3368
3420
  }
3369
3421
 
3370
3422
  // src/Tag.tsx
3371
- import { jsx as jsx35 } from "react/jsx-runtime";
3423
+ import { jsx as jsx36 } from "react/jsx-runtime";
3372
3424
  function Tag({ children, className }) {
3373
- return /* @__PURE__ */ jsx35(
3374
- "span",
3375
- {
3376
- className: cn(
3377
- // text-micro and tertiary ink. The component used to sit at 11px in
3378
- // secondary -- a step darker than the ten hand-rolled copies the audit
3379
- // found, which had independently drifted to tertiary. Ten people
3380
- // reaching for "quieter" is worth more than the component's original
3381
- // guess: a tag names what a row IS, which is background to the row
3382
- // itself rather than part of it.
3383
- "inline-flex items-center whitespace-nowrap rounded-full bg-subtle px-2 py-0.5 text-micro font-medium text-text-tertiary",
3384
- className
3385
- ),
3386
- children
3387
- }
3388
- );
3425
+ return /* @__PURE__ */ jsx36(Badge, { kind: "category", className, children });
3389
3426
  }
3390
3427
 
3391
3428
  // src/TablePagination.tsx
3392
- import { ChevronDown as ChevronDown9, ChevronFirst, ChevronLast, ChevronLeft as ChevronLeft4, ChevronRight as ChevronRight5 } from "lucide-react";
3393
- import { jsx as jsx36, jsxs as jsxs32 } from "react/jsx-runtime";
3429
+ import { ChevronFirst, ChevronLast, ChevronLeft as ChevronLeft4, ChevronRight as ChevronRight5 } from "lucide-react";
3430
+ import { jsx as jsx37, jsxs as jsxs33 } from "react/jsx-runtime";
3394
3431
  function TablePagination({
3395
3432
  page,
3396
3433
  perPage,
@@ -3410,7 +3447,7 @@ function TablePagination({
3410
3447
  const btn = "flex h-8 min-w-8 items-center justify-center rounded-control px-2 text-[13px] transition-colors";
3411
3448
  const off = "disabled:pointer-events-none disabled:opacity-30";
3412
3449
  const stepBtn = cn(btn, "text-text-secondary hover:bg-subtle hover:text-text-primary", off);
3413
- const range = /* @__PURE__ */ jsxs32("span", { className: "text-[13px] text-text-tertiary tabular-nums", children: [
3450
+ const range = /* @__PURE__ */ jsxs33("span", { className: "text-[13px] text-text-tertiary tabular-nums", children: [
3414
3451
  rangeStart.toLocaleString(),
3415
3452
  " \u2013 ",
3416
3453
  rangeEnd.toLocaleString(),
@@ -3419,37 +3456,30 @@ function TablePagination({
3419
3456
  " ",
3420
3457
  itemLabel
3421
3458
  ] });
3422
- return /* @__PURE__ */ jsxs32("div", { className: cn("flex flex-wrap items-center justify-between gap-x-4 gap-y-2", className), "data-testid": testIdPrefix, children: [
3423
- onPerPageChange ? /* @__PURE__ */ jsxs32("label", { className: "flex items-center gap-2 text-[13px] text-text-secondary", children: [
3424
- /* @__PURE__ */ jsxs32("span", { className: "relative", children: [
3425
- /* @__PURE__ */ jsx36(
3426
- "select",
3427
- {
3428
- value: perPage,
3429
- onChange: (e) => onPerPageChange(Number(e.target.value)),
3430
- disabled,
3431
- "aria-label": "Items per page",
3432
- "data-testid": testIdPrefix && `${testIdPrefix}-per-page`,
3433
- className: cn(
3434
- "appearance-none rounded-control border border-border-strong bg-input py-1 pl-2.5 pr-7 text-[13px] font-medium text-text-primary focus:outline focus:outline-2 focus:outline-border-focus",
3435
- off
3436
- ),
3437
- children: perPageOptions.map((n) => /* @__PURE__ */ jsx36("option", { value: n, children: n }, n))
3438
- }
3439
- ),
3440
- /* @__PURE__ */ jsx36(
3441
- ChevronDown9,
3442
- {
3443
- size: 13,
3444
- "aria-hidden": "true",
3445
- className: "pointer-events-none absolute right-2 top-1/2 -translate-y-1/2 text-text-secondary"
3446
- }
3447
- )
3448
- ] }),
3449
- "items per page"
3450
- ] }) : range,
3451
- /* @__PURE__ */ jsxs32("nav", { className: "flex items-center gap-1", "aria-label": "Pagination", children: [
3452
- /* @__PURE__ */ jsx36(
3459
+ return /* @__PURE__ */ jsxs33("div", { className: cn("flex flex-wrap items-center justify-between gap-x-4 gap-y-2", className), "data-testid": testIdPrefix, children: [
3460
+ /* @__PURE__ */ jsxs33(
3461
+ "div",
3462
+ {
3463
+ className: cn("flex items-center gap-2 text-[13px] text-text-secondary", !onPerPageChange && "invisible"),
3464
+ children: [
3465
+ /* @__PURE__ */ jsx37(
3466
+ SelectFilter,
3467
+ {
3468
+ size: "sm",
3469
+ caption: "Items per page",
3470
+ value: String(perPage),
3471
+ options: perPageOptions.map(String),
3472
+ onChange: (v) => onPerPageChange?.(Number(v)),
3473
+ disabled,
3474
+ testIdPrefix: testIdPrefix && `${testIdPrefix}-per-page`
3475
+ }
3476
+ ),
3477
+ "items per page"
3478
+ ]
3479
+ }
3480
+ ),
3481
+ /* @__PURE__ */ jsxs33("nav", { className: "flex items-center gap-1", "aria-label": "Pagination", children: [
3482
+ /* @__PURE__ */ jsx37(
3453
3483
  "button",
3454
3484
  {
3455
3485
  type: "button",
@@ -3458,10 +3488,10 @@ function TablePagination({
3458
3488
  "aria-label": "First page",
3459
3489
  "data-testid": testIdPrefix && `${testIdPrefix}-first`,
3460
3490
  className: stepBtn,
3461
- children: /* @__PURE__ */ jsx36(ChevronFirst, { size: 16, "aria-hidden": "true" })
3491
+ children: /* @__PURE__ */ jsx37(ChevronFirst, { size: 16, "aria-hidden": "true" })
3462
3492
  }
3463
3493
  ),
3464
- /* @__PURE__ */ jsx36(
3494
+ /* @__PURE__ */ jsx37(
3465
3495
  "button",
3466
3496
  {
3467
3497
  type: "button",
@@ -3470,11 +3500,11 @@ function TablePagination({
3470
3500
  "aria-label": "Previous page",
3471
3501
  "data-testid": testIdPrefix && `${testIdPrefix}-prev`,
3472
3502
  className: stepBtn,
3473
- children: /* @__PURE__ */ jsx36(ChevronLeft4, { size: 16, "aria-hidden": "true" })
3503
+ children: /* @__PURE__ */ jsx37(ChevronLeft4, { size: 16, "aria-hidden": "true" })
3474
3504
  }
3475
3505
  ),
3476
3506
  pageWindow(current, totalPages).map(
3477
- (p) => typeof p === "string" ? /* @__PURE__ */ jsx36("span", { className: "px-1 text-[13px] text-text-tertiary", children: "\u2026" }, p) : /* @__PURE__ */ jsx36(
3507
+ (p) => typeof p === "string" ? /* @__PURE__ */ jsx37("span", { className: "px-1 text-[13px] text-text-tertiary", children: "\u2026" }, p) : /* @__PURE__ */ jsx37(
3478
3508
  "button",
3479
3509
  {
3480
3510
  type: "button",
@@ -3485,14 +3515,14 @@ function TablePagination({
3485
3515
  className: cn(
3486
3516
  btn,
3487
3517
  off,
3488
- p === current ? "bg-brand-primaryAction font-semibold text-brand-onprimary" : "text-text-secondary hover:bg-subtle hover:text-text-primary"
3518
+ p === current ? "bg-subtle font-semibold text-text-primary" : "text-text-secondary hover:bg-subtle hover:text-text-primary"
3489
3519
  ),
3490
3520
  children: p.toLocaleString()
3491
3521
  },
3492
3522
  p
3493
3523
  )
3494
3524
  ),
3495
- /* @__PURE__ */ jsx36(
3525
+ /* @__PURE__ */ jsx37(
3496
3526
  "button",
3497
3527
  {
3498
3528
  type: "button",
@@ -3501,10 +3531,10 @@ function TablePagination({
3501
3531
  "aria-label": "Next page",
3502
3532
  "data-testid": testIdPrefix && `${testIdPrefix}-next`,
3503
3533
  className: stepBtn,
3504
- children: /* @__PURE__ */ jsx36(ChevronRight5, { size: 16, "aria-hidden": "true" })
3534
+ children: /* @__PURE__ */ jsx37(ChevronRight5, { size: 16, "aria-hidden": "true" })
3505
3535
  }
3506
3536
  ),
3507
- /* @__PURE__ */ jsx36(
3537
+ /* @__PURE__ */ jsx37(
3508
3538
  "button",
3509
3539
  {
3510
3540
  type: "button",
@@ -3513,18 +3543,18 @@ function TablePagination({
3513
3543
  "aria-label": "Last page",
3514
3544
  "data-testid": testIdPrefix && `${testIdPrefix}-last`,
3515
3545
  className: stepBtn,
3516
- children: /* @__PURE__ */ jsx36(ChevronLast, { size: 16, "aria-hidden": "true" })
3546
+ children: /* @__PURE__ */ jsx37(ChevronLast, { size: 16, "aria-hidden": "true" })
3517
3547
  }
3518
3548
  )
3519
3549
  ] }),
3520
- onPerPageChange && range
3550
+ range
3521
3551
  ] });
3522
3552
  }
3523
3553
 
3524
3554
  // src/DateRangePicker.tsx
3525
3555
  import { useEffect as useEffect12, useMemo as useMemo4, useRef as useRef13, useState as useState13 } from "react";
3526
- import { ChevronDown as ChevronDown10 } from "lucide-react";
3527
- import { jsx as jsx37, jsxs as jsxs33 } from "react/jsx-runtime";
3556
+ import { ChevronDown as ChevronDown9 } from "lucide-react";
3557
+ import { jsx as jsx38, jsxs as jsxs34 } from "react/jsx-runtime";
3528
3558
  var MONTH_ABBR = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
3529
3559
  var QUARTER_ABBR = ["Q1", "Q2", "Q3", "Q4"];
3530
3560
  var PRESETS = ["Rolling 3 months", "Rolling 6 months", "Rolling 12 months"];
@@ -3560,7 +3590,7 @@ function spanLabel(label, today) {
3560
3590
  return `${fmtDate(s)} \u2013 ${fmtDate(e)}`;
3561
3591
  }
3562
3592
  function MiniSelect({ value, onChange, options }) {
3563
- return /* @__PURE__ */ jsx37(
3593
+ return /* @__PURE__ */ jsx38(
3564
3594
  "select",
3565
3595
  {
3566
3596
  value: String(value),
@@ -3569,7 +3599,7 @@ function MiniSelect({ value, onChange, options }) {
3569
3599
  if (opt) onChange(opt.value);
3570
3600
  },
3571
3601
  className: "rounded-control border border-border-strong bg-input px-1.5 py-1 text-[12px] text-text-primary focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
3572
- children: options.map((o) => /* @__PURE__ */ jsx37("option", { value: String(o.value), children: o.label }, String(o.value)))
3602
+ children: options.map((o) => /* @__PURE__ */ jsx38("option", { value: String(o.value), children: o.label }, String(o.value)))
3573
3603
  }
3574
3604
  );
3575
3605
  }
@@ -3630,8 +3660,8 @@ function DateRangePicker({
3630
3660
  if (showFooter) setDraft(label);
3631
3661
  else commit(label);
3632
3662
  };
3633
- return /* @__PURE__ */ jsxs33("div", { className: "relative", ref, children: [
3634
- /* @__PURE__ */ jsxs33(
3663
+ return /* @__PURE__ */ jsxs34("div", { className: "relative", ref, children: [
3664
+ /* @__PURE__ */ jsxs34(
3635
3665
  "button",
3636
3666
  {
3637
3667
  type: "button",
@@ -3640,16 +3670,16 @@ function DateRangePicker({
3640
3670
  "aria-haspopup": "listbox",
3641
3671
  className: chipTriggerClass(),
3642
3672
  children: [
3643
- /* @__PURE__ */ jsxs33("span", { className: "flex flex-col gap-1 text-left leading-none", children: [
3644
- /* @__PURE__ */ jsx37("span", { className: "text-control-caption text-text-tertiary", children: spanLabel(value, end) }),
3645
- /* @__PURE__ */ jsx37("span", { className: "text-[12px] font-medium text-text-primary", children: value })
3673
+ /* @__PURE__ */ jsxs34("span", { className: "flex flex-col gap-1 text-left leading-none", children: [
3674
+ /* @__PURE__ */ jsx38("span", { className: "text-control-caption text-text-tertiary", children: spanLabel(value, end) }),
3675
+ /* @__PURE__ */ jsx38("span", { className: "text-[12px] font-medium text-text-primary", children: value })
3646
3676
  ] }),
3647
- /* @__PURE__ */ jsx37(ChevronDown10, { size: 14, "aria-hidden": "true", className: cn("shrink-0 text-text-secondary transition-transform", open && "rotate-180") })
3677
+ /* @__PURE__ */ jsx38(ChevronDown9, { size: 14, "aria-hidden": "true", className: cn("shrink-0 text-text-secondary transition-transform", open && "rotate-180") })
3648
3678
  ]
3649
3679
  }
3650
3680
  ),
3651
- open && /* @__PURE__ */ jsxs33("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: [
3652
- presets.map((p) => /* @__PURE__ */ jsx37(
3681
+ open && /* @__PURE__ */ jsxs34("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: [
3682
+ presets.map((p) => /* @__PURE__ */ jsx38(
3653
3683
  "button",
3654
3684
  {
3655
3685
  type: "button",
@@ -3659,26 +3689,26 @@ function DateRangePicker({
3659
3689
  },
3660
3690
  p
3661
3691
  )),
3662
- /* @__PURE__ */ jsxs33("div", { className: "mt-1 border-t border-border-default px-3 pb-2 pt-2", children: [
3663
- /* @__PURE__ */ jsx37("div", { className: "text-[13px] font-semibold text-text-primary", children: "Custom range" }),
3664
- /* @__PURE__ */ jsxs33("div", { className: "mt-2 flex flex-col gap-2", children: [
3665
- /* @__PURE__ */ jsxs33("label", { className: "flex items-center justify-between gap-2 text-[12px] text-text-secondary", children: [
3692
+ /* @__PURE__ */ jsxs34("div", { className: "mt-1 border-t border-border-default px-3 pb-2 pt-2", children: [
3693
+ /* @__PURE__ */ jsx38("div", { className: "text-[13px] font-semibold text-text-primary", children: "Custom range" }),
3694
+ /* @__PURE__ */ jsxs34("div", { className: "mt-2 flex flex-col gap-2", children: [
3695
+ /* @__PURE__ */ jsxs34("label", { className: "flex items-center justify-between gap-2 text-[12px] text-text-secondary", children: [
3666
3696
  "From",
3667
- /* @__PURE__ */ jsxs33("span", { className: "flex gap-1", children: [
3668
- granularity === "month" && /* @__PURE__ */ jsx37(MiniSelect, { value: fromMo, onChange: setFromMo, options: MONTH_ABBR.map((mm, i) => ({ label: mm, value: i })) }),
3669
- granularity === "quarter" && /* @__PURE__ */ jsx37(MiniSelect, { value: fromQ, onChange: setFromQ, options: QUARTER_ABBR.map((qq, i) => ({ label: qq, value: i })) }),
3670
- /* @__PURE__ */ jsx37(MiniSelect, { value: fromYr, onChange: setFromYr, options: yearOptions.map((y) => ({ label: String(y), value: y })) })
3697
+ /* @__PURE__ */ jsxs34("span", { className: "flex gap-1", children: [
3698
+ granularity === "month" && /* @__PURE__ */ jsx38(MiniSelect, { value: fromMo, onChange: setFromMo, options: MONTH_ABBR.map((mm, i) => ({ label: mm, value: i })) }),
3699
+ granularity === "quarter" && /* @__PURE__ */ jsx38(MiniSelect, { value: fromQ, onChange: setFromQ, options: QUARTER_ABBR.map((qq, i) => ({ label: qq, value: i })) }),
3700
+ /* @__PURE__ */ jsx38(MiniSelect, { value: fromYr, onChange: setFromYr, options: yearOptions.map((y) => ({ label: String(y), value: y })) })
3671
3701
  ] })
3672
3702
  ] }),
3673
- /* @__PURE__ */ jsxs33("label", { className: "flex items-center justify-between gap-2 text-[12px] text-text-secondary", children: [
3703
+ /* @__PURE__ */ jsxs34("label", { className: "flex items-center justify-between gap-2 text-[12px] text-text-secondary", children: [
3674
3704
  "To",
3675
- /* @__PURE__ */ jsxs33("span", { className: "flex gap-1", children: [
3676
- granularity === "month" && /* @__PURE__ */ jsx37(MiniSelect, { value: toMo, onChange: setToMo, options: MONTH_ABBR.map((mm, i) => ({ label: mm, value: i })) }),
3677
- granularity === "quarter" && /* @__PURE__ */ jsx37(MiniSelect, { value: toQ, onChange: setToQ, options: QUARTER_ABBR.map((qq, i) => ({ label: qq, value: i })) }),
3678
- /* @__PURE__ */ jsx37(MiniSelect, { value: toYr, onChange: setToYr, options: yearOptions.map((y) => ({ label: String(y), value: y })) })
3705
+ /* @__PURE__ */ jsxs34("span", { className: "flex gap-1", children: [
3706
+ granularity === "month" && /* @__PURE__ */ jsx38(MiniSelect, { value: toMo, onChange: setToMo, options: MONTH_ABBR.map((mm, i) => ({ label: mm, value: i })) }),
3707
+ granularity === "quarter" && /* @__PURE__ */ jsx38(MiniSelect, { value: toQ, onChange: setToQ, options: QUARTER_ABBR.map((qq, i) => ({ label: qq, value: i })) }),
3708
+ /* @__PURE__ */ jsx38(MiniSelect, { value: toYr, onChange: setToYr, options: yearOptions.map((y) => ({ label: String(y), value: y })) })
3679
3709
  ] })
3680
3710
  ] }),
3681
- /* @__PURE__ */ jsx37(
3711
+ /* @__PURE__ */ jsx38(
3682
3712
  "button",
3683
3713
  {
3684
3714
  type: "button",
@@ -3690,15 +3720,15 @@ function DateRangePicker({
3690
3720
  )
3691
3721
  ] })
3692
3722
  ] }),
3693
- showFooter && /* @__PURE__ */ jsx37(FilterDropdownFooter, { onApply: () => commit(draft) })
3723
+ showFooter && /* @__PURE__ */ jsx38(FilterDropdownFooter, { onApply: () => commit(draft) })
3694
3724
  ] })
3695
3725
  ] });
3696
3726
  }
3697
3727
 
3698
3728
  // src/MultiSelectFilter.tsx
3699
3729
  import { useCallback as useCallback4, useEffect as useEffect13, useRef as useRef14, useState as useState14 } from "react";
3700
- import { ChevronDown as ChevronDown11, Check as Check8, Minus as Minus2, Search as Search5, X as X5 } from "lucide-react";
3701
- import { jsx as jsx38, jsxs as jsxs34 } from "react/jsx-runtime";
3730
+ import { ChevronDown as ChevronDown10, Check as Check8, Minus as Minus2, Search as Search5, X as X5 } from "lucide-react";
3731
+ import { Fragment as Fragment5, jsx as jsx39, jsxs as jsxs35 } from "react/jsx-runtime";
3702
3732
  function MultiSelectFilter({
3703
3733
  caption,
3704
3734
  options = [],
@@ -3718,7 +3748,10 @@ function MultiSelectFilter({
3718
3748
  clearValue = [],
3719
3749
  menuWidthClass = "w-60",
3720
3750
  plainParent = false,
3721
- fullWidth = false
3751
+ fullWidth = false,
3752
+ loading = false,
3753
+ error = false,
3754
+ onRetry
3722
3755
  }) {
3723
3756
  const groupLeaves = (g) => g.children.length ? g.children : [{ id: g.id, label: g.label }];
3724
3757
  const leafOptions = groups ? groups.flatMap(groupLeaves) : options;
@@ -3789,8 +3822,8 @@ function MultiSelectFilter({
3789
3822
  const kids = live.filter((c) => c.label.toLowerCase().includes(ql));
3790
3823
  return kids.length ? { ...g, children: kids } : null;
3791
3824
  }).filter((g) => g !== null) : [];
3792
- return /* @__PURE__ */ jsxs34("div", { className: cn("relative", fullWidth && "w-full"), ref, children: [
3793
- /* @__PURE__ */ jsxs34(
3825
+ return /* @__PURE__ */ jsxs35("div", { className: cn("relative", fullWidth && "w-full"), ref, children: [
3826
+ /* @__PURE__ */ jsxs35(
3794
3827
  "button",
3795
3828
  {
3796
3829
  type: "button",
@@ -3798,9 +3831,9 @@ function MultiSelectFilter({
3798
3831
  "aria-expanded": open,
3799
3832
  className: cn(chipTriggerClass(variant), fullWidth && "w-full justify-between"),
3800
3833
  children: [
3801
- /* @__PURE__ */ jsx38(ChipContent, { caption, value, icon }),
3802
- /* @__PURE__ */ jsx38(
3803
- ChevronDown11,
3834
+ /* @__PURE__ */ jsx39(ChipContent, { caption, value, icon }),
3835
+ /* @__PURE__ */ jsx39(
3836
+ ChevronDown10,
3804
3837
  {
3805
3838
  size: 14,
3806
3839
  "aria-hidden": "true",
@@ -3810,7 +3843,7 @@ function MultiSelectFilter({
3810
3843
  ]
3811
3844
  }
3812
3845
  ),
3813
- open && /* @__PURE__ */ jsxs34(
3846
+ open && /* @__PURE__ */ jsx39(
3814
3847
  "div",
3815
3848
  {
3816
3849
  className: cn(
@@ -3820,10 +3853,10 @@ function MultiSelectFilter({
3820
3853
  ),
3821
3854
  role: "dialog",
3822
3855
  "aria-label": caption,
3823
- children: [
3824
- searchable && /* @__PURE__ */ jsx38("div", { className: "border-b border-border-default p-2", children: /* @__PURE__ */ jsxs34("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: [
3825
- /* @__PURE__ */ jsx38(Search5, { size: 14, className: "text-text-secondary", "aria-hidden": "true" }),
3826
- /* @__PURE__ */ jsx38(
3856
+ children: loading ? /* @__PURE__ */ jsx39(MenuLoading, {}) : error ? /* @__PURE__ */ jsx39(MenuError, { onRetry }) : /* @__PURE__ */ jsxs35(Fragment5, { children: [
3857
+ searchable && /* @__PURE__ */ jsx39("div", { className: "border-b border-border-default p-2", children: /* @__PURE__ */ jsxs35("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: [
3858
+ /* @__PURE__ */ jsx39(Search5, { size: 14, className: "text-text-secondary", "aria-hidden": "true" }),
3859
+ /* @__PURE__ */ jsx39(
3827
3860
  "input",
3828
3861
  {
3829
3862
  type: "text",
@@ -3833,37 +3866,37 @@ function MultiSelectFilter({
3833
3866
  className: "h-full flex-1 bg-transparent text-[13px] outline-hidden placeholder:text-text-tertiary"
3834
3867
  }
3835
3868
  ),
3836
- q && /* @__PURE__ */ jsx38("button", { type: "button", onClick: () => setQ(""), "aria-label": "Clear search", className: "text-text-tertiary hover:text-text-primary", children: /* @__PURE__ */ jsx38(X5, { size: 13 }) })
3869
+ q && /* @__PURE__ */ jsx39("button", { type: "button", onClick: () => setQ(""), "aria-label": "Clear search", className: "text-text-tertiary hover:text-text-primary", children: /* @__PURE__ */ jsx39(X5, { size: 13 }) })
3837
3870
  ] }) }),
3838
- /* @__PURE__ */ jsxs34("div", { className: "max-h-[280px] overflow-y-auto p-1", children: [
3871
+ /* @__PURE__ */ jsxs35("div", { className: "max-h-[280px] overflow-y-auto p-1", children: [
3839
3872
  groups ? visibleGroups.map((g) => {
3840
3873
  const state = groupState(g);
3841
- return /* @__PURE__ */ jsxs34("div", { children: [
3842
- /* @__PURE__ */ jsxs34(
3874
+ return /* @__PURE__ */ jsxs35("div", { children: [
3875
+ /* @__PURE__ */ jsxs35(
3843
3876
  "button",
3844
3877
  {
3845
3878
  type: "button",
3846
3879
  onClick: () => toggleGroup(g),
3847
3880
  className: "flex w-full items-center gap-2.5 rounded-control px-2 py-2 text-left transition-colors hover:bg-subtle",
3848
3881
  children: [
3849
- /* @__PURE__ */ jsx38(TriCheck, { state }),
3850
- /* @__PURE__ */ jsx38("span", { className: cn("flex-1 text-[14px] text-text-primary", !plainParent && "font-semibold"), children: g.label }),
3851
- counts && /* @__PURE__ */ jsx38(OptionCount, { n: countFor(g.id) })
3882
+ /* @__PURE__ */ jsx39(TriCheck, { state }),
3883
+ /* @__PURE__ */ jsx39("span", { className: cn("flex-1 text-[14px] text-text-primary", !plainParent && "font-semibold"), children: g.label }),
3884
+ counts && /* @__PURE__ */ jsx39(OptionCount, { n: countFor(g.id) })
3852
3885
  ]
3853
3886
  }
3854
3887
  ),
3855
3888
  g.children.map((c) => {
3856
3889
  const checked = draft.includes(c.id);
3857
- return /* @__PURE__ */ jsxs34(
3890
+ return /* @__PURE__ */ jsxs35(
3858
3891
  "button",
3859
3892
  {
3860
3893
  type: "button",
3861
3894
  onClick: () => toggle(c.id),
3862
3895
  className: "flex w-full items-center gap-2.5 rounded-control py-2 pl-9 pr-2 text-left transition-colors hover:bg-subtle",
3863
3896
  children: [
3864
- /* @__PURE__ */ jsx38(TriCheck, { state: checked ? "all" : "none" }),
3865
- /* @__PURE__ */ jsx38("span", { className: "flex-1 text-[14px] text-text-primary", children: c.label }),
3866
- counts && /* @__PURE__ */ jsx38(OptionCount, { n: countFor(c.id) })
3897
+ /* @__PURE__ */ jsx39(TriCheck, { state: checked ? "all" : "none" }),
3898
+ /* @__PURE__ */ jsx39("span", { className: "flex-1 text-[14px] text-text-primary", children: c.label }),
3899
+ counts && /* @__PURE__ */ jsx39(OptionCount, { n: countFor(c.id) })
3867
3900
  ]
3868
3901
  },
3869
3902
  c.id
@@ -3872,33 +3905,33 @@ function MultiSelectFilter({
3872
3905
  ] }, g.id);
3873
3906
  }) : items.map((o) => {
3874
3907
  const checked = draft.includes(o.id);
3875
- return /* @__PURE__ */ jsxs34(
3908
+ return /* @__PURE__ */ jsxs35(
3876
3909
  "button",
3877
3910
  {
3878
3911
  type: "button",
3879
3912
  onClick: () => toggle(o.id),
3880
3913
  className: "flex w-full items-center gap-2.5 rounded-control px-2 py-2 text-left transition-colors hover:bg-subtle",
3881
3914
  children: [
3882
- /* @__PURE__ */ jsx38(
3915
+ /* @__PURE__ */ jsx39(
3883
3916
  "span",
3884
3917
  {
3885
3918
  className: cn(
3886
3919
  "flex h-[18px] w-[18px] shrink-0 items-center justify-center rounded-[5px] border transition-colors",
3887
3920
  checked ? "border-transparent bg-brand-primaryAction text-brand-onprimary" : "border-border-interactive bg-input"
3888
3921
  ),
3889
- children: checked && /* @__PURE__ */ jsx38(Check8, { size: 13, strokeWidth: 3 })
3922
+ children: checked && /* @__PURE__ */ jsx39(Check8, { size: 13, strokeWidth: 3 })
3890
3923
  }
3891
3924
  ),
3892
- /* @__PURE__ */ jsx38("span", { className: "flex-1 text-[14px] text-text-primary", children: o.label }),
3893
- counts && /* @__PURE__ */ jsx38(OptionCount, { n: countFor(o.id) })
3925
+ /* @__PURE__ */ jsx39("span", { className: "flex-1 text-[14px] text-text-primary", children: o.label }),
3926
+ counts && /* @__PURE__ */ jsx39(OptionCount, { n: countFor(o.id) })
3894
3927
  ]
3895
3928
  },
3896
3929
  o.id
3897
3930
  );
3898
3931
  }),
3899
- (groups && !visibleGroups.length || !groups && !items.length) && /* @__PURE__ */ jsx38("div", { className: "py-6 text-center text-[13px] text-text-tertiary", children: "No matches." })
3932
+ (groups && !visibleGroups.length || !groups && !items.length) && /* @__PURE__ */ jsx39("div", { className: "py-6 text-center text-[13px] text-text-tertiary", children: "No matches." })
3900
3933
  ] }),
3901
- showFooter ? /* @__PURE__ */ jsx38(FilterDropdownFooter, { onClear: () => setDraft(clearValue), onApply: apply }) : min === 0 && draft.length > 0 && /* @__PURE__ */ jsx38("div", { className: "border-t border-border-default p-2", children: /* @__PURE__ */ jsxs34(
3934
+ showFooter ? /* @__PURE__ */ jsx39(FilterDropdownFooter, { onClear: () => setDraft(clearValue), onApply: apply }) : min === 0 && draft.length > 0 && /* @__PURE__ */ jsx39("div", { className: "border-t border-border-default p-2", children: /* @__PURE__ */ jsxs35(
3902
3935
  "button",
3903
3936
  {
3904
3937
  type: "button",
@@ -3910,14 +3943,14 @@ function MultiSelectFilter({
3910
3943
  ]
3911
3944
  }
3912
3945
  ) })
3913
- ]
3946
+ ] })
3914
3947
  }
3915
3948
  )
3916
3949
  ] });
3917
3950
  }
3918
3951
  function TriCheck({ state }) {
3919
3952
  const filled = state !== "none";
3920
- return /* @__PURE__ */ jsxs34(
3953
+ return /* @__PURE__ */ jsxs35(
3921
3954
  "span",
3922
3955
  {
3923
3956
  className: cn(
@@ -3925,14 +3958,14 @@ function TriCheck({ state }) {
3925
3958
  filled ? "border-transparent bg-brand-primaryAction text-brand-onprimary" : "border-border-interactive bg-input"
3926
3959
  ),
3927
3960
  children: [
3928
- state === "all" && /* @__PURE__ */ jsx38(Check8, { size: 13, strokeWidth: 3 }),
3929
- state === "some" && /* @__PURE__ */ jsx38(Minus2, { size: 13, strokeWidth: 3 })
3961
+ state === "all" && /* @__PURE__ */ jsx39(Check8, { size: 13, strokeWidth: 3 }),
3962
+ state === "some" && /* @__PURE__ */ jsx39(Minus2, { size: 13, strokeWidth: 3 })
3930
3963
  ]
3931
3964
  }
3932
3965
  );
3933
3966
  }
3934
3967
  function OptionCount({ n }) {
3935
- return /* @__PURE__ */ jsxs34("span", { className: "shrink-0 text-[12px] tabular-nums text-text-tertiary", children: [
3968
+ return /* @__PURE__ */ jsxs35("span", { className: "shrink-0 text-[12px] tabular-nums text-text-tertiary", children: [
3936
3969
  "(",
3937
3970
  n.toLocaleString(),
3938
3971
  ")"
@@ -3940,7 +3973,7 @@ function OptionCount({ n }) {
3940
3973
  }
3941
3974
 
3942
3975
  // src/Toggle.tsx
3943
- import { jsx as jsx39 } from "react/jsx-runtime";
3976
+ import { jsx as jsx40 } from "react/jsx-runtime";
3944
3977
  var SIZES2 = {
3945
3978
  sm: { track: "h-5 w-9", knob: "h-4 w-4", on: "translate-x-[18px]" },
3946
3979
  md: { track: "h-6 w-11", knob: "h-5 w-5", on: "translate-x-[22px]" }
@@ -3948,7 +3981,7 @@ var SIZES2 = {
3948
3981
  var OFF_TRACK = "color-mix(in srgb, var(--mr-color-border-interactive) 70%, var(--mr-color-text-secondary))";
3949
3982
  function Toggle({ checked, onChange, label, size = "md", disabled, className, testIdPrefix }) {
3950
3983
  const s = SIZES2[size];
3951
- return /* @__PURE__ */ jsx39(
3984
+ return /* @__PURE__ */ jsx40(
3952
3985
  "button",
3953
3986
  {
3954
3987
  type: "button",
@@ -3966,7 +3999,7 @@ function Toggle({ checked, onChange, label, size = "md", disabled, className, te
3966
3999
  disabled && "cursor-not-allowed opacity-50",
3967
4000
  className
3968
4001
  ),
3969
- children: /* @__PURE__ */ jsx39(
4002
+ children: /* @__PURE__ */ jsx40(
3970
4003
  "span",
3971
4004
  {
3972
4005
  className: cn(
@@ -3983,20 +4016,20 @@ function Toggle({ checked, onChange, label, size = "md", disabled, className, te
3983
4016
  // src/AISpark.tsx
3984
4017
  import { useId as useId5 } from "react";
3985
4018
  import { Sparkles } from "lucide-react";
3986
- import { Fragment as Fragment5, jsx as jsx40, jsxs as jsxs35 } from "react/jsx-runtime";
4019
+ import { Fragment as Fragment6, jsx as jsx41, jsxs as jsxs36 } from "react/jsx-runtime";
3987
4020
  function AISpark({ size = 16, className }) {
3988
4021
  const id = useId5();
3989
- return /* @__PURE__ */ jsxs35(Fragment5, { children: [
3990
- /* @__PURE__ */ jsx40("svg", { width: "0", height: "0", "aria-hidden": "true", style: { position: "absolute" }, children: /* @__PURE__ */ jsx40("defs", { children: /* @__PURE__ */ jsxs35("linearGradient", { id, x1: "0", y1: "0", x2: "1", y2: "1", children: [
3991
- /* @__PURE__ */ jsx40("stop", { offset: "0%", stopColor: "var(--mr-color-brand-primary)" }),
3992
- /* @__PURE__ */ jsx40("stop", { offset: "100%", className: "[stop-color:#9474ff] in-data-[theme=dark]:[stop-color:#a488ff]" })
4022
+ return /* @__PURE__ */ jsxs36(Fragment6, { children: [
4023
+ /* @__PURE__ */ jsx41("svg", { width: "0", height: "0", "aria-hidden": "true", style: { position: "absolute" }, children: /* @__PURE__ */ jsx41("defs", { children: /* @__PURE__ */ jsxs36("linearGradient", { id, x1: "0", y1: "0", x2: "1", y2: "1", children: [
4024
+ /* @__PURE__ */ jsx41("stop", { offset: "0%", stopColor: "var(--mr-color-brand-primary)" }),
4025
+ /* @__PURE__ */ jsx41("stop", { offset: "100%", className: "[stop-color:#9474ff] in-data-[theme=dark]:[stop-color:#a488ff]" })
3993
4026
  ] }) }) }),
3994
- /* @__PURE__ */ jsx40(Sparkles, { size, stroke: `url(#${id})`, className, "aria-hidden": "true" })
4027
+ /* @__PURE__ */ jsx41(Sparkles, { size, stroke: `url(#${id})`, className, "aria-hidden": "true" })
3995
4028
  ] });
3996
4029
  }
3997
4030
 
3998
4031
  // src/Freshness.tsx
3999
- import { jsx as jsx41 } from "react/jsx-runtime";
4032
+ import { jsx as jsx42 } from "react/jsx-runtime";
4000
4033
  var dotColor = {
4001
4034
  fresh: "bg-status-success",
4002
4035
  recent: "bg-status-warning",
@@ -4008,7 +4041,7 @@ var srLabel = {
4008
4041
  stale: "Older than a day"
4009
4042
  };
4010
4043
  function Freshness({ level }) {
4011
- return /* @__PURE__ */ jsx41(
4044
+ return /* @__PURE__ */ jsx42(
4012
4045
  "span",
4013
4046
  {
4014
4047
  className: cn("inline-block h-1.5 w-1.5 shrink-0 rounded-full", dotColor[level]),
@@ -4019,39 +4052,39 @@ function Freshness({ level }) {
4019
4052
  }
4020
4053
 
4021
4054
  // src/SectionHeading.tsx
4022
- import { jsx as jsx42, jsxs as jsxs36 } from "react/jsx-runtime";
4055
+ import { jsx as jsx43, jsxs as jsxs37 } from "react/jsx-runtime";
4023
4056
  function SectionHeading({ title, description, actions, as: Tag2 = "h2", id, className }) {
4024
- return /* @__PURE__ */ jsxs36("div", { className: cn("flex flex-wrap items-end justify-between gap-x-4 gap-y-2", className), children: [
4025
- /* @__PURE__ */ jsxs36("div", { className: "min-w-0", children: [
4026
- /* @__PURE__ */ jsx42(Tag2, { id, className: "text-base font-semibold text-text-primary", children: title }),
4027
- description && /* @__PURE__ */ jsx42("p", { className: "mt-0.5 text-dense text-text-secondary", children: description })
4057
+ return /* @__PURE__ */ jsxs37("div", { className: cn("flex flex-wrap items-end justify-between gap-x-4 gap-y-2", className), children: [
4058
+ /* @__PURE__ */ jsxs37("div", { className: "min-w-0", children: [
4059
+ /* @__PURE__ */ jsx43(Tag2, { id, className: "text-base font-semibold text-text-primary", children: title }),
4060
+ description && /* @__PURE__ */ jsx43("p", { className: "mt-0.5 text-dense text-text-secondary", children: description })
4028
4061
  ] }),
4029
- actions && /* @__PURE__ */ jsx42("div", { className: "flex shrink-0 items-center gap-2", children: actions })
4062
+ actions && /* @__PURE__ */ jsx43("div", { className: "flex shrink-0 items-center gap-2", children: actions })
4030
4063
  ] });
4031
4064
  }
4032
4065
 
4033
4066
  // src/PageHeader.tsx
4034
4067
  import { ArrowLeft } from "lucide-react";
4035
- import { jsx as jsx43, jsxs as jsxs37 } from "react/jsx-runtime";
4068
+ import { jsx as jsx44, jsxs as jsxs38 } from "react/jsx-runtime";
4036
4069
  function PageHeader({ title, description, actions, back, className }) {
4037
- return /* @__PURE__ */ jsxs37("header", { className: cn("flex flex-wrap items-center justify-between gap-x-6 gap-y-3", className), children: [
4038
- /* @__PURE__ */ jsxs37("div", { className: "min-w-0", children: [
4039
- back && /* @__PURE__ */ jsxs37(
4070
+ return /* @__PURE__ */ jsxs38("header", { className: cn("flex flex-wrap items-center justify-between gap-x-6 gap-y-3", className), children: [
4071
+ /* @__PURE__ */ jsxs38("div", { className: "min-w-0", children: [
4072
+ back && /* @__PURE__ */ jsxs38(
4040
4073
  "a",
4041
4074
  {
4042
4075
  href: back.href ?? "#",
4043
4076
  onClick: back.onClick,
4044
4077
  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-2 focus-visible:outline-border-focus",
4045
4078
  children: [
4046
- /* @__PURE__ */ jsx43(ArrowLeft, { size: 13, "aria-hidden": "true" }),
4079
+ /* @__PURE__ */ jsx44(ArrowLeft, { size: 13, "aria-hidden": "true" }),
4047
4080
  back.label
4048
4081
  ]
4049
4082
  }
4050
4083
  ),
4051
- /* @__PURE__ */ jsx43("h1", { className: "text-xl font-semibold tracking-tight text-text-primary", children: title }),
4052
- description && /* @__PURE__ */ jsx43("p", { className: "mt-0.5 max-w-2xl text-sm text-text-secondary", children: description })
4084
+ /* @__PURE__ */ jsx44("h1", { className: "text-xl font-semibold tracking-tight text-text-primary", children: title }),
4085
+ description && /* @__PURE__ */ jsx44("p", { className: "mt-0.5 max-w-2xl text-sm text-text-secondary", children: description })
4053
4086
  ] }),
4054
- actions && /* @__PURE__ */ jsx43("div", { className: "flex shrink-0 items-center gap-2", children: actions })
4087
+ actions && /* @__PURE__ */ jsx44("div", { className: "flex shrink-0 items-center gap-2", children: actions })
4055
4088
  ] });
4056
4089
  }
4057
4090
 
@@ -4059,7 +4092,7 @@ function PageHeader({ title, description, actions, back, className }) {
4059
4092
  import { useEffect as useEffect14, useId as useId6, useRef as useRef15 } from "react";
4060
4093
  import { createPortal as createPortal7 } from "react-dom";
4061
4094
  import { X as X6 } from "lucide-react";
4062
- import { jsx as jsx44, jsxs as jsxs38 } from "react/jsx-runtime";
4095
+ import { jsx as jsx45, jsxs as jsxs39 } from "react/jsx-runtime";
4063
4096
  var WIDTH = {
4064
4097
  sm: "max-w-110",
4065
4098
  md: "max-w-160",
@@ -4109,12 +4142,12 @@ function Modal({ open, onClose, title, description, size = "md", footer, childre
4109
4142
  }, [open]);
4110
4143
  if (!open || typeof document === "undefined") return null;
4111
4144
  return createPortal7(
4112
- /* @__PURE__ */ jsx44(
4145
+ /* @__PURE__ */ jsx45(
4113
4146
  "div",
4114
4147
  {
4115
4148
  className: "fixed inset-0 z-modal flex items-center justify-center bg-scrim px-4 py-6",
4116
4149
  onMouseDown: (e) => e.target === e.currentTarget && onClose(),
4117
- children: /* @__PURE__ */ jsxs38(
4150
+ children: /* @__PURE__ */ jsxs39(
4118
4151
  "div",
4119
4152
  {
4120
4153
  ref: panel,
@@ -4129,24 +4162,24 @@ function Modal({ open, onClose, title, description, size = "md", footer, childre
4129
4162
  className
4130
4163
  ),
4131
4164
  children: [
4132
- /* @__PURE__ */ jsxs38("div", { className: "flex items-start gap-3 px-5 pt-5 pb-3", children: [
4133
- /* @__PURE__ */ jsxs38("div", { className: "min-w-0 flex-1", children: [
4134
- /* @__PURE__ */ jsx44("h2", { id: titleId, className: "text-base font-semibold text-text-primary", children: title }),
4135
- description && /* @__PURE__ */ jsx44("p", { id: descId, className: "mt-0.5 text-sm text-text-secondary", children: description })
4165
+ /* @__PURE__ */ jsxs39("div", { className: "flex items-start gap-3 px-5 pt-5 pb-3", children: [
4166
+ /* @__PURE__ */ jsxs39("div", { className: "min-w-0 flex-1", children: [
4167
+ /* @__PURE__ */ jsx45("h2", { id: titleId, className: "text-base font-semibold text-text-primary", children: title }),
4168
+ description && /* @__PURE__ */ jsx45("p", { id: descId, className: "mt-0.5 text-sm text-text-secondary", children: description })
4136
4169
  ] }),
4137
- /* @__PURE__ */ jsx44(
4170
+ /* @__PURE__ */ jsx45(
4138
4171
  "button",
4139
4172
  {
4140
4173
  type: "button",
4141
4174
  onClick: onClose,
4142
4175
  "aria-label": "Close",
4143
4176
  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-2 focus-visible:outline-border-focus",
4144
- children: /* @__PURE__ */ jsx44(X6, { size: 16, "aria-hidden": "true" })
4177
+ children: /* @__PURE__ */ jsx45(X6, { size: 16, "aria-hidden": "true" })
4145
4178
  }
4146
4179
  )
4147
4180
  ] }),
4148
- children && /* @__PURE__ */ jsx44("div", { "data-modal-body": true, className: "min-h-0 flex-1 overflow-y-auto px-5 pb-5 text-sm text-text-primary", children }),
4149
- footer && /* @__PURE__ */ jsx44("div", { "data-modal-footer": true, className: "flex items-center justify-end gap-2 border-t border-border-default px-5 py-3", children: footer })
4181
+ children && /* @__PURE__ */ jsx45("div", { "data-modal-body": true, className: "min-h-0 flex-1 overflow-y-auto px-5 pb-5 text-sm text-text-primary", children }),
4182
+ footer && /* @__PURE__ */ jsx45("div", { "data-modal-footer": true, className: "flex items-center justify-end gap-2 border-t border-border-default px-5 py-3", children: footer })
4150
4183
  ]
4151
4184
  }
4152
4185
  )
@@ -4157,10 +4190,10 @@ function Modal({ open, onClose, title, description, size = "md", footer, childre
4157
4190
  }
4158
4191
 
4159
4192
  // src/EmptyState.tsx
4160
- import { jsx as jsx45, jsxs as jsxs39 } from "react/jsx-runtime";
4193
+ import { jsx as jsx46, jsxs as jsxs40 } from "react/jsx-runtime";
4161
4194
  function EmptyState({ icon, title, description, action, size = "sm", className }) {
4162
4195
  const md = size === "md";
4163
- return /* @__PURE__ */ jsxs39(
4196
+ return /* @__PURE__ */ jsxs40(
4164
4197
  "div",
4165
4198
  {
4166
4199
  className: cn(
@@ -4169,7 +4202,7 @@ function EmptyState({ icon, title, description, action, size = "sm", className }
4169
4202
  className
4170
4203
  ),
4171
4204
  children: [
4172
- icon && /* @__PURE__ */ jsx45(
4205
+ icon && /* @__PURE__ */ jsx46(
4173
4206
  "span",
4174
4207
  {
4175
4208
  "aria-hidden": "true",
@@ -4180,9 +4213,9 @@ function EmptyState({ icon, title, description, action, size = "sm", className }
4180
4213
  children: icon
4181
4214
  }
4182
4215
  ),
4183
- /* @__PURE__ */ jsx45("p", { className: cn("font-semibold text-text-primary", md ? "text-base" : "text-sm"), children: title }),
4184
- description && /* @__PURE__ */ jsx45("p", { className: cn("max-w-sm text-text-secondary", md ? "text-sm" : "text-xs"), children: description }),
4185
- action && /* @__PURE__ */ jsx45("div", { className: md ? "mt-3" : "mt-2", children: action })
4216
+ /* @__PURE__ */ jsx46("p", { className: cn("font-semibold text-text-primary", md ? "text-base" : "text-sm"), children: title }),
4217
+ description && /* @__PURE__ */ jsx46("p", { className: cn("max-w-sm text-text-secondary", md ? "text-sm" : "text-xs"), children: description }),
4218
+ action && /* @__PURE__ */ jsx46("div", { className: md ? "mt-3" : "mt-2", children: action })
4186
4219
  ]
4187
4220
  }
4188
4221
  );
@@ -4190,7 +4223,7 @@ function EmptyState({ icon, title, description, action, size = "sm", className }
4190
4223
 
4191
4224
  // src/Tabs.tsx
4192
4225
  import { useRef as useRef16 } from "react";
4193
- import { jsx as jsx46, jsxs as jsxs40 } from "react/jsx-runtime";
4226
+ import { jsx as jsx47, jsxs as jsxs41 } from "react/jsx-runtime";
4194
4227
  function arrowKeys(e, row) {
4195
4228
  if (!row || !["ArrowLeft", "ArrowRight", "Home", "End"].includes(e.key)) return;
4196
4229
  const items = Array.from(row.querySelectorAll("button:not([disabled])"));
@@ -4202,7 +4235,7 @@ function arrowKeys(e, row) {
4202
4235
  }
4203
4236
  function Tabs({ items, value, onChange, idPrefix = "tabs", className, ...rest }) {
4204
4237
  const row = useRef16(null);
4205
- return /* @__PURE__ */ jsx46(
4238
+ return /* @__PURE__ */ jsx47(
4206
4239
  "div",
4207
4240
  {
4208
4241
  ref: row,
@@ -4212,7 +4245,7 @@ function Tabs({ items, value, onChange, idPrefix = "tabs", className, ...rest })
4212
4245
  className: cn("flex gap-6 border-b border-border-default", className),
4213
4246
  children: items.map((item) => {
4214
4247
  const on = item.value === value;
4215
- return /* @__PURE__ */ jsxs40(
4248
+ return /* @__PURE__ */ jsxs41(
4216
4249
  "button",
4217
4250
  {
4218
4251
  type: "button",
@@ -4224,12 +4257,12 @@ function Tabs({ items, value, onChange, idPrefix = "tabs", className, ...rest })
4224
4257
  disabled: item.disabled,
4225
4258
  onClick: () => onChange(item.value),
4226
4259
  className: cn(
4227
- "-mb-px flex items-center gap-1.5 rounded-control border-b-2 pt-1 pb-2.5 text-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus disabled:opacity-50",
4260
+ "-mb-px flex items-center gap-1.5 border-b-2 pt-1 pb-2.5 text-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus disabled:opacity-50",
4228
4261
  on ? "border-brand-primaryAction font-semibold text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"
4229
4262
  ),
4230
4263
  children: [
4231
4264
  item.label,
4232
- item.count !== void 0 && /* @__PURE__ */ jsx46("span", { className: "text-xs text-text-tertiary", children: item.count })
4265
+ item.count !== void 0 && /* @__PURE__ */ jsx47("span", { className: "text-xs text-text-tertiary", children: item.count })
4233
4266
  ]
4234
4267
  },
4235
4268
  item.value
@@ -4247,7 +4280,7 @@ function SegmentedControl({
4247
4280
  ...rest
4248
4281
  }) {
4249
4282
  const row = useRef16(null);
4250
- return /* @__PURE__ */ jsx46(
4283
+ return /* @__PURE__ */ jsx47(
4251
4284
  "div",
4252
4285
  {
4253
4286
  ref: row,
@@ -4257,7 +4290,7 @@ function SegmentedControl({
4257
4290
  className: cn("inline-flex w-fit items-stretch gap-0.5 rounded-full bg-subtle p-1", size === "md" ? "h-10" : "h-8", className),
4258
4291
  children: options.map((o) => {
4259
4292
  const on = o.value === value;
4260
- return /* @__PURE__ */ jsx46(
4293
+ return /* @__PURE__ */ jsx47(
4261
4294
  "button",
4262
4295
  {
4263
4296
  type: "button",
@@ -4281,7 +4314,7 @@ function SegmentedControl({
4281
4314
 
4282
4315
  // src/TextField.tsx
4283
4316
  import { forwardRef as forwardRef3, useId as useId7 } from "react";
4284
- import { jsx as jsx47, jsxs as jsxs41 } from "react/jsx-runtime";
4317
+ import { jsx as jsx48, jsxs as jsxs42 } from "react/jsx-runtime";
4285
4318
  var HEIGHT2 = { sm: "h-8", md: "h-10", lg: "h-11" };
4286
4319
  var TextField = forwardRef3(
4287
4320
  ({ label, hint, error, size = "md", icon, className, id, disabled, ...props }, ref) => {
@@ -4289,9 +4322,9 @@ var TextField = forwardRef3(
4289
4322
  const fieldId = id ?? auto;
4290
4323
  const noteId = `${fieldId}-note`;
4291
4324
  const note = error ?? hint;
4292
- return /* @__PURE__ */ jsxs41("div", { className: cn("flex flex-col gap-1.5", className), children: [
4293
- label && /* @__PURE__ */ jsx47("label", { htmlFor: fieldId, className: "text-xs font-medium text-text-secondary", children: label }),
4294
- /* @__PURE__ */ jsxs41(
4325
+ return /* @__PURE__ */ jsxs42("div", { className: cn("flex flex-col gap-1.5", className), children: [
4326
+ label && /* @__PURE__ */ jsx48("label", { htmlFor: fieldId, className: "text-xs font-medium text-text-secondary", children: label }),
4327
+ /* @__PURE__ */ jsxs42(
4295
4328
  "div",
4296
4329
  {
4297
4330
  className: cn(
@@ -4301,8 +4334,8 @@ var TextField = forwardRef3(
4301
4334
  disabled && "opacity-50"
4302
4335
  ),
4303
4336
  children: [
4304
- icon && /* @__PURE__ */ jsx47("span", { "aria-hidden": "true", className: "flex shrink-0 text-text-tertiary", children: icon }),
4305
- /* @__PURE__ */ jsx47(
4337
+ icon && /* @__PURE__ */ jsx48("span", { "aria-hidden": "true", className: "flex shrink-0 text-text-tertiary", children: icon }),
4338
+ /* @__PURE__ */ jsx48(
4306
4339
  "input",
4307
4340
  {
4308
4341
  ref,
@@ -4317,7 +4350,7 @@ var TextField = forwardRef3(
4317
4350
  ]
4318
4351
  }
4319
4352
  ),
4320
- note && /* @__PURE__ */ jsx47("p", { id: noteId, className: cn("text-xs", error ? "text-text-danger" : "text-text-tertiary"), children: note })
4353
+ note && /* @__PURE__ */ jsx48("p", { id: noteId, className: cn("text-xs", error ? "text-text-danger" : "text-text-tertiary"), children: note })
4321
4354
  ] });
4322
4355
  }
4323
4356
  );
@@ -4325,7 +4358,7 @@ TextField.displayName = "TextField";
4325
4358
 
4326
4359
  // src/DataTable.tsx
4327
4360
  import { useId as useId8 } from "react";
4328
- import { jsx as jsx48, jsxs as jsxs42 } from "react/jsx-runtime";
4361
+ import { jsx as jsx49, jsxs as jsxs43 } from "react/jsx-runtime";
4329
4362
  var WIDTH2 = { fill: "", sm: "w-24", md: "w-36", lg: "w-48" };
4330
4363
  var MAX_H = { sm: "max-h-80", md: "max-h-120", lg: "max-h-160" };
4331
4364
  var HEAD_PAD = { default: "px-4 py-3", compact: "px-3 py-2" };
@@ -4357,15 +4390,15 @@ function DataTable({
4357
4390
  const col = columns.find((c) => c.key === key);
4358
4391
  onSortChange?.(cycleSort(sort, key, col?.firstDir ?? (col?.numeric ? "desc" : "asc")));
4359
4392
  };
4360
- return /* @__PURE__ */ jsxs42("div", { className: cn("flex w-full flex-col overflow-hidden rounded-card border border-border-default bg-surface", className), children: [
4361
- title && /* @__PURE__ */ jsxs42("div", { className: "flex items-start justify-between gap-2 p-card-padding", children: [
4362
- /* @__PURE__ */ jsxs42("div", { className: "min-w-0", children: [
4363
- /* @__PURE__ */ jsx48("h3", { id: titleId, className: "text-style-card-title", children: title }),
4364
- subtitle && /* @__PURE__ */ jsx48("p", { className: "mt-0.5 text-xs text-text-tertiary", children: subtitle })
4393
+ return /* @__PURE__ */ jsxs43("div", { className: cn("flex w-full flex-col overflow-hidden rounded-card border border-border-default bg-surface", className), children: [
4394
+ title && /* @__PURE__ */ jsxs43("div", { className: "flex items-start justify-between gap-2 p-card-padding", children: [
4395
+ /* @__PURE__ */ jsxs43("div", { className: "min-w-0", children: [
4396
+ /* @__PURE__ */ jsx49("h3", { id: titleId, className: "text-style-card-title", children: title }),
4397
+ subtitle && /* @__PURE__ */ jsx49("p", { className: "mt-0.5 text-xs text-text-tertiary", children: subtitle })
4365
4398
  ] }),
4366
- action && /* @__PURE__ */ jsx48("div", { className: "shrink-0", children: action })
4399
+ action && /* @__PURE__ */ jsx49("div", { className: "shrink-0", children: action })
4367
4400
  ] }),
4368
- /* @__PURE__ */ jsx48("div", { className: cn("overflow-x-auto", maxHeight && cn("overflow-y-auto", MAX_H[maxHeight])), children: /* @__PURE__ */ jsxs42(
4401
+ /* @__PURE__ */ jsx49("div", { className: cn("overflow-x-auto", maxHeight && cn("overflow-y-auto", MAX_H[maxHeight])), children: /* @__PURE__ */ jsxs43(
4369
4402
  "table",
4370
4403
  {
4371
4404
  "aria-labelledby": title ? titleId : void 0,
@@ -4373,13 +4406,13 @@ function DataTable({
4373
4406
  "aria-busy": loading || void 0,
4374
4407
  className: "w-full border-collapse text-left",
4375
4408
  children: [
4376
- /* @__PURE__ */ jsx48("thead", { className: cn(maxHeight && "sticky top-0 z-10"), children: /* @__PURE__ */ jsx48("tr", { className: "bg-subtle text-micro font-semibold uppercase tracking-wider text-text-secondary", children: columns.map((c) => /* @__PURE__ */ jsx48(
4409
+ /* @__PURE__ */ jsx49("thead", { className: cn(maxHeight && "sticky top-0 z-10"), children: /* @__PURE__ */ jsx49("tr", { className: "bg-subtle text-micro font-semibold uppercase tracking-wider text-text-secondary", children: columns.map((c) => /* @__PURE__ */ jsx49(
4377
4410
  "th",
4378
4411
  {
4379
4412
  scope: "col",
4380
4413
  "aria-sort": c.sortable ? ariaSortFor(sort, c.key) : void 0,
4381
4414
  className: cn("border-b border-border-default font-semibold", head, align(c), width(c)),
4382
- children: c.sortable && onSortChange ? /* @__PURE__ */ jsx48(
4415
+ children: c.sortable && onSortChange ? /* @__PURE__ */ jsx49(
4383
4416
  SortButton,
4384
4417
  {
4385
4418
  label: c.label,
@@ -4392,7 +4425,7 @@ function DataTable({
4392
4425
  },
4393
4426
  c.key
4394
4427
  )) }) }),
4395
- /* @__PURE__ */ jsx48("tbody", { className: "text-dense text-text-primary", children: loading ? Array.from({ length: loadingRows }, (_, i) => /* @__PURE__ */ jsx48("tr", { "aria-hidden": "true", className: "[&:last-child>td]:border-b-0", children: columns.map((c) => /* @__PURE__ */ jsx48("td", { className: cn("border-b border-border-default", pad, align(c)), children: /* @__PURE__ */ jsx48(
4428
+ /* @__PURE__ */ jsx49("tbody", { className: "text-dense text-text-primary", children: loading ? Array.from({ length: loadingRows }, (_, i) => /* @__PURE__ */ jsx49("tr", { "aria-hidden": "true", className: "[&:last-child>td]:border-b-0", children: columns.map((c) => /* @__PURE__ */ jsx49("td", { className: cn("border-b border-border-default", pad, align(c)), children: /* @__PURE__ */ jsx49(
4396
4429
  "span",
4397
4430
  {
4398
4431
  className: cn(
@@ -4400,7 +4433,7 @@ function DataTable({
4400
4433
  c.numeric ? "w-12" : "w-2/3"
4401
4434
  )
4402
4435
  }
4403
- ) }, c.key)) }, i)) : rows.length === 0 ? /* @__PURE__ */ jsx48("tr", { children: /* @__PURE__ */ jsx48("td", { colSpan: columns.length, children: empty ?? /* @__PURE__ */ jsx48(NoResultsEmptyState, {}) }) }) : rows.map((row) => /* @__PURE__ */ jsx48("tr", { className: "hover:bg-subtle [&:last-child>td]:border-b-0", children: columns.map((c) => /* @__PURE__ */ jsx48(
4436
+ ) }, c.key)) }, i)) : rows.length === 0 ? /* @__PURE__ */ jsx49("tr", { children: /* @__PURE__ */ jsx49("td", { colSpan: columns.length, className: "px-6 py-12", children: empty ?? /* @__PURE__ */ jsx49(NoResultsEmptyState, {}) }) }) : rows.map((row) => /* @__PURE__ */ jsx49("tr", { className: "hover:bg-subtle [&:last-child>td]:border-b-0", children: columns.map((c) => /* @__PURE__ */ jsx49(
4404
4437
  "td",
4405
4438
  {
4406
4439
  className: cn("border-b border-border-default", pad, align(c), c.numeric && "tabular-nums"),
@@ -4411,9 +4444,164 @@ function DataTable({
4411
4444
  ]
4412
4445
  }
4413
4446
  ) }),
4414
- footer && /* @__PURE__ */ jsx48("div", { className: "border-t border-border-default px-4 py-3", children: footer })
4447
+ footer && /* @__PURE__ */ jsx49("div", { className: "border-t border-border-default px-4 py-3", children: footer })
4415
4448
  ] });
4416
4449
  }
4450
+
4451
+ // src/MediaLabel.tsx
4452
+ import { jsx as jsx50 } from "react/jsx-runtime";
4453
+ var FILL = {
4454
+ TV: "bg-media-tv",
4455
+ CTV: "bg-media-ctv",
4456
+ Digital: "bg-media-digital",
4457
+ Social: "bg-media-social",
4458
+ Radio: "bg-media-radio",
4459
+ Newspaper: "bg-media-newspaper",
4460
+ Magazine: "bg-media-magazine"
4461
+ };
4462
+ function MediaLabel({ type, className }) {
4463
+ return /* @__PURE__ */ jsx50(
4464
+ "span",
4465
+ {
4466
+ className: cn(
4467
+ "inline-flex items-center whitespace-nowrap rounded-sm px-1.5 py-0.5 text-micro font-semibold text-status-onstatus",
4468
+ FILL[type] ?? "bg-media-other",
4469
+ className
4470
+ ),
4471
+ children: type
4472
+ }
4473
+ );
4474
+ }
4475
+
4476
+ // src/SuggestionChip.tsx
4477
+ import { jsx as jsx51 } from "react/jsx-runtime";
4478
+ function SuggestionChip({ children, className, type = "button", ...props }) {
4479
+ return /* @__PURE__ */ jsx51(
4480
+ "button",
4481
+ {
4482
+ type,
4483
+ ...props,
4484
+ className: cn(
4485
+ "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-2 focus-visible:outline-border-focus",
4486
+ className
4487
+ ),
4488
+ children: /* @__PURE__ */ jsx51("span", { className: "truncate", children })
4489
+ }
4490
+ );
4491
+ }
4492
+
4493
+ // src/ToggleChip.tsx
4494
+ import { Check as Check9 } from "lucide-react";
4495
+ import { jsx as jsx52, jsxs as jsxs44 } from "react/jsx-runtime";
4496
+ function ToggleChip({ selected, onChange, children, className, type = "button", onClick, ...props }) {
4497
+ return /* @__PURE__ */ jsxs44(
4498
+ "button",
4499
+ {
4500
+ type,
4501
+ "aria-pressed": selected,
4502
+ ...props,
4503
+ onClick: (e) => {
4504
+ onClick?.(e);
4505
+ if (!e.defaultPrevented) onChange(!selected);
4506
+ },
4507
+ className: cn(
4508
+ "inline-flex h-8 items-center gap-1.5 whitespace-nowrap rounded-full border px-3 text-sm transition-colors duration-(--mr-motion-duration-interactive) ease-interactive focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus",
4509
+ selected ? "border-brand-primaryAction bg-brand-primaryAction/15 font-medium text-brand-primaryAction" : "border-border-default bg-surface text-text-primary hover:border-border-strong hover:bg-subtle",
4510
+ className
4511
+ ),
4512
+ children: [
4513
+ selected && /* @__PURE__ */ jsx52(Check9, { size: 14, "aria-hidden": "true", className: "-ml-0.5 shrink-0" }),
4514
+ children
4515
+ ]
4516
+ }
4517
+ );
4518
+ }
4519
+
4520
+ // src/CopyButton.tsx
4521
+ import { useEffect as useEffect15, useRef as useRef17, useState as useState15 } from "react";
4522
+ import { Check as Check10, Copy } from "lucide-react";
4523
+ import { jsx as jsx53, jsxs as jsxs45 } from "react/jsx-runtime";
4524
+ var CONFIRM_MS = 2e3;
4525
+ function CopyButton({ value, label, "aria-label": ariaLabel, size = "xs", className }) {
4526
+ const [copied, setCopied] = useState15(false);
4527
+ const timer = useRef17(void 0);
4528
+ useEffect15(() => () => clearTimeout(timer.current), []);
4529
+ const copy = async () => {
4530
+ try {
4531
+ await navigator.clipboard.writeText(typeof value === "function" ? value() : value);
4532
+ } catch {
4533
+ return;
4534
+ }
4535
+ setCopied(true);
4536
+ clearTimeout(timer.current);
4537
+ timer.current = setTimeout(() => setCopied(false), CONFIRM_MS);
4538
+ };
4539
+ const iconSize = size === "xs" ? 13 : 15;
4540
+ const icon = copied ? /* @__PURE__ */ jsx53(Check10, { size: iconSize, "aria-hidden": "true", className: "shrink-0 text-text-success" }) : /* @__PURE__ */ jsx53(Copy, { size: iconSize, "aria-hidden": "true", className: "shrink-0" });
4541
+ return /* @__PURE__ */ jsxs45(
4542
+ Button,
4543
+ {
4544
+ type: "button",
4545
+ variant: "ghost",
4546
+ size,
4547
+ iconOnly: !label,
4548
+ "aria-label": label ? void 0 : ariaLabel,
4549
+ onClick: copy,
4550
+ className: cn(!copied && "text-text-secondary", className),
4551
+ children: [
4552
+ icon,
4553
+ label && /* @__PURE__ */ jsx53("span", { children: copied ? "Copied" : label }),
4554
+ /* @__PURE__ */ jsx53("span", { role: "status", className: "sr-only", children: copied ? "Copied" : "" })
4555
+ ]
4556
+ }
4557
+ );
4558
+ }
4559
+
4560
+ // src/InlineMessage.tsx
4561
+ import { AlertTriangle as AlertTriangle2, CheckCircle2, Info as Info3, X as X7, XCircle } from "lucide-react";
4562
+ import { jsx as jsx54, jsxs as jsxs46 } from "react/jsx-runtime";
4563
+ var BOX = {
4564
+ info: "border-brand-primaryAction/30 bg-brand-primaryAction/10",
4565
+ success: "border-status-success/40 bg-status-success/10",
4566
+ // Heavier tint for the same reason as Badge: the amber sits close to the warm canvas.
4567
+ warning: "border-status-warning/50 bg-status-warning/15",
4568
+ danger: "border-status-danger/40 bg-status-danger/10"
4569
+ };
4570
+ var ICON_INK = {
4571
+ info: "text-brand-primaryAction",
4572
+ success: "text-text-success",
4573
+ warning: "text-text-warning",
4574
+ danger: "text-text-danger"
4575
+ };
4576
+ var ICON2 = { info: Info3, success: CheckCircle2, warning: AlertTriangle2, danger: XCircle };
4577
+ function InlineMessage({ tone = "info", title, children, actions, onDismiss, className }) {
4578
+ const Icon = ICON2[tone];
4579
+ return /* @__PURE__ */ jsxs46(
4580
+ "div",
4581
+ {
4582
+ role: tone === "warning" || tone === "danger" ? "alert" : "status",
4583
+ className: cn("flex items-start gap-2.5 rounded-control border px-3 py-2.5 text-sm", BOX[tone], className),
4584
+ children: [
4585
+ /* @__PURE__ */ jsx54(Icon, { size: 16, "aria-hidden": "true", className: cn("mt-0.5 shrink-0", ICON_INK[tone]) }),
4586
+ /* @__PURE__ */ jsxs46("div", { className: "min-w-0 flex-1", children: [
4587
+ /* @__PURE__ */ jsx54("p", { className: "font-semibold text-text-primary", children: title }),
4588
+ children && /* @__PURE__ */ jsx54("div", { className: "mt-0.5 text-text-secondary", children }),
4589
+ actions && /* @__PURE__ */ jsx54("div", { className: "mt-2 flex flex-wrap items-center gap-2", children: actions })
4590
+ ] }),
4591
+ onDismiss && /* @__PURE__ */ jsx54(
4592
+ "button",
4593
+ {
4594
+ type: "button",
4595
+ onClick: onDismiss,
4596
+ "aria-label": "Dismiss",
4597
+ 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-border-focus",
4598
+ children: /* @__PURE__ */ jsx54(X7, { size: 14, "aria-hidden": "true" })
4599
+ }
4600
+ )
4601
+ ]
4602
+ }
4603
+ );
4604
+ }
4417
4605
  export {
4418
4606
  AISpark,
4419
4607
  AdvertiserNoResults,
@@ -4426,6 +4614,7 @@ export {
4426
4614
  CheckBox,
4427
4615
  CheckBoxBox,
4428
4616
  ChipContent,
4617
+ CopyButton,
4429
4618
  DEFAULT_SEARCH_MATCH,
4430
4619
  DataScopeFilter,
4431
4620
  DataTable,
@@ -4437,7 +4626,9 @@ export {
4437
4626
  FilterDropdownFooter,
4438
4627
  Freshness,
4439
4628
  InfoTip,
4629
+ InlineMessage,
4440
4630
  LineChartPlaceholder,
4631
+ MediaLabel,
4441
4632
  Modal,
4442
4633
  MultiSelectFilter,
4443
4634
  NO_RESULTS_BODY,
@@ -4460,12 +4651,14 @@ export {
4460
4651
  SelectionPicker,
4461
4652
  SortButton,
4462
4653
  StackedColumnPlaceholder,
4654
+ SuggestionChip,
4463
4655
  TablePagination,
4464
4656
  Tabs,
4465
4657
  Tag,
4466
4658
  TextField,
4467
4659
  Toast,
4468
4660
  Toggle,
4661
+ ToggleChip,
4469
4662
  Tooltip,
4470
4663
  WorkspaceAvatar,
4471
4664
  WorkspaceSelectedCard,