@angular/material 11.0.4 → 11.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (583) hide show
  1. package/_theming.scss +354 -337
  2. package/autocomplete/_autocomplete-theme.scss +4 -5
  3. package/autocomplete/autocomplete.d.ts +7 -1
  4. package/autocomplete/index.metadata.json +1 -1
  5. package/autocomplete/testing/autocomplete-harness.d.ts +29 -15
  6. package/badge/_badge-theme.scss +2 -3
  7. package/bottom-sheet/_bottom-sheet-theme.scss +4 -5
  8. package/bundles/material-autocomplete-testing.umd.js +54 -36
  9. package/bundles/material-autocomplete-testing.umd.js.map +1 -1
  10. package/bundles/material-autocomplete-testing.umd.min.js +2 -2
  11. package/bundles/material-autocomplete-testing.umd.min.js.map +1 -1
  12. package/bundles/material-autocomplete.umd.js +31 -9
  13. package/bundles/material-autocomplete.umd.js.map +1 -1
  14. package/bundles/material-autocomplete.umd.min.js +3 -3
  15. package/bundles/material-autocomplete.umd.min.js.map +1 -1
  16. package/bundles/material-badge-testing.umd.js +9 -1
  17. package/bundles/material-badge-testing.umd.js.map +1 -1
  18. package/bundles/material-badge-testing.umd.min.js +1 -1
  19. package/bundles/material-badge-testing.umd.min.js.map +1 -1
  20. package/bundles/material-badge.umd.js +9 -1
  21. package/bundles/material-badge.umd.js.map +1 -1
  22. package/bundles/material-badge.umd.min.js +3 -3
  23. package/bundles/material-badge.umd.min.js.map +1 -1
  24. package/bundles/material-bottom-sheet-testing.umd.js +9 -1
  25. package/bundles/material-bottom-sheet-testing.umd.js.map +1 -1
  26. package/bundles/material-bottom-sheet-testing.umd.min.js +1 -1
  27. package/bundles/material-bottom-sheet-testing.umd.min.js.map +1 -1
  28. package/bundles/material-bottom-sheet.umd.js +9 -1
  29. package/bundles/material-bottom-sheet.umd.js.map +1 -1
  30. package/bundles/material-bottom-sheet.umd.min.js +1 -1
  31. package/bundles/material-bottom-sheet.umd.min.js.map +1 -1
  32. package/bundles/material-button-testing.umd.js +9 -1
  33. package/bundles/material-button-testing.umd.js.map +1 -1
  34. package/bundles/material-button-testing.umd.min.js +1 -1
  35. package/bundles/material-button-testing.umd.min.js.map +1 -1
  36. package/bundles/material-button-toggle-testing.umd.js +9 -1
  37. package/bundles/material-button-toggle-testing.umd.js.map +1 -1
  38. package/bundles/material-button-toggle-testing.umd.min.js +1 -1
  39. package/bundles/material-button-toggle-testing.umd.min.js.map +1 -1
  40. package/bundles/material-button-toggle.umd.js +9 -1
  41. package/bundles/material-button-toggle.umd.js.map +1 -1
  42. package/bundles/material-button-toggle.umd.min.js +1 -1
  43. package/bundles/material-button-toggle.umd.min.js.map +1 -1
  44. package/bundles/material-button.umd.js +17 -5
  45. package/bundles/material-button.umd.js.map +1 -1
  46. package/bundles/material-button.umd.min.js +1 -1
  47. package/bundles/material-button.umd.min.js.map +1 -1
  48. package/bundles/material-card-testing.umd.js +9 -1
  49. package/bundles/material-card-testing.umd.js.map +1 -1
  50. package/bundles/material-card-testing.umd.min.js +1 -1
  51. package/bundles/material-card-testing.umd.min.js.map +1 -1
  52. package/bundles/material-checkbox-testing.umd.js +73 -64
  53. package/bundles/material-checkbox-testing.umd.js.map +1 -1
  54. package/bundles/material-checkbox-testing.umd.min.js +2 -2
  55. package/bundles/material-checkbox-testing.umd.min.js.map +1 -1
  56. package/bundles/material-checkbox.umd.js +15 -3
  57. package/bundles/material-checkbox.umd.js.map +1 -1
  58. package/bundles/material-checkbox.umd.min.js +2 -2
  59. package/bundles/material-checkbox.umd.min.js.map +1 -1
  60. package/bundles/material-chips-testing.umd.js +189 -29
  61. package/bundles/material-chips-testing.umd.js.map +1 -1
  62. package/bundles/material-chips-testing.umd.min.js +2 -2
  63. package/bundles/material-chips-testing.umd.min.js.map +1 -1
  64. package/bundles/material-chips.umd.js +9 -1
  65. package/bundles/material-chips.umd.js.map +1 -1
  66. package/bundles/material-chips.umd.min.js +4 -4
  67. package/bundles/material-chips.umd.min.js.map +1 -1
  68. package/bundles/material-core-testing.umd.js +14 -3
  69. package/bundles/material-core-testing.umd.js.map +1 -1
  70. package/bundles/material-core-testing.umd.min.js +1 -1
  71. package/bundles/material-core-testing.umd.min.js.map +1 -1
  72. package/bundles/material-core.umd.js +55 -14
  73. package/bundles/material-core.umd.js.map +1 -1
  74. package/bundles/material-core.umd.min.js +16 -8
  75. package/bundles/material-core.umd.min.js.map +1 -1
  76. package/bundles/material-datepicker-testing.umd.js +24 -12
  77. package/bundles/material-datepicker-testing.umd.js.map +1 -1
  78. package/bundles/material-datepicker-testing.umd.min.js +1 -1
  79. package/bundles/material-datepicker-testing.umd.min.js.map +1 -1
  80. package/bundles/material-datepicker.umd.js +250 -80
  81. package/bundles/material-datepicker.umd.js.map +1 -1
  82. package/bundles/material-datepicker.umd.min.js +20 -12
  83. package/bundles/material-datepicker.umd.min.js.map +1 -1
  84. package/bundles/material-dialog-testing.umd.js +9 -1
  85. package/bundles/material-dialog-testing.umd.js.map +1 -1
  86. package/bundles/material-dialog-testing.umd.min.js +1 -1
  87. package/bundles/material-dialog-testing.umd.min.js.map +1 -1
  88. package/bundles/material-dialog.umd.js +10 -2
  89. package/bundles/material-dialog.umd.js.map +1 -1
  90. package/bundles/material-dialog.umd.min.js +8 -8
  91. package/bundles/material-dialog.umd.min.js.map +1 -1
  92. package/bundles/material-divider-testing.umd.js +9 -1
  93. package/bundles/material-divider-testing.umd.js.map +1 -1
  94. package/bundles/material-divider-testing.umd.min.js +2 -2
  95. package/bundles/material-divider-testing.umd.min.js.map +1 -1
  96. package/bundles/material-expansion-testing.umd.js +9 -1
  97. package/bundles/material-expansion-testing.umd.js.map +1 -1
  98. package/bundles/material-expansion-testing.umd.min.js +1 -1
  99. package/bundles/material-expansion-testing.umd.min.js.map +1 -1
  100. package/bundles/material-expansion.umd.js +16 -4
  101. package/bundles/material-expansion.umd.js.map +1 -1
  102. package/bundles/material-expansion.umd.min.js +6 -6
  103. package/bundles/material-expansion.umd.min.js.map +1 -1
  104. package/bundles/material-form-field-testing-control.umd.js +9 -1
  105. package/bundles/material-form-field-testing-control.umd.js.map +1 -1
  106. package/bundles/material-form-field-testing-control.umd.min.js +1 -1
  107. package/bundles/material-form-field-testing-control.umd.min.js.map +1 -1
  108. package/bundles/material-form-field-testing.umd.js +41 -30
  109. package/bundles/material-form-field-testing.umd.js.map +1 -1
  110. package/bundles/material-form-field-testing.umd.min.js +3 -3
  111. package/bundles/material-form-field-testing.umd.min.js.map +1 -1
  112. package/bundles/material-form-field.umd.js +11 -3
  113. package/bundles/material-form-field.umd.js.map +1 -1
  114. package/bundles/material-form-field.umd.min.js +2 -2
  115. package/bundles/material-form-field.umd.min.js.map +1 -1
  116. package/bundles/material-grid-list-testing.umd.js +15 -5
  117. package/bundles/material-grid-list-testing.umd.js.map +1 -1
  118. package/bundles/material-grid-list-testing.umd.min.js +2 -2
  119. package/bundles/material-grid-list-testing.umd.min.js.map +1 -1
  120. package/bundles/material-grid-list.umd.js +156 -146
  121. package/bundles/material-grid-list.umd.js.map +1 -1
  122. package/bundles/material-grid-list.umd.min.js +12 -19
  123. package/bundles/material-grid-list.umd.min.js.map +1 -1
  124. package/bundles/material-icon-testing.umd.js +12 -2
  125. package/bundles/material-icon-testing.umd.js.map +1 -1
  126. package/bundles/material-icon-testing.umd.min.js +2 -2
  127. package/bundles/material-icon-testing.umd.min.js.map +1 -1
  128. package/bundles/material-icon.umd.js +46 -2
  129. package/bundles/material-icon.umd.js.map +1 -1
  130. package/bundles/material-icon.umd.min.js +3 -3
  131. package/bundles/material-icon.umd.min.js.map +1 -1
  132. package/bundles/material-input-testing.umd.js +19 -8
  133. package/bundles/material-input-testing.umd.js.map +1 -1
  134. package/bundles/material-input-testing.umd.min.js +1 -1
  135. package/bundles/material-input-testing.umd.min.js.map +1 -1
  136. package/bundles/material-input.umd.js +9 -1
  137. package/bundles/material-input.umd.js.map +1 -1
  138. package/bundles/material-input.umd.min.js +1 -1
  139. package/bundles/material-input.umd.min.js.map +1 -1
  140. package/bundles/material-list-testing.umd.js +62 -57
  141. package/bundles/material-list-testing.umd.js.map +1 -1
  142. package/bundles/material-list-testing.umd.min.js +1 -1
  143. package/bundles/material-list-testing.umd.min.js.map +1 -1
  144. package/bundles/material-list.umd.js +9 -1
  145. package/bundles/material-list.umd.js.map +1 -1
  146. package/bundles/material-list.umd.min.js +1 -1
  147. package/bundles/material-list.umd.min.js.map +1 -1
  148. package/bundles/material-menu-testing.umd.js +94 -67
  149. package/bundles/material-menu-testing.umd.js.map +1 -1
  150. package/bundles/material-menu-testing.umd.min.js +2 -2
  151. package/bundles/material-menu-testing.umd.min.js.map +1 -1
  152. package/bundles/material-menu.umd.js +24 -28
  153. package/bundles/material-menu.umd.js.map +1 -1
  154. package/bundles/material-menu.umd.min.js +3 -3
  155. package/bundles/material-menu.umd.min.js.map +1 -1
  156. package/bundles/material-paginator-testing.umd.js +50 -34
  157. package/bundles/material-paginator-testing.umd.js.map +1 -1
  158. package/bundles/material-paginator-testing.umd.min.js +2 -2
  159. package/bundles/material-paginator-testing.umd.min.js.map +1 -1
  160. package/bundles/material-paginator.umd.js +9 -1
  161. package/bundles/material-paginator.umd.js.map +1 -1
  162. package/bundles/material-paginator.umd.min.js +1 -1
  163. package/bundles/material-paginator.umd.min.js.map +1 -1
  164. package/bundles/material-progress-bar-testing.umd.js +9 -1
  165. package/bundles/material-progress-bar-testing.umd.js.map +1 -1
  166. package/bundles/material-progress-bar-testing.umd.min.js +1 -1
  167. package/bundles/material-progress-bar-testing.umd.min.js.map +1 -1
  168. package/bundles/material-progress-bar.umd.js +9 -1
  169. package/bundles/material-progress-bar.umd.js.map +1 -1
  170. package/bundles/material-progress-bar.umd.min.js +1 -1
  171. package/bundles/material-progress-bar.umd.min.js.map +1 -1
  172. package/bundles/material-progress-spinner-testing.umd.js +9 -1
  173. package/bundles/material-progress-spinner-testing.umd.js.map +1 -1
  174. package/bundles/material-progress-spinner-testing.umd.min.js +1 -1
  175. package/bundles/material-progress-spinner-testing.umd.min.js.map +1 -1
  176. package/bundles/material-progress-spinner.umd.js +9 -1
  177. package/bundles/material-progress-spinner.umd.js.map +1 -1
  178. package/bundles/material-progress-spinner.umd.min.js +2 -2
  179. package/bundles/material-progress-spinner.umd.min.js.map +1 -1
  180. package/bundles/material-radio-testing.umd.js +88 -63
  181. package/bundles/material-radio-testing.umd.js.map +1 -1
  182. package/bundles/material-radio-testing.umd.min.js +2 -2
  183. package/bundles/material-radio-testing.umd.min.js.map +1 -1
  184. package/bundles/material-radio.umd.js +18 -5
  185. package/bundles/material-radio.umd.js.map +1 -1
  186. package/bundles/material-radio.umd.min.js +1 -1
  187. package/bundles/material-radio.umd.min.js.map +1 -1
  188. package/bundles/material-select-testing.umd.js +73 -51
  189. package/bundles/material-select-testing.umd.js.map +1 -1
  190. package/bundles/material-select-testing.umd.min.js +2 -2
  191. package/bundles/material-select-testing.umd.min.js.map +1 -1
  192. package/bundles/material-select.umd.js +14 -3
  193. package/bundles/material-select.umd.js.map +1 -1
  194. package/bundles/material-select.umd.min.js +5 -5
  195. package/bundles/material-select.umd.min.js.map +1 -1
  196. package/bundles/material-sidenav-testing.umd.js +175 -28
  197. package/bundles/material-sidenav-testing.umd.js.map +1 -1
  198. package/bundles/material-sidenav-testing.umd.min.js +2 -2
  199. package/bundles/material-sidenav-testing.umd.min.js.map +1 -1
  200. package/bundles/material-sidenav.umd.js +9 -1
  201. package/bundles/material-sidenav.umd.js.map +1 -1
  202. package/bundles/material-sidenav.umd.min.js +1 -1
  203. package/bundles/material-sidenav.umd.min.js.map +1 -1
  204. package/bundles/material-slide-toggle-testing.umd.js +9 -1
  205. package/bundles/material-slide-toggle-testing.umd.js.map +1 -1
  206. package/bundles/material-slide-toggle-testing.umd.min.js +1 -1
  207. package/bundles/material-slide-toggle-testing.umd.min.js.map +1 -1
  208. package/bundles/material-slide-toggle.umd.js +16 -3
  209. package/bundles/material-slide-toggle.umd.js.map +1 -1
  210. package/bundles/material-slide-toggle.umd.min.js +3 -3
  211. package/bundles/material-slide-toggle.umd.min.js.map +1 -1
  212. package/bundles/material-slider-testing.umd.js +15 -4
  213. package/bundles/material-slider-testing.umd.js.map +1 -1
  214. package/bundles/material-slider-testing.umd.min.js +2 -2
  215. package/bundles/material-slider-testing.umd.min.js.map +1 -1
  216. package/bundles/material-slider.umd.js +9 -1
  217. package/bundles/material-slider.umd.js.map +1 -1
  218. package/bundles/material-slider.umd.min.js +1 -1
  219. package/bundles/material-slider.umd.min.js.map +1 -1
  220. package/bundles/material-snack-bar-testing.umd.js +29 -12
  221. package/bundles/material-snack-bar-testing.umd.js.map +1 -1
  222. package/bundles/material-snack-bar-testing.umd.min.js +2 -2
  223. package/bundles/material-snack-bar-testing.umd.min.js.map +1 -1
  224. package/bundles/material-snack-bar.umd.js +20 -2
  225. package/bundles/material-snack-bar.umd.js.map +1 -1
  226. package/bundles/material-snack-bar.umd.min.js +1 -1
  227. package/bundles/material-snack-bar.umd.min.js.map +1 -1
  228. package/bundles/material-sort-testing.umd.js +9 -1
  229. package/bundles/material-sort-testing.umd.js.map +1 -1
  230. package/bundles/material-sort-testing.umd.min.js +1 -1
  231. package/bundles/material-sort-testing.umd.min.js.map +1 -1
  232. package/bundles/material-sort.umd.js +9 -1
  233. package/bundles/material-sort.umd.js.map +1 -1
  234. package/bundles/material-sort.umd.min.js +3 -3
  235. package/bundles/material-sort.umd.min.js.map +1 -1
  236. package/bundles/material-stepper-testing.umd.js +9 -1
  237. package/bundles/material-stepper-testing.umd.js.map +1 -1
  238. package/bundles/material-stepper-testing.umd.min.js +2 -2
  239. package/bundles/material-stepper-testing.umd.min.js.map +1 -1
  240. package/bundles/material-stepper.umd.js +16 -3
  241. package/bundles/material-stepper.umd.js.map +1 -1
  242. package/bundles/material-stepper.umd.min.js +3 -3
  243. package/bundles/material-stepper.umd.min.js.map +1 -1
  244. package/bundles/material-table-testing.umd.js +26 -17
  245. package/bundles/material-table-testing.umd.js.map +1 -1
  246. package/bundles/material-table-testing.umd.min.js +2 -2
  247. package/bundles/material-table-testing.umd.min.js.map +1 -1
  248. package/bundles/material-table.umd.js +65 -38
  249. package/bundles/material-table.umd.js.map +1 -1
  250. package/bundles/material-table.umd.min.js +3 -3
  251. package/bundles/material-table.umd.min.js.map +1 -1
  252. package/bundles/material-tabs-testing.umd.js +11 -3
  253. package/bundles/material-tabs-testing.umd.js.map +1 -1
  254. package/bundles/material-tabs-testing.umd.min.js +1 -1
  255. package/bundles/material-tabs-testing.umd.min.js.map +1 -1
  256. package/bundles/material-tabs.umd.js +10 -2
  257. package/bundles/material-tabs.umd.js.map +1 -1
  258. package/bundles/material-tabs.umd.min.js +5 -5
  259. package/bundles/material-tabs.umd.min.js.map +1 -1
  260. package/bundles/material-toolbar-testing.umd.js +11 -2
  261. package/bundles/material-toolbar-testing.umd.js.map +1 -1
  262. package/bundles/material-toolbar-testing.umd.min.js +2 -2
  263. package/bundles/material-toolbar-testing.umd.min.js.map +1 -1
  264. package/bundles/material-toolbar.umd.js +9 -1
  265. package/bundles/material-toolbar.umd.js.map +1 -1
  266. package/bundles/material-toolbar.umd.min.js +2 -2
  267. package/bundles/material-toolbar.umd.min.js.map +1 -1
  268. package/bundles/material-tooltip-testing.umd.js +9 -1
  269. package/bundles/material-tooltip-testing.umd.js.map +1 -1
  270. package/bundles/material-tooltip-testing.umd.min.js +1 -1
  271. package/bundles/material-tooltip-testing.umd.min.js.map +1 -1
  272. package/bundles/material-tooltip.umd.js +35 -7
  273. package/bundles/material-tooltip.umd.js.map +1 -1
  274. package/bundles/material-tooltip.umd.min.js +3 -3
  275. package/bundles/material-tooltip.umd.min.js.map +1 -1
  276. package/bundles/material-tree-testing.umd.js +10 -2
  277. package/bundles/material-tree-testing.umd.js.map +1 -1
  278. package/bundles/material-tree-testing.umd.min.js +1 -1
  279. package/bundles/material-tree-testing.umd.min.js.map +1 -1
  280. package/bundles/material-tree.umd.js +9 -1
  281. package/bundles/material-tree.umd.js.map +1 -1
  282. package/bundles/material-tree.umd.min.js +3 -3
  283. package/bundles/material-tree.umd.min.js.map +1 -1
  284. package/button/_button-base.scss +2 -2
  285. package/button/_button-theme.scss +10 -11
  286. package/button/index.metadata.json +1 -1
  287. package/button-toggle/_button-toggle-theme.scss +9 -10
  288. package/card/_card-theme.scss +5 -6
  289. package/checkbox/_checkbox-theme.scss +2 -3
  290. package/checkbox/testing/checkbox-harness.d.ts +21 -16
  291. package/chips/_chips-theme.scss +4 -5
  292. package/chips/testing/chip-harness-filters.d.ts +11 -3
  293. package/chips/testing/chip-harness.d.ts +5 -5
  294. package/chips/testing/chip-list-harness.d.ts +15 -12
  295. package/chips/testing/chip-listbox-harness.d.ts +34 -0
  296. package/chips/testing/chip-option-harness.d.ts +29 -0
  297. package/chips/testing/public-api.d.ts +3 -1
  298. package/core/_core.scss +6 -6
  299. package/core/color/_all-color.scss +2 -1
  300. package/core/datetime/date-formats.d.ts +1 -0
  301. package/core/density/private/_all-density.scss +34 -0
  302. package/core/density/{_index.scss → private/_compatibility.scss} +11 -8
  303. package/core/focus-indicators/_focus-indicators.scss +3 -4
  304. package/core/index.metadata.json +1 -1
  305. package/core/option/_optgroup-theme.scss +2 -3
  306. package/core/option/_option-theme.scss +2 -3
  307. package/core/option/index.d.ts +1 -0
  308. package/core/option/optgroup.d.ts +4 -0
  309. package/core/option/option-parent.d.ts +22 -0
  310. package/core/option/option.d.ts +2 -14
  311. package/core/ripple/_ripple.scss +2 -3
  312. package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +2 -3
  313. package/core/style/_elevation.scss +2 -18
  314. package/core/style/_form-common.scss +2 -2
  315. package/core/style/_private.scss +40 -0
  316. package/core/testing/option-harness.d.ts +2 -0
  317. package/core/theming/_all-theme.scss +3 -2
  318. package/core/theming/_theming.scss +148 -38
  319. package/core/typography/_all-typography.scss +1 -1
  320. package/datepicker/_datepicker-theme.scss +5 -6
  321. package/datepicker/date-range-input-parts.d.ts +2 -3
  322. package/datepicker/date-range-input.d.ts +5 -4
  323. package/datepicker/date-selection-model.d.ts +10 -0
  324. package/datepicker/datepicker-actions.d.ts +33 -0
  325. package/datepicker/datepicker-base.d.ts +52 -9
  326. package/datepicker/datepicker-input-base.d.ts +5 -10
  327. package/datepicker/datepicker-input.d.ts +9 -8
  328. package/datepicker/datepicker-toggle.d.ts +4 -2
  329. package/datepicker/index.metadata.json +1 -1
  330. package/datepicker/public-api.d.ts +1 -0
  331. package/dialog/_dialog-theme.scss +4 -5
  332. package/divider/_divider-theme.scss +2 -3
  333. package/esm2015/autocomplete/autocomplete-trigger.js +10 -2
  334. package/esm2015/autocomplete/autocomplete.js +11 -4
  335. package/esm2015/autocomplete/testing/autocomplete-harness.js +27 -19
  336. package/esm2015/button/button.js +10 -5
  337. package/esm2015/checkbox/checkbox.js +8 -3
  338. package/esm2015/checkbox/testing/checkbox-harness.js +31 -36
  339. package/esm2015/chips/testing/chip-harness-filters.js +1 -1
  340. package/esm2015/chips/testing/chip-harness.js +6 -6
  341. package/esm2015/chips/testing/chip-list-harness.js +19 -16
  342. package/esm2015/chips/testing/chip-listbox-harness.js +49 -0
  343. package/esm2015/chips/testing/chip-option-harness.js +54 -0
  344. package/esm2015/chips/testing/public-api.js +4 -2
  345. package/esm2015/core/common-behaviors/common-module.js +1 -1
  346. package/esm2015/core/datetime/date-formats.js +1 -1
  347. package/esm2015/core/option/index.js +2 -1
  348. package/esm2015/core/option/optgroup.js +32 -7
  349. package/esm2015/core/option/option-parent.js +13 -0
  350. package/esm2015/core/option/option.js +5 -8
  351. package/esm2015/core/testing/option-harness.js +7 -2
  352. package/esm2015/core/version.js +1 -1
  353. package/esm2015/datepicker/date-range-input-parts.js +10 -14
  354. package/esm2015/datepicker/date-range-input.js +11 -4
  355. package/esm2015/datepicker/date-range-picker.js +3 -2
  356. package/esm2015/datepicker/date-selection-model.js +24 -1
  357. package/esm2015/datepicker/datepicker-actions.js +89 -0
  358. package/esm2015/datepicker/datepicker-base.js +66 -25
  359. package/esm2015/datepicker/datepicker-input-base.js +15 -27
  360. package/esm2015/datepicker/datepicker-input.js +11 -5
  361. package/esm2015/datepicker/datepicker-module.js +8 -1
  362. package/esm2015/datepicker/datepicker-toggle.js +7 -10
  363. package/esm2015/datepicker/datepicker.js +5 -2
  364. package/esm2015/datepicker/month-view.js +6 -3
  365. package/esm2015/datepicker/public-api.js +2 -1
  366. package/esm2015/datepicker/testing/date-range-input-harness.js +4 -4
  367. package/esm2015/datepicker/testing/datepicker-input-harness.js +3 -3
  368. package/esm2015/datepicker/testing/datepicker-trigger-harness-base.js +3 -3
  369. package/esm2015/dialog/dialog-ref.js +2 -2
  370. package/esm2015/expansion/expansion-panel-header.js +9 -4
  371. package/esm2015/expansion/expansion-panel.js +1 -1
  372. package/esm2015/form-field/form-field-animations.js +2 -2
  373. package/esm2015/form-field/form-field.js +2 -2
  374. package/esm2015/form-field/testing/form-field-harness.js +14 -9
  375. package/esm2015/grid-list/public-api.js +3 -2
  376. package/esm2015/grid-list/testing/grid-list-harness.js +6 -5
  377. package/esm2015/icon/icon-registry.js +39 -3
  378. package/esm2015/icon/testing/fake-icon-registry.js +4 -2
  379. package/esm2015/input/testing/input-harness.js +3 -3
  380. package/esm2015/input/testing/native-select-harness.js +7 -5
  381. package/esm2015/list/selection-list.js +1 -1
  382. package/esm2015/list/testing/list-harness-base.js +5 -4
  383. package/esm2015/list/testing/list-item-harness-base.js +5 -4
  384. package/esm2015/list/testing/selection-list-harness.js +8 -5
  385. package/esm2015/menu/menu-item.js +3 -3
  386. package/esm2015/menu/menu-trigger.js +15 -25
  387. package/esm2015/menu/menu.js +2 -2
  388. package/esm2015/menu/testing/menu-harness.js +44 -32
  389. package/esm2015/paginator/testing/paginator-harness.js +27 -25
  390. package/esm2015/radio/radio.js +10 -5
  391. package/esm2015/radio/testing/radio-harness.js +40 -29
  392. package/esm2015/select/select.js +6 -3
  393. package/esm2015/select/testing/select-harness.js +36 -28
  394. package/esm2015/sidenav/testing/drawer-container-harness.js +41 -0
  395. package/esm2015/sidenav/testing/drawer-content-harness.js +23 -0
  396. package/esm2015/sidenav/testing/drawer-harness-filters.js +1 -1
  397. package/esm2015/sidenav/testing/drawer-harness.js +19 -13
  398. package/esm2015/sidenav/testing/public-api.js +6 -2
  399. package/esm2015/sidenav/testing/sidenav-container-harness.js +41 -0
  400. package/esm2015/sidenav/testing/sidenav-content-harness.js +23 -0
  401. package/esm2015/sidenav/testing/sidenav-harness.js +4 -4
  402. package/esm2015/slide-toggle/slide-toggle.js +8 -3
  403. package/esm2015/slider/testing/slider-harness.js +5 -5
  404. package/esm2015/snack-bar/snack-bar-container.js +12 -2
  405. package/esm2015/snack-bar/testing/snack-bar-harness.js +19 -12
  406. package/esm2015/stepper/step-header.js +8 -3
  407. package/esm2015/table/table-data-source.js +34 -21
  408. package/esm2015/table/testing/cell-harness.js +3 -3
  409. package/esm2015/table/testing/row-harness.js +5 -5
  410. package/esm2015/table/testing/table-harness.js +8 -8
  411. package/esm2015/tabs/tab-body.js +3 -3
  412. package/esm2015/tabs/testing/tab-group-harness.js +3 -3
  413. package/esm2015/tabs/testing/tab-nav-bar-harness.js +3 -3
  414. package/esm2015/toolbar/testing/toolbar-harness.js +3 -3
  415. package/esm2015/tooltip/tooltip.js +28 -7
  416. package/esm2015/tree/testing/tree-harness.js +2 -2
  417. package/expansion/_expansion-mixins.scss +11 -0
  418. package/expansion/_expansion-theme.scss +13 -19
  419. package/expansion/index.metadata.json +1 -1
  420. package/fesm2015/autocomplete/testing.js +26 -18
  421. package/fesm2015/autocomplete/testing.js.map +1 -1
  422. package/fesm2015/autocomplete.js +19 -5
  423. package/fesm2015/autocomplete.js.map +1 -1
  424. package/fesm2015/button.js +9 -4
  425. package/fesm2015/button.js.map +1 -1
  426. package/fesm2015/checkbox/testing.js +30 -35
  427. package/fesm2015/checkbox/testing.js.map +1 -1
  428. package/fesm2015/checkbox.js +7 -2
  429. package/fesm2015/checkbox.js.map +1 -1
  430. package/fesm2015/chips/testing.js +120 -21
  431. package/fesm2015/chips/testing.js.map +1 -1
  432. package/fesm2015/core/testing.js +6 -1
  433. package/fesm2015/core/testing.js.map +1 -1
  434. package/fesm2015/core.js +45 -13
  435. package/fesm2015/core.js.map +1 -1
  436. package/fesm2015/datepicker/testing.js +5 -5
  437. package/fesm2015/datepicker/testing.js.map +1 -1
  438. package/fesm2015/datepicker.js +275 -116
  439. package/fesm2015/datepicker.js.map +1 -1
  440. package/fesm2015/dialog.js +1 -1
  441. package/fesm2015/dialog.js.map +1 -1
  442. package/fesm2015/expansion.js +8 -3
  443. package/fesm2015/expansion.js.map +1 -1
  444. package/fesm2015/form-field/testing.js +13 -8
  445. package/fesm2015/form-field/testing.js.map +1 -1
  446. package/fesm2015/form-field.js +2 -2
  447. package/fesm2015/form-field.js.map +1 -1
  448. package/fesm2015/grid-list/testing.js +5 -4
  449. package/fesm2015/grid-list/testing.js.map +1 -1
  450. package/fesm2015/grid-list.js +128 -126
  451. package/fesm2015/grid-list.js.map +1 -1
  452. package/fesm2015/icon/testing.js +3 -1
  453. package/fesm2015/icon/testing.js.map +1 -1
  454. package/fesm2015/icon.js +38 -2
  455. package/fesm2015/icon.js.map +1 -1
  456. package/fesm2015/input/testing.js +7 -5
  457. package/fesm2015/input/testing.js.map +1 -1
  458. package/fesm2015/list/testing.js +13 -8
  459. package/fesm2015/list/testing.js.map +1 -1
  460. package/fesm2015/list.js.map +1 -1
  461. package/fesm2015/menu/testing.js +45 -33
  462. package/fesm2015/menu/testing.js.map +1 -1
  463. package/fesm2015/menu.js +17 -27
  464. package/fesm2015/menu.js.map +1 -1
  465. package/fesm2015/paginator/testing.js +26 -24
  466. package/fesm2015/paginator/testing.js.map +1 -1
  467. package/fesm2015/paginator.js.map +1 -1
  468. package/fesm2015/progress-spinner.js.map +1 -1
  469. package/fesm2015/radio/testing.js +39 -28
  470. package/fesm2015/radio/testing.js.map +1 -1
  471. package/fesm2015/radio.js +9 -4
  472. package/fesm2015/radio.js.map +1 -1
  473. package/fesm2015/select/testing.js +36 -28
  474. package/fesm2015/select/testing.js.map +1 -1
  475. package/fesm2015/select.js +5 -2
  476. package/fesm2015/select.js.map +1 -1
  477. package/fesm2015/sidenav/testing.js +139 -15
  478. package/fesm2015/sidenav/testing.js.map +1 -1
  479. package/fesm2015/sidenav.js.map +1 -1
  480. package/fesm2015/slide-toggle.js +7 -2
  481. package/fesm2015/slide-toggle.js.map +1 -1
  482. package/fesm2015/slider/testing.js +4 -4
  483. package/fesm2015/slider/testing.js.map +1 -1
  484. package/fesm2015/snack-bar/testing.js +18 -11
  485. package/fesm2015/snack-bar/testing.js.map +1 -1
  486. package/fesm2015/snack-bar.js +11 -1
  487. package/fesm2015/snack-bar.js.map +1 -1
  488. package/fesm2015/stepper.js +7 -2
  489. package/fesm2015/stepper.js.map +1 -1
  490. package/fesm2015/table/testing.js +11 -11
  491. package/fesm2015/table/testing.js.map +1 -1
  492. package/fesm2015/table.js +34 -21
  493. package/fesm2015/table.js.map +1 -1
  494. package/fesm2015/tabs/testing.js +3 -3
  495. package/fesm2015/tabs/testing.js.map +1 -1
  496. package/fesm2015/tabs.js +2 -2
  497. package/fesm2015/tabs.js.map +1 -1
  498. package/fesm2015/toolbar/testing.js +2 -2
  499. package/fesm2015/toolbar/testing.js.map +1 -1
  500. package/fesm2015/tooltip.js +27 -7
  501. package/fesm2015/tooltip.js.map +1 -1
  502. package/fesm2015/tree/testing.js +1 -1
  503. package/fesm2015/tree/testing.js.map +1 -1
  504. package/form-field/_form-field-fill-theme.scss +4 -5
  505. package/form-field/_form-field-legacy-theme.scss +5 -6
  506. package/form-field/_form-field-outline-theme.scss +4 -5
  507. package/form-field/_form-field-standard-theme.scss +5 -6
  508. package/form-field/_form-field-theme.scss +8 -9
  509. package/form-field/index.metadata.json +1 -1
  510. package/grid-list/_grid-list-theme.scss +2 -3
  511. package/grid-list/index.metadata.json +1 -1
  512. package/grid-list/public-api.d.ts +2 -1
  513. package/icon/_icon-theme.scss +2 -3
  514. package/icon/icon-registry.d.ts +23 -0
  515. package/icon/index.metadata.json +1 -1
  516. package/icon/testing/fake-icon-registry.d.ts +1 -0
  517. package/icon/testing/index.metadata.json +1 -1
  518. package/input/_input-theme.scss +3 -4
  519. package/list/_list-theme.scss +2 -3
  520. package/list/index.metadata.json +1 -1
  521. package/list/selection-list.d.ts +6 -1
  522. package/list/testing/list-harness-base.d.ts +1 -1
  523. package/list/testing/list-item-harness-base.d.ts +2 -2
  524. package/list/testing/selection-list-harness.d.ts +2 -1
  525. package/menu/_menu-theme.scss +4 -5
  526. package/menu/index.metadata.json +1 -1
  527. package/menu/menu-trigger.d.ts +1 -3
  528. package/menu/menu.d.ts +4 -2
  529. package/menu/testing/menu-harness.d.ts +39 -26
  530. package/package.json +2 -2
  531. package/paginator/_paginator-theme.scss +7 -8
  532. package/paginator/testing/paginator-harness.d.ts +32 -19
  533. package/prebuilt-themes/deeppurple-amber.css +1 -1
  534. package/prebuilt-themes/indigo-pink.css +1 -1
  535. package/prebuilt-themes/pink-bluegrey.css +1 -1
  536. package/prebuilt-themes/purple-green.css +1 -1
  537. package/progress-bar/_progress-bar-theme.scss +2 -3
  538. package/progress-spinner/_progress-spinner-theme.scss +2 -3
  539. package/radio/_radio-theme.scss +2 -3
  540. package/radio/index.metadata.json +1 -1
  541. package/radio/radio.d.ts +2 -2
  542. package/radio/testing/radio-harness.d.ts +39 -24
  543. package/schematics/ng-add/fonts/material-fonts.js +7 -5
  544. package/schematics/ng-add/index.js +1 -1
  545. package/schematics/ng-add/setup-project.js +4 -3
  546. package/select/_select-theme.scss +5 -6
  547. package/select/index.metadata.json +1 -1
  548. package/select/testing/select-harness.d.ts +28 -16
  549. package/sidenav/_sidenav-theme.scss +4 -5
  550. package/sidenav/testing/drawer-container-harness.d.ts +30 -0
  551. package/sidenav/testing/drawer-content-harness.d.ts +21 -0
  552. package/sidenav/testing/drawer-harness-filters.d.ts +6 -0
  553. package/sidenav/testing/drawer-harness.d.ts +13 -7
  554. package/sidenav/testing/public-api.d.ts +5 -1
  555. package/sidenav/testing/sidenav-container-harness.d.ts +30 -0
  556. package/sidenav/testing/sidenav-content-harness.d.ts +21 -0
  557. package/sidenav/testing/sidenav-harness.d.ts +3 -3
  558. package/slide-toggle/_slide-toggle-theme.scss +4 -5
  559. package/slide-toggle/slide-toggle.d.ts +2 -2
  560. package/slider/_slider-theme.scss +2 -3
  561. package/snack-bar/_snack-bar-theme.scss +4 -5
  562. package/snack-bar/index.metadata.json +1 -1
  563. package/snack-bar/snack-bar-container.d.ts +5 -0
  564. package/snack-bar/testing/snack-bar-harness.d.ts +7 -4
  565. package/sort/_sort-theme.scss +2 -3
  566. package/stepper/_stepper-theme.scss +7 -8
  567. package/stepper/step-header.d.ts +2 -2
  568. package/table/_table-theme.scss +2 -3
  569. package/table/index.metadata.json +1 -1
  570. package/table/table-data-source.d.ts +31 -20
  571. package/table/testing/cell-harness.d.ts +2 -2
  572. package/tabs/_tabs-common.scss +2 -2
  573. package/tabs/_tabs-theme.scss +14 -9
  574. package/tabs/index.metadata.json +1 -1
  575. package/tabs/tab-body.d.ts +3 -3
  576. package/toolbar/_toolbar-theme.scss +8 -9
  577. package/tooltip/_tooltip-theme.scss +2 -3
  578. package/tooltip/index.metadata.json +1 -1
  579. package/tooltip/tooltip.d.ts +10 -1
  580. package/tree/_tree-theme.scss +7 -8
  581. package/core/density/_all-density.scss +0 -19
  582. package/core/style/_noop-animation.scss +0 -22
  583. package/core/theming/_check-duplicate-styles.scss +0 -106
@@ -389,6 +389,8 @@
389
389
  return extendStatics(d, b);
390
390
  };
391
391
  function __extends(d, b) {
392
+ if (typeof b !== "function" && b !== null)
393
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
392
394
  extendStatics(d, b);
393
395
  function __() { this.constructor = d; }
394
396
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -574,11 +576,13 @@
574
576
  }
575
577
  return ar;
576
578
  }
579
+ /** @deprecated */
577
580
  function __spread() {
578
581
  for (var ar = [], i = 0; i < arguments.length; i++)
579
582
  ar = ar.concat(__read(arguments[i]));
580
583
  return ar;
581
584
  }
585
+ /** @deprecated */
582
586
  function __spreadArrays() {
583
587
  for (var s = 0, i = 0, il = arguments.length; i < il; i++)
584
588
  s += arguments[i].length;
@@ -587,7 +591,11 @@
587
591
  r[k] = a[j];
588
592
  return r;
589
593
  }
590
- ;
594
+ function __spreadArray(to, from) {
595
+ for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
596
+ to[j] = from[i];
597
+ return to;
598
+ }
591
599
  function __await(v) {
592
600
  return this instanceof __await ? (this.v = v, this) : new __await(v);
593
601
  }
@@ -705,6 +713,17 @@
705
713
  MatDateSelectionModel.prototype._isValidDateInstance = function (date) {
706
714
  return this._adapter.isDateInstance(date) && this._adapter.isValid(date);
707
715
  };
716
+ /**
717
+ * Clones the selection model.
718
+ * @deprecated To be turned into an abstract method.
719
+ * @breaking-change 12.0.0
720
+ */
721
+ MatDateSelectionModel.prototype.clone = function () {
722
+ if (typeof ngDevMode === 'undefined' || ngDevMode) {
723
+ throw Error('Not implemented');
724
+ }
725
+ return null;
726
+ };
708
727
  return MatDateSelectionModel;
709
728
  }());
710
729
  MatDateSelectionModel.decorators = [
@@ -738,6 +757,12 @@
738
757
  MatSingleDateSelectionModel.prototype.isComplete = function () {
739
758
  return this.selection != null;
740
759
  };
760
+ /** Clones the selection model. */
761
+ MatSingleDateSelectionModel.prototype.clone = function () {
762
+ var clone = new MatSingleDateSelectionModel(this._adapter);
763
+ clone.updateSelection(this.selection, this);
764
+ return clone;
765
+ };
741
766
  return MatSingleDateSelectionModel;
742
767
  }(MatDateSelectionModel));
743
768
  MatSingleDateSelectionModel.decorators = [
@@ -794,6 +819,12 @@
794
819
  MatRangeDateSelectionModel.prototype.isComplete = function () {
795
820
  return this.selection.start != null && this.selection.end != null;
796
821
  };
822
+ /** Clones the selection model. */
823
+ MatRangeDateSelectionModel.prototype.clone = function () {
824
+ var clone = new MatRangeDateSelectionModel(this._adapter);
825
+ clone.updateSelection(this.selection, this);
826
+ return clone;
827
+ };
797
828
  return MatRangeDateSelectionModel;
798
829
  }(MatDateSelectionModel));
799
830
  MatRangeDateSelectionModel.decorators = [
@@ -998,6 +1029,8 @@
998
1029
  this.selectedChange.emit(selectedDate);
999
1030
  }
1000
1031
  this._userSelection.emit({ value: selectedDate, event: event.event });
1032
+ this._previewStart = this._previewEnd = null;
1033
+ this._changeDetectorRef.markForCheck();
1001
1034
  };
1002
1035
  /** Handles keydown events on the calendar body when calendar is in month view. */
1003
1036
  MatMonthView.prototype._handleCalendarBodyKeydown = function (event) {
@@ -1069,8 +1102,9 @@
1069
1102
  MatMonthView.prototype._init = function () {
1070
1103
  this._setRanges(this.selected);
1071
1104
  this._todayDate = this._getCellCompareValue(this._dateAdapter.today());
1072
- this._monthLabel =
1073
- this._dateAdapter.getMonthNames('short')[this._dateAdapter.getMonth(this.activeDate)]
1105
+ this._monthLabel = this._dateFormats.display.monthLabel
1106
+ ? this._dateAdapter.format(this.activeDate, this._dateFormats.display.monthLabel)
1107
+ : this._dateAdapter.getMonthNames('short')[this._dateAdapter.getMonth(this.activeDate)]
1074
1108
  .toLocaleUpperCase();
1075
1109
  var firstOfMonth = this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), this._dateAdapter.getMonth(this.activeDate), 1);
1076
1110
  this._firstWeekOffset =
@@ -2193,7 +2227,7 @@
2193
2227
  */
2194
2228
  var MatDatepickerContent = /** @class */ (function (_super) {
2195
2229
  __extends(MatDatepickerContent, _super);
2196
- function MatDatepickerContent(elementRef, _changeDetectorRef, _model, _dateAdapter, _rangeSelectionStrategy,
2230
+ function MatDatepickerContent(elementRef, _changeDetectorRef, _globalModel, _dateAdapter, _rangeSelectionStrategy,
2197
2231
  /**
2198
2232
  * @deprecated `intl` argument to become required.
2199
2233
  * @breaking-change 12.0.0
@@ -2201,7 +2235,7 @@
2201
2235
  intl) {
2202
2236
  var _this = _super.call(this, elementRef) || this;
2203
2237
  _this._changeDetectorRef = _changeDetectorRef;
2204
- _this._model = _model;
2238
+ _this._globalModel = _globalModel;
2205
2239
  _this._dateAdapter = _dateAdapter;
2206
2240
  _this._rangeSelectionStrategy = _rangeSelectionStrategy;
2207
2241
  _this._subscriptions = new rxjs.Subscription();
@@ -2209,13 +2243,21 @@
2209
2243
  _this._animationState = 'enter';
2210
2244
  /** Emits when an animation has finished. */
2211
2245
  _this._animationDone = new rxjs.Subject();
2246
+ /** Portal with projected action buttons. */
2247
+ _this._actionsPortal = null;
2212
2248
  // @breaking-change 12.0.0 Remove fallback for `intl`.
2213
2249
  _this._closeButtonText = (intl === null || intl === void 0 ? void 0 : intl.closeCalendarLabel) || 'Close calendar';
2214
2250
  return _this;
2215
2251
  }
2252
+ MatDatepickerContent.prototype.ngOnInit = function () {
2253
+ // If we have actions, clone the model so that we have the ability to cancel the selection,
2254
+ // otherwise update the global model directly. Note that we want to assign this as soon as
2255
+ // possible, but `_actionsPortal` isn't available in the constructor so we do it in `ngOnInit`.
2256
+ this._model = this._actionsPortal ? this._globalModel.clone() : this._globalModel;
2257
+ };
2216
2258
  MatDatepickerContent.prototype.ngAfterViewInit = function () {
2217
2259
  var _this = this;
2218
- this._subscriptions.add(this.datepicker._stateChanges.subscribe(function () {
2260
+ this._subscriptions.add(this.datepicker.stateChanges.subscribe(function () {
2219
2261
  _this._changeDetectorRef.markForCheck();
2220
2262
  }));
2221
2263
  this._calendar.focusActiveCell();
@@ -2241,7 +2283,8 @@
2241
2283
  !this._dateAdapter.sameDate(value, selection))) {
2242
2284
  this._model.add(value);
2243
2285
  }
2244
- if (!this._model || this._model.isComplete()) {
2286
+ // Delegate closing the popup to the actions.
2287
+ if ((!this._model || this._model.isComplete()) && !this._actionsPortal) {
2245
2288
  this.datepicker.close();
2246
2289
  }
2247
2290
  };
@@ -2252,12 +2295,18 @@
2252
2295
  MatDatepickerContent.prototype._getSelected = function () {
2253
2296
  return this._model.selection;
2254
2297
  };
2298
+ /** Applies the current pending selection to the global model. */
2299
+ MatDatepickerContent.prototype._applyPendingSelection = function () {
2300
+ if (this._model !== this._globalModel) {
2301
+ this._globalModel.updateSelection(this._model.selection, this);
2302
+ }
2303
+ };
2255
2304
  return MatDatepickerContent;
2256
2305
  }(_MatDatepickerContentMixinBase));
2257
2306
  MatDatepickerContent.decorators = [
2258
2307
  { type: i0.Component, args: [{
2259
2308
  selector: 'mat-datepicker-content',
2260
- template: "<div cdkTrapFocus>\n <mat-calendar\n [id]=\"datepicker.id\"\n [ngClass]=\"datepicker.panelClass\"\n [startAt]=\"datepicker.startAt\"\n [startView]=\"datepicker.startView\"\n [minDate]=\"datepicker._getMinDate()\"\n [maxDate]=\"datepicker._getMaxDate()\"\n [dateFilter]=\"datepicker._getDateFilter()\"\n [headerComponent]=\"datepicker.calendarHeaderComponent\"\n [selected]=\"_getSelected()\"\n [dateClass]=\"datepicker.dateClass\"\n [comparisonStart]=\"comparisonStart\"\n [comparisonEnd]=\"comparisonEnd\"\n [@fadeInCalendar]=\"'enter'\"\n (yearSelected)=\"datepicker._selectYear($event)\"\n (monthSelected)=\"datepicker._selectMonth($event)\"\n (viewChanged)=\"datepicker._viewChanged($event)\"\n (_userSelection)=\"_handleUserSelection($event)\"></mat-calendar>\n\n <!-- Invisible close button for screen reader users. -->\n <button\n type=\"button\"\n mat-raised-button\n [color]=\"color || 'primary'\"\n class=\"mat-datepicker-close-button\"\n [class.cdk-visually-hidden]=\"!_closeButtonFocused\"\n (focus)=\"_closeButtonFocused = true\"\n (blur)=\"_closeButtonFocused = false\"\n (click)=\"datepicker.close()\">{{ _closeButtonText }}</button>\n</div>\n",
2309
+ template: "<div\n cdkTrapFocus\n class=\"mat-datepicker-content-container\"\n [class.mat-datepicker-content-container-with-actions]=\"_actionsPortal\">\n <mat-calendar\n [id]=\"datepicker.id\"\n [ngClass]=\"datepicker.panelClass\"\n [startAt]=\"datepicker.startAt\"\n [startView]=\"datepicker.startView\"\n [minDate]=\"datepicker._getMinDate()\"\n [maxDate]=\"datepicker._getMaxDate()\"\n [dateFilter]=\"datepicker._getDateFilter()\"\n [headerComponent]=\"datepicker.calendarHeaderComponent\"\n [selected]=\"_getSelected()\"\n [dateClass]=\"datepicker.dateClass\"\n [comparisonStart]=\"comparisonStart\"\n [comparisonEnd]=\"comparisonEnd\"\n [@fadeInCalendar]=\"'enter'\"\n (yearSelected)=\"datepicker._selectYear($event)\"\n (monthSelected)=\"datepicker._selectMonth($event)\"\n (viewChanged)=\"datepicker._viewChanged($event)\"\n (_userSelection)=\"_handleUserSelection($event)\"></mat-calendar>\n\n <ng-template [cdkPortalOutlet]=\"_actionsPortal\"></ng-template>\n\n <!-- Invisible close button for screen reader users. -->\n <button\n type=\"button\"\n mat-raised-button\n [color]=\"color || 'primary'\"\n class=\"mat-datepicker-close-button\"\n [class.cdk-visually-hidden]=\"!_closeButtonFocused\"\n (focus)=\"_closeButtonFocused = true\"\n (blur)=\"_closeButtonFocused = false\"\n (click)=\"datepicker.close()\">{{ _closeButtonText }}</button>\n</div>\n",
2261
2310
  host: {
2262
2311
  'class': 'mat-datepicker-content',
2263
2312
  '[@transformPanel]': '_animationState',
@@ -2272,7 +2321,7 @@
2272
2321
  encapsulation: i0.ViewEncapsulation.None,
2273
2322
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
2274
2323
  inputs: ['color'],
2275
- styles: [".mat-datepicker-content{display:block;border-radius:4px}.mat-datepicker-content .mat-calendar{width:296px;height:354px}.mat-datepicker-content .mat-datepicker-close-button{position:absolute;top:100%;left:0;margin-top:8px}.ng-animating .mat-datepicker-content .mat-datepicker-close-button{display:none}.mat-datepicker-content-touch{display:block;max-height:80vh;overflow:auto;margin:-24px}.mat-datepicker-content-touch .mat-calendar{min-width:250px;min-height:312px;max-width:750px;max-height:788px}@media all and (orientation: landscape){.mat-datepicker-content-touch .mat-calendar{width:64vh;height:80vh}}@media all and (orientation: portrait){.mat-datepicker-content-touch .mat-calendar{width:80vw;height:100vw}}\n"]
2324
+ styles: [".mat-datepicker-content{display:block;border-radius:4px}.mat-datepicker-content .mat-calendar{width:296px;height:354px}.mat-datepicker-content .mat-datepicker-close-button{position:absolute;top:100%;left:0;margin-top:8px}.ng-animating .mat-datepicker-content .mat-datepicker-close-button{display:none}.mat-datepicker-content-container{display:flex;flex-direction:column;justify-content:space-between}.mat-datepicker-content-touch{display:block;max-height:80vh;overflow:auto;margin:-24px}.mat-datepicker-content-touch .mat-datepicker-content-container{min-height:312px;max-height:788px;min-width:250px;max-width:750px}.mat-datepicker-content-touch .mat-calendar{width:100%;height:auto}@media all and (orientation: landscape){.mat-datepicker-content-touch .mat-datepicker-content-container{width:64vh;height:80vh}}@media all and (orientation: portrait){.mat-datepicker-content-touch .mat-datepicker-content-container{width:80vw;height:100vw}.mat-datepicker-content-touch .mat-datepicker-content-container-with-actions{height:115vw}}\n"]
2276
2325
  },] }
2277
2326
  ];
2278
2327
  MatDatepickerContent.ctorParameters = function () { return [
@@ -2331,7 +2380,7 @@
2331
2380
  /** Unique class that will be added to the backdrop so that the test harnesses can look it up. */
2332
2381
  this._backdropHarnessClass = this.id + "-backdrop";
2333
2382
  /** Emits when the datepicker's state changes. */
2334
- this._stateChanges = new rxjs.Subject();
2383
+ this.stateChanges = new rxjs.Subject();
2335
2384
  if (!this._dateAdapter && (typeof ngDevMode === 'undefined' || ngDevMode)) {
2336
2385
  throw createMissingDateImplError('DateAdapter');
2337
2386
  }
@@ -2342,7 +2391,7 @@
2342
2391
  get: function () {
2343
2392
  // If an explicit startAt is set we start there, otherwise we start at whatever the currently
2344
2393
  // selected value is.
2345
- return this._startAt || (this._datepickerInput ? this._datepickerInput.getStartValue() : null);
2394
+ return this._startAt || (this.datepickerInput ? this.datepickerInput.getStartValue() : null);
2346
2395
  },
2347
2396
  set: function (value) {
2348
2397
  this._startAt = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
@@ -2354,7 +2403,7 @@
2354
2403
  /** Color palette to use on the datepicker's calendar. */
2355
2404
  get: function () {
2356
2405
  return this._color ||
2357
- (this._datepickerInput ? this._datepickerInput.getThemePalette() : undefined);
2406
+ (this.datepickerInput ? this.datepickerInput.getThemePalette() : undefined);
2358
2407
  },
2359
2408
  set: function (value) {
2360
2409
  this._color = value;
@@ -2377,14 +2426,14 @@
2377
2426
  Object.defineProperty(MatDatepickerBase.prototype, "disabled", {
2378
2427
  /** Whether the datepicker pop-up should be disabled. */
2379
2428
  get: function () {
2380
- return this._disabled === undefined && this._datepickerInput ?
2381
- this._datepickerInput.disabled : !!this._disabled;
2429
+ return this._disabled === undefined && this.datepickerInput ?
2430
+ this.datepickerInput.disabled : !!this._disabled;
2382
2431
  },
2383
2432
  set: function (value) {
2384
2433
  var newValue = coercion.coerceBooleanProperty(value);
2385
2434
  if (newValue !== this._disabled) {
2386
2435
  this._disabled = newValue;
2387
- this._stateChanges.next(undefined);
2436
+ this.stateChanges.next(undefined);
2388
2437
  }
2389
2438
  },
2390
2439
  enumerable: false,
@@ -2413,14 +2462,14 @@
2413
2462
  });
2414
2463
  /** The minimum selectable date. */
2415
2464
  MatDatepickerBase.prototype._getMinDate = function () {
2416
- return this._datepickerInput && this._datepickerInput.min;
2465
+ return this.datepickerInput && this.datepickerInput.min;
2417
2466
  };
2418
2467
  /** The maximum selectable date. */
2419
2468
  MatDatepickerBase.prototype._getMaxDate = function () {
2420
- return this._datepickerInput && this._datepickerInput.max;
2469
+ return this.datepickerInput && this.datepickerInput.max;
2421
2470
  };
2422
2471
  MatDatepickerBase.prototype._getDateFilter = function () {
2423
- return this._datepickerInput && this._datepickerInput.dateFilter;
2472
+ return this.datepickerInput && this.datepickerInput.dateFilter;
2424
2473
  };
2425
2474
  MatDatepickerBase.prototype.ngOnChanges = function (changes) {
2426
2475
  var positionChange = changes['xPosition'] || changes['yPosition'];
@@ -2430,13 +2479,13 @@
2430
2479
  this._popupRef.updatePosition();
2431
2480
  }
2432
2481
  }
2433
- this._stateChanges.next(undefined);
2482
+ this.stateChanges.next(undefined);
2434
2483
  };
2435
2484
  MatDatepickerBase.prototype.ngOnDestroy = function () {
2436
2485
  this._destroyPopup();
2437
2486
  this.close();
2438
2487
  this._inputStateChanges.unsubscribe();
2439
- this._stateChanges.complete();
2488
+ this.stateChanges.complete();
2440
2489
  };
2441
2490
  /** Selects the given date */
2442
2491
  MatDatepickerBase.prototype.select = function (date) {
@@ -2459,23 +2508,42 @@
2459
2508
  * @param input The datepicker input to register with this datepicker.
2460
2509
  * @returns Selection model that the input should hook itself up to.
2461
2510
  */
2462
- MatDatepickerBase.prototype._registerInput = function (input) {
2511
+ MatDatepickerBase.prototype.registerInput = function (input) {
2463
2512
  var _this = this;
2464
- if (this._datepickerInput && (typeof ngDevMode === 'undefined' || ngDevMode)) {
2513
+ if (this.datepickerInput && (typeof ngDevMode === 'undefined' || ngDevMode)) {
2465
2514
  throw Error('A MatDatepicker can only be associated with a single input.');
2466
2515
  }
2467
2516
  this._inputStateChanges.unsubscribe();
2468
- this._datepickerInput = input;
2517
+ this.datepickerInput = input;
2469
2518
  this._inputStateChanges =
2470
- input.stateChanges.subscribe(function () { return _this._stateChanges.next(undefined); });
2519
+ input.stateChanges.subscribe(function () { return _this.stateChanges.next(undefined); });
2471
2520
  return this._model;
2472
2521
  };
2522
+ /**
2523
+ * Registers a portal containing action buttons with the datepicker.
2524
+ * @param portal Portal to be registered.
2525
+ */
2526
+ MatDatepickerBase.prototype.registerActions = function (portal) {
2527
+ if (this._actionsPortal && (typeof ngDevMode === 'undefined' || ngDevMode)) {
2528
+ throw Error('A MatDatepicker can only be associated with a single actions row.');
2529
+ }
2530
+ this._actionsPortal = portal;
2531
+ };
2532
+ /**
2533
+ * Removes a portal containing action buttons from the datepicker.
2534
+ * @param portal Portal to be removed.
2535
+ */
2536
+ MatDatepickerBase.prototype.removeActions = function (portal) {
2537
+ if (portal === this._actionsPortal) {
2538
+ this._actionsPortal = null;
2539
+ }
2540
+ };
2473
2541
  /** Open the calendar. */
2474
2542
  MatDatepickerBase.prototype.open = function () {
2475
2543
  if (this._opened || this.disabled) {
2476
2544
  return;
2477
2545
  }
2478
- if (!this._datepickerInput && (typeof ngDevMode === 'undefined' || ngDevMode)) {
2546
+ if (!this.datepickerInput && (typeof ngDevMode === 'undefined' || ngDevMode)) {
2479
2547
  throw Error('Attempted to open an MatDatepicker with no associated input.');
2480
2548
  }
2481
2549
  if (this._document) {
@@ -2523,6 +2591,12 @@
2523
2591
  completeClose();
2524
2592
  }
2525
2593
  };
2594
+ /** Applies the current pending selection on the popup to the model. */
2595
+ MatDatepickerBase.prototype._applyPendingSelection = function () {
2596
+ var _a, _b;
2597
+ var instance = ((_a = this._popupComponentRef) === null || _a === void 0 ? void 0 : _a.instance) || ((_b = this._dialogRef) === null || _b === void 0 ? void 0 : _b.componentInstance);
2598
+ instance === null || instance === void 0 ? void 0 : instance._applyPendingSelection();
2599
+ };
2526
2600
  /** Open the calendar as a dialog. */
2527
2601
  MatDatepickerBase.prototype._openAsDialog = function () {
2528
2602
  var _this = this;
@@ -2580,12 +2654,13 @@
2580
2654
  MatDatepickerBase.prototype._forwardContentValues = function (instance) {
2581
2655
  instance.datepicker = this;
2582
2656
  instance.color = this.color;
2657
+ instance._actionsPortal = this._actionsPortal;
2583
2658
  };
2584
2659
  /** Create the popup. */
2585
2660
  MatDatepickerBase.prototype._createPopup = function () {
2586
2661
  var _this = this;
2587
2662
  var positionStrategy = this._overlay.position()
2588
- .flexibleConnectedTo(this._datepickerInput.getConnectedOverlayOrigin())
2663
+ .flexibleConnectedTo(this.datepickerInput.getConnectedOverlayOrigin())
2589
2664
  .withTransformOriginOn('.mat-datepicker-content')
2590
2665
  .withFlexibleDimensions(false)
2591
2666
  .withViewportMargin(8)
@@ -2602,7 +2677,7 @@
2602
2677
  this._popupRef.overlayElement.setAttribute('role', 'dialog');
2603
2678
  rxjs.merge(this._popupRef.backdropClick(), this._popupRef.detachments(), this._popupRef.keydownEvents().pipe(operators.filter(function (event) {
2604
2679
  // Closing on alt + up is only valid when there's an input associated with the datepicker.
2605
- return (event.keyCode === keycodes.ESCAPE && !keycodes.hasModifierKey(event)) || (_this._datepickerInput &&
2680
+ return (event.keyCode === keycodes.ESCAPE && !keycodes.hasModifierKey(event)) || (_this.datepickerInput &&
2606
2681
  keycodes.hasModifierKey(event, 'altKey') && event.keyCode === keycodes.UP_ARROW);
2607
2682
  }))).subscribe(function (event) {
2608
2683
  if (event) {
@@ -2704,7 +2779,10 @@
2704
2779
  exportAs: 'matDatepicker',
2705
2780
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
2706
2781
  encapsulation: i0.ViewEncapsulation.None,
2707
- providers: [MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER]
2782
+ providers: [
2783
+ MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER,
2784
+ { provide: MatDatepickerBase, useExisting: MatDatepicker },
2785
+ ]
2708
2786
  },] }
2709
2787
  ];
2710
2788
 
@@ -2736,8 +2814,6 @@
2736
2814
  this.dateChange = new i0.EventEmitter();
2737
2815
  /** Emits when an `input` event is fired on this `<input>`. */
2738
2816
  this.dateInput = new i0.EventEmitter();
2739
- /** Emits when the value changes (either due to user input or programmatic change). */
2740
- this._valueChange = new i0.EventEmitter();
2741
2817
  /** Emits when the internal state has changed */
2742
2818
  this.stateChanges = new rxjs.Subject();
2743
2819
  this._onTouched = function () { };
@@ -2784,7 +2860,7 @@
2784
2860
  }
2785
2861
  // Update the displayed date when the locale changes.
2786
2862
  this._localeSubscription = _dateAdapter.localeChanges.subscribe(function () {
2787
- _this.value = _this.value;
2863
+ _this._assignValueProgrammatically(_this.value);
2788
2864
  });
2789
2865
  }
2790
2866
  Object.defineProperty(MatDatepickerInputBase.prototype, "value", {
@@ -2793,15 +2869,7 @@
2793
2869
  return this._model ? this._getValueFromModel(this._model.selection) : this._pendingValue;
2794
2870
  },
2795
2871
  set: function (value) {
2796
- value = this._dateAdapter.deserialize(value);
2797
- this._lastValueValid = this._isValidValue(value);
2798
- value = this._dateAdapter.getValidDateOrNull(value);
2799
- var oldDate = this.value;
2800
- this._assignValue(value);
2801
- this._formatValue(value);
2802
- if (!this._dateAdapter.sameDate(oldDate, value)) {
2803
- this._valueChange.emit(value);
2804
- }
2872
+ this._assignValueProgrammatically(value);
2805
2873
  },
2806
2874
  enumerable: false,
2807
2875
  configurable: true
@@ -2843,22 +2911,14 @@
2843
2911
  this._assignValue(this._pendingValue);
2844
2912
  }
2845
2913
  this._valueChangesSubscription = this._model.selectionChanged.subscribe(function (event) {
2846
- if (event.source !== _this) {
2914
+ if (_this._shouldHandleChangeEvent(event)) {
2847
2915
  var value = _this._getValueFromModel(event.selection);
2848
2916
  _this._lastValueValid = _this._isValidValue(value);
2849
2917
  _this._cvaOnChange(value);
2850
2918
  _this._onTouched();
2851
2919
  _this._formatValue(value);
2852
- // Note that we can't wrap the entire block with this logic, because for the range inputs
2853
- // we want to revalidate whenever either one of the inputs changes and we don't have a
2854
- // good way of distinguishing it at the moment.
2855
- if (_this._canEmitChangeEvent(event)) {
2856
- _this.dateInput.emit(new MatDatepickerInputEvent(_this, _this._elementRef.nativeElement));
2857
- _this.dateChange.emit(new MatDatepickerInputEvent(_this, _this._elementRef.nativeElement));
2858
- }
2859
- if (_this._outsideValueChanged) {
2860
- _this._outsideValueChanged();
2861
- }
2920
+ _this.dateInput.emit(new MatDatepickerInputEvent(_this, _this._elementRef.nativeElement));
2921
+ _this.dateChange.emit(new MatDatepickerInputEvent(_this, _this._elementRef.nativeElement));
2862
2922
  }
2863
2923
  });
2864
2924
  };
@@ -2873,7 +2933,6 @@
2873
2933
  MatDatepickerInputBase.prototype.ngOnDestroy = function () {
2874
2934
  this._valueChangesSubscription.unsubscribe();
2875
2935
  this._localeSubscription.unsubscribe();
2876
- this._valueChange.complete();
2877
2936
  this.stateChanges.complete();
2878
2937
  };
2879
2938
  /** @docs-private */
@@ -2886,7 +2945,7 @@
2886
2945
  };
2887
2946
  // Implemented as part of ControlValueAccessor.
2888
2947
  MatDatepickerInputBase.prototype.writeValue = function (value) {
2889
- this.value = value;
2948
+ this._assignValueProgrammatically(value);
2890
2949
  };
2891
2950
  // Implemented as part of ControlValueAccessor.
2892
2951
  MatDatepickerInputBase.prototype.registerOnChange = function (fn) {
@@ -2915,7 +2974,6 @@
2915
2974
  if (!this._dateAdapter.sameDate(date, this.value)) {
2916
2975
  this._assignValue(date);
2917
2976
  this._cvaOnChange(date);
2918
- this._valueChange.emit(date);
2919
2977
  this.dateInput.emit(new MatDatepickerInputEvent(this, this._elementRef.nativeElement));
2920
2978
  }
2921
2979
  else {
@@ -2968,6 +3026,14 @@
2968
3026
  MatDatepickerInputBase.prototype._parentDisabled = function () {
2969
3027
  return false;
2970
3028
  };
3029
+ /** Programmatically assigns a value to the input. */
3030
+ MatDatepickerInputBase.prototype._assignValueProgrammatically = function (value) {
3031
+ value = this._dateAdapter.deserialize(value);
3032
+ this._lastValueValid = this._isValidValue(value);
3033
+ value = this._dateAdapter.getValidDateOrNull(value);
3034
+ this._assignValue(value);
3035
+ this._formatValue(value);
3036
+ };
2971
3037
  /** Gets whether a value matches the current date filter. */
2972
3038
  MatDatepickerInputBase.prototype._matchesFilter = function (value) {
2973
3039
  var filter = this._getDateFilter();
@@ -3038,15 +3104,18 @@
3038
3104
  function MatDatepickerInput(elementRef, dateAdapter, dateFormats, _formField) {
3039
3105
  var _this = _super.call(this, elementRef, dateAdapter, dateFormats) || this;
3040
3106
  _this._formField = _formField;
3107
+ _this._closedSubscription = rxjs.Subscription.EMPTY;
3041
3108
  _this._validator = forms.Validators.compose(_super.prototype._getValidators.call(_this));
3042
3109
  return _this;
3043
3110
  }
3044
3111
  Object.defineProperty(MatDatepickerInput.prototype, "matDatepicker", {
3045
3112
  /** The datepicker that this input is associated with. */
3046
3113
  set: function (datepicker) {
3114
+ var _this = this;
3047
3115
  if (datepicker) {
3048
3116
  this._datepicker = datepicker;
3049
- this._registerModel(datepicker._registerInput(this));
3117
+ this._closedSubscription = datepicker.closedStream.subscribe(function () { return _this._onTouched(); });
3118
+ this._registerModel(datepicker.registerInput(this));
3050
3119
  }
3051
3120
  },
3052
3121
  enumerable: false,
@@ -3106,6 +3175,10 @@
3106
3175
  MatDatepickerInput.prototype.getStartValue = function () {
3107
3176
  return this.value;
3108
3177
  };
3178
+ MatDatepickerInput.prototype.ngOnDestroy = function () {
3179
+ _super.prototype.ngOnDestroy.call(this);
3180
+ this._closedSubscription.unsubscribe();
3181
+ };
3109
3182
  /** Opens the associated datepicker. */
3110
3183
  MatDatepickerInput.prototype._openPopup = function () {
3111
3184
  if (this._datepicker) {
@@ -3132,8 +3205,8 @@
3132
3205
  MatDatepickerInput.prototype._getDateFilter = function () {
3133
3206
  return this._dateFilter;
3134
3207
  };
3135
- MatDatepickerInput.prototype._canEmitChangeEvent = function () {
3136
- return true;
3208
+ MatDatepickerInput.prototype._shouldHandleChangeEvent = function (event) {
3209
+ return event.source !== this;
3137
3210
  };
3138
3211
  return MatDatepickerInput;
3139
3212
  }(MatDatepickerInputBase));
@@ -3235,9 +3308,9 @@
3235
3308
  };
3236
3309
  MatDatepickerToggle.prototype._watchStateChanges = function () {
3237
3310
  var _this = this;
3238
- var datepickerStateChanged = this.datepicker ? this.datepicker._stateChanges : rxjs.of();
3239
- var inputStateChanged = this.datepicker && this.datepicker._datepickerInput ?
3240
- this.datepicker._datepickerInput.stateChanges : rxjs.of();
3311
+ var datepickerStateChanged = this.datepicker ? this.datepicker.stateChanges : rxjs.of();
3312
+ var inputStateChanged = this.datepicker && this.datepicker.datepickerInput ?
3313
+ this.datepicker.datepickerInput.stateChanges : rxjs.of();
3241
3314
  var datepickerToggled = this.datepicker ?
3242
3315
  rxjs.merge(this.datepicker.openedStream, this.datepicker.closedStream) :
3243
3316
  rxjs.of();
@@ -3249,18 +3322,15 @@
3249
3322
  MatDatepickerToggle.decorators = [
3250
3323
  { type: i0.Component, args: [{
3251
3324
  selector: 'mat-datepicker-toggle',
3252
- template: "<button\n #button\n mat-icon-button\n type=\"button\"\n [attr.aria-haspopup]=\"datepicker ? 'dialog' : null\"\n [attr.aria-label]=\"_intl.openCalendarLabel\"\n [attr.tabindex]=\"disabled ? -1 : tabIndex\"\n [disabled]=\"disabled\"\n [disableRipple]=\"disableRipple\"\n (click)=\"_open($event)\">\n\n <svg\n *ngIf=\"!_customIcon\"\n class=\"mat-datepicker-toggle-default-icon\"\n viewBox=\"0 0 24 24\"\n width=\"24px\"\n height=\"24px\"\n fill=\"currentColor\"\n focusable=\"false\">\n <path d=\"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z\"/>\n </svg>\n\n <ng-content select=\"[matDatepickerToggleIcon]\"></ng-content>\n</button>\n",
3325
+ template: "<button\n #button\n mat-icon-button\n type=\"button\"\n [attr.aria-haspopup]=\"datepicker ? 'dialog' : null\"\n [attr.aria-label]=\"ariaLabel || _intl.openCalendarLabel\"\n [attr.tabindex]=\"disabled ? -1 : tabIndex\"\n [disabled]=\"disabled\"\n [disableRipple]=\"disableRipple\"\n (click)=\"_open($event)\">\n\n <svg\n *ngIf=\"!_customIcon\"\n class=\"mat-datepicker-toggle-default-icon\"\n viewBox=\"0 0 24 24\"\n width=\"24px\"\n height=\"24px\"\n fill=\"currentColor\"\n focusable=\"false\">\n <path d=\"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z\"/>\n </svg>\n\n <ng-content select=\"[matDatepickerToggleIcon]\"></ng-content>\n</button>\n",
3253
3326
  host: {
3254
3327
  'class': 'mat-datepicker-toggle',
3255
- // Always set the tabindex to -1 so that it doesn't overlap with any custom tabindex the
3256
- // consumer may have provided, while still being able to receive focus.
3257
- '[attr.tabindex]': 'disabled ? null : -1',
3328
+ '[attr.tabindex]': 'null',
3258
3329
  '[class.mat-datepicker-toggle-active]': 'datepicker && datepicker.opened',
3259
3330
  '[class.mat-accent]': 'datepicker && datepicker.color === "accent"',
3260
3331
  '[class.mat-warn]': 'datepicker && datepicker.color === "warn"',
3261
3332
  // Used by the test harness to tie this toggle to its datepicker.
3262
3333
  '[attr.data-mat-calendar]': 'datepicker ? datepicker.id : null',
3263
- '(focus)': '_button.focus()',
3264
3334
  },
3265
3335
  exportAs: 'matDatepickerToggle',
3266
3336
  encapsulation: i0.ViewEncapsulation.None,
@@ -3276,6 +3346,7 @@
3276
3346
  MatDatepickerToggle.propDecorators = {
3277
3347
  datepicker: [{ type: i0.Input, args: ['for',] }],
3278
3348
  tabIndex: [{ type: i0.Input }],
3349
+ ariaLabel: [{ type: i0.Input, args: ['aria-label',] }],
3279
3350
  disabled: [{ type: i0.Input }],
3280
3351
  disableRipple: [{ type: i0.Input }],
3281
3352
  _customIcon: [{ type: i0.ContentChild, args: [MatDatepickerToggleIcon,] }],
@@ -3299,11 +3370,6 @@
3299
3370
  _this._injector = _injector;
3300
3371
  _this._parentForm = _parentForm;
3301
3372
  _this._parentFormGroup = _parentFormGroup;
3302
- _this._outsideValueChanged = function () {
3303
- // Whenever the value changes outside the input we need to revalidate, because
3304
- // the validation state of each of the inputs depends on the other one.
3305
- _this._validatorOnChange();
3306
- };
3307
3373
  return _this;
3308
3374
  }
3309
3375
  MatDateRangeInputPartBase.prototype.ngOnInit = function () {
@@ -3362,6 +3428,16 @@
3362
3428
  MatDateRangeInputPartBase.prototype._parentDisabled = function () {
3363
3429
  return this._rangeInput._groupDisabled;
3364
3430
  };
3431
+ MatDateRangeInputPartBase.prototype._shouldHandleChangeEvent = function (_a) {
3432
+ var source = _a.source;
3433
+ return source !== this._rangeInput._startInput && source !== this._rangeInput._endInput;
3434
+ };
3435
+ MatDateRangeInputPartBase.prototype._assignValueProgrammatically = function (value) {
3436
+ _super.prototype._assignValueProgrammatically.call(this, value);
3437
+ var opposite = (this === this._rangeInput._startInput ? this._rangeInput._endInput :
3438
+ this._rangeInput._startInput);
3439
+ opposite === null || opposite === void 0 ? void 0 : opposite._validatorOnChange();
3440
+ };
3365
3441
  return MatDateRangeInputPartBase;
3366
3442
  }(MatDatepickerInputBase));
3367
3443
  MatDateRangeInputPartBase.decorators = [
@@ -3398,9 +3474,6 @@
3398
3474
  null : { 'matStartDateInvalid': { 'end': end, 'actual': start } };
3399
3475
  };
3400
3476
  _this._validator = forms.Validators.compose(__spread(_super.prototype._getValidators.call(_this), [_this._startValidator]));
3401
- _this._canEmitChangeEvent = function (event) {
3402
- return event.source !== _this._rangeInput._endInput;
3403
- };
3404
3477
  return _this;
3405
3478
  }
3406
3479
  MatStartDate.prototype.ngOnInit = function () {
@@ -3428,7 +3501,6 @@
3428
3501
  if (this._model) {
3429
3502
  var range = new DateRange(value, this._model.selection.end);
3430
3503
  this._model.updateSelection(range, this);
3431
- this._cvaOnChange(value);
3432
3504
  }
3433
3505
  };
3434
3506
  MatStartDate.prototype._formatValue = function (value) {
@@ -3499,9 +3571,6 @@
3499
3571
  null : { 'matEndDateInvalid': { 'start': start, 'actual': end } };
3500
3572
  };
3501
3573
  _this._validator = forms.Validators.compose(__spread(_super.prototype._getValidators.call(_this), [_this._endValidator]));
3502
- _this._canEmitChangeEvent = function (event) {
3503
- return event.source !== _this._rangeInput._startInput;
3504
- };
3505
3574
  return _this;
3506
3575
  }
3507
3576
  MatEndDate.prototype.ngOnInit = function () {
@@ -3529,7 +3598,6 @@
3529
3598
  if (this._model) {
3530
3599
  var range = new DateRange(this._model.selection.start, value);
3531
3600
  this._model.updateSelection(range, this);
3532
- this._cvaOnChange(value);
3533
3601
  }
3534
3602
  };
3535
3603
  MatEndDate.prototype._onKeydown = function (event) {
@@ -3592,6 +3660,7 @@
3592
3660
  this._elementRef = _elementRef;
3593
3661
  this._dateAdapter = _dateAdapter;
3594
3662
  this._formField = _formField;
3663
+ this._closedSubscription = rxjs.Subscription.EMPTY;
3595
3664
  /** Unique ID for the input. */
3596
3665
  this.id = "mat-date-range-input-" + nextUniqueId++;
3597
3666
  /** Whether the control is focused. */
@@ -3650,9 +3719,16 @@
3650
3719
  /** The range picker that this input is associated with. */
3651
3720
  get: function () { return this._rangePicker; },
3652
3721
  set: function (rangePicker) {
3722
+ var _this = this;
3653
3723
  if (rangePicker) {
3654
- this._model = rangePicker._registerInput(this);
3724
+ this._model = rangePicker.registerInput(this);
3655
3725
  this._rangePicker = rangePicker;
3726
+ this._closedSubscription.unsubscribe();
3727
+ this._closedSubscription = rangePicker.closedStream.subscribe(function () {
3728
+ var _a, _b;
3729
+ (_a = _this._startInput) === null || _a === void 0 ? void 0 : _a._onTouched();
3730
+ (_b = _this._endInput) === null || _b === void 0 ? void 0 : _b._onTouched();
3731
+ });
3656
3732
  this._registerModel(this._model);
3657
3733
  }
3658
3734
  },
@@ -3797,6 +3873,7 @@
3797
3873
  }
3798
3874
  };
3799
3875
  MatDateRangeInput.prototype.ngOnDestroy = function () {
3876
+ this._closedSubscription.unsubscribe();
3800
3877
  this.stateChanges.complete();
3801
3878
  };
3802
3879
  /** Gets the date at which the calendar should start. */
@@ -3917,7 +3994,7 @@
3917
3994
  }
3918
3995
  MatDateRangePicker.prototype._forwardContentValues = function (instance) {
3919
3996
  _super.prototype._forwardContentValues.call(this, instance);
3920
- var input = this._datepickerInput;
3997
+ var input = this.datepickerInput;
3921
3998
  if (input) {
3922
3999
  instance.comparisonStart = input.comparisonStart;
3923
4000
  instance.comparisonEnd = input.comparisonEnd;
@@ -3935,10 +4012,94 @@
3935
4012
  providers: [
3936
4013
  MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER,
3937
4014
  MAT_CALENDAR_RANGE_STRATEGY_PROVIDER,
4015
+ { provide: MatDatepickerBase, useExisting: MatDateRangePicker },
3938
4016
  ]
3939
4017
  },] }
3940
4018
  ];
3941
4019
 
4020
+ /**
4021
+ * @license
4022
+ * Copyright Google LLC All Rights Reserved.
4023
+ *
4024
+ * Use of this source code is governed by an MIT-style license that can be
4025
+ * found in the LICENSE file at https://angular.io/license
4026
+ */
4027
+ /** Button that will close the datepicker and assign the current selection to the data model. */
4028
+ var MatDatepickerApply = /** @class */ (function () {
4029
+ function MatDatepickerApply(_datepicker) {
4030
+ this._datepicker = _datepicker;
4031
+ }
4032
+ MatDatepickerApply.prototype._applySelection = function () {
4033
+ this._datepicker._applyPendingSelection();
4034
+ this._datepicker.close();
4035
+ };
4036
+ return MatDatepickerApply;
4037
+ }());
4038
+ MatDatepickerApply.decorators = [
4039
+ { type: i0.Directive, args: [{
4040
+ selector: '[matDatepickerApply], [matDateRangePickerApply]',
4041
+ host: { '(click)': '_applySelection()' }
4042
+ },] }
4043
+ ];
4044
+ MatDatepickerApply.ctorParameters = function () { return [
4045
+ { type: MatDatepickerBase }
4046
+ ]; };
4047
+ /** Button that will close the datepicker and discard the current selection. */
4048
+ var MatDatepickerCancel = /** @class */ (function () {
4049
+ function MatDatepickerCancel(_datepicker) {
4050
+ this._datepicker = _datepicker;
4051
+ }
4052
+ return MatDatepickerCancel;
4053
+ }());
4054
+ MatDatepickerCancel.decorators = [
4055
+ { type: i0.Directive, args: [{
4056
+ selector: '[matDatepickerCancel], [matDateRangePickerCancel]',
4057
+ host: { '(click)': '_datepicker.close()' }
4058
+ },] }
4059
+ ];
4060
+ MatDatepickerCancel.ctorParameters = function () { return [
4061
+ { type: MatDatepickerBase }
4062
+ ]; };
4063
+ /**
4064
+ * Container that can be used to project a row of action buttons
4065
+ * to the bottom of a datepicker or date range picker.
4066
+ */
4067
+ var MatDatepickerActions = /** @class */ (function () {
4068
+ function MatDatepickerActions(_datepicker, _viewContainerRef) {
4069
+ this._datepicker = _datepicker;
4070
+ this._viewContainerRef = _viewContainerRef;
4071
+ }
4072
+ MatDatepickerActions.prototype.ngAfterViewInit = function () {
4073
+ this._portal = new portal.TemplatePortal(this._template, this._viewContainerRef);
4074
+ this._datepicker.registerActions(this._portal);
4075
+ };
4076
+ MatDatepickerActions.prototype.ngOnDestroy = function () {
4077
+ var _a;
4078
+ this._datepicker.removeActions(this._portal);
4079
+ // Needs to be null checked since we initialize it in `ngAfterViewInit`.
4080
+ if (this._portal && this._portal.isAttached) {
4081
+ (_a = this._portal) === null || _a === void 0 ? void 0 : _a.detach();
4082
+ }
4083
+ };
4084
+ return MatDatepickerActions;
4085
+ }());
4086
+ MatDatepickerActions.decorators = [
4087
+ { type: i0.Component, args: [{
4088
+ selector: 'mat-datepicker-actions, mat-date-range-picker-actions',
4089
+ template: "\n <ng-template>\n <div class=\"mat-datepicker-actions\">\n <ng-content></ng-content>\n </div>\n </ng-template>\n ",
4090
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
4091
+ encapsulation: i0.ViewEncapsulation.None,
4092
+ styles: [".mat-datepicker-actions{display:flex;justify-content:flex-end;align-items:center;padding:0 8px 8px 8px}.mat-datepicker-actions .mat-button-base+.mat-button-base{margin-left:8px}[dir=rtl] .mat-datepicker-actions .mat-button-base+.mat-button-base{margin-left:0;margin-right:8px}\n"]
4093
+ },] }
4094
+ ];
4095
+ MatDatepickerActions.ctorParameters = function () { return [
4096
+ { type: MatDatepickerBase },
4097
+ { type: i0.ViewContainerRef }
4098
+ ]; };
4099
+ MatDatepickerActions.propDecorators = {
4100
+ _template: [{ type: i0.ViewChild, args: [i0.TemplateRef,] }]
4101
+ };
4102
+
3942
4103
  /**
3943
4104
  * @license
3944
4105
  * Copyright Google LLC All Rights Reserved.
@@ -3979,6 +4140,9 @@
3979
4140
  MatStartDate,
3980
4141
  MatEndDate,
3981
4142
  MatDateRangePicker,
4143
+ MatDatepickerActions,
4144
+ MatDatepickerCancel,
4145
+ MatDatepickerApply
3982
4146
  ],
3983
4147
  declarations: [
3984
4148
  MatCalendar,
@@ -3996,6 +4160,9 @@
3996
4160
  MatStartDate,
3997
4161
  MatEndDate,
3998
4162
  MatDateRangePicker,
4163
+ MatDatepickerActions,
4164
+ MatDatepickerCancel,
4165
+ MatDatepickerApply
3999
4166
  ],
4000
4167
  providers: [
4001
4168
  MatDatepickerIntl,
@@ -4040,6 +4207,9 @@
4040
4207
  exports.MatDateRangePicker = MatDateRangePicker;
4041
4208
  exports.MatDateSelectionModel = MatDateSelectionModel;
4042
4209
  exports.MatDatepicker = MatDatepicker;
4210
+ exports.MatDatepickerActions = MatDatepickerActions;
4211
+ exports.MatDatepickerApply = MatDatepickerApply;
4212
+ exports.MatDatepickerCancel = MatDatepickerCancel;
4043
4213
  exports.MatDatepickerContent = MatDatepickerContent;
4044
4214
  exports.MatDatepickerInput = MatDatepickerInput;
4045
4215
  exports.MatDatepickerInputEvent = MatDatepickerInputEvent;