@neo4j-ndl/react 2.16.26 → 3.0.0-alpha-4904fb7
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/CodeBlockWrapper.js +10 -8
- package/lib/cjs/_common/CodeBlockWrapper.js.map +1 -1
- package/lib/cjs/_common/ConditionalWrap.js +1 -1
- package/lib/cjs/_common/ConditionalWrap.js.map +1 -1
- package/lib/cjs/_common/coditionalWrap.js +1 -1
- package/lib/cjs/_common/coditionalWrap.js.map +1 -1
- package/lib/cjs/_common/input/RadioAndCheckboxWrapper.js +6 -20
- package/lib/cjs/_common/input/RadioAndCheckboxWrapper.js.map +1 -1
- package/lib/cjs/_common/messages.js +1 -2
- package/lib/cjs/_common/messages.js.map +1 -1
- package/lib/cjs/{helpers → _common}/types.js +1 -2
- package/lib/cjs/_common/types.js.map +1 -0
- package/lib/cjs/accordion/Accordion.js +24 -24
- package/lib/cjs/accordion/Accordion.js.map +1 -1
- package/lib/cjs/avatar/Avatar.js +7 -17
- package/lib/cjs/avatar/Avatar.js.map +1 -1
- package/lib/cjs/banner/Banner.js +30 -25
- package/lib/cjs/banner/Banner.js.map +1 -1
- package/lib/cjs/breadcrumbs/Breadcrumbs.js +60 -90
- package/lib/cjs/breadcrumbs/Breadcrumbs.js.map +1 -1
- package/lib/cjs/button/Button.js +17 -33
- package/lib/cjs/button/Button.js.map +1 -1
- package/lib/cjs/button/IconButton.js +13 -21
- package/lib/cjs/button/IconButton.js.map +1 -1
- package/lib/cjs/button/IconButtonArray.js +43 -22
- package/lib/cjs/button/IconButtonArray.js.map +1 -1
- package/lib/cjs/callout/Callout.js +2 -14
- package/lib/cjs/callout/Callout.js.map +1 -1
- package/lib/cjs/charts/Axis.js +216 -0
- package/lib/cjs/charts/Axis.js.map +1 -0
- package/lib/cjs/charts/CartesianGrid.js +73 -0
- package/lib/cjs/charts/CartesianGrid.js.map +1 -0
- package/lib/cjs/charts/Chart.js +538 -0
- package/lib/cjs/charts/Chart.js.map +1 -0
- package/lib/cjs/charts/ChartTooltip.js +56 -0
- package/lib/cjs/charts/ChartTooltip.js.map +1 -0
- package/lib/cjs/charts/Charts.js +99 -0
- package/lib/cjs/charts/Charts.js.map +1 -0
- package/lib/cjs/charts/Dot.js +31 -0
- package/lib/cjs/charts/Dot.js.map +1 -0
- package/lib/cjs/charts/Legend.js +180 -0
- package/lib/cjs/charts/Legend.js.map +1 -0
- package/lib/cjs/charts/Line.js +101 -0
- package/lib/cjs/charts/Line.js.map +1 -0
- package/lib/cjs/{code-block → charts}/index.js +1 -1
- package/lib/cjs/charts/index.js.map +1 -0
- package/lib/cjs/{table/TableContext.js → charts/utils.js} +18 -14
- package/lib/cjs/charts/utils.js.map +1 -0
- package/lib/cjs/checkbox/Checkbox.js +2 -14
- package/lib/cjs/checkbox/Checkbox.js.map +1 -1
- package/lib/cjs/clipboard-copier/ClipboardButton.js +16 -20
- package/lib/cjs/clipboard-copier/ClipboardButton.js.map +1 -1
- package/lib/cjs/code/Code.js +179 -0
- package/lib/cjs/code/Code.js.map +1 -0
- package/lib/cjs/{cypher-code-block → code}/index.js +1 -1
- package/lib/cjs/code/index.js.map +1 -0
- package/lib/cjs/code/languages.js +49 -0
- package/lib/cjs/code/languages.js.map +1 -0
- package/lib/cjs/context-menu/ContextMenu.js +202 -319
- package/lib/cjs/context-menu/ContextMenu.js.map +1 -1
- package/lib/cjs/data-grid/Components.js +73 -44
- package/lib/cjs/data-grid/Components.js.map +1 -1
- package/lib/cjs/data-grid/DataGrid.js +6 -6
- package/lib/cjs/data-grid/DataGrid.js.map +1 -1
- package/lib/cjs/data-grid/illustrations/NoData.js +27 -0
- package/lib/cjs/data-grid/illustrations/NoData.js.map +1 -0
- package/lib/cjs/date-picker/DatePicker.js +33 -10
- package/lib/cjs/date-picker/DatePicker.js.map +1 -1
- package/lib/cjs/dialog/Dialog.js +21 -35
- package/lib/cjs/dialog/Dialog.js.map +1 -1
- package/lib/cjs/divider/Divider.js +2 -14
- package/lib/cjs/divider/Divider.js.map +1 -1
- package/lib/cjs/drawer/Drawer.js +10 -8
- package/lib/cjs/drawer/Drawer.js.map +1 -1
- package/lib/cjs/dropdown/Dropdown.js +18 -34
- package/lib/cjs/dropdown/Dropdown.js.map +1 -1
- package/lib/cjs/dropdown/Overrides.js +6 -2
- package/lib/cjs/dropdown/Overrides.js.map +1 -1
- package/lib/cjs/dropdown-button/DropdownButton.js +2 -21
- package/lib/cjs/dropdown-button/DropdownButton.js.map +1 -1
- package/lib/{types/context-menu/SafeArea.d.ts → cjs/dropdown-button/avatar-test.stories.tsx.js} +10 -18
- package/lib/cjs/dropdown-button/avatar-test.stories.tsx.js.map +1 -0
- package/lib/cjs/dropzone/Dropzone.js +4 -15
- package/lib/cjs/dropzone/Dropzone.js.map +1 -1
- package/lib/cjs/graph-label/GraphLabel.js +33 -34
- package/lib/cjs/graph-label/GraphLabel.js.map +1 -1
- package/lib/cjs/helpers/index.js +0 -1
- package/lib/cjs/helpers/index.js.map +1 -1
- package/lib/cjs/hooks/index.js +5 -3
- package/lib/cjs/hooks/index.js.map +1 -1
- package/lib/cjs/icons/generated/heroIcons.js +917 -596
- package/lib/cjs/icons/generated/heroIcons.js.map +1 -1
- package/lib/cjs/index.js +3 -5
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/inline-edit/InlineEdit.js +12 -7
- package/lib/cjs/inline-edit/InlineEdit.js.map +1 -1
- package/lib/cjs/label/Label.js +4 -16
- package/lib/cjs/label/Label.js.map +1 -1
- package/lib/cjs/layout/Box.js +4 -16
- package/lib/cjs/layout/Box.js.map +1 -1
- package/lib/cjs/layout/Flex.js +4 -16
- package/lib/cjs/layout/Flex.js.map +1 -1
- package/lib/cjs/loading-spinner/LoadingSpinner.js +2 -13
- package/lib/cjs/loading-spinner/LoadingSpinner.js.map +1 -1
- package/lib/cjs/modal/Modal.js +2 -2
- package/lib/cjs/modal/Modal.js.map +1 -1
- package/lib/cjs/popover/Popover.js +89 -207
- package/lib/cjs/popover/Popover.js.map +1 -1
- package/lib/cjs/popover/use-popover.js +86 -0
- package/lib/cjs/popover/use-popover.js.map +1 -0
- package/lib/cjs/progress-bar/ProgressBar.js +2 -14
- package/lib/cjs/progress-bar/ProgressBar.js.map +1 -1
- package/lib/cjs/radio/Radio.js +2 -1
- package/lib/cjs/radio/Radio.js.map +1 -1
- package/lib/cjs/segmented-control/SegmentedControl.js +6 -19
- package/lib/cjs/segmented-control/SegmentedControl.js.map +1 -1
- package/lib/cjs/side-navigation/SideNavigation.js +52 -59
- package/lib/cjs/side-navigation/SideNavigation.js.map +1 -1
- package/lib/cjs/slider/Slider.js +5 -6
- package/lib/cjs/slider/Slider.js.map +1 -1
- package/lib/cjs/status-indicator/StatusIndicator.js.map +1 -1
- package/lib/cjs/switch/Switch.js +13 -1
- package/lib/cjs/switch/Switch.js.map +1 -1
- package/lib/cjs/tabs/Tabs.js +11 -27
- package/lib/cjs/tabs/Tabs.js.map +1 -1
- package/lib/cjs/tag/Tag.js +5 -18
- package/lib/cjs/tag/Tag.js.map +1 -1
- package/lib/cjs/text-input/TextInput.js +14 -24
- package/lib/cjs/text-input/TextInput.js.map +1 -1
- package/lib/cjs/text-link/TextLink.js +4 -17
- package/lib/cjs/text-link/TextLink.js.map +1 -1
- package/lib/cjs/textarea/Textarea.js +6 -20
- package/lib/cjs/textarea/Textarea.js.map +1 -1
- package/lib/cjs/toast/Toast.js +2 -3
- package/lib/cjs/toast/Toast.js.map +1 -1
- package/lib/cjs/tooltip/Tooltip.js +125 -0
- package/lib/cjs/tooltip/Tooltip.js.map +1 -0
- package/lib/cjs/{tip → tooltip}/index.js +15 -16
- package/lib/cjs/tooltip/index.js.map +1 -0
- package/lib/cjs/tooltip/use-tooltip.js +78 -0
- package/lib/cjs/tooltip/use-tooltip.js.map +1 -0
- package/lib/cjs/tree-view/TreeView.js +4 -16
- package/lib/cjs/tree-view/TreeView.js.map +1 -1
- package/lib/cjs/tree-view/TreeViewTextItem.js +11 -7
- package/lib/cjs/tree-view/TreeViewTextItem.js.map +1 -1
- package/lib/cjs/typography/Typography.js +4 -4
- package/lib/cjs/typography/Typography.js.map +1 -1
- package/lib/cjs/widget/Widget.js +3 -15
- package/lib/cjs/widget/Widget.js.map +1 -1
- package/lib/cjs/wizard/Wizard.js +106 -80
- package/lib/cjs/wizard/Wizard.js.map +1 -1
- package/lib/esm/_common/CodeBlockWrapper.js +10 -8
- package/lib/esm/_common/CodeBlockWrapper.js.map +1 -1
- package/lib/esm/_common/ConditionalWrap.js +1 -1
- package/lib/esm/_common/ConditionalWrap.js.map +1 -1
- package/lib/esm/_common/coditionalWrap.js +1 -1
- package/lib/esm/_common/coditionalWrap.js.map +1 -1
- package/lib/esm/_common/input/RadioAndCheckboxWrapper.js +7 -21
- package/lib/esm/_common/input/RadioAndCheckboxWrapper.js.map +1 -1
- package/lib/esm/_common/messages.js +0 -1
- package/lib/esm/_common/messages.js.map +1 -1
- package/lib/esm/{helpers → _common}/types.js +0 -1
- package/lib/esm/_common/types.js.map +1 -0
- package/lib/esm/accordion/Accordion.js +25 -25
- package/lib/esm/accordion/Accordion.js.map +1 -1
- package/lib/esm/avatar/Avatar.js +7 -17
- package/lib/esm/avatar/Avatar.js.map +1 -1
- package/lib/esm/banner/Banner.js +30 -25
- package/lib/esm/banner/Banner.js.map +1 -1
- package/lib/esm/breadcrumbs/Breadcrumbs.js +39 -92
- package/lib/esm/breadcrumbs/Breadcrumbs.js.map +1 -1
- package/lib/esm/button/Button.js +11 -27
- package/lib/esm/button/Button.js.map +1 -1
- package/lib/esm/button/IconButton.js +13 -21
- package/lib/esm/button/IconButton.js.map +1 -1
- package/lib/esm/button/IconButtonArray.js +43 -22
- package/lib/esm/button/IconButtonArray.js.map +1 -1
- package/lib/esm/callout/Callout.js +2 -14
- package/lib/esm/callout/Callout.js.map +1 -1
- package/lib/esm/charts/Axis.js +187 -0
- package/lib/esm/charts/Axis.js.map +1 -0
- package/lib/esm/charts/CartesianGrid.js +66 -0
- package/lib/esm/charts/CartesianGrid.js.map +1 -0
- package/lib/esm/charts/Chart.js +517 -0
- package/lib/esm/charts/Chart.js.map +1 -0
- package/lib/esm/charts/ChartTooltip.js +50 -0
- package/lib/esm/charts/ChartTooltip.js.map +1 -0
- package/lib/esm/charts/Charts.js +96 -0
- package/lib/esm/charts/Charts.js.map +1 -0
- package/lib/esm/charts/Dot.js +28 -0
- package/lib/esm/charts/Dot.js.map +1 -0
- package/lib/esm/charts/Legend.js +174 -0
- package/lib/esm/charts/Legend.js.map +1 -0
- package/lib/esm/charts/Line.js +75 -0
- package/lib/esm/charts/Line.js.map +1 -0
- package/lib/esm/charts/index.js +22 -0
- package/lib/esm/charts/index.js.map +1 -0
- package/lib/esm/{table/TableContext.js → charts/utils.js} +16 -11
- package/lib/esm/charts/utils.js.map +1 -0
- package/lib/esm/checkbox/Checkbox.js +2 -14
- package/lib/esm/checkbox/Checkbox.js.map +1 -1
- package/lib/esm/clipboard-copier/ClipboardButton.js +16 -20
- package/lib/esm/clipboard-copier/ClipboardButton.js.map +1 -1
- package/lib/esm/code/Code.js +150 -0
- package/lib/esm/code/Code.js.map +1 -0
- package/lib/{types/text-input-preview/index.d.ts → esm/code/index.js} +2 -1
- package/lib/esm/code/index.js.map +1 -0
- package/lib/esm/code/languages.js +46 -0
- package/lib/esm/code/languages.js.map +1 -0
- package/lib/esm/context-menu/ContextMenu.js +198 -295
- package/lib/esm/context-menu/ContextMenu.js.map +1 -1
- package/lib/esm/data-grid/Components.js +69 -43
- package/lib/esm/data-grid/Components.js.map +1 -1
- package/lib/esm/data-grid/DataGrid.js +6 -6
- package/lib/esm/data-grid/DataGrid.js.map +1 -1
- package/lib/esm/data-grid/illustrations/NoData.js +25 -0
- package/lib/esm/data-grid/illustrations/NoData.js.map +1 -0
- package/lib/esm/date-picker/DatePicker.js +33 -10
- package/lib/esm/date-picker/DatePicker.js.map +1 -1
- package/lib/esm/dialog/Dialog.js +21 -35
- package/lib/esm/dialog/Dialog.js.map +1 -1
- package/lib/esm/divider/Divider.js +2 -14
- package/lib/esm/divider/Divider.js.map +1 -1
- package/lib/esm/drawer/Drawer.js +11 -9
- package/lib/esm/drawer/Drawer.js.map +1 -1
- package/lib/esm/dropdown/Dropdown.js +18 -34
- package/lib/esm/dropdown/Dropdown.js.map +1 -1
- package/lib/esm/dropdown/Overrides.js +6 -2
- package/lib/esm/dropdown/Overrides.js.map +1 -1
- package/lib/esm/dropdown-button/DropdownButton.js +2 -21
- package/lib/esm/dropdown-button/DropdownButton.js.map +1 -1
- package/lib/esm/dropdown-button/avatar-test.stories.tsx.js +27 -0
- package/lib/esm/dropdown-button/avatar-test.stories.tsx.js.map +1 -0
- package/lib/esm/dropzone/Dropzone.js +4 -15
- package/lib/esm/dropzone/Dropzone.js.map +1 -1
- package/lib/esm/graph-label/GraphLabel.js +33 -34
- package/lib/esm/graph-label/GraphLabel.js.map +1 -1
- package/lib/esm/helpers/index.js +0 -1
- package/lib/esm/helpers/index.js.map +1 -1
- package/lib/esm/hooks/index.js +1 -1
- package/lib/esm/hooks/index.js.map +1 -1
- package/lib/esm/icons/generated/heroIcons.js +904 -584
- package/lib/esm/icons/generated/heroIcons.js.map +1 -1
- package/lib/esm/index.js +3 -5
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/inline-edit/InlineEdit.js +12 -7
- package/lib/esm/inline-edit/InlineEdit.js.map +1 -1
- package/lib/esm/label/Label.js +4 -16
- package/lib/esm/label/Label.js.map +1 -1
- package/lib/esm/layout/Box.js +6 -18
- package/lib/esm/layout/Box.js.map +1 -1
- package/lib/esm/layout/Flex.js +5 -17
- package/lib/esm/layout/Flex.js.map +1 -1
- package/lib/esm/loading-spinner/LoadingSpinner.js +2 -13
- package/lib/esm/loading-spinner/LoadingSpinner.js.map +1 -1
- package/lib/esm/modal/Modal.js +2 -2
- package/lib/esm/modal/Modal.js.map +1 -1
- package/lib/esm/popover/Popover.js +64 -204
- package/lib/esm/popover/Popover.js.map +1 -1
- package/lib/esm/popover/use-popover.js +83 -0
- package/lib/esm/popover/use-popover.js.map +1 -0
- package/lib/esm/progress-bar/ProgressBar.js +2 -14
- package/lib/esm/progress-bar/ProgressBar.js.map +1 -1
- package/lib/esm/radio/Radio.js +2 -1
- package/lib/esm/radio/Radio.js.map +1 -1
- package/lib/esm/segmented-control/SegmentedControl.js +7 -20
- package/lib/esm/segmented-control/SegmentedControl.js.map +1 -1
- package/lib/esm/side-navigation/SideNavigation.js +52 -59
- package/lib/esm/side-navigation/SideNavigation.js.map +1 -1
- package/lib/esm/slider/Slider.js +5 -6
- package/lib/esm/slider/Slider.js.map +1 -1
- package/lib/esm/status-indicator/StatusIndicator.js.map +1 -1
- package/lib/esm/switch/Switch.js +13 -1
- package/lib/esm/switch/Switch.js.map +1 -1
- package/lib/esm/tabs/Tabs.js +12 -28
- package/lib/esm/tabs/Tabs.js.map +1 -1
- package/lib/esm/tag/Tag.js +5 -18
- package/lib/esm/tag/Tag.js.map +1 -1
- package/lib/esm/text-input/TextInput.js +14 -24
- package/lib/esm/text-input/TextInput.js.map +1 -1
- package/lib/esm/text-link/TextLink.js +4 -17
- package/lib/esm/text-link/TextLink.js.map +1 -1
- package/lib/esm/textarea/Textarea.js +6 -20
- package/lib/esm/textarea/Textarea.js.map +1 -1
- package/lib/esm/toast/Toast.js +2 -3
- package/lib/esm/toast/Toast.js.map +1 -1
- package/lib/esm/tooltip/Tooltip.js +119 -0
- package/lib/esm/tooltip/Tooltip.js.map +1 -0
- package/lib/esm/{tip → tooltip}/index.js +0 -1
- package/lib/esm/tooltip/index.js.map +1 -0
- package/lib/esm/tooltip/use-tooltip.js +73 -0
- package/lib/esm/tooltip/use-tooltip.js.map +1 -0
- package/lib/esm/tree-view/TreeView.js +4 -16
- package/lib/esm/tree-view/TreeView.js.map +1 -1
- package/lib/esm/tree-view/TreeViewTextItem.js +11 -7
- package/lib/esm/tree-view/TreeViewTextItem.js.map +1 -1
- package/lib/esm/typography/Typography.js +5 -5
- package/lib/esm/typography/Typography.js.map +1 -1
- package/lib/esm/widget/Widget.js +3 -15
- package/lib/esm/widget/Widget.js.map +1 -1
- package/lib/esm/wizard/Wizard.js +83 -76
- package/lib/esm/wizard/Wizard.js.map +1 -1
- package/lib/types/_common/CodeBlockWrapper.d.ts +10 -6
- package/lib/types/_common/ConditionalWrap.d.ts +2 -2
- package/lib/types/_common/coditionalWrap.d.ts +2 -2
- package/lib/types/_common/input/RadioAndCheckboxWrapper.d.ts +15 -4
- package/lib/types/_common/input/types.d.ts +7 -9
- package/lib/types/_common/messages.d.ts +0 -1
- package/lib/types/_common/types.d.ts +40 -0
- package/lib/types/accordion/Accordion.d.ts +15 -9
- package/lib/types/avatar/Avatar.d.ts +14 -7
- package/lib/types/banner/Banner.d.ts +39 -19
- package/lib/types/breadcrumbs/Breadcrumbs.d.ts +18 -21
- package/lib/types/button/Button.d.ts +35 -13
- package/lib/types/button/IconButton.d.ts +31 -12
- package/lib/types/button/IconButtonArray.d.ts +20 -15
- package/lib/types/callout/Callout.d.ts +6 -3
- package/lib/types/charts/Axis.d.ts +37 -0
- package/lib/types/{tip/Tooltip.d.ts → charts/CartesianGrid.d.ts} +7 -6
- package/lib/types/charts/Chart.d.ts +105 -0
- package/lib/types/charts/ChartTooltip.d.ts +59 -0
- package/lib/types/charts/Charts.d.ts +94 -0
- package/lib/types/charts/Dot.d.ts +27 -0
- package/lib/types/charts/Legend.d.ts +25 -0
- package/lib/types/charts/Line.d.ts +43 -0
- package/lib/types/{code-block → charts}/index.d.ts +1 -1
- package/lib/{esm/cypher-code-block/index.js → types/charts/utils.d.ts} +3 -2
- package/lib/types/clipboard-copier/ClipboardButton.d.ts +6 -4
- package/lib/types/{code-block/CodeBlock.d.ts → code/Code.d.ts} +29 -7
- package/lib/types/{cypher-code-block → code}/index.d.ts +1 -1
- package/lib/types/code/languages.d.ts +22 -0
- package/lib/types/context-menu/ContextMenu.d.ts +43 -66
- package/lib/types/data-grid/Components.d.ts +12 -5
- package/lib/types/data-grid/DataGrid.d.ts +8 -5
- package/lib/types/data-grid/DataGridContext.d.ts +3 -3
- package/lib/types/data-grid/datagrid-types.d.ts +3 -3
- package/lib/types/data-grid/illustrations/NoData.d.ts +23 -0
- package/lib/types/date-picker/DatePicker.d.ts +6 -6
- package/lib/types/dialog/Dialog.d.ts +14 -10
- package/lib/types/divider/Divider.d.ts +6 -3
- package/lib/types/drawer/Drawer.d.ts +11 -8
- package/lib/types/dropdown/Dropdown.d.ts +4 -1
- package/lib/types/dropdown/Overrides.d.ts +1 -1
- package/lib/types/dropdown/types.d.ts +5 -6
- package/lib/types/dropdown-button/DropdownButton.d.ts +7 -2
- package/lib/{esm/code-block/index.js → types/dropdown-button/avatar-test.stories.tsx.d.ts} +3 -2
- package/lib/types/dropzone/Dropzone.d.ts +8 -2
- package/lib/types/graph-label/GraphLabel.d.ts +18 -7
- package/lib/types/helpers/index.d.ts +0 -1
- package/lib/types/hooks/index.d.ts +1 -1
- package/lib/types/icons/generated/heroIcons.d.ts +256 -0
- package/lib/types/index.d.ts +3 -5
- package/lib/types/inline-edit/InlineEdit.d.ts +5 -2
- package/lib/types/label/Label.d.ts +4 -3
- package/lib/types/layout/Box.d.ts +6 -10
- package/lib/types/layout/Flex.d.ts +6 -11
- package/lib/types/loading-spinner/LoadingSpinner.d.ts +2 -0
- package/lib/types/modal/Modal.d.ts +6 -4
- package/lib/types/popover/Popover.d.ts +37 -66
- package/lib/types/popover/index.d.ts +4 -0
- package/lib/types/popover/use-popover.d.ts +44 -0
- package/lib/types/portal/Portal.d.ts +1 -1
- package/lib/types/progress-bar/ProgressBar.d.ts +5 -2
- package/lib/types/segmented-control/SegmentedControl.d.ts +11 -5
- package/lib/types/side-navigation/SideNavigation.d.ts +35 -19
- package/lib/types/slider/Slider.d.ts +7 -4
- package/lib/types/status-indicator/StatusIndicator.d.ts +4 -2
- package/lib/types/tabs/Tabs.d.ts +10 -19
- package/lib/types/tag/Tag.d.ts +9 -7
- package/lib/types/text-input/TextInput.d.ts +18 -10
- package/lib/types/text-link/TextLink.d.ts +8 -6
- package/lib/types/textarea/Textarea.d.ts +11 -4
- package/lib/types/toast/Toast.d.ts +3 -0
- package/lib/types/tooltip/Tooltip.d.ts +80 -0
- package/lib/types/{tip → tooltip}/index.d.ts +0 -1
- package/lib/types/tooltip/use-tooltip.d.ts +38 -0
- package/lib/types/tree-view/TreeView.d.ts +7 -3
- package/lib/types/tree-view/tree-view-types.d.ts +2 -2
- package/lib/types/typography/Typography.d.ts +16 -5
- package/lib/types/widget/Widget.d.ts +3 -0
- package/lib/types/wizard/Wizard.d.ts +18 -10
- package/package.json +38 -36
- package/lib/cjs/code-block/CodeBlock.js +0 -105
- package/lib/cjs/code-block/CodeBlock.js.map +0 -1
- package/lib/cjs/code-block/index.js.map +0 -1
- package/lib/cjs/code-block/languages.js +0 -303
- package/lib/cjs/code-block/languages.js.map +0 -1
- package/lib/cjs/context-menu/SafeArea.js +0 -84
- package/lib/cjs/context-menu/SafeArea.js.map +0 -1
- package/lib/cjs/cypher-code-block/CypherCodeBlock.js +0 -74
- package/lib/cjs/cypher-code-block/CypherCodeBlock.js.map +0 -1
- package/lib/cjs/cypher-code-block/index.js.map +0 -1
- package/lib/cjs/helpers/types.js.map +0 -1
- package/lib/cjs/table/Components.js +0 -264
- package/lib/cjs/table/Components.js.map +0 -1
- package/lib/cjs/table/Table.js +0 -100
- package/lib/cjs/table/Table.js.map +0 -1
- package/lib/cjs/table/TableContext.js.map +0 -1
- package/lib/cjs/table/helpers.js +0 -86
- package/lib/cjs/table/helpers.js.map +0 -1
- package/lib/cjs/table/index.js +0 -55
- package/lib/cjs/table/index.js.map +0 -1
- package/lib/cjs/text-input-preview/TextInputPreview.js +0 -75
- package/lib/cjs/text-input-preview/TextInputPreview.js.map +0 -1
- package/lib/cjs/text-input-preview/index.js +0 -38
- package/lib/cjs/text-input-preview/index.js.map +0 -1
- package/lib/cjs/tip/Tip.js +0 -196
- package/lib/cjs/tip/Tip.js.map +0 -1
- package/lib/cjs/tip/Tooltip.js +0 -56
- package/lib/cjs/tip/Tooltip.js.map +0 -1
- package/lib/cjs/tip/index.js.map +0 -1
- package/lib/esm/code-block/CodeBlock.js +0 -79
- package/lib/esm/code-block/CodeBlock.js.map +0 -1
- package/lib/esm/code-block/index.js.map +0 -1
- package/lib/esm/code-block/languages.js +0 -302
- package/lib/esm/code-block/languages.js.map +0 -1
- package/lib/esm/context-menu/SafeArea.js +0 -81
- package/lib/esm/context-menu/SafeArea.js.map +0 -1
- package/lib/esm/cypher-code-block/CypherCodeBlock.js +0 -48
- package/lib/esm/cypher-code-block/CypherCodeBlock.js.map +0 -1
- package/lib/esm/cypher-code-block/index.js.map +0 -1
- package/lib/esm/helpers/types.js.map +0 -1
- package/lib/esm/table/Components.js +0 -244
- package/lib/esm/table/Components.js.map +0 -1
- package/lib/esm/table/Table.js +0 -97
- package/lib/esm/table/Table.js.map +0 -1
- package/lib/esm/table/TableContext.js.map +0 -1
- package/lib/esm/table/helpers.js +0 -81
- package/lib/esm/table/helpers.js.map +0 -1
- package/lib/esm/table/index.js +0 -25
- package/lib/esm/table/index.js.map +0 -1
- package/lib/esm/text-input-preview/TextInputPreview.js +0 -72
- package/lib/esm/text-input-preview/TextInputPreview.js.map +0 -1
- package/lib/esm/text-input-preview/index.js +0 -22
- package/lib/esm/text-input-preview/index.js.map +0 -1
- package/lib/esm/tip/Tip.js +0 -186
- package/lib/esm/tip/Tip.js.map +0 -1
- package/lib/esm/tip/Tooltip.js +0 -50
- package/lib/esm/tip/Tooltip.js.map +0 -1
- package/lib/esm/tip/index.js.map +0 -1
- package/lib/types/code-block/languages.d.ts +0 -23
- package/lib/types/cypher-code-block/CypherCodeBlock.d.ts +0 -33
- package/lib/types/helpers/types.d.ts +0 -42
- package/lib/types/table/Components.d.ts +0 -81
- package/lib/types/table/Table.d.ts +0 -62
- package/lib/types/table/TableContext.d.ts +0 -61
- package/lib/types/table/helpers.d.ts +0 -39
- package/lib/types/table/index.d.ts +0 -24
- package/lib/types/text-input-preview/TextInputPreview.d.ts +0 -59
- package/lib/types/tip/Tip.d.ts +0 -168
package/lib/esm/widget/Widget.js
CHANGED
|
@@ -1,14 +1,3 @@
|
|
|
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
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
2
|
/**
|
|
14
3
|
*
|
|
@@ -40,13 +29,12 @@ import { default as ResizeCornerIcon } from '../icons/generated/custom/ResizeCor
|
|
|
40
29
|
*
|
|
41
30
|
*
|
|
42
31
|
*/
|
|
43
|
-
export const Widget = forwardRef(function Widget(
|
|
44
|
-
var
|
|
45
|
-
var { header, subheader, leftMenu, rightMenu, isElevated = false, isResizeable = false, resizeableProps, children, className } = _a, restProps = __rest(_a, ["header", "subheader", "leftMenu", "rightMenu", "isElevated", "isResizeable", "resizeableProps", "children", "className"]);
|
|
32
|
+
export const Widget = forwardRef(function Widget({ header, subheader, leftMenu, rightMenu, isElevated = false, isResizeable = false, resizeableProps, children, className, htmlAttributes, }, ref) {
|
|
33
|
+
var _a;
|
|
46
34
|
const classes = classNames('ndl-widget', className, {
|
|
47
35
|
'ndl-leftmenu': leftMenu,
|
|
48
36
|
'ndl-elevated': isElevated,
|
|
49
37
|
});
|
|
50
|
-
return (_jsxs("div", Object.assign({ className: classes, ref: ref },
|
|
38
|
+
return (_jsxs("div", Object.assign({ className: classes, ref: ref }, htmlAttributes, { children: [_jsxs("header", { className: "ndl-header-wrapper", children: [_jsxs("div", { className: "ndl-header-left", children: [leftMenu, _jsxs("div", { className: "ndl-headers n-flex n-flex-col", children: [_jsx("div", { className: "ndl-header", children: header }), _jsx("div", { className: "ndl-subheader", children: subheader })] })] }), rightMenu] }), _jsx("div", { className: "ndl-widget-content n-flex-grow", children: children }), isResizeable && (_jsx("button", Object.assign({ "aria-label": "Resizing handle" }, resizeableProps, { className: `ndl-resize-handle ${(_a = resizeableProps === null || resizeableProps === void 0 ? void 0 : resizeableProps.className) !== null && _a !== void 0 ? _a : ''}`, children: _jsx(ResizeCornerIcon, {}) })))] })));
|
|
51
39
|
});
|
|
52
40
|
//# sourceMappingURL=Widget.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Widget.js","sourceRoot":"","sources":["../../../src/widget/Widget.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Widget.js","sourceRoot":"","sources":["../../../src/widget/Widget.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAc,EAAqB,UAAU,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAmCrF;;;;;;GAMG;AAEH,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAAC,SAAS,MAAM,CAC9C,EACE,MAAM,EACN,SAAS,EACT,QAAQ,EACR,SAAS,EACT,UAAU,GAAG,KAAK,EAClB,YAAY,GAAG,KAAK,EACpB,eAAe,EACf,QAAQ,EACR,SAAS,EACT,cAAc,GACF,EACd,GAAiC;;IAEjC,MAAM,OAAO,GAAG,UAAU,CAAC,YAAY,EAAE,SAAS,EAAE;QAClD,cAAc,EAAE,QAAQ;QACxB,cAAc,EAAE,UAAU;KAC3B,CAAC,CAAC;IAEH,OAAO,CACL,6BAAK,SAAS,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,IAAM,cAAc,eACnD,kBAAQ,SAAS,EAAC,oBAAoB,aACpC,eAAK,SAAS,EAAC,iBAAiB,aAC7B,QAAQ,EACT,eAAK,SAAS,EAAC,+BAA+B,aAC5C,cAAK,SAAS,EAAC,YAAY,YAAE,MAAM,GAAO,EAC1C,cAAK,SAAS,EAAC,eAAe,YAAE,SAAS,GAAO,IAC5C,IACF,EACL,SAAS,IACH,EACT,cAAK,SAAS,EAAC,gCAAgC,YAAE,QAAQ,GAAO,EAC/D,YAAY,IAAI,CACf,6CACa,iBAAiB,IACxB,eAAe,IACnB,SAAS,EAAE,qBAAqB,MAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,SAAS,mCAAI,EAAE,EAAE,YAElE,KAAC,gBAAgB,KAAG,IACb,CACV,KACG,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
package/lib/esm/wizard/Wizard.js
CHANGED
|
@@ -1,14 +1,3 @@
|
|
|
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
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
2
|
/**
|
|
14
3
|
*
|
|
@@ -30,77 +19,95 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
30
19
|
* You should have received a copy of the GNU General Public License
|
|
31
20
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
32
21
|
*/
|
|
22
|
+
import React, { useEffect } from 'react';
|
|
33
23
|
import { classNames } from '../_common/defaultImports';
|
|
34
|
-
import {
|
|
35
|
-
const
|
|
24
|
+
import { Typography } from '../typography';
|
|
25
|
+
export const Wizard = React.forwardRef(function Wizard({ as, className, style, size = 'large', steps, activeStepIndex, orientation, htmlAttributes, }, ref) {
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
if (activeStepIndex > steps.length - 1 || activeStepIndex < 0) {
|
|
28
|
+
console.warn(`[🪡 Needle]: The activeStepIndex in Wizard is out of bounds. The activeStepIndex is ${activeStepIndex} and the number of steps is ${steps.length}.`);
|
|
29
|
+
}
|
|
30
|
+
}, [activeStepIndex, steps.length]);
|
|
31
|
+
switch (size) {
|
|
32
|
+
case 'small':
|
|
33
|
+
return (_jsx(WizardSmall, { as: as, orientation: orientation, style: style, className: className, steps: steps, activeStepIndex: activeStepIndex, ref: ref, htmlAttributes: htmlAttributes }));
|
|
34
|
+
case 'large':
|
|
35
|
+
return (_jsx(WizardLarge, { as: as, orientation: orientation, style: style, className: className, steps: steps, activeStepIndex: activeStepIndex, ref: ref, htmlAttributes: htmlAttributes }));
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
const getStatus = (activeStepIndex, stepIndex) => stepIndex === activeStepIndex
|
|
36
39
|
? 'active'
|
|
37
|
-
:
|
|
40
|
+
: activeStepIndex < stepIndex
|
|
38
41
|
? 'incomplete'
|
|
39
42
|
: 'complete';
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
'ndl-
|
|
44
|
-
'ndl-
|
|
43
|
+
const WizardLarge = React.forwardRef(function WizardLarge({ orientation = 'horizontal', activeStepIndex, steps, as, style, className, htmlAttributes, }, ref) {
|
|
44
|
+
const Component = as || 'div';
|
|
45
|
+
const wizardClasses = classNames('ndl-wizard', 'ndl-wizard-large', {
|
|
46
|
+
'ndl-horizontal': orientation === 'horizontal',
|
|
47
|
+
'ndl-vertical': orientation === 'vertical',
|
|
48
|
+
className,
|
|
45
49
|
});
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
50
|
+
const componentStyle = {
|
|
51
|
+
gridTemplateColumns: orientation === 'horizontal'
|
|
52
|
+
? `repeat(${steps.length}, 1fr)`
|
|
53
|
+
: `32px 1fr`,
|
|
54
|
+
gridTemplateRows: orientation === 'vertical' && `repeat(${steps.length}, 1fr)`,
|
|
55
|
+
};
|
|
56
|
+
const stepClasses = (index, step) => {
|
|
57
|
+
const status = getStatus(activeStepIndex, index);
|
|
58
|
+
return classNames('ndl-wizard-step', {
|
|
59
|
+
'ndl-horizontal': orientation === 'horizontal',
|
|
60
|
+
'ndl-vertical': orientation === 'vertical',
|
|
61
|
+
'ndl-wizard-step-line-right': index < steps.length - 1,
|
|
62
|
+
'ndl-wizard-step-line-left': index > 0,
|
|
63
|
+
'ndl-wizard-step-complete': status === 'complete',
|
|
64
|
+
'ndl-wizard-step-active': status === 'active',
|
|
65
|
+
'ndl-wizard-step-error': step.status === 'error',
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
return (_jsxs(Component, Object.assign({ className: wizardClasses, style: Object.assign(Object.assign({}, style), componentStyle), ref: ref }, htmlAttributes, { children: [steps.map((step, index) => {
|
|
69
|
+
if (typeof step.content === 'string') {
|
|
70
|
+
const wizardStepClasses = classNames('ndl-wizard-step-text', {
|
|
71
|
+
'ndl-vertical': orientation === 'vertical',
|
|
72
|
+
'ndl-horizontal': orientation === 'horizontal',
|
|
73
|
+
'ndl-wizard-step-incomplete': getStatus(activeStepIndex, index) === 'incomplete',
|
|
74
|
+
});
|
|
75
|
+
return (_jsx("div", { className: wizardStepClasses, children: _jsx(Typography, { variant: "body-large", children: step.content }) }, index));
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
return _jsx(React.Fragment, { children: step.content }, index);
|
|
79
|
+
}
|
|
80
|
+
}), steps.map((step, index) => {
|
|
81
|
+
return (_jsx("div", { className: stepClasses(index, step), style: {
|
|
82
|
+
gridRow: orientation === 'vertical' ? index + 1 : '',
|
|
83
|
+
}, children: _jsx(Circle, { status: step.status === 'error'
|
|
84
|
+
? 'error'
|
|
85
|
+
: getStatus(activeStepIndex, index), number: index + 1, text: step.content }) }, index));
|
|
86
|
+
})] })));
|
|
87
|
+
});
|
|
88
|
+
export const WizardSmall = React.forwardRef(function WizardSmall({ orientation = 'horizontal', activeStepIndex, steps, as, className, htmlAttributes, }, ref) {
|
|
89
|
+
const Component = as || 'div';
|
|
90
|
+
const wizardClasses = classNames('ndl-wizard', 'ndl-wizard-small', {
|
|
91
|
+
'ndl-horizontal': orientation === 'horizontal',
|
|
92
|
+
'ndl-vertical': orientation === 'vertical',
|
|
93
|
+
className,
|
|
49
94
|
});
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
const classes = classNames('ndl-wizard-line', {
|
|
56
|
-
'ndl-active': status === 'active',
|
|
57
|
-
'ndl-complete': status === 'complete',
|
|
58
|
-
'ndl-incomplete': status === 'incomplete',
|
|
59
|
-
'ndl-horizontal': type === 'horizontal',
|
|
60
|
-
'ndl-vertical': type === 'vertical',
|
|
95
|
+
const stepClasses = (index) => classNames('ndl-wizard-step', {
|
|
96
|
+
'ndl-horizontal': orientation === 'horizontal',
|
|
97
|
+
'ndl-vertical': orientation === 'vertical',
|
|
98
|
+
'ndl-wizard-step-active': getStatus(activeStepIndex, index) === 'active',
|
|
99
|
+
'ndl-wizard-step-complete': getStatus(activeStepIndex, index) === 'complete',
|
|
61
100
|
});
|
|
62
|
-
return _jsx("div", { "
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
return (_jsx("div", Object.assign({}, restProps, { className: classNames('ndl-horizontal-wizard', className), role: "navigation", children: components })));
|
|
75
|
-
};
|
|
76
|
-
export const Vertical = (_a) => {
|
|
77
|
-
var { activeStep, steps, className } = _a, restProps = __rest(_a, ["activeStep", "steps", "className"]);
|
|
78
|
-
const components = [];
|
|
79
|
-
for (let i = 0; i < steps.length; i++) {
|
|
80
|
-
const text = steps[i];
|
|
81
|
-
components.push(_jsx(Circle, { type: "vertical", number: i + 1, text: text, status: getStatus(activeStep, i) }, `circle-${i}-step-${randomId(4)}`));
|
|
82
|
-
if (i < steps.length - 1) {
|
|
83
|
-
components.push(_jsx(Line, { type: "vertical", status: getStatus(activeStep, i) }, `line-${i}-step-${randomId(4)}`));
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
return (_jsx("div", Object.assign({}, restProps, { className: classNames('ndl-vertical-wizard ', className), role: "navigation", children: components })));
|
|
87
|
-
};
|
|
88
|
-
export const Footer = (_a) => {
|
|
89
|
-
var { activeStep, steps, className } = _a, restProps = __rest(_a, ["activeStep", "steps", "className"]);
|
|
90
|
-
return (_jsx("div", Object.assign({}, restProps, { className: classNames('ndl-footer-wizard', className), role: "navigation", children: _jsxs("div", { className: "n-flex n-items-center", children: [_jsx("div", { className: "n-w-token-12 n-mr-token-7 n-h-token-1 n-bg-palette-neutral-border-strong" }), steps.map((v, i) => (_jsx("div", { className: "n-items-center n-justify-center n-flex n-px-token-2", children: _jsxs("svg", { className: `n-size-token-4 footer-circle ${getStatus(activeStep, i)}`, children: [getStatus(activeStep, i) === 'active' && (_jsx("g", { children: _jsx("circle", { className: "n-fill-palette-primary-text", cx: "4", cy: "4", r: "4" }) })), _jsx("circle", { className: `${getStatus(activeStep, i) === 'active'
|
|
91
|
-
? 'n-fill-palette-primary-text'
|
|
92
|
-
: 'n-fill-palette-neutral-border-strong'}`, cx: "4", cy: "4", r: "3" })] }) }, i))), _jsx("div", { className: "n-w-token-12 n-ml-token-7 n-h-token-1 n-bg-palette-neutral-border-strong" })] }) })));
|
|
93
|
-
};
|
|
94
|
-
export const Wizard = (_a) => {
|
|
95
|
-
var { type = 'horizontal', activeStep = 0, steps = [] } = _a, restProps = __rest(_a, ["type", "activeStep", "steps"]);
|
|
96
|
-
const allProps = Object.assign({ activeStep: activeStep, steps: steps }, restProps);
|
|
97
|
-
switch (type) {
|
|
98
|
-
case 'vertical':
|
|
99
|
-
return _jsx(Vertical, Object.assign({}, allProps));
|
|
100
|
-
case 'footer':
|
|
101
|
-
return _jsx(Footer, Object.assign({}, allProps));
|
|
102
|
-
default:
|
|
103
|
-
return _jsx(Horizontal, Object.assign({}, allProps));
|
|
104
|
-
}
|
|
101
|
+
return (_jsxs(Component, Object.assign({ className: wizardClasses, ref: ref }, htmlAttributes, { children: [_jsx("div", { className: "ndl-wizard-steps-line" }), steps.map((step, index) => {
|
|
102
|
+
return (_jsx("div", { className: stepClasses(index), children: _jsx("div", { className: "ndl-wizard-circle" }) }, index));
|
|
103
|
+
}), _jsx("div", { className: "ndl-wizard-steps-line" })] })));
|
|
104
|
+
});
|
|
105
|
+
const Circle = ({ status, number, }) => {
|
|
106
|
+
const innerCircleClasses = classNames({
|
|
107
|
+
'n-fill-palette-primary-bg-strong': status === 'complete' || status === 'active',
|
|
108
|
+
'n-fill-palette-neutral-bg-stronger': status === 'incomplete',
|
|
109
|
+
'n-fill-palette-danger-bg-strong': status === 'error',
|
|
110
|
+
});
|
|
111
|
+
return (_jsx("div", { className: "ndl-wizard-circle", children: _jsxs("svg", { children: [status === 'active' && (_jsx("g", { children: _jsx("circle", { className: "n-stroke-palette-primary-bg-strong", style: { fill: 'transparent', strokeWidth: 2 }, cx: "16", cy: "16", r: "14" }) })), _jsx("circle", { className: innerCircleClasses, cx: "16", cy: "16", r: "12" }), _jsx("text", { x: "50%", y: "50%", fontSize: 14, className: "n-fill-palette-neutral-bg-weak", textAnchor: "middle", dy: "0.3em", children: status === 'error' ? '!' : number })] }) }));
|
|
105
112
|
};
|
|
106
113
|
//# sourceMappingURL=Wizard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Wizard.js","sourceRoot":"","sources":["../../../src/wizard/Wizard.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Wizard.js","sourceRoot":"","sources":["../../../src/wizard/Wizard.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAyB3C,MAAM,CAAC,MAAM,MAAM,GAAoB,KAAK,CAAC,UAAU,CAAC,SAAS,MAAM,CAGrE,EACE,EAAE,EACF,SAAS,EACT,KAAK,EACL,IAAI,GAAG,OAAO,EACd,KAAK,EACL,eAAe,EACf,WAAW,EACX,cAAc,GAC4B,EAC5C,GAAsB;IAEtB,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,eAAe,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,eAAe,GAAG,CAAC,EAAE,CAAC;YAC9D,OAAO,CAAC,IAAI,CACV,uFAAuF,eAAe,+BAA+B,KAAK,CAAC,MAAM,GAAG,CACrJ,CAAC;QACJ,CAAC;IACH,CAAC,EAAE,CAAC,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAEpC,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,OAAO;YACV,OAAO,CACL,KAAC,WAAW,IACV,EAAE,EAAE,EAAE,EACN,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,EACZ,eAAe,EAAE,eAAe,EAChC,GAAG,EAAE,GAAG,EACR,cAAc,EAAE,cAAc,GAC9B,CACH,CAAC;QACJ,KAAK,OAAO;YACV,OAAO,CACL,KAAC,WAAW,IACV,EAAE,EAAE,EAAE,EACN,WAAW,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CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -19,16 +19,20 @@
|
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
import React from 'react';
|
|
22
|
-
import {
|
|
23
|
-
|
|
24
|
-
export interface CodeBlockWrapperProps extends ElementBase<HTMLElement> {
|
|
22
|
+
import { IconButton } from '../button';
|
|
23
|
+
export interface CodeBlockWrapperProps {
|
|
25
24
|
maxHeight?: number;
|
|
26
25
|
code: string;
|
|
27
26
|
headerTitle?: string | JSX.Element;
|
|
28
27
|
children: JSX.Element;
|
|
29
|
-
|
|
30
|
-
actions?:
|
|
28
|
+
isDisabled?: boolean;
|
|
29
|
+
actions?: React.ComponentPropsWithoutRef<typeof IconButton<'button'>>[];
|
|
31
30
|
shouldShowExpandButton: boolean;
|
|
32
31
|
setShouldShowExpandButton: React.Dispatch<React.SetStateAction<boolean>>;
|
|
32
|
+
className?: string;
|
|
33
|
+
style?: React.CSSProperties;
|
|
33
34
|
}
|
|
34
|
-
export declare const CodeBlockWrapper: React.ForwardRefExoticComponent<
|
|
35
|
+
export declare const CodeBlockWrapper: React.ForwardRefExoticComponent<{
|
|
36
|
+
htmlAttributes?: import("./types").HtmlAttributes<React.ElementType<any>> | undefined;
|
|
37
|
+
as?: React.ElementType<any> | undefined;
|
|
38
|
+
} & CodeBlockWrapperProps & React.RefAttributes<unknown>>;
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
* Component to enable conditional
|
|
23
23
|
* wrapping of components
|
|
24
24
|
*/
|
|
25
|
-
export declare const ConditionalWrap: ({
|
|
26
|
-
|
|
25
|
+
export declare const ConditionalWrap: ({ shouldWrap, wrap, children, }: {
|
|
26
|
+
shouldWrap: boolean;
|
|
27
27
|
wrap: (childre: JSX.Element) => JSX.Element;
|
|
28
28
|
children: JSX.Element;
|
|
29
29
|
}) => JSX.Element;
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
type ConditionalWrapProps = {
|
|
22
|
-
|
|
22
|
+
shouldWrap: boolean;
|
|
23
23
|
wrapper: (children: React.ReactNode) => React.ReactNode;
|
|
24
24
|
children: React.ReactNode;
|
|
25
25
|
};
|
|
26
|
-
export declare const ConditionalWrap: ({ condition, wrapper, children, }: ConditionalWrapProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare const ConditionalWrap: ({ shouldWrap: condition, wrapper, children, }: ConditionalWrapProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
27
|
export {};
|
|
@@ -18,8 +18,9 @@
|
|
|
18
18
|
* You should have received a copy of the GNU General Public License
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
|
-
|
|
21
|
+
import React, { type ComponentPropsWithoutRef } from 'react';
|
|
22
22
|
import { type CommonInputProps } from './types';
|
|
23
|
+
import { type HtmlAttributes } from '../types';
|
|
23
24
|
/**
|
|
24
25
|
*
|
|
25
26
|
*
|
|
@@ -29,10 +30,20 @@ import { type CommonInputProps } from './types';
|
|
|
29
30
|
*/
|
|
30
31
|
export interface RadioAndCheckboxProps extends Omit<CommonInputProps, 'label'> {
|
|
31
32
|
/** Sets checked state */
|
|
32
|
-
|
|
33
|
+
isChecked?: boolean;
|
|
33
34
|
/** Displays label before */
|
|
34
|
-
|
|
35
|
+
hasLabelBefore?: boolean;
|
|
35
36
|
label?: string | React.ReactNode;
|
|
37
|
+
isDisabled?: boolean;
|
|
38
|
+
isReadOnly?: boolean;
|
|
39
|
+
isFluid?: boolean;
|
|
40
|
+
onClick?: (event: React.MouseEvent<HTMLInputElement>) => void;
|
|
41
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
42
|
+
type?: ComponentPropsWithoutRef<'input'>['type'];
|
|
43
|
+
ariaLabel?: string;
|
|
44
|
+
isDefaultChecked?: boolean;
|
|
45
|
+
/** HTML attributes */
|
|
46
|
+
htmlAttributes?: HtmlAttributes<'input'>;
|
|
36
47
|
}
|
|
37
48
|
/** Add any helper functions here. */
|
|
38
49
|
/**
|
|
@@ -43,5 +54,5 @@ export interface RadioAndCheckboxProps extends Omit<CommonInputProps, 'label'> {
|
|
|
43
54
|
*
|
|
44
55
|
*/
|
|
45
56
|
export declare const customLabelAndNoAriaLabelWarningMessage = "aria label not detected when using a custom label, be sure to include an aria label for screen readers link: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI";
|
|
46
|
-
declare const _default:
|
|
57
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<RadioAndCheckboxProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
47
58
|
export default _default;
|
|
@@ -18,21 +18,19 @@
|
|
|
18
18
|
* You should have received a copy of the GNU General Public License
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
|
-
import { type
|
|
22
|
-
|
|
23
|
-
import { type Tip } from '../../tip';
|
|
24
|
-
export interface CommonInputProps extends Omit<ComponentPropsWithoutRef<'input'>, 'size'> {
|
|
21
|
+
import { type Tooltip } from '../../tooltip';
|
|
22
|
+
export interface CommonInputProps {
|
|
25
23
|
/** Sets disabled state */
|
|
26
|
-
|
|
24
|
+
isDisabled?: boolean;
|
|
27
25
|
/** Sets the label */
|
|
28
26
|
label?: string | React.ReactNode;
|
|
29
27
|
/** Displays with fluid width */
|
|
30
|
-
|
|
28
|
+
isFluid?: boolean;
|
|
31
29
|
/** Ref to the `input` element */
|
|
32
30
|
ref?: React.RefObject<HTMLInputElement>;
|
|
33
31
|
}
|
|
34
32
|
export type TooltipObjectProps = {
|
|
35
|
-
tooltipRoot?: Partial<
|
|
36
|
-
tooltipTrigger?: Partial<
|
|
37
|
-
tooltipContent?: Partial<
|
|
33
|
+
tooltipRoot?: Partial<React.ComponentPropsWithoutRef<typeof Tooltip>>;
|
|
34
|
+
tooltipTrigger?: Partial<React.ComponentPropsWithoutRef<typeof Tooltip.Trigger>>;
|
|
35
|
+
tooltipContent?: Partial<React.ComponentPropsWithoutRef<typeof Tooltip.Content>>;
|
|
38
36
|
};
|
|
@@ -19,4 +19,3 @@
|
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
export declare const customLabelAndNoAriaLabelWarningMessage = "aria label not detected when using a custom label, be sure to include an aria label for screen readers link: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI";
|
|
22
|
-
export declare const anchorElNotSetWarningMessage = "anchorEl property reference is null. This component might not work as expected.";
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
22
|
+
export type PolymorphicComponentProps<T extends React.ElementType, Props = Record<string, never>> = {
|
|
23
|
+
/**
|
|
24
|
+
* Html attributes to apply to the root element. This will override any default html attributes, use with caution.
|
|
25
|
+
*/
|
|
26
|
+
htmlAttributes?: HtmlAttributes<T>;
|
|
27
|
+
/**
|
|
28
|
+
* An override of the default HTML tag of the root of the component.
|
|
29
|
+
* Can also be another React component.
|
|
30
|
+
*/
|
|
31
|
+
as?: T;
|
|
32
|
+
} & Props;
|
|
33
|
+
export type PolymorphicRef<T extends React.ElementType> = React.ComponentPropsWithRef<T>['ref'];
|
|
34
|
+
export type PolymorphicComponentPropsWithRef<T extends React.ElementType, Props = Record<string, never>> = PolymorphicComponentProps<T, Props> & {
|
|
35
|
+
ref?: PolymorphicRef<T>;
|
|
36
|
+
};
|
|
37
|
+
export type HtmlAttributes<T extends React.ElementType> = ComponentPropsWithoutRef<T> & {
|
|
38
|
+
[key: `data-${string}`]: string | undefined;
|
|
39
|
+
};
|
|
40
|
+
export type PolymorphicComponent<U extends Record<string, unknown>, D extends React.ElementType> = <T extends React.ElementType = D>(props: PolymorphicComponentPropsWithRef<T, U>) => React.ReactNode | null;
|
|
@@ -19,20 +19,23 @@
|
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
import React from 'react';
|
|
22
|
-
import { type
|
|
22
|
+
import { type HtmlAttributes } from '../_common/types';
|
|
23
23
|
export type AccordionItemId = string | number | undefined;
|
|
24
|
-
export interface AccordionBase
|
|
25
|
-
children
|
|
24
|
+
export interface AccordionBase {
|
|
25
|
+
/** The component children. */
|
|
26
|
+
children: React.ReactNode;
|
|
27
|
+
/** Additional className */
|
|
26
28
|
className?: string;
|
|
27
|
-
|
|
29
|
+
/** HtmlAttributes */
|
|
30
|
+
htmlAttributes?: HtmlAttributes<'div'>;
|
|
28
31
|
}
|
|
29
32
|
interface IsNotMultiple<T extends AccordionItemId> {
|
|
30
|
-
|
|
33
|
+
isMultiple: false | undefined;
|
|
31
34
|
expandedItemId: T | null;
|
|
32
35
|
onChange: (expandedItemId: T | null) => void;
|
|
33
36
|
}
|
|
34
37
|
interface IsMultiple<T extends AccordionItemId> {
|
|
35
|
-
|
|
38
|
+
isMultiple: true;
|
|
36
39
|
expandedItemIds: T[];
|
|
37
40
|
onChange: (expandedItemIds: T[]) => void;
|
|
38
41
|
}
|
|
@@ -40,7 +43,7 @@ type AccordionIsMultiple<T extends AccordionItemId> = AccordionBase & IsMultiple
|
|
|
40
43
|
type AccordionIsNotMultiple<T extends AccordionItemId> = AccordionBase & IsNotMultiple<T>;
|
|
41
44
|
export type AccordionProps<T extends AccordionItemId> = AccordionIsMultiple<T> | AccordionIsNotMultiple<T>;
|
|
42
45
|
export type AccordionArrowPosition = 'left' | 'right';
|
|
43
|
-
export interface AccordionItemProps<T extends AccordionItemId>
|
|
46
|
+
export interface AccordionItemProps<T extends AccordionItemId> {
|
|
44
47
|
/** The component item id. */
|
|
45
48
|
itemId: T;
|
|
46
49
|
/** The title. */
|
|
@@ -50,11 +53,14 @@ export interface AccordionItemProps<T extends AccordionItemId> extends ElementBa
|
|
|
50
53
|
/** Which side the accordion arrow will appear. */
|
|
51
54
|
arrowPosition?: AccordionArrowPosition;
|
|
52
55
|
/** If the component item is disabled. */
|
|
53
|
-
|
|
56
|
+
isDisabled?: boolean;
|
|
57
|
+
htmlAttributes?: HtmlAttributes<'div'>;
|
|
58
|
+
children?: React.ReactNode;
|
|
59
|
+
className?: string;
|
|
54
60
|
}
|
|
55
61
|
declare const Accordion: (<T extends AccordionItemId>(props: AccordionProps<T> & React.RefAttributes<unknown>) => React.ReactElement | null) & {
|
|
56
62
|
Item: {
|
|
57
|
-
<T extends AccordionItemId>({ itemId, children, title, className, arrowPosition,
|
|
63
|
+
<T extends AccordionItemId>({ itemId, children, title, className, arrowPosition, isDisabled, onExpandedChange, htmlAttributes, ...restProps }: AccordionItemProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
58
64
|
displayName: string;
|
|
59
65
|
};
|
|
60
66
|
};
|
|
@@ -19,21 +19,27 @@
|
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
import React from 'react';
|
|
22
|
-
import { type
|
|
23
|
-
export
|
|
24
|
-
as?: string | React.ComponentType<any>;
|
|
25
|
-
className?: string;
|
|
22
|
+
import { type PolymorphicComponentPropsWithRef } from '../_common/types';
|
|
23
|
+
export type AvatarProps = {
|
|
26
24
|
hasStatus?: boolean;
|
|
27
25
|
isDisabled?: boolean;
|
|
28
26
|
name?: string;
|
|
29
27
|
shape?: 'circle' | 'square' | undefined;
|
|
30
28
|
size?: 'small' | 'medium' | 'large' | 'x-large';
|
|
29
|
+
/** Source URI for the image. */
|
|
31
30
|
source?: string;
|
|
32
31
|
status?: 'offline' | 'online' | 'unknown' | undefined;
|
|
33
32
|
type?: 'icon' | 'image' | 'letters';
|
|
34
|
-
|
|
33
|
+
className?: string;
|
|
34
|
+
} & ({
|
|
35
|
+
as: 'button';
|
|
36
|
+
onClick: () => void;
|
|
37
|
+
} | {
|
|
38
|
+
as?: React.ElementType;
|
|
39
|
+
});
|
|
40
|
+
type AvatarComponent = <T extends React.ElementType = 'div'>(props: PolymorphicComponentPropsWithRef<T, AvatarProps>) => React.ReactNode | null;
|
|
35
41
|
export declare const defaultProps: {
|
|
36
|
-
as:
|
|
42
|
+
as: "div";
|
|
37
43
|
className: undefined;
|
|
38
44
|
hasStatus: false;
|
|
39
45
|
isDisabled: false;
|
|
@@ -44,4 +50,5 @@ export declare const defaultProps: {
|
|
|
44
50
|
status: undefined;
|
|
45
51
|
type: "image";
|
|
46
52
|
};
|
|
47
|
-
export declare const Avatar:
|
|
53
|
+
export declare const Avatar: AvatarComponent;
|
|
54
|
+
export {};
|