@cosxai/ui 0.11.0 → 0.11.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosxai/ui",
3
- "version": "0.11.0",
3
+ "version": "0.11.2",
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",
@@ -415,11 +415,15 @@ export function ActionBar({
415
415
  alignItems: "center",
416
416
  gap: 4,
417
417
  zIndex: 80,
418
- // Subtle accent tint when admin mode is active so the bar reads
419
- // as "elevated privileges on" without a full colour swap.
420
- background: adminMode
421
- ? "color-mix(in oklab, var(--ck-accent, #4f46e5) 8%, var(--ck-bg-surface))"
422
- : "var(--ck-bg-surface)",
418
+ // Bar background stays constant across modes the earlier
419
+ // whole-bar tint composited under the item hover overlay
420
+ // (cool grey on tinted warm base) produced an awkward green
421
+ // cast on hover, and competed with the shield toggle for
422
+ // signal. Border colour DOES swap to accent when admin mode
423
+ // is on so the elevated state reads at a glance without a
424
+ // heavy surface change; the shield glyph adds a second cue
425
+ // (outline off → filled on) at the toggle itself.
426
+ background: "var(--ck-bg-surface)",
423
427
  border: `1px solid ${
424
428
  adminMode
425
429
  ? "var(--ck-accent, #4f46e5)"
@@ -429,9 +433,7 @@ export function ActionBar({
429
433
  boxShadow: "var(--ck-shadow-3)",
430
434
  fontFamily: "var(--ck-font-sans)",
431
435
  color: "var(--ck-text-primary)",
432
- transition:
433
- "background 260ms cubic-bezier(0.34, 1.56, 0.64, 1)," +
434
- "border-color 260ms cubic-bezier(0.34, 1.56, 0.64, 1)",
436
+ transition: "border-color 200ms var(--ck-ease, ease)",
435
437
  ...style,
436
438
  }}
437
439
  >
@@ -481,8 +483,9 @@ export function ActionBar({
481
483
  {/* Admin-mode toggle. Only renders when at least one registered
482
484
  item has adminOnly=true. Borderless, transparent bg — same
483
485
  visual weight as the drag grip and the item icons around
484
- it. Muted stroke by default, accent stroke + subtle scale
485
- when active. Icon: shield (elevated privileges). */}
486
+ it. State polarity lives on the glyph itself: outline shield
487
+ (off) filled shield (on). No background pill, no whole-bar
488
+ tint — the icon is the whole affordance. */}
486
489
  {hasAdminItems && (
487
490
  <button
488
491
  type="button"
@@ -508,20 +511,18 @@ export function ActionBar({
508
511
  : "var(--ck-text-secondary, #666)",
509
512
  border: "none",
510
513
  cursor: "pointer",
511
- transform: adminMode ? "scale(1.06)" : "scale(1)",
512
- // Spring-ish easing so the tint + scale feel connected
513
- // rather than mechanical — matches ck-actionbar-enter's
514
- // curve for family consistency.
515
- transition:
516
- "color 260ms cubic-bezier(0.34, 1.56, 0.64, 1)," +
517
- "transform 260ms cubic-bezier(0.34, 1.56, 0.64, 1)",
514
+ transition: "color 200ms var(--ck-ease, ease)",
518
515
  }}
519
516
  >
520
517
  <svg
521
518
  width="16"
522
519
  height="16"
523
520
  viewBox="0 0 24 24"
524
- fill="none"
521
+ // Outline when off, filled when on. Stroke stays on in
522
+ // both states so the silhouette is identical — only the
523
+ // interior fills — which reads as "same shape, different
524
+ // state" instead of two distinct glyphs.
525
+ fill={adminMode ? "currentColor" : "none"}
525
526
  stroke="currentColor"
526
527
  strokeWidth="1.8"
527
528
  strokeLinecap="round"