feat(design): the button families on the decided ladder, first half of the sweep (E28 S3b1)

Button is rebuilt to A1/B1/B3: explicit heights (xs 24 / sm 28 / md 32, lg 40 for a hero CTA), r8 (a
pill on media), state layers instead of opacity and bg-card hovers, a `pressed` toggle, `overlay`,
`media` and `link-muted` variants. The icon-only sizes move to the new IconButton (28 / 32, 48 only for
the Play on a picture; a required label). Pressable (a card, row or tile that is the control) and
DragHandle join them. The state-* utilities now stand down on a disabled, busy or pressed control, held
by theme.contract.test.ts.

Swept onto them: the Button icon-size callers and 16 files (Plex playlist, Plex detail, the YT player
modal chrome, Welcome, Plex and video cards with AddToPlaylist and DownloadButton, the video editor,
Feed, personal views, Scheduler, Users, the nav rail, Plex detail parts, Settings): 268 raw buttons are
153. Fixed on the way: FocusSafeButton overwrote a caller's aria-disabled (the "unavailable, here is
why" state; adminInvites caught it), a season toggle and a Plex settings switch had no name/state, and
the video card's overlay follows the C5 card (Resume pill, From the start pill, a round Play).
This commit is contained in:
2026-09-24 05:25:55 +02:00
parent 7d480e2ad0
commit 86f467bd65
42 changed files with 1304 additions and 1036 deletions
+9 -7
View File
@@ -64,12 +64,14 @@
/* ===== E28 tokens as utilities (docs/DESIGN.md) — the ONE source the ui/ primitives and the design
lab both read, so a decided value is never restated as an arbitrary class. ===== */
/* B3: a transparent control's hover / pressed layer. */
/* B3: a transparent control's hover / pressed layer. The layer answers only a control that can act:
not a disabled one, not a busy one (FocusSafeButton's aria-disabled), and not a pressed toggle, whose
solid accent is its state and must not turn grey under the pointer. */
@utility state-layer {
&:hover {
&:hover:not(:disabled, [aria-disabled="true"], [aria-pressed="true"]) {
background-color: var(--hover);
}
&:active {
&:active:not(:disabled, [aria-disabled="true"], [aria-pressed="true"]) {
background-color: var(--press);
}
}
@@ -77,20 +79,20 @@
@utility state-filled {
background-color: var(--accent);
color: var(--accent-fg);
&:hover {
&:hover:not(:disabled, [aria-disabled="true"]) {
background-color: color-mix(in srgb, var(--accent-fg) 14%, var(--accent));
}
&:active {
&:active:not(:disabled, [aria-disabled="true"]) {
background-color: color-mix(in srgb, var(--accent-fg) 24%, var(--accent));
}
}
@utility state-danger {
background-color: var(--danger);
color: var(--danger-fg);
&:hover {
&:hover:not(:disabled, [aria-disabled="true"]) {
background-color: color-mix(in srgb, var(--danger-fg) 14%, var(--danger));
}
&:active {
&:active:not(:disabled, [aria-disabled="true"]) {
background-color: color-mix(in srgb, var(--danger-fg) 24%, var(--danger));
}
}