@jonmilner/ui 0.11.8 → 0.11.9

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.
@@ -1,2 +1,2 @@
1
1
  @layer tokens, reset, atoms.base, atoms.sm, atoms.med, atoms.lg, atoms.xl, components.box, components.checkbox, components.clickable, components.icon, components.icon-button, components.inline, components.stack, components.text, components.avatar, components.badge, components.button, components.chip, components.field, components.color-field, components.heading, components.dialog, components.alert-dialog, components.menu, components.multiselect, components.radio-group, components.search-field, components.select, components.switch, components.tabs, components.tag, components.text-field, components.textarea, components.toast, components.visually-hidden, components.table;
2
- @layer components.table{.pbjodu0{border-collapse:collapse}.pbjodu1{table-layout:auto}.pbjodu2{table-layout:fixed}.pbjodu4{border-block-end:var(--space-1) solid var(--color-border);vertical-align:middle}.pbjodu5{caption-side:top}.pbjodu6{visibility:hidden}@media (hover:hover){:where(tbody)>.pbjodu3:hover{background-image:linear-gradient(color-mix(in srgb, var(--color-fg) 5%, transparent), color-mix(in srgb, var(--color-fg) 5%, transparent))}}@media (forced-colors:active){:where(tbody)>.pbjodu3:hover{background-image:none}}}
2
+ @layer components.table{.pbjodu0{border-collapse:collapse}.pbjodu1{table-layout:auto}.pbjodu2{table-layout:fixed}.pbjodu4{border-block-end:var(--space-1) solid var(--color-border);vertical-align:middle}.pbjodu5{caption-side:top}.pbjodu6{visibility:hidden}.pbjodu7{padding-block-end:var(--space-8)}.pbjodu7:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:calc(-1 * var(--space-2))}.pbjodu8{block-size:var(--space-8);padding:var(--space-2)}.pbjodu9{border-radius:var(--radius-full);background-color:var(--color-border-strong);forced-color-adjust:none;block-size:100%}@media (hover:hover){:where(tbody)>.pbjodu3:hover{background-image:linear-gradient(color-mix(in srgb, var(--color-fg) 5%, transparent), color-mix(in srgb, var(--color-fg) 5%, transparent))}}@media (forced-colors:active){:where(tbody)>.pbjodu3:hover{background-image:none}}}
@@ -12,5 +12,5 @@ var t = e({
12
12
  } },
13
13
  defaultVariants: {},
14
14
  compoundVariants: []
15
- }), n = "pbjodu3", r = "pbjodu4", i = "pbjodu5", a = "pbjodu6";
16
- export { i as caption, r as cell, n as row, t as table, a as unsortedArrow };
15
+ }), n = "pbjodu3", r = "pbjodu4", i = "pbjodu5", a = "pbjodu6", o = "pbjodu7", s = "pbjodu8", c = "pbjodu9";
16
+ export { i as caption, r as cell, n as row, c as scrollThumb, o as scrollViewport, s as scrollbar, t as table, a as unsortedArrow };
@@ -1,5 +1,6 @@
1
1
  import { OmitEach } from "../types.mjs";
2
2
  import { StyleProps } from "../Box/base.mjs";
3
+ import { PartProps } from "../styles/part-props.mjs";
3
4
  import { Tone } from "../styles/subtle-fills.mjs";
4
5
  import { TextOwnProps } from "../Text/index.mjs";
5
6
  import { ComponentPropsWithRef, ReactElement } from "react";
@@ -31,6 +32,13 @@ export type TableRowProps = Element<"tr", {
31
32
  }>;
32
33
  export type TableColumnGroupProps = Element<"colgroup">;
33
34
  export type TableColumnProps = Element<"col">;
35
+ export type TableScrollAreaProps = Omit<PartProps<Omit<ComponentPropsWithRef<"section">, "aria-label" | "aria-labelledby">>, "blockSize" | "minBlockSize" | "maxBlockSize"> & ({
36
+ "aria-label": string;
37
+ "aria-labelledby"?: never;
38
+ } | {
39
+ "aria-label"?: never;
40
+ "aria-labelledby": string;
41
+ });
34
42
  type CellText = Omit<TextOwnProps, "tabularNums" | "truncate">;
35
43
  type Numeric = {
36
44
  numeric?: boolean;
@@ -60,6 +68,7 @@ declare function TableColumnGroup(props: TableColumnGroupProps): import("react")
60
68
  declare function TableColumn(props: TableColumnProps): import("react").JSX.Element;
61
69
  declare function TableCell({ numeric, size, display, paddingBlock, paddingInline, textAlign, className, ...props }: TableCellProps): import("react").JSX.Element;
62
70
  declare function TableHeaderCell({ scope, numeric, hideLabel, sort, onSort, size, weight, color, display, paddingBlock, paddingInline, textAlign, className, children, ...props }: TableHeaderCellProps): import("react").JSX.Element;
71
+ declare function TableScrollArea({ children, className, ref, style, ...props }: TableScrollAreaProps): import("react").JSX.Element;
63
72
  export declare const Table: typeof TableRoot & {
64
73
  Head: typeof TableHead;
65
74
  Body: typeof TableBody;
@@ -69,5 +78,6 @@ export declare const Table: typeof TableRoot & {
69
78
  Cell: typeof TableCell;
70
79
  ColumnGroup: typeof TableColumnGroup;
71
80
  Column: typeof TableColumn;
81
+ ScrollArea: typeof TableScrollArea;
72
82
  };
73
83
  export {};
@@ -1,81 +1,83 @@
1
1
  import { join as e } from "../styles/join.mjs";
2
- import { Box as t } from "../Box/base.mjs";
3
- import { Clickable as n } from "../Clickable/index.mjs";
4
- import { Text as r } from "../Text/index.mjs";
5
- import { subtleFills as i } from "../styles/subtle-fills.mjs";
6
- import { ArrowDownIcon as a } from "../icons/ArrowDownIcon.mjs";
7
- import { ArrowUpIcon as o } from "../icons/ArrowUpIcon.mjs";
8
- import { VisuallyHidden as s } from "../VisuallyHidden/index.mjs";
9
- import { caption as c, cell as l, row as u, table as d, unsortedArrow as f } from "./Table.css.mjs";
10
- import { jsx as p, jsxs as m } from "react/jsx-runtime";
2
+ import { splitStyleProps as t } from "../styles/split-style-props.mjs";
3
+ import { Box as n } from "../Box/base.mjs";
4
+ import { Clickable as r } from "../Clickable/index.mjs";
5
+ import { Text as i } from "../Text/index.mjs";
6
+ import { subtleFills as a } from "../styles/subtle-fills.mjs";
7
+ import { ArrowDownIcon as o } from "../icons/ArrowDownIcon.mjs";
8
+ import { ArrowUpIcon as s } from "../icons/ArrowUpIcon.mjs";
9
+ import { VisuallyHidden as c } from "../VisuallyHidden/index.mjs";
10
+ import { caption as l, cell as u, row as d, scrollThumb as f, scrollViewport as p, scrollbar as m, table as h, unsortedArrow as g } from "./Table.css.mjs";
11
+ import { jsx as _, jsxs as v } from "react/jsx-runtime";
12
+ import { ScrollArea as y } from "@base-ui/react/scroll-area";
11
13
  // src/Table/index.tsx
12
- function h({ caption: n, hideCaption: i = !1, layout: a = "auto", inlineSize: o = "full", className: l, children: u, ...f }) {
13
- return /* @__PURE__ */ m(t, {
14
- ...f,
14
+ function b({ caption: t, hideCaption: r = !1, layout: a = "auto", inlineSize: o = "full", className: s, children: u, ...d }) {
15
+ return /* @__PURE__ */ v(n, {
16
+ ...d,
15
17
  as: "table",
16
- className: e(d({ layout: a }), l),
18
+ className: e(h({ layout: a }), s),
17
19
  inlineSize: o,
18
- children: [n === void 0 ? null : i ? /* @__PURE__ */ p(s, {
20
+ children: [t === void 0 ? null : r ? /* @__PURE__ */ _(c, {
19
21
  as: "caption",
20
- children: n
21
- }) : /* @__PURE__ */ p(r, {
22
+ children: t
23
+ }) : /* @__PURE__ */ _(i, {
22
24
  as: "caption",
23
- className: c,
25
+ className: l,
24
26
  display: null,
25
27
  paddingBlockEnd: "12",
26
28
  size: "sm",
27
29
  textAlign: "start",
28
30
  weight: "semibold",
29
- children: n
31
+ children: t
30
32
  }), u]
31
33
  });
32
34
  }
33
- function g(e) {
34
- return /* @__PURE__ */ p(t, {
35
+ function x(e) {
36
+ return /* @__PURE__ */ _(n, {
35
37
  ...e,
36
38
  as: "thead"
37
39
  });
38
40
  }
39
- function _(e) {
40
- return /* @__PURE__ */ p(t, {
41
+ function S(e) {
42
+ return /* @__PURE__ */ _(n, {
41
43
  ...e,
42
44
  as: "tbody"
43
45
  });
44
46
  }
45
- function v(e) {
46
- return /* @__PURE__ */ p(t, {
47
+ function C(e) {
48
+ return /* @__PURE__ */ _(n, {
47
49
  ...e,
48
50
  as: "tfoot"
49
51
  });
50
52
  }
51
- function y({ tone: n, "aria-busy": r, backgroundColor: a = n && i[n].backgroundColor, color: o = n ? i[n].color : r === !0 || r === "true" ? "fgMuted" : void 0, className: s, ...c }) {
52
- return /* @__PURE__ */ p(t, {
53
+ function w({ tone: t, "aria-busy": r, backgroundColor: i = t && a[t].backgroundColor, color: o = t ? a[t].color : r === !0 || r === "true" ? "fgMuted" : void 0, className: s, ...c }) {
54
+ return /* @__PURE__ */ _(n, {
53
55
  ...c,
54
56
  "aria-busy": r,
55
57
  as: "tr",
56
- backgroundColor: a,
57
- className: e(u, s),
58
+ backgroundColor: i,
59
+ className: e(d, s),
58
60
  color: o
59
61
  });
60
62
  }
61
- function b(e) {
62
- return /* @__PURE__ */ p(t, {
63
+ function T(e) {
64
+ return /* @__PURE__ */ _(n, {
63
65
  ...e,
64
66
  as: "colgroup"
65
67
  });
66
68
  }
67
- function x(e) {
68
- return /* @__PURE__ */ p(t, {
69
+ function E(e) {
70
+ return /* @__PURE__ */ _(n, {
69
71
  ...e,
70
72
  as: "col"
71
73
  });
72
74
  }
73
- function S({ numeric: t = !1, size: n = "sm", display: i = null, paddingBlock: a = "8", paddingInline: o = "12", textAlign: s = t ? "end" : void 0, className: c, ...u }) {
74
- return /* @__PURE__ */ p(r, {
75
- ...u,
75
+ function D({ numeric: t = !1, size: n = "sm", display: r = null, paddingBlock: a = "8", paddingInline: o = "12", textAlign: s = t ? "end" : void 0, className: c, ...l }) {
76
+ return /* @__PURE__ */ _(i, {
77
+ ...l,
76
78
  as: "td",
77
- className: e(l, c),
78
- display: i,
79
+ className: e(u, c),
80
+ display: r,
79
81
  paddingBlock: a,
80
82
  paddingInline: o,
81
83
  size: n,
@@ -83,40 +85,61 @@ function S({ numeric: t = !1, size: n = "sm", display: i = null, paddingBlock: a
83
85
  textAlign: s
84
86
  });
85
87
  }
86
- function C({ scope: t = "col", numeric: i = !1, hideLabel: c = !1, sort: u, onSort: d, size: h = t === "row" || t === "rowgroup" ? "sm" : "xs", weight: g = "semibold", color: _ = t === "row" || t === "rowgroup" ? void 0 : u === "ascending" || u === "descending" ? "fg" : "fgMuted", display: v = null, paddingBlock: y = "8", paddingInline: b = "12", textAlign: x = i ? "end" : "start", className: S, children: C, ...w }) {
87
- let T = u === "ascending" || u === "descending";
88
- return /* @__PURE__ */ p(r, {
88
+ function O({ scope: t = "col", numeric: n = !1, hideLabel: a = !1, sort: l, onSort: d, size: f = t === "row" || t === "rowgroup" ? "sm" : "xs", weight: p = "semibold", color: m = t === "row" || t === "rowgroup" ? void 0 : l === "ascending" || l === "descending" ? "fg" : "fgMuted", display: h = null, paddingBlock: y = "8", paddingInline: b = "12", textAlign: x = n ? "end" : "start", className: S, children: C, ...w }) {
89
+ let T = l === "ascending" || l === "descending";
90
+ return /* @__PURE__ */ _(i, {
89
91
  ...w,
90
- "aria-sort": u === void 0 ? w["aria-sort"] : T ? u : void 0,
92
+ "aria-sort": l === void 0 ? w["aria-sort"] : T ? l : void 0,
91
93
  as: "th",
92
- className: e(l, S),
93
- color: _,
94
- display: v,
94
+ className: e(u, S),
95
+ color: m,
96
+ display: h,
95
97
  paddingBlock: y,
96
98
  paddingInline: b,
97
99
  scope: t,
98
- size: h,
99
- tabularNums: i,
100
+ size: f,
101
+ tabularNums: n,
100
102
  textAlign: x,
101
- weight: g,
102
- children: u === void 0 ? c ? /* @__PURE__ */ p(s, { children: C }) : C : /* @__PURE__ */ m(n, {
103
+ weight: p,
104
+ children: l === void 0 ? a ? /* @__PURE__ */ _(c, { children: C }) : C : /* @__PURE__ */ v(r, {
103
105
  gap: "4",
104
106
  onClick: d,
105
- children: [C, u === "descending" ? /* @__PURE__ */ p(a, { size: h }) : /* @__PURE__ */ p(o, {
106
- className: T ? void 0 : f,
107
- size: h
107
+ children: [C, l === "descending" ? /* @__PURE__ */ _(o, { size: f }) : /* @__PURE__ */ _(s, {
108
+ className: T ? void 0 : g,
109
+ size: f
108
110
  })]
109
111
  })
110
112
  });
111
113
  }
112
- var w = Object.assign(h, {
113
- Head: g,
114
- Body: _,
115
- Foot: v,
116
- Row: y,
117
- HeaderCell: C,
118
- Cell: S,
119
- ColumnGroup: b,
120
- Column: x
114
+ function k({ children: e, className: r, ref: i, style: a, ...o }) {
115
+ let [s, c] = t(o);
116
+ return /* @__PURE__ */ v(y.Root, {
117
+ render: /* @__PURE__ */ _(n, {
118
+ ...s,
119
+ className: r,
120
+ style: a
121
+ }),
122
+ children: [/* @__PURE__ */ _(y.Viewport, {
123
+ ...c,
124
+ className: p,
125
+ render: /* @__PURE__ */ _("section", { ref: i }),
126
+ children: /* @__PURE__ */ _(y.Content, { children: e })
127
+ }), /* @__PURE__ */ _(y.Scrollbar, {
128
+ className: m,
129
+ orientation: "horizontal",
130
+ children: /* @__PURE__ */ _(y.Thumb, { className: f })
131
+ })]
132
+ });
133
+ }
134
+ var A = Object.assign(b, {
135
+ Head: x,
136
+ Body: S,
137
+ Foot: C,
138
+ Row: w,
139
+ HeaderCell: O,
140
+ Cell: D,
141
+ ColumnGroup: T,
142
+ Column: E,
143
+ ScrollArea: k
121
144
  });
122
- export { w as Table };
145
+ export { A as Table };
@@ -2,13 +2,14 @@
2
2
 
3
3
  ## Purpose
4
4
 
5
- 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`). 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.
5
+ 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.
6
6
 
7
7
  ## When to use
8
8
 
9
9
  - A list of records with the same fields, where a reader compares one row against another: amounts, dates, statuses.
10
10
  - Figures that should line up down a column: set `numeric` on the column's cells.
11
11
  - Columns a reader sorts: set `sort` and `onSort` on their headers.
12
+ - A table that may be wider than its container (many columns, paths, a dialog on a phone): wrap it in `Table.ScrollArea`, so it scrolls sideways inside itself and the page never does.
12
13
 
13
14
  ## When not to use
14
15
 
@@ -18,7 +19,7 @@ Records in rows that share named columns, so a reader can scan and compare them:
18
19
  - No rows: render the app's empty message in place of the table, not a table with an empty body.
19
20
  - A phone layout of one card per row: that is the app's layout; Table stays a table.
20
21
  - After a row is removed, focus is the app's to move (to the next row's control, or a heading); Table does not restore it.
21
- - A sticky header, edge shadows, virtualisation or column resizing: not supported.
22
+ - A sticky header, edge shadows, vertical scrolling in `Table.ScrollArea`, virtualisation or column resizing: not supported.
22
23
  - Sorting the rows themselves, or by several columns at once: the app sorts its data; a header only shows the order and reports the press.
23
24
 
24
25
  ## Rules
@@ -34,6 +35,7 @@ Records in rows that share named columns, so a reader can scan and compare them:
34
35
  - The table is `inlineSize="full"` by default. Cells have `8` block and `12` inline padding as default style props, and a `border` rule below each. Every part takes `className`, `style`, `ref` and the style props; the consumer's win.
35
36
  - `sort` (`"ascending"`, `"descending"` or `"none"`) and `onSort` on a `HeaderCell` make its column sortable: its label goes in a button, with an up or down arrow after it for the current order (an unsorted column keeps the arrow's room, unseen), and the sorted column's label turns `fg`. Pressing it calls `onSort`; the app re-sorts its rows and passes the new `sort`, and picks the press order (a new column ascending, the same one flipped). Pass `"none"` on each sortable column that is not the sorted one. `sort` and `onSort` go together, and `hideLabel` cannot join them: the label is the button's name.
36
37
  - `sort` sets `aria-sort` on the header, only while the column is ascending or descending. A header sorted some other way (a link, the server) passes `aria-sort` itself and leaves `sort` unset.
38
+ - `Table.ScrollArea` wraps one `Table` that may outgrow its container, and scrolls it sideways inside a `section`. Its type requires a name, the table's again (`aria-label` or `aria-labelledby`), since a focusable region is announced on its own. It is in the tab order only while the table overflows, and keeps `8` of room below the table for its scroll thumb, so nothing moves when the thumb shows. Style props, `className` and `style` go on its root; its other props, `ref` included, on the `section`. It takes no block size: it scrolls sideways only.
37
39
  - No part has hooks, so a server component can render the whole table. `onSort` is a function, so a sortable table renders from a client component.
38
40
 
39
41
  ## Do
@@ -112,6 +114,13 @@ const header = (key: "payee" | "amount") => ({
112
114
  </Table>;
113
115
  ```
114
116
 
117
+ ```tsx
118
+ // Wider than a phone: it scrolls inside the region, named like the table.
119
+ <Table.ScrollArea aria-labelledby="sessions-heading">
120
+ <Table aria-labelledby="sessions-heading">…</Table>
121
+ </Table.ScrollArea>
122
+ ```
123
+
115
124
  ## Don't
116
125
 
117
126
  ```tsx
@@ -134,6 +143,13 @@ const header = (key: "payee" | "amount") => ({
134
143
  </Table.HeaderCell>
135
144
  ```
136
145
 
146
+ ```tsx
147
+ // A scroll wrapper of its own: no keyboard user can scroll it, and axe fails it.
148
+ <Box overflow="auto">
149
+ <Table caption="Sessions">…</Table>
150
+ </Box>
151
+ ```
152
+
137
153
  ```tsx
138
154
  // An empty body: say there is nothing, instead.
139
155
  <Table caption="Invoices">
@@ -146,6 +162,7 @@ const header = (key: "payee" | "amount") => ({
146
162
  - Native table semantics: rows, column and row headers are announced, and screen readers' table navigation works. Column headers are `scope="col"`; set `scope="row"` on a row's first cell when it names the row.
147
163
  - A `caption`, `aria-label` or `aria-labelledby` names the table (WCAG 1.3.1).
148
164
  - A sortable header is a native `button` named by its label, in the tab order, pressed with Enter, Space or a click; its arrow is hidden from assistive tech, and the `th`'s `aria-sort` announces the order (WAI-ARIA sortable table pattern).
165
+ - `Table.ScrollArea` scrolls a wide table inside itself, so the page does not scroll sideways at 320 CSS px (WCAG 1.4.10). While the table overflows, Base UI puts the region in the tab order and the arrow keys scroll it (WCAG 2.1.1, axe `scrollable-region-focusable`); it shows the focus ring just inside its edge, so a dialog body or the page edge never clips it, and is announced by its name as a region. Before the page hydrates it scrolls by touch, trackpad or mouse only. Its scroll thumb is hidden from assistive tech.
149
166
  - Controls in cells are in the tab order, in reading order. Give each a name that says its row ("Select Ada Lovelace", "Actions for City Water").
150
167
  - A pending row's `aria-busy` tells assistive tech it is changing; a toned row's meaning is in its text (WCAG 1.4.1).
151
168
  - The text on each tone fill, and on the hover tint over each surface and fill (colored text roles over `bg` and `bgRaised` only), is checked for 4.5:1 in `contrast/mixes.ts`.
@@ -232,3 +249,12 @@ Also accepts the style props (see `manifest.json` `styleProps`).
232
249
  | `tone` | `"accent" \| "danger" \| "done" \| "neutral" \| "success" \| "warning"` | no | |
233
250
 
234
251
  Also accepts the style props (see `manifest.json` `styleProps`).
252
+
253
+ ### Table.ScrollArea
254
+
255
+ | Prop | Type | Required | Description |
256
+ | --- | --- | --- | --- |
257
+ | `aria-label` | `string` | no | |
258
+ | `aria-labelledby` | `string` | no | |
259
+
260
+ Also accepts the style props (see `manifest.json` `styleProps`).
@@ -33,7 +33,7 @@
33
33
  - [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).
34
34
  - [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.
35
35
  - [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.
36
- - [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`). 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.
36
+ - [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.
37
37
  - [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).
38
38
  - [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 `lg` radius (half a one-line tag's height, so one line reads as a pill and wrapped lines stay inside the fill) around a `Text` in the `label` font. It can be read-only, a link, or removable.
39
39
  - [Text](Text.md): The base of all visible text, and the primitive every text component builds on. Capsize trims the box to the cap height and the baseline, so the gap around text is the visible space. It takes every Box style prop (`color`, `textAlign`, margins), plus `size`, `font`, `weight`, `leading`, `truncate` and `wrap`.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "./manifest.schema.json",
3
3
  "package": "@jonmilner/ui",
4
- "version": "0.11.8",
4
+ "version": "0.11.9",
5
5
  "components": [
6
6
  {
7
7
  "name": "AlertDialog",
@@ -2337,6 +2337,22 @@
2337
2337
  ]
2338
2338
  }
2339
2339
  ]
2340
+ },
2341
+ {
2342
+ "name": "Table.ScrollArea",
2343
+ "styleProps": true,
2344
+ "props": [
2345
+ {
2346
+ "name": "aria-label",
2347
+ "type": "string",
2348
+ "required": false
2349
+ },
2350
+ {
2351
+ "name": "aria-labelledby",
2352
+ "type": "string",
2353
+ "required": false
2354
+ }
2355
+ ]
2340
2356
  }
2341
2357
  ],
2342
2358
  "exports": []
package/dist/index.d.mts CHANGED
@@ -26,7 +26,7 @@ import { RadioGroup, RadioGroupOption, RadioGroupProps } from "./RadioGroup/inde
26
26
  import { Select, SelectOption, SelectProps } from "./Select/index.mjs";
27
27
  import { Stack, StackProps } from "./Stack/index.mjs";
28
28
  import { Switch, SwitchProps } from "./Switch/index.mjs";
29
- import { Table, TableBodyProps, TableCellProps, TableColumnGroupProps, TableColumnProps, TableFootProps, TableHeadProps, TableHeaderCellProps, TableProps, TableRowProps, TableSortDirection } from "./Table/index.mjs";
29
+ import { Table, TableBodyProps, TableCellProps, TableColumnGroupProps, TableColumnProps, TableFootProps, TableHeadProps, TableHeaderCellProps, TableProps, TableRowProps, TableScrollAreaProps, TableSortDirection } from "./Table/index.mjs";
30
30
  import { Tabs, TabsListProps, TabsPanelProps, TabsProps, TabsTabProps } from "./Tabs/index.mjs";
31
31
  import { Tag, TagProps } from "./Tag/index.mjs";
32
32
  import { TextField, TextFieldInputProps, TextFieldProps } from "./TextField/index.mjs";
@@ -36,4 +36,4 @@ import { Toast } from "./Toast/index.mjs";
36
36
  import { VisuallyHidden, VisuallyHiddenProps } from "./VisuallyHidden/index.mjs";
37
37
  import { Theme, defineTheme } from "./theme/define-theme.mjs";
38
38
  import { ThemeProvider, ThemeProviderProps } from "./theme/ThemeProvider.mjs";
39
- export { AlertDialog, type AlertDialogProps, type AlertDialogTriggerProps, Avatar, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Button, type ButtonProps, Checkbox, type CheckboxProps, Chip, ChipGroup, type ChipGroupProps, type ChipProps, Clickable, type ClickableProps, ColorField, type ColorFieldInputProps, type ColorFieldProps, Dialog, type DialogActionsProps, type DialogBodyProps, type DialogCloseProps, type DialogPopupProps, type DialogProps, type DialogTriggerProps, Field, type FieldDescriptionProps, type FieldErrorProps, type FieldLabelProps, type FieldProps, Heading, type HeadingLevel, type HeadingProps, type HeadingSize, Icon, IconButton, type IconButtonProps, type IconProps, Inline, type InlineProps, Menu, type MenuGroupProps, type MenuItemProps, type MenuLinkItemProps, type MenuPopupProps, type MenuProps, type MenuSeparatorProps, type MenuTriggerProps, MultiSelect, type MultiSelectOption, type MultiSelectProps, RadioGroup, type RadioGroupOption, type RadioGroupProps, SearchField, type SearchFieldInputProps, type SearchFieldProps, Select, type SelectOption, type SelectProps, Stack, type StackProps, type StyleProps, Switch, type SwitchProps, Table, type TableBodyProps, type TableCellProps, type TableColumnGroupProps, type TableColumnProps, type TableFootProps, type TableHeadProps, type TableHeaderCellProps, type TableProps, type TableRowProps, type TableSortDirection, Tabs, type TabsListProps, type TabsPanelProps, type TabsProps, type TabsTabProps, Tag, type TagProps, Text, TextField, type TextFieldInputProps, type TextFieldProps, type TextProps, Textarea, type TextareaInputProps, type TextareaProps, type Theme, ThemeProvider, type ThemeProviderProps, Toast, type ToastOptions, type ToastProviderProps, type ToastVariant, VisuallyHidden, type VisuallyHiddenProps, defineTheme, useToast };
39
+ export { AlertDialog, type AlertDialogProps, type AlertDialogTriggerProps, Avatar, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Button, type ButtonProps, Checkbox, type CheckboxProps, Chip, ChipGroup, type ChipGroupProps, type ChipProps, Clickable, type ClickableProps, ColorField, type ColorFieldInputProps, type ColorFieldProps, Dialog, type DialogActionsProps, type DialogBodyProps, type DialogCloseProps, type DialogPopupProps, type DialogProps, type DialogTriggerProps, Field, type FieldDescriptionProps, type FieldErrorProps, type FieldLabelProps, type FieldProps, Heading, type HeadingLevel, type HeadingProps, type HeadingSize, Icon, IconButton, type IconButtonProps, type IconProps, Inline, type InlineProps, Menu, type MenuGroupProps, type MenuItemProps, type MenuLinkItemProps, type MenuPopupProps, type MenuProps, type MenuSeparatorProps, type MenuTriggerProps, MultiSelect, type MultiSelectOption, type MultiSelectProps, RadioGroup, type RadioGroupOption, type RadioGroupProps, SearchField, type SearchFieldInputProps, type SearchFieldProps, Select, type SelectOption, type SelectProps, Stack, type StackProps, type StyleProps, Switch, type SwitchProps, Table, type TableBodyProps, type TableCellProps, type TableColumnGroupProps, type TableColumnProps, type TableFootProps, type TableHeadProps, type TableHeaderCellProps, type TableProps, type TableRowProps, type TableScrollAreaProps, type TableSortDirection, Tabs, type TabsListProps, type TabsPanelProps, type TabsProps, type TabsTabProps, Tag, type TagProps, Text, TextField, type TextFieldInputProps, type TextFieldProps, type TextProps, Textarea, type TextareaInputProps, type TextareaProps, type Theme, ThemeProvider, type ThemeProviderProps, Toast, type ToastOptions, type ToastProviderProps, type ToastVariant, VisuallyHidden, type VisuallyHiddenProps, defineTheme, useToast };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jonmilner/ui",
3
- "version": "0.11.8",
3
+ "version": "0.11.9",
4
4
  "files": [
5
5
  "dist",
6
6
  "THIRD_PARTY_NOTICES.md"