@godxjp/ui 16.9.1 → 16.9.2
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.
|
@@ -104,7 +104,7 @@ function Badge({
|
|
|
104
104
|
...props,
|
|
105
105
|
children: [
|
|
106
106
|
ResolvedIcon ? /* @__PURE__ */ jsx(ResolvedIcon, { "data-slot": "badge-icon", "aria-hidden": "true" }) : null,
|
|
107
|
-
resolvedChildren
|
|
107
|
+
resolvedChildren != null ? /* @__PURE__ */ jsx("span", { "data-slot": "badge-label", children: resolvedChildren }) : null
|
|
108
108
|
]
|
|
109
109
|
}
|
|
110
110
|
);
|
|
@@ -21,6 +21,19 @@
|
|
|
21
21
|
white-space: nowrap;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
/* Optical vertical centering. JP faces (Noto Sans JP / M PLUS 2) declare ascent ≫ descent
|
|
25
|
+
* (~1.16em vs ~0.29em), so flex-centering the em box seats the label visibly LOW in the chip
|
|
26
|
+
* (worst with short lowercase labels: "owner", "active"). Trimming the line box to
|
|
27
|
+
* cap-height/alphabetic makes the INK the thing that gets centered, and drops the phantom
|
|
28
|
+
* leading so the chip height comes from --badge-space-y + the glyphs, not the font's em box.
|
|
29
|
+
* No-support browsers simply keep the legacy (slightly low) rendering. */
|
|
30
|
+
@supports (text-box-trim: trim-both) and (text-box-edge: cap alphabetic) {
|
|
31
|
+
[data-slot="badge-label"] {
|
|
32
|
+
text-box-trim: trim-both;
|
|
33
|
+
text-box-edge: cap alphabetic;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
24
37
|
[data-slot="badge-icon"] {
|
|
25
38
|
width: 0.75rem;
|
|
26
39
|
height: 0.75rem;
|