@neo4j-ndl/react 0.17.0 → 1.0.0-alpha-093fe38
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/_common/input/RadioAndCheckboxWrapper.js +14 -6
- package/lib/cjs/_common/input/RadioAndCheckboxWrapper.js.map +1 -1
- package/lib/cjs/alert/Alert.js +16 -16
- package/lib/cjs/alert/Alert.js.map +1 -1
- package/lib/cjs/alert/index.js +14 -6
- package/lib/cjs/alert/index.js.map +1 -1
- package/lib/cjs/button/Button.js +11 -6
- package/lib/cjs/button/Button.js.map +1 -1
- package/lib/cjs/button/IconButton.js +12 -8
- package/lib/cjs/button/IconButton.js.map +1 -1
- package/lib/cjs/button/IconButtonArray.js +2 -2
- package/lib/cjs/button/IconButtonArray.js.map +1 -1
- package/lib/cjs/code-block/CodeBlock.js +13 -9
- package/lib/cjs/code-block/CodeBlock.js.map +1 -1
- package/lib/cjs/context-menu/ContextMenu.js +19 -12
- package/lib/cjs/context-menu/ContextMenu.js.map +1 -1
- package/lib/cjs/dialog/Dialog.js +9 -9
- package/lib/cjs/dialog/Dialog.js.map +1 -1
- package/lib/cjs/drag-and-drop/DragAndDrop.js +5 -5
- package/lib/cjs/drag-and-drop/DragAndDrop.js.map +1 -1
- package/lib/cjs/dropdown/Dropdown.js +15 -13
- package/lib/cjs/dropdown/Dropdown.js.map +1 -1
- package/lib/cjs/dropdown/Overrides.js +15 -6
- package/lib/cjs/dropdown/Overrides.js.map +1 -1
- package/lib/cjs/graph-label/GraphLabel.js +18 -14
- package/lib/cjs/graph-label/GraphLabel.js.map +1 -1
- package/lib/cjs/graph-label/color.js +6 -6
- package/lib/cjs/graph-label/color.js.map +1 -1
- package/lib/cjs/icons/{custom → generated/custom}/Circle.js +0 -0
- package/lib/cjs/icons/generated/custom/Circle.js.map +1 -0
- package/lib/cjs/icons/{custom → generated/custom}/CollapseExpand.js +0 -0
- package/lib/cjs/icons/generated/custom/CollapseExpand.js.map +1 -0
- package/lib/cjs/icons/{custom → generated/custom}/CollapseExpandLeft.js +0 -0
- package/lib/cjs/icons/generated/custom/CollapseExpandLeft.js.map +1 -0
- package/lib/cjs/icons/{custom → generated/custom}/CollapseExpandRight.js +0 -0
- package/lib/cjs/icons/generated/custom/CollapseExpandRight.js.map +1 -0
- package/lib/cjs/icons/{custom → generated/custom}/Configure.js +0 -0
- package/lib/cjs/icons/generated/custom/Configure.js.map +1 -0
- package/lib/cjs/icons/{custom → generated/custom}/DatabaseAddCircle.js +0 -0
- package/lib/cjs/icons/generated/custom/DatabaseAddCircle.js.map +1 -0
- package/lib/cjs/icons/{custom → generated/custom}/Dbms.js +0 -0
- package/lib/cjs/icons/generated/custom/Dbms.js.map +1 -0
- package/lib/cjs/icons/{custom → generated/custom}/Drag.js +0 -0
- package/lib/cjs/icons/generated/custom/Drag.js.map +1 -0
- package/lib/cjs/icons/{custom → generated/custom}/Expand.js +0 -0
- package/lib/cjs/icons/generated/custom/Expand.js.map +1 -0
- package/lib/cjs/icons/{custom → generated/custom}/ExternalLink.js +0 -0
- package/lib/cjs/icons/generated/custom/ExternalLink.js.map +1 -0
- package/lib/cjs/icons/{custom → generated/custom}/FitToScreen.js +0 -0
- package/lib/cjs/icons/generated/custom/FitToScreen.js.map +1 -0
- package/lib/cjs/icons/{custom → generated/custom}/FolderBookmark.js +0 -0
- package/lib/cjs/icons/generated/custom/FolderBookmark.js.map +1 -0
- package/lib/cjs/icons/{custom → generated/custom}/Heirarchy2.js +0 -0
- package/lib/cjs/icons/generated/custom/Heirarchy2.js.map +1 -0
- package/lib/cjs/icons/{custom → generated/custom}/Hierarchy1.js +0 -0
- package/lib/cjs/icons/generated/custom/Hierarchy1.js.map +1 -0
- package/lib/cjs/icons/{custom → generated/custom}/Hierarchy2.js +0 -0
- package/lib/cjs/icons/generated/custom/Hierarchy2.js.map +1 -0
- package/lib/cjs/icons/{custom → generated/custom}/NomLevel.js +0 -0
- package/lib/cjs/icons/generated/custom/NomLevel.js.map +1 -0
- package/lib/cjs/icons/{custom → generated/custom}/Pin.js +0 -0
- package/lib/cjs/icons/generated/custom/Pin.js.map +1 -0
- package/lib/cjs/icons/{custom → generated/custom}/Presentation.js +0 -0
- package/lib/cjs/icons/generated/custom/Presentation.js.map +1 -0
- package/lib/cjs/icons/{custom → generated/custom}/QueryBrowser.js +0 -0
- package/lib/cjs/icons/generated/custom/QueryBrowser.js.map +1 -0
- package/lib/cjs/icons/{custom → generated/custom}/Rhombus.js +0 -0
- package/lib/cjs/icons/generated/custom/Rhombus.js.map +1 -0
- package/lib/cjs/icons/{custom → generated/custom}/ScienceMolecule.js +0 -0
- package/lib/cjs/icons/generated/custom/ScienceMolecule.js.map +1 -0
- package/lib/cjs/icons/{custom → generated/custom}/Shrink.js +0 -0
- package/lib/cjs/icons/generated/custom/Shrink.js.map +1 -0
- package/lib/cjs/icons/{custom → generated/custom}/Status.js +0 -0
- package/lib/cjs/icons/generated/custom/Status.js.map +1 -0
- package/lib/cjs/icons/{custom → generated/custom}/Text.js +0 -0
- package/lib/cjs/icons/generated/custom/Text.js.map +1 -0
- package/lib/cjs/icons/{custom → generated/custom}/Triangle.js +0 -0
- package/lib/cjs/icons/generated/custom/Triangle.js.map +1 -0
- package/lib/cjs/icons/{custom → generated/custom}/VisualizeBloom.js +0 -0
- package/lib/cjs/icons/generated/custom/VisualizeBloom.js.map +1 -0
- package/lib/cjs/icons/{custom → generated/custom}/index.js +0 -0
- package/lib/cjs/icons/generated/custom/index.js.map +1 -0
- package/lib/cjs/icons/generated/heroIcons.js +1206 -0
- package/lib/cjs/icons/generated/heroIcons.js.map +1 -0
- package/lib/cjs/icons/index.js +15 -7
- package/lib/cjs/icons/index.js.map +1 -1
- package/lib/cjs/index.js +7 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/label/Label.js +16 -11
- package/lib/cjs/label/Label.js.map +1 -1
- package/lib/cjs/loading-spinner/LoadingSpinner.js +6 -2
- package/lib/cjs/loading-spinner/LoadingSpinner.js.map +1 -1
- package/lib/cjs/modal/Modal.js +5 -1
- package/lib/cjs/modal/Modal.js.map +1 -1
- package/lib/cjs/popover/Popover.js +3 -3
- package/lib/cjs/popover/Popover.js.map +1 -1
- package/lib/cjs/portal/Portal.js +2 -25
- package/lib/cjs/portal/Portal.js.map +1 -1
- package/lib/cjs/progress-bar/ProgressBar.js +5 -2
- package/lib/cjs/progress-bar/ProgressBar.js.map +1 -1
- package/lib/cjs/side-navigation/SideNavigation.js +4 -4
- package/lib/cjs/side-navigation/SideNavigation.js.map +1 -1
- package/lib/cjs/table/Components.js +203 -0
- package/lib/cjs/table/Components.js.map +1 -0
- package/lib/cjs/table/Table.js +45 -117
- package/lib/cjs/table/Table.js.map +1 -1
- package/lib/cjs/table/TableContext.js +34 -0
- package/lib/cjs/table/TableContext.js.map +1 -0
- package/lib/cjs/table/helpers.js +28 -70
- package/lib/cjs/table/helpers.js.map +1 -1
- package/lib/cjs/table/index.js +14 -4
- package/lib/cjs/table/index.js.map +1 -1
- package/lib/cjs/table-deprecated/Table.js +157 -0
- package/lib/cjs/table-deprecated/Table.js.map +1 -0
- package/lib/cjs/{table → table-deprecated}/TableNavigation.js +3 -3
- package/lib/cjs/table-deprecated/TableNavigation.js.map +1 -0
- package/lib/cjs/table-deprecated/helpers.js +123 -0
- package/lib/cjs/table-deprecated/helpers.js.map +1 -0
- package/lib/cjs/{table → table-deprecated}/hooks/hookCallbackTypes.js +0 -0
- package/lib/cjs/table-deprecated/hooks/hookCallbackTypes.js.map +1 -0
- package/lib/cjs/{table → table-deprecated}/hooks/index.js +0 -0
- package/lib/cjs/table-deprecated/hooks/index.js.map +1 -0
- package/lib/cjs/{table → table-deprecated}/hooks/useMultiRowSelect.js +0 -0
- package/lib/cjs/table-deprecated/hooks/useMultiRowSelect.js.map +1 -0
- package/lib/cjs/{table → table-deprecated}/hooks/useSingleRowSelect.js +0 -0
- package/lib/cjs/table-deprecated/hooks/useSingleRowSelect.js.map +1 -0
- package/lib/cjs/table-deprecated/index.js +44 -0
- package/lib/cjs/table-deprecated/index.js.map +1 -0
- package/lib/cjs/tabs/Tabs.js +7 -7
- package/lib/cjs/tabs/Tabs.js.map +1 -1
- package/lib/cjs/tag/Tag.js +8 -5
- package/lib/cjs/tag/Tag.js.map +1 -1
- package/lib/cjs/tag/index.js +14 -5
- package/lib/cjs/tag/index.js.map +1 -1
- package/lib/cjs/text-input/TextInput.js +11 -10
- package/lib/cjs/text-input/TextInput.js.map +1 -1
- package/lib/cjs/tooltip/SmartTooltip.js +114 -0
- package/lib/cjs/tooltip/SmartTooltip.js.map +1 -0
- package/lib/cjs/tooltip/Tooltip.js +10 -2
- package/lib/cjs/tooltip/Tooltip.js.map +1 -1
- package/lib/cjs/tooltip/index.js +3 -1
- package/lib/cjs/tooltip/index.js.map +1 -1
- package/lib/cjs/typography/Typography.js +58 -0
- package/lib/cjs/typography/Typography.js.map +1 -0
- package/lib/cjs/typography/index.js +38 -0
- package/lib/cjs/typography/index.js.map +1 -0
- package/lib/cjs/typography/types.js +52 -0
- package/lib/cjs/typography/types.js.map +1 -0
- package/lib/cjs/view-selector/ViewSelector.js +8 -3
- package/lib/cjs/view-selector/ViewSelector.js.map +1 -1
- package/lib/cjs/wizard/Wizard.js +20 -2
- package/lib/cjs/wizard/Wizard.js.map +1 -1
- package/lib/esm/_common/input/RadioAndCheckboxWrapper.js +13 -6
- package/lib/esm/_common/input/RadioAndCheckboxWrapper.js.map +1 -1
- package/lib/esm/alert/Alert.js +15 -15
- package/lib/esm/alert/Alert.js.map +1 -1
- package/lib/esm/alert/index.js +1 -1
- package/lib/esm/alert/index.js.map +1 -1
- package/lib/esm/button/Button.js +11 -6
- package/lib/esm/button/Button.js.map +1 -1
- package/lib/esm/button/IconButton.js +12 -8
- package/lib/esm/button/IconButton.js.map +1 -1
- package/lib/esm/button/IconButtonArray.js +2 -2
- package/lib/esm/button/IconButtonArray.js.map +1 -1
- package/lib/esm/code-block/CodeBlock.js +11 -7
- package/lib/esm/code-block/CodeBlock.js.map +1 -1
- package/lib/esm/context-menu/ContextMenu.js +19 -12
- package/lib/esm/context-menu/ContextMenu.js.map +1 -1
- package/lib/esm/dialog/Dialog.js +10 -10
- package/lib/esm/dialog/Dialog.js.map +1 -1
- package/lib/esm/drag-and-drop/DragAndDrop.js +5 -5
- package/lib/esm/drag-and-drop/DragAndDrop.js.map +1 -1
- package/lib/esm/dropdown/Dropdown.js +6 -4
- package/lib/esm/dropdown/Dropdown.js.map +1 -1
- package/lib/esm/dropdown/Overrides.js +13 -7
- package/lib/esm/dropdown/Overrides.js.map +1 -1
- package/lib/esm/graph-label/GraphLabel.js +12 -8
- package/lib/esm/graph-label/GraphLabel.js.map +1 -1
- package/lib/esm/graph-label/color.js +1 -1
- package/lib/esm/graph-label/color.js.map +1 -1
- package/lib/esm/icons/{custom → generated/custom}/Circle.js +0 -0
- package/lib/esm/icons/generated/custom/Circle.js.map +1 -0
- package/lib/esm/icons/{custom → generated/custom}/CollapseExpand.js +0 -0
- package/lib/esm/icons/generated/custom/CollapseExpand.js.map +1 -0
- package/lib/esm/icons/{custom → generated/custom}/CollapseExpandLeft.js +0 -0
- package/lib/esm/icons/generated/custom/CollapseExpandLeft.js.map +1 -0
- package/lib/esm/icons/{custom → generated/custom}/CollapseExpandRight.js +0 -0
- package/lib/esm/icons/generated/custom/CollapseExpandRight.js.map +1 -0
- package/lib/esm/icons/{custom → generated/custom}/Configure.js +0 -0
- package/lib/esm/icons/generated/custom/Configure.js.map +1 -0
- package/lib/esm/icons/{custom → generated/custom}/DatabaseAddCircle.js +0 -0
- package/lib/esm/icons/generated/custom/DatabaseAddCircle.js.map +1 -0
- package/lib/esm/icons/{custom → generated/custom}/Dbms.js +0 -0
- package/lib/esm/icons/generated/custom/Dbms.js.map +1 -0
- package/lib/esm/icons/{custom → generated/custom}/Drag.js +0 -0
- package/lib/esm/icons/generated/custom/Drag.js.map +1 -0
- package/lib/esm/icons/{custom → generated/custom}/Expand.js +0 -0
- package/lib/esm/icons/generated/custom/Expand.js.map +1 -0
- package/lib/esm/icons/{custom → generated/custom}/ExternalLink.js +0 -0
- package/lib/esm/icons/generated/custom/ExternalLink.js.map +1 -0
- package/lib/esm/icons/{custom → generated/custom}/FitToScreen.js +0 -0
- package/lib/esm/icons/generated/custom/FitToScreen.js.map +1 -0
- package/lib/esm/icons/{custom → generated/custom}/FolderBookmark.js +0 -0
- package/lib/esm/icons/generated/custom/FolderBookmark.js.map +1 -0
- package/lib/esm/icons/{custom → generated/custom}/Heirarchy2.js +0 -0
- package/lib/esm/icons/generated/custom/Heirarchy2.js.map +1 -0
- package/lib/esm/icons/{custom → generated/custom}/Hierarchy1.js +0 -0
- package/lib/esm/icons/generated/custom/Hierarchy1.js.map +1 -0
- package/lib/esm/icons/{custom → generated/custom}/Hierarchy2.js +0 -0
- package/lib/esm/icons/generated/custom/Hierarchy2.js.map +1 -0
- package/lib/esm/icons/{custom → generated/custom}/NomLevel.js +0 -0
- package/lib/esm/icons/generated/custom/NomLevel.js.map +1 -0
- package/lib/esm/icons/{custom → generated/custom}/Pin.js +0 -0
- package/lib/esm/icons/generated/custom/Pin.js.map +1 -0
- package/lib/esm/icons/{custom → generated/custom}/Presentation.js +0 -0
- package/lib/esm/icons/generated/custom/Presentation.js.map +1 -0
- package/lib/esm/icons/{custom → generated/custom}/QueryBrowser.js +0 -0
- package/lib/esm/icons/generated/custom/QueryBrowser.js.map +1 -0
- package/lib/esm/icons/{custom → generated/custom}/Rhombus.js +0 -0
- package/lib/esm/icons/generated/custom/Rhombus.js.map +1 -0
- package/lib/esm/icons/{custom → generated/custom}/ScienceMolecule.js +0 -0
- package/lib/esm/icons/generated/custom/ScienceMolecule.js.map +1 -0
- package/lib/esm/icons/{custom → generated/custom}/Shrink.js +0 -0
- package/lib/esm/icons/generated/custom/Shrink.js.map +1 -0
- package/lib/esm/icons/{custom → generated/custom}/Status.js +0 -0
- package/lib/esm/icons/generated/custom/Status.js.map +1 -0
- package/lib/esm/icons/{custom → generated/custom}/Text.js +0 -0
- package/lib/esm/icons/generated/custom/Text.js.map +1 -0
- package/lib/esm/icons/{custom → generated/custom}/Triangle.js +0 -0
- package/lib/esm/icons/generated/custom/Triangle.js.map +1 -0
- package/lib/esm/icons/{custom → generated/custom}/VisualizeBloom.js +0 -0
- package/lib/esm/icons/generated/custom/VisualizeBloom.js.map +1 -0
- package/lib/esm/icons/{custom → generated/custom}/index.js +0 -0
- package/lib/esm/icons/generated/custom/index.js.map +1 -0
- package/lib/esm/icons/generated/heroIcons.js +605 -0
- package/lib/esm/icons/generated/heroIcons.js.map +1 -0
- package/lib/esm/icons/index.js +2 -2
- package/lib/esm/icons/index.js.map +1 -1
- package/lib/esm/index.js +7 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/label/Label.js +13 -8
- package/lib/esm/label/Label.js.map +1 -1
- package/lib/esm/loading-spinner/LoadingSpinner.js +6 -2
- package/lib/esm/loading-spinner/LoadingSpinner.js.map +1 -1
- package/lib/esm/modal/Modal.js +5 -1
- package/lib/esm/modal/Modal.js.map +1 -1
- package/lib/esm/popover/Popover.js +3 -3
- package/lib/esm/popover/Popover.js.map +1 -1
- package/lib/esm/portal/Portal.js +2 -2
- package/lib/esm/portal/Portal.js.map +1 -1
- package/lib/esm/progress-bar/ProgressBar.js +5 -2
- package/lib/esm/progress-bar/ProgressBar.js.map +1 -1
- package/lib/esm/side-navigation/SideNavigation.js +6 -6
- package/lib/esm/side-navigation/SideNavigation.js.map +1 -1
- package/lib/esm/table/Components.js +181 -0
- package/lib/esm/table/Components.js.map +1 -0
- package/lib/esm/table/Table.js +45 -116
- package/lib/esm/table/Table.js.map +1 -1
- package/lib/esm/table/TableContext.js +30 -0
- package/lib/esm/table/TableContext.js.map +1 -0
- package/lib/esm/table/helpers.js +25 -65
- package/lib/esm/table/helpers.js.map +1 -1
- package/lib/esm/table/index.js +2 -2
- package/lib/esm/table/index.js.map +1 -1
- package/lib/esm/table-deprecated/Table.js +150 -0
- package/lib/esm/table-deprecated/Table.js.map +1 -0
- package/lib/esm/{table → table-deprecated}/TableNavigation.js +4 -4
- package/lib/esm/table-deprecated/TableNavigation.js.map +1 -0
- package/lib/esm/table-deprecated/helpers.js +116 -0
- package/lib/esm/table-deprecated/helpers.js.map +1 -0
- package/lib/esm/{table → table-deprecated}/hooks/hookCallbackTypes.js +0 -0
- package/lib/esm/table-deprecated/hooks/hookCallbackTypes.js.map +1 -0
- package/lib/esm/{table → table-deprecated}/hooks/index.js +0 -0
- package/lib/esm/table-deprecated/hooks/index.js.map +1 -0
- package/lib/esm/{table → table-deprecated}/hooks/useMultiRowSelect.js +0 -0
- package/lib/esm/table-deprecated/hooks/useMultiRowSelect.js.map +1 -0
- package/lib/esm/{table → table-deprecated}/hooks/useSingleRowSelect.js +0 -0
- package/lib/esm/table-deprecated/hooks/useSingleRowSelect.js.map +1 -0
- package/lib/esm/table-deprecated/index.js +23 -0
- package/lib/esm/table-deprecated/index.js.map +1 -0
- package/lib/esm/tabs/Tabs.js +7 -7
- package/lib/esm/tabs/Tabs.js.map +1 -1
- package/lib/esm/tag/Tag.js +7 -5
- package/lib/esm/tag/Tag.js.map +1 -1
- package/lib/esm/tag/index.js +1 -1
- package/lib/esm/tag/index.js.map +1 -1
- package/lib/esm/text-input/TextInput.js +12 -11
- package/lib/esm/text-input/TextInput.js.map +1 -1
- package/lib/esm/tooltip/SmartTooltip.js +86 -0
- package/lib/esm/tooltip/SmartTooltip.js.map +1 -0
- package/lib/esm/tooltip/Tooltip.js +10 -2
- package/lib/esm/tooltip/Tooltip.js.map +1 -1
- package/lib/esm/tooltip/index.js +1 -0
- package/lib/esm/tooltip/index.js.map +1 -1
- package/lib/esm/{icons/Custom.js → typography/Typography.js} +20 -10
- package/lib/esm/typography/Typography.js.map +1 -0
- package/lib/esm/typography/index.js +22 -0
- package/lib/esm/typography/index.js.map +1 -0
- package/lib/esm/typography/types.js +49 -0
- package/lib/esm/typography/types.js.map +1 -0
- package/lib/esm/view-selector/ViewSelector.js +8 -3
- package/lib/esm/view-selector/ViewSelector.js.map +1 -1
- package/lib/esm/wizard/Wizard.js +24 -6
- package/lib/esm/wizard/Wizard.js.map +1 -1
- package/lib/types/_common/input/RadioAndCheckboxWrapper.d.ts +12 -2
- package/lib/types/_common/input/types.d.ts +1 -1
- package/lib/types/alert/Alert.d.ts +3 -2
- package/lib/types/alert/index.d.ts +1 -1
- package/lib/types/button/Button.d.ts +1 -3
- package/lib/types/button/IconButton.d.ts +2 -0
- package/lib/types/checkbox/Checkbox.d.ts +1 -1
- package/lib/types/context-menu/ContextMenu.d.ts +11 -12
- package/lib/types/dropdown/Overrides.d.ts +0 -21
- package/lib/types/dropdown/types.d.ts +0 -1
- package/lib/types/icons/{custom → generated/custom}/Circle.d.ts +0 -0
- package/lib/types/icons/{custom → generated/custom}/CollapseExpand.d.ts +0 -0
- package/lib/types/icons/{custom → generated/custom}/CollapseExpandLeft.d.ts +0 -0
- package/lib/types/icons/{custom → generated/custom}/CollapseExpandRight.d.ts +0 -0
- package/lib/types/icons/{custom → generated/custom}/Configure.d.ts +0 -0
- package/lib/types/icons/{custom → generated/custom}/DatabaseAddCircle.d.ts +0 -0
- package/lib/types/icons/{custom → generated/custom}/Dbms.d.ts +0 -0
- package/lib/types/icons/{custom → generated/custom}/Drag.d.ts +0 -0
- package/lib/types/icons/{custom → generated/custom}/Expand.d.ts +0 -0
- package/lib/types/icons/{custom → generated/custom}/ExternalLink.d.ts +0 -0
- package/lib/types/icons/{custom → generated/custom}/FitToScreen.d.ts +0 -0
- package/lib/types/icons/{custom → generated/custom}/FolderBookmark.d.ts +0 -0
- package/lib/types/icons/{custom → generated/custom}/Heirarchy2.d.ts +0 -0
- package/lib/types/icons/{custom → generated/custom}/Hierarchy1.d.ts +0 -0
- package/lib/types/icons/{custom → generated/custom}/Hierarchy2.d.ts +0 -0
- package/lib/types/icons/{custom → generated/custom}/NomLevel.d.ts +0 -0
- package/lib/types/icons/{custom → generated/custom}/Pin.d.ts +0 -0
- package/lib/types/icons/{custom → generated/custom}/Presentation.d.ts +0 -0
- package/lib/types/icons/{custom → generated/custom}/QueryBrowser.d.ts +0 -0
- package/lib/types/icons/{custom → generated/custom}/Rhombus.d.ts +0 -0
- package/lib/types/icons/{custom → generated/custom}/ScienceMolecule.d.ts +0 -0
- package/lib/types/icons/{custom → generated/custom}/Shrink.d.ts +0 -0
- package/lib/types/icons/{custom → generated/custom}/Status.d.ts +0 -0
- package/lib/types/icons/{custom → generated/custom}/Text.d.ts +0 -0
- package/lib/types/icons/{custom → generated/custom}/Triangle.d.ts +0 -0
- package/lib/types/icons/{custom → generated/custom}/VisualizeBloom.d.ts +0 -0
- package/lib/types/icons/{custom → generated/custom}/index.d.ts +0 -0
- package/lib/types/icons/generated/heroIcons.d.ts +604 -0
- package/lib/types/icons/index.d.ts +2 -2
- package/lib/types/index.d.ts +3 -1
- package/lib/types/label/Label.d.ts +3 -2
- package/lib/types/popover/Popover.d.ts +1 -1
- package/lib/types/portal/Portal.d.ts +1 -1
- package/lib/types/progress-bar/ProgressBar.d.ts +1 -1
- package/lib/types/radio/Radio.d.ts +1 -1
- package/lib/types/switch/Switch.d.ts +1 -1
- package/lib/types/table/Components.d.ts +54 -0
- package/lib/types/table/Table.d.ts +28 -49
- package/lib/types/table/TableContext.d.ts +61 -0
- package/lib/types/table/helpers.d.ts +9 -21
- package/lib/types/table/index.d.ts +2 -2
- package/lib/types/table-deprecated/Table.d.ts +75 -0
- package/lib/types/{table → table-deprecated}/TableNavigation.d.ts +0 -1
- package/lib/types/table-deprecated/helpers.d.ts +51 -0
- package/lib/types/{table → table-deprecated}/hooks/hookCallbackTypes.d.ts +0 -0
- package/lib/types/{table → table-deprecated}/hooks/index.d.ts +0 -0
- package/lib/types/{table → table-deprecated}/hooks/useMultiRowSelect.d.ts +0 -0
- package/lib/types/{table → table-deprecated}/hooks/useSingleRowSelect.d.ts +0 -0
- package/lib/types/table-deprecated/index.d.ts +22 -0
- package/lib/types/tag/Tag.d.ts +4 -4
- package/lib/types/tag/index.d.ts +1 -1
- package/lib/types/text-input/TextInput.d.ts +1 -1
- package/lib/types/text-link/TextLink.d.ts +1 -1
- package/lib/types/tooltip/SmartTooltip.d.ts +31 -0
- package/lib/types/tooltip/Tooltip.d.ts +1 -1
- package/lib/types/tooltip/index.d.ts +1 -0
- package/lib/types/trap-focus/TrapFocus.d.ts +0 -1
- package/lib/types/{icons/Custom.d.ts → typography/Typography.d.ts} +5 -7
- package/lib/types/typography/index.d.ts +21 -0
- package/lib/types/typography/types.d.ts +34 -0
- package/lib/types/wizard/Wizard.d.ts +0 -1
- package/package.json +22 -9
- package/CHANGELOG.md +0 -557
- package/lib/cjs/icons/Custom.js +0 -67
- package/lib/cjs/icons/Custom.js.map +0 -1
- package/lib/cjs/icons/Hero.js +0 -59
- package/lib/cjs/icons/Hero.js.map +0 -1
- package/lib/cjs/icons/custom/Circle.js.map +0 -1
- package/lib/cjs/icons/custom/CollapseExpand.js.map +0 -1
- package/lib/cjs/icons/custom/CollapseExpandLeft.js.map +0 -1
- package/lib/cjs/icons/custom/CollapseExpandRight.js.map +0 -1
- package/lib/cjs/icons/custom/Configure.js.map +0 -1
- package/lib/cjs/icons/custom/DatabaseAddCircle.js.map +0 -1
- package/lib/cjs/icons/custom/Dbms.js.map +0 -1
- package/lib/cjs/icons/custom/Drag.js.map +0 -1
- package/lib/cjs/icons/custom/Expand.js.map +0 -1
- package/lib/cjs/icons/custom/ExternalLink.js.map +0 -1
- package/lib/cjs/icons/custom/FitToScreen.js.map +0 -1
- package/lib/cjs/icons/custom/FolderBookmark.js.map +0 -1
- package/lib/cjs/icons/custom/Heirarchy2.js.map +0 -1
- package/lib/cjs/icons/custom/Hierarchy1.js.map +0 -1
- package/lib/cjs/icons/custom/Hierarchy2.js.map +0 -1
- package/lib/cjs/icons/custom/NomLevel.js.map +0 -1
- package/lib/cjs/icons/custom/Pin.js.map +0 -1
- package/lib/cjs/icons/custom/Presentation.js.map +0 -1
- package/lib/cjs/icons/custom/QueryBrowser.js.map +0 -1
- package/lib/cjs/icons/custom/Rhombus.js.map +0 -1
- package/lib/cjs/icons/custom/ScienceMolecule.js.map +0 -1
- package/lib/cjs/icons/custom/Shrink.js.map +0 -1
- package/lib/cjs/icons/custom/Status.js.map +0 -1
- package/lib/cjs/icons/custom/Text.js.map +0 -1
- package/lib/cjs/icons/custom/Triangle.js.map +0 -1
- package/lib/cjs/icons/custom/VisualizeBloom.js.map +0 -1
- package/lib/cjs/icons/custom/index.js.map +0 -1
- package/lib/cjs/table/TableNavigation.js.map +0 -1
- package/lib/cjs/table/hooks/hookCallbackTypes.js.map +0 -1
- package/lib/cjs/table/hooks/index.js.map +0 -1
- package/lib/cjs/table/hooks/useMultiRowSelect.js.map +0 -1
- package/lib/cjs/table/hooks/useSingleRowSelect.js.map +0 -1
- package/lib/esm/icons/Custom.js.map +0 -1
- package/lib/esm/icons/Hero.js +0 -33
- package/lib/esm/icons/Hero.js.map +0 -1
- package/lib/esm/icons/custom/Circle.js.map +0 -1
- package/lib/esm/icons/custom/CollapseExpand.js.map +0 -1
- package/lib/esm/icons/custom/CollapseExpandLeft.js.map +0 -1
- package/lib/esm/icons/custom/CollapseExpandRight.js.map +0 -1
- package/lib/esm/icons/custom/Configure.js.map +0 -1
- package/lib/esm/icons/custom/DatabaseAddCircle.js.map +0 -1
- package/lib/esm/icons/custom/Dbms.js.map +0 -1
- package/lib/esm/icons/custom/Drag.js.map +0 -1
- package/lib/esm/icons/custom/Expand.js.map +0 -1
- package/lib/esm/icons/custom/ExternalLink.js.map +0 -1
- package/lib/esm/icons/custom/FitToScreen.js.map +0 -1
- package/lib/esm/icons/custom/FolderBookmark.js.map +0 -1
- package/lib/esm/icons/custom/Heirarchy2.js.map +0 -1
- package/lib/esm/icons/custom/Hierarchy1.js.map +0 -1
- package/lib/esm/icons/custom/Hierarchy2.js.map +0 -1
- package/lib/esm/icons/custom/NomLevel.js.map +0 -1
- package/lib/esm/icons/custom/Pin.js.map +0 -1
- package/lib/esm/icons/custom/Presentation.js.map +0 -1
- package/lib/esm/icons/custom/QueryBrowser.js.map +0 -1
- package/lib/esm/icons/custom/Rhombus.js.map +0 -1
- package/lib/esm/icons/custom/ScienceMolecule.js.map +0 -1
- package/lib/esm/icons/custom/Shrink.js.map +0 -1
- package/lib/esm/icons/custom/Status.js.map +0 -1
- package/lib/esm/icons/custom/Text.js.map +0 -1
- package/lib/esm/icons/custom/Triangle.js.map +0 -1
- package/lib/esm/icons/custom/VisualizeBloom.js.map +0 -1
- package/lib/esm/icons/custom/index.js.map +0 -1
- package/lib/esm/table/TableNavigation.js.map +0 -1
- package/lib/esm/table/hooks/hookCallbackTypes.js.map +0 -1
- package/lib/esm/table/hooks/index.js.map +0 -1
- package/lib/esm/table/hooks/useMultiRowSelect.js.map +0 -1
- package/lib/esm/table/hooks/useSingleRowSelect.js.map +0 -1
- package/lib/types/icons/Hero.d.ts +0 -28
|
@@ -21,9 +21,9 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
21
21
|
*/
|
|
22
22
|
import classNames from 'classnames';
|
|
23
23
|
import { userFriendlyPagination } from './helpers';
|
|
24
|
-
import {
|
|
24
|
+
import { ChevronLeftIconOutline, ChevronRightIconOutline } from '../icons';
|
|
25
25
|
const NavigationArrowButtonClasses = `
|
|
26
|
-
body-medium n-relative n-inline-flex n-items-center
|
|
26
|
+
n-body-medium n-relative n-inline-flex n-items-center
|
|
27
27
|
n-px-2 n-py-2 n-rounded-xl
|
|
28
28
|
n-text-light-neutral-text-weaker
|
|
29
29
|
hover:n-bg-light-primary-bg-strong hover:n-bg-opacity-10
|
|
@@ -31,7 +31,7 @@ hover:n-bg-light-primary-bg-strong hover:n-bg-opacity-10
|
|
|
31
31
|
const NavigationIconClasses = `
|
|
32
32
|
n-w-5 n-h-5 n-text-light-neutral-text-weak
|
|
33
33
|
`;
|
|
34
|
-
export const TableNavigation = ({ canPreviousPage, canNextPage, onPageClick, previousPage, nextPage, pageIndex, pageOptions, }) => (_jsxs("nav", Object.assign({ className: "n-relative n-z-0 n-inline-flex n-max-w-min n-rounded-md n-gap-x-2", "aria-label": "Pagination" }, { children: [canPreviousPage ? (_jsx(_Fragment, { children: _jsxs("button", Object.assign({ onClick: () => previousPage(), className: NavigationArrowButtonClasses }, { children: [_jsx("span", Object.assign({ className: "n-sr-only" }, { children: "Previous" })), _jsx(
|
|
34
|
+
export const TableNavigation = ({ canPreviousPage, canNextPage, onPageClick, previousPage, nextPage, pageIndex, pageOptions, }) => (_jsxs("nav", Object.assign({ className: "n-relative n-z-0 n-inline-flex n-max-w-min n-rounded-md n-gap-x-2", "aria-label": "Pagination" }, { children: [canPreviousPage ? (_jsx(_Fragment, { children: _jsxs("button", Object.assign({ onClick: () => previousPage(), className: NavigationArrowButtonClasses }, { children: [_jsx("span", Object.assign({ className: "n-sr-only" }, { children: "Previous" })), _jsx(ChevronLeftIconOutline, { className: NavigationIconClasses })] })) })) : null, userFriendlyPagination(pageIndex + 1, pageOptions.length).map((option, idx) => (_jsx("button", Object.assign({ "data-testid": `table-${option}`, className: classNames('n-relative n-inline-flex n-items-center n-justify-center n-px-3 n-py-0.5 n-body-medium n-rounded-xl n-leading-8', {
|
|
35
35
|
'n-cursor-pointer hover:n-bg-light-neutral-bg-strong': typeof option === 'number' && option !== pageIndex + 1,
|
|
36
36
|
'n-bg-light-primary-bg-strong n-text-light-neutral-text-inverse': option === pageIndex + 1,
|
|
37
37
|
'n-text-light-neutral-text-weaker': option !== pageIndex + 1,
|
|
@@ -39,6 +39,6 @@ export const TableNavigation = ({ canPreviousPage, canNextPage, onPageClick, pre
|
|
|
39
39
|
minWidth: '36px',
|
|
40
40
|
maxHeight: '36px',
|
|
41
41
|
minHeight: '36px',
|
|
42
|
-
}, onClick: () => typeof option === 'number' && onPageClick(option - 1) }, { children: option }), `${option}-${idx}`))), canNextPage ? (_jsxs("button", Object.assign({ onClick: () => nextPage(), className: NavigationArrowButtonClasses }, { children: [_jsx("span", Object.assign({ className: "n-sr-only" }, { children: "Next" })), _jsx(
|
|
42
|
+
}, onClick: () => typeof option === 'number' && onPageClick(option - 1) }, { children: option }), `${option}-${idx}`))), canNextPage ? (_jsxs("button", Object.assign({ onClick: () => nextPage(), className: NavigationArrowButtonClasses }, { children: [_jsx("span", Object.assign({ className: "n-sr-only" }, { children: "Next" })), _jsx(ChevronRightIconOutline, { className: NavigationIconClasses })] }))) : null] })));
|
|
43
43
|
export default TableNavigation;
|
|
44
44
|
//# sourceMappingURL=TableNavigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableNavigation.js","sourceRoot":"","sources":["../../../src/table-deprecated/TableNavigation.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAmB3E,MAAM,4BAA4B,GAAG;;;;;CAKpC,CAAC;AAEF,MAAM,qBAAqB,GAAG;;CAE7B,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAC9B,eAAe,EACf,WAAW,EACX,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,WAAW,GACU,EAAE,EAAE,CAAC,CAC1B,6BACE,SAAS,EAAC,mEAAmE,gBAClE,YAAY,iBAEtB,eAAe,CAAC,CAAC,CAAC,CACjB,4BACE,gCACE,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,EAAE,EAC7B,SAAS,EAAE,4BAA4B,iBAEvC,6BAAM,SAAS,EAAC,WAAW,8BAAgB,EAC3C,KAAC,sBAAsB,IAAC,SAAS,EAAE,qBAAqB,GAAI,KACrD,GACR,CACJ,CAAC,CAAC,CAAC,IAAI,EAEP,sBAAsB,CAAC,SAAS,GAAG,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,GAAG,CAC5D,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE,CAAC,CACf,8CAIe,SAAS,MAAM,EAAE,EAC9B,SAAS,EAAE,UAAU,CACnB,iHAAiH,EACjH;gBACE,qDAAqD,EACnD,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,SAAS,GAAG,CAAC;gBACxD,gEAAgE,EAC9D,MAAM,KAAK,SAAS,GAAG,CAAC;gBAC1B,kCAAkC,EAAE,MAAM,KAAK,SAAS,GAAG,CAAC;aAC7D,CACF,EACD,KAAK,EAAE;gBACL,QAAQ,EAAE,MAAM;gBAChB,SAAS,EAAE,MAAM;gBACjB,SAAS,EAAE,MAAM;aAClB,EACD,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,MAAM,KAAK,QAAQ,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,gBAEnE,MAAM,KAnBF,GAAG,MAAM,IAAI,GAAG,EAAE,CAoBhB,CACV,CACF,EAEA,WAAW,CAAC,CAAC,CAAC,CACb,gCACE,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,EAAE,EACzB,SAAS,EAAE,4BAA4B,iBAEvC,6BAAM,SAAS,EAAC,WAAW,0BAAY,EACvC,KAAC,uBAAuB,IAAC,SAAS,EAAE,qBAAqB,GAAI,KACtD,CACV,CAAC,CAAC,CAAC,IAAI,KACJ,CACP,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,116 @@
|
|
|
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 { Bars3CenterLeftIconOutline, BarsArrowDownIconOutline, BarsArrowUpIconOutline, } from '../icons';
|
|
34
|
+
import { memo } from 'react';
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* React Table helper to display sorting icon
|
|
38
|
+
* Source:
|
|
39
|
+
* https://react-table.tanstack.com/docs/api/useSortBy#column-properties
|
|
40
|
+
*
|
|
41
|
+
*/
|
|
42
|
+
export const SortIcon = (_a) => {
|
|
43
|
+
var { isSortedDesc } = _a, props = __rest(_a, ["isSortedDesc"]);
|
|
44
|
+
switch (true) {
|
|
45
|
+
case isSortedDesc === true:
|
|
46
|
+
return _jsx(BarsArrowDownIconOutline, Object.assign({}, props, { className: "n-w-4 n-h-4" }));
|
|
47
|
+
case isSortedDesc === false:
|
|
48
|
+
return _jsx(BarsArrowUpIconOutline, Object.assign({}, props, { className: "n-w-4 n-h-4" }));
|
|
49
|
+
default:
|
|
50
|
+
return _jsx(Bars3CenterLeftIconOutline, Object.assign({}, props, { className: "n-w-4 n-h-4" }));
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
export const ResizingBar = memo(function ResizingBarMemoed(props) {
|
|
54
|
+
return (_jsx("div", Object.assign({}, props, { className: "ndl-table-resizing-bar", style: {
|
|
55
|
+
width: '4px',
|
|
56
|
+
zIndex: 1,
|
|
57
|
+
// prevents from scrolling while dragging on touch devices
|
|
58
|
+
touchAction: 'none',
|
|
59
|
+
} })));
|
|
60
|
+
});
|
|
61
|
+
/**
|
|
62
|
+
* The left section of the bottom navigation
|
|
63
|
+
* that is showing the current page and how many results we can see
|
|
64
|
+
*/
|
|
65
|
+
export const TableResults = ({ pageIndex, pageLength, rowsLength, }) => {
|
|
66
|
+
const from = Math.min(rowsLength, 1 + pageIndex * pageLength);
|
|
67
|
+
const to = Math.min(rowsLength, pageIndex * pageLength + pageLength);
|
|
68
|
+
return (_jsx("span", Object.assign({ className: "n-text-light-neutral-text-weaker body-medium n-whitespace-nowrap" }, { children: _jsxs("span", { children: ["Showing", ' ', _jsxs("b", { children: [from, to !== from && `-${to}`] }), ' ', "of ", _jsx("b", { children: rowsLength }), " results"] }) })));
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Modified from here: https://gist.github.com/kottenator/9d936eb3e4e3c3e02598
|
|
72
|
+
*
|
|
73
|
+
* @param current Current Index
|
|
74
|
+
* @param max Max Index
|
|
75
|
+
* @returns
|
|
76
|
+
*/
|
|
77
|
+
export const userFriendlyPagination = (current, max) => {
|
|
78
|
+
const last = max;
|
|
79
|
+
const delta = 2;
|
|
80
|
+
const left = current - delta;
|
|
81
|
+
const right = current + delta + 1;
|
|
82
|
+
const range = [];
|
|
83
|
+
const rangeWithDots = [];
|
|
84
|
+
let l;
|
|
85
|
+
for (let i = 1; i <= last; i += 1) {
|
|
86
|
+
if (i === 1 || i === last || (i >= left && i < right)) {
|
|
87
|
+
range.push(i);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
for (let i = 0; i < range.length; i += 1) {
|
|
91
|
+
if (l) {
|
|
92
|
+
if (range[i] - l === 2) {
|
|
93
|
+
rangeWithDots.push(l + 1);
|
|
94
|
+
}
|
|
95
|
+
else if (range[i] - l !== 1) {
|
|
96
|
+
rangeWithDots.push('...');
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
rangeWithDots.push(range[i]);
|
|
100
|
+
l = range[i];
|
|
101
|
+
}
|
|
102
|
+
return rangeWithDots;
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* Small helper to get handle the Checkbox
|
|
106
|
+
* functionality in tables
|
|
107
|
+
*/
|
|
108
|
+
export const toggleRowSelection = (list, idx) => {
|
|
109
|
+
// Removing from the list
|
|
110
|
+
if (list.includes(idx)) {
|
|
111
|
+
return list.filter((o) => o !== idx);
|
|
112
|
+
}
|
|
113
|
+
// Adding to the list
|
|
114
|
+
return [...list, idx];
|
|
115
|
+
};
|
|
116
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/table-deprecated/helpers.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAG7B;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EAKxB,EAAE,EAAE;QALoB,EACvB,YAAY,OAIb,EAHI,KAAK,cAFe,gBAGxB,CADS;IAIR,QAAQ,IAAI,EAAE;QACZ,KAAK,YAAY,KAAK,IAAI;YACxB,OAAO,KAAC,wBAAwB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AE,EAAE,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC;KACtC;IACD,qBAAqB;IACrB,OAAO,CAAC,GAAG,IAAI,EAAE,GAAG,CAAC,CAAC;AACxB,CAAC,CAAC"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hookCallbackTypes.js","sourceRoot":"","sources":["../../../../src/table-deprecated/hooks/hookCallbackTypes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/table-deprecated/hooks/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMultiRowSelect.js","sourceRoot":"","sources":["../../../../src/table-deprecated/hooks/useMultiRowSelect.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAIL,YAAY,GAKb,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAW1C;;;;;;;;;;;;;GAaG;AACH,MAAM,iBAAiB,GAAG,CACxB,KAAe,EACf,EAAE;IACF,YAAY,CAAC,KAAK,CAAC,CAAC;IAEpB;;;MAGE;IACF,KAAK,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;QACpD,MAAM,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAC;QAE1B,MAAM,aAAa,GAAG,YAAY,CAAC;QACnC,sDAAsD;QACtD,MAAM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,KAAC,QAAQ,gCACK,OAAO,GAAG,CAAC,KAAK,EAAE,EAC9B,OAAO,EAAE,GAAG,EAAE,CACX,QAA2B,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,KAAK,CAAC,IAE9D,GAAW,CAAC,yBAAyB,EAAE,EAC5C,GACE,CACP;SACK;QACR,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,iBAAiB,CAAC,UAAU,GAAG,mBAAmB,CAAC;AAEnD,eAAe,iBAAiB,CAAC"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSingleRowSelect.js","sourceRoot":"","sources":["../../../../src/table-deprecated/hooks/useSingleRowSelect.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAe,YAAY,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAGpC;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,KAAe,EACf,EAAE;IACF,YAAY,CAAC,KAAK,CAAC,CAAC;IAEpB,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;QACnD,oCAAoC;QACpC,sDAAsD;QACtD;YACE,EAAE,EAAE,qBAAqB;YACzB,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI;YAClB,KAAK,EAAE,EAAE;YACT,yEAAyE;YACzE,2BAA2B;YAC3B,IAAI,EAAE,CAAC,EAAE,GAAG,EAAW,EAAE,EAAE;gBACzB,OAAO,CACL,KAAC,KAAK,oBACC,GAAW,CAAC,yBAAyB,EAAE,IAC5C,QAAQ,EAAE,GAAG,EAAE,CACZ,QAA2B,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,KAAK,CAAC,IAEnE,CACH,CAAC;YACJ,CAAC;SACK;QACR,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,eAAe,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 TableDepr } from './Table';
|
|
22
|
+
export * from './hooks';
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/table-deprecated/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,SAAS,CAAC;AAC/C,cAAc,SAAS,CAAC"}
|
package/lib/esm/tabs/Tabs.js
CHANGED
|
@@ -44,10 +44,10 @@ const useTabsContext = () => {
|
|
|
44
44
|
const getTabPanelId = (tabId) => `tabpanel-${tabId}`;
|
|
45
45
|
const getGeneralTabClasses = (size, fill) => {
|
|
46
46
|
return {
|
|
47
|
-
large: size === 'large',
|
|
48
|
-
small: size === 'small',
|
|
49
|
-
'filled-tab': fill === 'filled',
|
|
50
|
-
'underline-tab': fill === 'underline',
|
|
47
|
+
'ndl-large': size === 'large',
|
|
48
|
+
'ndl-small': size === 'small',
|
|
49
|
+
'ndl-filled-tab': fill === 'filled',
|
|
50
|
+
'ndl-underline-tab': fill === 'underline',
|
|
51
51
|
};
|
|
52
52
|
};
|
|
53
53
|
export const Tabs = forwardRef(function Tabs(_a, ref) {
|
|
@@ -59,15 +59,15 @@ export const Tabs = forwardRef(function Tabs(_a, ref) {
|
|
|
59
59
|
export const Tab = React.forwardRef(function Tab(_a, ref) {
|
|
60
60
|
var { children, tabId, disabled = false, className, as = 'button' } = _a, rest = __rest(_a, ["children", "tabId", "disabled", "className", "as"]);
|
|
61
61
|
const { size, fill, value, onChange } = useTabsContext();
|
|
62
|
-
const base = classnames(Object.assign(Object.assign({}, getGeneralTabClasses(size, fill)), { selected: value === tabId, disabled }));
|
|
62
|
+
const base = classnames(Object.assign(Object.assign({}, getGeneralTabClasses(size, fill)), { 'ndl-selected': value === tabId, 'ndl-disabled': disabled }));
|
|
63
63
|
const Component = as;
|
|
64
64
|
// Cast onChange since the compiler isn't smart enough to figure out union of function's parameters
|
|
65
65
|
// https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-3.html#improved-behavior-for-calling-union-types
|
|
66
66
|
// https://stackoverflow.com/questions/55572797/why-does-typescript-expect-never-as-function-argument-when-retrieving-the-func
|
|
67
67
|
const castOnChange = onChange;
|
|
68
68
|
const handleChange = () => !disabled && castOnChange(tabId);
|
|
69
|
-
const classes = classnames('tab', base, className);
|
|
70
|
-
return (_jsxs(Component, Object.assign({ className: classes, onClick: handleChange, role: "tab", "aria-controls": getTabPanelId(tabId) }, rest, { ref: ref }, { children: [children, fill === 'underline' && _jsx("span", { className: "tab-underline" })] })));
|
|
69
|
+
const classes = classnames('ndl-tab', base, className);
|
|
70
|
+
return (_jsxs(Component, Object.assign({ className: classes, onClick: handleChange, role: "tab", "aria-controls": getTabPanelId(tabId) }, rest, { ref: ref }, { children: [children, fill === 'underline' && _jsx("span", { className: "ndl-tab-underline" })] })));
|
|
71
71
|
});
|
|
72
72
|
export const TabPanel = React.forwardRef(function TabPanel(_a, ref) {
|
|
73
73
|
var { as = 'div', children, value, tabId } = _a, rest = __rest(_a, ["as", "children", "value", "tabId"]);
|
package/lib/esm/tabs/Tabs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../src/tabs/Tabs.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAoCxC,MAAM,WAAW,GAAG,KAAK,CAAC,aAAa,CAA8B,IAAI,CAAC,CAAC;AAE3E,MAAM,cAAc,GAAG,GAAG,EAAE;IAC1B,MAAM,OAAO,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;IAExC,IAAI,OAAO,KAAK,IAAI,EAAE;QACpB,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;KAC7C;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,aAAa,GAAG,CAAC,KAAY,EAAE,EAAE,CAAC,YAAY,KAAK,EAAE,CAAC;AAE5D,MAAM,oBAAoB,GAAG,CAAC,IAAU,EAAE,IAAU,EAAE,EAAE;IACtD,OAAO;QACL,
|
|
1
|
+
{"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../src/tabs/Tabs.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,UAAU,MAAM,YAAY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S,QAAQ,CACxD,EAA8D,EAC9D,GAAG;QADH,EAAE,EAAE,GAAG,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,OAA0B,EAArB,IAAI,cAA7C,oCAA+C,CAAF;IAG7C,MAAM,SAAS,GAAG,EAAE,CAAC;IAErB,OAAO,CACL,4BACG,KAAK,KAAK,KAAK,IAAI,CAClB,KAAC,SAAS,kBACR,IAAI,EAAC,UAAU,EACf,EAAE,EAAE,aAAa,CAAC,KAAK,CAAC,IACpB,IAAI,IACR,GAAG,EAAE,GAAG,gBAEP,QAAQ,IACC,CACb,GACA,CACJ,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
package/lib/esm/tag/Tag.js
CHANGED
|
@@ -32,7 +32,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
32
32
|
*/
|
|
33
33
|
import React, { useCallback } from 'react';
|
|
34
34
|
import classnames from 'classnames';
|
|
35
|
-
import {
|
|
35
|
+
import { XMarkIconOutline } from '../icons';
|
|
36
36
|
import { needleWarningMessage } from '../_common/utils';
|
|
37
37
|
/**
|
|
38
38
|
*
|
|
@@ -49,20 +49,22 @@ import { needleWarningMessage } from '../_common/utils';
|
|
|
49
49
|
*
|
|
50
50
|
*
|
|
51
51
|
*/
|
|
52
|
-
const Tag = React.forwardRef(function Tag(props, ref) {
|
|
52
|
+
export const Tag = React.forwardRef(function Tag(props, ref) {
|
|
53
53
|
const { children, type = 'default', removeable, onRemove } = props, rest = __rest(props, ["children", "type", "removeable", "onRemove"]);
|
|
54
54
|
if (removeable && typeof onRemove !== 'function') {
|
|
55
55
|
needleWarningMessage('Tag element is removable but onRemove prop is not a function or provided');
|
|
56
56
|
}
|
|
57
|
-
const classes = classnames(`ndl-tag`,
|
|
58
|
-
|
|
57
|
+
const classes = classnames(`ndl-tag`, props.className, {
|
|
58
|
+
'ndl-default': type === 'default',
|
|
59
|
+
'ndl-destructive': type === 'destructive',
|
|
60
|
+
'ndl-removeable': removeable,
|
|
59
61
|
});
|
|
60
62
|
const keyDownHandler = useCallback((e) => {
|
|
61
63
|
if (e.key === 'Enter') {
|
|
62
64
|
onRemove && onRemove(e);
|
|
63
65
|
}
|
|
64
66
|
}, [onRemove]);
|
|
65
|
-
return (_jsxs("div", Object.assign({}, rest, { className: classes, ref: ref }, { children: [children, removeable && (_jsx("button", Object.assign({ type: "button", className: "remove-icon", onKeyDown: keyDownHandler, onClick: onRemove }, { children: _jsx(
|
|
67
|
+
return (_jsxs("div", Object.assign({}, rest, { className: classes, ref: ref }, { children: [children, removeable && (_jsx("button", Object.assign({ type: "button", className: "ndl-remove-icon", onKeyDown: keyDownHandler, onClick: onRemove }, { children: _jsx(XMarkIconOutline, {}) })))] })));
|
|
66
68
|
});
|
|
67
69
|
export default Tag;
|
|
68
70
|
//# sourceMappingURL=Tag.js.map
|
package/lib/esm/tag/Tag.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.js","sourceRoot":"","sources":["../../../src/tag/Tag.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Tag.js","sourceRoot":"","sources":["../../../src/tag/Tag.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAoCxD;;;;;;GAMG;AAEH,qCAAqC;AAErC;;;;;;GAMG;AAEH,MAAM,CAAC,MAAM,GAAG,GAAG,KAAK,CAAC,UAAU,CAAC,SAAS,GAAG,CAC9C,KAAe,EACf,GAAuC;IAEvC,MAAM,EAAE,QAAQ,EAAE,IAAI,GAAG,SAAS,EAAE,UAAU,EAAE,QAAQ,KAAc,KAAK,EAAd,IAAI,UAAK,KAAK,EAArE,8CAA6D,CAAQ,CAAC;IAE5E,IAAI,UAAU,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;QAChD,oBAAoB,CAClB,0EAA0E,CAC3E,CAAC;KACH;IAED,MAAM,OAAO,GAAG,UAAU,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE;QACrD,aAAa,EAAE,IAAI,KAAK,SAAS;QACjC,iBAAiB,EAAE,IAAI,KAAK,aAAa;QACzC,gBAAgB,EAAE,UAAU;KAC7B,CAAC,CAAC;IAEH,MAAM,cAAc,GAAG,WAAW,CAChC,CAAC,CAAyC,EAAE,EAAE;QAC5C,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,EAAE;YACrB,QAAQ,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC;SACzB;IACH,CAAC,EACD,CAAC,QAAQ,CAAC,CACX,CAAC;IAEF,OAAO,CACL,+BAAS,IAAI,IAAE,SAAS,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,iBACxC,QAAQ,EACR,UAAU,IAAI,CACb,+BACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,iBAAiB,EAC3B,SAAS,EAAE,cAAc,EACzB,OAAO,EAAE,QAAQ,gBAEjB,KAAC,gBAAgB,KAAG,IACb,CACV,KACG,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,GAAG,CAAC"}
|
package/lib/esm/tag/index.js
CHANGED
package/lib/esm/tag/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tag/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tag/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,cAAc,OAAO,CAAC"}
|
|
@@ -32,7 +32,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
32
32
|
*/
|
|
33
33
|
import React, { useMemo } from 'react';
|
|
34
34
|
import classNames from 'classnames';
|
|
35
|
-
import {
|
|
35
|
+
import { ExclamationCircleIconSolid } from '../icons';
|
|
36
36
|
import { needleWarningMessage } from '../_common/utils';
|
|
37
37
|
/**
|
|
38
38
|
*
|
|
@@ -52,17 +52,18 @@ import { needleWarningMessage } from '../_common/utils';
|
|
|
52
52
|
const TextInput = React.forwardRef(function TextInput(props, ref) {
|
|
53
53
|
const { label, fluid, errorText, helpText, leftIcon, rightIcon, type = 'text', containerSize = 'small', 'aria-label': ariaLabel } = props, customProps = __rest(props, ["label", "fluid", "errorText", "helpText", "leftIcon", "rightIcon", "type", "containerSize", 'aria-label']);
|
|
54
54
|
const containerWrappingClass = classNames(`ndl-form-item ndl-type-text`, customProps.className, {
|
|
55
|
-
disabled: customProps.disabled,
|
|
56
|
-
|
|
57
|
-
'
|
|
58
|
-
'has-
|
|
59
|
-
'has-
|
|
60
|
-
'has-icon':
|
|
55
|
+
'ndl-disabled': customProps.disabled,
|
|
56
|
+
'ndl-small': containerSize === 'small',
|
|
57
|
+
'ndl-large': containerSize === 'large',
|
|
58
|
+
'ndl-has-error': errorText,
|
|
59
|
+
'ndl-has-left-icon': leftIcon,
|
|
60
|
+
'ndl-has-right-icon': rightIcon || errorText,
|
|
61
|
+
'ndl-has-icon': leftIcon || rightIcon || errorText,
|
|
61
62
|
});
|
|
62
63
|
const hasEmptyLabelValue = !label || label === '';
|
|
63
|
-
const labelWrappingClass = classNames(
|
|
64
|
-
fluid,
|
|
65
|
-
'form-item-no-label': hasEmptyLabelValue,
|
|
64
|
+
const labelWrappingClass = classNames('ndl-form-item-label', {
|
|
65
|
+
'ndl-fluid': fluid,
|
|
66
|
+
'ndl-form-item-no-label': hasEmptyLabelValue,
|
|
66
67
|
});
|
|
67
68
|
useMemo(() => {
|
|
68
69
|
if (!label && !ariaLabel) {
|
|
@@ -70,7 +71,7 @@ const TextInput = React.forwardRef(function TextInput(props, ref) {
|
|
|
70
71
|
}
|
|
71
72
|
}, [label, ariaLabel]);
|
|
72
73
|
const customPropsClassNameStripped = Object.assign(Object.assign({}, customProps), { className: undefined });
|
|
73
|
-
return (_jsxs("div", Object.assign({ className: containerWrappingClass }, { children: [_jsxs("label", Object.assign({ className: labelWrappingClass }, { children: [_jsxs("div", Object.assign({ className: "input-wrapper" }, { children: [leftIcon && _jsx("div", Object.assign({ className: "icon left-icon" }, { children: leftIcon })), _jsx("input", Object.assign({}, customPropsClassNameStripped, { type: type, ref: ref, "aria-label": ariaLabel })), rightIcon && !errorText && (_jsx("div", Object.assign({ className: "
|
|
74
|
+
return (_jsxs("div", Object.assign({ className: containerWrappingClass }, { children: [_jsxs("label", Object.assign({ className: labelWrappingClass }, { children: [_jsxs("div", Object.assign({ className: "ndl-input-wrapper" }, { children: [leftIcon && _jsx("div", Object.assign({ className: "ndl-icon ndl-left-icon" }, { children: leftIcon })), _jsx("input", Object.assign({}, customPropsClassNameStripped, { type: type, ref: ref, "aria-label": ariaLabel })), rightIcon && !errorText && (_jsx("div", Object.assign({ className: "ndl-right-icon" }, { children: rightIcon })))] })), _jsx("span", Object.assign({ className: "ndl-form-label-text" }, { children: label }))] })), helpText && !errorText && _jsx("div", Object.assign({ className: "ndl-form-msg" }, { children: helpText })), errorText && (_jsxs("div", Object.assign({ className: "ndl-form-msg" }, { children: [_jsx("div", Object.assign({ className: "ndl-error-icon" }, { children: _jsx(ExclamationCircleIconSolid, {}) })), _jsx("div", Object.assign({ className: "ndl-error-text" }, { children: errorText }))] })))] })));
|
|
74
75
|
});
|
|
75
76
|
export default TextInput;
|
|
76
77
|
//# sourceMappingURL=TextInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.js","sourceRoot":"","sources":["../../../src/text-input/TextInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,EAAgB,OAAO,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"TextInput.js","sourceRoot":"","sources":["../../../src/text-input/TextInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,EAAgB,OAAO,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAyBxD;;;;;;GAMG;AAEH,qCAAqC;AAErC;;;;;;GAMG;AAEH,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAAC,SAAS,SAAS,CACnD,KAA0B,EAC1B,GAAmC;IAEnC,MAAM,EACJ,KAAK,EACL,KAAK,EACL,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,IAAI,GAAG,MAAM,EACb,aAAa,GAAG,OAAO,EACvB,YAAY,EAAE,SAAS,KAErB,KAAK,EADJ,WAAW,UACZ,KAAK,EAXH,2GAWL,CAAQ,CAAC;IAEV,MAAM,sBAAsB,GAAG,UAAU,CACvC,6BAA6B,EAC7B,WAAW,CAAC,SAAS,EACrB;QACE,cAAc,EAAE,WAAW,CAAC,QAAQ;QACpC,WAAW,EAAE,aAAa,KAAK,OAAO;QACtC,WAAW,EAAE,aAAa,KAAK,OAAO;QACtC,eAAe,EAAE,SAAS;QAC1B,mBAAmB,EAAE,QAAQ;QAC7B,oBAAoB,EAAE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ACP,KACG,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
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, Fragment as _Fragment } 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, { useEffect, useState, } from 'react';
|
|
34
|
+
import { useFloating, offset, autoPlacement, autoUpdate, useHover, useInteractions, } from '@floating-ui/react-dom-interactions';
|
|
35
|
+
import Tooltip from './Tooltip';
|
|
36
|
+
import { tokens } from '@neo4j-ndl/base';
|
|
37
|
+
const PLACEMENTS = ['top', 'bottom', 'left', 'right'];
|
|
38
|
+
const calculateArrow = (placement) => {
|
|
39
|
+
switch (placement) {
|
|
40
|
+
case 'bottom':
|
|
41
|
+
return 'top';
|
|
42
|
+
case 'left':
|
|
43
|
+
return 'right';
|
|
44
|
+
case 'right':
|
|
45
|
+
return 'left';
|
|
46
|
+
case 'top':
|
|
47
|
+
default:
|
|
48
|
+
return 'bottom';
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
const SmartTooltip = React.forwardRef(function SmartTooltip(_a, ref) {
|
|
52
|
+
var { open: openProp, allowedPlacements = PLACEMENTS } = _a, props = __rest(_a, ["open", "allowedPlacements"]);
|
|
53
|
+
const [open, setOpen] = useState(false);
|
|
54
|
+
const { context, x, y, reference, floating, strategy, placement } = useFloating({
|
|
55
|
+
open,
|
|
56
|
+
onOpenChange: setOpen,
|
|
57
|
+
whileElementsMounted: autoUpdate,
|
|
58
|
+
middleware: [
|
|
59
|
+
offset(10),
|
|
60
|
+
autoPlacement({
|
|
61
|
+
allowedPlacements,
|
|
62
|
+
}),
|
|
63
|
+
],
|
|
64
|
+
});
|
|
65
|
+
const hover = useHover(context, {
|
|
66
|
+
move: false,
|
|
67
|
+
delay: {
|
|
68
|
+
// Strip the 'ms' from the duration token, need to provide pure ms durations
|
|
69
|
+
close: parseInt(tokens.transitions.values.duration.default.replace('ms', '')),
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
const { getFloatingProps } = useInteractions([hover]);
|
|
73
|
+
useEffect(() => {
|
|
74
|
+
/**
|
|
75
|
+
* Assign passed ref to the reference callback
|
|
76
|
+
* of the useFloating hook
|
|
77
|
+
*/
|
|
78
|
+
const { current = null } = ref || {};
|
|
79
|
+
if (current) {
|
|
80
|
+
reference(current);
|
|
81
|
+
}
|
|
82
|
+
}, [ref]);
|
|
83
|
+
return (_jsx(_Fragment, { children: open || openProp ? (_jsx(Tooltip, Object.assign({}, props, getFloatingProps(), { ref: floating, arrowPosition: calculateArrow(placement), style: Object.assign({ position: strategy, top: y !== null && y !== void 0 ? y : 0, left: x !== null && x !== void 0 ? x : 0, width: 'max-content' }, props.style) }))) : null }));
|
|
84
|
+
});
|
|
85
|
+
export default SmartTooltip;
|
|
86
|
+
//# sourceMappingURL=SmartTooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SmartTooltip.js","sourceRoot":"","sources":["../../../src/tooltip/SmartTooltip.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,EAGZ,SAAS,EACT,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EACL,WAAW,EACX,MAAM,EACN,aAAa,EACb,UAAU,EACV,QAAQ,EACR,eAAe,GAChB,MAAM,qCAAqC,CAAC;AAE7C,OAAO,OAAyB,MAAM,WAAW,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AASzC,MAAM,UAAU,GAAW,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AAE9D,MAAM,cAAc,GAAG,CACrB,SAAe,EACkC,EAAE;IACnD,QAAQ,SAAS,EAAE;QACjB,KAAK,QAAQ;YACX,OAAO,KAAK,CAAC;QACf,KAAK,MAAM;YACT,OAAO,OAAO,CAAC;QACjB,KAAK,OAAO;YACV,OAAO,MAAM,CAAC;QAChB,KAAK,KAAK,CAAC;QACX;YACE,OAAO,QAAQ,CAAC;KACnB;AACH,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,KAAK,CAAC,UAAU,CAAC,SAAS,YAAY,CACzD,EAIoB,EACpB,GAAgC;QALhC,EACE,IAAI,EAAE,QAAQ,EACd,iBAAiB,GAAG,UAAU,OAEZ,EADf,KAAK,cAH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,CAAC,EACX,IAAI,EAAE,CAAC,aAAD,CAAC,cAAD,CAAC,GAAI,CAAC,EACZ,KAAK,EAAE,aAAa,IACjB,KAAK,CAAC,KAAK,KAEhB,CACH,CAAC,CAAC,CAAC,IAAI,GACP,CACJ,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,YAAY,CAAC"}
|
|
@@ -34,8 +34,16 @@ import React from 'react';
|
|
|
34
34
|
import classnames from 'classnames';
|
|
35
35
|
const Tooltip = React.forwardRef(function Tooltip(_a, ref) {
|
|
36
36
|
var { arrowPosition, children, className } = _a, props = __rest(_a, ["arrowPosition", "children", "className"]);
|
|
37
|
-
const
|
|
38
|
-
|
|
37
|
+
const classesWrapper = classnames('ndl-tooltip-wrapper', className);
|
|
38
|
+
const classesTriangle = classnames('ndl-tooltip-triangle', {
|
|
39
|
+
'ndl-top': arrowPosition === 'top',
|
|
40
|
+
'ndl-bottom': arrowPosition === 'bottom',
|
|
41
|
+
'ndl-left': arrowPosition === 'left',
|
|
42
|
+
'ndl-right': arrowPosition === 'right',
|
|
43
|
+
'ndl-top-left': arrowPosition === 'top-left',
|
|
44
|
+
'ndl-top-right': arrowPosition === 'top-right',
|
|
45
|
+
});
|
|
46
|
+
return (_jsxs("div", Object.assign({}, props, { role: "tooltip", className: classesWrapper, ref: ref }, { children: [children, _jsx("div", { className: classesTriangle })] })));
|
|
39
47
|
});
|
|
40
48
|
export default Tooltip;
|
|
41
49
|
//# sourceMappingURL=Tooltip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../../../src/tooltip/Tooltip.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AAgBpC,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,SAAS,OAAO,CAC/C,EAA8D,EAC9D,GAAuC;QADvC,EAAE,aAAa,EAAE,QAAQ,EAAE,SAAS,OAA0B,EAArB,KAAK,cAA9C,0CAAgD,CAAF;IAG9C,MAAM,
|
|
1
|
+
{"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../../../src/tooltip/Tooltip.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AAgBpC,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,SAAS,OAAO,CAC/C,EAA8D,EAC9D,GAAuC;QADvC,EAAE,aAAa,EAAE,QAAQ,EAAE,SAAS,OAA0B,EAArB,KAAK,cAA9C,0CAAgD,CAAF;IAG9C,MAAM,cAAc,GAAG,UAAU,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC;IAEpE,MAAM,eAAe,GAAG,UAAU,CAAC,sBAAsB,EAAE;QACzD,SAAS,EAAE,aAAa,KAAK,KAAK;QAClC,YAAY,EAAE,aAAa,KAAK,QAAQ;QACxC,UAAU,EAAE,aAAa,KAAK,MAAM;QACpC,WAAW,EAAE,aAAa,KAAK,OAAO;QACtC,cAAc,EAAE,aAAa,KAAK,UAAU;QAC5C,eAAe,EAAE,aAAa,KAAK,WAAW;KAC/C,CAAC,CAAC;IAEH,OAAO,CACL,+BAAS,KAAK,IAAE,IAAI,EAAC,SAAS,EAAC,SAAS,EAAE,cAAc,EAAE,GAAG,EAAE,GAAG,iBAC/D,QAAQ,EACT,cAAK,SAAS,EAAE,eAAe,GAAI,KAC/B,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,OAAO,CAAC"}
|
package/lib/esm/tooltip/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tooltip/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tooltip/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -9,7 +9,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
/**
|
|
14
14
|
*
|
|
15
15
|
* Copyright (c) "Neo4j"
|
|
@@ -30,12 +30,22 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
30
30
|
* You should have received a copy of the GNU General Public License
|
|
31
31
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
32
32
|
*/
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
import classNames from 'classnames';
|
|
34
|
+
import { needleWarningMessage } from '../_common/utils';
|
|
35
|
+
import { TypographyDefaultMapping, } from './types';
|
|
36
|
+
export const Typography = (props) => {
|
|
37
|
+
const { className = '', variant, as } = props, rest = __rest(props, ["className", "variant", "as"]);
|
|
38
|
+
const classes = classNames(`n-${variant}`, className);
|
|
39
|
+
const Component = (as || TypographyDefaultMapping[variant]);
|
|
40
|
+
return _jsx(Component, Object.assign({}, rest, { className: classes }));
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Experimental Type testing
|
|
44
|
+
*/
|
|
45
|
+
const Link = ({ linkClick }) => (_jsx("button", Object.assign({ onClick: linkClick }, { children: "Test" })));
|
|
46
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
47
|
+
// @ts-ignore
|
|
48
|
+
const _MultipleCasesComponent = () => (_jsxs("div", { children: [_jsx(Typography, { variant: "h2", as: "a", href: "www.neo4j.com" }), _jsx(Typography, { variant: "h2", as: "span", href: "www.neo4j.com" }), _jsx(Typography, { variant: "body-medium", as: Link }), _jsx(Typography, { variant: "body-medium", as: Link, linkClick: () => {
|
|
49
|
+
needleWarningMessage('clicked link');
|
|
50
|
+
} })] }));
|
|
51
|
+
//# sourceMappingURL=Typography.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Typography.js","sourceRoot":"","sources":["../../../src/typography/Typography.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAIL,wBAAwB,GAEzB,MAAM,SAAS,CAAC;AAEjB,MAAM,CAAC,MAAM,UAAU,GAAG,CAIxB,KAGoC,EACpC,EAAE;IACF,MAAM,EAAE,SAAS,GAAG,EAAE,EAAE,OAAO,EAAE,EAAE,KAAc,KAAK,EAAd,IAAI,UAAK,KAAK,EAAhD,8BAAwC,CAAQ,CAAC;IAEvD,MAAM,OAAO,GAAG,UAAU,CAAC,KAAK,OAAO,EAAE,EAAE,SAAS,CAAC,CAAC;IACtD,MAAM,SAAS,GAAG,CAAC,EAAE,IAAI,wBAAwB,CAAC,OAAO,CAAC,CAAmB,CAAC;IAE9E,OAAO,KAAC,SAAS,oBAAK,IAAI,IAAE,SAAS,EAAE,OAAO,IAAI,CAAC;AACrD,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,IAAI,GAAG,CAAC,EAAE,SAAS,EAA6B,EAAE,EAAE,CAAC,CACzD,+BAAQ,OAAO,EAAE,SAAS,0BAAe,CAC1C,CAAC;AAEF,6DAA6D;AAC7D,aAAa;AACb,MAAM,uBAAuB,GAAG,GAAG,EAAE,CAAC,CACpC,0BAEE,KAAC,UAAU,IAAC,OAAO,EAAC,IAAI,EAAC,EAAE,EAAC,GAAG,EAAC,IAAI,EAAC,eAAe,GAAG,EAGvD,KAAC,UAAU,IAAC,OAAO,EAAC,IAAI,EAAC,EAAE,EAAC,MAAM,EAAC,IAAI,EAAC,eAAe,GAAG,EAG1D,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,EAAC,EAAE,EAAE,IAAI,GAAI,EAG9C,KAAC,UAAU,IACT,OAAO,EAAC,aAAa,EACrB,EAAE,EAAE,IAAI,EACR,SAAS,EAAE,GAAG,EAAE;gBACd,oBAAoB,CAAC,cAAc,CAAC,CAAC;YACvC,CAAC,GACD,IACE,CACP,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 * from './Typography';
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/typography/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,cAAc,cAAc,CAAC"}
|