mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-28 17:40:12 +00:00
5195f5fd67
Add a menu button that toggles the panel's (also referred to as a sidebar) collapse state. When the screen is wide enough, animate the transition. The menu icon from OOUI is copied into Vector to avoid two ResourceLoaders modules (collapseHorizontal icon isn't ready for inclusion in the OOUI icon pack and ResourceLoaderOOUIIconPackModule doesn't support images). Additional polish and collaboration is needed but this patch fulfills the scope of its referenced task. Bug: T246419 Depends-On: I8e153c0ab927f9d880a68fb9efb0bf37b91d26b2 Change-Id: Ic9d54de7e19ef8d5dfd703d95a45b78c0aaf791a
17 lines
1,019 B
TypeScript
17 lines
1,019 B
TypeScript
interface CheckboxHack {
|
|
updateAriaExpanded(checkbox: HTMLInputElement): void;
|
|
bindUpdateAriaExpandedOnInput(checkbox: HTMLInputElement): CheckboxHackListeners;
|
|
bindToggleOnClick(checkbox: HTMLInputElement, button: HTMLElement): CheckboxHackListeners;
|
|
bindDismissOnClickOutside(window: Window, checkbox: HTMLInputElement, button: HTMLElement, target: Node): CheckboxHackListeners;
|
|
bindDismissOnFocusLoss(window: Window, checkbox: HTMLInputElement, button: HTMLElement, target: Node): CheckboxHackListeners;
|
|
bind(window: Window, checkbox: HTMLInputElement, button: HTMLElement, target: Node): CheckboxHackListeners;
|
|
unbind(window: Window, checkbox: HTMLInputElement, button: HTMLElement, listeners: CheckboxHackListeners): void;
|
|
}
|
|
|
|
interface CheckboxHackListeners {
|
|
onUpdateAriaExpandedOnInput?: EventListenerOrEventListenerObject;
|
|
onToggleOnClick?: EventListenerOrEventListenerObject;
|
|
onDismissOnClickOutside?: EventListenerOrEventListenerObject;
|
|
onDismissOnFocusLoss?: EventListenerOrEventListenerObject;
|
|
}
|