@angular/material 12.0.0 → 12.0.4

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 (208) hide show
  1. package/_index.scss +2 -1
  2. package/_theming.scss +39 -4
  3. package/autocomplete/_autocomplete-legacy-index.scss +2 -0
  4. package/autocomplete/autocomplete.d.ts +4 -2
  5. package/autocomplete/index.metadata.json +1 -1
  6. package/badge/_badge-legacy-index.scss +3 -0
  7. package/bottom-sheet/_bottom-sheet-legacy-index.scss +2 -0
  8. package/bottom-sheet/bottom-sheet-container.d.ts +0 -2
  9. package/bottom-sheet/index.metadata.json +1 -1
  10. package/bundles/material-autocomplete.umd.js.map +1 -1
  11. package/bundles/material-bottom-sheet.umd.js +7 -15
  12. package/bundles/material-bottom-sheet.umd.js.map +1 -1
  13. package/bundles/material-button-toggle.umd.js.map +1 -1
  14. package/bundles/material-checkbox.umd.js +1 -1
  15. package/bundles/material-checkbox.umd.js.map +1 -1
  16. package/bundles/material-core.umd.js +2 -2
  17. package/bundles/material-core.umd.js.map +1 -1
  18. package/bundles/material-datepicker.umd.js +17 -19
  19. package/bundles/material-datepicker.umd.js.map +1 -1
  20. package/bundles/material-dialog.umd.js +11 -19
  21. package/bundles/material-dialog.umd.js.map +1 -1
  22. package/bundles/material-input.umd.js +8 -2
  23. package/bundles/material-input.umd.js.map +1 -1
  24. package/bundles/material-radio.umd.js +4 -4
  25. package/bundles/material-radio.umd.js.map +1 -1
  26. package/bundles/material-slide-toggle.umd.js +4 -4
  27. package/bundles/material-slide-toggle.umd.js.map +1 -1
  28. package/bundles/material-sort.umd.js +7 -1
  29. package/bundles/material-sort.umd.js.map +1 -1
  30. package/bundles/material-stepper.umd.js +2 -2
  31. package/bundles/material-stepper.umd.js.map +1 -1
  32. package/bundles/material-table.umd.js.map +1 -1
  33. package/bundles/material-tabs.umd.js +4 -2
  34. package/bundles/material-tabs.umd.js.map +1 -1
  35. package/bundles/material-tooltip.umd.js +19 -15
  36. package/bundles/material-tooltip.umd.js.map +1 -1
  37. package/button/_button-legacy-index.scss +19 -0
  38. package/button-toggle/_button-toggle-legacy-index.scss +2 -0
  39. package/button-toggle/button-toggle.d.ts +4 -0
  40. package/button-toggle/index.metadata.json +1 -1
  41. package/card/_card-legacy-index.scss +2 -0
  42. package/checkbox/_checkbox-legacy-index.scss +2 -0
  43. package/checkbox/checkbox-config.d.ts +2 -0
  44. package/checkbox/index.metadata.json +1 -1
  45. package/chips/_chips-legacy-index.scss +6 -0
  46. package/core/_core-legacy-index.scss +17 -0
  47. package/core/color/_color-legacy-index.scss +1 -0
  48. package/core/density/private/_density-legacy-index.scss +5 -0
  49. package/core/focus-indicators/_focus-indicators-legacy-index.scss +5 -0
  50. package/core/focus-indicators/_focus-indicators.import.scss +1 -1
  51. package/core/focus-indicators/_focus-indicators.scss +4 -0
  52. package/core/index.metadata.json +1 -1
  53. package/core/option/_option-legacy-index.scss +5 -0
  54. package/core/ripple/_ripple-legacy-index.scss +3 -0
  55. package/core/ripple/ripple.d.ts +8 -6
  56. package/core/selection/pseudo-checkbox/_pseudo-checkbox-legacy-index.scss +2 -0
  57. package/core/style/_style-legacy-index.scss +24 -0
  58. package/core/theming/_theming-legacy-index.scss +22 -0
  59. package/core/theming/_theming.scss +45 -22
  60. package/core/typography/_typography-legacy-index.scss +18 -0
  61. package/core/typography/_typography-utils.scss +27 -8
  62. package/core/typography/_typography.scss +36 -7
  63. package/datepicker/_datepicker-legacy-index.scss +9 -0
  64. package/datepicker/calendar.d.ts +2 -4
  65. package/datepicker/datepicker-base.d.ts +6 -2
  66. package/datepicker/index.metadata.json +1 -1
  67. package/dialog/_dialog-legacy-index.scss +2 -0
  68. package/dialog/dialog-container.d.ts +0 -2
  69. package/dialog/index.metadata.json +1 -1
  70. package/divider/_divider-legacy-index.scss +3 -0
  71. package/esm2015/autocomplete/autocomplete.js +1 -1
  72. package/esm2015/bottom-sheet/bottom-sheet-container.js +5 -12
  73. package/esm2015/button-toggle/button-toggle.js +1 -1
  74. package/esm2015/checkbox/checkbox-config.js +1 -1
  75. package/esm2015/checkbox/checkbox.js +2 -2
  76. package/esm2015/core/common-behaviors/common-module.js +1 -1
  77. package/esm2015/core/ripple/ripple.js +1 -1
  78. package/esm2015/core/version.js +1 -1
  79. package/esm2015/datepicker/calendar.js +3 -5
  80. package/esm2015/datepicker/date-range-input-parts.js +3 -2
  81. package/esm2015/datepicker/datepicker-base.js +9 -9
  82. package/esm2015/datepicker/datepicker-intl.js +3 -3
  83. package/esm2015/dialog/dialog-container.js +5 -12
  84. package/esm2015/input/input.js +10 -4
  85. package/esm2015/radio/radio.js +5 -5
  86. package/esm2015/slide-toggle/slide-toggle.js +5 -5
  87. package/esm2015/sort/sort-header.js +8 -2
  88. package/esm2015/stepper/step-header.js +3 -3
  89. package/esm2015/table/table-data-source.js +1 -1
  90. package/esm2015/tabs/tab-group.js +4 -2
  91. package/esm2015/tabs/tab.js +3 -3
  92. package/esm2015/tooltip/tooltip.js +12 -8
  93. package/expansion/_expansion-legacy-index.scss +3 -0
  94. package/fesm2015/autocomplete.js.map +1 -1
  95. package/fesm2015/bottom-sheet.js +4 -11
  96. package/fesm2015/bottom-sheet.js.map +1 -1
  97. package/fesm2015/button-toggle.js.map +1 -1
  98. package/fesm2015/checkbox.js +1 -1
  99. package/fesm2015/checkbox.js.map +1 -1
  100. package/fesm2015/core.js +2 -2
  101. package/fesm2015/core.js.map +1 -1
  102. package/fesm2015/datepicker.js +14 -15
  103. package/fesm2015/datepicker.js.map +1 -1
  104. package/fesm2015/dialog.js +4 -11
  105. package/fesm2015/dialog.js.map +1 -1
  106. package/fesm2015/input.js +9 -3
  107. package/fesm2015/input.js.map +1 -1
  108. package/fesm2015/radio.js +4 -4
  109. package/fesm2015/radio.js.map +1 -1
  110. package/fesm2015/slide-toggle.js +4 -4
  111. package/fesm2015/slide-toggle.js.map +1 -1
  112. package/fesm2015/sort.js +7 -1
  113. package/fesm2015/sort.js.map +1 -1
  114. package/fesm2015/stepper.js +2 -2
  115. package/fesm2015/stepper.js.map +1 -1
  116. package/fesm2015/table.js.map +1 -1
  117. package/fesm2015/tabs.js +4 -2
  118. package/fesm2015/tabs.js.map +1 -1
  119. package/fesm2015/tooltip.js +11 -7
  120. package/fesm2015/tooltip.js.map +1 -1
  121. package/form-field/_form-field-legacy-index.scss +24 -0
  122. package/grid-list/_grid-list-legacy-index.scss +2 -0
  123. package/icon/_icon-legacy-index.scss +2 -0
  124. package/input/_input-legacy-index.scss +2 -0
  125. package/input/index.metadata.json +1 -1
  126. package/list/_list-legacy-index.scss +2 -0
  127. package/menu/_menu-legacy-index.scss +2 -0
  128. package/package.json +2 -2
  129. package/paginator/_paginator-legacy-index.scss +2 -0
  130. package/progress-bar/_progress-bar-legacy-index.scss +2 -0
  131. package/progress-spinner/_progress-spinner-legacy-index.scss +2 -0
  132. package/radio/_radio-legacy-index.scss +2 -0
  133. package/radio/index.metadata.json +1 -1
  134. package/radio/radio.d.ts +3 -2
  135. package/schematics/ng-add/fonts/material-fonts.mjs +46 -0
  136. package/schematics/ng-add/index.js +1 -1
  137. package/schematics/ng-add/index.mjs +55 -0
  138. package/schematics/ng-add/package-config.mjs +47 -0
  139. package/schematics/ng-add/schema.mjs +10 -0
  140. package/schematics/ng-add/setup-project.mjs +121 -0
  141. package/schematics/ng-add/theming/create-custom-theme.mjs +51 -0
  142. package/schematics/ng-add/theming/theming.mjs +165 -0
  143. package/schematics/ng-generate/address-form/index.mjs +49 -0
  144. package/schematics/ng-generate/address-form/schema.mjs +10 -0
  145. package/schematics/ng-generate/dashboard/index.mjs +49 -0
  146. package/schematics/ng-generate/dashboard/schema.mjs +10 -0
  147. package/schematics/ng-generate/navigation/index.mjs +49 -0
  148. package/schematics/ng-generate/navigation/schema.mjs +10 -0
  149. package/schematics/ng-generate/table/index.mjs +46 -0
  150. package/schematics/ng-generate/table/schema.mjs +10 -0
  151. package/schematics/ng-generate/tree/index.mjs +46 -0
  152. package/schematics/ng-generate/tree/schema.mjs +10 -0
  153. package/schematics/ng-update/data/attribute-selectors.mjs +12 -0
  154. package/schematics/ng-update/data/class-names.mjs +32 -0
  155. package/schematics/ng-update/data/constructor-checks.mjs +143 -0
  156. package/schematics/ng-update/data/css-selectors.mjs +46 -0
  157. package/schematics/ng-update/data/element-selectors.mjs +18 -0
  158. package/schematics/ng-update/data/index.mjs +29 -0
  159. package/schematics/ng-update/data/input-names.mjs +76 -0
  160. package/schematics/ng-update/data/method-call-checks.mjs +22 -0
  161. package/schematics/ng-update/data/output-names.mjs +101 -0
  162. package/schematics/ng-update/data/property-names.mjs +173 -0
  163. package/schematics/ng-update/index.mjs +78 -0
  164. package/schematics/ng-update/migrations/hammer-gestures-v9/find-hammer-script-tags.mjs +42 -0
  165. package/schematics/ng-update/migrations/hammer-gestures-v9/find-main-module.mjs +32 -0
  166. package/schematics/ng-update/migrations/hammer-gestures-v9/hammer-gestures-migration.js +3 -3
  167. package/schematics/ng-update/migrations/hammer-gestures-v9/hammer-gestures-migration.mjs +778 -0
  168. package/schematics/ng-update/migrations/hammer-gestures-v9/hammer-template-check.mjs +56 -0
  169. package/schematics/ng-update/migrations/hammer-gestures-v9/import-manager.mjs +370 -0
  170. package/schematics/ng-update/migrations/hammer-gestures-v9/remove-array-element.mjs +66 -0
  171. package/schematics/ng-update/migrations/hammer-gestures-v9/remove-element-from-html.mjs +28 -0
  172. package/schematics/ng-update/migrations/misc-checks/misc-class-inheritance.mjs +48 -0
  173. package/schematics/ng-update/migrations/misc-checks/misc-class-names.mjs +43 -0
  174. package/schematics/ng-update/migrations/misc-checks/misc-imports.mjs +54 -0
  175. package/schematics/ng-update/migrations/misc-checks/misc-property-names.mjs +47 -0
  176. package/schematics/ng-update/migrations/misc-checks/misc-template.mjs +60 -0
  177. package/schematics/ng-update/migrations/misc-ripples-v7/ripple-speed-factor-migration.mjs +138 -0
  178. package/schematics/ng-update/migrations/misc-ripples-v7/ripple-speed-factor.mjs +30 -0
  179. package/schematics/ng-update/migrations/package-imports-v8/secondary-entry-points-migration.js +6 -2
  180. package/schematics/ng-update/migrations/package-imports-v8/secondary-entry-points-migration.mjs +173 -0
  181. package/schematics/ng-update/migrations/theming-api-v12/config.mjs +206 -0
  182. package/schematics/ng-update/migrations/theming-api-v12/migration.js +6 -1
  183. package/schematics/ng-update/migrations/theming-api-v12/migration.mjs +239 -0
  184. package/schematics/ng-update/migrations/theming-api-v12/theming-api-migration.mjs +45 -0
  185. package/schematics/ng-update/typescript/module-specifiers.mjs +35 -0
  186. package/schematics/ng-update/upgrade-data.mjs +24 -0
  187. package/schematics/paths.mjs +16 -0
  188. package/schematics/schematics.externs.js +0 -0
  189. package/select/_select-legacy-index.scss +2 -0
  190. package/sidenav/_sidenav-legacy-index.scss +2 -0
  191. package/slide-toggle/_slide-toggle-legacy-index.scss +3 -0
  192. package/slide-toggle/index.metadata.json +1 -1
  193. package/slide-toggle/slide-toggle.d.ts +3 -2
  194. package/slider/_slider-legacy-index.scss +2 -0
  195. package/snack-bar/_snack-bar-legacy-index.scss +2 -0
  196. package/sort/_sort-legacy-index.scss +2 -0
  197. package/sort/sort-header.d.ts +1 -1
  198. package/stepper/_stepper-legacy-index.scss +7 -0
  199. package/stepper/index.metadata.json +1 -1
  200. package/table/_table-legacy-index.scss +3 -0
  201. package/table/index.metadata.json +1 -1
  202. package/table/table-data-source.d.ts +17 -5
  203. package/tabs/_tabs-legacy-index.scss +6 -0
  204. package/tabs/index.metadata.json +1 -1
  205. package/toolbar/_toolbar-legacy-index.scss +4 -0
  206. package/tooltip/_tooltip-legacy-index.scss +3 -0
  207. package/tooltip/index.metadata.json +1 -1
  208. package/tree/_tree-legacy-index.scss +2 -0
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/cdk/a11y'), require('@angular/cdk/overlay'), require('@angular/cdk/portal'), require('@angular/common'), require('@angular/core'), require('@angular/material/button'), require('@angular/cdk/scrolling'), require('@angular/material/core'), require('rxjs'), require('@angular/cdk/keycodes'), require('@angular/cdk/bidi'), require('rxjs/operators'), require('@angular/cdk/coercion'), require('@angular/animations'), require('@angular/forms'), require('@angular/material/form-field'), require('@angular/material/input')) :
3
- typeof define === 'function' && define.amd ? define('@angular/material/datepicker', ['exports', '@angular/cdk/a11y', '@angular/cdk/overlay', '@angular/cdk/portal', '@angular/common', '@angular/core', '@angular/material/button', '@angular/cdk/scrolling', '@angular/material/core', 'rxjs', '@angular/cdk/keycodes', '@angular/cdk/bidi', 'rxjs/operators', '@angular/cdk/coercion', '@angular/animations', '@angular/forms', '@angular/material/form-field', '@angular/material/input'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.ng = global.ng || {}, global.ng.material = global.ng.material || {}, global.ng.material.datepicker = {}), global.ng.cdk.a11y, global.ng.cdk.overlay, global.ng.cdk.portal, global.ng.common, global.ng.core, global.ng.material.button, global.ng.cdk.scrolling, global.ng.material.core, global.rxjs, global.ng.cdk.keycodes, global.ng.cdk.bidi, global.rxjs.operators, global.ng.cdk.coercion, global.ng.animations, global.ng.forms, global.ng.material.formField, global.ng.material.input));
5
- }(this, (function (exports, a11y, overlay, portal, common, i0, button, scrolling, core, rxjs, keycodes, bidi, operators, coercion, animations, forms, formField, input) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/cdk/a11y'), require('@angular/cdk/overlay'), require('@angular/cdk/portal'), require('@angular/common'), require('@angular/core'), require('@angular/material/button'), require('@angular/cdk/scrolling'), require('@angular/material/core'), require('rxjs'), require('@angular/cdk/keycodes'), require('@angular/cdk/bidi'), require('rxjs/operators'), require('@angular/cdk/coercion'), require('@angular/cdk/platform'), require('@angular/animations'), require('@angular/forms'), require('@angular/material/form-field'), require('@angular/material/input')) :
3
+ typeof define === 'function' && define.amd ? define('@angular/material/datepicker', ['exports', '@angular/cdk/a11y', '@angular/cdk/overlay', '@angular/cdk/portal', '@angular/common', '@angular/core', '@angular/material/button', '@angular/cdk/scrolling', '@angular/material/core', 'rxjs', '@angular/cdk/keycodes', '@angular/cdk/bidi', 'rxjs/operators', '@angular/cdk/coercion', '@angular/cdk/platform', '@angular/animations', '@angular/forms', '@angular/material/form-field', '@angular/material/input'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.ng = global.ng || {}, global.ng.material = global.ng.material || {}, global.ng.material.datepicker = {}), global.ng.cdk.a11y, global.ng.cdk.overlay, global.ng.cdk.portal, global.ng.common, global.ng.core, global.ng.material.button, global.ng.cdk.scrolling, global.ng.material.core, global.rxjs, global.ng.cdk.keycodes, global.ng.cdk.bidi, global.rxjs.operators, global.ng.cdk.coercion, global.ng.cdk.platform, global.ng.animations, global.ng.forms, global.ng.material.formField, global.ng.material.input));
5
+ }(this, (function (exports, a11y, overlay, portal, common, i0, button, scrolling, core, rxjs, keycodes, bidi, operators, coercion, platform, animations, forms, formField, input) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -70,9 +70,9 @@
70
70
  /** A label for the next year button (used by screen readers). */
71
71
  this.nextYearLabel = 'Next year';
72
72
  /** A label for the previous multi-year button (used by screen readers). */
73
- this.prevMultiYearLabel = 'Previous 20 years';
73
+ this.prevMultiYearLabel = 'Previous 24 years';
74
74
  /** A label for the next multi-year button (used by screen readers). */
75
- this.nextMultiYearLabel = 'Next 20 years';
75
+ this.nextMultiYearLabel = 'Next 24 years';
76
76
  /** A label for the 'switch to month view' button (used by screen readers). */
77
77
  this.switchToMonthViewLabel = 'Choose date';
78
78
  /** A label for the 'switch to year view' button (used by screen readers). */
@@ -1949,10 +1949,7 @@
1949
1949
  { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [core.MAT_DATE_FORMATS,] }] },
1950
1950
  { type: i0.ChangeDetectorRef }
1951
1951
  ]; };
1952
- /**
1953
- * A calendar that is used as part of the datepicker.
1954
- * @docs-private
1955
- */
1952
+ /** A calendar that is used as part of the datepicker. */
1956
1953
  var MatCalendar = /** @class */ (function () {
1957
1954
  function MatCalendar(_intl, _dateAdapter, _dateFormats, _changeDetectorRef) {
1958
1955
  var _this = this;
@@ -2101,6 +2098,7 @@
2101
2098
  }
2102
2099
  this.stateChanges.next();
2103
2100
  };
2101
+ /** Focuses the active date. */
2104
2102
  MatCalendar.prototype.focusActiveCell = function () {
2105
2103
  this._getCurrentViewComponent()._focusActiveCell(false);
2106
2104
  };
@@ -2362,13 +2360,17 @@
2362
2360
  * @deprecated `_dialog` parameter is no longer being used and it will be removed.
2363
2361
  * @breaking-change 13.0.0
2364
2362
  */
2365
- _dialog, _overlay, _ngZone, _viewContainerRef, scrollStrategy, _dateAdapter, _dir, _document, _model) {
2363
+ _dialog, _overlay, _ngZone, _viewContainerRef, scrollStrategy, _dateAdapter, _dir,
2364
+ /**
2365
+ * @deprecated No longer being used. To be removed.
2366
+ * @breaking-change 13.0.0
2367
+ */
2368
+ _document, _model) {
2366
2369
  this._overlay = _overlay;
2367
2370
  this._ngZone = _ngZone;
2368
2371
  this._viewContainerRef = _viewContainerRef;
2369
2372
  this._dateAdapter = _dateAdapter;
2370
2373
  this._dir = _dir;
2371
- this._document = _document;
2372
2374
  this._model = _model;
2373
2375
  this._inputStateChanges = rxjs.Subscription.EMPTY;
2374
2376
  /** The view that the calendar should start in. */
@@ -2581,18 +2583,13 @@
2581
2583
  };
2582
2584
  /** Open the calendar. */
2583
2585
  MatDatepickerBase.prototype.open = function () {
2584
- var _a, _b;
2585
2586
  if (this._opened || this.disabled) {
2586
2587
  return;
2587
2588
  }
2588
2589
  if (!this.datepickerInput && (typeof ngDevMode === 'undefined' || ngDevMode)) {
2589
2590
  throw Error('Attempted to open an MatDatepicker with no associated input.');
2590
2591
  }
2591
- // If the `activeElement` is inside a shadow root, `document.activeElement` will
2592
- // point to the shadow root so we have to descend into it ourselves.
2593
- var activeElement = (_a = this._document) === null || _a === void 0 ? void 0 : _a.activeElement;
2594
- this._focusedElementBeforeOpen =
2595
- ((_b = activeElement === null || activeElement === void 0 ? void 0 : activeElement.shadowRoot) === null || _b === void 0 ? void 0 : _b.activeElement) || activeElement;
2592
+ this._focusedElementBeforeOpen = platform._getFocusedElementPierceShadowDom();
2596
2593
  this._openOverlay();
2597
2594
  this._opened = true;
2598
2595
  this.openedStream.emit();
@@ -3409,7 +3406,8 @@
3409
3406
  // itself. Usually we can work around it for the CVA, but there's no API to do it for the
3410
3407
  // validator. We work around it here by injecting the `NgControl` in `ngOnInit`, after
3411
3408
  // everything has been resolved.
3412
- var ngControl = this._injector.get(forms.NgControl, null, i0.InjectFlags.Self);
3409
+ // tslint:disable-next-line:no-bitwise
3410
+ var ngControl = this._injector.get(forms.NgControl, null, i0.InjectFlags.Self | i0.InjectFlags.Optional);
3413
3411
  if (ngControl) {
3414
3412
  this.ngControl = ngControl;
3415
3413
  }