@neo4j-ndl/react 3.3.14 → 3.3.16
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/accordion/stories/accordion-clean-items-expanded.story.js +34 -0
- package/lib/cjs/accordion/stories/accordion-clean-items-expanded.story.js.map +1 -0
- package/lib/cjs/accordion/stories/accordion-default-expanded.story.js +34 -0
- package/lib/cjs/accordion/stories/accordion-default-expanded.story.js.map +1 -0
- package/lib/cjs/accordion/stories/accordion-full.story.js +37 -0
- package/lib/cjs/accordion/stories/accordion-full.story.js.map +1 -0
- package/lib/cjs/accordion/stories/accordion-multiple-expanded.story.js +37 -0
- package/lib/cjs/accordion/stories/accordion-multiple-expanded.story.js.map +1 -0
- package/lib/cjs/accordion/stories/accordion-right-content.story.js +34 -0
- package/lib/cjs/accordion/stories/accordion-right-content.story.js.map +1 -0
- package/lib/cjs/accordion/stories/accordion-single-expanded.story.js +34 -0
- package/lib/cjs/accordion/stories/accordion-single-expanded.story.js.map +1 -0
- package/lib/cjs/accordion/stories/accordion.stories.js +144 -0
- package/lib/cjs/accordion/stories/accordion.stories.js.map +1 -0
- package/lib/cjs/accordion/stories/index.js +51 -0
- package/lib/cjs/accordion/stories/index.js.map +1 -0
- package/lib/cjs/wizard/Wizard.js +16 -8
- package/lib/cjs/wizard/Wizard.js.map +1 -1
- package/lib/esm/accordion/stories/accordion-clean-items-expanded.story.js +32 -0
- package/lib/esm/accordion/stories/accordion-clean-items-expanded.story.js.map +1 -0
- package/lib/esm/accordion/stories/accordion-default-expanded.story.js +32 -0
- package/lib/esm/accordion/stories/accordion-default-expanded.story.js.map +1 -0
- package/lib/esm/accordion/stories/accordion-full.story.js +35 -0
- package/lib/esm/accordion/stories/accordion-full.story.js.map +1 -0
- package/lib/esm/accordion/stories/accordion-multiple-expanded.story.js +35 -0
- package/lib/esm/accordion/stories/accordion-multiple-expanded.story.js.map +1 -0
- package/lib/esm/accordion/stories/accordion-right-content.story.js +32 -0
- package/lib/esm/accordion/stories/accordion-right-content.story.js.map +1 -0
- package/lib/esm/accordion/stories/accordion-single-expanded.story.js +32 -0
- package/lib/esm/accordion/stories/accordion-single-expanded.story.js.map +1 -0
- package/lib/esm/accordion/stories/accordion.stories.js +141 -0
- package/lib/esm/accordion/stories/accordion.stories.js.map +1 -0
- package/lib/esm/accordion/stories/index.js +39 -0
- package/lib/esm/accordion/stories/index.js.map +1 -0
- package/lib/esm/wizard/Wizard.js +16 -8
- package/lib/esm/wizard/Wizard.js.map +1 -1
- package/lib/types/accordion/stories/accordion-clean-items-expanded.story.d.ts +23 -0
- package/lib/types/accordion/stories/accordion-default-expanded.story.d.ts +23 -0
- package/lib/types/accordion/stories/accordion-full.story.d.ts +23 -0
- package/lib/types/accordion/stories/accordion-multiple-expanded.story.d.ts +23 -0
- package/lib/types/accordion/stories/accordion-right-content.story.d.ts +23 -0
- package/lib/types/accordion/stories/accordion-single-expanded.story.d.ts +23 -0
- package/lib/types/accordion/stories/accordion.stories.d.ts +68 -0
- package/lib/types/accordion/stories/index.d.ts +32 -0
- package/lib/types/wizard/Wizard.d.ts +14 -1
- package/package.json +3 -2
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) "Neo4j"
|
|
7
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
8
|
+
*
|
|
9
|
+
* This file is part of Neo4j.
|
|
10
|
+
*
|
|
11
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
12
|
+
* it under the terms of the GNU General Public License as published by
|
|
13
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
14
|
+
* (at your option) any later version.
|
|
15
|
+
*
|
|
16
|
+
* This program is distributed in the hope that it will be useful,
|
|
17
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
19
|
+
* GNU General Public License for more details.
|
|
20
|
+
*
|
|
21
|
+
* You should have received a copy of the GNU General Public License
|
|
22
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
23
|
+
*/
|
|
24
|
+
const react_1 = require("react");
|
|
25
|
+
const react_2 = require("@neo4j-ndl/react");
|
|
26
|
+
require("@neo4j-ndl/base/lib/neo4j-ds-styles.css");
|
|
27
|
+
const Component = () => {
|
|
28
|
+
const itemIds = ['item-1', 'item-2', 'item-3', 'item-4'];
|
|
29
|
+
const [expandedItemId, setExpandedItemId] = (0, react_1.useState)(null);
|
|
30
|
+
const onChange = (expandedItemId) => setExpandedItemId(expandedItemId);
|
|
31
|
+
return ((0, jsx_runtime_1.jsxs)(react_2.Accordion, { expandedItemId: expandedItemId, isMultiple: false, onChange: onChange, children: [(0, jsx_runtime_1.jsx)(react_2.Accordion.CleanItem, { itemId: itemIds[0], title: `Accordion ${itemIds[0]}`, children: itemIds[0] }), (0, jsx_runtime_1.jsx)(react_2.Accordion.CleanItem, { itemId: itemIds[1], title: `Accordion ${itemIds[1]}`, children: itemIds[1] }), (0, jsx_runtime_1.jsx)(react_2.Accordion.CleanItem, { itemId: itemIds[2], title: `Accordion ${itemIds[2]}`, children: itemIds[2] }), (0, jsx_runtime_1.jsx)(react_2.Accordion.CleanItem, { itemId: itemIds[3], title: `Accordion ${itemIds[3]}`, children: itemIds[3] })] }));
|
|
32
|
+
};
|
|
33
|
+
exports.default = Component;
|
|
34
|
+
//# sourceMappingURL=accordion-clean-items-expanded.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion-clean-items-expanded.story.js","sourceRoot":"","sources":["../../../../src/accordion/stories/accordion-clean-items-expanded.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,iCAAiC;AACjC,4CAAmE;AAC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
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) "Neo4j"
|
|
7
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
8
|
+
*
|
|
9
|
+
* This file is part of Neo4j.
|
|
10
|
+
*
|
|
11
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
12
|
+
* it under the terms of the GNU General Public License as published by
|
|
13
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
14
|
+
* (at your option) any later version.
|
|
15
|
+
*
|
|
16
|
+
* This program is distributed in the hope that it will be useful,
|
|
17
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
19
|
+
* GNU General Public License for more details.
|
|
20
|
+
*
|
|
21
|
+
* You should have received a copy of the GNU General Public License
|
|
22
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
23
|
+
*/
|
|
24
|
+
const react_1 = require("react");
|
|
25
|
+
const react_2 = require("@neo4j-ndl/react");
|
|
26
|
+
require("@neo4j-ndl/base/lib/neo4j-ds-styles.css");
|
|
27
|
+
const Component = () => {
|
|
28
|
+
const itemIds = ['item-1', 'item-2', 'item-3', 'item-4'];
|
|
29
|
+
const [expandedItemId, setExpandedItemId] = (0, react_1.useState)(undefined);
|
|
30
|
+
const onChange = (expandedItemId) => setExpandedItemId(expandedItemId);
|
|
31
|
+
return ((0, jsx_runtime_1.jsxs)(react_2.Accordion, { expandedItemId: expandedItemId, isMultiple: undefined, onChange: onChange, children: [(0, jsx_runtime_1.jsx)(react_2.Accordion.Item, { itemId: itemIds[0], title: `Accordion ${itemIds[0]}`, children: itemIds[0] }), (0, jsx_runtime_1.jsx)(react_2.Accordion.Item, { itemId: itemIds[1], title: `Accordion ${itemIds[1]}`, children: itemIds[1] }), (0, jsx_runtime_1.jsx)(react_2.Accordion.Item, { itemId: itemIds[2], title: `Accordion ${itemIds[2]}`, children: itemIds[2] }), (0, jsx_runtime_1.jsx)(react_2.Accordion.Item, { itemId: itemIds[3], title: `Accordion ${itemIds[3]}`, children: itemIds[3] })] }));
|
|
32
|
+
};
|
|
33
|
+
exports.default = Component;
|
|
34
|
+
//# sourceMappingURL=accordion-default-expanded.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion-default-expanded.story.js","sourceRoot":"","sources":["../../../../src/accordion/stories/accordion-default-expanded.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,iCAAiC;AACjC,4CAAmE;AACnE,mDAAiD;AAEjD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,OAAO,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAEzD,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,IAAA,gBAAQ,EAClD,SAAS,CACV,CAAC;IAEF,MAAM,QAAQ,GAAG,CAAC,cAAsC,EAAE,EAAE,CAC1D,iBAAiB,CAAC,cAAc,CAAC,CAAC;IAEpC,OAAO,CACL,wBAAC,iBAAS,IACR,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,SAAS,EACrB,QAAQ,EAAE,QAAQ,aAElB,uBAAC,iBAAS,CAAC,IAAI,IAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,OAAO,CAAC,CAAC,CAAC,EAAE,YACjE,OAAO,CAAC,CAAC,CAAC,GACI,EACjB,uBAAC,iBAAS,CAAC,IAAI,IAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,OAAO,CAAC,CAAC,CAAC,EAAE,YACjE,OAAO,CAAC,CAAC,CAAC,GACI,EACjB,uBAAC,iBAAS,CAAC,IAAI,IAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,OAAO,CAAC,CAAC,CAAC,EAAE,YACjE,OAAO,CAAC,CAAC,CAAC,GACI,EACjB,uBAAC,iBAAS,CAAC,IAAI,IAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,OAAO,CAAC,CAAC,CAAC,EAAE,YACjE,OAAO,CAAC,CAAC,CAAC,GACI,IACP,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) "Neo4j"
|
|
7
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
8
|
+
*
|
|
9
|
+
* This file is part of Neo4j.
|
|
10
|
+
*
|
|
11
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
12
|
+
* it under the terms of the GNU General Public License as published by
|
|
13
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
14
|
+
* (at your option) any later version.
|
|
15
|
+
*
|
|
16
|
+
* This program is distributed in the hope that it will be useful,
|
|
17
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
19
|
+
* GNU General Public License for more details.
|
|
20
|
+
*
|
|
21
|
+
* You should have received a copy of the GNU General Public License
|
|
22
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
23
|
+
*/
|
|
24
|
+
const react_1 = require("react");
|
|
25
|
+
const react_2 = require("@neo4j-ndl/react");
|
|
26
|
+
require("@neo4j-ndl/base/lib/neo4j-ds-styles.css");
|
|
27
|
+
const Component = () => {
|
|
28
|
+
const itemIds = ['item-1', 'item-2', 'item-3', 'item-4'];
|
|
29
|
+
const [expandedItemIds, setExpandedItemIds] = (0, react_1.useState)([
|
|
30
|
+
itemIds[1],
|
|
31
|
+
]);
|
|
32
|
+
const onChange = (expandedItemIds) => setExpandedItemIds(expandedItemIds);
|
|
33
|
+
const onExpandedChange = (hasExpanded) => console.info(`Expanded change: ${hasExpanded}`);
|
|
34
|
+
return ((0, jsx_runtime_1.jsxs)(react_2.Accordion, { expandedItemIds: expandedItemIds, isMultiple: true, onChange: onChange, children: [(0, jsx_runtime_1.jsx)(react_2.Accordion.CleanItem, { itemId: itemIds[0], title: `Accordion ${itemIds[0]}`, children: itemIds[0] }), (0, jsx_runtime_1.jsx)(react_2.Accordion.CleanItem, { arrowPosition: "right", isDisabled: false, itemId: itemIds[1], onExpandedChange: onExpandedChange, rightContent: (0, jsx_runtime_1.jsx)(react_2.Checkbox, { label: "Right content" }), title: `Accordion ${itemIds[1]}`, titleTypographyVariant: "h6", children: itemIds[1] }), (0, jsx_runtime_1.jsx)(react_2.Accordion.CleanItem, { itemId: itemIds[2], title: `Accordion ${itemIds[2]}`, children: itemIds[2] }), (0, jsx_runtime_1.jsx)(react_2.Accordion.CleanItem, { itemId: itemIds[3], title: `Accordion ${itemIds[3]}`, children: itemIds[3] })] }));
|
|
35
|
+
};
|
|
36
|
+
exports.default = Component;
|
|
37
|
+
//# sourceMappingURL=accordion-full.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion-full.story.js","sourceRoot":"","sources":["../../../../src/accordion/stories/accordion-full.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,iCAAiC;AACjC,4CAA6E;AAC7E,mDAAiD;AAEjD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,OAAO,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAEzD,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,IAAA,gBAAQ,EAAoB;QAC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S,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) "Neo4j"
|
|
7
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
8
|
+
*
|
|
9
|
+
* This file is part of Neo4j.
|
|
10
|
+
*
|
|
11
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
12
|
+
* it under the terms of the GNU General Public License as published by
|
|
13
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
14
|
+
* (at your option) any later version.
|
|
15
|
+
*
|
|
16
|
+
* This program is distributed in the hope that it will be useful,
|
|
17
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
19
|
+
* GNU General Public License for more details.
|
|
20
|
+
*
|
|
21
|
+
* You should have received a copy of the GNU General Public License
|
|
22
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
23
|
+
*/
|
|
24
|
+
const react_1 = require("react");
|
|
25
|
+
const react_2 = require("@neo4j-ndl/react");
|
|
26
|
+
require("@neo4j-ndl/base/lib/neo4j-ds-styles.css");
|
|
27
|
+
const Component = () => {
|
|
28
|
+
const itemIds = ['item-1', 'item-2', 'item-3', 'item-4'];
|
|
29
|
+
const [expandedItemIds, setExpandedItemIds] = (0, react_1.useState)([
|
|
30
|
+
itemIds[0],
|
|
31
|
+
itemIds[2],
|
|
32
|
+
]);
|
|
33
|
+
const onChange = (expandedItemIds) => setExpandedItemIds(expandedItemIds);
|
|
34
|
+
return ((0, jsx_runtime_1.jsxs)(react_2.Accordion, { expandedItemIds: expandedItemIds, isMultiple: true, onChange: onChange, children: [(0, jsx_runtime_1.jsx)(react_2.Accordion.Item, { itemId: itemIds[0], title: `Accordion ${itemIds[0]}`, children: itemIds[0] }), (0, jsx_runtime_1.jsx)(react_2.Accordion.Item, { itemId: itemIds[1], title: `Accordion ${itemIds[1]}`, children: itemIds[1] }), (0, jsx_runtime_1.jsx)(react_2.Accordion.Item, { itemId: itemIds[2], title: `Accordion ${itemIds[2]}`, children: itemIds[2] }), (0, jsx_runtime_1.jsx)(react_2.Accordion.Item, { itemId: itemIds[3], title: `Accordion ${itemIds[3]}`, children: itemIds[3] })] }));
|
|
35
|
+
};
|
|
36
|
+
exports.default = Component;
|
|
37
|
+
//# sourceMappingURL=accordion-multiple-expanded.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion-multiple-expanded.story.js","sourceRoot":"","sources":["../../../../src/accordion/stories/accordion-multiple-expanded.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,iCAAiC;AACjC,4CAAmE;AACnE,mDAAiD;AAEjD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,OAAO,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAEzD,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,IAAA,gBAAQ,EAAoB;QACxE,OAAO,CAAC,CAAC,CAAC;QACV,OAAO,CAAC,CAAC,CAAC;KACX,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,CAAC,eAAkC,EAAE,EAAE,CACtD,kBAAkB,CAAC,eAAe,CAAC,CAAC;IAEtC,OAAO,CACL,wBAAC,iBAAS,IACR,eAAe,EAAE,eAAe,EAChC,UAAU,EAAE,IAAI,EAChB,QAAQ,EAAE,QAAQ,aAElB,uBAAC,iBAAS,CAAC,IAAI,IAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,OAAO,CAAC,CAAC,CAAC,EAAE,YACjE,OAAO,CAAC,CAAC,CAAC,GACI,EACjB,uBAAC,iBAAS,CAAC,IAAI,IAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,OAAO,CAAC,CAAC,CAAC,EAAE,YACjE,OAAO,CAAC,CAAC,CAAC,GACI,EACjB,uBAAC,iBAAS,CAAC,IAAI,IAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,OAAO,CAAC,CAAC,CAAC,EAAE,YACjE,OAAO,CAAC,CAAC,CAAC,GACI,EACjB,uBAAC,iBAAS,CAAC,IAAI,IAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,OAAO,CAAC,CAAC,CAAC,EAAE,YACjE,OAAO,CAAC,CAAC,CAAC,GACI,IACP,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) "Neo4j"
|
|
7
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
8
|
+
*
|
|
9
|
+
* This file is part of Neo4j.
|
|
10
|
+
*
|
|
11
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
12
|
+
* it under the terms of the GNU General Public License as published by
|
|
13
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
14
|
+
* (at your option) any later version.
|
|
15
|
+
*
|
|
16
|
+
* This program is distributed in the hope that it will be useful,
|
|
17
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
19
|
+
* GNU General Public License for more details.
|
|
20
|
+
*
|
|
21
|
+
* You should have received a copy of the GNU General Public License
|
|
22
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
23
|
+
*/
|
|
24
|
+
const react_1 = require("react");
|
|
25
|
+
const react_2 = require("@neo4j-ndl/react");
|
|
26
|
+
require("@neo4j-ndl/base/lib/neo4j-ds-styles.css");
|
|
27
|
+
const Component = () => {
|
|
28
|
+
const itemIds = ['item-1', 'item-2', 'item-3', 'item-4'];
|
|
29
|
+
const [expandedItemId, setExpandedItemId] = (0, react_1.useState)(undefined);
|
|
30
|
+
const onChange = (expandedItemId) => setExpandedItemId(expandedItemId);
|
|
31
|
+
return ((0, jsx_runtime_1.jsxs)(react_2.Accordion, { expandedItemId: expandedItemId, isMultiple: undefined, onChange: onChange, children: [(0, jsx_runtime_1.jsx)(react_2.Accordion.CleanItem, { itemId: itemIds[0], title: `Accordion ${itemIds[0]}`, rightContent: (0, jsx_runtime_1.jsx)(react_2.Checkbox, { label: "Right content" }), children: itemIds[0] }), (0, jsx_runtime_1.jsx)(react_2.Accordion.CleanItem, { itemId: itemIds[1], title: `Accordion ${itemIds[1]}`, children: itemIds[1] }), (0, jsx_runtime_1.jsx)(react_2.Accordion.CleanItem, { itemId: itemIds[2], title: `Accordion ${itemIds[2]}`, children: itemIds[2] }), (0, jsx_runtime_1.jsx)(react_2.Accordion.CleanItem, { itemId: itemIds[3], title: `Accordion ${itemIds[3]}`, children: itemIds[3] })] }));
|
|
32
|
+
};
|
|
33
|
+
exports.default = Component;
|
|
34
|
+
//# sourceMappingURL=accordion-right-content.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion-right-content.story.js","sourceRoot":"","sources":["../../../../src/accordion/stories/accordion-right-content.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,iCAAiC;AACjC,4CAA6E;AAC7E,mDAAiD;AAEjD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,OAAO,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAEz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
|
+
* Copyright (c) "Neo4j"
|
|
7
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
8
|
+
*
|
|
9
|
+
* This file is part of Neo4j.
|
|
10
|
+
*
|
|
11
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
12
|
+
* it under the terms of the GNU General Public License as published by
|
|
13
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
14
|
+
* (at your option) any later version.
|
|
15
|
+
*
|
|
16
|
+
* This program is distributed in the hope that it will be useful,
|
|
17
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
19
|
+
* GNU General Public License for more details.
|
|
20
|
+
*
|
|
21
|
+
* You should have received a copy of the GNU General Public License
|
|
22
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
23
|
+
*/
|
|
24
|
+
const react_1 = require("react");
|
|
25
|
+
const react_2 = require("@neo4j-ndl/react");
|
|
26
|
+
require("@neo4j-ndl/base/lib/neo4j-ds-styles.css");
|
|
27
|
+
const Component = () => {
|
|
28
|
+
const itemIds = ['item-1', 'item-2', 'item-3', 'item-4'];
|
|
29
|
+
const [expandedItemId, setExpandedItemId] = (0, react_1.useState)(itemIds[1]);
|
|
30
|
+
const onChange = (expandedItemId) => setExpandedItemId(expandedItemId);
|
|
31
|
+
return ((0, jsx_runtime_1.jsxs)(react_2.Accordion, { expandedItemId: expandedItemId, isMultiple: false, onChange: onChange, children: [(0, jsx_runtime_1.jsx)(react_2.Accordion.Item, { itemId: itemIds[0], title: `Accordion ${itemIds[0]}`, children: itemIds[0] }), (0, jsx_runtime_1.jsx)(react_2.Accordion.Item, { itemId: itemIds[1], title: `Accordion ${itemIds[1]}`, children: itemIds[1] }), (0, jsx_runtime_1.jsx)(react_2.Accordion.Item, { itemId: itemIds[2], title: `Accordion ${itemIds[2]}`, children: itemIds[2] }), (0, jsx_runtime_1.jsx)(react_2.Accordion.Item, { itemId: itemIds[3], title: `Accordion ${itemIds[3]}`, children: itemIds[3] })] }));
|
|
32
|
+
};
|
|
33
|
+
exports.default = Component;
|
|
34
|
+
//# sourceMappingURL=accordion-single-expanded.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion-single-expanded.story.js","sourceRoot":"","sources":["../../../../src/accordion/stories/accordion-single-expanded.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,iCAAiC;AACjC,4CAAmE;AACnE,mDAAiD;AAEjD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,OAAO,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAEzD,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,IAAA,gBAAQ,EAClD,OAAO,CAAC,CAAC,CAAC,CACX,CAAC;IAEF,MAAM,QAAQ,GAAG,CAAC,cAAsC,EAAE,EAAE,CAC1D,iBAAiB,CAAC,cAAc,CAAC,CAAC;IAEpC,OAAO,CACL,wBAAC,iBAAS,IACR,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,KAAK,EACjB,QAAQ,EAAE,QAAQ,aAElB,uBAAC,iBAAS,CAAC,IAAI,IAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,OAAO,CAAC,CAAC,CAAC,EAAE,YACjE,OAAO,CAAC,CAAC,CAAC,GACI,EACjB,uBAAC,iBAAS,CAAC,IAAI,IAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,OAAO,CAAC,CAAC,CAAC,EAAE,YACjE,OAAO,CAAC,CAAC,CAAC,GACI,EACjB,uBAAC,iBAAS,CAAC,IAAI,IAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,OAAO,CAAC,CAAC,CAAC,EAAE,YACjE,OAAO,CAAC,CAAC,CAAC,GACI,EACjB,uBAAC,iBAAS,CAAC,IAAI,IAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,OAAO,CAAC,CAAC,CAAC,EAAE,YACjE,OAAO,CAAC,CAAC,CAAC,GACI,IACP,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,144 @@
|
|
|
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
|
+
|
|
22
|
+
"use strict";
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.SingleExpanded = exports.RightContent = exports.MultipleExpanded = exports.Full = exports.Default = exports.CleanItems = void 0;
|
|
25
|
+
const index_1 = require("../../index");
|
|
26
|
+
const _1 = require("./");
|
|
27
|
+
const componentMeta = {
|
|
28
|
+
title: 'Components/Accordion',
|
|
29
|
+
component: index_1.Accordion,
|
|
30
|
+
tags: ['docsPage'],
|
|
31
|
+
parameters: {
|
|
32
|
+
controls: { disable: true },
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
exports.default = componentMeta;
|
|
36
|
+
exports.CleanItems = {
|
|
37
|
+
args: {
|
|
38
|
+
children: undefined,
|
|
39
|
+
isMultiple: undefined,
|
|
40
|
+
expandedItemId: null,
|
|
41
|
+
onChange: () => undefined,
|
|
42
|
+
},
|
|
43
|
+
render: _1.AccordionCleanItems,
|
|
44
|
+
parameters: {
|
|
45
|
+
docs: {
|
|
46
|
+
source: {
|
|
47
|
+
language: 'tsx',
|
|
48
|
+
type: 'code',
|
|
49
|
+
code: _1.AccordionCleanItemsSrc,
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
exports.Default = {
|
|
55
|
+
args: {
|
|
56
|
+
children: undefined,
|
|
57
|
+
isMultiple: undefined,
|
|
58
|
+
expandedItemId: null,
|
|
59
|
+
onChange: () => undefined,
|
|
60
|
+
},
|
|
61
|
+
render: _1.AccordionDefault,
|
|
62
|
+
parameters: {
|
|
63
|
+
docs: {
|
|
64
|
+
source: {
|
|
65
|
+
language: 'tsx',
|
|
66
|
+
type: 'code',
|
|
67
|
+
code: _1.AccordionDefaultSrc.replace(/^\/\*[\s\S]*?\*\/\s*/, ''),
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
exports.Full = {
|
|
73
|
+
args: {
|
|
74
|
+
children: undefined,
|
|
75
|
+
isMultiple: undefined,
|
|
76
|
+
expandedItemId: null,
|
|
77
|
+
onChange: () => undefined,
|
|
78
|
+
},
|
|
79
|
+
parameters: {
|
|
80
|
+
docs: {
|
|
81
|
+
source: {
|
|
82
|
+
language: 'tsx',
|
|
83
|
+
type: 'code',
|
|
84
|
+
code: _1.AccordionFullSrc.replace(/^\/\*[\s\S]*?\*\/\s*/, ''),
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
render: _1.AccordionFull,
|
|
89
|
+
};
|
|
90
|
+
exports.MultipleExpanded = {
|
|
91
|
+
args: {
|
|
92
|
+
children: undefined,
|
|
93
|
+
isMultiple: undefined,
|
|
94
|
+
expandedItemId: null,
|
|
95
|
+
onChange: () => undefined,
|
|
96
|
+
},
|
|
97
|
+
render: _1.AccordionMultipleExpanded,
|
|
98
|
+
parameters: {
|
|
99
|
+
docs: {
|
|
100
|
+
source: {
|
|
101
|
+
language: 'tsx',
|
|
102
|
+
type: 'code',
|
|
103
|
+
code: _1.AccordionMultipleExpandedSrc.replace(/^\/\*[\s\S]*?\*\/\s*/, ''),
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
exports.RightContent = {
|
|
109
|
+
args: {
|
|
110
|
+
children: undefined,
|
|
111
|
+
isMultiple: undefined,
|
|
112
|
+
expandedItemId: null,
|
|
113
|
+
onChange: () => undefined,
|
|
114
|
+
},
|
|
115
|
+
render: _1.AccordionRightContent,
|
|
116
|
+
parameters: {
|
|
117
|
+
docs: {
|
|
118
|
+
source: {
|
|
119
|
+
language: 'tsx',
|
|
120
|
+
type: 'code',
|
|
121
|
+
code: _1.AccordionRightContentSrc.replace(/^\/\*[\s\S]*?\*\/\s*/, ''),
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
};
|
|
126
|
+
exports.SingleExpanded = {
|
|
127
|
+
args: {
|
|
128
|
+
children: undefined,
|
|
129
|
+
isMultiple: undefined,
|
|
130
|
+
expandedItemId: null,
|
|
131
|
+
onChange: () => undefined,
|
|
132
|
+
},
|
|
133
|
+
render: _1.AccordionSingleExpanded,
|
|
134
|
+
parameters: {
|
|
135
|
+
docs: {
|
|
136
|
+
source: {
|
|
137
|
+
language: 'tsx',
|
|
138
|
+
type: 'code',
|
|
139
|
+
code: _1.AccordionSingleExpandedSrc.replace(/^\/\*[\s\S]*?\*\/\s*/, ''),
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
};
|
|
144
|
+
//# sourceMappingURL=accordion.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion.stories.js","sourceRoot":"","sources":["../../../../src/accordion/stories/accordion.stories.tsx"],"names":[],"mappings":";;;AAsBA,uCAAwC;AACxC,yBAaY;AAEZ,MAAM,aAAa,GAAG;IACpB,KAAK,EAAE,sBAAsB;IAC7B,SAAS,EAAE,iBAAS;IACpB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;CAC+B,CAAC;AAEnC,kBAAe,aAAa,CAAC;AAGhB,QAAA,UAAU,GAAU;IAC/B,IAAI,EAAE;QACJ,QAAQ,EAAE,SAAS;QACnB,UAAU,EAAE,SAAS;QACrB,cAAc,EAAE,IAAI;QACpB,QAAQ,EAAE,GAAG,EAAE,CAAC,SAAS;KAC1B;IACD,MAAM,EAAE,sBAAmB;IAC3B,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,yBAAsB;aAC7B;SACF;KACF;CACF,CAAC;AAEW,QAAA,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,QAAQ,EAAE,SAAS;QACnB,UAAU,EAAE,SAAS;QACrB,cAAc,EAAE,IAAI;QACpB,QAAQ,EAAE,GAAG,EAAE,CAAC,SAAS;KAC1B;IACD,MAAM,EAAE,mBAAgB;IACxB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,sBAAmB,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC;aAC9D;SACF;KACF;CACF,CAAC;AAEW,QAAA,IAAI,GAAU;IACzB,IAAI,EAAE;QACJ,QAAQ,EAAE,SAAS;QACnB,UAAU,E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E,GAAG,EAAE,CAAC,SAAS;KAC1B;IACD,MAAM,EAAE,0BAAuB;IAC/B,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,6BAA0B,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC;aACrE;SACF;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
23
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.AccordionSingleExpandedSrc = exports.AccordionRightContentSrc = exports.AccordionMultipleExpandedSrc = exports.AccordionFullSrc = exports.AccordionDefaultSrc = exports.AccordionCleanItemsSrc = exports.AccordionSingleExpanded = exports.AccordionRightContent = exports.AccordionMultipleExpanded = exports.AccordionFull = exports.AccordionDefault = exports.AccordionCleanItems = void 0;
|
|
27
|
+
var accordion_clean_items_expanded_story_1 = require("./accordion-clean-items-expanded.story");
|
|
28
|
+
Object.defineProperty(exports, "AccordionCleanItems", { enumerable: true, get: function () { return __importDefault(accordion_clean_items_expanded_story_1).default; } });
|
|
29
|
+
var accordion_default_expanded_story_1 = require("./accordion-default-expanded.story");
|
|
30
|
+
Object.defineProperty(exports, "AccordionDefault", { enumerable: true, get: function () { return __importDefault(accordion_default_expanded_story_1).default; } });
|
|
31
|
+
var accordion_full_story_1 = require("./accordion-full.story");
|
|
32
|
+
Object.defineProperty(exports, "AccordionFull", { enumerable: true, get: function () { return __importDefault(accordion_full_story_1).default; } });
|
|
33
|
+
var accordion_multiple_expanded_story_1 = require("./accordion-multiple-expanded.story");
|
|
34
|
+
Object.defineProperty(exports, "AccordionMultipleExpanded", { enumerable: true, get: function () { return __importDefault(accordion_multiple_expanded_story_1).default; } });
|
|
35
|
+
var accordion_right_content_story_1 = require("./accordion-right-content.story");
|
|
36
|
+
Object.defineProperty(exports, "AccordionRightContent", { enumerable: true, get: function () { return __importDefault(accordion_right_content_story_1).default; } });
|
|
37
|
+
var accordion_single_expanded_story_1 = require("./accordion-single-expanded.story");
|
|
38
|
+
Object.defineProperty(exports, "AccordionSingleExpanded", { enumerable: true, get: function () { return __importDefault(accordion_single_expanded_story_1).default; } });
|
|
39
|
+
const accordion_clean_items_expanded_story_raw_1 = __importDefault(require("./accordion-clean-items-expanded.story?raw"));
|
|
40
|
+
const accordion_default_expanded_story_raw_1 = __importDefault(require("./accordion-default-expanded.story?raw"));
|
|
41
|
+
const accordion_full_story_raw_1 = __importDefault(require("./accordion-full.story?raw"));
|
|
42
|
+
const accordion_multiple_expanded_story_raw_1 = __importDefault(require("./accordion-multiple-expanded.story?raw"));
|
|
43
|
+
const accordion_right_content_story_raw_1 = __importDefault(require("./accordion-right-content.story?raw"));
|
|
44
|
+
const accordion_single_expanded_story_raw_1 = __importDefault(require("./accordion-single-expanded.story?raw"));
|
|
45
|
+
exports.AccordionCleanItemsSrc = accordion_clean_items_expanded_story_raw_1.default.replace(/^\/\*[\s\S]*?\*\/\s*/, '');
|
|
46
|
+
exports.AccordionDefaultSrc = accordion_default_expanded_story_raw_1.default.replace(/^\/\*[\s\S]*?\*\/\s*/, '');
|
|
47
|
+
exports.AccordionFullSrc = accordion_full_story_raw_1.default.replace(/^\/\*[\s\S]*?\*\/\s*/, '');
|
|
48
|
+
exports.AccordionMultipleExpandedSrc = accordion_multiple_expanded_story_raw_1.default.replace(/^\/\*[\s\S]*?\*\/\s*/, '');
|
|
49
|
+
exports.AccordionRightContentSrc = accordion_right_content_story_raw_1.default.replace(/^\/\*[\s\S]*?\*\/\s*/, '');
|
|
50
|
+
exports.AccordionSingleExpandedSrc = accordion_single_expanded_story_raw_1.default.replace(/^\/\*[\s\S]*?\*\/\s*/, '');
|
|
51
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/accordion/stories/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,+FAAwF;AAA/E,4JAAA,OAAO,OAAuB;AACvC,uFAAiF;AAAxE,qJAAA,OAAO,OAAoB;AACpC,+DAAkE;AAAzD,sIAAA,OAAO,OAAiB;AACjC,yFAA2F;AAAlF,+JAAA,OAAO,OAA6B;AAC7C,iFAAmF;AAA1E,uJAAA,OAAO,OAAyB;AACzC,qFAAuF;AAA9E,2JAAA,OAAO,OAA2B;AAE3C,0HAAmF;AACnF,kHAA4E;AAC5E,0FAA6D;AAC7D,oHAAsF;AACtF,4GAA8E;AAC9E,gHAAkF;AAErE,QAAA,sBAAsB,GAAG,kDAAyB,CAAC,OAAO,CACrE,sBAAsB,EACtB,EAAE,CACH,CAAC;AACW,QAAA,mBAAmB,GAAG,8CAAsB,CAAC,OAAO,CAC/D,sBAAsB,EACtB,EAAE,CACH,CAAC;AACW,QAAA,gBAAgB,GAAG,kCAAmB,CAAC,OAAO,CACzD,sBAAsB,EACtB,EAAE,CACH,CAAC;AACW,QAAA,4BAA4B,GACvC,+CAA+B,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC;AACzD,QAAA,wBAAwB,GAAG,2CAA2B,CAAC,OAAO,CACzE,sBAAsB,EACtB,EAAE,CACH,CAAC;AACW,QAAA,0BAA0B,GAAG,6CAA6B,CAAC,OAAO,CAC7E,sBAAsB,EACtB,EAAE,CACH,CAAC"}
|
package/lib/cjs/wizard/Wizard.js
CHANGED
|
@@ -48,7 +48,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
48
48
|
const react_1 = __importStar(require("react"));
|
|
49
49
|
const defaultImports_1 = require("../_common/defaultImports");
|
|
50
50
|
const typography_1 = require("../typography");
|
|
51
|
-
exports.Wizard = react_1.default.forwardRef(function Wizard({ as, className, style, size = 'large', steps, activeStepIndex, orientation, htmlAttributes, }, ref) {
|
|
51
|
+
exports.Wizard = react_1.default.forwardRef(function Wizard({ as, className, style, size = 'large', steps, activeStepIndex, orientation, htmlAttributes, alignment = orientation === 'vertical' ? 'top' : 'middle', }, ref) {
|
|
52
52
|
(0, react_1.useEffect)(() => {
|
|
53
53
|
if (activeStepIndex > steps.length - 1 || activeStepIndex < 0) {
|
|
54
54
|
console.warn(`[🪡 Needle]: The activeStepIndex in Wizard is out of bounds. The activeStepIndex is ${activeStepIndex} and the number of steps is ${steps.length}.`);
|
|
@@ -56,9 +56,9 @@ exports.Wizard = react_1.default.forwardRef(function Wizard({ as, className, sty
|
|
|
56
56
|
}, [activeStepIndex, steps.length]);
|
|
57
57
|
switch (size) {
|
|
58
58
|
case 'small':
|
|
59
|
-
return ((0, jsx_runtime_1.jsx)(exports.WizardSmall, { as: as, orientation: orientation, style: style, className: className, steps: steps, activeStepIndex: activeStepIndex, ref: ref, htmlAttributes: htmlAttributes }));
|
|
59
|
+
return ((0, jsx_runtime_1.jsx)(exports.WizardSmall, { as: as, orientation: orientation, style: style, className: className, steps: steps, activeStepIndex: activeStepIndex, ref: ref, htmlAttributes: htmlAttributes, alignment: alignment }));
|
|
60
60
|
case 'large':
|
|
61
|
-
return ((0, jsx_runtime_1.jsx)(WizardLarge, { as: as, orientation: orientation, style: style, className: className, steps: steps, activeStepIndex: activeStepIndex, ref: ref, htmlAttributes: htmlAttributes }));
|
|
61
|
+
return ((0, jsx_runtime_1.jsx)(WizardLarge, { as: as, orientation: orientation, style: style, className: className, steps: steps, activeStepIndex: activeStepIndex, ref: ref, htmlAttributes: htmlAttributes, alignment: alignment }));
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
64
|
const getStatus = (activeStepIndex, stepIndex) => stepIndex === activeStepIndex
|
|
@@ -66,11 +66,12 @@ const getStatus = (activeStepIndex, stepIndex) => stepIndex === activeStepIndex
|
|
|
66
66
|
: activeStepIndex < stepIndex
|
|
67
67
|
? 'incomplete'
|
|
68
68
|
: 'complete';
|
|
69
|
-
const WizardLarge = react_1.default.forwardRef(function WizardLarge({ orientation = 'horizontal', activeStepIndex, steps, as, style, className, htmlAttributes, }, ref) {
|
|
69
|
+
const WizardLarge = react_1.default.forwardRef(function WizardLarge({ orientation = 'horizontal', activeStepIndex, steps, as, style, className, htmlAttributes, alignment, }, ref) {
|
|
70
70
|
const Component = as || 'div';
|
|
71
71
|
const wizardClasses = (0, defaultImports_1.classNames)('ndl-wizard', 'ndl-wizard-large', {
|
|
72
72
|
'ndl-horizontal': orientation === 'horizontal',
|
|
73
73
|
'ndl-vertical': orientation === 'vertical',
|
|
74
|
+
[`ndl-wizard-align-${alignment}`]: alignment,
|
|
74
75
|
}, className);
|
|
75
76
|
const componentStyle = {
|
|
76
77
|
gridTemplateColumns: orientation === 'horizontal'
|
|
@@ -88,6 +89,7 @@ const WizardLarge = react_1.default.forwardRef(function WizardLarge({ orientatio
|
|
|
88
89
|
'ndl-wizard-step-complete': status === 'complete',
|
|
89
90
|
'ndl-wizard-step-active': status === 'active',
|
|
90
91
|
'ndl-wizard-step-error': step.status === 'error',
|
|
92
|
+
[`ndl-wizard-align-${alignment}`]: alignment,
|
|
91
93
|
});
|
|
92
94
|
};
|
|
93
95
|
return ((0, jsx_runtime_1.jsxs)(Component, Object.assign({ className: wizardClasses, style: Object.assign(Object.assign({}, style), componentStyle), ref: ref }, htmlAttributes, { children: [steps.map((step, index) => {
|
|
@@ -95,6 +97,7 @@ const WizardLarge = react_1.default.forwardRef(function WizardLarge({ orientatio
|
|
|
95
97
|
const wizardStepClasses = (0, defaultImports_1.classNames)('ndl-wizard-step-text', {
|
|
96
98
|
'ndl-vertical': orientation === 'vertical',
|
|
97
99
|
'ndl-horizontal': orientation === 'horizontal',
|
|
100
|
+
[`ndl-wizard-align-${alignment}`]: alignment,
|
|
98
101
|
'ndl-wizard-step-incomplete': getStatus(activeStepIndex, index) === 'incomplete',
|
|
99
102
|
});
|
|
100
103
|
return ((0, jsx_runtime_1.jsx)("div", { className: wizardStepClasses, children: (0, jsx_runtime_1.jsx)(typography_1.Typography, { variant: "body-large", children: step.content }) }, index));
|
|
@@ -107,31 +110,36 @@ const WizardLarge = react_1.default.forwardRef(function WizardLarge({ orientatio
|
|
|
107
110
|
gridRow: orientation === 'vertical' ? index + 1 : '',
|
|
108
111
|
}, children: (0, jsx_runtime_1.jsx)(Circle, { status: step.status === 'error'
|
|
109
112
|
? 'error'
|
|
110
|
-
: getStatus(activeStepIndex, index), number: index + 1, text: step.content }) }, index));
|
|
113
|
+
: getStatus(activeStepIndex, index), number: index + 1, text: step.content, alignment: alignment }) }, index));
|
|
111
114
|
})] })));
|
|
112
115
|
});
|
|
113
|
-
exports.WizardSmall = react_1.default.forwardRef(function WizardSmall({ orientation = 'horizontal', activeStepIndex, steps, as, className, htmlAttributes, }, ref) {
|
|
116
|
+
exports.WizardSmall = react_1.default.forwardRef(function WizardSmall({ orientation = 'horizontal', activeStepIndex, steps, as, className, htmlAttributes, alignment = 'middle', }, ref) {
|
|
114
117
|
const Component = as || 'div';
|
|
115
118
|
const wizardClasses = (0, defaultImports_1.classNames)('ndl-wizard', 'ndl-wizard-small', {
|
|
116
119
|
'ndl-horizontal': orientation === 'horizontal',
|
|
117
120
|
'ndl-vertical': orientation === 'vertical',
|
|
121
|
+
[`ndl-wizard-align-${alignment}`]: alignment,
|
|
118
122
|
}, className);
|
|
119
123
|
const stepClasses = (index) => (0, defaultImports_1.classNames)('ndl-wizard-step', {
|
|
120
124
|
'ndl-horizontal': orientation === 'horizontal',
|
|
121
125
|
'ndl-vertical': orientation === 'vertical',
|
|
122
126
|
'ndl-wizard-step-active': getStatus(activeStepIndex, index) === 'active',
|
|
123
127
|
'ndl-wizard-step-complete': getStatus(activeStepIndex, index) === 'complete',
|
|
128
|
+
[`ndl-wizard-align-${alignment}`]: alignment,
|
|
124
129
|
});
|
|
125
130
|
return ((0, jsx_runtime_1.jsxs)(Component, Object.assign({ className: wizardClasses, ref: ref }, htmlAttributes, { children: [(0, jsx_runtime_1.jsx)("div", { className: "ndl-wizard-steps-line" }), steps.map((step, index) => {
|
|
126
131
|
return ((0, jsx_runtime_1.jsx)("div", { className: stepClasses(index), children: (0, jsx_runtime_1.jsx)("div", { className: "ndl-wizard-circle" }) }, index));
|
|
127
132
|
}), (0, jsx_runtime_1.jsx)("div", { className: "ndl-wizard-steps-line" })] })));
|
|
128
133
|
});
|
|
129
|
-
const Circle = ({ status, number, }) => {
|
|
134
|
+
const Circle = ({ status, number, alignment = 'middle', }) => {
|
|
130
135
|
const innerCircleClasses = (0, defaultImports_1.classNames)({
|
|
131
136
|
'n-fill-palette-primary-bg-strong': status === 'complete' || status === 'active',
|
|
132
137
|
'n-fill-palette-neutral-bg-stronger': status === 'incomplete',
|
|
133
138
|
'n-fill-palette-danger-bg-strong': status === 'error',
|
|
134
139
|
});
|
|
135
|
-
|
|
140
|
+
const outerCircleClasses = (0, defaultImports_1.classNames)('ndl-wizard-circle', {
|
|
141
|
+
[`ndl-wizard-align-${alignment}`]: alignment,
|
|
142
|
+
});
|
|
143
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: outerCircleClasses, children: (0, jsx_runtime_1.jsxs)("svg", { children: [status === 'active' && ((0, jsx_runtime_1.jsx)("g", { children: (0, jsx_runtime_1.jsx)("circle", { className: "n-stroke-palette-primary-bg-strong", style: { fill: 'transparent', strokeWidth: 2 }, cx: "16", cy: "16", r: "14" }) })), (0, jsx_runtime_1.jsx)("circle", { className: innerCircleClasses, cx: "16", cy: "16", r: "12" }), (0, jsx_runtime_1.jsx)("text", { x: "50%", y: "50%", fontSize: 14, className: "n-fill-palette-neutral-bg-weak", textAnchor: "middle", dominantBaseline: "middle", dy: "0.1em", children: status === 'error' ? '!' : number })] }) }));
|
|
136
144
|
};
|
|
137
145
|
//# sourceMappingURL=Wizard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Wizard.js","sourceRoot":"","sources":["../../../src/wizard/Wizard.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,+CAAyC;AAEzC,8DAAuD;AACvD,8CAA2C;
|
|
1
|
+
{"version":3,"file":"Wizard.js","sourceRoot":"","sources":["../../../src/wizard/Wizard.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,+CAAyC;AAEzC,8DAAuD;AACvD,8CAA2C;AAyC9B,QAAA,MAAM,GACjB,eAAK,CAAC,UAAU,CAAC,SAAS,MAAM,CAC9B,EACE,EAAE,EACF,SAAS,EACT,KAAK,EACL,IAAI,GAAG,OAAO,EACd,KAAK,EACL,eAAe,EACf,WAAW,EACX,cAAc,EACd,SAAS,GAAG,WAAW,KAAK,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,GACd,EAC7C,GAAsB;IAEtB,IAAA,iBAAS,EAAC,GAAG,EAAE;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AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
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 { useState } from 'react';
|
|
23
|
+
import { Accordion } from '@neo4j-ndl/react';
|
|
24
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
25
|
+
const Component = () => {
|
|
26
|
+
const itemIds = ['item-1', 'item-2', 'item-3', 'item-4'];
|
|
27
|
+
const [expandedItemId, setExpandedItemId] = useState(null);
|
|
28
|
+
const onChange = (expandedItemId) => setExpandedItemId(expandedItemId);
|
|
29
|
+
return (_jsxs(Accordion, { expandedItemId: expandedItemId, isMultiple: false, onChange: onChange, children: [_jsx(Accordion.CleanItem, { itemId: itemIds[0], title: `Accordion ${itemIds[0]}`, children: itemIds[0] }), _jsx(Accordion.CleanItem, { itemId: itemIds[1], title: `Accordion ${itemIds[1]}`, children: itemIds[1] }), _jsx(Accordion.CleanItem, { itemId: itemIds[2], title: `Accordion ${itemIds[2]}`, children: itemIds[2] }), _jsx(Accordion.CleanItem, { itemId: itemIds[3], title: `Accordion ${itemIds[3]}`, children: itemIds[3] })] }));
|
|
30
|
+
};
|
|
31
|
+
export default Component;
|
|
32
|
+
//# sourceMappingURL=accordion-clean-items-expanded.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion-clean-items-expanded.story.js","sourceRoot":"","sources":["../../../../src/accordion/stories/accordion-clean-items-expanded.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,SAAS,EAAwB,MAAM,kBAAkB,CAAC;AACnE,OAAO,yCAAyC,CAAC;AAEjD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,OAAO,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAEzD,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAClD,IAAI,CACL,CAAC;IAEF,MAAM,QAAQ,GAAG,CAAC,cAAsC,EAAE,EAAE,CAC1D,iBAAiB,CAAC,cAAc,CAAC,CAAC;IAEpC,OAAO,CACL,MAAC,SAAS,IACR,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,KAAK,EACjB,QAAQ,EAAE,QAAQ,aAElB,KAAC,SAAS,CAAC,SAAS,IAClB,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAClB,KAAK,EAAE,aAAa,OAAO,CAAC,CAAC,CAAC,EAAE,YAE/B,OAAO,CAAC,CAAC,CAAC,GACS,EACtB,KAAC,SAAS,CAAC,SAAS,IAClB,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAClB,KAAK,EAAE,aAAa,OAAO,CAAC,CAAC,CAAC,EAAE,YAE/B,OAAO,CAAC,CAAC,CAAC,GACS,EACtB,KAAC,SAAS,CAAC,SAAS,IAClB,MAA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