@mediaradar/design-components 0.46.0 → 0.48.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 +9 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -7
- package/dist/index.d.ts +20 -7
- package/dist/index.js +9 -8
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -194,7 +194,7 @@ function InfoTip({ text, size = 11, label = "More information", trigger = "click
|
|
|
194
194
|
onMouseEnter: trigger === "hover" ? cancelClose : void 0,
|
|
195
195
|
onMouseLeave: trigger === "hover" ? closeSoon : void 0,
|
|
196
196
|
style: { position: "fixed", top: pos.top, left: pos.left, width: pos.width },
|
|
197
|
-
className: "z-
|
|
197
|
+
className: "z-tooltip rounded-control border border-border-default bg-surface px-3 py-2 text-xs font-normal not-italic normal-case leading-relaxed tracking-normal text-text-secondary shadow-overlay",
|
|
198
198
|
children: text
|
|
199
199
|
}
|
|
200
200
|
),
|
|
@@ -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
|
),
|
|
@@ -2021,7 +2022,7 @@ function SelectFilter({
|
|
|
2021
2022
|
"data-testid": testIdPrefix && `${testIdPrefix}-popover`,
|
|
2022
2023
|
style: { position: "fixed", top: pos.top, left: pos.left, right: pos.right, width: fullWidth ? pos.width : void 0 },
|
|
2023
2024
|
className: cn(
|
|
2024
|
-
"z-
|
|
2025
|
+
"z-dropdown flex flex-col overflow-hidden rounded-card border border-border-default bg-surface shadow-overlay",
|
|
2025
2026
|
!fullWidth && (sm ? "w-max min-w-28 max-w-72" : "w-56")
|
|
2026
2027
|
),
|
|
2027
2028
|
role: loading || error ? "group" : "listbox",
|
|
@@ -2647,7 +2648,7 @@ function Tooltip({
|
|
|
2647
2648
|
onMouseLeave: interactive ? hide : void 0,
|
|
2648
2649
|
onTransitionEnd: onBoxTransitionEnd,
|
|
2649
2650
|
className: cn(
|
|
2650
|
-
"fixed z-
|
|
2651
|
+
"fixed z-tooltip w-max max-w-xs whitespace-normal break-words px-2.5 py-1.5 text-xs leading-snug",
|
|
2651
2652
|
// Fade in/out. The sys duration token rather than a ref one:
|
|
2652
2653
|
// it is what Button's hover/press transition uses, and a
|
|
2653
2654
|
// tooltip's fade is the same kind of interactive feedback.
|
|
@@ -3009,7 +3010,7 @@ function SelectionPicker({
|
|
|
3009
3010
|
"div",
|
|
3010
3011
|
{
|
|
3011
3012
|
className: cn(
|
|
3012
|
-
"grid items-center gap-2 border-b border-border-default bg-canvas px-3 py-2 text-micro font-semibold uppercase tracking-
|
|
3013
|
+
"grid items-center gap-2 border-b border-border-default bg-canvas px-3 py-2 text-micro font-semibold uppercase tracking-wider text-text-secondary",
|
|
3013
3014
|
rowGridCols
|
|
3014
3015
|
),
|
|
3015
3016
|
children: [
|
|
@@ -3297,7 +3298,7 @@ function FilterDropdown({
|
|
|
3297
3298
|
role: "group",
|
|
3298
3299
|
"aria-label": filter.label,
|
|
3299
3300
|
style: { top: pos.top, left: pos.left },
|
|
3300
|
-
className: "fixed z-
|
|
3301
|
+
className: "fixed z-dropdown min-w-55 rounded-card border border-border-default bg-surface p-2 shadow-overlay",
|
|
3301
3302
|
children: [
|
|
3302
3303
|
searchable && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "mb-1.5 flex h-8 items-center gap-2 rounded-control border border-border-strong bg-input px-2.5", children: [
|
|
3303
3304
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react15.Search, { size: 14, className: "shrink-0 text-text-secondary", "aria-hidden": "true" }),
|