@mediaradar/design-components 0.17.0 → 0.18.1

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
@@ -1562,7 +1562,7 @@ function SelectFilter({
1562
1562
  // src/Card.tsx
1563
1563
  var import_react8 = require("react");
1564
1564
  var import_jsx_runtime12 = require("react/jsx-runtime");
1565
- var Card = (0, import_react8.forwardRef)(function Card2({ staticCard, title, subtitle, action, className, children, ...rest }, ref) {
1565
+ var Card = (0, import_react8.forwardRef)(function Card2({ staticCard, title, titleAs: TitleTag = "h3", subtitle, action, className, children, ...rest }, ref) {
1566
1566
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1567
1567
  "article",
1568
1568
  {
@@ -1577,8 +1577,8 @@ var Card = (0, import_react8.forwardRef)(function Card2({ staticCard, title, sub
1577
1577
  children: title ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-1 flex-col p-card-padding", children: [
1578
1578
  /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-start justify-between gap-2", children: [
1579
1579
  /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
1580
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h3", { className: "text-[15px] font-semibold leading-snug text-text-primary", children: title }),
1581
- subtitle && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "mt-0.5 text-[12px] leading-snug text-text-tertiary", children: subtitle })
1580
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(TitleTag, { className: "text-style-card-title", children: title }),
1581
+ subtitle && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "mt-0.5 text-xs leading-snug text-text-tertiary", children: subtitle })
1582
1582
  ] }),
1583
1583
  action && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "shrink-0 text-text-tertiary", children: action })
1584
1584
  ] }),
@@ -2421,7 +2421,8 @@ function SelectionPicker({
2421
2421
  "grid items-center gap-2 px-3 py-2.5",
2422
2422
  rowGridCols,
2423
2423
  isLocked ? "cursor-default opacity-50" : "cursor-pointer hover:bg-subtle",
2424
- !isLocked && isSel && "opacity-60"
2424
+ // 70%, not lower: selected rows' text must keep 4.5:1 contrast.
2425
+ !isLocked && isSel && "opacity-70"
2425
2426
  ),
2426
2427
  children: [
2427
2428
  isLocked ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { "aria-hidden": "true" }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
@@ -2656,7 +2657,6 @@ function FilterDropdown({
2656
2657
  ref: btnRef,
2657
2658
  type: "button",
2658
2659
  onClick: () => setOpen((v) => !v),
2659
- "aria-haspopup": "menu",
2660
2660
  "aria-expanded": open,
2661
2661
  "data-testid": testIdPrefix && `${testIdPrefix}-filter-${filterSlug}`,
2662
2662
  className: "inline-flex h-9 items-center gap-1.5 whitespace-nowrap rounded-control border border-border-default bg-input px-3 text-[13px] font-medium text-text-secondary transition-colors hover:bg-subtle",
@@ -2671,7 +2671,7 @@ function FilterDropdown({
2671
2671
  "div",
2672
2672
  {
2673
2673
  ref: menuRef,
2674
- role: "menu",
2674
+ role: "group",
2675
2675
  "aria-label": filter.label,
2676
2676
  style: { top: pos.top, left: pos.left },
2677
2677
  className: "fixed z-[80] min-w-[220px] rounded-card border border-border-default bg-surface p-2 shadow-overlay",