@neo4j-ndl/react 4.4.0 → 4.4.1
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/types.js.map +1 -1
- package/lib/cjs/_common/utils.js +4 -4
- package/lib/cjs/_common/utils.js.map +1 -1
- package/lib/cjs/accordion/Accordion.js +5 -5
- package/lib/cjs/accordion/Accordion.js.map +1 -1
- package/lib/cjs/accordion/accordion-context.js +1 -1
- package/lib/cjs/accordion/accordion-context.js.map +1 -1
- package/lib/cjs/accordion/stories/accordion.stories.js +20 -20
- package/lib/cjs/accordion/stories/accordion.stories.js.map +1 -1
- package/lib/cjs/avatar/stories/avatar.stories.js +18 -18
- package/lib/cjs/avatar/stories/avatar.stories.js.map +1 -1
- package/lib/cjs/breadcrumbs/stories/breadcrumbs.stories.js +1 -1
- package/lib/cjs/breadcrumbs/stories/breadcrumbs.stories.js.map +1 -1
- package/lib/cjs/checkbox/stories/checkbox-full.story.js +2 -2
- package/lib/cjs/checkbox/stories/checkbox-full.story.js.map +1 -1
- package/lib/cjs/checkbox/stories/checkbox.stories.js +19 -19
- package/lib/cjs/checkbox/stories/checkbox.stories.js.map +1 -1
- package/lib/cjs/clean-icon-button/stories/clean-icon-button.stories.js +11 -11
- package/lib/cjs/clean-icon-button/stories/clean-icon-button.stories.js.map +1 -1
- package/lib/cjs/code-block/stories/code-disabled.story.js +2 -2
- package/lib/cjs/code-block/stories/code-disabled.story.js.map +1 -1
- package/lib/cjs/code-block/stories/code-full.story.js +2 -2
- package/lib/cjs/code-block/stories/code-full.story.js.map +1 -1
- package/lib/cjs/code-block/stories/code-with-actions.story.js +2 -2
- package/lib/cjs/code-block/stories/code-with-actions.story.js.map +1 -1
- package/lib/cjs/code-block/themes/ndl-code-dark.js +64 -64
- package/lib/cjs/code-block/themes/ndl-code-dark.js.map +1 -1
- package/lib/cjs/code-block/themes/ndl-code-light.js +64 -64
- package/lib/cjs/code-block/themes/ndl-code-light.js.map +1 -1
- package/lib/cjs/color-picker/ColorPicker.js +1 -1
- package/lib/cjs/color-picker/ColorPicker.js.map +1 -1
- package/lib/cjs/color-picker/stories/color-picker.stories.js +4 -4
- package/lib/cjs/color-picker/stories/color-picker.stories.js.map +1 -1
- package/lib/cjs/data-grid/Components.js +13 -11
- package/lib/cjs/data-grid/Components.js.map +1 -1
- package/lib/cjs/data-grid/DataGrid.js.map +1 -1
- package/lib/cjs/data-grid/data-grid-context.js +1 -1
- package/lib/cjs/data-grid/data-grid-context.js.map +1 -1
- package/lib/cjs/data-grid/data-grid-nav/index.js +1 -1
- package/lib/cjs/data-grid/data-grid-nav/index.js.map +1 -1
- package/lib/cjs/data-grid/stories/datagrid-kitchen-sink.story.js +1 -1
- package/lib/cjs/data-grid/stories/datagrid-kitchen-sink.story.js.map +1 -1
- package/lib/cjs/date-picker/stories/date-picker-full.story.js +9 -9
- package/lib/cjs/date-picker/stories/date-picker-full.story.js.map +1 -1
- package/lib/cjs/divider/stories/divider-horizontal.story.js +1 -1
- package/lib/cjs/divider/stories/divider-horizontal.story.js.map +1 -1
- package/lib/cjs/divider/stories/divider-vertical.story.js +1 -1
- package/lib/cjs/divider/stories/divider-vertical.story.js.map +1 -1
- package/lib/cjs/drawer/stories/drawer.stories.js +19 -19
- package/lib/cjs/drawer/stories/drawer.stories.js.map +1 -1
- package/lib/cjs/dropdown-button/stories/dropdown-button.stories.js +18 -18
- package/lib/cjs/dropdown-button/stories/dropdown-button.stories.js.map +1 -1
- package/lib/cjs/dropzone/stories/dropzone-disabled.story.js +1 -1
- package/lib/cjs/dropzone/stories/dropzone-disabled.story.js.map +1 -1
- package/lib/cjs/dropzone/stories/dropzone-full.story.js +11 -11
- package/lib/cjs/dropzone/stories/dropzone-full.story.js.map +1 -1
- package/lib/cjs/dropzone/stories/dropzone.stories.js +10 -10
- package/lib/cjs/dropzone/stories/dropzone.stories.js.map +1 -1
- package/lib/cjs/flex/Flex.js +4 -4
- package/lib/cjs/flex/Flex.js.map +1 -1
- package/lib/cjs/graph-label/stories/graph-label.stories.js +20 -20
- package/lib/cjs/graph-label/stories/graph-label.stories.js.map +1 -1
- package/lib/cjs/hooks/index.js +3 -3
- package/lib/cjs/hooks/index.js.map +1 -1
- package/lib/cjs/icon-button/stories/icon-button.stories.js +12 -12
- package/lib/cjs/icon-button/stories/icon-button.stories.js.map +1 -1
- package/lib/cjs/icon-button-array/stories/icon-button-array.stories.js +16 -16
- package/lib/cjs/icon-button-array/stories/icon-button-array.stories.js.map +1 -1
- package/lib/cjs/icons/wrapIcon.js +1 -1
- package/lib/cjs/icons/wrapIcon.js.map +1 -1
- package/lib/cjs/kbd/stories/kbd.stories.js +7 -7
- package/lib/cjs/kbd/stories/kbd.stories.js.map +1 -1
- package/lib/cjs/loading-spinner/LoadingSpinner.js +2 -2
- package/lib/cjs/loading-spinner/LoadingSpinner.js.map +1 -1
- package/lib/cjs/loading-spinner/stories/loading-spinner.stories.js +10 -10
- package/lib/cjs/loading-spinner/stories/loading-spinner.stories.js.map +1 -1
- package/lib/cjs/logo/Logo.js +6 -6
- package/lib/cjs/logo/Logo.js.map +1 -1
- package/lib/cjs/logo/stories/logo.stories.js +9 -9
- package/lib/cjs/logo/stories/logo.stories.js.map +1 -1
- package/lib/cjs/menu/Menu.js +3 -3
- package/lib/cjs/menu/Menu.js.map +1 -1
- package/lib/cjs/popover/Popover.js +15 -15
- package/lib/cjs/popover/Popover.js.map +1 -1
- package/lib/cjs/popover/use-popover.js +9 -9
- package/lib/cjs/popover/use-popover.js.map +1 -1
- package/lib/cjs/progress-bar/stories/progress-bar.stories.js +3 -3
- package/lib/cjs/progress-bar/stories/progress-bar.stories.js.map +1 -1
- package/lib/cjs/segmented-control/SegmentedControl.js +1 -1
- package/lib/cjs/segmented-control/SegmentedControl.js.map +1 -1
- package/lib/cjs/select/Overrides.js +41 -41
- package/lib/cjs/select/Overrides.js.map +1 -1
- package/lib/cjs/select/stories/select-async.story.js +4 -4
- package/lib/cjs/select/stories/select-async.story.js.map +1 -1
- package/lib/cjs/select/stories/select-controlled.story.js +4 -4
- package/lib/cjs/select/stories/select-controlled.story.js.map +1 -1
- package/lib/cjs/select/stories/select-creatable.story.js +1 -1
- package/lib/cjs/select/stories/select-creatable.story.js.map +1 -1
- package/lib/cjs/select/stories/select-custom-label.story.js +1 -1
- package/lib/cjs/select/stories/select-custom-label.story.js.map +1 -1
- package/lib/cjs/select/stories/select-disabled.story.js +1 -1
- package/lib/cjs/select/stories/select-disabled.story.js.map +1 -1
- package/lib/cjs/select/stories/select-inside-dialog.story.js +1 -1
- package/lib/cjs/select/stories/select-inside-dialog.story.js.map +1 -1
- package/lib/cjs/side-navigation/stories/side-nav.stories.js +1 -1
- package/lib/cjs/side-navigation/stories/side-nav.stories.js.map +1 -1
- package/lib/cjs/skeleton/stories/skeleton.stories.js +28 -28
- package/lib/cjs/skeleton/stories/skeleton.stories.js.map +1 -1
- package/lib/cjs/slider/Slider.js +2 -1
- package/lib/cjs/slider/Slider.js.map +1 -1
- package/lib/cjs/status-indicator/stories/status-indicator.stories.js +2 -2
- package/lib/cjs/status-indicator/stories/status-indicator.stories.js.map +1 -1
- package/lib/cjs/switch/stories/switch.stories.js +7 -7
- package/lib/cjs/switch/stories/switch.stories.js.map +1 -1
- package/lib/cjs/tabs/Tabs.js +1 -1
- package/lib/cjs/tabs/Tabs.js.map +1 -1
- package/lib/cjs/tag/Tag.js +2 -2
- package/lib/cjs/tag/Tag.js.map +1 -1
- package/lib/cjs/tag/stories/tag.stories.js +10 -10
- package/lib/cjs/tag/stories/tag.stories.js.map +1 -1
- package/lib/cjs/text-area/TextArea.js +5 -5
- package/lib/cjs/text-area/TextArea.js.map +1 -1
- package/lib/cjs/text-area/stories/text-area.stories.js +25 -25
- package/lib/cjs/text-area/stories/text-area.stories.js.map +1 -1
- package/lib/cjs/text-input/stories/text-input-number.story.js +2 -2
- package/lib/cjs/text-input/stories/text-input-number.story.js.map +1 -1
- package/lib/cjs/text-link/stories/text-link.stories.js +11 -11
- package/lib/cjs/text-link/stories/text-link.stories.js.map +1 -1
- package/lib/cjs/text-overflow/stories/text-overflow.stories.js +1 -1
- package/lib/cjs/text-overflow/stories/text-overflow.stories.js.map +1 -1
- package/lib/cjs/theme/ThemeProvider.js.map +1 -1
- package/lib/cjs/theme/agnostic.js +1 -1
- package/lib/cjs/theme/agnostic.js.map +1 -1
- package/lib/cjs/time-picker/TimePicker.js +4 -4
- package/lib/cjs/time-picker/TimePicker.js.map +1 -1
- package/lib/cjs/time-picker/time-picker-hooks.js +1 -1
- package/lib/cjs/time-picker/time-picker-hooks.js.map +1 -1
- package/lib/cjs/timezone-picker/TimeZonePicker.js +5 -5
- package/lib/cjs/timezone-picker/TimeZonePicker.js.map +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-dst-aware.story.js +7 -7
- package/lib/cjs/timezone-picker/stories/timezone-picker-dst-aware.story.js.map +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-fluid.story.js +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-fluid.story.js.map +1 -1
- package/lib/cjs/toast/Toast.js +12 -12
- package/lib/cjs/toast/Toast.js.map +1 -1
- package/lib/cjs/toast/stories/toast-action-story.js +1 -1
- package/lib/cjs/toast/stories/toast-action-story.js.map +1 -1
- package/lib/cjs/toast/stories/toast-controlled-story.js +2 -2
- package/lib/cjs/toast/stories/toast-controlled-story.js.map +1 -1
- package/lib/cjs/toast/stories/toast-progress-bar.js +1 -1
- package/lib/cjs/toast/stories/toast-progress-bar.js.map +1 -1
- package/lib/cjs/toast/stories/toast.stories.js +18 -18
- package/lib/cjs/toast/stories/toast.stories.js.map +1 -1
- package/lib/cjs/tooltip/Tooltip.js +1 -1
- package/lib/cjs/tooltip/Tooltip.js.map +1 -1
- package/lib/cjs/tooltip/stories/tooltip-hover-delay.story.js +1 -1
- package/lib/cjs/tooltip/stories/tooltip-hover-delay.story.js.map +1 -1
- package/lib/cjs/tooltip/stories/tooltip-placements.story.js +8 -8
- package/lib/cjs/tooltip/stories/tooltip-placements.story.js.map +1 -1
- package/lib/cjs/tooltip/stories/tooltip.stories.js +29 -29
- package/lib/cjs/tooltip/stories/tooltip.stories.js.map +1 -1
- package/lib/cjs/tooltip/use-tooltip.js +10 -10
- package/lib/cjs/tooltip/use-tooltip.js.map +1 -1
- package/lib/cjs/tree-view/TreeItemWrapper.js +2 -2
- package/lib/cjs/tree-view/TreeItemWrapper.js.map +1 -1
- package/lib/cjs/tree-view/TreeView.js +12 -12
- package/lib/cjs/tree-view/TreeView.js.map +1 -1
- package/lib/cjs/tree-view/TreeViewItem.js +1 -1
- package/lib/cjs/tree-view/TreeViewItem.js.map +1 -1
- package/lib/cjs/tree-view/TreeViewTextItem.js +1 -1
- package/lib/cjs/tree-view/TreeViewTextItem.js.map +1 -1
- package/lib/cjs/tree-view/tree-view-keyboard-coordinates.js +2 -2
- package/lib/cjs/tree-view/tree-view-keyboard-coordinates.js.map +1 -1
- package/lib/cjs/wizard/Wizard.js +2 -2
- package/lib/cjs/wizard/Wizard.js.map +1 -1
- package/lib/cjs/wizard/stories/wizard.stories.js +14 -14
- package/lib/cjs/wizard/stories/wizard.stories.js.map +1 -1
- package/lib/esm/_common/types.js.map +1 -1
- package/lib/esm/_common/utils.js +4 -4
- package/lib/esm/_common/utils.js.map +1 -1
- package/lib/esm/accordion/Accordion.js +5 -5
- package/lib/esm/accordion/Accordion.js.map +1 -1
- package/lib/esm/accordion/accordion-context.js +1 -1
- package/lib/esm/accordion/accordion-context.js.map +1 -1
- package/lib/esm/accordion/stories/accordion.stories.js +20 -20
- package/lib/esm/accordion/stories/accordion.stories.js.map +1 -1
- package/lib/esm/avatar/stories/avatar.stories.js +18 -18
- package/lib/esm/avatar/stories/avatar.stories.js.map +1 -1
- package/lib/esm/breadcrumbs/stories/breadcrumbs.stories.js +1 -1
- package/lib/esm/breadcrumbs/stories/breadcrumbs.stories.js.map +1 -1
- package/lib/esm/checkbox/stories/checkbox-full.story.js +2 -2
- package/lib/esm/checkbox/stories/checkbox-full.story.js.map +1 -1
- package/lib/esm/checkbox/stories/checkbox.stories.js +19 -19
- package/lib/esm/checkbox/stories/checkbox.stories.js.map +1 -1
- package/lib/esm/clean-icon-button/stories/clean-icon-button.stories.js +11 -11
- package/lib/esm/clean-icon-button/stories/clean-icon-button.stories.js.map +1 -1
- package/lib/esm/code-block/stories/code-disabled.story.js +2 -2
- package/lib/esm/code-block/stories/code-disabled.story.js.map +1 -1
- package/lib/esm/code-block/stories/code-full.story.js +2 -2
- package/lib/esm/code-block/stories/code-full.story.js.map +1 -1
- package/lib/esm/code-block/stories/code-with-actions.story.js +2 -2
- package/lib/esm/code-block/stories/code-with-actions.story.js.map +1 -1
- package/lib/esm/code-block/themes/ndl-code-dark.js +64 -64
- package/lib/esm/code-block/themes/ndl-code-dark.js.map +1 -1
- package/lib/esm/code-block/themes/ndl-code-light.js +64 -64
- package/lib/esm/code-block/themes/ndl-code-light.js.map +1 -1
- package/lib/esm/color-picker/ColorPicker.js +1 -1
- package/lib/esm/color-picker/ColorPicker.js.map +1 -1
- package/lib/esm/color-picker/stories/color-picker.stories.js +4 -4
- package/lib/esm/color-picker/stories/color-picker.stories.js.map +1 -1
- package/lib/esm/data-grid/Components.js +13 -11
- package/lib/esm/data-grid/Components.js.map +1 -1
- package/lib/esm/data-grid/DataGrid.js.map +1 -1
- package/lib/esm/data-grid/data-grid-context.js +1 -1
- package/lib/esm/data-grid/data-grid-context.js.map +1 -1
- package/lib/esm/data-grid/data-grid-nav/index.js +1 -1
- package/lib/esm/data-grid/data-grid-nav/index.js.map +1 -1
- package/lib/esm/data-grid/stories/datagrid-kitchen-sink.story.js +1 -1
- package/lib/esm/data-grid/stories/datagrid-kitchen-sink.story.js.map +1 -1
- package/lib/esm/date-picker/stories/date-picker-full.story.js +9 -9
- package/lib/esm/date-picker/stories/date-picker-full.story.js.map +1 -1
- package/lib/esm/divider/stories/divider-horizontal.story.js +1 -1
- package/lib/esm/divider/stories/divider-horizontal.story.js.map +1 -1
- package/lib/esm/divider/stories/divider-vertical.story.js +1 -1
- package/lib/esm/divider/stories/divider-vertical.story.js.map +1 -1
- package/lib/esm/drawer/stories/drawer.stories.js +19 -19
- package/lib/esm/drawer/stories/drawer.stories.js.map +1 -1
- package/lib/esm/dropdown-button/stories/dropdown-button.stories.js +18 -18
- package/lib/esm/dropdown-button/stories/dropdown-button.stories.js.map +1 -1
- package/lib/esm/dropzone/stories/dropzone-disabled.story.js +1 -1
- package/lib/esm/dropzone/stories/dropzone-disabled.story.js.map +1 -1
- package/lib/esm/dropzone/stories/dropzone-full.story.js +11 -11
- package/lib/esm/dropzone/stories/dropzone-full.story.js.map +1 -1
- package/lib/esm/dropzone/stories/dropzone.stories.js +10 -10
- package/lib/esm/dropzone/stories/dropzone.stories.js.map +1 -1
- package/lib/esm/flex/Flex.js +4 -4
- package/lib/esm/flex/Flex.js.map +1 -1
- package/lib/esm/graph-label/stories/graph-label.stories.js +20 -20
- package/lib/esm/graph-label/stories/graph-label.stories.js.map +1 -1
- package/lib/esm/hooks/index.js +3 -3
- package/lib/esm/hooks/index.js.map +1 -1
- package/lib/esm/icon-button/stories/icon-button.stories.js +12 -12
- package/lib/esm/icon-button/stories/icon-button.stories.js.map +1 -1
- package/lib/esm/icon-button-array/stories/icon-button-array.stories.js +16 -16
- package/lib/esm/icon-button-array/stories/icon-button-array.stories.js.map +1 -1
- package/lib/esm/icons/wrapIcon.js +1 -1
- package/lib/esm/icons/wrapIcon.js.map +1 -1
- package/lib/esm/kbd/stories/kbd.stories.js +7 -7
- package/lib/esm/kbd/stories/kbd.stories.js.map +1 -1
- package/lib/esm/loading-spinner/LoadingSpinner.js +2 -2
- package/lib/esm/loading-spinner/LoadingSpinner.js.map +1 -1
- package/lib/esm/loading-spinner/stories/loading-spinner.stories.js +10 -10
- package/lib/esm/loading-spinner/stories/loading-spinner.stories.js.map +1 -1
- package/lib/esm/logo/Logo.js +6 -6
- package/lib/esm/logo/Logo.js.map +1 -1
- package/lib/esm/logo/stories/logo.stories.js +9 -9
- package/lib/esm/logo/stories/logo.stories.js.map +1 -1
- package/lib/esm/menu/Menu.js +3 -3
- package/lib/esm/menu/Menu.js.map +1 -1
- package/lib/esm/popover/Popover.js +15 -15
- package/lib/esm/popover/Popover.js.map +1 -1
- package/lib/esm/popover/use-popover.js +9 -9
- package/lib/esm/popover/use-popover.js.map +1 -1
- package/lib/esm/progress-bar/stories/progress-bar.stories.js +3 -3
- package/lib/esm/progress-bar/stories/progress-bar.stories.js.map +1 -1
- package/lib/esm/segmented-control/SegmentedControl.js +1 -1
- package/lib/esm/segmented-control/SegmentedControl.js.map +1 -1
- package/lib/esm/select/Overrides.js +41 -41
- package/lib/esm/select/Overrides.js.map +1 -1
- package/lib/esm/select/stories/select-async.story.js +4 -4
- package/lib/esm/select/stories/select-async.story.js.map +1 -1
- package/lib/esm/select/stories/select-controlled.story.js +4 -4
- package/lib/esm/select/stories/select-controlled.story.js.map +1 -1
- package/lib/esm/select/stories/select-creatable.story.js +1 -1
- package/lib/esm/select/stories/select-creatable.story.js.map +1 -1
- package/lib/esm/select/stories/select-custom-label.story.js +1 -1
- package/lib/esm/select/stories/select-custom-label.story.js.map +1 -1
- package/lib/esm/select/stories/select-disabled.story.js +1 -1
- package/lib/esm/select/stories/select-disabled.story.js.map +1 -1
- package/lib/esm/select/stories/select-inside-dialog.story.js +1 -1
- package/lib/esm/select/stories/select-inside-dialog.story.js.map +1 -1
- package/lib/esm/side-navigation/stories/side-nav.stories.js +1 -1
- package/lib/esm/side-navigation/stories/side-nav.stories.js.map +1 -1
- package/lib/esm/skeleton/stories/skeleton.stories.js +28 -28
- package/lib/esm/skeleton/stories/skeleton.stories.js.map +1 -1
- package/lib/esm/slider/Slider.js +2 -1
- package/lib/esm/slider/Slider.js.map +1 -1
- package/lib/esm/status-indicator/stories/status-indicator.stories.js +2 -2
- package/lib/esm/status-indicator/stories/status-indicator.stories.js.map +1 -1
- package/lib/esm/switch/stories/switch.stories.js +7 -7
- package/lib/esm/switch/stories/switch.stories.js.map +1 -1
- package/lib/esm/tabs/Tabs.js +1 -1
- package/lib/esm/tabs/Tabs.js.map +1 -1
- package/lib/esm/tag/Tag.js +2 -2
- package/lib/esm/tag/Tag.js.map +1 -1
- package/lib/esm/tag/stories/tag.stories.js +10 -10
- package/lib/esm/tag/stories/tag.stories.js.map +1 -1
- package/lib/esm/text-area/TextArea.js +5 -5
- package/lib/esm/text-area/TextArea.js.map +1 -1
- package/lib/esm/text-area/stories/text-area.stories.js +25 -25
- package/lib/esm/text-area/stories/text-area.stories.js.map +1 -1
- package/lib/esm/text-input/stories/text-input-number.story.js +2 -2
- package/lib/esm/text-input/stories/text-input-number.story.js.map +1 -1
- package/lib/esm/text-link/stories/text-link.stories.js +11 -11
- package/lib/esm/text-link/stories/text-link.stories.js.map +1 -1
- package/lib/esm/text-overflow/stories/text-overflow.stories.js +1 -1
- package/lib/esm/text-overflow/stories/text-overflow.stories.js.map +1 -1
- package/lib/esm/theme/ThemeProvider.js.map +1 -1
- package/lib/esm/theme/agnostic.js +1 -1
- package/lib/esm/theme/agnostic.js.map +1 -1
- package/lib/esm/time-picker/TimePicker.js +4 -4
- package/lib/esm/time-picker/TimePicker.js.map +1 -1
- package/lib/esm/time-picker/time-picker-hooks.js +1 -1
- package/lib/esm/time-picker/time-picker-hooks.js.map +1 -1
- package/lib/esm/timezone-picker/TimeZonePicker.js +5 -5
- package/lib/esm/timezone-picker/TimeZonePicker.js.map +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-dst-aware.story.js +7 -7
- package/lib/esm/timezone-picker/stories/timezone-picker-dst-aware.story.js.map +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-fluid.story.js +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-fluid.story.js.map +1 -1
- package/lib/esm/toast/Toast.js +12 -12
- package/lib/esm/toast/Toast.js.map +1 -1
- package/lib/esm/toast/stories/toast-action-story.js +1 -1
- package/lib/esm/toast/stories/toast-action-story.js.map +1 -1
- package/lib/esm/toast/stories/toast-controlled-story.js +2 -2
- package/lib/esm/toast/stories/toast-controlled-story.js.map +1 -1
- package/lib/esm/toast/stories/toast-progress-bar.js +1 -1
- package/lib/esm/toast/stories/toast-progress-bar.js.map +1 -1
- package/lib/esm/toast/stories/toast.stories.js +18 -18
- package/lib/esm/toast/stories/toast.stories.js.map +1 -1
- package/lib/esm/tooltip/Tooltip.js +1 -1
- package/lib/esm/tooltip/Tooltip.js.map +1 -1
- package/lib/esm/tooltip/stories/tooltip-hover-delay.story.js +1 -1
- package/lib/esm/tooltip/stories/tooltip-hover-delay.story.js.map +1 -1
- package/lib/esm/tooltip/stories/tooltip-placements.story.js +8 -8
- package/lib/esm/tooltip/stories/tooltip-placements.story.js.map +1 -1
- package/lib/esm/tooltip/stories/tooltip.stories.js +29 -29
- package/lib/esm/tooltip/stories/tooltip.stories.js.map +1 -1
- package/lib/esm/tooltip/use-tooltip.js +10 -10
- package/lib/esm/tooltip/use-tooltip.js.map +1 -1
- package/lib/esm/tree-view/TreeItemWrapper.js +2 -2
- package/lib/esm/tree-view/TreeItemWrapper.js.map +1 -1
- package/lib/esm/tree-view/TreeView.js +12 -12
- package/lib/esm/tree-view/TreeView.js.map +1 -1
- package/lib/esm/tree-view/TreeViewItem.js +1 -1
- package/lib/esm/tree-view/TreeViewItem.js.map +1 -1
- package/lib/esm/tree-view/TreeViewTextItem.js +1 -1
- package/lib/esm/tree-view/TreeViewTextItem.js.map +1 -1
- package/lib/esm/tree-view/tree-view-keyboard-coordinates.js +2 -2
- package/lib/esm/tree-view/tree-view-keyboard-coordinates.js.map +1 -1
- package/lib/esm/wizard/Wizard.js +2 -2
- package/lib/esm/wizard/Wizard.js.map +1 -1
- package/lib/esm/wizard/stories/wizard.stories.js +14 -14
- package/lib/esm/wizard/stories/wizard.stories.js.map +1 -1
- package/lib/types/accordion/stories/accordion.stories.d.ts +3 -3
- package/lib/types/breadcrumbs/stories/breadcrumbs.stories.d.ts +1 -1
- package/lib/types/data-grid/Components.d.ts.map +1 -1
- package/lib/types/logo/stories/logo.stories.d.ts +3 -3
- package/lib/types/side-navigation/stories/side-nav.stories.d.ts +1 -1
- package/lib/types/skeleton/stories/skeleton.stories.d.ts +3 -3
- package/lib/types/slider/Slider.d.ts.map +1 -1
- package/lib/types/time-picker/time-picker-hooks.d.ts +1 -1
- package/lib/types/time-picker/time-picker-hooks.d.ts.map +1 -1
- package/lib/types/toast/stories/toast.stories.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataGrid.js","sourceRoot":"","sources":["../../../src/data-grid/DataGrid.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAwBA,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,OAAO,EACP,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EACL,YAAY,EACZ,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,cAAc,EACd,YAAY,EACZ,MAAM,EACN,UAAU,EACV,WAAW,EACX,cAAc,EACd,kBAAkB,EAClB,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,+BAA+B,EAC/B,UAAU,EACV,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,EACxB,WAAW,EACX,WAAW,EACX,UAAU,EACV,YAAY,GACb,MAAM,cAAc,CAAC;AACtB,OAAO,EAEL,eAAe,GAEhB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C,IAAK,eAKJ;AALD,WAAK,eAAe;IAClB,yCAAsB,CAAA;IACtB,4CAAyB,CAAA;IACzB,wCAAqB,CAAA;IACrB,gCAAa,CAAA;AACf,CAAC,EALI,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KAAC,UAAU,CAAC,IAAI,KAAG,IACpC,GACc,EAErB,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,UAAU,KAAI,KAAC,UAAU,CAAC,UAAU,KAAG,KAChD,GACmB,CAC5B,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG;IACzB,YAAY;IACZ,UAAU;IACV,IAAI;IACJ,QAAQ;IACR,OAAO;IACP,cAAc;IACd,YAAY;IACZ,MAAM;IACN,UAAU;IACV,WAAW;IACX,cAAc;IACd,kBAAkB;IAClB,UAAU;IACV,UAAU;IACV,iBAAiB;IACjB,+BAA+B;IAC/B,UAAU;IACV,qBAAqB;IACrB,uBAAuB;IACvB,wBAAwB;IACxB,WAAW;IACX,WAAW;IACX,UAAU;IACV,YAAY;CACb,CAAC;AAEF,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,iBAAiB,EAAE,kBAAkB,CAAC,CAAC;AAEtE,OAAO,EAAE,QAAQ,EAAE,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport {\n type RowData,\n type Table as DataGridType,\n} from '@tanstack/react-table';\nimport classNames from 'classnames';\nimport {\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport { type CommonProps, type HtmlAttributes } from '../_common/types';\nimport { useResizeObserver } from '../hooks';\nimport { type Skeleton } from '../skeleton';\nimport {\n ActionButton,\n ActionCell,\n Body,\n BodyCell,\n BodyRow,\n ColumnControls,\n DropDownCell,\n Header,\n HeaderCell,\n HeaderTitle,\n InlineEditCell,\n LoadingPlaceholder,\n Navigation,\n NoDataIcon,\n NoDataPlaceholder,\n NoDataPlaceholderContentWrapper,\n Pagination,\n PaginationArrowButton,\n PaginationNumericButton,\n PaginationNumericButtons,\n ResizingBar,\n RowsPerPage,\n Scrollable,\n TableResults,\n} from './Components';\nimport {\n type DataGridComponentsInterface,\n DataGridContext,\n type DataGridContextType,\n} from './data-grid-context';\nimport { useTableNav } from './data-grid-nav';\nimport { updateColumnWidths } from './helpers';\n\nenum BorderStyleEnum {\n AllSides = 'all-sides',\n Horizontal = 'horizontal',\n Vertical = 'vertical',\n None = 'none',\n}\n\nexport type BorderStyle = `${BorderStyleEnum}`;\n\nenum HeaderStyleEnum {\n Filled = 'filled',\n Clean = 'clean',\n}\n\nexport type HeaderStyle = `${HeaderStyleEnum}`;\n\nexport type DataGridProps<T extends RowData> = {\n styling?: Partial<{\n /** Alternate the background color of rows */\n hasZebraStriping: boolean;\n /** Type of border that will be used */\n borderStyle: BorderStyle;\n /** If header should have styles or not (Aura example) */\n headerStyle: HeaderStyle;\n /** If background hover effects should be enabled on rows and header cells */\n hasHoverEffects: boolean;\n }>;\n /** Resizing the width of columns */\n isResizable?: boolean;\n /** Enables table's loading state */\n isLoading?: boolean;\n /**\n * Enables keyboard navigation.\n * To control keyboard navigation programmatically\n * for edge cases, pass a `ref` to `tableNavRef`\n */\n isKeyboardNavigable?: boolean;\n /**\n * Enables automatic resizing of columns.\n * If `isResizable` is `true`, the columns will only be automatically resized on initial render of the table.\n * If `isResizable` is `false`, the columns will be resized automatically to always fit the table width (assuming that column maxWidths allow for it).\n * Note: Action columns are a fixed size of 40px, and Pinned columns are not resized automatically.\n * @defaultValue true\n */\n isAutoResizingColumns?: boolean;\n /**\n * Reference to the tableNav instance\n * for programmatic control\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n tableNavRef?: React.RefObject<any>;\n /** Table instance created from `useTable`*/\n tableInstance: DataGridType<T>;\n /** Table sub-component overrides */\n components?: DataGridComponentsInterface<T>;\n /** @deprecated Use htmlAttributes, className and style on the root element instead */\n rootProps?: HtmlAttributes<'div'>;\n isSkeletonLoading?: boolean;\n skeletonProps?: React.ComponentProps<typeof Skeleton>;\n /** The target element for portaled elements to be rendered in, e.g. the modal root if the data grid is inside a modal.\n * This is used in for example the DropdownCell, RowsPerPage, and ColumnControls.\n */\n portalTarget?: HTMLElement | null;\n ref?: React.Ref<HTMLDivElement>;\n};\n\nconst DEFAULT_STYLING: Required<DataGridProps<unknown>['styling']> = {\n borderStyle: BorderStyleEnum.Horizontal,\n hasHoverEffects: true,\n hasZebraStriping: false,\n headerStyle: HeaderStyleEnum.Filled,\n};\n\nconst DataGridComponent = function DataGrid<T extends RowData = unknown>({\n isResizable = true,\n isLoading = false,\n isKeyboardNavigable = true,\n isAutoResizingColumns = true,\n tableInstance,\n components,\n rootProps,\n styling = {},\n tableNavRef,\n isSkeletonLoading = false,\n skeletonProps,\n ref,\n portalTarget = document.body,\n htmlAttributes,\n className,\n style,\n ...restProps\n}: CommonProps<'div', DataGridProps<T>>) {\n const { className: rootClassName = '', style: rootStyle = {} } =\n rootProps || {};\n\n const [isScrollable, setIsScrollable] = useState(false);\n const [isMediumNavigation, setIsMediumNavigation] = useState(false);\n const [isSmallNavigation, setIsSmallNavigation] = useState(false);\n const tableRef = useRef<HTMLDivElement>(null);\n const scrollableContainerRef = useRef<HTMLDivElement>(null);\n\n tableInstance.setOptions((prevOptions) => {\n return {\n ...prevOptions,\n enableSorting: isSkeletonLoading ? false : prevOptions.enableSorting,\n };\n });\n\n // Triggers when the whole container is resized\n useResizeObserver({\n onResize: (entry) => {\n if (entry.width === undefined) {\n return;\n }\n isAutoResizingColumns &&\n !isResizable &&\n updateColumnWidths(tableInstance, entry.width); // don't resize columns when the table is resizable due to problems with the resize handler.\n setIsScrollable(tableInstance.getTotalSize() > entry.width);\n setIsMediumNavigation(entry.width <= 680);\n setIsSmallNavigation(entry.width <= 480);\n },\n ref: scrollableContainerRef as React.RefObject<HTMLElement>,\n });\n\n // Triggers when the individual columns are resized\n useResizeObserver({\n onResize: () => {\n if (scrollableContainerRef.current === null) {\n return;\n }\n setIsScrollable(\n tableInstance.getTotalSize() >\n scrollableContainerRef.current.clientWidth,\n );\n },\n ref: tableRef as React.RefObject<HTMLElement>,\n });\n\n const Styling = useMemo(\n () => ({\n ...DEFAULT_STYLING,\n ...styling,\n }),\n [styling],\n );\n\n const Components = useMemo(\n () =>\n ({\n ...DataGridComponents,\n ...components,\n }) as DataGridContextType<T>['components'],\n [components],\n );\n const ScrollableContainer = Components?.Scrollable\n ? Components.Scrollable\n : Scrollable;\n\n const { listeners, tableNav } = useTableNav({\n isDebug: false,\n });\n\n /** Surface the tableNav instance for programmatic control if needed */\n useImperativeHandle(tableNavRef, () => tableNav, [tableNav]);\n\n useEffect(() => {\n if (isAutoResizingColumns && isResizable) {\n updateColumnWidths(\n tableInstance,\n scrollableContainerRef.current?.clientWidth\n ? scrollableContainerRef.current.clientWidth - 1 // -1 to avoid horizontal scrollbar\n : 0,\n );\n }\n }, [isAutoResizingColumns, tableInstance, isResizable]);\n\n return (\n <DataGridContext.Provider\n value={\n {\n components: Components,\n dataGridNav: tableNav,\n hasResizeColumns: isAutoResizingColumns,\n isKeyboardNavigationEnabled: isKeyboardNavigable,\n isLoading: isLoading,\n isMediumNavigation,\n isResizable: isResizable,\n isSkeletonLoading,\n isSmallNavigation,\n portalTarget: portalTarget,\n skeletonProps,\n tableProps: tableInstance,\n } as DataGridContextType<T>\n }\n >\n <div\n // Root props needs to be first in order to override className\n {...rootProps}\n className={classNames('ndl-data-grid-root', rootClassName, className, {\n 'ndl-data-grid-border-horizontal':\n Styling.borderStyle === BorderStyleEnum.Horizontal ||\n Styling.borderStyle === BorderStyleEnum.AllSides,\n 'ndl-data-grid-border-vertical':\n Styling.borderStyle === BorderStyleEnum.Vertical ||\n Styling.borderStyle === BorderStyleEnum.AllSides,\n 'ndl-data-grid-focusable-cells': isKeyboardNavigable,\n 'ndl-data-grid-header-filled':\n Styling.headerStyle === HeaderStyleEnum.Filled,\n 'ndl-data-grid-hover-effects': Styling.hasHoverEffects,\n 'ndl-data-grid-zebra-striping': Styling.hasZebraStriping,\n })}\n ref={ref}\n style={{ ...rootStyle, ...style }}\n {...restProps}\n {...htmlAttributes}\n {...(isKeyboardNavigable ? listeners : {})}\n >\n {/* Make DataGrid horizontally scrollable and avoid horizontal scrollbar have an extra vertical scrollbar (esp. Safari) */}\n {/* This behavior can be overridden by consumers through replacing the scrolling container */}\n <ScrollableContainer\n ref={scrollableContainerRef}\n htmlAttributes={{\n onKeyDown: (e) => {\n if (isScrollable && !isKeyboardNavigable) {\n if (e.key === 'ArrowRight' || e.key === 'ArrowLeft') {\n e.stopPropagation();\n }\n }\n },\n // Ensure that the user can focus and scroll inside the table with arrow keys even if there is no interactive element inside\n tabIndex: isScrollable && !isKeyboardNavigable ? 0 : undefined,\n }}\n >\n {/* Table content Area */}\n <div\n className=\"ndl-div-table\"\n role={isKeyboardNavigable ? 'grid' : 'table'}\n aria-busy={isLoading ? 'true' : 'false'}\n ref={tableRef}\n >\n {/* DataGrid Header Area */}\n {Components?.Header && <Components.Header />}\n {Components?.Body && <Components.Body />}\n </div>\n </ScrollableContainer>\n {/* Bottom Navigation Area */}\n {Components?.Navigation && <Components.Navigation />}\n </div>\n </DataGridContext.Provider>\n );\n};\n\nconst DataGridComponents = {\n ActionButton,\n ActionCell,\n Body,\n BodyCell,\n BodyRow,\n ColumnControls,\n DropDownCell,\n Header,\n HeaderCell,\n HeaderTitle,\n InlineEditCell,\n LoadingPlaceholder,\n Navigation,\n NoDataIcon,\n NoDataPlaceholder,\n NoDataPlaceholderContentWrapper,\n Pagination,\n PaginationArrowButton,\n PaginationNumericButton,\n PaginationNumericButtons,\n ResizingBar,\n RowsPerPage,\n Scrollable,\n TableResults,\n};\n\nconst DataGrid = Object.assign(DataGridComponent, DataGridComponents);\n\nexport { DataGrid };\n"]}
|
|
1
|
+
{"version":3,"file":"DataGrid.js","sourceRoot":"","sources":["../../../src/data-grid/DataGrid.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAwBA,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,OAAO,EACP,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EACL,YAAY,EACZ,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,cAAc,EACd,YAAY,EACZ,MAAM,EACN,UAAU,EACV,WAAW,EACX,cAAc,EACd,kBAAkB,EAClB,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,+BAA+B,EAC/B,UAAU,EACV,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,EACxB,WAAW,EACX,WAAW,EACX,UAAU,EACV,YAAY,GACb,MAAM,cAAc,CAAC;AACtB,OAAO,EAEL,eAAe,GAEhB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C,IAAK,eAKJ;AALD,WAAK,eAAe;IAClB,yCAAsB,CAAA;IACtB,4CAAyB,CAAA;IACzB,wCAAqB,CAAA;IACrB,gCAAa,CAAA;AACf,CAAC,EALI,eAAe,KAAf,eAAe,QAKnB;AAID,IAAK,eAGJ;AAHD,WAAK,eAAe;IAClB,oCAAiB,CAAA;IACjB,kCAAe,CAAA;AACjB,CAAC,EAHI,eAAe,KAAf,eAAe,QAGnB;AAsDD,MAAM,eAAe,GAAgD;IACnE,WAAW,EAAE,eAAe,CAAC,UAAU;IACvC,eAAe,EAAE,IAAI;IACrB,gBAAgB,EAAE,KAAK;IACvB,WAAW,EAAE,eAAe,C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IACZ,MAAM;IACN,UAAU;IACV,WAAW;IACX,cAAc;IACd,kBAAkB;IAClB,UAAU;IACV,UAAU;IACV,iBAAiB;IACjB,+BAA+B;IAC/B,UAAU;IACV,qBAAqB;IACrB,uBAAuB;IACvB,wBAAwB;IACxB,WAAW;IACX,WAAW;IACX,UAAU;IACV,YAAY;CACb,CAAC;AAEF,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,iBAAiB,EAAE,kBAAkB,CAAC,CAAC;AAEtE,OAAO,EAAE,QAAQ,EAAE,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport {\n type RowData,\n type Table as DataGridType,\n} from '@tanstack/react-table';\nimport classNames from 'classnames';\nimport {\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport { type CommonProps, type HtmlAttributes } from '../_common/types';\nimport { useResizeObserver } from '../hooks';\nimport { type Skeleton } from '../skeleton';\nimport {\n ActionButton,\n ActionCell,\n Body,\n BodyCell,\n BodyRow,\n ColumnControls,\n DropDownCell,\n Header,\n HeaderCell,\n HeaderTitle,\n InlineEditCell,\n LoadingPlaceholder,\n Navigation,\n NoDataIcon,\n NoDataPlaceholder,\n NoDataPlaceholderContentWrapper,\n Pagination,\n PaginationArrowButton,\n PaginationNumericButton,\n PaginationNumericButtons,\n ResizingBar,\n RowsPerPage,\n Scrollable,\n TableResults,\n} from './Components';\nimport {\n type DataGridComponentsInterface,\n DataGridContext,\n type DataGridContextType,\n} from './data-grid-context';\nimport { useTableNav } from './data-grid-nav';\nimport { updateColumnWidths } from './helpers';\n\nenum BorderStyleEnum {\n AllSides = 'all-sides',\n Horizontal = 'horizontal',\n Vertical = 'vertical',\n None = 'none',\n}\n\nexport type BorderStyle = `${BorderStyleEnum}`;\n\nenum HeaderStyleEnum {\n Filled = 'filled',\n Clean = 'clean',\n}\n\nexport type HeaderStyle = `${HeaderStyleEnum}`;\n\nexport type DataGridProps<T extends RowData> = {\n styling?: Partial<{\n /** Alternate the background color of rows */\n hasZebraStriping: boolean;\n /** Type of border that will be used */\n borderStyle: BorderStyle;\n /** If header should have styles or not (Aura example) */\n headerStyle: HeaderStyle;\n /** If background hover effects should be enabled on rows and header cells */\n hasHoverEffects: boolean;\n }>;\n /** Resizing the width of columns */\n isResizable?: boolean;\n /** Enables table's loading state */\n isLoading?: boolean;\n /**\n * Enables keyboard navigation.\n * To control keyboard navigation programmatically\n * for edge cases, pass a `ref` to `tableNavRef`\n */\n isKeyboardNavigable?: boolean;\n /**\n * Enables automatic resizing of columns.\n * If `isResizable` is `true`, the columns will only be automatically resized on initial render of the table.\n * If `isResizable` is `false`, the columns will be resized automatically to always fit the table width (assuming that column maxWidths allow for it).\n * Note: Action columns are a fixed size of 40px, and Pinned columns are not resized automatically.\n * @defaultValue true\n */\n isAutoResizingColumns?: boolean;\n /**\n * Reference to the tableNav instance\n * for programmatic control\n */\n // oxlint-disable-next-line @typescript-eslint/no-explicit-any\n tableNavRef?: React.RefObject<any>;\n /** Table instance created from `useTable`*/\n tableInstance: DataGridType<T>;\n /** Table sub-component overrides */\n components?: DataGridComponentsInterface<T>;\n /** @deprecated Use htmlAttributes, className and style on the root element instead */\n rootProps?: HtmlAttributes<'div'>;\n isSkeletonLoading?: boolean;\n skeletonProps?: React.ComponentProps<typeof Skeleton>;\n /** The target element for portaled elements to be rendered in, e.g. the modal root if the data grid is inside a modal.\n * This is used in for example the DropdownCell, RowsPerPage, and ColumnControls.\n */\n portalTarget?: HTMLElement | null;\n ref?: React.Ref<HTMLDivElement>;\n};\n\nconst DEFAULT_STYLING: Required<DataGridProps<unknown>['styling']> = {\n borderStyle: BorderStyleEnum.Horizontal,\n hasHoverEffects: true,\n hasZebraStriping: false,\n headerStyle: HeaderStyleEnum.Filled,\n};\n\nconst DataGridComponent = function DataGrid<T extends RowData = unknown>({\n isResizable = true,\n isLoading = false,\n isKeyboardNavigable = true,\n isAutoResizingColumns = true,\n tableInstance,\n components,\n rootProps,\n styling = {},\n tableNavRef,\n isSkeletonLoading = false,\n skeletonProps,\n ref,\n portalTarget = document.body,\n htmlAttributes,\n className,\n style,\n ...restProps\n}: CommonProps<'div', DataGridProps<T>>) {\n const { className: rootClassName = '', style: rootStyle = {} } =\n rootProps || {};\n\n const [isScrollable, setIsScrollable] = useState(false);\n const [isMediumNavigation, setIsMediumNavigation] = useState(false);\n const [isSmallNavigation, setIsSmallNavigation] = useState(false);\n const tableRef = useRef<HTMLDivElement>(null);\n const scrollableContainerRef = useRef<HTMLDivElement>(null);\n\n tableInstance.setOptions((prevOptions) => {\n return {\n ...prevOptions,\n enableSorting: isSkeletonLoading ? false : prevOptions.enableSorting,\n };\n });\n\n // Triggers when the whole container is resized\n useResizeObserver({\n onResize: (entry) => {\n if (entry.width === undefined) {\n return;\n }\n isAutoResizingColumns &&\n !isResizable &&\n updateColumnWidths(tableInstance, entry.width); // don't resize columns when the table is resizable due to problems with the resize handler.\n setIsScrollable(tableInstance.getTotalSize() > entry.width);\n setIsMediumNavigation(entry.width <= 680);\n setIsSmallNavigation(entry.width <= 480);\n },\n ref: scrollableContainerRef as React.RefObject<HTMLElement>,\n });\n\n // Triggers when the individual columns are resized\n useResizeObserver({\n onResize: () => {\n if (scrollableContainerRef.current === null) {\n return;\n }\n setIsScrollable(\n tableInstance.getTotalSize() >\n scrollableContainerRef.current.clientWidth,\n );\n },\n ref: tableRef as React.RefObject<HTMLElement>,\n });\n\n const Styling = useMemo(\n () => ({\n ...DEFAULT_STYLING,\n ...styling,\n }),\n [styling],\n );\n\n const Components = useMemo(\n () =>\n ({\n ...DataGridComponents,\n ...components,\n }) as DataGridContextType<T>['components'],\n [components],\n );\n const ScrollableContainer = Components?.Scrollable\n ? Components.Scrollable\n : Scrollable;\n\n const { listeners, tableNav } = useTableNav({\n isDebug: false,\n });\n\n /** Surface the tableNav instance for programmatic control if needed */\n useImperativeHandle(tableNavRef, () => tableNav, [tableNav]);\n\n useEffect(() => {\n if (isAutoResizingColumns && isResizable) {\n updateColumnWidths(\n tableInstance,\n scrollableContainerRef.current?.clientWidth\n ? scrollableContainerRef.current.clientWidth - 1 // -1 to avoid horizontal scrollbar\n : 0,\n );\n }\n }, [isAutoResizingColumns, tableInstance, isResizable]);\n\n return (\n <DataGridContext.Provider\n value={\n {\n components: Components,\n dataGridNav: tableNav,\n hasResizeColumns: isAutoResizingColumns,\n isKeyboardNavigationEnabled: isKeyboardNavigable,\n isLoading: isLoading,\n isMediumNavigation,\n isResizable: isResizable,\n isSkeletonLoading,\n isSmallNavigation,\n portalTarget: portalTarget,\n skeletonProps,\n tableProps: tableInstance,\n } as DataGridContextType<T>\n }\n >\n <div\n // Root props needs to be first in order to override className\n {...rootProps}\n className={classNames('ndl-data-grid-root', rootClassName, className, {\n 'ndl-data-grid-border-horizontal':\n Styling.borderStyle === BorderStyleEnum.Horizontal ||\n Styling.borderStyle === BorderStyleEnum.AllSides,\n 'ndl-data-grid-border-vertical':\n Styling.borderStyle === BorderStyleEnum.Vertical ||\n Styling.borderStyle === BorderStyleEnum.AllSides,\n 'ndl-data-grid-focusable-cells': isKeyboardNavigable,\n 'ndl-data-grid-header-filled':\n Styling.headerStyle === HeaderStyleEnum.Filled,\n 'ndl-data-grid-hover-effects': Styling.hasHoverEffects,\n 'ndl-data-grid-zebra-striping': Styling.hasZebraStriping,\n })}\n ref={ref}\n style={{ ...rootStyle, ...style }}\n {...restProps}\n {...htmlAttributes}\n {...(isKeyboardNavigable ? listeners : {})}\n >\n {/* Make DataGrid horizontally scrollable and avoid horizontal scrollbar have an extra vertical scrollbar (esp. Safari) */}\n {/* This behavior can be overridden by consumers through replacing the scrolling container */}\n <ScrollableContainer\n ref={scrollableContainerRef}\n htmlAttributes={{\n onKeyDown: (e) => {\n if (isScrollable && !isKeyboardNavigable) {\n if (e.key === 'ArrowRight' || e.key === 'ArrowLeft') {\n e.stopPropagation();\n }\n }\n },\n // Ensure that the user can focus and scroll inside the table with arrow keys even if there is no interactive element inside\n tabIndex: isScrollable && !isKeyboardNavigable ? 0 : undefined,\n }}\n >\n {/* Table content Area */}\n <div\n className=\"ndl-div-table\"\n role={isKeyboardNavigable ? 'grid' : 'table'}\n aria-busy={isLoading ? 'true' : 'false'}\n ref={tableRef}\n >\n {/* DataGrid Header Area */}\n {Components?.Header && <Components.Header />}\n {Components?.Body && <Components.Body />}\n </div>\n </ScrollableContainer>\n {/* Bottom Navigation Area */}\n {Components?.Navigation && <Components.Navigation />}\n </div>\n </DataGridContext.Provider>\n );\n};\n\nconst DataGridComponents = {\n ActionButton,\n ActionCell,\n Body,\n BodyCell,\n BodyRow,\n ColumnControls,\n DropDownCell,\n Header,\n HeaderCell,\n HeaderTitle,\n InlineEditCell,\n LoadingPlaceholder,\n Navigation,\n NoDataIcon,\n NoDataPlaceholder,\n NoDataPlaceholderContentWrapper,\n Pagination,\n PaginationArrowButton,\n PaginationNumericButton,\n PaginationNumericButtons,\n ResizingBar,\n RowsPerPage,\n Scrollable,\n TableResults,\n};\n\nconst DataGrid = Object.assign(DataGridComponent, DataGridComponents);\n\nexport { DataGrid };\n"]}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
22
|
import { createContext, useContext } from 'react';
|
|
23
|
-
//
|
|
23
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
24
24
|
export const DataGridContext = createContext(null);
|
|
25
25
|
export function useDataGridContext() {
|
|
26
26
|
const context = useContext(DataGridContext);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-grid-context.js","sourceRoot":"","sources":["../../../src/data-grid/data-grid-context.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AA4ElD,8DAA8D;AAC9D,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAA2B,IAAK,CAAC,CAAC;AAE9E,MAAM,UAAU,kBAAkB;IAChC,MAAM,OAAO,GAAG,UAAU,CAAyB,eAAe,CAAC,CAAC;IACpE,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CACb,kEAAkE,CACnE,CAAC;IACJ,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport {\n type RowData,\n type Table as DataGridType,\n} from '@tanstack/react-table';\nimport { createContext, useContext } from 'react';\n\nimport { type Skeleton } from '../skeleton';\nimport {\n type ActionButton,\n type ActionCell,\n type Body,\n type BodyCell,\n type BodyRow,\n type ColumnControls,\n type Header,\n type HeaderCell,\n type HeaderTitle,\n type LoadingPlaceholder,\n type Navigation,\n type NoDataPlaceholder,\n type Pagination,\n type PaginationArrowButton,\n type PaginationNumericButton,\n type PaginationNumericButtons,\n type ResizingBar,\n type RowsPerPage,\n type Scrollable,\n type TableResults,\n} from './Components';\nimport { type DataGridNav } from './data-grid-nav/data-grid-nav';\n\ntype Nullable<T> = T | null;\n\nexport interface DataGridComponentsInterface<T extends RowData> {\n ResizingBar?: Nullable<typeof ResizingBar<T>>;\n /**\n * Header Section\n */\n Header?: Nullable<typeof Header>;\n HeaderCell?: Nullable<typeof HeaderCell<T>>;\n HeaderTitle?: Nullable<typeof HeaderTitle<T>>;\n ActionButton?: Nullable<typeof ActionButton>;\n ColumnControls?: Nullable<typeof ColumnControls>;\n /**\n * Body Section\n */\n Scrollable?: Nullable<typeof Scrollable>;\n Body?: Nullable<typeof Body>;\n BodyCell?: Nullable<typeof BodyCell<T>>;\n BodyRow?: Nullable<typeof BodyRow<T>>;\n ActionCell?: Nullable<typeof ActionCell<T>>;\n LoadingPlaceholder?: Nullable<typeof LoadingPlaceholder>;\n NoDataPlaceholder?: Nullable<typeof NoDataPlaceholder>;\n /**\n * Navigation Section\n */\n Navigation?: Nullable<typeof Navigation>;\n Pagination?: Nullable<typeof Pagination>;\n PaginationArrowButton?: Nullable<typeof PaginationArrowButton>;\n TableResults?: Nullable<typeof TableResults>;\n RowsPerPage?: Nullable<typeof RowsPerPage>;\n PaginationNumericButtons?: Nullable<typeof PaginationNumericButtons>;\n PaginationNumericButton?: Nullable<typeof PaginationNumericButton>;\n}\n\nexport interface DataGridContextType<T extends RowData> {\n isResizable: boolean;\n tableProps: DataGridType<T>;\n components: DataGridComponentsInterface<T>;\n isLoading: boolean;\n hasResizeColumns: boolean;\n isKeyboardNavigationEnabled: boolean;\n isSkeletonLoading: boolean;\n skeletonProps: React.ComponentProps<typeof Skeleton>;\n dataGridNav: DataGridNav;\n portalTarget: HTMLElement | null;\n isMediumNavigation: boolean;\n isSmallNavigation: boolean;\n}\n\n//
|
|
1
|
+
{"version":3,"file":"data-grid-context.js","sourceRoot":"","sources":["../../../src/data-grid/data-grid-context.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AA4ElD,8DAA8D;AAC9D,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAA2B,IAAK,CAAC,CAAC;AAE9E,MAAM,UAAU,kBAAkB;IAChC,MAAM,OAAO,GAAG,UAAU,CAAyB,eAAe,CAAC,CAAC;IACpE,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CACb,kEAAkE,CACnE,CAAC;IACJ,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport {\n type RowData,\n type Table as DataGridType,\n} from '@tanstack/react-table';\nimport { createContext, useContext } from 'react';\n\nimport { type Skeleton } from '../skeleton';\nimport {\n type ActionButton,\n type ActionCell,\n type Body,\n type BodyCell,\n type BodyRow,\n type ColumnControls,\n type Header,\n type HeaderCell,\n type HeaderTitle,\n type LoadingPlaceholder,\n type Navigation,\n type NoDataPlaceholder,\n type Pagination,\n type PaginationArrowButton,\n type PaginationNumericButton,\n type PaginationNumericButtons,\n type ResizingBar,\n type RowsPerPage,\n type Scrollable,\n type TableResults,\n} from './Components';\nimport { type DataGridNav } from './data-grid-nav/data-grid-nav';\n\ntype Nullable<T> = T | null;\n\nexport interface DataGridComponentsInterface<T extends RowData> {\n ResizingBar?: Nullable<typeof ResizingBar<T>>;\n /**\n * Header Section\n */\n Header?: Nullable<typeof Header>;\n HeaderCell?: Nullable<typeof HeaderCell<T>>;\n HeaderTitle?: Nullable<typeof HeaderTitle<T>>;\n ActionButton?: Nullable<typeof ActionButton>;\n ColumnControls?: Nullable<typeof ColumnControls>;\n /**\n * Body Section\n */\n Scrollable?: Nullable<typeof Scrollable>;\n Body?: Nullable<typeof Body>;\n BodyCell?: Nullable<typeof BodyCell<T>>;\n BodyRow?: Nullable<typeof BodyRow<T>>;\n ActionCell?: Nullable<typeof ActionCell<T>>;\n LoadingPlaceholder?: Nullable<typeof LoadingPlaceholder>;\n NoDataPlaceholder?: Nullable<typeof NoDataPlaceholder>;\n /**\n * Navigation Section\n */\n Navigation?: Nullable<typeof Navigation>;\n Pagination?: Nullable<typeof Pagination>;\n PaginationArrowButton?: Nullable<typeof PaginationArrowButton>;\n TableResults?: Nullable<typeof TableResults>;\n RowsPerPage?: Nullable<typeof RowsPerPage>;\n PaginationNumericButtons?: Nullable<typeof PaginationNumericButtons>;\n PaginationNumericButton?: Nullable<typeof PaginationNumericButton>;\n}\n\nexport interface DataGridContextType<T extends RowData> {\n isResizable: boolean;\n tableProps: DataGridType<T>;\n components: DataGridComponentsInterface<T>;\n isLoading: boolean;\n hasResizeColumns: boolean;\n isKeyboardNavigationEnabled: boolean;\n isSkeletonLoading: boolean;\n skeletonProps: React.ComponentProps<typeof Skeleton>;\n dataGridNav: DataGridNav;\n portalTarget: HTMLElement | null;\n isMediumNavigation: boolean;\n isSmallNavigation: boolean;\n}\n\n// oxlint-disable-next-line @typescript-eslint/no-explicit-any\nexport const DataGridContext = createContext<DataGridContextType<any>>(null!);\n\nexport function useDataGridContext<T extends RowData>() {\n const context = useContext<DataGridContextType<T>>(DataGridContext);\n if (!context) {\n throw new Error(\n 'useDataGridContext should be used under Table component provider',\n );\n }\n return context;\n}\n"]}
|
|
@@ -37,7 +37,7 @@ export function useTableNav(options) {
|
|
|
37
37
|
const value = Reflect.get(target, prop, receiver);
|
|
38
38
|
// If it's a function (a class method), we can intercept calls:
|
|
39
39
|
if (typeof value === 'function') {
|
|
40
|
-
//
|
|
40
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
41
41
|
return (...args) => {
|
|
42
42
|
// Call the original method
|
|
43
43
|
const result = value.apply(target, args);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/data-grid/data-grid-nav/index.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE/D,OAAO,EAAe,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE3D,MAAM,UAAU,WAAW,CAAC,OAAgB;IAC1C,qEAAqE;IACrE,MAAM,WAAW,GAAG,MAAM,CAAqB,IAAI,CAAC,CAAC;IACrD,IAAI,WAAW,CAAC,OAAO,KAAK,IAAI,EAAE,CAAC;QACjC,WAAW,CAAC,OAAO,GAAG,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC;IACjD,CAAC;IAED,mFAAmF;IACnF,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IACnC,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAEpE,4DAA4D;IAC5D,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,EAAE;QACnC,MAAM,OAAO,GAA8B;YACzC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ;gBACxB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;gBAElD,+DAA+D;gBAC/D,IAAI,OAAO,KAAK,KAAK,UAAU,EAAE,CAAC;oBAChC,8DAA8D;oBAC9D,OAAO,CAAC,GAAG,IAAW,EAAE,EAAE;wBACxB,2BAA2B;wBAC3B,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;wBAEzC,2EAA2E;wBAC3E,oFAAoF;wBACpF,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;4BACjD,WAAW,EAAE,CAAC;wBAChB,CAAC;wBACD,OAAO,MAAM,CAAC;oBAChB,CAAC,CAAC;gBACJ,CAAC;gBAED,8CAA8C;gBAC9C,OAAO,KAAK,CAAC;YACf,CAAC;YAED,mEAAmE;YACnE,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ;gBAClC,gEAAgE;gBAChE,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;gBAC7D,+CAA+C;gBAC/C,WAAW,EAAE,CAAC;gBACd,OAAO,MAAM,CAAC;YAChB,CAAC;SACF,CAAC;QAEF,OAAO,IAAI,KAAK,CAAC,WAAW,CAAC,OAAsB,EAAE,OAAO,CAAC,CAAC;QAC9D,+EAA+E;IACjF,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;IAElB,OAAO;QACL,SAAS,EAAE;YACT,SAAS,EAAE,CAAC,CAAsB,EAAE,EAAE,CACpC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,WAAW,CAAC;YAC7C,OAAO,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,UAAU,EAAE;SAC5C;QACD,QAAQ,EAAE,eAAe;KAC1B,CAAC;AACJ,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport type React from 'react';\nimport { useCallback, useMemo, useRef, useState } from 'react';\n\nimport { type Config, DataGridNav } from './data-grid-nav';\n\nexport function useTableNav(options?: Config) {\n // Store the actual class instance in a ref so we only create it once\n const instanceRef = useRef<DataGridNav | null>(null);\n if (instanceRef.current === null) {\n instanceRef.current = new DataGridNav(options);\n }\n\n // A piece of state to force a re-render when you want to react to instance changes\n const [, setVersion] = useState(0);\n const forceUpdate = useCallback(() => setVersion((v) => v + 1), []);\n\n // Wrap the instance in a proxy that intercepts reads/writes\n const proxiedInstance = useMemo(() => {\n const handler: ProxyHandler<DataGridNav> = {\n get(target, prop, receiver) {\n const value = Reflect.get(target, prop, receiver);\n\n // If it's a function (a class method), we can intercept calls:\n if (typeof value === 'function') {\n //
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/data-grid/data-grid-nav/index.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE/D,OAAO,EAAe,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE3D,MAAM,UAAU,WAAW,CAAC,OAAgB;IAC1C,qEAAqE;IACrE,MAAM,WAAW,GAAG,MAAM,CAAqB,IAAI,CAAC,CAAC;IACrD,IAAI,WAAW,CAAC,OAAO,KAAK,IAAI,EAAE,CAAC;QACjC,WAAW,CAAC,OAAO,GAAG,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC;IACjD,CAAC;IAED,mFAAmF;IACnF,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IACnC,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,CAA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C,CAAC;IAElB,OAAO;QACL,SAAS,EAAE;YACT,SAAS,EAAE,CAAC,CAAsB,EAAE,EAAE,CACpC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,WAAW,CAAC;YAC7C,OAAO,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,UAAU,EAAE;SAC5C;QACD,QAAQ,EAAE,eAAe;KAC1B,CAAC;AACJ,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport type React from 'react';\nimport { useCallback, useMemo, useRef, useState } from 'react';\n\nimport { type Config, DataGridNav } from './data-grid-nav';\n\nexport function useTableNav(options?: Config) {\n // Store the actual class instance in a ref so we only create it once\n const instanceRef = useRef<DataGridNav | null>(null);\n if (instanceRef.current === null) {\n instanceRef.current = new DataGridNav(options);\n }\n\n // A piece of state to force a re-render when you want to react to instance changes\n const [, setVersion] = useState(0);\n const forceUpdate = useCallback(() => setVersion((v) => v + 1), []);\n\n // Wrap the instance in a proxy that intercepts reads/writes\n const proxiedInstance = useMemo(() => {\n const handler: ProxyHandler<DataGridNav> = {\n get(target, prop, receiver) {\n const value = Reflect.get(target, prop, receiver);\n\n // If it's a function (a class method), we can intercept calls:\n if (typeof value === 'function') {\n // oxlint-disable-next-line @typescript-eslint/no-explicit-any\n return (...args: any[]) => {\n // Call the original method\n const result = value.apply(target, args);\n\n // Example: force re-render if the method is known to change internal state\n // or if you want to force re-render after *every* method call, remove the condition\n if (['enable', 'disable'].includes(String(prop))) {\n forceUpdate();\n }\n return result;\n };\n }\n\n // Otherwise, it's a property. Just return it.\n return value;\n },\n\n // Trap for property assignments, so React can re-render on changes\n set(target, prop, newValue, receiver) {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n const result = Reflect.set(target, prop, newValue, receiver);\n // Force re-render after setting *any* property\n forceUpdate();\n return result;\n },\n };\n\n return new Proxy(instanceRef.current as DataGridNav, handler);\n // We only want to create a new Proxy if the instanceRef or forceUpdate changes\n }, [forceUpdate]);\n\n return {\n listeners: {\n onKeyDown: (e: React.KeyboardEvent) =>\n proxiedInstance.tableKeyDown(e.nativeEvent),\n onKeyUp: () => proxiedInstance.tableKeyUp(),\n },\n tableNav: proxiedInstance,\n };\n}\n"]}
|
|
@@ -39,7 +39,7 @@ const ColumnActions = {
|
|
|
39
39
|
},
|
|
40
40
|
};
|
|
41
41
|
const COMMON_COLUMNS = (options) => {
|
|
42
|
-
//
|
|
42
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
43
43
|
const columns = [
|
|
44
44
|
columnHelper.accessor('name', {
|
|
45
45
|
cell: (info) => info.getValue(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datagrid-kitchen-sink.story.js","sourceRoot":"","sources":["../../../../src/data-grid/stories/datagrid-kitchen-sink.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAGL,kBAAkB,EAClB,eAAe,EACf,qBAAqB,EACrB,iBAAiB,EAEjB,aAAa,GACd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAGzC,OAAO,EAAE,eAAe,EAAE,MA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gBACE,OAAO,EAAE,GAAG,EAAE;oBACZ,KAAK,CAAC,SAAS,CAAC,CAAC;gBACnB,CAAC;gBACD,KAAK,EAAE,aAAa;aACrB;SACF;KACF;CAC+C,CAAC;AAEnD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EACJ,QAAQ,EAAE,mBAAmB,EAC7B,aAAa,EAAE,gBAAgB,EAC/B,WAAW,EACX,WAAW,EACX,sBAAsB,EAAE,4BAA4B,GACrD,GAAG,WAAW,CAAC;QACd,WAAW,EAAE;YACX,OAAO,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,CAAC;YACxD,KAAK,EAAE,WAAW;SACnB;QACD,WAAW,EAAE;YACX,OAAO,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;YAC5B,KAAK,EAAE,QAAQ;SAChB;QACD,sBAAsB,EAAE,KAAK;QAC7B,QAAQ,EAAE,KAAK;QACf,aAAa,EAAE,KAAK;KACrB,CAAC,CAAC;IAEH,MAAM,KAAK,GAAG,aAAa,iCACtB,kBAAkB,KACrB,OAAO,EAAE,cAAc,CAAC;YACtB,4BAA4B;SAC7B,CAAC,EACF,aAAa,EAAE,IAAI,EACnB,iBAAiB,EAAE,iBAAiB,EAAE,IACtC,CAAC;IAEH,OAAO,CACL,eAAK,SAAS,EAAC,yDAAyD,aACtE,KAAC,IAAI,IAAC,MAAM,SAAG,EACf,KAAC,QAAQ,IACP,WAAW,EAAE,IAAI,EACjB,aAAa,EAAE,KAAK,EACpB,mBAAmB,EAAE,mBAAmB,EACxC,OAAO,EAAE;oBACP,WAAW,EAAE,WAA0B;oBACvC,gBAAgB;oBAChB,WAAW,EAAE,WAA0B;iBACxC,GACD,IACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { DataGrid, Menu } from '@neo4j-ndl/react';\nimport { ChevronDownIconSolid } from '@neo4j-ndl/react/icons';\nimport {\n type ColumnDef,\n type ColumnMeta,\n createColumnHelper,\n getCoreRowModel,\n getPaginationRowModel,\n getSortedRowModel,\n type TableOptions,\n useReactTable,\n} from '@tanstack/react-table';\nimport { Leva, useControls } from 'leva';\n\nimport { type BorderStyle, type HeaderStyle } from '../DataGrid';\nimport { TABLE_DEMO_DATA } from './staticData';\n\ntype TestDataFormat = {\n name: string;\n age: number;\n cypherCommand: string;\n};\n\nconst columnHelper = createColumnHelper<TestDataFormat>();\n\nconst ColumnActions: ColumnMeta<TestDataFormat, unknown> = {\n columnActions: {\n actions: [\n {\n onClick: () => {\n alert('Action triggered');\n },\n title: 'Example Column Action',\n },\n ],\n },\n};\n\ntype ColumnGeneratorOptions = {\n shouldIncludeRowActionColumn: boolean;\n};\nconst COMMON_COLUMNS = (options: ColumnGeneratorOptions) => {\n //
|
|
1
|
+
{"version":3,"file":"datagrid-kitchen-sink.story.js","sourceRoot":"","sources":["../../../../src/data-grid/stories/datagrid-kitchen-sink.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAGL,kBAAkB,E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,GACD,IACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { DataGrid, Menu } from '@neo4j-ndl/react';\nimport { ChevronDownIconSolid } from '@neo4j-ndl/react/icons';\nimport {\n type ColumnDef,\n type ColumnMeta,\n createColumnHelper,\n getCoreRowModel,\n getPaginationRowModel,\n getSortedRowModel,\n type TableOptions,\n useReactTable,\n} from '@tanstack/react-table';\nimport { Leva, useControls } from 'leva';\n\nimport { type BorderStyle, type HeaderStyle } from '../DataGrid';\nimport { TABLE_DEMO_DATA } from './staticData';\n\ntype TestDataFormat = {\n name: string;\n age: number;\n cypherCommand: string;\n};\n\nconst columnHelper = createColumnHelper<TestDataFormat>();\n\nconst ColumnActions: ColumnMeta<TestDataFormat, unknown> = {\n columnActions: {\n actions: [\n {\n onClick: () => {\n alert('Action triggered');\n },\n title: 'Example Column Action',\n },\n ],\n },\n};\n\ntype ColumnGeneratorOptions = {\n shouldIncludeRowActionColumn: boolean;\n};\nconst COMMON_COLUMNS = (options: ColumnGeneratorOptions) => {\n // oxlint-disable-next-line @typescript-eslint/no-explicit-any\n const columns: ColumnDef<TestDataFormat, any>[] = [\n columnHelper.accessor('name', {\n cell: (info) => info.getValue(),\n maxSize: 300,\n minSize: 180,\n size: 220,\n }),\n columnHelper.accessor('age', {\n cell: (info) => info.getValue(),\n header: () => <div>Age</div>,\n minSize: 80,\n ...(options.shouldIncludeRowActionColumn\n ? {\n meta: {\n ...ColumnActions,\n },\n }\n : {}),\n }),\n columnHelper.accessor('cypherCommand', {\n cell: (info) => info.getValue(),\n minSize: 400,\n size: 400,\n }),\n ];\n\n if (options.shouldIncludeRowActionColumn) {\n columns.push(\n columnHelper.display({\n cell: (cell) => {\n const isSpecialRow =\n cell.row.original.name === TABLE_DEMO_DATA[3].name || undefined;\n return (\n <DataGrid.ActionCell\n cell={cell}\n innerCleanIconButtonProps={{\n children: isSpecialRow && <ChevronDownIconSolid />,\n description: `Actions for ${cell.row.original.name}`,\n }}\n innerMenuProps={\n isSpecialRow && {\n children: <Menu.Item title=\"Custom icon and menu props\" />,\n }\n }\n />\n );\n },\n id: 'actions',\n meta: {\n isActionCell: {\n actions: [\n {\n onClick: (_event, cell) => {\n alert(\n `Row Action triggered for row with index: ${\n cell.row.index\n }`,\n );\n },\n title: 'Example Row Action',\n },\n ],\n onOpenChange: (open) => console.info(`onOpenChange: ${open}`),\n },\n },\n }),\n );\n }\n\n return columns;\n};\n\nconst COMMON_TABLE_PROPS = {\n columnResizeMode: 'onChange',\n data: TABLE_DEMO_DATA,\n // https://tanstack.com/table/v8/docs/guide/column-sizing#overview\n defaultColumn: {\n minSize: 80,\n },\n enableSorting: false,\n getCoreRowModel: getCoreRowModel(),\n getPaginationRowModel: getPaginationRowModel(),\n initialState: {\n pagination: {\n pageSize: 5,\n },\n },\n meta: {\n actions: [\n {\n onClick: () => {\n alert('wowowow');\n },\n title: \"Let's party\",\n },\n ],\n },\n} as Omit<TableOptions<TestDataFormat>, 'columns'>;\n\nconst Component = () => {\n const {\n keyboard: isKeyboardNavigable,\n zebraStriping: hasZebraStriping,\n borderStyle,\n headerStyle,\n includeRowActionColumn: shouldIncludeRowActionColumn,\n } = useControls({\n borderStyle: {\n options: ['all-sides', 'horizontal', 'vertical', 'none'],\n value: 'all-sides',\n },\n headerStyle: {\n options: ['filled', 'clean'],\n value: 'filled',\n },\n includeRowActionColumn: false,\n keyboard: false,\n zebraStriping: false,\n });\n\n const table = useReactTable({\n ...COMMON_TABLE_PROPS,\n columns: COMMON_COLUMNS({\n shouldIncludeRowActionColumn,\n }),\n enableSorting: true,\n getSortedRowModel: getSortedRowModel(),\n });\n\n return (\n <div className=\"n-h-[1000px] n-w-full n-bg-primary-bg-weak n-p-token-32\">\n <Leva isRoot />\n <DataGrid\n isResizable={true}\n tableInstance={table}\n isKeyboardNavigable={isKeyboardNavigable}\n styling={{\n borderStyle: borderStyle as BorderStyle,\n hasZebraStriping,\n headerStyle: headerStyle as HeaderStyle,\n }}\n />\n </div>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -28,28 +28,28 @@ const Component = () => {
|
|
|
28
28
|
setSelectedDate(date);
|
|
29
29
|
};
|
|
30
30
|
return (_jsx(DatePicker, { textInputProps: {
|
|
31
|
-
label: 'This one has a label',
|
|
32
31
|
helpText: 'With help text',
|
|
33
|
-
showRequiredOrOptionalLabel: false,
|
|
34
32
|
isDisabled: false,
|
|
35
|
-
isRequired: false,
|
|
36
|
-
isReadOnly: false,
|
|
37
33
|
isFluid: false,
|
|
34
|
+
isReadOnly: false,
|
|
35
|
+
isRequired: false,
|
|
36
|
+
label: 'This one has a label',
|
|
38
37
|
moreInformationText: 'With information icon text',
|
|
38
|
+
showRequiredOrOptionalLabel: false,
|
|
39
39
|
}, timePickerProps: {
|
|
40
|
-
timeInterval: 20,
|
|
41
40
|
format: 'hh:mm aa',
|
|
42
41
|
isDisabled: false,
|
|
43
|
-
isRequired: false,
|
|
44
|
-
isReadOnly: false,
|
|
45
42
|
isFluid: false,
|
|
43
|
+
isReadOnly: false,
|
|
44
|
+
isRequired: false,
|
|
45
|
+
timeInterval: 20,
|
|
46
46
|
}, reactDatePickerProps: {
|
|
47
|
-
selected: selectedDate,
|
|
48
47
|
onChange: handleOnChange,
|
|
49
|
-
showTimeInput: true,
|
|
50
48
|
popperProps: {
|
|
51
49
|
strategy: 'fixed',
|
|
52
50
|
},
|
|
51
|
+
selected: selectedDate,
|
|
52
|
+
showTimeInput: true,
|
|
53
53
|
} }));
|
|
54
54
|
};
|
|
55
55
|
export default Component;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker-full.story.js","sourceRoot":"","sources":["../../../../src/date-picker/stories/date-picker-full.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAC9C,IAAI,IAAI,CAAC,YAAY,CAAC,CACvB,CAAC;IACF,MAAM,cAAc,GAAG,CAAC,IAAiB,EAAE,EAAE;QAC3C,eAAe,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC,CAAC;IAEF,OAAO,CACL,KAAC,UAAU,IACT,cAAc,EAAE;YACd,
|
|
1
|
+
{"version":3,"file":"date-picker-full.story.js","sourceRoot":"","sources":["../../../../src/date-picker/stories/date-picker-full.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAC9C,IAAI,IAAI,CAAC,YAAY,CAAC,CACvB,CAAC;IACF,MAAM,cAAc,GAAG,CAAC,IAAiB,EAAE,EAAE;QAC3C,eAAe,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC,CAAC;IAEF,OAAO,CACL,KAAC,UAAU,IACT,cAAc,EAAE;YACd,QAAQ,EAAE,gBAAgB;YAC1B,UAAU,EAAE,KAAK;YACjB,OAAO,EAAE,KAAK;YACd,UAAU,EAAE,KAAK;YACjB,UAAU,EAAE,KAAK;YACjB,KAAK,EAAE,sBAAsB;YAC7B,mBAAmB,EAAE,4BAA4B;YACjD,2BAA2B,EAAE,KAAK;SACnC,EACD,eAAe,EAAE;YACf,MAAM,EAAE,UAAU;YAClB,UAAU,EAAE,KAAK;YACjB,OAAO,EAAE,KAAK;YACd,UAAU,EAAE,KAAK;YACjB,UAAU,EAAE,KAAK;YACjB,YAAY,EAAE,EAAE;SACjB,EACD,oBAAoB,EAAE;YACpB,QAAQ,EAAE,cAAc;YACxB,WAAW,EAAE;gBACX,QAAQ,EAAE,OAAO;aAClB;YACD,QAAQ,EAAE,YAAY;YACtB,aAAa,EAAE,IAAI;SACpB,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { DatePicker } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [selectedDate, setSelectedDate] = useState<Date | null>(\n new Date('2023-05-27'),\n );\n const handleOnChange = (date: Date | null) => {\n setSelectedDate(date);\n };\n\n return (\n <DatePicker\n textInputProps={{\n helpText: 'With help text',\n isDisabled: false,\n isFluid: false,\n isReadOnly: false,\n isRequired: false,\n label: 'This one has a label',\n moreInformationText: 'With information icon text',\n showRequiredOrOptionalLabel: false,\n }}\n timePickerProps={{\n format: 'hh:mm aa',\n isDisabled: false,\n isFluid: false,\n isReadOnly: false,\n isRequired: false,\n timeInterval: 20,\n }}\n reactDatePickerProps={{\n onChange: handleOnChange,\n popperProps: {\n strategy: 'fixed',\n },\n selected: selectedDate,\n showTimeInput: true,\n }}\n />\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -23,10 +23,10 @@ import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
|
23
23
|
import { Divider } from '@neo4j-ndl/react';
|
|
24
24
|
const Component = () => {
|
|
25
25
|
return (_jsxs("div", { style: {
|
|
26
|
-
width: '100%',
|
|
27
26
|
display: 'flex',
|
|
28
27
|
flexDirection: 'column',
|
|
29
28
|
gap: '4px',
|
|
29
|
+
width: '100%',
|
|
30
30
|
}, children: [_jsx("p", { children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit." }), _jsx(Divider, { orientation: "horizontal" }), _jsx("p", { children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit." })] }));
|
|
31
31
|
};
|
|
32
32
|
export default Component;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"divider-horizontal.story.js","sourceRoot":"","sources":["../../../../src/divider/stories/divider-horizontal.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,eACE,KAAK,EAAE;YACL,
|
|
1
|
+
{"version":3,"file":"divider-horizontal.story.js","sourceRoot":"","sources":["../../../../src/divider/stories/divider-horizontal.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,eACE,KAAK,EAAE;YACL,OAAO,EAAE,MAAM;YACf,aAAa,EAAE,QAAQ;YACvB,GAAG,EAAE,KAAK;YACV,KAAK,EAAE,MAAM;SACd,aAED,mFAA+D,EAC/D,KAAC,OAAO,IAAC,WAAW,EAAC,YAAY,GAAG,EACpC,mFAA+D,IAC3D,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Divider } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <div\n style={{\n display: 'flex',\n flexDirection: 'column',\n gap: '4px',\n width: '100%',\n }}\n >\n <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>\n <Divider orientation=\"horizontal\" />\n <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>\n </div>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -23,10 +23,10 @@ import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
|
23
23
|
import { Divider } from '@neo4j-ndl/react';
|
|
24
24
|
const Component = () => {
|
|
25
25
|
return (_jsxs("div", { style: {
|
|
26
|
-
width: '100%',
|
|
27
26
|
display: 'flex',
|
|
28
27
|
flexDirection: 'row',
|
|
29
28
|
gap: '4px',
|
|
29
|
+
width: '100%',
|
|
30
30
|
}, children: [_jsx("p", { children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit." }), _jsx(Divider, { orientation: "vertical" }), _jsx("p", { children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit." })] }));
|
|
31
31
|
};
|
|
32
32
|
export default Component;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"divider-vertical.story.js","sourceRoot":"","sources":["../../../../src/divider/stories/divider-vertical.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,eACE,KAAK,EAAE;YACL,
|
|
1
|
+
{"version":3,"file":"divider-vertical.story.js","sourceRoot":"","sources":["../../../../src/divider/stories/divider-vertical.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,eACE,KAAK,EAAE;YACL,OAAO,EAAE,MAAM;YACf,aAAa,EAAE,KAAK;YACpB,GAAG,EAAE,KAAK;YACV,KAAK,EAAE,MAAM;SACd,aAED,mFAA+D,EAC/D,KAAC,OAAO,IAAC,WAAW,EAAC,UAAU,GAAG,EAClC,mFAA+D,IAC3D,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Divider } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <div\n style={{\n display: 'flex',\n flexDirection: 'row',\n gap: '4px',\n width: '100%',\n }}\n >\n <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>\n <Divider orientation=\"vertical\" />\n <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>\n </div>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -23,117 +23,117 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
23
23
|
import { Drawer } from '../../index';
|
|
24
24
|
import { DrawerFull, DrawerFullSrc, DrawerNotCloseable, DrawerNotCloseableSrc, DrawerOverlay, DrawerOverlaySrc, DrawerPortaled, DrawerPortaledSrc, DrawerPush, DrawerPushSrc, DrawerResizable, DrawerResizableSrc, DrawerRightSide, DrawerRightSideSrc, DrawerScrollable, DrawerScrollableSrc, } from './index';
|
|
25
25
|
const componentMeta = {
|
|
26
|
-
title: 'Components/Drawer',
|
|
27
|
-
id: 'components-drawer',
|
|
28
26
|
component: Drawer,
|
|
29
|
-
|
|
27
|
+
id: 'components-drawer',
|
|
30
28
|
parameters: {
|
|
31
29
|
controls: { disable: true },
|
|
32
30
|
},
|
|
31
|
+
tags: ['docsPage'],
|
|
32
|
+
title: 'Components/Drawer',
|
|
33
33
|
};
|
|
34
34
|
export default componentMeta;
|
|
35
35
|
export const Overlay = {
|
|
36
36
|
args: {},
|
|
37
|
-
render: () => _jsx(DrawerOverlay, {}),
|
|
38
37
|
parameters: {
|
|
39
38
|
docs: {
|
|
40
39
|
source: {
|
|
40
|
+
code: DrawerOverlaySrc,
|
|
41
41
|
language: 'tsx',
|
|
42
42
|
type: 'code',
|
|
43
|
-
code: DrawerOverlaySrc,
|
|
44
43
|
},
|
|
45
44
|
},
|
|
46
45
|
},
|
|
46
|
+
render: () => _jsx(DrawerOverlay, {}),
|
|
47
47
|
};
|
|
48
48
|
export const Push = {
|
|
49
49
|
args: {},
|
|
50
|
-
render: () => _jsx(DrawerPush, {}),
|
|
51
50
|
parameters: {
|
|
52
51
|
docs: {
|
|
53
52
|
source: {
|
|
53
|
+
code: DrawerPushSrc,
|
|
54
54
|
language: 'tsx',
|
|
55
55
|
type: 'code',
|
|
56
|
-
code: DrawerPushSrc,
|
|
57
56
|
},
|
|
58
57
|
},
|
|
59
58
|
},
|
|
59
|
+
render: () => _jsx(DrawerPush, {}),
|
|
60
60
|
};
|
|
61
61
|
export const RightSide = {
|
|
62
62
|
args: {},
|
|
63
|
-
render: () => _jsx(DrawerRightSide, {}),
|
|
64
63
|
parameters: {
|
|
65
64
|
docs: {
|
|
66
65
|
source: {
|
|
66
|
+
code: DrawerRightSideSrc,
|
|
67
67
|
language: 'tsx',
|
|
68
68
|
type: 'code',
|
|
69
|
-
code: DrawerRightSideSrc,
|
|
70
69
|
},
|
|
71
70
|
},
|
|
72
71
|
},
|
|
72
|
+
render: () => _jsx(DrawerRightSide, {}),
|
|
73
73
|
};
|
|
74
74
|
export const Resizable = {
|
|
75
75
|
args: {},
|
|
76
|
-
render: () => _jsx(DrawerResizable, {}),
|
|
77
76
|
parameters: {
|
|
78
77
|
docs: {
|
|
79
78
|
source: {
|
|
79
|
+
code: DrawerResizableSrc,
|
|
80
80
|
language: 'tsx',
|
|
81
81
|
type: 'code',
|
|
82
|
-
code: DrawerResizableSrc,
|
|
83
82
|
},
|
|
84
83
|
},
|
|
85
84
|
},
|
|
85
|
+
render: () => _jsx(DrawerResizable, {}),
|
|
86
86
|
};
|
|
87
87
|
export const NotCloseable = {
|
|
88
88
|
args: {},
|
|
89
|
-
render: () => _jsx(DrawerNotCloseable, {}),
|
|
90
89
|
parameters: {
|
|
91
90
|
docs: {
|
|
92
91
|
source: {
|
|
92
|
+
code: DrawerNotCloseableSrc,
|
|
93
93
|
language: 'tsx',
|
|
94
94
|
type: 'code',
|
|
95
|
-
code: DrawerNotCloseableSrc,
|
|
96
95
|
},
|
|
97
96
|
},
|
|
98
97
|
},
|
|
98
|
+
render: () => _jsx(DrawerNotCloseable, {}),
|
|
99
99
|
};
|
|
100
100
|
export const Scrollable = {
|
|
101
101
|
args: {},
|
|
102
|
-
render: () => _jsx(DrawerScrollable, {}),
|
|
103
102
|
parameters: {
|
|
104
103
|
docs: {
|
|
105
104
|
source: {
|
|
105
|
+
code: DrawerScrollableSrc,
|
|
106
106
|
language: 'tsx',
|
|
107
107
|
type: 'code',
|
|
108
|
-
code: DrawerScrollableSrc,
|
|
109
108
|
},
|
|
110
109
|
},
|
|
111
110
|
},
|
|
111
|
+
render: () => _jsx(DrawerScrollable, {}),
|
|
112
112
|
};
|
|
113
113
|
export const Portaled = {
|
|
114
114
|
args: {},
|
|
115
|
-
render: () => _jsx(DrawerPortaled, {}),
|
|
116
115
|
parameters: {
|
|
117
116
|
docs: {
|
|
118
117
|
source: {
|
|
118
|
+
code: DrawerPortaledSrc,
|
|
119
119
|
language: 'tsx',
|
|
120
120
|
type: 'code',
|
|
121
|
-
code: DrawerPortaledSrc,
|
|
122
121
|
},
|
|
123
122
|
},
|
|
124
123
|
},
|
|
124
|
+
render: () => _jsx(DrawerPortaled, {}),
|
|
125
125
|
};
|
|
126
126
|
export const Full = {
|
|
127
127
|
args: {},
|
|
128
|
-
render: () => _jsx(DrawerFull, {}),
|
|
129
128
|
parameters: {
|
|
130
129
|
docs: {
|
|
131
130
|
source: {
|
|
131
|
+
code: DrawerFullSrc,
|
|
132
132
|
language: 'tsx',
|
|
133
133
|
type: 'code',
|
|
134
|
-
code: DrawerFullSrc,
|
|
135
134
|
},
|
|
136
135
|
},
|
|
137
136
|
},
|
|
137
|
+
render: () => _jsx(DrawerFull, {}),
|
|
138
138
|
};
|
|
139
139
|
//# sourceMappingURL=drawer.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.stories.js","sourceRoot":"","sources":["../../../../src/drawer/stories/drawer.stories.tsx"],"names":[],"mappings":";AAsBA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EACL,UAAU,EACV,aAAa,EACb,kBAAkB,EAClB,qBAAqB,EACrB,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,SAAS,CAAC;AAEjB,MAAM,aAAa,GAA8C;IAC/D,
|
|
1
|
+
{"version":3,"file":"drawer.stories.js","sourceRoot":"","sources":["../../../../src/drawer/stories/drawer.stories.tsx"],"names":[],"mappings":";AAsBA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EACL,UAAU,EACV,aAAa,EACb,kBAAkB,EAClB,qBAAqB,EACrB,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,SAAS,CAAC;AAEjB,MAAM,aAAa,GAA8C;IAC/D,SAAS,EAAE,MAAM;IACjB,EAAE,EAAE,mBAAmB;IACvB,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,mBAAmB;CAC3B,CAAC;AAEF,eAAe,aAAa,CAAC;AAI7B,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5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;KACF;IACD,MAAM,EAAE,GAAG,EAAE,CAAC,KAAC,kBAAkB,KAAG;CACrC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAU;IAC/B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,mBAAmB;gBACzB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,GAAG,EAAE,CAAC,KAAC,gBAAgB,KAAG;CACnC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,iBAAiB;gBACvB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,GAAG,EAAE,CAAC,KAAC,cAAc,KAAG;CACjC,CAAC;AACF,MAAM,CAAC,MAAM,IAAI,GAAU;IACzB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,aAAa;gBACnB,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,GAAG,EAAE,CAAC,KAAC,UAAU,KAAG;CAC7B,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { type Meta, type StoryObj } from '@storybook/react-vite';\n\nimport { Drawer } from '../../index';\nimport {\n DrawerFull,\n DrawerFullSrc,\n DrawerNotCloseable,\n DrawerNotCloseableSrc,\n DrawerOverlay,\n DrawerOverlaySrc,\n DrawerPortaled,\n DrawerPortaledSrc,\n DrawerPush,\n DrawerPushSrc,\n DrawerResizable,\n DrawerResizableSrc,\n DrawerRightSide,\n DrawerRightSideSrc,\n DrawerScrollable,\n DrawerScrollableSrc,\n} from './index';\n\nconst componentMeta: Meta<React.ComponentProps<typeof Drawer>> = {\n component: Drawer,\n id: 'components-drawer',\n parameters: {\n controls: { disable: true },\n },\n tags: ['docsPage'],\n title: 'Components/Drawer',\n};\n\nexport default componentMeta;\n\ntype Story = StoryObj<typeof componentMeta>;\n\nexport const Overlay: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DrawerOverlaySrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: () => <DrawerOverlay />,\n};\nexport const Push: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DrawerPushSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: () => <DrawerPush />,\n};\n\nexport const RightSide: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DrawerRightSideSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: () => <DrawerRightSide />,\n};\n\nexport const Resizable: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DrawerResizableSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: () => <DrawerResizable />,\n};\n\nexport const NotCloseable: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DrawerNotCloseableSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: () => <DrawerNotCloseable />,\n};\n\nexport const Scrollable: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DrawerScrollableSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: () => <DrawerScrollable />,\n};\n\nexport const Portaled: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DrawerPortaledSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: () => <DrawerPortaled />,\n};\nexport const Full: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: DrawerFullSrc,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: () => <DrawerFull />,\n};\n"]}
|
|
@@ -23,94 +23,94 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
23
23
|
import { DropdownButton } from '../../index';
|
|
24
24
|
import { DropdownButtonDefault, DropdownButtonDefaultSource, DropdownButtonDisabled, DropdownButtonDisabledSource, DropdownButtonFloating, DropdownButtonFloatingSource, DropdownButtonWithAvatar, DropdownButtonWithAvatarSource, DropdownButtonWithMenu, DropdownButtonWithMenuSource, DropdownButtonWithStatusIndicator, DropdownButtonWithStatusIndicatorSource, } from '.';
|
|
25
25
|
const componentMeta = {
|
|
26
|
-
title: 'Components/DropdownButton',
|
|
27
|
-
id: 'components-buttons-dropdown-button',
|
|
28
26
|
component: DropdownButton,
|
|
29
|
-
tags: ['docsPage'],
|
|
30
|
-
parameters: {
|
|
31
|
-
controls: { disable: true },
|
|
32
|
-
},
|
|
33
27
|
decorators: [
|
|
34
28
|
(Story) => (_jsx("div", { className: "n-flex n-justify-center", children: _jsx(Story, {}) })),
|
|
35
29
|
],
|
|
30
|
+
id: 'components-buttons-dropdown-button',
|
|
31
|
+
parameters: {
|
|
32
|
+
controls: { disable: true },
|
|
33
|
+
},
|
|
34
|
+
tags: ['docsPage'],
|
|
35
|
+
title: 'Components/DropdownButton',
|
|
36
36
|
};
|
|
37
37
|
export default componentMeta;
|
|
38
38
|
export const Default = {
|
|
39
39
|
args: {},
|
|
40
|
-
render: DropdownButtonDefault,
|
|
41
40
|
parameters: {
|
|
42
41
|
docs: {
|
|
43
42
|
source: {
|
|
43
|
+
code: DropdownButtonDefaultSource,
|
|
44
44
|
language: 'tsx',
|
|
45
45
|
type: 'code',
|
|
46
|
-
code: DropdownButtonDefaultSource,
|
|
47
46
|
},
|
|
48
47
|
},
|
|
49
48
|
},
|
|
49
|
+
render: DropdownButtonDefault,
|
|
50
50
|
};
|
|
51
51
|
export const WithAvatar = {
|
|
52
52
|
args: {},
|
|
53
|
-
render: DropdownButtonWithAvatar,
|
|
54
53
|
parameters: {
|
|
55
54
|
docs: {
|
|
56
55
|
source: {
|
|
56
|
+
code: DropdownButtonWithAvatarSource,
|
|
57
57
|
language: 'tsx',
|
|
58
58
|
type: 'code',
|
|
59
|
-
code: DropdownButtonWithAvatarSource,
|
|
60
59
|
},
|
|
61
60
|
},
|
|
62
61
|
},
|
|
62
|
+
render: DropdownButtonWithAvatar,
|
|
63
63
|
};
|
|
64
64
|
export const WithStatusIndicator = {
|
|
65
65
|
args: {},
|
|
66
|
-
render: DropdownButtonWithStatusIndicator,
|
|
67
66
|
parameters: {
|
|
68
67
|
docs: {
|
|
69
68
|
source: {
|
|
69
|
+
code: DropdownButtonWithStatusIndicatorSource,
|
|
70
70
|
language: 'tsx',
|
|
71
71
|
type: 'code',
|
|
72
|
-
code: DropdownButtonWithStatusIndicatorSource,
|
|
73
72
|
},
|
|
74
73
|
},
|
|
75
74
|
},
|
|
75
|
+
render: DropdownButtonWithStatusIndicator,
|
|
76
76
|
};
|
|
77
77
|
export const Disabled = {
|
|
78
78
|
args: {},
|
|
79
|
-
render: DropdownButtonDisabled,
|
|
80
79
|
parameters: {
|
|
81
80
|
docs: {
|
|
82
81
|
source: {
|
|
82
|
+
code: DropdownButtonDisabledSource,
|
|
83
83
|
language: 'tsx',
|
|
84
84
|
type: 'code',
|
|
85
|
-
code: DropdownButtonDisabledSource,
|
|
86
85
|
},
|
|
87
86
|
},
|
|
88
87
|
},
|
|
88
|
+
render: DropdownButtonDisabled,
|
|
89
89
|
};
|
|
90
90
|
export const Floating = {
|
|
91
91
|
args: {},
|
|
92
|
-
render: DropdownButtonFloating,
|
|
93
92
|
parameters: {
|
|
94
93
|
docs: {
|
|
95
94
|
source: {
|
|
95
|
+
code: DropdownButtonFloatingSource,
|
|
96
96
|
language: 'tsx',
|
|
97
97
|
type: 'code',
|
|
98
|
-
code: DropdownButtonFloatingSource,
|
|
99
98
|
},
|
|
100
99
|
},
|
|
101
100
|
},
|
|
101
|
+
render: DropdownButtonFloating,
|
|
102
102
|
};
|
|
103
103
|
export const WithMenu = {
|
|
104
104
|
args: {},
|
|
105
|
-
render: DropdownButtonWithMenu,
|
|
106
105
|
parameters: {
|
|
107
106
|
docs: {
|
|
108
107
|
source: {
|
|
108
|
+
code: DropdownButtonWithMenuSource,
|
|
109
109
|
language: 'tsx',
|
|
110
110
|
type: 'code',
|
|
111
|
-
code: DropdownButtonWithMenuSource,
|
|
112
111
|
},
|
|
113
112
|
},
|
|
114
113
|
},
|
|
114
|
+
render: DropdownButtonWithMenu,
|
|
115
115
|
};
|
|
116
116
|
//# sourceMappingURL=dropdown-button.stories.js.map
|