@apliteni/apliteni-ui 0.167.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.
@@ -569,7 +569,8 @@ edge of the panel. A row whose value is a field or a dropdown lines its label up
569
569
  This alignment happens by itself. There is no setting for it.
570
570
  Nothing inside a drawer draws a card, a row rule or an `<hr>`. Actions stay
571
571
  outside the scrolling body. **It moves on open and on close**, and both movements are instant when
572
- reduced motion is enabled. For when a flow should use a drawer or a page:
572
+ reduced motion is enabled. **An Escape a tooltip or a picker already handled closes only that
573
+ overlay, and the next Escape closes the drawer.** For when a flow should use a drawer or a page:
573
574
  [Drawer](../guidelines/drawer.md).
574
575
 
575
576
  ### The modal
@@ -603,7 +604,8 @@ the place of anything else on the page.** A closed readout has no box, so it can
603
604
  scroll region that holds it. There is one element per host. It is placed absolutely
604
605
  and takes no pointer events. `.ui-tip-host` marks the box it is placed against. The readout flips
605
606
  or slides only as far as needed to stay inside the viewport and every ancestor whose overflow
606
- 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
607
609
  the readout and describes the mark through `aria-describedby`. **Escape dismisses every readout
608
610
  the kit is showing**. **Under a coarse pointer the tap is the switch**, and the opening tap is
609
611
  captured. This means a chart that drills down on a bar does not drill down on the tap that asked
@@ -615,6 +617,7 @@ what the bar says. No value may be reachable only by hovering. See
615
617
  React `Tooltip` shows a label, a value and an optional detail.
616
618
  `text` is still a shorthand for `label`. Empty parts are hidden.
617
619
  The focusable trigger provides the readout as its accessible description. Escape keeps focus on the trigger.
620
+ **Escape closes only the readout; the next Escape reaches the dialog around it.**
618
621
  The panel does not change the layout or intercept pointer events.
619
622
 
620
623
  **A pointer opens the readout after it rests for 300ms, and the readout closes at once when the
@@ -627,8 +630,10 @@ focuses the trigger waits for the hover.
627
630
  `aria-label`. The readout shows its word on hover and focus. It adds no tab stop and no
628
631
  description, and it is hidden from assistive technology, because the control's name already says it.
629
632
 
630
- `placement` selects the preferred top or bottom side. The readout stays within clipping ancestors
631
- 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.
632
637
 
633
638
  ### Pagination
634
639
 
@@ -658,7 +663,8 @@ window's. In a flex row or an `auto` grid track, you give it one:
658
663
  | Open | 66rem | 50rem | 32rem | 15rem |
659
664
 
660
665
  Below 14rem, band and tile values use the next smaller type rank. Open values step down below 15rem.
661
- 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.
662
668
 
663
669
  A band can use `basisId` to reference comparison text before the figures. An explicit `basis` takes precedence.
664
670
  When a period control already states the window, omit a caption that repeats it, including for totals without changes.
@@ -678,7 +684,7 @@ larger.
678
684
  ### Dense financial tables
679
685
 
680
686
  The table is markup. A named scroll region contains a native `<table>`, and you apply the
681
- 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.
682
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
683
689
  taller. **Columns scroll rather than disappear**, while sticky headers and pinned identity cells
684
690
  keep opaque backgrounds, the shared focus composition, and their full accessible names. **A
@@ -689,17 +695,26 @@ reach the focus ring. An engine that cannot report a scroll state keeps the divi
689
695
  width. **A link
690
696
  inside a cell uses the row's ink, gets an underline on hover, and uses the shared ring on
691
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.
692
699
  `numericValue` distinguishes missing from zero. `deltaValue` prints your sign and uses your
693
700
  explicit judgement. **Colour never supplies the sign.** **Every body and header cell aligns its
694
701
  content to the top**, so when one cell wraps, the other values stay level with its first line. A
695
702
  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.
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.
697
711
 
698
712
  **A hover table that is neither zebra nor dense is a row table.** Its body rows have no lines
699
713
  and no column lines, and the head keeps its rule. **A row is 48px tall, 36px with `compact` and
700
714
  56px with `comfortable`**, and larger or wrapped content makes it taller. The space above a
701
715
  row's first line centres that line in this height, so a one-line row looks centred. Hover gives the row a
702
- 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
703
718
  first and last content sit 12px inside them. The name
704
719
  in the first column takes the strongest ink. **`.ui-table__sub` puts a second value under the
705
720
  first**, such as an email under a name, in full ink at a smaller size. An act cell that holds icon
@@ -726,7 +741,8 @@ composed into a cell.
726
741
 
727
742
  **Below 720px a pinned identity cell keeps its content on one line**, capped at
728
743
  `--ui-table-identity-max` and cut with an ellipsis past the cap. The default cap is
729
- `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
730
746
  the markup, so the accessible name is unchanged and the company link remains the disclosure. The
731
747
  decorative logo is not drawn there. A sub-line stays running text, which is a rule in
732
748
  [Dense tables](../guidelines/dense-tables.md). **Focusing a link inside a sub-line draws the band
@@ -976,7 +992,8 @@ A `.ui-table__title` cell gives a text column the remaining width. A column take
976
992
  `title`, `code`, `long`, `strong` or `act`. `rowHeader` renders the column's body cells as `th scope="row"`.
977
993
  `DataTable` takes the vanilla hooks as props: `zebra`, `hover` (on unless `false`), `density`
978
994
  (`dense`, `compact` or `comfortable`),
979
- `stickyHeader` and `pinnedIdentity`. `rowState` marks a row `target` or `dead`, `footer` takes totals rows
995
+ `stickyHeader` and `pinnedIdentity`. **`pinnedIdentity: true` pins column 0; a column key pins that column**,
996
+ so a date can stand before the pinned identity. `rowState` marks a row `target` or `dead`, `footer` takes totals rows
980
997
  and `caption` names the table for assistive technology. A `dead` row is muted and shows its state as a word,
981
998
  with no strike line. `stack` is deprecated and ignored: a phone table scrolls sideways like any other. A table that does not scroll is the card's own child, so a dense table reaches the card's text edge.
982
999
  Its pager follows the measured table width and wraps when necessary.
@@ -1093,7 +1110,9 @@ field and white button on the dark one.
1093
1110
 
1094
1111
  `DatePicker` picks one month, a range of months, one date or a range of dates. At its ordinary
1095
1112
  width, it uses the dropdown's shell and adds only the grid inside it. The panel is a `dialog`,
1096
- because a calendar is a grid and a listbox may own only options. The panel is `inert` while closed.
1113
+ because a calendar is a grid and a listbox may own only options. The panel is `inert` while closed,
1114
+ and a shut panel carries `data-dd-shut`, as a shut Dropdown does. **Escape closes only the calendar,
1115
+ wherever focus is in the picker, and the next Escape closes the dialog around it.**
1097
1116
 
1098
1117
  **The grain and the span are two questions, not one:** `month` and `day` pick a single period.
1099
1118
  `range` and `day-range` pick a start and an end in the same two presses. Periods are ISO strings in
@@ -1362,7 +1381,13 @@ The button and tick follow `value` until the caller updates it. `AccountMenu` ma
1362
1381
  router-link rendering. **Nesting stops one level deep.** Each row keeps its name and count when
1363
1382
  collapsed.
1364
1383
  - **`Checkbox` and `Switch`** render native inputs inside the existing label classes, and **a
1365
- 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.
1366
1391
  - **A checkbox whose `indeterminate` property is true shows the checked fill with a short dash**
1367
1392
  in place of the tick. **`DataTable`'s selection boxes use the kit box and show the dash when some,
1368
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.167.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;
@@ -376,7 +376,8 @@ type DataTableProps<T> = {
376
376
  dense?: boolean;
377
377
  density?: 'default' | 'dense' | 'compact' | 'comfortable';
378
378
  stickyHeader?: boolean;
379
- pinnedIdentity?: boolean;
379
+ /** `true` pins column 0. A column key pins that column, so a date can stand before the pinned identity. */
380
+ pinnedIdentity?: boolean | (keyof T & string);
380
381
  scrollLabel?: string;
381
382
  empty?: ReactNode;
382
383
  pageSize?: number;
@@ -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
 
@@ -527,7 +532,7 @@ function noteClose() {
527
532
  import { useEffect as useEffect2, useId as useId3, useLayoutEffect as useLayoutEffect2, useRef as useRef2, useState as useState3 } from "react";
528
533
  import { Fragment as Fragment3, jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
529
534
  var DOC_EVENTS = ["pointerdown", "pointercancel", "click", "keydown", "touchend"];
530
- var CAPTURED = /* @__PURE__ */ new Set(["pointerdown", "pointercancel"]);
535
+ var CAPTURED = /* @__PURE__ */ new Set(["pointerdown", "pointercancel", "keydown"]);
531
536
  var wirings = /* @__PURE__ */ new WeakMap();
532
537
  function wireDocument(doc, handlers) {
533
538
  let wiring2 = wirings.get(doc);
@@ -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({});
@@ -629,7 +640,10 @@ function Tooltip({ text: text2, label = text2, value, detail: detail2, placement
629
640
  ignoreMouseUntil.current = 0;
630
641
  pointerKind.current = "";
631
642
  pendingClick.current = null;
632
- if (event.key === "Escape") close();
643
+ if (event.key === "Escape") {
644
+ if (active.current) event.preventDefault();
645
+ close();
646
+ }
633
647
  };
634
648
  shared.current.touchend = (event) => {
635
649
  if (!host.current?.contains(event.target)) close(true);
@@ -652,9 +666,12 @@ function Tooltip({ text: text2, label = text2, value, detail: detail2, placement
652
666
  const reposition = () => place();
653
667
  view.addEventListener("scroll", reposition, true);
654
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));
655
671
  return () => {
656
672
  view.removeEventListener("scroll", reposition, true);
657
673
  view.removeEventListener("resize", reposition);
674
+ sized?.disconnect();
658
675
  };
659
676
  }, [open, placement]);
660
677
  return /* @__PURE__ */ jsxs7(
@@ -733,7 +750,7 @@ function Tooltip({ text: text2, label = text2, value, detail: detail2, placement
733
750
  },
734
751
  children: [
735
752
  control ? /* @__PURE__ */ jsx11("span", { ref: trigger, children }) : /* @__PURE__ */ jsx11("span", { ref: trigger, className: "ui-focusable", tabIndex: 0, "aria-describedby": id, children }),
736
- /* @__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 }) })
737
754
  ]
738
755
  }
739
756
  );
@@ -854,8 +871,10 @@ function trapTab(panel, e) {
854
871
  function onKey(e) {
855
872
  const top = stack[stack.length - 1];
856
873
  if (!top) return;
857
- if (e.key === "Escape") top.close();
858
- else if (e.key === "Tab") trapTab(top.panel, e);
874
+ if (e.key === "Escape") {
875
+ if (e.defaultPrevented) return;
876
+ top.close();
877
+ } else if (e.key === "Tab") trapTab(top.panel, e);
859
878
  }
860
879
  function sync() {
861
880
  for (const [el, was] of marked) if (!was) el.removeAttribute("inert");
@@ -2147,6 +2166,7 @@ function Pagination({
2147
2166
  // src/DataTable.tsx
2148
2167
  import { Fragment as Fragment12, jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
2149
2168
  var CELL_CLASS = { title: "ui-table__title", code: "ui-table__code", long: "ui-table__long", strong: "ui-table__num--strong", act: "ui-table__act" };
2169
+ var pinnedColumn = (pinnedIdentity, key, index) => pinnedIdentity === true ? index === 0 : pinnedIdentity === key;
2150
2170
  var NO_SORT = { key: void 0, dir: -1 };
2151
2171
  function sortTableRows(rows, sort) {
2152
2172
  if (sort.key === void 0) return [...rows];
@@ -2297,7 +2317,7 @@ function DataTable({
2297
2317
  "th",
2298
2318
  {
2299
2319
  scope: "col",
2300
- className: [pinnedIdentity && columnIndex === 0 && "ui-table__identity", c.num && "ui-table__num", c.sortable && "rx-sortable"].filter(Boolean).join(" "),
2320
+ className: [pinnedColumn(pinnedIdentity, c.key, columnIndex) && "ui-table__identity", c.num && "ui-table__num", c.sortable && "rx-sortable"].filter(Boolean).join(" "),
2301
2321
  "aria-sort": sort.key === c.key ? sort.dir === 1 ? "ascending" : "descending" : c.sortable && sortIsKnown ? "none" : void 0,
2302
2322
  children: c.sortable ? (
2303
2323
  // The label is its own box so it can truncate: in a pinned
@@ -2335,7 +2355,7 @@ function DataTable({
2335
2355
  Cell,
2336
2356
  {
2337
2357
  scope: c.rowHeader ? "row" : void 0,
2338
- className: [c.num && "ui-table__num", c.cell && CELL_CLASS[c.cell], pinnedIdentity && columnIndex === 0 && "ui-table__identity", c.linked && "ui-table__linked"].filter(Boolean).join(" ") || void 0,
2358
+ className: [c.num && "ui-table__num", c.cell && CELL_CLASS[c.cell], pinnedColumn(pinnedIdentity, c.key, columnIndex) && "ui-table__identity", c.linked && "ui-table__linked"].filter(Boolean).join(" ") || void 0,
2339
2359
  children: c.render ? c.render(r) : String(r[c.key])
2340
2360
  },
2341
2361
  c.key
@@ -2466,7 +2486,7 @@ import {
2466
2486
  useRef as useRef14,
2467
2487
  useState as useState11
2468
2488
  } from "react";
2469
- import { dropdownViewportFit } from "@apliteni/apliteni-ui";
2489
+ import { dropdownRest, dropdownViewportFit } from "@apliteni/apliteni-ui";
2470
2490
  import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
2471
2491
  var cx5 = (...a) => a.filter(Boolean).join(" ");
2472
2492
  var pad = (n) => String(n).padStart(2, "0");
@@ -2652,18 +2672,16 @@ function DatePicker({
2652
2672
  const onClick = (e) => {
2653
2673
  if (!root.current?.contains(e.target)) close.current(false);
2654
2674
  };
2655
- const onKey2 = (e) => {
2656
- if (e.key !== "Escape") return;
2657
- close.current(false);
2658
- trigger.current?.focus();
2659
- };
2660
2675
  doc.addEventListener("click", onClick);
2661
- doc.addEventListener("keydown", onKey2);
2662
2676
  return () => {
2663
2677
  doc.removeEventListener("click", onClick);
2664
- doc.removeEventListener("keydown", onKey2);
2665
2678
  };
2666
2679
  }, [open]);
2680
+ useIsoLayoutEffect(() => {
2681
+ const el = panel.current;
2682
+ if (!el || !root.current) return void 0;
2683
+ return dropdownRest(root.current, el, open);
2684
+ }, [open, asSheet]);
2667
2685
  useIsoLayoutEffect(() => {
2668
2686
  if (!open || !land.current) return;
2669
2687
  land.current = false;
@@ -2908,49 +2926,62 @@ function DatePicker({
2908
2926
  // `open` on the root whichever form the panel takes, so the trigger's
2909
2927
  // chevron flips for the sheet as it does for the popover. The panel rules
2910
2928
  // it also switches on have no panel to find while the sheet is up.
2911
- /* @__PURE__ */ jsxs21("div", { className: cx5("ui-dropdown", "ui-datepicker", open && "open"), ref: root, children: [
2912
- /* @__PURE__ */ jsxs21(
2913
- "button",
2914
- {
2915
- type: "button",
2916
- className: "ui-dropdown__trigger ui-datepicker__trigger",
2917
- id,
2918
- "aria-haspopup": "dialog",
2919
- "aria-expanded": open,
2920
- "aria-label": ariaLabel || void 0,
2921
- disabled,
2922
- ref: trigger,
2923
- onClick: (e) => {
2924
- e.stopPropagation();
2925
- setOpen(!open);
2926
- },
2927
- children: [
2928
- /* @__PURE__ */ jsx25("span", { className: "ui-dropdown__value", children: shown ?? empty }),
2929
- /* @__PURE__ */ jsx25("span", { className: "ui-dropdown__chevron", "aria-hidden": "true" })
2930
- ]
2931
- }
2932
- ),
2933
- asSheet ? (
2934
- // A sheet is the kit's drawer, not a wide popover: the scrim, the close
2935
- // control, the focus trap, the inert page behind it and the restored
2936
- // focus all come from <Drawer>, because changing the FORM of the panel
2937
- // without taking the sheet's affordances left a phone reader with no
2938
- // visible way out and a Tab that walked into the live page behind it.
2939
- // why: guidelines/drawer.md
2940
- /* @__PURE__ */ jsx25(Drawer, { open, side: "bottom", size: "md", title: name, onClose: () => setOpen(false), children: calendar })
2941
- ) : /* @__PURE__ */ jsx25(
2942
- "div",
2943
- {
2944
- className: cx5("ui-dropdown__panel", "ui-datepicker__panel", align === "end" && "is-end"),
2945
- ref: panel,
2946
- role: "dialog",
2947
- "aria-label": name,
2948
- inert: !open,
2949
- onClick: (e) => e.stopPropagation(),
2950
- children: calendar
2951
- }
2952
- )
2953
- ] })
2929
+ /* @__PURE__ */ jsxs21(
2930
+ "div",
2931
+ {
2932
+ className: cx5("ui-dropdown", "ui-datepicker", open && "open"),
2933
+ ref: root,
2934
+ onKeyDown: (e) => {
2935
+ if (asSheet || !open || e.key !== "Escape") return;
2936
+ e.preventDefault();
2937
+ close.current(false);
2938
+ trigger.current?.focus();
2939
+ },
2940
+ children: [
2941
+ /* @__PURE__ */ jsxs21(
2942
+ "button",
2943
+ {
2944
+ type: "button",
2945
+ className: "ui-dropdown__trigger ui-datepicker__trigger",
2946
+ id,
2947
+ "aria-haspopup": "dialog",
2948
+ "aria-expanded": open,
2949
+ "aria-label": ariaLabel || void 0,
2950
+ disabled,
2951
+ ref: trigger,
2952
+ onClick: (e) => {
2953
+ e.stopPropagation();
2954
+ setOpen(!open);
2955
+ },
2956
+ children: [
2957
+ /* @__PURE__ */ jsx25("span", { className: "ui-dropdown__value", children: shown ?? empty }),
2958
+ /* @__PURE__ */ jsx25("span", { className: "ui-dropdown__chevron", "aria-hidden": "true" })
2959
+ ]
2960
+ }
2961
+ ),
2962
+ asSheet ? (
2963
+ // A sheet is the kit's drawer, not a wide popover: the scrim, the close
2964
+ // control, the focus trap, the inert page behind it and the restored
2965
+ // focus all come from <Drawer>, because changing the FORM of the panel
2966
+ // without taking the sheet's affordances left a phone reader with no
2967
+ // visible way out and a Tab that walked into the live page behind it.
2968
+ // why: guidelines/drawer.md
2969
+ /* @__PURE__ */ jsx25(Drawer, { open, side: "bottom", size: "md", title: name, onClose: () => setOpen(false), children: calendar })
2970
+ ) : /* @__PURE__ */ jsx25(
2971
+ "div",
2972
+ {
2973
+ className: cx5("ui-dropdown__panel", "ui-datepicker__panel", align === "end" && "is-end"),
2974
+ ref: panel,
2975
+ role: "dialog",
2976
+ "aria-label": name,
2977
+ inert: !open,
2978
+ onClick: (e) => e.stopPropagation(),
2979
+ children: calendar
2980
+ }
2981
+ )
2982
+ ]
2983
+ }
2984
+ )
2954
2985
  );
2955
2986
  }
2956
2987
 
@@ -2974,7 +3005,7 @@ import {
2974
3005
  dropdownHeightFit,
2975
3006
  dropdownLift,
2976
3007
  dropdownReveal,
2977
- dropdownRest,
3008
+ dropdownRest as dropdownRest2,
2978
3009
  dropdownSnap,
2979
3010
  filterPanelRow
2980
3011
  } from "@apliteni/apliteni-ui";
@@ -3218,7 +3249,7 @@ function Dropdown({
3218
3249
  useIsoLayoutEffect(() => {
3219
3250
  const el = panel.current;
3220
3251
  if (!el || !root.current) return void 0;
3221
- return dropdownRest(root.current, el, open);
3252
+ return dropdownRest2(root.current, el, open);
3222
3253
  }, [open]);
3223
3254
  useIsoLayoutEffect(() => {
3224
3255
  const dd = root.current;
@@ -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.
@@ -488,7 +498,7 @@ a.ui-identity:hover { text-decoration: underline; }
488
498
  /* One width reserves the selection track and offsets the adjacent identity. */
489
499
  .ui-table--pinned { --ui-table-selection-width: var(--space-12); --ui-table-identity-max: min(var(--panel-sm), 50vw); }
490
500
  .ui-table--pinned .ui-table__selection { box-sizing: border-box; width: var(--ui-table-selection-width); min-width: var(--ui-table-selection-width); max-width: var(--ui-table-selection-width); padding-inline: 0; text-align: center; }
491
- .ui-table--pinned .ui-table__selection + .ui-table__identity { left: var(--ui-table-selection-width); }
501
+ .ui-table--pinned .ui-table__selection ~ .ui-table__identity { left: var(--ui-table-selection-width); }
492
502
 
493
503
  /* ============================================================================
494
504
  * Running text in a cell — .ui-table__long
@@ -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