@molecule/app-status-badge-react 4.0.1 → 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 +2 -2
- package/dist/StatusBadge.d.ts.map +1 -1
- package/dist/StatusBadge.js +3 -2
- package/dist/StatusPill.d.ts.map +1 -1
- package/dist/StatusPill.js +2 -1
- 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:48.122Z
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
# @molecule/app-status-badge-react
|
|
@@ -162,7 +162,7 @@ Peer dependencies:
|
|
|
162
162
|
|
|
163
163
|
- `@molecule/app-react` ^4.13.0
|
|
164
164
|
- `@molecule/app-ui` ^1.0.1
|
|
165
|
-
- `@molecule/app-ui-react` ^4.
|
|
165
|
+
- `@molecule/app-ui-react` ^4.4.0
|
|
166
166
|
- `react` ^18.0.0 || ^19.0.0
|
|
167
167
|
|
|
168
168
|
### Runtime Dependencies
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusBadge.d.ts","sourceRoot":"","sources":["../src/StatusBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"StatusBadge.d.ts","sourceRoot":"","sources":["../src/StatusBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAO3C,gEAAgE;AAChE,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAA;AAE7E,mDAAmD;AACnD,MAAM,WAAW,gBAAgB;IAC/B,6DAA6D;IAC7D,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,wCAAwC;IACxC,QAAQ,EAAE,SAAS,CAAA;IACnB,mDAAmD;IACnD,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,EAAE,IAAI,GAAG,gBAAgB,CAAA;IACpC,4DAA4D;IAC5D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAUD;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,EAC1B,IAAgB,EAChB,QAAQ,EACR,IAAI,EAAE,QAAQ,EACd,UAAiB,EACjB,SAAS,GACV,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,CAiChC"}
|
package/dist/StatusBadge.js
CHANGED
|
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { slot } from '@molecule/app-react/render';
|
|
3
3
|
import { getClassMap } from '@molecule/app-ui';
|
|
4
4
|
import { Badge } from '@molecule/app-ui-react';
|
|
5
|
+
import { Box } from '@molecule/app-ui-react/elements';
|
|
5
6
|
const KIND_TO_COLOR = {
|
|
6
7
|
success: 'success',
|
|
7
8
|
warning: 'warning',
|
|
@@ -25,7 +26,7 @@ export function StatusBadge({ kind = 'neutral', children, icon: iconProp, appear
|
|
|
25
26
|
const icon = slot(iconProp);
|
|
26
27
|
const cm = getClassMap();
|
|
27
28
|
if (appearance === 'uppercase-pill') {
|
|
28
|
-
return (_jsxs("span",
|
|
29
|
+
return (_jsxs(Box, { as: "span", className: cm.cn(cm.badge({ variant: KIND_TO_COLOR[kind] }), cm.uppercase, cm.trackingWide, className), children: [icon && (_jsx(Box, { as: "span", className: cm.sp('mr', 1), children: icon })), children] }));
|
|
29
30
|
}
|
|
30
|
-
return (_jsxs(Badge, { color: KIND_TO_COLOR[kind], className: className, children: [icon && _jsx("span",
|
|
31
|
+
return (_jsxs(Badge, { color: KIND_TO_COLOR[kind], className: className, children: [icon && (_jsx(Box, { as: "span", className: cm.sp('mr', 1), children: icon })), children] }));
|
|
31
32
|
}
|
package/dist/StatusPill.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusPill.d.ts","sourceRoot":"","sources":["../src/StatusPill.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"StatusPill.d.ts","sourceRoot":"","sources":["../src/StatusPill.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAK3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD,kDAAkD;AAClD,MAAM,WAAW,eAAe;IAC9B,qBAAqB;IACrB,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,kBAAkB;IAClB,QAAQ,EAAE,SAAS,CAAA;IACnB,wDAAwD;IACxD,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAUD;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,EACzB,IAAgB,EAChB,QAAQ,EACR,GAAU,EACV,SAAS,GACV,EAAE,eAAe,GAAG,GAAG,CAAC,OAAO,CAyB/B"}
|
package/dist/StatusPill.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
|
const DOT_COLOR = {
|
|
4
5
|
success: 'bg-success',
|
|
5
6
|
warning: 'bg-warning',
|
|
@@ -17,5 +18,5 @@ const DOT_COLOR = {
|
|
|
17
18
|
*/
|
|
18
19
|
export function StatusPill({ kind = 'neutral', children, dot = true, className, }) {
|
|
19
20
|
const cm = getClassMap();
|
|
20
|
-
return (_jsxs("span",
|
|
21
|
+
return (_jsxs(Box, { as: "span", className: cm.cn(cm.flex({ align: 'center', gap: 'xs' }), cm.sp('px', 3), cm.sp('py', 1), cm.roundedFull, cm.textSize('xs'), cm.fontWeight('medium'), className), children: [dot && (_jsx(Box, { as: "span", className: cm.cn(cm.w(2), cm.h(2), cm.roundedFull, DOT_COLOR[kind]), "aria-hidden": true })), children] }));
|
|
21
22
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@molecule/app-status-badge-react",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "React status badge / pill with semantic kinds",
|
|
5
5
|
"homepage": "https://www.molecule.dev/packages/app-status-badge-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",
|