@mediaradar/design-components 0.60.0 → 0.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/approved-components.json +1 -1
- package/dist/index.cjs +16 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -6
- package/dist/index.d.ts +17 -6
- package/dist/index.js +16 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5970,7 +5970,7 @@ function FilterDrawer({
|
|
|
5970
5970
|
onClose,
|
|
5971
5971
|
sections,
|
|
5972
5972
|
renderSection,
|
|
5973
|
-
activeCount
|
|
5973
|
+
activeCount: _activeCount,
|
|
5974
5974
|
onClearSection,
|
|
5975
5975
|
onClearAll,
|
|
5976
5976
|
onApply,
|
|
@@ -6040,11 +6040,11 @@ function FilterDrawer({
|
|
|
6040
6040
|
{
|
|
6041
6041
|
size: 17,
|
|
6042
6042
|
"aria-hidden": "true",
|
|
6043
|
-
className: x
|
|
6043
|
+
className: inUse(x) ? "text-brand-primaryAction" : "text-text-secondary"
|
|
6044
6044
|
}
|
|
6045
6045
|
),
|
|
6046
6046
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "flex-1 text-sm font-medium text-text-primary", children: x.label }),
|
|
6047
|
-
|
|
6047
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(SectionMark, { section: x }),
|
|
6048
6048
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_lucide_react33.ChevronRight, { size: 16, "aria-hidden": "true", className: "shrink-0 text-text-secondary" })
|
|
6049
6049
|
]
|
|
6050
6050
|
}
|
|
@@ -6071,11 +6071,9 @@ function FilterDrawer({
|
|
|
6071
6071
|
}
|
|
6072
6072
|
),
|
|
6073
6073
|
focused.label,
|
|
6074
|
+
(focused.count ?? 0) > 0 && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(CountBadge, { count: focused.count }),
|
|
6074
6075
|
focused.info && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(InfoTip, { text: focused.info, label: `About ${focused.label}` })
|
|
6075
|
-
] }) :
|
|
6076
|
-
"Filters",
|
|
6077
|
-
activeCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Badge, { tone: "brandSolid", kind: "count", children: activeCount })
|
|
6078
|
-
] }),
|
|
6076
|
+
] }) : "Filters",
|
|
6079
6077
|
footer: focused ? (
|
|
6080
6078
|
// Picks are kept as they're made; only See results, on the list, applies them.
|
|
6081
6079
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "flex w-full items-center", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Button, { variant: "link", size: "md", onClick: () => onClearSection(focused.id), className: "px-0", children: "Clear" }) })
|
|
@@ -6121,6 +6119,17 @@ function FilterDrawer({
|
|
|
6121
6119
|
}
|
|
6122
6120
|
);
|
|
6123
6121
|
}
|
|
6122
|
+
var inUse = (x) => (x.count ?? 0) > 0 || !!x.badge;
|
|
6123
|
+
function CountBadge({ count }) {
|
|
6124
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(Badge, { tone: "brandSolid", kind: "count", children: [
|
|
6125
|
+
count,
|
|
6126
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "sr-only", children: " selected" })
|
|
6127
|
+
] });
|
|
6128
|
+
}
|
|
6129
|
+
function SectionMark({ section }) {
|
|
6130
|
+
if ((section.count ?? 0) > 0) return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(CountBadge, { count: section.count });
|
|
6131
|
+
return section.badge ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Badge, { tone: "brand", children: section.badge }) : null;
|
|
6132
|
+
}
|
|
6124
6133
|
|
|
6125
6134
|
// src/AllFiltersButton.tsx
|
|
6126
6135
|
var import_react34 = require("react");
|