@molecule/app-list-item-row-react 4.1.0 → 4.2.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 +5 -5
- package/dist/ListItemRow.d.ts +1 -1
- package/dist/ListItemRow.d.ts.map +1 -1
- package/dist/ListItemRow.js +7 -3
- 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-25T00:25:46.729Z
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
# @molecule/app-list-item-row-react
|
|
@@ -117,8 +117,8 @@ function ListItemRow({
|
|
|
117
117
|
title,
|
|
118
118
|
subtitle,
|
|
119
119
|
metadata,
|
|
120
|
-
leading,
|
|
121
|
-
actions,
|
|
120
|
+
leading: leadingProp,
|
|
121
|
+
actions: actionsProp,
|
|
122
122
|
toggle,
|
|
123
123
|
onClick,
|
|
124
124
|
selected,
|
|
@@ -136,9 +136,9 @@ function ListItemRow({
|
|
|
136
136
|
|
|
137
137
|
Peer dependencies:
|
|
138
138
|
|
|
139
|
-
- `@molecule/app-react` ^4.
|
|
139
|
+
- `@molecule/app-react` ^4.13.0
|
|
140
140
|
- `@molecule/app-ui` ^1.0.1
|
|
141
|
-
- `@molecule/app-ui-react` ^4.
|
|
141
|
+
- `@molecule/app-ui-react` ^4.4.0
|
|
142
142
|
- `react` ^18.0.0 || ^19.0.0
|
|
143
143
|
|
|
144
144
|
### Runtime Dependencies
|
package/dist/ListItemRow.d.ts
CHANGED
|
@@ -47,5 +47,5 @@ export interface ListItemRowProps {
|
|
|
47
47
|
* in NOT being a `<tr>` — use this for non-table lists.
|
|
48
48
|
* @param props - Component props (see {@link ListItemRowProps}).
|
|
49
49
|
*/
|
|
50
|
-
export declare function ListItemRow({ title, subtitle, metadata, leading, actions, toggle, onClick, selected, disabled, density, className, }: ListItemRowProps): JSX.Element;
|
|
50
|
+
export declare function ListItemRow({ title, subtitle, metadata, leading: leadingProp, actions: actionsProp, toggle, onClick, selected, disabled, density, className, }: ListItemRowProps): JSX.Element;
|
|
51
51
|
//# sourceMappingURL=ListItemRow.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemRow.d.ts","sourceRoot":"","sources":["../src/ListItemRow.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"ListItemRow.d.ts","sourceRoot":"","sources":["../src/ListItemRow.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAA;AAIvD,OAAO,EAA0B,KAAK,2BAA2B,EAAE,MAAM,wBAAwB,CAAA;AAGjG,qCAAqC;AACrC,MAAM,WAAW,gBAAgB;IAC/B,0BAA0B;IAC1B,KAAK,EAAE,SAAS,CAAA;IAChB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,iEAAiE;IACjE,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,6DAA6D;IAC7D,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,0DAA0D;IAC1D,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,8FAA8F;IAC9F,MAAM,CAAC,EAAE,2BAA2B,CAAA;IACpC;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,6HAA6H;IAC7H,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,kFAAkF;IAClF,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,iEAAiE;IACjE,OAAO,CAAC,EAAE,aAAa,GAAG,SAAS,CAAA;IACnC,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,WAAW,EACpB,MAAM,EACN,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,OAAuB,EACvB,SAAS,GACV,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,CA0EhC"}
|
package/dist/ListItemRow.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useId } from 'react';
|
|
3
|
+
import { slot } from '@molecule/app-react/render';
|
|
3
4
|
import { getClassMap } from '@molecule/app-ui';
|
|
4
5
|
import { OptimisticToggleButton } from '@molecule/app-ui-react';
|
|
6
|
+
import { Box, Pressable } from '@molecule/app-ui-react/elements';
|
|
5
7
|
/**
|
|
6
8
|
* Generic "thumbnail + text + actions" row — used everywhere:
|
|
7
9
|
* navigation lists, mobile menus, inbox-style threads, search
|
|
@@ -20,16 +22,18 @@ import { OptimisticToggleButton } from '@molecule/app-ui-react';
|
|
|
20
22
|
* in NOT being a `<tr>` — use this for non-table lists.
|
|
21
23
|
* @param props - Component props (see {@link ListItemRowProps}).
|
|
22
24
|
*/
|
|
23
|
-
export function ListItemRow({ title, subtitle, metadata, leading, actions, toggle, onClick, selected, disabled, density = 'comfortable', className, }) {
|
|
25
|
+
export function ListItemRow({ title, subtitle, metadata, leading: leadingProp, actions: actionsProp, toggle, onClick, selected, disabled, density = 'comfortable', className, }) {
|
|
26
|
+
const leading = slot(leadingProp);
|
|
27
|
+
const actions = slot(actionsProp);
|
|
24
28
|
const cm = getClassMap();
|
|
25
29
|
const nameId = useId();
|
|
26
30
|
const padY = density === 'compact' ? 2 : 3;
|
|
27
|
-
return (_jsxs("div",
|
|
31
|
+
return (_jsxs(Box, { as: "div", "aria-current": selected ? true : undefined, "aria-disabled": disabled, className: cm.cn(cm.flex({ align: 'center', gap: 'sm' }), cm.sp('px', 3), cm.sp('py', padY), onClick ? cm.position('relative') : undefined, className), style: disabled ? { opacity: 0.5 } : undefined, children: [onClick && (_jsx(Pressable, { as: "button", type: "button", "aria-labelledby": nameId, "data-mol-id": "list-item-row-open", disabled: disabled, onClick: () => {
|
|
28
32
|
if (!disabled)
|
|
29
33
|
onClick();
|
|
30
34
|
},
|
|
31
35
|
/* mol-bespoke-button: the whole row is the hit area, not a CTA — an
|
|
32
36
|
empty, transparent button over the row; the inline background/
|
|
33
37
|
border/padding are native resets. */
|
|
34
|
-
className: cm.cn(cm.position('absolute'), cm.inset0, disabled ? undefined : cm.cursorPointer),
|
|
38
|
+
className: cm.cn(cm.position('absolute'), cm.inset0, disabled ? undefined : cm.cursorPointer), webStyle: { background: 'transparent', border: 'none', padding: 0 } })), leading && (_jsx(Box, { as: "div", className: cm.shrink0, children: leading })), _jsxs(Box, { as: "div", className: cm.cn(cm.flex1, cm.stack(0)), children: [_jsx(Box, { as: "div", id: onClick ? nameId : undefined, className: cm.cn(cm.textSize('sm'), cm.fontWeight('semibold')), children: title }), subtitle && (_jsx(Box, { as: "div", className: cm.textSize('sm'), children: subtitle })), metadata && (_jsx(Box, { as: "div", className: cm.textSize('xs'), children: metadata }))] }), (toggle || actions) && (_jsxs(Box, { as: "div", className: cm.cn(cm.shrink0, cm.position('relative')), children: [toggle && _jsx(OptimisticToggleButton, { ...toggle }), actions] }))] }));
|
|
35
39
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@molecule/app-list-item-row-react",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"description": "Thumbnail + title + subtitle + metadata + actions row (nav lists, mobile menus)",
|
|
5
5
|
"homepage": "https://www.molecule.dev/packages/app-list-item-row-react",
|
|
6
6
|
"type": "module",
|
|
@@ -33,15 +33,15 @@
|
|
|
33
33
|
"directory": "packages/app/features/list-item-row-react"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@molecule/app-react": "^4.
|
|
36
|
+
"@molecule/app-react": "^4.13.0",
|
|
37
37
|
"@molecule/app-ui": "^1.0.1",
|
|
38
|
-
"@molecule/app-ui-react": "^4.
|
|
38
|
+
"@molecule/app-ui-react": "^4.4.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",
|