@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 +1 -1
- package/src/actionbar/ActionBar.tsx +17 -23
package/package.json
CHANGED
|
@@ -415,23 +415,18 @@ export function ActionBar({
|
|
|
415
415
|
alignItems: "center",
|
|
416
416
|
gap: 4,
|
|
417
417
|
zIndex: 80,
|
|
418
|
-
//
|
|
419
|
-
//
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
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.
|
|
485
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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"
|