@cosxai/ui 0.2.7 → 0.2.9

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosxai/ui",
3
- "version": "0.2.7",
3
+ "version": "0.2.9",
4
4
  "description": "COSX design system — React 19 component primitives shared across product-meta and other consumers",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -70,7 +70,7 @@ export function ActionBarButton({
70
70
  ...style,
71
71
  }}
72
72
  >
73
- {icon}
73
+ {icon != null && <span className="ck-actionbar-icon">{icon}</span>}
74
74
  <span className={responsiveLabel ? "ck-actionbar-label" : undefined}>
75
75
  {label}
76
76
  </span>
@@ -4,6 +4,19 @@
4
4
  this file being loaded, but consumers should import it to get
5
5
  the cross-fade theme transitions and reduced-motion handling. */
6
6
 
7
+ /* Inheritance-friendly box-sizing — modern reset best practice.
8
+ Without it, `min-height: 100vh` + padding silently extends the
9
+ element BEYOND the viewport (default `content-box` makes padding
10
+ stack ON TOP of the declared min-height), introducing a sneaky
11
+ scroll on any consumer page that combines those two properties.
12
+ Every modern reset (Eric Meyer 2014, Tailwind preflight,
13
+ Bootstrap, modern-normalize) ships this — @cosxai/ui matches. */
14
+ *,
15
+ *::before,
16
+ *::after {
17
+ box-sizing: border-box;
18
+ }
19
+
7
20
  html,
8
21
  body {
9
22
  background: var(--ck-bg-canvas);
@@ -172,6 +172,22 @@ html[data-ck-chrome="seamless"] .ck-card__foot {
172
172
  cursor: not-allowed;
173
173
  }
174
174
 
175
+ /* Icon glyph wrapper — sized larger than the button's 13 px label
176
+ text so unicode symbols (◐ ☀ ☾ ◇) and small SVGs read clearly.
177
+ ActionBarButton wraps the icon prop in this span automatically;
178
+ callers don't need to opt in. The 1 px upward translate
179
+ compensates for geometric glyphs sitting about 1 px below their
180
+ em-box centre — flex centring otherwise leaves them looking
181
+ slightly low next to the heavier label text. */
182
+ .ck-actionbar-icon {
183
+ display: inline-flex;
184
+ align-items: center;
185
+ justify-content: center;
186
+ font-size: 16px;
187
+ line-height: 1;
188
+ transform: translateY(-1px);
189
+ }
190
+
175
191
  /* Hide labels below 768 px (the standard md breakpoint).
176
192
  Icons + tooltips remain — the bar's still informative on phones. */
177
193
  @media (max-width: 767px) {