sudovanilla-website/public/@shoelace-style/shoelace/cdn/internal/modal.d.ts

25 lines
882 B
TypeScript
Raw Normal View History

2024-05-13 22:34:06 -05:00
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;
}