@mediaradar/design-components 0.37.0 → 0.38.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
@@ -2368,10 +2368,104 @@ function SelectedSection({ count, open, onToggle, children, testIdPrefix }) {
2368
2368
  }
2369
2369
 
2370
2370
  // src/SelectionPicker.tsx
2371
- import { useCallback as useCallback3, useEffect as useEffect9, useLayoutEffect as useLayoutEffect4, useMemo as useMemo3, useRef as useRef10, useState as useState9 } from "react";
2371
+ import { useCallback as useCallback3, useEffect as useEffect9, useLayoutEffect as useLayoutEffect4, useMemo as useMemo3, useRef as useRef11, useState as useState9 } from "react";
2372
2372
  import { createPortal as createPortal4 } from "react-dom";
2373
2373
  import { Search as Search4, Plus, Info as Info2, ChevronRight as ChevronRight3, ChevronDown as ChevronDown8, Check as Check6, List, Loader2 } from "lucide-react";
2374
- import { Fragment as Fragment4, jsx as jsx26, jsxs as jsxs24 } from "react/jsx-runtime";
2374
+
2375
+ // src/Tabs.tsx
2376
+ import { useRef as useRef10 } from "react";
2377
+ import { jsx as jsx26, jsxs as jsxs24 } from "react/jsx-runtime";
2378
+ function arrowKeys(e, row) {
2379
+ if (!row || !["ArrowLeft", "ArrowRight", "Home", "End"].includes(e.key)) return;
2380
+ const items = Array.from(row.querySelectorAll("button:not([disabled])"));
2381
+ const at = items.indexOf(document.activeElement);
2382
+ const next = e.key === "Home" ? 0 : e.key === "End" ? items.length - 1 : (at + (e.key === "ArrowRight" ? 1 : -1) + items.length) % items.length;
2383
+ e.preventDefault();
2384
+ items[next]?.focus();
2385
+ items[next]?.click();
2386
+ }
2387
+ function Tabs({ items, value, onChange, idPrefix = "tabs", className, ...rest }) {
2388
+ const row = useRef10(null);
2389
+ return /* @__PURE__ */ jsx26(
2390
+ "div",
2391
+ {
2392
+ ref: row,
2393
+ role: "tablist",
2394
+ "aria-label": rest["aria-label"],
2395
+ onKeyDown: (e) => arrowKeys(e, row.current),
2396
+ className: cn("flex gap-6 border-b border-border-default", className),
2397
+ children: items.map((item) => {
2398
+ const on = item.value === value;
2399
+ return /* @__PURE__ */ jsxs24(
2400
+ "button",
2401
+ {
2402
+ type: "button",
2403
+ role: "tab",
2404
+ id: `${idPrefix}-tab-${item.value}`,
2405
+ "aria-controls": `${idPrefix}-panel-${item.value}`,
2406
+ "aria-selected": on,
2407
+ tabIndex: on ? 0 : -1,
2408
+ disabled: item.disabled,
2409
+ onClick: () => onChange(item.value),
2410
+ className: cn(
2411
+ "-mb-px flex items-center gap-1.5 border-b-2 pt-1 pb-2.5 text-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus disabled:opacity-50",
2412
+ on ? "border-brand-primaryAction font-semibold text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"
2413
+ ),
2414
+ children: [
2415
+ item.label,
2416
+ item.count !== void 0 && /* @__PURE__ */ jsx26("span", { className: "text-xs text-text-tertiary", children: item.count })
2417
+ ]
2418
+ },
2419
+ item.value
2420
+ );
2421
+ })
2422
+ }
2423
+ );
2424
+ }
2425
+ function SegmentedControl({
2426
+ options,
2427
+ value,
2428
+ onChange,
2429
+ size = "sm",
2430
+ className,
2431
+ ...rest
2432
+ }) {
2433
+ const row = useRef10(null);
2434
+ return /* @__PURE__ */ jsx26(
2435
+ "div",
2436
+ {
2437
+ ref: row,
2438
+ role: "radiogroup",
2439
+ "aria-label": rest["aria-label"],
2440
+ onKeyDown: (e) => arrowKeys(e, row.current),
2441
+ className: cn("inline-flex w-fit items-stretch gap-0.5 rounded-full bg-subtle p-1", size === "md" ? "h-10" : "h-8", className),
2442
+ children: options.map((o) => {
2443
+ const on = o.value === value;
2444
+ return /* @__PURE__ */ jsx26(
2445
+ "button",
2446
+ {
2447
+ type: "button",
2448
+ role: "radio",
2449
+ "aria-checked": on,
2450
+ tabIndex: on ? 0 : -1,
2451
+ onClick: () => onChange(o.value),
2452
+ "data-testid": o.testId,
2453
+ className: cn(
2454
+ "rounded-full px-3 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
2455
+ size === "md" ? "text-sm" : "text-xs",
2456
+ on ? "bg-surface font-semibold text-text-primary shadow-raised" : "text-text-secondary hover:text-text-primary"
2457
+ ),
2458
+ children: o.label
2459
+ },
2460
+ o.value
2461
+ );
2462
+ })
2463
+ }
2464
+ );
2465
+ }
2466
+
2467
+ // src/SelectionPicker.tsx
2468
+ import { Fragment as Fragment4, jsx as jsx27, jsxs as jsxs25 } from "react/jsx-runtime";
2375
2469
  function cx8(...parts) {
2376
2470
  return parts.filter(Boolean).join(" ");
2377
2471
  }
@@ -2466,39 +2560,29 @@ function SelectionPicker({
2466
2560
  }
2467
2561
  };
2468
2562
  const rowGridCols = showInfoColumn ? "grid-cols-[36px_1fr_44px]" : "grid-cols-[36px_1fr]";
2469
- return /* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-4", children: [
2470
- helper && /* @__PURE__ */ jsxs24(Fragment4, { children: [
2471
- /* @__PURE__ */ jsx26("p", { className: "text-[13px] text-text-secondary", children: helper }),
2472
- /* @__PURE__ */ jsx26("hr", { className: "-mx-5 -mt-2 border-border-default sm:-mx-6" })
2563
+ return /* @__PURE__ */ jsxs25("div", { className: "flex flex-col gap-4", children: [
2564
+ helper && /* @__PURE__ */ jsxs25(Fragment4, { children: [
2565
+ /* @__PURE__ */ jsx27("p", { className: "text-dense text-text-secondary", children: helper }),
2566
+ /* @__PURE__ */ jsx27("hr", { className: "-mx-5 -mt-2 border-border-default sm:-mx-6" })
2473
2567
  ] }),
2474
- hasAccountLists && /* @__PURE__ */ jsx26("div", { className: "inline-flex gap-0.5 self-start rounded-control border border-border-default bg-canvas p-0.5", children: [
2475
- { id: "search", label: "Search", icon: Search4 },
2476
- { id: "lists", label: "Account lists", icon: List }
2477
- ].map((t) => {
2478
- const on = source === t.id;
2479
- return /* @__PURE__ */ jsxs24(
2480
- "button",
2481
- {
2482
- type: "button",
2483
- onClick: () => setSource(t.id),
2484
- "data-testid": testIdPrefix && `${testIdPrefix}-source-${t.id}`,
2485
- className: cx8(
2486
- "inline-flex items-center gap-1.5 rounded-[6px] px-3 py-1.5 text-[13px] font-medium transition-colors",
2487
- on ? "bg-surface text-text-primary shadow-raised" : "text-text-secondary hover:text-text-primary"
2488
- ),
2489
- children: [
2490
- /* @__PURE__ */ jsx26(t.icon, { size: 14, "aria-hidden": "true" }),
2491
- t.label
2492
- ]
2493
- },
2494
- t.id
2495
- );
2496
- }) }),
2497
- source === "search" && /* @__PURE__ */ jsxs24("div", { className: "flex min-w-0 flex-col gap-3", children: [
2498
- /* @__PURE__ */ jsxs24("div", { className: "flex flex-wrap items-center gap-2", children: [
2499
- /* @__PURE__ */ jsxs24("div", { className: "flex h-8 min-w-[200px] flex-1 items-center gap-2 rounded-control border border-border-strong bg-input px-3 focus-within:outline-2 focus-within:outline-offset-1 focus-within:outline-border-focus", children: [
2500
- /* @__PURE__ */ jsx26(Search4, { size: 15, className: "text-text-secondary", "aria-hidden": "true" }),
2501
- /* @__PURE__ */ jsx26(
2568
+ hasAccountLists && /* @__PURE__ */ jsx27(
2569
+ SegmentedControl,
2570
+ {
2571
+ "aria-label": "Add from",
2572
+ className: "self-start",
2573
+ value: source,
2574
+ onChange: setSource,
2575
+ options: [
2576
+ { value: "search", label: "Search", testId: testIdPrefix && `${testIdPrefix}-source-search` },
2577
+ { value: "lists", label: "Account lists", testId: testIdPrefix && `${testIdPrefix}-source-lists` }
2578
+ ]
2579
+ }
2580
+ ),
2581
+ source === "search" && /* @__PURE__ */ jsxs25("div", { className: "flex min-w-0 flex-col gap-3", children: [
2582
+ /* @__PURE__ */ jsxs25("div", { className: "flex flex-wrap items-center gap-2", children: [
2583
+ /* @__PURE__ */ jsxs25("div", { className: "flex h-8 min-w-50 flex-1 items-center gap-2 rounded-control border border-border-strong bg-input px-3 focus-within:outline-2 focus-within:outline-offset-1 focus-within:outline-border-focus", children: [
2584
+ /* @__PURE__ */ jsx27(Search4, { size: 15, className: "text-text-secondary", "aria-hidden": "true" }),
2585
+ /* @__PURE__ */ jsx27(
2502
2586
  "input",
2503
2587
  {
2504
2588
  value: query,
@@ -2514,7 +2598,7 @@ function SelectionPicker({
2514
2598
  }
2515
2599
  )
2516
2600
  ] }),
2517
- filters.map((f) => /* @__PURE__ */ jsx26(
2601
+ filters.map((f) => /* @__PURE__ */ jsx27(
2518
2602
  FilterDropdown,
2519
2603
  {
2520
2604
  filter: f,
@@ -2526,22 +2610,22 @@ function SelectionPicker({
2526
2610
  )),
2527
2611
  toolbarExtra
2528
2612
  ] }),
2529
- !hasSearched ? /* @__PURE__ */ jsxs24("div", { className: "flex flex-col items-center gap-3 rounded-card border border-dashed border-border-default py-10 text-center", children: [
2530
- /* @__PURE__ */ jsx26("div", { className: "flex h-12 w-12 items-center justify-center rounded-full bg-subtle", children: /* @__PURE__ */ jsx26(Search4, { size: 20, className: "text-text-tertiary", "aria-hidden": "true" }) }),
2531
- /* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-1", children: [
2532
- /* @__PURE__ */ jsx26("p", { className: "text-[14px] font-semibold text-text-primary", children: "Search to get started" }),
2533
- /* @__PURE__ */ jsx26("p", { className: "text-[13px] text-text-tertiary", children: "Use the search or filters above to find and add options." })
2613
+ !hasSearched ? /* @__PURE__ */ jsxs25("div", { className: "flex flex-col items-center gap-3 rounded-card border border-dashed border-border-default py-10 text-center", children: [
2614
+ /* @__PURE__ */ jsx27("div", { className: "flex h-12 w-12 items-center justify-center rounded-full bg-subtle", children: /* @__PURE__ */ jsx27(Search4, { size: 20, className: "text-text-tertiary", "aria-hidden": "true" }) }),
2615
+ /* @__PURE__ */ jsxs25("div", { className: "flex flex-col gap-1", children: [
2616
+ /* @__PURE__ */ jsx27("p", { className: "text-sm font-semibold text-text-primary", children: "Search to get started" }),
2617
+ /* @__PURE__ */ jsx27("p", { className: "text-dense text-text-tertiary", children: "Use the search or filters above to find and add options." })
2534
2618
  ] })
2535
- ] }) : /* @__PURE__ */ jsxs24("div", { className: "overflow-hidden rounded-control border border-border-default", children: [
2536
- /* @__PURE__ */ jsxs24(
2619
+ ] }) : /* @__PURE__ */ jsxs25("div", { className: "overflow-hidden rounded-control border border-border-default", children: [
2620
+ /* @__PURE__ */ jsxs25(
2537
2621
  "div",
2538
2622
  {
2539
2623
  className: cx8(
2540
- "grid items-center gap-2 border-b border-border-default bg-canvas px-3 py-2 text-[11px] font-semibold uppercase tracking-[0.06em] text-text-secondary",
2624
+ "grid items-center gap-2 border-b border-border-default bg-canvas px-3 py-2 text-micro font-semibold uppercase tracking-[0.06em] text-text-secondary",
2541
2625
  rowGridCols
2542
2626
  ),
2543
2627
  children: [
2544
- /* @__PURE__ */ jsx26(
2628
+ /* @__PURE__ */ jsx27(
2545
2629
  CheckBox,
2546
2630
  {
2547
2631
  checked: allSelected,
@@ -2552,18 +2636,18 @@ function SelectionPicker({
2552
2636
  testId: testIdPrefix && `${testIdPrefix}-select-all`
2553
2637
  }
2554
2638
  ),
2555
- /* @__PURE__ */ jsx26("div", { className: cx8("grid gap-2", gridForColumns(columns)), children: columns.map((c) => /* @__PURE__ */ jsx26("span", { className: c.className, children: c.header }, c.key)) }),
2556
- showInfoColumn && /* @__PURE__ */ jsx26("span", { className: "text-right", children: "Info" })
2639
+ /* @__PURE__ */ jsx27("div", { className: cx8("grid gap-2", gridForColumns(columns)), children: columns.map((c) => /* @__PURE__ */ jsx27("span", { className: c.className, children: c.header }, c.key)) }),
2640
+ showInfoColumn && /* @__PURE__ */ jsx27("span", { className: "text-right", children: "Info" })
2557
2641
  ]
2558
2642
  }
2559
2643
  ),
2560
- /* @__PURE__ */ jsx26("div", { className: "max-h-[360px] overflow-y-auto", children: loading ? /* @__PURE__ */ jsx26("div", { className: "flex items-center justify-center py-6", role: "status", "aria-label": "Loading", children: /* @__PURE__ */ jsx26(Loader2, { size: 18, className: "animate-spin text-text-tertiary", "aria-hidden": "true" }) }) : error ? /* @__PURE__ */ jsx26("p", { className: "px-3 py-8 text-center text-[13px] text-text-tertiary", children: errorMessage }) : rows.length === 0 ? /* @__PURE__ */ jsx26("div", { className: "px-3 py-8 text-center text-[13px] text-text-tertiary", children: "No matches. Try a different search or filter." }) : rows.map((row) => {
2644
+ /* @__PURE__ */ jsx27("div", { className: "max-h-90 overflow-y-auto", children: loading ? /* @__PURE__ */ jsx27("div", { className: "flex items-center justify-center py-6", role: "status", "aria-label": "Loading", children: /* @__PURE__ */ jsx27(Loader2, { size: 18, className: "animate-spin text-text-tertiary", "aria-hidden": "true" }) }) : error ? /* @__PURE__ */ jsx27("p", { className: "px-3 py-8 text-center text-dense text-text-tertiary", children: errorMessage }) : rows.length === 0 ? /* @__PURE__ */ jsx27("div", { className: "px-3 py-8 text-center text-dense text-text-tertiary", children: "No matches. Try a different search or filter." }) : rows.map((row) => {
2561
2645
  const isSel = selectedIds.has(row.id);
2562
2646
  const isLocked = lockedIds?.has(row.id) ?? false;
2563
2647
  const kids = getChildren?.(row);
2564
2648
  const isOpen = expanded.has(row.id);
2565
- return /* @__PURE__ */ jsxs24("div", { className: "border-t border-border-default/60 first:border-t-0", children: [
2566
- /* @__PURE__ */ jsxs24(
2649
+ return /* @__PURE__ */ jsxs25("div", { className: "border-t border-border-default/60 first:border-t-0", children: [
2650
+ /* @__PURE__ */ jsxs25(
2567
2651
  "div",
2568
2652
  {
2569
2653
  onClick: isLocked ? void 0 : () => toggleRow(row),
@@ -2576,7 +2660,7 @@ function SelectionPicker({
2576
2660
  !isLocked && isSel && "opacity-70"
2577
2661
  ),
2578
2662
  children: [
2579
- isLocked ? /* @__PURE__ */ jsx26("span", { "aria-hidden": "true" }) : /* @__PURE__ */ jsx26(
2663
+ isLocked ? /* @__PURE__ */ jsx27("span", { "aria-hidden": "true" }) : /* @__PURE__ */ jsx27(
2580
2664
  CheckBox,
2581
2665
  {
2582
2666
  checked: isSel,
@@ -2585,8 +2669,8 @@ function SelectionPicker({
2585
2669
  testId: testIdPrefix && `${testIdPrefix}-row-${slug4(row.id)}`
2586
2670
  }
2587
2671
  ),
2588
- /* @__PURE__ */ jsx26("div", { className: cx8("grid gap-2 text-[13px] text-text-primary", gridForColumns(columns)), children: columns.map((c) => /* @__PURE__ */ jsx26("span", { className: cx8("truncate", c.className), children: c.render(row) }, c.key)) }),
2589
- showInfoColumn && /* @__PURE__ */ jsx26("div", { className: "flex items-center justify-end", children: kids && kids.length > 0 ? /* @__PURE__ */ jsx26(
2672
+ /* @__PURE__ */ jsx27("div", { className: cx8("grid gap-2 text-dense text-text-primary", gridForColumns(columns)), children: columns.map((c) => /* @__PURE__ */ jsx27("span", { className: cx8("truncate", c.className), children: c.render(row) }, c.key)) }),
2673
+ showInfoColumn && /* @__PURE__ */ jsx27("div", { className: "flex items-center justify-end", children: kids && kids.length > 0 ? /* @__PURE__ */ jsx27(
2590
2674
  "button",
2591
2675
  {
2592
2676
  type: "button",
@@ -2600,39 +2684,39 @@ function SelectionPicker({
2600
2684
  });
2601
2685
  },
2602
2686
  className: "flex h-7 w-7 items-center justify-center rounded-control text-text-secondary hover:bg-canvas hover:text-text-primary",
2603
- children: /* @__PURE__ */ jsx26(ChevronRight3, { size: 15, className: cx8("transition-transform", isOpen && "rotate-90") })
2687
+ children: /* @__PURE__ */ jsx27(ChevronRight3, { size: 15, className: cx8("transition-transform", isOpen && "rotate-90") })
2604
2688
  }
2605
- ) : /* @__PURE__ */ jsx26(
2689
+ ) : /* @__PURE__ */ jsx27(
2606
2690
  "span",
2607
2691
  {
2608
2692
  className: "flex h-7 w-7 items-center justify-center text-text-tertiary",
2609
2693
  title: "No additional details",
2610
- children: /* @__PURE__ */ jsx26(Info2, { size: 14 })
2694
+ children: /* @__PURE__ */ jsx27(Info2, { size: 14 })
2611
2695
  }
2612
2696
  ) })
2613
2697
  ]
2614
2698
  }
2615
2699
  ),
2616
- isOpen && kids && /* @__PURE__ */ jsx26("div", { className: "bg-canvas/60 pb-1.5 pl-10 pr-3", children: kids.map((kid) => {
2700
+ isOpen && kids && /* @__PURE__ */ jsx27("div", { className: "bg-canvas/60 pb-1.5 pl-10 pr-3", children: kids.map((kid) => {
2617
2701
  const kidSel = selectedIds.has(kid.id);
2618
- return /* @__PURE__ */ jsxs24(
2702
+ return /* @__PURE__ */ jsxs25(
2619
2703
  "div",
2620
2704
  {
2621
2705
  className: "flex items-center justify-between gap-2 border-t border-border-default/40 py-2 first:border-t-0",
2622
2706
  children: [
2623
- /* @__PURE__ */ jsx26("span", { className: "truncate text-[13px] text-text-secondary", children: kid.name }),
2624
- /* @__PURE__ */ jsxs24(
2707
+ /* @__PURE__ */ jsx27("span", { className: "truncate text-dense text-text-secondary", children: kid.name }),
2708
+ /* @__PURE__ */ jsxs25(
2625
2709
  "button",
2626
2710
  {
2627
2711
  type: "button",
2628
2712
  disabled: kidSel,
2629
2713
  onClick: () => addRows([kid]),
2630
2714
  className: cx8(
2631
- "inline-flex items-center gap-1 rounded-control px-2 py-1 text-[12px] font-medium",
2715
+ "inline-flex items-center gap-1 rounded-control px-2 py-1 text-xs font-medium",
2632
2716
  kidSel ? "text-text-tertiary" : "text-text-link hover:bg-subtle"
2633
2717
  ),
2634
2718
  children: [
2635
- kidSel ? /* @__PURE__ */ jsx26(Check6, { size: 13 }) : /* @__PURE__ */ jsx26(Plus, { size: 13 }),
2719
+ kidSel ? /* @__PURE__ */ jsx27(Check6, { size: 13 }) : /* @__PURE__ */ jsx27(Plus, { size: 13 }),
2636
2720
  kidSel ? "Added" : "Add"
2637
2721
  ]
2638
2722
  }
@@ -2644,28 +2728,28 @@ function SelectionPicker({
2644
2728
  }) })
2645
2729
  ] }, row.id);
2646
2730
  }) }),
2647
- !loading && !error && hasMore && /* @__PURE__ */ jsxs24(
2731
+ !loading && !error && hasMore && /* @__PURE__ */ jsxs25(
2648
2732
  "button",
2649
2733
  {
2650
2734
  type: "button",
2651
2735
  onClick: onLoadMore,
2652
2736
  disabled: loadingMore,
2653
2737
  "data-testid": testIdPrefix && `${testIdPrefix}-load-more`,
2654
- className: "flex w-full items-center justify-center gap-2 border-t border-border-default px-2 py-1.5 text-[13px] text-brand-primaryAction transition-colors hover:bg-subtle disabled:opacity-50",
2738
+ className: "flex w-full items-center justify-center gap-2 border-t border-border-default px-2 py-1.5 text-dense text-brand-primaryAction transition-colors hover:bg-subtle disabled:opacity-50",
2655
2739
  children: [
2656
- loadingMore ? /* @__PURE__ */ jsx26(Loader2, { size: 13, className: "animate-spin", "aria-hidden": "true" }) : null,
2740
+ loadingMore ? /* @__PURE__ */ jsx27(Loader2, { size: 13, className: "animate-spin", "aria-hidden": "true" }) : null,
2657
2741
  loadingMore ? "Loading\u2026" : "Load more"
2658
2742
  ]
2659
2743
  }
2660
2744
  )
2661
2745
  ] })
2662
2746
  ] }),
2663
- source === "lists" && /* @__PURE__ */ jsxs24("div", { className: "flex min-w-0 flex-col gap-3", children: [
2664
- /* @__PURE__ */ jsx26("p", { className: "text-[13px] text-text-secondary", children: "Select an account list to add all of its accounts at once. Your workspace stays in sync as the list is updated." }),
2665
- accountLists && accountLists.length > 0 ? /* @__PURE__ */ jsxs24(Fragment4, { children: [
2666
- /* @__PURE__ */ jsx26(ScrollFade, { className: "flex max-h-[396px] flex-col gap-2 overflow-y-auto pr-0.5", children: accountLists.map((list) => {
2747
+ source === "lists" && /* @__PURE__ */ jsxs25("div", { className: "flex min-w-0 flex-col gap-3", children: [
2748
+ /* @__PURE__ */ jsx27("p", { className: "text-dense text-text-secondary", children: "Select an account list to add all of its accounts at once. Your workspace stays in sync as the list is updated." }),
2749
+ accountLists && accountLists.length > 0 ? /* @__PURE__ */ jsxs25(Fragment4, { children: [
2750
+ /* @__PURE__ */ jsx27(ScrollFade, { className: "flex max-h-99 flex-col gap-2 overflow-y-auto pr-0.5", children: accountLists.map((list) => {
2667
2751
  const on = (selectedListIds ?? []).includes(list.id);
2668
- return /* @__PURE__ */ jsxs24(
2752
+ return /* @__PURE__ */ jsxs25(
2669
2753
  "button",
2670
2754
  {
2671
2755
  type: "button",
@@ -2677,19 +2761,19 @@ function SelectionPicker({
2677
2761
  on ? "border-brand-primaryAction bg-brand-primarySoft" : "border-border-default bg-surface hover:bg-subtle"
2678
2762
  ),
2679
2763
  children: [
2680
- /* @__PURE__ */ jsx26(
2764
+ /* @__PURE__ */ jsx27(
2681
2765
  "span",
2682
2766
  {
2683
2767
  className: cx8(
2684
2768
  "flex h-5 w-5 shrink-0 items-center justify-center rounded-full",
2685
2769
  on ? "text-brand-primaryAction" : "text-text-secondary"
2686
2770
  ),
2687
- children: on ? /* @__PURE__ */ jsx26(Check6, { size: 16 }) : /* @__PURE__ */ jsx26(Plus, { size: 16 })
2771
+ children: on ? /* @__PURE__ */ jsx27(Check6, { size: 16 }) : /* @__PURE__ */ jsx27(Plus, { size: 16 })
2688
2772
  }
2689
2773
  ),
2690
- /* @__PURE__ */ jsxs24("span", { className: "min-w-0 flex-1", children: [
2691
- /* @__PURE__ */ jsx26("span", { className: "flex min-w-0 items-center gap-2", children: /* @__PURE__ */ jsx26("span", { className: "truncate text-[14px] font-medium text-text-primary", children: list.name }) }),
2692
- /* @__PURE__ */ jsxs24("span", { className: "block truncate text-[12px] text-text-secondary", children: [
2774
+ /* @__PURE__ */ jsxs25("span", { className: "min-w-0 flex-1", children: [
2775
+ /* @__PURE__ */ jsx27("span", { className: "flex min-w-0 items-center gap-2", children: /* @__PURE__ */ jsx27("span", { className: "truncate text-sm font-medium text-text-primary", children: list.name }) }),
2776
+ /* @__PURE__ */ jsxs25("span", { className: "block truncate text-xs text-text-secondary", children: [
2693
2777
  list.count,
2694
2778
  " accounts \xB7 ",
2695
2779
  list.entityTypes.join(", "),
@@ -2697,16 +2781,16 @@ function SelectionPicker({
2697
2781
  formatListDate(list.updatedAt)
2698
2782
  ] })
2699
2783
  ] }),
2700
- /* @__PURE__ */ jsx26("span", { className: cx8("shrink-0 text-[12px] font-medium", on ? "text-brand-primaryAction" : "text-text-secondary"), children: on ? "Added" : "Add" })
2784
+ /* @__PURE__ */ jsx27("span", { className: cx8("shrink-0 text-xs font-medium", on ? "text-brand-primaryAction" : "text-text-secondary"), children: on ? "Added" : "Add" })
2701
2785
  ]
2702
2786
  },
2703
2787
  list.id
2704
2788
  );
2705
2789
  }) }),
2706
- /* @__PURE__ */ jsxs24(
2790
+ /* @__PURE__ */ jsxs25(
2707
2791
  "p",
2708
2792
  {
2709
- className: "border-t border-border-default pt-2 text-right text-[12px] font-medium text-text-tertiary",
2793
+ className: "border-t border-border-default pt-2 text-right text-xs font-medium text-text-tertiary",
2710
2794
  "data-testid": testIdPrefix && `${testIdPrefix}-list-count`,
2711
2795
  children: [
2712
2796
  accountLists.length,
@@ -2715,11 +2799,11 @@ function SelectionPicker({
2715
2799
  ]
2716
2800
  }
2717
2801
  )
2718
- ] }) : /* @__PURE__ */ jsxs24("div", { className: "flex flex-col items-center gap-3 rounded-card border border-dashed border-border-default py-10 text-center", children: [
2719
- /* @__PURE__ */ jsx26("div", { className: "flex h-12 w-12 items-center justify-center rounded-full bg-subtle", children: /* @__PURE__ */ jsx26(List, { size: 20, className: "text-text-tertiary", "aria-hidden": "true" }) }),
2720
- /* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-1", children: [
2721
- /* @__PURE__ */ jsx26("p", { className: "text-[14px] font-semibold text-text-primary", children: "No account lists yet" }),
2722
- /* @__PURE__ */ jsx26("p", { className: "text-[13px] text-text-tertiary", children: "Account lists set up for you will appear here." })
2802
+ ] }) : /* @__PURE__ */ jsxs25("div", { className: "flex flex-col items-center gap-3 rounded-card border border-dashed border-border-default py-10 text-center", children: [
2803
+ /* @__PURE__ */ jsx27("div", { className: "flex h-12 w-12 items-center justify-center rounded-full bg-subtle", children: /* @__PURE__ */ jsx27(List, { size: 20, className: "text-text-tertiary", "aria-hidden": "true" }) }),
2804
+ /* @__PURE__ */ jsxs25("div", { className: "flex flex-col gap-1", children: [
2805
+ /* @__PURE__ */ jsx27("p", { className: "text-sm font-semibold text-text-primary", children: "No account lists yet" }),
2806
+ /* @__PURE__ */ jsx27("p", { className: "text-dense text-text-tertiary", children: "Account lists set up for you will appear here." })
2723
2807
  ] })
2724
2808
  ] })
2725
2809
  ] })
@@ -2727,7 +2811,7 @@ function SelectionPicker({
2727
2811
  }
2728
2812
  var EDGE_FADE = 44;
2729
2813
  function ScrollFade({ className, children }) {
2730
- const elRef = useRef10(null);
2814
+ const elRef = useRef11(null);
2731
2815
  const [edges, setEdges] = useState9({ top: false, bottom: false });
2732
2816
  const sync = useCallback3(() => {
2733
2817
  const el = elRef.current;
@@ -2751,7 +2835,7 @@ function ScrollFade({ className, children }) {
2751
2835
  [sync]
2752
2836
  );
2753
2837
  const mask = edges.top || edges.bottom ? `linear-gradient(to bottom, transparent 0, #000 ${edges.top ? EDGE_FADE : 0}px, #000 calc(100% - ${edges.bottom ? EDGE_FADE : 0}px), transparent 100%)` : void 0;
2754
- return /* @__PURE__ */ jsx26("div", { ref: attach, onScroll: sync, className, style: { maskImage: mask, WebkitMaskImage: mask }, children });
2838
+ return /* @__PURE__ */ jsx27("div", { ref: attach, onScroll: sync, className, style: { maskImage: mask, WebkitMaskImage: mask }, children });
2755
2839
  }
2756
2840
  function formatListDate(iso) {
2757
2841
  try {
@@ -2768,8 +2852,8 @@ function FilterDropdown({
2768
2852
  }) {
2769
2853
  const [open, setOpen] = useState9(false);
2770
2854
  const [q, setQ] = useState9("");
2771
- const btnRef = useRef10(null);
2772
- const menuRef = useRef10(null);
2855
+ const btnRef = useRef11(null);
2856
+ const menuRef = useRef11(null);
2773
2857
  const [pos, setPos] = useState9(null);
2774
2858
  const searchable = filter.options.length > 8;
2775
2859
  const shownOptions = searchable && q.trim() ? filter.options.filter((o) => o.toLowerCase().includes(q.trim().toLowerCase())) : filter.options;
@@ -2801,8 +2885,8 @@ function FilterDropdown({
2801
2885
  const count = active.size;
2802
2886
  const label = count === 0 ? filter.label : count === 1 ? [...active][0] : "Multiple";
2803
2887
  const filterSlug = slug4(filter.label);
2804
- return /* @__PURE__ */ jsxs24("div", { className: "relative", children: [
2805
- /* @__PURE__ */ jsxs24(
2888
+ return /* @__PURE__ */ jsxs25("div", { className: "relative", children: [
2889
+ /* @__PURE__ */ jsxs25(
2806
2890
  "button",
2807
2891
  {
2808
2892
  ref: btnRef,
@@ -2810,44 +2894,44 @@ function FilterDropdown({
2810
2894
  onClick: () => setOpen((v) => !v),
2811
2895
  "aria-expanded": open,
2812
2896
  "data-testid": testIdPrefix && `${testIdPrefix}-filter-${filterSlug}`,
2813
- className: "inline-flex h-8 items-center gap-1.5 whitespace-nowrap rounded-control border border-border-strong bg-input px-3 text-[13px] font-medium text-text-secondary transition-colors hover:bg-subtle",
2897
+ 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",
2814
2898
  children: [
2815
2899
  label,
2816
- /* @__PURE__ */ jsx26(ChevronDown8, { size: 13, "aria-hidden": "true", className: cx8("transition-transform", open && "rotate-180") })
2900
+ /* @__PURE__ */ jsx27(ChevronDown8, { size: 13, "aria-hidden": "true", className: cx8("transition-transform", open && "rotate-180") })
2817
2901
  ]
2818
2902
  }
2819
2903
  ),
2820
2904
  open && pos && createPortal4(
2821
- /* @__PURE__ */ jsxs24(
2905
+ /* @__PURE__ */ jsxs25(
2822
2906
  "div",
2823
2907
  {
2824
2908
  ref: menuRef,
2825
2909
  role: "group",
2826
2910
  "aria-label": filter.label,
2827
2911
  style: { top: pos.top, left: pos.left },
2828
- className: "fixed z-[80] min-w-[220px] rounded-card border border-border-default bg-surface p-2 shadow-overlay",
2912
+ className: "fixed z-[80] min-w-55 rounded-card border border-border-default bg-surface p-2 shadow-overlay",
2829
2913
  children: [
2830
- searchable && /* @__PURE__ */ jsxs24("div", { className: "mb-1.5 flex h-8 items-center gap-2 rounded-control border border-border-strong bg-input px-2.5", children: [
2831
- /* @__PURE__ */ jsx26(Search4, { size: 14, className: "shrink-0 text-text-secondary", "aria-hidden": "true" }),
2832
- /* @__PURE__ */ jsx26(
2914
+ searchable && /* @__PURE__ */ jsxs25("div", { className: "mb-1.5 flex h-8 items-center gap-2 rounded-control border border-border-strong bg-input px-2.5", children: [
2915
+ /* @__PURE__ */ jsx27(Search4, { size: 14, className: "shrink-0 text-text-secondary", "aria-hidden": "true" }),
2916
+ /* @__PURE__ */ jsx27(
2833
2917
  "input",
2834
2918
  {
2835
2919
  autoFocus: true,
2836
2920
  value: q,
2837
2921
  onChange: (e) => setQ(e.target.value),
2838
2922
  placeholder: `Search ${filter.label.toLowerCase()}\u2026`,
2839
- className: "h-full flex-1 bg-transparent text-[13px] outline-hidden placeholder:text-text-tertiary"
2923
+ className: "h-full flex-1 bg-transparent text-dense outline-hidden placeholder:text-text-tertiary"
2840
2924
  }
2841
2925
  )
2842
2926
  ] }),
2843
- /* @__PURE__ */ jsx26("div", { className: cx8("flex flex-col gap-0.5", searchable && "max-h-[240px] overflow-y-auto"), children: shownOptions.length === 0 ? /* @__PURE__ */ jsx26("p", { className: "px-2 py-3 text-center text-[12px] text-text-secondary", children: "No matches." }) : shownOptions.map((opt) => {
2927
+ /* @__PURE__ */ jsx27("div", { className: cx8("flex flex-col gap-0.5", searchable && "max-h-60 overflow-y-auto"), children: shownOptions.length === 0 ? /* @__PURE__ */ jsx27("p", { className: "px-2 py-3 text-center text-xs text-text-secondary", children: "No matches." }) : shownOptions.map((opt) => {
2844
2928
  const on = active.has(opt);
2845
- return /* @__PURE__ */ jsxs24(
2929
+ return /* @__PURE__ */ jsxs25(
2846
2930
  "label",
2847
2931
  {
2848
- className: "flex cursor-pointer items-center gap-2 rounded-control px-2 py-1.5 text-[13px] text-text-primary hover:bg-subtle",
2932
+ className: "flex cursor-pointer items-center gap-2 rounded-control px-2 py-1.5 text-dense text-text-primary hover:bg-subtle",
2849
2933
  children: [
2850
- /* @__PURE__ */ jsx26(
2934
+ /* @__PURE__ */ jsx27(
2851
2935
  CheckBox,
2852
2936
  {
2853
2937
  checked: on,
@@ -2878,7 +2962,7 @@ function gridForColumns(columns) {
2878
2962
 
2879
2963
  // src/PublisherBreakdownList.tsx
2880
2964
  import { useState as useState10 } from "react";
2881
- import { jsx as jsx27, jsxs as jsxs25 } from "react/jsx-runtime";
2965
+ import { jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
2882
2966
  function cx9(...parts) {
2883
2967
  return parts.filter(Boolean).join(" ");
2884
2968
  }
@@ -2893,7 +2977,7 @@ function initials(name) {
2893
2977
  return name.replace(/[^a-zA-Z0-9]/g, "").slice(0, 2).toUpperCase();
2894
2978
  }
2895
2979
  function Monogram({ name, size = 28 }) {
2896
- return /* @__PURE__ */ jsx27(
2980
+ return /* @__PURE__ */ jsx28(
2897
2981
  "span",
2898
2982
  {
2899
2983
  "aria-hidden": "true",
@@ -2904,12 +2988,12 @@ function Monogram({ name, size = 28 }) {
2904
2988
  );
2905
2989
  }
2906
2990
  function BreakdownTag({ children }) {
2907
- return /* @__PURE__ */ jsx27("span", { className: "inline-flex items-center whitespace-nowrap rounded-full bg-subtle px-2 py-0.5 text-[11px] font-medium text-text-secondary", children });
2991
+ return /* @__PURE__ */ jsx28("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 });
2908
2992
  }
2909
2993
  function DelayedTip({ label, children }) {
2910
- return /* @__PURE__ */ jsxs25("span", { className: "group/dt relative inline-flex", tabIndex: 0, "aria-label": label, children: [
2994
+ return /* @__PURE__ */ jsxs26("span", { className: "group/dt relative inline-flex", tabIndex: 0, "aria-label": label, children: [
2911
2995
  children,
2912
- /* @__PURE__ */ jsx27(
2996
+ /* @__PURE__ */ jsx28(
2913
2997
  "span",
2914
2998
  {
2915
2999
  role: "tooltip",
@@ -2923,22 +3007,22 @@ var COL_CURRENT = 76;
2923
3007
  var COL_PREVIOUS = 76;
2924
3008
  var COL_YOY = 44;
2925
3009
  function MetricListHeader({ className }) {
2926
- return /* @__PURE__ */ jsxs25("div", { className: cx9("flex items-baseline gap-2 pb-2", className), children: [
2927
- /* @__PURE__ */ jsx27("span", { className: "flex-1" }),
2928
- /* @__PURE__ */ jsxs25("span", { className: "flex shrink-0 items-center gap-2 pr-1.5", children: [
2929
- /* @__PURE__ */ jsx27("span", { className: "text-right text-[11px] font-medium text-text-tertiary", style: { width: COL_CURRENT }, children: "Current" }),
2930
- /* @__PURE__ */ jsx27(DelayedTip, { label: "Spend during the same time period one year ago.", children: /* @__PURE__ */ jsx27("span", { className: "text-right text-[11px] font-medium text-text-tertiary", style: { width: COL_PREVIOUS }, children: "Previous" }) }),
2931
- /* @__PURE__ */ jsx27(DelayedTip, { label: "Percent change from this time period vs. the same time one year ago.", children: /* @__PURE__ */ jsx27("span", { className: "text-right text-[11px] font-medium text-text-tertiary", style: { width: COL_YOY }, children: "YoY" }) })
3010
+ return /* @__PURE__ */ jsxs26("div", { className: cx9("flex items-baseline gap-2 pb-2", className), children: [
3011
+ /* @__PURE__ */ jsx28("span", { className: "flex-1" }),
3012
+ /* @__PURE__ */ jsxs26("span", { className: "flex shrink-0 items-center gap-2 pr-1.5", children: [
3013
+ /* @__PURE__ */ jsx28("span", { className: "text-right text-[11px] font-medium text-text-tertiary", style: { width: COL_CURRENT }, children: "Current" }),
3014
+ /* @__PURE__ */ jsx28(DelayedTip, { label: "Spend during the same time period one year ago.", children: /* @__PURE__ */ jsx28("span", { className: "text-right text-[11px] font-medium text-text-tertiary", style: { width: COL_PREVIOUS }, children: "Previous" }) }),
3015
+ /* @__PURE__ */ jsx28(DelayedTip, { label: "Percent change from this time period vs. the same time one year ago.", children: /* @__PURE__ */ jsx28("span", { className: "text-right text-[11px] font-medium text-text-tertiary", style: { width: COL_YOY }, children: "YoY" }) })
2932
3016
  ] })
2933
3017
  ] });
2934
3018
  }
2935
3019
  function MetricCells({ spendN, yoy }) {
2936
3020
  const prior = priorYearAmt(spendN, yoy);
2937
3021
  const up = yoy !== "NEW" && yoy >= 0;
2938
- return /* @__PURE__ */ jsxs25("span", { className: "flex shrink-0 items-center gap-2 pr-1.5", children: [
2939
- /* @__PURE__ */ jsx27("span", { className: "text-right text-[12px] font-bold tabular-nums text-text-primary", style: { width: COL_CURRENT }, children: fmtM(spendN) }),
2940
- /* @__PURE__ */ jsx27("span", { className: "text-right text-[12px] font-normal tabular-nums text-text-primary", style: { width: COL_PREVIOUS }, children: prior ?? "\u2014" }),
2941
- /* @__PURE__ */ jsx27("span", { className: "flex justify-end", style: { width: COL_YOY }, children: yoy === "NEW" ? /* @__PURE__ */ jsx27("span", { className: "rounded-full bg-status-warning/15 px-1.5 text-badge font-semibold text-text-warning", children: "NEW" }) : /* @__PURE__ */ jsxs25("span", { className: cx9("text-right text-[12px] font-semibold tabular-nums", up ? "text-text-success" : "text-text-danger"), children: [
3022
+ return /* @__PURE__ */ jsxs26("span", { className: "flex shrink-0 items-center gap-2 pr-1.5", children: [
3023
+ /* @__PURE__ */ jsx28("span", { className: "text-right text-[12px] font-bold tabular-nums text-text-primary", style: { width: COL_CURRENT }, children: fmtM(spendN) }),
3024
+ /* @__PURE__ */ jsx28("span", { className: "text-right text-[12px] font-normal tabular-nums text-text-primary", style: { width: COL_PREVIOUS }, children: prior ?? "\u2014" }),
3025
+ /* @__PURE__ */ jsx28("span", { className: "flex justify-end", style: { width: COL_YOY }, children: yoy === "NEW" ? /* @__PURE__ */ jsx28("span", { className: "rounded-full bg-status-warning/15 px-1.5 text-badge font-semibold text-text-warning", children: "NEW" }) : /* @__PURE__ */ jsxs26("span", { className: cx9("text-right text-[12px] font-semibold tabular-nums", up ? "text-text-success" : "text-text-danger"), children: [
2942
3026
  up ? "+" : "\u2212",
2943
3027
  Math.abs(yoy),
2944
3028
  "%"
@@ -2949,35 +3033,35 @@ function PublisherBreakdownList({ rows, defaultVisibleCount = 10, padded = true,
2949
3033
  const [showAll, setShowAll] = useState10(false);
2950
3034
  const visible = showAll ? rows : rows.slice(0, defaultVisibleCount);
2951
3035
  const rowPad = padded ? "px-5" : "";
2952
- return /* @__PURE__ */ jsxs25("div", { className: "flex flex-col", children: [
2953
- /* @__PURE__ */ jsxs25("div", { className: "flex flex-col", children: [
2954
- /* @__PURE__ */ jsx27(MetricListHeader, { className: rowPad }),
2955
- visible.map((p) => /* @__PURE__ */ jsxs25("div", { className: cx9("flex items-center justify-between gap-3 border-t border-border-default/60 py-2.5 first:border-t-0", rowPad), children: [
2956
- /* @__PURE__ */ jsxs25("div", { className: "flex min-w-0 items-center gap-2.5", children: [
2957
- renderLogo ? renderLogo(p) : /* @__PURE__ */ jsx27(Monogram, { name: p.brand, size: 28 }),
2958
- /* @__PURE__ */ jsxs25("div", { className: "min-w-0", children: [
2959
- /* @__PURE__ */ jsxs25("div", { className: "flex flex-wrap items-center gap-1.5", children: [
2960
- /* @__PURE__ */ jsx27("span", { className: "text-[14px] font-semibold text-text-primary", children: p.brand }),
2961
- p.tags.map((t) => /* @__PURE__ */ jsx27(BreakdownTag, { children: t }, t))
3036
+ return /* @__PURE__ */ jsxs26("div", { className: "flex flex-col", children: [
3037
+ /* @__PURE__ */ jsxs26("div", { className: "flex flex-col", children: [
3038
+ /* @__PURE__ */ jsx28(MetricListHeader, { className: rowPad }),
3039
+ visible.map((p) => /* @__PURE__ */ jsxs26("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: [
3040
+ /* @__PURE__ */ jsxs26("div", { className: "flex min-w-0 items-center gap-2.5", children: [
3041
+ renderLogo ? renderLogo(p) : /* @__PURE__ */ jsx28(Monogram, { name: p.brand, size: 28 }),
3042
+ /* @__PURE__ */ jsxs26("div", { className: "min-w-0", children: [
3043
+ /* @__PURE__ */ jsxs26("div", { className: "flex flex-wrap items-center gap-1.5", children: [
3044
+ /* @__PURE__ */ jsx28("span", { className: "text-[14px] font-semibold text-text-primary", children: p.brand }),
3045
+ p.tags.map((t) => /* @__PURE__ */ jsx28(BreakdownTag, { children: t }, t))
2962
3046
  ] }),
2963
- /* @__PURE__ */ jsx27("div", { className: "truncate text-[11.5px] text-text-tertiary", children: p.owner })
3047
+ /* @__PURE__ */ jsx28("div", { className: "truncate text-[11.5px] text-text-tertiary", children: p.owner })
2964
3048
  ] })
2965
3049
  ] }),
2966
- /* @__PURE__ */ jsx27(MetricCells, { spendN: p.spendN, yoy: p.yoy })
3050
+ /* @__PURE__ */ jsx28(MetricCells, { spendN: p.spendN, yoy: p.yoy })
2967
3051
  ] }, p.brand))
2968
3052
  ] }),
2969
- rows.length > defaultVisibleCount && (viewAllHref ? /* @__PURE__ */ jsx27("div", { className: cx9("border-t border-border-default py-3", rowPad), children: /* @__PURE__ */ jsx27("a", { href: viewAllHref, className: "text-[12px] font-semibold text-text-link hover:underline", children: "See all publishers" }) }) : /* @__PURE__ */ jsxs25("div", { className: cx9("flex items-center gap-2 border-t border-border-default py-3 text-[12px] text-text-tertiary", rowPad), children: [
2970
- /* @__PURE__ */ jsxs25("span", { children: [
3053
+ rows.length > defaultVisibleCount && (viewAllHref ? /* @__PURE__ */ jsx28("div", { className: cx9("border-t border-border-default py-3", rowPad), children: /* @__PURE__ */ jsx28("a", { href: viewAllHref, className: "text-[12px] font-semibold text-text-link hover:underline", children: "See all publishers" }) }) : /* @__PURE__ */ jsxs26("div", { className: cx9("flex items-center gap-2 border-t border-border-default py-3 text-[12px] text-text-tertiary", rowPad), children: [
3054
+ /* @__PURE__ */ jsxs26("span", { children: [
2971
3055
  "Showing ",
2972
3056
  visible.length,
2973
3057
  " of ",
2974
3058
  rows.length
2975
3059
  ] }),
2976
- !showAll ? /* @__PURE__ */ jsxs25("button", { type: "button", onClick: () => setShowAll(true), className: "font-semibold text-text-link hover:underline", children: [
3060
+ !showAll ? /* @__PURE__ */ jsxs26("button", { type: "button", onClick: () => setShowAll(true), className: "font-semibold text-text-link hover:underline", children: [
2977
3061
  "See all (",
2978
3062
  rows.length - defaultVisibleCount,
2979
3063
  " more)"
2980
- ] }) : /* @__PURE__ */ jsx27("button", { type: "button", onClick: () => setShowAll(false), className: "font-semibold text-text-link hover:underline", children: "Show less" })
3064
+ ] }) : /* @__PURE__ */ jsx28("button", { type: "button", onClick: () => setShowAll(false), className: "font-semibold text-text-link hover:underline", children: "Show less" })
2981
3065
  ] }))
2982
3066
  ] });
2983
3067
  }
@@ -2987,7 +3071,7 @@ import { forwardRef as forwardRef2 } from "react";
2987
3071
  import { Slot } from "@radix-ui/react-slot";
2988
3072
  import { cva } from "class-variance-authority";
2989
3073
  import { Loader2 as Loader22 } from "lucide-react";
2990
- import { jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
3074
+ import { jsx as jsx29, jsxs as jsxs27 } from "react/jsx-runtime";
2991
3075
  var buttonVariants = cva(
2992
3076
  "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-control transition-all duration-(--mr-motion-duration-interactive) ease-interactive disabled:pointer-events-none disabled:opacity-40 focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus",
2993
3077
  {
@@ -3057,10 +3141,10 @@ var Button = forwardRef2(
3057
3141
  ...props
3058
3142
  };
3059
3143
  if (asChild) {
3060
- return /* @__PURE__ */ jsx28(Slot, { ref, ...shared, children });
3144
+ return /* @__PURE__ */ jsx29(Slot, { ref, ...shared, children });
3061
3145
  }
3062
- return /* @__PURE__ */ jsxs26("button", { ref, ...shared, children: [
3063
- loading && /* @__PURE__ */ jsx28(Loader22, { className: "size-4 shrink-0 animate-spin", "aria-hidden": "true" }),
3146
+ return /* @__PURE__ */ jsxs27("button", { ref, ...shared, children: [
3147
+ loading && /* @__PURE__ */ jsx29(Loader22, { className: "size-4 shrink-0 animate-spin", "aria-hidden": "true" }),
3064
3148
  children
3065
3149
  ] });
3066
3150
  }
@@ -3068,14 +3152,14 @@ var Button = forwardRef2(
3068
3152
  Button.displayName = "Button";
3069
3153
 
3070
3154
  // src/FilterDropdownFooter.tsx
3071
- import { jsx as jsx29, jsxs as jsxs27 } from "react/jsx-runtime";
3155
+ import { jsx as jsx30, jsxs as jsxs28 } from "react/jsx-runtime";
3072
3156
  function FilterDropdownFooter({
3073
3157
  onClear,
3074
3158
  onApply,
3075
3159
  clearLabel = "Clear all",
3076
3160
  applyLabel = "Apply"
3077
3161
  }) {
3078
- return /* @__PURE__ */ jsxs27(
3162
+ return /* @__PURE__ */ jsxs28(
3079
3163
  "div",
3080
3164
  {
3081
3165
  className: cn(
@@ -3083,17 +3167,17 @@ function FilterDropdownFooter({
3083
3167
  onClear ? "justify-between" : "justify-end"
3084
3168
  ),
3085
3169
  children: [
3086
- onClear && /* @__PURE__ */ jsx29(Button, { type: "button", variant: "ghost", size: "sm", onClick: onClear, children: clearLabel }),
3087
- /* @__PURE__ */ jsx29(Button, { type: "button", variant: "primary", size: "sm", onClick: onApply, children: applyLabel })
3170
+ onClear && /* @__PURE__ */ jsx30(Button, { type: "button", variant: "ghost", size: "sm", onClick: onClear, children: clearLabel }),
3171
+ /* @__PURE__ */ jsx30(Button, { type: "button", variant: "primary", size: "sm", onClick: onApply, children: applyLabel })
3088
3172
  ]
3089
3173
  }
3090
3174
  );
3091
3175
  }
3092
3176
 
3093
3177
  // src/NameListModal.tsx
3094
- import { useEffect as useEffect10, useId as useId5, useRef as useRef11, useState as useState11 } from "react";
3178
+ import { useEffect as useEffect10, useId as useId5, useRef as useRef12, useState as useState11 } from "react";
3095
3179
  import { createPortal as createPortal5 } from "react-dom";
3096
- import { jsx as jsx30, jsxs as jsxs28 } from "react/jsx-runtime";
3180
+ import { jsx as jsx31, jsxs as jsxs29 } from "react/jsx-runtime";
3097
3181
  function NameListModal({
3098
3182
  title,
3099
3183
  initialName,
@@ -3109,7 +3193,7 @@ function NameListModal({
3109
3193
  () => Object.fromEntries((options ?? []).map((o) => [o.key, !!o.initial]))
3110
3194
  );
3111
3195
  const toggle = (key) => setChecked((c) => ({ ...c, [key]: !c[key] }));
3112
- const dialogRef = useRef11(null);
3196
+ const dialogRef = useRef12(null);
3113
3197
  const titleId = useId5();
3114
3198
  const fieldId = useId5();
3115
3199
  useEffect10(() => {
@@ -3145,12 +3229,12 @@ function NameListModal({
3145
3229
  // bg-scrim, not a literal: design-tokens gained a scrim token in 2.5.0.
3146
3230
  // No in-data-[theme=dark] override needed any more -- the token redefines
3147
3231
  // itself under that attribute in dark.css, so one class covers both themes.
3148
- /* @__PURE__ */ jsx30(
3232
+ /* @__PURE__ */ jsx31(
3149
3233
  "div",
3150
3234
  {
3151
3235
  className: "fixed inset-0 z-modal flex items-center justify-center bg-scrim px-4",
3152
3236
  onMouseDown: (e) => e.target === e.currentTarget && onCancel(),
3153
- children: /* @__PURE__ */ jsxs28(
3237
+ children: /* @__PURE__ */ jsxs29(
3154
3238
  "div",
3155
3239
  {
3156
3240
  ref: dialogRef,
@@ -3160,10 +3244,10 @@ function NameListModal({
3160
3244
  onKeyDown: trapTab,
3161
3245
  className: "w-full max-w-110 rounded-card border border-border-default bg-surface p-5 shadow-overlay",
3162
3246
  children: [
3163
- /* @__PURE__ */ jsx30("h2", { id: titleId, className: "text-[16px] font-semibold text-text-primary", children: title }),
3164
- /* @__PURE__ */ jsxs28("div", { className: "mt-4 flex flex-col gap-1.5", children: [
3165
- /* @__PURE__ */ jsx30("label", { htmlFor: fieldId, className: "text-[12px] font-medium text-text-secondary", children: fieldLabel }),
3166
- /* @__PURE__ */ jsx30(
3247
+ /* @__PURE__ */ jsx31("h2", { id: titleId, className: "text-[16px] font-semibold text-text-primary", children: title }),
3248
+ /* @__PURE__ */ jsxs29("div", { className: "mt-4 flex flex-col gap-1.5", children: [
3249
+ /* @__PURE__ */ jsx31("label", { htmlFor: fieldId, className: "text-[12px] font-medium text-text-secondary", children: fieldLabel }),
3250
+ /* @__PURE__ */ jsx31(
3167
3251
  "input",
3168
3252
  {
3169
3253
  id: fieldId,
@@ -3175,13 +3259,13 @@ function NameListModal({
3175
3259
  }
3176
3260
  )
3177
3261
  ] }),
3178
- options && options.length > 0 && /* @__PURE__ */ jsx30("div", { className: "mt-4 flex flex-col gap-2.5", children: options.map((o) => /* @__PURE__ */ jsxs28("label", { className: "flex cursor-pointer items-center gap-2.5 text-[13px] text-text-primary", children: [
3179
- /* @__PURE__ */ jsx30(CheckBox, { checked: !!checked[o.key], onChange: () => toggle(o.key), ariaLabel: o.label }),
3262
+ options && options.length > 0 && /* @__PURE__ */ jsx31("div", { className: "mt-4 flex flex-col gap-2.5", children: options.map((o) => /* @__PURE__ */ jsxs29("label", { className: "flex cursor-pointer items-center gap-2.5 text-[13px] text-text-primary", children: [
3263
+ /* @__PURE__ */ jsx31(CheckBox, { checked: !!checked[o.key], onChange: () => toggle(o.key), ariaLabel: o.label }),
3180
3264
  o.label
3181
3265
  ] }, o.key)) }),
3182
- /* @__PURE__ */ jsxs28("div", { className: "mt-5 flex items-center justify-end gap-2", children: [
3183
- /* @__PURE__ */ jsx30(Button, { variant: "secondary", onClick: onCancel, children: "Cancel" }),
3184
- /* @__PURE__ */ jsx30(Button, { disabled: !name.trim(), onClick: () => onSubmit(name.trim(), checked), children: submitLabel })
3266
+ /* @__PURE__ */ jsxs29("div", { className: "mt-5 flex items-center justify-end gap-2", children: [
3267
+ /* @__PURE__ */ jsx31(Button, { variant: "secondary", onClick: onCancel, children: "Cancel" }),
3268
+ /* @__PURE__ */ jsx31(Button, { disabled: !name.trim(), onClick: () => onSubmit(name.trim(), checked), children: submitLabel })
3185
3269
  ] })
3186
3270
  ]
3187
3271
  }
@@ -3194,11 +3278,11 @@ function NameListModal({
3194
3278
 
3195
3279
  // src/FilterChipBar.tsx
3196
3280
  import { CircleSlash, X as X4 } from "lucide-react";
3197
- import { jsx as jsx31, jsxs as jsxs29 } from "react/jsx-runtime";
3281
+ import { jsx as jsx32, jsxs as jsxs30 } from "react/jsx-runtime";
3198
3282
  function FilterChipBar({ chips, onRemove, onClearAll, parkedKeys }) {
3199
3283
  if (chips.length === 0) return null;
3200
- return /* @__PURE__ */ jsxs29("div", { className: "flex flex-wrap items-center gap-1.5 border-t border-border-default pt-2.5", children: [
3201
- chips.map((c) => /* @__PURE__ */ jsx31(
3284
+ return /* @__PURE__ */ jsxs30("div", { className: "flex flex-wrap items-center gap-1.5 border-t border-border-default pt-2.5", children: [
3285
+ chips.map((c) => /* @__PURE__ */ jsx32(
3202
3286
  Chip,
3203
3287
  {
3204
3288
  label: c.label,
@@ -3208,7 +3292,7 @@ function FilterChipBar({ chips, onRemove, onClearAll, parkedKeys }) {
3208
3292
  },
3209
3293
  c.key
3210
3294
  )),
3211
- /* @__PURE__ */ jsx31("button", { type: "button", onClick: onClearAll, className: "ml-1 text-[12px] font-medium text-text-link hover:underline", children: "Clear all" })
3295
+ /* @__PURE__ */ jsx32("button", { type: "button", onClick: onClearAll, className: "ml-1 text-[12px] font-medium text-text-link hover:underline", children: "Clear all" })
3212
3296
  ] });
3213
3297
  }
3214
3298
  function Chip({
@@ -3217,8 +3301,8 @@ function Chip({
3217
3301
  parked,
3218
3302
  onRemove
3219
3303
  }) {
3220
- return /* @__PURE__ */ jsxs29("span", { className: "group relative inline-flex", children: [
3221
- /* @__PURE__ */ jsxs29(
3304
+ return /* @__PURE__ */ jsxs30("span", { className: "group relative inline-flex", children: [
3305
+ /* @__PURE__ */ jsxs30(
3222
3306
  "span",
3223
3307
  {
3224
3308
  className: cn(
@@ -3230,22 +3314,22 @@ function Chip({
3230
3314
  ) : "bg-subtle text-text-secondary ring-transparent group-hover:bg-border-default group-hover:text-text-primary group-hover:ring-border-interactive"
3231
3315
  ),
3232
3316
  children: [
3233
- parked && /* @__PURE__ */ jsx31(CircleSlash, { size: 11, "aria-hidden": "true", className: "shrink-0 text-text-tertiary" }),
3317
+ parked && /* @__PURE__ */ jsx32(CircleSlash, { size: 11, "aria-hidden": "true", className: "shrink-0 text-text-tertiary" }),
3234
3318
  label,
3235
- /* @__PURE__ */ jsx31(
3319
+ /* @__PURE__ */ jsx32(
3236
3320
  "button",
3237
3321
  {
3238
3322
  type: "button",
3239
3323
  onClick: onRemove,
3240
3324
  "aria-label": `Remove ${groupLabel}: ${label}`,
3241
3325
  className: "text-text-tertiary transition-colors hover:text-text-primary",
3242
- children: /* @__PURE__ */ jsx31(X4, { size: 12 })
3326
+ children: /* @__PURE__ */ jsx32(X4, { size: 12 })
3243
3327
  }
3244
3328
  )
3245
3329
  ]
3246
3330
  }
3247
3331
  ),
3248
- /* @__PURE__ */ jsx31(
3332
+ /* @__PURE__ */ jsx32(
3249
3333
  "span",
3250
3334
  {
3251
3335
  role: "tooltip",
@@ -3258,7 +3342,7 @@ function Chip({
3258
3342
 
3259
3343
  // src/SortButton.tsx
3260
3344
  import { ArrowUp, ArrowDown, ArrowUpDown } from "lucide-react";
3261
- import { jsx as jsx32, jsxs as jsxs30 } from "react/jsx-runtime";
3345
+ import { jsx as jsx33, jsxs as jsxs31 } from "react/jsx-runtime";
3262
3346
  var ALIGN = {
3263
3347
  left: "justify-start text-left",
3264
3348
  center: "justify-center text-center",
@@ -3274,9 +3358,9 @@ function SortButton({
3274
3358
  align = "left",
3275
3359
  testIdPrefix
3276
3360
  }) {
3277
- if (!sortable) return /* @__PURE__ */ jsx32("span", { className: cn("inline-flex", ALIGN[align]), children: label });
3361
+ if (!sortable) return /* @__PURE__ */ jsx33("span", { className: cn("inline-flex", ALIGN[align]), children: label });
3278
3362
  const active = !disabled && sort.key === sortKey;
3279
- return /* @__PURE__ */ jsxs30(
3363
+ return /* @__PURE__ */ jsxs31(
3280
3364
  "button",
3281
3365
  {
3282
3366
  type: "button",
@@ -3305,7 +3389,7 @@ function SortButton({
3305
3389
  ),
3306
3390
  children: [
3307
3391
  label,
3308
- !disabled && (active ? sort.dir === "asc" ? /* @__PURE__ */ jsx32(ArrowUp, { size: 12, "aria-hidden": "true", className: "shrink-0 text-brand-primaryAction" }) : /* @__PURE__ */ jsx32(ArrowDown, { size: 12, "aria-hidden": "true", className: "shrink-0 text-brand-primaryAction" }) : /* @__PURE__ */ jsx32(
3392
+ !disabled && (active ? sort.dir === "asc" ? /* @__PURE__ */ jsx33(ArrowUp, { size: 12, "aria-hidden": "true", className: "shrink-0 text-brand-primaryAction" }) : /* @__PURE__ */ jsx33(ArrowDown, { size: 12, "aria-hidden": "true", className: "shrink-0 text-brand-primaryAction" }) : /* @__PURE__ */ jsx33(
3309
3393
  ArrowUpDown,
3310
3394
  {
3311
3395
  size: 12,
@@ -3334,7 +3418,7 @@ function ariaSortFor(sort, key) {
3334
3418
 
3335
3419
  // src/Pager.tsx
3336
3420
  import { ChevronLeft as ChevronLeft3, ChevronRight as ChevronRight4 } from "lucide-react";
3337
- import { jsx as jsx33, jsxs as jsxs31 } from "react/jsx-runtime";
3421
+ import { jsx as jsx34, jsxs as jsxs32 } from "react/jsx-runtime";
3338
3422
  function pageWindow(current, total) {
3339
3423
  if (total <= 7) return Array.from({ length: total }, (_, i) => i + 1);
3340
3424
  const keep = /* @__PURE__ */ new Set([1, total, current, current - 1, current + 1]);
@@ -3350,8 +3434,8 @@ function pageWindow(current, total) {
3350
3434
  }
3351
3435
  function Pager({ page, totalPages, onPage, disabled = false, label = "Pagination" }) {
3352
3436
  const btn = "flex h-8 min-w-8 items-center justify-center rounded-control px-2 text-[13px] transition-colors disabled:pointer-events-none disabled:opacity-30";
3353
- return /* @__PURE__ */ jsxs31("nav", { "aria-label": label, className: "flex items-center gap-1", children: [
3354
- /* @__PURE__ */ jsx33(
3437
+ return /* @__PURE__ */ jsxs32("nav", { "aria-label": label, className: "flex items-center gap-1", children: [
3438
+ /* @__PURE__ */ jsx34(
3355
3439
  "button",
3356
3440
  {
3357
3441
  type: "button",
@@ -3359,11 +3443,11 @@ function Pager({ page, totalPages, onPage, disabled = false, label = "Pagination
3359
3443
  disabled: disabled || page === 1,
3360
3444
  "aria-label": "Previous page",
3361
3445
  className: cn(btn, "text-text-secondary hover:bg-subtle hover:text-text-primary"),
3362
- children: /* @__PURE__ */ jsx33(ChevronLeft3, { size: 16 })
3446
+ children: /* @__PURE__ */ jsx34(ChevronLeft3, { size: 16 })
3363
3447
  }
3364
3448
  ),
3365
3449
  pageWindow(page, totalPages).map(
3366
- (p) => typeof p === "string" ? /* @__PURE__ */ jsx33("span", { className: "px-1 text-[13px] text-text-tertiary", children: "\u2026" }, p) : /* @__PURE__ */ jsx33(
3450
+ (p) => typeof p === "string" ? /* @__PURE__ */ jsx34("span", { className: "px-1 text-[13px] text-text-tertiary", children: "\u2026" }, p) : /* @__PURE__ */ jsx34(
3367
3451
  "button",
3368
3452
  {
3369
3453
  type: "button",
@@ -3379,7 +3463,7 @@ function Pager({ page, totalPages, onPage, disabled = false, label = "Pagination
3379
3463
  p
3380
3464
  )
3381
3465
  ),
3382
- /* @__PURE__ */ jsx33(
3466
+ /* @__PURE__ */ jsx34(
3383
3467
  "button",
3384
3468
  {
3385
3469
  type: "button",
@@ -3387,14 +3471,14 @@ function Pager({ page, totalPages, onPage, disabled = false, label = "Pagination
3387
3471
  disabled: disabled || page === totalPages,
3388
3472
  "aria-label": "Next page",
3389
3473
  className: cn(btn, "text-text-secondary hover:bg-subtle hover:text-text-primary"),
3390
- children: /* @__PURE__ */ jsx33(ChevronRight4, { size: 16 })
3474
+ children: /* @__PURE__ */ jsx34(ChevronRight4, { size: 16 })
3391
3475
  }
3392
3476
  )
3393
3477
  ] });
3394
3478
  }
3395
3479
 
3396
3480
  // src/WorkspaceAvatar.tsx
3397
- import { jsx as jsx34 } from "react/jsx-runtime";
3481
+ import { jsx as jsx35 } from "react/jsx-runtime";
3398
3482
  function workspaceInitials(name) {
3399
3483
  const words = name.trim().split(/\s+/).filter(Boolean);
3400
3484
  if (words.length === 0) return "\xB7";
@@ -3413,7 +3497,7 @@ var SIZES = {
3413
3497
  lg: "h-11 w-11 text-panel-title"
3414
3498
  };
3415
3499
  function WorkspaceAvatar({ name, size = "md" }) {
3416
- return /* @__PURE__ */ jsx34(
3500
+ return /* @__PURE__ */ jsx35(
3417
3501
  "span",
3418
3502
  {
3419
3503
  "aria-hidden": "true",
@@ -3427,19 +3511,19 @@ function WorkspaceAvatar({ name, size = "md" }) {
3427
3511
  }
3428
3512
 
3429
3513
  // src/Toast.tsx
3430
- import { useEffect as useEffect11, useRef as useRef12, useState as useState12 } from "react";
3514
+ import { useEffect as useEffect11, useRef as useRef13, useState as useState12 } from "react";
3431
3515
  import { createPortal as createPortal6 } from "react-dom";
3432
3516
  import { AlertTriangle, Check as Check7 } from "lucide-react";
3433
- import { jsx as jsx35, jsxs as jsxs32 } from "react/jsx-runtime";
3517
+ import { jsx as jsx36, jsxs as jsxs33 } from "react/jsx-runtime";
3434
3518
  var ICON = {
3435
3519
  neutral: null,
3436
- success: /* @__PURE__ */ jsx35(Check7, { size: 15, className: "shrink-0", "aria-hidden": "true" }),
3437
- warning: /* @__PURE__ */ jsx35(AlertTriangle, { size: 15, className: "shrink-0", "aria-hidden": "true" })
3520
+ success: /* @__PURE__ */ jsx36(Check7, { size: 15, className: "shrink-0", "aria-hidden": "true" }),
3521
+ warning: /* @__PURE__ */ jsx36(AlertTriangle, { size: 15, className: "shrink-0", "aria-hidden": "true" })
3438
3522
  };
3439
3523
  function Toast({ message, action, onClose, tone = "neutral", duration, className }) {
3440
3524
  const ms = duration ?? (action ? 1e4 : 5e3);
3441
3525
  const [paused, setPaused] = useState12(false);
3442
- const closed = useRef12(false);
3526
+ const closed = useRef13(false);
3443
3527
  useEffect11(() => {
3444
3528
  if (paused) return;
3445
3529
  const t = window.setTimeout(() => {
@@ -3450,7 +3534,7 @@ function Toast({ message, action, onClose, tone = "neutral", duration, className
3450
3534
  return () => window.clearTimeout(t);
3451
3535
  }, [message, ms, paused]);
3452
3536
  return createPortal6(
3453
- /* @__PURE__ */ jsxs32(
3537
+ /* @__PURE__ */ jsxs33(
3454
3538
  "div",
3455
3539
  {
3456
3540
  role: "status",
@@ -3467,7 +3551,7 @@ function Toast({ message, action, onClose, tone = "neutral", duration, className
3467
3551
  children: [
3468
3552
  ICON[tone] && // The inverse pair, not text-success / text-warning: those are tuned
3469
3553
  // for the page, and on the toast's flipped surface amber drops to 2:1.
3470
- /* @__PURE__ */ jsx35(
3554
+ /* @__PURE__ */ jsx36(
3471
3555
  "span",
3472
3556
  {
3473
3557
  className: cn(
@@ -3477,8 +3561,8 @@ function Toast({ message, action, onClose, tone = "neutral", duration, className
3477
3561
  children: ICON[tone]
3478
3562
  }
3479
3563
  ),
3480
- /* @__PURE__ */ jsx35("span", { className: "min-w-0", children: message }),
3481
- action && /* @__PURE__ */ jsx35(
3564
+ /* @__PURE__ */ jsx36("span", { className: "min-w-0", children: message }),
3565
+ action && /* @__PURE__ */ jsx36(
3482
3566
  "button",
3483
3567
  {
3484
3568
  type: "button",
@@ -3500,14 +3584,14 @@ function Toast({ message, action, onClose, tone = "neutral", duration, className
3500
3584
  }
3501
3585
 
3502
3586
  // src/Tag.tsx
3503
- import { jsx as jsx36 } from "react/jsx-runtime";
3587
+ import { jsx as jsx37 } from "react/jsx-runtime";
3504
3588
  function Tag({ children, className }) {
3505
- return /* @__PURE__ */ jsx36(Badge, { kind: "category", className, children });
3589
+ return /* @__PURE__ */ jsx37(Badge, { kind: "category", className, children });
3506
3590
  }
3507
3591
 
3508
3592
  // src/TablePagination.tsx
3509
3593
  import { ChevronFirst, ChevronLast, ChevronLeft as ChevronLeft4, ChevronRight as ChevronRight5 } from "lucide-react";
3510
- import { jsx as jsx37, jsxs as jsxs33 } from "react/jsx-runtime";
3594
+ import { jsx as jsx38, jsxs as jsxs34 } from "react/jsx-runtime";
3511
3595
  function TablePagination({
3512
3596
  page,
3513
3597
  perPage,
@@ -3527,7 +3611,7 @@ function TablePagination({
3527
3611
  const btn = "flex h-8 min-w-8 items-center justify-center rounded-control px-2 text-dense transition-colors";
3528
3612
  const off = "disabled:pointer-events-none disabled:opacity-30";
3529
3613
  const stepBtn = cn(btn, "text-text-secondary hover:bg-subtle hover:text-text-primary", off);
3530
- const range = /* @__PURE__ */ jsxs33("span", { className: "text-dense text-text-tertiary tabular-nums", children: [
3614
+ const range = /* @__PURE__ */ jsxs34("span", { className: "text-dense text-text-tertiary tabular-nums", children: [
3531
3615
  rangeStart.toLocaleString(),
3532
3616
  " \u2013 ",
3533
3617
  rangeEnd.toLocaleString(),
@@ -3536,13 +3620,13 @@ function TablePagination({
3536
3620
  " ",
3537
3621
  itemLabel
3538
3622
  ] });
3539
- return /* @__PURE__ */ jsxs33("div", { className: cn("flex flex-wrap items-center justify-between gap-x-4 gap-y-2", className), "data-testid": testIdPrefix, children: [
3540
- /* @__PURE__ */ jsxs33(
3623
+ return /* @__PURE__ */ jsxs34("div", { className: cn("flex flex-wrap items-center justify-between gap-x-4 gap-y-2", className), "data-testid": testIdPrefix, children: [
3624
+ /* @__PURE__ */ jsxs34(
3541
3625
  "div",
3542
3626
  {
3543
3627
  className: cn("flex items-center gap-2 text-dense text-text-secondary", !onPerPageChange && "invisible"),
3544
3628
  children: [
3545
- /* @__PURE__ */ jsx37(
3629
+ /* @__PURE__ */ jsx38(
3546
3630
  SelectFilter,
3547
3631
  {
3548
3632
  size: "sm",
@@ -3558,8 +3642,8 @@ function TablePagination({
3558
3642
  ]
3559
3643
  }
3560
3644
  ),
3561
- /* @__PURE__ */ jsxs33("nav", { className: "flex items-center gap-1", "aria-label": "Pagination", children: [
3562
- /* @__PURE__ */ jsx37(
3645
+ /* @__PURE__ */ jsxs34("nav", { className: "flex items-center gap-1", "aria-label": "Pagination", children: [
3646
+ /* @__PURE__ */ jsx38(
3563
3647
  "button",
3564
3648
  {
3565
3649
  type: "button",
@@ -3568,10 +3652,10 @@ function TablePagination({
3568
3652
  "aria-label": "First page",
3569
3653
  "data-testid": testIdPrefix && `${testIdPrefix}-first`,
3570
3654
  className: stepBtn,
3571
- children: /* @__PURE__ */ jsx37(ChevronFirst, { size: 16, "aria-hidden": "true" })
3655
+ children: /* @__PURE__ */ jsx38(ChevronFirst, { size: 16, "aria-hidden": "true" })
3572
3656
  }
3573
3657
  ),
3574
- /* @__PURE__ */ jsx37(
3658
+ /* @__PURE__ */ jsx38(
3575
3659
  "button",
3576
3660
  {
3577
3661
  type: "button",
@@ -3580,11 +3664,11 @@ function TablePagination({
3580
3664
  "aria-label": "Previous page",
3581
3665
  "data-testid": testIdPrefix && `${testIdPrefix}-prev`,
3582
3666
  className: stepBtn,
3583
- children: /* @__PURE__ */ jsx37(ChevronLeft4, { size: 16, "aria-hidden": "true" })
3667
+ children: /* @__PURE__ */ jsx38(ChevronLeft4, { size: 16, "aria-hidden": "true" })
3584
3668
  }
3585
3669
  ),
3586
3670
  pageWindow(current, totalPages).map(
3587
- (p) => typeof p === "string" ? /* @__PURE__ */ jsx37("span", { className: "px-1 text-dense text-text-tertiary", children: "\u2026" }, p) : /* @__PURE__ */ jsx37(
3671
+ (p) => typeof p === "string" ? /* @__PURE__ */ jsx38("span", { className: "px-1 text-dense text-text-tertiary", children: "\u2026" }, p) : /* @__PURE__ */ jsx38(
3588
3672
  "button",
3589
3673
  {
3590
3674
  type: "button",
@@ -3602,7 +3686,7 @@ function TablePagination({
3602
3686
  p
3603
3687
  )
3604
3688
  ),
3605
- /* @__PURE__ */ jsx37(
3689
+ /* @__PURE__ */ jsx38(
3606
3690
  "button",
3607
3691
  {
3608
3692
  type: "button",
@@ -3611,10 +3695,10 @@ function TablePagination({
3611
3695
  "aria-label": "Next page",
3612
3696
  "data-testid": testIdPrefix && `${testIdPrefix}-next`,
3613
3697
  className: stepBtn,
3614
- children: /* @__PURE__ */ jsx37(ChevronRight5, { size: 16, "aria-hidden": "true" })
3698
+ children: /* @__PURE__ */ jsx38(ChevronRight5, { size: 16, "aria-hidden": "true" })
3615
3699
  }
3616
3700
  ),
3617
- /* @__PURE__ */ jsx37(
3701
+ /* @__PURE__ */ jsx38(
3618
3702
  "button",
3619
3703
  {
3620
3704
  type: "button",
@@ -3623,7 +3707,7 @@ function TablePagination({
3623
3707
  "aria-label": "Last page",
3624
3708
  "data-testid": testIdPrefix && `${testIdPrefix}-last`,
3625
3709
  className: stepBtn,
3626
- children: /* @__PURE__ */ jsx37(ChevronLast, { size: 16, "aria-hidden": "true" })
3710
+ children: /* @__PURE__ */ jsx38(ChevronLast, { size: 16, "aria-hidden": "true" })
3627
3711
  }
3628
3712
  )
3629
3713
  ] }),
@@ -3632,9 +3716,9 @@ function TablePagination({
3632
3716
  }
3633
3717
 
3634
3718
  // src/DateRangePicker.tsx
3635
- import { useEffect as useEffect12, useMemo as useMemo4, useRef as useRef13, useState as useState13 } from "react";
3719
+ import { useEffect as useEffect12, useMemo as useMemo4, useRef as useRef14, useState as useState13 } from "react";
3636
3720
  import { ChevronDown as ChevronDown9 } from "lucide-react";
3637
- import { jsx as jsx38, jsxs as jsxs34 } from "react/jsx-runtime";
3721
+ import { jsx as jsx39, jsxs as jsxs35 } from "react/jsx-runtime";
3638
3722
  var MONTH_ABBR = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
3639
3723
  var QUARTER_ABBR = ["Q1", "Q2", "Q3", "Q4"];
3640
3724
  var PRESETS = ["Rolling 3 months", "Rolling 6 months", "Rolling 12 months"];
@@ -3670,7 +3754,7 @@ function spanLabel2(label, today) {
3670
3754
  return `${fmtDate(s)} \u2013 ${fmtDate(e)}`;
3671
3755
  }
3672
3756
  function MiniSelect({ value, onChange, options }) {
3673
- return /* @__PURE__ */ jsx38(
3757
+ return /* @__PURE__ */ jsx39(
3674
3758
  "select",
3675
3759
  {
3676
3760
  value: String(value),
@@ -3679,7 +3763,7 @@ function MiniSelect({ value, onChange, options }) {
3679
3763
  if (opt) onChange(opt.value);
3680
3764
  },
3681
3765
  className: "rounded-control border border-border-strong bg-input px-1.5 py-1 text-[12px] text-text-primary focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
3682
- children: options.map((o) => /* @__PURE__ */ jsx38("option", { value: String(o.value), children: o.label }, String(o.value)))
3766
+ children: options.map((o) => /* @__PURE__ */ jsx39("option", { value: String(o.value), children: o.label }, String(o.value)))
3683
3767
  }
3684
3768
  );
3685
3769
  }
@@ -3699,7 +3783,7 @@ function DateRangePicker({
3699
3783
  const [open, setOpen] = useState13(false);
3700
3784
  const [value, setValue] = useState13(defaultValue);
3701
3785
  const [draft, setDraft] = useState13(defaultValue);
3702
- const ref = useRef13(null);
3786
+ const ref = useRef14(null);
3703
3787
  const [fromMo, setFromMo] = useState13(end.getMonth());
3704
3788
  const [fromYr, setFromYr] = useState13(end.getFullYear() - 1);
3705
3789
  const [toMo, setToMo] = useState13(end.getMonth());
@@ -3740,8 +3824,8 @@ function DateRangePicker({
3740
3824
  if (showFooter) setDraft(label);
3741
3825
  else commit(label);
3742
3826
  };
3743
- return /* @__PURE__ */ jsxs34("div", { className: "relative", ref, children: [
3744
- /* @__PURE__ */ jsxs34(
3827
+ return /* @__PURE__ */ jsxs35("div", { className: "relative", ref, children: [
3828
+ /* @__PURE__ */ jsxs35(
3745
3829
  "button",
3746
3830
  {
3747
3831
  type: "button",
@@ -3750,16 +3834,16 @@ function DateRangePicker({
3750
3834
  "aria-haspopup": "listbox",
3751
3835
  className: chipTriggerClass(),
3752
3836
  children: [
3753
- /* @__PURE__ */ jsxs34("span", { className: "flex flex-col gap-1 text-left leading-none", children: [
3754
- /* @__PURE__ */ jsx38("span", { className: "text-control-caption text-text-tertiary", children: spanLabel2(value, end) }),
3755
- /* @__PURE__ */ jsx38("span", { className: "text-[12px] font-medium text-text-primary", children: value })
3837
+ /* @__PURE__ */ jsxs35("span", { className: "flex flex-col gap-1 text-left leading-none", children: [
3838
+ /* @__PURE__ */ jsx39("span", { className: "text-control-caption text-text-tertiary", children: spanLabel2(value, end) }),
3839
+ /* @__PURE__ */ jsx39("span", { className: "text-[12px] font-medium text-text-primary", children: value })
3756
3840
  ] }),
3757
- /* @__PURE__ */ jsx38(ChevronDown9, { size: 14, "aria-hidden": "true", className: cn("shrink-0 text-text-secondary transition-transform", open && "rotate-180") })
3841
+ /* @__PURE__ */ jsx39(ChevronDown9, { size: 14, "aria-hidden": "true", className: cn("shrink-0 text-text-secondary transition-transform", open && "rotate-180") })
3758
3842
  ]
3759
3843
  }
3760
3844
  ),
3761
- open && /* @__PURE__ */ jsxs34("div", { className: cn("absolute top-[calc(100%+8px)] z-30 w-[280px] overflow-hidden rounded-card border border-border-default bg-surface py-1 shadow-overlay", align === "right" ? "right-0" : "left-0"), children: [
3762
- presets.map((p) => /* @__PURE__ */ jsx38(
3845
+ open && /* @__PURE__ */ jsxs35("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: [
3846
+ presets.map((p) => /* @__PURE__ */ jsx39(
3763
3847
  "button",
3764
3848
  {
3765
3849
  type: "button",
@@ -3769,26 +3853,26 @@ function DateRangePicker({
3769
3853
  },
3770
3854
  p
3771
3855
  )),
3772
- /* @__PURE__ */ jsxs34("div", { className: "mt-1 border-t border-border-default px-3 pb-2 pt-2", children: [
3773
- /* @__PURE__ */ jsx38("div", { className: "text-[13px] font-semibold text-text-primary", children: "Custom range" }),
3774
- /* @__PURE__ */ jsxs34("div", { className: "mt-2 flex flex-col gap-2", children: [
3775
- /* @__PURE__ */ jsxs34("label", { className: "flex items-center justify-between gap-2 text-[12px] text-text-secondary", children: [
3856
+ /* @__PURE__ */ jsxs35("div", { className: "mt-1 border-t border-border-default px-3 pb-2 pt-2", children: [
3857
+ /* @__PURE__ */ jsx39("div", { className: "text-[13px] font-semibold text-text-primary", children: "Custom range" }),
3858
+ /* @__PURE__ */ jsxs35("div", { className: "mt-2 flex flex-col gap-2", children: [
3859
+ /* @__PURE__ */ jsxs35("label", { className: "flex items-center justify-between gap-2 text-[12px] text-text-secondary", children: [
3776
3860
  "From",
3777
- /* @__PURE__ */ jsxs34("span", { className: "flex gap-1", children: [
3778
- granularity === "month" && /* @__PURE__ */ jsx38(MiniSelect, { value: fromMo, onChange: setFromMo, options: MONTH_ABBR.map((mm, i) => ({ label: mm, value: i })) }),
3779
- granularity === "quarter" && /* @__PURE__ */ jsx38(MiniSelect, { value: fromQ, onChange: setFromQ, options: QUARTER_ABBR.map((qq, i) => ({ label: qq, value: i })) }),
3780
- /* @__PURE__ */ jsx38(MiniSelect, { value: fromYr, onChange: setFromYr, options: yearOptions.map((y) => ({ label: String(y), value: y })) })
3861
+ /* @__PURE__ */ jsxs35("span", { className: "flex gap-1", children: [
3862
+ granularity === "month" && /* @__PURE__ */ jsx39(MiniSelect, { value: fromMo, onChange: setFromMo, options: MONTH_ABBR.map((mm, i) => ({ label: mm, value: i })) }),
3863
+ granularity === "quarter" && /* @__PURE__ */ jsx39(MiniSelect, { value: fromQ, onChange: setFromQ, options: QUARTER_ABBR.map((qq, i) => ({ label: qq, value: i })) }),
3864
+ /* @__PURE__ */ jsx39(MiniSelect, { value: fromYr, onChange: setFromYr, options: yearOptions.map((y) => ({ label: String(y), value: y })) })
3781
3865
  ] })
3782
3866
  ] }),
3783
- /* @__PURE__ */ jsxs34("label", { className: "flex items-center justify-between gap-2 text-[12px] text-text-secondary", children: [
3867
+ /* @__PURE__ */ jsxs35("label", { className: "flex items-center justify-between gap-2 text-[12px] text-text-secondary", children: [
3784
3868
  "To",
3785
- /* @__PURE__ */ jsxs34("span", { className: "flex gap-1", children: [
3786
- granularity === "month" && /* @__PURE__ */ jsx38(MiniSelect, { value: toMo, onChange: setToMo, options: MONTH_ABBR.map((mm, i) => ({ label: mm, value: i })) }),
3787
- granularity === "quarter" && /* @__PURE__ */ jsx38(MiniSelect, { value: toQ, onChange: setToQ, options: QUARTER_ABBR.map((qq, i) => ({ label: qq, value: i })) }),
3788
- /* @__PURE__ */ jsx38(MiniSelect, { value: toYr, onChange: setToYr, options: yearOptions.map((y) => ({ label: String(y), value: y })) })
3869
+ /* @__PURE__ */ jsxs35("span", { className: "flex gap-1", children: [
3870
+ granularity === "month" && /* @__PURE__ */ jsx39(MiniSelect, { value: toMo, onChange: setToMo, options: MONTH_ABBR.map((mm, i) => ({ label: mm, value: i })) }),
3871
+ granularity === "quarter" && /* @__PURE__ */ jsx39(MiniSelect, { value: toQ, onChange: setToQ, options: QUARTER_ABBR.map((qq, i) => ({ label: qq, value: i })) }),
3872
+ /* @__PURE__ */ jsx39(MiniSelect, { value: toYr, onChange: setToYr, options: yearOptions.map((y) => ({ label: String(y), value: y })) })
3789
3873
  ] })
3790
3874
  ] }),
3791
- /* @__PURE__ */ jsx38(
3875
+ /* @__PURE__ */ jsx39(
3792
3876
  "button",
3793
3877
  {
3794
3878
  type: "button",
@@ -3800,15 +3884,15 @@ function DateRangePicker({
3800
3884
  )
3801
3885
  ] })
3802
3886
  ] }),
3803
- showFooter && /* @__PURE__ */ jsx38(FilterDropdownFooter, { onApply: () => commit(draft) })
3887
+ showFooter && /* @__PURE__ */ jsx39(FilterDropdownFooter, { onApply: () => commit(draft) })
3804
3888
  ] })
3805
3889
  ] });
3806
3890
  }
3807
3891
 
3808
3892
  // src/MultiSelectFilter.tsx
3809
- import { useCallback as useCallback4, useEffect as useEffect13, useRef as useRef14, useState as useState14 } from "react";
3893
+ import { useCallback as useCallback4, useEffect as useEffect13, useRef as useRef15, useState as useState14 } from "react";
3810
3894
  import { ChevronDown as ChevronDown10, Search as Search5, X as X5 } from "lucide-react";
3811
- import { Fragment as Fragment5, jsx as jsx39, jsxs as jsxs35 } from "react/jsx-runtime";
3895
+ import { Fragment as Fragment5, jsx as jsx40, jsxs as jsxs36 } from "react/jsx-runtime";
3812
3896
  function MultiSelectFilter({
3813
3897
  caption,
3814
3898
  options = [],
@@ -3838,7 +3922,7 @@ function MultiSelectFilter({
3838
3922
  const [open, setOpen] = useState14(false);
3839
3923
  const [q, setQ] = useState14("");
3840
3924
  const [draft, setDraft] = useState14(selected);
3841
- const ref = useRef14(null);
3925
+ const ref = useRef15(null);
3842
3926
  const close = useCallback4(() => {
3843
3927
  setOpen(false);
3844
3928
  setQ("");
@@ -3902,8 +3986,8 @@ function MultiSelectFilter({
3902
3986
  const kids = live.filter((c) => c.label.toLowerCase().includes(ql));
3903
3987
  return kids.length ? { ...g, children: kids } : null;
3904
3988
  }).filter((g) => g !== null) : [];
3905
- return /* @__PURE__ */ jsxs35("div", { className: cn("relative", fullWidth && "w-full"), ref, children: [
3906
- /* @__PURE__ */ jsxs35(
3989
+ return /* @__PURE__ */ jsxs36("div", { className: cn("relative", fullWidth && "w-full"), ref, children: [
3990
+ /* @__PURE__ */ jsxs36(
3907
3991
  "button",
3908
3992
  {
3909
3993
  type: "button",
@@ -3911,8 +3995,8 @@ function MultiSelectFilter({
3911
3995
  "aria-expanded": open,
3912
3996
  className: cn(chipTriggerClass(variant), fullWidth && "w-full justify-between"),
3913
3997
  children: [
3914
- /* @__PURE__ */ jsx39(ChipContent, { caption, value, icon }),
3915
- /* @__PURE__ */ jsx39(
3998
+ /* @__PURE__ */ jsx40(ChipContent, { caption, value, icon }),
3999
+ /* @__PURE__ */ jsx40(
3916
4000
  ChevronDown10,
3917
4001
  {
3918
4002
  size: 14,
@@ -3923,7 +4007,7 @@ function MultiSelectFilter({
3923
4007
  ]
3924
4008
  }
3925
4009
  ),
3926
- open && /* @__PURE__ */ jsx39(
4010
+ open && /* @__PURE__ */ jsx40(
3927
4011
  "div",
3928
4012
  {
3929
4013
  className: cn(
@@ -3933,10 +4017,10 @@ function MultiSelectFilter({
3933
4017
  ),
3934
4018
  role: "dialog",
3935
4019
  "aria-label": caption,
3936
- children: loading ? /* @__PURE__ */ jsx39(MenuLoading, {}) : error ? /* @__PURE__ */ jsx39(MenuError, { onRetry }) : /* @__PURE__ */ jsxs35(Fragment5, { children: [
3937
- searchable && /* @__PURE__ */ jsx39("div", { className: "border-b border-border-default p-2", children: /* @__PURE__ */ jsxs35("div", { className: "flex h-8 items-center gap-2 rounded-control border border-border-strong bg-input px-2.5 focus-within:outline-2 focus-within:outline-offset-1 focus-within:outline-border-focus", children: [
3938
- /* @__PURE__ */ jsx39(Search5, { size: 14, className: "text-text-secondary", "aria-hidden": "true" }),
3939
- /* @__PURE__ */ jsx39(
4020
+ children: loading ? /* @__PURE__ */ jsx40(MenuLoading, {}) : error ? /* @__PURE__ */ jsx40(MenuError, { onRetry }) : /* @__PURE__ */ jsxs36(Fragment5, { children: [
4021
+ searchable && /* @__PURE__ */ jsx40("div", { className: "border-b border-border-default p-2", children: /* @__PURE__ */ jsxs36("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: [
4022
+ /* @__PURE__ */ jsx40(Search5, { size: 14, className: "text-text-secondary", "aria-hidden": "true" }),
4023
+ /* @__PURE__ */ jsx40(
3940
4024
  "input",
3941
4025
  {
3942
4026
  type: "text",
@@ -3946,37 +4030,37 @@ function MultiSelectFilter({
3946
4030
  className: "h-full flex-1 bg-transparent text-[13px] outline-hidden placeholder:text-text-tertiary"
3947
4031
  }
3948
4032
  ),
3949
- q && /* @__PURE__ */ jsx39("button", { type: "button", onClick: () => setQ(""), "aria-label": "Clear search", className: "text-text-tertiary hover:text-text-primary", children: /* @__PURE__ */ jsx39(X5, { size: 13 }) })
4033
+ q && /* @__PURE__ */ jsx40("button", { type: "button", onClick: () => setQ(""), "aria-label": "Clear search", className: "text-text-tertiary hover:text-text-primary", children: /* @__PURE__ */ jsx40(X5, { size: 13 }) })
3950
4034
  ] }) }),
3951
- /* @__PURE__ */ jsxs35("div", { className: "max-h-[280px] overflow-y-auto p-1", children: [
4035
+ /* @__PURE__ */ jsxs36("div", { className: "max-h-[280px] overflow-y-auto p-1", children: [
3952
4036
  groups ? visibleGroups.map((g) => {
3953
4037
  const state = groupState(g);
3954
- return /* @__PURE__ */ jsxs35("div", { children: [
3955
- /* @__PURE__ */ jsxs35(
4038
+ return /* @__PURE__ */ jsxs36("div", { children: [
4039
+ /* @__PURE__ */ jsxs36(
3956
4040
  "button",
3957
4041
  {
3958
4042
  type: "button",
3959
4043
  onClick: () => toggleGroup(g),
3960
4044
  className: "flex w-full items-center gap-2.5 rounded-control px-2 py-2 text-left transition-colors hover:bg-subtle",
3961
4045
  children: [
3962
- /* @__PURE__ */ jsx39(CheckBoxBox, { checked: state === "all", indeterminate: state === "some" }),
3963
- /* @__PURE__ */ jsx39("span", { className: cn("flex-1 text-[14px] text-text-primary", !plainParent && "font-semibold"), children: g.label }),
3964
- counts && /* @__PURE__ */ jsx39(OptionCount, { n: countFor(g.id) })
4046
+ /* @__PURE__ */ jsx40(CheckBoxBox, { checked: state === "all", indeterminate: state === "some" }),
4047
+ /* @__PURE__ */ jsx40("span", { className: cn("flex-1 text-[14px] text-text-primary", !plainParent && "font-semibold"), children: g.label }),
4048
+ counts && /* @__PURE__ */ jsx40(OptionCount, { n: countFor(g.id) })
3965
4049
  ]
3966
4050
  }
3967
4051
  ),
3968
4052
  g.children.map((c) => {
3969
4053
  const checked = draft.includes(c.id);
3970
- return /* @__PURE__ */ jsxs35(
4054
+ return /* @__PURE__ */ jsxs36(
3971
4055
  "button",
3972
4056
  {
3973
4057
  type: "button",
3974
4058
  onClick: () => toggle(c.id),
3975
4059
  className: "flex w-full items-center gap-2.5 rounded-control py-2 pl-9 pr-2 text-left transition-colors hover:bg-subtle",
3976
4060
  children: [
3977
- /* @__PURE__ */ jsx39(CheckBoxBox, { checked }),
3978
- /* @__PURE__ */ jsx39("span", { className: "flex-1 text-[14px] text-text-primary", children: c.label }),
3979
- counts && /* @__PURE__ */ jsx39(OptionCount, { n: countFor(c.id) })
4061
+ /* @__PURE__ */ jsx40(CheckBoxBox, { checked }),
4062
+ /* @__PURE__ */ jsx40("span", { className: "flex-1 text-[14px] text-text-primary", children: c.label }),
4063
+ counts && /* @__PURE__ */ jsx40(OptionCount, { n: countFor(c.id) })
3980
4064
  ]
3981
4065
  },
3982
4066
  c.id
@@ -3985,24 +4069,24 @@ function MultiSelectFilter({
3985
4069
  ] }, g.id);
3986
4070
  }) : items.map((o) => {
3987
4071
  const checked = draft.includes(o.id);
3988
- return /* @__PURE__ */ jsxs35(
4072
+ return /* @__PURE__ */ jsxs36(
3989
4073
  "button",
3990
4074
  {
3991
4075
  type: "button",
3992
4076
  onClick: () => toggle(o.id),
3993
4077
  className: "flex w-full items-center gap-2.5 rounded-control px-2 py-2 text-left transition-colors hover:bg-subtle",
3994
4078
  children: [
3995
- /* @__PURE__ */ jsx39(CheckBoxBox, { checked }),
3996
- /* @__PURE__ */ jsx39("span", { className: "flex-1 text-[14px] text-text-primary", children: o.label }),
3997
- counts && /* @__PURE__ */ jsx39(OptionCount, { n: countFor(o.id) })
4079
+ /* @__PURE__ */ jsx40(CheckBoxBox, { checked }),
4080
+ /* @__PURE__ */ jsx40("span", { className: "flex-1 text-[14px] text-text-primary", children: o.label }),
4081
+ counts && /* @__PURE__ */ jsx40(OptionCount, { n: countFor(o.id) })
3998
4082
  ]
3999
4083
  },
4000
4084
  o.id
4001
4085
  );
4002
4086
  }),
4003
- (groups && !visibleGroups.length || !groups && !items.length) && /* @__PURE__ */ jsx39("div", { className: "py-6 text-center text-[13px] text-text-tertiary", children: "No matches." })
4087
+ (groups && !visibleGroups.length || !groups && !items.length) && /* @__PURE__ */ jsx40("div", { className: "py-6 text-center text-[13px] text-text-tertiary", children: "No matches." })
4004
4088
  ] }),
4005
- showFooter ? /* @__PURE__ */ jsx39(FilterDropdownFooter, { onClear: () => setDraft(clearValue), onApply: apply }) : min === 0 && draft.length > 0 && /* @__PURE__ */ jsx39("div", { className: "border-t border-border-default p-2", children: /* @__PURE__ */ jsxs35(
4089
+ showFooter ? /* @__PURE__ */ jsx40(FilterDropdownFooter, { onClear: () => setDraft(clearValue), onApply: apply }) : min === 0 && draft.length > 0 && /* @__PURE__ */ jsx40("div", { className: "border-t border-border-default p-2", children: /* @__PURE__ */ jsxs36(
4006
4090
  "button",
4007
4091
  {
4008
4092
  type: "button",
@@ -4020,7 +4104,7 @@ function MultiSelectFilter({
4020
4104
  ] });
4021
4105
  }
4022
4106
  function OptionCount({ n }) {
4023
- return /* @__PURE__ */ jsxs35("span", { className: "shrink-0 text-[12px] tabular-nums text-text-tertiary", children: [
4107
+ return /* @__PURE__ */ jsxs36("span", { className: "shrink-0 text-[12px] tabular-nums text-text-tertiary", children: [
4024
4108
  "(",
4025
4109
  n.toLocaleString(),
4026
4110
  ")"
@@ -4028,7 +4112,7 @@ function OptionCount({ n }) {
4028
4112
  }
4029
4113
 
4030
4114
  // src/Toggle.tsx
4031
- import { jsx as jsx40 } from "react/jsx-runtime";
4115
+ import { jsx as jsx41 } from "react/jsx-runtime";
4032
4116
  var SIZES2 = {
4033
4117
  sm: { track: "h-5 w-9", knob: "h-4 w-4", on: "translate-x-[18px]" },
4034
4118
  md: { track: "h-6 w-11", knob: "h-5 w-5", on: "translate-x-[22px]" }
@@ -4036,7 +4120,7 @@ var SIZES2 = {
4036
4120
  var OFF_TRACK = "color-mix(in srgb, var(--mr-color-border-interactive) 70%, var(--mr-color-text-secondary))";
4037
4121
  function Toggle({ checked, onChange, label, size = "md", disabled, className, testIdPrefix }) {
4038
4122
  const s = SIZES2[size];
4039
- return /* @__PURE__ */ jsx40(
4123
+ return /* @__PURE__ */ jsx41(
4040
4124
  "button",
4041
4125
  {
4042
4126
  type: "button",
@@ -4054,7 +4138,7 @@ function Toggle({ checked, onChange, label, size = "md", disabled, className, te
4054
4138
  disabled && "cursor-not-allowed opacity-50",
4055
4139
  className
4056
4140
  ),
4057
- children: /* @__PURE__ */ jsx40(
4141
+ children: /* @__PURE__ */ jsx41(
4058
4142
  "span",
4059
4143
  {
4060
4144
  className: cn(
@@ -4071,20 +4155,20 @@ function Toggle({ checked, onChange, label, size = "md", disabled, className, te
4071
4155
  // src/AISpark.tsx
4072
4156
  import { useId as useId6 } from "react";
4073
4157
  import { Sparkles } from "lucide-react";
4074
- import { Fragment as Fragment6, jsx as jsx41, jsxs as jsxs36 } from "react/jsx-runtime";
4158
+ import { Fragment as Fragment6, jsx as jsx42, jsxs as jsxs37 } from "react/jsx-runtime";
4075
4159
  function AISpark({ size = 16, className }) {
4076
4160
  const id = useId6();
4077
- return /* @__PURE__ */ jsxs36(Fragment6, { children: [
4078
- /* @__PURE__ */ jsx41("svg", { width: "0", height: "0", "aria-hidden": "true", style: { position: "absolute" }, children: /* @__PURE__ */ jsx41("defs", { children: /* @__PURE__ */ jsxs36("linearGradient", { id, x1: "0", y1: "0", x2: "1", y2: "1", children: [
4079
- /* @__PURE__ */ jsx41("stop", { offset: "0%", stopColor: "var(--mr-color-brand-primary)" }),
4080
- /* @__PURE__ */ jsx41("stop", { offset: "100%", className: "[stop-color:#9474ff] in-data-[theme=dark]:[stop-color:#a488ff]" })
4161
+ return /* @__PURE__ */ jsxs37(Fragment6, { children: [
4162
+ /* @__PURE__ */ jsx42("svg", { width: "0", height: "0", "aria-hidden": "true", style: { position: "absolute" }, children: /* @__PURE__ */ jsx42("defs", { children: /* @__PURE__ */ jsxs37("linearGradient", { id, x1: "0", y1: "0", x2: "1", y2: "1", children: [
4163
+ /* @__PURE__ */ jsx42("stop", { offset: "0%", stopColor: "var(--mr-color-brand-primary)" }),
4164
+ /* @__PURE__ */ jsx42("stop", { offset: "100%", className: "[stop-color:#9474ff] in-data-[theme=dark]:[stop-color:#a488ff]" })
4081
4165
  ] }) }) }),
4082
- /* @__PURE__ */ jsx41(Sparkles, { size, stroke: `url(#${id})`, className, "aria-hidden": "true" })
4166
+ /* @__PURE__ */ jsx42(Sparkles, { size, stroke: `url(#${id})`, className, "aria-hidden": "true" })
4083
4167
  ] });
4084
4168
  }
4085
4169
 
4086
4170
  // src/Freshness.tsx
4087
- import { jsx as jsx42 } from "react/jsx-runtime";
4171
+ import { jsx as jsx43 } from "react/jsx-runtime";
4088
4172
  var dotColor = {
4089
4173
  fresh: "bg-status-success",
4090
4174
  recent: "bg-status-warning",
@@ -4096,7 +4180,7 @@ var srLabel = {
4096
4180
  stale: "Older than a day"
4097
4181
  };
4098
4182
  function Freshness({ level }) {
4099
- return /* @__PURE__ */ jsx42(
4183
+ return /* @__PURE__ */ jsx43(
4100
4184
  "span",
4101
4185
  {
4102
4186
  className: cn("inline-block h-1.5 w-1.5 shrink-0 rounded-full", dotColor[level]),
@@ -4107,47 +4191,47 @@ function Freshness({ level }) {
4107
4191
  }
4108
4192
 
4109
4193
  // src/SectionHeading.tsx
4110
- import { jsx as jsx43, jsxs as jsxs37 } from "react/jsx-runtime";
4194
+ import { jsx as jsx44, jsxs as jsxs38 } from "react/jsx-runtime";
4111
4195
  function SectionHeading({ title, description, actions, as: Tag2 = "h2", id, className }) {
4112
- return /* @__PURE__ */ jsxs37("div", { className: cn("flex flex-wrap items-end justify-between gap-x-4 gap-y-2", className), children: [
4113
- /* @__PURE__ */ jsxs37("div", { className: "min-w-0", children: [
4114
- /* @__PURE__ */ jsx43(Tag2, { id, className: "text-base font-semibold text-text-primary", children: title }),
4115
- description && /* @__PURE__ */ jsx43("p", { className: "mt-0.5 text-dense text-text-secondary", children: description })
4196
+ return /* @__PURE__ */ jsxs38("div", { className: cn("flex flex-wrap items-end justify-between gap-x-4 gap-y-2", className), children: [
4197
+ /* @__PURE__ */ jsxs38("div", { className: "min-w-0", children: [
4198
+ /* @__PURE__ */ jsx44(Tag2, { id, className: "text-base font-semibold text-text-primary", children: title }),
4199
+ description && /* @__PURE__ */ jsx44("p", { className: "mt-0.5 text-dense text-text-secondary", children: description })
4116
4200
  ] }),
4117
- actions && /* @__PURE__ */ jsx43("div", { className: "flex shrink-0 items-center gap-2", children: actions })
4201
+ actions && /* @__PURE__ */ jsx44("div", { className: "flex shrink-0 items-center gap-2", children: actions })
4118
4202
  ] });
4119
4203
  }
4120
4204
 
4121
4205
  // src/PageHeader.tsx
4122
4206
  import { ArrowLeft } from "lucide-react";
4123
- import { jsx as jsx44, jsxs as jsxs38 } from "react/jsx-runtime";
4207
+ import { jsx as jsx45, jsxs as jsxs39 } from "react/jsx-runtime";
4124
4208
  function PageHeader({ title, description, actions, back, className }) {
4125
- return /* @__PURE__ */ jsxs38("header", { className: cn("flex flex-wrap items-center justify-between gap-x-6 gap-y-3", className), children: [
4126
- /* @__PURE__ */ jsxs38("div", { className: "min-w-0", children: [
4127
- back && /* @__PURE__ */ jsxs38(
4209
+ return /* @__PURE__ */ jsxs39("header", { className: cn("flex flex-wrap items-center justify-between gap-x-6 gap-y-3", className), children: [
4210
+ /* @__PURE__ */ jsxs39("div", { className: "min-w-0", children: [
4211
+ back && /* @__PURE__ */ jsxs39(
4128
4212
  "a",
4129
4213
  {
4130
4214
  href: back.href ?? "#",
4131
4215
  onClick: back.onClick,
4132
4216
  className: "mb-1.5 inline-flex items-center gap-1.5 rounded-control text-micro font-semibold uppercase tracking-wider text-text-tertiary hover:text-text-primary focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus",
4133
4217
  children: [
4134
- /* @__PURE__ */ jsx44(ArrowLeft, { size: 13, "aria-hidden": "true" }),
4218
+ /* @__PURE__ */ jsx45(ArrowLeft, { size: 13, "aria-hidden": "true" }),
4135
4219
  back.label
4136
4220
  ]
4137
4221
  }
4138
4222
  ),
4139
- /* @__PURE__ */ jsx44("h1", { className: "text-xl font-semibold tracking-tight text-text-primary", children: title }),
4140
- description && /* @__PURE__ */ jsx44("p", { className: "mt-0.5 max-w-2xl text-sm text-text-secondary", children: description })
4223
+ /* @__PURE__ */ jsx45("h1", { className: "text-xl font-semibold tracking-tight text-text-primary", children: title }),
4224
+ description && /* @__PURE__ */ jsx45("p", { className: "mt-0.5 max-w-2xl text-sm text-text-secondary", children: description })
4141
4225
  ] }),
4142
- actions && /* @__PURE__ */ jsx44("div", { className: "flex shrink-0 items-center gap-2", children: actions })
4226
+ actions && /* @__PURE__ */ jsx45("div", { className: "flex shrink-0 items-center gap-2", children: actions })
4143
4227
  ] });
4144
4228
  }
4145
4229
 
4146
4230
  // src/Modal.tsx
4147
- import { useEffect as useEffect14, useId as useId7, useRef as useRef15 } from "react";
4231
+ import { useEffect as useEffect14, useId as useId7, useRef as useRef16 } from "react";
4148
4232
  import { createPortal as createPortal7 } from "react-dom";
4149
4233
  import { X as X6 } from "lucide-react";
4150
- import { jsx as jsx45, jsxs as jsxs39 } from "react/jsx-runtime";
4234
+ import { jsx as jsx46, jsxs as jsxs40 } from "react/jsx-runtime";
4151
4235
  var WIDTH = {
4152
4236
  sm: "max-w-110",
4153
4237
  md: "max-w-160",
@@ -4160,8 +4244,8 @@ var FOCUSABLE = 'a[href], button:not([disabled]), input:not([disabled]), select:
4160
4244
  function Modal({ open, onClose, title, description, size = "md", footer, children, className }) {
4161
4245
  const titleId = useId7();
4162
4246
  const descId = useId7();
4163
- const panel = useRef15(null);
4164
- const close = useRef15(onClose);
4247
+ const panel = useRef16(null);
4248
+ const close = useRef16(onClose);
4165
4249
  close.current = onClose;
4166
4250
  useEffect14(() => {
4167
4251
  if (!open) return;
@@ -4198,12 +4282,12 @@ function Modal({ open, onClose, title, description, size = "md", footer, childre
4198
4282
  }, [open]);
4199
4283
  if (!open || typeof document === "undefined") return null;
4200
4284
  return createPortal7(
4201
- /* @__PURE__ */ jsx45(
4285
+ /* @__PURE__ */ jsx46(
4202
4286
  "div",
4203
4287
  {
4204
4288
  className: "fixed inset-0 z-modal flex items-center justify-center bg-scrim px-4 py-6",
4205
4289
  onMouseDown: (e) => e.target === e.currentTarget && onClose(),
4206
- children: /* @__PURE__ */ jsxs39(
4290
+ children: /* @__PURE__ */ jsxs40(
4207
4291
  "div",
4208
4292
  {
4209
4293
  ref: panel,
@@ -4218,24 +4302,24 @@ function Modal({ open, onClose, title, description, size = "md", footer, childre
4218
4302
  className
4219
4303
  ),
4220
4304
  children: [
4221
- /* @__PURE__ */ jsxs39("div", { className: "flex items-start gap-3 px-5 pt-5 pb-3", children: [
4222
- /* @__PURE__ */ jsxs39("div", { className: "min-w-0 flex-1", children: [
4223
- /* @__PURE__ */ jsx45("h2", { id: titleId, className: "text-base font-semibold text-text-primary", children: title }),
4224
- description && /* @__PURE__ */ jsx45("p", { id: descId, className: "mt-0.5 text-sm text-text-secondary", children: description })
4305
+ /* @__PURE__ */ jsxs40("div", { className: "flex items-start gap-3 px-5 pt-5 pb-3", children: [
4306
+ /* @__PURE__ */ jsxs40("div", { className: "min-w-0 flex-1", children: [
4307
+ /* @__PURE__ */ jsx46("h2", { id: titleId, className: "text-base font-semibold text-text-primary", children: title }),
4308
+ description && /* @__PURE__ */ jsx46("p", { id: descId, className: "mt-0.5 text-sm text-text-secondary", children: description })
4225
4309
  ] }),
4226
- /* @__PURE__ */ jsx45(
4310
+ /* @__PURE__ */ jsx46(
4227
4311
  "button",
4228
4312
  {
4229
4313
  type: "button",
4230
4314
  onClick: onClose,
4231
4315
  "aria-label": "Close",
4232
4316
  className: "-mr-1.5 -mt-1 flex size-8 shrink-0 items-center justify-center rounded-control text-text-tertiary hover:bg-subtle hover:text-text-primary focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus",
4233
- children: /* @__PURE__ */ jsx45(X6, { size: 16, "aria-hidden": "true" })
4317
+ children: /* @__PURE__ */ jsx46(X6, { size: 16, "aria-hidden": "true" })
4234
4318
  }
4235
4319
  )
4236
4320
  ] }),
4237
- children && /* @__PURE__ */ jsx45("div", { "data-modal-body": true, className: "min-h-0 flex-1 overflow-y-auto px-5 pb-5 text-sm text-text-primary", children }),
4238
- footer && /* @__PURE__ */ jsx45("div", { "data-modal-footer": true, className: "flex items-center justify-end gap-2 border-t border-border-default px-5 py-3", children: footer })
4321
+ children && /* @__PURE__ */ jsx46("div", { "data-modal-body": true, className: "min-h-0 flex-1 overflow-y-auto px-5 pb-5 text-sm text-text-primary", children }),
4322
+ footer && /* @__PURE__ */ jsx46("div", { "data-modal-footer": true, className: "flex items-center justify-end gap-2 border-t border-border-default px-5 py-3", children: footer })
4239
4323
  ]
4240
4324
  }
4241
4325
  )
@@ -4246,10 +4330,10 @@ function Modal({ open, onClose, title, description, size = "md", footer, childre
4246
4330
  }
4247
4331
 
4248
4332
  // src/EmptyState.tsx
4249
- import { jsx as jsx46, jsxs as jsxs40 } from "react/jsx-runtime";
4333
+ import { jsx as jsx47, jsxs as jsxs41 } from "react/jsx-runtime";
4250
4334
  function EmptyState({ icon, title, description, action, size = "sm", className }) {
4251
4335
  const md = size === "md";
4252
- return /* @__PURE__ */ jsxs40(
4336
+ return /* @__PURE__ */ jsxs41(
4253
4337
  "div",
4254
4338
  {
4255
4339
  className: cn(
@@ -4258,7 +4342,7 @@ function EmptyState({ icon, title, description, action, size = "sm", className }
4258
4342
  className
4259
4343
  ),
4260
4344
  children: [
4261
- icon && /* @__PURE__ */ jsx46(
4345
+ icon && /* @__PURE__ */ jsx47(
4262
4346
  "span",
4263
4347
  {
4264
4348
  "aria-hidden": "true",
@@ -4269,105 +4353,14 @@ function EmptyState({ icon, title, description, action, size = "sm", className }
4269
4353
  children: icon
4270
4354
  }
4271
4355
  ),
4272
- /* @__PURE__ */ jsx46("p", { className: cn("font-semibold text-text-primary", md ? "text-base" : "text-sm"), children: title }),
4273
- description && /* @__PURE__ */ jsx46("p", { className: cn("max-w-sm text-text-secondary", md ? "text-sm" : "text-xs"), children: description }),
4274
- action && /* @__PURE__ */ jsx46("div", { className: md ? "mt-3" : "mt-2", children: action })
4356
+ /* @__PURE__ */ jsx47("p", { className: cn("font-semibold text-text-primary", md ? "text-base" : "text-sm"), children: title }),
4357
+ description && /* @__PURE__ */ jsx47("p", { className: cn("max-w-sm text-text-secondary", md ? "text-sm" : "text-xs"), children: description }),
4358
+ action && /* @__PURE__ */ jsx47("div", { className: md ? "mt-3" : "mt-2", children: action })
4275
4359
  ]
4276
4360
  }
4277
4361
  );
4278
4362
  }
4279
4363
 
4280
- // src/Tabs.tsx
4281
- import { useRef as useRef16 } from "react";
4282
- import { jsx as jsx47, jsxs as jsxs41 } from "react/jsx-runtime";
4283
- function arrowKeys(e, row) {
4284
- if (!row || !["ArrowLeft", "ArrowRight", "Home", "End"].includes(e.key)) return;
4285
- const items = Array.from(row.querySelectorAll("button:not([disabled])"));
4286
- const at = items.indexOf(document.activeElement);
4287
- const next = e.key === "Home" ? 0 : e.key === "End" ? items.length - 1 : (at + (e.key === "ArrowRight" ? 1 : -1) + items.length) % items.length;
4288
- e.preventDefault();
4289
- items[next]?.focus();
4290
- items[next]?.click();
4291
- }
4292
- function Tabs({ items, value, onChange, idPrefix = "tabs", className, ...rest }) {
4293
- const row = useRef16(null);
4294
- return /* @__PURE__ */ jsx47(
4295
- "div",
4296
- {
4297
- ref: row,
4298
- role: "tablist",
4299
- "aria-label": rest["aria-label"],
4300
- onKeyDown: (e) => arrowKeys(e, row.current),
4301
- className: cn("flex gap-6 border-b border-border-default", className),
4302
- children: items.map((item) => {
4303
- const on = item.value === value;
4304
- return /* @__PURE__ */ jsxs41(
4305
- "button",
4306
- {
4307
- type: "button",
4308
- role: "tab",
4309
- id: `${idPrefix}-tab-${item.value}`,
4310
- "aria-controls": `${idPrefix}-panel-${item.value}`,
4311
- "aria-selected": on,
4312
- tabIndex: on ? 0 : -1,
4313
- disabled: item.disabled,
4314
- onClick: () => onChange(item.value),
4315
- className: cn(
4316
- "-mb-px flex items-center gap-1.5 border-b-2 pt-1 pb-2.5 text-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus disabled:opacity-50",
4317
- on ? "border-brand-primaryAction font-semibold text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"
4318
- ),
4319
- children: [
4320
- item.label,
4321
- item.count !== void 0 && /* @__PURE__ */ jsx47("span", { className: "text-xs text-text-tertiary", children: item.count })
4322
- ]
4323
- },
4324
- item.value
4325
- );
4326
- })
4327
- }
4328
- );
4329
- }
4330
- function SegmentedControl({
4331
- options,
4332
- value,
4333
- onChange,
4334
- size = "sm",
4335
- className,
4336
- ...rest
4337
- }) {
4338
- const row = useRef16(null);
4339
- return /* @__PURE__ */ jsx47(
4340
- "div",
4341
- {
4342
- ref: row,
4343
- role: "radiogroup",
4344
- "aria-label": rest["aria-label"],
4345
- onKeyDown: (e) => arrowKeys(e, row.current),
4346
- className: cn("inline-flex w-fit items-stretch gap-0.5 rounded-full bg-subtle p-1", size === "md" ? "h-10" : "h-8", className),
4347
- children: options.map((o) => {
4348
- const on = o.value === value;
4349
- return /* @__PURE__ */ jsx47(
4350
- "button",
4351
- {
4352
- type: "button",
4353
- role: "radio",
4354
- "aria-checked": on,
4355
- tabIndex: on ? 0 : -1,
4356
- onClick: () => onChange(o.value),
4357
- className: cn(
4358
- "rounded-full px-3 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus",
4359
- size === "md" ? "text-sm" : "text-xs",
4360
- on ? "bg-surface font-semibold text-text-primary shadow-raised" : "text-text-secondary hover:text-text-primary"
4361
- ),
4362
- children: o.label
4363
- },
4364
- o.value
4365
- );
4366
- })
4367
- }
4368
- );
4369
- }
4370
-
4371
4364
  // src/TextField.tsx
4372
4365
  import { forwardRef as forwardRef3, useId as useId8 } from "react";
4373
4366
  import { jsx as jsx48, jsxs as jsxs42 } from "react/jsx-runtime";