@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
@@ -2,7 +2,13 @@
2
2
  @use 'typography-utils';
3
3
  @use '../theming/theming';
4
4
 
5
- // Represents a typography level from the Material design spec.
5
+ /// Defines a typography level from the Material Design spec.
6
+ /// @param {String} $font-size The font-size for this level.
7
+ /// @param {String | Number} $line-height The line-height for this level.
8
+ /// @param {String | Number} $font-weight The font-weight for this level.
9
+ /// @param {String} $font-family The font-family for this level.
10
+ /// @param {String} $letter-spacing The letter-spacing for this level.
11
+ /// @returns {Map} A map representing the definition of this typpographic level.
6
12
  @function define-typography-level(
7
13
  $font-size,
8
14
  $line-height: $font-size,
@@ -19,10 +25,27 @@
19
25
  );
20
26
  }
21
27
 
22
- // Represents a collection of typography levels.
23
- // Defaults come from https://material.io/guidelines/style/typography.html
24
- // Note: The spec doesn't mention letter spacing. The values here come from
25
- // eyeballing it until it looked exactly like the spec examples.
28
+ /// Defines a collection of typography levels to configure typography for an application.
29
+ /// Any level not specified defaults to the values defined in the Material Design specification:
30
+ /// https://material.io/guidelines/style/typography.html.
31
+ ///
32
+ /// Note that the Material Design specification does not describe explicit letter-spacing values.
33
+ /// The values here come from reverse engineering the Material Design examples.
34
+ /// @param {String} $font-family Default font-family for levels that don't specify font-family.
35
+ /// @param {Map} $display-4 Configuration for the "display-4" typographic level.
36
+ /// @param {Map} $display-3 Configuration for the "display-3" typographic level.
37
+ /// @param {Map} $display-2 Configuration for the "display-2" typographic level.
38
+ /// @param {Map} $display-1 Configuration for the "display-1" typographic level.
39
+ /// @param {Map} $headline Configuration for the "headline" typographic level.
40
+ /// @param {Map} $title Configuration for the "title" typographic level.
41
+ /// @param {Map} $subheading-2 Configuration for the "subheading-2" typographic level.
42
+ /// @param {Map} $subheading-1 Configuration for the "subheading-1" typographic level.
43
+ /// @param {Map} $body-2 Configuration for the "body-2" typographic level.
44
+ /// @param {Map} $body-1 Configuration for the "body-1" typographic level.
45
+ /// @param {Map} $caption Configuration for the "caption" typographic level.
46
+ /// @param {Map} $button Configuration for the "button" typographic level.
47
+ /// @param {Map} $input Configuration for the "input" typographic level.
48
+ /// @returns {Map} A typography config for the application.
26
49
  @function define-typography-config(
27
50
  $font-family: 'Roboto, "Helvetica Neue", sans-serif',
28
51
  $display-4: define-typography-level(112px, 112px, 300, $letter-spacing: -0.05em),
@@ -148,8 +171,12 @@
148
171
  @return $config;
149
172
  }
150
173
 
151
- // Adds the base typography styles, based on a config.
152
- // stylelint-disable-next-line material/theme-mixin-api
174
+ // stylelint-disable material/theme-mixin-api
175
+
176
+ /// Emits baseline typographic styles based on a given config.
177
+ /// @param {Map} $config-or-theme A typography config for an entire theme.
178
+ /// @param {String} $selector Ancestor selector under which native elements, such as h1, will
179
+ /// be styled.
153
180
  @mixin typography-hierarchy($config-or-theme, $selector: '.mat-typography') {
154
181
  $config: private-typography-to-2014-config(theming.get-typography-config($config-or-theme));
155
182
 
@@ -236,3 +263,5 @@
236
263
  margin: 0 0 64px;
237
264
  }
238
265
  }
266
+
267
+ // stylelint-enable material/theme-mixin-api
@@ -0,0 +1,9 @@
1
+ @forward 'datepicker-theme' hide $calendar-body-font-size, $calendar-weekday-table-font-size,
2
+ $range-fade-amount, $selected-fade-amount, $selected-today-box-shadow-width, $today-fade-amount,
3
+ color, date-range-colors, theme, typography;
4
+ @forward 'datepicker-theme' as mat-* hide $mat-range-fade-amount, $mat-selected-fade-amount,
5
+ $mat-selected-today-box-shadow-width, $mat-today-fade-amount, mat-color, mat-density, mat-theme,
6
+ mat-typography, mat-unselected-cell;
7
+ @forward 'datepicker-theme' as mat-datepicker-* hide $mat-datepicker-calendar-body-font-size,
8
+ $mat-datepicker-calendar-weekday-table-font-size, mat-datepicker-color,
9
+ mat-datepicker-date-range-colors, mat-datepicker-density, mat-datepicker-unselected-cell;
@@ -48,10 +48,7 @@ export declare class MatCalendarHeader<D> {
48
48
  /** Whether the two dates represent the same view in the current view mode (month or year). */
49
49
  private _isSameView;
50
50
  }
51
- /**
52
- * A calendar that is used as part of the datepicker.
53
- * @docs-private
54
- */
51
+ /** A calendar that is used as part of the datepicker. */
55
52
  export declare class MatCalendar<D> implements AfterContentInit, AfterViewChecked, OnDestroy, OnChanges {
56
53
  private _dateAdapter;
57
54
  private _dateFormats;
@@ -137,6 +134,7 @@ export declare class MatCalendar<D> implements AfterContentInit, AfterViewChecke
137
134
  ngAfterViewChecked(): void;
138
135
  ngOnDestroy(): void;
139
136
  ngOnChanges(changes: SimpleChanges): void;
137
+ /** Focuses the active date. */
140
138
  focusActiveCell(): void;
141
139
  /** Updates today's date after an update of the active date */
142
140
  updateTodaysDate(): void;
@@ -124,7 +124,6 @@ export declare abstract class MatDatepickerBase<C extends MatDatepickerControl<D
124
124
  private _viewContainerRef;
125
125
  private _dateAdapter;
126
126
  private _dir;
127
- private _document;
128
127
  private _model;
129
128
  private _scrollStrategy;
130
129
  private _inputStateChanges;
@@ -220,7 +219,12 @@ export declare abstract class MatDatepickerBase<C extends MatDatepickerControl<D
220
219
  * @deprecated `_dialog` parameter is no longer being used and it will be removed.
221
220
  * @breaking-change 13.0.0
222
221
  */
223
- _dialog: any, _overlay: Overlay, _ngZone: NgZone, _viewContainerRef: ViewContainerRef, scrollStrategy: any, _dateAdapter: DateAdapter<D>, _dir: Directionality, _document: any, _model: MatDateSelectionModel<S, D>);
222
+ _dialog: any, _overlay: Overlay, _ngZone: NgZone, _viewContainerRef: ViewContainerRef, scrollStrategy: any, _dateAdapter: DateAdapter<D>, _dir: Directionality,
223
+ /**
224
+ * @deprecated No longer being used. To be removed.
225
+ * @breaking-change 13.0.0
226
+ */
227
+ _document: any, _model: MatDateSelectionModel<S, D>);
224
228
  ngOnChanges(changes: SimpleChanges): void;
225
229
  ngOnDestroy(): void;
226
230
  /** Selects the given date */