@jonmilner/ui 0.21.2 → 0.23.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.
Files changed (204) hide show
  1. package/README.md +17 -0
  2. package/THIRD_PARTY_NOTICES.md +1 -1
  3. package/dist/Alert/Alert.css +2 -0
  4. package/dist/Alert/Alert.css.mjs +9 -0
  5. package/dist/Alert/index.d.mts +13 -0
  6. package/dist/Alert/index.mjs +45 -0
  7. package/dist/AlertDialog/client.mjs +4 -4
  8. package/dist/AlertDialog/index.d.mts +3 -2
  9. package/dist/AlertDialog/index.mjs +10 -9
  10. package/dist/Avatar/Avatar.css +1 -1
  11. package/dist/Avatar/index.d.mts +1 -1
  12. package/dist/Avatar/index.mjs +5 -5
  13. package/dist/Badge/Badge.css +1 -1
  14. package/dist/Badge/index.d.mts +1 -1
  15. package/dist/Badge/index.mjs +12 -12
  16. package/dist/Body/index.d.mts +9 -0
  17. package/dist/Body/index.mjs +12 -0
  18. package/dist/Box/Box.css +1 -1
  19. package/dist/Box/index.mjs +1 -1
  20. package/dist/Button/Button.css +1 -1
  21. package/dist/Button/index.d.mts +1 -1
  22. package/dist/Button/index.mjs +22 -22
  23. package/dist/Caption/index.d.mts +6 -0
  24. package/dist/Caption/index.mjs +14 -0
  25. package/dist/Checkbox/Checkbox.css +1 -1
  26. package/dist/Checkbox/index.mjs +7 -7
  27. package/dist/Chip/Chip.css +1 -1
  28. package/dist/Chip/index.mjs +35 -35
  29. package/dist/Clickable/Clickable.css +1 -1
  30. package/dist/Clickable/index.d.mts +1 -1
  31. package/dist/Clickable/index.mjs +4 -4
  32. package/dist/Code/Code.css +2 -0
  33. package/dist/Code/Code.css.mjs +7 -0
  34. package/dist/Code/index.d.mts +10 -0
  35. package/dist/Code/index.mjs +40 -0
  36. package/dist/ColorField/ColorField.css +2 -2
  37. package/dist/ColorField/client.mjs +6 -6
  38. package/dist/ColorField/index.mjs +14 -14
  39. package/dist/Combobox/Combobox.css +2 -2
  40. package/dist/Combobox/client.mjs +26 -26
  41. package/dist/Combobox/index.mjs +20 -20
  42. package/dist/Dialog/Dialog.css +2 -2
  43. package/dist/Dialog/client.d.mts +1 -1
  44. package/dist/Dialog/client.mjs +30 -28
  45. package/dist/Dialog/index.d.mts +2 -2
  46. package/dist/Dialog/index.mjs +19 -19
  47. package/dist/Field/Field.css +1 -1
  48. package/dist/Field/client.mjs +6 -6
  49. package/dist/Field/index.mjs +29 -29
  50. package/dist/Flex/index.d.mts +5 -0
  51. package/dist/Flex/index.mjs +14 -0
  52. package/dist/Heading/Heading.css +1 -1
  53. package/dist/Icon/Icon.css +1 -1
  54. package/dist/IconButton/IconButton.css +2 -2
  55. package/dist/IconButton/IconButton.css.mjs +2 -2
  56. package/dist/IconButton/index.d.mts +5 -2
  57. package/dist/IconButton/index.mjs +60 -21
  58. package/dist/Inline/Inline.css +1 -1
  59. package/dist/Inline/index.d.mts +2 -2
  60. package/dist/Inline/index.mjs +4 -4
  61. package/dist/Label/index.d.mts +9 -0
  62. package/dist/Label/index.mjs +19 -0
  63. package/dist/Menu/Menu.css +2 -2
  64. package/dist/Menu/Menu.css.mjs +1 -1
  65. package/dist/Menu/client.d.mts +1 -0
  66. package/dist/Menu/client.mjs +83 -62
  67. package/dist/Menu/index.d.mts +8 -0
  68. package/dist/Menu/index.mjs +123 -87
  69. package/dist/Menu/item-row.mjs +2 -2
  70. package/dist/MultiSelect/MultiSelect.css +2 -2
  71. package/dist/MultiSelect/client.mjs +4 -4
  72. package/dist/MultiSelect/index.mjs +8 -8
  73. package/dist/NavList/NavList.css +2 -2
  74. package/dist/NavList/client.mjs +3 -3
  75. package/dist/NavList/index.d.mts +3 -3
  76. package/dist/NavList/index.mjs +67 -65
  77. package/dist/NumberField/NumberField.css +2 -2
  78. package/dist/NumberField/index.mjs +17 -17
  79. package/dist/Popover/Popover.css +2 -0
  80. package/dist/Popover/Popover.css.mjs +7 -0
  81. package/dist/Popover/client.d.mts +11 -0
  82. package/dist/Popover/client.mjs +54 -0
  83. package/dist/Popover/index.d.mts +20 -0
  84. package/dist/Popover/index.mjs +39 -0
  85. package/dist/RadioGroup/RadioGroup.css +1 -1
  86. package/dist/RadioGroup/index.mjs +23 -23
  87. package/dist/SearchField/SearchField.css +2 -2
  88. package/dist/SearchField/client.mjs +13 -13
  89. package/dist/SearchField/index.mjs +16 -16
  90. package/dist/Select/Select.css +2 -2
  91. package/dist/Select/client.mjs +11 -11
  92. package/dist/Select/index.mjs +8 -8
  93. package/dist/Sidebar/Sidebar.css +1 -1
  94. package/dist/Sidebar/index.d.mts +1 -1
  95. package/dist/Sidebar/index.mjs +21 -21
  96. package/dist/SidebarLayout/SidebarLayout.css +1 -1
  97. package/dist/SidebarLayout/index.d.mts +1 -1
  98. package/dist/SidebarLayout/index.mjs +8 -8
  99. package/dist/Stack/Stack.css +1 -1
  100. package/dist/Stack/index.d.mts +2 -2
  101. package/dist/Stack/index.mjs +4 -4
  102. package/dist/Switch/Switch.css +1 -1
  103. package/dist/Switch/index.mjs +13 -13
  104. package/dist/Table/Table.css +2 -2
  105. package/dist/Table/Table.css.mjs +4 -2
  106. package/dist/Table/index.d.mts +4 -10
  107. package/dist/Table/index.mjs +80 -94
  108. package/dist/Tabs/Tabs.css +1 -1
  109. package/dist/Tabs/index.mjs +26 -26
  110. package/dist/Tag/Tag.css +1 -1
  111. package/dist/Tag/index.d.mts +1 -1
  112. package/dist/Tag/index.mjs +16 -16
  113. package/dist/Text/Text.css +1 -1
  114. package/dist/Text/index.d.mts +2 -2
  115. package/dist/Text/index.mjs +4 -4
  116. package/dist/TextField/TextField.css +2 -2
  117. package/dist/TextField/index.mjs +16 -16
  118. package/dist/Textarea/Textarea.css +2 -2
  119. package/dist/Textarea/index.mjs +9 -9
  120. package/dist/Toast/Toast.css +2 -2
  121. package/dist/Toast/Toast.css.mjs +10 -7
  122. package/dist/Toast/client.d.mts +5 -19
  123. package/dist/Toast/client.mjs +117 -152
  124. package/dist/Tooltip/Tooltip.css +1 -1
  125. package/dist/Tooltip/base.mjs +13 -13
  126. package/dist/VisuallyHidden/VisuallyHidden.css +1 -1
  127. package/dist/base.css +2 -2
  128. package/dist/brands/default.mjs +2 -1
  129. package/dist/brands/forced-colors.mjs +2 -1
  130. package/dist/brands/neutral.mjs +8 -7
  131. package/dist/contrast/contrast.d.mts +1 -1
  132. package/dist/contrast/contrast.mjs +42 -34
  133. package/dist/contrast/mixes.mjs +37 -30
  134. package/dist/docs/Alert.md +106 -0
  135. package/dist/docs/AlertDialog.md +25 -11
  136. package/dist/docs/Body.md +74 -0
  137. package/dist/docs/Box.md +4 -3
  138. package/dist/docs/Caption.md +77 -0
  139. package/dist/docs/Code.md +84 -0
  140. package/dist/docs/ColorField.md +1 -1
  141. package/dist/docs/Combobox.md +3 -1
  142. package/dist/docs/Dialog.md +28 -4
  143. package/dist/docs/Flex.md +76 -0
  144. package/dist/docs/Icon.md +1 -0
  145. package/dist/docs/IconButton.md +9 -1
  146. package/dist/docs/Inline.md +3 -2
  147. package/dist/docs/Label.md +77 -0
  148. package/dist/docs/Menu.md +54 -6
  149. package/dist/docs/MultiSelect.md +2 -0
  150. package/dist/docs/NavList.md +2 -2
  151. package/dist/docs/NumberField.md +1 -1
  152. package/dist/docs/Popover.md +135 -0
  153. package/dist/docs/SearchField.md +1 -1
  154. package/dist/docs/Select.md +2 -0
  155. package/dist/docs/Stack.md +12 -10
  156. package/dist/docs/Table.md +5 -5
  157. package/dist/docs/Text.md +30 -23
  158. package/dist/docs/TextField.md +1 -1
  159. package/dist/docs/Textarea.md +1 -1
  160. package/dist/docs/Toast.md +14 -7
  161. package/dist/docs/Tooltip.md +2 -2
  162. package/dist/docs/lint.md +18 -0
  163. package/dist/docs/llms.txt +20 -11
  164. package/dist/docs/manifest.json +732 -65
  165. package/dist/docs/migrations/0.22.0.md +35 -0
  166. package/dist/docs/migrations/0.23.0.md +84 -0
  167. package/dist/docs/theming.md +3 -3
  168. package/dist/icons/TriangleAlertIcon.d.mts +2 -0
  169. package/dist/icons/TriangleAlertIcon.mjs +10 -0
  170. package/dist/icons/index.d.mts +6 -5
  171. package/dist/icons/index.mjs +35 -34
  172. package/dist/index.d.mts +24 -16
  173. package/dist/index.mjs +47 -40
  174. package/dist/lint/index.d.mts +20 -1
  175. package/dist/lint/index.mjs +19 -3
  176. package/dist/popup/client.d.mts +1 -1
  177. package/dist/popup/client.mjs +59 -41
  178. package/dist/popup/direction.d.mts +2 -0
  179. package/dist/popup/direction.mjs +23 -0
  180. package/dist/popup/listbox-base.mjs +24 -24
  181. package/dist/popup/listbox-options.mjs +4 -4
  182. package/dist/popup/listbox-row.mjs +1 -0
  183. package/dist/popup/positioner.mjs +27 -0
  184. package/dist/popup/tooltip.d.mts +1 -0
  185. package/dist/popup/tooltip.mjs +48 -42
  186. package/dist/scroll-region/scroll-region.d.mts +12 -0
  187. package/dist/scroll-region/scroll-region.mjs +29 -0
  188. package/dist/status-message/status-message.d.mts +5 -0
  189. package/dist/status-message/status-message.mjs +74 -0
  190. package/dist/status-message/tones.d.mts +7 -0
  191. package/dist/status-message/tones.mjs +8 -0
  192. package/dist/styles/atom-values.mjs +131 -0
  193. package/dist/styles/atoms.css +1 -1
  194. package/dist/styles/layers.css +1 -1
  195. package/dist/styles/responsive.css +1 -1
  196. package/dist/styles/scroll-region.css +2 -0
  197. package/dist/styles/scroll-region.css.mjs +7 -0
  198. package/dist/styles/status-message.css +2 -0
  199. package/dist/styles/status-message.css.mjs +7 -0
  200. package/dist/theme/define-theme.mjs +42 -42
  201. package/dist/tokens/contract.d.mts +1 -1
  202. package/dist/tokens/roles.d.mts +1 -1
  203. package/dist/tokens/roles.mjs +1 -1
  204. package/package.json +30 -2
@@ -4,47 +4,56 @@
4
4
 
5
5
  ## Rules for every screen
6
6
 
7
- - Lay out with `Stack` (a column) and `Inline` (a row that wraps), spaced by their `gap`. Never rebuild them from a `Box` with `display`, `flexDirection` and `gap`.
7
+ - `Text` is the primitive the typography components are built from, so rendering it directly is a code smell: use `Heading`, `Body`, `Label`, `Caption` or `Code`. Text stays for a run inside one of them (`as="time"`, `strong`) and what none covers, as Text's docs say.
8
+ - Lay out with `Stack` (a column) and `Inline` (a row that wraps), both built from `Flex`, spaced by their `gap`. `Flex` in an app, or `display: flex` in a stylesheet, is a code smell, and so is a `Box` with `display`, `flexDirection` and `gap`.
8
9
  - `Box` is for a surface (padding, background, radius, shadow) or a semantic element that needs style props.
9
- - No `className`, `style` or app stylesheet for what a style prop or a component covers. Style props take token keys, so no raw colors or lengths either.
10
- - A list is `Stack as="ul"` with `li` children. For one without markers or indent, add `paddingInlineStart="0"` and make each row a `Box as="li" display="flex"`, as Stack's docs show.
10
+ - A raw HTML element with a `className` (`<ul className={css.list}>`) is a code smell: use the polymorphic `Box` at least (`<Box as="ul">`), with style props.
11
+ - A `*.css.ts` file is the exception, not the rule: never write a property/value pair there that a style prop covers, unless the style prop cannot work in that case. No `className`, `style` or other stylesheet for what a style prop or a component covers either. Style props take token keys, so no raw colors or lengths.
12
+ - A list is `Stack as="ul"` with `li` children. For one without markers or indent, add `paddingInlineStart="0"` and make each row an `Inline as="li"`, as Stack's docs show.
11
13
 
12
14
  ## Components
13
15
 
14
- - [AlertDialog](AlertDialog.md): Asks the user to confirm a consequential action before it runs: delete a project, discard unsaved changes, sign out every device. Built on Base UI's AlertDialog, which owns the behavior: `role="alertdialog"`, focus moves into the dialog and stays there, the page behind is inert, Esc closes it, and a click outside does not. It wears Dialog's panel at the `sm` width with a title, a description, Cancel and one confirm button, and Cancel takes focus on open.
16
+ - [Alert](Alert.md): Tells the user about a condition on the page that lasts until its cause changes: offline, a trial ending, a sync that failed. A tinted card in the page's flow with the variant's icon, a title, an optional description, optional actions and an optional close button. It is a static surface: only what you put in it is interactive.
17
+ - [AlertDialog](AlertDialog.md): Asks the user to confirm a consequential action before it runs: delete a project, discard unsaved changes, sign out every device. Built on Base UI's AlertDialog, which owns the behavior: `role="alertdialog"`, focus moves into the dialog and stays there, the page behind is hidden from assistive tech, Esc closes it, and a click outside does not. It wears Dialog's panel at the `sm` width with a title, a description, Cancel and one confirm button, and Cancel takes focus on open.
15
18
  - [Avatar](Avatar.md): Identifies a person, project or account by one or two letters in a circle, tinted by a hue or filled with a colour of the consumer's choosing, or on a neutral fill. A `span` with `role="img"`, named by `label`, around a `Text` in the `label` font. It is never focusable.
16
19
  - [Badge](Badge.md): A static label that states the status of, or a short fact about, the thing beside it: "Draft", "Failed", "Beta". A `span` with a fill from the color roles around a `Text` in the `label` font. It has no role and is never focusable.
20
+ - [Body](Body.md): Running text: paragraphs, descriptions, empty-state copy, the sentences in a card or dialog. A `Text` with body defaults: the `body` font role at `med`, rendered as a `p`. At `sm` it takes the paired `body` leading, 14/20, for dense UI.
17
21
  - [Box](Box.md): The base element every component builds on: one element, chosen with `as`, styled with style props. Style props are the token-backed classes from `@layer atoms`: layout (`display`, flex, `gap`, logical padding, margin and sizing), color roles, `borderRadius`, `boxShadow`, `position`, `zIndex`, `overflow` and `textAlign`.
18
22
  - [Button](Button.md): The labelled action: a `<button type="button">` with the house look, or a link styled as one with `as="a"` (or a router's link). Four variants (`primary`, `secondary`, `ghost`, `danger`), three sizes (`sm`, `med`, `lg`, 24, 32 and 40 px high, ADR 0124), a `loading` state that keeps its width, and icon slots before and after the label. It takes the control radius (`sm`, 6px, ADR 0162) and a sentence-case label at weight 500; only `primary` glows, softly in its fill (ADR 0131, 0163). It is built on `Clickable`, so it has the shared focus ring, the 24px minimum target and `aria-disabled` / `aria-busy` states that block activation while the button stays focusable.
23
+ - [Caption](Caption.md): A note that sits under or beside other text: a timestamp, a count, a file size, a hint under a value. A `Text` with caption defaults: `xs`, `medium` weight, the paired `meta` leading (12/16), `fgMuted`, rendered as a `span`. One size, so it has no `size` or `leading` prop.
19
24
  - [Checkbox](Checkbox.md): A two-state choice, with a third mixed state for a "select all" over a partly selected list. Built on Base UI `Checkbox` (ADR 0003, 0046): a `span` with `role="checkbox"` and `aria-checked`, plus a hidden `<input type="checkbox">` that submits with the form. The span is a 24 by 24 CSS px target (WCAG 2.2) with the shared focus ring; the 16px box inside fills and shows a tick when checked, a dash when mixed. It composes `Field` for its label, description and error (ADR 0026).
20
25
  - [Chip](Chip.md): A toggle that filters content or picks an option: "Unread", "Starred", "Medium". A `<button>` with `aria-pressed` on `Clickable`, built on Base UI `Toggle`; `ChipGroup` is a Base UI `ToggleGroup` of chips that share one state. If it changes state when clicked, it's a chip.
21
26
  - [Clickable](Clickable.md): The low-level base for everything a user presses: a `<button type="button">` by default, or a link with `as="a"` (or a router's link component). It brings the shared focus ring, a 24 by 24 CSS px minimum target (WCAG 2.2), `disabled` and `busy` states as ARIA attributes, and no look of its own: the button and link chrome is stripped. `Button`, `IconButton` and link components are built on it.
27
+ - [Code](Code.md): Code in the mono font: a run inside a line of text, or with `block` a multi-line sample on a muted surface. A `Text` preset, so it takes Text's props and the style props. No syntax highlighting, copy button, line numbers or wrapping.
22
28
  - [ColorField](ColorField.md): A form field for one colour as a `#rrggbb` string: a swatch, the browser's own colour picker (`<input type="color">`), before a hex text input (role `textbox`) that holds the value. Picking a colour writes its hex; typing a valid hex moves the swatch. The hex input has TextField's look, with the swatch over its inline-start padding. Built on Base UI's `Input` and a native colour input, since Base UI has no colour picker (ADR 0003, 0114); it composes `Field` for its label, description and error (ADR 0026). Three sizes at Button's heights (`sm`, `med`, `lg`: 24, 32 and 40 px, ADR 0124); the swatch is 24px, or 32px in `lg`.
23
29
  - [Combobox](Combobox.md): A form field for picking one value, or any number with `multiple`, from a list long enough that the user types to narrow it. A trigger drawn as MultiSelect's opens a popup with a filter input above the options; typing keeps the options whose label holds the query, ignoring case and accents. Each picked option shows a check mark, and the trigger shows the picked label, or with `multiple` the joined labels, then a count ("3 selected") once they would not fit. Built on Base UI's `Combobox` (ADR 0003, 0142), which owns the keyboard and focus: focus moves into the filter as the popup opens and stays there, the arrow keys move the highlight, Enter picks, Esc and an outside click close it, and focus returns to the trigger. It shares MultiSelect's and Select's trigger, popup, option rows and summary (ADR 0134, 0142) and composes `Field` for its label, description and error (ADR 0026).
24
- - [Dialog](Dialog.md): A modal panel over the page for one short task: edit a name, fill a small form, read details that need a decision. Built on Base UI's Dialog, which owns the behavior: focus moves into the dialog and stays there, the page behind is inert and does not scroll, Esc and a click on the backdrop close it, and focus returns to the trigger. The parts add the look: a dimmed backdrop, a raised panel with a title, and a zoom-and-fade that is a plain fade under reduced motion.
30
+ - [Dialog](Dialog.md): A modal panel over the page for one short task: edit a name, fill a small form, read details that need a decision. Built on Base UI's Dialog, which owns the behavior: focus moves into the dialog and stays there, the page behind is hidden from assistive tech and does not scroll, Esc and a click on the backdrop close it, and focus returns to the trigger. The parts add the look: a dimmed backdrop, a raised panel with a title, and a zoom-and-fade that is a plain fade under reduced motion.
25
31
  - [Field](Field.md): Wires one form control to its label, description and error: ids, `htmlFor`, `aria-describedby` and `aria-invalid`. It is input-agnostic: the control inside is Base UI's `Field.Control` or a Base UI control (Checkbox, Combobox), and Base UI does the wiring. The parts are `Field` (the root, a flex column), `Field.Label`, `Field.Description` and `Field.Error`. Built on Base UI `Field` (ADR 0003, 0026, 0046); `@base-ui/react` is a peer dependency, so the app's Base UI controls and Field share one copy of its contexts.
32
+ - [Flex](Flex.md): The flex primitive `Stack` and `Inline` are built from: a `Box` with `display="flex"` as a default style prop. It takes every `Box` prop, adds none, and has no class of its own, so `<Flex>` renders exactly `<Box display="flex">`.
26
33
  - [Heading](Heading.md): Section and page headings. A `Text` with heading defaults: the `heading` font role, `semibold`, `sm` leading, and balanced line wrapping. The level (`as`) and the look (`size`) are separate, so the outline stays right whatever the design calls for.
27
34
  - [Icon](Icon.md): The base for every icon: an `<svg>` on a 24-unit grid that draws its children with round 2-unit strokes in `currentColor`. Generated icons from `@jonmilner/ui/icons` (`ArrowRightIcon`, …) wrap it and take the same props, less `children` and `viewBox`. `size` takes a `fontSize` step, so an icon matches the `Text` beside it; `color` takes a color role.
28
35
  - [IconButton](IconButton.md): A compact button whose only visible content is an icon, for an action the icon makes plain: close, edit, refresh. A required `label` names it for assistive technology (`aria-label`); the icon is decorative. It is a `<button type="button">` on `Clickable`, so it has the shared focus ring, the 24px minimum target and `aria-disabled` that blocks activation while the button stays focusable. Three variants from Button's fills (`ghost`, the default, `secondary` and `primary`), each a square at the control radius (`sm`, 6px, ADR 0162), with Button's glow on `primary` only (ADR 0131, 0163), and three sizes at Button's heights (`sm`, `med`, `lg`: 24, 32 and 40 px, ADR 0124).
29
- - [Inline](Inline.md): A horizontal row of children that wraps onto new lines, with even space between them on both axes. `Inline` is a `Box` with `display="flex"`, `flexDirection="row"`, `flexWrap="wrap"` and `alignItems="center"` as default style props, spaced by a required `gap`. Children render as they are: no wrapper per child.
30
- - [Menu](Menu.md): A list of actions that opens from a button: a row's "Edit, Duplicate, Delete", a toolbar's overflow. It may mix in links ("Open invoice", "Download PDF") as `Menu.LinkItem`, real anchors that keep the browser's link behavior. Built on Base UI's Menu, which owns the keyboard and focus: arrow keys, Home and End move through the items, typing jumps to a matching item, Esc and an outside click close it, and focus returns to the trigger. The parts add the look: a raised surface with a border and shadow, a highlighted item, a zoom-and-fade that is a plain fade under reduced motion.
36
+ - [Inline](Inline.md): A horizontal row of children that wraps onto new lines, with even space between them on both axes. `Inline` is a `Flex` (a `Box` with `display="flex"`) with `flexDirection="row"`, `flexWrap="wrap"` and `alignItems="center"` as default style props, spaced by a required `gap`. Children render as they are: no wrapper per child.
37
+ - [Label](Label.md): Short UI text that names or tags something: a value's name in a summary, a status, a section's small title in a panel, the text beside an icon. A `Text` with label defaults: the `label` font role, `medium` weight, `sm` with the paired `body` leading, rendered as a `span`. It is not a form label.
38
+ - [Menu](Menu.md): A list of actions that opens from a button: a row's "Edit, Duplicate, Delete", a toolbar's overflow. An entry can open a nested list. It may mix in links ("Open invoice", "Download PDF") as `Menu.LinkItem`, real anchors that keep the browser's link behavior. Built on Base UI's Menu, which owns the keyboard and focus: arrow keys, Home and End move through the items, typing jumps to a matching item, Esc and an outside click close it, and focus returns to the trigger. The parts add the look: a raised surface with a border and shadow, a highlighted item, a zoom-and-fade that is a plain fade under reduced motion.
31
39
  - [MultiSelect](MultiSelect.md): A form field for picking any number of values from a list too long to show at once. A trigger styled as Button's secondary look opens a listbox of options; each selected option shows a check mark, and the trigger summarises the selection as the joined labels, or a count ("3 selected") once the labels would not fit. Built on Base UI's `Select` in multiple mode (ADR 0003), which owns the keyboard and focus: arrow keys, Home and End move through the options, typing jumps to a match, Esc and an outside click close it, and focus returns to the trigger. It composes `Field` for its label, description and error (ADR 0026).
32
40
  - [NavList](NavList.md): A column of links to an app's pages, with the current page marked: a sidebar's or a settings page's navigation. The parts are `NavList` (a named `nav` around a list), `NavList.Group` (a heading over a run of items) and `NavList.Item` (one link, with an optional leading icon, live dot and trailing count, and an optional `action` beside the link: a control for that row, such as its ⋯ menu). Items are links, not buttons: an `<a>` by default, or a router's `Link` through `as`, which keeps the router's props typed (ADR 0149). The app says which item is current; NavList reads nothing from the URL.
33
41
  - [NumberField](NumberField.md): A form field for a bounded number: a text input between a decrement button (inline start) and an increment button (inline end), with the number centred between them. Built on Base UI's `NumberField` (ADR 0003, 0161); it composes `Field` for its label, description and error (ADR 0026). Three sizes at Button's heights (`sm`, `med`, `lg`: 24, 32 and 40 px, ADR 0124); the input fills the Field's width.
42
+ - [Popover](Popover.md): Supplementary content anchored to a control and opened on purpose: a row's details as label and value pairs, a short explanation with a link or a button. It is non-modal, so the page behind stays usable. Built on Base UI's Popover, which owns the behavior: a click, tap, Enter or Space opens it, an outside press or Esc closes it, focus moves in on open and back to the trigger on close. The parts add the look: the raised surface of the other popups, and a zoom-and-fade that is a plain fade under reduced motion.
34
43
  - [RadioGroup](RadioGroup.md): One choice among a few options, all shown at once. A form field built on Base UI `RadioGroup` and `Radio` (ADR 0003, 0046) inside a `Fieldset`: a `radiogroup` named by its legend, with a `radio` per option. Each option is a 24 by 24 CSS px target (WCAG 2.2) with the shared focus ring; the 16px circle inside shows a dot when checked. It composes `Field` for the group's description and error and for each option's label and description (ADR 0026, 0133).
35
44
  - [SearchField](SearchField.md): A form field for a search query: an `<input type="search">` (role `searchbox`) with a search icon at its inline start and, while it holds a value, a clear button at its inline end. Escape empties a field that has a value, and the clear button empties it and puts focus back in the input, so a keyboard user never loses their place (ADR 0087). Built on Base UI's `Input` (ADR 0003); it composes `Field` for its label, description and error (ADR 0026). Three sizes at Button's heights (`sm`, `med`, `lg`: 24, 32 and 40 px, ADR 0124); the clear button is 24px, or 32px in `lg`.
36
45
  - [Select](Select.md): A form field for picking one value from a list too long to show as radios, with no typing. A trigger drawn as a field opens a listbox of options; the selected option shows a check mark, and the trigger shows its label on one line, truncated. Built on Base UI's `Select` in single mode (ADR 0003), which owns the keyboard and focus: Enter, Space and the arrow keys open it, arrow keys, Home and End move through the options, typing jumps to a match, Enter picks, Esc and an outside click close it, and focus returns to the trigger. It shares MultiSelect's trigger, popup and option rows (ADR 0134) and composes `Field` for its label, description and error (ADR 0026).
37
46
  - [Sidebar](Sidebar.md): An app's sidebar: a named `aside` on the `bgPanel` surface, with a header row, the navigation, and a footer for app-wide controls, that collapses to a narrow icon rail. Open, it is the `sidebar` width (15rem); collapsed (`collapsed`), it is the `rail` width (3.5rem) and a `NavList` inside it shows each row's icon or avatar alone, its label and count kept for assistive tech. The app owns the collapsed state: pass `onCollapsedChange` and a toggle `IconButton` appears in the header. Place it in `SidebarLayout.Sidebar`, which then follows its width (ADR 0151).
38
47
  - [SidebarLayout](SidebarLayout.md): A page's navigation or secondary column beside its main content. `SidebarLayout` is a wrapping flex row; `SidebarLayout.Sidebar` keeps a fixed width (`inlineSize="sidebar"`, 15rem) at the inline start and `SidebarLayout.Main` takes the rest. When the layout itself is narrower than 48em, the sidebar stacks above main at full width. It reads its own width through a container query, not the viewport's, so it stacks inside a narrow slot on a wide screen too. When wide, the sidebar is sticky: it stays in view while the page scrolls, capped at the viewport's height, and scrolls on its own when its content is taller. All three parts are `Box`es and take style props, except the few the layout fixes (see Rules).
39
- - [Stack](Stack.md): A vertical column of children with even space between them. `Stack` is a `Box` with `display="flex"` and `flexDirection="column"` as default style props, spaced by a required `gap`. Children render as they are: no wrapper per child.
48
+ - [Stack](Stack.md): A vertical column of children with even space between them. `Stack` is a `Flex` (a `Box` with `display="flex"`) with `flexDirection="column"` as a default style prop, spaced by a required `gap`. Children render as they are: no wrapper per child.
40
49
  - [Switch](Switch.md): Turns one setting on or off, and the change applies the moment it flips. Built on Base UI `Switch` (ADR 0003, 0137): a `span` with `role="switch"` and `aria-checked`, plus a hidden checkbox input that submits with a form. The span is a 24 px target with the shared focus ring around a pill track: off is an outlined track with the thumb at the start, on a filled `accent` track with the thumb at the end. It composes `Field` for its label, description and error (ADR 0026), with the label after the switch.
41
50
  - [Table](Table.md): Records in rows that share named columns, so a reader can scan and compare them: transactions, members, invoices. A native `table` with parts for each element (`Table.Head`, `Table.Body`, `Table.Foot`, `Table.Row`, `Table.HeaderCell`, `Table.Cell`, `Table.ColumnGroup`, `Table.Column`), and `Table.ScrollArea` for a table wider than its container. It has no `grid` role and no roving focus: a link, `Checkbox` or `Menu` in a cell keeps the page's tab order, and a screen reader's table commands work as on any table.
42
51
  - [Tabs](Tabs.md): Switches between views that share one place on the page. The parts are `Tabs` (the root, a flex column; a row when vertical), `Tabs.List` (the `tablist`), `Tabs.Tab` (a `tab` button on `Clickable`) and `Tabs.Panel` (the `tabpanel`). Built on Base UI `Tabs` (ADR 0003, 0046): it owns the selection, one tab stop with arrow-key roving, `aria-selected`, and the ids that tie each tab to its panel. The selected tab shows an accent bar that fades and grows in (ADR 0049).
43
52
  - [Tag](Tag.md): A label that puts content in a category: a topic, a label, a user-made category. A `span` with a subtle tone fill (gray by default) and an `xs` (4px) radius (a small mark's step in `docs/shape.md`, so wrapped lines stay inside the fill) around a `Text` in the `label` font. It can be read-only, a link, or removable. `appearance="outline"` swaps the fill for a 1px border, a `med` (8px) radius and a small dot in the tone's color, for a quieter label among dense content.
44
- - [Text](Text.md): The base of all visible text, and the primitive every text component builds on. Its box is trimmed to the cap height and the baseline, so the gap around text is the visible space and text sits centred in a padded control. It takes every Box style prop (`color`, `textAlign`, margins), plus `size`, `font`, `weight`, `leading`, `truncate` and `wrap`.
53
+ - [Text](Text.md): The base of all visible text, and the primitive every text component builds on. Its box is trimmed to the cap height and the baseline, so the gap around text is the visible space and text sits centred in a padded control. It takes every Box style prop (`color`, `textAlign`, margins), plus `size`, `font`, `weight`, `leading`, `truncate` and `wrap`. An app almost never renders it directly: rendering `Text` is a code smell, since `Heading`, `Body`, `Label`, `Caption` and `Code` cover a string a user sees.
45
54
  - [TextField](TextField.md): A form field for one line of text that is not a search: an `<input>` (role `textbox`) with SearchField's look and no button over it; optional icons sit inside the field. `type` picks `text`, `email`, `url` or `tel`. Built on Base UI's `Input` (ADR 0003); it composes `Field` for its label, description and error (ADR 0026, 0110). Three sizes at Button's heights (`sm`, `med`, `lg`: 24, 32 and 40 px, ADR 0124).
46
55
  - [Textarea](Textarea.md): A form field for several lines of free text: a `<textarea>` (role `textbox`, multi-line) with TextField's look. Built on Base UI's `Input` rendered as a textarea (ADR 0003); it composes `Field` for its label, description and error (ADR 0026, 0136). `rows` sets its starting height, three by default, and the user can drag it taller or shorter. Three sizes (`sm`, `med`, `lg`) set TextField's text size and padding, so the first line sits where a TextField's text does (ADR 0124).
47
- - [Toast](Toast.md): Tells the user briefly about the result of an action without interrupting them: "Changes saved", "Message sent", "Couldn't upload the file". Material calls it a snackbar and Atlassian a flag. Built on Base UI's Toast, which owns the queue, the timers and swipe-to-dismiss. The parts add the look: a raised card in a stack at the bottom end corner, an icon per variant, a close button, and a slide-up-and-fade that is a plain fade under reduced motion. A toast never takes focus and moves nothing on the page.
56
+ - [Toast](Toast.md): Tells the user briefly about the result of an action without interrupting them: "Changes saved", "Message sent", "Couldn't upload the file". Material calls it a snackbar and Atlassian a flag. Built on Base UI's Toast, which owns the queue, the timers and swipe-to-dismiss. The parts add the look: a card tinted by variant in a stack at the bottom end corner, an icon per variant, a close button, and a slide-up-and-fade that is a plain fade under reduced motion. A toast never takes focus and moves nothing on the page.
48
57
  - [Tooltip](Tooltip.md): A short hint about a control that shows on hover after a delay and at once on keyboard focus: a status pill's reason ("2 of 5 checks failed"), why a button is disabled, a few label and value rows. Built on Base UI's Tooltip, which owns the behavior: the hover delay, opening on focus, Esc, blur and pointer leave closing it, and keeping it open while the pointer is over the popup. The parts add the look, a small raised surface with a border and shadow, and link the popup to its trigger as its description (`role="tooltip"`, `aria-describedby`), which Base UI leaves out.
49
58
  - [VisuallyHidden](VisuallyHidden.md): Text that screen readers read and nobody sees: a 1px clipped box, out of the layout, still in the accessibility tree. Use it for words a sighted user gets from the layout, an icon or a color, never to hide a control or a skip link. One element, chosen with `as`, a `span` by default.
50
59
 
@@ -52,6 +61,6 @@
52
61
 
53
62
  - [manifest.json](manifest.json): every component, prop, variant, icon and token, as JSON
54
63
  - [theming.md](theming.md): themes, brands and tokens
55
- - [lint.md](lint.md): the `uiLint()` options the library ships
64
+ - [lint.md](lint.md): the `uiLint()` options the library ships, and its style props with their values
56
65
  - [doctor.md](doctor.md): the `ui-doctor` command that reports how far the app lags the latest release and which migrations it has not applied
57
66
  - [migrations/](migrations/README.md): upgrade notes for breaking releases