@apliteni/apliteni-ui 0.165.2 → 0.166.0

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.
@@ -328,6 +328,7 @@ page before anything is clicked. A panel adds nothing to the page's scrollable w
328
328
  `--ui-dropdown-edge` is the gap a panel keeps from the edge of the view. Set it to 0 for a panel
329
329
  flush with the edge, or wider for more room. A view that cannot afford the gap on both sides halves
330
330
  it. At 720px and below the gap is the page margin, 16px, so a panel lines up with the page's text.
331
+ Where a phone's safe area is wider than 16px, the gap is the safe area.
331
332
 
332
333
  **A panel has a floor and a ceiling.** The floor is the kit's 240px, which is what makes a list of
333
334
  rows readable. The ceiling is the view less that gap at each side. The floor wins where the two
@@ -689,11 +690,15 @@ width. **A link
689
690
  inside a cell uses the row's ink, gets an underline on hover, and uses the shared ring on
690
691
  `:focus-visible`**. The ring surrounds the whole link, including a title-cell link that wraps.
691
692
  `numericValue` distinguishes missing from zero. `deltaValue` prints your sign and uses your
692
- explicit judgement. **Colour never supplies the sign.**
693
+ explicit judgement. **Colour never supplies the sign.** **Every body and header cell aligns its
694
+ content to the top**, so when one cell wraps, the other values stay level with its first line. A
695
+ React sort mark stands on the first line of a wrapped label. A badge, a logo, a selection box or
696
+ an icon button in a cell stays level with the text beside it.
693
697
 
694
698
  **A hover table that is neither zebra nor dense is a row table.** Its body rows have no lines
695
699
  and no column lines, and the head keeps its rule. **A row is 48px tall, 36px with `compact` and
696
- 56px with `comfortable`**, and larger or wrapped content makes it taller. Hover gives the row a
700
+ 56px with `comfortable`**, and larger or wrapped content makes it taller. The space above a
701
+ row's first line centres that line in this height, so a one-line row looks centred. Hover gives the row a
697
702
  neutral fill, and a checked selection box gives it an accent wash. Both fills are square, and the
698
703
  first and last content sit 12px inside them. The name
699
704
  in the first column takes the strongest ink. **`.ui-table__sub` puts a second value under the
@@ -30,4 +30,5 @@ Each row names one guideline page, the screen parts it covers, and when to read
30
30
  | [Hover readouts](hover-readouts.md) | Hover values, their placement and touch access. | Read it before you show values on hover or tap. |
31
31
  | [Going back](going-back.md) | The back link, its destination and the parent address. | Read it when a page sits under another page. |
32
32
  | [Account and settings](account-and-settings.md) | The account window, the account menu and settings rows. | Read it before you build the account menu or settings. |
33
+ | [Notifications](notifications.md) | The bell, its unread count, read state and a failed load. | Read it before you build a bell or a notifications list. |
33
34
  | [Guidelines](overview.md) | No screen parts. The file holds only the collection heading. | Read it only for the heading. The six-card overview is in Storybook, not in the package. |
@@ -100,6 +100,18 @@
100
100
 
101
101
  **Don't:** Lay a badge, a control or a picture along it, or make it a flex or grid box.
102
102
 
103
+ ## Align cells to the top
104
+
105
+ <!-- rule: top-align -->
106
+
107
+ **Why:** When one cell wraps, values centred in the taller row no longer sit on the line they belong to.
108
+
109
+ **Rule:** Align every cell, header and sort mark with the first line of its row.
110
+
111
+ **Do:** Keep the status and the amount level with the payee's name when a second line follows the name.
112
+
113
+ **Don't:** Centre the values between the two lines of a taller row.
114
+
103
115
  ## Keep updates stable
104
116
 
105
117
  <!-- rule: states -->
@@ -0,0 +1,43 @@
1
+ # Notifications
2
+
3
+ ## Keep missed events in the bell
4
+
5
+ <!-- rule: bell-toast-callout -->
6
+
7
+ **Rule:** Put an event that the reader can miss in the bell.
8
+
9
+ **Why:** A toast closes after 5 seconds.
10
+
11
+ **Except:** A toast for the reader's own action, such as Saved, stays out of the bell.
12
+
13
+ **Do:** Show “99+” above 99, and name the bell “Notifications, 120 unread”.
14
+
15
+ **Don't:** Report a failed run only in a toast.
16
+
17
+ ## Mark read on open
18
+
19
+ <!-- rule: read-state -->
20
+
21
+ **Rule:** Mark a notification read when the reader opens it, and let a toast undo Mark all read.
22
+
23
+ **Why:** One Undo restores the set, so a confirmation only adds a click.
24
+
25
+ **Do:** Show “3 notifications marked read” with Undo.
26
+
27
+ **Don't:** Ask “Mark all notifications read?” first.
28
+
29
+ **Gap #798:** The kit has no unread row weight, so only hidden text marks the row.
30
+
31
+ ## Show a failed load as an error
32
+
33
+ <!-- rule: failed-load -->
34
+
35
+ **Rule:** When a list or a panel fails to load, say so and offer Retry.
36
+
37
+ **Why:** “No notifications” after a failure tells the reader that nothing happened.
38
+
39
+ **Do:** Show “Notifications did not load” with Retry.
40
+
41
+ **Don't:** Show “No notifications” after a failed request.
42
+
43
+ **Gap #798:** The dropdown has no error part, so a panel uses the empty state.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apliteni/apliteni-ui",
3
- "version": "0.165.2",
3
+ "version": "0.166.0",
4
4
  "workspaces": [
5
5
  "react"
6
6
  ],
@@ -429,7 +429,7 @@
429
429
  all: unset;
430
430
  cursor: pointer;
431
431
  display: inline-flex;
432
- align-items: center;
432
+ align-items: flex-start;
433
433
  font: inherit;
434
434
  color: inherit;
435
435
  }
@@ -1087,15 +1087,6 @@
1087
1087
  clip-path: inset(-100vmax var(--toast-card-clip, -100vmax) var(--toast-card-clip, -100vmax));
1088
1088
  transition: translate var(--dur-med) var(--ease), scale var(--dur-med) var(--ease);
1089
1089
  }
1090
- .ui-toast-stack--collapsed > .ui-toast > .ui-toast__icon,
1091
- .ui-toast-stack--collapsed > .ui-toast > .ui-toast__body,
1092
- .ui-toast-stack--collapsed > .ui-toast > .ui-toast__action {
1093
- margin-block: auto;
1094
- }
1095
- .ui-toast-stack--collapsed:hover > .ui-toast > *,
1096
- .ui-toast-stack--collapsed:focus-within > .ui-toast > * {
1097
- margin-block: 0;
1098
- }
1099
1090
  .ui-toast-stack--collapsed:hover,
1100
1091
  .ui-toast-stack--collapsed:focus-within {
1101
1092
  height: var(--toast-fan-height, auto);
@@ -12,7 +12,8 @@
12
12
  /* rank: chip */
13
13
  font-size: var(--text-xs);
14
14
  font-weight: var(--weight-semibold);
15
- padding: 3px 9px;
15
+ --badge-pad-y: 3px;
16
+ padding: var(--badge-pad-y) 9px;
16
17
  border-radius: var(--radius-pill);
17
18
  color: var(--text);
18
19
  background: var(--chip-neutral-fill);
@@ -36,7 +36,7 @@
36
36
  .ui-toast {
37
37
  position: relative;
38
38
  display: flex;
39
- align-items: center;
39
+ align-items: flex-start; /* every part centres on the first line: a glyph or a button never drifts to the middle of a wrapped text */
40
40
  gap: 12px;
41
41
  padding: var(--space-3);
42
42
  border-radius: var(--radius-sm);
@@ -58,28 +58,28 @@
58
58
  .ui-toast--info { --toast-accent: var(--cyan); --toast-action-ink: var(--chip-info-ink); --toast-glow: var(--glow-cyan); --toast-on: var(--signal-contrast); --toast-solid: var(--signal-solid-info); }
59
59
  .ui-toast--neutral { --toast-accent: var(--muted); --toast-action-ink: var(--text); --toast-glow: var(--surface); --toast-on: var(--signal-solid-ink); --toast-solid: var(--signal-solid-neutral); }
60
60
 
61
- .ui-toast__icon { width: 22px; height: 22px; flex: none; display: grid; place-items: center; background: transparent; color: var(--toast-action-ink); }
61
+ .ui-toast__icon { width: 22px; height: 1lh; flex: none; display: grid; place-items: center; background: transparent; color: var(--toast-action-ink); }
62
62
  .ui-toast__icon svg { width: var(--space-4); height: var(--space-4); stroke: currentColor; fill: none; stroke-width: 2.25; } /* 16px × 2.25 / 24 = 1.5 CSS px. */
63
63
  .ui-toast__body { flex: 1; min-width: 0; }
64
64
  .ui-toast__title { font-weight: var(--weight-medium); color: var(--strong); }
65
65
  .ui-toast__text { color: var(--text); }
66
66
 
67
67
  /* Tone ink keeps actions readable on the neutral surface. */
68
- .ui-toast__action { flex: none; align-self: center; background: none; border: 0; padding: 4px 9px; border-radius: var(--radius-xs); font: inherit; font-weight: var(--weight-medium); color: var(--toast-action-ink); cursor: pointer; }
68
+ .ui-toast__action { flex: none; margin-block: -4px; /* the fill overhangs the first line by its own padding */ background: none; border: 0; padding: 4px 9px; border-radius: var(--radius-xs); font: inherit; font-weight: var(--weight-medium); color: var(--toast-action-ink); cursor: pointer; }
69
69
  .ui-toast__action:hover { background: color-mix(in srgb, var(--bg) 55%, transparent); /* code-bg: inherit — control paint; the containing surface is the ground, for a chip and for a band alike. */ }
70
70
  .ui-toast__action:focus-visible { outline: var(--ring); outline-offset: var(--ring-offset); }
71
71
 
72
- .ui-toast__close { flex: none; align-self: flex-start; background: none; border: 0; /* muted-ink: glyph — dismiss icon */ color: var(--muted); cursor: pointer; padding: 2px; display: grid; place-items: center; position: relative; font: inherit; }
72
+ .ui-toast__close { flex: none; align-self: flex-start; background: none; border: 0; /* muted-ink: glyph — dismiss icon */ color: var(--muted); cursor: pointer; height: 1lh; padding: 0 2px; display: grid; place-items: center; position: relative; font: inherit; }
73
73
  .ui-toast__close svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2.5; }
74
74
  /* The target, not the ink. WCAG 2.5.8 measures what a pointer can land on, and
75
- the drawn button is 19x19 — a 15px glyph in 2px of padding. Growing the box
76
- to 24 would push the glyph 2.5px off the corner it is aligned to, so the
75
+ the drawn button is 19px wide and one line tall, a 15px glyph centred on the
76
+ first line. Growing the box to 24 would push the glyph off that line, so the
77
77
  TARGET grows instead and the glyph does not move at all.
78
78
  Centred, so the overhang is 2.5px on every side. It has 12px of flex gap to
79
79
  .ui-toast__action beside it and 12px between stacked toasts, so it reaches no
80
80
  neighbouring target; .ui-toast's overflow: hidden clips at 12px of padding,
81
81
  well outside it. Measured, not asserted:
82
- stories/guidelines/accessibility-floor.test.js reads this rule out of the
82
+ stories/tap-zone.test.js reads this rule out of the
83
83
  sheet and reports the target it makes. #219 */
84
84
  .ui-toast__close::before {
85
85
  content: '';
@@ -216,10 +216,13 @@
216
216
  at the room the viewport left either way. #489 */
217
217
  .ui-dropdown__panel.is-scroll { --ui-dropdown-cap: var(--ui-dropdown-max); }
218
218
 
219
- /* On a phone, the panel keeps the page's 16px margin at the shell fold.
219
+ /* On a phone, the panel keeps the page's 16px margin at the shell fold, or the wider
220
+ safe-area inset, the gap the phone account window keeps. Registered as a length so
221
+ the wiring reads one number, not the max() expression. #808
220
222
  why: docs/components.md#the-dropdown-panel */
223
+ @property --ui-dropdown-edge { syntax: "<length>"; inherits: true; initial-value: 8px; }
221
224
  @media (max-width: 720px) {
222
- .ui-dropdown__panel { --ui-dropdown-edge: var(--space-4); }
225
+ .ui-dropdown__panel { --ui-dropdown-edge: max(var(--space-4), env(safe-area-inset-left), env(safe-area-inset-right)); }
223
226
  }
224
227
 
225
228
  /* The wiring adds this where the room is below the floor: even spending the whole
@@ -378,7 +381,8 @@
378
381
  /* rank: chip */
379
382
  font-size: var(--text-xs);
380
383
  font-weight: var(--weight-semibold);
381
- padding: 3px 9px;
384
+ --ui-dropdown-badge-pad: 3px;
385
+ padding: var(--ui-dropdown-badge-pad) 9px;
382
386
  border-radius: var(--radius-pill);
383
387
  margin-left: auto;
384
388
  flex: none;
@@ -390,6 +394,17 @@
390
394
  }
391
395
  .ui-dropdown__badge.is-live { color: var(--chip-success-ink); background: var(--chip-success-fill); /* code-bg: inherit — decorative or text-only surface has no nested chip. */ }
392
396
 
397
+ /* A row with a description is two lines tall. Its glyph, its trailing parts and its
398
+ tick centre on the label line, not on the middle of the two lines. The badge
399
+ subtracts its own line and its block padding (#798). */
400
+ .ui-dropdown__item:has(> .ui-dropdown__main > .ui-dropdown__desc) {
401
+ --ui-dropdown-line: calc((var(--text-sm) - 0.5px) * var(--leading-normal));
402
+ align-items: flex-start;
403
+ }
404
+ .ui-dropdown__item:has(> .ui-dropdown__main > .ui-dropdown__desc) > :is(.ui-dropdown__ic, .ui-dropdown__tick, .ui-dropdown__more) { height: var(--ui-dropdown-line); align-items: center; }
405
+ .ui-dropdown__item:has(> .ui-dropdown__main > .ui-dropdown__desc) > .ui-dropdown__aside { line-height: var(--ui-dropdown-line); }
406
+ .ui-dropdown__item:has(> .ui-dropdown__main > .ui-dropdown__desc) > .ui-dropdown__badge { margin-top: calc((var(--ui-dropdown-line) - var(--text-xs) * var(--leading-normal)) / 2 - var(--ui-dropdown-badge-pad)); }
407
+
393
408
  /* Disabled + danger rows */
394
409
  .ui-dropdown__item.is-disabled { /* muted-ink: state — unavailable control */ color: var(--disabled-ink); cursor: not-allowed; pointer-events: none; }
395
410
  .ui-dropdown__item.is-disabled .ui-dropdown__label,
@@ -148,9 +148,9 @@
148
148
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
149
149
  position: relative;
150
150
  }
151
- /* In a cell there is no label line to sit beside, so the box centres on the row's
152
- text instead of dropping 1px to meet a label's first line. */
153
- .ui-table__selection input[type="checkbox"] { margin-top: 0; vertical-align: middle; }
151
+ /* In a cell there is no label line to sit beside, so the box centres on the cell's first
152
+ line instead of dropping 1px to meet a label's first line. */
153
+ .ui-table__selection input[type="checkbox"] { margin-block: calc((var(--ui-cell-line) - 19px) / 2); vertical-align: top; }
154
154
  /* The target, not the ink. The box above is drawn at 19x19 because that is what
155
155
  sits beside a 15px label without shouting; WCAG 2.5.8 wants 24 CSS px of
156
156
  pointer target, which is a different question. This overlay answers it and
@@ -21,6 +21,7 @@
21
21
  color: var(--text);
22
22
  padding: 0 var(--space-4) var(--space-3) 0;
23
23
  border-bottom: 1px solid var(--border);
24
+ vertical-align: top;
24
25
  }
25
26
  /* A row header is a body cell that happens to name its row, so it takes the body cell's
26
27
  * padding. `.ui-table th` pads for the head, where the label sits above the rule and
@@ -32,7 +33,7 @@
32
33
  padding: var(--space-4) var(--space-4) var(--space-4) 0;
33
34
  border-bottom: 1px solid var(--border);
34
35
  color: var(--text);
35
- vertical-align: middle;
36
+ vertical-align: top;
36
37
  white-space: nowrap;
37
38
  }
38
39
  /* The last row of the last section, so a final body row keeps its separator when a
@@ -188,7 +189,7 @@
188
189
  .ui-table td.ui-table__linked > :is(a:not([class]), a.ui-identity):only-child {
189
190
  box-sizing: border-box;
190
191
  display: flex;
191
- align-items: center;
192
+ align-items: flex-start;
192
193
  width: 100%;
193
194
  height: 100%;
194
195
  padding: var(--space-4) var(--space-4) var(--space-4) 0;
@@ -200,7 +201,7 @@
200
201
  :where(.ui-table--hover:not(.ui-table--zebra)) td.ui-table__linked:first-child > :is(a:not([class]), a.ui-identity):only-child { padding-left: var(--space-2); }
201
202
  :where(.ui-table--hover:not(.ui-table--zebra)) td.ui-table__linked:last-child > :is(a:not([class]), a.ui-identity):only-child { padding-right: var(--space-2); }
202
203
  .ui-table--dense td.ui-table__linked > :is(a:not([class]), a.ui-identity):only-child { padding: var(--space-2) var(--space-3); }
203
- .ui-table--compact td.ui-table__linked > :is(a:not([class]), a.ui-identity):only-child { padding: var(--space-1) var(--space-3); }
204
+ .ui-table--compact td.ui-table__linked > :is(a:not([class]), a.ui-identity):only-child { padding: var(--space-2) var(--space-3) var(--space-1); }
204
205
  :where(.ui-table--hover:not(.ui-table--zebra)):is(.ui-table--dense, .ui-table--compact) td.ui-table__linked:first-child > :is(a:not([class]), a.ui-identity):only-child { padding-left: var(--space-2); }
205
206
  :where(.ui-table--hover:not(.ui-table--zebra)):is(.ui-table--dense, .ui-table--compact) td.ui-table__linked:last-child > :is(a:not([class]), a.ui-identity):only-child { padding-right: var(--space-2); }
206
207
  /* Zebra insets the row's END cells only, so the fill does too: a marked identity behind a
@@ -327,8 +328,9 @@
327
328
  margin-inline: calc(-1 * var(--space-3));
328
329
  }
329
330
  .ui-table td.ui-table__num { text-align: right; }
331
+ /* The top padding centres one 18.2px line in the 33px row (7.4px), rounded up to the step. */
330
332
  .ui-table--compact td,
331
- .ui-table--compact :is(tbody, tfoot) th { padding: var(--space-1) var(--space-3); font-size: var(--text-sm); line-height: var(--leading-snug); height: 33px; }
333
+ .ui-table--compact :is(tbody, tfoot) th { padding: var(--space-2) var(--space-3) var(--space-1); font-size: var(--text-sm); line-height: var(--leading-snug); height: 33px; }
332
334
  .ui-table--compact th { padding: var(--space-2) var(--space-3); }
333
335
  .ui-table--compact th:first-child,
334
336
  .ui-table--compact td:first-child { padding-left: var(--space-3); }
@@ -396,6 +398,16 @@
396
398
  .ui-identity__symbol { font-weight: var(--weight-semibold); }
397
399
  .ui-identity__name { white-space: normal; max-width: var(--panel-sm); }
398
400
  .ui-identity__logo { width: 24px; height: 24px; flex: 0 0 24px; position: relative; display: grid; place-items: center; border: 1px solid var(--border); border-radius: var(--radius-xs); font-size: var(--text-xs); }
401
+ /* In a top-aligned cell, a logo, a badge or an identity takes no more height than the cell's
402
+ line, so the text stays level with the text of the other cells. A badge gives back its
403
+ padding. The logo is 24px (--space-6), and an identity keeps its 24px tap floor and gives
404
+ back the room around its line. A linked identity fills its cell, so it keeps its place.
405
+ The line height is resolved on the cell, because a logo, a box or a button has its own. */
406
+ @property --ui-cell-line { syntax: "<length>"; inherits: true; initial-value: 0px; }
407
+ .ui-table :is(td, th) { --ui-cell-line: 1lh; }
408
+ .ui-table :is(td, th) .ui-identity:not(.ui-table__linked > :only-child) { margin-block: calc((var(--ui-cell-line) - var(--space-6)) / 2); }
409
+ .ui-table :is(td, th) .ui-identity__logo { margin-block: calc((var(--ui-cell-line) - var(--space-6)) / 2); }
410
+ .ui-table :is(td, th) .ui-badge { margin-block: calc(-1 * var(--badge-pad-y)); }
399
411
  .ui-identity__logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
400
412
  .ui-identity__logo img[hidden] { display: none; /* motion: still — a failed resource is replaced without animating the error. */ }
401
413
  a.ui-identity:hover { text-decoration: underline; }
@@ -447,10 +459,7 @@ a.ui-identity:hover { text-decoration: underline; }
447
459
  ring, and the line's ellipsis reaches it. #513 */
448
460
  .ui-table--pinned .ui-table__identity a:not([class]) { display: inline; }
449
461
  /* Except where the fill gave the lone link the cell's box: it cuts as a block box. */
450
- .ui-table--pinned .ui-table__identity.ui-table__linked > a:not([class]):only-child {
451
- display: block;
452
- align-content: center;
453
- }
462
+ .ui-table--pinned .ui-table__identity.ui-table__linked > a:not([class]):only-child { display: block; }
454
463
  /* The ring goes on the LINE: a link longer than the cell runs past the cut, so a ring
455
464
  around the link has no surface to draw its right side on. Inward, like every ring
456
465
  the kit puts in a clipped region. why: docs/foundations.md#the-focus-ring, #513 */
@@ -503,6 +512,7 @@ a.ui-identity:hover { text-decoration: underline; }
503
512
  .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense) {
504
513
  --cell-gap: var(--space-4);
505
514
  --cell-edge: var(--space-3);
515
+ --row-floor: var(--space-12);
506
516
  padding: 0;
507
517
  }
508
518
  .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense) :is(th, td) {
@@ -516,22 +526,20 @@ a.ui-identity:hover { text-decoration: underline; }
516
526
  .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense):not(.ui-table--pinned) .ui-table__selection { padding-right: var(--space-4); }
517
527
  .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense) thead th { padding-block: var(--space-3); }
518
528
  .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense) tbody > tr > :is(td, th) { border-bottom: 0; }
529
+ /* Cells align to the top, so the top padding centres the FIRST line in the row's floor: a
530
+ one-line row reads as centred, and a wrapped row keeps its first line in the same place. */
519
531
  .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense) :is(tbody, tfoot) :is(td, th):not(.ui-table__act) {
520
- height: var(--space-12);
521
- padding-block: var(--space-2);
532
+ height: var(--row-floor);
533
+ padding-block: calc((var(--row-floor) - 1lh) / 2) var(--space-2);
522
534
  }
523
- .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense).ui-table--compact { --cell-gap: var(--space-3); }
535
+ .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense).ui-table--compact { --cell-gap: var(--space-3); --row-floor: calc(var(--space-8) + var(--space-1)); }
524
536
  .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense).ui-table--compact thead th { padding-block: var(--space-2); }
525
- .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense).ui-table--compact :is(tbody, tfoot) :is(td, th):not(.ui-table__act) { height: calc(var(--space-8) + var(--space-1)); }
526
- .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense).ui-table--comfortable { --cell-gap: var(--space-5); }
527
- .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense).ui-table--comfortable :is(tbody, tfoot) :is(td, th):not(.ui-table__act) {
528
- height: calc(var(--space-12) + var(--space-2));
529
- padding-block: var(--space-3);
530
- }
537
+ .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense).ui-table--comfortable { --cell-gap: var(--space-5); --row-floor: calc(var(--space-12) + var(--space-2)); }
538
+ .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense).ui-table--comfortable :is(tbody, tfoot) :is(td, th):not(.ui-table__act) { padding-bottom: var(--space-3); }
531
539
  /* A filled cell link carries the padding its cell gave up. */
532
540
  .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense) td.ui-table__linked:has(> :is(a:not([class]), a.ui-identity):only-child) { padding: 0; }
533
- .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense) td.ui-table__linked > :is(a:not([class]), a.ui-identity):only-child { padding: var(--space-2) var(--cell-gap) var(--space-2) 0; }
534
- .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense).ui-table--comfortable td.ui-table__linked > :is(a:not([class]), a.ui-identity):only-child { padding-block: var(--space-3); }
541
+ .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense) td.ui-table__linked > :is(a:not([class]), a.ui-identity):only-child { padding: calc((var(--row-floor) - 1lh) / 2) var(--cell-gap) var(--space-2) 0; }
542
+ .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense).ui-table--comfortable td.ui-table__linked > :is(a:not([class]), a.ui-identity):only-child { padding-bottom: var(--space-3); }
535
543
  .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense) td.ui-table__linked:first-child > :is(a:not([class]), a.ui-identity):only-child { padding-left: var(--cell-edge); }
536
544
  .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense) td.ui-table__linked:last-child > :is(a:not([class]), a.ui-identity):only-child { padding-right: var(--cell-edge); }
537
545
 
@@ -554,10 +562,13 @@ a.ui-identity:hover { text-decoration: underline; }
554
562
  .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense) tbody tr:not(.is-target):has(> .ui-table__selection :checked):hover > :is(td, th) { background: color-mix(in srgb, var(--accent) 12%, var(--table-bg)); }
555
563
 
556
564
  /* Icon row actions: 32px buttons in a cell as wide as its buttons, so a row keeps its
557
- height. The glyph, not the button, meets the end cell's edge. */
558
- .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense) td.ui-table__act { padding-block: 0; padding-right: calc(var(--cell-edge) - var(--space-2)); }
565
+ height. The glyph, not the button, meets the end cell's edge. The top padding centres a
566
+ button on the first line of text: a labelled button gives back its padding and sits on the
567
+ text's baseline, and an icon button takes the line's height. */
568
+ .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense) td.ui-table__act { padding-block: calc((var(--row-floor) - 1lh) / 2) 0; padding-right: calc(var(--cell-edge) - var(--space-2)); }
559
569
  .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense) td.ui-table__act:has(.ui-btn--icon) { width: 1%; }
560
- .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense) td.ui-table__act .ui-btn--icon { box-sizing: border-box; width: var(--space-8); height: var(--space-8); padding: 0; justify-content: center; }
570
+ .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense) td.ui-table__act .ui-btn { margin-block: calc(-1 * (var(--btn-pad-y) + var(--btn-edge-width))); }
571
+ .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense) td.ui-table__act .ui-btn--icon { box-sizing: border-box; width: var(--space-8); height: var(--space-8); padding: 0; justify-content: center; vertical-align: top; margin-block: calc((var(--ui-cell-line) - var(--space-8)) / 2); }
561
572
 
562
573
  /* In a card the table, or its frame, reaches the card's edges, so a row's fill does too. */
563
574
  .ui-card > :is(.ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense), .ui-table-scroll:has(> .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense))) {