@angular/cdk 19.2.3 → 20.0.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. package/a11y/index.d.ts +12 -843
  2. package/a11y-module.d-7d03e079.d.ts +313 -0
  3. package/accordion/index.d.ts +1 -1
  4. package/activedescendant-key-manager.d-11921e3a.d.ts +31 -0
  5. package/bidi/index.d.ts +3 -52
  6. package/bidi-module.d-f8648621.d.ts +53 -0
  7. package/coercion/index.d.ts +2 -15
  8. package/collections/index.d.ts +10 -269
  9. package/data-source.d-7cab2c9d.d.ts +42 -0
  10. package/dialog/index.d.ts +17 -32
  11. package/drag-drop/index.d.ts +14 -18
  12. package/fesm2022/a11y-module-e6996d20.mjs +952 -0
  13. package/fesm2022/a11y-module-e6996d20.mjs.map +1 -0
  14. package/fesm2022/a11y.mjs +42 -2448
  15. package/fesm2022/a11y.mjs.map +1 -1
  16. package/fesm2022/accordion.mjs +12 -12
  17. package/fesm2022/accordion.mjs.map +1 -1
  18. package/fesm2022/activedescendant-key-manager-1351a9d3.mjs +16 -0
  19. package/fesm2022/activedescendant-key-manager-1351a9d3.mjs.map +1 -0
  20. package/fesm2022/array-ee3b4bab.mjs +6 -0
  21. package/fesm2022/array-ee3b4bab.mjs.map +1 -0
  22. package/fesm2022/backwards-compatibility-bcbe473e.mjs +25 -0
  23. package/fesm2022/backwards-compatibility-bcbe473e.mjs.map +1 -0
  24. package/fesm2022/bidi-module-0726b65c.mjs +78 -0
  25. package/fesm2022/bidi-module-0726b65c.mjs.map +1 -0
  26. package/fesm2022/bidi.mjs +4 -143
  27. package/fesm2022/bidi.mjs.map +1 -1
  28. package/fesm2022/breakpoints-observer-d4584b66.mjs +179 -0
  29. package/fesm2022/breakpoints-observer-d4584b66.mjs.map +1 -0
  30. package/fesm2022/cdk.mjs +1 -1
  31. package/fesm2022/cdk.mjs.map +1 -1
  32. package/fesm2022/clipboard.mjs +10 -10
  33. package/fesm2022/clipboard.mjs.map +1 -1
  34. package/fesm2022/coercion/private.mjs +2 -14
  35. package/fesm2022/coercion/private.mjs.map +1 -1
  36. package/fesm2022/coercion.mjs +5 -39
  37. package/fesm2022/coercion.mjs.map +1 -1
  38. package/fesm2022/collections.mjs +7 -472
  39. package/fesm2022/collections.mjs.map +1 -1
  40. package/fesm2022/css-pixel-value-286c9a60.mjs +10 -0
  41. package/fesm2022/css-pixel-value-286c9a60.mjs.map +1 -0
  42. package/fesm2022/data-source-5320b6fd.mjs +15 -0
  43. package/fesm2022/data-source-5320b6fd.mjs.map +1 -0
  44. package/fesm2022/dialog.mjs +37 -41
  45. package/fesm2022/dialog.mjs.map +1 -1
  46. package/fesm2022/directionality-7ea26429.mjs +72 -0
  47. package/fesm2022/directionality-7ea26429.mjs.map +1 -0
  48. package/fesm2022/dispose-view-repeater-strategy-b11b87ea.mjs +44 -0
  49. package/fesm2022/dispose-view-repeater-strategy-b11b87ea.mjs.map +1 -0
  50. package/fesm2022/drag-drop.mjs +48 -46
  51. package/fesm2022/drag-drop.mjs.map +1 -1
  52. package/fesm2022/element-705567fe.mjs +29 -0
  53. package/fesm2022/element-705567fe.mjs.map +1 -0
  54. package/fesm2022/fake-event-detection-7055b1bd.mjs +24 -0
  55. package/fesm2022/fake-event-detection-7055b1bd.mjs.map +1 -0
  56. package/fesm2022/focus-key-manager-58d29acd.mjs +22 -0
  57. package/fesm2022/focus-key-manager-58d29acd.mjs.map +1 -0
  58. package/fesm2022/focus-monitor-cebaa0d1.mjs +629 -0
  59. package/fesm2022/focus-monitor-cebaa0d1.mjs.map +1 -0
  60. package/fesm2022/id-generator-fba495fb.mjs +37 -0
  61. package/fesm2022/id-generator-fba495fb.mjs.map +1 -0
  62. package/fesm2022/keycodes-107cd3e4.mjs +122 -0
  63. package/fesm2022/keycodes-107cd3e4.mjs.map +1 -0
  64. package/fesm2022/keycodes.mjs +2 -132
  65. package/fesm2022/keycodes.mjs.map +1 -1
  66. package/fesm2022/layout.mjs +12 -180
  67. package/fesm2022/layout.mjs.map +1 -1
  68. package/fesm2022/list-key-manager-c7b5cefb.mjs +360 -0
  69. package/fesm2022/list-key-manager-c7b5cefb.mjs.map +1 -0
  70. package/fesm2022/listbox.mjs +21 -16
  71. package/fesm2022/listbox.mjs.map +1 -1
  72. package/fesm2022/menu.mjs +76 -56
  73. package/fesm2022/menu.mjs.map +1 -1
  74. package/fesm2022/modifiers-33a5859e.mjs +13 -0
  75. package/fesm2022/modifiers-33a5859e.mjs.map +1 -0
  76. package/fesm2022/observable-97c0792c.mjs +15 -0
  77. package/fesm2022/observable-97c0792c.mjs.map +1 -0
  78. package/fesm2022/observe-content-d2a6b5a0.mjs +210 -0
  79. package/fesm2022/observe-content-d2a6b5a0.mjs.map +1 -0
  80. package/fesm2022/observers/private.mjs +3 -3
  81. package/fesm2022/observers/private.mjs.map +1 -1
  82. package/fesm2022/observers.mjs +5 -209
  83. package/fesm2022/observers.mjs.map +1 -1
  84. package/fesm2022/overlay-module-863b82c9.mjs +3029 -0
  85. package/fesm2022/overlay-module-863b82c9.mjs.map +1 -0
  86. package/fesm2022/overlay.mjs +28 -3023
  87. package/fesm2022/overlay.mjs.map +1 -1
  88. package/fesm2022/passive-listeners-c0bdc49f.mjs +31 -0
  89. package/fesm2022/passive-listeners-c0bdc49f.mjs.map +1 -0
  90. package/fesm2022/platform-1be098b0.mjs +77 -0
  91. package/fesm2022/platform-1be098b0.mjs.map +1 -0
  92. package/fesm2022/platform.mjs +13 -289
  93. package/fesm2022/platform.mjs.map +1 -1
  94. package/fesm2022/portal-directives-c88fea11.mjs +615 -0
  95. package/fesm2022/portal-directives-c88fea11.mjs.map +1 -0
  96. package/fesm2022/portal.mjs +3 -675
  97. package/fesm2022/portal.mjs.map +1 -1
  98. package/fesm2022/private.mjs +3 -59
  99. package/fesm2022/private.mjs.map +1 -1
  100. package/fesm2022/recycle-view-repeater-strategy-c1712813.mjs +156 -0
  101. package/fesm2022/recycle-view-repeater-strategy-c1712813.mjs.map +1 -0
  102. package/fesm2022/scrolling-61955dd1.mjs +99 -0
  103. package/fesm2022/scrolling-61955dd1.mjs.map +1 -0
  104. package/fesm2022/scrolling-module-aa9eeac5.mjs +1463 -0
  105. package/fesm2022/scrolling-module-aa9eeac5.mjs.map +1 -0
  106. package/fesm2022/scrolling.mjs +12 -1459
  107. package/fesm2022/scrolling.mjs.map +1 -1
  108. package/fesm2022/selection-model-30243dba.mjs +221 -0
  109. package/fesm2022/selection-model-30243dba.mjs.map +1 -0
  110. package/fesm2022/shadow-dom-9f403d00.mjs +49 -0
  111. package/fesm2022/shadow-dom-9f403d00.mjs.map +1 -0
  112. package/fesm2022/stepper.mjs +32 -26
  113. package/fesm2022/stepper.mjs.map +1 -1
  114. package/fesm2022/style-loader-e14dc585.mjs +47 -0
  115. package/fesm2022/style-loader-e14dc585.mjs.map +1 -0
  116. package/fesm2022/table.mjs +87 -121
  117. package/fesm2022/table.mjs.map +1 -1
  118. package/fesm2022/test-environment-34eef1ee.mjs +19 -0
  119. package/fesm2022/test-environment-34eef1ee.mjs.map +1 -0
  120. package/fesm2022/testing/selenium-webdriver.mjs +2 -1
  121. package/fesm2022/testing/selenium-webdriver.mjs.map +1 -1
  122. package/fesm2022/testing/testbed.mjs +33 -34
  123. package/fesm2022/testing/testbed.mjs.map +1 -1
  124. package/fesm2022/testing.mjs +2 -697
  125. package/fesm2022/testing.mjs.map +1 -1
  126. package/fesm2022/text-field.mjs +20 -19
  127. package/fesm2022/text-field.mjs.map +1 -1
  128. package/fesm2022/text-filtering-b60ba8a2.mjs +698 -0
  129. package/fesm2022/text-filtering-b60ba8a2.mjs.map +1 -0
  130. package/fesm2022/tree-key-manager-2f20c79c.mjs +360 -0
  131. package/fesm2022/tree-key-manager-2f20c79c.mjs.map +1 -0
  132. package/fesm2022/tree.mjs +33 -29
  133. package/fesm2022/tree.mjs.map +1 -1
  134. package/fesm2022/typeahead-11ae39bd.mjs +88 -0
  135. package/fesm2022/typeahead-11ae39bd.mjs.map +1 -0
  136. package/fesm2022/unique-selection-dispatcher-1d6f91d8.mjs +49 -0
  137. package/fesm2022/unique-selection-dispatcher-1d6f91d8.mjs.map +1 -0
  138. package/fesm2022/visually-hidden-83aea4a0.mjs +18 -0
  139. package/fesm2022/visually-hidden-83aea4a0.mjs.map +1 -0
  140. package/focus-key-manager.d-415a6958.d.ts +33 -0
  141. package/focus-monitor.d-810a02e6.d.ts +209 -0
  142. package/harness-environment.d-4d615248.d.ts +619 -0
  143. package/list-key-manager.d-72e9a2e7.d.ts +164 -0
  144. package/listbox/index.d.ts +5 -4
  145. package/menu/index.d.ts +14 -6
  146. package/number-property.d-ce316715.d.ts +15 -0
  147. package/observe-content.d-c08bc882.d.ts +84 -0
  148. package/observers/index.d.ts +4 -84
  149. package/overlay/index.d.ts +16 -792
  150. package/overlay-module.d-5d06db8a.d.ts +790 -0
  151. package/package.json +3 -3
  152. package/platform/index.d.ts +2 -31
  153. package/platform.d-0a5b4792.d.ts +33 -0
  154. package/portal/index.d.ts +5 -266
  155. package/portal-directives.d-d345bd53.d.ts +210 -0
  156. package/private/index.d.ts +2 -19
  157. package/schematics/migration.json +4 -4
  158. package/schematics/ng-add/index.js +1 -1
  159. package/schematics/ng-add/index.mjs +1 -1
  160. package/schematics/ng-update/index.d.ts +2 -2
  161. package/schematics/ng-update/index.js +5 -5
  162. package/schematics/ng-update/index.mjs +5 -5
  163. package/schematics/update-tool/target-version.d.ts +1 -1
  164. package/schematics/update-tool/target-version.js +2 -2
  165. package/schematics/update-tool/target-version.mjs +2 -2
  166. package/scrolling/index.d.ts +7 -604
  167. package/scrolling-module.d-a08a462d.d.ts +551 -0
  168. package/selection-model.d-1a70542c.d.ts +111 -0
  169. package/stepper/index.d.ts +5 -3
  170. package/style-loader.d-19baab84.d.ts +21 -0
  171. package/table/index.d.ts +8 -19
  172. package/testing/index.d.ts +2 -618
  173. package/testing/selenium-webdriver/index.d.ts +1 -1
  174. package/testing/testbed/index.d.ts +1 -1
  175. package/text-field/index.d.ts +1 -1
  176. package/tree/index.d.ts +3 -2
  177. package/tree-key-manager-strategy.d-603161dd.d.ts +116 -0
  178. package/unique-selection-dispatcher.d-7993b9f5.d.ts +32 -0
  179. package/view-repeater.d-79039e1f.d.ts +88 -0
  180. package/viewport-ruler.d-f3d3e82f.d.ts +57 -0
package/a11y/index.d.ts CHANGED
@@ -1,7 +1,16 @@
1
1
  import * as i0 from '@angular/core';
2
- import { OnDestroy, QueryList, Signal, Injector, InjectionToken, ElementRef, AfterViewInit, EventEmitter, Provider, NgZone, AfterContentInit, OnChanges, DoCheck, SimpleChanges } 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-11921e3a.js';
4
+ export { a as FocusKeyManager, F as FocusableOption } from '../focus-key-manager.d-415a6958.js';
5
+ export { b as ListKeyManager, a as ListKeyManagerModifierKey, L as ListKeyManagerOption } from '../list-key-manager.d-72e9a2e7.js';
3
6
  import { Subject, Observable } from 'rxjs';
4
- import * as i1 from '@angular/cdk/observers';
7
+ import { T as TreeKeyManagerItem, a as TreeKeyManagerStrategy, b as TreeKeyManagerFactory, c as TreeKeyManagerOptions } from '../tree-key-manager-strategy.d-603161dd.js';
8
+ export { b as TreeKeyManagerFactory, T as TreeKeyManagerItem, c as TreeKeyManagerOptions, a as TreeKeyManagerStrategy } from '../tree-key-manager-strategy.d-603161dd.js';
9
+ import { F as FocusTrap, I as InteractivityChecker } from '../a11y-module.d-7d03e079.js';
10
+ export { h as A11yModule, A as AriaLivePoliteness, c as CdkAriaLive, C as CdkTrapFocus, F as FocusTrap, a as FocusTrapFactory, I as InteractivityChecker, b as IsFocusableConfig, g as LIVE_ANNOUNCER_DEFAULT_OPTIONS, d as LIVE_ANNOUNCER_ELEMENT_TOKEN, e as LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY, L as LiveAnnouncer, f as LiveAnnouncerDefaultOptions } from '../a11y-module.d-7d03e079.js';
11
+ 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-810a02e6.js';
12
+ import '../observe-content.d-c08bc882.js';
13
+ import '../number-property.d-ce316715.js';
5
14
 
6
15
  /**
7
16
  * Interface used to register message elements and keep a count of how many registrations have
@@ -109,539 +118,6 @@ declare function removeAriaReferencedId(el: Element, attr: `aria-${string}`, id:
109
118
  */
110
119
  declare function getAriaReferenceIds(el: Element, attr: string): string[];
111
120
 
112
- /** This interface is for items that can be passed to a ListKeyManager. */
113
- interface ListKeyManagerOption {
114
- /** Whether the option is disabled. */
115
- disabled?: boolean;
116
- /** Gets the label for this option. */
117
- getLabel?(): string;
118
- }
119
- /** Modifier keys handled by the ListKeyManager. */
120
- type ListKeyManagerModifierKey = 'altKey' | 'ctrlKey' | 'metaKey' | 'shiftKey';
121
- /**
122
- * This class manages keyboard events for selectable lists. If you pass it a query list
123
- * of items, it will set the active item correctly when arrow events occur.
124
- */
125
- declare class ListKeyManager<T extends ListKeyManagerOption> {
126
- private _items;
127
- private _activeItemIndex;
128
- private _activeItem;
129
- private _wrap;
130
- private _typeaheadSubscription;
131
- private _itemChangesSubscription?;
132
- private _vertical;
133
- private _horizontal;
134
- private _allowedModifierKeys;
135
- private _homeAndEnd;
136
- private _pageUpAndDown;
137
- private _effectRef;
138
- private _typeahead?;
139
- /**
140
- * Predicate function that can be used to check whether an item should be skipped
141
- * by the key manager. By default, disabled items are skipped.
142
- */
143
- private _skipPredicateFn;
144
- constructor(items: QueryList<T> | T[] | readonly T[]);
145
- constructor(items: Signal<T[]> | Signal<readonly T[]>, injector: Injector);
146
- /**
147
- * Stream that emits any time the TAB key is pressed, so components can react
148
- * when focus is shifted off of the list.
149
- */
150
- readonly tabOut: Subject<void>;
151
- /** Stream that emits whenever the active item of the list manager changes. */
152
- readonly change: Subject<number>;
153
- /**
154
- * Sets the predicate function that determines which items should be skipped by the
155
- * list key manager.
156
- * @param predicate Function that determines whether the given item should be skipped.
157
- */
158
- skipPredicate(predicate: (item: T) => boolean): this;
159
- /**
160
- * Configures wrapping mode, which determines whether the active item will wrap to
161
- * the other end of list when there are no more items in the given direction.
162
- * @param shouldWrap Whether the list should wrap when reaching the end.
163
- */
164
- withWrap(shouldWrap?: boolean): this;
165
- /**
166
- * Configures whether the key manager should be able to move the selection vertically.
167
- * @param enabled Whether vertical selection should be enabled.
168
- */
169
- withVerticalOrientation(enabled?: boolean): this;
170
- /**
171
- * Configures the key manager to move the selection horizontally.
172
- * Passing in `null` will disable horizontal movement.
173
- * @param direction Direction in which the selection can be moved.
174
- */
175
- withHorizontalOrientation(direction: 'ltr' | 'rtl' | null): this;
176
- /**
177
- * Modifier keys which are allowed to be held down and whose default actions will be prevented
178
- * as the user is pressing the arrow keys. Defaults to not allowing any modifier keys.
179
- */
180
- withAllowedModifierKeys(keys: ListKeyManagerModifierKey[]): this;
181
- /**
182
- * Turns on typeahead mode which allows users to set the active item by typing.
183
- * @param debounceInterval Time to wait after the last keystroke before setting the active item.
184
- */
185
- withTypeAhead(debounceInterval?: number): this;
186
- /** Cancels the current typeahead sequence. */
187
- cancelTypeahead(): this;
188
- /**
189
- * Configures the key manager to activate the first and last items
190
- * respectively when the Home or End key is pressed.
191
- * @param enabled Whether pressing the Home or End key activates the first/last item.
192
- */
193
- withHomeAndEnd(enabled?: boolean): this;
194
- /**
195
- * Configures the key manager to activate every 10th, configured or first/last element in up/down direction
196
- * respectively when the Page-Up or Page-Down key is pressed.
197
- * @param enabled Whether pressing the Page-Up or Page-Down key activates the first/last item.
198
- * @param delta Whether pressing the Home or End key activates the first/last item.
199
- */
200
- withPageUpDown(enabled?: boolean, delta?: number): this;
201
- /**
202
- * Sets the active item to the item at the index specified.
203
- * @param index The index of the item to be set as active.
204
- */
205
- setActiveItem(index: number): void;
206
- /**
207
- * Sets the active item to the specified item.
208
- * @param item The item to be set as active.
209
- */
210
- setActiveItem(item: T): void;
211
- /**
212
- * Sets the active item depending on the key event passed in.
213
- * @param event Keyboard event to be used for determining which element should be active.
214
- */
215
- onKeydown(event: KeyboardEvent): void;
216
- /** Index of the currently active item. */
217
- get activeItemIndex(): number | null;
218
- /** The active item. */
219
- get activeItem(): T | null;
220
- /** Gets whether the user is currently typing into the manager using the typeahead feature. */
221
- isTyping(): boolean;
222
- /** Sets the active item to the first enabled item in the list. */
223
- setFirstItemActive(): void;
224
- /** Sets the active item to the last enabled item in the list. */
225
- setLastItemActive(): void;
226
- /** Sets the active item to the next enabled item in the list. */
227
- setNextItemActive(): void;
228
- /** Sets the active item to a previous enabled item in the list. */
229
- setPreviousItemActive(): void;
230
- /**
231
- * Allows setting the active without any other effects.
232
- * @param index Index of the item to be set as active.
233
- */
234
- updateActiveItem(index: number): void;
235
- /**
236
- * Allows setting the active item without any other effects.
237
- * @param item Item to be set as active.
238
- */
239
- updateActiveItem(item: T): void;
240
- /** Cleans up the key manager. */
241
- destroy(): void;
242
- /**
243
- * This method sets the active item, given a list of items and the delta between the
244
- * currently active item and the new active item. It will calculate differently
245
- * depending on whether wrap mode is turned on.
246
- */
247
- private _setActiveItemByDelta;
248
- /**
249
- * Sets the active item properly given "wrap" mode. In other words, it will continue to move
250
- * down the list until it finds an item that is not disabled, and it will wrap if it
251
- * encounters either end of the list.
252
- */
253
- private _setActiveInWrapMode;
254
- /**
255
- * Sets the active item properly given the default mode. In other words, it will
256
- * continue to move down the list until it finds an item that is not disabled. If
257
- * it encounters either end of the list, it will stop and not wrap.
258
- */
259
- private _setActiveInDefaultMode;
260
- /**
261
- * Sets the active item to the first enabled item starting at the index specified. If the
262
- * item is disabled, it will move in the fallbackDelta direction until it either
263
- * finds an enabled item or encounters the end of the list.
264
- */
265
- private _setActiveItemByIndex;
266
- /** Returns the items as an array. */
267
- private _getItemsArray;
268
- /** Callback for when the items have changed. */
269
- private _itemsChanged;
270
- }
271
-
272
- /**
273
- * This is the interface for highlightable items (used by the ActiveDescendantKeyManager).
274
- * Each item must know how to style itself as active or inactive and whether or not it is
275
- * currently disabled.
276
- */
277
- interface Highlightable extends ListKeyManagerOption {
278
- /** Applies the styles for an active item to this item. */
279
- setActiveStyles(): void;
280
- /** Applies the styles for an inactive item to this item. */
281
- setInactiveStyles(): void;
282
- }
283
- declare class ActiveDescendantKeyManager<T> extends ListKeyManager<Highlightable & T> {
284
- /**
285
- * Sets the active item to the item at the specified index and adds the
286
- * active styles to the newly active item. Also removes active styles
287
- * from the previously active item.
288
- * @param index Index of the item to be set as active.
289
- */
290
- setActiveItem(index: number): void;
291
- /**
292
- * Sets the active item to the item to the specified one and adds the
293
- * active styles to the it. Also removes active styles from the
294
- * previously active item.
295
- * @param item Item to be set as active.
296
- */
297
- setActiveItem(item: T): void;
298
- }
299
-
300
- type FocusOrigin = 'touch' | 'mouse' | 'keyboard' | 'program' | null;
301
- /**
302
- * Corresponds to the options that can be passed to the native `focus` event.
303
- * via https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus
304
- */
305
- interface FocusOptions$1 {
306
- /** Whether the browser should scroll to the element when it is focused. */
307
- preventScroll?: boolean;
308
- }
309
- /** Detection mode used for attributing the origin of a focus event. */
310
- declare enum FocusMonitorDetectionMode {
311
- /**
312
- * Any mousedown, keydown, or touchstart event that happened in the previous
313
- * tick or the current tick will be used to assign a focus event's origin (to
314
- * either mouse, keyboard, or touch). This is the default option.
315
- */
316
- IMMEDIATE = 0,
317
- /**
318
- * A focus event's origin is always attributed to the last corresponding
319
- * mousedown, keydown, or touchstart event, no matter how long ago it occurred.
320
- */
321
- EVENTUAL = 1
322
- }
323
- /** Injectable service-level options for FocusMonitor. */
324
- interface FocusMonitorOptions {
325
- detectionMode?: FocusMonitorDetectionMode;
326
- }
327
- /** InjectionToken for FocusMonitorOptions. */
328
- declare const FOCUS_MONITOR_DEFAULT_OPTIONS: InjectionToken<FocusMonitorOptions>;
329
- /** Monitors mouse and keyboard events to determine the cause of focus events. */
330
- declare class FocusMonitor implements OnDestroy {
331
- private _ngZone;
332
- private _platform;
333
- private readonly _inputModalityDetector;
334
- /** The focus origin that the next focus event is a result of. */
335
- private _origin;
336
- /** The FocusOrigin of the last focus event tracked by the FocusMonitor. */
337
- private _lastFocusOrigin;
338
- /** Whether the window has just been focused. */
339
- private _windowFocused;
340
- /** The timeout id of the window focus timeout. */
341
- private _windowFocusTimeoutId;
342
- /** The timeout id of the origin clearing timeout. */
343
- private _originTimeoutId;
344
- /**
345
- * Whether the origin was determined via a touch interaction. Necessary as properly attributing
346
- * focus events to touch interactions requires special logic.
347
- */
348
- private _originFromTouchInteraction;
349
- /** Map of elements being monitored to their info. */
350
- private _elementInfo;
351
- /** The number of elements currently being monitored. */
352
- private _monitoredElementCount;
353
- /**
354
- * Keeps track of the root nodes to which we've currently bound a focus/blur handler,
355
- * as well as the number of monitored elements that they contain. We have to treat focus/blur
356
- * handlers differently from the rest of the events, because the browser won't emit events
357
- * to the document when focus moves inside of a shadow root.
358
- */
359
- private _rootNodeFocusListenerCount;
360
- /**
361
- * The specified detection mode, used for attributing the origin of a focus
362
- * event.
363
- */
364
- private readonly _detectionMode;
365
- /**
366
- * Event listener for `focus` events on the window.
367
- * Needs to be an arrow function in order to preserve the context when it gets bound.
368
- */
369
- private _windowFocusListener;
370
- /** Used to reference correct document/window */
371
- protected _document?: Document | null | undefined;
372
- /** Subject for stopping our InputModalityDetector subscription. */
373
- private readonly _stopInputModalityDetector;
374
- constructor(...args: unknown[]);
375
- /**
376
- * Event listener for `focus` and 'blur' events on the document.
377
- * Needs to be an arrow function in order to preserve the context when it gets bound.
378
- */
379
- private _rootNodeFocusAndBlurListener;
380
- /**
381
- * Monitors focus on an element and applies appropriate CSS classes.
382
- * @param element The element to monitor
383
- * @param checkChildren Whether to count the element as focused when its children are focused.
384
- * @returns An observable that emits when the focus state of the element changes.
385
- * When the element is blurred, null will be emitted.
386
- */
387
- monitor(element: HTMLElement, checkChildren?: boolean): Observable<FocusOrigin>;
388
- /**
389
- * Monitors focus on an element and applies appropriate CSS classes.
390
- * @param element The element to monitor
391
- * @param checkChildren Whether to count the element as focused when its children are focused.
392
- * @returns An observable that emits when the focus state of the element changes.
393
- * When the element is blurred, null will be emitted.
394
- */
395
- monitor(element: ElementRef<HTMLElement>, checkChildren?: boolean): Observable<FocusOrigin>;
396
- /**
397
- * Stops monitoring an element and removes all focus classes.
398
- * @param element The element to stop monitoring.
399
- */
400
- stopMonitoring(element: HTMLElement): void;
401
- /**
402
- * Stops monitoring an element and removes all focus classes.
403
- * @param element The element to stop monitoring.
404
- */
405
- stopMonitoring(element: ElementRef<HTMLElement>): void;
406
- /**
407
- * Focuses the element via the specified focus origin.
408
- * @param element Element to focus.
409
- * @param origin Focus origin.
410
- * @param options Options that can be used to configure the focus behavior.
411
- */
412
- focusVia(element: HTMLElement, origin: FocusOrigin, options?: FocusOptions$1): void;
413
- /**
414
- * Focuses the element via the specified focus origin.
415
- * @param element Element to focus.
416
- * @param origin Focus origin.
417
- * @param options Options that can be used to configure the focus behavior.
418
- */
419
- focusVia(element: ElementRef<HTMLElement>, origin: FocusOrigin, options?: FocusOptions$1): void;
420
- ngOnDestroy(): void;
421
- /** Access injected document if available or fallback to global document reference */
422
- private _getDocument;
423
- /** Use defaultView of injected document if available or fallback to global window reference */
424
- private _getWindow;
425
- private _getFocusOrigin;
426
- /**
427
- * Returns whether the focus event should be attributed to touch. Recall that in IMMEDIATE mode, a
428
- * touch origin isn't immediately reset at the next tick (see _setOrigin). This means that when we
429
- * handle a focus event following a touch interaction, we need to determine whether (1) the focus
430
- * event was directly caused by the touch interaction or (2) the focus event was caused by a
431
- * subsequent programmatic focus call triggered by the touch interaction.
432
- * @param focusEventTarget The target of the focus event under examination.
433
- */
434
- private _shouldBeAttributedToTouch;
435
- /**
436
- * Sets the focus classes on the element based on the given focus origin.
437
- * @param element The element to update the classes on.
438
- * @param origin The focus origin.
439
- */
440
- private _setClasses;
441
- /**
442
- * Updates the focus origin. If we're using immediate detection mode, we schedule an async
443
- * function to clear the origin at the end of a timeout. The duration of the timeout depends on
444
- * the origin being set.
445
- * @param origin The origin to set.
446
- * @param isFromInteraction Whether we are setting the origin from an interaction event.
447
- */
448
- private _setOrigin;
449
- /**
450
- * Handles focus events on a registered element.
451
- * @param event The focus event.
452
- * @param element The monitored element.
453
- */
454
- private _onFocus;
455
- /**
456
- * Handles blur events on a registered element.
457
- * @param event The blur event.
458
- * @param element The monitored element.
459
- */
460
- _onBlur(event: FocusEvent, element: HTMLElement): void;
461
- private _emitOrigin;
462
- private _registerGlobalListeners;
463
- private _removeGlobalListeners;
464
- /** Updates all the state on an element once its focus origin has changed. */
465
- private _originChanged;
466
- /**
467
- * Collects the `MonitoredElementInfo` of a particular element and
468
- * all of its ancestors that have enabled `checkChildren`.
469
- * @param element Element from which to start the search.
470
- */
471
- private _getClosestElementsInfo;
472
- /**
473
- * Returns whether an interaction is likely to have come from the user clicking the `label` of
474
- * an `input` or `textarea` in order to focus it.
475
- * @param focusEventTarget Target currently receiving focus.
476
- */
477
- private _isLastInteractionFromInputLabel;
478
- static ɵfac: i0.ɵɵFactoryDeclaration<FocusMonitor, never>;
479
- static ɵprov: i0.ɵɵInjectableDeclaration<FocusMonitor>;
480
- }
481
- /**
482
- * Directive that determines how a particular element was focused (via keyboard, mouse, touch, or
483
- * programmatically) and adds corresponding classes to the element.
484
- *
485
- * There are two variants of this directive:
486
- * 1) cdkMonitorElementFocus: does not consider an element to be focused if one of its children is
487
- * focused.
488
- * 2) cdkMonitorSubtreeFocus: considers an element focused if it or any of its children are focused.
489
- */
490
- declare class CdkMonitorFocus implements AfterViewInit, OnDestroy {
491
- private _elementRef;
492
- private _focusMonitor;
493
- private _monitorSubscription;
494
- private _focusOrigin;
495
- readonly cdkFocusChange: EventEmitter<FocusOrigin>;
496
- constructor(...args: unknown[]);
497
- get focusOrigin(): FocusOrigin;
498
- ngAfterViewInit(): void;
499
- ngOnDestroy(): void;
500
- static ɵfac: i0.ɵɵFactoryDeclaration<CdkMonitorFocus, never>;
501
- static ɵdir: i0.ɵɵDirectiveDeclaration<CdkMonitorFocus, "[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]", ["cdkMonitorFocus"], {}, { "cdkFocusChange": "cdkFocusChange"; }, never, never, true, never>;
502
- }
503
-
504
- /**
505
- * This is the interface for focusable items (used by the FocusKeyManager).
506
- * Each item must know how to focus itself, whether or not it is currently disabled
507
- * and be able to supply its label.
508
- */
509
- interface FocusableOption extends ListKeyManagerOption {
510
- /** Focuses the `FocusableOption`. */
511
- focus(origin?: FocusOrigin): void;
512
- }
513
- declare class FocusKeyManager<T> extends ListKeyManager<FocusableOption & T> {
514
- private _origin;
515
- /**
516
- * Sets the focus origin that will be passed in to the items for any subsequent `focus` calls.
517
- * @param origin Focus origin to be used when focusing items.
518
- */
519
- setFocusOrigin(origin: FocusOrigin): this;
520
- /**
521
- * Sets the active item to the item at the specified
522
- * index and focuses the newly active item.
523
- * @param index Index of the item to be set as active.
524
- */
525
- setActiveItem(index: number): void;
526
- /**
527
- * Sets the active item to the item that is specified and focuses it.
528
- * @param item Item to be set as active.
529
- */
530
- setActiveItem(item: T): void;
531
- }
532
-
533
- /** Represents an item within a tree that can be passed to a TreeKeyManager. */
534
- interface TreeKeyManagerItem {
535
- /** Whether the item is disabled. */
536
- isDisabled?: (() => boolean) | boolean;
537
- /** The user-facing label for this item. */
538
- getLabel?(): string;
539
- /** Perform the main action (i.e. selection) for this item. */
540
- activate(): void;
541
- /** Retrieves the parent for this item. This is `null` if there is no parent. */
542
- getParent(): TreeKeyManagerItem | null;
543
- /** Retrieves the children for this item. */
544
- getChildren(): TreeKeyManagerItem[] | Observable<TreeKeyManagerItem[]>;
545
- /** Determines if the item is currently expanded. */
546
- isExpanded: (() => boolean) | boolean;
547
- /** Collapses the item, hiding its children. */
548
- collapse(): void;
549
- /** Expands the item, showing its children. */
550
- expand(): void;
551
- /**
552
- * Focuses the item. This should provide some indication to the user that this item is focused.
553
- */
554
- focus(): void;
555
- /**
556
- * Unfocus the item. This should remove the focus state.
557
- */
558
- unfocus(): void;
559
- /**
560
- * Sets the item to be focusable without actually focusing it.
561
- */
562
- makeFocusable?(): void;
563
- }
564
- /**
565
- * Configuration for the TreeKeyManager.
566
- */
567
- interface TreeKeyManagerOptions<T extends TreeKeyManagerItem> {
568
- /**
569
- * If true, then the key manager will call `activate` in addition to calling `focus` when a
570
- * particular item is focused.
571
- */
572
- shouldActivationFollowFocus?: boolean;
573
- /**
574
- * The direction in which the tree items are laid out horizontally. This influences which key
575
- * will be interpreted as expand or collapse.
576
- */
577
- horizontalOrientation?: 'rtl' | 'ltr';
578
- /**
579
- * If provided, navigation "skips" over items that pass the given predicate.
580
- *
581
- * If the item is to be skipped, predicate function should return false.
582
- */
583
- skipPredicate?: (item: T) => boolean;
584
- /**
585
- * If provided, determines how the key manager determines if two items are equivalent.
586
- *
587
- * It should provide a unique key for each unique tree item. If two tree items are equivalent,
588
- * then this function should return the same value.
589
- */
590
- trackBy?: (treeItem: T) => unknown;
591
- /**
592
- * If a value is provided, enables typeahead mode, which allows users to set the active item
593
- * by typing the visible label of the item.
594
- *
595
- * If a number is provided, this will be the time to wait after the last keystroke before
596
- * setting the active item. If `true` is provided, the default interval of 200ms will be used.
597
- */
598
- typeAheadDebounceInterval?: true | number;
599
- }
600
- interface TreeKeyManagerStrategy<T extends TreeKeyManagerItem> {
601
- /** Stream that emits any time the focused item changes. */
602
- readonly change: Subject<T | null>;
603
- /**
604
- * Cleans up the key manager.
605
- */
606
- destroy(): void;
607
- /**
608
- * Handles a keyboard event on the tree.
609
- *
610
- * @param event Keyboard event that represents the user interaction with the tree.
611
- */
612
- onKeydown(event: KeyboardEvent): void;
613
- /** Index of the currently active item. */
614
- getActiveItemIndex(): number | null;
615
- /** The currently active item. */
616
- getActiveItem(): T | null;
617
- /**
618
- * Focus the provided item by index.
619
- *
620
- * Updates the state of the currently active item. Emits to `change` stream if active item
621
- * Changes.
622
- * @param index The index of the item to focus.
623
- * @param options Additional focusing options.
624
- */
625
- focusItem(index: number, options?: {
626
- emitChangeEvent?: boolean;
627
- }): void;
628
- /**
629
- * Focus the provided item.
630
- *
631
- * Updates the state of the currently active item. Emits to `change` stream if active item
632
- * Changes.
633
- * @param item The item to focus. Equality is determined via the trackBy function.
634
- * @param options Additional focusing options.
635
- */
636
- focusItem(item: T, options?: {
637
- emitChangeEvent?: boolean;
638
- }): void;
639
- focusItem(itemOrIndex: number | T, options?: {
640
- emitChangeEvent?: boolean;
641
- }): void;
642
- }
643
- type TreeKeyManagerFactory<T extends TreeKeyManagerItem> = (items: Observable<T[]> | QueryList<T> | T[], options: TreeKeyManagerOptions<T>) => TreeKeyManagerStrategy<T>;
644
-
645
121
  /**
646
122
  * @docs-private
647
123
  *
@@ -813,58 +289,6 @@ declare const TREE_KEY_MANAGER_FACTORY_PROVIDER: {
813
289
  useFactory: typeof TREE_KEY_MANAGER_FACTORY;
814
290
  };
815
291
 
816
- /**
817
- * Configuration for the isFocusable method.
818
- */
819
- declare class IsFocusableConfig {
820
- /**
821
- * Whether to count an element as focusable even if it is not currently visible.
822
- */
823
- ignoreVisibility: boolean;
824
- }
825
- /**
826
- * Utility for checking the interactivity of an element, such as whether it is focusable or
827
- * tabbable.
828
- */
829
- declare class InteractivityChecker {
830
- private _platform;
831
- constructor(...args: unknown[]);
832
- /**
833
- * Gets whether an element is disabled.
834
- *
835
- * @param element Element to be checked.
836
- * @returns Whether the element is disabled.
837
- */
838
- isDisabled(element: HTMLElement): boolean;
839
- /**
840
- * Gets whether an element is visible for the purposes of interactivity.
841
- *
842
- * This will capture states like `display: none` and `visibility: hidden`, but not things like
843
- * being clipped by an `overflow: hidden` parent or being outside the viewport.
844
- *
845
- * @returns Whether the element is visible.
846
- */
847
- isVisible(element: HTMLElement): boolean;
848
- /**
849
- * Gets whether an element can be reached via Tab key.
850
- * Assumes that the element has already been checked with isFocusable.
851
- *
852
- * @param element Element to be checked.
853
- * @returns Whether the element is tabbable.
854
- */
855
- isTabbable(element: HTMLElement): boolean;
856
- /**
857
- * Gets whether an element can be focused by the user.
858
- *
859
- * @param element Element to be checked.
860
- * @param config The config object with options to customize this method's behavior
861
- * @returns Whether the element is focusable.
862
- */
863
- isFocusable(element: HTMLElement, config?: IsFocusableConfig): boolean;
864
- static ɵfac: i0.ɵɵFactoryDeclaration<InteractivityChecker, never>;
865
- static ɵprov: i0.ɵɵInjectableDeclaration<InteractivityChecker>;
866
- }
867
-
868
292
  /**
869
293
  * Options for creating a ConfigurableFocusTrap.
870
294
  */
@@ -875,154 +299,6 @@ interface ConfigurableFocusTrapConfig {
875
299
  defer: boolean;
876
300
  }
877
301
 
878
- /**
879
- * Class that allows for trapping focus within a DOM element.
880
- *
881
- * This class currently uses a relatively simple approach to focus trapping.
882
- * It assumes that the tab order is the same as DOM order, which is not necessarily true.
883
- * Things like `tabIndex > 0`, flex `order`, and shadow roots can cause the two to be misaligned.
884
- */
885
- declare class FocusTrap {
886
- readonly _element: HTMLElement;
887
- private _checker;
888
- readonly _ngZone: NgZone;
889
- readonly _document: Document;
890
- /** @breaking-change 20.0.0 param to become required */
891
- readonly _injector?: Injector | undefined;
892
- private _startAnchor;
893
- private _endAnchor;
894
- private _hasAttached;
895
- protected startAnchorListener: () => boolean;
896
- protected endAnchorListener: () => boolean;
897
- /** Whether the focus trap is active. */
898
- get enabled(): boolean;
899
- set enabled(value: boolean);
900
- protected _enabled: boolean;
901
- constructor(_element: HTMLElement, _checker: InteractivityChecker, _ngZone: NgZone, _document: Document, deferAnchors?: boolean,
902
- /** @breaking-change 20.0.0 param to become required */
903
- _injector?: Injector | undefined);
904
- /** Destroys the focus trap by cleaning up the anchors. */
905
- destroy(): void;
906
- /**
907
- * Inserts the anchors into the DOM. This is usually done automatically
908
- * in the constructor, but can be deferred for cases like directives with `*ngIf`.
909
- * @returns Whether the focus trap managed to attach successfully. This may not be the case
910
- * if the target element isn't currently in the DOM.
911
- */
912
- attachAnchors(): boolean;
913
- /**
914
- * Waits for the zone to stabilize, then focuses the first tabbable element.
915
- * @returns Returns a promise that resolves with a boolean, depending
916
- * on whether focus was moved successfully.
917
- */
918
- focusInitialElementWhenReady(options?: FocusOptions): Promise<boolean>;
919
- /**
920
- * Waits for the zone to stabilize, then focuses
921
- * the first tabbable element within the focus trap region.
922
- * @returns Returns a promise that resolves with a boolean, depending
923
- * on whether focus was moved successfully.
924
- */
925
- focusFirstTabbableElementWhenReady(options?: FocusOptions): Promise<boolean>;
926
- /**
927
- * Waits for the zone to stabilize, then focuses
928
- * the last tabbable element within the focus trap region.
929
- * @returns Returns a promise that resolves with a boolean, depending
930
- * on whether focus was moved successfully.
931
- */
932
- focusLastTabbableElementWhenReady(options?: FocusOptions): Promise<boolean>;
933
- /**
934
- * Get the specified boundary element of the trapped region.
935
- * @param bound The boundary to get (start or end of trapped region).
936
- * @returns The boundary element.
937
- */
938
- private _getRegionBoundary;
939
- /**
940
- * Focuses the element that should be focused when the focus trap is initialized.
941
- * @returns Whether focus was moved successfully.
942
- */
943
- focusInitialElement(options?: FocusOptions): boolean;
944
- /**
945
- * Focuses the first tabbable element within the focus trap region.
946
- * @returns Whether focus was moved successfully.
947
- */
948
- focusFirstTabbableElement(options?: FocusOptions): boolean;
949
- /**
950
- * Focuses the last tabbable element within the focus trap region.
951
- * @returns Whether focus was moved successfully.
952
- */
953
- focusLastTabbableElement(options?: FocusOptions): boolean;
954
- /**
955
- * Checks whether the focus trap has successfully been attached.
956
- */
957
- hasAttached(): boolean;
958
- /** Get the first tabbable element from a DOM subtree (inclusive). */
959
- private _getFirstTabbableElement;
960
- /** Get the last tabbable element from a DOM subtree (inclusive). */
961
- private _getLastTabbableElement;
962
- /** Creates an anchor element. */
963
- private _createAnchor;
964
- /**
965
- * Toggles the `tabindex` of an anchor, based on the enabled state of the focus trap.
966
- * @param isEnabled Whether the focus trap is enabled.
967
- * @param anchor Anchor on which to toggle the tabindex.
968
- */
969
- private _toggleAnchorTabIndex;
970
- /**
971
- * Toggles the`tabindex` of both anchors to either trap Tab focus or allow it to escape.
972
- * @param enabled: Whether the anchors should trap Tab.
973
- */
974
- protected toggleAnchors(enabled: boolean): void;
975
- /** Executes a function when the zone is stable. */
976
- private _executeOnStable;
977
- }
978
- /**
979
- * Factory that allows easy instantiation of focus traps.
980
- */
981
- declare class FocusTrapFactory {
982
- private _checker;
983
- private _ngZone;
984
- private _document;
985
- private _injector;
986
- constructor(...args: unknown[]);
987
- /**
988
- * Creates a focus-trapped region around the given element.
989
- * @param element The element around which focus will be trapped.
990
- * @param deferCaptureElements Defers the creation of focus-capturing elements to be done
991
- * manually by the user.
992
- * @returns The created focus trap instance.
993
- */
994
- create(element: HTMLElement, deferCaptureElements?: boolean): FocusTrap;
995
- static ɵfac: i0.ɵɵFactoryDeclaration<FocusTrapFactory, never>;
996
- static ɵprov: i0.ɵɵInjectableDeclaration<FocusTrapFactory>;
997
- }
998
- /** Directive for trapping focus within a region. */
999
- declare class CdkTrapFocus implements OnDestroy, AfterContentInit, OnChanges, DoCheck {
1000
- private _elementRef;
1001
- private _focusTrapFactory;
1002
- /** Underlying FocusTrap instance. */
1003
- focusTrap: FocusTrap;
1004
- /** Previously focused element to restore focus to upon destroy when using autoCapture. */
1005
- private _previouslyFocusedElement;
1006
- /** Whether the focus trap is active. */
1007
- get enabled(): boolean;
1008
- set enabled(value: boolean);
1009
- /**
1010
- * Whether the directive should automatically move focus into the trapped region upon
1011
- * initialization and return focus to the previous activeElement upon destruction.
1012
- */
1013
- autoCapture: boolean;
1014
- constructor(...args: unknown[]);
1015
- ngOnDestroy(): void;
1016
- ngAfterContentInit(): void;
1017
- ngDoCheck(): void;
1018
- ngOnChanges(changes: SimpleChanges): void;
1019
- private _captureFocus;
1020
- static ɵfac: i0.ɵɵFactoryDeclaration<CdkTrapFocus, never>;
1021
- static ɵdir: i0.ɵɵDirectiveDeclaration<CdkTrapFocus, "[cdkTrapFocus]", ["cdkTrapFocus"], { "enabled": { "alias": "cdkTrapFocus"; "required": false; }; "autoCapture": { "alias": "cdkTrapFocusAutoCapture"; "required": false; }; }, {}, never, never, true, never>;
1022
- static ngAcceptInputType_enabled: unknown;
1023
- static ngAcceptInputType_autoCapture: unknown;
1024
- }
1025
-
1026
302
  /** The injection token used to specify the inert strategy. */
1027
303
  declare const FOCUS_TRAP_INERT_STRATEGY: InjectionToken<FocusTrapInertStrategy>;
1028
304
  /**
@@ -1218,118 +494,11 @@ declare class InputModalityDetector implements OnDestroy {
1218
494
  static ɵprov: i0.ɵɵInjectableDeclaration<InputModalityDetector>;
1219
495
  }
1220
496
 
1221
- /** Possible politeness levels. */
1222
- type AriaLivePoliteness = 'off' | 'polite' | 'assertive';
1223
- declare const LIVE_ANNOUNCER_ELEMENT_TOKEN: InjectionToken<HTMLElement | null>;
1224
- /**
1225
- * @docs-private
1226
- * @deprecated No longer used, will be removed.
1227
- * @breaking-change 21.0.0
1228
- */
1229
- declare function LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY(): null;
1230
- /** Object that can be used to configure the default options for the LiveAnnouncer. */
1231
- interface LiveAnnouncerDefaultOptions {
1232
- /** Default politeness for the announcements. */
1233
- politeness?: AriaLivePoliteness;
1234
- /** Default duration for the announcement messages. */
1235
- duration?: number;
1236
- }
1237
- /** Injection token that can be used to configure the default options for the LiveAnnouncer. */
1238
- declare const LIVE_ANNOUNCER_DEFAULT_OPTIONS: InjectionToken<LiveAnnouncerDefaultOptions>;
1239
-
1240
- declare class LiveAnnouncer implements OnDestroy {
1241
- private _ngZone;
1242
- private _defaultOptions;
1243
- private _liveElement;
1244
- private _document;
1245
- private _previousTimeout;
1246
- private _currentPromise;
1247
- private _currentResolve;
1248
- constructor(...args: unknown[]);
1249
- /**
1250
- * Announces a message to screen readers.
1251
- * @param message Message to be announced to the screen reader.
1252
- * @returns Promise that will be resolved when the message is added to the DOM.
1253
- */
1254
- announce(message: string): Promise<void>;
1255
- /**
1256
- * Announces a message to screen readers.
1257
- * @param message Message to be announced to the screen reader.
1258
- * @param politeness The politeness of the announcer element.
1259
- * @returns Promise that will be resolved when the message is added to the DOM.
1260
- */
1261
- announce(message: string, politeness?: AriaLivePoliteness): Promise<void>;
1262
- /**
1263
- * Announces a message to screen readers.
1264
- * @param message Message to be announced to the screen reader.
1265
- * @param duration Time in milliseconds after which to clear out the announcer element. Note
1266
- * that this takes effect after the message has been added to the DOM, which can be up to
1267
- * 100ms after `announce` has been called.
1268
- * @returns Promise that will be resolved when the message is added to the DOM.
1269
- */
1270
- announce(message: string, duration?: number): Promise<void>;
1271
- /**
1272
- * Announces a message to screen readers.
1273
- * @param message Message to be announced to the screen reader.
1274
- * @param politeness The politeness of the announcer element.
1275
- * @param duration Time in milliseconds after which to clear out the announcer element. Note
1276
- * that this takes effect after the message has been added to the DOM, which can be up to
1277
- * 100ms after `announce` has been called.
1278
- * @returns Promise that will be resolved when the message is added to the DOM.
1279
- */
1280
- announce(message: string, politeness?: AriaLivePoliteness, duration?: number): Promise<void>;
1281
- /**
1282
- * Clears the current text from the announcer element. Can be used to prevent
1283
- * screen readers from reading the text out again while the user is going
1284
- * through the page landmarks.
1285
- */
1286
- clear(): void;
1287
- ngOnDestroy(): void;
1288
- private _createLiveElement;
1289
- /**
1290
- * Some browsers won't expose the accessibility node of the live announcer element if there is an
1291
- * `aria-modal` and the live announcer is outside of it. This method works around the issue by
1292
- * pointing the `aria-owns` of all modals to the live announcer element.
1293
- */
1294
- private _exposeAnnouncerToModals;
1295
- static ɵfac: i0.ɵɵFactoryDeclaration<LiveAnnouncer, never>;
1296
- static ɵprov: i0.ɵɵInjectableDeclaration<LiveAnnouncer>;
1297
- }
1298
- /**
1299
- * A directive that works similarly to aria-live, but uses the LiveAnnouncer to ensure compatibility
1300
- * with a wider range of browsers and screen readers.
1301
- */
1302
- declare class CdkAriaLive implements OnDestroy {
1303
- private _elementRef;
1304
- private _liveAnnouncer;
1305
- private _contentObserver;
1306
- private _ngZone;
1307
- /** The aria-live politeness level to use when announcing messages. */
1308
- get politeness(): AriaLivePoliteness;
1309
- set politeness(value: AriaLivePoliteness);
1310
- private _politeness;
1311
- /** Time in milliseconds after which to clear out the announcer element. */
1312
- duration: number;
1313
- private _previousAnnouncedText?;
1314
- private _subscription;
1315
- constructor(...args: unknown[]);
1316
- ngOnDestroy(): void;
1317
- static ɵfac: i0.ɵɵFactoryDeclaration<CdkAriaLive, never>;
1318
- static ɵdir: i0.ɵɵDirectiveDeclaration<CdkAriaLive, "[cdkAriaLive]", ["cdkAriaLive"], { "politeness": { "alias": "cdkAriaLive"; "required": false; }; "duration": { "alias": "cdkAriaLiveDuration"; "required": false; }; }, {}, never, never, true, never>;
1319
- }
1320
-
1321
497
  /** Gets whether an event could be a faked `mousedown` event dispatched by a screen reader. */
1322
498
  declare function isFakeMousedownFromScreenReader(event: MouseEvent): boolean;
1323
499
  /** Gets whether an event could be a faked `touchstart` event dispatched by a screen reader. */
1324
500
  declare function isFakeTouchstartFromScreenReader(event: TouchEvent): boolean;
1325
501
 
1326
- declare class A11yModule {
1327
- constructor();
1328
- static ɵfac: i0.ɵɵFactoryDeclaration<A11yModule, never>;
1329
- static ɵmod: i0.ɵɵNgModuleDeclaration<A11yModule, never, [typeof i1.ObserversModule, typeof CdkAriaLive, typeof CdkTrapFocus, typeof CdkMonitorFocus], [typeof CdkAriaLive, typeof CdkTrapFocus, typeof CdkMonitorFocus]>;
1330
- static ɵinj: i0.ɵɵInjectorDeclaration<A11yModule>;
1331
- }
1332
-
1333
502
  /** Set of possible high-contrast mode backgrounds. */
1334
503
  declare enum HighContrastMode {
1335
504
  NONE = 0,
@@ -1378,4 +547,4 @@ declare class _IdGenerator {
1378
547
  static ɵprov: i0.ɵɵInjectableDeclaration<_IdGenerator>;
1379
548
  }
1380
549
 
1381
- export { A11yModule, ActiveDescendantKeyManager, AriaDescriber, type AriaLivePoliteness, CDK_DESCRIBEDBY_HOST_ATTRIBUTE, CDK_DESCRIBEDBY_ID_PREFIX, CdkAriaLive, CdkMonitorFocus, CdkTrapFocus, ConfigurableFocusTrap, type ConfigurableFocusTrapConfig, ConfigurableFocusTrapFactory, EventListenerFocusTrapInertStrategy, FOCUS_MONITOR_DEFAULT_OPTIONS, FOCUS_TRAP_INERT_STRATEGY, FocusKeyManager, FocusMonitor, FocusMonitorDetectionMode, type FocusMonitorOptions, type FocusOptions$1 as FocusOptions, type FocusOrigin, FocusTrap, FocusTrapFactory, type FocusTrapInertStrategy, type FocusableOption, HighContrastMode, HighContrastModeDetector, type Highlightable, INPUT_MODALITY_DETECTOR_DEFAULT_OPTIONS, INPUT_MODALITY_DETECTOR_OPTIONS, type InputModality, InputModalityDetector, type InputModalityDetectorOptions, InteractivityChecker, IsFocusableConfig, LIVE_ANNOUNCER_DEFAULT_OPTIONS, LIVE_ANNOUNCER_ELEMENT_TOKEN, LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY, ListKeyManager, type ListKeyManagerModifierKey, type ListKeyManagerOption, LiveAnnouncer, type LiveAnnouncerDefaultOptions, MESSAGES_CONTAINER_ID, NOOP_TREE_KEY_MANAGER_FACTORY, NOOP_TREE_KEY_MANAGER_FACTORY_PROVIDER, NoopTreeKeyManager, type RegisteredMessage, TREE_KEY_MANAGER, TREE_KEY_MANAGER_FACTORY, TREE_KEY_MANAGER_FACTORY_PROVIDER, TreeKeyManager, type TreeKeyManagerFactory, type TreeKeyManagerItem, type TreeKeyManagerOptions, type TreeKeyManagerStrategy, _IdGenerator, addAriaReferencedId, getAriaReferenceIds, isFakeMousedownFromScreenReader, isFakeTouchstartFromScreenReader, removeAriaReferencedId };
550
+ export { AriaDescriber, CDK_DESCRIBEDBY_HOST_ATTRIBUTE, CDK_DESCRIBEDBY_ID_PREFIX, ConfigurableFocusTrap, type ConfigurableFocusTrapConfig, ConfigurableFocusTrapFactory, EventListenerFocusTrapInertStrategy, FOCUS_TRAP_INERT_STRATEGY, type FocusTrapInertStrategy, HighContrastMode, HighContrastModeDetector, INPUT_MODALITY_DETECTOR_DEFAULT_OPTIONS, INPUT_MODALITY_DETECTOR_OPTIONS, type InputModality, InputModalityDetector, type InputModalityDetectorOptions, MESSAGES_CONTAINER_ID, NOOP_TREE_KEY_MANAGER_FACTORY, NOOP_TREE_KEY_MANAGER_FACTORY_PROVIDER, NoopTreeKeyManager, type RegisteredMessage, TREE_KEY_MANAGER, TREE_KEY_MANAGER_FACTORY, TREE_KEY_MANAGER_FACTORY_PROVIDER, TreeKeyManager, _IdGenerator, addAriaReferencedId, getAriaReferenceIds, isFakeMousedownFromScreenReader, isFakeTouchstartFromScreenReader, removeAriaReferencedId };