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

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 (698) hide show
  1. package/_index.scss +1 -1
  2. package/autocomplete/_autocomplete-theme.scss +18 -18
  3. package/{core/tokens/m2/mat/_autocomplete.scss → autocomplete/_m2-autocomplete.scss} +7 -7
  4. package/{core/tokens/m3/mat/_autocomplete.scss → autocomplete/_m3-autocomplete.scss} +4 -4
  5. package/autocomplete/index.d.ts +100 -127
  6. package/autocomplete/testing/index.d.ts +7 -11
  7. package/badge/_badge-theme.scss +21 -21
  8. package/{core/tokens/m2/mat/_badge.scss → badge/_m2-badge.scss} +6 -6
  9. package/{core/tokens/m3/mat/_badge.scss → badge/_m3-badge.scss} +28 -27
  10. package/badge/index.d.ts +8 -112
  11. package/badge/testing/index.d.ts +8 -8
  12. package/badge.d-D0iThVg0.d.ts +99 -0
  13. package/bottom-sheet/_bottom-sheet-theme.scss +15 -15
  14. package/{core/tokens/m2/mat/_bottom-sheet.scss → bottom-sheet/_m2-bottom-sheet.scss} +6 -6
  15. package/{core/tokens/m3/mat/_bottom-sheet.scss → bottom-sheet/_m3-bottom-sheet.scss} +5 -5
  16. package/bottom-sheet/index.d.ts +91 -103
  17. package/bottom-sheet/testing/index.d.ts +5 -6
  18. package/button/_button-theme.scss +34 -333
  19. package/button/_fab-theme.scss +23 -128
  20. package/button/_icon-button-theme.scss +29 -36
  21. package/button/_m2-button.scss +249 -0
  22. package/button/_m2-fab.scss +132 -0
  23. package/{core/tokens/m2/mat/_icon-button.scss → button/_m2-icon-button.scss} +35 -26
  24. package/button/_m3-button.scss +260 -0
  25. package/button/_m3-fab.scss +187 -0
  26. package/{core/tokens/m3/mat/_icon-button.scss → button/_m3-icon-button.scss} +32 -7
  27. package/button/index.d.ts +107 -135
  28. package/button/testing/index.d.ts +14 -10
  29. package/button-toggle/_button-toggle-theme.scss +26 -44
  30. package/{core/tokens/m2/mat/_standard-button-toggle.scss → button-toggle/_m2-button-toggle.scss} +40 -20
  31. package/{core/tokens/m3/mat/_standard-button-toggle.scss → button-toggle/_m3-button-toggle.scss} +24 -9
  32. package/button-toggle/index.d.ts +12 -285
  33. package/button-toggle/testing/index.d.ts +39 -37
  34. package/button-toggle.d-B_G01PhW.d.ts +258 -0
  35. package/card/_card-theme.scss +18 -70
  36. package/{core/tokens/m2/mat/_card.scss → card/_m2-card.scss} +20 -18
  37. package/card/_m3-card.scss +48 -0
  38. package/card/index.d.ts +81 -117
  39. package/card/testing/index.d.ts +12 -15
  40. package/checkbox/_checkbox-theme.scss +30 -52
  41. package/{core/tokens/m2/mdc/_checkbox.scss → checkbox/_m2-checkbox.scss} +31 -53
  42. package/checkbox/_m3-checkbox.scss +103 -0
  43. package/checkbox/index.d.ts +45 -105
  44. package/checkbox/testing/index.d.ts +7 -10
  45. package/chips/_chips-theme.scss +24 -67
  46. package/chips/_m2-chip.scss +127 -0
  47. package/chips/_m3-chip.scss +129 -0
  48. package/chips/index.d.ts +624 -694
  49. package/chips/testing/index.d.ts +79 -93
  50. package/common-module.d-C8xzHJDr.d.ts +44 -0
  51. package/core/_core-theme.scss +34 -54
  52. package/core/_core.scss +6 -6
  53. package/core/{tokens/m2/mat/_app.scss → _m2-app.scss} +8 -7
  54. package/core/{tokens/m3/mat/_app.scss → _m3-app.scss} +4 -4
  55. package/core/density/private/_all-density.scss +38 -38
  56. package/core/index.d.ts +60 -976
  57. package/core/m2/_theming.scss +68 -44
  58. package/core/{tokens/m2/mat/_optgroup.scss → option/_m2-optgroup.scss} +6 -6
  59. package/core/{tokens/m2/mat/_option.scss → option/_m2-option.scss} +6 -6
  60. package/core/{tokens/m3/mat/_optgroup.scss → option/_m3-optgroup.scss} +4 -4
  61. package/core/option/_m3-option.scss +57 -0
  62. package/core/option/_optgroup-theme.scss +10 -14
  63. package/core/option/_option-theme.scss +14 -22
  64. package/core/{tokens/m2/mat/_ripple.scss → ripple/_m2-ripple.scss} +6 -6
  65. package/core/{tokens/m3/mat/_ripple.scss → ripple/_m3-ripple.scss} +3 -3
  66. package/core/ripple/_ripple-theme.scss +15 -15
  67. package/core/ripple/_ripple.scss +3 -4
  68. package/core/{tokens/m2/mat/_full-pseudo-checkbox.scss → selection/pseudo-checkbox/_m2-pseudo-checkbox.scss} +15 -13
  69. package/core/selection/pseudo-checkbox/_m3-pseudo-checkbox.scss +49 -0
  70. package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +10 -38
  71. package/core/testing/index.d.ts +9 -42
  72. package/core/theming/_color-api-backwards-compatibility.scss +19 -8
  73. package/core/theming/_definition.scss +2 -3
  74. package/core/theming/_inspection.scss +3 -2
  75. package/core/tokens/_m2-tokens.scss +131 -0
  76. package/core/tokens/_m2-utils.scss +109 -0
  77. package/core/tokens/_m3-system.scss +67 -27
  78. package/core/tokens/_m3-tokens.scss +113 -33
  79. package/core/tokens/_m3-utils.scss +85 -0
  80. package/core/tokens/_token-utils.scss +69 -67
  81. package/core/tokens/m3/_index.scss +8 -163
  82. package/core/tokens/m3/{definitions/_md-sys-color.scss → _md-sys-color.scss} +44 -2
  83. package/core/tokens/m3/{definitions/_md-sys-typescale.scss → _md-sys-typescale.scss} +20 -1
  84. package/date-adapter.d-CtKXIxk0.d.ts +267 -0
  85. package/date-range-input-harness.d-CaEyN8dT.d.ts +279 -0
  86. package/datepicker/_datepicker-theme.scss +27 -42
  87. package/{core/tokens/m2/mat/_datepicker.scss → datepicker/_m2-datepicker.scss} +7 -7
  88. package/{core/tokens/m3/mat/_datepicker.scss → datepicker/_m3-datepicker.scss} +13 -11
  89. package/datepicker/index.d.ts +1336 -1481
  90. package/datepicker/testing/index.d.ts +5 -287
  91. package/dialog/_dialog-theme.scss +12 -39
  92. package/{core/tokens/m2/mdc/_dialog.scss → dialog/_m2-dialog.scss} +21 -50
  93. package/dialog/_m3-dialog.scss +47 -0
  94. package/dialog/index.d.ts +59 -453
  95. package/dialog/testing/index.d.ts +23 -26
  96. package/dialog.d-DsYAn2Gk.d.ts +339 -0
  97. package/divider/_divider-theme.scss +10 -14
  98. package/{core/tokens/m2/mat/_divider.scss → divider/_m2-divider.scss} +6 -6
  99. package/{core/tokens/m3/mat/_divider.scss → divider/_m3-divider.scss} +3 -3
  100. package/divider/index.d.ts +6 -11
  101. package/divider/testing/index.d.ts +5 -6
  102. package/error-options.d-CGdTZUYk.d.ts +17 -0
  103. package/expansion/_expansion-theme.scss +19 -22
  104. package/{core/tokens/m2/mat/_expansion.scss → expansion/_m2-expansion.scss} +7 -7
  105. package/{core/tokens/m3/mat/_expansion.scss → expansion/_m3-expansion.scss} +22 -8
  106. package/expansion/index.d.ts +140 -190
  107. package/expansion/testing/index.d.ts +26 -31
  108. package/fesm2022/animation-DfMFjxHu.mjs +41 -0
  109. package/fesm2022/animation-DfMFjxHu.mjs.map +1 -0
  110. package/fesm2022/autocomplete/testing.mjs +2 -1
  111. package/fesm2022/autocomplete/testing.mjs.map +1 -1
  112. package/fesm2022/autocomplete.mjs +79 -51
  113. package/fesm2022/autocomplete.mjs.map +1 -1
  114. package/fesm2022/badge/testing.mjs.map +1 -1
  115. package/fesm2022/badge.mjs +22 -23
  116. package/fesm2022/badge.mjs.map +1 -1
  117. package/fesm2022/bottom-sheet/testing.mjs.map +1 -1
  118. package/fesm2022/bottom-sheet.mjs +33 -22
  119. package/fesm2022/bottom-sheet.mjs.map +1 -1
  120. package/fesm2022/button/testing.mjs +34 -15
  121. package/fesm2022/button/testing.mjs.map +1 -1
  122. package/fesm2022/button-toggle/testing.mjs.map +1 -1
  123. package/fesm2022/button-toggle.mjs +28 -19
  124. package/fesm2022/button-toggle.mjs.map +1 -1
  125. package/fesm2022/button.mjs +114 -285
  126. package/fesm2022/button.mjs.map +1 -1
  127. package/fesm2022/card/testing.mjs.map +1 -1
  128. package/fesm2022/card.mjs +52 -52
  129. package/fesm2022/card.mjs.map +1 -1
  130. package/fesm2022/checkbox/testing.mjs.map +1 -1
  131. package/fesm2022/checkbox.mjs +39 -78
  132. package/fesm2022/checkbox.mjs.map +1 -1
  133. package/fesm2022/chips/testing.mjs +7 -1
  134. package/fesm2022/chips/testing.mjs.map +1 -1
  135. package/fesm2022/chips.mjs +104 -66
  136. package/fesm2022/chips.mjs.map +1 -1
  137. package/fesm2022/common-module-DZl8g1kc.mjs +42 -0
  138. package/fesm2022/common-module-DZl8g1kc.mjs.map +1 -0
  139. package/fesm2022/core/testing.mjs +2 -43
  140. package/fesm2022/core/testing.mjs.map +1 -1
  141. package/fesm2022/core.mjs +39 -1620
  142. package/fesm2022/core.mjs.map +1 -1
  143. package/fesm2022/date-formats-K6TQue-Y.mjs +190 -0
  144. package/fesm2022/date-formats-K6TQue-Y.mjs.map +1 -0
  145. package/fesm2022/date-range-input-harness-Bp1T4oUe.mjs +467 -0
  146. package/fesm2022/date-range-input-harness-Bp1T4oUe.mjs.map +1 -0
  147. package/fesm2022/datepicker/testing.mjs +5 -465
  148. package/fesm2022/datepicker/testing.mjs.map +1 -1
  149. package/fesm2022/datepicker.mjs +198 -156
  150. package/fesm2022/datepicker.mjs.map +1 -1
  151. package/fesm2022/dialog/testing.mjs +14 -1
  152. package/fesm2022/dialog/testing.mjs.map +1 -1
  153. package/fesm2022/dialog.mjs +16 -895
  154. package/fesm2022/dialog.mjs.map +1 -1
  155. package/fesm2022/divider/testing.mjs.map +1 -1
  156. package/fesm2022/divider.mjs +11 -13
  157. package/fesm2022/divider.mjs.map +1 -1
  158. package/fesm2022/error-options-BWOa3B4G.mjs +29 -0
  159. package/fesm2022/error-options-BWOa3B4G.mjs.map +1 -0
  160. package/fesm2022/error-state-Dtb1IHM-.mjs +37 -0
  161. package/fesm2022/error-state-Dtb1IHM-.mjs.map +1 -0
  162. package/fesm2022/expansion/testing.mjs.map +1 -1
  163. package/fesm2022/expansion.mjs +36 -37
  164. package/fesm2022/expansion.mjs.map +1 -1
  165. package/fesm2022/form-field/testing/control.mjs.map +1 -1
  166. package/fesm2022/form-field/testing.mjs +7 -6
  167. package/fesm2022/form-field/testing.mjs.map +1 -1
  168. package/fesm2022/form-field-BZd6Vhww.mjs +1101 -0
  169. package/fesm2022/form-field-BZd6Vhww.mjs.map +1 -0
  170. package/fesm2022/form-field.mjs +16 -1110
  171. package/fesm2022/form-field.mjs.map +1 -1
  172. package/fesm2022/grid-list/testing.mjs +2 -2
  173. package/fesm2022/grid-list/testing.mjs.map +1 -1
  174. package/fesm2022/grid-list.mjs +32 -176
  175. package/fesm2022/grid-list.mjs.map +1 -1
  176. package/fesm2022/icon/testing.mjs +11 -12
  177. package/fesm2022/icon/testing.mjs.map +1 -1
  178. package/fesm2022/icon-button-4VvBKIK4.mjs +212 -0
  179. package/fesm2022/icon-button-4VvBKIK4.mjs.map +1 -0
  180. package/fesm2022/icon-registry-Bk5cM8Z5.mjs +638 -0
  181. package/fesm2022/icon-registry-Bk5cM8Z5.mjs.map +1 -0
  182. package/fesm2022/icon.mjs +24 -642
  183. package/fesm2022/icon.mjs.map +1 -1
  184. package/fesm2022/index-BHJ4tVIe.mjs +22 -0
  185. package/fesm2022/index-BHJ4tVIe.mjs.map +1 -0
  186. package/fesm2022/index-D2rZ0V78.mjs +20 -0
  187. package/fesm2022/index-D2rZ0V78.mjs.map +1 -0
  188. package/fesm2022/input/testing.mjs +5 -113
  189. package/fesm2022/input/testing.mjs.map +1 -1
  190. package/fesm2022/input-harness-oQzj5EsQ.mjs +115 -0
  191. package/fesm2022/input-harness-oQzj5EsQ.mjs.map +1 -0
  192. package/fesm2022/input-value-accessor-D1GvPuqO.mjs +12 -0
  193. package/fesm2022/input-value-accessor-D1GvPuqO.mjs.map +1 -0
  194. package/fesm2022/input.mjs +32 -40
  195. package/fesm2022/input.mjs.map +1 -1
  196. package/fesm2022/internal-form-field-DVvKYBKJ.mjs +27 -0
  197. package/fesm2022/internal-form-field-DVvKYBKJ.mjs.map +1 -0
  198. package/fesm2022/line-Dwrcg_t9.mjs +59 -0
  199. package/fesm2022/line-Dwrcg_t9.mjs.map +1 -0
  200. package/fesm2022/list/testing.mjs +2 -2
  201. package/fesm2022/list/testing.mjs.map +1 -1
  202. package/fesm2022/list.mjs +71 -68
  203. package/fesm2022/list.mjs.map +1 -1
  204. package/fesm2022/material.mjs.map +1 -1
  205. package/fesm2022/menu/testing.mjs.map +1 -1
  206. package/fesm2022/menu.mjs +57 -46
  207. package/fesm2022/menu.mjs.map +1 -1
  208. package/fesm2022/module-CTd5xD2i.mjs +39 -0
  209. package/fesm2022/module-CTd5xD2i.mjs.map +1 -0
  210. package/fesm2022/module-D-cNfopD.mjs +891 -0
  211. package/fesm2022/module-D-cNfopD.mjs.map +1 -0
  212. package/fesm2022/module-X29xYsIk.mjs +970 -0
  213. package/fesm2022/module-X29xYsIk.mjs.map +1 -0
  214. package/fesm2022/module-qRXgbi2L.mjs +1312 -0
  215. package/fesm2022/module-qRXgbi2L.mjs.map +1 -0
  216. package/fesm2022/option-MOeehkAg.mjs +348 -0
  217. package/fesm2022/option-MOeehkAg.mjs.map +1 -0
  218. package/fesm2022/option-harness-BFcc-M_4.mjs +46 -0
  219. package/fesm2022/option-harness-BFcc-M_4.mjs.map +1 -0
  220. package/fesm2022/paginator/testing.mjs +4 -1
  221. package/fesm2022/paginator/testing.mjs.map +1 -1
  222. package/fesm2022/paginator.mjs +54 -22
  223. package/fesm2022/paginator.mjs.map +1 -1
  224. package/fesm2022/progress-bar/testing.mjs +0 -4
  225. package/fesm2022/progress-bar/testing.mjs.map +1 -1
  226. package/fesm2022/progress-bar.mjs +20 -19
  227. package/fesm2022/progress-bar.mjs.map +1 -1
  228. package/fesm2022/progress-spinner/testing.mjs +0 -4
  229. package/fesm2022/progress-spinner/testing.mjs.map +1 -1
  230. package/fesm2022/progress-spinner.mjs +22 -20
  231. package/fesm2022/progress-spinner.mjs.map +1 -1
  232. package/fesm2022/pseudo-checkbox-BFGIaGxz.mjs +53 -0
  233. package/fesm2022/pseudo-checkbox-BFGIaGxz.mjs.map +1 -0
  234. package/fesm2022/pseudo-checkbox-module-Dxth-mPi.mjs +20 -0
  235. package/fesm2022/pseudo-checkbox-module-Dxth-mPi.mjs.map +1 -0
  236. package/fesm2022/public-api-BoO5eSq-.mjs +147 -0
  237. package/fesm2022/public-api-BoO5eSq-.mjs.map +1 -0
  238. package/fesm2022/radio/testing.mjs.map +1 -1
  239. package/fesm2022/radio.mjs +28 -20
  240. package/fesm2022/radio.mjs.map +1 -1
  241. package/fesm2022/ripple-CuyVtN3V.mjs +640 -0
  242. package/fesm2022/ripple-CuyVtN3V.mjs.map +1 -0
  243. package/fesm2022/ripple-loader-pOctSZby.mjs +162 -0
  244. package/fesm2022/ripple-loader-pOctSZby.mjs.map +1 -0
  245. package/fesm2022/select/testing.mjs +3 -2
  246. package/fesm2022/select/testing.mjs.map +1 -1
  247. package/fesm2022/select.mjs +32 -1311
  248. package/fesm2022/select.mjs.map +1 -1
  249. package/fesm2022/sidenav/testing.mjs +1 -1
  250. package/fesm2022/sidenav/testing.mjs.map +1 -1
  251. package/fesm2022/sidenav.mjs +39 -38
  252. package/fesm2022/sidenav.mjs.map +1 -1
  253. package/fesm2022/slide-toggle/testing.mjs.map +1 -1
  254. package/fesm2022/slide-toggle.mjs +32 -80
  255. package/fesm2022/slide-toggle.mjs.map +1 -1
  256. package/fesm2022/slider/testing.mjs.map +1 -1
  257. package/fesm2022/slider.mjs +33 -29
  258. package/fesm2022/slider.mjs.map +1 -1
  259. package/fesm2022/snack-bar/testing.mjs.map +1 -1
  260. package/fesm2022/snack-bar.mjs +55 -53
  261. package/fesm2022/snack-bar.mjs.map +1 -1
  262. package/fesm2022/sort/testing.mjs.map +1 -1
  263. package/fesm2022/sort.mjs +31 -23
  264. package/fesm2022/sort.mjs.map +1 -1
  265. package/fesm2022/stepper/testing.mjs.map +1 -1
  266. package/fesm2022/stepper.mjs +60 -45
  267. package/fesm2022/stepper.mjs.map +1 -1
  268. package/fesm2022/structural-styles-CasigI3l.mjs +18 -0
  269. package/fesm2022/structural-styles-CasigI3l.mjs.map +1 -0
  270. package/fesm2022/table/testing.mjs.map +1 -1
  271. package/fesm2022/table.mjs +61 -65
  272. package/fesm2022/table.mjs.map +1 -1
  273. package/fesm2022/tabs/testing.mjs.map +1 -1
  274. package/fesm2022/tabs.mjs +89 -85
  275. package/fesm2022/tabs.mjs.map +1 -1
  276. package/fesm2022/timepicker/testing.mjs +1 -1
  277. package/fesm2022/timepicker/testing.mjs.map +1 -1
  278. package/fesm2022/timepicker.mjs +51 -41
  279. package/fesm2022/timepicker.mjs.map +1 -1
  280. package/fesm2022/toolbar/testing.mjs.map +1 -1
  281. package/fesm2022/toolbar.mjs +15 -18
  282. package/fesm2022/toolbar.mjs.map +1 -1
  283. package/fesm2022/tooltip/testing.mjs.map +1 -1
  284. package/fesm2022/tooltip.mjs +17 -960
  285. package/fesm2022/tooltip.mjs.map +1 -1
  286. package/fesm2022/tree/testing.mjs.map +1 -1
  287. package/fesm2022/tree.mjs +29 -31
  288. package/fesm2022/tree.mjs.map +1 -1
  289. package/form-field/_form-field-theme.scss +30 -97
  290. package/{core/tokens/m2/mat/_form-field.scss → form-field/_m2-form-field.scss} +94 -13
  291. package/form-field/_m3-form-field.scss +153 -0
  292. package/form-field/index.d.ts +16 -508
  293. package/form-field/testing/control/index.d.ts +2 -2
  294. package/form-field/testing/index.d.ts +19 -24
  295. package/form-field-control.d-DvB4ZVlf.d.ts +64 -0
  296. package/form-field.d-b9aHrR4I.d.ts +373 -0
  297. package/grid-list/_grid-list-theme.scss +8 -10
  298. package/{core/tokens/m2/mat/_grid-list.scss → grid-list/_m2-grid-list.scss} +6 -6
  299. package/{core/tokens/m3/mat/_grid-list.scss → grid-list/_m3-grid-list.scss} +2 -2
  300. package/grid-list/index.d.ts +127 -152
  301. package/grid-list/testing/index.d.ts +40 -44
  302. package/icon/_icon-theme.scss +13 -13
  303. package/{core/tokens/m2/mat/_icon.scss → icon/_m2-icon.scss} +5 -5
  304. package/{core/tokens/m3/mat/_icon.scss → icon/_m3-icon.scss} +8 -6
  305. package/icon/index.d.ts +9 -470
  306. package/icon/testing/index.d.ts +42 -44
  307. package/icon-module.d-sA1hmRKS.d.ts +168 -0
  308. package/icon-registry.d-BVwP8t9_.d.ts +287 -0
  309. package/index.d-C5neTPvr.d.ts +11 -0
  310. package/index.d-CikM2bbf.d.ts +13 -0
  311. package/index.d.ts +2 -3
  312. package/input/_input-theme.scss +1 -1
  313. package/input/index.d.ts +39 -64
  314. package/input/testing/index.d.ts +14 -71
  315. package/input-harness.d-8fkAAbu2.d.ts +61 -0
  316. package/line.d-C-QdueRc.d.ts +25 -0
  317. package/list/_list-theme.scss +41 -71
  318. package/list/_m2-list.scss +133 -0
  319. package/list/_m3-list.scss +92 -0
  320. package/list/index.d.ts +155 -244
  321. package/list/testing/index.d.ts +159 -180
  322. package/list-option-types.d-77dQtwu8.d.ts +15 -0
  323. package/{core/tokens/m2/mat/_menu.scss → menu/_m2-menu.scss} +7 -7
  324. package/{core/tokens/m3/mat/_menu.scss → menu/_m3-menu.scss} +14 -17
  325. package/menu/_menu-theme.scss +12 -18
  326. package/menu/index.d.ts +185 -231
  327. package/menu/testing/index.d.ts +18 -23
  328. package/module.d-BGzxQfCs.d.ts +18 -0
  329. package/module.d-CH_8jCsD.d.ts +454 -0
  330. package/module.d-m-qXd3m8.d.ts +329 -0
  331. package/option-harness.d-IqsW95GR.d.ts +35 -0
  332. package/option-parent.d-CnYuuMkO.d.ts +20 -0
  333. package/option.d-BVGX3edu.d.ts +146 -0
  334. package/package.json +5 -2
  335. package/{core/tokens/m2/mat/_paginator.scss → paginator/_m2-paginator.scss} +7 -7
  336. package/{core/tokens/m3/mat/_paginator.scss → paginator/_m3-paginator.scss} +20 -4
  337. package/paginator/_paginator-theme.scss +17 -18
  338. package/paginator/index.d.ts +31 -216
  339. package/paginator/testing/index.d.ts +15 -15
  340. package/paginator.d-3kymf0wo.d.ts +200 -0
  341. package/palette.d-BSSFKjO6.d.ts +4 -0
  342. package/prebuilt-themes/azure-blue.css +1 -1
  343. package/prebuilt-themes/cyan-orange.css +1 -1
  344. package/prebuilt-themes/deeppurple-amber.css +1 -1
  345. package/prebuilt-themes/indigo-pink.css +1 -1
  346. package/prebuilt-themes/magenta-violet.css +1 -1
  347. package/prebuilt-themes/pink-bluegrey.css +1 -1
  348. package/prebuilt-themes/purple-green.css +1 -1
  349. package/prebuilt-themes/rose-red.css +1 -1
  350. package/{core/tokens/m2/mdc/_linear-progress.scss → progress-bar/_m2-progress-bar.scss} +7 -8
  351. package/{core/tokens/m3/mdc/_linear-progress.scss → progress-bar/_m3-progress-bar.scss} +11 -6
  352. package/progress-bar/_progress-bar-theme.scss +11 -11
  353. package/progress-bar/index.d.ts +41 -60
  354. package/progress-bar/testing/index.d.ts +8 -10
  355. package/{core/tokens/m2/mdc/_tab-indicator.scss → progress-spinner/_m2-progress-spinner.scss} +10 -11
  356. package/{core/tokens/m3/mdc/_circular-progress.scss → progress-spinner/_m3-progress-spinner.scss} +10 -6
  357. package/progress-spinner/_progress-spinner-theme.scss +17 -17
  358. package/progress-spinner/index.d.ts +8 -110
  359. package/progress-spinner/testing/index.d.ts +11 -11
  360. package/progress-spinner.d-DtYCWeYd.d.ts +97 -0
  361. package/pseudo-checkbox-module.d-BHmTZ10P.d.ts +45 -0
  362. package/{core/tokens/m2/mdc/_radio.scss → radio/_m2-radio.scss} +28 -36
  363. package/radio/_m3-radio.scss +79 -0
  364. package/radio/_radio-theme.scss +27 -56
  365. package/radio/index.d.ts +152 -170
  366. package/radio/testing/index.d.ts +62 -67
  367. package/ripple-loader.d-9me-KFSi.d.ts +48 -0
  368. package/ripple.d-BT30YVLB.d.ts +256 -0
  369. package/schematics/ng-add/fonts/material-fonts.js +3 -3
  370. package/schematics/ng-add/fonts/material-fonts.js.map +1 -0
  371. package/schematics/ng-add/index.js +2 -2
  372. package/schematics/ng-add/index.js.map +1 -0
  373. package/schematics/ng-add/package-config.js +1 -1
  374. package/schematics/ng-add/package-config.js.map +1 -0
  375. package/schematics/ng-add/schema.js +1 -1
  376. package/schematics/ng-add/schema.js.map +1 -0
  377. package/schematics/ng-add/setup-project.js +5 -5
  378. package/schematics/ng-add/setup-project.js.map +1 -0
  379. package/schematics/ng-add/theming/create-custom-theme.js +1 -1
  380. package/schematics/ng-add/theming/create-custom-theme.js.map +1 -0
  381. package/schematics/ng-add/theming/theming.js +6 -8
  382. package/schematics/ng-add/theming/theming.js.map +1 -0
  383. package/schematics/ng-generate/address-form/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +2 -2
  384. package/schematics/ng-generate/address-form/index.js +1 -1
  385. package/schematics/ng-generate/address-form/index.js.map +1 -0
  386. package/schematics/ng-generate/address-form/schema.js +1 -1
  387. package/schematics/ng-generate/address-form/schema.js.map +1 -0
  388. package/schematics/ng-generate/dashboard/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +1 -1
  389. package/schematics/ng-generate/dashboard/index.js +1 -1
  390. package/schematics/ng-generate/dashboard/index.js.map +1 -0
  391. package/schematics/ng-generate/dashboard/schema.js +1 -1
  392. package/schematics/ng-generate/dashboard/schema.js.map +1 -0
  393. package/schematics/ng-generate/navigation/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +1 -1
  394. package/schematics/ng-generate/navigation/index.js +1 -1
  395. package/schematics/ng-generate/navigation/index.js.map +1 -0
  396. package/schematics/ng-generate/navigation/schema.js +1 -1
  397. package/schematics/ng-generate/navigation/schema.js.map +1 -0
  398. package/schematics/ng-generate/table/index.js +1 -1
  399. package/schematics/ng-generate/table/index.js.map +1 -0
  400. package/schematics/ng-generate/table/schema.js +1 -1
  401. package/schematics/ng-generate/table/schema.js.map +1 -0
  402. package/schematics/ng-generate/theme-color/index_bundled.js +1711 -225
  403. package/schematics/ng-generate/theme-color/index_bundled.js.map +2 -3
  404. package/schematics/ng-generate/theme-color/schema.json +10 -0
  405. package/schematics/ng-generate/tree/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +2 -2
  406. package/schematics/ng-generate/tree/index.js +1 -1
  407. package/schematics/ng-generate/tree/index.js.map +1 -0
  408. package/schematics/ng-generate/tree/schema.js +1 -1
  409. package/schematics/ng-generate/tree/schema.js.map +1 -0
  410. package/schematics/ng-update/index_bundled.js +3465 -4099
  411. package/schematics/ng-update/index_bundled.js.map +3 -4
  412. package/schematics/tsconfig.json +26 -0
  413. package/{core/tokens/m2/mat/_select.scss → select/_m2-select.scss} +11 -11
  414. package/{core/tokens/m3/mat/_select.scss → select/_m3-select.scss} +22 -7
  415. package/select/_select-theme.scss +30 -26
  416. package/select/index.d.ts +25 -505
  417. package/select/testing/index.d.ts +13 -16
  418. package/{core/tokens/m2/mat/_sidenav.scss → sidenav/_m2-sidenav.scss} +7 -7
  419. package/{core/tokens/m3/mat/_sidenav.scss → sidenav/_m3-sidenav.scss} +6 -6
  420. package/sidenav/_sidenav-theme.scss +12 -16
  421. package/sidenav/index.d.ts +51 -93
  422. package/sidenav/testing/index.d.ts +59 -63
  423. package/slide-toggle/_m2-slide-toggle.scss +167 -0
  424. package/slide-toggle/_m3-slide-toggle.scss +160 -0
  425. package/slide-toggle/_slide-toggle-theme.scss +55 -48
  426. package/slide-toggle/index.d.ts +40 -110
  427. package/slide-toggle/testing/index.d.ts +18 -21
  428. package/{core/tokens/m2/mdc/_slider.scss → slider/_m2-slider.scss} +29 -68
  429. package/slider/_m3-slider.scss +121 -0
  430. package/slider/_slider-theme.scss +18 -53
  431. package/slider/index.d.ts +282 -328
  432. package/slider/testing/index.d.ts +43 -47
  433. package/{core/tokens/m2/mat/_snack-bar.scss → snack-bar/_m2-snack-bar.scss} +23 -8
  434. package/snack-bar/_m3-snack-bar.scss +25 -0
  435. package/snack-bar/_snack-bar-theme.scss +11 -30
  436. package/snack-bar/index.d.ts +155 -188
  437. package/snack-bar/testing/index.d.ts +8 -9
  438. package/{core/tokens/m2/mat/_sort.scss → sort/_m2-sort.scss} +6 -6
  439. package/{core/tokens/m3/mat/_sort.scss → sort/_m3-sort.scss} +2 -2
  440. package/sort/_sort-theme.scss +12 -18
  441. package/sort/index.d.ts +62 -170
  442. package/sort/testing/index.d.ts +23 -25
  443. package/sort-direction.d-CF7VUsH-.d.ts +3 -0
  444. package/sort.d-i-bF_IaU.d.ts +88 -0
  445. package/{core/tokens/m2/mat/_stepper.scss → stepper/_m2-stepper.scss} +7 -34
  446. package/stepper/_m3-stepper.scss +102 -0
  447. package/stepper/_stepper-theme.scss +26 -21
  448. package/stepper/index.d.ts +117 -168
  449. package/stepper/testing/index.d.ts +44 -52
  450. package/{core/tokens/m2/mat/_table.scss → table/_m2-table.scss} +7 -7
  451. package/table/_m3-table.scss +44 -0
  452. package/table/_table-theme.scss +18 -22
  453. package/table/index.d.ts +97 -156
  454. package/table/testing/index.d.ts +65 -78
  455. package/{core/tokens/m2/mat/_tab-header.scss → tabs/_m2-tabs.scss} +42 -11
  456. package/tabs/_m3-tabs.scss +70 -0
  457. package/tabs/_tabs-theme.scss +47 -125
  458. package/tabs/index.d.ts +321 -388
  459. package/tabs/testing/index.d.ts +68 -76
  460. package/{core/tokens/m2/mat/_timepicker.scss → timepicker/_m2-timepicker.scss} +7 -7
  461. package/{core/tokens/m3/mat/_timepicker.scss → timepicker/_m3-timepicker.scss} +4 -4
  462. package/timepicker/_timepicker-theme.scss +18 -18
  463. package/timepicker/index.d.ts +127 -161
  464. package/timepicker/testing/index.d.ts +21 -26
  465. package/{core/tokens/m2/mat/_toolbar.scss → toolbar/_m2-toolbar.scss} +7 -7
  466. package/{core/tokens/m3/mat/_toolbar.scss → toolbar/_m3-toolbar.scss} +18 -4
  467. package/toolbar/_toolbar-theme.scss +26 -21
  468. package/toolbar/index.d.ts +15 -26
  469. package/toolbar/testing/index.d.ts +14 -16
  470. package/{core/tokens/m2/mdc/_plain-tooltip.scss → tooltip/_m2-tooltip.scss} +7 -17
  471. package/tooltip/_m3-tooltip.scss +25 -0
  472. package/tooltip/_tooltip-theme.scss +18 -18
  473. package/tooltip/index.d.ts +11 -355
  474. package/tooltip/testing/index.d.ts +8 -10
  475. package/{core/tokens/m2/mat/_tree.scss → tree/_m2-tree.scss} +7 -7
  476. package/{core/tokens/m3/mat/_tree.scss → tree/_m3-tree.scss} +15 -2
  477. package/tree/_tree-theme.scss +19 -15
  478. package/tree/index.d.ts +117 -163
  479. package/tree/testing/index.d.ts +53 -58
  480. package/button/_button-base.scss +0 -181
  481. package/checkbox/_checkbox-common.scss +0 -585
  482. package/core/style/_button-common.scss +0 -17
  483. package/core/style/_form-common.scss +0 -21
  484. package/core/style/_list-common.scss +0 -49
  485. package/core/style/_menu-common.scss +0 -94
  486. package/core/theming/_palette-deprecated.scss +0 -76
  487. package/core/theming/_theming-deprecated.scss +0 -27
  488. package/core/tokens/_density.scss +0 -193
  489. package/core/tokens/_token-definition.scss +0 -273
  490. package/core/tokens/m2/_index.scss +0 -187
  491. package/core/tokens/m2/mat/_checkbox.scss +0 -50
  492. package/core/tokens/m2/mat/_chip.scss +0 -63
  493. package/core/tokens/m2/mat/_dialog.scss +0 -51
  494. package/core/tokens/m2/mat/_fab-small.scss +0 -108
  495. package/core/tokens/m2/mat/_fab.scss +0 -108
  496. package/core/tokens/m2/mat/_filled-button.scss +0 -102
  497. package/core/tokens/m2/mat/_legacy-button-toggle.scss +0 -59
  498. package/core/tokens/m2/mat/_list.scss +0 -44
  499. package/core/tokens/m2/mat/_minimal-pseudo-checkbox.scss +0 -43
  500. package/core/tokens/m2/mat/_outlined-button.scss +0 -88
  501. package/core/tokens/m2/mat/_protected-button.scss +0 -102
  502. package/core/tokens/m2/mat/_radio.scss +0 -52
  503. package/core/tokens/m2/mat/_slider.scss +0 -69
  504. package/core/tokens/m2/mat/_switch.scss +0 -76
  505. package/core/tokens/m2/mat/_tab-header-with-background.scss +0 -42
  506. package/core/tokens/m2/mat/_text-button.scss +0 -91
  507. package/core/tokens/m2/mdc/_chip.scss +0 -313
  508. package/core/tokens/m2/mdc/_circular-progress.scss +0 -61
  509. package/core/tokens/m2/mdc/_elevated-card.scss +0 -77
  510. package/core/tokens/m2/mdc/_extended-fab.scss +0 -87
  511. package/core/tokens/m2/mdc/_fab-small.scss +0 -92
  512. package/core/tokens/m2/mdc/_fab.scss +0 -93
  513. package/core/tokens/m2/mdc/_filled-button.scss +0 -124
  514. package/core/tokens/m2/mdc/_filled-text-field.scss +0 -181
  515. package/core/tokens/m2/mdc/_icon-button.scss +0 -91
  516. package/core/tokens/m2/mdc/_list.scss +0 -219
  517. package/core/tokens/m2/mdc/_outlined-button.scss +0 -124
  518. package/core/tokens/m2/mdc/_outlined-card.scss +0 -85
  519. package/core/tokens/m2/mdc/_outlined-text-field.scss +0 -163
  520. package/core/tokens/m2/mdc/_protected-button.scss +0 -129
  521. package/core/tokens/m2/mdc/_secondary-navigation-tab.scss +0 -87
  522. package/core/tokens/m2/mdc/_snack-bar.scss +0 -93
  523. package/core/tokens/m2/mdc/_switch.scss +0 -192
  524. package/core/tokens/m2/mdc/_text-button.scss +0 -98
  525. package/core/tokens/m3/definitions/_index.scss +0 -94
  526. package/core/tokens/m3/definitions/_md-comp-checkbox.scss +0 -120
  527. package/core/tokens/m3/definitions/_md-comp-circular-progress-indicator.scss +0 -27
  528. package/core/tokens/m3/definitions/_md-comp-data-table.scss +0 -90
  529. package/core/tokens/m3/definitions/_md-comp-dialog.scss +0 -123
  530. package/core/tokens/m3/definitions/_md-comp-elevated-button.scss +0 -87
  531. package/core/tokens/m3/definitions/_md-comp-elevated-card.scss +0 -53
  532. package/core/tokens/m3/definitions/_md-comp-extended-fab-primary.scss +0 -90
  533. package/core/tokens/m3/definitions/_md-comp-extended-fab-secondary.scss +0 -91
  534. package/core/tokens/m3/definitions/_md-comp-extended-fab-tertiary.scss +0 -91
  535. package/core/tokens/m3/definitions/_md-comp-fab-primary-small.scss +0 -59
  536. package/core/tokens/m3/definitions/_md-comp-fab-primary.scss +0 -59
  537. package/core/tokens/m3/definitions/_md-comp-fab-secondary-small.scss +0 -60
  538. package/core/tokens/m3/definitions/_md-comp-fab-secondary.scss +0 -60
  539. package/core/tokens/m3/definitions/_md-comp-fab-tertiary-small.scss +0 -60
  540. package/core/tokens/m3/definitions/_md-comp-fab-tertiary.scss +0 -60
  541. package/core/tokens/m3/definitions/_md-comp-filled-button.scss +0 -85
  542. package/core/tokens/m3/definitions/_md-comp-filled-card.scss +0 -52
  543. package/core/tokens/m3/definitions/_md-comp-filled-icon-button.scss +0 -73
  544. package/core/tokens/m3/definitions/_md-comp-filled-text-field.scss +0 -189
  545. package/core/tokens/m3/definitions/_md-comp-icon-button.scss +0 -64
  546. package/core/tokens/m3/definitions/_md-comp-linear-progress-indicator.scss +0 -29
  547. package/core/tokens/m3/definitions/_md-comp-list.scss +0 -252
  548. package/core/tokens/m3/definitions/_md-comp-outlined-button.scss +0 -80
  549. package/core/tokens/m3/definitions/_md-comp-outlined-card.scss +0 -59
  550. package/core/tokens/m3/definitions/_md-comp-outlined-icon-button.scss +0 -73
  551. package/core/tokens/m3/definitions/_md-comp-outlined-text-field.scss +0 -171
  552. package/core/tokens/m3/definitions/_md-comp-plain-tooltip.scss +0 -51
  553. package/core/tokens/m3/definitions/_md-comp-radio-button.scss +0 -62
  554. package/core/tokens/m3/definitions/_md-comp-secondary-navigation-tab.scss +0 -80
  555. package/core/tokens/m3/definitions/_md-comp-slider.scss +0 -110
  556. package/core/tokens/m3/definitions/_md-comp-snackbar.scss +0 -125
  557. package/core/tokens/m3/definitions/_md-comp-switch.scss +0 -130
  558. package/core/tokens/m3/definitions/_md-comp-text-button.scss +0 -73
  559. package/core/tokens/m3/definitions/unused/_md-comp-assist-chip.scss +0 -105
  560. package/core/tokens/m3/definitions/unused/_md-comp-badge.scss +0 -54
  561. package/core/tokens/m3/definitions/unused/_md-comp-banner.scss +0 -71
  562. package/core/tokens/m3/definitions/unused/_md-comp-bottom-app-bar.scss +0 -29
  563. package/core/tokens/m3/definitions/unused/_md-comp-carousel-item.scss +0 -59
  564. package/core/tokens/m3/definitions/unused/_md-comp-date-input-modal.scss +0 -87
  565. package/core/tokens/m3/definitions/unused/_md-comp-date-picker-docked.scss +0 -248
  566. package/core/tokens/m3/definitions/unused/_md-comp-date-picker-modal.scss +0 -313
  567. package/core/tokens/m3/definitions/unused/_md-comp-divider.scss +0 -19
  568. package/core/tokens/m3/definitions/unused/_md-comp-extended-fab-branded.scss +0 -82
  569. package/core/tokens/m3/definitions/unused/_md-comp-extended-fab-surface.scss +0 -86
  570. package/core/tokens/m3/definitions/unused/_md-comp-fab-branded-large.scss +0 -54
  571. package/core/tokens/m3/definitions/unused/_md-comp-fab-branded.scss +0 -54
  572. package/core/tokens/m3/definitions/unused/_md-comp-fab-primary-large.scss +0 -59
  573. package/core/tokens/m3/definitions/unused/_md-comp-fab-secondary-large.scss +0 -60
  574. package/core/tokens/m3/definitions/unused/_md-comp-fab-surface-large.scss +0 -58
  575. package/core/tokens/m3/definitions/unused/_md-comp-fab-surface-small.scss +0 -58
  576. package/core/tokens/m3/definitions/unused/_md-comp-fab-surface.scss +0 -58
  577. package/core/tokens/m3/definitions/unused/_md-comp-fab-tertiary-large.scss +0 -60
  578. package/core/tokens/m3/definitions/unused/_md-comp-filled-autocomplete.scss +0 -269
  579. package/core/tokens/m3/definitions/unused/_md-comp-filled-menu-button.scss +0 -94
  580. package/core/tokens/m3/definitions/unused/_md-comp-filled-select.scss +0 -274
  581. package/core/tokens/m3/definitions/unused/_md-comp-filled-tonal-button.scss +0 -95
  582. package/core/tokens/m3/definitions/unused/_md-comp-filled-tonal-icon-button.scss +0 -80
  583. package/core/tokens/m3/definitions/unused/_md-comp-filter-chip.scss +0 -205
  584. package/core/tokens/m3/definitions/unused/_md-comp-full-screen-dialog.scss +0 -109
  585. package/core/tokens/m3/definitions/unused/_md-comp-input-chip.scss +0 -180
  586. package/core/tokens/m3/definitions/unused/_md-comp-menu.scss +0 -31
  587. package/core/tokens/m3/definitions/unused/_md-comp-navigation-bar.scss +0 -110
  588. package/core/tokens/m3/definitions/unused/_md-comp-navigation-drawer.scss +0 -162
  589. package/core/tokens/m3/definitions/unused/_md-comp-navigation-rail.scss +0 -127
  590. package/core/tokens/m3/definitions/unused/_md-comp-outlined-autocomplete.scss +0 -259
  591. package/core/tokens/m3/definitions/unused/_md-comp-outlined-menu-button.scss +0 -90
  592. package/core/tokens/m3/definitions/unused/_md-comp-outlined-segmented-button.scss +0 -108
  593. package/core/tokens/m3/definitions/unused/_md-comp-outlined-select.scss +0 -264
  594. package/core/tokens/m3/definitions/unused/_md-comp-primary-navigation-tab.scss +0 -117
  595. package/core/tokens/m3/definitions/unused/_md-comp-rich-tooltip.scss +0 -121
  596. package/core/tokens/m3/definitions/unused/_md-comp-scrim.scss +0 -19
  597. package/core/tokens/m3/definitions/unused/_md-comp-search-bar.scss +0 -97
  598. package/core/tokens/m3/definitions/unused/_md-comp-search-view.scss +0 -91
  599. package/core/tokens/m3/definitions/unused/_md-comp-sheet-bottom.scss +0 -39
  600. package/core/tokens/m3/definitions/unused/_md-comp-sheet-floating.scss +0 -28
  601. package/core/tokens/m3/definitions/unused/_md-comp-sheet-side.scss +0 -87
  602. package/core/tokens/m3/definitions/unused/_md-comp-standard-menu-button.scss +0 -94
  603. package/core/tokens/m3/definitions/unused/_md-comp-suggestion-chip.scss +0 -121
  604. package/core/tokens/m3/definitions/unused/_md-comp-time-input.scss +0 -222
  605. package/core/tokens/m3/definitions/unused/_md-comp-time-picker.scss +0 -268
  606. package/core/tokens/m3/definitions/unused/_md-comp-top-app-bar-large.scss +0 -59
  607. package/core/tokens/m3/definitions/unused/_md-comp-top-app-bar-medium.scss +0 -59
  608. package/core/tokens/m3/definitions/unused/_md-comp-top-app-bar-small-centered.scss +0 -62
  609. package/core/tokens/m3/definitions/unused/_md-comp-top-app-bar-small.scss +0 -60
  610. package/core/tokens/m3/mat/_card.scss +0 -24
  611. package/core/tokens/m3/mat/_checkbox.scss +0 -26
  612. package/core/tokens/m3/mat/_chip.scss +0 -46
  613. package/core/tokens/m3/mat/_dialog.scss +0 -32
  614. package/core/tokens/m3/mat/_fab-small.scss +0 -50
  615. package/core/tokens/m3/mat/_fab.scss +0 -50
  616. package/core/tokens/m3/mat/_filled-button.scss +0 -54
  617. package/core/tokens/m3/mat/_form-field.scss +0 -59
  618. package/core/tokens/m3/mat/_full-pseudo-checkbox.scss +0 -42
  619. package/core/tokens/m3/mat/_list.scss +0 -19
  620. package/core/tokens/m3/mat/_minimal-pseudo-checkbox.scss +0 -33
  621. package/core/tokens/m3/mat/_option.scss +0 -55
  622. package/core/tokens/m3/mat/_outlined-button.scss +0 -54
  623. package/core/tokens/m3/mat/_protected-button.scss +0 -55
  624. package/core/tokens/m3/mat/_radio.scss +0 -45
  625. package/core/tokens/m3/mat/_slider.scss +0 -58
  626. package/core/tokens/m3/mat/_snack-bar.scss +0 -18
  627. package/core/tokens/m3/mat/_stepper.scss +0 -79
  628. package/core/tokens/m3/mat/_switch.scss +0 -56
  629. package/core/tokens/m3/mat/_tab-header.scss +0 -51
  630. package/core/tokens/m3/mat/_table.scss +0 -29
  631. package/core/tokens/m3/mat/_text-button.scss +0 -55
  632. package/core/tokens/m3/mdc/_checkbox.scss +0 -112
  633. package/core/tokens/m3/mdc/_chip.scss +0 -93
  634. package/core/tokens/m3/mdc/_dialog.scss +0 -23
  635. package/core/tokens/m3/mdc/_elevated-card.scss +0 -22
  636. package/core/tokens/m3/mdc/_extended-fab.scss +0 -42
  637. package/core/tokens/m3/mdc/_fab-small.scss +0 -41
  638. package/core/tokens/m3/mdc/_fab.scss +0 -39
  639. package/core/tokens/m3/mdc/_filled-button.scss +0 -86
  640. package/core/tokens/m3/mdc/_filled-text-field.scss +0 -91
  641. package/core/tokens/m3/mdc/_icon-button.scss +0 -60
  642. package/core/tokens/m3/mdc/_list.scss +0 -37
  643. package/core/tokens/m3/mdc/_outlined-button.scss +0 -84
  644. package/core/tokens/m3/mdc/_outlined-card.scss +0 -22
  645. package/core/tokens/m3/mdc/_outlined-text-field.scss +0 -86
  646. package/core/tokens/m3/mdc/_plain-tooltip.scss +0 -15
  647. package/core/tokens/m3/mdc/_protected-button.scss +0 -101
  648. package/core/tokens/m3/mdc/_radio.scss +0 -47
  649. package/core/tokens/m3/mdc/_secondary-navigation-tab.scss +0 -16
  650. package/core/tokens/m3/mdc/_slider.scss +0 -69
  651. package/core/tokens/m3/mdc/_snack-bar.scss +0 -15
  652. package/core/tokens/m3/mdc/_switch.scss +0 -82
  653. package/core/tokens/m3/mdc/_tab-indicator.scss +0 -34
  654. package/core/tokens/m3/mdc/_text-button.scss +0 -79
  655. package/core/typography/_typography-utils-deprecated.scss +0 -6
  656. package/datepicker/_datepicker-legacy-compat.scss +0 -85
  657. package/divider/_divider-offset.scss +0 -12
  658. package/expansion/_expansion-variables.scss +0 -30
  659. package/form-field/_form-field-focus-overlay.scss +0 -31
  660. package/form-field/_form-field-high-contrast.scss +0 -39
  661. package/form-field/_form-field-native-select.scss +0 -97
  662. package/form-field/_form-field-subscript.scss +0 -95
  663. package/form-field/_mdc-text-field-density-overrides.scss +0 -60
  664. package/form-field/_mdc-text-field-structure-overrides.scss +0 -186
  665. package/form-field/_mdc-text-field-structure.scss +0 -621
  666. package/form-field/_mdc-text-field-textarea-overrides.scss +0 -36
  667. package/form-field/_user-agent-overrides.scss +0 -24
  668. package/list/_list-inherited-structure.scss +0 -504
  669. package/list/_list-item-hcm-indicator.scss +0 -29
  670. package/radio/_radio-common.scss +0 -259
  671. package/schematics/ng-add/fonts/material-fonts.mjs +0 -34
  672. package/schematics/ng-add/index.mjs +0 -54
  673. package/schematics/ng-add/package-config.mjs +0 -51
  674. package/schematics/ng-add/schema.mjs +0 -10
  675. package/schematics/ng-add/setup-project.mjs +0 -75
  676. package/schematics/ng-add/theming/create-custom-theme.mjs +0 -30
  677. package/schematics/ng-add/theming/theming.mjs +0 -151
  678. package/schematics/ng-generate/address-form/index.mjs +0 -43
  679. package/schematics/ng-generate/address-form/schema.mjs +0 -10
  680. package/schematics/ng-generate/dashboard/index.mjs +0 -42
  681. package/schematics/ng-generate/dashboard/schema.mjs +0 -10
  682. package/schematics/ng-generate/navigation/index.mjs +0 -42
  683. package/schematics/ng-generate/navigation/schema.mjs +0 -10
  684. package/schematics/ng-generate/table/index.mjs +0 -40
  685. package/schematics/ng-generate/table/schema.mjs +0 -10
  686. package/schematics/ng-generate/tree/index.mjs +0 -40
  687. package/schematics/ng-generate/tree/schema.mjs +0 -10
  688. package/schematics/schematics.externs.js +0 -0
  689. package/stepper/_stepper-variables.scss +0 -29
  690. package/table/_table-flex-styles.scss +0 -61
  691. package/tabs/_tabs-common.scss +0 -497
  692. package/toolbar/_toolbar-variables.scss +0 -28
  693. /package/core/tokens/m3/{definitions/_md-ref-palette.scss → _md-ref-palette.scss} +0 -0
  694. /package/core/tokens/m3/{definitions/_md-ref-typeface.scss → _md-ref-typeface.scss} +0 -0
  695. /package/core/tokens/m3/{definitions/_md-sys-elevation.scss → _md-sys-elevation.scss} +0 -0
  696. /package/core/tokens/m3/{definitions/_md-sys-motion.scss → _md-sys-motion.scss} +0 -0
  697. /package/core/tokens/m3/{definitions/_md-sys-shape.scss → _md-sys-shape.scss} +0 -0
  698. /package/core/tokens/m3/{definitions/_md-sys-state.scss → _md-sys-state.scss} +0 -0
@@ -0,0 +1,638 @@
1
+ import * as i1 from '@angular/common/http';
2
+ import { HttpClient } from '@angular/common/http';
3
+ import * as i0 from '@angular/core';
4
+ import { SecurityContext, DOCUMENT, Injectable, Optional, Inject, SkipSelf, ErrorHandler } from '@angular/core';
5
+ import * as i2 from '@angular/platform-browser';
6
+ import { DomSanitizer } from '@angular/platform-browser';
7
+ import { of, throwError, forkJoin } from 'rxjs';
8
+ import { tap, map, catchError, finalize, share } from 'rxjs/operators';
9
+
10
+ /**
11
+ * The Trusted Types policy, or null if Trusted Types are not
12
+ * enabled/supported, or undefined if the policy has not been created yet.
13
+ */
14
+ let policy;
15
+ /**
16
+ * Returns the Trusted Types policy, or null if Trusted Types are not
17
+ * enabled/supported. The first call to this function will create the policy.
18
+ */
19
+ function getPolicy() {
20
+ if (policy === undefined) {
21
+ policy = null;
22
+ if (typeof window !== 'undefined') {
23
+ const ttWindow = window;
24
+ if (ttWindow.trustedTypes !== undefined) {
25
+ policy = ttWindow.trustedTypes.createPolicy('angular#components', {
26
+ createHTML: (s) => s,
27
+ });
28
+ }
29
+ }
30
+ }
31
+ return policy;
32
+ }
33
+ /**
34
+ * Unsafely promote a string to a TrustedHTML, falling back to strings when
35
+ * Trusted Types are not available.
36
+ * @security This is a security-sensitive function; any use of this function
37
+ * must go through security review. In particular, it must be assured that the
38
+ * provided string will never cause an XSS vulnerability if used in a context
39
+ * that will be interpreted as HTML by a browser, e.g. when assigning to
40
+ * element.innerHTML.
41
+ */
42
+ function trustedHTMLFromString(html) {
43
+ return getPolicy()?.createHTML(html) || html;
44
+ }
45
+
46
+ /**
47
+ * Returns an exception to be thrown in the case when attempting to
48
+ * load an icon with a name that cannot be found.
49
+ * @docs-private
50
+ */
51
+ function getMatIconNameNotFoundError(iconName) {
52
+ return Error(`Unable to find icon with the name "${iconName}"`);
53
+ }
54
+ /**
55
+ * Returns an exception to be thrown when the consumer attempts to use
56
+ * `<mat-icon>` without including @angular/common/http.
57
+ * @docs-private
58
+ */
59
+ function getMatIconNoHttpProviderError() {
60
+ return Error('Could not find HttpClient for use with Angular Material icons. ' +
61
+ 'Please add provideHttpClient() to your providers.');
62
+ }
63
+ /**
64
+ * Returns an exception to be thrown when a URL couldn't be sanitized.
65
+ * @param url URL that was attempted to be sanitized.
66
+ * @docs-private
67
+ */
68
+ function getMatIconFailedToSanitizeUrlError(url) {
69
+ return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL ` +
70
+ `via Angular's DomSanitizer. Attempted URL was "${url}".`);
71
+ }
72
+ /**
73
+ * Returns an exception to be thrown when a HTML string couldn't be sanitized.
74
+ * @param literal HTML that was attempted to be sanitized.
75
+ * @docs-private
76
+ */
77
+ function getMatIconFailedToSanitizeLiteralError(literal) {
78
+ return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by ` +
79
+ `Angular's DomSanitizer. Attempted literal was "${literal}".`);
80
+ }
81
+ /**
82
+ * Configuration for an icon, including the URL and possibly the cached SVG element.
83
+ * @docs-private
84
+ */
85
+ class SvgIconConfig {
86
+ url;
87
+ svgText;
88
+ options;
89
+ svgElement;
90
+ constructor(url, svgText, options) {
91
+ this.url = url;
92
+ this.svgText = svgText;
93
+ this.options = options;
94
+ }
95
+ }
96
+ /**
97
+ * Service to register and display icons used by the `<mat-icon>` component.
98
+ * - Registers icon URLs by namespace and name.
99
+ * - Registers icon set URLs by namespace.
100
+ * - Registers aliases for CSS classes, for use with icon fonts.
101
+ * - Loads icons from URLs and extracts individual icons from icon sets.
102
+ */
103
+ class MatIconRegistry {
104
+ _httpClient;
105
+ _sanitizer;
106
+ _errorHandler;
107
+ _document;
108
+ /**
109
+ * URLs and cached SVG elements for individual icons. Keys are of the format "[namespace]:[icon]".
110
+ */
111
+ _svgIconConfigs = new Map();
112
+ /**
113
+ * SvgIconConfig objects and cached SVG elements for icon sets, keyed by namespace.
114
+ * Multiple icon sets can be registered under the same namespace.
115
+ */
116
+ _iconSetConfigs = new Map();
117
+ /** Cache for icons loaded by direct URLs. */
118
+ _cachedIconsByUrl = new Map();
119
+ /** In-progress icon fetches. Used to coalesce multiple requests to the same URL. */
120
+ _inProgressUrlFetches = new Map();
121
+ /** Map from font identifiers to their CSS class names. Used for icon fonts. */
122
+ _fontCssClassesByAlias = new Map();
123
+ /** Registered icon resolver functions. */
124
+ _resolvers = [];
125
+ /**
126
+ * The CSS classes to apply when an `<mat-icon>` component has no icon name, url, or font
127
+ * specified. The default 'material-icons' value assumes that the material icon font has been
128
+ * loaded as described at https://google.github.io/material-design-icons/#icon-font-for-the-web
129
+ */
130
+ _defaultFontSetClass = ['material-icons', 'mat-ligature-font'];
131
+ constructor(_httpClient, _sanitizer, document, _errorHandler) {
132
+ this._httpClient = _httpClient;
133
+ this._sanitizer = _sanitizer;
134
+ this._errorHandler = _errorHandler;
135
+ this._document = document;
136
+ }
137
+ /**
138
+ * Registers an icon by URL in the default namespace.
139
+ * @param iconName Name under which the icon should be registered.
140
+ * @param url
141
+ */
142
+ addSvgIcon(iconName, url, options) {
143
+ return this.addSvgIconInNamespace('', iconName, url, options);
144
+ }
145
+ /**
146
+ * Registers an icon using an HTML string in the default namespace.
147
+ * @param iconName Name under which the icon should be registered.
148
+ * @param literal SVG source of the icon.
149
+ */
150
+ addSvgIconLiteral(iconName, literal, options) {
151
+ return this.addSvgIconLiteralInNamespace('', iconName, literal, options);
152
+ }
153
+ /**
154
+ * Registers an icon by URL in the specified namespace.
155
+ * @param namespace Namespace in which the icon should be registered.
156
+ * @param iconName Name under which the icon should be registered.
157
+ * @param url
158
+ */
159
+ addSvgIconInNamespace(namespace, iconName, url, options) {
160
+ return this._addSvgIconConfig(namespace, iconName, new SvgIconConfig(url, null, options));
161
+ }
162
+ /**
163
+ * Registers an icon resolver function with the registry. The function will be invoked with the
164
+ * name and namespace of an icon when the registry tries to resolve the URL from which to fetch
165
+ * the icon. The resolver is expected to return a `SafeResourceUrl` that points to the icon,
166
+ * an object with the icon URL and icon options, or `null` if the icon is not supported. Resolvers
167
+ * will be invoked in the order in which they have been registered.
168
+ * @param resolver Resolver function to be registered.
169
+ */
170
+ addSvgIconResolver(resolver) {
171
+ this._resolvers.push(resolver);
172
+ return this;
173
+ }
174
+ /**
175
+ * Registers an icon using an HTML string in the specified namespace.
176
+ * @param namespace Namespace in which the icon should be registered.
177
+ * @param iconName Name under which the icon should be registered.
178
+ * @param literal SVG source of the icon.
179
+ */
180
+ addSvgIconLiteralInNamespace(namespace, iconName, literal, options) {
181
+ const cleanLiteral = this._sanitizer.sanitize(SecurityContext.HTML, literal);
182
+ // TODO: add an ngDevMode check
183
+ if (!cleanLiteral) {
184
+ throw getMatIconFailedToSanitizeLiteralError(literal);
185
+ }
186
+ // Security: The literal is passed in as SafeHtml, and is thus trusted.
187
+ const trustedLiteral = trustedHTMLFromString(cleanLiteral);
188
+ return this._addSvgIconConfig(namespace, iconName, new SvgIconConfig('', trustedLiteral, options));
189
+ }
190
+ /**
191
+ * Registers an icon set by URL in the default namespace.
192
+ * @param url
193
+ */
194
+ addSvgIconSet(url, options) {
195
+ return this.addSvgIconSetInNamespace('', url, options);
196
+ }
197
+ /**
198
+ * Registers an icon set using an HTML string in the default namespace.
199
+ * @param literal SVG source of the icon set.
200
+ */
201
+ addSvgIconSetLiteral(literal, options) {
202
+ return this.addSvgIconSetLiteralInNamespace('', literal, options);
203
+ }
204
+ /**
205
+ * Registers an icon set by URL in the specified namespace.
206
+ * @param namespace Namespace in which to register the icon set.
207
+ * @param url
208
+ */
209
+ addSvgIconSetInNamespace(namespace, url, options) {
210
+ return this._addSvgIconSetConfig(namespace, new SvgIconConfig(url, null, options));
211
+ }
212
+ /**
213
+ * Registers an icon set using an HTML string in the specified namespace.
214
+ * @param namespace Namespace in which to register the icon set.
215
+ * @param literal SVG source of the icon set.
216
+ */
217
+ addSvgIconSetLiteralInNamespace(namespace, literal, options) {
218
+ const cleanLiteral = this._sanitizer.sanitize(SecurityContext.HTML, literal);
219
+ if (!cleanLiteral) {
220
+ throw getMatIconFailedToSanitizeLiteralError(literal);
221
+ }
222
+ // Security: The literal is passed in as SafeHtml, and is thus trusted.
223
+ const trustedLiteral = trustedHTMLFromString(cleanLiteral);
224
+ return this._addSvgIconSetConfig(namespace, new SvgIconConfig('', trustedLiteral, options));
225
+ }
226
+ /**
227
+ * Defines an alias for CSS class names to be used for icon fonts. Creating an matIcon
228
+ * component with the alias as the fontSet input will cause the class name to be applied
229
+ * to the `<mat-icon>` element.
230
+ *
231
+ * If the registered font is a ligature font, then don't forget to also include the special
232
+ * class `mat-ligature-font` to allow the usage via attribute. So register like this:
233
+ *
234
+ * ```ts
235
+ * iconRegistry.registerFontClassAlias('f1', 'font1 mat-ligature-font');
236
+ * ```
237
+ *
238
+ * And use like this:
239
+ *
240
+ * ```html
241
+ * <mat-icon fontSet="f1" fontIcon="home"></mat-icon>
242
+ * ```
243
+ *
244
+ * @param alias Alias for the font.
245
+ * @param classNames Class names override to be used instead of the alias.
246
+ */
247
+ registerFontClassAlias(alias, classNames = alias) {
248
+ this._fontCssClassesByAlias.set(alias, classNames);
249
+ return this;
250
+ }
251
+ /**
252
+ * Returns the CSS class name associated with the alias by a previous call to
253
+ * registerFontClassAlias. If no CSS class has been associated, returns the alias unmodified.
254
+ */
255
+ classNameForFontAlias(alias) {
256
+ return this._fontCssClassesByAlias.get(alias) || alias;
257
+ }
258
+ /**
259
+ * Sets the CSS classes to be used for icon fonts when an `<mat-icon>` component does not
260
+ * have a fontSet input value, and is not loading an icon by name or URL.
261
+ */
262
+ setDefaultFontSetClass(...classNames) {
263
+ this._defaultFontSetClass = classNames;
264
+ return this;
265
+ }
266
+ /**
267
+ * Returns the CSS classes to be used for icon fonts when an `<mat-icon>` component does not
268
+ * have a fontSet input value, and is not loading an icon by name or URL.
269
+ */
270
+ getDefaultFontSetClass() {
271
+ return this._defaultFontSetClass;
272
+ }
273
+ /**
274
+ * Returns an Observable that produces the icon (as an `<svg>` DOM element) from the given URL.
275
+ * The response from the URL may be cached so this will not always cause an HTTP request, but
276
+ * the produced element will always be a new copy of the originally fetched icon. (That is,
277
+ * it will not contain any modifications made to elements previously returned).
278
+ *
279
+ * @param safeUrl URL from which to fetch the SVG icon.
280
+ */
281
+ getSvgIconFromUrl(safeUrl) {
282
+ const url = this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, safeUrl);
283
+ if (!url) {
284
+ throw getMatIconFailedToSanitizeUrlError(safeUrl);
285
+ }
286
+ const cachedIcon = this._cachedIconsByUrl.get(url);
287
+ if (cachedIcon) {
288
+ return of(cloneSvg(cachedIcon));
289
+ }
290
+ return this._loadSvgIconFromConfig(new SvgIconConfig(safeUrl, null)).pipe(tap(svg => this._cachedIconsByUrl.set(url, svg)), map(svg => cloneSvg(svg)));
291
+ }
292
+ /**
293
+ * Returns an Observable that produces the icon (as an `<svg>` DOM element) with the given name
294
+ * and namespace. The icon must have been previously registered with addIcon or addIconSet;
295
+ * if not, the Observable will throw an error.
296
+ *
297
+ * @param name Name of the icon to be retrieved.
298
+ * @param namespace Namespace in which to look for the icon.
299
+ */
300
+ getNamedSvgIcon(name, namespace = '') {
301
+ const key = iconKey(namespace, name);
302
+ let config = this._svgIconConfigs.get(key);
303
+ // Return (copy of) cached icon if possible.
304
+ if (config) {
305
+ return this._getSvgFromConfig(config);
306
+ }
307
+ // Otherwise try to resolve the config from one of the resolver functions.
308
+ config = this._getIconConfigFromResolvers(namespace, name);
309
+ if (config) {
310
+ this._svgIconConfigs.set(key, config);
311
+ return this._getSvgFromConfig(config);
312
+ }
313
+ // See if we have any icon sets registered for the namespace.
314
+ const iconSetConfigs = this._iconSetConfigs.get(namespace);
315
+ if (iconSetConfigs) {
316
+ return this._getSvgFromIconSetConfigs(name, iconSetConfigs);
317
+ }
318
+ return throwError(getMatIconNameNotFoundError(key));
319
+ }
320
+ ngOnDestroy() {
321
+ this._resolvers = [];
322
+ this._svgIconConfigs.clear();
323
+ this._iconSetConfigs.clear();
324
+ this._cachedIconsByUrl.clear();
325
+ }
326
+ /**
327
+ * Returns the cached icon for a SvgIconConfig if available, or fetches it from its URL if not.
328
+ */
329
+ _getSvgFromConfig(config) {
330
+ if (config.svgText) {
331
+ // We already have the SVG element for this icon, return a copy.
332
+ return of(cloneSvg(this._svgElementFromConfig(config)));
333
+ }
334
+ else {
335
+ // Fetch the icon from the config's URL, cache it, and return a copy.
336
+ return this._loadSvgIconFromConfig(config).pipe(map(svg => cloneSvg(svg)));
337
+ }
338
+ }
339
+ /**
340
+ * Attempts to find an icon with the specified name in any of the SVG icon sets.
341
+ * First searches the available cached icons for a nested element with a matching name, and
342
+ * if found copies the element to a new `<svg>` element. If not found, fetches all icon sets
343
+ * that have not been cached, and searches again after all fetches are completed.
344
+ * The returned Observable produces the SVG element if possible, and throws
345
+ * an error if no icon with the specified name can be found.
346
+ */
347
+ _getSvgFromIconSetConfigs(name, iconSetConfigs) {
348
+ // For all the icon set SVG elements we've fetched, see if any contain an icon with the
349
+ // requested name.
350
+ const namedIcon = this._extractIconWithNameFromAnySet(name, iconSetConfigs);
351
+ if (namedIcon) {
352
+ // We could cache namedIcon in _svgIconConfigs, but since we have to make a copy every
353
+ // time anyway, there's probably not much advantage compared to just always extracting
354
+ // it from the icon set.
355
+ return of(namedIcon);
356
+ }
357
+ // Not found in any cached icon sets. If there are icon sets with URLs that we haven't
358
+ // fetched, fetch them now and look for iconName in the results.
359
+ const iconSetFetchRequests = iconSetConfigs
360
+ .filter(iconSetConfig => !iconSetConfig.svgText)
361
+ .map(iconSetConfig => {
362
+ return this._loadSvgIconSetFromConfig(iconSetConfig).pipe(catchError((err) => {
363
+ const url = this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, iconSetConfig.url);
364
+ // Swallow errors fetching individual URLs so the
365
+ // combined Observable won't necessarily fail.
366
+ const errorMessage = `Loading icon set URL: ${url} failed: ${err.message}`;
367
+ this._errorHandler.handleError(new Error(errorMessage));
368
+ return of(null);
369
+ }));
370
+ });
371
+ // Fetch all the icon set URLs. When the requests complete, every IconSet should have a
372
+ // cached SVG element (unless the request failed), and we can check again for the icon.
373
+ return forkJoin(iconSetFetchRequests).pipe(map(() => {
374
+ const foundIcon = this._extractIconWithNameFromAnySet(name, iconSetConfigs);
375
+ // TODO: add an ngDevMode check
376
+ if (!foundIcon) {
377
+ throw getMatIconNameNotFoundError(name);
378
+ }
379
+ return foundIcon;
380
+ }));
381
+ }
382
+ /**
383
+ * Searches the cached SVG elements for the given icon sets for a nested icon element whose "id"
384
+ * tag matches the specified name. If found, copies the nested element to a new SVG element and
385
+ * returns it. Returns null if no matching element is found.
386
+ */
387
+ _extractIconWithNameFromAnySet(iconName, iconSetConfigs) {
388
+ // Iterate backwards, so icon sets added later have precedence.
389
+ for (let i = iconSetConfigs.length - 1; i >= 0; i--) {
390
+ const config = iconSetConfigs[i];
391
+ // Parsing the icon set's text into an SVG element can be expensive. We can avoid some of
392
+ // the parsing by doing a quick check using `indexOf` to see if there's any chance for the
393
+ // icon to be in the set. This won't be 100% accurate, but it should help us avoid at least
394
+ // some of the parsing.
395
+ if (config.svgText && config.svgText.toString().indexOf(iconName) > -1) {
396
+ const svg = this._svgElementFromConfig(config);
397
+ const foundIcon = this._extractSvgIconFromSet(svg, iconName, config.options);
398
+ if (foundIcon) {
399
+ return foundIcon;
400
+ }
401
+ }
402
+ }
403
+ return null;
404
+ }
405
+ /**
406
+ * Loads the content of the icon URL specified in the SvgIconConfig and creates an SVG element
407
+ * from it.
408
+ */
409
+ _loadSvgIconFromConfig(config) {
410
+ return this._fetchIcon(config).pipe(tap(svgText => (config.svgText = svgText)), map(() => this._svgElementFromConfig(config)));
411
+ }
412
+ /**
413
+ * Loads the content of the icon set URL specified in the
414
+ * SvgIconConfig and attaches it to the config.
415
+ */
416
+ _loadSvgIconSetFromConfig(config) {
417
+ if (config.svgText) {
418
+ return of(null);
419
+ }
420
+ return this._fetchIcon(config).pipe(tap(svgText => (config.svgText = svgText)));
421
+ }
422
+ /**
423
+ * Searches the cached element of the given SvgIconConfig for a nested icon element whose "id"
424
+ * tag matches the specified name. If found, copies the nested element to a new SVG element and
425
+ * returns it. Returns null if no matching element is found.
426
+ */
427
+ _extractSvgIconFromSet(iconSet, iconName, options) {
428
+ // Use the `id="iconName"` syntax in order to escape special
429
+ // characters in the ID (versus using the #iconName syntax).
430
+ const iconSource = iconSet.querySelector(`[id="${iconName}"]`);
431
+ if (!iconSource) {
432
+ return null;
433
+ }
434
+ // Clone the element and remove the ID to prevent multiple elements from being added
435
+ // to the page with the same ID.
436
+ const iconElement = iconSource.cloneNode(true);
437
+ iconElement.removeAttribute('id');
438
+ // If the icon node is itself an <svg> node, clone and return it directly. If not, set it as
439
+ // the content of a new <svg> node.
440
+ if (iconElement.nodeName.toLowerCase() === 'svg') {
441
+ return this._setSvgAttributes(iconElement, options);
442
+ }
443
+ // If the node is a <symbol>, it won't be rendered so we have to convert it into <svg>. Note
444
+ // that the same could be achieved by referring to it via <use href="#id">, however the <use>
445
+ // tag is problematic on Firefox, because it needs to include the current page path.
446
+ if (iconElement.nodeName.toLowerCase() === 'symbol') {
447
+ return this._setSvgAttributes(this._toSvgElement(iconElement), options);
448
+ }
449
+ // createElement('SVG') doesn't work as expected; the DOM ends up with
450
+ // the correct nodes, but the SVG content doesn't render. Instead we
451
+ // have to create an empty SVG node using innerHTML and append its content.
452
+ // Elements created using DOMParser.parseFromString have the same problem.
453
+ // http://stackoverflow.com/questions/23003278/svg-innerhtml-in-firefox-can-not-display
454
+ const svg = this._svgElementFromString(trustedHTMLFromString('<svg></svg>'));
455
+ // Clone the node so we don't remove it from the parent icon set element.
456
+ svg.appendChild(iconElement);
457
+ return this._setSvgAttributes(svg, options);
458
+ }
459
+ /**
460
+ * Creates a DOM element from the given SVG string.
461
+ */
462
+ _svgElementFromString(str) {
463
+ const div = this._document.createElement('DIV');
464
+ div.innerHTML = str;
465
+ const svg = div.querySelector('svg');
466
+ // TODO: add an ngDevMode check
467
+ if (!svg) {
468
+ throw Error('<svg> tag not found');
469
+ }
470
+ return svg;
471
+ }
472
+ /**
473
+ * Converts an element into an SVG node by cloning all of its children.
474
+ */
475
+ _toSvgElement(element) {
476
+ const svg = this._svgElementFromString(trustedHTMLFromString('<svg></svg>'));
477
+ const attributes = element.attributes;
478
+ // Copy over all the attributes from the `symbol` to the new SVG, except the id.
479
+ for (let i = 0; i < attributes.length; i++) {
480
+ const { name, value } = attributes[i];
481
+ if (name !== 'id') {
482
+ svg.setAttribute(name, value);
483
+ }
484
+ }
485
+ for (let i = 0; i < element.childNodes.length; i++) {
486
+ if (element.childNodes[i].nodeType === this._document.ELEMENT_NODE) {
487
+ svg.appendChild(element.childNodes[i].cloneNode(true));
488
+ }
489
+ }
490
+ return svg;
491
+ }
492
+ /**
493
+ * Sets the default attributes for an SVG element to be used as an icon.
494
+ */
495
+ _setSvgAttributes(svg, options) {
496
+ svg.setAttribute('fit', '');
497
+ svg.setAttribute('height', '100%');
498
+ svg.setAttribute('width', '100%');
499
+ svg.setAttribute('preserveAspectRatio', 'xMidYMid meet');
500
+ svg.setAttribute('focusable', 'false'); // Disable IE11 default behavior to make SVGs focusable.
501
+ if (options && options.viewBox) {
502
+ svg.setAttribute('viewBox', options.viewBox);
503
+ }
504
+ return svg;
505
+ }
506
+ /**
507
+ * Returns an Observable which produces the string contents of the given icon. Results may be
508
+ * cached, so future calls with the same URL may not cause another HTTP request.
509
+ */
510
+ _fetchIcon(iconConfig) {
511
+ const { url: safeUrl, options } = iconConfig;
512
+ const withCredentials = options?.withCredentials ?? false;
513
+ if (!this._httpClient) {
514
+ throw getMatIconNoHttpProviderError();
515
+ }
516
+ // TODO: add an ngDevMode check
517
+ if (safeUrl == null) {
518
+ throw Error(`Cannot fetch icon from URL "${safeUrl}".`);
519
+ }
520
+ const url = this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, safeUrl);
521
+ // TODO: add an ngDevMode check
522
+ if (!url) {
523
+ throw getMatIconFailedToSanitizeUrlError(safeUrl);
524
+ }
525
+ // Store in-progress fetches to avoid sending a duplicate request for a URL when there is
526
+ // already a request in progress for that URL. It's necessary to call share() on the
527
+ // Observable returned by http.get() so that multiple subscribers don't cause multiple XHRs.
528
+ const inProgressFetch = this._inProgressUrlFetches.get(url);
529
+ if (inProgressFetch) {
530
+ return inProgressFetch;
531
+ }
532
+ const req = this._httpClient.get(url, { responseType: 'text', withCredentials }).pipe(map(svg => {
533
+ // Security: This SVG is fetched from a SafeResourceUrl, and is thus
534
+ // trusted HTML.
535
+ return trustedHTMLFromString(svg);
536
+ }), finalize(() => this._inProgressUrlFetches.delete(url)), share());
537
+ this._inProgressUrlFetches.set(url, req);
538
+ return req;
539
+ }
540
+ /**
541
+ * Registers an icon config by name in the specified namespace.
542
+ * @param namespace Namespace in which to register the icon config.
543
+ * @param iconName Name under which to register the config.
544
+ * @param config Config to be registered.
545
+ */
546
+ _addSvgIconConfig(namespace, iconName, config) {
547
+ this._svgIconConfigs.set(iconKey(namespace, iconName), config);
548
+ return this;
549
+ }
550
+ /**
551
+ * Registers an icon set config in the specified namespace.
552
+ * @param namespace Namespace in which to register the icon config.
553
+ * @param config Config to be registered.
554
+ */
555
+ _addSvgIconSetConfig(namespace, config) {
556
+ const configNamespace = this._iconSetConfigs.get(namespace);
557
+ if (configNamespace) {
558
+ configNamespace.push(config);
559
+ }
560
+ else {
561
+ this._iconSetConfigs.set(namespace, [config]);
562
+ }
563
+ return this;
564
+ }
565
+ /** Parses a config's text into an SVG element. */
566
+ _svgElementFromConfig(config) {
567
+ if (!config.svgElement) {
568
+ const svg = this._svgElementFromString(config.svgText);
569
+ this._setSvgAttributes(svg, config.options);
570
+ config.svgElement = svg;
571
+ }
572
+ return config.svgElement;
573
+ }
574
+ /** Tries to create an icon config through the registered resolver functions. */
575
+ _getIconConfigFromResolvers(namespace, name) {
576
+ for (let i = 0; i < this._resolvers.length; i++) {
577
+ const result = this._resolvers[i](name, namespace);
578
+ if (result) {
579
+ return isSafeUrlWithOptions(result)
580
+ ? new SvgIconConfig(result.url, null, result.options)
581
+ : new SvgIconConfig(result, null);
582
+ }
583
+ }
584
+ return undefined;
585
+ }
586
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.5", ngImport: i0, type: MatIconRegistry, deps: [{ token: i1.HttpClient, optional: true }, { token: i2.DomSanitizer }, { token: DOCUMENT, optional: true }, { token: i0.ErrorHandler }], target: i0.ɵɵFactoryTarget.Injectable });
587
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.5", ngImport: i0, type: MatIconRegistry, providedIn: 'root' });
588
+ }
589
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.5", ngImport: i0, type: MatIconRegistry, decorators: [{
590
+ type: Injectable,
591
+ args: [{ providedIn: 'root' }]
592
+ }], ctorParameters: () => [{ type: i1.HttpClient, decorators: [{
593
+ type: Optional
594
+ }] }, { type: i2.DomSanitizer }, { type: undefined, decorators: [{
595
+ type: Optional
596
+ }, {
597
+ type: Inject,
598
+ args: [DOCUMENT]
599
+ }] }, { type: i0.ErrorHandler }] });
600
+ /**
601
+ * @docs-private
602
+ * @deprecated No longer used, will be removed.
603
+ * @breaking-change 21.0.0
604
+ */
605
+ function ICON_REGISTRY_PROVIDER_FACTORY(parentRegistry, httpClient, sanitizer, errorHandler, document) {
606
+ return parentRegistry || new MatIconRegistry(httpClient, sanitizer, document, errorHandler);
607
+ }
608
+ /**
609
+ * @docs-private
610
+ * @deprecated No longer used, will be removed.
611
+ * @breaking-change 21.0.0
612
+ */
613
+ const ICON_REGISTRY_PROVIDER = {
614
+ // If there is already an MatIconRegistry available, use that. Otherwise, provide a new one.
615
+ provide: MatIconRegistry,
616
+ deps: [
617
+ [new Optional(), new SkipSelf(), MatIconRegistry],
618
+ [new Optional(), HttpClient],
619
+ DomSanitizer,
620
+ ErrorHandler,
621
+ [new Optional(), DOCUMENT],
622
+ ],
623
+ useFactory: ICON_REGISTRY_PROVIDER_FACTORY,
624
+ };
625
+ /** Clones an SVGElement while preserving type information. */
626
+ function cloneSvg(svg) {
627
+ return svg.cloneNode(true);
628
+ }
629
+ /** Returns the cache key to use for an icon namespace and name. */
630
+ function iconKey(namespace, name) {
631
+ return namespace + ':' + name;
632
+ }
633
+ function isSafeUrlWithOptions(value) {
634
+ return !!(value.url && value.options);
635
+ }
636
+
637
+ export { ICON_REGISTRY_PROVIDER_FACTORY as I, MatIconRegistry as M, getMatIconNoHttpProviderError as a, getMatIconFailedToSanitizeUrlError as b, getMatIconFailedToSanitizeLiteralError as c, ICON_REGISTRY_PROVIDER as d, getMatIconNameNotFoundError as g };
638
+ //# sourceMappingURL=icon-registry-Bk5cM8Z5.mjs.map