@apliteni/apliteni-ui 0.175.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
 
@@ -1484,13 +1509,14 @@ dropdown's `id` sits on a wrapper that a label cannot name. The label and then t
1484
1509
  the trigger, the error or hint describes it, and an error marks it invalid. The list is named by the
1485
1510
  label unless you give it an `ariaLabel`. A control outside a `field()` needs its own `ariaLabel`. A
1486
1511
  placeholder is not a name. **In a field, a dropdown trigger has the shape of a text input.** It
1487
- takes the input's corner, its top and bottom padding and its type size, so the two have the same
1488
- 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
1489
1514
  fixed 16px, as the input's is, also when the host changes `--text-base`. A long value stays on
1490
1515
  one line, starts at the left and ends with an ellipsis, as in a select, so the trigger keeps the
1491
1516
  input's height at every value length. A person mark stands as far from the left edge as from the
1492
1517
  top and bottom edges. A date picker in a field does the same. Outside a field, for example in a
1493
- 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).
1494
1520
  Put a form on a card, not on the page ground. A field is drawn by its edge, but the page ground
1495
1521
  is too close to the field's own fill for you to see that edge. See
1496
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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apliteni/apliteni-ui",
3
- "version": "0.175.0",
3
+ "version": "0.177.0",
4
4
  "workspaces": [
5
5
  "react"
6
6
  ],
@@ -1278,7 +1278,7 @@
1278
1278
  height: var(--ui-head-control-h, calc(18px + 1.2 * var(--text-base)));
1279
1279
  padding: 0;
1280
1280
  border: 0;
1281
- border-radius: 10px;
1281
+ border-radius: var(--radius-pill);
1282
1282
  background: none;
1283
1283
  color: var(--text);
1284
1284
  transform: none;
@@ -1378,7 +1378,7 @@
1378
1378
  padding: 0;
1379
1379
  margin: 0;
1380
1380
  border: 0;
1381
- border-radius: var(--radius-md);
1381
+ border-radius: var(--radius-pill);
1382
1382
  background: transparent;
1383
1383
  }
1384
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 = {
@@ -4352,7 +4352,7 @@ function FileDrop({
4352
4352
  import { forwardRef as forwardRef9 } from "react";
4353
4353
  import { icon as icon6 } from "@apliteni/apliteni-ui";
4354
4354
  import { jsx as jsx37, jsxs as jsxs33 } from "react/jsx-runtime";
4355
- var SearchField = forwardRef9(function SearchField2({ ariaLabel, className, ...props }, ref) {
4355
+ var SearchField = forwardRef9(function SearchField2({ ariaLabel, size, className, ...props }, ref) {
4356
4356
  return /* @__PURE__ */ jsxs33("div", { className: "ui-input-group", children: [
4357
4357
  /* @__PURE__ */ jsx37("span", { className: "ui-input-group__icon", dangerouslySetInnerHTML: { __html: icon6("search") } }),
4358
4358
  /* @__PURE__ */ jsx37(
@@ -4362,7 +4362,7 @@ var SearchField = forwardRef9(function SearchField2({ ariaLabel, className, ...p
4362
4362
  ...props,
4363
4363
  type: "search",
4364
4364
  "aria-label": ariaLabel,
4365
- className: ["ui-input", className].filter(Boolean).join(" ")
4365
+ className: ["ui-input", size === "sm" && "ui-input--sm", className].filter(Boolean).join(" ")
4366
4366
  }
4367
4367
  )
4368
4368
  ] });
@@ -6964,7 +6964,7 @@ function AccountMenu2({
6964
6964
  {
6965
6965
  ...props,
6966
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}`),
6967
- 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(" "),
6968
6968
  children: [
6969
6969
  item.icon && /* @__PURE__ */ jsx48("span", { "aria-hidden": "true", dangerouslySetInnerHTML: { __html: icon8(item.icon) } }),
6970
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); }
@@ -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; }