@neo4j-ndl/react 0.1.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/LICENSE +674 -0
- package/lib/alert/Alert.d.ts +70 -0
- package/lib/alert/Alert.js +114 -0
- package/lib/alert/Alert.js.map +1 -0
- package/lib/alert/index.d.ts +21 -0
- package/lib/alert/index.js +34 -0
- package/lib/alert/index.js.map +1 -0
- package/lib/button/Button.d.ts +52 -0
- package/lib/button/Button.js +110 -0
- package/lib/button/Button.js.map +1 -0
- package/lib/button/index.d.ts +21 -0
- package/lib/button/index.js +34 -0
- package/lib/button/index.js.map +1 -0
- package/lib/checkbox/Checkbox.d.ts +39 -0
- package/lib/checkbox/Checkbox.js +59 -0
- package/lib/checkbox/Checkbox.js.map +1 -0
- package/lib/checkbox/index.d.ts +21 -0
- package/lib/checkbox/index.js +33 -0
- package/lib/checkbox/index.js.map +1 -0
- package/lib/context-menu/ContextMenu.d.ts +65 -0
- package/lib/context-menu/ContextMenu.js +228 -0
- package/lib/context-menu/ContextMenu.js.map +1 -0
- package/lib/context-menu/index.d.ts +21 -0
- package/lib/context-menu/index.js +34 -0
- package/lib/context-menu/index.js.map +1 -0
- package/lib/helpers/debounce.d.ts +24 -0
- package/lib/helpers/debounce.js +47 -0
- package/lib/helpers/debounce.js.map +1 -0
- package/lib/helpers/index.d.ts +22 -0
- package/lib/helpers/index.js +35 -0
- package/lib/helpers/index.js.map +1 -0
- package/lib/helpers/types.d.ts +25 -0
- package/lib/helpers/types.js +23 -0
- package/lib/helpers/types.js.map +1 -0
- package/lib/icons/Custom.d.ts +27 -0
- package/lib/icons/Custom.js +77 -0
- package/lib/icons/Custom.js.map +1 -0
- package/lib/icons/Hero.d.ts +28 -0
- package/lib/icons/Hero.js +89 -0
- package/lib/icons/Hero.js.map +1 -0
- package/lib/icons/custom/Circle.d.ts +23 -0
- package/lib/icons/custom/Circle.js +57 -0
- package/lib/icons/custom/Circle.js.map +1 -0
- package/lib/icons/custom/DatabaseAddCircle.d.ts +23 -0
- package/lib/icons/custom/DatabaseAddCircle.js +57 -0
- package/lib/icons/custom/DatabaseAddCircle.js.map +1 -0
- package/lib/icons/custom/Drag.d.ts +23 -0
- package/lib/icons/custom/Drag.js +62 -0
- package/lib/icons/custom/Drag.js.map +1 -0
- package/lib/icons/custom/Expand.d.ts +23 -0
- package/lib/icons/custom/Expand.js +57 -0
- package/lib/icons/custom/Expand.js.map +1 -0
- package/lib/icons/custom/ExternalLink.d.ts +23 -0
- package/lib/icons/custom/ExternalLink.js +57 -0
- package/lib/icons/custom/ExternalLink.js.map +1 -0
- package/lib/icons/custom/FitToScreen.d.ts +23 -0
- package/lib/icons/custom/FitToScreen.js +57 -0
- package/lib/icons/custom/FitToScreen.js.map +1 -0
- package/lib/icons/custom/FolderBookmark.d.ts +23 -0
- package/lib/icons/custom/FolderBookmark.js +57 -0
- package/lib/icons/custom/FolderBookmark.js.map +1 -0
- package/lib/icons/custom/Heirarchy2.d.ts +23 -0
- package/lib/icons/custom/Heirarchy2.js +57 -0
- package/lib/icons/custom/Heirarchy2.js.map +1 -0
- package/lib/icons/custom/Hierarchy1.d.ts +23 -0
- package/lib/icons/custom/Hierarchy1.js +57 -0
- package/lib/icons/custom/Hierarchy1.js.map +1 -0
- package/lib/icons/custom/Pin.d.ts +23 -0
- package/lib/icons/custom/Pin.js +57 -0
- package/lib/icons/custom/Pin.js.map +1 -0
- package/lib/icons/custom/Presentation.d.ts +23 -0
- package/lib/icons/custom/Presentation.js +57 -0
- package/lib/icons/custom/Presentation.js.map +1 -0
- package/lib/icons/custom/Rhombus.d.ts +23 -0
- package/lib/icons/custom/Rhombus.js +57 -0
- package/lib/icons/custom/Rhombus.js.map +1 -0
- package/lib/icons/custom/Shrink.d.ts +23 -0
- package/lib/icons/custom/Shrink.js +57 -0
- package/lib/icons/custom/Shrink.js.map +1 -0
- package/lib/icons/custom/Text.d.ts +23 -0
- package/lib/icons/custom/Text.js +57 -0
- package/lib/icons/custom/Text.js.map +1 -0
- package/lib/icons/custom/Triangle.d.ts +23 -0
- package/lib/icons/custom/Triangle.js +57 -0
- package/lib/icons/custom/Triangle.js.map +1 -0
- package/lib/icons/custom/index.d.ts +35 -0
- package/lib/icons/custom/index.js +61 -0
- package/lib/icons/custom/index.js.map +1 -0
- package/lib/icons/index.d.ts +22 -0
- package/lib/icons/index.js +35 -0
- package/lib/icons/index.js.map +1 -0
- package/lib/index.d.ts +30 -0
- package/lib/index.js +43 -0
- package/lib/index.js.map +1 -0
- package/lib/input/Input.d.ts +44 -0
- package/lib/input/Input.js +92 -0
- package/lib/input/Input.js.map +1 -0
- package/lib/input/index.d.ts +21 -0
- package/lib/input/index.js +33 -0
- package/lib/input/index.js.map +1 -0
- package/lib/label/Label.d.ts +41 -0
- package/lib/label/Label.js +81 -0
- package/lib/label/Label.js.map +1 -0
- package/lib/label/index.d.ts +21 -0
- package/lib/label/index.js +33 -0
- package/lib/label/index.js.map +1 -0
- package/lib/loading-spinner/LoadingSpinner.d.ts +41 -0
- package/lib/loading-spinner/LoadingSpinner.js +45 -0
- package/lib/loading-spinner/LoadingSpinner.js.map +1 -0
- package/lib/loading-spinner/index.d.ts +21 -0
- package/lib/loading-spinner/index.js +33 -0
- package/lib/loading-spinner/index.js.map +1 -0
- package/lib/popover/Popover.d.ts +70 -0
- package/lib/popover/Popover.js +223 -0
- package/lib/popover/Popover.js.map +1 -0
- package/lib/popover/index.d.ts +21 -0
- package/lib/popover/index.js +34 -0
- package/lib/popover/index.js.map +1 -0
- package/lib/progress-bar/ProgressBar.d.ts +29 -0
- package/lib/progress-bar/ProgressBar.js +40 -0
- package/lib/progress-bar/ProgressBar.js.map +1 -0
- package/lib/progress-bar/index.d.ts +21 -0
- package/lib/progress-bar/index.js +33 -0
- package/lib/progress-bar/index.js.map +1 -0
- package/lib/radio/Radio.d.ts +39 -0
- package/lib/radio/Radio.js +58 -0
- package/lib/radio/Radio.js.map +1 -0
- package/lib/radio/index.d.ts +21 -0
- package/lib/radio/index.js +33 -0
- package/lib/radio/index.js.map +1 -0
- package/lib/switch/Switch.d.ts +39 -0
- package/lib/switch/Switch.js +59 -0
- package/lib/switch/Switch.js.map +1 -0
- package/lib/switch/index.d.ts +21 -0
- package/lib/switch/index.js +33 -0
- package/lib/switch/index.js.map +1 -0
- package/lib/tabs/Tabs.d.ts +72 -0
- package/lib/tabs/Tabs.js +105 -0
- package/lib/tabs/Tabs.js.map +1 -0
- package/lib/tabs/index.d.ts +21 -0
- package/lib/tabs/index.js +34 -0
- package/lib/tabs/index.js.map +1 -0
- package/lib/tag/Tag.d.ts +61 -0
- package/lib/tag/Tag.js +60 -0
- package/lib/tag/Tag.js.map +1 -0
- package/lib/tag/index.d.ts +21 -0
- package/lib/tag/index.js +33 -0
- package/lib/tag/index.js.map +1 -0
- package/lib/tooltip/Tooltip.d.ts +29 -0
- package/lib/tooltip/Tooltip.js +56 -0
- package/lib/tooltip/Tooltip.js.map +1 -0
- package/lib/tooltip/index.d.ts +21 -0
- package/lib/tooltip/index.js +33 -0
- package/lib/tooltip/index.js.map +1 -0
- package/lib/view-selector/ViewSelector.d.ts +58 -0
- package/lib/view-selector/ViewSelector.js +78 -0
- package/lib/view-selector/ViewSelector.js.map +1 -0
- package/lib/view-selector/index.d.ts +21 -0
- package/lib/view-selector/index.js +34 -0
- package/lib/view-selector/index.js.map +1 -0
- package/package.json +63 -0
|
@@ -0,0 +1,59 @@
|
|
|
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 __assign = (this && this.__assign) || function () {
|
|
23
|
+
__assign = Object.assign || function(t) {
|
|
24
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
25
|
+
s = arguments[i];
|
|
26
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
27
|
+
t[p] = s[p];
|
|
28
|
+
}
|
|
29
|
+
return t;
|
|
30
|
+
};
|
|
31
|
+
return __assign.apply(this, arguments);
|
|
32
|
+
};
|
|
33
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
34
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
35
|
+
};
|
|
36
|
+
exports.__esModule = true;
|
|
37
|
+
var react_1 = __importDefault(require("react"));
|
|
38
|
+
var input_1 = require("../input");
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
*
|
|
42
|
+
* Helpers
|
|
43
|
+
*
|
|
44
|
+
*
|
|
45
|
+
*/
|
|
46
|
+
/** Add any helper functions here. */
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
*
|
|
50
|
+
* Switch Component
|
|
51
|
+
*
|
|
52
|
+
*
|
|
53
|
+
*/
|
|
54
|
+
var Switch = react_1["default"].forwardRef(function (props, ref) {
|
|
55
|
+
return react_1["default"].createElement(input_1.Input, __assign({}, props, { ref: ref, type: "checkbox", role: "switch" }));
|
|
56
|
+
});
|
|
57
|
+
Switch.displayName = 'Switch';
|
|
58
|
+
exports["default"] = Switch;
|
|
59
|
+
//# sourceMappingURL=Switch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Switch.js","sourceRoot":"","sources":["../../src/switch/Switch.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;AAEH,gDAA0B;AAC1B,kCAAiC;AAGjC;;;;;;GAMG;AAEH,qCAAqC;AAErC;;;;;;GAMG;AAEH,IAAM,MAAM,GAAG,kBAAK,CAAC,UAAU,CAC7B,UAAC,KAAiB,EAAE,GAAgC;IAClD,OAAO,iCAAC,aAAK,eAAK,KAAK,IAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAC,UAAU,EAAC,IAAI,EAAC,QAAQ,IAAG,CAAC;AACtE,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC;AAE9B,qBAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
export { default as Switch } from './Switch';
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
exports.__esModule = true;
|
|
30
|
+
exports.Switch = void 0;
|
|
31
|
+
var Switch_1 = require("./Switch");
|
|
32
|
+
__createBinding(exports, Switch_1, "default", "Switch");
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/switch/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;AAEH,mCAA6C;AAApC,wDAAiB"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
import React from 'react';
|
|
22
|
+
declare type TabId = string | number;
|
|
23
|
+
declare type Size = 'small' | 'large';
|
|
24
|
+
declare type Fill = 'underline' | 'filled';
|
|
25
|
+
interface BaseTabsProps<T extends TabId> {
|
|
26
|
+
/**
|
|
27
|
+
* The currently active tabId
|
|
28
|
+
*/
|
|
29
|
+
value: T;
|
|
30
|
+
/**
|
|
31
|
+
* Event when a new tab is selected. Receives the newly selected
|
|
32
|
+
* tabId as the value
|
|
33
|
+
*/
|
|
34
|
+
onChange: (value: T) => void;
|
|
35
|
+
children: React.ReactNode | string;
|
|
36
|
+
fill?: Fill;
|
|
37
|
+
size?: Size;
|
|
38
|
+
className?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Replace the component rendered to wrap the tabs
|
|
41
|
+
*/
|
|
42
|
+
as?: string | React.ComponentType<any>;
|
|
43
|
+
}
|
|
44
|
+
export declare type TabsProps = BaseTabsProps<string> | BaseTabsProps<number>;
|
|
45
|
+
export declare const Tabs: ({ children, size, fill, onChange, value, className, as, }: TabsProps) => JSX.Element;
|
|
46
|
+
interface TabProps<T extends TabId> {
|
|
47
|
+
tabId: T;
|
|
48
|
+
children: React.ReactNode | string;
|
|
49
|
+
className?: string;
|
|
50
|
+
disabled?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Replace the component rendered as the tab
|
|
53
|
+
*/
|
|
54
|
+
as?: string | React.ComponentType<any>;
|
|
55
|
+
}
|
|
56
|
+
export declare const Tab: <T extends TabId = TabId>({ children, tabId, disabled, className, as, }: TabProps<T>) => JSX.Element;
|
|
57
|
+
interface TabPanelProps {
|
|
58
|
+
children: React.ReactNode | string;
|
|
59
|
+
/**
|
|
60
|
+
* The currently selected tabId. Determines if
|
|
61
|
+
* this tab is visible or not
|
|
62
|
+
*/
|
|
63
|
+
value: TabId;
|
|
64
|
+
tabId: TabId;
|
|
65
|
+
className?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Replace the component rendered as the tab panel
|
|
68
|
+
*/
|
|
69
|
+
as?: string | React.ComponentType<any>;
|
|
70
|
+
}
|
|
71
|
+
export declare const TabPanel: ({ as, children, value, tabId, className, }: TabPanelProps) => JSX.Element;
|
|
72
|
+
export {};
|
package/lib/tabs/Tabs.js
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
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 __assign = (this && this.__assign) || function () {
|
|
23
|
+
__assign = Object.assign || function(t) {
|
|
24
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
25
|
+
s = arguments[i];
|
|
26
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
27
|
+
t[p] = s[p];
|
|
28
|
+
}
|
|
29
|
+
return t;
|
|
30
|
+
};
|
|
31
|
+
return __assign.apply(this, arguments);
|
|
32
|
+
};
|
|
33
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
34
|
+
if (k2 === undefined) k2 = k;
|
|
35
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
36
|
+
}) : (function(o, m, k, k2) {
|
|
37
|
+
if (k2 === undefined) k2 = k;
|
|
38
|
+
o[k2] = m[k];
|
|
39
|
+
}));
|
|
40
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
41
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
42
|
+
}) : function(o, v) {
|
|
43
|
+
o["default"] = v;
|
|
44
|
+
});
|
|
45
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
46
|
+
if (mod && mod.__esModule) return mod;
|
|
47
|
+
var result = {};
|
|
48
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
49
|
+
__setModuleDefault(result, mod);
|
|
50
|
+
return result;
|
|
51
|
+
};
|
|
52
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
53
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
54
|
+
};
|
|
55
|
+
exports.__esModule = true;
|
|
56
|
+
exports.TabPanel = exports.Tab = exports.Tabs = void 0;
|
|
57
|
+
var react_1 = __importStar(require("react"));
|
|
58
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
59
|
+
var TabsContext = react_1["default"].createContext(null);
|
|
60
|
+
var useTabsContext = function () {
|
|
61
|
+
var context = (0, react_1.useContext)(TabsContext);
|
|
62
|
+
if (context === null) {
|
|
63
|
+
throw new Error('Tab used without context');
|
|
64
|
+
}
|
|
65
|
+
return context;
|
|
66
|
+
};
|
|
67
|
+
var getTabPanelId = function (tabId) { return "tabpanel-".concat(tabId); };
|
|
68
|
+
var getGeneralTabClasses = function (size, fill) {
|
|
69
|
+
return {
|
|
70
|
+
large: size === 'large',
|
|
71
|
+
small: size === 'small',
|
|
72
|
+
filled: fill === 'filled',
|
|
73
|
+
underline: fill === 'underline'
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
var Tabs = function (_a) {
|
|
77
|
+
var children = _a.children, _b = _a.size, size = _b === void 0 ? 'large' : _b, _c = _a.fill, fill = _c === void 0 ? 'underline' : _c, onChange = _a.onChange, value = _a.value, _d = _a.className, className = _d === void 0 ? '' : _d, _e = _a.as, as = _e === void 0 ? 'div' : _e;
|
|
78
|
+
var base = (0, classnames_1["default"])(getGeneralTabClasses(size, fill));
|
|
79
|
+
var Component = as;
|
|
80
|
+
return (react_1["default"].createElement(Component, { className: "ndl-tabs ".concat(base, " ").concat(className), role: "tablist" },
|
|
81
|
+
react_1["default"].createElement(TabsContext.Provider, { value: { value: value, size: size, fill: fill, onChange: onChange } }, children)));
|
|
82
|
+
};
|
|
83
|
+
exports.Tabs = Tabs;
|
|
84
|
+
var Tab = function (_a) {
|
|
85
|
+
var children = _a.children, tabId = _a.tabId, _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.className, className = _c === void 0 ? '' : _c, _d = _a.as, as = _d === void 0 ? 'button' : _d;
|
|
86
|
+
var _e = useTabsContext(), size = _e.size, fill = _e.fill, value = _e.value, onChange = _e.onChange;
|
|
87
|
+
var base = (0, classnames_1["default"])(__assign(__assign({}, getGeneralTabClasses(size, fill)), { selected: value === tabId, disabled: disabled }));
|
|
88
|
+
var Component = as;
|
|
89
|
+
// Cast onChange since the compiler isn't smart enough to figure out union of function's parameters
|
|
90
|
+
// https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-3.html#improved-behavior-for-calling-union-types
|
|
91
|
+
// https://stackoverflow.com/questions/55572797/why-does-typescript-expect-never-as-function-argument-when-retrieving-the-func
|
|
92
|
+
var castOnChange = onChange;
|
|
93
|
+
var handleChange = function () { return !disabled && castOnChange(tabId); };
|
|
94
|
+
return (react_1["default"].createElement(Component, { className: "tab ".concat(base, " ").concat(className), onClick: handleChange, role: "tab", "aria-controls": getTabPanelId(tabId) },
|
|
95
|
+
children,
|
|
96
|
+
fill === 'underline' && react_1["default"].createElement("span", { className: "tab-underline" })));
|
|
97
|
+
};
|
|
98
|
+
exports.Tab = Tab;
|
|
99
|
+
var TabPanel = function (_a) {
|
|
100
|
+
var _b = _a.as, as = _b === void 0 ? 'div' : _b, children = _a.children, value = _a.value, tabId = _a.tabId, _c = _a.className, className = _c === void 0 ? '' : _c;
|
|
101
|
+
var Component = as;
|
|
102
|
+
return (react_1["default"].createElement(react_1["default"].Fragment, null, value === tabId && (react_1["default"].createElement(Component, { role: "tabpanel", id: getTabPanelId(tabId), className: className }, children))));
|
|
103
|
+
};
|
|
104
|
+
exports.TabPanel = TabPanel;
|
|
105
|
+
//# sourceMappingURL=Tabs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../src/tabs/Tabs.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
export * from './Tabs';
|
|
@@ -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
|
+
exports.__esModule = true;
|
|
33
|
+
__exportStar(require("./Tabs"), exports);
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tabs/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;AAEH,yCAAuB"}
|
package/lib/tag/Tag.d.ts
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
import React from 'react';
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
*
|
|
25
|
+
* Types
|
|
26
|
+
*
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
interface CommonTagProps {
|
|
30
|
+
children: string | React.ReactNode;
|
|
31
|
+
/** Type of the tag */
|
|
32
|
+
type?: 'destructive' | 'default';
|
|
33
|
+
}
|
|
34
|
+
interface RemoveableTagProps extends CommonTagProps {
|
|
35
|
+
/** Adds a "x" icon is set to true */
|
|
36
|
+
removeable: true;
|
|
37
|
+
/** Handler when remove icon is clicked. Required if `removeable` is true */
|
|
38
|
+
onRemove: () => void;
|
|
39
|
+
}
|
|
40
|
+
interface NonRemovableTagProps extends CommonTagProps {
|
|
41
|
+
removeable?: false;
|
|
42
|
+
onRemove?: never;
|
|
43
|
+
}
|
|
44
|
+
export declare type TagProps = RemoveableTagProps | NonRemovableTagProps;
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
*
|
|
48
|
+
* Helpers
|
|
49
|
+
*
|
|
50
|
+
*
|
|
51
|
+
*/
|
|
52
|
+
/** Add any helper functions here. */
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
*
|
|
56
|
+
* Tag Component
|
|
57
|
+
*
|
|
58
|
+
*
|
|
59
|
+
*/
|
|
60
|
+
declare const Tag: (props: TagProps) => JSX.Element;
|
|
61
|
+
export default Tag;
|
package/lib/tag/Tag.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
exports.__esModule = true;
|
|
26
|
+
var react_1 = __importDefault(require("react"));
|
|
27
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
28
|
+
var icons_1 = require("../icons");
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
*
|
|
32
|
+
* Helpers
|
|
33
|
+
*
|
|
34
|
+
*
|
|
35
|
+
*/
|
|
36
|
+
/** Add any helper functions here. */
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
*
|
|
40
|
+
* Tag Component
|
|
41
|
+
*
|
|
42
|
+
*
|
|
43
|
+
*/
|
|
44
|
+
var Tag = function (props) {
|
|
45
|
+
var _a;
|
|
46
|
+
var children = props.children, _b = props.type, type = _b === void 0 ? 'default' : _b, removeable = props.removeable, onRemove = props.onRemove;
|
|
47
|
+
if (removeable && typeof onRemove !== 'function') {
|
|
48
|
+
console.error('Tag element is removable but onRemove prop is not a function or provided');
|
|
49
|
+
}
|
|
50
|
+
var classes = (0, classnames_1["default"])("ndl-tag", (_a = {},
|
|
51
|
+
_a[type] = type,
|
|
52
|
+
_a.removeable = removeable,
|
|
53
|
+
_a));
|
|
54
|
+
return (react_1["default"].createElement("div", { className: classes },
|
|
55
|
+
children,
|
|
56
|
+
removeable && (react_1["default"].createElement("button", { type: "button", className: "remove-icon", onClick: onRemove },
|
|
57
|
+
react_1["default"].createElement(icons_1.HeroIcon, { iconName: "XIcon" })))));
|
|
58
|
+
};
|
|
59
|
+
exports["default"] = Tag;
|
|
60
|
+
//# sourceMappingURL=Tag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.js","sourceRoot":"","sources":["../../src/tag/Tag.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;AAEH,gDAA0B;AAC1B,0DAAoC;AACpC,kCAAoC;AAgCpC;;;;;;GAMG;AAEH,qCAAqC;AAErC;;;;;;GAMG;AAEH,IAAM,GAAG,GAAG,UAAC,KAAe;;IAClB,IAAA,QAAQ,GAA6C,KAAK,SAAlD,EAAE,KAA2C,KAAK,KAAhC,EAAhB,IAAI,mBAAG,SAAS,KAAA,EAAE,UAAU,GAAe,KAAK,WAApB,EAAE,QAAQ,GAAK,KAAK,SAAV,CAAW;IAEnE,IAAI,UAAU,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;QAChD,OAAO,CAAC,KAAK,CACX,0EAA0E,CAC3E,CAAC;KACH;IAED,IAAM,OAAO,GAAG,IAAA,uBAAU,EAAC,SAAS;QAClC,GAAC,IAAI,IAAG,IAAI;QACZ,aAAU,GAAE,UAAU;YACtB,CAAC;IAEH,OAAO,CACL,0CAAK,SAAS,EAAE,OAAO;QACpB,QAAQ;QACR,UAAU,IAAI,CACb,6CAAQ,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAC,aAAa,EAAC,OAAO,EAAE,QAAQ;YAC7D,iCAAC,gBAAQ,IAAC,QAAQ,EAAC,OAAO,GAAG,CACtB,CACV,CACG,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,qBAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
export { default as Tag } from './Tag';
|
package/lib/tag/index.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
exports.__esModule = true;
|
|
30
|
+
exports.Tag = void 0;
|
|
31
|
+
var Tag_1 = require("./Tag");
|
|
32
|
+
__createBinding(exports, Tag_1, "default", "Tag");
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tag/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;AAEH,6BAAuC;AAA9B,kDAAc"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
import React from 'react';
|
|
22
|
+
declare type ArrowPosition = 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right';
|
|
23
|
+
export interface TooltipProps extends React.HTMLProps<HTMLDivElement> {
|
|
24
|
+
arrowPosition: ArrowPosition;
|
|
25
|
+
children: React.ReactNode | string;
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
28
|
+
declare const Tooltip: ({ arrowPosition, children, className, ...props }: TooltipProps) => JSX.Element;
|
|
29
|
+
export default Tooltip;
|
|
@@ -0,0 +1,56 @@
|
|
|
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 __assign = (this && this.__assign) || function () {
|
|
23
|
+
__assign = Object.assign || function(t) {
|
|
24
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
25
|
+
s = arguments[i];
|
|
26
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
27
|
+
t[p] = s[p];
|
|
28
|
+
}
|
|
29
|
+
return t;
|
|
30
|
+
};
|
|
31
|
+
return __assign.apply(this, arguments);
|
|
32
|
+
};
|
|
33
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
34
|
+
var t = {};
|
|
35
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
36
|
+
t[p] = s[p];
|
|
37
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
38
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
39
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
40
|
+
t[p[i]] = s[p[i]];
|
|
41
|
+
}
|
|
42
|
+
return t;
|
|
43
|
+
};
|
|
44
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
45
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
46
|
+
};
|
|
47
|
+
exports.__esModule = true;
|
|
48
|
+
var react_1 = __importDefault(require("react"));
|
|
49
|
+
var Tooltip = function (_a) {
|
|
50
|
+
var arrowPosition = _a.arrowPosition, children = _a.children, className = _a.className, props = __rest(_a, ["arrowPosition", "children", "className"]);
|
|
51
|
+
return (react_1["default"].createElement("div", __assign({}, props, { role: "tooltip", className: "ndl-tooltip-wrapper ".concat(className) }),
|
|
52
|
+
children,
|
|
53
|
+
react_1["default"].createElement("div", { className: "tooltip-triangle ".concat(arrowPosition) })));
|
|
54
|
+
};
|
|
55
|
+
exports["default"] = Tooltip;
|
|
56
|
+
//# sourceMappingURL=Tooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../../src/tooltip/Tooltip.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,gDAA0B;AAgB1B,IAAM,OAAO,GAAG,UAAC,EAKF;IAJb,IAAA,aAAa,mBAAA,EACb,QAAQ,cAAA,EACR,SAAS,eAAA,EACN,KAAK,cAJO,0CAKhB,CADS;IAER,OAAO,CACL,qDACM,KAAK,IACT,IAAI,EAAC,SAAS,EACd,SAAS,EAAE,8BAAuB,SAAS,CAAE;QAE5C,QAAQ;QACT,0CAAK,SAAS,EAAE,2BAAoB,aAAa,CAAE,GAAI,CACnD,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,qBAAe,OAAO,CAAC"}
|