@angular/material 12.1.0-next.0 → 12.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 (227) hide show
  1. package/badge/_badge-theme.scss +67 -45
  2. package/bottom-sheet/index.metadata.json +1 -1
  3. package/bundles/material-bottom-sheet.umd.js +2 -2
  4. package/bundles/material-bottom-sheet.umd.js.map +1 -1
  5. package/bundles/material-checkbox.umd.js.map +1 -1
  6. package/bundles/material-chips-testing.umd.js.map +1 -1
  7. package/bundles/material-chips.umd.js +4 -8
  8. package/bundles/material-chips.umd.js.map +1 -1
  9. package/bundles/material-core.umd.js +9 -7
  10. package/bundles/material-core.umd.js.map +1 -1
  11. package/bundles/material-datepicker.umd.js +12 -20
  12. package/bundles/material-datepicker.umd.js.map +1 -1
  13. package/bundles/material-dialog.umd.js +2 -2
  14. package/bundles/material-dialog.umd.js.map +1 -1
  15. package/bundles/material-expansion.umd.js.map +1 -1
  16. package/bundles/material-form-field.umd.js +2 -3
  17. package/bundles/material-form-field.umd.js.map +1 -1
  18. package/bundles/material-grid-list.umd.js +2 -4
  19. package/bundles/material-grid-list.umd.js.map +1 -1
  20. package/bundles/material-input.umd.js +1 -4
  21. package/bundles/material-input.umd.js.map +1 -1
  22. package/bundles/material-list-testing.umd.js.map +1 -1
  23. package/bundles/material-menu-testing.umd.js.map +1 -1
  24. package/bundles/material-menu.umd.js.map +1 -1
  25. package/bundles/material-progress-bar.umd.js +2 -3
  26. package/bundles/material-progress-bar.umd.js.map +1 -1
  27. package/bundles/material-progress-spinner.umd.js +2 -3
  28. package/bundles/material-progress-spinner.umd.js.map +1 -1
  29. package/bundles/material-radio.umd.js +12 -13
  30. package/bundles/material-radio.umd.js.map +1 -1
  31. package/bundles/material-select.umd.js +0 -1
  32. package/bundles/material-select.umd.js.map +1 -1
  33. package/bundles/material-sidenav.umd.js.map +1 -1
  34. package/bundles/material-slide-toggle.umd.js +1 -1
  35. package/bundles/material-slider.umd.js +1 -5
  36. package/bundles/material-slider.umd.js.map +1 -1
  37. package/bundles/material-snack-bar.umd.js.map +1 -1
  38. package/bundles/material-stepper-testing.umd.js.map +1 -1
  39. package/bundles/material-stepper.umd.js.map +1 -1
  40. package/bundles/material-table-testing.umd.js.map +1 -1
  41. package/bundles/material-table.umd.js.map +1 -1
  42. package/bundles/material-tabs-testing.umd.js.map +1 -1
  43. package/bundles/material-tabs.umd.js +6 -0
  44. package/bundles/material-tabs.umd.js.map +1 -1
  45. package/bundles/material-tooltip.umd.js +7 -0
  46. package/bundles/material-tooltip.umd.js.map +1 -1
  47. package/bundles/material-tree.umd.js +6 -11
  48. package/bundles/material-tree.umd.js.map +1 -1
  49. package/chips/chip-list.d.ts +1 -5
  50. package/chips/chip.d.ts +1 -2
  51. package/chips/index.metadata.json +1 -1
  52. package/core/common-behaviors/error-state.d.ts +5 -1
  53. package/core/index.metadata.json +1 -1
  54. package/datepicker/date-range-input-parts.d.ts +0 -3
  55. package/datepicker/datepicker-input.d.ts +0 -1
  56. package/datepicker/index.metadata.json +1 -1
  57. package/dialog/index.metadata.json +1 -1
  58. package/esm2015/bottom-sheet/bottom-sheet-container.js +1 -1
  59. package/esm2015/bottom-sheet/bottom-sheet.js +4 -4
  60. package/esm2015/checkbox/checkbox.js +1 -1
  61. package/esm2015/chips/chip-list.js +2 -5
  62. package/esm2015/chips/chip.js +4 -5
  63. package/esm2015/chips/testing/chip-option-harness.js +1 -1
  64. package/esm2015/core/common-behaviors/common-module.js +1 -1
  65. package/esm2015/core/common-behaviors/error-state.js +8 -6
  66. package/esm2015/core/datetime/native-date-adapter.js +1 -1
  67. package/esm2015/core/version.js +1 -1
  68. package/esm2015/datepicker/calendar-body.js +2 -4
  69. package/esm2015/datepicker/calendar.js +6 -14
  70. package/esm2015/datepicker/date-range-input-parts.js +1 -1
  71. package/esm2015/datepicker/date-range-input.js +4 -2
  72. package/esm2015/datepicker/date-range-picker.js +1 -1
  73. package/esm2015/datepicker/datepicker-input.js +1 -1
  74. package/esm2015/datepicker/month-view.js +2 -2
  75. package/esm2015/datepicker/multi-year-view.js +2 -2
  76. package/esm2015/datepicker/year-view.js +2 -2
  77. package/esm2015/dialog/dialog-container.js +1 -1
  78. package/esm2015/dialog/dialog.js +4 -4
  79. package/esm2015/expansion/accordion.js +1 -1
  80. package/esm2015/expansion/expansion-panel.js +1 -1
  81. package/esm2015/form-field/form-field.js +3 -4
  82. package/esm2015/grid-list/tile-styler.js +1 -1
  83. package/esm2015/input/input.js +2 -5
  84. package/esm2015/list/testing/action-list-harness.js +1 -1
  85. package/esm2015/list/testing/list-harness.js +1 -1
  86. package/esm2015/list/testing/nav-list-harness.js +1 -1
  87. package/esm2015/list/testing/selection-list-harness.js +1 -1
  88. package/esm2015/menu/menu.js +1 -1
  89. package/esm2015/menu/testing/menu-harness.js +1 -1
  90. package/esm2015/progress-bar/progress-bar.js +3 -4
  91. package/esm2015/progress-spinner/progress-spinner.js +3 -4
  92. package/esm2015/radio/radio.js +13 -14
  93. package/esm2015/select/select.js +1 -2
  94. package/esm2015/sidenav/sidenav.js +1 -1
  95. package/esm2015/slide-toggle/slide-toggle.js +1 -1
  96. package/esm2015/slider/slider.js +2 -6
  97. package/esm2015/snack-bar/snack-bar-container.js +1 -1
  98. package/esm2015/stepper/step-header.js +1 -1
  99. package/esm2015/stepper/stepper.js +1 -1
  100. package/esm2015/stepper/testing/step-harness.js +1 -1
  101. package/esm2015/table/cell.js +1 -1
  102. package/esm2015/table/row.js +1 -1
  103. package/esm2015/table/table.js +1 -1
  104. package/esm2015/table/testing/cell-harness.js +1 -1
  105. package/esm2015/tabs/tab-body.js +1 -1
  106. package/esm2015/tabs/tab-nav-bar/tab-nav-bar.js +7 -1
  107. package/esm2015/tabs/testing/tab-harness.js +1 -1
  108. package/esm2015/tooltip/tooltip.js +8 -1
  109. package/esm2015/tree/node.js +7 -12
  110. package/esm2015/tree/padding.js +1 -1
  111. package/esm2015/tree/toggle.js +1 -1
  112. package/esm2015/tree/tree.js +1 -1
  113. package/fesm2015/bottom-sheet.js +3 -3
  114. package/fesm2015/bottom-sheet.js.map +1 -1
  115. package/fesm2015/checkbox.js.map +1 -1
  116. package/fesm2015/chips/testing.js.map +1 -1
  117. package/fesm2015/chips.js +4 -8
  118. package/fesm2015/chips.js.map +1 -1
  119. package/fesm2015/core.js +9 -7
  120. package/fesm2015/core.js.map +1 -1
  121. package/fesm2015/datepicker.js +12 -20
  122. package/fesm2015/datepicker.js.map +1 -1
  123. package/fesm2015/dialog.js +3 -3
  124. package/fesm2015/dialog.js.map +1 -1
  125. package/fesm2015/expansion.js.map +1 -1
  126. package/fesm2015/form-field.js +2 -3
  127. package/fesm2015/form-field.js.map +1 -1
  128. package/fesm2015/grid-list.js.map +1 -1
  129. package/fesm2015/input.js +1 -4
  130. package/fesm2015/input.js.map +1 -1
  131. package/fesm2015/list/testing.js.map +1 -1
  132. package/fesm2015/menu/testing.js.map +1 -1
  133. package/fesm2015/menu.js.map +1 -1
  134. package/fesm2015/progress-bar.js +2 -3
  135. package/fesm2015/progress-bar.js.map +1 -1
  136. package/fesm2015/progress-spinner.js +2 -3
  137. package/fesm2015/progress-spinner.js.map +1 -1
  138. package/fesm2015/radio.js +12 -13
  139. package/fesm2015/radio.js.map +1 -1
  140. package/fesm2015/select.js +0 -1
  141. package/fesm2015/select.js.map +1 -1
  142. package/fesm2015/sidenav.js.map +1 -1
  143. package/fesm2015/slide-toggle.js +1 -1
  144. package/fesm2015/slider.js +1 -5
  145. package/fesm2015/slider.js.map +1 -1
  146. package/fesm2015/snack-bar.js.map +1 -1
  147. package/fesm2015/stepper/testing.js.map +1 -1
  148. package/fesm2015/stepper.js.map +1 -1
  149. package/fesm2015/table/testing.js.map +1 -1
  150. package/fesm2015/table.js.map +1 -1
  151. package/fesm2015/tabs/testing.js.map +1 -1
  152. package/fesm2015/tabs.js +6 -0
  153. package/fesm2015/tabs.js.map +1 -1
  154. package/fesm2015/tooltip.js +7 -0
  155. package/fesm2015/tooltip.js.map +1 -1
  156. package/fesm2015/tree.js +6 -11
  157. package/fesm2015/tree.js.map +1 -1
  158. package/form-field/form-field.d.ts +1 -2
  159. package/form-field/index.metadata.json +1 -1
  160. package/input/index.metadata.json +1 -1
  161. package/input/input.d.ts +1 -5
  162. package/package.json +2 -2
  163. package/prebuilt-themes/deeppurple-amber.css +1 -1
  164. package/prebuilt-themes/indigo-pink.css +1 -1
  165. package/prebuilt-themes/pink-bluegrey.css +1 -1
  166. package/prebuilt-themes/purple-green.css +1 -1
  167. package/progress-bar/index.metadata.json +1 -1
  168. package/progress-bar/progress-bar.d.ts +1 -2
  169. package/progress-spinner/progress-spinner.d.ts +1 -2
  170. package/radio/index.metadata.json +1 -1
  171. package/radio/radio.d.ts +2 -5
  172. package/schematics/migration.json +5 -0
  173. package/schematics/ng-add/index.js +1 -1
  174. package/schematics/ng-add/index.mjs +1 -1
  175. package/schematics/ng-add/package-config.js +5 -2
  176. package/schematics/ng-add/package-config.mjs +5 -2
  177. package/schematics/ng-update/index.d.ts +2 -0
  178. package/schematics/ng-update/index.js +7 -2
  179. package/schematics/ng-update/index.mjs +7 -2
  180. package/schematics/ng-update/migrations/hammer-gestures-v9/find-hammer-script-tags.d.ts +1 -1
  181. package/schematics/ng-update/migrations/hammer-gestures-v9/find-hammer-script-tags.js +1 -1
  182. package/schematics/ng-update/migrations/hammer-gestures-v9/find-hammer-script-tags.mjs +1 -1
  183. package/schematics/ng-update/migrations/hammer-gestures-v9/hammer-gestures-migration.js +4 -4
  184. package/schematics/ng-update/migrations/hammer-gestures-v9/hammer-gestures-migration.mjs +4 -4
  185. package/schematics/ng-update/migrations/hammer-gestures-v9/hammer-template-check.js +2 -2
  186. package/schematics/ng-update/migrations/hammer-gestures-v9/hammer-template-check.mjs +2 -2
  187. package/schematics/ng-update/migrations/hammer-gestures-v9/remove-element-from-html.d.ts +1 -1
  188. package/schematics/ng-update/migrations/hammer-gestures-v9/remove-element-from-html.js +1 -1
  189. package/schematics/ng-update/migrations/hammer-gestures-v9/remove-element-from-html.mjs +1 -1
  190. package/schematics/ng-update/migrations/misc-checks/misc-class-inheritance.js +1 -1
  191. package/schematics/ng-update/migrations/misc-checks/misc-class-inheritance.mjs +1 -1
  192. package/schematics/ng-update/migrations/misc-checks/misc-class-names.js +1 -1
  193. package/schematics/ng-update/migrations/misc-checks/misc-class-names.mjs +1 -1
  194. package/schematics/ng-update/migrations/misc-checks/misc-imports.js +1 -1
  195. package/schematics/ng-update/migrations/misc-checks/misc-imports.mjs +1 -1
  196. package/schematics/ng-update/migrations/misc-checks/misc-property-names.js +1 -1
  197. package/schematics/ng-update/migrations/misc-checks/misc-property-names.mjs +1 -1
  198. package/schematics/ng-update/migrations/misc-checks/misc-template.js +1 -1
  199. package/schematics/ng-update/migrations/misc-checks/misc-template.mjs +1 -1
  200. package/schematics/ng-update/migrations/misc-ripples-v7/ripple-speed-factor-migration.js +1 -1
  201. package/schematics/ng-update/migrations/misc-ripples-v7/ripple-speed-factor-migration.mjs +1 -1
  202. package/schematics/ng-update/migrations/package-imports-v8/secondary-entry-points-migration.js +2 -2
  203. package/schematics/ng-update/migrations/package-imports-v8/secondary-entry-points-migration.mjs +2 -2
  204. package/schematics/ng-update/migrations/theming-api-v12/config.js +4 -1
  205. package/schematics/ng-update/migrations/theming-api-v12/config.mjs +4 -1
  206. package/schematics/ng-update/migrations/theming-api-v12/migration.js +24 -28
  207. package/schematics/ng-update/migrations/theming-api-v12/migration.mjs +24 -28
  208. package/schematics/ng-update/migrations/theming-api-v12/theming-api-migration.js +1 -1
  209. package/schematics/ng-update/migrations/theming-api-v12/theming-api-migration.mjs +1 -1
  210. package/schematics/tsconfig.json +4 -0
  211. package/select/index.metadata.json +1 -1
  212. package/select/select.d.ts +0 -1
  213. package/sidenav/sidenav.d.ts +0 -1
  214. package/slide-toggle/index.metadata.json +1 -1
  215. package/slider/index.metadata.json +1 -1
  216. package/slider/slider.d.ts +2 -2
  217. package/stepper/index.metadata.json +1 -1
  218. package/stepper/stepper.d.ts +0 -5
  219. package/table/cell.d.ts +0 -2
  220. package/table/index.metadata.json +1 -1
  221. package/table/row.d.ts +0 -3
  222. package/tabs/index.metadata.json +1 -1
  223. package/tabs/tab-nav-bar/tab-nav-bar.d.ts +1 -0
  224. package/tooltip/index.metadata.json +1 -1
  225. package/tooltip/tooltip.d.ts +6 -0
  226. package/tree/index.metadata.json +1 -1
  227. package/tree/node.d.ts +2 -7
@@ -338,13 +338,11 @@
338
338
  template: "<!--\n If there's not enough space in the first row, create a separate label row. We mark this row as\n aria-hidden because we don't want it to be read out as one of the weeks in the month.\n-->\n<tr *ngIf=\"_firstRowOffset < labelMinRequiredCells\" aria-hidden=\"true\">\n <td class=\"mat-calendar-body-label\"\n [attr.colspan]=\"numCols\"\n [style.paddingTop]=\"_cellPadding\"\n [style.paddingBottom]=\"_cellPadding\">\n {{label}}\n </td>\n</tr>\n\n<!-- Create the first row separately so we can include a special spacer cell. -->\n<tr *ngFor=\"let row of rows; let rowIndex = index\" role=\"row\">\n <!--\n We mark this cell as aria-hidden so it doesn't get read out as one of the days in the week.\n The aspect ratio of the table cells is maintained by setting the top and bottom padding as a\n percentage of the width (a variant of the trick described here:\n https://www.w3schools.com/howto/howto_css_aspect_ratio.asp).\n -->\n <td *ngIf=\"rowIndex === 0 && _firstRowOffset\"\n aria-hidden=\"true\"\n class=\"mat-calendar-body-label\"\n [attr.colspan]=\"_firstRowOffset\"\n [style.paddingTop]=\"_cellPadding\"\n [style.paddingBottom]=\"_cellPadding\">\n {{_firstRowOffset >= labelMinRequiredCells ? label : ''}}\n </td>\n <td *ngFor=\"let item of row; let colIndex = index\"\n role=\"gridcell\"\n class=\"mat-calendar-body-cell\"\n [ngClass]=\"item.cssClasses\"\n [tabindex]=\"_isActiveCell(rowIndex, colIndex) ? 0 : -1\"\n [attr.data-mat-row]=\"rowIndex\"\n [attr.data-mat-col]=\"colIndex\"\n [class.mat-calendar-body-disabled]=\"!item.enabled\"\n [class.mat-calendar-body-active]=\"_isActiveCell(rowIndex, colIndex)\"\n [class.mat-calendar-body-range-start]=\"_isRangeStart(item.compareValue)\"\n [class.mat-calendar-body-range-end]=\"_isRangeEnd(item.compareValue)\"\n [class.mat-calendar-body-in-range]=\"_isInRange(item.compareValue)\"\n [class.mat-calendar-body-comparison-bridge-start]=\"_isComparisonBridgeStart(item.compareValue, rowIndex, colIndex)\"\n [class.mat-calendar-body-comparison-bridge-end]=\"_isComparisonBridgeEnd(item.compareValue, rowIndex, colIndex)\"\n [class.mat-calendar-body-comparison-start]=\"_isComparisonStart(item.compareValue)\"\n [class.mat-calendar-body-comparison-end]=\"_isComparisonEnd(item.compareValue)\"\n [class.mat-calendar-body-in-comparison-range]=\"_isInComparisonRange(item.compareValue)\"\n [class.mat-calendar-body-preview-start]=\"_isPreviewStart(item.compareValue)\"\n [class.mat-calendar-body-preview-end]=\"_isPreviewEnd(item.compareValue)\"\n [class.mat-calendar-body-in-preview]=\"_isInPreview(item.compareValue)\"\n [attr.aria-label]=\"item.ariaLabel\"\n [attr.aria-disabled]=\"!item.enabled || null\"\n [attr.aria-selected]=\"_isSelected(item.compareValue)\"\n (click)=\"_cellClicked(item, $event)\"\n [style.width]=\"_cellWidth\"\n [style.paddingTop]=\"_cellPadding\"\n [style.paddingBottom]=\"_cellPadding\">\n <div class=\"mat-calendar-body-cell-content mat-focus-indicator\"\n [class.mat-calendar-body-selected]=\"_isSelected(item.compareValue)\"\n [class.mat-calendar-body-comparison-identical]=\"_isComparisonIdentical(item.compareValue)\"\n [class.mat-calendar-body-today]=\"todayValue === item.compareValue\">\n {{item.displayValue}}\n </div>\n <div class=\"mat-calendar-body-cell-preview\"></div>\n </td>\n</tr>\n",
339
339
  host: {
340
340
  'class': 'mat-calendar-body',
341
- 'role': 'grid',
342
- 'aria-readonly': 'true'
343
341
  },
344
342
  exportAs: 'matCalendarBody',
345
343
  encapsulation: i0.ViewEncapsulation.None,
346
344
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
347
- styles: [".mat-calendar-body{min-width:224px}.mat-calendar-body-label{height:0;line-height:0;text-align:left;padding-left:4.7142857143%;padding-right:4.7142857143%}.mat-calendar-body-cell{position:relative;height:0;line-height:0;text-align:center;outline:none;cursor:pointer}.mat-calendar-body-cell::before,.mat-calendar-body-cell::after,.mat-calendar-body-cell-preview{content:\"\";position:absolute;top:5%;left:0;z-index:0;box-sizing:border-box;height:90%;width:100%}.mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-start::after,.mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,.mat-calendar-body-comparison-start::after,.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:5%;width:95%;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,[dir=rtl] .mat-calendar-body-comparison-start::after,[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:0;border-radius:0;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,.mat-calendar-body-comparison-end::after,.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}[dir=rtl] .mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,[dir=rtl] .mat-calendar-body-comparison-end::after,[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{left:5%;border-radius:0;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-comparison-bridge-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-bridge-end.mat-calendar-body-range-start::after{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end.mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-end.mat-calendar-body-range-start::after{width:90%}.mat-calendar-body-in-preview .mat-calendar-body-cell-preview{border-top:dashed 1px;border-bottom:dashed 1px}.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:dashed 1px}[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:0;border-right:dashed 1px}.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:dashed 1px}[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:0;border-left:dashed 1px}.mat-calendar-body-disabled{cursor:default}.cdk-high-contrast-active .mat-calendar-body-disabled{opacity:.5}.mat-calendar-body-cell-content{top:5%;left:5%;z-index:1;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;line-height:1;border-width:1px;border-style:solid;border-radius:999px}.mat-calendar-body-cell-content.mat-focus-indicator{position:absolute}.cdk-high-contrast-active .mat-calendar-body-cell-content{border:none}.cdk-high-contrast-active .mat-datepicker-popup:not(:empty),.cdk-high-contrast-active .mat-calendar-body-selected{outline:solid 1px}.cdk-high-contrast-active .mat-calendar-body-today{outline:dotted 1px}.cdk-high-contrast-active .cdk-keyboard-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected),.cdk-high-contrast-active .cdk-program-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){outline:dotted 2px}[dir=rtl] .mat-calendar-body-label{text-align:right}@media(hover: none){.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){background-color:transparent}}\n"]
345
+ styles: [".mat-calendar-body{min-width:224px}.mat-calendar-body-label{height:0;line-height:0;text-align:left;padding-left:4.7142857143%;padding-right:4.7142857143%}.mat-calendar-body-cell{position:relative;height:0;line-height:0;text-align:center;outline:none;cursor:pointer}.mat-calendar-body-cell::before,.mat-calendar-body-cell::after,.mat-calendar-body-cell-preview{content:\"\";position:absolute;top:5%;left:0;z-index:0;box-sizing:border-box;height:90%;width:100%}.mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-start::after,.mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,.mat-calendar-body-comparison-start::after,.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:5%;width:95%;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,[dir=rtl] .mat-calendar-body-comparison-start::after,[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:0;border-radius:0;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,.mat-calendar-body-comparison-end::after,.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}[dir=rtl] .mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,[dir=rtl] .mat-calendar-body-comparison-end::after,[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{left:5%;border-radius:0;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-comparison-bridge-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-bridge-end.mat-calendar-body-range-start::after{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end.mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-end.mat-calendar-body-range-start::after{width:90%}.mat-calendar-body-in-preview .mat-calendar-body-cell-preview{border-top:dashed 1px;border-bottom:dashed 1px}.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:dashed 1px}[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:0;border-right:dashed 1px}.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:dashed 1px}[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:0;border-left:dashed 1px}.mat-calendar-body-disabled{cursor:default}.cdk-high-contrast-active .mat-calendar-body-disabled{opacity:.5}.mat-calendar-body-cell-content{top:5%;left:5%;z-index:1;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;line-height:1;border-width:1px;border-style:solid;border-radius:999px}.mat-calendar-body-cell-content.mat-focus-indicator{position:absolute}.cdk-high-contrast-active .mat-calendar-body-cell-content{border:none}.cdk-high-contrast-active .mat-datepicker-popup:not(:empty),.cdk-high-contrast-active .mat-calendar-body-cell:not(.mat-calendar-body-in-range) .mat-calendar-body-selected{outline:solid 1px}.cdk-high-contrast-active .mat-calendar-body-today{outline:dotted 1px}.cdk-high-contrast-active .cdk-keyboard-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected),.cdk-high-contrast-active .cdk-program-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){outline:dotted 2px}.cdk-high-contrast-active .mat-calendar-body-cell::before,.cdk-high-contrast-active .mat-calendar-body-cell::after,.cdk-high-contrast-active .mat-calendar-body-selected{background:none}.cdk-high-contrast-active .mat-calendar-body-in-range::before,.cdk-high-contrast-active .mat-calendar-body-comparison-bridge-start::before,.cdk-high-contrast-active .mat-calendar-body-comparison-bridge-end::before{border-top:solid 1px;border-bottom:solid 1px}.cdk-high-contrast-active .mat-calendar-body-range-start::before{border-left:solid 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-range-start::before{border-left:0;border-right:solid 1px}.cdk-high-contrast-active .mat-calendar-body-range-end::before{border-right:solid 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-range-end::before{border-right:0;border-left:solid 1px}.cdk-high-contrast-active .mat-calendar-body-in-comparison-range::before{border-top:dashed 1px;border-bottom:dashed 1px}.cdk-high-contrast-active .mat-calendar-body-comparison-start::before{border-left:dashed 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-comparison-start::before{border-left:0;border-right:dashed 1px}.cdk-high-contrast-active .mat-calendar-body-comparison-end::before{border-right:dashed 1px}[dir=rtl] .cdk-high-contrast-active .mat-calendar-body-comparison-end::before{border-right:0;border-left:dashed 1px}[dir=rtl] .mat-calendar-body-label{text-align:right}@media(hover: none){.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){background-color:transparent}}\n"]
348
346
  },] }
349
347
  ];
350
348
  MatCalendarBody.ctorParameters = function () { return [
@@ -1248,7 +1246,7 @@
1248
1246
  MatMonthView.decorators = [
1249
1247
  { type: i0.Component, args: [{
1250
1248
  selector: 'mat-month-view',
1251
- template: "<table class=\"mat-calendar-table\" role=\"presentation\">\n <thead class=\"mat-calendar-table-header\">\n <tr>\n <th scope=\"col\" *ngFor=\"let day of _weekdays\" [attr.aria-label]=\"day.long\">{{day.narrow}}</th>\n </tr>\n <tr><th class=\"mat-calendar-table-header-divider\" colspan=\"7\" aria-hidden=\"true\"></th></tr>\n </thead>\n <tbody mat-calendar-body\n [label]=\"_monthLabel\"\n [rows]=\"_weeks\"\n [todayValue]=\"_todayDate!\"\n [startValue]=\"_rangeStart!\"\n [endValue]=\"_rangeEnd!\"\n [comparisonStart]=\"_comparisonRangeStart\"\n [comparisonEnd]=\"_comparisonRangeEnd\"\n [previewStart]=\"_previewStart\"\n [previewEnd]=\"_previewEnd\"\n [isRange]=\"_isRange\"\n [labelMinRequiredCells]=\"3\"\n [activeCell]=\"_dateAdapter.getDate(activeDate) - 1\"\n (selectedValueChange)=\"_dateSelected($event)\"\n (previewChange)=\"_previewChanged($event)\"\n (keydown)=\"_handleCalendarBodyKeydown($event)\">\n </tbody>\n</table>\n",
1249
+ template: "<table class=\"mat-calendar-table\" role=\"grid\">\n <thead class=\"mat-calendar-table-header\">\n <tr>\n <!-- For the day-of-the-week column header, we use an `<abbr>` element because VoiceOver\n ignores the `aria-label`. ChromeVox, however, does not read the full name\n for the `<abbr>`, so we still set `aria-label` on the header element. -->\n <th scope=\"col\" *ngFor=\"let day of _weekdays\" [attr.aria-label]=\"day.long\">\n <abbr class=\"mat-calendar-abbr\" [attr.title]=\"day.long\">{{day.narrow}}</abbr>\n </th>\n </tr>\n <tr><th aria-hidden=\"true\" class=\"mat-calendar-table-header-divider\" colspan=\"7\"></th></tr>\n </thead>\n <tbody mat-calendar-body\n [label]=\"_monthLabel\"\n [rows]=\"_weeks\"\n [todayValue]=\"_todayDate!\"\n [startValue]=\"_rangeStart!\"\n [endValue]=\"_rangeEnd!\"\n [comparisonStart]=\"_comparisonRangeStart\"\n [comparisonEnd]=\"_comparisonRangeEnd\"\n [previewStart]=\"_previewStart\"\n [previewEnd]=\"_previewEnd\"\n [isRange]=\"_isRange\"\n [labelMinRequiredCells]=\"3\"\n [activeCell]=\"_dateAdapter.getDate(activeDate) - 1\"\n (selectedValueChange)=\"_dateSelected($event)\"\n (previewChange)=\"_previewChanged($event)\"\n (keydown)=\"_handleCalendarBodyKeydown($event)\">\n </tbody>\n</table>\n",
1252
1250
  exportAs: 'matMonthView',
1253
1251
  encapsulation: i0.ViewEncapsulation.None,
1254
1252
  changeDetection: i0.ChangeDetectionStrategy.OnPush
@@ -1494,7 +1492,7 @@
1494
1492
  MatMultiYearView.decorators = [
1495
1493
  { type: i0.Component, args: [{
1496
1494
  selector: 'mat-multi-year-view',
1497
- template: "<table class=\"mat-calendar-table\" role=\"presentation\">\n <thead class=\"mat-calendar-table-header\">\n <tr><th class=\"mat-calendar-table-header-divider\" colspan=\"4\"></th></tr>\n </thead>\n <tbody mat-calendar-body\n [rows]=\"_years\"\n [todayValue]=\"_todayYear\"\n [startValue]=\"_selectedYear!\"\n [endValue]=\"_selectedYear!\"\n [numCols]=\"4\"\n [cellAspectRatio]=\"4 / 7\"\n [activeCell]=\"_getActiveCell()\"\n (selectedValueChange)=\"_yearSelected($event)\"\n (keydown)=\"_handleCalendarBodyKeydown($event)\">\n </tbody>\n</table>\n",
1495
+ template: "<table class=\"mat-calendar-table\" role=\"grid\">\n <thead aria-hidden=\"true\" class=\"mat-calendar-table-header\">\n <tr><th class=\"mat-calendar-table-header-divider\" colspan=\"4\"></th></tr>\n </thead>\n <tbody mat-calendar-body\n [rows]=\"_years\"\n [todayValue]=\"_todayYear\"\n [startValue]=\"_selectedYear!\"\n [endValue]=\"_selectedYear!\"\n [numCols]=\"4\"\n [cellAspectRatio]=\"4 / 7\"\n [activeCell]=\"_getActiveCell()\"\n (selectedValueChange)=\"_yearSelected($event)\"\n (keydown)=\"_handleCalendarBodyKeydown($event)\">\n </tbody>\n</table>\n",
1498
1496
  exportAs: 'matMultiYearView',
1499
1497
  encapsulation: i0.ViewEncapsulation.None,
1500
1498
  changeDetection: i0.ChangeDetectionStrategy.OnPush
@@ -1793,7 +1791,7 @@
1793
1791
  MatYearView.decorators = [
1794
1792
  { type: i0.Component, args: [{
1795
1793
  selector: 'mat-year-view',
1796
- template: "<table class=\"mat-calendar-table\" role=\"presentation\">\n <thead class=\"mat-calendar-table-header\">\n <tr><th class=\"mat-calendar-table-header-divider\" colspan=\"4\"></th></tr>\n </thead>\n <tbody mat-calendar-body\n [label]=\"_yearLabel\"\n [rows]=\"_months\"\n [todayValue]=\"_todayMonth!\"\n [startValue]=\"_selectedMonth!\"\n [endValue]=\"_selectedMonth!\"\n [labelMinRequiredCells]=\"2\"\n [numCols]=\"4\"\n [cellAspectRatio]=\"4 / 7\"\n [activeCell]=\"_dateAdapter.getMonth(activeDate)\"\n (selectedValueChange)=\"_monthSelected($event)\"\n (keydown)=\"_handleCalendarBodyKeydown($event)\">\n </tbody>\n</table>\n",
1794
+ template: "<table class=\"mat-calendar-table\" role=\"grid\">\n <thead aria-hidden=\"true\" class=\"mat-calendar-table-header\">\n <tr><th class=\"mat-calendar-table-header-divider\" colspan=\"4\"></th></tr>\n </thead>\n <tbody mat-calendar-body\n [label]=\"_yearLabel\"\n [rows]=\"_months\"\n [todayValue]=\"_todayMonth!\"\n [startValue]=\"_selectedMonth!\"\n [endValue]=\"_selectedMonth!\"\n [labelMinRequiredCells]=\"2\"\n [numCols]=\"4\"\n [cellAspectRatio]=\"4 / 7\"\n [activeCell]=\"_dateAdapter.getMonth(activeDate)\"\n (selectedValueChange)=\"_monthSelected($event)\"\n (keydown)=\"_handleCalendarBodyKeydown($event)\">\n </tbody>\n</table>\n",
1797
1795
  exportAs: 'matYearView',
1798
1796
  encapsulation: i0.ViewEncapsulation.None,
1799
1797
  changeDetection: i0.ChangeDetectionStrategy.OnPush
@@ -2107,18 +2105,7 @@
2107
2105
  };
2108
2106
  /** Updates today's date after an update of the active date */
2109
2107
  MatCalendar.prototype.updateTodaysDate = function () {
2110
- var currentView = this.currentView;
2111
- var view;
2112
- if (currentView === 'month') {
2113
- view = this.monthView;
2114
- }
2115
- else if (currentView === 'year') {
2116
- view = this.yearView;
2117
- }
2118
- else {
2119
- view = this.multiYearView;
2120
- }
2121
- view._init();
2108
+ this._getCurrentViewComponent()._init();
2122
2109
  };
2123
2110
  /** Handles date selection in the month view. */
2124
2111
  MatCalendar.prototype._dateSelected = function (event) {
@@ -2144,6 +2131,9 @@
2144
2131
  };
2145
2132
  /** Returns the component instance that corresponds to the current calendar view. */
2146
2133
  MatCalendar.prototype._getCurrentViewComponent = function () {
2134
+ // The return type is explicitly written as a union to ensure that the Closure compiler does
2135
+ // not optimize calls to _init(). Without the explict return type, TypeScript narrows it to
2136
+ // only the first component type. See https://github.com/angular/components/issues/22996.
2147
2137
  return this.monthView || this.yearView || this.multiYearView;
2148
2138
  };
2149
2139
  return MatCalendar;
@@ -2159,7 +2149,7 @@
2159
2149
  encapsulation: i0.ViewEncapsulation.None,
2160
2150
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
2161
2151
  providers: [MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER],
2162
- styles: [".mat-calendar{display:block}.mat-calendar-header{padding:8px 8px 0 8px}.mat-calendar-content{padding:0 8px 8px 8px;outline:none}.mat-calendar-controls{display:flex;margin:5% calc(33% / 7 - 16px)}.mat-calendar-controls .mat-icon-button:hover .mat-button-focus-overlay{opacity:.04}.mat-calendar-spacer{flex:1 1 auto}.mat-calendar-period-button{min-width:0}.mat-calendar-arrow{display:inline-block;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top-width:5px;border-top-style:solid;margin:0 0 0 5px;vertical-align:middle}.mat-calendar-arrow.mat-calendar-invert{transform:rotate(180deg)}[dir=rtl] .mat-calendar-arrow{margin:0 5px 0 0}.mat-calendar-previous-button,.mat-calendar-next-button{position:relative}.mat-calendar-previous-button::after,.mat-calendar-next-button::after{top:0;left:0;right:0;bottom:0;position:absolute;content:\"\";margin:15.5px;border:0 solid currentColor;border-top-width:2px}[dir=rtl] .mat-calendar-previous-button,[dir=rtl] .mat-calendar-next-button{transform:rotate(180deg)}.mat-calendar-previous-button::after{border-left-width:2px;transform:translateX(2px) rotate(-45deg)}.mat-calendar-next-button::after{border-right-width:2px;transform:translateX(-2px) rotate(45deg)}.mat-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.mat-calendar-table-header th{text-align:center;padding:0 0 8px 0}.mat-calendar-table-header-divider{position:relative;height:1px}.mat-calendar-table-header-divider::after{content:\"\";position:absolute;top:0;left:-8px;right:-8px;height:1px}\n"]
2152
+ styles: [".mat-calendar{display:block}.mat-calendar-header{padding:8px 8px 0 8px}.mat-calendar-content{padding:0 8px 8px 8px;outline:none}.mat-calendar-controls{display:flex;margin:5% calc(33% / 7 - 16px)}.mat-calendar-controls .mat-icon-button:hover .mat-button-focus-overlay{opacity:.04}.mat-calendar-spacer{flex:1 1 auto}.mat-calendar-period-button{min-width:0}.mat-calendar-arrow{display:inline-block;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top-width:5px;border-top-style:solid;margin:0 0 0 5px;vertical-align:middle}.mat-calendar-arrow.mat-calendar-invert{transform:rotate(180deg)}[dir=rtl] .mat-calendar-arrow{margin:0 5px 0 0}.mat-calendar-previous-button,.mat-calendar-next-button{position:relative}.mat-calendar-previous-button::after,.mat-calendar-next-button::after{top:0;left:0;right:0;bottom:0;position:absolute;content:\"\";margin:15.5px;border:0 solid currentColor;border-top-width:2px}[dir=rtl] .mat-calendar-previous-button,[dir=rtl] .mat-calendar-next-button{transform:rotate(180deg)}.mat-calendar-previous-button::after{border-left-width:2px;transform:translateX(2px) rotate(-45deg)}.mat-calendar-next-button::after{border-right-width:2px;transform:translateX(-2px) rotate(45deg)}.mat-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.mat-calendar-table-header th{text-align:center;padding:0 0 8px 0}.mat-calendar-table-header-divider{position:relative;height:1px}.mat-calendar-table-header-divider::after{content:\"\";position:absolute;top:0;left:-8px;right:-8px;height:1px}.mat-calendar-abbr{text-decoration:none}\n"]
2163
2153
  },] }
2164
2154
  ];
2165
2155
  MatCalendar.ctorParameters = function () { return [
@@ -3734,7 +3724,9 @@
3734
3724
  // The datepicker module can be used both with MDC and non-MDC form fields. We have
3735
3725
  // to conditionally add the MDC input class so that the range picker looks correctly.
3736
3726
  if (_formField === null || _formField === void 0 ? void 0 : _formField._elementRef.nativeElement.classList.contains('mat-mdc-form-field')) {
3737
- _elementRef.nativeElement.classList.add('mat-mdc-input-element');
3727
+ var classList = _elementRef.nativeElement.classList;
3728
+ classList.add('mat-mdc-input-element');
3729
+ classList.add('mat-mdc-form-field-control');
3738
3730
  }
3739
3731
  // TODO(crisbeto): remove `as any` after #18206 lands.
3740
3732
  this.ngControl = control;