@jirawatpyk/aura-react 5.10.1 → 5.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -186,6 +186,16 @@ DataTable with sort and page in the URL (4.17): `onStateChange={({ sort, page })
186
186
  - **Time zone**: `timeZone` on AuraProvider, DatePicker, DateRangePicker and Calendar decides "today" (the marker, `min`/`max="today"`, the first month shown); or pass `today` as an ISO date. `todayIn('Asia/Bangkok')` is exported from the root and `/server`.
187
187
  - **Toasts** queue past three instead of dropping: six in a row all show, in order, three at a time.
188
188
 
189
+ ## 5.11 — Chamber-OS addendum 11 (member directory)
190
+
191
+ - **DataTable `rowSelectLabel`** (item 75): names each row's checkbox after the row instead of its key — `rowSelectLabel={(r) => 'Select ' + r.company}` — in the grid and in cards. Without it (or when it returns an empty string) the name stays "Select {key}".
192
+ - **Checkbox `aria-describedby`** (item 76): a passed id is kept and the description's own id added after it (`aria-describedby="hint"` + `description` → `"hint {id}-desc"`); with neither there is no attribute. Before, a passed `aria-describedby` was always dropped, with or without a description.
193
+ - **Selection boxes take 24×24** (item 77): the header and row checkboxes in DataTable still draw 16px, but their invisible input reaches 24×24 (WCAG 2.5.8) in the grid and in cards, so a click just outside the box counts.
194
+ - **DataTable `rowHeight="auto"`** (item 78): rows grow to fit what wraps — two badges, a long name — with every cell vertically centred. A row whose content fits keeps the density's height (a pill, one line of text, a small Button or IconButton); padding appears only around content taller than that. Badges and pills side by side keep apart when they wrap. Rows must all be in the DOM, so it's ignored with `height` (virtualized rows are one fixed height; a dev notice says so) — paginate instead. Cards are unchanged. Default: one fixed line per row, long text ends in an ellipsis.
195
+ ```tsx
196
+ <DataTable rows={members} rowHeight="auto" columns={[…, { key: 'tags', label: 'TAGS', width: 150, render: (r) => r.tags.map((t) => <Badge key={t}>{t}</Badge>) }]} />
197
+ ```
198
+
189
199
  ## 5.10.1 — fixes from a new project
190
200
 
191
201
  - **Switch**: a disabled switch that is on ("always on", enforced by policy) no longer fades into the same grey as an off one. Disabled rows, on or off, now look alike and stay readable: the label turns `aura-fg-secondary`, the description (often the reason it's locked) keeps its colour, the row shows a not-allowed cursor, and only the switch fades — off to the disabled opacity, on to 0.75, at least 3:1 apart in both themes. In forced colours a locked switch is `GrayText`. Use it instead of a Badge for settings people can see but not change.
@@ -1524,7 +1524,7 @@ window.Aura = (() => {
1524
1524
  checked: on,
1525
1525
  tabIndex: props.tabIndex,
1526
1526
  disabled: props.disabled,
1527
- "aria-describedby": descId,
1527
+ "aria-describedby": cx(props["aria-describedby"], descId) || void 0,
1528
1528
  "aria-label": labelled ? void 0 : props.label,
1529
1529
  onChange: function(e) {
1530
1530
  st[1](e.target.checked);
@@ -4996,6 +4996,12 @@ window.Aura = (() => {
4996
4996
  return rowHref ? /* @__PURE__ */ React30.createElement(Link, { href: rowHref(r), className: "aura-table__row-link" }, content) : content;
4997
4997
  }
4998
4998
  const height = props.height || 0;
4999
+ const autoRows = props.rowHeight === "auto" && !height;
5000
+ if (props.rowHeight === "auto" && height)
5001
+ devWarnOnce(
5002
+ "table-row-height-auto",
5003
+ 'DataTable `rowHeight="auto"` is ignored with `height`: virtualized rows are one fixed height. Drop `height` (and paginate) to let rows grow.'
5004
+ );
4999
5005
  const virtual = !!height && !loading && pageRows.length > 0 && !stacked;
5000
5006
  const stickyTotal = !!(props.footer && props.stickyFooter && rows.length && !loading);
5001
5007
  const bodyH = Math.max(ROW_H, height - ROW_H - (stickyTotal ? ROW_H : 0));
@@ -5520,6 +5526,7 @@ window.Aura = (() => {
5520
5526
  }
5521
5527
  function rowCells(r, i, k, isSel) {
5522
5528
  const ri = i + 1;
5529
+ const selLabel = selectable && canSelect(r) ? props.rowSelectLabel && props.rowSelectLabel(r) || t.selectRow(k) : void 0;
5523
5530
  const cells = [/* @__PURE__ */ React30.createElement("span", { key: "__gl", className: "aura-table__gutter", "aria-hidden": true })];
5524
5531
  if (selectable)
5525
5532
  cells.push(
@@ -5532,7 +5539,7 @@ window.Aura = (() => {
5532
5539
  className: cx("aura-table__sel", nPinned && "is-pinned"),
5533
5540
  tabIndex: tabFor(ri, 0),
5534
5541
  "data-rc": ri + ":0",
5535
- "aria-label": canSelect(r) ? t.selectRow(k) : props.rowSelectDisabledLabel ? props.rowSelectDisabledLabel(r) : void 0,
5542
+ "aria-label": canSelect(r) ? selLabel : props.rowSelectDisabledLabel ? props.rowSelectDisabledLabel(r) : void 0,
5536
5543
  onFocus: function(e) {
5537
5544
  if (e.target === e.currentTarget) activeState[1]({ r: ri, c: 0 });
5538
5545
  }
@@ -5543,7 +5550,7 @@ window.Aura = (() => {
5543
5550
  hideLabel: true,
5544
5551
  checked: isSel,
5545
5552
  tabIndex: -1,
5546
- label: t.selectRow(k),
5553
+ label: selLabel,
5547
5554
  onChange: function(on) {
5548
5555
  toggle(k, on);
5549
5556
  }
@@ -5564,6 +5571,7 @@ window.Aura = (() => {
5564
5571
  "data-rc": ri + ":" + ci,
5565
5572
  className: cx(
5566
5573
  "aura-table__td",
5574
+ autoRows && "aura-table__td--auto",
5567
5575
  c.mono && "aura-table__mono",
5568
5576
  c.align === "end" && "is-end",
5569
5577
  pin && "is-pinned",
@@ -5575,7 +5583,7 @@ window.Aura = (() => {
5575
5583
  if (activeState[0].r !== ri || activeState[0].c !== ci) activeState[1]({ r: ri, c: ci });
5576
5584
  }
5577
5585
  },
5578
- j === 0 ? rowLinkWrap(r, cellContent(c, r)) : cellContent(c, r)
5586
+ autoRows ? /* @__PURE__ */ React30.createElement("span", { className: "aura-table__cell" }, j === 0 ? rowLinkWrap(r, cellContent(c, r)) : cellContent(c, r)) : j === 0 ? rowLinkWrap(r, cellContent(c, r)) : cellContent(c, r)
5579
5587
  )
5580
5588
  );
5581
5589
  });
@@ -5654,6 +5662,7 @@ window.Aura = (() => {
5654
5662
  "aria-selected": selectable && canSelect(r) ? isSel : void 0,
5655
5663
  className: cx(
5656
5664
  "aura-table__row",
5665
+ autoRows && "aura-table__row--auto",
5657
5666
  isSel && "is-selected",
5658
5667
  (props.onRowActivate || rowHref) && "is-actionable"
5659
5668
  ),
@@ -1506,7 +1506,7 @@ var Checkbox = React10.forwardRef(function Checkbox2(props, ref) {
1506
1506
  checked: on,
1507
1507
  tabIndex: props.tabIndex,
1508
1508
  disabled: props.disabled,
1509
- "aria-describedby": descId,
1509
+ "aria-describedby": cx(props["aria-describedby"], descId) || void 0,
1510
1510
  "aria-label": labelled ? void 0 : props.label,
1511
1511
  onChange: function(e) {
1512
1512
  st[1](e.target.checked);
@@ -4978,6 +4978,12 @@ var DataTableImpl = React30.forwardRef(function DataTable(props, ref) {
4978
4978
  return rowHref ? /* @__PURE__ */ React30.createElement(Link, { href: rowHref(r), className: "aura-table__row-link" }, content) : content;
4979
4979
  }
4980
4980
  const height = props.height || 0;
4981
+ const autoRows = props.rowHeight === "auto" && !height;
4982
+ if (props.rowHeight === "auto" && height)
4983
+ devWarnOnce(
4984
+ "table-row-height-auto",
4985
+ 'DataTable `rowHeight="auto"` is ignored with `height`: virtualized rows are one fixed height. Drop `height` (and paginate) to let rows grow.'
4986
+ );
4981
4987
  const virtual = !!height && !loading && pageRows.length > 0 && !stacked;
4982
4988
  const stickyTotal = !!(props.footer && props.stickyFooter && rows.length && !loading);
4983
4989
  const bodyH = Math.max(ROW_H, height - ROW_H - (stickyTotal ? ROW_H : 0));
@@ -5502,6 +5508,7 @@ var DataTableImpl = React30.forwardRef(function DataTable(props, ref) {
5502
5508
  }
5503
5509
  function rowCells(r, i, k, isSel) {
5504
5510
  const ri = i + 1;
5511
+ const selLabel = selectable && canSelect(r) ? props.rowSelectLabel && props.rowSelectLabel(r) || t.selectRow(k) : void 0;
5505
5512
  const cells = [/* @__PURE__ */ React30.createElement("span", { key: "__gl", className: "aura-table__gutter", "aria-hidden": true })];
5506
5513
  if (selectable)
5507
5514
  cells.push(
@@ -5514,7 +5521,7 @@ var DataTableImpl = React30.forwardRef(function DataTable(props, ref) {
5514
5521
  className: cx("aura-table__sel", nPinned && "is-pinned"),
5515
5522
  tabIndex: tabFor(ri, 0),
5516
5523
  "data-rc": ri + ":0",
5517
- "aria-label": canSelect(r) ? t.selectRow(k) : props.rowSelectDisabledLabel ? props.rowSelectDisabledLabel(r) : void 0,
5524
+ "aria-label": canSelect(r) ? selLabel : props.rowSelectDisabledLabel ? props.rowSelectDisabledLabel(r) : void 0,
5518
5525
  onFocus: function(e) {
5519
5526
  if (e.target === e.currentTarget) activeState[1]({ r: ri, c: 0 });
5520
5527
  }
@@ -5525,7 +5532,7 @@ var DataTableImpl = React30.forwardRef(function DataTable(props, ref) {
5525
5532
  hideLabel: true,
5526
5533
  checked: isSel,
5527
5534
  tabIndex: -1,
5528
- label: t.selectRow(k),
5535
+ label: selLabel,
5529
5536
  onChange: function(on) {
5530
5537
  toggle(k, on);
5531
5538
  }
@@ -5546,6 +5553,7 @@ var DataTableImpl = React30.forwardRef(function DataTable(props, ref) {
5546
5553
  "data-rc": ri + ":" + ci,
5547
5554
  className: cx(
5548
5555
  "aura-table__td",
5556
+ autoRows && "aura-table__td--auto",
5549
5557
  c.mono && "aura-table__mono",
5550
5558
  c.align === "end" && "is-end",
5551
5559
  pin && "is-pinned",
@@ -5557,7 +5565,7 @@ var DataTableImpl = React30.forwardRef(function DataTable(props, ref) {
5557
5565
  if (activeState[0].r !== ri || activeState[0].c !== ci) activeState[1]({ r: ri, c: ci });
5558
5566
  }
5559
5567
  },
5560
- j === 0 ? rowLinkWrap(r, cellContent(c, r)) : cellContent(c, r)
5568
+ autoRows ? /* @__PURE__ */ React30.createElement("span", { className: "aura-table__cell" }, j === 0 ? rowLinkWrap(r, cellContent(c, r)) : cellContent(c, r)) : j === 0 ? rowLinkWrap(r, cellContent(c, r)) : cellContent(c, r)
5561
5569
  )
5562
5570
  );
5563
5571
  });
@@ -5636,6 +5644,7 @@ var DataTableImpl = React30.forwardRef(function DataTable(props, ref) {
5636
5644
  "aria-selected": selectable && canSelect(r) ? isSel : void 0,
5637
5645
  className: cx(
5638
5646
  "aura-table__row",
5647
+ autoRows && "aura-table__row--auto",
5639
5648
  isSel && "is-selected",
5640
5649
  (props.onRowActivate || rowHref) && "is-actionable"
5641
5650
  ),
@@ -50,7 +50,7 @@ const Checkbox = React.forwardRef(function Checkbox2(props, ref) {
50
50
  checked: on,
51
51
  tabIndex: props.tabIndex,
52
52
  disabled: props.disabled,
53
- "aria-describedby": descId,
53
+ "aria-describedby": cx(props["aria-describedby"], descId) || void 0,
54
54
  "aria-label": labelled ? void 0 : props.label,
55
55
  onChange: function(e) {
56
56
  st[1](e.target.checked);
@@ -2,7 +2,7 @@
2
2
  import * as React from "react";
3
3
  import { createPortal } from "react-dom";
4
4
  import { useStrings, useLinkComponent } from "./locale.js";
5
- import { cx, useMaybeControlled, compare, useIsoLayoutEffect, useMergedRef } from "./internal.js";
5
+ import { cx, devWarnOnce, useMaybeControlled, compare, useIsoLayoutEffect, useMergedRef } from "./internal.js";
6
6
  import { Icon } from "./Icon.js";
7
7
  import { IconButton } from "./IconButton.js";
8
8
  import { Checkbox } from "./Checkbox.js";
@@ -416,6 +416,12 @@ const DataTableImpl = React.forwardRef(function DataTable(props, ref) {
416
416
  return rowHref ? /* @__PURE__ */ React.createElement(Link, { href: rowHref(r), className: "aura-table__row-link" }, content) : content;
417
417
  }
418
418
  const height = props.height || 0;
419
+ const autoRows = props.rowHeight === "auto" && !height;
420
+ if (props.rowHeight === "auto" && height)
421
+ devWarnOnce(
422
+ "table-row-height-auto",
423
+ 'DataTable `rowHeight="auto"` is ignored with `height`: virtualized rows are one fixed height. Drop `height` (and paginate) to let rows grow.'
424
+ );
419
425
  const virtual = !!height && !loading && pageRows.length > 0 && !stacked;
420
426
  const stickyTotal = !!(props.footer && props.stickyFooter && rows.length && !loading);
421
427
  const bodyH = Math.max(ROW_H, height - ROW_H - (stickyTotal ? ROW_H : 0));
@@ -940,6 +946,7 @@ const DataTableImpl = React.forwardRef(function DataTable(props, ref) {
940
946
  }
941
947
  function rowCells(r, i, k, isSel) {
942
948
  const ri = i + 1;
949
+ const selLabel = selectable && canSelect(r) ? props.rowSelectLabel && props.rowSelectLabel(r) || t.selectRow(k) : void 0;
943
950
  const cells = [/* @__PURE__ */ React.createElement("span", { key: "__gl", className: "aura-table__gutter", "aria-hidden": true })];
944
951
  if (selectable)
945
952
  cells.push(
@@ -952,7 +959,7 @@ const DataTableImpl = React.forwardRef(function DataTable(props, ref) {
952
959
  className: cx("aura-table__sel", nPinned && "is-pinned"),
953
960
  tabIndex: tabFor(ri, 0),
954
961
  "data-rc": ri + ":0",
955
- "aria-label": canSelect(r) ? t.selectRow(k) : props.rowSelectDisabledLabel ? props.rowSelectDisabledLabel(r) : void 0,
962
+ "aria-label": canSelect(r) ? selLabel : props.rowSelectDisabledLabel ? props.rowSelectDisabledLabel(r) : void 0,
956
963
  onFocus: function(e) {
957
964
  if (e.target === e.currentTarget) activeState[1]({ r: ri, c: 0 });
958
965
  }
@@ -963,7 +970,7 @@ const DataTableImpl = React.forwardRef(function DataTable(props, ref) {
963
970
  hideLabel: true,
964
971
  checked: isSel,
965
972
  tabIndex: -1,
966
- label: t.selectRow(k),
973
+ label: selLabel,
967
974
  onChange: function(on) {
968
975
  toggle(k, on);
969
976
  }
@@ -984,6 +991,7 @@ const DataTableImpl = React.forwardRef(function DataTable(props, ref) {
984
991
  "data-rc": ri + ":" + ci,
985
992
  className: cx(
986
993
  "aura-table__td",
994
+ autoRows && "aura-table__td--auto",
987
995
  c.mono && "aura-table__mono",
988
996
  c.align === "end" && "is-end",
989
997
  pin && "is-pinned",
@@ -995,7 +1003,7 @@ const DataTableImpl = React.forwardRef(function DataTable(props, ref) {
995
1003
  if (activeState[0].r !== ri || activeState[0].c !== ci) activeState[1]({ r: ri, c: ci });
996
1004
  }
997
1005
  },
998
- j === 0 ? rowLinkWrap(r, cellContent(c, r)) : cellContent(c, r)
1006
+ autoRows ? /* @__PURE__ */ React.createElement("span", { className: "aura-table__cell" }, j === 0 ? rowLinkWrap(r, cellContent(c, r)) : cellContent(c, r)) : j === 0 ? rowLinkWrap(r, cellContent(c, r)) : cellContent(c, r)
999
1007
  )
1000
1008
  );
1001
1009
  });
@@ -1074,6 +1082,7 @@ const DataTableImpl = React.forwardRef(function DataTable(props, ref) {
1074
1082
  "aria-selected": selectable && canSelect(r) ? isSel : void 0,
1075
1083
  className: cx(
1076
1084
  "aura-table__row",
1085
+ autoRows && "aura-table__row--auto",
1077
1086
  isSel && "is-selected",
1078
1087
  (props.onRowActivate || rowHref) && "is-actionable"
1079
1088
  ),
package/dist/index.d.cts CHANGED
@@ -129,6 +129,9 @@ export interface DataTableProps<Row extends Record<string, any> = Record<string,
129
129
  isRowSelectable?: RowCallback<boolean, Row> | undefined;
130
130
  /** Accessible name for a rejected row's empty cell, e.g. `(r) => 'Not awaiting review'` (5.6). */
131
131
  rowSelectDisabledLabel?: RowCallback<string, Row> | undefined;
132
+ /** Accessible name for a row's checkbox (and its cell), e.g. `(r) => 'Select ' + r.company` (5.11). Default: the
133
+ * `selectRow` string with the row key ("Select M-102"), also used when this returns an empty string. */
134
+ rowSelectLabel?: RowCallback<string, Row> | undefined;
132
135
  /** Controlled selection (row keys); pair with onSelectionChange. */
133
136
  selected?: Array<string | number> | undefined;
134
137
  /** Initial selection when uncontrolled. */
@@ -175,6 +178,10 @@ export interface DataTableProps<Row extends Record<string, any> = Record<string,
175
178
  onRowActivate?: RowCallback<void, Row> | undefined;
176
179
  /** Fixed height in px: sticky header, and only the rows in view are rendered. */
177
180
  height?: number | undefined;
181
+ /** `'auto'` (5.11): rows grow to fit content that wraps (two badges, a long name); cells stay vertically centred and
182
+ * rows keep at least the density's row height. Needs every row in the DOM, so it is ignored with `height`
183
+ * (virtualized rows are one fixed height). Default: one fixed-height line per row, long text ends in an ellipsis. */
184
+ rowHeight?: "auto" | undefined;
178
185
  /** Column menu on every header, drag-to-reorder, and the show/hide columns button. */
179
186
  columnControls?: boolean | undefined;
180
187
  /** Set false to keep column controls but turn off reordering. */
@@ -256,7 +263,7 @@ export interface CheckboxProps extends Omit<React$1.InputHTMLAttributes<HTMLInpu
256
263
  hideLabel?: boolean | undefined;
257
264
  /** The visible label beside the box. */
258
265
  children?: React$1.ReactNode | undefined;
259
- /** Second line under the visible label (needs an id to be linked). */
266
+ /** Second line under the visible label, linked by `aria-describedby` after any id you pass there (5.11). */
260
267
  description?: React$1.ReactNode | undefined;
261
268
  onChange?: ((checked: boolean) => void) | undefined;
262
269
  disabled?: boolean | undefined;
package/dist/index.d.ts CHANGED
@@ -129,6 +129,9 @@ export interface DataTableProps<Row extends Record<string, any> = Record<string,
129
129
  isRowSelectable?: RowCallback<boolean, Row> | undefined;
130
130
  /** Accessible name for a rejected row's empty cell, e.g. `(r) => 'Not awaiting review'` (5.6). */
131
131
  rowSelectDisabledLabel?: RowCallback<string, Row> | undefined;
132
+ /** Accessible name for a row's checkbox (and its cell), e.g. `(r) => 'Select ' + r.company` (5.11). Default: the
133
+ * `selectRow` string with the row key ("Select M-102"), also used when this returns an empty string. */
134
+ rowSelectLabel?: RowCallback<string, Row> | undefined;
132
135
  /** Controlled selection (row keys); pair with onSelectionChange. */
133
136
  selected?: Array<string | number> | undefined;
134
137
  /** Initial selection when uncontrolled. */
@@ -175,6 +178,10 @@ export interface DataTableProps<Row extends Record<string, any> = Record<string,
175
178
  onRowActivate?: RowCallback<void, Row> | undefined;
176
179
  /** Fixed height in px: sticky header, and only the rows in view are rendered. */
177
180
  height?: number | undefined;
181
+ /** `'auto'` (5.11): rows grow to fit content that wraps (two badges, a long name); cells stay vertically centred and
182
+ * rows keep at least the density's row height. Needs every row in the DOM, so it is ignored with `height`
183
+ * (virtualized rows are one fixed height). Default: one fixed-height line per row, long text ends in an ellipsis. */
184
+ rowHeight?: "auto" | undefined;
178
185
  /** Column menu on every header, drag-to-reorder, and the show/hide columns button. */
179
186
  columnControls?: boolean | undefined;
180
187
  /** Set false to keep column controls but turn off reordering. */
@@ -256,7 +263,7 @@ export interface CheckboxProps extends Omit<React$1.InputHTMLAttributes<HTMLInpu
256
263
  hideLabel?: boolean | undefined;
257
264
  /** The visible label beside the box. */
258
265
  children?: React$1.ReactNode | undefined;
259
- /** Second line under the visible label (needs an id to be linked). */
266
+ /** Second line under the visible label, linked by `aria-describedby` after any id you pass there (5.11). */
260
267
  description?: React$1.ReactNode | undefined;
261
268
  onChange?: ((checked: boolean) => void) | undefined;
262
269
  disabled?: boolean | undefined;
package/dist/styles.css CHANGED
@@ -130,7 +130,21 @@ a.aura-btn { text-decoration: none; }
130
130
  box-sizing: border-box; height: 100%; line-height: calc(var(--aura-table-row-height) - 1px);
131
131
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: var(--aura-space-4);
132
132
  }
133
- .aura-table__td .aura-pill, .aura-table__td .aura-dropdown, .aura-table__td > .aura-icon-btn, .aura-table__td > .aura-btn { vertical-align: middle; }
133
+ /* 5.11 rowHeight="auto" (never virtualized): a row grows to fit what wraps in it; each cell centres its content.
134
+ * The padding only shows once content is taller than the row: a small Button or IconButton (32px), a pill or one line
135
+ * still fits the density's row height (7.5px above and below at 48px, 3.5px compact). */
136
+ .aura-table__row--auto { height: auto; min-height: var(--aura-table-row-height); }
137
+ .aura-table__td--auto {
138
+ --aura-cell-pad-y: clamp(0px, calc((var(--aura-table-row-height) - 1px - var(--aura-button-height-sm)) / 2), var(--aura-space-2));
139
+ display: flex; align-items: center; height: auto; line-height: 20px; white-space: normal;
140
+ padding-top: var(--aura-cell-pad-y); padding-bottom: var(--aura-cell-pad-y);
141
+ }
142
+ .aura-table__cell { flex: 1 1 auto; min-width: 0; overflow-wrap: break-word; }
143
+ /* Badges and pills side by side keep apart when they wrap onto a second line. */
144
+ .aura-table__cell > .aura-badge, .aura-table__cell > .aura-pill { vertical-align: middle; margin-top: 2px; margin-bottom: 2px; }
145
+ .aura-table__cell > .aura-badge:not(:last-child), .aura-table__cell > .aura-pill:not(:last-child) { margin-inline-end: var(--aura-space-1); }
146
+ .aura-table__td .aura-pill, .aura-table__td .aura-dropdown, .aura-table__td > .aura-icon-btn, .aura-table__td > .aura-btn,
147
+ .aura-table__cell > .aura-icon-btn, .aura-table__cell > .aura-btn { vertical-align: middle; }
134
148
  .aura-table__th { position: relative; box-sizing: border-box; display: flex; align-items: center; padding-right: var(--aura-space-2); }
135
149
  /* Column sizes come from custom properties set per cell (4.20), so the card layout can override them. */
136
150
  .aura-table__th, .aura-table__td { flex: var(--aura-cell-flex, none); width: var(--aura-cell-w, auto); min-width: var(--aura-cell-min, 0); }
@@ -153,6 +167,10 @@ a.aura-btn { text-decoration: none; }
153
167
 
154
168
  /* Selection column */
155
169
  .aura-table__sel { width: var(--aura-table-select-width); flex: none; display: flex; align-items: center; background: inherit; }
170
+ /* 5.11: the selection box's invisible input reaches 24×24 (WCAG 2.5.8) around the 16px box it draws. Its left edge
171
+ * overlaps the sticky 24px gutter, so it sits one layer up — unless the column has scrolled under that gutter. */
172
+ .aura-table__sel .aura-check__input { inset: calc((var(--aura-icon-sm) - 24px) / 2); z-index: 2; }
173
+ .aura-table.is-scrolled-x .aura-table__sel:not(.is-pinned) .aura-check__input { z-index: auto; }
156
174
  .aura-table__sel.is-pinned { position: sticky; left: var(--aura-space-6); z-index: 2; }
157
175
 
158
176
  /* Pinned columns */
@@ -1580,6 +1598,9 @@ button.aura-stepper__step:hover .aura-stepper__label { text-decoration: underlin
1580
1598
  padding: 0; line-height: normal;
1581
1599
  }
1582
1600
  .aura-table__td[data-hide], .aura-table__head > .aura-table__th[data-hide] { display: block; }
1601
+ /* 5.11: rowHeight="auto" leaves cards as they are. */
1602
+ .aura-table__td--auto { display: block; white-space: nowrap; }
1603
+ .aura-table__td--auto .aura-table__cell > .aura-badge, .aura-table__td--auto .aura-table__cell > .aura-pill { margin: 0; }
1583
1604
  .aura-table__spacer { display: none; }
1584
1605
  .aura-table__td[data-label]::before {
1585
1606
  content: attr(data-label); content: attr(data-label) / '';
@@ -132,7 +132,21 @@ a.aura-btn { text-decoration: none; }
132
132
  box-sizing: border-box; height: 100%; line-height: calc(var(--aura-table-row-height) - 1px);
133
133
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: var(--aura-space-4);
134
134
  }
135
- .aura-table__td .aura-pill, .aura-table__td .aura-dropdown, .aura-table__td > .aura-icon-btn, .aura-table__td > .aura-btn { vertical-align: middle; }
135
+ /* 5.11 rowHeight="auto" (never virtualized): a row grows to fit what wraps in it; each cell centres its content.
136
+ * The padding only shows once content is taller than the row: a small Button or IconButton (32px), a pill or one line
137
+ * still fits the density's row height (7.5px above and below at 48px, 3.5px compact). */
138
+ .aura-table__row--auto { height: auto; min-height: var(--aura-table-row-height); }
139
+ .aura-table__td--auto {
140
+ --aura-cell-pad-y: clamp(0px, calc((var(--aura-table-row-height) - 1px - var(--aura-button-height-sm)) / 2), var(--aura-space-2));
141
+ display: flex; align-items: center; height: auto; line-height: 20px; white-space: normal;
142
+ padding-top: var(--aura-cell-pad-y); padding-bottom: var(--aura-cell-pad-y);
143
+ }
144
+ .aura-table__cell { flex: 1 1 auto; min-width: 0; overflow-wrap: break-word; }
145
+ /* Badges and pills side by side keep apart when they wrap onto a second line. */
146
+ .aura-table__cell > .aura-badge, .aura-table__cell > .aura-pill { vertical-align: middle; margin-top: 2px; margin-bottom: 2px; }
147
+ .aura-table__cell > .aura-badge:not(:last-child), .aura-table__cell > .aura-pill:not(:last-child) { margin-inline-end: var(--aura-space-1); }
148
+ .aura-table__td .aura-pill, .aura-table__td .aura-dropdown, .aura-table__td > .aura-icon-btn, .aura-table__td > .aura-btn,
149
+ .aura-table__cell > .aura-icon-btn, .aura-table__cell > .aura-btn { vertical-align: middle; }
136
150
  .aura-table__th { position: relative; box-sizing: border-box; display: flex; align-items: center; padding-right: var(--aura-space-2); }
137
151
  /* Column sizes come from custom properties set per cell (4.20), so the card layout can override them. */
138
152
  .aura-table__th, .aura-table__td { flex: var(--aura-cell-flex, none); width: var(--aura-cell-w, auto); min-width: var(--aura-cell-min, 0); }
@@ -155,6 +169,10 @@ a.aura-btn { text-decoration: none; }
155
169
 
156
170
  /* Selection column */
157
171
  .aura-table__sel { width: var(--aura-table-select-width); flex: none; display: flex; align-items: center; background: inherit; }
172
+ /* 5.11: the selection box's invisible input reaches 24×24 (WCAG 2.5.8) around the 16px box it draws. Its left edge
173
+ * overlaps the sticky 24px gutter, so it sits one layer up — unless the column has scrolled under that gutter. */
174
+ .aura-table__sel .aura-check__input { inset: calc((var(--aura-icon-sm) - 24px) / 2); z-index: 2; }
175
+ .aura-table.is-scrolled-x .aura-table__sel:not(.is-pinned) .aura-check__input { z-index: auto; }
158
176
  .aura-table__sel.is-pinned { position: sticky; left: var(--aura-space-6); z-index: 2; }
159
177
 
160
178
  /* Pinned columns */
@@ -1582,6 +1600,9 @@ button.aura-stepper__step:hover .aura-stepper__label { text-decoration: underlin
1582
1600
  padding: 0; line-height: normal;
1583
1601
  }
1584
1602
  .aura-table__td[data-hide], .aura-table__head > .aura-table__th[data-hide] { display: block; }
1603
+ /* 5.11: rowHeight="auto" leaves cards as they are. */
1604
+ .aura-table__td--auto { display: block; white-space: nowrap; }
1605
+ .aura-table__td--auto .aura-table__cell > .aura-badge, .aura-table__td--auto .aura-table__cell > .aura-pill { margin: 0; }
1585
1606
  .aura-table__spacer { display: none; }
1586
1607
  .aura-table__td[data-label]::before {
1587
1608
  content: attr(data-label); content: attr(data-label) / '';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jirawatpyk/aura-react",
3
- "version": "5.10.1",
3
+ "version": "5.11.0",
4
4
  "description": "AURA Design System — React components (Enterprise Standard, Human Creative). Thai-first: Buddhist-era dates, Thai collation.",
5
5
  "license": "MIT",
6
6
  "type": "module",