Archived
Template
1
Fork 0
This repository has been archived on 2024-09-04. You can view files and clone it, but cannot push or open issues or pull requests.
Contour/public/@shoelace-style/shoelace/cdn/internal/modal.d.ts
2024-01-30 10:59:28 -05:00

24 lines
882 B
TypeScript

export default class Modal {
element: HTMLElement;
isExternalActivated: boolean;
tabDirection: 'forward' | 'backward';
currentFocus: HTMLElement | null;
previousFocus: HTMLElement | null;
elementsWithTabbableControls: string[];
constructor(element: HTMLElement);
/** Activates focus trapping. */
activate(): void;
/** Deactivates focus trapping. */
deactivate(): void;
/** Determines if this modal element is currently active or not. */
isActive(): boolean;
/** Activates external modal behavior and temporarily disables focus trapping. */
activateExternal(): void;
/** Deactivates external modal behavior and re-enables focus trapping. */
deactivateExternal(): void;
private checkFocus;
private handleFocusIn;
private possiblyHasTabbableChildren;
private handleKeyDown;
private handleKeyUp;
}