@apliteni/apliteni-ui 0.178.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.
@@ -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
@@ -15,10 +15,12 @@
15
15
  max-width: 100%;
16
16
  align-items: center;
17
17
  gap: var(--space-1);
18
- /* WCAG 2.5.8's 24px: the line of text alone is 17px tall. */
19
- min-height: var(--space-6);
20
- padding: 0 var(--space-2) 0 var(--space-1);
21
- border-radius: var(--radius-sm);
18
+ /* 32px, a small button's height: the line of text alone is 17px tall. On a phone
19
+ with touch, tap-zone.css lifts the target to 44px. A pill, as every control. #834
20
+ why: docs/foundations.md#control-corners */
21
+ min-height: var(--space-8);
22
+ padding: 0 var(--space-3) 0 var(--space-2);
23
+ border-radius: var(--radius-pill);
22
24
  font-family: var(--font-sans);
23
25
  font-size: var(--text-sm);
24
26
  font-weight: var(--weight-medium);
@@ -44,7 +46,7 @@
44
46
  .ui-app__main > .ui-back { margin-bottom: var(--space-5); }
45
47
 
46
48
  /* The one part that can run long. It clips rather than wrapping, as .ui-nav__label
47
- does. why: docs/components.md#the-back-link */
49
+ does. why: docs/components.md#back-link */
48
50
  .ui-back__label {
49
51
  min-width: 0;
50
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 {
@@ -11,7 +11,7 @@
11
11
  the last thing the body holds, so the body ends where the panel ends; this 1px spot
12
12
  lets it scroll that far. It stays through the fade and until the reader has scrolled
13
13
  out of it, so closing does not move the field, and it paints nothing.
14
- why: docs/components.md#the-dropdown-panel */
14
+ why: docs/components.md#dropdown */
15
15
  .ui-dropdown[style*="--ui-dropdown-reach"]::after {
16
16
  content: "";
17
17
  position: absolute;
@@ -50,7 +50,16 @@
50
50
  pointer resting on a focused control would put it back. One indicator, which is
51
51
  what the kit's rows already chose. why: docs/foundations.md#the-focus-ring */
52
52
  .ui-dropdown__trigger:enabled:hover:not(:focus-visible) { border-color: var(--accent); }
53
- .ui-dropdown__trigger:focus-visible { outline: var(--ring); outline-offset: var(--ring-offset); }
53
+ /* The kit's invalid edge, on a Dropdown or a DatePicker that a Field marks invalid, also
54
+ under the pointer. The hover selector ties live hover at (0,4,0) and comes later, and the
55
+ off rules below tie it and come later still, so an off trigger keeps the off edge. #835
56
+ why: docs/components.md#fields */
57
+ .ui-dropdown__trigger[aria-invalid="true"],
58
+ .ui-dropdown__trigger[aria-invalid="true"]:hover:not(:focus-visible) { border-color: var(--pink); }
59
+ /* As a select: under the ring the edge keeps its width and goes transparent, so focus has
60
+ one line, also on an invalid trigger. Later than the invalid edge, earlier than the off
61
+ rules. why: docs/foundations.md#the-focus-ring */
62
+ .ui-dropdown__trigger:focus-visible { border-color: transparent; outline: var(--ring); outline-offset: var(--ring-offset); }
54
63
  /* Off. The off hover-not-focus selectors are (0,4,0), tied with live hover and later.
55
64
  A pointer over a dead control changes nothing while an aria-disabled one keeps its stop and the ring.
56
65
  No fill: --disabled-surface IS this control's --surface, in both themes. The
@@ -79,7 +88,7 @@
79
88
  /* Chevron — border caret that flips when the container is .open. Its ink is an L
80
89
  on a rotated square, so centring the BOX leaves the mark off centre; --caret-off
81
90
  is that gap, derived rather than typed.
82
- why: docs/components.md#the-dropdown-panel */
91
+ why: docs/components.md#dropdown */
83
92
  .ui-dropdown__chevron {
84
93
  --caret: 8px;
85
94
  --caret-ink: 1.6px;
@@ -104,24 +113,24 @@
104
113
  .ui-dropdown__panel {
105
114
  /* One number for the trigger-to-panel offset, read by both edges here and by
106
115
  the portal's JS, so an upward panel cannot drift from a downward one.
107
- why: docs/components.md#the-dropdown-panel */
116
+ why: docs/components.md#dropdown */
108
117
  --ui-dropdown-gap: 9px;
109
118
  /* The least a panel keeps between itself and the edge of the view it is laid out
110
119
  in. The wiring reads it off the panel and moves the panel along the inline axis
111
120
  when the edge `align` asked for does not fit; a page wanting a panel flush with
112
121
  the screen's edge sets it to 0.
113
- why: docs/components.md#the-dropdown-panel */
122
+ why: docs/components.md#dropdown */
114
123
  --ui-dropdown-edge: 8px;
115
124
  /* What a panel that opens down inside a Modal or Drawer body keeps between its end
116
125
  and the body's end. The drop shadow fades out over 43px in light and 15px in dark,
117
126
  measured from pixels; the body clips whatever is left of it. 48px is the 8px
118
- step above the light figure. why: docs/components.md#the-dropdown-panel */
127
+ step above the light figure. why: docs/components.md#dropdown */
119
128
  --ui-dropdown-shade: 48px;
120
129
  /* The least height a capped panel keeps before it would rather spend the edge
121
130
  inset above than shrink further — three rows or so. Below it the panel
122
131
  still ends at or before the edge; it never spends room past the edge to
123
132
  reach this floor, because that room does not exist. #489
124
- why: docs/components.md#the-dropdown-panel */
133
+ why: docs/components.md#dropdown */
125
134
  --ui-dropdown-min: 120px;
126
135
  /* The tallest a panel grows before it scrolls inside itself. It is the figure the
127
136
  reference systems settle on, 256 to 300px, and the one `scroll` and the search
@@ -130,11 +139,11 @@
130
139
  shows 7 whole rows and half of the eighth in a plain list, 4 and a half with a
131
140
  description line, 5 and a half under a search field and 3 and a half with both.
132
141
  A consumer asks for another cap with `scroll: <n>`.
133
- why: docs/components.md#the-dropdown-panel */
142
+ why: docs/components.md#dropdown */
134
143
  --ui-dropdown-max: 300px;
135
144
  /* Named for the same reason the offset is: a block pinned to an edge has to
136
145
  bleed back through it, and #306 is a page copying the number by hand.
137
- why: docs/components.md#the-dropdown-panel */
146
+ why: docs/components.md#dropdown */
138
147
  --ui-dropdown-pad: 6px;
139
148
  /* The panel states its own role rather than inheriting one, because `portal:
140
149
  true` moves it onto <body> and an inherited face is then decided by where
@@ -156,7 +165,7 @@
156
165
  240. The wiring writes the property off the LAYOUT viewport; the fallback is
157
166
  for a page whose JS has not run, and is a classic scrollbar's width too
158
167
  generous, because `100vw` counts a scrollbar the panel's own box does not.
159
- why: docs/components.md#the-dropdown-panel */
168
+ why: docs/components.md#dropdown */
160
169
  max-width: var(--ui-dropdown-ceiling, calc(100vw - 2 * var(--ui-dropdown-edge)));
161
170
  /* And this is what holds an IN-PLACE one, whose room is its trigger's block: a
162
171
  shrink-to-fit box is its min-content wide at the least, and one 70-character
@@ -188,7 +197,7 @@
188
197
  means nothing has measured yet, which is a server-rendered page before
189
198
  hydration — so the fallback promises the same thing at a coarser grain, the
190
199
  viewport less the edge inset at each end.
191
- why: docs/components.md#the-dropdown-panel */
200
+ why: docs/components.md#dropdown */
192
201
  max-height: min(
193
202
  var(--ui-dropdown-cap, var(--ui-dropdown-max)),
194
203
  var(--ui-dropdown-fit, 100dvh),
@@ -202,7 +211,7 @@
202
211
  visibility: hidden;
203
212
  /* Drawn for the whole of the fade out, so the rows do not vanish mid-fade — and a
204
213
  box that is drawn is a box that is hit. The open rules take this back.
205
- why: docs/components.md#the-dropdown-panel */
214
+ why: docs/components.md#dropdown */
206
215
  pointer-events: none;
207
216
  transform: translateY(-6px);
208
217
  transition:
@@ -221,7 +230,7 @@
221
230
  /* On a phone, the panel keeps the page's 16px margin at the shell fold, or the wider
222
231
  safe-area inset, the gap the phone account window keeps. Registered as a length so
223
232
  the wiring reads one number, not the max() expression. #808
224
- why: docs/components.md#the-dropdown-panel */
233
+ why: docs/components.md#dropdown */
225
234
  @property --ui-dropdown-edge { syntax: "<length>"; inherits: true; initial-value: 8px; }
226
235
  @media (max-width: 720px) {
227
236
  .ui-dropdown__panel { --ui-dropdown-edge: max(var(--space-4), env(safe-area-inset-left), env(safe-area-inset-right)); }
@@ -238,19 +247,19 @@
238
247
  /* The wiring lifts a panel out of a Modal or Drawer body too short to hold the field's
239
248
  label and trigger, the floor and the 8px edge under it. Fixed, it opens over the
240
249
  body the way a portalled panel does, and the wiring writes its edges from the
241
- trigger's. The value is the side it opens on. why: docs/components.md#the-dropdown-panel */
250
+ trigger's. The value is the side it opens on. why: docs/components.md#dropdown */
242
251
  .ui-dropdown__panel[data-dd-lifted] { position: fixed; }
243
252
  .ui-dropdown__panel[data-dd-lifted="up"] { transform: translateY(6px); }
244
253
 
245
254
  /* A search list that carries the consumer's own cap keeps it, and the panel is that cap
246
255
  and the search field over it. The wiring writes the sum as --ui-dropdown-fit; this
247
- lifts the standard cap out of its way. why: docs/components.md#the-dropdown-panel */
256
+ lifts the standard cap out of its way. why: docs/components.md#dropdown */
248
257
  .ui-dropdown__panel--search:has(> .ui-dropdown__list[style*="--ui-dropdown-cap"]) { --ui-dropdown-max: 100dvh; }
249
258
 
250
259
  /* A shut panel is still laid out, and a box that is laid out counts towards the
251
260
  scroll of the body or page it sits in. The wiring collapses it once its fade is
252
261
  over and gives the box back before the next open measures it. The width stays, so
253
- the horizontal fit reads the same number. why: docs/components.md#the-dropdown-panel */
262
+ the horizontal fit reads the same number. why: docs/components.md#dropdown */
254
263
  .ui-dropdown__panel[data-dd-shut] {
255
264
  max-height: 0;
256
265
  padding-block: 0;
@@ -272,7 +281,7 @@
272
281
  them, and a consumer who set `bottom` and left our `top` standing got a
273
282
  fourteen-pixel panel. The entry travel is mirrored too, so the panel arrives
274
283
  from the trigger whichever way it opens.
275
- why: docs/components.md#the-dropdown-panel */
284
+ why: docs/components.md#dropdown */
276
285
  .ui-dropdown__panel.is-up {
277
286
  top: auto;
278
287
  bottom: calc(100% + var(--ui-dropdown-gap));
@@ -283,7 +292,7 @@
283
292
  /* Open, the panel is visible AT ONCE: `visibility` is off the list, so it is not
284
293
  held at `hidden` for the frame a key opens the panel in — the frame the focus
285
294
  call happens in. Closing still fades on every property it always did.
286
- why: docs/components.md#the-dropdown-panel */
295
+ why: docs/components.md#dropdown */
287
296
  .ui-dropdown.open .ui-dropdown__panel,
288
297
  .ui-dropdown__panel--portal.is-open { transition-property: opacity, transform; }
289
298
 
@@ -291,7 +300,7 @@
291
300
  property of its own still transitions the inherited `visibility`, so it is hidden in
292
301
  the frame openDropdown() focuses into it — #519. Keyed on the data hook, because the
293
302
  topbar's two menus open on the same wiring and keep their own CSS.
294
- why: docs/components.md#the-dropdown-panel */
303
+ why: docs/components.md#dropdown */
295
304
  @media (prefers-reduced-motion: reduce) {
296
305
  .open > [data-dropdown-panel] *,
297
306
  [data-dropdown-panel].is-open * { transition: none !important; }
@@ -302,7 +311,7 @@
302
311
  selector above stops matching the moment it leaves the trigger's subtree, so
303
312
  its open state is a class of its own; the wiring writes the viewport
304
313
  coordinates inline, and these `auto`s are what it writes over.
305
- why: docs/components.md#the-dropdown-panel */
314
+ why: docs/components.md#dropdown */
306
315
  .ui-dropdown__panel--portal {
307
316
  position: fixed;
308
317
  top: auto; right: auto; bottom: auto; left: auto;
@@ -313,7 +322,7 @@
313
322
  <a href> or a <button>: `is-selected` and __tick below mean a row gets
314
323
  chosen, and choosing is a button's job. So the tag's own styling is reset
315
324
  here, the way .ui-nav__item resets it, and the three render identically.
316
- why: docs/components.md#a-dropdown-row-is-a-div-a-link-or-a-button */
325
+ why: docs/components.md#dropdown */
317
326
  .ui-dropdown__item {
318
327
  display: flex;
319
328
  gap: 11px;
@@ -366,7 +375,7 @@
366
375
  /* A row that opens a submenu (#736): the current value at the trailing edge in body ink,
367
376
  then a chevron. The submenu is a second panel beside this one, or, in a panel marked
368
377
  is-sub, the only rows showing.
369
- why: docs/components.md#a-submenu-row */
378
+ why: docs/components.md#dropdown */
370
379
  .ui-dropdown__aside { margin-left: auto; flex: none; font-size: var(--text-xs); color: var(--text); }
371
380
  .ui-dropdown__more { margin-left: auto; display: inline-flex; flex: none; /* muted-ink: glyph — submenu chevron */ color: var(--muted); }
372
381
  .ui-dropdown__aside + .ui-dropdown__more { margin-left: 0; }
@@ -413,7 +422,7 @@
413
422
  .ui-dropdown__item.is-disabled .ui-dropdown__desc { color: inherit; }
414
423
  /* Body ink at rest, --pink on the way to being pressed. Both states, not hover alone:
415
424
  the ring says where the reader is, not that this row ends something.
416
- why: docs/components.md#a-dropdown-row-is-a-div-a-link-or-a-button */
425
+ why: docs/components.md#dropdown */
417
426
  .ui-dropdown__item.is-danger .ui-dropdown__label { color: var(--text); }
418
427
  .ui-dropdown__item.is-danger:hover .ui-dropdown__label,
419
428
  .ui-dropdown__item.is-danger:focus-visible .ui-dropdown__label { color: var(--pink); }
@@ -438,7 +447,7 @@
438
447
 
439
448
  /* Optional pinned head/foot blocks — symmetrical: one inner padding, and each
440
449
  bleeding to the edge it sits on, lining the edge it faces.
441
- why: docs/components.md#the-dropdown-panel */
450
+ why: docs/components.md#dropdown */
442
451
  .ui-dropdown__panel > .ui-dropdown__head,
443
452
  .ui-dropdown__panel > .ui-dropdown__foot {
444
453
  padding: 11px 13px;
@@ -458,7 +467,7 @@
458
467
  reader types. The rows move into a list of their own, so the field stays put
459
468
  while the list scrolls. Every rule below keys on a class only the search
460
469
  variant emits, so the plain dropdown renders as it did.
461
- why: docs/components.md#a-dropdown-with-a-search-field */
470
+ why: docs/components.md#dropdown */
462
471
  /* A column, so the panel's own avail-based max-height (above) lands on the rows
463
472
  and not on the field: the field and the empty-state block keep their content
464
473
  height, and the list — the child that can overflow — gives up the room they
@@ -488,7 +497,7 @@
488
497
  /* The ground and line .ui-input takes. why: docs/foundations.md#elevation */
489
498
  background: var(--field-bg); /* code-bg: inherit — control paint; the containing surface is the ground, for a chip and for a band alike. */
490
499
  border: 1px solid var(--field-edge);
491
- border-radius: var(--radius-pill);
500
+ border-radius: var(--radius-md); /* The field corner, as .ui-input. #836 */
492
501
  padding: 8px 12px 8px 34px;
493
502
  /* The height Chromium paints (38.25px), stated so the target-size gate, which
494
503
  cannot see an <input>'s line of text, reads the box a reader hits. */
@@ -553,8 +562,8 @@
553
562
  .ui-field > .ui-dropdown > .ui-dropdown__trigger > .ui-dropdown__chevron { margin-left: auto; }
554
563
  .ui-field > .ui-dropdown > .ui-dropdown__panel { inline-size: 100%; min-width: 0; }
555
564
  /* In a form the trigger takes the text input's block padding and type, so the two
556
- stand at one height. Both are pills, so it keeps its own corner. #812, #823
557
- why: docs/components.md#forms */
565
+ stand at one height. It keeps the pill, and the input has the field corner. #812, #836
566
+ why: docs/components.md#fields */
558
567
  @property --ui-dropdown-line { syntax: "<length>"; inherits: true; initial-value: 0px; }
559
568
  .ui-field > .ui-dropdown > .ui-dropdown__trigger {
560
569
  padding: var(--space-3) var(--space-4);
@@ -573,6 +582,10 @@
573
582
  text-overflow: ellipsis;
574
583
  text-align: start;
575
584
  }
585
+ /* The chosen value takes the text input's regular weight and normal spacing. No colour:
586
+ the value keeps --strong, a disabled value its off ink and a placeholder its muted ink.
587
+ rev_67189e20ee1f/d5 why: docs/components.md#fields */
588
+ .ui-field > .ui-dropdown > .ui-dropdown__trigger > .ui-dropdown__value { font-weight: var(--weight-normal); letter-spacing: normal; }
576
589
  /* The mark stands as far from the left edge as from the top and bottom edges. */
577
590
  .ui-field > .ui-dropdown > .ui-dropdown__trigger > .ui-avatar {
578
591
  --ui-avatar-pull-start: calc(var(--space-4) - var(--space-3) - (var(--ui-dropdown-line) - var(--ui-avatar-size)) / 2);
@@ -1,5 +1,5 @@
1
1
  /* File drop — .ui-drop. One row at rest; the field-sized box stays with .ui-file.
2
- * why: docs/components.md#react-file-drop */
2
+ * why: docs/components.md#file-drop */
3
3
  .ui-drop { position: relative; }
4
4
 
5
5
  /* The row is a size container, so its content gives it no width. In a parent
@@ -39,10 +39,10 @@
39
39
 
40
40
  /* Shut, a panel is the trigger's width, never the 240px floor a standalone
41
41
  dropdown gets: it is laid out while hidden, so a wider one widened the page
42
- (#467). why: docs/components.md#a-filter-row-holds-its-panels */
42
+ (#467). why: docs/components.md#filter-bar */
43
43
  .ui-filter-bar .ui-dropdown__panel { min-width: 100%; max-width: 100%; overflow-wrap: anywhere; }
44
44
  /* Clear is a quiet text button: no edge in any state, and no fill but the pointer's wash below.
45
- why: docs/components.md#a-filter-row-holds-its-panels */
45
+ why: docs/components.md#filter-bar */
46
46
  [data-filter-clear] button { background: transparent; }
47
47
  .ui-filter-bar [data-filter-clear] button:disabled,
48
48
  .ui-filter-bar [data-filter-clear] button[aria-disabled="true"],
@@ -69,7 +69,7 @@
69
69
  filterPanelFit(); `is-closing` holds that geometry through the fade. A chip's menu
70
70
  reaches for the kit's menu floor; the add control's catalogue asks for a panel's
71
71
  width instead, because a search field over it reads "Searc" at 240. #549, #496
72
- why: docs/components.md#a-filter-row-holds-its-panels */
72
+ why: docs/components.md#filter-bar */
73
73
  .ui-filter-bar [data-filter-add] .ui-dropdown__panel { --ui-filter-panel-ask: var(--panel-sm); }
74
74
  .ui-filter-bar__chip .ui-dropdown.open .ui-dropdown__panel,
75
75
  .ui-filter-bar__chip .ui-dropdown__panel.is-closing,
@@ -96,7 +96,7 @@
96
96
  open menu too and left 9.8px of the check in a 240px menu — a chevron, not a
97
97
  tick. Open the menu is at the floor with room for the mark, and `is-closing`
98
98
  holds the open geometry through the fade, so it is open for this as well. #550
99
- why: docs/components.md#a-filter-row-holds-its-panels */
99
+ why: docs/components.md#filter-bar */
100
100
  .ui-filter-bar__chip .ui-dropdown:not(.open) .ui-dropdown__panel:not(.is-closing) .ui-dropdown__tick {
101
101
  flex-shrink: 1;
102
102
  min-width: 0;
@@ -107,7 +107,7 @@
107
107
  tab you are on, and keeps the kit's 16px check. The wash is a 1.2:1 tint, so the
108
108
  check is what identifies the state under WCAG 1.4.1; Apple, Material, Carbon,
109
109
  Primer and Radix all tick a chosen menu row. #549
110
- why: docs/components.md#a-filter-row-holds-its-panels */
110
+ why: docs/components.md#filter-bar */
111
111
  .ui-filter-bar .ui-dropdown__item.is-selected { background: var(--glow-purple); /* code-bg: inherit — a translucent wash moves the ground, not the chip on it. */ }
112
112
  /* A chip's menu lists the values the chip prints, so its rows take the body weight and
113
113
  not the kit's semibold menu label. #757 */
@@ -126,7 +126,7 @@
126
126
  hover deepens it: 9% more accent, the step .ui-table--zebra gives a hovered row.
127
127
  The arrow keys need nothing here: ddSetActive() writes no .is-active without a search
128
128
  field and filterBar() builds none, so an arrow key moves real focus instead. #578
129
- why: docs/components.md#a-filter-row-holds-its-panels */
129
+ why: docs/components.md#filter-bar */
130
130
  .ui-filter-bar .ui-dropdown__item.is-selected:hover { background: color-mix(in srgb, var(--glow-purple), var(--accent) 9%); /* code-bg: inherit — a translucent wash moves the ground, not the chip on it. */ }
131
131
 
132
132
  /* A chip's height — a remove mark's line box, padding and border — named so every chip,
@@ -140,7 +140,7 @@
140
140
  chip alone leaves the text high: the chip is a fieldset. On a touch screen the row is a
141
141
  chip's height, 40px, and a small button or segmented control on any of its lines takes
142
142
  it too. #822, rev_1bef7d7c3b22/d5
143
- why: docs/components.md#a-toolbar-at-one-column */
143
+ why: docs/components.md#toolbar */
144
144
  @media not (pointer: coarse) {
145
145
  .ui-toolbar:has(> .ui-input-group > .ui-input--sm),
146
146
  .ui-toolbar:has(> .ui-input-group > .ui-input--sm) .ui-filter-bar { --ui-filter-row-h: var(--btn-height-sm); }
@@ -174,6 +174,7 @@
174
174
  .ui-filter-bar [data-filter-add] .ui-dropdown__trigger { min-height: var(--ui-filter-row-h); border-color: var(--control-edge); background: transparent; }
175
175
  .ui-filter-bar [data-filter-add] .ui-dropdown__trigger svg { width: 16px; height: 16px; flex: none; stroke-width: 2.4; }
176
176
  .ui-filter-bar [data-filter-add] .ui-dropdown__trigger:enabled:hover:not(:focus-visible) { border-color: var(--accent); }
177
+ .ui-filter-bar [data-filter-add] .ui-dropdown__trigger:focus-visible { border-color: transparent; }
177
178
  .ui-filter-bar [data-filter-add] .ui-dropdown__trigger:disabled { border-color: var(--disabled-border); }
178
179
  .ui-filter-bar [data-filter-add] .ui-dropdown__trigger[aria-disabled="true"],
179
180
  .ui-filter-bar [data-filter-add] .ui-dropdown__trigger[aria-disabled="true"]:hover:not(:focus-visible) { border-color: var(--disabled-border); }
@@ -27,12 +27,16 @@
27
27
  why: docs/foundations.md#elevation */
28
28
  background: var(--field-bg); /* code-bg: inherit — control paint; the containing surface is the ground, for a chip and for a band alike. */
29
29
  border: 1px solid var(--field-edge);
30
- border-radius: var(--radius-pill); /* why: docs/foundations.md#control-corners */
31
30
  padding: 12px 15px;
32
31
  width: 100%;
33
32
  transition: border-color var(--dur-med) var(--ease), box-shadow var(--dur-med) var(--ease);
34
33
  }
35
- .ui-textarea { resize: vertical; min-height: 96px; line-height: 1.55; border-radius: var(--radius-md); }
34
+ /* The field corner: a field that takes text is a box, not a pill. The select is a
35
+ control the reader presses, so it keeps the pill below. #836
36
+ why: docs/foundations.md#control-corners */
37
+ .ui-input,
38
+ .ui-textarea { border-radius: var(--radius-md); }
39
+ .ui-textarea { resize: vertical; min-height: 96px; line-height: 1.55; }
36
40
 
37
41
  .ui-input:hover,
38
42
  .ui-textarea:hover,
@@ -111,6 +115,7 @@
111
115
  chevron. It is a plain stroke with butt ends and a mitred point, 11.3px wide.
112
116
  why: docs/foundations.md#colour-and-contrast */
113
117
  .ui-select {
118
+ border-radius: var(--radius-pill); /* why: docs/foundations.md#control-corners */
114
119
  appearance: none;
115
120
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='-6 -6 12 12' fill='none' stroke='%23a29db6' stroke-width='1.6'%3E%3Cpath d='M-5.09 -2.83L0 2.26l5.09-5.09'/%3E%3C/svg%3E");
116
121
  background-repeat: no-repeat;
@@ -339,14 +344,14 @@
339
344
  screen it keeps 16px text, because iOS zooms into a field under 16px, and stands 40px,
340
345
  a chip's height. rev_1bef7d7c3b22/d5, #832 The group's
341
346
  42px left padding outranks the side padding here, so the glyph keeps its place. #822
342
- why: docs/components.md#react-search-field */
347
+ why: docs/components.md#search-field */
343
348
  @media not (pointer: coarse) {
344
349
  .ui-input--sm {
345
350
  font-size: var(--text-sm);
346
351
  line-height: var(--leading-tight);
347
352
  min-height: var(--btn-height-sm);
348
353
  padding: var(--space-1) var(--space-3);
349
- border-radius: var(--radius-pill); /* why: docs/foundations.md#control-corners */
354
+ border-radius: var(--radius-md); /* why: docs/foundations.md#control-corners */
350
355
  }
351
356
  }
352
357
  @media (pointer: coarse) {