@jirawatpyk/aura-tokens 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/aura-tailwind.css +1 -1
- package/aura-tailwind.prefixed.css +1 -1
- package/aura.css +1 -1
- package/components/aura.bundle.js +13 -4
- package/components/aura.components.css +22 -1
- package/components/index.d.ts +8 -1
- package/package.json +1 -1
- package/tokens.json +1 -1
package/aura-tailwind.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* AURA v5.
|
|
1
|
+
/* AURA v5.11.0 — Tailwind v4 theme. GENERATED by scripts/build-tokens.mts from tokens.json. Do not edit by hand.
|
|
2
2
|
* @import "tailwindcss";
|
|
3
3
|
* @import "@jirawatpyk/aura-tokens/tailwind.css";
|
|
4
4
|
* Gives bg-bg-surface, text-fg-primary, border-border-strong, p-aura-6, rounded-aura-xl, shadow-aura-overlay,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* AURA v5.
|
|
1
|
+
/* AURA v5.11.0 — Tailwind v4 theme with aura- prefixed names. GENERATED by scripts/build-tokens.mts. Do not edit by hand.
|
|
2
2
|
* For apps that already have a Tailwind theme (shadcn): nothing here redefines an existing name.
|
|
3
3
|
* @layer aura-tokens, theme, base, aura, components, utilities;
|
|
4
4
|
* @import "tailwindcss";
|
package/aura.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* AURA v5.
|
|
1
|
+
/* AURA v5.11.0 — GENERATED by scripts/build-tokens.mts from tokens.json. Do not edit by hand. */
|
|
2
2
|
/* Fonts: load aura-fonts.css (or the <link> tags in README) separately, so a blocked Google Fonts never breaks this file. */
|
|
3
3
|
|
|
4
4
|
:root, [data-theme="light"] {
|
|
@@ -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) ?
|
|
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:
|
|
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
|
),
|
|
@@ -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 */
|
|
@@ -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) / '';
|
package/components/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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jirawatpyk/aura-tokens",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.11.0",
|
|
4
4
|
"description": "AURA Design System — tokens (CSS variables, Tailwind preset, Figma variables), theme contrast checks and token lint.",
|
|
5
5
|
"main": "tailwind.tokens.cjs",
|
|
6
6
|
"types": "components/index.d.ts",
|
package/tokens.json
CHANGED