@mediaradar/design-components 0.50.0 → 0.53.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/approved-components.json +2 -1
- package/dist/index.cjs +206 -87
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +158 -27
- package/dist/index.d.ts +158 -27
- package/dist/index.js +202 -87
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -50,6 +50,10 @@ __export(index_exports, {
|
|
|
50
50
|
InlineMessage: () => InlineMessage,
|
|
51
51
|
LineChartPlaceholder: () => LineChartPlaceholder,
|
|
52
52
|
MediaLabel: () => MediaLabel,
|
|
53
|
+
Menu: () => Menu,
|
|
54
|
+
MenuItem: () => MenuItem,
|
|
55
|
+
MenuLabel: () => MenuLabel,
|
|
56
|
+
MenuSeparator: () => MenuSeparator,
|
|
53
57
|
Modal: () => Modal,
|
|
54
58
|
MultiSelectFilter: () => MultiSelectFilter,
|
|
55
59
|
NO_RESULTS_BODY: () => NO_RESULTS_BODY,
|
|
@@ -181,7 +185,7 @@ function InfoTip({ text, size = 11, label = "More information", trigger = "click
|
|
|
181
185
|
"data-testid": testIdPrefix,
|
|
182
186
|
...hoverProps,
|
|
183
187
|
className: cn(
|
|
184
|
-
"inline-flex cursor-pointer items-center text-text-tertiary transition-colors hover:text-text-primary focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-border-focus",
|
|
188
|
+
"inline-flex cursor-pointer items-center text-text-tertiary transition-colors hover:text-text-primary focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
185
189
|
className
|
|
186
190
|
),
|
|
187
191
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Info, { size, "aria-hidden": "true" })
|
|
@@ -227,7 +231,7 @@ function AdvertiserSearchPrompt({ label = "an advertiser name", className, testI
|
|
|
227
231
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
228
232
|
function chipTriggerClass(_variant = "box") {
|
|
229
233
|
return cn(
|
|
230
|
-
"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"
|
|
234
|
+
"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-offset-1 focus-visible:outline-border-focus"
|
|
231
235
|
// One stroke for every trigger: a `box` chip on the lighter default
|
|
232
236
|
// border sat beside SelectFilter's darker one in the same row and read as
|
|
233
237
|
// a different kind of control. The variant no longer changes anything.
|
|
@@ -317,6 +321,12 @@ function AdvertiserQuickFilter({
|
|
|
317
321
|
setOpen(false);
|
|
318
322
|
setQ("");
|
|
319
323
|
};
|
|
324
|
+
const clearAll = () => {
|
|
325
|
+
setDraft(clearValue);
|
|
326
|
+
onChange(clearValue);
|
|
327
|
+
setOpen(false);
|
|
328
|
+
setQ("");
|
|
329
|
+
};
|
|
320
330
|
(0, import_react2.useEffect)(() => {
|
|
321
331
|
if (!open) return;
|
|
322
332
|
inputRef.current?.focus();
|
|
@@ -394,7 +404,7 @@ function AdvertiserQuickFilter({
|
|
|
394
404
|
"div",
|
|
395
405
|
{
|
|
396
406
|
className: cn(
|
|
397
|
-
"absolute top-
|
|
407
|
+
"absolute top-full mt-2 z-30 flex w-72 flex-col overflow-hidden rounded-card border border-border-default bg-surface shadow-overlay",
|
|
398
408
|
align === "right" ? "right-0" : "left-0"
|
|
399
409
|
),
|
|
400
410
|
role: "dialog",
|
|
@@ -423,12 +433,12 @@ function AdvertiserQuickFilter({
|
|
|
423
433
|
type: "button",
|
|
424
434
|
onClick: clearSearch,
|
|
425
435
|
"aria-label": "Clear search",
|
|
426
|
-
className: "shrink-0 text-text-tertiary transition-colors hover:text-text-primary focus-visible:outline-2 focus-visible:outline-offset-
|
|
436
|
+
className: "shrink-0 text-text-tertiary transition-colors hover:text-text-primary focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
427
437
|
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.X, { size: 13 })
|
|
428
438
|
}
|
|
429
439
|
)
|
|
430
440
|
] }) }),
|
|
431
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "max-h-
|
|
441
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "max-h-75 overflow-y-auto p-1", children: [
|
|
432
442
|
selectedOptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "mb-1 border-b border-border-default pb-1", children: [
|
|
433
443
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
434
444
|
"button",
|
|
@@ -505,7 +515,7 @@ function AdvertiserQuickFilter({
|
|
|
505
515
|
type: "button",
|
|
506
516
|
"data-testid": testIdPrefix && `${testIdPrefix}-show-more`,
|
|
507
517
|
onClick: loadMore,
|
|
508
|
-
className: "flex w-full items-center gap-1.5 rounded-control px-2 py-2 text-left text-xs font-semibold text-text-link transition-colors hover:bg-subtle focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-border-focus",
|
|
518
|
+
className: "flex w-full items-center gap-1.5 rounded-control px-2 py-2 text-left text-xs font-semibold text-text-link transition-colors hover:bg-subtle focus-visible:outline-solid focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-border-focus",
|
|
509
519
|
children: [
|
|
510
520
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.Plus, { size: 13, "aria-hidden": "true" }),
|
|
511
521
|
"Show ",
|
|
@@ -522,9 +532,9 @@ function AdvertiserQuickFilter({
|
|
|
522
532
|
{
|
|
523
533
|
type: "button",
|
|
524
534
|
"data-testid": testIdPrefix && `${testIdPrefix}-clear-all`,
|
|
525
|
-
onClick:
|
|
535
|
+
onClick: clearAll,
|
|
526
536
|
disabled: draft.length === 0,
|
|
527
|
-
className: "text-dense font-medium text-text-secondary transition-colors hover:text-text-primary disabled:opacity-40 focus-visible:outline-2 focus-visible:outline-offset-
|
|
537
|
+
className: "text-dense font-medium text-text-secondary transition-colors hover:text-text-primary disabled:opacity-40 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
528
538
|
children: "Clear all"
|
|
529
539
|
}
|
|
530
540
|
),
|
|
@@ -534,7 +544,7 @@ function AdvertiserQuickFilter({
|
|
|
534
544
|
type: "button",
|
|
535
545
|
"data-testid": testIdPrefix && `${testIdPrefix}-apply`,
|
|
536
546
|
onClick: apply,
|
|
537
|
-
className: "rounded-control bg-brand-primaryAction px-5 py-2 text-dense font-semibold text-brand-onprimary transition hover:brightness-110 focus-visible:outline-2 focus-visible:outline-offset-
|
|
547
|
+
className: "rounded-control bg-brand-primaryAction px-5 py-2 text-dense font-semibold text-brand-onprimary transition hover:brightness-110 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
538
548
|
children: "Apply"
|
|
539
549
|
}
|
|
540
550
|
)
|
|
@@ -548,7 +558,7 @@ function AdvertiserQuickFilter({
|
|
|
548
558
|
{
|
|
549
559
|
type: "button",
|
|
550
560
|
onClick: () => setDraft([]),
|
|
551
|
-
className: "text-xs font-medium text-text-link hover:underline focus-visible:outline-2 focus-visible:outline-offset-
|
|
561
|
+
className: "text-xs font-medium text-text-link hover:underline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
552
562
|
children: clearLabel
|
|
553
563
|
}
|
|
554
564
|
)
|
|
@@ -583,8 +593,10 @@ function OptionRow({
|
|
|
583
593
|
onToggle();
|
|
584
594
|
},
|
|
585
595
|
className: cn(
|
|
586
|
-
|
|
587
|
-
|
|
596
|
+
// scroll-my-1: Tab scrolls the list just far enough to show the box,
|
|
597
|
+
// which would leave its 3px ring cut off at the list's edge.
|
|
598
|
+
"flex h-4.5 w-4.5 shrink-0 scroll-my-1 items-center justify-center rounded-small border transition-colors",
|
|
599
|
+
"focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
588
600
|
checked ? "border-transparent bg-brand-primaryAction text-brand-onprimary" : "border-border-interactive bg-surface hover:border-brand-primaryAction"
|
|
589
601
|
),
|
|
590
602
|
children: checked && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.Check, { size: 13, strokeWidth: 3 })
|
|
@@ -645,7 +657,7 @@ var KIND = {
|
|
|
645
657
|
// Square-ish and centred, with a floor width so a 1-digit and a 3-digit
|
|
646
658
|
// count are the same shape, and lining figures so the width does not shift
|
|
647
659
|
// as the number changes.
|
|
648
|
-
count: "h-
|
|
660
|
+
count: "h-4.5 min-w-4.5 justify-center px-1.5 tabular-nums",
|
|
649
661
|
// The only kind that shouts. Caps need the letterspacing -- caps set tight
|
|
650
662
|
// are harder to read than the sentence case they replaced.
|
|
651
663
|
eyebrow: "px-2.5 py-1 uppercase tracking-wider",
|
|
@@ -739,7 +751,7 @@ var CheckBox = (0, import_react3.forwardRef)(function CheckBox2({ checked, indet
|
|
|
739
751
|
},
|
|
740
752
|
className: cn(
|
|
741
753
|
boxClass(on, disabled),
|
|
742
|
-
"focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-border-focus",
|
|
754
|
+
"focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
743
755
|
!on && "hover:border-brand-primaryAction",
|
|
744
756
|
// Cancels the unchecked hover-border preview when disabled -- without
|
|
745
757
|
// this, a disabled box still visually previews the "you can click
|
|
@@ -1089,7 +1101,7 @@ function DateRangeFilter({
|
|
|
1089
1101
|
{
|
|
1090
1102
|
"data-testid": testIdPrefix && `${testIdPrefix}-popover`,
|
|
1091
1103
|
ref: popRef,
|
|
1092
|
-
className: `absolute z-30 flex overflow-hidden rounded-card border border-border-default bg-surface shadow-overlay ${placement === "right" ? "bottom-0 left-full ml-2" : `${above ? "bottom-full mb-2" : "top-
|
|
1104
|
+
className: `absolute z-30 flex overflow-hidden rounded-card border border-border-default bg-surface shadow-overlay ${placement === "right" ? "bottom-0 left-full ml-2" : `${above ? "bottom-full mb-2" : "top-full mt-2"} ${align === "right" ? "right-0" : "left-0"}`}`,
|
|
1093
1105
|
role: "dialog",
|
|
1094
1106
|
"aria-label": "Select date range",
|
|
1095
1107
|
children: [
|
|
@@ -1114,7 +1126,7 @@ function DateRangeFilter({
|
|
|
1114
1126
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex gap-8", children: [0, 1].map((offset) => {
|
|
1115
1127
|
const m = addMonths(leftMonth, offset);
|
|
1116
1128
|
const grid = monthGrid(m.getFullYear(), m.getMonth());
|
|
1117
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w-
|
|
1129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w-63", children: [
|
|
1118
1130
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
1119
1131
|
offset === 0 ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(NavBtn, { onClick: () => setLeftMonth(addMonths(leftMonth, -1)), "aria-label": "Previous month", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.ChevronLeft, { size: 16 }) }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "h-7 w-7" }),
|
|
1120
1132
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { id: `${monthIdBase}-m${offset}`, "aria-live": "polite", className: "text-panel-title font-semibold text-text-primary", children: [
|
|
@@ -1149,7 +1161,7 @@ function DateRangeFilter({
|
|
|
1149
1161
|
"aria-pressed": endpoint || inRange,
|
|
1150
1162
|
className: "relative flex h-9 items-center justify-center focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-border-focus",
|
|
1151
1163
|
children: [
|
|
1152
|
-
band && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: `absolute inset-y-
|
|
1164
|
+
band && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: `absolute inset-y-1 bg-ai-tint ${band}`, "aria-hidden": "true" }),
|
|
1153
1165
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1154
1166
|
"span",
|
|
1155
1167
|
{
|
|
@@ -1199,8 +1211,8 @@ function DateRangeFilter({
|
|
|
1199
1211
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", "data-testid": testIdPrefix && `${testIdPrefix}-cancel`, onClick: () => {
|
|
1200
1212
|
setOpen(false);
|
|
1201
1213
|
triggerRef.current?.focus();
|
|
1202
|
-
}, className: "rounded-control border border-border-default bg-surface px-5 py-2 text-dense font-semibold text-text-primary transition-colors hover:bg-subtle focus-visible:outline-2 focus-visible:outline-offset-
|
|
1203
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", "data-testid": testIdPrefix && `${testIdPrefix}-apply`, onClick: apply, disabled: !canApply, className: "rounded-control bg-brand-primaryAction px-5 py-2 text-dense font-semibold text-brand-onprimary transition-[filter] hover:brightness-110 disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-2 focus-visible:outline-offset-
|
|
1214
|
+
}, className: "rounded-control border border-border-default bg-surface px-5 py-2 text-dense font-semibold text-text-primary transition-colors hover:bg-subtle focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus", children: "Cancel" }),
|
|
1215
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", "data-testid": testIdPrefix && `${testIdPrefix}-apply`, onClick: apply, disabled: !canApply, className: "rounded-control bg-brand-primaryAction px-5 py-2 text-dense font-semibold text-brand-onprimary transition-[filter] hover:brightness-110 disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus", children: "Apply" })
|
|
1204
1216
|
] })
|
|
1205
1217
|
] })
|
|
1206
1218
|
]
|
|
@@ -1211,11 +1223,11 @@ function DateRangeFilter({
|
|
|
1211
1223
|
function Field({ label, value }) {
|
|
1212
1224
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
|
|
1213
1225
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "text-xs font-medium text-text-secondary", children: label }),
|
|
1214
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex h-10 min-w-
|
|
1226
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex h-10 min-w-35 items-center rounded-control border border-border-strong bg-input px-3 text-sm font-medium text-text-primary", children: value })
|
|
1215
1227
|
] });
|
|
1216
1228
|
}
|
|
1217
1229
|
function NavBtn({ children, onClick, ...rest }) {
|
|
1218
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("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 focus-visible:outline-2 focus-visible:outline-offset-
|
|
1230
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("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 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus", ...rest, children });
|
|
1219
1231
|
}
|
|
1220
1232
|
|
|
1221
1233
|
// src/SearchBar.tsx
|
|
@@ -1330,7 +1342,7 @@ var SearchBar = (0, import_react5.forwardRef)(function SearchBar2({
|
|
|
1330
1342
|
// flex-auto, not flex-1: flex-1's 0% basis took the height away in a
|
|
1331
1343
|
// column (a filter panel's stack), squashing the sm box from 32px to
|
|
1332
1344
|
// its text's 22px. auto keeps the h-8/10/11 and still fills a row.
|
|
1333
|
-
"relative flex min-w-
|
|
1345
|
+
"relative flex min-w-50 flex-auto items-stretch rounded-control border border-border-strong bg-input focus-within:outline-2 focus-within:outline-offset-1 focus-within:outline-border-focus",
|
|
1334
1346
|
HEIGHT[size],
|
|
1335
1347
|
className
|
|
1336
1348
|
),
|
|
@@ -1366,7 +1378,7 @@ var SearchBar = (0, import_react5.forwardRef)(function SearchBar2({
|
|
|
1366
1378
|
"aria-expanded": codesOpen,
|
|
1367
1379
|
"aria-haspopup": "dialog",
|
|
1368
1380
|
"data-testid": testIdPrefix && `${testIdPrefix}-ad-codes`,
|
|
1369
|
-
className: "inline-flex items-center gap-1 rounded-control focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-border-focus",
|
|
1381
|
+
className: "inline-flex items-center gap-1 rounded-control focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
1370
1382
|
children: [
|
|
1371
1383
|
hasMisses && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react7.AlertCircle, { size: 13, "aria-hidden": "true" }),
|
|
1372
1384
|
hasMisses ? `${matchedCount} of ${adCodes.length} matched` : adCodes.length === 1 ? adCodes[0] : `${adCodes.length} Ad Codes`
|
|
@@ -1380,7 +1392,7 @@ var SearchBar = (0, import_react5.forwardRef)(function SearchBar2({
|
|
|
1380
1392
|
"aria-label": "Clear all ad codes",
|
|
1381
1393
|
onClick: () => updateCodes([], -1),
|
|
1382
1394
|
"data-testid": testIdPrefix && `${testIdPrefix}-ad-codes-clear`,
|
|
1383
|
-
className: "inline-flex rounded-full p-0.5 hover:bg-surface focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-border-focus",
|
|
1395
|
+
className: "inline-flex rounded-full p-0.5 hover:bg-surface focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
1384
1396
|
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react7.X, { size: 12, "aria-hidden": "true" })
|
|
1385
1397
|
}
|
|
1386
1398
|
)
|
|
@@ -1438,7 +1450,7 @@ var SearchBar = (0, import_react5.forwardRef)(function SearchBar2({
|
|
|
1438
1450
|
"aria-label": `Remove ${code}`,
|
|
1439
1451
|
onClick: () => updateCodes(adCodes.filter((c) => c !== code), i),
|
|
1440
1452
|
"data-testid": testIdPrefix && `${testIdPrefix}-ad-code-remove-${slug3(code)}`,
|
|
1441
|
-
className: "inline-flex rounded-full p-0.5 hover:bg-surface focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-border-focus",
|
|
1453
|
+
className: "inline-flex rounded-full p-0.5 hover:bg-surface focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
1442
1454
|
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react7.X, { size: 13, "aria-hidden": "true" })
|
|
1443
1455
|
}
|
|
1444
1456
|
)
|
|
@@ -1456,7 +1468,7 @@ var SearchBar = (0, import_react5.forwardRef)(function SearchBar2({
|
|
|
1456
1468
|
input.current?.focus();
|
|
1457
1469
|
},
|
|
1458
1470
|
"data-testid": testIdPrefix && `${testIdPrefix}-ad-codes-done`,
|
|
1459
|
-
className: "rounded-control bg-brand-primaryAction px-4 py-2 text-dense font-semibold text-brand-onprimary transition hover:brightness-110 focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-
|
|
1471
|
+
className: "rounded-control bg-brand-primaryAction px-4 py-2 text-dense font-semibold text-brand-onprimary transition hover:brightness-110 focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
1460
1472
|
children: "Search"
|
|
1461
1473
|
}
|
|
1462
1474
|
) }),
|
|
@@ -1470,7 +1482,7 @@ var SearchBar = (0, import_react5.forwardRef)(function SearchBar2({
|
|
|
1470
1482
|
type: "button",
|
|
1471
1483
|
onClick: () => onDownloadAdCodes(adCodes),
|
|
1472
1484
|
"data-testid": testIdPrefix && `${testIdPrefix}-ad-codes-download`,
|
|
1473
|
-
className: "font-medium text-text-link underline focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-border-focus",
|
|
1485
|
+
className: "font-medium text-text-link underline focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
1474
1486
|
children: "Download"
|
|
1475
1487
|
}
|
|
1476
1488
|
),
|
|
@@ -1494,7 +1506,7 @@ var SearchBar = (0, import_react5.forwardRef)(function SearchBar2({
|
|
|
1494
1506
|
},
|
|
1495
1507
|
"aria-label": "Clear search",
|
|
1496
1508
|
"data-testid": testIdPrefix && `${testIdPrefix}-clear`,
|
|
1497
|
-
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",
|
|
1509
|
+
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-offset-1 focus-visible:outline-border-focus",
|
|
1498
1510
|
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react7.X, { size: 14, "aria-hidden": "true" })
|
|
1499
1511
|
}
|
|
1500
1512
|
),
|
|
@@ -1538,7 +1550,7 @@ var SearchBar = (0, import_react5.forwardRef)(function SearchBar2({
|
|
|
1538
1550
|
role: "dialog",
|
|
1539
1551
|
"aria-label": "Search match type",
|
|
1540
1552
|
"data-testid": testIdPrefix && `${testIdPrefix}-mode-popover`,
|
|
1541
|
-
className: "absolute right-0 top-
|
|
1553
|
+
className: "absolute right-0 top-full mt-2 z-50 w-100 rounded-card border border-border-default bg-surface p-3 shadow-overlay",
|
|
1542
1554
|
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { role: "radiogroup", "aria-label": "Search match type", className: "flex flex-col", children: [
|
|
1543
1555
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1544
1556
|
ModeRow,
|
|
@@ -1652,7 +1664,7 @@ function ModeRow({
|
|
|
1652
1664
|
e.stopPropagation();
|
|
1653
1665
|
onSelect();
|
|
1654
1666
|
},
|
|
1655
|
-
className: "rounded-control text-left text-sm font-semibold text-text-primary focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-border-focus",
|
|
1667
|
+
className: "rounded-control text-left text-sm font-semibold text-text-primary focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
1656
1668
|
children: title
|
|
1657
1669
|
}
|
|
1658
1670
|
),
|
|
@@ -1726,7 +1738,7 @@ function RowInfoTip({ text }) {
|
|
|
1726
1738
|
"aria-label": "More information",
|
|
1727
1739
|
"aria-expanded": open,
|
|
1728
1740
|
"aria-describedby": id,
|
|
1729
|
-
className: "-m-1.5 inline-flex size-6 items-center justify-center rounded-control text-text-tertiary transition-colors hover:text-text-primary focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-border-focus",
|
|
1741
|
+
className: "-m-1.5 inline-flex size-6 items-center justify-center rounded-control text-text-tertiary transition-colors hover:text-text-primary focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
1730
1742
|
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react7.AlertCircle, { size: 13, "aria-hidden": "true" })
|
|
1731
1743
|
}
|
|
1732
1744
|
),
|
|
@@ -1735,7 +1747,7 @@ function RowInfoTip({ text }) {
|
|
|
1735
1747
|
{
|
|
1736
1748
|
id,
|
|
1737
1749
|
hidden: !open,
|
|
1738
|
-
className: "absolute left-0 top-
|
|
1750
|
+
className: "absolute left-0 top-full mt-1.5 z-40 w-55 rounded-control border border-border-default bg-surface px-2.5 py-1.5 text-xs font-normal leading-snug text-text-secondary shadow-overlay",
|
|
1739
1751
|
children: text
|
|
1740
1752
|
}
|
|
1741
1753
|
)
|
|
@@ -1893,7 +1905,7 @@ function SectionRail({
|
|
|
1893
1905
|
"a",
|
|
1894
1906
|
{
|
|
1895
1907
|
href: viewAllHref,
|
|
1896
|
-
className: "text-sm font-medium text-text-link transition-colors hover:underline focus-visible:rounded-sm focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-border-focus",
|
|
1908
|
+
className: "text-sm font-medium text-text-link transition-colors hover:underline focus-visible:rounded-sm focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
1897
1909
|
children: [
|
|
1898
1910
|
viewAllLabel,
|
|
1899
1911
|
" \u2192"
|
|
@@ -1906,7 +1918,7 @@ function SectionRail({
|
|
|
1906
1918
|
type: "button",
|
|
1907
1919
|
onClick: () => scroll(-1),
|
|
1908
1920
|
"aria-label": "Previous",
|
|
1909
|
-
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 focus-visible:outline-2 focus-visible:outline-offset-
|
|
1921
|
+
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 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus sm:flex lg:hidden",
|
|
1910
1922
|
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react8.ChevronLeft, { size: 16 })
|
|
1911
1923
|
}
|
|
1912
1924
|
),
|
|
@@ -1916,7 +1928,7 @@ function SectionRail({
|
|
|
1916
1928
|
type: "button",
|
|
1917
1929
|
onClick: () => scroll(1),
|
|
1918
1930
|
"aria-label": "Next",
|
|
1919
|
-
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 focus-visible:outline-2 focus-visible:outline-offset-
|
|
1931
|
+
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 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus sm:flex lg:hidden",
|
|
1920
1932
|
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react8.ChevronRight, { size: 16 })
|
|
1921
1933
|
}
|
|
1922
1934
|
)
|
|
@@ -1988,7 +2000,7 @@ function DataScopeFilter({ value, onChange, align = "right", className, testIdPr
|
|
|
1988
2000
|
"aria-label": "Data",
|
|
1989
2001
|
"data-testid": testIdPrefix && `${testIdPrefix}-popover`,
|
|
1990
2002
|
className: cn(
|
|
1991
|
-
"absolute top-
|
|
2003
|
+
"absolute top-full mt-2 z-30 min-w-55 overflow-hidden rounded-card border border-border-default bg-surface p-1 shadow-overlay",
|
|
1992
2004
|
align === "right" ? "right-0" : "left-0"
|
|
1993
2005
|
),
|
|
1994
2006
|
children: [
|
|
@@ -2048,7 +2060,7 @@ function MenuError({ onRetry }) {
|
|
|
2048
2060
|
{
|
|
2049
2061
|
type: "button",
|
|
2050
2062
|
onClick: onRetry,
|
|
2051
|
-
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",
|
|
2063
|
+
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-offset-1 focus-visible:outline-border-focus",
|
|
2052
2064
|
children: "Try again"
|
|
2053
2065
|
}
|
|
2054
2066
|
)
|
|
@@ -2151,7 +2163,7 @@ function SelectFilter({
|
|
|
2151
2163
|
"aria-label": sm && !inlineCaption ? caption : void 0,
|
|
2152
2164
|
disabled,
|
|
2153
2165
|
className: cn(
|
|
2154
|
-
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(),
|
|
2166
|
+
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-offset-1 focus-visible:outline-border-focus" : chipTriggerClass(),
|
|
2155
2167
|
"disabled:pointer-events-none disabled:opacity-40",
|
|
2156
2168
|
fullWidth && "w-full justify-between",
|
|
2157
2169
|
className
|
|
@@ -2182,7 +2194,7 @@ function SelectFilter({
|
|
|
2182
2194
|
),
|
|
2183
2195
|
role: loading || error ? "group" : "listbox",
|
|
2184
2196
|
"aria-label": caption,
|
|
2185
|
-
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(MenuLoading, {}) : error ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(MenuError, { onRetry }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "max-h-
|
|
2197
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(MenuLoading, {}) : error ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(MenuError, { onRetry }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "max-h-70 overflow-y-auto p-1", children: options.map((o) => {
|
|
2186
2198
|
const selected = o === value;
|
|
2187
2199
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
2188
2200
|
"button",
|
|
@@ -2256,8 +2268,8 @@ var NO_RESULTS_BODY = "Your filters may be too narrow, conflict with each other,
|
|
|
2256
2268
|
function noResultsBody(workspaceName) {
|
|
2257
2269
|
return workspaceName ? `Nothing in the \u201C${workspaceName}\u201D workspace matches. ${NO_RESULTS_BODY}` : NO_RESULTS_BODY;
|
|
2258
2270
|
}
|
|
2259
|
-
var PRIMARY_ACTION_CLASS = "rounded-control bg-brand-primaryAction px-3.5 py-2 text-dense font-semibold text-brand-onprimary transition-colors hover:opacity-90 focus-visible:outline-2 focus-visible:outline-offset-
|
|
2260
|
-
var QUIET_ACTION_CLASS = "rounded-control text-dense font-medium text-text-link transition-colors hover:underline focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-border-focus";
|
|
2271
|
+
var PRIMARY_ACTION_CLASS = "rounded-control bg-brand-primaryAction px-3.5 py-2 text-dense font-semibold text-brand-onprimary transition-colors hover:opacity-90 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus";
|
|
2272
|
+
var QUIET_ACTION_CLASS = "rounded-control text-dense font-medium text-text-link transition-colors hover:underline focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus";
|
|
2261
2273
|
function NoResultsEmptyState({
|
|
2262
2274
|
title = NO_RESULTS_TITLE,
|
|
2263
2275
|
body,
|
|
@@ -2276,7 +2288,7 @@ function NoResultsEmptyState({
|
|
|
2276
2288
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: cn("flex flex-col items-center justify-center gap-3 text-center", className), "data-testid": testIdPrefix, children: [
|
|
2277
2289
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "flex h-11 w-11 items-center justify-center rounded-full bg-subtle text-text-tertiary", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react11.FilterX, { size: 20, "aria-hidden": "true" }) }),
|
|
2278
2290
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h2", { className: "text-base font-semibold text-text-primary", children: title }),
|
|
2279
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "max-w-
|
|
2291
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "max-w-105 text-dense leading-relaxed text-text-secondary", children: bodyText }),
|
|
2280
2292
|
hasActions && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "mt-1 flex flex-col items-center gap-3", children: [
|
|
2281
2293
|
showClear && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2282
2294
|
"button",
|
|
@@ -2352,7 +2364,7 @@ function SummaryGroupItem({
|
|
|
2352
2364
|
onClick: () => setOpen((v) => !v),
|
|
2353
2365
|
"aria-expanded": open,
|
|
2354
2366
|
"data-testid": testIdPrefix && `${testIdPrefix}-group-${group.id}`,
|
|
2355
|
-
className: "flex w-full min-w-0 items-center gap-2 text-left focus-visible:outline-2 focus-visible:outline-offset-
|
|
2367
|
+
className: "flex w-full min-w-0 items-center gap-2 text-left focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
2356
2368
|
children: [
|
|
2357
2369
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2358
2370
|
import_lucide_react12.ChevronDown,
|
|
@@ -2384,7 +2396,7 @@ function SummaryGroupItem({
|
|
|
2384
2396
|
type: "button",
|
|
2385
2397
|
"aria-label": `Remove ${item.name}`,
|
|
2386
2398
|
onClick: () => group.onRemove(item.id),
|
|
2387
|
-
className: "flex h-5 w-5 shrink-0 items-center justify-center rounded-control text-text-secondary hover:bg-subtle hover:text-text-danger focus-visible:outline-2 focus-visible:outline-offset-
|
|
2399
|
+
className: "flex h-5 w-5 shrink-0 items-center justify-center rounded-control text-text-secondary hover:bg-subtle hover:text-text-danger focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
2388
2400
|
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react12.X, { size: 12, "aria-hidden": "true" })
|
|
2389
2401
|
}
|
|
2390
2402
|
)
|
|
@@ -2398,7 +2410,7 @@ function SummaryGroupItem({
|
|
|
2398
2410
|
type: "button",
|
|
2399
2411
|
onClick: group.onRemoveAll,
|
|
2400
2412
|
"data-testid": testIdPrefix && `${testIdPrefix}-remove-all-${group.id}`,
|
|
2401
|
-
className: "mt-0.5 self-start text-micro font-medium text-text-link hover:underline focus-visible:outline-2 focus-visible:outline-offset-
|
|
2413
|
+
className: "mt-0.5 self-start text-micro font-medium text-text-link hover:underline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
2402
2414
|
children: "Remove all"
|
|
2403
2415
|
}
|
|
2404
2416
|
)
|
|
@@ -2448,7 +2460,7 @@ function AxisFrame({
|
|
|
2448
2460
|
{
|
|
2449
2461
|
className: "absolute bottom-0 right-0 flex items-center",
|
|
2450
2462
|
style: { left: Y_AXIS_W, height: X_AXIS_H },
|
|
2451
|
-
children: Array.from({ length: xTicks }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex flex-1 justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "h-2 w-full max-w-
|
|
2463
|
+
children: Array.from({ length: xTicks }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex flex-1 justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "h-2 w-full max-w-6.5 rounded-xs bg-subtle" }) }, i))
|
|
2452
2464
|
}
|
|
2453
2465
|
)
|
|
2454
2466
|
] }) });
|
|
@@ -2952,7 +2964,7 @@ function Tabs({ items, value, onChange, idPrefix = "tabs", className, testIdPref
|
|
|
2952
2964
|
disabled: item.disabled,
|
|
2953
2965
|
onClick: () => onChange(item.value),
|
|
2954
2966
|
className: cn(
|
|
2955
|
-
"-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-
|
|
2967
|
+
"-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-1 focus-visible:outline-border-focus disabled:opacity-50",
|
|
2956
2968
|
on ? "border-brand-primaryAction font-semibold text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"
|
|
2957
2969
|
),
|
|
2958
2970
|
children: [
|
|
@@ -3227,7 +3239,7 @@ function SelectionPicker({
|
|
|
3227
3239
|
return n;
|
|
3228
3240
|
});
|
|
3229
3241
|
},
|
|
3230
|
-
className: "flex h-7 w-7 items-center justify-center rounded-control text-text-secondary hover:bg-canvas hover:text-text-primary focus-visible:outline-2 focus-visible:outline-offset-
|
|
3242
|
+
className: "flex h-7 w-7 items-center justify-center rounded-control text-text-secondary hover:bg-canvas hover:text-text-primary focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
3231
3243
|
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react15.ChevronRight, { size: 15, className: cn("transition-transform", isOpen && "rotate-90") })
|
|
3232
3244
|
}
|
|
3233
3245
|
) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
@@ -3256,7 +3268,7 @@ function SelectionPicker({
|
|
|
3256
3268
|
disabled: kidSel,
|
|
3257
3269
|
onClick: () => addRows([kid]),
|
|
3258
3270
|
className: cn(
|
|
3259
|
-
"inline-flex items-center gap-1 rounded-control px-2 py-1 text-xs font-medium focus-visible:outline-2 focus-visible:outline-offset-
|
|
3271
|
+
"inline-flex items-center gap-1 rounded-control px-2 py-1 text-xs font-medium focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
3260
3272
|
kidSel ? "text-text-tertiary" : "text-text-link hover:bg-subtle"
|
|
3261
3273
|
),
|
|
3262
3274
|
children: [
|
|
@@ -3301,7 +3313,7 @@ function SelectionPicker({
|
|
|
3301
3313
|
"aria-pressed": on,
|
|
3302
3314
|
"data-testid": testIdPrefix && `${testIdPrefix}-list-${list.id}`,
|
|
3303
3315
|
className: cn(
|
|
3304
|
-
"flex items-center gap-3 rounded-control border px-3.5 py-3 text-left transition-colors focus-visible:outline-2 focus-visible:outline-offset-
|
|
3316
|
+
"flex items-center gap-3 rounded-control border px-3.5 py-3 text-left transition-colors focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
3305
3317
|
on ? "border-brand-primaryAction bg-brand-primarySoft" : "border-border-default bg-surface hover:bg-subtle"
|
|
3306
3318
|
),
|
|
3307
3319
|
children: [
|
|
@@ -3438,7 +3450,7 @@ function FilterDropdown({
|
|
|
3438
3450
|
onClick: () => setOpen((v) => !v),
|
|
3439
3451
|
"aria-expanded": open,
|
|
3440
3452
|
"data-testid": testIdPrefix && `${testIdPrefix}-filter-${filterSlug}`,
|
|
3441
|
-
className: "inline-flex h-8 items-center gap-1.5 whitespace-nowrap rounded-control border border-border-strong bg-input px-3 text-dense font-medium text-text-secondary transition-colors hover:bg-subtle focus-visible:outline-2 focus-visible:outline-offset-
|
|
3453
|
+
className: "inline-flex h-8 items-center gap-1.5 whitespace-nowrap rounded-control border border-border-strong bg-input px-3 text-dense font-medium text-text-secondary transition-colors hover:bg-subtle focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
3442
3454
|
children: [
|
|
3443
3455
|
label,
|
|
3444
3456
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react15.ChevronDown, { size: 13, "aria-hidden": "true", className: cn("transition-transform", open && "rotate-180") })
|
|
@@ -3522,7 +3534,7 @@ function Monogram({ name, size = 28 }) {
|
|
|
3522
3534
|
"span",
|
|
3523
3535
|
{
|
|
3524
3536
|
"aria-hidden": "true",
|
|
3525
|
-
className: "flex shrink-0 items-center justify-center rounded-
|
|
3537
|
+
className: "flex shrink-0 items-center justify-center rounded-control bg-subtle font-bold leading-none text-text-secondary",
|
|
3526
3538
|
style: { width: size, height: size, fontSize: Math.round(size * 0.36) },
|
|
3527
3539
|
children: initials(name)
|
|
3528
3540
|
}
|
|
@@ -3538,7 +3550,7 @@ function DelayedTip({ label, children }) {
|
|
|
3538
3550
|
"span",
|
|
3539
3551
|
{
|
|
3540
3552
|
role: "tooltip",
|
|
3541
|
-
className: "pointer-events-none invisible absolute bottom-
|
|
3553
|
+
className: "pointer-events-none invisible absolute bottom-full mb-1.5 left-1/2 z-40 w-40 -translate-x-1/2 rounded-control border border-border-default bg-surface px-2 py-1.5 text-center text-micro font-medium leading-snug text-text-secondary opacity-0 shadow-overlay transition-[opacity,visibility] delay-1000 duration-150 group-hover/dt:visible group-hover/dt:opacity-100 group-focus/dt:visible group-focus/dt:opacity-100",
|
|
3542
3554
|
children: label
|
|
3543
3555
|
}
|
|
3544
3556
|
)
|
|
@@ -3599,18 +3611,18 @@ function PublisherBreakdownList({
|
|
|
3599
3611
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(MetricCells, { spendN: p.spendN, yoy: p.yoy })
|
|
3600
3612
|
] }, p.brand))
|
|
3601
3613
|
] }),
|
|
3602
|
-
rows.length > defaultVisibleCount && (viewAllHref ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: cn("border-t border-border-default py-3", rowPad), children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("a", { href: viewAllHref, className: "text-xs font-semibold text-text-link hover:underline focus-visible:outline-2 focus-visible:outline-offset-
|
|
3614
|
+
rows.length > defaultVisibleCount && (viewAllHref ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: cn("border-t border-border-default py-3", rowPad), children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("a", { href: viewAllHref, className: "text-xs font-semibold text-text-link hover:underline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus", children: "See all publishers" }) }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: cn("flex items-center gap-2 border-t border-border-default py-3 text-xs text-text-tertiary", rowPad), children: [
|
|
3603
3615
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { children: [
|
|
3604
3616
|
"Showing ",
|
|
3605
3617
|
visible.length,
|
|
3606
3618
|
" of ",
|
|
3607
3619
|
rows.length
|
|
3608
3620
|
] }),
|
|
3609
|
-
!showAll ? /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("button", { type: "button", onClick: () => setShowAll(true), className: "font-semibold text-text-link hover:underline focus-visible:outline-2 focus-visible:outline-offset-
|
|
3621
|
+
!showAll ? /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("button", { type: "button", onClick: () => setShowAll(true), className: "font-semibold text-text-link hover:underline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus", children: [
|
|
3610
3622
|
"See all (",
|
|
3611
3623
|
rows.length - defaultVisibleCount,
|
|
3612
3624
|
" more)"
|
|
3613
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("button", { type: "button", onClick: () => setShowAll(false), className: "font-semibold text-text-link hover:underline focus-visible:outline-2 focus-visible:outline-offset-
|
|
3625
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("button", { type: "button", onClick: () => setShowAll(false), className: "font-semibold text-text-link hover:underline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus", children: "Show less" })
|
|
3614
3626
|
] }))
|
|
3615
3627
|
] });
|
|
3616
3628
|
}
|
|
@@ -3622,7 +3634,7 @@ var import_class_variance_authority = require("class-variance-authority");
|
|
|
3622
3634
|
var import_lucide_react16 = require("lucide-react");
|
|
3623
3635
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
3624
3636
|
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
3625
|
-
"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-
|
|
3637
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-control transition-all duration-(--mr-motion-duration-interactive) ease-interactive disabled:pointer-events-none disabled:opacity-40 focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
3626
3638
|
{
|
|
3627
3639
|
variants: {
|
|
3628
3640
|
variant: {
|
|
@@ -3854,7 +3866,7 @@ function FilterChipBar({ chips, onRemove, onClearAll, parkedKeys, className, tes
|
|
|
3854
3866
|
{
|
|
3855
3867
|
type: "button",
|
|
3856
3868
|
onClick: onClearAll,
|
|
3857
|
-
className: "ml-1 rounded-small text-xs font-medium text-text-link hover:underline focus-visible:outline-2 focus-visible:outline-offset-
|
|
3869
|
+
className: "ml-1 rounded-small text-xs font-medium text-text-link hover:underline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
3858
3870
|
children: "Clear all"
|
|
3859
3871
|
}
|
|
3860
3872
|
)
|
|
@@ -3887,7 +3899,7 @@ function Chip({
|
|
|
3887
3899
|
type: "button",
|
|
3888
3900
|
onClick: onRemove,
|
|
3889
3901
|
"aria-label": `Remove ${groupLabel}: ${label}`,
|
|
3890
|
-
className: "rounded-full text-text-tertiary transition-colors hover:text-text-primary focus-visible:outline-2 focus-visible:outline-offset-
|
|
3902
|
+
className: "rounded-full text-text-tertiary transition-colors hover:text-text-primary focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
3891
3903
|
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react17.X, { size: 12 })
|
|
3892
3904
|
}
|
|
3893
3905
|
)
|
|
@@ -3952,7 +3964,7 @@ var SortButton = (0, import_react17.forwardRef)(
|
|
|
3952
3964
|
// subtly tighter than the fixed headers next to them. A control
|
|
3953
3965
|
// should carry exactly the properties that do not inherit, and
|
|
3954
3966
|
// nothing more.
|
|
3955
|
-
"group inline-flex items-center gap-1 uppercase transition-colors focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-
|
|
3967
|
+
"group inline-flex items-center gap-1 uppercase transition-colors focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
3956
3968
|
ALIGN[align],
|
|
3957
3969
|
!disabled && "hover:text-text-primary",
|
|
3958
3970
|
className
|
|
@@ -4005,7 +4017,7 @@ function pageWindow(current, total) {
|
|
|
4005
4017
|
return out;
|
|
4006
4018
|
}
|
|
4007
4019
|
function Pager({ page, totalPages, onPage, disabled = false, label = "Pagination", className, testIdPrefix }) {
|
|
4008
|
-
const btn = "flex h-8 min-w-8 items-center justify-center rounded-control px-2 text-dense transition-colors disabled:pointer-events-none disabled:opacity-30 focus-visible:outline-2 focus-visible:outline-offset-
|
|
4020
|
+
const btn = "flex h-8 min-w-8 items-center justify-center rounded-control px-2 text-dense transition-colors disabled:pointer-events-none disabled:opacity-30 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus";
|
|
4009
4021
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("nav", { "aria-label": label, className: cn("flex items-center gap-1", className), "data-testid": testIdPrefix, children: [
|
|
4010
4022
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
4011
4023
|
"button",
|
|
@@ -4147,7 +4159,7 @@ function Toast({ message, action, onClose, tone = "neutral", duration, className
|
|
|
4147
4159
|
action.onClick();
|
|
4148
4160
|
}
|
|
4149
4161
|
},
|
|
4150
|
-
className: "shrink-0 rounded-control px-2.5 py-1 text-sm font-semibold text-text-inverse underline-offset-2 transition-colors duration-(--mr-motion-duration-interactive) ease-interactive hover:bg-text-inverse/15 hover:underline focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-border-focus",
|
|
4162
|
+
className: "shrink-0 rounded-control px-2.5 py-1 text-sm font-semibold text-text-inverse underline-offset-2 transition-colors duration-(--mr-motion-duration-interactive) ease-interactive hover:bg-text-inverse/15 hover:underline focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
4151
4163
|
children: action.label
|
|
4152
4164
|
}
|
|
4153
4165
|
)
|
|
@@ -4183,7 +4195,7 @@ function TablePagination({
|
|
|
4183
4195
|
const current = Math.min(page, totalPages);
|
|
4184
4196
|
const rangeStart = totalItems === 0 ? 0 : (current - 1) * perPage + 1;
|
|
4185
4197
|
const rangeEnd = Math.min(current * perPage, totalItems);
|
|
4186
|
-
const btn = "flex h-8 min-w-8 items-center justify-center rounded-control px-2 text-dense transition-colors focus-visible:outline-2 focus-visible:outline-offset-
|
|
4198
|
+
const btn = "flex h-8 min-w-8 items-center justify-center rounded-control px-2 text-dense transition-colors focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus";
|
|
4187
4199
|
const off = "disabled:pointer-events-none disabled:opacity-30";
|
|
4188
4200
|
const stepBtn = cn(btn, "text-text-secondary hover:bg-subtle hover:text-text-primary", off);
|
|
4189
4201
|
const range = /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: "text-dense text-text-tertiary tabular-nums", children: [
|
|
@@ -4423,7 +4435,7 @@ function DateRangePicker({
|
|
|
4423
4435
|
]
|
|
4424
4436
|
}
|
|
4425
4437
|
),
|
|
4426
|
-
open && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: cn("absolute top-
|
|
4438
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: cn("absolute top-full mt-2 z-30 w-70 overflow-hidden rounded-card border border-border-default bg-surface py-1 shadow-overlay", align === "right" ? "right-0" : "left-0"), children: [
|
|
4427
4439
|
presets.map((p) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
4428
4440
|
"button",
|
|
4429
4441
|
{
|
|
@@ -4459,7 +4471,7 @@ function DateRangePicker({
|
|
|
4459
4471
|
type: "button",
|
|
4460
4472
|
onClick: applyCustom,
|
|
4461
4473
|
disabled: !valid,
|
|
4462
|
-
className: "self-start text-dense font-semibold text-brand-primaryAction transition-opacity hover:opacity-80 disabled:cursor-not-allowed disabled:opacity-40 focus-visible:outline-2 focus-visible:outline-offset-
|
|
4474
|
+
className: "self-start text-dense font-semibold text-brand-primaryAction transition-opacity hover:opacity-80 disabled:cursor-not-allowed disabled:opacity-40 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
4463
4475
|
children: showFooter ? "Use custom range" : "Apply"
|
|
4464
4476
|
}
|
|
4465
4477
|
)
|
|
@@ -4474,6 +4486,7 @@ function DateRangePicker({
|
|
|
4474
4486
|
var import_react20 = require("react");
|
|
4475
4487
|
var import_lucide_react23 = require("lucide-react");
|
|
4476
4488
|
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
4489
|
+
var SEARCH_AFTER = 8;
|
|
4477
4490
|
function MultiSelectFilter({
|
|
4478
4491
|
caption,
|
|
4479
4492
|
options = [],
|
|
@@ -4483,7 +4496,7 @@ function MultiSelectFilter({
|
|
|
4483
4496
|
selected,
|
|
4484
4497
|
onChange,
|
|
4485
4498
|
allLabel = "All",
|
|
4486
|
-
searchable
|
|
4499
|
+
searchable,
|
|
4487
4500
|
searchPlaceholder,
|
|
4488
4501
|
align = "left",
|
|
4489
4502
|
fullIsAll = false,
|
|
@@ -4505,6 +4518,7 @@ function MultiSelectFilter({
|
|
|
4505
4518
|
}) {
|
|
4506
4519
|
const groupLeaves = (g) => g.children.length ? g.children : [{ id: g.id, label: g.label }];
|
|
4507
4520
|
const leafOptions = groups ? groups.flatMap(groupLeaves) : options;
|
|
4521
|
+
const showSearch = searchable ?? leafOptions.length > SEARCH_AFTER;
|
|
4508
4522
|
const [open, setOpen] = (0, import_react20.useState)(false);
|
|
4509
4523
|
const [q, setQ] = (0, import_react20.useState)("");
|
|
4510
4524
|
const [draft, setDraft] = (0, import_react20.useState)(selected);
|
|
@@ -4526,6 +4540,12 @@ function MultiSelectFilter({
|
|
|
4526
4540
|
setOpen(false);
|
|
4527
4541
|
setQ("");
|
|
4528
4542
|
};
|
|
4543
|
+
const clearAll = () => {
|
|
4544
|
+
setDraft(clearValue);
|
|
4545
|
+
onChange(clearValue);
|
|
4546
|
+
setOpen(false);
|
|
4547
|
+
setQ("");
|
|
4548
|
+
};
|
|
4529
4549
|
(0, import_react20.useEffect)(() => {
|
|
4530
4550
|
if (!open) return;
|
|
4531
4551
|
const onKey = (e) => e.key === "Escape" && close();
|
|
@@ -4602,7 +4622,7 @@ function MultiSelectFilter({
|
|
|
4602
4622
|
"div",
|
|
4603
4623
|
{
|
|
4604
4624
|
className: cn(
|
|
4605
|
-
"absolute top-
|
|
4625
|
+
"absolute top-full mt-2 z-30 flex flex-col overflow-hidden rounded-card border border-border-default bg-surface shadow-overlay",
|
|
4606
4626
|
menuWidthClass,
|
|
4607
4627
|
align === "right" ? "right-0" : "left-0"
|
|
4608
4628
|
),
|
|
@@ -4610,7 +4630,7 @@ function MultiSelectFilter({
|
|
|
4610
4630
|
role: "dialog",
|
|
4611
4631
|
"aria-label": caption,
|
|
4612
4632
|
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(MenuLoading, {}) : error ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(MenuError, { onRetry }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
|
|
4613
|
-
|
|
4633
|
+
showSearch && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "border-b border-border-default p-2", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex h-8 items-center gap-2 rounded-control border border-border-strong bg-input px-2.5 focus-within:outline-2 focus-within:outline-offset-1 focus-within:outline-border-focus", children: [
|
|
4614
4634
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react23.Search, { size: 14, className: "text-text-secondary", "aria-hidden": "true" }),
|
|
4615
4635
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
4616
4636
|
"input",
|
|
@@ -4622,9 +4642,9 @@ function MultiSelectFilter({
|
|
|
4622
4642
|
className: "h-full flex-1 bg-transparent text-dense outline-hidden placeholder:text-text-tertiary"
|
|
4623
4643
|
}
|
|
4624
4644
|
),
|
|
4625
|
-
q && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("button", { type: "button", onClick: () => setQ(""), "aria-label": "Clear search", className: "text-text-tertiary hover:text-text-primary focus-visible:outline-2 focus-visible:outline-offset-
|
|
4645
|
+
q && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("button", { type: "button", onClick: () => setQ(""), "aria-label": "Clear search", className: "text-text-tertiary hover:text-text-primary focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react23.X, { size: 13 }) })
|
|
4626
4646
|
] }) }),
|
|
4627
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "max-h-
|
|
4647
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "max-h-70 overflow-y-auto p-1", children: [
|
|
4628
4648
|
groups ? visibleGroups.map((g) => {
|
|
4629
4649
|
const state = groupState(g);
|
|
4630
4650
|
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { children: [
|
|
@@ -4679,12 +4699,12 @@ function MultiSelectFilter({
|
|
|
4679
4699
|
(groups && !visibleGroups.length || !groups && !items.length) && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "py-6 text-center text-dense text-text-tertiary", children: "No matches." })
|
|
4680
4700
|
] }),
|
|
4681
4701
|
note && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "border-t border-border-default px-3 py-2 text-xs text-text-tertiary", children: note }),
|
|
4682
|
-
showFooter ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(FilterDropdownFooter, { onClear:
|
|
4702
|
+
showFooter ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(FilterDropdownFooter, { onClear: clearAll, onApply: apply }) : min === 0 && draft.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "border-t border-border-default p-2", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
4683
4703
|
"button",
|
|
4684
4704
|
{
|
|
4685
4705
|
type: "button",
|
|
4686
4706
|
onClick: () => setDraft([]),
|
|
4687
|
-
className: "text-xs font-medium text-text-link hover:underline focus-visible:outline-2 focus-visible:outline-offset-
|
|
4707
|
+
className: "text-xs font-medium text-text-link hover:underline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
4688
4708
|
children: [
|
|
4689
4709
|
"Clear ",
|
|
4690
4710
|
caption.toLowerCase()
|
|
@@ -4708,8 +4728,8 @@ function OptionCount({ n }) {
|
|
|
4708
4728
|
var import_react21 = require("react");
|
|
4709
4729
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
4710
4730
|
var SIZES2 = {
|
|
4711
|
-
sm: { track: "h-5 w-9", knob: "h-4 w-4", on: "translate-x-
|
|
4712
|
-
md: { track: "h-6 w-11", knob: "h-5 w-5", on: "translate-x-
|
|
4731
|
+
sm: { track: "h-5 w-9", knob: "h-4 w-4", on: "translate-x-4.5" },
|
|
4732
|
+
md: { track: "h-6 w-11", knob: "h-5 w-5", on: "translate-x-5.5" }
|
|
4713
4733
|
};
|
|
4714
4734
|
var OFF_TRACK = "color-mix(in srgb, var(--mr-color-border-interactive) 70%, var(--mr-color-text-secondary))";
|
|
4715
4735
|
var Toggle = (0, import_react21.forwardRef)(function Toggle2({ checked, onChange, label, size = "md", disabled, className, testIdPrefix }, ref) {
|
|
@@ -4727,7 +4747,7 @@ var Toggle = (0, import_react21.forwardRef)(function Toggle2({ checked, onChange
|
|
|
4727
4747
|
onClick: () => onChange(!checked),
|
|
4728
4748
|
style: checked ? void 0 : { backgroundColor: OFF_TRACK },
|
|
4729
4749
|
className: cn(
|
|
4730
|
-
"relative inline-flex shrink-0 items-center rounded-full transition-colors focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-
|
|
4750
|
+
"relative inline-flex shrink-0 items-center rounded-full transition-colors focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
4731
4751
|
s.track,
|
|
4732
4752
|
checked && "bg-brand-primaryAction",
|
|
4733
4753
|
disabled && "cursor-not-allowed opacity-50",
|
|
@@ -4757,7 +4777,7 @@ function AISpark({ size = 16, className, testIdPrefix }) {
|
|
|
4757
4777
|
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
4758
4778
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("svg", { width: "0", height: "0", "aria-hidden": "true", style: { position: "absolute" }, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("linearGradient", { id, x1: "0", y1: "0", x2: "1", y2: "1", children: [
|
|
4759
4779
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("stop", { offset: "0%", stopColor: "var(--mr-color-brand-primary)" }),
|
|
4760
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("stop", { offset: "100%",
|
|
4780
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("stop", { offset: "100%", stopColor: "var(--mr-color-ai-violet)" })
|
|
4761
4781
|
] }) }) }),
|
|
4762
4782
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react24.Sparkles, { size, stroke: `url(#${id})`, className, "data-testid": testIdPrefix, "aria-hidden": "true" })
|
|
4763
4783
|
] });
|
|
@@ -4810,7 +4830,7 @@ function PageHeader({ title, description, actions, meta, back, className, testId
|
|
|
4810
4830
|
{
|
|
4811
4831
|
href: back.href ?? "#",
|
|
4812
4832
|
onClick: back.onClick,
|
|
4813
|
-
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-
|
|
4833
|
+
className: "mb-1.5 inline-flex items-center gap-1.5 rounded-control text-micro font-semibold uppercase tracking-wider text-text-tertiary hover:text-text-primary focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
4814
4834
|
children: [
|
|
4815
4835
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react25.ArrowLeft, { size: 13, "aria-hidden": "true" }),
|
|
4816
4836
|
back.label
|
|
@@ -4914,7 +4934,7 @@ function Modal({ open, onClose, title, description, size = "md", footer, childre
|
|
|
4914
4934
|
type: "button",
|
|
4915
4935
|
onClick: onClose,
|
|
4916
4936
|
"aria-label": "Close",
|
|
4917
|
-
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-
|
|
4937
|
+
className: "-mr-1.5 -mt-1 flex size-8 shrink-0 items-center justify-center rounded-control text-text-tertiary hover:bg-subtle hover:text-text-primary focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
4918
4938
|
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react26.X, { size: 16, "aria-hidden": "true" })
|
|
4919
4939
|
}
|
|
4920
4940
|
)
|
|
@@ -5115,7 +5135,7 @@ function Drawer({ open, onClose, title, description, size = "sm", footer, childr
|
|
|
5115
5135
|
type: "button",
|
|
5116
5136
|
onClick: onClose,
|
|
5117
5137
|
"aria-label": "Close",
|
|
5118
|
-
className: "-mr-1.5 -mt-1 flex size-8 shrink-0 items-center justify-center rounded-control text-text-tertiary hover:bg-subtle hover:text-text-primary focus-visible:outline-2 focus-visible:outline-offset-
|
|
5138
|
+
className: "-mr-1.5 -mt-1 flex size-8 shrink-0 items-center justify-center rounded-control text-text-tertiary hover:bg-subtle hover:text-text-primary focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
5119
5139
|
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react27.X, { size: 16, "aria-hidden": "true" })
|
|
5120
5140
|
}
|
|
5121
5141
|
)
|
|
@@ -5269,7 +5289,7 @@ var SuggestionChip = (0, import_react27.forwardRef)(function SuggestionChip2({ c
|
|
|
5269
5289
|
"data-testid": testIdPrefix,
|
|
5270
5290
|
...props,
|
|
5271
5291
|
className: cn(
|
|
5272
|
-
"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-
|
|
5292
|
+
"inline-flex h-8 max-w-full items-center rounded-full border border-border-default bg-surface px-3 text-sm text-text-primary transition-colors duration-(--mr-motion-duration-interactive) ease-interactive hover:border-border-strong hover:bg-subtle focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
5273
5293
|
className
|
|
5274
5294
|
),
|
|
5275
5295
|
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "truncate", children })
|
|
@@ -5296,7 +5316,7 @@ var ToggleChip = (0, import_react28.forwardRef)(function ToggleChip2({ selected,
|
|
|
5296
5316
|
if (!e.defaultPrevented) onChange(!selected);
|
|
5297
5317
|
},
|
|
5298
5318
|
className: cn(
|
|
5299
|
-
"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-
|
|
5319
|
+
"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-1 focus-visible:outline-border-focus",
|
|
5300
5320
|
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",
|
|
5301
5321
|
className
|
|
5302
5322
|
),
|
|
@@ -5390,7 +5410,7 @@ function InlineMessage({ tone = "info", title, children, actions, onDismiss, cla
|
|
|
5390
5410
|
type: "button",
|
|
5391
5411
|
onClick: onDismiss,
|
|
5392
5412
|
"aria-label": "Dismiss",
|
|
5393
|
-
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",
|
|
5413
|
+
className: "-mr-1 -mt-0.5 flex size-6 shrink-0 items-center justify-center rounded-control text-text-tertiary hover:bg-subtle hover:text-text-primary focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
5394
5414
|
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_lucide_react30.X, { size: 14, "aria-hidden": "true" })
|
|
5395
5415
|
}
|
|
5396
5416
|
)
|
|
@@ -5464,7 +5484,7 @@ function FilterDrawer({
|
|
|
5464
5484
|
const outgoing = phase === "start" ? void 0 : dir > 0 ? "translateX(-33%)" : "translateX(100%)";
|
|
5465
5485
|
const panel = (v, rows = true) => {
|
|
5466
5486
|
const s = v ? sections.find((x) => x.id === v) : void 0;
|
|
5467
|
-
if (s) return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "px-5 pt-
|
|
5487
|
+
if (s) return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "border-t border-border-default px-5 pt-4", children: renderSection(s.id) });
|
|
5468
5488
|
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("ul", { className: "border-t border-border-default", children: sections.map((x) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("li", { className: "border-b border-border-default", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
5469
5489
|
"button",
|
|
5470
5490
|
{
|
|
@@ -5508,7 +5528,7 @@ function FilterDrawer({
|
|
|
5508
5528
|
onClick: () => setView(null),
|
|
5509
5529
|
"aria-label": "Back to all filters",
|
|
5510
5530
|
"data-testid": testIdPrefix && `${testIdPrefix}-back`,
|
|
5511
|
-
className: "-ml-1.5 rounded-control p-1 text-text-secondary hover:bg-subtle hover:text-text-primary focus-visible:outline-2 focus-visible:outline-border-focus",
|
|
5531
|
+
className: "-ml-1.5 rounded-control p-1 text-text-secondary hover:bg-subtle hover:text-text-primary focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
|
|
5512
5532
|
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_lucide_react31.ChevronLeft, { size: 18, "aria-hidden": "true" })
|
|
5513
5533
|
}
|
|
5514
5534
|
),
|
|
@@ -5518,8 +5538,11 @@ function FilterDrawer({
|
|
|
5518
5538
|
"Filters",
|
|
5519
5539
|
activeCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Badge, { tone: "brandSolid", kind: "count", children: activeCount })
|
|
5520
5540
|
] }),
|
|
5521
|
-
footer:
|
|
5522
|
-
|
|
5541
|
+
footer: focused ? (
|
|
5542
|
+
// Picks are kept as they're made; only See results, on the list, applies them.
|
|
5543
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "flex w-full items-center", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Button, { variant: "link", size: "md", onClick: () => onClearSection(focused.id), className: "px-0", children: "Clear" }) })
|
|
5544
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex w-full items-center justify-between gap-2", children: [
|
|
5545
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Button, { variant: "link", size: "md", onClick: onClearAll, className: "px-0", children: "Clear all" }),
|
|
5523
5546
|
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
5524
5547
|
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Button, { variant: "secondary", size: "md", onClick: onClose, children: "Cancel" }),
|
|
5525
5548
|
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
@@ -5531,7 +5554,7 @@ function FilterDrawer({
|
|
|
5531
5554
|
onApply();
|
|
5532
5555
|
onClose();
|
|
5533
5556
|
},
|
|
5534
|
-
children: "
|
|
5557
|
+
children: "See results"
|
|
5535
5558
|
}
|
|
5536
5559
|
)
|
|
5537
5560
|
] })
|
|
@@ -5585,6 +5608,98 @@ var AllFiltersButton = (0, import_react31.forwardRef)(function AllFiltersButton2
|
|
|
5585
5608
|
}
|
|
5586
5609
|
);
|
|
5587
5610
|
});
|
|
5611
|
+
|
|
5612
|
+
// src/Menu.tsx
|
|
5613
|
+
var import_react32 = require("react");
|
|
5614
|
+
var import_react_slot2 = require("@radix-ui/react-slot");
|
|
5615
|
+
var import_lucide_react33 = require("lucide-react");
|
|
5616
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
5617
|
+
var ROW_SELECTOR = '[role^="menuitem"]:not([aria-disabled="true"]):not(:disabled)';
|
|
5618
|
+
function moveFocus(e) {
|
|
5619
|
+
const keys = ["ArrowDown", "ArrowUp", "Home", "End"];
|
|
5620
|
+
if (!keys.includes(e.key)) return;
|
|
5621
|
+
const rows = Array.from(e.currentTarget.querySelectorAll(ROW_SELECTOR));
|
|
5622
|
+
if (!rows.length) return;
|
|
5623
|
+
e.preventDefault();
|
|
5624
|
+
const i = rows.indexOf(document.activeElement);
|
|
5625
|
+
const next = e.key === "Home" ? 0 : e.key === "End" ? rows.length - 1 : e.key === "ArrowDown" ? (i + 1) % rows.length : (i - 1 + rows.length) % rows.length;
|
|
5626
|
+
rows[next].focus();
|
|
5627
|
+
}
|
|
5628
|
+
var Menu = (0, import_react32.forwardRef)(
|
|
5629
|
+
({ className, testIdPrefix, onKeyDown, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5630
|
+
"div",
|
|
5631
|
+
{
|
|
5632
|
+
ref,
|
|
5633
|
+
role: "menu",
|
|
5634
|
+
"data-testid": testIdPrefix,
|
|
5635
|
+
onKeyDown: (e) => {
|
|
5636
|
+
moveFocus(e);
|
|
5637
|
+
onKeyDown?.(e);
|
|
5638
|
+
},
|
|
5639
|
+
className: cn("flex flex-col p-1", className),
|
|
5640
|
+
...props,
|
|
5641
|
+
children
|
|
5642
|
+
}
|
|
5643
|
+
)
|
|
5644
|
+
);
|
|
5645
|
+
Menu.displayName = "Menu";
|
|
5646
|
+
var MenuItem = (0, import_react32.forwardRef)(
|
|
5647
|
+
({ className, testIdPrefix, icon, trailing, description, submenu, checked, danger, disabled, asChild = false, children, ...props }, ref) => {
|
|
5648
|
+
const Comp = asChild ? import_react_slot2.Slot : "button";
|
|
5649
|
+
const radio = checked !== void 0;
|
|
5650
|
+
const body = /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
|
|
5651
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { "aria-hidden": "true", className: cn("flex shrink-0", danger ? "text-text-danger" : "text-text-secondary"), children: icon }),
|
|
5652
|
+
asChild ? (
|
|
5653
|
+
// The link's own text lands here; the link becomes the row.
|
|
5654
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react_slot2.Slottable, { children })
|
|
5655
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("span", { className: "min-w-0 flex-1", children: [
|
|
5656
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "block truncate", children }),
|
|
5657
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "block truncate text-xs text-text-tertiary", children: description })
|
|
5658
|
+
] }),
|
|
5659
|
+
trailing && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "ml-auto flex shrink-0 items-center text-xs text-text-secondary", children: trailing }),
|
|
5660
|
+
radio && checked && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react33.Check, { size: 16, "aria-hidden": "true", className: "shrink-0 text-brand-primaryAction" }),
|
|
5661
|
+
submenu && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react33.ChevronRight, { size: 16, "aria-hidden": "true", className: "shrink-0 text-text-secondary" })
|
|
5662
|
+
] });
|
|
5663
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5664
|
+
Comp,
|
|
5665
|
+
{
|
|
5666
|
+
ref,
|
|
5667
|
+
type: asChild ? void 0 : "button",
|
|
5668
|
+
role: radio ? "menuitemradio" : "menuitem",
|
|
5669
|
+
"aria-checked": radio ? checked : void 0,
|
|
5670
|
+
"aria-haspopup": submenu ? "menu" : void 0,
|
|
5671
|
+
"aria-disabled": disabled || void 0,
|
|
5672
|
+
disabled: asChild ? void 0 : disabled,
|
|
5673
|
+
tabIndex: -1,
|
|
5674
|
+
"data-testid": testIdPrefix,
|
|
5675
|
+
className: cn(
|
|
5676
|
+
"flex min-h-9 w-full items-center gap-2.5 rounded-control px-3 py-1.5 text-left text-sm transition-colors",
|
|
5677
|
+
"focus-visible:outline-solid focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-border-focus",
|
|
5678
|
+
danger ? "text-text-danger" : "text-text-primary",
|
|
5679
|
+
disabled ? "cursor-not-allowed opacity-40" : "hover:bg-subtle focus-visible:bg-subtle",
|
|
5680
|
+
className
|
|
5681
|
+
),
|
|
5682
|
+
...props,
|
|
5683
|
+
children: body
|
|
5684
|
+
}
|
|
5685
|
+
);
|
|
5686
|
+
}
|
|
5687
|
+
);
|
|
5688
|
+
MenuItem.displayName = "MenuItem";
|
|
5689
|
+
function MenuLabel({ className, testIdPrefix, children }) {
|
|
5690
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5691
|
+
"div",
|
|
5692
|
+
{
|
|
5693
|
+
role: "presentation",
|
|
5694
|
+
"data-testid": testIdPrefix,
|
|
5695
|
+
className: cn("px-3 pb-1 pt-2 text-micro font-semibold uppercase tracking-wide text-text-tertiary", className),
|
|
5696
|
+
children
|
|
5697
|
+
}
|
|
5698
|
+
);
|
|
5699
|
+
}
|
|
5700
|
+
function MenuSeparator({ className, testIdPrefix }) {
|
|
5701
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { role: "separator", "data-testid": testIdPrefix, className: cn("-mx-1 my-1 border-t border-border-default", className) });
|
|
5702
|
+
}
|
|
5588
5703
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5589
5704
|
0 && (module.exports = {
|
|
5590
5705
|
AISpark,
|
|
@@ -5616,6 +5731,10 @@ var AllFiltersButton = (0, import_react31.forwardRef)(function AllFiltersButton2
|
|
|
5616
5731
|
InlineMessage,
|
|
5617
5732
|
LineChartPlaceholder,
|
|
5618
5733
|
MediaLabel,
|
|
5734
|
+
Menu,
|
|
5735
|
+
MenuItem,
|
|
5736
|
+
MenuLabel,
|
|
5737
|
+
MenuSeparator,
|
|
5619
5738
|
Modal,
|
|
5620
5739
|
MultiSelectFilter,
|
|
5621
5740
|
NO_RESULTS_BODY,
|