@slashsuite/ui-react 0.15.2 → 0.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/MIGRATING.md +23 -2
  2. package/README.md +3 -3
  3. package/agent-docs/components/avatar.md +1 -1
  4. package/agent-docs/components/body-text.md +2 -2
  5. package/agent-docs/components/checkbox.md +1 -1
  6. package/agent-docs/components/pill.md +1 -1
  7. package/agent-docs/components/radio-group.md +1 -1
  8. package/agent-docs/components/table.md +1 -1
  9. package/agent-docs/components/text-link.md +1 -1
  10. package/dist/Avatar.d.ts +4 -4
  11. package/dist/Avatar.js +4 -4
  12. package/dist/AvatarStack.js +3 -1
  13. package/dist/Badge.js +2 -2
  14. package/dist/Button.d.ts +1 -1
  15. package/dist/CardParts.js +1 -1
  16. package/dist/ChatMessage.js +1 -1
  17. package/dist/Checkbox.d.ts +1 -1
  18. package/dist/Checkbox.js +1 -1
  19. package/dist/CodeBlock.js +1 -1
  20. package/dist/CodeBody.js +1 -1
  21. package/dist/CopyButton.js +1 -1
  22. package/dist/CopyLine.js +1 -1
  23. package/dist/DateCalendar.js +1 -1
  24. package/dist/FlowDiagram.js +2 -2
  25. package/dist/FormRow.js +1 -1
  26. package/dist/InputShell.js +2 -2
  27. package/dist/Kbd.js +1 -1
  28. package/dist/Lightbox.js +1 -1
  29. package/dist/ListRow.js +1 -1
  30. package/dist/Markdown.js +1 -1
  31. package/dist/MediaTile.js +2 -2
  32. package/dist/Menu.js +1 -1
  33. package/dist/OutlineRegion.js +1 -1
  34. package/dist/Pill.d.ts +2 -2
  35. package/dist/Pill.js +5 -5
  36. package/dist/Price.js +2 -2
  37. package/dist/ProductTile.js +1 -1
  38. package/dist/RadioGroup.d.ts +1 -1
  39. package/dist/SortableList.js +2 -2
  40. package/dist/StackedBar.js +1 -1
  41. package/dist/StatTile.js +1 -1
  42. package/dist/Steps.js +1 -1
  43. package/dist/Table.d.ts +2 -1
  44. package/dist/Table.js +5 -4
  45. package/dist/TableCells.js +2 -2
  46. package/dist/TextLink.d.ts +1 -1
  47. package/dist/TextLink.js +1 -1
  48. package/dist/Timeline.js +1 -1
  49. package/dist/Tooltip.js +1 -1
  50. package/dist/TrendChart.js +1 -1
  51. package/dist/core/button.d.ts +1 -1
  52. package/dist/core/button.js +1 -1
  53. package/dist/core/control.js +1 -1
  54. package/dist/density.js +2 -2
  55. package/dist/stateMachineDots.js +2 -2
  56. package/dist/switcher.js +1 -1
  57. package/dist/tableColumns.d.ts +6 -0
  58. package/dist/tableColumns.js +1 -0
  59. package/dist/tableRow.d.ts +1 -1
  60. package/dist/tableRow.js +1 -1
  61. package/dist/typography.d.ts +3 -3
  62. package/dist/typography.js +5 -6
  63. package/package.json +1 -1
package/MIGRATING.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Migrating @slashsuite/ui-react
2
2
 
3
+ ## 0.15 to 0.16: no text is under 14px
4
+
5
+ No code has to change. 16px stays the baseline, and 14px (`text-sm`) is now the smallest text any
6
+ component draws: every 12px (`text-xs`) and smaller size is gone. What reads larger:
7
+
8
+ - Small print and labels: `Caption` (also under `AppShell density="compact"`), `Overline`, a
9
+ `Table` header, `Tooltip`, `Kbd`, a `StatTile` hint, `ListRow` and table cell secondary lines, a
10
+ `FormRowField` label, `Menu` item descriptions, `MediaTile` and `ProductTile` labels, the
11
+ `CodeBlock` and `CopyLine` code (12.5px before) and every chart's axis and legend text.
12
+ - `Pill` `sm` and `md` are 14px, like `lg`.
13
+ - `Badge` is a 20px circle with 14px digits (16px with 10px digits before); on a corner it sits
14
+ 0.5rem out (0.375rem before). A `Button`'s `count` chip is the same size.
15
+ - `Avatar` `sm` and `md` draw their initials at 14px; `xs` (16px) draws one initial instead of two,
16
+ and an `AvatarStack`'s `xs` "+N" chip widens to its count.
17
+ - `TextLink size="sm"` is 14px, like `md` (12px before), and `Price size="sm"`'s was price is 14px,
18
+ the same size as the price (12px before).
19
+ - Under `AppShell density="compact"`, a `sm` control and a field's hint and error are 14px (12px
20
+ before).
21
+
22
+ Check any layout that fit these to a fixed width or height, such as a row of pills or a dense table.
23
+
3
24
  ## 0.13 to 0.14: StateMachine roles have colours
4
25
 
5
26
  No code has to change. `StateMachine` now gives each role (a state's `owner`, or a transition's new
@@ -193,10 +214,10 @@ else sets the step, and no component takes a type size of its own.
193
214
  | | 0.10 | 0.11 | 0.11 under `AppShell density="compact"` |
194
215
  | --- | --- | --- | --- |
195
216
  | `Text` | 14px (`text-sm/5`) | 16px (`text-base/6`) | 14px |
196
- | `Caption` | 12px | 14px | 12px |
217
+ | `Caption` | 12px | 14px | 14px (12px before 0.16) |
197
218
  | `SectionHeading` | 16px | 20px | 16px |
198
219
  | `SubsectionHeading` `sm`, `md`, `lg` | 14, 16, 18px | 16, 18, 20px | 14, 16, 18px |
199
- | `Input`, `Select`, `Textarea`, `DateField`, `Button` `sm`, `md`, `lg` | 12, 14, 16px | 14, 16, 18px | 12, 14, 16px |
220
+ | `Input`, `Select`, `Textarea`, `DateField`, `Button` `sm`, `md`, `lg` | 12, 14, 16px | 14, 16, 18px | 14, 14, 16px (12, 14, 16px before 0.16) |
200
221
 
201
222
  TypeScript does not flag these, since no name changes:
202
223
 
package/README.md CHANGED
@@ -281,8 +281,8 @@ import {
281
281
  the toggle its square. `printChrome={false}` is opt-in: the header and footer are hidden in print and main
282
282
  drops its padding (the page margin is then your `@page`); without it a print is unchanged. `bleed` drops main's `Container` for a full-bleed
283
283
  page; the header keeps its own, so put a `Container` back around anything that should line up. `density="compact"`, set once here and nowhere else,
284
- puts the whole app one type step down: `Text` 14px, `Caption` 12px, the headings and the controls one
285
- step smaller. Left out, text is 16px, as a site's.
284
+ puts the whole app one type step down: `Text` 14px, the headings and the controls one
285
+ step smaller. Nothing goes under 14px, so `Caption` and a `sm` control stay at 14px. Left out, text is 16px, as a site's.
286
286
  - **`AppShellBrand`** is the `brand` slot as one link: `logo` and `label` inside the same `<a>`, so
287
287
  the whole brand goes home (the label names the link; the logo is hidden from assistive tech).
288
288
  `logoSize` is `sm` (20px), `md` (24px, the default, an `Avatar size="sm"`) or `lg` (32px); an
@@ -340,7 +340,7 @@ import {
340
340
  `width` and a column has no `align` or `justify`.
341
341
  - **`FormGrid`** is the two-column form: `Field`s in two columns once the grid is 36rem wide (its own width, not the viewport's), one below. A `Field`
342
342
  with `span="full"` (a textarea, a long hint) runs across both. **`FormRow`** is an inline-edit
343
- row of **`FormRowField`**s (a compact `text-xs` label over a control; `span` 1, 2, 3 or 4 is its
343
+ row of **`FormRowField`**s (a compact `text-sm` label over a control; `span` 1, 2, 3 or 4 is its
344
344
  share of the row, so 2, 1 and 1 give a half and two quarters) with optional `actions` after
345
345
  them (a save button, kept at its own width). Every control sits on the bottom edge, so the actions
346
346
  line up with them, and narrower than 36rem (its own width) the fields and the actions stack. A `FormRow` is always the full
@@ -73,4 +73,4 @@ fails to load, the initials show instead.
73
73
 
74
74
  ### Types
75
75
  - AvatarShape: `"round" | "square"`. `round` for a person, `square` (rounded corners that grow with the size) for an org or a team.
76
- - AvatarSize: `"sm" | "md" | "lg" | "xs" | "xl" | "2xl" | "3xl"`. An Avatar's size: `xs` 16px, `sm` 24px, `md` 32px, `lg` 40px, `xl` 56px, `2xl` 64px, `3xl` 96px.
76
+ - AvatarSize: `"sm" | "md" | "lg" | "xs" | "xl" | "2xl" | "3xl"`. An Avatar's size: `xs` 16px (one initial, since two at 14px do not fit), `sm` 24px, `md` 32px, `lg` 40px, `xl` 56px, `2xl` 64px, `3xl` 96px.
@@ -117,7 +117,7 @@ Left out, the part takes the nearest loading layout's or part's; `false` opts it
117
117
  the text; `positive`, `warn`, `danger` and `info` say what a run means (see `TextTone`).
118
118
 
119
119
  ### Caption
120
- Fine print / metadata. A paragraph (`p`; `as="span"` inline), text-sm/5 normal, tertiary (text-xs/4 under an `AppShell density="compact"`). Takes `tone`, `numeric`, `mono`, `lines` and `align` like `Text`, and `italic` for a muted hint and `breakWords` for a long unbroken string such as a URL.
120
+ Fine print / metadata. A paragraph (`p`; `as="span"` inline), text-sm/5 normal, tertiary, at both type steps: text is never under 14px. Takes `tone`, `numeric`, `mono`, `lines` and `align` like `Text`, and `italic` for a muted hint and `breakWords` for a long unbroken string such as a URL.
121
121
  - align: "center" | "end" | "start". Set the text at `start`, `center` or `end` of its block. The run becomes block-level, so the
122
122
  alignment has a box to act on (a table header cell, a right-hand column).
123
123
  - as: ElementType. The element to render; each role has a semantic default.
@@ -137,7 +137,7 @@ Left out, the part takes the nearest loading layout's or part's; `false` opts it
137
137
  the text; `positive`, `warn`, `danger` and `info` say what a run means (see `TextTone`).
138
138
 
139
139
  ### Overline
140
- Small all-caps label above a group. `span`, text-xs semibold uppercase, tertiary. `tone`, `numeric`, `mono` and `align` are opt-in, as on `Text`.
140
+ Small all-caps label above a group. `span`, text-sm semibold uppercase, tertiary. `tone`, `numeric`, `mono` and `align` are opt-in, as on `Text`.
141
141
  - align: "center" | "end" | "start". Set the text at `start`, `center` or `end` of its block. The run becomes block-level, so the
142
142
  alignment has a box to act on (a table header cell, a right-hand column).
143
143
  - as: ElementType. The element to render; each role has a semantic default.
@@ -60,7 +60,7 @@ import { Checkbox } from "@slashsuite/ui-react";
60
60
 
61
61
  ### Props
62
62
  ### Checkbox
63
- A checkbox with its label. It is a real `<input type="checkbox">`, drawn by the library (an empty outlined box, then a filled accent one with a check mark) so it reads the same in every theme and browser. Every prop but the label goes on the input, and `ref` reaches it. `size="sm"` is `text-xs` and a smaller box, for a dense row; `size="lg"` is `text-base` and a larger box. Leave `label` out for a bare box in a table cell, and name it with `aria-label`. The box sits on the label's first line, so a label that wraps reads from the box. `hint` is a muted line under the label that says more, like a `Field`'s; `error` adds a red line under it, with an alert icon, and makes the box `aria-invalid` and red-edged. The note is the box's `aria-describedby`. `onChange` gets the new checked state; take `checked` with it, or `defaultChecked` alone. `indeterminate` draws a dash for a select-all box over a partly chosen list. `variant="card"` draws it as an option card: a bordered box with the label as its title and the hint under it. Under a finger the hit area grows to 44px. While `loading` the label is drawn and the box is a bone of its size.
63
+ A checkbox with its label. It is a real `<input type="checkbox">`, drawn by the library (an empty outlined box, then a filled accent one with a check mark) so it reads the same in every theme and browser. Every prop but the label goes on the input, and `ref` reaches it. `size="sm"` is `text-sm` and a smaller box, for a dense row; `size="lg"` is `text-base` and a larger box. Leave `label` out for a bare box in a table cell, and name it with `aria-label`. The box sits on the label's first line, so a label that wraps reads from the box. `hint` is a muted line under the label that says more, like a `Field`'s; `error` adds a red line under it, with an alert icon, and makes the box `aria-invalid` and red-edged. The note is the box's `aria-describedby`. `onChange` gets the new checked state; take `checked` with it, or `defaultChecked` alone. `indeterminate` draws a dash for a select-all box over a partly chosen list. `variant="card"` draws it as an option card: a bordered box with the label as its title and the hint under it. Under a finger the hit area grows to 44px. While `loading` the label is drawn and the box is a bone of its size.
64
64
  - disabledReason: string. Why the box cannot be changed: it dims and is blocked (`aria-disabled`; a click and Space
65
65
  change nothing) while it stays in the tab order, and the reason is its tooltip on hover,
66
66
  keyboard focus and a tap, read out as its description.
@@ -75,7 +75,7 @@ import { Pill, TextLink } from "@slashsuite/ui-react";
75
75
 
76
76
  ### Props
77
77
  ### Pill
78
- A small tinted label whose `tone` says what it means; `dot` adds a leading dot in the pill's own text colour, `round` swaps the rounded-md corners for a full pill shape, and `size` steps the text (with none, it takes its container's). `name` makes it two-tone, `name: value`: the name keeps the tone's tint and the children, the value, sit on the surface beside it. `href` makes it a link (the app's router link through `LinkProvider` for an in-app path, else a plain `<a>`; `external` opens a new tab) and `onClick` makes it a button, each with a hover dim and the focus ring. `onRemove` adds an x button after the text (named by `removeLabel`, by default `Remove` and the pill's text), a separate button beside a link or button pill rather than nested in it. `title` is its tooltip and description; a plain pill with one takes a tab stop. While `loading` with no text yet it is a bone of its size. Its text never wraps: a pill is one unit, so keep it to a word or two.
78
+ A small tinted label whose `tone` says what it means; `dot` adds a leading dot in the pill's own text colour, `round` swaps the rounded-md corners for a full pill shape, and `size` is the step (with none, it takes its container's); its text is 14px at every step. `name` makes it two-tone, `name: value`: the name keeps the tone's tint and the children, the value, sit on the surface beside it. `href` makes it a link (the app's router link through `LinkProvider` for an in-app path, else a plain `<a>`; `external` opens a new tab) and `onClick` makes it a button, each with a hover dim and the focus ring. `onRemove` adds an x button after the text (named by `removeLabel`, by default `Remove` and the pill's text), a separate button beside a link or button pill rather than nested in it. `title` is its tooltip and description; a plain pill with one takes a tab stop. While `loading` with no text yet it is a bone of its size. Its text never wraps: a pill is one unit, so keep it to a word or two.
79
79
  - children: ReactNode. The pill's text; while `loading`, none yet draws the pill as a bone of its size.
80
80
  - dot: boolean. A leading dot in the pill's own text colour.
81
81
  - external: boolean. Opens in a new tab: adds `target="_blank"` and `rel="noreferrer"`.
@@ -58,7 +58,7 @@ Left out, the part takes the nearest loading layout's or part's; `false` opts it
58
58
  - name: string. The form field the choice posts under.
59
59
  - onChange: (value: string) => void. Called with the chosen radio's `value`.
60
60
  - required: boolean. Marks the choice required: a red asterisk after the label, the group is `aria-required`, and a form will not submit with no option chosen.
61
- - size: "sm" | "md" | "lg" (default md). The size of every radio in the group: `sm` is `text-xs` and a smaller circle, `lg` `text-base`
61
+ - size: "sm" | "md" | "lg" (default md). The size of every radio in the group: `sm` is `text-sm` and a smaller circle, `lg` `text-base`
62
62
  and a larger one.
63
63
  - value: string. The `value` of the chosen radio.
64
64
  - variant: "card" | "plain" (default plain). `plain` is a column of circles and their words. `card` makes each radio a bordered box the
@@ -277,7 +277,7 @@ down a column.
277
277
  new direction.
278
278
 
279
279
  ### TableHead
280
- The `<thead>`: small uppercase column titles, on a tinted strip unless the table is in a card. Holds one `TableRow` of `TableHeaderCell`s. Unless the table is in a card, it stays in view under the `AppShell` header while the page scrolls past the rows, as long as the table fits its box.
280
+ The `<thead>`: small uppercase column titles, on a tinted strip unless the table is in a card. Holds one `TableRow` of `TableHeaderCell`s. Unless the table is in a card, it stays in view under the `AppShell` header while the page scrolls past the rows, once the table is measured and fits its box; before that, and while the table is wider than its box, it stays at the top of the table.
281
281
 
282
282
  ### TableBody
283
283
  The `<tbody>`: the rows, each with a line above it and, unless the table is in a card, a fill on hover. With no rows it draws `empty` (an `EmptyState`, one muted line here) in one cell that spans every column the head declares; the head stays drawn, so the reader sees what the table holds. In a loading `Table` a body with no rows draws five rows of bones instead, never `empty`.
@@ -85,7 +85,7 @@ An inline text link in the accent colour. Every anchor prop goes on the `<a>`; a
85
85
  - href: string (required). Where the link goes; an in-app path goes through the app's `LinkProvider`.
86
86
  - icon: "page" | "grid" | "search" | "alert" | "table" | "type" | "diff" | "baseline" | "review" | "ci" | "self-host" | "privacy" | "capture" | "branch" | "theme" | "speed" | "chevron-right" | "chevron-down" | "close" | "external-link" | "settings" | "bell" | "check" | "plus" | "minus" | "more" | "window" | "card" | "pointer" | "field" | "compass" | "briefcase" | "cart" | "pause" | "play". An icon after the words (`chevron-right`, say), at one size on the baseline; it is decorative and hidden from assistive tech.
87
87
  - mono: boolean (default false). The monospace face, for a path, an id or a command.
88
- - size: "sm" | "md" | "lg". The link's own type size: `sm` is `text-xs`, `md` `text-sm` and `lg` `text-base`. Left out, it
88
+ - size: "sm" | "md" | "lg". The link's own type size: `sm` is `text-sm`, `md` `text-sm` and `lg` `text-base`. Left out, it
89
89
  takes the size of the text around it: a link inside prose has no default size.
90
90
  - stretch: boolean (default false). The link covers its nearest `relative` ancestor, so the whole row or card is the click target.
91
91
 
package/dist/Avatar.d.ts CHANGED
@@ -2,15 +2,15 @@ import type { MouseEventHandler, ReactElement } from "react";
2
2
  import type { Passthrough } from "./props.js";
3
3
  import { type LoadingProps } from "./skeleton.js";
4
4
  declare const SIZE_CLASSES: {
5
- readonly xs: "size-4 text-[0.5rem]";
6
- readonly sm: "size-6 text-xs";
7
- readonly md: "size-8 text-xs";
5
+ readonly xs: "size-4 text-sm/4";
6
+ readonly sm: "size-6 text-sm";
7
+ readonly md: "size-8 text-sm";
8
8
  readonly lg: "size-10 text-base";
9
9
  readonly xl: "size-14 text-xl";
10
10
  readonly "2xl": "size-16 text-2xl";
11
11
  readonly "3xl": "size-24 text-3xl";
12
12
  };
13
- /** An Avatar's size: `xs` 16px, `sm` 24px, `md` 32px, `lg` 40px, `xl` 56px, `2xl` 64px, `3xl` 96px. */
13
+ /** An Avatar's size: `xs` 16px (one initial, since two at 14px do not fit), `sm` 24px, `md` 32px, `lg` 40px, `xl` 56px, `2xl` 64px, `3xl` 96px. */
14
14
  export type AvatarSize = keyof typeof SIZE_CLASSES;
15
15
  /** `round` for a person, `square` (rounded corners that grow with the size) for an org or a team. */
16
16
  export type AvatarShape = "round" | "square";
package/dist/Avatar.js CHANGED
@@ -14,9 +14,9 @@ const COLOUR_CLASSES = [
14
14
  "bg-amber-600",
15
15
  ];
16
16
  const SIZE_CLASSES = {
17
- xs: "size-4 text-[0.5rem]",
18
- sm: "size-6 text-xs",
19
- md: "size-8 text-xs",
17
+ xs: "size-4 text-sm/4",
18
+ sm: "size-6 text-sm",
19
+ md: "size-8 text-sm",
20
20
  lg: "size-10 text-base",
21
21
  xl: "size-14 text-xl",
22
22
  "2xl": "size-16 text-2xl",
@@ -73,7 +73,7 @@ export function AvatarMark({ name, src, size = "md", shape = "round", ring = fal
73
73
  const corners = avatarShapeClass(shape, size);
74
74
  // As a button or a link, it takes the consumer's props and the mark inside keeps only its look.
75
75
  const markProps = onClick || href !== undefined ? {} : rest;
76
- const mark = src && !failed ? (_jsx("img", { ref: ref, src: src, alt: name, title: name, className: cx("shrink-0 object-cover", corners, SIZE_CLASSES[size], ring), onError: markFailed, ...markProps })) : (_jsx("span", { "aria-hidden": "true", title: name, className: cx("inline-grid shrink-0 place-items-center font-semibold text-violet-50", corners, SIZE_CLASSES[size], avatarColourClass(name), ring), ...markProps, children: initialsOf(name) }));
76
+ const mark = src && !failed ? (_jsx("img", { ref: ref, src: src, alt: name, title: name, className: cx("shrink-0 object-cover", corners, SIZE_CLASSES[size], ring), onError: markFailed, ...markProps })) : (_jsx("span", { "aria-hidden": "true", title: name, className: cx("inline-grid shrink-0 place-items-center font-semibold text-violet-50", corners, SIZE_CLASSES[size], avatarColourClass(name), ring), ...markProps, children: size === "xs" ? initialsOf(name).slice(0, 1) : initialsOf(name) }));
77
77
  return framed({ name, href, external, onClick, rest, mark, corners });
78
78
  }
79
79
  /** The mark alone, or inside the one link or button the Avatar is, named by `name`. */
@@ -30,5 +30,7 @@ export function AvatarStack({ items, max, size = "md", shape = "round", loading,
30
30
  const overlap = OVERLAP[size];
31
31
  const names = shown.map((person) => person.name);
32
32
  const label = hidden.length > 0 ? `${names.join(", ")} and ${hidden.length} more` : names.join(", ");
33
- return (_jsxs("span", { role: "img", "aria-label": label, className: "inline-flex items-center", ...rest, children: [shown.map((person, index) => (_jsx(AvatarMark, { name: person.name, src: person.src, size: size, shape: shape, ring: cx(RING, index > 0 && overlap) }, `${index}:${person.name}`))), hidden.length > 0 && (_jsxs("span", { "aria-hidden": "true", title: hidden.map((person) => person.name).join(", "), className: cx("inline-grid shrink-0 place-items-center bg-slate-100 font-semibold text-slate-700 tabular-nums", RING, avatarSizeClass(size), avatarShapeClass(shape, size), shown.length > 0 && overlap), children: ["+", hidden.length] }))] }));
33
+ return (_jsxs("span", { role: "img", "aria-label": label, className: "inline-flex items-center", ...rest, children: [shown.map((person, index) => (_jsx(AvatarMark, { name: person.name, src: person.src, size: size, shape: shape, ring: cx(RING, index > 0 && overlap) }, `${index}:${person.name}`))), hidden.length > 0 && (_jsxs("span", { "aria-hidden": "true", title: hidden.map((person) => person.name).join(", "), className: cx("inline-grid shrink-0 place-items-center bg-slate-100 font-semibold text-slate-700 tabular-nums", RING,
34
+ // At 16px "+N" at 14px does not fit a square, so the xs chip widens to its count.
35
+ size === "xs" ? "h-4 min-w-4 px-1 text-sm/4" : avatarSizeClass(size), avatarShapeClass(shape, size), shown.length > 0 && overlap), children: ["+", hidden.length] }))] }));
34
36
  }
package/dist/Badge.js CHANGED
@@ -10,7 +10,7 @@ import { useLoading, WaitingBone } from "./skeleton.js";
10
10
  */
11
11
  export function Badge({ count, corner = false, loading: ownLoading, loadingLabel, ...rest }) {
12
12
  if (useLoading(ownLoading).loading) {
13
- return (_jsx(WaitingBone, { own: ownLoading, label: loadingLabel, attrs: rest, root: cx("inline-flex", corner && "absolute -end-1.5 -top-1.5"), shape: "inline-block h-4 w-5 rounded-full" }));
13
+ return (_jsx(WaitingBone, { own: ownLoading, label: loadingLabel, attrs: rest, root: cx("inline-flex", corner && "absolute -end-2 -top-2"), shape: "inline-block h-5 w-6 rounded-full" }));
14
14
  }
15
- return (_jsx("span", { ...rest, className: cx("inline-flex min-h-4 min-w-4 items-center justify-center rounded-full bg-red-600 px-1 text-[0.625rem]/[1.6] font-semibold text-red-50", corner && "absolute -end-1.5 -top-1.5"), children: count > 99 ? "99+" : count }));
15
+ return (_jsx("span", { ...rest, className: cx("inline-flex min-h-5 min-w-5 items-center justify-center rounded-full bg-red-600 px-1.5 text-sm/5 font-semibold text-red-50", corner && "absolute -end-2 -top-2"), children: count > 99 ? "99+" : count }));
16
16
  }
package/dist/Button.d.ts CHANGED
@@ -16,7 +16,7 @@ export declare const buttonSizeTables: {
16
16
  boxMd: Record<import("./core/index.js").ButtonSize, string>;
17
17
  };
18
18
  /** The count chip's classes (a Badge's size, in the button's own text colour). */
19
- export declare const COUNT = "inline-flex min-h-4 min-w-4 items-center justify-center rounded-full border border-current px-1 text-[0.625rem]/[1.4] font-semibold tabular-nums";
19
+ export declare const COUNT = "inline-flex min-h-5 min-w-5 items-center justify-center rounded-full border border-current px-1.5 text-sm/5 font-semibold tabular-nums";
20
20
  /** Size, tone and variant: the look of a button, apart from its state. */
21
21
  type ButtonLook = {
22
22
  /**
package/dist/CardParts.js CHANGED
@@ -15,7 +15,7 @@ function NameTitle({ id, level, children, }) {
15
15
  }
16
16
  export function CardHeading({ id, title, titleStyle, level, count, status, bar, spaced, size, }) {
17
17
  const ink = bar ? "text-slate-500" : "text-slate-400";
18
- return (_jsxs("div", { className: cx("flex gap-2", status ? "items-center" : "items-baseline", spaced && HEADING_GAP[size]), children: [titleStyle === "name" ? (_jsx(NameTitle, { id: id, level: level, children: title })) : (_jsx(CardOverline, { id: id, level: level, faint: !bar, children: title })), count !== undefined && _jsx("span", { className: cx("text-xs font-medium", ink), children: count }), status] }));
18
+ return (_jsxs("div", { className: cx("flex gap-2", status ? "items-center" : "items-baseline", spaced && HEADING_GAP[size]), children: [titleStyle === "name" ? (_jsx(NameTitle, { id: id, level: level, children: title })) : (_jsx(CardOverline, { id: id, level: level, faint: !bar, children: title })), count !== undefined && _jsx("span", { className: cx("text-sm font-medium", ink), children: count }), status] }));
19
19
  }
20
20
  /** A card's `icon`: the feature-size mark above the heading, in the accent colour. */
21
21
  export function CardIcon({ name, size }) {
@@ -17,5 +17,5 @@ const ROLE = {
17
17
  */
18
18
  export function ChatMessage({ role, author, meta, actions, streaming = false, children, ...rest }) {
19
19
  const look = ROLE[role];
20
- return (_jsxs("article", { ...rest, "aria-busy": streaming || undefined, className: cx("flex w-full min-w-0 flex-col gap-1", look.side), children: [_jsx("span", { className: "sr-only", children: author }), meta && _jsx("div", { className: "text-xs text-slate-500", children: meta }), _jsxs("div", { className: cx(BUBBLE, look.bubble, "wrap-anywhere whitespace-pre-wrap"), children: [children, streaming && (_jsx("span", { "aria-hidden": "true", className: "text-slate-400 motion-safe:animate-pulse", children: "\u258D" }))] }), actions && (_jsx("div", { className: cx("flex flex-wrap items-center gap-1", look.row), children: actions }))] }));
20
+ return (_jsxs("article", { ...rest, "aria-busy": streaming || undefined, className: cx("flex w-full min-w-0 flex-col gap-1", look.side), children: [_jsx("span", { className: "sr-only", children: author }), meta && _jsx("div", { className: "text-sm text-slate-500", children: meta }), _jsxs("div", { className: cx(BUBBLE, look.bubble, "wrap-anywhere whitespace-pre-wrap"), children: [children, streaming && (_jsx("span", { "aria-hidden": "true", className: "text-slate-400 motion-safe:animate-pulse", children: "\u258D" }))] }), actions && (_jsx("div", { className: cx("flex flex-wrap items-center gap-1", look.row), children: actions }))] }));
21
21
  }
@@ -45,7 +45,7 @@ type CheckboxProps = {
45
45
  * A checkbox with its label. It is a real `<input type="checkbox">`, drawn by the library (an
46
46
  * empty outlined box, then a filled accent one with a check mark) so it reads the same in every
47
47
  * theme and browser. Every prop but the label goes on the input, and `ref` reaches it.
48
- * `size="sm"` is `text-xs` and a smaller box, for a dense row; `size="lg"` is `text-base` and a
48
+ * `size="sm"` is `text-sm` and a smaller box, for a dense row; `size="lg"` is `text-base` and a
49
49
  * larger box. Leave `label` out for a bare box in a table cell, and name it with `aria-label`. The
50
50
  * box sits on the label's first line, so a label that wraps reads from the box. `hint` is a muted
51
51
  * line under the label that says more, like a `Field`'s; `error` adds a red line under it, with an alert
package/dist/Checkbox.js CHANGED
@@ -62,7 +62,7 @@ function CardTitle({ label }) {
62
62
  * A checkbox with its label. It is a real `<input type="checkbox">`, drawn by the library (an
63
63
  * empty outlined box, then a filled accent one with a check mark) so it reads the same in every
64
64
  * theme and browser. Every prop but the label goes on the input, and `ref` reaches it.
65
- * `size="sm"` is `text-xs` and a smaller box, for a dense row; `size="lg"` is `text-base` and a
65
+ * `size="sm"` is `text-sm` and a smaller box, for a dense row; `size="lg"` is `text-base` and a
66
66
  * larger box. Leave `label` out for a bare box in a table cell, and name it with `aria-label`. The
67
67
  * box sits on the label's first line, so a label that wraps reads from the box. `hint` is a muted
68
68
  * line under the label that says more, like a `Field`'s; `error` adds a red line under it, with an alert
package/dist/CodeBlock.js CHANGED
@@ -17,5 +17,5 @@ import { CodeBody } from "./CodeBody.js";
17
17
  */
18
18
  export function CodeBlock({ label, language = "text", overflow = "wrap", copy = false, children, lines, ...rest }) {
19
19
  const captionId = useId();
20
- return (_jsxs("figure", { ...rest, className: "overflow-hidden rounded-lg border border-slate-200 bg-slate-50 font-mono text-[0.78125rem] leading-normal text-slate-900", children: [label && (_jsx("figcaption", { id: captionId, className: "border-b border-slate-200 px-3 py-1.5 text-xs text-slate-500", children: label })), _jsx(CodeBody, { code: lines ? lines.join("\n") : children, language: language, wrap: overflow === "wrap", copy: copy, labelledBy: label ? captionId : undefined })] }));
20
+ return (_jsxs("figure", { ...rest, className: "overflow-hidden rounded-lg border border-slate-200 bg-slate-50 font-mono text-sm leading-normal text-slate-900", children: [label && (_jsx("figcaption", { id: captionId, className: "border-b border-slate-200 px-3 py-1.5 text-sm text-slate-500", children: label })), _jsx(CodeBody, { code: lines ? lines.join("\n") : children, language: language, wrap: overflow === "wrap", copy: copy, labelledBy: label ? captionId : undefined })] }));
21
21
  }
package/dist/CodeBody.js CHANGED
@@ -28,5 +28,5 @@ export function CodeBody({ code, language, wrap, copy, labelledBy, }) {
28
28
  // The ring is insetFocusRing: scrollStopProps' own ring is drawn outside the box, which the strip's
29
29
  // overflow-hidden frame would clip.
30
30
  const { props: stopProps } = scrollStopProps(tabStop, labelledBy !== undefined ? { labelledBy } : { label: "Code" });
31
- return (_jsxs("div", { className: cx("flex items-start", copy && "gap-1 pr-1.5"), children: [_jsx("div", { ref: wrap ? undefined : attach, ...stopProps, className: cx("min-w-0 flex-1", !wrap && `overflow-x-auto ${themedScrollbar}`, tabStop && insetFocusRing), children: _jsx("pre", { className: cx("px-3 py-2.5 font-mono text-[0.78125rem] leading-normal text-slate-900", wrap ? "break-words whitespace-pre-wrap" : "w-max min-w-full whitespace-pre"), children: _jsx(CodeText, { code: code, language: language, breakAtSpaces: wrap }) }) }), copy && (_jsx("div", { className: "flex w-14 shrink-0 justify-end pt-2", children: _jsx(CopyButton, { text: language === "console" ? consoleCommands(code) : code }) }))] }));
31
+ return (_jsxs("div", { className: cx("flex items-start", copy && "gap-1 pr-1.5"), children: [_jsx("div", { ref: wrap ? undefined : attach, ...stopProps, className: cx("min-w-0 flex-1", !wrap && `overflow-x-auto ${themedScrollbar}`, tabStop && insetFocusRing), children: _jsx("pre", { className: cx("px-3 py-2.5 font-mono text-sm leading-normal text-slate-900", wrap ? "break-words whitespace-pre-wrap" : "w-max min-w-full whitespace-pre"), children: _jsx(CodeText, { code: code, language: language, breakAtSpaces: wrap }) }) }), copy && (_jsx("div", { className: "flex w-14 shrink-0 justify-end pt-2", children: _jsx(CopyButton, { text: language === "console" ? consoleCommands(code) : code }) }))] }));
32
32
  }
@@ -1,7 +1,7 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import {} from "react";
3
3
  import { focusRing } from "./cx.js";
4
- const BASE = `min-h-6 min-w-6 shrink-0 cursor-pointer rounded px-1.5 py-0.5 font-sans text-xs text-slate-400 hover:bg-slate-100 disabled:pointer-events-none disabled:opacity-50 ${focusRing}`;
4
+ const BASE = `min-h-6 min-w-6 shrink-0 cursor-pointer rounded px-1.5 py-0.5 font-sans text-sm text-slate-400 hover:bg-slate-100 disabled:pointer-events-none disabled:opacity-50 ${focusRing}`;
5
5
  /** The labels share one grid cell, centred, so the button is as wide as the longest and never resizes. */
6
6
  const CELL = "col-start-1 row-start-1";
7
7
  /** How long the copied or failed label shows, in milliseconds. */
package/dist/CopyLine.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { CopyButton } from "./CopyButton.js";
3
- const BOX = "flex items-center justify-between gap-3 rounded-lg border border-slate-200 bg-white px-2.5 py-2 font-mono text-[0.78125rem] leading-normal text-slate-900";
3
+ const BOX = "flex items-center justify-between gap-3 rounded-lg border border-slate-200 bg-white px-2.5 py-2 font-mono text-sm leading-normal text-slate-900";
4
4
  /** One line of mono text in a box, with a `CopyButton`: a command or a token to paste elsewhere. `label` says what the line is, and the button is named "Copy <label>" (it still reads "Copy"), so several lines on a page can be told apart. `disabled` disables the button, e.g. until hydration. An `id`, `data-*` and `aria-*` go on the root `<div>`, so `data-testid` lands there; the `<code>` holds only `text`. */
5
5
  export function CopyLine({ text, label, disabled, ...rest }) {
6
6
  return (_jsxs("div", { ...rest, className: BOX, children: [_jsx("code", { className: "min-w-0 break-words", children: text }), _jsx(CopyButton, { text: text, disabled: disabled, "aria-label": `Copy ${label}` })] }));
@@ -63,7 +63,7 @@ const rangeCellClass = (cell) => cx("flex h-9 w-9 items-center justify-center te
63
63
  : "rounded-lg", focusRing);
64
64
  /** The weekday row and the days of the month on show, in a `Calendar` or a `RangeCalendar`. */
65
65
  function MonthGrid({ cellClass: dayClass, }) {
66
- return (_jsxs(CalendarGrid, { weekdayStyle: "short", children: [_jsx(CalendarGridHeader, { children: (day) => (_jsx(CalendarHeaderCell, { className: "pb-1 text-xs font-medium text-slate-500", children: day })) }), _jsx(CalendarGridBody, { children: (date) => _jsx(CalendarCell, { date: date, className: dayClass }) })] }));
66
+ return (_jsxs(CalendarGrid, { weekdayStyle: "short", children: [_jsx(CalendarGridHeader, { children: (day) => (_jsx(CalendarHeaderCell, { className: "pb-1 text-sm font-medium text-slate-500", children: day })) }), _jsx(CalendarGridBody, { children: (date) => _jsx(CalendarCell, { date: date, className: dayClass }) })] }));
67
67
  }
68
68
  /**
69
69
  * The popover's frame and dialog. `container` is the modal `<dialog>` the picker sits in, if any: a
@@ -62,9 +62,9 @@ function FlowCanvas({ drawn, nodes, edges, active, uniform, }) {
62
62
  const marker = `flow-arrow-${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
63
63
  const byId = new Map(nodes.map((n) => [n.id, n]));
64
64
  const paths = new Map(drawn.edges.map((e) => [e.index, e]));
65
- return (_jsxs(_Fragment, { children: [drawn.groups.map((g) => (_jsx("div", { className: "absolute rounded-xl border border-dashed border-slate-300", style: { left: g.x, top: g.y, width: g.width, height: g.height }, children: _jsx("span", { className: "absolute left-3 top-1 text-xs font-medium text-slate-500", children: g.name }) }, g.name))), _jsx(FlowArrows, { drawn: drawn, marker: marker, colours: new Map(edges.map(({ edge, index }) => [index, edge.colour])) }), edges.map(({ edge, index }) => {
65
+ return (_jsxs(_Fragment, { children: [drawn.groups.map((g) => (_jsx("div", { className: "absolute rounded-xl border border-dashed border-slate-300", style: { left: g.x, top: g.y, width: g.width, height: g.height }, children: _jsx("span", { className: "absolute left-3 top-1 text-sm font-medium text-slate-500", children: g.name }) }, g.name))), _jsx(FlowArrows, { drawn: drawn, marker: marker, colours: new Map(edges.map(({ edge, index }) => [index, edge.colour])) }), edges.map(({ edge, index }) => {
66
66
  const at = paths.get(index)?.labelAt;
67
- return edge.label && at ? (_jsx("span", { "data-measure": edgeKey(index), className: "absolute -translate-x-1/2 -translate-y-1/2 whitespace-nowrap rounded bg-white px-1 text-xs text-slate-600", style: { left: at.x, top: at.y }, children: edge.label }, index)) : null;
67
+ return edge.label && at ? (_jsx("span", { "data-measure": edgeKey(index), className: "absolute -translate-x-1/2 -translate-y-1/2 whitespace-nowrap rounded bg-white px-1 text-sm text-slate-600", style: { left: at.x, top: at.y }, children: edge.label }, index)) : null;
68
68
  }), drawn.nodes.map((b) => {
69
69
  const node = byId.get(b.id);
70
70
  return node ? (_jsx(FlowBoxView, { box: b, node: node, active: active === b.id, uniform: uniform }, b.id)) : null;
package/dist/FormRow.js CHANGED
@@ -37,5 +37,5 @@ export function FormRow({ actions, hint, error, children, ...rest }) {
37
37
  */
38
38
  export function FormRowField({ label, htmlFor, span = 1, loading, loadingLabel, children, ...rest }) {
39
39
  const { loading: waiting, owner } = useLoading(loading);
40
- return (_jsxs("div", { ...rest, ...busy(owner, waiting), className: cx("flex min-w-0 flex-col gap-1", SPAN[span]), children: [_jsx("label", { htmlFor: htmlFor, className: "text-xs font-medium text-slate-700", children: label }), waiting ? _jsx(ControlBone, {}) : children, _jsx(BusyLabel, { owner: owner, loading: waiting, label: loadingLabel })] }));
40
+ return (_jsxs("div", { ...rest, ...busy(owner, waiting), className: cx("flex min-w-0 flex-col gap-1", SPAN[span]), children: [_jsx("label", { htmlFor: htmlFor, className: "text-sm font-medium text-slate-700", children: label }), waiting ? _jsx(ControlBone, {}) : children, _jsx(BusyLabel, { owner: owner, loading: waiting, label: loadingLabel })] }));
41
41
  }
@@ -21,13 +21,13 @@ const ICON_MD = {
21
21
  };
22
22
  /** The prefix text's inset and size, by the control's size. */
23
23
  const PREFIX = {
24
- sm: "pl-2 text-xs",
24
+ sm: "pl-2 text-sm",
25
25
  md: "pl-3 text-sm",
26
26
  lg: "pl-4 text-base",
27
27
  };
28
28
  /** `PREFIX` from the `md` breakpoint up. */
29
29
  const PREFIX_MD = {
30
- sm: "md:pl-2 md:text-xs",
30
+ sm: "md:pl-2 md:text-sm",
31
31
  md: "md:pl-3 md:text-sm",
32
32
  lg: "md:pl-4 md:text-base",
33
33
  };
package/dist/Kbd.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  /** A keyboard key. Its border takes the surrounding text colour, so it reads on a filled button and on plain text. */
3
3
  export function Kbd({ children, ...rest }) {
4
- return (_jsx("kbd", { ...rest, className: "rounded border border-current/30 px-1 font-mono text-xs leading-4", children: children }));
4
+ return (_jsx("kbd", { ...rest, className: "rounded border border-current/30 px-1 font-mono text-sm leading-4", children: children }));
5
5
  }
package/dist/Lightbox.js CHANGED
@@ -44,5 +44,5 @@ export function Lightbox({ label, children, title, meta, caption, onClose, onPre
44
44
  event.preventDefault();
45
45
  step();
46
46
  };
47
- return (_jsxs("dialog", { ...rest, ref: dialog, "aria-label": label, "data-scrim": "", onClose: closed, onClick: clicked, onKeyDown: stepped, className: VIEWER, children: [_jsxs("header", { "data-scrim": "", className: "flex shrink-0 items-start justify-between gap-3 p-3", children: [_jsxs("div", { className: "min-w-0 px-2 py-1.5", children: [title && _jsx("div", { className: "text-sm font-semibold", children: title }), meta && _jsx("div", { className: "text-xs text-white/70", children: meta })] }), _jsx(ScrimButton, { label: closeLabel, path: CLOSE, onClick: close })] }), _jsxs("div", { "data-scrim": "", className: "flex min-h-0 flex-1 items-center gap-2 px-3", children: [onPrevious && _jsx(ScrimButton, { label: previousLabel, path: PREVIOUS, onClick: onPrevious }), _jsx("div", { "data-scrim": "", className: "flex size-full min-w-0 items-center justify-center *:max-h-full *:max-w-full *:object-contain", children: children }), onNext && _jsx(ScrimButton, { label: nextLabel, path: NEXT, onClick: onNext })] }), _jsx("footer", { "data-scrim": "", className: "flex shrink-0 justify-center px-5 py-4", children: caption && _jsx("p", { className: "max-w-prose text-center text-sm text-white/70", children: caption }) })] }));
47
+ return (_jsxs("dialog", { ...rest, ref: dialog, "aria-label": label, "data-scrim": "", onClose: closed, onClick: clicked, onKeyDown: stepped, className: VIEWER, children: [_jsxs("header", { "data-scrim": "", className: "flex shrink-0 items-start justify-between gap-3 p-3", children: [_jsxs("div", { className: "min-w-0 px-2 py-1.5", children: [title && _jsx("div", { className: "text-sm font-semibold", children: title }), meta && _jsx("div", { className: "text-sm text-white/70", children: meta })] }), _jsx(ScrimButton, { label: closeLabel, path: CLOSE, onClick: close })] }), _jsxs("div", { "data-scrim": "", className: "flex min-h-0 flex-1 items-center gap-2 px-3", children: [onPrevious && _jsx(ScrimButton, { label: previousLabel, path: PREVIOUS, onClick: onPrevious }), _jsx("div", { "data-scrim": "", className: "flex size-full min-w-0 items-center justify-center *:max-h-full *:max-w-full *:object-contain", children: children }), onNext && _jsx(ScrimButton, { label: nextLabel, path: NEXT, onClick: onNext })] }), _jsx("footer", { "data-scrim": "", className: "flex shrink-0 justify-center px-5 py-4", children: caption && _jsx("p", { className: "max-w-prose text-center text-sm text-white/70", children: caption }) })] }));
48
48
  }
package/dist/ListRow.js CHANGED
@@ -149,7 +149,7 @@ function rowOf(props, labelId) {
149
149
  /** The row's cells. `labelId` names the label, for a button row's button to be labelled by it. */
150
150
  function piecesOf(props, labelId) {
151
151
  const { leading, leadingWidth, trailing, secondary, children } = props;
152
- const label = (_jsxs("div", { id: labelId, className: "min-w-0 flex-1", children: [children, secondary != null && secondary !== false && (_jsx("div", { className: "text-xs font-normal text-slate-500", children: secondary }))] }));
152
+ const label = (_jsxs("div", { id: labelId, className: "min-w-0 flex-1", children: [children, secondary != null && secondary !== false && (_jsx("div", { className: "text-sm font-normal text-slate-500", children: secondary }))] }));
153
153
  const end = trailing != null && (_jsx("span", { className: "shrink-0 tabular-nums text-slate-500", children: trailing }));
154
154
  const thumbnail = leadingWidth === "thumbnail";
155
155
  return {
package/dist/Markdown.js CHANGED
@@ -119,7 +119,7 @@ function list(items, kind, key) {
119
119
  function single(block, key, h, label) {
120
120
  switch (block.kind) {
121
121
  case "h2":
122
- return (_jsx(h.H2, { className: "mt-4 text-xs font-semibold uppercase tracking-wide text-slate-400 first:mt-0", children: block.text }, key));
122
+ return (_jsx(h.H2, { className: "mt-4 text-sm font-semibold uppercase tracking-wide text-slate-400 first:mt-0", children: block.text }, key));
123
123
  case "h3":
124
124
  return (_jsx(h.H3, { className: "mt-3 text-sm font-semibold text-slate-700", children: block.text }, key));
125
125
  case "table":
package/dist/MediaTile.js CHANGED
@@ -18,7 +18,7 @@ const PLAY = "M6.3 2.84A1.5 1.5 0 0 0 4 4.11v11.78a1.5 1.5 0 0 0 2.3 1.27l9.34-5
18
18
  */
19
19
  export function MediaTile({ src, alt, label, caption, badge, aspect = "3:4", width = "md", video = false, onClick, href, external = false, onRemove, removeLabel, loading, loadingLabel, ...rest }) {
20
20
  const { loading: waiting, owner } = useLoading(loading);
21
- const body = (_jsxs(LoadingScope, { loading: waiting, children: [_jsxs("span", { className: "relative block overflow-hidden rounded-lg", children: [_jsx(Image, { src: src, alt: alt, aspect: aspect }), _jsx(TileMarks, { video: video, badge: badge, badgeStart: onRemove !== undefined }), label && (_jsx("span", { className: "absolute inset-x-0 bottom-0 truncate bg-black/90 px-2 py-1 text-xs font-medium text-white", children: label }))] }), caption && _jsx("span", { className: "mt-1 block truncate text-xs text-slate-600", children: caption }), _jsx(BusyLabel, { owner: owner, loading: waiting, label: loadingLabel })] }));
21
+ const body = (_jsxs(LoadingScope, { loading: waiting, children: [_jsxs("span", { className: "relative block overflow-hidden rounded-lg", children: [_jsx(Image, { src: src, alt: alt, aspect: aspect }), _jsx(TileMarks, { video: video, badge: badge, badgeStart: onRemove !== undefined }), label && (_jsx("span", { className: "absolute inset-x-0 bottom-0 truncate bg-black/90 px-2 py-1 text-sm font-medium text-white", children: label }))] }), caption && _jsx("span", { className: "mt-1 block truncate text-sm text-slate-600", children: caption }), _jsx(BusyLabel, { owner: owner, loading: waiting, label: loadingLabel })] }));
22
22
  // With a remove button the tile fills a wrapper that carries the width and the button's anchor.
23
23
  const box = cx("block min-w-0 text-left", onRemove ? "w-full" : IMAGE_WIDTH[width]);
24
24
  const tile = tileOf({
@@ -35,7 +35,7 @@ export function MediaTile({ src, alt, label, caption, badge, aspect = "3:4", wid
35
35
  }
36
36
  /** The marks laid over a tile's picture: the play mark for a video, and the badge in a top corner. */
37
37
  function TileMarks({ video, badge, badgeStart, }) {
38
- return (_jsxs(_Fragment, { children: [video && (_jsx("span", { "aria-hidden": "true", className: "absolute inset-0 grid place-items-center", children: _jsx("span", { className: "grid size-10 place-items-center rounded-full bg-black/90 text-white", children: _jsx(Icon, { size: "lg", children: _jsx("svg", { viewBox: "0 0 20 20", fill: "currentColor", children: _jsx("path", { d: PLAY }) }) }) }) })), badge && (_jsx("span", { className: cx("absolute top-1 truncate rounded bg-black/90 px-1.5 py-0.5 text-xs font-medium text-white", badgeStart ? "left-1 max-w-[calc(100%-2.75rem)]" : "right-1 max-w-[calc(100%-0.5rem)]"), children: badge }))] }));
38
+ return (_jsxs(_Fragment, { children: [video && (_jsx("span", { "aria-hidden": "true", className: "absolute inset-0 grid place-items-center", children: _jsx("span", { className: "grid size-10 place-items-center rounded-full bg-black/90 text-white", children: _jsx(Icon, { size: "lg", children: _jsx("svg", { viewBox: "0 0 20 20", fill: "currentColor", children: _jsx("path", { d: PLAY }) }) }) }) })), badge && (_jsx("span", { className: cx("absolute top-1 truncate rounded bg-black/90 px-1.5 py-0.5 text-sm font-medium text-white", badgeStart ? "left-1 max-w-[calc(100%-2.75rem)]" : "right-1 max-w-[calc(100%-0.5rem)]"), children: badge }))] }));
39
39
  }
40
40
  /** The round remove button on a tile's corner, named by its word and the picture's `alt`. */
41
41
  function RemoveButton({ label = "Remove", alt, onRemove, }) {
package/dist/Menu.js CHANGED
@@ -65,7 +65,7 @@ export function Menu({ label, items, trigger = "icon", size = "md", defaultOpen
65
65
  function Item({ item }) {
66
66
  const tone = ITEM_TONE[item.tone ?? "neutral"];
67
67
  const className = ({ isFocused }) => cx(ITEM, tone.ink, isFocused && tone.focused);
68
- const inside = (_jsxs(_Fragment, { children: [item.icon ? _jsx(Icon, { name: item.icon, size: "md" }) : null, _jsxs("span", { className: "flex min-w-0 flex-1 flex-col", children: [_jsx(AriaText, { slot: "label", className: "truncate", children: item.label }), hasReason(item.disabledReason) ? (_jsx(AriaText, { slot: "description", className: "text-xs text-slate-500", children: item.disabledReason })) : null] })] }));
68
+ const inside = (_jsxs(_Fragment, { children: [item.icon ? _jsx(Icon, { name: item.icon, size: "md" }) : null, _jsxs("span", { className: "flex min-w-0 flex-1 flex-col", children: [_jsx(AriaText, { slot: "label", className: "truncate", children: item.label }), hasReason(item.disabledReason) ? (_jsx(AriaText, { slot: "description", className: "text-sm text-slate-500", children: item.disabledReason })) : null] })] }));
69
69
  if (item.href !== undefined) {
70
70
  const { href, external = false } = item;
71
71
  return (_jsx(MenuItem, { textValue: item.label, href: href, isDisabled: hasReason(item.disabledReason), className: className, render: (props) => {
@@ -31,7 +31,7 @@ export function OutlineRegion({ rect, within, label, hatched = false, tone = "ac
31
31
  top: `${(rect.y / within.height) * 100}%`,
32
32
  width: `${(rect.width / within.width) * 100}%`,
33
33
  height: `${(rect.height / within.height) * 100}%`,
34
- }, children: [hatched && _jsx("span", { "aria-hidden": "true", className: HATCH }), label != null && (_jsx("span", { className: cx("absolute top-0 left-0 px-1 text-xs leading-tight", colour.tag), children: label }))] }));
34
+ }, children: [hatched && _jsx("span", { "aria-hidden": "true", className: HATCH }), label != null && (_jsx("span", { className: cx("absolute top-0 left-0 px-1 text-sm leading-tight", colour.tag), children: label }))] }));
35
35
  }
36
36
  /** The shapes `RegionFrame` letterboxes a picture into, as `Image`'s `aspect`, or `natural` (its own). */
37
37
  const FRAME_ASPECT = {
package/dist/Pill.d.ts CHANGED
@@ -69,8 +69,8 @@ type PillProps = PillBase & Removable & Passthrough & ({
69
69
  });
70
70
  /**
71
71
  * A small tinted label whose `tone` says what it means; `dot` adds a leading dot in the pill's own
72
- * text colour, `round` swaps the rounded-md corners for a full pill shape, and `size` steps the
73
- * text (with none, it takes its container's). `name` makes it two-tone, `name: value`: the name
72
+ * text colour, `round` swaps the rounded-md corners for a full pill shape, and `size` is the
73
+ * step (with none, it takes its container's); its text is 14px at every step. `name` makes it two-tone, `name: value`: the name
74
74
  * keeps the tone's tint and the children, the value, sit on the surface beside it. `href` makes it
75
75
  * a link (the app's router link through `LinkProvider` for an in-app path, else a plain `<a>`;
76
76
  * `external` opens a new tab) and `onClick` makes it
package/dist/Pill.js CHANGED
@@ -13,10 +13,10 @@ const PILL_TONES = {
13
13
  danger: "bg-red-50 text-red-900",
14
14
  accent: "bg-violet-50 text-violet-700",
15
15
  };
16
- /** The text size of each step: `md` is the pill as it has always been. */
17
- const TEXT = { sm: "text-[0.6875rem]", md: "text-xs", lg: "text-sm" };
16
+ /** The text size of each step: 14px at every step, since no text is smaller. */
17
+ const TEXT = { sm: "text-sm", md: "text-sm", lg: "text-sm" };
18
18
  /** A loading pill's height at each step: the pill's own line box. */
19
- const BONE_HEIGHT = { sm: "h-4", md: "h-5", lg: "h-6" };
19
+ const BONE_HEIGHT = { sm: "h-6", md: "h-6", lg: "h-6" };
20
20
  const INTERACTIVE = cx("transition hover:opacity-80", focusRing);
21
21
  /** The x on a removable pill: two strokes in the pill's text colour. */
22
22
  const REMOVE_MARK = (_jsx("svg", { "aria-hidden": "true", viewBox: "0 0 12 12", className: "size-3", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", children: _jsx("path", { d: "M3 3l6 6M9 3l-6 6" }) }));
@@ -74,8 +74,8 @@ function RemoveShell({ look, remove: { onRemove, removeLabel }, attrs, interacti
74
74
  }
75
75
  /**
76
76
  * A small tinted label whose `tone` says what it means; `dot` adds a leading dot in the pill's own
77
- * text colour, `round` swaps the rounded-md corners for a full pill shape, and `size` steps the
78
- * text (with none, it takes its container's). `name` makes it two-tone, `name: value`: the name
77
+ * text colour, `round` swaps the rounded-md corners for a full pill shape, and `size` is the
78
+ * step (with none, it takes its container's); its text is 14px at every step. `name` makes it two-tone, `name: value`: the name
79
79
  * keeps the tone's tint and the children, the value, sit on the surface beside it. `href` makes it
80
80
  * a link (the app's router link through `LinkProvider` for an in-app path, else a plain `<a>`;
81
81
  * `external` opens a new tab) and `onClick` makes it
package/dist/Price.js CHANGED
@@ -6,9 +6,9 @@ const SIZE = {
6
6
  md: "text-base/6",
7
7
  lg: "text-2xl/8",
8
8
  };
9
- /** The was price is a step smaller than the price it sits beside. */
9
+ /** The was price is a step smaller than the price it sits beside, except at `sm`, where both are 14px: no text is smaller. */
10
10
  const WAS_SIZE = {
11
- sm: "text-xs/5",
11
+ sm: "text-sm/5",
12
12
  md: "text-sm/6",
13
13
  lg: "text-base/8",
14
14
  };
@@ -19,7 +19,7 @@ const STATUS_LOOK = {
19
19
  */
20
20
  export function ProductTile({ href, name, src, price, was, status, statusLabel, aspect = "square", loading: ownLoading, loadingLabel, ...rest }) {
21
21
  const { loading, owner } = useLoading(ownLoading);
22
- const body = (_jsxs(LoadingScope, { loading: loading, children: [_jsx(Image, { src: src, alt: "", aspect: aspect }), _jsx("span", { className: "mt-2 block text-sm/5 font-medium text-slate-900 group-hover:underline", children: name === undefined || name === "" ? loading && _jsx(BoneLines, { count: 1, width: "3/4" }) : name }), _jsxs("span", { className: "mt-0.5 block", children: [_jsx("span", { className: "sr-only", children: ", " }), _jsx(Price, { value: price, was: was, size: "sm" })] }), status && (_jsxs("span", { className: cx("absolute top-2 left-2 max-w-[calc(100%-1rem)] truncate rounded px-1.5 py-0.5 text-xs font-semibold", STATUS_LOOK[status]), children: [_jsx("span", { className: "sr-only", children: ", " }), statusLabel ?? STATUS_WORD[status]] })), _jsx(BusyLabel, { owner: owner, loading: loading, label: loadingLabel })] }));
22
+ const body = (_jsxs(LoadingScope, { loading: loading, children: [_jsx(Image, { src: src, alt: "", aspect: aspect }), _jsx("span", { className: "mt-2 block text-sm/5 font-medium text-slate-900 group-hover:underline", children: name === undefined || name === "" ? loading && _jsx(BoneLines, { count: 1, width: "3/4" }) : name }), _jsxs("span", { className: "mt-0.5 block", children: [_jsx("span", { className: "sr-only", children: ", " }), _jsx(Price, { value: price, was: was, size: "sm" })] }), status && (_jsxs("span", { className: cx("absolute top-2 left-2 max-w-[calc(100%-1rem)] truncate rounded px-1.5 py-0.5 text-sm font-semibold", STATUS_LOOK[status]), children: [_jsx("span", { className: "sr-only", children: ", " }), statusLabel ?? STATUS_WORD[status]] })), _jsx(BusyLabel, { owner: owner, loading: loading, label: loadingLabel })] }));
23
23
  return renderLink({
24
24
  ...rest,
25
25
  ...busy(owner, loading),
@@ -34,7 +34,7 @@ export declare function RadioGroup({ label, hint, error, size, variant, disabled
34
34
  /** Marks the choice required: a red asterisk after the label, the group is `aria-required`, and a form will not submit with no option chosen. */
35
35
  required?: boolean | undefined;
36
36
  /**
37
- * The size of every radio in the group: `sm` is `text-xs` and a smaller circle, `lg` `text-base`
37
+ * The size of every radio in the group: `sm` is `text-sm` and a smaller circle, `lg` `text-base`
38
38
  * and a larger one.
39
39
  * @default md
40
40
  */
@@ -15,7 +15,7 @@ const FRAME = "w-full overflow-hidden rounded-xl border border-slate-200/70 bg-w
15
15
  const AFTER_ROW = "border-slate-200/70 [[role=row]+&]:border-t";
16
16
  /** A section after another section gets the same hairline above its heading. */
17
17
  const AFTER_SECTION = "border-slate-200/70 [[role=rowgroup]+&]:border-t";
18
- const HEADING = "flex items-center justify-between gap-3 bg-slate-50 px-4 py-2 text-xs font-medium tracking-wide text-slate-600 uppercase";
18
+ const HEADING = "flex items-center justify-between gap-3 bg-slate-50 px-4 py-2 text-sm font-medium tracking-wide text-slate-600 uppercase";
19
19
  const ITEM = "flex w-full items-center gap-3 px-4 py-3 text-left text-sm text-slate-900 outline-none hover:bg-slate-50";
20
20
  /** The keyboard cursor: the focus ring, drawn inside the row. */
21
21
  const ITEM_FOCUSED = "outline-2 -outline-offset-2 outline-violet-600";
@@ -135,5 +135,5 @@ export function SortableItem({ id, title, children, reorderLabel = "Reorder", ..
135
135
  }
136
136
  props.onDragStartCapture?.(event);
137
137
  },
138
- }), id: id, textValue: title, [ROW_MARK]: "", className: ({ isFocusVisible, isDragging }) => cx(ITEM, AFTER_ROW, isFocusVisible && ITEM_FOCUSED, isDragging && "opacity-50"), children: [_jsxs("span", { [GRIP_MARK]: "", className: "relative flex shrink-0", children: [_jsx(Button, { slot: "drag", "aria-label": `${reorderLabel} ${title}`, className: cx("rounded p-0.5 text-slate-400", focusRing), children: GRIP }), _jsx("span", { "aria-hidden": "true", className: "absolute inset-0 cursor-grab" })] }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx(ItemTitle, { title: title }), children != null && (_jsx("div", { className: "mt-1 flex flex-wrap items-center gap-2 text-xs text-slate-500", children: children }))] })] }));
138
+ }), id: id, textValue: title, [ROW_MARK]: "", className: ({ isFocusVisible, isDragging }) => cx(ITEM, AFTER_ROW, isFocusVisible && ITEM_FOCUSED, isDragging && "opacity-50"), children: [_jsxs("span", { [GRIP_MARK]: "", className: "relative flex shrink-0", children: [_jsx(Button, { slot: "drag", "aria-label": `${reorderLabel} ${title}`, className: cx("rounded p-0.5 text-slate-400", focusRing), children: GRIP }), _jsx("span", { "aria-hidden": "true", className: "absolute inset-0 cursor-grab" })] }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx(ItemTitle, { title: title }), children != null && (_jsx("div", { className: "mt-1 flex flex-wrap items-center gap-2 text-sm text-slate-500", children: children }))] })] }));
139
139
  }
@@ -34,7 +34,7 @@ function SWATCH(item) {
34
34
  */
35
35
  export function Legend({ items, loading, loadingLabel, ...rest }) {
36
36
  const { loading: waiting, owner } = useLoading(loading);
37
- return (_jsxs("ul", { ...rest, ...busy(owner, waiting), className: "flex flex-wrap gap-x-4 gap-y-1 text-xs text-slate-600", children: [waiting && items.length === 0 && _jsx(LegendBones, {}), owner && waiting && (_jsx("li", { className: "sr-only", children: _jsx(BusyLabel, { owner: owner, loading: waiting, label: loadingLabel }) })), items.map((item) => (_jsxs("li", { className: "flex items-center gap-1.5", children: [_jsx("span", { "aria-hidden": "true", className: cx("size-2.5 shrink-0 rounded-full", SWATCH(item)) }), _jsx("span", { children: item.label }), item.detail !== undefined && (_jsx("span", { className: "tabular-nums text-slate-500", children: item.detail }))] }, item.label)))] }));
37
+ return (_jsxs("ul", { ...rest, ...busy(owner, waiting), className: "flex flex-wrap gap-x-4 gap-y-1 text-sm text-slate-600", children: [waiting && items.length === 0 && _jsx(LegendBones, {}), owner && waiting && (_jsx("li", { className: "sr-only", children: _jsx(BusyLabel, { owner: owner, loading: waiting, label: loadingLabel }) })), items.map((item) => (_jsxs("li", { className: "flex items-center gap-1.5", children: [_jsx("span", { "aria-hidden": "true", className: cx("size-2.5 shrink-0 rounded-full", SWATCH(item)) }), _jsx("span", { children: item.label }), item.detail !== undefined && (_jsx("span", { className: "tabular-nums text-slate-500", children: item.detail }))] }, item.label)))] }));
38
38
  }
39
39
  /** Three entries of bones, a swatch and a word each, for a key whose entries are not here yet. */
40
40
  function LegendBones() {
package/dist/StatTile.js CHANGED
@@ -31,7 +31,7 @@ function slot(loading, content, shape) {
31
31
  */
32
32
  export function StatTile({ label, value, hint, tone = "neutral", accent = false, trend, loading: ownLoading, loadingLabel, ...rest }) {
33
33
  const { loading, owner } = useLoading(ownLoading);
34
- return (_jsxs("div", { ...rest, ...busy(owner, loading), className: "relative overflow-hidden rounded-xl border border-slate-200/70 bg-white p-5 shadow-sm", children: [accent && (_jsx("span", { "aria-hidden": "true", className: cx("absolute inset-x-0 top-0 h-1", BAR[tone]) })), _jsx(Overline, { as: "p", loading: false, children: slot(loading, label, LABEL_BONE) }), _jsx("p", { className: cx("mt-2 text-3xl font-bold tabular-nums", VALUE[tone]), children: slot(loading, value, VALUE_BONE) }), _jsx(BusyLabel, { owner: owner, loading: loading, label: loadingLabel }), trend !== undefined && trend.length > 0 && _jsx(Sparkline, { values: trend, tone: tone }), hint != null && _jsx("p", { className: "mt-1 text-xs text-slate-500", children: hint })] }));
34
+ return (_jsxs("div", { ...rest, ...busy(owner, loading), className: "relative overflow-hidden rounded-xl border border-slate-200/70 bg-white p-5 shadow-sm", children: [accent && (_jsx("span", { "aria-hidden": "true", className: cx("absolute inset-x-0 top-0 h-1", BAR[tone]) })), _jsx(Overline, { as: "p", loading: false, children: slot(loading, label, LABEL_BONE) }), _jsx("p", { className: cx("mt-2 text-3xl font-bold tabular-nums", VALUE[tone]), children: slot(loading, value, VALUE_BONE) }), _jsx(BusyLabel, { owner: owner, loading: loading, label: loadingLabel }), trend !== undefined && trend.length > 0 && _jsx(Sparkline, { values: trend, tone: tone }), hint != null && _jsx("p", { className: "mt-1 text-sm text-slate-500", children: hint })] }));
35
35
  }
36
36
  /** The tile's trend line: edge to edge, `h-8`, in the value's colour. Hidden from assistive tech. */
37
37
  function Sparkline({ values, tone, }) {
package/dist/Steps.js CHANGED
@@ -10,7 +10,7 @@ const LIST = {
10
10
  const ITEM = {
11
11
  md: {
12
12
  item: "grid grid-cols-[1.625rem_1fr] gap-3 [counter-increment:step]",
13
- number: "flex size-[1.625rem] items-center justify-center rounded-full bg-violet-50 text-xs font-semibold tabular-nums text-violet-600 before:content-[counter(step)]",
13
+ number: "flex size-[1.625rem] items-center justify-center rounded-full bg-violet-50 text-sm font-semibold tabular-nums text-violet-600 before:content-[counter(step)]",
14
14
  // The 1.5rem first line sits centred on the 1.625rem number.
15
15
  body: "min-w-0 pt-px",
16
16
  title: "text-base/6 font-medium text-slate-900",
package/dist/Table.d.ts CHANGED
@@ -47,7 +47,8 @@ export declare function Table({ label, size, narrow, sortedLabel, loading, loadi
47
47
  /**
48
48
  * The `<thead>`: small uppercase column titles, on a tinted strip unless the table is in a card.
49
49
  * Holds one `TableRow` of `TableHeaderCell`s. Unless the table is in a card, it stays in view under
50
- * the `AppShell` header while the page scrolls past the rows, as long as the table fits its box.
50
+ * the `AppShell` header while the page scrolls past the rows, once the table is measured and fits
51
+ * its box; before that, and while the table is wider than its box, it stays at the top of the table.
51
52
  */
52
53
  export declare function TableHead({ children, ...rest }: {
53
54
  children: ReactNode;
package/dist/Table.js CHANGED
@@ -40,7 +40,7 @@ export function Table({ label, size = "sm", narrow = "scroll", sortedLabel = eng
40
40
  // Until measured (a page rendered on the server) and while too wide, the box scrolls sideways.
41
41
  // Once it fits, it clips instead: a clipping box is no scroll container, so the head can stick.
42
42
  const fits = measured && !overflows;
43
- return (_jsx(TableContext.Provider, { value: { plain, size, numeric, columns, announce, stack, titles }, children: _jsx(DensityProvider, { size: size, children: _jsxs("div", { ref: attach, ...stopProps, className: cx(fits ? "overflow-clip" : "overflow-x-auto", ring, !plain && "rounded-xl border border-slate-200/70 bg-white shadow-sm"), children: [_jsxs("table", { ...rest, ...stackRole(stack, "table"), ...busy(owner, waiting), className: cx("w-full text-left text-sm", stack && STACK.table), children: [_jsx("caption", { className: "sr-only", children: label }), _jsx(LoadingScope, { loading: waiting, children: children })] }), _jsx(BusyLabel, { owner: owner, loading: waiting, label: loadingLabel }), _jsx("div", { role: "status", className: "sr-only", children: said })] }) }) }));
43
+ return (_jsx(TableContext.Provider, { value: { plain, fits, size, numeric, columns, announce, stack, titles }, children: _jsx(DensityProvider, { size: size, children: _jsxs("div", { ref: attach, ...stopProps, className: cx(fits ? "overflow-clip" : "overflow-x-auto", ring, !plain && "rounded-xl border border-slate-200/70 bg-white shadow-sm"), children: [_jsxs("table", { ...rest, ...stackRole(stack, "table"), ...busy(owner, waiting), className: cx("w-full text-left text-sm", stack && STACK.table), children: [_jsx("caption", { className: "sr-only", children: label }), _jsx(LoadingScope, { loading: waiting, children: children })] }), _jsx(BusyLabel, { owner: owner, loading: waiting, label: loadingLabel }), _jsx("div", { role: "status", className: "sr-only", children: said })] }) }) }));
44
44
  }
45
45
  /** The default `sortedLabel`. */
46
46
  function englishSorted(column, sort) {
@@ -54,11 +54,12 @@ function tableWider(box) {
54
54
  /**
55
55
  * The `<thead>`: small uppercase column titles, on a tinted strip unless the table is in a card.
56
56
  * Holds one `TableRow` of `TableHeaderCell`s. Unless the table is in a card, it stays in view under
57
- * the `AppShell` header while the page scrolls past the rows, as long as the table fits its box.
57
+ * the `AppShell` header while the page scrolls past the rows, once the table is measured and fits
58
+ * its box; before that, and while the table is wider than its box, it stays at the top of the table.
58
59
  */
59
60
  export function TableHead({ children, ...rest }) {
60
- const { plain, stack } = useContext(TableContext);
61
- return (_jsx("thead", { ...rest, ...stackRole(stack, "rowgroup"), className: cx("text-xs uppercase tracking-wide text-slate-500", !plain && "sticky top-[var(--app-header,0px)] z-1 bg-slate-50", stack && STACK.head), children: _jsx(SectionContext.Provider, { value: "head", children: children }) }));
61
+ const { plain, fits, stack } = useContext(TableContext);
62
+ return (_jsx("thead", { ...rest, ...stackRole(stack, "rowgroup"), className: cx("text-sm uppercase tracking-wide text-slate-500", !plain && "bg-slate-50", !plain && fits && "sticky top-[var(--app-header,0px)] z-1", stack && STACK.head), children: _jsx(SectionContext.Provider, { value: "head", children: children }) }));
62
63
  }
63
64
  /**
64
65
  * The `<tbody>`: the rows, each with a line above it and, unless the table is in a card, a fill on
@@ -66,7 +66,7 @@ function spansColumns(span, colSpan) {
66
66
  function figureClass(numeric, mono, prose) {
67
67
  if (!numeric && !mono)
68
68
  return prose ? "min-w-48" : "whitespace-nowrap";
69
- return cx("whitespace-nowrap", numeric && "tabular-nums", mono && "font-mono text-xs");
69
+ return cx("whitespace-nowrap", numeric && "tabular-nums", mono && "font-mono text-sm");
70
70
  }
71
71
  /** The widest a `lines={1}` cell grows. */
72
72
  const TRUNCATE_WIDTH = "max-w-xs";
@@ -141,5 +141,5 @@ function isProse(children) {
141
141
  function CellBody({ align, truncate, secondary, children, }) {
142
142
  const parts = Children.toArray(children);
143
143
  const text = parts.every(isText) ? parts.join("") : undefined;
144
- return (_jsxs(_Fragment, { children: [truncate ? (_jsx(Truncated, { text: text, className: cx(TRUNCATE_WIDTH, TRUNCATE_ALIGN[align]), children: children })) : (children), secondary != null && secondary !== false && (_jsx("div", { className: "text-xs font-normal text-slate-500", children: secondary }))] }));
144
+ return (_jsxs(_Fragment, { children: [truncate ? (_jsx(Truncated, { text: text, className: cx(TRUNCATE_WIDTH, TRUNCATE_ALIGN[align]), children: children })) : (children), secondary != null && secondary !== false && (_jsx("div", { className: "text-sm font-normal text-slate-500", children: secondary }))] }));
145
145
  }
@@ -23,7 +23,7 @@ export type TextLinkTone = TextTone | "quiet";
23
23
  export type TextLinkSize = Size;
24
24
  type TextLinkProps = {
25
25
  /**
26
- * The link's own type size: `sm` is `text-xs`, `md` `text-sm` and `lg` `text-base`. Left out, it
26
+ * The link's own type size: `sm` is `text-sm`, `md` `text-sm` and `lg` `text-base`. Left out, it
27
27
  * takes the size of the text around it: a link inside prose has no default size.
28
28
  */
29
29
  size?: TextLinkSize | undefined;
package/dist/TextLink.js CHANGED
@@ -29,7 +29,7 @@ function colourClass(tone) {
29
29
  // The trailing icon: one size, a touch under the text's, sitting on the baseline.
30
30
  const ICON = "ms-1 inline-block size-[0.875em] align-[-0.125em] [&>svg]:size-full";
31
31
  const SIZE = {
32
- sm: "text-xs/4",
32
+ sm: "text-sm/5",
33
33
  md: "text-sm/5",
34
34
  lg: "text-base/6",
35
35
  };
package/dist/Timeline.js CHANGED
@@ -34,5 +34,5 @@ export function Timeline({ label, empty, loading, loadingLabel, children, ...res
34
34
  export function TimelineItem({ title, time, tone = "neutral", loading, loadingLabel, children, ...rest }) {
35
35
  const { loading: waiting, owner } = useLoading(loading);
36
36
  const bone = waiting && isEmptySlot(title);
37
- return (_jsxs("li", { ...rest, ...busy(owner, waiting), className: "relative border-l border-slate-300 pb-5 pl-5 last:border-transparent last:pb-0", children: [_jsx("span", { "aria-hidden": "true", className: cx("absolute -left-[5px] top-1.5 h-2.5 w-2.5 rounded-full border-2", DOT[tone]) }), _jsxs("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-1", children: [_jsx("span", { className: cx("text-sm font-medium text-slate-900", bone && "w-1/3"), children: bone ? _jsx(BoneLines, { count: 1 }) : title }), time != null && _jsx("span", { className: "text-xs tabular-nums text-slate-500", children: time })] }), children != null && _jsx("div", { className: "mt-1 text-sm text-slate-700", children: children }), _jsx(BusyLabel, { owner: owner, loading: waiting, label: loadingLabel })] }));
37
+ return (_jsxs("li", { ...rest, ...busy(owner, waiting), className: "relative border-l border-slate-300 pb-5 pl-5 last:border-transparent last:pb-0", children: [_jsx("span", { "aria-hidden": "true", className: cx("absolute -left-[5px] top-1.5 h-2.5 w-2.5 rounded-full border-2", DOT[tone]) }), _jsxs("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-1", children: [_jsx("span", { className: cx("text-sm font-medium text-slate-900", bone && "w-1/3"), children: bone ? _jsx(BoneLines, { count: 1 }) : title }), time != null && _jsx("span", { className: "text-sm tabular-nums text-slate-500", children: time })] }), children != null && _jsx("div", { className: "mt-1 text-sm text-slate-700", children: children }), _jsx(BusyLabel, { owner: owner, loading: waiting, label: loadingLabel })] }));
38
38
  }
package/dist/Tooltip.js CHANGED
@@ -12,7 +12,7 @@ import { useCallback, useEffect, useId, useState, useSyncExternalStore, } from "
12
12
  // and a tap carry no animation, so they show at once. The popover's padding is the bridge the
13
13
  // pointer crosses from the trigger to the tooltip, so moving onto it keeps it open.
14
14
  const css = `[data-hc-tooltip]{position:fixed;inset:auto;margin:0;border:0;padding:.375rem 0;background:transparent;overflow:visible;width:max-content;max-width:min(20rem,calc(100vw - 2rem));position-area:top;position-try-fallbacks:flip-block}[data-hc-tooltip][data-via=pointer]{animation:hc-tooltip-in .01s linear .5s backwards}@keyframes hc-tooltip-in{from,to{visibility:hidden}}`;
15
- const CHIP = "block rounded-md border border-slate-200 bg-white px-2 py-1 text-xs text-slate-900 shadow-lg whitespace-normal break-words";
15
+ const CHIP = "block rounded-md border border-slate-200 bg-white px-2 py-1 text-sm text-slate-900 shadow-lg whitespace-normal break-words";
16
16
  /** Whether this browser has the popover API and places a popover by its anchor. Read after mount. */
17
17
  function anchorPositioning() {
18
18
  if (typeof HTMLElement === "undefined" || !("showPopover" in HTMLElement.prototype))
@@ -20,7 +20,7 @@ export function TrendChart({ label, buckets, series, kind = "bar", loading, load
20
20
  const values = series.map((s) => buckets.map((_, i) => drawn(s.values[i])));
21
21
  const max = scaleMax(largest(values));
22
22
  const ticks = [max, max / 2, 0];
23
- return (_jsxs("figure", { ...rest, ...busy(owner, waiting), "aria-label": label, className: "flex flex-col gap-3", children: [_jsxs("div", { "aria-hidden": "true", className: "flex gap-2 pt-2 text-xs tabular-nums text-slate-500", children: [_jsx(YAxis, { ticks: waiting ? [] : ticks, max: max }), _jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-1.5", children: [waiting ? (_jsx(Bone, { shape: "block h-48 rounded-lg" })) : (_jsx(Plot, { ticks: ticks, max: max, kind: kind, series: series, values: values })), _jsx(XAxis, { buckets: buckets })] })] }), series.length === 2 && (_jsx(LoadingScope, { loading: false, children: _jsx(Legend, { items: series.map((s) => ({ label: s.label, tone: s.tone })) }) })), waiting ? (_jsx(BusyLabel, { owner: owner, loading: waiting, label: loadingLabel })) : (_jsx(FigureTable, { label: label, buckets: buckets, series: series }))] }));
23
+ return (_jsxs("figure", { ...rest, ...busy(owner, waiting), "aria-label": label, className: "flex flex-col gap-3", children: [_jsxs("div", { "aria-hidden": "true", className: "flex gap-2 pt-2 text-sm tabular-nums text-slate-500", children: [_jsx(YAxis, { ticks: waiting ? [] : ticks, max: max }), _jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-1.5", children: [waiting ? (_jsx(Bone, { shape: "block h-48 rounded-lg" })) : (_jsx(Plot, { ticks: ticks, max: max, kind: kind, series: series, values: values })), _jsx(XAxis, { buckets: buckets })] })] }), series.length === 2 && (_jsx(LoadingScope, { loading: false, children: _jsx(Legend, { items: series.map((s) => ({ label: s.label, tone: s.tone })) }) })), waiting ? (_jsx(BusyLabel, { owner: owner, loading: waiting, label: loadingLabel })) : (_jsx(FigureTable, { label: label, buckets: buckets, series: series }))] }));
24
24
  }
25
25
  /** The plot: a gridline per tick, and the series' bars or lines over them. */
26
26
  function Plot({ ticks, max, kind, series, values, }) {
@@ -25,7 +25,7 @@ export declare const BUTTON_DISABLED_PLAIN = "disabled:pointer-events-none disab
25
25
  export declare const BUTTON_TONE: Record<ButtonTone, Record<Exclude<ButtonVariant, "dashed">, ButtonLook>>;
26
26
  export declare const BUTTON_DASHED: ButtonLook;
27
27
  export declare const BUTTON_TOGGLE_OFF: ButtonLook;
28
- export declare const BUTTON_COUNT = "inline-flex min-h-4 min-w-4 items-center justify-center rounded-full border border-current px-1 text-[0.625rem]/[1.4] font-semibold tabular-nums";
28
+ export declare const BUTTON_COUNT = "inline-flex min-h-5 min-w-5 items-center justify-center rounded-full border border-current px-1.5 text-sm/5 font-semibold tabular-nums";
29
29
  export declare const BUTTON_BLOCKED = "cursor-not-allowed border-slate-200 bg-slate-100 text-slate-400";
30
30
  export declare const BUTTON_BLOCKED_BY_VARIANT: Partial<Record<ButtonVariant, string>>;
31
31
  export declare const BUTTON_BUSY = "cursor-progress opacity-85";
@@ -70,7 +70,7 @@ export const BUTTON_TOGGLE_OFF = {
70
70
  // The count chip: a pill in the button's own text colour (a hairline of `currentColor`), so it reads
71
71
  // on every variant and tone and needs no palette entry. The size is a Badge's: rem text and a
72
72
  // min-height, so the chip grows with the reader's text size.
73
- export const BUTTON_COUNT = "inline-flex min-h-4 min-w-4 items-center justify-center rounded-full border border-current px-1 text-[0.625rem]/[1.4] font-semibold tabular-nums";
73
+ export const BUTTON_COUNT = "inline-flex min-h-5 min-w-5 items-center justify-center rounded-full border border-current px-1.5 text-sm/5 font-semibold tabular-nums";
74
74
  // Blocked replaces the variant's colour and hover rather than overriding them, so no `!` is needed.
75
75
  export const BUTTON_BLOCKED = "cursor-not-allowed border-slate-200 bg-slate-100 text-slate-400";
76
76
  export const BUTTON_BLOCKED_BY_VARIANT = {
@@ -1,7 +1,7 @@
1
1
  /** A control's type size at each step: `md` is 16px at the default step, and `compact` is one step down. */
2
2
  export const CONTROL_TEXT = {
3
3
  default: { sm: "text-sm", md: "text-base", lg: "text-lg" },
4
- compact: { sm: "text-xs", md: "text-sm", lg: "text-base" },
4
+ compact: { sm: "text-sm", md: "text-sm", lg: "text-base" },
5
5
  };
6
6
  /**
7
7
  * A control's line height by `size`, whatever its type step: 16, 20 and 24px, so with its padding
package/dist/density.js CHANGED
@@ -32,7 +32,7 @@ export function useTypeStep() {
32
32
  /** `CONTROL_TEXT` from the `md` breakpoint up, for a responsive size. */
33
33
  const CONTROL_TEXT_MD = {
34
34
  default: { sm: "md:text-sm", md: "md:text-base", lg: "md:text-lg" },
35
- compact: { sm: "md:text-xs", md: "md:text-sm", lg: "md:text-base" },
35
+ compact: { sm: "md:text-sm", md: "md:text-sm", lg: "md:text-base" },
36
36
  };
37
37
  /**
38
38
  * Where a text-entry control would be under 16px, it is 16px on a touch screen, so iOS Safari does
@@ -78,7 +78,7 @@ export function controlText(size, step, entry) {
78
78
  */
79
79
  const FIELD_TYPE = {
80
80
  default: { label: "text-base", note: "text-sm", line: "h-5" },
81
- compact: { label: "text-sm", note: "text-xs", line: "h-4" },
81
+ compact: { label: "text-sm", note: "text-sm", line: "h-5" },
82
82
  };
83
83
  /** The field type table, for the data test. */
84
84
  export const fieldTypeTable = FIELD_TYPE;
@@ -25,7 +25,7 @@ function colourOf(id) {
25
25
  /** One dot: its colour, its short ref, its full label as name and tooltip, a link when it has `href`. */
26
26
  function Dot({ item, where, left, y, arriving, shift, shifted, }) {
27
27
  const { props, tooltip } = useTooltip(item.label, { describes: false, tap: item.href === undefined }, {});
28
- const className = cx("pointer-events-auto absolute flex h-5 items-center gap-1 rounded px-1 text-xs text-slate-700", focusRing);
28
+ const className = cx("pointer-events-auto absolute flex h-5 items-center gap-1 rounded px-1 text-sm text-slate-700", focusRing);
29
29
  const position = {
30
30
  ...props.style,
31
31
  left: left + 2,
@@ -55,7 +55,7 @@ function Dot({ item, where, left, y, arriving, shift, shifted, }) {
55
55
  }
56
56
  /** The `+N` (or "fewer") switch in a full box's last slot. */
57
57
  function MoreToggle({ hidden, open, where, left, y, toggle, }) {
58
- return (_jsx("button", { type: "button", "aria-expanded": open, "aria-label": open ? `Show fewer in ${where}` : `Show ${hidden} more in ${where}`, onClick: toggle, className: cx("pointer-events-auto absolute flex h-5 cursor-pointer items-center rounded px-1 text-xs font-medium text-violet-600 hover:text-violet-700", focusRing), style: { left: left + 2, top: y - 10 }, children: open ? "fewer" : `+${hidden}` }));
58
+ return (_jsx("button", { type: "button", "aria-expanded": open, "aria-label": open ? `Show fewer in ${where}` : `Show ${hidden} more in ${where}`, onClick: toggle, className: cx("pointer-events-auto absolute flex h-5 cursor-pointer items-center rounded px-1 text-sm font-medium text-violet-600 hover:text-violet-700", focusRing), style: { left: left + 2, top: y - 10 }, children: open ? "fewer" : `+${hidden}` }));
59
59
  }
60
60
  /** The run of an item that has just come into `box`, ending at `end`, if it has one. */
61
61
  function runInto(item, box, end, places) {
package/dist/switcher.js CHANGED
@@ -20,7 +20,7 @@ function target(key, at, count, vertical) {
20
20
  function Label({ item }) {
21
21
  if (item.count === undefined)
22
22
  return _jsx(_Fragment, { children: item.label });
23
- return (_jsxs(_Fragment, { children: [item.label, " ", _jsx("span", { className: "ml-0.5 text-xs tabular-nums opacity-70", children: item.count })] }));
23
+ return (_jsxs(_Fragment, { children: [item.label, " ", _jsx("span", { className: "ml-0.5 text-sm tabular-nums opacity-70", children: item.count })] }));
24
24
  }
25
25
  /** A tab's own id and `aria-controls`, when it has a panel. */
26
26
  const ariaIds = (ids) => ids ? { id: ids.tab, "aria-controls": ids.panel } : {};
@@ -6,6 +6,12 @@ import type { Size } from "./size.js";
6
6
  */
7
7
  type TableSetting = {
8
8
  plain: boolean;
9
+ /**
10
+ * Whether the table was measured and fits its box. Only then does the box clip instead of
11
+ * scroll, so only then can the head stick to the page: inside a box that scrolls sideways a
12
+ * sticky head sticks to that box, pushed down over the rows by the app header's height.
13
+ */
14
+ fits: boolean;
9
15
  size: Size;
10
16
  numeric: readonly boolean[];
11
17
  /** How many columns the head declares, or `undefined` with no `TableHead`. */
@@ -1,6 +1,7 @@
1
1
  import { Children, createContext, createElement, Fragment, isValidElement, useContext, } from "react";
2
2
  export const TableContext = createContext({
3
3
  plain: false,
4
+ fits: false,
4
5
  size: "sm",
5
6
  numeric: [],
6
7
  columns: undefined,
@@ -72,7 +72,7 @@ export declare const STACK: {
72
72
  readonly row: "max-sm:block max-sm:py-2";
73
73
  readonly cell: "max-sm:flex max-sm:min-w-0 max-sm:items-baseline max-sm:justify-between max-sm:gap-4 max-sm:whitespace-normal max-sm:py-1";
74
74
  readonly block: "max-sm:block max-sm:min-w-0 max-sm:whitespace-normal max-sm:py-1";
75
- readonly label: "hidden shrink-0 text-xs font-medium uppercase tracking-wide text-slate-500 max-sm:block";
75
+ readonly label: "hidden shrink-0 text-sm font-medium uppercase tracking-wide text-slate-500 max-sm:block";
76
76
  readonly value: "min-w-0 max-sm:text-right";
77
77
  };
78
78
  /** The ARIA role a stacking table puts on a part, since a part drawn as a block can lose its table role in some browsers. */
package/dist/tableRow.js CHANGED
@@ -52,7 +52,7 @@ export const STACK = {
52
52
  row: "max-sm:block max-sm:py-2",
53
53
  cell: "max-sm:flex max-sm:min-w-0 max-sm:items-baseline max-sm:justify-between max-sm:gap-4 max-sm:whitespace-normal max-sm:py-1",
54
54
  block: "max-sm:block max-sm:min-w-0 max-sm:whitespace-normal max-sm:py-1",
55
- label: "hidden shrink-0 text-xs font-medium uppercase tracking-wide text-slate-500 max-sm:block",
55
+ label: "hidden shrink-0 text-sm font-medium uppercase tracking-wide text-slate-500 max-sm:block",
56
56
  value: "min-w-0 max-sm:text-right",
57
57
  };
58
58
  /** The ARIA role a stacking table puts on a part, since a part drawn as a block can lose its table role in some browsers. */
@@ -155,7 +155,7 @@ export declare function SubsectionHeading<E extends ElementType = "h3">({ size,
155
155
  lines?: TextLines | undefined;
156
156
  }): ReactElement;
157
157
  /**
158
- * Small all-caps label above a group. `span`, text-xs semibold uppercase, tertiary. `tone`,
158
+ * Small all-caps label above a group. `span`, text-sm semibold uppercase, tertiary. `tone`,
159
159
  * `numeric`, `mono` and `align` are opt-in, as on `Text`.
160
160
  */
161
161
  export declare const Overline: {
@@ -203,8 +203,8 @@ export declare function HeaderText({ children }: {
203
203
  children: ReactNode;
204
204
  }): ReactElement;
205
205
  /**
206
- * Fine print / metadata. A paragraph (`p`; `as="span"` inline), text-sm/5 normal, tertiary
207
- * (text-xs/4 under an `AppShell density="compact"`). Takes `tone`,
206
+ * Fine print / metadata. A paragraph (`p`; `as="span"` inline), text-sm/5 normal, tertiary, at
207
+ * both type steps: text is never under 14px. Takes `tone`,
208
208
  * `numeric`, `mono`, `lines` and `align` like `Text`, and `italic` for a muted hint and `breakWords`
209
209
  * for a long unbroken string such as a URL.
210
210
  */
@@ -185,9 +185,9 @@ export function SubsectionHeading({ size = "md", ...props }) {
185
185
  return pinned("h3", cx(useScale(SUBSECTION_SIZE[size]), balanced), "default", props);
186
186
  }
187
187
  // --- Inline roles -------------------------------------------------------------
188
- const OVERLINE = "text-xs font-semibold uppercase tracking-wide";
188
+ const OVERLINE = "text-sm font-semibold uppercase tracking-wide";
189
189
  /**
190
- * Small all-caps label above a group. `span`, text-xs semibold uppercase, tertiary. `tone`,
190
+ * Small all-caps label above a group. `span`, text-sm semibold uppercase, tertiary. `tone`,
191
191
  * `numeric`, `mono` and `align` are opt-in, as on `Text`.
192
192
  */
193
193
  export const Overline = inlineRole("Overline", "span", OVERLINE, "tertiary");
@@ -230,12 +230,11 @@ function textVariant(strong, preserveNewlines, measure, size) {
230
230
  return cx(preserveNewlines && "whitespace-pre-line", measure && cx("max-w-[72ch]", pretty), size, strong ? "font-medium" : "font-normal");
231
231
  }
232
232
  /**
233
- * Fine print / metadata. A paragraph (`p`; `as="span"` inline), text-sm/5 normal, tertiary
234
- * (text-xs/4 under an `AppShell density="compact"`). Takes `tone`,
233
+ * Fine print / metadata. A paragraph (`p`; `as="span"` inline), text-sm/5 normal, tertiary, at
234
+ * both type steps: text is never under 14px. Takes `tone`,
235
235
  * `numeric`, `mono`, `lines` and `align` like `Text`, and `italic` for a muted hint and `breakWords`
236
236
  * for a long unbroken string such as a URL.
237
237
  */
238
238
  export function Caption({ italic, breakWords, ...props }) {
239
- const size = useTypeStep() === "compact" ? "text-xs/4" : "text-sm/5";
240
- return pinned("p", cx(size, "font-normal", italic && "italic", breakWords && "break-words"), "tertiary", props);
239
+ return pinned("p", cx("text-sm/5", "font-normal", italic && "italic", breakWords && "break-words"), "tertiary", props);
241
240
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slashsuite/ui-react",
3
- "version": "0.15.2",
3
+ "version": "0.16.1",
4
4
  "description": "UISlash React components: primitives, typography roles and a safe Markdown renderer, written against Tailwind v4 utilities. Pair with a theme from @slashsuite/themes.",
5
5
  "keywords": [
6
6
  "components",