@neo4j-ndl/react 0.2.0 → 0.4.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/{input/Input.js → _common/input/RadioAndCheckboxWrapper.js} +6 -6
- package/lib/cjs/_common/input/RadioAndCheckboxWrapper.js.map +1 -0
- package/lib/cjs/_common/input/types.js +3 -0
- package/lib/cjs/_common/input/types.js.map +1 -0
- package/lib/cjs/_common/utilts.js +31 -0
- package/lib/cjs/_common/utilts.js.map +1 -0
- package/lib/cjs/button/Button.js +18 -13
- package/lib/cjs/button/Button.js.map +1 -1
- package/lib/cjs/button/IconButton.js +85 -0
- package/lib/cjs/button/IconButton.js.map +1 -0
- package/lib/cjs/button/IconButtonArray.js +52 -0
- package/lib/cjs/button/IconButtonArray.js.map +1 -0
- package/lib/cjs/button/index.js +2 -0
- package/lib/cjs/button/index.js.map +1 -1
- package/lib/cjs/checkbox/Checkbox.js +2 -2
- package/lib/cjs/checkbox/Checkbox.js.map +1 -1
- package/lib/cjs/index.js +2 -0
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/label/Label.js +3 -1
- package/lib/cjs/label/Label.js.map +1 -1
- package/lib/cjs/progress-bar/ProgressBar.js +2 -2
- package/lib/cjs/progress-bar/ProgressBar.js.map +1 -1
- package/lib/cjs/radio/Radio.js +2 -2
- package/lib/cjs/radio/Radio.js.map +1 -1
- package/lib/cjs/switch/Switch.js +2 -2
- package/lib/cjs/switch/Switch.js.map +1 -1
- package/lib/cjs/table/Table.js +124 -0
- package/lib/cjs/table/Table.js.map +1 -0
- package/lib/cjs/table/TableNavigation.js +51 -0
- package/lib/cjs/table/TableNavigation.js.map +1 -0
- package/lib/cjs/table/helpers.js +119 -0
- package/lib/cjs/table/helpers.js.map +1 -0
- package/lib/cjs/table/hooks/hookCallbackTypes.js +23 -0
- package/lib/cjs/table/hooks/hookCallbackTypes.js.map +1 -0
- package/lib/cjs/table/hooks/index.js +40 -0
- package/lib/cjs/table/hooks/index.js.map +1 -0
- package/lib/cjs/table/hooks/useMultiRowSelect.js +84 -0
- package/lib/cjs/table/hooks/useMultiRowSelect.js.map +1 -0
- package/lib/cjs/table/hooks/useSingleRowSelect.js +61 -0
- package/lib/cjs/table/hooks/useSingleRowSelect.js.map +1 -0
- package/lib/cjs/table/index.js +44 -0
- package/lib/cjs/table/index.js.map +1 -0
- package/lib/cjs/tabs/Tabs.js +4 -3
- package/lib/cjs/tabs/Tabs.js.map +1 -1
- package/lib/cjs/text-input/TextInput.js +72 -0
- package/lib/cjs/text-input/TextInput.js.map +1 -0
- package/lib/cjs/{input → text-input}/index.js +3 -3
- package/lib/cjs/text-input/index.js.map +1 -0
- package/lib/esm/{input/Input.js → _common/input/RadioAndCheckboxWrapper.js} +6 -6
- package/lib/esm/_common/input/RadioAndCheckboxWrapper.js.map +1 -0
- package/lib/esm/_common/input/types.js +2 -0
- package/lib/esm/_common/input/types.js.map +1 -0
- package/lib/esm/_common/utilts.js +25 -0
- package/lib/esm/_common/utilts.js.map +1 -0
- package/lib/esm/button/Button.js +16 -9
- package/lib/esm/button/Button.js.map +1 -1
- package/lib/esm/button/IconButton.js +79 -0
- package/lib/esm/button/IconButton.js.map +1 -0
- package/lib/esm/button/IconButtonArray.js +46 -0
- package/lib/esm/button/IconButtonArray.js.map +1 -0
- package/lib/esm/button/index.js +2 -0
- package/lib/esm/button/index.js.map +1 -1
- package/lib/esm/checkbox/Checkbox.js +2 -2
- package/lib/esm/checkbox/Checkbox.js.map +1 -1
- package/lib/esm/index.js +2 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/label/Label.js +3 -1
- package/lib/esm/label/Label.js.map +1 -1
- package/lib/esm/progress-bar/ProgressBar.js +2 -2
- package/lib/esm/progress-bar/ProgressBar.js.map +1 -1
- package/lib/esm/radio/Radio.js +2 -2
- package/lib/esm/radio/Radio.js.map +1 -1
- package/lib/esm/switch/Switch.js +2 -2
- package/lib/esm/switch/Switch.js.map +1 -1
- package/lib/esm/table/Table.js +117 -0
- package/lib/esm/table/Table.js.map +1 -0
- package/lib/esm/table/TableNavigation.js +44 -0
- package/lib/esm/table/TableNavigation.js.map +1 -0
- package/lib/esm/table/helpers.js +112 -0
- package/lib/esm/table/helpers.js.map +1 -0
- package/lib/esm/{input/index.js → table/hooks/hookCallbackTypes.js} +2 -2
- package/lib/esm/table/hooks/hookCallbackTypes.js.map +1 -0
- package/lib/esm/table/hooks/index.js +24 -0
- package/lib/esm/table/hooks/index.js.map +1 -0
- package/lib/esm/table/hooks/useMultiRowSelect.js +82 -0
- package/lib/esm/table/hooks/useMultiRowSelect.js.map +1 -0
- package/lib/esm/table/hooks/useSingleRowSelect.js +57 -0
- package/lib/esm/table/hooks/useSingleRowSelect.js.map +1 -0
- package/lib/esm/table/index.js +23 -0
- package/lib/esm/table/index.js.map +1 -0
- package/lib/esm/tabs/Tabs.js +4 -3
- package/lib/esm/tabs/Tabs.js.map +1 -1
- package/lib/esm/text-input/TextInput.js +67 -0
- package/lib/esm/text-input/TextInput.js.map +1 -0
- package/lib/esm/text-input/index.js +22 -0
- package/lib/esm/text-input/index.js.map +1 -0
- package/lib/types/_common/input/RadioAndCheckboxWrapper.d.ts +37 -0
- package/lib/types/_common/input/types.d.ts +31 -0
- package/lib/types/_common/utilts.d.ts +24 -0
- package/lib/types/alert/Alert.d.ts +1 -1
- package/lib/types/button/Button.d.ts +3 -4
- package/lib/types/button/IconButton.d.ts +47 -0
- package/lib/types/button/IconButtonArray.d.ts +37 -0
- package/lib/types/button/index.d.ts +2 -0
- package/lib/types/checkbox/Checkbox.d.ts +2 -2
- package/lib/types/index.d.ts +2 -0
- package/lib/types/progress-bar/ProgressBar.d.ts +2 -3
- package/lib/types/radio/Radio.d.ts +2 -2
- package/lib/types/switch/Switch.d.ts +2 -2
- package/lib/types/table/Table.d.ts +71 -0
- package/lib/types/table/TableNavigation.d.ts +39 -0
- package/lib/types/table/helpers.d.ts +51 -0
- package/lib/types/table/hooks/hookCallbackTypes.d.ts +27 -0
- package/lib/types/table/hooks/index.d.ts +23 -0
- package/lib/types/table/hooks/useMultiRowSelect.d.ts +42 -0
- package/lib/types/table/hooks/useSingleRowSelect.d.ts +37 -0
- package/lib/types/table/index.d.ts +22 -0
- package/lib/types/tabs/Tabs.d.ts +3 -4
- package/lib/types/text-input/TextInput.d.ts +55 -0
- package/lib/types/{input → text-input}/index.d.ts +1 -1
- package/package.json +6 -5
- package/lib/cjs/input/Input.js.map +0 -1
- package/lib/cjs/input/index.js.map +0 -1
- package/lib/esm/input/Input.js.map +0 -1
- package/lib/esm/input/index.js.map +0 -1
- package/lib/types/input/Input.d.ts +0 -44
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.TableNavigation = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) "Neo4j"
|
|
11
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
12
|
+
*
|
|
13
|
+
* This file is part of Neo4j.
|
|
14
|
+
*
|
|
15
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
16
|
+
* it under the terms of the GNU General Public License as published by
|
|
17
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
18
|
+
* (at your option) any later version.
|
|
19
|
+
*
|
|
20
|
+
* This program is distributed in the hope that it will be useful,
|
|
21
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
22
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
23
|
+
* GNU General Public License for more details.
|
|
24
|
+
*
|
|
25
|
+
* You should have received a copy of the GNU General Public License
|
|
26
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
27
|
+
*/
|
|
28
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
29
|
+
const helpers_1 = require("./helpers");
|
|
30
|
+
const icons_1 = require("../icons");
|
|
31
|
+
const NavigationArrowButtonClasses = `
|
|
32
|
+
body-medium n-relative n-inline-flex n-items-center
|
|
33
|
+
n-px-2 n-py-2 n-rounded-xl
|
|
34
|
+
n-text-light-neutral-text-weaker
|
|
35
|
+
hover:n-bg-light-primary-bg-strong hover:n-bg-opacity-10
|
|
36
|
+
`;
|
|
37
|
+
const NavigationIconClasses = `
|
|
38
|
+
n-w-5 n-h-5 n-text-light-neutral-text-weak
|
|
39
|
+
`;
|
|
40
|
+
const TableNavigation = ({ canPreviousPage, canNextPage, onPageClick, previousPage, nextPage, pageIndex, pageOptions, }) => ((0, jsx_runtime_1.jsxs)("nav", Object.assign({ className: "n-relative n-z-0 n-inline-flex n-max-w-min n-rounded-md n-gap-x-2", "aria-label": "Pagination" }, { children: [canPreviousPage ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("button", Object.assign({ onClick: () => previousPage(), className: NavigationArrowButtonClasses }, { children: [(0, jsx_runtime_1.jsx)("span", Object.assign({ className: "n-sr-only" }, { children: "Previous" })), (0, jsx_runtime_1.jsx)(icons_1.HeroIcon, { iconName: "ChevronLeftIcon", className: NavigationIconClasses })] })) })) : null, (0, helpers_1.userFriendlyPagination)(pageIndex + 1, pageOptions.length).map((option, idx) => ((0, jsx_runtime_1.jsx)("button", Object.assign({ "data-testid": `table-${option}`, className: (0, classnames_1.default)('n-relative n-inline-flex n-items-center n-justify-center n-px-3 n-py-0.5 body-medium n-rounded-xl n-leading-8', {
|
|
41
|
+
'n-cursor-pointer hover:n-bg-light-neutral-bg-strong': typeof option === 'number' && option !== pageIndex + 1,
|
|
42
|
+
'n-bg-light-primary-bg-strong n-text-light-neutral-text-inverse': option === pageIndex + 1,
|
|
43
|
+
'n-text-light-neutral-text-weaker': option !== pageIndex + 1,
|
|
44
|
+
}), style: {
|
|
45
|
+
minWidth: '36px',
|
|
46
|
+
maxHeight: '36px',
|
|
47
|
+
minHeight: '36px',
|
|
48
|
+
}, onClick: () => typeof option === 'number' && onPageClick(option - 1) }, { children: option }), `${option}-${idx}`))), canNextPage ? ((0, jsx_runtime_1.jsxs)("button", Object.assign({ onClick: () => nextPage(), className: NavigationArrowButtonClasses }, { children: [(0, jsx_runtime_1.jsx)("span", Object.assign({ className: "n-sr-only" }, { children: "Next" })), (0, jsx_runtime_1.jsx)(icons_1.HeroIcon, { iconName: "ChevronRightIcon", className: NavigationIconClasses })] }))) : null] })));
|
|
49
|
+
exports.TableNavigation = TableNavigation;
|
|
50
|
+
exports.default = exports.TableNavigation;
|
|
51
|
+
//# sourceMappingURL=TableNavigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableNavigation.js","sourceRoot":"","sources":["../../../src/table/TableNavigation.tsx"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,4DAAoC;AACpC,uCAAmD;AACnD,oCAAoC;AAmBpC,MAAM,4BAA4B,GAAG;;;;;CAKpC,CAAC;AAEF,MAAM,qBAAqB,GAAG;;CAE7B,CAAC;AAEK,MAAM,eAAe,GAAG,CAAC,EAC9B,eAAe,EACf,WAAW,EACX,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,WAAW,GACU,EAAE,EAAE,CAAC,CAC1B,+CACE,SAAS,EAAC,mEAAmE,gBAClE,YAAY,iBAEtB,eAAe,CAAC,CAAC,CAAC,CACjB,2DACE,kDACE,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,EAAE,EAC7B,SAAS,EAAE,4BAA4B,iBAEvC,+CAAM,SAAS,EAAC,WAAW,8BAAgB,EAC3C,uBAAC,gBAAQ,IACP,QAAQ,EAAC,iBAAiB,EAC1B,SAAS,EAAE,qBAAqB,GAChC,KACK,GACR,CACJ,CAAC,CAAC,CAAC,IAAI,EAEP,IAAA,gCAAsB,EAAC,SAAS,GAAG,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,GAAG,CAC5D,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE,CAAC,CACf,gEAIe,SAAS,MAAM,EAAE,EAC9B,SAAS,EAAE,IAAA,oBAAU,EACnB,+GAA+G,EAC/G;gBACE,qDAAqD,EACnD,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,SAAS,GAAG,CAAC;gBACxD,gEAAgE,EAC9D,MAAM,KAAK,SAAS,GAAG,CAAC;gBAC1B,kCAAkC,EAAE,MAAM,KAAK,SAAS,GAAG,CAAC;aAC7D,CACF,EACD,KAAK,EAAE;gBACL,QAAQ,EAAE,MAAM;gBAChB,SAAS,EAAE,MAAM;gBACjB,SAAS,EAAE,MAAM;aAClB,EACD,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,MAAM,KAAK,QAAQ,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,gBAEnE,MAAM,KAnBF,GAAG,MAAM,IAAI,GAAG,EAAE,CAoBhB,CACV,CACF,EAEA,WAAW,CAAC,CAAC,CAAC,CACb,kDACE,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,EAAE,EACzB,SAAS,EAAE,4BAA4B,iBAEvC,+CAAM,SAAS,EAAC,WAAW,0BAAY,EACvC,uBAAC,gBAAQ,IACP,QAAQ,EAAC,kBAAkB,EAC3B,SAAS,EAAE,qBAAqB,GAChC,KACK,CACV,CAAC,CAAC,CAAC,IAAI,KACJ,CACP,CAAC;AAtEW,QAAA,eAAe,mBAsE1B;AAEF,kBAAe,uBAAe,CAAC"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.toggleRowSelection = exports.userFriendlyPagination = exports.TableResults = exports.ResizingBar = exports.SortIcon = void 0;
|
|
15
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* Copyright (c) "Neo4j"
|
|
19
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
20
|
+
*
|
|
21
|
+
* This file is part of Neo4j.
|
|
22
|
+
*
|
|
23
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
24
|
+
* it under the terms of the GNU General Public License as published by
|
|
25
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
26
|
+
* (at your option) any later version.
|
|
27
|
+
*
|
|
28
|
+
* This program is distributed in the hope that it will be useful,
|
|
29
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
30
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
31
|
+
* GNU General Public License for more details.
|
|
32
|
+
*
|
|
33
|
+
* You should have received a copy of the GNU General Public License
|
|
34
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
35
|
+
*/
|
|
36
|
+
const icons_1 = require("../icons");
|
|
37
|
+
const react_1 = require("react");
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* React Table helper to display sorting icon
|
|
41
|
+
* Source:
|
|
42
|
+
* https://react-table.tanstack.com/docs/api/useSortBy#column-properties
|
|
43
|
+
*
|
|
44
|
+
*/
|
|
45
|
+
const SortIcon = (_a) => {
|
|
46
|
+
var { isSortedDesc } = _a, props = __rest(_a, ["isSortedDesc"]);
|
|
47
|
+
switch (true) {
|
|
48
|
+
case isSortedDesc === true:
|
|
49
|
+
return ((0, jsx_runtime_1.jsx)(icons_1.HeroIcon, Object.assign({}, props, { className: "n-w-4 n-h-4", type: "outline", iconName: "SortDescendingIcon" })));
|
|
50
|
+
case isSortedDesc === false:
|
|
51
|
+
return ((0, jsx_runtime_1.jsx)(icons_1.HeroIcon, Object.assign({}, props, { className: "n-w-4 n-h-4", type: "outline", iconName: "SortAscendingIcon" })));
|
|
52
|
+
default:
|
|
53
|
+
return ((0, jsx_runtime_1.jsx)(icons_1.HeroIcon, Object.assign({}, props, { className: "n-w-4 n-h-4", type: "outline", iconName: "MenuAlt1Icon" })));
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
exports.SortIcon = SortIcon;
|
|
57
|
+
exports.ResizingBar = (0, react_1.memo)(function ResizingBarMemoed(props) {
|
|
58
|
+
return ((0, jsx_runtime_1.jsx)("div", Object.assign({}, props, { className: "table-resizing-bar", style: {
|
|
59
|
+
width: '4px',
|
|
60
|
+
zIndex: 1,
|
|
61
|
+
// prevents from scrolling while dragging on touch devices
|
|
62
|
+
touchAction: 'none',
|
|
63
|
+
} })));
|
|
64
|
+
});
|
|
65
|
+
/**
|
|
66
|
+
* The left section of the bottom navigation
|
|
67
|
+
* that is showing the current page and how many results we can see
|
|
68
|
+
*/
|
|
69
|
+
const TableResults = ({ pageIndex, pageLength, rowsLength, }) => ((0, jsx_runtime_1.jsx)("span", Object.assign({ className: "n-text-light-neutral-text-weaker body-medium n-whitespace-nowrap" }, { children: (0, jsx_runtime_1.jsxs)("span", { children: ["Showing", ' ', (0, jsx_runtime_1.jsxs)("b", { children: [pageIndex * 10, "-", pageIndex * 10 + pageLength] }), ' ', "of ", (0, jsx_runtime_1.jsx)("b", { children: rowsLength }), " results"] }) })));
|
|
70
|
+
exports.TableResults = TableResults;
|
|
71
|
+
/**
|
|
72
|
+
* Modified from here: https://gist.github.com/kottenator/9d936eb3e4e3c3e02598
|
|
73
|
+
*
|
|
74
|
+
* @param current Current Index
|
|
75
|
+
* @param max Max Index
|
|
76
|
+
* @returns
|
|
77
|
+
*/
|
|
78
|
+
const userFriendlyPagination = (current, max) => {
|
|
79
|
+
const last = max;
|
|
80
|
+
const delta = 2;
|
|
81
|
+
const left = current - delta;
|
|
82
|
+
const right = current + delta + 1;
|
|
83
|
+
const range = [];
|
|
84
|
+
const rangeWithDots = [];
|
|
85
|
+
let l;
|
|
86
|
+
for (let i = 1; i <= last; i += 1) {
|
|
87
|
+
if (i === 1 || i === last || (i >= left && i < right)) {
|
|
88
|
+
range.push(i);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
for (let i = 0; i < range.length; i += 1) {
|
|
92
|
+
if (l) {
|
|
93
|
+
if (range[i] - l === 2) {
|
|
94
|
+
rangeWithDots.push(l + 1);
|
|
95
|
+
}
|
|
96
|
+
else if (range[i] - l !== 1) {
|
|
97
|
+
rangeWithDots.push('...');
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
rangeWithDots.push(range[i]);
|
|
101
|
+
l = range[i];
|
|
102
|
+
}
|
|
103
|
+
return rangeWithDots;
|
|
104
|
+
};
|
|
105
|
+
exports.userFriendlyPagination = userFriendlyPagination;
|
|
106
|
+
/**
|
|
107
|
+
* Small helper to get handle the Checkbox
|
|
108
|
+
* functionality in tables
|
|
109
|
+
*/
|
|
110
|
+
const toggleRowSelection = (list, idx) => {
|
|
111
|
+
// Removing from the list
|
|
112
|
+
if (list.includes(idx)) {
|
|
113
|
+
return list.filter((o) => o !== idx);
|
|
114
|
+
}
|
|
115
|
+
// Adding to the list
|
|
116
|
+
return [...list, idx];
|
|
117
|
+
};
|
|
118
|
+
exports.toggleRowSelection = toggleRowSelection;
|
|
119
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
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AAC,CAAC,CAAC,CAAC;QAC7B,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;KACd;IAED,OAAO,aAAa,CAAC;AACvB,CAAC,CAAC;AA5BW,QAAA,sBAAsB,0BA4BjC;AAEF;;;GAGG;AACI,MAAM,kBAAkB,GAAG,CAAC,IAAc,EAAE,GAAW,EAAE,EAAE;IAChE,yBAAyB;IACzB,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QACtB,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC;KACtC;IACD,qBAAqB;IACrB,OAAO,CAAC,GAAG,IAAI,EAAE,GAAG,CAAC,CAAC;AACxB,CAAC,CAAC;AAPW,QAAA,kBAAkB,sBAO7B"}
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
//# sourceMappingURL=hookCallbackTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hookCallbackTypes.js","sourceRoot":"","sources":["../../../../src/table/hooks/hookCallbackTypes.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG"}
|
|
@@ -0,0 +1,40 @@
|
|
|
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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
25
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
26
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
27
|
+
}
|
|
28
|
+
Object.defineProperty(o, k2, desc);
|
|
29
|
+
}) : (function(o, m, k, k2) {
|
|
30
|
+
if (k2 === undefined) k2 = k;
|
|
31
|
+
o[k2] = m[k];
|
|
32
|
+
}));
|
|
33
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
34
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
35
|
+
};
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
__exportStar(require("./useMultiRowSelect"), exports);
|
|
38
|
+
__exportStar(require("./useSingleRowSelect"), exports);
|
|
39
|
+
__exportStar(require("./hookCallbackTypes"), exports);
|
|
40
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/table/hooks/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;AAEH,sDAAoC;AACpC,uDAAqC;AACrC,sDAAoC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
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_table_1 = require("react-table");
|
|
26
|
+
const checkbox_1 = require("../../checkbox");
|
|
27
|
+
/**
|
|
28
|
+
* A react-table plugin to support controlled selected row state for multiple rows
|
|
29
|
+
*
|
|
30
|
+
* Required options provided to useTable:
|
|
31
|
+
*
|
|
32
|
+
* `onAllRowSelect`: A callback that is called when the all rows checkbox is toggled
|
|
33
|
+
* `onRowSelect`: A callback that is called when a rows checkbox is toggled
|
|
34
|
+
*
|
|
35
|
+
* Required fields on `data` provided to useTable:
|
|
36
|
+
*
|
|
37
|
+
* `isSelected`: a boolean that indicates if the row is selected. This key can be changed
|
|
38
|
+
* from `isSelected` to something else by setting the `manualRowSelectedKey` option
|
|
39
|
+
* in the useTable options. See the useRowSelect plugin docs for more details.
|
|
40
|
+
*/
|
|
41
|
+
const useMultiRowSelect = (hooks) => {
|
|
42
|
+
(0, react_table_1.useRowSelect)(hooks);
|
|
43
|
+
/*
|
|
44
|
+
Used for the indeterminate
|
|
45
|
+
state of the checkbox
|
|
46
|
+
*/
|
|
47
|
+
hooks.useControlledState.push((state, { instance }) => {
|
|
48
|
+
const { data } = instance;
|
|
49
|
+
const isSelectedKey = 'isSelected';
|
|
50
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
51
|
+
const newState = (0, react_1.useMemo)(() => (Object.assign(Object.assign({}, state), { selectedRowIds: data.reduce((acc, curr, index) => {
|
|
52
|
+
if (curr[isSelectedKey]) {
|
|
53
|
+
return Object.assign(Object.assign({}, acc), { [index]: true });
|
|
54
|
+
}
|
|
55
|
+
return acc;
|
|
56
|
+
}, {}) })), [state, data, isSelectedKey]);
|
|
57
|
+
return newState;
|
|
58
|
+
});
|
|
59
|
+
hooks.visibleColumns.push((columns, { instance }) => [
|
|
60
|
+
// Let's make a column for selection
|
|
61
|
+
{
|
|
62
|
+
id: 'ndl-checkbox-selection',
|
|
63
|
+
// The header can use the table's getToggleAllRowsSelectedProps method
|
|
64
|
+
// to render a checkbox
|
|
65
|
+
Header: ({ getToggleAllRowsSelectedProps, }) => {
|
|
66
|
+
const checkboxRef = (0, react_1.useRef)(null);
|
|
67
|
+
(0, react_1.useEffect)(() => {
|
|
68
|
+
if (checkboxRef && checkboxRef.current) {
|
|
69
|
+
checkboxRef.current.indeterminate =
|
|
70
|
+
getToggleAllRowsSelectedProps().indeterminate || false;
|
|
71
|
+
}
|
|
72
|
+
}, [checkboxRef, getToggleAllRowsSelectedProps]);
|
|
73
|
+
return ((0, jsx_runtime_1.jsx)(checkbox_1.Checkbox, Object.assign({ "aria-label": "all-rows-select", onClick: () => instance.onAllRowSelect() }, getToggleAllRowsSelectedProps(), { ref: checkboxRef })));
|
|
74
|
+
},
|
|
75
|
+
// The cell can use the individual row's getToggleRowSelectedProps method
|
|
76
|
+
// to the render a checkbox
|
|
77
|
+
Cell: ({ row }) => ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(checkbox_1.Checkbox, Object.assign({ "aria-label": `row-${row.index}`, onClick: () => instance.onRowSelect(row.original, row.index) }, row.getToggleRowSelectedProps())) })),
|
|
78
|
+
},
|
|
79
|
+
...columns,
|
|
80
|
+
]);
|
|
81
|
+
};
|
|
82
|
+
useMultiRowSelect.pluginName = 'useMultiRowSelect';
|
|
83
|
+
exports.default = useMultiRowSelect;
|
|
84
|
+
//# sourceMappingURL=useMultiRowSelect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMultiRowSelect.js","sourceRoot":"","sources":["../../../../src/table/hooks/useMultiRowSelect.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,iCAAmD;AACnD,6CASqB;AACrB,6CAA0C;AAW1C;;;;;;;;;;;;;GAaG;AACH,MAAM,iBAAiB,GAAG,CACxB,KAAe,EACf,EAAE;IACF,IAAA,0BAAY,EAAC,KAAK,CAAC,CAAC;IAEpB;;;MAGE;IACF,KAAK,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,KAAK,E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,6BAA6B,EAAE,IACnC,GAAG,EAAE,WAAW,IAChB,CACH,CAAC;YACJ,CAAC;YACD,yEAAyE;YACzE,2BAA2B;YAC3B,IAAI,EAAE,CAAC,EAAE,GAAG,EAAW,EAAE,EAAE,CAAC,CAC1B,0CACE,uBAAC,mBAAQ,gCACK,OAAO,GAAG,CAAC,KAAK,EAAE,EAC9B,OAAO,EAAE,GAAG,EAAE,CACX,QAA2B,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,KAAK,CAAC,IAE9D,GAAW,CAAC,yBAAyB,EAAE,EAC5C,GACE,CACP;SACF;QACD,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,iBAAiB,CAAC,UAAU,GAAG,mBAAmB,CAAC;AAEnD,kBAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useSingleRowSelect = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) "Neo4j"
|
|
8
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
9
|
+
*
|
|
10
|
+
* This file is part of Neo4j.
|
|
11
|
+
*
|
|
12
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
13
|
+
* it under the terms of the GNU General Public License as published by
|
|
14
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
15
|
+
* (at your option) any later version.
|
|
16
|
+
*
|
|
17
|
+
* This program is distributed in the hope that it will be useful,
|
|
18
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
19
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
20
|
+
* GNU General Public License for more details.
|
|
21
|
+
*
|
|
22
|
+
* You should have received a copy of the GNU General Public License
|
|
23
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
24
|
+
*/
|
|
25
|
+
const react_table_1 = require("react-table");
|
|
26
|
+
const radio_1 = require("../../radio");
|
|
27
|
+
/**
|
|
28
|
+
* A react-table plugin to support controlled selected row state for a single row
|
|
29
|
+
*
|
|
30
|
+
* Required options provided to useTable:
|
|
31
|
+
*
|
|
32
|
+
* `onRowSelect`: A callback that is called when a rows checkbox is toggled
|
|
33
|
+
*
|
|
34
|
+
* Required fields on `data` provided to useTable:
|
|
35
|
+
*
|
|
36
|
+
* `isSelected`: a boolean that indicates if the row is selected. This key can be changed
|
|
37
|
+
* from `isSelected` to something else by setting the `manualRowSelectedKey` option
|
|
38
|
+
* in the useTable options. See the useRowSelect plugin docs for more details.
|
|
39
|
+
* There should only ever be 1 data entry with isSelected set to true
|
|
40
|
+
*/
|
|
41
|
+
const useSingleRowSelect = (hooks) => {
|
|
42
|
+
(0, react_table_1.useRowSelect)(hooks);
|
|
43
|
+
hooks.visibleColumns.push((columns, { instance }) => [
|
|
44
|
+
// Let's make a column for selection
|
|
45
|
+
// This should be definitely unique to avoid collision
|
|
46
|
+
{
|
|
47
|
+
id: 'ndl-radio-selection',
|
|
48
|
+
Header: () => null,
|
|
49
|
+
width: 20,
|
|
50
|
+
// The cell can use the individual row's getToggleRowSelectedProps method
|
|
51
|
+
// to the render a checkbox
|
|
52
|
+
Cell: ({ row }) => {
|
|
53
|
+
return ((0, jsx_runtime_1.jsx)(radio_1.Radio, Object.assign({}, row.getToggleRowSelectedProps(), { onChange: () => instance.onRowSelect(row.original, row.index) })));
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
...columns,
|
|
57
|
+
]);
|
|
58
|
+
};
|
|
59
|
+
exports.useSingleRowSelect = useSingleRowSelect;
|
|
60
|
+
exports.default = exports.useSingleRowSelect;
|
|
61
|
+
//# sourceMappingURL=useSingleRowSelect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSingleRowSelect.js","sourceRoot":"","sources":["../../../../src/table/hooks/useSingleRowSelect.tsx"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,6CAAwD;AACxD,uCAAoC;AAGpC;;;;;;;;;;;;;GAaG;AACI,MAAM,kBAAkB,GAAG,CAChC,KAAe,EACf,EAAE;IACF,IAAA,0BAAY,EAAC,KAAK,CAAC,CAAC;IAEpB,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;QACnD,oCAAoC;QACpC,sDAAsD;QACtD;YACE,EAAE,EAAE,qBAAqB;YACzB,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI;YAClB,KAAK,EAAE,EAAE;YACT,yEAAyE;YACzE,2BAA2B;YAC3B,IAAI,EAAE,CAAC,EAAE,GAAG,EAAW,EAAE,EAAE;gBACzB,OAAO,CACL,uBAAC,aAAK,oBACC,GAAW,CAAC,yBAAyB,EAAE,IAC5C,QAAQ,EAAE,GAAG,EAAE,CACZ,QAA2B,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,KAAK,CAAC,IAEnE,CACH,CAAC;YACJ,CAAC;SACF;QACD,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC,CAAC;AA3BW,QAAA,kBAAkB,sBA2B7B;AAEF,kBAAe,0BAAkB,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
25
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
26
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
27
|
+
}
|
|
28
|
+
Object.defineProperty(o, k2, desc);
|
|
29
|
+
}) : (function(o, m, k, k2) {
|
|
30
|
+
if (k2 === undefined) k2 = k;
|
|
31
|
+
o[k2] = m[k];
|
|
32
|
+
}));
|
|
33
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
34
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
35
|
+
};
|
|
36
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
+
};
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
exports.Table = void 0;
|
|
41
|
+
var Table_1 = require("./Table");
|
|
42
|
+
Object.defineProperty(exports, "Table", { enumerable: true, get: function () { return __importDefault(Table_1).default; } });
|
|
43
|
+
__exportStar(require("./hooks"), exports);
|
|
44
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/table/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;;;AAEH,iCAA2C;AAAlC,+GAAA,OAAO,OAAS;AACzB,0CAAwB"}
|
package/lib/cjs/tabs/Tabs.js
CHANGED
|
@@ -61,6 +61,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
61
61
|
*/
|
|
62
62
|
const react_1 = __importStar(require("react"));
|
|
63
63
|
const classnames_1 = __importDefault(require("classnames"));
|
|
64
|
+
const helpers_1 = require("../helpers");
|
|
64
65
|
const TabsContext = react_1.default.createContext(null);
|
|
65
66
|
const useTabsContext = () => {
|
|
66
67
|
const context = (0, react_1.useContext)(TabsContext);
|
|
@@ -74,11 +75,11 @@ const getGeneralTabClasses = (size, fill) => {
|
|
|
74
75
|
return {
|
|
75
76
|
large: size === 'large',
|
|
76
77
|
small: size === 'small',
|
|
77
|
-
filled: fill === 'filled',
|
|
78
|
-
underline: fill === 'underline',
|
|
78
|
+
'filled-tab': fill === 'filled',
|
|
79
|
+
'underline-tab': fill === 'underline',
|
|
79
80
|
};
|
|
80
81
|
};
|
|
81
|
-
exports.Tabs =
|
|
82
|
+
exports.Tabs = (0, helpers_1.forwardRef)(function Tabs(_a, ref) {
|
|
82
83
|
var { children, size = 'large', fill = 'underline', onChange, value, className, as = 'div' } = _a, rest = __rest(_a, ["children", "size", "fill", "onChange", "value", "className", "as"]);
|
|
83
84
|
const classes = (0, classnames_1.default)('ndl-tabs', getGeneralTabClasses(size, fill), className);
|
|
84
85
|
const Component = as;
|
package/lib/cjs/tabs/Tabs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../src/tabs/Tabs.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,+CAA0C;AAC1C,4DAAoC;
|
|
1
|
+
{"version":3,"file":"Tabs.js","sourceRoot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AG,KACjD,CACb,CAAC;AACJ,CAAC,CAAC,CAAC;AAqBU,QAAA,QAAQ,GAAG,eAAK,CAAC,UAAU,CAAC,SAAS,QAAQ,CACxD,EAA8D,EAC9D,GAAG;QADH,EAAE,EAAE,GAAG,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,OAA0B,EAArB,IAAI,cAA7C,oCAA+C,CAAF;IAG7C,MAAM,SAAS,GAAG,EAAE,CAAC;IAErB,OAAO,CACL,2DACG,KAAK,KAAK,KAAK,IAAI,CAClB,uBAAC,SAAS,kBACR,IAAI,EAAC,UAAU,EACf,EAAE,EAAE,aAAa,CAAC,KAAK,CAAC,IACpB,IAAI,IACR,GAAG,EAAE,GAAG,gBAEP,QAAQ,IACC,CACb,GACA,CACJ,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* Copyright (c) "Neo4j"
|
|
21
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
22
|
+
*
|
|
23
|
+
* This file is part of Neo4j.
|
|
24
|
+
*
|
|
25
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
26
|
+
* it under the terms of the GNU General Public License as published by
|
|
27
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
28
|
+
* (at your option) any later version.
|
|
29
|
+
*
|
|
30
|
+
* This program is distributed in the hope that it will be useful,
|
|
31
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
32
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
33
|
+
* GNU General Public License for more details.
|
|
34
|
+
*
|
|
35
|
+
* You should have received a copy of the GNU General Public License
|
|
36
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
37
|
+
*/
|
|
38
|
+
const react_1 = __importDefault(require("react"));
|
|
39
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
40
|
+
const icons_1 = require("../icons");
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
*
|
|
44
|
+
* Helpers
|
|
45
|
+
*
|
|
46
|
+
*
|
|
47
|
+
*/
|
|
48
|
+
/** Add any helper functions here. */
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
*
|
|
52
|
+
* TextInput Component
|
|
53
|
+
*
|
|
54
|
+
*
|
|
55
|
+
*/
|
|
56
|
+
const TextInput = react_1.default.forwardRef(function TextInput(props, ref) {
|
|
57
|
+
const { label, fluid, errorText, helpText, leftIcon, rightIcon, type = 'text', containerSize = 'small' } = props, otherInputProps = __rest(props, ["label", "fluid", "errorText", "helpText", "leftIcon", "rightIcon", "type", "containerSize"]);
|
|
58
|
+
const containerWrappingClass = (0, classnames_1.default)(`ndl-form-item ndl-type-text`, {
|
|
59
|
+
disabled: otherInputProps.disabled,
|
|
60
|
+
[containerSize]: containerSize,
|
|
61
|
+
'has-error': errorText,
|
|
62
|
+
'has-left-icon': leftIcon,
|
|
63
|
+
'has-right-icon': rightIcon || errorText,
|
|
64
|
+
'has-icon': leftIcon || rightIcon || errorText,
|
|
65
|
+
});
|
|
66
|
+
const labelWrappingClass = (0, classnames_1.default)(`form-item-label`, {
|
|
67
|
+
fluid,
|
|
68
|
+
});
|
|
69
|
+
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: containerWrappingClass }, { children: [(0, jsx_runtime_1.jsxs)("label", Object.assign({ className: labelWrappingClass }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "input-wrapper" }, { children: [leftIcon && (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "icon left-icon" }, { children: leftIcon })), (0, jsx_runtime_1.jsx)("input", Object.assign({}, otherInputProps, { type: type, ref: ref })), rightIcon && !errorText && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "icon right-icon" }, { children: rightIcon }))), errorText && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "icon right-icon error-icon" }, { children: (0, jsx_runtime_1.jsx)(icons_1.HeroIcon, { iconName: "ExclamationCircleIcon", type: "solid" }) })))] })), (0, jsx_runtime_1.jsx)("span", Object.assign({ className: "form-label-text" }, { children: label }))] })), (errorText || helpText) && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "form-msg" }, { children: errorText || helpText })))] })));
|
|
70
|
+
});
|
|
71
|
+
exports.default = TextInput;
|
|
72
|
+
//# sourceMappingURL=TextInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextInput.js","sourceRoot":"","sources":["../../../src/text-input/TextInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,kDAA4C;AAC5C,4DAAoC;AAEpC,oCAAoC;AAyBpC;;;;;;GAMG;AAEH,qCAAqC;AAErC;;;;;;GAMG;AAEH,MAAM,SAAS,GAAG,eAAK,CAAC,UAAU,CAAC,SAAS,SAAS,CACnD,KAA0B,EAC1B,GAAmC;IAEnC,MAAM,EACJ,KAA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,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,kBAAe,SAAS,CAAC"}
|
|
@@ -23,7 +23,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
23
23
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.
|
|
27
|
-
var
|
|
28
|
-
Object.defineProperty(exports, "
|
|
26
|
+
exports.TextInput = void 0;
|
|
27
|
+
var TextInput_1 = require("./TextInput");
|
|
28
|
+
Object.defineProperty(exports, "TextInput", { enumerable: true, get: function () { return __importDefault(TextInput_1).default; } });
|
|
29
29
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/text-input/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,yCAAmD;AAA1C,uHAAA,OAAO,OAAa"}
|
|
@@ -40,16 +40,16 @@ import classnames from 'classnames';
|
|
|
40
40
|
*
|
|
41
41
|
*
|
|
42
42
|
*/
|
|
43
|
-
const
|
|
44
|
-
const { label, fluid, labelBefore } = props, otherInputProps = __rest(props, ["label", "fluid", "labelBefore"]);
|
|
45
|
-
const containerWrappingClass = classnames(
|
|
43
|
+
const RadioAndCheckboxWrapper = (props, ref) => {
|
|
44
|
+
const { label, fluid, labelBefore, type = 'text' } = props, otherInputProps = __rest(props, ["label", "fluid", "labelBefore", "type"]);
|
|
45
|
+
const containerWrappingClass = classnames(`ndl-form-item ndl-type-${type}`, {
|
|
46
46
|
disabled: otherInputProps.disabled,
|
|
47
47
|
});
|
|
48
48
|
const labelWrappingClass = classnames(`form-item-label`, {
|
|
49
49
|
fluid,
|
|
50
50
|
'label-before': labelBefore,
|
|
51
51
|
});
|
|
52
|
-
return (_jsx("div", Object.assign({ className: containerWrappingClass }, { children: _jsxs("label", Object.assign({ className: labelWrappingClass }, { children: [_jsx("input", Object.assign({}, otherInputProps, { ref: ref })), label] })) })));
|
|
52
|
+
return (_jsx("div", Object.assign({ className: containerWrappingClass }, { children: _jsxs("label", Object.assign({ className: labelWrappingClass }, { children: [_jsx("input", Object.assign({}, otherInputProps, { ref: ref, type: type })), _jsx("span", Object.assign({ className: "form-label-text" }, { children: label }))] })) })));
|
|
53
53
|
};
|
|
54
|
-
export default forwardRef(
|
|
55
|
-
//# sourceMappingURL=
|
|
54
|
+
export default forwardRef(RadioAndCheckboxWrapper);
|
|
55
|
+
//# sourceMappingURL=RadioAndCheckboxWrapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioAndCheckboxWrapper.js","sourceRoot":"","sources":["../../../../src/_common/input/RadioAndCheckboxWrapper.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAgB,UAAU,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,UAAU,MAAM,YAAY,CAAC;AAmBpC,qCAAqC;AAErC;;;;;;GAMG;AAEH,MAAM,uBAAuB,GAAG,CAC9B,KAA4B,EAC5B,GAAmC,EACnC,EAAE;IACF,MAAM,EACJ,KAAK,EACL,KAAK,EACL,WAAW,EACX,IAAI,GAAG,MAAM,KAEX,KAAK,EADJ,eAAe,UAChB,KAAK,EANH,yCAML,CAAQ,CAAC;IAEV,MAAM,sBAAsB,GAAG,UAAU,CAAC,0BAA0B,IAAI,EAAE,EAAE;QAC1E,QAAQ,EAAE,eAAe,CAAC,QAAQ;KACnC,CAAC,CAAC;IAEH,MAAM,kBAAkB,GAAG,UAAU,CAAC,iBAAiB,EAAE;QACvD,KAAK;QACL,cAAc,EAAE,WAAW;KAC5B,CAAC,CAAC;IAEH,OAAO,CACL,4BAAK,SAAS,EAAE,sBAAsB,gBAGpC,+BAAO,SAAS,EAAE,kBAAkB,iBAClC,gCAAW,eAAe,IAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,IAAI,EACpD,6BAAM,SAAS,EAAC,iBAAiB,gBAAE,KAAK,IAAQ,KAC1C,IACJ,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC,uBAAuB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/_common/input/types.ts"],"names":[],"mappings":""}
|