@mediaradar/design-components 0.13.0 → 0.15.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
@@ -403,7 +403,7 @@ function cn(...inputs) {
403
403
  }
404
404
 
405
405
  // src/Badge.tsx
406
- import { jsx as jsx4 } from "react/jsx-runtime";
406
+ import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
407
407
  var TONE = {
408
408
  neutral: "bg-subtle text-text-secondary",
409
409
  brand: "bg-brand-primarySoft text-brand-primaryAction",
@@ -442,17 +442,22 @@ var TONE_STYLE = {
442
442
  }
443
443
  };
444
444
  var KIND = {
445
- label: "px-2 py-0.5",
445
+ // Twice the vertical room the first version had. At py-0.5 the pill hugged
446
+ // its text and read as a tight little tag; at py-1 it reads as a deliberate
447
+ // object. Taken from the status pills the product had already arrived at by
448
+ // hand, which were noticeably more comfortable than anything else -- the
449
+ // breathing room was what made them so, not their extra pixel of type.
450
+ label: "px-2.5 py-1",
446
451
  // Square-ish and centred, with a floor width so a 1-digit and a 3-digit
447
452
  // count are the same shape, and lining figures so the width does not shift
448
453
  // as the number changes.
449
454
  count: "h-[18px] min-w-[18px] justify-center px-1.5 tabular-nums",
450
455
  // The only kind that shouts. Caps need the letterspacing -- caps set tight
451
456
  // are harder to read than the sentence case they replaced.
452
- eyebrow: "px-2 py-0.5 uppercase tracking-wider"
457
+ eyebrow: "px-2.5 py-1 uppercase tracking-wider"
453
458
  };
454
- function Badge({ tone = "neutral", kind = "label", children, className }) {
455
- return /* @__PURE__ */ jsx4(
459
+ function Badge({ tone = "neutral", kind = "label", dot = false, children, className }) {
460
+ return /* @__PURE__ */ jsxs4(
456
461
  "span",
457
462
  {
458
463
  style: TONE_STYLE[tone],
@@ -466,7 +471,10 @@ function Badge({ tone = "neutral", kind = "label", children, className }) {
466
471
  KIND[kind],
467
472
  className
468
473
  ),
469
- children
474
+ children: [
475
+ dot && /* @__PURE__ */ jsx4("span", { "aria-hidden": "true", className: "size-1.5 shrink-0 rounded-full bg-current" }),
476
+ children
477
+ ]
470
478
  }
471
479
  );
472
480
  }
@@ -532,7 +540,7 @@ function CheckBoxBox({ checked, indeterminate, disabled, className }) {
532
540
  // src/DateRangeFilter.tsx
533
541
  import { useEffect as useEffect3, useMemo as useMemo2, useRef as useRef3, useState as useState3 } from "react";
534
542
  import { ChevronDown as ChevronDown2, ChevronLeft, ChevronRight } from "lucide-react";
535
- import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
543
+ import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
536
544
  var DEFAULT_SHORTCUTS = [
537
545
  "Year to date",
538
546
  "Rolling 3 months",
@@ -738,8 +746,8 @@ function DateRangeFilter({
738
746
  onRangeChange?.(s, e);
739
747
  setOpen(false);
740
748
  };
741
- return /* @__PURE__ */ jsxs4("div", { className: "relative", ref, children: [
742
- /* @__PURE__ */ jsxs4(
749
+ return /* @__PURE__ */ jsxs5("div", { className: "relative", ref, children: [
750
+ /* @__PURE__ */ jsxs5(
743
751
  "button",
744
752
  {
745
753
  type: "button",
@@ -749,7 +757,7 @@ function DateRangeFilter({
749
757
  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",
750
758
  children: [
751
759
  icon && /* @__PURE__ */ jsx6("span", { className: "shrink-0 text-text-tertiary", children: icon }),
752
- /* @__PURE__ */ jsxs4("span", { className: "flex flex-col gap-1 text-left leading-none", children: [
760
+ /* @__PURE__ */ jsxs5("span", { className: "flex flex-col gap-1 text-left leading-none", children: [
753
761
  /* @__PURE__ */ jsx6("span", { className: showDates ? "text-[11px] text-text-tertiary" : "text-[10px] uppercase tracking-wide text-text-tertiary", children: showDates ? displayDatesLine : caption }),
754
762
  /* @__PURE__ */ jsx6("span", { className: "text-[12px] font-medium text-text-primary", children: displayValue })
755
763
  ] }),
@@ -757,7 +765,7 @@ function DateRangeFilter({
757
765
  ]
758
766
  }
759
767
  ),
760
- open && /* @__PURE__ */ jsxs4(
768
+ open && /* @__PURE__ */ jsxs5(
761
769
  "div",
762
770
  {
763
771
  "data-testid": testIdPrefix && `${testIdPrefix}-popover`,
@@ -776,8 +784,8 @@ function DateRangeFilter({
776
784
  },
777
785
  s
778
786
  )) }),
779
- /* @__PURE__ */ jsxs4("div", { className: "flex flex-col p-4", children: [
780
- /* @__PURE__ */ jsxs4("div", { className: "flex items-end gap-3", children: [
787
+ /* @__PURE__ */ jsxs5("div", { className: "flex flex-col p-4", children: [
788
+ /* @__PURE__ */ jsxs5("div", { className: "flex items-end gap-3", children: [
781
789
  /* @__PURE__ */ jsx6(Field, { label: "Start Date", value: start ? fmt(start) : "\u2014" }),
782
790
  /* @__PURE__ */ jsx6("span", { className: "pb-2.5 text-text-tertiary", children: "\u2014" }),
783
791
  /* @__PURE__ */ jsx6(Field, { label: "End Date", value: end ? fmt(end) : start ? fmt(start) : "\u2014" })
@@ -786,17 +794,17 @@ function DateRangeFilter({
786
794
  /* @__PURE__ */ jsx6("div", { className: "flex gap-8", children: [0, 1].map((offset) => {
787
795
  const m = addMonths(leftMonth, offset);
788
796
  const grid = monthGrid(m.getFullYear(), m.getMonth());
789
- return /* @__PURE__ */ jsxs4("div", { className: "w-[252px]", children: [
790
- /* @__PURE__ */ jsxs4("div", { className: "mb-2 flex items-center justify-between", children: [
797
+ return /* @__PURE__ */ jsxs5("div", { className: "w-[252px]", children: [
798
+ /* @__PURE__ */ jsxs5("div", { className: "mb-2 flex items-center justify-between", children: [
791
799
  offset === 0 ? /* @__PURE__ */ jsx6(NavBtn, { onClick: () => setLeftMonth(addMonths(leftMonth, -1)), "aria-label": "Previous month", children: /* @__PURE__ */ jsx6(ChevronLeft, { size: 16 }) }) : /* @__PURE__ */ jsx6("span", { className: "h-7 w-7" }),
792
- /* @__PURE__ */ jsxs4("span", { className: "text-[15px] font-semibold text-text-primary", children: [
800
+ /* @__PURE__ */ jsxs5("span", { className: "text-[15px] font-semibold text-text-primary", children: [
793
801
  MONTHS[m.getMonth()],
794
802
  " ",
795
803
  m.getFullYear()
796
804
  ] }),
797
805
  offset === 1 ? /* @__PURE__ */ jsx6(NavBtn, { onClick: () => setLeftMonth(addMonths(leftMonth, 1)), "aria-label": "Next month", children: /* @__PURE__ */ jsx6(ChevronRight, { size: 16 }) }) : /* @__PURE__ */ jsx6("span", { className: "h-7 w-7" })
798
806
  ] }),
799
- /* @__PURE__ */ jsxs4("div", { className: "grid grid-cols-7", children: [
807
+ /* @__PURE__ */ jsxs5("div", { className: "grid grid-cols-7", children: [
800
808
  WEEKDAYS.map((w) => /* @__PURE__ */ jsx6("div", { className: "flex h-8 items-center justify-center text-[12px] font-semibold text-text-secondary", children: w }, w)),
801
809
  grid.map((d, i) => {
802
810
  const inMonth = d.getMonth() === m.getMonth();
@@ -812,7 +820,7 @@ function DateRangeFilter({
812
820
  else if (end && isEnd) band = "left-0 right-1/2";
813
821
  else band = "left-0 right-0";
814
822
  }
815
- return /* @__PURE__ */ jsxs4("button", { type: "button", onClick: () => pickDay(d), className: "relative flex h-9 items-center justify-center", children: [
823
+ return /* @__PURE__ */ jsxs5("button", { type: "button", onClick: () => pickDay(d), className: "relative flex h-9 items-center justify-center", children: [
816
824
  band && /* @__PURE__ */ jsx6("span", { className: `absolute inset-y-[3px] bg-ai-tint ${band}`, "aria-hidden": "true" }),
817
825
  /* @__PURE__ */ jsx6(
818
826
  "span",
@@ -826,7 +834,7 @@ function DateRangeFilter({
826
834
  ] })
827
835
  ] }, offset);
828
836
  }) }),
829
- /* @__PURE__ */ jsxs4("div", { className: "mt-4 flex justify-end gap-2", children: [
837
+ /* @__PURE__ */ jsxs5("div", { className: "mt-4 flex justify-end gap-2", children: [
830
838
  /* @__PURE__ */ jsx6("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" }),
831
839
  /* @__PURE__ */ jsx6("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-white transition-[filter] hover:brightness-110", children: "Apply" })
832
840
  ] })
@@ -837,7 +845,7 @@ function DateRangeFilter({
837
845
  ] });
838
846
  }
839
847
  function Field({ label, value }) {
840
- return /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-1.5", children: [
848
+ return /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-1.5", children: [
841
849
  /* @__PURE__ */ jsx6("span", { className: "text-[12px] font-medium text-text-secondary", children: label }),
842
850
  /* @__PURE__ */ jsx6("div", { className: "flex h-10 min-w-[140px] items-center rounded-control border border-border-default bg-input px-3 text-[14px] font-medium text-text-primary", children: value })
843
851
  ] });
@@ -849,7 +857,7 @@ function NavBtn({ children, onClick, ...rest }) {
849
857
  // src/SearchBar.tsx
850
858
  import { useEffect as useEffect4, useRef as useRef4, useState as useState4 } from "react";
851
859
  import { AlertCircle, Check as Check3, ChevronDown as ChevronDown3, Search as Search3 } from "lucide-react";
852
- import { Fragment as Fragment3, jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
860
+ import { Fragment as Fragment3, jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
853
861
  var DEFAULT_SEARCH_MATCH = { mode: "anyWord", wordJoin: "Or" };
854
862
  var MODE_LABEL = {
855
863
  anyWord: "Any Word",
@@ -886,7 +894,7 @@ function SearchBar({
886
894
  };
887
895
  }, [open]);
888
896
  const showMatch = variant === "filterable" && matchValue;
889
- return /* @__PURE__ */ jsxs5(
897
+ return /* @__PURE__ */ jsxs6(
890
898
  "div",
891
899
  {
892
900
  className: cx2(
@@ -894,7 +902,7 @@ function SearchBar({
894
902
  className
895
903
  ),
896
904
  children: [
897
- /* @__PURE__ */ jsxs5("label", { className: "flex min-w-0 flex-1 items-center gap-2 px-2.5", children: [
905
+ /* @__PURE__ */ jsxs6("label", { className: "flex min-w-0 flex-1 items-center gap-2 px-2.5", children: [
898
906
  /* @__PURE__ */ jsx7(Search3, { size: 15, "aria-hidden": "true", className: "shrink-0 text-text-tertiary" }),
899
907
  /* @__PURE__ */ jsx7(
900
908
  "input",
@@ -920,8 +928,8 @@ function SearchBar({
920
928
  // token package (insights-studio-prototype's own src/index.css;
921
929
  // mr-clientapps' own tailwind.config.ts `colors.border.DEFAULT`) --
922
930
  // an alias this shared component can't rely on existing.
923
- /* @__PURE__ */ jsxs5("div", { className: "relative shrink-0 border-l border-border-default", ref, children: [
924
- /* @__PURE__ */ jsxs5(
931
+ /* @__PURE__ */ jsxs6("div", { className: "relative shrink-0 border-l border-border-default", ref, children: [
932
+ /* @__PURE__ */ jsxs6(
925
933
  "button",
926
934
  {
927
935
  type: "button",
@@ -950,7 +958,7 @@ function SearchBar({
950
958
  "aria-label": "Search match type",
951
959
  "data-testid": testIdPrefix && `${testIdPrefix}-mode-popover`,
952
960
  className: "absolute right-0 top-[calc(100%+8px)] z-50 w-[400px] rounded-card border border-border-default bg-surface p-3 shadow-overlay",
953
- children: /* @__PURE__ */ jsxs5("div", { role: "radiogroup", "aria-label": "Search match type", className: "flex flex-col", children: [
961
+ children: /* @__PURE__ */ jsxs6("div", { role: "radiogroup", "aria-label": "Search match type", className: "flex flex-col", children: [
954
962
  /* @__PURE__ */ jsx7(
955
963
  ModeRow,
956
964
  {
@@ -960,7 +968,7 @@ function SearchBar({
960
968
  testId: testIdPrefix && `${testIdPrefix}-mode-anyWord`,
961
969
  description: /* @__PURE__ */ jsx7(Fragment3, { children: "Find creatives that contain your keyword(s) using an \u201COr\u201D (match any) or \u201CAnd\u201D (match all) conditional in any order." }),
962
970
  infoText: "The Or/And choice applies only when Any Word is the active search mode.",
963
- extra: /* @__PURE__ */ jsxs5("span", { className: "flex items-center gap-3", children: [
971
+ extra: /* @__PURE__ */ jsxs6("span", { className: "flex items-center gap-3", children: [
964
972
  /* @__PURE__ */ jsx7(
965
973
  RadioOption,
966
974
  {
@@ -1040,7 +1048,7 @@ function ModeRow({
1040
1048
  onSelect,
1041
1049
  testId
1042
1050
  }) {
1043
- return /* @__PURE__ */ jsxs5(
1051
+ return /* @__PURE__ */ jsxs6(
1044
1052
  "div",
1045
1053
  {
1046
1054
  role: "radio",
@@ -1056,9 +1064,9 @@ function ModeRow({
1056
1064
  },
1057
1065
  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",
1058
1066
  children: [
1059
- /* @__PURE__ */ jsxs5("div", { className: "flex items-center justify-between gap-2", children: [
1060
- /* @__PURE__ */ jsxs5("div", { className: "flex flex-wrap items-center gap-3", children: [
1061
- /* @__PURE__ */ jsxs5("span", { className: "flex items-center gap-1", children: [
1067
+ /* @__PURE__ */ jsxs6("div", { className: "flex items-center justify-between gap-2", children: [
1068
+ /* @__PURE__ */ jsxs6("div", { className: "flex flex-wrap items-center gap-3", children: [
1069
+ /* @__PURE__ */ jsxs6("span", { className: "flex items-center gap-1", children: [
1062
1070
  /* @__PURE__ */ jsx7("span", { className: "text-[14px] font-semibold text-text-primary", children: title }),
1063
1071
  /* @__PURE__ */ jsx7(RowInfoTip, { text: infoText })
1064
1072
  ] }),
@@ -1078,7 +1086,7 @@ function RadioOption({
1078
1086
  onSelect,
1079
1087
  testId
1080
1088
  }) {
1081
- return /* @__PURE__ */ jsxs5(
1089
+ return /* @__PURE__ */ jsxs6(
1082
1090
  "button",
1083
1091
  {
1084
1092
  type: "button",
@@ -1117,7 +1125,7 @@ function RowInfoTip({ text }) {
1117
1125
  window.addEventListener("mousedown", onDown);
1118
1126
  return () => window.removeEventListener("mousedown", onDown);
1119
1127
  }, [open]);
1120
- return /* @__PURE__ */ jsxs5("span", { className: "relative inline-flex shrink-0 items-center", ref, children: [
1128
+ return /* @__PURE__ */ jsxs6("span", { className: "relative inline-flex shrink-0 items-center", ref, children: [
1121
1129
  /* @__PURE__ */ jsx7(
1122
1130
  "button",
1123
1131
  {
@@ -1146,7 +1154,7 @@ function RowInfoTip({ text }) {
1146
1154
  // src/SectionRail.tsx
1147
1155
  import { useRef as useRef5 } from "react";
1148
1156
  import { ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight2 } from "lucide-react";
1149
- import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
1157
+ import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
1150
1158
  function SectionRail({
1151
1159
  title,
1152
1160
  titleSerif,
@@ -1159,9 +1167,9 @@ function SectionRail({
1159
1167
  const scroll = (direction) => {
1160
1168
  scrollRef.current?.scrollBy({ left: direction * 320, behavior: "smooth" });
1161
1169
  };
1162
- return /* @__PURE__ */ jsxs6("section", { className: "flex flex-col gap-4", children: [
1163
- /* @__PURE__ */ jsxs6("header", { className: "flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between", children: [
1164
- /* @__PURE__ */ jsxs6("div", { children: [
1170
+ return /* @__PURE__ */ jsxs7("section", { className: "flex flex-col gap-4", children: [
1171
+ /* @__PURE__ */ jsxs7("header", { className: "flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between", children: [
1172
+ /* @__PURE__ */ jsxs7("div", { children: [
1165
1173
  /* @__PURE__ */ jsx8(
1166
1174
  "h2",
1167
1175
  {
@@ -1171,8 +1179,8 @@ function SectionRail({
1171
1179
  ),
1172
1180
  /* @__PURE__ */ jsx8("p", { className: "mt-1 text-sm text-text-secondary", children: subtitle })
1173
1181
  ] }),
1174
- /* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-2", children: [
1175
- viewAllLabel && viewAllHref && /* @__PURE__ */ jsxs6(
1182
+ /* @__PURE__ */ jsxs7("div", { className: "flex items-center gap-2", children: [
1183
+ viewAllLabel && viewAllHref && /* @__PURE__ */ jsxs7(
1176
1184
  "a",
1177
1185
  {
1178
1186
  href: viewAllHref,
@@ -1219,7 +1227,7 @@ function SectionRail({
1219
1227
  // src/DataScopeFilter.tsx
1220
1228
  import { useEffect as useEffect5, useRef as useRef6, useState as useState5 } from "react";
1221
1229
  import { Check as Check4, ChevronDown as ChevronDown4 } from "lucide-react";
1222
- import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
1230
+ import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
1223
1231
  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.";
1224
1232
  function cx3(...classes) {
1225
1233
  return classes.filter(Boolean).join(" ");
@@ -1245,8 +1253,8 @@ function DataScopeFilter({ value, onChange, align = "right" }) {
1245
1253
  onChange(v);
1246
1254
  setOpen(false);
1247
1255
  };
1248
- return /* @__PURE__ */ jsxs7("div", { className: "relative", ref, children: [
1249
- /* @__PURE__ */ jsxs7(
1256
+ return /* @__PURE__ */ jsxs8("div", { className: "relative", ref, children: [
1257
+ /* @__PURE__ */ jsxs8(
1250
1258
  "button",
1251
1259
  {
1252
1260
  type: "button",
@@ -1255,7 +1263,7 @@ function DataScopeFilter({ value, onChange, align = "right" }) {
1255
1263
  "aria-haspopup": "listbox",
1256
1264
  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",
1257
1265
  children: [
1258
- /* @__PURE__ */ jsxs7("span", { className: "flex flex-col gap-1 text-left leading-none", children: [
1266
+ /* @__PURE__ */ jsxs8("span", { className: "flex flex-col gap-1 text-left leading-none", children: [
1259
1267
  /* @__PURE__ */ jsx9("span", { className: "text-[10px] uppercase tracking-wide text-text-tertiary", children: "Data" }),
1260
1268
  /* @__PURE__ */ jsx9("span", { className: "text-[12px] font-medium text-text-primary", children: display })
1261
1269
  ] }),
@@ -1270,7 +1278,7 @@ function DataScopeFilter({ value, onChange, align = "right" }) {
1270
1278
  ]
1271
1279
  }
1272
1280
  ),
1273
- open && /* @__PURE__ */ jsxs7(
1281
+ open && /* @__PURE__ */ jsxs8(
1274
1282
  "div",
1275
1283
  {
1276
1284
  role: "listbox",
@@ -1293,7 +1301,7 @@ function Option({
1293
1301
  onClick,
1294
1302
  hint
1295
1303
  }) {
1296
- const option = /* @__PURE__ */ jsxs7(
1304
+ const option = /* @__PURE__ */ jsxs8(
1297
1305
  "button",
1298
1306
  {
1299
1307
  type: "button",
@@ -1312,7 +1320,7 @@ function Option({
1312
1320
  }
1313
1321
  );
1314
1322
  if (!hint) return option;
1315
- return /* @__PURE__ */ jsxs7("div", { className: "flex items-center pr-2.5", children: [
1323
+ return /* @__PURE__ */ jsxs8("div", { className: "flex items-center pr-2.5", children: [
1316
1324
  option,
1317
1325
  /* @__PURE__ */ jsx9(InfoTip, { text: hint, trigger: "hover", label: `About ${label}` })
1318
1326
  ] });
@@ -1322,7 +1330,7 @@ function Option({
1322
1330
  import { useCallback as useCallback2, useEffect as useEffect6, useLayoutEffect, useRef as useRef7, useState as useState6 } from "react";
1323
1331
  import { createPortal as createPortal2 } from "react-dom";
1324
1332
  import { Check as Check5, ChevronDown as ChevronDown5 } from "lucide-react";
1325
- import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
1333
+ import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
1326
1334
  function cx4(...classes) {
1327
1335
  return classes.filter(Boolean).join(" ");
1328
1336
  }
@@ -1372,8 +1380,8 @@ function SelectFilter({
1372
1380
  window.removeEventListener("scroll", reposition, true);
1373
1381
  };
1374
1382
  }, [open, close, reposition]);
1375
- return /* @__PURE__ */ jsxs8("div", { className: cx4("relative", fullWidth && "w-full"), ref, children: [
1376
- /* @__PURE__ */ jsxs8(
1383
+ return /* @__PURE__ */ jsxs9("div", { className: cx4("relative", fullWidth && "w-full"), ref, children: [
1384
+ /* @__PURE__ */ jsxs9(
1377
1385
  "button",
1378
1386
  {
1379
1387
  type: "button",
@@ -1387,7 +1395,7 @@ function SelectFilter({
1387
1395
  className
1388
1396
  ),
1389
1397
  children: [
1390
- /* @__PURE__ */ jsxs8("span", { className: "flex flex-col gap-1 text-left leading-none", children: [
1398
+ /* @__PURE__ */ jsxs9("span", { className: "flex flex-col gap-1 text-left leading-none", children: [
1391
1399
  /* @__PURE__ */ jsx10("span", { className: "text-[10px] uppercase tracking-wide text-text-tertiary", children: caption }),
1392
1400
  /* @__PURE__ */ jsx10("span", { className: "text-[12px] font-medium text-text-primary", children: value })
1393
1401
  ] }),
@@ -1417,7 +1425,7 @@ function SelectFilter({
1417
1425
  "aria-label": caption,
1418
1426
  children: /* @__PURE__ */ jsx10("div", { className: "max-h-[280px] overflow-y-auto p-1", children: options.map((o) => {
1419
1427
  const selected = o === value;
1420
- return /* @__PURE__ */ jsxs8(
1428
+ return /* @__PURE__ */ jsxs9(
1421
1429
  "button",
1422
1430
  {
1423
1431
  type: "button",
@@ -1452,7 +1460,7 @@ function SelectFilter({
1452
1460
 
1453
1461
  // src/Card.tsx
1454
1462
  import { forwardRef } from "react";
1455
- import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
1463
+ import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
1456
1464
  var Card = forwardRef(function Card2({ staticCard, title, subtitle, action, className, children, ...rest }, ref) {
1457
1465
  return /* @__PURE__ */ jsx11(
1458
1466
  "article",
@@ -1465,9 +1473,9 @@ var Card = forwardRef(function Card2({ staticCard, title, subtitle, action, clas
1465
1473
  className
1466
1474
  ].filter(Boolean).join(" "),
1467
1475
  ...rest,
1468
- children: title ? /* @__PURE__ */ jsxs9("div", { className: "flex flex-1 flex-col p-card-padding", children: [
1469
- /* @__PURE__ */ jsxs9("div", { className: "flex items-start justify-between gap-2", children: [
1470
- /* @__PURE__ */ jsxs9("div", { children: [
1476
+ children: title ? /* @__PURE__ */ jsxs10("div", { className: "flex flex-1 flex-col p-card-padding", children: [
1477
+ /* @__PURE__ */ jsxs10("div", { className: "flex items-start justify-between gap-2", children: [
1478
+ /* @__PURE__ */ jsxs10("div", { children: [
1471
1479
  /* @__PURE__ */ jsx11("h3", { className: "text-[15px] font-semibold leading-snug text-text-primary", children: title }),
1472
1480
  subtitle && /* @__PURE__ */ jsx11("p", { className: "mt-0.5 text-[12px] leading-snug text-text-tertiary", children: subtitle })
1473
1481
  ] }),
@@ -1481,7 +1489,7 @@ var Card = forwardRef(function Card2({ staticCard, title, subtitle, action, clas
1481
1489
 
1482
1490
  // src/NoResultsEmptyState.tsx
1483
1491
  import { FilterX } from "lucide-react";
1484
- import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
1492
+ import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
1485
1493
  var NO_RESULTS_TITLE = "No results match your filters";
1486
1494
  var NO_RESULTS_BODY = "Your filters may be too narrow, conflict with each other, or have no activity in this period.";
1487
1495
  function noResultsBody(workspaceName) {
@@ -1503,11 +1511,11 @@ function NoResultsEmptyState({
1503
1511
  const showClear = hasFilters !== false && Boolean(onClearFilters);
1504
1512
  const showEdit = Boolean(onEditFilters);
1505
1513
  const hasActions = showClear || showEdit || Boolean(actions && actions.length > 0);
1506
- return /* @__PURE__ */ jsxs10("div", { className: "flex flex-col items-center justify-center gap-3 text-center", "data-testid": testIdPrefix, children: [
1514
+ return /* @__PURE__ */ jsxs11("div", { className: "flex flex-col items-center justify-center gap-3 text-center", "data-testid": testIdPrefix, children: [
1507
1515
  /* @__PURE__ */ jsx12("span", { className: "flex h-11 w-11 items-center justify-center rounded-full bg-subtle text-text-tertiary", children: /* @__PURE__ */ jsx12(FilterX, { size: 20, "aria-hidden": "true" }) }),
1508
1516
  /* @__PURE__ */ jsx12("h2", { className: "text-base font-semibold text-text-primary", children: title }),
1509
1517
  /* @__PURE__ */ jsx12("p", { className: "max-w-[420px] text-[13px] leading-relaxed text-text-secondary", children: bodyText }),
1510
- hasActions && /* @__PURE__ */ jsxs10("div", { className: "mt-1 flex flex-col items-center gap-3", children: [
1518
+ hasActions && /* @__PURE__ */ jsxs11("div", { className: "mt-1 flex flex-col items-center gap-3", children: [
1511
1519
  showClear && /* @__PURE__ */ jsx12(
1512
1520
  "button",
1513
1521
  {
@@ -1545,7 +1553,7 @@ function NoResultsEmptyState({
1545
1553
  // src/WorkspaceSelectedCard.tsx
1546
1554
  import { useEffect as useEffect7, useRef as useRef8, useState as useState7 } from "react";
1547
1555
  import { ChevronDown as ChevronDown6, X as X2 } from "lucide-react";
1548
- import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
1556
+ import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
1549
1557
  function cx5(...parts) {
1550
1558
  return parts.filter(Boolean).join(" ");
1551
1559
  }
@@ -1567,8 +1575,8 @@ function SummaryGroupItem({
1567
1575
  else if (expandCount === 0) setOpen(false);
1568
1576
  wasEmpty.current = expandCount === 0;
1569
1577
  }, [expandCount]);
1570
- return /* @__PURE__ */ jsxs11("div", { className: nested ? "" : "py-3 first:pt-0 last:pb-0", children: [
1571
- /* @__PURE__ */ jsxs11(
1578
+ return /* @__PURE__ */ jsxs12("div", { className: nested ? "" : "py-3 first:pt-0 last:pb-0", children: [
1579
+ /* @__PURE__ */ jsxs12(
1572
1580
  "button",
1573
1581
  {
1574
1582
  type: "button",
@@ -1590,14 +1598,14 @@ function SummaryGroupItem({
1590
1598
  ]
1591
1599
  }
1592
1600
  ),
1593
- open && /* @__PURE__ */ jsx13("div", { className: "pt-2.5", children: ownCount === 0 && subCount === 0 ? /* @__PURE__ */ jsx13("p", { className: "text-[12px] text-text-secondary", children: "Nothing selected." }) : /* @__PURE__ */ jsxs11("div", { className: "flex flex-col gap-2.5", children: [
1594
- ownCount > 0 && /* @__PURE__ */ jsxs11("div", { className: "flex flex-col gap-1.5", children: [
1595
- group.items.map((item) => /* @__PURE__ */ jsxs11(
1601
+ open && /* @__PURE__ */ jsx13("div", { className: "pt-2.5", children: ownCount === 0 && subCount === 0 ? /* @__PURE__ */ jsx13("p", { className: "text-[12px] text-text-secondary", children: "Nothing selected." }) : /* @__PURE__ */ jsxs12("div", { className: "flex flex-col gap-2.5", children: [
1602
+ ownCount > 0 && /* @__PURE__ */ jsxs12("div", { className: "flex flex-col gap-1.5", children: [
1603
+ group.items.map((item) => /* @__PURE__ */ jsxs12(
1596
1604
  "div",
1597
1605
  {
1598
1606
  className: "flex items-center justify-between gap-2 rounded-control border border-border-default bg-canvas px-2 py-1",
1599
1607
  children: [
1600
- /* @__PURE__ */ jsxs11("span", { className: "min-w-0 flex-1", children: [
1608
+ /* @__PURE__ */ jsxs12("span", { className: "min-w-0 flex-1", children: [
1601
1609
  /* @__PURE__ */ jsx13("span", { className: "block truncate text-[12px] text-text-primary", children: item.name }),
1602
1610
  item.meta && /* @__PURE__ */ jsx13("span", { className: "block truncate text-[11px] text-text-secondary", children: item.meta })
1603
1611
  ] }),
@@ -1632,7 +1640,7 @@ function SummaryGroupItem({
1632
1640
  }
1633
1641
 
1634
1642
  // src/chart-placeholder-shared.tsx
1635
- import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
1643
+ import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
1636
1644
  var GRID_ROWS = [0, 25, 50, 75, 100];
1637
1645
  var Y_TICK_WIDTHS = [26, 30, 30, 26, 20];
1638
1646
  var Y_AXIS_W = 48;
@@ -1644,8 +1652,8 @@ function AxisFrame({
1644
1652
  children
1645
1653
  }) {
1646
1654
  const gutter = xTicks > 0 ? X_AXIS_H : 0;
1647
- return /* @__PURE__ */ jsx14("div", { className: "w-full", style: { height }, role: "presentation", "aria-hidden": "true", children: /* @__PURE__ */ jsxs12("div", { className: "relative h-full w-full", children: [
1648
- /* @__PURE__ */ jsxs12("div", { className: "absolute inset-y-0 right-0", style: { left: Y_AXIS_W, bottom: gutter }, children: [
1655
+ return /* @__PURE__ */ jsx14("div", { className: "w-full", style: { height }, role: "presentation", "aria-hidden": "true", children: /* @__PURE__ */ jsxs13("div", { className: "relative h-full w-full", children: [
1656
+ /* @__PURE__ */ jsxs13("div", { className: "absolute inset-y-0 right-0", style: { left: Y_AXIS_W, bottom: gutter }, children: [
1649
1657
  GRID_ROWS.map((pct) => /* @__PURE__ */ jsx14(
1650
1658
  "div",
1651
1659
  {
@@ -1681,8 +1689,8 @@ function BlankLegend({ rows, reverse = false }) {
1681
1689
  className: `flex flex-1 justify-center gap-1.5 ${reverse ? "flex-col-reverse" : "flex-col"}`,
1682
1690
  role: "presentation",
1683
1691
  "aria-hidden": "true",
1684
- children: Array.from({ length: rows }, (_, i) => /* @__PURE__ */ jsxs12("li", { className: "flex items-center justify-between gap-2", children: [
1685
- /* @__PURE__ */ jsxs12("span", { className: "flex items-center gap-1.5", children: [
1692
+ children: Array.from({ length: rows }, (_, i) => /* @__PURE__ */ jsxs13("li", { className: "flex items-center justify-between gap-2", children: [
1693
+ /* @__PURE__ */ jsxs13("span", { className: "flex items-center gap-1.5", children: [
1686
1694
  /* @__PURE__ */ jsx14("span", { className: "h-2.5 w-2.5 rounded-xs bg-subtle" }),
1687
1695
  /* @__PURE__ */ jsx14(
1688
1696
  "span",
@@ -1706,7 +1714,7 @@ function BarChartPlaceholder({ height = 220 }) {
1706
1714
  }
1707
1715
 
1708
1716
  // src/LineChartPlaceholder.tsx
1709
- import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
1717
+ import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
1710
1718
  var LINE_SERIES = [
1711
1719
  [58, 52, 55, 41, 45, 33, 36, 25, 28, 17],
1712
1720
  [74, 71, 66, 68, 59, 61, 54, 56, 48, 45],
@@ -1716,8 +1724,8 @@ var LINE_SERIES = [
1716
1724
  var LINE_FORECAST_FROM = 7;
1717
1725
  function LineChartPlaceholder({ height = 280 }) {
1718
1726
  const toPath = (pts, from, to) => pts.slice(from, to).map((y, i) => `${(i + from) / (pts.length - 1) * 100},${y}`).join(" ");
1719
- return /* @__PURE__ */ jsxs13(AxisFrame, { height, xTicks: LINE_SERIES[0].length, children: [
1720
- /* @__PURE__ */ jsx16("svg", { viewBox: "0 0 100 100", preserveAspectRatio: "none", className: "absolute inset-0 h-full w-full", children: LINE_SERIES.map((pts, s) => /* @__PURE__ */ jsxs13("g", { children: [
1727
+ return /* @__PURE__ */ jsxs14(AxisFrame, { height, xTicks: LINE_SERIES[0].length, children: [
1728
+ /* @__PURE__ */ jsx16("svg", { viewBox: "0 0 100 100", preserveAspectRatio: "none", className: "absolute inset-0 h-full w-full", children: LINE_SERIES.map((pts, s) => /* @__PURE__ */ jsxs14("g", { children: [
1721
1729
  /* @__PURE__ */ jsx16(
1722
1730
  "polyline",
1723
1731
  {
@@ -1762,12 +1770,12 @@ function LineChartPlaceholder({ height = 280 }) {
1762
1770
  }
1763
1771
 
1764
1772
  // src/PieChartPlaceholder.tsx
1765
- import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
1773
+ import { jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
1766
1774
  var PIE_SEAMS = [0, 115, 180, 230, 262, 288, 310, 332];
1767
1775
  function PieChartPlaceholder({ height = 220, legendRows = 8 }) {
1768
1776
  const r = 45;
1769
- return /* @__PURE__ */ jsxs14("div", { className: "flex w-full items-center gap-3", style: { height }, role: "presentation", "aria-hidden": "true", children: [
1770
- /* @__PURE__ */ jsx17("div", { className: "flex h-full items-center justify-center", style: { width: "60%" }, children: /* @__PURE__ */ jsxs14("svg", { viewBox: "0 0 100 100", className: "h-full", style: { aspectRatio: "1 / 1" }, children: [
1777
+ return /* @__PURE__ */ jsxs15("div", { className: "flex w-full items-center gap-3", style: { height }, role: "presentation", "aria-hidden": "true", children: [
1778
+ /* @__PURE__ */ jsx17("div", { className: "flex h-full items-center justify-center", style: { width: "60%" }, children: /* @__PURE__ */ jsxs15("svg", { viewBox: "0 0 100 100", className: "h-full", style: { aspectRatio: "1 / 1" }, children: [
1771
1779
  /* @__PURE__ */ jsx17("circle", { cx: "50", cy: "50", r, fill: "var(--mr-color-subtle)" }),
1772
1780
  PIE_SEAMS.map((deg) => {
1773
1781
  const rad = (deg - 90) * Math.PI / 180;
@@ -1790,7 +1798,7 @@ function PieChartPlaceholder({ height = 220, legendRows = 8 }) {
1790
1798
  }
1791
1799
 
1792
1800
  // src/StackedColumnPlaceholder.tsx
1793
- import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
1801
+ import { jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
1794
1802
  var COLUMN_WEIGHTS = [20, 30, 15, 35, 24, 12, 28, 18];
1795
1803
  function columnBands(count) {
1796
1804
  const weights = Array.from({ length: count }, (_, i) => COLUMN_WEIGHTS[i % COLUMN_WEIGHTS.length]);
@@ -1815,7 +1823,7 @@ function StackedColumnPlaceholder({
1815
1823
  },
1816
1824
  i
1817
1825
  )) });
1818
- return /* @__PURE__ */ jsxs15("div", { className: "flex w-full gap-4", style: { height }, role: "presentation", "aria-hidden": "true", children: [
1826
+ return /* @__PURE__ */ jsxs16("div", { className: "flex w-full gap-4", style: { height }, role: "presentation", "aria-hidden": "true", children: [
1819
1827
  axis ? /* @__PURE__ */ jsx18("div", { style: { width: "55%" }, children: /* @__PURE__ */ jsx18(AxisFrame, { height, xTicks: 0, children: /* @__PURE__ */ jsx18("div", { className: "flex h-full items-stretch justify-center", children: column }) }) }) : /* @__PURE__ */ jsx18("div", { className: "flex items-stretch py-1", children: column }),
1820
1828
  /* @__PURE__ */ jsx18(BlankLegend, { rows: legendRows, reverse: !axis })
1821
1829
  ] });
@@ -1824,10 +1832,23 @@ function StackedColumnPlaceholder({
1824
1832
  // src/Tooltip.tsx
1825
1833
  import { useEffect as useEffect8, useId, useLayoutEffect as useLayoutEffect2, useRef as useRef9, useState as useState8 } from "react";
1826
1834
  import { createPortal as createPortal3 } from "react-dom";
1827
- import { jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
1835
+ import { jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
1828
1836
  function cx6(...parts) {
1829
1837
  return parts.filter(Boolean).join(" ");
1830
1838
  }
1839
+ function exitDurationMs(el) {
1840
+ if (typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches) return 0;
1841
+ const cs = window.getComputedStyle(el);
1842
+ if (cs.transitionProperty === "none") return 0;
1843
+ const toMs = (v) => {
1844
+ const n = parseFloat(v);
1845
+ if (!Number.isFinite(n)) return 0;
1846
+ return v.trim().endsWith("ms") ? n : n * 1e3;
1847
+ };
1848
+ const durations = cs.transitionDuration.split(",").map(toMs);
1849
+ const delays = cs.transitionDelay.split(",").map(toMs);
1850
+ return Math.max(0, ...durations.map((d, i) => d + (delays[i] ?? delays[0] ?? 0)));
1851
+ }
1831
1852
  function Tooltip({
1832
1853
  label,
1833
1854
  children,
@@ -1847,6 +1868,10 @@ function Tooltip({
1847
1868
  const boxRef = useRef9(null);
1848
1869
  const hideTimer = useRef9(null);
1849
1870
  const showTimer = useRef9(null);
1871
+ const exitTimer = useRef9(null);
1872
+ const [shown, setShown] = useState8(false);
1873
+ const openRef = useRef9(false);
1874
+ const mountedRef = useRef9(false);
1850
1875
  const id = useId();
1851
1876
  const clearHideTimer = () => {
1852
1877
  if (hideTimer.current) {
@@ -1860,10 +1885,17 @@ function Tooltip({
1860
1885
  showTimer.current = null;
1861
1886
  }
1862
1887
  };
1888
+ const clearExitTimer = () => {
1889
+ if (exitTimer.current) {
1890
+ clearTimeout(exitTimer.current);
1891
+ exitTimer.current = null;
1892
+ }
1893
+ };
1863
1894
  useEffect8(
1864
1895
  () => () => {
1865
1896
  clearHideTimer();
1866
1897
  clearShowTimer();
1898
+ clearExitTimer();
1867
1899
  },
1868
1900
  []
1869
1901
  );
@@ -1871,26 +1903,56 @@ function Tooltip({
1871
1903
  const el = anchorRef ? anchorRef.current : ref.current;
1872
1904
  if (!el) return;
1873
1905
  if (whenTruncated && el.scrollWidth <= el.clientWidth) return;
1906
+ clearExitTimer();
1907
+ openRef.current = true;
1874
1908
  const r = el.getBoundingClientRect();
1875
- setBoxWidth(null);
1909
+ if (!mountedRef.current) setBoxWidth(null);
1910
+ mountedRef.current = true;
1876
1911
  setAnchor({ top: r.top, left: r.left, width: r.width, height: r.height, bottom: r.bottom, right: r.right });
1877
1912
  if (anchorRef) el.setAttribute("aria-describedby", id);
1878
1913
  };
1879
1914
  const show = () => {
1880
1915
  clearHideTimer();
1881
- if (delay > 0) {
1916
+ clearShowTimer();
1917
+ if (delay > 0 && !mountedRef.current) {
1882
1918
  showTimer.current = setTimeout(reveal, delay);
1883
1919
  } else {
1884
1920
  reveal();
1885
1921
  }
1886
1922
  };
1887
- const hideNow = () => {
1888
- clearShowTimer();
1889
- clearHideTimer();
1923
+ const unmount = () => {
1924
+ clearExitTimer();
1925
+ if (openRef.current || !mountedRef.current) return;
1926
+ mountedRef.current = false;
1890
1927
  setAnchor(null);
1891
1928
  setBoxWidth(null);
1892
1929
  if (anchorRef?.current) anchorRef.current.removeAttribute("aria-describedby");
1893
1930
  };
1931
+ const hideNow = () => {
1932
+ clearShowTimer();
1933
+ clearHideTimer();
1934
+ openRef.current = false;
1935
+ if (!mountedRef.current) return;
1936
+ setShown(false);
1937
+ clearExitTimer();
1938
+ const ms = boxRef.current ? exitDurationMs(boxRef.current) : 0;
1939
+ if (ms === 0) {
1940
+ unmount();
1941
+ return;
1942
+ }
1943
+ exitTimer.current = setTimeout(unmount, ms + 50);
1944
+ };
1945
+ const keepOpen = () => {
1946
+ clearHideTimer();
1947
+ if (openRef.current || !mountedRef.current) return;
1948
+ clearExitTimer();
1949
+ openRef.current = true;
1950
+ setShown(true);
1951
+ };
1952
+ const onBoxTransitionEnd = (e) => {
1953
+ if (e.target !== e.currentTarget || e.propertyName !== "opacity") return;
1954
+ if (!openRef.current) unmount();
1955
+ };
1894
1956
  const hide = () => {
1895
1957
  clearShowTimer();
1896
1958
  if (!interactive) {
@@ -1920,6 +1982,7 @@ function Tooltip({
1920
1982
  const el = boxRef.current;
1921
1983
  if (!el) return;
1922
1984
  setBoxWidth(el.getBoundingClientRect().width);
1985
+ if (openRef.current) setShown(true);
1923
1986
  }, [anchor, label]);
1924
1987
  const margin = 8;
1925
1988
  let style = { top: 0, left: 0 };
@@ -1947,10 +2010,19 @@ function Tooltip({
1947
2010
  id,
1948
2011
  "data-testid": testIdPrefix && `${testIdPrefix}-tooltip`,
1949
2012
  style: { top: style.top, left: style.left, right: style.right, visibility: boxWidth == null ? "hidden" : "visible" },
1950
- onMouseEnter: interactive ? clearHideTimer : void 0,
2013
+ onMouseEnter: interactive ? keepOpen : void 0,
1951
2014
  onMouseLeave: interactive ? hide : void 0,
2015
+ onTransitionEnd: onBoxTransitionEnd,
1952
2016
  className: cx6(
1953
2017
  "fixed z-[90] w-max max-w-xs whitespace-normal break-words px-2.5 py-1.5 text-xs leading-snug",
2018
+ // Fade in/out. The sys duration token rather than a ref one:
2019
+ // it is what Button's hover/press transition uses, and a
2020
+ // tooltip's fade is the same kind of interactive feedback.
2021
+ // design-tokens has no in-out curve (ease-interactive is the
2022
+ // decelerating "standard" curve), so ease-in-out is Tailwind's.
2023
+ "transition-opacity duration-(--mr-motion-duration-interactive) ease-in-out motion-reduce:transition-none",
2024
+ shown ? "opacity-100" : "opacity-0",
2025
+ // Non-interactive: never a pointer target, fade-out included.
1954
2026
  interactive ? "pointer-events-auto" : "pointer-events-none",
1955
2027
  variant === "inverted" ? "rounded-control bg-text-primary text-surface" : "rounded-control border border-border-default bg-surface text-text-primary shadow-overlay",
1956
2028
  translate
@@ -1961,7 +2033,7 @@ function Tooltip({
1961
2033
  document.body
1962
2034
  ) : null;
1963
2035
  if (anchorRef) return floating;
1964
- return /* @__PURE__ */ jsxs16(
2036
+ return /* @__PURE__ */ jsxs17(
1965
2037
  "span",
1966
2038
  {
1967
2039
  ref,
@@ -1980,13 +2052,13 @@ function Tooltip({
1980
2052
  }
1981
2053
 
1982
2054
  // src/AdvertiserNoResults.tsx
1983
- import { jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
2055
+ import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
1984
2056
  function AdvertiserNoResults({
1985
2057
  query,
1986
2058
  hint = "Try checking your spelling or searching for a broader brand name."
1987
2059
  }) {
1988
- return /* @__PURE__ */ jsxs17("div", { className: "flex flex-col items-center gap-1.5 px-4 py-8 text-center", children: [
1989
- /* @__PURE__ */ jsxs17("p", { className: "text-[13px] font-medium text-text-primary", children: [
2060
+ return /* @__PURE__ */ jsxs18("div", { className: "flex flex-col items-center gap-1.5 px-4 py-8 text-center", children: [
2061
+ /* @__PURE__ */ jsxs18("p", { className: "text-[13px] font-medium text-text-primary", children: [
1990
2062
  "No results found for \u201C",
1991
2063
  query,
1992
2064
  "\u201D"
@@ -1997,9 +2069,9 @@ function AdvertiserNoResults({
1997
2069
 
1998
2070
  // src/SelectAllVisible.tsx
1999
2071
  import { ListChecks as ListChecks2 } from "lucide-react";
2000
- import { jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
2072
+ import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
2001
2073
  function SelectAllVisible({ count, allSelected, onToggle, testIdPrefix }) {
2002
- return /* @__PURE__ */ jsxs18(
2074
+ return /* @__PURE__ */ jsxs19(
2003
2075
  "button",
2004
2076
  {
2005
2077
  type: "button",
@@ -2016,14 +2088,14 @@ function SelectAllVisible({ count, allSelected, onToggle, testIdPrefix }) {
2016
2088
 
2017
2089
  // src/SelectedSection.tsx
2018
2090
  import { ChevronDown as ChevronDown7 } from "lucide-react";
2019
- import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
2091
+ import { jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
2020
2092
  function cx7(...parts) {
2021
2093
  return parts.filter(Boolean).join(" ");
2022
2094
  }
2023
2095
  function SelectedSection({ count, open, onToggle, children, testIdPrefix }) {
2024
2096
  if (count === 0) return null;
2025
- return /* @__PURE__ */ jsxs19("div", { className: "flex flex-col", children: [
2026
- /* @__PURE__ */ jsxs19(
2097
+ return /* @__PURE__ */ jsxs20("div", { className: "flex flex-col", children: [
2098
+ /* @__PURE__ */ jsxs20(
2027
2099
  "button",
2028
2100
  {
2029
2101
  type: "button",
@@ -2047,7 +2119,7 @@ function SelectedSection({ count, open, onToggle, children, testIdPrefix }) {
2047
2119
  import { useCallback as useCallback3, useEffect as useEffect9, useLayoutEffect as useLayoutEffect3, useMemo as useMemo3, useRef as useRef10, useState as useState9 } from "react";
2048
2120
  import { createPortal as createPortal4 } from "react-dom";
2049
2121
  import { Search as Search4, Plus, Info as Info2, ChevronRight as ChevronRight3, ChevronDown as ChevronDown8, Check as Check6, List, Loader2 } from "lucide-react";
2050
- import { Fragment as Fragment4, jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
2122
+ import { Fragment as Fragment4, jsx as jsx23, jsxs as jsxs21 } from "react/jsx-runtime";
2051
2123
  function cx8(...parts) {
2052
2124
  return parts.filter(Boolean).join(" ");
2053
2125
  }
@@ -2142,8 +2214,8 @@ function SelectionPicker({
2142
2214
  }
2143
2215
  };
2144
2216
  const rowGridCols = showInfoColumn ? "grid-cols-[36px_1fr_44px]" : "grid-cols-[36px_1fr]";
2145
- return /* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-4", children: [
2146
- helper && /* @__PURE__ */ jsxs20(Fragment4, { children: [
2217
+ return /* @__PURE__ */ jsxs21("div", { className: "flex flex-col gap-4", children: [
2218
+ helper && /* @__PURE__ */ jsxs21(Fragment4, { children: [
2147
2219
  /* @__PURE__ */ jsx23("p", { className: "text-[13px] text-text-secondary", children: helper }),
2148
2220
  /* @__PURE__ */ jsx23("hr", { className: "-mx-5 -mt-2 border-border-default sm:-mx-6" })
2149
2221
  ] }),
@@ -2152,7 +2224,7 @@ function SelectionPicker({
2152
2224
  { id: "lists", label: "Account lists", icon: List }
2153
2225
  ].map((t) => {
2154
2226
  const on = source === t.id;
2155
- return /* @__PURE__ */ jsxs20(
2227
+ return /* @__PURE__ */ jsxs21(
2156
2228
  "button",
2157
2229
  {
2158
2230
  type: "button",
@@ -2170,9 +2242,9 @@ function SelectionPicker({
2170
2242
  t.id
2171
2243
  );
2172
2244
  }) }),
2173
- source === "search" && /* @__PURE__ */ jsxs20("div", { className: "flex min-w-0 flex-col gap-3", children: [
2174
- /* @__PURE__ */ jsxs20("div", { className: "flex flex-wrap items-center gap-2", children: [
2175
- /* @__PURE__ */ jsxs20("div", { className: "flex h-9 min-w-[200px] flex-1 items-center gap-2 rounded-control border border-border-default bg-input px-3", children: [
2245
+ source === "search" && /* @__PURE__ */ jsxs21("div", { className: "flex min-w-0 flex-col gap-3", children: [
2246
+ /* @__PURE__ */ jsxs21("div", { className: "flex flex-wrap items-center gap-2", children: [
2247
+ /* @__PURE__ */ jsxs21("div", { className: "flex h-9 min-w-[200px] flex-1 items-center gap-2 rounded-control border border-border-default bg-input px-3", children: [
2176
2248
  /* @__PURE__ */ jsx23(Search4, { size: 15, className: "text-text-secondary", "aria-hidden": "true" }),
2177
2249
  /* @__PURE__ */ jsx23(
2178
2250
  "input",
@@ -2202,14 +2274,14 @@ function SelectionPicker({
2202
2274
  )),
2203
2275
  toolbarExtra
2204
2276
  ] }),
2205
- !hasSearched ? /* @__PURE__ */ jsxs20("div", { className: "flex flex-col items-center gap-3 rounded-card border border-dashed border-border-default py-10 text-center", children: [
2277
+ !hasSearched ? /* @__PURE__ */ jsxs21("div", { className: "flex flex-col items-center gap-3 rounded-card border border-dashed border-border-default py-10 text-center", children: [
2206
2278
  /* @__PURE__ */ jsx23("div", { className: "flex h-12 w-12 items-center justify-center rounded-full bg-subtle", children: /* @__PURE__ */ jsx23(Search4, { size: 20, className: "text-text-tertiary", "aria-hidden": "true" }) }),
2207
- /* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-1", children: [
2279
+ /* @__PURE__ */ jsxs21("div", { className: "flex flex-col gap-1", children: [
2208
2280
  /* @__PURE__ */ jsx23("p", { className: "text-[14px] font-semibold text-text-primary", children: "Search to get started" }),
2209
2281
  /* @__PURE__ */ jsx23("p", { className: "text-[13px] text-text-tertiary", children: "Use the search or filters above to find and add options." })
2210
2282
  ] })
2211
- ] }) : /* @__PURE__ */ jsxs20("div", { className: "overflow-hidden rounded-control border border-border-default", children: [
2212
- /* @__PURE__ */ jsxs20(
2283
+ ] }) : /* @__PURE__ */ jsxs21("div", { className: "overflow-hidden rounded-control border border-border-default", children: [
2284
+ /* @__PURE__ */ jsxs21(
2213
2285
  "div",
2214
2286
  {
2215
2287
  className: cx8(
@@ -2238,8 +2310,8 @@ function SelectionPicker({
2238
2310
  const isLocked = lockedIds?.has(row.id) ?? false;
2239
2311
  const kids = getChildren?.(row);
2240
2312
  const isOpen = expanded.has(row.id);
2241
- return /* @__PURE__ */ jsxs20("div", { className: "border-t border-border-default/60 first:border-t-0", children: [
2242
- /* @__PURE__ */ jsxs20(
2313
+ return /* @__PURE__ */ jsxs21("div", { className: "border-t border-border-default/60 first:border-t-0", children: [
2314
+ /* @__PURE__ */ jsxs21(
2243
2315
  "div",
2244
2316
  {
2245
2317
  onClick: isLocked ? void 0 : () => toggleRow(row),
@@ -2290,13 +2362,13 @@ function SelectionPicker({
2290
2362
  ),
2291
2363
  isOpen && kids && /* @__PURE__ */ jsx23("div", { className: "bg-canvas/60 pb-1.5 pl-10 pr-3", children: kids.map((kid) => {
2292
2364
  const kidSel = selectedIds.has(kid.id);
2293
- return /* @__PURE__ */ jsxs20(
2365
+ return /* @__PURE__ */ jsxs21(
2294
2366
  "div",
2295
2367
  {
2296
2368
  className: "flex items-center justify-between gap-2 border-t border-border-default/40 py-2 first:border-t-0",
2297
2369
  children: [
2298
2370
  /* @__PURE__ */ jsx23("span", { className: "truncate text-[13px] text-text-secondary", children: kid.name }),
2299
- /* @__PURE__ */ jsxs20(
2371
+ /* @__PURE__ */ jsxs21(
2300
2372
  "button",
2301
2373
  {
2302
2374
  type: "button",
@@ -2319,7 +2391,7 @@ function SelectionPicker({
2319
2391
  }) })
2320
2392
  ] }, row.id);
2321
2393
  }) }),
2322
- !loading && !error && hasMore && /* @__PURE__ */ jsxs20(
2394
+ !loading && !error && hasMore && /* @__PURE__ */ jsxs21(
2323
2395
  "button",
2324
2396
  {
2325
2397
  type: "button",
@@ -2335,12 +2407,12 @@ function SelectionPicker({
2335
2407
  )
2336
2408
  ] })
2337
2409
  ] }),
2338
- source === "lists" && /* @__PURE__ */ jsxs20("div", { className: "flex min-w-0 flex-col gap-3", children: [
2410
+ source === "lists" && /* @__PURE__ */ jsxs21("div", { className: "flex min-w-0 flex-col gap-3", children: [
2339
2411
  /* @__PURE__ */ jsx23("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." }),
2340
- accountLists && accountLists.length > 0 ? /* @__PURE__ */ jsxs20(Fragment4, { children: [
2412
+ accountLists && accountLists.length > 0 ? /* @__PURE__ */ jsxs21(Fragment4, { children: [
2341
2413
  /* @__PURE__ */ jsx23(ScrollFade, { className: "flex max-h-[396px] flex-col gap-2 overflow-y-auto pr-0.5", children: accountLists.map((list) => {
2342
2414
  const on = (selectedListIds ?? []).includes(list.id);
2343
- return /* @__PURE__ */ jsxs20(
2415
+ return /* @__PURE__ */ jsxs21(
2344
2416
  "button",
2345
2417
  {
2346
2418
  type: "button",
@@ -2362,9 +2434,9 @@ function SelectionPicker({
2362
2434
  children: on ? /* @__PURE__ */ jsx23(Check6, { size: 16 }) : /* @__PURE__ */ jsx23(Plus, { size: 16 })
2363
2435
  }
2364
2436
  ),
2365
- /* @__PURE__ */ jsxs20("span", { className: "min-w-0 flex-1", children: [
2437
+ /* @__PURE__ */ jsxs21("span", { className: "min-w-0 flex-1", children: [
2366
2438
  /* @__PURE__ */ jsx23("span", { className: "flex min-w-0 items-center gap-2", children: /* @__PURE__ */ jsx23("span", { className: "truncate text-[14px] font-medium text-text-primary", children: list.name }) }),
2367
- /* @__PURE__ */ jsxs20("span", { className: "block truncate text-[12px] text-text-secondary", children: [
2439
+ /* @__PURE__ */ jsxs21("span", { className: "block truncate text-[12px] text-text-secondary", children: [
2368
2440
  list.count,
2369
2441
  " accounts \xB7 ",
2370
2442
  list.entityTypes.join(", "),
@@ -2378,7 +2450,7 @@ function SelectionPicker({
2378
2450
  list.id
2379
2451
  );
2380
2452
  }) }),
2381
- /* @__PURE__ */ jsxs20(
2453
+ /* @__PURE__ */ jsxs21(
2382
2454
  "p",
2383
2455
  {
2384
2456
  className: "border-t border-border-default pt-2 text-right text-[12px] font-medium text-text-tertiary",
@@ -2390,9 +2462,9 @@ function SelectionPicker({
2390
2462
  ]
2391
2463
  }
2392
2464
  )
2393
- ] }) : /* @__PURE__ */ jsxs20("div", { className: "flex flex-col items-center gap-3 rounded-card border border-dashed border-border-default py-10 text-center", children: [
2465
+ ] }) : /* @__PURE__ */ jsxs21("div", { className: "flex flex-col items-center gap-3 rounded-card border border-dashed border-border-default py-10 text-center", children: [
2394
2466
  /* @__PURE__ */ jsx23("div", { className: "flex h-12 w-12 items-center justify-center rounded-full bg-subtle", children: /* @__PURE__ */ jsx23(List, { size: 20, className: "text-text-tertiary", "aria-hidden": "true" }) }),
2395
- /* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-1", children: [
2467
+ /* @__PURE__ */ jsxs21("div", { className: "flex flex-col gap-1", children: [
2396
2468
  /* @__PURE__ */ jsx23("p", { className: "text-[14px] font-semibold text-text-primary", children: "No account lists yet" }),
2397
2469
  /* @__PURE__ */ jsx23("p", { className: "text-[13px] text-text-tertiary", children: "Account lists set up for you will appear here." })
2398
2470
  ] })
@@ -2476,8 +2548,8 @@ function FilterDropdown({
2476
2548
  const count = active.size;
2477
2549
  const label = count === 0 ? filter.label : count === 1 ? [...active][0] : "Multiple";
2478
2550
  const filterSlug = slug4(filter.label);
2479
- return /* @__PURE__ */ jsxs20("div", { className: "relative", children: [
2480
- /* @__PURE__ */ jsxs20(
2551
+ return /* @__PURE__ */ jsxs21("div", { className: "relative", children: [
2552
+ /* @__PURE__ */ jsxs21(
2481
2553
  "button",
2482
2554
  {
2483
2555
  ref: btnRef,
@@ -2494,7 +2566,7 @@ function FilterDropdown({
2494
2566
  }
2495
2567
  ),
2496
2568
  open && pos && createPortal4(
2497
- /* @__PURE__ */ jsxs20(
2569
+ /* @__PURE__ */ jsxs21(
2498
2570
  "div",
2499
2571
  {
2500
2572
  ref: menuRef,
@@ -2503,7 +2575,7 @@ function FilterDropdown({
2503
2575
  style: { top: pos.top, left: pos.left },
2504
2576
  className: "fixed z-[80] min-w-[220px] rounded-card border border-border-default bg-surface p-2 shadow-overlay",
2505
2577
  children: [
2506
- searchable && /* @__PURE__ */ jsxs20("div", { className: "mb-1.5 flex h-8 items-center gap-2 rounded-control border border-border-default bg-input px-2.5", children: [
2578
+ searchable && /* @__PURE__ */ jsxs21("div", { className: "mb-1.5 flex h-8 items-center gap-2 rounded-control border border-border-default bg-input px-2.5", children: [
2507
2579
  /* @__PURE__ */ jsx23(Search4, { size: 14, className: "shrink-0 text-text-secondary", "aria-hidden": "true" }),
2508
2580
  /* @__PURE__ */ jsx23(
2509
2581
  "input",
@@ -2518,7 +2590,7 @@ function FilterDropdown({
2518
2590
  ] }),
2519
2591
  /* @__PURE__ */ jsx23("div", { className: cx8("flex flex-col gap-0.5", searchable && "max-h-[240px] overflow-y-auto"), children: shownOptions.length === 0 ? /* @__PURE__ */ jsx23("p", { className: "px-2 py-3 text-center text-[12px] text-text-secondary", children: "No matches." }) : shownOptions.map((opt) => {
2520
2592
  const on = active.has(opt);
2521
- return /* @__PURE__ */ jsxs20(
2593
+ return /* @__PURE__ */ jsxs21(
2522
2594
  "label",
2523
2595
  {
2524
2596
  className: "flex cursor-pointer items-center gap-2 rounded-control px-2 py-1.5 text-[13px] text-text-primary hover:bg-subtle",
@@ -2554,7 +2626,7 @@ function gridForColumns(columns) {
2554
2626
 
2555
2627
  // src/PublisherBreakdownList.tsx
2556
2628
  import { useState as useState10 } from "react";
2557
- import { jsx as jsx24, jsxs as jsxs21 } from "react/jsx-runtime";
2629
+ import { jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
2558
2630
  function cx9(...parts) {
2559
2631
  return parts.filter(Boolean).join(" ");
2560
2632
  }
@@ -2583,7 +2655,7 @@ function BreakdownTag({ children }) {
2583
2655
  return /* @__PURE__ */ jsx24("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 });
2584
2656
  }
2585
2657
  function DelayedTip({ label, children }) {
2586
- return /* @__PURE__ */ jsxs21("span", { className: "group/dt relative inline-flex", tabIndex: 0, "aria-label": label, children: [
2658
+ return /* @__PURE__ */ jsxs22("span", { className: "group/dt relative inline-flex", tabIndex: 0, "aria-label": label, children: [
2587
2659
  children,
2588
2660
  /* @__PURE__ */ jsx24(
2589
2661
  "span",
@@ -2599,9 +2671,9 @@ var COL_CURRENT = 76;
2599
2671
  var COL_PREVIOUS = 76;
2600
2672
  var COL_YOY = 44;
2601
2673
  function MetricListHeader({ className }) {
2602
- return /* @__PURE__ */ jsxs21("div", { className: cx9("flex items-baseline gap-2 pb-2", className), children: [
2674
+ return /* @__PURE__ */ jsxs22("div", { className: cx9("flex items-baseline gap-2 pb-2", className), children: [
2603
2675
  /* @__PURE__ */ jsx24("span", { className: "flex-1" }),
2604
- /* @__PURE__ */ jsxs21("span", { className: "flex shrink-0 items-center gap-2 pr-1.5", children: [
2676
+ /* @__PURE__ */ jsxs22("span", { className: "flex shrink-0 items-center gap-2 pr-1.5", children: [
2605
2677
  /* @__PURE__ */ jsx24("span", { className: "text-right text-[11px] font-medium text-text-tertiary", style: { width: COL_CURRENT }, children: "Current" }),
2606
2678
  /* @__PURE__ */ jsx24(DelayedTip, { label: "Spend during the same time period one year ago.", children: /* @__PURE__ */ jsx24("span", { className: "text-right text-[11px] font-medium text-text-tertiary", style: { width: COL_PREVIOUS }, children: "Previous" }) }),
2607
2679
  /* @__PURE__ */ jsx24(DelayedTip, { label: "Percent change from this time period vs. the same time one year ago.", children: /* @__PURE__ */ jsx24("span", { className: "text-right text-[11px] font-medium text-text-tertiary", style: { width: COL_YOY }, children: "YoY" }) })
@@ -2611,10 +2683,10 @@ function MetricListHeader({ className }) {
2611
2683
  function MetricCells({ spendN, yoy }) {
2612
2684
  const prior = priorYearAmt(spendN, yoy);
2613
2685
  const up = yoy !== "NEW" && yoy >= 0;
2614
- return /* @__PURE__ */ jsxs21("span", { className: "flex shrink-0 items-center gap-2 pr-1.5", children: [
2686
+ return /* @__PURE__ */ jsxs22("span", { className: "flex shrink-0 items-center gap-2 pr-1.5", children: [
2615
2687
  /* @__PURE__ */ jsx24("span", { className: "text-right text-[12px] font-bold tabular-nums text-text-primary", style: { width: COL_CURRENT }, children: fmtM(spendN) }),
2616
2688
  /* @__PURE__ */ jsx24("span", { className: "text-right text-[12px] font-normal tabular-nums text-text-primary", style: { width: COL_PREVIOUS }, children: prior ?? "\u2014" }),
2617
- /* @__PURE__ */ jsx24("span", { className: "flex justify-end", style: { width: COL_YOY }, children: yoy === "NEW" ? /* @__PURE__ */ jsx24("span", { className: "rounded-full bg-status-warning/15 px-1.5 text-[10px] font-semibold text-text-warning", children: "NEW" }) : /* @__PURE__ */ jsxs21("span", { className: cx9("text-right text-[12px] font-semibold tabular-nums", up ? "text-text-success" : "text-text-danger"), children: [
2689
+ /* @__PURE__ */ jsx24("span", { className: "flex justify-end", style: { width: COL_YOY }, children: yoy === "NEW" ? /* @__PURE__ */ jsx24("span", { className: "rounded-full bg-status-warning/15 px-1.5 text-[10px] font-semibold text-text-warning", children: "NEW" }) : /* @__PURE__ */ jsxs22("span", { className: cx9("text-right text-[12px] font-semibold tabular-nums", up ? "text-text-success" : "text-text-danger"), children: [
2618
2690
  up ? "+" : "\u2212",
2619
2691
  Math.abs(yoy),
2620
2692
  "%"
@@ -2625,14 +2697,14 @@ function PublisherBreakdownList({ rows, defaultVisibleCount = 10, padded = true,
2625
2697
  const [showAll, setShowAll] = useState10(false);
2626
2698
  const visible = showAll ? rows : rows.slice(0, defaultVisibleCount);
2627
2699
  const rowPad = padded ? "px-5" : "";
2628
- return /* @__PURE__ */ jsxs21("div", { className: "flex flex-col", children: [
2629
- /* @__PURE__ */ jsxs21("div", { className: "flex flex-col", children: [
2700
+ return /* @__PURE__ */ jsxs22("div", { className: "flex flex-col", children: [
2701
+ /* @__PURE__ */ jsxs22("div", { className: "flex flex-col", children: [
2630
2702
  /* @__PURE__ */ jsx24(MetricListHeader, { className: rowPad }),
2631
- visible.map((p) => /* @__PURE__ */ jsxs21("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: [
2632
- /* @__PURE__ */ jsxs21("div", { className: "flex min-w-0 items-center gap-2.5", children: [
2703
+ visible.map((p) => /* @__PURE__ */ jsxs22("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: [
2704
+ /* @__PURE__ */ jsxs22("div", { className: "flex min-w-0 items-center gap-2.5", children: [
2633
2705
  renderLogo ? renderLogo(p) : /* @__PURE__ */ jsx24(Monogram, { name: p.brand, size: 28 }),
2634
- /* @__PURE__ */ jsxs21("div", { className: "min-w-0", children: [
2635
- /* @__PURE__ */ jsxs21("div", { className: "flex flex-wrap items-center gap-1.5", children: [
2706
+ /* @__PURE__ */ jsxs22("div", { className: "min-w-0", children: [
2707
+ /* @__PURE__ */ jsxs22("div", { className: "flex flex-wrap items-center gap-1.5", children: [
2636
2708
  /* @__PURE__ */ jsx24("span", { className: "text-[14px] font-semibold text-text-primary", children: p.brand }),
2637
2709
  p.tags.map((t) => /* @__PURE__ */ jsx24(BreakdownTag, { children: t }, t))
2638
2710
  ] }),
@@ -2642,14 +2714,14 @@ function PublisherBreakdownList({ rows, defaultVisibleCount = 10, padded = true,
2642
2714
  /* @__PURE__ */ jsx24(MetricCells, { spendN: p.spendN, yoy: p.yoy })
2643
2715
  ] }, p.brand))
2644
2716
  ] }),
2645
- rows.length > defaultVisibleCount && (viewAllHref ? /* @__PURE__ */ jsx24("div", { className: cx9("border-t border-border-default py-3", rowPad), children: /* @__PURE__ */ jsx24("a", { href: viewAllHref, className: "text-[12px] font-semibold text-text-link hover:underline", children: "See all publishers" }) }) : /* @__PURE__ */ jsxs21("div", { className: cx9("flex items-center gap-2 border-t border-border-default py-3 text-[12px] text-text-tertiary", rowPad), children: [
2646
- /* @__PURE__ */ jsxs21("span", { children: [
2717
+ rows.length > defaultVisibleCount && (viewAllHref ? /* @__PURE__ */ jsx24("div", { className: cx9("border-t border-border-default py-3", rowPad), children: /* @__PURE__ */ jsx24("a", { href: viewAllHref, className: "text-[12px] font-semibold text-text-link hover:underline", children: "See all publishers" }) }) : /* @__PURE__ */ jsxs22("div", { className: cx9("flex items-center gap-2 border-t border-border-default py-3 text-[12px] text-text-tertiary", rowPad), children: [
2718
+ /* @__PURE__ */ jsxs22("span", { children: [
2647
2719
  "Showing ",
2648
2720
  visible.length,
2649
2721
  " of ",
2650
2722
  rows.length
2651
2723
  ] }),
2652
- !showAll ? /* @__PURE__ */ jsxs21("button", { type: "button", onClick: () => setShowAll(true), className: "font-semibold text-text-link hover:underline", children: [
2724
+ !showAll ? /* @__PURE__ */ jsxs22("button", { type: "button", onClick: () => setShowAll(true), className: "font-semibold text-text-link hover:underline", children: [
2653
2725
  "See all (",
2654
2726
  rows.length - defaultVisibleCount,
2655
2727
  " more)"
@@ -2663,7 +2735,7 @@ import { forwardRef as forwardRef2 } from "react";
2663
2735
  import { Slot } from "@radix-ui/react-slot";
2664
2736
  import { cva } from "class-variance-authority";
2665
2737
  import { Loader2 as Loader22 } from "lucide-react";
2666
- import { jsx as jsx25, jsxs as jsxs22 } from "react/jsx-runtime";
2738
+ import { jsx as jsx25, jsxs as jsxs23 } from "react/jsx-runtime";
2667
2739
  var buttonVariants = cva(
2668
2740
  "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-control font-medium transition-all duration-(--mr-motion-duration-interactive) ease-interactive disabled:pointer-events-none disabled:opacity-40 focus-visible:outline-hidden focus-visible:ring-0",
2669
2741
  {
@@ -2690,34 +2762,32 @@ var buttonVariants = cva(
2690
2762
  );
2691
2763
  var Button = forwardRef2(
2692
2764
  ({ className, variant, size, asChild = false, loading = false, disabled, children, ...props }, ref) => {
2693
- const Comp = asChild ? Slot : "button";
2694
- return /* @__PURE__ */ jsxs22(
2695
- Comp,
2696
- {
2697
- className: cn(buttonVariants({ variant, size, className })),
2698
- ref,
2699
- disabled: disabled || loading,
2700
- "aria-busy": loading || void 0,
2701
- ...props,
2702
- children: [
2703
- loading && /* @__PURE__ */ jsx25(Loader22, { className: "size-4 shrink-0 animate-spin", "aria-hidden": "true" }),
2704
- children
2705
- ]
2706
- }
2707
- );
2765
+ const shared = {
2766
+ className: cn(buttonVariants({ variant, size, className })),
2767
+ disabled: disabled || loading,
2768
+ "aria-busy": loading || void 0,
2769
+ ...props
2770
+ };
2771
+ if (asChild) {
2772
+ return /* @__PURE__ */ jsx25(Slot, { ref, ...shared, children });
2773
+ }
2774
+ return /* @__PURE__ */ jsxs23("button", { ref, ...shared, children: [
2775
+ loading && /* @__PURE__ */ jsx25(Loader22, { className: "size-4 shrink-0 animate-spin", "aria-hidden": "true" }),
2776
+ children
2777
+ ] });
2708
2778
  }
2709
2779
  );
2710
2780
  Button.displayName = "Button";
2711
2781
 
2712
2782
  // src/FilterDropdownFooter.tsx
2713
- import { jsx as jsx26, jsxs as jsxs23 } from "react/jsx-runtime";
2783
+ import { jsx as jsx26, jsxs as jsxs24 } from "react/jsx-runtime";
2714
2784
  function FilterDropdownFooter({
2715
2785
  onClear,
2716
2786
  onApply,
2717
2787
  clearLabel = "Clear all",
2718
2788
  applyLabel = "Apply"
2719
2789
  }) {
2720
- return /* @__PURE__ */ jsxs23(
2790
+ return /* @__PURE__ */ jsxs24(
2721
2791
  "div",
2722
2792
  {
2723
2793
  className: cn(
@@ -2735,7 +2805,7 @@ function FilterDropdownFooter({
2735
2805
  // src/NameListModal.tsx
2736
2806
  import { useEffect as useEffect10, useState as useState11 } from "react";
2737
2807
  import { createPortal as createPortal5 } from "react-dom";
2738
- import { jsx as jsx27, jsxs as jsxs24 } from "react/jsx-runtime";
2808
+ import { jsx as jsx27, jsxs as jsxs25 } from "react/jsx-runtime";
2739
2809
  function NameListModal({
2740
2810
  title,
2741
2811
  initialName,
@@ -2765,7 +2835,7 @@ function NameListModal({
2765
2835
  {
2766
2836
  className: "fixed inset-0 z-70 flex items-center justify-center bg-scrim px-4",
2767
2837
  onMouseDown: (e) => e.target === e.currentTarget && onCancel(),
2768
- children: /* @__PURE__ */ jsxs24(
2838
+ children: /* @__PURE__ */ jsxs25(
2769
2839
  "div",
2770
2840
  {
2771
2841
  role: "dialog",
@@ -2774,7 +2844,7 @@ function NameListModal({
2774
2844
  className: "w-full max-w-[420px] rounded-card border border-border-default bg-surface p-5 shadow-overlay",
2775
2845
  children: [
2776
2846
  /* @__PURE__ */ jsx27("h2", { className: "text-[16px] font-semibold text-text-primary", children: title }),
2777
- /* @__PURE__ */ jsxs24("div", { className: "mt-4 flex flex-col gap-1.5", children: [
2847
+ /* @__PURE__ */ jsxs25("div", { className: "mt-4 flex flex-col gap-1.5", children: [
2778
2848
  /* @__PURE__ */ jsx27("label", { htmlFor: "account-list-name", className: "text-[12px] font-medium text-text-secondary", children: fieldLabel }),
2779
2849
  /* @__PURE__ */ jsx27(
2780
2850
  "input",
@@ -2788,11 +2858,11 @@ function NameListModal({
2788
2858
  }
2789
2859
  )
2790
2860
  ] }),
2791
- options && options.length > 0 && /* @__PURE__ */ jsx27("div", { className: "mt-4 flex flex-col gap-2.5", children: options.map((o) => /* @__PURE__ */ jsxs24("label", { className: "flex cursor-pointer items-center gap-2.5 text-[13px] text-text-primary", children: [
2861
+ options && options.length > 0 && /* @__PURE__ */ jsx27("div", { className: "mt-4 flex flex-col gap-2.5", children: options.map((o) => /* @__PURE__ */ jsxs25("label", { className: "flex cursor-pointer items-center gap-2.5 text-[13px] text-text-primary", children: [
2792
2862
  /* @__PURE__ */ jsx27(CheckBox, { checked: !!checked[o.key], onChange: () => toggle(o.key), ariaLabel: o.label }),
2793
2863
  o.label
2794
2864
  ] }, o.key)) }),
2795
- /* @__PURE__ */ jsxs24("div", { className: "mt-5 flex items-center justify-end gap-2", children: [
2865
+ /* @__PURE__ */ jsxs25("div", { className: "mt-5 flex items-center justify-end gap-2", children: [
2796
2866
  /* @__PURE__ */ jsx27(Button, { variant: "secondary", onClick: onCancel, children: "Cancel" }),
2797
2867
  /* @__PURE__ */ jsx27(Button, { disabled: !name.trim(), onClick: () => onSubmit(name.trim(), checked), children: submitLabel })
2798
2868
  ] })
@@ -2806,7 +2876,7 @@ function NameListModal({
2806
2876
  }
2807
2877
 
2808
2878
  // src/ChipTrigger.tsx
2809
- import { jsx as jsx28, jsxs as jsxs25 } from "react/jsx-runtime";
2879
+ import { jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
2810
2880
  function chipTriggerClass(variant = "box") {
2811
2881
  return cn(
2812
2882
  "flex h-11 items-center gap-2 rounded-control border 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",
@@ -2817,12 +2887,12 @@ function chipTriggerClass(variant = "box") {
2817
2887
  );
2818
2888
  }
2819
2889
  function ChipContent({ caption, value, icon }) {
2820
- const stack = /* @__PURE__ */ jsxs25("span", { className: "flex flex-col gap-1 text-left leading-none", children: [
2890
+ const stack = /* @__PURE__ */ jsxs26("span", { className: "flex flex-col gap-1 text-left leading-none", children: [
2821
2891
  /* @__PURE__ */ jsx28("span", { className: "text-[10px] uppercase tracking-wide text-text-tertiary", children: caption }),
2822
2892
  /* @__PURE__ */ jsx28("span", { className: "text-[12px] font-medium text-text-primary", children: value })
2823
2893
  ] });
2824
2894
  if (icon) {
2825
- return /* @__PURE__ */ jsxs25("span", { className: "flex items-center gap-2", children: [
2895
+ return /* @__PURE__ */ jsxs26("span", { className: "flex items-center gap-2", children: [
2826
2896
  /* @__PURE__ */ jsx28("span", { className: "shrink-0 text-text-tertiary", children: icon }),
2827
2897
  stack
2828
2898
  ] });
@@ -2832,10 +2902,10 @@ function ChipContent({ caption, value, icon }) {
2832
2902
 
2833
2903
  // src/FilterChipBar.tsx
2834
2904
  import { CircleSlash, X as X3 } from "lucide-react";
2835
- import { jsx as jsx29, jsxs as jsxs26 } from "react/jsx-runtime";
2905
+ import { jsx as jsx29, jsxs as jsxs27 } from "react/jsx-runtime";
2836
2906
  function FilterChipBar({ chips, onRemove, onClearAll, parkedKeys }) {
2837
2907
  if (chips.length === 0) return null;
2838
- return /* @__PURE__ */ jsxs26("div", { className: "flex flex-wrap items-center gap-1.5 border-t border-border-default pt-2.5", children: [
2908
+ return /* @__PURE__ */ jsxs27("div", { className: "flex flex-wrap items-center gap-1.5 border-t border-border-default pt-2.5", children: [
2839
2909
  chips.map((c) => /* @__PURE__ */ jsx29(
2840
2910
  Chip,
2841
2911
  {
@@ -2855,8 +2925,8 @@ function Chip({
2855
2925
  parked,
2856
2926
  onRemove
2857
2927
  }) {
2858
- return /* @__PURE__ */ jsxs26("span", { className: "group relative inline-flex", children: [
2859
- /* @__PURE__ */ jsxs26(
2928
+ return /* @__PURE__ */ jsxs27("span", { className: "group relative inline-flex", children: [
2929
+ /* @__PURE__ */ jsxs27(
2860
2930
  "span",
2861
2931
  {
2862
2932
  className: cn(
@@ -2896,10 +2966,10 @@ function Chip({
2896
2966
 
2897
2967
  // src/SortButton.tsx
2898
2968
  import { ArrowUp, ArrowDown, ArrowUpDown } from "lucide-react";
2899
- import { jsx as jsx30, jsxs as jsxs27 } from "react/jsx-runtime";
2969
+ import { jsx as jsx30, jsxs as jsxs28 } from "react/jsx-runtime";
2900
2970
  function SortButton({ label, sortKey, sort, onSort, disabled = false }) {
2901
2971
  const active = !disabled && sort.key === sortKey;
2902
- return /* @__PURE__ */ jsxs27(
2972
+ return /* @__PURE__ */ jsxs28(
2903
2973
  "button",
2904
2974
  {
2905
2975
  type: "button",
@@ -2951,7 +3021,7 @@ function sortProp(sort) {
2951
3021
 
2952
3022
  // src/Pager.tsx
2953
3023
  import { ChevronLeft as ChevronLeft3, ChevronRight as ChevronRight4 } from "lucide-react";
2954
- import { jsx as jsx31, jsxs as jsxs28 } from "react/jsx-runtime";
3024
+ import { jsx as jsx31, jsxs as jsxs29 } from "react/jsx-runtime";
2955
3025
  function pageWindow(current, total) {
2956
3026
  if (total <= 7) return Array.from({ length: total }, (_, i) => i + 1);
2957
3027
  const keep = /* @__PURE__ */ new Set([1, total, current, current - 1, current + 1]);
@@ -2967,7 +3037,7 @@ function pageWindow(current, total) {
2967
3037
  }
2968
3038
  function Pager({ page, totalPages, onPage }) {
2969
3039
  const btn = "flex h-8 min-w-8 items-center justify-center rounded-control px-2 text-[13px] transition-colors";
2970
- return /* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-1", children: [
3040
+ return /* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-1", children: [
2971
3041
  /* @__PURE__ */ jsx31(
2972
3042
  "button",
2973
3043
  {
@@ -3056,7 +3126,7 @@ function Tag({ children, className }) {
3056
3126
 
3057
3127
  // src/TablePagination.tsx
3058
3128
  import { ChevronDown as ChevronDown9, ChevronFirst, ChevronLast, ChevronLeft as ChevronLeft4, ChevronRight as ChevronRight5 } from "lucide-react";
3059
- import { jsx as jsx34, jsxs as jsxs29 } from "react/jsx-runtime";
3129
+ import { jsx as jsx34, jsxs as jsxs30 } from "react/jsx-runtime";
3060
3130
  function TablePagination({
3061
3131
  page,
3062
3132
  perPage,
@@ -3076,9 +3146,9 @@ function TablePagination({
3076
3146
  btn,
3077
3147
  "text-text-secondary hover:bg-subtle hover:text-text-primary disabled:pointer-events-none disabled:opacity-30"
3078
3148
  );
3079
- return /* @__PURE__ */ jsxs29("div", { className: cn("flex flex-wrap items-center justify-between gap-x-4 gap-y-2", className), children: [
3080
- /* @__PURE__ */ jsxs29("label", { className: "flex items-center gap-2 text-[13px] text-text-secondary", children: [
3081
- /* @__PURE__ */ jsxs29("span", { className: "relative", children: [
3149
+ return /* @__PURE__ */ jsxs30("div", { className: cn("flex flex-wrap items-center justify-between gap-x-4 gap-y-2", className), children: [
3150
+ /* @__PURE__ */ jsxs30("label", { className: "flex items-center gap-2 text-[13px] text-text-secondary", children: [
3151
+ /* @__PURE__ */ jsxs30("span", { className: "relative", children: [
3082
3152
  /* @__PURE__ */ jsx34(
3083
3153
  "select",
3084
3154
  {
@@ -3100,7 +3170,7 @@ function TablePagination({
3100
3170
  ] }),
3101
3171
  "items per page"
3102
3172
  ] }),
3103
- /* @__PURE__ */ jsxs29("nav", { className: "flex items-center gap-1", "aria-label": "Pagination", children: [
3173
+ /* @__PURE__ */ jsxs30("nav", { className: "flex items-center gap-1", "aria-label": "Pagination", children: [
3104
3174
  /* @__PURE__ */ jsx34(
3105
3175
  "button",
3106
3176
  {
@@ -3162,7 +3232,7 @@ function TablePagination({
3162
3232
  }
3163
3233
  )
3164
3234
  ] }),
3165
- /* @__PURE__ */ jsxs29("span", { className: "text-[13px] text-text-tertiary tabular-nums", children: [
3235
+ /* @__PURE__ */ jsxs30("span", { className: "text-[13px] text-text-tertiary tabular-nums", children: [
3166
3236
  rangeStart.toLocaleString(),
3167
3237
  " \u2013 ",
3168
3238
  rangeEnd.toLocaleString(),
@@ -3177,7 +3247,7 @@ function TablePagination({
3177
3247
  // src/DateRangePicker.tsx
3178
3248
  import { useEffect as useEffect11, useMemo as useMemo4, useRef as useRef11, useState as useState12 } from "react";
3179
3249
  import { ChevronDown as ChevronDown10 } from "lucide-react";
3180
- import { jsx as jsx35, jsxs as jsxs30 } from "react/jsx-runtime";
3250
+ import { jsx as jsx35, jsxs as jsxs31 } from "react/jsx-runtime";
3181
3251
  var MONTH_ABBR = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
3182
3252
  var QUARTER_ABBR = ["Q1", "Q2", "Q3", "Q4"];
3183
3253
  var PRESETS = ["Rolling 3 months", "Rolling 6 months", "Rolling 12 months"];
@@ -3283,8 +3353,8 @@ function DateRangePicker({
3283
3353
  if (showFooter) setDraft(label);
3284
3354
  else commit(label);
3285
3355
  };
3286
- return /* @__PURE__ */ jsxs30("div", { className: "relative", ref, children: [
3287
- /* @__PURE__ */ jsxs30(
3356
+ return /* @__PURE__ */ jsxs31("div", { className: "relative", ref, children: [
3357
+ /* @__PURE__ */ jsxs31(
3288
3358
  "button",
3289
3359
  {
3290
3360
  type: "button",
@@ -3293,7 +3363,7 @@ function DateRangePicker({
3293
3363
  "aria-haspopup": "listbox",
3294
3364
  className: chipTriggerClass(),
3295
3365
  children: [
3296
- /* @__PURE__ */ jsxs30("span", { className: "flex flex-col gap-1 text-left leading-none", children: [
3366
+ /* @__PURE__ */ jsxs31("span", { className: "flex flex-col gap-1 text-left leading-none", children: [
3297
3367
  /* @__PURE__ */ jsx35("span", { className: "text-[10px] text-text-tertiary", children: spanLabel(value, end) }),
3298
3368
  /* @__PURE__ */ jsx35("span", { className: "text-[12px] font-medium text-text-primary", children: value })
3299
3369
  ] }),
@@ -3301,7 +3371,7 @@ function DateRangePicker({
3301
3371
  ]
3302
3372
  }
3303
3373
  ),
3304
- open && /* @__PURE__ */ jsxs30("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: [
3374
+ open && /* @__PURE__ */ jsxs31("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: [
3305
3375
  presets.map((p) => /* @__PURE__ */ jsx35(
3306
3376
  "button",
3307
3377
  {
@@ -3312,20 +3382,20 @@ function DateRangePicker({
3312
3382
  },
3313
3383
  p
3314
3384
  )),
3315
- /* @__PURE__ */ jsxs30("div", { className: "mt-1 border-t border-border-default px-3 pb-2 pt-2", children: [
3385
+ /* @__PURE__ */ jsxs31("div", { className: "mt-1 border-t border-border-default px-3 pb-2 pt-2", children: [
3316
3386
  /* @__PURE__ */ jsx35("div", { className: "text-[13px] font-semibold text-text-primary", children: "Custom Range" }),
3317
- /* @__PURE__ */ jsxs30("div", { className: "mt-2 flex flex-col gap-2", children: [
3318
- /* @__PURE__ */ jsxs30("label", { className: "flex items-center justify-between gap-2 text-[12px] text-text-secondary", children: [
3387
+ /* @__PURE__ */ jsxs31("div", { className: "mt-2 flex flex-col gap-2", children: [
3388
+ /* @__PURE__ */ jsxs31("label", { className: "flex items-center justify-between gap-2 text-[12px] text-text-secondary", children: [
3319
3389
  "From",
3320
- /* @__PURE__ */ jsxs30("span", { className: "flex gap-1", children: [
3390
+ /* @__PURE__ */ jsxs31("span", { className: "flex gap-1", children: [
3321
3391
  granularity === "month" && /* @__PURE__ */ jsx35(MiniSelect, { value: fromMo, onChange: setFromMo, options: MONTH_ABBR.map((mm, i) => ({ label: mm, value: i })) }),
3322
3392
  granularity === "quarter" && /* @__PURE__ */ jsx35(MiniSelect, { value: fromQ, onChange: setFromQ, options: QUARTER_ABBR.map((qq, i) => ({ label: qq, value: i })) }),
3323
3393
  /* @__PURE__ */ jsx35(MiniSelect, { value: fromYr, onChange: setFromYr, options: yearOptions.map((y) => ({ label: String(y), value: y })) })
3324
3394
  ] })
3325
3395
  ] }),
3326
- /* @__PURE__ */ jsxs30("label", { className: "flex items-center justify-between gap-2 text-[12px] text-text-secondary", children: [
3396
+ /* @__PURE__ */ jsxs31("label", { className: "flex items-center justify-between gap-2 text-[12px] text-text-secondary", children: [
3327
3397
  "To",
3328
- /* @__PURE__ */ jsxs30("span", { className: "flex gap-1", children: [
3398
+ /* @__PURE__ */ jsxs31("span", { className: "flex gap-1", children: [
3329
3399
  granularity === "month" && /* @__PURE__ */ jsx35(MiniSelect, { value: toMo, onChange: setToMo, options: MONTH_ABBR.map((mm, i) => ({ label: mm, value: i })) }),
3330
3400
  granularity === "quarter" && /* @__PURE__ */ jsx35(MiniSelect, { value: toQ, onChange: setToQ, options: QUARTER_ABBR.map((qq, i) => ({ label: qq, value: i })) }),
3331
3401
  /* @__PURE__ */ jsx35(MiniSelect, { value: toYr, onChange: setToYr, options: yearOptions.map((y) => ({ label: String(y), value: y })) })
@@ -3351,7 +3421,7 @@ function DateRangePicker({
3351
3421
  // src/MultiSelectFilter.tsx
3352
3422
  import { useCallback as useCallback4, useEffect as useEffect12, useRef as useRef12, useState as useState13 } from "react";
3353
3423
  import { ChevronDown as ChevronDown11, Check as Check7, Minus as Minus2, Search as Search5, X as X4 } from "lucide-react";
3354
- import { jsx as jsx36, jsxs as jsxs31 } from "react/jsx-runtime";
3424
+ import { jsx as jsx36, jsxs as jsxs32 } from "react/jsx-runtime";
3355
3425
  function MultiSelectFilter({
3356
3426
  caption,
3357
3427
  options = [],
@@ -3442,8 +3512,8 @@ function MultiSelectFilter({
3442
3512
  const kids = live.filter((c) => c.label.toLowerCase().includes(ql));
3443
3513
  return kids.length ? { ...g, children: kids } : null;
3444
3514
  }).filter((g) => g !== null) : [];
3445
- return /* @__PURE__ */ jsxs31("div", { className: cn("relative", fullWidth && "w-full"), ref, children: [
3446
- /* @__PURE__ */ jsxs31(
3515
+ return /* @__PURE__ */ jsxs32("div", { className: cn("relative", fullWidth && "w-full"), ref, children: [
3516
+ /* @__PURE__ */ jsxs32(
3447
3517
  "button",
3448
3518
  {
3449
3519
  type: "button",
@@ -3463,7 +3533,7 @@ function MultiSelectFilter({
3463
3533
  ]
3464
3534
  }
3465
3535
  ),
3466
- open && /* @__PURE__ */ jsxs31(
3536
+ open && /* @__PURE__ */ jsxs32(
3467
3537
  "div",
3468
3538
  {
3469
3539
  className: cn(
@@ -3474,7 +3544,7 @@ function MultiSelectFilter({
3474
3544
  role: "dialog",
3475
3545
  "aria-label": caption,
3476
3546
  children: [
3477
- searchable && /* @__PURE__ */ jsx36("div", { className: "border-b border-border-default p-2", children: /* @__PURE__ */ jsxs31("div", { className: "flex h-9 items-center gap-2 rounded-control border border-border-default bg-input px-2.5", children: [
3547
+ searchable && /* @__PURE__ */ jsx36("div", { className: "border-b border-border-default p-2", children: /* @__PURE__ */ jsxs32("div", { className: "flex h-9 items-center gap-2 rounded-control border border-border-default bg-input px-2.5", children: [
3478
3548
  /* @__PURE__ */ jsx36(Search5, { size: 14, className: "text-text-secondary", "aria-hidden": "true" }),
3479
3549
  /* @__PURE__ */ jsx36(
3480
3550
  "input",
@@ -3488,11 +3558,11 @@ function MultiSelectFilter({
3488
3558
  ),
3489
3559
  q && /* @__PURE__ */ jsx36("button", { type: "button", onClick: () => setQ(""), "aria-label": "Clear search", className: "text-text-tertiary hover:text-text-primary", children: /* @__PURE__ */ jsx36(X4, { size: 13 }) })
3490
3560
  ] }) }),
3491
- /* @__PURE__ */ jsxs31("div", { className: "max-h-[280px] overflow-y-auto p-1", children: [
3561
+ /* @__PURE__ */ jsxs32("div", { className: "max-h-[280px] overflow-y-auto p-1", children: [
3492
3562
  groups ? visibleGroups.map((g) => {
3493
3563
  const state = groupState(g);
3494
- return /* @__PURE__ */ jsxs31("div", { children: [
3495
- /* @__PURE__ */ jsxs31(
3564
+ return /* @__PURE__ */ jsxs32("div", { children: [
3565
+ /* @__PURE__ */ jsxs32(
3496
3566
  "button",
3497
3567
  {
3498
3568
  type: "button",
@@ -3507,7 +3577,7 @@ function MultiSelectFilter({
3507
3577
  ),
3508
3578
  g.children.map((c) => {
3509
3579
  const checked = draft.includes(c.id);
3510
- return /* @__PURE__ */ jsxs31(
3580
+ return /* @__PURE__ */ jsxs32(
3511
3581
  "button",
3512
3582
  {
3513
3583
  type: "button",
@@ -3525,7 +3595,7 @@ function MultiSelectFilter({
3525
3595
  ] }, g.id);
3526
3596
  }) : items.map((o) => {
3527
3597
  const checked = draft.includes(o.id);
3528
- return /* @__PURE__ */ jsxs31(
3598
+ return /* @__PURE__ */ jsxs32(
3529
3599
  "button",
3530
3600
  {
3531
3601
  type: "button",
@@ -3551,7 +3621,7 @@ function MultiSelectFilter({
3551
3621
  }),
3552
3622
  (groups && !visibleGroups.length || !groups && !items.length) && /* @__PURE__ */ jsx36("div", { className: "py-6 text-center text-[13px] text-text-tertiary", children: "No matches." })
3553
3623
  ] }),
3554
- showFooter ? /* @__PURE__ */ jsx36(FilterDropdownFooter, { onClear: () => setDraft(clearValue), onApply: apply }) : min === 0 && draft.length > 0 && /* @__PURE__ */ jsx36("div", { className: "border-t border-border-default p-2", children: /* @__PURE__ */ jsxs31(
3624
+ showFooter ? /* @__PURE__ */ jsx36(FilterDropdownFooter, { onClear: () => setDraft(clearValue), onApply: apply }) : min === 0 && draft.length > 0 && /* @__PURE__ */ jsx36("div", { className: "border-t border-border-default p-2", children: /* @__PURE__ */ jsxs32(
3555
3625
  "button",
3556
3626
  {
3557
3627
  type: "button",
@@ -3570,7 +3640,7 @@ function MultiSelectFilter({
3570
3640
  }
3571
3641
  function TriCheck({ state }) {
3572
3642
  const filled = state !== "none";
3573
- return /* @__PURE__ */ jsxs31(
3643
+ return /* @__PURE__ */ jsxs32(
3574
3644
  "span",
3575
3645
  {
3576
3646
  className: cn(
@@ -3585,7 +3655,7 @@ function TriCheck({ state }) {
3585
3655
  );
3586
3656
  }
3587
3657
  function OptionCount({ n }) {
3588
- return /* @__PURE__ */ jsxs31("span", { className: "shrink-0 text-[12px] tabular-nums text-text-tertiary", children: [
3658
+ return /* @__PURE__ */ jsxs32("span", { className: "shrink-0 text-[12px] tabular-nums text-text-tertiary", children: [
3589
3659
  "(",
3590
3660
  n.toLocaleString(),
3591
3661
  ")"
@@ -3633,11 +3703,11 @@ function Toggle({ checked, onChange, label, size = "md", disabled, className })
3633
3703
  // src/AISpark.tsx
3634
3704
  import { useId as useId2 } from "react";
3635
3705
  import { Sparkles } from "lucide-react";
3636
- import { Fragment as Fragment5, jsx as jsx38, jsxs as jsxs32 } from "react/jsx-runtime";
3706
+ import { Fragment as Fragment5, jsx as jsx38, jsxs as jsxs33 } from "react/jsx-runtime";
3637
3707
  function AISpark({ size = 16, className }) {
3638
3708
  const id = useId2();
3639
- return /* @__PURE__ */ jsxs32(Fragment5, { children: [
3640
- /* @__PURE__ */ jsx38("svg", { width: "0", height: "0", "aria-hidden": "true", style: { position: "absolute" }, children: /* @__PURE__ */ jsx38("defs", { children: /* @__PURE__ */ jsxs32("linearGradient", { id, x1: "0", y1: "0", x2: "1", y2: "1", children: [
3709
+ return /* @__PURE__ */ jsxs33(Fragment5, { children: [
3710
+ /* @__PURE__ */ jsx38("svg", { width: "0", height: "0", "aria-hidden": "true", style: { position: "absolute" }, children: /* @__PURE__ */ jsx38("defs", { children: /* @__PURE__ */ jsxs33("linearGradient", { id, x1: "0", y1: "0", x2: "1", y2: "1", children: [
3641
3711
  /* @__PURE__ */ jsx38("stop", { offset: "0%", stopColor: "var(--mr-color-brand-primary)" }),
3642
3712
  /* @__PURE__ */ jsx38("stop", { offset: "100%", className: "[stop-color:#9474ff] in-data-[theme=dark]:[stop-color:#a488ff]" })
3643
3713
  ] }) }) }),