@angular/material 11.0.3 → 11.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (594) hide show
  1. package/LICENSE +1 -1
  2. package/_theming.scss +392 -351
  3. package/autocomplete/_autocomplete-theme.scss +4 -5
  4. package/autocomplete/autocomplete.d.ts +7 -1
  5. package/autocomplete/index.metadata.json +1 -1
  6. package/autocomplete/testing/autocomplete-harness.d.ts +29 -15
  7. package/badge/_badge-theme.scss +2 -3
  8. package/bottom-sheet/_bottom-sheet-theme.scss +4 -5
  9. package/bundles/material-autocomplete-testing.umd.js +54 -36
  10. package/bundles/material-autocomplete-testing.umd.js.map +1 -1
  11. package/bundles/material-autocomplete-testing.umd.min.js +2 -2
  12. package/bundles/material-autocomplete-testing.umd.min.js.map +1 -1
  13. package/bundles/material-autocomplete.umd.js +32 -10
  14. package/bundles/material-autocomplete.umd.js.map +1 -1
  15. package/bundles/material-autocomplete.umd.min.js +3 -3
  16. package/bundles/material-autocomplete.umd.min.js.map +1 -1
  17. package/bundles/material-badge-testing.umd.js +9 -1
  18. package/bundles/material-badge-testing.umd.js.map +1 -1
  19. package/bundles/material-badge-testing.umd.min.js +1 -1
  20. package/bundles/material-badge-testing.umd.min.js.map +1 -1
  21. package/bundles/material-badge.umd.js +9 -1
  22. package/bundles/material-badge.umd.js.map +1 -1
  23. package/bundles/material-badge.umd.min.js +3 -3
  24. package/bundles/material-badge.umd.min.js.map +1 -1
  25. package/bundles/material-bottom-sheet-testing.umd.js +9 -1
  26. package/bundles/material-bottom-sheet-testing.umd.js.map +1 -1
  27. package/bundles/material-bottom-sheet-testing.umd.min.js +1 -1
  28. package/bundles/material-bottom-sheet-testing.umd.min.js.map +1 -1
  29. package/bundles/material-bottom-sheet.umd.js +9 -1
  30. package/bundles/material-bottom-sheet.umd.js.map +1 -1
  31. package/bundles/material-bottom-sheet.umd.min.js +1 -1
  32. package/bundles/material-bottom-sheet.umd.min.js.map +1 -1
  33. package/bundles/material-button-testing.umd.js +9 -1
  34. package/bundles/material-button-testing.umd.js.map +1 -1
  35. package/bundles/material-button-testing.umd.min.js +1 -1
  36. package/bundles/material-button-testing.umd.min.js.map +1 -1
  37. package/bundles/material-button-toggle-testing.umd.js +9 -1
  38. package/bundles/material-button-toggle-testing.umd.js.map +1 -1
  39. package/bundles/material-button-toggle-testing.umd.min.js +1 -1
  40. package/bundles/material-button-toggle-testing.umd.min.js.map +1 -1
  41. package/bundles/material-button-toggle.umd.js +9 -1
  42. package/bundles/material-button-toggle.umd.js.map +1 -1
  43. package/bundles/material-button-toggle.umd.min.js +1 -1
  44. package/bundles/material-button-toggle.umd.min.js.map +1 -1
  45. package/bundles/material-button.umd.js +17 -5
  46. package/bundles/material-button.umd.js.map +1 -1
  47. package/bundles/material-button.umd.min.js +1 -1
  48. package/bundles/material-button.umd.min.js.map +1 -1
  49. package/bundles/material-card-testing.umd.js +9 -1
  50. package/bundles/material-card-testing.umd.js.map +1 -1
  51. package/bundles/material-card-testing.umd.min.js +1 -1
  52. package/bundles/material-card-testing.umd.min.js.map +1 -1
  53. package/bundles/material-checkbox-testing.umd.js +73 -64
  54. package/bundles/material-checkbox-testing.umd.js.map +1 -1
  55. package/bundles/material-checkbox-testing.umd.min.js +2 -2
  56. package/bundles/material-checkbox-testing.umd.min.js.map +1 -1
  57. package/bundles/material-checkbox.umd.js +15 -3
  58. package/bundles/material-checkbox.umd.js.map +1 -1
  59. package/bundles/material-checkbox.umd.min.js +2 -2
  60. package/bundles/material-checkbox.umd.min.js.map +1 -1
  61. package/bundles/material-chips-testing.umd.js +189 -29
  62. package/bundles/material-chips-testing.umd.js.map +1 -1
  63. package/bundles/material-chips-testing.umd.min.js +2 -2
  64. package/bundles/material-chips-testing.umd.min.js.map +1 -1
  65. package/bundles/material-chips.umd.js +9 -1
  66. package/bundles/material-chips.umd.js.map +1 -1
  67. package/bundles/material-chips.umd.min.js +4 -4
  68. package/bundles/material-chips.umd.min.js.map +1 -1
  69. package/bundles/material-core-testing.umd.js +14 -3
  70. package/bundles/material-core-testing.umd.js.map +1 -1
  71. package/bundles/material-core-testing.umd.min.js +1 -1
  72. package/bundles/material-core-testing.umd.min.js.map +1 -1
  73. package/bundles/material-core.umd.js +55 -14
  74. package/bundles/material-core.umd.js.map +1 -1
  75. package/bundles/material-core.umd.min.js +16 -8
  76. package/bundles/material-core.umd.min.js.map +1 -1
  77. package/bundles/material-datepicker-testing.umd.js +24 -12
  78. package/bundles/material-datepicker-testing.umd.js.map +1 -1
  79. package/bundles/material-datepicker-testing.umd.min.js +1 -1
  80. package/bundles/material-datepicker-testing.umd.min.js.map +1 -1
  81. package/bundles/material-datepicker.umd.js +256 -84
  82. package/bundles/material-datepicker.umd.js.map +1 -1
  83. package/bundles/material-datepicker.umd.min.js +20 -12
  84. package/bundles/material-datepicker.umd.min.js.map +1 -1
  85. package/bundles/material-dialog-testing.umd.js +9 -1
  86. package/bundles/material-dialog-testing.umd.js.map +1 -1
  87. package/bundles/material-dialog-testing.umd.min.js +1 -1
  88. package/bundles/material-dialog-testing.umd.min.js.map +1 -1
  89. package/bundles/material-dialog.umd.js +10 -2
  90. package/bundles/material-dialog.umd.js.map +1 -1
  91. package/bundles/material-dialog.umd.min.js +8 -8
  92. package/bundles/material-dialog.umd.min.js.map +1 -1
  93. package/bundles/material-divider-testing.umd.js +9 -1
  94. package/bundles/material-divider-testing.umd.js.map +1 -1
  95. package/bundles/material-divider-testing.umd.min.js +2 -2
  96. package/bundles/material-divider-testing.umd.min.js.map +1 -1
  97. package/bundles/material-expansion-testing.umd.js +9 -1
  98. package/bundles/material-expansion-testing.umd.js.map +1 -1
  99. package/bundles/material-expansion-testing.umd.min.js +1 -1
  100. package/bundles/material-expansion-testing.umd.min.js.map +1 -1
  101. package/bundles/material-expansion.umd.js +15 -3
  102. package/bundles/material-expansion.umd.js.map +1 -1
  103. package/bundles/material-expansion.umd.min.js +3 -3
  104. package/bundles/material-expansion.umd.min.js.map +1 -1
  105. package/bundles/material-form-field-testing-control.umd.js +9 -1
  106. package/bundles/material-form-field-testing-control.umd.js.map +1 -1
  107. package/bundles/material-form-field-testing-control.umd.min.js +1 -1
  108. package/bundles/material-form-field-testing-control.umd.min.js.map +1 -1
  109. package/bundles/material-form-field-testing.umd.js +41 -30
  110. package/bundles/material-form-field-testing.umd.js.map +1 -1
  111. package/bundles/material-form-field-testing.umd.min.js +3 -3
  112. package/bundles/material-form-field-testing.umd.min.js.map +1 -1
  113. package/bundles/material-form-field.umd.js +10 -2
  114. package/bundles/material-form-field.umd.js.map +1 -1
  115. package/bundles/material-form-field.umd.min.js +1 -1
  116. package/bundles/material-form-field.umd.min.js.map +1 -1
  117. package/bundles/material-grid-list-testing.umd.js +15 -5
  118. package/bundles/material-grid-list-testing.umd.js.map +1 -1
  119. package/bundles/material-grid-list-testing.umd.min.js +2 -2
  120. package/bundles/material-grid-list-testing.umd.min.js.map +1 -1
  121. package/bundles/material-grid-list.umd.js +9 -1
  122. package/bundles/material-grid-list.umd.js.map +1 -1
  123. package/bundles/material-grid-list.umd.min.js +1 -1
  124. package/bundles/material-grid-list.umd.min.js.map +1 -1
  125. package/bundles/material-icon-testing.umd.js +12 -2
  126. package/bundles/material-icon-testing.umd.js.map +1 -1
  127. package/bundles/material-icon-testing.umd.min.js +2 -2
  128. package/bundles/material-icon-testing.umd.min.js.map +1 -1
  129. package/bundles/material-icon.umd.js +46 -2
  130. package/bundles/material-icon.umd.js.map +1 -1
  131. package/bundles/material-icon.umd.min.js +3 -3
  132. package/bundles/material-icon.umd.min.js.map +1 -1
  133. package/bundles/material-input-testing.umd.js +19 -8
  134. package/bundles/material-input-testing.umd.js.map +1 -1
  135. package/bundles/material-input-testing.umd.min.js +1 -1
  136. package/bundles/material-input-testing.umd.min.js.map +1 -1
  137. package/bundles/material-input.umd.js +9 -1
  138. package/bundles/material-input.umd.js.map +1 -1
  139. package/bundles/material-input.umd.min.js +1 -1
  140. package/bundles/material-input.umd.min.js.map +1 -1
  141. package/bundles/material-list-testing.umd.js +62 -57
  142. package/bundles/material-list-testing.umd.js.map +1 -1
  143. package/bundles/material-list-testing.umd.min.js +1 -1
  144. package/bundles/material-list-testing.umd.min.js.map +1 -1
  145. package/bundles/material-list.umd.js +9 -1
  146. package/bundles/material-list.umd.js.map +1 -1
  147. package/bundles/material-list.umd.min.js +1 -1
  148. package/bundles/material-list.umd.min.js.map +1 -1
  149. package/bundles/material-menu-testing.umd.js +94 -67
  150. package/bundles/material-menu-testing.umd.js.map +1 -1
  151. package/bundles/material-menu-testing.umd.min.js +2 -2
  152. package/bundles/material-menu-testing.umd.min.js.map +1 -1
  153. package/bundles/material-menu.umd.js +18 -6
  154. package/bundles/material-menu.umd.js.map +1 -1
  155. package/bundles/material-menu.umd.min.js +3 -3
  156. package/bundles/material-menu.umd.min.js.map +1 -1
  157. package/bundles/material-paginator-testing.umd.js +50 -34
  158. package/bundles/material-paginator-testing.umd.js.map +1 -1
  159. package/bundles/material-paginator-testing.umd.min.js +2 -2
  160. package/bundles/material-paginator-testing.umd.min.js.map +1 -1
  161. package/bundles/material-paginator.umd.js +9 -1
  162. package/bundles/material-paginator.umd.js.map +1 -1
  163. package/bundles/material-paginator.umd.min.js +1 -1
  164. package/bundles/material-paginator.umd.min.js.map +1 -1
  165. package/bundles/material-progress-bar-testing.umd.js +9 -1
  166. package/bundles/material-progress-bar-testing.umd.js.map +1 -1
  167. package/bundles/material-progress-bar-testing.umd.min.js +1 -1
  168. package/bundles/material-progress-bar-testing.umd.min.js.map +1 -1
  169. package/bundles/material-progress-bar.umd.js +9 -1
  170. package/bundles/material-progress-bar.umd.js.map +1 -1
  171. package/bundles/material-progress-bar.umd.min.js +1 -1
  172. package/bundles/material-progress-bar.umd.min.js.map +1 -1
  173. package/bundles/material-progress-spinner-testing.umd.js +9 -1
  174. package/bundles/material-progress-spinner-testing.umd.js.map +1 -1
  175. package/bundles/material-progress-spinner-testing.umd.min.js +1 -1
  176. package/bundles/material-progress-spinner-testing.umd.min.js.map +1 -1
  177. package/bundles/material-progress-spinner.umd.js +9 -1
  178. package/bundles/material-progress-spinner.umd.js.map +1 -1
  179. package/bundles/material-progress-spinner.umd.min.js +2 -2
  180. package/bundles/material-progress-spinner.umd.min.js.map +1 -1
  181. package/bundles/material-radio-testing.umd.js +88 -63
  182. package/bundles/material-radio-testing.umd.js.map +1 -1
  183. package/bundles/material-radio-testing.umd.min.js +2 -2
  184. package/bundles/material-radio-testing.umd.min.js.map +1 -1
  185. package/bundles/material-radio.umd.js +18 -5
  186. package/bundles/material-radio.umd.js.map +1 -1
  187. package/bundles/material-radio.umd.min.js +1 -1
  188. package/bundles/material-radio.umd.min.js.map +1 -1
  189. package/bundles/material-select-testing.umd.js +73 -51
  190. package/bundles/material-select-testing.umd.js.map +1 -1
  191. package/bundles/material-select-testing.umd.min.js +2 -2
  192. package/bundles/material-select-testing.umd.min.js.map +1 -1
  193. package/bundles/material-select.umd.js +9 -1
  194. package/bundles/material-select.umd.js.map +1 -1
  195. package/bundles/material-select.umd.min.js +4 -4
  196. package/bundles/material-select.umd.min.js.map +1 -1
  197. package/bundles/material-sidenav-testing.umd.js +175 -28
  198. package/bundles/material-sidenav-testing.umd.js.map +1 -1
  199. package/bundles/material-sidenav-testing.umd.min.js +2 -2
  200. package/bundles/material-sidenav-testing.umd.min.js.map +1 -1
  201. package/bundles/material-sidenav.umd.js +9 -1
  202. package/bundles/material-sidenav.umd.js.map +1 -1
  203. package/bundles/material-sidenav.umd.min.js +1 -1
  204. package/bundles/material-sidenav.umd.min.js.map +1 -1
  205. package/bundles/material-slide-toggle-testing.umd.js +9 -1
  206. package/bundles/material-slide-toggle-testing.umd.js.map +1 -1
  207. package/bundles/material-slide-toggle-testing.umd.min.js +1 -1
  208. package/bundles/material-slide-toggle-testing.umd.min.js.map +1 -1
  209. package/bundles/material-slide-toggle.umd.js +16 -3
  210. package/bundles/material-slide-toggle.umd.js.map +1 -1
  211. package/bundles/material-slide-toggle.umd.min.js +3 -3
  212. package/bundles/material-slide-toggle.umd.min.js.map +1 -1
  213. package/bundles/material-slider-testing.umd.js +15 -4
  214. package/bundles/material-slider-testing.umd.js.map +1 -1
  215. package/bundles/material-slider-testing.umd.min.js +2 -2
  216. package/bundles/material-slider-testing.umd.min.js.map +1 -1
  217. package/bundles/material-slider.umd.js +9 -1
  218. package/bundles/material-slider.umd.js.map +1 -1
  219. package/bundles/material-slider.umd.min.js +1 -1
  220. package/bundles/material-slider.umd.min.js.map +1 -1
  221. package/bundles/material-snack-bar-testing.umd.js +29 -12
  222. package/bundles/material-snack-bar-testing.umd.js.map +1 -1
  223. package/bundles/material-snack-bar-testing.umd.min.js +2 -2
  224. package/bundles/material-snack-bar-testing.umd.min.js.map +1 -1
  225. package/bundles/material-snack-bar.umd.js +20 -2
  226. package/bundles/material-snack-bar.umd.js.map +1 -1
  227. package/bundles/material-snack-bar.umd.min.js +1 -1
  228. package/bundles/material-snack-bar.umd.min.js.map +1 -1
  229. package/bundles/material-sort-testing.umd.js +9 -1
  230. package/bundles/material-sort-testing.umd.js.map +1 -1
  231. package/bundles/material-sort-testing.umd.min.js +1 -1
  232. package/bundles/material-sort-testing.umd.min.js.map +1 -1
  233. package/bundles/material-sort.umd.js +19 -5
  234. package/bundles/material-sort.umd.js.map +1 -1
  235. package/bundles/material-sort.umd.min.js +2 -2
  236. package/bundles/material-sort.umd.min.js.map +1 -1
  237. package/bundles/material-stepper-testing.umd.js +9 -1
  238. package/bundles/material-stepper-testing.umd.js.map +1 -1
  239. package/bundles/material-stepper-testing.umd.min.js +2 -2
  240. package/bundles/material-stepper-testing.umd.min.js.map +1 -1
  241. package/bundles/material-stepper.umd.js +16 -3
  242. package/bundles/material-stepper.umd.js.map +1 -1
  243. package/bundles/material-stepper.umd.min.js +3 -3
  244. package/bundles/material-stepper.umd.min.js.map +1 -1
  245. package/bundles/material-table-testing.umd.js +26 -17
  246. package/bundles/material-table-testing.umd.js.map +1 -1
  247. package/bundles/material-table-testing.umd.min.js +2 -2
  248. package/bundles/material-table-testing.umd.min.js.map +1 -1
  249. package/bundles/material-table.umd.js +66 -39
  250. package/bundles/material-table.umd.js.map +1 -1
  251. package/bundles/material-table.umd.min.js +3 -3
  252. package/bundles/material-table.umd.min.js.map +1 -1
  253. package/bundles/material-tabs-testing.umd.js +11 -3
  254. package/bundles/material-tabs-testing.umd.js.map +1 -1
  255. package/bundles/material-tabs-testing.umd.min.js +1 -1
  256. package/bundles/material-tabs-testing.umd.min.js.map +1 -1
  257. package/bundles/material-tabs.umd.js +10 -2
  258. package/bundles/material-tabs.umd.js.map +1 -1
  259. package/bundles/material-tabs.umd.min.js +5 -5
  260. package/bundles/material-tabs.umd.min.js.map +1 -1
  261. package/bundles/material-toolbar-testing.umd.js +11 -2
  262. package/bundles/material-toolbar-testing.umd.js.map +1 -1
  263. package/bundles/material-toolbar-testing.umd.min.js +2 -2
  264. package/bundles/material-toolbar-testing.umd.min.js.map +1 -1
  265. package/bundles/material-toolbar.umd.js +9 -1
  266. package/bundles/material-toolbar.umd.js.map +1 -1
  267. package/bundles/material-toolbar.umd.min.js +2 -2
  268. package/bundles/material-toolbar.umd.min.js.map +1 -1
  269. package/bundles/material-tooltip-testing.umd.js +9 -1
  270. package/bundles/material-tooltip-testing.umd.js.map +1 -1
  271. package/bundles/material-tooltip-testing.umd.min.js +1 -1
  272. package/bundles/material-tooltip-testing.umd.min.js.map +1 -1
  273. package/bundles/material-tooltip.umd.js +35 -7
  274. package/bundles/material-tooltip.umd.js.map +1 -1
  275. package/bundles/material-tooltip.umd.min.js +3 -3
  276. package/bundles/material-tooltip.umd.min.js.map +1 -1
  277. package/bundles/material-tree-testing.umd.js +10 -2
  278. package/bundles/material-tree-testing.umd.js.map +1 -1
  279. package/bundles/material-tree-testing.umd.min.js +1 -1
  280. package/bundles/material-tree-testing.umd.min.js.map +1 -1
  281. package/bundles/material-tree.umd.js +12 -3
  282. package/bundles/material-tree.umd.js.map +1 -1
  283. package/bundles/material-tree.umd.min.js +3 -3
  284. package/bundles/material-tree.umd.min.js.map +1 -1
  285. package/button/_button-base.scss +2 -2
  286. package/button/_button-theme.scss +10 -11
  287. package/button/index.metadata.json +1 -1
  288. package/button-toggle/_button-toggle-theme.scss +9 -10
  289. package/card/_card-theme.scss +5 -6
  290. package/checkbox/_checkbox-theme.scss +2 -3
  291. package/checkbox/testing/checkbox-harness.d.ts +21 -16
  292. package/chips/_chips-theme.scss +4 -5
  293. package/chips/testing/chip-harness-filters.d.ts +11 -3
  294. package/chips/testing/chip-harness.d.ts +5 -5
  295. package/chips/testing/chip-list-harness.d.ts +15 -12
  296. package/chips/testing/chip-listbox-harness.d.ts +34 -0
  297. package/chips/testing/chip-option-harness.d.ts +29 -0
  298. package/chips/testing/public-api.d.ts +3 -1
  299. package/core/_core.scss +6 -6
  300. package/core/color/_all-color.scss +2 -1
  301. package/core/datetime/date-formats.d.ts +1 -0
  302. package/core/density/private/_all-density.scss +34 -0
  303. package/core/density/{_index.scss → private/_compatibility.scss} +11 -8
  304. package/core/focus-indicators/_focus-indicators.scss +3 -4
  305. package/core/index.metadata.json +1 -1
  306. package/core/option/_optgroup-theme.scss +2 -3
  307. package/core/option/_option-theme.scss +2 -3
  308. package/core/option/index.d.ts +1 -0
  309. package/core/option/optgroup.d.ts +4 -0
  310. package/core/option/option-parent.d.ts +22 -0
  311. package/core/option/option.d.ts +2 -14
  312. package/core/ripple/_ripple.scss +2 -3
  313. package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +2 -3
  314. package/core/style/_elevation.scss +2 -18
  315. package/core/style/_form-common.scss +2 -2
  316. package/core/style/_private.scss +40 -0
  317. package/core/style/_vendor-prefixes.scss +3 -3
  318. package/core/testing/option-harness.d.ts +2 -0
  319. package/core/theming/_all-theme.scss +3 -2
  320. package/core/theming/_theming.scss +148 -38
  321. package/core/typography/_all-typography.scss +1 -1
  322. package/core/typography/_typography.scss +39 -9
  323. package/datepicker/_datepicker-theme.scss +15 -16
  324. package/datepicker/date-range-input-parts.d.ts +2 -3
  325. package/datepicker/date-range-input.d.ts +5 -4
  326. package/datepicker/date-selection-model.d.ts +10 -0
  327. package/datepicker/datepicker-actions.d.ts +33 -0
  328. package/datepicker/datepicker-base.d.ts +52 -9
  329. package/datepicker/datepicker-input-base.d.ts +5 -10
  330. package/datepicker/datepicker-input.d.ts +9 -8
  331. package/datepicker/datepicker-toggle.d.ts +4 -2
  332. package/datepicker/index.metadata.json +1 -1
  333. package/datepicker/public-api.d.ts +1 -0
  334. package/datepicker/year-view.d.ts +1 -1
  335. package/dialog/_dialog-theme.scss +4 -5
  336. package/divider/_divider-theme.scss +2 -3
  337. package/esm2015/autocomplete/autocomplete-trigger.js +11 -3
  338. package/esm2015/autocomplete/autocomplete.js +11 -4
  339. package/esm2015/autocomplete/testing/autocomplete-harness.js +27 -19
  340. package/esm2015/button/button.js +10 -5
  341. package/esm2015/checkbox/checkbox.js +8 -3
  342. package/esm2015/checkbox/testing/checkbox-harness.js +31 -36
  343. package/esm2015/chips/testing/chip-harness-filters.js +1 -1
  344. package/esm2015/chips/testing/chip-harness.js +6 -6
  345. package/esm2015/chips/testing/chip-list-harness.js +19 -16
  346. package/esm2015/chips/testing/chip-listbox-harness.js +49 -0
  347. package/esm2015/chips/testing/chip-option-harness.js +54 -0
  348. package/esm2015/chips/testing/public-api.js +4 -2
  349. package/esm2015/core/common-behaviors/common-module.js +1 -1
  350. package/esm2015/core/datetime/date-formats.js +1 -1
  351. package/esm2015/core/option/index.js +2 -1
  352. package/esm2015/core/option/optgroup.js +32 -7
  353. package/esm2015/core/option/option-parent.js +13 -0
  354. package/esm2015/core/option/option.js +5 -8
  355. package/esm2015/core/testing/option-harness.js +7 -2
  356. package/esm2015/core/version.js +1 -1
  357. package/esm2015/datepicker/calendar-body.js +1 -1
  358. package/esm2015/datepicker/date-range-input-parts.js +14 -16
  359. package/esm2015/datepicker/date-range-input.js +11 -4
  360. package/esm2015/datepicker/date-range-picker.js +3 -2
  361. package/esm2015/datepicker/date-selection-model.js +24 -1
  362. package/esm2015/datepicker/datepicker-actions.js +89 -0
  363. package/esm2015/datepicker/datepicker-base.js +69 -26
  364. package/esm2015/datepicker/datepicker-input-base.js +15 -27
  365. package/esm2015/datepicker/datepicker-input.js +11 -5
  366. package/esm2015/datepicker/datepicker-module.js +8 -1
  367. package/esm2015/datepicker/datepicker-toggle.js +7 -10
  368. package/esm2015/datepicker/datepicker.js +5 -2
  369. package/esm2015/datepicker/month-view.js +4 -3
  370. package/esm2015/datepicker/public-api.js +2 -1
  371. package/esm2015/datepicker/testing/date-range-input-harness.js +4 -4
  372. package/esm2015/datepicker/testing/datepicker-input-harness.js +3 -3
  373. package/esm2015/datepicker/testing/datepicker-trigger-harness-base.js +3 -3
  374. package/esm2015/datepicker/year-view.js +1 -1
  375. package/esm2015/dialog/dialog-ref.js +2 -2
  376. package/esm2015/expansion/expansion-panel-header.js +8 -3
  377. package/esm2015/expansion/expansion-panel.js +1 -1
  378. package/esm2015/form-field/form-field.js +2 -2
  379. package/esm2015/form-field/testing/form-field-harness.js +14 -9
  380. package/esm2015/grid-list/testing/grid-list-harness.js +6 -5
  381. package/esm2015/icon/icon-registry.js +39 -3
  382. package/esm2015/icon/testing/fake-icon-registry.js +4 -2
  383. package/esm2015/input/testing/input-harness.js +3 -3
  384. package/esm2015/input/testing/native-select-harness.js +7 -5
  385. package/esm2015/list/selection-list.js +1 -1
  386. package/esm2015/list/testing/list-harness-base.js +5 -4
  387. package/esm2015/list/testing/list-item-harness-base.js +5 -4
  388. package/esm2015/list/testing/selection-list-harness.js +8 -5
  389. package/esm2015/menu/menu-item.js +3 -3
  390. package/esm2015/menu/menu-trigger.js +10 -4
  391. package/esm2015/menu/menu.js +1 -1
  392. package/esm2015/menu/testing/menu-harness.js +44 -32
  393. package/esm2015/paginator/testing/paginator-harness.js +27 -25
  394. package/esm2015/radio/radio.js +10 -5
  395. package/esm2015/radio/testing/radio-harness.js +40 -29
  396. package/esm2015/select/testing/select-harness.js +36 -28
  397. package/esm2015/sidenav/testing/drawer-container-harness.js +41 -0
  398. package/esm2015/sidenav/testing/drawer-content-harness.js +23 -0
  399. package/esm2015/sidenav/testing/drawer-harness-filters.js +1 -1
  400. package/esm2015/sidenav/testing/drawer-harness.js +19 -13
  401. package/esm2015/sidenav/testing/public-api.js +6 -2
  402. package/esm2015/sidenav/testing/sidenav-container-harness.js +41 -0
  403. package/esm2015/sidenav/testing/sidenav-content-harness.js +23 -0
  404. package/esm2015/sidenav/testing/sidenav-harness.js +4 -4
  405. package/esm2015/slide-toggle/slide-toggle.js +8 -3
  406. package/esm2015/slider/testing/slider-harness.js +5 -5
  407. package/esm2015/snack-bar/snack-bar-container.js +12 -2
  408. package/esm2015/snack-bar/testing/snack-bar-harness.js +19 -12
  409. package/esm2015/sort/sort-header.js +11 -5
  410. package/esm2015/stepper/step-header.js +8 -3
  411. package/esm2015/table/table-data-source.js +34 -21
  412. package/esm2015/table/table.js +1 -1
  413. package/esm2015/table/testing/cell-harness.js +3 -3
  414. package/esm2015/table/testing/row-harness.js +5 -5
  415. package/esm2015/table/testing/table-harness.js +8 -8
  416. package/esm2015/tabs/tab-body.js +3 -3
  417. package/esm2015/tabs/testing/tab-group-harness.js +3 -3
  418. package/esm2015/tabs/testing/tab-nav-bar-harness.js +3 -3
  419. package/esm2015/toolbar/testing/toolbar-harness.js +3 -3
  420. package/esm2015/tooltip/tooltip.js +28 -7
  421. package/esm2015/tree/node.js +4 -3
  422. package/esm2015/tree/padding.js +1 -1
  423. package/esm2015/tree/testing/tree-harness.js +2 -2
  424. package/esm2015/tree/toggle.js +1 -1
  425. package/esm2015/tree/tree.js +1 -1
  426. package/expansion/_expansion-theme.scss +10 -11
  427. package/expansion/index.metadata.json +1 -1
  428. package/fesm2015/autocomplete/testing.js +26 -18
  429. package/fesm2015/autocomplete/testing.js.map +1 -1
  430. package/fesm2015/autocomplete.js +20 -6
  431. package/fesm2015/autocomplete.js.map +1 -1
  432. package/fesm2015/button.js +9 -4
  433. package/fesm2015/button.js.map +1 -1
  434. package/fesm2015/checkbox/testing.js +30 -35
  435. package/fesm2015/checkbox/testing.js.map +1 -1
  436. package/fesm2015/checkbox.js +7 -2
  437. package/fesm2015/checkbox.js.map +1 -1
  438. package/fesm2015/chips/testing.js +120 -21
  439. package/fesm2015/chips/testing.js.map +1 -1
  440. package/fesm2015/core/testing.js +6 -1
  441. package/fesm2015/core/testing.js.map +1 -1
  442. package/fesm2015/core.js +45 -13
  443. package/fesm2015/core.js.map +1 -1
  444. package/fesm2015/datepicker/testing.js +5 -5
  445. package/fesm2015/datepicker/testing.js.map +1 -1
  446. package/fesm2015/datepicker.js +281 -120
  447. package/fesm2015/datepicker.js.map +1 -1
  448. package/fesm2015/dialog.js +1 -1
  449. package/fesm2015/dialog.js.map +1 -1
  450. package/fesm2015/expansion.js +7 -2
  451. package/fesm2015/expansion.js.map +1 -1
  452. package/fesm2015/form-field/testing.js +13 -8
  453. package/fesm2015/form-field/testing.js.map +1 -1
  454. package/fesm2015/form-field.js +1 -1
  455. package/fesm2015/form-field.js.map +1 -1
  456. package/fesm2015/grid-list/testing.js +5 -4
  457. package/fesm2015/grid-list/testing.js.map +1 -1
  458. package/fesm2015/grid-list.js.map +1 -1
  459. package/fesm2015/icon/testing.js +3 -1
  460. package/fesm2015/icon/testing.js.map +1 -1
  461. package/fesm2015/icon.js +38 -2
  462. package/fesm2015/icon.js.map +1 -1
  463. package/fesm2015/input/testing.js +7 -5
  464. package/fesm2015/input/testing.js.map +1 -1
  465. package/fesm2015/list/testing.js +13 -8
  466. package/fesm2015/list/testing.js.map +1 -1
  467. package/fesm2015/list.js.map +1 -1
  468. package/fesm2015/menu/testing.js +45 -33
  469. package/fesm2015/menu/testing.js.map +1 -1
  470. package/fesm2015/menu.js +12 -6
  471. package/fesm2015/menu.js.map +1 -1
  472. package/fesm2015/paginator/testing.js +26 -24
  473. package/fesm2015/paginator/testing.js.map +1 -1
  474. package/fesm2015/paginator.js.map +1 -1
  475. package/fesm2015/progress-spinner.js.map +1 -1
  476. package/fesm2015/radio/testing.js +39 -28
  477. package/fesm2015/radio/testing.js.map +1 -1
  478. package/fesm2015/radio.js +9 -4
  479. package/fesm2015/radio.js.map +1 -1
  480. package/fesm2015/select/testing.js +36 -28
  481. package/fesm2015/select/testing.js.map +1 -1
  482. package/fesm2015/sidenav/testing.js +139 -15
  483. package/fesm2015/sidenav/testing.js.map +1 -1
  484. package/fesm2015/sidenav.js.map +1 -1
  485. package/fesm2015/slide-toggle.js +7 -2
  486. package/fesm2015/slide-toggle.js.map +1 -1
  487. package/fesm2015/slider/testing.js +4 -4
  488. package/fesm2015/slider/testing.js.map +1 -1
  489. package/fesm2015/snack-bar/testing.js +18 -11
  490. package/fesm2015/snack-bar/testing.js.map +1 -1
  491. package/fesm2015/snack-bar.js +11 -1
  492. package/fesm2015/snack-bar.js.map +1 -1
  493. package/fesm2015/sort.js +10 -4
  494. package/fesm2015/sort.js.map +1 -1
  495. package/fesm2015/stepper.js +7 -2
  496. package/fesm2015/stepper.js.map +1 -1
  497. package/fesm2015/table/testing.js +11 -11
  498. package/fesm2015/table/testing.js.map +1 -1
  499. package/fesm2015/table.js +35 -22
  500. package/fesm2015/table.js.map +1 -1
  501. package/fesm2015/tabs/testing.js +3 -3
  502. package/fesm2015/tabs/testing.js.map +1 -1
  503. package/fesm2015/tabs.js +2 -2
  504. package/fesm2015/tabs.js.map +1 -1
  505. package/fesm2015/toolbar/testing.js +2 -2
  506. package/fesm2015/toolbar/testing.js.map +1 -1
  507. package/fesm2015/tooltip.js +27 -7
  508. package/fesm2015/tooltip.js.map +1 -1
  509. package/fesm2015/tree/testing.js +1 -1
  510. package/fesm2015/tree/testing.js.map +1 -1
  511. package/fesm2015/tree.js +3 -2
  512. package/fesm2015/tree.js.map +1 -1
  513. package/form-field/_form-field-fill-theme.scss +4 -5
  514. package/form-field/_form-field-legacy-theme.scss +5 -6
  515. package/form-field/_form-field-outline-theme.scss +4 -5
  516. package/form-field/_form-field-standard-theme.scss +5 -6
  517. package/form-field/_form-field-theme.scss +8 -9
  518. package/form-field/index.metadata.json +1 -1
  519. package/grid-list/_grid-list-theme.scss +2 -3
  520. package/icon/_icon-theme.scss +2 -3
  521. package/icon/icon-registry.d.ts +23 -0
  522. package/icon/index.metadata.json +1 -1
  523. package/icon/testing/fake-icon-registry.d.ts +1 -0
  524. package/icon/testing/index.metadata.json +1 -1
  525. package/input/_input-theme.scss +3 -4
  526. package/list/_list-theme.scss +2 -3
  527. package/list/index.metadata.json +1 -1
  528. package/list/selection-list.d.ts +6 -1
  529. package/list/testing/list-harness-base.d.ts +1 -1
  530. package/list/testing/list-item-harness-base.d.ts +2 -2
  531. package/list/testing/selection-list-harness.d.ts +2 -1
  532. package/menu/_menu-theme.scss +4 -5
  533. package/menu/index.metadata.json +1 -1
  534. package/menu/menu-trigger.d.ts +1 -1
  535. package/menu/testing/menu-harness.d.ts +39 -26
  536. package/package.json +2 -2
  537. package/paginator/_paginator-theme.scss +7 -8
  538. package/paginator/testing/paginator-harness.d.ts +32 -19
  539. package/prebuilt-themes/deeppurple-amber.css +1 -1
  540. package/prebuilt-themes/indigo-pink.css +1 -1
  541. package/prebuilt-themes/pink-bluegrey.css +1 -1
  542. package/prebuilt-themes/purple-green.css +1 -1
  543. package/progress-bar/_progress-bar-theme.scss +2 -3
  544. package/progress-spinner/_progress-spinner-theme.scss +2 -3
  545. package/radio/_radio-theme.scss +2 -3
  546. package/radio/index.metadata.json +1 -1
  547. package/radio/radio.d.ts +2 -2
  548. package/radio/testing/radio-harness.d.ts +39 -24
  549. package/schematics/ng-add/fonts/material-fonts.js +7 -5
  550. package/schematics/ng-add/index.js +1 -1
  551. package/select/_select-theme.scss +5 -6
  552. package/select/testing/select-harness.d.ts +28 -16
  553. package/sidenav/_sidenav-theme.scss +4 -5
  554. package/sidenav/testing/drawer-container-harness.d.ts +30 -0
  555. package/sidenav/testing/drawer-content-harness.d.ts +21 -0
  556. package/sidenav/testing/drawer-harness-filters.d.ts +6 -0
  557. package/sidenav/testing/drawer-harness.d.ts +13 -7
  558. package/sidenav/testing/public-api.d.ts +5 -1
  559. package/sidenav/testing/sidenav-container-harness.d.ts +30 -0
  560. package/sidenav/testing/sidenav-content-harness.d.ts +21 -0
  561. package/sidenav/testing/sidenav-harness.d.ts +3 -3
  562. package/slide-toggle/_slide-toggle-theme.scss +4 -5
  563. package/slide-toggle/slide-toggle.d.ts +2 -2
  564. package/slider/_slider-theme.scss +2 -3
  565. package/snack-bar/_snack-bar-theme.scss +4 -5
  566. package/snack-bar/index.metadata.json +1 -1
  567. package/snack-bar/snack-bar-container.d.ts +5 -0
  568. package/snack-bar/testing/snack-bar-harness.d.ts +7 -4
  569. package/sort/_sort-theme.scss +2 -3
  570. package/sort/index.metadata.json +1 -1
  571. package/sort/sort-header.d.ts +2 -1
  572. package/stepper/_stepper-theme.scss +7 -8
  573. package/stepper/step-header.d.ts +2 -2
  574. package/table/_table-theme.scss +2 -3
  575. package/table/index.metadata.json +1 -1
  576. package/table/table-data-source.d.ts +31 -20
  577. package/table/testing/cell-harness.d.ts +2 -2
  578. package/tabs/_tabs-common.scss +2 -2
  579. package/tabs/_tabs-theme.scss +14 -9
  580. package/tabs/index.metadata.json +1 -1
  581. package/tabs/tab-body.d.ts +3 -3
  582. package/toolbar/_toolbar-theme.scss +8 -9
  583. package/tooltip/_tooltip-theme.scss +2 -3
  584. package/tooltip/index.metadata.json +1 -1
  585. package/tooltip/tooltip.d.ts +10 -1
  586. package/tree/_tree-theme.scss +7 -8
  587. package/tree/index.metadata.json +1 -1
  588. package/tree/node.d.ts +7 -6
  589. package/tree/padding.d.ts +1 -1
  590. package/tree/toggle.d.ts +1 -1
  591. package/tree/tree.d.ts +1 -1
  592. package/core/density/_all-density.scss +0 -19
  593. package/core/style/_noop-animation.scss +0 -22
  594. package/core/theming/_check-duplicate-styles.scss +0 -106
package/_theming.scss CHANGED
@@ -493,7 +493,7 @@ $mat-elevation-color: black !default;
493
493
  $mat-elevation-opacity: 1 !default;
494
494
 
495
495
  // Prefix for elevation-related selectors.
496
- $_mat-elevation-prefix: 'mat-elevation-z';
496
+ $mat-elevation-prefix: 'mat-elevation-z';
497
497
 
498
498
  // Applies the correct css rules to an element to give it the elevation specified by $zValue.
499
499
  // The $zValue must be between 0 and 24.
@@ -510,33 +510,17 @@ $_mat-elevation-prefix: 'mat-elevation-z';
510
510
  #{map-get(_get-ambient-map($color, $opacity), $zValue)};
511
511
  }
512
512
 
513
- @mixin _mat-theme-elevation($zValue, $config, $opacity: $mat-elevation-opacity) {
514
- $foreground: map-get($config, foreground);
515
- $elevation-color: map-get($foreground, elevation);
516
- $elevation-color-or-default: if($elevation-color == null, $mat-elevation-color, $elevation-color);
517
-
518
- @include mat-elevation($zValue, $elevation-color-or-default, $opacity);
519
- }
520
-
521
513
  // Applies the elevation to an element in a manner that allows
522
514
  // consumers to override it via the Material elevation classes.
523
515
  @mixin mat-overridable-elevation(
524
516
  $zValue,
525
517
  $color: $mat-elevation-color,
526
518
  $opacity: $mat-elevation-opacity) {
527
- &:not([class*='#{$_mat-elevation-prefix}']) {
519
+ &:not([class*='#{$mat-elevation-prefix}']) {
528
520
  @include mat-elevation($zValue, $color, $opacity);
529
521
  }
530
522
  }
531
523
 
532
- @mixin _mat-theme-overridable-elevation($zValue, $config, $opacity: $mat-elevation-opacity) {
533
- $foreground: map-get($config, foreground);
534
- $elevation-color: map-get($foreground, elevation);
535
- $elevation-color-or-default: if($elevation-color == null, $mat-elevation-color, $elevation-color);
536
-
537
- @include mat-overridable-elevation($zValue, $elevation-color-or-default, $opacity);
538
- }
539
-
540
524
  // Returns a string that can be used as the value for a transition property for elevation.
541
525
  // Calling this function directly is useful in situations where a component needs to transition
542
526
  // more than one property.
@@ -562,6 +546,46 @@ $_mat-elevation-prefix: 'mat-elevation-z';
562
546
  transition: mat-elevation-transition-property-value($duration, $easing);
563
547
  }
564
548
 
549
+
550
+ @mixin mat-private-theme-elevation($zValue, $config, $opacity: $mat-elevation-opacity) {
551
+ $foreground: map-get($config, foreground);
552
+ $elevation-color: map-get($foreground, elevation);
553
+ $elevation-color-or-default: if($elevation-color == null, $mat-elevation-color, $elevation-color);
554
+
555
+ @include mat-elevation($zValue, $elevation-color-or-default, $opacity);
556
+ }
557
+
558
+ @mixin mat-private-theme-overridable-elevation($zValue, $config, $opacity: $mat-elevation-opacity) {
559
+ $foreground: map-get($config, foreground);
560
+ $elevation-color: map-get($foreground, elevation);
561
+ $elevation-color-or-default: if($elevation-color == null, $mat-elevation-color, $elevation-color);
562
+
563
+ @include mat-overridable-elevation($zValue, $elevation-color-or-default, $opacity);
564
+ }
565
+
566
+ // If the mat-animation-noop class is present on the components root element,
567
+ // prevent non css animations from running.
568
+ // NOTE: Currently this mixin should only be used with components that do not
569
+ // have any projected content.
570
+ @mixin mat-private-animation-noop() {
571
+ // @at-root is used to steps outside of the hierarchy of the scss rules. This is
572
+ // done to allow a class to be added to be added to base of the scss nesting
573
+ // context.
574
+ // For example:
575
+ // .my-root {
576
+ // .my-subclass {
577
+ // @include mat-private-animation-noop();
578
+ // }
579
+ // }
580
+ // results in:
581
+ // ._mat-animation-noopable.my-root .my-subclass { ... }
582
+ @at-root ._mat-animation-noopable#{&} {
583
+ transition: none;
584
+ animation: none;
585
+ @content;
586
+ }
587
+ }
588
+
565
589
  // Color palettes from the Material Design spec.
566
590
  // See https://material.io/design/color/
567
591
  //
@@ -1311,9 +1335,22 @@ $mat-dark-theme-foreground: (
1311
1335
  );
1312
1336
 
1313
1337
 
1338
+ // Whether duplication warnings should be disabled. Warnings enabled by default.
1339
+ $mat-theme-ignore-duplication-warnings: false !default;
1340
+
1314
1341
  // Whether density should be generated by default.
1315
1342
  $_mat-theme-generate-default-density: true !default;
1316
1343
 
1344
+ // Warning that will be printed if duplicated styles are generated by a theme.
1345
+ $_mat-theme-duplicate-warning: 'Read more about how style duplication can be avoided in a ' +
1346
+ 'dedicated guide. https://github.com/angular/components/blob/master/guides/duplicate-theming-styles.md';
1347
+
1348
+ // These variable are not intended to be overridden externally. They use `!default` to
1349
+ // avoid being reset every time this file is imported.
1350
+ $_mat-theme-emitted-color: () !default;
1351
+ $_mat-theme-emitted-typography: () !default;
1352
+ $_mat-theme-emitted-density: () !default;
1353
+
1317
1354
  // For a given hue in a palette, return the contrast color from the map of contrast palettes.
1318
1355
  // @param $color-map
1319
1356
  // @param $hue
@@ -1395,31 +1432,6 @@ $_mat-theme-generate-default-density: true !default;
1395
1432
  @return $theme;
1396
1433
  }
1397
1434
 
1398
- // Creates a backwards compatible theme. Previously in Angular Material, theme objects
1399
- // contained the color configuration directly. With the recent refactoring of the theming
1400
- // system to allow for density and typography configurations, this is no longer the case.
1401
- // To ensure that constructed themes which will be passed to custom theme mixins do not break,
1402
- // we copy the color configuration and put its properties at the top-level of the theme object.
1403
- // Here is an example of a pattern that should still work until it's officially marked as a
1404
- // breaking change:
1405
- //
1406
- // @mixin my-custom-component-theme($theme) {
1407
- // .my-comp {
1408
- // background-color: mat-color(map-get($theme, primary));
1409
- // }
1410
- // }
1411
- //
1412
- // Note that the `$theme.primary` key does usually not exist since the color configuration
1413
- // is stored in `$theme.color` which contains a property for `primary`. This method copies
1414
- // the map from `$theme.color` to `$theme` for backwards compatibility.
1415
- @function _mat-create-backwards-compatibility-theme($theme) {
1416
- @if not map-get($theme, color) {
1417
- @return $theme;
1418
- }
1419
- $color: map-get($theme, color);
1420
- @return map-merge($theme, $color);
1421
- }
1422
-
1423
1435
  // Creates a light-themed color configuration from the specified
1424
1436
  // primary, accent and warn palettes.
1425
1437
  @function _mat-create-light-color-config($primary, $accent, $warn: null) {
@@ -1464,7 +1476,7 @@ $_mat-theme-generate-default-density: true !default;
1464
1476
  // If the legacy pattern is used, we generate a container object only with a light-themed
1465
1477
  // configuration for the `color` theming part.
1466
1478
  @if $accent != null {
1467
- @return _mat-create-backwards-compatibility-theme(_mat-validate-theme((
1479
+ @return mat-private-create-backwards-compatibility-theme(_mat-validate-theme((
1468
1480
  _is-legacy-theme: true,
1469
1481
  color: _mat-create-light-color-config($primary, $accent, $warn),
1470
1482
  )));
@@ -1480,7 +1492,7 @@ $_mat-theme-generate-default-density: true !default;
1480
1492
  $warn: map-get($color-settings, warn);
1481
1493
  $result: map-merge($result, (color: _mat-create-light-color-config($primary, $accent, $warn)));
1482
1494
  }
1483
- @return _mat-create-backwards-compatibility-theme(_mat-validate-theme($result));
1495
+ @return mat-private-create-backwards-compatibility-theme(_mat-validate-theme($result));
1484
1496
  }
1485
1497
 
1486
1498
  // Creates a container object for a dark theme to be given to individual component theme mixins.
@@ -1501,7 +1513,7 @@ $_mat-theme-generate-default-density: true !default;
1501
1513
  // If the legacy pattern is used, we generate a container object only with a dark-themed
1502
1514
  // configuration for the `color` theming part.
1503
1515
  @if $accent != null {
1504
- @return _mat-create-backwards-compatibility-theme(_mat-validate-theme((
1516
+ @return mat-private-create-backwards-compatibility-theme(_mat-validate-theme((
1505
1517
  _is-legacy-theme: true,
1506
1518
  color: _mat-create-dark-color-config($primary, $accent, $warn),
1507
1519
  )));
@@ -1517,13 +1529,13 @@ $_mat-theme-generate-default-density: true !default;
1517
1529
  $warn: map-get($color-settings, warn);
1518
1530
  $result: map-merge($result, (color: _mat-create-dark-color-config($primary, $accent, $warn)));
1519
1531
  }
1520
- @return _mat-create-backwards-compatibility-theme(_mat-validate-theme($result));
1532
+ @return mat-private-create-backwards-compatibility-theme(_mat-validate-theme($result));
1521
1533
  }
1522
1534
 
1523
1535
  /// Gets the color configuration from the given theme or configuration.
1524
1536
  @function mat-get-color-config($theme, $default: null) {
1525
1537
  // If a configuration has been passed, return the config directly.
1526
- @if not _mat-is-theme-object($theme) {
1538
+ @if not mat-private-is-theme-object($theme) {
1527
1539
  @return $theme;
1528
1540
  }
1529
1541
  // If the theme has been constructed through the legacy theming API, we use the theme object
@@ -1531,7 +1543,7 @@ $_mat-theme-generate-default-density: true !default;
1531
1543
  // backwards compatibility, we copied the color configuration from `$theme.color` to `$theme`.
1532
1544
  // Hence developers could customize the colors at top-level and want to respect these changes
1533
1545
  // TODO: Remove when legacy theming API is removed.
1534
- @if _mat-is-legacy-constructed-theme($theme) {
1546
+ @if mat-private-is-legacy-constructed-theme($theme) {
1535
1547
  @return $theme;
1536
1548
  }
1537
1549
  @if map-has-key($theme, color) {
@@ -1543,7 +1555,7 @@ $_mat-theme-generate-default-density: true !default;
1543
1555
  /// Gets the density configuration from the given theme or configuration.
1544
1556
  @function mat-get-density-config($theme-or-config, $default: 0) {
1545
1557
  // If a configuration has been passed, return the config directly.
1546
- @if not _mat-is-theme-object($theme-or-config) {
1558
+ @if not mat-private-is-theme-object($theme-or-config) {
1547
1559
  @return $theme-or-config;
1548
1560
  }
1549
1561
  // In case a theme has been passed, extract the configuration if present,
@@ -1558,7 +1570,7 @@ $_mat-theme-generate-default-density: true !default;
1558
1570
  /// For backwards compatibility, typography is not included by default.
1559
1571
  @function mat-get-typography-config($theme-or-config, $default: null) {
1560
1572
  // If a configuration has been passed, return the config directly.
1561
- @if not _mat-is-theme-object($theme-or-config) {
1573
+ @if not mat-private-is-theme-object($theme-or-config) {
1562
1574
  @return $theme-or-config;
1563
1575
  }
1564
1576
  // In case a theme has been passed, extract the configuration if present,
@@ -1569,53 +1581,10 @@ $_mat-theme-generate-default-density: true !default;
1569
1581
  @return $default;
1570
1582
  }
1571
1583
 
1572
- // Checks whether the given value resolves to a theme object. Theme objects are always
1573
- // of type `map` and can optionally only specify `color`, `density` or `typography`.
1574
- @function _mat-is-theme-object($value) {
1575
- @return type-of($value) == 'map' and (
1576
- map-has-key($value, color) or
1577
- map-has-key($value, density) or
1578
- map-has-key($value, typography) or
1579
- length($value) == 0
1580
- );
1581
- }
1582
-
1583
- // Checks whether a given value corresponds to a legacy constructed theme.
1584
- @function _mat-is-legacy-constructed-theme($value) {
1585
- @return type-of($value) == 'map' and map-get($value, '_is-legacy-theme');
1586
- }
1587
-
1588
- // Gets the theme from the given value that is either already a theme, or a color configuration.
1589
- // This handles the legacy case where developers pass a color configuration directly to the
1590
- // theme mixin. Before we introduced the new pattern for constructing a theme, developers passed
1591
- // the color configuration directly to the theme mixins. This can be still the case if developers
1592
- // construct a theme manually and pass it to a theme. We support this for backwards compatibility.
1593
- // TODO(devversion): remove this in the future. Constructing themes manually is rare,
1594
- // and the code can be easily updated to the new API.
1595
- @function _mat-legacy-get-theme($theme-or-color-config) {
1596
- @if _mat-is-theme-object($theme-or-color-config) {
1597
- @return $theme-or-color-config;
1598
- }
1599
- @return _mat-create-backwards-compatibility-theme((
1600
- _is-legacy-theme: true,
1601
- color: $theme-or-color-config
1602
- ));
1603
- }
1604
-
1605
-
1606
-
1607
- // Whether duplication warnings should be disabled. Warnings enabled by default.
1608
- $mat-theme-ignore-duplication-warnings: false !default;
1609
-
1610
- // Warning that will be printed if duplicated styles are generated by a theme.
1611
- $_mat-theme-duplicate-warning: 'Read more about how style duplication can be avoided in a ' +
1612
- 'dedicated guide. https://github.com/angular/components/blob/master/guides/duplicate-theming-styles.md';
1613
1584
 
1614
- // These variable are not intended to be overridden externally. They use `!default` to
1615
- // avoid being reset every time this file is imported.
1616
- $_mat-theme-emitted-color: () !default;
1617
- $_mat-theme-emitted-typography: () !default;
1618
- $_mat-theme-emitted-density: () !default;
1585
+ //
1586
+ // Private APIs
1587
+ //
1619
1588
 
1620
1589
  // Checks if configurations that have been declared in the given theme have been generated
1621
1590
  // before. If so, warnings will be reported. This should notify developers in case duplicate
@@ -1629,8 +1598,8 @@ $_mat-theme-emitted-density: () !default;
1629
1598
  // id. This is necessary because a given theme can be passed to multiple disjoint theme mixins
1630
1599
  // (e.g. `angular-material-theme` and `angular-material-mdc-theme`) without causing any
1631
1600
  // style duplication.
1632
- @mixin _mat-check-duplicate-theme-styles($theme-or-color-config, $id) {
1633
- $theme: _mat-legacy-get-theme($theme-or-color-config);
1601
+ @mixin mat-private-check-duplicate-theme-styles($theme-or-color-config, $id) {
1602
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
1634
1603
  $color-config: mat-get-color-config($theme);
1635
1604
  $density-config: mat-get-density-config($theme);
1636
1605
  $typography-config: mat-get-typography-config($theme);
@@ -1667,7 +1636,7 @@ $_mat-theme-emitted-density: () !default;
1667
1636
  // Only report a warning if density styles would be duplicated for non-legacy theme
1668
1637
  // definitions. For legacy themes, we have compatibility logic that avoids duplication
1669
1638
  // of default density styles. We don't want to report a warning in those cases.
1670
- @if _mat-is-legacy-constructed-theme($theme) {
1639
+ @if mat-private-is-legacy-constructed-theme($theme) {
1671
1640
  $duplicate-legacy-density: true;
1672
1641
  }
1673
1642
  @else if not $mat-theme-ignore-duplication-warnings {
@@ -1699,14 +1668,72 @@ $_mat-theme-emitted-density: () !default;
1699
1668
  // styles **once** and at root. This matches the old behavior where density styles were
1700
1669
  // part of the base component styles (that did not use view encapsulation).
1701
1670
  // TODO: Remove this compatibility logic when the legacy theming API is removed.
1702
- $_mat-density-generate-at-root: _mat-is-legacy-constructed-theme($theme) !global;
1703
- $_mat-density-generate-styles: not $duplicate-legacy-density !global;
1671
+ $mat-private-density-generate-at-root: mat-private-is-legacy-constructed-theme($theme) !global;
1672
+ $mat-private-density-generate-styles: not $duplicate-legacy-density !global;
1704
1673
 
1705
1674
  @content;
1706
1675
  $mat-theme-ignore-duplication-warnings: $orig-mat-theme-ignore-duplication-warnings !global;
1707
1676
 
1708
- $_mat-density-generate-at-root: false !global;
1709
- $_mat-density-generate-styles: true !global;
1677
+ $mat-private-density-generate-at-root: false !global;
1678
+ $mat-private-density-generate-styles: true !global;
1679
+ }
1680
+
1681
+ // Checks whether the given value resolves to a theme object. Theme objects are always
1682
+ // of type `map` and can optionally only specify `color`, `density` or `typography`.
1683
+ @function mat-private-is-theme-object($value) {
1684
+ @return type-of($value) == 'map' and (
1685
+ map-has-key($value, color) or
1686
+ map-has-key($value, density) or
1687
+ map-has-key($value, typography) or
1688
+ length($value) == 0
1689
+ );
1690
+ }
1691
+
1692
+ // Checks whether a given value corresponds to a legacy constructed theme.
1693
+ @function mat-private-is-legacy-constructed-theme($value) {
1694
+ @return type-of($value) == 'map' and map-get($value, '_is-legacy-theme');
1695
+ }
1696
+
1697
+ // Creates a backwards compatible theme. Previously in Angular Material, theme objects
1698
+ // contained the color configuration directly. With the recent refactoring of the theming
1699
+ // system to allow for density and typography configurations, this is no longer the case.
1700
+ // To ensure that constructed themes which will be passed to custom theme mixins do not break,
1701
+ // we copy the color configuration and put its properties at the top-level of the theme object.
1702
+ // Here is an example of a pattern that should still work until it's officially marked as a
1703
+ // breaking change:
1704
+ //
1705
+ // @mixin my-custom-component-theme($theme) {
1706
+ // .my-comp {
1707
+ // background-color: mat-color(map-get($theme, primary));
1708
+ // }
1709
+ // }
1710
+ //
1711
+ // Note that the `$theme.primary` key does usually not exist since the color configuration
1712
+ // is stored in `$theme.color` which contains a property for `primary`. This method copies
1713
+ // the map from `$theme.color` to `$theme` for backwards compatibility.
1714
+ @function mat-private-create-backwards-compatibility-theme($theme) {
1715
+ @if not map-get($theme, color) {
1716
+ @return $theme;
1717
+ }
1718
+ $color: map-get($theme, color);
1719
+ @return map-merge($theme, $color);
1720
+ }
1721
+
1722
+ // Gets the theme from the given value that is either already a theme, or a color configuration.
1723
+ // This handles the legacy case where developers pass a color configuration directly to the
1724
+ // theme mixin. Before we introduced the new pattern for constructing a theme, developers passed
1725
+ // the color configuration directly to the theme mixins. This can be still the case if developers
1726
+ // construct a theme manually and pass it to a theme. We support this for backwards compatibility.
1727
+ // TODO(devversion): remove this in the future. Constructing themes manually is rare,
1728
+ // and the code can be easily updated to the new API.
1729
+ @function mat-private-legacy-get-theme($theme-or-color-config) {
1730
+ @if mat-private-is-theme-object($theme-or-color-config) {
1731
+ @return $theme-or-color-config;
1732
+ }
1733
+ @return mat-private-create-backwards-compatibility-theme((
1734
+ _is-legacy-theme: true,
1735
+ color: $theme-or-color-config
1736
+ ));
1710
1737
  }
1711
1738
 
1712
1739
 
@@ -1773,8 +1800,8 @@ $mat-ripple-color-opacity: 0.1;
1773
1800
  }
1774
1801
 
1775
1802
  @mixin mat-ripple-theme($theme-or-color-config) {
1776
- $theme: _mat-legacy-get-theme($theme-or-color-config);
1777
- @include _mat-check-duplicate-theme-styles($theme, 'mat-ripple') {
1803
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
1804
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-ripple') {
1778
1805
  $color: mat-get-color-config($theme);
1779
1806
  @if $color != null {
1780
1807
  @include mat-ripple-color($color);
@@ -1783,7 +1810,6 @@ $mat-ripple-color-opacity: 0.1;
1783
1810
  }
1784
1811
 
1785
1812
 
1786
-
1787
1813
  // This mixin ensures an element spans to fill the nearest ancestor with defined positioning.
1788
1814
  @mixin mat-fill {
1789
1815
  top: 0;
@@ -1903,8 +1929,8 @@ $mat-ripple-color-opacity: 0.1;
1903
1929
  @include _mat-strong-focus-indicators-border-color($theme-or-color);
1904
1930
  }
1905
1931
  @else {
1906
- $theme: _mat-legacy-get-theme($theme-or-color);
1907
- @include _mat-check-duplicate-theme-styles($theme, 'mat-strong-focus-indicators') {
1932
+ $theme: mat-private-legacy-get-theme($theme-or-color);
1933
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-strong-focus-indicators') {
1908
1934
  $color: mat-get-color-config($theme);
1909
1935
  @if $color != null {
1910
1936
  @include mat-strong-focus-indicators-color($color);
@@ -1916,7 +1942,7 @@ $mat-ripple-color-opacity: 0.1;
1916
1942
  // Mixin that ensures focus indicator host elements are positioned so that the focus indicator
1917
1943
  // pseudo element within is positioned relative to the host. Private mixin included within
1918
1944
  // `mat-core`.
1919
- @mixin _mat-strong-focus-indicators-positioning() {
1945
+ @mixin mat-private-strong-focus-indicators-positioning() {
1920
1946
  .mat-focus-indicator {
1921
1947
  position: relative;
1922
1948
  }
@@ -1924,7 +1950,6 @@ $mat-ripple-color-opacity: 0.1;
1924
1950
 
1925
1951
 
1926
1952
 
1927
-
1928
1953
  // Utility for fetching a nested value from a typography config.
1929
1954
  @function _mat-get-type-value($config, $level, $name) {
1930
1955
  @return map-get(map-get($config, $level), $name);
@@ -2058,8 +2083,8 @@ $mat-ripple-color-opacity: 0.1;
2058
2083
  @mixin _mat-option-density($config-or-theme) {}
2059
2084
 
2060
2085
  @mixin mat-option-theme($theme-or-color-config) {
2061
- $theme: _mat-legacy-get-theme($theme-or-color-config);
2062
- @include _mat-check-duplicate-theme-styles($theme, 'mat-option') {
2086
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
2087
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-option') {
2063
2088
  $color: mat-get-color-config($theme);
2064
2089
  $density: mat-get-density-config($theme);
2065
2090
  $typography: mat-get-typography-config($theme);
@@ -2080,7 +2105,6 @@ $mat-ripple-color-opacity: 0.1;
2080
2105
 
2081
2106
 
2082
2107
 
2083
-
2084
2108
  @mixin mat-optgroup-color($config-or-theme) {
2085
2109
  $config: mat-get-color-config($config-or-theme);
2086
2110
  $foreground: map-get($config, foreground);
@@ -2104,8 +2128,8 @@ $mat-ripple-color-opacity: 0.1;
2104
2128
  @mixin _mat-optgroup-density($config-or-theme) {}
2105
2129
 
2106
2130
  @mixin mat-optgroup-theme($theme-or-color-config) {
2107
- $theme: _mat-legacy-get-theme($theme-or-color-config);
2108
- @include _mat-check-duplicate-theme-styles($theme, 'mat-optgroup') {
2131
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
2132
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-optgroup') {
2109
2133
  $color: mat-get-color-config($theme);
2110
2134
  $density: mat-get-density-config($theme);
2111
2135
  $typography: mat-get-typography-config($theme);
@@ -2124,7 +2148,6 @@ $mat-ripple-color-opacity: 0.1;
2124
2148
 
2125
2149
 
2126
2150
 
2127
-
2128
2151
  @mixin mat-pseudo-checkbox-color($config-or-theme) {
2129
2152
  $config: mat-get-color-config($config-or-theme);
2130
2153
  $is-dark-theme: map-get($config, is-dark);
@@ -2188,8 +2211,8 @@ $mat-ripple-color-opacity: 0.1;
2188
2211
  @mixin _mat-pseudo-checkbox-density($config-or-theme) {}
2189
2212
 
2190
2213
  @mixin mat-pseudo-checkbox-theme($theme-or-color-config) {
2191
- $theme: _mat-legacy-get-theme($theme-or-color-config);
2192
- @include _mat-check-duplicate-theme-styles($theme, 'mat-pseudo-checkbox') {
2214
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
2215
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-pseudo-checkbox') {
2193
2216
  $color: mat-get-color-config($theme);
2194
2217
  $density: mat-get-density-config($theme);
2195
2218
  $typography: mat-get-typography-config($theme);
@@ -2282,24 +2305,54 @@ $mat-ripple-color-opacity: 0.1;
2282
2305
  @return map-get($config, headline-1) != null;
2283
2306
  }
2284
2307
 
2308
+ // Whether a config is for the Material Design 2014 typography system.
2309
+ @function mat-private-typography-is-2014-config($config) {
2310
+ @return map-get($config, headline) != null;
2311
+ }
2312
+
2285
2313
  // Given a config for either the 2014 or 2018 Material Design typography system,
2286
2314
  // produces a normalized typography config for the 2014 Material Design typography system.
2287
2315
  // 2014 - https://material.io/archive/guidelines/style/typography.html#typography-styles
2288
2316
  // 2018 - https://material.io/design/typography/the-type-system.html#type-scale
2289
- @function mat-private-typography-normalized-config($config) {
2317
+ @function mat-private-typography-to-2014-config($config) {
2290
2318
  @if mat-private-typography-is-2018-config($config) {
2291
2319
  @return mat-typography-config(
2292
- $display-3: map-get($config, display-1),
2293
- $display-2: map-get($config, display-2),
2294
- $display-1: map-get($config, display-3),
2295
- $headline: map-get($config, headline-4),
2296
- $title: map-get($config, subtitle-1),
2297
- $subheading-2: map-get($config, subhead-1),
2298
- $subheading-1: map-get($config, subhead-2),
2320
+ $display-4: map-get($config, headline-1),
2321
+ $display-3: map-get($config, headline-2),
2322
+ $display-2: map-get($config, headline-3),
2323
+ $display-1: map-get($config, headline-4),
2324
+ $headline: map-get($config, headline-5),
2325
+ $title: map-get($config, headline-6),
2326
+ $subheading-2: map-get($config, subtitle-1),
2327
+ $subheading-1: map-get($config, subtitle-2),
2299
2328
  $body-2: map-get($config, body-1),
2300
2329
  $body-1: map-get($config, body-2),
2301
- $caption: map-get($config, caption),
2302
2330
  $button: map-get($config, button),
2331
+ $caption: map-get($config, caption),
2332
+ );
2333
+ }
2334
+ @return $config;
2335
+ }
2336
+
2337
+ // Given a config for either the 2014 or 2018 Material Design typography system,
2338
+ // produces a normalized typography config for the 2018 Material Design typography system.
2339
+ // 2014 - https://material.io/archive/guidelines/style/typography.html#typography-styles
2340
+ // 2018 - https://material.io/design/typography/the-type-system.html#type-scale
2341
+ @function mat-private-typography-to-2018-config($config) {
2342
+ @if mat-private-typography-is-2014-config($config) {
2343
+ @return (
2344
+ headline-1: map-get($config, display-4),
2345
+ headline-2: map-get($config, display-3),
2346
+ headline-3: map-get($config, display-2),
2347
+ headline-4: map-get($config, display-1),
2348
+ headline-5: map-get($config, headline),
2349
+ headline-6: map-get($config, title),
2350
+ subtitle-1: map-get($config, subheading-2),
2351
+ subtitle-2: map-get($config, subheading-1),
2352
+ body-1: map-get($config, body-2),
2353
+ body-2: map-get($config, body-1),
2354
+ button: map-get($config, button),
2355
+ caption: map-get($config, caption),
2303
2356
  );
2304
2357
  }
2305
2358
  @return $config;
@@ -2395,14 +2448,13 @@ $mat-ripple-color-opacity: 0.1;
2395
2448
 
2396
2449
 
2397
2450
 
2398
-
2399
2451
  @mixin mat-autocomplete-color($config-or-theme) {
2400
2452
  $config: mat-get-color-config($config-or-theme);
2401
2453
  $foreground: map-get($config, foreground);
2402
2454
  $background: map-get($config, background);
2403
2455
 
2404
2456
  .mat-autocomplete-panel {
2405
- @include _mat-theme-overridable-elevation(4, $config);
2457
+ @include mat-private-theme-overridable-elevation(4, $config);
2406
2458
  background: mat-color($background, card);
2407
2459
  color: mat-color($foreground, text);
2408
2460
 
@@ -2426,8 +2478,8 @@ $mat-ripple-color-opacity: 0.1;
2426
2478
  @mixin _mat-autocomplete-density($config-or-theme) {}
2427
2479
 
2428
2480
  @mixin mat-autocomplete-theme($theme-or-color-config) {
2429
- $theme: _mat-legacy-get-theme($theme-or-color-config);
2430
- @include _mat-check-duplicate-theme-styles($theme, 'mat-autocomplete') {
2481
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
2482
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-autocomplete') {
2431
2483
  $color: mat-get-color-config($theme);
2432
2484
  $density: mat-get-density-config($theme);
2433
2485
  $typography: mat-get-typography-config($theme);
@@ -2452,7 +2504,6 @@ $mat-ripple-color-opacity: 0.1;
2452
2504
 
2453
2505
 
2454
2506
 
2455
-
2456
2507
  $mat-badge-font-size: 12px;
2457
2508
  $mat-badge-font-weight: 600;
2458
2509
  $mat-badge-default-size: 22px !default;
@@ -2655,8 +2706,8 @@ $mat-badge-large-size: $mat-badge-default-size + 6;
2655
2706
  @mixin _mat-badge-density($config-or-theme) {}
2656
2707
 
2657
2708
  @mixin mat-badge-theme($theme-or-color-config) {
2658
- $theme: _mat-legacy-get-theme($theme-or-color-config);
2659
- @include _mat-check-duplicate-theme-styles($theme, 'mat-badge') {
2709
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
2710
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-badge') {
2660
2711
  $color: mat-get-color-config($theme);
2661
2712
  $density: mat-get-density-config($theme);
2662
2713
  $typography: mat-get-typography-config($theme);
@@ -2678,14 +2729,13 @@ $mat-badge-large-size: $mat-badge-default-size + 6;
2678
2729
 
2679
2730
 
2680
2731
 
2681
-
2682
2732
  @mixin mat-bottom-sheet-color($config-or-theme) {
2683
2733
  $config: mat-get-color-config($config-or-theme);
2684
2734
  $background: map-get($config, background);
2685
2735
  $foreground: map-get($config, foreground);
2686
2736
 
2687
2737
  .mat-bottom-sheet-container {
2688
- @include _mat-theme-elevation(16, $config);
2738
+ @include mat-private-theme-elevation(16, $config);
2689
2739
  background: mat-color($background, dialog);
2690
2740
  color: mat-color($foreground, text);
2691
2741
  }
@@ -2701,8 +2751,8 @@ $mat-badge-large-size: $mat-badge-default-size + 6;
2701
2751
  @mixin _mat-bottom-sheet-density($config-or-theme) {}
2702
2752
 
2703
2753
  @mixin mat-bottom-sheet-theme($theme-or-color-config) {
2704
- $theme: _mat-legacy-get-theme($theme-or-color-config);
2705
- @include _mat-check-duplicate-theme-styles($theme, 'mat-bottom-sheet') {
2754
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
2755
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-bottom-sheet') {
2706
2756
  $color: mat-get-color-config($theme);
2707
2757
  $density: mat-get-density-config($theme);
2708
2758
  $typography: mat-get-typography-config($theme);
@@ -2723,7 +2773,6 @@ $mat-badge-large-size: $mat-badge-default-size + 6;
2723
2773
 
2724
2774
 
2725
2775
 
2726
-
2727
2776
  $_mat-button-ripple-opacity: 0.1;
2728
2777
 
2729
2778
  // Applies a focus style to an mat-button element for each of the supported palettes.
@@ -2854,30 +2903,30 @@ $_mat-button-ripple-opacity: 0.1;
2854
2903
  }
2855
2904
 
2856
2905
  .mat-stroked-button, .mat-flat-button {
2857
- @include _mat-theme-overridable-elevation(0, $config);
2906
+ @include mat-private-theme-overridable-elevation(0, $config);
2858
2907
  }
2859
2908
 
2860
2909
  .mat-raised-button {
2861
- @include _mat-theme-overridable-elevation(2, $config);
2910
+ @include mat-private-theme-overridable-elevation(2, $config);
2862
2911
 
2863
2912
  &:not(.mat-button-disabled):active {
2864
- @include _mat-theme-overridable-elevation(8, $config);
2913
+ @include mat-private-theme-overridable-elevation(8, $config);
2865
2914
  }
2866
2915
 
2867
2916
  &.mat-button-disabled {
2868
- @include _mat-theme-overridable-elevation(0, $config);
2917
+ @include mat-private-theme-overridable-elevation(0, $config);
2869
2918
  }
2870
2919
  }
2871
2920
 
2872
2921
  .mat-fab, .mat-mini-fab {
2873
- @include _mat-theme-overridable-elevation(6, $config);
2922
+ @include mat-private-theme-overridable-elevation(6, $config);
2874
2923
 
2875
2924
  &:not(.mat-button-disabled):active {
2876
- @include _mat-theme-overridable-elevation(12, $config);
2925
+ @include mat-private-theme-overridable-elevation(12, $config);
2877
2926
  }
2878
2927
 
2879
2928
  &.mat-button-disabled {
2880
- @include _mat-theme-overridable-elevation(0, $config);
2929
+ @include mat-private-theme-overridable-elevation(0, $config);
2881
2930
  }
2882
2931
  }
2883
2932
  }
@@ -2897,8 +2946,8 @@ $_mat-button-ripple-opacity: 0.1;
2897
2946
  @mixin _mat-button-density($config-or-theme) {}
2898
2947
 
2899
2948
  @mixin mat-button-theme($theme-or-color-config) {
2900
- $theme: _mat-legacy-get-theme($theme-or-color-config);
2901
- @include _mat-check-duplicate-theme-styles($theme, 'mat-button') {
2949
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
2950
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-button') {
2902
2951
  $color: mat-get-color-config($theme);
2903
2952
  $density: mat-get-density-config($theme);
2904
2953
  $typography: mat-get-typography-config($theme);
@@ -2920,6 +2969,8 @@ $_mat-button-ripple-opacity: 0.1;
2920
2969
 
2921
2970
 
2922
2971
 
2972
+ // Note that this file is called `private`, because the APIs in it aren't public yet.
2973
+ // Once they're made available, the code should be moved out into an `index.scss`.
2923
2974
 
2924
2975
  // Taken from mat-density with small modifications to not rely on the new Sass module
2925
2976
  // system, and to support arbitrary properties in a density configuration.
@@ -2933,15 +2984,15 @@ $_mat-density-default-scale: 0 !default;
2933
2984
 
2934
2985
  // Whether density should be generated at root. This will be temporarily set to `true`
2935
2986
  // whenever density styles for legacy themes are generated.
2936
- $_mat-density-generate-at-root: false;
2987
+ $mat-private-density-generate-at-root: false;
2937
2988
  // Whether density styles should be generated. This will be temporarily set to `false` if
2938
2989
  // duplicate density styles for a legacy theme would be generated. For legacy themes,
2939
2990
  // we always generate the default density **only once** at root.
2940
- $_mat-density-generate-styles: true;
2991
+ $mat-private-density-generate-styles: true;
2941
2992
 
2942
2993
  // Mixin that can be used to wrap density styles of given components. The mixin will
2943
- // move the density styles to root if the `$_mat-density-generate-at-root` global variable
2944
- // is set. If `$_mat-density-generate-styles` is set to `false`, generation of density
2994
+ // move the density styles to root if the `$mat-private-density-generate-at-root` global variable
2995
+ // is set. If `$mat-private-density-generate-styles` is set to `false`, generation of density
2945
2996
  // styles wrapped in this mixin is skipped. This mixin exists to improve backwards compatibility
2946
2997
  // of the new theming API where density styles are included as part of themes. Previously,
2947
2998
  // density styles of components were part of their base styles. With the new API, they are
@@ -2951,18 +3002,18 @@ $_mat-density-generate-styles: true;
2951
3002
  // density styles. This is breaking as it increases specificity of density styles. This mixin
2952
3003
  // provides an API to control generation of density styles so that we can ensure they are only
2953
3004
  // created *once* and at root.
2954
- @mixin _mat-density-legacy-compatibility() {
2955
- @if $_mat-density-generate-styles and $_mat-density-generate-at-root {
3005
+ @mixin mat-private-density-legacy-compatibility() {
3006
+ @if $mat-private-density-generate-styles and $mat-private-density-generate-at-root {
2956
3007
  @at-root {
2957
3008
  @content;
2958
3009
  }
2959
3010
  }
2960
- @else if $_mat-density-generate-styles {
3011
+ @else if $mat-private-density-generate-styles {
2961
3012
  @content;
2962
3013
  }
2963
3014
  }
2964
3015
 
2965
- @function _mat-density-prop-value($density-config, $density-scale, $property-name) {
3016
+ @function mat-private-density-prop-value($density-config, $density-scale, $property-name) {
2966
3017
  @if (type-of($density-scale) == 'string' and
2967
3018
  index($list: $_mat-density-supported-scales, $value: $density-scale) == null) {
2968
3019
  @error 'mat-density: Supported density scales #{$_mat-density-supported-scales}, ' +
@@ -3014,7 +3065,7 @@ $mat-button-toggle-standard-density-config: (
3014
3065
 
3015
3066
  .mat-button-toggle-standalone,
3016
3067
  .mat-button-toggle-group {
3017
- @include _mat-theme-elevation(2, $config);
3068
+ @include mat-private-theme-elevation(2, $config);
3018
3069
  }
3019
3070
 
3020
3071
  .mat-button-toggle-standalone.mat-button-toggle-appearance-standard,
@@ -3091,12 +3142,12 @@ $mat-button-toggle-standard-density-config: (
3091
3142
  }
3092
3143
  }
3093
3144
 
3094
- @mixin _mat-button-toggle-density($config-or-theme) {
3145
+ @mixin mat-button-toggle-density($config-or-theme) {
3095
3146
  $density-scale: mat-get-density-config($config-or-theme);
3096
- $standard-height: _mat-density-prop-value(
3147
+ $standard-height: mat-private-density-prop-value(
3097
3148
  $mat-button-toggle-standard-density-config, $density-scale, height);
3098
3149
 
3099
- @include _mat-density-legacy-compatibility() {
3150
+ @include mat-private-density-legacy-compatibility() {
3100
3151
  .mat-button-toggle-appearance-standard .mat-button-toggle-label-content {
3101
3152
  line-height: $standard-height;
3102
3153
  }
@@ -3104,8 +3155,8 @@ $mat-button-toggle-standard-density-config: (
3104
3155
  }
3105
3156
 
3106
3157
  @mixin mat-button-toggle-theme($theme-or-color-config) {
3107
- $theme: _mat-legacy-get-theme($theme-or-color-config);
3108
- @include _mat-check-duplicate-theme-styles($theme, 'mat-button-toggle') {
3158
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
3159
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-button-toggle') {
3109
3160
  $color: mat-get-color-config($theme);
3110
3161
  $density: mat-get-density-config($theme);
3111
3162
  $typography: mat-get-typography-config($theme);
@@ -3114,7 +3165,7 @@ $mat-button-toggle-standard-density-config: (
3114
3165
  @include mat-button-toggle-color($color);
3115
3166
  }
3116
3167
  @if $density != null {
3117
- @include _mat-button-toggle-density($density);
3168
+ @include mat-button-toggle-density($density);
3118
3169
  }
3119
3170
  @if $typography != null {
3120
3171
  @include mat-button-toggle-typography($typography);
@@ -3128,20 +3179,19 @@ $mat-button-toggle-standard-density-config: (
3128
3179
 
3129
3180
 
3130
3181
 
3131
-
3132
3182
  @mixin mat-card-color($config-or-theme) {
3133
3183
  $config: mat-get-color-config($config-or-theme);
3134
3184
  $background: map-get($config, background);
3135
3185
  $foreground: map-get($config, foreground);
3136
3186
 
3137
3187
  .mat-card {
3138
- @include _mat-theme-overridable-elevation(1, $config);
3188
+ @include mat-private-theme-overridable-elevation(1, $config);
3139
3189
  background: mat-color($background, card);
3140
3190
  color: mat-color($foreground, text);
3141
3191
 
3142
3192
  // Needs extra specificity to be able to override the elevation selectors.
3143
3193
  &.mat-card-flat {
3144
- @include _mat-theme-overridable-elevation(0, $config);
3194
+ @include mat-private-theme-overridable-elevation(0, $config);
3145
3195
  }
3146
3196
  }
3147
3197
 
@@ -3176,8 +3226,8 @@ $mat-button-toggle-standard-density-config: (
3176
3226
  @mixin _mat-card-density($config-or-theme) {}
3177
3227
 
3178
3228
  @mixin mat-card-theme($theme-or-color-config) {
3179
- $theme: _mat-legacy-get-theme($theme-or-color-config);
3180
- @include _mat-check-duplicate-theme-styles($theme, 'mat-card') {
3229
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
3230
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-card') {
3181
3231
  $color: mat-get-color-config($theme);
3182
3232
  $density: mat-get-density-config($theme);
3183
3233
  $typography: mat-get-typography-config($theme);
@@ -3198,7 +3248,6 @@ $mat-button-toggle-standard-density-config: (
3198
3248
 
3199
3249
 
3200
3250
 
3201
-
3202
3251
  @mixin mat-checkbox-color($config-or-theme) {
3203
3252
  $config: mat-get-color-config($config-or-theme);
3204
3253
  $is-dark-theme: map-get($config, is-dark);
@@ -3307,8 +3356,8 @@ $mat-button-toggle-standard-density-config: (
3307
3356
  @mixin _mat-checkbox-density($config-or-theme) {}
3308
3357
 
3309
3358
  @mixin mat-checkbox-theme($theme-or-color-config) {
3310
- $theme: _mat-legacy-get-theme($theme-or-color-config);
3311
- @include _mat-check-duplicate-theme-styles($theme, 'mat-checkbox') {
3359
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
3360
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-checkbox') {
3312
3361
  $color: mat-get-color-config($theme);
3313
3362
  $density: mat-get-density-config($theme);
3314
3363
  $typography: mat-get-typography-config($theme);
@@ -3330,7 +3379,6 @@ $mat-button-toggle-standard-density-config: (
3330
3379
 
3331
3380
 
3332
3381
 
3333
-
3334
3382
  $mat-chip-remove-font-size: 18px;
3335
3383
 
3336
3384
  @mixin _mat-chip-element-color($foreground, $background) {
@@ -3382,7 +3430,7 @@ $mat-chip-remove-font-size: 18px;
3382
3430
 
3383
3431
  &:not(.mat-chip-disabled) {
3384
3432
  &:active {
3385
- @include _mat-theme-elevation(3, $config);
3433
+ @include mat-private-theme-elevation(3, $config);
3386
3434
  }
3387
3435
 
3388
3436
  .mat-chip-remove:hover {
@@ -3430,8 +3478,8 @@ $mat-chip-remove-font-size: 18px;
3430
3478
  @mixin _mat-chips-density($config-or-theme) {}
3431
3479
 
3432
3480
  @mixin mat-chips-theme($theme-or-color-config) {
3433
- $theme: _mat-legacy-get-theme($theme-or-color-config);
3434
- @include _mat-check-duplicate-theme-styles($theme, 'mat-chips') {
3481
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
3482
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-chips') {
3435
3483
  $color: mat-get-color-config($theme);
3436
3484
  $density: mat-get-density-config($theme);
3437
3485
  $typography: mat-get-typography-config($theme);
@@ -3453,7 +3501,6 @@ $mat-chip-remove-font-size: 18px;
3453
3501
 
3454
3502
 
3455
3503
 
3456
-
3457
3504
  @mixin mat-divider-color($config-or-theme) {
3458
3505
  $config: mat-get-color-config($config-or-theme);
3459
3506
  $foreground: map-get($config, foreground);
@@ -3472,8 +3519,8 @@ $mat-chip-remove-font-size: 18px;
3472
3519
  @mixin _mat-divider-density($config-or-theme) {}
3473
3520
 
3474
3521
  @mixin mat-divider-theme($theme-or-color-config) {
3475
- $theme: _mat-legacy-get-theme($theme-or-color-config);
3476
- @include _mat-check-duplicate-theme-styles($theme, 'mat-divider') {
3522
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
3523
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-divider') {
3477
3524
  $color: mat-get-color-config($theme);
3478
3525
  $density: mat-get-density-config($theme);
3479
3526
  $typography: mat-get-typography-config($theme);
@@ -3494,7 +3541,6 @@ $mat-chip-remove-font-size: 18px;
3494
3541
 
3495
3542
 
3496
3543
 
3497
-
3498
3544
  @mixin mat-table-color($config-or-theme) {
3499
3545
  $config: mat-get-color-config($config-or-theme);
3500
3546
  $background: map-get($config, background);
@@ -3544,8 +3590,8 @@ $mat-chip-remove-font-size: 18px;
3544
3590
  @mixin _mat-table-density($config-or-theme) {}
3545
3591
 
3546
3592
  @mixin mat-table-theme($theme-or-color-config) {
3547
- $theme: _mat-legacy-get-theme($theme-or-color-config);
3548
- @include _mat-check-duplicate-theme-styles($theme, 'mat-table') {
3593
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
3594
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-table') {
3549
3595
  $color: mat-get-color-config($theme);
3550
3596
  $density: mat-get-density-config($theme);
3551
3597
  $typography: mat-get-typography-config($theme);
@@ -3568,7 +3614,6 @@ $mat-chip-remove-font-size: 18px;
3568
3614
 
3569
3615
 
3570
3616
 
3571
-
3572
3617
  $mat-datepicker-selected-today-box-shadow-width: 1px;
3573
3618
  $mat-datepicker-selected-fade-amount: 0.6;
3574
3619
  $mat-datepicker-range-fade-amount: 0.2;
@@ -3602,6 +3647,16 @@ $mat-calendar-weekday-table-font-size: 11px !default;
3602
3647
  box-shadow: inset 0 0 0 $mat-datepicker-selected-today-box-shadow-width
3603
3648
  mat-color($palette, default-contrast);
3604
3649
  }
3650
+
3651
+ .mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover,
3652
+ .cdk-keyboard-focused .mat-calendar-body-active,
3653
+ .cdk-program-focused .mat-calendar-body-active {
3654
+ & > .mat-calendar-body-cell-content {
3655
+ @include _mat-datepicker-unselected-cell {
3656
+ background-color: mat-color($palette, 0.3);
3657
+ }
3658
+ }
3659
+ }
3605
3660
  }
3606
3661
 
3607
3662
  // Utility mixin to target cells that aren't selected. Used to make selector easier to follow.
@@ -3657,16 +3712,6 @@ $mat-calendar-weekday-table-font-size: 11px !default;
3657
3712
  color: $disabled-color;
3658
3713
  }
3659
3714
 
3660
- .mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover,
3661
- .cdk-keyboard-focused .mat-calendar-body-active,
3662
- .cdk-program-focused .mat-calendar-body-active {
3663
- & > .mat-calendar-body-cell-content {
3664
- @include _mat-datepicker-unselected-cell {
3665
- background-color: mat-color($background, hover);
3666
- }
3667
- }
3668
- }
3669
-
3670
3715
  .mat-calendar-body-in-preview {
3671
3716
  $divider-color: mat-color($foreground, divider);
3672
3717
 
@@ -3709,7 +3754,7 @@ $mat-calendar-weekday-table-font-size: 11px !default;
3709
3754
  @include _mat-datepicker-color(map-get($config, primary));
3710
3755
 
3711
3756
  .mat-datepicker-content {
3712
- @include _mat-theme-elevation(4, $config);
3757
+ @include mat-private-theme-elevation(4, $config);
3713
3758
  background-color: mat-color($background, card);
3714
3759
  color: mat-color($foreground, text);
3715
3760
 
@@ -3723,7 +3768,7 @@ $mat-calendar-weekday-table-font-size: 11px !default;
3723
3768
  }
3724
3769
 
3725
3770
  .mat-datepicker-content-touch {
3726
- @include _mat-theme-elevation(0, $config);
3771
+ @include mat-private-theme-elevation(0, $config);
3727
3772
  }
3728
3773
 
3729
3774
  .mat-datepicker-toggle-active {
@@ -3808,8 +3853,8 @@ $mat-calendar-weekday-table-font-size: 11px !default;
3808
3853
  @mixin _mat-datepicker-density($config-or-theme) {}
3809
3854
 
3810
3855
  @mixin mat-datepicker-theme($theme-or-color-config) {
3811
- $theme: _mat-legacy-get-theme($theme-or-color-config);
3812
- @include _mat-check-duplicate-theme-styles($theme, 'mat-datepicker') {
3856
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
3857
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-datepicker') {
3813
3858
  $color: mat-get-color-config($theme);
3814
3859
  $density: mat-get-density-config($theme);
3815
3860
  $typography: mat-get-typography-config($theme);
@@ -3832,14 +3877,13 @@ $mat-calendar-weekday-table-font-size: 11px !default;
3832
3877
 
3833
3878
 
3834
3879
 
3835
-
3836
3880
  @mixin mat-dialog-color($config-or-theme) {
3837
3881
  $config: mat-get-color-config($config-or-theme);
3838
3882
  $background: map-get($config, background);
3839
3883
  $foreground: map-get($config, foreground);
3840
3884
 
3841
3885
  .mat-dialog-container {
3842
- @include _mat-theme-elevation(24, $config);
3886
+ @include mat-private-theme-elevation(24, $config);
3843
3887
  background: mat-color($background, dialog);
3844
3888
  color: mat-color($foreground, text);
3845
3889
  }
@@ -3855,8 +3899,8 @@ $mat-calendar-weekday-table-font-size: 11px !default;
3855
3899
  @mixin _mat-dialog-density($config-or-theme) {}
3856
3900
 
3857
3901
  @mixin mat-dialog-theme($theme-or-color-config) {
3858
- $theme: _mat-legacy-get-theme($theme-or-color-config);
3859
- @include _mat-check-duplicate-theme-styles($theme, 'mat-dialog') {
3902
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
3903
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-dialog') {
3860
3904
  $color: mat-get-color-config($theme);
3861
3905
  $density: mat-get-density-config($theme);
3862
3906
  $typography: mat-get-typography-config($theme);
@@ -3878,7 +3922,6 @@ $mat-calendar-weekday-table-font-size: 11px !default;
3878
3922
 
3879
3923
 
3880
3924
 
3881
-
3882
3925
  // Default minimum and maximum height for collapsed panel headers.
3883
3926
  $mat-expansion-panel-header-collapsed-height: 48px !default;
3884
3927
  $mat-expansion-panel-header-collapsed-minimum-height: 36px !default;
@@ -3917,7 +3960,7 @@ $mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
3917
3960
  $foreground: map-get($config, foreground);
3918
3961
 
3919
3962
  .mat-expansion-panel {
3920
- @include _mat-theme-overridable-elevation(2, $config);
3963
+ @include mat-private-theme-overridable-elevation(2, $config);
3921
3964
  background: mat-color($background, card);
3922
3965
  color: mat-color($foreground, text);
3923
3966
  }
@@ -3979,14 +4022,14 @@ $mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
3979
4022
  }
3980
4023
  }
3981
4024
 
3982
- @mixin _mat-expansion-panel-density($config-or-theme) {
4025
+ @mixin mat-expansion-panel-density($config-or-theme) {
3983
4026
  $density-scale: mat-get-density-config($config-or-theme);
3984
- $expanded-height: _mat-density-prop-value(
4027
+ $expanded-height: mat-private-density-prop-value(
3985
4028
  $mat-expansion-panel-header-density-config, $density-scale, expanded-height);
3986
- $collapsed-height: _mat-density-prop-value(
4029
+ $collapsed-height: mat-private-density-prop-value(
3987
4030
  $mat-expansion-panel-header-density-config, $density-scale, collapsed-height);
3988
4031
 
3989
- @include _mat-density-legacy-compatibility() {
4032
+ @include mat-private-density-legacy-compatibility() {
3990
4033
  .mat-expansion-panel-header {
3991
4034
  height: $collapsed-height;
3992
4035
 
@@ -3998,8 +4041,8 @@ $mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
3998
4041
  }
3999
4042
 
4000
4043
  @mixin mat-expansion-panel-theme($theme-or-color-config) {
4001
- $theme: _mat-legacy-get-theme($theme-or-color-config);
4002
- @include _mat-check-duplicate-theme-styles($theme, 'mat-expansion-panel') {
4044
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
4045
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-expansion-panel') {
4003
4046
  $color: mat-get-color-config($theme);
4004
4047
  $density: mat-get-density-config($theme);
4005
4048
  $typography: mat-get-typography-config($theme);
@@ -4008,7 +4051,7 @@ $mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
4008
4051
  @include mat-expansion-panel-color($color);
4009
4052
  }
4010
4053
  @if $density != null {
4011
- @include _mat-expansion-panel-density($density);
4054
+ @include mat-expansion-panel-density($density);
4012
4055
  }
4013
4056
  @if $typography != null {
4014
4057
  @include mat-expansion-panel-typography($typography);
@@ -4019,7 +4062,6 @@ $mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
4019
4062
 
4020
4063
 
4021
4064
 
4022
-
4023
4065
  // This mixin will ensure that lines that overflow the container will hide the overflow and
4024
4066
  // truncate neatly with an ellipsis.
4025
4067
  @mixin mat-truncate-line() {
@@ -4087,8 +4129,8 @@ $mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
4087
4129
  @mixin _mat-grid-list-density($config-or-theme) {}
4088
4130
 
4089
4131
  @mixin mat-grid-list-theme($theme-or-color-config) {
4090
- $theme: _mat-legacy-get-theme($theme-or-color-config);
4091
- @include _mat-check-duplicate-theme-styles($theme, 'mat-grid-list') {
4132
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
4133
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-grid-list') {
4092
4134
  $color: mat-get-color-config($theme);
4093
4135
  $density: mat-get-density-config($theme);
4094
4136
  $typography: mat-get-typography-config($theme);
@@ -4107,7 +4149,6 @@ $mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
4107
4149
 
4108
4150
 
4109
4151
 
4110
-
4111
4152
  @mixin mat-icon-color($config-or-theme) {
4112
4153
  $config: mat-get-color-config($config-or-theme);
4113
4154
  $primary: map-get($config, primary);
@@ -4136,8 +4177,8 @@ $mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
4136
4177
  @mixin _mat-icon-density($config-or-theme) {}
4137
4178
 
4138
4179
  @mixin mat-icon-theme($theme-or-color-config) {
4139
- $theme: _mat-legacy-get-theme($theme-or-color-config);
4140
- @include _mat-check-duplicate-theme-styles($theme, 'mat-icon') {
4180
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
4181
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-icon') {
4141
4182
  $color: mat-get-color-config($theme);
4142
4183
  $density: mat-get-density-config($theme);
4143
4184
  $typography: mat-get-typography-config($theme);
@@ -4159,11 +4200,10 @@ $mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
4159
4200
 
4160
4201
 
4161
4202
 
4162
-
4163
4203
  // Renders a gradient for showing the dashed line when the input is disabled.
4164
4204
  // Unlike using a border, a gradient allows us to adjust the spacing of the dotted line
4165
4205
  // to match the Material Design spec.
4166
- @mixin mat-control-disabled-underline($color) {
4206
+ @mixin mat-private-control-disabled-underline($color) {
4167
4207
  background-image: linear-gradient(to right, $color 0%, $color 33%, transparent 0%);
4168
4208
  background-size: 4px 100%;
4169
4209
  background-repeat: repeat-x;
@@ -4172,7 +4212,7 @@ $mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
4172
4212
  // Figures out the color of the placeholder for a form control.
4173
4213
  // Used primarily to prevent the various form controls from
4174
4214
  // becoming out of sync since these colors aren't in a palette.
4175
- @function _mat-control-placeholder-color($config) {
4215
+ @function mat-private-control-placeholder-color($config) {
4176
4216
  $foreground: map-get($config, foreground);
4177
4217
  $is-dark-theme: map-get($config, is-dark);
4178
4218
  @return mat-color($foreground, secondary-text, if($is-dark-theme, 0.5, 0.42));
@@ -4220,9 +4260,9 @@ $mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
4220
4260
  backface-visibility: $value;
4221
4261
  }
4222
4262
 
4223
- @mixin position-sticky {
4224
- position: -webkit-sticky;
4225
- position: sticky;
4263
+ @mixin position-sticky($important: false) {
4264
+ position: -webkit-sticky #{if($important, '!important', '')};
4265
+ position: sticky #{if($important, '!important', '')};
4226
4266
  }
4227
4267
  /* stylelint-enable */
4228
4268
 
@@ -4248,7 +4288,7 @@ $mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
4248
4288
  caret-color: mat-color($primary, text);
4249
4289
 
4250
4290
  @include input-placeholder {
4251
- color: _mat-control-placeholder-color($config);
4291
+ color: mat-private-control-placeholder-color($config);
4252
4292
  }
4253
4293
 
4254
4294
  // On dark themes we set the native `select` color to some shade of white,
@@ -4300,8 +4340,8 @@ $mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
4300
4340
  @mixin _mat-input-density($config-or-theme) {}
4301
4341
 
4302
4342
  @mixin mat-input-theme($theme-or-color-config) {
4303
- $theme: _mat-legacy-get-theme($theme-or-color-config);
4304
- @include _mat-check-duplicate-theme-styles($theme, 'mat-input') {
4343
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
4344
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-input') {
4305
4345
  $color: mat-get-color-config($theme);
4306
4346
  $density: mat-get-density-config($theme);
4307
4347
  $typography: mat-get-typography-config($theme);
@@ -4324,7 +4364,6 @@ $mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
4324
4364
 
4325
4365
 
4326
4366
 
4327
-
4328
4367
  @mixin mat-list-color($config-or-theme) {
4329
4368
  $config: mat-get-color-config($config-or-theme);
4330
4369
  $background: map-get($config, background);
@@ -4417,8 +4456,8 @@ $mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
4417
4456
  @mixin _mat-list-density($config-or-theme) {}
4418
4457
 
4419
4458
  @mixin mat-list-theme($theme-or-color-config) {
4420
- $theme: _mat-legacy-get-theme($theme-or-color-config);
4421
- @include _mat-check-duplicate-theme-styles($theme, 'mat-list') {
4459
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
4460
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-list') {
4422
4461
  $color: mat-get-color-config($theme);
4423
4462
  $density: mat-get-density-config($theme);
4424
4463
  $typography: mat-get-typography-config($theme);
@@ -4441,14 +4480,13 @@ $mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
4441
4480
 
4442
4481
 
4443
4482
 
4444
-
4445
4483
  @mixin mat-menu-color($config-or-theme) {
4446
4484
  $config: mat-get-color-config($config-or-theme);
4447
4485
  $background: map-get($config, background);
4448
4486
  $foreground: map-get($config, foreground);
4449
4487
 
4450
4488
  .mat-menu-panel {
4451
- @include _mat-theme-overridable-elevation(4, $config);
4489
+ @include mat-private-theme-overridable-elevation(4, $config);
4452
4490
  background: mat-color($background, 'card');
4453
4491
  }
4454
4492
 
@@ -4494,8 +4532,8 @@ $mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
4494
4532
  @mixin _mat-menu-density($config-or-theme) {}
4495
4533
 
4496
4534
  @mixin mat-menu-theme($theme-or-color-config) {
4497
- $theme: _mat-legacy-get-theme($theme-or-color-config);
4498
- @include _mat-check-duplicate-theme-styles($theme, 'mat-menu') {
4535
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
4536
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-menu') {
4499
4537
  $color: mat-get-color-config($theme);
4500
4538
  $density: mat-get-density-config($theme);
4501
4539
  $typography: mat-get-typography-config($theme);
@@ -4517,7 +4555,6 @@ $mat-expansion-panel-header-transition: 225ms cubic-bezier(0.4, 0, 0.2, 1);
4517
4555
 
4518
4556
 
4519
4557
 
4520
-
4521
4558
  $mat-paginator-height: 56px !default;
4522
4559
  // Minimum height for paginator's in the highest density is determined based on how
4523
4560
  // much the paginator can shrink until the content exceeds (i.e. navigation buttons).
@@ -4579,11 +4616,11 @@ $mat-paginator-density-config: (
4579
4616
  }
4580
4617
  }
4581
4618
 
4582
- @mixin _mat-paginator-density($config-or-theme) {
4619
+ @mixin mat-paginator-density($config-or-theme) {
4583
4620
  $density-scale: mat-get-density-config($config-or-theme);
4584
- $height: _mat-density-prop-value($mat-paginator-density-config, $density-scale, height);
4621
+ $height: mat-private-density-prop-value($mat-paginator-density-config, $density-scale, height);
4585
4622
 
4586
- @include _mat-density-legacy-compatibility() {
4623
+ @include mat-private-density-legacy-compatibility() {
4587
4624
  .mat-paginator-container {
4588
4625
  min-height: $height;
4589
4626
  }
@@ -4591,8 +4628,8 @@ $mat-paginator-density-config: (
4591
4628
  }
4592
4629
 
4593
4630
  @mixin mat-paginator-theme($theme-or-color-config) {
4594
- $theme: _mat-legacy-get-theme($theme-or-color-config);
4595
- @include _mat-check-duplicate-theme-styles($theme, 'mat-paginator') {
4631
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
4632
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-paginator') {
4596
4633
  $color: mat-get-color-config($theme);
4597
4634
  $density: mat-get-density-config($theme);
4598
4635
  $typography: mat-get-typography-config($theme);
@@ -4601,7 +4638,7 @@ $mat-paginator-density-config: (
4601
4638
  @include mat-paginator-color($color);
4602
4639
  }
4603
4640
  @if $density != null {
4604
- @include _mat-paginator-density($density);
4641
+ @include mat-paginator-density($density);
4605
4642
  }
4606
4643
  @if $typography != null {
4607
4644
  @include mat-paginator-typography($typography);
@@ -4612,7 +4649,6 @@ $mat-paginator-density-config: (
4612
4649
 
4613
4650
 
4614
4651
 
4615
-
4616
4652
  @mixin mat-progress-bar-color($config-or-theme) {
4617
4653
  $config: mat-get-color-config($config-or-theme);
4618
4654
  $primary: map-get($config, primary);
@@ -4665,8 +4701,8 @@ $mat-paginator-density-config: (
4665
4701
  @mixin _mat-progress-bar-density($config-or-theme) {}
4666
4702
 
4667
4703
  @mixin mat-progress-bar-theme($theme-or-color-config) {
4668
- $theme: _mat-legacy-get-theme($theme-or-color-config);
4669
- @include _mat-check-duplicate-theme-styles($theme, 'mat-progress-bar') {
4704
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
4705
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-progress-bar') {
4670
4706
  $color: mat-get-color-config($theme);
4671
4707
  $density: mat-get-density-config($theme);
4672
4708
  $typography: mat-get-typography-config($theme);
@@ -4687,7 +4723,6 @@ $mat-paginator-density-config: (
4687
4723
 
4688
4724
 
4689
4725
 
4690
-
4691
4726
  @mixin mat-progress-spinner-color($config-or-theme) {
4692
4727
  $config: mat-get-color-config($config-or-theme);
4693
4728
  $primary: map-get($config, primary);
@@ -4714,8 +4749,8 @@ $mat-paginator-density-config: (
4714
4749
  @mixin _mat-progress-spinner-density($config-or-theme) {}
4715
4750
 
4716
4751
  @mixin mat-progress-spinner-theme($theme-or-color-config) {
4717
- $theme: _mat-legacy-get-theme($theme-or-color-config);
4718
- @include _mat-check-duplicate-theme-styles($theme, 'mat-progress-spinner') {
4752
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
4753
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-progress-spinner') {
4719
4754
  $color: mat-get-color-config($theme);
4720
4755
  $density: mat-get-density-config($theme);
4721
4756
  $typography: mat-get-typography-config($theme);
@@ -4736,7 +4771,6 @@ $mat-paginator-density-config: (
4736
4771
 
4737
4772
 
4738
4773
 
4739
-
4740
4774
  @mixin _mat-radio-color($palette) {
4741
4775
  &.mat-radio-checked .mat-radio-outer-circle {
4742
4776
  border-color: mat-color($palette);
@@ -4812,8 +4846,8 @@ $mat-paginator-density-config: (
4812
4846
  @mixin _mat-radio-density($config-or-theme) {}
4813
4847
 
4814
4848
  @mixin mat-radio-theme($theme-or-color-config) {
4815
- $theme: _mat-legacy-get-theme($theme-or-color-config);
4816
- @include _mat-check-duplicate-theme-styles($theme, 'mat-radio') {
4849
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
4850
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-radio') {
4817
4851
  $color: mat-get-color-config($theme);
4818
4852
  $density: mat-get-density-config($theme);
4819
4853
  $typography: mat-get-typography-config($theme);
@@ -4837,7 +4871,6 @@ $mat-paginator-density-config: (
4837
4871
 
4838
4872
 
4839
4873
 
4840
-
4841
4874
  @mixin mat-select-color($config-or-theme) {
4842
4875
  $config: mat-get-color-config($config-or-theme);
4843
4876
  $foreground: map-get($config, foreground);
@@ -4851,7 +4884,7 @@ $mat-paginator-density-config: (
4851
4884
  }
4852
4885
 
4853
4886
  .mat-select-placeholder {
4854
- color: _mat-control-placeholder-color($config);
4887
+ color: mat-private-control-placeholder-color($config);
4855
4888
  }
4856
4889
 
4857
4890
  .mat-select-disabled .mat-select-value {
@@ -4864,7 +4897,7 @@ $mat-paginator-density-config: (
4864
4897
 
4865
4898
  .mat-select-panel {
4866
4899
  background: mat-color($background, card);
4867
- @include _mat-theme-overridable-elevation(4, $config);
4900
+ @include mat-private-theme-overridable-elevation(4, $config);
4868
4901
 
4869
4902
  .mat-option.mat-selected:not(.mat-option-multiple) {
4870
4903
  background: mat-color($background, hover, 0.12);
@@ -4913,8 +4946,8 @@ $mat-paginator-density-config: (
4913
4946
  @mixin _mat-select-density($config-or-theme) {}
4914
4947
 
4915
4948
  @mixin mat-select-theme($theme-or-color-config) {
4916
- $theme: _mat-legacy-get-theme($theme-or-color-config);
4917
- @include _mat-check-duplicate-theme-styles($theme, 'mat-select') {
4949
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
4950
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-select') {
4918
4951
  $color: mat-get-color-config($theme);
4919
4952
  $density: mat-get-density-config($theme);
4920
4953
  $typography: mat-get-typography-config($theme);
@@ -4935,7 +4968,6 @@ $mat-paginator-density-config: (
4935
4968
 
4936
4969
 
4937
4970
 
4938
-
4939
4971
  @mixin mat-sidenav-color($config-or-theme) {
4940
4972
  $config: mat-get-color-config($config-or-theme);
4941
4973
  $primary: map-get($config, primary);
@@ -4965,7 +4997,7 @@ $mat-paginator-density-config: (
4965
4997
  &:not(.mat-drawer-side) {
4966
4998
  // The elevation of z-16 is noted in the design specifications.
4967
4999
  // See https://material.io/design/components/navigation-drawer.html
4968
- @include _mat-theme-elevation(16, $config);
5000
+ @include mat-private-theme-elevation(16, $config);
4969
5001
  }
4970
5002
  }
4971
5003
 
@@ -5012,8 +5044,8 @@ $mat-paginator-density-config: (
5012
5044
  @mixin _mat-sidenav-density($config-or-theme) {}
5013
5045
 
5014
5046
  @mixin mat-sidenav-theme($theme-or-color-config) {
5015
- $theme: _mat-legacy-get-theme($theme-or-color-config);
5016
- @include _mat-check-duplicate-theme-styles($theme, 'mat-sidenav') {
5047
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
5048
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-sidenav') {
5017
5049
  $color: mat-get-color-config($theme);
5018
5050
  $density: mat-get-density-config($theme);
5019
5051
  $typography: mat-get-typography-config($theme);
@@ -5035,7 +5067,6 @@ $mat-paginator-density-config: (
5035
5067
 
5036
5068
 
5037
5069
 
5038
-
5039
5070
  @mixin _mat-slide-toggle-checked($palette, $thumb-checked-hue) {
5040
5071
  &.mat-checked {
5041
5072
  .mat-slide-toggle-thumb {
@@ -5096,7 +5127,7 @@ $mat-paginator-density-config: (
5096
5127
  }
5097
5128
 
5098
5129
  .mat-slide-toggle-thumb {
5099
- @include _mat-theme-elevation(1, $config);
5130
+ @include mat-private-theme-elevation(1, $config);
5100
5131
  background-color: mat-color($mat-grey, $thumb-unchecked-hue);
5101
5132
  }
5102
5133
 
@@ -5115,8 +5146,8 @@ $mat-paginator-density-config: (
5115
5146
  @mixin _mat-slide-toggle-density($config-or-theme) {}
5116
5147
 
5117
5148
  @mixin mat-slide-toggle-theme($theme-or-color-config) {
5118
- $theme: _mat-legacy-get-theme($theme-or-color-config);
5119
- @include _mat-check-duplicate-theme-styles($theme, 'mat-slide-toggle') {
5149
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
5150
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-slide-toggle') {
5120
5151
  $color: mat-get-color-config($theme);
5121
5152
  $density: mat-get-density-config($theme);
5122
5153
  $typography: mat-get-typography-config($theme);
@@ -5138,7 +5169,6 @@ $mat-paginator-density-config: (
5138
5169
 
5139
5170
 
5140
5171
 
5141
-
5142
5172
  @mixin _mat-slider-inner-content-theme($palette) {
5143
5173
  .mat-slider-track-fill,
5144
5174
  .mat-slider-thumb,
@@ -5314,8 +5344,8 @@ $mat-paginator-density-config: (
5314
5344
  @mixin _mat-slider-density($config-or-theme) {}
5315
5345
 
5316
5346
  @mixin mat-slider-theme($theme-or-color-config) {
5317
- $theme: _mat-legacy-get-theme($theme-or-color-config);
5318
- @include _mat-check-duplicate-theme-styles($theme, 'mat-slider') {
5347
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
5348
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-slider') {
5319
5349
  $color: mat-get-color-config($theme);
5320
5350
  $density: mat-get-density-config($theme);
5321
5351
  $typography: mat-get-typography-config($theme);
@@ -5336,7 +5366,6 @@ $mat-paginator-density-config: (
5336
5366
 
5337
5367
 
5338
5368
 
5339
-
5340
5369
  $mat-stepper-header-height: 72px !default;
5341
5370
  // Minimum height for highest density stepper's is determined based on how much
5342
5371
  // stepper headers can shrink until the step icon or step label exceed. We can't use
@@ -5497,12 +5526,12 @@ $mat-step-header-icon-size: 16px;
5497
5526
  }
5498
5527
  }
5499
5528
 
5500
- @mixin _mat-stepper-density($config-or-theme) {
5529
+ @mixin mat-stepper-density($config-or-theme) {
5501
5530
  $density-scale: mat-get-density-config($config-or-theme);
5502
- $height: _mat-density-prop-value($mat-stepper-density-config, $density-scale, height);
5531
+ $height: mat-private-density-prop-value($mat-stepper-density-config, $density-scale, height);
5503
5532
  $vertical-padding: ($height - $mat-stepper-label-header-height) / 2;
5504
5533
 
5505
- @include _mat-density-legacy-compatibility() {
5534
+ @include mat-private-density-legacy-compatibility() {
5506
5535
  .mat-horizontal-stepper-header {
5507
5536
  height: $height;
5508
5537
  }
@@ -5534,8 +5563,8 @@ $mat-step-header-icon-size: 16px;
5534
5563
  }
5535
5564
 
5536
5565
  @mixin mat-stepper-theme($theme-or-color-config) {
5537
- $theme: _mat-legacy-get-theme($theme-or-color-config);
5538
- @include _mat-check-duplicate-theme-styles($theme, 'mat-stepper') {
5566
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
5567
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-stepper') {
5539
5568
  $color: mat-get-color-config($theme);
5540
5569
  $density: mat-get-density-config($theme);
5541
5570
  $typography: mat-get-typography-config($theme);
@@ -5544,7 +5573,7 @@ $mat-step-header-icon-size: 16px;
5544
5573
  @include mat-stepper-color($color);
5545
5574
  }
5546
5575
  @if $density != null {
5547
- @include _mat-stepper-density($density);
5576
+ @include mat-stepper-density($density);
5548
5577
  }
5549
5578
  @if $typography != null {
5550
5579
  @include mat-stepper-typography($typography);
@@ -5554,7 +5583,6 @@ $mat-step-header-icon-size: 16px;
5554
5583
 
5555
5584
 
5556
5585
 
5557
-
5558
5586
  @mixin mat-sort-color($config-or-theme) {
5559
5587
  $config: mat-get-color-config($config-or-theme);
5560
5588
  $background: map-get($config, background);
@@ -5585,8 +5613,8 @@ $mat-step-header-icon-size: 16px;
5585
5613
  @mixin _mat-sort-density($config-or-theme) {}
5586
5614
 
5587
5615
  @mixin mat-sort-theme($theme-or-color-config) {
5588
- $theme: _mat-legacy-get-theme($theme-or-color-config);
5589
- @include _mat-check-duplicate-theme-styles($theme, 'mat-sort') {
5616
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
5617
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-sort') {
5590
5618
  $color: mat-get-color-config($theme);
5591
5619
  $density: mat-get-density-config($theme);
5592
5620
  $typography: mat-get-typography-config($theme);
@@ -5607,7 +5635,6 @@ $mat-step-header-icon-size: 16px;
5607
5635
 
5608
5636
 
5609
5637
 
5610
-
5611
5638
  @mixin mat-tabs-color($config-or-theme) {
5612
5639
  $config: mat-get-color-config($config-or-theme);
5613
5640
  $primary: map-get($config, primary);
@@ -5668,7 +5695,9 @@ $mat-step-header-icon-size: 16px;
5668
5695
 
5669
5696
  // Override ink bar when background color is the same
5670
5697
  &.mat-background-#{$name} {
5671
- @include _mat-ink-bar($color, default-contrast);
5698
+ > .mat-tab-header, > .mat-tab-link-container {
5699
+ @include _mat-ink-bar($color, default-contrast);
5700
+ }
5672
5701
  }
5673
5702
  }
5674
5703
  }
@@ -5702,13 +5731,16 @@ $mat-step-header-icon-size: 16px;
5702
5731
  }
5703
5732
 
5704
5733
  @mixin _mat-tabs-background($background-color) {
5734
+ // Note that these selectors target direct descendants so
5735
+ // that the styles don't apply to any nested tab groups.
5736
+
5705
5737
  // Set background color for the tab group
5706
- .mat-tab-header, .mat-tab-links, .mat-tab-header-pagination {
5738
+ > .mat-tab-header, > .mat-tab-link-container, > .mat-tab-header-pagination {
5707
5739
  background-color: mat-color($background-color);
5708
5740
  }
5709
5741
 
5710
5742
  // Set labels to contrast against background
5711
- .mat-tab-label, .mat-tab-link {
5743
+ > .mat-tab-header .mat-tab-label, > .mat-tab-link-container .mat-tab-link {
5712
5744
  color: mat-color($background-color, default-contrast);
5713
5745
 
5714
5746
  &.mat-tab-disabled {
@@ -5717,17 +5749,18 @@ $mat-step-header-icon-size: 16px;
5717
5749
  }
5718
5750
 
5719
5751
  // Set pagination chevrons to contrast background
5720
- .mat-tab-header-pagination-chevron {
5752
+ > .mat-tab-header-pagination .mat-tab-header-pagination-chevron {
5721
5753
  border-color: mat-color($background-color, default-contrast);
5722
5754
  }
5723
5755
 
5724
- .mat-tab-header-pagination-disabled .mat-tab-header-pagination-chevron {
5756
+ > .mat-tab-header-pagination-disabled .mat-tab-header-pagination-chevron {
5725
5757
  border-color: mat-color($background-color, default-contrast, 0.4);
5726
5758
  }
5727
5759
 
5728
5760
  // Set ripples color to be the contrast color of the new background. Otherwise the ripple
5729
5761
  // color will be based on the app background color.
5730
- .mat-ripple-element {
5762
+ > .mat-tab-header .mat-ripple-element,
5763
+ > .mat-tab-link-container .mat-ripple-element {
5731
5764
  background-color: mat-color($background-color, default-contrast, 0.12);
5732
5765
  }
5733
5766
  }
@@ -5750,8 +5783,8 @@ $mat-step-header-icon-size: 16px;
5750
5783
  @mixin _mat-tabs-density($config-or-theme) {}
5751
5784
 
5752
5785
  @mixin mat-tabs-theme($theme-or-color-config) {
5753
- $theme: _mat-legacy-get-theme($theme-or-color-config);
5754
- @include _mat-check-duplicate-theme-styles($theme, 'mat-tabs') {
5786
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
5787
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-tabs') {
5755
5788
  $color: mat-get-color-config($theme);
5756
5789
  $density: mat-get-density-config($theme);
5757
5790
  $typography: mat-get-typography-config($theme);
@@ -5773,7 +5806,6 @@ $mat-step-header-icon-size: 16px;
5773
5806
 
5774
5807
 
5775
5808
 
5776
-
5777
5809
  // Minimum height for toolbar's in the highest density is difficult to determine because
5778
5810
  // developers can project arbitrary content. We use a minimum value that ensures that most
5779
5811
  // common content (e.g. icon buttons) does not exceed the row boundaries in highest density.
@@ -5880,14 +5912,14 @@ $mat-toolbar-mobile-density-config: (
5880
5912
  }
5881
5913
  }
5882
5914
 
5883
- @mixin _mat-toolbar-density($config-or-theme) {
5915
+ @mixin mat-toolbar-density($config-or-theme) {
5884
5916
  $density-scale: mat-get-density-config($config-or-theme);
5885
- $height-desktop: _mat-density-prop-value(
5917
+ $height-desktop: mat-private-density-prop-value(
5886
5918
  $mat-toolbar-desktop-density-config, $density-scale, height);
5887
- $height-mobile: _mat-density-prop-value(
5919
+ $height-mobile: mat-private-density-prop-value(
5888
5920
  $mat-toolbar-mobile-density-config, $density-scale, height);
5889
5921
 
5890
- @include _mat-density-legacy-compatibility() {
5922
+ @include mat-private-density-legacy-compatibility() {
5891
5923
  // Set the default height for the toolbar.
5892
5924
  @include _mat-toolbar-height($height-desktop);
5893
5925
 
@@ -5901,8 +5933,8 @@ $mat-toolbar-mobile-density-config: (
5901
5933
  }
5902
5934
 
5903
5935
  @mixin mat-toolbar-theme($theme-or-color-config) {
5904
- $theme: _mat-legacy-get-theme($theme-or-color-config);
5905
- @include _mat-check-duplicate-theme-styles($theme, 'mat-toolbar') {
5936
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
5937
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-toolbar') {
5906
5938
  $color: mat-get-color-config($theme);
5907
5939
  $density: mat-get-density-config($theme);
5908
5940
  $typography: mat-get-typography-config($theme);
@@ -5911,7 +5943,7 @@ $mat-toolbar-mobile-density-config: (
5911
5943
  @include mat-toolbar-color($color);
5912
5944
  }
5913
5945
  @if $density != null {
5914
- @include _mat-toolbar-density($density);
5946
+ @include mat-toolbar-density($density);
5915
5947
  }
5916
5948
  @if $typography != null {
5917
5949
  @include mat-toolbar-typography($typography);
@@ -5923,7 +5955,6 @@ $mat-toolbar-mobile-density-config: (
5923
5955
 
5924
5956
 
5925
5957
 
5926
-
5927
5958
  $mat-tooltip-target-height: 22px;
5928
5959
  $mat-tooltip-font-size: 10px;
5929
5960
  $mat-tooltip-vertical-padding: ($mat-tooltip-target-height - $mat-tooltip-font-size) / 2;
@@ -5961,8 +5992,8 @@ $mat-tooltip-handset-vertical-padding:
5961
5992
  @mixin _mat-tooltip-density($config-or-theme) {}
5962
5993
 
5963
5994
  @mixin mat-tooltip-theme($theme-or-color-config) {
5964
- $theme: _mat-legacy-get-theme($theme-or-color-config);
5965
- @include _mat-check-duplicate-theme-styles($theme, 'mat-tooltip') {
5995
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
5996
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-tooltip') {
5966
5997
  $color: mat-get-color-config($theme);
5967
5998
  $density: mat-get-density-config($theme);
5968
5999
  $typography: mat-get-typography-config($theme);
@@ -5985,7 +6016,6 @@ $mat-tooltip-handset-vertical-padding:
5985
6016
 
5986
6017
 
5987
6018
 
5988
-
5989
6019
  @mixin mat-snack-bar-color($config-or-theme) {
5990
6020
  $config: mat-get-color-config($config-or-theme);
5991
6021
  $is-dark-theme: map-get($config, is-dark);
@@ -5997,7 +6027,7 @@ $mat-tooltip-handset-vertical-padding:
5997
6027
  color: if($is-dark-theme, $dark-primary-text, $light-secondary-text);
5998
6028
  background: if($is-dark-theme, map-get($mat-grey, 50), #323232);
5999
6029
 
6000
- @include _mat-theme-elevation(6, $config);
6030
+ @include mat-private-theme-elevation(6, $config);
6001
6031
  }
6002
6032
 
6003
6033
  .mat-simple-snackbar-action {
@@ -6027,8 +6057,8 @@ $mat-tooltip-handset-vertical-padding:
6027
6057
  @mixin _mat-snack-bar-density($config-or-theme) {}
6028
6058
 
6029
6059
  @mixin mat-snack-bar-theme($theme-or-color-config) {
6030
- $theme: _mat-legacy-get-theme($theme-or-color-config);
6031
- @include _mat-check-duplicate-theme-styles($theme, 'mat-snack-bar') {
6060
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
6061
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-snack-bar') {
6032
6062
  $color: mat-get-color-config($theme);
6033
6063
  $density: mat-get-density-config($theme);
6034
6064
  $typography: mat-get-typography-config($theme);
@@ -6058,8 +6088,6 @@ $mat-tooltip-handset-vertical-padding:
6058
6088
 
6059
6089
 
6060
6090
 
6061
-
6062
-
6063
6091
  // Theme styles that only apply to the fill appearance of the form-field.
6064
6092
 
6065
6093
  @mixin mat-form-field-fill-color($config-or-theme) {
@@ -6157,11 +6185,11 @@ $mat-form-field-fill-dedupe: 0;
6157
6185
  }
6158
6186
  }
6159
6187
 
6160
- @mixin _mat-form-field-fill-density($config-or-theme) {}
6188
+ @mixin mat-private-form-field-fill-density($config-or-theme) {}
6161
6189
 
6162
6190
  @mixin mat-form-field-fill-theme($theme-or-color-config) {
6163
- $theme: _mat-legacy-get-theme($theme-or-color-config);
6164
- @include _mat-check-duplicate-theme-styles($theme, 'mat-form-field-fill') {
6191
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
6192
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-form-field-fill') {
6165
6193
  $color: mat-get-color-config($theme);
6166
6194
  $density: mat-get-density-config($theme);
6167
6195
  $typography: mat-get-typography-config($theme);
@@ -6170,7 +6198,7 @@ $mat-form-field-fill-dedupe: 0;
6170
6198
  @include mat-form-field-fill-color($color);
6171
6199
  }
6172
6200
  @if $density != null {
6173
- @include _mat-form-field-fill-density($density);
6201
+ @include mat-private-form-field-fill-density($density);
6174
6202
  }
6175
6203
  @if $typography != null {
6176
6204
  @include mat-form-field-fill-typography($typography);
@@ -6184,7 +6212,6 @@ $mat-form-field-fill-dedupe: 0;
6184
6212
 
6185
6213
 
6186
6214
 
6187
-
6188
6215
  // Theme styles that only apply to the legacy appearance of the form-field.
6189
6216
 
6190
6217
  @mixin mat-form-field-legacy-color($config-or-theme) {
@@ -6209,7 +6236,7 @@ $mat-form-field-fill-dedupe: 0;
6209
6236
  }
6210
6237
 
6211
6238
  &.mat-form-field-disabled .mat-form-field-underline {
6212
- @include mat-control-disabled-underline($underline-color);
6239
+ @include mat-private-control-disabled-underline($underline-color);
6213
6240
  }
6214
6241
  }
6215
6242
  }
@@ -6355,11 +6382,11 @@ $mat-form-field-legacy-dedupe: 0;
6355
6382
  }
6356
6383
  }
6357
6384
 
6358
- @mixin _mat-form-field-legacy-density($config-or-theme) {}
6385
+ @mixin mat-private-form-field-legacy-density($config-or-theme) {}
6359
6386
 
6360
6387
  @mixin mat-form-field-legacy-theme($theme-or-color-config) {
6361
- $theme: _mat-legacy-get-theme($theme-or-color-config);
6362
- @include _mat-check-duplicate-theme-styles($theme, 'mat-form-field-legacy') {
6388
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
6389
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-form-field-legacy') {
6363
6390
  $color: mat-get-color-config($theme);
6364
6391
  $density: mat-get-density-config($theme);
6365
6392
  $typography: mat-get-typography-config($theme);
@@ -6368,7 +6395,7 @@ $mat-form-field-legacy-dedupe: 0;
6368
6395
  @include mat-form-field-legacy-color($color);
6369
6396
  }
6370
6397
  @if $density != null {
6371
- @include _mat-form-field-legacy-density($density);
6398
+ @include mat-private-form-field-legacy-density($density);
6372
6399
  }
6373
6400
  @if $typography != null {
6374
6401
  @include mat-form-field-legacy-typography($typography);
@@ -6382,7 +6409,6 @@ $mat-form-field-legacy-dedupe: 0;
6382
6409
 
6383
6410
 
6384
6411
 
6385
-
6386
6412
  // Theme styles that only apply to the outline appearance of the form-field.
6387
6413
 
6388
6414
  @mixin mat-form-field-outline-color($config-or-theme) {
@@ -6510,11 +6536,11 @@ $mat-form-field-outline-dedupe: 0;
6510
6536
  }
6511
6537
  }
6512
6538
 
6513
- @mixin _mat-form-field-outline-density($config-or-theme) {}
6539
+ @mixin mat-private-form-field-outline-density($config-or-theme) {}
6514
6540
 
6515
6541
  @mixin mat-form-field-outline-theme($theme-or-color-config) {
6516
- $theme: _mat-legacy-get-theme($theme-or-color-config);
6517
- @include _mat-check-duplicate-theme-styles($theme, 'mat-form-field-outline') {
6542
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
6543
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-form-field-outline') {
6518
6544
  $color: mat-get-color-config($theme);
6519
6545
  $density: mat-get-density-config($theme);
6520
6546
  $typography: mat-get-typography-config($theme);
@@ -6523,7 +6549,7 @@ $mat-form-field-outline-dedupe: 0;
6523
6549
  @include mat-form-field-outline-color($color);
6524
6550
  }
6525
6551
  @if $density != null {
6526
- @include _mat-form-field-outline-density($density);
6552
+ @include mat-private-form-field-outline-density($density);
6527
6553
  }
6528
6554
  @if $typography != null {
6529
6555
  @include mat-form-field-outline-typography($typography);
@@ -6538,7 +6564,6 @@ $mat-form-field-outline-dedupe: 0;
6538
6564
 
6539
6565
 
6540
6566
 
6541
-
6542
6567
  // Theme styles that only apply to the standard appearance of the form-field.
6543
6568
 
6544
6569
  @mixin mat-form-field-standard-color($config-or-theme) {
@@ -6554,18 +6579,18 @@ $mat-form-field-outline-dedupe: 0;
6554
6579
  }
6555
6580
 
6556
6581
  &.mat-form-field-disabled .mat-form-field-underline {
6557
- @include mat-control-disabled-underline($underline-color);
6582
+ @include mat-private-control-disabled-underline($underline-color);
6558
6583
  }
6559
6584
  }
6560
6585
  }
6561
6586
 
6562
6587
  @mixin mat-form-field-standard-typography($config-or-theme) {}
6563
6588
 
6564
- @mixin _mat-form-field-standard-density($config-or-theme) {}
6589
+ @mixin mat-private-form-field-standard-density($config-or-theme) {}
6565
6590
 
6566
6591
  @mixin mat-form-field-standard-theme($theme-or-color-config) {
6567
- $theme: _mat-legacy-get-theme($theme-or-color-config);
6568
- @include _mat-check-duplicate-theme-styles($theme, 'mat-form-field-standard') {
6592
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
6593
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-form-field-standard') {
6569
6594
  $color: mat-get-color-config($theme);
6570
6595
  $density: mat-get-density-config($theme);
6571
6596
  $typography: mat-get-typography-config($theme);
@@ -6574,7 +6599,7 @@ $mat-form-field-outline-dedupe: 0;
6574
6599
  @include mat-form-field-standard-color($color);
6575
6600
  }
6576
6601
  @if $density != null {
6577
- @include _mat-form-field-standard-density($density);
6602
+ @include mat-private-form-field-standard-density($density);
6578
6603
  }
6579
6604
  @if $typography != null {
6580
6605
  @include mat-form-field-standard-typography($typography);
@@ -6812,17 +6837,17 @@ $mat-form-field-dedupe: 0;
6812
6837
  @include mat-form-field-outline-typography($config);
6813
6838
  }
6814
6839
 
6815
- @mixin _mat-form-field-density($config-or-theme) {
6840
+ @mixin mat-form-field-density($config-or-theme) {
6816
6841
  $density-scale: mat-get-density-config($config-or-theme);
6817
- @include _mat-form-field-legacy-density($density-scale);
6818
- @include _mat-form-field-standard-density($density-scale);
6819
- @include _mat-form-field-fill-density($density-scale);
6820
- @include _mat-form-field-outline-density($density-scale);
6842
+ @include mat-private-form-field-legacy-density($density-scale);
6843
+ @include mat-private-form-field-standard-density($density-scale);
6844
+ @include mat-private-form-field-fill-density($density-scale);
6845
+ @include mat-private-form-field-outline-density($density-scale);
6821
6846
  }
6822
6847
 
6823
6848
  @mixin mat-form-field-theme($theme-or-color-config) {
6824
- $theme: _mat-legacy-get-theme($theme-or-color-config);
6825
- @include _mat-check-duplicate-theme-styles($theme, 'mat-form-field') {
6849
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
6850
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-form-field') {
6826
6851
  $color: mat-get-color-config($theme);
6827
6852
  $density: mat-get-density-config($theme);
6828
6853
  $typography: mat-get-typography-config($theme);
@@ -6831,7 +6856,7 @@ $mat-form-field-dedupe: 0;
6831
6856
  @include mat-form-field-color($color);
6832
6857
  }
6833
6858
  @if $density != null {
6834
- @include _mat-form-field-density($density);
6859
+ @include mat-form-field-density($density);
6835
6860
  }
6836
6861
  @if $typography != null {
6837
6862
  @include mat-form-field-typography($typography);
@@ -6843,7 +6868,6 @@ $mat-form-field-dedupe: 0;
6843
6868
 
6844
6869
 
6845
6870
 
6846
-
6847
6871
  $mat-tree-node-height: 48px !default;
6848
6872
  // Minimum height for tree nodes in highest density is difficult to determine as
6849
6873
  // developers can display arbitrary content. We use a minimum height which ensures
@@ -6888,11 +6912,11 @@ $mat-tree-density-config: (
6888
6912
  }
6889
6913
  }
6890
6914
 
6891
- @mixin _mat-tree-density($config-or-theme) {
6915
+ @mixin mat-tree-density($config-or-theme) {
6892
6916
  $density-scale: mat-get-density-config($config-or-theme);
6893
- $height: _mat-density-prop-value($mat-tree-density-config, $density-scale, height);
6917
+ $height: mat-private-density-prop-value($mat-tree-density-config, $density-scale, height);
6894
6918
 
6895
- @include _mat-density-legacy-compatibility() {
6919
+ @include mat-private-density-legacy-compatibility() {
6896
6920
  .mat-tree-node {
6897
6921
  min-height: $height;
6898
6922
  }
@@ -6900,8 +6924,8 @@ $mat-tree-density-config: (
6900
6924
  }
6901
6925
 
6902
6926
  @mixin mat-tree-theme($theme-or-color-config) {
6903
- $theme: _mat-legacy-get-theme($theme-or-color-config);
6904
- @include _mat-check-duplicate-theme-styles($theme, 'mat-tree') {
6927
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
6928
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-tree') {
6905
6929
  $color: mat-get-color-config($theme);
6906
6930
  $density: mat-get-density-config($theme);
6907
6931
  $typography: mat-get-typography-config($theme);
@@ -6910,7 +6934,7 @@ $mat-tree-density-config: (
6910
6934
  @include mat-tree-color($color);
6911
6935
  }
6912
6936
  @if $density != null {
6913
- @include _mat-tree-density($density);
6937
+ @include mat-tree-density($density);
6914
6938
  }
6915
6939
  @if $typography != null {
6916
6940
  @include mat-tree-typography($typography);
@@ -6923,7 +6947,7 @@ $mat-tree-density-config: (
6923
6947
 
6924
6948
  // Includes all of the typographic styles.
6925
6949
  @mixin angular-material-typography($config-or-theme: null) {
6926
- $config: if(_mat-is-theme-object($config-or-theme),
6950
+ $config: if(mat-private-is-theme-object($config-or-theme),
6927
6951
  mat-get-typography-config($config-or-theme), $config-or-theme);
6928
6952
 
6929
6953
  // If no actual color configuration has been specified, create a default one.
@@ -6985,7 +7009,7 @@ $mat-tree-density-config: (
6985
7009
  @include cdk-overlay();
6986
7010
  @include cdk-text-field();
6987
7011
 
6988
- @include _mat-strong-focus-indicators-positioning();
7012
+ @include mat-private-strong-focus-indicators-positioning();
6989
7013
  @include _mat-mdc-core();
6990
7014
  }
6991
7015
 
@@ -7006,8 +7030,8 @@ $mat-tree-density-config: (
7006
7030
  // `mat-elevation-z$zValue` where `$zValue` corresponds to the z-space to which the element is
7007
7031
  // elevated.
7008
7032
  @for $zValue from 0 through 24 {
7009
- .#{$_mat-elevation-prefix}#{$zValue} {
7010
- @include _mat-theme-elevation($zValue, $config);
7033
+ .#{$mat-elevation-prefix}#{$zValue} {
7034
+ @include mat-private-theme-elevation($zValue, $config);
7011
7035
  }
7012
7036
  }
7013
7037
 
@@ -7021,11 +7045,11 @@ $mat-tree-density-config: (
7021
7045
 
7022
7046
  // Mixin that renders all of the core styles that depend on the theme.
7023
7047
  @mixin mat-core-theme($theme-or-color-config) {
7024
- $theme: _mat-legacy-get-theme($theme-or-color-config);
7048
+ $theme: mat-private-legacy-get-theme($theme-or-color-config);
7025
7049
  // Wrap the sub-theme includes in the duplicate theme styles mixin. This ensures that
7026
7050
  // there won't be multiple warnings. e.g. if `mat-core-theme` reports a warning, then
7027
7051
  // the imported themes (such as `mat-ripple-theme`) should not report again.
7028
- @include _mat-check-duplicate-theme-styles($theme, 'mat-core') {
7052
+ @include mat-private-check-duplicate-theme-styles($theme, 'mat-core') {
7029
7053
  @include mat-ripple-theme($theme);
7030
7054
  @include mat-option-theme($theme);
7031
7055
  @include mat-optgroup-theme($theme);
@@ -7090,7 +7114,8 @@ $mat-tree-density-config: (
7090
7114
 
7091
7115
  // Create a theme.
7092
7116
  @mixin angular-material-theme($theme-or-color-config) {
7093
- @include _mat-check-duplicate-theme-styles($theme-or-color-config, 'angular-material-theme') {
7117
+ $dedupe-key: 'angular-material-theme';
7118
+ @include mat-private-check-duplicate-theme-styles($theme-or-color-config, $dedupe-key) {
7094
7119
  @include mat-core-theme($theme-or-color-config);
7095
7120
  @include mat-autocomplete-theme($theme-or-color-config);
7096
7121
  @include mat-badge-theme($theme-or-color-config);
@@ -7130,11 +7155,12 @@ $mat-tree-density-config: (
7130
7155
  }
7131
7156
 
7132
7157
 
7158
+
7133
7159
  // Includes all of the color styles.
7134
7160
  @mixin angular-material-color($config-or-theme) {
7135
7161
  // In case a theme object has been passed instead of a configuration for
7136
7162
  // the color system, extract the color config from the theme object.
7137
- $config: if(_mat-is-theme-object($config-or-theme),
7163
+ $config: if(mat-private-is-theme-object($config-or-theme),
7138
7164
  mat-get-color-config($config-or-theme), $config-or-theme);
7139
7165
 
7140
7166
  @if $config == null {
@@ -7150,22 +7176,37 @@ $mat-tree-density-config: (
7150
7176
 
7151
7177
 
7152
7178
 
7179
+
7180
+
7181
+
7182
+
7183
+
7184
+
7185
+
7153
7186
  // Includes all of the density styles.
7154
- @mixin _angular-material-density($config-or-theme) {
7187
+ @mixin angular-material-density($config-or-theme) {
7155
7188
  // In case a theme object has been passed instead of a configuration for
7156
7189
  // the density system, extract the density config from the theme object.
7157
- $config: if(_mat-is-theme-object($config-or-theme),
7190
+ $config: if(mat-private-is-theme-object($config-or-theme),
7158
7191
  mat-get-density-config($config-or-theme), $config-or-theme);
7159
7192
 
7160
7193
  @if $config == null {
7161
7194
  @error 'No density configuration specified.';
7162
7195
  }
7163
7196
 
7164
- @include angular-material-theme((
7165
- color: null,
7166
- typography: null,
7167
- density: $config,
7168
- ));
7197
+ // TODO: COMP-309: Do not use individual mixins. Instead, use the all-theme mixin and only
7198
+ // specify a `density` config while setting `color` and `typography` to `null`. This is currently
7199
+ // not possible as it would introduce a circular dependency for density because the `mat-core`
7200
+ // mixin that is transitively loaded by the `all-theme` file, imports `all-density` which
7201
+ // would then load `all-theme` again. This ultimately results a circular dependency.
7202
+
7203
+ @include mat-expansion-panel-density($config);
7204
+ @include mat-stepper-density($config);
7205
+ @include mat-toolbar-density($config);
7206
+ @include mat-tree-density($config);
7207
+ @include mat-paginator-density($config);
7208
+ @include mat-form-field-density($config);
7209
+ @include mat-button-toggle-density($config);
7169
7210
  }
7170
7211
 
7171
7212