@neo4j-ndl/react 4.23.4 → 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.
- package/lib/cjs/announcement-banner/AnnouncementBanner.js +198 -0
- package/lib/cjs/announcement-banner/AnnouncementBanner.js.map +1 -0
- package/lib/cjs/announcement-banner/index.js +38 -0
- package/lib/cjs/announcement-banner/index.js.map +1 -0
- package/lib/cjs/announcement-banner/stories/announcement-banner-closeable.story.js +30 -0
- package/lib/cjs/announcement-banner/stories/announcement-banner-closeable.story.js.map +1 -0
- package/lib/cjs/announcement-banner/stories/announcement-banner-custom-icons.story.js +31 -0
- package/lib/cjs/announcement-banner/stories/announcement-banner-custom-icons.story.js.map +1 -0
- package/lib/cjs/announcement-banner/stories/announcement-banner-default.story.js +30 -0
- package/lib/cjs/announcement-banner/stories/announcement-banner-default.story.js.map +1 -0
- package/lib/cjs/announcement-banner/stories/announcement-banner-injected-non-urgent.story.js +32 -0
- package/lib/cjs/announcement-banner/stories/announcement-banner-injected-non-urgent.story.js.map +1 -0
- package/lib/cjs/announcement-banner/stories/announcement-banner-injected-urgent.story.js +32 -0
- package/lib/cjs/announcement-banner/stories/announcement-banner-injected-urgent.story.js.map +1 -0
- package/lib/cjs/announcement-banner/stories/announcement-banner-present-at-page-render.story.js +30 -0
- package/lib/cjs/announcement-banner/stories/announcement-banner-present-at-page-render.story.js.map +1 -0
- package/lib/cjs/announcement-banner/stories/announcement-banner-variants.story.js +30 -0
- package/lib/cjs/announcement-banner/stories/announcement-banner-variants.story.js.map +1 -0
- package/lib/cjs/announcement-banner/stories/announcement-banner-with-actions.story.js +30 -0
- package/lib/cjs/announcement-banner/stories/announcement-banner-with-actions.story.js.map +1 -0
- package/lib/cjs/announcement-banner/stories/announcement-banner-with-page-content.story.js +32 -0
- package/lib/cjs/announcement-banner/stories/announcement-banner-with-page-content.story.js.map +1 -0
- package/lib/cjs/announcement-banner/stories/index.js +64 -0
- package/lib/cjs/announcement-banner/stories/index.js.map +1 -0
- package/lib/cjs/index.js +4 -2
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/text-input/TextInput.js +4 -3
- package/lib/cjs/text-input/TextInput.js.map +1 -1
- package/lib/esm/announcement-banner/AnnouncementBanner.js +159 -0
- package/lib/esm/announcement-banner/AnnouncementBanner.js.map +1 -0
- package/lib/esm/announcement-banner/index.js +22 -0
- package/lib/esm/announcement-banner/index.js.map +1 -0
- package/lib/esm/announcement-banner/stories/announcement-banner-closeable.story.js +28 -0
- package/lib/esm/announcement-banner/stories/announcement-banner-closeable.story.js.map +1 -0
- package/lib/esm/announcement-banner/stories/announcement-banner-custom-icons.story.js +29 -0
- package/lib/esm/announcement-banner/stories/announcement-banner-custom-icons.story.js.map +1 -0
- package/lib/esm/announcement-banner/stories/announcement-banner-default.story.js +28 -0
- package/lib/esm/announcement-banner/stories/announcement-banner-default.story.js.map +1 -0
- package/lib/esm/announcement-banner/stories/announcement-banner-injected-non-urgent.story.js +30 -0
- package/lib/esm/announcement-banner/stories/announcement-banner-injected-non-urgent.story.js.map +1 -0
- package/lib/esm/announcement-banner/stories/announcement-banner-injected-urgent.story.js +30 -0
- package/lib/esm/announcement-banner/stories/announcement-banner-injected-urgent.story.js.map +1 -0
- package/lib/esm/announcement-banner/stories/announcement-banner-present-at-page-render.story.js +28 -0
- package/lib/esm/announcement-banner/stories/announcement-banner-present-at-page-render.story.js.map +1 -0
- package/lib/esm/announcement-banner/stories/announcement-banner-variants.story.js +28 -0
- package/lib/esm/announcement-banner/stories/announcement-banner-variants.story.js.map +1 -0
- package/lib/esm/announcement-banner/stories/announcement-banner-with-actions.story.js +28 -0
- package/lib/esm/announcement-banner/stories/announcement-banner-with-actions.story.js.map +1 -0
- package/lib/esm/announcement-banner/stories/announcement-banner-with-page-content.story.js +30 -0
- package/lib/esm/announcement-banner/stories/announcement-banner-with-page-content.story.js.map +1 -0
- package/lib/esm/announcement-banner/stories/index.js +49 -0
- package/lib/esm/announcement-banner/stories/index.js.map +1 -0
- package/lib/esm/index.js +1 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/text-input/TextInput.js +4 -3
- package/lib/esm/text-input/TextInput.js.map +1 -1
- package/lib/types/announcement-banner/AnnouncementBanner.d.ts +75 -0
- package/lib/types/announcement-banner/AnnouncementBanner.d.ts.map +1 -0
- package/lib/types/announcement-banner/index.d.ts +22 -0
- package/lib/types/announcement-banner/index.d.ts.map +1 -0
- package/lib/types/announcement-banner/stories/announcement-banner-closeable.story.d.ts +24 -0
- package/lib/types/announcement-banner/stories/announcement-banner-closeable.story.d.ts.map +1 -0
- package/lib/types/announcement-banner/stories/announcement-banner-custom-icons.story.d.ts +24 -0
- package/lib/types/announcement-banner/stories/announcement-banner-custom-icons.story.d.ts.map +1 -0
- package/lib/types/announcement-banner/stories/announcement-banner-default.story.d.ts +24 -0
- package/lib/types/announcement-banner/stories/announcement-banner-default.story.d.ts.map +1 -0
- package/lib/types/announcement-banner/stories/announcement-banner-injected-non-urgent.story.d.ts +24 -0
- package/lib/types/announcement-banner/stories/announcement-banner-injected-non-urgent.story.d.ts.map +1 -0
- package/lib/types/announcement-banner/stories/announcement-banner-injected-urgent.story.d.ts +24 -0
- package/lib/types/announcement-banner/stories/announcement-banner-injected-urgent.story.d.ts.map +1 -0
- package/lib/types/announcement-banner/stories/announcement-banner-present-at-page-render.story.d.ts +24 -0
- package/lib/types/announcement-banner/stories/announcement-banner-present-at-page-render.story.d.ts.map +1 -0
- package/lib/types/announcement-banner/stories/announcement-banner-variants.story.d.ts +24 -0
- package/lib/types/announcement-banner/stories/announcement-banner-variants.story.d.ts.map +1 -0
- package/lib/types/announcement-banner/stories/announcement-banner-with-actions.story.d.ts +24 -0
- package/lib/types/announcement-banner/stories/announcement-banner-with-actions.story.d.ts.map +1 -0
- package/lib/types/announcement-banner/stories/announcement-banner-with-page-content.story.d.ts +24 -0
- package/lib/types/announcement-banner/stories/announcement-banner-with-page-content.story.d.ts.map +1 -0
- package/lib/types/announcement-banner/stories/index.d.ts +39 -0
- package/lib/types/announcement-banner/stories/index.d.ts.map +1 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/text-input/TextInput.d.ts.map +1 -1
- package/package.json +7 -2
- package/skills/ndl-react/SKILL.md +3 -2
- package/skills/ndl-react/components/announcement-banner.md +468 -0
|
@@ -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
|
package/lib/esm/announcement-banner/stories/announcement-banner-injected-non-urgent.story.js.map
ADDED
|
@@ -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="status"</code>{' '}\n announces politely without interrupting.\n </Typography>\n </div>\n </div>\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: "danger", hasIcon: true, liveRegion: "alert", children: _jsx(AnnouncementBanner.Header, { children: "Error: connection to the database was lost. Reconnecting\u2026" }) })), _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 connection loss or session expiry.", ' ', _jsx("code", { children: "liveRegion=\"alert\"" }), " interrupts the screen reader because the message is time-sensitive."] })] })] }));
|
|
28
|
+
};
|
|
29
|
+
export default Component;
|
|
30
|
+
//# sourceMappingURL=announcement-banner-injected-urgent.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"announcement-banner-injected-urgent.story.js","sourceRoot":"","sources":["../../../../src/announcement-banner/stories/announcement-banner-injected-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,IAAC,OAAO,EAAC,QAAQ,EAAC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAC,OAAO,YACpE,KAAC,kBAAkB,CAAC,MAAM,iFAEE,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,wHAEI,GAAG,EACtC,kDAAyC,4EAE9B,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 variant=\"danger\" hasIcon={true} liveRegion=\"alert\">\n <AnnouncementBanner.Header>\n Error: connection to the database was lost. Reconnecting…\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 connection loss or session expiry.{' '}\n <code>liveRegion="alert"</code> interrupts the screen reader\n because the message is time-sensitive.\n </Typography>\n </div>\n </div>\n );\n};\n\nexport default Component;\n"]}
|
package/lib/esm/announcement-banner/stories/announcement-banner-present-at-page-render.story.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
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, Typography } from '@neo4j-ndl/react';
|
|
24
|
+
const Component = () => {
|
|
25
|
+
return (_jsxs("div", { className: "n-flex n-flex-col n-w-full", children: [_jsx(AnnouncementBanner, { variant: "danger", hasIcon: true, children: _jsx(AnnouncementBanner.Header, { children: "Warning: your marketplace subscription will be deprecated on September 19, 2026." }) }), _jsx("div", { className: "n-p-token-24 n-bg-neutral-bg-default", children: _jsx(Typography, { variant: "body-medium", children: "This banner is part of the initial page render, so `liveRegion` is omitted. Screen reader users hear it when they reach it in the page, not as an interruption." }) })] }));
|
|
26
|
+
};
|
|
27
|
+
export default Component;
|
|
28
|
+
//# sourceMappingURL=announcement-banner-present-at-page-render.story.js.map
|
package/lib/esm/announcement-banner/stories/announcement-banner-present-at-page-render.story.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"announcement-banner-present-at-page-render.story.js","sourceRoot":"","sources":["../../../../src/announcement-banner/stories/announcement-banner-present-at-page-render.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAElE,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,eAAK,SAAS,EAAC,4BAA4B,aACzC,KAAC,kBAAkB,IAAC,OAAO,EAAC,QAAQ,EAAC,OAAO,EAAE,IAAI,YAChD,KAAC,kBAAkB,CAAC,MAAM,mGAGE,GACT,EACrB,cAAK,SAAS,EAAC,sCAAsC,YACnD,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,gLAIpB,GACT,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 { AnnouncementBanner, Typography } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <div className=\"n-flex n-flex-col n-w-full\">\n <AnnouncementBanner variant=\"danger\" hasIcon={true}>\n <AnnouncementBanner.Header>\n Warning: your marketplace subscription will be deprecated on September\n 19, 2026.\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n <div className=\"n-p-token-24 n-bg-neutral-bg-default\">\n <Typography variant=\"body-medium\">\n This banner is part of the initial page render, so `liveRegion` is\n omitted. Screen reader users hear it when they reach it in the page,\n not as an interruption.\n </Typography>\n </div>\n </div>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
const Component = () => {
|
|
25
|
+
return (_jsxs("div", { className: "n-flex n-flex-col n-gap-token-8 n-w-full", children: [_jsx(AnnouncementBanner, { variant: "info", hasIcon: true, children: _jsx(AnnouncementBanner.Header, { children: "Info announcement" }) }), _jsx(AnnouncementBanner, { variant: "warning", hasIcon: true, children: _jsx(AnnouncementBanner.Header, { children: "Warning announcement" }) }), _jsx(AnnouncementBanner, { variant: "danger", hasIcon: true, children: _jsx(AnnouncementBanner.Header, { children: "Danger announcement" }) }), _jsx(AnnouncementBanner, { variant: "discovery", hasIcon: true, children: _jsx(AnnouncementBanner.Header, { children: "Discovery announcement" }) }), _jsx(AnnouncementBanner, { variant: "neutral", hasIcon: true, children: _jsx(AnnouncementBanner.Header, { children: "Neutral announcement" }) })] }));
|
|
26
|
+
};
|
|
27
|
+
export default Component;
|
|
28
|
+
//# sourceMappingURL=announcement-banner-variants.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"announcement-banner-variants.story.js","sourceRoot":"","sources":["../../../../src/announcement-banner/stories/announcement-banner-variants.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,eAAK,SAAS,EAAC,0CAA0C,aACvD,KAAC,kBAAkB,IAAC,OAAO,EAAC,MAAM,EAAC,OAAO,EAAE,IAAI,YAC9C,KAAC,kBAAkB,CAAC,MAAM,oCAA8C,GACrD,EACrB,KAAC,kBAAkB,IAAC,OAAO,EAAC,SAAS,EAAC,OAAO,EAAE,IAAI,YACjD,KAAC,kBAAkB,CAAC,MAAM,uCAEE,GACT,EACrB,KAAC,kBAAkB,IAAC,OAAO,EAAC,QAAQ,EAAC,OAAO,EAAE,IAAI,YAChD,KAAC,kBAAkB,CAAC,MAAM,sCAEE,GACT,EACrB,KAAC,kBAAkB,IAAC,OAAO,EAAC,WAAW,EAAC,OAAO,EAAE,IAAI,YACnD,KAAC,kBAAkB,CAAC,MAAM,yCAEE,GACT,EACrB,KAAC,kBAAkB,IAAC,OAAO,EAAC,SAAS,EAAC,OAAO,EAAE,IAAI,YACjD,KAAC,kBAAkB,CAAC,MAAM,uCAEE,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';\n\nconst Component = () => {\n return (\n <div className=\"n-flex n-flex-col n-gap-token-8 n-w-full\">\n <AnnouncementBanner variant=\"info\" hasIcon={true}>\n <AnnouncementBanner.Header>Info announcement</AnnouncementBanner.Header>\n </AnnouncementBanner>\n <AnnouncementBanner variant=\"warning\" hasIcon={true}>\n <AnnouncementBanner.Header>\n Warning announcement\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n <AnnouncementBanner variant=\"danger\" hasIcon={true}>\n <AnnouncementBanner.Header>\n Danger announcement\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n <AnnouncementBanner variant=\"discovery\" hasIcon={true}>\n <AnnouncementBanner.Header>\n Discovery announcement\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n <AnnouncementBanner variant=\"neutral\" hasIcon={true}>\n <AnnouncementBanner.Header>\n Neutral announcement\n </AnnouncementBanner.Header>\n </AnnouncementBanner>\n </div>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
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, TextButton, } from '@neo4j-ndl/react';
|
|
24
|
+
const Component = () => {
|
|
25
|
+
return (_jsxs(AnnouncementBanner, { hasIcon: true, variant: "warning", children: [_jsx(AnnouncementBanner.Header, { children: "Your trial ends in 3 days." }), _jsxs(AnnouncementBanner.Actions, { children: [_jsx(OutlinedButton, { children: "Upgrade" }), _jsx(TextButton, { children: "Learn more" })] })] }));
|
|
26
|
+
};
|
|
27
|
+
export default Component;
|
|
28
|
+
//# sourceMappingURL=announcement-banner-with-actions.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"announcement-banner-with-actions.story.js","sourceRoot":"","sources":["../../../../src/announcement-banner/stories/announcement-banner-with-actions.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,UAAU,GACX,MAAM,kBAAkB,CAAC;AAE1B,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,MAAC,kBAAkB,IAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAC,SAAS,aAClD,KAAC,kBAAkB,CAAC,MAAM,6CAEE,EAC5B,MAAC,kBAAkB,CAAC,OAAO,eACzB,KAAC,cAAc,0BAAyB,EACxC,KAAC,UAAU,6BAAwB,IACR,IACV,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 {\n AnnouncementBanner,\n OutlinedButton,\n TextButton,\n} from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <AnnouncementBanner hasIcon={true} variant=\"warning\">\n <AnnouncementBanner.Header>\n Your trial ends in 3 days.\n </AnnouncementBanner.Header>\n <AnnouncementBanner.Actions>\n <OutlinedButton>Upgrade</OutlinedButton>\n <TextButton>Learn more</TextButton>\n </AnnouncementBanner.Actions>\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, TextButton, Typography, } from '@neo4j-ndl/react';
|
|
24
|
+
import { useState } from 'react';
|
|
25
|
+
const Component = () => {
|
|
26
|
+
const [isVisible, setIsVisible] = useState(true);
|
|
27
|
+
return (_jsxs("div", { className: "n-flex n-flex-col n-max-w-[768px] n-h-52", children: [isVisible && (_jsxs(AnnouncementBanner, { variant: "warning", hasIcon: true, isCloseable: true, onClose: () => setIsVisible(false), children: [_jsx(AnnouncementBanner.Header, { children: "Scheduled maintenance starts tonight at 22:00 UTC." }), _jsx(AnnouncementBanner.Actions, { children: _jsx(OutlinedButton, { children: "Learn more" }) })] })), _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 && (_jsx("div", { children: _jsx(TextButton, { onClick: () => setIsVisible(true), children: "Show announcement again" }) })), _jsx(Typography, { variant: "title-2", children: "Page title" }), _jsx(OutlinedButton, { children: "Can focus" }), _jsx(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." }), _jsx(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." }), _jsx(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." }), _jsx(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." }), _jsx(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." })] })] }));
|
|
28
|
+
};
|
|
29
|
+
export default Component;
|
|
30
|
+
//# sourceMappingURL=announcement-banner-with-page-content.story.js.map
|
package/lib/esm/announcement-banner/stories/announcement-banner-with-page-content.story.js.map
ADDED
|
@@ -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,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,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,IAAI,CAAC,CAAC;IAEjD,OAAO,CACL,eAAK,SAAS,EAAC,0CAA0C,aACtD,SAAS,IAAI,CACZ,MAAC,kBAAkB,IACjB,OAAO,EAAC,SAAS,EACjB,OAAO,EAAE,IAAI,EACb,WAAW,EAAE,IAAI,EACjB,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,aAElC,KAAC,kBAAkB,CAAC,MAAM,qEAEE,EAC5B,KAAC,kBAAkB,CAAC,OAAO,cACzB,KAAC,cAAc,6BAA4B,GAChB,IACV,CACtB,EACD,eAAK,SAAS,EAAC,4GAA4G,aACxH,CAAC,SAAS,IAAI,CACb,wBACE,KAAC,UAAU,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,wCAEhC,GACT,CACP,EACD,KAAC,UAAU,IAAC,OAAO,EAAC,SAAS,2BAAwB,EACrD,KAAC,cAAc,4BAA2B,EAC1C,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,6sBAYpB,EACb,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,owBAapB,EACb,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,izBAapB,EACb,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,oVAMpB,EACb,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,kpBAWpB,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 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,49 @@
|
|
|
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 { default as AnnouncementBannerDefault } from './announcement-banner-default.story';
|
|
22
|
+
export { default as AnnouncementBannerVariants } from './announcement-banner-variants.story';
|
|
23
|
+
export { default as AnnouncementBannerCustomIcons } from './announcement-banner-custom-icons.story';
|
|
24
|
+
export { default as AnnouncementBannerCloseable } from './announcement-banner-closeable.story';
|
|
25
|
+
export { default as AnnouncementBannerWithActions } from './announcement-banner-with-actions.story';
|
|
26
|
+
export { default as AnnouncementBannerWithPageContent } from './announcement-banner-with-page-content.story';
|
|
27
|
+
export { default as AnnouncementBannerPresentAtPageRender } from './announcement-banner-present-at-page-render.story';
|
|
28
|
+
export { default as AnnouncementBannerInjectedNonUrgent } from './announcement-banner-injected-non-urgent.story';
|
|
29
|
+
export { default as AnnouncementBannerInjectedUrgent } from './announcement-banner-injected-urgent.story';
|
|
30
|
+
import { removeLicenseHeader } from '../../_common/export-stories-utils';
|
|
31
|
+
import AnnouncementBannerCloseableSrcRaw from './announcement-banner-closeable.story?raw';
|
|
32
|
+
import AnnouncementBannerCustomIconsSrcRaw from './announcement-banner-custom-icons.story?raw';
|
|
33
|
+
import AnnouncementBannerDefaultSrcRaw from './announcement-banner-default.story?raw';
|
|
34
|
+
import AnnouncementBannerInjectedNonUrgentSrcRaw from './announcement-banner-injected-non-urgent.story?raw';
|
|
35
|
+
import AnnouncementBannerInjectedUrgentSrcRaw from './announcement-banner-injected-urgent.story?raw';
|
|
36
|
+
import AnnouncementBannerPresentAtPageRenderSrcRaw from './announcement-banner-present-at-page-render.story?raw';
|
|
37
|
+
import AnnouncementBannerVariantsSrcRaw from './announcement-banner-variants.story?raw';
|
|
38
|
+
import AnnouncementBannerWithActionsSrcRaw from './announcement-banner-with-actions.story?raw';
|
|
39
|
+
import AnnouncementBannerWithPageContentSrcRaw from './announcement-banner-with-page-content.story?raw';
|
|
40
|
+
export const AnnouncementBannerDefaultSrc = removeLicenseHeader(AnnouncementBannerDefaultSrcRaw);
|
|
41
|
+
export const AnnouncementBannerVariantsSrc = removeLicenseHeader(AnnouncementBannerVariantsSrcRaw);
|
|
42
|
+
export const AnnouncementBannerCustomIconsSrc = removeLicenseHeader(AnnouncementBannerCustomIconsSrcRaw);
|
|
43
|
+
export const AnnouncementBannerCloseableSrc = removeLicenseHeader(AnnouncementBannerCloseableSrcRaw);
|
|
44
|
+
export const AnnouncementBannerWithActionsSrc = removeLicenseHeader(AnnouncementBannerWithActionsSrcRaw);
|
|
45
|
+
export const AnnouncementBannerWithPageContentSrc = removeLicenseHeader(AnnouncementBannerWithPageContentSrcRaw);
|
|
46
|
+
export const AnnouncementBannerPresentAtPageRenderSrc = removeLicenseHeader(AnnouncementBannerPresentAtPageRenderSrcRaw);
|
|
47
|
+
export const AnnouncementBannerInjectedNonUrgentSrc = removeLicenseHeader(AnnouncementBannerInjectedNonUrgentSrcRaw);
|
|
48
|
+
export const AnnouncementBannerInjectedUrgentSrc = removeLicenseHeader(AnnouncementBannerInjectedUrgentSrcRaw);
|
|
49
|
+
//# 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,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAC7F,OAAO,EAAE,OAAO,IAAI,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AACpG,OAAO,EAAE,OAAO,IAAI,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AAC/F,OAAO,EAAE,OAAO,IAAI,6BAA6B,EAAE,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,MAAM,CAAC,MAAM,sCAAsC,GAAG,mBAAmB,CACvE,yCAAyC,CAC1C,CAAC;AAEF,MAAM,CAAC,MAAM,mCAAmC,GAAG,mBAAmB,CACpE,sCAAsC,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/esm/index.js
CHANGED
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
export { Accordion } from './accordion';
|
|
22
22
|
export { StatusLabel } from './status-label';
|
|
23
23
|
export { Banner } from './banner';
|
|
24
|
+
export { AnnouncementBanner } from './announcement-banner';
|
|
24
25
|
export { Checkbox } from './checkbox';
|
|
25
26
|
export { Switch } from './switch';
|
|
26
27
|
export { Radio } from './radio';
|
package/lib/esm/index.js.map
CHANGED
|
@@ -1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,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,cAAc,YAAY,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 { 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,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC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iB,EACjB,eAAe,EACf,aAAa,EACb,mBAAmB,GACpB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,cAAc,YAAY,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 { 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"]}
|
|
@@ -55,7 +55,8 @@ export const TextInput = (_a) => {
|
|
|
55
55
|
state: value !== null && value !== void 0 ? value : '',
|
|
56
56
|
});
|
|
57
57
|
const hintId = useId();
|
|
58
|
-
const
|
|
58
|
+
const canClear = isClearable && isDisabled !== true;
|
|
59
|
+
const shouldRenderHint = canClear || isLoading;
|
|
59
60
|
const { field, controlProps } = useFormField({
|
|
60
61
|
errorText,
|
|
61
62
|
// The clear/loading hint describes the input alongside the message.
|
|
@@ -86,7 +87,7 @@ export const TextInput = (_a) => {
|
|
|
86
87
|
const hasCustomLabelAndNoAriaLabel = isCustomLabel && (ariaLabel === undefined || ariaLabel === '');
|
|
87
88
|
const handleInputKeyDown = (event) => {
|
|
88
89
|
var _a;
|
|
89
|
-
if (
|
|
90
|
+
if (canClear && event.key === 'Escape' && Boolean(currentValue)) {
|
|
90
91
|
event.preventDefault();
|
|
91
92
|
event.stopPropagation();
|
|
92
93
|
handleChange === null || handleChange === void 0 ? void 0 : handleChange({
|
|
@@ -107,7 +108,7 @@ export const TextInput = (_a) => {
|
|
|
107
108
|
? 'ndl-medium-spinner'
|
|
108
109
|
: 'ndl-small-spinner' })) : (leadingElement) })), _jsxs("div", { className: classNames('ndl-input-container', {
|
|
109
110
|
'ndl-clearable': isClearable,
|
|
110
|
-
}), children: [_jsx("input", Object.assign({ ref: ref, readOnly: isReadOnly, disabled: isDisabled, required: isRequired, value: currentValue, placeholder: placeholder, type: "text", onChange: handleChange }, controlProps, combinedHtmlInputAttributes, { onKeyDown: handleInputKeyDown }, restProps)), shouldRenderHint && (_jsxs("span", { id: hintId, className: "ndl-text-input-hint", "aria-hidden": true, children: [isLoading && 'Loading ',
|
|
111
|
+
}), children: [_jsx("input", Object.assign({ ref: ref, readOnly: isReadOnly, disabled: isDisabled, required: isRequired, value: currentValue, placeholder: placeholder, type: "text", onChange: handleChange }, controlProps, combinedHtmlInputAttributes, { onKeyDown: handleInputKeyDown }, restProps)), shouldRenderHint && (_jsxs("span", { id: hintId, className: "ndl-text-input-hint", "aria-hidden": true, children: [isLoading && 'Loading ', canClear && 'Press Escape to clear input.'] })), canClear && Boolean(currentValue) && (_jsx("div", { className: "ndl-element-clear ndl-element", children: _jsx("button", { tabIndex: -1, "aria-hidden": true, type: "button", title: "Clear input (Esc)", onClick: () => {
|
|
111
112
|
handleChange === null || handleChange === void 0 ? void 0 : handleChange({
|
|
112
113
|
target: { value: '' },
|
|
113
114
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.js","sourceRoot":"","sources":["../../../src/text-input/TextInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAIL,KAAK,EACL,OAAO,GACR,MAAM,OAAO,CAAC;AAEf,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,YAAY,GACb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,uCAAuC,EAAE,MAAM,qBAAqB,CAAC;AAE9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAqFvC;;;;;;GAMG;AAEH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EA0Ba,EAAE,EAAE;QA1BjB,EACxB,KAAK,EACL,OAAO,EACP,SAAS,EACT,Q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AE,EAAE,CAAC,CACjB,KAAC,QAAQ,kBACP,YAAY,EAAC,MAAM,EACnB,KAAK,EAAC,aAAa,IACf,aAAa,IACjB,SAAS,EAAE,iBAAiB,YAE3B,OAAO,IACC,CACZ,GACD,IACE,CACP,CAAC;AACJ,CAAC,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 classNames from 'classnames';\nimport {\n type InputHTMLAttributes,\n type ReactElement,\n type ReactNode,\n useId,\n useMemo,\n} from 'react';\n\nimport {\n FormFieldLabel,\n FormFieldMessage,\n useFormField,\n} from '../_common/form-control';\nimport { customLabelAndNoAriaLabelWarningMessage } from '../_common/messages';\nimport { type CommonProps, type TooltipObjectProps } from '../_common/types';\nimport { useSemiControlledInput } from '../_common/use-semi-controlled-input';\nimport { needleWarningMessage } from '../_common/utils';\nimport { XMarkIconOutline } from '../icons/generated/heroIcons/XMarkIconOutline';\nimport { LoadingSpinner } from '../loading-spinner';\nimport { Skeleton } from '../skeleton';\n\n/**\n * @remarks\n * When `moreInformationText` is provided, a tooltip is rendered next to the label, and the `tooltipProps` prop is used to configure the tooltip. The `TooltipObjectProps` type is defined as: `{ root?: Partial<React.ComponentProps<typeof Tooltip>>; trigger?: Partial<React.ComponentProps<typeof Tooltip.Trigger>>; content?: Partial<React.ComponentProps<typeof Tooltip.Content>>; }`, see the Tooltip component for more details.\n *\n * @remarks\n * When `isSkeletonLoading` is true, the input is rendered as a loading skeleton and the `skeletonProps` prop is used to configure the skeleton. For more information, see the Skeleton documentation.\n */\ntype TextInputProps = {\n /** Assistive text displayed below the input */\n helpText?: string | ReactNode;\n\n /** Error message displayed below the input. When provided, it overrides `helpText` and shows an error icon */\n errorText?: string | ReactNode;\n\n /** Leading element rendered inside the input */\n leadingElement?: ReactElement;\n\n /** Trailing element rendered inside the input */\n trailingElement?: ReactElement;\n\n /** Size of the input */\n size?: 'small' | 'medium' | 'large';\n\n /** Whether the input is read-only */\n isReadOnly?: boolean;\n\n /**\n * Whether to display the Required/Optional label next to the field label.\n * Shows Required if isRequired is true, otherwise shows Optional.\n * @default false\n */\n // TODO v5: inconsistent naming. The same switch is `hasRequiredIndicator` on\n // Combobox and on the internal form control this maps onto, and `isOptional`\n // on TextArea. The name also needs the disable below, which a name using one\n // of the allowed boolean prefixes would not.\n // eslint-disable-next-line @typescript-eslint/naming-convention\n showRequiredOrOptionalLabel?: boolean;\n\n /** Whether the input is disabled */\n isDisabled?: boolean;\n\n /** Whether the input is required */\n isRequired?: boolean;\n\n /** The current value of the input */\n value?: React.ComponentPropsWithoutRef<'input'>['value'];\n\n /** Placeholder text displayed when the input is empty */\n placeholder?: React.ComponentPropsWithoutRef<'input'>['placeholder'];\n\n /** Callback function triggered when the input value changes */\n onChange?: React.ComponentPropsWithoutRef<'input'>['onChange'];\n\n /** Whether the input should take the full available width */\n isFluid?: boolean;\n\n /** Text displayed in the information tooltip shown next to the label */\n moreInformationText?: React.ReactNode;\n\n // TODO v5: inconsistent naming. Every form control names itself differently:\n // the label is optional here and a design with no room for it reaches for\n // htmlAttributes['aria-label'], TextArea, Select, Checkbox, Radio and Switch\n // expose an `ariaLabel` prop instead, and Combobox requires the label and\n // clips it with `hasVisuallyHiddenLabel`.\n /** The label displayed above the input */\n label?: string | React.ReactNode;\n\n /** Props for the Tooltip component used by the information icon */\n tooltipProps?: TooltipObjectProps;\n\n /** Whether to render skeletons instead of content */\n isSkeletonLoading?: boolean;\n\n /** Additional props forwarded to the underlying Skeleton components */\n skeletonProps?: React.ComponentProps<typeof Skeleton>;\n\n /** Whether to show the clear button */\n isClearable?: boolean;\n\n /** Whether to show the loading spinner */\n isLoading?: boolean;\n};\n\n/**\n *\n *\n * TextInput Component\n *\n *\n */\n\nexport const TextInput = ({\n label,\n isFluid,\n errorText,\n helpText,\n leadingElement,\n trailingElement,\n showRequiredOrOptionalLabel = false,\n moreInformationText,\n size = 'medium',\n placeholder,\n value,\n tooltipProps,\n htmlAttributes,\n isDisabled,\n isReadOnly,\n isRequired,\n onChange,\n isClearable = false,\n className,\n style,\n isSkeletonLoading = false,\n isLoading = false,\n skeletonProps,\n ref,\n ...restProps\n}: CommonProps<'input', TextInputProps>) => {\n const [currentValue, handleChange] = useSemiControlledInput({\n inputType: 'text',\n isControlled: value !== undefined,\n onChange,\n state: value ?? '',\n });\n const hintId = useId();\n const shouldRenderHint = isClearable || isLoading;\n const { field, controlProps } = useFormField({\n errorText,\n // The clear/loading hint describes the input alongside the message.\n extraDescribedByIds: [shouldRenderHint && hintId],\n hasRequiredIndicator: showRequiredOrOptionalLabel,\n helpText,\n isRequired,\n label,\n });\n\n const containerWrappingClasses = classNames(`ndl-text-input`, className, {\n 'ndl-disabled': isDisabled,\n 'ndl-has-error': errorText,\n 'ndl-has-icon': leadingElement || trailingElement || errorText,\n 'ndl-has-leading-icon': leadingElement,\n 'ndl-has-trailing-icon': trailingElement || errorText,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-read-only': isReadOnly,\n 'ndl-small': size === 'small',\n });\n\n const hasEmptyLabelValue =\n label === undefined || label === null || label === '';\n\n const labelWrappingClasses = classNames('ndl-text-input-label', {\n 'ndl-fluid': isFluid,\n });\n\n const combinedHtmlInputAttributes: InputHTMLAttributes<HTMLInputElement> = {\n ...htmlAttributes,\n className: classNames('ndl-input', htmlAttributes?.className),\n };\n const ariaLabel = combinedHtmlInputAttributes['aria-label'];\n const isCustomLabel = Boolean(label) && typeof label !== 'string';\n const hasCustomLabelAndNoAriaLabel =\n isCustomLabel && (ariaLabel === undefined || ariaLabel === '');\n\n const handleInputKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (isClearable && event.key === 'Escape' && Boolean(currentValue)) {\n event.preventDefault();\n event.stopPropagation();\n handleChange?.({\n target: { value: '' },\n } as React.ChangeEvent<HTMLInputElement>);\n }\n htmlAttributes?.onKeyDown?.(event);\n };\n\n useMemo(() => {\n if (!label && !ariaLabel) {\n needleWarningMessage(\n 'A TextInput without a label does not have an aria label, be sure to include an aria label for screen readers. Link: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI',\n );\n }\n\n if (hasCustomLabelAndNoAriaLabel) {\n needleWarningMessage(customLabelAndNoAriaLabelWarningMessage);\n }\n }, [label, ariaLabel, hasCustomLabelAndNoAriaLabel]);\n\n return (\n <div className={containerWrappingClasses} style={style}>\n {/* We enable implicit label wrapping */}\n {/* Source: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI */}\n <label className={labelWrappingClasses}>\n {!hasEmptyLabelValue && (\n <FormFieldLabel\n field={field}\n size={size}\n association=\"implicit\"\n moreInformationText={moreInformationText}\n tooltipProps={tooltipProps}\n wrap={(row) => (\n <Skeleton\n onBackground=\"weak\"\n shape=\"rectangular\"\n {...skeletonProps}\n isLoading={isSkeletonLoading}\n >\n {row}\n </Skeleton>\n )}\n />\n )}\n <Skeleton\n onBackground=\"weak\"\n shape=\"rectangular\"\n {...skeletonProps}\n isLoading={isSkeletonLoading}\n >\n <div className=\"ndl-input-wrapper\">\n {(leadingElement || (isLoading && !trailingElement)) && (\n <div className=\"ndl-element-leading ndl-element\">\n {isLoading ? (\n <LoadingSpinner\n size={size === 'large' ? 'medium' : 'small'}\n className={\n size === 'large'\n ? 'ndl-medium-spinner'\n : 'ndl-small-spinner'\n }\n />\n ) : (\n leadingElement\n )}\n </div>\n )}\n <div\n className={classNames('ndl-input-container', {\n 'ndl-clearable': isClearable,\n })}\n >\n <input\n ref={ref}\n readOnly={isReadOnly}\n disabled={isDisabled}\n required={isRequired}\n value={currentValue}\n placeholder={placeholder}\n type=\"text\"\n onChange={handleChange}\n {...controlProps}\n {...combinedHtmlInputAttributes}\n onKeyDown={handleInputKeyDown}\n {...restProps}\n />\n {shouldRenderHint && (\n <span\n id={hintId}\n className=\"ndl-text-input-hint\"\n aria-hidden={true}\n >\n {isLoading && 'Loading '}\n {isClearable && 'Press Escape to clear input.'}\n </span>\n )}\n {isClearable && Boolean(currentValue) && (\n <div className=\"ndl-element-clear ndl-element\">\n <button\n tabIndex={-1}\n aria-hidden={true}\n type=\"button\"\n title=\"Clear input (Esc)\"\n onClick={() => {\n handleChange?.({\n target: { value: '' },\n } as React.ChangeEvent<HTMLInputElement>);\n }}\n >\n <XMarkIconOutline className=\"n-size-4\" />\n </button>\n </div>\n )}\n </div>\n {trailingElement && (\n <div className=\"ndl-element-trailing ndl-element\">\n {isLoading && !leadingElement ? (\n <LoadingSpinner\n size={size === 'large' ? 'medium' : 'small'}\n className={\n size === 'large'\n ? 'ndl-medium-spinner'\n : 'ndl-small-spinner'\n }\n />\n ) : (\n trailingElement\n )}\n </div>\n )}\n </div>\n </Skeleton>\n </label>\n\n <FormFieldMessage\n field={field}\n size={size}\n wrap={(content) => (\n <Skeleton\n onBackground=\"weak\"\n shape=\"rectangular\"\n {...skeletonProps}\n isLoading={isSkeletonLoading}\n >\n {content}\n </Skeleton>\n )}\n />\n </div>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"TextInput.js","sourceRoot":"","sources":["../../../src/text-input/TextInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAIL,KAAK,EACL,OAAO,GACR,MAAM,OAAO,CAAC;AAEf,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,YAAY,GACb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,uCA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AU,GAAG,GAClC,GACL,CACP,IACG,EACL,eAAe,IAAI,CAClB,cAAK,SAAS,EAAC,kCAAkC,YAC9C,SAAS,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAC9B,KAAC,cAAc,IACb,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAC3C,SAAS,EACP,IAAI,KAAK,OAAO;4CACd,CAAC,CAAC,oBAAoB;4CACtB,CAAC,CAAC,mBAAmB,GAEzB,CACH,CAAC,CAAC,CAAC,CACF,eAAe,CAChB,GACG,CACP,IACG,IACG,IACL,EAER,KAAC,gBAAgB,IACf,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CACjB,KAAC,QAAQ,kBACP,YAAY,EAAC,MAAM,EACnB,KAAK,EAAC,aAAa,IACf,aAAa,IACjB,SAAS,EAAE,iBAAiB,YAE3B,OAAO,IACC,CACZ,GACD,IACE,CACP,CAAC;AACJ,CAAC,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 classNames from 'classnames';\nimport {\n type InputHTMLAttributes,\n type ReactElement,\n type ReactNode,\n useId,\n useMemo,\n} from 'react';\n\nimport {\n FormFieldLabel,\n FormFieldMessage,\n useFormField,\n} from '../_common/form-control';\nimport { customLabelAndNoAriaLabelWarningMessage } from '../_common/messages';\nimport { type CommonProps, type TooltipObjectProps } from '../_common/types';\nimport { useSemiControlledInput } from '../_common/use-semi-controlled-input';\nimport { needleWarningMessage } from '../_common/utils';\nimport { XMarkIconOutline } from '../icons/generated/heroIcons/XMarkIconOutline';\nimport { LoadingSpinner } from '../loading-spinner';\nimport { Skeleton } from '../skeleton';\n\n/**\n * @remarks\n * When `moreInformationText` is provided, a tooltip is rendered next to the label, and the `tooltipProps` prop is used to configure the tooltip. The `TooltipObjectProps` type is defined as: `{ root?: Partial<React.ComponentProps<typeof Tooltip>>; trigger?: Partial<React.ComponentProps<typeof Tooltip.Trigger>>; content?: Partial<React.ComponentProps<typeof Tooltip.Content>>; }`, see the Tooltip component for more details.\n *\n * @remarks\n * When `isSkeletonLoading` is true, the input is rendered as a loading skeleton and the `skeletonProps` prop is used to configure the skeleton. For more information, see the Skeleton documentation.\n */\ntype TextInputProps = {\n /** Assistive text displayed below the input */\n helpText?: string | ReactNode;\n\n /** Error message displayed below the input. When provided, it overrides `helpText` and shows an error icon */\n errorText?: string | ReactNode;\n\n /** Leading element rendered inside the input */\n leadingElement?: ReactElement;\n\n /** Trailing element rendered inside the input */\n trailingElement?: ReactElement;\n\n /** Size of the input */\n size?: 'small' | 'medium' | 'large';\n\n /** Whether the input is read-only */\n isReadOnly?: boolean;\n\n /**\n * Whether to display the Required/Optional label next to the field label.\n * Shows Required if isRequired is true, otherwise shows Optional.\n * @default false\n */\n // TODO v5: inconsistent naming. The same switch is `hasRequiredIndicator` on\n // Combobox and on the internal form control this maps onto, and `isOptional`\n // on TextArea. The name also needs the disable below, which a name using one\n // of the allowed boolean prefixes would not.\n // eslint-disable-next-line @typescript-eslint/naming-convention\n showRequiredOrOptionalLabel?: boolean;\n\n /** Whether the input is disabled */\n isDisabled?: boolean;\n\n /** Whether the input is required */\n isRequired?: boolean;\n\n /** The current value of the input */\n value?: React.ComponentPropsWithoutRef<'input'>['value'];\n\n /** Placeholder text displayed when the input is empty */\n placeholder?: React.ComponentPropsWithoutRef<'input'>['placeholder'];\n\n /** Callback function triggered when the input value changes */\n onChange?: React.ComponentPropsWithoutRef<'input'>['onChange'];\n\n /** Whether the input should take the full available width */\n isFluid?: boolean;\n\n /** Text displayed in the information tooltip shown next to the label */\n moreInformationText?: React.ReactNode;\n\n // TODO v5: inconsistent naming. Every form control names itself differently:\n // the label is optional here and a design with no room for it reaches for\n // htmlAttributes['aria-label'], TextArea, Select, Checkbox, Radio and Switch\n // expose an `ariaLabel` prop instead, and Combobox requires the label and\n // clips it with `hasVisuallyHiddenLabel`.\n /** The label displayed above the input */\n label?: string | React.ReactNode;\n\n /** Props for the Tooltip component used by the information icon */\n tooltipProps?: TooltipObjectProps;\n\n /** Whether to render skeletons instead of content */\n isSkeletonLoading?: boolean;\n\n /** Additional props forwarded to the underlying Skeleton components */\n skeletonProps?: React.ComponentProps<typeof Skeleton>;\n\n /** Whether to show the clear button */\n isClearable?: boolean;\n\n /** Whether to show the loading spinner */\n isLoading?: boolean;\n};\n\n/**\n *\n *\n * TextInput Component\n *\n *\n */\n\nexport const TextInput = ({\n label,\n isFluid,\n errorText,\n helpText,\n leadingElement,\n trailingElement,\n showRequiredOrOptionalLabel = false,\n moreInformationText,\n size = 'medium',\n placeholder,\n value,\n tooltipProps,\n htmlAttributes,\n isDisabled,\n isReadOnly,\n isRequired,\n onChange,\n isClearable = false,\n className,\n style,\n isSkeletonLoading = false,\n isLoading = false,\n skeletonProps,\n ref,\n ...restProps\n}: CommonProps<'input', TextInputProps>) => {\n const [currentValue, handleChange] = useSemiControlledInput({\n inputType: 'text',\n isControlled: value !== undefined,\n onChange,\n state: value ?? '',\n });\n const hintId = useId();\n const canClear = isClearable && isDisabled !== true;\n const shouldRenderHint = canClear || isLoading;\n const { field, controlProps } = useFormField({\n errorText,\n // The clear/loading hint describes the input alongside the message.\n extraDescribedByIds: [shouldRenderHint && hintId],\n hasRequiredIndicator: showRequiredOrOptionalLabel,\n helpText,\n isRequired,\n label,\n });\n\n const containerWrappingClasses = classNames(`ndl-text-input`, className, {\n 'ndl-disabled': isDisabled,\n 'ndl-has-error': errorText,\n 'ndl-has-icon': leadingElement || trailingElement || errorText,\n 'ndl-has-leading-icon': leadingElement,\n 'ndl-has-trailing-icon': trailingElement || errorText,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-read-only': isReadOnly,\n 'ndl-small': size === 'small',\n });\n\n const hasEmptyLabelValue =\n label === undefined || label === null || label === '';\n\n const labelWrappingClasses = classNames('ndl-text-input-label', {\n 'ndl-fluid': isFluid,\n });\n\n const combinedHtmlInputAttributes: InputHTMLAttributes<HTMLInputElement> = {\n ...htmlAttributes,\n className: classNames('ndl-input', htmlAttributes?.className),\n };\n const ariaLabel = combinedHtmlInputAttributes['aria-label'];\n const isCustomLabel = Boolean(label) && typeof label !== 'string';\n const hasCustomLabelAndNoAriaLabel =\n isCustomLabel && (ariaLabel === undefined || ariaLabel === '');\n\n const handleInputKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (canClear && event.key === 'Escape' && Boolean(currentValue)) {\n event.preventDefault();\n event.stopPropagation();\n handleChange?.({\n target: { value: '' },\n } as React.ChangeEvent<HTMLInputElement>);\n }\n htmlAttributes?.onKeyDown?.(event);\n };\n\n useMemo(() => {\n if (!label && !ariaLabel) {\n needleWarningMessage(\n 'A TextInput without a label does not have an aria label, be sure to include an aria label for screen readers. Link: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI',\n );\n }\n\n if (hasCustomLabelAndNoAriaLabel) {\n needleWarningMessage(customLabelAndNoAriaLabelWarningMessage);\n }\n }, [label, ariaLabel, hasCustomLabelAndNoAriaLabel]);\n\n return (\n <div className={containerWrappingClasses} style={style}>\n {/* We enable implicit label wrapping */}\n {/* Source: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI */}\n <label className={labelWrappingClasses}>\n {!hasEmptyLabelValue && (\n <FormFieldLabel\n field={field}\n size={size}\n association=\"implicit\"\n moreInformationText={moreInformationText}\n tooltipProps={tooltipProps}\n wrap={(row) => (\n <Skeleton\n onBackground=\"weak\"\n shape=\"rectangular\"\n {...skeletonProps}\n isLoading={isSkeletonLoading}\n >\n {row}\n </Skeleton>\n )}\n />\n )}\n <Skeleton\n onBackground=\"weak\"\n shape=\"rectangular\"\n {...skeletonProps}\n isLoading={isSkeletonLoading}\n >\n <div className=\"ndl-input-wrapper\">\n {(leadingElement || (isLoading && !trailingElement)) && (\n <div className=\"ndl-element-leading ndl-element\">\n {isLoading ? (\n <LoadingSpinner\n size={size === 'large' ? 'medium' : 'small'}\n className={\n size === 'large'\n ? 'ndl-medium-spinner'\n : 'ndl-small-spinner'\n }\n />\n ) : (\n leadingElement\n )}\n </div>\n )}\n <div\n className={classNames('ndl-input-container', {\n 'ndl-clearable': isClearable,\n })}\n >\n <input\n ref={ref}\n readOnly={isReadOnly}\n disabled={isDisabled}\n required={isRequired}\n value={currentValue}\n placeholder={placeholder}\n type=\"text\"\n onChange={handleChange}\n {...controlProps}\n {...combinedHtmlInputAttributes}\n onKeyDown={handleInputKeyDown}\n {...restProps}\n />\n {shouldRenderHint && (\n <span\n id={hintId}\n className=\"ndl-text-input-hint\"\n aria-hidden={true}\n >\n {isLoading && 'Loading '}\n {canClear && 'Press Escape to clear input.'}\n </span>\n )}\n {canClear && Boolean(currentValue) && (\n <div className=\"ndl-element-clear ndl-element\">\n <button\n tabIndex={-1}\n aria-hidden={true}\n type=\"button\"\n title=\"Clear input (Esc)\"\n onClick={() => {\n handleChange?.({\n target: { value: '' },\n } as React.ChangeEvent<HTMLInputElement>);\n }}\n >\n <XMarkIconOutline className=\"n-size-4\" />\n </button>\n </div>\n )}\n </div>\n {trailingElement && (\n <div className=\"ndl-element-trailing ndl-element\">\n {isLoading && !leadingElement ? (\n <LoadingSpinner\n size={size === 'large' ? 'medium' : 'small'}\n className={\n size === 'large'\n ? 'ndl-medium-spinner'\n : 'ndl-small-spinner'\n }\n />\n ) : (\n trailingElement\n )}\n </div>\n )}\n </div>\n </Skeleton>\n </label>\n\n <FormFieldMessage\n field={field}\n size={size}\n wrap={(content) => (\n <Skeleton\n onBackground=\"weak\"\n shape=\"rectangular\"\n {...skeletonProps}\n isLoading={isSkeletonLoading}\n >\n {content}\n </Skeleton>\n )}\n />\n </div>\n );\n};\n"]}
|