@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
@@ -13,11 +13,12 @@
13
13
  @mixin base($theme) {
14
14
  @if inspection.get-theme-version($theme) == 1 {
15
15
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
16
- }
17
- @else {
16
+ } @else {
18
17
  @include sass-utils.current-selector-or-root() {
19
- @include token-utils.create-token-values(tokens-mat-timepicker.$prefix,
20
- tokens-mat-timepicker.get-unthemable-tokens());
18
+ @include token-utils.create-token-values(
19
+ tokens-mat-timepicker.$prefix,
20
+ tokens-mat-timepicker.get-unthemable-tokens()
21
+ );
21
22
  }
22
23
  }
23
24
  }
@@ -30,11 +31,12 @@
30
31
  @mixin color($theme, $options...) {
31
32
  @if inspection.get-theme-version($theme) == 1 {
32
33
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
33
- }
34
- @else {
34
+ } @else {
35
35
  @include sass-utils.current-selector-or-root() {
36
- @include token-utils.create-token-values(tokens-mat-timepicker.$prefix,
37
- tokens-mat-timepicker.get-color-tokens($theme));
36
+ @include token-utils.create-token-values(
37
+ tokens-mat-timepicker.$prefix,
38
+ tokens-mat-timepicker.get-color-tokens($theme)
39
+ );
38
40
  }
39
41
  }
40
42
  }
@@ -44,11 +46,12 @@
44
46
  @mixin typography($theme) {
45
47
  @if inspection.get-theme-version($theme) == 1 {
46
48
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
47
- }
48
- @else {
49
+ } @else {
49
50
  @include sass-utils.current-selector-or-root() {
50
- @include token-utils.create-token-values(tokens-mat-timepicker.$prefix,
51
- tokens-mat-timepicker.get-typography-tokens($theme));
51
+ @include token-utils.create-token-values(
52
+ tokens-mat-timepicker.$prefix,
53
+ tokens-mat-timepicker.get-typography-tokens($theme)
54
+ );
52
55
  }
53
56
  }
54
57
  }
@@ -58,22 +61,30 @@
58
61
  @mixin density($theme) {
59
62
  @if inspection.get-theme-version($theme) == 1 {
60
63
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
61
- }
62
- @else {
64
+ } @else {
63
65
  @include sass-utils.current-selector-or-root() {
64
- @include token-utils.create-token-values(tokens-mat-timepicker.$prefix,
65
- tokens-mat-timepicker.get-density-tokens($theme));
66
+ @include token-utils.create-token-values(
67
+ tokens-mat-timepicker.$prefix,
68
+ tokens-mat-timepicker.get-density-tokens($theme)
69
+ );
66
70
  }
67
71
  }
68
72
  }
69
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-timepicker.$prefix,
79
+ tokens: tokens-mat-timepicker.get-token-slots(),
80
+ ),
81
+ );
82
+ }
83
+
70
84
  /// Outputs the CSS variable values for the given tokens.
71
85
  /// @param {Map} $tokens The token values to emit.
72
86
  @mixin overrides($tokens: ()) {
73
- @include token-utils.batch-create-token-values(
74
- $tokens,
75
- (prefix: tokens-mat-timepicker.$prefix, tokens: tokens-mat-timepicker.get-token-slots()),
76
- );
87
+ @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
77
88
  }
78
89
 
79
90
  /// Outputs all (base, color, typography, and density) theme styles for the mat-timepicker.
@@ -85,8 +96,7 @@
85
96
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-timepicker') {
86
97
  @if inspection.get-theme-version($theme) == 1 {
87
98
  @include _theme-from-tokens(inspection.get-theme-tokens($theme));
88
- }
89
- @else {
99
+ } @else {
90
100
  @include base($theme);
91
101
  @if inspection.theme-has($theme, color) {
92
102
  @include color($theme);
@@ -103,9 +113,12 @@
103
113
 
104
114
  @mixin _theme-from-tokens($tokens) {
105
115
  @include validation.selector-defined(
106
- '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
+ );
107
118
  @if ($tokens != ()) {
108
119
  @include token-utils.create-token-values(
109
- tokens-mat-timepicker.$prefix, map.get($tokens, tokens-mat-timepicker.$prefix));
120
+ tokens-mat-timepicker.$prefix,
121
+ map.get($tokens, tokens-mat-timepicker.$prefix)
122
+ );
110
123
  }
111
124
  }
@@ -17,16 +17,18 @@
17
17
  );
18
18
  }
19
19
 
20
- @mixin base($theme) {}
20
+ @mixin base($theme) {
21
+ }
21
22
 
22
23
  @mixin color($theme) {
23
24
  @if inspection.get-theme-version($theme) == 1 {
24
25
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
25
- }
26
- @else {
26
+ } @else {
27
27
  @include sass-utils.current-selector-or-root() {
28
- @include token-utils.create-token-values(tokens-mat-toolbar.$prefix,
29
- tokens-mat-toolbar.get-color-tokens($theme));
28
+ @include token-utils.create-token-values(
29
+ tokens-mat-toolbar.$prefix,
30
+ tokens-mat-toolbar.get-color-tokens($theme)
31
+ );
30
32
  }
31
33
 
32
34
  .mat-toolbar {
@@ -48,14 +50,15 @@
48
50
  @mixin typography($theme) {
49
51
  @if inspection.get-theme-version($theme) == 1 {
50
52
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
51
- }
52
- @else {
53
+ } @else {
53
54
  // TODO(mmalerba): Stop calling this and resolve resulting screen diffs.
54
55
  $theme: inspection.private-get-typography-back-compat-theme($theme);
55
56
 
56
57
  @include sass-utils.current-selector-or-root() {
57
- @include token-utils.create-token-values(tokens-mat-toolbar.$prefix,
58
- tokens-mat-toolbar.get-typography-tokens($theme));
58
+ @include token-utils.create-token-values(
59
+ tokens-mat-toolbar.$prefix,
60
+ tokens-mat-toolbar.get-typography-tokens($theme)
61
+ );
59
62
  }
60
63
  }
61
64
  }
@@ -63,30 +66,37 @@
63
66
  @mixin density($theme) {
64
67
  @if inspection.get-theme-version($theme) == 1 {
65
68
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
66
- }
67
- @else {
69
+ } @else {
68
70
  @include sass-utils.current-selector-or-root() {
69
- @include token-utils.create-token-values(tokens-mat-toolbar.$prefix,
70
- tokens-mat-toolbar.get-density-tokens($theme));
71
+ @include token-utils.create-token-values(
72
+ tokens-mat-toolbar.$prefix,
73
+ tokens-mat-toolbar.get-density-tokens($theme)
74
+ );
71
75
  }
72
76
  }
73
77
  }
74
78
 
79
+ /// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
80
+ @function _define-overrides() {
81
+ @return (
82
+ (
83
+ namespace: tokens-mat-toolbar.$prefix,
84
+ tokens: tokens-mat-toolbar.get-token-slots(),
85
+ ),
86
+ );
87
+ }
88
+
75
89
  /// Outputs the CSS variable values for the given tokens.
76
90
  /// @param {Map} $tokens The token values to emit.
77
91
  @mixin overrides($tokens: ()) {
78
- @include token-utils.batch-create-token-values(
79
- $tokens,
80
- (prefix: tokens-mat-toolbar.$prefix, tokens: tokens-mat-toolbar.get-token-slots()),
81
- );
92
+ @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
82
93
  }
83
94
 
84
95
  @mixin theme($theme) {
85
96
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-toolbar') {
86
97
  @if inspection.get-theme-version($theme) == 1 {
87
98
  @include _theme-from-tokens(inspection.get-theme-tokens($theme));
88
- }
89
- @else {
99
+ } @else {
90
100
  @include base($theme);
91
101
  @if inspection.theme-has($theme, color) {
92
102
  @include color($theme);
@@ -103,9 +113,12 @@
103
113
 
104
114
  @mixin _theme-from-tokens($tokens) {
105
115
  @include validation.selector-defined(
106
- '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
+ );
107
118
  @if ($tokens != ()) {
108
- @include token-utils.create-token-values(tokens-mat-toolbar.$prefix,
109
- map.get($tokens, tokens-mat-toolbar.$prefix));
119
+ @include token-utils.create-token-values(
120
+ tokens-mat-toolbar.$prefix,
121
+ map.get($tokens, tokens-mat-toolbar.$prefix)
122
+ );
110
123
  }
111
124
  }
@@ -9,8 +9,7 @@
9
9
  @mixin base($theme) {
10
10
  @if inspection.get-theme-version($theme) == 1 {
11
11
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
12
- }
13
- @else {
12
+ } @else {
14
13
  // Add default values for tokens not related to color, typography, or density.
15
14
  @include sass-utils.current-selector-or-root() {
16
15
  @include token-utils.create-token-values(
@@ -24,8 +23,7 @@
24
23
  @mixin color($theme) {
25
24
  @if inspection.get-theme-version($theme) == 1 {
26
25
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
27
- }
28
- @else {
26
+ } @else {
29
27
  @include sass-utils.current-selector-or-root() {
30
28
  @include token-utils.create-token-values(
31
29
  tokens-mdc-plain-tooltip.$prefix,
@@ -38,8 +36,7 @@
38
36
  @mixin typography($theme) {
39
37
  @if inspection.get-theme-version($theme) == 1 {
40
38
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
41
- }
42
- @else {
39
+ } @else {
43
40
  @include sass-utils.current-selector-or-root() {
44
41
  @include token-utils.create-token-values(
45
42
  tokens-mdc-plain-tooltip.$prefix,
@@ -52,8 +49,7 @@
52
49
  @mixin density($theme) {
53
50
  @if inspection.get-theme-version($theme) == 1 {
54
51
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
55
- }
56
- @else {
52
+ } @else {
57
53
  @include sass-utils.current-selector-or-root() {
58
54
  @include token-utils.create-token-values(
59
55
  tokens-mdc-plain-tooltip.$prefix,
@@ -63,19 +59,25 @@
63
59
  }
64
60
  }
65
61
 
66
- @mixin overrides($tokens: ()) {
67
- @include token-utils.batch-create-token-values(
68
- $tokens,
69
- (prefix: tokens-mdc-plain-tooltip.$prefix, tokens: tokens-mdc-plain-tooltip.get-token-slots()),
62
+ /// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
63
+ @function _define-overrides() {
64
+ @return (
65
+ (
66
+ namespace: tokens-mdc-plain-tooltip.$prefix,
67
+ tokens: tokens-mdc-plain-tooltip.get-token-slots(),
68
+ ),
70
69
  );
71
70
  }
72
71
 
72
+ @mixin overrides($tokens: ()) {
73
+ @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
74
+ }
75
+
73
76
  @mixin theme($theme) {
74
77
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-tooltip') {
75
78
  @if inspection.get-theme-version($theme) == 1 {
76
79
  @include _theme-from-tokens(inspection.get-theme-tokens($theme));
77
- }
78
- @else {
80
+ } @else {
79
81
  @include base($theme);
80
82
  @if inspection.theme-has($theme, color) {
81
83
  @include color($theme);
@@ -92,7 +94,8 @@
92
94
 
93
95
  @mixin _theme-from-tokens($tokens) {
94
96
  @include validation.selector-defined(
95
- 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
97
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
98
+ );
96
99
  @if $tokens != () {
97
100
  $tokens: token-utils.get-tokens-for($tokens, tokens-mdc-plain-tooltip.$prefix);
98
101
  @include token-utils.create-token-values(tokens-mdc-plain-tooltip.$prefix, $tokens);
@@ -6,10 +6,9 @@ import { Directionality } from '@angular/cdk/bidi';
6
6
  import { ElementRef } from '@angular/core';
7
7
  import * as i0 from '@angular/core';
8
8
  import * as i1 from '@angular/cdk/a11y';
9
- import * as i2 from '@angular/common';
10
- import * as i3 from '@angular/cdk/overlay';
11
- import * as i4 from '@angular/material/core';
12
- import * as i6 from '@angular/cdk/scrolling';
9
+ import * as i2 from '@angular/cdk/overlay';
10
+ import * as i3 from '@angular/material/core';
11
+ import * as i5 from '@angular/cdk/scrolling';
13
12
  import { InjectionToken } from '@angular/core';
14
13
  import { NumberInput } from '@angular/cdk/coercion';
15
14
  import { Observable } from 'rxjs';
@@ -26,7 +25,7 @@ import { ScrollStrategy } from '@angular/cdk/overlay';
26
25
  */
27
26
  export declare function getMatTooltipInvalidPositionError(position: string): Error;
28
27
 
29
- declare namespace i5 {
28
+ declare namespace i4 {
30
29
  export {
31
30
  getMatTooltipInvalidPositionError,
32
31
  MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY,
@@ -253,7 +252,7 @@ export declare interface MatTooltipDefaultOptions {
253
252
 
254
253
  export declare class MatTooltipModule {
255
254
  static ɵfac: i0.ɵɵFactoryDeclaration<MatTooltipModule, never>;
256
- static ɵmod: i0.ɵɵNgModuleDeclaration<MatTooltipModule, never, [typeof i1.A11yModule, typeof i2.CommonModule, typeof i3.OverlayModule, typeof i4.MatCommonModule, typeof i5.MatTooltip, typeof i5.TooltipComponent], [typeof i5.MatTooltip, typeof i5.TooltipComponent, typeof i4.MatCommonModule, typeof i6.CdkScrollableModule]>;
255
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MatTooltipModule, never, [typeof i1.A11yModule, typeof i2.OverlayModule, typeof i3.MatCommonModule, typeof i4.MatTooltip, typeof i4.TooltipComponent], [typeof i4.MatTooltip, typeof i4.TooltipComponent, typeof i3.MatCommonModule, typeof i5.CdkScrollableModule]>;
257
256
  static ɵinj: i0.ɵɵInjectorDeclaration<MatTooltipModule>;
258
257
  }
259
258
 
@@ -10,18 +10,19 @@
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
  @mixin color($theme) {
18
18
  @if inspection.get-theme-version($theme) == 1 {
19
19
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
20
- }
21
- @else {
20
+ } @else {
22
21
  @include sass-utils.current-selector-or-root() {
23
- @include token-utils.create-token-values(tokens-mat-tree.$prefix,
24
- tokens-mat-tree.get-color-tokens($theme));
22
+ @include token-utils.create-token-values(
23
+ tokens-mat-tree.$prefix,
24
+ tokens-mat-tree.get-color-tokens($theme)
25
+ );
25
26
  }
26
27
  }
27
28
  }
@@ -29,14 +30,15 @@
29
30
  @mixin typography($theme) {
30
31
  @if inspection.get-theme-version($theme) == 1 {
31
32
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
32
- }
33
- @else {
33
+ } @else {
34
34
  // TODO(mmalerba): Stop calling this and resolve resulting screen diffs.
35
35
  $theme: inspection.private-get-typography-back-compat-theme($theme);
36
36
 
37
37
  @include sass-utils.current-selector-or-root() {
38
- @include token-utils.create-token-values(tokens-mat-tree.$prefix,
39
- tokens-mat-tree.get-typography-tokens($theme));
38
+ @include token-utils.create-token-values(
39
+ tokens-mat-tree.$prefix,
40
+ tokens-mat-tree.get-typography-tokens($theme)
41
+ );
40
42
  }
41
43
  }
42
44
  }
@@ -44,30 +46,37 @@
44
46
  @mixin density($theme) {
45
47
  @if inspection.get-theme-version($theme) == 1 {
46
48
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
47
- }
48
- @else {
49
+ } @else {
49
50
  $density-scale: inspection.get-theme-density($theme);
50
51
 
51
52
  @include sass-utils.current-selector-or-root() {
52
- @include token-utils.create-token-values(tokens-mat-tree.$prefix,
53
- tokens-mat-tree.get-density-tokens($theme));
53
+ @include token-utils.create-token-values(
54
+ tokens-mat-tree.$prefix,
55
+ tokens-mat-tree.get-density-tokens($theme)
56
+ );
54
57
  }
55
58
  }
56
59
  }
57
60
 
58
- @mixin overrides($tokens: ()) {
59
- @include token-utils.batch-create-token-values(
60
- $tokens,
61
- (prefix: tokens-mat-tree.$prefix, tokens: tokens-mat-tree.get-token-slots()),
61
+ /// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
62
+ @function _define-overrides() {
63
+ @return (
64
+ (
65
+ namespace: tokens-mat-tree.$prefix,
66
+ tokens: tokens-mat-tree.get-token-slots(),
67
+ ),
62
68
  );
63
69
  }
64
70
 
71
+ @mixin overrides($tokens: ()) {
72
+ @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
73
+ }
74
+
65
75
  @mixin theme($theme) {
66
76
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-tree') {
67
77
  @if inspection.get-theme-version($theme) == 1 {
68
78
  @include _theme-from-tokens(inspection.get-theme-tokens($theme));
69
- }
70
- @else {
79
+ } @else {
71
80
  @include base($theme);
72
81
  @if inspection.theme-has($theme, color) {
73
82
  @include color($theme);
@@ -84,9 +93,12 @@
84
93
 
85
94
  @mixin _theme-from-tokens($tokens) {
86
95
  @include validation.selector-defined(
87
- 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
96
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
97
+ );
88
98
  @if ($tokens != ()) {
89
99
  @include token-utils.create-token-values(
90
- tokens-mat-tree.$prefix, map.get($tokens, tokens-mat-tree.$prefix));
100
+ tokens-mat-tree.$prefix,
101
+ map.get($tokens, tokens-mat-tree.$prefix)
102
+ );
91
103
  }
92
104
  }