@angular/material 12.1.2 → 12.2.0

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 (218) hide show
  1. package/bundles/material-autocomplete-testing.umd.js +10 -4
  2. package/bundles/material-autocomplete-testing.umd.js.map +1 -1
  3. package/bundles/material-autocomplete.umd.js +10 -4
  4. package/bundles/material-autocomplete.umd.js.map +1 -1
  5. package/bundles/material-badge-testing.umd.js +10 -4
  6. package/bundles/material-badge-testing.umd.js.map +1 -1
  7. package/bundles/material-badge.umd.js +10 -4
  8. package/bundles/material-badge.umd.js.map +1 -1
  9. package/bundles/material-bottom-sheet-testing.umd.js +10 -4
  10. package/bundles/material-bottom-sheet-testing.umd.js.map +1 -1
  11. package/bundles/material-bottom-sheet.umd.js +10 -4
  12. package/bundles/material-bottom-sheet.umd.js.map +1 -1
  13. package/bundles/material-button-testing.umd.js +10 -4
  14. package/bundles/material-button-testing.umd.js.map +1 -1
  15. package/bundles/material-button-toggle-testing.umd.js +10 -4
  16. package/bundles/material-button-toggle-testing.umd.js.map +1 -1
  17. package/bundles/material-button-toggle.umd.js +10 -4
  18. package/bundles/material-button-toggle.umd.js.map +1 -1
  19. package/bundles/material-button.umd.js +10 -4
  20. package/bundles/material-button.umd.js.map +1 -1
  21. package/bundles/material-card-testing.umd.js +10 -4
  22. package/bundles/material-card-testing.umd.js.map +1 -1
  23. package/bundles/material-checkbox-testing.umd.js +10 -4
  24. package/bundles/material-checkbox-testing.umd.js.map +1 -1
  25. package/bundles/material-checkbox.umd.js +10 -4
  26. package/bundles/material-checkbox.umd.js.map +1 -1
  27. package/bundles/material-chips-testing.umd.js +44 -6
  28. package/bundles/material-chips-testing.umd.js.map +1 -1
  29. package/bundles/material-chips.umd.js +10 -4
  30. package/bundles/material-chips.umd.js.map +1 -1
  31. package/bundles/material-core-testing.umd.js +10 -4
  32. package/bundles/material-core-testing.umd.js.map +1 -1
  33. package/bundles/material-core.umd.js +12 -6
  34. package/bundles/material-core.umd.js.map +1 -1
  35. package/bundles/material-datepicker-testing.umd.js +10 -4
  36. package/bundles/material-datepicker-testing.umd.js.map +1 -1
  37. package/bundles/material-datepicker.umd.js +10 -4
  38. package/bundles/material-datepicker.umd.js.map +1 -1
  39. package/bundles/material-dialog-testing.umd.js +10 -4
  40. package/bundles/material-dialog-testing.umd.js.map +1 -1
  41. package/bundles/material-dialog.umd.js +10 -4
  42. package/bundles/material-dialog.umd.js.map +1 -1
  43. package/bundles/material-divider-testing.umd.js +10 -4
  44. package/bundles/material-divider-testing.umd.js.map +1 -1
  45. package/bundles/material-expansion-testing.umd.js +10 -4
  46. package/bundles/material-expansion-testing.umd.js.map +1 -1
  47. package/bundles/material-expansion.umd.js +10 -4
  48. package/bundles/material-expansion.umd.js.map +1 -1
  49. package/bundles/material-form-field-testing-control.umd.js +10 -4
  50. package/bundles/material-form-field-testing-control.umd.js.map +1 -1
  51. package/bundles/material-form-field-testing.umd.js +10 -4
  52. package/bundles/material-form-field-testing.umd.js.map +1 -1
  53. package/bundles/material-form-field.umd.js +10 -4
  54. package/bundles/material-form-field.umd.js.map +1 -1
  55. package/bundles/material-grid-list-testing.umd.js +10 -4
  56. package/bundles/material-grid-list-testing.umd.js.map +1 -1
  57. package/bundles/material-grid-list.umd.js +10 -4
  58. package/bundles/material-grid-list.umd.js.map +1 -1
  59. package/bundles/material-icon-testing.umd.js +10 -4
  60. package/bundles/material-icon-testing.umd.js.map +1 -1
  61. package/bundles/material-icon.umd.js +10 -4
  62. package/bundles/material-icon.umd.js.map +1 -1
  63. package/bundles/material-input-testing.umd.js +10 -4
  64. package/bundles/material-input-testing.umd.js.map +1 -1
  65. package/bundles/material-input.umd.js +11 -5
  66. package/bundles/material-input.umd.js.map +1 -1
  67. package/bundles/material-list-testing.umd.js +10 -4
  68. package/bundles/material-list-testing.umd.js.map +1 -1
  69. package/bundles/material-list.umd.js +18 -4
  70. package/bundles/material-list.umd.js.map +1 -1
  71. package/bundles/material-menu-testing.umd.js +10 -4
  72. package/bundles/material-menu-testing.umd.js.map +1 -1
  73. package/bundles/material-menu.umd.js +31 -9
  74. package/bundles/material-menu.umd.js.map +1 -1
  75. package/bundles/material-paginator-testing.umd.js +10 -4
  76. package/bundles/material-paginator-testing.umd.js.map +1 -1
  77. package/bundles/material-paginator.umd.js +10 -4
  78. package/bundles/material-paginator.umd.js.map +1 -1
  79. package/bundles/material-progress-bar-testing.umd.js +10 -4
  80. package/bundles/material-progress-bar-testing.umd.js.map +1 -1
  81. package/bundles/material-progress-bar.umd.js +10 -4
  82. package/bundles/material-progress-bar.umd.js.map +1 -1
  83. package/bundles/material-progress-spinner-testing.umd.js +10 -4
  84. package/bundles/material-progress-spinner-testing.umd.js.map +1 -1
  85. package/bundles/material-progress-spinner.umd.js +10 -4
  86. package/bundles/material-progress-spinner.umd.js.map +1 -1
  87. package/bundles/material-radio-testing.umd.js +10 -4
  88. package/bundles/material-radio-testing.umd.js.map +1 -1
  89. package/bundles/material-radio.umd.js +11 -5
  90. package/bundles/material-radio.umd.js.map +1 -1
  91. package/bundles/material-select-testing.umd.js +10 -4
  92. package/bundles/material-select-testing.umd.js.map +1 -1
  93. package/bundles/material-select.umd.js +11 -5
  94. package/bundles/material-select.umd.js.map +1 -1
  95. package/bundles/material-sidenav-testing.umd.js +10 -4
  96. package/bundles/material-sidenav-testing.umd.js.map +1 -1
  97. package/bundles/material-sidenav.umd.js +10 -4
  98. package/bundles/material-sidenav.umd.js.map +1 -1
  99. package/bundles/material-slide-toggle-testing.umd.js +10 -4
  100. package/bundles/material-slide-toggle-testing.umd.js.map +1 -1
  101. package/bundles/material-slide-toggle.umd.js +12 -5
  102. package/bundles/material-slide-toggle.umd.js.map +1 -1
  103. package/bundles/material-slider-testing.umd.js +10 -4
  104. package/bundles/material-slider-testing.umd.js.map +1 -1
  105. package/bundles/material-slider.umd.js +10 -4
  106. package/bundles/material-slider.umd.js.map +1 -1
  107. package/bundles/material-snack-bar-testing.umd.js +10 -4
  108. package/bundles/material-snack-bar-testing.umd.js.map +1 -1
  109. package/bundles/material-snack-bar.umd.js +10 -4
  110. package/bundles/material-snack-bar.umd.js.map +1 -1
  111. package/bundles/material-sort-testing.umd.js +10 -4
  112. package/bundles/material-sort-testing.umd.js.map +1 -1
  113. package/bundles/material-sort.umd.js +10 -4
  114. package/bundles/material-sort.umd.js.map +1 -1
  115. package/bundles/material-stepper-testing.umd.js +10 -4
  116. package/bundles/material-stepper-testing.umd.js.map +1 -1
  117. package/bundles/material-stepper.umd.js +10 -4
  118. package/bundles/material-stepper.umd.js.map +1 -1
  119. package/bundles/material-table-testing.umd.js +10 -4
  120. package/bundles/material-table-testing.umd.js.map +1 -1
  121. package/bundles/material-table.umd.js +11 -5
  122. package/bundles/material-table.umd.js.map +1 -1
  123. package/bundles/material-tabs-testing.umd.js +10 -4
  124. package/bundles/material-tabs-testing.umd.js.map +1 -1
  125. package/bundles/material-tabs.umd.js +15 -5
  126. package/bundles/material-tabs.umd.js.map +1 -1
  127. package/bundles/material-toolbar-testing.umd.js +10 -4
  128. package/bundles/material-toolbar-testing.umd.js.map +1 -1
  129. package/bundles/material-toolbar.umd.js +10 -4
  130. package/bundles/material-toolbar.umd.js.map +1 -1
  131. package/bundles/material-tooltip-testing.umd.js +10 -4
  132. package/bundles/material-tooltip-testing.umd.js.map +1 -1
  133. package/bundles/material-tooltip.umd.js +13 -6
  134. package/bundles/material-tooltip.umd.js.map +1 -1
  135. package/bundles/material-tree-testing.umd.js +10 -4
  136. package/bundles/material-tree-testing.umd.js.map +1 -1
  137. package/bundles/material-tree.umd.js +10 -4
  138. package/bundles/material-tree.umd.js.map +1 -1
  139. package/bundles/material.umd.js +12 -4
  140. package/bundles/material.umd.js.map +1 -1
  141. package/chips/testing/chip-avatar-harness.d.ts +20 -0
  142. package/chips/testing/chip-harness-filters.d.ts +3 -0
  143. package/chips/testing/chip-harness.d.ts +10 -4
  144. package/core/index.metadata.json +1 -1
  145. package/core/style/_menu-common.scss +22 -24
  146. package/core/theming/_theming.scss +3 -1
  147. package/core/typography/_typography-deprecated.scss +1 -1
  148. package/core/typography/_typography-utils.scss +7 -0
  149. package/esm2015/chips/testing/chip-avatar-harness.js +22 -0
  150. package/esm2015/chips/testing/chip-harness-filters.js +1 -1
  151. package/esm2015/chips/testing/chip-harness.js +14 -4
  152. package/esm2015/core/common-behaviors/common-module.js +1 -1
  153. package/esm2015/core/version.js +1 -1
  154. package/esm2015/index.js +4 -1
  155. package/esm2015/input/input.js +2 -2
  156. package/esm2015/list/selection-list.js +9 -1
  157. package/esm2015/menu/menu-item.js +21 -5
  158. package/esm2015/menu/menu-trigger.js +2 -2
  159. package/esm2015/menu/menu.js +1 -1
  160. package/esm2015/radio/radio.js +1 -1
  161. package/esm2015/select/select.js +1 -1
  162. package/esm2015/slide-toggle/slide-toggle.js +3 -2
  163. package/esm2015/table/table.js +1 -1
  164. package/esm2015/tabs/tab-group.js +6 -2
  165. package/esm2015/tooltip/tooltip.js +4 -3
  166. package/fesm2015/chips/testing.js +33 -3
  167. package/fesm2015/chips/testing.js.map +1 -1
  168. package/fesm2015/core.js +2 -2
  169. package/fesm2015/core.js.map +1 -1
  170. package/fesm2015/input.js +1 -1
  171. package/fesm2015/input.js.map +1 -1
  172. package/fesm2015/list.js +9 -1
  173. package/fesm2015/list.js.map +1 -1
  174. package/fesm2015/material.js +5 -0
  175. package/fesm2015/material.js.map +1 -1
  176. package/fesm2015/menu.js +21 -5
  177. package/fesm2015/menu.js.map +1 -1
  178. package/fesm2015/radio.js +1 -1
  179. package/fesm2015/select.js +1 -1
  180. package/fesm2015/slide-toggle.js +2 -1
  181. package/fesm2015/slide-toggle.js.map +1 -1
  182. package/fesm2015/table.js +1 -1
  183. package/fesm2015/tabs.js +5 -1
  184. package/fesm2015/tabs.js.map +1 -1
  185. package/fesm2015/tooltip.js +3 -2
  186. package/fesm2015/tooltip.js.map +1 -1
  187. package/form-field/_form-field-fill-theme.scss +2 -1
  188. package/form-field/_form-field-legacy-theme.scss +3 -1
  189. package/form-field/_form-field-outline-theme.scss +2 -1
  190. package/form-field/_form-field-theme.scss +4 -2
  191. package/index.d.ts +1 -0
  192. package/input/_input-theme.scss +1 -1
  193. package/list/index.metadata.json +1 -1
  194. package/list/selection-list.d.ts +6 -0
  195. package/menu/_menu-theme.scss +2 -2
  196. package/menu/index.metadata.json +1 -1
  197. package/menu/menu-item.d.ts +13 -2
  198. package/package.json +4 -3
  199. package/prebuilt-themes/deeppurple-amber.css +1 -1
  200. package/prebuilt-themes/indigo-pink.css +1 -1
  201. package/prebuilt-themes/pink-bluegrey.css +1 -1
  202. package/prebuilt-themes/purple-green.css +1 -1
  203. package/radio/index.metadata.json +1 -1
  204. package/schematics/ng-add/index.js +1 -1
  205. package/schematics/ng-add/index.mjs +1 -1
  206. package/schematics/ng-update/migrations/theming-api-v12/migration.d.ts +2 -2
  207. package/schematics/ng-update/migrations/theming-api-v12/migration.js +63 -14
  208. package/schematics/ng-update/migrations/theming-api-v12/migration.mjs +63 -14
  209. package/select/_select-theme.scss +1 -1
  210. package/select/index.metadata.json +1 -1
  211. package/slide-toggle/index.metadata.json +1 -1
  212. package/slide-toggle/slide-toggle.d.ts +2 -0
  213. package/slider/_slider-theme.scss +1 -1
  214. package/table/_table-flex-styles.scss +30 -34
  215. package/table/_table-theme.scss +2 -2
  216. package/table/index.metadata.json +1 -1
  217. package/tabs/index.metadata.json +1 -1
  218. package/tooltip/index.metadata.json +1 -1
package/fesm2015/table.js CHANGED
@@ -62,7 +62,7 @@ MatTable.decorators = [
62
62
  // See note on CdkTable for explanation on why this uses the default change detection strategy.
63
63
  // tslint:disable-next-line:validate-decorators
64
64
  changeDetection: ChangeDetectionStrategy.Default,
65
- styles: [".mat-table:not(table){display:block}.mat-table:not(table) .mat-cell,.mat-table:not(table) .mat-header-cell,.mat-table:not(table) .mat-footer-cell{display:flex}.mat-table:not(table) .mat-row,.mat-table:not(table) .mat-header-row,.mat-table:not(table) .mat-footer-row{display:flex}.mat-table:not(table) .mat-row::after,.mat-table:not(table) .mat-header-row::after,.mat-table:not(table) .mat-footer-row::after{display:inline-block;min-height:inherit;content:\"\"}.mat-header-row{min-height:56px}.mat-row,.mat-footer-row{min-height:48px}.mat-row,.mat-header-row,.mat-footer-row{border-bottom-width:1px;border-bottom-style:solid;align-items:center;box-sizing:border-box}.mat-cell,.mat-header-cell,.mat-footer-cell{flex:1;overflow:hidden;word-wrap:break-word;min-height:inherit;align-items:center}.mat-cell:first-of-type,.mat-header-cell:first-of-type,.mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] .mat-cell:first-of-type:not(:only-of-type),[dir=rtl] .mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] .mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}.mat-cell:last-of-type,.mat-header-cell:last-of-type,.mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] .mat-cell:last-of-type:not(:only-of-type),[dir=rtl] .mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] .mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}table.mat-table{border-spacing:0}tr.mat-header-row{height:56px}tr.mat-row,tr.mat-footer-row{height:48px}th.mat-header-cell{text-align:left}[dir=rtl] th.mat-header-cell{text-align:right}th.mat-header-cell,td.mat-cell,td.mat-footer-cell{padding:0;border-bottom-width:1px;border-bottom-style:solid}th.mat-header-cell:first-of-type,td.mat-cell:first-of-type,td.mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] th.mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] td.mat-cell:first-of-type:not(:only-of-type),[dir=rtl] td.mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}th.mat-header-cell:last-of-type,td.mat-cell:last-of-type,td.mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] th.mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] td.mat-cell:last-of-type:not(:only-of-type),[dir=rtl] td.mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}.mat-table-sticky{position:-webkit-sticky !important;position:sticky !important}.mat-table-fixed-layout{table-layout:fixed}\n"]
65
+ styles: ["mat-table{display:block}mat-header-row{min-height:56px}mat-row,mat-footer-row{min-height:48px}mat-row,mat-header-row,mat-footer-row{display:flex;border-width:0;border-bottom-width:1px;border-style:solid;align-items:center;box-sizing:border-box}mat-row::after,mat-header-row::after,mat-footer-row::after{display:inline-block;min-height:inherit;content:\"\"}mat-cell:first-of-type,mat-header-cell:first-of-type,mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] mat-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] mat-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}mat-cell,mat-header-cell,mat-footer-cell{flex:1;display:flex;align-items:center;overflow:hidden;word-wrap:break-word;min-height:inherit}table.mat-table{border-spacing:0}tr.mat-header-row{height:56px}tr.mat-row,tr.mat-footer-row{height:48px}th.mat-header-cell{text-align:left}[dir=rtl] th.mat-header-cell{text-align:right}th.mat-header-cell,td.mat-cell,td.mat-footer-cell{padding:0;border-bottom-width:1px;border-bottom-style:solid}th.mat-header-cell:first-of-type,td.mat-cell:first-of-type,td.mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] th.mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] td.mat-cell:first-of-type:not(:only-of-type),[dir=rtl] td.mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}th.mat-header-cell:last-of-type,td.mat-cell:last-of-type,td.mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] th.mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] td.mat-cell:last-of-type:not(:only-of-type),[dir=rtl] td.mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}.mat-table-sticky{position:-webkit-sticky !important;position:sticky !important}.mat-table-fixed-layout{table-layout:fixed}\n"]
66
66
  },] }
67
67
  ];
68
68
 
package/fesm2015/tabs.js CHANGED
@@ -776,7 +776,11 @@ class _MatTabGroupBase extends _MatTabGroupMixinBase {
776
776
  }
777
777
  /** Callback for when the focused state of a tab has changed. */
778
778
  _tabFocusChanged(focusOrigin, index) {
779
- if (focusOrigin) {
779
+ // Mouse/touch focus happens during the `mousedown`/`touchstart` phase which
780
+ // can cause the tab to be moved out from under the pointer, interrupting the
781
+ // click sequence (see #21898). We don't need to scroll the tab into view for
782
+ // such cases anyway, because it will be done when the tab becomes selected.
783
+ if (focusOrigin && focusOrigin !== 'mouse' && focusOrigin !== 'touch') {
780
784
  this._tabHeader.focusIndex = index;
781
785
  }
782
786
  }