@molecule/app-status-badge-react 4.0.0 → 4.0.1
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 +3 -3
- package/dist/StatusBadge.d.ts +1 -1
- package/dist/StatusBadge.d.ts.map +1 -1
- package/dist/StatusBadge.js +3 -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-24T08:59:52.951Z
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
# @molecule/app-status-badge-react
|
|
@@ -127,7 +127,7 @@ pill with the same per-kind `bg-*` / `text-*` colors.
|
|
|
127
127
|
function StatusBadge({
|
|
128
128
|
kind = 'neutral',
|
|
129
129
|
children,
|
|
130
|
-
icon,
|
|
130
|
+
icon: iconProp,
|
|
131
131
|
appearance = 'ui',
|
|
132
132
|
className,
|
|
133
133
|
}: StatusBadgeProps): JSX.Element
|
|
@@ -160,7 +160,7 @@ function StatusPill({
|
|
|
160
160
|
|
|
161
161
|
Peer dependencies:
|
|
162
162
|
|
|
163
|
-
- `@molecule/app-react` ^4.
|
|
163
|
+
- `@molecule/app-react` ^4.13.0
|
|
164
164
|
- `@molecule/app-ui` ^1.0.1
|
|
165
165
|
- `@molecule/app-ui-react` ^4.0.0
|
|
166
166
|
- `react` ^18.0.0 || ^19.0.0
|
package/dist/StatusBadge.d.ts
CHANGED
|
@@ -37,5 +37,5 @@ export interface StatusBadgeProps {
|
|
|
37
37
|
*
|
|
38
38
|
* @param props - Component props (see {@link StatusBadgeProps}).
|
|
39
39
|
*/
|
|
40
|
-
export declare function StatusBadge({ kind, children, icon, appearance, className, }: StatusBadgeProps): JSX.Element;
|
|
40
|
+
export declare function StatusBadge({ kind, children, icon: iconProp, appearance, className, }: StatusBadgeProps): JSX.Element;
|
|
41
41
|
//# sourceMappingURL=StatusBadge.d.ts.map
|
|
@@ -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;AAM3C,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,CAwBhC"}
|
package/dist/StatusBadge.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
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';
|
|
3
4
|
import { Badge } from '@molecule/app-ui-react';
|
|
4
5
|
const KIND_TO_COLOR = {
|
|
@@ -20,7 +21,8 @@ const KIND_TO_COLOR = {
|
|
|
20
21
|
*
|
|
21
22
|
* @param props - Component props (see {@link StatusBadgeProps}).
|
|
22
23
|
*/
|
|
23
|
-
export function StatusBadge({ kind = 'neutral', children, icon, appearance = 'ui', className, }) {
|
|
24
|
+
export function StatusBadge({ kind = 'neutral', children, icon: iconProp, appearance = 'ui', className, }) {
|
|
25
|
+
const icon = slot(iconProp);
|
|
24
26
|
const cm = getClassMap();
|
|
25
27
|
if (appearance === 'uppercase-pill') {
|
|
26
28
|
return (_jsxs("span", { className: cm.cn(cm.badge({ variant: KIND_TO_COLOR[kind] }), cm.uppercase, cm.trackingWide, className), children: [icon && _jsx("span", { className: cm.sp('mr', 1), children: icon }), children] }));
|
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.0.1",
|
|
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",
|
|
@@ -33,15 +33,15 @@
|
|
|
33
33
|
"directory": "packages/app/features/status-badge-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
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.
|
|
43
|
-
"@molecule/app-ui": "1.
|
|
44
|
-
"@molecule/app-ui-react": "4.
|
|
42
|
+
"@molecule/app-react": "4.13.0",
|
|
43
|
+
"@molecule/app-ui": "1.5.0",
|
|
44
|
+
"@molecule/app-ui-react": "4.3.2",
|
|
45
45
|
"@types/node": "26.6.5",
|
|
46
46
|
"@types/react": "19.3.0",
|
|
47
47
|
"@types/react-dom": "19.3.0",
|