@apliteni/apliteni-ui 0.179.0 → 0.179.1

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.
@@ -1,9 +1,10 @@
1
1
  # Foundations
2
2
 
3
- The kit ships these values, and every component meets these minimums.
4
- [components.md](components.md) is the other half. It explains each component and its promise.
5
- The design rules for a screen are in [the guidelines](../guidelines/overview.md). The issue that
6
- settled a number explains why it has that value.
3
+ Use this page when you write CSS of your own beside the kit, or when you need to know what a
4
+ component keeps on every screen. The kit ships these values, and every component meets these
5
+ minimums. [components.md](components.md) tells you which component to use and how. The design
6
+ rules for a screen are in [the guidelines](../guidelines/overview.md). The issue that settled a
7
+ number explains why it has that value.
7
8
 
8
9
  Everything here is a CSS custom property that you can read and re-point. Take the tokens from
9
10
  `@apliteni/apliteni-ui/tokens` and `/accents`, or take the full stylesheet from `/css`.
@@ -18,9 +19,8 @@ Everything here is a CSS custom property that you can read and re-point. Take th
18
19
  Use the first value for a box that bounds the page. Use the second for a box that bounds a line
19
20
  of text. The kit does not write a page-scale width as a number.
20
21
 
21
- `appShell({ width })` sets the content column. `centered` limits and centres it, and is the
22
- default. `wide` removes that limit and fills the track beside the rail. `maxWidth` replaces the
23
- limit under either name. If the kit cannot use a value, it drops that value.
22
+ The `width` of `AppShell` sets the content column. `centered` limits and centres it, and is the
23
+ default. `wide` removes that limit and fills the track beside the rail.
24
24
 
25
25
  ## Boxes below the page
26
26
 
@@ -132,7 +132,7 @@ sentence case and renders as written. A word that is capitalised in itself stays
132
132
 
133
133
  | rank | size | weight | line-height | what takes it |
134
134
  | ------------ | ------------- | ------------------- | ------------------ | ------------- |
135
- | `page-title` | `--text-2xl` | `--weight-bold` | `1.1` | the page's `h1` inside `appShell()` |
135
+ | `page-title` | `--text-2xl` | `--weight-bold` | `1.1` | the page's `h1` inside `AppShell` |
136
136
  | `card-title` | `--text-lg` | `--weight-semibold` | `--leading-snug` | a card's title |
137
137
  | `body` | `--text-base` | `--weight-normal` | `--leading-normal` | running text |
138
138
  | `label` | `--text-sm` | `--weight-medium` | inherited | an eyebrow, a table head, a nav or menu caption, a footer column title, a code sample's label |
@@ -143,8 +143,8 @@ On the kit's scale, these are 30, 18, 14.5, 13, 13 and 12px. When two ranks shar
143
143
  their weight separates them. `label` and `caption` are both 13px. Words use body ink, including
144
144
  labels and captions. See [Text ink](#text-ink).
145
145
 
146
- **A card title is a heading, one level under the page's.** `card()` and `<Card>` emit an `h2`.
147
- `level` moves it to `h3`–`h6`. An eyebrow above a card title is a label, not a heading.
146
+ **A card title is a heading, one level under the page's.** `<Card>` draws an `h2`. `level`
147
+ moves it to `h3`–`h6`. An eyebrow above a card title is a label, not a heading.
148
148
 
149
149
  ## Motion
150
150
 
@@ -168,15 +168,12 @@ Every easing is also a token. `--ease` is the default. The other options are `--
168
168
  - A `transition` always reads a duration token. An `animation` may keep its own number in two
169
169
  cases, named at the declaration: **ambient** motion with no interaction origin, and
170
170
  **choreographed** sequences timed against each other. There is no third kind.
171
- - **A published motion helper accepts a missing element.** `transitionMs(el)` returns the
172
- stylesheet's transition time for `el`: the longest duration plus its own delay, in
173
- milliseconds. It returns `0` for no element, for anything that is not an element, and `0`
174
- again where there is no window to ask for a computed style. `playEntrance()` and `replay()`
175
- do nothing for a missing element. None of the three ask whether the element is still in the
176
- document, so a node you detached gets no promise here: what `transitionMs()` answers for one
177
- is whatever the engine's style API says about it. A caller sizing a backstop timer for a fade
178
- can read the stylesheet instead of copying a duration token, and an unmounted ref gets a timer
179
- that fires immediately instead of an exception.
171
+ - **Use `transitionMs(el)` to time a fallback for a fade.** It returns the transition time
172
+ that the stylesheet gives `el`, in milliseconds: the longest duration plus its delay. Read it
173
+ instead of copying a duration token. It returns `0` for a missing element, for anything that
174
+ is not an element and where there is no window, so a timer for an unmounted ref fires at once.
175
+ `playEntrance()` and `replay()` do nothing for a missing element. None of the three checks
176
+ that the element is still in the document.
180
177
 
181
178
  ### Reduced motion travels with the stylesheet
182
179
 
@@ -223,10 +220,9 @@ The neutral fill separates from a card by about 1.22:1 in dark and 1.20:1 in lig
223
220
 
224
221
  **A status chip's ink and fill form one pair.** Change them together and check the result
225
222
  on the page, a card and a floating panel in both themes. Keep text at least 4.5:1.
226
- Light success has a stronger aim of **7:1** on its fill. It currently measures 7.17:1.
227
- This stronger aim is a written consumer rule only. The automated badge checks enforce 4.5:1,
228
- so they would accept the previous success pair at 5.29:1. The other light status pairs
229
- meet 4.5:1 but do not all meet 7:1. Dark danger measures at least 6.30:1 on these three grounds.
223
+ Light success has a stronger aim of **7:1** on its fill. It measures 7.17:1. The other light
224
+ status pairs meet 4.5:1 but do not all meet 7:1. Dark danger measures at least 6.30:1 on these
225
+ three grounds.
230
226
 
231
227
  **A status word has its own ink in light.** A word with no fill stands on a selected row's accent
232
228
  wash, so `--status-warn-ink`, `--status-info-ink` and `--status-danger-ink` are deeper than the
@@ -255,11 +251,11 @@ These fill ratios describe separation, not text contrast.
255
251
  `--field-bg` and `--disabled-surface` are both `--surface` in both themes. A field is
256
252
  therefore drawn by its edge. On the page ground, a disabled field measures 1.12:1. This is
257
253
  a white box on a grey page. **Put a form on a card.** A filter bar above a table is the one
258
- exception. See [Forms](components.md#forms).
254
+ exception. See [Forms](components.md#fields).
259
255
  - **The box reports the state, so a field that is off draws the fainter edge of the two.** The
260
256
  same two tokens paint a button, so a button that is off drops a rung with the field.
261
- - **A disabled select carries the kit's own paint and no fade.** The kit's disabled field
262
- rule resets the `opacity: 0.7` that Chromium's user-agent stylesheet applies to one.
257
+ - **A disabled select carries the kit's own paint and no fade**, also in Chromium, which fades
258
+ a disabled select by default.
263
259
  - **A dropdown trigger uses the live control edge while it is live.** It uses
264
260
  `--control-edge`, as `.ui-btn` does. When it is off, it uses `--disabled-border`,
265
261
  `--disabled-ink`, and `cursor: not-allowed`. Hover does not take the accent from an
@@ -287,8 +283,8 @@ where columns scroll under its frame or its pinned column, in both themes. A ste
287
283
  | modal | `--level-line`, one line | `--elev-drop` | none, the deep scrim separates it | `--elev-drop` |
288
284
 
289
285
  Each level reads its line from one token in both themes: `--card-edge`, `--rail-edge`,
290
- `--float-edge`, `--float-edge-inner` and `--modal-edge` (`src/tokens/tokens.css`). The React
291
- modal draws `--modal-edge` as an inset line (`react/src/Modal.css`).
286
+ `--float-edge`, `--float-edge-inner` and `--modal-edge`. Re-point the token to change the line
287
+ of a level. The modal draws `--modal-edge` as an inset line.
292
288
 
293
289
  The ladder, from bottom to top:
294
290
 
@@ -304,8 +300,7 @@ The ladder, from bottom to top:
304
300
  themes, fields, code blocks, navigation labels and segmented controls use those reading
305
301
  surfaces. `--surface-2` and `--surface-3` are for non-text fills and tracks. A status chip
306
302
  is the named exception. It uses a soft fill, and neutral chip tones use
307
- `--chip-neutral-fill`. This avoids the old card-surface badge, which sat darker than a
308
- floating panel in dark and vanished on a white card in light.
303
+ `--chip-neutral-fill`, which stays visible on a card and on a floating panel in both themes.
309
304
 
310
305
  **A selected item is the one exception.** Selection is marked by a background highlight. An
311
306
  enabled chosen segmented pill takes the primary button's pair, `--accent-strong` with
@@ -415,7 +410,7 @@ for a focusable that is neither a link nor a kit control — a `div` or `span` y
415
410
 
416
411
  **A focused control draws the band and nothing beside it.** A boxed text field keeps its 1px border width during visible focus.
417
412
  The same rule applies to a text area, select and search field. Their border becomes transparent during visible focus.
418
- This applies to vanilla and React fields, including the Dropdown search field. The ring keeps its 2px width and accent ink.
413
+ This applies to every field, including the Dropdown search field. The ring keeps its 2px width and accent ink.
419
414
  It also keeps a 1px clear gap. Other edges keep their resting ink.
420
415
  If a hover rule would outrank focus, it stands aside with `:not(:focus-visible)`.
421
416
  A drop zone still recolours its dashed edge while a file is over it. That edge marks the drop target, not focus.
@@ -443,10 +438,10 @@ you set it on a painted container of your own, or recomposed `--ring` there, del
443
438
  iOS Safari zooms the page into a focused field when its text is smaller than 16px. It does not
444
439
  zoom back out.
445
440
 
446
- - **One net, over elements rather than classes.** A single `@media (pointer: coarse)` rule
447
- sets `input`, `select` and `textarea` to 16px. Both published stylesheets import it. Controls
448
- with nothing to type into are excluded because they do not zoom. The rule uses `!important`
449
- because it must outrank a component rule that it has not seen.
441
+ - **One net, over elements rather than classes.** On a touch screen, every `input`, `select`
442
+ and `textarea` is 16px, your own fields too. Both published stylesheets hold the net. Controls
443
+ with nothing to type into keep their size, because they do not zoom. The net uses
444
+ `!important`.
450
445
  - **The size is real, never a scaled 16px.** The zoom uses the computed font size. A 16px field
451
446
  that is made smaller with a `transform` still zooms.
452
447
  - **`font-size` and not the viewport.** `user-scalable=no` also stops the zoom. It removes
@@ -489,16 +484,11 @@ minimums page names all of them. Rows that share an edge have no space outside a
489
484
  layer. `input`, `select` and `textarea` generate no pseudo-element and use their own height.
490
485
  A back link draws 32 high, and its layer reaches 6 above and 6 below it to make 44.
491
486
 
492
- The whole system is behind `@media (max-width: 560px) and (pointer: coarse)`. A transparent
493
- layer is also a hover surface, and a coarse pointer has no hover. The sheet is imported
494
- **last**, and its openings use `!important` because each one overrides a gap already set by a
495
- component. `--tap-min` is declared in that sheet rather than the token file because the React
496
- entry imports these nets without `tokens.css`. It is still a token, and you can move it.
487
+ The whole system applies only below 560px with a coarse pointer, because a coarse pointer has
488
+ no hover. `--tap-min` is a token, and you can move it.
497
489
 
498
- **A row that already has the room opens nothing and still says so.** The shell's band
499
- remains a 52px row. Its phone palette trigger measures 37.05px tall, and its theme switch
500
- remains 34px square. The existing space lets their targets reach 44px without changing
501
- those drawn sizes.
490
+ **A row that already has the room opens nothing.** The shell's band stays a 52px row, and its
491
+ controls reach 44px targets in the room that the band already has.
502
492
 
503
493
  On a phone, the product topbar uses two rows with a 44px minimum height per row.
504
494
  Brand, theme and account occupy the first row. The view and version switches occupy the
@@ -534,7 +524,7 @@ a colour keep the shorthand.
534
524
  glyphs may appear without a word and what each glyph means.
535
525
 
536
526
  **A status glyph is circled.** A circled glyph reports a state. A bare glyph names an action.
537
- `toast()` and `callout()` use the circled status glyphs for success, danger and warning:
527
+ `Toast` and `Callout` use the circled status glyphs for success, danger and warning:
538
528
  `circleCheck`, `circleX` and `circleAlert`. Info and neutral callouts use `info`. An explicit
539
529
  `icon` still wins. A neutral toast still uses `bolt`, because it reports an event without a
540
530
  verdict.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apliteni/apliteni-ui",
3
- "version": "0.179.0",
3
+ "version": "0.179.1",
4
4
  "workspaces": [
5
5
  "react"
6
6
  ],
package/react/README.md CHANGED
@@ -43,7 +43,7 @@ fill its container, and `appearance="underline"` draws the underline strip inste
43
43
  of the pill track; omit all three for the standard pill. Options support
44
44
  `ariaLabel` and `disabled`; `disabled` on the toolbar disables every choice. What
45
45
  each presentation guarantees is in
46
- docs/components.md#the-rest-of-the-react-surface.
46
+ docs/components.md#segmented.
47
47
  Reach for it when a choice filters or switches a view in place; use `Tabs` when the
48
48
  choice owns a panel, and links when it changes the page.
49
49
 
@@ -606,7 +606,7 @@ Its accessible name is the label and then the chosen value. Outside a `Field`,
606
606
  `type="search"` input, and no visible label, so the row keeps the height of the
607
607
  unlabelled controls beside it. `ariaLabel` is required and is the control's only
608
608
  name. It forwards its ref and the native input props, and `className` joins
609
- `.ui-input`. There is no clear button — see docs/components.md#react-search-field for why.
609
+ `.ui-input`. There is no clear button — see docs/components.md#search-field for why.
610
610
 
611
611
  ```tsx
612
612
  <div className="ui-toolbar">
@@ -320,7 +320,7 @@ type Column<T> = {
320
320
  * "Invoice 1162" with the number linked looks the same to a selector, and filling that
321
321
  * one would put the number on a line of its own. The header cell is never marked — it
322
322
  * holds a label, or a sort button that keeps its own ring.
323
- * why: docs/components.md#dense-financial-tables
323
+ * why: docs/components.md#data-table
324
324
  */
325
325
  linked?: boolean;
326
326
  /** Renders this column's body cells as row headers (`th scope="row"`), as the kit's compact table does. */
@@ -922,7 +922,7 @@ type SearchFieldProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'ar
922
922
  * No clear button. The browser paints its own near-black on the light field and
923
923
  * white on the dark one, beside the kit's `--muted` magnifier — two glyphs, and
924
924
  * only one answers to a token — so `input.css` suppresses it.
925
- * why: docs/components.md#react-search-field
925
+ * why: docs/components.md#search-field
926
926
  */
927
927
  declare const SearchField: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "size" | "aria-label"> & {
928
928
  /** The control's name. A toolbar search box shows no label, so this is the
package/src/html.js CHANGED
@@ -5,7 +5,7 @@ export const esc = value => String(value == null ? '' : value).replace(/[&<>"]/g
5
5
  // Legacy topbar/brand slots accept already escaped HTML. Preserve their entities.
6
6
  export const trustedAttr = value => String(value ?? '').replace(/[<>"]/g, c => ENTITIES[c]);
7
7
 
8
- // why: docs/components.md#escaping-and-url-slots
8
+ // why: docs/components.md#escaping-and-urls
9
9
  export function safeUrl(value, fallback = '#') {
10
10
  const raw = String(value ?? '');
11
11
  const scheme = raw.replace(/[\t\n\r]/g, '').replace(/^[\u0000-\u0020]+/, '');
package/src/index.d.ts CHANGED
@@ -68,7 +68,7 @@ export declare function filterPanelFit(
68
68
  * a panel changes the width a shift is calculated from. `at` gives the box a
69
69
  * caller is about to write instead, which is how the portal's placement asks.
70
70
  * `null` when there is nothing to measure, or inside a `.ui-filter-bar`, which
71
- * bounds its own panels. why: docs/components.md#the-dropdown-panel */
71
+ * bounds its own panels. why: docs/components.md#dropdown */
72
72
  export declare function dropdownViewportFit(
73
73
  panel: Element | null | undefined,
74
74
  at?: { left: number; width: number },
@@ -76,7 +76,7 @@ export declare function dropdownViewportFit(
76
76
  /** How tall a panel may be: the room between its trigger (inside `dd`) and the
77
77
  * viewport edge, from the same dropdownAvail() dropdownViewportFit's `max`
78
78
  * shares its calculation with. `null` when there is nothing to measure.
79
- * why: docs/components.md#the-dropdown-panel */
79
+ * why: docs/components.md#dropdown */
80
80
  export declare function dropdownHeightFit(
81
81
  dd: Element | null | undefined,
82
82
  panel: Element | null | undefined,
@@ -84,7 +84,7 @@ export declare function dropdownHeightFit(
84
84
  /** Stop an open panel's height where it cuts a row through the middle, so the list
85
85
  * reads as going on: the smaller of its cap and its measured room. Call it with the
86
86
  * panel laid out and its room written.
87
- * why: docs/components.md#the-dropdown-panel */
87
+ * why: docs/components.md#dropdown */
88
88
  export declare function dropdownSnap(
89
89
  dd: Element | null | undefined,
90
90
  panel: Element | null | undefined,
@@ -92,21 +92,21 @@ export declare function dropdownSnap(
92
92
  /** Lift an open panel out of a Modal or Drawer body too short to hold its field and
93
93
  * the panel's floor, so it opens over the body the way a portalled panel does, or put a
94
94
  * lifted one back. Returns whether the panel is lifted.
95
- * why: docs/components.md#the-dropdown-panel */
95
+ * why: docs/components.md#dropdown */
96
96
  export declare function dropdownLift(
97
97
  dd: Element | null | undefined,
98
98
  panel: Element | null | undefined,
99
99
  ): boolean;
100
100
  /** Scroll the body an open panel sits in the least distance that shows the whole
101
101
  * panel and its field's label, with the room under the panel kept. Returns the distance scrolled, 0 when
102
- * nothing moved. why: docs/components.md#the-dropdown-panel */
102
+ * nothing moved. why: docs/components.md#dropdown */
103
103
  export declare function dropdownReveal(
104
104
  dd: Element | null | undefined,
105
105
  panel: Element | null | undefined,
106
106
  ): number;
107
107
  /** Give an open panel its box, and take the box away from a shut one once its fade is
108
108
  * over, so a shut panel adds no scroll room. Returns a function that cancels a
109
- * collapse still waiting. why: docs/components.md#the-dropdown-panel */
109
+ * collapse still waiting. why: docs/components.md#dropdown */
110
110
  export declare function dropdownRest(
111
111
  dd: Element | null | undefined,
112
112
  panel: Element | null | undefined,
@@ -5,7 +5,7 @@
5
5
  // react/src/AccentPicker.tsx call accentSwatchStyle(); site/chrome.mjs and
6
6
  // site/index.html still hand-keep the same four gradients. Held by
7
7
  // stories/accent-swatch.test.js, which derives both sides out of src/tokens/.
8
- // why: docs/components.md#page-furniture. See issues #190 and #429.
8
+ // why: docs/components.md#choose-a-component. See issues #190 and #429.
9
9
  export const ACCENTS = ['default', 'phoenix', 'ocean', 'emerald'];
10
10
 
11
11
  // Per accent, the gradient's two stops — each the value src/tokens/ declares for
@@ -2,7 +2,7 @@
2
2
  // /account page. Labels are raw text, because every nav primitive escapes. `key` means
3
3
  // credentials; `plug` means integration. A screen the kit does not ship belongs in the
4
4
  // caller's own nav, not here. The vanilla shell and the React AppShell both read it.
5
- // why: docs/components.md#the-page-shell
5
+ // why: docs/components.md#page-shell
6
6
  export const ACCOUNT_NAV = [
7
7
  { id: 'prefs', icon: 'gear', label: 'Preferences' },
8
8
  { id: 'access', icon: 'key', label: 'Access & agents' },
@@ -1,6 +1,6 @@
1
1
  // Chart arithmetic, shared by the React Chart and by anything that draws the
2
2
  // same shapes without it. No DOM, no pixels: a scale and a walk, both pure.
3
- // why: docs/components.md#react-charts
3
+ // why: docs/components.md#chart
4
4
 
5
5
  /** The steps a whole-unit axis may take, per decade, smallest first. 2.5 is
6
6
  * among them — 25000 is a whole step and the one that turns a four-tick axis
@@ -2,7 +2,7 @@
2
2
  // by the vanilla wiring and the React <Dropdown> (#429 moved it out of
3
3
  // src/components/dropdown.js, so it outlives the vanilla wiring). The functions read
4
4
  // and write the panel's DOM; they hold no state of their own.
5
- // why: docs/components.md#the-dropdown-panel
5
+ // why: docs/components.md#dropdown
6
6
  import { dropdownAvail, dropdownStop } from './dropdown.js';
7
7
  import { transitionMs, prefersReducedMotion } from '../motion.js';
8
8
 
@@ -116,7 +116,7 @@ export function filterPanelRow(dd) {
116
116
  * A panel is anchored at one edge of its dropdown — its inline end when it
117
117
  * carries `is-end` — so room is measured from that edge and the slide goes the
118
118
  * other way. Measuring an end-anchored panel forwards put one off the page.
119
- * why: docs/components.md#a-filter-row-holds-its-panels
119
+ * why: docs/components.md#filter-bar
120
120
  *
121
121
  * A menu that is not a chip's takes this arithmetic by asking, on its own panel,
122
122
  * for a width: `--ui-filter-panel-ask`. why: src/styles/filter-bar.css
@@ -152,7 +152,7 @@ export function filterPanelFit(dd, floor) {
152
152
  * ends. Measured from the trigger, not the panel, the way dropdownViewportFit()
153
153
  * is measured from the panel and not the trigger: each is the box the number it
154
154
  * answers actually depends on. `null` when there is nothing to measure.
155
- * why: docs/components.md#the-dropdown-panel
155
+ * why: docs/components.md#dropdown
156
156
  *
157
157
  * @param {Element} dd the `[data-dropdown]` container the trigger lives in
158
158
  * @param {Element} panel a `[data-dropdown-panel]`, for its gap/edge/min and its
@@ -183,7 +183,7 @@ export function dropdownHeightFit(dd, panel) {
183
183
 
184
184
  /* A panel the wiring lifted out of a body too short to hold it: `position: fixed`, so
185
185
  * it opens over the body the way a portalled panel does. The value is the side it
186
- * opens on. why: docs/components.md#the-dropdown-panel */
186
+ * opens on. why: docs/components.md#dropdown */
187
187
  export const ddLifted = (panel) => typeof panel?.hasAttribute === 'function' && panel.hasAttribute('data-dd-lifted');
188
188
  const ddUp = (panel) => (ddLifted(panel)
189
189
  ? panel.getAttribute('data-dd-lifted') === 'up'
@@ -290,7 +290,7 @@ function ddBodyFit(dd, panel) {
290
290
  * below its trigger or, where the viewport has more room above, over it, the way a
291
291
  * portalled panel opens. It follows its trigger while the body scrolls. Call it with
292
292
  * the panel open and laid out, before sizing it. Returns whether the panel is lifted.
293
- * why: docs/components.md#the-dropdown-panel
293
+ * why: docs/components.md#dropdown
294
294
  */
295
295
  export function dropdownLift(dd, panel) {
296
296
  if (!dd || !panel?.style || dd.__ddPanel) return false;
@@ -389,7 +389,7 @@ function ddPlaceLifted(dd, panel) {
389
389
  * wrapper inside the body that does not scroll is passed over: the ancestor whose end
390
390
  * is the end of what the reader sees is the one scrolled. Instant under
391
391
  * `prefers-reduced-motion`. Returns the distance scrolled.
392
- * why: docs/components.md#the-dropdown-panel
392
+ * why: docs/components.md#dropdown
393
393
  */
394
394
  export function dropdownReveal(dd, panel) {
395
395
  const by = ddRevealOnce(dd, panel);
@@ -422,7 +422,7 @@ function ddReserveEnd(dd, panel, end) {
422
422
  * collapsing under a reader who is looking at that room would slide the field down by
423
423
  * the whole of it: the box stays until the reader has scrolled out of the room, and the
424
424
  * field never moves. The panel is given its box back before anything measures it.
425
- * why: docs/components.md#the-dropdown-panel */
425
+ * why: docs/components.md#dropdown */
426
426
  function ddScrollerOf(dd, panel) {
427
427
  return ddScrollBox(dd, panel)?.el ?? dd.ownerDocument.scrollingElement;
428
428
  }
@@ -446,7 +446,7 @@ function ddCollapse(dd, panel) {
446
446
  * its fade is over. Returns a function that cancels a collapse still waiting.
447
447
  * Does nothing for a portalled panel, which is `position: fixed` and adds no scroll,
448
448
  * and for a panel in a filter row, which its row already bounds.
449
- * why: docs/components.md#the-dropdown-panel
449
+ * why: docs/components.md#dropdown
450
450
  *
451
451
  * @param {Element} dd the `[data-dropdown]` container
452
452
  * @param {Element} panel its `[data-dropdown-panel]`
@@ -563,7 +563,7 @@ function ddRevealLifted(dd, panel, trigger) {
563
563
  * field or not, stops at its own half row. A cap a consumer asked for (`scroll: <n>`)
564
564
  * is kept to its number where it is the smaller, and a panel that fits has nothing to
565
565
  * cut. Call it with the panel laid out and its room written.
566
- * why: docs/components.md#the-dropdown-panel
566
+ * why: docs/components.md#dropdown
567
567
  */
568
568
  export function dropdownSnap(dd, panel) {
569
569
  if (!panel?.style) return;
@@ -648,7 +648,7 @@ export function ddWriteCeiling(panel) {
648
648
 
649
649
  /** A panel a filter row bounds to the row itself. It is nothing the viewport fit
650
650
  * has to measure, and nothing the wiring has to watch for it.
651
- * why: docs/components.md#a-filter-row-holds-its-panels */
651
+ * why: docs/components.md#filter-bar */
652
652
  export const ddInFilterRow = (panel) => typeof panel?.closest === 'function' && !!panel.closest('.ui-filter-bar');
653
653
 
654
654
  /**
@@ -669,7 +669,7 @@ export const ddInFilterRow = (panel) => typeof panel?.closest === 'function' &&
669
669
  *
670
670
  * A panel inside a `.ui-filter-bar` is not this function's subject: a filter row
671
671
  * bounds its panels to the row itself, which already holds them inside the view.
672
- * why: docs/components.md#a-filter-row-holds-its-panels
672
+ * why: docs/components.md#filter-bar
673
673
  *
674
674
  * @param {Element} panel a `[data-dropdown-panel]`, as the sheet has placed it
675
675
  * @param {{left: number, width: number}} [at] the box the caller is about to
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * `value` is display text: it is the chip's only visible line, so a consumer
8
8
  * answers a change with text a reader can read, not a raw code.
9
- * why: docs/components.md#dense-financial-tables
9
+ * why: docs/components.md#data-table
10
10
  */
11
11
 
12
12
  const text = (v) => (v == null ? '' : String(v));
@@ -92,7 +92,7 @@ function focusStops(host) {
92
92
  * last chip keeps no box the focus ring can sit on, so with no control of its own
93
93
  * left the focus has to leave rather than land on a line with no height.
94
94
  * `focusNextStop()` acts on this same list.
95
- * why: docs/components.md#a-filter-row-holds-its-panels */
95
+ * why: docs/components.md#filter-bar */
96
96
  export function nextFocusStop(host) {
97
97
  return focusStops(host)[0] || null;
98
98
  }
@@ -106,7 +106,7 @@ export function nextFocusStop(host) {
106
106
  * the row, which is what the Stock screener draws, else outside the bar.
107
107
  * Being reachable is not taking the focus: each candidate is asked and then
108
108
  * checked. #518
109
- * why: docs/components.md#a-filter-row-holds-its-panels */
109
+ * why: docs/components.md#filter-bar */
110
110
  export function focusNextStop(host) {
111
111
  const doc = host && host.ownerDocument;
112
112
  if (!doc) return null;
@@ -132,7 +132,7 @@ export function focusNextStop(host) {
132
132
  * consumer wrote them left whatever they had marked standing — a menu checking
133
133
  * `All`, `aria-selected="true"` on it, under a chip printing `Asia`. The
134
134
  * consumer's own array and objects are not written to. #550
135
- * why: docs/components.md#a-filter-row-holds-its-panels */
135
+ * why: docs/components.md#filter-bar */
136
136
  export function filterChipItems(filter = {}) {
137
137
  const items = filter.items || [];
138
138
  const chosen = text(filter.value);
@@ -3,7 +3,7 @@
3
3
  * The way up from a page to the page it sits under. It stands above the page
4
4
  * title, and it is quiet at rest: it is on every page below a list, and it
5
5
  * is never what the page is for.
6
- * why: docs/components.md#the-back-link
6
+ * why: docs/components.md#back-link
7
7
  * ========================================================================== */
8
8
 
9
9
  /* Its own line, and only as wide as its words, so the hover ground does not run
@@ -46,7 +46,7 @@
46
46
  .ui-app__main > .ui-back { margin-bottom: var(--space-5); }
47
47
 
48
48
  /* The one part that can run long. It clips rather than wrapping, as .ui-nav__label
49
- does. why: docs/components.md#the-back-link */
49
+ does. why: docs/components.md#back-link */
50
50
  .ui-back__label {
51
51
  min-width: 0;
52
52
  overflow: hidden;
@@ -109,7 +109,7 @@
109
109
  .ui-btn.ui-btn--danger[data-holding]:hover { border-color: var(--pink); }
110
110
 
111
111
  /* -- Sizes -------------------------------------------------------------- */
112
- /* why: docs/components.md#extra-small-buttons */
112
+ /* why: docs/components.md#button */
113
113
  .ui-btn--xs { --btn-pad-y: 4.5px; --btn-pad-x: 8px; --btn-font: var(--text-xs); min-width: 24px; min-height: 24px; }
114
114
  .ui-btn--xs svg { width: 13px; height: 13px; stroke-width: 2.8; }
115
115
  .ui-btn--sm { --btn-pad-y: 6px; --btn-pad-x: 12px; --btn-font: var(--text-sm); min-height: var(--btn-height-sm); }
@@ -164,7 +164,7 @@
164
164
  contrast table shows that. The box was reverted and this ink shipped.
165
165
  Held by src/styles/button-disabled.test.js. */
166
166
 
167
- /* why: docs/components.md#busy-button-labels */
167
+ /* why: docs/components.md#button */
168
168
  .ui-btn { position: relative; }
169
169
  .ui-btn[aria-busy="true"] { pointer-events: none; }
170
170
  .ui-btn[aria-busy="true"][data-btn-wired] {
@@ -138,7 +138,7 @@
138
138
  margin: 0 0 var(--space-2);
139
139
  }
140
140
  /* The title row: the title, then the card's tools centred on its line, in the
141
- title's step. why: docs/components.md#content-and-status */
141
+ title's step. why: docs/components.md#choose-a-component */
142
142
  .ui-card__head {
143
143
  display: flex;
144
144
  align-items: center;
@@ -7,7 +7,7 @@
7
7
  * .ui-chart__plot the drawing and its column labels
8
8
  * .ui-chart__data the same numbers as a table
9
9
  * The component sets --ui-chart-h, the plot's height, which the axis matches.
10
- * why: docs/components.md#react-charts
10
+ * why: docs/components.md#chart
11
11
  * ========================================================================== */
12
12
 
13
13
  .ui-chart {
@@ -39,7 +39,7 @@
39
39
  .ui-chart--spark .ui-chart__frame { grid-template-columns: minmax(0, 1fr); }
40
40
  /* The box, not the drawing: a phone target does not fit in 32px. Written here
41
41
  rather than left to the height attribute, which `.ui-stat__trend svg` beats.
42
- why: docs/components.md#react-charts */
42
+ why: docs/components.md#chart */
43
43
  .ui-chart--spark .ui-chart__svg { height: var(--ui-chart-box); }
44
44
 
45
45
  /* -- the legend ------------------------------------------------------------ */
@@ -12,7 +12,7 @@
12
12
  * Two densities, one markup: the default packs a row onto one line, and
13
13
  * `.ui-cmdk--roomy` gives the description a line of its own.
14
14
  *
15
- * why: docs/components.md#the-command-palette */
15
+ * why: docs/components.md#command-palette */
16
16
 
17
17
  .ui-cmdk {
18
18
  /* The floating step; nothing casts. why: docs/foundations.md#elevation */
@@ -174,7 +174,7 @@
174
174
  13.3333px Arial`, centred text and a shrink-to-fit width, and a consumer who
175
175
  needs the row operable from the keyboard should get the row this sheet
176
176
  describes rather than that. `font: inherit` comes before the line-height it
177
- keeps. why: docs/components.md#a-dropdown-row-is-a-div-a-link-or-a-button */
177
+ keeps. why: docs/components.md#dropdown */
178
178
  .ui-cmdk__item {
179
179
  display: flex;
180
180
  border: 0;
@@ -203,7 +203,7 @@
203
203
  panel, and rows are held apart by space alone. Groups stand apart by space too.
204
204
  The one line inside the body stands under each group heading, the same hairline
205
205
  as a table head, so a heading and a table head read as one kind of line.
206
- why: docs/components.md#the-drawer */
206
+ why: docs/components.md#drawer */
207
207
  .ui-drawer__section + .ui-drawer__section { margin-top: var(--space-8); }
208
208
  /* An h3, and it opts out of the display face for the reason .ui-drawer__title does.
209
209
  why: docs/foundations.md#typefaces */
@@ -221,7 +221,7 @@
221
221
  }
222
222
  /* The record's lead figure: a <dl> of one label over its value, with a status badge
223
223
  beside the value. It stands in a group with no heading, before the other groups.
224
- why: docs/components.md#the-drawer */
224
+ why: docs/components.md#drawer */
225
225
  .ui-drawer__figure { margin: 0; }
226
226
  .ui-drawer__figure > dt { color: var(--text); }
227
227
  .ui-drawer__figure > dd {