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