@cosxai/ui 0.11.0 → 0.11.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosxai/ui",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
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,23 +415,18 @@ 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)",
423
- border: `1px solid ${
424
- adminMode
425
- ? "var(--ck-accent, #4f46e5)"
426
- : "var(--ck-border-subtle)"
427
- }`,
418
+ // Bar chrome stays constant across admin/viewer modes the
419
+ // whole-bar tint + accent border in earlier versions competed
420
+ // with the shield toggle for signal and produced awkward hue
421
+ // shifts under the item hover overlay (cool grey on tinted
422
+ // warm base read as green). Mode state lives entirely on the
423
+ // shield now: outline glyph = off, filled glyph = on.
424
+ background: "var(--ck-bg-surface)",
425
+ border: "1px solid var(--ck-border-subtle)",
428
426
  borderRadius: 999,
429
427
  boxShadow: "var(--ck-shadow-3)",
430
428
  fontFamily: "var(--ck-font-sans)",
431
429
  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)",
435
430
  ...style,
436
431
  }}
437
432
  >
@@ -481,8 +476,9 @@ export function ActionBar({
481
476
  {/* Admin-mode toggle. Only renders when at least one registered
482
477
  item has adminOnly=true. Borderless, transparent bg — same
483
478
  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). */}
479
+ it. State polarity lives on the glyph itself: outline shield
480
+ (off) filled shield (on). No background pill, no whole-bar
481
+ tint — the icon is the whole affordance. */}
486
482
  {hasAdminItems && (
487
483
  <button
488
484
  type="button"
@@ -508,20 +504,18 @@ export function ActionBar({
508
504
  : "var(--ck-text-secondary, #666)",
509
505
  border: "none",
510
506
  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)",
507
+ transition: "color 200ms var(--ck-ease, ease)",
518
508
  }}
519
509
  >
520
510
  <svg
521
511
  width="16"
522
512
  height="16"
523
513
  viewBox="0 0 24 24"
524
- fill="none"
514
+ // Outline when off, filled when on. Stroke stays on in
515
+ // both states so the silhouette is identical — only the
516
+ // interior fills — which reads as "same shape, different
517
+ // state" instead of two distinct glyphs.
518
+ fill={adminMode ? "currentColor" : "none"}
525
519
  stroke="currentColor"
526
520
  strokeWidth="1.8"
527
521
  strokeLinecap="round"