@molecule/app-list-item-row-react 4.1.1 → 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 +2 -2
- package/dist/ListItemRow.d.ts.map +1 -1
- package/dist/ListItemRow.js +3 -2
- package/package.json +5 -5
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
|
|
@@ -138,7 +138,7 @@ Peer dependencies:
|
|
|
138
138
|
|
|
139
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
|
|
@@ -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;AAIvD,OAAO,EAA0B,KAAK,2BAA2B,EAAE,MAAM,wBAAwB,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
|
@@ -3,6 +3,7 @@ import { useId } from 'react';
|
|
|
3
3
|
import { slot } from '@molecule/app-react/render';
|
|
4
4
|
import { getClassMap } from '@molecule/app-ui';
|
|
5
5
|
import { OptimisticToggleButton } from '@molecule/app-ui-react';
|
|
6
|
+
import { Box, Pressable } from '@molecule/app-ui-react/elements';
|
|
6
7
|
/**
|
|
7
8
|
* Generic "thumbnail + text + actions" row — used everywhere:
|
|
8
9
|
* navigation lists, mobile menus, inbox-style threads, search
|
|
@@ -27,12 +28,12 @@ export function ListItemRow({ title, subtitle, metadata, leading: leadingProp, a
|
|
|
27
28
|
const cm = getClassMap();
|
|
28
29
|
const nameId = useId();
|
|
29
30
|
const padY = density === 'compact' ? 2 : 3;
|
|
30
|
-
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: () => {
|
|
31
32
|
if (!disabled)
|
|
32
33
|
onClick();
|
|
33
34
|
},
|
|
34
35
|
/* mol-bespoke-button: the whole row is the hit area, not a CTA — an
|
|
35
36
|
empty, transparent button over the row; the inline background/
|
|
36
37
|
border/padding are native resets. */
|
|
37
|
-
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] }))] }));
|
|
38
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",
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
"peerDependencies": {
|
|
36
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",
|