@neo4j-ndl/react 0.1.3 → 0.1.4
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/alert/Alert.js +102 -0
- package/lib/cjs/alert/Alert.js.map +1 -0
- package/lib/cjs/alert/index.js +30 -0
- package/lib/cjs/alert/index.js.map +1 -0
- package/lib/cjs/button/Button.js +116 -0
- package/lib/cjs/button/Button.js.map +1 -0
- package/lib/cjs/button/index.js +34 -0
- package/lib/cjs/button/index.js.map +1 -0
- package/lib/cjs/checkbox/Checkbox.js +52 -0
- package/lib/cjs/checkbox/Checkbox.js.map +1 -0
- package/lib/cjs/checkbox/index.js +29 -0
- package/lib/cjs/checkbox/index.js.map +1 -0
- package/lib/cjs/context-menu/ContextMenu.js +214 -0
- package/lib/cjs/context-menu/ContextMenu.js.map +1 -0
- package/lib/cjs/context-menu/index.js +34 -0
- package/lib/cjs/context-menu/index.js.map +1 -0
- package/lib/cjs/helpers/debounce.js +41 -0
- package/lib/cjs/helpers/debounce.js.map +1 -0
- package/lib/cjs/helpers/forwardRef.js +26 -0
- package/lib/cjs/helpers/forwardRef.js.map +1 -0
- package/lib/cjs/helpers/index.js +36 -0
- package/lib/cjs/helpers/index.js.map +1 -0
- package/lib/cjs/helpers/testing.js +46 -0
- package/lib/cjs/helpers/testing.js.map +1 -0
- package/lib/cjs/helpers/types.js +23 -0
- package/lib/cjs/helpers/types.js.map +1 -0
- package/lib/cjs/icons/Custom.js +63 -0
- package/lib/cjs/icons/Custom.js.map +1 -0
- package/lib/cjs/icons/Hero.js +55 -0
- package/lib/cjs/icons/Hero.js.map +1 -0
- package/lib/cjs/icons/custom/Circle.js +6 -0
- package/lib/cjs/icons/custom/Circle.js.map +1 -0
- package/lib/cjs/icons/custom/DatabaseAddCircle.js +6 -0
- package/lib/cjs/icons/custom/DatabaseAddCircle.js.map +1 -0
- package/lib/cjs/icons/custom/Drag.js +6 -0
- package/lib/cjs/icons/custom/Drag.js.map +1 -0
- package/lib/cjs/icons/custom/Expand.js +6 -0
- package/lib/cjs/icons/custom/Expand.js.map +1 -0
- package/lib/cjs/icons/custom/ExternalLink.js +6 -0
- package/lib/cjs/icons/custom/ExternalLink.js.map +1 -0
- package/lib/cjs/icons/custom/FitToScreen.js +6 -0
- package/lib/cjs/icons/custom/FitToScreen.js.map +1 -0
- package/lib/cjs/icons/custom/FolderBookmark.js +6 -0
- package/lib/cjs/icons/custom/FolderBookmark.js.map +1 -0
- package/lib/cjs/icons/custom/Heirarchy2.js +6 -0
- package/lib/cjs/icons/custom/Heirarchy2.js.map +1 -0
- package/lib/cjs/icons/custom/Hierarchy1.js +6 -0
- package/lib/cjs/icons/custom/Hierarchy1.js.map +1 -0
- package/lib/cjs/icons/custom/Pin.js +6 -0
- package/lib/cjs/icons/custom/Pin.js.map +1 -0
- package/lib/cjs/icons/custom/Presentation.js +6 -0
- package/lib/cjs/icons/custom/Presentation.js.map +1 -0
- package/lib/cjs/icons/custom/Rhombus.js +6 -0
- package/lib/cjs/icons/custom/Rhombus.js.map +1 -0
- package/lib/cjs/icons/custom/Shrink.js +6 -0
- package/lib/cjs/icons/custom/Shrink.js.map +1 -0
- package/lib/cjs/icons/custom/Text.js +6 -0
- package/lib/cjs/icons/custom/Text.js.map +1 -0
- package/lib/cjs/icons/custom/Triangle.js +6 -0
- package/lib/cjs/icons/custom/Triangle.js.map +1 -0
- package/lib/cjs/icons/custom/index.js +57 -0
- package/lib/cjs/icons/custom/index.js.map +1 -0
- package/lib/cjs/icons/index.js +31 -0
- package/lib/cjs/icons/index.js.map +1 -0
- package/lib/cjs/index.js +47 -0
- package/lib/cjs/index.js.map +1 -0
- package/lib/cjs/input/Input.js +60 -0
- package/lib/cjs/input/Input.js.map +1 -0
- package/lib/cjs/input/index.js +29 -0
- package/lib/cjs/input/index.js.map +1 -0
- package/lib/cjs/label/Label.js +103 -0
- package/lib/cjs/label/Label.js.map +1 -0
- package/lib/cjs/label/index.js +29 -0
- package/lib/cjs/label/index.js.map +1 -0
- package/lib/cjs/loading-spinner/LoadingSpinner.js +53 -0
- package/lib/cjs/loading-spinner/LoadingSpinner.js.map +1 -0
- package/lib/cjs/loading-spinner/index.js +29 -0
- package/lib/cjs/loading-spinner/index.js.map +1 -0
- package/lib/cjs/popover/Popover.js +209 -0
- package/lib/cjs/popover/Popover.js.map +1 -0
- package/lib/cjs/popover/index.js +34 -0
- package/lib/cjs/popover/index.js.map +1 -0
- package/lib/cjs/progress-bar/ProgressBar.js +46 -0
- package/lib/cjs/progress-bar/ProgressBar.js.map +1 -0
- package/lib/cjs/progress-bar/index.js +29 -0
- package/lib/cjs/progress-bar/index.js.map +1 -0
- package/lib/cjs/radio/Radio.js +48 -0
- package/lib/cjs/radio/Radio.js.map +1 -0
- package/lib/cjs/radio/index.js +29 -0
- package/lib/cjs/radio/index.js.map +1 -0
- package/lib/cjs/switch/Switch.js +48 -0
- package/lib/cjs/switch/Switch.js.map +1 -0
- package/lib/cjs/switch/index.js +29 -0
- package/lib/cjs/switch/index.js.map +1 -0
- package/lib/cjs/tabs/Tabs.js +101 -0
- package/lib/cjs/tabs/Tabs.js.map +1 -0
- package/lib/cjs/tabs/index.js +34 -0
- package/lib/cjs/tabs/index.js.map +1 -0
- package/lib/cjs/tag/Tag.js +67 -0
- package/lib/cjs/tag/Tag.js.map +1 -0
- package/lib/cjs/tag/index.js +29 -0
- package/lib/cjs/tag/index.js.map +1 -0
- package/lib/cjs/tooltip/Tooltip.js +46 -0
- package/lib/cjs/tooltip/Tooltip.js.map +1 -0
- package/lib/cjs/tooltip/index.js +29 -0
- package/lib/cjs/tooltip/index.js.map +1 -0
- package/lib/cjs/view-selector/ViewSelector.js +85 -0
- package/lib/cjs/view-selector/ViewSelector.js.map +1 -0
- package/lib/cjs/view-selector/index.js +34 -0
- package/lib/cjs/view-selector/index.js.map +1 -0
- package/lib/esm/alert/Alert.js +95 -0
- package/lib/esm/alert/Alert.js.map +1 -0
- package/lib/esm/alert/index.js +22 -0
- package/lib/esm/alert/index.js.map +1 -0
- package/lib/esm/button/Button.js +108 -0
- package/lib/esm/button/Button.js.map +1 -0
- package/lib/esm/button/index.js +22 -0
- package/lib/esm/button/index.js.map +1 -0
- package/lib/esm/checkbox/Checkbox.js +47 -0
- package/lib/esm/checkbox/Checkbox.js.map +1 -0
- package/lib/esm/checkbox/index.js +22 -0
- package/lib/esm/checkbox/index.js.map +1 -0
- package/lib/esm/context-menu/ContextMenu.js +189 -0
- package/lib/esm/context-menu/ContextMenu.js.map +1 -0
- package/lib/esm/context-menu/index.js +22 -0
- package/lib/esm/context-menu/index.js.map +1 -0
- package/lib/esm/helpers/debounce.js +37 -0
- package/lib/esm/helpers/debounce.js.map +1 -0
- package/lib/esm/helpers/forwardRef.js +23 -0
- package/lib/esm/helpers/forwardRef.js.map +1 -0
- package/lib/esm/helpers/index.js +24 -0
- package/lib/esm/helpers/index.js.map +1 -0
- package/lib/esm/helpers/testing.js +42 -0
- package/lib/esm/helpers/testing.js.map +1 -0
- package/lib/esm/helpers/types.js +22 -0
- package/lib/esm/helpers/types.js.map +1 -0
- package/lib/esm/icons/Custom.js +41 -0
- package/lib/esm/icons/Custom.js.map +1 -0
- package/lib/esm/icons/Hero.js +33 -0
- package/lib/esm/icons/Hero.js.map +1 -0
- package/lib/esm/icons/custom/Circle.js +4 -0
- package/lib/esm/icons/custom/Circle.js.map +1 -0
- package/lib/esm/icons/custom/DatabaseAddCircle.js +4 -0
- package/lib/esm/icons/custom/DatabaseAddCircle.js.map +1 -0
- package/lib/esm/icons/custom/Drag.js +4 -0
- package/lib/esm/icons/custom/Drag.js.map +1 -0
- package/lib/esm/icons/custom/Expand.js +4 -0
- package/lib/esm/icons/custom/Expand.js.map +1 -0
- package/lib/esm/icons/custom/ExternalLink.js +4 -0
- package/lib/esm/icons/custom/ExternalLink.js.map +1 -0
- package/lib/esm/icons/custom/FitToScreen.js +4 -0
- package/lib/esm/icons/custom/FitToScreen.js.map +1 -0
- package/lib/esm/icons/custom/FolderBookmark.js +4 -0
- package/lib/esm/icons/custom/FolderBookmark.js.map +1 -0
- package/lib/esm/icons/custom/Heirarchy2.js +4 -0
- package/lib/esm/icons/custom/Heirarchy2.js.map +1 -0
- package/lib/esm/icons/custom/Hierarchy1.js +4 -0
- package/lib/esm/icons/custom/Hierarchy1.js.map +1 -0
- package/lib/esm/icons/custom/Pin.js +4 -0
- package/lib/esm/icons/custom/Pin.js.map +1 -0
- package/lib/esm/icons/custom/Presentation.js +4 -0
- package/lib/esm/icons/custom/Presentation.js.map +1 -0
- package/lib/esm/icons/custom/Rhombus.js +4 -0
- package/lib/esm/icons/custom/Rhombus.js.map +1 -0
- package/lib/esm/icons/custom/Shrink.js +4 -0
- package/lib/esm/icons/custom/Shrink.js.map +1 -0
- package/lib/esm/icons/custom/Text.js +4 -0
- package/lib/esm/icons/custom/Text.js.map +1 -0
- package/lib/esm/icons/custom/Triangle.js +4 -0
- package/lib/esm/icons/custom/Triangle.js.map +1 -0
- package/lib/esm/icons/custom/index.js +36 -0
- package/lib/esm/icons/custom/index.js.map +1 -0
- package/lib/esm/icons/index.js +23 -0
- package/lib/esm/icons/index.js.map +1 -0
- package/lib/esm/index.js +35 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/input/Input.js +55 -0
- package/lib/esm/input/Input.js.map +1 -0
- package/lib/esm/input/index.js +22 -0
- package/lib/esm/input/index.js.map +1 -0
- package/lib/esm/label/Label.js +97 -0
- package/lib/esm/label/Label.js.map +1 -0
- package/lib/esm/label/index.js +22 -0
- package/lib/esm/label/index.js.map +1 -0
- package/lib/esm/loading-spinner/LoadingSpinner.js +48 -0
- package/lib/esm/loading-spinner/LoadingSpinner.js.map +1 -0
- package/lib/esm/loading-spinner/index.js +22 -0
- package/lib/esm/loading-spinner/index.js.map +1 -0
- package/lib/esm/popover/Popover.js +184 -0
- package/lib/esm/popover/Popover.js.map +1 -0
- package/lib/esm/popover/index.js +22 -0
- package/lib/esm/popover/index.js.map +1 -0
- package/lib/esm/progress-bar/ProgressBar.js +41 -0
- package/lib/esm/progress-bar/ProgressBar.js.map +1 -0
- package/lib/esm/progress-bar/index.js +22 -0
- package/lib/esm/progress-bar/index.js.map +1 -0
- package/lib/esm/radio/Radio.js +43 -0
- package/lib/esm/radio/Radio.js.map +1 -0
- package/lib/esm/radio/index.js +22 -0
- package/lib/esm/radio/index.js.map +1 -0
- package/lib/esm/switch/Switch.js +43 -0
- package/lib/esm/switch/Switch.js.map +1 -0
- package/lib/esm/switch/index.js +22 -0
- package/lib/esm/switch/index.js.map +1 -0
- package/lib/esm/tabs/Tabs.js +76 -0
- package/lib/esm/tabs/Tabs.js.map +1 -0
- package/lib/esm/tabs/index.js +22 -0
- package/lib/esm/tabs/index.js.map +1 -0
- package/lib/esm/tag/Tag.js +62 -0
- package/lib/esm/tag/Tag.js.map +1 -0
- package/lib/esm/tag/index.js +22 -0
- package/lib/esm/tag/index.js.map +1 -0
- package/lib/esm/tooltip/Tooltip.js +41 -0
- package/lib/esm/tooltip/Tooltip.js.map +1 -0
- package/lib/esm/tooltip/index.js +22 -0
- package/lib/esm/tooltip/index.js.map +1 -0
- package/lib/esm/view-selector/ViewSelector.js +60 -0
- package/lib/esm/view-selector/ViewSelector.js.map +1 -0
- package/lib/esm/view-selector/index.js +22 -0
- package/lib/esm/view-selector/index.js.map +1 -0
- package/lib/types/alert/Alert.d.ts +75 -0
- package/lib/types/alert/index.d.ts +21 -0
- package/lib/types/button/Button.d.ts +52 -0
- package/lib/types/button/index.d.ts +21 -0
- package/lib/types/checkbox/Checkbox.d.ts +39 -0
- package/lib/types/checkbox/index.d.ts +21 -0
- package/lib/types/context-menu/ContextMenu.d.ts +65 -0
- package/lib/types/context-menu/index.d.ts +21 -0
- package/lib/types/helpers/debounce.d.ts +24 -0
- package/lib/types/helpers/forwardRef.d.ts +24 -0
- package/lib/types/helpers/index.d.ts +23 -0
- package/lib/types/helpers/testing.d.ts +28 -0
- package/lib/types/helpers/types.d.ts +25 -0
- package/lib/types/icons/Custom.d.ts +27 -0
- package/lib/types/icons/Hero.d.ts +28 -0
- package/lib/types/icons/custom/Circle.d.ts +23 -0
- package/lib/types/icons/custom/DatabaseAddCircle.d.ts +23 -0
- package/lib/types/icons/custom/Drag.d.ts +23 -0
- package/lib/types/icons/custom/Expand.d.ts +23 -0
- package/lib/types/icons/custom/ExternalLink.d.ts +23 -0
- package/lib/types/icons/custom/FitToScreen.d.ts +23 -0
- package/lib/types/icons/custom/FolderBookmark.d.ts +23 -0
- package/lib/types/icons/custom/Heirarchy2.d.ts +23 -0
- package/lib/types/icons/custom/Hierarchy1.d.ts +23 -0
- package/lib/types/icons/custom/Pin.d.ts +23 -0
- package/lib/types/icons/custom/Presentation.d.ts +23 -0
- package/lib/types/icons/custom/Rhombus.d.ts +23 -0
- package/lib/types/icons/custom/Shrink.d.ts +23 -0
- package/lib/types/icons/custom/Text.d.ts +23 -0
- package/lib/types/icons/custom/Triangle.d.ts +23 -0
- package/lib/types/icons/custom/index.d.ts +35 -0
- package/lib/types/icons/index.d.ts +22 -0
- package/lib/types/index.d.ts +34 -0
- package/lib/types/input/Input.d.ts +44 -0
- package/lib/types/input/index.d.ts +21 -0
- package/lib/types/label/Label.d.ts +41 -0
- package/lib/types/label/index.d.ts +21 -0
- package/lib/types/loading-spinner/LoadingSpinner.d.ts +41 -0
- package/lib/types/loading-spinner/index.d.ts +21 -0
- package/lib/types/popover/Popover.d.ts +70 -0
- package/lib/types/popover/index.d.ts +21 -0
- package/lib/types/progress-bar/ProgressBar.d.ts +30 -0
- package/lib/types/progress-bar/index.d.ts +21 -0
- package/lib/types/radio/Radio.d.ts +39 -0
- package/lib/types/radio/index.d.ts +21 -0
- package/lib/types/switch/Switch.d.ts +39 -0
- package/lib/types/switch/index.d.ts +21 -0
- package/lib/types/tabs/Tabs.d.ts +72 -0
- package/lib/types/tabs/index.d.ts +21 -0
- package/lib/types/tag/Tag.d.ts +61 -0
- package/lib/types/tag/index.d.ts +21 -0
- package/lib/types/tooltip/Tooltip.d.ts +29 -0
- package/lib/types/tooltip/index.d.ts +21 -0
- package/lib/types/view-selector/ViewSelector.d.ts +51 -0
- package/lib/types/view-selector/index.d.ts +21 -0
- package/package.json +3 -3
|
@@ -0,0 +1,102 @@
|
|
|
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
|
+
exports.AlertAction = void 0;
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) "Neo4j"
|
|
22
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
23
|
+
*
|
|
24
|
+
* This file is part of Neo4j.
|
|
25
|
+
*
|
|
26
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
27
|
+
* it under the terms of the GNU General Public License as published by
|
|
28
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
29
|
+
* (at your option) any later version.
|
|
30
|
+
*
|
|
31
|
+
* This program is distributed in the hope that it will be useful,
|
|
32
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
33
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
34
|
+
* GNU General Public License for more details.
|
|
35
|
+
*
|
|
36
|
+
* You should have received a copy of the GNU General Public License
|
|
37
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
38
|
+
*/
|
|
39
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
40
|
+
const react_1 = __importDefault(require("react"));
|
|
41
|
+
const icons_1 = require("../icons");
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
*
|
|
45
|
+
* Helpers
|
|
46
|
+
*
|
|
47
|
+
*
|
|
48
|
+
*/
|
|
49
|
+
const TITLE_PROPS_ERROR = 'Alert Component: expected `title` prop';
|
|
50
|
+
const NAME_PROPS_ERROR = 'Alert Component: expected `name` prop when title is not a string';
|
|
51
|
+
const getStatusIcon = (iconType) => {
|
|
52
|
+
let iconComponent;
|
|
53
|
+
switch (iconType) {
|
|
54
|
+
case 'success':
|
|
55
|
+
iconComponent = (0, jsx_runtime_1.jsx)(icons_1.HeroIcon, { iconName: "CheckCircleIcon", type: "solid" }, void 0);
|
|
56
|
+
break;
|
|
57
|
+
case 'warning':
|
|
58
|
+
iconComponent = (0, jsx_runtime_1.jsx)(icons_1.HeroIcon, { iconName: "ExclamationIcon", type: "solid" }, void 0);
|
|
59
|
+
break;
|
|
60
|
+
case 'danger':
|
|
61
|
+
iconComponent = ((0, jsx_runtime_1.jsx)(icons_1.HeroIcon, { iconName: "ExclamationCircleIcon", type: "solid" }, void 0));
|
|
62
|
+
break;
|
|
63
|
+
default:
|
|
64
|
+
iconComponent = ((0, jsx_runtime_1.jsx)(icons_1.HeroIcon, { iconName: "InformationCircleIcon", type: "solid" }, void 0));
|
|
65
|
+
}
|
|
66
|
+
return (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "alert-icon alert-status-icon" }, { children: iconComponent }), void 0);
|
|
67
|
+
};
|
|
68
|
+
const AlertAction = (_a) => {
|
|
69
|
+
var { label } = _a, props = __rest(_a, ["label"]);
|
|
70
|
+
return (0, jsx_runtime_1.jsx)("a", Object.assign({}, props, { children: label }), void 0);
|
|
71
|
+
};
|
|
72
|
+
exports.AlertAction = AlertAction;
|
|
73
|
+
const Alert = react_1.default.forwardRef(function Alert(_a, ref) {
|
|
74
|
+
var { type = 'info', icon = false, title, name, actions = [], floating = false, description = null, onClose, className = '', children = null, closeable = false } = _a, rest = __rest(_a, ["type", "icon", "title", "name", "actions", "floating", "description", "onClose", "className", "children", "closeable"]);
|
|
75
|
+
if (!title) {
|
|
76
|
+
console.error(TITLE_PROPS_ERROR);
|
|
77
|
+
}
|
|
78
|
+
if (typeof title !== 'string' && !name) {
|
|
79
|
+
console.error(NAME_PROPS_ERROR);
|
|
80
|
+
}
|
|
81
|
+
if (typeof title === 'string' && !name) {
|
|
82
|
+
name = title;
|
|
83
|
+
}
|
|
84
|
+
const classes = (0, classnames_1.default)(`ndl-alert`, {
|
|
85
|
+
['with-description']: description,
|
|
86
|
+
['info']: type === 'info',
|
|
87
|
+
['success']: type === 'success',
|
|
88
|
+
['warning']: type === 'warning',
|
|
89
|
+
['danger']: type === 'danger',
|
|
90
|
+
['floating']: floating,
|
|
91
|
+
[className]: className && className !== '',
|
|
92
|
+
});
|
|
93
|
+
const TitleTag = description || children ? 'h5' : 'div';
|
|
94
|
+
const handleClose = (e) => {
|
|
95
|
+
if (onClose && typeof onClose === 'function') {
|
|
96
|
+
onClose(e);
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: classes, role: closeable ? 'alertdialog' : 'alert' }, rest, { title: name, ref: ref }, { children: [icon && getStatusIcon(type), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "alert-content" }, { children: [(0, jsx_runtime_1.jsxs)(TitleTag, Object.assign({ className: "alert-title" }, { children: [(0, jsx_runtime_1.jsx)("div", { children: title }, void 0), closeable && ((0, jsx_runtime_1.jsx)("div", Object.assign({ tabIndex: 0, role: "button", className: "alert-icon close-icon", onKeyDown: handleClose, onClick: handleClose, "aria-label": "close-alert" }, { children: (0, jsx_runtime_1.jsx)(icons_1.HeroIcon, { iconName: "XIcon" }, void 0) }), void 0))] }), void 0), (description || children) && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "alert-description" }, { children: children || description }), void 0)), actions && actions.length > 0 && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "alert-actions" }, { children: actions.map((action, index) => ((0, jsx_runtime_1.jsx)(exports.AlertAction, Object.assign({}, action), index))) }), void 0))] }), void 0)] }), void 0));
|
|
100
|
+
});
|
|
101
|
+
exports.default = Alert;
|
|
102
|
+
//# sourceMappingURL=Alert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Alert.js","sourceRoot":"","sources":["../../../src/alert/Alert.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,4DAAoC;AACpC,kDAA0B;AAC1B,oCAAoC;AA4EpC;;;;;;GAMG;AAEH,MAAM,iBAAiB,GAAG,wCAAwC,CAAC;AACnE,MAAM,gBAAgB,GACpB,kEAAkE,CAAC;AAErE,MAAM,aAAa,GAAG,CAAC,QAAmB,EAAE,EAAE;IAC5C,IAAI,aAAiC,CAAC;IAEtC,QAAQ,QAAQ,EAAE;QAChB,KAAK,SAAS;YACZ,aAAa,GAAG,uBAAC,gBAAQ,IAAC,QAAQ,EAAC,iBAAiB,EAAC,IAAI,EAAC,OAAO,WAAG,CAAC;YACrE,MAAM;QACR,KAAK,SAAS;YACZ,aAAa,GAAG,uBAAC,gBAAQ,IAAC,QAAQ,EAAC,iBAAiB,EAAC,IAAI,EAAC,OAAO,WAAG,CAAC;YACrE,MAAM;QACR,KAAK,QAAQ;YACX,aAAa,GAAG,CACd,uBAAC,gBAAQ,IAAC,QAAQ,EAAC,uBAAuB,EAAC,IAAI,EAAC,OAAO,WAAG,CAC3D,CAAC;YACF,MAAM;QACR;YACE,aAAa,GAAG,CACd,uBAAC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AAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CAC9B,uBAAC,mBAAW,oBAAiB,MAAM,GAAjB,KAAK,CAAgB,CACxC,CAAC,YACE,CACP,aACG,aACF,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,kBAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
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.AlertAction = exports.Alert = void 0;
|
|
27
|
+
var Alert_1 = require("./Alert");
|
|
28
|
+
Object.defineProperty(exports, "Alert", { enumerable: true, get: function () { return __importDefault(Alert_1).default; } });
|
|
29
|
+
Object.defineProperty(exports, "AlertAction", { enumerable: true, get: function () { return Alert_1.AlertAction; } });
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/alert/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,iCAAwD;AAA/C,+GAAA,OAAO,OAAS;AAAE,oGAAA,WAAW,OAAA"}
|
|
@@ -0,0 +1,116 @@
|
|
|
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
|
+
exports.Button = exports.removeSpaces = exports.removeNewlines = void 0;
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) "Neo4j"
|
|
22
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
23
|
+
*
|
|
24
|
+
* This file is part of Neo4j.
|
|
25
|
+
*
|
|
26
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
27
|
+
* it under the terms of the GNU General Public License as published by
|
|
28
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
29
|
+
* (at your option) any later version.
|
|
30
|
+
*
|
|
31
|
+
* This program is distributed in the hope that it will be useful,
|
|
32
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
33
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
34
|
+
* GNU General Public License for more details.
|
|
35
|
+
*
|
|
36
|
+
* You should have received a copy of the GNU General Public License
|
|
37
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
38
|
+
*/
|
|
39
|
+
const react_1 = __importDefault(require("react"));
|
|
40
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
41
|
+
const loading_spinner_1 = require("../loading-spinner");
|
|
42
|
+
const removeNewlines = (input) => input.replace(/(\r\n|\n|\r)/gm, '');
|
|
43
|
+
exports.removeNewlines = removeNewlines;
|
|
44
|
+
/** Remove extra spaces from sting */
|
|
45
|
+
const removeSpaces = (input) => input.replace(/\s+/g, ' ').trim();
|
|
46
|
+
exports.removeSpaces = removeSpaces;
|
|
47
|
+
exports.Button = react_1.default.forwardRef(function Button(_a, ref) {
|
|
48
|
+
var { children, as, type = 'button', loading = false, color = 'primary', disabled = false, fill = 'filled', rectangle = false, buttonSize = 'regular', className, onClick, tabIndex = 0 } = _a, props = __rest(_a, ["children", "as", "type", "loading", "color", "disabled", "fill", "rectangle", "buttonSize", "className", "onClick", "tabIndex"]);
|
|
49
|
+
let Component = as || 'button';
|
|
50
|
+
if (!as && props.href) {
|
|
51
|
+
Component = 'a';
|
|
52
|
+
}
|
|
53
|
+
const interactable = !disabled && !loading;
|
|
54
|
+
const classes = (0, classnames_1.default)(`ndl-btn ${fill} ${buttonSize}`, {
|
|
55
|
+
disabled: disabled,
|
|
56
|
+
loading: loading,
|
|
57
|
+
rectangle: rectangle,
|
|
58
|
+
/** Now check button is outlined or filled */
|
|
59
|
+
/**
|
|
60
|
+
* Notice:
|
|
61
|
+
* "Hover" here does not exist for "warning" and "success"
|
|
62
|
+
* and is custom for Neutral
|
|
63
|
+
*/
|
|
64
|
+
[`
|
|
65
|
+
${color === 'neutral'
|
|
66
|
+
? `n-bg-light-${color}-bg-strongest`
|
|
67
|
+
: `n-bg-light-${color}-bg-strong`}
|
|
68
|
+
${interactable && `hover:n-bg-light-${color}-hover-strong`}
|
|
69
|
+
`]: fill === 'filled',
|
|
70
|
+
[`
|
|
71
|
+
n-text-light-${color}-text
|
|
72
|
+
${interactable && `hover:n-bg-light-${color}-hover-weak`}
|
|
73
|
+
n-border-light-${color}-bg-strong
|
|
74
|
+
`]: fill === 'outlined' && color !== 'neutral',
|
|
75
|
+
/**
|
|
76
|
+
* Neutral needs overriding as it doesn't follow
|
|
77
|
+
* the same principles with colored variations
|
|
78
|
+
*/
|
|
79
|
+
[`
|
|
80
|
+
n-text-${color}-80
|
|
81
|
+
n-bg-${color}-10
|
|
82
|
+
${interactable && `hover:n-bg-${color}-20`}
|
|
83
|
+
n-border-${color}-60
|
|
84
|
+
`]: fill === 'outlined' && color === 'neutral',
|
|
85
|
+
[`
|
|
86
|
+
n-text-${color}-50
|
|
87
|
+
${interactable && `hover:n-bg-${color}-10`}
|
|
88
|
+
`]: fill === 'text' && color !== 'neutral',
|
|
89
|
+
[`
|
|
90
|
+
n-text-light-neutral-text-weak
|
|
91
|
+
${interactable && `hover:n-bg-light-neutral-bg-default`}
|
|
92
|
+
`]: fill === 'text' && color == 'neutral',
|
|
93
|
+
});
|
|
94
|
+
const sanitisedClasses = (0, exports.removeSpaces)((0, exports.removeNewlines)(classes));
|
|
95
|
+
const handleClick = (e) => {
|
|
96
|
+
if (!interactable) {
|
|
97
|
+
// By default, a <button /> element with disabled set to true will not get its
|
|
98
|
+
// on click handler called. To support the same behavior on <a /> tags we
|
|
99
|
+
// swallow the event here when disabled, since the <a /> tag with disabled set to
|
|
100
|
+
// true will have its onClick handler called
|
|
101
|
+
e.preventDefault();
|
|
102
|
+
e.stopPropagation();
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
if (onClick) {
|
|
106
|
+
onClick(e);
|
|
107
|
+
}
|
|
108
|
+
else if (!props.href) {
|
|
109
|
+
console.error('onClick was not provided');
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
return ((0, jsx_runtime_1.jsxs)(Component
|
|
113
|
+
/** First props and then className to avoid overriding in classNames */
|
|
114
|
+
, Object.assign({}, props, (Component === 'button' ? { type } : {}), { onClick: handleClick, disabled: !interactable, className: [sanitisedClasses, className].join(' '), ref: ref, tabIndex: !interactable ? -1 : tabIndex }, { children: [loading ? ((0, jsx_runtime_1.jsx)(loading_spinner_1.LoadingSpinner, { className: "n-my-auto n-mr-1", size: "small" }, void 0)) : null, children] }), void 0));
|
|
115
|
+
});
|
|
116
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/button/Button.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,kDAA0B;AAC1B,4DAAoC;AAEpC,wDAAoD;AAG7C,MAAM,cAAc,GAAG,CAAC,KAAa,EAAE,EAAE,CAC9C,KAAK,CAAC,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC;AADzB,QAAA,cAAc,kBACW;AAEtC,qCAAqC;AAC9B,MAAM,YAAY,GAAG,CAAC,KAAa,EAAE,EAAE,CAC5C,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AADvB,QAAA,YAAY,gBACW;AA8BvB,QAAA,MAAM,GAAG,eAAK,CAAC,UAAU,CAAC,SAAS,MAAM,CACpD,EAcc,EACd,GAAG;QAfH,EACE,QAAQ,EACR,EAAE,EACF,IAAI,GAAG,QAAQ,EACf,OAAO,GAAG,KAAK,EACf,KAAK,GAAG,SAAS,EACjB,QAAQ,GAAG,KAAK,EAChB,IAAI,GAAG,QAAQ,EACf,SAAS,GAAG,KAAK,EACjB,UAAU,GAAG,SAAS,EACtB,SAAS,EACT,OAAO,EACP,QAAQ,GAAG,CAAC,OAEA,EADT,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W,GAAG,CAAC,CAAkD,EAAE,EAAE;QACzE,IAAI,CAAC,YAAY,EAAE;YACjB,8EAA8E;YAC9E,yEAAyE;YACzE,iFAAiF;YACjF,4CAA4C;YAC5C,CAAC,CAAC,cAAc,EAAE,CAAC;YACnB,CAAC,CAAC,eAAe,EAAE,CAAC;YACpB,OAAO;SACR;QAED,IAAI,OAAO,EAAE;YACX,OAAO,CAAC,CAAC,CAAC,CAAC;SACZ;aAAM,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;YACtB,OAAO,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;SAC3C;IACH,CAAC,CAAC;IAEF,OAAO,CACL,wBAAC,SAAS;IACR,uEAAuE;wBACnE,KAAK,EAEL,CAAC,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,IAC5C,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,CAAC,YAAY,EACvB,SAAS,EAAE,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAClD,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,iBAEtC,OAAO,CAAC,CAAC,CAAC,CACT,uBAAC,gCAAc,IAAC,SAAS,EAAC,kBAAkB,EAAC,IAAI,EAAC,OAAO,WAAG,CAC7D,CAAC,CAAC,CAAC,IAAI,EACP,QAAQ,aACC,CACb,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
25
|
+
}) : (function(o, m, k, k2) {
|
|
26
|
+
if (k2 === undefined) k2 = k;
|
|
27
|
+
o[k2] = m[k];
|
|
28
|
+
}));
|
|
29
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
30
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
31
|
+
};
|
|
32
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
+
__exportStar(require("./Button"), exports);
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/button/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;AAEH,2CAAyB"}
|
|
@@ -0,0 +1,52 @@
|
|
|
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
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* Copyright (c) "Neo4j"
|
|
10
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
11
|
+
*
|
|
12
|
+
* This file is part of Neo4j.
|
|
13
|
+
*
|
|
14
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
15
|
+
* it under the terms of the GNU General Public License as published by
|
|
16
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
17
|
+
* (at your option) any later version.
|
|
18
|
+
*
|
|
19
|
+
* This program is distributed in the hope that it will be useful,
|
|
20
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
21
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
22
|
+
* GNU General Public License for more details.
|
|
23
|
+
*
|
|
24
|
+
* You should have received a copy of the GNU General Public License
|
|
25
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
26
|
+
*/
|
|
27
|
+
const react_1 = __importDefault(require("react"));
|
|
28
|
+
const input_1 = require("../input");
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
*
|
|
32
|
+
* Helpers
|
|
33
|
+
*
|
|
34
|
+
*
|
|
35
|
+
*/
|
|
36
|
+
/** Add any helper functions here. */
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
*
|
|
40
|
+
* Checkbox Component
|
|
41
|
+
*
|
|
42
|
+
*
|
|
43
|
+
*/
|
|
44
|
+
const Checkbox = react_1.default.forwardRef((props, ref) => {
|
|
45
|
+
if (!props['aria-label'] && !props.label) {
|
|
46
|
+
console.warn('To be accesible the input component requires either `aria-label` or `label` prop: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI');
|
|
47
|
+
}
|
|
48
|
+
return (0, jsx_runtime_1.jsx)(input_1.Input, Object.assign({}, props, { ref: ref, type: "checkbox", role: "checkbox" }), void 0);
|
|
49
|
+
});
|
|
50
|
+
Checkbox.displayName = 'Checkbox';
|
|
51
|
+
exports.default = Checkbox;
|
|
52
|
+
//# sourceMappingURL=Checkbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../src/checkbox/Checkbox.tsx"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,kDAA0B;AAC1B,oCAAiC;AAGjC;;;;;;GAMG;AAEH,qCAAqC;AAErC;;;;;;GAMG;AAEH,MAAM,QAAQ,GAAG,eAAK,CAAC,UAAU,CAC/B,CAAC,KAAiB,EAAE,GAAyC,EAAE,EAAE;IAC/D,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE;QACxC,OAAO,CAAC,IAAI,CACV,sJAAsJ,CACvJ,CAAC;KACH;IAED,OAAO,uBAAC,aAAK,oBAAK,KAAK,IAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAC,UAAU,EAAC,IAAI,EAAC,UAAU,YAAG,CAAC;AACxE,CAAC,CACF,CAAC;AAEF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC;AAElC,kBAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
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.Checkbox = void 0;
|
|
27
|
+
var Checkbox_1 = require("./Checkbox");
|
|
28
|
+
Object.defineProperty(exports, "Checkbox", { enumerable: true, get: function () { return __importDefault(Checkbox_1).default; } });
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/checkbox/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,uCAAiD;AAAxC,qHAAA,OAAO,OAAY"}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
22
|
+
var t = {};
|
|
23
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
24
|
+
t[p] = s[p];
|
|
25
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
26
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
27
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
28
|
+
t[p[i]] = s[p[i]];
|
|
29
|
+
}
|
|
30
|
+
return t;
|
|
31
|
+
};
|
|
32
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
33
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
34
|
+
};
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.MenuHeader = exports.MenuItem = exports.MenuItems = exports.Menu = void 0;
|
|
37
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* Copyright (c) "Neo4j"
|
|
41
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
42
|
+
*
|
|
43
|
+
* This file is part of Neo4j.
|
|
44
|
+
*
|
|
45
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
46
|
+
* it under the terms of the GNU General Public License as published by
|
|
47
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
48
|
+
* (at your option) any later version.
|
|
49
|
+
*
|
|
50
|
+
* This program is distributed in the hope that it will be useful,
|
|
51
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
52
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
53
|
+
* GNU General Public License for more details.
|
|
54
|
+
*
|
|
55
|
+
* You should have received a copy of the GNU General Public License
|
|
56
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
57
|
+
*/
|
|
58
|
+
const react_1 = __importStar(require("react"));
|
|
59
|
+
const icons_1 = require("../icons");
|
|
60
|
+
const popover_1 = require("../popover");
|
|
61
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
62
|
+
const MenuContext = react_1.default.createContext(null);
|
|
63
|
+
const useMenuContext = () => {
|
|
64
|
+
const context = (0, react_1.useContext)(MenuContext);
|
|
65
|
+
if (context === null) {
|
|
66
|
+
throw new Error('Menu used without context. Did you render this component inside a <Menu />?');
|
|
67
|
+
}
|
|
68
|
+
return context;
|
|
69
|
+
};
|
|
70
|
+
exports.Menu = (0, react_1.forwardRef)(function Menu(_a, ref) {
|
|
71
|
+
var { menuSize = 'small', className, minWidth = 250, open, onClose, children } = _a, rest = __rest(_a, ["menuSize", "className", "minWidth", "open", "onClose", "children"]);
|
|
72
|
+
const menuRef = (0, react_1.useRef)();
|
|
73
|
+
const focusFirstMenuItem = (0, react_1.useCallback)(() => {
|
|
74
|
+
const menu = menuRef.current;
|
|
75
|
+
if (!menu)
|
|
76
|
+
return;
|
|
77
|
+
const items = menu.querySelectorAll(':scope > .menu-items > .menu-item');
|
|
78
|
+
if (items.length === 0) {
|
|
79
|
+
menu.focus();
|
|
80
|
+
}
|
|
81
|
+
items[0].focus();
|
|
82
|
+
}, []);
|
|
83
|
+
// Override ref to map to internal ref
|
|
84
|
+
// as well as change focus to focus the
|
|
85
|
+
// first menu item
|
|
86
|
+
(0, react_1.useImperativeHandle)(ref, () => {
|
|
87
|
+
const menu = menuRef.current;
|
|
88
|
+
if (!menu) {
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
return Object.assign(Object.assign({}, menu), { focus: focusFirstMenuItem });
|
|
92
|
+
});
|
|
93
|
+
// Focus first menu item on open.
|
|
94
|
+
// This effect is separate from the above
|
|
95
|
+
// `setPositiongStyles` effect as the above
|
|
96
|
+
// is triggered on every render usually as
|
|
97
|
+
// anchorOrigin and transformOrigin
|
|
98
|
+
// are typically not memoized
|
|
99
|
+
(0, react_1.useEffect)(() => {
|
|
100
|
+
if (open) {
|
|
101
|
+
focusFirstMenuItem();
|
|
102
|
+
}
|
|
103
|
+
}, [open, focusFirstMenuItem]);
|
|
104
|
+
const classes = (0, classnames_1.default)('ndl-menu', menuSize, className);
|
|
105
|
+
return ((0, jsx_runtime_1.jsx)(MenuContext.Provider, Object.assign({ value: { onClose } }, { children: (0, jsx_runtime_1.jsx)(popover_1.Popover, Object.assign({ tabIndex: -1 }, rest, { open: open, style: Object.assign({ minWidth }, (rest.style || {})), className: classes, ref: menuRef, onClose: onClose }, { children: children }), void 0) }), void 0));
|
|
106
|
+
});
|
|
107
|
+
const getMenuItem = (menuItems, iterator) => {
|
|
108
|
+
const activeElement = document.activeElement;
|
|
109
|
+
let newEl = iterator(menuItems, activeElement);
|
|
110
|
+
let menuItem = null;
|
|
111
|
+
// Iterate over next element until we find a menu item
|
|
112
|
+
// Iterate a maximum of 10 times looking for an element
|
|
113
|
+
for (let i = 0; i < 10; i++) {
|
|
114
|
+
// Can't find new element, break
|
|
115
|
+
if (!newEl) {
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
const role = newEl.getAttribute('role');
|
|
119
|
+
if (role === 'menuitem') {
|
|
120
|
+
menuItem = newEl;
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
newEl = iterator(menuItems, newEl);
|
|
124
|
+
}
|
|
125
|
+
return menuItem;
|
|
126
|
+
};
|
|
127
|
+
// Gets next sibling child of the menu items, looping at the end
|
|
128
|
+
const nextElement = (menuItems, currentEl) => {
|
|
129
|
+
if (currentEl === menuItems || !(currentEl === null || currentEl === void 0 ? void 0 : currentEl.nextElementSibling)) {
|
|
130
|
+
return menuItems.firstChild ? menuItems.firstChild : null;
|
|
131
|
+
}
|
|
132
|
+
else if (currentEl === null || currentEl === void 0 ? void 0 : currentEl.nextElementSibling) {
|
|
133
|
+
return currentEl.nextElementSibling;
|
|
134
|
+
}
|
|
135
|
+
return null;
|
|
136
|
+
};
|
|
137
|
+
// Gets prev sibling child of the menu items, looping at the top
|
|
138
|
+
const prevElement = (menuItems, currentEl) => {
|
|
139
|
+
if (currentEl === menuItems || !(currentEl === null || currentEl === void 0 ? void 0 : currentEl.previousElementSibling)) {
|
|
140
|
+
return menuItems.lastChild ? menuItems.lastChild : null;
|
|
141
|
+
}
|
|
142
|
+
else if (currentEl === null || currentEl === void 0 ? void 0 : currentEl.previousElementSibling) {
|
|
143
|
+
return currentEl.previousElementSibling;
|
|
144
|
+
}
|
|
145
|
+
return null;
|
|
146
|
+
};
|
|
147
|
+
exports.MenuItems = (0, react_1.forwardRef)(function MenuItems(_a, ref) {
|
|
148
|
+
var { as = 'ul', children, className } = _a, rest = __rest(_a, ["as", "children", "className"]);
|
|
149
|
+
const menuItemsRef = (0, react_1.useRef)();
|
|
150
|
+
const { onClose } = useMenuContext();
|
|
151
|
+
const handleKeyDown = (event) => {
|
|
152
|
+
const menuItems = menuItemsRef.current;
|
|
153
|
+
if (!menuItems) {
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
if (event.key == 'ArrowDown') {
|
|
157
|
+
event.preventDefault();
|
|
158
|
+
event.stopPropagation();
|
|
159
|
+
const newFocusedElement = getMenuItem(menuItems, nextElement);
|
|
160
|
+
newFocusedElement === null || newFocusedElement === void 0 ? void 0 : newFocusedElement.focus();
|
|
161
|
+
}
|
|
162
|
+
else if (event.key == 'ArrowUp') {
|
|
163
|
+
event.preventDefault();
|
|
164
|
+
event.stopPropagation();
|
|
165
|
+
const newFocusedElement = getMenuItem(menuItems, prevElement);
|
|
166
|
+
newFocusedElement === null || newFocusedElement === void 0 ? void 0 : newFocusedElement.focus();
|
|
167
|
+
}
|
|
168
|
+
else if (event.key == 'Tab' || event.key == 'Escape') {
|
|
169
|
+
event.preventDefault();
|
|
170
|
+
onClose && onClose(event);
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
(0, react_1.useImperativeHandle)(ref, () => menuItemsRef.current);
|
|
174
|
+
const Component = as;
|
|
175
|
+
const classes = (0, classnames_1.default)('menu-items', className);
|
|
176
|
+
return ((0, jsx_runtime_1.jsx)(Component, Object.assign({ tabIndex: -1, onKeyDown: handleKeyDown, role: "menu" }, rest, { className: classes, ref: menuItemsRef }, { children: children }), void 0));
|
|
177
|
+
});
|
|
178
|
+
exports.MenuItem = (0, react_1.forwardRef)(function MenuItem(_a, ref) {
|
|
179
|
+
var { as = 'li', icon, title, description, className, disabled = false, onClick, onKeyDown } = _a, rest = __rest(_a, ["as", "icon", "title", "description", "className", "disabled", "onClick", "onKeyDown"]);
|
|
180
|
+
const Component = as;
|
|
181
|
+
const classes = (0, classnames_1.default)(`menu-item n-flex n-flex-col`, className, {
|
|
182
|
+
disabled,
|
|
183
|
+
});
|
|
184
|
+
const handleClick = (e) => {
|
|
185
|
+
if (disabled) {
|
|
186
|
+
e.preventDefault();
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
if (onClick)
|
|
190
|
+
onClick(e);
|
|
191
|
+
};
|
|
192
|
+
const handleKeyDown = (e) => {
|
|
193
|
+
if (onKeyDown)
|
|
194
|
+
onKeyDown(e);
|
|
195
|
+
if (e.key === 'Enter') {
|
|
196
|
+
if (disabled) {
|
|
197
|
+
e.preventDefault();
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
if (onClick)
|
|
201
|
+
onClick(e);
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
return ((0, jsx_runtime_1.jsxs)(Component, Object.assign({ tabIndex: -1, role: "menuitem" }, rest, { className: classes, onClick: handleClick, onKeyDown: handleKeyDown, ref: ref }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "n-flex n-items-center" }, { children: [icon && (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "menu-item-icon" }, { children: icon }), void 0), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "menu-item-title" }, { children: title }), void 0)] }), void 0), description && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "menu-item-description" }, { children: description }), void 0))] }), void 0));
|
|
205
|
+
});
|
|
206
|
+
exports.MenuHeader = (0, react_1.forwardRef)(function MenuHeader(_a, ref) {
|
|
207
|
+
var { as = 'div', title, description, className } = _a, rest = __rest(_a, ["as", "title", "description", "className"]);
|
|
208
|
+
const Component = as;
|
|
209
|
+
const { onClose } = useMenuContext();
|
|
210
|
+
const handleClose = (e) => onClose && onClose(e);
|
|
211
|
+
const classes = (0, classnames_1.default)('menu-header n-flex n-flex-col', className);
|
|
212
|
+
return ((0, jsx_runtime_1.jsxs)(Component, Object.assign({}, rest, { className: classes, ref: ref }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "n-flex n-justify-between n-items-center" }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: "menu-header-title" }, { children: title }), void 0), (0, jsx_runtime_1.jsx)("div", Object.assign({ tabIndex: 0, role: "button", onKeyDown: handleClose, onClick: handleClose, className: "menu-header-icon" }, { children: (0, jsx_runtime_1.jsx)(icons_1.HeroIcon, { iconName: "XIcon" }, void 0) }), void 0)] }), void 0), description && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "menu-header-description" }, { children: description }), void 0))] }), void 0));
|
|
213
|
+
});
|
|
214
|
+
//# sourceMappingURL=ContextMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContextMenu.js","sourceRoot":"","sources":["../../../src/context-menu/ContextMenu.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,+CAOe;AACf,oCAAoC;AACpC,wCAAmD;AACnD,4DAAoC;AAiBpC,MAAM,WAAW,GAAG,eAAK,CAAC,aA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