@cosxai/ui 0.7.0 → 0.7.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/package.json
CHANGED
|
@@ -568,12 +568,19 @@ const overlayStyle: React.CSSProperties = {
|
|
|
568
568
|
zIndex: 0,
|
|
569
569
|
};
|
|
570
570
|
|
|
571
|
+
// chipStyle must NOT add any horizontal or vertical space (no
|
|
572
|
+
// padding, no margin, no border) — the textarea's underlying
|
|
573
|
+
// `@Ben Zhang` glyphs occupy the natural text width, and any extra
|
|
574
|
+
// width on the overlay chip would shift every character after it
|
|
575
|
+
// out of alignment with the textarea's caret. Instead we lean on
|
|
576
|
+
// background + color + a tight border-radius to convey "chip"
|
|
577
|
+
// without adding layout. `font-weight` stays at the inherited
|
|
578
|
+
// value for the same reason: heavier weight changes glyph advance
|
|
579
|
+
// widths and drifts the trailing text by a sub-pixel per character.
|
|
571
580
|
const chipStyle: React.CSSProperties = {
|
|
572
|
-
|
|
573
|
-
borderRadius: 4,
|
|
581
|
+
borderRadius: 3,
|
|
574
582
|
background: "var(--ck-accent-soft, rgba(37, 99, 235, 0.12))",
|
|
575
583
|
color: "var(--ck-accent, #2563eb)",
|
|
576
|
-
fontWeight: 500,
|
|
577
584
|
};
|
|
578
585
|
|
|
579
586
|
const listboxStyle: React.CSSProperties = {
|