@molecule/app-announcement-bar-react 3.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 +4 -4
- package/dist/AnnouncementBar.d.ts.map +1 -1
- package/dist/AnnouncementBar.js +3 -2
- package/package.json +7 -7
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-
|
|
6
|
+
Generated: 2026-11-25T03:49:03.845Z
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
# @molecule/app-announcement-bar-react
|
|
@@ -118,9 +118,9 @@ function AnnouncementBar({
|
|
|
118
118
|
|
|
119
119
|
Peer dependencies:
|
|
120
120
|
|
|
121
|
-
- `@molecule/app-react` ^
|
|
122
|
-
- `@molecule/app-ui` ^1.0
|
|
123
|
-
- `@molecule/app-ui-react` ^
|
|
121
|
+
- `@molecule/app-react` ^4.0.0
|
|
122
|
+
- `@molecule/app-ui` ^1.8.0
|
|
123
|
+
- `@molecule/app-ui-react` ^4.6.0
|
|
124
124
|
- `react` ^18.0.0 || ^19.0.0
|
|
125
125
|
|
|
126
126
|
### Runtime Dependencies
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnnouncementBar.d.ts","sourceRoot":"","sources":["../src/AnnouncementBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"AnnouncementBar.d.ts","sourceRoot":"","sources":["../src/AnnouncementBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAO3C,yGAAyG;AACzG,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAA;AAEjF,yCAAyC;AACzC,MAAM,WAAW,oBAAoB;IACnC,uBAAuB;IACvB,QAAQ,EAAE,SAAS,CAAA;IACnB,6BAA6B;IAC7B,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,gDAAgD;IAChD,MAAM,CAAC,EAAE;QAAE,KAAK,EAAE,SAAS,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;KAAE,CAAA;IAClE,4GAA4G;IAC5G,IAAI,CAAC,EAAE,gBAAgB,CAAA;IACvB,mDAAmD;IACnD,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,wCAAwC;IACxC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,uEAAuE;IACvE,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,IAAI,EACJ,MAAM,EACN,IAAa,EACb,WAAkB,EAClB,SAAS,EACT,OAAO,EACP,SAAS,EACT,SAAS,GACV,EAAE,oBAAoB,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CAoE3C"}
|
package/dist/AnnouncementBar.js
CHANGED
|
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { useTranslation } from '@molecule/app-react';
|
|
4
4
|
import { getClassMap } from '@molecule/app-ui';
|
|
5
|
+
import { Anchor, Box, Pressable } from '@molecule/app-ui-react/elements';
|
|
5
6
|
/**
|
|
6
7
|
* Persistent announcement banner — product updates, promos, outage
|
|
7
8
|
* notices, feature callouts. Different from `<Toast>` in being
|
|
@@ -22,6 +23,6 @@ export function AnnouncementBar({ children, icon, action, kind = 'info', dismiss
|
|
|
22
23
|
setInternalVisible(false);
|
|
23
24
|
onDismiss?.();
|
|
24
25
|
}
|
|
25
|
-
const actionNode = action ? (action.href ? (_jsx(
|
|
26
|
-
return (_jsxs("div",
|
|
26
|
+
const actionNode = action ? (action.href ? (_jsx(Anchor, { href: action.href, className: cm.cn(cm.textSize('sm'), cm.fontWeight('semibold'), cm.link), children: action.label })) : (_jsx(Pressable, { as: "button", type: "button", onClick: action.onClick, className: cm.cn(cm.textSize('sm'), cm.fontWeight('semibold'), cm.link), children: action.label }))) : null;
|
|
27
|
+
return (_jsxs(Box, { as: "div", role: "status", "data-mol-id": dataMolId, "data-kind": kind, className: cm.cn(cm.flex({ align: 'center', justify: 'between', gap: 'md', wrap: 'wrap' }), cm.sp('px', 4), cm.sp('py', 2), className), children: [_jsxs(Box, { as: "div", className: cm.flex({ align: 'center', gap: 'sm' }), children: [icon, _jsx(Box, { as: "span", className: cm.textSize('sm'), children: children })] }), _jsxs(Box, { as: "div", className: cm.flex({ align: 'center', gap: 'sm' }), children: [actionNode, dismissible && (_jsx(Pressable, { as: "button", type: "button", onClick: dismiss, "aria-label": t('announcement.dismiss', {}, { defaultValue: 'Dismiss' }), className: cm.cn(cm.w(6), cm.h(6), cm.flex({ align: 'center', justify: 'center' })), children: "\u00D7" }))] })] }));
|
|
27
28
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@molecule/app-announcement-bar-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "Persistent banner for announcements, promos, feature callouts, with dismiss + CTA",
|
|
5
5
|
"homepage": "https://www.molecule.dev/packages/app-announcement-bar-react",
|
|
6
6
|
"type": "module",
|
|
@@ -33,15 +33,15 @@
|
|
|
33
33
|
"directory": "packages/app/features/announcement-bar-react"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@molecule/app-react": "^
|
|
37
|
-
"@molecule/app-ui": "^1.0
|
|
38
|
-
"@molecule/app-ui-react": "^
|
|
36
|
+
"@molecule/app-react": "^4.0.0",
|
|
37
|
+
"@molecule/app-ui": "^1.8.0",
|
|
38
|
+
"@molecule/app-ui-react": "^4.6.0",
|
|
39
39
|
"react": "^18.0.0 || ^19.0.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@molecule/app-react": "
|
|
43
|
-
"@molecule/app-ui": "1.
|
|
44
|
-
"@molecule/app-ui-react": "
|
|
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",
|