@mediaradar/design-components 0.30.0 → 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,7 +1435,30 @@ 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
  }
@@ -1414,7 +1466,7 @@ function slug3(value) {
1414
1466
  return value.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "");
1415
1467
  }
1416
1468
  function OptionIcon({ children }) {
1417
- return /* @__PURE__ */ jsx11(
1469
+ return /* @__PURE__ */ jsx13(
1418
1470
  "span",
1419
1471
  {
1420
1472
  "aria-hidden": "true",
@@ -1432,8 +1484,14 @@ function SelectFilter({
1432
1484
  fullWidth = false,
1433
1485
  className,
1434
1486
  testIdPrefix,
1487
+ loading = false,
1488
+ error = false,
1489
+ onRetry,
1490
+ size = "md",
1491
+ disabled = false,
1435
1492
  renderIcon
1436
1493
  }) {
1494
+ const sm = size === "sm";
1437
1495
  const [open, setOpen] = useState6(false);
1438
1496
  const [pos, setPos] = useState6(null);
1439
1497
  const ref = useRef7(null);
@@ -1442,8 +1500,10 @@ function SelectFilter({
1442
1500
  const reposition = useCallback2(() => {
1443
1501
  if (!ref.current) return;
1444
1502
  const r = ref.current.getBoundingClientRect();
1445
- setPos({ top: r.bottom + 8, left: align === "right" ? r.right - r.width : r.left, width: r.width });
1446
- }, [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]);
1447
1507
  useLayoutEffect2(() => {
1448
1508
  if (!open) return;
1449
1509
  reposition();
@@ -1467,9 +1527,12 @@ function SelectFilter({
1467
1527
  window.removeEventListener("scroll", reposition, true);
1468
1528
  };
1469
1529
  }, [open, close, reposition]);
1470
- const valueText = /* @__PURE__ */ jsx11("span", { className: "text-[12px] font-medium text-text-primary", children: value });
1471
- return /* @__PURE__ */ jsxs10("div", { className: cx4("relative", fullWidth && "w-full"), ref, children: [
1472
- /* @__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(
1473
1536
  "button",
1474
1537
  {
1475
1538
  type: "button",
@@ -1477,20 +1540,17 @@ function SelectFilter({
1477
1540
  onClick: () => setOpen((o) => !o),
1478
1541
  "aria-expanded": open,
1479
1542
  "aria-haspopup": "listbox",
1543
+ "aria-label": sm ? caption : void 0,
1544
+ disabled,
1480
1545
  className: cx4(
1481
- "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",
1482
1548
  fullWidth && "w-full justify-between",
1483
1549
  className
1484
1550
  ),
1485
1551
  children: [
1486
- /* @__PURE__ */ jsxs10("span", { className: "flex flex-col gap-1 text-left leading-none", children: [
1487
- /* @__PURE__ */ jsx11("span", { className: "text-control-caption uppercase tracking-wide text-text-tertiary", children: caption }),
1488
- renderIcon ? /* @__PURE__ */ jsxs10("span", { className: "flex items-center gap-1.5", children: [
1489
- /* @__PURE__ */ jsx11(OptionIcon, { children: renderIcon(value) }),
1490
- valueText
1491
- ] }) : valueText
1492
- ] }),
1493
- /* @__PURE__ */ jsx11(
1552
+ sm ? triggerValue : /* @__PURE__ */ jsx13(ChipContent, { caption, value: triggerValue }),
1553
+ /* @__PURE__ */ jsx13(
1494
1554
  ChevronDown5,
1495
1555
  {
1496
1556
  size: 14,
@@ -1502,7 +1562,7 @@ function SelectFilter({
1502
1562
  }
1503
1563
  ),
1504
1564
  open && pos && createPortal2(
1505
- /* @__PURE__ */ jsx11(
1565
+ /* @__PURE__ */ jsx13(
1506
1566
  "div",
1507
1567
  {
1508
1568
  ref: popoverRef,
@@ -1510,13 +1570,13 @@ function SelectFilter({
1510
1570
  style: { position: "fixed", top: pos.top, left: pos.left, width: fullWidth ? pos.width : void 0 },
1511
1571
  className: cx4(
1512
1572
  "z-[65] flex flex-col overflow-hidden rounded-card border border-border-default bg-surface shadow-overlay",
1513
- !fullWidth && "w-56"
1573
+ !fullWidth && (sm ? "w-28" : "w-56")
1514
1574
  ),
1515
- role: "listbox",
1575
+ role: loading || error ? "group" : "listbox",
1516
1576
  "aria-label": caption,
1517
- 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) => {
1518
1578
  const selected = o === value;
1519
- return /* @__PURE__ */ jsxs10(
1579
+ return /* @__PURE__ */ jsxs12(
1520
1580
  "button",
1521
1581
  {
1522
1582
  type: "button",
@@ -1529,9 +1589,9 @@ function SelectFilter({
1529
1589
  },
1530
1590
  className: "flex w-full items-center gap-2.5 rounded-control px-2 py-2 text-left transition-colors hover:bg-subtle",
1531
1591
  children: [
1532
- /* @__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 }) }),
1533
- renderIcon && /* @__PURE__ */ jsx11(OptionIcon, { children: renderIcon(o) }),
1534
- /* @__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(
1535
1595
  "span",
1536
1596
  {
1537
1597
  className: cx4("flex-1 text-[14px]", selected ? "font-semibold text-text-primary" : "text-text-primary"),
@@ -1552,9 +1612,9 @@ function SelectFilter({
1552
1612
 
1553
1613
  // src/Card.tsx
1554
1614
  import { forwardRef } from "react";
1555
- import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
1615
+ import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
1556
1616
  var Card = forwardRef(function Card2({ staticCard, title, titleAs: TitleTag = "h3", subtitle, action, className, children, ...rest }, ref) {
1557
- return /* @__PURE__ */ jsx12(
1617
+ return /* @__PURE__ */ jsx14(
1558
1618
  "article",
1559
1619
  {
1560
1620
  ref,
@@ -1565,15 +1625,15 @@ var Card = forwardRef(function Card2({ staticCard, title, titleAs: TitleTag = "h
1565
1625
  className
1566
1626
  ].filter(Boolean).join(" "),
1567
1627
  ...rest,
1568
- children: title ? /* @__PURE__ */ jsxs11("div", { className: "flex flex-1 flex-col p-card-padding", children: [
1569
- /* @__PURE__ */ jsxs11("div", { className: "flex items-start justify-between gap-2", children: [
1570
- /* @__PURE__ */ jsxs11("div", { children: [
1571
- /* @__PURE__ */ jsx12(TitleTag, { className: "text-style-card-title", children: title }),
1572
- 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 })
1573
1633
  ] }),
1574
- 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 })
1575
1635
  ] }),
1576
- /* @__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 })
1577
1637
  ] }) : children
1578
1638
  }
1579
1639
  );
@@ -1581,7 +1641,7 @@ var Card = forwardRef(function Card2({ staticCard, title, titleAs: TitleTag = "h
1581
1641
 
1582
1642
  // src/NoResultsEmptyState.tsx
1583
1643
  import { FilterX } from "lucide-react";
1584
- import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
1644
+ import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
1585
1645
  var NO_RESULTS_TITLE = "No results match your filters";
1586
1646
  var NO_RESULTS_BODY = "Your filters may be too narrow, conflict with each other, or have no activity in this period.";
1587
1647
  function noResultsBody(workspaceName) {
@@ -1603,12 +1663,12 @@ function NoResultsEmptyState({
1603
1663
  const showClear = hasFilters !== false && Boolean(onClearFilters);
1604
1664
  const showEdit = Boolean(onEditFilters);
1605
1665
  const hasActions = showClear || showEdit || Boolean(actions && actions.length > 0);
1606
- return /* @__PURE__ */ jsxs12("div", { className: "flex flex-col items-center justify-center gap-3 text-center", "data-testid": testIdPrefix, children: [
1607
- /* @__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" }) }),
1608
- /* @__PURE__ */ jsx13("h2", { className: "text-base font-semibold text-text-primary", children: title }),
1609
- /* @__PURE__ */ jsx13("p", { className: "max-w-[420px] text-[13px] leading-relaxed text-text-secondary", children: bodyText }),
1610
- hasActions && /* @__PURE__ */ jsxs12("div", { className: "mt-1 flex flex-col items-center gap-3", children: [
1611
- 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(
1612
1672
  "button",
1613
1673
  {
1614
1674
  type: "button",
@@ -1618,7 +1678,7 @@ function NoResultsEmptyState({
1618
1678
  children: "Clear all filters"
1619
1679
  }
1620
1680
  ),
1621
- showEdit && /* @__PURE__ */ jsx13(
1681
+ showEdit && /* @__PURE__ */ jsx15(
1622
1682
  "button",
1623
1683
  {
1624
1684
  type: "button",
@@ -1628,7 +1688,7 @@ function NoResultsEmptyState({
1628
1688
  children: "Edit filters"
1629
1689
  }
1630
1690
  ),
1631
- actions?.map((action, i) => /* @__PURE__ */ jsx13(
1691
+ actions?.map((action, i) => /* @__PURE__ */ jsx15(
1632
1692
  "button",
1633
1693
  {
1634
1694
  type: "button",
@@ -1645,12 +1705,12 @@ function NoResultsEmptyState({
1645
1705
  // src/WorkspaceSelectedCard.tsx
1646
1706
  import { useEffect as useEffect7, useRef as useRef8, useState as useState7 } from "react";
1647
1707
  import { ChevronDown as ChevronDown6, X as X3 } from "lucide-react";
1648
- import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
1708
+ import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
1649
1709
  function cx5(...parts) {
1650
1710
  return parts.filter(Boolean).join(" ");
1651
1711
  }
1652
1712
  function WorkspaceSelectedCard({ groups, testIdPrefix }) {
1653
- 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)) }) });
1654
1714
  }
1655
1715
  function SummaryGroupItem({
1656
1716
  group,
@@ -1667,8 +1727,8 @@ function SummaryGroupItem({
1667
1727
  else if (expandCount === 0) setOpen(false);
1668
1728
  wasEmpty.current = expandCount === 0;
1669
1729
  }, [expandCount]);
1670
- return /* @__PURE__ */ jsxs13("div", { className: nested ? "" : "py-3 first:pt-0 last:pb-0", children: [
1671
- /* @__PURE__ */ jsxs13(
1730
+ return /* @__PURE__ */ jsxs15("div", { className: nested ? "" : "py-3 first:pt-0 last:pb-0", children: [
1731
+ /* @__PURE__ */ jsxs15(
1672
1732
  "button",
1673
1733
  {
1674
1734
  type: "button",
@@ -1677,7 +1737,7 @@ function SummaryGroupItem({
1677
1737
  "data-testid": testIdPrefix && `${testIdPrefix}-group-${group.id}`,
1678
1738
  className: "flex w-full min-w-0 items-center gap-2 text-left",
1679
1739
  children: [
1680
- /* @__PURE__ */ jsx14(
1740
+ /* @__PURE__ */ jsx16(
1681
1741
  ChevronDown6,
1682
1742
  {
1683
1743
  size: 14,
@@ -1685,37 +1745,37 @@ function SummaryGroupItem({
1685
1745
  className: cx5("shrink-0 text-text-secondary transition-transform", !open && "-rotate-90")
1686
1746
  }
1687
1747
  ),
1688
- /* @__PURE__ */ jsx14("span", { className: cx5("truncate font-semibold text-text-primary", nested ? "text-[12px]" : "text-[13px]"), children: group.label }),
1689
- /* @__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 })
1690
1750
  ]
1691
1751
  }
1692
1752
  ),
1693
- 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: [
1694
- ownCount > 0 && /* @__PURE__ */ jsxs13("div", { className: "flex flex-col gap-1.5", children: [
1695
- 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(
1696
1756
  "div",
1697
1757
  {
1698
1758
  className: "flex items-center justify-between gap-2 rounded-control border border-border-default bg-canvas px-2 py-1",
1699
1759
  children: [
1700
- /* @__PURE__ */ jsxs13("span", { className: "min-w-0 flex-1", children: [
1701
- /* @__PURE__ */ jsx14("span", { className: "block truncate text-[12px] text-text-primary", children: item.name }),
1702
- 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 })
1703
1763
  ] }),
1704
- /* @__PURE__ */ jsx14(
1764
+ /* @__PURE__ */ jsx16(
1705
1765
  "button",
1706
1766
  {
1707
1767
  type: "button",
1708
1768
  "aria-label": `Remove ${item.name}`,
1709
1769
  onClick: () => group.onRemove(item.id),
1710
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",
1711
- children: /* @__PURE__ */ jsx14(X3, { size: 12, "aria-hidden": "true" })
1771
+ children: /* @__PURE__ */ jsx16(X3, { size: 12, "aria-hidden": "true" })
1712
1772
  }
1713
1773
  )
1714
1774
  ]
1715
1775
  },
1716
1776
  item.id
1717
1777
  )),
1718
- /* @__PURE__ */ jsx14(
1778
+ /* @__PURE__ */ jsx16(
1719
1779
  "button",
1720
1780
  {
1721
1781
  type: "button",
@@ -1726,13 +1786,13 @@ function SummaryGroupItem({
1726
1786
  }
1727
1787
  )
1728
1788
  ] }),
1729
- 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))
1730
1790
  ] }) })
1731
1791
  ] });
1732
1792
  }
1733
1793
 
1734
1794
  // src/chart-placeholder-shared.tsx
1735
- import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
1795
+ import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
1736
1796
  var GRID_ROWS = [0, 25, 50, 75, 100];
1737
1797
  var Y_TICK_WIDTHS = [26, 30, 30, 26, 20];
1738
1798
  var Y_AXIS_W = 48;
@@ -1744,9 +1804,9 @@ function AxisFrame({
1744
1804
  children
1745
1805
  }) {
1746
1806
  const gutter = xTicks > 0 ? X_AXIS_H : 0;
1747
- 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: [
1748
- /* @__PURE__ */ jsxs14("div", { className: "absolute inset-y-0 right-0", style: { left: Y_AXIS_W, bottom: gutter }, children: [
1749
- 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(
1750
1810
  "div",
1751
1811
  {
1752
1812
  className: "absolute inset-x-0 border-t border-dashed",
@@ -1754,9 +1814,9 @@ function AxisFrame({
1754
1814
  },
1755
1815
  pct
1756
1816
  )),
1757
- /* @__PURE__ */ jsx15("div", { className: "absolute inset-0", children })
1817
+ /* @__PURE__ */ jsx17("div", { className: "absolute inset-0", children })
1758
1818
  ] }),
1759
- /* @__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(
1760
1820
  "div",
1761
1821
  {
1762
1822
  className: "absolute right-2 h-2 -translate-y-1/2 rounded-xs bg-subtle",
@@ -1764,27 +1824,27 @@ function AxisFrame({
1764
1824
  },
1765
1825
  pct
1766
1826
  )) }),
1767
- xTicks > 0 && /* @__PURE__ */ jsx15(
1827
+ xTicks > 0 && /* @__PURE__ */ jsx17(
1768
1828
  "div",
1769
1829
  {
1770
1830
  className: "absolute bottom-0 right-0 flex items-center",
1771
1831
  style: { left: Y_AXIS_W, height: X_AXIS_H },
1772
- 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))
1773
1833
  }
1774
1834
  )
1775
1835
  ] }) });
1776
1836
  }
1777
1837
  function BlankLegend({ rows, reverse = false }) {
1778
- return /* @__PURE__ */ jsx15(
1838
+ return /* @__PURE__ */ jsx17(
1779
1839
  "ul",
1780
1840
  {
1781
1841
  className: `flex flex-1 justify-center gap-1.5 ${reverse ? "flex-col-reverse" : "flex-col"}`,
1782
1842
  role: "presentation",
1783
1843
  "aria-hidden": "true",
1784
- children: Array.from({ length: rows }, (_, i) => /* @__PURE__ */ jsxs14("li", { className: "flex items-center justify-between gap-2", children: [
1785
- /* @__PURE__ */ jsxs14("span", { className: "flex items-center gap-1.5", children: [
1786
- /* @__PURE__ */ jsx15("span", { className: "h-2.5 w-2.5 rounded-xs bg-subtle" }),
1787
- /* @__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(
1788
1848
  "span",
1789
1849
  {
1790
1850
  className: "h-2 rounded-xs bg-subtle",
@@ -1792,21 +1852,21 @@ function BlankLegend({ rows, reverse = false }) {
1792
1852
  }
1793
1853
  )
1794
1854
  ] }),
1795
- /* @__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" })
1796
1856
  ] }, i))
1797
1857
  }
1798
1858
  );
1799
1859
  }
1800
1860
 
1801
1861
  // src/BarChartPlaceholder.tsx
1802
- import { jsx as jsx16 } from "react/jsx-runtime";
1862
+ import { jsx as jsx18 } from "react/jsx-runtime";
1803
1863
  var BAR_PROFILE = [92, 86, 76, 65, 57, 40, 30, 24, 18, 13];
1804
1864
  function BarChartPlaceholder({ height = 220 }) {
1805
- 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)) }) });
1806
1866
  }
1807
1867
 
1808
1868
  // src/LineChartPlaceholder.tsx
1809
- import { jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
1869
+ import { jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
1810
1870
  var LINE_SERIES = [
1811
1871
  [58, 52, 55, 41, 45, 33, 36, 25, 28, 17],
1812
1872
  [74, 71, 66, 68, 59, 61, 54, 56, 48, 45],
@@ -1816,9 +1876,9 @@ var LINE_SERIES = [
1816
1876
  var LINE_FORECAST_FROM = 7;
1817
1877
  function LineChartPlaceholder({ height = 280 }) {
1818
1878
  const toPath = (pts, from, to) => pts.slice(from, to).map((y, i) => `${(i + from) / (pts.length - 1) * 100},${y}`).join(" ");
1819
- return /* @__PURE__ */ jsxs15(AxisFrame, { height, xTicks: LINE_SERIES[0].length, children: [
1820
- /* @__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: [
1821
- /* @__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(
1822
1882
  "polyline",
1823
1883
  {
1824
1884
  points: toPath(pts, 0, LINE_FORECAST_FROM + 1),
@@ -1830,7 +1890,7 @@ function LineChartPlaceholder({ height = 280 }) {
1830
1890
  strokeLinejoin: "round"
1831
1891
  }
1832
1892
  ),
1833
- /* @__PURE__ */ jsx17(
1893
+ /* @__PURE__ */ jsx19(
1834
1894
  "polyline",
1835
1895
  {
1836
1896
  points: toPath(pts, LINE_FORECAST_FROM, pts.length),
@@ -1845,7 +1905,7 @@ function LineChartPlaceholder({ height = 280 }) {
1845
1905
  )
1846
1906
  ] }, s)) }),
1847
1907
  LINE_SERIES.map(
1848
- (pts, s) => pts.map((y, i) => /* @__PURE__ */ jsx17(
1908
+ (pts, s) => pts.map((y, i) => /* @__PURE__ */ jsx19(
1849
1909
  "div",
1850
1910
  {
1851
1911
  className: "absolute h-1.5 w-1.5 -translate-x-1/2 -translate-y-1/2 rounded-full",
@@ -1862,16 +1922,16 @@ function LineChartPlaceholder({ height = 280 }) {
1862
1922
  }
1863
1923
 
1864
1924
  // src/PieChartPlaceholder.tsx
1865
- import { jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
1925
+ import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
1866
1926
  var PIE_SEAMS = [0, 115, 180, 230, 262, 288, 310, 332];
1867
1927
  function PieChartPlaceholder({ height = 220, legendRows = 8 }) {
1868
1928
  const r = 45;
1869
- return /* @__PURE__ */ jsxs16("div", { className: "flex w-full items-center gap-3", style: { height }, role: "presentation", "aria-hidden": "true", children: [
1870
- /* @__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: [
1871
- /* @__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)" }),
1872
1932
  PIE_SEAMS.map((deg) => {
1873
1933
  const rad = (deg - 90) * Math.PI / 180;
1874
- return /* @__PURE__ */ jsx18(
1934
+ return /* @__PURE__ */ jsx20(
1875
1935
  "line",
1876
1936
  {
1877
1937
  x1: "50",
@@ -1885,12 +1945,12 @@ function PieChartPlaceholder({ height = 220, legendRows = 8 }) {
1885
1945
  );
1886
1946
  })
1887
1947
  ] }) }),
1888
- /* @__PURE__ */ jsx18(BlankLegend, { rows: legendRows })
1948
+ /* @__PURE__ */ jsx20(BlankLegend, { rows: legendRows })
1889
1949
  ] });
1890
1950
  }
1891
1951
 
1892
1952
  // src/StackedColumnPlaceholder.tsx
1893
- import { jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
1953
+ import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
1894
1954
  var COLUMN_WEIGHTS = [20, 30, 15, 35, 24, 12, 28, 18];
1895
1955
  function columnBands(count) {
1896
1956
  const weights = Array.from({ length: count }, (_, i) => COLUMN_WEIGHTS[i % COLUMN_WEIGHTS.length]);
@@ -1903,7 +1963,7 @@ function StackedColumnPlaceholder({
1903
1963
  legendRows = 4,
1904
1964
  axis = false
1905
1965
  }) {
1906
- 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(
1907
1967
  "div",
1908
1968
  {
1909
1969
  style: {
@@ -1915,16 +1975,16 @@ function StackedColumnPlaceholder({
1915
1975
  },
1916
1976
  i
1917
1977
  )) });
1918
- return /* @__PURE__ */ jsxs17("div", { className: "flex w-full gap-4", style: { height }, role: "presentation", "aria-hidden": "true", children: [
1919
- 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 }),
1920
- /* @__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 })
1921
1981
  ] });
1922
1982
  }
1923
1983
 
1924
1984
  // src/Tooltip.tsx
1925
1985
  import { useEffect as useEffect8, useId as useId3, useLayoutEffect as useLayoutEffect3, useRef as useRef9, useState as useState8 } from "react";
1926
1986
  import { createPortal as createPortal3 } from "react-dom";
1927
- import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
1987
+ import { jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
1928
1988
  function cx6(...parts) {
1929
1989
  return parts.filter(Boolean).join(" ");
1930
1990
  }
@@ -2113,7 +2173,7 @@ function Tooltip({
2113
2173
  }
2114
2174
  }
2115
2175
  const floating = anchor != null && typeof document !== "undefined" ? createPortal3(
2116
- /* @__PURE__ */ jsx20(
2176
+ /* @__PURE__ */ jsx22(
2117
2177
  "span",
2118
2178
  {
2119
2179
  ref: boxRef,
@@ -2144,7 +2204,7 @@ function Tooltip({
2144
2204
  document.body
2145
2205
  ) : null;
2146
2206
  if (anchorRef) return floating;
2147
- return /* @__PURE__ */ jsxs18(
2207
+ return /* @__PURE__ */ jsxs20(
2148
2208
  "span",
2149
2209
  {
2150
2210
  ref,
@@ -2165,26 +2225,26 @@ function Tooltip({
2165
2225
  }
2166
2226
 
2167
2227
  // src/AdvertiserNoResults.tsx
2168
- import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
2228
+ import { jsx as jsx23, jsxs as jsxs21 } from "react/jsx-runtime";
2169
2229
  function AdvertiserNoResults({
2170
2230
  query,
2171
2231
  hint = "Try checking your spelling or searching for a broader brand name."
2172
2232
  }) {
2173
- return /* @__PURE__ */ jsxs19("div", { className: "flex flex-col items-center gap-1.5 px-4 py-8 text-center", children: [
2174
- /* @__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: [
2175
2235
  "No results found for \u201C",
2176
2236
  query,
2177
2237
  "\u201D"
2178
2238
  ] }),
2179
- /* @__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 })
2180
2240
  ] });
2181
2241
  }
2182
2242
 
2183
2243
  // src/SelectAllVisible.tsx
2184
2244
  import { ListChecks as ListChecks2 } from "lucide-react";
2185
- import { jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
2245
+ import { jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
2186
2246
  function SelectAllVisible({ count, allSelected, onToggle, testIdPrefix }) {
2187
- return /* @__PURE__ */ jsxs20(
2247
+ return /* @__PURE__ */ jsxs22(
2188
2248
  "button",
2189
2249
  {
2190
2250
  type: "button",
@@ -2192,7 +2252,7 @@ function SelectAllVisible({ count, allSelected, onToggle, testIdPrefix }) {
2192
2252
  onClick: onToggle,
2193
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",
2194
2254
  children: [
2195
- /* @__PURE__ */ jsx22(ListChecks2, { size: 14, "aria-hidden": "true" }),
2255
+ /* @__PURE__ */ jsx24(ListChecks2, { size: 14, "aria-hidden": "true" }),
2196
2256
  allSelected ? `Deselect ${count} visible` : `Select all ${count} visible`
2197
2257
  ]
2198
2258
  }
@@ -2201,14 +2261,14 @@ function SelectAllVisible({ count, allSelected, onToggle, testIdPrefix }) {
2201
2261
 
2202
2262
  // src/SelectedSection.tsx
2203
2263
  import { ChevronDown as ChevronDown7 } from "lucide-react";
2204
- import { jsx as jsx23, jsxs as jsxs21 } from "react/jsx-runtime";
2264
+ import { jsx as jsx25, jsxs as jsxs23 } from "react/jsx-runtime";
2205
2265
  function cx7(...parts) {
2206
2266
  return parts.filter(Boolean).join(" ");
2207
2267
  }
2208
2268
  function SelectedSection({ count, open, onToggle, children, testIdPrefix }) {
2209
2269
  if (count === 0) return null;
2210
- return /* @__PURE__ */ jsxs21("div", { className: "flex flex-col", children: [
2211
- /* @__PURE__ */ jsxs21(
2270
+ return /* @__PURE__ */ jsxs23("div", { className: "flex flex-col", children: [
2271
+ /* @__PURE__ */ jsxs23(
2212
2272
  "button",
2213
2273
  {
2214
2274
  type: "button",
@@ -2217,14 +2277,14 @@ function SelectedSection({ count, open, onToggle, children, testIdPrefix }) {
2217
2277
  "aria-expanded": open,
2218
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",
2219
2279
  children: [
2220
- /* @__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") }),
2221
2281
  "Selected (",
2222
2282
  count,
2223
2283
  ")"
2224
2284
  ]
2225
2285
  }
2226
2286
  ),
2227
- 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 })
2228
2288
  ] });
2229
2289
  }
2230
2290
 
@@ -2232,7 +2292,7 @@ function SelectedSection({ count, open, onToggle, children, testIdPrefix }) {
2232
2292
  import { useCallback as useCallback3, useEffect as useEffect9, useLayoutEffect as useLayoutEffect4, useMemo as useMemo3, useRef as useRef10, useState as useState9 } from "react";
2233
2293
  import { createPortal as createPortal4 } from "react-dom";
2234
2294
  import { Search as Search4, Plus, Info as Info2, ChevronRight as ChevronRight3, ChevronDown as ChevronDown8, Check as Check6, List, Loader2 } from "lucide-react";
2235
- 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";
2236
2296
  function cx8(...parts) {
2237
2297
  return parts.filter(Boolean).join(" ");
2238
2298
  }
@@ -2327,17 +2387,17 @@ function SelectionPicker({
2327
2387
  }
2328
2388
  };
2329
2389
  const rowGridCols = showInfoColumn ? "grid-cols-[36px_1fr_44px]" : "grid-cols-[36px_1fr]";
2330
- return /* @__PURE__ */ jsxs22("div", { className: "flex flex-col gap-4", children: [
2331
- helper && /* @__PURE__ */ jsxs22(Fragment4, { children: [
2332
- /* @__PURE__ */ jsx24("p", { className: "text-[13px] text-text-secondary", children: helper }),
2333
- /* @__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" })
2334
2394
  ] }),
2335
- 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: [
2336
2396
  { id: "search", label: "Search", icon: Search4 },
2337
2397
  { id: "lists", label: "Account lists", icon: List }
2338
2398
  ].map((t) => {
2339
2399
  const on = source === t.id;
2340
- return /* @__PURE__ */ jsxs22(
2400
+ return /* @__PURE__ */ jsxs24(
2341
2401
  "button",
2342
2402
  {
2343
2403
  type: "button",
@@ -2348,18 +2408,18 @@ function SelectionPicker({
2348
2408
  on ? "bg-surface text-text-primary shadow-raised" : "text-text-secondary hover:text-text-primary"
2349
2409
  ),
2350
2410
  children: [
2351
- /* @__PURE__ */ jsx24(t.icon, { size: 14, "aria-hidden": "true" }),
2411
+ /* @__PURE__ */ jsx26(t.icon, { size: 14, "aria-hidden": "true" }),
2352
2412
  t.label
2353
2413
  ]
2354
2414
  },
2355
2415
  t.id
2356
2416
  );
2357
2417
  }) }),
2358
- source === "search" && /* @__PURE__ */ jsxs22("div", { className: "flex min-w-0 flex-col gap-3", children: [
2359
- /* @__PURE__ */ jsxs22("div", { className: "flex flex-wrap items-center gap-2", children: [
2360
- /* @__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: [
2361
- /* @__PURE__ */ jsx24(Search4, { size: 15, className: "text-text-secondary", "aria-hidden": "true" }),
2362
- /* @__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(
2363
2423
  "input",
2364
2424
  {
2365
2425
  value: query,
@@ -2375,7 +2435,7 @@ function SelectionPicker({
2375
2435
  }
2376
2436
  )
2377
2437
  ] }),
2378
- filters.map((f) => /* @__PURE__ */ jsx24(
2438
+ filters.map((f) => /* @__PURE__ */ jsx26(
2379
2439
  FilterDropdown,
2380
2440
  {
2381
2441
  filter: f,
@@ -2387,14 +2447,14 @@ function SelectionPicker({
2387
2447
  )),
2388
2448
  toolbarExtra
2389
2449
  ] }),
2390
- !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: [
2391
- /* @__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" }) }),
2392
- /* @__PURE__ */ jsxs22("div", { className: "flex flex-col gap-1", children: [
2393
- /* @__PURE__ */ jsx24("p", { className: "text-[14px] font-semibold text-text-primary", children: "Search to get started" }),
2394
- /* @__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." })
2395
2455
  ] })
2396
- ] }) : /* @__PURE__ */ jsxs22("div", { className: "overflow-hidden rounded-control border border-border-default", children: [
2397
- /* @__PURE__ */ jsxs22(
2456
+ ] }) : /* @__PURE__ */ jsxs24("div", { className: "overflow-hidden rounded-control border border-border-default", children: [
2457
+ /* @__PURE__ */ jsxs24(
2398
2458
  "div",
2399
2459
  {
2400
2460
  className: cx8(
@@ -2402,7 +2462,7 @@ function SelectionPicker({
2402
2462
  rowGridCols
2403
2463
  ),
2404
2464
  children: [
2405
- /* @__PURE__ */ jsx24(
2465
+ /* @__PURE__ */ jsx26(
2406
2466
  CheckBox,
2407
2467
  {
2408
2468
  checked: allSelected,
@@ -2413,18 +2473,18 @@ function SelectionPicker({
2413
2473
  testId: testIdPrefix && `${testIdPrefix}-select-all`
2414
2474
  }
2415
2475
  ),
2416
- /* @__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)) }),
2417
- 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" })
2418
2478
  ]
2419
2479
  }
2420
2480
  ),
2421
- /* @__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) => {
2422
2482
  const isSel = selectedIds.has(row.id);
2423
2483
  const isLocked = lockedIds?.has(row.id) ?? false;
2424
2484
  const kids = getChildren?.(row);
2425
2485
  const isOpen = expanded.has(row.id);
2426
- return /* @__PURE__ */ jsxs22("div", { className: "border-t border-border-default/60 first:border-t-0", children: [
2427
- /* @__PURE__ */ jsxs22(
2486
+ return /* @__PURE__ */ jsxs24("div", { className: "border-t border-border-default/60 first:border-t-0", children: [
2487
+ /* @__PURE__ */ jsxs24(
2428
2488
  "div",
2429
2489
  {
2430
2490
  onClick: isLocked ? void 0 : () => toggleRow(row),
@@ -2437,7 +2497,7 @@ function SelectionPicker({
2437
2497
  !isLocked && isSel && "opacity-70"
2438
2498
  ),
2439
2499
  children: [
2440
- isLocked ? /* @__PURE__ */ jsx24("span", { "aria-hidden": "true" }) : /* @__PURE__ */ jsx24(
2500
+ isLocked ? /* @__PURE__ */ jsx26("span", { "aria-hidden": "true" }) : /* @__PURE__ */ jsx26(
2441
2501
  CheckBox,
2442
2502
  {
2443
2503
  checked: isSel,
@@ -2446,8 +2506,8 @@ function SelectionPicker({
2446
2506
  testId: testIdPrefix && `${testIdPrefix}-row-${slug4(row.id)}`
2447
2507
  }
2448
2508
  ),
2449
- /* @__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)) }),
2450
- 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(
2451
2511
  "button",
2452
2512
  {
2453
2513
  type: "button",
@@ -2461,28 +2521,28 @@ function SelectionPicker({
2461
2521
  });
2462
2522
  },
2463
2523
  className: "flex h-7 w-7 items-center justify-center rounded-control text-text-secondary hover:bg-canvas hover:text-text-primary",
2464
- 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") })
2465
2525
  }
2466
- ) : /* @__PURE__ */ jsx24(
2526
+ ) : /* @__PURE__ */ jsx26(
2467
2527
  "span",
2468
2528
  {
2469
2529
  className: "flex h-7 w-7 items-center justify-center text-text-tertiary",
2470
2530
  title: "No additional details",
2471
- children: /* @__PURE__ */ jsx24(Info2, { size: 14 })
2531
+ children: /* @__PURE__ */ jsx26(Info2, { size: 14 })
2472
2532
  }
2473
2533
  ) })
2474
2534
  ]
2475
2535
  }
2476
2536
  ),
2477
- 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) => {
2478
2538
  const kidSel = selectedIds.has(kid.id);
2479
- return /* @__PURE__ */ jsxs22(
2539
+ return /* @__PURE__ */ jsxs24(
2480
2540
  "div",
2481
2541
  {
2482
2542
  className: "flex items-center justify-between gap-2 border-t border-border-default/40 py-2 first:border-t-0",
2483
2543
  children: [
2484
- /* @__PURE__ */ jsx24("span", { className: "truncate text-[13px] text-text-secondary", children: kid.name }),
2485
- /* @__PURE__ */ jsxs22(
2544
+ /* @__PURE__ */ jsx26("span", { className: "truncate text-[13px] text-text-secondary", children: kid.name }),
2545
+ /* @__PURE__ */ jsxs24(
2486
2546
  "button",
2487
2547
  {
2488
2548
  type: "button",
@@ -2493,7 +2553,7 @@ function SelectionPicker({
2493
2553
  kidSel ? "text-text-tertiary" : "text-text-link hover:bg-subtle"
2494
2554
  ),
2495
2555
  children: [
2496
- kidSel ? /* @__PURE__ */ jsx24(Check6, { size: 13 }) : /* @__PURE__ */ jsx24(Plus, { size: 13 }),
2556
+ kidSel ? /* @__PURE__ */ jsx26(Check6, { size: 13 }) : /* @__PURE__ */ jsx26(Plus, { size: 13 }),
2497
2557
  kidSel ? "Added" : "Add"
2498
2558
  ]
2499
2559
  }
@@ -2505,7 +2565,7 @@ function SelectionPicker({
2505
2565
  }) })
2506
2566
  ] }, row.id);
2507
2567
  }) }),
2508
- !loading && !error && hasMore && /* @__PURE__ */ jsxs22(
2568
+ !loading && !error && hasMore && /* @__PURE__ */ jsxs24(
2509
2569
  "button",
2510
2570
  {
2511
2571
  type: "button",
@@ -2514,19 +2574,19 @@ function SelectionPicker({
2514
2574
  "data-testid": testIdPrefix && `${testIdPrefix}-load-more`,
2515
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",
2516
2576
  children: [
2517
- 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,
2518
2578
  loadingMore ? "Loading\u2026" : "Load more"
2519
2579
  ]
2520
2580
  }
2521
2581
  )
2522
2582
  ] })
2523
2583
  ] }),
2524
- source === "lists" && /* @__PURE__ */ jsxs22("div", { className: "flex min-w-0 flex-col gap-3", children: [
2525
- /* @__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." }),
2526
- accountLists && accountLists.length > 0 ? /* @__PURE__ */ jsxs22(Fragment4, { children: [
2527
- /* @__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) => {
2528
2588
  const on = (selectedListIds ?? []).includes(list.id);
2529
- return /* @__PURE__ */ jsxs22(
2589
+ return /* @__PURE__ */ jsxs24(
2530
2590
  "button",
2531
2591
  {
2532
2592
  type: "button",
@@ -2538,19 +2598,19 @@ function SelectionPicker({
2538
2598
  on ? "border-brand-primaryAction bg-brand-primarySoft" : "border-border-default bg-surface hover:bg-subtle"
2539
2599
  ),
2540
2600
  children: [
2541
- /* @__PURE__ */ jsx24(
2601
+ /* @__PURE__ */ jsx26(
2542
2602
  "span",
2543
2603
  {
2544
2604
  className: cx8(
2545
2605
  "flex h-5 w-5 shrink-0 items-center justify-center rounded-full",
2546
2606
  on ? "text-brand-primaryAction" : "text-text-secondary"
2547
2607
  ),
2548
- 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 })
2549
2609
  }
2550
2610
  ),
2551
- /* @__PURE__ */ jsxs22("span", { className: "min-w-0 flex-1", children: [
2552
- /* @__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 }) }),
2553
- /* @__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: [
2554
2614
  list.count,
2555
2615
  " accounts \xB7 ",
2556
2616
  list.entityTypes.join(", "),
@@ -2558,13 +2618,13 @@ function SelectionPicker({
2558
2618
  formatListDate(list.updatedAt)
2559
2619
  ] })
2560
2620
  ] }),
2561
- /* @__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" })
2562
2622
  ]
2563
2623
  },
2564
2624
  list.id
2565
2625
  );
2566
2626
  }) }),
2567
- /* @__PURE__ */ jsxs22(
2627
+ /* @__PURE__ */ jsxs24(
2568
2628
  "p",
2569
2629
  {
2570
2630
  className: "border-t border-border-default pt-2 text-right text-[12px] font-medium text-text-tertiary",
@@ -2576,11 +2636,11 @@ function SelectionPicker({
2576
2636
  ]
2577
2637
  }
2578
2638
  )
2579
- ] }) : /* @__PURE__ */ jsxs22("div", { className: "flex flex-col items-center gap-3 rounded-card border border-dashed border-border-default py-10 text-center", children: [
2580
- /* @__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" }) }),
2581
- /* @__PURE__ */ jsxs22("div", { className: "flex flex-col gap-1", children: [
2582
- /* @__PURE__ */ jsx24("p", { className: "text-[14px] font-semibold text-text-primary", children: "No account lists yet" }),
2583
- /* @__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." })
2584
2644
  ] })
2585
2645
  ] })
2586
2646
  ] })
@@ -2612,7 +2672,7 @@ function ScrollFade({ className, children }) {
2612
2672
  [sync]
2613
2673
  );
2614
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;
2615
- 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 });
2616
2676
  }
2617
2677
  function formatListDate(iso) {
2618
2678
  try {
@@ -2662,8 +2722,8 @@ function FilterDropdown({
2662
2722
  const count = active.size;
2663
2723
  const label = count === 0 ? filter.label : count === 1 ? [...active][0] : "Multiple";
2664
2724
  const filterSlug = slug4(filter.label);
2665
- return /* @__PURE__ */ jsxs22("div", { className: "relative", children: [
2666
- /* @__PURE__ */ jsxs22(
2725
+ return /* @__PURE__ */ jsxs24("div", { className: "relative", children: [
2726
+ /* @__PURE__ */ jsxs24(
2667
2727
  "button",
2668
2728
  {
2669
2729
  ref: btnRef,
@@ -2674,12 +2734,12 @@ function FilterDropdown({
2674
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",
2675
2735
  children: [
2676
2736
  label,
2677
- /* @__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") })
2678
2738
  ]
2679
2739
  }
2680
2740
  ),
2681
2741
  open && pos && createPortal4(
2682
- /* @__PURE__ */ jsxs22(
2742
+ /* @__PURE__ */ jsxs24(
2683
2743
  "div",
2684
2744
  {
2685
2745
  ref: menuRef,
@@ -2688,9 +2748,9 @@ function FilterDropdown({
2688
2748
  style: { top: pos.top, left: pos.left },
2689
2749
  className: "fixed z-[80] min-w-[220px] rounded-card border border-border-default bg-surface p-2 shadow-overlay",
2690
2750
  children: [
2691
- 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: [
2692
- /* @__PURE__ */ jsx24(Search4, { size: 14, className: "shrink-0 text-text-secondary", "aria-hidden": "true" }),
2693
- /* @__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(
2694
2754
  "input",
2695
2755
  {
2696
2756
  autoFocus: true,
@@ -2701,14 +2761,14 @@ function FilterDropdown({
2701
2761
  }
2702
2762
  )
2703
2763
  ] }),
2704
- /* @__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) => {
2705
2765
  const on = active.has(opt);
2706
- return /* @__PURE__ */ jsxs22(
2766
+ return /* @__PURE__ */ jsxs24(
2707
2767
  "label",
2708
2768
  {
2709
2769
  className: "flex cursor-pointer items-center gap-2 rounded-control px-2 py-1.5 text-[13px] text-text-primary hover:bg-subtle",
2710
2770
  children: [
2711
- /* @__PURE__ */ jsx24(
2771
+ /* @__PURE__ */ jsx26(
2712
2772
  CheckBox,
2713
2773
  {
2714
2774
  checked: on,
@@ -2739,7 +2799,7 @@ function gridForColumns(columns) {
2739
2799
 
2740
2800
  // src/PublisherBreakdownList.tsx
2741
2801
  import { useState as useState10 } from "react";
2742
- import { jsx as jsx25, jsxs as jsxs23 } from "react/jsx-runtime";
2802
+ import { jsx as jsx27, jsxs as jsxs25 } from "react/jsx-runtime";
2743
2803
  function cx9(...parts) {
2744
2804
  return parts.filter(Boolean).join(" ");
2745
2805
  }
@@ -2754,7 +2814,7 @@ function initials(name) {
2754
2814
  return name.replace(/[^a-zA-Z0-9]/g, "").slice(0, 2).toUpperCase();
2755
2815
  }
2756
2816
  function Monogram({ name, size = 28 }) {
2757
- return /* @__PURE__ */ jsx25(
2817
+ return /* @__PURE__ */ jsx27(
2758
2818
  "span",
2759
2819
  {
2760
2820
  "aria-hidden": "true",
@@ -2765,12 +2825,12 @@ function Monogram({ name, size = 28 }) {
2765
2825
  );
2766
2826
  }
2767
2827
  function BreakdownTag({ children }) {
2768
- 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 });
2769
2829
  }
2770
2830
  function DelayedTip({ label, children }) {
2771
- 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: [
2772
2832
  children,
2773
- /* @__PURE__ */ jsx25(
2833
+ /* @__PURE__ */ jsx27(
2774
2834
  "span",
2775
2835
  {
2776
2836
  role: "tooltip",
@@ -2784,22 +2844,22 @@ var COL_CURRENT = 76;
2784
2844
  var COL_PREVIOUS = 76;
2785
2845
  var COL_YOY = 44;
2786
2846
  function MetricListHeader({ className }) {
2787
- return /* @__PURE__ */ jsxs23("div", { className: cx9("flex items-baseline gap-2 pb-2", className), children: [
2788
- /* @__PURE__ */ jsx25("span", { className: "flex-1" }),
2789
- /* @__PURE__ */ jsxs23("span", { className: "flex shrink-0 items-center gap-2 pr-1.5", children: [
2790
- /* @__PURE__ */ jsx25("span", { className: "text-right text-[11px] font-medium text-text-tertiary", style: { width: COL_CURRENT }, children: "Current" }),
2791
- /* @__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" }) }),
2792
- /* @__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" }) })
2793
2853
  ] })
2794
2854
  ] });
2795
2855
  }
2796
2856
  function MetricCells({ spendN, yoy }) {
2797
2857
  const prior = priorYearAmt(spendN, yoy);
2798
2858
  const up = yoy !== "NEW" && yoy >= 0;
2799
- return /* @__PURE__ */ jsxs23("span", { className: "flex shrink-0 items-center gap-2 pr-1.5", children: [
2800
- /* @__PURE__ */ jsx25("span", { className: "text-right text-[12px] font-bold tabular-nums text-text-primary", style: { width: COL_CURRENT }, children: fmtM(spendN) }),
2801
- /* @__PURE__ */ jsx25("span", { className: "text-right text-[12px] font-normal tabular-nums text-text-primary", style: { width: COL_PREVIOUS }, children: prior ?? "\u2014" }),
2802
- /* @__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: [
2803
2863
  up ? "+" : "\u2212",
2804
2864
  Math.abs(yoy),
2805
2865
  "%"
@@ -2810,35 +2870,35 @@ function PublisherBreakdownList({ rows, defaultVisibleCount = 10, padded = true,
2810
2870
  const [showAll, setShowAll] = useState10(false);
2811
2871
  const visible = showAll ? rows : rows.slice(0, defaultVisibleCount);
2812
2872
  const rowPad = padded ? "px-5" : "";
2813
- return /* @__PURE__ */ jsxs23("div", { className: "flex flex-col", children: [
2814
- /* @__PURE__ */ jsxs23("div", { className: "flex flex-col", children: [
2815
- /* @__PURE__ */ jsx25(MetricListHeader, { className: rowPad }),
2816
- 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: [
2817
- /* @__PURE__ */ jsxs23("div", { className: "flex min-w-0 items-center gap-2.5", children: [
2818
- renderLogo ? renderLogo(p) : /* @__PURE__ */ jsx25(Monogram, { name: p.brand, size: 28 }),
2819
- /* @__PURE__ */ jsxs23("div", { className: "min-w-0", children: [
2820
- /* @__PURE__ */ jsxs23("div", { className: "flex flex-wrap items-center gap-1.5", children: [
2821
- /* @__PURE__ */ jsx25("span", { className: "text-[14px] font-semibold text-text-primary", children: p.brand }),
2822
- 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))
2823
2883
  ] }),
2824
- /* @__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 })
2825
2885
  ] })
2826
2886
  ] }),
2827
- /* @__PURE__ */ jsx25(MetricCells, { spendN: p.spendN, yoy: p.yoy })
2887
+ /* @__PURE__ */ jsx27(MetricCells, { spendN: p.spendN, yoy: p.yoy })
2828
2888
  ] }, p.brand))
2829
2889
  ] }),
2830
- 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: [
2831
- /* @__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: [
2832
2892
  "Showing ",
2833
2893
  visible.length,
2834
2894
  " of ",
2835
2895
  rows.length
2836
2896
  ] }),
2837
- !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: [
2838
2898
  "See all (",
2839
2899
  rows.length - defaultVisibleCount,
2840
2900
  " more)"
2841
- ] }) : /* @__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" })
2842
2902
  ] }))
2843
2903
  ] });
2844
2904
  }
@@ -2848,7 +2908,7 @@ import { forwardRef as forwardRef2 } from "react";
2848
2908
  import { Slot } from "@radix-ui/react-slot";
2849
2909
  import { cva } from "class-variance-authority";
2850
2910
  import { Loader2 as Loader22 } from "lucide-react";
2851
- import { jsx as jsx26, jsxs as jsxs24 } from "react/jsx-runtime";
2911
+ import { jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
2852
2912
  var buttonVariants = cva(
2853
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",
2854
2914
  {
@@ -2918,10 +2978,10 @@ var Button = forwardRef2(
2918
2978
  ...props
2919
2979
  };
2920
2980
  if (asChild) {
2921
- return /* @__PURE__ */ jsx26(Slot, { ref, ...shared, children });
2981
+ return /* @__PURE__ */ jsx28(Slot, { ref, ...shared, children });
2922
2982
  }
2923
- return /* @__PURE__ */ jsxs24("button", { ref, ...shared, children: [
2924
- 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" }),
2925
2985
  children
2926
2986
  ] });
2927
2987
  }
@@ -2929,14 +2989,14 @@ var Button = forwardRef2(
2929
2989
  Button.displayName = "Button";
2930
2990
 
2931
2991
  // src/FilterDropdownFooter.tsx
2932
- import { jsx as jsx27, jsxs as jsxs25 } from "react/jsx-runtime";
2992
+ import { jsx as jsx29, jsxs as jsxs27 } from "react/jsx-runtime";
2933
2993
  function FilterDropdownFooter({
2934
2994
  onClear,
2935
2995
  onApply,
2936
2996
  clearLabel = "Clear all",
2937
2997
  applyLabel = "Apply"
2938
2998
  }) {
2939
- return /* @__PURE__ */ jsxs25(
2999
+ return /* @__PURE__ */ jsxs27(
2940
3000
  "div",
2941
3001
  {
2942
3002
  className: cn(
@@ -2944,8 +3004,8 @@ function FilterDropdownFooter({
2944
3004
  onClear ? "justify-between" : "justify-end"
2945
3005
  ),
2946
3006
  children: [
2947
- onClear && /* @__PURE__ */ jsx27(Button, { type: "button", variant: "ghost", size: "sm", onClick: onClear, children: clearLabel }),
2948
- /* @__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 })
2949
3009
  ]
2950
3010
  }
2951
3011
  );
@@ -2954,7 +3014,7 @@ function FilterDropdownFooter({
2954
3014
  // src/NameListModal.tsx
2955
3015
  import { useEffect as useEffect10, useId as useId4, useRef as useRef11, useState as useState11 } from "react";
2956
3016
  import { createPortal as createPortal5 } from "react-dom";
2957
- import { jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
3017
+ import { jsx as jsx30, jsxs as jsxs28 } from "react/jsx-runtime";
2958
3018
  function NameListModal({
2959
3019
  title,
2960
3020
  initialName,
@@ -3006,12 +3066,12 @@ function NameListModal({
3006
3066
  // bg-scrim, not a literal: design-tokens gained a scrim token in 2.5.0.
3007
3067
  // No in-data-[theme=dark] override needed any more -- the token redefines
3008
3068
  // itself under that attribute in dark.css, so one class covers both themes.
3009
- /* @__PURE__ */ jsx28(
3069
+ /* @__PURE__ */ jsx30(
3010
3070
  "div",
3011
3071
  {
3012
3072
  className: "fixed inset-0 z-modal flex items-center justify-center bg-scrim px-4",
3013
3073
  onMouseDown: (e) => e.target === e.currentTarget && onCancel(),
3014
- children: /* @__PURE__ */ jsxs26(
3074
+ children: /* @__PURE__ */ jsxs28(
3015
3075
  "div",
3016
3076
  {
3017
3077
  ref: dialogRef,
@@ -3021,10 +3081,10 @@ function NameListModal({
3021
3081
  onKeyDown: trapTab,
3022
3082
  className: "w-full max-w-110 rounded-card border border-border-default bg-surface p-5 shadow-overlay",
3023
3083
  children: [
3024
- /* @__PURE__ */ jsx28("h2", { id: titleId, className: "text-[16px] font-semibold text-text-primary", children: title }),
3025
- /* @__PURE__ */ jsxs26("div", { className: "mt-4 flex flex-col gap-1.5", children: [
3026
- /* @__PURE__ */ jsx28("label", { htmlFor: fieldId, className: "text-[12px] font-medium text-text-secondary", children: fieldLabel }),
3027
- /* @__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(
3028
3088
  "input",
3029
3089
  {
3030
3090
  id: fieldId,
@@ -3036,13 +3096,13 @@ function NameListModal({
3036
3096
  }
3037
3097
  )
3038
3098
  ] }),
3039
- 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: [
3040
- /* @__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 }),
3041
3101
  o.label
3042
3102
  ] }, o.key)) }),
3043
- /* @__PURE__ */ jsxs26("div", { className: "mt-5 flex items-center justify-end gap-2", children: [
3044
- /* @__PURE__ */ jsx28(Button, { variant: "secondary", onClick: onCancel, children: "Cancel" }),
3045
- /* @__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 })
3046
3106
  ] })
3047
3107
  ]
3048
3108
  }
@@ -3053,37 +3113,13 @@ function NameListModal({
3053
3113
  );
3054
3114
  }
3055
3115
 
3056
- // src/ChipTrigger.tsx
3057
- import { jsx as jsx29, jsxs as jsxs27 } from "react/jsx-runtime";
3058
- function chipTriggerClass(_variant = "box") {
3059
- return cn(
3060
- "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"
3061
- // One stroke for every trigger: a `box` chip on the lighter default
3062
- // border sat beside SelectFilter's darker one in the same row and read as
3063
- // a different kind of control. The variant no longer changes anything.
3064
- );
3065
- }
3066
- function ChipContent({ caption, value, icon }) {
3067
- const stack = /* @__PURE__ */ jsxs27("span", { className: "flex flex-col gap-1 text-left leading-none", children: [
3068
- /* @__PURE__ */ jsx29("span", { className: "text-control-caption uppercase tracking-wide text-text-tertiary", children: caption }),
3069
- /* @__PURE__ */ jsx29("span", { className: "text-[12px] font-medium text-text-primary", children: value })
3070
- ] });
3071
- if (icon) {
3072
- return /* @__PURE__ */ jsxs27("span", { className: "flex items-center gap-2", children: [
3073
- /* @__PURE__ */ jsx29("span", { className: "shrink-0 text-text-tertiary", children: icon }),
3074
- stack
3075
- ] });
3076
- }
3077
- return stack;
3078
- }
3079
-
3080
3116
  // src/FilterChipBar.tsx
3081
3117
  import { CircleSlash, X as X4 } from "lucide-react";
3082
- import { jsx as jsx30, jsxs as jsxs28 } from "react/jsx-runtime";
3118
+ import { jsx as jsx31, jsxs as jsxs29 } from "react/jsx-runtime";
3083
3119
  function FilterChipBar({ chips, onRemove, onClearAll, parkedKeys }) {
3084
3120
  if (chips.length === 0) return null;
3085
- return /* @__PURE__ */ jsxs28("div", { className: "flex flex-wrap items-center gap-1.5 border-t border-border-default pt-2.5", children: [
3086
- 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(
3087
3123
  Chip,
3088
3124
  {
3089
3125
  label: c.label,
@@ -3093,7 +3129,7 @@ function FilterChipBar({ chips, onRemove, onClearAll, parkedKeys }) {
3093
3129
  },
3094
3130
  c.key
3095
3131
  )),
3096
- /* @__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" })
3097
3133
  ] });
3098
3134
  }
3099
3135
  function Chip({
@@ -3102,8 +3138,8 @@ function Chip({
3102
3138
  parked,
3103
3139
  onRemove
3104
3140
  }) {
3105
- return /* @__PURE__ */ jsxs28("span", { className: "group relative inline-flex", children: [
3106
- /* @__PURE__ */ jsxs28(
3141
+ return /* @__PURE__ */ jsxs29("span", { className: "group relative inline-flex", children: [
3142
+ /* @__PURE__ */ jsxs29(
3107
3143
  "span",
3108
3144
  {
3109
3145
  className: cn(
@@ -3115,22 +3151,22 @@ function Chip({
3115
3151
  ) : "bg-subtle text-text-secondary ring-transparent group-hover:bg-border-default group-hover:text-text-primary group-hover:ring-border-interactive"
3116
3152
  ),
3117
3153
  children: [
3118
- 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" }),
3119
3155
  label,
3120
- /* @__PURE__ */ jsx30(
3156
+ /* @__PURE__ */ jsx31(
3121
3157
  "button",
3122
3158
  {
3123
3159
  type: "button",
3124
3160
  onClick: onRemove,
3125
3161
  "aria-label": `Remove ${groupLabel}: ${label}`,
3126
3162
  className: "text-text-tertiary transition-colors hover:text-text-primary",
3127
- children: /* @__PURE__ */ jsx30(X4, { size: 12 })
3163
+ children: /* @__PURE__ */ jsx31(X4, { size: 12 })
3128
3164
  }
3129
3165
  )
3130
3166
  ]
3131
3167
  }
3132
3168
  ),
3133
- /* @__PURE__ */ jsx30(
3169
+ /* @__PURE__ */ jsx31(
3134
3170
  "span",
3135
3171
  {
3136
3172
  role: "tooltip",
@@ -3143,7 +3179,7 @@ function Chip({
3143
3179
 
3144
3180
  // src/SortButton.tsx
3145
3181
  import { ArrowUp, ArrowDown, ArrowUpDown } from "lucide-react";
3146
- import { jsx as jsx31, jsxs as jsxs29 } from "react/jsx-runtime";
3182
+ import { jsx as jsx32, jsxs as jsxs30 } from "react/jsx-runtime";
3147
3183
  var ALIGN = {
3148
3184
  left: "justify-start text-left",
3149
3185
  center: "justify-center text-center",
@@ -3159,9 +3195,9 @@ function SortButton({
3159
3195
  align = "left",
3160
3196
  testIdPrefix
3161
3197
  }) {
3162
- 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 });
3163
3199
  const active = !disabled && sort.key === sortKey;
3164
- return /* @__PURE__ */ jsxs29(
3200
+ return /* @__PURE__ */ jsxs30(
3165
3201
  "button",
3166
3202
  {
3167
3203
  type: "button",
@@ -3190,7 +3226,7 @@ function SortButton({
3190
3226
  ),
3191
3227
  children: [
3192
3228
  label,
3193
- !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(
3194
3230
  ArrowUpDown,
3195
3231
  {
3196
3232
  size: 12,
@@ -3219,7 +3255,7 @@ function ariaSortFor(sort, key) {
3219
3255
 
3220
3256
  // src/Pager.tsx
3221
3257
  import { ChevronLeft as ChevronLeft3, ChevronRight as ChevronRight4 } from "lucide-react";
3222
- import { jsx as jsx32, jsxs as jsxs30 } from "react/jsx-runtime";
3258
+ import { jsx as jsx33, jsxs as jsxs31 } from "react/jsx-runtime";
3223
3259
  function pageWindow(current, total) {
3224
3260
  if (total <= 7) return Array.from({ length: total }, (_, i) => i + 1);
3225
3261
  const keep = /* @__PURE__ */ new Set([1, total, current, current - 1, current + 1]);
@@ -3235,8 +3271,8 @@ function pageWindow(current, total) {
3235
3271
  }
3236
3272
  function Pager({ page, totalPages, onPage, disabled = false, label = "Pagination" }) {
3237
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";
3238
- return /* @__PURE__ */ jsxs30("nav", { "aria-label": label, className: "flex items-center gap-1", children: [
3239
- /* @__PURE__ */ jsx32(
3274
+ return /* @__PURE__ */ jsxs31("nav", { "aria-label": label, className: "flex items-center gap-1", children: [
3275
+ /* @__PURE__ */ jsx33(
3240
3276
  "button",
3241
3277
  {
3242
3278
  type: "button",
@@ -3244,11 +3280,11 @@ function Pager({ page, totalPages, onPage, disabled = false, label = "Pagination
3244
3280
  disabled: disabled || page === 1,
3245
3281
  "aria-label": "Previous page",
3246
3282
  className: cn(btn, "text-text-secondary hover:bg-subtle hover:text-text-primary"),
3247
- children: /* @__PURE__ */ jsx32(ChevronLeft3, { size: 16 })
3283
+ children: /* @__PURE__ */ jsx33(ChevronLeft3, { size: 16 })
3248
3284
  }
3249
3285
  ),
3250
3286
  pageWindow(page, totalPages).map(
3251
- (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(
3252
3288
  "button",
3253
3289
  {
3254
3290
  type: "button",
@@ -3257,14 +3293,14 @@ function Pager({ page, totalPages, onPage, disabled = false, label = "Pagination
3257
3293
  "aria-current": p === page ? "page" : void 0,
3258
3294
  className: cn(
3259
3295
  btn,
3260
- 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"
3261
3297
  ),
3262
3298
  children: p.toLocaleString()
3263
3299
  },
3264
3300
  p
3265
3301
  )
3266
3302
  ),
3267
- /* @__PURE__ */ jsx32(
3303
+ /* @__PURE__ */ jsx33(
3268
3304
  "button",
3269
3305
  {
3270
3306
  type: "button",
@@ -3272,14 +3308,14 @@ function Pager({ page, totalPages, onPage, disabled = false, label = "Pagination
3272
3308
  disabled: disabled || page === totalPages,
3273
3309
  "aria-label": "Next page",
3274
3310
  className: cn(btn, "text-text-secondary hover:bg-subtle hover:text-text-primary"),
3275
- children: /* @__PURE__ */ jsx32(ChevronRight4, { size: 16 })
3311
+ children: /* @__PURE__ */ jsx33(ChevronRight4, { size: 16 })
3276
3312
  }
3277
3313
  )
3278
3314
  ] });
3279
3315
  }
3280
3316
 
3281
3317
  // src/WorkspaceAvatar.tsx
3282
- import { jsx as jsx33 } from "react/jsx-runtime";
3318
+ import { jsx as jsx34 } from "react/jsx-runtime";
3283
3319
  function workspaceInitials(name) {
3284
3320
  const words = name.trim().split(/\s+/).filter(Boolean);
3285
3321
  if (words.length === 0) return "\xB7";
@@ -3297,7 +3333,7 @@ var SIZES = {
3297
3333
  lg: "h-11 w-11 text-panel-title"
3298
3334
  };
3299
3335
  function WorkspaceAvatar({ name, size = "md" }) {
3300
- return /* @__PURE__ */ jsx33(
3336
+ return /* @__PURE__ */ jsx34(
3301
3337
  "span",
3302
3338
  {
3303
3339
  "aria-hidden": "true",
@@ -3314,11 +3350,11 @@ function WorkspaceAvatar({ name, size = "md" }) {
3314
3350
  import { useEffect as useEffect11, useRef as useRef12, useState as useState12 } from "react";
3315
3351
  import { createPortal as createPortal6 } from "react-dom";
3316
3352
  import { AlertTriangle, Check as Check7 } from "lucide-react";
3317
- import { jsx as jsx34, jsxs as jsxs31 } from "react/jsx-runtime";
3353
+ import { jsx as jsx35, jsxs as jsxs32 } from "react/jsx-runtime";
3318
3354
  var ICON = {
3319
3355
  neutral: null,
3320
- success: /* @__PURE__ */ jsx34(Check7, { size: 15, className: "shrink-0", "aria-hidden": "true" }),
3321
- 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" })
3322
3358
  };
3323
3359
  function Toast({ message, action, onClose, tone = "neutral", duration, className }) {
3324
3360
  const ms = duration ?? (action ? 1e4 : 5e3);
@@ -3334,7 +3370,7 @@ function Toast({ message, action, onClose, tone = "neutral", duration, className
3334
3370
  return () => window.clearTimeout(t);
3335
3371
  }, [message, ms, paused]);
3336
3372
  return createPortal6(
3337
- /* @__PURE__ */ jsxs31(
3373
+ /* @__PURE__ */ jsxs32(
3338
3374
  "div",
3339
3375
  {
3340
3376
  role: "status",
@@ -3351,7 +3387,7 @@ function Toast({ message, action, onClose, tone = "neutral", duration, className
3351
3387
  children: [
3352
3388
  ICON[tone] && // The inverse pair, not text-success / text-warning: those are tuned
3353
3389
  // for the page, and on the toast's flipped surface amber drops to 2:1.
3354
- /* @__PURE__ */ jsx34(
3390
+ /* @__PURE__ */ jsx35(
3355
3391
  "span",
3356
3392
  {
3357
3393
  className: cn(
@@ -3361,8 +3397,8 @@ function Toast({ message, action, onClose, tone = "neutral", duration, className
3361
3397
  children: ICON[tone]
3362
3398
  }
3363
3399
  ),
3364
- /* @__PURE__ */ jsx34("span", { className: "min-w-0", children: message }),
3365
- action && /* @__PURE__ */ jsx34(
3400
+ /* @__PURE__ */ jsx35("span", { className: "min-w-0", children: message }),
3401
+ action && /* @__PURE__ */ jsx35(
3366
3402
  "button",
3367
3403
  {
3368
3404
  type: "button",
@@ -3384,29 +3420,14 @@ function Toast({ message, action, onClose, tone = "neutral", duration, className
3384
3420
  }
3385
3421
 
3386
3422
  // src/Tag.tsx
3387
- import { jsx as jsx35 } from "react/jsx-runtime";
3423
+ import { jsx as jsx36 } from "react/jsx-runtime";
3388
3424
  function Tag({ children, className }) {
3389
- return /* @__PURE__ */ jsx35(
3390
- "span",
3391
- {
3392
- className: cn(
3393
- // text-micro and tertiary ink. The component used to sit at 11px in
3394
- // secondary -- a step darker than the ten hand-rolled copies the audit
3395
- // found, which had independently drifted to tertiary. Ten people
3396
- // reaching for "quieter" is worth more than the component's original
3397
- // guess: a tag names what a row IS, which is background to the row
3398
- // itself rather than part of it.
3399
- "inline-flex items-center whitespace-nowrap rounded-full bg-subtle px-2 py-0.5 text-micro font-medium text-text-tertiary",
3400
- className
3401
- ),
3402
- children
3403
- }
3404
- );
3425
+ return /* @__PURE__ */ jsx36(Badge, { kind: "category", className, children });
3405
3426
  }
3406
3427
 
3407
3428
  // src/TablePagination.tsx
3408
- import { ChevronDown as ChevronDown9, ChevronFirst, ChevronLast, ChevronLeft as ChevronLeft4, ChevronRight as ChevronRight5 } from "lucide-react";
3409
- 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";
3410
3431
  function TablePagination({
3411
3432
  page,
3412
3433
  perPage,
@@ -3426,7 +3447,7 @@ function TablePagination({
3426
3447
  const btn = "flex h-8 min-w-8 items-center justify-center rounded-control px-2 text-[13px] transition-colors";
3427
3448
  const off = "disabled:pointer-events-none disabled:opacity-30";
3428
3449
  const stepBtn = cn(btn, "text-text-secondary hover:bg-subtle hover:text-text-primary", off);
3429
- 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: [
3430
3451
  rangeStart.toLocaleString(),
3431
3452
  " \u2013 ",
3432
3453
  rangeEnd.toLocaleString(),
@@ -3435,37 +3456,30 @@ function TablePagination({
3435
3456
  " ",
3436
3457
  itemLabel
3437
3458
  ] });
3438
- return /* @__PURE__ */ jsxs32("div", { className: cn("flex flex-wrap items-center justify-between gap-x-4 gap-y-2", className), "data-testid": testIdPrefix, children: [
3439
- onPerPageChange ? /* @__PURE__ */ jsxs32("label", { className: "flex items-center gap-2 text-[13px] text-text-secondary", children: [
3440
- /* @__PURE__ */ jsxs32("span", { className: "relative", children: [
3441
- /* @__PURE__ */ jsx36(
3442
- "select",
3443
- {
3444
- value: perPage,
3445
- onChange: (e) => onPerPageChange(Number(e.target.value)),
3446
- disabled,
3447
- "aria-label": "Items per page",
3448
- "data-testid": testIdPrefix && `${testIdPrefix}-per-page`,
3449
- className: cn(
3450
- "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",
3451
- off
3452
- ),
3453
- children: perPageOptions.map((n) => /* @__PURE__ */ jsx36("option", { value: n, children: n }, n))
3454
- }
3455
- ),
3456
- /* @__PURE__ */ jsx36(
3457
- ChevronDown9,
3458
- {
3459
- size: 13,
3460
- "aria-hidden": "true",
3461
- className: "pointer-events-none absolute right-2 top-1/2 -translate-y-1/2 text-text-secondary"
3462
- }
3463
- )
3464
- ] }),
3465
- "items per page"
3466
- ] }) : range,
3467
- /* @__PURE__ */ jsxs32("nav", { className: "flex items-center gap-1", "aria-label": "Pagination", children: [
3468
- /* @__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(
3469
3483
  "button",
3470
3484
  {
3471
3485
  type: "button",
@@ -3474,10 +3488,10 @@ function TablePagination({
3474
3488
  "aria-label": "First page",
3475
3489
  "data-testid": testIdPrefix && `${testIdPrefix}-first`,
3476
3490
  className: stepBtn,
3477
- children: /* @__PURE__ */ jsx36(ChevronFirst, { size: 16, "aria-hidden": "true" })
3491
+ children: /* @__PURE__ */ jsx37(ChevronFirst, { size: 16, "aria-hidden": "true" })
3478
3492
  }
3479
3493
  ),
3480
- /* @__PURE__ */ jsx36(
3494
+ /* @__PURE__ */ jsx37(
3481
3495
  "button",
3482
3496
  {
3483
3497
  type: "button",
@@ -3486,11 +3500,11 @@ function TablePagination({
3486
3500
  "aria-label": "Previous page",
3487
3501
  "data-testid": testIdPrefix && `${testIdPrefix}-prev`,
3488
3502
  className: stepBtn,
3489
- children: /* @__PURE__ */ jsx36(ChevronLeft4, { size: 16, "aria-hidden": "true" })
3503
+ children: /* @__PURE__ */ jsx37(ChevronLeft4, { size: 16, "aria-hidden": "true" })
3490
3504
  }
3491
3505
  ),
3492
3506
  pageWindow(current, totalPages).map(
3493
- (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(
3494
3508
  "button",
3495
3509
  {
3496
3510
  type: "button",
@@ -3501,14 +3515,14 @@ function TablePagination({
3501
3515
  className: cn(
3502
3516
  btn,
3503
3517
  off,
3504
- 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"
3505
3519
  ),
3506
3520
  children: p.toLocaleString()
3507
3521
  },
3508
3522
  p
3509
3523
  )
3510
3524
  ),
3511
- /* @__PURE__ */ jsx36(
3525
+ /* @__PURE__ */ jsx37(
3512
3526
  "button",
3513
3527
  {
3514
3528
  type: "button",
@@ -3517,10 +3531,10 @@ function TablePagination({
3517
3531
  "aria-label": "Next page",
3518
3532
  "data-testid": testIdPrefix && `${testIdPrefix}-next`,
3519
3533
  className: stepBtn,
3520
- children: /* @__PURE__ */ jsx36(ChevronRight5, { size: 16, "aria-hidden": "true" })
3534
+ children: /* @__PURE__ */ jsx37(ChevronRight5, { size: 16, "aria-hidden": "true" })
3521
3535
  }
3522
3536
  ),
3523
- /* @__PURE__ */ jsx36(
3537
+ /* @__PURE__ */ jsx37(
3524
3538
  "button",
3525
3539
  {
3526
3540
  type: "button",
@@ -3529,18 +3543,18 @@ function TablePagination({
3529
3543
  "aria-label": "Last page",
3530
3544
  "data-testid": testIdPrefix && `${testIdPrefix}-last`,
3531
3545
  className: stepBtn,
3532
- children: /* @__PURE__ */ jsx36(ChevronLast, { size: 16, "aria-hidden": "true" })
3546
+ children: /* @__PURE__ */ jsx37(ChevronLast, { size: 16, "aria-hidden": "true" })
3533
3547
  }
3534
3548
  )
3535
3549
  ] }),
3536
- onPerPageChange && range
3550
+ range
3537
3551
  ] });
3538
3552
  }
3539
3553
 
3540
3554
  // src/DateRangePicker.tsx
3541
3555
  import { useEffect as useEffect12, useMemo as useMemo4, useRef as useRef13, useState as useState13 } from "react";
3542
- import { ChevronDown as ChevronDown10 } from "lucide-react";
3543
- 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";
3544
3558
  var MONTH_ABBR = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
3545
3559
  var QUARTER_ABBR = ["Q1", "Q2", "Q3", "Q4"];
3546
3560
  var PRESETS = ["Rolling 3 months", "Rolling 6 months", "Rolling 12 months"];
@@ -3576,7 +3590,7 @@ function spanLabel(label, today) {
3576
3590
  return `${fmtDate(s)} \u2013 ${fmtDate(e)}`;
3577
3591
  }
3578
3592
  function MiniSelect({ value, onChange, options }) {
3579
- return /* @__PURE__ */ jsx37(
3593
+ return /* @__PURE__ */ jsx38(
3580
3594
  "select",
3581
3595
  {
3582
3596
  value: String(value),
@@ -3585,7 +3599,7 @@ function MiniSelect({ value, onChange, options }) {
3585
3599
  if (opt) onChange(opt.value);
3586
3600
  },
3587
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",
3588
- 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)))
3589
3603
  }
3590
3604
  );
3591
3605
  }
@@ -3646,8 +3660,8 @@ function DateRangePicker({
3646
3660
  if (showFooter) setDraft(label);
3647
3661
  else commit(label);
3648
3662
  };
3649
- return /* @__PURE__ */ jsxs33("div", { className: "relative", ref, children: [
3650
- /* @__PURE__ */ jsxs33(
3663
+ return /* @__PURE__ */ jsxs34("div", { className: "relative", ref, children: [
3664
+ /* @__PURE__ */ jsxs34(
3651
3665
  "button",
3652
3666
  {
3653
3667
  type: "button",
@@ -3656,16 +3670,16 @@ function DateRangePicker({
3656
3670
  "aria-haspopup": "listbox",
3657
3671
  className: chipTriggerClass(),
3658
3672
  children: [
3659
- /* @__PURE__ */ jsxs33("span", { className: "flex flex-col gap-1 text-left leading-none", children: [
3660
- /* @__PURE__ */ jsx37("span", { className: "text-control-caption text-text-tertiary", children: spanLabel(value, end) }),
3661
- /* @__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 })
3662
3676
  ] }),
3663
- /* @__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") })
3664
3678
  ]
3665
3679
  }
3666
3680
  ),
3667
- 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: [
3668
- 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(
3669
3683
  "button",
3670
3684
  {
3671
3685
  type: "button",
@@ -3675,26 +3689,26 @@ function DateRangePicker({
3675
3689
  },
3676
3690
  p
3677
3691
  )),
3678
- /* @__PURE__ */ jsxs33("div", { className: "mt-1 border-t border-border-default px-3 pb-2 pt-2", children: [
3679
- /* @__PURE__ */ jsx37("div", { className: "text-[13px] font-semibold text-text-primary", children: "Custom range" }),
3680
- /* @__PURE__ */ jsxs33("div", { className: "mt-2 flex flex-col gap-2", children: [
3681
- /* @__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: [
3682
3696
  "From",
3683
- /* @__PURE__ */ jsxs33("span", { className: "flex gap-1", children: [
3684
- granularity === "month" && /* @__PURE__ */ jsx37(MiniSelect, { value: fromMo, onChange: setFromMo, options: MONTH_ABBR.map((mm, i) => ({ label: mm, value: i })) }),
3685
- granularity === "quarter" && /* @__PURE__ */ jsx37(MiniSelect, { value: fromQ, onChange: setFromQ, options: QUARTER_ABBR.map((qq, i) => ({ label: qq, value: i })) }),
3686
- /* @__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 })) })
3687
3701
  ] })
3688
3702
  ] }),
3689
- /* @__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: [
3690
3704
  "To",
3691
- /* @__PURE__ */ jsxs33("span", { className: "flex gap-1", children: [
3692
- granularity === "month" && /* @__PURE__ */ jsx37(MiniSelect, { value: toMo, onChange: setToMo, options: MONTH_ABBR.map((mm, i) => ({ label: mm, value: i })) }),
3693
- granularity === "quarter" && /* @__PURE__ */ jsx37(MiniSelect, { value: toQ, onChange: setToQ, options: QUARTER_ABBR.map((qq, i) => ({ label: qq, value: i })) }),
3694
- /* @__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 })) })
3695
3709
  ] })
3696
3710
  ] }),
3697
- /* @__PURE__ */ jsx37(
3711
+ /* @__PURE__ */ jsx38(
3698
3712
  "button",
3699
3713
  {
3700
3714
  type: "button",
@@ -3706,15 +3720,15 @@ function DateRangePicker({
3706
3720
  )
3707
3721
  ] })
3708
3722
  ] }),
3709
- showFooter && /* @__PURE__ */ jsx37(FilterDropdownFooter, { onApply: () => commit(draft) })
3723
+ showFooter && /* @__PURE__ */ jsx38(FilterDropdownFooter, { onApply: () => commit(draft) })
3710
3724
  ] })
3711
3725
  ] });
3712
3726
  }
3713
3727
 
3714
3728
  // src/MultiSelectFilter.tsx
3715
3729
  import { useCallback as useCallback4, useEffect as useEffect13, useRef as useRef14, useState as useState14 } from "react";
3716
- import { ChevronDown as ChevronDown11, Check as Check8, Minus as Minus2, Search as Search5, X as X5 } from "lucide-react";
3717
- 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";
3718
3732
  function MultiSelectFilter({
3719
3733
  caption,
3720
3734
  options = [],
@@ -3734,7 +3748,10 @@ function MultiSelectFilter({
3734
3748
  clearValue = [],
3735
3749
  menuWidthClass = "w-60",
3736
3750
  plainParent = false,
3737
- fullWidth = false
3751
+ fullWidth = false,
3752
+ loading = false,
3753
+ error = false,
3754
+ onRetry
3738
3755
  }) {
3739
3756
  const groupLeaves = (g) => g.children.length ? g.children : [{ id: g.id, label: g.label }];
3740
3757
  const leafOptions = groups ? groups.flatMap(groupLeaves) : options;
@@ -3805,8 +3822,8 @@ function MultiSelectFilter({
3805
3822
  const kids = live.filter((c) => c.label.toLowerCase().includes(ql));
3806
3823
  return kids.length ? { ...g, children: kids } : null;
3807
3824
  }).filter((g) => g !== null) : [];
3808
- return /* @__PURE__ */ jsxs34("div", { className: cn("relative", fullWidth && "w-full"), ref, children: [
3809
- /* @__PURE__ */ jsxs34(
3825
+ return /* @__PURE__ */ jsxs35("div", { className: cn("relative", fullWidth && "w-full"), ref, children: [
3826
+ /* @__PURE__ */ jsxs35(
3810
3827
  "button",
3811
3828
  {
3812
3829
  type: "button",
@@ -3814,9 +3831,9 @@ function MultiSelectFilter({
3814
3831
  "aria-expanded": open,
3815
3832
  className: cn(chipTriggerClass(variant), fullWidth && "w-full justify-between"),
3816
3833
  children: [
3817
- /* @__PURE__ */ jsx38(ChipContent, { caption, value, icon }),
3818
- /* @__PURE__ */ jsx38(
3819
- ChevronDown11,
3834
+ /* @__PURE__ */ jsx39(ChipContent, { caption, value, icon }),
3835
+ /* @__PURE__ */ jsx39(
3836
+ ChevronDown10,
3820
3837
  {
3821
3838
  size: 14,
3822
3839
  "aria-hidden": "true",
@@ -3826,7 +3843,7 @@ function MultiSelectFilter({
3826
3843
  ]
3827
3844
  }
3828
3845
  ),
3829
- open && /* @__PURE__ */ jsxs34(
3846
+ open && /* @__PURE__ */ jsx39(
3830
3847
  "div",
3831
3848
  {
3832
3849
  className: cn(
@@ -3836,10 +3853,10 @@ function MultiSelectFilter({
3836
3853
  ),
3837
3854
  role: "dialog",
3838
3855
  "aria-label": caption,
3839
- children: [
3840
- 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: [
3841
- /* @__PURE__ */ jsx38(Search5, { size: 14, className: "text-text-secondary", "aria-hidden": "true" }),
3842
- /* @__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(
3843
3860
  "input",
3844
3861
  {
3845
3862
  type: "text",
@@ -3849,37 +3866,37 @@ function MultiSelectFilter({
3849
3866
  className: "h-full flex-1 bg-transparent text-[13px] outline-hidden placeholder:text-text-tertiary"
3850
3867
  }
3851
3868
  ),
3852
- 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 }) })
3853
3870
  ] }) }),
3854
- /* @__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: [
3855
3872
  groups ? visibleGroups.map((g) => {
3856
3873
  const state = groupState(g);
3857
- return /* @__PURE__ */ jsxs34("div", { children: [
3858
- /* @__PURE__ */ jsxs34(
3874
+ return /* @__PURE__ */ jsxs35("div", { children: [
3875
+ /* @__PURE__ */ jsxs35(
3859
3876
  "button",
3860
3877
  {
3861
3878
  type: "button",
3862
3879
  onClick: () => toggleGroup(g),
3863
3880
  className: "flex w-full items-center gap-2.5 rounded-control px-2 py-2 text-left transition-colors hover:bg-subtle",
3864
3881
  children: [
3865
- /* @__PURE__ */ jsx38(TriCheck, { state }),
3866
- /* @__PURE__ */ jsx38("span", { className: cn("flex-1 text-[14px] text-text-primary", !plainParent && "font-semibold"), children: g.label }),
3867
- 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) })
3868
3885
  ]
3869
3886
  }
3870
3887
  ),
3871
3888
  g.children.map((c) => {
3872
3889
  const checked = draft.includes(c.id);
3873
- return /* @__PURE__ */ jsxs34(
3890
+ return /* @__PURE__ */ jsxs35(
3874
3891
  "button",
3875
3892
  {
3876
3893
  type: "button",
3877
3894
  onClick: () => toggle(c.id),
3878
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",
3879
3896
  children: [
3880
- /* @__PURE__ */ jsx38(TriCheck, { state: checked ? "all" : "none" }),
3881
- /* @__PURE__ */ jsx38("span", { className: "flex-1 text-[14px] text-text-primary", children: c.label }),
3882
- 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) })
3883
3900
  ]
3884
3901
  },
3885
3902
  c.id
@@ -3888,33 +3905,33 @@ function MultiSelectFilter({
3888
3905
  ] }, g.id);
3889
3906
  }) : items.map((o) => {
3890
3907
  const checked = draft.includes(o.id);
3891
- return /* @__PURE__ */ jsxs34(
3908
+ return /* @__PURE__ */ jsxs35(
3892
3909
  "button",
3893
3910
  {
3894
3911
  type: "button",
3895
3912
  onClick: () => toggle(o.id),
3896
3913
  className: "flex w-full items-center gap-2.5 rounded-control px-2 py-2 text-left transition-colors hover:bg-subtle",
3897
3914
  children: [
3898
- /* @__PURE__ */ jsx38(
3915
+ /* @__PURE__ */ jsx39(
3899
3916
  "span",
3900
3917
  {
3901
3918
  className: cn(
3902
3919
  "flex h-[18px] w-[18px] shrink-0 items-center justify-center rounded-[5px] border transition-colors",
3903
3920
  checked ? "border-transparent bg-brand-primaryAction text-brand-onprimary" : "border-border-interactive bg-input"
3904
3921
  ),
3905
- children: checked && /* @__PURE__ */ jsx38(Check8, { size: 13, strokeWidth: 3 })
3922
+ children: checked && /* @__PURE__ */ jsx39(Check8, { size: 13, strokeWidth: 3 })
3906
3923
  }
3907
3924
  ),
3908
- /* @__PURE__ */ jsx38("span", { className: "flex-1 text-[14px] text-text-primary", children: o.label }),
3909
- 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) })
3910
3927
  ]
3911
3928
  },
3912
3929
  o.id
3913
3930
  );
3914
3931
  }),
3915
- (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." })
3916
3933
  ] }),
3917
- 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(
3918
3935
  "button",
3919
3936
  {
3920
3937
  type: "button",
@@ -3926,14 +3943,14 @@ function MultiSelectFilter({
3926
3943
  ]
3927
3944
  }
3928
3945
  ) })
3929
- ]
3946
+ ] })
3930
3947
  }
3931
3948
  )
3932
3949
  ] });
3933
3950
  }
3934
3951
  function TriCheck({ state }) {
3935
3952
  const filled = state !== "none";
3936
- return /* @__PURE__ */ jsxs34(
3953
+ return /* @__PURE__ */ jsxs35(
3937
3954
  "span",
3938
3955
  {
3939
3956
  className: cn(
@@ -3941,14 +3958,14 @@ function TriCheck({ state }) {
3941
3958
  filled ? "border-transparent bg-brand-primaryAction text-brand-onprimary" : "border-border-interactive bg-input"
3942
3959
  ),
3943
3960
  children: [
3944
- state === "all" && /* @__PURE__ */ jsx38(Check8, { size: 13, strokeWidth: 3 }),
3945
- 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 })
3946
3963
  ]
3947
3964
  }
3948
3965
  );
3949
3966
  }
3950
3967
  function OptionCount({ n }) {
3951
- 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: [
3952
3969
  "(",
3953
3970
  n.toLocaleString(),
3954
3971
  ")"
@@ -3956,7 +3973,7 @@ function OptionCount({ n }) {
3956
3973
  }
3957
3974
 
3958
3975
  // src/Toggle.tsx
3959
- import { jsx as jsx39 } from "react/jsx-runtime";
3976
+ import { jsx as jsx40 } from "react/jsx-runtime";
3960
3977
  var SIZES2 = {
3961
3978
  sm: { track: "h-5 w-9", knob: "h-4 w-4", on: "translate-x-[18px]" },
3962
3979
  md: { track: "h-6 w-11", knob: "h-5 w-5", on: "translate-x-[22px]" }
@@ -3964,7 +3981,7 @@ var SIZES2 = {
3964
3981
  var OFF_TRACK = "color-mix(in srgb, var(--mr-color-border-interactive) 70%, var(--mr-color-text-secondary))";
3965
3982
  function Toggle({ checked, onChange, label, size = "md", disabled, className, testIdPrefix }) {
3966
3983
  const s = SIZES2[size];
3967
- return /* @__PURE__ */ jsx39(
3984
+ return /* @__PURE__ */ jsx40(
3968
3985
  "button",
3969
3986
  {
3970
3987
  type: "button",
@@ -3982,7 +3999,7 @@ function Toggle({ checked, onChange, label, size = "md", disabled, className, te
3982
3999
  disabled && "cursor-not-allowed opacity-50",
3983
4000
  className
3984
4001
  ),
3985
- children: /* @__PURE__ */ jsx39(
4002
+ children: /* @__PURE__ */ jsx40(
3986
4003
  "span",
3987
4004
  {
3988
4005
  className: cn(
@@ -3999,20 +4016,20 @@ function Toggle({ checked, onChange, label, size = "md", disabled, className, te
3999
4016
  // src/AISpark.tsx
4000
4017
  import { useId as useId5 } from "react";
4001
4018
  import { Sparkles } from "lucide-react";
4002
- 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";
4003
4020
  function AISpark({ size = 16, className }) {
4004
4021
  const id = useId5();
4005
- return /* @__PURE__ */ jsxs35(Fragment5, { children: [
4006
- /* @__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: [
4007
- /* @__PURE__ */ jsx40("stop", { offset: "0%", stopColor: "var(--mr-color-brand-primary)" }),
4008
- /* @__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]" })
4009
4026
  ] }) }) }),
4010
- /* @__PURE__ */ jsx40(Sparkles, { size, stroke: `url(#${id})`, className, "aria-hidden": "true" })
4027
+ /* @__PURE__ */ jsx41(Sparkles, { size, stroke: `url(#${id})`, className, "aria-hidden": "true" })
4011
4028
  ] });
4012
4029
  }
4013
4030
 
4014
4031
  // src/Freshness.tsx
4015
- import { jsx as jsx41 } from "react/jsx-runtime";
4032
+ import { jsx as jsx42 } from "react/jsx-runtime";
4016
4033
  var dotColor = {
4017
4034
  fresh: "bg-status-success",
4018
4035
  recent: "bg-status-warning",
@@ -4024,7 +4041,7 @@ var srLabel = {
4024
4041
  stale: "Older than a day"
4025
4042
  };
4026
4043
  function Freshness({ level }) {
4027
- return /* @__PURE__ */ jsx41(
4044
+ return /* @__PURE__ */ jsx42(
4028
4045
  "span",
4029
4046
  {
4030
4047
  className: cn("inline-block h-1.5 w-1.5 shrink-0 rounded-full", dotColor[level]),
@@ -4035,39 +4052,39 @@ function Freshness({ level }) {
4035
4052
  }
4036
4053
 
4037
4054
  // src/SectionHeading.tsx
4038
- import { jsx as jsx42, jsxs as jsxs36 } from "react/jsx-runtime";
4055
+ import { jsx as jsx43, jsxs as jsxs37 } from "react/jsx-runtime";
4039
4056
  function SectionHeading({ title, description, actions, as: Tag2 = "h2", id, className }) {
4040
- return /* @__PURE__ */ jsxs36("div", { className: cn("flex flex-wrap items-end justify-between gap-x-4 gap-y-2", className), children: [
4041
- /* @__PURE__ */ jsxs36("div", { className: "min-w-0", children: [
4042
- /* @__PURE__ */ jsx42(Tag2, { id, className: "text-base font-semibold text-text-primary", children: title }),
4043
- 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 })
4044
4061
  ] }),
4045
- 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 })
4046
4063
  ] });
4047
4064
  }
4048
4065
 
4049
4066
  // src/PageHeader.tsx
4050
4067
  import { ArrowLeft } from "lucide-react";
4051
- import { jsx as jsx43, jsxs as jsxs37 } from "react/jsx-runtime";
4068
+ import { jsx as jsx44, jsxs as jsxs38 } from "react/jsx-runtime";
4052
4069
  function PageHeader({ title, description, actions, back, className }) {
4053
- return /* @__PURE__ */ jsxs37("header", { className: cn("flex flex-wrap items-center justify-between gap-x-6 gap-y-3", className), children: [
4054
- /* @__PURE__ */ jsxs37("div", { className: "min-w-0", children: [
4055
- 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(
4056
4073
  "a",
4057
4074
  {
4058
4075
  href: back.href ?? "#",
4059
4076
  onClick: back.onClick,
4060
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",
4061
4078
  children: [
4062
- /* @__PURE__ */ jsx43(ArrowLeft, { size: 13, "aria-hidden": "true" }),
4079
+ /* @__PURE__ */ jsx44(ArrowLeft, { size: 13, "aria-hidden": "true" }),
4063
4080
  back.label
4064
4081
  ]
4065
4082
  }
4066
4083
  ),
4067
- /* @__PURE__ */ jsx43("h1", { className: "text-xl font-semibold tracking-tight text-text-primary", children: title }),
4068
- 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 })
4069
4086
  ] }),
4070
- 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 })
4071
4088
  ] });
4072
4089
  }
4073
4090
 
@@ -4075,7 +4092,7 @@ function PageHeader({ title, description, actions, back, className }) {
4075
4092
  import { useEffect as useEffect14, useId as useId6, useRef as useRef15 } from "react";
4076
4093
  import { createPortal as createPortal7 } from "react-dom";
4077
4094
  import { X as X6 } from "lucide-react";
4078
- import { jsx as jsx44, jsxs as jsxs38 } from "react/jsx-runtime";
4095
+ import { jsx as jsx45, jsxs as jsxs39 } from "react/jsx-runtime";
4079
4096
  var WIDTH = {
4080
4097
  sm: "max-w-110",
4081
4098
  md: "max-w-160",
@@ -4125,12 +4142,12 @@ function Modal({ open, onClose, title, description, size = "md", footer, childre
4125
4142
  }, [open]);
4126
4143
  if (!open || typeof document === "undefined") return null;
4127
4144
  return createPortal7(
4128
- /* @__PURE__ */ jsx44(
4145
+ /* @__PURE__ */ jsx45(
4129
4146
  "div",
4130
4147
  {
4131
4148
  className: "fixed inset-0 z-modal flex items-center justify-center bg-scrim px-4 py-6",
4132
4149
  onMouseDown: (e) => e.target === e.currentTarget && onClose(),
4133
- children: /* @__PURE__ */ jsxs38(
4150
+ children: /* @__PURE__ */ jsxs39(
4134
4151
  "div",
4135
4152
  {
4136
4153
  ref: panel,
@@ -4145,24 +4162,24 @@ function Modal({ open, onClose, title, description, size = "md", footer, childre
4145
4162
  className
4146
4163
  ),
4147
4164
  children: [
4148
- /* @__PURE__ */ jsxs38("div", { className: "flex items-start gap-3 px-5 pt-5 pb-3", children: [
4149
- /* @__PURE__ */ jsxs38("div", { className: "min-w-0 flex-1", children: [
4150
- /* @__PURE__ */ jsx44("h2", { id: titleId, className: "text-base font-semibold text-text-primary", children: title }),
4151
- 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 })
4152
4169
  ] }),
4153
- /* @__PURE__ */ jsx44(
4170
+ /* @__PURE__ */ jsx45(
4154
4171
  "button",
4155
4172
  {
4156
4173
  type: "button",
4157
4174
  onClick: onClose,
4158
4175
  "aria-label": "Close",
4159
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",
4160
- children: /* @__PURE__ */ jsx44(X6, { size: 16, "aria-hidden": "true" })
4177
+ children: /* @__PURE__ */ jsx45(X6, { size: 16, "aria-hidden": "true" })
4161
4178
  }
4162
4179
  )
4163
4180
  ] }),
4164
- 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 }),
4165
- 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 })
4166
4183
  ]
4167
4184
  }
4168
4185
  )
@@ -4173,10 +4190,10 @@ function Modal({ open, onClose, title, description, size = "md", footer, childre
4173
4190
  }
4174
4191
 
4175
4192
  // src/EmptyState.tsx
4176
- import { jsx as jsx45, jsxs as jsxs39 } from "react/jsx-runtime";
4193
+ import { jsx as jsx46, jsxs as jsxs40 } from "react/jsx-runtime";
4177
4194
  function EmptyState({ icon, title, description, action, size = "sm", className }) {
4178
4195
  const md = size === "md";
4179
- return /* @__PURE__ */ jsxs39(
4196
+ return /* @__PURE__ */ jsxs40(
4180
4197
  "div",
4181
4198
  {
4182
4199
  className: cn(
@@ -4185,7 +4202,7 @@ function EmptyState({ icon, title, description, action, size = "sm", className }
4185
4202
  className
4186
4203
  ),
4187
4204
  children: [
4188
- icon && /* @__PURE__ */ jsx45(
4205
+ icon && /* @__PURE__ */ jsx46(
4189
4206
  "span",
4190
4207
  {
4191
4208
  "aria-hidden": "true",
@@ -4196,9 +4213,9 @@ function EmptyState({ icon, title, description, action, size = "sm", className }
4196
4213
  children: icon
4197
4214
  }
4198
4215
  ),
4199
- /* @__PURE__ */ jsx45("p", { className: cn("font-semibold text-text-primary", md ? "text-base" : "text-sm"), children: title }),
4200
- description && /* @__PURE__ */ jsx45("p", { className: cn("max-w-sm text-text-secondary", md ? "text-sm" : "text-xs"), children: description }),
4201
- 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 })
4202
4219
  ]
4203
4220
  }
4204
4221
  );
@@ -4206,7 +4223,7 @@ function EmptyState({ icon, title, description, action, size = "sm", className }
4206
4223
 
4207
4224
  // src/Tabs.tsx
4208
4225
  import { useRef as useRef16 } from "react";
4209
- import { jsx as jsx46, jsxs as jsxs40 } from "react/jsx-runtime";
4226
+ import { jsx as jsx47, jsxs as jsxs41 } from "react/jsx-runtime";
4210
4227
  function arrowKeys(e, row) {
4211
4228
  if (!row || !["ArrowLeft", "ArrowRight", "Home", "End"].includes(e.key)) return;
4212
4229
  const items = Array.from(row.querySelectorAll("button:not([disabled])"));
@@ -4218,7 +4235,7 @@ function arrowKeys(e, row) {
4218
4235
  }
4219
4236
  function Tabs({ items, value, onChange, idPrefix = "tabs", className, ...rest }) {
4220
4237
  const row = useRef16(null);
4221
- return /* @__PURE__ */ jsx46(
4238
+ return /* @__PURE__ */ jsx47(
4222
4239
  "div",
4223
4240
  {
4224
4241
  ref: row,
@@ -4228,7 +4245,7 @@ function Tabs({ items, value, onChange, idPrefix = "tabs", className, ...rest })
4228
4245
  className: cn("flex gap-6 border-b border-border-default", className),
4229
4246
  children: items.map((item) => {
4230
4247
  const on = item.value === value;
4231
- return /* @__PURE__ */ jsxs40(
4248
+ return /* @__PURE__ */ jsxs41(
4232
4249
  "button",
4233
4250
  {
4234
4251
  type: "button",
@@ -4240,12 +4257,12 @@ function Tabs({ items, value, onChange, idPrefix = "tabs", className, ...rest })
4240
4257
  disabled: item.disabled,
4241
4258
  onClick: () => onChange(item.value),
4242
4259
  className: cn(
4243
- "-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",
4244
4261
  on ? "border-brand-primaryAction font-semibold text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"
4245
4262
  ),
4246
4263
  children: [
4247
4264
  item.label,
4248
- 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 })
4249
4266
  ]
4250
4267
  },
4251
4268
  item.value
@@ -4263,7 +4280,7 @@ function SegmentedControl({
4263
4280
  ...rest
4264
4281
  }) {
4265
4282
  const row = useRef16(null);
4266
- return /* @__PURE__ */ jsx46(
4283
+ return /* @__PURE__ */ jsx47(
4267
4284
  "div",
4268
4285
  {
4269
4286
  ref: row,
@@ -4273,7 +4290,7 @@ function SegmentedControl({
4273
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),
4274
4291
  children: options.map((o) => {
4275
4292
  const on = o.value === value;
4276
- return /* @__PURE__ */ jsx46(
4293
+ return /* @__PURE__ */ jsx47(
4277
4294
  "button",
4278
4295
  {
4279
4296
  type: "button",
@@ -4297,7 +4314,7 @@ function SegmentedControl({
4297
4314
 
4298
4315
  // src/TextField.tsx
4299
4316
  import { forwardRef as forwardRef3, useId as useId7 } from "react";
4300
- import { jsx as jsx47, jsxs as jsxs41 } from "react/jsx-runtime";
4317
+ import { jsx as jsx48, jsxs as jsxs42 } from "react/jsx-runtime";
4301
4318
  var HEIGHT2 = { sm: "h-8", md: "h-10", lg: "h-11" };
4302
4319
  var TextField = forwardRef3(
4303
4320
  ({ label, hint, error, size = "md", icon, className, id, disabled, ...props }, ref) => {
@@ -4305,9 +4322,9 @@ var TextField = forwardRef3(
4305
4322
  const fieldId = id ?? auto;
4306
4323
  const noteId = `${fieldId}-note`;
4307
4324
  const note = error ?? hint;
4308
- return /* @__PURE__ */ jsxs41("div", { className: cn("flex flex-col gap-1.5", className), children: [
4309
- label && /* @__PURE__ */ jsx47("label", { htmlFor: fieldId, className: "text-xs font-medium text-text-secondary", children: label }),
4310
- /* @__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(
4311
4328
  "div",
4312
4329
  {
4313
4330
  className: cn(
@@ -4317,8 +4334,8 @@ var TextField = forwardRef3(
4317
4334
  disabled && "opacity-50"
4318
4335
  ),
4319
4336
  children: [
4320
- icon && /* @__PURE__ */ jsx47("span", { "aria-hidden": "true", className: "flex shrink-0 text-text-tertiary", children: icon }),
4321
- /* @__PURE__ */ jsx47(
4337
+ icon && /* @__PURE__ */ jsx48("span", { "aria-hidden": "true", className: "flex shrink-0 text-text-tertiary", children: icon }),
4338
+ /* @__PURE__ */ jsx48(
4322
4339
  "input",
4323
4340
  {
4324
4341
  ref,
@@ -4333,7 +4350,7 @@ var TextField = forwardRef3(
4333
4350
  ]
4334
4351
  }
4335
4352
  ),
4336
- 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 })
4337
4354
  ] });
4338
4355
  }
4339
4356
  );
@@ -4341,7 +4358,7 @@ TextField.displayName = "TextField";
4341
4358
 
4342
4359
  // src/DataTable.tsx
4343
4360
  import { useId as useId8 } from "react";
4344
- import { jsx as jsx48, jsxs as jsxs42 } from "react/jsx-runtime";
4361
+ import { jsx as jsx49, jsxs as jsxs43 } from "react/jsx-runtime";
4345
4362
  var WIDTH2 = { fill: "", sm: "w-24", md: "w-36", lg: "w-48" };
4346
4363
  var MAX_H = { sm: "max-h-80", md: "max-h-120", lg: "max-h-160" };
4347
4364
  var HEAD_PAD = { default: "px-4 py-3", compact: "px-3 py-2" };
@@ -4373,15 +4390,15 @@ function DataTable({
4373
4390
  const col = columns.find((c) => c.key === key);
4374
4391
  onSortChange?.(cycleSort(sort, key, col?.firstDir ?? (col?.numeric ? "desc" : "asc")));
4375
4392
  };
4376
- return /* @__PURE__ */ jsxs42("div", { className: cn("flex w-full flex-col overflow-hidden rounded-card border border-border-default bg-surface", className), children: [
4377
- title && /* @__PURE__ */ jsxs42("div", { className: "flex items-start justify-between gap-2 p-card-padding", children: [
4378
- /* @__PURE__ */ jsxs42("div", { className: "min-w-0", children: [
4379
- /* @__PURE__ */ jsx48("h3", { id: titleId, className: "text-style-card-title", children: title }),
4380
- 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 })
4381
4398
  ] }),
4382
- action && /* @__PURE__ */ jsx48("div", { className: "shrink-0", children: action })
4399
+ action && /* @__PURE__ */ jsx49("div", { className: "shrink-0", children: action })
4383
4400
  ] }),
4384
- /* @__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(
4385
4402
  "table",
4386
4403
  {
4387
4404
  "aria-labelledby": title ? titleId : void 0,
@@ -4389,13 +4406,13 @@ function DataTable({
4389
4406
  "aria-busy": loading || void 0,
4390
4407
  className: "w-full border-collapse text-left",
4391
4408
  children: [
4392
- /* @__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(
4393
4410
  "th",
4394
4411
  {
4395
4412
  scope: "col",
4396
4413
  "aria-sort": c.sortable ? ariaSortFor(sort, c.key) : void 0,
4397
4414
  className: cn("border-b border-border-default font-semibold", head, align(c), width(c)),
4398
- children: c.sortable && onSortChange ? /* @__PURE__ */ jsx48(
4415
+ children: c.sortable && onSortChange ? /* @__PURE__ */ jsx49(
4399
4416
  SortButton,
4400
4417
  {
4401
4418
  label: c.label,
@@ -4408,7 +4425,7 @@ function DataTable({
4408
4425
  },
4409
4426
  c.key
4410
4427
  )) }) }),
4411
- /* @__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(
4412
4429
  "span",
4413
4430
  {
4414
4431
  className: cn(
@@ -4416,7 +4433,7 @@ function DataTable({
4416
4433
  c.numeric ? "w-12" : "w-2/3"
4417
4434
  )
4418
4435
  }
4419
- ) }, 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(
4420
4437
  "td",
4421
4438
  {
4422
4439
  className: cn("border-b border-border-default", pad, align(c), c.numeric && "tabular-nums"),
@@ -4427,9 +4444,164 @@ function DataTable({
4427
4444
  ]
4428
4445
  }
4429
4446
  ) }),
4430
- 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 })
4431
4448
  ] });
4432
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
+ }
4433
4605
  export {
4434
4606
  AISpark,
4435
4607
  AdvertiserNoResults,
@@ -4442,6 +4614,7 @@ export {
4442
4614
  CheckBox,
4443
4615
  CheckBoxBox,
4444
4616
  ChipContent,
4617
+ CopyButton,
4445
4618
  DEFAULT_SEARCH_MATCH,
4446
4619
  DataScopeFilter,
4447
4620
  DataTable,
@@ -4453,7 +4626,9 @@ export {
4453
4626
  FilterDropdownFooter,
4454
4627
  Freshness,
4455
4628
  InfoTip,
4629
+ InlineMessage,
4456
4630
  LineChartPlaceholder,
4631
+ MediaLabel,
4457
4632
  Modal,
4458
4633
  MultiSelectFilter,
4459
4634
  NO_RESULTS_BODY,
@@ -4476,12 +4651,14 @@ export {
4476
4651
  SelectionPicker,
4477
4652
  SortButton,
4478
4653
  StackedColumnPlaceholder,
4654
+ SuggestionChip,
4479
4655
  TablePagination,
4480
4656
  Tabs,
4481
4657
  Tag,
4482
4658
  TextField,
4483
4659
  Toast,
4484
4660
  Toggle,
4661
+ ToggleChip,
4485
4662
  Tooltip,
4486
4663
  WorkspaceAvatar,
4487
4664
  WorkspaceSelectedCard,