@molecule/app-data-table-ui-react 4.0.0 → 4.0.2

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
@@ -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-12T04:40:11.554Z
6
+ Generated: 2026-11-16T01:05:37.750Z
7
7
  -->
8
8
 
9
9
  # @molecule/app-data-table-ui-react
@@ -272,7 +272,7 @@ function TableToolbar({ left, right, below, className }: TableToolbarProps): JSX
272
272
  Peer dependencies:
273
273
 
274
274
  - `@molecule/app-react` ^4.0.0
275
- - `@molecule/app-ui` ^1.0.1
275
+ - `@molecule/app-ui` ^1.3.11
276
276
  - `@molecule/app-ui-react` ^4.0.0
277
277
  - `react` ^18.0.0 || ^19.0.0
278
278
 
@@ -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;AAI3C,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,CAA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;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,EACL,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,CA4FvC"}
@@ -20,5 +20,5 @@ import { getClassMap } from '@molecule/app-ui';
20
20
  */
21
21
  export function DataTableCard({ title, titleAction, columns, rows, rowKey, loading = false, onRowClick, emptyMessage, className, dataMolId, }) {
22
22
  const cm = getClassMap();
23
- return (_jsxs("section", { "data-mol-id": dataMolId, className: cm.cn(cm.stack(4), 'bg-surface-container-lowest rounded-xl overflow-hidden shadow-sm', className), children: [(title !== undefined || titleAction !== undefined) && (_jsxs("div", { className: cm.cn(cm.flex({ justify: 'between', align: 'center' }), cm.sp('px', 8), cm.sp('pt', 8)), children: [title !== undefined && (_jsx("h3", { className: cm.cn(cm.textSize('xl'), cm.fontWeight('bold'), 'text-on-surface'), children: title })), titleAction] })), _jsx("div", { className: "overflow-x-auto", children: _jsxs("table", { className: cm.cn(cm.w('full'), 'text-left border-collapse'), children: [_jsx("thead", { children: _jsx("tr", { className: "bg-surface-container-low border-b border-outline-variant/10", children: columns.map((col, idx) => (_jsx("th", { className: cm.cn(idx === 0 ? cm.sp('px', 8) : cm.sp('px', 4), cm.sp('py', 4), 'text-[10px] font-black text-on-surface-variant uppercase tracking-widest', col.headerClassName), children: col.header }, col.key))) }) }), _jsx("tbody", { className: "divide-y divide-surface-container", children: loading ? (Array.from({ length: 5 }).map((_, i) => (_jsx("tr", { "aria-hidden": "true", children: _jsx("td", { colSpan: columns.length, className: cm.cn(cm.sp('px', 8), cm.sp('py', 5)), children: _jsx("div", { className: cm.cn(cm.h(4), 'bg-surface-container-low rounded animate-pulse') }) }) }, `skeleton-${i}`)))) : rows.length === 0 ? (_jsx("tr", { children: _jsx("td", { colSpan: columns.length, className: cm.cn(cm.sp('px', 8), cm.sp('py', 12), cm.textCenter, 'text-on-surface-variant'), children: emptyMessage }) })) : (rows.map((row) => (_jsx("tr", { onClick: onRowClick ? () => onRowClick(row) : undefined, className: cm.cn(onRowClick ? cm.cursorPointer : '', 'hover:bg-surface-container-low transition-colors'), children: columns.map((col, idx) => (_jsx("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))))) })] }) })] }));
23
+ return (_jsxs("section", { "data-mol-id": dataMolId, className: cm.cn(cm.stack(4), cm.dataTableCardShell, className), children: [(title !== undefined || titleAction !== undefined) && (_jsxs("div", { className: cm.cn(cm.flex({ justify: 'between', align: 'center' }), cm.sp('px', 8), cm.sp('pt', 8)), children: [title !== undefined && (_jsx("h3", { className: cm.cn(cm.textSize('xl'), cm.fontWeight('bold'), cm.dataTableCardTitle), children: title })), titleAction] })), _jsx("div", { className: cm.dataTableCardScroller, children: _jsxs("table", { className: cm.cn(cm.w('full'), cm.dataTableCardTable), children: [_jsx("thead", { children: _jsx("tr", { className: cm.dataTableCardHead, children: columns.map((col, idx) => (_jsx("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("tbody", { className: cm.dataTableCardBody, children: loading ? (Array.from({ length: 5 }).map((_, i) => (_jsx("tr", { "aria-hidden": "true", children: _jsx("td", { colSpan: columns.length, className: cm.cn(cm.sp('px', 8), cm.sp('py', 5)), children: _jsx("div", { className: cm.cn(cm.h(4), cm.dataTableCardSkeletonBar) }) }) }, `skeleton-${i}`)))) : rows.length === 0 ? (_jsx("tr", { children: _jsx("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("tr", { onClick: onRowClick ? () => onRowClick(row) : undefined, className: cm.cn(onRowClick ? cm.cursorPointer : '', cm.dataTableCardRowHover), children: columns.map((col, idx) => (_jsx("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
24
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@molecule/app-data-table-ui-react",
3
- "version": "4.0.0",
4
- "description": "React row-level primitives for @molecule/app-ui-react Table (toolbar, row-with-actions, empty)",
3
+ "version": "4.0.2",
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",
7
7
  "main": "dist/index.js",
@@ -34,14 +34,14 @@
34
34
  },
35
35
  "peerDependencies": {
36
36
  "@molecule/app-react": "^4.0.0",
37
- "@molecule/app-ui": "^1.0.1",
37
+ "@molecule/app-ui": "^1.3.11",
38
38
  "@molecule/app-ui-react": "^4.0.0",
39
39
  "react": "^18.0.0 || ^19.0.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@molecule/app-react": "4.0.0",
43
- "@molecule/app-ui": "1.3.9",
44
- "@molecule/app-ui-react": "4.0.0",
42
+ "@molecule/app-react": "4.7.1",
43
+ "@molecule/app-ui": "1.4.0",
44
+ "@molecule/app-ui-react": "4.1.4",
45
45
  "@types/node": "26.6.5",
46
46
  "@types/react": "19.3.0",
47
47
  "@types/react-dom": "19.3.0",