index.d.ts 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550
  1. import * as i0 from '@angular/core';
  2. import { OnDestroy, Provider, QueryList, InjectionToken, NgZone, Injector } from '@angular/core';
  3. export { A as ActiveDescendantKeyManager, H as Highlightable } from '../activedescendant-key-manager.d-Bjic5obv.js';
  4. export { a as FocusKeyManager, F as FocusableOption } from '../focus-key-manager.d-BIKDy8oD.js';
  5. export { a as ListKeyManager, b as ListKeyManagerModifierKey, L as ListKeyManagerOption } from '../list-key-manager.d-BlK3jyRn.js';
  6. import { Subject, Observable } from 'rxjs';
  7. import { a as TreeKeyManagerItem, T as TreeKeyManagerStrategy, b as TreeKeyManagerFactory, c as TreeKeyManagerOptions } from '../tree-key-manager-strategy.d-XB6M79l-.js';
  8. import { a as FocusTrap, I as InteractivityChecker } from '../a11y-module.d-DBHGyKoh.js';
  9. export { A as A11yModule, d as AriaLivePoliteness, c as CdkAriaLive, C as CdkTrapFocus, F as FocusTrapFactory, b as IsFocusableConfig, h as LIVE_ANNOUNCER_DEFAULT_OPTIONS, e as LIVE_ANNOUNCER_ELEMENT_TOKEN, f as LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY, L as LiveAnnouncer, g as LiveAnnouncerDefaultOptions } from '../a11y-module.d-DBHGyKoh.js';
  10. export { C as CdkMonitorFocus, d as FOCUS_MONITOR_DEFAULT_OPTIONS, e as FocusMonitor, b as FocusMonitorDetectionMode, c as FocusMonitorOptions, a as FocusOptions, F as FocusOrigin } from '../focus-monitor.d-CvvJeQRc.js';
  11. import '../observers/index.js';
  12. import '../number-property.d-CJVxXUcb.js';
  13. /**
  14. * Interface used to register message elements and keep a count of how many registrations have
  15. * the same message and the reference to the message element used for the `aria-describedby`.
  16. */
  17. interface RegisteredMessage {
  18. /** The element containing the message. */
  19. messageElement: Element;
  20. /** The number of elements that reference this message element via `aria-describedby`. */
  21. referenceCount: number;
  22. }
  23. /**
  24. * ID used for the body container where all messages are appended.
  25. * @deprecated No longer being used. To be removed.
  26. * @breaking-change 14.0.0
  27. */
  28. declare const MESSAGES_CONTAINER_ID = "cdk-describedby-message-container";
  29. /**
  30. * ID prefix used for each created message element.
  31. * @deprecated To be turned into a private variable.
  32. * @breaking-change 14.0.0
  33. */
  34. declare const CDK_DESCRIBEDBY_ID_PREFIX = "cdk-describedby-message";
  35. /**
  36. * Attribute given to each host element that is described by a message element.
  37. * @deprecated To be turned into a private variable.
  38. * @breaking-change 14.0.0
  39. */
  40. declare const CDK_DESCRIBEDBY_HOST_ATTRIBUTE = "cdk-describedby-host";
  41. /**
  42. * Utility that creates visually hidden elements with a message content. Useful for elements that
  43. * want to use aria-describedby to further describe themselves without adding additional visual
  44. * content.
  45. */
  46. declare class AriaDescriber implements OnDestroy {
  47. private _platform;
  48. private _document;
  49. /** Map of all registered message elements that have been placed into the document. */
  50. private _messageRegistry;
  51. /** Container for all registered messages. */
  52. private _messagesContainer;
  53. /** Unique ID for the service. */
  54. private readonly _id;
  55. constructor(...args: unknown[]);
  56. /**
  57. * Adds to the host element an aria-describedby reference to a hidden element that contains
  58. * the message. If the same message has already been registered, then it will reuse the created
  59. * message element.
  60. */
  61. describe(hostElement: Element, message: string, role?: string): void;
  62. /**
  63. * Adds to the host element an aria-describedby reference to an already-existing message element.
  64. */
  65. describe(hostElement: Element, message: HTMLElement): void;
  66. /** Removes the host element's aria-describedby reference to the message. */
  67. removeDescription(hostElement: Element, message: string, role?: string): void;
  68. /** Removes the host element's aria-describedby reference to the message element. */
  69. removeDescription(hostElement: Element, message: HTMLElement): void;
  70. /** Unregisters all created message elements and removes the message container. */
  71. ngOnDestroy(): void;
  72. /**
  73. * Creates a new element in the visually hidden message container element with the message
  74. * as its content and adds it to the message registry.
  75. */
  76. private _createMessageElement;
  77. /** Deletes the message element from the global messages container. */
  78. private _deleteMessageElement;
  79. /** Creates the global container for all aria-describedby messages. */
  80. private _createMessagesContainer;
  81. /** Removes all cdk-describedby messages that are hosted through the element. */
  82. private _removeCdkDescribedByReferenceIds;
  83. /**
  84. * Adds a message reference to the element using aria-describedby and increments the registered
  85. * message's reference count.
  86. */
  87. private _addMessageReference;
  88. /**
  89. * Removes a message reference from the element using aria-describedby
  90. * and decrements the registered message's reference count.
  91. */
  92. private _removeMessageReference;
  93. /** Returns true if the element has been described by the provided message ID. */
  94. private _isElementDescribedByMessage;
  95. /** Determines whether a message can be described on a particular element. */
  96. private _canBeDescribed;
  97. /** Checks whether a node is an Element node. */
  98. private _isElementNode;
  99. static ɵfac: i0.ɵɵFactoryDeclaration<AriaDescriber, never>;
  100. static ɵprov: i0.ɵɵInjectableDeclaration<AriaDescriber>;
  101. }
  102. /**
  103. * Adds the given ID to the specified ARIA attribute on an element.
  104. * Used for attributes such as aria-labelledby, aria-owns, etc.
  105. */
  106. declare function addAriaReferencedId(el: Element, attr: `aria-${string}`, id: string): void;
  107. /**
  108. * Removes the given ID from the specified ARIA attribute on an element.
  109. * Used for attributes such as aria-labelledby, aria-owns, etc.
  110. */
  111. declare function removeAriaReferencedId(el: Element, attr: `aria-${string}`, id: string): void;
  112. /**
  113. * Gets the list of IDs referenced by the given ARIA attribute on an element.
  114. * Used for attributes such as aria-labelledby, aria-owns, etc.
  115. */
  116. declare function getAriaReferenceIds(el: Element, attr: string): string[];
  117. /**
  118. * @docs-private
  119. *
  120. * Opt-out of Tree of key manager behavior.
  121. *
  122. * When provided, Tree has same focus management behavior as before TreeKeyManager was introduced.
  123. * - Tree does not respond to keyboard interaction
  124. * - Tree node allows tabindex to be set by Input binding
  125. * - Tree node allows tabindex to be set by attribute binding
  126. *
  127. * @deprecated NoopTreeKeyManager deprecated. Use TreeKeyManager or inject a
  128. * TreeKeyManagerStrategy instead. To be removed in a future version.
  129. *
  130. * @breaking-change 21.0.0
  131. */
  132. declare class NoopTreeKeyManager<T extends TreeKeyManagerItem> implements TreeKeyManagerStrategy<T> {
  133. readonly _isNoopTreeKeyManager = true;
  134. readonly change: Subject<T | null>;
  135. destroy(): void;
  136. onKeydown(): void;
  137. getActiveItemIndex(): null;
  138. getActiveItem(): null;
  139. focusItem(): void;
  140. }
  141. /**
  142. * @docs-private
  143. *
  144. * Opt-out of Tree of key manager behavior.
  145. *
  146. * When provided, Tree has same focus management behavior as before TreeKeyManager was introduced.
  147. * - Tree does not respond to keyboard interaction
  148. * - Tree node allows tabindex to be set by Input binding
  149. * - Tree node allows tabindex to be set by attribute binding
  150. *
  151. * @deprecated NoopTreeKeyManager deprecated. Use TreeKeyManager or inject a
  152. * TreeKeyManagerStrategy instead. To be removed in a future version.
  153. *
  154. * @breaking-change 21.0.0
  155. */
  156. declare function NOOP_TREE_KEY_MANAGER_FACTORY<T extends TreeKeyManagerItem>(): TreeKeyManagerFactory<T>;
  157. /**
  158. * @docs-private
  159. *
  160. * Opt-out of Tree of key manager behavior.
  161. *
  162. * When provided, Tree has same focus management behavior as before TreeKeyManager was introduced.
  163. * - Tree does not respond to keyboard interaction
  164. * - Tree node allows tabindex to be set by Input binding
  165. * - Tree node allows tabindex to be set by attribute binding
  166. *
  167. * @deprecated NoopTreeKeyManager deprecated. Use TreeKeyManager or inject a
  168. * TreeKeyManagerStrategy instead. To be removed in a future version.
  169. *
  170. * @breaking-change 21.0.0
  171. */
  172. declare const NOOP_TREE_KEY_MANAGER_FACTORY_PROVIDER: Provider;
  173. /**
  174. * This class manages keyboard events for trees. If you pass it a QueryList or other list of tree
  175. * items, it will set the active item, focus, handle expansion and typeahead correctly when
  176. * keyboard events occur.
  177. */
  178. declare class TreeKeyManager<T extends TreeKeyManagerItem> implements TreeKeyManagerStrategy<T> {
  179. /** The index of the currently active (focused) item. */
  180. private _activeItemIndex;
  181. /** The currently active (focused) item. */
  182. private _activeItem;
  183. /** Whether or not we activate the item when it's focused. */
  184. private _shouldActivationFollowFocus;
  185. /**
  186. * The orientation that the tree is laid out in. In `rtl` mode, the behavior of Left and
  187. * Right arrow are switched.
  188. */
  189. private _horizontalOrientation;
  190. /**
  191. * Predicate function that can be used to check whether an item should be skipped
  192. * by the key manager.
  193. *
  194. * The default value for this doesn't skip any elements in order to keep tree items focusable
  195. * when disabled. This aligns with ARIA guidelines:
  196. * https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#focusabilityofdisabledcontrols.
  197. */
  198. private _skipPredicateFn;
  199. /** Function to determine equivalent items. */
  200. private _trackByFn;
  201. /** Synchronous cache of the items to manage. */
  202. private _items;
  203. private _typeahead?;
  204. private _typeaheadSubscription;
  205. private _hasInitialFocused;
  206. private _initializeFocus;
  207. /**
  208. *
  209. * @param items List of TreeKeyManager options. Can be synchronous or asynchronous.
  210. * @param config Optional configuration options. By default, use 'ltr' horizontal orientation. By
  211. * default, do not skip any nodes. By default, key manager only calls `focus` method when items
  212. * are focused and does not call `activate`. If `typeaheadDefaultInterval` is `true`, use a
  213. * default interval of 200ms.
  214. */
  215. constructor(items: Observable<T[]> | QueryList<T> | T[], config: TreeKeyManagerOptions<T>);
  216. /** Stream that emits any time the focused item changes. */
  217. readonly change: Subject<T | null>;
  218. /** Cleans up the key manager. */
  219. destroy(): void;
  220. /**
  221. * Handles a keyboard event on the tree.
  222. * @param event Keyboard event that represents the user interaction with the tree.
  223. */
  224. onKeydown(event: KeyboardEvent): void;
  225. /** Index of the currently active item. */
  226. getActiveItemIndex(): number | null;
  227. /** The currently active item. */
  228. getActiveItem(): T | null;
  229. /** Focus the first available item. */
  230. private _focusFirstItem;
  231. /** Focus the last available item. */
  232. private _focusLastItem;
  233. /** Focus the next available item. */
  234. private _focusNextItem;
  235. /** Focus the previous available item. */
  236. private _focusPreviousItem;
  237. /**
  238. * Focus the provided item by index.
  239. * @param index The index of the item to focus.
  240. * @param options Additional focusing options.
  241. */
  242. focusItem(index: number, options?: {
  243. emitChangeEvent?: boolean;
  244. }): void;
  245. focusItem(item: T, options?: {
  246. emitChangeEvent?: boolean;
  247. }): void;
  248. focusItem(itemOrIndex: number | T, options?: {
  249. emitChangeEvent?: boolean;
  250. }): void;
  251. private _updateActiveItemIndex;
  252. private _setTypeAhead;
  253. private _findNextAvailableItemIndex;
  254. private _findPreviousAvailableItemIndex;
  255. /**
  256. * If the item is already expanded, we collapse the item. Otherwise, we will focus the parent.
  257. */
  258. private _collapseCurrentItem;
  259. /**
  260. * If the item is already collapsed, we expand the item. Otherwise, we will focus the first child.
  261. */
  262. private _expandCurrentItem;
  263. private _isCurrentItemExpanded;
  264. private _isItemDisabled;
  265. /** For all items that are the same level as the current item, we expand those items. */
  266. private _expandAllItemsAtCurrentItemLevel;
  267. private _activateCurrentItem;
  268. }
  269. /**
  270. * @docs-private
  271. * @deprecated No longer used, will be removed.
  272. * @breaking-change 21.0.0
  273. */
  274. declare function TREE_KEY_MANAGER_FACTORY<T extends TreeKeyManagerItem>(): TreeKeyManagerFactory<T>;
  275. /** Injection token that determines the key manager to use. */
  276. declare const TREE_KEY_MANAGER: InjectionToken<TreeKeyManagerFactory<any>>;
  277. /**
  278. * @docs-private
  279. * @deprecated No longer used, will be removed.
  280. * @breaking-change 21.0.0
  281. */
  282. declare const TREE_KEY_MANAGER_FACTORY_PROVIDER: {
  283. provide: InjectionToken<TreeKeyManagerFactory<any>>;
  284. useFactory: typeof TREE_KEY_MANAGER_FACTORY;
  285. };
  286. /**
  287. * Options for creating a ConfigurableFocusTrap.
  288. */
  289. interface ConfigurableFocusTrapConfig {
  290. /**
  291. * Whether to defer the creation of FocusTrap elements to be done manually by the user.
  292. */
  293. defer: boolean;
  294. }
  295. /** The injection token used to specify the inert strategy. */
  296. declare const FOCUS_TRAP_INERT_STRATEGY: InjectionToken<FocusTrapInertStrategy>;
  297. /**
  298. * A strategy that dictates how FocusTrap should prevent elements
  299. * outside of the FocusTrap from being focused.
  300. */
  301. interface FocusTrapInertStrategy {
  302. /** Makes all elements outside focusTrap unfocusable. */
  303. preventFocus(focusTrap: FocusTrap): void;
  304. /** Reverts elements made unfocusable by preventFocus to their previous state. */
  305. allowFocus(focusTrap: FocusTrap): void;
  306. }
  307. /**
  308. * A FocusTrap managed by FocusTrapManager.
  309. * Implemented by ConfigurableFocusTrap to avoid circular dependency.
  310. */
  311. interface ManagedFocusTrap {
  312. _enable(): void;
  313. _disable(): void;
  314. focusInitialElementWhenReady(): Promise<boolean>;
  315. }
  316. /** Injectable that ensures only the most recently enabled FocusTrap is active. */
  317. declare class FocusTrapManager {
  318. private _focusTrapStack;
  319. /**
  320. * Disables the FocusTrap at the top of the stack, and then pushes
  321. * the new FocusTrap onto the stack.
  322. */
  323. register(focusTrap: ManagedFocusTrap): void;
  324. /**
  325. * Removes the FocusTrap from the stack, and activates the
  326. * FocusTrap that is the new top of the stack.
  327. */
  328. deregister(focusTrap: ManagedFocusTrap): void;
  329. static ɵfac: i0.ɵɵFactoryDeclaration<FocusTrapManager, never>;
  330. static ɵprov: i0.ɵɵInjectableDeclaration<FocusTrapManager>;
  331. }
  332. /**
  333. * Class that allows for trapping focus within a DOM element.
  334. *
  335. * This class uses a strategy pattern that determines how it traps focus.
  336. * See FocusTrapInertStrategy.
  337. */
  338. declare class ConfigurableFocusTrap extends FocusTrap implements ManagedFocusTrap {
  339. private _focusTrapManager;
  340. private _inertStrategy;
  341. /** Whether the FocusTrap is enabled. */
  342. get enabled(): boolean;
  343. set enabled(value: boolean);
  344. constructor(_element: HTMLElement, _checker: InteractivityChecker, _ngZone: NgZone, _document: Document, _focusTrapManager: FocusTrapManager, _inertStrategy: FocusTrapInertStrategy, config: ConfigurableFocusTrapConfig, injector?: Injector);
  345. /** Notifies the FocusTrapManager that this FocusTrap will be destroyed. */
  346. destroy(): void;
  347. /** @docs-private Implemented as part of ManagedFocusTrap. */
  348. _enable(): void;
  349. /** @docs-private Implemented as part of ManagedFocusTrap. */
  350. _disable(): void;
  351. }
  352. /** Factory that allows easy instantiation of configurable focus traps. */
  353. declare class ConfigurableFocusTrapFactory {
  354. private _checker;
  355. private _ngZone;
  356. private _focusTrapManager;
  357. private _document;
  358. private _inertStrategy;
  359. private readonly _injector;
  360. constructor(...args: unknown[]);
  361. /**
  362. * Creates a focus-trapped region around the given element.
  363. * @param element The element around which focus will be trapped.
  364. * @param config The focus trap configuration.
  365. * @returns The created focus trap instance.
  366. */
  367. create(element: HTMLElement, config?: ConfigurableFocusTrapConfig): ConfigurableFocusTrap;
  368. /**
  369. * @deprecated Pass a config object instead of the `deferCaptureElements` flag.
  370. * @breaking-change 11.0.0
  371. */
  372. create(element: HTMLElement, deferCaptureElements: boolean): ConfigurableFocusTrap;
  373. static ɵfac: i0.ɵɵFactoryDeclaration<ConfigurableFocusTrapFactory, never>;
  374. static ɵprov: i0.ɵɵInjectableDeclaration<ConfigurableFocusTrapFactory>;
  375. }
  376. /**
  377. * Lightweight FocusTrapInertStrategy that adds a document focus event
  378. * listener to redirect focus back inside the FocusTrap.
  379. */
  380. declare class EventListenerFocusTrapInertStrategy implements FocusTrapInertStrategy {
  381. /** Focus event handler. */
  382. private _listener;
  383. /** Adds a document event listener that keeps focus inside the FocusTrap. */
  384. preventFocus(focusTrap: ConfigurableFocusTrap): void;
  385. /** Removes the event listener added in preventFocus. */
  386. allowFocus(focusTrap: ConfigurableFocusTrap): void;
  387. /**
  388. * Refocuses the first element in the FocusTrap if the focus event target was outside
  389. * the FocusTrap.
  390. *
  391. * This is an event listener callback. The event listener is added in runOutsideAngular,
  392. * so all this code runs outside Angular as well.
  393. */
  394. private _trapFocus;
  395. }
  396. /**
  397. * The input modalities detected by this service. Null is used if the input modality is unknown.
  398. */
  399. type InputModality = 'keyboard' | 'mouse' | 'touch' | null;
  400. /** Options to configure the behavior of the InputModalityDetector. */
  401. interface InputModalityDetectorOptions {
  402. /** Keys to ignore when detecting keyboard input modality. */
  403. ignoreKeys?: number[];
  404. }
  405. /**
  406. * Injectable options for the InputModalityDetector. These are shallowly merged with the default
  407. * options.
  408. */
  409. declare const INPUT_MODALITY_DETECTOR_OPTIONS: InjectionToken<InputModalityDetectorOptions>;
  410. /**
  411. * Default options for the InputModalityDetector.
  412. *
  413. * Modifier keys are ignored by default (i.e. when pressed won't cause the service to detect
  414. * keyboard input modality) for two reasons:
  415. *
  416. * 1. Modifier keys are commonly used with mouse to perform actions such as 'right click' or 'open
  417. * in new tab', and are thus less representative of actual keyboard interaction.
  418. * 2. VoiceOver triggers some keyboard events when linearly navigating with Control + Option (but
  419. * confusingly not with Caps Lock). Thus, to have parity with other screen readers, we ignore
  420. * these keys so as to not update the input modality.
  421. *
  422. * Note that we do not by default ignore the right Meta key on Safari because it has the same key
  423. * code as the ContextMenu key on other browsers. When we switch to using event.key, we can
  424. * distinguish between the two.
  425. */
  426. declare const INPUT_MODALITY_DETECTOR_DEFAULT_OPTIONS: InputModalityDetectorOptions;
  427. /**
  428. * Service that detects the user's input modality.
  429. *
  430. * This service does not update the input modality when a user navigates with a screen reader
  431. * (e.g. linear navigation with VoiceOver, object navigation / browse mode with NVDA, virtual PC
  432. * cursor mode with JAWS). This is in part due to technical limitations (i.e. keyboard events do not
  433. * fire as expected in these modes) but is also arguably the correct behavior. Navigating with a
  434. * screen reader is akin to visually scanning a page, and should not be interpreted as actual user
  435. * input interaction.
  436. *
  437. * When a user is not navigating but *interacting* with a screen reader, this service attempts to
  438. * update the input modality to keyboard, but in general this service's behavior is largely
  439. * undefined.
  440. */
  441. declare class InputModalityDetector implements OnDestroy {
  442. private readonly _platform;
  443. private readonly _listenerCleanups;
  444. /** Emits whenever an input modality is detected. */
  445. readonly modalityDetected: Observable<InputModality>;
  446. /** Emits when the input modality changes. */
  447. readonly modalityChanged: Observable<InputModality>;
  448. /** The most recently detected input modality. */
  449. get mostRecentModality(): InputModality;
  450. /**
  451. * The most recently detected input modality event target. Is null if no input modality has been
  452. * detected or if the associated event target is null for some unknown reason.
  453. */
  454. _mostRecentTarget: HTMLElement | null;
  455. /** The underlying BehaviorSubject that emits whenever an input modality is detected. */
  456. private readonly _modality;
  457. /** Options for this InputModalityDetector. */
  458. private readonly _options;
  459. /**
  460. * The timestamp of the last touch input modality. Used to determine whether mousedown events
  461. * should be attributed to mouse or touch.
  462. */
  463. private _lastTouchMs;
  464. /**
  465. * Handles keydown events. Must be an arrow function in order to preserve the context when it gets
  466. * bound.
  467. */
  468. private _onKeydown;
  469. /**
  470. * Handles mousedown events. Must be an arrow function in order to preserve the context when it
  471. * gets bound.
  472. */
  473. private _onMousedown;
  474. /**
  475. * Handles touchstart events. Must be an arrow function in order to preserve the context when it
  476. * gets bound.
  477. */
  478. private _onTouchstart;
  479. constructor(...args: unknown[]);
  480. ngOnDestroy(): void;
  481. static ɵfac: i0.ɵɵFactoryDeclaration<InputModalityDetector, never>;
  482. static ɵprov: i0.ɵɵInjectableDeclaration<InputModalityDetector>;
  483. }
  484. /** Gets whether an event could be a faked `mousedown` event dispatched by a screen reader. */
  485. declare function isFakeMousedownFromScreenReader(event: MouseEvent): boolean;
  486. /** Gets whether an event could be a faked `touchstart` event dispatched by a screen reader. */
  487. declare function isFakeTouchstartFromScreenReader(event: TouchEvent): boolean;
  488. /** Set of possible high-contrast mode backgrounds. */
  489. declare enum HighContrastMode {
  490. NONE = 0,
  491. BLACK_ON_WHITE = 1,
  492. WHITE_ON_BLACK = 2
  493. }
  494. /**
  495. * Service to determine whether the browser is currently in a high-contrast-mode environment.
  496. *
  497. * Microsoft Windows supports an accessibility feature called "High Contrast Mode". This mode
  498. * changes the appearance of all applications, including web applications, to dramatically increase
  499. * contrast.
  500. *
  501. * IE, Edge, and Firefox currently support this mode. Chrome does not support Windows High Contrast
  502. * Mode. This service does not detect high-contrast mode as added by the Chrome "High Contrast"
  503. * browser extension.
  504. */
  505. declare class HighContrastModeDetector implements OnDestroy {
  506. private _platform;
  507. /**
  508. * Figuring out the high contrast mode and adding the body classes can cause
  509. * some expensive layouts. This flag is used to ensure that we only do it once.
  510. */
  511. private _hasCheckedHighContrastMode;
  512. private _document;
  513. private _breakpointSubscription;
  514. constructor(...args: unknown[]);
  515. /** Gets the current high-contrast-mode for the page. */
  516. getHighContrastMode(): HighContrastMode;
  517. ngOnDestroy(): void;
  518. /** Applies CSS classes indicating high-contrast mode to document body (browser-only). */
  519. _applyBodyHighContrastModeCssClasses(): void;
  520. static ɵfac: i0.ɵɵFactoryDeclaration<HighContrastModeDetector, never>;
  521. static ɵprov: i0.ɵɵInjectableDeclaration<HighContrastModeDetector>;
  522. }
  523. /** Service that generates unique IDs for DOM nodes. */
  524. declare class _IdGenerator {
  525. private _appId;
  526. /**
  527. * Generates a unique ID with a specific prefix.
  528. * @param prefix Prefix to add to the ID.
  529. */
  530. getId(prefix: string): string;
  531. static ɵfac: i0.ɵɵFactoryDeclaration<_IdGenerator, never>;
  532. static ɵprov: i0.ɵɵInjectableDeclaration<_IdGenerator>;
  533. }
  534. export { AriaDescriber, CDK_DESCRIBEDBY_HOST_ATTRIBUTE, CDK_DESCRIBEDBY_ID_PREFIX, ConfigurableFocusTrap, ConfigurableFocusTrapFactory, EventListenerFocusTrapInertStrategy, FOCUS_TRAP_INERT_STRATEGY, FocusTrap, HighContrastMode, HighContrastModeDetector, INPUT_MODALITY_DETECTOR_DEFAULT_OPTIONS, INPUT_MODALITY_DETECTOR_OPTIONS, InputModalityDetector, InteractivityChecker, MESSAGES_CONTAINER_ID, NOOP_TREE_KEY_MANAGER_FACTORY, NOOP_TREE_KEY_MANAGER_FACTORY_PROVIDER, NoopTreeKeyManager, TREE_KEY_MANAGER, TREE_KEY_MANAGER_FACTORY, TREE_KEY_MANAGER_FACTORY_PROVIDER, TreeKeyManager, TreeKeyManagerFactory, TreeKeyManagerItem, TreeKeyManagerOptions, TreeKeyManagerStrategy, _IdGenerator, addAriaReferencedId, getAriaReferenceIds, isFakeMousedownFromScreenReader, isFakeTouchstartFromScreenReader, removeAriaReferencedId };
  535. export type { ConfigurableFocusTrapConfig, FocusTrapInertStrategy, InputModality, InputModalityDetectorOptions, RegisteredMessage };