@mediaradar/design-components 0.18.5 → 0.18.6

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.cjs CHANGED
@@ -77,7 +77,7 @@ __export(index_exports, {
77
77
  module.exports = __toCommonJS(index_exports);
78
78
 
79
79
  // <define:__FONT_SIZE_KEYS__>
80
- var define_FONT_SIZE_KEYS_default = ["control-caption", "micro", "xs", "card-title", "dense", "sm", "panel-title", "base", "md", "lg", "xl", "h1"];
80
+ var define_FONT_SIZE_KEYS_default = ["control-caption", "badge", "micro", "xs", "card-title", "dense", "sm", "panel-title", "base", "md", "lg", "xl", "h1"];
81
81
 
82
82
  // src/InfoTip.tsx
83
83
  var import_react = require("react");
@@ -284,7 +284,7 @@ function AdvertiserQuickFilter({
284
284
  children: [
285
285
  icon && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "shrink-0 text-text-tertiary", children: icon }),
286
286
  /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "flex flex-col gap-1 text-left leading-none", children: [
287
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-[10px] uppercase tracking-wide text-text-tertiary", children: caption }),
287
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-control-caption uppercase tracking-wide text-text-tertiary", children: caption }),
288
288
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-[12px] font-medium text-text-primary", children: value })
289
289
  ] }),
290
290
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
@@ -879,7 +879,7 @@ function DateRangeFilter({
879
879
  children: [
880
880
  icon && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "shrink-0 text-text-tertiary", children: icon }),
881
881
  /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "flex flex-col gap-1 text-left leading-none", children: [
882
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: showDates ? "text-[11px] text-text-tertiary" : "text-[10px] uppercase tracking-wide text-text-tertiary", children: showDates ? displayDatesLine : caption }),
882
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: showDates ? "text-[11px] text-text-tertiary" : "text-control-caption uppercase tracking-wide text-text-tertiary", children: showDates ? displayDatesLine : caption }),
883
883
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "text-[12px] font-medium text-text-primary", children: displayValue })
884
884
  ] }),
885
885
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react6.ChevronDown, { size: 14, "aria-hidden": "true", className: `shrink-0 text-text-secondary transition-transform ${open ? "rotate-180" : ""}` })
@@ -1191,7 +1191,7 @@ function ModeRow({
1191
1191
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "text-[14px] font-semibold text-text-primary", children: title }),
1192
1192
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(RowInfoTip, { text: infoText })
1193
1193
  ] }),
1194
- badge && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "rounded-full bg-subtle px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-text-secondary", children: badge }),
1194
+ badge && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "rounded-full bg-subtle px-2 py-0.5 text-badge font-semibold uppercase tracking-wide text-text-secondary", children: badge }),
1195
1195
  extra
1196
1196
  ] }),
1197
1197
  selected && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react7.Check, { size: 16, strokeWidth: 2.5, "aria-hidden": "true", className: "shrink-0 text-brand-primaryAction" })
@@ -1388,7 +1388,7 @@ function DataScopeFilter({ value, onChange, align = "right" }) {
1388
1388
  className: "flex h-11 items-center gap-2 rounded-control border border-border-strong bg-input px-2.5 text-text-secondary transition-colors hover:bg-subtle hover:text-text-primary focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-border-focus",
1389
1389
  children: [
1390
1390
  /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("span", { className: "flex flex-col gap-1 text-left leading-none", children: [
1391
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "text-[10px] uppercase tracking-wide text-text-tertiary", children: "Data" }),
1391
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "text-control-caption uppercase tracking-wide text-text-tertiary", children: "Data" }),
1392
1392
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "text-[12px] font-medium text-text-primary", children: display })
1393
1393
  ] }),
1394
1394
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
@@ -1520,7 +1520,7 @@ function SelectFilter({
1520
1520
  ),
1521
1521
  children: [
1522
1522
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "flex flex-col gap-1 text-left leading-none", children: [
1523
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "text-[10px] uppercase tracking-wide text-text-tertiary", children: caption }),
1523
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "text-control-caption uppercase tracking-wide text-text-tertiary", children: caption }),
1524
1524
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "text-[12px] font-medium text-text-primary", children: value })
1525
1525
  ] }),
1526
1526
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
@@ -2831,7 +2831,7 @@ function MetricCells({ spendN, yoy }) {
2831
2831
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "flex shrink-0 items-center gap-2 pr-1.5", children: [
2832
2832
  /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-right text-[12px] font-bold tabular-nums text-text-primary", style: { width: COL_CURRENT }, children: fmtM(spendN) }),
2833
2833
  /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-right text-[12px] font-normal tabular-nums text-text-primary", style: { width: COL_PREVIOUS }, children: prior ?? "\u2014" }),
2834
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "flex justify-end", style: { width: COL_YOY }, children: yoy === "NEW" ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "rounded-full bg-status-warning/15 px-1.5 text-micro font-semibold text-text-warning", children: "NEW" }) : /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: cx9("text-right text-[12px] font-semibold tabular-nums", up ? "text-text-success" : "text-text-danger"), children: [
2834
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "flex justify-end", style: { width: COL_YOY }, children: yoy === "NEW" ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "rounded-full bg-status-warning/15 px-1.5 text-badge font-semibold text-text-warning", children: "NEW" }) : /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: cx9("text-right text-[12px] font-semibold tabular-nums", up ? "text-text-success" : "text-text-danger"), children: [
2835
2835
  up ? "+" : "\u2212",
2836
2836
  Math.abs(yoy),
2837
2837
  "%"
@@ -3094,7 +3094,7 @@ function chipTriggerClass(variant = "box") {
3094
3094
  }
3095
3095
  function ChipContent({ caption, value, icon }) {
3096
3096
  const stack = /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("span", { className: "flex flex-col gap-1 text-left leading-none", children: [
3097
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-[10px] uppercase tracking-wide text-text-tertiary", children: caption }),
3097
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-control-caption uppercase tracking-wide text-text-tertiary", children: caption }),
3098
3098
  /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-[12px] font-medium text-text-primary", children: value })
3099
3099
  ] });
3100
3100
  if (icon) {
@@ -3318,9 +3318,11 @@ var SIZES = {
3318
3318
  /** Matches a 15px lucide icon exactly, so a workspace name in a menu row
3319
3319
  * left-aligns with labels in icon-led rows above and below it. */
3320
3320
  xs: "h-[15px] w-[15px] rounded-[4px] text-[8px] tracking-tight",
3321
+ /** 10px, not text-control-caption: that step is for dropdown captions.
3322
+ * Two initials need to sit inside the 24px circle, a step below md. */
3321
3323
  sm: "h-6 w-6 text-[10px]",
3322
- md: "h-7 w-7 text-[11px]",
3323
- lg: "h-11 w-11 text-[15px]"
3324
+ md: "h-7 w-7 text-micro",
3325
+ lg: "h-11 w-11 text-panel-title"
3324
3326
  };
3325
3327
  function WorkspaceAvatar({ name, size = "md" }) {
3326
3328
  return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
@@ -3604,7 +3606,7 @@ function DateRangePicker({
3604
3606
  className: chipTriggerClass(),
3605
3607
  children: [
3606
3608
  /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: "flex flex-col gap-1 text-left leading-none", children: [
3607
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "text-[10px] text-text-tertiary", children: spanLabel(value, end) }),
3609
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "text-control-caption text-text-tertiary", children: spanLabel(value, end) }),
3608
3610
  /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "text-[12px] font-medium text-text-primary", children: value })
3609
3611
  ] }),
3610
3612
  /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react21.ChevronDown, { size: 14, "aria-hidden": "true", className: cn("shrink-0 text-text-secondary transition-transform", open && "rotate-180") })