@neo4j-ndl/react 4.23.5 → 4.24.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.
Files changed (81) hide show
  1. package/lib/cjs/announcement-banner/AnnouncementBanner.js +198 -0
  2. package/lib/cjs/announcement-banner/AnnouncementBanner.js.map +1 -0
  3. package/lib/cjs/announcement-banner/index.js +38 -0
  4. package/lib/cjs/announcement-banner/index.js.map +1 -0
  5. package/lib/cjs/announcement-banner/stories/announcement-banner-closeable.story.js +30 -0
  6. package/lib/cjs/announcement-banner/stories/announcement-banner-closeable.story.js.map +1 -0
  7. package/lib/cjs/announcement-banner/stories/announcement-banner-custom-icons.story.js +31 -0
  8. package/lib/cjs/announcement-banner/stories/announcement-banner-custom-icons.story.js.map +1 -0
  9. package/lib/cjs/announcement-banner/stories/announcement-banner-default.story.js +30 -0
  10. package/lib/cjs/announcement-banner/stories/announcement-banner-default.story.js.map +1 -0
  11. package/lib/cjs/announcement-banner/stories/announcement-banner-injected-non-urgent.story.js +32 -0
  12. package/lib/cjs/announcement-banner/stories/announcement-banner-injected-non-urgent.story.js.map +1 -0
  13. package/lib/cjs/announcement-banner/stories/announcement-banner-injected-urgent.story.js +32 -0
  14. package/lib/cjs/announcement-banner/stories/announcement-banner-injected-urgent.story.js.map +1 -0
  15. package/lib/cjs/announcement-banner/stories/announcement-banner-present-at-page-render.story.js +30 -0
  16. package/lib/cjs/announcement-banner/stories/announcement-banner-present-at-page-render.story.js.map +1 -0
  17. package/lib/cjs/announcement-banner/stories/announcement-banner-variants.story.js +30 -0
  18. package/lib/cjs/announcement-banner/stories/announcement-banner-variants.story.js.map +1 -0
  19. package/lib/cjs/announcement-banner/stories/announcement-banner-with-actions.story.js +30 -0
  20. package/lib/cjs/announcement-banner/stories/announcement-banner-with-actions.story.js.map +1 -0
  21. package/lib/cjs/announcement-banner/stories/announcement-banner-with-page-content.story.js +32 -0
  22. package/lib/cjs/announcement-banner/stories/announcement-banner-with-page-content.story.js.map +1 -0
  23. package/lib/cjs/announcement-banner/stories/index.js +64 -0
  24. package/lib/cjs/announcement-banner/stories/index.js.map +1 -0
  25. package/lib/cjs/index.js +4 -2
  26. package/lib/cjs/index.js.map +1 -1
  27. package/lib/esm/announcement-banner/AnnouncementBanner.js +159 -0
  28. package/lib/esm/announcement-banner/AnnouncementBanner.js.map +1 -0
  29. package/lib/esm/announcement-banner/index.js +22 -0
  30. package/lib/esm/announcement-banner/index.js.map +1 -0
  31. package/lib/esm/announcement-banner/stories/announcement-banner-closeable.story.js +28 -0
  32. package/lib/esm/announcement-banner/stories/announcement-banner-closeable.story.js.map +1 -0
  33. package/lib/esm/announcement-banner/stories/announcement-banner-custom-icons.story.js +29 -0
  34. package/lib/esm/announcement-banner/stories/announcement-banner-custom-icons.story.js.map +1 -0
  35. package/lib/esm/announcement-banner/stories/announcement-banner-default.story.js +28 -0
  36. package/lib/esm/announcement-banner/stories/announcement-banner-default.story.js.map +1 -0
  37. package/lib/esm/announcement-banner/stories/announcement-banner-injected-non-urgent.story.js +30 -0
  38. package/lib/esm/announcement-banner/stories/announcement-banner-injected-non-urgent.story.js.map +1 -0
  39. package/lib/esm/announcement-banner/stories/announcement-banner-injected-urgent.story.js +30 -0
  40. package/lib/esm/announcement-banner/stories/announcement-banner-injected-urgent.story.js.map +1 -0
  41. package/lib/esm/announcement-banner/stories/announcement-banner-present-at-page-render.story.js +28 -0
  42. package/lib/esm/announcement-banner/stories/announcement-banner-present-at-page-render.story.js.map +1 -0
  43. package/lib/esm/announcement-banner/stories/announcement-banner-variants.story.js +28 -0
  44. package/lib/esm/announcement-banner/stories/announcement-banner-variants.story.js.map +1 -0
  45. package/lib/esm/announcement-banner/stories/announcement-banner-with-actions.story.js +28 -0
  46. package/lib/esm/announcement-banner/stories/announcement-banner-with-actions.story.js.map +1 -0
  47. package/lib/esm/announcement-banner/stories/announcement-banner-with-page-content.story.js +30 -0
  48. package/lib/esm/announcement-banner/stories/announcement-banner-with-page-content.story.js.map +1 -0
  49. package/lib/esm/announcement-banner/stories/index.js +49 -0
  50. package/lib/esm/announcement-banner/stories/index.js.map +1 -0
  51. package/lib/esm/index.js +1 -0
  52. package/lib/esm/index.js.map +1 -1
  53. package/lib/types/announcement-banner/AnnouncementBanner.d.ts +75 -0
  54. package/lib/types/announcement-banner/AnnouncementBanner.d.ts.map +1 -0
  55. package/lib/types/announcement-banner/index.d.ts +22 -0
  56. package/lib/types/announcement-banner/index.d.ts.map +1 -0
  57. package/lib/types/announcement-banner/stories/announcement-banner-closeable.story.d.ts +24 -0
  58. package/lib/types/announcement-banner/stories/announcement-banner-closeable.story.d.ts.map +1 -0
  59. package/lib/types/announcement-banner/stories/announcement-banner-custom-icons.story.d.ts +24 -0
  60. package/lib/types/announcement-banner/stories/announcement-banner-custom-icons.story.d.ts.map +1 -0
  61. package/lib/types/announcement-banner/stories/announcement-banner-default.story.d.ts +24 -0
  62. package/lib/types/announcement-banner/stories/announcement-banner-default.story.d.ts.map +1 -0
  63. package/lib/types/announcement-banner/stories/announcement-banner-injected-non-urgent.story.d.ts +24 -0
  64. package/lib/types/announcement-banner/stories/announcement-banner-injected-non-urgent.story.d.ts.map +1 -0
  65. package/lib/types/announcement-banner/stories/announcement-banner-injected-urgent.story.d.ts +24 -0
  66. package/lib/types/announcement-banner/stories/announcement-banner-injected-urgent.story.d.ts.map +1 -0
  67. package/lib/types/announcement-banner/stories/announcement-banner-present-at-page-render.story.d.ts +24 -0
  68. package/lib/types/announcement-banner/stories/announcement-banner-present-at-page-render.story.d.ts.map +1 -0
  69. package/lib/types/announcement-banner/stories/announcement-banner-variants.story.d.ts +24 -0
  70. package/lib/types/announcement-banner/stories/announcement-banner-variants.story.d.ts.map +1 -0
  71. package/lib/types/announcement-banner/stories/announcement-banner-with-actions.story.d.ts +24 -0
  72. package/lib/types/announcement-banner/stories/announcement-banner-with-actions.story.d.ts.map +1 -0
  73. package/lib/types/announcement-banner/stories/announcement-banner-with-page-content.story.d.ts +24 -0
  74. package/lib/types/announcement-banner/stories/announcement-banner-with-page-content.story.d.ts.map +1 -0
  75. package/lib/types/announcement-banner/stories/index.d.ts +39 -0
  76. package/lib/types/announcement-banner/stories/index.d.ts.map +1 -0
  77. package/lib/types/index.d.ts +1 -0
  78. package/lib/types/index.d.ts.map +1 -1
  79. package/package.json +7 -2
  80. package/skills/ndl-react/SKILL.md +3 -2
  81. package/skills/ndl-react/components/announcement-banner.md +468 -0
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ /**
5
+ *
6
+ * Copyright (c) "Neo4j"
7
+ * Neo4j Sweden AB [http://neo4j.com]
8
+ *
9
+ * This file is part of Neo4j.
10
+ *
11
+ * Neo4j is free software: you can redistribute it and/or modify
12
+ * it under the terms of the GNU General Public License as published by
13
+ * the Free Software Foundation, either version 3 of the License, or
14
+ * (at your option) any later version.
15
+ *
16
+ * This program is distributed in the hope that it will be useful,
17
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
+ * GNU General Public License for more details.
20
+ *
21
+ * You should have received a copy of the GNU General Public License
22
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
23
+ */
24
+ require("@neo4j-ndl/base/lib/neo4j-ds-styles.css");
25
+ const react_1 = require("@neo4j-ndl/react");
26
+ const react_2 = require("react");
27
+ const Component = () => {
28
+ const [isVisible, setIsVisible] = (0, react_2.useState)(true);
29
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "n-flex n-flex-col n-max-w-[768px] n-h-52", children: [isVisible && ((0, jsx_runtime_1.jsxs)(react_1.AnnouncementBanner, { variant: "warning", hasIcon: true, isCloseable: true, onClose: () => setIsVisible(false), children: [(0, jsx_runtime_1.jsx)(react_1.AnnouncementBanner.Header, { children: "Scheduled maintenance starts tonight at 22:00 UTC." }), (0, jsx_runtime_1.jsx)(react_1.AnnouncementBanner.Actions, { children: (0, jsx_runtime_1.jsx)(react_1.OutlinedButton, { children: "Learn more" }) })] })), (0, jsx_runtime_1.jsxs)("div", { className: "n-flex n-flex-col n-gap-token-16 n-p-token-24 n-bg-neutral-bg-default n-flex-1 n-min-h-0 n-overflow-y-auto", children: [!isVisible && ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(react_1.TextButton, { onClick: () => setIsVisible(true), children: "Show announcement again" }) })), (0, jsx_runtime_1.jsx)(react_1.Typography, { variant: "title-2", children: "Page title" }), (0, jsx_runtime_1.jsx)(react_1.OutlinedButton, { children: "Can focus" }), (0, jsx_runtime_1.jsx)(react_1.Typography, { variant: "body-medium", children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque tempus, quam non molestie faucibus, orci nibh bibendum urna, ut lacinia orci dui a augue. Nullam at risus quam. Fusce pulvinar, metus vitae finibus dapibus, nisi ipsum venenatis sapien, at facilisis eros massa ac nunc. Aliquam sed odio orci. Vivamus condimentum sit amet ipsum bibendum sollicitudin. Etiam eget vehicula urna, et ullamcorper libero. Interdum et malesuada fames ac ante ipsum primis in faucibus. Proin sodales euismod sem, posuere maximus libero interdum semper. Nunc mollis posuere arcu non elementum. Vivamus sed laoreet mauris. Etiam fringilla arcu convallis erat vehicula iaculis. Pellentesque dictum aliquam cursus." }), (0, jsx_runtime_1.jsx)(react_1.Typography, { variant: "body-medium", children: "Integer vehicula turpis quis risus aliquet congue. Vivamus pellentesque nibh ac blandit varius. Fusce placerat lacus ut mauris porta, nec facilisis risus pulvinar. Nullam elementum nulla ut laoreet imperdiet. Maecenas eget erat erat. Phasellus in turpis placerat, imperdiet ante nec, tincidunt nisl. Donec a lacus neque. Nullam iaculis ante molestie ultrices semper. Sed non lorem ullamcorper ligula elementum convallis. Aenean egestas risus quis tortor cursus dapibus. Nulla hendrerit at orci ut scelerisque. Nullam vel bibendum tellus. Praesent efficitur ultrices lectus at posuere. Maecenas facilisis lacus ac turpis malesuada, sit amet imperdiet ipsum condimentum. Donec et nibh eget justo luctus ornare. Maecenas suscipit nulla at ullamcorper congue." }), (0, jsx_runtime_1.jsx)(react_1.Typography, { variant: "body-medium", children: "Vestibulum vehicula nibh mi, ultrices condimentum massa venenatis sit amet. Pellentesque accumsan mollis ex, id lobortis lacus venenatis id. Proin sem dui, mollis id gravida ac, vulputate et lacus. In pharetra nunc odio, in fermentum elit dignissim at. Nunc ut justo elit. Proin ligula orci, faucibus vitae vehicula nec, faucibus sit amet erat. Interdum et malesuada fames ac ante ipsum primis in faucibus. Quisque pharetra venenatis rutrum. Sed pharetra turpis id arcu maximus, interdum rhoncus eros mollis. Donec vitae sapien et odio interdum bibendum. Quisque eleifend, sem ut ornare mollis, orci nunc dapibus odio, aliquam fringilla augue nulla id magna. Phasellus consectetur, velit egestas sodales ultricies, odio nunc facilisis libero, vel vehicula nisi quam quis nisl. Proin vel massa libero." }), (0, jsx_runtime_1.jsx)(react_1.Typography, { variant: "body-medium", children: "Sed mollis lacinia tincidunt. Curabitur blandit pellentesque consequat. Maecenas mollis pharetra dolor in ornare. Cras vel nibh eu nisi venenatis convallis id vel nisl. Curabitur et viverra nisl. Phasellus et finibus turpis. Praesent scelerisque vel lectus at imperdiet. Curabitur porta egestas magna ullamcorper hendrerit." }), (0, jsx_runtime_1.jsx)(react_1.Typography, { variant: "body-medium", children: "Curabitur hendrerit egestas mi, ut venenatis turpis sagittis nec. Proin consectetur, nisi et vehicula placerat, tellus augue luctus odio, in commodo mauris urna nec libero. Maecenas eu placerat sapien, in aliquam tellus. Sed pharetra nunc id urna iaculis tincidunt. In hac habitasse platea dictumst. Donec tincidunt risus vitae congue congue. Fusce consequat ut justo ut tristique. Nunc ut urna quis neque consequat venenatis. Praesent nec feugiat orci. Vestibulum rutrum dui lacus, sit amet vulputate dolor finibus ut. Donec placerat urna eu fringilla convallis. Praesent sollicitudin felis at lacus semper, vel convallis magna scelerisque." })] })] }));
30
+ };
31
+ exports.default = Component;
32
+ //# sourceMappingURL=announcement-banner-with-page-content.story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"announcement-banner-with-page-content.story.js","sourceRoot":"","sources":["../../../../src/announcement-banner/stories/announcement-banner-with-page-content.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAK0B;AAC1B,iCAAiC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,IAAA,gBAAQ,EAAC,IAAI,CAAC,CAAC;IAEjD,OAAO,CACL,iCAAK,SAAS,EAAC,0CAA0C,aACtD,SAAS,IAAI,CACZ,wBAAC,0BAAkB,IACjB,OAAO,EAAC,SAAS,EACjB,OAAO,EAAE,IAAI,EACb,WAAW,EAAE,IAAI,EACjB,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,aAElC,uBAAC,0BAAkB,CAAC,MAAM,qEAEE,EAC5B,uBAAC,0BAAkB,CAAC,OAAO,cACzB,uBAAC,sBAAc,6BAA4B,GAChB,IACV,CACtB,EACD,iCAAK,SAAS,EAAC,4GAA4G,aACxH,CAAC,SAAS,IAAI,CACb,0CACE,uBAAC,kBAAU,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,wCAEhC,GACT,CACP,EACD,uBAAC,kBAAU,IAAC,OAAO,EAAC,SAAS,2BAAwB,EACrD,uBAAC,sBAAc,4BAA2B,EAC1C,uBAAC,kBAAU,IAAC,OAAO,EAAC,aAAa,6sBAYpB,EACb,uBAAC,kBAAU,IAAC,OAAO,EAAC,aAAa,owBAapB,EACb,uBAAC,kBAAU,IAAC,OAAO,EAAC,aAAa,izBAapB,EACb,uBAAC,kBAAU,IAAC,OAAO,EAAC,aAAa,oVAMpB,EACb,uBAAC,kBAAU,IAAC,OAAO,EAAC,aAAa,kpBAWpB,IACT,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport {\n AnnouncementBanner,\n OutlinedButton,\n TextButton,\n Typography,\n} from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [isVisible, setIsVisible] = useState(true);\n\n return (\n <div className=\"n-flex n-flex-col n-max-w-[768px] n-h-52\">\n {isVisible && (\n <AnnouncementBanner\n variant=\"warning\"\n hasIcon={true}\n isCloseable={true}\n onClose={() => setIsVisible(false)}\n >\n <AnnouncementBanner.Header>\n Scheduled maintenance starts tonight at 22:00 UTC.\n </AnnouncementBanner.Header>\n <AnnouncementBanner.Actions>\n <OutlinedButton>Learn more</OutlinedButton>\n </AnnouncementBanner.Actions>\n </AnnouncementBanner>\n )}\n <div className=\"n-flex n-flex-col n-gap-token-16 n-p-token-24 n-bg-neutral-bg-default n-flex-1 n-min-h-0 n-overflow-y-auto\">\n {!isVisible && (\n <div>\n <TextButton onClick={() => setIsVisible(true)}>\n Show announcement again\n </TextButton>\n </div>\n )}\n <Typography variant=\"title-2\">Page title</Typography>\n <OutlinedButton>Can focus</OutlinedButton>\n <Typography variant=\"body-medium\">\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque\n tempus, quam non molestie faucibus, orci nibh bibendum urna, ut\n lacinia orci dui a augue. Nullam at risus quam. Fusce pulvinar, metus\n vitae finibus dapibus, nisi ipsum venenatis sapien, at facilisis eros\n massa ac nunc. Aliquam sed odio orci. Vivamus condimentum sit amet\n ipsum bibendum sollicitudin. Etiam eget vehicula urna, et ullamcorper\n libero. Interdum et malesuada fames ac ante ipsum primis in faucibus.\n Proin sodales euismod sem, posuere maximus libero interdum semper.\n Nunc mollis posuere arcu non elementum. Vivamus sed laoreet mauris.\n Etiam fringilla arcu convallis erat vehicula iaculis. Pellentesque\n dictum aliquam cursus.\n </Typography>\n <Typography variant=\"body-medium\">\n Integer vehicula turpis quis risus aliquet congue. Vivamus\n pellentesque nibh ac blandit varius. Fusce placerat lacus ut mauris\n porta, nec facilisis risus pulvinar. Nullam elementum nulla ut laoreet\n imperdiet. Maecenas eget erat erat. Phasellus in turpis placerat,\n imperdiet ante nec, tincidunt nisl. Donec a lacus neque. Nullam\n iaculis ante molestie ultrices semper. Sed non lorem ullamcorper\n ligula elementum convallis. Aenean egestas risus quis tortor cursus\n dapibus. Nulla hendrerit at orci ut scelerisque. Nullam vel bibendum\n tellus. Praesent efficitur ultrices lectus at posuere. Maecenas\n facilisis lacus ac turpis malesuada, sit amet imperdiet ipsum\n condimentum. Donec et nibh eget justo luctus ornare. Maecenas suscipit\n nulla at ullamcorper congue.\n </Typography>\n <Typography variant=\"body-medium\">\n Vestibulum vehicula nibh mi, ultrices condimentum massa venenatis sit\n amet. Pellentesque accumsan mollis ex, id lobortis lacus venenatis id.\n Proin sem dui, mollis id gravida ac, vulputate et lacus. In pharetra\n nunc odio, in fermentum elit dignissim at. Nunc ut justo elit. Proin\n ligula orci, faucibus vitae vehicula nec, faucibus sit amet erat.\n Interdum et malesuada fames ac ante ipsum primis in faucibus. Quisque\n pharetra venenatis rutrum. Sed pharetra turpis id arcu maximus,\n interdum rhoncus eros mollis. Donec vitae sapien et odio interdum\n bibendum. Quisque eleifend, sem ut ornare mollis, orci nunc dapibus\n odio, aliquam fringilla augue nulla id magna. Phasellus consectetur,\n velit egestas sodales ultricies, odio nunc facilisis libero, vel\n vehicula nisi quam quis nisl. Proin vel massa libero.\n </Typography>\n <Typography variant=\"body-medium\">\n Sed mollis lacinia tincidunt. Curabitur blandit pellentesque\n consequat. Maecenas mollis pharetra dolor in ornare. Cras vel nibh eu\n nisi venenatis convallis id vel nisl. Curabitur et viverra nisl.\n Phasellus et finibus turpis. Praesent scelerisque vel lectus at\n imperdiet. Curabitur porta egestas magna ullamcorper hendrerit.\n </Typography>\n <Typography variant=\"body-medium\">\n Curabitur hendrerit egestas mi, ut venenatis turpis sagittis nec.\n Proin consectetur, nisi et vehicula placerat, tellus augue luctus\n odio, in commodo mauris urna nec libero. Maecenas eu placerat sapien,\n in aliquam tellus. Sed pharetra nunc id urna iaculis tincidunt. In hac\n habitasse platea dictumst. Donec tincidunt risus vitae congue congue.\n Fusce consequat ut justo ut tristique. Nunc ut urna quis neque\n consequat venenatis. Praesent nec feugiat orci. Vestibulum rutrum dui\n lacus, sit amet vulputate dolor finibus ut. Donec placerat urna eu\n fringilla convallis. Praesent sollicitudin felis at lacus semper, vel\n convallis magna scelerisque.\n </Typography>\n </div>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ /**
3
+ *
4
+ * Copyright (c) "Neo4j"
5
+ * Neo4j Sweden AB [http://neo4j.com]
6
+ *
7
+ * This file is part of Neo4j.
8
+ *
9
+ * Neo4j is free software: you can redistribute it and/or modify
10
+ * it under the terms of the GNU General Public License as published by
11
+ * the Free Software Foundation, either version 3 of the License, or
12
+ * (at your option) any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ * GNU General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU General Public License
20
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
+ */
22
+ var __importDefault = (this && this.__importDefault) || function (mod) {
23
+ return (mod && mod.__esModule) ? mod : { "default": mod };
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.AnnouncementBannerInjectedUrgentSrc = exports.AnnouncementBannerInjectedNonUrgentSrc = exports.AnnouncementBannerPresentAtPageRenderSrc = exports.AnnouncementBannerWithPageContentSrc = exports.AnnouncementBannerWithActionsSrc = exports.AnnouncementBannerCloseableSrc = exports.AnnouncementBannerCustomIconsSrc = exports.AnnouncementBannerVariantsSrc = exports.AnnouncementBannerDefaultSrc = exports.AnnouncementBannerInjectedUrgent = exports.AnnouncementBannerInjectedNonUrgent = exports.AnnouncementBannerPresentAtPageRender = exports.AnnouncementBannerWithPageContent = exports.AnnouncementBannerWithActions = exports.AnnouncementBannerCloseable = exports.AnnouncementBannerCustomIcons = exports.AnnouncementBannerVariants = exports.AnnouncementBannerDefault = void 0;
27
+ var announcement_banner_default_story_1 = require("./announcement-banner-default.story");
28
+ Object.defineProperty(exports, "AnnouncementBannerDefault", { enumerable: true, get: function () { return __importDefault(announcement_banner_default_story_1).default; } });
29
+ var announcement_banner_variants_story_1 = require("./announcement-banner-variants.story");
30
+ Object.defineProperty(exports, "AnnouncementBannerVariants", { enumerable: true, get: function () { return __importDefault(announcement_banner_variants_story_1).default; } });
31
+ var announcement_banner_custom_icons_story_1 = require("./announcement-banner-custom-icons.story");
32
+ Object.defineProperty(exports, "AnnouncementBannerCustomIcons", { enumerable: true, get: function () { return __importDefault(announcement_banner_custom_icons_story_1).default; } });
33
+ var announcement_banner_closeable_story_1 = require("./announcement-banner-closeable.story");
34
+ Object.defineProperty(exports, "AnnouncementBannerCloseable", { enumerable: true, get: function () { return __importDefault(announcement_banner_closeable_story_1).default; } });
35
+ var announcement_banner_with_actions_story_1 = require("./announcement-banner-with-actions.story");
36
+ Object.defineProperty(exports, "AnnouncementBannerWithActions", { enumerable: true, get: function () { return __importDefault(announcement_banner_with_actions_story_1).default; } });
37
+ var announcement_banner_with_page_content_story_1 = require("./announcement-banner-with-page-content.story");
38
+ Object.defineProperty(exports, "AnnouncementBannerWithPageContent", { enumerable: true, get: function () { return __importDefault(announcement_banner_with_page_content_story_1).default; } });
39
+ var announcement_banner_present_at_page_render_story_1 = require("./announcement-banner-present-at-page-render.story");
40
+ Object.defineProperty(exports, "AnnouncementBannerPresentAtPageRender", { enumerable: true, get: function () { return __importDefault(announcement_banner_present_at_page_render_story_1).default; } });
41
+ var announcement_banner_injected_non_urgent_story_1 = require("./announcement-banner-injected-non-urgent.story");
42
+ Object.defineProperty(exports, "AnnouncementBannerInjectedNonUrgent", { enumerable: true, get: function () { return __importDefault(announcement_banner_injected_non_urgent_story_1).default; } });
43
+ var announcement_banner_injected_urgent_story_1 = require("./announcement-banner-injected-urgent.story");
44
+ Object.defineProperty(exports, "AnnouncementBannerInjectedUrgent", { enumerable: true, get: function () { return __importDefault(announcement_banner_injected_urgent_story_1).default; } });
45
+ const export_stories_utils_1 = require("../../_common/export-stories-utils");
46
+ const announcement_banner_closeable_story_raw_1 = __importDefault(require("./announcement-banner-closeable.story?raw"));
47
+ const announcement_banner_custom_icons_story_raw_1 = __importDefault(require("./announcement-banner-custom-icons.story?raw"));
48
+ const announcement_banner_default_story_raw_1 = __importDefault(require("./announcement-banner-default.story?raw"));
49
+ const announcement_banner_injected_non_urgent_story_raw_1 = __importDefault(require("./announcement-banner-injected-non-urgent.story?raw"));
50
+ const announcement_banner_injected_urgent_story_raw_1 = __importDefault(require("./announcement-banner-injected-urgent.story?raw"));
51
+ const announcement_banner_present_at_page_render_story_raw_1 = __importDefault(require("./announcement-banner-present-at-page-render.story?raw"));
52
+ const announcement_banner_variants_story_raw_1 = __importDefault(require("./announcement-banner-variants.story?raw"));
53
+ const announcement_banner_with_actions_story_raw_1 = __importDefault(require("./announcement-banner-with-actions.story?raw"));
54
+ const announcement_banner_with_page_content_story_raw_1 = __importDefault(require("./announcement-banner-with-page-content.story?raw"));
55
+ exports.AnnouncementBannerDefaultSrc = (0, export_stories_utils_1.removeLicenseHeader)(announcement_banner_default_story_raw_1.default);
56
+ exports.AnnouncementBannerVariantsSrc = (0, export_stories_utils_1.removeLicenseHeader)(announcement_banner_variants_story_raw_1.default);
57
+ exports.AnnouncementBannerCustomIconsSrc = (0, export_stories_utils_1.removeLicenseHeader)(announcement_banner_custom_icons_story_raw_1.default);
58
+ exports.AnnouncementBannerCloseableSrc = (0, export_stories_utils_1.removeLicenseHeader)(announcement_banner_closeable_story_raw_1.default);
59
+ exports.AnnouncementBannerWithActionsSrc = (0, export_stories_utils_1.removeLicenseHeader)(announcement_banner_with_actions_story_raw_1.default);
60
+ exports.AnnouncementBannerWithPageContentSrc = (0, export_stories_utils_1.removeLicenseHeader)(announcement_banner_with_page_content_story_raw_1.default);
61
+ exports.AnnouncementBannerPresentAtPageRenderSrc = (0, export_stories_utils_1.removeLicenseHeader)(announcement_banner_present_at_page_render_story_raw_1.default);
62
+ exports.AnnouncementBannerInjectedNonUrgentSrc = (0, export_stories_utils_1.removeLicenseHeader)(announcement_banner_injected_non_urgent_story_raw_1.default);
63
+ exports.AnnouncementBannerInjectedUrgentSrc = (0, export_stories_utils_1.removeLicenseHeader)(announcement_banner_injected_urgent_story_raw_1.default);
64
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/announcement-banner/stories/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,yFAA2F;AAAlF,+JAAA,OAAO,OAA6B;AAC7C,2FAA6F;AAApF,iKAAA,OAAO,OAA8B;AAC9C,mGAAoG;AAA3F,wKAAA,OAAO,OAAiC;AACjD,6FAA+F;AAAtF,mKAAA,OAAO,OAA+B;AAC/C,mGAAoG;AAA3F,wKAAA,OAAO,OAAiC;AACjD,6GAA6G;AAApG,iLAAA,OAAO,OAAqC;AACrD,uHAAsH;AAA7G,0LAAA,OAAO,OAAyC;AACzD,iHAAiH;AAAxG,qLAAA,OAAO,OAAuC;AACvD,yGAA0G;AAAjG,8KAAA,OAAO,OAAoC;AAEpD,6EAAyE;AACzE,wHAA0F;AAC1F,8HAA+F;AAC/F,oHAAsF;AACtF,4IAA4G;AAC5G,oIAAqG;AACrG,kJAAiH;AACjH,sHAAwF;AACxF,8HAA+F;AAC/F,wIAAwG;AAE3F,QAAA,4BAA4B,GAAG,IAAA,0CAAmB,EAC7D,+CAA+B,CAChC,CAAC;AAEW,QAAA,6BAA6B,GAAG,IAAA,0CAAmB,EAC9D,gDAAgC,CACjC,CAAC;AAEW,QAAA,gCAAgC,GAAG,IAAA,0CAAmB,EACjE,oDAAmC,CACpC,CAAC;AAEW,QAAA,8BAA8B,GAAG,IAAA,0CAAmB,EAC/D,iDAAiC,CAClC,CAAC;AAEW,QAAA,gCAAgC,GAAG,IAAA,0CAAmB,EACjE,oDAAmC,CACpC,CAAC;AAEW,QAAA,oCAAoC,GAAG,IAAA,0CAAmB,EACrE,yDAAuC,CACxC,CAAC;AAEW,QAAA,wCAAwC,GAAG,IAAA,0CAAmB,EACzE,8DAA2C,CAC5C,CAAC;AAEW,QAAA,sCAAsC,GAAG,IAAA,0CAAmB,EACvE,2DAAyC,CAC1C,CAAC;AAEW,QAAA,mCAAmC,GAAG,IAAA,0CAAmB,EACpE,uDAAsC,CACvC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport { default as AnnouncementBannerDefault } from './announcement-banner-default.story';\nexport { default as AnnouncementBannerVariants } from './announcement-banner-variants.story';\nexport { default as AnnouncementBannerCustomIcons } from './announcement-banner-custom-icons.story';\nexport { default as AnnouncementBannerCloseable } from './announcement-banner-closeable.story';\nexport { default as AnnouncementBannerWithActions } from './announcement-banner-with-actions.story';\nexport { default as AnnouncementBannerWithPageContent } from './announcement-banner-with-page-content.story';\nexport { default as AnnouncementBannerPresentAtPageRender } from './announcement-banner-present-at-page-render.story';\nexport { default as AnnouncementBannerInjectedNonUrgent } from './announcement-banner-injected-non-urgent.story';\nexport { default as AnnouncementBannerInjectedUrgent } from './announcement-banner-injected-urgent.story';\n\nimport { removeLicenseHeader } from '../../_common/export-stories-utils';\nimport AnnouncementBannerCloseableSrcRaw from './announcement-banner-closeable.story?raw';\nimport AnnouncementBannerCustomIconsSrcRaw from './announcement-banner-custom-icons.story?raw';\nimport AnnouncementBannerDefaultSrcRaw from './announcement-banner-default.story?raw';\nimport AnnouncementBannerInjectedNonUrgentSrcRaw from './announcement-banner-injected-non-urgent.story?raw';\nimport AnnouncementBannerInjectedUrgentSrcRaw from './announcement-banner-injected-urgent.story?raw';\nimport AnnouncementBannerPresentAtPageRenderSrcRaw from './announcement-banner-present-at-page-render.story?raw';\nimport AnnouncementBannerVariantsSrcRaw from './announcement-banner-variants.story?raw';\nimport AnnouncementBannerWithActionsSrcRaw from './announcement-banner-with-actions.story?raw';\nimport AnnouncementBannerWithPageContentSrcRaw from './announcement-banner-with-page-content.story?raw';\n\nexport const AnnouncementBannerDefaultSrc = removeLicenseHeader(\n AnnouncementBannerDefaultSrcRaw,\n);\n\nexport const AnnouncementBannerVariantsSrc = removeLicenseHeader(\n AnnouncementBannerVariantsSrcRaw,\n);\n\nexport const AnnouncementBannerCustomIconsSrc = removeLicenseHeader(\n AnnouncementBannerCustomIconsSrcRaw,\n);\n\nexport const AnnouncementBannerCloseableSrc = removeLicenseHeader(\n AnnouncementBannerCloseableSrcRaw,\n);\n\nexport const AnnouncementBannerWithActionsSrc = removeLicenseHeader(\n AnnouncementBannerWithActionsSrcRaw,\n);\n\nexport const AnnouncementBannerWithPageContentSrc = removeLicenseHeader(\n AnnouncementBannerWithPageContentSrcRaw,\n);\n\nexport const AnnouncementBannerPresentAtPageRenderSrc = removeLicenseHeader(\n AnnouncementBannerPresentAtPageRenderSrcRaw,\n);\n\nexport const AnnouncementBannerInjectedNonUrgentSrc = removeLicenseHeader(\n AnnouncementBannerInjectedNonUrgentSrcRaw,\n);\n\nexport const AnnouncementBannerInjectedUrgentSrc = removeLicenseHeader(\n AnnouncementBannerInjectedUrgentSrcRaw,\n);\n"]}
package/lib/cjs/index.js CHANGED
@@ -34,14 +34,16 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
34
34
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
35
35
  };
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
- exports.useSpotlightContext = exports.SpotlightTour = exports.SpotlightTarget = exports.SpotlightProvider = exports.Spotlight = exports.TimeZonePicker = exports.NeedleTime = exports.TimePicker = exports.Skeleton = exports.Tooltip = exports.toast = exports.Toaster = exports.ToasterControlled = exports.Divider = exports.DropdownButton = exports.InlineEdit = exports.Slider = exports.ClipboardButton = exports.Logo = exports.Avatar = exports.Flex = exports.Box = exports.Breadcrumbs = exports.Drawer = exports.Typography = exports.SideNavigation = exports.StatusIndicator = exports.CodeBlock = exports.GraphLabel = exports.Wizard = exports.Tag = exports.Select = exports.TextLink = exports.TextArea = exports.TextInput = exports.Dropzone = exports.ProgressBar = exports.Popover = exports.SegmentedControl = exports.Tabs = exports.LoadingSpinner = exports.Dialog = exports.DatePicker = exports.Menu = exports.Radio = exports.Switch = exports.Checkbox = exports.Banner = exports.StatusLabel = exports.Accordion = void 0;
38
- exports.SelectableTag = exports.DismissibleTag = exports.ReadOnlyTag = exports.SelectIconButton = exports.Kbd = exports.Code = exports.TextButton = exports.FilledButton = exports.OutlinedButton = exports.ColorPicker = exports.ConditionalWrap = exports.IconButtonArray = exports.CleanIconButton = exports.IconButton = exports.LoadingBar = void 0;
37
+ exports.SpotlightTour = exports.SpotlightTarget = exports.SpotlightProvider = exports.Spotlight = exports.TimeZonePicker = exports.NeedleTime = exports.TimePicker = exports.Skeleton = exports.Tooltip = exports.toast = exports.Toaster = exports.ToasterControlled = exports.Divider = exports.DropdownButton = exports.InlineEdit = exports.Slider = exports.ClipboardButton = exports.Logo = exports.Avatar = exports.Flex = exports.Box = exports.Breadcrumbs = exports.Drawer = exports.Typography = exports.SideNavigation = exports.StatusIndicator = exports.CodeBlock = exports.GraphLabel = exports.Wizard = exports.Tag = exports.Select = exports.TextLink = exports.TextArea = exports.TextInput = exports.Dropzone = exports.ProgressBar = exports.Popover = exports.SegmentedControl = exports.Tabs = exports.LoadingSpinner = exports.Dialog = exports.DatePicker = exports.Menu = exports.Radio = exports.Switch = exports.Checkbox = exports.AnnouncementBanner = exports.Banner = exports.StatusLabel = exports.Accordion = void 0;
38
+ exports.SelectableTag = exports.DismissibleTag = exports.ReadOnlyTag = exports.SelectIconButton = exports.Kbd = exports.Code = exports.TextButton = exports.FilledButton = exports.OutlinedButton = exports.ColorPicker = exports.ConditionalWrap = exports.IconButtonArray = exports.CleanIconButton = exports.IconButton = exports.LoadingBar = exports.useSpotlightContext = void 0;
39
39
  var accordion_1 = require("./accordion");
40
40
  Object.defineProperty(exports, "Accordion", { enumerable: true, get: function () { return accordion_1.Accordion; } });
41
41
  var status_label_1 = require("./status-label");
42
42
  Object.defineProperty(exports, "StatusLabel", { enumerable: true, get: function () { return status_label_1.StatusLabel; } });
43
43
  var banner_1 = require("./banner");
44
44
  Object.defineProperty(exports, "Banner", { enumerable: true, get: function () { return banner_1.Banner; } });
45
+ var announcement_banner_1 = require("./announcement-banner");
46
+ Object.defineProperty(exports, "AnnouncementBanner", { enumerable: true, get: function () { return announcement_banner_1.AnnouncementBanner; } });
45
47
  var checkbox_1 = require("./checkbox");
46
48
  Object.defineProperty(exports, "Checkbox", { enumerable: true, get: function () { return checkbox_1.Checkbox; } });
47
49
  var switch_1 = require("./switch");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;AAEH,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,+CAA6C;AAApC,2GAAA,WAAW,OAAA;AACpB,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,iCAAgC;AAAvB,8FAAA,KAAK,OAAA;AACd,+BAA8B;AAArB,4FAAA,IAAI,OAAA;AACb,6CAA2C;AAAlC,yGAAA,UAAU,OAAA;AACnB,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,qDAAmD;AAA1C,iHAAA,cAAc,OAAA;AACvB,+BAA8B;AAArB,4FAAA,IAAI,OAAA;AACb,yDAAuD;AAA9C,qHAAA,gBAAgB,OAAA;AACzB,qCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAChB,+CAA6C;AAApC,2GAAA,WAAW,OAAA;AACpB,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,8CAA4B;AAC5B,2CAAyC;AAAhC,uGAAA,SAAS,OAAA;AAClB,yCAAuC;AAA9B,qGAAA,QAAQ,OAAA;AACjB,yCAAuC;AAA9B,qGAAA,QAAQ,OAAA;AACjB,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,6BAA4B;AAAnB,0FAAA,GAAG,OAAA;AACZ,0CAAwB;AACxB,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,6CAA2C;AAAlC,yGAAA,UAAU,OAAA;AACnB,2CAAyC;AAAhC,uGAAA,SAAS,OAAA;AAClB,uDAAqD;AAA5C,mHAAA,eAAe,OAAA;AACxB,qDAAmD;AAA1C,i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cAAc,OAAA;AACvB,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AACrB,6CAA2C;AAAlC,yGAAA,UAAU,OAAA;AACnB,+BAA8B;AAArB,4FAAA,IAAI,OAAA;AACb,6BAA4B;AAAnB,0FAAA,GAAG,OAAA;AACZ,2DAAwD;AAA/C,sHAAA,gBAAgB,OAAA;AACzB,iDAA8C;AAArC,4GAAA,WAAW,OAAA;AACpB,qDAAmD;AAA1C,iHAAA,cAAc,OAAA;AACvB,mDAAiD;AAAxC,+GAAA,aAAa,OAAA;AACtB,6CAA2B","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport { Accordion } from './accordion';\nexport { StatusLabel } from './status-label';\nexport { Banner } from './banner';\nexport { Checkbox } from './checkbox';\nexport { Switch } from './switch';\nexport { Radio } from './radio';\nexport { Menu } from './menu';\nexport { DatePicker } from './date-picker';\nexport { Dialog } from './dialog';\nexport { LoadingSpinner } from './loading-spinner';\nexport { Tabs } from './tabs';\nexport { SegmentedControl } from './segmented-control';\nexport { Popover } from './popover';\nexport { ProgressBar } from './progress-bar';\nexport { Dropzone } from './dropzone';\nexport * from './data-grid';\nexport { TextInput } from './text-input';\nexport { TextArea } from './text-area';\nexport { TextLink } from './text-link';\nexport { Select } from './select';\nexport { Tag } from './tag';\nexport * from './theme';\nexport { Wizard } from './wizard';\nexport { GraphLabel } from './graph-label';\nexport { CodeBlock } from './code-block';\nexport { StatusIndicator } from './status-indicator';\nexport { SideNavigation } from './side-navigation';\nexport { Typography } from './typography';\nexport { Drawer } from './drawer';\nexport { Breadcrumbs } from './breadcrumbs';\nexport * from './hooks';\nexport { Box } from './box';\nexport { Flex } from './flex';\nexport { Avatar } from './avatar';\nexport { Logo } from './logo';\nexport { ClipboardButton } from './clipboard-button';\nexport { Slider } from './slider';\nexport { InlineEdit } from './inline-edit';\nexport { DropdownButton } from './dropdown-button';\nexport { Divider } from './divider';\nexport * from './tree-view';\nexport { ToasterControlled, Toaster, toast, type ToastId } from './toast';\nexport { Tooltip } from './tooltip';\nexport { Skeleton } from './skeleton';\nexport { TimePicker, NeedleTime } from './time-picker';\nexport { TimeZonePicker } from './timezone-picker';\nexport {\n Spotlight,\n SpotlightProvider,\n SpotlightTarget,\n SpotlightTour,\n useSpotlightContext,\n} from './spotlight';\nexport { LoadingBar } from './loading-bar';\nexport { IconButton } from './icon-button';\nexport { CleanIconButton } from './clean-icon-button';\nexport { IconButtonArray } from './icon-button-array';\nexport { ConditionalWrap } from './conditional-wrap';\nexport { ColorPicker } from './color-picker';\nexport { OutlinedButton } from './outlined-button';\nexport { FilledButton } from './filled-button';\nexport { TextButton } from './text-button';\nexport { Code } from './code';\nexport { Kbd } from './kbd';\nexport { SelectIconButton } from './select-icon-button';\nexport { ReadOnlyTag } from './read-only-tag';\nexport { DismissibleTag } from './dismissible-tag';\nexport { SelectableTag } from './selectable-tag';\nexport * from './combobox';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;AAEH,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,+CAA6C;AAApC,2GAAA,WAAW,OAAA;AACpB,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,6DAA2D;AAAlD,yHAAA,kBAAkB,OAAA;AAC3B,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACj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n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport { Accordion } from './accordion';\nexport { StatusLabel } from './status-label';\nexport { Banner } from './banner';\nexport { AnnouncementBanner } from './announcement-banner';\nexport { Checkbox } from './checkbox';\nexport { Switch } from './switch';\nexport { Radio } from './radio';\nexport { Menu } from './menu';\nexport { DatePicker } from './date-picker';\nexport { Dialog } from './dialog';\nexport { LoadingSpinner } from './loading-spinner';\nexport { Tabs } from './tabs';\nexport { SegmentedControl } from './segmented-control';\nexport { Popover } from './popover';\nexport { ProgressBar } from './progress-bar';\nexport { Dropzone } from './dropzone';\nexport * from './data-grid';\nexport { TextInput } from './text-input';\nexport { TextArea } from './text-area';\nexport { TextLink } from './text-link';\nexport { Select } from './select';\nexport { Tag } from './tag';\nexport * from './theme';\nexport { Wizard } from './wizard';\nexport { GraphLabel } from './graph-label';\nexport { CodeBlock } from './code-block';\nexport { StatusIndicator } from './status-indicator';\nexport { SideNavigation } from './side-navigation';\nexport { Typography } from './typography';\nexport { Drawer } from './drawer';\nexport { Breadcrumbs } from './breadcrumbs';\nexport * from './hooks';\nexport { Box } from './box';\nexport { Flex } from './flex';\nexport { Avatar } from './avatar';\nexport { Logo } from './logo';\nexport { ClipboardButton } from './clipboard-button';\nexport { Slider } from './slider';\nexport { InlineEdit } from './inline-edit';\nexport { DropdownButton } from './dropdown-button';\nexport { Divider } from './divider';\nexport * from './tree-view';\nexport { ToasterControlled, Toaster, toast, type ToastId } from './toast';\nexport { Tooltip } from './tooltip';\nexport { Skeleton } from './skeleton';\nexport { TimePicker, NeedleTime } from './time-picker';\nexport { TimeZonePicker } from './timezone-picker';\nexport {\n Spotlight,\n SpotlightProvider,\n SpotlightTarget,\n SpotlightTour,\n useSpotlightContext,\n} from './spotlight';\nexport { LoadingBar } from './loading-bar';\nexport { IconButton } from './icon-button';\nexport { CleanIconButton } from './clean-icon-button';\nexport { IconButtonArray } from './icon-button-array';\nexport { ConditionalWrap } from './conditional-wrap';\nexport { ColorPicker } from './color-picker';\nexport { OutlinedButton } from './outlined-button';\nexport { FilledButton } from './filled-button';\nexport { TextButton } from './text-button';\nexport { Code } from './code';\nexport { Kbd } from './kbd';\nexport { SelectIconButton } from './select-icon-button';\nexport { ReadOnlyTag } from './read-only-tag';\nexport { DismissibleTag } from './dismissible-tag';\nexport { SelectableTag } from './selectable-tag';\nexport * from './combobox';\n"]}
@@ -0,0 +1,159 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ /**
14
+ *
15
+ * Copyright (c) "Neo4j"
16
+ * Neo4j Sweden AB [http://neo4j.com]
17
+ *
18
+ * This file is part of Neo4j.
19
+ *
20
+ * Neo4j is free software: you can redistribute it and/or modify
21
+ * it under the terms of the GNU General Public License as published by
22
+ * the Free Software Foundation, either version 3 of the License, or
23
+ * (at your option) any later version.
24
+ *
25
+ * This program is distributed in the hope that it will be useful,
26
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
27
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28
+ * GNU General Public License for more details.
29
+ *
30
+ * You should have received a copy of the GNU General Public License
31
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
32
+ */
33
+ import classNames from 'classnames';
34
+ import React, { useContext, useEffect, useRef, useState } from 'react';
35
+ import { CleanIconButton } from '../clean-icon-button';
36
+ import { BoltIconOutline } from '../icons/generated/heroIcons/BoltIconOutline';
37
+ import { ExclamationCircleIconSolid } from '../icons/generated/heroIcons/ExclamationCircleIconSolid';
38
+ import { ExclamationTriangleIconSolid } from '../icons/generated/heroIcons/ExclamationTriangleIconSolid';
39
+ import { InformationCircleIconSolid } from '../icons/generated/heroIcons/InformationCircleIconSolid';
40
+ import { SparklesIconSolid } from '../icons/generated/heroIcons/SparklesIconSolid';
41
+ import { XMarkIconOutline } from '../icons/generated/heroIcons/XMarkIconOutline';
42
+ import { Typography } from '../typography';
43
+ const LIVE_REGION_REGISTRATION_DELAY = 100;
44
+ const StatusIcon = ({ icon, variant, }) => {
45
+ const canUseCustomIcon = variant === 'discovery' || variant === 'neutral';
46
+ const iconComponent = (() => {
47
+ if (canUseCustomIcon && icon) {
48
+ return icon;
49
+ }
50
+ switch (variant) {
51
+ case 'warning':
52
+ return _jsx(ExclamationTriangleIconSolid, {});
53
+ case 'danger':
54
+ return _jsx(ExclamationCircleIconSolid, {});
55
+ case 'discovery':
56
+ return _jsx(SparklesIconSolid, {});
57
+ case 'info':
58
+ return _jsx(InformationCircleIconSolid, {});
59
+ case 'neutral':
60
+ return _jsx(BoltIconOutline, {});
61
+ default:
62
+ return null;
63
+ }
64
+ })();
65
+ return (_jsx("span", { className: "ndl-announcement-banner-status-icon", "aria-hidden": "true", children: iconComponent }));
66
+ };
67
+ const AnnouncementBannerContext = React.createContext({
68
+ hasIcon: false,
69
+ variant: 'info',
70
+ });
71
+ /**
72
+ * Short title or message for the announcement.
73
+ */
74
+ const AnnouncementBannerHeader = (_a) => {
75
+ var { children, className, style, htmlAttributes, ref } = _a, restProps = __rest(_a, ["children", "className", "style", "htmlAttributes", "ref"]);
76
+ const { hasIcon, icon, variant } = useContext(AnnouncementBannerContext);
77
+ const classes = classNames('ndl-announcement-banner-header', className);
78
+ return (_jsxs(Typography, Object.assign({ as: "span", variant: "body-medium", className: classes, style: style, ref: ref, htmlAttributes: htmlAttributes }, restProps, { children: [hasIcon && _jsx(StatusIcon, { icon: icon, variant: variant }), children] })));
79
+ };
80
+ /**
81
+ * Optional actions shown next to the announcement message.
82
+ */
83
+ const AnnouncementBannerActions = (_a) => {
84
+ var { children, className, style, htmlAttributes, ref } = _a, restProps = __rest(_a, ["children", "className", "style", "htmlAttributes", "ref"]);
85
+ const classes = classNames('ndl-announcement-banner-actions', className);
86
+ return (_jsx("div", Object.assign({ className: classes, style: style, ref: ref }, restProps, htmlAttributes, { children: children })));
87
+ };
88
+ /**
89
+ * Full-width announcement bar intended to sit at the top of its parent.
90
+ * It stays in normal document flow so sibling content is shifted down.
91
+ *
92
+ * @remarks
93
+ * Place `AnnouncementBanner` as the first child of a full-width parent (for
94
+ * example the page shell).
95
+ */
96
+ const AnnouncementBannerComponent = (_a) => {
97
+ var _b;
98
+ var { as, variant = 'info', hasIcon = false, icon, onClose, className, children, isCloseable = false, htmlAttributes, liveRegion, ref } = _a, restProps = __rest(_a, ["as", "variant", "hasIcon", "icon", "onClose", "className", "children", "isCloseable", "htmlAttributes", "liveRegion", "ref"]);
99
+ const Element = as !== null && as !== void 0 ? as : 'section';
100
+ const contentRef = useRef(null);
101
+ const [pendingAnnouncement, setPendingAnnouncement] = useState(null);
102
+ const classes = classNames('ndl-announcement-banner', className, {
103
+ 'ndl-announcement-banner-closeable': isCloseable,
104
+ 'ndl-danger': variant === 'danger',
105
+ 'ndl-discovery': variant === 'discovery',
106
+ 'ndl-info': variant === 'info',
107
+ 'ndl-neutral': variant === 'neutral',
108
+ 'ndl-warning': variant === 'warning',
109
+ });
110
+ const handleClose = (error) => {
111
+ if (onClose && typeof onClose === 'function') {
112
+ onClose(error);
113
+ }
114
+ };
115
+ useEffect(() => {
116
+ if (!liveRegion || !contentRef.current) {
117
+ setPendingAnnouncement(null);
118
+ return;
119
+ }
120
+ const header = contentRef.current.querySelector('.ndl-announcement-banner-header');
121
+ if (!header) {
122
+ setPendingAnnouncement(null);
123
+ return;
124
+ }
125
+ let timeoutId;
126
+ const announceHeader = () => {
127
+ var _a;
128
+ window.clearTimeout(timeoutId);
129
+ setPendingAnnouncement(null);
130
+ const message = (_a = header.textContent) === null || _a === void 0 ? void 0 : _a.trim();
131
+ if (message) {
132
+ timeoutId = window.setTimeout(() => {
133
+ setPendingAnnouncement({ message, role: liveRegion });
134
+ }, LIVE_REGION_REGISTRATION_DELAY);
135
+ }
136
+ };
137
+ const observer = new MutationObserver(announceHeader);
138
+ observer.observe(header, {
139
+ characterData: true,
140
+ childList: true,
141
+ subtree: true,
142
+ });
143
+ announceHeader();
144
+ return () => {
145
+ observer.disconnect();
146
+ window.clearTimeout(timeoutId);
147
+ };
148
+ }, [liveRegion]);
149
+ const announcement = (pendingAnnouncement === null || pendingAnnouncement === void 0 ? void 0 : pendingAnnouncement.role) === liveRegion
150
+ ? ((_b = pendingAnnouncement === null || pendingAnnouncement === void 0 ? void 0 : pendingAnnouncement.message) !== null && _b !== void 0 ? _b : '')
151
+ : '';
152
+ return (_jsxs(Element, Object.assign({ className: classes, ref: ref }, restProps, htmlAttributes, { children: [liveRegion && (_jsx("span", { className: "ndl-announcement-banner-live-region", role: liveRegion, "aria-atomic": "true", children: announcement })), _jsx("div", { className: "ndl-announcement-banner-container", ref: contentRef, children: _jsx(AnnouncementBannerContext.Provider, { value: { hasIcon, icon, variant }, children: children }) }), isCloseable && (_jsx("div", { className: "ndl-announcement-banner-close", children: _jsx(CleanIconButton, { size: "small", onClick: handleClose, description: null, htmlAttributes: { 'aria-label': 'Close' }, children: _jsx(XMarkIconOutline, {}) }) }))] })));
153
+ };
154
+ const AnnouncementBanner = Object.assign(AnnouncementBannerComponent, {
155
+ Actions: AnnouncementBannerActions,
156
+ Header: AnnouncementBannerHeader,
157
+ });
158
+ export { AnnouncementBanner };
159
+ //# sourceMappingURL=AnnouncementBanner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnnouncementBanner.js","sourceRoot":"","sources":["../../../src/announcement-banner/AnnouncementBanner.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAMvE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AAC/E,OAAO,EAAE,0BAA0B,EAAE,MAAM,yDAAyD,CAAC;AACrG,OAAO,EAAE,4BAA4B,EAAE,MAAM,2DAA2D,CAAC;AACzG,OAAO,EAAE,0BAA0B,EAAE,MAAM,yDAAyD,CAAC;AACrG,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AACnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AACjF,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAwE3C,MAAM,8BAA8B,GAAG,GAAG,CAAC;AAE3C,MAAM,UAAU,GAAG,CAAC,EAClB,IAAI,EACJ,OAAO,GAIR,EAAE,EAAE;IACH,MAAM,gBAAgB,GAAG,OAAO,KAAK,WAAW,IAAI,OAAO,KAAK,SAAS,CAAC;IAC1E,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE;QAC1B,IAAI,gBAAgB,IAAI,IAAI,EAAE,CAAC;YAC7B,OAAO,IAAI,CAAC;QACd,CAAC;QAED,QAAQ,OAAO,EAAE,CAAC;YAChB,KAAK,SAAS;gBACZ,OAAO,KAAC,4BAA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,UAAU,CAAC,CAAC,CAAC;IAEjB,MAAM,YAAY,GAChB,CAAA,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAE,IAAI,MAAK,UAAU;QACtC,CAAC,CAAC,CAAC,MAAA,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAE,OAAO,mCAAI,EAAE,CAAC;QACtC,CAAC,CAAC,EAAE,CAAC;IAET,OAAO,CACL,MAAC,OAAO,kBAAC,SAAS,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,IAAM,SAAS,EAAM,cAAc,eACrE,UAAU,IAAI,CACb,eACE,SAAS,EAAC,qCAAqC,EAC/C,IAAI,EAAE,UAAU,iBACJ,MAAM,YAEjB,YAAY,GACR,CACR,EACD,cAAK,SAAS,EAAC,mCAAmC,EAAC,GAAG,EAAE,UAAU,YAChE,KAAC,yBAAyB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,YAClE,QAAQ,GAC0B,GACjC,EACL,WAAW,IAAI,CACd,cAAK,SAAS,EAAC,+BAA+B,YAC5C,KAAC,eAAe,IACd,IAAI,EAAC,OAAO,EACZ,OAAO,EAAE,WAAW,EACpB,WAAW,EAAE,IAAI,EACjB,cAAc,EAAE,EAAE,YAAY,EAAE,OAAO,EAAE,YAEzC,KAAC,gBAAgB,KAAG,GACJ,GACd,CACP,KACO,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAC,2BAA2B,EAAE;IACpE,OAAO,EAAE,yBAAyB;IAClC,MAAM,EAAE,wBAAwB;CACjC,CAAC,CAAC;AAEH,OAAO,EAAE,kBAAkB,EAAE,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport React, { useContext, useEffect, useRef, useState } from 'react';\n\nimport {\n type CommonProps,\n type PolymorphicCommonProps,\n} from '../_common/types';\nimport { CleanIconButton } from '../clean-icon-button';\nimport { BoltIconOutline } from '../icons/generated/heroIcons/BoltIconOutline';\nimport { ExclamationCircleIconSolid } from '../icons/generated/heroIcons/ExclamationCircleIconSolid';\nimport { ExclamationTriangleIconSolid } from '../icons/generated/heroIcons/ExclamationTriangleIconSolid';\nimport { InformationCircleIconSolid } from '../icons/generated/heroIcons/InformationCircleIconSolid';\nimport { SparklesIconSolid } from '../icons/generated/heroIcons/SparklesIconSolid';\nimport { XMarkIconOutline } from '../icons/generated/heroIcons/XMarkIconOutline';\nimport { Typography } from '../typography';\n\n/**\n *\n *\n * Types\n *\n *\n */\n\ntype AnnouncementBannerVariant =\n | 'info'\n | 'warning'\n | 'danger'\n | 'discovery'\n | 'neutral';\n\ntype AnnouncementBannerLiveRegion = 'status' | 'alert';\n\ntype PendingAnnouncement = {\n message: string;\n role: AnnouncementBannerLiveRegion;\n};\n\ntype AnnouncementBannerCommonProps = {\n /** Shows a status icon. The icon is based on the value of the `variant` prop */\n hasIcon?: boolean;\n\n /**\n * Decorative icon shown when `hasIcon` is true. Only used for `discovery`\n * and `neutral`; those variants fall back to Sparkles and Bolt. `info`,\n * `warning`, and `danger` always use their status icons.\n */\n icon?: React.ReactNode;\n\n /** Content to be shown in the announcement banner. */\n children?: React.ReactNode;\n\n /**\n * Announces the header when the banner appears or its header changes.\n * `status` announces politely, while `alert` interrupts the user. Leave this\n * unset for banners that are present during the page's initial render.\n * This is independent of the visual `variant`.\n */\n liveRegion?: AnnouncementBannerLiveRegion;\n\n /** The variant of the announcement banner */\n variant?: AnnouncementBannerVariant;\n};\n\ntype CloseableAnnouncementBannerProps = {\n /** If the banner is closeable. Renders an icon button on the right */\n isCloseable: true;\n\n /** Event handler for when the close icon is clicked */\n onClose: (\n error?: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n ) => void;\n};\n\ntype NonCloseableAnnouncementBannerProps = {\n isCloseable?: false;\n onClose?: never;\n};\n\ntype AnnouncementBannerCloseProps =\n | CloseableAnnouncementBannerProps\n | NonCloseableAnnouncementBannerProps;\n\ntype AnnouncementBannerProps = AnnouncementBannerCommonProps &\n AnnouncementBannerCloseProps;\n\nconst LIVE_REGION_REGISTRATION_DELAY = 100;\n\nconst StatusIcon = ({\n icon,\n variant,\n}: {\n icon?: React.ReactNode;\n variant: AnnouncementBannerVariant;\n}) => {\n const canUseCustomIcon = variant === 'discovery' || variant === 'neutral';\n const iconComponent = (() => {\n if (canUseCustomIcon && icon) {\n return icon;\n }\n\n switch (variant) {\n case 'warning':\n return <ExclamationTriangleIconSolid />;\n case 'danger':\n return <ExclamationCircleIconSolid />;\n case 'discovery':\n return <SparklesIconSolid />;\n case 'info':\n return <InformationCircleIconSolid />;\n case 'neutral':\n return <BoltIconOutline />;\n default:\n return null;\n }\n })();\n\n return (\n <span className=\"ndl-announcement-banner-status-icon\" aria-hidden=\"true\">\n {iconComponent}\n </span>\n );\n};\n\nconst AnnouncementBannerContext = React.createContext<{\n hasIcon: boolean;\n icon?: React.ReactNode;\n variant: AnnouncementBannerVariant;\n}>({\n hasIcon: false,\n variant: 'info',\n});\n\n/**\n * Short title or message for the announcement.\n */\nconst AnnouncementBannerHeader = ({\n children,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'span', { children: React.ReactNode }>) => {\n const { hasIcon, icon, variant } = useContext(AnnouncementBannerContext);\n const classes = classNames('ndl-announcement-banner-header', className);\n return (\n <Typography\n as=\"span\"\n variant=\"body-medium\"\n className={classes}\n style={style}\n ref={ref}\n htmlAttributes={htmlAttributes}\n {...restProps}\n >\n {hasIcon && <StatusIcon icon={icon} variant={variant} />}\n {children}\n </Typography>\n );\n};\n\n/**\n * Optional actions shown next to the announcement message.\n */\nconst AnnouncementBannerActions = ({\n children,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'div', { children: React.ReactNode }>) => {\n const classes = classNames('ndl-announcement-banner-actions', className);\n return (\n <div\n className={classes}\n style={style}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n {children}\n </div>\n );\n};\n\n/**\n * Full-width announcement bar intended to sit at the top of its parent.\n * It stays in normal document flow so sibling content is shifted down.\n *\n * @remarks\n * Place `AnnouncementBanner` as the first child of a full-width parent (for\n * example the page shell).\n */\nconst AnnouncementBannerComponent = <\n TElement extends React.ElementType = 'section',\n>({\n as,\n variant = 'info',\n hasIcon = false,\n icon,\n onClose,\n className,\n children,\n isCloseable = false,\n htmlAttributes,\n liveRegion,\n ref,\n ...restProps\n}: PolymorphicCommonProps<TElement, AnnouncementBannerProps>) => {\n const Element: React.ElementType = as ?? 'section';\n const contentRef = useRef<HTMLDivElement>(null);\n const [pendingAnnouncement, setPendingAnnouncement] =\n useState<PendingAnnouncement | null>(null);\n\n const classes = classNames('ndl-announcement-banner', className, {\n 'ndl-announcement-banner-closeable': isCloseable,\n 'ndl-danger': variant === 'danger',\n 'ndl-discovery': variant === 'discovery',\n 'ndl-info': variant === 'info',\n 'ndl-neutral': variant === 'neutral',\n 'ndl-warning': variant === 'warning',\n });\n\n const handleClose = (\n error:\n | React.MouseEvent<HTMLElement, MouseEvent>\n | React.KeyboardEvent<HTMLElement>,\n ) => {\n if (onClose && typeof onClose === 'function') {\n onClose(error);\n }\n };\n\n useEffect(() => {\n if (!liveRegion || !contentRef.current) {\n setPendingAnnouncement(null);\n return;\n }\n\n const header = contentRef.current.querySelector(\n '.ndl-announcement-banner-header',\n );\n\n if (!header) {\n setPendingAnnouncement(null);\n return;\n }\n\n let timeoutId: number | undefined;\n\n const announceHeader = () => {\n window.clearTimeout(timeoutId);\n setPendingAnnouncement(null);\n\n const message = header.textContent?.trim();\n\n if (message) {\n timeoutId = window.setTimeout(() => {\n setPendingAnnouncement({ message, role: liveRegion });\n }, LIVE_REGION_REGISTRATION_DELAY);\n }\n };\n\n const observer = new MutationObserver(announceHeader);\n observer.observe(header, {\n characterData: true,\n childList: true,\n subtree: true,\n });\n announceHeader();\n\n return () => {\n observer.disconnect();\n window.clearTimeout(timeoutId);\n };\n }, [liveRegion]);\n\n const announcement =\n pendingAnnouncement?.role === liveRegion\n ? (pendingAnnouncement?.message ?? '')\n : '';\n\n return (\n <Element className={classes} ref={ref} {...restProps} {...htmlAttributes}>\n {liveRegion && (\n <span\n className=\"ndl-announcement-banner-live-region\"\n role={liveRegion}\n aria-atomic=\"true\"\n >\n {announcement}\n </span>\n )}\n <div className=\"ndl-announcement-banner-container\" ref={contentRef}>\n <AnnouncementBannerContext.Provider value={{ hasIcon, icon, variant }}>\n {children}\n </AnnouncementBannerContext.Provider>\n </div>\n {isCloseable && (\n <div className=\"ndl-announcement-banner-close\">\n <CleanIconButton\n size=\"small\"\n onClick={handleClose}\n description={null}\n htmlAttributes={{ 'aria-label': 'Close' }}\n >\n <XMarkIconOutline />\n </CleanIconButton>\n </div>\n )}\n </Element>\n );\n};\n\nconst AnnouncementBanner = Object.assign(AnnouncementBannerComponent, {\n Actions: AnnouncementBannerActions,\n Header: AnnouncementBannerHeader,\n});\n\nexport { AnnouncementBanner };\n"]}
@@ -0,0 +1,22 @@
1
+ /**
2
+ *
3
+ * Copyright (c) "Neo4j"
4
+ * Neo4j Sweden AB [http://neo4j.com]
5
+ *
6
+ * This file is part of Neo4j.
7
+ *
8
+ * Neo4j is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
+ */
21
+ export * from './AnnouncementBanner';
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/announcement-banner/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,cAAc,sBAAsB,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport * from './AnnouncementBanner';\n"]}
@@ -0,0 +1,28 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ *
4
+ * Copyright (c) "Neo4j"
5
+ * Neo4j Sweden AB [http://neo4j.com]
6
+ *
7
+ * This file is part of Neo4j.
8
+ *
9
+ * Neo4j is free software: you can redistribute it and/or modify
10
+ * it under the terms of the GNU General Public License as published by
11
+ * the Free Software Foundation, either version 3 of the License, or
12
+ * (at your option) any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ * GNU General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU General Public License
20
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
+ */
22
+ import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
23
+ import { AnnouncementBanner } from '@neo4j-ndl/react';
24
+ const Component = () => {
25
+ return (_jsx(AnnouncementBanner, { isCloseable: true, onClose: () => alert('Announcement banner closed'), children: _jsx(AnnouncementBanner.Header, { children: "This announcement can be dismissed." }) }));
26
+ };
27
+ export default Component;
28
+ //# sourceMappingURL=announcement-banner-closeable.story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"announcement-banner-closeable.story.js","sourceRoot":"","sources":["../../../../src/announcement-banner/stories/announcement-banner-closeable.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,kBAAkB,IACjB,WAAW,EAAE,IAAI,EACjB,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,4BAA4B,CAAC,YAElD,KAAC,kBAAkB,CAAC,MAAM,sDAEE,GACT,CACtB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { AnnouncementBanner } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <AnnouncementBanner\n isCloseable={true}\n onClose={() => alert('Announcement banner closed')}\n >\n <AnnouncementBanner.Header>\n This announcement can be dismissed.\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n );\n};\n\nexport default Component;\n"]}
@@ -0,0 +1,29 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ *
4
+ * Copyright (c) "Neo4j"
5
+ * Neo4j Sweden AB [http://neo4j.com]
6
+ *
7
+ * This file is part of Neo4j.
8
+ *
9
+ * Neo4j is free software: you can redistribute it and/or modify
10
+ * it under the terms of the GNU General Public License as published by
11
+ * the Free Software Foundation, either version 3 of the License, or
12
+ * (at your option) any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ * GNU General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU General Public License
20
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
+ */
22
+ import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
23
+ import { AnnouncementBanner } from '@neo4j-ndl/react';
24
+ import { GiftIconSolid, RocketLaunchIconSolid } from '@neo4j-ndl/react/icons';
25
+ const Component = () => {
26
+ return (_jsxs("div", { className: "n-flex n-flex-col n-gap-token-8 n-w-full", children: [_jsx(AnnouncementBanner, { variant: "discovery", hasIcon: true, children: _jsx(AnnouncementBanner.Header, { children: "Discovery with the default Sparkles icon" }) }), _jsx(AnnouncementBanner, { variant: "discovery", hasIcon: true, icon: _jsx(GiftIconSolid, {}), children: _jsx(AnnouncementBanner.Header, { children: "Discovery with a custom gift icon" }) }), _jsx(AnnouncementBanner, { variant: "neutral", hasIcon: true, children: _jsx(AnnouncementBanner.Header, { children: "Neutral with the default Bolt icon" }) }), _jsx(AnnouncementBanner, { variant: "neutral", hasIcon: true, icon: _jsx(RocketLaunchIconSolid, {}), children: _jsx(AnnouncementBanner.Header, { children: "Neutral with a custom rocket icon" }) })] }));
27
+ };
28
+ export default Component;
29
+ //# sourceMappingURL=announcement-banner-custom-icons.story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"announcement-banner-custom-icons.story.js","sourceRoot":"","sources":["../../../../src/announcement-banner/stories/announcement-banner-custom-icons.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAE9E,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,eAAK,SAAS,EAAC,0CAA0C,aACvD,KAAC,kBAAkB,IAAC,OAAO,EAAC,WAAW,EAAC,OAAO,EAAE,IAAI,YACnD,KAAC,kBAAkB,CAAC,MAAM,2DAEE,GACT,EACrB,KAAC,kBAAkB,IACjB,OAAO,EAAC,WAAW,EACnB,OAAO,EAAE,IAAI,EACb,IAAI,EAAE,KAAC,aAAa,KAAG,YAEvB,KAAC,kBAAkB,CAAC,MAAM,oDAEE,GACT,EACrB,KAAC,kBAAkB,IAAC,OAAO,EAAC,SAAS,EAAC,OAAO,EAAE,IAAI,YACjD,KAAC,kBAAkB,CAAC,MAAM,qDAEE,GACT,EACrB,KAAC,kBAAkB,IACjB,OAAO,EAAC,SAAS,EACjB,OAAO,EAAE,IAAI,EACb,IAAI,EAAE,KAAC,qBAAqB,KAAG,YAE/B,KAAC,kBAAkB,CAAC,MAAM,oDAEE,GACT,IACjB,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { AnnouncementBanner } from '@neo4j-ndl/react';\nimport { GiftIconSolid, RocketLaunchIconSolid } from '@neo4j-ndl/react/icons';\n\nconst Component = () => {\n return (\n <div className=\"n-flex n-flex-col n-gap-token-8 n-w-full\">\n <AnnouncementBanner variant=\"discovery\" hasIcon={true}>\n <AnnouncementBanner.Header>\n Discovery with the default Sparkles icon\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n <AnnouncementBanner\n variant=\"discovery\"\n hasIcon={true}\n icon={<GiftIconSolid />}\n >\n <AnnouncementBanner.Header>\n Discovery with a custom gift icon\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n <AnnouncementBanner variant=\"neutral\" hasIcon={true}>\n <AnnouncementBanner.Header>\n Neutral with the default Bolt icon\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n <AnnouncementBanner\n variant=\"neutral\"\n hasIcon={true}\n icon={<RocketLaunchIconSolid />}\n >\n <AnnouncementBanner.Header>\n Neutral with a custom rocket icon\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -0,0 +1,28 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ *
4
+ * Copyright (c) "Neo4j"
5
+ * Neo4j Sweden AB [http://neo4j.com]
6
+ *
7
+ * This file is part of Neo4j.
8
+ *
9
+ * Neo4j is free software: you can redistribute it and/or modify
10
+ * it under the terms of the GNU General Public License as published by
11
+ * the Free Software Foundation, either version 3 of the License, or
12
+ * (at your option) any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ * GNU General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU General Public License
20
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
+ */
22
+ import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
23
+ import { AnnouncementBanner } from '@neo4j-ndl/react';
24
+ const Component = () => {
25
+ return (_jsx(AnnouncementBanner, { variant: "info", hasIcon: true, children: _jsx(AnnouncementBanner.Header, { children: "Scheduled maintenance starts tonight at 22:00 UTC." }) }));
26
+ };
27
+ export default Component;
28
+ //# sourceMappingURL=announcement-banner-default.story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"announcement-banner-default.story.js","sourceRoot":"","sources":["../../../../src/announcement-banner/stories/announcement-banner-default.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,kBAAkB,IAAC,OAAO,EAAC,MAAM,EAAC,OAAO,EAAE,IAAI,YAC9C,KAAC,kBAAkB,CAAC,MAAM,qEAEE,GACT,CACtB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { AnnouncementBanner } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <AnnouncementBanner variant=\"info\" hasIcon={true}>\n <AnnouncementBanner.Header>\n Scheduled maintenance starts tonight at 22:00 UTC.\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n );\n};\n\nexport default Component;\n"]}
@@ -0,0 +1,30 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ *
4
+ * Copyright (c) "Neo4j"
5
+ * Neo4j Sweden AB [http://neo4j.com]
6
+ *
7
+ * This file is part of Neo4j.
8
+ *
9
+ * Neo4j is free software: you can redistribute it and/or modify
10
+ * it under the terms of the GNU General Public License as published by
11
+ * the Free Software Foundation, either version 3 of the License, or
12
+ * (at your option) any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ * GNU General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU General Public License
20
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
+ */
22
+ import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
23
+ import { AnnouncementBanner, OutlinedButton, Typography, } from '@neo4j-ndl/react';
24
+ import { useState } from 'react';
25
+ const Component = () => {
26
+ const [isVisible, setIsVisible] = useState(false);
27
+ return (_jsxs("div", { className: "n-flex n-flex-col n-w-full", children: [isVisible && (_jsx(AnnouncementBanner, { variant: "discovery", hasIcon: true, liveRegion: "status", isCloseable: true, onClose: () => setIsVisible(false), children: _jsx(AnnouncementBanner.Header, { children: "New Aura features are available for your organization." }) })), _jsxs("div", { className: "n-flex n-flex-col n-gap-token-16 n-p-token-24 n-bg-neutral-bg-default", children: [_jsx(OutlinedButton, { onClick: () => setIsVisible((visible) => !visible), children: isVisible ? 'Hide announcement' : 'Show announcement' }), _jsxs(Typography, { variant: "body-medium", children: ["The page is already loaded. Toggle the announcement in to simulate a later campaign or poll. ", _jsx("code", { children: "liveRegion=\"status\"" }), ' ', "announces politely without interrupting."] })] })] }));
28
+ };
29
+ export default Component;
30
+ //# sourceMappingURL=announcement-banner-injected-non-urgent.story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"announcement-banner-injected-non-urgent.story.js","sourceRoot":"","sources":["../../../../src/announcement-banner/stories/announcement-banner-injected-non-urgent.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,UAAU,GACX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAElD,OAAO,CACL,eAAK,SAAS,EAAC,4BAA4B,aACxC,SAAS,IAAI,CACZ,KAAC,kBAAkB,IACjB,OAAO,EAAC,WAAW,EACnB,OAAO,EAAE,IAAI,EACb,UAAU,EAAC,QAAQ,EACnB,WAAW,EAAE,IAAI,EACjB,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,YAElC,KAAC,kBAAkB,CAAC,MAAM,yEAEE,GACT,CACtB,EACD,eAAK,SAAS,EAAC,uEAAuE,aACpF,KAAC,cAAc,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,YAC/D,SAAS,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,mBAAmB,GACvC,EACjB,MAAC,UAAU,IAAC,OAAO,EAAC,aAAa,8GAEP,mDAA0C,EAAC,GAAG,gDAE3D,IACT,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport {\n AnnouncementBanner,\n OutlinedButton,\n Typography,\n} from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [isVisible, setIsVisible] = useState(false);\n\n return (\n <div className=\"n-flex n-flex-col n-w-full\">\n {isVisible && (\n <AnnouncementBanner\n variant=\"discovery\"\n hasIcon={true}\n liveRegion=\"status\"\n isCloseable={true}\n onClose={() => setIsVisible(false)}\n >\n <AnnouncementBanner.Header>\n New Aura features are available for your organization.\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n )}\n <div className=\"n-flex n-flex-col n-gap-token-16 n-p-token-24 n-bg-neutral-bg-default\">\n <OutlinedButton onClick={() => setIsVisible((visible) => !visible)}>\n {isVisible ? 'Hide announcement' : 'Show announcement'}\n </OutlinedButton>\n <Typography variant=\"body-medium\">\n The page is already loaded. Toggle the announcement in to simulate a\n later campaign or poll. <code>liveRegion=&quot;status&quot;</code>{' '}\n announces politely without interrupting.\n </Typography>\n </div>\n </div>\n );\n};\n\nexport default Component;\n"]}