@angular/material 20.0.0-next.9 → 20.0.0-rc.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 (188) hide show
  1. package/badge/_badge-theme.scss +27 -14
  2. package/badge/_m3-badge.scss +39 -67
  3. package/badge/index.d.ts +2 -2
  4. package/badge/testing/index.d.ts +1 -1
  5. package/{badge.d-D0iThVg0.d.ts → badge.d-Cn81aRz4.d.ts} +2 -2
  6. package/button/index.d.ts +4 -4
  7. package/button-toggle/_m3-button-toggle.scss +1 -1
  8. package/checkbox/index.d.ts +4 -4
  9. package/checkbox/testing/index.d.ts +1 -1
  10. package/chips/index.d.ts +2 -2
  11. package/chips/testing/index.d.ts +1 -1
  12. package/core/color/_all-color.scss +1 -1
  13. package/core/m2/_typography.scss +1 -1
  14. package/core/theming/_all-theme.scss +41 -0
  15. package/core/theming/_color-api-backwards-compatibility.scss +3 -6
  16. package/core/theming/_definition.scss +72 -72
  17. package/core/theming/_inspection.scss +24 -22
  18. package/core/theming/_theming.scss +2 -2
  19. package/core/tokens/_m3-system.scss +112 -69
  20. package/core/tokens/_m3-tokens.scss +30 -226
  21. package/core/tokens/_m3-utils.scss +35 -0
  22. package/core/tokens/_token-utils.scss +22 -1
  23. package/core/tokens/m3/_index.scss +6 -8
  24. package/core/tokens/m3/_md-sys-color.scss +125 -137
  25. package/core/tokens/m3/_md-sys-elevation.scss +7 -7
  26. package/core/tokens/m3/_md-sys-motion.scss +27 -38
  27. package/core/tokens/m3/_md-sys-shape.scss +13 -16
  28. package/core/tokens/m3/_md-sys-state.scss +5 -5
  29. package/core/tokens/m3/_md-sys-typescale.scss +107 -306
  30. package/datepicker/index.d.ts +6 -6
  31. package/dialog/index.d.ts +2 -2
  32. package/dialog/testing/index.d.ts +4 -4
  33. package/{dialog.d-DsYAn2Gk.d.ts → dialog.d-hlN3f-Hk.d.ts} +1 -1
  34. package/fesm2022/autocomplete.mjs +23 -23
  35. package/fesm2022/autocomplete.mjs.map +1 -1
  36. package/fesm2022/badge.mjs +14 -14
  37. package/fesm2022/badge.mjs.map +1 -1
  38. package/fesm2022/bottom-sheet.mjs +11 -11
  39. package/fesm2022/bottom-sheet.mjs.map +1 -1
  40. package/fesm2022/button-toggle.mjs +16 -16
  41. package/fesm2022/button-toggle.mjs.map +1 -1
  42. package/fesm2022/button.mjs +21 -21
  43. package/fesm2022/button.mjs.map +1 -1
  44. package/fesm2022/card.mjs +47 -47
  45. package/fesm2022/card.mjs.map +1 -1
  46. package/fesm2022/checkbox.mjs +13 -13
  47. package/fesm2022/checkbox.mjs.map +1 -1
  48. package/fesm2022/chips.mjs +49 -49
  49. package/fesm2022/chips.mjs.map +1 -1
  50. package/fesm2022/{common-module-DZl8g1kc.mjs → common-module-CF0eSYO4.mjs} +5 -5
  51. package/fesm2022/{common-module-DZl8g1kc.mjs.map → common-module-CF0eSYO4.mjs.map} +1 -1
  52. package/fesm2022/core.mjs +24 -24
  53. package/fesm2022/core.mjs.map +1 -1
  54. package/fesm2022/datepicker.mjs +94 -94
  55. package/fesm2022/datepicker.mjs.map +1 -1
  56. package/fesm2022/dialog/testing.mjs +2 -2
  57. package/fesm2022/dialog.mjs +2 -2
  58. package/fesm2022/divider.mjs +8 -8
  59. package/fesm2022/divider.mjs.map +1 -1
  60. package/fesm2022/{error-options-BWOa3B4G.mjs → error-options-CbAHLQL5.mjs} +7 -7
  61. package/fesm2022/{error-options-BWOa3B4G.mjs.map → error-options-CbAHLQL5.mjs.map} +1 -1
  62. package/fesm2022/expansion.mjs +27 -27
  63. package/fesm2022/expansion.mjs.map +1 -1
  64. package/fesm2022/{form-field-BZd6Vhww.mjs → form-field-sL9_TuE-.mjs} +70 -62
  65. package/fesm2022/form-field-sL9_TuE-.mjs.map +1 -0
  66. package/fesm2022/form-field.mjs +3 -3
  67. package/fesm2022/grid-list.mjs +24 -24
  68. package/fesm2022/grid-list.mjs.map +1 -1
  69. package/fesm2022/icon/testing.mjs +8 -8
  70. package/fesm2022/icon/testing.mjs.map +1 -1
  71. package/fesm2022/{icon-button-4VvBKIK4.mjs → icon-button-BASP1JI8.mjs} +12 -12
  72. package/fesm2022/icon-button-BASP1JI8.mjs.map +1 -0
  73. package/fesm2022/{icon-registry-Bk5cM8Z5.mjs → icon-registry-DVLYRZv3.mjs} +4 -4
  74. package/fesm2022/{icon-registry-Bk5cM8Z5.mjs.map → icon-registry-DVLYRZv3.mjs.map} +1 -1
  75. package/fesm2022/icon.mjs +12 -12
  76. package/fesm2022/icon.mjs.map +1 -1
  77. package/fesm2022/index-BNtCg9r0.mjs +22 -0
  78. package/fesm2022/{index-BHJ4tVIe.mjs.map → index-BNtCg9r0.mjs.map} +1 -1
  79. package/fesm2022/index-DxCSjCL3.mjs +20 -0
  80. package/fesm2022/{index-D2rZ0V78.mjs.map → index-DxCSjCL3.mjs.map} +1 -1
  81. package/fesm2022/input.mjs +12 -12
  82. package/fesm2022/input.mjs.map +1 -1
  83. package/fesm2022/{internal-form-field-DVvKYBKJ.mjs → internal-form-field-_OHaksOO.mjs} +4 -4
  84. package/fesm2022/{internal-form-field-DVvKYBKJ.mjs.map → internal-form-field-_OHaksOO.mjs.map} +1 -1
  85. package/fesm2022/{line-Dwrcg_t9.mjs → line-CtAKiRo6.mjs} +9 -9
  86. package/fesm2022/{line-Dwrcg_t9.mjs.map → line-CtAKiRo6.mjs.map} +1 -1
  87. package/fesm2022/list.mjs +59 -59
  88. package/fesm2022/list.mjs.map +1 -1
  89. package/fesm2022/menu.mjs +20 -20
  90. package/fesm2022/menu.mjs.map +1 -1
  91. package/fesm2022/{module-D-cNfopD.mjs → module-ChwDH6BC.mjs} +28 -28
  92. package/fesm2022/module-ChwDH6BC.mjs.map +1 -0
  93. package/fesm2022/{module-CTd5xD2i.mjs → module-DToxyW7l.mjs} +7 -7
  94. package/fesm2022/{module-CTd5xD2i.mjs.map → module-DToxyW7l.mjs.map} +1 -1
  95. package/fesm2022/{module-qRXgbi2L.mjs → module-DqTK2swA.mjs} +17 -17
  96. package/fesm2022/{module-qRXgbi2L.mjs.map → module-DqTK2swA.mjs.map} +1 -1
  97. package/fesm2022/{module-X29xYsIk.mjs → module-m5vWw9-5.mjs} +12 -12
  98. package/fesm2022/{module-X29xYsIk.mjs.map → module-m5vWw9-5.mjs.map} +1 -1
  99. package/fesm2022/{option-MOeehkAg.mjs → option-hkPAbXDN.mjs} +10 -10
  100. package/fesm2022/{option-MOeehkAg.mjs.map → option-hkPAbXDN.mjs.map} +1 -1
  101. package/fesm2022/paginator.mjs +27 -27
  102. package/fesm2022/paginator.mjs.map +1 -1
  103. package/fesm2022/progress-bar.mjs +10 -10
  104. package/fesm2022/progress-bar.mjs.map +1 -1
  105. package/fesm2022/progress-spinner.mjs +10 -10
  106. package/fesm2022/progress-spinner.mjs.map +1 -1
  107. package/fesm2022/{pseudo-checkbox-BFGIaGxz.mjs → pseudo-checkbox-Ddidc23S.mjs} +4 -4
  108. package/fesm2022/{pseudo-checkbox-BFGIaGxz.mjs.map → pseudo-checkbox-Ddidc23S.mjs.map} +1 -1
  109. package/fesm2022/pseudo-checkbox-module--am9-RIA.mjs +20 -0
  110. package/fesm2022/{pseudo-checkbox-module-Dxth-mPi.mjs.map → pseudo-checkbox-module--am9-RIA.mjs.map} +1 -1
  111. package/fesm2022/radio.mjs +19 -19
  112. package/fesm2022/radio.mjs.map +1 -1
  113. package/fesm2022/{ripple-CuyVtN3V.mjs → ripple-DUGA2BAa.mjs} +7 -7
  114. package/fesm2022/{ripple-CuyVtN3V.mjs.map → ripple-DUGA2BAa.mjs.map} +1 -1
  115. package/fesm2022/{ripple-loader-pOctSZby.mjs → ripple-loader-Xy4bv6Xh.mjs} +5 -5
  116. package/fesm2022/{ripple-loader-pOctSZby.mjs.map → ripple-loader-Xy4bv6Xh.mjs.map} +1 -1
  117. package/fesm2022/select.mjs +12 -12
  118. package/fesm2022/sidenav.mjs +23 -23
  119. package/fesm2022/sidenav.mjs.map +1 -1
  120. package/fesm2022/slide-toggle.mjs +13 -13
  121. package/fesm2022/slide-toggle.mjs.map +1 -1
  122. package/fesm2022/slider.mjs +23 -23
  123. package/fesm2022/slider.mjs.map +1 -1
  124. package/fesm2022/snack-bar.mjs +28 -28
  125. package/fesm2022/snack-bar.mjs.map +1 -1
  126. package/fesm2022/sort.mjs +15 -15
  127. package/fesm2022/sort.mjs.map +1 -1
  128. package/fesm2022/stepper.mjs +43 -43
  129. package/fesm2022/stepper.mjs.map +1 -1
  130. package/fesm2022/{structural-styles-CasigI3l.mjs → structural-styles-DA18Hchc.mjs} +4 -4
  131. package/fesm2022/{structural-styles-CasigI3l.mjs.map → structural-styles-DA18Hchc.mjs.map} +1 -1
  132. package/fesm2022/table.mjs +56 -56
  133. package/fesm2022/table.mjs.map +1 -1
  134. package/fesm2022/tabs.mjs +54 -54
  135. package/fesm2022/tabs.mjs.map +1 -1
  136. package/fesm2022/timepicker.mjs +20 -20
  137. package/fesm2022/timepicker.mjs.map +1 -1
  138. package/fesm2022/toolbar.mjs +13 -13
  139. package/fesm2022/toolbar.mjs.map +1 -1
  140. package/fesm2022/tooltip.mjs +2 -2
  141. package/fesm2022/tree.mjs +26 -26
  142. package/fesm2022/tree.mjs.map +1 -1
  143. package/form-field/index.d.ts +2 -2
  144. package/{form-field.d-b9aHrR4I.d.ts → form-field.d-C6p5uYjG.d.ts} +8 -6
  145. package/icon/index.d.ts +1 -1
  146. package/{icon-module.d-sA1hmRKS.d.ts → icon-module.d-COXCrhrh.d.ts} +4 -4
  147. package/input/index.d.ts +4 -4
  148. package/list/index.d.ts +4 -4
  149. package/{module.d-BGzxQfCs.d.ts → module.d-D1Ym5Wf2.d.ts} +1 -1
  150. package/{module.d-CH_8jCsD.d.ts → module.d-DMabQ4_c.d.ts} +2 -2
  151. package/package.json +2 -2
  152. package/paginator/index.d.ts +5 -5
  153. package/paginator/testing/index.d.ts +2 -2
  154. package/{paginator.d-3kymf0wo.d.ts → paginator.d-DuJ-oYgT.d.ts} +3 -3
  155. package/prebuilt-themes/azure-blue.css +1 -1
  156. package/prebuilt-themes/cyan-orange.css +1 -1
  157. package/prebuilt-themes/magenta-violet.css +1 -1
  158. package/prebuilt-themes/rose-red.css +1 -1
  159. package/progress-bar/index.d.ts +4 -4
  160. package/progress-spinner/index.d.ts +2 -2
  161. package/progress-spinner/testing/index.d.ts +1 -1
  162. package/{progress-spinner.d-DtYCWeYd.d.ts → progress-spinner.d-Lfz4Wh5x.d.ts} +4 -4
  163. package/radio/index.d.ts +6 -6
  164. package/radio/testing/index.d.ts +2 -2
  165. package/schematics/ng-add/index.js +1 -1
  166. package/schematics/ng-add/schema.json +4 -4
  167. package/schematics/ng-add/theming/create-custom-theme.js +1 -1
  168. package/schematics/ng-generate/theme-color/index_bundled.js +2 -2
  169. package/schematics/ng-generate/theme-color/index_bundled.js.map +1 -1
  170. package/schematics/ng-update/index_bundled.js +54 -2
  171. package/schematics/ng-update/index_bundled.js.map +1 -1
  172. package/select/index.d.ts +3 -3
  173. package/slide-toggle/index.d.ts +4 -4
  174. package/slide-toggle/testing/index.d.ts +1 -1
  175. package/slider/index.d.ts +3 -3
  176. package/stepper/index.d.ts +7 -7
  177. package/table/index.d.ts +2 -2
  178. package/tabs/index.d.ts +8 -8
  179. package/toolbar/index.d.ts +2 -2
  180. package/tree/testing/index.d.ts +1 -1
  181. package/core/tokens/m3/_md-ref-palette.scss +0 -100
  182. package/core/tokens/m3/_md-ref-typeface.scss +0 -14
  183. package/fesm2022/form-field-BZd6Vhww.mjs.map +0 -1
  184. package/fesm2022/icon-button-4VvBKIK4.mjs.map +0 -1
  185. package/fesm2022/index-BHJ4tVIe.mjs +0 -22
  186. package/fesm2022/index-D2rZ0V78.mjs +0 -20
  187. package/fesm2022/module-D-cNfopD.mjs.map +0 -1
  188. package/fesm2022/pseudo-checkbox-module-Dxth-mPi.mjs +0 -20
@@ -1,18 +1,22 @@
1
- @use 'sass:color';
2
- @use '../core/theming/theming';
1
+ @use '../core/style/sass-utils';
3
2
  @use '../core/theming/inspection';
3
+ @use '../core/theming/theming';
4
4
  @use '../core/theming/validation';
5
+ @use '../core/tokens/token-utils';
5
6
  @use '../core/typography/typography';
6
7
  @use './m2-badge';
7
- @use '../core/tokens/token-utils';
8
- @use '../core/style/sass-utils';
8
+ @use './m3-badge';
9
+ @use 'sass:color';
10
+ @use 'sass:map';
9
11
 
10
12
  /// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
11
13
  /// for the mat-badge.
12
14
  /// @param {Map} $theme The theme to generate base styles for.
13
15
  @mixin base($theme) {
14
16
  @if inspection.get-theme-version($theme) == 1 {
15
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
17
+ @include token-utils.create-token-values(
18
+ m3-badge.$prefix,
19
+ map.get(m3-badge.get-tokens($theme), base));
16
20
  } @else {
17
21
  @include sass-utils.current-selector-or-root() {
18
22
  @include token-utils.create-token-values-mixed(
@@ -25,12 +29,14 @@
25
29
 
26
30
  /// Outputs color theme styles for the mat-badge.
27
31
  /// @param {Map} $theme The theme to generate color styles for.
28
- /// @param {ArgList} Additional optional arguments (only supported for M3 themes):
29
- /// $color-variant: The color variant to use for the badge: primary, secondary, tertiary,
30
- /// or error (If not specified, default error color will be used).
31
- @mixin color($theme, $options...) {
32
+ /// @param {String} $color-variant The color variant to use for
33
+ /// the badge: primary, secondary, tertiary, or error (If not specified,
34
+ /// default error color will be used).
35
+ @mixin color($theme, $color-variant: null) {
32
36
  @if inspection.get-theme-version($theme) == 1 {
33
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
37
+ @include token-utils.create-token-values(
38
+ m3-badge.$prefix,
39
+ map.get(m3-badge.get-tokens($theme, $color-variant), color));
34
40
  } @else {
35
41
  @include sass-utils.current-selector-or-root() {
36
42
  @include token-utils.create-token-values-mixed(
@@ -59,7 +65,9 @@
59
65
  /// @param {Map} $theme The theme to generate typography styles for.
60
66
  @mixin typography($theme) {
61
67
  @if inspection.get-theme-version($theme) == 1 {
62
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
68
+ @include token-utils.create-token-values(
69
+ m3-badge.$prefix,
70
+ map.get(m3-badge.get-tokens($theme), typography));
63
71
  } @else {
64
72
  @include sass-utils.current-selector-or-root() {
65
73
  @include token-utils.create-token-values-mixed(
@@ -74,7 +82,9 @@
74
82
  /// @param {Map} $theme The theme to generate density styles for.
75
83
  @mixin density($theme) {
76
84
  @if inspection.get-theme-version($theme) == 1 {
77
- // There are no M3 density tokens for this component
85
+ @include token-utils.create-token-values(
86
+ m3-badge.$prefix,
87
+ map.get(m3-badge.get-tokens($theme), density));
78
88
  } @else {
79
89
  }
80
90
  }
@@ -100,10 +110,13 @@
100
110
  /// @param {ArgList} Additional optional arguments (only supported for M3 themes):
101
111
  /// $color-variant: The color variant to use for the badge: primary, secondary, tertiary,
102
112
  /// or error (If not specified, default error color will be used).
103
- @mixin theme($theme, $options...) {
113
+ @mixin theme($theme, $color-variant: null) {
104
114
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-badge') {
105
115
  @if inspection.get-theme-version($theme) == 1 {
106
- @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);
116
+ @include base($theme);
117
+ @include color($theme, $color-variant);
118
+ @include density($theme);
119
+ @include typography($theme);
107
120
  } @else {
108
121
  @include base($theme);
109
122
  @if inspection.theme-has($theme, color) {
@@ -1,81 +1,53 @@
1
1
  @use 'sass:map';
2
- @use '../core/style/sass-utils';
3
2
  @use '../core/tokens/m3-utils';
4
3
 
5
4
  // The prefix used to generate the fully qualified name for tokens in this file.
6
5
  $prefix: (mat, badge);
7
6
 
8
7
  /// Generates custom tokens for the mat-badge.
9
- /// @param {Map} $systems The MDC system tokens
10
- /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
11
- /// @param {Map} $token-slots Possible token slots
12
- /// @return {Map} A set of custom tokens for the mat-badge
13
- @function get-tokens($systems, $exclude-hardcoded, $token-slots) {
14
- $tokens: (
15
- background-color: map.get($systems, md-sys-color, error),
16
- text-color: map.get($systems, md-sys-color, on-error),
17
- disabled-state-background-color: sass-utils.safe-color-change(
18
- map.get($systems, md-sys-color, error),
19
- $alpha: 0.38),
20
- disabled-state-text-color: map.get($systems, md-sys-color, on-error),
21
- text-font: map.get($systems, md-sys-typescale, label-small-font),
22
- text-size: map.get($systems, md-sys-typescale, label-small-size),
23
- text-weight: map.get($systems, md-sys-typescale, label-small-weight),
24
- small-size-text-size: m3-utils.hardcode(0, $exclude-hardcoded),
25
- container-shape: map.get($systems, md-sys-shape, corner-full),
26
- container-size: m3-utils.hardcode(16px, $exclude-hardcoded),
27
- line-height: m3-utils.hardcode(16px, $exclude-hardcoded),
28
- legacy-container-size: m3-utils.hardcode(unset, $exclude-hardcoded),
29
- legacy-small-size-container-size: m3-utils.hardcode(unset, $exclude-hardcoded),
30
- small-size-container-size: m3-utils.hardcode(6px, $exclude-hardcoded),
31
- small-size-line-height: m3-utils.hardcode(6px, $exclude-hardcoded),
32
- container-padding: m3-utils.hardcode(0 4px, $exclude-hardcoded),
33
- small-size-container-padding: m3-utils.hardcode(0, $exclude-hardcoded),
34
- container-offset: m3-utils.hardcode(-12px 0, $exclude-hardcoded),
35
- small-size-container-offset: m3-utils.hardcode(-6px 0, $exclude-hardcoded),
36
- container-overlap-offset: m3-utils.hardcode(-12px, $exclude-hardcoded),
37
- small-size-container-overlap-offset: m3-utils.hardcode(-6px, $exclude-hardcoded),
38
-
39
- // This size isn't in the M3 spec so we emit the same values as for `medium`.
40
- large-size-container-size: m3-utils.hardcode(16px, $exclude-hardcoded),
41
- large-size-line-height: m3-utils.hardcode(16px, $exclude-hardcoded),
42
- large-size-container-offset: m3-utils.hardcode(-12px 0, $exclude-hardcoded),
43
- large-size-container-overlap-offset: m3-utils.hardcode(-12px, $exclude-hardcoded),
44
- large-size-text-size: map.get($systems, md-sys-typescale, label-small-size),
45
- large-size-container-padding: m3-utils.hardcode(0 4px, $exclude-hardcoded),
46
- legacy-large-size-container-size: m3-utils.hardcode(unset, $exclude-hardcoded),
47
- );
8
+ @function get-tokens($theme, $color-variant: null) {
9
+ $system: m3-utils.get-system($theme);
10
+ @if $color-variant {
11
+ $system: m3-utils.replace-colors-with-variant($system, error, $color-variant);
12
+ }
48
13
 
49
- $variant-tokens: (
50
- primary: (
51
- background-color: map.get($systems, md-sys-color, primary),
52
- text-color: map.get($systems, md-sys-color, on-primary),
53
- disabled-state-background-color: sass-utils.safe-color-change(
54
- map.get($systems, md-sys-color, primary),
55
- $alpha: 0.38,
56
- ),
57
- disabled-state-text-color: map.get($systems, md-sys-color, on-primary),
14
+ $tokens: (
15
+ base: (
16
+ container-shape: map.get($system, corner-full),
17
+ container-size: 16px,
18
+ legacy-container-size: unset,
19
+ legacy-small-size-container-size: unset,
20
+ small-size-container-size: 6px,
21
+ container-padding: 0 4px,
22
+ small-size-container-padding: 0,
23
+ container-offset: -12px 0,
24
+ small-size-container-offset: -6px 0,
25
+ container-overlap-offset: -12px,
26
+ small-size-container-overlap-offset: -6px,
27
+ large-size-container-size: 16px,
28
+ large-size-container-offset: -12px 0,
29
+ large-size-container-overlap-offset: -12px,
30
+ large-size-container-padding: 0 4px,
31
+ legacy-large-size-container-size: unset,
58
32
  ),
59
- secondary: (
60
- background-color: map.get($systems, md-sys-color, secondary),
61
- text-color: map.get($systems, md-sys-color, on-secondary),
62
- disabled-state-background-color: sass-utils.safe-color-change(
63
- map.get($systems, md-sys-color, secondary),
64
- $alpha: 0.38,
65
- ),
66
- disabled-state-text-color: map.get($systems, md-sys-color, on-secondary),
33
+ color: (
34
+ background-color: map.get($system, error),
35
+ text-color: map.get($system, on-error),
36
+ disabled-state-background-color: m3-utils.color-with-opacity(map.get($system, error), 38%),
37
+ disabled-state-text-color: map.get($system, on-error),
67
38
  ),
68
- tertiary: (
69
- background-color: map.get($systems, md-sys-color, tertiary),
70
- text-color: map.get($systems, md-sys-color, on-tertiary),
71
- disabled-state-background-color: sass-utils.safe-color-change(
72
- map.get($systems, md-sys-color, tertiary),
73
- $alpha: 0.38,
74
- ),
75
- disabled-state-text-color: map.get($systems, md-sys-color, on-tertiary),
39
+ typography: (
40
+ text-font: map.get($system, label-small-font),
41
+ text-size: map.get($system, label-small-size),
42
+ text-weight: map.get($system, label-small-weight),
43
+ large-size-text-size: map.get($system, label-small-size),
44
+ small-size-text-size: 0,
45
+ line-height: 16px,
46
+ small-size-line-height: 6px,
47
+ large-size-line-height: 16px,
76
48
  ),
77
- error: () // Default, no overrides needed
49
+ density: (),
78
50
  );
79
51
 
80
- @return m3-utils.namespace($prefix, ($tokens, $variant-tokens), $token-slots);
52
+ @return $tokens;
81
53
  }
package/badge/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import * as i1 from '@angular/cdk/a11y';
3
3
  import { M as MatCommonModule } from '../common-module.d-C8xzHJDr.js';
4
- import { M as MatBadge, _ as _MatBadgeStyleLoader } from '../badge.d-D0iThVg0.js';
5
- export { a as MatBadgePosition, b as MatBadgeSize } from '../badge.d-D0iThVg0.js';
4
+ import { M as MatBadge, _ as _MatBadgeStyleLoader } from '../badge.d-Cn81aRz4.js';
5
+ export { a as MatBadgePosition, b as MatBadgeSize } from '../badge.d-Cn81aRz4.js';
6
6
  import '@angular/cdk/bidi';
7
7
  import '../palette.d-BSSFKjO6.js';
8
8
 
@@ -1,5 +1,5 @@
1
1
  import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
2
- import { a as MatBadgePosition, b as MatBadgeSize } from '../../badge.d-D0iThVg0.js';
2
+ import { a as MatBadgePosition, b as MatBadgeSize } from '../../badge.d-Cn81aRz4.js';
3
3
  import '@angular/core';
4
4
  import '../../palette.d-BSSFKjO6.js';
5
5
 
@@ -24,10 +24,10 @@ declare class MatBadge implements OnInit, OnDestroy {
24
24
  private _idGenerator;
25
25
  /**
26
26
  * Theme color of the badge. This API is supported in M2 themes only, it
27
- * has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/badge/styling.
27
+ * has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/badge/styling.
28
28
  *
29
29
  * For information on applying color variants in M3, see
30
- * https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
30
+ * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
31
31
  */
32
32
  get color(): ThemePalette;
33
33
  set color(value: ThemePalette);
package/button/index.d.ts CHANGED
@@ -45,10 +45,10 @@ declare class MatButtonBase implements AfterViewInit, OnDestroy {
45
45
  protected _isFab: boolean;
46
46
  /**
47
47
  * Theme color of the button. This API is supported in M2 themes only, it has
48
- * no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/button/styling.
48
+ * no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/button/styling.
49
49
  *
50
50
  * For information on applying color variants in M3, see
51
- * https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
51
+ * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
52
52
  */
53
53
  color?: string | null;
54
54
  /** Whether the ripple effect is disabled or not. */
@@ -129,10 +129,10 @@ type MatAnchor = MatButton;
129
129
  interface MatFabDefaultOptions {
130
130
  /**
131
131
  * Default theme color of the button. This API is supported in M2 themes
132
- * only, it has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/button/styling.
132
+ * only, it has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/button/styling.
133
133
  *
134
134
  * For information on applying color variants in M3, see
135
- * https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants.
135
+ * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants.
136
136
  */
137
137
  color?: ThemePalette;
138
138
  }
@@ -17,7 +17,7 @@ $prefix: (mat, button-toggle);
17
17
  $tokens: sass-utils.merge-all(
18
18
  m3-utils.generate-typography-tokens($systems, label-text, label-large),
19
19
  (
20
- shape: map.get($systems, md-sys-shape, corner-full),
20
+ shape: map.get($systems, md-sys-shape, corner-extra-large),
21
21
  hover-state-layer-opacity: map.get($systems, md-sys-state, hover-state-layer-opacity),
22
22
  focus-state-layer-opacity: map.get($systems, md-sys-state, focus-state-layer-opacity),
23
23
  text-color: map.get($systems, md-sys-color, on-surface),
@@ -96,10 +96,10 @@ declare class MatCheckbox implements AfterViewInit, OnChanges, ControlValueAcces
96
96
  tabIndex: number;
97
97
  /**
98
98
  * Theme color of the checkbox. This API is supported in M2 themes only, it
99
- * has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/checkbox/styling.
99
+ * has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/checkbox/styling.
100
100
  *
101
101
  * For information on applying color variants in M3, see
102
- * https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
102
+ * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
103
103
  */
104
104
  color: string | undefined;
105
105
  /** Whether the checkbox should remain interactive when it is disabled. */
@@ -185,10 +185,10 @@ declare class MatCheckbox implements AfterViewInit, OnChanges, ControlValueAcces
185
185
  interface MatCheckboxDefaultOptions {
186
186
  /**
187
187
  * Default theme color of the checkbox. This API is supported in M2 themes
188
- * only, it has no effect in M3 themes. For color customization in M3, see https://material.angular.io/components/checkbox/styling.
188
+ * only, it has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/checkbox/styling.
189
189
  *
190
190
  * For information on applying color variants in M3, see
191
- * https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
191
+ * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
192
192
  */
193
193
  color?: ThemePalette;
194
194
  /** Default checkbox click action for checkboxes. */
@@ -16,7 +16,7 @@ interface CheckboxHarnessFilters extends BaseHarnessFilters {
16
16
  /** Harness for interacting with a mat-checkbox in tests. */
17
17
  declare class MatCheckboxHarness extends ComponentHarness {
18
18
  static hostSelector: string;
19
- _input: _angular_cdk_testing.AsyncFactoryFn<_angular_cdk_testing.TestElement>;
19
+ _input: () => Promise<_angular_cdk_testing.TestElement>;
20
20
  private _label;
21
21
  private _inputContainer;
22
22
  /**
package/chips/index.d.ts CHANGED
@@ -155,10 +155,10 @@ declare class MatChip implements OnInit, AfterViewInit, AfterContentInit, DoChec
155
155
  protected _value: any;
156
156
  /**
157
157
  * Theme color of the chip. This API is supported in M2 themes only, it has no
158
- * effect in M3 themes. For color customization in M3, see https://material.angular.io/components/chips/styling.
158
+ * effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/chips/styling.
159
159
  *
160
160
  * For information on applying color variants in M3, see
161
- * https://material.angular.io/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
161
+ * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants
162
162
  */
163
163
  color?: string | null;
164
164
  /**
@@ -66,7 +66,7 @@ declare class MatChipRemoveHarness extends ComponentHarness {
66
66
 
67
67
  /** Harness for interacting with a mat-chip in tests. */
68
68
  declare class MatChipHarness extends ContentContainerComponentHarness {
69
- protected _primaryAction: _angular_cdk_testing.AsyncFactoryFn<_angular_cdk_testing.TestElement>;
69
+ protected _primaryAction: () => Promise<_angular_cdk_testing.TestElement>;
70
70
  static hostSelector: string;
71
71
  /**
72
72
  * Gets a `HarnessPredicate` that can be used to search for a chip with specific attributes.
@@ -7,7 +7,7 @@
7
7
  @error 'No color configuration specified.';
8
8
  }
9
9
 
10
- @include all-theme.all-component-themes(
10
+ @include all-theme.all-component-colors(
11
11
  inspection.theme-remove($theme, base, typography, density));
12
12
  }
13
13
 
@@ -178,7 +178,7 @@ $_mdc-levels: (
178
178
  /// @param {Map} $input Configuration for the "input" typographic level.
179
179
  /// @returns {Map} A typography config for the application.
180
180
  ///
181
- /// @deprecated Use `mat.m2-define-typography-config` instead. See https://v17.material.angular.io/guide/mdc-migration for information about migrating.
181
+ /// @deprecated Use `mat.m2-define-typography-config` instead. See https://v17.material.angular.dev/guide/mdc-migration for information about migrating.
182
182
  /// @breaking-change 17.0.0
183
183
  @function define-legacy-typography-config(
184
184
  $font-family: 'Roboto, "Helvetica Neue", sans-serif',
@@ -125,6 +125,47 @@
125
125
  @include timepicker-theme.base($theme);
126
126
  }
127
127
 
128
+ @mixin all-component-colors($theme) {
129
+ @include core-theme.color($theme);
130
+ @include card-theme.color($theme);
131
+ @include progress-bar-theme.color($theme);
132
+ @include tooltip-theme.color($theme);
133
+ @include form-field-theme.color($theme);
134
+ @include input-theme.color($theme);
135
+ @include select-theme.color($theme);
136
+ @include autocomplete-theme.color($theme);
137
+ @include dialog-theme.color($theme);
138
+ @include chips-theme.color($theme);
139
+ @include slide-toggle-theme.color($theme);
140
+ @include radio-theme.color($theme);
141
+ @include slider-theme.color($theme);
142
+ @include menu-theme.color($theme);
143
+ @include list-theme.color($theme);
144
+ @include paginator-theme.color($theme);
145
+ @include tabs-theme.color($theme);
146
+ @include checkbox-theme.color($theme);
147
+ @include button-theme.color($theme);
148
+ @include icon-button-theme.color($theme);
149
+ @include fab-theme.color($theme);
150
+ @include snack-bar-theme.color($theme);
151
+ @include table-theme.color($theme);
152
+ @include progress-spinner-theme.color($theme);
153
+ @include badge-theme.color($theme);
154
+ @include bottom-sheet-theme.color($theme);
155
+ @include button-toggle-theme.color($theme);
156
+ @include datepicker-theme.color($theme);
157
+ @include divider-theme.color($theme);
158
+ @include expansion-theme.color($theme);
159
+ @include grid-list-theme.color($theme);
160
+ @include icon-theme.color($theme);
161
+ @include sidenav-theme.color($theme);
162
+ @include stepper-theme.color($theme);
163
+ @include sort-theme.color($theme);
164
+ @include toolbar-theme.color($theme);
165
+ @include tree-theme.color($theme);
166
+ @include timepicker-theme.color($theme);
167
+ }
168
+
128
169
  // @deprecated Use `all-component-themes`.
129
170
  @mixin angular-material-theme($theme) {
130
171
  @include all-component-themes($theme);
@@ -119,23 +119,20 @@ $_overrides-only: true;
119
119
  @include _color-variant-styles($theme, primary);
120
120
  }
121
121
  .mat-badge {
122
- @include badge-theme.color($theme, $color-variant: primary,
123
- $emit-overrides-only: $_overrides-only);
122
+ @include badge-theme.color($theme, $color-variant: primary);
124
123
  }
125
124
 
126
125
  .mat-accent {
127
126
  @include _color-variant-styles($theme, tertiary);
128
127
  }
129
128
  .mat-badge-accent {
130
- @include badge-theme.color($theme, $color-variant: tertiary,
131
- $emit-overrides-only: $_overrides-only);
129
+ @include badge-theme.color($theme, $color-variant: tertiary);
132
130
  }
133
131
 
134
132
  .mat-warn {
135
133
  @include _color-variant-styles($theme, error);
136
134
  }
137
135
  .mat-badge-warn {
138
- @include badge-theme.color($theme, $color-variant: error,
139
- $emit-overrides-only: $_overrides-only);
136
+ @include badge-theme.color($theme, $color-variant: error);
140
137
  }
141
138
  }
@@ -5,6 +5,7 @@
5
5
  @use './palettes';
6
6
  @use '../tokens/m3-tokens';
7
7
  @use './config-validation';
8
+ @use '../tokens/m3';
8
9
 
9
10
  // Prefix used for component token fallback variables, e.g.
10
11
  // `color: var(--mat-text-button-label-text-color, var(--mat-sys-primary));`
@@ -18,6 +19,7 @@ $system-level-prefix: mat-sys;
18
19
 
19
20
  /// Map key used to store internals of theme config.
20
21
  $internals: _mat-theming-internals-do-not-access;
22
+
21
23
  /// The theme version of generated themes.
22
24
  $theme-version: 1;
23
25
 
@@ -30,97 +32,95 @@ $theme-version: 1;
30
32
  @error $err;
31
33
  }
32
34
 
33
- @return sass-utils.deep-merge-all(
34
- define-colors(map.get($config, color) or ()),
35
- define-typography(map.get($config, typography) or ()),
36
- define-density(map.get($config, density) or ()),
37
- ($internals: (base-tokens: m3-tokens.generate-base-tokens())),
35
+ $color-config: map.get($config, color) or ();
36
+ $typography-config: map.get($config, typography) or ();
37
+ $density-config: map.get($config, density) or ();
38
+
39
+ // colors
40
+ $type: map.get($color-config, theme-type) or light;
41
+ $primary: map.get($color-config, primary) or palettes.$violet-palette;
42
+ $tertiary: map.get($color-config, tertiary) or $primary;
43
+ $color-system-variables-prefix:
44
+ map.get($color-config, system-variables-prefix) or $system-level-prefix;
45
+ sass-utils.$use-system-color-variables: map.get($color-config, use-system-variables) or false;
46
+
47
+ $palettes: (
48
+ primary: map.remove($primary, neutral, neutral-variant, secondary),
49
+ secondary: map.get($primary, secondary),
50
+ tertiary: map.remove($tertiary, neutral, neutral-variant, secondary, error),
51
+ neutral: map.get($primary, neutral),
52
+ neutral-variant: map.get($primary, neutral-variant),
53
+ error: map.get($primary, error),
38
54
  );
39
- }
40
55
 
41
- /// Defines an Angular Material theme object with color settings.
42
- /// @param {Map} $config The color configuration
43
- /// @return {Map} A theme object
44
- @function define-colors($config: ()) {
45
- $err: config-validation.validate-color-config($config);
46
- @if $err {
47
- @error $err;
48
- }
56
+ // typography
57
+ $default-plain: (Roboto, sans-serif);
58
+ $default-brand: $default-plain;
59
+ $plain: map.get($typography-config, plain-family) or $default-plain;
60
+ $brand: map.get($typography-config, brand-family) or $default-brand;
61
+ $bold: map.get($typography-config, bold-weight) or 700;
62
+ $medium: map.get($typography-config, medium-weight) or 500;
63
+ $regular: map.get($typography-config, regular-weight) or 400;
64
+ $typography-system-variables-prefix: map.get($typography-config, system-variables-prefix) or
65
+ $system-level-prefix;
66
+ sass-utils.$use-system-typography-variables:
67
+ map.get($typography-config, use-system-variables) or false;
68
+ $typography: (
69
+ plain: $plain,
70
+ brand: $brand,
71
+ bold: $bold,
72
+ medium: $medium,
73
+ regular: $regular,
74
+ );
49
75
 
50
- $type: map.get($config, theme-type) or light;
51
- $primary: map.get($config, primary) or palettes.$violet-palette;
52
- $tertiary: map.get($config, tertiary) or $primary;
53
- $system-variables-prefix: map.get($config, system-variables-prefix) or $system-level-prefix;
54
- sass-utils.$use-system-color-variables: map.get($config, use-system-variables) or false;
76
+ // density
77
+ $density-scale: map.get($density-config, scale) or 0;
55
78
 
56
79
  @return (
57
80
  $internals: (
58
- theme-version: $theme-version,
81
+ base-tokens: m3-tokens.generate-base-tokens(),
82
+ color-system-variables-prefix: $color-system-variables-prefix,
83
+ color-tokens:
84
+ m3-tokens.generate-color-tokens($type, $palettes, $color-system-variables-prefix),
85
+ density-scale: $density-scale,
86
+ font-definition: $typography,
87
+ md-sys-color: m3-tokens.get-sys-color($type, $palettes, $color-system-variables-prefix),
88
+ md-sys-elevation: m3.md-sys-elevation-values(),
89
+ md-sys-motion: m3.md-sys-motion-values(),
90
+ md-sys-shape: m3.md-sys-shape-values(),
91
+ md-sys-state: m3.md-sys-state-values(),
92
+ md-sys-typescale:
93
+ m3-tokens.get-sys-typeface($typography, $typography-system-variables-prefix),
94
+ palettes: $palettes,
59
95
  theme-type: $type,
60
- palettes: (
61
- primary: map.remove($primary, neutral, neutral-variant, secondary),
62
- secondary: map.get($primary, secondary),
63
- tertiary: map.remove($tertiary, neutral, neutral-variant, secondary),
64
- neutral: map.get($primary, neutral),
65
- neutral-variant: map.get($primary, neutral-variant),
66
- error: map.get($primary, error),
67
- ),
68
- color-system-variables-prefix: $system-variables-prefix,
69
- color-tokens: m3-tokens.generate-color-tokens(
70
- $type, $primary, $tertiary, map.get($primary, error), $system-variables-prefix)
96
+ theme-version: $theme-version,
97
+ typography-system-variables-prefix: $typography-system-variables-prefix,
98
+ typography-tokens:
99
+ m3-tokens.generate-typography-tokens($typography, $typography-system-variables-prefix),
71
100
  )
72
101
  );
73
102
  }
74
103
 
104
+ /// Defines an Angular Material theme object with color settings.
105
+ /// @param {Map} $config The color configuration
106
+ /// @return {Map} A theme object
107
+ /// @deprecated Use define-theme with a map using the "color" key
108
+ @function define-colors($config: ()) {
109
+ @return define-theme((color: $config));
110
+ }
111
+
75
112
  /// Defines an Angular Material theme object with typography settings.
76
113
  /// @param {Map} $config The typography configuration
77
114
  /// @return {Map} A theme object
115
+ /// @deprecated Use define-theme with a map using the "typography" key
78
116
  @function define-typography($config: ()) {
79
- $err: config-validation.validate-typography-config($config);
80
- @if $err {
81
- @error $err;
82
- }
83
-
84
- $plain: map.get($config, plain-family) or (Roboto, sans-serif);
85
- $brand: map.get($config, brand-family) or $plain;
86
- $bold: map.get($config, bold-weight) or 700;
87
- $medium: map.get($config, medium-weight) or 500;
88
- $regular: map.get($config, regular-weight) or 400;
89
- $system-variables-prefix: map.get($config, system-variables-prefix) or $system-level-prefix;
90
- sass-utils.$use-system-typography-variables: map.get($config, use-system-variables) or false;
91
-
92
- @return (
93
- $internals: (
94
- theme-version: $theme-version,
95
- font-definition: (
96
- plain: $plain,
97
- brand: $brand,
98
- bold: $bold,
99
- medium: $medium,
100
- regular: $regular,
101
- ),
102
- typography-system-variables-prefix: $system-variables-prefix,
103
- typography-tokens: m3-tokens.generate-typography-tokens(
104
- $brand, $plain, $bold, $medium, $regular, $system-variables-prefix)
105
- )
106
- );
117
+ @return define-theme((typography: $config));
107
118
  }
108
119
 
109
120
  /// Defines an Angular Material theme object with density settings.
110
121
  /// @param {Map} $config The density configuration
111
122
  /// @return {Map} A theme object
123
+ /// @deprecated Use define-theme with a map using the "density" key
112
124
  @function define-density($config: ()) {
113
- $err: config-validation.validate-density-config($config);
114
- @if $err {
115
- @error $err;
116
- }
117
-
118
- $density-scale: map.get($config, scale) or 0;
119
-
120
- @return (
121
- $internals: (
122
- theme-version: $theme-version,
123
- density-scale: $density-scale,
124
- )
125
- );
125
+ @return define-theme((density: $config));
126
126
  }