focus-trap.d.ts 978 B

12345678910111213141516171819
  1. import { NgZone } from '@angular/core';
  2. import { Observable } from 'rxjs';
  3. /**
  4. * Returns first and last focusable elements inside of a given element based on specific CSS selector
  5. */
  6. export declare function getFocusableBoundaryElements(element: HTMLElement): HTMLElement[];
  7. /**
  8. * Function that enforces browser focus to be trapped inside a DOM element.
  9. *
  10. * Works only for clicks inside the element and navigation with 'Tab', ignoring clicks outside of the element
  11. *
  12. * @param zone Angular zone
  13. * @param element The element around which focus will be trapped inside
  14. * @param stopFocusTrap$ The observable stream. When completed the focus trap will clean up listeners
  15. * and free internal resources
  16. * @param refocusOnClick Put the focus back to the last focused element whenever a click occurs on element (default to
  17. * false)
  18. */
  19. export declare const ngbFocusTrap: (zone: NgZone, element: HTMLElement, stopFocusTrap$: Observable<any>, refocusOnClick?: boolean) => void;