@neo4j-ndl/react 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +6 -2
- 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 +83 -95
- package/lib/cjs/context-menu/ContextMenu.js.map +1 -0
- package/lib/{context-menu → cjs/context-menu}/index.js +6 -2
- package/lib/cjs/context-menu/index.js.map +1 -0
- package/lib/cjs/drag-and-drop/DragAndDrop.js +66 -0
- package/lib/cjs/drag-and-drop/DragAndDrop.js.map +1 -0
- package/lib/cjs/drag-and-drop/icons/CSV-file.js +6 -0
- package/lib/cjs/drag-and-drop/icons/CSV-file.js.map +1 -0
- package/lib/cjs/drag-and-drop/icons/Cloud.js +6 -0
- package/lib/cjs/drag-and-drop/icons/Cloud.js.map +1 -0
- package/lib/cjs/drag-and-drop/icons/File.js +6 -0
- package/lib/cjs/drag-and-drop/icons/File.js.map +1 -0
- package/lib/cjs/drag-and-drop/icons/InvalidFile.js +6 -0
- package/lib/cjs/drag-and-drop/icons/InvalidFile.js.map +1 -0
- package/lib/cjs/drag-and-drop/index.js +29 -0
- package/lib/cjs/drag-and-drop/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/{helpers → cjs/helpers}/forwardRef.js +2 -2
- package/lib/cjs/helpers/forwardRef.js.map +1 -0
- package/lib/{helpers → cjs/helpers}/index.js +6 -2
- 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 +33 -43
- package/lib/cjs/icons/Custom.js.map +1 -0
- package/lib/cjs/icons/Hero.js +59 -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/CollapseExpand.js +6 -0
- package/lib/cjs/icons/custom/CollapseExpand.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/Dbms.js +6 -0
- package/lib/cjs/icons/custom/Dbms.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/Hierarchy2.js +6 -0
- package/lib/cjs/icons/custom/Hierarchy2.js.map +1 -0
- package/lib/cjs/icons/custom/NomLevel.js +6 -0
- package/lib/cjs/icons/custom/NomLevel.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/QueryBrowser.js +6 -0
- package/lib/cjs/icons/custom/QueryBrowser.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/ScienceMolecule.js +6 -0
- package/lib/cjs/icons/custom/ScienceMolecule.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/VisualizeBloom.js +6 -0
- package/lib/cjs/icons/custom/VisualizeBloom.js.map +1 -0
- package/lib/cjs/icons/custom/index.js +71 -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} +8 -2
- 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 +86 -97
- package/lib/cjs/popover/Popover.js.map +1 -0
- package/lib/{popover → cjs/popover}/index.js +6 -2
- 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 +105 -0
- package/lib/cjs/tabs/Tabs.js.map +1 -0
- package/lib/{tabs → cjs/tabs}/index.js +6 -2
- 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/{view-selector → cjs/view-selector}/ViewSelector.js +45 -52
- package/lib/cjs/view-selector/ViewSelector.js.map +1 -0
- package/lib/{view-selector → cjs/view-selector}/index.js +6 -2
- 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/drag-and-drop/DragAndDrop.js +61 -0
- package/lib/esm/drag-and-drop/DragAndDrop.js.map +1 -0
- package/lib/esm/drag-and-drop/icons/CSV-file.js +4 -0
- package/lib/esm/drag-and-drop/icons/CSV-file.js.map +1 -0
- package/lib/esm/drag-and-drop/icons/Cloud.js +4 -0
- package/lib/esm/drag-and-drop/icons/Cloud.js.map +1 -0
- package/lib/esm/drag-and-drop/icons/File.js +4 -0
- package/lib/esm/drag-and-drop/icons/File.js.map +1 -0
- package/lib/esm/drag-and-drop/icons/InvalidFile.js +4 -0
- package/lib/esm/drag-and-drop/icons/InvalidFile.js.map +1 -0
- package/lib/esm/drag-and-drop/index.js +22 -0
- package/lib/esm/drag-and-drop/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/CollapseExpand.js +4 -0
- package/lib/esm/icons/custom/CollapseExpand.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/Dbms.js +4 -0
- package/lib/esm/icons/custom/Dbms.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/Hierarchy2.js +4 -0
- package/lib/esm/icons/custom/Hierarchy2.js.map +1 -0
- package/lib/esm/icons/custom/NomLevel.js +4 -0
- package/lib/esm/icons/custom/NomLevel.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/QueryBrowser.js +4 -0
- package/lib/esm/icons/custom/QueryBrowser.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/ScienceMolecule.js +4 -0
- package/lib/esm/icons/custom/ScienceMolecule.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/VisualizeBloom.js +4 -0
- package/lib/esm/icons/custom/VisualizeBloom.js.map +1 -0
- package/lib/esm/icons/custom/index.js +43 -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 +36 -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/types/drag-and-drop/DragAndDrop.d.ts +47 -0
- package/lib/types/drag-and-drop/icons/CSV-file.d.ts +23 -0
- package/lib/types/drag-and-drop/icons/Cloud.d.ts +23 -0
- package/lib/types/drag-and-drop/icons/File.d.ts +23 -0
- package/lib/types/drag-and-drop/icons/InvalidFile.d.ts +23 -0
- package/lib/types/drag-and-drop/index.d.ts +21 -0
- package/lib/{helpers → types/helpers}/debounce.d.ts +0 -0
- package/lib/{helpers → types/helpers}/forwardRef.d.ts +0 -0
- package/lib/{helpers → types/helpers}/index.d.ts +0 -0
- package/lib/{helpers → types/helpers}/testing.d.ts +0 -0
- package/lib/{helpers → types/helpers}/types.d.ts +0 -0
- package/lib/{icons → types/icons}/Custom.d.ts +0 -0
- package/lib/{icons → types/icons}/Hero.d.ts +0 -0
- package/lib/{icons → types/icons}/custom/Circle.d.ts +0 -0
- package/lib/types/icons/custom/CollapseExpand.d.ts +23 -0
- package/lib/{icons → types/icons}/custom/DatabaseAddCircle.d.ts +0 -0
- package/lib/types/icons/custom/Dbms.d.ts +23 -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/types/icons/custom/Hierarchy2.d.ts +23 -0
- package/lib/types/icons/custom/NomLevel.d.ts +23 -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/types/icons/custom/QueryBrowser.d.ts +23 -0
- package/lib/{icons → types/icons}/custom/Rhombus.d.ts +0 -0
- package/lib/types/icons/custom/ScienceMolecule.d.ts +23 -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/types/icons/custom/VisualizeBloom.d.ts +23 -0
- package/lib/{icons → types/icons}/custom/index.d.ts +7 -0
- package/lib/{icons → types/icons}/index.d.ts +0 -0
- package/lib/{index.d.ts → types/index.d.ts} +2 -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 +0 -0
- package/lib/{view-selector → types/view-selector}/index.d.ts +0 -0
- package/package.json +19 -10
- 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/forwardRef.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.js.map +0 -1
- package/lib/icons/Hero.js +0 -89
- 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.map +0 -1
- package/lib/view-selector/index.js.map +0 -1
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
const SvgTriangle = (props) => (_jsx("svg", Object.assign({ width: "1em", height: "1em", viewBox: "0 0 9 9", fill: "none" }, props, { children: _jsx("path", { d: "M5.24242 1.22256C5.18951 1.11483 5.10746 1.02408 5.00558 0.960624C4.90371 0.897164 4.78609 0.863525 4.66606 0.863525C4.54604 0.863525 4.42842 0.897164 4.32654 0.960624C4.22467 1.02408 4.14262 1.11483 4.0897 1.22256L0.721486 8.08414C0.680942 8.16662 0.662085 8.25807 0.666697 8.34986C0.671309 8.44165 0.699236 8.53074 0.747843 8.60874C0.79645 8.68674 0.864133 8.75107 0.944502 8.79565C1.02487 8.84022 1.11528 8.86359 1.20718 8.86353H8.12494C8.21685 8.86359 8.30725 8.84022 8.38762 8.79565C8.46799 8.75107 8.53567 8.68674 8.58428 8.60874C8.63289 8.53074 8.66081 8.44165 8.66543 8.34986C8.67004 8.25807 8.65118 8.16662 8.61064 8.08414L5.24242 1.22256Z", fill: "currentColor" }) })));
|
|
3
|
+
export default SvgTriangle;
|
|
4
|
+
//# sourceMappingURL=Triangle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Triangle.js","sourceRoot":"","sources":["../../../../src/icons/custom/Triangle.tsx"],"names":[],"mappings":";AAuBA,MAAM,WAAW,GAAG,CAAC,KAA8B,EAAE,EAAE,CAAC,CACtD,4BAAK,KAAK,EAAC,KAAK,EAAC,MAAM,EAAC,KAAK,EAAC,OAAO,EAAC,SAAS,EAAC,IAAI,EAAC,MAAM,IAAK,KAAK,cACnE,eACE,CAAC,EAAC,0oBAA0oB,EAC5oB,IAAI,EAAC,cAAc,GACnB,IACE,CACP,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
const SvgVisualizeBloom = (props) => (_jsx("svg", Object.assign({ width: "1em", height: "1em", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props, { children: _jsx("path", { d: "M11.053 4.41812C11.7219 3.86063 12.7254 3.86063 13.3944 4.41812C14.2307 5.14286 14.6209 6.70383 13.5617 9.10105C13.1714 8.87805 12.6697 8.76655 12.2237 8.76655C11.7219 8.76655 11.2759 8.87805 10.8857 9.10105C9.77072 6.64808 10.2167 5.08711 11.053 4.41812ZM5.03204 9.21254C4.8648 8.32056 5.36654 7.48432 6.20278 7.14983C7.20626 6.75958 8.76724 7.20557 10.384 9.32404C9.60347 9.88153 9.10173 10.7178 9.04598 11.6655C6.42577 11.4425 5.25504 10.2718 5.03204 9.21254ZM6.25853 16.7944C5.42229 16.5157 4.92055 15.6237 5.08779 14.7317C5.25504 13.6725 6.42577 12.5017 9.04598 12.223C9.10173 13.2265 9.65922 14.0627 10.384 14.5645C8.82299 16.7387 7.26201 17.1847 6.25853 16.7944ZM13.3944 19.5819C12.7254 20.1394 11.7219 20.1394 11.053 19.5819C10.2167 18.8571 9.82647 17.2962 10.8857 14.899C11.2759 15.122 11.7777 15.2334 12.2237 15.2334C12.6697 15.2334 13.1714 15.122 13.5617 14.899C14.6209 17.2962 14.2307 18.8571 13.3944 19.5819ZM19.3596 14.7317C19.5268 15.6237 19.0251 16.4599 18.1888 16.7944C17.1854 17.1847 15.6244 16.7387 14.0077 14.6202C14.7881 14.0627 15.2899 13.2265 15.3456 12.2787C18.0216 12.5575 19.1923 13.6725 19.3596 14.7317ZM15.4014 11.7213C15.3456 10.7178 14.7881 9.88153 14.0634 9.37979C15.6244 7.26132 17.1854 6.81533 18.2446 7.20557C19.0808 7.48432 19.5826 8.37631 19.4153 9.26829C19.1923 10.2718 18.0216 11.4425 15.4014 11.7213Z", fill: "currentColor" }) })));
|
|
3
|
+
export default SvgVisualizeBloom;
|
|
4
|
+
//# sourceMappingURL=VisualizeBloom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VisualizeBloom.js","sourceRoot":"","sources":["../../../../src/icons/custom/VisualizeBloom.tsx"],"names":[],"mappings":";AAuBA,MAAM,iBAAiB,GAAG,CAAC,KAA8B,EAAE,EAAE,CAAC,CAC5D,4BACE,KAAK,EAAC,KAAK,EACX,MAAM,EAAC,KAAK,EACZ,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,IAC9B,KAAK,cAET,eACE,CAAC,EAAC,6zCAA6zC,EAC/zC,IAAI,EAAC,cAAc,GACnB,IACE,CACP,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
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 Circle } from './Circle';
|
|
22
|
+
export { default as CollapseExpand } from './CollapseExpand';
|
|
23
|
+
export { default as DatabaseAddCircle } from './DatabaseAddCircle';
|
|
24
|
+
export { default as Dbms } from './Dbms';
|
|
25
|
+
export { default as Drag } from './Drag';
|
|
26
|
+
export { default as Expand } from './Expand';
|
|
27
|
+
export { default as ExternalLink } from './ExternalLink';
|
|
28
|
+
export { default as FitToScreen } from './FitToScreen';
|
|
29
|
+
export { default as FolderBookmark } from './FolderBookmark';
|
|
30
|
+
export { default as Heirarchy2 } from './Heirarchy2';
|
|
31
|
+
export { default as Hierarchy1 } from './Hierarchy1';
|
|
32
|
+
export { default as Hierarchy2 } from './Hierarchy2';
|
|
33
|
+
export { default as NomLevel } from './NomLevel';
|
|
34
|
+
export { default as Pin } from './Pin';
|
|
35
|
+
export { default as Presentation } from './Presentation';
|
|
36
|
+
export { default as QueryBrowser } from './QueryBrowser';
|
|
37
|
+
export { default as Rhombus } from './Rhombus';
|
|
38
|
+
export { default as ScienceMolecule } from './ScienceMolecule';
|
|
39
|
+
export { default as Shrink } from './Shrink';
|
|
40
|
+
export { default as Text } from './Text';
|
|
41
|
+
export { default as Triangle } from './Triangle';
|
|
42
|
+
export { default as VisualizeBloom } from './VisualizeBloom';
|
|
43
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/icons/custom/index.tsx"],"names":[],"mappings":"AAAA;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,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
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 HeroIcon } from './Hero';
|
|
22
|
+
export { default as CustomIcon } from './Custom';
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/icons/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,UAAU,CAAC"}
|
package/lib/esm/index.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
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 './button';
|
|
22
|
+
export * from './label';
|
|
23
|
+
export * from './alert';
|
|
24
|
+
export * from './tooltip';
|
|
25
|
+
export * from './checkbox';
|
|
26
|
+
export * from './switch';
|
|
27
|
+
export * from './radio';
|
|
28
|
+
export * from './context-menu';
|
|
29
|
+
export * from './loading-spinner';
|
|
30
|
+
export * from './tabs';
|
|
31
|
+
export * from './view-selector';
|
|
32
|
+
export * from './popover';
|
|
33
|
+
export * from './icons';
|
|
34
|
+
export * from './progress-bar';
|
|
35
|
+
export * from './drag-and-drop';
|
|
36
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* Copyright (c) "Neo4j"
|
|
16
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
17
|
+
*
|
|
18
|
+
* This file is part of Neo4j.
|
|
19
|
+
*
|
|
20
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
21
|
+
* it under the terms of the GNU General Public License as published by
|
|
22
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
23
|
+
* (at your option) any later version.
|
|
24
|
+
*
|
|
25
|
+
* This program is distributed in the hope that it will be useful,
|
|
26
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
27
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
28
|
+
* GNU General Public License for more details.
|
|
29
|
+
*
|
|
30
|
+
* You should have received a copy of the GNU General Public License
|
|
31
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
32
|
+
*/
|
|
33
|
+
import { forwardRef } from 'react';
|
|
34
|
+
import classnames from 'classnames';
|
|
35
|
+
/** Add any helper functions here. */
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
*
|
|
39
|
+
* Component
|
|
40
|
+
*
|
|
41
|
+
*
|
|
42
|
+
*/
|
|
43
|
+
const Input = (props, ref) => {
|
|
44
|
+
const { label, fluid, labelBefore } = props, otherInputProps = __rest(props, ["label", "fluid", "labelBefore"]);
|
|
45
|
+
const containerWrappingClass = classnames('ndl-form-item', {
|
|
46
|
+
disabled: otherInputProps.disabled,
|
|
47
|
+
});
|
|
48
|
+
const labelWrappingClass = classnames(`form-item-label`, {
|
|
49
|
+
fluid,
|
|
50
|
+
'label-before': labelBefore,
|
|
51
|
+
});
|
|
52
|
+
return (_jsx("div", Object.assign({ className: containerWrappingClass }, { children: _jsxs("label", Object.assign({ className: labelWrappingClass }, { children: [_jsx("input", Object.assign({}, otherInputProps, { ref: ref })), label] })) })));
|
|
53
|
+
};
|
|
54
|
+
export default forwardRef(Input);
|
|
55
|
+
//# sourceMappingURL=Input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../src/input/Input.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAc,EAAgB,UAAU,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,UAAU,MAAM,YAAY,CAAC;AA8BpC,qCAAqC;AAErC;;;;;;GAMG;AAEH,MAAM,KAAK,GAAG,CAAC,KAAiB,EAAE,GAAmC,EAAE,EAAE;IACvE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,KAAyB,KAAK,EAAzB,eAAe,UAAK,KAAK,EAAzD,iCAAiD,CAAQ,CAAC;IAEhE,MAAM,sBAAsB,GAAG,UAAU,CAAC,eAAe,EAAE;QACzD,QAAQ,EAAE,eAAe,CAAC,QAAQ;KACnC,CAAC,CAAC;IAEH,MAAM,kBAAkB,GAAG,UAAU,CAAC,iBAAiB,EAAE;QACvD,KAAK;QACL,cAAc,EAAE,WAAW;KAC5B,CAAC,CAAC;IAEH,OAAO,CACL,4BAAK,SAAS,EAAE,sBAAsB,gBAGpC,+BAAO,SAAS,EAAE,kBAAkB,iBAClC,gCAAW,eAAe,IAAE,GAAG,EAAE,GAAG,IAAI,EACvC,KAAK,KACA,IACJ,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -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 { default as Input } from './Input';
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/input/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* Copyright (c) "Neo4j"
|
|
16
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
17
|
+
*
|
|
18
|
+
* This file is part of Neo4j.
|
|
19
|
+
*
|
|
20
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
21
|
+
* it under the terms of the GNU General Public License as published by
|
|
22
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
23
|
+
* (at your option) any later version.
|
|
24
|
+
*
|
|
25
|
+
* This program is distributed in the hope that it will be useful,
|
|
26
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
27
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
28
|
+
* GNU General Public License for more details.
|
|
29
|
+
*
|
|
30
|
+
* You should have received a copy of the GNU General Public License
|
|
31
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
32
|
+
*/
|
|
33
|
+
import React from 'react';
|
|
34
|
+
import classnames from 'classnames';
|
|
35
|
+
import { Circle, Rhombus, Triangle } from '../icons/custom/index';
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
*
|
|
39
|
+
* Types
|
|
40
|
+
*
|
|
41
|
+
*
|
|
42
|
+
*/
|
|
43
|
+
export const LabelColors = [
|
|
44
|
+
'info',
|
|
45
|
+
'success',
|
|
46
|
+
'warning',
|
|
47
|
+
'danger',
|
|
48
|
+
'default',
|
|
49
|
+
];
|
|
50
|
+
export const Label = React.forwardRef(function Label(_a, ref) {
|
|
51
|
+
var { color = 'default', children, className, fill = 'filled', withIcon = false } = _a, rest = __rest(_a, ["color", "children", "className", "fill", "withIcon"]);
|
|
52
|
+
let base;
|
|
53
|
+
let icon;
|
|
54
|
+
// Clean Label without icon is not allowed
|
|
55
|
+
if (!withIcon && fill === 'clean') {
|
|
56
|
+
console.error('Label without icon is not allowed');
|
|
57
|
+
}
|
|
58
|
+
if (withIcon) {
|
|
59
|
+
if (color === 'danger') {
|
|
60
|
+
icon = _jsx(Rhombus, {});
|
|
61
|
+
}
|
|
62
|
+
else if (color === 'warning') {
|
|
63
|
+
base = fill;
|
|
64
|
+
icon = _jsx(Triangle, {});
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
icon = _jsx(Circle, {});
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
// All colors map to the light-theme palette except the info
|
|
71
|
+
const mappedColor = color === 'info' ? 'primary' : color;
|
|
72
|
+
switch (mappedColor) {
|
|
73
|
+
case 'primary':
|
|
74
|
+
case 'danger':
|
|
75
|
+
case 'success':
|
|
76
|
+
case 'warning': {
|
|
77
|
+
base = classnames({
|
|
78
|
+
[`n-bg-light-${mappedColor}-bg-strong n-text-neutral-10`]: fill === 'filled',
|
|
79
|
+
[`outlined n-text-${mappedColor}-60 n-border-light-${mappedColor}-border-strong`]: fill === 'outlined',
|
|
80
|
+
[`semi-filled n-bg-${mappedColor}-10 n-text-${mappedColor}-60 n-border-light-${mappedColor}-border-weak`]: fill === 'semi-filled',
|
|
81
|
+
[`n-text-${mappedColor}-60`]: fill === 'clean',
|
|
82
|
+
});
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
default:
|
|
86
|
+
base = classnames({
|
|
87
|
+
[`n-bg-light-neutral-bg-strongest n-text-neutral-10`]: fill === 'filled',
|
|
88
|
+
[`outlined n-text-light-neutral-text-weak n-border-neutral-70`]: fill === 'outlined',
|
|
89
|
+
[`semi-filled n-bg-neutral-20 n-text-light-neutral-text-weak n-border-light-neutral-border-strong`]: fill === 'semi-filled',
|
|
90
|
+
[`n-text-neutral-70`]: fill === 'clean',
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
const classes = classnames('ndl-label', base, className, fill);
|
|
94
|
+
return (_jsx("span", Object.assign({ role: "status", "aria-label": "label", className: classes }, rest, { ref: ref }, { children: _jsxs("div", Object.assign({ className: "label-content" }, { children: [icon, _jsx("span", Object.assign({ className: "label-text" }, { children: children }))] })) })));
|
|
95
|
+
});
|
|
96
|
+
export default Label;
|
|
97
|
+
//# sourceMappingURL=Label.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Label.js","sourceRoot":"","sources":["../../../src/label/Label.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAElE;;;;;;GAMG;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,MAAM;IACN,SAAS;IACT,SAAS;IACT,QAAQ;IACR,SAAS;CACD,CAAC;AAiBX,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,SAAS,KAAK,CAClD,EAOsB,EACtB,GAAwC;QARxC,EACE,KAAK,GAAG,SAAS,EACjB,QAAQ,EACR,SAAS,EACT,IAAI,GAAG,QAAQ,EACf,QAAQ,GAAG,KAAK,OAEI,EADjB,IAAI,cANT,sDAOC,CADQ;IAIT,IAAI,IAAY,CAA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BACxB,CAAC,mBAAmB,CAAC,EAAE,IAAI,KAAK,OAAO;aACxC,CAAC,CAAC;KACN;IAED,MAAM,OAAO,GAAG,UAAU,CAAC,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;IAE/D,OAAO,CACL,6BACE,IAAI,EAAC,QAAQ,gBACF,OAAO,EAClB,SAAS,EAAE,OAAO,IACd,IAAI,IACR,GAAG,EAAE,GAAG,gBAER,6BAAK,SAAS,EAAC,eAAe,iBAC3B,IAAI,EACL,6BAAM,SAAS,EAAC,YAAY,gBAAE,QAAQ,IAAQ,KAC1C,IACD,CACR,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,KAAK,CAAC"}
|
|
@@ -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 { default as Label } from './Label';
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/label/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* Copyright (c) "Neo4j"
|
|
16
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
17
|
+
*
|
|
18
|
+
* This file is part of Neo4j.
|
|
19
|
+
*
|
|
20
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
21
|
+
* it under the terms of the GNU General Public License as published by
|
|
22
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
23
|
+
* (at your option) any later version.
|
|
24
|
+
*
|
|
25
|
+
* This program is distributed in the hope that it will be useful,
|
|
26
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
27
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
28
|
+
* GNU General Public License for more details.
|
|
29
|
+
*
|
|
30
|
+
* You should have received a copy of the GNU General Public License
|
|
31
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
32
|
+
*/
|
|
33
|
+
import React from 'react';
|
|
34
|
+
import classnames from 'classnames';
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
*
|
|
38
|
+
* LoadingSpinner Component
|
|
39
|
+
*
|
|
40
|
+
*
|
|
41
|
+
*/
|
|
42
|
+
const LoadingSpinner = React.forwardRef(function LoadingSpinner(props, ref) {
|
|
43
|
+
const { size = 'small', className } = props, rest = __rest(props, ["size", "className"]);
|
|
44
|
+
const classes = classnames('ndl-spin-wrapper', size, className);
|
|
45
|
+
return (_jsx("div", Object.assign({ className: classes, role: "status", "aria-label": "loading-spinner" }, rest, { ref: ref }, { children: _jsx("div", { className: "spin" }) })));
|
|
46
|
+
});
|
|
47
|
+
export default LoadingSpinner;
|
|
48
|
+
//# sourceMappingURL=LoadingSpinner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingSpinner.js","sourceRoot":"","sources":["../../../src/loading-spinner/LoadingSpinner.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AAepC;;;;;;GAMG;AAEH,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAAC,SAAS,cAAc,CAC7D,KAA0B,EAC1B,GAAuC;IAEvC,MAAM,EAAE,IAAI,GAAG,OAAO,EAAE,SAAS,KAAc,KAAK,EAAd,IAAI,UAAK,KAAK,EAA9C,qBAAsC,CAAQ,CAAC;IAErD,MAAM,OAAO,GAAG,UAAU,CAAC,kBAAkB,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;IAEhE,OAAO,CACL,4BACE,SAAS,EAAE,OAAO,EAClB,IAAI,EAAC,QAAQ,gBACF,iBAAiB,IACxB,IAAI,IACR,GAAG,EAAE,GAAG,gBAER,cAAK,SAAS,EAAC,MAAM,GAAG,IACpB,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,cAAc,CAAC"}
|
|
@@ -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 { default as LoadingSpinner } from './LoadingSpinner';
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/loading-spinner/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* Copyright (c) "Neo4j"
|
|
16
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
17
|
+
*
|
|
18
|
+
* This file is part of Neo4j.
|
|
19
|
+
*
|
|
20
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
21
|
+
* it under the terms of the GNU General Public License as published by
|
|
22
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
23
|
+
* (at your option) any later version.
|
|
24
|
+
*
|
|
25
|
+
* This program is distributed in the hope that it will be useful,
|
|
26
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
27
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
28
|
+
* GNU General Public License for more details.
|
|
29
|
+
*
|
|
30
|
+
* You should have received a copy of the GNU General Public License
|
|
31
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
32
|
+
*/
|
|
33
|
+
import { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState, } from 'react';
|
|
34
|
+
import * as ReactDOM from 'react-dom';
|
|
35
|
+
import classnames from 'classnames';
|
|
36
|
+
import { debounce } from '../helpers';
|
|
37
|
+
const getScrollbarSize = (doc) => {
|
|
38
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
|
|
39
|
+
const documentWidth = doc.documentElement.clientWidth;
|
|
40
|
+
return Math.abs(window.innerWidth - documentWidth);
|
|
41
|
+
};
|
|
42
|
+
const getPaddingRight = (element) => parseInt(window.getComputedStyle(element).paddingRight, 10) || 0;
|
|
43
|
+
const getOffsetTop = (rect, vertical) => {
|
|
44
|
+
let offset = 0;
|
|
45
|
+
if (vertical === 'bottom') {
|
|
46
|
+
offset = rect.height;
|
|
47
|
+
}
|
|
48
|
+
return offset;
|
|
49
|
+
};
|
|
50
|
+
const getOffsetLeft = (rect, horizontal) => {
|
|
51
|
+
let offset = 0;
|
|
52
|
+
if (horizontal === 'right') {
|
|
53
|
+
offset = rect.width;
|
|
54
|
+
}
|
|
55
|
+
return offset;
|
|
56
|
+
};
|
|
57
|
+
export const Popover = forwardRef(function Popover(_a, ref) {
|
|
58
|
+
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"]);
|
|
59
|
+
const Component = as;
|
|
60
|
+
const popoverRef = useRef();
|
|
61
|
+
const bodyPadding = useRef(0);
|
|
62
|
+
// Override ref to map to internal ref
|
|
63
|
+
useImperativeHandle(ref, () => {
|
|
64
|
+
const popover = popoverRef.current;
|
|
65
|
+
if (!popover) {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
return popover;
|
|
69
|
+
});
|
|
70
|
+
const [enter, setEnter] = useState(false);
|
|
71
|
+
const base = classnames({
|
|
72
|
+
open,
|
|
73
|
+
enter,
|
|
74
|
+
});
|
|
75
|
+
const getPositioningStyles = useCallback((element) => {
|
|
76
|
+
if (!anchorEl)
|
|
77
|
+
throw Error('Missing anchorEl for Popover component');
|
|
78
|
+
const anchorRect = anchorEl.getBoundingClientRect();
|
|
79
|
+
const menuRect = {
|
|
80
|
+
width: element.offsetWidth,
|
|
81
|
+
height: element.offsetHeight,
|
|
82
|
+
};
|
|
83
|
+
const transformX = transformOrigin.horizontal == 'right' ? -menuRect.width : 0;
|
|
84
|
+
const transformY = transformOrigin.vertical == 'bottom' ? -menuRect.height : 0;
|
|
85
|
+
const marginThreshold = 16; // An arbitrary margin between the menu popup and the border of the window
|
|
86
|
+
// Window thresholds taking required margin into account
|
|
87
|
+
const heightThreshold = window.innerHeight - marginThreshold;
|
|
88
|
+
const widthThreshold = window.innerWidth - marginThreshold;
|
|
89
|
+
let top = anchorRect.top +
|
|
90
|
+
getOffsetTop(anchorRect, anchorOrigin.vertical) +
|
|
91
|
+
transformY;
|
|
92
|
+
let left = anchorRect.left +
|
|
93
|
+
getOffsetLeft(anchorRect, anchorOrigin.horizontal) +
|
|
94
|
+
transformX;
|
|
95
|
+
const right = left + menuRect.width;
|
|
96
|
+
const bottom = top + menuRect.height;
|
|
97
|
+
// Check if the vertical axis needs shifting
|
|
98
|
+
if (top < marginThreshold) {
|
|
99
|
+
const diff = top - marginThreshold;
|
|
100
|
+
top -= diff;
|
|
101
|
+
}
|
|
102
|
+
else if (bottom > heightThreshold) {
|
|
103
|
+
const diff = bottom - heightThreshold;
|
|
104
|
+
top -= diff;
|
|
105
|
+
}
|
|
106
|
+
// Check if the horizontal axis needs shifting
|
|
107
|
+
if (left < marginThreshold) {
|
|
108
|
+
const diff = left - marginThreshold;
|
|
109
|
+
left -= diff;
|
|
110
|
+
}
|
|
111
|
+
else if (right > widthThreshold) {
|
|
112
|
+
const diff = right - widthThreshold;
|
|
113
|
+
left -= diff;
|
|
114
|
+
}
|
|
115
|
+
return {
|
|
116
|
+
top,
|
|
117
|
+
left,
|
|
118
|
+
};
|
|
119
|
+
}, [anchorOrigin, transformOrigin, anchorEl]);
|
|
120
|
+
const setPositioningStyles = useCallback(() => {
|
|
121
|
+
const element = popoverRef.current;
|
|
122
|
+
if (!element) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
const positioning = getPositioningStyles(element);
|
|
126
|
+
if (positioning.top !== null) {
|
|
127
|
+
element.style.top = `${positioning.top}px`;
|
|
128
|
+
}
|
|
129
|
+
if (positioning.left !== null) {
|
|
130
|
+
element.style.left = `${positioning.left}px`;
|
|
131
|
+
}
|
|
132
|
+
}, [getPositioningStyles]);
|
|
133
|
+
// Disable scroll and add padding when the popover is open
|
|
134
|
+
useEffect(() => {
|
|
135
|
+
if (nested) {
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
if (open) {
|
|
139
|
+
const existingPaddingRight = getPaddingRight(document.body);
|
|
140
|
+
bodyPadding.current = existingPaddingRight;
|
|
141
|
+
const newPaddingRight = existingPaddingRight + getScrollbarSize(document);
|
|
142
|
+
document.body.style.overflow = 'hidden';
|
|
143
|
+
document.body.style.paddingRight = `${newPaddingRight}px`;
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
document.body.style.overflow = '';
|
|
147
|
+
document.body.style.paddingRight = `${bodyPadding.current}px`;
|
|
148
|
+
}
|
|
149
|
+
}, [open, nested]);
|
|
150
|
+
useEffect(() => {
|
|
151
|
+
if (open) {
|
|
152
|
+
setPositioningStyles();
|
|
153
|
+
}
|
|
154
|
+
}, [open, setPositioningStyles]);
|
|
155
|
+
// Set Enter to trigger fade in animation
|
|
156
|
+
useEffect(() => setEnter(open), [open]);
|
|
157
|
+
useEffect(() => {
|
|
158
|
+
if (!open) {
|
|
159
|
+
return undefined;
|
|
160
|
+
}
|
|
161
|
+
const handleResize = debounce(() => {
|
|
162
|
+
setPositioningStyles();
|
|
163
|
+
});
|
|
164
|
+
window.addEventListener('resize', handleResize);
|
|
165
|
+
return () => {
|
|
166
|
+
handleResize.clear();
|
|
167
|
+
window.removeEventListener('resize', handleResize);
|
|
168
|
+
};
|
|
169
|
+
}, [anchorEl, open, setPositioningStyles]);
|
|
170
|
+
const handleBackdropClick = (event) => {
|
|
171
|
+
event.stopPropagation();
|
|
172
|
+
event.preventDefault();
|
|
173
|
+
onClose && onClose(event);
|
|
174
|
+
};
|
|
175
|
+
if (!open) {
|
|
176
|
+
return null;
|
|
177
|
+
}
|
|
178
|
+
const classes = classnames('ndl-popover', base, className);
|
|
179
|
+
return (_jsxs(Portal, Object.assign({ container: document.body }, { children: [_jsx("div", { className: "ndl-popover-backdrop", role: "button", tabIndex: 0, onClick: handleBackdropClick, onKeyDown: handleBackdropClick, "data-testid": "popover-backdrop" }), _jsx(Component, Object.assign({ tabIndex: -1 }, rest, { className: classes, ref: popoverRef, "data-testid": "popover-content" }, { children: children }))] })));
|
|
180
|
+
});
|
|
181
|
+
const Portal = ({ children, container }) => {
|
|
182
|
+
return ReactDOM.createPortal(children, container);
|
|
183
|
+
};
|
|
184
|
+
//# sourceMappingURL=Popover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Popover.js","sourceRoot":"","sources":["../../../src/popover/Popover.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAc,EACZ,UAAU,EACV,WAAW,EACX,SAAS,EACT,mBAAmB,EACnB,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,QAAQ,MAAM,WAAW,CAAC;AACtC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAetC,MAAM,gBAAgB,GAAG,CAAC,GAAa,EAAU,EAAE;IACjD,iFAAiF;IACjF,MAAM,aAAa,GAAG,GAAG,CAAC,eAAe,CAAC,WAAW,CAAC;IACtD,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,UAAU,GAAG,aAAa,CAAC,CAAC;AACrD,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,OAAgB,EAAU,EAAE,CACnD,QAAQ,CAAC,MAAM,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;AAEnE,MAAM,YAAY,GAAG,CAAC,IAAa,EAAE,QAAkB,EAAE,EAAE;IACzD,IAAI,MAAM,GAAG,CAAC,CAAC;IAEf,IAAI,QAAQ,KAAK,QAAQ,EAAE;QACzB,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;KACtB;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,MAAM,aAAa,GAAG,CAAC,IAAa,EAAE,UAAsB,EAAE,EAAE;IAC9D,IAAI,MAAM,GAAG,CAAC,CAAC;IA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