@neo4j-ndl/react 4.9.17 → 4.9.19
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/ButtonSpinner.js +53 -0
- package/lib/cjs/_common/ButtonSpinner.js.map +1 -0
- package/lib/cjs/_common/readme-docs-page.js +55 -0
- package/lib/cjs/_common/readme-docs-page.js.map +1 -0
- package/lib/cjs/button/ButtonBase.js +5 -3
- package/lib/cjs/button/ButtonBase.js.map +1 -1
- package/lib/cjs/button/stories/button-loading.story.js +1 -1
- package/lib/cjs/button/stories/button-loading.story.js.map +1 -1
- package/lib/cjs/clean-icon-button/stories/clean-icon-button-loading.story.js +1 -1
- package/lib/cjs/clean-icon-button/stories/clean-icon-button-loading.story.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/dialog/stories/dialog-danger.story.js +1 -1
- package/lib/cjs/dialog/stories/dialog-danger.story.js.map +1 -1
- package/lib/cjs/dialog/stories/dialog-default.story.js +1 -1
- package/lib/cjs/dialog/stories/dialog-default.story.js.map +1 -1
- package/lib/cjs/dialog/stories/dialog-image.story.js +1 -1
- package/lib/cjs/dialog/stories/dialog-image.story.js.map +1 -1
- package/lib/cjs/dialog/stories/dialog-info.story.js +1 -1
- package/lib/cjs/dialog/stories/dialog-info.story.js.map +1 -1
- package/lib/cjs/dialog/stories/dialog-top-aligned.story.js +1 -1
- package/lib/cjs/dialog/stories/dialog-top-aligned.story.js.map +1 -1
- package/lib/cjs/dialog/stories/dialog-variants.story.js +1 -1
- package/lib/cjs/dialog/stories/dialog-variants.story.js.map +1 -1
- package/lib/cjs/dialog/stories/dialog-warning.story.js +1 -1
- package/lib/cjs/dialog/stories/dialog-warning.story.js.map +1 -1
- package/lib/cjs/drawer/Drawer.js +144 -31
- package/lib/cjs/drawer/Drawer.js.map +1 -1
- package/lib/cjs/drawer/stories/drawer-full.story.js +3 -1
- package/lib/cjs/drawer/stories/drawer-full.story.js.map +1 -1
- package/lib/cjs/drawer/stories/drawer-not-closeable.story.js +2 -4
- package/lib/cjs/drawer/stories/drawer-not-closeable.story.js.map +1 -1
- package/lib/cjs/drawer/stories/drawer-overlay.story.js +5 -3
- package/lib/cjs/drawer/stories/drawer-overlay.story.js.map +1 -1
- package/lib/cjs/drawer/stories/drawer-portaled.story.js +8 -7
- package/lib/cjs/drawer/stories/drawer-portaled.story.js.map +1 -1
- package/lib/cjs/drawer/stories/drawer-push.story.js +4 -2
- package/lib/cjs/drawer/stories/drawer-push.story.js.map +1 -1
- package/lib/cjs/drawer/stories/drawer-resizable.story.js +5 -3
- package/lib/cjs/drawer/stories/drawer-resizable.story.js.map +1 -1
- package/lib/cjs/drawer/stories/drawer-right-side.story.js +4 -2
- package/lib/cjs/drawer/stories/drawer-right-side.story.js.map +1 -1
- package/lib/cjs/drawer/stories/drawer-scrollable.story.js +4 -2
- package/lib/cjs/drawer/stories/drawer-scrollable.story.js.map +1 -1
- package/lib/cjs/dropdown-button/DropdownButton.js +18 -4
- package/lib/cjs/dropdown-button/DropdownButton.js.map +1 -1
- package/lib/cjs/dropdown-button/stories/dropdown-button-loading.story.js +30 -0
- package/lib/cjs/dropdown-button/stories/dropdown-button-loading.story.js.map +1 -0
- package/lib/cjs/dropdown-button/stories/index.js +5 -1
- package/lib/cjs/dropdown-button/stories/index.js.map +1 -1
- package/lib/cjs/icon-button/stories/icon-button-loading.story.js +1 -1
- package/lib/cjs/icon-button/stories/icon-button-loading.story.js.map +1 -1
- package/lib/cjs/icon-button-base/IconButtonBase.js +7 -3
- package/lib/cjs/icon-button-base/IconButtonBase.js.map +1 -1
- package/lib/cjs/menu/stories/menu-custom-items.story.js +1 -1
- package/lib/cjs/menu/stories/menu-custom-items.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-default.story.js +2 -2
- package/lib/cjs/menu/stories/menu-default.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-in-dialog.story.js +2 -2
- package/lib/cjs/menu/stories/menu-in-dialog.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-in-popover.story.js +1 -1
- package/lib/cjs/menu/stories/menu-in-popover.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-nested.story.js +1 -1
- package/lib/cjs/menu/stories/menu-nested.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-placements.story.js +2 -2
- package/lib/cjs/menu/stories/menu-placements.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-radio-and-normal.story.js +2 -2
- package/lib/cjs/menu/stories/menu-radio-and-normal.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-radio-items.story.js +2 -2
- package/lib/cjs/menu/stories/menu-radio-items.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-with-category.story.js +1 -1
- package/lib/cjs/menu/stories/menu-with-category.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-with-disabled-item.story.js +1 -1
- package/lib/cjs/menu/stories/menu-with-disabled-item.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-with-divider.story.js +1 -1
- package/lib/cjs/menu/stories/menu-with-divider.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-with-icon.story.js +1 -1
- package/lib/cjs/menu/stories/menu-with-icon.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-with-keyboard-shortcuts.story.js +1 -1
- package/lib/cjs/menu/stories/menu-with-keyboard-shortcuts.story.js.map +1 -1
- package/lib/cjs/select/Overrides.js +17 -2
- package/lib/cjs/select/Overrides.js.map +1 -1
- package/lib/cjs/select/Select.js +10 -5
- package/lib/cjs/select/Select.js.map +1 -1
- package/lib/cjs/select/types.js.map +1 -1
- package/lib/cjs/select-icon-button/SelectIconButton.js +16 -5
- package/lib/cjs/select-icon-button/SelectIconButton.js.map +1 -1
- package/lib/cjs/select-icon-button/stories/select-icon-button-states.story.js +1 -1
- package/lib/cjs/select-icon-button/stories/select-icon-button-states.story.js.map +1 -1
- package/lib/cjs/text-area/TextArea.js +1 -1
- package/lib/cjs/text-area/TextArea.js.map +1 -1
- package/lib/cjs/text-input/TextInput.js +1 -1
- package/lib/cjs/text-input/TextInput.js.map +1 -1
- package/lib/cjs/text-input/stories/text-input-clearable.story.js +1 -1
- package/lib/cjs/text-input/stories/text-input-clearable.story.js.map +1 -1
- package/lib/cjs/text-input/stories/text-input-default.story.js +1 -1
- package/lib/cjs/text-input/stories/text-input-default.story.js.map +1 -1
- package/lib/cjs/text-input/stories/text-input-disabled.story.js +1 -1
- package/lib/cjs/text-input/stories/text-input-disabled.story.js.map +1 -1
- package/lib/cjs/text-input/stories/text-input-email.story.js +1 -0
- package/lib/cjs/text-input/stories/text-input-email.story.js.map +1 -1
- package/lib/cjs/text-input/stories/text-input-error.story.js +1 -1
- package/lib/cjs/text-input/stories/text-input-error.story.js.map +1 -1
- package/lib/cjs/text-input/stories/text-input-full.story.js +1 -1
- package/lib/cjs/text-input/stories/text-input-full.story.js.map +1 -1
- package/lib/cjs/text-input/stories/text-input-information-icon.story.js +1 -1
- package/lib/cjs/text-input/stories/text-input-information-icon.story.js.map +1 -1
- package/lib/cjs/text-input/stories/text-input-loading-spinner.story.js +1 -1
- package/lib/cjs/text-input/stories/text-input-loading-spinner.story.js.map +1 -1
- package/lib/cjs/text-input/stories/text-input-loading.story.js +1 -1
- package/lib/cjs/text-input/stories/text-input-loading.story.js.map +1 -1
- package/lib/cjs/text-input/stories/text-input-number.story.js +1 -0
- package/lib/cjs/text-input/stories/text-input-number.story.js.map +1 -1
- package/lib/cjs/text-input/stories/text-input-optional.story.js +1 -1
- package/lib/cjs/text-input/stories/text-input-optional.story.js.map +1 -1
- package/lib/cjs/text-input/stories/text-input-password.story.js +1 -0
- package/lib/cjs/text-input/stories/text-input-password.story.js.map +1 -1
- package/lib/cjs/text-input/stories/text-input-readonly.story.js +1 -1
- package/lib/cjs/text-input/stories/text-input-readonly.story.js.map +1 -1
- package/lib/cjs/text-input/stories/text-input-required.story.js +1 -1
- package/lib/cjs/text-input/stories/text-input-required.story.js.map +1 -1
- package/lib/cjs/text-input/stories/text-input-sizes.story.js +1 -1
- package/lib/cjs/text-input/stories/text-input-sizes.story.js.map +1 -1
- package/lib/cjs/text-input/stories/text-input-with-icons.story.js +1 -1
- package/lib/cjs/text-input/stories/text-input-with-icons.story.js.map +1 -1
- package/lib/cjs/time-picker/TimePicker.js +5 -4
- package/lib/cjs/time-picker/TimePicker.js.map +1 -1
- package/lib/cjs/time-picker/stories/index.js +5 -1
- package/lib/cjs/time-picker/stories/index.js.map +1 -1
- package/lib/cjs/time-picker/stories/time-picker-default.story.js +1 -1
- package/lib/cjs/time-picker/stories/time-picker-default.story.js.map +1 -1
- package/lib/cjs/time-picker/stories/time-picker-error.story.js +32 -0
- package/lib/cjs/time-picker/stories/time-picker-error.story.js.map +1 -0
- package/lib/cjs/time-picker/stories/time-picker-in-dialog.story.js +1 -1
- package/lib/cjs/time-picker/stories/time-picker-in-dialog.story.js.map +1 -1
- package/lib/cjs/timezone-picker/TimeZonePicker.js +5 -4
- package/lib/cjs/timezone-picker/TimeZonePicker.js.map +1 -1
- package/lib/cjs/timezone-picker/stories/index.js +5 -1
- package/lib/cjs/timezone-picker/stories/index.js.map +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-both-mode.story.js +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-both-mode.story.js.map +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-default.story.js +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-default.story.js.map +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-disabled.story.js +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-disabled.story.js.map +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-dst-aware.story.js +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-dst-aware.story.js.map +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-error.story.js +35 -0
- package/lib/cjs/timezone-picker/stories/timezone-picker-error.story.js.map +1 -0
- 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/timezone-picker/stories/timezone-picker-in-dialog.story.js +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-in-dialog.story.js.map +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-sizes.story.js +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-sizes.story.js.map +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-utc-only.story.js +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-utc-only.story.js.map +1 -1
- package/lib/esm/_common/ButtonSpinner.js +46 -0
- package/lib/esm/_common/ButtonSpinner.js.map +1 -0
- package/lib/esm/_common/readme-docs-page.js +52 -0
- package/lib/esm/_common/readme-docs-page.js.map +1 -0
- package/lib/esm/button/ButtonBase.js +5 -3
- package/lib/esm/button/ButtonBase.js.map +1 -1
- package/lib/esm/button/stories/button-loading.story.js +1 -1
- package/lib/esm/button/stories/button-loading.story.js.map +1 -1
- package/lib/esm/clean-icon-button/stories/clean-icon-button-loading.story.js +1 -1
- package/lib/esm/clean-icon-button/stories/clean-icon-button-loading.story.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/dialog/stories/dialog-danger.story.js +1 -1
- package/lib/esm/dialog/stories/dialog-danger.story.js.map +1 -1
- package/lib/esm/dialog/stories/dialog-default.story.js +1 -1
- package/lib/esm/dialog/stories/dialog-default.story.js.map +1 -1
- package/lib/esm/dialog/stories/dialog-image.story.js +1 -1
- package/lib/esm/dialog/stories/dialog-image.story.js.map +1 -1
- package/lib/esm/dialog/stories/dialog-info.story.js +1 -1
- package/lib/esm/dialog/stories/dialog-info.story.js.map +1 -1
- package/lib/esm/dialog/stories/dialog-top-aligned.story.js +1 -1
- package/lib/esm/dialog/stories/dialog-top-aligned.story.js.map +1 -1
- package/lib/esm/dialog/stories/dialog-variants.story.js +1 -1
- package/lib/esm/dialog/stories/dialog-variants.story.js.map +1 -1
- package/lib/esm/dialog/stories/dialog-warning.story.js +1 -1
- package/lib/esm/dialog/stories/dialog-warning.story.js.map +1 -1
- package/lib/esm/drawer/Drawer.js +146 -33
- package/lib/esm/drawer/Drawer.js.map +1 -1
- package/lib/esm/drawer/stories/drawer-full.story.js +3 -1
- package/lib/esm/drawer/stories/drawer-full.story.js.map +1 -1
- package/lib/esm/drawer/stories/drawer-not-closeable.story.js +3 -5
- package/lib/esm/drawer/stories/drawer-not-closeable.story.js.map +1 -1
- package/lib/esm/drawer/stories/drawer-overlay.story.js +5 -3
- package/lib/esm/drawer/stories/drawer-overlay.story.js.map +1 -1
- package/lib/esm/drawer/stories/drawer-portaled.story.js +10 -9
- package/lib/esm/drawer/stories/drawer-portaled.story.js.map +1 -1
- package/lib/esm/drawer/stories/drawer-push.story.js +4 -2
- package/lib/esm/drawer/stories/drawer-push.story.js.map +1 -1
- package/lib/esm/drawer/stories/drawer-resizable.story.js +5 -3
- package/lib/esm/drawer/stories/drawer-resizable.story.js.map +1 -1
- package/lib/esm/drawer/stories/drawer-right-side.story.js +4 -2
- package/lib/esm/drawer/stories/drawer-right-side.story.js.map +1 -1
- package/lib/esm/drawer/stories/drawer-scrollable.story.js +4 -2
- package/lib/esm/drawer/stories/drawer-scrollable.story.js.map +1 -1
- package/lib/esm/dropdown-button/DropdownButton.js +18 -4
- package/lib/esm/dropdown-button/DropdownButton.js.map +1 -1
- package/lib/esm/dropdown-button/stories/dropdown-button-loading.story.js +28 -0
- package/lib/esm/dropdown-button/stories/dropdown-button-loading.story.js.map +1 -0
- package/lib/esm/dropdown-button/stories/index.js +3 -0
- package/lib/esm/dropdown-button/stories/index.js.map +1 -1
- package/lib/esm/icon-button/stories/icon-button-loading.story.js +1 -1
- package/lib/esm/icon-button/stories/icon-button-loading.story.js.map +1 -1
- package/lib/esm/icon-button-base/IconButtonBase.js +7 -3
- package/lib/esm/icon-button-base/IconButtonBase.js.map +1 -1
- package/lib/esm/menu/stories/menu-custom-items.story.js +1 -1
- package/lib/esm/menu/stories/menu-custom-items.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-default.story.js +2 -2
- package/lib/esm/menu/stories/menu-default.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-in-dialog.story.js +2 -2
- package/lib/esm/menu/stories/menu-in-dialog.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-in-popover.story.js +1 -1
- package/lib/esm/menu/stories/menu-in-popover.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-nested.story.js +1 -1
- package/lib/esm/menu/stories/menu-nested.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-placements.story.js +2 -2
- package/lib/esm/menu/stories/menu-placements.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-radio-and-normal.story.js +2 -2
- package/lib/esm/menu/stories/menu-radio-and-normal.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-radio-items.story.js +2 -2
- package/lib/esm/menu/stories/menu-radio-items.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-with-category.story.js +1 -1
- package/lib/esm/menu/stories/menu-with-category.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-with-disabled-item.story.js +1 -1
- package/lib/esm/menu/stories/menu-with-disabled-item.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-with-divider.story.js +1 -1
- package/lib/esm/menu/stories/menu-with-divider.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-with-icon.story.js +1 -1
- package/lib/esm/menu/stories/menu-with-icon.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-with-keyboard-shortcuts.story.js +1 -1
- package/lib/esm/menu/stories/menu-with-keyboard-shortcuts.story.js.map +1 -1
- package/lib/esm/select/Overrides.js +17 -2
- package/lib/esm/select/Overrides.js.map +1 -1
- package/lib/esm/select/Select.js +10 -5
- package/lib/esm/select/Select.js.map +1 -1
- package/lib/esm/select/types.js.map +1 -1
- package/lib/esm/select-icon-button/SelectIconButton.js +16 -5
- package/lib/esm/select-icon-button/SelectIconButton.js.map +1 -1
- package/lib/esm/select-icon-button/stories/select-icon-button-states.story.js +1 -1
- package/lib/esm/select-icon-button/stories/select-icon-button-states.story.js.map +1 -1
- package/lib/esm/text-area/TextArea.js +1 -1
- package/lib/esm/text-area/TextArea.js.map +1 -1
- package/lib/esm/text-input/TextInput.js +1 -1
- package/lib/esm/text-input/TextInput.js.map +1 -1
- package/lib/esm/text-input/stories/text-input-clearable.story.js +1 -1
- package/lib/esm/text-input/stories/text-input-clearable.story.js.map +1 -1
- package/lib/esm/text-input/stories/text-input-default.story.js +1 -1
- package/lib/esm/text-input/stories/text-input-default.story.js.map +1 -1
- package/lib/esm/text-input/stories/text-input-disabled.story.js +1 -1
- package/lib/esm/text-input/stories/text-input-disabled.story.js.map +1 -1
- package/lib/esm/text-input/stories/text-input-email.story.js +1 -0
- package/lib/esm/text-input/stories/text-input-email.story.js.map +1 -1
- package/lib/esm/text-input/stories/text-input-error.story.js +1 -1
- package/lib/esm/text-input/stories/text-input-error.story.js.map +1 -1
- package/lib/esm/text-input/stories/text-input-full.story.js +1 -1
- package/lib/esm/text-input/stories/text-input-full.story.js.map +1 -1
- package/lib/esm/text-input/stories/text-input-information-icon.story.js +1 -1
- package/lib/esm/text-input/stories/text-input-information-icon.story.js.map +1 -1
- package/lib/esm/text-input/stories/text-input-loading-spinner.story.js +1 -1
- package/lib/esm/text-input/stories/text-input-loading-spinner.story.js.map +1 -1
- package/lib/esm/text-input/stories/text-input-loading.story.js +1 -1
- package/lib/esm/text-input/stories/text-input-loading.story.js.map +1 -1
- package/lib/esm/text-input/stories/text-input-number.story.js +1 -0
- package/lib/esm/text-input/stories/text-input-number.story.js.map +1 -1
- package/lib/esm/text-input/stories/text-input-optional.story.js +1 -1
- package/lib/esm/text-input/stories/text-input-optional.story.js.map +1 -1
- package/lib/esm/text-input/stories/text-input-password.story.js +1 -0
- package/lib/esm/text-input/stories/text-input-password.story.js.map +1 -1
- package/lib/esm/text-input/stories/text-input-readonly.story.js +1 -1
- package/lib/esm/text-input/stories/text-input-readonly.story.js.map +1 -1
- package/lib/esm/text-input/stories/text-input-required.story.js +1 -1
- package/lib/esm/text-input/stories/text-input-required.story.js.map +1 -1
- package/lib/esm/text-input/stories/text-input-sizes.story.js +1 -1
- package/lib/esm/text-input/stories/text-input-sizes.story.js.map +1 -1
- package/lib/esm/text-input/stories/text-input-with-icons.story.js +1 -1
- package/lib/esm/text-input/stories/text-input-with-icons.story.js.map +1 -1
- package/lib/esm/time-picker/TimePicker.js +6 -5
- package/lib/esm/time-picker/TimePicker.js.map +1 -1
- package/lib/esm/time-picker/stories/index.js +3 -0
- package/lib/esm/time-picker/stories/index.js.map +1 -1
- package/lib/esm/time-picker/stories/time-picker-default.story.js +1 -1
- package/lib/esm/time-picker/stories/time-picker-default.story.js.map +1 -1
- package/lib/esm/time-picker/stories/time-picker-error.story.js +30 -0
- package/lib/esm/time-picker/stories/time-picker-error.story.js.map +1 -0
- package/lib/esm/time-picker/stories/time-picker-in-dialog.story.js +1 -1
- package/lib/esm/time-picker/stories/time-picker-in-dialog.story.js.map +1 -1
- package/lib/esm/timezone-picker/TimeZonePicker.js +6 -5
- package/lib/esm/timezone-picker/TimeZonePicker.js.map +1 -1
- package/lib/esm/timezone-picker/stories/index.js +3 -0
- package/lib/esm/timezone-picker/stories/index.js.map +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-both-mode.story.js +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-both-mode.story.js.map +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-default.story.js +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-default.story.js.map +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-disabled.story.js +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-disabled.story.js.map +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-dst-aware.story.js +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-dst-aware.story.js.map +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-error.story.js +33 -0
- package/lib/esm/timezone-picker/stories/timezone-picker-error.story.js.map +1 -0
- 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/timezone-picker/stories/timezone-picker-in-dialog.story.js +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-in-dialog.story.js.map +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-sizes.story.js +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-sizes.story.js.map +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-utc-only.story.js +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-utc-only.story.js.map +1 -1
- package/lib/types/_common/ButtonSpinner.d.ts +29 -0
- package/lib/types/_common/ButtonSpinner.d.ts.map +1 -0
- package/lib/types/_common/readme-docs-page.d.ts +23 -0
- package/lib/types/_common/readme-docs-page.d.ts.map +1 -0
- package/lib/types/button/ButtonBase.d.ts +3 -1
- package/lib/types/button/ButtonBase.d.ts.map +1 -1
- package/lib/types/button/stories/button-loading.story.d.ts.map +1 -1
- package/lib/types/dialog/stories/dialog-danger.story.d.ts.map +1 -1
- package/lib/types/dialog/stories/dialog-default.story.d.ts.map +1 -1
- package/lib/types/dialog/stories/dialog-image.story.d.ts.map +1 -1
- package/lib/types/dialog/stories/dialog-info.story.d.ts.map +1 -1
- package/lib/types/dialog/stories/dialog-top-aligned.story.d.ts.map +1 -1
- package/lib/types/dialog/stories/dialog-variants.story.d.ts.map +1 -1
- package/lib/types/dialog/stories/dialog-warning.story.d.ts.map +1 -1
- package/lib/types/drawer/Drawer.d.ts +32 -7
- package/lib/types/drawer/Drawer.d.ts.map +1 -1
- package/lib/types/drawer/stories/drawer-full.story.d.ts.map +1 -1
- package/lib/types/drawer/stories/drawer-not-closeable.story.d.ts.map +1 -1
- package/lib/types/drawer/stories/drawer-overlay.story.d.ts.map +1 -1
- package/lib/types/drawer/stories/drawer-portaled.story.d.ts.map +1 -1
- package/lib/types/drawer/stories/drawer-push.story.d.ts.map +1 -1
- package/lib/types/drawer/stories/drawer-resizable.story.d.ts.map +1 -1
- package/lib/types/drawer/stories/drawer-right-side.story.d.ts.map +1 -1
- package/lib/types/drawer/stories/drawer-scrollable.story.d.ts.map +1 -1
- package/lib/types/dropdown-button/DropdownButton.d.ts +5 -1
- package/lib/types/dropdown-button/DropdownButton.d.ts.map +1 -1
- package/lib/types/dropdown-button/stories/dropdown-button-loading.story.d.ts +24 -0
- package/lib/types/dropdown-button/stories/dropdown-button-loading.story.d.ts.map +1 -0
- package/lib/types/dropdown-button/stories/index.d.ts +2 -0
- package/lib/types/dropdown-button/stories/index.d.ts.map +1 -1
- package/lib/types/icon-button-base/IconButtonBase.d.ts +3 -1
- package/lib/types/icon-button-base/IconButtonBase.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-custom-items.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-default.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-in-dialog.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-in-popover.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-nested.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-placements.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-radio-and-normal.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-radio-items.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-with-category.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-with-disabled-item.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-with-divider.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-with-icon.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-with-keyboard-shortcuts.story.d.ts.map +1 -1
- package/lib/types/select/Overrides.d.ts +1 -1
- package/lib/types/select/Overrides.d.ts.map +1 -1
- package/lib/types/select/Select.d.ts.map +1 -1
- package/lib/types/select/types.d.ts +4 -1
- package/lib/types/select/types.d.ts.map +1 -1
- package/lib/types/select-icon-button/SelectIconButton.d.ts +3 -1
- package/lib/types/select-icon-button/SelectIconButton.d.ts.map +1 -1
- package/lib/types/select-icon-button/stories/select-icon-button-states.story.d.ts.map +1 -1
- package/lib/types/text-area/TextArea.d.ts.map +1 -1
- package/lib/types/text-input/TextInput.d.ts.map +1 -1
- package/lib/types/text-input/stories/text-input-clearable.story.d.ts.map +1 -1
- package/lib/types/text-input/stories/text-input-default.story.d.ts.map +1 -1
- package/lib/types/text-input/stories/text-input-disabled.story.d.ts.map +1 -1
- package/lib/types/text-input/stories/text-input-email.story.d.ts.map +1 -1
- package/lib/types/text-input/stories/text-input-error.story.d.ts.map +1 -1
- package/lib/types/text-input/stories/text-input-full.story.d.ts.map +1 -1
- package/lib/types/text-input/stories/text-input-information-icon.story.d.ts.map +1 -1
- package/lib/types/text-input/stories/text-input-loading-spinner.story.d.ts.map +1 -1
- package/lib/types/text-input/stories/text-input-loading.story.d.ts.map +1 -1
- package/lib/types/text-input/stories/text-input-number.story.d.ts.map +1 -1
- package/lib/types/text-input/stories/text-input-optional.story.d.ts.map +1 -1
- package/lib/types/text-input/stories/text-input-password.story.d.ts.map +1 -1
- package/lib/types/text-input/stories/text-input-readonly.story.d.ts.map +1 -1
- package/lib/types/text-input/stories/text-input-required.story.d.ts.map +1 -1
- package/lib/types/text-input/stories/text-input-sizes.story.d.ts.map +1 -1
- package/lib/types/text-input/stories/text-input-with-icons.story.d.ts.map +1 -1
- package/lib/types/time-picker/TimePicker.d.ts.map +1 -1
- package/lib/types/time-picker/stories/index.d.ts +2 -0
- package/lib/types/time-picker/stories/index.d.ts.map +1 -1
- package/lib/types/time-picker/stories/time-picker-default.story.d.ts.map +1 -1
- package/lib/types/time-picker/stories/time-picker-error.story.d.ts +24 -0
- package/lib/types/time-picker/stories/time-picker-error.story.d.ts.map +1 -0
- package/lib/types/time-picker/stories/time-picker-in-dialog.story.d.ts.map +1 -1
- package/lib/types/timezone-picker/TimeZonePicker.d.ts.map +1 -1
- package/lib/types/timezone-picker/stories/index.d.ts +2 -0
- package/lib/types/timezone-picker/stories/index.d.ts.map +1 -1
- package/lib/types/timezone-picker/stories/timezone-picker-both-mode.story.d.ts.map +1 -1
- package/lib/types/timezone-picker/stories/timezone-picker-default.story.d.ts.map +1 -1
- package/lib/types/timezone-picker/stories/timezone-picker-disabled.story.d.ts.map +1 -1
- package/lib/types/timezone-picker/stories/timezone-picker-dst-aware.story.d.ts.map +1 -1
- package/lib/types/timezone-picker/stories/timezone-picker-error.story.d.ts +24 -0
- package/lib/types/timezone-picker/stories/timezone-picker-error.story.d.ts.map +1 -0
- package/lib/types/timezone-picker/stories/timezone-picker-fluid.story.d.ts.map +1 -1
- package/lib/types/timezone-picker/stories/timezone-picker-in-dialog.story.d.ts.map +1 -1
- package/lib/types/timezone-picker/stories/timezone-picker-sizes.story.d.ts.map +1 -1
- package/lib/types/timezone-picker/stories/timezone-picker-utc-only.story.d.ts.map +1 -1
- package/package.json +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-nested.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-nested.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAsD;AACtD,kDAAiE;AACjE,iCAAyC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,IAAA,cAAM,EAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,6DACE,wBAAC,YAAI,IACH,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK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OAAO,aACjB,uBAAC,YAAI,CAAC,IAAI,IAAC,KAAK,EAAC,MAAM,GAAG,EAC1B,uBAAC,YAAI,CAAC,IAAI,IAAC,KAAK,EAAC,MAAM,GAAG,EAC1B,uBAAC,YAAI,CAAC,IAAI,IAAC,KAAK,EAAC,MAAM,GAAG,EAC1B,uBAAC,YAAI,CAAC,IAAI,IAAC,KAAK,EAAC,MAAM,GAAG,IACrB,EACP,uBAAC,YAAI,CAAC,IAAI,IAAC,KAAK,EAAC,OAAO,GAAG,IACtB,EACP,wBAAC,YAAI,IAAC,KAAK,EAAC,OAAO,aACjB,uBAAC,YAAI,CAAC,IAAI,IAAC,KAAK,EAAC,MAAM,GAAG,EAC1B,uBAAC,YAAI,CAAC,IAAI,IAAC,KAAK,EAAC,WAAW,GAAG,IAC1B,IACF,EACP,uBAAC,oBAAY,IACX,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAC9B,GAAG,EAAE,QAAQ,mBACC,MAAM,mBACL,MAAM,0BAGR,IACd,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,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 { FilledButton, Menu } from '@neo4j-ndl/react';\nimport { Square2StackIconOutline } from '@neo4j-ndl/react/icons';\nimport { useRef, useState } from 'react';\n\nconst Component = () => {\n const anchorEl = useRef<HTMLButtonElement | null>(null);\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <>\n <Menu\n isOpen={isOpen}\n anchorRef={anchorEl}\n onClose={(_event, _data) => {\n setIsOpen(false);\n }}\n htmlAttributes={{ id: 'nested-menu' }}\n >\n <Menu.Item title=\"Undo\" onClick={() => alert('Undo')} />\n <Menu.Item title=\"Redo\" isDisabled />\n <Menu.Item title=\"Cut\" description=\"Copy and remove\" />\n <Menu\n title=\"Copy as\"\n description=\"Copying as something\"\n icon={<Square2StackIconOutline />}\n >\n <Menu.Item title=\"Text\" />\n <Menu.Item title=\"Video\" />\n <Menu title=\"Image\">\n <Menu.Item title=\".png\" />\n <Menu.Item title=\".jpg\" />\n <Menu.Item title=\".svg\" />\n <Menu.Item title=\".gif\" />\n </Menu>\n <Menu.Item title=\"Audio\" />\n </Menu>\n <Menu title=\"Share\">\n <Menu.Item title=\"Mail\" />\n <Menu.Item title=\"Instagram\" />\n </Menu>\n </Menu>\n <FilledButton\n onClick={() => setIsOpen(true)}\n ref={anchorEl}\n aria-haspopup=\"menu\"\n aria-expanded={isOpen}\n >\n Open Menu\n </FilledButton>\n </>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -29,7 +29,7 @@ const Component = () => {
|
|
|
29
29
|
const [isOpen, setIsOpen] = (0, react_2.useState)(false);
|
|
30
30
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_1.Menu, { isOpen: isOpen, anchorRef: anchorEl, placement: "middle-end-middle-start", onClose: (_event, _data) => {
|
|
31
31
|
setIsOpen(false);
|
|
32
|
-
}, children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 1", onClick: () => {
|
|
32
|
+
}, htmlAttributes: { id: 'placements-menu' }, children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 1", onClick: () => {
|
|
33
33
|
alert('Action1');
|
|
34
34
|
setIsOpen(false);
|
|
35
35
|
} }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 2", onClick: () => {
|
|
@@ -41,7 +41,7 @@ const Component = () => {
|
|
|
41
41
|
} }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 4", description: "Action 4 is awesome", onClick: () => {
|
|
42
42
|
alert('Action4');
|
|
43
43
|
setIsOpen(false);
|
|
44
|
-
} }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { id: "action_5", title: "Action 5", description: "Action 5 does not close the menu" })] }), (0, jsx_runtime_1.jsx)(react_1.FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, children: "Open Menu" })] }));
|
|
44
|
+
} }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { id: "action_5", title: "Action 5", description: "Action 5 does not close the menu" })] }), (0, jsx_runtime_1.jsx)(react_1.FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, "aria-haspopup": "menu", "aria-expanded": isOpen, children: "Open Menu" })] }));
|
|
45
45
|
};
|
|
46
46
|
exports.default = Component;
|
|
47
47
|
//# sourceMappingURL=menu-placements.story.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-placements.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-placements.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAsD;AACtD,iCAAyC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,IAAA,cAAM,EAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,6DACE,wBAAC,YAAI,IACH,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,QAAQ,EACnB,SAAS,EAAC,yBAAyB,EACnC,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;oBACzB,SAAS,CAAC,KAAK,CAAC,CAAC;gBACnB,CAAC,
|
|
1
|
+
{"version":3,"file":"menu-placements.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-placements.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAsD;AACtD,iCAAyC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,IAAA,cAAM,EAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,6DACE,wBAAC,YAAI,IACH,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,QAAQ,EACnB,SAAS,EAAC,yBAAyB,EACnC,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;oBACzB,SAAS,CAAC,KAAK,CAAC,CAAC;gBACnB,CAAC,EACD,cAAc,EAAE,EAAE,EAAE,EAAE,iBAAiB,EAAE,aAEzC,uBAAC,YAAI,CAAC,IAAI,IACR,KAAK,EAAC,UAAU,EAChB,OAAO,EAAE,GAAG,EAAE;4BACZ,KAAK,CAAC,SAAS,CAAC,CAAC;4BACjB,SAAS,CAAC,KAAK,CAAC,CAAC;wBACnB,CAAC,GACD,EACF,uBAAC,YAAI,CAAC,IAAI,IACR,KAAK,EAAC,UAAU,EAChB,OAAO,EAAE,GAAG,EAAE;4BACZ,KAAK,CAAC,SAAS,CAAC,CAAC;4BACjB,SAAS,CAAC,KAAK,CAAC,CAAC;wBACnB,CAAC,GACD,EACF,uBAAC,YAAI,CAAC,IAAI,IACR,KAAK,EAAC,UAAU,EAChB,WAAW,EAAC,sBAAsB,EAClC,UAAU,EAAE,IAAI,EAChB,OAAO,EAAE,GAAG,EAAE;4BACZ,KAAK,CAAC,SAAS,CAAC,CAAC;4BACjB,SAAS,CAAC,KAAK,CAAC,CAAC;wBACnB,CAAC,GACD,EACF,uBAAC,YAAI,CAAC,IAAI,IACR,KAAK,EAAC,UAAU,EAChB,WAAW,EAAC,qBAAqB,EACjC,OAAO,EAAE,GAAG,EAAE;4BACZ,KAAK,CAAC,SAAS,CAAC,CAAC;4BACjB,SAAS,CAAC,KAAK,CAAC,CAAC;wBACnB,CAAC,GACD,EACF,uBAAC,YAAI,CAAC,IAAI,IACR,EAAE,EAAC,UAAU,EACb,KAAK,EAAC,UAAU,EAChB,WAAW,EAAC,kCAAkC,GAC9C,IACG,EAEP,uBAAC,oBAAY,IACX,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAC9B,GAAG,EAAE,QAAQ,mBACC,MAAM,mBACL,MAAM,0BAGR,IACd,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,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 { FilledButton, Menu } from '@neo4j-ndl/react';\nimport { useRef, useState } from 'react';\n\nconst Component = () => {\n const anchorEl = useRef<HTMLButtonElement | null>(null);\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <>\n <Menu\n isOpen={isOpen}\n anchorRef={anchorEl}\n placement=\"middle-end-middle-start\"\n onClose={(_event, _data) => {\n setIsOpen(false);\n }}\n htmlAttributes={{ id: 'placements-menu' }}\n >\n <Menu.Item\n title=\"Action 1\"\n onClick={() => {\n alert('Action1');\n setIsOpen(false);\n }}\n />\n <Menu.Item\n title=\"Action 2\"\n onClick={() => {\n alert('Action2');\n setIsOpen(false);\n }}\n />\n <Menu.Item\n title=\"Action 3\"\n description=\"Action 3 is disabled\"\n isDisabled={true}\n onClick={() => {\n alert('Action3');\n setIsOpen(false);\n }}\n />\n <Menu.Item\n title=\"Action 4\"\n description=\"Action 4 is awesome\"\n onClick={() => {\n alert('Action4');\n setIsOpen(false);\n }}\n />\n <Menu.Item\n id=\"action_5\"\n title=\"Action 5\"\n description=\"Action 5 does not close the menu\"\n />\n </Menu>\n\n <FilledButton\n onClick={() => setIsOpen(true)}\n ref={anchorEl}\n aria-haspopup=\"menu\"\n aria-expanded={isOpen}\n >\n Open Menu\n </FilledButton>\n </>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -30,7 +30,7 @@ const Component = () => {
|
|
|
30
30
|
const [selectedOption, setSelectedOption] = (0, react_2.useState)('option-1');
|
|
31
31
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_1.Menu, { isOpen: isOpen, anchorRef: anchorEl, onClose: (_event, _data) => {
|
|
32
32
|
setIsOpen(false);
|
|
33
|
-
}, children: [(0, jsx_runtime_1.jsxs)(react_1.Menu.Group, { children: [(0, jsx_runtime_1.jsx)(react_1.Menu.RadioItem, { title: "Option 1", isChecked: selectedOption === 'option-1', onClick: () => {
|
|
33
|
+
}, htmlAttributes: { id: 'radio-and-normal-menu' }, children: [(0, jsx_runtime_1.jsxs)(react_1.Menu.Group, { children: [(0, jsx_runtime_1.jsx)(react_1.Menu.RadioItem, { title: "Option 1", isChecked: selectedOption === 'option-1', onClick: () => {
|
|
34
34
|
setSelectedOption('option-1');
|
|
35
35
|
} }), (0, jsx_runtime_1.jsx)(react_1.Menu.RadioItem, { title: "Option 2", isChecked: selectedOption === 'option-2', onClick: () => {
|
|
36
36
|
setSelectedOption('option-2');
|
|
@@ -38,7 +38,7 @@ const Component = () => {
|
|
|
38
38
|
alert('Action 1');
|
|
39
39
|
} }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 2", onClick: () => {
|
|
40
40
|
alert('Action 2');
|
|
41
|
-
} })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "n-flex n-flex-col n-gap-token-4 n-items-center", children: [(0, jsx_runtime_1.jsxs)(react_1.Typography, { variant: "body-medium", children: ["Selected option: ", (0, jsx_runtime_1.jsx)("strong", { children: selectedOption })] }), (0, jsx_runtime_1.jsx)(react_1.DropdownButton, { isOpen: isOpen, onClick: () => setIsOpen(true), ref: anchorEl, children: "Open menu" })] })] }));
|
|
41
|
+
} })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "n-flex n-flex-col n-gap-token-4 n-items-center", children: [(0, jsx_runtime_1.jsxs)(react_1.Typography, { variant: "body-medium", children: ["Selected option: ", (0, jsx_runtime_1.jsx)("strong", { children: selectedOption })] }), (0, jsx_runtime_1.jsx)(react_1.DropdownButton, { isOpen: isOpen, onClick: () => setIsOpen(true), ref: anchorEl, "aria-haspopup": "menu", children: "Open menu" })] })] }));
|
|
42
42
|
};
|
|
43
43
|
exports.default = Component;
|
|
44
44
|
//# sourceMappingURL=menu-radio-and-normal.story.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-radio-and-normal.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-radio-and-normal.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAoE;AACpE,iCAAyC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,IAAA,cAAM,EAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAC5C,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,IAAA,gBAAQ,EAClD,UAAU,CACX,CAAC;IAEF,OAAO,CACL,6DACE,wBAAC,YAAI,IACH,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;oBACzB,SAAS,CAAC,KAAK,CAAC,CAAC;gBACnB,CAAC,
|
|
1
|
+
{"version":3,"file":"menu-radio-and-normal.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-radio-and-normal.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAoE;AACpE,iCAAyC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,IAAA,cAAM,EAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAC5C,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,IAAA,gBAAQ,EAClD,UAAU,CACX,CAAC;IAEF,OAAO,CACL,6DACE,wBAAC,YAAI,IACH,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;oBACzB,SAAS,CAAC,KAAK,CAAC,CAAC;gBACnB,CAAC,EACD,cAAc,EAAE,EAAE,EAAE,EAAE,uBAAuB,EAAE,aAE/C,wBAAC,YAAI,CAAC,KAAK,eACT,uBAAC,YAAI,CAAC,SAAS,IACb,KAAK,EAAC,UAAU,EAChB,SAAS,EAAE,cAAc,KAAK,UAAU,EACxC,OAAO,EAAE,GAAG,EAAE;oCACZ,iBAAiB,CAAC,UAAU,CAAC,CAAC;gCAChC,CAAC,GACD,EACF,uBAAC,YAAI,CAAC,SAAS,IACb,KAAK,EAAC,UAAU,EAChB,SAAS,EAAE,cAAc,KAAK,UAAU,EACxC,OAAO,EAAE,GAAG,EAAE;oCACZ,iBAAiB,CAAC,UAAU,CAAC,CAAC;gCAChC,CAAC,GACD,IACS,EACb,uBAAC,YAAI,CAAC,OAAO,KAAG,EAChB,wBAAC,YAAI,CAAC,KAAK,eACT,uBAAC,YAAI,CAAC,IAAI,IACR,KAAK,EAAC,UAAU,EAChB,OAAO,EAAE,GAAG,EAAE;oCACZ,KAAK,CAAC,UAAU,CAAC,CAAC;gCACpB,CAAC,GACD,EACF,uBAAC,YAAI,CAAC,IAAI,IACR,KAAK,EAAC,UAAU,EAChB,OAAO,EAAE,GAAG,EAAE;oCACZ,KAAK,CAAC,UAAU,CAAC,CAAC;gCACpB,CAAC,GACD,IACS,IACR,EACP,iCAAK,SAAS,EAAC,gDAAgD,aAC7D,wBAAC,kBAAU,IAAC,OAAO,EAAC,aAAa,kCACd,6CAAS,cAAc,GAAU,IACvC,EACb,uBAAC,sBAAc,IACb,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAC9B,GAAG,EAAE,QAAQ,mBACC,MAAM,0BAGL,IACb,IACL,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,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 { DropdownButton, Menu, Typography } from '@neo4j-ndl/react';\nimport { useRef, useState } from 'react';\n\nconst Component = () => {\n const anchorEl = useRef<HTMLButtonElement | null>(null);\n const [isOpen, setIsOpen] = useState(false);\n const [selectedOption, setSelectedOption] = useState<string | null>(\n 'option-1',\n );\n\n return (\n <>\n <Menu\n isOpen={isOpen}\n anchorRef={anchorEl}\n onClose={(_event, _data) => {\n setIsOpen(false);\n }}\n htmlAttributes={{ id: 'radio-and-normal-menu' }}\n >\n <Menu.Group>\n <Menu.RadioItem\n title=\"Option 1\"\n isChecked={selectedOption === 'option-1'}\n onClick={() => {\n setSelectedOption('option-1');\n }}\n />\n <Menu.RadioItem\n title=\"Option 2\"\n isChecked={selectedOption === 'option-2'}\n onClick={() => {\n setSelectedOption('option-2');\n }}\n />\n </Menu.Group>\n <Menu.Divider />\n <Menu.Group>\n <Menu.Item\n title=\"Action 1\"\n onClick={() => {\n alert('Action 1');\n }}\n />\n <Menu.Item\n title=\"Action 2\"\n onClick={() => {\n alert('Action 2');\n }}\n />\n </Menu.Group>\n </Menu>\n <div className=\"n-flex n-flex-col n-gap-token-4 n-items-center\">\n <Typography variant=\"body-medium\">\n Selected option: <strong>{selectedOption}</strong>\n </Typography>\n <DropdownButton\n isOpen={isOpen}\n onClick={() => setIsOpen(true)}\n ref={anchorEl}\n aria-haspopup=\"menu\"\n >\n Open menu\n </DropdownButton>\n </div>\n </>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -31,7 +31,7 @@ const Component = () => {
|
|
|
31
31
|
const [selectedOption, setSelectedOption] = (0, react_2.useState)('option-1');
|
|
32
32
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_1.Menu, { isOpen: isOpen, anchorRef: anchorEl, onClose: (_event, _data) => {
|
|
33
33
|
setIsOpen(false);
|
|
34
|
-
}, children: [(0, jsx_runtime_1.jsx)(react_1.Menu.RadioItem, { title: "Option 1", leadingVisual: (0, jsx_runtime_1.jsx)(icons_1.SunIconOutline, {}), isChecked: selectedOption === 'option-1', onClick: () => {
|
|
34
|
+
}, htmlAttributes: { id: 'radio-items-menu' }, children: [(0, jsx_runtime_1.jsx)(react_1.Menu.RadioItem, { title: "Option 1", leadingVisual: (0, jsx_runtime_1.jsx)(icons_1.SunIconOutline, {}), isChecked: selectedOption === 'option-1', onClick: () => {
|
|
35
35
|
setSelectedOption('option-1');
|
|
36
36
|
} }), (0, jsx_runtime_1.jsx)(react_1.Menu.RadioItem, { title: "Option 2", leadingVisual: (0, jsx_runtime_1.jsx)(icons_1.MoonIconOutline, {}), isChecked: selectedOption === 'option-2', onClick: () => {
|
|
37
37
|
setSelectedOption('option-2');
|
|
@@ -39,7 +39,7 @@ const Component = () => {
|
|
|
39
39
|
setSelectedOption('option-3');
|
|
40
40
|
} }), (0, jsx_runtime_1.jsx)(react_1.Menu.RadioItem, { title: "Option 4", trailingContent: (0, jsx_runtime_1.jsx)(react_1.Kbd, { keys: ['A'] }), isChecked: selectedOption === 'option-4', onClick: () => {
|
|
41
41
|
setSelectedOption('option-4');
|
|
42
|
-
} })] }), (0, jsx_runtime_1.jsxs)("div", { className: "n-flex n-flex-col n-gap-token-4 n-items-center", children: [(0, jsx_runtime_1.jsxs)(react_1.Typography, { variant: "body-medium", children: ["Selected option: ", (0, jsx_runtime_1.jsx)("strong", { children: selectedOption })] }), (0, jsx_runtime_1.jsx)(react_1.DropdownButton, { isOpen: isOpen, onClick: () => setIsOpen(true), ref: anchorEl, children: "Open menu" })] })] }));
|
|
42
|
+
} })] }), (0, jsx_runtime_1.jsxs)("div", { className: "n-flex n-flex-col n-gap-token-4 n-items-center", children: [(0, jsx_runtime_1.jsxs)(react_1.Typography, { variant: "body-medium", children: ["Selected option: ", (0, jsx_runtime_1.jsx)("strong", { children: selectedOption })] }), (0, jsx_runtime_1.jsx)(react_1.DropdownButton, { isOpen: isOpen, onClick: () => setIsOpen(true), ref: anchorEl, "aria-haspopup": "menu", children: "Open menu" })] })] }));
|
|
43
43
|
};
|
|
44
44
|
exports.default = Component;
|
|
45
45
|
//# sourceMappingURL=menu-radio-items.story.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-radio-items.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-radio-items.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAyE;AACzE,kDAAyE;AACzE,iCAAyC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,IAAA,cAAM,EAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAC5C,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,IAAA,gBAAQ,EAClD,UAAU,CACX,CAAC;IAEF,OAAO,CACL,6DACE,wBAAC,YAAI,IACH,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;oBACzB,SAAS,CAAC,KAAK,CAAC,CAAC;gBACnB,CAAC,
|
|
1
|
+
{"version":3,"file":"menu-radio-items.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-radio-items.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAyE;AACzE,kDAAyE;AACzE,iCAAyC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,IAAA,cAAM,EAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAC5C,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,IAAA,gBAAQ,EAClD,UA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S,cAAc,GAAU,IACvC,EACb,uBAAC,sBAAc,IACb,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAC9B,GAAG,EAAE,QAAQ,mBACC,MAAM,0BAGL,IACb,IACL,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,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 { DropdownButton, Kbd, Menu, Typography } from '@neo4j-ndl/react';\nimport { MoonIconOutline, SunIconOutline } from '@neo4j-ndl/react/icons';\nimport { useRef, useState } from 'react';\n\nconst Component = () => {\n const anchorEl = useRef<HTMLButtonElement | null>(null);\n const [isOpen, setIsOpen] = useState(false);\n const [selectedOption, setSelectedOption] = useState<string | null>(\n 'option-1',\n );\n\n return (\n <>\n <Menu\n isOpen={isOpen}\n anchorRef={anchorEl}\n onClose={(_event, _data) => {\n setIsOpen(false);\n }}\n htmlAttributes={{ id: 'radio-items-menu' }}\n >\n <Menu.RadioItem\n title=\"Option 1\"\n leadingVisual={<SunIconOutline />}\n isChecked={selectedOption === 'option-1'}\n onClick={() => {\n setSelectedOption('option-1');\n }}\n />\n <Menu.RadioItem\n title=\"Option 2\"\n leadingVisual={<MoonIconOutline />}\n isChecked={selectedOption === 'option-2'}\n onClick={() => {\n setSelectedOption('option-2');\n }}\n />\n <Menu.RadioItem\n title=\"Option 3\"\n description=\"Option 3 has a description\"\n isChecked={selectedOption === 'option-3'}\n onClick={() => {\n setSelectedOption('option-3');\n }}\n />\n <Menu.RadioItem\n title=\"Option 4\"\n trailingContent={<Kbd keys={['A']} />}\n isChecked={selectedOption === 'option-4'}\n onClick={() => {\n setSelectedOption('option-4');\n }}\n />\n </Menu>\n <div className=\"n-flex n-flex-col n-gap-token-4 n-items-center\">\n <Typography variant=\"body-medium\">\n Selected option: <strong>{selectedOption}</strong>\n </Typography>\n <DropdownButton\n isOpen={isOpen}\n onClick={() => setIsOpen(true)}\n ref={anchorEl}\n aria-haspopup=\"menu\"\n >\n Open menu\n </DropdownButton>\n </div>\n </>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -29,7 +29,7 @@ const Component = () => {
|
|
|
29
29
|
const [isOpen, setIsOpen] = (0, react_2.useState)(false);
|
|
30
30
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_1.Menu, { isOpen: isOpen, anchorRef: anchorEl, onClose: (_event, _data) => {
|
|
31
31
|
setIsOpen(false);
|
|
32
|
-
}, children: [(0, jsx_runtime_1.jsxs)(react_1.Menu.Group, { children: [(0, jsx_runtime_1.jsx)(react_1.Menu.CategoryItem, { children: "Category 1" }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 1", onClick: () => alert('Action1') }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 2", onClick: () => alert('Action2') })] }), (0, jsx_runtime_1.jsx)(react_1.Menu.Divider, {}), (0, jsx_runtime_1.jsxs)(react_1.Menu.Group, { children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 3", description: "Action 3 is disabled", isDisabled: true, onClick: () => alert('Action3') }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 4", description: "Action 4 is awesome", onClick: () => alert('Action4') })] })] }), (0, jsx_runtime_1.jsx)(react_1.FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, children: "Open Menu" })] }));
|
|
32
|
+
}, htmlAttributes: { id: 'category-menu' }, children: [(0, jsx_runtime_1.jsxs)(react_1.Menu.Group, { children: [(0, jsx_runtime_1.jsx)(react_1.Menu.CategoryItem, { children: "Category 1" }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 1", onClick: () => alert('Action1') }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 2", onClick: () => alert('Action2') })] }), (0, jsx_runtime_1.jsx)(react_1.Menu.Divider, {}), (0, jsx_runtime_1.jsxs)(react_1.Menu.Group, { children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 3", description: "Action 3 is disabled", isDisabled: true, onClick: () => alert('Action3') }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 4", description: "Action 4 is awesome", onClick: () => alert('Action4') })] })] }), (0, jsx_runtime_1.jsx)(react_1.FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, "aria-haspopup": "menu", "aria-expanded": isOpen, children: "Open Menu" })] }));
|
|
33
33
|
};
|
|
34
34
|
exports.default = Component;
|
|
35
35
|
//# sourceMappingURL=menu-with-category.story.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-with-category.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-with-category.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAsD;AACtD,iCAAyC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,IAAA,cAAM,EAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,6DACE,wBAAC,YAAI,IACH,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;oBACzB,SAAS,CAAC,KAAK,CAAC,CAAC;gBACnB,CAAC,
|
|
1
|
+
{"version":3,"file":"menu-with-category.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-with-category.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAsD;AACtD,iCAAyC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,IAAA,cAAM,EAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,6DACE,wBAAC,YAAI,IACH,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;oBACzB,SAAS,CAAC,KAAK,CAAC,CAAC;gBACnB,CAAC,EACD,cAAc,EAAE,EAAE,EAAE,EAAE,eAAe,EAAE,aAEvC,wBAAC,YAAI,CAAC,KAAK,eACT,uBAAC,YAAI,CAAC,YAAY,6BAA+B,EACjD,uBAAC,YAAI,CAAC,IAAI,IAAC,KAAK,EAAC,UAAU,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,GAAI,EAC/D,uBAAC,YAAI,CAAC,IAAI,IAAC,KAAK,EAAC,UAAU,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,GAAI,IACpD,EACb,uBAAC,YAAI,CAAC,OAAO,KAAG,EAChB,wBAAC,YAAI,CAAC,KAAK,eACT,uBAAC,YAAI,CAAC,IAAI,IACR,KAAK,EAAC,UAAU,EAChB,WAAW,EAAC,sBAAsB,EAClC,UAAU,EAAE,IAAI,EAChB,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,GAC/B,EACF,uBAAC,YAAI,CAAC,IAAI,IACR,KAAK,EAAC,UAAU,EAChB,WAAW,EAAC,qBAAqB,EACjC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,GAC/B,IACS,IACR,EACP,uBAAC,oBAAY,IACX,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAC9B,GAAG,EAAE,QAAQ,mBACC,MAAM,mBACL,MAAM,0BAGR,IACd,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,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 { FilledButton, Menu } from '@neo4j-ndl/react';\nimport { useRef, useState } from 'react';\n\nconst Component = () => {\n const anchorEl = useRef<HTMLButtonElement | null>(null);\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <>\n <Menu\n isOpen={isOpen}\n anchorRef={anchorEl}\n onClose={(_event, _data) => {\n setIsOpen(false);\n }}\n htmlAttributes={{ id: 'category-menu' }}\n >\n <Menu.Group>\n <Menu.CategoryItem>Category 1</Menu.CategoryItem>\n <Menu.Item title=\"Action 1\" onClick={() => alert('Action1')} />\n <Menu.Item title=\"Action 2\" onClick={() => alert('Action2')} />\n </Menu.Group>\n <Menu.Divider />\n <Menu.Group>\n <Menu.Item\n title=\"Action 3\"\n description=\"Action 3 is disabled\"\n isDisabled={true}\n onClick={() => alert('Action3')}\n />\n <Menu.Item\n title=\"Action 4\"\n description=\"Action 4 is awesome\"\n onClick={() => alert('Action4')}\n />\n </Menu.Group>\n </Menu>\n <FilledButton\n onClick={() => setIsOpen(true)}\n ref={anchorEl}\n aria-haspopup=\"menu\"\n aria-expanded={isOpen}\n >\n Open Menu\n </FilledButton>\n </>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -29,7 +29,7 @@ const Component = () => {
|
|
|
29
29
|
const [isOpen, setIsOpen] = (0, react_2.useState)(false);
|
|
30
30
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_1.Menu, { isOpen: isOpen, anchorRef: anchorEl, onClose: (_event, _data) => {
|
|
31
31
|
setIsOpen(false);
|
|
32
|
-
}, children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 1", description: "Action 1 is disabled", isDisabled: true }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 2", onClick: () => alert('Action2') })] }), (0, jsx_runtime_1.jsx)(react_1.FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, children: "Open Menu" })] }));
|
|
32
|
+
}, htmlAttributes: { id: 'disabled-item-menu' }, children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 1", description: "Action 1 is disabled", isDisabled: true }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 2", onClick: () => alert('Action2') })] }), (0, jsx_runtime_1.jsx)(react_1.FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, "aria-haspopup": "menu", "aria-expanded": isOpen, children: "Open Menu" })] }));
|
|
33
33
|
};
|
|
34
34
|
exports.default = Component;
|
|
35
35
|
//# sourceMappingURL=menu-with-disabled-item.story.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-with-disabled-item.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-with-disabled-item.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAsD;AACtD,iCAAyC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,IAAA,cAAM,EAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,6DACE,wBAAC,YAAI,IACH,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;oBACzB,SAAS,CAAC,KAAK,CAAC,CAAC;gBACnB,CAAC,
|
|
1
|
+
{"version":3,"file":"menu-with-disabled-item.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-with-disabled-item.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAsD;AACtD,iCAAyC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,IAAA,cAAM,EAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,6DACE,wBAAC,YAAI,IACH,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;oBACzB,SAAS,CAAC,KAAK,CAAC,CAAC;gBACnB,CAAC,EACD,cAAc,EAAE,EAAE,EAAE,EAAE,oBAAoB,EAAE,aAE5C,uBAAC,YAAI,CAAC,IAAI,IACR,KAAK,EAAC,UAAU,EAChB,WAAW,EAAC,sBAAsB,EAClC,UAAU,EAAE,IAAI,GAChB,EACF,uBAAC,YAAI,CAAC,IAAI,IAAC,KAAK,EAAC,UAAU,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,GAAI,IAC1D,EACP,uBAAC,oBAAY,IACX,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAC9B,GAAG,EAAE,QAAQ,mBACC,MAAM,mBACL,MAAM,0BAGR,IACd,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,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 { FilledButton, Menu } from '@neo4j-ndl/react';\nimport { useRef, useState } from 'react';\n\nconst Component = () => {\n const anchorEl = useRef<HTMLButtonElement | null>(null);\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <>\n <Menu\n isOpen={isOpen}\n anchorRef={anchorEl}\n onClose={(_event, _data) => {\n setIsOpen(false);\n }}\n htmlAttributes={{ id: 'disabled-item-menu' }}\n >\n <Menu.Item\n title=\"Action 1\"\n description=\"Action 1 is disabled\"\n isDisabled={true}\n />\n <Menu.Item title=\"Action 2\" onClick={() => alert('Action2')} />\n </Menu>\n <FilledButton\n onClick={() => setIsOpen(true)}\n ref={anchorEl}\n aria-haspopup=\"menu\"\n aria-expanded={isOpen}\n >\n Open Menu\n </FilledButton>\n </>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -29,7 +29,7 @@ const Component = () => {
|
|
|
29
29
|
const [isOpen, setIsOpen] = (0, react_2.useState)(false);
|
|
30
30
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_1.Menu, { isOpen: isOpen, anchorRef: anchorEl, onClose: (_event, _data) => {
|
|
31
31
|
setIsOpen(false);
|
|
32
|
-
}, children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 1" }), (0, jsx_runtime_1.jsx)(react_1.Menu.Divider, {}), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 2" }), (0, jsx_runtime_1.jsx)(react_1.Menu.Divider, {}), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 3" }), (0, jsx_runtime_1.jsx)(react_1.Menu.Divider, {}), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 4" })] }), (0, jsx_runtime_1.jsx)(react_1.FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, children: "Open Menu" })] }));
|
|
32
|
+
}, htmlAttributes: { id: 'divider-menu' }, children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 1" }), (0, jsx_runtime_1.jsx)(react_1.Menu.Divider, {}), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 2" }), (0, jsx_runtime_1.jsx)(react_1.Menu.Divider, {}), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 3" }), (0, jsx_runtime_1.jsx)(react_1.Menu.Divider, {}), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Action 4" })] }), (0, jsx_runtime_1.jsx)(react_1.FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, "aria-haspopup": "menu", "aria-expanded": isOpen, children: "Open Menu" })] }));
|
|
33
33
|
};
|
|
34
34
|
exports.default = Component;
|
|
35
35
|
//# sourceMappingURL=menu-with-divider.story.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-with-divider.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-with-divider.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAsD;AACtD,iCAAyC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,IAAA,cAAM,EAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,6DACE,wBAAC,YAAI,IACH,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;oBACzB,SAAS,CAAC,KAAK,CAAC,CAAC;gBACnB,CAAC,
|
|
1
|
+
{"version":3,"file":"menu-with-divider.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-with-divider.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAsD;AACtD,iCAAyC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,IAAA,cAAM,EAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,6DACE,wBAAC,YAAI,IACH,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;oBACzB,SAAS,CAAC,KAAK,CAAC,CAAC;gBACnB,CAAC,EACD,cAAc,EAAE,EAAE,EAAE,EAAE,cAAc,EAAE,aAEtC,uBAAC,YAAI,CAAC,IAAI,IAAC,KAAK,EAAC,UAAU,GAAG,EAC9B,uBAAC,YAAI,CAAC,OAAO,KAAG,EAChB,uBAAC,YAAI,CAAC,IAAI,IAAC,KAAK,EAAC,UAAU,GAAG,EAC9B,uBAAC,YAAI,CAAC,OAAO,KAAG,EAChB,uBAAC,YAAI,CAAC,IAAI,IAAC,KAAK,EAAC,UAAU,GAAG,EAC9B,uBAAC,YAAI,CAAC,OAAO,KAAG,EAChB,uBAAC,YAAI,CAAC,IAAI,IAAC,KAAK,EAAC,UAAU,GAAG,IACzB,EACP,uBAAC,oBAAY,IACX,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAC9B,GAAG,EAAE,QAAQ,mBACC,MAAM,mBACL,MAAM,0BAGR,IACd,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,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 { FilledButton, Menu } from '@neo4j-ndl/react';\nimport { useRef, useState } from 'react';\n\nconst Component = () => {\n const anchorEl = useRef<HTMLButtonElement | null>(null);\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <>\n <Menu\n isOpen={isOpen}\n anchorRef={anchorEl}\n onClose={(_event, _data) => {\n setIsOpen(false);\n }}\n htmlAttributes={{ id: 'divider-menu' }}\n >\n <Menu.Item title=\"Action 1\" />\n <Menu.Divider />\n <Menu.Item title=\"Action 2\" />\n <Menu.Divider />\n <Menu.Item title=\"Action 3\" />\n <Menu.Divider />\n <Menu.Item title=\"Action 4\" />\n </Menu>\n <FilledButton\n onClick={() => setIsOpen(true)}\n ref={anchorEl}\n aria-haspopup=\"menu\"\n aria-expanded={isOpen}\n >\n Open Menu\n </FilledButton>\n </>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -30,7 +30,7 @@ const Component = () => {
|
|
|
30
30
|
const [isOpen, setIsOpen] = (0, react_2.useState)(false);
|
|
31
31
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_1.Menu, { isOpen: isOpen, anchorRef: anchorEl, onClose: (_event, _data) => {
|
|
32
32
|
setIsOpen(false);
|
|
33
|
-
}, children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { leadingVisual: (0, jsx_runtime_1.jsx)(icons_1.PlusIconOutline, {}), title: "Action 1", onClick: () => alert('Action1') }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { leadingVisual: (0, jsx_runtime_1.jsx)(icons_1.PlusIconOutline, {}), title: "Action 2", onClick: () => alert('Action2') }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { leadingVisual: (0, jsx_runtime_1.jsx)(icons_1.PlusIconOutline, {}), title: "Action 3", description: "Action 3 is disabled", isDisabled: true, onClick: () => alert('Action3') }), (0, jsx_runtime_1.jsxs)(react_1.Menu, { title: "Action 3.1", description: "Action with sub menu", icon: (0, jsx_runtime_1.jsx)(icons_1.PlusIconOutline, {}), children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Text" }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Video" }), (0, jsx_runtime_1.jsxs)(react_1.Menu, { title: "Image", icon: (0, jsx_runtime_1.jsx)(icons_1.PhotoIconOutline, {}), children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: ".png" }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: ".jpg" })] }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Audio" })] }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { leadingVisual: (0, jsx_runtime_1.jsx)(icons_1.PlusIconOutline, {}), title: "Action 4", description: "Action 4 is awesome", onClick: () => alert('Action4') })] }), (0, jsx_runtime_1.jsx)(react_1.FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, children: "Open Menu" })] }));
|
|
33
|
+
}, htmlAttributes: { id: 'icon-menu' }, children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { leadingVisual: (0, jsx_runtime_1.jsx)(icons_1.PlusIconOutline, {}), title: "Action 1", onClick: () => alert('Action1') }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { leadingVisual: (0, jsx_runtime_1.jsx)(icons_1.PlusIconOutline, {}), title: "Action 2", onClick: () => alert('Action2') }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { leadingVisual: (0, jsx_runtime_1.jsx)(icons_1.PlusIconOutline, {}), title: "Action 3", description: "Action 3 is disabled", isDisabled: true, onClick: () => alert('Action3') }), (0, jsx_runtime_1.jsxs)(react_1.Menu, { title: "Action 3.1", description: "Action with sub menu", icon: (0, jsx_runtime_1.jsx)(icons_1.PlusIconOutline, {}), children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Text" }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Video" }), (0, jsx_runtime_1.jsxs)(react_1.Menu, { title: "Image", icon: (0, jsx_runtime_1.jsx)(icons_1.PhotoIconOutline, {}), children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: ".png" }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: ".jpg" })] }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { title: "Audio" })] }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { leadingVisual: (0, jsx_runtime_1.jsx)(icons_1.PlusIconOutline, {}), title: "Action 4", description: "Action 4 is awesome", onClick: () => alert('Action4') })] }), (0, jsx_runtime_1.jsx)(react_1.FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, "aria-haspopup": "menu", "aria-expanded": isOpen, children: "Open Menu" })] }));
|
|
34
34
|
};
|
|
35
35
|
exports.default = Component;
|
|
36
36
|
//# sourceMappingURL=menu-with-icon.story.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-with-icon.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-with-icon.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAsD;AACtD,kDAA2E;AAC3E,iCAAyC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,IAAA,cAAM,EAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,6DACE,wBAAC,YAAI,IACH,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;oBACzB,SAAS,CAAC,KAAK,CAAC,CAAC;gBACnB,CAAC,
|
|
1
|
+
{"version":3,"file":"menu-with-icon.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-with-icon.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAsD;AACtD,kDAA2E;AAC3E,iCAAyC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,IAAA,cAAM,EAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,6DACE,wBA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OAAO,GAAG,IACtB,EACP,uBAAC,YAAI,CAAC,IAAI,IACR,aAAa,EAAE,uBAAC,uBAAe,KAAG,EAClC,KAAK,EAAC,UAAU,EAChB,WAAW,EAAC,qBAAqB,EACjC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,GAC/B,IACG,EACP,uBAAC,oBAAY,IACX,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,EAC9B,GAAG,EAAE,QAAQ,mBACC,MAAM,mBACL,MAAM,0BAGR,IACd,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,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 { FilledButton, Menu } from '@neo4j-ndl/react';\nimport { PhotoIconOutline, PlusIconOutline } from '@neo4j-ndl/react/icons';\nimport { useRef, useState } from 'react';\n\nconst Component = () => {\n const anchorEl = useRef<HTMLButtonElement | null>(null);\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <>\n <Menu\n isOpen={isOpen}\n anchorRef={anchorEl}\n onClose={(_event, _data) => {\n setIsOpen(false);\n }}\n htmlAttributes={{ id: 'icon-menu' }}\n >\n <Menu.Item\n leadingVisual={<PlusIconOutline />}\n title=\"Action 1\"\n onClick={() => alert('Action1')}\n />\n <Menu.Item\n leadingVisual={<PlusIconOutline />}\n title=\"Action 2\"\n onClick={() => alert('Action2')}\n />\n <Menu.Item\n leadingVisual={<PlusIconOutline />}\n title=\"Action 3\"\n description=\"Action 3 is disabled\"\n isDisabled={true}\n onClick={() => alert('Action3')}\n />\n <Menu\n title=\"Action 3.1\"\n description=\"Action with sub menu\"\n icon={<PlusIconOutline />}\n >\n <Menu.Item title=\"Text\" />\n <Menu.Item title=\"Video\" />\n <Menu title=\"Image\" icon={<PhotoIconOutline />}>\n <Menu.Item title=\".png\" />\n <Menu.Item title=\".jpg\" />\n </Menu>\n <Menu.Item title=\"Audio\" />\n </Menu>\n <Menu.Item\n leadingVisual={<PlusIconOutline />}\n title=\"Action 4\"\n description=\"Action 4 is awesome\"\n onClick={() => alert('Action4')}\n />\n </Menu>\n <FilledButton\n onClick={() => setIsOpen(true)}\n ref={anchorEl}\n aria-haspopup=\"menu\"\n aria-expanded={isOpen}\n >\n Open Menu\n </FilledButton>\n </>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -30,7 +30,7 @@ const Component = () => {
|
|
|
30
30
|
const [isOpen, setIsOpen] = (0, react_2.useState)(false);
|
|
31
31
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_1.Menu, { isOpen: isOpen, anchorRef: anchorEl, onClose: (_event, _data) => {
|
|
32
32
|
setIsOpen(false);
|
|
33
|
-
}, children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { leadingVisual: (0, jsx_runtime_1.jsx)(icons_1.PlusIconOutline, {}), title: "Action 1", onClick: () => alert('Action1') }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { leadingVisual: (0, jsx_runtime_1.jsx)(icons_1.PlusIconOutline, {}), trailingContent: (0, jsx_runtime_1.jsx)(react_1.Kbd, { keys: ['A', ['B']] }), title: "Action 2", description: "Action 4 has a keyboard shortcut", onClick: () => alert('Action4') })] }), (0, jsx_runtime_1.jsx)(react_1.FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, children: "Open Menu" })] }));
|
|
33
|
+
}, htmlAttributes: { id: 'keyboard-shortcuts-menu' }, children: [(0, jsx_runtime_1.jsx)(react_1.Menu.Item, { leadingVisual: (0, jsx_runtime_1.jsx)(icons_1.PlusIconOutline, {}), title: "Action 1", onClick: () => alert('Action1') }), (0, jsx_runtime_1.jsx)(react_1.Menu.Item, { leadingVisual: (0, jsx_runtime_1.jsx)(icons_1.PlusIconOutline, {}), trailingContent: (0, jsx_runtime_1.jsx)(react_1.Kbd, { keys: ['A', ['B']] }), title: "Action 2", description: "Action 4 has a keyboard shortcut", onClick: () => alert('Action4') })] }), (0, jsx_runtime_1.jsx)(react_1.FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, "aria-haspopup": "menu", "aria-expanded": isOpen, children: "Open Menu" })] }));
|
|
34
34
|
};
|
|
35
35
|
exports.default = Component;
|
|
36
36
|
//# sourceMappingURL=menu-with-keyboard-shortcuts.story.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-with-keyboard-shortcuts.story.js","sourceRoot":"","sources":["../../../../src/menu/stories/menu-with-keyboard-shortcuts.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA2D;AAC3D,kDAAyD;AACzD,iCAAyC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,IAAA,cAAM,EAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,6DACE,wBAAC,YAAI,IACH,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;oBACzB,SAAS,CAAC,KAAK,CAAC,CAAC;gBACnB,CAAC,
|
|
1
|
+
{"version":3,"file":"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,CAAC;AAEF,kBAAe,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 { FilledButton, Kbd, Menu } from '@neo4j-ndl/react';\nimport { PlusIconOutline } from '@neo4j-ndl/react/icons';\nimport { useRef, useState } from 'react';\n\nconst Component = () => {\n const anchorEl = useRef<HTMLButtonElement | null>(null);\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <>\n <Menu\n isOpen={isOpen}\n anchorRef={anchorEl}\n onClose={(_event, _data) => {\n setIsOpen(false);\n }}\n htmlAttributes={{ id: 'keyboard-shortcuts-menu' }}\n >\n <Menu.Item\n leadingVisual={<PlusIconOutline />}\n title=\"Action 1\"\n onClick={() => alert('Action1')}\n />\n <Menu.Item\n leadingVisual={<PlusIconOutline />}\n trailingContent={<Kbd keys={['A', ['B']]} />}\n title=\"Action 2\"\n description=\"Action 4 has a keyboard shortcut\"\n onClick={() => alert('Action4')}\n />\n </Menu>\n <FilledButton\n onClick={() => setIsOpen(true)}\n ref={anchorEl}\n aria-haspopup=\"menu\"\n aria-expanded={isOpen}\n >\n Open Menu\n </FilledButton>\n </>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -38,6 +38,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
38
38
|
*/
|
|
39
39
|
const base_1 = require("@neo4j-ndl/base");
|
|
40
40
|
const classnames_1 = __importDefault(require("classnames"));
|
|
41
|
+
const react_1 = require("react");
|
|
41
42
|
const react_select_1 = require("react-select");
|
|
42
43
|
const checkbox_1 = require("../checkbox");
|
|
43
44
|
const icons_1 = require("../icons");
|
|
@@ -214,7 +215,7 @@ const CustomValueContainer = ({ size, }) => function Component(_a) {
|
|
|
214
215
|
return ((0, jsx_runtime_1.jsx)(react_select_1.components.ValueContainer, Object.assign({}, restProps, { className: classes, children: children })));
|
|
215
216
|
};
|
|
216
217
|
exports.CustomValueContainer = CustomValueContainer;
|
|
217
|
-
const CustomInput = ({ size, }) => function Component(_a) {
|
|
218
|
+
const CustomInput = ({ size, errorText, errorTextId, helpText, helpTextId, }) => function Component(_a) {
|
|
218
219
|
var { className } = _a, restProps = __rest(_a, ["className"]);
|
|
219
220
|
const classes = (0, classnames_1.default)('ndl-select-input', className, {
|
|
220
221
|
'ndl-disabled': restProps.isDisabled,
|
|
@@ -223,7 +224,21 @@ const CustomInput = ({ size, }) => function Component(_a) {
|
|
|
223
224
|
'ndl-medium': size === 'medium',
|
|
224
225
|
'ndl-small': size === 'small',
|
|
225
226
|
});
|
|
226
|
-
|
|
227
|
+
const defaultAriaDescribedBy = restProps['aria-describedby'];
|
|
228
|
+
const combinedAriaDescribedBy = (0, react_1.useMemo)(() => {
|
|
229
|
+
const ariaDescribedBy = [];
|
|
230
|
+
if (defaultAriaDescribedBy) {
|
|
231
|
+
ariaDescribedBy.push(defaultAriaDescribedBy);
|
|
232
|
+
}
|
|
233
|
+
if (helpText && !errorText && helpTextId) {
|
|
234
|
+
ariaDescribedBy.push(helpTextId);
|
|
235
|
+
}
|
|
236
|
+
else if (errorText && errorTextId) {
|
|
237
|
+
ariaDescribedBy.push(errorTextId);
|
|
238
|
+
}
|
|
239
|
+
return ariaDescribedBy.join(' ');
|
|
240
|
+
}, [defaultAriaDescribedBy]);
|
|
241
|
+
return ((0, jsx_runtime_1.jsx)(react_select_1.components.Input, Object.assign({}, restProps, { className: classes, "aria-describedby": combinedAriaDescribedBy })));
|
|
227
242
|
};
|
|
228
243
|
exports.CustomInput = CustomInput;
|
|
229
244
|
const CustomSingleValue = ({ size, }) => function Component(_a) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Overrides.js","sourceRoot":"","sources":["../../../src/select/Overrides.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,0CAAyC;AACzC,4DAAoC;AACpC,+CAcsB;AAMtB,0CAAuC;AACvC,oCAAoE;AACpE,gCAA6B;AAC7B,oCAA0C;AAG1C;;;GAGG;AACH,MAAM,uBAAuB,GAAG,CAC9B,UAAiD,EACjD,eAAe,GAAG,KAAK,EACe,EAAE;IACxC,MAAM,SAAS,GAAG,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,EAAE,CAAC;IACnC,MAAM,oBAAoB,GAAG,CAAC,CAAuB,EAAE,EAAE,CACvD,eAAe,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IAEzC,uCACK,SAAS,KACZ,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE;YACjB,CAAC,CAAC,cAAc,EAAE,CAAC;YACnB,oBAAoB,CAAC,CAAC,CAAC,CAAC;QAC1B,CAAC,EACD,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE;;YACf,MAAA,SAAS,CAAC,SAAS,0DAAG,CAAC,CAAC,CAAC;YACzB,MAAA,SAAS,CAAC,WAAW,0DAAG,CAAC,CAAC,CAAC;YAC3B,oBAAoB,CAAC,CAAC,CAAC,CAAC;QAC1B,CAAC,EACD,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE;;YAChB,MAAA,SAAS,CAAC,UAAU,0DAAG,CAAC,CAAC,CAAC;YAC1B,MAAA,SAAS,CAAC,WAAW,0DAAG,CAAgD,CAAC,CAAC;YAC1E,oBAAoB,CAAC,CAAC,CAAC,CAAC;QAC1B,CAAC,EACD,YAAY,EAAE,CAAC,CAAC,EAAE,EAAE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C,EAAE,EAAE;wBAClB,CAAC,CAAC,cAAc,EAAE,CAAC;oBACrB,CAAC;oBACD,IAAI,EAAE,cAAc;oBACpB,QAAQ,EAAE,CAAC,CAAC;iBACb,GACD,CACH,EACA,QAAQ,KACS,CACrB,CAAC;AACJ,CAAC,CAAC;AA3DS,QAAA,YAAY,gBA2DrB","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 { tokens } from '@neo4j-ndl/base';\nimport classNames from 'classnames';\nimport {\n type ClearIndicatorProps,\n components,\n type ControlProps,\n type DropdownIndicatorProps,\n type GroupBase,\n type IndicatorsContainerProps,\n type InputProps,\n type MenuProps,\n type MultiValueProps,\n type OptionProps,\n type PlaceholderProps,\n type SingleValueProps,\n type ValueContainerProps,\n} from 'react-select';\nimport {\n type MenuListProps,\n type MenuPortalProps,\n} from 'react-select/dist/declarations/src/components/Menu';\n\nimport { Checkbox } from '../checkbox';\nimport { ChevronDownIconOutline, XMarkIconOutline } from '../icons';\nimport { Tag } from '../tag';\nimport { useNeedleTheme } from '../theme';\nimport { type SelectOverrideCustomProps } from './types';\n\n/**\n * React-select triggers control/indicator interactions on mouseDown which breaks WCAG 2.5.2 Pointer Cancellation.\n * This helper shifts mouseDown to mouseUp to allow users to cancel by dragging away.\n */\nconst shiftMouseDownToMouseUp = (\n innerProps?: React.HTMLAttributes<HTMLDivElement>,\n stopPropagation = false,\n): React.HTMLAttributes<HTMLDivElement> => {\n const baseProps = innerProps ?? {};\n const maybeStopPropagation = (e: React.SyntheticEvent) =>\n stopPropagation && e.stopPropagation();\n\n return {\n ...baseProps,\n onMouseDown: (e) => {\n e.preventDefault();\n maybeStopPropagation(e);\n },\n onMouseUp: (e) => {\n baseProps.onMouseUp?.(e);\n baseProps.onMouseDown?.(e);\n maybeStopPropagation(e);\n },\n onTouchEnd: (e) => {\n baseProps.onTouchEnd?.(e);\n baseProps.onMouseDown?.(e as unknown as React.MouseEvent<HTMLDivElement>);\n maybeStopPropagation(e);\n },\n onTouchStart: (e) => {\n e.preventDefault();\n maybeStopPropagation(e);\n },\n };\n};\n\n/**\n * React-select triggers option selection on click which fires on mouseDown.\n * This helper shifts the click handler to mouseUp/touchEnd to allow users to cancel by dragging away.\n */\nconst shiftOptionClickToMouseUp = (\n innerProps?: React.HTMLAttributes<HTMLDivElement>,\n): React.HTMLAttributes<HTMLDivElement> => {\n const baseProps = innerProps ?? {};\n\n return {\n ...baseProps,\n // Remove onClick to prevent double-execution (onMouseUp already calls it, and browser would fire click after mouseup)\n onClick: undefined,\n onMouseDown: (event: React.MouseEvent<HTMLDivElement>) => {\n event.preventDefault();\n },\n onMouseUp: (event: React.MouseEvent<HTMLDivElement>) => {\n baseProps.onMouseUp?.(event);\n baseProps.onClick?.(event);\n },\n onTouchEnd: (event: React.TouchEvent<HTMLDivElement>) => {\n baseProps.onTouchEnd?.(event);\n baseProps.onClick?.(event as unknown as React.MouseEvent<HTMLDivElement>);\n },\n onTouchStart: (event: React.TouchEvent<HTMLDivElement>) => {\n event.preventDefault();\n },\n };\n};\n\nexport const DropdownIndicatorCurrying = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component(\n props: DropdownIndicatorProps<OptionType, IsMulti, GroupType>,\n ) {\n const classes = classNames('ndl-select-dropdown-indicator', {\n 'ndl-disabled': props.isDisabled,\n 'ndl-focused': props.isFocused,\n 'ndl-is-multi': props.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n\n // stopPropagation so that we prevent the control from also toggling the menu (double-toggle)\n const indicatorInnerProps = shiftMouseDownToMouseUp(props.innerProps, true);\n\n return (\n <components.DropdownIndicator\n {...props}\n className={classes}\n innerProps={indicatorInnerProps}\n >\n <ChevronDownIconOutline\n className=\"ndl-select-icon\"\n style={{\n transform: props.selectProps.menuIsOpen\n ? 'rotate(180deg)'\n : 'rotate(0deg)',\n transitionDuration: tokens.motion.duration.quick,\n }}\n />\n </components.DropdownIndicator>\n );\n };\n\nexport const CustomClearIndication = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({\n className,\n innerProps,\n ...restProps\n }: ClearIndicatorProps<OptionType, IsMulti, GroupType>) {\n const classes = classNames('ndl-select-clear', className, {\n 'ndl-focused': restProps.isFocused,\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n\n const handleClear = () => {\n restProps.clearValue?.();\n };\n\n // Stop propagation to prevent react-select's keyboard handling.\n const handleKeyDown = (event: React.KeyboardEvent) => {\n if (event.key === '') {\n event.preventDefault();\n }\n event.stopPropagation();\n event.nativeEvent.stopImmediatePropagation?.();\n };\n\n // Prevent react-select's default clear-on-mousedown/touchend behavior.\n const preventAndStop = (e: React.SyntheticEvent) => {\n e.preventDefault();\n e.stopPropagation();\n };\n\n const safeInnerProps: typeof innerProps = {\n ...innerProps,\n 'aria-hidden': undefined, // Remove to allow focusable button inside\n onMouseDown: preventAndStop,\n onMouseUp: preventAndStop,\n onTouchEnd: preventAndStop,\n };\n\n return (\n <components.ClearIndicator\n className={classes}\n innerProps={safeInnerProps}\n {...restProps}\n >\n <button\n type=\"button\"\n className=\"ndl-select-clear-button\"\n onClick={handleClear}\n onKeyDown={handleKeyDown}\n aria-label=\"Clear selection\"\n >\n <XMarkIconOutline />\n </button>\n <div className=\"ndl-select-divider\" />\n </components.ClearIndicator>\n );\n };\n\nexport const CustomMultiValue = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({\n children,\n className,\n ...restProps\n }: MultiValueProps<OptionType, IsMulti, GroupType>) {\n const classes = classNames('ndl-select-multi-value', className, {\n 'ndl-disabled': restProps.isDisabled,\n 'ndl-focused': restProps.isFocused,\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n return (\n <components.MultiValueContainer\n {...restProps}\n innerProps={{\n className: classes,\n }}\n >\n <Tag\n size={size}\n onClick={(e) => {\n e.preventDefault();\n restProps.removeProps.onClick?.(\n e as unknown as React.MouseEvent<HTMLDivElement, MouseEvent>,\n );\n }}\n htmlAttributes={{\n onMouseDown: (e) => e.preventDefault(),\n }}\n >\n {children}\n </Tag>\n </components.MultiValueContainer>\n );\n };\n\nexport const CustomPlaceholder = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({\n children,\n className,\n ...restProps\n }: PlaceholderProps<OptionType, IsMulti, GroupType>) {\n const classes = classNames('ndl-select-placeholder', className, {\n 'ndl-disabled': restProps.isDisabled,\n 'ndl-focused': restProps.isFocused,\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n return (\n <components.Placeholder {...restProps} className={classes}>\n {children}\n </components.Placeholder>\n );\n };\n\nexport const CustomControl = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n isClean,\n errorText,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({ children, className, ...restProps }: ControlProps) {\n const classes = classNames('ndl-select-control', className, {\n 'ndl-clean': isClean,\n 'ndl-disabled': restProps.isDisabled,\n 'ndl-focused': restProps.isFocused,\n 'ndl-has-error': !!errorText,\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n\n const controlInnerProps = shiftMouseDownToMouseUp(restProps.innerProps);\n\n return (\n <components.Control\n {...restProps}\n className={classes}\n innerProps={controlInnerProps}\n >\n {children}\n </components.Control>\n );\n };\n\nexport const CustomIndicatorsContainer = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({\n children,\n className,\n ...restProps\n }: IndicatorsContainerProps) {\n const classes = classNames('ndl-select-indicators-container', className, {\n 'ndl-disabled': restProps.isDisabled,\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n return (\n <components.IndicatorsContainer {...restProps} className={classes}>\n {children}\n </components.IndicatorsContainer>\n );\n };\n\nexport const CustomValueContainer = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({\n children,\n className,\n ...restProps\n }: ValueContainerProps) {\n const classes = classNames('ndl-select-value-container', className, {\n 'ndl-disabled': restProps.isDisabled,\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n return (\n <components.ValueContainer {...restProps} className={classes}>\n {children}\n </components.ValueContainer>\n );\n };\n\nexport const CustomInput = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({ className, ...restProps }: InputProps) {\n const classes = classNames('ndl-select-input', className, {\n 'ndl-disabled': restProps.isDisabled,\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n return <components.Input {...restProps} className={classes} />;\n };\n\nexport const CustomSingleValue = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({ className, ...restProps }: SingleValueProps) {\n const classes = classNames('ndl-select-single-value', className, {\n 'ndl-disabled': restProps.isDisabled,\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n return <components.SingleValue {...restProps} className={classes} />;\n };\n\n/** Overrides that are part of the popover menu */\n\nexport const CustomMenu = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({ children, className, ...restProps }: MenuProps) {\n const { themeClassName } = useNeedleTheme();\n const classes = classNames('ndl-select-menu', className, themeClassName, {\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n return (\n <components.Menu {...restProps} className={classes}>\n {children}\n </components.Menu>\n );\n };\n\nexport const CustomMenuPortal = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({\n children,\n className,\n ...restProps\n }: MenuPortalProps<OptionType, IsMulti, GroupType>) {\n const classes = classNames(className, 'ndl-select-menu-portal', {\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n return (\n <components.MenuPortal {...restProps} className={classes}>\n {children}\n </components.MenuPortal>\n );\n };\n\nexport const CustomMenuList = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({\n children,\n className,\n ...restProps\n }: MenuListProps<OptionType, IsMulti, GroupType>) {\n const classes = classNames(className, 'ndl-select-menu-list', {\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n return (\n <components.MenuList {...restProps} className={classes}>\n {children}\n </components.MenuList>\n );\n };\n\nexport const CustomOption = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({\n children,\n className,\n ...restProps\n }: OptionProps<OptionType, IsMulti, GroupType>) {\n const classes = classNames(className, 'ndl-select-option', {\n 'ndl-disabled': restProps.isDisabled,\n 'ndl-focused': restProps.isFocused,\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-selected': restProps.isSelected,\n 'ndl-small': size === 'small',\n });\n const optionInnerProps = shiftOptionClickToMouseUp(restProps.innerProps);\n\n return (\n <components.Option\n {...restProps}\n className={classes}\n innerProps={optionInnerProps}\n >\n {restProps.isMulti === true && (\n <Checkbox\n isChecked={restProps.isSelected}\n ariaLabel={restProps.label}\n isDisabled={restProps.isDisabled}\n htmlAttributes={{\n 'aria-hidden': true,\n disabled: true,\n onPointerDown: (e) => {\n e.preventDefault();\n },\n onPointerUp: (e) => {\n restProps.innerProps.onClick?.(e);\n },\n onTouchEnd: (e) => {\n restProps.innerProps.onClick?.(\n e as unknown as React.MouseEvent<HTMLDivElement, MouseEvent>,\n );\n },\n onTouchStart: (e) => {\n e.preventDefault();\n },\n role: 'presentation',\n tabIndex: -1,\n }}\n />\n )}\n {children}\n </components.Option>\n );\n };\n"]}
|
|
1
|
+
{"version":3,"file":"Overrides.js","sourceRoot":"","sources":["../../../src/select/Overrides.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,0CAAyC;AACzC,4DAAoC;AACpC,iCAAgC;AAChC,+CAcsB;AAMtB,0CAAuC;AACvC,oCAAoE;AACpE,gCAA6B;AAC7B,oCAA0C;AAG1C;;;GAGG;AACH,MAAM,uBAAuB,GAAG,CAC9B,UAAiD,EACjD,eAAe,GAAG,KAAK,EACe,EAAE;IACxC,MAAM,SAAS,GAAG,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,EAAE,CAAC;IACnC,MAAM,oBAAoB,GAAG,CAAC,CAAuB,EAAE,EAAE,CACvD,eAAe,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IAEzC,uCACK,SAAS,KACZ,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE;YACjB,CAAC,CAAC,cAAc,EAAE,CAAC;YACnB,oBAAoB,CAAC,CAAC,CAAC,CAAC;QAC1B,CAAC,EACD,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE;;YACf,MAAA,SAAS,CAAC,SAAS,0DAAG,CAAC,CAAC,CAAC;YACzB,MAAA,SAAS,CAAC,WAAW,0DAAG,CAAC,CAAC,CAAC;YAC3B,oBAAoB,CAAC,CAAC,CAAC,CAAC;QAC1B,CAAC,EACD,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE;;YAChB,MAAA,SAAS,CAAC,UAAU,0DAAG,C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,CAAC;IACH,MAAM,gBAAgB,GAAG,yBAAyB,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAEzE,OAAO,CACL,wBAAC,yBAAU,CAAC,MAAM,oBACZ,SAAS,IACb,SAAS,EAAE,OAAO,EAClB,UAAU,EAAE,gBAAgB,aAE3B,SAAS,CAAC,OAAO,KAAK,IAAI,IAAI,CAC7B,uBAAC,mBAAQ,IACP,SAAS,EAAE,SAAS,CAAC,UAAU,EAC/B,SAAS,EAAE,SAAS,CAAC,KAAK,EAC1B,UAAU,EAAE,SAAS,CAAC,UAAU,EAChC,cAAc,EAAE;oBACd,aAAa,EAAE,IAAI;oBACnB,QAAQ,EAAE,IAAI;oBACd,aAAa,EAAE,CAAC,CAAC,EAAE,EAAE;wBACnB,CAAC,CAAC,cAAc,EAAE,CAAC;oBACrB,CAAC;oBACD,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE;;wBACjB,MAAA,MAAA,SAAS,CAAC,UAAU,EAAC,OAAO,mDAAG,CAAC,CAAC,CAAC;oBACpC,CAAC;oBACD,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE;;wBAChB,MAAA,MAAA,SAAS,CAAC,UAAU,EAAC,OAAO,mDAC1B,CAA4D,CAC7D,CAAC;oBACJ,CAAC;oBACD,YAAY,EAAE,CAAC,CAAC,EAAE,EAAE;wBAClB,CAAC,CAAC,cAAc,EAAE,CAAC;oBACrB,CAAC;oBACD,IAAI,EAAE,cAAc;oBACpB,QAAQ,EAAE,CAAC,CAAC;iBACb,GACD,CACH,EACA,QAAQ,KACS,CACrB,CAAC;AACJ,CAAC,CAAC;AA3DS,QAAA,YAAY,gBA2DrB","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 { tokens } from '@neo4j-ndl/base';\nimport classNames from 'classnames';\nimport { useMemo } from 'react';\nimport {\n type ClearIndicatorProps,\n components,\n type ControlProps,\n type DropdownIndicatorProps,\n type GroupBase,\n type IndicatorsContainerProps,\n type InputProps,\n type MenuProps,\n type MultiValueProps,\n type OptionProps,\n type PlaceholderProps,\n type SingleValueProps,\n type ValueContainerProps,\n} from 'react-select';\nimport {\n type MenuListProps,\n type MenuPortalProps,\n} from 'react-select/dist/declarations/src/components/Menu';\n\nimport { Checkbox } from '../checkbox';\nimport { ChevronDownIconOutline, XMarkIconOutline } from '../icons';\nimport { Tag } from '../tag';\nimport { useNeedleTheme } from '../theme';\nimport { type SelectOverrideCustomProps } from './types';\n\n/**\n * React-select triggers control/indicator interactions on mouseDown which breaks WCAG 2.5.2 Pointer Cancellation.\n * This helper shifts mouseDown to mouseUp to allow users to cancel by dragging away.\n */\nconst shiftMouseDownToMouseUp = (\n innerProps?: React.HTMLAttributes<HTMLDivElement>,\n stopPropagation = false,\n): React.HTMLAttributes<HTMLDivElement> => {\n const baseProps = innerProps ?? {};\n const maybeStopPropagation = (e: React.SyntheticEvent) =>\n stopPropagation && e.stopPropagation();\n\n return {\n ...baseProps,\n onMouseDown: (e) => {\n e.preventDefault();\n maybeStopPropagation(e);\n },\n onMouseUp: (e) => {\n baseProps.onMouseUp?.(e);\n baseProps.onMouseDown?.(e);\n maybeStopPropagation(e);\n },\n onTouchEnd: (e) => {\n baseProps.onTouchEnd?.(e);\n baseProps.onMouseDown?.(e as unknown as React.MouseEvent<HTMLDivElement>);\n maybeStopPropagation(e);\n },\n onTouchStart: (e) => {\n e.preventDefault();\n maybeStopPropagation(e);\n },\n };\n};\n\n/**\n * React-select triggers option selection on click which fires on mouseDown.\n * This helper shifts the click handler to mouseUp/touchEnd to allow users to cancel by dragging away.\n */\nconst shiftOptionClickToMouseUp = (\n innerProps?: React.HTMLAttributes<HTMLDivElement>,\n): React.HTMLAttributes<HTMLDivElement> => {\n const baseProps = innerProps ?? {};\n\n return {\n ...baseProps,\n // Remove onClick to prevent double-execution (onMouseUp already calls it, and browser would fire click after mouseup)\n onClick: undefined,\n onMouseDown: (event: React.MouseEvent<HTMLDivElement>) => {\n event.preventDefault();\n },\n onMouseUp: (event: React.MouseEvent<HTMLDivElement>) => {\n baseProps.onMouseUp?.(event);\n baseProps.onClick?.(event);\n },\n onTouchEnd: (event: React.TouchEvent<HTMLDivElement>) => {\n baseProps.onTouchEnd?.(event);\n baseProps.onClick?.(event as unknown as React.MouseEvent<HTMLDivElement>);\n },\n onTouchStart: (event: React.TouchEvent<HTMLDivElement>) => {\n event.preventDefault();\n },\n };\n};\n\nexport const DropdownIndicatorCurrying = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component(\n props: DropdownIndicatorProps<OptionType, IsMulti, GroupType>,\n ) {\n const classes = classNames('ndl-select-dropdown-indicator', {\n 'ndl-disabled': props.isDisabled,\n 'ndl-focused': props.isFocused,\n 'ndl-is-multi': props.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n\n // stopPropagation so that we prevent the control from also toggling the menu (double-toggle)\n const indicatorInnerProps = shiftMouseDownToMouseUp(props.innerProps, true);\n\n return (\n <components.DropdownIndicator\n {...props}\n className={classes}\n innerProps={indicatorInnerProps}\n >\n <ChevronDownIconOutline\n className=\"ndl-select-icon\"\n style={{\n transform: props.selectProps.menuIsOpen\n ? 'rotate(180deg)'\n : 'rotate(0deg)',\n transitionDuration: tokens.motion.duration.quick,\n }}\n />\n </components.DropdownIndicator>\n );\n };\n\nexport const CustomClearIndication = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({\n className,\n innerProps,\n ...restProps\n }: ClearIndicatorProps<OptionType, IsMulti, GroupType>) {\n const classes = classNames('ndl-select-clear', className, {\n 'ndl-focused': restProps.isFocused,\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n\n const handleClear = () => {\n restProps.clearValue?.();\n };\n\n // Stop propagation to prevent react-select's keyboard handling.\n const handleKeyDown = (event: React.KeyboardEvent) => {\n if (event.key === '') {\n event.preventDefault();\n }\n event.stopPropagation();\n event.nativeEvent.stopImmediatePropagation?.();\n };\n\n // Prevent react-select's default clear-on-mousedown/touchend behavior.\n const preventAndStop = (e: React.SyntheticEvent) => {\n e.preventDefault();\n e.stopPropagation();\n };\n\n const safeInnerProps: typeof innerProps = {\n ...innerProps,\n 'aria-hidden': undefined, // Remove to allow focusable button inside\n onMouseDown: preventAndStop,\n onMouseUp: preventAndStop,\n onTouchEnd: preventAndStop,\n };\n\n return (\n <components.ClearIndicator\n className={classes}\n innerProps={safeInnerProps}\n {...restProps}\n >\n <button\n type=\"button\"\n className=\"ndl-select-clear-button\"\n onClick={handleClear}\n onKeyDown={handleKeyDown}\n aria-label=\"Clear selection\"\n >\n <XMarkIconOutline />\n </button>\n <div className=\"ndl-select-divider\" />\n </components.ClearIndicator>\n );\n };\n\nexport const CustomMultiValue = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({\n children,\n className,\n ...restProps\n }: MultiValueProps<OptionType, IsMulti, GroupType>) {\n const classes = classNames('ndl-select-multi-value', className, {\n 'ndl-disabled': restProps.isDisabled,\n 'ndl-focused': restProps.isFocused,\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n return (\n <components.MultiValueContainer\n {...restProps}\n innerProps={{\n className: classes,\n }}\n >\n <Tag\n size={size}\n onClick={(e) => {\n e.preventDefault();\n restProps.removeProps.onClick?.(\n e as unknown as React.MouseEvent<HTMLDivElement, MouseEvent>,\n );\n }}\n htmlAttributes={{\n onMouseDown: (e) => e.preventDefault(),\n }}\n >\n {children}\n </Tag>\n </components.MultiValueContainer>\n );\n };\n\nexport const CustomPlaceholder = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({\n children,\n className,\n ...restProps\n }: PlaceholderProps<OptionType, IsMulti, GroupType>) {\n const classes = classNames('ndl-select-placeholder', className, {\n 'ndl-disabled': restProps.isDisabled,\n 'ndl-focused': restProps.isFocused,\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n return (\n <components.Placeholder {...restProps} className={classes}>\n {children}\n </components.Placeholder>\n );\n };\n\nexport const CustomControl = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n isClean,\n errorText,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({ children, className, ...restProps }: ControlProps) {\n const classes = classNames('ndl-select-control', className, {\n 'ndl-clean': isClean,\n 'ndl-disabled': restProps.isDisabled,\n 'ndl-focused': restProps.isFocused,\n 'ndl-has-error': !!errorText,\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n\n const controlInnerProps = shiftMouseDownToMouseUp(restProps.innerProps);\n\n return (\n <components.Control\n {...restProps}\n className={classes}\n innerProps={controlInnerProps}\n >\n {children}\n </components.Control>\n );\n };\n\nexport const CustomIndicatorsContainer = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({\n children,\n className,\n ...restProps\n }: IndicatorsContainerProps) {\n const classes = classNames('ndl-select-indicators-container', className, {\n 'ndl-disabled': restProps.isDisabled,\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n return (\n <components.IndicatorsContainer {...restProps} className={classes}>\n {children}\n </components.IndicatorsContainer>\n );\n };\n\nexport const CustomValueContainer = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({\n children,\n className,\n ...restProps\n }: ValueContainerProps) {\n const classes = classNames('ndl-select-value-container', className, {\n 'ndl-disabled': restProps.isDisabled,\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n return (\n <components.ValueContainer {...restProps} className={classes}>\n {children}\n </components.ValueContainer>\n );\n };\n\nexport const CustomInput = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n errorText,\n errorTextId,\n helpText,\n helpTextId,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({ className, ...restProps }: InputProps) {\n const classes = classNames('ndl-select-input', className, {\n 'ndl-disabled': restProps.isDisabled,\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n\n const defaultAriaDescribedBy = restProps['aria-describedby'];\n\n const combinedAriaDescribedBy = useMemo(() => {\n const ariaDescribedBy: string[] = [];\n\n if (defaultAriaDescribedBy) {\n ariaDescribedBy.push(defaultAriaDescribedBy);\n }\n\n if (helpText && !errorText && helpTextId) {\n ariaDescribedBy.push(helpTextId);\n } else if (errorText && errorTextId) {\n ariaDescribedBy.push(errorTextId);\n }\n\n return ariaDescribedBy.join(' ');\n }, [defaultAriaDescribedBy]);\n\n return (\n <components.Input\n {...restProps}\n className={classes}\n aria-describedby={combinedAriaDescribedBy}\n />\n );\n };\n\nexport const CustomSingleValue = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({ className, ...restProps }: SingleValueProps) {\n const classes = classNames('ndl-select-single-value', className, {\n 'ndl-disabled': restProps.isDisabled,\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n return <components.SingleValue {...restProps} className={classes} />;\n };\n\n/** Overrides that are part of the popover menu */\n\nexport const CustomMenu = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({ children, className, ...restProps }: MenuProps) {\n const { themeClassName } = useNeedleTheme();\n const classes = classNames('ndl-select-menu', className, themeClassName, {\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n return (\n <components.Menu {...restProps} className={classes}>\n {children}\n </components.Menu>\n );\n };\n\nexport const CustomMenuPortal = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({\n children,\n className,\n ...restProps\n }: MenuPortalProps<OptionType, IsMulti, GroupType>) {\n const classes = classNames(className, 'ndl-select-menu-portal', {\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n return (\n <components.MenuPortal {...restProps} className={classes}>\n {children}\n </components.MenuPortal>\n );\n };\n\nexport const CustomMenuList = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({\n children,\n className,\n ...restProps\n }: MenuListProps<OptionType, IsMulti, GroupType>) {\n const classes = classNames(className, 'ndl-select-menu-list', {\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n return (\n <components.MenuList {...restProps} className={classes}>\n {children}\n </components.MenuList>\n );\n };\n\nexport const CustomOption = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n function Component({\n children,\n className,\n ...restProps\n }: OptionProps<OptionType, IsMulti, GroupType>) {\n const classes = classNames(className, 'ndl-select-option', {\n 'ndl-disabled': restProps.isDisabled,\n 'ndl-focused': restProps.isFocused,\n 'ndl-is-multi': restProps.isMulti,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-selected': restProps.isSelected,\n 'ndl-small': size === 'small',\n });\n const optionInnerProps = shiftOptionClickToMouseUp(restProps.innerProps);\n\n return (\n <components.Option\n {...restProps}\n className={classes}\n innerProps={optionInnerProps}\n >\n {restProps.isMulti === true && (\n <Checkbox\n isChecked={restProps.isSelected}\n ariaLabel={restProps.label}\n isDisabled={restProps.isDisabled}\n htmlAttributes={{\n 'aria-hidden': true,\n disabled: true,\n onPointerDown: (e) => {\n e.preventDefault();\n },\n onPointerUp: (e) => {\n restProps.innerProps.onClick?.(e);\n },\n onTouchEnd: (e) => {\n restProps.innerProps.onClick?.(\n e as unknown as React.MouseEvent<HTMLDivElement, MouseEvent>,\n );\n },\n onTouchStart: (e) => {\n e.preventDefault();\n },\n role: 'presentation',\n tabIndex: -1,\n }}\n />\n )}\n {children}\n </components.Option>\n );\n };\n"]}
|
package/lib/cjs/select/Select.js
CHANGED
|
@@ -97,6 +97,8 @@ const Select = (_a) => {
|
|
|
97
97
|
const isInsideDialog = (0, dialog_context_1.useIsInsideDialog)();
|
|
98
98
|
const menuPosition = isInsideDialog ? 'fixed' : 'absolute';
|
|
99
99
|
const identifier = (0, react_1.useId)();
|
|
100
|
+
const helpTextId = (0, react_1.useId)();
|
|
101
|
+
const errorTextId = (0, react_1.useId)();
|
|
100
102
|
const [isMenuOpen, setIsMenuOpen] = (0, react_1.useState)(false);
|
|
101
103
|
const handleMenuOpen = () => {
|
|
102
104
|
setIsMenuOpen(true);
|
|
@@ -122,9 +124,12 @@ const Select = (_a) => {
|
|
|
122
124
|
const Component = as !== null && as !== void 0 ? as : 'div';
|
|
123
125
|
const ComponentOverrides = (0, react_1.useMemo)(() => overrideComponents({
|
|
124
126
|
errorText,
|
|
127
|
+
errorTextId,
|
|
128
|
+
helpText,
|
|
129
|
+
helpTextId,
|
|
125
130
|
isClean,
|
|
126
131
|
size,
|
|
127
|
-
}), [errorText, size, isClean]);
|
|
132
|
+
}), [errorText, errorTextId, helpText, helpTextId, size, isClean]);
|
|
128
133
|
const StyleOverrides = (0, react_1.useMemo)(() => customStyles(), []);
|
|
129
134
|
(0, react_1.useEffect)(() => {
|
|
130
135
|
if (label === undefined && ariaLabel === undefined) {
|
|
@@ -134,14 +139,14 @@ const Select = (_a) => {
|
|
|
134
139
|
let SelectElement;
|
|
135
140
|
switch (type) {
|
|
136
141
|
case 'async': {
|
|
137
|
-
SelectElement = ((0, jsx_runtime_1.jsx)(async_1.default, Object.assign({ name: identifier, inputId: identifier, isDisabled: Boolean(isDisabled) || selectProps.isDisabled, menuPlacement: "auto", "aria-label": ariaLabel }, selectProps, { onKeyDown: handleKeyDown, onMenuOpen: handleMenuOpen, onMenuClose: handleMenuClose, menuPosition: (_b = selectProps.menuPosition) !== null && _b !== void 0 ? _b : menuPosition, hideSelectedOptions: false, closeMenuOnSelect: Boolean(selectProps.isMulti) === false, styles: Object.assign(Object.assign({}, StyleOverrides), selectProps.styles), components: Object.assign(Object.assign({}, ComponentOverrides), selectProps.components) })));
|
|
142
|
+
SelectElement = ((0, jsx_runtime_1.jsx)(async_1.default, Object.assign({ name: identifier, inputId: identifier, isDisabled: Boolean(isDisabled) || selectProps.isDisabled, menuPlacement: "auto", "aria-label": ariaLabel, "aria-invalid": Boolean(errorText) }, selectProps, { onKeyDown: handleKeyDown, onMenuOpen: handleMenuOpen, onMenuClose: handleMenuClose, menuPosition: (_b = selectProps.menuPosition) !== null && _b !== void 0 ? _b : menuPosition, hideSelectedOptions: false, closeMenuOnSelect: Boolean(selectProps.isMulti) === false, styles: Object.assign(Object.assign({}, StyleOverrides), selectProps.styles), components: Object.assign(Object.assign({}, ComponentOverrides), selectProps.components) })));
|
|
138
143
|
break;
|
|
139
144
|
}
|
|
140
145
|
case 'creatable':
|
|
141
|
-
SelectElement = ((0, jsx_runtime_1.jsx)(creatable_1.default, Object.assign({ name: identifier, inputId: identifier, isDisabled: Boolean(isDisabled) || selectProps.isDisabled, menuPlacement: "auto" }, selectProps, { "aria-label": ariaLabel, onKeyDown: handleKeyDown, onMenuOpen: handleMenuOpen, onMenuClose: handleMenuClose, menuPosition: (_c = selectProps.menuPosition) !== null && _c !== void 0 ? _c : menuPosition, hideSelectedOptions: false, closeMenuOnSelect: Boolean(selectProps.isMulti) === false, styles: Object.assign(Object.assign({}, StyleOverrides), selectProps.styles), components: Object.assign(Object.assign({}, ComponentOverrides), selectProps.components) })));
|
|
146
|
+
SelectElement = ((0, jsx_runtime_1.jsx)(creatable_1.default, Object.assign({ name: identifier, inputId: identifier, isDisabled: Boolean(isDisabled) || selectProps.isDisabled, menuPlacement: "auto" }, selectProps, { "aria-label": ariaLabel, "aria-invalid": Boolean(errorText), onKeyDown: handleKeyDown, onMenuOpen: handleMenuOpen, onMenuClose: handleMenuClose, menuPosition: (_c = selectProps.menuPosition) !== null && _c !== void 0 ? _c : menuPosition, hideSelectedOptions: false, closeMenuOnSelect: Boolean(selectProps.isMulti) === false, styles: Object.assign(Object.assign({}, StyleOverrides), selectProps.styles), components: Object.assign(Object.assign({}, ComponentOverrides), selectProps.components) })));
|
|
142
147
|
break;
|
|
143
148
|
default:
|
|
144
|
-
SelectElement = ((0, jsx_runtime_1.jsx)(react_select_1.default, Object.assign({ name: identifier, inputId: identifier, isDisabled: Boolean(isDisabled) || selectProps.isDisabled, menuPlacement: "auto" }, selectProps, { "aria-label": ariaLabel, onKeyDown: handleKeyDown, onMenuOpen: handleMenuOpen, onMenuClose: handleMenuClose, menuPosition: (_d = selectProps.menuPosition) !== null && _d !== void 0 ? _d : menuPosition, hideSelectedOptions: false, closeMenuOnSelect: Boolean(selectProps.isMulti) === false, styles: Object.assign(Object.assign({}, StyleOverrides), selectProps.styles), components: Object.assign(Object.assign({}, ComponentOverrides), selectProps.components) })));
|
|
149
|
+
SelectElement = ((0, jsx_runtime_1.jsx)(react_select_1.default, Object.assign({ name: identifier, inputId: identifier, isDisabled: Boolean(isDisabled) || selectProps.isDisabled, menuPlacement: "auto" }, selectProps, { "aria-label": ariaLabel, "aria-invalid": Boolean(errorText), onKeyDown: handleKeyDown, onMenuOpen: handleMenuOpen, onMenuClose: handleMenuClose, menuPosition: (_d = selectProps.menuPosition) !== null && _d !== void 0 ? _d : menuPosition, hideSelectedOptions: false, closeMenuOnSelect: Boolean(selectProps.isMulti) === false, styles: Object.assign(Object.assign({}, StyleOverrides), selectProps.styles), components: Object.assign(Object.assign({}, ComponentOverrides), selectProps.components) })));
|
|
145
150
|
}
|
|
146
151
|
const classes = (0, classnames_1.default)('ndl-select', className, {
|
|
147
152
|
'ndl-creatable': type === 'creatable',
|
|
@@ -153,7 +158,7 @@ const Select = (_a) => {
|
|
|
153
158
|
'ndl-multi': selectProps.isMulti,
|
|
154
159
|
'ndl-small': size === 'small',
|
|
155
160
|
});
|
|
156
|
-
return ((0, jsx_runtime_1.jsxs)(Component, Object.assign({ ref: ref, className: classes, style: style }, restProps, htmlAttributes, { children: [Boolean(label) && (0, jsx_runtime_1.jsx)("label", { htmlFor: identifier, children: label }), SelectElement, Boolean(helpText) && Boolean(errorText) === false && ((0, jsx_runtime_1.jsx)(typography_1.Typography, { variant: size === 'large' ? 'body-medium' : 'body-small', className: "ndl-sub-text", children: helpText })), Boolean(errorText) && ((0, jsx_runtime_1.jsxs)("div", { className: "n-flex n-flex-row n-gap-token-4 n-items-center", children: [(0, jsx_runtime_1.jsx)(icons_1.ExclamationCircleIconSolid, { className: (0, classnames_1.default)('ndl-error-icon', classes), htmlAttributes: { role: 'img', type: 'solid' } }), (0, jsx_runtime_1.jsx)("span", { className: "ndl-sub-text ndl-error-text", children: errorText })] }))] })));
|
|
161
|
+
return ((0, jsx_runtime_1.jsxs)(Component, Object.assign({ ref: ref, className: classes, style: style }, restProps, htmlAttributes, { children: [Boolean(label) && (0, jsx_runtime_1.jsx)("label", { htmlFor: identifier, children: label }), SelectElement, Boolean(helpText) && Boolean(errorText) === false && ((0, jsx_runtime_1.jsx)(typography_1.Typography, { variant: size === 'large' ? 'body-medium' : 'body-small', className: "ndl-sub-text", htmlAttributes: { id: helpTextId }, children: helpText })), Boolean(errorText) && ((0, jsx_runtime_1.jsxs)("div", { className: "n-flex n-flex-row n-gap-token-4 n-items-center", children: [(0, jsx_runtime_1.jsx)(icons_1.ExclamationCircleIconSolid, { className: (0, classnames_1.default)('ndl-error-icon', classes), htmlAttributes: { role: 'img', type: 'solid' } }), (0, jsx_runtime_1.jsx)("span", { id: errorTextId, className: "ndl-sub-text ndl-error-text", children: errorText })] }))] })));
|
|
157
162
|
};
|
|
158
163
|
exports.Select = Select;
|
|
159
164
|
//# sourceMappingURL=Select.js.map
|