@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,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.Checkbox = void 0;
31
+ var Checkbox_1 = require("./Checkbox");
32
+ __createBinding(exports, Checkbox_1, "default", "Checkbox");
33
+ //# 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,4DAAmB"}
@@ -0,0 +1,65 @@
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 { PopoverProps } from '../popover';
23
+ /**
24
+ * A Menu component. A significant portion of this code is a subset of the Material UI React Menu component
25
+ */
26
+ declare type ElementBase = Omit<React.HTMLProps<HTMLElement>, 'as'> & {
27
+ /** Override the root element rendered for the component */
28
+ as?: string | React.ComponentType<any>;
29
+ };
30
+ export interface ContextMenuProps extends PopoverProps {
31
+ menuSize?: 'small' | 'large';
32
+ /** The minimum width of the menu */
33
+ minWidth?: number;
34
+ }
35
+ export declare const Menu: React.ForwardRefExoticComponent<Pick<ContextMenuProps, "size" | "className" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "list" | "children" | "role" | "as" | "selected" | "onChange" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap" | "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" | "onClose" | "anchorEl" | "anchorOrigin" | "transformOrigin" | "nested" | "menuSize" | "minWidth"> & React.RefAttributes<unknown>>;
36
+ interface MenuItemsProps extends ElementBase {
37
+ children: React.ReactNode | string;
38
+ /** Additional classes */
39
+ className?: string;
40
+ }
41
+ export declare const MenuItems: ({ as, children, className, ...rest }: MenuItemsProps) => JSX.Element;
42
+ interface MenuItemProps extends Omit<ElementBase, 'title' | 'onClick'> {
43
+ /** Item title text */
44
+ title: string | React.ReactNode;
45
+ /** Item description text */
46
+ description?: string | React.ReactNode;
47
+ /** An icon to render on the left side of the list item */
48
+ icon?: React.ReactNode;
49
+ /** Additional classes */
50
+ className?: string;
51
+ /** Disable this menu item */
52
+ disabled?: boolean;
53
+ onClick?: (e: React.MouseEvent<HTMLElement, MouseEvent> | React.KeyboardEvent<HTMLElement>) => void;
54
+ }
55
+ export declare const MenuItem: ({ as, icon, title, description, className, disabled, onClick, onKeyDown, ...rest }: MenuItemProps) => JSX.Element;
56
+ interface MenuHeaderProps extends Omit<ElementBase, 'title'> {
57
+ /** Header title text */
58
+ title: string | React.ReactNode;
59
+ /** Header description text */
60
+ description?: string | React.ReactNode;
61
+ /** Additional classes */
62
+ className?: string;
63
+ }
64
+ export declare const MenuHeader: ({ as, title, description, className, ...rest }: MenuHeaderProps) => JSX.Element;
65
+ export {};
@@ -0,0 +1,228 @@
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 __rest = (this && this.__rest) || function (s, e) {
53
+ var t = {};
54
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
55
+ t[p] = s[p];
56
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
57
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
58
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
59
+ t[p[i]] = s[p[i]];
60
+ }
61
+ return t;
62
+ };
63
+ var __importDefault = (this && this.__importDefault) || function (mod) {
64
+ return (mod && mod.__esModule) ? mod : { "default": mod };
65
+ };
66
+ exports.__esModule = true;
67
+ exports.MenuHeader = exports.MenuItem = exports.MenuItems = exports.Menu = void 0;
68
+ var react_1 = __importStar(require("react"));
69
+ var icons_1 = require("../icons");
70
+ var popover_1 = require("../popover");
71
+ var classnames_1 = __importDefault(require("classnames"));
72
+ var MenuContext = react_1["default"].createContext(null);
73
+ var useMenuContext = function () {
74
+ var context = (0, react_1.useContext)(MenuContext);
75
+ if (context === null) {
76
+ throw new Error('Menu used without context. Did you render this component inside a <Menu />?');
77
+ }
78
+ return context;
79
+ };
80
+ exports.Menu = (0, react_1.forwardRef)(function Menu(_a, ref) {
81
+ var _b = _a.menuSize, menuSize = _b === void 0 ? 'small' : _b, _c = _a.className, className = _c === void 0 ? '' : _c, _d = _a.minWidth, minWidth = _d === void 0 ? 250 : _d, open = _a.open, onClose = _a.onClose, children = _a.children, rest = __rest(_a, ["menuSize", "className", "minWidth", "open", "onClose", "children"]);
82
+ var menuRef = (0, react_1.useRef)();
83
+ var focusFirstMenuItem = (0, react_1.useCallback)(function () {
84
+ var menu = menuRef.current;
85
+ if (!menu)
86
+ return;
87
+ var items = menu.querySelectorAll(':scope > .menu-items > .menu-item');
88
+ if (items.length === 0) {
89
+ menu.focus();
90
+ }
91
+ items[0].focus();
92
+ }, []);
93
+ // Override ref to map to internal ref
94
+ // as well as change focus to focus the
95
+ // first menu item
96
+ (0, react_1.useImperativeHandle)(ref, function () {
97
+ var menu = menuRef.current;
98
+ if (!menu) {
99
+ return null;
100
+ }
101
+ return __assign(__assign({}, menu), { focus: focusFirstMenuItem });
102
+ });
103
+ // Focus first menu item on open.
104
+ // This effect is separate from the above
105
+ // `setPositiongStyles` effect as the above
106
+ // is triggered on every render usually as
107
+ // anchorOrigin and transformOrigin
108
+ // are typically not memoized
109
+ (0, react_1.useEffect)(function () {
110
+ if (open) {
111
+ focusFirstMenuItem();
112
+ }
113
+ }, [open, focusFirstMenuItem]);
114
+ return (react_1["default"].createElement(MenuContext.Provider, { value: { onClose: onClose } },
115
+ react_1["default"].createElement(popover_1.Popover, __assign({ tabIndex: -1 }, rest, { open: open, style: __assign({ minWidth: minWidth }, (rest.style || {})), className: "ndl-menu ".concat(menuSize, " ").concat(className), ref: menuRef, onClose: onClose }), children)));
116
+ });
117
+ var getMenuItem = function (menuItems, iterator) {
118
+ var activeElement = document.activeElement;
119
+ var newEl = iterator(menuItems, activeElement);
120
+ var menuItem = null;
121
+ // Iterate over next element until we find a menu item
122
+ // Iterate a maximum of 10 times looking for an element
123
+ for (var i = 0; i < 10; i++) {
124
+ // Can't find new element, break
125
+ if (!newEl) {
126
+ return null;
127
+ }
128
+ var role = newEl.getAttribute('role');
129
+ if (role === 'menuitem') {
130
+ menuItem = newEl;
131
+ break;
132
+ }
133
+ newEl = iterator(menuItems, newEl);
134
+ }
135
+ return menuItem;
136
+ };
137
+ // Gets next sibling child of the menu items, looping at the end
138
+ var nextElement = function (menuItems, currentEl) {
139
+ if (currentEl === menuItems || !(currentEl === null || currentEl === void 0 ? void 0 : currentEl.nextElementSibling)) {
140
+ return menuItems.firstChild ? menuItems.firstChild : null;
141
+ }
142
+ else if (currentEl === null || currentEl === void 0 ? void 0 : currentEl.nextElementSibling) {
143
+ return currentEl.nextElementSibling;
144
+ }
145
+ return null;
146
+ };
147
+ // Gets prev sibling child of the menu items, looping at the top
148
+ var prevElement = function (menuItems, currentEl) {
149
+ if (currentEl === menuItems || !(currentEl === null || currentEl === void 0 ? void 0 : currentEl.previousElementSibling)) {
150
+ return menuItems.lastChild ? menuItems.lastChild : null;
151
+ }
152
+ else if (currentEl === null || currentEl === void 0 ? void 0 : currentEl.previousElementSibling) {
153
+ return currentEl.previousElementSibling;
154
+ }
155
+ return null;
156
+ };
157
+ var MenuItems = function (_a) {
158
+ var _b = _a.as, as = _b === void 0 ? 'ul' : _b, children = _a.children, _c = _a.className, className = _c === void 0 ? '' : _c, rest = __rest(_a, ["as", "children", "className"]);
159
+ var menuItemsRef = (0, react_1.useRef)();
160
+ var onClose = useMenuContext().onClose;
161
+ var handleKeyDown = function (event) {
162
+ var menuItems = menuItemsRef.current;
163
+ if (!menuItems) {
164
+ return;
165
+ }
166
+ if (event.key == 'ArrowDown') {
167
+ event.preventDefault();
168
+ var newFocusedElement = getMenuItem(menuItems, nextElement);
169
+ newFocusedElement === null || newFocusedElement === void 0 ? void 0 : newFocusedElement.focus();
170
+ }
171
+ else if (event.key == 'ArrowUp') {
172
+ event.preventDefault();
173
+ var newFocusedElement = getMenuItem(menuItems, prevElement);
174
+ newFocusedElement === null || newFocusedElement === void 0 ? void 0 : newFocusedElement.focus();
175
+ }
176
+ else if (event.key == 'Tab' || event.key == 'Escape') {
177
+ onClose && onClose(event);
178
+ }
179
+ };
180
+ var Component = as;
181
+ return (react_1["default"].createElement(Component, __assign({ tabIndex: -1, onKeyDown: handleKeyDown, role: "menu" }, rest, { className: "menu-items ".concat(className), ref: menuItemsRef }), children));
182
+ };
183
+ exports.MenuItems = MenuItems;
184
+ var MenuItem = function (_a) {
185
+ var _b;
186
+ var _c = _a.as, as = _c === void 0 ? 'li' : _c, icon = _a.icon, title = _a.title, description = _a.description, _d = _a.className, className = _d === void 0 ? '' : _d, _e = _a.disabled, disabled = _e === void 0 ? false : _e, onClick = _a.onClick, onKeyDown = _a.onKeyDown, rest = __rest(_a, ["as", "icon", "title", "description", "className", "disabled", "onClick", "onKeyDown"]);
187
+ var Component = as;
188
+ var classes = (0, classnames_1["default"])("menu-item n-flex n-flex-col", (_b = {},
189
+ _b[className] = !!className,
190
+ _b.disabled = disabled,
191
+ _b));
192
+ var handleClick = function (e) {
193
+ if (disabled)
194
+ return;
195
+ if (onClick)
196
+ onClick(e);
197
+ };
198
+ var handleKeyDown = function (e) {
199
+ if (onKeyDown)
200
+ onKeyDown(e);
201
+ if (e.key === 'Enter') {
202
+ if (disabled)
203
+ return;
204
+ if (onClick)
205
+ onClick(e);
206
+ }
207
+ };
208
+ return (react_1["default"].createElement(Component, __assign({ tabIndex: -1, role: "menuitem" }, rest, { className: classes, onClick: handleClick, onKeyDown: handleKeyDown }),
209
+ react_1["default"].createElement("div", { className: "n-flex n-items-center" },
210
+ icon && react_1["default"].createElement("div", { className: "menu-item-icon" }, icon),
211
+ react_1["default"].createElement("div", { className: "menu-item-title" }, title)),
212
+ description && (react_1["default"].createElement("div", { className: "menu-item-description" }, description))));
213
+ };
214
+ exports.MenuItem = MenuItem;
215
+ var MenuHeader = function (_a) {
216
+ var _b = _a.as, as = _b === void 0 ? 'div' : _b, title = _a.title, description = _a.description, _c = _a.className, className = _c === void 0 ? '' : _c, rest = __rest(_a, ["as", "title", "description", "className"]);
217
+ var Component = as;
218
+ var onClose = useMenuContext().onClose;
219
+ var handleClose = function (e) { return onClose && onClose(e); };
220
+ return (react_1["default"].createElement(Component, __assign({}, rest, { className: "menu-header n-flex n-flex-col ".concat(className) }),
221
+ react_1["default"].createElement("div", { className: "n-flex n-justify-between n-items-center" },
222
+ react_1["default"].createElement("div", { className: "menu-header-title" }, title),
223
+ react_1["default"].createElement("div", { tabIndex: 0, role: "button", onKeyDown: handleClose, onClick: handleClose, className: "menu-header-icon" },
224
+ react_1["default"].createElement(icons_1.HeroIcon, { iconName: "XIcon" }))),
225
+ description && (react_1["default"].createElement("div", { className: "menu-header-description" }, description))));
226
+ };
227
+ exports.MenuHeader = MenuHeader;
228
+ //# 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,6CAOe;AACf,kCAAoC;AACpC,sCAAmD;AACnD,0DAA4B;AAiB5B,IAAM,WAAW,GAAG,kBAAK,CAAC,aAAa,CAAyB,IAAI,CAAC,CAAC;AAEtE,IAAM,cAAc,GAAG;IACrB,IAAM,OAAO,GAAG,IAAA,kBAAU,EAAC,WAAW,CAAC,CAAC;IACxC,IAAI,OAAO,KAAK,IAAI,EAAE;QACpB,MAAM,IAAI,KAAK,CACb,6EAA6E,CAC9E,CAAC;KACH;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAQW,QAAA,IAAI,GAAG,IAAA,kBAAU,EAAC,SAAS,IAAI,CAC1C,EAQmB,EACnB,GAAG;IARD,IAAA,gBAAkB,EAAlB,QAAQ,mBAAG,OAAO,KAAA,EAClB,iBAAc,EAAd,SAAS,mBAAG,EAAE,KAAA,EACd,gBAAc,EAAd,QAAQ,mBAAG,GAAG,KAAA,EACd,IAAI,UAAA,EACJ,OAAO,aAAA,EACP,QAAQ,cAAA,EACL,IAAI,cAPT,oEAQC,CADQ;IAIT,IAAM,OAAO,GAAG,IAAA,cAAM,GAAe,CAAC;IAEtC,IAAM,kBAAkB,GAAG,IAAA,mBAAW,EAAC;QACrC,IAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC;QAC7B,IAAI,CAAC,IAAI;YAAE,OAAO;QAElB,IAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,mCAAmC,CAAC,CAAC;QACzE,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;YACtB,IAAI,CAAC,KAAK,EAAE,CA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o4j 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 './ContextMenu';
@@ -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("./ContextMenu"), exports);
34
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/context-menu/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;AAEH,gDAA8B"}
@@ -0,0 +1,24 @@
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 declare function debounce(func: (...args: unknown[]) => unknown, wait?: number): {
22
+ (this: unknown, ...args: unknown[]): void;
23
+ clear(): void;
24
+ };
@@ -0,0 +1,47 @@
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
+ exports.__esModule = true;
23
+ exports.debounce = void 0;
24
+ // Corresponds to 10 frames at 60 Hz.
25
+ // A few bytes payload overhead when lodash/debounce is ~3 kB and debounce ~300 B.
26
+ function debounce(func, wait) {
27
+ if (wait === void 0) { wait = 166; }
28
+ var timeout;
29
+ function debounced() {
30
+ var _this = this;
31
+ var args = [];
32
+ for (var _i = 0; _i < arguments.length; _i++) {
33
+ args[_i] = arguments[_i];
34
+ }
35
+ var later = function () {
36
+ func.apply(_this, args);
37
+ };
38
+ clearTimeout(timeout);
39
+ timeout = setTimeout(later, wait);
40
+ }
41
+ debounced.clear = function () {
42
+ clearTimeout(timeout);
43
+ };
44
+ return debounced;
45
+ }
46
+ exports.debounce = debounce;
47
+ //# sourceMappingURL=debounce.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debounce.js","sourceRoot":"","sources":["../../src/helpers/debounce.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAEH,qCAAqC;AACrC,kFAAkF;AAClF,SAAgB,QAAQ,CAAC,IAAqC,EAAE,IAAU;IAAV,qBAAA,EAAA,UAAU;IACxE,IAAI,OAAuB,CAAC;IAC5B,SAAS,SAAS;QAAlB,iBAMC;QANiC,cAAkB;aAAlB,UAAkB,EAAlB,qBAAkB,EAAlB,IAAkB;YAAlB,yBAAkB;;QAClD,IAAM,KAAK,GAAG;YACZ,IAAI,CAAC,KAAK,CAAC,KAAI,EAAE,IAAI,CAAC,CAAC;QACzB,CAAC,CAAC;QACF,YAAY,CAAC,OAAO,CAAC,CAAC;QACtB,OAAO,GAAG,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACpC,CAAC;IAED,SAAS,CAAC,KAAK,GAAG;QAChB,YAAY,CAAC,OAAO,CAAC,CAAC;IACxB,CAAC,CAAC;IAEF,OAAO,SAAS,CAAC;AACnB,CAAC;AAfD,4BAeC"}
@@ -0,0 +1,22 @@
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 './debounce';
22
+ export * from './types';
@@ -0,0 +1,35 @@
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("./debounce"), exports);
34
+ __exportStar(require("./types"), exports);
35
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;AAEH,6CAA2B;AAC3B,0CAAwB"}
@@ -0,0 +1,25 @@
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
+ /// <reference types="react" />
22
+ export declare type ElementBase<T = HTMLElement> = Omit<React.HTMLProps<T>, 'as' | 'selected' | 'size' | 'onChange'> & {
23
+ /** Override the root element rendered for the component */
24
+ as?: string | React.ComponentType<any>;
25
+ };
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ /**
3
+ *
4
+ * Copyright (c) "Neo4j"
5
+ * Neo4j Sweden AB [http://neo4j.com]
6
+ *
7
+ * This file is part of Neo4j.
8
+ *
9
+ * Neo4j is free software: you can redistribute it and/or modify
10
+ * it under the terms of the GNU General Public License as published by
11
+ * the Free Software Foundation, either version 3 of the License, or
12
+ * (at your option) any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ * GNU General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU General Public License
20
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
+ */
22
+ exports.__esModule = true;
23
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/helpers/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG"}
@@ -0,0 +1,27 @@
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 * as CustomIcons from './custom/index';
23
+ declare type CustomIconNames = keyof typeof CustomIcons;
24
+ export declare const CustomIcon: ({ iconName, ...props }: {
25
+ iconName: CustomIconNames;
26
+ } & React.SVGProps<SVGSVGElement>) => JSX.Element;
27
+ export default CustomIcon;