@jirawatpyk/aura-react 5.10.0 → 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 +16 -0
- package/dist/aura.bundle.js +30 -5
- package/dist/cjs/index.cjs +30 -5
- package/dist/esm/Checkbox.js +1 -1
- package/dist/esm/DataTable.js +13 -4
- package/dist/esm/Tag.js +18 -2
- package/dist/index.d.cts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/styles.css +34 -2
- package/dist/styles.layer.css +34 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -186,6 +186,22 @@ 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
|
+
|
|
199
|
+
## 5.10.1 — fixes from a new project
|
|
200
|
+
|
|
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.
|
|
202
|
+
- **Tag**: the remove button is named from the words inside any children — `<Tag onRemove={…}><strong>Acme</strong> AB</Tag>` is "Remove Acme AB" (was "Remove "). With no text at all (an icon only), a dev notice asks for `removeLabel`.
|
|
203
|
+
- **SideNav** (docs): an item's `badge` takes any element, so a fault or warning is a toned Badge — `badge: <Badge tone="danger">Fault</Badge>`; `count` stays a neutral number.
|
|
204
|
+
|
|
189
205
|
## 5.10 — Chamber-OS addendum 10 (adopting 5.9)
|
|
190
206
|
|
|
191
207
|
- **Tabs `variant="segmented"`** (item 72): the tab list as a pill track with the selected tab raised — SegmentedControl's look — keeping every Tabs behaviour (tab / tabpanel roles, `keepMounted`, `activation`, `tabProps`). `fullWidth` stretches the track and shares it equally. Tabs are 44px on touch screens, the list doesn't scroll so the focus ring is never clipped, and in forced colours the selected tab gets a `Highlight` outline. Default (`underline`) output is unchanged.
|
package/dist/aura.bundle.js
CHANGED
|
@@ -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);
|
|
@@ -3883,6 +3883,16 @@ window.Aura = (() => {
|
|
|
3883
3883
|
|
|
3884
3884
|
// src/Tag.tsx
|
|
3885
3885
|
var React24 = __toESM(require_react(), 1);
|
|
3886
|
+
function textOf(node) {
|
|
3887
|
+
if (node == null || typeof node === "boolean") return "";
|
|
3888
|
+
if (typeof node === "string" || typeof node === "number") return String(node);
|
|
3889
|
+
if (Array.isArray(node)) return node.map(textOf).join("");
|
|
3890
|
+
if (React24.isValidElement(node)) {
|
|
3891
|
+
const p = node.props;
|
|
3892
|
+
return p["aria-hidden"] === true || p["aria-hidden"] === "true" ? "" : textOf(p.children);
|
|
3893
|
+
}
|
|
3894
|
+
return "";
|
|
3895
|
+
}
|
|
3886
3896
|
var Tag = React24.forwardRef(function Tag2(props, ref) {
|
|
3887
3897
|
const t = useStrings();
|
|
3888
3898
|
const selectable = props.onClick != null || props.selected != null;
|
|
@@ -3906,12 +3916,18 @@ window.Aura = (() => {
|
|
|
3906
3916
|
inner[1]
|
|
3907
3917
|
);
|
|
3908
3918
|
}
|
|
3919
|
+
const name = props.onRemove && !props.removeLabel ? textOf(props.children).replace(/\s+/g, " ").trim() : "";
|
|
3920
|
+
if (props.onRemove && !props.disabled && !props.removeLabel && !name)
|
|
3921
|
+
devWarnOnce(
|
|
3922
|
+
"tag-remove-label",
|
|
3923
|
+
'Tag: the remove button has no name \u2014 its children have no text. Pass removeLabel (e.g. "Remove Acme AB").'
|
|
3924
|
+
);
|
|
3909
3925
|
return /* @__PURE__ */ React24.createElement("span", { ...rest, ref, className: cx("aura-tag", props.disabled && "is-disabled", props.className) }, inner, props.onRemove && !props.disabled ? /* @__PURE__ */ React24.createElement(
|
|
3910
3926
|
"button",
|
|
3911
3927
|
{
|
|
3912
3928
|
type: "button",
|
|
3913
3929
|
className: "aura-tag__remove",
|
|
3914
|
-
"aria-label": props.removeLabel || t.remove(
|
|
3930
|
+
"aria-label": props.removeLabel || t.remove(name),
|
|
3915
3931
|
onClick: props.onRemove
|
|
3916
3932
|
},
|
|
3917
3933
|
/* @__PURE__ */ React24.createElement(Icon, { name: /* @__PURE__ */ React24.createElement(IconX, null), size: 12 })
|
|
@@ -4980,6 +4996,12 @@ window.Aura = (() => {
|
|
|
4980
4996
|
return rowHref ? /* @__PURE__ */ React30.createElement(Link, { href: rowHref(r), className: "aura-table__row-link" }, content) : content;
|
|
4981
4997
|
}
|
|
4982
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
|
+
);
|
|
4983
5005
|
const virtual = !!height && !loading && pageRows.length > 0 && !stacked;
|
|
4984
5006
|
const stickyTotal = !!(props.footer && props.stickyFooter && rows.length && !loading);
|
|
4985
5007
|
const bodyH = Math.max(ROW_H, height - ROW_H - (stickyTotal ? ROW_H : 0));
|
|
@@ -5504,6 +5526,7 @@ window.Aura = (() => {
|
|
|
5504
5526
|
}
|
|
5505
5527
|
function rowCells(r, i, k, isSel) {
|
|
5506
5528
|
const ri = i + 1;
|
|
5529
|
+
const selLabel = selectable && canSelect(r) ? props.rowSelectLabel && props.rowSelectLabel(r) || t.selectRow(k) : void 0;
|
|
5507
5530
|
const cells = [/* @__PURE__ */ React30.createElement("span", { key: "__gl", className: "aura-table__gutter", "aria-hidden": true })];
|
|
5508
5531
|
if (selectable)
|
|
5509
5532
|
cells.push(
|
|
@@ -5516,7 +5539,7 @@ window.Aura = (() => {
|
|
|
5516
5539
|
className: cx("aura-table__sel", nPinned && "is-pinned"),
|
|
5517
5540
|
tabIndex: tabFor(ri, 0),
|
|
5518
5541
|
"data-rc": ri + ":0",
|
|
5519
|
-
"aria-label": canSelect(r) ?
|
|
5542
|
+
"aria-label": canSelect(r) ? selLabel : props.rowSelectDisabledLabel ? props.rowSelectDisabledLabel(r) : void 0,
|
|
5520
5543
|
onFocus: function(e) {
|
|
5521
5544
|
if (e.target === e.currentTarget) activeState[1]({ r: ri, c: 0 });
|
|
5522
5545
|
}
|
|
@@ -5527,7 +5550,7 @@ window.Aura = (() => {
|
|
|
5527
5550
|
hideLabel: true,
|
|
5528
5551
|
checked: isSel,
|
|
5529
5552
|
tabIndex: -1,
|
|
5530
|
-
label:
|
|
5553
|
+
label: selLabel,
|
|
5531
5554
|
onChange: function(on) {
|
|
5532
5555
|
toggle(k, on);
|
|
5533
5556
|
}
|
|
@@ -5548,6 +5571,7 @@ window.Aura = (() => {
|
|
|
5548
5571
|
"data-rc": ri + ":" + ci,
|
|
5549
5572
|
className: cx(
|
|
5550
5573
|
"aura-table__td",
|
|
5574
|
+
autoRows && "aura-table__td--auto",
|
|
5551
5575
|
c.mono && "aura-table__mono",
|
|
5552
5576
|
c.align === "end" && "is-end",
|
|
5553
5577
|
pin && "is-pinned",
|
|
@@ -5559,7 +5583,7 @@ window.Aura = (() => {
|
|
|
5559
5583
|
if (activeState[0].r !== ri || activeState[0].c !== ci) activeState[1]({ r: ri, c: ci });
|
|
5560
5584
|
}
|
|
5561
5585
|
},
|
|
5562
|
-
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)
|
|
5563
5587
|
)
|
|
5564
5588
|
);
|
|
5565
5589
|
});
|
|
@@ -5638,6 +5662,7 @@ window.Aura = (() => {
|
|
|
5638
5662
|
"aria-selected": selectable && canSelect(r) ? isSel : void 0,
|
|
5639
5663
|
className: cx(
|
|
5640
5664
|
"aura-table__row",
|
|
5665
|
+
autoRows && "aura-table__row--auto",
|
|
5641
5666
|
isSel && "is-selected",
|
|
5642
5667
|
(props.onRowActivate || rowHref) && "is-actionable"
|
|
5643
5668
|
),
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -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);
|
|
@@ -3865,6 +3865,16 @@ var React25 = __toESM(require("react"), 1);
|
|
|
3865
3865
|
|
|
3866
3866
|
// src/Tag.tsx
|
|
3867
3867
|
var React24 = __toESM(require("react"), 1);
|
|
3868
|
+
function textOf(node) {
|
|
3869
|
+
if (node == null || typeof node === "boolean") return "";
|
|
3870
|
+
if (typeof node === "string" || typeof node === "number") return String(node);
|
|
3871
|
+
if (Array.isArray(node)) return node.map(textOf).join("");
|
|
3872
|
+
if (React24.isValidElement(node)) {
|
|
3873
|
+
const p = node.props;
|
|
3874
|
+
return p["aria-hidden"] === true || p["aria-hidden"] === "true" ? "" : textOf(p.children);
|
|
3875
|
+
}
|
|
3876
|
+
return "";
|
|
3877
|
+
}
|
|
3868
3878
|
var Tag = React24.forwardRef(function Tag2(props, ref) {
|
|
3869
3879
|
const t = useStrings();
|
|
3870
3880
|
const selectable = props.onClick != null || props.selected != null;
|
|
@@ -3888,12 +3898,18 @@ var Tag = React24.forwardRef(function Tag2(props, ref) {
|
|
|
3888
3898
|
inner[1]
|
|
3889
3899
|
);
|
|
3890
3900
|
}
|
|
3901
|
+
const name = props.onRemove && !props.removeLabel ? textOf(props.children).replace(/\s+/g, " ").trim() : "";
|
|
3902
|
+
if (props.onRemove && !props.disabled && !props.removeLabel && !name)
|
|
3903
|
+
devWarnOnce(
|
|
3904
|
+
"tag-remove-label",
|
|
3905
|
+
'Tag: the remove button has no name \u2014 its children have no text. Pass removeLabel (e.g. "Remove Acme AB").'
|
|
3906
|
+
);
|
|
3891
3907
|
return /* @__PURE__ */ React24.createElement("span", { ...rest, ref, className: cx("aura-tag", props.disabled && "is-disabled", props.className) }, inner, props.onRemove && !props.disabled ? /* @__PURE__ */ React24.createElement(
|
|
3892
3908
|
"button",
|
|
3893
3909
|
{
|
|
3894
3910
|
type: "button",
|
|
3895
3911
|
className: "aura-tag__remove",
|
|
3896
|
-
"aria-label": props.removeLabel || t.remove(
|
|
3912
|
+
"aria-label": props.removeLabel || t.remove(name),
|
|
3897
3913
|
onClick: props.onRemove
|
|
3898
3914
|
},
|
|
3899
3915
|
/* @__PURE__ */ React24.createElement(Icon, { name: /* @__PURE__ */ React24.createElement(IconX, null), size: 12 })
|
|
@@ -4962,6 +4978,12 @@ var DataTableImpl = React30.forwardRef(function DataTable(props, ref) {
|
|
|
4962
4978
|
return rowHref ? /* @__PURE__ */ React30.createElement(Link, { href: rowHref(r), className: "aura-table__row-link" }, content) : content;
|
|
4963
4979
|
}
|
|
4964
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
|
+
);
|
|
4965
4987
|
const virtual = !!height && !loading && pageRows.length > 0 && !stacked;
|
|
4966
4988
|
const stickyTotal = !!(props.footer && props.stickyFooter && rows.length && !loading);
|
|
4967
4989
|
const bodyH = Math.max(ROW_H, height - ROW_H - (stickyTotal ? ROW_H : 0));
|
|
@@ -5486,6 +5508,7 @@ var DataTableImpl = React30.forwardRef(function DataTable(props, ref) {
|
|
|
5486
5508
|
}
|
|
5487
5509
|
function rowCells(r, i, k, isSel) {
|
|
5488
5510
|
const ri = i + 1;
|
|
5511
|
+
const selLabel = selectable && canSelect(r) ? props.rowSelectLabel && props.rowSelectLabel(r) || t.selectRow(k) : void 0;
|
|
5489
5512
|
const cells = [/* @__PURE__ */ React30.createElement("span", { key: "__gl", className: "aura-table__gutter", "aria-hidden": true })];
|
|
5490
5513
|
if (selectable)
|
|
5491
5514
|
cells.push(
|
|
@@ -5498,7 +5521,7 @@ var DataTableImpl = React30.forwardRef(function DataTable(props, ref) {
|
|
|
5498
5521
|
className: cx("aura-table__sel", nPinned && "is-pinned"),
|
|
5499
5522
|
tabIndex: tabFor(ri, 0),
|
|
5500
5523
|
"data-rc": ri + ":0",
|
|
5501
|
-
"aria-label": canSelect(r) ?
|
|
5524
|
+
"aria-label": canSelect(r) ? selLabel : props.rowSelectDisabledLabel ? props.rowSelectDisabledLabel(r) : void 0,
|
|
5502
5525
|
onFocus: function(e) {
|
|
5503
5526
|
if (e.target === e.currentTarget) activeState[1]({ r: ri, c: 0 });
|
|
5504
5527
|
}
|
|
@@ -5509,7 +5532,7 @@ var DataTableImpl = React30.forwardRef(function DataTable(props, ref) {
|
|
|
5509
5532
|
hideLabel: true,
|
|
5510
5533
|
checked: isSel,
|
|
5511
5534
|
tabIndex: -1,
|
|
5512
|
-
label:
|
|
5535
|
+
label: selLabel,
|
|
5513
5536
|
onChange: function(on) {
|
|
5514
5537
|
toggle(k, on);
|
|
5515
5538
|
}
|
|
@@ -5530,6 +5553,7 @@ var DataTableImpl = React30.forwardRef(function DataTable(props, ref) {
|
|
|
5530
5553
|
"data-rc": ri + ":" + ci,
|
|
5531
5554
|
className: cx(
|
|
5532
5555
|
"aura-table__td",
|
|
5556
|
+
autoRows && "aura-table__td--auto",
|
|
5533
5557
|
c.mono && "aura-table__mono",
|
|
5534
5558
|
c.align === "end" && "is-end",
|
|
5535
5559
|
pin && "is-pinned",
|
|
@@ -5541,7 +5565,7 @@ var DataTableImpl = React30.forwardRef(function DataTable(props, ref) {
|
|
|
5541
5565
|
if (activeState[0].r !== ri || activeState[0].c !== ci) activeState[1]({ r: ri, c: ci });
|
|
5542
5566
|
}
|
|
5543
5567
|
},
|
|
5544
|
-
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)
|
|
5545
5569
|
)
|
|
5546
5570
|
);
|
|
5547
5571
|
});
|
|
@@ -5620,6 +5644,7 @@ var DataTableImpl = React30.forwardRef(function DataTable(props, ref) {
|
|
|
5620
5644
|
"aria-selected": selectable && canSelect(r) ? isSel : void 0,
|
|
5621
5645
|
className: cx(
|
|
5622
5646
|
"aura-table__row",
|
|
5647
|
+
autoRows && "aura-table__row--auto",
|
|
5623
5648
|
isSel && "is-selected",
|
|
5624
5649
|
(props.onRowActivate || rowHref) && "is-actionable"
|
|
5625
5650
|
),
|
package/dist/esm/Checkbox.js
CHANGED
|
@@ -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);
|
package/dist/esm/DataTable.js
CHANGED
|
@@ -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) ?
|
|
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:
|
|
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/esm/Tag.js
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { Icon } from "./Icon.js";
|
|
4
|
-
import { cx, omit } from "./internal.js";
|
|
4
|
+
import { cx, devWarnOnce, omit } from "./internal.js";
|
|
5
5
|
import { useStrings } from "./locale.js";
|
|
6
6
|
import { IconCheck, IconX } from "./icons.js";
|
|
7
|
+
function textOf(node) {
|
|
8
|
+
if (node == null || typeof node === "boolean") return "";
|
|
9
|
+
if (typeof node === "string" || typeof node === "number") return String(node);
|
|
10
|
+
if (Array.isArray(node)) return node.map(textOf).join("");
|
|
11
|
+
if (React.isValidElement(node)) {
|
|
12
|
+
const p = node.props;
|
|
13
|
+
return p["aria-hidden"] === true || p["aria-hidden"] === "true" ? "" : textOf(p.children);
|
|
14
|
+
}
|
|
15
|
+
return "";
|
|
16
|
+
}
|
|
7
17
|
const Tag = React.forwardRef(function Tag2(props, ref) {
|
|
8
18
|
const t = useStrings();
|
|
9
19
|
const selectable = props.onClick != null || props.selected != null;
|
|
@@ -27,12 +37,18 @@ const Tag = React.forwardRef(function Tag2(props, ref) {
|
|
|
27
37
|
inner[1]
|
|
28
38
|
);
|
|
29
39
|
}
|
|
40
|
+
const name = props.onRemove && !props.removeLabel ? textOf(props.children).replace(/\s+/g, " ").trim() : "";
|
|
41
|
+
if (props.onRemove && !props.disabled && !props.removeLabel && !name)
|
|
42
|
+
devWarnOnce(
|
|
43
|
+
"tag-remove-label",
|
|
44
|
+
'Tag: the remove button has no name \u2014 its children have no text. Pass removeLabel (e.g. "Remove Acme AB").'
|
|
45
|
+
);
|
|
30
46
|
return /* @__PURE__ */ React.createElement("span", { ...rest, ref, className: cx("aura-tag", props.disabled && "is-disabled", props.className) }, inner, props.onRemove && !props.disabled ? /* @__PURE__ */ React.createElement(
|
|
31
47
|
"button",
|
|
32
48
|
{
|
|
33
49
|
type: "button",
|
|
34
50
|
className: "aura-tag__remove",
|
|
35
|
-
"aria-label": props.removeLabel || t.remove(
|
|
51
|
+
"aria-label": props.removeLabel || t.remove(name),
|
|
36
52
|
onClick: props.onRemove
|
|
37
53
|
},
|
|
38
54
|
/* @__PURE__ */ React.createElement(Icon, { name: /* @__PURE__ */ React.createElement(IconX, null), size: 12 })
|
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
|
|
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
|
|
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
|
-
|
|
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 */
|
|
@@ -466,7 +484,13 @@ a.aura-icon-btn { text-decoration: none; }
|
|
|
466
484
|
.aura-radio-group.is-invalid .aura-radio:not(:checked) { border-color: var(--aura-border-danger); }
|
|
467
485
|
|
|
468
486
|
.aura-switch-row { display: flex; align-items: flex-start; gap: var(--aura-space-3); font-family: var(--font-sans); }
|
|
469
|
-
.
|
|
487
|
+
/* 5.10.1: disabled rows, on or off, are treated alike and stay readable — the label turns secondary, the description
|
|
488
|
+
* keeps its colour (often the reason it's locked) — and only the switch fades: off to the disabled opacity, on to 0.75,
|
|
489
|
+
* ≥3:1 apart in both themes, so "locked on" never looks like "off". */
|
|
490
|
+
.aura-switch-row.is-disabled { cursor: not-allowed; }
|
|
491
|
+
.aura-switch-row.is-disabled .aura-choice__label { color: var(--aura-fg-secondary); cursor: not-allowed; }
|
|
492
|
+
.aura-switch:disabled { opacity: var(--aura-disabled-opacity); }
|
|
493
|
+
.aura-switch.is-on:disabled { opacity: 0.75; }
|
|
470
494
|
.aura-switch {
|
|
471
495
|
position: relative; flex: none; box-sizing: border-box; margin: 0; padding: 0;
|
|
472
496
|
width: var(--aura-switch-width); height: var(--aura-switch-height); border-radius: var(--aura-radius-full);
|
|
@@ -1574,6 +1598,9 @@ button.aura-stepper__step:hover .aura-stepper__label { text-decoration: underlin
|
|
|
1574
1598
|
padding: 0; line-height: normal;
|
|
1575
1599
|
}
|
|
1576
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; }
|
|
1577
1604
|
.aura-table__spacer { display: none; }
|
|
1578
1605
|
.aura-table__td[data-label]::before {
|
|
1579
1606
|
content: attr(data-label); content: attr(data-label) / '';
|
|
@@ -1601,6 +1628,11 @@ button.aura-stepper__step:hover .aura-stepper__label { text-decoration: underlin
|
|
|
1601
1628
|
.aura-switch__thumb { background: CanvasText; forced-color-adjust: none; }
|
|
1602
1629
|
.aura-switch.is-on { background: Highlight; forced-color-adjust: none; }
|
|
1603
1630
|
.aura-switch.is-on .aura-switch__thumb { background: HighlightText; }
|
|
1631
|
+
.aura-switch:disabled, .aura-switch.is-on:disabled { border-color: GrayText; opacity: 1; }
|
|
1632
|
+
.aura-switch:disabled .aura-switch__thumb { background: GrayText; }
|
|
1633
|
+
.aura-switch.is-on:disabled { background: GrayText; }
|
|
1634
|
+
.aura-switch.is-on:disabled .aura-switch__thumb { background: Canvas; }
|
|
1635
|
+
.aura-switch-row.is-disabled .aura-choice__label { color: GrayText; }
|
|
1604
1636
|
.aura-progress__track, .aura-upload__bar { border: 1px solid CanvasText; }
|
|
1605
1637
|
.aura-progress__bar, .aura-upload__bar > span { background: Highlight; forced-color-adjust: none; }
|
|
1606
1638
|
.aura-segmented__option.is-selected { outline: 2px solid Highlight; outline-offset: -2px; }
|
package/dist/styles.layer.css
CHANGED
|
@@ -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
|
-
|
|
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 */
|
|
@@ -468,7 +486,13 @@ a.aura-icon-btn { text-decoration: none; }
|
|
|
468
486
|
.aura-radio-group.is-invalid .aura-radio:not(:checked) { border-color: var(--aura-border-danger); }
|
|
469
487
|
|
|
470
488
|
.aura-switch-row { display: flex; align-items: flex-start; gap: var(--aura-space-3); font-family: var(--font-sans); }
|
|
471
|
-
.
|
|
489
|
+
/* 5.10.1: disabled rows, on or off, are treated alike and stay readable — the label turns secondary, the description
|
|
490
|
+
* keeps its colour (often the reason it's locked) — and only the switch fades: off to the disabled opacity, on to 0.75,
|
|
491
|
+
* ≥3:1 apart in both themes, so "locked on" never looks like "off". */
|
|
492
|
+
.aura-switch-row.is-disabled { cursor: not-allowed; }
|
|
493
|
+
.aura-switch-row.is-disabled .aura-choice__label { color: var(--aura-fg-secondary); cursor: not-allowed; }
|
|
494
|
+
.aura-switch:disabled { opacity: var(--aura-disabled-opacity); }
|
|
495
|
+
.aura-switch.is-on:disabled { opacity: 0.75; }
|
|
472
496
|
.aura-switch {
|
|
473
497
|
position: relative; flex: none; box-sizing: border-box; margin: 0; padding: 0;
|
|
474
498
|
width: var(--aura-switch-width); height: var(--aura-switch-height); border-radius: var(--aura-radius-full);
|
|
@@ -1576,6 +1600,9 @@ button.aura-stepper__step:hover .aura-stepper__label { text-decoration: underlin
|
|
|
1576
1600
|
padding: 0; line-height: normal;
|
|
1577
1601
|
}
|
|
1578
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; }
|
|
1579
1606
|
.aura-table__spacer { display: none; }
|
|
1580
1607
|
.aura-table__td[data-label]::before {
|
|
1581
1608
|
content: attr(data-label); content: attr(data-label) / '';
|
|
@@ -1603,6 +1630,11 @@ button.aura-stepper__step:hover .aura-stepper__label { text-decoration: underlin
|
|
|
1603
1630
|
.aura-switch__thumb { background: CanvasText; forced-color-adjust: none; }
|
|
1604
1631
|
.aura-switch.is-on { background: Highlight; forced-color-adjust: none; }
|
|
1605
1632
|
.aura-switch.is-on .aura-switch__thumb { background: HighlightText; }
|
|
1633
|
+
.aura-switch:disabled, .aura-switch.is-on:disabled { border-color: GrayText; opacity: 1; }
|
|
1634
|
+
.aura-switch:disabled .aura-switch__thumb { background: GrayText; }
|
|
1635
|
+
.aura-switch.is-on:disabled { background: GrayText; }
|
|
1636
|
+
.aura-switch.is-on:disabled .aura-switch__thumb { background: Canvas; }
|
|
1637
|
+
.aura-switch-row.is-disabled .aura-choice__label { color: GrayText; }
|
|
1606
1638
|
.aura-progress__track, .aura-upload__bar { border: 1px solid CanvasText; }
|
|
1607
1639
|
.aura-progress__bar, .aura-upload__bar > span { background: Highlight; forced-color-adjust: none; }
|
|
1608
1640
|
.aura-segmented__option.is-selected { outline: 2px solid Highlight; outline-offset: -2px; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jirawatpyk/aura-react",
|
|
3
|
-
"version": "5.
|
|
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",
|