@apliteni/apliteni-ui 0.168.0 → 0.170.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.
@@ -604,7 +604,8 @@ the place of anything else on the page.** A closed readout has no box, so it can
604
604
  scroll region that holds it. There is one element per host. It is placed absolutely
605
605
  and takes no pointer events. `.ui-tip-host` marks the box it is placed against. The readout flips
606
606
  or slides only as far as needed to stay inside the viewport and every ancestor whose overflow
607
- clips. **What it says is text**, written with `textContent` and never parsed. Focus on a mark shows
607
+ clips. **What it says is text**, written with `textContent` and never parsed. The text wraps inside
608
+ the readout's box, also in a table cell that keeps its text on one line. Focus on a mark shows
608
609
  the readout and describes the mark through `aria-describedby`. **Escape dismisses every readout
609
610
  the kit is showing**. **Under a coarse pointer the tap is the switch**, and the opening tap is
610
611
  captured. This means a chart that drills down on a bar does not drill down on the tap that asked
@@ -629,8 +630,10 @@ focuses the trigger waits for the hover.
629
630
  `aria-label`. The readout shows its word on hover and focus. It adds no tab stop and no
630
631
  description, and it is hidden from assistive technology, because the control's name already says it.
631
632
 
632
- `placement` selects the preferred top or bottom side. The readout stays within clipping ancestors
633
- and viewport bounds, and updates its position on scroll and resize.
633
+ `placement` selects the preferred top or bottom side. **The open readout sits in the top layer**,
634
+ over a sticky table cell and over a cut one. It stays within the viewport and within each clipping
635
+ ancestor that can hold it beside its mark, and updates its position on scroll and resize. A browser
636
+ with no popover support keeps it in its host, within every clipping ancestor.
634
637
 
635
638
  ### Pagination
636
639
 
@@ -660,7 +663,8 @@ window's. In a flex row or an `auto` grid track, you give it one:
660
663
  | Open | 66rem | 50rem | 32rem | 15rem |
661
664
 
662
665
  Below 14rem, band and tile values use the next smaller type rank. Open values step down below 15rem.
663
- Longer values remain the caller's responsibility.
666
+ Longer values remain the caller's responsibility. Totals that are the sum of a list go in the
667
+ table's footer rows, not in a stat band.
664
668
 
665
669
  A band can use `basisId` to reference comparison text before the figures. An explicit `basis` takes precedence.
666
670
  When a period control already states the window, omit a caption that repeats it, including for totals without changes.
@@ -680,7 +684,7 @@ larger.
680
684
  ### Dense financial tables
681
685
 
682
686
  The table is markup. A named scroll region contains a native `<table>`, and you apply the
683
- recipes as classes. Zebra adds no grey stripes. Hover gives a row a quiet neutral fill across the table width. On a dense hover table, the fill has round ends, and the first and last content sit 8px inside it. No row line crosses those ends.
687
+ recipes as classes. Zebra adds no grey stripes. Hover gives a row a quiet neutral fill across the table width. On a dense hover table, the fill has round ends, and the first and last content sit 8px inside it. No row line crosses those ends. A dense table marks a selected row with its check box only, with no wash, because a round hover with selected rows looks bad.
684
688
  Keyboard focus keeps its ring, and a landed row keeps its own mark. On a zebra or dense table, `compact` sets a 33px minimum row, but larger or wrapped content makes the row
685
689
  taller. **Columns scroll rather than disappear**, while sticky headers and pinned identity cells
686
690
  keep opaque backgrounds, the shared focus composition, and their full accessible names. **A
@@ -691,17 +695,26 @@ reach the focus ring. An engine that cannot report a scroll state keeps the divi
691
695
  width. **A link
692
696
  inside a cell uses the row's ink, gets an underline on hover, and uses the shared ring on
693
697
  `:focus-visible`**. The ring surrounds the whole link, including a title-cell link that wraps.
698
+ In a cell after the first, the band keeps 8px of room before the name, and the name does not move.
694
699
  `numericValue` distinguishes missing from zero. `deltaValue` prints your sign and uses your
695
700
  explicit judgement. **Colour never supplies the sign.** **Every body and header cell aligns its
696
701
  content to the top**, so when one cell wraps, the other values stay level with its first line. A
697
702
  React sort mark stands on the first line of a wrapped label. A badge, a logo, a selection box or
698
- an icon button in a cell stays level with the text beside it.
703
+ an icon button in a cell stays level with the text beside it. A badge in a cell is 19px high,
704
+ against 24px elsewhere, and never makes its row taller.
705
+
706
+ Use a badge for the status of the record. Use an ink word for a second status in the same row.
707
+ `.ui-status--success`, `--danger`, `--warn`, `--info` and `--neutral` give a word the ink of
708
+ its tone with no fill. Each one is at least 4.5:1 on a plain or a selected row, in both themes
709
+ and under every accent. In light, warn, info and danger take a deeper ink than their badge, so
710
+ they are at least 7:1 on a plain row, a selected row and a selected row under the pointer.
699
711
 
700
712
  **A hover table that is neither zebra nor dense is a row table.** Its body rows have no lines
701
713
  and no column lines, and the head keeps its rule. **A row is 48px tall, 36px with `compact` and
702
714
  56px with `comfortable`**, and larger or wrapped content makes it taller. The space above a
703
715
  row's first line centres that line in this height, so a one-line row looks centred. Hover gives the row a
704
- neutral fill, and a checked selection box gives it an accent wash. Both fills are square, and the
716
+ neutral fill, and a checked selection box gives it an accent wash at a tinted card's strength: 5% in
717
+ light and 8% under the pointer, 9% in dark and 12% under the pointer. Both fills are square, and the
705
718
  first and last content sit 12px inside them. The name
706
719
  in the first column takes the strongest ink. **`.ui-table__sub` puts a second value under the
707
720
  first**, such as an email under a name, in full ink at a smaller size. An act cell that holds icon
@@ -728,7 +741,8 @@ composed into a cell.
728
741
 
729
742
  **Below 720px a pinned identity cell keeps its content on one line**, capped at
730
743
  `--ui-table-identity-max` and cut with an ellipsis past the cap. The default cap is
731
- `min(var(--panel-sm), 50vw)`, and that one property is yours to retune. The whole text stays in
744
+ `min(var(--panel-sm), 50vw)`, and that one property is yours to retune. A table with a
745
+ selection column leaves less room on a phone. Lower the cap there. The whole text stays in
732
746
  the markup, so the accessible name is unchanged and the company link remains the disclosure. The
733
747
  decorative logo is not drawn there. A sub-line stays running text, which is a rule in
734
748
  [Dense tables](../guidelines/dense-tables.md). **Focusing a link inside a sub-line draws the band
@@ -1367,7 +1381,13 @@ The button and tick follow `value` until the caller updates it. `AccountMenu` ma
1367
1381
  router-link rendering. **Nesting stops one level deep.** Each row keeps its name and count when
1368
1382
  collapsed.
1369
1383
  - **`Checkbox` and `Switch`** render native inputs inside the existing label classes, and **a
1370
- disabled one uses the same paint as every other disabled control in the kit.**
1384
+ disabled one uses the same paint as every other disabled control in the kit.** A resting box
1385
+ has a field's fill and an edge of at least 3:1 on the page, a card, a menu and a hovered row.
1386
+ It measures 5.36:1 or more in light and 5.38:1 or more in dark. **A checked or partial box is a
1387
+ light tint of the accent with an accent edge and an accent mark, not a solid accent block.** A
1388
+ checked radio uses the same paint. Under every accent, the edge measures 5.74:1 or more in light
1389
+ and 4.61:1 or more in dark on a card and on a selected or hovered selected row. The mark measures
1390
+ 5.23:1 or more on the tint in light and 4.46:1 or more in dark.
1371
1391
  - **A checkbox whose `indeterminate` property is true shows the checked fill with a short dash**
1372
1392
  in place of the tick. **`DataTable`'s selection boxes use the kit box and show the dash when some,
1373
1393
  but not all, rows on the page are selected.** **A selection column takes the width of its box in
@@ -198,6 +198,11 @@ This stronger aim is a written consumer rule only. The automated badge checks en
198
198
  so they would accept the previous success pair at 5.29:1. The other light status pairs
199
199
  meet 4.5:1 but do not all meet 7:1. Dark danger measures at least 6.30:1 on these three grounds.
200
200
 
201
+ **A status word has its own ink in light.** A word with no fill stands on a selected row's accent
202
+ wash, so `--status-warn-ink`, `--status-info-ink` and `--status-danger-ink` are deeper than the
203
+ chip inks. They measure at least 7.01:1 on a plain, a selected and a selected hover row under
204
+ every accent. In dark they are the chip inks, at 7.42:1 or more.
205
+
201
206
  **Archive has little contrast to spare.** Its muted ink measures 4.64:1 on the light page
202
207
  and 4.56:1 on a dark floating panel. These are the narrowest Archive pairs.
203
208
  Check both before changing muted ink, the neutral fill or a containing surface.
@@ -334,6 +339,9 @@ A link that breaks across two lines draws one band per line, because an `outline
334
339
  line box it covers. This is the same thing the browser's own outline already did, so a link
335
340
  gets no new limit by taking the kit's band instead.
336
341
 
342
+ A text link, and words that open a hover readout, get a 6px corner and 4px of room at each side
343
+ inside the band. Focus moves no word, because the margin gives that room back.
344
+
337
345
  ```css
338
346
  --ring-width: 2px;
339
347
  --ring-color: var(--accent);
@@ -62,7 +62,7 @@
62
62
 
63
63
  **Don't:** Unavailable keeps the live paint, so only the cursor reports the state.
64
64
 
65
- **Except:** A disabled label must stay legible, so the pair changes rather than fades. Only the label-free switch track may fade, and a control that draws no box when it is on — a ghost button — draws none when it is off, so its ink carries the state alone. Where the browser fades a control for you, as Chromium does a disabled select, reset that fade: it takes the edge and the words down together, and the words are what a reader still has to read.
65
+ **Except:** A disabled label must stay legible, so the pair changes rather than fades. Only the label-free switch track may fade, and a control that draws no box when it is on — a ghost button — draws none when it is off, so its ink carries the state alone. Where the browser fades a control for you, as Chromium does a disabled select, reset that fade: it takes the edge and the words down together, and a reader still has to read the words.
66
66
 
67
67
  ## Touch field text
68
68
 
@@ -98,11 +98,11 @@
98
98
 
99
99
  **Why:** Colour alone is not reliably distinguishable.
100
100
 
101
- **Do:** The word carries the status; the tone fill agrees with it.
101
+ **Do:** The word carries the status. The tone agrees with it, as a fill or as ink.
102
102
 
103
103
  **Don't:** A tone fill with the word taken out of it.
104
104
 
105
- **Except:** A status badge needs no glyph or dot. A callout or toast keeps its glyph, because its words sit in a sentence rather than in a fill.
105
+ **Except:** A status badge needs no glyph or dot. A callout or toast keeps its glyph, because its words sit in a sentence, not a fill.
106
106
 
107
107
  ## Measurable pairs
108
108
 
@@ -110,7 +110,7 @@
110
110
 
111
111
  **Rule:** Keep text on opaque grounds so its contrast can be measured.
112
112
 
113
- **Why:** A gradient, filter or translucent layer puts the ink on more than one ground, so no single pair can be read off it.
113
+ **Why:** A gradient, filter or translucent layer puts the ink on more than one ground, so no single pair measures it.
114
114
 
115
115
  **Do:** One opaque ground under the whole sentence.
116
116
 
@@ -18,7 +18,7 @@
18
18
 
19
19
  **Rule:** Open the readout above the mark; place it below only when space above is clipped and below has more room.
20
20
 
21
- **Why:** This keeps the mark and pointer approach clear while keeping the readout on-screen.
21
+ **Why:** It keeps the mark and pointer approach clear and the readout on-screen.
22
22
 
23
23
  **Do:** Open a readout below a tall bar near the top of a clipping region.
24
24
 
@@ -28,15 +28,15 @@
28
28
 
29
29
  <!-- rule: contents -->
30
30
 
31
- **Rule:** Name the point, show its value, and include no more than one comparison.
31
+ **Rule:** Name the point, show its value, and give at most one comparison.
32
32
 
33
- **Why:** Short readouts stay readable and do not cover nearby marks.
33
+ **Why:** Short readouts stay readable and clear of nearby marks.
34
34
 
35
35
  **Do:** Use three short lines: point, value, one comparison.
36
36
 
37
37
  **Don't:** Wrap long text or place controls in the readout.
38
38
 
39
- **Except:** Match the page’s currency and precision.
39
+ **Except:** Match the page’s currency and precision. A readout that shows the full text of a cut cell wraps.
40
40
 
41
41
  ## Tap to open or close
42
42
 
@@ -46,11 +46,11 @@
46
46
 
47
47
  **Why:** Hover is not readable under a finger.
48
48
 
49
- **Do:** Tap another mark to move the readout, or tap the same mark or anywhere else to close it.
49
+ **Do:** Tap another mark to move the readout. Tap the same mark or anywhere else to close it.
50
50
 
51
51
  **Don't:** Require a hover gesture on a touch screen.
52
52
 
53
- **Except:** The opening tap blocks the mark’s click but still reaches page listeners; the tap that closes the readout may also drill down.
53
+ **Except:** The opening tap blocks the mark’s click but reaches page listeners. The closing tap may also drill down.
54
54
 
55
55
  ## Provide another access method
56
56
 
@@ -60,8 +60,8 @@
60
60
 
61
61
  **Why:** Pointer, focus, and tap must all support access, and Escape must dismiss the readout.
62
62
 
63
- **Do:** Let focus or tap open the readout, and provide the leading figure plus a table or labelled series summary.
63
+ **Do:** Let focus or tap open the readout. Give the leading figure and a table or labelled series summary.
64
64
 
65
- **Don't:** Require pointing at one of 365 daily points to find its value.
65
+ **Don't:** Require pointing at one of 365 daily points for its value.
66
66
 
67
- **Except:** Touch-screen focus without a tap must support screen-reader arrival; pointer detection must support laptop mouse hover, finger or pen tap, and keyboard focus restoration. Whether chart marks should be tab stops remains undecided; the kit adds none.
67
+ **Except:** Touch-screen focus without a tap must support screen-reader arrival; pointer detection must support laptop mouse hover, finger or pen tap, and keyboard focus restoration. Tab stops on chart marks remain undecided; the kit adds none.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apliteni/apliteni-ui",
3
- "version": "0.168.0",
3
+ "version": "0.170.0",
4
4
  "workspaces": [
5
5
  "react"
6
6
  ],
@@ -168,14 +168,19 @@
168
168
  .ui-tip-host {
169
169
  position: relative;
170
170
  }
171
+ .ui-tip-host > .ui-focusable:focus-visible {
172
+ border-radius: var(--radius-xs);
173
+ padding: var(--space-1);
174
+ margin-inline: calc(-1 * var(--space-1));
175
+ }
171
176
  .ui-tip {
172
177
  --ui-tip-gap: 8px;
173
178
  --ui-tip-bg: var(--bg-elevated);
174
179
  position: absolute;
175
180
  top: var(--ui-tip-y, 0px);
176
- left: var(--ui-tip-x, 50%);
181
+ left: calc(var(--ui-tip-x, 50%) + var(--ui-tip-shift, 0px));
177
182
  z-index: var(--z-dropdown);
178
- translate: calc(-50% + var(--ui-tip-shift, 0px)) calc(-100% - var(--ui-tip-gap));
183
+ translate: -50% calc(-100% - var(--ui-tip-gap));
179
184
  display: flex;
180
185
  flex-direction: column;
181
186
  width: max-content;
@@ -188,6 +193,7 @@
188
193
  font-family: var(--font-sans);
189
194
  font-size: var(--text-xs);
190
195
  line-height: 1.45;
196
+ white-space: normal;
191
197
  color: var(--text);
192
198
  pointer-events: none;
193
199
  opacity: 0;
@@ -195,7 +201,15 @@
195
201
  transition: opacity var(--dur-fast) var(--ease), visibility var(--dur-fast) linear;
196
202
  }
197
203
  .ui-tip.is-below {
198
- translate: calc(-50% + var(--ui-tip-shift, 0px)) var(--ui-tip-gap);
204
+ translate: -50% var(--ui-tip-gap);
205
+ }
206
+ .ui-tip:popover-open {
207
+ position: fixed;
208
+ right: auto;
209
+ bottom: auto;
210
+ height: auto;
211
+ margin: 0;
212
+ overflow: visible;
199
213
  }
200
214
  .ui-tip.is-open {
201
215
  opacity: 1;
@@ -479,17 +479,22 @@ import { useId as useId4 } from "react";
479
479
  var TIP_GAP = 8;
480
480
  function placeTip(host, mark, tip, bound, placement = "top") {
481
481
  const mrect = mark.getBoundingClientRect();
482
- const rect = host.getBoundingClientRect();
483
482
  const view = host.ownerDocument.documentElement;
483
+ const declared = parseFloat(getComputedStyle(tip).getPropertyValue("--ui-tip-gap"));
484
+ const gap = Number.isFinite(declared) ? declared : TIP_GAP;
484
485
  const clip = { top: 0, left: 0, right: view.clientWidth, bottom: view.clientHeight };
486
+ const layered = typeof tip.showPopover === "function" && tip.matches(":popover-open");
485
487
  for (let el = host; el && el !== host.ownerDocument.body; el = el.parentElement) {
486
488
  const style = getComputedStyle(el);
487
- if (![style.overflow, style.overflowX, style.overflowY].some((v) => v && v !== "visible")) continue;
488
- const bounds = el.getBoundingClientRect();
489
- clip.top = Math.max(clip.top, bounds.top);
490
- clip.left = Math.max(clip.left, bounds.left);
491
- clip.right = Math.min(clip.right, bounds.right);
492
- clip.bottom = Math.min(clip.bottom, bounds.bottom);
489
+ if (style.display === "inline" || ![style.overflow, style.overflowX, style.overflowY].some((v) => v && v !== "visible")) continue;
490
+ if (layered && (el.clientWidth < tip.offsetWidth || el.clientHeight < mrect.height + gap + tip.offsetHeight)) continue;
491
+ const edge = el.getBoundingClientRect();
492
+ const top = edge.top + el.clientTop;
493
+ const left2 = edge.left + el.clientLeft;
494
+ clip.top = Math.max(clip.top, top);
495
+ clip.left = Math.max(clip.left, left2);
496
+ clip.right = Math.min(clip.right, left2 + el.clientWidth);
497
+ clip.bottom = Math.min(clip.bottom, top + el.clientHeight);
493
498
  }
494
499
  if (bound) {
495
500
  const edge = bound.getBoundingClientRect();
@@ -498,8 +503,6 @@ function placeTip(host, mark, tip, bound, placement = "top") {
498
503
  clip.right = Math.min(clip.right, edge.right);
499
504
  clip.bottom = Math.min(clip.bottom, edge.bottom);
500
505
  }
501
- const declared = parseFloat(getComputedStyle(tip).getPropertyValue("--ui-tip-gap"));
502
- const gap = Number.isFinite(declared) ? declared : TIP_GAP;
503
506
  const above = mrect.top - clip.top;
504
507
  const below = clip.bottom - mrect.bottom;
505
508
  const prefersBelow = placement === "bottom";
@@ -509,8 +512,10 @@ function placeTip(host, mark, tip, bound, placement = "top") {
509
512
  const centre = mrect.left + mrect.width / 2;
510
513
  const ideal = centre - tip.offsetWidth / 2;
511
514
  const left = Math.max(clip.left, Math.min(ideal, clip.right - tip.offsetWidth));
512
- tip.style.setProperty("--ui-tip-x", `${centre - rect.left - host.clientLeft + host.scrollLeft}px`);
513
- tip.style.setProperty("--ui-tip-y", `${(isBelow ? mrect.bottom : mrect.top) - rect.top - host.clientTop + host.scrollTop}px`);
515
+ const y = isBelow ? mrect.bottom : mrect.top;
516
+ const rect = layered ? null : host.getBoundingClientRect();
517
+ tip.style.setProperty("--ui-tip-x", `${rect ? centre - rect.left - host.clientLeft + host.scrollLeft : centre}px`);
518
+ tip.style.setProperty("--ui-tip-y", `${rect ? y - rect.top - host.clientTop + host.scrollTop : y}px`);
514
519
  tip.style.setProperty("--ui-tip-shift", `${left - ideal}px`);
515
520
  }
516
521
 
@@ -617,11 +622,17 @@ function Tooltip({ text: text2, label = text2, value, detail: detail2, placement
617
622
  placeTip(h, anchor, t, void 0, placement);
618
623
  }
619
624
  useLayoutEffect2(() => {
620
- if (!mark) return;
625
+ const t = tip.current;
626
+ const layered = typeof t?.showPopover === "function";
627
+ if (!mark) {
628
+ if (layered && t.matches(":popover-open")) t.hidePopover();
629
+ return;
630
+ }
621
631
  if (!host.current?.contains(mark)) {
622
632
  close(true);
623
633
  return;
624
634
  }
635
+ if (layered && !t.matches(":popover-open")) t.showPopover();
625
636
  place();
626
637
  });
627
638
  const shared = useRef2({});
@@ -655,9 +666,12 @@ function Tooltip({ text: text2, label = text2, value, detail: detail2, placement
655
666
  const reposition = () => place();
656
667
  view.addEventListener("scroll", reposition, true);
657
668
  view.addEventListener("resize", reposition);
669
+ const sized = typeof view.ResizeObserver === "function" ? new view.ResizeObserver(reposition) : null;
670
+ if (sized) [tip.current, active.current].forEach((el) => el && sized.observe(el));
658
671
  return () => {
659
672
  view.removeEventListener("scroll", reposition, true);
660
673
  view.removeEventListener("resize", reposition);
674
+ sized?.disconnect();
661
675
  };
662
676
  }, [open, placement]);
663
677
  return /* @__PURE__ */ jsxs7(
@@ -736,7 +750,7 @@ function Tooltip({ text: text2, label = text2, value, detail: detail2, placement
736
750
  },
737
751
  children: [
738
752
  control ? /* @__PURE__ */ jsx11("span", { ref: trigger, children }) : /* @__PURE__ */ jsx11("span", { ref: trigger, className: "ui-focusable", tabIndex: 0, "aria-describedby": id, children }),
739
- /* @__PURE__ */ jsx11("span", { ref: tip, id, "data-tip": "", role: "tooltip", "aria-hidden": control || void 0, className: `ui-tip${open ? " is-open" : ""}`, children: /* @__PURE__ */ jsx11(Text2, { label, value, detail: detail2 }) })
753
+ /* @__PURE__ */ jsx11("span", { ref: tip, id, "data-tip": "", popover: "manual", role: "tooltip", "aria-hidden": control || void 0, className: `ui-tip${open ? " is-open" : ""}`, children: /* @__PURE__ */ jsx11(Text2, { label, value, detail: detail2 }) })
740
754
  ]
741
755
  }
742
756
  );
@@ -3,6 +3,7 @@
3
3
  * .ui-badge — status chip (live / soon / archive / neutral)
4
4
  * .ui-tag — soft solid label
5
5
  * .ui-dot — leading status dot (pulses when .is-live)
6
+ * .ui-status--* — status word: tone ink, no fill
6
7
  * ========================================================================== */
7
8
 
8
9
  .ui-badge {
@@ -40,6 +41,14 @@
40
41
  .ui-badge--pending { color: var(--chip-warn-ink); background: var(--chip-warn-fill); }
41
42
  .ui-badge--neutral { color: var(--text); background: var(--chip-neutral-fill); }
42
43
 
44
+ /* Status word: the tone's ink with no fill, for a second status in a row beside the
45
+ record's badge. A word, not a change value, so not .ui-delta (#814). */
46
+ .ui-status--success { color: var(--chip-success-ink); }
47
+ .ui-status--danger { color: var(--status-danger-ink); }
48
+ .ui-status--warn { color: var(--status-warn-ink); }
49
+ .ui-status--info { color: var(--status-info-ink); }
50
+ .ui-status--neutral { color: var(--text); }
51
+
43
52
  /* Pill: same shape, sentence case, a touch larger — a metadata chip */
44
53
  .ui-pill {
45
54
  display: inline-flex;
@@ -158,3 +158,10 @@ a:focus-visible,
158
158
  outline: var(--ring);
159
159
  outline-offset: var(--ring-offset);
160
160
  }
161
+ /* A text link has no box, so the ring sat on the glyphs with square corners. It takes a corner
162
+ and room at each side. The margin gives the room back, so no word moves. #814 (rev_136bd26bc559/d22) */
163
+ a:not([class]):focus-visible {
164
+ border-radius: var(--radius-xs);
165
+ padding-inline: var(--space-1);
166
+ margin-inline: calc(-1 * var(--space-1));
167
+ }
@@ -141,9 +141,11 @@
141
141
  height: 19px;
142
142
  flex: none;
143
143
  margin-top: 1px;
144
- border: 1.5px solid var(--border-strong);
144
+ /* A field's fill and a --muted edge: the edge clears the 3:1 control floor on every ground a box
145
+ stands on, and a grey fill read as disabled. Decided on #814 (rev_136bd26bc559/d21). */
146
+ border: 1.5px solid var(--muted);
145
147
  border-radius: var(--radius-xs);
146
- background: var(--surface-2); /* code-bg: inherit — control paint; the containing surface is the ground, for a chip and for a band alike. */
148
+ background: var(--field-bg); /* code-bg: inherit — control paint; the containing surface is the ground, for a chip and for a band alike. */
147
149
  cursor: pointer;
148
150
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
149
151
  position: relative;
@@ -179,15 +181,18 @@
179
181
  what the kit's rows already chose. why: docs/foundations.md#the-focus-ring */
180
182
  .ui-check input:enabled:hover:not(:focus-visible),
181
183
  .ui-table__selection input[type="checkbox"]:enabled:hover:not(:focus-visible) { border-color: var(--accent); }
184
+ /* On: a tint of the accent with an accent edge and mark, not a solid accent block, so a
185
+ column of checked rows stays quiet. The mark reads 3:1 on the tint under every accent in
186
+ both themes, so neither theme needs its own ink. Decision rev_813ccb2322b5/d27. #814 */
182
187
  .ui-check input:checked,
183
- .ui-table__selection input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
188
+ .ui-table__selection input[type="checkbox"]:checked { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); border-color: var(--accent); /* code-bg: inherit — control paint inside the box; no chip is written in it. */ }
184
189
  .ui-check input[type="checkbox"]:checked::after,
185
190
  .ui-table__selection input[type="checkbox"]:checked::after {
186
191
  content: "";
187
192
  position: absolute;
188
193
  left: 5px; top: 1.5px;
189
194
  width: 5px; height: 10px;
190
- border: solid var(--accent-contrast);
195
+ border: solid var(--accent);
191
196
  border-width: 0 2px 2px 0;
192
197
  transform: rotate(45deg); /* motion: still — the turn is the tick's shape, not travel; it lands with the box's fill, which transitions */
193
198
  }
@@ -196,12 +201,12 @@
196
201
  position: absolute;
197
202
  inset: 4px;
198
203
  border-radius: 50%;
199
- background: var(--accent-contrast);
204
+ background: var(--accent);
200
205
  }
201
206
  .ui-check input:focus-visible { outline: var(--ring); outline-offset: var(--ring-offset); }
202
207
 
203
208
  /* Off. `.ui-check` had no disabled rule at all until #429 put a disabled checkbox
204
- on screen: the box kept --surface-2 and --border-strong, its words kept --text,
209
+ on screen: the box kept its resting fill and edge, its words kept --text,
205
210
  and it was the word "unavailable" in the label that carried the state. The same
206
211
  flat pair the fields and the buttons take (#220, #273) — a paint on the box and
207
212
  quiet ink on the words, never an `opacity`, which drags label and box toward the
@@ -219,13 +224,13 @@
219
224
  .ui-check input[type="checkbox"]:disabled:checked::after,
220
225
  .ui-table__selection input[type="checkbox"]:disabled:checked::after { border-color: var(--disabled-surface); }
221
226
  .ui-check input[type="radio"]:disabled:checked::after { background: var(--disabled-surface); /* code-bg: inherit — the mark inside the box; the box carries the focus indicator. */ }
222
- /* Partial: some of a group is on, not all. The checked box's fill with a level
227
+ /* Partial: some of a group is on, not all. The checked box's tint with a level
223
228
  dash where the tick would be, so the box still reads as "on" from across a table
224
229
  and the dash alone says "not all". It wins over a tick when both are set, as the
225
230
  browser's own box does. Drawn with a border, not a background, so forced colours
226
231
  keeps the dash. #619 */
227
232
  .ui-check input[type="checkbox"]:indeterminate,
228
- .ui-table__selection input[type="checkbox"]:indeterminate { background: var(--accent); border-color: var(--accent); }
233
+ .ui-table__selection input[type="checkbox"]:indeterminate { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); border-color: var(--accent); /* code-bg: inherit — control paint inside the box; no chip is written in it. */ }
229
234
  .ui-check input[type="checkbox"]:indeterminate::after,
230
235
  .ui-table__selection input[type="checkbox"]:indeterminate::after {
231
236
  content: "";
@@ -233,15 +238,10 @@
233
238
  inset: 0;
234
239
  margin: auto;
235
240
  width: 11px; height: 0; /* odd, so the 17px padding box splits into equal gaps */
236
- border: solid var(--accent-contrast);
241
+ border: solid var(--accent);
237
242
  border-width: 2px 0 0;
238
243
  transform: none;
239
244
  }
240
- /* White ink falls below 3:1 on the lighter dark-theme accents, so the tick, the dash and
241
- the radio's dot take the ink a selected Segmented pill takes there. */
242
- :where(:root[data-theme="dark"]) .ui-check input[type="checkbox"]:enabled:is(:checked, :indeterminate)::after,
243
- :where(:root[data-theme="dark"]) .ui-table__selection input[type="checkbox"]:enabled:is(:checked, :indeterminate)::after { border-color: var(--signal-contrast); }
244
- :where(:root[data-theme="dark"]) .ui-check input[type="radio"]:enabled:checked::after { background: var(--signal-contrast); }
245
245
  .ui-check input[type="checkbox"]:disabled:indeterminate,
246
246
  .ui-table__selection input[type="checkbox"]:disabled:indeterminate { background: var(--disabled-ink); border-color: var(--disabled-ink); }
247
247
  .ui-check input[type="checkbox"]:disabled:indeterminate::after,
@@ -214,6 +214,15 @@
214
214
  .ui-table td.ui-table__linked > :is(a:not([class]), a.ui-identity):only-child:focus-visible {
215
215
  outline: var(--ring-scroll);
216
216
  outline-offset: var(--ring-scroll-offset);
217
+ margin-inline: 0;
218
+ }
219
+ /* A later cell's name starts at its cell's edge, so the band crossed its first letter. The band
220
+ takes --space-2 of the gap before it: a clear edge, lent back by the margin, so no word moves.
221
+ #814 (rev_136bd26bc559/d22) */
222
+ .ui-table td.ui-table__linked:not(:first-child) > :is(a:not([class]), a.ui-identity):only-child:focus-visible {
223
+ width: auto;
224
+ margin-inline-start: calc(-1 * var(--space-2));
225
+ border-inline-start: var(--space-2) solid transparent;
217
226
  }
218
227
 
219
228
  .ui-table__num { text-align: right; font-variant-numeric: tabular-nums; }
@@ -402,12 +411,13 @@
402
411
  line, so the text stays level with the text of the other cells. A badge gives back its
403
412
  padding. The logo is 24px (--space-6), and an identity keeps its 24px tap floor and gives
404
413
  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. */
414
+ The line height is resolved on the cell, because a logo, a box or a button has its own.
415
+ A badge in a cell takes the tight line, so it paints 19px against 24px elsewhere (#814). */
406
416
  @property --ui-cell-line { syntax: "<length>"; inherits: true; initial-value: 0px; }
407
417
  .ui-table :is(td, th) { --ui-cell-line: 1lh; }
408
418
  .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
419
  .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)); }
420
+ .ui-table :is(td, th) .ui-badge { line-height: var(--leading-tight); margin-block: calc(-1 * var(--badge-pad-y)); }
411
421
  .ui-identity__logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
412
422
  .ui-identity__logo img[hidden] { display: none; /* motion: still — a failed resource is replaced without animating the error. */ }
413
423
  a.ui-identity:hover { text-decoration: underline; }
@@ -428,11 +438,11 @@ a.ui-identity:hover { text-decoration: underline; }
428
438
  text-overflow: ellipsis;
429
439
  }
430
440
  /* A sub-line is one line of running text and cuts itself: the cell's ellipsis cannot
431
- reach into a child block. 4px is a focused link's ring, inside the cell's padding.
432
- Nothing is capped here — block layout already holds a child to the cell. */
441
+ reach into a child block. Nothing is capped here — block layout already holds a child
442
+ to the cell. */
433
443
  .ui-table--pinned .ui-table__identity > * {
434
444
  overflow: clip;
435
- overflow-clip-margin: var(--space-1);
445
+ overflow-clip-margin: 7px; /* a focused link's 3px ring and the 4px room inside it (#814), inside the cell's padding */
436
446
  text-overflow: ellipsis;
437
447
  }
438
448
  /* A picture has no shorter form, so it keeps its intrinsic size and the cell cuts it.
@@ -554,12 +564,13 @@ a.ui-identity:hover { text-decoration: underline; }
554
564
 
555
565
  /* Row states. Hover is a quiet neutral fill. A selected row takes an accent wash, one step
556
566
  stronger under the pointer. Each fill is opaque and square, so a pinned cell still covers
557
- the columns that scroll under it. A target row keeps its own wash. The selected wash
558
- is 9%: at 8% an inline code chip on the dark page loses its 1.1:1 step. */
567
+ the columns that scroll under it. A target row keeps its own wash. The wash is a tinted
568
+ card's strength: 5% in light, where 9% read too strong beside the checked box (#814), and 9% in
569
+ dark, where at 8% an inline code chip on the dark page loses its 1.1:1 step. */
559
570
  .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense) tbody tr:hover > :is(td, th) { border-radius: 0; }
560
571
  .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense) tbody tr:hover:not(.is-target) > :is(td, th) { background: var(--surface-3); }
561
- .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense) tbody tr:not(.is-target):has(> .ui-table__selection :checked) > :is(td, th) { background: color-mix(in srgb, var(--accent) 9%, var(--table-bg)); }
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)); }
572
+ .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense) tbody tr:not(.is-target):has(> .ui-table__selection :checked) > :is(td, th) { background: color-mix(in srgb, var(--accent) var(--card-tint), var(--table-bg)); }
573
+ .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) var(--card-tint-hover), var(--table-bg)); }
563
574
 
564
575
  /* Icon row actions: 32px buttons in a cell as wide as its buttons, so a row keeps its
565
576
  height. The glyph, not the button, meets the end cell's edge. The top padding centres a
@@ -5,10 +5,19 @@
5
5
  * .ui-tip the readout — __label, __value, __detail
6
6
  * The readout is an overlay in every state. It is absolutely placed inside its
7
7
  * host, so showing it, filling it and moving it change the size of nothing.
8
+ * The React readout is a manual popover: open, it sits in the top layer and is
9
+ * fixed to the view, so no ancestor cuts it and no sticky cell covers it.
8
10
  * why: docs/components.md#the-hover-readout
9
11
  * ========================================================================== */
10
12
 
11
13
  .ui-tip-host { position: relative; }
14
+ /* Words that open a readout take a text link's ring: a corner and room on each side. The margin
15
+ lends the side room back, and an inline box's block padding moves no line. #814 (rev_136bd26bc559/d22) */
16
+ .ui-tip-host > .ui-focusable:focus-visible {
17
+ border-radius: var(--radius-xs);
18
+ padding: var(--space-1);
19
+ margin-inline: calc(-1 * var(--space-1));
20
+ }
12
21
 
13
22
  .ui-tip {
14
23
  /* One number for the mark-to-readout distance, read by both placements here
@@ -17,9 +26,11 @@
17
26
  --ui-tip-bg: var(--bg-elevated);
18
27
  position: absolute;
19
28
  top: var(--ui-tip-y, 0px);
20
- left: var(--ui-tip-x, 50%);
29
+ /* The slide is in `left`, not in `translate`: a change of `translate` alone does not lay
30
+ the box out again, so a scroll region kept the overflow of the readout's last place. */
31
+ left: calc(var(--ui-tip-x, 50%) + var(--ui-tip-shift, 0px));
21
32
  z-index: var(--z-dropdown);
22
- translate: calc(-50% + var(--ui-tip-shift, 0px)) calc(-100% - var(--ui-tip-gap));
33
+ translate: -50% calc(-100% - var(--ui-tip-gap));
23
34
  display: flex;
24
35
  flex-direction: column;
25
36
  width: max-content;
@@ -36,6 +47,9 @@
36
47
  font-family: var(--font-sans);
37
48
  font-size: var(--text-xs);
38
49
  line-height: 1.45;
50
+ /* A host's one-line rule, such as a table cell's, must not reach the readout: the full
51
+ text of a cut cell wraps inside the box. why: the Hover readouts page, #814 */
52
+ white-space: normal;
39
53
  color: var(--text);
40
54
  /* The readout covers the marks beside the one it describes. Were it a hover
41
55
  target it would take the pointer, uncover the mark, lose the pointer and
@@ -55,7 +69,18 @@
55
69
 
56
70
  /* Below the mark: the wiring's flip when above would be clipped, or the
57
71
  author's own choice. */
58
- .ui-tip.is-below { translate: calc(-50% + var(--ui-tip-shift, 0px)) var(--ui-tip-gap); }
72
+ .ui-tip.is-below { translate: -50% var(--ui-tip-gap); }
73
+
74
+ /* In the top layer: the place above, not the browser's centred popover box. A browser
75
+ with no popover drops this rule and keeps the readout in its host. */
76
+ .ui-tip:popover-open {
77
+ position: fixed;
78
+ right: auto;
79
+ bottom: auto;
80
+ height: auto;
81
+ margin: 0;
82
+ overflow: visible;
83
+ }
59
84
 
60
85
  .ui-tip.is-open { opacity: 1; visibility: visible; }
61
86
 
@@ -179,6 +179,8 @@
179
179
  /* How much of its own colour a tinted card mixes in. Dark mixes upward off a mid-grey
180
180
  card, so it can afford this much. why: docs/foundations.md#elevation */
181
181
  --card-tint: 9%;
182
+ /* A selected row takes the card's tint, and one step more under the pointer. #814 */
183
+ --card-tint-hover: 12%;
182
184
 
183
185
  --text: #e9e7f0;
184
186
  --strong: #ffffff;
@@ -241,6 +243,11 @@
241
243
  --chip-danger-fill: var(--glow-pink);
242
244
  --chip-info-ink: var(--cyan);
243
245
  --chip-info-fill: var(--glow-cyan);
246
+ /* Status word ink: a tone word with no fill, read on a table row. Dark keeps the chip
247
+ ink, which is 7.42:1 or more on every row ground. Light deepens it, see there. */
248
+ --status-warn-ink: var(--chip-warn-ink);
249
+ --status-info-ink: var(--chip-info-ink);
250
+ --status-danger-ink: var(--chip-danger-ink);
244
251
  /* The fill of a chip with no status to carry. The themes match on SEPARATION, not on
245
252
  alpha — 12% here is 1.22:1 off the card, 15% in light is 1.23:1 — because --muted is
246
253
  a light violet-grey in dark and a mid slate in light.
@@ -421,6 +428,7 @@
421
428
  /* Light mixes DOWN from white, so tint costs lightness: 5% is the most a card can spend
422
429
  and stay above the page. why: docs/foundations.md#elevation */
423
430
  --card-tint: 5%;
431
+ --card-tint-hover: 8%;
424
432
 
425
433
  --text: #1a1e27;
426
434
  --strong: #0c0e13;
@@ -469,6 +477,12 @@
469
477
  already occupy. See issue #131. */
470
478
  --chip-info-ink: #096a7c;
471
479
  --chip-info-fill: #ddeff3;
480
+ /* A status word has no fill, so a selected row's accent wash is its ground. The chip
481
+ inks read 4.95 to 6.24:1 there. These reach the 7:1 body aim on a plain, a selected
482
+ and a selected hover row under every accent. Owner decision on #814. */
483
+ --status-warn-ink: #684600;
484
+ --status-info-ink: #025463;
485
+ --status-danger-ink: #990149;
472
486
  /* See the dark block for why the two alphas differ. */
473
487
  --chip-neutral-fill: color-mix(in srgb, var(--muted) 13%, transparent);
474
488