@neo4j-ndl/react 0.1.1 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/alert/Alert.js +102 -0
- package/lib/cjs/alert/Alert.js.map +1 -0
- package/lib/{alert → cjs/alert}/index.js +6 -10
- package/lib/cjs/alert/index.js.map +1 -0
- package/lib/cjs/button/Button.js +116 -0
- package/lib/cjs/button/Button.js.map +1 -0
- package/lib/{button → cjs/button}/index.js +1 -1
- package/lib/cjs/button/index.js.map +1 -0
- package/lib/{checkbox → cjs/checkbox}/Checkbox.js +10 -20
- package/lib/cjs/checkbox/Checkbox.js.map +1 -0
- package/lib/{checkbox → cjs/checkbox}/index.js +5 -9
- package/lib/cjs/checkbox/index.js.map +1 -0
- package/lib/{context-menu → cjs/context-menu}/ContextMenu.js +78 -94
- package/lib/cjs/context-menu/ContextMenu.js.map +1 -0
- package/lib/{context-menu → cjs/context-menu}/index.js +1 -1
- package/lib/cjs/context-menu/index.js.map +1 -0
- package/lib/{helpers → cjs/helpers}/debounce.js +7 -13
- package/lib/cjs/helpers/debounce.js.map +1 -0
- package/lib/cjs/helpers/forwardRef.js +26 -0
- package/lib/cjs/helpers/forwardRef.js.map +1 -0
- package/lib/{helpers → cjs/helpers}/index.js +2 -1
- package/lib/cjs/helpers/index.js.map +1 -0
- package/lib/cjs/helpers/testing.js +46 -0
- package/lib/cjs/helpers/testing.js.map +1 -0
- package/lib/{helpers → cjs/helpers}/types.js +1 -1
- package/lib/cjs/helpers/types.js.map +1 -0
- package/lib/{icons → cjs/icons}/Custom.js +29 -42
- package/lib/cjs/icons/Custom.js.map +1 -0
- package/lib/cjs/icons/Hero.js +55 -0
- package/lib/cjs/icons/Hero.js.map +1 -0
- package/lib/cjs/icons/custom/Circle.js +6 -0
- package/lib/cjs/icons/custom/Circle.js.map +1 -0
- package/lib/cjs/icons/custom/DatabaseAddCircle.js +6 -0
- package/lib/cjs/icons/custom/DatabaseAddCircle.js.map +1 -0
- package/lib/cjs/icons/custom/Drag.js +6 -0
- package/lib/cjs/icons/custom/Drag.js.map +1 -0
- package/lib/cjs/icons/custom/Expand.js +6 -0
- package/lib/cjs/icons/custom/Expand.js.map +1 -0
- package/lib/cjs/icons/custom/ExternalLink.js +6 -0
- package/lib/cjs/icons/custom/ExternalLink.js.map +1 -0
- package/lib/cjs/icons/custom/FitToScreen.js +6 -0
- package/lib/cjs/icons/custom/FitToScreen.js.map +1 -0
- package/lib/cjs/icons/custom/FolderBookmark.js +6 -0
- package/lib/cjs/icons/custom/FolderBookmark.js.map +1 -0
- package/lib/cjs/icons/custom/Heirarchy2.js +6 -0
- package/lib/cjs/icons/custom/Heirarchy2.js.map +1 -0
- package/lib/cjs/icons/custom/Hierarchy1.js +6 -0
- package/lib/cjs/icons/custom/Hierarchy1.js.map +1 -0
- package/lib/cjs/icons/custom/Pin.js +6 -0
- package/lib/cjs/icons/custom/Pin.js.map +1 -0
- package/lib/cjs/icons/custom/Presentation.js +6 -0
- package/lib/cjs/icons/custom/Presentation.js.map +1 -0
- package/lib/cjs/icons/custom/Rhombus.js +6 -0
- package/lib/cjs/icons/custom/Rhombus.js.map +1 -0
- package/lib/cjs/icons/custom/Shrink.js +6 -0
- package/lib/cjs/icons/custom/Shrink.js.map +1 -0
- package/lib/cjs/icons/custom/Text.js +6 -0
- package/lib/cjs/icons/custom/Text.js.map +1 -0
- package/lib/cjs/icons/custom/Triangle.js +6 -0
- package/lib/cjs/icons/custom/Triangle.js.map +1 -0
- package/lib/cjs/icons/custom/index.js +57 -0
- package/lib/cjs/icons/custom/index.js.map +1 -0
- package/lib/{icons → cjs/icons}/index.js +6 -10
- package/lib/cjs/icons/index.js.map +1 -0
- package/lib/{index.js → cjs/index.js} +2 -1
- package/lib/cjs/index.js.map +1 -0
- package/lib/cjs/input/Input.js +60 -0
- package/lib/cjs/input/Input.js.map +1 -0
- package/lib/{input → cjs/input}/index.js +5 -9
- package/lib/cjs/input/index.js.map +1 -0
- package/lib/cjs/label/Label.js +103 -0
- package/lib/cjs/label/Label.js.map +1 -0
- package/lib/{label → cjs/label}/index.js +5 -9
- package/lib/cjs/label/index.js.map +1 -0
- package/lib/{loading-spinner → cjs/loading-spinner}/LoadingSpinner.js +23 -34
- package/lib/cjs/loading-spinner/LoadingSpinner.js.map +1 -0
- package/lib/{loading-spinner → cjs/loading-spinner}/index.js +5 -9
- package/lib/cjs/loading-spinner/index.js.map +1 -0
- package/lib/{popover → cjs/popover}/Popover.js +81 -96
- package/lib/cjs/popover/Popover.js.map +1 -0
- package/lib/{popover → cjs/popover}/index.js +1 -1
- package/lib/cjs/popover/index.js.map +1 -0
- package/lib/cjs/progress-bar/ProgressBar.js +46 -0
- package/lib/cjs/progress-bar/ProgressBar.js.map +1 -0
- package/lib/{progress-bar → cjs/progress-bar}/index.js +5 -9
- package/lib/cjs/progress-bar/index.js.map +1 -0
- package/lib/{radio → cjs/radio}/Radio.js +10 -20
- package/lib/cjs/radio/Radio.js.map +1 -0
- package/lib/{radio → cjs/radio}/index.js +5 -9
- package/lib/cjs/radio/index.js.map +1 -0
- package/lib/{switch → cjs/switch}/Switch.js +10 -20
- package/lib/cjs/switch/Switch.js.map +1 -0
- package/lib/{switch → cjs/switch}/index.js +5 -9
- package/lib/cjs/switch/index.js.map +1 -0
- package/lib/cjs/tabs/Tabs.js +101 -0
- package/lib/cjs/tabs/Tabs.js.map +1 -0
- package/lib/{tabs → cjs/tabs}/index.js +1 -1
- package/lib/cjs/tabs/index.js.map +1 -0
- package/lib/{tag → cjs/tag}/Tag.js +25 -38
- package/lib/cjs/tag/Tag.js.map +1 -0
- package/lib/{tag → cjs/tag}/index.js +5 -9
- package/lib/cjs/tag/index.js.map +1 -0
- package/lib/{tooltip → cjs/tooltip}/Tooltip.js +23 -35
- package/lib/cjs/tooltip/Tooltip.js.map +1 -0
- package/lib/{tooltip → cjs/tooltip}/index.js +5 -9
- package/lib/cjs/tooltip/index.js.map +1 -0
- package/lib/{icons/Hero.js → cjs/view-selector/ViewSelector.js} +49 -52
- package/lib/cjs/view-selector/ViewSelector.js.map +1 -0
- package/lib/{view-selector → cjs/view-selector}/index.js +1 -1
- package/lib/cjs/view-selector/index.js.map +1 -0
- package/lib/esm/alert/Alert.js +95 -0
- package/lib/esm/alert/Alert.js.map +1 -0
- package/lib/esm/alert/index.js +22 -0
- package/lib/esm/alert/index.js.map +1 -0
- package/lib/esm/button/Button.js +108 -0
- package/lib/esm/button/Button.js.map +1 -0
- package/lib/esm/button/index.js +22 -0
- package/lib/esm/button/index.js.map +1 -0
- package/lib/esm/checkbox/Checkbox.js +47 -0
- package/lib/esm/checkbox/Checkbox.js.map +1 -0
- package/lib/esm/checkbox/index.js +22 -0
- package/lib/esm/checkbox/index.js.map +1 -0
- package/lib/esm/context-menu/ContextMenu.js +189 -0
- package/lib/esm/context-menu/ContextMenu.js.map +1 -0
- package/lib/esm/context-menu/index.js +22 -0
- package/lib/esm/context-menu/index.js.map +1 -0
- package/lib/esm/helpers/debounce.js +37 -0
- package/lib/esm/helpers/debounce.js.map +1 -0
- package/lib/esm/helpers/forwardRef.js +23 -0
- package/lib/esm/helpers/forwardRef.js.map +1 -0
- package/lib/esm/helpers/index.js +24 -0
- package/lib/esm/helpers/index.js.map +1 -0
- package/lib/esm/helpers/testing.js +42 -0
- package/lib/esm/helpers/testing.js.map +1 -0
- package/lib/esm/helpers/types.js +22 -0
- package/lib/esm/helpers/types.js.map +1 -0
- package/lib/esm/icons/Custom.js +41 -0
- package/lib/esm/icons/Custom.js.map +1 -0
- package/lib/esm/icons/Hero.js +33 -0
- package/lib/esm/icons/Hero.js.map +1 -0
- package/lib/esm/icons/custom/Circle.js +4 -0
- package/lib/esm/icons/custom/Circle.js.map +1 -0
- package/lib/esm/icons/custom/DatabaseAddCircle.js +4 -0
- package/lib/esm/icons/custom/DatabaseAddCircle.js.map +1 -0
- package/lib/esm/icons/custom/Drag.js +4 -0
- package/lib/esm/icons/custom/Drag.js.map +1 -0
- package/lib/esm/icons/custom/Expand.js +4 -0
- package/lib/esm/icons/custom/Expand.js.map +1 -0
- package/lib/esm/icons/custom/ExternalLink.js +4 -0
- package/lib/esm/icons/custom/ExternalLink.js.map +1 -0
- package/lib/esm/icons/custom/FitToScreen.js +4 -0
- package/lib/esm/icons/custom/FitToScreen.js.map +1 -0
- package/lib/esm/icons/custom/FolderBookmark.js +4 -0
- package/lib/esm/icons/custom/FolderBookmark.js.map +1 -0
- package/lib/esm/icons/custom/Heirarchy2.js +4 -0
- package/lib/esm/icons/custom/Heirarchy2.js.map +1 -0
- package/lib/esm/icons/custom/Hierarchy1.js +4 -0
- package/lib/esm/icons/custom/Hierarchy1.js.map +1 -0
- package/lib/esm/icons/custom/Pin.js +4 -0
- package/lib/esm/icons/custom/Pin.js.map +1 -0
- package/lib/esm/icons/custom/Presentation.js +4 -0
- package/lib/esm/icons/custom/Presentation.js.map +1 -0
- package/lib/esm/icons/custom/Rhombus.js +4 -0
- package/lib/esm/icons/custom/Rhombus.js.map +1 -0
- package/lib/esm/icons/custom/Shrink.js +4 -0
- package/lib/esm/icons/custom/Shrink.js.map +1 -0
- package/lib/esm/icons/custom/Text.js +4 -0
- package/lib/esm/icons/custom/Text.js.map +1 -0
- package/lib/esm/icons/custom/Triangle.js +4 -0
- package/lib/esm/icons/custom/Triangle.js.map +1 -0
- package/lib/esm/icons/custom/index.js +36 -0
- package/lib/esm/icons/custom/index.js.map +1 -0
- package/lib/esm/icons/index.js +23 -0
- package/lib/esm/icons/index.js.map +1 -0
- package/lib/esm/index.js +35 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/input/Input.js +55 -0
- package/lib/esm/input/Input.js.map +1 -0
- package/lib/esm/input/index.js +22 -0
- package/lib/esm/input/index.js.map +1 -0
- package/lib/esm/label/Label.js +97 -0
- package/lib/esm/label/Label.js.map +1 -0
- package/lib/esm/label/index.js +22 -0
- package/lib/esm/label/index.js.map +1 -0
- package/lib/esm/loading-spinner/LoadingSpinner.js +48 -0
- package/lib/esm/loading-spinner/LoadingSpinner.js.map +1 -0
- package/lib/esm/loading-spinner/index.js +22 -0
- package/lib/esm/loading-spinner/index.js.map +1 -0
- package/lib/esm/popover/Popover.js +184 -0
- package/lib/esm/popover/Popover.js.map +1 -0
- package/lib/esm/popover/index.js +22 -0
- package/lib/esm/popover/index.js.map +1 -0
- package/lib/esm/progress-bar/ProgressBar.js +41 -0
- package/lib/esm/progress-bar/ProgressBar.js.map +1 -0
- package/lib/esm/progress-bar/index.js +22 -0
- package/lib/esm/progress-bar/index.js.map +1 -0
- package/lib/esm/radio/Radio.js +43 -0
- package/lib/esm/radio/Radio.js.map +1 -0
- package/lib/esm/radio/index.js +22 -0
- package/lib/esm/radio/index.js.map +1 -0
- package/lib/esm/switch/Switch.js +43 -0
- package/lib/esm/switch/Switch.js.map +1 -0
- package/lib/esm/switch/index.js +22 -0
- package/lib/esm/switch/index.js.map +1 -0
- package/lib/esm/tabs/Tabs.js +76 -0
- package/lib/esm/tabs/Tabs.js.map +1 -0
- package/lib/esm/tabs/index.js +22 -0
- package/lib/esm/tabs/index.js.map +1 -0
- package/lib/esm/tag/Tag.js +62 -0
- package/lib/esm/tag/Tag.js.map +1 -0
- package/lib/esm/tag/index.js +22 -0
- package/lib/esm/tag/index.js.map +1 -0
- package/lib/esm/tooltip/Tooltip.js +41 -0
- package/lib/esm/tooltip/Tooltip.js.map +1 -0
- package/lib/esm/tooltip/index.js +22 -0
- package/lib/esm/tooltip/index.js.map +1 -0
- package/lib/esm/view-selector/ViewSelector.js +60 -0
- package/lib/esm/view-selector/ViewSelector.js.map +1 -0
- package/lib/esm/view-selector/index.js +22 -0
- package/lib/esm/view-selector/index.js.map +1 -0
- package/lib/{alert → types/alert}/Alert.d.ts +0 -0
- package/lib/{alert → types/alert}/index.d.ts +0 -0
- package/lib/{button → types/button}/Button.d.ts +0 -0
- package/lib/{button → types/button}/index.d.ts +0 -0
- package/lib/{checkbox → types/checkbox}/Checkbox.d.ts +0 -0
- package/lib/{checkbox → types/checkbox}/index.d.ts +0 -0
- package/lib/{context-menu → types/context-menu}/ContextMenu.d.ts +0 -0
- package/lib/{context-menu → types/context-menu}/index.d.ts +0 -0
- package/lib/{helpers → types/helpers}/debounce.d.ts +0 -0
- package/lib/types/helpers/forwardRef.d.ts +24 -0
- package/lib/{helpers → types/helpers}/index.d.ts +1 -0
- package/lib/{helpers → types/helpers}/testing.d.ts +0 -0
- package/lib/{helpers → types/helpers}/types.d.ts +0 -0
- package/lib/types/icons/Custom.d.ts +27 -0
- package/lib/types/icons/Hero.d.ts +28 -0
- package/lib/{icons → types/icons}/custom/Circle.d.ts +0 -0
- package/lib/{icons → types/icons}/custom/DatabaseAddCircle.d.ts +0 -0
- package/lib/{icons → types/icons}/custom/Drag.d.ts +0 -0
- package/lib/{icons → types/icons}/custom/Expand.d.ts +0 -0
- package/lib/{icons → types/icons}/custom/ExternalLink.d.ts +0 -0
- package/lib/{icons → types/icons}/custom/FitToScreen.d.ts +0 -0
- package/lib/{icons → types/icons}/custom/FolderBookmark.d.ts +0 -0
- package/lib/{icons → types/icons}/custom/Heirarchy2.d.ts +0 -0
- package/lib/{icons → types/icons}/custom/Hierarchy1.d.ts +0 -0
- package/lib/{icons → types/icons}/custom/Pin.d.ts +0 -0
- package/lib/{icons → types/icons}/custom/Presentation.d.ts +0 -0
- package/lib/{icons → types/icons}/custom/Rhombus.d.ts +0 -0
- package/lib/{icons → types/icons}/custom/Shrink.d.ts +0 -0
- package/lib/{icons → types/icons}/custom/Text.d.ts +0 -0
- package/lib/{icons → types/icons}/custom/Triangle.d.ts +0 -0
- package/lib/{icons → types/icons}/custom/index.d.ts +0 -0
- package/lib/{icons → types/icons}/index.d.ts +0 -0
- package/lib/{index.d.ts → types/index.d.ts} +1 -0
- package/lib/{input → types/input}/Input.d.ts +0 -0
- package/lib/{input → types/input}/index.d.ts +0 -0
- package/lib/{label → types/label}/Label.d.ts +2 -2
- package/lib/{label → types/label}/index.d.ts +0 -0
- package/lib/{loading-spinner → types/loading-spinner}/LoadingSpinner.d.ts +0 -0
- package/lib/{loading-spinner → types/loading-spinner}/index.d.ts +0 -0
- package/lib/{popover → types/popover}/Popover.d.ts +0 -0
- package/lib/{popover → types/popover}/index.d.ts +0 -0
- package/lib/{progress-bar → types/progress-bar}/ProgressBar.d.ts +0 -0
- package/lib/{progress-bar → types/progress-bar}/index.d.ts +0 -0
- package/lib/{radio → types/radio}/Radio.d.ts +0 -0
- package/lib/{radio → types/radio}/index.d.ts +0 -0
- package/lib/{switch → types/switch}/Switch.d.ts +0 -0
- package/lib/{switch → types/switch}/index.d.ts +0 -0
- package/lib/{tabs → types/tabs}/Tabs.d.ts +0 -0
- package/lib/{tabs → types/tabs}/index.d.ts +0 -0
- package/lib/{tag → types/tag}/Tag.d.ts +0 -0
- package/lib/{tag → types/tag}/index.d.ts +0 -0
- package/lib/{tooltip → types/tooltip}/Tooltip.d.ts +0 -0
- package/lib/{tooltip → types/tooltip}/index.d.ts +0 -0
- package/lib/{view-selector → types/view-selector}/ViewSelector.d.ts +2 -2
- package/lib/{view-selector → types/view-selector}/index.d.ts +0 -0
- package/package.json +16 -8
- package/lib/alert/Alert.js +0 -121
- package/lib/alert/Alert.js.map +0 -1
- package/lib/alert/index.js.map +0 -1
- package/lib/button/Button.js +0 -112
- package/lib/button/Button.js.map +0 -1
- package/lib/button/index.js.map +0 -1
- package/lib/checkbox/Checkbox.js.map +0 -1
- package/lib/checkbox/index.js.map +0 -1
- package/lib/context-menu/ContextMenu.js.map +0 -1
- package/lib/context-menu/index.js.map +0 -1
- package/lib/helpers/debounce.js.map +0 -1
- package/lib/helpers/index.js.map +0 -1
- package/lib/helpers/testing.js +0 -81
- package/lib/helpers/testing.js.map +0 -1
- package/lib/helpers/types.js.map +0 -1
- package/lib/icons/Custom.d.ts +0 -27
- package/lib/icons/Custom.js.map +0 -1
- package/lib/icons/Hero.d.ts +0 -28
- package/lib/icons/Hero.js.map +0 -1
- package/lib/icons/custom/Circle.js +0 -57
- package/lib/icons/custom/Circle.js.map +0 -1
- package/lib/icons/custom/DatabaseAddCircle.js +0 -57
- package/lib/icons/custom/DatabaseAddCircle.js.map +0 -1
- package/lib/icons/custom/Drag.js +0 -62
- package/lib/icons/custom/Drag.js.map +0 -1
- package/lib/icons/custom/Expand.js +0 -57
- package/lib/icons/custom/Expand.js.map +0 -1
- package/lib/icons/custom/ExternalLink.js +0 -57
- package/lib/icons/custom/ExternalLink.js.map +0 -1
- package/lib/icons/custom/FitToScreen.js +0 -57
- package/lib/icons/custom/FitToScreen.js.map +0 -1
- package/lib/icons/custom/FolderBookmark.js +0 -57
- package/lib/icons/custom/FolderBookmark.js.map +0 -1
- package/lib/icons/custom/Heirarchy2.js +0 -57
- package/lib/icons/custom/Heirarchy2.js.map +0 -1
- package/lib/icons/custom/Hierarchy1.js +0 -57
- package/lib/icons/custom/Hierarchy1.js.map +0 -1
- package/lib/icons/custom/Pin.js +0 -57
- package/lib/icons/custom/Pin.js.map +0 -1
- package/lib/icons/custom/Presentation.js +0 -57
- package/lib/icons/custom/Presentation.js.map +0 -1
- package/lib/icons/custom/Rhombus.js +0 -57
- package/lib/icons/custom/Rhombus.js.map +0 -1
- package/lib/icons/custom/Shrink.js +0 -57
- package/lib/icons/custom/Shrink.js.map +0 -1
- package/lib/icons/custom/Text.js +0 -57
- package/lib/icons/custom/Text.js.map +0 -1
- package/lib/icons/custom/Triangle.js +0 -57
- package/lib/icons/custom/Triangle.js.map +0 -1
- package/lib/icons/custom/index.js +0 -61
- package/lib/icons/custom/index.js.map +0 -1
- package/lib/icons/index.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/input/Input.js +0 -92
- package/lib/input/Input.js.map +0 -1
- package/lib/input/index.js.map +0 -1
- package/lib/label/Label.js +0 -103
- package/lib/label/Label.js.map +0 -1
- package/lib/label/index.js.map +0 -1
- package/lib/loading-spinner/LoadingSpinner.js.map +0 -1
- package/lib/loading-spinner/index.js.map +0 -1
- package/lib/popover/Popover.js.map +0 -1
- package/lib/popover/index.js.map +0 -1
- package/lib/progress-bar/ProgressBar.js +0 -64
- package/lib/progress-bar/ProgressBar.js.map +0 -1
- package/lib/progress-bar/index.js.map +0 -1
- package/lib/radio/Radio.js.map +0 -1
- package/lib/radio/index.js.map +0 -1
- package/lib/switch/Switch.js.map +0 -1
- package/lib/switch/index.js.map +0 -1
- package/lib/tabs/Tabs.js +0 -114
- package/lib/tabs/Tabs.js.map +0 -1
- package/lib/tabs/index.js.map +0 -1
- package/lib/tag/Tag.js.map +0 -1
- package/lib/tag/index.js.map +0 -1
- package/lib/tooltip/Tooltip.js.map +0 -1
- package/lib/tooltip/index.js.map +0 -1
- package/lib/view-selector/ViewSelector.js +0 -95
- package/lib/view-selector/ViewSelector.js.map +0 -1
- package/lib/view-selector/index.js.map +0 -1
|
@@ -1,35 +1,4 @@
|
|
|
1
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
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
34
3
|
if (k2 === undefined) k2 = k;
|
|
35
4
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
@@ -63,148 +32,167 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
63
32
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
64
33
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
65
34
|
};
|
|
66
|
-
exports
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67
36
|
exports.Popover = void 0;
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
37
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* Copyright (c) "Neo4j"
|
|
41
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
42
|
+
*
|
|
43
|
+
* This file is part of Neo4j.
|
|
44
|
+
*
|
|
45
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
46
|
+
* it under the terms of the GNU General Public License as published by
|
|
47
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
48
|
+
* (at your option) any later version.
|
|
49
|
+
*
|
|
50
|
+
* This program is distributed in the hope that it will be useful,
|
|
51
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
52
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
53
|
+
* GNU General Public License for more details.
|
|
54
|
+
*
|
|
55
|
+
* You should have received a copy of the GNU General Public License
|
|
56
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
57
|
+
*/
|
|
58
|
+
const react_1 = require("react");
|
|
59
|
+
const ReactDOM = __importStar(require("react-dom"));
|
|
60
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
61
|
+
const helpers_1 = require("../helpers");
|
|
62
|
+
const getScrollbarSize = (doc) => {
|
|
73
63
|
// https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
|
|
74
|
-
|
|
64
|
+
const documentWidth = doc.documentElement.clientWidth;
|
|
75
65
|
return Math.abs(window.innerWidth - documentWidth);
|
|
76
66
|
};
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
var getOffsetTop = function (rect, vertical) {
|
|
81
|
-
var offset = 0;
|
|
67
|
+
const getPaddingRight = (element) => parseInt(window.getComputedStyle(element).paddingRight, 10) || 0;
|
|
68
|
+
const getOffsetTop = (rect, vertical) => {
|
|
69
|
+
let offset = 0;
|
|
82
70
|
if (vertical === 'bottom') {
|
|
83
71
|
offset = rect.height;
|
|
84
72
|
}
|
|
85
73
|
return offset;
|
|
86
74
|
};
|
|
87
|
-
|
|
88
|
-
|
|
75
|
+
const getOffsetLeft = (rect, horizontal) => {
|
|
76
|
+
let offset = 0;
|
|
89
77
|
if (horizontal === 'right') {
|
|
90
78
|
offset = rect.width;
|
|
91
79
|
}
|
|
92
80
|
return offset;
|
|
93
81
|
};
|
|
94
82
|
exports.Popover = (0, react_1.forwardRef)(function Popover(_a, ref) {
|
|
95
|
-
var
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
83
|
+
var { as = 'div', children, open, anchorEl, onClose, anchorOrigin = { vertical: 'bottom', horizontal: 'left' }, transformOrigin = { vertical: 'top', horizontal: 'left' }, className, nested = false } = _a, rest = __rest(_a, ["as", "children", "open", "anchorEl", "onClose", "anchorOrigin", "transformOrigin", "className", "nested"]);
|
|
84
|
+
const Component = as;
|
|
85
|
+
const popoverRef = (0, react_1.useRef)();
|
|
86
|
+
const bodyPadding = (0, react_1.useRef)(0);
|
|
99
87
|
// Override ref to map to internal ref
|
|
100
|
-
(0, react_1.useImperativeHandle)(ref,
|
|
101
|
-
|
|
88
|
+
(0, react_1.useImperativeHandle)(ref, () => {
|
|
89
|
+
const popover = popoverRef.current;
|
|
102
90
|
if (!popover) {
|
|
103
91
|
return null;
|
|
104
92
|
}
|
|
105
93
|
return popover;
|
|
106
94
|
});
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
open
|
|
110
|
-
enter
|
|
95
|
+
const [enter, setEnter] = (0, react_1.useState)(false);
|
|
96
|
+
const base = (0, classnames_1.default)({
|
|
97
|
+
open,
|
|
98
|
+
enter,
|
|
111
99
|
});
|
|
112
|
-
|
|
100
|
+
const getPositioningStyles = (0, react_1.useCallback)((element) => {
|
|
113
101
|
if (!anchorEl)
|
|
114
102
|
throw Error('Missing anchorEl for Popover component');
|
|
115
|
-
|
|
116
|
-
|
|
103
|
+
const anchorRect = anchorEl.getBoundingClientRect();
|
|
104
|
+
const menuRect = {
|
|
117
105
|
width: element.offsetWidth,
|
|
118
|
-
height: element.offsetHeight
|
|
106
|
+
height: element.offsetHeight,
|
|
119
107
|
};
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
108
|
+
const transformX = transformOrigin.horizontal == 'right' ? -menuRect.width : 0;
|
|
109
|
+
const transformY = transformOrigin.vertical == 'bottom' ? -menuRect.height : 0;
|
|
110
|
+
const marginThreshold = 16; // An arbitrary margin between the menu popup and the border of the window
|
|
123
111
|
// Window thresholds taking required margin into account
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
112
|
+
const heightThreshold = window.innerHeight - marginThreshold;
|
|
113
|
+
const widthThreshold = window.innerWidth - marginThreshold;
|
|
114
|
+
let top = anchorRect.top +
|
|
127
115
|
getOffsetTop(anchorRect, anchorOrigin.vertical) +
|
|
128
116
|
transformY;
|
|
129
|
-
|
|
117
|
+
let left = anchorRect.left +
|
|
130
118
|
getOffsetLeft(anchorRect, anchorOrigin.horizontal) +
|
|
131
119
|
transformX;
|
|
132
|
-
|
|
133
|
-
|
|
120
|
+
const right = left + menuRect.width;
|
|
121
|
+
const bottom = top + menuRect.height;
|
|
134
122
|
// Check if the vertical axis needs shifting
|
|
135
123
|
if (top < marginThreshold) {
|
|
136
|
-
|
|
124
|
+
const diff = top - marginThreshold;
|
|
137
125
|
top -= diff;
|
|
138
126
|
}
|
|
139
127
|
else if (bottom > heightThreshold) {
|
|
140
|
-
|
|
128
|
+
const diff = bottom - heightThreshold;
|
|
141
129
|
top -= diff;
|
|
142
130
|
}
|
|
143
131
|
// Check if the horizontal axis needs shifting
|
|
144
132
|
if (left < marginThreshold) {
|
|
145
|
-
|
|
133
|
+
const diff = left - marginThreshold;
|
|
146
134
|
left -= diff;
|
|
147
135
|
}
|
|
148
136
|
else if (right > widthThreshold) {
|
|
149
|
-
|
|
137
|
+
const diff = right - widthThreshold;
|
|
150
138
|
left -= diff;
|
|
151
139
|
}
|
|
152
140
|
return {
|
|
153
|
-
top
|
|
154
|
-
left
|
|
141
|
+
top,
|
|
142
|
+
left,
|
|
155
143
|
};
|
|
156
144
|
}, [anchorOrigin, transformOrigin, anchorEl]);
|
|
157
|
-
|
|
158
|
-
|
|
145
|
+
const setPositioningStyles = (0, react_1.useCallback)(() => {
|
|
146
|
+
const element = popoverRef.current;
|
|
159
147
|
if (!element) {
|
|
160
148
|
return;
|
|
161
149
|
}
|
|
162
|
-
|
|
150
|
+
const positioning = getPositioningStyles(element);
|
|
163
151
|
if (positioning.top !== null) {
|
|
164
|
-
element.style.top =
|
|
152
|
+
element.style.top = `${positioning.top}px`;
|
|
165
153
|
}
|
|
166
154
|
if (positioning.left !== null) {
|
|
167
|
-
element.style.left =
|
|
155
|
+
element.style.left = `${positioning.left}px`;
|
|
168
156
|
}
|
|
169
157
|
}, [getPositioningStyles]);
|
|
170
158
|
// Disable scroll and add padding when the popover is open
|
|
171
|
-
(0, react_1.useEffect)(
|
|
159
|
+
(0, react_1.useEffect)(() => {
|
|
172
160
|
if (nested) {
|
|
173
161
|
return;
|
|
174
162
|
}
|
|
175
163
|
if (open) {
|
|
176
|
-
|
|
164
|
+
const existingPaddingRight = getPaddingRight(document.body);
|
|
177
165
|
bodyPadding.current = existingPaddingRight;
|
|
178
|
-
|
|
166
|
+
const newPaddingRight = existingPaddingRight + getScrollbarSize(document);
|
|
179
167
|
document.body.style.overflow = 'hidden';
|
|
180
|
-
document.body.style.paddingRight =
|
|
168
|
+
document.body.style.paddingRight = `${newPaddingRight}px`;
|
|
181
169
|
}
|
|
182
170
|
else {
|
|
183
171
|
document.body.style.overflow = '';
|
|
184
|
-
document.body.style.paddingRight =
|
|
172
|
+
document.body.style.paddingRight = `${bodyPadding.current}px`;
|
|
185
173
|
}
|
|
186
174
|
}, [open, nested]);
|
|
187
|
-
(0, react_1.useEffect)(
|
|
175
|
+
(0, react_1.useEffect)(() => {
|
|
188
176
|
if (open) {
|
|
189
177
|
setPositioningStyles();
|
|
190
178
|
}
|
|
191
179
|
}, [open, setPositioningStyles]);
|
|
192
180
|
// Set Enter to trigger fade in animation
|
|
193
|
-
(0, react_1.useEffect)(
|
|
194
|
-
(0, react_1.useEffect)(
|
|
181
|
+
(0, react_1.useEffect)(() => setEnter(open), [open]);
|
|
182
|
+
(0, react_1.useEffect)(() => {
|
|
195
183
|
if (!open) {
|
|
196
184
|
return undefined;
|
|
197
185
|
}
|
|
198
|
-
|
|
186
|
+
const handleResize = (0, helpers_1.debounce)(() => {
|
|
199
187
|
setPositioningStyles();
|
|
200
188
|
});
|
|
201
189
|
window.addEventListener('resize', handleResize);
|
|
202
|
-
return
|
|
190
|
+
return () => {
|
|
203
191
|
handleResize.clear();
|
|
204
192
|
window.removeEventListener('resize', handleResize);
|
|
205
193
|
};
|
|
206
194
|
}, [anchorEl, open, setPositioningStyles]);
|
|
207
|
-
|
|
195
|
+
const handleBackdropClick = (event) => {
|
|
208
196
|
event.stopPropagation();
|
|
209
197
|
event.preventDefault();
|
|
210
198
|
onClose && onClose(event);
|
|
@@ -212,13 +200,10 @@ exports.Popover = (0, react_1.forwardRef)(function Popover(_a, ref) {
|
|
|
212
200
|
if (!open) {
|
|
213
201
|
return null;
|
|
214
202
|
}
|
|
215
|
-
|
|
216
|
-
return (
|
|
217
|
-
react_1["default"].createElement("div", { className: "ndl-popover-backdrop", role: "button", tabIndex: 0, onClick: handleBackdropClick, onKeyDown: handleBackdropClick, "data-testid": "popover-backdrop" }),
|
|
218
|
-
react_1["default"].createElement(Component, __assign({ tabIndex: -1 }, rest, { className: classes, ref: popoverRef, "data-testid": "popover-content" }), children)));
|
|
203
|
+
const classes = (0, classnames_1.default)('ndl-popover', base, className);
|
|
204
|
+
return ((0, jsx_runtime_1.jsxs)(Portal, Object.assign({ container: document.body }, { children: [(0, jsx_runtime_1.jsx)("div", { className: "ndl-popover-backdrop", role: "button", tabIndex: 0, onClick: handleBackdropClick, onKeyDown: handleBackdropClick, "data-testid": "popover-backdrop" }, void 0), (0, jsx_runtime_1.jsx)(Component, Object.assign({ tabIndex: -1 }, rest, { className: classes, ref: popoverRef, "data-testid": "popover-content" }, { children: children }), void 0)] }), void 0));
|
|
219
205
|
});
|
|
220
|
-
|
|
221
|
-
var children = _a.children, container = _a.container;
|
|
206
|
+
const Portal = ({ children, container }) => {
|
|
222
207
|
return ReactDOM.createPortal(children, container);
|
|
223
208
|
};
|
|
224
209
|
//# sourceMappingURL=Popover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Popover.js","sourceRoot":"","sources":["../../../src/popover/Popover.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,iCAOe;AACf,oDAAsC;AACtC,4DAAoC;AACpC,wCAAsC;AAetC,MAAM,gBAAgB,GAAG,CAAC,GAAa,EAAU,EAAE;IACjD,iFAAiF;IACjF,MAAM,aAAa,GAAG,GAAG,CAAC,eAAe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AAO,QAAQ,CAAC,YAAY,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;AACpD,CAAC,CAAC"}
|
|
@@ -29,6 +29,6 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
29
29
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
30
30
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
31
31
|
};
|
|
32
|
-
exports
|
|
32
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
33
|
__exportStar(require("./Popover"), exports);
|
|
34
34
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/popover/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;AAEH,4CAA0B"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* Copyright (c) "Neo4j"
|
|
21
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
22
|
+
*
|
|
23
|
+
* This file is part of Neo4j.
|
|
24
|
+
*
|
|
25
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
26
|
+
* it under the terms of the GNU General Public License as published by
|
|
27
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
28
|
+
* (at your option) any later version.
|
|
29
|
+
*
|
|
30
|
+
* This program is distributed in the hope that it will be useful,
|
|
31
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
32
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
33
|
+
* GNU General Public License for more details.
|
|
34
|
+
*
|
|
35
|
+
* You should have received a copy of the GNU General Public License
|
|
36
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
37
|
+
*/
|
|
38
|
+
const react_1 = __importDefault(require("react"));
|
|
39
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
40
|
+
const ProgressBar = react_1.default.forwardRef(function ProgressBar(_a, ref) {
|
|
41
|
+
var { heading, estimatedTime, value, barSize = 'small', className } = _a, rest = __rest(_a, ["heading", "estimatedTime", "value", "barSize", "className"]);
|
|
42
|
+
const classes = (0, classnames_1.default)('ndl-progress-bar-wrapper', barSize, className);
|
|
43
|
+
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({}, rest, { className: classes, ref: ref }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "header" }, { children: [(0, jsx_runtime_1.jsx)("span", Object.assign({ className: "heading" }, { children: heading }), void 0), (0, jsx_runtime_1.jsx)("span", Object.assign({ className: "progress-number" }, { children: value + '%' }), void 0)] }), void 0), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "progress-bar-container", role: "progressbar", title: "progress bar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": value }, { children: (0, jsx_runtime_1.jsx)("div", { className: "progress-bar", style: { width: value + '%' } }, void 0) }), void 0), estimatedTime && ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "details" }, { children: [(0, jsx_runtime_1.jsx)("span", Object.assign({ className: "estimated-time-heading" }, { children: "Estimated time:" }), void 0), (0, jsx_runtime_1.jsx)("span", Object.assign({ className: "estimated-time" }, { children: estimatedTime }), void 0)] }), void 0))] }), void 0));
|
|
44
|
+
});
|
|
45
|
+
exports.default = ProgressBar;
|
|
46
|
+
//# sourceMappingURL=ProgressBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProgressBar.js","sourceRoot":"","sources":["../../../src/progress-bar/ProgressBar.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,kDAA0B;AAC1B,4DAAoC;AAUpC,MAAM,WAAW,GAAG,eAAK,CAAC,UAAU,CAAC,SAAS,WAAW,CACvD,EAOmB,EACnB,GAAuC;QARvC,EACE,OAAO,EACP,aAAa,EACb,KAAK,EACL,OAAO,GAAG,OAAO,EACjB,SAAS,OAEQ,EADd,IAAI,cANT,6DAOC,CADQ;IAIT,MAAM,OAAO,GAAG,IAAA,oBAAU,EAAC,0BAA0B,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;IAE3E,OAAO,CACL,iDAAS,IAAI,IAAE,SAAS,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,iBACzC,+CAAK,SAAS,EAAC,QAAQ,iBACrB,+CAAM,SAAS,EAAC,SAAS,gBAAE,OAAO,YAAQ,EAC1C,+CAAM,SAAS,EAAC,iBAAiB,gBAAE,KAAK,GAAG,GAAG,YAAQ,aAClD,EACN,8CACE,SAAS,EAAC,wBAAwB,EAClC,IAAI,EAAC,aAAa,EAClB,KAAK,EAAC,cAAc,mBACL,CAAC,mBACD,GAAG,mBACH,KAAK,gBAEpB,gCAAK,SAAS,EAAC,cAAc,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,GAAG,GAAG,EAAE,WAAI,YAC3D,EACL,aAAa,IAAI,CAChB,+CAAK,SAAS,EAAC,SAAS,iBACtB,+CAAM,SAAS,EAAC,wBAAwB,6CAAuB,EAC/D,+CAAM,SAAS,EAAC,gBAAgB,gBAAE,aAAa,YAAQ,aACnD,CACP,aACG,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,kBAAe,WAAW,CAAC"}
|
|
@@ -19,15 +19,11 @@
|
|
|
19
19
|
* You should have received a copy of the GNU General Public License
|
|
20
20
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
21
|
*/
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
if (k2 === undefined) k2 = k;
|
|
27
|
-
o[k2] = m[k];
|
|
28
|
-
}));
|
|
29
|
-
exports.__esModule = true;
|
|
22
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
23
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
26
|
exports.ProgressBar = void 0;
|
|
31
27
|
var ProgressBar_1 = require("./ProgressBar");
|
|
32
|
-
|
|
28
|
+
Object.defineProperty(exports, "ProgressBar", { enumerable: true, get: function () { return __importDefault(ProgressBar_1).default; } });
|
|
33
29
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/progress-bar/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,6CAAuD;AAA9C,2HAAA,OAAO,OAAe"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
2
7
|
/**
|
|
3
8
|
*
|
|
4
9
|
* Copyright (c) "Neo4j"
|
|
@@ -19,23 +24,8 @@
|
|
|
19
24
|
* You should have received a copy of the GNU General Public License
|
|
20
25
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
26
|
*/
|
|
22
|
-
|
|
23
|
-
|
|
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");
|
|
27
|
+
const react_1 = __importDefault(require("react"));
|
|
28
|
+
const input_1 = require("../input");
|
|
39
29
|
/**
|
|
40
30
|
*
|
|
41
31
|
*
|
|
@@ -51,8 +41,8 @@ var input_1 = require("../input");
|
|
|
51
41
|
*
|
|
52
42
|
*
|
|
53
43
|
*/
|
|
54
|
-
|
|
55
|
-
return
|
|
44
|
+
const Radio = react_1.default.forwardRef(function Radio(props, ref) {
|
|
45
|
+
return (0, jsx_runtime_1.jsx)(input_1.Input, Object.assign({}, props, { type: "radio", role: "radio", ref: ref }), void 0);
|
|
56
46
|
});
|
|
57
|
-
exports
|
|
47
|
+
exports.default = Radio;
|
|
58
48
|
//# sourceMappingURL=Radio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Radio.js","sourceRoot":"","sources":["../../../src/radio/Radio.tsx"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,kDAA0B;AAC1B,oCAAiC;AAGjC;;;;;;GAMG;AAEH,qCAAqC;AAErC;;;;;;GAMG;AAEH,MAAM,KAAK,GAAG,eAAK,CAAC,UAAU,CAAC,SAAS,KAAK,CAC3C,KAAiB,EACjB,GAAyC;IAEzC,OAAO,uBAAC,aAAK,oBAAK,KAAK,IAAE,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,OAAO,EAAC,GAAG,EAAE,GAAG,YAAI,CAAC;AAClE,CAAC,CAAC,CAAC;AAEH,kBAAe,KAAK,CAAC"}
|
|
@@ -19,15 +19,11 @@
|
|
|
19
19
|
* You should have received a copy of the GNU General Public License
|
|
20
20
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
21
|
*/
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
if (k2 === undefined) k2 = k;
|
|
27
|
-
o[k2] = m[k];
|
|
28
|
-
}));
|
|
29
|
-
exports.__esModule = true;
|
|
22
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
23
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
26
|
exports.Radio = void 0;
|
|
31
27
|
var Radio_1 = require("./Radio");
|
|
32
|
-
|
|
28
|
+
Object.defineProperty(exports, "Radio", { enumerable: true, get: function () { return __importDefault(Radio_1).default; } });
|
|
33
29
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/radio/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,iCAA2C;AAAlC,+GAAA,OAAO,OAAS"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
2
7
|
/**
|
|
3
8
|
*
|
|
4
9
|
* Copyright (c) "Neo4j"
|
|
@@ -19,23 +24,8 @@
|
|
|
19
24
|
* You should have received a copy of the GNU General Public License
|
|
20
25
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
26
|
*/
|
|
22
|
-
|
|
23
|
-
|
|
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");
|
|
27
|
+
const react_1 = __importDefault(require("react"));
|
|
28
|
+
const input_1 = require("../input");
|
|
39
29
|
/**
|
|
40
30
|
*
|
|
41
31
|
*
|
|
@@ -51,8 +41,8 @@ var input_1 = require("../input");
|
|
|
51
41
|
*
|
|
52
42
|
*
|
|
53
43
|
*/
|
|
54
|
-
|
|
55
|
-
return
|
|
44
|
+
const Switch = react_1.default.forwardRef(function Switch(props, ref) {
|
|
45
|
+
return (0, jsx_runtime_1.jsx)(input_1.Input, Object.assign({}, props, { ref: ref, type: "checkbox", role: "switch" }), void 0);
|
|
56
46
|
});
|
|
57
|
-
exports
|
|
47
|
+
exports.default = Switch;
|
|
58
48
|
//# sourceMappingURL=Switch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Switch.js","sourceRoot":"","sources":["../../../src/switch/Switch.tsx"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,kDAA0B;AAC1B,oCAAiC;AAGjC;;;;;;GAMG;AAEH,qCAAqC;AAErC;;;;;;GAMG;AAEH,MAAM,MAAM,GAAG,eAAK,CAAC,UAAU,CAAC,SAAS,MAAM,CAC7C,KAAiB,EACjB,GAAyC;IAEzC,OAAO,uBAAC,aAAK,oBAAK,KAAK,IAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAC,UAAU,EAAC,IAAI,EAAC,QAAQ,YAAG,CAAC;AACtE,CAAC,CAAC,CAAC;AAEH,kBAAe,MAAM,CAAC"}
|
|
@@ -19,15 +19,11 @@
|
|
|
19
19
|
* You should have received a copy of the GNU General Public License
|
|
20
20
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
21
|
*/
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
if (k2 === undefined) k2 = k;
|
|
27
|
-
o[k2] = m[k];
|
|
28
|
-
}));
|
|
29
|
-
exports.__esModule = true;
|
|
22
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
23
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
26
|
exports.Switch = void 0;
|
|
31
27
|
var Switch_1 = require("./Switch");
|
|
32
|
-
|
|
28
|
+
Object.defineProperty(exports, "Switch", { enumerable: true, get: function () { return __importDefault(Switch_1).default; } });
|
|
33
29
|
//# 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,iHAAA,OAAO,OAAU"}
|