@angular/material 20.0.0-next.0 → 20.0.0-next.2

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 (368) hide show
  1. package/autocomplete/_autocomplete-theme.scss +4 -4
  2. package/autocomplete/index.d.ts +96 -126
  3. package/autocomplete/testing/index.d.ts +6 -11
  4. package/badge/_badge-theme.scss +5 -5
  5. package/badge/index.d.ts +8 -112
  6. package/badge/testing/index.d.ts +7 -8
  7. package/badge.d-49a8a74b.d.ts +98 -0
  8. package/bottom-sheet/_bottom-sheet-theme.scss +3 -3
  9. package/bottom-sheet/index.d.ts +88 -103
  10. package/bottom-sheet/testing/index.d.ts +4 -6
  11. package/button/_button-theme.scss +84 -32
  12. package/button/_fab-theme.scss +13 -13
  13. package/button/_icon-button-theme.scss +5 -5
  14. package/button/index.d.ts +10 -245
  15. package/button/testing/index.d.ts +13 -10
  16. package/button-toggle/_button-toggle-theme.scss +8 -8
  17. package/button-toggle/index.d.ts +12 -285
  18. package/button-toggle/testing/index.d.ts +38 -37
  19. package/button-toggle.d-edc8acff.d.ts +257 -0
  20. package/card/_card-theme.scss +12 -12
  21. package/card/index.d.ts +80 -117
  22. package/card/testing/index.d.ts +11 -15
  23. package/checkbox/_checkbox-theme.scss +10 -10
  24. package/checkbox/index.d.ts +43 -104
  25. package/checkbox/testing/index.d.ts +6 -10
  26. package/chips/_chips-theme.scss +14 -14
  27. package/chips/index.d.ts +599 -693
  28. package/chips/testing/index.d.ts +78 -93
  29. package/common-module.d-0e6515ae.d.ts +43 -0
  30. package/core/_core-theme.scss +2 -2
  31. package/core/index.d.ts +50 -979
  32. package/core/option/_optgroup-theme.scss +2 -2
  33. package/core/option/_option-theme.scss +4 -4
  34. package/core/ripple/_ripple-theme.scss +3 -3
  35. package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +4 -4
  36. package/core/testing/index.d.ts +3 -65
  37. package/core/theming/_color-api-backwards-compatibility.scss +19 -8
  38. package/core/tokens/_density.scss +3 -0
  39. package/core/tokens/_token-definition.scss +1 -2
  40. package/core/tokens/_token-utils.scss +20 -5
  41. package/core/tokens/m2/_index.scss +2 -0
  42. package/core/tokens/m2/mat/_tonal-button.scss +110 -0
  43. package/core/tokens/m3/_index.scss +2 -0
  44. package/core/tokens/m3/definitions/_index.scss +1 -1
  45. package/core/tokens/m3/definitions/_md-comp-elevated-card.scss +3 -1
  46. package/core/tokens/m3/definitions/_md-sys-color.scss +44 -2
  47. package/core/tokens/m3/definitions/_md-sys-typescale.scss +20 -1
  48. package/core/tokens/m3/mat/_tonal-button.scss +101 -0
  49. package/date-adapter.d-c6835d41.d.ts +267 -0
  50. package/date-range-input-harness.d-549a9f7e.d.ts +278 -0
  51. package/datepicker/_datepicker-theme.scss +8 -7
  52. package/datepicker/index.d.ts +1332 -1482
  53. package/datepicker/testing/index.d.ts +5 -287
  54. package/dialog/_dialog-theme.scss +6 -6
  55. package/dialog/index.d.ts +59 -453
  56. package/dialog/testing/index.d.ts +22 -26
  57. package/dialog.d-57867441.d.ts +335 -0
  58. package/divider/_divider-theme.scss +2 -2
  59. package/divider/index.d.ts +6 -11
  60. package/divider/testing/index.d.ts +2 -16
  61. package/divider-harness.d-d34fede4.d.ts +14 -0
  62. package/error-options.d-448d9046.d.ts +17 -0
  63. package/expansion/_expansion-theme.scss +4 -4
  64. package/expansion/index.d.ts +139 -190
  65. package/expansion/testing/index.d.ts +25 -31
  66. package/fesm2022/autocomplete/testing.mjs +2 -1
  67. package/fesm2022/autocomplete/testing.mjs.map +1 -1
  68. package/fesm2022/autocomplete.mjs +56 -32
  69. package/fesm2022/autocomplete.mjs.map +1 -1
  70. package/fesm2022/badge/testing.mjs.map +1 -1
  71. package/fesm2022/badge.mjs +14 -17
  72. package/fesm2022/badge.mjs.map +1 -1
  73. package/fesm2022/bottom-sheet/testing.mjs.map +1 -1
  74. package/fesm2022/bottom-sheet.mjs +13 -15
  75. package/fesm2022/bottom-sheet.mjs.map +1 -1
  76. package/fesm2022/button/testing.mjs +34 -15
  77. package/fesm2022/button/testing.mjs.map +1 -1
  78. package/fesm2022/button-toggle/testing.mjs.map +1 -1
  79. package/fesm2022/button-toggle.mjs +22 -15
  80. package/fesm2022/button-toggle.mjs.map +1 -1
  81. package/fesm2022/button.mjs +14 -395
  82. package/fesm2022/button.mjs.map +1 -1
  83. package/fesm2022/card/testing.mjs.map +1 -1
  84. package/fesm2022/card.mjs +49 -51
  85. package/fesm2022/card.mjs.map +1 -1
  86. package/fesm2022/checkbox/testing.mjs.map +1 -1
  87. package/fesm2022/checkbox.mjs +32 -73
  88. package/fesm2022/checkbox.mjs.map +1 -1
  89. package/fesm2022/chips/testing.mjs.map +1 -1
  90. package/fesm2022/chips.mjs +51 -46
  91. package/fesm2022/chips.mjs.map +1 -1
  92. package/fesm2022/common-module-2d64df09.mjs +42 -0
  93. package/fesm2022/common-module-2d64df09.mjs.map +1 -0
  94. package/fesm2022/core/testing.mjs +3 -76
  95. package/fesm2022/core/testing.mjs.map +1 -1
  96. package/fesm2022/core.mjs +38 -1598
  97. package/fesm2022/core.mjs.map +1 -1
  98. package/fesm2022/date-formats-b618acb8.mjs +190 -0
  99. package/fesm2022/date-formats-b618acb8.mjs.map +1 -0
  100. package/fesm2022/date-range-input-harness-de70be6a.mjs +467 -0
  101. package/fesm2022/date-range-input-harness-de70be6a.mjs.map +1 -0
  102. package/fesm2022/datepicker/testing.mjs +5 -465
  103. package/fesm2022/datepicker/testing.mjs.map +1 -1
  104. package/fesm2022/datepicker.mjs +162 -131
  105. package/fesm2022/datepicker.mjs.map +1 -1
  106. package/fesm2022/dialog/testing.mjs +12 -1
  107. package/fesm2022/dialog/testing.mjs.map +1 -1
  108. package/fesm2022/dialog.mjs +14 -895
  109. package/fesm2022/dialog.mjs.map +1 -1
  110. package/fesm2022/divider/testing.mjs +2 -17
  111. package/fesm2022/divider/testing.mjs.map +1 -1
  112. package/fesm2022/divider-harness-8099453f.mjs +18 -0
  113. package/fesm2022/divider-harness-8099453f.mjs.map +1 -0
  114. package/fesm2022/divider.mjs +10 -12
  115. package/fesm2022/divider.mjs.map +1 -1
  116. package/fesm2022/error-options-4a00765e.mjs +29 -0
  117. package/fesm2022/error-options-4a00765e.mjs.map +1 -0
  118. package/fesm2022/error-state-8f4ce1af.mjs +37 -0
  119. package/fesm2022/error-state-8f4ce1af.mjs.map +1 -0
  120. package/fesm2022/expansion/testing.mjs.map +1 -1
  121. package/fesm2022/expansion.mjs +30 -32
  122. package/fesm2022/expansion.mjs.map +1 -1
  123. package/fesm2022/form-field/testing/control.mjs +2 -10
  124. package/fesm2022/form-field/testing/control.mjs.map +1 -1
  125. package/fesm2022/form-field/testing.mjs +7 -6
  126. package/fesm2022/form-field/testing.mjs.map +1 -1
  127. package/fesm2022/form-field-6d755764.mjs +1076 -0
  128. package/fesm2022/form-field-6d755764.mjs.map +1 -0
  129. package/fesm2022/form-field-control-harness-efefd4cf.mjs +11 -0
  130. package/fesm2022/form-field-control-harness-efefd4cf.mjs.map +1 -0
  131. package/fesm2022/form-field.mjs +14 -1110
  132. package/fesm2022/form-field.mjs.map +1 -1
  133. package/fesm2022/grid-list/testing.mjs +1 -1
  134. package/fesm2022/grid-list/testing.mjs.map +1 -1
  135. package/fesm2022/grid-list.mjs +30 -173
  136. package/fesm2022/grid-list.mjs.map +1 -1
  137. package/fesm2022/icon/testing.mjs +12 -12
  138. package/fesm2022/icon/testing.mjs.map +1 -1
  139. package/fesm2022/icon-button-0850d958.mjs +211 -0
  140. package/fesm2022/icon-button-0850d958.mjs.map +1 -0
  141. package/fesm2022/icon-module-3f77a24d.mjs +395 -0
  142. package/fesm2022/icon-module-3f77a24d.mjs.map +1 -0
  143. package/fesm2022/icon-registry-13a3b98e.mjs +639 -0
  144. package/fesm2022/icon-registry-13a3b98e.mjs.map +1 -0
  145. package/fesm2022/icon.mjs +11 -1016
  146. package/fesm2022/icon.mjs.map +1 -1
  147. package/fesm2022/index-1763d3a6.mjs +22 -0
  148. package/fesm2022/index-1763d3a6.mjs.map +1 -0
  149. package/fesm2022/index-4bc1d6d3.mjs +20 -0
  150. package/fesm2022/index-4bc1d6d3.mjs.map +1 -0
  151. package/fesm2022/input/testing.mjs +5 -113
  152. package/fesm2022/input/testing.mjs.map +1 -1
  153. package/fesm2022/input-harness-e68bb132.mjs +115 -0
  154. package/fesm2022/input-harness-e68bb132.mjs.map +1 -0
  155. package/fesm2022/input-value-accessor-8a79a24e.mjs +12 -0
  156. package/fesm2022/input-value-accessor-8a79a24e.mjs.map +1 -0
  157. package/fesm2022/input.mjs +21 -23
  158. package/fesm2022/input.mjs.map +1 -1
  159. package/fesm2022/internal-form-field-434c4039.mjs +27 -0
  160. package/fesm2022/internal-form-field-434c4039.mjs.map +1 -0
  161. package/fesm2022/line-d6afe347.mjs +59 -0
  162. package/fesm2022/line-d6afe347.mjs.map +1 -0
  163. package/fesm2022/list/testing.mjs +2 -2
  164. package/fesm2022/list/testing.mjs.map +1 -1
  165. package/fesm2022/list.mjs +59 -56
  166. package/fesm2022/list.mjs.map +1 -1
  167. package/fesm2022/menu/testing.mjs.map +1 -1
  168. package/fesm2022/menu.mjs +37 -25
  169. package/fesm2022/menu.mjs.map +1 -1
  170. package/fesm2022/module-1c16a0a9.mjs +1293 -0
  171. package/fesm2022/module-1c16a0a9.mjs.map +1 -0
  172. package/fesm2022/module-47e3be58.mjs +970 -0
  173. package/fesm2022/module-47e3be58.mjs.map +1 -0
  174. package/fesm2022/module-a5f9ab72.mjs +875 -0
  175. package/fesm2022/module-a5f9ab72.mjs.map +1 -0
  176. package/fesm2022/module-cf951a02.mjs +214 -0
  177. package/fesm2022/module-cf951a02.mjs.map +1 -0
  178. package/fesm2022/module-d757bba0.mjs +38 -0
  179. package/fesm2022/module-d757bba0.mjs.map +1 -0
  180. package/fesm2022/optgroup-harness-5e66b138.mjs +36 -0
  181. package/fesm2022/optgroup-harness-5e66b138.mjs.map +1 -0
  182. package/fesm2022/option-07c3c660.mjs +348 -0
  183. package/fesm2022/option-07c3c660.mjs.map +1 -0
  184. package/fesm2022/option-harness-3b7c1106.mjs +46 -0
  185. package/fesm2022/option-harness-3b7c1106.mjs.map +1 -0
  186. package/fesm2022/paginator/testing.mjs +4 -1
  187. package/fesm2022/paginator/testing.mjs.map +1 -1
  188. package/fesm2022/paginator.mjs +52 -22
  189. package/fesm2022/paginator.mjs.map +1 -1
  190. package/fesm2022/progress-bar/testing.mjs +0 -4
  191. package/fesm2022/progress-bar/testing.mjs.map +1 -1
  192. package/fesm2022/progress-bar.mjs +15 -13
  193. package/fesm2022/progress-bar.mjs.map +1 -1
  194. package/fesm2022/progress-spinner/testing.mjs +0 -4
  195. package/fesm2022/progress-spinner/testing.mjs.map +1 -1
  196. package/fesm2022/progress-spinner.mjs +15 -13
  197. package/fesm2022/progress-spinner.mjs.map +1 -1
  198. package/fesm2022/pseudo-checkbox-af5a4ea4.mjs +52 -0
  199. package/fesm2022/pseudo-checkbox-af5a4ea4.mjs.map +1 -0
  200. package/fesm2022/pseudo-checkbox-module-216fae38.mjs +20 -0
  201. package/fesm2022/pseudo-checkbox-module-216fae38.mjs.map +1 -0
  202. package/fesm2022/public-api-c5ab57f5.mjs +147 -0
  203. package/fesm2022/public-api-c5ab57f5.mjs.map +1 -0
  204. package/fesm2022/radio/testing.mjs.map +1 -1
  205. package/fesm2022/radio.mjs +23 -15
  206. package/fesm2022/radio.mjs.map +1 -1
  207. package/fesm2022/ripple-9939d1f5.mjs +639 -0
  208. package/fesm2022/ripple-9939d1f5.mjs.map +1 -0
  209. package/fesm2022/ripple-loader-f2078c66.mjs +165 -0
  210. package/fesm2022/ripple-loader-f2078c66.mjs.map +1 -0
  211. package/fesm2022/select/testing.mjs +5 -121
  212. package/fesm2022/select/testing.mjs.map +1 -1
  213. package/fesm2022/select-harness-69d47123.mjs +123 -0
  214. package/fesm2022/select-harness-69d47123.mjs.map +1 -0
  215. package/fesm2022/select.mjs +30 -1311
  216. package/fesm2022/select.mjs.map +1 -1
  217. package/fesm2022/sidenav/testing.mjs +1 -1
  218. package/fesm2022/sidenav/testing.mjs.map +1 -1
  219. package/fesm2022/sidenav.mjs +31 -31
  220. package/fesm2022/sidenav.mjs.map +1 -1
  221. package/fesm2022/slide-toggle/testing.mjs.map +1 -1
  222. package/fesm2022/slide-toggle.mjs +27 -75
  223. package/fesm2022/slide-toggle.mjs.map +1 -1
  224. package/fesm2022/slider/testing.mjs.map +1 -1
  225. package/fesm2022/slider.mjs +27 -23
  226. package/fesm2022/slider.mjs.map +1 -1
  227. package/fesm2022/snack-bar/testing.mjs.map +1 -1
  228. package/fesm2022/snack-bar.mjs +38 -30
  229. package/fesm2022/snack-bar.mjs.map +1 -1
  230. package/fesm2022/sort/testing.mjs.map +1 -1
  231. package/fesm2022/sort.mjs +26 -20
  232. package/fesm2022/sort.mjs.map +1 -1
  233. package/fesm2022/stepper/testing.mjs.map +1 -1
  234. package/fesm2022/stepper.mjs +52 -39
  235. package/fesm2022/stepper.mjs.map +1 -1
  236. package/fesm2022/structural-styles-d5ada3b3.mjs +18 -0
  237. package/fesm2022/structural-styles-d5ada3b3.mjs.map +1 -0
  238. package/fesm2022/table/testing.mjs.map +1 -1
  239. package/fesm2022/table.mjs +58 -60
  240. package/fesm2022/table.mjs.map +1 -1
  241. package/fesm2022/tabs/testing.mjs.map +1 -1
  242. package/fesm2022/tabs.mjs +54 -58
  243. package/fesm2022/tabs.mjs.map +1 -1
  244. package/fesm2022/timepicker/testing.mjs +1 -1
  245. package/fesm2022/timepicker/testing.mjs.map +1 -1
  246. package/fesm2022/timepicker.mjs +37 -26
  247. package/fesm2022/timepicker.mjs.map +1 -1
  248. package/fesm2022/toolbar/testing.mjs.map +1 -1
  249. package/fesm2022/toolbar.mjs +13 -15
  250. package/fesm2022/toolbar.mjs.map +1 -1
  251. package/fesm2022/tooltip/testing.mjs.map +1 -1
  252. package/fesm2022/tooltip.mjs +15 -960
  253. package/fesm2022/tooltip.mjs.map +1 -1
  254. package/fesm2022/tree/testing.mjs.map +1 -1
  255. package/fesm2022/tree.mjs +28 -30
  256. package/fesm2022/tree.mjs.map +1 -1
  257. package/form-field/_form-field-theme.scss +16 -16
  258. package/form-field/index.d.ts +16 -508
  259. package/form-field/testing/control/index.d.ts +2 -10
  260. package/form-field/testing/index.d.ts +19 -24
  261. package/form-field-control-harness.d-2d91f25a.d.ts +10 -0
  262. package/form-field-control.d-eb86711c.d.ts +62 -0
  263. package/form-field.d-2edbc094.d.ts +367 -0
  264. package/grid-list/_grid-list-theme.scss +1 -1
  265. package/grid-list/index.d.ts +128 -152
  266. package/grid-list/testing/index.d.ts +39 -44
  267. package/icon/_icon-theme.scss +2 -2
  268. package/icon/index.d.ts +9 -470
  269. package/icon/testing/index.d.ts +41 -44
  270. package/icon-module.d-aa3bbba0.d.ts +167 -0
  271. package/icon-registry.d-1dffe9de.d.ts +286 -0
  272. package/index.d-0536b706.d.ts +11 -0
  273. package/index.d-37e31cd3.d.ts +13 -0
  274. package/index.d.ts +2 -3
  275. package/input/index.d.ts +33 -62
  276. package/input/testing/index.d.ts +13 -71
  277. package/input-harness.d-4eecd1d3.d.ts +60 -0
  278. package/line.d-570a2537.d.ts +25 -0
  279. package/list/_list-theme.scss +15 -15
  280. package/list/index.d.ts +155 -244
  281. package/list/testing/index.d.ts +158 -180
  282. package/list-option-types.d-8739f903.d.ts +15 -0
  283. package/menu/_menu-theme.scss +3 -3
  284. package/menu/index.d.ts +183 -231
  285. package/menu/testing/index.d.ts +17 -23
  286. package/module.d-74a721b9.d.ts +326 -0
  287. package/module.d-792a497c.d.ts +213 -0
  288. package/module.d-ba05faa6.d.ts +448 -0
  289. package/module.d-c17c834e.d.ts +18 -0
  290. package/optgroup-harness.d-7f741f69.d.ts +31 -0
  291. package/option-harness.d-3d33fc9a.d.ts +34 -0
  292. package/option-parent.d-559ad5c5.d.ts +19 -0
  293. package/option.d-6f493d78.d.ts +146 -0
  294. package/package.json +2 -2
  295. package/paginator/_paginator-theme.scss +3 -3
  296. package/paginator/index.d.ts +31 -216
  297. package/paginator/testing/index.d.ts +14 -15
  298. package/paginator.d-40b1766e.d.ts +199 -0
  299. package/palette.d-ec4a617c.d.ts +4 -0
  300. package/prebuilt-themes/deeppurple-amber.css +1 -1
  301. package/prebuilt-themes/indigo-pink.css +1 -1
  302. package/prebuilt-themes/pink-bluegrey.css +1 -1
  303. package/prebuilt-themes/purple-green.css +1 -1
  304. package/progress-bar/_progress-bar-theme.scss +2 -2
  305. package/progress-bar/index.d.ts +40 -59
  306. package/progress-bar/testing/index.d.ts +7 -10
  307. package/progress-spinner/_progress-spinner-theme.scss +4 -4
  308. package/progress-spinner/index.d.ts +8 -110
  309. package/progress-spinner/testing/index.d.ts +10 -11
  310. package/progress-spinner.d-1fc040c5.d.ts +96 -0
  311. package/pseudo-checkbox-module.d-3abc0461.d.ts +44 -0
  312. package/radio/_radio-theme.scss +12 -12
  313. package/radio/index.d.ts +151 -170
  314. package/radio/testing/index.d.ts +61 -67
  315. package/ripple-loader.d-8aac2988.d.ts +48 -0
  316. package/ripple.d-2fb57d04.d.ts +255 -0
  317. package/schematics/ng-add/index.js +1 -1
  318. package/schematics/ng-add/index.mjs +1 -1
  319. package/schematics/ng-generate/address-form/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +2 -2
  320. package/schematics/ng-generate/dashboard/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +1 -1
  321. package/schematics/ng-generate/navigation/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +1 -1
  322. package/schematics/ng-generate/theme-color/index_bundled.js +2 -2
  323. package/schematics/ng-generate/theme-color/schema.json +10 -0
  324. package/schematics/ng-generate/tree/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +2 -2
  325. package/schematics/ng-update/index_bundled.js +31 -31
  326. package/select/_select-theme.scss +6 -6
  327. package/select/index.d.ts +25 -505
  328. package/select/testing/index.d.ts +5 -67
  329. package/select-harness.d-7441a7ac.d.ts +63 -0
  330. package/sidenav/_sidenav-theme.scss +2 -2
  331. package/sidenav/index.d.ts +49 -92
  332. package/sidenav/testing/index.d.ts +58 -63
  333. package/slide-toggle/_slide-toggle-theme.scss +10 -10
  334. package/slide-toggle/index.d.ts +39 -110
  335. package/slide-toggle/testing/index.d.ts +17 -21
  336. package/slider/_slider-theme.scss +10 -10
  337. package/slider/index.d.ts +281 -328
  338. package/slider/testing/index.d.ts +42 -47
  339. package/snack-bar/_snack-bar-theme.scss +4 -4
  340. package/snack-bar/index.d.ts +152 -185
  341. package/snack-bar/testing/index.d.ts +7 -9
  342. package/sort/_sort-theme.scss +3 -3
  343. package/sort/index.d.ts +61 -169
  344. package/sort/testing/index.d.ts +22 -25
  345. package/sort-direction.d-f4ce4649.d.ts +3 -0
  346. package/sort.d-c2b79a45.d.ts +87 -0
  347. package/stepper/_stepper-theme.scss +5 -5
  348. package/stepper/index.d.ts +115 -167
  349. package/stepper/testing/index.d.ts +43 -52
  350. package/table/_table-theme.scss +4 -4
  351. package/table/index.d.ts +97 -156
  352. package/table/testing/index.d.ts +64 -78
  353. package/tabs/_tabs-theme.scss +16 -16
  354. package/tabs/index.d.ts +309 -383
  355. package/tabs/testing/index.d.ts +67 -76
  356. package/timepicker/_timepicker-theme.scss +4 -4
  357. package/timepicker/index.d.ts +127 -160
  358. package/timepicker/testing/index.d.ts +20 -26
  359. package/toolbar/_toolbar-theme.scss +4 -4
  360. package/toolbar/index.d.ts +15 -26
  361. package/toolbar/testing/index.d.ts +13 -16
  362. package/tooltip/_tooltip-theme.scss +4 -4
  363. package/tooltip/index.d.ts +11 -355
  364. package/tooltip/testing/index.d.ts +7 -10
  365. package/tree/_tree-theme.scss +3 -3
  366. package/tree/index.d.ts +117 -163
  367. package/tree/testing/index.d.ts +52 -58
  368. /package/core/tokens/m3/definitions/{unused/_md-comp-filled-tonal-button.scss → _md-comp-filled-tonal-button.scss} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module-cf951a02.mjs","sources":["../../../../../../src/material/button/button.ts","../../../../../../src/material/button/button.html","../../../../../../src/material/button/fab.ts","../../../../../../src/material/button/module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ChangeDetectionStrategy, Component, Input, ViewEncapsulation} from '@angular/core';\nimport {MatButtonAppearance, MatButtonBase} from './button-base';\n\n/**\n * Classes that need to be set for each appearance of the button.\n * Note that we use a `Map` here to avoid issues with property renaming.\n */\nconst APPEARANCE_CLASSES: Map<MatButtonAppearance, readonly string[]> = new Map([\n ['text', ['mat-mdc-button']],\n ['filled', ['mdc-button--unelevated', 'mat-mdc-unelevated-button']],\n ['elevated', ['mdc-button--raised', 'mat-mdc-raised-button']],\n ['outlined', ['mdc-button--outlined', 'mat-mdc-outlined-button']],\n ['tonal', ['mat-tonal-button']],\n]);\n\n/**\n * Material Design button component. Users interact with a button to perform an action.\n * See https://m3.material.io/components/buttons/overview\n */\n@Component({\n selector: `\n button[matButton], a[matButton], button[mat-button], button[mat-raised-button],\n button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button],\n a[mat-flat-button], a[mat-stroked-button]\n `,\n templateUrl: 'button.html',\n styleUrls: ['button.css', 'button-high-contrast.css'],\n host: {\n 'class': 'mdc-button',\n },\n exportAs: 'matButton, matAnchor',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatButton extends MatButtonBase {\n /** Appearance of the button. */\n @Input('matButton')\n get appearance(): MatButtonAppearance | null {\n return this._appearance;\n }\n set appearance(value: MatButtonAppearance | '') {\n // Allow empty string so users can do `<button matButton></button>`\n // without having to write out `=\"text\"` every time.\n this.setAppearance(value || this._config?.defaultAppearance || 'text');\n }\n private _appearance: MatButtonAppearance | null = null;\n\n constructor(...args: unknown[]);\n\n constructor() {\n super();\n const inferredAppearance = _inferAppearance(this._elementRef.nativeElement);\n\n // Only set the appearance if we managed to infer it from the static attributes, rather than\n // doing something like `setAppearance(inferredAppearance || 'text')`, because doing so can\n // cause the fallback appearance's classes to be set and then immediately replaced when\n // the input value is assigned.\n if (inferredAppearance) {\n this.setAppearance(inferredAppearance);\n }\n }\n\n /** Programmatically sets the appearance of the button. */\n setAppearance(appearance: MatButtonAppearance): void {\n if (appearance === this._appearance) {\n return;\n }\n\n const classList = this._elementRef.nativeElement.classList;\n const previousClasses = this._appearance ? APPEARANCE_CLASSES.get(this._appearance) : null;\n const newClasses = APPEARANCE_CLASSES.get(appearance)!;\n\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && !newClasses) {\n throw new Error(`Unsupported MatButton appearance \"${appearance}\"`);\n }\n\n if (previousClasses) {\n classList.remove(...previousClasses);\n }\n\n classList.add(...newClasses);\n this._appearance = appearance;\n }\n}\n\n/** Infers the button's appearance from its static attributes. */\nfunction _inferAppearance(button: HTMLElement): MatButtonAppearance | null {\n if (button.hasAttribute('mat-raised-button')) {\n return 'elevated';\n }\n\n if (button.hasAttribute('mat-stroked-button')) {\n return 'outlined';\n }\n\n if (button.hasAttribute('mat-flat-button')) {\n return 'filled';\n }\n\n if (button.hasAttribute('mat-button')) {\n return 'text';\n }\n\n return null;\n}\n\n// tslint:disable:variable-name\n/**\n * Material Design button component for anchor elements. Anchor elements are used to provide\n * links for the user to navigate across different routes or pages.\n * See https://m3.material.io/components/buttons/overview\n */\nexport const MatAnchor = MatButton;\nexport type MatAnchor = MatButton;\n// tslint:enable:variable-name\n","<span\n class=\"mat-mdc-button-persistent-ripple\"\n [class.mdc-button__ripple]=\"!_isFab\"\n [class.mdc-fab__ripple]=\"_isFab\"></span>\n\n<ng-content select=\".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])\">\n</ng-content>\n\n<span class=\"mdc-button__label\"><ng-content></ng-content></span>\n\n<ng-content select=\".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]\">\n</ng-content>\n\n<!--\n The indicator can't be directly on the button, because MDC uses ::before for high contrast\n indication and it can't be on the ripple, because it has a border radius and overflow: hidden.\n-->\n<span class=\"mat-focus-indicator\"></span>\n\n<span class=\"mat-mdc-button-touch-target\"></span>\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n ChangeDetectionStrategy,\n Component,\n InjectionToken,\n Input,\n ViewEncapsulation,\n booleanAttribute,\n inject,\n} from '@angular/core';\n\nimport {MatButtonBase} from './button-base';\nimport {ThemePalette} from '../core';\n\n/** Default FAB options that can be overridden. */\nexport interface MatFabDefaultOptions {\n /**\n * Default theme color of the button. This API is supported in M2 themes\n * only, it has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/button/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants.\n */\n color?: ThemePalette;\n}\n\n/** Injection token to be used to override the default options for FAB. */\nexport const MAT_FAB_DEFAULT_OPTIONS = new InjectionToken<MatFabDefaultOptions>(\n 'mat-mdc-fab-default-options',\n {\n providedIn: 'root',\n factory: MAT_FAB_DEFAULT_OPTIONS_FACTORY,\n },\n);\n\n/**\n * @docs-private\n * @deprecated No longer used, will be removed.\n * @breaking-change 21.0.0\n */\nexport function MAT_FAB_DEFAULT_OPTIONS_FACTORY(): MatFabDefaultOptions {\n return {\n // The FAB by default has its color set to accent.\n color: 'accent',\n };\n}\n\n// Default FAB configuration.\nconst defaults = MAT_FAB_DEFAULT_OPTIONS_FACTORY();\n\n/**\n * Material Design floating action button (FAB) component. These buttons represent the primary\n * or most common action for users to interact with.\n * See https://m3.material.io/components/floating-action-button/overview\n *\n * The `MatFabButton` class has two appearances: normal and extended.\n */\n@Component({\n selector: `button[mat-fab], a[mat-fab], button[matFab], a[matFab]`,\n templateUrl: 'button.html',\n styleUrl: 'fab.css',\n host: {\n 'class': 'mdc-fab mat-mdc-fab-base mat-mdc-fab',\n '[class.mdc-fab--extended]': 'extended',\n '[class.mat-mdc-extended-fab]': 'extended',\n },\n exportAs: 'matButton, matAnchor',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatFabButton extends MatButtonBase {\n private _options = inject<MatFabDefaultOptions>(MAT_FAB_DEFAULT_OPTIONS, {optional: true});\n\n override _isFab = true;\n\n @Input({transform: booleanAttribute}) extended: boolean;\n\n constructor(...args: unknown[]);\n\n constructor() {\n super();\n this._options = this._options || defaults;\n this.color = this._options!.color || defaults.color;\n }\n}\n\n/**\n * Material Design mini floating action button (FAB) component. These buttons represent the primary\n * or most common action for users to interact with.\n * See https://m3.material.io/components/floating-action-button/overview\n */\n@Component({\n selector: `button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]`,\n templateUrl: 'button.html',\n styleUrl: 'fab.css',\n host: {\n 'class': 'mdc-fab mat-mdc-fab-base mdc-fab--mini mat-mdc-mini-fab',\n },\n exportAs: 'matButton, matAnchor',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatMiniFabButton extends MatButtonBase {\n private _options = inject<MatFabDefaultOptions>(MAT_FAB_DEFAULT_OPTIONS, {optional: true});\n\n override _isFab = true;\n\n constructor(...args: unknown[]);\n\n constructor() {\n super();\n this._options = this._options || defaults;\n this.color = this._options!.color || defaults.color;\n }\n}\n\n// tslint:disable:variable-name\n/**\n * Material Design floating action button (FAB) component for anchor elements. Anchor elements\n * are used to provide links for the user to navigate across different routes or pages.\n * See https://m3.material.io/components/floating-action-button/overview\n *\n * The `MatFabAnchor` class has two appearances: normal and extended.\n */\nexport const MatFabAnchor = MatFabButton;\nexport type MatFabAnchor = MatFabButton;\n\n/**\n * Material Design mini floating action button (FAB) component for anchor elements. Anchor elements\n * are used to provide links for the user to navigate across different routes or pages.\n * See https://m3.material.io/components/floating-action-button/overview\n */\nexport const MatMiniFabAnchor = MatMiniFabButton;\nexport type MatMiniFabAnchor = MatMiniFabButton;\n// tslint:enable:variable-name\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule, MatRippleModule} from '../core';\nimport {MatButton} from './button';\nimport {MatFabButton, MatMiniFabButton} from './fab';\nimport {MatIconButton} from './icon-button';\n\n@NgModule({\n imports: [\n MatCommonModule,\n MatRippleModule,\n MatButton,\n MatMiniFabButton,\n MatIconButton,\n MatFabButton,\n ],\n exports: [MatCommonModule, MatButton, MatMiniFabButton, MatIconButton, MatFabButton],\n})\nexport class MatButtonModule {}\n"],"names":[],"mappings":";;;;;;AAWA;;;AAGG;AACH,MAAM,kBAAkB,GAAgD,IAAI,GAAG,CAAC;AAC9E,IAAA,CAAC,MAAM,EAAE,CAAC,gBAAgB,CAAC,CAAC;AAC5B,IAAA,CAAC,QAAQ,EAAE,CAAC,wBAAwB,EAAE,2BAA2B,CAAC,CAAC;AACnE,IAAA,CAAC,UAAU,EAAE,CAAC,oBAAoB,EAAE,uBAAuB,CAAC,CAAC;AAC7D,IAAA,CAAC,UAAU,EAAE,CAAC,sBAAsB,EAAE,yBAAyB,CAAC,CAAC;AACjE,IAAA,CAAC,OAAO,EAAE,CAAC,kBAAkB,CAAC,CAAC;AAChC,CAAA,CAAC,CAAA;AAEF;;;AAGG;AAgBG,MAAO,SAAU,SAAQ,aAAa,CAAA;;AAE1C,IAAA,IACI,UAAU,GAAA;QACZ,OAAO,IAAI,CAAC,WAAW,CAAA;KACzB;IACA,IAAI,UAAU,CAAC,KAA+B,EAAA;;;AAG5C,QAAA,IAAI,CAAC,aAAa,CAAC,KAAK,IAAI,IAAI,CAAC,OAAO,EAAE,iBAAiB,IAAI,MAAM,CAAC,CAAA;KACxE;IACQ,WAAW,GAA+B,IAAI,CAAA;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AA,CAAA,CAAA;;kGAEd,eAAe,EAAA,UAAA,EAAA,CAAA;kBAX3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,eAAe;wBACf,eAAe;wBACf,SAAS;wBACT,gBAAgB;wBAChB,aAAa;wBACb,YAAY;AACb,qBAAA;oBACD,OAAO,EAAE,CAAC,eAAe,EAAE,SAAS,EAAE,gBAAgB,EAAE,aAAa,EAAE,YAAY,CAAC;AACrF,iBAAA,CAAA;;;;;"}
@@ -0,0 +1,38 @@
1
+ import { ObserversModule } from '@angular/cdk/observers';
2
+ import * as i0 from '@angular/core';
3
+ import { NgModule } from '@angular/core';
4
+ import { k as MatFormField, b as MatLabel, d as MatError, e as MatHint, g as MatPrefix, i as MatSuffix } from './form-field-6d755764.mjs';
5
+ import { M as MatCommonModule } from './common-module-2d64df09.mjs';
6
+
7
+ class MatFormFieldModule {
8
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: MatFormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
9
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.0-next.1", ngImport: i0, type: MatFormFieldModule, imports: [MatCommonModule,
10
+ ObserversModule,
11
+ MatFormField,
12
+ MatLabel,
13
+ MatError,
14
+ MatHint,
15
+ MatPrefix,
16
+ MatSuffix], exports: [MatFormField, MatLabel, MatHint, MatError, MatPrefix, MatSuffix, MatCommonModule] });
17
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: MatFormFieldModule, imports: [MatCommonModule,
18
+ ObserversModule, MatCommonModule] });
19
+ }
20
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: MatFormFieldModule, decorators: [{
21
+ type: NgModule,
22
+ args: [{
23
+ imports: [
24
+ MatCommonModule,
25
+ ObserversModule,
26
+ MatFormField,
27
+ MatLabel,
28
+ MatError,
29
+ MatHint,
30
+ MatPrefix,
31
+ MatSuffix,
32
+ ],
33
+ exports: [MatFormField, MatLabel, MatHint, MatError, MatPrefix, MatSuffix, MatCommonModule],
34
+ }]
35
+ }] });
36
+
37
+ export { MatFormFieldModule as M };
38
+ //# sourceMappingURL=module-d757bba0.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module-d757bba0.mjs","sources":["../../../../../../src/material/form-field/module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ObserversModule} from '@angular/cdk/observers';\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule} from '../core';\nimport {MatError} from './directives/error';\nimport {MatHint} from './directives/hint';\nimport {MatLabel} from './directives/label';\nimport {MatPrefix} from './directives/prefix';\nimport {MatSuffix} from './directives/suffix';\nimport {MatFormField} from './form-field';\n\n@NgModule({\n imports: [\n MatCommonModule,\n ObserversModule,\n MatFormField,\n MatLabel,\n MatError,\n MatHint,\n MatPrefix,\n MatSuffix,\n ],\n exports: [MatFormField, MatLabel, MatHint, MatError, MatPrefix, MatSuffix, MatCommonModule],\n})\nexport class MatFormFieldModule {}\n"],"names":[],"mappings":";;;;;;MA+Ba,kBAAkB,CAAA;8GAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAlB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAX3B,eAAe;YACf,eAAe;YACf,YAAY;YACZ,QAAQ;YACR,QAAQ;YACR,OAAO;YACP,SAAS;AACT,YAAA,SAAS,CAED,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA;AAE/E,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAX3B,eAAe;AACf,YAAA,eAAe,EAQ0D,eAAe,CAAA,EAAA,CAAA,CAAA;;kGAE/E,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAb9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,eAAe;wBACf,eAAe;wBACf,YAAY;wBACZ,QAAQ;wBACR,QAAQ;wBACR,OAAO;wBACP,SAAS;wBACT,SAAS;AACV,qBAAA;AACD,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,eAAe,CAAC;AAC5F,iBAAA,CAAA;;;;;"}
@@ -0,0 +1,36 @@
1
+ import { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
2
+ import { M as MatOptionHarness } from './option-harness-3b7c1106.mjs';
3
+
4
+ /** Harness for interacting with a `mat-optgroup` in tests. */
5
+ class MatOptgroupHarness extends ComponentHarness {
6
+ /** Selector used to locate option group instances. */
7
+ static hostSelector = '.mat-mdc-optgroup';
8
+ _label = this.locatorFor('.mat-mdc-optgroup-label');
9
+ /**
10
+ * Gets a `HarnessPredicate` that can be used to search for a option group with specific
11
+ * attributes.
12
+ * @param options Options for filtering which option instances are considered a match.
13
+ * @return a `HarnessPredicate` configured with the given options.
14
+ */
15
+ static with(options = {}) {
16
+ return new HarnessPredicate(this, options).addOption('labelText', options.labelText, async (harness, title) => HarnessPredicate.stringMatches(await harness.getLabelText(), title));
17
+ }
18
+ /** Gets the option group's label text. */
19
+ async getLabelText() {
20
+ return (await this._label()).text();
21
+ }
22
+ /** Gets whether the option group is disabled. */
23
+ async isDisabled() {
24
+ return (await (await this.host()).getAttribute('aria-disabled')) === 'true';
25
+ }
26
+ /**
27
+ * Gets the options that are inside the group.
28
+ * @param filter Optionally filters which options are included.
29
+ */
30
+ async getOptions(filter = {}) {
31
+ return this.locatorForAll(MatOptionHarness.with(filter))();
32
+ }
33
+ }
34
+
35
+ export { MatOptgroupHarness as M };
36
+ //# sourceMappingURL=optgroup-harness-5e66b138.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"optgroup-harness-5e66b138.mjs","sources":["../../../../../../src/material/core/testing/optgroup-harness.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n ComponentHarness,\n ComponentHarnessConstructor,\n HarnessPredicate,\n} from '@angular/cdk/testing';\nimport {OptgroupHarnessFilters} from './optgroup-harness-filters';\nimport {MatOptionHarness} from './option-harness';\nimport {OptionHarnessFilters} from './option-harness-filters';\n\n/** Harness for interacting with a `mat-optgroup` in tests. */\nexport class MatOptgroupHarness extends ComponentHarness {\n /** Selector used to locate option group instances. */\n static hostSelector = '.mat-mdc-optgroup';\n private _label = this.locatorFor('.mat-mdc-optgroup-label');\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a option group with specific\n * attributes.\n * @param options Options for filtering which option instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with<T extends MatOptgroupHarness>(\n this: ComponentHarnessConstructor<T>,\n options: OptgroupHarnessFilters = {},\n ): HarnessPredicate<T> {\n return new HarnessPredicate(this, options).addOption(\n 'labelText',\n options.labelText,\n async (harness, title) => HarnessPredicate.stringMatches(await harness.getLabelText(), title),\n );\n }\n\n /** Gets the option group's label text. */\n async getLabelText(): Promise<string> {\n return (await this._label()).text();\n }\n\n /** Gets whether the option group is disabled. */\n async isDisabled(): Promise<boolean> {\n return (await (await this.host()).getAttribute('aria-disabled')) === 'true';\n }\n\n /**\n * Gets the options that are inside the group.\n * @param filter Optionally filters which options are included.\n */\n async getOptions(filter: OptionHarnessFilters = {}): Promise<MatOptionHarness[]> {\n return this.locatorForAll(MatOptionHarness.with(filter))();\n }\n}\n"],"names":[],"mappings":";;;AAiBA;AACM,MAAO,kBAAmB,SAAQ,gBAAgB,CAAA;;AAEtD,IAAA,OAAO,YAAY,GAAG,mBAAmB,CAAA;AACjC,IAAA,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,yBAAyB,CAAC,CAAA;AAE3D;;;;;AAKG;AACH,IAAA,OAAO,IAAI,CAET,OAAA,GAAkC,EAAE,EAAA;AAEpC,QAAA,OAAO,IAAI,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,CAClD,WAAW,EACX,OAAO,CAAC,SAAS,EACjB,OAAO,OAAO,EAAE,KAAK,KAAK,gBAAgB,CAAC,aAAa,CAAC,MAAM,OAAO,CAAC,YAAY,EAAE,EAAE,KAAK,CAAC,CAC9F,CAAA;KACH;;AAGA,IAAA,MAAM,YAAY,GAAA;QAChB,OAAO,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,CAAA;KACrC;;AAGA,IAAA,MAAM,UAAU,GAAA;AACd,QAAA,OAAO,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,YAAY,CAAC,eAAe,CAAC,MAAM,MAAM,CAAA;KAC7E;AAEA;;;AAGG;AACH,IAAA,MAAM,UAAU,CAAC,MAAA,GAA+B,EAAE,EAAA;AAChD,QAAA,OAAO,IAAI,CAAC,aAAa,CAAC,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAA;KAC5D;;;;;"}
@@ -0,0 +1,348 @@
1
+ import { _IdGenerator } from '@angular/cdk/a11y';
2
+ import { ENTER, SPACE, hasModifierKey } from '@angular/cdk/keycodes';
3
+ import * as i0 from '@angular/core';
4
+ import { InjectionToken, inject, booleanAttribute, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, ElementRef, ChangeDetectorRef, EventEmitter, isSignal, Output, ViewChild } from '@angular/core';
5
+ import { Subject } from 'rxjs';
6
+ import { M as MatRipple } from './ripple-9939d1f5.mjs';
7
+ import { M as MatPseudoCheckbox } from './pseudo-checkbox-af5a4ea4.mjs';
8
+ import { _ as _StructuralStylesLoader } from './structural-styles-d5ada3b3.mjs';
9
+ import { _CdkPrivateStyleLoader, _VisuallyHiddenLoader } from '@angular/cdk/private';
10
+
11
+ /**
12
+ * Injection token used to provide the parent component to options.
13
+ */
14
+ const MAT_OPTION_PARENT_COMPONENT = new InjectionToken('MAT_OPTION_PARENT_COMPONENT');
15
+
16
+ // Notes on the accessibility pattern used for `mat-optgroup`.
17
+ // The option group has two different "modes": regular and inert. The regular mode uses the
18
+ // recommended a11y pattern which has `role="group"` on the group element with `aria-labelledby`
19
+ // pointing to the label. This works for `mat-select`, but it seems to hit a bug for autocomplete
20
+ // under VoiceOver where the group doesn't get read out at all. The bug appears to be that if
21
+ // there's __any__ a11y-related attribute on the group (e.g. `role` or `aria-labelledby`),
22
+ // VoiceOver on Safari won't read it out.
23
+ // We've introduced the `inert` mode as a workaround. Under this mode, all a11y attributes are
24
+ // removed from the group, and we get the screen reader to read out the group label by mirroring it
25
+ // inside an invisible element in the option. This is sub-optimal, because the screen reader will
26
+ // repeat the group label on each navigation, whereas the default pattern only reads the group when
27
+ // the user enters a new group. The following alternate approaches were considered:
28
+ // 1. Reading out the group label using the `LiveAnnouncer` solves the problem, but we can't control
29
+ // when the text will be read out so sometimes it comes in too late or never if the user
30
+ // navigates quickly.
31
+ // 2. `<mat-option aria-describedby="groupLabel"` - This works on Safari, but VoiceOver in Chrome
32
+ // won't read out the description at all.
33
+ // 3. `<mat-option aria-labelledby="optionLabel groupLabel"` - This works on Chrome, but Safari
34
+ // doesn't read out the text at all. Furthermore, on
35
+ /**
36
+ * Injection token that can be used to reference instances of `MatOptgroup`. It serves as
37
+ * alternative token to the actual `MatOptgroup` class which could cause unnecessary
38
+ * retention of the class and its component metadata.
39
+ */
40
+ const MAT_OPTGROUP = new InjectionToken('MatOptgroup');
41
+ /**
42
+ * Component that is used to group instances of `mat-option`.
43
+ */
44
+ class MatOptgroup {
45
+ /** Label for the option group. */
46
+ label;
47
+ /** whether the option group is disabled. */
48
+ disabled = false;
49
+ /** Unique id for the underlying label. */
50
+ _labelId = inject(_IdGenerator).getId('mat-optgroup-label-');
51
+ /** Whether the group is in inert a11y mode. */
52
+ _inert;
53
+ constructor() {
54
+ const parent = inject(MAT_OPTION_PARENT_COMPONENT, { optional: true });
55
+ this._inert = parent?.inertGroups ?? false;
56
+ }
57
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: MatOptgroup, deps: [], target: i0.ɵɵFactoryTarget.Component });
58
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "20.0.0-next.1", type: MatOptgroup, isStandalone: true, selector: "mat-optgroup", inputs: { label: "label", disabled: ["disabled", "disabled", booleanAttribute] }, host: { properties: { "attr.role": "_inert ? null : \"group\"", "attr.aria-disabled": "_inert ? null : disabled.toString()", "attr.aria-labelledby": "_inert ? null : _labelId" }, classAttribute: "mat-mdc-optgroup" }, providers: [{ provide: MAT_OPTGROUP, useExisting: MatOptgroup }], exportAs: ["matOptgroup"], ngImport: i0, template: "<span\n class=\"mat-mdc-optgroup-label\"\n role=\"presentation\"\n [class.mdc-list-item--disabled]=\"disabled\"\n [id]=\"_labelId\">\n <span class=\"mdc-list-item__primary-text\">{{ label }} <ng-content></ng-content></span>\n</span>\n\n<ng-content select=\"mat-option, ng-container\"></ng-content>\n", styles: [".mat-mdc-optgroup{color:var(--mat-optgroup-label-text-color, var(--mat-sys-on-surface-variant));font-family:var(--mat-optgroup-label-text-font, var(--mat-sys-title-small-font));line-height:var(--mat-optgroup-label-text-line-height, var(--mat-sys-title-small-line-height));font-size:var(--mat-optgroup-label-text-size, var(--mat-sys-title-small-size));letter-spacing:var(--mat-optgroup-label-text-tracking, var(--mat-sys-title-small-tracking));font-weight:var(--mat-optgroup-label-text-weight, var(--mat-sys-title-small-weight))}.mat-mdc-optgroup-label{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;min-height:48px;padding:0 16px;outline:none}.mat-mdc-optgroup-label.mdc-list-item--disabled{opacity:.38}.mat-mdc-optgroup-label .mdc-list-item__primary-text{font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;white-space:normal;color:inherit}"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
59
+ }
60
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: MatOptgroup, decorators: [{
61
+ type: Component,
62
+ args: [{ selector: 'mat-optgroup', exportAs: 'matOptgroup', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
63
+ 'class': 'mat-mdc-optgroup',
64
+ '[attr.role]': '_inert ? null : "group"',
65
+ '[attr.aria-disabled]': '_inert ? null : disabled.toString()',
66
+ '[attr.aria-labelledby]': '_inert ? null : _labelId',
67
+ }, providers: [{ provide: MAT_OPTGROUP, useExisting: MatOptgroup }], template: "<span\n class=\"mat-mdc-optgroup-label\"\n role=\"presentation\"\n [class.mdc-list-item--disabled]=\"disabled\"\n [id]=\"_labelId\">\n <span class=\"mdc-list-item__primary-text\">{{ label }} <ng-content></ng-content></span>\n</span>\n\n<ng-content select=\"mat-option, ng-container\"></ng-content>\n", styles: [".mat-mdc-optgroup{color:var(--mat-optgroup-label-text-color, var(--mat-sys-on-surface-variant));font-family:var(--mat-optgroup-label-text-font, var(--mat-sys-title-small-font));line-height:var(--mat-optgroup-label-text-line-height, var(--mat-sys-title-small-line-height));font-size:var(--mat-optgroup-label-text-size, var(--mat-sys-title-small-size));letter-spacing:var(--mat-optgroup-label-text-tracking, var(--mat-sys-title-small-tracking));font-weight:var(--mat-optgroup-label-text-weight, var(--mat-sys-title-small-weight))}.mat-mdc-optgroup-label{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;min-height:48px;padding:0 16px;outline:none}.mat-mdc-optgroup-label.mdc-list-item--disabled{opacity:.38}.mat-mdc-optgroup-label .mdc-list-item__primary-text{font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;white-space:normal;color:inherit}"] }]
68
+ }], ctorParameters: () => [], propDecorators: { label: [{
69
+ type: Input
70
+ }], disabled: [{
71
+ type: Input,
72
+ args: [{ transform: booleanAttribute }]
73
+ }] } });
74
+
75
+ /** Event object emitted by MatOption when selected or deselected. */
76
+ class MatOptionSelectionChange {
77
+ source;
78
+ isUserInput;
79
+ constructor(
80
+ /** Reference to the option that emitted the event. */
81
+ source,
82
+ /** Whether the change in the option's value was a result of a user action. */
83
+ isUserInput = false) {
84
+ this.source = source;
85
+ this.isUserInput = isUserInput;
86
+ }
87
+ }
88
+ /**
89
+ * Single option inside of a `<mat-select>` element.
90
+ */
91
+ class MatOption {
92
+ _element = inject(ElementRef);
93
+ _changeDetectorRef = inject(ChangeDetectorRef);
94
+ _parent = inject(MAT_OPTION_PARENT_COMPONENT, { optional: true });
95
+ group = inject(MAT_OPTGROUP, { optional: true });
96
+ _signalDisableRipple = false;
97
+ _selected = false;
98
+ _active = false;
99
+ _disabled = false;
100
+ _mostRecentViewValue = '';
101
+ /** Whether the wrapping component is in multiple selection mode. */
102
+ get multiple() {
103
+ return this._parent && this._parent.multiple;
104
+ }
105
+ /** Whether or not the option is currently selected. */
106
+ get selected() {
107
+ return this._selected;
108
+ }
109
+ /** The form value of the option. */
110
+ value;
111
+ /** The unique ID of the option. */
112
+ id = inject(_IdGenerator).getId('mat-option-');
113
+ /** Whether the option is disabled. */
114
+ get disabled() {
115
+ return (this.group && this.group.disabled) || this._disabled;
116
+ }
117
+ set disabled(value) {
118
+ this._disabled = value;
119
+ }
120
+ /** Whether ripples for the option are disabled. */
121
+ get disableRipple() {
122
+ return this._signalDisableRipple
123
+ ? this._parent.disableRipple()
124
+ : !!this._parent?.disableRipple;
125
+ }
126
+ /** Whether to display checkmark for single-selection. */
127
+ get hideSingleSelectionIndicator() {
128
+ return !!(this._parent && this._parent.hideSingleSelectionIndicator);
129
+ }
130
+ /** Event emitted when the option is selected or deselected. */
131
+ // tslint:disable-next-line:no-output-on-prefix
132
+ onSelectionChange = new EventEmitter();
133
+ /** Element containing the option's text. */
134
+ _text;
135
+ /** Emits when the state of the option changes and any parents have to be notified. */
136
+ _stateChanges = new Subject();
137
+ constructor() {
138
+ const styleLoader = inject(_CdkPrivateStyleLoader);
139
+ styleLoader.load(_StructuralStylesLoader);
140
+ styleLoader.load(_VisuallyHiddenLoader);
141
+ this._signalDisableRipple = !!this._parent && isSignal(this._parent.disableRipple);
142
+ }
143
+ /**
144
+ * Whether or not the option is currently active and ready to be selected.
145
+ * An active option displays styles as if it is focused, but the
146
+ * focus is actually retained somewhere else. This comes in handy
147
+ * for components like autocomplete where focus must remain on the input.
148
+ */
149
+ get active() {
150
+ return this._active;
151
+ }
152
+ /**
153
+ * The displayed value of the option. It is necessary to show the selected option in the
154
+ * select's trigger.
155
+ */
156
+ get viewValue() {
157
+ // TODO(kara): Add input property alternative for node envs.
158
+ return (this._text?.nativeElement.textContent || '').trim();
159
+ }
160
+ /** Selects the option. */
161
+ select(emitEvent = true) {
162
+ if (!this._selected) {
163
+ this._selected = true;
164
+ this._changeDetectorRef.markForCheck();
165
+ if (emitEvent) {
166
+ this._emitSelectionChangeEvent();
167
+ }
168
+ }
169
+ }
170
+ /** Deselects the option. */
171
+ deselect(emitEvent = true) {
172
+ if (this._selected) {
173
+ this._selected = false;
174
+ this._changeDetectorRef.markForCheck();
175
+ if (emitEvent) {
176
+ this._emitSelectionChangeEvent();
177
+ }
178
+ }
179
+ }
180
+ /** Sets focus onto this option. */
181
+ focus(_origin, options) {
182
+ // Note that we aren't using `_origin`, but we need to keep it because some internal consumers
183
+ // use `MatOption` in a `FocusKeyManager` and we need it to match `FocusableOption`.
184
+ const element = this._getHostElement();
185
+ if (typeof element.focus === 'function') {
186
+ element.focus(options);
187
+ }
188
+ }
189
+ /**
190
+ * This method sets display styles on the option to make it appear
191
+ * active. This is used by the ActiveDescendantKeyManager so key
192
+ * events will display the proper options as active on arrow key events.
193
+ */
194
+ setActiveStyles() {
195
+ if (!this._active) {
196
+ this._active = true;
197
+ this._changeDetectorRef.markForCheck();
198
+ }
199
+ }
200
+ /**
201
+ * This method removes display styles on the option that made it appear
202
+ * active. This is used by the ActiveDescendantKeyManager so key
203
+ * events will display the proper options as active on arrow key events.
204
+ */
205
+ setInactiveStyles() {
206
+ if (this._active) {
207
+ this._active = false;
208
+ this._changeDetectorRef.markForCheck();
209
+ }
210
+ }
211
+ /** Gets the label to be used when determining whether the option should be focused. */
212
+ getLabel() {
213
+ return this.viewValue;
214
+ }
215
+ /** Ensures the option is selected when activated from the keyboard. */
216
+ _handleKeydown(event) {
217
+ if ((event.keyCode === ENTER || event.keyCode === SPACE) && !hasModifierKey(event)) {
218
+ this._selectViaInteraction();
219
+ // Prevent the page from scrolling down and form submits.
220
+ event.preventDefault();
221
+ }
222
+ }
223
+ /**
224
+ * `Selects the option while indicating the selection came from the user. Used to
225
+ * determine if the select's view -> model callback should be invoked.`
226
+ */
227
+ _selectViaInteraction() {
228
+ if (!this.disabled) {
229
+ this._selected = this.multiple ? !this._selected : true;
230
+ this._changeDetectorRef.markForCheck();
231
+ this._emitSelectionChangeEvent(true);
232
+ }
233
+ }
234
+ /** Returns the correct tabindex for the option depending on disabled state. */
235
+ // This method is only used by `MatLegacyOption`. Keeping it here to avoid breaking the types.
236
+ // That's because `MatLegacyOption` use `MatOption` type in a few places such as
237
+ // `MatOptionSelectionChange`. It is safe to delete this when `MatLegacyOption` is deleted.
238
+ _getTabIndex() {
239
+ return this.disabled ? '-1' : '0';
240
+ }
241
+ /** Gets the host DOM element. */
242
+ _getHostElement() {
243
+ return this._element.nativeElement;
244
+ }
245
+ ngAfterViewChecked() {
246
+ // Since parent components could be using the option's label to display the selected values
247
+ // (e.g. `mat-select`) and they don't have a way of knowing if the option's label has changed
248
+ // we have to check for changes in the DOM ourselves and dispatch an event. These checks are
249
+ // relatively cheap, however we still limit them only to selected options in order to avoid
250
+ // hitting the DOM too often.
251
+ if (this._selected) {
252
+ const viewValue = this.viewValue;
253
+ if (viewValue !== this._mostRecentViewValue) {
254
+ if (this._mostRecentViewValue) {
255
+ this._stateChanges.next();
256
+ }
257
+ this._mostRecentViewValue = viewValue;
258
+ }
259
+ }
260
+ }
261
+ ngOnDestroy() {
262
+ this._stateChanges.complete();
263
+ }
264
+ /** Emits the selection change event. */
265
+ _emitSelectionChangeEvent(isUserInput = false) {
266
+ this.onSelectionChange.emit(new MatOptionSelectionChange(this, isUserInput));
267
+ }
268
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: MatOption, deps: [], target: i0.ɵɵFactoryTarget.Component });
269
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0-next.1", type: MatOption, isStandalone: true, selector: "mat-option", inputs: { value: "value", id: "id", disabled: ["disabled", "disabled", booleanAttribute] }, outputs: { onSelectionChange: "onSelectionChange" }, host: { attributes: { "role": "option" }, listeners: { "click": "_selectViaInteraction()", "keydown": "_handleKeydown($event)" }, properties: { "class.mdc-list-item--selected": "selected", "class.mat-mdc-option-multiple": "multiple", "class.mat-mdc-option-active": "active", "class.mdc-list-item--disabled": "disabled", "id": "id", "attr.aria-selected": "selected", "attr.aria-disabled": "disabled.toString()" }, classAttribute: "mat-mdc-option mdc-list-item" }, viewQueries: [{ propertyName: "_text", first: true, predicate: ["text"], descendants: true, static: true }], exportAs: ["matOption"], ngImport: i0, template: "<!-- Set aria-hidden=\"true\" to this DOM node and other decorative nodes in this file. This might\n be contributing to issue where sometimes VoiceOver focuses on a TextNode in the a11y tree instead\n of the Option node (#23202). Most assistive technology will generally ignore non-role,\n non-text-content elements. Adding aria-hidden seems to make VoiceOver behave more consistently. -->\n@if (multiple) {\n <mat-pseudo-checkbox\n class=\"mat-mdc-option-pseudo-checkbox\"\n [disabled]=\"disabled\"\n [state]=\"selected ? 'checked' : 'unchecked'\"\n aria-hidden=\"true\"></mat-pseudo-checkbox>\n}\n\n<ng-content select=\"mat-icon\"></ng-content>\n\n<span class=\"mdc-list-item__primary-text\" #text><ng-content></ng-content></span>\n\n<!-- Render checkmark at the end for single-selection. -->\n@if (!multiple && selected && !hideSingleSelectionIndicator) {\n <mat-pseudo-checkbox\n class=\"mat-mdc-option-pseudo-checkbox\"\n [disabled]=\"disabled\"\n state=\"checked\"\n aria-hidden=\"true\"\n appearance=\"minimal\"></mat-pseudo-checkbox>\n}\n\n<!-- See a11y notes inside optgroup.ts for context behind this element. -->\n@if (group && group._inert) {\n <span class=\"cdk-visually-hidden\">({{ group.label }})</span>\n}\n\n<div class=\"mat-mdc-option-ripple mat-focus-indicator\" aria-hidden=\"true\" mat-ripple\n [matRippleTrigger]=\"_getHostElement()\" [matRippleDisabled]=\"disabled || disableRipple\">\n</div>\n", styles: [".mat-mdc-option{-webkit-user-select:none;user-select:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;min-height:48px;padding:0 16px;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--mat-option-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-option-label-text-font, var(--mat-sys-label-large-font));line-height:var(--mat-option-label-text-line-height, var(--mat-sys-label-large-line-height));font-size:var(--mat-option-label-text-size, var(--mat-sys-body-large-size));letter-spacing:var(--mat-option-label-text-tracking, var(--mat-sys-label-large-tracking));font-weight:var(--mat-option-label-text-weight, var(--mat-sys-body-large-weight))}.mat-mdc-option:hover:not(.mdc-list-item--disabled){background-color:var(--mat-option-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}.mat-mdc-option:focus.mdc-list-item,.mat-mdc-option.mat-mdc-option-active.mdc-list-item{background-color:var(--mat-option-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent));outline:0}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-multiple){background-color:var(--mat-option-selected-state-layer-color, var(--mat-sys-secondary-container))}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-multiple) .mdc-list-item__primary-text{color:var(--mat-option-selected-state-label-text-color, var(--mat-sys-on-secondary-container))}.mat-mdc-option .mat-pseudo-checkbox{--mat-minimal-pseudo-checkbox-selected-checkmark-color: var(--mat-option-selected-state-label-text-color, var(--mat-sys-on-secondary-container))}.mat-mdc-option.mdc-list-item{align-items:center;background:rgba(0,0,0,0)}.mat-mdc-option.mdc-list-item--disabled{cursor:default;pointer-events:none}.mat-mdc-option.mdc-list-item--disabled .mat-mdc-option-pseudo-checkbox,.mat-mdc-option.mdc-list-item--disabled .mdc-list-item__primary-text,.mat-mdc-option.mdc-list-item--disabled>mat-icon{opacity:.38}.mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:32px}[dir=rtl] .mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:16px;padding-right:32px}.mat-mdc-option .mat-icon,.mat-mdc-option .mat-pseudo-checkbox-full{margin-right:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-icon,[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:0;margin-left:16px}.mat-mdc-option .mat-pseudo-checkbox-minimal{margin-left:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-minimal{margin-right:16px;margin-left:0}.mat-mdc-option .mat-mdc-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-option .mdc-list-item__primary-text{white-space:normal;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;margin-right:auto}[dir=rtl] .mat-mdc-option .mdc-list-item__primary-text{margin-right:0;margin-left:auto}@media(forced-colors: active){.mat-mdc-option.mdc-list-item--selected:not(:has(.mat-mdc-option-pseudo-checkbox))::after{content:\"\";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .mat-mdc-option.mdc-list-item--selected:not(:has(.mat-mdc-option-pseudo-checkbox))::after{right:auto;left:16px}}.mat-mdc-option-multiple{--mdc-list-list-item-selected-container-color:var(--mdc-list-list-item-container-color, transparent)}.mat-mdc-option-active .mat-focus-indicator::before{content:\"\"}"], dependencies: [{ kind: "component", type: MatPseudoCheckbox, selector: "mat-pseudo-checkbox", inputs: ["state", "disabled", "appearance"] }, { kind: "directive", type: MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
270
+ }
271
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.1", ngImport: i0, type: MatOption, decorators: [{
272
+ type: Component,
273
+ args: [{ selector: 'mat-option', exportAs: 'matOption', host: {
274
+ 'role': 'option',
275
+ '[class.mdc-list-item--selected]': 'selected',
276
+ '[class.mat-mdc-option-multiple]': 'multiple',
277
+ '[class.mat-mdc-option-active]': 'active',
278
+ '[class.mdc-list-item--disabled]': 'disabled',
279
+ '[id]': 'id',
280
+ // Set aria-selected to false for non-selected items and true for selected items. Conform to
281
+ // [WAI ARIA Listbox authoring practices guide](
282
+ // https://www.w3.org/WAI/ARIA/apg/patterns/listbox/), "If any options are selected, each
283
+ // selected option has either aria-selected or aria-checked set to true. All options that are
284
+ // selectable but not selected have either aria-selected or aria-checked set to false." Align
285
+ // aria-selected implementation of Chips and List components.
286
+ //
287
+ // Set `aria-selected="false"` on not-selected listbox options to fix VoiceOver announcing
288
+ // every option as "selected" (#21491).
289
+ '[attr.aria-selected]': 'selected',
290
+ '[attr.aria-disabled]': 'disabled.toString()',
291
+ '(click)': '_selectViaInteraction()',
292
+ '(keydown)': '_handleKeydown($event)',
293
+ 'class': 'mat-mdc-option mdc-list-item',
294
+ }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatPseudoCheckbox, MatRipple], template: "<!-- Set aria-hidden=\"true\" to this DOM node and other decorative nodes in this file. This might\n be contributing to issue where sometimes VoiceOver focuses on a TextNode in the a11y tree instead\n of the Option node (#23202). Most assistive technology will generally ignore non-role,\n non-text-content elements. Adding aria-hidden seems to make VoiceOver behave more consistently. -->\n@if (multiple) {\n <mat-pseudo-checkbox\n class=\"mat-mdc-option-pseudo-checkbox\"\n [disabled]=\"disabled\"\n [state]=\"selected ? 'checked' : 'unchecked'\"\n aria-hidden=\"true\"></mat-pseudo-checkbox>\n}\n\n<ng-content select=\"mat-icon\"></ng-content>\n\n<span class=\"mdc-list-item__primary-text\" #text><ng-content></ng-content></span>\n\n<!-- Render checkmark at the end for single-selection. -->\n@if (!multiple && selected && !hideSingleSelectionIndicator) {\n <mat-pseudo-checkbox\n class=\"mat-mdc-option-pseudo-checkbox\"\n [disabled]=\"disabled\"\n state=\"checked\"\n aria-hidden=\"true\"\n appearance=\"minimal\"></mat-pseudo-checkbox>\n}\n\n<!-- See a11y notes inside optgroup.ts for context behind this element. -->\n@if (group && group._inert) {\n <span class=\"cdk-visually-hidden\">({{ group.label }})</span>\n}\n\n<div class=\"mat-mdc-option-ripple mat-focus-indicator\" aria-hidden=\"true\" mat-ripple\n [matRippleTrigger]=\"_getHostElement()\" [matRippleDisabled]=\"disabled || disableRipple\">\n</div>\n", styles: [".mat-mdc-option{-webkit-user-select:none;user-select:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;min-height:48px;padding:0 16px;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--mat-option-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-option-label-text-font, var(--mat-sys-label-large-font));line-height:var(--mat-option-label-text-line-height, var(--mat-sys-label-large-line-height));font-size:var(--mat-option-label-text-size, var(--mat-sys-body-large-size));letter-spacing:var(--mat-option-label-text-tracking, var(--mat-sys-label-large-tracking));font-weight:var(--mat-option-label-text-weight, var(--mat-sys-body-large-weight))}.mat-mdc-option:hover:not(.mdc-list-item--disabled){background-color:var(--mat-option-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}.mat-mdc-option:focus.mdc-list-item,.mat-mdc-option.mat-mdc-option-active.mdc-list-item{background-color:var(--mat-option-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent));outline:0}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-multiple){background-color:var(--mat-option-selected-state-layer-color, var(--mat-sys-secondary-container))}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-multiple) .mdc-list-item__primary-text{color:var(--mat-option-selected-state-label-text-color, var(--mat-sys-on-secondary-container))}.mat-mdc-option .mat-pseudo-checkbox{--mat-minimal-pseudo-checkbox-selected-checkmark-color: var(--mat-option-selected-state-label-text-color, var(--mat-sys-on-secondary-container))}.mat-mdc-option.mdc-list-item{align-items:center;background:rgba(0,0,0,0)}.mat-mdc-option.mdc-list-item--disabled{cursor:default;pointer-events:none}.mat-mdc-option.mdc-list-item--disabled .mat-mdc-option-pseudo-checkbox,.mat-mdc-option.mdc-list-item--disabled .mdc-list-item__primary-text,.mat-mdc-option.mdc-list-item--disabled>mat-icon{opacity:.38}.mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:32px}[dir=rtl] .mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:16px;padding-right:32px}.mat-mdc-option .mat-icon,.mat-mdc-option .mat-pseudo-checkbox-full{margin-right:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-icon,[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:0;margin-left:16px}.mat-mdc-option .mat-pseudo-checkbox-minimal{margin-left:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-minimal{margin-right:16px;margin-left:0}.mat-mdc-option .mat-mdc-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-option .mdc-list-item__primary-text{white-space:normal;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;margin-right:auto}[dir=rtl] .mat-mdc-option .mdc-list-item__primary-text{margin-right:0;margin-left:auto}@media(forced-colors: active){.mat-mdc-option.mdc-list-item--selected:not(:has(.mat-mdc-option-pseudo-checkbox))::after{content:\"\";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .mat-mdc-option.mdc-list-item--selected:not(:has(.mat-mdc-option-pseudo-checkbox))::after{right:auto;left:16px}}.mat-mdc-option-multiple{--mdc-list-list-item-selected-container-color:var(--mdc-list-list-item-container-color, transparent)}.mat-mdc-option-active .mat-focus-indicator::before{content:\"\"}"] }]
295
+ }], ctorParameters: () => [], propDecorators: { value: [{
296
+ type: Input
297
+ }], id: [{
298
+ type: Input
299
+ }], disabled: [{
300
+ type: Input,
301
+ args: [{ transform: booleanAttribute }]
302
+ }], onSelectionChange: [{
303
+ type: Output
304
+ }], _text: [{
305
+ type: ViewChild,
306
+ args: ['text', { static: true }]
307
+ }] } });
308
+ /**
309
+ * Counts the amount of option group labels that precede the specified option.
310
+ * @param optionIndex Index of the option at which to start counting.
311
+ * @param options Flat list of all of the options.
312
+ * @param optionGroups Flat list of all of the option groups.
313
+ * @docs-private
314
+ */
315
+ function _countGroupLabelsBeforeOption(optionIndex, options, optionGroups) {
316
+ if (optionGroups.length) {
317
+ let optionsArray = options.toArray();
318
+ let groups = optionGroups.toArray();
319
+ let groupCounter = 0;
320
+ for (let i = 0; i < optionIndex + 1; i++) {
321
+ if (optionsArray[i].group && optionsArray[i].group === groups[groupCounter]) {
322
+ groupCounter++;
323
+ }
324
+ }
325
+ return groupCounter;
326
+ }
327
+ return 0;
328
+ }
329
+ /**
330
+ * Determines the position to which to scroll a panel in order for an option to be into view.
331
+ * @param optionOffset Offset of the option from the top of the panel.
332
+ * @param optionHeight Height of the options.
333
+ * @param currentScrollPosition Current scroll position of the panel.
334
+ * @param panelHeight Height of the panel.
335
+ * @docs-private
336
+ */
337
+ function _getOptionScrollPosition(optionOffset, optionHeight, currentScrollPosition, panelHeight) {
338
+ if (optionOffset < currentScrollPosition) {
339
+ return optionOffset;
340
+ }
341
+ if (optionOffset + optionHeight > currentScrollPosition + panelHeight) {
342
+ return Math.max(0, optionOffset - panelHeight + optionHeight);
343
+ }
344
+ return currentScrollPosition;
345
+ }
346
+
347
+ export { MAT_OPTION_PARENT_COMPONENT as M, _countGroupLabelsBeforeOption as _, MatOption as a, MAT_OPTGROUP as b, MatOptionSelectionChange as c, _getOptionScrollPosition as d, MatOptgroup as e };
348
+ //# sourceMappingURL=option-07c3c660.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"option-07c3c660.mjs","sources":["../../../../../../src/material/core/option/option-parent.ts","../../../../../../src/material/core/option/optgroup.ts","../../../../../../src/material/core/option/optgroup.html","../../../../../../src/material/core/option/option.ts","../../../../../../src/material/core/option/option.html"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {InjectionToken, Signal} from '@angular/core';\n\n/**\n * Describes a parent component that manages a list of options.\n * Contains properties that the options can inherit.\n * @docs-private\n */\nexport interface MatOptionParentComponent {\n disableRipple?: boolean | Signal<boolean>;\n multiple?: boolean;\n inertGroups?: boolean;\n hideSingleSelectionIndicator?: boolean;\n}\n\n/**\n * Injection token used to provide the parent component to options.\n */\nexport const MAT_OPTION_PARENT_COMPONENT = new InjectionToken<MatOptionParentComponent>(\n 'MAT_OPTION_PARENT_COMPONENT',\n);\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n Component,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n Input,\n InjectionToken,\n booleanAttribute,\n inject,\n} from '@angular/core';\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {MatOptionParentComponent, MAT_OPTION_PARENT_COMPONENT} from './option-parent';\n\n// Notes on the accessibility pattern used for `mat-optgroup`.\n// The option group has two different \"modes\": regular and inert. The regular mode uses the\n// recommended a11y pattern which has `role=\"group\"` on the group element with `aria-labelledby`\n// pointing to the label. This works for `mat-select`, but it seems to hit a bug for autocomplete\n// under VoiceOver where the group doesn't get read out at all. The bug appears to be that if\n// there's __any__ a11y-related attribute on the group (e.g. `role` or `aria-labelledby`),\n// VoiceOver on Safari won't read it out.\n// We've introduced the `inert` mode as a workaround. Under this mode, all a11y attributes are\n// removed from the group, and we get the screen reader to read out the group label by mirroring it\n// inside an invisible element in the option. This is sub-optimal, because the screen reader will\n// repeat the group label on each navigation, whereas the default pattern only reads the group when\n// the user enters a new group. The following alternate approaches were considered:\n// 1. Reading out the group label using the `LiveAnnouncer` solves the problem, but we can't control\n// when the text will be read out so sometimes it comes in too late or never if the user\n// navigates quickly.\n// 2. `<mat-option aria-describedby=\"groupLabel\"` - This works on Safari, but VoiceOver in Chrome\n// won't read out the description at all.\n// 3. `<mat-option aria-labelledby=\"optionLabel groupLabel\"` - This works on Chrome, but Safari\n// doesn't read out the text at all. Furthermore, on\n\n/**\n * Injection token that can be used to reference instances of `MatOptgroup`. It serves as\n * alternative token to the actual `MatOptgroup` class which could cause unnecessary\n * retention of the class and its component metadata.\n */\nexport const MAT_OPTGROUP = new InjectionToken<MatOptgroup>('MatOptgroup');\n\n/**\n * Component that is used to group instances of `mat-option`.\n */\n@Component({\n selector: 'mat-optgroup',\n exportAs: 'matOptgroup',\n templateUrl: 'optgroup.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n styleUrl: 'optgroup.css',\n host: {\n 'class': 'mat-mdc-optgroup',\n '[attr.role]': '_inert ? null : \"group\"',\n '[attr.aria-disabled]': '_inert ? null : disabled.toString()',\n '[attr.aria-labelledby]': '_inert ? null : _labelId',\n },\n providers: [{provide: MAT_OPTGROUP, useExisting: MatOptgroup}],\n})\nexport class MatOptgroup {\n /** Label for the option group. */\n @Input() label: string;\n\n /** whether the option group is disabled. */\n @Input({transform: booleanAttribute}) disabled: boolean = false;\n\n /** Unique id for the underlying label. */\n _labelId: string = inject(_IdGenerator).getId('mat-optgroup-label-');\n\n /** Whether the group is in inert a11y mode. */\n _inert: boolean;\n\n constructor(...args: unknown[]);\n\n constructor() {\n const parent = inject<MatOptionParentComponent>(MAT_OPTION_PARENT_COMPONENT, {optional: true});\n this._inert = parent?.inertGroups ?? false;\n }\n}\n","<span\n class=\"mat-mdc-optgroup-label\"\n role=\"presentation\"\n [class.mdc-list-item--disabled]=\"disabled\"\n [id]=\"_labelId\">\n <span class=\"mdc-list-item__primary-text\">{{ label }} <ng-content></ng-content></span>\n</span>\n\n<ng-content select=\"mat-option, ng-container\"></ng-content>\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {_IdGenerator, FocusableOption, FocusOrigin} from '@angular/cdk/a11y';\nimport {ENTER, hasModifierKey, SPACE} from '@angular/cdk/keycodes';\nimport {\n Component,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n ElementRef,\n ChangeDetectorRef,\n AfterViewChecked,\n OnDestroy,\n Input,\n Output,\n EventEmitter,\n QueryList,\n ViewChild,\n booleanAttribute,\n inject,\n isSignal,\n Signal,\n} from '@angular/core';\nimport {Subject} from 'rxjs';\nimport {MAT_OPTGROUP, MatOptgroup} from './optgroup';\nimport {MatOptionParentComponent, MAT_OPTION_PARENT_COMPONENT} from './option-parent';\nimport {MatRipple} from '../ripple/ripple';\nimport {MatPseudoCheckbox} from '../selection/pseudo-checkbox/pseudo-checkbox';\nimport {_StructuralStylesLoader} from '../focus-indicators/structural-styles';\nimport {_CdkPrivateStyleLoader, _VisuallyHiddenLoader} from '@angular/cdk/private';\n\n/** Event object emitted by MatOption when selected or deselected. */\nexport class MatOptionSelectionChange<T = any> {\n constructor(\n /** Reference to the option that emitted the event. */\n public source: MatOption<T>,\n /** Whether the change in the option's value was a result of a user action. */\n public isUserInput = false,\n ) {}\n}\n\n/**\n * Single option inside of a `<mat-select>` element.\n */\n@Component({\n selector: 'mat-option',\n exportAs: 'matOption',\n host: {\n 'role': 'option',\n '[class.mdc-list-item--selected]': 'selected',\n '[class.mat-mdc-option-multiple]': 'multiple',\n '[class.mat-mdc-option-active]': 'active',\n '[class.mdc-list-item--disabled]': 'disabled',\n '[id]': 'id',\n // Set aria-selected to false for non-selected items and true for selected items. Conform to\n // [WAI ARIA Listbox authoring practices guide](\n // https://www.w3.org/WAI/ARIA/apg/patterns/listbox/), \"If any options are selected, each\n // selected option has either aria-selected or aria-checked set to true. All options that are\n // selectable but not selected have either aria-selected or aria-checked set to false.\" Align\n // aria-selected implementation of Chips and List components.\n //\n // Set `aria-selected=\"false\"` on not-selected listbox options to fix VoiceOver announcing\n // every option as \"selected\" (#21491).\n '[attr.aria-selected]': 'selected',\n '[attr.aria-disabled]': 'disabled.toString()',\n '(click)': '_selectViaInteraction()',\n '(keydown)': '_handleKeydown($event)',\n 'class': 'mat-mdc-option mdc-list-item',\n },\n styleUrl: 'option.css',\n templateUrl: 'option.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [MatPseudoCheckbox, MatRipple],\n})\nexport class MatOption<T = any> implements FocusableOption, AfterViewChecked, OnDestroy {\n private _element = inject<ElementRef<HTMLElement>>(ElementRef);\n _changeDetectorRef = inject(ChangeDetectorRef);\n private _parent = inject<MatOptionParentComponent>(MAT_OPTION_PARENT_COMPONENT, {optional: true});\n group = inject<MatOptgroup>(MAT_OPTGROUP, {optional: true});\n\n private _signalDisableRipple = false;\n private _selected = false;\n private _active = false;\n private _disabled = false;\n private _mostRecentViewValue = '';\n\n /** Whether the wrapping component is in multiple selection mode. */\n get multiple() {\n return this._parent && this._parent.multiple;\n }\n\n /** Whether or not the option is currently selected. */\n get selected(): boolean {\n return this._selected;\n }\n\n /** The form value of the option. */\n @Input() value: T;\n\n /** The unique ID of the option. */\n @Input() id: string = inject(_IdGenerator).getId('mat-option-');\n\n /** Whether the option is disabled. */\n @Input({transform: booleanAttribute})\n get disabled(): boolean {\n return (this.group && this.group.disabled) || this._disabled;\n }\n set disabled(value: boolean) {\n this._disabled = value;\n }\n\n /** Whether ripples for the option are disabled. */\n get disableRipple(): boolean {\n return this._signalDisableRipple\n ? (this._parent!.disableRipple as Signal<boolean>)()\n : !!this._parent?.disableRipple;\n }\n\n /** Whether to display checkmark for single-selection. */\n get hideSingleSelectionIndicator(): boolean {\n return !!(this._parent && this._parent.hideSingleSelectionIndicator);\n }\n\n /** Event emitted when the option is selected or deselected. */\n // tslint:disable-next-line:no-output-on-prefix\n @Output() readonly onSelectionChange = new EventEmitter<MatOptionSelectionChange<T>>();\n\n /** Element containing the option's text. */\n @ViewChild('text', {static: true}) _text: ElementRef<HTMLElement> | undefined;\n\n /** Emits when the state of the option changes and any parents have to be notified. */\n readonly _stateChanges = new Subject<void>();\n\n constructor(...args: unknown[]);\n constructor() {\n const styleLoader = inject(_CdkPrivateStyleLoader);\n styleLoader.load(_StructuralStylesLoader);\n styleLoader.load(_VisuallyHiddenLoader);\n this._signalDisableRipple = !!this._parent && isSignal(this._parent.disableRipple);\n }\n\n /**\n * Whether or not the option is currently active and ready to be selected.\n * An active option displays styles as if it is focused, but the\n * focus is actually retained somewhere else. This comes in handy\n * for components like autocomplete where focus must remain on the input.\n */\n get active(): boolean {\n return this._active;\n }\n\n /**\n * The displayed value of the option. It is necessary to show the selected option in the\n * select's trigger.\n */\n get viewValue(): string {\n // TODO(kara): Add input property alternative for node envs.\n return (this._text?.nativeElement.textContent || '').trim();\n }\n\n /** Selects the option. */\n select(emitEvent = true): void {\n if (!this._selected) {\n this._selected = true;\n this._changeDetectorRef.markForCheck();\n\n if (emitEvent) {\n this._emitSelectionChangeEvent();\n }\n }\n }\n\n /** Deselects the option. */\n deselect(emitEvent = true): void {\n if (this._selected) {\n this._selected = false;\n this._changeDetectorRef.markForCheck();\n\n if (emitEvent) {\n this._emitSelectionChangeEvent();\n }\n }\n }\n\n /** Sets focus onto this option. */\n focus(_origin?: FocusOrigin, options?: FocusOptions): void {\n // Note that we aren't using `_origin`, but we need to keep it because some internal consumers\n // use `MatOption` in a `FocusKeyManager` and we need it to match `FocusableOption`.\n const element = this._getHostElement();\n\n if (typeof element.focus === 'function') {\n element.focus(options);\n }\n }\n\n /**\n * This method sets display styles on the option to make it appear\n * active. This is used by the ActiveDescendantKeyManager so key\n * events will display the proper options as active on arrow key events.\n */\n setActiveStyles(): void {\n if (!this._active) {\n this._active = true;\n this._changeDetectorRef.markForCheck();\n }\n }\n\n /**\n * This method removes display styles on the option that made it appear\n * active. This is used by the ActiveDescendantKeyManager so key\n * events will display the proper options as active on arrow key events.\n */\n setInactiveStyles(): void {\n if (this._active) {\n this._active = false;\n this._changeDetectorRef.markForCheck();\n }\n }\n\n /** Gets the label to be used when determining whether the option should be focused. */\n getLabel(): string {\n return this.viewValue;\n }\n\n /** Ensures the option is selected when activated from the keyboard. */\n _handleKeydown(event: KeyboardEvent): void {\n if ((event.keyCode === ENTER || event.keyCode === SPACE) && !hasModifierKey(event)) {\n this._selectViaInteraction();\n\n // Prevent the page from scrolling down and form submits.\n event.preventDefault();\n }\n }\n\n /**\n * `Selects the option while indicating the selection came from the user. Used to\n * determine if the select's view -> model callback should be invoked.`\n */\n _selectViaInteraction(): void {\n if (!this.disabled) {\n this._selected = this.multiple ? !this._selected : true;\n this._changeDetectorRef.markForCheck();\n this._emitSelectionChangeEvent(true);\n }\n }\n\n /** Returns the correct tabindex for the option depending on disabled state. */\n // This method is only used by `MatLegacyOption`. Keeping it here to avoid breaking the types.\n // That's because `MatLegacyOption` use `MatOption` type in a few places such as\n // `MatOptionSelectionChange`. It is safe to delete this when `MatLegacyOption` is deleted.\n _getTabIndex(): string {\n return this.disabled ? '-1' : '0';\n }\n\n /** Gets the host DOM element. */\n _getHostElement(): HTMLElement {\n return this._element.nativeElement;\n }\n\n ngAfterViewChecked() {\n // Since parent components could be using the option's label to display the selected values\n // (e.g. `mat-select`) and they don't have a way of knowing if the option's label has changed\n // we have to check for changes in the DOM ourselves and dispatch an event. These checks are\n // relatively cheap, however we still limit them only to selected options in order to avoid\n // hitting the DOM too often.\n if (this._selected) {\n const viewValue = this.viewValue;\n\n if (viewValue !== this._mostRecentViewValue) {\n if (this._mostRecentViewValue) {\n this._stateChanges.next();\n }\n\n this._mostRecentViewValue = viewValue;\n }\n }\n }\n\n ngOnDestroy() {\n this._stateChanges.complete();\n }\n\n /** Emits the selection change event. */\n private _emitSelectionChangeEvent(isUserInput = false): void {\n this.onSelectionChange.emit(new MatOptionSelectionChange<T>(this, isUserInput));\n }\n}\n\n/**\n * Counts the amount of option group labels that precede the specified option.\n * @param optionIndex Index of the option at which to start counting.\n * @param options Flat list of all of the options.\n * @param optionGroups Flat list of all of the option groups.\n * @docs-private\n */\nexport function _countGroupLabelsBeforeOption(\n optionIndex: number,\n options: QueryList<MatOption>,\n optionGroups: QueryList<MatOptgroup>,\n): number {\n if (optionGroups.length) {\n let optionsArray = options.toArray();\n let groups = optionGroups.toArray();\n let groupCounter = 0;\n\n for (let i = 0; i < optionIndex + 1; i++) {\n if (optionsArray[i].group && optionsArray[i].group === groups[groupCounter]) {\n groupCounter++;\n }\n }\n\n return groupCounter;\n }\n\n return 0;\n}\n\n/**\n * Determines the position to which to scroll a panel in order for an option to be into view.\n * @param optionOffset Offset of the option from the top of the panel.\n * @param optionHeight Height of the options.\n * @param currentScrollPosition Current scroll position of the panel.\n * @param panelHeight Height of the panel.\n * @docs-private\n */\nexport function _getOptionScrollPosition(\n optionOffset: number,\n optionHeight: number,\n currentScrollPosition: number,\n panelHeight: number,\n): number {\n if (optionOffset < currentScrollPosition) {\n return optionOffset;\n }\n\n if (optionOffset + optionHeight > currentScrollPosition + panelHeight) {\n return Math.max(0, optionOffset - panelHeight + optionHeight);\n }\n\n return currentScrollPosition;\n}\n","<!-- Set aria-hidden=\"true\" to this DOM node and other decorative nodes in this file. This might\n be contributing to issue where sometimes VoiceOver focuses on a TextNode in the a11y tree instead\n of the Option node (#23202). Most assistive technology will generally ignore non-role,\n non-text-content elements. Adding aria-hidden seems to make VoiceOver behave more consistently. -->\n@if (multiple) {\n <mat-pseudo-checkbox\n class=\"mat-mdc-option-pseudo-checkbox\"\n [disabled]=\"disabled\"\n [state]=\"selected ? 'checked' : 'unchecked'\"\n aria-hidden=\"true\"></mat-pseudo-checkbox>\n}\n\n<ng-content select=\"mat-icon\"></ng-content>\n\n<span class=\"mdc-list-item__primary-text\" #text><ng-content></ng-content></span>\n\n<!-- Render checkmark at the end for single-selection. -->\n@if (!multiple && selected && !hideSingleSelectionIndicator) {\n <mat-pseudo-checkbox\n class=\"mat-mdc-option-pseudo-checkbox\"\n [disabled]=\"disabled\"\n state=\"checked\"\n aria-hidden=\"true\"\n appearance=\"minimal\"></mat-pseudo-checkbox>\n}\n\n<!-- See a11y notes inside optgroup.ts for context behind this element. -->\n@if (group && group._inert) {\n <span class=\"cdk-visually-hidden\">({{ group.label }})</span>\n}\n\n<div class=\"mat-mdc-option-ripple mat-focus-indicator\" aria-hidden=\"true\" mat-ripple\n [matRippleTrigger]=\"_getHostElement()\" [matRippleDisabled]=\"disabled || disableRipple\">\n</div>\n"],"names":[],"mappings":";;;;;;;;;;AAsBA;;AAEG;MACU,2BAA2B,GAAG,IAAI,cAAc,CAC3D,6BAA6B;;ACN/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;AAIG;MACU,YAAY,GAAG,IAAI,cAAc,CAAc,aAAa,EAAC;AAE1E;;AAEG;MAgBU,WAAW,CAAA;;AAEb,IAAA,KAAK,CAAA;;IAGwB,QAAQ,GAAY,KAAK,CAAA;;IAG/D,QAAQ,GAAW,MAAM,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAA;;AAGpE,IAAA,MAAM,CAAA;AAIN,IAAA,WAAA,GAAA;AACE,QAAA,MAAM,MAAM,GAAG,MAAM,CAA2B,2BAA2B,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC,CAAA;QAC9F,IAAI,CAAC,MAAM,GAAG,MAAM,EAAE,WAAW,IAAI,KAAK,CAAA;KAC5C;8GAlBW,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAX,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,eAA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Y,GAAG,OAAO,CAAC,OAAO,EAAE,CAAA;AACpC,QAAA,IAAI,MAAM,GAAG,YAAY,CAAC,OAAO,EAAE,CAAA;QACnC,IAAI,YAAY,GAAG,CAAC,CAAA;AAEpB,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;AACxC,YAAA,IAAI,YAAY,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,YAAY,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK,MAAM,CAAC,YAAY,CAAC,EAAE;AAC3E,gBAAA,YAAY,EAAE,CAAA;aAChB;SACF;AAEA,QAAA,OAAO,YAAY,CAAA;KACrB;AAEA,IAAA,OAAO,CAAC,CAAA;AACV,CAAA;AAEA;;;;;;;AAOG;AACG,SAAU,wBAAwB,CACtC,YAAoB,EACpB,YAAoB,EACpB,qBAA6B,EAC7B,WAAmB,EAAA;AAEnB,IAAA,IAAI,YAAY,GAAG,qBAAqB,EAAE;AACxC,QAAA,OAAO,YAAY,CAAA;KACrB;IAEA,IAAI,YAAY,GAAG,YAAY,GAAG,qBAAqB,GAAG,WAAW,EAAE;AACrE,QAAA,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,GAAG,WAAW,GAAG,YAAY,CAAC,CAAA;KAC/D;AAEA,IAAA,OAAO,qBAAqB,CAAA;AAC9B;;;;"}
@@ -0,0 +1,46 @@
1
+ import { ContentContainerComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
2
+
3
+ /** Harness for interacting with a `mat-option` in tests. */
4
+ class MatOptionHarness extends ContentContainerComponentHarness {
5
+ /** Selector used to locate option instances. */
6
+ static hostSelector = '.mat-mdc-option';
7
+ /** Element containing the option's text. */
8
+ _text = this.locatorFor('.mdc-list-item__primary-text');
9
+ /**
10
+ * Gets a `HarnessPredicate` that can be used to search for an option with specific attributes.
11
+ * @param options Options for filtering which option instances are considered a match.
12
+ * @return a `HarnessPredicate` configured with the given options.
13
+ */
14
+ static with(options = {}) {
15
+ return new HarnessPredicate(this, options)
16
+ .addOption('text', options.text, async (harness, title) => HarnessPredicate.stringMatches(await harness.getText(), title))
17
+ .addOption('isSelected', options.isSelected, async (harness, isSelected) => (await harness.isSelected()) === isSelected);
18
+ }
19
+ /** Clicks the option. */
20
+ async click() {
21
+ return (await this.host()).click();
22
+ }
23
+ /** Gets the option's label text. */
24
+ async getText() {
25
+ return (await this._text()).text();
26
+ }
27
+ /** Gets whether the option is disabled. */
28
+ async isDisabled() {
29
+ return (await this.host()).hasClass('mdc-list-item--disabled');
30
+ }
31
+ /** Gets whether the option is selected. */
32
+ async isSelected() {
33
+ return (await this.host()).hasClass('mdc-list-item--selected');
34
+ }
35
+ /** Gets whether the option is active. */
36
+ async isActive() {
37
+ return (await this.host()).hasClass('mat-mdc-option-active');
38
+ }
39
+ /** Gets whether the option is in multiple selection mode. */
40
+ async isMultiple() {
41
+ return (await this.host()).hasClass('mat-mdc-option-multiple');
42
+ }
43
+ }
44
+
45
+ export { MatOptionHarness as M };
46
+ //# sourceMappingURL=option-harness-3b7c1106.mjs.map