@mediaradar/design-components 0.5.0 → 0.6.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.d.cts CHANGED
@@ -6,7 +6,7 @@ import { ReactNode, RefObject } from 'react';
6
6
  * @description Info tooltip — a small info glyph that opens a portalled,
7
7
  * viewport-clamped bubble. Mirrors the Publisher Intel header affordance so
8
8
  * page subtitles can collapse into the eyebrow.
9
- * @tokens text-text-tertiary, rounded-control, border-border, bg-surface,
9
+ * @tokens text-text-tertiary, rounded-control, border-border-default, bg-surface,
10
10
  * shadow-overlay, text-text-secondary, focus-visible:outline-border-focus,
11
11
  * hover:text-text-primary, tracking-normal
12
12
  * @dependencies lucide-react
@@ -259,6 +259,11 @@ declare function DateRangeFilter({ caption, defaultValue, value: controlledValue
259
259
  * border-border-interactive, focus-visible:outline-border-focus,
260
260
  * hover:text-text-primary, placeholder:text-text-tertiary, rounded-card,
261
261
  * rounded-full, shadow-overlay, text-brand-primaryAction, text-text-secondary
262
+ * @variant default - Default. Plain keyword input, no match-type control.
263
+ * @variant filterable - Adds an attached match-type dropdown sharing one
264
+ * bordered control, mirroring the legacy Creative Intel search + match-type
265
+ * modal (Any Word/Exact Match/Contextual/Ad Code), including the Or/And
266
+ * sub-choice nested under Any Word.
262
267
  * @dependencies lucide-react
263
268
  * @behavior The match-type dropdown ('filterable' variant) closes on Escape
264
269
  * and outside click. Each mode row is a real `radio` role, with a nested
@@ -315,7 +320,7 @@ declare function SearchBar({ placeholder, value, onChange, variant, matchValue,
315
320
  * desktop grid exactly, or a variable-length list with no "view all" link
316
321
  * at all — both need to keep working without the row assuming a count.
317
322
  * @tokens text-text-primary, text-text-secondary, text-text-link,
318
- * rounded-control, rounded-sm, border-border, focus-visible:outline-solid,
323
+ * rounded-control, rounded-sm, border-border-default, focus-visible:outline-solid,
319
324
  * focus-visible:outline-border-focus, hover:bg-subtle, hover:text-text-primary,
320
325
  * tracking-tight, font-serif
321
326
  * @dependencies lucide-react
@@ -612,10 +617,10 @@ interface SummaryGroup {
612
617
  * naming maps to this package's `shadow-raised`/`shadow-overlay` respectively
613
618
  * (raised: a static card like this one; overlay: a floating popover/menu),
614
619
  * not a 1:1 name swap.
615
- * @tokens rounded-card, border-border, bg-surface, shadow-raised,
620
+ * @tokens rounded-card, border-border-default, bg-surface, shadow-raised,
616
621
  * text-text-secondary, text-text-primary, rounded-full, bg-subtle,
617
622
  * rounded-control, bg-canvas, hover:bg-subtle, hover:text-text-danger,
618
- * text-text-link, divide-border
623
+ * text-text-link, divide-border-default
619
624
  * @dependencies lucide-react
620
625
  * @behavior A group auto-expands only on the empty-to-nonempty transition
621
626
  * (including via a nested sub-group's items) and auto-collapses when
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@ import { ReactNode, RefObject } from 'react';
6
6
  * @description Info tooltip — a small info glyph that opens a portalled,
7
7
  * viewport-clamped bubble. Mirrors the Publisher Intel header affordance so
8
8
  * page subtitles can collapse into the eyebrow.
9
- * @tokens text-text-tertiary, rounded-control, border-border, bg-surface,
9
+ * @tokens text-text-tertiary, rounded-control, border-border-default, bg-surface,
10
10
  * shadow-overlay, text-text-secondary, focus-visible:outline-border-focus,
11
11
  * hover:text-text-primary, tracking-normal
12
12
  * @dependencies lucide-react
@@ -259,6 +259,11 @@ declare function DateRangeFilter({ caption, defaultValue, value: controlledValue
259
259
  * border-border-interactive, focus-visible:outline-border-focus,
260
260
  * hover:text-text-primary, placeholder:text-text-tertiary, rounded-card,
261
261
  * rounded-full, shadow-overlay, text-brand-primaryAction, text-text-secondary
262
+ * @variant default - Default. Plain keyword input, no match-type control.
263
+ * @variant filterable - Adds an attached match-type dropdown sharing one
264
+ * bordered control, mirroring the legacy Creative Intel search + match-type
265
+ * modal (Any Word/Exact Match/Contextual/Ad Code), including the Or/And
266
+ * sub-choice nested under Any Word.
262
267
  * @dependencies lucide-react
263
268
  * @behavior The match-type dropdown ('filterable' variant) closes on Escape
264
269
  * and outside click. Each mode row is a real `radio` role, with a nested
@@ -315,7 +320,7 @@ declare function SearchBar({ placeholder, value, onChange, variant, matchValue,
315
320
  * desktop grid exactly, or a variable-length list with no "view all" link
316
321
  * at all — both need to keep working without the row assuming a count.
317
322
  * @tokens text-text-primary, text-text-secondary, text-text-link,
318
- * rounded-control, rounded-sm, border-border, focus-visible:outline-solid,
323
+ * rounded-control, rounded-sm, border-border-default, focus-visible:outline-solid,
319
324
  * focus-visible:outline-border-focus, hover:bg-subtle, hover:text-text-primary,
320
325
  * tracking-tight, font-serif
321
326
  * @dependencies lucide-react
@@ -612,10 +617,10 @@ interface SummaryGroup {
612
617
  * naming maps to this package's `shadow-raised`/`shadow-overlay` respectively
613
618
  * (raised: a static card like this one; overlay: a floating popover/menu),
614
619
  * not a 1:1 name swap.
615
- * @tokens rounded-card, border-border, bg-surface, shadow-raised,
620
+ * @tokens rounded-card, border-border-default, bg-surface, shadow-raised,
616
621
  * text-text-secondary, text-text-primary, rounded-full, bg-subtle,
617
622
  * rounded-control, bg-canvas, hover:bg-subtle, hover:text-text-danger,
618
- * text-text-link, divide-border
623
+ * text-text-link, divide-border-default
619
624
  * @dependencies lucide-react
620
625
  * @behavior A group auto-expands only on the empty-to-nonempty transition
621
626
  * (including via a nested sub-group's items) and auto-collapses when
package/dist/index.js CHANGED
@@ -62,7 +62,7 @@ function InfoTip({ text, size = 11, label = "More information", trigger = "click
62
62
  {
63
63
  role: "tooltip",
64
64
  style: { position: "fixed", top: pos.top, left: pos.left, width: pos.width },
65
- className: "z-[90] rounded-control border border-border bg-surface px-3 py-2 text-[12px] font-normal not-italic normal-case leading-relaxed tracking-normal text-text-secondary shadow-overlay",
65
+ className: "z-[90] rounded-control border border-border-default bg-surface px-3 py-2 text-[12px] font-normal not-italic normal-case leading-relaxed tracking-normal text-text-secondary shadow-overlay",
66
66
  children: text
67
67
  }
68
68
  ),
@@ -411,7 +411,13 @@ function CheckBox({ checked, indeterminate, onChange, ariaLabel, disabled, testI
411
411
  "flex h-[18px] w-[18px] shrink-0 items-center justify-center rounded-[5px] border transition-colors",
412
412
  "focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-border-focus",
413
413
  on ? "border-transparent bg-brand-primaryAction text-white" : "border-border-interactive bg-input hover:border-brand-primaryAction",
414
- disabled && "cursor-not-allowed opacity-50"
414
+ // Cancels the unchecked hover-border preview when disabled -- without
415
+ // this, a disabled box still visually previews the "you can click
416
+ // this" affordance on hover even though the click does nothing.
417
+ // Found empirically reconciling this against insights-studio-
418
+ // prototype's own (more complete) local CheckBox during its
419
+ // migration -- that version already had this guard.
420
+ disabled && "cursor-not-allowed opacity-50 hover:border-border-interactive"
415
421
  ].filter(Boolean).join(" "),
416
422
  children: indeterminate ? /* @__PURE__ */ jsx4(Minus, { size: 13, strokeWidth: 3 }) : checked ? /* @__PURE__ */ jsx4(Check2, { size: 13, strokeWidth: 3 }) : null
417
423
  }
@@ -1078,7 +1084,7 @@ function SectionRail({
1078
1084
  type: "button",
1079
1085
  onClick: () => scroll(-1),
1080
1086
  "aria-label": "Previous",
1081
- className: "hidden h-10 w-10 items-center justify-center rounded-control border border-border text-text-secondary transition-colors hover:bg-subtle hover:text-text-primary sm:flex lg:hidden",
1087
+ className: "hidden h-10 w-10 items-center justify-center rounded-control border border-border-default text-text-secondary transition-colors hover:bg-subtle hover:text-text-primary sm:flex lg:hidden",
1082
1088
  children: /* @__PURE__ */ jsx7(ChevronLeft2, { size: 16 })
1083
1089
  }
1084
1090
  ),
@@ -1088,7 +1094,7 @@ function SectionRail({
1088
1094
  type: "button",
1089
1095
  onClick: () => scroll(1),
1090
1096
  "aria-label": "Next",
1091
- className: "hidden h-10 w-10 items-center justify-center rounded-control border border-border text-text-secondary transition-colors hover:bg-subtle hover:text-text-primary sm:flex lg:hidden",
1097
+ className: "hidden h-10 w-10 items-center justify-center rounded-control border border-border-default text-text-secondary transition-colors hover:bg-subtle hover:text-text-primary sm:flex lg:hidden",
1092
1098
  children: /* @__PURE__ */ jsx7(ChevronRight2, { size: 16 })
1093
1099
  }
1094
1100
  )
@@ -1439,7 +1445,7 @@ function cx5(...parts) {
1439
1445
  return parts.filter(Boolean).join(" ");
1440
1446
  }
1441
1447
  function WorkspaceSelectedCard({ groups, testIdPrefix }) {
1442
- return /* @__PURE__ */ jsx12("aside", { className: "sticky top-4 flex min-w-0 flex-col gap-4 self-start rounded-card border border-border bg-surface px-5 pb-5 pt-4 shadow-raised sm:px-6 sm:pb-6", children: /* @__PURE__ */ jsx12("div", { className: "flex flex-col divide-y divide-border", children: groups.map((g) => /* @__PURE__ */ jsx12(SummaryGroupItem, { group: g, testIdPrefix }, g.id)) }) });
1448
+ return /* @__PURE__ */ jsx12("aside", { className: "sticky top-4 flex min-w-0 flex-col gap-4 self-start rounded-card border border-border-default bg-surface px-5 pb-5 pt-4 shadow-raised sm:px-6 sm:pb-6", children: /* @__PURE__ */ jsx12("div", { className: "flex flex-col divide-y divide-border-default", children: groups.map((g) => /* @__PURE__ */ jsx12(SummaryGroupItem, { group: g, testIdPrefix }, g.id)) }) });
1443
1449
  }
1444
1450
  function SummaryGroupItem({
1445
1451
  group,
@@ -1484,7 +1490,7 @@ function SummaryGroupItem({
1484
1490
  group.items.map((item) => /* @__PURE__ */ jsxs11(
1485
1491
  "div",
1486
1492
  {
1487
- className: "flex items-center justify-between gap-2 rounded-control border border-border bg-canvas px-2 py-1",
1493
+ className: "flex items-center justify-between gap-2 rounded-control border border-border-default bg-canvas px-2 py-1",
1488
1494
  children: [
1489
1495
  /* @__PURE__ */ jsxs11("span", { className: "min-w-0 flex-1", children: [
1490
1496
  /* @__PURE__ */ jsx12("span", { className: "block truncate text-[12px] text-text-primary", children: item.name }),