stable

Clone or download

Read-only

refactor: Single selection custom element

How to test: - Lazybox in "single selection mode" (`is_multiple: false` in options) now has a button that can be focused through the keyboard with "tab". Pressing "enter" when the button is focused will clear the selection. - Pressing "enter" is no longer enough to select items in the dropdown. You must release "enter" (key up) to do the selection. - No other functional change expected. Notes: the button already existed but was a `<span>` and was not usable by keyboard. part of request #31583 Lazybox big clean-up Change-Id: I5b5f73f8386f102ccf94ed01a77c52ac64ec9beb

Modified Files

Name
A lib/frontend/lazybox/src/dropdown/DropdownEventsHandler.test.ts +87 −0 Go to diff View file
A lib/frontend/lazybox/src/dropdown/DropdownEventsHandler.ts +49 −0 Go to diff View file
M lib/frontend/lazybox/src/dropdown/DropdownManager.test.ts +22 −82 Go to diff View file
M lib/frontend/lazybox/src/dropdown/DropdownManager.ts +14 −33 Go to diff View file
M lib/frontend/lazybox/src/events/EventManager.test.ts +9 −9 Go to diff View file
M lib/frontend/lazybox/src/events/EventManager.ts +5 −15 Go to diff View file
M lib/frontend/lazybox/src/lazybox.ts +23 −19 Go to diff View file
M lib/frontend/lazybox/src/renderers/BaseComponentRenderer.test.ts +12 −21 Go to diff View file
M lib/frontend/lazybox/src/renderers/BaseComponentRenderer.ts +29 −27 Go to diff View file
M lib/frontend/lazybox/src/selection/MultipleSelectionManager.test.ts +2 −2 Go to diff View file
A lib/frontend/lazybox/src/selection/SelectionElement.test.ts +269 −0 Go to diff View file
A lib/frontend/lazybox/src/selection/SelectionElement.ts +210 −0 Go to diff View file
M lib/frontend/lazybox/src/selection/SelectionManager.test.ts +28 −152 Go to diff View file
M lib/frontend/lazybox/src/selection/SelectionManager.ts +12 −129 Go to diff View file
M lib/frontend/lazybox/src/selection/selection-badge.scss +1 −0 Go to diff View file
M lib/frontend/lazybox/src/type.ts +3 −7 Go to diff View file
M lib/frontend/lazybox/tests/stubs/ManageDropdownStub.ts +6 −0 Go to diff View file
A lib/frontend/lazybox/tests/stubs/RenderedItemStub.ts +40 −0 Go to diff View file
M lib/frontend/lazybox/themes/_common.scss +6 −0 Go to diff View file
M lib/frontend/lazybox/themes/style.scss +3 −6 Go to diff View file