@ai-matrx/design-system 0.39.1 → 0.39.3
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/CHANGELOG.md +25 -0
- package/dist/data-table/index.cjs +51 -20
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.js +51 -20
- package/dist/data-table/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.39.3
|
|
4
|
+
|
|
5
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
6
|
+
`git diff npm/design-system/v0.39.2..npm/design-system/v0.39.3 -- apps/shared/design-system`).
|
|
7
|
+
No source changes intended and no consumer action required.
|
|
8
|
+
|
|
9
|
+
## Unreleased
|
|
10
|
+
|
|
11
|
+
### Lane UI-FIX-19 (2026-09-24)
|
|
12
|
+
|
|
13
|
+
* **A row's colour wins at every width.** `MatrxDataTable` decides a row's background once, in
|
|
14
|
+
`row-background.ts` (`rowBackground`), for the row and its frozen cells alike: colour tint, then
|
|
15
|
+
keyboard highlight / open row / ticked row, then the zebra stripe, then the card. The stripe was
|
|
16
|
+
`sm:bg-muted/20` and the tint a bare `bg-*`; tailwind-merge keeps both, and at ≥640px the stripe
|
|
17
|
+
won the cascade, so every other coloured row went plain on a desktop (VERIFIER-19 #5). Under a
|
|
18
|
+
tint no stripe, selection wash or hover wash is emitted; the keyboard's ring stays. Suite
|
|
19
|
+
`MatrxDataTable.tint-beats-zebra.test.tsx`: RED on the prior bytes ("row 2 (Quoting) stripe:
|
|
20
|
+
sm:bg-muted/20"), GREEN 3/3. No consumer action.
|
|
21
|
+
|
|
22
|
+
## 0.39.2
|
|
23
|
+
|
|
24
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
25
|
+
`git diff npm/design-system/v0.39.1..npm/design-system/v0.39.2 -- apps/shared/design-system`).
|
|
26
|
+
No source changes intended and no consumer action required.
|
|
27
|
+
|
|
3
28
|
## 0.39.1
|
|
4
29
|
|
|
5
30
|
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
@@ -10194,6 +10194,40 @@ var FROZEN_CELL_TINT_CLASS = {
|
|
|
10194
10194
|
};
|
|
10195
10195
|
var FROZEN_EDGE_CLASS = "sm:shadow-[inset_-1px_0_0_var(--border)]";
|
|
10196
10196
|
|
|
10197
|
+
// src/data-table/row-background.ts
|
|
10198
|
+
function rowBackground(state) {
|
|
10199
|
+
const ring = state.highlighted ? " ring-1 ring-inset ring-primary/60" : "";
|
|
10200
|
+
if (state.tint) {
|
|
10201
|
+
return {
|
|
10202
|
+
row: ROW_TINT_CLASS[state.tint] + ring,
|
|
10203
|
+
frozen: FROZEN_ROW_TINT_CLASS[state.tint],
|
|
10204
|
+
frozenHover: false
|
|
10205
|
+
};
|
|
10206
|
+
}
|
|
10207
|
+
const hover = state.hoverable ? "sm:hover:bg-muted/50" : "";
|
|
10208
|
+
if (state.highlighted) {
|
|
10209
|
+
return { row: `bg-muted${ring} ${hover}`.trim(), frozen: "sm:bg-muted", frozenHover: state.hoverable };
|
|
10210
|
+
}
|
|
10211
|
+
if (state.selected) {
|
|
10212
|
+
return { row: `bg-muted ${hover}`.trim(), frozen: "sm:bg-muted", frozenHover: state.hoverable };
|
|
10213
|
+
}
|
|
10214
|
+
if (state.checked) {
|
|
10215
|
+
return {
|
|
10216
|
+
row: `bg-primary/5 ${hover}`.trim(),
|
|
10217
|
+
frozen: "sm:bg-[color-mix(in_oklab,var(--color-primary)_5%,var(--color-card))]",
|
|
10218
|
+
frozenHover: state.hoverable
|
|
10219
|
+
};
|
|
10220
|
+
}
|
|
10221
|
+
if (state.zebraOdd) {
|
|
10222
|
+
return {
|
|
10223
|
+
row: `sm:bg-muted/20 ${hover}`.trim(),
|
|
10224
|
+
frozen: "sm:bg-[color-mix(in_oklab,var(--color-muted)_20%,var(--color-card))]",
|
|
10225
|
+
frozenHover: state.hoverable
|
|
10226
|
+
};
|
|
10227
|
+
}
|
|
10228
|
+
return { row: hover, frozen: "sm:bg-card", frozenHover: state.hoverable };
|
|
10229
|
+
}
|
|
10230
|
+
|
|
10197
10231
|
// src/field-formats/registry.ts
|
|
10198
10232
|
var import_format3 = require("@ai-matrx/kit/format");
|
|
10199
10233
|
function formatSignedDuration(totalSeconds) {
|
|
@@ -12892,10 +12926,6 @@ function MatrxDataTableCore({
|
|
|
12892
12926
|
tableStyle.choiceColorFor ?? noChoiceColor
|
|
12893
12927
|
);
|
|
12894
12928
|
};
|
|
12895
|
-
const rowTintClass = (row, id) => {
|
|
12896
|
-
const color = rowTintColor(row, id);
|
|
12897
|
-
return color ? ROW_TINT_CLASS[color] : void 0;
|
|
12898
|
-
};
|
|
12899
12929
|
const cellTintColor = (row, id, colId) => {
|
|
12900
12930
|
if (!tableStyle) return null;
|
|
12901
12931
|
return resolveCellColor(
|
|
@@ -14563,8 +14593,8 @@ function MatrxDataTableCore({
|
|
|
14563
14593
|
role: "status",
|
|
14564
14594
|
className: "flex shrink-0 items-start gap-2 rounded-md border border-amber-300/70 bg-amber-50 px-3 py-2 text-xs text-amber-900 dark:border-amber-500/40 dark:bg-amber-950/40 dark:text-amber-200",
|
|
14565
14595
|
children: [
|
|
14566
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "font-semibold", children: coverageResult.badge }),
|
|
14567
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { children: coverageResult.notice })
|
|
14596
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "shrink-0 whitespace-nowrap font-semibold", children: coverageResult.badge }),
|
|
14597
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "min-w-0", children: coverageResult.notice })
|
|
14568
14598
|
]
|
|
14569
14599
|
}
|
|
14570
14600
|
) : null,
|
|
@@ -15026,9 +15056,16 @@ function MatrxDataTableCore({
|
|
|
15026
15056
|
const displayRow = applyRowEdits(row, rowEdits);
|
|
15027
15057
|
const controls = buildRecordControls(displayRow);
|
|
15028
15058
|
const isChecked = selectedIdSet.has(id);
|
|
15029
|
-
const
|
|
15030
|
-
|
|
15031
|
-
|
|
15059
|
+
const background = rowBackground({
|
|
15060
|
+
tint: rowTintColor(row, id),
|
|
15061
|
+
highlighted: highlightedIndex === index,
|
|
15062
|
+
selected: isSelected,
|
|
15063
|
+
checked: isChecked,
|
|
15064
|
+
zebraOdd: zebra && index % 2 === 1,
|
|
15065
|
+
hoverable: detailEnabled || Boolean(onRowOpen) || canExpandRow(row)
|
|
15066
|
+
});
|
|
15067
|
+
const canHoverFrozenCell = background.frozenHover;
|
|
15068
|
+
const frozenRowBackgroundClass = background.frozen;
|
|
15032
15069
|
const rowNode = /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
15033
15070
|
"tr",
|
|
15034
15071
|
{
|
|
@@ -15057,19 +15094,13 @@ function MatrxDataTableCore({
|
|
|
15057
15094
|
// horizontally. The translucent zebra/hover tints remain
|
|
15058
15095
|
// desktop-only so densely layered mobile content stays crisp.
|
|
15059
15096
|
"group/matrx-row border-b border-border/60 bg-card transition-colors",
|
|
15060
|
-
(detailEnabled || Boolean(onRowOpen) || canExpandRow(row)) && "cursor-pointer
|
|
15061
|
-
isSelected && "bg-muted",
|
|
15062
|
-
isChecked && "bg-primary/5",
|
|
15063
|
-
highlightedIndex === index && "bg-muted ring-1 ring-inset ring-primary/60",
|
|
15097
|
+
(detailEnabled || Boolean(onRowOpen) || canExpandRow(row)) && "cursor-pointer",
|
|
15064
15098
|
rowClassName?.(row, index),
|
|
15065
15099
|
draggedRowId === id && "opacity-40",
|
|
15066
|
-
|
|
15067
|
-
//
|
|
15068
|
-
//
|
|
15069
|
-
|
|
15070
|
-
// checkbox already says the row is selected; the tint
|
|
15071
|
-
// is the only thing saying WHY the row matters.
|
|
15072
|
-
rowTintClass(row, id)
|
|
15100
|
+
// LAST, and decided once: tint, then highlight / open / ticked, then
|
|
15101
|
+
// the zebra stripe (./row-background.ts). Under a tint no stripe is
|
|
15102
|
+
// emitted at all, so no `sm:` class can win the cascade over it.
|
|
15103
|
+
background.row
|
|
15073
15104
|
),
|
|
15074
15105
|
children: [
|
|
15075
15106
|
selection ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|