UNPKG

@synergy-design-system/components

Version:

This package provides the base of the Synergy Design System as native web components. It uses [lit](https://www.lit.dev) and parts of [shoelace](https://shoelace.style/). Synergy officially supports the latest two versions of all major browsers (as define

31 lines (30 loc) 1.14 kB
/** * --------------------------------------------------------------------- * 🔒 AUTOGENERATED BY VENDORISM * Removing this comment will prevent it from being managed by it. * --------------------------------------------------------------------- */ 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; }