@molecule/app-data-table-ui-react 4.0.2 → 4.1.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 +4 -4
- package/dist/DataTableCard.d.ts +1 -1
- package/dist/DataTableCard.d.ts.map +1 -1
- package/dist/DataTableCard.js +5 -2
- package/dist/RowWithActions.d.ts.map +1 -1
- package/dist/RowWithActions.js +2 -1
- package/dist/TableEmpty.d.ts.map +1 -1
- package/dist/TableEmpty.js +2 -1
- package/dist/TableFooter.d.ts.map +1 -1
- package/dist/TableFooter.js +2 -1
- package/dist/TableToolbar.d.ts.map +1 -1
- package/dist/TableToolbar.js +2 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
|
|
|
3
3
|
Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
|
|
4
4
|
Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
|
|
5
5
|
To change this document, edit the module-level JSDoc in src/index.ts.
|
|
6
|
-
Generated: 2026-11-
|
|
6
|
+
Generated: 2026-11-25T07:50:53.019Z
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
# @molecule/app-data-table-ui-react
|
|
@@ -199,7 +199,7 @@ For complex per-column rendering, pass cells that compose
|
|
|
199
199
|
|
|
200
200
|
```typescript
|
|
201
201
|
function DataTableCard<Row>({
|
|
202
|
-
title,
|
|
202
|
+
title: titleProp,
|
|
203
203
|
titleAction,
|
|
204
204
|
columns,
|
|
205
205
|
rows,
|
|
@@ -271,9 +271,9 @@ function TableToolbar({ left, right, below, className }: TableToolbarProps): JSX
|
|
|
271
271
|
|
|
272
272
|
Peer dependencies:
|
|
273
273
|
|
|
274
|
-
- `@molecule/app-react` ^4.
|
|
274
|
+
- `@molecule/app-react` ^4.13.0
|
|
275
275
|
- `@molecule/app-ui` ^1.3.11
|
|
276
|
-
- `@molecule/app-ui-react` ^4.
|
|
276
|
+
- `@molecule/app-ui-react` ^4.7.0
|
|
277
277
|
- `react` ^18.0.0 || ^19.0.0
|
|
278
278
|
|
|
279
279
|
### Runtime Dependencies
|
package/dist/DataTableCard.d.ts
CHANGED
|
@@ -52,5 +52,5 @@ export interface DataTableCardProps<Row> {
|
|
|
52
52
|
* `<StatusBadge>`, `<Avatar>`, etc.
|
|
53
53
|
* @param props - Component props (see {@link DataTableCardProps}).
|
|
54
54
|
*/
|
|
55
|
-
export declare function DataTableCard<Row>({ title, titleAction, columns, rows, rowKey, loading, onRowClick, emptyMessage, className, dataMolId, }: DataTableCardProps<Row>): JSX.Element;
|
|
55
|
+
export declare function DataTableCard<Row>({ title: titleProp, titleAction, columns, rows, rowKey, loading, onRowClick, emptyMessage, className, dataMolId, }: DataTableCardProps<Row>): JSX.Element;
|
|
56
56
|
//# sourceMappingURL=DataTableCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableCard.d.ts","sourceRoot":"","sources":["../src/DataTableCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"DataTableCard.d.ts","sourceRoot":"","sources":["../src/DataTableCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAM3C,wFAAwF;AACxF,MAAM,WAAW,eAAe,CAAC,GAAG;IAClC,4BAA4B;IAC5B,GAAG,EAAE,MAAM,CAAA;IACX,yCAAyC;IACzC,MAAM,EAAE,SAAS,CAAA;IACjB,kDAAkD;IAClD,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,SAAS,CAAA;IAC7B,qEAAqE;IACrE,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AAED,uCAAuC;AACvC,MAAM,WAAW,kBAAkB,CAAC,GAAG;IACrC,6CAA6C;IAC7C,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,iEAAiE;IACjE,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,0BAA0B;IAC1B,OAAO,EAAE,aAAa,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAA;IAC5C,6EAA6E;IAC7E,IAAI,EAAE,aAAa,CAAC,GAAG,CAAC,CAAA;IACxB,0CAA0C;IAC1C,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,MAAM,CAAA;IAC5B,4DAA4D;IAC5D,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,sCAAsC;IACtC,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAA;IAC/B,mFAAmF;IACnF,YAAY,CAAC,EAAE,SAAS,CAAA;IACxB,uCAAuC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,EACjC,KAAK,EAAE,SAAS,EAChB,WAAW,EACX,OAAO,EACP,IAAI,EACJ,MAAM,EACN,OAAe,EACf,UAAU,EACV,YAAY,EACZ,SAAS,EACT,SAAS,GACV,EAAE,kBAAkB,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,OAAO,CA0GvC"}
|
package/dist/DataTableCard.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { slot } from '@molecule/app-react/render';
|
|
2
3
|
import { getClassMap } from '@molecule/app-ui';
|
|
4
|
+
import { Box, TableBox, TableCell, Text } from '@molecule/app-ui-react/elements';
|
|
3
5
|
/**
|
|
4
6
|
* Drop-in card-shaped data table matching the polished flagship pattern.
|
|
5
7
|
*
|
|
@@ -18,7 +20,8 @@ import { getClassMap } from '@molecule/app-ui';
|
|
|
18
20
|
* `<StatusBadge>`, `<Avatar>`, etc.
|
|
19
21
|
* @param props - Component props (see {@link DataTableCardProps}).
|
|
20
22
|
*/
|
|
21
|
-
export function DataTableCard({ title, titleAction, columns, rows, rowKey, loading = false, onRowClick, emptyMessage, className, dataMolId, }) {
|
|
23
|
+
export function DataTableCard({ title: titleProp, titleAction, columns, rows, rowKey, loading = false, onRowClick, emptyMessage, className, dataMolId, }) {
|
|
24
|
+
const title = slot(titleProp);
|
|
22
25
|
const cm = getClassMap();
|
|
23
|
-
return (_jsxs("section",
|
|
26
|
+
return (_jsxs(Box, { as: "section", "data-mol-id": dataMolId, className: cm.cn(cm.stack(4), cm.dataTableCardShell, className), children: [(title !== undefined || titleAction !== undefined) && (_jsxs(Box, { as: "div", className: cm.cn(cm.flex({ justify: 'between', align: 'center' }), cm.sp('px', 8), cm.sp('pt', 8)), children: [title !== undefined && (_jsx(Text, { as: "h3", className: cm.cn(cm.textSize('xl'), cm.fontWeight('bold'), cm.dataTableCardTitle), children: title })), titleAction] })), _jsx(Box, { as: "div", className: cm.dataTableCardScroller, children: _jsxs(TableBox, { as: "table", className: cm.cn(cm.w('full'), cm.dataTableCardTable), children: [_jsx(TableBox, { as: "thead", children: _jsx(TableBox, { as: "tr", className: cm.dataTableCardHead, children: columns.map((col, idx) => (_jsx(TableCell, { as: "th", className: cm.cn(idx === 0 ? cm.sp('px', 8) : cm.sp('px', 4), cm.sp('py', 4), cm.dataTableCardHeaderCell, col.headerClassName), children: col.header }, col.key))) }) }), _jsx(TableBox, { as: "tbody", className: cm.dataTableCardBody, children: loading ? (Array.from({ length: 5 }).map((_, i) => (_jsx(TableBox, { as: "tr", "aria-hidden": "true", children: _jsx(TableCell, { as: "td", colSpan: columns.length, className: cm.cn(cm.sp('px', 8), cm.sp('py', 5)), children: _jsx(Box, { as: "div", className: cm.cn(cm.h(4), cm.dataTableCardSkeletonBar) }) }) }, `skeleton-${i}`)))) : rows.length === 0 ? (_jsx(TableBox, { as: "tr", children: _jsx(TableCell, { as: "td", colSpan: columns.length, className: cm.cn(cm.sp('px', 8), cm.sp('py', 12), cm.textCenter, cm.dataTableCardEmptyCell), children: emptyMessage }) })) : (rows.map((row) => (_jsx(TableBox, { as: "tr", onClick: onRowClick ? () => onRowClick(row) : undefined, className: cm.cn(onRowClick ? cm.cursorPointer : '', cm.dataTableCardRowHover), children: columns.map((col, idx) => (_jsx(TableCell, { as: "td", className: cm.cn(idx === 0 ? cm.sp('px', 8) : cm.sp('px', 4), cm.sp('py', 5), col.cellClassName), children: col.cell(row) }, col.key))) }, rowKey(row))))) })] }) })] }));
|
|
24
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RowWithActions.d.ts","sourceRoot":"","sources":["../src/RowWithActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"RowWithActions.d.ts","sourceRoot":"","sources":["../src/RowWithActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAK3C,wCAAwC;AACxC,MAAM,WAAW,mBAAmB;IAClC,0CAA0C;IAC1C,QAAQ,EAAE,SAAS,CAAA;IACnB,oEAAoE;IACpE,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,kEAAkE;IAClE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,mCAAmC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,OAAO,EACP,OAAO,EACP,QAAQ,EACR,SAAS,GACV,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,CAiBnC"}
|
package/dist/RowWithActions.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { getClassMap } from '@molecule/app-ui';
|
|
3
|
+
import { TableBox, TableCell } from '@molecule/app-ui-react/elements';
|
|
3
4
|
/**
|
|
4
5
|
* `<tr>` wrapper that adds a trailing actions cell plus a click handler
|
|
5
6
|
* on the body. Useful for data tables where each row has a trailing
|
|
@@ -8,5 +9,5 @@ import { getClassMap } from '@molecule/app-ui';
|
|
|
8
9
|
*/
|
|
9
10
|
export function RowWithActions({ children, actions, onClick, selected, className, }) {
|
|
10
11
|
const cm = getClassMap();
|
|
11
|
-
return (_jsxs("tr",
|
|
12
|
+
return (_jsxs(TableBox, { as: "tr", onClick: onClick, "aria-selected": selected, className: cm.cn(onClick ? cm.cursorPointer : undefined, className), children: [children, actions !== undefined && (_jsx(TableCell, { as: "td", onClick: (e) => e.stopPropagation(), className: cm.cn(cm.textCenter), children: actions }))] }));
|
|
12
13
|
}
|
package/dist/TableEmpty.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableEmpty.d.ts","sourceRoot":"","sources":["../src/TableEmpty.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"TableEmpty.d.ts","sourceRoot":"","sources":["../src/TableEmpty.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAK3C,oCAAoC;AACpC,MAAM,WAAW,eAAe;IAC9B,yDAAyD;IACzD,OAAO,EAAE,MAAM,CAAA;IACf,2BAA2B;IAC3B,QAAQ,EAAE,SAAS,CAAA;IACnB,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,eAAe,GAAG,GAAG,CAAC,OAAO,CAazF"}
|
package/dist/TableEmpty.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { getClassMap } from '@molecule/app-ui';
|
|
3
|
+
import { TableBox, TableCell } from '@molecule/app-ui-react/elements';
|
|
3
4
|
/**
|
|
4
5
|
* Single full-width row shown when a `<Table>` has no data. Typically
|
|
5
6
|
* wraps `<EmptyState>` from `@molecule/app-empty-state-react`.
|
|
@@ -7,5 +8,5 @@ import { getClassMap } from '@molecule/app-ui';
|
|
|
7
8
|
*/
|
|
8
9
|
export function TableEmpty({ colSpan, children, className }) {
|
|
9
10
|
const cm = getClassMap();
|
|
10
|
-
return (_jsx("tr",
|
|
11
|
+
return (_jsx(TableBox, { as: "tr", children: _jsx(TableCell, { as: "td", colSpan: colSpan, className: cm.cn(cm.sp('py', 10), cm.textCenter, className), children: children }) }));
|
|
11
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableFooter.d.ts","sourceRoot":"","sources":["../src/TableFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"TableFooter.d.ts","sourceRoot":"","sources":["../src/TableFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAK3C,qCAAqC;AACrC,MAAM,WAAW,gBAAgB;IAC/B,gEAAgE;IAChE,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,gDAAgD;IAChD,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,CAerF"}
|
package/dist/TableFooter.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { getClassMap } from '@molecule/app-ui';
|
|
3
|
+
import { Box } from '@molecule/app-ui-react/elements';
|
|
3
4
|
/**
|
|
4
5
|
* Footer bar rendered below an `<Table>`. Pass a pagination bar in `right`.
|
|
5
6
|
* @param props - Component props (see {@link TableFooterProps}).
|
|
6
7
|
*/
|
|
7
8
|
export function TableFooter({ left, right, className }) {
|
|
8
9
|
const cm = getClassMap();
|
|
9
|
-
return (_jsxs("div",
|
|
10
|
+
return (_jsxs(Box, { as: "div", className: cm.cn(cm.flex({ justify: 'between', align: 'center', gap: 'sm', wrap: 'wrap' }), cm.sp('pt', 3), className), children: [_jsx(Box, { as: "div", children: left }), _jsx(Box, { as: "div", children: right })] }));
|
|
10
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableToolbar.d.ts","sourceRoot":"","sources":["../src/TableToolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"TableToolbar.d.ts","sourceRoot":"","sources":["../src/TableToolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAK3C,sCAAsC;AACtC,MAAM,WAAW,iBAAiB;IAChC,iEAAiE;IACjE,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,wEAAwE;IACxE,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,yEAAyE;IACzE,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAkB9F"}
|
package/dist/TableToolbar.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { getClassMap } from '@molecule/app-ui';
|
|
3
|
+
import { Box } from '@molecule/app-ui-react/elements';
|
|
3
4
|
/**
|
|
4
5
|
* Table top-chrome row with left/right slots and an optional bottom
|
|
5
6
|
* sub-row for active filter chips or tabs. Sits above an `<Table>`
|
|
@@ -8,5 +9,5 @@ import { getClassMap } from '@molecule/app-ui';
|
|
|
8
9
|
*/
|
|
9
10
|
export function TableToolbar({ left, right, below, className }) {
|
|
10
11
|
const cm = getClassMap();
|
|
11
|
-
return (_jsxs("div",
|
|
12
|
+
return (_jsxs(Box, { as: "div", className: cm.cn(cm.stack(2), className), children: [_jsxs(Box, { as: "div", className: cm.flex({ justify: 'between', align: 'center', gap: 'sm', wrap: 'wrap' }), children: [_jsx(Box, { as: "div", className: cm.flex({ align: 'center', gap: 'sm' }), children: left }), _jsx(Box, { as: "div", className: cm.flex({ align: 'center', gap: 'sm' }), children: right })] }), below] }));
|
|
12
13
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@molecule/app-data-table-ui-react",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "Card data table + table chrome primitives (toolbar, footer, row-with-actions, empty row) — standalone, renders its own table elements",
|
|
5
5
|
"homepage": "https://www.molecule.dev/packages/app-data-table-ui-react",
|
|
6
6
|
"type": "module",
|
|
@@ -33,15 +33,15 @@
|
|
|
33
33
|
"directory": "packages/app/features/data-table-ui-react"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@molecule/app-react": "^4.
|
|
36
|
+
"@molecule/app-react": "^4.13.0",
|
|
37
37
|
"@molecule/app-ui": "^1.3.11",
|
|
38
|
-
"@molecule/app-ui-react": "^4.
|
|
38
|
+
"@molecule/app-ui-react": "^4.7.0",
|
|
39
39
|
"react": "^18.0.0 || ^19.0.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@molecule/app-react": "4.
|
|
43
|
-
"@molecule/app-ui": "1.
|
|
44
|
-
"@molecule/app-ui-react": "4.
|
|
42
|
+
"@molecule/app-react": "4.17.0",
|
|
43
|
+
"@molecule/app-ui": "1.13.0",
|
|
44
|
+
"@molecule/app-ui-react": "4.11.0",
|
|
45
45
|
"@types/node": "26.6.5",
|
|
46
46
|
"@types/react": "19.3.0",
|
|
47
47
|
"@types/react-dom": "19.3.0",
|