@angular/material 19.0.0-next.8 → 19.0.0-rc.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 (229) hide show
  1. package/_index.scss +1 -2
  2. package/autocomplete/_autocomplete-theme.scss +37 -24
  3. package/autocomplete/index.d.ts +5 -6
  4. package/badge/_badge-theme.scss +38 -24
  5. package/bottom-sheet/_bottom-sheet-theme.scss +32 -20
  6. package/button/_button-theme.scss +229 -105
  7. package/button/_fab-theme.scss +95 -44
  8. package/button/_icon-button-theme.scss +38 -25
  9. package/button/index.d.ts +3 -3
  10. package/button-toggle/_button-toggle-theme.scss +62 -37
  11. package/card/_card-theme.scss +79 -38
  12. package/card/index.d.ts +2 -3
  13. package/checkbox/_checkbox-theme.scss +16 -10
  14. package/chips/_chips-theme.scss +64 -30
  15. package/core/_core-theme.scss +55 -37
  16. package/core/_core.scss +3 -6
  17. package/core/option/_optgroup-theme.scss +29 -18
  18. package/core/option/_option-theme.scss +34 -21
  19. package/core/ripple/_ripple-theme.scss +33 -21
  20. package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +49 -23
  21. package/core/theming/_config-validation.scss +4 -4
  22. package/core/theming/_definition.scss +12 -2
  23. package/core/tokens/_m3-system.scss +86 -42
  24. package/core/tokens/_token-utils.scss +91 -34
  25. package/core/tokens/m2/mat/_badge.scss +12 -3
  26. package/core/tokens/m2/mdc/_radio.scss +1 -1
  27. package/core/tokens/m3/definitions/_md-comp-elevated-card.scss +1 -1
  28. package/core/tokens/m3/mat/_badge.scss +6 -3
  29. package/datepicker/_datepicker-theme.scss +53 -32
  30. package/datepicker/index.d.ts +33 -34
  31. package/dialog/_dialog-theme.scss +46 -23
  32. package/divider/_divider-theme.scss +28 -17
  33. package/expansion/_expansion-theme.scss +36 -24
  34. package/fesm2022/autocomplete/testing.mjs +2 -5
  35. package/fesm2022/autocomplete/testing.mjs.map +1 -1
  36. package/fesm2022/autocomplete.mjs +225 -148
  37. package/fesm2022/autocomplete.mjs.map +1 -1
  38. package/fesm2022/badge/testing.mjs +2 -5
  39. package/fesm2022/badge/testing.mjs.map +1 -1
  40. package/fesm2022/badge.mjs +45 -35
  41. package/fesm2022/badge.mjs.map +1 -1
  42. package/fesm2022/bottom-sheet/testing.mjs +1 -1
  43. package/fesm2022/bottom-sheet/testing.mjs.map +1 -1
  44. package/fesm2022/bottom-sheet.mjs +80 -58
  45. package/fesm2022/bottom-sheet.mjs.map +1 -1
  46. package/fesm2022/button/testing.mjs +2 -2
  47. package/fesm2022/button/testing.mjs.map +1 -1
  48. package/fesm2022/button-toggle/testing.mjs +4 -7
  49. package/fesm2022/button-toggle/testing.mjs.map +1 -1
  50. package/fesm2022/button-toggle.mjs +82 -45
  51. package/fesm2022/button-toggle.mjs.map +1 -1
  52. package/fesm2022/button.mjs +106 -79
  53. package/fesm2022/button.mjs.map +1 -1
  54. package/fesm2022/card/testing.mjs +3 -6
  55. package/fesm2022/card/testing.mjs.map +1 -1
  56. package/fesm2022/card.mjs +56 -69
  57. package/fesm2022/card.mjs.map +1 -1
  58. package/fesm2022/checkbox/testing.mjs +4 -7
  59. package/fesm2022/checkbox/testing.mjs.map +1 -1
  60. package/fesm2022/checkbox.mjs +104 -62
  61. package/fesm2022/checkbox.mjs.map +1 -1
  62. package/fesm2022/chips/testing.mjs +11 -14
  63. package/fesm2022/chips/testing.mjs.map +1 -1
  64. package/fesm2022/chips.mjs +322 -276
  65. package/fesm2022/chips.mjs.map +1 -1
  66. package/fesm2022/core/testing.mjs +5 -11
  67. package/fesm2022/core/testing.mjs.map +1 -1
  68. package/fesm2022/core.mjs +242 -187
  69. package/fesm2022/core.mjs.map +1 -1
  70. package/fesm2022/datepicker/testing.mjs +13 -22
  71. package/fesm2022/datepicker/testing.mjs.map +1 -1
  72. package/fesm2022/datepicker.mjs +827 -582
  73. package/fesm2022/datepicker.mjs.map +1 -1
  74. package/fesm2022/dialog/testing.mjs +15 -10
  75. package/fesm2022/dialog/testing.mjs.map +1 -1
  76. package/fesm2022/dialog.mjs +221 -156
  77. package/fesm2022/dialog.mjs.map +1 -1
  78. package/fesm2022/divider/testing.mjs +1 -1
  79. package/fesm2022/divider/testing.mjs.map +1 -1
  80. package/fesm2022/divider.mjs +10 -12
  81. package/fesm2022/divider.mjs.map +1 -1
  82. package/fesm2022/expansion/testing.mjs +7 -10
  83. package/fesm2022/expansion/testing.mjs.map +1 -1
  84. package/fesm2022/expansion.mjs +86 -80
  85. package/fesm2022/expansion.mjs.map +1 -1
  86. package/fesm2022/form-field/testing.mjs +12 -15
  87. package/fesm2022/form-field/testing.mjs.map +1 -1
  88. package/fesm2022/form-field.mjs +179 -132
  89. package/fesm2022/form-field.mjs.map +1 -1
  90. package/fesm2022/grid-list/testing.mjs +11 -17
  91. package/fesm2022/grid-list/testing.mjs.map +1 -1
  92. package/fesm2022/grid-list.mjs +75 -56
  93. package/fesm2022/grid-list.mjs.map +1 -1
  94. package/fesm2022/icon/testing.mjs +8 -8
  95. package/fesm2022/icon/testing.mjs.map +1 -1
  96. package/fesm2022/icon.mjs +66 -46
  97. package/fesm2022/icon.mjs.map +1 -1
  98. package/fesm2022/input/testing.mjs +3 -3
  99. package/fesm2022/input/testing.mjs.map +1 -1
  100. package/fesm2022/input.mjs +103 -72
  101. package/fesm2022/input.mjs.map +1 -1
  102. package/fesm2022/list/testing.mjs +21 -38
  103. package/fesm2022/list/testing.mjs.map +1 -1
  104. package/fesm2022/list.mjs +197 -195
  105. package/fesm2022/list.mjs.map +1 -1
  106. package/fesm2022/menu/testing.mjs +3 -6
  107. package/fesm2022/menu/testing.mjs.map +1 -1
  108. package/fesm2022/menu.mjs +178 -127
  109. package/fesm2022/menu.mjs.map +1 -1
  110. package/fesm2022/paginator/testing.mjs +10 -13
  111. package/fesm2022/paginator/testing.mjs.map +1 -1
  112. package/fesm2022/paginator.mjs +83 -58
  113. package/fesm2022/paginator.mjs.map +1 -1
  114. package/fesm2022/progress-bar/testing.mjs +1 -1
  115. package/fesm2022/progress-bar/testing.mjs.map +1 -1
  116. package/fesm2022/progress-bar.mjs +36 -35
  117. package/fesm2022/progress-bar.mjs.map +1 -1
  118. package/fesm2022/progress-spinner/testing.mjs +1 -1
  119. package/fesm2022/progress-spinner/testing.mjs.map +1 -1
  120. package/fesm2022/progress-spinner.mjs +28 -14
  121. package/fesm2022/progress-spinner.mjs.map +1 -1
  122. package/fesm2022/radio/testing.mjs +6 -12
  123. package/fesm2022/radio/testing.mjs.map +1 -1
  124. package/fesm2022/radio.mjs +123 -87
  125. package/fesm2022/radio.mjs.map +1 -1
  126. package/fesm2022/select/testing.mjs +6 -9
  127. package/fesm2022/select/testing.mjs.map +1 -1
  128. package/fesm2022/select.mjs +219 -182
  129. package/fesm2022/select.mjs.map +1 -1
  130. package/fesm2022/sidenav/testing.mjs +6 -6
  131. package/fesm2022/sidenav/testing.mjs.map +1 -1
  132. package/fesm2022/sidenav.mjs +136 -125
  133. package/fesm2022/sidenav.mjs.map +1 -1
  134. package/fesm2022/slide-toggle/testing.mjs +3 -6
  135. package/fesm2022/slide-toggle/testing.mjs.map +1 -1
  136. package/fesm2022/slide-toggle.mjs +77 -47
  137. package/fesm2022/slide-toggle.mjs.map +1 -1
  138. package/fesm2022/slider/testing.mjs +2 -2
  139. package/fesm2022/slider/testing.mjs.map +1 -1
  140. package/fesm2022/slider.mjs +262 -194
  141. package/fesm2022/slider.mjs.map +1 -1
  142. package/fesm2022/snack-bar/testing.mjs +4 -7
  143. package/fesm2022/snack-bar/testing.mjs.map +1 -1
  144. package/fesm2022/snack-bar.mjs +143 -111
  145. package/fesm2022/snack-bar.mjs.map +1 -1
  146. package/fesm2022/sort/testing.mjs +3 -6
  147. package/fesm2022/sort/testing.mjs.map +1 -1
  148. package/fesm2022/sort.mjs +94 -74
  149. package/fesm2022/sort.mjs.map +1 -1
  150. package/fesm2022/stepper/testing.mjs +4 -4
  151. package/fesm2022/stepper/testing.mjs.map +1 -1
  152. package/fesm2022/stepper.mjs +146 -113
  153. package/fesm2022/stepper.mjs.map +1 -1
  154. package/fesm2022/table/testing.mjs +13 -25
  155. package/fesm2022/table/testing.mjs.map +1 -1
  156. package/fesm2022/table.mjs +183 -194
  157. package/fesm2022/table.mjs.map +1 -1
  158. package/fesm2022/tabs/testing.mjs +5 -5
  159. package/fesm2022/tabs/testing.mjs.map +1 -1
  160. package/fesm2022/tabs.mjs +329 -251
  161. package/fesm2022/tabs.mjs.map +1 -1
  162. package/fesm2022/timepicker/testing.mjs +7 -16
  163. package/fesm2022/timepicker/testing.mjs.map +1 -1
  164. package/fesm2022/timepicker.mjs +160 -155
  165. package/fesm2022/timepicker.mjs.map +1 -1
  166. package/fesm2022/toolbar/testing.mjs +2 -5
  167. package/fesm2022/toolbar/testing.mjs.map +1 -1
  168. package/fesm2022/toolbar.mjs +26 -17
  169. package/fesm2022/toolbar.mjs.map +1 -1
  170. package/fesm2022/tooltip/testing.mjs +6 -9
  171. package/fesm2022/tooltip/testing.mjs.map +1 -1
  172. package/fesm2022/tooltip.mjs +97 -74
  173. package/fesm2022/tooltip.mjs.map +1 -1
  174. package/fesm2022/tree/testing.mjs +3 -6
  175. package/fesm2022/tree/testing.mjs.map +1 -1
  176. package/fesm2022/tree.mjs +57 -61
  177. package/fesm2022/tree.mjs.map +1 -1
  178. package/form-field/_form-field-theme.scss +114 -61
  179. package/form-field/index.d.ts +9 -10
  180. package/grid-list/_grid-list-theme.scss +25 -15
  181. package/icon/_icon-theme.scss +22 -14
  182. package/input/_input-theme.scss +18 -11
  183. package/list/_list-theme.scss +89 -47
  184. package/list/index.d.ts +20 -21
  185. package/menu/_menu-theme.scss +33 -21
  186. package/menu/index.d.ts +8 -9
  187. package/package.json +2 -2
  188. package/paginator/_paginator-theme.scss +39 -23
  189. package/prebuilt-themes/azure-blue.css +1 -1
  190. package/prebuilt-themes/cyan-orange.css +1 -1
  191. package/prebuilt-themes/deeppurple-amber.css +1 -1
  192. package/prebuilt-themes/indigo-pink.css +1 -1
  193. package/prebuilt-themes/magenta-violet.css +1 -1
  194. package/prebuilt-themes/pink-bluegrey.css +1 -1
  195. package/prebuilt-themes/purple-green.css +1 -1
  196. package/prebuilt-themes/rose-red.css +1 -1
  197. package/progress-bar/_progress-bar-theme.scss +20 -16
  198. package/progress-spinner/_progress-spinner-theme.scss +41 -25
  199. package/progress-spinner/index.d.ts +3 -4
  200. package/radio/_radio-theme.scss +60 -32
  201. package/radio/index.d.ts +2 -3
  202. package/schematics/collection.json +3 -3
  203. package/schematics/ng-add/index.js +1 -1
  204. package/schematics/ng-add/index.mjs +1 -1
  205. package/schematics/ng-add/theming/create-custom-theme.js +1 -6
  206. package/schematics/ng-add/theming/create-custom-theme.mjs +1 -6
  207. package/schematics/ng-generate/{m3-theme → theme-color}/index_bundled.js +480 -288
  208. package/schematics/ng-generate/theme-color/index_bundled.js.map +7 -0
  209. package/schematics/ng-generate/{m3-theme → theme-color}/schema.json +7 -13
  210. package/schematics/ng-update/index_bundled.js +6 -1
  211. package/schematics/ng-update/index_bundled.js.map +1 -1
  212. package/select/_select-theme.scss +38 -25
  213. package/select/index.d.ts +6 -7
  214. package/sidenav/_sidenav-theme.scss +28 -17
  215. package/slide-toggle/_slide-toggle-theme.scss +52 -28
  216. package/slider/_slider-theme.scss +62 -38
  217. package/snack-bar/_snack-bar-theme.scss +29 -17
  218. package/sort/_sort-theme.scss +33 -21
  219. package/stepper/_stepper-theme.scss +40 -27
  220. package/stepper/index.d.ts +14 -15
  221. package/table/_table-theme.scss +36 -23
  222. package/tabs/_tabs-theme.scss +97 -50
  223. package/tabs/index.d.ts +2 -2
  224. package/timepicker/_timepicker-theme.scss +37 -24
  225. package/toolbar/_toolbar-theme.scss +35 -22
  226. package/tooltip/_tooltip-theme.scss +18 -15
  227. package/tooltip/index.d.ts +5 -6
  228. package/tree/_tree-theme.scss +33 -21
  229. package/schematics/ng-generate/m3-theme/index_bundled.js.map +0 -7
@@ -14,18 +14,20 @@
14
14
  @mixin base($theme) {
15
15
  @if inspection.get-theme-version($theme) == 1 {
16
16
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
17
- }
18
- @else {
17
+ } @else {
19
18
  @include sass-utils.current-selector-or-root() {
20
19
  @include token-utils.create-token-values(
21
- tokens-mdc-filled-text-field.$prefix,
22
- tokens-mdc-filled-text-field.get-unthemable-tokens());
20
+ tokens-mdc-filled-text-field.$prefix,
21
+ tokens-mdc-filled-text-field.get-unthemable-tokens()
22
+ );
23
23
  @include token-utils.create-token-values(
24
- tokens-mdc-outlined-text-field.$prefix,
25
- tokens-mdc-outlined-text-field.get-unthemable-tokens());
24
+ tokens-mdc-outlined-text-field.$prefix,
25
+ tokens-mdc-outlined-text-field.get-unthemable-tokens()
26
+ );
26
27
  @include token-utils.create-token-values(
27
- tokens-mat-form-field.$prefix,
28
- tokens-mat-form-field.get-unthemable-tokens());
28
+ tokens-mat-form-field.$prefix,
29
+ tokens-mat-form-field.get-unthemable-tokens()
30
+ );
29
31
  }
30
32
  }
31
33
  }
@@ -38,33 +40,50 @@
38
40
  @mixin color($theme, $options...) {
39
41
  @if inspection.get-theme-version($theme) == 1 {
40
42
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
41
- }
42
- @else {
43
+ } @else {
43
44
  @include sass-utils.current-selector-or-root() {
44
- @include token-utils.create-token-values(tokens-mdc-filled-text-field.$prefix,
45
- tokens-mdc-filled-text-field.get-color-tokens($theme));
46
- @include token-utils.create-token-values(tokens-mdc-outlined-text-field.$prefix,
47
- tokens-mdc-outlined-text-field.get-color-tokens($theme));
48
- @include token-utils.create-token-values(tokens-mat-form-field.$prefix,
49
- tokens-mat-form-field.get-color-tokens($theme));
45
+ @include token-utils.create-token-values(
46
+ tokens-mdc-filled-text-field.$prefix,
47
+ tokens-mdc-filled-text-field.get-color-tokens($theme)
48
+ );
49
+ @include token-utils.create-token-values(
50
+ tokens-mdc-outlined-text-field.$prefix,
51
+ tokens-mdc-outlined-text-field.get-color-tokens($theme)
52
+ );
53
+ @include token-utils.create-token-values(
54
+ tokens-mat-form-field.$prefix,
55
+ tokens-mat-form-field.get-color-tokens($theme)
56
+ );
50
57
  }
51
58
 
52
59
  .mat-mdc-form-field.mat-accent {
53
- @include token-utils.create-token-values(tokens-mdc-filled-text-field.$prefix,
54
- tokens-mdc-filled-text-field.private-get-color-palette-color-tokens($theme, accent));
55
- @include token-utils.create-token-values(tokens-mdc-outlined-text-field.$prefix,
56
- tokens-mdc-outlined-text-field.private-get-color-palette-color-tokens($theme, accent));
57
- @include token-utils.create-token-values(tokens-mat-form-field.$prefix,
58
- tokens-mat-form-field.private-get-color-palette-color-tokens($theme, accent));
60
+ @include token-utils.create-token-values(
61
+ tokens-mdc-filled-text-field.$prefix,
62
+ tokens-mdc-filled-text-field.private-get-color-palette-color-tokens($theme, accent)
63
+ );
64
+ @include token-utils.create-token-values(
65
+ tokens-mdc-outlined-text-field.$prefix,
66
+ tokens-mdc-outlined-text-field.private-get-color-palette-color-tokens($theme, accent)
67
+ );
68
+ @include token-utils.create-token-values(
69
+ tokens-mat-form-field.$prefix,
70
+ tokens-mat-form-field.private-get-color-palette-color-tokens($theme, accent)
71
+ );
59
72
  }
60
73
 
61
74
  .mat-mdc-form-field.mat-warn {
62
- @include token-utils.create-token-values(tokens-mdc-filled-text-field.$prefix,
63
- tokens-mdc-filled-text-field.private-get-color-palette-color-tokens($theme, warn));
64
- @include token-utils.create-token-values(tokens-mdc-outlined-text-field.$prefix,
65
- tokens-mdc-outlined-text-field.private-get-color-palette-color-tokens($theme, warn));
66
- @include token-utils.create-token-values(tokens-mat-form-field.$prefix,
67
- tokens-mat-form-field.private-get-color-palette-color-tokens($theme, warn));
75
+ @include token-utils.create-token-values(
76
+ tokens-mdc-filled-text-field.$prefix,
77
+ tokens-mdc-filled-text-field.private-get-color-palette-color-tokens($theme, warn)
78
+ );
79
+ @include token-utils.create-token-values(
80
+ tokens-mdc-outlined-text-field.$prefix,
81
+ tokens-mdc-outlined-text-field.private-get-color-palette-color-tokens($theme, warn)
82
+ );
83
+ @include token-utils.create-token-values(
84
+ tokens-mat-form-field.$prefix,
85
+ tokens-mat-form-field.private-get-color-palette-color-tokens($theme, warn)
86
+ );
68
87
  }
69
88
  }
70
89
  }
@@ -74,15 +93,20 @@
74
93
  @mixin typography($theme) {
75
94
  @if inspection.get-theme-version($theme) == 1 {
76
95
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
77
- }
78
- @else {
96
+ } @else {
79
97
  @include sass-utils.current-selector-or-root() {
80
- @include token-utils.create-token-values(tokens-mdc-filled-text-field.$prefix,
81
- tokens-mdc-filled-text-field.get-typography-tokens($theme));
82
- @include token-utils.create-token-values(tokens-mdc-outlined-text-field.$prefix,
83
- tokens-mdc-outlined-text-field.get-typography-tokens($theme));
84
- @include token-utils.create-token-values(tokens-mat-form-field.$prefix,
85
- tokens-mat-form-field.get-typography-tokens($theme));
98
+ @include token-utils.create-token-values(
99
+ tokens-mdc-filled-text-field.$prefix,
100
+ tokens-mdc-filled-text-field.get-typography-tokens($theme)
101
+ );
102
+ @include token-utils.create-token-values(
103
+ tokens-mdc-outlined-text-field.$prefix,
104
+ tokens-mdc-outlined-text-field.get-typography-tokens($theme)
105
+ );
106
+ @include token-utils.create-token-values(
107
+ tokens-mat-form-field.$prefix,
108
+ tokens-mat-form-field.get-typography-tokens($theme)
109
+ );
86
110
  }
87
111
  }
88
112
  }
@@ -92,30 +116,46 @@
92
116
  @mixin density($theme) {
93
117
  @if inspection.get-theme-version($theme) == 1 {
94
118
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
95
- }
96
- @else {
119
+ } @else {
97
120
  @include sass-utils.current-selector-or-root() {
98
- @include token-utils.create-token-values(tokens-mat-form-field.$prefix,
99
- tokens-mat-form-field.get-density-tokens($theme));
121
+ @include token-utils.create-token-values(
122
+ tokens-mat-form-field.$prefix,
123
+ tokens-mat-form-field.get-density-tokens($theme)
124
+ );
100
125
  }
101
126
  }
102
127
  }
103
128
 
104
- /// Outputs the CSS variable values for the given tokens.
105
- /// @param {Map} $tokens The token values to emit.
106
- @mixin overrides($tokens: ()) {
129
+ /// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
130
+ @function _define-overrides() {
107
131
  $filled-text-field-tokens: tokens-mdc-filled-text-field.get-token-slots();
108
132
  $outlined-text-field-tokens: tokens-mdc-outlined-text-field.get-token-slots();
109
133
  $form-field-tokens: tokens-mat-form-field.get-token-slots();
110
134
 
111
- @include token-utils.batch-create-token-values(
112
- $tokens,
113
- (prefix: tokens-mdc-filled-text-field.$prefix, tokens: $filled-text-field-tokens),
114
- (prefix: tokens-mdc-outlined-text-field.$prefix, tokens: $outlined-text-field-tokens),
115
- (prefix: tokens-mat-form-field.$prefix, tokens: $form-field-tokens),
135
+ @return (
136
+ (
137
+ namespace: tokens-mdc-filled-text-field.$prefix,
138
+ tokens: $filled-text-field-tokens,
139
+ prefix: 'filled-',
140
+ ),
141
+ (
142
+ namespace: tokens-mdc-outlined-text-field.$prefix,
143
+ tokens: $outlined-text-field-tokens,
144
+ prefix: 'outlined-',
145
+ ),
146
+ (
147
+ namespace: tokens-mat-form-field.$prefix,
148
+ tokens: $form-field-tokens,
149
+ )
116
150
  );
117
151
  }
118
152
 
153
+ /// Outputs the CSS variable values for the given tokens.
154
+ /// @param {Map} $tokens The token values to emit.
155
+ @mixin overrides($tokens: ()) {
156
+ @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
157
+ }
158
+
119
159
  /// Outputs all (base, color, typography, and density) theme styles for the mat-form-field.
120
160
  /// @param {Map} $theme The theme to generate styles for.
121
161
  /// @param {ArgList} Additional optional arguments (only supported for M3 themes):
@@ -125,8 +165,7 @@
125
165
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-form-field') {
126
166
  @if inspection.get-theme-version($theme) == 1 {
127
167
  @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);
128
- }
129
- @else {
168
+ } @else {
130
169
  @include base($theme);
131
170
  @if inspection.theme-has($theme, color) {
132
171
  @include color($theme);
@@ -143,16 +182,30 @@
143
182
 
144
183
  @mixin _theme-from-tokens($tokens, $options...) {
145
184
  @include validation.selector-defined(
146
- 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
147
- $mdc-filled-text-field-tokens:
148
- token-utils.get-tokens-for($tokens, tokens-mdc-filled-text-field.$prefix, $options...);
149
- $mdc-outlined-text-field-tokens:
150
- token-utils.get-tokens-for($tokens, tokens-mdc-outlined-text-field.$prefix, $options...);
151
- $mat-form-field-tokens:
152
- token-utils.get-tokens-for($tokens, tokens-mat-form-field.$prefix, $options...);
153
- @include token-utils.create-token-values(tokens-mdc-filled-text-field.$prefix,
154
- $mdc-filled-text-field-tokens);
155
- @include token-utils.create-token-values(tokens-mdc-outlined-text-field.$prefix,
156
- $mdc-outlined-text-field-tokens);
185
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
186
+ );
187
+ $mdc-filled-text-field-tokens: token-utils.get-tokens-for(
188
+ $tokens,
189
+ tokens-mdc-filled-text-field.$prefix,
190
+ $options...
191
+ );
192
+ $mdc-outlined-text-field-tokens: token-utils.get-tokens-for(
193
+ $tokens,
194
+ tokens-mdc-outlined-text-field.$prefix,
195
+ $options...
196
+ );
197
+ $mat-form-field-tokens: token-utils.get-tokens-for(
198
+ $tokens,
199
+ tokens-mat-form-field.$prefix,
200
+ $options...
201
+ );
202
+ @include token-utils.create-token-values(
203
+ tokens-mdc-filled-text-field.$prefix,
204
+ $mdc-filled-text-field-tokens
205
+ );
206
+ @include token-utils.create-token-values(
207
+ tokens-mdc-outlined-text-field.$prefix,
208
+ $mdc-outlined-text-field-tokens
209
+ );
157
210
  @include token-utils.create-token-values(tokens-mat-form-field.$prefix, $mat-form-field-tokens);
158
211
  }
@@ -7,8 +7,7 @@ import { BooleanInput } from '@angular/cdk/coercion';
7
7
  import { ElementRef } from '@angular/core';
8
8
  import * as i0 from '@angular/core';
9
9
  import * as i1 from '@angular/material/core';
10
- import * as i2 from '@angular/common';
11
- import * as i3 from '@angular/cdk/observers';
10
+ import * as i2 from '@angular/cdk/observers';
12
11
  import { InjectionToken } from '@angular/core';
13
12
  import { NgControl } from '@angular/forms';
14
13
  import { Observable } from 'rxjs';
@@ -35,7 +34,7 @@ export declare function getMatFormFieldMissingControlError(): Error;
35
34
  /** @docs-private */
36
35
  export declare function getMatFormFieldPlaceholderConflictError(): Error;
37
36
 
38
- declare namespace i4 {
37
+ declare namespace i3 {
39
38
  export {
40
39
  FloatLabelType,
41
40
  MatFormFieldAppearance,
@@ -47,33 +46,33 @@ declare namespace i4 {
47
46
  }
48
47
  }
49
48
 
50
- declare namespace i5 {
49
+ declare namespace i4 {
51
50
  export {
52
51
  MatLabel
53
52
  }
54
53
  }
55
54
 
56
- declare namespace i6 {
55
+ declare namespace i5 {
57
56
  export {
58
57
  MAT_ERROR,
59
58
  MatError
60
59
  }
61
60
  }
62
61
 
63
- declare namespace i7 {
62
+ declare namespace i6 {
64
63
  export {
65
64
  MatHint
66
65
  }
67
66
  }
68
67
 
69
- declare namespace i8 {
68
+ declare namespace i7 {
70
69
  export {
71
70
  MAT_PREFIX,
72
71
  MatPrefix
73
72
  }
74
73
  }
75
74
 
76
- declare namespace i9 {
75
+ declare namespace i8 {
77
76
  export {
78
77
  MAT_SUFFIX,
79
78
  MatSuffix
@@ -352,7 +351,7 @@ export declare abstract class MatFormFieldControl<T> {
352
351
  /** Handles a click on the control's container. */
353
352
  abstract onContainerClick(event: MouseEvent): void;
354
353
  static ɵfac: i0.ɵɵFactoryDeclaration<MatFormFieldControl<any>, never>;
355
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatFormFieldControl<any>, never, never, {}, {}, never, never, false, never>;
354
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatFormFieldControl<any>, never, never, {}, {}, never, never, true, never>;
356
355
  }
357
356
 
358
357
  /**
@@ -458,7 +457,7 @@ declare class MatFormFieldLineRipple implements OnDestroy {
458
457
 
459
458
  export declare class MatFormFieldModule {
460
459
  static ɵfac: i0.ɵɵFactoryDeclaration<MatFormFieldModule, never>;
461
- static ɵmod: i0.ɵɵNgModuleDeclaration<MatFormFieldModule, never, [typeof i1.MatCommonModule, typeof i2.CommonModule, typeof i3.ObserversModule, typeof i4.MatFormField, typeof i5.MatLabel, typeof i6.MatError, typeof i7.MatHint, typeof i8.MatPrefix, typeof i9.MatSuffix], [typeof i4.MatFormField, typeof i5.MatLabel, typeof i7.MatHint, typeof i6.MatError, typeof i8.MatPrefix, typeof i9.MatSuffix, typeof i1.MatCommonModule]>;
460
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MatFormFieldModule, never, [typeof i1.MatCommonModule, typeof i2.ObserversModule, typeof i3.MatFormField, typeof i4.MatLabel, typeof i5.MatError, typeof i6.MatHint, typeof i7.MatPrefix, typeof i8.MatSuffix], [typeof i3.MatFormField, typeof i4.MatLabel, typeof i6.MatHint, typeof i5.MatError, typeof i7.MatPrefix, typeof i8.MatSuffix, typeof i1.MatCommonModule]>;
462
461
  static ɵinj: i0.ɵɵInjectorDeclaration<MatFormFieldModule>;
463
462
  }
464
463
 
@@ -10,26 +10,27 @@
10
10
  @mixin base($theme) {
11
11
  @if inspection.get-theme-version($theme) == 1 {
12
12
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
13
+ } @else {
13
14
  }
14
- @else {}
15
15
  }
16
16
 
17
17
  // Include this empty mixin for consistency with the other components.
18
18
  @mixin color($theme) {
19
19
  @if inspection.get-theme-version($theme) == 1 {
20
20
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
21
+ } @else {
21
22
  }
22
- @else {}
23
23
  }
24
24
 
25
25
  @mixin typography($theme) {
26
26
  @if inspection.get-theme-version($theme) == 1 {
27
27
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
28
- }
29
- @else {
28
+ } @else {
30
29
  @include sass-utils.current-selector-or-root() {
31
- @include token-utils.create-token-values(tokens-mat-grid-list.$prefix,
32
- tokens-mat-grid-list.get-typography-tokens($theme));
30
+ @include token-utils.create-token-values(
31
+ tokens-mat-grid-list.$prefix,
32
+ tokens-mat-grid-list.get-typography-tokens($theme)
33
+ );
33
34
  }
34
35
  }
35
36
  }
@@ -37,23 +38,29 @@
37
38
  @mixin density($theme) {
38
39
  @if inspection.get-theme-version($theme) == 1 {
39
40
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
41
+ } @else {
40
42
  }
41
- @else {}
42
43
  }
43
44
 
44
- @mixin overrides($tokens: ()) {
45
- @include token-utils.batch-create-token-values(
46
- $tokens,
47
- (prefix: tokens-mat-grid-list.$prefix, tokens: tokens-mat-grid-list.get-token-slots()),
45
+ /// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
46
+ @function _define-overrides() {
47
+ @return (
48
+ (
49
+ namespace: tokens-mat-grid-list.$prefix,
50
+ tokens: tokens-mat-grid-list.get-token-slots(),
51
+ ),
48
52
  );
49
53
  }
50
54
 
55
+ @mixin overrides($tokens: ()) {
56
+ @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
57
+ }
58
+
51
59
  @mixin theme($theme) {
52
60
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-grid-list') {
53
61
  @if inspection.get-theme-version($theme) == 1 {
54
62
  @include _theme-from-tokens(inspection.get-theme-tokens($theme));
55
- }
56
- @else {
63
+ } @else {
57
64
  @include base($theme);
58
65
  @if inspection.theme-has($theme, color) {
59
66
  @include color($theme);
@@ -70,9 +77,12 @@
70
77
 
71
78
  @mixin _theme-from-tokens($tokens) {
72
79
  @include validation.selector-defined(
73
- 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
80
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
81
+ );
74
82
  @if ($tokens != ()) {
75
83
  @include token-utils.create-token-values(
76
- tokens-mat-grid-list.$prefix, map.get($tokens, tokens-mat-grid-list.$prefix));
84
+ tokens-mat-grid-list.$prefix,
85
+ map.get($tokens, tokens-mat-grid-list.$prefix)
86
+ );
77
87
  }
78
88
  }
@@ -17,8 +17,8 @@
17
17
  @mixin base($theme) {
18
18
  @if inspection.get-theme-version($theme) == 1 {
19
19
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
20
+ } @else {
20
21
  }
21
- @else {}
22
22
  }
23
23
 
24
24
  /// Outputs color theme styles for the mat-icon.
@@ -29,11 +29,12 @@
29
29
  @mixin color($theme, $options...) {
30
30
  @if inspection.get-theme-version($theme) == 1 {
31
31
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
32
- }
33
- @else {
32
+ } @else {
34
33
  @include sass-utils.current-selector-or-root() {
35
- @include token-utils.create-token-values(tokens-mat-icon.$prefix,
36
- tokens-mat-icon.get-color-tokens($theme));
34
+ @include token-utils.create-token-values(
35
+ tokens-mat-icon.$prefix,
36
+ tokens-mat-icon.get-color-tokens($theme)
37
+ );
37
38
  }
38
39
 
39
40
  .mat-icon {
@@ -57,8 +58,8 @@
57
58
  @mixin typography($theme) {
58
59
  @if inspection.get-theme-version($theme) == 1 {
59
60
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
61
+ } @else {
60
62
  }
61
- @else {}
62
63
  }
63
64
 
64
65
  /// Outputs density theme styles for the mat-icon.
@@ -66,17 +67,24 @@
66
67
  @mixin density($theme) {
67
68
  @if inspection.get-theme-version($theme) == 1 {
68
69
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
70
+ } @else {
69
71
  }
70
- @else {}
72
+ }
73
+
74
+ /// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
75
+ @function _define-overrides() {
76
+ @return (
77
+ (
78
+ namespace: tokens-mat-icon.$prefix,
79
+ tokens: tokens-mat-icon.get-token-slots(),
80
+ ),
81
+ );
71
82
  }
72
83
 
73
84
  /// Outputs the CSS variable values for the given tokens.
74
85
  /// @param {Map} $tokens The token values to emit.
75
86
  @mixin overrides($tokens: ()) {
76
- @include token-utils.batch-create-token-values(
77
- $tokens,
78
- (prefix: tokens-mat-icon.$prefix, tokens: tokens-mat-icon.get-token-slots()),
79
- );
87
+ @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
80
88
  }
81
89
 
82
90
  /// Outputs all (base, color, typography, and density) theme styles for the mat-icon.
@@ -88,8 +96,7 @@
88
96
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-icon') {
89
97
  @if inspection.get-theme-version($theme) == 1 {
90
98
  @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);
91
- }
92
- @else {
99
+ } @else {
93
100
  @include base($theme);
94
101
  @if inspection.theme-has($theme, color) {
95
102
  @include color($theme);
@@ -106,7 +113,8 @@
106
113
 
107
114
  @mixin _theme-from-tokens($tokens, $options...) {
108
115
  @include validation.selector-defined(
109
- 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
116
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
117
+ );
110
118
  $mat-icon-tokens: token-utils.get-tokens-for($tokens, tokens-mat-icon.$prefix, $options...);
111
119
  @include token-utils.create-token-values(tokens-mat-icon.$prefix, $mat-icon-tokens);
112
120
  }
@@ -7,44 +7,50 @@
7
7
  @mixin base($theme) {
8
8
  @if inspection.get-theme-version($theme) == 1 {
9
9
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
10
+ } @else {
10
11
  }
11
- @else {}
12
12
  }
13
13
 
14
14
  @mixin color($theme) {
15
15
  @if inspection.get-theme-version($theme) == 1 {
16
16
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
17
+ } @else {
17
18
  }
18
- @else {}
19
19
  }
20
20
 
21
21
  @mixin typography($theme) {
22
22
  @if inspection.get-theme-version($theme) == 1 {
23
23
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
24
+ } @else {
24
25
  }
25
- @else {}
26
26
  }
27
27
 
28
28
  @mixin density($theme) {
29
29
  @if inspection.get-theme-version($theme) == 1 {
30
30
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
31
+ } @else {
31
32
  }
32
- @else {}
33
33
  }
34
34
 
35
- @mixin overrides($tokens: ()) {
36
- @include token-utils.batch-create-token-values(
37
- $tokens,
38
- (prefix: '', tokens: ()),
35
+ /// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
36
+ @function _define-overrides() {
37
+ @return (
38
+ (
39
+ namespace: '',
40
+ tokens: (),
41
+ ),
39
42
  );
40
43
  }
41
44
 
45
+ @mixin overrides($tokens: ()) {
46
+ @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
47
+ }
48
+
42
49
  @mixin theme($theme) {
43
50
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-input') {
44
51
  @if inspection.get-theme-version($theme) == 1 {
45
52
  @include _theme-from-tokens(inspection.get-theme-tokens($theme));
46
- }
47
- @else {
53
+ } @else {
48
54
  @include base($theme);
49
55
  @if inspection.theme-has($theme, color) {
50
56
  @include color($theme);
@@ -61,5 +67,6 @@
61
67
 
62
68
  @mixin _theme-from-tokens($tokens) {
63
69
  @include validation.selector-defined(
64
- 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
70
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
71
+ );
65
72
  }