@mediaradar/design-components 0.46.0 → 0.47.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 +4 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -3
- package/dist/index.d.ts +15 -3
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -648,12 +648,13 @@ var KIND = {
|
|
|
648
648
|
// are harder to read than the sentence case they replaced.
|
|
649
649
|
eyebrow: "px-2.5 py-1 uppercase tracking-wider",
|
|
650
650
|
// What a thing IS (a topic, a category) rather than a signal about it.
|
|
651
|
-
//
|
|
651
|
+
// Quiet grey whatever `tone` says (only `highlight` changes it): colour here would read
|
|
652
652
|
// as meaning, and a category has none. This is the old Tag.
|
|
653
653
|
category: "px-2 py-1"
|
|
654
654
|
};
|
|
655
655
|
var CATEGORY = "bg-subtle font-medium text-text-tertiary";
|
|
656
|
-
|
|
656
|
+
var CATEGORY_HIGHLIGHT = "bg-brand-primarySoft font-semibold text-brand-primaryAction";
|
|
657
|
+
function Badge({ tone = "neutral", kind = "label", dot = false, highlight = false, children, className, testIdPrefix }) {
|
|
657
658
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
658
659
|
"span",
|
|
659
660
|
{
|
|
@@ -665,7 +666,7 @@ function Badge({ tone = "neutral", kind = "label", dot = false, children, classN
|
|
|
665
666
|
// badge is almost always beside flexible text that would otherwise
|
|
666
667
|
// squash it. `whitespace-nowrap` because a wrapped badge is a bug.
|
|
667
668
|
"inline-flex shrink-0 items-center gap-1 whitespace-nowrap rounded-full text-micro leading-none",
|
|
668
|
-
kind === "category" ? CATEGORY : cn("font-semibold", TONE[tone]),
|
|
669
|
+
kind === "category" ? highlight ? CATEGORY_HIGHLIGHT : CATEGORY : cn("font-semibold", TONE[tone]),
|
|
669
670
|
KIND[kind],
|
|
670
671
|
className
|
|
671
672
|
),
|