@angular/material 20.0.0-next.0 → 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 (305) hide show
  1. package/autocomplete/index.d.ts +92 -126
  2. package/autocomplete/testing/index.d.ts +6 -11
  3. package/badge/index.d.ts +8 -112
  4. package/badge/testing/index.d.ts +7 -8
  5. package/badge.d-49a8a74b.d.ts +98 -0
  6. package/bottom-sheet/index.d.ts +88 -103
  7. package/bottom-sheet/testing/index.d.ts +4 -6
  8. package/button/index.d.ts +10 -245
  9. package/button/testing/index.d.ts +6 -10
  10. package/button-toggle/index.d.ts +12 -285
  11. package/button-toggle/testing/index.d.ts +38 -37
  12. package/button-toggle.d-edc8acff.d.ts +257 -0
  13. package/card/index.d.ts +80 -117
  14. package/card/testing/index.d.ts +11 -15
  15. package/checkbox/index.d.ts +43 -104
  16. package/checkbox/testing/index.d.ts +6 -10
  17. package/chips/index.d.ts +599 -693
  18. package/chips/testing/index.d.ts +78 -93
  19. package/common-module.d-0e6515ae.d.ts +43 -0
  20. package/core/index.d.ts +50 -979
  21. package/core/testing/index.d.ts +3 -65
  22. package/date-adapter.d-c6835d41.d.ts +267 -0
  23. package/date-range-input-harness.d-549a9f7e.d.ts +278 -0
  24. package/datepicker/index.d.ts +1332 -1482
  25. package/datepicker/testing/index.d.ts +5 -287
  26. package/dialog/index.d.ts +59 -453
  27. package/dialog/testing/index.d.ts +22 -26
  28. package/dialog.d-57867441.d.ts +335 -0
  29. package/divider/index.d.ts +6 -11
  30. package/divider/testing/index.d.ts +2 -16
  31. package/divider-harness.d-d34fede4.d.ts +14 -0
  32. package/error-options.d-448d9046.d.ts +17 -0
  33. package/expansion/index.d.ts +139 -190
  34. package/expansion/testing/index.d.ts +25 -31
  35. package/fesm2022/autocomplete/testing.mjs +2 -1
  36. package/fesm2022/autocomplete/testing.mjs.map +1 -1
  37. package/fesm2022/autocomplete.mjs +53 -32
  38. package/fesm2022/autocomplete.mjs.map +1 -1
  39. package/fesm2022/badge/testing.mjs.map +1 -1
  40. package/fesm2022/badge.mjs +14 -17
  41. package/fesm2022/badge.mjs.map +1 -1
  42. package/fesm2022/bottom-sheet/testing.mjs.map +1 -1
  43. package/fesm2022/bottom-sheet.mjs +13 -15
  44. package/fesm2022/bottom-sheet.mjs.map +1 -1
  45. package/fesm2022/button/testing.mjs.map +1 -1
  46. package/fesm2022/button-toggle/testing.mjs.map +1 -1
  47. package/fesm2022/button-toggle.mjs +22 -15
  48. package/fesm2022/button-toggle.mjs.map +1 -1
  49. package/fesm2022/button.mjs +14 -395
  50. package/fesm2022/button.mjs.map +1 -1
  51. package/fesm2022/card/testing.mjs.map +1 -1
  52. package/fesm2022/card.mjs +49 -51
  53. package/fesm2022/card.mjs.map +1 -1
  54. package/fesm2022/checkbox/testing.mjs.map +1 -1
  55. package/fesm2022/checkbox.mjs +32 -73
  56. package/fesm2022/checkbox.mjs.map +1 -1
  57. package/fesm2022/chips/testing.mjs.map +1 -1
  58. package/fesm2022/chips.mjs +51 -46
  59. package/fesm2022/chips.mjs.map +1 -1
  60. package/fesm2022/common-module-2d64df09.mjs +42 -0
  61. package/fesm2022/common-module-2d64df09.mjs.map +1 -0
  62. package/fesm2022/core/testing.mjs +3 -76
  63. package/fesm2022/core/testing.mjs.map +1 -1
  64. package/fesm2022/core.mjs +38 -1598
  65. package/fesm2022/core.mjs.map +1 -1
  66. package/fesm2022/date-formats-b618acb8.mjs +190 -0
  67. package/fesm2022/date-formats-b618acb8.mjs.map +1 -0
  68. package/fesm2022/date-range-input-harness-ee47cdb0.mjs +467 -0
  69. package/fesm2022/date-range-input-harness-ee47cdb0.mjs.map +1 -0
  70. package/fesm2022/datepicker/testing.mjs +5 -465
  71. package/fesm2022/datepicker/testing.mjs.map +1 -1
  72. package/fesm2022/datepicker.mjs +159 -128
  73. package/fesm2022/datepicker.mjs.map +1 -1
  74. package/fesm2022/dialog/testing.mjs +12 -1
  75. package/fesm2022/dialog/testing.mjs.map +1 -1
  76. package/fesm2022/dialog.mjs +14 -895
  77. package/fesm2022/dialog.mjs.map +1 -1
  78. package/fesm2022/divider/testing.mjs +2 -17
  79. package/fesm2022/divider/testing.mjs.map +1 -1
  80. package/fesm2022/divider-harness-3394f29a.mjs +18 -0
  81. package/fesm2022/divider-harness-3394f29a.mjs.map +1 -0
  82. package/fesm2022/divider.mjs +10 -12
  83. package/fesm2022/divider.mjs.map +1 -1
  84. package/fesm2022/error-options-4a00765e.mjs +29 -0
  85. package/fesm2022/error-options-4a00765e.mjs.map +1 -0
  86. package/fesm2022/error-state-8f4ce1af.mjs +37 -0
  87. package/fesm2022/error-state-8f4ce1af.mjs.map +1 -0
  88. package/fesm2022/expansion/testing.mjs.map +1 -1
  89. package/fesm2022/expansion.mjs +30 -32
  90. package/fesm2022/expansion.mjs.map +1 -1
  91. package/fesm2022/form-field/testing/control.mjs +2 -10
  92. package/fesm2022/form-field/testing/control.mjs.map +1 -1
  93. package/fesm2022/form-field/testing.mjs +7 -6
  94. package/fesm2022/form-field/testing.mjs.map +1 -1
  95. package/fesm2022/form-field-6d755764.mjs +1076 -0
  96. package/fesm2022/form-field-6d755764.mjs.map +1 -0
  97. package/fesm2022/form-field-control-harness-af6fd278.mjs +11 -0
  98. package/fesm2022/form-field-control-harness-af6fd278.mjs.map +1 -0
  99. package/fesm2022/form-field.mjs +14 -1110
  100. package/fesm2022/form-field.mjs.map +1 -1
  101. package/fesm2022/grid-list/testing.mjs +1 -1
  102. package/fesm2022/grid-list/testing.mjs.map +1 -1
  103. package/fesm2022/grid-list.mjs +30 -173
  104. package/fesm2022/grid-list.mjs.map +1 -1
  105. package/fesm2022/icon/testing.mjs +12 -12
  106. package/fesm2022/icon/testing.mjs.map +1 -1
  107. package/fesm2022/icon-button-47f1b5d9.mjs +248 -0
  108. package/fesm2022/icon-button-47f1b5d9.mjs.map +1 -0
  109. package/fesm2022/icon-module-3f77a24d.mjs +395 -0
  110. package/fesm2022/icon-module-3f77a24d.mjs.map +1 -0
  111. package/fesm2022/icon-registry-13a3b98e.mjs +639 -0
  112. package/fesm2022/icon-registry-13a3b98e.mjs.map +1 -0
  113. package/fesm2022/icon.mjs +11 -1016
  114. package/fesm2022/icon.mjs.map +1 -1
  115. package/fesm2022/index-1763d3a6.mjs +22 -0
  116. package/fesm2022/index-1763d3a6.mjs.map +1 -0
  117. package/fesm2022/index-4bc1d6d3.mjs +20 -0
  118. package/fesm2022/index-4bc1d6d3.mjs.map +1 -0
  119. package/fesm2022/input/testing.mjs +5 -113
  120. package/fesm2022/input/testing.mjs.map +1 -1
  121. package/fesm2022/input-harness-ed59decc.mjs +115 -0
  122. package/fesm2022/input-harness-ed59decc.mjs.map +1 -0
  123. package/fesm2022/input-value-accessor-8a79a24e.mjs +12 -0
  124. package/fesm2022/input-value-accessor-8a79a24e.mjs.map +1 -0
  125. package/fesm2022/input.mjs +21 -23
  126. package/fesm2022/input.mjs.map +1 -1
  127. package/fesm2022/internal-form-field-434c4039.mjs +27 -0
  128. package/fesm2022/internal-form-field-434c4039.mjs.map +1 -0
  129. package/fesm2022/line-d6afe347.mjs +59 -0
  130. package/fesm2022/line-d6afe347.mjs.map +1 -0
  131. package/fesm2022/list/testing.mjs +2 -2
  132. package/fesm2022/list/testing.mjs.map +1 -1
  133. package/fesm2022/list.mjs +59 -56
  134. package/fesm2022/list.mjs.map +1 -1
  135. package/fesm2022/menu/testing.mjs.map +1 -1
  136. package/fesm2022/menu.mjs +37 -25
  137. package/fesm2022/menu.mjs.map +1 -1
  138. package/fesm2022/module-3bf2775f.mjs +1293 -0
  139. package/fesm2022/module-3bf2775f.mjs.map +1 -0
  140. package/fesm2022/module-47e3be58.mjs +970 -0
  141. package/fesm2022/module-47e3be58.mjs.map +1 -0
  142. package/fesm2022/module-a5f9ab72.mjs +875 -0
  143. package/fesm2022/module-a5f9ab72.mjs.map +1 -0
  144. package/fesm2022/module-d757bba0.mjs +38 -0
  145. package/fesm2022/module-d757bba0.mjs.map +1 -0
  146. package/fesm2022/module-df9f7af3.mjs +152 -0
  147. package/fesm2022/module-df9f7af3.mjs.map +1 -0
  148. package/fesm2022/optgroup-harness-5e66b138.mjs +36 -0
  149. package/fesm2022/optgroup-harness-5e66b138.mjs.map +1 -0
  150. package/fesm2022/option-07c3c660.mjs +348 -0
  151. package/fesm2022/option-07c3c660.mjs.map +1 -0
  152. package/fesm2022/option-harness-3b7c1106.mjs +46 -0
  153. package/fesm2022/option-harness-3b7c1106.mjs.map +1 -0
  154. package/fesm2022/paginator/testing.mjs +4 -1
  155. package/fesm2022/paginator/testing.mjs.map +1 -1
  156. package/fesm2022/paginator.mjs +51 -21
  157. package/fesm2022/paginator.mjs.map +1 -1
  158. package/fesm2022/progress-bar/testing.mjs +0 -4
  159. package/fesm2022/progress-bar/testing.mjs.map +1 -1
  160. package/fesm2022/progress-bar.mjs +15 -13
  161. package/fesm2022/progress-bar.mjs.map +1 -1
  162. package/fesm2022/progress-spinner/testing.mjs +0 -4
  163. package/fesm2022/progress-spinner/testing.mjs.map +1 -1
  164. package/fesm2022/progress-spinner.mjs +15 -13
  165. package/fesm2022/progress-spinner.mjs.map +1 -1
  166. package/fesm2022/pseudo-checkbox-af5a4ea4.mjs +52 -0
  167. package/fesm2022/pseudo-checkbox-af5a4ea4.mjs.map +1 -0
  168. package/fesm2022/pseudo-checkbox-module-216fae38.mjs +20 -0
  169. package/fesm2022/pseudo-checkbox-module-216fae38.mjs.map +1 -0
  170. package/fesm2022/public-api-c5ab57f5.mjs +147 -0
  171. package/fesm2022/public-api-c5ab57f5.mjs.map +1 -0
  172. package/fesm2022/radio/testing.mjs.map +1 -1
  173. package/fesm2022/radio.mjs +23 -15
  174. package/fesm2022/radio.mjs.map +1 -1
  175. package/fesm2022/ripple-9939d1f5.mjs +639 -0
  176. package/fesm2022/ripple-9939d1f5.mjs.map +1 -0
  177. package/fesm2022/ripple-loader-f2078c66.mjs +165 -0
  178. package/fesm2022/ripple-loader-f2078c66.mjs.map +1 -0
  179. package/fesm2022/select/testing.mjs +5 -121
  180. package/fesm2022/select/testing.mjs.map +1 -1
  181. package/fesm2022/select-harness-8c55824d.mjs +123 -0
  182. package/fesm2022/select-harness-8c55824d.mjs.map +1 -0
  183. package/fesm2022/select.mjs +30 -1311
  184. package/fesm2022/select.mjs.map +1 -1
  185. package/fesm2022/sidenav/testing.mjs +1 -1
  186. package/fesm2022/sidenav/testing.mjs.map +1 -1
  187. package/fesm2022/sidenav.mjs +31 -31
  188. package/fesm2022/sidenav.mjs.map +1 -1
  189. package/fesm2022/slide-toggle/testing.mjs.map +1 -1
  190. package/fesm2022/slide-toggle.mjs +27 -75
  191. package/fesm2022/slide-toggle.mjs.map +1 -1
  192. package/fesm2022/slider/testing.mjs.map +1 -1
  193. package/fesm2022/slider.mjs +22 -21
  194. package/fesm2022/slider.mjs.map +1 -1
  195. package/fesm2022/snack-bar/testing.mjs.map +1 -1
  196. package/fesm2022/snack-bar.mjs +37 -29
  197. package/fesm2022/snack-bar.mjs.map +1 -1
  198. package/fesm2022/sort/testing.mjs.map +1 -1
  199. package/fesm2022/sort.mjs +26 -20
  200. package/fesm2022/sort.mjs.map +1 -1
  201. package/fesm2022/stepper/testing.mjs.map +1 -1
  202. package/fesm2022/stepper.mjs +52 -39
  203. package/fesm2022/stepper.mjs.map +1 -1
  204. package/fesm2022/structural-styles-d5ada3b3.mjs +18 -0
  205. package/fesm2022/structural-styles-d5ada3b3.mjs.map +1 -0
  206. package/fesm2022/table/testing.mjs.map +1 -1
  207. package/fesm2022/table.mjs +58 -60
  208. package/fesm2022/table.mjs.map +1 -1
  209. package/fesm2022/tabs/testing.mjs.map +1 -1
  210. package/fesm2022/tabs.mjs +54 -58
  211. package/fesm2022/tabs.mjs.map +1 -1
  212. package/fesm2022/timepicker/testing.mjs +1 -1
  213. package/fesm2022/timepicker/testing.mjs.map +1 -1
  214. package/fesm2022/timepicker.mjs +31 -24
  215. package/fesm2022/timepicker.mjs.map +1 -1
  216. package/fesm2022/toolbar/testing.mjs.map +1 -1
  217. package/fesm2022/toolbar.mjs +13 -15
  218. package/fesm2022/toolbar.mjs.map +1 -1
  219. package/fesm2022/tooltip/testing.mjs.map +1 -1
  220. package/fesm2022/tooltip.mjs +15 -960
  221. package/fesm2022/tooltip.mjs.map +1 -1
  222. package/fesm2022/tree/testing.mjs.map +1 -1
  223. package/fesm2022/tree.mjs +28 -30
  224. package/fesm2022/tree.mjs.map +1 -1
  225. package/form-field/index.d.ts +16 -508
  226. package/form-field/testing/control/index.d.ts +2 -10
  227. package/form-field/testing/index.d.ts +19 -24
  228. package/form-field-control-harness.d-2d91f25a.d.ts +10 -0
  229. package/form-field-control.d-eb86711c.d.ts +62 -0
  230. package/form-field.d-2edbc094.d.ts +367 -0
  231. package/grid-list/index.d.ts +128 -152
  232. package/grid-list/testing/index.d.ts +39 -44
  233. package/icon/index.d.ts +9 -470
  234. package/icon/testing/index.d.ts +41 -44
  235. package/icon-module.d-aa3bbba0.d.ts +167 -0
  236. package/icon-registry.d-1dffe9de.d.ts +286 -0
  237. package/index.d-0536b706.d.ts +11 -0
  238. package/index.d-37e31cd3.d.ts +13 -0
  239. package/index.d.ts +2 -3
  240. package/input/index.d.ts +33 -62
  241. package/input/testing/index.d.ts +13 -71
  242. package/input-harness.d-4eecd1d3.d.ts +60 -0
  243. package/line.d-570a2537.d.ts +25 -0
  244. package/list/index.d.ts +155 -244
  245. package/list/testing/index.d.ts +158 -180
  246. package/list-option-types.d-8739f903.d.ts +15 -0
  247. package/menu/index.d.ts +183 -231
  248. package/menu/testing/index.d.ts +17 -23
  249. package/module.d-18a67f56.d.ts +206 -0
  250. package/module.d-74a721b9.d.ts +326 -0
  251. package/module.d-ba05faa6.d.ts +448 -0
  252. package/module.d-c17c834e.d.ts +18 -0
  253. package/optgroup-harness.d-7f741f69.d.ts +31 -0
  254. package/option-harness.d-3d33fc9a.d.ts +34 -0
  255. package/option-parent.d-559ad5c5.d.ts +19 -0
  256. package/option.d-6f493d78.d.ts +146 -0
  257. package/package.json +2 -2
  258. package/paginator/index.d.ts +31 -216
  259. package/paginator/testing/index.d.ts +14 -15
  260. package/paginator.d-40b1766e.d.ts +199 -0
  261. package/palette.d-ec4a617c.d.ts +4 -0
  262. package/progress-bar/index.d.ts +40 -59
  263. package/progress-bar/testing/index.d.ts +7 -10
  264. package/progress-spinner/index.d.ts +8 -110
  265. package/progress-spinner/testing/index.d.ts +10 -11
  266. package/progress-spinner.d-1fc040c5.d.ts +96 -0
  267. package/pseudo-checkbox-module.d-3abc0461.d.ts +44 -0
  268. package/radio/index.d.ts +151 -170
  269. package/radio/testing/index.d.ts +61 -67
  270. package/ripple-loader.d-8aac2988.d.ts +48 -0
  271. package/ripple.d-2fb57d04.d.ts +255 -0
  272. package/schematics/ng-add/index.js +1 -1
  273. package/schematics/ng-add/index.mjs +1 -1
  274. package/schematics/ng-generate/theme-color/index_bundled.js +2 -2
  275. package/schematics/ng-generate/theme-color/schema.json +10 -0
  276. package/schematics/ng-update/index_bundled.js +31 -31
  277. package/select/index.d.ts +25 -505
  278. package/select/testing/index.d.ts +5 -67
  279. package/select-harness.d-7441a7ac.d.ts +63 -0
  280. package/sidenav/index.d.ts +49 -92
  281. package/sidenav/testing/index.d.ts +58 -63
  282. package/slide-toggle/index.d.ts +39 -110
  283. package/slide-toggle/testing/index.d.ts +17 -21
  284. package/slider/index.d.ts +281 -328
  285. package/slider/testing/index.d.ts +42 -47
  286. package/snack-bar/index.d.ts +152 -185
  287. package/snack-bar/testing/index.d.ts +7 -9
  288. package/sort/index.d.ts +61 -169
  289. package/sort/testing/index.d.ts +22 -25
  290. package/sort-direction.d-f4ce4649.d.ts +3 -0
  291. package/sort.d-c2b79a45.d.ts +87 -0
  292. package/stepper/index.d.ts +115 -167
  293. package/stepper/testing/index.d.ts +43 -52
  294. package/table/index.d.ts +97 -156
  295. package/table/testing/index.d.ts +64 -78
  296. package/tabs/index.d.ts +309 -383
  297. package/tabs/testing/index.d.ts +67 -76
  298. package/timepicker/index.d.ts +127 -160
  299. package/timepicker/testing/index.d.ts +20 -26
  300. package/toolbar/index.d.ts +15 -26
  301. package/toolbar/testing/index.d.ts +13 -16
  302. package/tooltip/index.d.ts +11 -355
  303. package/tooltip/testing/index.d.ts +7 -10
  304. package/tree/index.d.ts +117 -163
  305. package/tree/testing/index.d.ts +52 -58
package/chips/index.d.ts CHANGED
@@ -1,137 +1,110 @@
1
- import { AfterContentInit } from '@angular/core';
2
- import { AfterViewInit } from '@angular/core';
3
- import { ChangeDetectorRef } from '@angular/core';
4
- import { ControlValueAccessor } from '@angular/forms';
5
- import { DoCheck } from '@angular/core';
6
- import { ElementRef } from '@angular/core';
7
- import { ErrorStateMatcher } from '@angular/material/core';
8
- import { EventEmitter } from '@angular/core';
9
- import { FocusKeyManager } from '@angular/cdk/a11y';
10
1
  import * as i0 from '@angular/core';
11
- import * as i1 from '@angular/material/core';
12
- import { InjectionToken } from '@angular/core';
13
- import { Injector } from '@angular/core';
14
- import { MatFormFieldControl } from '@angular/material/form-field';
15
- import { NgControl } from '@angular/forms';
16
- import { NgZone } from '@angular/core';
17
- import { Observable } from 'rxjs';
18
- import { OnChanges } from '@angular/core';
19
- import { OnDestroy } from '@angular/core';
20
- import { OnInit } from '@angular/core';
21
- import { QueryList } from '@angular/core';
22
- import { Subject } from 'rxjs';
23
-
24
- declare namespace i10 {
25
- export {
26
- MatChipEditedEvent,
27
- MatChipRow
28
- }
29
- }
30
-
31
- declare namespace i11 {
32
- export {
33
- MatChipSet
34
- }
35
- }
36
-
37
- declare namespace i2 {
38
- export {
39
- MatChipAction
40
- }
41
- }
42
-
43
- declare namespace i3 {
44
- export {
45
- MatChipEvent,
46
- MatChip
47
- }
48
- }
49
-
50
- declare namespace i4 {
51
- export {
52
- MatChipAvatar,
53
- MatChipTrailingIcon,
54
- MatChipRemove
55
- }
56
- }
57
-
58
- declare namespace i5 {
59
- export {
60
- MatChipEditInput
61
- }
62
- }
63
-
64
- declare namespace i6 {
65
- export {
66
- MatChipGridChange,
67
- MatChipGrid
68
- }
69
- }
70
-
71
- declare namespace i7 {
72
- export {
73
- MatChipInputEvent,
74
- MatChipInput
75
- }
76
- }
77
-
78
- declare namespace i8 {
79
- export {
80
- MatChipListboxChange,
81
- MAT_CHIP_LISTBOX_CONTROL_VALUE_ACCESSOR,
82
- MatChipListbox
83
- }
84
- }
85
-
86
- declare namespace i9 {
87
- export {
88
- MatChipSelectionChange,
89
- MatChipOption
90
- }
91
- }
92
-
93
- /**
94
- * Injection token used to avoid a circular dependency between the `MatChip` and `MatChipAction`.
95
- */
96
- export declare const MAT_CHIP: InjectionToken<unknown>;
97
-
98
- /**
99
- * Injection token that can be used to reference instances of `MatChipAvatar`. It serves as
100
- * alternative token to the actual `MatChipAvatar` class which could cause unnecessary
101
- * retention of the class and its directive metadata.
102
- */
103
- export declare const MAT_CHIP_AVATAR: InjectionToken<unknown>;
2
+ import { ElementRef, OnInit, AfterViewInit, AfterContentInit, DoCheck, OnDestroy, ChangeDetectorRef, NgZone, QueryList, EventEmitter, Injector, OnChanges, InjectionToken } from '@angular/core';
3
+ import { Subject, Observable } from 'rxjs';
4
+ import { FocusKeyManager } from '@angular/cdk/a11y';
5
+ import { ControlValueAccessor, NgControl } from '@angular/forms';
6
+ import { E as ErrorStateMatcher } from '../error-options.d-448d9046.js';
7
+ import { M as MatFormFieldControl } from '../form-field-control.d-eb86711c.js';
8
+ import { M as MatCommonModule } from '../common-module.d-0e6515ae.js';
9
+ import { M as MatRippleModule } from '../index.d-0536b706.js';
10
+ import '@angular/cdk/bidi';
11
+ import '../ripple.d-2fb57d04.js';
12
+ import '@angular/cdk/platform';
104
13
 
105
14
  /**
106
- * Provider Expression that allows mat-chip-listbox to register as a ControlValueAccessor.
107
- * This allows it to support [(ngModel)].
15
+ * Section within a chip.
108
16
  * @docs-private
109
17
  */
110
- export declare const MAT_CHIP_LISTBOX_CONTROL_VALUE_ACCESSOR: any;
111
-
112
- /**
113
- * Injection token that can be used to reference instances of `MatChipRemove`. It serves as
114
- * alternative token to the actual `MatChipRemove` class which could cause unnecessary
115
- * retention of the class and its directive metadata.
116
- */
117
- export declare const MAT_CHIP_REMOVE: InjectionToken<unknown>;
18
+ declare class MatChipAction {
19
+ _elementRef: ElementRef<HTMLElement>;
20
+ protected _parentChip: {
21
+ _handlePrimaryActionInteraction(): void;
22
+ remove(): void;
23
+ disabled: boolean;
24
+ _isEditing?: boolean;
25
+ };
26
+ /** Whether the action is interactive. */
27
+ isInteractive: boolean;
28
+ /** Whether this is the primary action in the chip. */
29
+ _isPrimary: boolean;
30
+ /** Whether the action is disabled. */
31
+ get disabled(): boolean;
32
+ set disabled(value: boolean);
33
+ private _disabled;
34
+ /** Tab index of the action. */
35
+ tabIndex: number;
36
+ /**
37
+ * Private API to allow focusing this chip when it is disabled.
38
+ */
39
+ private _allowFocusWhenDisabled;
40
+ /**
41
+ * Determine the value of the disabled attribute for this chip action.
42
+ */
43
+ protected _getDisabledAttribute(): string | null;
44
+ /**
45
+ * Determine the value of the tabindex attribute for this chip action.
46
+ */
47
+ protected _getTabindex(): string | null;
48
+ constructor(...args: unknown[]);
49
+ focus(): void;
50
+ _handleClick(event: MouseEvent): void;
51
+ _handleKeydown(event: KeyboardEvent): void;
52
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatChipAction, never>;
53
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipAction, "[matChipAction]", never, { "isInteractive": { "alias": "isInteractive"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "_allowFocusWhenDisabled": { "alias": "_allowFocusWhenDisabled"; "required": false; }; }, {}, never, never, true, never>;
54
+ static ngAcceptInputType_disabled: unknown;
55
+ static ngAcceptInputType_tabIndex: unknown;
56
+ }
118
57
 
58
+ /** Avatar image within a chip. */
59
+ declare class MatChipAvatar {
60
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatChipAvatar, never>;
61
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipAvatar, "mat-chip-avatar, [matChipAvatar]", never, {}, {}, never, never, true, never>;
62
+ }
63
+ /** Non-interactive trailing icon in a chip. */
64
+ declare class MatChipTrailingIcon extends MatChipAction {
65
+ /**
66
+ * MDC considers all trailing actions as a remove icon,
67
+ * but we support non-interactive trailing icons.
68
+ */
69
+ isInteractive: boolean;
70
+ _isPrimary: boolean;
71
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatChipTrailingIcon, never>;
72
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipTrailingIcon, "mat-chip-trailing-icon, [matChipTrailingIcon]", never, {}, {}, never, never, true, never>;
73
+ }
119
74
  /**
120
- * Injection token that can be used to reference instances of `MatChipTrailingIcon`. It serves as
121
- * alternative token to the actual `MatChipTrailingIcon` class which could cause unnecessary
122
- * retention of the class and its directive metadata.
75
+ * Directive to remove the parent chip when the trailing icon is clicked or
76
+ * when the ENTER key is pressed on it.
77
+ *
78
+ * Recommended for use with the Material Design "cancel" icon
79
+ * available at https://material.io/icons/#ic_cancel.
80
+ *
81
+ * Example:
82
+ *
83
+ * ```
84
+ * <mat-chip>
85
+ * <mat-icon matChipRemove>cancel</mat-icon>
86
+ * </mat-chip>
87
+ * ```
123
88
  */
124
- export declare const MAT_CHIP_TRAILING_ICON: InjectionToken<unknown>;
125
-
126
- /** Injection token to be used to override the default options for the chips module. */
127
- export declare const MAT_CHIPS_DEFAULT_OPTIONS: InjectionToken<MatChipsDefaultOptions>;
89
+ declare class MatChipRemove extends MatChipAction {
90
+ _isPrimary: boolean;
91
+ _handleClick(event: MouseEvent): void;
92
+ _handleKeydown(event: KeyboardEvent): void;
93
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatChipRemove, never>;
94
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipRemove, "[matChipRemove]", never, {}, {}, never, never, true, never>;
95
+ }
128
96
 
97
+ /** Represents an event fired on an individual `mat-chip`. */
98
+ interface MatChipEvent {
99
+ /** The chip the event was fired on. */
100
+ chip: MatChip;
101
+ }
129
102
  /**
130
103
  * Material design styled Chip base component. Used inside the MatChipSet component.
131
104
  *
132
105
  * Extended by MatChipOption and MatChipRow for different interaction patterns.
133
106
  */
134
- export declare class MatChip implements OnInit, AfterViewInit, AfterContentInit, DoCheck, OnDestroy {
107
+ declare class MatChip implements OnInit, AfterViewInit, AfterContentInit, DoCheck, OnDestroy {
135
108
  _changeDetectorRef: ChangeDetectorRef;
136
109
  _elementRef: ElementRef<HTMLElement>;
137
110
  protected _ngZone: NgZone;
@@ -257,67 +230,92 @@ export declare class MatChip implements OnInit, AfterViewInit, AfterContentInit,
257
230
  static ngAcceptInputType_disabled: unknown;
258
231
  }
259
232
 
233
+ /** Event object emitted by MatChipOption when selected or deselected. */
234
+ declare class MatChipSelectionChange {
235
+ /** Reference to the chip that emitted the event. */
236
+ source: MatChipOption;
237
+ /** Whether the chip that emitted the event is selected. */
238
+ selected: boolean;
239
+ /** Whether the selection change was a result of a user interaction. */
240
+ isUserInput: boolean;
241
+ constructor(
242
+ /** Reference to the chip that emitted the event. */
243
+ source: MatChipOption,
244
+ /** Whether the chip that emitted the event is selected. */
245
+ selected: boolean,
246
+ /** Whether the selection change was a result of a user interaction. */
247
+ isUserInput?: boolean);
248
+ }
260
249
  /**
261
- * Section within a chip.
262
- * @docs-private
250
+ * An extension of the MatChip component that supports chip selection. Used with MatChipListbox.
251
+ *
252
+ * Unlike other chips, the user can focus on disabled chip options inside a MatChipListbox. The
253
+ * user cannot click disabled chips.
263
254
  */
264
- declare class MatChipAction {
265
- _elementRef: ElementRef<HTMLElement>;
266
- protected _parentChip: {
267
- _handlePrimaryActionInteraction(): void;
268
- remove(): void;
269
- disabled: boolean;
270
- _isEditing?: boolean;
271
- };
272
- /** Whether the action is interactive. */
273
- isInteractive: boolean;
274
- /** Whether this is the primary action in the chip. */
275
- _isPrimary: boolean;
276
- /** Whether the action is disabled. */
277
- get disabled(): boolean;
278
- set disabled(value: boolean);
279
- private _disabled;
280
- /** Tab index of the action. */
281
- tabIndex: number;
282
- /**
283
- * Private API to allow focusing this chip when it is disabled.
284
- */
285
- private _allowFocusWhenDisabled;
255
+ declare class MatChipOption extends MatChip implements OnInit {
256
+ /** Default chip options. */
257
+ private _defaultOptions;
258
+ /** Whether the chip list is selectable. */
259
+ chipListSelectable: boolean;
260
+ /** Whether the chip list is in multi-selection mode. */
261
+ _chipListMultiple: boolean;
262
+ /** Whether the chip list hides single-selection indicator. */
263
+ _chipListHideSingleSelectionIndicator: boolean;
286
264
  /**
287
- * Determine the value of the disabled attribute for this chip action.
265
+ * Whether or not the chip is selectable.
266
+ *
267
+ * When a chip is not selectable, changes to its selected state are always
268
+ * ignored. By default an option chip is selectable, and it becomes
269
+ * non-selectable if its parent chip list is not selectable.
288
270
  */
289
- protected _getDisabledAttribute(): string | null;
271
+ get selectable(): boolean;
272
+ set selectable(value: boolean);
273
+ protected _selectable: boolean;
274
+ /** Whether the chip is selected. */
275
+ get selected(): boolean;
276
+ set selected(value: boolean);
277
+ private _selected;
290
278
  /**
291
- * Determine the value of the tabindex attribute for this chip action.
279
+ * The ARIA selected applied to the chip. Conforms to WAI ARIA best practices for listbox
280
+ * interaction patterns.
281
+ *
282
+ * From [WAI ARIA Listbox authoring practices guide](
283
+ * https://www.w3.org/WAI/ARIA/apg/patterns/listbox/):
284
+ * "If any options are selected, each selected option has either aria-selected or aria-checked
285
+ * set to true. All options that are selectable but not selected have either aria-selected or
286
+ * aria-checked set to false."
287
+ *
288
+ * Set `aria-selected="false"` on not-selected listbox options that are selectable to fix
289
+ * VoiceOver reading every option as "selected" (#25736).
292
290
  */
293
- protected _getTabindex(): string | null;
294
- constructor(...args: unknown[]);
295
- focus(): void;
296
- _handleClick(event: MouseEvent): void;
297
- _handleKeydown(event: KeyboardEvent): void;
298
- static ɵfac: i0.ɵɵFactoryDeclaration<MatChipAction, never>;
299
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipAction, "[matChipAction]", never, { "isInteractive": { "alias": "isInteractive"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "_allowFocusWhenDisabled": { "alias": "_allowFocusWhenDisabled"; "required": false; }; }, {}, never, never, true, never>;
300
- static ngAcceptInputType_disabled: unknown;
301
- static ngAcceptInputType_tabIndex: unknown;
302
- }
303
-
304
- /** Avatar image within a chip. */
305
- export declare class MatChipAvatar {
306
- static ɵfac: i0.ɵɵFactoryDeclaration<MatChipAvatar, never>;
307
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipAvatar, "mat-chip-avatar, [matChipAvatar]", never, {}, {}, never, never, true, never>;
308
- }
309
-
310
- /** Represents an event fired on an individual `mat-chip` when it is edited. */
311
- export declare interface MatChipEditedEvent extends MatChipEvent {
312
- /** The final edit value. */
313
- value: string;
291
+ get ariaSelected(): string | null;
292
+ /** The unstyled chip selector for this component. */
293
+ protected basicChipAttrName: string;
294
+ /** Emitted when the chip is selected or deselected. */
295
+ readonly selectionChange: EventEmitter<MatChipSelectionChange>;
296
+ ngOnInit(): void;
297
+ /** Selects the chip. */
298
+ select(): void;
299
+ /** Deselects the chip. */
300
+ deselect(): void;
301
+ /** Selects this chip and emits userInputSelection event */
302
+ selectViaInteraction(): void;
303
+ /** Toggles the current selected state of this chip. */
304
+ toggleSelected(isUserInput?: boolean): boolean;
305
+ _handlePrimaryActionInteraction(): void;
306
+ _hasLeadingGraphic(): boolean;
307
+ _setSelectedState(isSelected: boolean, isUserInput: boolean, emitEvent: boolean): void;
308
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatChipOption, never>;
309
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatChipOption, "mat-basic-chip-option, [mat-basic-chip-option], mat-chip-option, [mat-chip-option]", never, { "selectable": { "alias": "selectable"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; }, { "selectionChange": "selectionChange"; }, never, ["mat-chip-avatar, [matChipAvatar]", "*", "mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"], true, never>;
310
+ static ngAcceptInputType_selectable: unknown;
311
+ static ngAcceptInputType_selected: unknown;
314
312
  }
315
313
 
316
314
  /**
317
315
  * A directive that makes a span editable and exposes functions to modify and retrieve the
318
316
  * element's contents.
319
317
  */
320
- export declare class MatChipEditInput {
318
+ declare class MatChipEditInput {
321
319
  private readonly _elementRef;
322
320
  private readonly _document;
323
321
  constructor(...args: unknown[]);
@@ -330,130 +328,225 @@ export declare class MatChipEditInput {
330
328
  static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipEditInput, "span[matChipEditInput]", never, {}, {}, never, never, true, never>;
331
329
  }
332
330
 
333
- /** Represents an event fired on an individual `mat-chip`. */
334
- export declare interface MatChipEvent {
335
- /** The chip the event was fired on. */
336
- chip: MatChip;
331
+ /** Represents an event fired on an individual `mat-chip` when it is edited. */
332
+ interface MatChipEditedEvent extends MatChipEvent {
333
+ /** The final edit value. */
334
+ value: string;
337
335
  }
338
-
339
336
  /**
340
- * An extension of the MatChipSet component used with MatChipRow chips and
337
+ * An extension of the MatChip component used with MatChipGrid and
341
338
  * the matChipInputFor directive.
342
339
  */
343
- export declare class MatChipGrid extends MatChipSet implements AfterContentInit, AfterViewInit, ControlValueAccessor, DoCheck, MatFormFieldControl<any>, OnDestroy {
344
- ngControl: NgControl;
340
+ declare class MatChipRow extends MatChip implements AfterViewInit {
341
+ protected basicChipAttrName: string;
345
342
  /**
346
- * Implemented as part of MatFormFieldControl.
347
- * @docs-private
343
+ * The editing action has to be triggered in a timeout. While we're waiting on it, a blur
344
+ * event might occur which will interrupt the editing. This flag is used to avoid interruptions
345
+ * while the editing action is being initialized.
348
346
  */
349
- readonly controlType: string;
350
- /** The chip input to add more chips */
351
- protected _chipInput: MatChipTextControl;
352
- protected _defaultRole: string;
353
- private _errorStateTracker;
347
+ private _editStartPending;
348
+ editable: boolean;
349
+ /** Emitted when the chip is edited. */
350
+ readonly edited: EventEmitter<MatChipEditedEvent>;
351
+ /** The default chip edit input that is used if none is projected into this chip row. */
352
+ defaultEditInput?: MatChipEditInput;
353
+ /** The projected chip edit input. */
354
+ contentEditInput?: MatChipEditInput;
355
+ _isEditing: boolean;
356
+ constructor(...args: unknown[]);
357
+ _hasTrailingIcon(): boolean;
358
+ /** Sends focus to the first gridcell when the user clicks anywhere inside the chip. */
359
+ _handleFocus(): void;
360
+ _handleKeydown(event: KeyboardEvent): void;
361
+ _handleDoubleclick(event: MouseEvent): void;
362
+ private _startEditing;
363
+ private _onEditFinish;
364
+ _isRippleDisabled(): boolean;
354
365
  /**
355
- * List of element ids to propagate to the chipInput's aria-describedby attribute.
366
+ * Gets the projected chip edit input, or the default input if none is projected in. One of these
367
+ * two values is guaranteed to be defined.
356
368
  */
357
- private _ariaDescribedbyIds;
369
+ private _getEditInput;
370
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatChipRow, never>;
371
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatChipRow, "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", never, { "editable": { "alias": "editable"; "required": false; }; }, { "edited": "edited"; }, ["contentEditInput"], ["mat-chip-avatar, [matChipAvatar]", "[matChipEditInput]", "*", "mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"], true, never>;
372
+ }
373
+
374
+ /**
375
+ * Basic container component for the MatChip component.
376
+ *
377
+ * Extended by MatChipListbox and MatChipGrid for different interaction patterns.
378
+ */
379
+ declare class MatChipSet implements AfterViewInit, OnDestroy {
380
+ protected _elementRef: ElementRef<HTMLElement>;
381
+ protected _changeDetectorRef: ChangeDetectorRef;
382
+ private _dir;
383
+ /** Index of the last destroyed chip that had focus. */
384
+ private _lastDestroyedFocusedChipIndex;
385
+ /** Used to manage focus within the chip list. */
386
+ protected _keyManager: FocusKeyManager<MatChipAction>;
387
+ /** Subject that emits when the component has been destroyed. */
388
+ protected _destroyed: Subject<void>;
389
+ /** Role to use if it hasn't been overwritten by the user. */
390
+ protected _defaultRole: string;
391
+ /** Combined stream of all of the child chips' focus events. */
392
+ get chipFocusChanges(): Observable<MatChipEvent>;
393
+ /** Combined stream of all of the child chips' destroy events. */
394
+ get chipDestroyedChanges(): Observable<MatChipEvent>;
395
+ /** Combined stream of all of the child chips' remove events. */
396
+ get chipRemovedChanges(): Observable<MatChipEvent>;
397
+ /** Whether the chip set is disabled. */
398
+ get disabled(): boolean;
399
+ set disabled(value: boolean);
400
+ protected _disabled: boolean;
401
+ /** Whether the chip list contains chips or not. */
402
+ get empty(): boolean;
403
+ /** The ARIA role applied to the chip set. */
404
+ get role(): string | null;
405
+ /** Tabindex of the chip set. */
406
+ tabIndex: number;
407
+ set role(value: string | null);
408
+ private _explicitRole;
409
+ /** Whether any of the chips inside of this chip-set has focus. */
410
+ get focused(): boolean;
411
+ /** The chips that are part of this chip set. */
412
+ _chips: QueryList<MatChip>;
413
+ /** Flat list of all the actions contained within the chips. */
414
+ _chipActions: QueryList<MatChipAction>;
415
+ constructor(...args: unknown[]);
416
+ ngAfterViewInit(): void;
417
+ ngOnDestroy(): void;
418
+ /** Checks whether any of the chips is focused. */
419
+ protected _hasFocusedChip(): boolean;
420
+ /** Syncs the chip-set's state with the individual chips. */
421
+ protected _syncChipsState(): void;
422
+ /** Dummy method for subclasses to override. Base chip set cannot be focused. */
423
+ focus(): void;
424
+ /** Handles keyboard events on the chip set. */
425
+ _handleKeydown(event: KeyboardEvent): void;
358
426
  /**
359
- * Function when touched. Set as part of ControlValueAccessor implementation.
360
- * @docs-private
427
+ * Utility to ensure all indexes are valid.
428
+ *
429
+ * @param index The index to be checked.
430
+ * @returns True if the index is valid for our list of chips.
361
431
  */
362
- _onTouched: () => void;
432
+ protected _isValidIndex(index: number): boolean;
363
433
  /**
364
- * Function when changed. Set as part of ControlValueAccessor implementation.
365
- * @docs-private
434
+ * Removes the `tabindex` from the chip set and resets it back afterwards, allowing the
435
+ * user to tab out of it. This prevents the set from capturing focus and redirecting
436
+ * it back to the first chip, creating a focus trap, if it user tries to tab away.
366
437
  */
367
- _onChange: (value: any) => void;
438
+ protected _allowFocusEscape(): void;
368
439
  /**
369
- * Implemented as part of MatFormFieldControl.
370
- * @docs-private
440
+ * Gets a stream of events from all the chips within the set.
441
+ * The stream will automatically incorporate any newly-added chips.
371
442
  */
372
- get disabled(): boolean;
373
- set disabled(value: boolean);
443
+ protected _getChipStream<T, C extends MatChip = MatChip>(mappingFunction: (chip: C) => Observable<T>): Observable<T>;
444
+ /** Checks whether an event comes from inside a chip element. */
445
+ protected _originatesFromChip(event: Event): boolean;
446
+ /** Sets up the chip set's focus management logic. */
447
+ private _setUpFocusManagement;
374
448
  /**
375
- * Implemented as part of MatFormFieldControl.
376
- * @docs-private
449
+ * Determines if key manager should avoid putting a given chip action in the tab index. Skip
450
+ * non-interactive and disabled actions since the user can't do anything with them.
377
451
  */
378
- get id(): string;
452
+ protected _skipPredicate(action: MatChipAction): boolean;
453
+ /** Listens to changes in the chip set and syncs up the state of the individual chips. */
454
+ private _trackChipSetChanges;
455
+ /** Starts tracking the destroyed chips in order to capture the focused one. */
456
+ private _trackDestroyedFocusedChip;
379
457
  /**
380
- * Implemented as part of MatFormFieldControl.
381
- * @docs-private
458
+ * Finds the next appropriate chip to move focus to,
459
+ * if the currently-focused chip is destroyed.
382
460
  */
383
- get empty(): boolean;
461
+ private _redirectDestroyedChipFocus;
462
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatChipSet, never>;
463
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatChipSet, "mat-chip-set", never, { "disabled": { "alias": "disabled"; "required": false; }; "role": { "alias": "role"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; }, {}, ["_chips"], ["*"], true, never>;
464
+ static ngAcceptInputType_disabled: unknown;
465
+ static ngAcceptInputType_tabIndex: unknown;
466
+ }
467
+
468
+ /** Change event object that is emitted when the chip listbox value has changed. */
469
+ declare class MatChipListboxChange {
470
+ /** Chip listbox that emitted the event. */
471
+ source: MatChipListbox;
472
+ /** Value of the chip listbox when the event was emitted. */
473
+ value: any;
474
+ constructor(
475
+ /** Chip listbox that emitted the event. */
476
+ source: MatChipListbox,
477
+ /** Value of the chip listbox when the event was emitted. */
478
+ value: any);
479
+ }
480
+ /**
481
+ * Provider Expression that allows mat-chip-listbox to register as a ControlValueAccessor.
482
+ * This allows it to support [(ngModel)].
483
+ * @docs-private
484
+ */
485
+ declare const MAT_CHIP_LISTBOX_CONTROL_VALUE_ACCESSOR: any;
486
+ /**
487
+ * An extension of the MatChipSet component that supports chip selection.
488
+ * Used with MatChipOption chips.
489
+ */
490
+ declare class MatChipListbox extends MatChipSet implements AfterContentInit, OnDestroy, ControlValueAccessor {
384
491
  /**
385
- * Implemented as part of MatFormFieldControl.
492
+ * Function when touched. Set as part of ControlValueAccessor implementation.
386
493
  * @docs-private
387
494
  */
388
- get placeholder(): string;
389
- set placeholder(value: string);
390
- protected _placeholder: string;
391
- /** Whether any chips or the matChipInput inside of this chip-grid has focus. */
392
- get focused(): boolean;
495
+ _onTouched: () => void;
393
496
  /**
394
- * Implemented as part of MatFormFieldControl.
497
+ * Function when changed. Set as part of ControlValueAccessor implementation.
395
498
  * @docs-private
396
499
  */
397
- get required(): boolean;
398
- set required(value: boolean);
399
- protected _required: boolean | undefined;
500
+ _onChange: (value: any) => void;
501
+ protected _defaultRole: string;
502
+ /** Default chip options. */
503
+ private _defaultOptions;
504
+ /** Whether the user should be allowed to select multiple chips. */
505
+ get multiple(): boolean;
506
+ set multiple(value: boolean);
507
+ private _multiple;
508
+ /** The array of selected chips inside the chip listbox. */
509
+ get selected(): MatChipOption[] | MatChipOption;
510
+ /** Orientation of the chip list. */
511
+ ariaOrientation: 'horizontal' | 'vertical';
400
512
  /**
401
- * Implemented as part of MatFormFieldControl.
402
- * @docs-private
513
+ * Whether or not this chip listbox is selectable.
514
+ *
515
+ * When a chip listbox is not selectable, the selected states for all
516
+ * the chips inside the chip listbox are always ignored.
403
517
  */
404
- get shouldLabelFloat(): boolean;
518
+ get selectable(): boolean;
519
+ set selectable(value: boolean);
520
+ protected _selectable: boolean;
405
521
  /**
406
- * Implemented as part of MatFormFieldControl.
407
- * @docs-private
522
+ * A function to compare the option values with the selected values. The first argument
523
+ * is a value from an option. The second is a value from the selection. A boolean
524
+ * should be returned.
408
525
  */
409
- get value(): any;
410
- set value(value: any);
411
- protected _value: any[];
412
- /** An object used to control when error messages are shown. */
413
- get errorStateMatcher(): ErrorStateMatcher;
414
- set errorStateMatcher(value: ErrorStateMatcher);
526
+ compareWith: (o1: any, o2: any) => boolean;
527
+ /** Whether this chip listbox is required. */
528
+ required: boolean;
529
+ /** Whether checkmark indicator for single-selection options is hidden. */
530
+ get hideSingleSelectionIndicator(): boolean;
531
+ set hideSingleSelectionIndicator(value: boolean);
532
+ private _hideSingleSelectionIndicator;
533
+ /** Combined stream of all of the child chips' selection change events. */
534
+ get chipSelectionChanges(): Observable<MatChipSelectionChange>;
415
535
  /** Combined stream of all of the child chips' blur events. */
416
536
  get chipBlurChanges(): Observable<MatChipEvent>;
417
- /** Emits when the chip grid value has been changed by the user. */
418
- readonly change: EventEmitter<MatChipGridChange>;
419
- /**
420
- * Emits whenever the raw value of the chip-grid changes. This is here primarily
421
- * to facilitate the two-way binding for the `value` input.
422
- * @docs-private
423
- */
424
- readonly valueChange: EventEmitter<any>;
425
- _chips: QueryList<MatChipRow>;
426
- /**
427
- * Emits whenever the component state changes and should cause the parent
428
- * form-field to update. Implemented as part of `MatFormFieldControl`.
429
- * @docs-private
430
- */
431
- readonly stateChanges: Subject<void>;
432
- /** Whether the chip grid is in an error state. */
433
- get errorState(): boolean;
434
- set errorState(value: boolean);
435
- constructor(...args: unknown[]);
537
+ /** The value of the listbox, which is the combined value of the selected chips. */
538
+ get value(): any;
539
+ set value(value: any);
540
+ protected _value: any;
541
+ /** Event emitted when the selected chip listbox value has been changed by the user. */
542
+ readonly change: EventEmitter<MatChipListboxChange>;
543
+ _chips: QueryList<MatChipOption>;
436
544
  ngAfterContentInit(): void;
437
- ngAfterViewInit(): void;
438
- ngDoCheck(): void;
439
- ngOnDestroy(): void;
440
- /** Associates an HTML input element with this chip grid. */
441
- registerInput(inputElement: MatChipTextControl): void;
442
- /**
443
- * Implemented as part of MatFormFieldControl.
444
- * @docs-private
445
- */
446
- onContainerClick(event: MouseEvent): void;
447
545
  /**
448
- * Focuses the first chip in this chip grid, or the associated input when there
449
- * are no eligible chips.
546
+ * Focuses the first selected chip in this chip listbox, or the first non-disabled chip when there
547
+ * are no selected chips.
450
548
  */
451
549
  focus(): void;
452
- /**
453
- * Implemented as part of MatFormFieldControl.
454
- * @docs-private
455
- */
456
- setDescribedByIds(ids: string[]): void;
457
550
  /**
458
551
  * Implemented as part of ControlValueAccessor.
459
552
  * @docs-private
@@ -474,9 +567,211 @@ export declare class MatChipGrid extends MatChipSet implements AfterContentInit,
474
567
  * @docs-private
475
568
  */
476
569
  setDisabledState(isDisabled: boolean): void;
477
- /** Refreshes the error state of the chip grid. */
478
- updateErrorState(): void;
479
- /** When blurred, mark the field as touched when focus moved outside the chip grid. */
570
+ /** Selects all chips with value. */
571
+ _setSelectionByValue(value: any, isUserInput?: boolean): void;
572
+ /** When blurred, marks the field as touched when focus moved outside the chip listbox. */
573
+ _blur(): void;
574
+ _keydown(event: KeyboardEvent): void;
575
+ /** Marks the field as touched */
576
+ private _markAsTouched;
577
+ /** Emits change event to set the model value. */
578
+ private _propagateChanges;
579
+ /**
580
+ * Deselects every chip in the listbox.
581
+ * @param skip Chip that should not be deselected.
582
+ */
583
+ private _clearSelection;
584
+ /**
585
+ * Finds and selects the chip based on its value.
586
+ * @returns Chip that has the corresponding value.
587
+ */
588
+ private _selectValue;
589
+ /** Syncs the chip-listbox selection state with the individual chips. */
590
+ private _syncListboxProperties;
591
+ /** Returns the first selected chip in this listbox, or undefined if no chips are selected. */
592
+ private _getFirstSelectedChip;
593
+ /**
594
+ * Determines if key manager should avoid putting a given chip action in the tab index. Skip
595
+ * non-interactive actions since the user can't do anything with them.
596
+ */
597
+ protected _skipPredicate(action: MatChipAction): boolean;
598
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatChipListbox, never>;
599
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatChipListbox, "mat-chip-listbox", never, { "multiple": { "alias": "multiple"; "required": false; }; "ariaOrientation": { "alias": "aria-orientation"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "compareWith": { "alias": "compareWith"; "required": false; }; "required": { "alias": "required"; "required": false; }; "hideSingleSelectionIndicator": { "alias": "hideSingleSelectionIndicator"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "change": "change"; }, ["_chips"], ["*"], true, never>;
600
+ static ngAcceptInputType_multiple: unknown;
601
+ static ngAcceptInputType_selectable: unknown;
602
+ static ngAcceptInputType_required: unknown;
603
+ static ngAcceptInputType_hideSingleSelectionIndicator: unknown;
604
+ }
605
+
606
+ /** Interface for a text control that is used to drive interaction with a mat-chip-list. */
607
+ interface MatChipTextControl {
608
+ /** Unique identifier for the text control. */
609
+ id: string;
610
+ /** The text control's placeholder text. */
611
+ placeholder: string;
612
+ /** Whether the text control has browser focus. */
613
+ focused: boolean;
614
+ /** Whether the text control is empty. */
615
+ empty: boolean;
616
+ /** Focuses the text control. */
617
+ focus(): void;
618
+ /** Sets the list of ids the input is described by. */
619
+ setDescribedByIds(ids: string[]): void;
620
+ }
621
+
622
+ /** Change event object that is emitted when the chip grid value has changed. */
623
+ declare class MatChipGridChange {
624
+ /** Chip grid that emitted the event. */
625
+ source: MatChipGrid;
626
+ /** Value of the chip grid when the event was emitted. */
627
+ value: any;
628
+ constructor(
629
+ /** Chip grid that emitted the event. */
630
+ source: MatChipGrid,
631
+ /** Value of the chip grid when the event was emitted. */
632
+ value: any);
633
+ }
634
+ /**
635
+ * An extension of the MatChipSet component used with MatChipRow chips and
636
+ * the matChipInputFor directive.
637
+ */
638
+ declare class MatChipGrid extends MatChipSet implements AfterContentInit, AfterViewInit, ControlValueAccessor, DoCheck, MatFormFieldControl<any>, OnDestroy {
639
+ ngControl: NgControl;
640
+ /**
641
+ * Implemented as part of MatFormFieldControl.
642
+ * @docs-private
643
+ */
644
+ readonly controlType: string;
645
+ /** The chip input to add more chips */
646
+ protected _chipInput: MatChipTextControl;
647
+ protected _defaultRole: string;
648
+ private _errorStateTracker;
649
+ /**
650
+ * List of element ids to propagate to the chipInput's aria-describedby attribute.
651
+ */
652
+ private _ariaDescribedbyIds;
653
+ /**
654
+ * Function when touched. Set as part of ControlValueAccessor implementation.
655
+ * @docs-private
656
+ */
657
+ _onTouched: () => void;
658
+ /**
659
+ * Function when changed. Set as part of ControlValueAccessor implementation.
660
+ * @docs-private
661
+ */
662
+ _onChange: (value: any) => void;
663
+ /**
664
+ * Implemented as part of MatFormFieldControl.
665
+ * @docs-private
666
+ */
667
+ get disabled(): boolean;
668
+ set disabled(value: boolean);
669
+ /**
670
+ * Implemented as part of MatFormFieldControl.
671
+ * @docs-private
672
+ */
673
+ get id(): string;
674
+ /**
675
+ * Implemented as part of MatFormFieldControl.
676
+ * @docs-private
677
+ */
678
+ get empty(): boolean;
679
+ /**
680
+ * Implemented as part of MatFormFieldControl.
681
+ * @docs-private
682
+ */
683
+ get placeholder(): string;
684
+ set placeholder(value: string);
685
+ protected _placeholder: string;
686
+ /** Whether any chips or the matChipInput inside of this chip-grid has focus. */
687
+ get focused(): boolean;
688
+ /**
689
+ * Implemented as part of MatFormFieldControl.
690
+ * @docs-private
691
+ */
692
+ get required(): boolean;
693
+ set required(value: boolean);
694
+ protected _required: boolean | undefined;
695
+ /**
696
+ * Implemented as part of MatFormFieldControl.
697
+ * @docs-private
698
+ */
699
+ get shouldLabelFloat(): boolean;
700
+ /**
701
+ * Implemented as part of MatFormFieldControl.
702
+ * @docs-private
703
+ */
704
+ get value(): any;
705
+ set value(value: any);
706
+ protected _value: any[];
707
+ /** An object used to control when error messages are shown. */
708
+ get errorStateMatcher(): ErrorStateMatcher;
709
+ set errorStateMatcher(value: ErrorStateMatcher);
710
+ /** Combined stream of all of the child chips' blur events. */
711
+ get chipBlurChanges(): Observable<MatChipEvent>;
712
+ /** Emits when the chip grid value has been changed by the user. */
713
+ readonly change: EventEmitter<MatChipGridChange>;
714
+ /**
715
+ * Emits whenever the raw value of the chip-grid changes. This is here primarily
716
+ * to facilitate the two-way binding for the `value` input.
717
+ * @docs-private
718
+ */
719
+ readonly valueChange: EventEmitter<any>;
720
+ _chips: QueryList<MatChipRow>;
721
+ /**
722
+ * Emits whenever the component state changes and should cause the parent
723
+ * form-field to update. Implemented as part of `MatFormFieldControl`.
724
+ * @docs-private
725
+ */
726
+ readonly stateChanges: Subject<void>;
727
+ /** Whether the chip grid is in an error state. */
728
+ get errorState(): boolean;
729
+ set errorState(value: boolean);
730
+ constructor(...args: unknown[]);
731
+ ngAfterContentInit(): void;
732
+ ngAfterViewInit(): void;
733
+ ngDoCheck(): void;
734
+ ngOnDestroy(): void;
735
+ /** Associates an HTML input element with this chip grid. */
736
+ registerInput(inputElement: MatChipTextControl): void;
737
+ /**
738
+ * Implemented as part of MatFormFieldControl.
739
+ * @docs-private
740
+ */
741
+ onContainerClick(event: MouseEvent): void;
742
+ /**
743
+ * Focuses the first chip in this chip grid, or the associated input when there
744
+ * are no eligible chips.
745
+ */
746
+ focus(): void;
747
+ /**
748
+ * Implemented as part of MatFormFieldControl.
749
+ * @docs-private
750
+ */
751
+ setDescribedByIds(ids: string[]): void;
752
+ /**
753
+ * Implemented as part of ControlValueAccessor.
754
+ * @docs-private
755
+ */
756
+ writeValue(value: any): void;
757
+ /**
758
+ * Implemented as part of ControlValueAccessor.
759
+ * @docs-private
760
+ */
761
+ registerOnChange(fn: (value: any) => void): void;
762
+ /**
763
+ * Implemented as part of ControlValueAccessor.
764
+ * @docs-private
765
+ */
766
+ registerOnTouched(fn: () => void): void;
767
+ /**
768
+ * Implemented as part of ControlValueAccessor.
769
+ * @docs-private
770
+ */
771
+ setDisabledState(isDisabled: boolean): void;
772
+ /** Refreshes the error state of the chip grid. */
773
+ updateErrorState(): void;
774
+ /** When blurred, mark the field as touched when focus moved outside the chip grid. */
480
775
  _blur(): void;
481
776
  /**
482
777
  * Removes the `tabindex` from the chip grid and resets it back afterwards, allowing the
@@ -497,31 +792,31 @@ export declare class MatChipGrid extends MatChipSet implements AfterContentInit,
497
792
  static ngAcceptInputType_required: unknown;
498
793
  }
499
794
 
500
- /** Change event object that is emitted when the chip grid value has changed. */
501
- export declare class MatChipGridChange {
502
- /** Chip grid that emitted the event. */
503
- source: MatChipGrid;
504
- /** Value of the chip grid when the event was emitted. */
505
- value: any;
506
- constructor(
507
- /** Chip grid that emitted the event. */
508
- source: MatChipGrid,
509
- /** Value of the chip grid when the event was emitted. */
510
- value: any);
795
+ /** Represents an input event on a `matChipInput`. */
796
+ interface MatChipInputEvent {
797
+ /**
798
+ * The native `<input>` element that the event is being fired for.
799
+ * @deprecated Use `MatChipInputEvent#chipInput.inputElement` instead.
800
+ * @breaking-change 13.0.0 This property will be removed.
801
+ */
802
+ input: HTMLInputElement;
803
+ /** The value of the input. */
804
+ value: string;
805
+ /** Reference to the chip input that emitted the event. */
806
+ chipInput: MatChipInput;
511
807
  }
512
-
513
808
  /**
514
809
  * Directive that adds chip-specific behaviors to an input element inside `<mat-form-field>`.
515
810
  * May be placed inside or outside of a `<mat-chip-grid>`.
516
811
  */
517
- export declare class MatChipInput implements MatChipTextControl, OnChanges, OnDestroy {
812
+ declare class MatChipInput implements MatChipTextControl, OnChanges, OnDestroy {
518
813
  protected _elementRef: ElementRef<HTMLInputElement>;
519
814
  /** Whether the control is focused. */
520
815
  focused: boolean;
521
816
  /** Register input for chip list */
522
817
  get chipGrid(): MatChipGrid;
523
818
  set chipGrid(value: MatChipGrid);
524
- private _chipGrid;
819
+ protected _chipGrid: MatChipGrid;
525
820
  /**
526
821
  * Whether or not the chipEnd event will be emitted when the input is blurred.
527
822
  */
@@ -570,431 +865,42 @@ export declare class MatChipInput implements MatChipTextControl, OnChanges, OnDe
570
865
  static ngAcceptInputType_disabled: unknown;
571
866
  }
572
867
 
573
- /** Represents an input event on a `matChipInput`. */
574
- export declare interface MatChipInputEvent {
575
- /**
576
- * The native `<input>` element that the event is being fired for.
577
- * @deprecated Use `MatChipInputEvent#chipInput.inputElement` instead.
578
- * @breaking-change 13.0.0 This property will be removed.
579
- */
580
- input: HTMLInputElement;
581
- /** The value of the input. */
582
- value: string;
583
- /** Reference to the chip input that emitted the event. */
584
- chipInput: MatChipInput;
868
+ declare class MatChipsModule {
869
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatChipsModule, never>;
870
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MatChipsModule, never, [typeof MatCommonModule, typeof MatRippleModule, typeof MatChipAction, typeof MatChip, typeof MatChipAvatar, typeof MatChipEditInput, typeof MatChipGrid, typeof MatChipInput, typeof MatChipListbox, typeof MatChipOption, typeof MatChipRemove, typeof MatChipRow, typeof MatChipSet, typeof MatChipTrailingIcon], [typeof MatCommonModule, typeof MatChip, typeof MatChipAvatar, typeof MatChipEditInput, typeof MatChipGrid, typeof MatChipInput, typeof MatChipListbox, typeof MatChipOption, typeof MatChipRemove, typeof MatChipRow, typeof MatChipSet, typeof MatChipTrailingIcon]>;
871
+ static ɵinj: i0.ɵɵInjectorDeclaration<MatChipsModule>;
585
872
  }
586
873
 
874
+ /** Default options, for the chips module, that can be overridden. */
875
+ interface MatChipsDefaultOptions {
876
+ /** The list of key codes that will trigger a chipEnd event. */
877
+ separatorKeyCodes: readonly number[] | ReadonlySet<number>;
878
+ /** Whether icon indicators should be hidden for single-selection. */
879
+ hideSingleSelectionIndicator?: boolean;
880
+ }
881
+ /** Injection token to be used to override the default options for the chips module. */
882
+ declare const MAT_CHIPS_DEFAULT_OPTIONS: InjectionToken<MatChipsDefaultOptions>;
587
883
  /**
588
- * An extension of the MatChipSet component that supports chip selection.
589
- * Used with MatChipOption chips.
884
+ * Injection token that can be used to reference instances of `MatChipAvatar`. It serves as
885
+ * alternative token to the actual `MatChipAvatar` class which could cause unnecessary
886
+ * retention of the class and its directive metadata.
590
887
  */
591
- export declare class MatChipListbox extends MatChipSet implements AfterContentInit, OnDestroy, ControlValueAccessor {
592
- /**
593
- * Function when touched. Set as part of ControlValueAccessor implementation.
594
- * @docs-private
595
- */
596
- _onTouched: () => void;
597
- /**
598
- * Function when changed. Set as part of ControlValueAccessor implementation.
599
- * @docs-private
600
- */
601
- _onChange: (value: any) => void;
602
- protected _defaultRole: string;
603
- /** Default chip options. */
604
- private _defaultOptions;
605
- /** Whether the user should be allowed to select multiple chips. */
606
- get multiple(): boolean;
607
- set multiple(value: boolean);
608
- private _multiple;
609
- /** The array of selected chips inside the chip listbox. */
610
- get selected(): MatChipOption[] | MatChipOption;
611
- /** Orientation of the chip list. */
612
- ariaOrientation: 'horizontal' | 'vertical';
613
- /**
614
- * Whether or not this chip listbox is selectable.
615
- *
616
- * When a chip listbox is not selectable, the selected states for all
617
- * the chips inside the chip listbox are always ignored.
618
- */
619
- get selectable(): boolean;
620
- set selectable(value: boolean);
621
- protected _selectable: boolean;
622
- /**
623
- * A function to compare the option values with the selected values. The first argument
624
- * is a value from an option. The second is a value from the selection. A boolean
625
- * should be returned.
626
- */
627
- compareWith: (o1: any, o2: any) => boolean;
628
- /** Whether this chip listbox is required. */
629
- required: boolean;
630
- /** Whether checkmark indicator for single-selection options is hidden. */
631
- get hideSingleSelectionIndicator(): boolean;
632
- set hideSingleSelectionIndicator(value: boolean);
633
- private _hideSingleSelectionIndicator;
634
- /** Combined stream of all of the child chips' selection change events. */
635
- get chipSelectionChanges(): Observable<MatChipSelectionChange>;
636
- /** Combined stream of all of the child chips' blur events. */
637
- get chipBlurChanges(): Observable<MatChipEvent>;
638
- /** The value of the listbox, which is the combined value of the selected chips. */
639
- get value(): any;
640
- set value(value: any);
641
- protected _value: any;
642
- /** Event emitted when the selected chip listbox value has been changed by the user. */
643
- readonly change: EventEmitter<MatChipListboxChange>;
644
- _chips: QueryList<MatChipOption>;
645
- ngAfterContentInit(): void;
646
- /**
647
- * Focuses the first selected chip in this chip listbox, or the first non-disabled chip when there
648
- * are no selected chips.
649
- */
650
- focus(): void;
651
- /**
652
- * Implemented as part of ControlValueAccessor.
653
- * @docs-private
654
- */
655
- writeValue(value: any): void;
656
- /**
657
- * Implemented as part of ControlValueAccessor.
658
- * @docs-private
659
- */
660
- registerOnChange(fn: (value: any) => void): void;
661
- /**
662
- * Implemented as part of ControlValueAccessor.
663
- * @docs-private
664
- */
665
- registerOnTouched(fn: () => void): void;
666
- /**
667
- * Implemented as part of ControlValueAccessor.
668
- * @docs-private
669
- */
670
- setDisabledState(isDisabled: boolean): void;
671
- /** Selects all chips with value. */
672
- _setSelectionByValue(value: any, isUserInput?: boolean): void;
673
- /** When blurred, marks the field as touched when focus moved outside the chip listbox. */
674
- _blur(): void;
675
- _keydown(event: KeyboardEvent): void;
676
- /** Marks the field as touched */
677
- private _markAsTouched;
678
- /** Emits change event to set the model value. */
679
- private _propagateChanges;
680
- /**
681
- * Deselects every chip in the listbox.
682
- * @param skip Chip that should not be deselected.
683
- */
684
- private _clearSelection;
685
- /**
686
- * Finds and selects the chip based on its value.
687
- * @returns Chip that has the corresponding value.
688
- */
689
- private _selectValue;
690
- /** Syncs the chip-listbox selection state with the individual chips. */
691
- private _syncListboxProperties;
692
- /** Returns the first selected chip in this listbox, or undefined if no chips are selected. */
693
- private _getFirstSelectedChip;
694
- /**
695
- * Determines if key manager should avoid putting a given chip action in the tab index. Skip
696
- * non-interactive actions since the user can't do anything with them.
697
- */
698
- protected _skipPredicate(action: MatChipAction): boolean;
699
- static ɵfac: i0.ɵɵFactoryDeclaration<MatChipListbox, never>;
700
- static ɵcmp: i0.ɵɵComponentDeclaration<MatChipListbox, "mat-chip-listbox", never, { "multiple": { "alias": "multiple"; "required": false; }; "ariaOrientation": { "alias": "aria-orientation"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "compareWith": { "alias": "compareWith"; "required": false; }; "required": { "alias": "required"; "required": false; }; "hideSingleSelectionIndicator": { "alias": "hideSingleSelectionIndicator"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "change": "change"; }, ["_chips"], ["*"], true, never>;
701
- static ngAcceptInputType_multiple: unknown;
702
- static ngAcceptInputType_selectable: unknown;
703
- static ngAcceptInputType_required: unknown;
704
- static ngAcceptInputType_hideSingleSelectionIndicator: unknown;
705
- }
706
-
707
- /** Change event object that is emitted when the chip listbox value has changed. */
708
- export declare class MatChipListboxChange {
709
- /** Chip listbox that emitted the event. */
710
- source: MatChipListbox;
711
- /** Value of the chip listbox when the event was emitted. */
712
- value: any;
713
- constructor(
714
- /** Chip listbox that emitted the event. */
715
- source: MatChipListbox,
716
- /** Value of the chip listbox when the event was emitted. */
717
- value: any);
718
- }
719
-
888
+ declare const MAT_CHIP_AVATAR: InjectionToken<unknown>;
720
889
  /**
721
- * An extension of the MatChip component that supports chip selection. Used with MatChipListbox.
722
- *
723
- * Unlike other chips, the user can focus on disabled chip options inside a MatChipListbox. The
724
- * user cannot click disabled chips.
725
- */
726
- export declare class MatChipOption extends MatChip implements OnInit {
727
- /** Default chip options. */
728
- private _defaultOptions;
729
- /** Whether the chip list is selectable. */
730
- chipListSelectable: boolean;
731
- /** Whether the chip list is in multi-selection mode. */
732
- _chipListMultiple: boolean;
733
- /** Whether the chip list hides single-selection indicator. */
734
- _chipListHideSingleSelectionIndicator: boolean;
735
- /**
736
- * Whether or not the chip is selectable.
737
- *
738
- * When a chip is not selectable, changes to its selected state are always
739
- * ignored. By default an option chip is selectable, and it becomes
740
- * non-selectable if its parent chip list is not selectable.
741
- */
742
- get selectable(): boolean;
743
- set selectable(value: boolean);
744
- protected _selectable: boolean;
745
- /** Whether the chip is selected. */
746
- get selected(): boolean;
747
- set selected(value: boolean);
748
- private _selected;
749
- /**
750
- * The ARIA selected applied to the chip. Conforms to WAI ARIA best practices for listbox
751
- * interaction patterns.
752
- *
753
- * From [WAI ARIA Listbox authoring practices guide](
754
- * https://www.w3.org/WAI/ARIA/apg/patterns/listbox/):
755
- * "If any options are selected, each selected option has either aria-selected or aria-checked
756
- * set to true. All options that are selectable but not selected have either aria-selected or
757
- * aria-checked set to false."
758
- *
759
- * Set `aria-selected="false"` on not-selected listbox options that are selectable to fix
760
- * VoiceOver reading every option as "selected" (#25736).
761
- */
762
- get ariaSelected(): string | null;
763
- /** The unstyled chip selector for this component. */
764
- protected basicChipAttrName: string;
765
- /** Emitted when the chip is selected or deselected. */
766
- readonly selectionChange: EventEmitter<MatChipSelectionChange>;
767
- ngOnInit(): void;
768
- /** Selects the chip. */
769
- select(): void;
770
- /** Deselects the chip. */
771
- deselect(): void;
772
- /** Selects this chip and emits userInputSelection event */
773
- selectViaInteraction(): void;
774
- /** Toggles the current selected state of this chip. */
775
- toggleSelected(isUserInput?: boolean): boolean;
776
- _handlePrimaryActionInteraction(): void;
777
- _hasLeadingGraphic(): boolean;
778
- _setSelectedState(isSelected: boolean, isUserInput: boolean, emitEvent: boolean): void;
779
- static ɵfac: i0.ɵɵFactoryDeclaration<MatChipOption, never>;
780
- static ɵcmp: i0.ɵɵComponentDeclaration<MatChipOption, "mat-basic-chip-option, [mat-basic-chip-option], mat-chip-option, [mat-chip-option]", never, { "selectable": { "alias": "selectable"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; }, { "selectionChange": "selectionChange"; }, never, ["mat-chip-avatar, [matChipAvatar]", "*", "mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"], true, never>;
781
- static ngAcceptInputType_selectable: unknown;
782
- static ngAcceptInputType_selected: unknown;
783
- }
784
-
785
- /**
786
- * Directive to remove the parent chip when the trailing icon is clicked or
787
- * when the ENTER key is pressed on it.
788
- *
789
- * Recommended for use with the Material Design "cancel" icon
790
- * available at https://material.io/icons/#ic_cancel.
791
- *
792
- * Example:
793
- *
794
- * ```
795
- * <mat-chip>
796
- * <mat-icon matChipRemove>cancel</mat-icon>
797
- * </mat-chip>
798
- * ```
890
+ * Injection token that can be used to reference instances of `MatChipTrailingIcon`. It serves as
891
+ * alternative token to the actual `MatChipTrailingIcon` class which could cause unnecessary
892
+ * retention of the class and its directive metadata.
799
893
  */
800
- export declare class MatChipRemove extends MatChipAction {
801
- _isPrimary: boolean;
802
- _handleClick(event: MouseEvent): void;
803
- _handleKeydown(event: KeyboardEvent): void;
804
- static ɵfac: i0.ɵɵFactoryDeclaration<MatChipRemove, never>;
805
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipRemove, "[matChipRemove]", never, {}, {}, never, never, true, never>;
806
- }
807
-
894
+ declare const MAT_CHIP_TRAILING_ICON: InjectionToken<unknown>;
808
895
  /**
809
- * An extension of the MatChip component used with MatChipGrid and
810
- * the matChipInputFor directive.
896
+ * Injection token that can be used to reference instances of `MatChipRemove`. It serves as
897
+ * alternative token to the actual `MatChipRemove` class which could cause unnecessary
898
+ * retention of the class and its directive metadata.
811
899
  */
812
- export declare class MatChipRow extends MatChip implements AfterViewInit {
813
- protected basicChipAttrName: string;
814
- /**
815
- * The editing action has to be triggered in a timeout. While we're waiting on it, a blur
816
- * event might occur which will interrupt the editing. This flag is used to avoid interruptions
817
- * while the editing action is being initialized.
818
- */
819
- private _editStartPending;
820
- editable: boolean;
821
- /** Emitted when the chip is edited. */
822
- readonly edited: EventEmitter<MatChipEditedEvent>;
823
- /** The default chip edit input that is used if none is projected into this chip row. */
824
- defaultEditInput?: MatChipEditInput;
825
- /** The projected chip edit input. */
826
- contentEditInput?: MatChipEditInput;
827
- _isEditing: boolean;
828
- constructor(...args: unknown[]);
829
- _hasTrailingIcon(): boolean;
830
- /** Sends focus to the first gridcell when the user clicks anywhere inside the chip. */
831
- _handleFocus(): void;
832
- _handleKeydown(event: KeyboardEvent): void;
833
- _handleDoubleclick(event: MouseEvent): void;
834
- private _startEditing;
835
- private _onEditFinish;
836
- _isRippleDisabled(): boolean;
837
- /**
838
- * Gets the projected chip edit input, or the default input if none is projected in. One of these
839
- * two values is guaranteed to be defined.
840
- */
841
- private _getEditInput;
842
- static ɵfac: i0.ɵɵFactoryDeclaration<MatChipRow, never>;
843
- static ɵcmp: i0.ɵɵComponentDeclaration<MatChipRow, "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", never, { "editable": { "alias": "editable"; "required": false; }; }, { "edited": "edited"; }, ["contentEditInput"], ["mat-chip-avatar, [matChipAvatar]", "[matChipEditInput]", "*", "mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"], true, never>;
844
- }
845
-
846
- /** Default options, for the chips module, that can be overridden. */
847
- export declare interface MatChipsDefaultOptions {
848
- /** The list of key codes that will trigger a chipEnd event. */
849
- separatorKeyCodes: readonly number[] | ReadonlySet<number>;
850
- /** Whether icon indicators should be hidden for single-selection. */
851
- hideSingleSelectionIndicator?: boolean;
852
- }
853
-
854
- /** Event object emitted by MatChipOption when selected or deselected. */
855
- export declare class MatChipSelectionChange {
856
- /** Reference to the chip that emitted the event. */
857
- source: MatChipOption;
858
- /** Whether the chip that emitted the event is selected. */
859
- selected: boolean;
860
- /** Whether the selection change was a result of a user interaction. */
861
- isUserInput: boolean;
862
- constructor(
863
- /** Reference to the chip that emitted the event. */
864
- source: MatChipOption,
865
- /** Whether the chip that emitted the event is selected. */
866
- selected: boolean,
867
- /** Whether the selection change was a result of a user interaction. */
868
- isUserInput?: boolean);
869
- }
870
-
900
+ declare const MAT_CHIP_REMOVE: InjectionToken<unknown>;
871
901
  /**
872
- * Basic container component for the MatChip component.
873
- *
874
- * Extended by MatChipListbox and MatChipGrid for different interaction patterns.
902
+ * Injection token used to avoid a circular dependency between the `MatChip` and `MatChipAction`.
875
903
  */
876
- export declare class MatChipSet implements AfterViewInit, OnDestroy {
877
- protected _elementRef: ElementRef<HTMLElement>;
878
- protected _changeDetectorRef: ChangeDetectorRef;
879
- private _dir;
880
- /** Index of the last destroyed chip that had focus. */
881
- private _lastDestroyedFocusedChipIndex;
882
- /** Used to manage focus within the chip list. */
883
- protected _keyManager: FocusKeyManager<MatChipAction>;
884
- /** Subject that emits when the component has been destroyed. */
885
- protected _destroyed: Subject<void>;
886
- /** Role to use if it hasn't been overwritten by the user. */
887
- protected _defaultRole: string;
888
- /** Combined stream of all of the child chips' focus events. */
889
- get chipFocusChanges(): Observable<MatChipEvent>;
890
- /** Combined stream of all of the child chips' destroy events. */
891
- get chipDestroyedChanges(): Observable<MatChipEvent>;
892
- /** Combined stream of all of the child chips' remove events. */
893
- get chipRemovedChanges(): Observable<MatChipEvent>;
894
- /** Whether the chip set is disabled. */
895
- get disabled(): boolean;
896
- set disabled(value: boolean);
897
- protected _disabled: boolean;
898
- /** Whether the chip list contains chips or not. */
899
- get empty(): boolean;
900
- /** The ARIA role applied to the chip set. */
901
- get role(): string | null;
902
- /** Tabindex of the chip set. */
903
- tabIndex: number;
904
- set role(value: string | null);
905
- private _explicitRole;
906
- /** Whether any of the chips inside of this chip-set has focus. */
907
- get focused(): boolean;
908
- /** The chips that are part of this chip set. */
909
- _chips: QueryList<MatChip>;
910
- /** Flat list of all the actions contained within the chips. */
911
- _chipActions: QueryList<MatChipAction>;
912
- constructor(...args: unknown[]);
913
- ngAfterViewInit(): void;
914
- ngOnDestroy(): void;
915
- /** Checks whether any of the chips is focused. */
916
- protected _hasFocusedChip(): boolean;
917
- /** Syncs the chip-set's state with the individual chips. */
918
- protected _syncChipsState(): void;
919
- /** Dummy method for subclasses to override. Base chip set cannot be focused. */
920
- focus(): void;
921
- /** Handles keyboard events on the chip set. */
922
- _handleKeydown(event: KeyboardEvent): void;
923
- /**
924
- * Utility to ensure all indexes are valid.
925
- *
926
- * @param index The index to be checked.
927
- * @returns True if the index is valid for our list of chips.
928
- */
929
- protected _isValidIndex(index: number): boolean;
930
- /**
931
- * Removes the `tabindex` from the chip set and resets it back afterwards, allowing the
932
- * user to tab out of it. This prevents the set from capturing focus and redirecting
933
- * it back to the first chip, creating a focus trap, if it user tries to tab away.
934
- */
935
- protected _allowFocusEscape(): void;
936
- /**
937
- * Gets a stream of events from all the chips within the set.
938
- * The stream will automatically incorporate any newly-added chips.
939
- */
940
- protected _getChipStream<T, C extends MatChip = MatChip>(mappingFunction: (chip: C) => Observable<T>): Observable<T>;
941
- /** Checks whether an event comes from inside a chip element. */
942
- protected _originatesFromChip(event: Event): boolean;
943
- /** Sets up the chip set's focus management logic. */
944
- private _setUpFocusManagement;
945
- /**
946
- * Determines if key manager should avoid putting a given chip action in the tab index. Skip
947
- * non-interactive and disabled actions since the user can't do anything with them.
948
- */
949
- protected _skipPredicate(action: MatChipAction): boolean;
950
- /** Listens to changes in the chip set and syncs up the state of the individual chips. */
951
- private _trackChipSetChanges;
952
- /** Starts tracking the destroyed chips in order to capture the focused one. */
953
- private _trackDestroyedFocusedChip;
954
- /**
955
- * Finds the next appropriate chip to move focus to,
956
- * if the currently-focused chip is destroyed.
957
- */
958
- private _redirectDestroyedChipFocus;
959
- static ɵfac: i0.ɵɵFactoryDeclaration<MatChipSet, never>;
960
- static ɵcmp: i0.ɵɵComponentDeclaration<MatChipSet, "mat-chip-set", never, { "disabled": { "alias": "disabled"; "required": false; }; "role": { "alias": "role"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; }, {}, ["_chips"], ["*"], true, never>;
961
- static ngAcceptInputType_disabled: unknown;
962
- static ngAcceptInputType_tabIndex: unknown;
963
- }
964
-
965
- export declare class MatChipsModule {
966
- static ɵfac: i0.ɵɵFactoryDeclaration<MatChipsModule, never>;
967
- static ɵmod: i0.ɵɵNgModuleDeclaration<MatChipsModule, never, [typeof i1.MatCommonModule, typeof i1.MatRippleModule, typeof i2.MatChipAction, typeof i3.MatChip, typeof i4.MatChipAvatar, typeof i5.MatChipEditInput, typeof i6.MatChipGrid, typeof i7.MatChipInput, typeof i8.MatChipListbox, typeof i9.MatChipOption, typeof i4.MatChipRemove, typeof i10.MatChipRow, typeof i11.MatChipSet, typeof i4.MatChipTrailingIcon], [typeof i1.MatCommonModule, typeof i3.MatChip, typeof i4.MatChipAvatar, typeof i5.MatChipEditInput, typeof i6.MatChipGrid, typeof i7.MatChipInput, typeof i8.MatChipListbox, typeof i9.MatChipOption, typeof i4.MatChipRemove, typeof i10.MatChipRow, typeof i11.MatChipSet, typeof i4.MatChipTrailingIcon]>;
968
- static ɵinj: i0.ɵɵInjectorDeclaration<MatChipsModule>;
969
- }
970
-
971
-
972
- /** Interface for a text control that is used to drive interaction with a mat-chip-list. */
973
- export declare interface MatChipTextControl {
974
- /** Unique identifier for the text control. */
975
- id: string;
976
- /** The text control's placeholder text. */
977
- placeholder: string;
978
- /** Whether the text control has browser focus. */
979
- focused: boolean;
980
- /** Whether the text control is empty. */
981
- empty: boolean;
982
- /** Focuses the text control. */
983
- focus(): void;
984
- /** Sets the list of ids the input is described by. */
985
- setDescribedByIds(ids: string[]): void;
986
- }
987
-
988
- /** Non-interactive trailing icon in a chip. */
989
- export declare class MatChipTrailingIcon extends MatChipAction {
990
- /**
991
- * MDC considers all trailing actions as a remove icon,
992
- * but we support non-interactive trailing icons.
993
- */
994
- isInteractive: boolean;
995
- _isPrimary: boolean;
996
- static ɵfac: i0.ɵɵFactoryDeclaration<MatChipTrailingIcon, never>;
997
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipTrailingIcon, "mat-chip-trailing-icon, [matChipTrailingIcon]", never, {}, {}, never, never, true, never>;
998
- }
904
+ declare const MAT_CHIP: InjectionToken<unknown>;
999
905
 
1000
- export { }
906
+ export { MAT_CHIP, MAT_CHIPS_DEFAULT_OPTIONS, MAT_CHIP_AVATAR, MAT_CHIP_LISTBOX_CONTROL_VALUE_ACCESSOR, MAT_CHIP_REMOVE, MAT_CHIP_TRAILING_ICON, MatChip, MatChipAvatar, MatChipEditInput, type MatChipEditedEvent, type MatChipEvent, MatChipGrid, MatChipGridChange, MatChipInput, type MatChipInputEvent, MatChipListbox, MatChipListboxChange, MatChipOption, MatChipRemove, MatChipRow, MatChipSelectionChange, MatChipSet, type MatChipTextControl, MatChipTrailingIcon, type MatChipsDefaultOptions, MatChipsModule };