@cosxai/ui 0.3.2 → 0.3.4

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.3.2",
3
+ "version": "0.3.4",
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",
@@ -346,7 +346,15 @@ export function ActionBar({
346
346
  bottom: pos.bottom,
347
347
  }),
348
348
  height: BAR_HEIGHT,
349
- padding: "0 6px 0 0",
349
+ // Symmetric horizontal padding so the bar's interior content
350
+ // area is centred. Previously only the right side had 6px
351
+ // padding (legacy from when the right edge held normal items
352
+ // and the left edge was an interactive grip), which made the
353
+ // grip sit flush against the left curve while the rightmost
354
+ // element (now the status dot) had visible breathing room.
355
+ // The asymmetry pushed the leading items a few pixels left of
356
+ // the bar's true centre.
357
+ padding: "0 6px",
350
358
  display: "flex",
351
359
  alignItems: "center",
352
360
  gap: 4,
@@ -403,6 +411,23 @@ export function ActionBar({
403
411
  </button>
404
412
  ) : null}
405
413
 
414
+ {/* Balancing leading spacer — only present when the right side
415
+ holds ONLY a status dot (no trailing items). With a left
416
+ and right spacer of equal flex weight, the leading items
417
+ centre between the grip and the status dot. Without this,
418
+ a solo leading item (e.g. just "Theme · Light") looks
419
+ left-anchored next to the grip with a visible gap before
420
+ the dot, which reads as unbalanced. When trailing items ARE
421
+ present, they take that role on the right and the leading
422
+ group goes back to its natural left-anchored packing. */}
423
+ {leadingEntries.length > 0 && trailingEntries.length === 0 && statusDot && (
424
+ <span
425
+ aria-hidden
426
+ data-ck-actionbar-spacer="leading"
427
+ style={{ flex: "1 1 auto", minWidth: 0 }}
428
+ />
429
+ )}
430
+
406
431
  {/* Leading entries — flat items + group heads with disclosure regions. */}
407
432
  {leadingEntries.map(renderEntry)}
408
433
 
@@ -414,7 +439,7 @@ export function ActionBar({
414
439
  <span
415
440
  aria-hidden
416
441
  data-ck-actionbar-spacer
417
- style={{ flex: "1 1 auto", minWidth: 12 }}
442
+ style={{ flex: "1 1 auto", minWidth: 0 }}
418
443
  />
419
444
  )}
420
445