@angular/material 17.0.0 → 17.0.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 (41) hide show
  1. package/autocomplete/index.d.ts +0 -2
  2. package/button/_button-theme.scss +4 -0
  3. package/core/ripple/_ripple-theme.scss +51 -19
  4. package/core/tokens/m2/_index.scss +27 -8
  5. package/esm2022/autocomplete/autocomplete-trigger.mjs +7 -7
  6. package/esm2022/core/version.mjs +1 -1
  7. package/esm2022/datepicker/calendar-body.mjs +2 -2
  8. package/esm2022/list/list-base.mjs +6 -6
  9. package/esm2022/select/select.mjs +2 -2
  10. package/fesm2022/autocomplete.mjs +6 -6
  11. package/fesm2022/autocomplete.mjs.map +1 -1
  12. package/fesm2022/core.mjs +1 -1
  13. package/fesm2022/core.mjs.map +1 -1
  14. package/fesm2022/datepicker.mjs +1 -1
  15. package/fesm2022/datepicker.mjs.map +1 -1
  16. package/fesm2022/list.mjs +5 -5
  17. package/fesm2022/list.mjs.map +1 -1
  18. package/fesm2022/select.mjs +1 -1
  19. package/fesm2022/select.mjs.map +1 -1
  20. package/form-field/_form-field-theme.scss +85 -49
  21. package/input/_input-theme.scss +39 -12
  22. package/list/_list-theme.scss +115 -83
  23. package/package.json +2 -2
  24. package/prebuilt-themes/deeppurple-amber.css +1 -1
  25. package/prebuilt-themes/indigo-pink.css +1 -1
  26. package/prebuilt-themes/pink-bluegrey.css +1 -1
  27. package/prebuilt-themes/purple-green.css +1 -1
  28. package/schematics/ng-add/index.js +1 -1
  29. package/schematics/ng-add/index.mjs +1 -1
  30. package/schematics/ng-generate/address-form/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +28 -29
  31. package/schematics/ng-generate/dashboard/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +21 -19
  32. package/schematics/ng-generate/mdc-migration/index_bundled.js +44 -44
  33. package/schematics/ng-generate/navigation/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +9 -8
  34. package/schematics/ng-generate/navigation/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +1 -2
  35. package/schematics/ng-update/index_bundled.js +31 -31
  36. package/slide-toggle/_slide-toggle-theme.scss +78 -44
  37. package/sort/_sort-theme.scss +51 -20
  38. package/stepper/_stepper-theme.scss +58 -25
  39. package/table/_table-theme.scss +53 -20
  40. package/tabs/_tabs-theme.scss +87 -51
  41. package/tree/_tree-theme.scss +53 -21
@@ -400,8 +400,6 @@ export declare class MatAutocompleteTrigger implements ControlValueAccessor, Aft
400
400
  * the state of the trigger right before the opening sequence was finished.
401
401
  */
402
402
  private _emitOpened;
403
- /** Intended to be called when the panel is attached. Captures the current value of the input. */
404
- private _captureValueOnAttach;
405
403
  /** Destroys the autocomplete suggestion panel. */
406
404
  private _destroyPanel;
407
405
  private _assignOptionValue;
@@ -168,6 +168,10 @@
168
168
  @include mdc-helpers.using-mdc-typography($theme) {
169
169
  @include mdc-button.without-ripple($query: mdc-helpers.$mdc-typography-styles-query);
170
170
  }
171
+
172
+ .mat-mdc-raised-button {
173
+ line-height: inherit;
174
+ }
171
175
  }
172
176
 
173
177
  @mixin density($theme) {
@@ -1,44 +1,76 @@
1
+ @use 'sass:map';
1
2
  @use '../tokens/m2/mat/ripple' as tokens-mat-ripple;
2
3
  @use '../tokens/token-utils';
3
4
  @use '../style/sass-utils';
4
-
5
5
  @use '../theming/theming';
6
6
  @use '../theming/inspection';
7
7
 
8
- @mixin base($theme) {}
8
+ @mixin base($theme) {
9
+ @if inspection.get-theme-version($theme) == 1 {
10
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
11
+ }
12
+ @else {}
13
+ }
9
14
 
10
15
  @mixin color($theme) {
11
- @include sass-utils.current-selector-or-root() {
12
- @include token-utils.create-token-values(tokens-mat-ripple.$prefix,
13
- tokens-mat-ripple.get-color-tokens($theme));
16
+ @if inspection.get-theme-version($theme) == 1 {
17
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
18
+ }
19
+ @else {
20
+ @include sass-utils.current-selector-or-root() {
21
+ @include token-utils.create-token-values(tokens-mat-ripple.$prefix,
22
+ tokens-mat-ripple.get-color-tokens($theme));
23
+ }
14
24
  }
15
25
  }
16
26
 
17
27
  @mixin typography($theme) {
18
- @include sass-utils.current-selector-or-root() {
19
- @include token-utils.create-token-values(tokens-mat-ripple.$prefix,
20
- tokens-mat-ripple.get-typography-tokens($theme));
28
+ @if inspection.get-theme-version($theme) == 1 {
29
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
30
+ }
31
+ @else {
32
+ @include sass-utils.current-selector-or-root() {
33
+ @include token-utils.create-token-values(tokens-mat-ripple.$prefix,
34
+ tokens-mat-ripple.get-typography-tokens($theme));
35
+ }
21
36
  }
22
37
  }
23
38
 
24
39
  @mixin density($theme) {
25
- @include sass-utils.current-selector-or-root() {
26
- @include token-utils.create-token-values(tokens-mat-ripple.$prefix,
27
- tokens-mat-ripple.get-density-tokens($theme));
40
+ @if inspection.get-theme-version($theme) == 1 {
41
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
42
+ }
43
+ @else {
44
+ @include sass-utils.current-selector-or-root() {
45
+ @include token-utils.create-token-values(tokens-mat-ripple.$prefix,
46
+ tokens-mat-ripple.get-density-tokens($theme));
47
+ }
28
48
  }
29
49
  }
30
50
 
31
51
  @mixin theme($theme) {
32
52
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-ripple') {
33
- @include base($theme);
34
- @if inspection.theme-has($theme, color) {
35
- @include color($theme);
36
- }
37
- @if inspection.theme-has($theme, density) {
38
- @include density($theme);
53
+ @if inspection.get-theme-version($theme) == 1 {
54
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme));
39
55
  }
40
- @if inspection.theme-has($theme, typography) {
41
- @include typography($theme);
56
+ @else {
57
+ @include base($theme);
58
+ @if inspection.theme-has($theme, color) {
59
+ @include color($theme);
60
+ }
61
+ @if inspection.theme-has($theme, density) {
62
+ @include density($theme);
63
+ }
64
+ @if inspection.theme-has($theme, typography) {
65
+ @include typography($theme);
66
+ }
42
67
  }
43
68
  }
44
69
  }
70
+
71
+ @mixin _theme-from-tokens($tokens) {
72
+ @if ($tokens != ()) {
73
+ @include token-utils.create-token-values(
74
+ tokens-mat-ripple.$prefix, map.get($tokens, tokens-mat-ripple.$prefix));
75
+ }
76
+ }
@@ -1,28 +1,37 @@
1
1
  @use 'sass:map';
2
2
  @use 'sass:meta';
3
3
  @use '../../style/sass-utils';
4
-
5
4
  @use './mat/card' as tokens-mat-card;
6
- @use './mat/toolbar' as tokens-mat-toolbar;
5
+ @use './mat/form-field' as tokens-mat-form-field;
7
6
  @use './mat/radio' as tokens-mat-radio;
7
+ @use './mat/ripple' as tokens-mat-ripple;
8
+ @use './mat/slide-toggle' as tokens-mat-slide-toggle;
9
+ @use './mat/slider' as tokens-mat-slider;
8
10
  @use './mat/snack-bar' as tokens-mat-snack-bar;
11
+ @use './mat/sort' as tokens-mat-sort;
12
+ @use './mat/stepper' as tokens-mat-stepper;
9
13
  @use './mat/tab-header' as tokens-mat-tab-header;
10
14
  @use './mat/tab-header-with-background' as tokens-mat-tab-header-with-background;
11
- @use './mat/slider' as tokens-mat-slider;
15
+ @use './mat/table' as tokens-mat-table;
16
+ @use './mat/toolbar' as tokens-mat-toolbar;
17
+ @use './mat/tree' as tokens-mat-tree;
12
18
  @use './mdc/checkbox' as tokens-mdc-checkbox;
13
19
  @use './mdc/circular-progress' as tokens-mdc-circular-progress;
14
20
  @use './mdc/dialog' as tokens-mdc-dialog;
15
21
  @use './mdc/elevated-card' as tokens-mdc-elevated-card;
22
+ @use './mdc/filled-text-field' as tokens-mdc-filled-text-field;
16
23
  @use './mdc/icon-button' as tokens-mdc-icon-button;
17
24
  @use './mdc/linear-progress' as tokens-mdc-linear-progress;
18
25
  @use './mdc/list' as tokens-mdc-list;
19
26
  @use './mdc/outlined-card' as tokens-mdc-outlined-card;
27
+ @use './mdc/outlined-text-field' as tokens-mdc-outlined-text-field;
28
+ @use './mdc/plain-tooltip' as tokens-mdc-plain-tooltip;
20
29
  @use './mdc/radio' as tokens-mdc-radio;
30
+ @use './mdc/slider' as tokens-mdc-slider;
21
31
  @use './mdc/snack-bar' as tokens-mdc-snack-bar;
32
+ @use './mdc/switch' as tokens-mdc-switch;
22
33
  @use './mdc/tab' as tokens-mdc-tab;
23
34
  @use './mdc/tab-indicator' as tokens-mdc-tab-indicator;
24
- @use './mdc/slider' as tokens-mdc-slider;
25
- @use './mdc/plain-tooltip' as tokens-mdc-plain-tooltip;
26
35
 
27
36
  /// Gets the tokens for the given theme, m2 tokens module, and theming system.
28
37
  /// @param {Map} $theme The Angular Material theme object to generate token values from.
@@ -68,25 +77,35 @@
68
77
  @function m2-tokens-from-theme($theme) {
69
78
  @return sass-utils.deep-merge-all(
70
79
  _get-tokens-for-module($theme, tokens-mat-card),
80
+ _get-tokens-for-module($theme, tokens-mat-form-field),
71
81
  _get-tokens-for-module($theme, tokens-mat-radio),
82
+ _get-tokens-for-module($theme, tokens-mat-ripple),
83
+ _get-tokens-for-module($theme, tokens-mat-slide-toggle),
84
+ _get-tokens-for-module($theme, tokens-mat-slider),
72
85
  _get-tokens-for-module($theme, tokens-mat-snack-bar),
86
+ _get-tokens-for-module($theme, tokens-mat-sort),
87
+ _get-tokens-for-module($theme, tokens-mat-stepper),
73
88
  _get-tokens-for-module($theme, tokens-mat-tab-header),
74
89
  _get-tokens-for-module($theme, tokens-mat-tab-header-with-background),
90
+ _get-tokens-for-module($theme, tokens-mat-table),
75
91
  _get-tokens-for-module($theme, tokens-mat-toolbar),
76
- _get-tokens-for-module($theme, tokens-mat-slider),
92
+ _get-tokens-for-module($theme, tokens-mat-tree),
77
93
  _get-tokens-for-module($theme, tokens-mdc-checkbox),
78
94
  _get-tokens-for-module($theme, tokens-mdc-circular-progress),
79
95
  _get-tokens-for-module($theme, tokens-mdc-dialog),
80
96
  _get-tokens-for-module($theme, tokens-mdc-elevated-card),
97
+ _get-tokens-for-module($theme, tokens-mdc-filled-text-field),
81
98
  _get-tokens-for-module($theme, tokens-mdc-icon-button),
82
99
  _get-tokens-for-module($theme, tokens-mdc-linear-progress),
83
100
  _get-tokens-for-module($theme, tokens-mdc-list),
84
101
  _get-tokens-for-module($theme, tokens-mdc-outlined-card),
102
+ _get-tokens-for-module($theme, tokens-mdc-outlined-text-field),
103
+ _get-tokens-for-module($theme, tokens-mdc-plain-tooltip),
85
104
  _get-tokens-for-module($theme, tokens-mdc-radio),
105
+ _get-tokens-for-module($theme, tokens-mdc-slider),
86
106
  _get-tokens-for-module($theme, tokens-mdc-snack-bar),
107
+ _get-tokens-for-module($theme, tokens-mdc-switch),
87
108
  _get-tokens-for-module($theme, tokens-mdc-tab),
88
109
  _get-tokens-for-module($theme, tokens-mdc-tab-indicator),
89
- _get-tokens-for-module($theme, tokens-mdc-slider),
90
- _get-tokens-for-module($theme, tokens-mdc-plain-tooltip),
91
110
  );
92
111
  }