@neo4j-ndl/react 3.8.34 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/avatar/stories/avatar-shapes.story.js +1 -1
- package/lib/cjs/avatar/stories/avatar-shapes.story.js.map +1 -1
- package/lib/cjs/avatar/stories/avatar-sizes.story.js +1 -1
- package/lib/cjs/avatar/stories/avatar-sizes.story.js.map +1 -1
- package/lib/cjs/avatar/stories/avatar-statuses.story.js +1 -1
- package/lib/cjs/avatar/stories/avatar-statuses.story.js.map +1 -1
- package/lib/cjs/avatar/stories/avatar-types.story.js +1 -1
- package/lib/cjs/avatar/stories/avatar-types.story.js.map +1 -1
- package/lib/cjs/avatar/stories/avatar.stories.js +12 -1
- package/lib/cjs/avatar/stories/avatar.stories.js.map +1 -1
- package/lib/cjs/callout/stories/callout-default.story.js +30 -0
- package/lib/cjs/callout/stories/callout-default.story.js.map +1 -0
- package/lib/cjs/callout/stories/callout-full.story.js +30 -0
- package/lib/cjs/callout/stories/callout-full.story.js.map +1 -0
- package/lib/cjs/callout/stories/callout-types.story.js +30 -0
- package/lib/cjs/callout/stories/callout-types.story.js.map +1 -0
- package/lib/cjs/callout/stories/callout-with-children.story.js +30 -0
- package/lib/cjs/callout/stories/callout-with-children.story.js.map +1 -0
- package/lib/cjs/callout/stories/callout-without-header.story.js +30 -0
- package/lib/cjs/callout/stories/callout-without-header.story.js.map +1 -0
- package/lib/cjs/callout/stories/callout.stories.js +101 -0
- package/lib/cjs/callout/stories/callout.stories.js.map +1 -0
- package/lib/cjs/callout/stories/index.js +48 -0
- package/lib/cjs/callout/stories/index.js.map +1 -0
- package/lib/cjs/checkbox/stories/checkbox-checkedByDefault.story.js +30 -0
- package/lib/cjs/checkbox/stories/checkbox-checkedByDefault.story.js.map +1 -0
- package/lib/cjs/checkbox/stories/checkbox-default.story.js +30 -0
- package/lib/cjs/checkbox/stories/checkbox-default.story.js.map +1 -0
- package/lib/cjs/checkbox/stories/checkbox-disabled.story.js +30 -0
- package/lib/cjs/checkbox/stories/checkbox-disabled.story.js.map +1 -0
- package/lib/cjs/checkbox/stories/checkbox-full.story.js +39 -0
- package/lib/cjs/checkbox/stories/checkbox-full.story.js.map +1 -0
- package/lib/cjs/checkbox/stories/checkbox-hasLabelBefore.story.js +30 -0
- package/lib/cjs/checkbox/stories/checkbox-hasLabelBefore.story.js.map +1 -0
- package/lib/cjs/checkbox/stories/checkbox-indeterminate.story.js +33 -0
- package/lib/cjs/checkbox/stories/checkbox-indeterminate.story.js.map +1 -0
- package/lib/cjs/checkbox/stories/checkbox-no-label.story.js +30 -0
- package/lib/cjs/checkbox/stories/checkbox-no-label.story.js.map +1 -0
- package/lib/cjs/checkbox/stories/checkbox.stories.js +137 -0
- package/lib/cjs/checkbox/stories/checkbox.stories.js.map +1 -0
- package/lib/cjs/checkbox/stories/index.js +56 -0
- package/lib/cjs/checkbox/stories/index.js.map +1 -0
- package/lib/cjs/context-menu/ContextMenu.js +1 -1
- package/lib/cjs/context-menu/stories/context-menu-custom-items.story.js +33 -0
- package/lib/cjs/context-menu/stories/context-menu-custom-items.story.js.map +1 -0
- package/lib/cjs/context-menu/stories/context-menu-default.story.js +45 -0
- package/lib/cjs/context-menu/stories/context-menu-default.story.js.map +1 -0
- package/lib/cjs/context-menu/stories/context-menu-in-modal.story.js +38 -0
- package/lib/cjs/context-menu/stories/context-menu-in-modal.story.js.map +1 -0
- package/lib/cjs/context-menu/stories/context-menu-in-popover.story.js +34 -0
- package/lib/cjs/context-menu/stories/context-menu-in-popover.story.js.map +1 -0
- package/lib/cjs/context-menu/stories/context-menu-nested.story.js +34 -0
- package/lib/cjs/context-menu/stories/context-menu-nested.story.js.map +1 -0
- package/lib/cjs/context-menu/stories/context-menu-placements.story.js +45 -0
- package/lib/cjs/context-menu/stories/context-menu-placements.story.js.map +1 -0
- package/lib/cjs/context-menu/stories/context-menu-with-disabled-item.story.js +36 -0
- package/lib/cjs/context-menu/stories/context-menu-with-disabled-item.story.js.map +1 -0
- package/lib/cjs/context-menu/stories/context-menu-with-divider.story.js +36 -0
- package/lib/cjs/context-menu/stories/context-menu-with-divider.story.js.map +1 -0
- package/lib/cjs/context-menu/stories/context-menu-with-header.story.js +36 -0
- package/lib/cjs/context-menu/stories/context-menu-with-header.story.js.map +1 -0
- package/lib/cjs/context-menu/stories/context-menu-with-icon.story.js +34 -0
- package/lib/cjs/context-menu/stories/context-menu-with-icon.story.js.map +1 -0
- package/lib/cjs/context-menu/stories/context-menu.stories.js +170 -0
- package/lib/cjs/context-menu/stories/context-menu.stories.js.map +1 -0
- package/lib/cjs/context-menu/stories/index.js +68 -0
- package/lib/cjs/context-menu/stories/index.js.map +1 -0
- package/lib/cjs/drawer/stories/drawer-full.story.js +36 -0
- package/lib/cjs/drawer/stories/drawer-full.story.js.map +1 -0
- package/lib/cjs/drawer/stories/drawer-not-closeable.story.js +33 -0
- package/lib/cjs/drawer/stories/drawer-not-closeable.story.js.map +1 -0
- package/lib/cjs/drawer/stories/drawer-overlay.story.js +33 -0
- package/lib/cjs/drawer/stories/drawer-overlay.story.js.map +1 -0
- package/lib/cjs/drawer/stories/drawer-portaled.story.js +38 -0
- package/lib/cjs/drawer/stories/drawer-portaled.story.js.map +1 -0
- package/lib/cjs/drawer/stories/drawer-push.story.js +32 -0
- package/lib/cjs/drawer/stories/drawer-push.story.js.map +1 -0
- package/lib/cjs/drawer/stories/drawer-resizable.story.js +36 -0
- package/lib/cjs/drawer/stories/drawer-resizable.story.js.map +1 -0
- package/lib/cjs/drawer/stories/drawer-right-side.story.js +33 -0
- package/lib/cjs/drawer/stories/drawer-right-side.story.js.map +1 -0
- package/lib/cjs/drawer/stories/drawer-scrollable.story.js +33 -0
- package/lib/cjs/drawer/stories/drawer-scrollable.story.js.map +1 -0
- package/lib/cjs/drawer/stories/drawer.stories.js +150 -0
- package/lib/cjs/drawer/stories/drawer.stories.js.map +1 -0
- package/lib/cjs/drawer/stories/index.js +60 -0
- package/lib/cjs/drawer/stories/index.js.map +1 -0
- package/lib/cjs/graph-label/stories/graph-label-color.story.js +30 -0
- package/lib/cjs/graph-label/stories/graph-label-color.story.js.map +1 -0
- package/lib/cjs/graph-label/stories/graph-label-disabled.story.js +30 -0
- package/lib/cjs/graph-label/stories/graph-label-disabled.story.js.map +1 -0
- package/lib/cjs/graph-label/stories/graph-label-fluid.story.js +30 -0
- package/lib/cjs/graph-label/stories/graph-label-fluid.story.js.map +1 -0
- package/lib/cjs/graph-label/stories/graph-label-non-interactive.story.js +30 -0
- package/lib/cjs/graph-label/stories/graph-label-non-interactive.story.js.map +1 -0
- package/lib/cjs/graph-label/stories/graph-label-selected.story.js +30 -0
- package/lib/cjs/graph-label/stories/graph-label-selected.story.js.map +1 -0
- package/lib/cjs/graph-label/stories/graph-label-sizes.story.js +30 -0
- package/lib/cjs/graph-label/stories/graph-label-sizes.story.js.map +1 -0
- package/lib/cjs/graph-label/stories/graph-label-types.story.js +30 -0
- package/lib/cjs/graph-label/stories/graph-label-types.story.js.map +1 -0
- package/lib/cjs/graph-label/stories/graph-label.stories.js +132 -0
- package/lib/cjs/graph-label/stories/graph-label.stories.js.map +1 -0
- package/lib/cjs/graph-label/stories/index.js +56 -0
- package/lib/cjs/graph-label/stories/index.js.map +1 -0
- package/lib/cjs/label/stories/index.js +44 -0
- package/lib/cjs/label/stories/index.js.map +1 -0
- package/lib/cjs/label/stories/label-colors.story.js +30 -0
- package/lib/cjs/label/stories/label-colors.story.js.map +1 -0
- package/lib/cjs/label/stories/label-default.story.js +30 -0
- package/lib/cjs/label/stories/label-default.story.js.map +1 -0
- package/lib/cjs/label/stories/label-fills.story.js +30 -0
- package/lib/cjs/label/stories/label-fills.story.js.map +1 -0
- package/lib/cjs/label/stories/label-with-icons.story.js +30 -0
- package/lib/cjs/label/stories/label-with-icons.story.js.map +1 -0
- package/lib/cjs/label/stories/label.stories.js +93 -0
- package/lib/cjs/label/stories/label.stories.js.map +1 -0
- package/lib/cjs/loading-bar/stories/index.js +36 -0
- package/lib/cjs/loading-bar/stories/index.js.map +1 -0
- package/lib/cjs/loading-bar/stories/loading-bar-default.story.js +30 -0
- package/lib/cjs/loading-bar/stories/loading-bar-default.story.js.map +1 -0
- package/lib/cjs/loading-bar/stories/loading-bar-with-rail.story.js +30 -0
- package/lib/cjs/loading-bar/stories/loading-bar-with-rail.story.js.map +1 -0
- package/lib/cjs/loading-bar/stories/loading-bar.stories.js +67 -0
- package/lib/cjs/loading-bar/stories/loading-bar.stories.js.map +1 -0
- package/lib/cjs/loading-spinner/stories/index.js +36 -0
- package/lib/cjs/loading-spinner/stories/index.js.map +1 -0
- package/lib/cjs/loading-spinner/stories/loading-spinner-default.story.js +30 -0
- package/lib/cjs/loading-spinner/stories/loading-spinner-default.story.js.map +1 -0
- package/lib/cjs/loading-spinner/stories/loading-spinner-sizes.story.js +30 -0
- package/lib/cjs/loading-spinner/stories/loading-spinner-sizes.story.js.map +1 -0
- package/lib/cjs/loading-spinner/stories/loading-spinner.stories.js +67 -0
- package/lib/cjs/loading-spinner/stories/loading-spinner.stories.js.map +1 -0
- package/lib/cjs/segmented-control/stories/index.js +44 -0
- package/lib/cjs/segmented-control/stories/index.js.map +1 -0
- package/lib/cjs/segmented-control/stories/segmented-control-default.story.js +32 -0
- package/lib/cjs/segmented-control/stories/segmented-control-default.story.js.map +1 -0
- package/lib/cjs/segmented-control/stories/segmented-control-floating.story.js +32 -0
- package/lib/cjs/segmented-control/stories/segmented-control-floating.story.js.map +1 -0
- package/lib/cjs/segmented-control/stories/segmented-control-only-icons.story.js +33 -0
- package/lib/cjs/segmented-control/stories/segmented-control-only-icons.story.js.map +1 -0
- package/lib/cjs/segmented-control/stories/segmented-control-sizes.story.js +33 -0
- package/lib/cjs/segmented-control/stories/segmented-control-sizes.story.js.map +1 -0
- package/lib/cjs/segmented-control/stories/segmented-control.stories.js +93 -0
- package/lib/cjs/segmented-control/stories/segmented-control.stories.js.map +1 -0
- package/lib/cjs/slider/stories/index.js +25 -5
- package/lib/cjs/slider/stories/index.js.map +1 -1
- package/lib/cjs/slider/stories/slider-custom-step-length.story.js +31 -0
- package/lib/cjs/slider/stories/slider-custom-step-length.story.js.map +1 -0
- package/lib/cjs/slider/stories/slider-default.story.js +31 -0
- package/lib/cjs/slider/stories/slider-default.story.js.map +1 -0
- package/lib/cjs/slider/stories/slider-disabled.story.js +31 -0
- package/lib/cjs/slider/stories/slider-disabled.story.js.map +1 -0
- package/lib/cjs/slider/stories/slider-range.story.js +2 -2
- package/lib/cjs/slider/stories/slider-range.story.js.map +1 -1
- package/lib/cjs/slider/stories/slider-show-steps.story.js +31 -0
- package/lib/cjs/slider/stories/slider-show-steps.story.js.map +1 -0
- package/lib/cjs/slider/stories/slider-show-values.story.js +31 -0
- package/lib/cjs/slider/stories/slider-show-values.story.js.map +1 -0
- package/lib/cjs/slider/stories/slider-single-controlled.story.js +49 -6
- package/lib/cjs/slider/stories/slider-single-controlled.story.js.map +1 -1
- package/lib/cjs/slider/stories/slider-single.story.js +2 -2
- package/lib/cjs/slider/stories/slider-single.story.js.map +1 -1
- package/lib/cjs/slider/stories/slider.stories.js +76 -7
- package/lib/cjs/slider/stories/slider.stories.js.map +1 -1
- package/lib/cjs/status-indicator/stories/index.js +32 -0
- package/lib/cjs/status-indicator/stories/index.js.map +1 -0
- package/lib/cjs/status-indicator/stories/status-indicator-types.story.js +30 -0
- package/lib/cjs/status-indicator/stories/status-indicator-types.story.js.map +1 -0
- package/lib/cjs/status-indicator/stories/status-indicator.stories.js +54 -0
- package/lib/cjs/status-indicator/stories/status-indicator.stories.js.map +1 -0
- package/lib/cjs/toast/Toast.js +5 -1
- package/lib/cjs/toast/Toast.js.map +1 -1
- package/lib/cjs/toast/ToastControlled.js +87 -0
- package/lib/cjs/toast/ToastControlled.js.map +1 -0
- package/lib/cjs/toast/index.js +1 -0
- package/lib/cjs/toast/index.js.map +1 -1
- package/lib/cjs/toast/stories/index.js +60 -0
- package/lib/cjs/toast/stories/index.js.map +1 -0
- package/lib/cjs/toast/stories/toast-action-story.js +38 -0
- package/lib/cjs/toast/stories/toast-action-story.js.map +1 -0
- package/lib/cjs/toast/stories/toast-closeable-story.js +37 -0
- package/lib/cjs/toast/stories/toast-closeable-story.js.map +1 -0
- package/lib/cjs/toast/stories/toast-controlled-story.js +44 -0
- package/lib/cjs/toast/stories/toast-controlled-story.js.map +1 -0
- package/lib/cjs/toast/stories/toast-custom-story.js +32 -0
- package/lib/cjs/toast/stories/toast-custom-story.js.map +1 -0
- package/lib/cjs/toast/stories/toast-danger-story.js +32 -0
- package/lib/cjs/toast/stories/toast-danger-story.js.map +1 -0
- package/lib/cjs/toast/stories/toast-neutral-story.js +32 -0
- package/lib/cjs/toast/stories/toast-neutral-story.js.map +1 -0
- package/lib/cjs/toast/stories/toast-progress-bar.js +49 -0
- package/lib/cjs/toast/stories/toast-progress-bar.js.map +1 -0
- package/lib/cjs/toast/stories/toast-success-story.js +32 -0
- package/lib/cjs/toast/stories/toast-success-story.js.map +1 -0
- package/lib/cjs/toast/stories/toast.stories.js +137 -0
- package/lib/cjs/toast/stories/toast.stories.js.map +1 -0
- package/lib/esm/avatar/stories/avatar-shapes.story.js +1 -1
- package/lib/esm/avatar/stories/avatar-shapes.story.js.map +1 -1
- package/lib/esm/avatar/stories/avatar-sizes.story.js +1 -1
- package/lib/esm/avatar/stories/avatar-sizes.story.js.map +1 -1
- package/lib/esm/avatar/stories/avatar-statuses.story.js +1 -1
- package/lib/esm/avatar/stories/avatar-statuses.story.js.map +1 -1
- package/lib/esm/avatar/stories/avatar-types.story.js +1 -1
- package/lib/esm/avatar/stories/avatar-types.story.js.map +1 -1
- package/lib/esm/avatar/stories/avatar.stories.js +11 -0
- package/lib/esm/avatar/stories/avatar.stories.js.map +1 -1
- package/lib/esm/callout/stories/callout-default.story.js +28 -0
- package/lib/esm/callout/stories/callout-default.story.js.map +1 -0
- package/lib/esm/callout/stories/callout-full.story.js +28 -0
- package/lib/esm/callout/stories/callout-full.story.js.map +1 -0
- package/lib/esm/callout/stories/callout-types.story.js +28 -0
- package/lib/esm/callout/stories/callout-types.story.js.map +1 -0
- package/lib/esm/callout/stories/callout-with-children.story.js +28 -0
- package/lib/esm/callout/stories/callout-with-children.story.js.map +1 -0
- package/lib/esm/callout/stories/callout-without-header.story.js +28 -0
- package/lib/esm/callout/stories/callout-without-header.story.js.map +1 -0
- package/lib/esm/callout/stories/callout.stories.js +98 -0
- package/lib/esm/callout/stories/callout.stories.js.map +1 -0
- package/lib/esm/callout/stories/index.js +37 -0
- package/lib/esm/callout/stories/index.js.map +1 -0
- package/lib/esm/checkbox/stories/checkbox-checkedByDefault.story.js +28 -0
- package/lib/esm/checkbox/stories/checkbox-checkedByDefault.story.js.map +1 -0
- package/lib/esm/checkbox/stories/checkbox-default.story.js +28 -0
- package/lib/esm/checkbox/stories/checkbox-default.story.js.map +1 -0
- package/lib/esm/checkbox/stories/checkbox-disabled.story.js +28 -0
- package/lib/esm/checkbox/stories/checkbox-disabled.story.js.map +1 -0
- package/lib/esm/checkbox/stories/checkbox-full.story.js +37 -0
- package/lib/esm/checkbox/stories/checkbox-full.story.js.map +1 -0
- package/lib/esm/checkbox/stories/checkbox-hasLabelBefore.story.js +28 -0
- package/lib/esm/checkbox/stories/checkbox-hasLabelBefore.story.js.map +1 -0
- package/lib/esm/checkbox/stories/checkbox-indeterminate.story.js +31 -0
- package/lib/esm/checkbox/stories/checkbox-indeterminate.story.js.map +1 -0
- package/lib/esm/checkbox/stories/checkbox-no-label.story.js +28 -0
- package/lib/esm/checkbox/stories/checkbox-no-label.story.js.map +1 -0
- package/lib/esm/checkbox/stories/checkbox.stories.js +134 -0
- package/lib/esm/checkbox/stories/checkbox.stories.js.map +1 -0
- package/lib/esm/checkbox/stories/index.js +43 -0
- package/lib/esm/checkbox/stories/index.js.map +1 -0
- package/lib/esm/context-menu/ContextMenu.js +1 -1
- package/lib/esm/context-menu/stories/context-menu-custom-items.story.js +31 -0
- package/lib/esm/context-menu/stories/context-menu-custom-items.story.js.map +1 -0
- package/lib/esm/context-menu/stories/context-menu-default.story.js +43 -0
- package/lib/esm/context-menu/stories/context-menu-default.story.js.map +1 -0
- package/lib/esm/context-menu/stories/context-menu-in-modal.story.js +36 -0
- package/lib/esm/context-menu/stories/context-menu-in-modal.story.js.map +1 -0
- package/lib/esm/context-menu/stories/context-menu-in-popover.story.js +32 -0
- package/lib/esm/context-menu/stories/context-menu-in-popover.story.js.map +1 -0
- package/lib/esm/context-menu/stories/context-menu-nested.story.js +32 -0
- package/lib/esm/context-menu/stories/context-menu-nested.story.js.map +1 -0
- package/lib/esm/context-menu/stories/context-menu-placements.story.js +43 -0
- package/lib/esm/context-menu/stories/context-menu-placements.story.js.map +1 -0
- package/lib/esm/context-menu/stories/context-menu-with-disabled-item.story.js +34 -0
- package/lib/esm/context-menu/stories/context-menu-with-disabled-item.story.js.map +1 -0
- package/lib/esm/context-menu/stories/context-menu-with-divider.story.js +34 -0
- package/lib/esm/context-menu/stories/context-menu-with-divider.story.js.map +1 -0
- package/lib/esm/context-menu/stories/context-menu-with-header.story.js +34 -0
- package/lib/esm/context-menu/stories/context-menu-with-header.story.js.map +1 -0
- package/lib/esm/context-menu/stories/context-menu-with-icon.story.js +32 -0
- package/lib/esm/context-menu/stories/context-menu-with-icon.story.js.map +1 -0
- package/lib/esm/context-menu/stories/context-menu.stories.js +167 -0
- package/lib/esm/context-menu/stories/context-menu.stories.js.map +1 -0
- package/lib/esm/context-menu/stories/index.js +52 -0
- package/lib/esm/context-menu/stories/index.js.map +1 -0
- package/lib/esm/drawer/stories/drawer-full.story.js +34 -0
- package/lib/esm/drawer/stories/drawer-full.story.js.map +1 -0
- package/lib/esm/drawer/stories/drawer-not-closeable.story.js +31 -0
- package/lib/esm/drawer/stories/drawer-not-closeable.story.js.map +1 -0
- package/lib/esm/drawer/stories/drawer-overlay.story.js +31 -0
- package/lib/esm/drawer/stories/drawer-overlay.story.js.map +1 -0
- package/lib/esm/drawer/stories/drawer-portaled.story.js +36 -0
- package/lib/esm/drawer/stories/drawer-portaled.story.js.map +1 -0
- package/lib/esm/drawer/stories/drawer-push.story.js +30 -0
- package/lib/esm/drawer/stories/drawer-push.story.js.map +1 -0
- package/lib/esm/drawer/stories/drawer-resizable.story.js +34 -0
- package/lib/esm/drawer/stories/drawer-resizable.story.js.map +1 -0
- package/lib/esm/drawer/stories/drawer-right-side.story.js +31 -0
- package/lib/esm/drawer/stories/drawer-right-side.story.js.map +1 -0
- package/lib/esm/drawer/stories/drawer-scrollable.story.js +31 -0
- package/lib/esm/drawer/stories/drawer-scrollable.story.js.map +1 -0
- package/lib/esm/drawer/stories/drawer.stories.js +147 -0
- package/lib/esm/drawer/stories/drawer.stories.js.map +1 -0
- package/lib/esm/drawer/stories/index.js +46 -0
- package/lib/esm/drawer/stories/index.js.map +1 -0
- package/lib/esm/graph-label/stories/graph-label-color.story.js +28 -0
- package/lib/esm/graph-label/stories/graph-label-color.story.js.map +1 -0
- package/lib/esm/graph-label/stories/graph-label-disabled.story.js +28 -0
- package/lib/esm/graph-label/stories/graph-label-disabled.story.js.map +1 -0
- package/lib/esm/graph-label/stories/graph-label-fluid.story.js +28 -0
- package/lib/esm/graph-label/stories/graph-label-fluid.story.js.map +1 -0
- package/lib/esm/graph-label/stories/graph-label-non-interactive.story.js +28 -0
- package/lib/esm/graph-label/stories/graph-label-non-interactive.story.js.map +1 -0
- package/lib/esm/graph-label/stories/graph-label-selected.story.js +28 -0
- package/lib/esm/graph-label/stories/graph-label-selected.story.js.map +1 -0
- package/lib/esm/graph-label/stories/graph-label-sizes.story.js +28 -0
- package/lib/esm/graph-label/stories/graph-label-sizes.story.js.map +1 -0
- package/lib/esm/graph-label/stories/graph-label-types.story.js +28 -0
- package/lib/esm/graph-label/stories/graph-label-types.story.js.map +1 -0
- package/lib/esm/graph-label/stories/graph-label.stories.js +129 -0
- package/lib/esm/graph-label/stories/graph-label.stories.js.map +1 -0
- package/lib/esm/graph-label/stories/index.js +43 -0
- package/lib/esm/graph-label/stories/index.js.map +1 -0
- package/lib/esm/label/stories/index.js +34 -0
- package/lib/esm/label/stories/index.js.map +1 -0
- package/lib/esm/label/stories/label-colors.story.js +28 -0
- package/lib/esm/label/stories/label-colors.story.js.map +1 -0
- package/lib/esm/label/stories/label-default.story.js +28 -0
- package/lib/esm/label/stories/label-default.story.js.map +1 -0
- package/lib/esm/label/stories/label-fills.story.js +28 -0
- package/lib/esm/label/stories/label-fills.story.js.map +1 -0
- package/lib/esm/label/stories/label-with-icons.story.js +28 -0
- package/lib/esm/label/stories/label-with-icons.story.js.map +1 -0
- package/lib/esm/label/stories/label.stories.js +90 -0
- package/lib/esm/label/stories/label.stories.js.map +1 -0
- package/lib/esm/loading-bar/stories/index.js +28 -0
- package/lib/esm/loading-bar/stories/index.js.map +1 -0
- package/lib/esm/loading-bar/stories/loading-bar-default.story.js +28 -0
- package/lib/esm/loading-bar/stories/loading-bar-default.story.js.map +1 -0
- package/lib/esm/loading-bar/stories/loading-bar-with-rail.story.js +28 -0
- package/lib/esm/loading-bar/stories/loading-bar-with-rail.story.js.map +1 -0
- package/lib/esm/loading-bar/stories/loading-bar.stories.js +64 -0
- package/lib/esm/loading-bar/stories/loading-bar.stories.js.map +1 -0
- package/lib/esm/loading-spinner/stories/index.js +28 -0
- package/lib/esm/loading-spinner/stories/index.js.map +1 -0
- package/lib/esm/loading-spinner/stories/loading-spinner-default.story.js +28 -0
- package/lib/esm/loading-spinner/stories/loading-spinner-default.story.js.map +1 -0
- package/lib/esm/loading-spinner/stories/loading-spinner-sizes.story.js +28 -0
- package/lib/esm/loading-spinner/stories/loading-spinner-sizes.story.js.map +1 -0
- package/lib/esm/loading-spinner/stories/loading-spinner.stories.js +64 -0
- package/lib/esm/loading-spinner/stories/loading-spinner.stories.js.map +1 -0
- package/lib/esm/segmented-control/stories/index.js +34 -0
- package/lib/esm/segmented-control/stories/index.js.map +1 -0
- package/lib/esm/segmented-control/stories/segmented-control-default.story.js +30 -0
- package/lib/esm/segmented-control/stories/segmented-control-default.story.js.map +1 -0
- package/lib/esm/segmented-control/stories/segmented-control-floating.story.js +30 -0
- package/lib/esm/segmented-control/stories/segmented-control-floating.story.js.map +1 -0
- package/lib/esm/segmented-control/stories/segmented-control-only-icons.story.js +31 -0
- package/lib/esm/segmented-control/stories/segmented-control-only-icons.story.js.map +1 -0
- package/lib/esm/segmented-control/stories/segmented-control-sizes.story.js +31 -0
- package/lib/esm/segmented-control/stories/segmented-control-sizes.story.js.map +1 -0
- package/lib/esm/segmented-control/stories/segmented-control.stories.js +90 -0
- package/lib/esm/segmented-control/stories/segmented-control.stories.js.map +1 -0
- package/lib/esm/slider/stories/index.js +15 -0
- package/lib/esm/slider/stories/index.js.map +1 -1
- package/lib/esm/slider/stories/slider-custom-step-length.story.js +29 -0
- package/lib/esm/slider/stories/slider-custom-step-length.story.js.map +1 -0
- package/lib/esm/slider/stories/slider-default.story.js +29 -0
- package/lib/esm/slider/stories/slider-default.story.js.map +1 -0
- package/lib/esm/slider/stories/slider-disabled.story.js +29 -0
- package/lib/esm/slider/stories/slider-disabled.story.js.map +1 -0
- package/lib/esm/slider/stories/slider-range.story.js +1 -1
- package/lib/esm/slider/stories/slider-range.story.js.map +1 -1
- package/lib/esm/slider/stories/slider-show-steps.story.js +29 -0
- package/lib/esm/slider/stories/slider-show-steps.story.js.map +1 -0
- package/lib/esm/slider/stories/slider-show-values.story.js +29 -0
- package/lib/esm/slider/stories/slider-show-values.story.js.map +1 -0
- package/lib/esm/slider/stories/slider-single-controlled.story.js +50 -7
- package/lib/esm/slider/stories/slider-single-controlled.story.js.map +1 -1
- package/lib/esm/slider/stories/slider-single.story.js +1 -1
- package/lib/esm/slider/stories/slider-single.story.js.map +1 -1
- package/lib/esm/slider/stories/slider.stories.js +73 -4
- package/lib/esm/slider/stories/slider.stories.js.map +1 -1
- package/lib/esm/status-indicator/stories/index.js +25 -0
- package/lib/esm/status-indicator/stories/index.js.map +1 -0
- package/lib/esm/status-indicator/stories/status-indicator-types.story.js +28 -0
- package/lib/esm/status-indicator/stories/status-indicator-types.story.js.map +1 -0
- package/lib/esm/status-indicator/stories/status-indicator.stories.js +51 -0
- package/lib/esm/status-indicator/stories/status-indicator.stories.js.map +1 -0
- package/lib/esm/toast/Toast.js +5 -1
- package/lib/esm/toast/Toast.js.map +1 -1
- package/lib/esm/toast/ToastControlled.js +83 -0
- package/lib/esm/toast/ToastControlled.js.map +1 -0
- package/lib/esm/toast/index.js +1 -0
- package/lib/esm/toast/index.js.map +1 -1
- package/lib/esm/toast/stories/index.js +46 -0
- package/lib/esm/toast/stories/index.js.map +1 -0
- package/lib/esm/toast/stories/toast-action-story.js +36 -0
- package/lib/esm/toast/stories/toast-action-story.js.map +1 -0
- package/lib/esm/toast/stories/toast-closeable-story.js +35 -0
- package/lib/esm/toast/stories/toast-closeable-story.js.map +1 -0
- package/lib/esm/toast/stories/toast-controlled-story.js +42 -0
- package/lib/esm/toast/stories/toast-controlled-story.js.map +1 -0
- package/lib/esm/toast/stories/toast-custom-story.js +30 -0
- package/lib/esm/toast/stories/toast-custom-story.js.map +1 -0
- package/lib/esm/toast/stories/toast-danger-story.js +30 -0
- package/lib/esm/toast/stories/toast-danger-story.js.map +1 -0
- package/lib/esm/toast/stories/toast-neutral-story.js +30 -0
- package/lib/esm/toast/stories/toast-neutral-story.js.map +1 -0
- package/lib/esm/toast/stories/toast-progress-bar.js +47 -0
- package/lib/esm/toast/stories/toast-progress-bar.js.map +1 -0
- package/lib/esm/toast/stories/toast-success-story.js +30 -0
- package/lib/esm/toast/stories/toast-success-story.js.map +1 -0
- package/lib/esm/toast/stories/toast.stories.js +134 -0
- package/lib/esm/toast/stories/toast.stories.js.map +1 -0
- package/lib/types/avatar/stories/avatar.stories.d.ts +3 -12
- package/lib/types/callout/stories/callout-default.story.d.ts +23 -0
- package/lib/types/callout/stories/callout-full.story.d.ts +23 -0
- package/lib/types/callout/stories/callout-types.story.d.ts +23 -0
- package/lib/types/callout/stories/callout-with-children.story.d.ts +23 -0
- package/lib/types/callout/stories/callout-without-header.story.d.ts +23 -0
- package/lib/types/callout/stories/callout.stories.d.ts +39 -0
- package/lib/types/callout/stories/index.d.ts +30 -0
- package/lib/types/checkbox/stories/checkbox-checkedByDefault.story.d.ts +23 -0
- package/lib/types/checkbox/stories/checkbox-default.story.d.ts +23 -0
- package/lib/types/checkbox/stories/checkbox-disabled.story.d.ts +23 -0
- package/lib/types/checkbox/stories/checkbox-full.story.d.ts +23 -0
- package/lib/types/checkbox/stories/checkbox-hasLabelBefore.story.d.ts +23 -0
- package/lib/types/checkbox/stories/checkbox-indeterminate.story.d.ts +23 -0
- package/lib/types/checkbox/stories/checkbox-no-label.story.d.ts +23 -0
- package/lib/types/checkbox/stories/checkbox.stories.d.ts +32 -0
- package/lib/types/checkbox/stories/index.d.ts +34 -0
- package/lib/types/context-menu/stories/context-menu-custom-items.story.d.ts +23 -0
- package/lib/types/context-menu/stories/context-menu-default.story.d.ts +23 -0
- package/lib/types/context-menu/stories/context-menu-in-modal.story.d.ts +23 -0
- package/lib/types/context-menu/stories/context-menu-in-popover.story.d.ts +23 -0
- package/lib/types/context-menu/stories/context-menu-nested.story.d.ts +23 -0
- package/lib/types/context-menu/stories/context-menu-placements.story.d.ts +23 -0
- package/lib/types/context-menu/stories/context-menu-with-disabled-item.story.d.ts +23 -0
- package/lib/types/context-menu/stories/context-menu-with-divider.story.d.ts +23 -0
- package/lib/types/context-menu/stories/context-menu-with-header.story.d.ts +23 -0
- package/lib/types/context-menu/stories/context-menu-with-icon.story.d.ts +23 -0
- package/lib/types/context-menu/stories/context-menu.stories.d.ts +34 -0
- package/lib/types/context-menu/stories/index.d.ts +40 -0
- package/lib/types/drawer/stories/drawer-full.story.d.ts +23 -0
- package/lib/types/drawer/stories/drawer-not-closeable.story.d.ts +23 -0
- package/lib/types/drawer/stories/drawer-overlay.story.d.ts +23 -0
- package/lib/types/drawer/stories/drawer-portaled.story.d.ts +23 -0
- package/lib/types/drawer/stories/drawer-push.story.d.ts +22 -0
- package/lib/types/drawer/stories/drawer-resizable.story.d.ts +23 -0
- package/lib/types/drawer/stories/drawer-right-side.story.d.ts +23 -0
- package/lib/types/drawer/stories/drawer-scrollable.story.d.ts +23 -0
- package/lib/types/drawer/stories/drawer.stories.d.ts +62 -0
- package/lib/types/drawer/stories/index.d.ts +36 -0
- package/lib/types/graph-label/stories/graph-label-color.story.d.ts +23 -0
- package/lib/types/graph-label/stories/graph-label-disabled.story.d.ts +23 -0
- package/lib/types/graph-label/stories/graph-label-fluid.story.d.ts +23 -0
- package/lib/types/graph-label/stories/graph-label-non-interactive.story.d.ts +23 -0
- package/lib/types/graph-label/stories/graph-label-selected.story.d.ts +23 -0
- package/lib/types/graph-label/stories/graph-label-sizes.story.d.ts +23 -0
- package/lib/types/graph-label/stories/graph-label-types.story.d.ts +23 -0
- package/lib/types/graph-label/stories/graph-label.stories.d.ts +32 -0
- package/lib/types/graph-label/stories/index.d.ts +34 -0
- package/lib/types/label/stories/index.d.ts +28 -0
- package/lib/types/label/stories/label-colors.story.d.ts +23 -0
- package/lib/types/label/stories/label-default.story.d.ts +23 -0
- package/lib/types/label/stories/label-fills.story.d.ts +23 -0
- package/lib/types/label/stories/label-with-icons.story.d.ts +23 -0
- package/lib/types/label/stories/label.stories.d.ts +29 -0
- package/lib/types/loading-bar/stories/index.d.ts +24 -0
- package/lib/types/loading-bar/stories/loading-bar-default.story.d.ts +23 -0
- package/lib/types/loading-bar/stories/loading-bar-with-rail.story.d.ts +23 -0
- package/lib/types/loading-bar/stories/loading-bar.stories.d.ts +27 -0
- package/lib/types/loading-spinner/stories/index.d.ts +24 -0
- package/lib/types/loading-spinner/stories/loading-spinner-default.story.d.ts +23 -0
- package/lib/types/loading-spinner/stories/loading-spinner-sizes.story.d.ts +23 -0
- package/lib/types/loading-spinner/stories/loading-spinner.stories.d.ts +27 -0
- package/lib/types/segmented-control/stories/index.d.ts +28 -0
- package/lib/types/segmented-control/stories/segmented-control-default.story.d.ts +23 -0
- package/lib/types/segmented-control/stories/segmented-control-floating.story.d.ts +23 -0
- package/lib/types/segmented-control/stories/segmented-control-only-icons.story.d.ts +23 -0
- package/lib/types/segmented-control/stories/segmented-control-sizes.story.d.ts +23 -0
- package/lib/types/segmented-control/stories/segmented-control.stories.d.ts +29 -0
- package/lib/types/slider/stories/index.d.ts +10 -0
- package/lib/types/slider/stories/slider-custom-step-length.story.d.ts +23 -0
- package/lib/types/slider/stories/slider-default.story.d.ts +23 -0
- package/lib/types/slider/stories/slider-disabled.story.d.ts +23 -0
- package/lib/types/slider/stories/slider-show-steps.story.d.ts +23 -0
- package/lib/types/slider/stories/slider-show-values.story.d.ts +23 -0
- package/lib/types/slider/stories/slider-single.story.d.ts +1 -0
- package/lib/types/slider/stories/slider.stories.d.ts +7 -1
- package/lib/types/status-indicator/stories/index.d.ts +22 -0
- package/lib/types/status-indicator/stories/status-indicator-types.story.d.ts +23 -0
- package/lib/types/status-indicator/stories/status-indicator.stories.d.ts +26 -0
- package/lib/types/toast/Toast.d.ts +9 -1
- package/lib/types/toast/ToastControlled.d.ts +40 -0
- package/lib/types/toast/index.d.ts +1 -0
- package/lib/types/toast/stories/index.d.ts +36 -0
- package/lib/types/toast/stories/toast-action-story.d.ts +23 -0
- package/lib/types/toast/stories/toast-closeable-story.d.ts +23 -0
- package/lib/types/toast/stories/toast-controlled-story.d.ts +23 -0
- package/lib/types/toast/stories/toast-custom-story.d.ts +23 -0
- package/lib/types/toast/stories/toast-danger-story.d.ts +23 -0
- package/lib/types/toast/stories/toast-neutral-story.d.ts +23 -0
- package/lib/types/toast/stories/toast-progress-bar.d.ts +23 -0
- package/lib/types/toast/stories/toast-success-story.d.ts +23 -0
- package/lib/types/toast/stories/toast.stories.d.ts +38 -0
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
/**
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) "Neo4j"
|
|
@@ -19,13 +19,56 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
19
19
|
* You should have received a copy of the GNU General Public License
|
|
20
20
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
21
|
*/
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
22
|
+
import { Slider, TextInput } from '@neo4j-ndl/react';
|
|
23
|
+
import { useCallback, useState } from 'react';
|
|
24
|
+
const MIN_VALUE = 0;
|
|
25
|
+
const MAX_VALUE = 100;
|
|
26
|
+
const STEP = 5;
|
|
27
|
+
const INITIAL_VALUE = 50;
|
|
28
|
+
const getValidationError = (input) => {
|
|
29
|
+
const trimmed = input.trim();
|
|
30
|
+
if (!trimmed) {
|
|
31
|
+
return { error: 'Value is required', isValid: false };
|
|
32
|
+
}
|
|
33
|
+
const numValue = Number(trimmed);
|
|
34
|
+
if (isNaN(numValue)) {
|
|
35
|
+
return { error: 'Please enter a valid number', isValid: false };
|
|
36
|
+
}
|
|
37
|
+
if (!Number.isInteger(numValue)) {
|
|
38
|
+
return { error: 'Please enter a whole number', isValid: false };
|
|
39
|
+
}
|
|
40
|
+
if (numValue < MIN_VALUE) {
|
|
41
|
+
return { error: `Value must be at least ${MIN_VALUE}`, isValid: false };
|
|
42
|
+
}
|
|
43
|
+
if (numValue > MAX_VALUE) {
|
|
44
|
+
return { error: `Value must be at most ${MAX_VALUE}`, isValid: false };
|
|
45
|
+
}
|
|
46
|
+
return { error: undefined, isValid: true };
|
|
47
|
+
};
|
|
24
48
|
const Component = () => {
|
|
25
|
-
const [value, setValue] = useState(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
49
|
+
const [value, setValue] = useState(INITIAL_VALUE);
|
|
50
|
+
const [inputValue, setInputValue] = useState(String(INITIAL_VALUE));
|
|
51
|
+
const { error, isValid } = getValidationError(inputValue);
|
|
52
|
+
const hasError = !isValid;
|
|
53
|
+
const handleInputChange = useCallback((e) => {
|
|
54
|
+
const newInputValue = e.target.value;
|
|
55
|
+
setInputValue(newInputValue);
|
|
56
|
+
if (isValid) {
|
|
57
|
+
setValue(Number(newInputValue));
|
|
58
|
+
}
|
|
59
|
+
}, [setInputValue, setValue, isValid]);
|
|
60
|
+
const handleSliderChange = useCallback((newValue) => {
|
|
61
|
+
setValue(newValue);
|
|
62
|
+
setInputValue(String(newValue));
|
|
63
|
+
}, [setInputValue, setValue]);
|
|
64
|
+
return (_jsxs("div", { className: "n-flex n-flex-col n-gap-token-6", children: [_jsx(TextInput, { label: "Slider value", helpText: `Enter a value between ${MIN_VALUE} and ${MAX_VALUE}`, isRequired: true, errorText: error, htmlAttributes: {
|
|
65
|
+
max: MAX_VALUE,
|
|
66
|
+
min: MIN_VALUE,
|
|
67
|
+
step: STEP,
|
|
68
|
+
type: 'number',
|
|
69
|
+
}, value: inputValue, onChange: handleInputChange }), _jsx(Slider, { type: "single", value: value, onChange: handleSliderChange, minValue: MIN_VALUE, maxValue: MAX_VALUE, step: STEP, showSteps: true, showValues: true, isDisabled: hasError, inputProps: {
|
|
70
|
+
'aria-valuetext': `${value} out of ${MAX_VALUE}`,
|
|
71
|
+
} })] }));
|
|
29
72
|
};
|
|
30
73
|
export default Component;
|
|
31
74
|
//# sourceMappingURL=slider-single-controlled.story.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slider-single-controlled.story.js","sourceRoot":"","sources":["../../../../src/slider/stories/slider-single-controlled.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"slider-single-controlled.story.js","sourceRoot":"","sources":["../../../../src/slider/stories/slider-single-controlled.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;A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,QAAQ,EAAE,kBAAkB,EAC5B,QAAQ,EAAE,SAAS,EACnB,QAAQ,EAAE,SAAS,EACnB,IAAI,EAAE,IAAI,EACV,SAAS,QACT,UAAU,QACV,UAAU,EAAE,QAAQ,EACpB,UAAU,EAAE;oBACV,gBAAgB,EAAE,GAAG,KAAK,WAAW,SAAS,EAAE;iBACjD,GACD,IACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -19,7 +19,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
19
19
|
* You should have received a copy of the GNU General Public License
|
|
20
20
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
21
|
*/
|
|
22
|
-
import { Slider } from '
|
|
22
|
+
import { Slider } from '@neo4j-ndl/react';
|
|
23
23
|
const Component = () => {
|
|
24
24
|
return (_jsx(Slider, { type: "single", value: 100, onChange: (newValue) => {
|
|
25
25
|
console.info('onChange', newValue);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slider-single.story.js","sourceRoot":"","sources":["../../../../src/slider/stories/slider-single.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;
|
|
1
|
+
{"version":3,"file":"slider-single.story.js","sourceRoot":"","sources":["../../../../src/slider/stories/slider-single.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,MAAM,IACL,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,GAAG,EACV,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE;YACrB,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QACrC,CAAC,EACD,QAAQ,EAAE,CAAC,EACX,QAAQ,EAAE,GAAG,EACb,UAAU,EAAE,KAAK,EACjB,IAAI,EAAE,EAAE,EACR,SAAS,EAAE,IAAI,EACf,UAAU,EAAE,IAAI,EAChB,UAAU,EAAE,EAAE,gBAAgB,EAAE,SAAS,EAAE,GAC3C,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
/**
|
|
2
3
|
*
|
|
3
4
|
* Copyright (c) "Neo4j"
|
|
@@ -18,10 +19,8 @@
|
|
|
18
19
|
* You should have received a copy of the GNU General Public License
|
|
19
20
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
21
|
*/
|
|
21
|
-
|
|
22
|
-
import {
|
|
23
|
-
import { Slider } from '../Slider';
|
|
24
|
-
import { SliderRangeDemo, SliderRangeSource, SliderSingleControlledDemo, SliderSingleControlledSource, SliderSingleDemo, SliderSingleSource, } from '.';
|
|
22
|
+
import { Slider } from '@neo4j-ndl/react';
|
|
23
|
+
import { SliderCustomStepLengthDemo, SliderCustomStepLengthSource, SliderDefaultDemo, SliderDefaultSource, SliderDisabledDemo, SliderDisabledSource, SliderRangeDemo, SliderRangeSource, SliderShowStepsDemo, SliderShowStepsSource, SliderShowValuesDemo, SliderShowValuesSource, SliderSingleControlledDemo, SliderSingleControlledSource, SliderSingleDemo, SliderSingleSource, } from '.';
|
|
25
24
|
const componentMeta = {
|
|
26
25
|
component: Slider,
|
|
27
26
|
parameters: {
|
|
@@ -32,6 +31,20 @@ const componentMeta = {
|
|
|
32
31
|
id: 'components-slider',
|
|
33
32
|
};
|
|
34
33
|
export default componentMeta;
|
|
34
|
+
export const Default = {
|
|
35
|
+
// @ts-expect-error The args from the full story are not actually used but we get a type issue here
|
|
36
|
+
args: {},
|
|
37
|
+
parameters: {
|
|
38
|
+
docs: {
|
|
39
|
+
source: {
|
|
40
|
+
code: SliderDefaultSource,
|
|
41
|
+
language: 'tsx',
|
|
42
|
+
type: 'code',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
render: () => _jsx(SliderDefaultDemo, {}),
|
|
47
|
+
};
|
|
35
48
|
export const Single = {
|
|
36
49
|
// @ts-expect-error The args from the full story are not actually used but we get a type issue here
|
|
37
50
|
args: {},
|
|
@@ -74,4 +87,60 @@ export const SingleControlled = {
|
|
|
74
87
|
},
|
|
75
88
|
render: () => _jsx(SliderSingleControlledDemo, {}),
|
|
76
89
|
};
|
|
90
|
+
export const Disabled = {
|
|
91
|
+
// @ts-expect-error The args from the full story are not actually used but we get a type issue here
|
|
92
|
+
args: {},
|
|
93
|
+
parameters: {
|
|
94
|
+
docs: {
|
|
95
|
+
source: {
|
|
96
|
+
code: SliderDisabledSource,
|
|
97
|
+
language: 'tsx',
|
|
98
|
+
type: 'code',
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
render: () => _jsx(SliderDisabledDemo, {}),
|
|
103
|
+
};
|
|
104
|
+
export const ShowSteps = {
|
|
105
|
+
// @ts-expect-error The args from the full story are not actually used but we get a type issue here
|
|
106
|
+
args: {},
|
|
107
|
+
parameters: {
|
|
108
|
+
docs: {
|
|
109
|
+
source: {
|
|
110
|
+
code: SliderShowStepsSource,
|
|
111
|
+
language: 'tsx',
|
|
112
|
+
type: 'code',
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
render: () => _jsx(SliderShowStepsDemo, {}),
|
|
117
|
+
};
|
|
118
|
+
export const ShowValues = {
|
|
119
|
+
// @ts-expect-error The args from the full story are not actually used but we get a type issue here
|
|
120
|
+
args: {},
|
|
121
|
+
parameters: {
|
|
122
|
+
docs: {
|
|
123
|
+
source: {
|
|
124
|
+
code: SliderShowValuesSource,
|
|
125
|
+
language: 'tsx',
|
|
126
|
+
type: 'code',
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
render: () => _jsx(SliderShowValuesDemo, {}),
|
|
131
|
+
};
|
|
132
|
+
export const CustomStepLength = {
|
|
133
|
+
// @ts-expect-error The args from the full story are not actually used but we get a type issue here
|
|
134
|
+
args: {},
|
|
135
|
+
parameters: {
|
|
136
|
+
docs: {
|
|
137
|
+
source: {
|
|
138
|
+
code: SliderCustomStepLengthSource,
|
|
139
|
+
language: 'tsx',
|
|
140
|
+
type: 'code',
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
render: () => _jsx(SliderCustomStepLengthDemo, {}),
|
|
145
|
+
};
|
|
77
146
|
//# sourceMappingURL=slider.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slider.stories.js","sourceRoot":"","sources":["../../../../src/slider/stories/slider.stories.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"slider.stories.js","sourceRoot":"","sources":["../../../../src/slider/stories/slider.stories.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAG1C,OAAO,EACL,0BAA0B,EAC1B,4BAA4B,EAC5B,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,0BAA0B,EAC1B,4BAA4B,EAC5B,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,GAAG,CAAC;AAEX,MAAM,aAAa,GAAG;IACpB,SAAS,EAAE,MAAM;IACjB,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,mBAAmB;IAC1B,EAAE,EAAE,mBAAmB;CACM,CAAC;AAEhC,eAAe,aAAa,CAAC;AAG7B,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,mGAAmG;IACnG,IAAI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AAoB;gBAC1B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,GAAG,EAAE,CAAC,KAAC,kBAAkB,KAAG;CACrC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAU;IAC9B,mGAAmG;IACnG,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,qBAAqB;gBAC3B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,GAAG,EAAE,CAAC,KAAC,mBAAmB,KAAG;CACtC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAU;IAC/B,mGAAmG;IACnG,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,sBAAsB;gBAC5B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,GAAG,EAAE,CAAC,KAAC,oBAAoB,KAAG;CACvC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAU;IACrC,mGAAmG;IACnG,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,4BAA4B;gBAClC,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,GAAG,EAAE,CAAC,KAAC,0BAA0B,KAAG;CAC7C,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
export { default as StatusIndicatorTypes } from './status-indicator-types.story';
|
|
22
|
+
import { removeLicenseHeader } from '@neo4j-ndl/react/_common/export-stories-utils';
|
|
23
|
+
import StatusIndicatorTypesSourceRaw from './status-indicator-types.story?raw';
|
|
24
|
+
export const StatusIndicatorTypesSource = removeLicenseHeader(StatusIndicatorTypesSourceRaw);
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/status-indicator/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAEjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAEpF,OAAO,6BAA6B,MAAM,oCAAoC,CAAC;AAE/E,MAAM,CAAC,MAAM,0BAA0B,GAAG,mBAAmB,CAC3D,6BAA6B,CAC9B,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
|
+
import { StatusIndicator, Typography } from '@neo4j-ndl/react';
|
|
24
|
+
const Component = () => {
|
|
25
|
+
return (_jsxs("div", { className: "n-flex n-gap-token-6", children: [_jsxs("div", { className: "n-flex n-flex-col n-items-center n-gap-token-4", children: [_jsx(StatusIndicator, { type: "unknown" }), _jsx(Typography, { variant: "label", children: "Unknown" })] }), _jsxs("div", { className: "n-flex n-flex-col n-items-center n-gap-token-4", children: [_jsx(StatusIndicator, { type: "success" }), _jsx(Typography, { variant: "label", children: "Success" })] }), _jsxs("div", { className: "n-flex n-flex-col n-items-center n-gap-token-4", children: [_jsx(StatusIndicator, { type: "info" }), _jsx(Typography, { variant: "label", children: "Info" })] }), _jsxs("div", { className: "n-flex n-flex-col n-items-center n-gap-token-4", children: [_jsx(StatusIndicator, { type: "warning" }), _jsx(Typography, { variant: "label", children: "Warning" })] }), _jsxs("div", { className: "n-flex n-flex-col n-items-center n-gap-token-4 ", children: [_jsx(StatusIndicator, { type: "danger" }), _jsx(Typography, { variant: "label", children: "Danger" })] })] }));
|
|
26
|
+
};
|
|
27
|
+
export default Component;
|
|
28
|
+
//# sourceMappingURL=status-indicator-types.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-indicator-types.story.js","sourceRoot":"","sources":["../../../../src/status-indicator/stories/status-indicator-types.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE/D,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,eAAK,SAAS,EAAC,sBAAsB,aACnC,eAAK,SAAS,EAAC,gDAAgD,aAC7D,KAAC,eAAe,IAAC,IAAI,EAAC,SAAS,GAAG,EAClC,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,wBAAqB,IAC5C,EACN,eAAK,SAAS,EAAC,gDAAgD,aAC7D,KAAC,eAAe,IAAC,IAAI,EAAC,SAAS,GAAG,EAClC,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,wBAAqB,IAC5C,EACN,eAAK,SAAS,EAAC,gDAAgD,aAC7D,KAAC,eAAe,IAAC,IAAI,EAAC,MAAM,GAAG,EAC/B,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,qBAAkB,IACzC,EACN,eAAK,SAAS,EAAC,gDAAgD,aAC7D,KAAC,eAAe,IAAC,IAAI,EAAC,SAAS,GAAG,EAClC,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,wBAAqB,IAC5C,EACN,eAAK,SAAS,EAAC,mDAAmD,aAChE,KAAC,eAAe,IAAC,IAAI,EAAC,QAAQ,GAAG,EACjC,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,uBAAoB,IAC3C,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
|
+
import { StatusIndicator } from '../../index';
|
|
24
|
+
import { StatusIndicatorTypes, StatusIndicatorTypesSource } from '.';
|
|
25
|
+
const componentMeta = {
|
|
26
|
+
title: 'Components/Status Indicator',
|
|
27
|
+
id: 'components-status-indicator',
|
|
28
|
+
component: StatusIndicator,
|
|
29
|
+
tags: ['docsPage'],
|
|
30
|
+
parameters: {
|
|
31
|
+
controls: { disable: true },
|
|
32
|
+
},
|
|
33
|
+
decorators: [
|
|
34
|
+
(Story) => (_jsx("div", { className: "n-flex n-justify-center", children: _jsx(Story, {}) })),
|
|
35
|
+
],
|
|
36
|
+
};
|
|
37
|
+
export default componentMeta;
|
|
38
|
+
export const Types = {
|
|
39
|
+
args: {},
|
|
40
|
+
render: StatusIndicatorTypes,
|
|
41
|
+
parameters: {
|
|
42
|
+
docs: {
|
|
43
|
+
source: {
|
|
44
|
+
language: 'tsx',
|
|
45
|
+
type: 'code',
|
|
46
|
+
code: StatusIndicatorTypesSource,
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=status-indicator.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-indicator.stories.js","sourceRoot":"","sources":["../../../../src/status-indicator/stories/status-indicator.stories.tsx"],"names":[],"mappings":";AAuBA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,GAAG,CAAC;AAErE,MAAM,aAAa,GAAiC;IAClD,KAAK,EAAE,6BAA6B;IACpC,EAAE,EAAE,6BAA6B;IACjC,SAAS,EAAE,eAAe;IAC1B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,EAAE,CAAC,CACT,cAAK,SAAS,EAAC,yBAAyB,YACtC,KAAC,KAAK,KAAG,GACL,CACP;KACF;CACF,CAAC;AAEF,eAAe,aAAa,CAAC;AAG7B,MAAM,CAAC,MAAM,KAAK,GAAU;IAC1B,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,oBAAoB;IAC5B,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,0BAA0B;aACjC;SACF;KACF;CACF,CAAC"}
|
package/lib/esm/toast/Toast.js
CHANGED
|
@@ -50,9 +50,13 @@ function onCloseCallback(callback, id) {
|
|
|
50
50
|
delete sonnerToast.needle[id];
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
const Toast = React.forwardRef(function Toast({ icon, id, text, variant, isCloseable, onClose, actionLabel, onAction, shouldCloseOnAction, initialProgressBarValue, htmlAttributes, }, ref) {
|
|
53
|
+
const Toast = React.forwardRef(function Toast({ icon, id, text, variant, isCloseable, onClose, actionLabel, onAction, shouldCloseOnAction, initialProgressBarValue, isControlled, htmlAttributes, }, ref) {
|
|
54
54
|
const isProgressBar = variant === 'progress-bar';
|
|
55
55
|
const handleOnClose = (event) => {
|
|
56
|
+
if (isControlled) {
|
|
57
|
+
onCloseCallback(onClose, id);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
56
60
|
const shouldTrigger = (event.type === 'keydown' &&
|
|
57
61
|
event.key === 'Enter') ||
|
|
58
62
|
event.key === 'Space' ||
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.js","sourceRoot":"","sources":["../../../src/toast/Toast.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,KAAyB,MAAM,OAAO,CAAC;AAC9C,OAAO,EAEL,KAAK,IAAI,WAAW,EACpB,OAAO,IAAI,aAAa,GAGzB,MAAM,QAAQ,CAAC;AAEhB,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC1B,gBAAgB,GACjB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"Toast.js","sourceRoot":"","sources":["../../../src/toast/Toast.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,KAAyB,MAAM,OAAO,CAAC;AAC9C,OAAO,EAEL,KAAK,IAAI,WAAW,EACpB,OAAO,IAAI,aAAa,GAGzB,MAAM,QAAQ,CAAC;AAEhB,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,g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6BAA6B,CACZ,CAAC;QACpB,2BAA2B,CAAC,YAAY,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QACzD,MAAM,kBAAkB,GAAG,2BAA2B,CAAC,aAAa,CAClE,mBAAmB,CACF,CAAC;QAEpB,IAAI,CAAC,2BAA2B;YAAE,OAAO;QAEzC,kBAAkB,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IAC5D,CAAC;IACD,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE;;QACZ,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACxB,eAAe,CAAC,MAAC,WAAiC,CAAC,MAAM,CAAC,EAAE,CAAC,0CAAE,OAAO,EAAE,EAAE,CAAC,CAAC;IAC9E,CAAC;IACD,WAAW,EAAE,gDAAgD;CAC9D,CAAC;AAEF,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* Copyright (c) "Neo4j"
|
|
16
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
17
|
+
*
|
|
18
|
+
* This file is part of Neo4j.
|
|
19
|
+
*
|
|
20
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
21
|
+
* it under the terms of the GNU General Public License as published by
|
|
22
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
23
|
+
* (at your option) any later version.
|
|
24
|
+
*
|
|
25
|
+
* This program is distributed in the hope that it will be useful,
|
|
26
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
27
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
28
|
+
* GNU General Public License for more details.
|
|
29
|
+
*
|
|
30
|
+
* You should have received a copy of the GNU General Public License
|
|
31
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
32
|
+
*/
|
|
33
|
+
import { useEffect, useState } from 'react';
|
|
34
|
+
import { toast, Toaster } from './Toast';
|
|
35
|
+
const toastWithVariant = (input) => {
|
|
36
|
+
const commonRootProps = {
|
|
37
|
+
actionLabel: input.actionLabel,
|
|
38
|
+
isCloseable: input.onClose !== undefined,
|
|
39
|
+
isControlled: true,
|
|
40
|
+
onAction(id) {
|
|
41
|
+
var _a;
|
|
42
|
+
(_a = input.onAction) === null || _a === void 0 ? void 0 : _a.call(input, id);
|
|
43
|
+
},
|
|
44
|
+
onClose(id) {
|
|
45
|
+
var _a;
|
|
46
|
+
(_a = input.onClose) === null || _a === void 0 ? void 0 : _a.call(input, id);
|
|
47
|
+
},
|
|
48
|
+
shouldAutoClose: false,
|
|
49
|
+
shouldCloseOnAction: false,
|
|
50
|
+
};
|
|
51
|
+
const commonSonnerProps = {
|
|
52
|
+
dismissible: false,
|
|
53
|
+
id: input.id,
|
|
54
|
+
};
|
|
55
|
+
switch (input.variant) {
|
|
56
|
+
case 'neutral':
|
|
57
|
+
return toast.neutral(input.text, Object.assign(Object.assign({}, commonRootProps), { sonnerToastProps: commonSonnerProps }));
|
|
58
|
+
case 'success':
|
|
59
|
+
return toast.success(input.text, Object.assign(Object.assign({}, commonRootProps), { sonnerToastProps: commonSonnerProps }));
|
|
60
|
+
case 'danger':
|
|
61
|
+
return toast.danger(input.text, Object.assign(Object.assign({}, commonRootProps), { sonnerToastProps: commonSonnerProps }));
|
|
62
|
+
case 'progress-bar':
|
|
63
|
+
return toast.progressBar(input.text, Object.assign(Object.assign({}, commonRootProps), { sonnerToastProps: commonSonnerProps, initialProgressBarValue: input.progressBarValue }));
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
export const ToasterControlled = (_a) => {
|
|
67
|
+
var { toasts } = _a, restProps = __rest(_a, ["toasts"]);
|
|
68
|
+
const [toastsState, setToastsState] = useState([]);
|
|
69
|
+
useEffect(() => {
|
|
70
|
+
// if a toast is removed, close it
|
|
71
|
+
const removedToasts = toastsState.filter((toast) => !toasts.some((t) => t.id === toast.id));
|
|
72
|
+
removedToasts.forEach((removedToast) => {
|
|
73
|
+
toast.close(removedToast.id);
|
|
74
|
+
});
|
|
75
|
+
// Otherwise, update the toast or create a new one
|
|
76
|
+
for (const toast of toasts) {
|
|
77
|
+
toastWithVariant(toast);
|
|
78
|
+
}
|
|
79
|
+
setToastsState(toasts);
|
|
80
|
+
}, [toasts, toastsState]);
|
|
81
|
+
return _jsx(Toaster, Object.assign({ visibleToasts: 1 }, restProps));
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=ToastControlled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToastControlled.js","sourceRoot":"","sources":["../../../src/toast/ToastControlled.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAG5C,OAAO,EAAE,KAAK,EAAE,OAAO,EAAoC,MAAM,SAAS,CAAC;AAsB3E,MAAM,gBAAgB,GAAG,CAAC,KAAsB,EAAE,EAAE;IAClD,MAAM,eAAe,GAAG;QACtB,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,WAAW,EAAE,KAAK,CAAC,OAAO,KAAK,SAAS;QACxC,YAAY,EAA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AAa,GAAG,WAAW,CAAC,MAAM,CACtC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,KAAK,CAAC,EAAE,CAAC,CAClD,CAAC;QACF,aAAa,CAAC,OAAO,CAAC,CAAC,YAAY,EAAE,EAAE;YACrC,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;QAC/B,CAAC,CAAC,CAAC;QAEH,kDAAkD;QAClD,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,gBAAgB,CAAC,KAAK,CAAC,CAAC;QAC1B,CAAC;QAED,cAAc,CAAC,MAAM,CAAC,CAAC;IACzB,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;IAE1B,OAAO,KAAC,OAAO,kBAAC,aAAa,EAAE,CAAC,IAAM,SAAS,EAAI,CAAC;AACtD,CAAC,CAAC"}
|
package/lib/esm/toast/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/toast/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/toast/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
export { default as ToastNeutral } from './toast-neutral-story';
|
|
22
|
+
export { default as ToastSuccess } from './toast-success-story';
|
|
23
|
+
export { default as ToastDanger } from './toast-danger-story';
|
|
24
|
+
export { default as ToastAction } from './toast-action-story';
|
|
25
|
+
export { default as ToastCloseable } from './toast-closeable-story';
|
|
26
|
+
export { default as ToastProgressBar } from './toast-progress-bar';
|
|
27
|
+
export { default as ToastCustom } from './toast-custom-story';
|
|
28
|
+
export { default as ToastControlled } from './toast-controlled-story';
|
|
29
|
+
import { removeLicenseHeader } from '@neo4j-ndl/react/_common/export-stories-utils';
|
|
30
|
+
import ToastActionSrcRaw from './toast-action-story?raw';
|
|
31
|
+
import ToastCloseableSrcRaw from './toast-closeable-story?raw';
|
|
32
|
+
import ToastControlledSrcRaw from './toast-controlled-story?raw';
|
|
33
|
+
import ToastCustomSrcRaw from './toast-custom-story?raw';
|
|
34
|
+
import ToastDangerSrcRaw from './toast-danger-story?raw';
|
|
35
|
+
import ToastNeutralSrcRaw from './toast-neutral-story?raw';
|
|
36
|
+
import ToastProgressBarSrcRaw from './toast-progress-bar?raw';
|
|
37
|
+
import ToastSuccessSrcRaw from './toast-success-story?raw';
|
|
38
|
+
export const ToastNeutralSrc = removeLicenseHeader(ToastNeutralSrcRaw);
|
|
39
|
+
export const ToastSuccessSrc = removeLicenseHeader(ToastSuccessSrcRaw);
|
|
40
|
+
export const ToastDangerSrc = removeLicenseHeader(ToastDangerSrcRaw);
|
|
41
|
+
export const ToastActionSrc = removeLicenseHeader(ToastActionSrcRaw);
|
|
42
|
+
export const ToastCloseableSrc = removeLicenseHeader(ToastCloseableSrcRaw);
|
|
43
|
+
export const ToastProgressBarSrc = removeLicenseHeader(ToastProgressBarSrcRaw);
|
|
44
|
+
export const ToastCustomSrc = removeLicenseHeader(ToastCustomSrcRaw);
|
|
45
|
+
export const ToastControlledSrc = removeLicenseHeader(ToastControlledSrcRaw);
|
|
46
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/toast/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAEpF,OAAO,iBAAiB,MAAM,0BAA0B,CAAC;AACzD,OAAO,oBAAoB,MAAM,6BAA6B,CAAC;AAC/D,OAAO,qBAAqB,MAAM,8BAA8B,CAAC;AACjE,OAAO,iBAAiB,MAAM,0BAA0B,CAAC;AACzD,OAAO,iBAAiB,MAAM,0BAA0B,CAAC;AACzD,OAAO,kBAAkB,MAAM,2BAA2B,CAAC;AAC3D,OAAO,sBAAsB,MAAM,0BAA0B,CAAC;AAC9D,OAAO,kBAAkB,MAAM,2BAA2B,CAAC;AAE3D,MAAM,CAAC,MAAM,eAAe,GAAG,mBAAmB,CAAC,kBAAkB,CAAC,CAAC;AACvE,MAAM,CAAC,MAAM,eAAe,GAAG,mBAAmB,CAAC,kBAAkB,CAAC,CAAC;AACvE,MAAM,CAAC,MAAM,cAAc,GAAG,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;AACrE,MAAM,CAAC,MAAM,cAAc,GAAG,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC,oBAAoB,CAAC,CAAC;AAC3E,MAAM,CAAC,MAAM,mBAAmB,GAAG,mBAAmB,CAAC,sBAAsB,CAAC,CAAC;AAC/E,MAAM,CAAC,MAAM,cAAc,GAAG,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;AACrE,MAAM,CAAC,MAAM,kBAAkB,GAAG,mBAAmB,CAAC,qBAAqB,CAAC,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
|
+
import { Button, toast, Toaster } from '@neo4j-ndl/react';
|
|
24
|
+
const Component = () => {
|
|
25
|
+
return (_jsxs("div", { className: "n-flex n-flex-row n-justify-center", children: [_jsx(Toaster, {}), _jsx(Button, { onClick: () => {
|
|
26
|
+
toast.neutral('Hello', {
|
|
27
|
+
actionLabel: 'Action',
|
|
28
|
+
shouldCloseOnAction: true,
|
|
29
|
+
onAction: () => {
|
|
30
|
+
console.info('action');
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
}, children: "Press to show a Toast" })] }));
|
|
34
|
+
};
|
|
35
|
+
export default Component;
|
|
36
|
+
//# sourceMappingURL=toast-action-story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast-action-story.js","sourceRoot":"","sources":["../../../../src/toast/stories/toast-action-story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE1D,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,eAAK,SAAS,EAAC,oCAAoC,aAEjD,KAAC,OAAO,KAAG,EACX,KAAC,MAAM,IACL,OAAO,EAAE,GAAG,EAAE;oBACZ,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE;wBACrB,WAAW,EAAE,QAAQ;wBACrB,mBAAmB,EAAE,IAAI;wBACzB,QAAQ,EAAE,GAAG,EAAE;4BACb,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;wBACzB,CAAC;qBACF,CAAC,CAAC;gBACL,CAAC,sCAGM,IACL,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
|
+
import { Button, toast, Toaster } from '@neo4j-ndl/react';
|
|
24
|
+
const Component = () => {
|
|
25
|
+
return (_jsxs("div", { className: "n-flex n-justify-center", children: [_jsx(Toaster, {}), _jsx(Button, { onClick: () => {
|
|
26
|
+
toast.neutral('Hello', {
|
|
27
|
+
isCloseable: true,
|
|
28
|
+
onClose: () => {
|
|
29
|
+
console.info('close');
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
}, children: "Press to show a Toast" })] }));
|
|
33
|
+
};
|
|
34
|
+
export default Component;
|
|
35
|
+
//# sourceMappingURL=toast-closeable-story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast-closeable-story.js","sourceRoot":"","sources":["../../../../src/toast/stories/toast-closeable-story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE1D,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,eAAK,SAAS,EAAC,yBAAyB,aAEtC,KAAC,OAAO,KAAG,EACX,KAAC,MAAM,IACL,OAAO,EAAE,GAAG,EAAE;oBACZ,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE;wBACrB,WAAW,EAAE,IAAI;wBACjB,OAAO,EAAE,GAAG,EAAE;4BACZ,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;wBACxB,CAAC;qBACF,CAAC,CAAC;gBACL,CAAC,sCAGM,IACL,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|