@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,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,MAAM,CAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,C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,IACH,KAAK,EAAC,SAAS,EACf,WAAW,EAAC,sBAAsB,EAClC,IAAI,EAAE,KAAC,uBAAuB,KAAG,aAEjC,KAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,MAAM,GAAG,EAC1B,KAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,OAAO,GAAG,EAC3B,MAAC,IAAI,IAAC,KAAK,EAAC,OAAO,aACjB,KAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,MAAM,GAAG,EAC1B,KAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,MAAM,GAAG,EAC1B,KAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,MAAM,GAAG,EAC1B,KAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,MAAM,GAAG,IACrB,EACP,KAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,OAAO,GAAG,IACtB,EACP,MAAC,IAAI,IAAC,KAAK,EAAC,OAAO,aACjB,KAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,MAAM,GAAG,EAC1B,KAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,WAAW,GAAG,IAC1B,IACF,EACP,KAAC,YAAY,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,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { 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"]}
|
|
@@ -27,7 +27,7 @@ const Component = () => {
|
|
|
27
27
|
const [isOpen, setIsOpen] = useState(false);
|
|
28
28
|
return (_jsxs(_Fragment, { children: [_jsxs(Menu, { isOpen: isOpen, anchorRef: anchorEl, placement: "middle-end-middle-start", onClose: (_event, _data) => {
|
|
29
29
|
setIsOpen(false);
|
|
30
|
-
}, children: [_jsx(Menu.Item, { title: "Action 1", onClick: () => {
|
|
30
|
+
}, htmlAttributes: { id: 'placements-menu' }, children: [_jsx(Menu.Item, { title: "Action 1", onClick: () => {
|
|
31
31
|
alert('Action1');
|
|
32
32
|
setIsOpen(false);
|
|
33
33
|
} }), _jsx(Menu.Item, { title: "Action 2", onClick: () => {
|
|
@@ -39,7 +39,7 @@ const Component = () => {
|
|
|
39
39
|
} }), _jsx(Menu.Item, { title: "Action 4", description: "Action 4 is awesome", onClick: () => {
|
|
40
40
|
alert('Action4');
|
|
41
41
|
setIsOpen(false);
|
|
42
|
-
} }), _jsx(Menu.Item, { id: "action_5", title: "Action 5", description: "Action 5 does not close the menu" })] }), _jsx(FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, children: "Open Menu" })] }));
|
|
42
|
+
} }), _jsx(Menu.Item, { id: "action_5", title: "Action 5", description: "Action 5 does not close the menu" })] }), _jsx(FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, "aria-haspopup": "menu", "aria-expanded": isOpen, children: "Open Menu" })] }));
|
|
43
43
|
};
|
|
44
44
|
export default Component;
|
|
45
45
|
//# 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,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,MAAM,CAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,8BACE,MAAC,IAAI,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,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,MAAM,CAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,8BACE,MAAC,IAAI,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,KAAC,IAAI,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,KAAC,IAAI,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,KAAC,IAAI,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,KAAC,IAAI,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,KAAC,IAAI,CAAC,IAAI,IACR,EAAE,EAAC,UAAU,EACb,KAAK,EAAC,UAAU,EAChB,WAAW,EAAC,kCAAkC,GAC9C,IACG,EAEP,KAAC,YAAY,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,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { 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"]}
|
|
@@ -28,7 +28,7 @@ const Component = () => {
|
|
|
28
28
|
const [selectedOption, setSelectedOption] = useState('option-1');
|
|
29
29
|
return (_jsxs(_Fragment, { children: [_jsxs(Menu, { isOpen: isOpen, anchorRef: anchorEl, onClose: (_event, _data) => {
|
|
30
30
|
setIsOpen(false);
|
|
31
|
-
}, children: [_jsxs(Menu.Group, { children: [_jsx(Menu.RadioItem, { title: "Option 1", isChecked: selectedOption === 'option-1', onClick: () => {
|
|
31
|
+
}, htmlAttributes: { id: 'radio-and-normal-menu' }, children: [_jsxs(Menu.Group, { children: [_jsx(Menu.RadioItem, { title: "Option 1", isChecked: selectedOption === 'option-1', onClick: () => {
|
|
32
32
|
setSelectedOption('option-1');
|
|
33
33
|
} }), _jsx(Menu.RadioItem, { title: "Option 2", isChecked: selectedOption === 'option-2', onClick: () => {
|
|
34
34
|
setSelectedOption('option-2');
|
|
@@ -36,7 +36,7 @@ const Component = () => {
|
|
|
36
36
|
alert('Action 1');
|
|
37
37
|
} }), _jsx(Menu.Item, { title: "Action 2", onClick: () => {
|
|
38
38
|
alert('Action 2');
|
|
39
|
-
} })] })] }), _jsxs("div", { className: "n-flex n-flex-col n-gap-token-4 n-items-center", children: [_jsxs(Typography, { variant: "body-medium", children: ["Selected option: ", _jsx("strong", { children: selectedOption })] }), _jsx(DropdownButton, { isOpen: isOpen, onClick: () => setIsOpen(true), ref: anchorEl, children: "Open menu" })] })] }));
|
|
39
|
+
} })] })] }), _jsxs("div", { className: "n-flex n-flex-col n-gap-token-4 n-items-center", children: [_jsxs(Typography, { variant: "body-medium", children: ["Selected option: ", _jsx("strong", { children: selectedOption })] }), _jsx(DropdownButton, { isOpen: isOpen, onClick: () => setIsOpen(true), ref: anchorEl, "aria-haspopup": "menu", children: "Open menu" })] })] }));
|
|
40
40
|
};
|
|
41
41
|
export default Component;
|
|
42
42
|
//# 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,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,MAAM,CAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC5C,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAClD,UAAU,CACX,CAAC;IAEF,OAAO,CACL,8BACE,MAAC,IAAI,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,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,MAAM,CAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC5C,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAClD,UAAU,CACX,CAAC;IAEF,OAAO,CACL,8BACE,MAAC,IAAI,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,MAAC,IAAI,CAAC,KAAK,eACT,KAAC,IAAI,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,KAAC,IAAI,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,KAAC,IAAI,CAAC,OAAO,KAAG,EAChB,MAAC,IAAI,CAAC,KAAK,eACT,KAAC,IAAI,CAAC,IAAI,IACR,KAAK,EAAC,UAAU,EAChB,OAAO,EAAE,GAAG,EAAE;oCACZ,KAAK,CAAC,UAAU,CAAC,CAAC;gCACpB,CAAC,GACD,EACF,KAAC,IAAI,CAAC,IAAI,IACR,KAAK,EAAC,UAAU,EAChB,OAAO,EAAE,GAAG,EAAE;oCACZ,KAAK,CAAC,UAAU,CAAC,CAAC;gCACpB,CAAC,GACD,IACS,IACR,EACP,eAAK,SAAS,EAAC,gDAAgD,aAC7D,MAAC,UAAU,IAAC,OAAO,EAAC,aAAa,kCACd,2BAAS,cAAc,GAAU,IACvC,EACb,KAAC,cAAc,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,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { 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"]}
|
|
@@ -29,7 +29,7 @@ const Component = () => {
|
|
|
29
29
|
const [selectedOption, setSelectedOption] = useState('option-1');
|
|
30
30
|
return (_jsxs(_Fragment, { children: [_jsxs(Menu, { isOpen: isOpen, anchorRef: anchorEl, onClose: (_event, _data) => {
|
|
31
31
|
setIsOpen(false);
|
|
32
|
-
}, children: [_jsx(Menu.RadioItem, { title: "Option 1", leadingVisual: _jsx(SunIconOutline, {}), isChecked: selectedOption === 'option-1', onClick: () => {
|
|
32
|
+
}, htmlAttributes: { id: 'radio-items-menu' }, children: [_jsx(Menu.RadioItem, { title: "Option 1", leadingVisual: _jsx(SunIconOutline, {}), isChecked: selectedOption === 'option-1', onClick: () => {
|
|
33
33
|
setSelectedOption('option-1');
|
|
34
34
|
} }), _jsx(Menu.RadioItem, { title: "Option 2", leadingVisual: _jsx(MoonIconOutline, {}), isChecked: selectedOption === 'option-2', onClick: () => {
|
|
35
35
|
setSelectedOption('option-2');
|
|
@@ -37,7 +37,7 @@ const Component = () => {
|
|
|
37
37
|
setSelectedOption('option-3');
|
|
38
38
|
} }), _jsx(Menu.RadioItem, { title: "Option 4", trailingContent: _jsx(Kbd, { keys: ['A'] }), isChecked: selectedOption === 'option-4', onClick: () => {
|
|
39
39
|
setSelectedOption('option-4');
|
|
40
|
-
} })] }), _jsxs("div", { className: "n-flex n-flex-col n-gap-token-4 n-items-center", children: [_jsxs(Typography, { variant: "body-medium", children: ["Selected option: ", _jsx("strong", { children: selectedOption })] }), _jsx(DropdownButton, { isOpen: isOpen, onClick: () => setIsOpen(true), ref: anchorEl, children: "Open menu" })] })] }));
|
|
40
|
+
} })] }), _jsxs("div", { className: "n-flex n-flex-col n-gap-token-4 n-items-center", children: [_jsxs(Typography, { variant: "body-medium", children: ["Selected option: ", _jsx("strong", { children: selectedOption })] }), _jsx(DropdownButton, { isOpen: isOpen, onClick: () => setIsOpen(true), ref: anchorEl, "aria-haspopup": "menu", children: "Open menu" })] })] }));
|
|
41
41
|
};
|
|
42
42
|
export default Component;
|
|
43
43
|
//# 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,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,cAAc,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,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,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,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { 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"]}
|
|
@@ -27,7 +27,7 @@ const Component = () => {
|
|
|
27
27
|
const [isOpen, setIsOpen] = useState(false);
|
|
28
28
|
return (_jsxs(_Fragment, { children: [_jsxs(Menu, { isOpen: isOpen, anchorRef: anchorEl, onClose: (_event, _data) => {
|
|
29
29
|
setIsOpen(false);
|
|
30
|
-
}, children: [_jsxs(Menu.Group, { children: [_jsx(Menu.CategoryItem, { children: "Category 1" }), _jsx(Menu.Item, { title: "Action 1", onClick: () => alert('Action1') }), _jsx(Menu.Item, { title: "Action 2", onClick: () => alert('Action2') })] }), _jsx(Menu.Divider, {}), _jsxs(Menu.Group, { children: [_jsx(Menu.Item, { title: "Action 3", description: "Action 3 is disabled", isDisabled: true, onClick: () => alert('Action3') }), _jsx(Menu.Item, { title: "Action 4", description: "Action 4 is awesome", onClick: () => alert('Action4') })] })] }), _jsx(FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, children: "Open Menu" })] }));
|
|
30
|
+
}, htmlAttributes: { id: 'category-menu' }, children: [_jsxs(Menu.Group, { children: [_jsx(Menu.CategoryItem, { children: "Category 1" }), _jsx(Menu.Item, { title: "Action 1", onClick: () => alert('Action1') }), _jsx(Menu.Item, { title: "Action 2", onClick: () => alert('Action2') })] }), _jsx(Menu.Divider, {}), _jsxs(Menu.Group, { children: [_jsx(Menu.Item, { title: "Action 3", description: "Action 3 is disabled", isDisabled: true, onClick: () => alert('Action3') }), _jsx(Menu.Item, { title: "Action 4", description: "Action 4 is awesome", onClick: () => alert('Action4') })] })] }), _jsx(FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, "aria-haspopup": "menu", "aria-expanded": isOpen, children: "Open Menu" })] }));
|
|
31
31
|
};
|
|
32
32
|
export default Component;
|
|
33
33
|
//# 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,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,MAAM,CAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,8BACE,MAAC,IAAI,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,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,O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,MAAM,mBACL,MAAM,0BAGR,IACd,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { 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"]}
|
|
@@ -27,7 +27,7 @@ const Component = () => {
|
|
|
27
27
|
const [isOpen, setIsOpen] = useState(false);
|
|
28
28
|
return (_jsxs(_Fragment, { children: [_jsxs(Menu, { isOpen: isOpen, anchorRef: anchorEl, onClose: (_event, _data) => {
|
|
29
29
|
setIsOpen(false);
|
|
30
|
-
}, children: [_jsx(Menu.Item, { title: "Action 1", description: "Action 1 is disabled", isDisabled: true }), _jsx(Menu.Item, { title: "Action 2", onClick: () => alert('Action2') })] }), _jsx(FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, children: "Open Menu" })] }));
|
|
30
|
+
}, htmlAttributes: { id: 'disabled-item-menu' }, children: [_jsx(Menu.Item, { title: "Action 1", description: "Action 1 is disabled", isDisabled: true }), _jsx(Menu.Item, { title: "Action 2", onClick: () => alert('Action2') })] }), _jsx(FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, "aria-haspopup": "menu", "aria-expanded": isOpen, children: "Open Menu" })] }));
|
|
31
31
|
};
|
|
32
32
|
export default Component;
|
|
33
33
|
//# 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,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,MAAM,CAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,8BACE,MAAC,IAAI,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,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,MAAM,CAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,8BACE,MAAC,IAAI,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,KAAC,IAAI,CAAC,IAAI,IACR,KAAK,EAAC,UAAU,EAChB,WAAW,EAAC,sBAAsB,EAClC,UAAU,EAAE,IAAI,GAChB,EACF,KAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,UAAU,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,GAAI,IAC1D,EACP,KAAC,YAAY,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,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { 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"]}
|
|
@@ -27,7 +27,7 @@ const Component = () => {
|
|
|
27
27
|
const [isOpen, setIsOpen] = useState(false);
|
|
28
28
|
return (_jsxs(_Fragment, { children: [_jsxs(Menu, { isOpen: isOpen, anchorRef: anchorEl, onClose: (_event, _data) => {
|
|
29
29
|
setIsOpen(false);
|
|
30
|
-
}, children: [_jsx(Menu.Item, { title: "Action 1" }), _jsx(Menu.Divider, {}), _jsx(Menu.Item, { title: "Action 2" }), _jsx(Menu.Divider, {}), _jsx(Menu.Item, { title: "Action 3" }), _jsx(Menu.Divider, {}), _jsx(Menu.Item, { title: "Action 4" })] }), _jsx(FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, children: "Open Menu" })] }));
|
|
30
|
+
}, htmlAttributes: { id: 'divider-menu' }, children: [_jsx(Menu.Item, { title: "Action 1" }), _jsx(Menu.Divider, {}), _jsx(Menu.Item, { title: "Action 2" }), _jsx(Menu.Divider, {}), _jsx(Menu.Item, { title: "Action 3" }), _jsx(Menu.Divider, {}), _jsx(Menu.Item, { title: "Action 4" })] }), _jsx(FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, "aria-haspopup": "menu", "aria-expanded": isOpen, children: "Open Menu" })] }));
|
|
31
31
|
};
|
|
32
32
|
export default Component;
|
|
33
33
|
//# 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,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,MAAM,CAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,8BACE,MAAC,IAAI,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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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"]}
|
|
@@ -28,7 +28,7 @@ const Component = () => {
|
|
|
28
28
|
const [isOpen, setIsOpen] = useState(false);
|
|
29
29
|
return (_jsxs(_Fragment, { children: [_jsxs(Menu, { isOpen: isOpen, anchorRef: anchorEl, onClose: (_event, _data) => {
|
|
30
30
|
setIsOpen(false);
|
|
31
|
-
}, children: [_jsx(Menu.Item, { leadingVisual: _jsx(PlusIconOutline, {}), title: "Action 1", onClick: () => alert('Action1') }), _jsx(Menu.Item, { leadingVisual: _jsx(PlusIconOutline, {}), title: "Action 2", onClick: () => alert('Action2') }), _jsx(Menu.Item, { leadingVisual: _jsx(PlusIconOutline, {}), title: "Action 3", description: "Action 3 is disabled", isDisabled: true, onClick: () => alert('Action3') }), _jsxs(Menu, { title: "Action 3.1", description: "Action with sub menu", icon: _jsx(PlusIconOutline, {}), children: [_jsx(Menu.Item, { title: "Text" }), _jsx(Menu.Item, { title: "Video" }), _jsxs(Menu, { title: "Image", icon: _jsx(PhotoIconOutline, {}), children: [_jsx(Menu.Item, { title: ".png" }), _jsx(Menu.Item, { title: ".jpg" })] }), _jsx(Menu.Item, { title: "Audio" })] }), _jsx(Menu.Item, { leadingVisual: _jsx(PlusIconOutline, {}), title: "Action 4", description: "Action 4 is awesome", onClick: () => alert('Action4') })] }), _jsx(FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, children: "Open Menu" })] }));
|
|
31
|
+
}, htmlAttributes: { id: 'icon-menu' }, children: [_jsx(Menu.Item, { leadingVisual: _jsx(PlusIconOutline, {}), title: "Action 1", onClick: () => alert('Action1') }), _jsx(Menu.Item, { leadingVisual: _jsx(PlusIconOutline, {}), title: "Action 2", onClick: () => alert('Action2') }), _jsx(Menu.Item, { leadingVisual: _jsx(PlusIconOutline, {}), title: "Action 3", description: "Action 3 is disabled", isDisabled: true, onClick: () => alert('Action3') }), _jsxs(Menu, { title: "Action 3.1", description: "Action with sub menu", icon: _jsx(PlusIconOutline, {}), children: [_jsx(Menu.Item, { title: "Text" }), _jsx(Menu.Item, { title: "Video" }), _jsxs(Menu, { title: "Image", icon: _jsx(PhotoIconOutline, {}), children: [_jsx(Menu.Item, { title: ".png" }), _jsx(Menu.Item, { title: ".jpg" })] }), _jsx(Menu.Item, { title: "Audio" })] }), _jsx(Menu.Item, { leadingVisual: _jsx(PlusIconOutline, {}), title: "Action 4", description: "Action 4 is awesome", onClick: () => alert('Action4') })] }), _jsx(FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, "aria-haspopup": "menu", "aria-expanded": isOpen, children: "Open Menu" })] }));
|
|
32
32
|
};
|
|
33
33
|
export default Component;
|
|
34
34
|
//# 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,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,MAAM,CAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,8BACE,MAAC,IAAI,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,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE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C,KAAK,EAAC,MAAM,GAAG,EAC1B,KAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,MAAM,GAAG,IACrB,EACP,KAAC,IAAI,CAAC,IAAI,IAAC,KAAK,EAAC,OAAO,GAAG,IACtB,EACP,KAAC,IAAI,CAAC,IAAI,IACR,aAAa,EAAE,KAAC,eAAe,KAAG,EAClC,KAAK,EAAC,UAAU,EAChB,WAAW,EAAC,qBAAqB,EACjC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,GAC/B,IACG,EACP,KAAC,YAAY,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,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { 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"]}
|
|
@@ -28,7 +28,7 @@ const Component = () => {
|
|
|
28
28
|
const [isOpen, setIsOpen] = useState(false);
|
|
29
29
|
return (_jsxs(_Fragment, { children: [_jsxs(Menu, { isOpen: isOpen, anchorRef: anchorEl, onClose: (_event, _data) => {
|
|
30
30
|
setIsOpen(false);
|
|
31
|
-
}, children: [_jsx(Menu.Item, { leadingVisual: _jsx(PlusIconOutline, {}), title: "Action 1", onClick: () => alert('Action1') }), _jsx(Menu.Item, { leadingVisual: _jsx(PlusIconOutline, {}), trailingContent: _jsx(Kbd, { keys: ['A', ['B']] }), title: "Action 2", description: "Action 4 has a keyboard shortcut", onClick: () => alert('Action4') })] }), _jsx(FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, children: "Open Menu" })] }));
|
|
31
|
+
}, htmlAttributes: { id: 'keyboard-shortcuts-menu' }, children: [_jsx(Menu.Item, { leadingVisual: _jsx(PlusIconOutline, {}), title: "Action 1", onClick: () => alert('Action1') }), _jsx(Menu.Item, { leadingVisual: _jsx(PlusIconOutline, {}), trailingContent: _jsx(Kbd, { keys: ['A', ['B']] }), title: "Action 2", description: "Action 4 has a keyboard shortcut", onClick: () => alert('Action4') })] }), _jsx(FilledButton, { onClick: () => setIsOpen(true), ref: anchorEl, "aria-haspopup": "menu", "aria-expanded": isOpen, children: "Open Menu" })] }));
|
|
32
32
|
};
|
|
33
33
|
export default Component;
|
|
34
34
|
//# 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,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GAAG,MAAM,CAA2B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,8BACE,MAAC,IAAI,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-keyboard-shortcuts.story.js","sourceRoot":"","sources":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AC,EAC9B,GAAG,EAAE,QAAQ,mBACC,MAAM,mBACL,MAAM,0BAGR,IACd,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { 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"]}
|
|
@@ -32,6 +32,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
32
32
|
*/
|
|
33
33
|
import { tokens } from '@neo4j-ndl/base';
|
|
34
34
|
import classNames from 'classnames';
|
|
35
|
+
import { useMemo } from 'react';
|
|
35
36
|
import { components, } from 'react-select';
|
|
36
37
|
import { Checkbox } from '../checkbox';
|
|
37
38
|
import { ChevronDownIconOutline, XMarkIconOutline } from '../icons';
|
|
@@ -201,7 +202,7 @@ export const CustomValueContainer = ({ size, }) => function Component(_a) {
|
|
|
201
202
|
});
|
|
202
203
|
return (_jsx(components.ValueContainer, Object.assign({}, restProps, { className: classes, children: children })));
|
|
203
204
|
};
|
|
204
|
-
export const CustomInput = ({ size, }) => function Component(_a) {
|
|
205
|
+
export const CustomInput = ({ size, errorText, errorTextId, helpText, helpTextId, }) => function Component(_a) {
|
|
205
206
|
var { className } = _a, restProps = __rest(_a, ["className"]);
|
|
206
207
|
const classes = classNames('ndl-select-input', className, {
|
|
207
208
|
'ndl-disabled': restProps.isDisabled,
|
|
@@ -210,7 +211,21 @@ export const CustomInput = ({ size, }) => function Component(_a) {
|
|
|
210
211
|
'ndl-medium': size === 'medium',
|
|
211
212
|
'ndl-small': size === 'small',
|
|
212
213
|
});
|
|
213
|
-
|
|
214
|
+
const defaultAriaDescribedBy = restProps['aria-describedby'];
|
|
215
|
+
const combinedAriaDescribedBy = useMemo(() => {
|
|
216
|
+
const ariaDescribedBy = [];
|
|
217
|
+
if (defaultAriaDescribedBy) {
|
|
218
|
+
ariaDescribedBy.push(defaultAriaDescribedBy);
|
|
219
|
+
}
|
|
220
|
+
if (helpText && !errorText && helpTextId) {
|
|
221
|
+
ariaDescribedBy.push(helpTextId);
|
|
222
|
+
}
|
|
223
|
+
else if (errorText && errorTextId) {
|
|
224
|
+
ariaDescribedBy.push(errorTextId);
|
|
225
|
+
}
|
|
226
|
+
return ariaDescribedBy.join(' ');
|
|
227
|
+
}, [defaultAriaDescribedBy]);
|
|
228
|
+
return (_jsx(components.Input, Object.assign({}, restProps, { className: classes, "aria-describedby": combinedAriaDescribedBy })));
|
|
214
229
|
};
|
|
215
230
|
export const CustomSingleValue = ({ size, }) => function Component(_a) {
|
|
216
231
|
var { className } = _a, restProps = __rest(_a, ["className"]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Overrides.js","sourceRoot":"","sources":["../../../src/select/Overrides.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAEL,UAAU,GAYX,MAAM,cAAc,CAAC;AAMtB,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACpE,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;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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B,CAAC;oBACD,IAAI,EAAE,cAAc;oBACpB,QAAQ,EAAE,CAAC,CAAC;iBACb,GACD,CACH,EACA,QAAQ,KACS,CACrB,CAAC;AACJ,CAAC,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 { 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,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAEL,UAAU,GAYX,MAAM,cAAc,CAAC;AAMtB,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACpE,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;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;YAC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AE,OAAO,EAClB,UAAU,EAAE,gBAAgB,aAE3B,SAAS,CAAC,OAAO,KAAK,IAAI,IAAI,CAC7B,KAAC,QAAQ,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","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/esm/select/Select.js
CHANGED
|
@@ -91,6 +91,8 @@ export const Select = (_a) => {
|
|
|
91
91
|
const isInsideDialog = useIsInsideDialog();
|
|
92
92
|
const menuPosition = isInsideDialog ? 'fixed' : 'absolute';
|
|
93
93
|
const identifier = useId();
|
|
94
|
+
const helpTextId = useId();
|
|
95
|
+
const errorTextId = useId();
|
|
94
96
|
const [isMenuOpen, setIsMenuOpen] = useState(false);
|
|
95
97
|
const handleMenuOpen = () => {
|
|
96
98
|
setIsMenuOpen(true);
|
|
@@ -116,9 +118,12 @@ export const Select = (_a) => {
|
|
|
116
118
|
const Component = as !== null && as !== void 0 ? as : 'div';
|
|
117
119
|
const ComponentOverrides = useMemo(() => overrideComponents({
|
|
118
120
|
errorText,
|
|
121
|
+
errorTextId,
|
|
122
|
+
helpText,
|
|
123
|
+
helpTextId,
|
|
119
124
|
isClean,
|
|
120
125
|
size,
|
|
121
|
-
}), [errorText, size, isClean]);
|
|
126
|
+
}), [errorText, errorTextId, helpText, helpTextId, size, isClean]);
|
|
122
127
|
const StyleOverrides = useMemo(() => customStyles(), []);
|
|
123
128
|
useEffect(() => {
|
|
124
129
|
if (label === undefined && ariaLabel === undefined) {
|
|
@@ -128,14 +133,14 @@ export const Select = (_a) => {
|
|
|
128
133
|
let SelectElement;
|
|
129
134
|
switch (type) {
|
|
130
135
|
case 'async': {
|
|
131
|
-
SelectElement = (_jsx(AsyncSelect, 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) })));
|
|
136
|
+
SelectElement = (_jsx(AsyncSelect, 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) })));
|
|
132
137
|
break;
|
|
133
138
|
}
|
|
134
139
|
case 'creatable':
|
|
135
|
-
SelectElement = (_jsx(Creatable, 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) })));
|
|
140
|
+
SelectElement = (_jsx(Creatable, 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) })));
|
|
136
141
|
break;
|
|
137
142
|
default:
|
|
138
|
-
SelectElement = (_jsx(ReactSelect, 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) })));
|
|
143
|
+
SelectElement = (_jsx(ReactSelect, 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) })));
|
|
139
144
|
}
|
|
140
145
|
const classes = classNames('ndl-select', className, {
|
|
141
146
|
'ndl-creatable': type === 'creatable',
|
|
@@ -147,6 +152,6 @@ export const Select = (_a) => {
|
|
|
147
152
|
'ndl-multi': selectProps.isMulti,
|
|
148
153
|
'ndl-small': size === 'small',
|
|
149
154
|
});
|
|
150
|
-
return (_jsxs(Component, Object.assign({ ref: ref, className: classes, style: style }, restProps, htmlAttributes, { children: [Boolean(label) && _jsx("label", { htmlFor: identifier, children: label }), SelectElement, Boolean(helpText) && Boolean(errorText) === false && (_jsx(Typography, { variant: size === 'large' ? 'body-medium' : 'body-small', className: "ndl-sub-text", children: helpText })), Boolean(errorText) && (_jsxs("div", { className: "n-flex n-flex-row n-gap-token-4 n-items-center", children: [_jsx(ExclamationCircleIconSolid, { className: classNames('ndl-error-icon', classes), htmlAttributes: { role: 'img', type: 'solid' } }), _jsx("span", { className: "ndl-sub-text ndl-error-text", children: errorText })] }))] })));
|
|
155
|
+
return (_jsxs(Component, Object.assign({ ref: ref, className: classes, style: style }, restProps, htmlAttributes, { children: [Boolean(label) && _jsx("label", { htmlFor: identifier, children: label }), SelectElement, Boolean(helpText) && Boolean(errorText) === false && (_jsx(Typography, { variant: size === 'large' ? 'body-medium' : 'body-small', className: "ndl-sub-text", htmlAttributes: { id: helpTextId }, children: helpText })), Boolean(errorText) && (_jsxs("div", { className: "n-flex n-flex-row n-gap-token-4 n-items-center", children: [_jsx(ExclamationCircleIconSolid, { className: classNames('ndl-error-icon', classes), htmlAttributes: { role: 'img', type: 'solid' } }), _jsx("span", { id: errorTextId, className: "ndl-sub-text ndl-error-text", children: errorText })] }))] })));
|
|
151
156
|
};
|
|
152
157
|
//# sourceMappingURL=Select.js.map
|