UNPKG

1.13 kBTypeScriptView Raw
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8/**
9 * A FocusTrap managed by FocusTrapManager.
10 * Implemented by ConfigurableFocusTrap to avoid circular dependency.
11 */
12import * as ɵngcc0 from '@angular/core';
13export interface ManagedFocusTrap {
14 _enable(): void;
15 _disable(): void;
16 focusInitialElementWhenReady(): Promise<boolean>;
17}
18/** Injectable that ensures only the most recently enabled FocusTrap is active. */
19export declare class FocusTrapManager {
20 private _focusTrapStack;
21 /**
22 * Disables the FocusTrap at the top of the stack, and then pushes
23 * the new FocusTrap onto the stack.
24 */
25 register(focusTrap: ManagedFocusTrap): void;
26 /**
27 * Removes the FocusTrap from the stack, and activates the
28 * FocusTrap that is the new top of the stack.
29 */
30 deregister(focusTrap: ManagedFocusTrap): void;
31 static ɵfac: ɵngcc0.ɵɵFactoryDef<FocusTrapManager, never>;
32}
33
34//# sourceMappingURL=focus-trap-manager.d.ts.map
\No newline at end of file