@apliteni/apliteni-ui 0.174.0 → 0.177.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.
@@ -409,8 +409,9 @@ two-pixel band. A row that reaches the panel edges draws the ring on the panel b
409
409
  outside it. The panel has only two choices: **keep the three pixels inside the panel as padding,
410
410
  so the ring appears in the padding; or do not clip at the panel edge, so the ring crosses it.**
411
411
  If the panel does neither, it cuts off the ring and leaves the reader with two accent bars.
412
- `.ui-dropdown__panel` uses the first choice. The account menu uses the second, so its ring
413
- extends two pixels beyond the panel border. This is accepted.
412
+ `.ui-dropdown__panel`, the top bar's version menu and the account menu use the first choice.
413
+ A menu row draws its ring inward, inside its own corner, so the ring never touches the
414
+ panel edge or a divider.
414
415
 
415
416
  ### A filter row holds its panels
416
417
 
@@ -515,6 +516,12 @@ item has `href`. It never emits a `<button>`. A row that must be a real button i
515
516
  [one you write yourself](#a-dropdown-row-you-write-yourself). **A destructive row stays quiet
516
517
  and turns `--pink` on the way to being pressed**, in both hover and focus.
517
518
 
519
+ **Every menu row answers the pointer with a fill and draws no edge.** Only keyboard focus draws
520
+ the band, inside the row and on the row's corner. A row in a menu that you style yourself keeps
521
+ the `.ui-dropdown__item` class, so it takes the same hover, focus and forced-colour rules. A
522
+ menu head that reaches the panel edge keeps a 5px gap above the first row. In forced colours a
523
+ separator stays a visible 1px line.
524
+
518
525
  ### A submenu row
519
526
 
520
527
  A row that opens a submenu carries `aria-haspopup="menu"` and `aria-expanded`. It ends in
@@ -939,6 +946,17 @@ of the row wraps below it.
939
946
  A title without an introduction keeps a 32px gap before the page body.
940
947
  A control row directly inside the page body, a `.ui-card-stack` or a `.ui-stack` sits one inner gap, 8px, above the block it controls. On a touch phone below `560px`, that gap is 20px.
941
948
  Use `.ui-toolbar--split` to place the final control at the row's end. On a phone, it stays in that row beside the control before it, rather than dropping to its own line.
949
+ Every control on a toolbar line takes the line's height, so a button beside a field or a filter chip has the same top and bottom edge. Put a button and a field that share a row in `.ui-toolbar`, and change neither control's size.
950
+
951
+ **A toolbar that opens with a small search field is a small row.** With a mouse, its filter
952
+ chips, the add control and Clear all stand at 32px, level with the field, a dropdown trigger, a
953
+ small Segmented and a small button. Give the Segmented and the button `size="sm"` yourself. The
954
+ small search field stops at `--panel-sm`, 320px, and the free width goes before the last
955
+ control. A full-size search field still takes the free width. At `560px` and below, each search
956
+ field takes the full line. On a touch screen the row keeps the full height: the field is 46px,
957
+ and a chip, Clear all, a dropdown trigger, the Segmented and the button are 40px on a line
958
+ without the field. At both sizes, the text and the glyphs of the row share one vertical centre,
959
+ within about 1.5px.
942
960
 
943
961
  ### Segmented strips that outgrow their column
944
962
 
@@ -1115,6 +1133,13 @@ the control's only name**, because no label appears in the row. It declares no C
1115
1133
  toolbar's row rule and the field's focus ring therefore reach it from the kit's stylesheet.
1116
1134
  **There is no clear button**, because the browser paints its own near-black button on the light
1117
1135
  field and white button on the dark one.
1136
+ **`size="sm"` is the field above a dense table.** With a mouse it is 32px high with `--text-sm`, the
1137
+ text of the dense rows, and the pill corner. Without `size`, the field keeps its full size. At every
1138
+ size, the leading glyph sits on the vertical centre of the text and the caret. A `TextField` glyph
1139
+ does the same. On a touch screen a
1140
+ small field is the full field. Only `SearchField` takes a size: `TextField` and `SelectField` keep
1141
+ one size, because a form keeps the full size. See
1142
+ [A toolbar at one column](#a-toolbar-at-one-column).
1118
1143
 
1119
1144
  ### React date and month picker
1120
1145
 
@@ -1153,9 +1178,14 @@ a chosen or dropped file through `onFile` and renders the `file` you provide. **
1153
1178
  `status` is uploading**, so the kit never reports success unless you claim it. **A status the
1154
1179
  row draws includes a circled mark and a word**, because colour alone does not show status. When
1155
1180
  `progress` is provided, the track shows the status instead. `Remove` and `Retry` appear only
1156
- when you provide `onRemove` and `onRetry`. **No tier ever takes a second line:** the name
1157
- truncates its stem but keeps its extension. The full name is in a `title`. **One layout serves
1158
- every width.** **The drop target is painted only while a file is over the region. It covers
1181
+ when you provide `onRemove` and `onRetry`. **A file keeps the resting row's 32px height:** the
1182
+ name, the size, and the status or the track stand on one line, and `Remove` ends it. The track
1183
+ fills the free room on the line. The name gives way first: it truncates its stem but keeps its
1184
+ extension, and the full name is in a `title`. **One layout serves every width.** In a row of
1185
+ 352px or less, the size leaves the line, and a screen reader still reads it. A refused file
1186
+ shows its reason on the name's line. When the full name and the reason do not fit there, the
1187
+ reason moves under the name and the row grows by one line, to 61px. In a parent that sizes to its
1188
+ content, `FileDrop` is 420px wide, or narrower when the parent has less room. **The drop target is painted only while a file is over the region. It covers
1159
1189
  that region instead of joining it**, so the row stays in place while the reader aims. Children
1160
1190
  render above the row inside the same region. This lets one panel, or a whole page, become the
1161
1191
  target. A disabled drop never calls `preventDefault` on `dragover`, so it does not declare
@@ -1479,13 +1509,14 @@ dropdown's `id` sits on a wrapper that a label cannot name. The label and then t
1479
1509
  the trigger, the error or hint describes it, and an error marks it invalid. The list is named by the
1480
1510
  label unless you give it an `ariaLabel`. A control outside a `field()` needs its own `ariaLabel`. A
1481
1511
  placeholder is not a name. **In a field, a dropdown trigger has the shape of a text input.** It
1482
- takes the input's corner, its top and bottom padding and its type size, so the two have the same
1483
- height. Its side padding is 16px, 1px more than the input's. On a touch screen its text is a
1512
+ has the input's pill corner, its top and bottom padding and its type size, so the two have the
1513
+ same height. Its side padding is 16px, 1px more than the input's. On a touch screen its text is a
1484
1514
  fixed 16px, as the input's is, also when the host changes `--text-base`. A long value stays on
1485
1515
  one line, starts at the left and ends with an ellipsis, as in a select, so the trigger keeps the
1486
1516
  input's height at every value length. A person mark stands as far from the left edge as from the
1487
1517
  top and bottom edges. A date picker in a field does the same. Outside a field, for example in a
1488
- filter bar, a toolbar or the topbar, the trigger keeps the pill.
1518
+ filter bar, a toolbar or the topbar, the trigger is the same pill. See
1519
+ [Control corners](foundations.md#control-corners).
1489
1520
  Put a form on a card, not on the page ground. A field is drawn by its edge, but the page ground
1490
1521
  is too close to the field's own fill for you to see that edge. See
1491
1522
  [Colour and contrast](foundations.md#colour-and-contrast). **A filter bar is the one exception.**
@@ -68,6 +68,27 @@ and the next. On a touch phone the inner gap of a group of small controls is `--
68
68
  and the view strip wraps its rows `--space-1` (4px) apart. A control that draws no box starts its
69
69
  first label on the page title's edge.
70
70
 
71
+ ## Control corners
72
+
73
+ **Every control that a reader presses or types into is a pill.** This covers each button size,
74
+ each dropdown trigger, also in a form, a filter chip and the filter bar's add control, a search
75
+ field, a text field, a select and every other one-line field. The corner is `--radius-pill`. A
76
+ wordless button is square, so the pill makes it a circle. In a toolbar beside a full field or a filter
77
+ bar, a wordless button takes the row's height and stays a circle. A dropdown in a form and the text input
78
+ beside it have the same corner and the same height. The kit's padding keeps text, glyphs, units
79
+ and the focus ring inside the rounded edge. Give a control of your own the same corner.
80
+
81
+ These parts keep another corner:
82
+
83
+ - A text area keeps `--radius-md`, because a pill does not fit several lines.
84
+ - A segmented strip keeps its own rounded track.
85
+ - A menu row, a palette row and a date picker's day cell keep their small corner. They are rows
86
+ and cells in a panel, not controls on the page.
87
+ - The account row in the side rail keeps the corner of the rail rows.
88
+ - The search line of the command palette is the top edge of the palette, so it follows the
89
+ palette's corners.
90
+ - A file drop area keeps its large dashed corner. The button in it is a pill.
91
+
71
92
  ## Typefaces
72
93
 
73
94
  The kit uses two families, and the split is based on role:
@@ -436,6 +457,10 @@ zoom back out.
436
457
  A bare `input { font-size: 20px !important; }` has the same specificity as the net. It works
437
458
  only while your stylesheet loads after the kit's.
438
459
 
460
+ **A small field is the full field on a touch screen.** With a mouse, `SearchField size="sm"` is
461
+ 32px high with `--text-sm`. On a touch screen it is 46px high with 16px text, and its toolbar
462
+ keeps the full row. So the small size never takes a field under 16px.
463
+
439
464
  ## A tap reaches the floor below the phone step
440
465
 
441
466
  A finger covers more area than a cursor. Below the phone step, the kit's own small controls
@@ -14,7 +14,7 @@ Each row names one guideline page, the screen parts it covers, and when to read
14
14
  | [Microcopy and tone](microcopy.md) | Names for controls and their current state. | Read it before you name controls or states. |
15
15
  | [Text length](text-length.md) | Labels, buttons, captions, callouts and introductions. | Read it when you write labels, captions or callouts. |
16
16
  | [Labels and titles](labels-and-titles.md) | Text ink, sentence case, card titles and eyebrows. | Read it when you write labels, titles or eyebrows. |
17
- | [Button labels](button-labels.md) | Button words, glyphs and wordless buttons. | Read it before you write button words or add glyphs. |
17
+ | [Button labels](button-labels.md) | Button words, glyphs, wordless buttons and the one shape of every control. | Read it before you write button words, add glyphs or draw a control. |
18
18
  | [Iconography](iconography.md) | Icon-only controls, status glyphs and glyph paths. | Read it before you use a glyph or an icon-only control. |
19
19
  | [Layout and density](layout-and-density.md) | Page width, the reading column, the spacing scale and breakpoints. | Read it before you set page width, columns or breakpoints. |
20
20
  | [Spacing](spacing.md) | Page gaps, title placement and the text edge. | Read it before you set gaps on a page. |
@@ -45,3 +45,17 @@
45
45
  **Do:** An Add note button under the clause opens the note form.
46
46
 
47
47
  **Don't:** A toolbar that appears over the selected words.
48
+
49
+ ## Give every control one shape
50
+
51
+ <!-- rule: one-shape -->
52
+
53
+ **Rule:** Draw buttons, dropdowns, filter chips and one-line fields as pills, and a wordless button as a circle.
54
+
55
+ **Why:** One shape marks what a reader can use.
56
+
57
+ **Except:** A text area keeps a small corner, because a pill does not fit several lines.
58
+
59
+ **Do:** Search, status and buttons, all pills.
60
+
61
+ **Don't:** A square button and field beside a round dropdown.
@@ -139,3 +139,17 @@
139
139
  **Don't:** Leave rows that the reader cannot narrow.
140
140
 
141
141
  **Except:** Three tables take no bar. One compares a document line by line, where a filter hides lines the reviewer must check. One is a chart's Table view, which holds only the chart's points. One never holds more than 10 rows, such as a list of API tokens, because the reader sees every row at once.
142
+
143
+ ## Size the bar to the rows
144
+
145
+ <!-- rule: control-size -->
146
+
147
+ **Why:** A full-size field is the largest part of a dense block.
148
+
149
+ **Rule:** Use small controls above a dense table, and full-size controls in a form.
150
+
151
+ **Do:** Put a small search field, chips and button above dense rows.
152
+
153
+ **Don't:** Put a full-size field above dense rows.
154
+
155
+ **Except:** Tabs keep one size, and a touch screen shows the full field.
@@ -10,9 +10,9 @@
10
10
 
11
11
  **Do:** Put an Upload button and “PDF or CSV, up to 10 MB” on one line above the list they feed.
12
12
 
13
- **Don't:** Draw a tall dashed box with a glyph, an invitation and a button stacked inside it.
13
+ **Don't:** Draw a tall dashed box that stacks a glyph, an invitation and a button.
14
14
 
15
- **Except:** A page that exists to receive one file may use the field-sized picker, which has its own label. An empty page may show a dashed drop area until the first file arrives.
15
+ **Except:** A page that only receives one file may use the labelled field-sized picker. An empty page may show a dashed drop area until the first file arrives.
16
16
 
17
17
  ## Paint the target only while a file is over it
18
18
 
@@ -22,7 +22,7 @@
22
22
 
23
23
  **Why:** A target drawn before there is a file to catch covers content the reader still needs.
24
24
 
25
- **Do:** Cover the panel that accepts the file the moment the file crosses it.
25
+ **Do:** Cover the accepting panel as the file crosses it.
26
26
 
27
27
  **Don't:** Cover the whole window when one panel accepts the file.
28
28
 
@@ -32,25 +32,29 @@
32
32
 
33
33
  <!-- rule: in-the-row -->
34
34
 
35
- **Rule:** After the drop, the file's name, size and progress take the place the button was in, with remove on the name's line.
35
+ **Rule:** After the drop, the file's name, size and progress stand on one line where the button was, and remove ends it.
36
36
 
37
- **Why:** A row that changes in place keeps the page still during the upload.
37
+ **Why:** A row that keeps its height keeps the page still during the upload.
38
38
 
39
- **Do:** Put remove at the end of the name's line, the size under it, and the progress track below both.
39
+ **Do:** Put the name, the size and a track filling the free room on one line, then remove.
40
40
 
41
- **Don't:** Push the list down with a progress card, or open a dialog over the page.
41
+ **Don't:** Put the size or track under the name, or push the list down with a progress card.
42
+
43
+ **Except:** A narrow row drops the size, and cuts the name first but keeps its extension.
42
44
 
43
45
  ## Fail in place
44
46
 
45
47
  <!-- rule: failure -->
46
48
 
47
- **Rule:** A refused file keeps its place, says what it did wrong under its name, and offers Retry beside Remove.
49
+ **Rule:** A refused file keeps its place, says what went wrong on its name's line, and offers Retry beside Remove.
48
50
 
49
51
  **Why:** A row that drops the file sends the reader back to choosing one.
50
52
 
51
- **Do:** Keep the name on its line and say “Larger than 10 MB” under it, with Retry.
53
+ **Do:** Say “Larger than 10 MB” beside the name, with Retry.
54
+
55
+ **Except:** A reason that does not fit beside the name moves under it.
52
56
 
53
- **Don't:** Replace the row with “Upload failed”, losing both the file and the retry.
57
+ **Don't:** Replace the row with “Upload failed”, losing the file and the retry.
54
58
 
55
59
  ## Offer a button, not only a drag
56
60
 
@@ -60,7 +64,7 @@
60
64
 
61
65
  **Why:** A keyboard cannot drag a file.
62
66
 
63
- **Do:** Make the Upload button the control, reachable by keyboard and showing the focus ring.
67
+ **Do:** Make Upload the control, reachable by keyboard, with the focus ring.
64
68
 
65
69
  **Don't:** Write “Drag a file here” with nothing to press.
66
70
 
@@ -72,7 +76,7 @@
72
76
 
73
77
  **Why:** Repeated limits teach the reader to skip them.
74
78
 
75
- **Do:** Write “PDF or CSV, up to 10 MB” beside the button, and let a failure say what this file did wrong.
79
+ **Do:** Write “PDF or CSV, up to 10 MB” beside the button, and let a failure name this file's fault.
76
80
 
77
81
  **Don't:** Repeat the limits under the button, in a tooltip and again in the error.
78
82
 
@@ -86,4 +90,4 @@
86
90
 
87
91
  **Do:** Take a statement into the row under the statements it joins.
88
92
 
89
- **Don't:** Open a dialog for one file that the row behind it could have taken.
93
+ **Don't:** Open a dialog for one file the row could take.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apliteni/apliteni-ui",
3
- "version": "0.174.0",
3
+ "version": "0.177.0",
4
4
  "workspaces": [
5
5
  "react"
6
6
  ],
@@ -915,6 +915,10 @@
915
915
  .ui-drop {
916
916
  position: relative;
917
917
  }
918
+ .ui-drop:not(.ui-drop--area) {
919
+ display: grid;
920
+ grid-template-columns: minmax(0, 1fr);
921
+ }
918
922
  .ui-drop > * + .ui-drop__row {
919
923
  margin-top: var(--space-3);
920
924
  }
@@ -927,27 +931,36 @@
927
931
  font-size: var(--text-sm);
928
932
  color: var(--text);
929
933
  overflow-wrap: anywhere;
934
+ container-type: inline-size;
935
+ contain-intrinsic-inline-size: var(--panel-md);
930
936
  }
931
937
  .ui-drop__note {
932
938
  margin: 0;
933
939
  }
934
940
  .ui-drop__file {
935
- display: grid;
941
+ display: flex;
936
942
  flex: 1 1 auto;
937
- gap: var(--space-2);
943
+ align-items: flex-start;
944
+ gap: var(--space-3);
938
945
  min-width: 0;
939
946
  }
940
947
  .ui-drop__line {
941
948
  display: flex;
949
+ flex: 1 1 0;
942
950
  flex-wrap: nowrap;
943
951
  align-items: center;
944
- gap: var(--space-3);
952
+ gap: var(--space-2) var(--space-3);
945
953
  min-width: 0;
946
954
  }
955
+ .ui-drop__file--failed .ui-drop__line {
956
+ flex-wrap: wrap;
957
+ }
947
958
  .ui-drop__name {
948
959
  display: flex;
949
- flex: 1 1 auto;
960
+ flex: 0 999 auto;
961
+ align-items: center;
950
962
  min-width: var(--space-10);
963
+ min-height: var(--space-8);
951
964
  color: var(--strong);
952
965
  font-weight: var(--weight-medium);
953
966
  }
@@ -958,13 +971,7 @@
958
971
  }
959
972
  .ui-drop__ext {
960
973
  flex: none;
961
- }
962
- .ui-drop__facts {
963
- display: flex;
964
- flex-wrap: nowrap;
965
- align-items: center;
966
- gap: var(--space-3);
967
- min-width: 0;
974
+ white-space: nowrap;
968
975
  }
969
976
  .ui-drop__size {
970
977
  flex: none;
@@ -977,12 +984,27 @@
977
984
  flex: 0 1 auto;
978
985
  min-width: 0;
979
986
  }
987
+ @container (width <= 352px) {
988
+ .ui-drop__size {
989
+ position: absolute;
990
+ width: 1px;
991
+ height: 1px;
992
+ padding: 0;
993
+ overflow: hidden;
994
+ clip-path: inset(50%);
995
+ white-space: nowrap;
996
+ }
997
+ }
980
998
  .ui-drop__state {
981
999
  display: inline-flex;
982
- flex: 0 1 auto;
1000
+ flex: none;
983
1001
  align-items: center;
984
1002
  gap: var(--space-2);
985
1003
  min-width: 0;
1004
+ max-width: calc(100% - var(--space-10) - var(--space-3));
1005
+ }
1006
+ .ui-drop__file--failed .ui-drop__state {
1007
+ max-width: 100cqw;
986
1008
  }
987
1009
  .ui-drop__state svg {
988
1010
  width: 16px;
@@ -1002,7 +1024,8 @@
1002
1024
  }
1003
1025
  .ui-drop__bar {
1004
1026
  display: block;
1005
- width: 100%;
1027
+ flex: 1 1 0;
1028
+ min-width: var(--space-12);
1006
1029
  height: 6px;
1007
1030
  border-radius: var(--radius-pill);
1008
1031
  background: var(--surface-2);
@@ -1255,7 +1278,7 @@
1255
1278
  height: var(--ui-head-control-h, calc(18px + 1.2 * var(--text-base)));
1256
1279
  padding: 0;
1257
1280
  border: 0;
1258
- border-radius: 10px;
1281
+ border-radius: var(--radius-pill);
1259
1282
  background: none;
1260
1283
  color: var(--text);
1261
1284
  transform: none;
@@ -1355,7 +1378,7 @@
1355
1378
  padding: 0;
1356
1379
  margin: 0;
1357
1380
  border: 0;
1358
- border-radius: var(--radius-md);
1381
+ border-radius: var(--radius-pill);
1359
1382
  background: transparent;
1360
1383
  }
1361
1384
  .ui-react-app .ui-app__bar .ui-app__search:hover,
@@ -893,10 +893,13 @@ type FileDropProps = {
893
893
  };
894
894
  declare function FileDrop({ label, note, title, multiple, accept, dropLabel, removeLabel, retryLabel, file, dragging, disabled, onFile, onFiles, onRemove, onRetry, children, className, }: FileDropProps): react.JSX.Element;
895
895
 
896
- type SearchFieldProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'aria-label'> & {
896
+ type SearchFieldProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'aria-label' | 'size'> & {
897
897
  /** The control's name. A toolbar search box shows no label, so this is the
898
898
  only name it has. */
899
899
  ariaLabel: string;
900
+ /** `sm` is the toolbar above a dense table: 32px with 13px text to a mouse, and
901
+ the full field on a touch screen. */
902
+ size?: 'sm';
900
903
  };
901
904
  /**
902
905
  * The toolbar's search box: one `.ui-input-group` holding the `search` glyph and
@@ -910,10 +913,13 @@ type SearchFieldProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'ar
910
913
  * only one answers to a token — so `input.css` suppresses it.
911
914
  * why: docs/components.md#react-search-field
912
915
  */
913
- declare const SearchField: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "aria-label"> & {
916
+ declare const SearchField: react.ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "size" | "aria-label"> & {
914
917
  /** The control's name. A toolbar search box shows no label, so this is the
915
918
  only name it has. */
916
919
  ariaLabel: string;
920
+ /** `sm` is the toolbar above a dense table: 32px with 13px text to a mouse, and
921
+ the full field on a touch screen. */
922
+ size?: "sm";
917
923
  } & react.RefAttributes<HTMLInputElement>>;
918
924
 
919
925
  type ToastNotice = {
@@ -4291,46 +4291,44 @@ function FileDrop({
4291
4291
  /* @__PURE__ */ jsx36("span", { className: "ui-drop__stem", children: stem }),
4292
4292
  /* @__PURE__ */ jsx36("span", { className: "ui-drop__ext", children: ext })
4293
4293
  ] }),
4294
- (onRemove || status === "error" && onRetry) && /* @__PURE__ */ jsxs32("span", { className: "ui-drop__actions", children: [
4295
- status === "error" && onRetry && /* @__PURE__ */ jsx36(Button, { size: "sm", icon: "refresh", onClick: onRetry, disabled, children: retryLabel }),
4296
- onRemove && /* @__PURE__ */ jsx36(
4297
- Button,
4298
- {
4299
- variant: "ghost",
4300
- size: "sm",
4301
- onClick: onRemove,
4302
- disabled,
4303
- children: removeLabel
4304
- }
4305
- )
4306
- ] })
4307
- ] }),
4308
- (showSize || showWord) && /* @__PURE__ */ jsxs32(
4309
- "div",
4310
- {
4311
- className: cx7("ui-drop__facts", status === "error" && "ui-drop__error"),
4312
- role: status === "error" ? "alert" : void 0,
4313
- children: [
4314
- showSize && /* @__PURE__ */ jsx36("span", { className: "ui-drop__size", children: file.size }),
4315
- showWord && /* @__PURE__ */ jsxs32("span", { className: "ui-drop__state", children: [
4294
+ showSize && /* @__PURE__ */ jsx36("span", { className: "ui-drop__size", children: file.size }),
4295
+ showWord && /* @__PURE__ */ jsxs32(
4296
+ "span",
4297
+ {
4298
+ className: cx7("ui-drop__state", status === "error" && "ui-drop__error"),
4299
+ role: status === "error" ? "alert" : void 0,
4300
+ children: [
4316
4301
  /* @__PURE__ */ jsx36(Icon, { name: MARKS[status] }),
4317
4302
  /* @__PURE__ */ jsx36("span", { className: "ui-drop__word", title: word, children: word })
4318
- ] })
4319
- ]
4320
- }
4321
- ),
4322
- hasBar && /* @__PURE__ */ jsx36(
4323
- "span",
4324
- {
4325
- className: "ui-drop__bar",
4326
- role: "progressbar",
4327
- "aria-label": `${word} ${file.name}`,
4328
- "aria-valuenow": file.progress,
4329
- "aria-valuemin": 0,
4330
- "aria-valuemax": 100,
4331
- children: /* @__PURE__ */ jsx36("span", { style: { width: `${file.progress}%` } })
4332
- }
4333
- )
4303
+ ]
4304
+ }
4305
+ ),
4306
+ hasBar && /* @__PURE__ */ jsx36(
4307
+ "span",
4308
+ {
4309
+ className: "ui-drop__bar",
4310
+ role: "progressbar",
4311
+ "aria-label": `${word} ${file.name}`,
4312
+ "aria-valuenow": file.progress,
4313
+ "aria-valuemin": 0,
4314
+ "aria-valuemax": 100,
4315
+ children: /* @__PURE__ */ jsx36("span", { style: { width: `${file.progress}%` } })
4316
+ }
4317
+ )
4318
+ ] }),
4319
+ (onRemove || status === "error" && onRetry) && /* @__PURE__ */ jsxs32("span", { className: "ui-drop__actions", children: [
4320
+ status === "error" && onRetry && /* @__PURE__ */ jsx36(Button, { size: "sm", icon: "refresh", onClick: onRetry, disabled, children: retryLabel }),
4321
+ onRemove && /* @__PURE__ */ jsx36(
4322
+ Button,
4323
+ {
4324
+ variant: "ghost",
4325
+ size: "sm",
4326
+ onClick: onRemove,
4327
+ disabled,
4328
+ children: removeLabel
4329
+ }
4330
+ )
4331
+ ] })
4334
4332
  ] }) : /* @__PURE__ */ jsxs32(Fragment17, { children: [
4335
4333
  /* @__PURE__ */ jsx36(
4336
4334
  Button,
@@ -4354,7 +4352,7 @@ function FileDrop({
4354
4352
  import { forwardRef as forwardRef9 } from "react";
4355
4353
  import { icon as icon6 } from "@apliteni/apliteni-ui";
4356
4354
  import { jsx as jsx37, jsxs as jsxs33 } from "react/jsx-runtime";
4357
- var SearchField = forwardRef9(function SearchField2({ ariaLabel, className, ...props }, ref) {
4355
+ var SearchField = forwardRef9(function SearchField2({ ariaLabel, size, className, ...props }, ref) {
4358
4356
  return /* @__PURE__ */ jsxs33("div", { className: "ui-input-group", children: [
4359
4357
  /* @__PURE__ */ jsx37("span", { className: "ui-input-group__icon", dangerouslySetInnerHTML: { __html: icon6("search") } }),
4360
4358
  /* @__PURE__ */ jsx37(
@@ -4364,7 +4362,7 @@ var SearchField = forwardRef9(function SearchField2({ ariaLabel, className, ...p
4364
4362
  ...props,
4365
4363
  type: "search",
4366
4364
  "aria-label": ariaLabel,
4367
- className: ["ui-input", className].filter(Boolean).join(" ")
4365
+ className: ["ui-input", size === "sm" && "ui-input--sm", className].filter(Boolean).join(" ")
4368
4366
  }
4369
4367
  )
4370
4368
  ] });
@@ -6966,7 +6964,7 @@ function AccountMenu2({
6966
6964
  {
6967
6965
  ...props,
6968
6966
  href: item.disabled ? void 0 : item.href ? safeUrl4(item.href) : item.value === "sign-out" && onSignOut ? void 0 : safeUrl4(item.value === "sign-out" ? "#logout" : `#${item.value}`),
6969
- className: [props.className.replace(/\bui-dropdown__item\b/, "").trim(), !item.disabled && item.value === current && "cur", item.value === "sign-out" && "aout"].filter(Boolean).join(" "),
6967
+ className: [props.className, !item.disabled && item.value === current && "cur", item.value === "sign-out" && "aout"].filter(Boolean).join(" "),
6970
6968
  children: [
6971
6969
  item.icon && /* @__PURE__ */ jsx48("span", { "aria-hidden": "true", dangerouslySetInnerHTML: { __html: icon8(item.icon) } }),
6972
6970
  item.label
@@ -29,7 +29,7 @@
29
29
  font-size: var(--btn-font);
30
30
  font-weight: var(--weight-medium);
31
31
  line-height: var(--leading-tight);
32
- border-radius: var(--radius-sm);
32
+ border-radius: var(--radius-pill); /* why: docs/foundations.md#control-corners */
33
33
  padding: var(--btn-pad-y) var(--btn-pad-x);
34
34
  min-height: var(--btn-height-md);
35
35
  cursor: pointer;
@@ -113,10 +113,10 @@
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); }
116
- .ui-btn--lg { --btn-pad-y: 13px; --btn-pad-x: 24px; --btn-font: var(--text-md); border-radius: var(--radius-md); }
116
+ .ui-btn--lg { --btn-pad-y: 13px; --btn-pad-x: 24px; --btn-font: var(--text-md); }
117
117
 
118
118
  /* Icon-only */
119
- .ui-btn--icon { --btn-pad-y: var(--btn-pad-y-md); padding: var(--btn-pad-y-md); border-radius: var(--radius-sm); }
119
+ .ui-btn--icon { --btn-pad-y: var(--btn-pad-y-md); padding: var(--btn-pad-y-md); }
120
120
  .ui-btn--icon.ui-btn--xs { --btn-pad-y: 4.5px; padding: 4.5px; }
121
121
  .ui-btn--icon.ui-btn--sm { --btn-pad-y: 7px; padding: 7px; }
122
122
 
@@ -40,9 +40,9 @@
40
40
  why: docs/foundations.md#colour-and-contrast */
41
41
  border: 1px solid var(--control-edge);
42
42
  border-radius: var(--radius-pill);
43
- /* A 13px line is 17px tall, so this block padding and the edge hold the pill at 32px,
44
- level with an sm button. #814 */
45
- padding: 6.5px 11px 6.5px 13px;
43
+ /* The button's tight 13px line, so the two texts share a baseline. #822 This block padding,
44
+ between two steps, and the edge hold the pill at 32px, level with an sm button. #814 */
45
+ line-height: var(--leading-tight); padding: 7.2px 11px 7.2px 13px;
46
46
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
47
47
  }
48
48
  /* The hover edge steps aside under the band: an accent edge one pixel inside an
@@ -431,6 +431,10 @@
431
431
 
432
432
  /* Separator */
433
433
  .ui-dropdown__sep { height: 1px; background: var(--border); margin: 5px 4px; }
434
+ /* Forced colours drop the background, so the line comes back as a border of the same 1px. #824 */
435
+ @media (forced-colors: active) {
436
+ .ui-dropdown__sep { height: 0; border-top: 1px solid; }
437
+ }
434
438
 
435
439
  /* Optional pinned head/foot blocks — symmetrical: one inner padding, and each
436
440
  bleeding to the edge it sits on, lining the edge it faces.
@@ -484,7 +488,7 @@
484
488
  /* The ground and line .ui-input takes. why: docs/foundations.md#elevation */
485
489
  background: var(--field-bg); /* code-bg: inherit — control paint; the containing surface is the ground, for a chip and for a band alike. */
486
490
  border: 1px solid var(--field-edge);
487
- border-radius: var(--radius-sm);
491
+ border-radius: var(--radius-pill);
488
492
  padding: 8px 12px 8px 34px;
489
493
  /* The height Chromium paints (38.25px), stated so the target-size gate, which
490
494
  cannot see an <input>'s line of text, reads the box a reader hits. */
@@ -548,14 +552,13 @@
548
552
  .ui-field > .ui-dropdown { display: grid; }
549
553
  .ui-field > .ui-dropdown > .ui-dropdown__trigger > .ui-dropdown__chevron { margin-left: auto; }
550
554
  .ui-field > .ui-dropdown > .ui-dropdown__panel { inline-size: 100%; min-width: 0; }
551
- /* In a form the trigger takes the text input's corner, block padding and type, so the
552
- two stand at one height. Elsewhere it keeps the pill. #812
555
+ /* 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
553
557
  why: docs/components.md#forms */
554
558
  @property --ui-dropdown-line { syntax: "<length>"; inherits: true; initial-value: 0px; }
555
559
  .ui-field > .ui-dropdown > .ui-dropdown__trigger {
556
- border-radius: var(--radius-md);
557
560
  padding: var(--space-3) var(--space-4);
558
- font-size: var(--text-base);
561
+ font-size: var(--text-base); line-height: normal;
559
562
  min-inline-size: 0;
560
563
  /* The value line, as a length the mark below can read. */
561
564
  --ui-dropdown-line: 1lh;
@@ -97,7 +97,7 @@
97
97
  .ui-fbcomposer textarea:focus-visible { outline: var(--ring); outline-offset: var(--ring-offset); }
98
98
  .ui-fbc__foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 16px 20px 18px; }
99
99
 
100
- .ui-fbbtn { font-family: var(--font-sans); font-size: var(--text-sm); font-weight: var(--weight-semibold); border-radius: 10px; padding: 9px 17px; cursor: pointer; border: 0; transition: filter var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
100
+ .ui-fbbtn { font-family: var(--font-sans); font-size: var(--text-sm); font-weight: var(--weight-semibold); border-radius: var(--radius-pill); padding: 9px 17px; cursor: pointer; border: 0; transition: filter var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
101
101
  .ui-fbbtn.ghost { background: transparent; color: var(--text); }
102
102
  .ui-fbbtn.ghost:hover { color: var(--strong); background: var(--surface); /* code-bg: inherit — control paint; the containing surface is the ground, for a chip and for a band alike. */ }
103
103
  .ui-fbbtn:focus-visible { outline: var(--ring); outline-offset: var(--ring-offset); }
@@ -2,6 +2,11 @@
2
2
  * why: docs/components.md#react-file-drop */
3
3
  .ui-drop { position: relative; }
4
4
 
5
+ /* The row is a size container, so its content gives it no width. In a parent
6
+ that sizes to its content, the drop takes the row's stated width at most,
7
+ and less when the parent has less room. */
8
+ .ui-drop:not(.ui-drop--area) { display: grid; grid-template-columns: minmax(0, 1fr); }
9
+
5
10
  /* What the region accepts the file for, above the control. */
6
11
  .ui-drop > * + .ui-drop__row { margin-top: var(--space-3); }
7
12
 
@@ -16,46 +21,69 @@
16
21
  font-size: var(--text-sm);
17
22
  color: var(--text);
18
23
  overflow-wrap: anywhere;
24
+ /* The size query below reads the row's own width, not the window's. */
25
+ container-type: inline-size;
26
+ /* The width the row asks of a parent that sizes to its content: wider than
27
+ the size's 352px step, so a lone row still shows the size. */
28
+ contain-intrinsic-inline-size: var(--panel-md);
19
29
  }
20
30
 
21
31
  .ui-drop__note { margin: 0; }
22
32
 
23
- /* The file in hand is a stack, not a line: the name owns the top tier, what the
24
- page has a rule about sits under it, and the track runs the width below both.
25
- One line asked to carry all three truncates the name to nothing at 320. */
26
- .ui-drop__file { display: grid; flex: 1 1 auto; gap: var(--space-2); min-width: 0; }
33
+ /* The file in hand is one line at the resting row's height: the name, then what
34
+ the page has a rule about, then the actions. A file arriving moves nothing
35
+ under the row. */
36
+ .ui-drop__file { display: flex; flex: 1 1 auto; align-items: flex-start; gap: var(--space-3); min-width: 0; }
37
+
38
+ /* The name's line: the name, the size, and the status or the track. It never
39
+ wraps while the file uploads, so the name gives way by truncating. */
40
+ .ui-drop__line { display: flex; flex: 1 1 0; flex-wrap: nowrap; align-items: center; gap: var(--space-2) var(--space-3); min-width: 0; }
27
41
 
28
- /* The name tier. Never wraps: the actions stay on the name's line at every
29
- width, and the name gives way to them by truncating. */
30
- .ui-drop__line { display: flex; flex-wrap: nowrap; align-items: center; gap: var(--space-3); min-width: 0; }
42
+ /* A refused file's reason stands on the name's line while the full name and the
43
+ reason fit beside each other. When they do not, the reason takes a line of its
44
+ own under the name, and only then does the row grow. */
45
+ .ui-drop__file--failed .ui-drop__line { flex-wrap: wrap; }
31
46
 
32
47
  /* The extension is the half that says what kind of file this is, so the stem
33
- gives way and the tail never does — `frankfurt-settlement-state….pdf`, the
34
- way Finder, Drive and Dropbox cut a name. */
35
- .ui-drop__name { display: flex; flex: 1 1 auto; min-width: var(--space-10); color: var(--strong); font-weight: var(--weight-medium); }
48
+ gives way and the tail never does: `frankfurt-settlement-state….pdf`, the
49
+ way Finder, Drive and Dropbox cut a name. The name gives way before anything
50
+ else on its line, and it is as tall as the actions, so the actions close the
51
+ name's line when the reason sits under it. */
52
+ .ui-drop__name { display: flex; flex: 0 999 auto; align-items: center; min-width: var(--space-10); min-height: var(--space-8); color: var(--strong); font-weight: var(--weight-medium); }
36
53
  .ui-drop__stem { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
37
- .ui-drop__ext { flex: none; }
54
+ .ui-drop__ext { flex: none; white-space: nowrap; }
38
55
 
39
- /* The facts tier: the size while it uploads, the message when it fails. Never
40
- wraps either — a second tier of text here would be a third tier on the row. */
41
- .ui-drop__facts { display: flex; flex-wrap: nowrap; align-items: center; gap: var(--space-3); min-width: 0; }
42
56
  .ui-drop__size { flex: none; white-space: nowrap; }
43
57
  .ui-drop__word { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; min-width: 0; }
44
58
 
59
+ /* At a row of 352px or less, the size would cut the name to a few letters, so
60
+ it leaves the line. A screen reader still reads it, in the row's order. */
61
+ @container (width <= 352px) {
62
+ .ui-drop__size { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
63
+ }
64
+
45
65
  /* A status the track does not already draw is a circled mark and a word,
46
- because colour alone is not a status. */
47
- .ui-drop__state { display: inline-flex; flex: 0 1 auto; align-items: center; gap: var(--space-2); min-width: 0; }
66
+ because colour alone is not a status. It keeps its width while the name can
67
+ still give way, so it never shrinks first: it is cut only past the name's
68
+ own floor and the gap beside it. */
69
+ .ui-drop__state { display: inline-flex; flex: none; align-items: center; gap: var(--space-2); min-width: 0; max-width: calc(100% - var(--space-10) - var(--space-3)); }
70
+
71
+ /* A reason under the name has the row to itself, so it runs under the actions
72
+ too, as wide as the row. */
73
+ .ui-drop__file--failed .ui-drop__state { max-width: 100cqw; }
48
74
  .ui-drop__state svg { width: 16px; height: 16px; flex: none; stroke-width: 2.4; }
49
75
  .ui-drop__error { color: var(--pink); }
50
76
 
51
77
  /* Closes the name's line on the edge the content ends on, in every state. */
52
78
  .ui-drop__actions { display: flex; flex: none; align-items: stretch; gap: var(--space-2); margin-left: auto; } /* stretch: a small button sizes to its content, so a glyph and a bare label differ by 1px. #768 */
53
79
 
54
- /* The width of the row it reports on, so 40% reads as 40% rather than as a dash.
80
+ /* The track fills the room the name and the size leave on the line, and keeps
81
+ a length that still reads as a share of a whole when the name is cut.
55
82
  The ground is the kit's token for sunken tracks; --surface-3 was invisible. */
56
83
  .ui-drop__bar {
57
84
  display: block;
58
- width: 100%;
85
+ flex: 1 1 0;
86
+ min-width: var(--space-12);
59
87
  height: 6px;
60
88
  border-radius: var(--radius-pill);
61
89
  background: var(--surface-2); /* code-bg: inherit — a progress track holds no focus target. */
@@ -5,7 +5,7 @@
5
5
  showing through a switched-off box — the complaint behind #505's review. */
6
6
  .ui-filter-bar__chip {
7
7
  display: inline-flex; align-items: center; min-width: 0; margin: 0;
8
- border: 1px solid var(--control-edge); border-radius: var(--radius-sm); padding: var(--space-1);
8
+ border: 1px solid var(--control-edge); border-radius: var(--radius-pill); padding: var(--space-1);
9
9
  /* The chip holds two focus targets of its own — the trigger and the remove
10
10
  button — so it is a painted container, not a control that inherits the gap
11
11
  outside it. It joins the shared recomposition in tokens.css beside .ui-seg,
@@ -15,14 +15,14 @@
15
15
  mark's line box. The bar names the height; every chip keeps it. */
16
16
  min-height: var(--ui-filter-row-h);
17
17
  }
18
- .ui-filter-bar__chip .ui-dropdown__trigger { border: 0; background: transparent; padding: var(--space-1) var(--space-2); }
18
+ .ui-filter-bar__chip .ui-dropdown__trigger { border: 0; background: transparent; padding: var(--space-1) var(--space-2); min-height: calc(var(--ui-filter-row-h) - 2px - 2 * var(--space-1)); } /* fills the chip: a fieldset's content does not follow its min-height. #822 */
19
19
  /* The chip is the edge the row's other boxes are measured against, so it fades with them:
20
20
  off, the chips stayed at full strength and only their ink said so. Two carriers, because
21
21
  a bar turned off disables the controls in a nested fieldset and not the fieldset. #518
22
22
  why: guidelines/accessibility-floor.md#disabled-control-legibility */
23
23
  .ui-filter-bar__chip:disabled,
24
24
  .ui-filter-bar:disabled .ui-filter-bar__chip { border-color: var(--disabled-border); }
25
- .ui-filter-bar__remove { border: 0; background: transparent; /* muted-ink: glyph — filter remove mark */ color: var(--muted); font: inherit; text-align: center; font-size: var(--text-lg); padding: 0; min-width: 24px; min-height: 24px; border-radius: var(--radius-xs); cursor: pointer; }
25
+ .ui-filter-bar__remove { border: 0; background: transparent; /* muted-ink: glyph — filter remove mark */ color: var(--muted); font: inherit; text-align: center; font-size: var(--text-lg); padding: 0; min-width: 24px; min-height: 24px; border-radius: var(--radius-pill); cursor: pointer; }
26
26
  .ui-filter-bar__remove:focus-visible,
27
27
  .ui-filter-bar:focus-visible { outline: var(--ring); outline-offset: var(--ring-offset); }
28
28
  .ui-filter-bar button:disabled { /* muted-ink: state — disabled filters */ color: var(--disabled-ink); cursor: not-allowed; }
@@ -134,6 +134,19 @@
134
134
  names it too, for the control at the end of a split row. Rounded up to a whole pixel:
135
135
  a fractional line moved a scrolled table below it off the pixel its hit test uses. #768 */
136
136
  .ui-filter-bar, .ui-toolbar { --ui-filter-row-h: round(up, calc(2px + 2 * var(--space-1) + var(--leading-normal) * var(--text-lg)), 1px); }
137
+ /* A toolbar that opens with a small search field is a small row, and its filter bar
138
+ follows it to 32px. The chip gives up its block padding so the 24px remove mark still
139
+ fits. The trigger fills the chip between its two edges, because a min-height on the
140
+ chip alone leaves the text high: the chip is a fieldset. A touch screen keeps the
141
+ full field, so it keeps the full row too. #822
142
+ why: docs/components.md#a-toolbar-at-one-column */
143
+ @media not (pointer: coarse) {
144
+ .ui-toolbar:has(> .ui-input-group > .ui-input--sm),
145
+ .ui-toolbar:has(> .ui-input-group > .ui-input--sm) .ui-filter-bar { --ui-filter-row-h: var(--btn-height-sm); }
146
+ .ui-toolbar:has(> .ui-input-group > .ui-input--sm) .ui-filter-bar__chip { padding-block: 0; }
147
+ .ui-toolbar:has(> .ui-input-group > .ui-input--sm) .ui-filter-bar__chip .ui-dropdown__trigger { min-height: calc(var(--btn-height-sm) - 2px); }
148
+ .ui-toolbar:has(> .ui-input-group > .ui-input--sm) .ui-filter-bar__remove { line-height: var(--leading-tight); }
149
+ }
137
150
 
138
151
  /* A chip's neighbour takes the chip's corner, that height and edge, but not its painted fill:
139
152
  the trigger's own edge can differ from the row's, while its --surface made the
@@ -152,7 +165,7 @@
152
165
  /* Clear all keeps a chip's height when it wraps to a line of its own, so a wider gap
153
166
  that moves it to the next line does not change its size. */
154
167
  .ui-toolbar .ui-filter-bar [data-filter-clear] button { min-height: var(--ui-filter-row-h); }
155
- .ui-filter-bar [data-filter-add] .ui-dropdown__trigger { border-radius: var(--radius-sm); min-height: var(--ui-filter-row-h); border-color: var(--control-edge); background: transparent; }
168
+ .ui-filter-bar [data-filter-add] .ui-dropdown__trigger { min-height: var(--ui-filter-row-h); border-color: var(--control-edge); background: transparent; }
156
169
  .ui-filter-bar [data-filter-add] .ui-dropdown__trigger svg { width: 16px; height: 16px; flex: none; stroke-width: 2.4; }
157
170
  .ui-filter-bar [data-filter-add] .ui-dropdown__trigger:enabled:hover:not(:focus-visible) { border-color: var(--accent); }
158
171
  .ui-filter-bar [data-filter-add] .ui-dropdown__trigger:disabled { border-color: var(--disabled-border); }
@@ -27,12 +27,12 @@
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-md);
30
+ border-radius: var(--radius-pill); /* why: docs/foundations.md#control-corners */
31
31
  padding: 12px 15px;
32
32
  width: 100%;
33
33
  transition: border-color var(--dur-med) var(--ease), box-shadow var(--dur-med) var(--ease);
34
34
  }
35
- .ui-textarea { resize: vertical; min-height: 96px; line-height: 1.55; }
35
+ .ui-textarea { resize: vertical; min-height: 96px; line-height: 1.55; border-radius: var(--radius-md); }
36
36
 
37
37
  .ui-input:hover,
38
38
  .ui-textarea:hover,
@@ -98,7 +98,7 @@
98
98
  /* muted-ink: glyph — field icon */ color: var(--muted);
99
99
  pointer-events: none;
100
100
  }
101
- .ui-input-group__icon svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 2.2; }
101
+ .ui-input-group__icon svg { display: block; width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 2.2; } /* block: inline, it sat on the slot's baseline, 2px low, at every size. #822 #826 */
102
102
 
103
103
  /* The chevron is a data URI, and a data URI cannot read a token: `var()` does not
104
104
  substitute inside url() and `currentColor` does not cross into the image's own
@@ -333,3 +333,18 @@
333
333
  }
334
334
  .ui-switch input:focus-visible + .ui-switch__track { outline: var(--ring); outline-offset: var(--ring-offset); }
335
335
  .ui-switch input:disabled + .ui-switch__track { opacity: 0.5; cursor: not-allowed; }
336
+
337
+ /* The small field: 32px with the dense rows' 13px text, level with a small button, a
338
+ dropdown trigger and a small segmented control. Only a fine pointer gets it. A touch
339
+ screen keeps the full field, because iOS zooms into a field under 16px. The group's
340
+ 42px left padding outranks the side padding here, so the glyph keeps its place. #822
341
+ why: docs/components.md#react-search-field */
342
+ @media not (pointer: coarse) {
343
+ .ui-input--sm {
344
+ font-size: var(--text-sm);
345
+ line-height: var(--leading-tight);
346
+ min-height: var(--btn-height-sm);
347
+ padding: var(--space-1) var(--space-3);
348
+ border-radius: var(--radius-pill); /* why: docs/foundations.md#control-corners */
349
+ }
350
+ }
@@ -365,7 +365,7 @@
365
365
  why: docs/foundations.md#elevation */
366
366
  background: var(--surface); /* code-bg: inherit — control paint; the containing surface is the ground, for a chip and for a band alike. */
367
367
  border: 1px solid var(--border);
368
- border-radius: var(--radius-md);
368
+ border-radius: var(--radius-pill);
369
369
  cursor: pointer;
370
370
  transition: border-color var(--dur-med) var(--ease), color var(--dur-med) var(--ease);
371
371
  }
@@ -479,9 +479,11 @@
479
479
  otherwise empty row — a mark that came loose rather than what to do with the
480
480
  block, which is what Artur marked on round r31. `align-self` is what keeps
481
481
  the control its own height beside a group two lines tall; it sits at the
482
- row's top end, the corner it keeps above this step.
482
+ row's top end, the corner it keeps above this step. A segmented track there stops
483
+ at its options' width and draws no empty end. A filter group still grows. #831
483
484
  why: Artur's review of the Finance report, rounds r31 and r34, #505 */
484
485
  .ui-toolbar--split > :nth-last-child(2) { flex: 1 1 60%; min-width: 0; }
486
+ .ui-toolbar--split > .ui-seg:nth-last-child(2) { max-width: max-content; }
485
487
  .ui-toolbar--split > :last-child { margin-inline-start: 0; align-self: start; }
486
488
  }
487
489
 
@@ -546,9 +548,52 @@
546
548
  These sit below the phone shell because guideline references cite the lines above. #768 */
547
549
  .ui-toolbar :where(div:has(.ui-filter-bar)) { display: grid; }
548
550
  .ui-toolbar > .ui-seg { align-self: stretch; }
551
+ /* A wordless button on a toolbar is a circle of the row's height. A wrapping row cannot
552
+ give a stretched box a width from its height, so the button takes the height that
553
+ the row gets: a chip's height beside a filter bar, and beside a full field the field's
554
+ own height, which is the line box of the field's text, its 12px padding and its edge.
555
+ On a touch screen every field is a full field with 16px text. #831
556
+ why: docs/foundations.md#control-corners */
557
+ .ui-toolbar:has(.ui-filter-bar) > .ui-btn--icon:not(.ui-btn--xs, .ui-btn--sm) {
558
+ min-width: var(--ui-filter-row-h);
559
+ min-height: var(--ui-filter-row-h);
560
+ }
561
+ /* The two pointers have separate queries, because the fine rule's selector is the more
562
+ specific one and would win on a touch screen too. */
563
+ @media not (pointer: coarse) {
564
+ .ui-toolbar:has(> .ui-input-group > .ui-input:not(.ui-input--sm), > .ui-input:not(.ui-input--sm)) > .ui-btn--icon:not(.ui-btn--xs, .ui-btn--sm) {
565
+ font-size: var(--text-base);
566
+ line-height: normal;
567
+ min-width: calc(1lh + 26px);
568
+ min-height: calc(1lh + 26px);
569
+ }
570
+ }
571
+ @media (pointer: coarse) {
572
+ .ui-toolbar:has(> .ui-input-group > .ui-input, > .ui-input) > .ui-btn--icon:not(.ui-btn--xs, .ui-btn--sm) {
573
+ font-size: 16px;
574
+ line-height: normal;
575
+ min-width: calc(1lh + 26px);
576
+ min-height: calc(1lh + 26px);
577
+ }
578
+ }
549
579
  @media (max-width: 560px) {
550
580
  .ui-toolbar--split:has(.ui-filter-bar) > :last-child { min-height: var(--ui-filter-row-h); }
551
581
  }
582
+ /* On a touch screen a dropdown trigger alone on a toolbar line takes a chip's height too,
583
+ not its own 32px, so every control under the full field is one height. #822 */
584
+ @media (pointer: coarse) {
585
+ .ui-toolbar > .ui-dropdown { min-height: var(--ui-filter-row-h); }
586
+ }
587
+ /* A small search field stops at the width of a small panel, and the free width goes
588
+ before the last control. A full-size field still takes the free width. At one column
589
+ each search field takes the line again. rev_f1d664c42a55/d2, #822
590
+ why: docs/components.md#a-toolbar-at-one-column */
591
+ @media not (pointer: coarse) {
592
+ .ui-toolbar > .ui-input-group:has(> .ui-input--sm) { max-width: var(--panel-sm); }
593
+ }
594
+ @media (max-width: 560px) {
595
+ .ui-toolbar > .ui-input-group:has(> .ui-input--sm) { max-width: none; }
596
+ }
552
597
 
553
598
  /* -- The band's search at one column --------------------------------------- */
554
599
  /* The band holds the trigger, the reader's mark and whatever the page puts between
@@ -42,7 +42,7 @@
42
42
  min-height: var(--space-8);
43
43
  padding: var(--space-1) var(--space-6) var(--space-1) var(--space-2);
44
44
  font-size: var(--text-sm);
45
- border-radius: var(--radius-sm);
45
+ border-radius: var(--radius-pill);
46
46
  background-position: right var(--space-2) center;
47
47
  }
48
48
 
@@ -110,7 +110,7 @@
110
110
  min-height: var(--space-8);
111
111
  padding: var(--space-1) var(--space-2);
112
112
  font-size: var(--text-sm);
113
- border-radius: var(--radius-sm);
113
+ border-radius: var(--radius-pill);
114
114
  text-align: center;
115
115
  }
116
116
 
@@ -86,7 +86,7 @@
86
86
  background: var(--surface); /* code-bg: inherit — control paint; the containing surface is the ground, for a chip and for a band alike. */
87
87
  color: var(--text);
88
88
  border: 1px solid var(--border);
89
- border-radius: 10px;
89
+ border-radius: var(--radius-pill);
90
90
  font: inherit;
91
91
  transition:
92
92
  transform var(--dur-fast) var(--ease),
@@ -216,11 +216,8 @@
216
216
  @media (forced-colors: active) {
217
217
  .vopt:hover { border: 1px solid Highlight; padding: 9px 12px; }
218
218
  }
219
- /* The row is a keyboard stop: react/src/Dropdown.tsx:758
220
- `els[next < 0 ? 0 : next]?.focus()` moves focus onto a `[data-dd-item]` with
221
- the arrow keys, and this is one. It takes the ring on its own 10px radius, the
222
- same way `.amenu a` above does. #482 */
223
- .vopt:focus-visible { outline: var(--ring); outline-offset: var(--ring-offset); }
219
+ /* The row is a keyboard stop and a `.ui-dropdown__item`, so it takes the kit row's inward
220
+ ring on its own 10px radius. #482, #824 */
224
221
  /* The selected version carries the kit's menu tick, as `.ui-dropdown__tick` does for
225
222
  every other menu; the badge keeps its own place beside it. */
226
223
  .vopt .vtick { margin-left: 8px; flex: none; display: none; color: var(--accent); margin-top: 1px; }
@@ -378,11 +375,12 @@
378
375
  /* `margin` bleeds the head back through the 6px panel padding above, the way
379
376
  `.ui-dropdown__panel > .ui-dropdown__head` already does for its own panel:
380
377
  the border-bottom hairline reaches the panel's edge instead of stopping a
381
- notch short of it. #641's warning.
378
+ notch short of it. #641's warning. The 5px below is the kit head's own gap, so the first
379
+ row's fill and ring stand clear of the hairline. #824
382
380
  why: docs/components.md#the-dropdown-panel */
383
381
  .amenu .ahead {
384
382
  padding: 13px 15px;
385
- margin: -6px -6px 0;
383
+ margin: -6px -6px 5px;
386
384
  border-bottom: 1px solid var(--border);
387
385
  border-radius: 14px 14px 0 0;
388
386
  display: flex; align-items: center; gap: 11px;
@@ -398,8 +396,12 @@
398
396
  reserve too rather than leaving the start of the list short. #641's danger 2.
399
397
  why: docs/components.md#a-menu-panel-does-not-cut-off-its-rows-ring */
400
398
  .amenu a { display: flex; align-items: center; gap: 11px; padding: 10px 15px; color: var(--text); text-decoration: none; font-family: var(--font-sans); font-size: var(--text-sm); cursor: pointer; scroll-margin-block: 3px; }
401
- .amenu a:hover { outline: 1px solid var(--control-edge); outline-offset: -1px; background: var(--surface); /* code-bg: inherit — control paint; the containing surface is the ground, for a chip and for a band alike. */ }
402
- .amenu a:focus-visible { outline: var(--ring); outline-offset: var(--ring-offset); border-radius: var(--radius-xs); }
399
+ /* The row is a `.ui-dropdown__item`, so the kit's menu row draws its hover fill, its corner
400
+ and its inward ring. A pointer draws no edge on a row. #824 */
401
+ @media (forced-colors: active) {
402
+ /* The kit's hover border is 1px; this padding keeps the row's text still under it. */
403
+ .amenu a:hover { padding: 9px 14px; }
404
+ }
403
405
  .amenu a.cur { color: var(--accent); }
404
406
  /* A custom account row keeps the Dropdown's disabled state without its row shape. */
405
407
  .amenu a.is-disabled { /* muted-ink: state — unavailable account page */ color: var(--disabled-ink); cursor: not-allowed; pointer-events: none; }