@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.
Files changed (161) hide show
  1. package/LICENSE +674 -0
  2. package/lib/alert/Alert.d.ts +70 -0
  3. package/lib/alert/Alert.js +114 -0
  4. package/lib/alert/Alert.js.map +1 -0
  5. package/lib/alert/index.d.ts +21 -0
  6. package/lib/alert/index.js +34 -0
  7. package/lib/alert/index.js.map +1 -0
  8. package/lib/button/Button.d.ts +52 -0
  9. package/lib/button/Button.js +110 -0
  10. package/lib/button/Button.js.map +1 -0
  11. package/lib/button/index.d.ts +21 -0
  12. package/lib/button/index.js +34 -0
  13. package/lib/button/index.js.map +1 -0
  14. package/lib/checkbox/Checkbox.d.ts +39 -0
  15. package/lib/checkbox/Checkbox.js +59 -0
  16. package/lib/checkbox/Checkbox.js.map +1 -0
  17. package/lib/checkbox/index.d.ts +21 -0
  18. package/lib/checkbox/index.js +33 -0
  19. package/lib/checkbox/index.js.map +1 -0
  20. package/lib/context-menu/ContextMenu.d.ts +65 -0
  21. package/lib/context-menu/ContextMenu.js +228 -0
  22. package/lib/context-menu/ContextMenu.js.map +1 -0
  23. package/lib/context-menu/index.d.ts +21 -0
  24. package/lib/context-menu/index.js +34 -0
  25. package/lib/context-menu/index.js.map +1 -0
  26. package/lib/helpers/debounce.d.ts +24 -0
  27. package/lib/helpers/debounce.js +47 -0
  28. package/lib/helpers/debounce.js.map +1 -0
  29. package/lib/helpers/index.d.ts +22 -0
  30. package/lib/helpers/index.js +35 -0
  31. package/lib/helpers/index.js.map +1 -0
  32. package/lib/helpers/types.d.ts +25 -0
  33. package/lib/helpers/types.js +23 -0
  34. package/lib/helpers/types.js.map +1 -0
  35. package/lib/icons/Custom.d.ts +27 -0
  36. package/lib/icons/Custom.js +77 -0
  37. package/lib/icons/Custom.js.map +1 -0
  38. package/lib/icons/Hero.d.ts +28 -0
  39. package/lib/icons/Hero.js +89 -0
  40. package/lib/icons/Hero.js.map +1 -0
  41. package/lib/icons/custom/Circle.d.ts +23 -0
  42. package/lib/icons/custom/Circle.js +57 -0
  43. package/lib/icons/custom/Circle.js.map +1 -0
  44. package/lib/icons/custom/DatabaseAddCircle.d.ts +23 -0
  45. package/lib/icons/custom/DatabaseAddCircle.js +57 -0
  46. package/lib/icons/custom/DatabaseAddCircle.js.map +1 -0
  47. package/lib/icons/custom/Drag.d.ts +23 -0
  48. package/lib/icons/custom/Drag.js +62 -0
  49. package/lib/icons/custom/Drag.js.map +1 -0
  50. package/lib/icons/custom/Expand.d.ts +23 -0
  51. package/lib/icons/custom/Expand.js +57 -0
  52. package/lib/icons/custom/Expand.js.map +1 -0
  53. package/lib/icons/custom/ExternalLink.d.ts +23 -0
  54. package/lib/icons/custom/ExternalLink.js +57 -0
  55. package/lib/icons/custom/ExternalLink.js.map +1 -0
  56. package/lib/icons/custom/FitToScreen.d.ts +23 -0
  57. package/lib/icons/custom/FitToScreen.js +57 -0
  58. package/lib/icons/custom/FitToScreen.js.map +1 -0
  59. package/lib/icons/custom/FolderBookmark.d.ts +23 -0
  60. package/lib/icons/custom/FolderBookmark.js +57 -0
  61. package/lib/icons/custom/FolderBookmark.js.map +1 -0
  62. package/lib/icons/custom/Heirarchy2.d.ts +23 -0
  63. package/lib/icons/custom/Heirarchy2.js +57 -0
  64. package/lib/icons/custom/Heirarchy2.js.map +1 -0
  65. package/lib/icons/custom/Hierarchy1.d.ts +23 -0
  66. package/lib/icons/custom/Hierarchy1.js +57 -0
  67. package/lib/icons/custom/Hierarchy1.js.map +1 -0
  68. package/lib/icons/custom/Pin.d.ts +23 -0
  69. package/lib/icons/custom/Pin.js +57 -0
  70. package/lib/icons/custom/Pin.js.map +1 -0
  71. package/lib/icons/custom/Presentation.d.ts +23 -0
  72. package/lib/icons/custom/Presentation.js +57 -0
  73. package/lib/icons/custom/Presentation.js.map +1 -0
  74. package/lib/icons/custom/Rhombus.d.ts +23 -0
  75. package/lib/icons/custom/Rhombus.js +57 -0
  76. package/lib/icons/custom/Rhombus.js.map +1 -0
  77. package/lib/icons/custom/Shrink.d.ts +23 -0
  78. package/lib/icons/custom/Shrink.js +57 -0
  79. package/lib/icons/custom/Shrink.js.map +1 -0
  80. package/lib/icons/custom/Text.d.ts +23 -0
  81. package/lib/icons/custom/Text.js +57 -0
  82. package/lib/icons/custom/Text.js.map +1 -0
  83. package/lib/icons/custom/Triangle.d.ts +23 -0
  84. package/lib/icons/custom/Triangle.js +57 -0
  85. package/lib/icons/custom/Triangle.js.map +1 -0
  86. package/lib/icons/custom/index.d.ts +35 -0
  87. package/lib/icons/custom/index.js +61 -0
  88. package/lib/icons/custom/index.js.map +1 -0
  89. package/lib/icons/index.d.ts +22 -0
  90. package/lib/icons/index.js +35 -0
  91. package/lib/icons/index.js.map +1 -0
  92. package/lib/index.d.ts +30 -0
  93. package/lib/index.js +43 -0
  94. package/lib/index.js.map +1 -0
  95. package/lib/input/Input.d.ts +44 -0
  96. package/lib/input/Input.js +92 -0
  97. package/lib/input/Input.js.map +1 -0
  98. package/lib/input/index.d.ts +21 -0
  99. package/lib/input/index.js +33 -0
  100. package/lib/input/index.js.map +1 -0
  101. package/lib/label/Label.d.ts +41 -0
  102. package/lib/label/Label.js +81 -0
  103. package/lib/label/Label.js.map +1 -0
  104. package/lib/label/index.d.ts +21 -0
  105. package/lib/label/index.js +33 -0
  106. package/lib/label/index.js.map +1 -0
  107. package/lib/loading-spinner/LoadingSpinner.d.ts +41 -0
  108. package/lib/loading-spinner/LoadingSpinner.js +45 -0
  109. package/lib/loading-spinner/LoadingSpinner.js.map +1 -0
  110. package/lib/loading-spinner/index.d.ts +21 -0
  111. package/lib/loading-spinner/index.js +33 -0
  112. package/lib/loading-spinner/index.js.map +1 -0
  113. package/lib/popover/Popover.d.ts +70 -0
  114. package/lib/popover/Popover.js +223 -0
  115. package/lib/popover/Popover.js.map +1 -0
  116. package/lib/popover/index.d.ts +21 -0
  117. package/lib/popover/index.js +34 -0
  118. package/lib/popover/index.js.map +1 -0
  119. package/lib/progress-bar/ProgressBar.d.ts +29 -0
  120. package/lib/progress-bar/ProgressBar.js +40 -0
  121. package/lib/progress-bar/ProgressBar.js.map +1 -0
  122. package/lib/progress-bar/index.d.ts +21 -0
  123. package/lib/progress-bar/index.js +33 -0
  124. package/lib/progress-bar/index.js.map +1 -0
  125. package/lib/radio/Radio.d.ts +39 -0
  126. package/lib/radio/Radio.js +58 -0
  127. package/lib/radio/Radio.js.map +1 -0
  128. package/lib/radio/index.d.ts +21 -0
  129. package/lib/radio/index.js +33 -0
  130. package/lib/radio/index.js.map +1 -0
  131. package/lib/switch/Switch.d.ts +39 -0
  132. package/lib/switch/Switch.js +59 -0
  133. package/lib/switch/Switch.js.map +1 -0
  134. package/lib/switch/index.d.ts +21 -0
  135. package/lib/switch/index.js +33 -0
  136. package/lib/switch/index.js.map +1 -0
  137. package/lib/tabs/Tabs.d.ts +72 -0
  138. package/lib/tabs/Tabs.js +105 -0
  139. package/lib/tabs/Tabs.js.map +1 -0
  140. package/lib/tabs/index.d.ts +21 -0
  141. package/lib/tabs/index.js +34 -0
  142. package/lib/tabs/index.js.map +1 -0
  143. package/lib/tag/Tag.d.ts +61 -0
  144. package/lib/tag/Tag.js +60 -0
  145. package/lib/tag/Tag.js.map +1 -0
  146. package/lib/tag/index.d.ts +21 -0
  147. package/lib/tag/index.js +33 -0
  148. package/lib/tag/index.js.map +1 -0
  149. package/lib/tooltip/Tooltip.d.ts +29 -0
  150. package/lib/tooltip/Tooltip.js +56 -0
  151. package/lib/tooltip/Tooltip.js.map +1 -0
  152. package/lib/tooltip/index.d.ts +21 -0
  153. package/lib/tooltip/index.js +33 -0
  154. package/lib/tooltip/index.js.map +1 -0
  155. package/lib/view-selector/ViewSelector.d.ts +58 -0
  156. package/lib/view-selector/ViewSelector.js +78 -0
  157. package/lib/view-selector/ViewSelector.js.map +1 -0
  158. package/lib/view-selector/index.d.ts +21 -0
  159. package/lib/view-selector/index.js +34 -0
  160. package/lib/view-selector/index.js.map +1 -0
  161. package/package.json +63 -0
@@ -0,0 +1,70 @@
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
+ export interface AlertActionProps extends React.HTMLProps<HTMLAnchorElement> {
30
+ /** Label of the action item */
31
+ label: string;
32
+ /** Event handler when the action button is clicked. If set, the element is rendered as `button` */
33
+ onClick?: (event: React.MouseEvent<HTMLAnchorElement>) => void;
34
+ /** Link to redirect to when the action button is clicked. If set, the element is rendered as `a`. Ignored if `onClose` prop is passed */
35
+ href?: string;
36
+ /** Sets how to open the link. Only applicable when `href` is passed */
37
+ target?: '_blank' | '_self' | '_parent' | '_top';
38
+ }
39
+ interface CommonProps extends React.HTMLProps<HTMLElement> {
40
+ /** Type of the alert */
41
+ type?: AlertType;
42
+ /** Title of the alert */
43
+ title: string;
44
+ /** Description of the alert. Will be ignored if `children` is passed */
45
+ description?: string | React.ReactNode;
46
+ /** Alternative for `description` */
47
+ children?: React.ReactNode;
48
+ /** Shows status icon. Icon is automatically picked based on `type` value */
49
+ icon?: boolean;
50
+ /** Shows Action buttons in the footer */
51
+ actions?: AlertActionProps[];
52
+ /** Adds shadow */
53
+ floating?: boolean;
54
+ }
55
+ declare type CloseableAlertProps = {
56
+ /** Shows close icon. Expects onClose to be passed */
57
+ closeable: true;
58
+ /** Event handler when close icon is clicked */
59
+ onClose: (e: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>) => void;
60
+ };
61
+ declare type NonCloseableAlertProps = {
62
+ closeable?: false;
63
+ onClose?: never;
64
+ };
65
+ declare type AlertCloseProps = CloseableAlertProps | NonCloseableAlertProps;
66
+ export declare type AlertProps = CommonProps & AlertCloseProps;
67
+ export declare type AlertType = 'info' | 'success' | 'warning' | 'danger';
68
+ export declare const AlertAction: ({ label, ...props }: AlertActionProps) => JSX.Element;
69
+ declare const Alert: ({ type, icon, title, actions, floating, description, onClose, className, children, closeable, }: AlertProps) => JSX.Element;
70
+ export default Alert;
@@ -0,0 +1,114 @@
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
+ exports.AlertAction = void 0;
49
+ var classnames_1 = __importDefault(require("classnames"));
50
+ var react_1 = __importDefault(require("react"));
51
+ var icons_1 = require("../icons");
52
+ /**
53
+ *
54
+ *
55
+ * Helpers
56
+ *
57
+ *
58
+ */
59
+ var TITLE_PROPS_ERROR = 'Alert Component: expected `title` prop';
60
+ var getStatusIcon = function (iconType) {
61
+ var iconComponent;
62
+ switch (iconType) {
63
+ case 'success':
64
+ iconComponent = react_1["default"].createElement(icons_1.HeroIcon, { iconName: "CheckCircleIcon", type: "solid" });
65
+ break;
66
+ case 'warning':
67
+ iconComponent = react_1["default"].createElement(icons_1.HeroIcon, { iconName: "ExclamationIcon", type: "solid" });
68
+ break;
69
+ case 'danger':
70
+ iconComponent = (react_1["default"].createElement(icons_1.HeroIcon, { iconName: "ExclamationCircleIcon", type: "solid" }));
71
+ break;
72
+ default:
73
+ iconComponent = (react_1["default"].createElement(icons_1.HeroIcon, { iconName: "InformationCircleIcon", type: "solid" }));
74
+ }
75
+ return react_1["default"].createElement("div", { className: "alert-icon alert-status-icon" }, iconComponent);
76
+ };
77
+ var AlertAction = function (_a) {
78
+ var label = _a.label, props = __rest(_a, ["label"]);
79
+ return react_1["default"].createElement("a", __assign({}, props), label);
80
+ };
81
+ exports.AlertAction = AlertAction;
82
+ var Alert = function (_a) {
83
+ var _b;
84
+ var _c = _a.type, type = _c === void 0 ? 'info' : _c, _d = _a.icon, icon = _d === void 0 ? false : _d, title = _a.title, _e = _a.actions, actions = _e === void 0 ? [] : _e, _f = _a.floating, floating = _f === void 0 ? false : _f, _g = _a.description, description = _g === void 0 ? null : _g, onClose = _a.onClose, _h = _a.className, className = _h === void 0 ? '' : _h, _j = _a.children, children = _j === void 0 ? null : _j, _k = _a.closeable, closeable = _k === void 0 ? false : _k;
85
+ if (!title) {
86
+ console.error(TITLE_PROPS_ERROR);
87
+ }
88
+ var classes = (0, classnames_1["default"])("ndl-alert", (_b = {},
89
+ _b['with-description'] = description,
90
+ _b['info'] = type === 'info',
91
+ _b['success'] = type === 'success',
92
+ _b['warning'] = type === 'warning',
93
+ _b['danger'] = type === 'danger',
94
+ _b['floating'] = floating,
95
+ _b[className] = className && className !== '',
96
+ _b));
97
+ var TitleTag = description ? 'h5' : 'div';
98
+ var handleClose = function (e) {
99
+ if (onClose && typeof onClose === 'function') {
100
+ onClose(e);
101
+ }
102
+ };
103
+ return (react_1["default"].createElement("div", { className: classes, role: closeable ? 'alertdialog' : 'alert' },
104
+ icon && getStatusIcon(type),
105
+ react_1["default"].createElement("div", { className: "alert-content" },
106
+ react_1["default"].createElement(TitleTag, { className: "alert-title" },
107
+ react_1["default"].createElement("div", null, title),
108
+ closeable && (react_1["default"].createElement("div", { tabIndex: 0, role: "button", className: "alert-icon close-icon", onKeyDown: handleClose, onClick: handleClose },
109
+ react_1["default"].createElement(icons_1.HeroIcon, { iconName: "XIcon" })))),
110
+ (description || children) && (react_1["default"].createElement("div", { className: "alert-description" }, children || description)),
111
+ actions && actions.length > 0 && (react_1["default"].createElement("div", { className: "alert-actions" }, actions.map(function (action, index) { return (react_1["default"].createElement(exports.AlertAction, __assign({ key: index }, action))); }))))));
112
+ };
113
+ exports["default"] = Alert;
114
+ //# sourceMappingURL=Alert.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Alert.js","sourceRoot":"","sources":["../../src/alert/Alert.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;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AuB,EACjC,SAAS,EAAE,WAAW,EACtB,OAAO,EAAE,WAAW;oBAEpB,iCAAC,gBAAQ,IAAC,QAAQ,EAAC,OAAO,GAAG,CACzB,CACP,CACQ;YACV,CAAC,WAAW,IAAI,QAAQ,CAAC,IAAI,CAC5B,0CAAK,SAAS,EAAC,mBAAmB,IAAE,QAAQ,IAAI,WAAW,CAAO,CACnE;YACA,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,CAChC,0CAAK,SAAS,EAAC,eAAe,IAC3B,OAAO,CAAC,GAAG,CAAC,UAAC,MAAM,EAAE,KAAK,IAAK,OAAA,CAC9B,iCAAC,mBAAW,aAAC,GAAG,EAAE,KAAK,IAAM,MAAM,EAAI,CACxC,EAF+B,CAE/B,CAAC,CACE,CACP,CACG,CACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,qBAAe,KAAK,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 Alert, AlertAction } from './Alert';
@@ -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
+ exports.__esModule = true;
30
+ exports.AlertAction = exports.Alert = void 0;
31
+ var Alert_1 = require("./Alert");
32
+ __createBinding(exports, Alert_1, "default", "Alert");
33
+ __createBinding(exports, Alert_1, "AlertAction");
34
+ //# 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,sDAAgB;AAAE,iDAAW"}
@@ -0,0 +1,52 @@
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
+ import { Neo4jColors } from '@neo4j-ndl/base';
23
+ import { ElementBase } from '../helpers';
24
+ export declare const removeNewlines: (input: string) => string;
25
+ /** Remove extra spaces from sting */
26
+ export declare const removeSpaces: (input: string) => string;
27
+ /**
28
+ *
29
+ *
30
+ * Types
31
+ *
32
+ *
33
+ */
34
+ declare type ButtonTypes = 'submit' | 'button' | 'reset';
35
+ export interface ButtonProps extends ElementBase<HTMLButtonElement> {
36
+ children: string | React.ReactNode;
37
+ /** If the button is doing something Async, it will display a loading spinner */
38
+ loading?: boolean;
39
+ /** If the button is in disabled state */
40
+ disabled?: boolean;
41
+ /** the base color of the button */
42
+ color?: Neo4jColors;
43
+ type?: ButtonTypes;
44
+ /** Fill type of button */
45
+ fill?: 'filled' | 'outlined' | 'text';
46
+ /** Size of button */
47
+ buttonSize?: 'regular' | 'small' | 'large';
48
+ /** Rectanle (for icon usage mainly) */
49
+ rectangle?: boolean;
50
+ }
51
+ export declare const Button: ({ children, as, type, loading, color, disabled, fill, rectangle, buttonSize, onClick, ...props }: ButtonProps) => JSX.Element;
52
+ export {};
@@ -0,0 +1,110 @@
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
+ exports.Button = exports.removeSpaces = exports.removeNewlines = void 0;
49
+ var react_1 = __importDefault(require("react"));
50
+ var classnames_1 = __importDefault(require("classnames"));
51
+ var loading_spinner_1 = require("../loading-spinner");
52
+ var removeNewlines = function (input) {
53
+ return input.replace(/(\r\n|\n|\r)/gm, '');
54
+ };
55
+ exports.removeNewlines = removeNewlines;
56
+ /** Remove extra spaces from sting */
57
+ var removeSpaces = function (input) {
58
+ return input.replace(/\s+/g, ' ').trim();
59
+ };
60
+ exports.removeSpaces = removeSpaces;
61
+ var Button = function (_a) {
62
+ var _b;
63
+ var children = _a.children, as = _a.as, _c = _a.type, type = _c === void 0 ? 'button' : _c, _d = _a.loading, loading = _d === void 0 ? false : _d, _e = _a.color, color = _e === void 0 ? 'primary' : _e, _f = _a.disabled, disabled = _f === void 0 ? false : _f, _g = _a.fill, fill = _g === void 0 ? 'filled' : _g, _h = _a.rectangle, rectangle = _h === void 0 ? false : _h, _j = _a.buttonSize, buttonSize = _j === void 0 ? 'regular' : _j, onClick = _a.onClick, props = __rest(_a, ["children", "as", "type", "loading", "color", "disabled", "fill", "rectangle", "buttonSize", "onClick"]);
64
+ var Component = as || 'button';
65
+ if (!as && props.href) {
66
+ Component = 'a';
67
+ }
68
+ var BASE_SHADE = color === 'neutral' ? 80 : 40;
69
+ var BASE_SHADES = {
70
+ LIGHT: BASE_SHADE - 10,
71
+ NEUTRAL: BASE_SHADE,
72
+ DARK: BASE_SHADE + 10
73
+ };
74
+ var interactable = !disabled && !loading;
75
+ var classes = (0, classnames_1["default"])("ndl-btn n-font-sans ".concat(fill, " ").concat(buttonSize), (_b = {
76
+ disabled: disabled,
77
+ loading: loading,
78
+ rectangle: rectangle
79
+ },
80
+ /** Now check button is outlined or filled */
81
+ _b["\n n-bg-".concat(color, "-").concat(BASE_SHADE, "\n ").concat(interactable && "hover:n-bg-".concat(color, "-").concat(BASE_SHADES.DARK), "\n ")] = fill === 'filled',
82
+ _b["\n n-text-".concat(color, "-").concat(BASE_SHADE + 10, "\n ").concat(interactable && "hover:n-bg-".concat(color, "-10"), "\n n-border-").concat(color, "-").concat(loading || disabled ? BASE_SHADES.LIGHT : BASE_SHADE + 10, "\n ")] = fill === 'outlined' && color !== 'neutral',
83
+ /**
84
+ * Neutral needs overriding as it doesn't follow
85
+ * the same principles with colored variations
86
+ */
87
+ _b["\n n-text-".concat(color, "-80\n n-bg-").concat(color, "-10\n ").concat(interactable && "hover:n-bg-".concat(color, "-20"), "\n n-border-").concat(color, "-60\n ")] = fill === 'outlined' && color === 'neutral',
88
+ _b["\t\n n-text-".concat(color, "-50\n ").concat(interactable && "hover:n-bg-".concat(color, "-10"), "\n ")] = fill === 'text' && color !== 'neutral',
89
+ _b["\t\n n-text-".concat(color, "-70\n ").concat(interactable && "hover:n-bg-".concat(color, "-20"), "\n ")] = fill === 'text' && color == 'neutral',
90
+ _b));
91
+ var className = props.className;
92
+ var sanitisedClasses = (0, exports.removeSpaces)((0, exports.removeNewlines)(classes));
93
+ var handleClick = function (e) {
94
+ if (!interactable)
95
+ return;
96
+ if (onClick) {
97
+ onClick(e);
98
+ }
99
+ else {
100
+ console.error('onClick was not provided');
101
+ }
102
+ };
103
+ return (react_1["default"].createElement(Component
104
+ /** First props and then className to avoid overriding in classNames */
105
+ , __assign({}, props, (Component === 'button' ? { type: type } : {}), { onClick: handleClick, disabled: !interactable, className: [sanitisedClasses, className].join(' ') }),
106
+ loading ? (react_1["default"].createElement(loading_spinner_1.LoadingSpinner, { className: "n-m-auto n-mr-1", size: "small" })) : null,
107
+ children));
108
+ };
109
+ exports.Button = Button;
110
+ //# sourceMappingURL=Button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.js","sourceRoot":"","sources":["../../src/button/Button.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,gDAA0B;AAC1B,0DAAoC;AAEpC,sDAAoD;AAG7C,IAAM,cAAc,GAAG,UAAC,KAAa;IAC1C,OAAA,KAAK,CAAC,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC;AAAnC,CAAmC,CAAC;AADzB,QAAA,cAAc,kBACW;AAEtC,qCAAqC;AAC9B,IAAM,YAAY,GAAG,UAAC,KAAa;IACxC,OAAA,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE;AAAjC,CAAiC,CAAC;AADvB,QAAA,YAAY,gBACW;AA8B7B,IAAM,MAAM,GAAG,UAAC,EAYT;;IAXZ,IAAA,QAAQ,cAAA,EACR,EAAE,QAAA,EACF,YAAe,EAAf,IAAI,mBAAG,QAAQ,KAAA,EACf,eAAe,EAAf,OAAO,mBAAG,KAAK,KAAA,EACf,aAAiB,EAAjB,KAAK,mBAAG,SAAS,KAAA,EACjB,gBAAgB,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EAChB,YAAe,EAAf,IAAI,mBAAG,QAAQ,KAAA,EACf,iBAAiB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o4j.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 './Button';
@@ -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("./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,39 @@
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
+ import { InputProps } from '../input/Input';
23
+ /**
24
+ *
25
+ *
26
+ * Helpers
27
+ *
28
+ *
29
+ */
30
+ /** Add any helper functions here. */
31
+ /**
32
+ *
33
+ *
34
+ * Checkbox Component
35
+ *
36
+ *
37
+ */
38
+ declare const Checkbox: React.ForwardRefExoticComponent<Pick<InputProps, "size" | "className" | "form" | "label" | "slot" | "style" | "title" | "pattern" | "list" | "children" | "role" | "onChange" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "height" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "name" | "placeholder" | "readOnly" | "required" | "src" | "step" | "type" | "value" | "width" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "enterKeyHint" | "fluid" | "labelBefore"> & React.RefAttributes<HTMLInputElement>>;
39
+ export default Checkbox;
@@ -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
+ * Checkbox Component
51
+ *
52
+ *
53
+ */
54
+ var Checkbox = react_1["default"].forwardRef(function (props, ref) {
55
+ return react_1["default"].createElement(input_1.Input, __assign({}, props, { ref: ref, type: "checkbox", role: "checkbox" }));
56
+ });
57
+ Checkbox.displayName = 'Checkbox';
58
+ exports["default"] = Checkbox;
59
+ //# sourceMappingURL=Checkbox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../src/checkbox/Checkbox.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;AAEH,gDAA0B;AAC1B,kCAAiC;AAGjC;;;;;;GAMG;AAEH,qCAAqC;AAErC;;;;;;GAMG;AAEH,IAAM,QAAQ,GAAG,kBAAK,CAAC,UAAU,CAC/B,UAAC,KAAiB,EAAE,GAAgC;IAClD,OAAO,iCAAC,aAAK,eAAK,KAAK,IAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAC,UAAU,EAAC,IAAI,EAAC,UAAU,IAAG,CAAC;AACxE,CAAC,CACF,CAAC;AAEF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC;AAElC,qBAAe,QAAQ,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 Checkbox } from './Checkbox';