@molecule/app-status-badge-react 4.0.0 → 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 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:41:40.037Z
6
+ Generated: 2026-11-25T00:25:48.122Z
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,9 +160,9 @@ function StatusPill({
160
160
 
161
161
  Peer dependencies:
162
162
 
163
- - `@molecule/app-react` ^4.0.0
163
+ - `@molecule/app-react` ^4.13.0
164
164
  - `@molecule/app-ui` ^1.0.1
165
- - `@molecule/app-ui-react` ^4.0.0
165
+ - `@molecule/app-ui-react` ^4.4.0
166
166
  - `react` ^18.0.0 || ^19.0.0
167
167
 
168
168
  ### Runtime Dependencies
@@ -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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H,wBAAgB,WAAW,CAAC,EAC1B,IAAgB,EAChB,QAAQ,EACR,IAAI,EAAE,QAAQ,EACd,UAAiB,EACjB,SAAS,GACV,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,CAiChC"}
@@ -1,6 +1,8 @@
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';
5
+ import { Box } from '@molecule/app-ui-react/elements';
4
6
  const KIND_TO_COLOR = {
5
7
  success: 'success',
6
8
  warning: 'warning',
@@ -20,10 +22,11 @@ const KIND_TO_COLOR = {
20
22
  *
21
23
  * @param props - Component props (see {@link StatusBadgeProps}).
22
24
  */
23
- export function StatusBadge({ kind = 'neutral', children, icon, appearance = 'ui', className, }) {
25
+ export function StatusBadge({ kind = 'neutral', children, icon: iconProp, appearance = 'ui', className, }) {
26
+ const icon = slot(iconProp);
24
27
  const cm = getClassMap();
25
28
  if (appearance === 'uppercase-pill') {
26
- 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] }));
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] }));
27
30
  }
28
- return (_jsxs(Badge, { color: KIND_TO_COLOR[kind], className: className, children: [icon && _jsx("span", { className: cm.sp('mr', 1), children: icon }), children] }));
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] }));
29
32
  }
@@ -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;AAI3C,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,CAoB/B"}
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"}
@@ -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", { 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("span", { className: cm.cn(cm.w(2), cm.h(2), cm.roundedFull, DOT_COLOR[kind]), "aria-hidden": true })), children] }));
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.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",
@@ -33,15 +33,15 @@
33
33
  "directory": "packages/app/features/status-badge-react"
34
34
  },
35
35
  "peerDependencies": {
36
- "@molecule/app-react": "^4.0.0",
36
+ "@molecule/app-react": "^4.13.0",
37
37
  "@molecule/app-ui": "^1.0.1",
38
- "@molecule/app-ui-react": "^4.0.0",
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.0.0",
43
- "@molecule/app-ui": "1.3.9",
44
- "@molecule/app-ui-react": "4.0.0",
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",