@angular/material 20.1.0-next.2 → 20.1.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 (214) hide show
  1. package/autocomplete/_autocomplete-theme.scss +4 -4
  2. package/autocomplete/_m2-autocomplete.scss +10 -22
  3. package/badge/_badge-theme.scss +4 -4
  4. package/badge/_m2-badge.scss +49 -63
  5. package/bottom-sheet/_bottom-sheet-theme.scss +4 -4
  6. package/bottom-sheet/_m2-bottom-sheet.scss +16 -30
  7. package/button/_button-theme.scss +4 -4
  8. package/button/_fab-theme.scss +4 -4
  9. package/button/_icon-button-theme.scss +10 -8
  10. package/button/_m2-button.scss +135 -154
  11. package/button/_m2-fab.scss +60 -69
  12. package/button/_m2-icon-button.scss +30 -50
  13. package/button/_m3-button.scss +1 -2
  14. package/button/_m3-fab.scss +1 -2
  15. package/button/_m3-icon-button.scss +1 -2
  16. package/button-toggle/_button-toggle-theme.scss +4 -4
  17. package/button-toggle/_m2-button-toggle.scss +58 -75
  18. package/button-toggle/_m3-button-toggle.scss +1 -2
  19. package/card/_card-theme.scss +4 -4
  20. package/card/_m2-card.scss +30 -43
  21. package/checkbox/_checkbox-theme.scss +10 -8
  22. package/checkbox/_m2-checkbox.scss +30 -41
  23. package/checkbox/_m3-checkbox.scss +1 -2
  24. package/chips/_chips-theme.scss +10 -7
  25. package/chips/_m2-chip.scss +40 -54
  26. package/chips/_m3-chip.scss +1 -2
  27. package/core/_core-theme.scss +4 -4
  28. package/core/_m2-app.scss +11 -23
  29. package/core/m2/_theming.scss +8 -4
  30. package/core/option/_m2-optgroup.scss +13 -25
  31. package/core/option/_m2-option.scss +16 -23
  32. package/core/option/_optgroup-theme.scss +4 -4
  33. package/core/option/_option-theme.scss +6 -6
  34. package/core/ripple/_m2-ripple.scss +8 -20
  35. package/core/ripple/_ripple-theme.scss +4 -4
  36. package/core/selection/pseudo-checkbox/_m2-pseudo-checkbox.scss +14 -21
  37. package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +8 -8
  38. package/core/theming/_definition.scss +3 -1
  39. package/core/tokens/_m2-utils.scss +14 -6
  40. package/core/tokens/m3/_theme.scss +1 -1
  41. package/datepicker/_datepicker-theme.scss +6 -6
  42. package/datepicker/_m2-datepicker.scss +26 -33
  43. package/dialog/_dialog-theme.scss +4 -4
  44. package/dialog/_m2-dialog.scss +34 -46
  45. package/divider/_divider-theme.scss +4 -4
  46. package/divider/_m2-divider.scss +10 -21
  47. package/expansion/_expansion-theme.scss +4 -4
  48. package/expansion/_m2-expansion.scss +51 -67
  49. package/expansion/_m3-expansion.scss +1 -2
  50. package/fesm2022/animation-DfMFjxHu.mjs.map +1 -1
  51. package/fesm2022/autocomplete/testing.mjs.map +1 -1
  52. package/fesm2022/autocomplete.mjs.map +1 -1
  53. package/fesm2022/badge/testing.mjs.map +1 -1
  54. package/fesm2022/badge.mjs.map +1 -1
  55. package/fesm2022/bottom-sheet/testing.mjs.map +1 -1
  56. package/fesm2022/bottom-sheet.mjs.map +1 -1
  57. package/fesm2022/button/testing.mjs.map +1 -1
  58. package/fesm2022/button-toggle/testing.mjs.map +1 -1
  59. package/fesm2022/button-toggle.mjs.map +1 -1
  60. package/fesm2022/button.mjs.map +1 -1
  61. package/fesm2022/card/testing.mjs.map +1 -1
  62. package/fesm2022/card.mjs.map +1 -1
  63. package/fesm2022/checkbox/testing.mjs.map +1 -1
  64. package/fesm2022/checkbox.mjs.map +1 -1
  65. package/fesm2022/chips/testing.mjs.map +1 -1
  66. package/fesm2022/chips.mjs.map +1 -1
  67. package/fesm2022/common-module-cKSwHniA.mjs.map +1 -1
  68. package/fesm2022/core/testing.mjs.map +1 -1
  69. package/fesm2022/core.mjs +1 -1
  70. package/fesm2022/core.mjs.map +1 -1
  71. package/fesm2022/date-formats-K6TQue-Y.mjs.map +1 -1
  72. package/fesm2022/date-range-input-harness-DEyfkeOs.mjs.map +1 -1
  73. package/fesm2022/datepicker/testing.mjs.map +1 -1
  74. package/fesm2022/datepicker.mjs.map +1 -1
  75. package/fesm2022/dialog/testing.mjs.map +1 -1
  76. package/fesm2022/dialog.mjs.map +1 -1
  77. package/fesm2022/divider/testing.mjs.map +1 -1
  78. package/fesm2022/divider.mjs.map +1 -1
  79. package/fesm2022/error-options-DCNQlTOA.mjs.map +1 -1
  80. package/fesm2022/error-state-Dtb1IHM-.mjs.map +1 -1
  81. package/fesm2022/expansion/testing.mjs.map +1 -1
  82. package/fesm2022/expansion.mjs.map +1 -1
  83. package/fesm2022/form-field/testing/control.mjs.map +1 -1
  84. package/fesm2022/form-field/testing.mjs.map +1 -1
  85. package/fesm2022/form-field-CFbrnFED.mjs.map +1 -1
  86. package/fesm2022/form-field.mjs.map +1 -1
  87. package/fesm2022/grid-list/testing.mjs.map +1 -1
  88. package/fesm2022/grid-list.mjs.map +1 -1
  89. package/fesm2022/icon/testing.mjs.map +1 -1
  90. package/fesm2022/icon-button-DxiIc1ex.mjs.map +1 -1
  91. package/fesm2022/icon-registry-CwOTJ7YM.mjs.map +1 -1
  92. package/fesm2022/icon.mjs.map +1 -1
  93. package/fesm2022/index-BFRo2fUq.mjs.map +1 -1
  94. package/fesm2022/index-DwiL-HGk.mjs.map +1 -1
  95. package/fesm2022/input/testing.mjs.map +1 -1
  96. package/fesm2022/input-harness-C5Msdc4-.mjs.map +1 -1
  97. package/fesm2022/input-value-accessor-D1GvPuqO.mjs.map +1 -1
  98. package/fesm2022/input.mjs.map +1 -1
  99. package/fesm2022/internal-form-field-D5iFxU6d.mjs.map +1 -1
  100. package/fesm2022/line-Bz5f9Cyx.mjs.map +1 -1
  101. package/fesm2022/list/testing.mjs.map +1 -1
  102. package/fesm2022/list.mjs.map +1 -1
  103. package/fesm2022/material.mjs.map +1 -1
  104. package/fesm2022/menu/testing.mjs.map +1 -1
  105. package/fesm2022/menu.mjs.map +1 -1
  106. package/fesm2022/module-B0CLRw5e.mjs.map +1 -1
  107. package/fesm2022/module-B62K-792.mjs.map +1 -1
  108. package/fesm2022/module-CWxMD37a.mjs.map +1 -1
  109. package/fesm2022/module-Ce6F7TNm.mjs.map +1 -1
  110. package/fesm2022/option-BzhYL_xC.mjs.map +1 -1
  111. package/fesm2022/option-harness-BFcc-M_4.mjs.map +1 -1
  112. package/fesm2022/paginator/testing.mjs.map +1 -1
  113. package/fesm2022/paginator.mjs.map +1 -1
  114. package/fesm2022/progress-bar/testing.mjs.map +1 -1
  115. package/fesm2022/progress-bar.mjs.map +1 -1
  116. package/fesm2022/progress-spinner/testing.mjs.map +1 -1
  117. package/fesm2022/progress-spinner.mjs.map +1 -1
  118. package/fesm2022/pseudo-checkbox-DDmgx3P4.mjs.map +1 -1
  119. package/fesm2022/pseudo-checkbox-module-4F8Up4PL.mjs.map +1 -1
  120. package/fesm2022/public-api-BoO5eSq-.mjs.map +1 -1
  121. package/fesm2022/radio/testing.mjs.map +1 -1
  122. package/fesm2022/radio.mjs.map +1 -1
  123. package/fesm2022/ripple-BYgV4oZC.mjs.map +1 -1
  124. package/fesm2022/ripple-loader-BnMiRtmT.mjs.map +1 -1
  125. package/fesm2022/select/testing.mjs.map +1 -1
  126. package/fesm2022/select.mjs.map +1 -1
  127. package/fesm2022/sidenav/testing.mjs.map +1 -1
  128. package/fesm2022/sidenav.mjs +2 -4
  129. package/fesm2022/sidenav.mjs.map +1 -1
  130. package/fesm2022/slide-toggle/testing.mjs.map +1 -1
  131. package/fesm2022/slide-toggle.mjs.map +1 -1
  132. package/fesm2022/slider/testing.mjs.map +1 -1
  133. package/fesm2022/slider.mjs.map +1 -1
  134. package/fesm2022/snack-bar/testing.mjs.map +1 -1
  135. package/fesm2022/snack-bar.mjs.map +1 -1
  136. package/fesm2022/sort/testing.mjs.map +1 -1
  137. package/fesm2022/sort.mjs.map +1 -1
  138. package/fesm2022/stepper/testing.mjs.map +1 -1
  139. package/fesm2022/stepper.mjs.map +1 -1
  140. package/fesm2022/structural-styles-CObeNzjn.mjs.map +1 -1
  141. package/fesm2022/table/testing.mjs.map +1 -1
  142. package/fesm2022/table.mjs.map +1 -1
  143. package/fesm2022/tabs/testing.mjs.map +1 -1
  144. package/fesm2022/tabs.mjs +4 -4
  145. package/fesm2022/tabs.mjs.map +1 -1
  146. package/fesm2022/timepicker/testing.mjs.map +1 -1
  147. package/fesm2022/timepicker.mjs.map +1 -1
  148. package/fesm2022/toolbar/testing.mjs.map +1 -1
  149. package/fesm2022/toolbar.mjs.map +1 -1
  150. package/fesm2022/tooltip/testing.mjs.map +1 -1
  151. package/fesm2022/tooltip.mjs.map +1 -1
  152. package/fesm2022/tree/testing.mjs.map +1 -1
  153. package/fesm2022/tree.mjs.map +1 -1
  154. package/form-field/_form-field-theme.scss +4 -4
  155. package/form-field/_m2-form-field.scss +125 -138
  156. package/form-field/_m3-form-field.scss +1 -2
  157. package/grid-list/_grid-list-theme.scss +4 -4
  158. package/grid-list/_m2-grid-list.scss +14 -25
  159. package/icon/_icon-theme.scss +4 -4
  160. package/icon/_m2-icon.scss +7 -21
  161. package/list/_list-theme.scss +14 -12
  162. package/list/_m2-list.scss +84 -98
  163. package/list/_m3-list.scss +1 -2
  164. package/menu/_m2-menu.scss +33 -46
  165. package/menu/_menu-theme.scss +4 -4
  166. package/package.json +6 -6
  167. package/paginator/_m2-paginator.scss +38 -57
  168. package/paginator/_m3-paginator.scss +1 -2
  169. package/paginator/_paginator-theme.scss +4 -4
  170. package/prebuilt-themes/deeppurple-amber.css +1 -1
  171. package/prebuilt-themes/indigo-pink.css +1 -1
  172. package/prebuilt-themes/pink-bluegrey.css +1 -1
  173. package/prebuilt-themes/purple-green.css +1 -1
  174. package/progress-bar/_m2-progress-bar.scss +11 -24
  175. package/progress-bar/_progress-bar-theme.scss +6 -6
  176. package/progress-spinner/_m2-progress-spinner.scss +9 -20
  177. package/progress-spinner/_progress-spinner-theme.scss +6 -6
  178. package/radio/_m2-radio.scss +30 -41
  179. package/radio/_m3-radio.scss +1 -2
  180. package/radio/_radio-theme.scss +6 -6
  181. package/schematics/ng-add/index.js +2 -2
  182. package/schematics/ng-generate/theme-color/schema.json +1 -1
  183. package/select/_m2-select.scss +23 -31
  184. package/select/_m3-select.scss +1 -2
  185. package/select/_select-theme.scss +6 -6
  186. package/sidenav/_m2-sidenav.scss +26 -36
  187. package/sidenav/_sidenav-theme.scss +4 -4
  188. package/slide-toggle/_m2-slide-toggle.scss +94 -113
  189. package/slide-toggle/_slide-toggle-theme.scss +6 -6
  190. package/slider/_m2-slider.scss +34 -52
  191. package/slider/_slider-theme.scss +4 -4
  192. package/snack-bar/_m2-snack-bar.scss +16 -36
  193. package/snack-bar/_snack-bar-theme.scss +4 -4
  194. package/sort/_m2-sort.scss +7 -18
  195. package/sort/_sort-theme.scss +4 -4
  196. package/stepper/_m2-stepper.scss +39 -54
  197. package/stepper/_m3-stepper.scss +1 -2
  198. package/stepper/_stepper-theme.scss +4 -4
  199. package/table/_m2-table.scss +54 -65
  200. package/table/_m3-table.scss +1 -2
  201. package/table/_table-theme.scss +4 -4
  202. package/tabs/_m2-tabs.scss +31 -47
  203. package/tabs/_m3-tabs.scss +1 -2
  204. package/tabs/_tabs-theme.scss +9 -9
  205. package/timepicker/_m2-timepicker.scss +10 -22
  206. package/timepicker/_timepicker-theme.scss +4 -4
  207. package/toolbar/_m2-toolbar.scss +26 -45
  208. package/toolbar/_m3-toolbar.scss +1 -2
  209. package/toolbar/_toolbar-theme.scss +4 -4
  210. package/tooltip/_m2-tooltip.scss +16 -33
  211. package/tooltip/_tooltip-theme.scss +4 -4
  212. package/tree/_m2-tree.scss +21 -39
  213. package/tree/_m3-tree.scss +1 -2
  214. package/tree/_tree-theme.scss +4 -4
@@ -1,24 +1,10 @@
1
-
2
- // Tokens that can't be configured through Angular Material's current theming API,
3
- // but may be in a future version of the theming API.
4
- @function get-unthemable-tokens() {
5
- @return ();
6
- }
7
-
8
- // Tokens that can be configured through Angular Material's color theming API.
9
- @function get-color-tokens($theme) {
10
- // Default the icon to `inherit` so it matches the text around it.
11
- @return private-get-icon-color-tokens(inherit);
12
- }
13
-
14
- // Tokens that can be configured through Angular Material's typography theming API.
15
- @function get-typography-tokens($theme) {
16
- @return ();
17
- }
18
-
19
- // Tokens that can be configured through Angular Material's density theming API.
20
- @function get-density-tokens($theme) {
21
- @return ();
1
+ @function get-tokens($theme) {
2
+ @return (
3
+ base: (),
4
+ color: private-get-icon-color-tokens(inherit),
5
+ typography: (),
6
+ density: (),
7
+ );
22
8
  }
23
9
 
24
10
  // Mixin used to set a specific color on an icon.
@@ -8,9 +8,10 @@
8
8
  @use './m2-list';
9
9
  @use './m3-list';
10
10
  @use '../core/tokens/m2-utils';
11
+ @use '../core/theming/theming';
11
12
 
12
13
  @mixin base($theme) {
13
- $tokens: m2-list.get-unthemable-tokens();
14
+ $tokens: map.get(m2-list.get-tokens($theme), base);
14
15
  @if inspection.get-theme-version($theme) == 1 {
15
16
  $tokens: map.get(m3-list.get-tokens($theme), base);
16
17
  }
@@ -19,7 +20,7 @@
19
20
  }
20
21
 
21
22
  @mixin color($theme) {
22
- $tokens: m2-list.get-color-tokens($theme);
23
+ $tokens: map.get(m2-list.get-tokens($theme), color);
23
24
  @if inspection.get-theme-version($theme) == 1 {
24
25
  $tokens: map.get(m3-list.get-tokens($theme), color);
25
26
  }
@@ -29,14 +30,14 @@
29
30
  @if inspection.get-theme-version($theme) != 1 {
30
31
  .mdc-list-item__start,
31
32
  .mdc-list-item__end {
32
- $tokens: m2-radio.get-color-tokens($theme, primary);
33
+ $tokens: m2-radio.private-get-color-palette-color-tokens($theme, primary);
33
34
  @include token-utils.values($tokens);
34
35
  }
35
36
 
36
37
  .mat-accent {
37
38
  .mdc-list-item__start,
38
39
  .mdc-list-item__end {
39
- $tokens: m2-radio.get-color-tokens($theme, secondary);
40
+ $tokens: m2-radio.private-get-color-palette-color-tokens($theme, secondary);
40
41
  @include token-utils.values($tokens);
41
42
  }
42
43
  }
@@ -44,23 +45,23 @@
44
45
  .mat-warn {
45
46
  .mdc-list-item__start,
46
47
  .mdc-list-item__end {
47
- $tokens: m2-radio.get-color-tokens($theme, error);
48
+ $tokens: m2-radio.private-get-color-palette-color-tokens($theme, error);
48
49
  @include token-utils.values($tokens);
49
50
  }
50
51
  }
51
52
 
52
53
  .mat-mdc-list-option {
53
- $tokens: m2-checkbox.get-color-tokens($theme, primary);
54
+ $tokens: m2-checkbox.private-get-color-palette-color-tokens($theme, primary);
54
55
  @include token-utils.values($tokens);
55
56
  }
56
57
 
57
58
  .mat-mdc-list-option.mat-accent {
58
- $tokens: m2-checkbox.get-color-tokens($theme, secondary);
59
+ $tokens: m2-checkbox.private-get-color-palette-color-tokens($theme, secondary);
59
60
  @include token-utils.values($tokens);
60
61
  }
61
62
 
62
63
  .mat-mdc-list-option.mat-warn {
63
- $tokens: m2-checkbox.get-color-tokens($theme, error);
64
+ $tokens: m2-checkbox.private-get-color-palette-color-tokens($theme, error);
64
65
  @include token-utils.values($tokens);
65
66
  }
66
67
 
@@ -90,7 +91,7 @@
90
91
  }
91
92
 
92
93
  @mixin density($theme) {
93
- $tokens: m2-list.get-density-tokens($theme);
94
+ $tokens: map.get(m2-list.get-tokens($theme), density);
94
95
  @if inspection.get-theme-version($theme) == 1 {
95
96
  $tokens: map.get(m3-list.get-tokens($theme), density);
96
97
  }
@@ -98,11 +99,12 @@
98
99
  @include token-utils.values($tokens);
99
100
 
100
101
  @if inspection.get-theme-version($theme) != 1 {
101
- $density-scale: inspection.get-theme-density($theme);
102
+ $system: m2-utils.get-system($theme);
103
+ $density-scale: theming.clamp-density(map.get($system, density-scale), -5);
102
104
 
103
105
  .mdc-list-item__start,
104
106
  .mdc-list-item__end {
105
- $tokens: m2-radio.get-density-tokens($theme);
107
+ $tokens: map.get(m2-radio.get-tokens($theme), density);
106
108
  @include token-utils.values($tokens);
107
109
  }
108
110
 
@@ -146,7 +148,7 @@
146
148
  }
147
149
 
148
150
  @mixin typography($theme) {
149
- $tokens: m2-list.get-typography-tokens($theme);
151
+ $tokens: map.get(m2-list.get-tokens($theme), typography);
150
152
  @if inspection.get-theme-version($theme) == 1 {
151
153
  $tokens: map.get(m3-list.get-tokens($theme), typography);
152
154
  }
@@ -1,106 +1,92 @@
1
- @use '../core/theming/inspection';
2
1
  @use 'sass:map';
3
2
  @use '../core/tokens/m2-utils';
3
+ @use '../core/theming/theming';
4
4
 
5
- // Tokens that can't be configured through Angular Material's current theming API,
6
- // but may be in a future version of the theming API.
7
- @function get-unthemable-tokens() {
8
- @return (
9
- list-active-indicator-color: transparent,
10
- list-active-indicator-shape: 4px,
11
- list-list-item-container-shape: 0,
12
- list-list-item-leading-avatar-shape: 50%,
13
- list-list-item-container-color: transparent,
14
- list-list-item-selected-container-color: transparent,
15
- list-list-item-leading-avatar-color: transparent,
16
- list-list-item-leading-icon-size: 24px,
17
- list-list-item-leading-avatar-size: 40px,
18
- list-list-item-trailing-icon-size: 24px,
19
- list-list-item-disabled-state-layer-color: transparent,
20
- list-list-item-disabled-state-layer-opacity: 0,
21
- list-list-item-disabled-label-text-opacity: 0.38,
22
- list-list-item-disabled-leading-icon-opacity: 0.38,
23
- list-list-item-disabled-trailing-icon-opacity: 0.38,
24
- );
25
- }
26
-
27
- // Tokens that can be configured through Angular Material's color theming API.
28
- @function get-color-tokens($theme) {
29
- $system: m2-utils.get-system($theme);
30
-
31
- @return (
32
- list-list-item-label-text-color: map.get($system, on-surface),
33
- list-list-item-supporting-text-color: map.get($system, on-surface-variant),
34
- list-list-item-leading-icon-color: map.get($system, on-surface-variant),
35
- list-list-item-trailing-supporting-text-color: map.get($system, on-surface-variant),
36
- list-list-item-trailing-icon-color: map.get($system, on-surface-variant),
37
- list-list-item-selected-trailing-icon-color: map.get($system, on-surface-variant),
38
- list-list-item-disabled-label-text-color: map.get($system, on-surface),
39
- list-list-item-disabled-leading-icon-color: map.get($system, on-surface),
40
- list-list-item-disabled-trailing-icon-color: map.get($system, on-surface),
41
- list-list-item-hover-label-text-color: map.get($system, on-surface),
42
- list-list-item-hover-leading-icon-color: map.get($system, on-surface-variant),
43
- list-list-item-hover-state-layer-color: map.get($system, on-surface),
44
- list-list-item-hover-state-layer-opacity: map.get($system, hover-state-layer-opacity),
45
- list-list-item-hover-trailing-icon-color: map.get($system, on-surface-variant),
46
- list-list-item-focus-label-text-color: map.get($system, on-surface),
47
- list-list-item-focus-state-layer-color: map.get($system, on-surface),
48
- list-list-item-focus-state-layer-opacity: map.get($system, focus-state-layer-opacity),
49
- );
50
- }
51
-
52
- // Tokens that can be configured through Angular Material's typography theming API.
53
- @function get-typography-tokens($theme) {
5
+ @function get-tokens($theme) {
54
6
  $system: m2-utils.get-system($theme);
55
- @return (
56
- list-list-item-label-text-font: map.get($system, body-large-font),
57
- list-list-item-label-text-line-height: map.get($system, body-large-line-height),
58
- list-list-item-label-text-size: map.get($system, body-large-size),
59
- list-list-item-label-text-tracking: map.get($system, body-large-tracking),
60
- list-list-item-label-text-weight: map.get($system, body-large-weight),
61
- list-list-item-supporting-text-font: map.get($system, body-medium-font),
62
- list-list-item-supporting-text-line-height: map.get($system, body-medium-line-height),
63
- list-list-item-supporting-text-size: map.get($system, body-medium-size),
64
- list-list-item-supporting-text-tracking: map.get($system, body-medium-tracking),
65
- list-list-item-supporting-text-weight: map.get($system, body-medium-weight),
66
- list-list-item-trailing-supporting-text-font: map.get($system, body-small-font),
67
- list-list-item-trailing-supporting-text-line-height: map.get($system, body-small-line-height),
68
- list-list-item-trailing-supporting-text-size: map.get($system, body-small-size),
69
- list-list-item-trailing-supporting-text-tracking: map.get($system, body-small-tracking),
70
- list-list-item-trailing-supporting-text-weight: map.get($system, body-small-weight),
71
- );
72
- }
73
-
74
- // Tokens that can be configured through Angular Material's density theming API.
75
- @function get-density-tokens($theme) {
76
- $scale: inspection.get-theme-density($theme);
7
+ $density-scale: theming.clamp-density(map.get($system, density-scale), -5);
77
8
 
78
9
  @return (
79
- list-list-item-leading-icon-start-space: 16px,
80
- list-list-item-leading-icon-end-space: 32px,
81
- list-list-item-one-line-container-height: map.get((
82
- 0: 48px,
83
- -1: 44px,
84
- -2: 40px,
85
- -3: 36px,
86
- -4: 32px,
87
- -5: 24px,
88
- ), $scale),
89
- list-list-item-two-line-container-height: map.get((
90
- 0: 64px,
91
- -1: 60px,
92
- -2: 56px,
93
- -3: 52px,
94
- -4: 48px,
95
- -5: 48px,
96
- ), $scale),
97
- list-list-item-three-line-container-height: map.get((
98
- 0: 88px,
99
- -1: 84px,
100
- -2: 80px,
101
- -3: 76px,
102
- -4: 72px,
103
- -5: 56px,
104
- ), $scale),
10
+ base: (
11
+ list-active-indicator-color: transparent,
12
+ list-active-indicator-shape: 4px,
13
+ list-list-item-container-shape: 0,
14
+ list-list-item-leading-avatar-shape: 50%,
15
+ list-list-item-container-color: transparent,
16
+ list-list-item-selected-container-color: transparent,
17
+ list-list-item-leading-avatar-color: transparent,
18
+ list-list-item-leading-icon-size: 24px,
19
+ list-list-item-leading-avatar-size: 40px,
20
+ list-list-item-trailing-icon-size: 24px,
21
+ list-list-item-disabled-state-layer-color: transparent,
22
+ list-list-item-disabled-state-layer-opacity: 0,
23
+ list-list-item-disabled-label-text-opacity: 0.38,
24
+ list-list-item-disabled-leading-icon-opacity: 0.38,
25
+ list-list-item-disabled-trailing-icon-opacity: 0.38,
26
+ ),
27
+ color: (
28
+ list-list-item-label-text-color: map.get($system, on-surface),
29
+ list-list-item-supporting-text-color: map.get($system, on-surface-variant),
30
+ list-list-item-leading-icon-color: map.get($system, on-surface-variant),
31
+ list-list-item-trailing-supporting-text-color: map.get($system, on-surface-variant),
32
+ list-list-item-trailing-icon-color: map.get($system, on-surface-variant),
33
+ list-list-item-selected-trailing-icon-color: map.get($system, on-surface-variant),
34
+ list-list-item-disabled-label-text-color: map.get($system, on-surface),
35
+ list-list-item-disabled-leading-icon-color: map.get($system, on-surface),
36
+ list-list-item-disabled-trailing-icon-color: map.get($system, on-surface),
37
+ list-list-item-hover-label-text-color: map.get($system, on-surface),
38
+ list-list-item-hover-leading-icon-color: map.get($system, on-surface-variant),
39
+ list-list-item-hover-state-layer-color: map.get($system, on-surface),
40
+ list-list-item-hover-state-layer-opacity: map.get($system, hover-state-layer-opacity),
41
+ list-list-item-hover-trailing-icon-color: map.get($system, on-surface-variant),
42
+ list-list-item-focus-label-text-color: map.get($system, on-surface),
43
+ list-list-item-focus-state-layer-color: map.get($system, on-surface),
44
+ list-list-item-focus-state-layer-opacity: map.get($system, focus-state-layer-opacity),
45
+ ),
46
+ typography: (
47
+ list-list-item-label-text-font: map.get($system, body-large-font),
48
+ list-list-item-label-text-line-height: map.get($system, body-large-line-height),
49
+ list-list-item-label-text-size: map.get($system, body-large-size),
50
+ list-list-item-label-text-tracking: map.get($system, body-large-tracking),
51
+ list-list-item-label-text-weight: map.get($system, body-large-weight),
52
+ list-list-item-supporting-text-font: map.get($system, body-medium-font),
53
+ list-list-item-supporting-text-line-height: map.get($system, body-medium-line-height),
54
+ list-list-item-supporting-text-size: map.get($system, body-medium-size),
55
+ list-list-item-supporting-text-tracking: map.get($system, body-medium-tracking),
56
+ list-list-item-supporting-text-weight: map.get($system, body-medium-weight),
57
+ list-list-item-trailing-supporting-text-font: map.get($system, body-small-font),
58
+ list-list-item-trailing-supporting-text-line-height: map.get($system, body-small-line-height),
59
+ list-list-item-trailing-supporting-text-size: map.get($system, body-small-size),
60
+ list-list-item-trailing-supporting-text-tracking: map.get($system, body-small-tracking),
61
+ list-list-item-trailing-supporting-text-weight: map.get($system, body-small-weight),
62
+ ),
63
+ density: (
64
+ list-list-item-leading-icon-start-space: 16px,
65
+ list-list-item-leading-icon-end-space: 32px,
66
+ list-list-item-one-line-container-height: map.get((
67
+ 0: 48px,
68
+ -1: 44px,
69
+ -2: 40px,
70
+ -3: 36px,
71
+ -4: 32px,
72
+ -5: 24px,
73
+ ), $density-scale),
74
+ list-list-item-two-line-container-height: map.get((
75
+ 0: 64px,
76
+ -1: 60px,
77
+ -2: 56px,
78
+ -3: 52px,
79
+ -4: 48px,
80
+ -5: 48px,
81
+ ), $density-scale),
82
+ list-list-item-three-line-container-height: map.get((
83
+ 0: 88px,
84
+ -1: 84px,
85
+ -2: 80px,
86
+ -3: 76px,
87
+ -4: 72px,
88
+ -5: 56px,
89
+ ), $density-scale),
90
+ ),
105
91
  );
106
92
  }
@@ -2,7 +2,6 @@
2
2
  @use 'sass:list';
3
3
  @use '../core/tokens/m3-utils';
4
4
  @use '../core/theming/theming';
5
- @use '../core/theming/inspection';
6
5
  @use '../core/tokens/m3';
7
6
 
8
7
  /// Generates custom tokens for the mat-list.
@@ -72,7 +71,7 @@
72
71
  list-list-item-trailing-supporting-text-tracking: map.get($system, label-small-tracking),
73
72
  list-list-item-trailing-supporting-text-weight: map.get($system, label-small-weight),
74
73
  ),
75
- density: get-density-tokens(map.get($theme, inspection.$internals, density-scale)),
74
+ density: get-density-tokens(map.get($system, density-scale)),
76
75
  );
77
76
  }
78
77
 
@@ -3,55 +3,42 @@
3
3
  @use '../core/tokens/m2-utils';
4
4
  @use '../core/tokens/m3-utils';
5
5
 
6
- // Tokens that can't be configured through Angular Material's current theming API,
7
- // but may be in a future version of the theming API.
8
- @function get-unthemable-tokens() {
9
- @return (
10
- menu-container-shape: 4px,
11
- menu-divider-bottom-spacing: 0,
12
- menu-divider-top-spacing: 0,
13
- menu-item-spacing: 16px,
14
- menu-item-icon-size: 24px,
15
- menu-item-leading-spacing: 16px,
16
- menu-item-trailing-spacing: 16px,
17
- menu-item-with-icon-leading-spacing: 16px,
18
- menu-item-with-icon-trailing-spacing: 16px,
19
- menu-container-elevation-shadow: elevation.get-box-shadow(8),
20
-
21
- // Unused
22
- menu-base-elevation-level: null,
23
- );
24
- }
25
-
26
- // Tokens that can be configured through Angular Material's color theming API.
27
- @function get-color-tokens($theme) {
6
+ @function get-tokens($theme) {
28
7
  $system: m2-utils.get-system($theme);
29
8
 
30
9
  @return (
31
- menu-item-label-text-color: map.get($system, on-surface),
32
- menu-item-icon-color: map.get($system, on-surface),
33
- menu-item-hover-state-layer-color: m3-utils.color-with-opacity(
34
- map.get($system, on-surface), map.get($system, hover-state-layer-opacity)),
35
- menu-item-focus-state-layer-color: m3-utils.color-with-opacity(
36
- map.get($system, on-surface), map.get($system, focus-state-layer-opacity)),
37
- menu-container-color: map.get($system, surface),
38
- menu-divider-color: map.get($system, outline),
39
- );
40
- }
10
+ base: (
11
+ menu-container-shape: 4px,
12
+ menu-divider-bottom-spacing: 0,
13
+ menu-divider-top-spacing: 0,
14
+ menu-item-spacing: 16px,
15
+ menu-item-icon-size: 24px,
16
+ menu-item-leading-spacing: 16px,
17
+ menu-item-trailing-spacing: 16px,
18
+ menu-item-with-icon-leading-spacing: 16px,
19
+ menu-item-with-icon-trailing-spacing: 16px,
20
+ menu-container-elevation-shadow: elevation.get-box-shadow(8),
41
21
 
42
- // Tokens that can be configured through Angular Material's typography theming API.
43
- @function get-typography-tokens($theme) {
44
- $system: m2-utils.get-system($theme);
45
- @return (
46
- menu-item-label-text-font: map.get($system, body-large-font),
47
- menu-item-label-text-size: map.get($system, body-large-size),
48
- menu-item-label-text-tracking: map.get($system, body-large-tracking),
49
- menu-item-label-text-line-height: map.get($system, body-large-line-height),
50
- menu-item-label-text-weight: map.get($system, body-large-weight),
22
+ // Unused
23
+ menu-base-elevation-level: null,
24
+ ),
25
+ color: (
26
+ menu-item-label-text-color: map.get($system, on-surface),
27
+ menu-item-icon-color: map.get($system, on-surface),
28
+ menu-item-hover-state-layer-color: m3-utils.color-with-opacity(
29
+ map.get($system, on-surface), map.get($system, hover-state-layer-opacity)),
30
+ menu-item-focus-state-layer-color: m3-utils.color-with-opacity(
31
+ map.get($system, on-surface), map.get($system, focus-state-layer-opacity)),
32
+ menu-container-color: map.get($system, surface),
33
+ menu-divider-color: map.get($system, outline),
34
+ ),
35
+ typography: (
36
+ menu-item-label-text-font: map.get($system, body-large-font),
37
+ menu-item-label-text-size: map.get($system, body-large-size),
38
+ menu-item-label-text-tracking: map.get($system, body-large-tracking),
39
+ menu-item-label-text-line-height: map.get($system, body-large-line-height),
40
+ menu-item-label-text-weight: map.get($system, body-large-weight),
41
+ ),
42
+ density: (),
51
43
  );
52
44
  }
53
-
54
- // Tokens that can be configured through Angular Material's density theming API.
55
- @function get-density-tokens($theme) {
56
- @return ();
57
- }
@@ -6,7 +6,7 @@
6
6
  @use '../core/typography/typography';
7
7
 
8
8
  @mixin base($theme) {
9
- $tokens: m2-menu.get-unthemable-tokens();
9
+ $tokens: map.get(m2-menu.get-tokens($theme), base);
10
10
  @if inspection.get-theme-version($theme) == 1 {
11
11
  $tokens: map.get(m3-menu.get-tokens($theme), base);
12
12
  }
@@ -15,7 +15,7 @@
15
15
  }
16
16
 
17
17
  @mixin color($theme) {
18
- $tokens: m2-menu.get-color-tokens($theme);
18
+ $tokens: map.get(m2-menu.get-tokens($theme), color);
19
19
  @if inspection.get-theme-version($theme) == 1 {
20
20
  $tokens: map.get(m3-menu.get-tokens($theme), color);
21
21
  }
@@ -24,7 +24,7 @@
24
24
  }
25
25
 
26
26
  @mixin typography($theme) {
27
- $tokens: m2-menu.get-typography-tokens($theme);
27
+ $tokens: map.get(m2-menu.get-tokens($theme), typography);
28
28
  @if inspection.get-theme-version($theme) == 1 {
29
29
  $tokens: map.get(m3-menu.get-tokens($theme), typography);
30
30
  }
@@ -33,7 +33,7 @@
33
33
  }
34
34
 
35
35
  @mixin density($theme) {
36
- $tokens: m2-menu.get-density-tokens($theme);
36
+ $tokens: map.get(m2-menu.get-tokens($theme), density);
37
37
  @if inspection.get-theme-version($theme) == 1 {
38
38
  $tokens: map.get(m3-menu.get-tokens($theme), density);
39
39
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/material",
3
- "version": "20.1.0-next.2",
3
+ "version": "20.1.0",
4
4
  "description": "Angular Material",
5
5
  "repository": {
6
6
  "type": "git",
@@ -353,11 +353,11 @@
353
353
  }
354
354
  },
355
355
  "peerDependencies": {
356
- "@angular/cdk": "20.1.0-next.2",
357
- "@angular/core": "^20.0.0-0 || ^20.1.0-0 || ^20.2.0-0 || ^20.3.0-0 || ^21.0.0-0",
358
- "@angular/common": "^20.0.0-0 || ^20.1.0-0 || ^20.2.0-0 || ^20.3.0-0 || ^21.0.0-0",
359
- "@angular/forms": "^20.0.0-0 || ^20.1.0-0 || ^20.2.0-0 || ^20.3.0-0 || ^21.0.0-0",
360
- "@angular/platform-browser": "^20.0.0-0 || ^20.1.0-0 || ^20.2.0-0 || ^20.3.0-0 || ^21.0.0-0",
356
+ "@angular/cdk": "20.1.0",
357
+ "@angular/core": "^20.0.0 || ^21.0.0",
358
+ "@angular/common": "^20.0.0 || ^21.0.0",
359
+ "@angular/forms": "^20.0.0 || ^21.0.0",
360
+ "@angular/platform-browser": "^20.0.0 || ^21.0.0",
361
361
  "rxjs": "^6.5.3 || ^7.4.0"
362
362
  },
363
363
  "dependencies": {
@@ -1,75 +1,56 @@
1
1
  @use 'sass:math';
2
2
  @use 'sass:map';
3
3
  @use '../core/theming/theming';
4
- @use '../core/theming/inspection';
5
4
  @use '../core/tokens/m2-utils';
6
5
  @use '../core/tokens/m3-utils';
7
6
 
8
- // Tokens that can't be configured through Angular Material's current theming API,
9
- // but may be in a future version of the theming API.
10
- @function get-unthemable-tokens() {
11
- @return ();
12
- }
13
-
14
- // Tokens that can be configured through Angular Material's color theming API.
15
- @function get-color-tokens($theme) {
7
+ @function get-tokens($theme) {
16
8
  $system: m2-utils.get-system($theme);
9
+ $density-scale: theming.clamp-density(map.get($system, density-scale), -5);
17
10
 
18
- @return (
19
- paginator-container-text-color: map.get($system, on-surface),
20
- paginator-container-background-color: map.get($system, surface),
21
- paginator-enabled-icon-color: map.get($system, on-surface-variant),
22
- paginator-disabled-icon-color: m3-utils.color-with-opacity(map.get($system, on-surface), 38%),
23
- );
24
- }
25
-
26
- // Tokens that can be configured through Angular Material's typography theming API.
27
- @function get-typography-tokens($theme) {
28
- $system: m2-utils.get-system($theme);
29
- @return (
30
- paginator-container-text-font: map.get($system, body-small-font),
31
- paginator-container-text-line-height: map.get($system, body-small-line-height),
32
- paginator-container-text-size: map.get($system, body-small-size),
33
- paginator-container-text-tracking: map.get($system, body-small-tracking),
34
- paginator-container-text-weight: map.get($system, body-small-weight),
35
- paginator-select-trigger-text-size: map.get($system, body-small-size),
36
- );
37
- }
38
-
39
- // Tokens that can be configured through Angular Material's density theming API.
40
- @function get-density-tokens($theme) {
41
- $density-scale: theming.clamp-density(inspection.get-theme-density($theme), -5);
42
- $size-scale: (
43
- 0: 56px,
44
- -1: 52px,
45
- -2: 48px,
46
- -3: 40px,
47
- -4: 40px,
48
- -5: 40px,
49
- );
50
- $form-field-size-scale: (
11
+ $form-field-height: map.get((
51
12
  0: 56px,
52
13
  -1: 52px,
53
14
  -2: 48px,
54
15
  -3: 44px,
55
16
  -4: 40px,
56
17
  -5: 36px,
57
- );
58
- $form-field-density-scale: if($density-scale > -4, -4, $density-scale);
59
- $form-field-height: map.get($form-field-size-scale, $form-field-density-scale);
60
-
61
- // We computed the desired height of the form-field using the density configuration. The
62
- // spec only describes vertical spacing/alignment in non-dense mode. This means that we
63
- // cannot update the spacing to explicit numbers based on the density scale. Instead, we
64
- // determine the height reduction and equally subtract it from the default `top` and `bottom`
65
- // padding that is provided by the Material Design specification.
66
- $form-field-vertical-deduction: math.div(56px - $form-field-height, 2);
67
- $form-field-vertical-padding: 16px - $form-field-vertical-deduction;
18
+ ), if($density-scale > -4, -4, $density-scale));
68
19
 
69
20
  @return (
70
- paginator-container-size: map.get($size-scale, $density-scale),
71
- paginator-form-field-container-height: $form-field-height,
72
- paginator-form-field-container-vertical-padding: $form-field-vertical-padding,
73
- paginator-touch-target-display: if($density-scale < -2, none, block),
21
+ base: (),
22
+ color: (
23
+ paginator-container-text-color: map.get($system, on-surface),
24
+ paginator-container-background-color: map.get($system, surface),
25
+ paginator-enabled-icon-color: map.get($system, on-surface-variant),
26
+ paginator-disabled-icon-color: m3-utils.color-with-opacity(map.get($system, on-surface), 38%),
27
+ ),
28
+ typography: (
29
+ paginator-container-text-font: map.get($system, body-small-font),
30
+ paginator-container-text-line-height: map.get($system, body-small-line-height),
31
+ paginator-container-text-size: map.get($system, body-small-size),
32
+ paginator-container-text-tracking: map.get($system, body-small-tracking),
33
+ paginator-container-text-weight: map.get($system, body-small-weight),
34
+ paginator-select-trigger-text-size: map.get($system, body-small-size),
35
+ ),
36
+ density: (
37
+ paginator-container-size: map.get((
38
+ 0: 56px,
39
+ -1: 52px,
40
+ -2: 48px,
41
+ -3: 40px,
42
+ -4: 40px,
43
+ -5: 40px,
44
+ ), $density-scale),
45
+ paginator-form-field-container-height: $form-field-height,
46
+ // We computed the desired height of the form-field using the density configuration. The
47
+ // spec only describes vertical spacing/alignment in non-dense mode. This means that we
48
+ // cannot update the spacing to explicit numbers based on the density scale. Instead, we
49
+ // determine the height reduction and equally subtract it from the default `top` and `bottom`
50
+ // padding that is provided by the Material Design specification.
51
+ paginator-form-field-container-vertical-padding:
52
+ 16px - math.div(56px - $form-field-height, 2),
53
+ paginator-touch-target-display: if($density-scale < -2, none, block),
54
+ ),
74
55
  );
75
56
  }
@@ -2,7 +2,6 @@
2
2
  @use 'sass:list';
3
3
  @use '../core/tokens/m3-utils';
4
4
  @use '../core/theming/theming';
5
- @use '../core/theming/inspection';
6
5
  @use '../core/tokens/m3';
7
6
 
8
7
  /// Generates custom tokens for the mat-paginator.
@@ -25,7 +24,7 @@
25
24
  paginator-container-text-weight: map.get($system, body-small-weight),
26
25
  paginator-select-trigger-text-size: map.get($system, body-small-size),
27
26
  ),
28
- density: get-density-tokens(map.get($theme, inspection.$internals, density-scale)),
27
+ density: get-density-tokens(map.get($system, density-scale)),
29
28
  );
30
29
  }
31
30
 
@@ -6,7 +6,7 @@
6
6
  @use '../core/tokens/token-utils';
7
7
 
8
8
  @mixin base($theme) {
9
- $tokens: m2-paginator.get-unthemable-tokens();
9
+ $tokens: map.get(m2-paginator.get-tokens($theme), base);
10
10
  @if inspection.get-theme-version($theme) == 1 {
11
11
  $tokens: map.get(m3-paginator.get-tokens($theme), base);
12
12
  }
@@ -15,7 +15,7 @@
15
15
  }
16
16
 
17
17
  @mixin color($theme) {
18
- $tokens: m2-paginator.get-color-tokens($theme);
18
+ $tokens: map.get(m2-paginator.get-tokens($theme), color);
19
19
  @if inspection.get-theme-version($theme) == 1 {
20
20
  $tokens: map.get(m3-paginator.get-tokens($theme), color);
21
21
  }
@@ -24,7 +24,7 @@
24
24
  }
25
25
 
26
26
  @mixin typography($theme) {
27
- $tokens: m2-paginator.get-typography-tokens($theme);
27
+ $tokens: map.get(m2-paginator.get-tokens($theme), typography);
28
28
  @if inspection.get-theme-version($theme) == 1 {
29
29
  $tokens: map.get(m3-paginator.get-tokens($theme), typography);
30
30
  }
@@ -33,7 +33,7 @@
33
33
  }
34
34
 
35
35
  @mixin density($theme) {
36
- $tokens: m2-paginator.get-density-tokens($theme);
36
+ $tokens: map.get(m2-paginator.get-tokens($theme), density);
37
37
  @if inspection.get-theme-version($theme) == 1 {
38
38
  $tokens: map.get(m3-paginator.get-tokens($theme), density);
39
39
  }