stable
Clone or download
part of request #31583 Lazybox big clean-up This contribution introduces two things: - A selection_badge_callback option which is optional (you don't say) used in MultipleSelectionManager to create custom selection badge (you don't say (bis)). When not defined, the badges will have the primary color and will be outlined by default. - A SelectionBadge custom element which renders a tlp-badge, colored or not, outlined or not, according to given attributes. How to test: - Lazybox selected item badges now have a button that can be selected through the keyboard with "tab". Pressing enter when the button is focused will remove the item from the selection. - No other functional change expected. Change-Id: I316662319663bf2a5ad5ba9f3dc7fa015c33ee2e
Modified Files
Name | ||||
---|---|---|---|---|
M | lib/frontend/constants/package.json | +1 | −1 | Go to diff View file |
M | lib/frontend/constants/src/main.ts | +4 | −0 | Go to diff View file |
M | lib/frontend/constants/vite.config.ts | +2 | −3 | Go to diff View file |
M | lib/frontend/lazybox/package.json | +2 | −0 | Go to diff View file |
M | lib/frontend/lazybox/pnpm-lock.yaml | +4 | −0 | Go to diff View file |
A | lib/frontend/lazybox/src/SelectionBadgeCallbackDefaulter.test.ts | +69 | −0 | Go to diff View file |
A | lib/frontend/lazybox/src/SelectionBadgeCallbackDefaulter.ts | +50 | −0 | Go to diff View file |
M | lib/frontend/lazybox/src/lazybox.ts | +3 | −1 | Go to diff View file |
A | lib/frontend/lazybox/src/scss-shims.d.ts | +23 | −0 | Go to diff View file |
M | lib/frontend/lazybox/src/selection/MultipleSelectionManager.test.ts | +9 | −14 | Go to diff View file |
M | lib/frontend/lazybox/src/selection/MultipleSelectionManager.ts | +14 | −6 | Go to diff View file |
A | lib/frontend/lazybox/src/selection/SelectionBadge.test.ts | +63 | −0 | Go to diff View file |
A | lib/frontend/lazybox/src/selection/SelectionBadge.ts | +54 | −0 | Go to diff View file |
M | lib/frontend/lazybox/src/selection/SelectionManager.ts | +1 | −3 | Go to diff View file |
A | lib/frontend/lazybox/src/selection/selection-badge.scss | +44 | −0 | Go to diff View file |
D | lib/frontend/lazybox/src/selection/templates/selected-value-badge-template.test.ts | +0 | −61 | Go to diff View file |
D | lib/frontend/lazybox/src/selection/templates/selected-value-badge-template.ts | +0 | −56 | Go to diff View file |
M | lib/frontend/lazybox/src/type.ts | +4 | −0 | Go to diff View file |
A | lib/frontend/lazybox/themes/_common.scss | +25 | −0 | Go to diff View file |
M | lib/frontend/lazybox/themes/style.scss | +4 | −28 | Go to diff View file |
M | src/www/tlp-doc/resources/forms/lazybox/doc.html | +8 | −0 | Go to diff View file |