@angular/material 17.1.1 → 17.2.0-next.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 (304) hide show
  1. package/_index.scss +4 -4
  2. package/badge/_badge-theme.scss +30 -11
  3. package/button/_button-base.scss +50 -10
  4. package/button/_button-theme.scss +92 -51
  5. package/button/_fab-theme.scss +82 -15
  6. package/button/_icon-button-theme.scss +11 -4
  7. package/button-toggle/_button-toggle-theme.scss +26 -11
  8. package/checkbox/_checkbox-theme.scss +41 -23
  9. package/chips/_chips-theme.scss +25 -9
  10. package/core/_core-theme.scss +85 -38
  11. package/core/mdc-helpers/_mdc-helpers.scss +0 -8
  12. package/core/option/_option-theme.scss +24 -10
  13. package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +64 -24
  14. package/core/tokens/_token-utils.scss +22 -0
  15. package/core/tokens/m2/_index.scss +16 -0
  16. package/core/tokens/m2/mat/_badge.scss +27 -1
  17. package/core/tokens/m2/mat/_checkbox.scss +45 -0
  18. package/core/tokens/m2/mat/_dialog.scss +49 -0
  19. package/core/tokens/m2/mat/_fab-small.scss +95 -0
  20. package/core/tokens/m2/mat/_fab.scss +6 -1
  21. package/core/tokens/m2/mat/_filled-button.scss +17 -2
  22. package/core/tokens/m2/mat/_icon-button.scss +6 -1
  23. package/core/tokens/m2/mat/_outlined-button.scss +17 -2
  24. package/core/tokens/m2/mat/_protected-button.scss +17 -2
  25. package/core/tokens/m2/mat/_radio.scss +6 -1
  26. package/core/tokens/m2/mat/_stepper.scss +6 -1
  27. package/core/tokens/m2/mat/_text-button.scss +20 -2
  28. package/core/tokens/m2/mdc/_extended-fab.scss +3 -2
  29. package/core/tokens/m2/mdc/_fab-small.scss +90 -0
  30. package/core/tokens/m2/mdc/_fab.scss +0 -11
  31. package/core/tokens/m2/mdc/_icon-button.scss +15 -7
  32. package/datepicker/_datepicker-theme.scss +25 -9
  33. package/dialog/_dialog-theme.scss +10 -0
  34. package/dialog/index.d.ts +28 -9
  35. package/esm2022/autocomplete/autocomplete-origin.mjs +4 -4
  36. package/esm2022/autocomplete/autocomplete-trigger.mjs +4 -4
  37. package/esm2022/autocomplete/autocomplete.mjs +4 -4
  38. package/esm2022/autocomplete/module.mjs +5 -5
  39. package/esm2022/badge/badge-module.mjs +5 -5
  40. package/esm2022/badge/badge.mjs +8 -8
  41. package/esm2022/bottom-sheet/bottom-sheet-container.mjs +4 -4
  42. package/esm2022/bottom-sheet/bottom-sheet-module.mjs +5 -5
  43. package/esm2022/bottom-sheet/bottom-sheet.mjs +4 -4
  44. package/esm2022/button/button-base.mjs +7 -7
  45. package/esm2022/button/button.mjs +9 -9
  46. package/esm2022/button/fab.mjs +17 -17
  47. package/esm2022/button/icon-button.mjs +9 -9
  48. package/esm2022/button/module.mjs +5 -5
  49. package/esm2022/button-toggle/button-toggle-module.mjs +5 -5
  50. package/esm2022/button-toggle/button-toggle.mjs +7 -7
  51. package/esm2022/card/card.mjs +43 -43
  52. package/esm2022/card/module.mjs +5 -5
  53. package/esm2022/checkbox/checkbox-required-validator.mjs +4 -4
  54. package/esm2022/checkbox/checkbox.mjs +6 -6
  55. package/esm2022/checkbox/module.mjs +9 -9
  56. package/esm2022/chips/chip-action.mjs +4 -4
  57. package/esm2022/chips/chip-edit-input.mjs +4 -4
  58. package/esm2022/chips/chip-grid.mjs +4 -4
  59. package/esm2022/chips/chip-icons.mjs +10 -10
  60. package/esm2022/chips/chip-input.mjs +4 -4
  61. package/esm2022/chips/chip-listbox.mjs +4 -4
  62. package/esm2022/chips/chip-option.mjs +4 -4
  63. package/esm2022/chips/chip-row.mjs +4 -4
  64. package/esm2022/chips/chip-set.mjs +4 -4
  65. package/esm2022/chips/chip.mjs +4 -4
  66. package/esm2022/chips/module.mjs +5 -5
  67. package/esm2022/core/common-behaviors/common-module.mjs +5 -5
  68. package/esm2022/core/datetime/index.mjs +9 -9
  69. package/esm2022/core/datetime/native-date-adapter.mjs +4 -4
  70. package/esm2022/core/error/error-options.mjs +7 -7
  71. package/esm2022/core/internal-form-field/internal-form-field.mjs +4 -4
  72. package/esm2022/core/line/line.mjs +8 -8
  73. package/esm2022/core/option/index.mjs +5 -5
  74. package/esm2022/core/option/optgroup.mjs +4 -4
  75. package/esm2022/core/option/option.mjs +4 -4
  76. package/esm2022/core/private/ripple-loader.mjs +4 -4
  77. package/esm2022/core/ripple/index.mjs +5 -5
  78. package/esm2022/core/ripple/ripple.mjs +4 -4
  79. package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox-module.mjs +5 -5
  80. package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +4 -4
  81. package/esm2022/core/version.mjs +1 -1
  82. package/esm2022/datepicker/calendar-body.mjs +4 -4
  83. package/esm2022/datepicker/calendar.mjs +7 -7
  84. package/esm2022/datepicker/date-range-input-parts.mjs +10 -10
  85. package/esm2022/datepicker/date-range-input.mjs +4 -4
  86. package/esm2022/datepicker/date-range-picker.mjs +4 -4
  87. package/esm2022/datepicker/date-range-selection-strategy.mjs +4 -4
  88. package/esm2022/datepicker/date-selection-model.mjs +10 -10
  89. package/esm2022/datepicker/datepicker-actions.mjs +10 -10
  90. package/esm2022/datepicker/datepicker-base.mjs +7 -7
  91. package/esm2022/datepicker/datepicker-input-base.mjs +4 -4
  92. package/esm2022/datepicker/datepicker-input.mjs +4 -4
  93. package/esm2022/datepicker/datepicker-intl.mjs +4 -4
  94. package/esm2022/datepicker/datepicker-module.mjs +5 -5
  95. package/esm2022/datepicker/datepicker-toggle.mjs +7 -7
  96. package/esm2022/datepicker/datepicker.mjs +4 -4
  97. package/esm2022/datepicker/month-view.mjs +4 -4
  98. package/esm2022/datepicker/multi-year-view.mjs +4 -4
  99. package/esm2022/datepicker/year-view.mjs +4 -4
  100. package/esm2022/dialog/dialog-config.mjs +1 -3
  101. package/esm2022/dialog/dialog-container.mjs +16 -5
  102. package/esm2022/dialog/dialog-content-directives.mjs +49 -31
  103. package/esm2022/dialog/dialog-ref.mjs +3 -1
  104. package/esm2022/dialog/dialog.mjs +4 -4
  105. package/esm2022/dialog/module.mjs +5 -5
  106. package/esm2022/dialog/public-api.mjs +2 -2
  107. package/esm2022/divider/divider-module.mjs +5 -5
  108. package/esm2022/divider/divider.mjs +4 -4
  109. package/esm2022/expansion/accordion.mjs +4 -4
  110. package/esm2022/expansion/expansion-module.mjs +5 -5
  111. package/esm2022/expansion/expansion-panel-content.mjs +4 -4
  112. package/esm2022/expansion/expansion-panel-header.mjs +10 -10
  113. package/esm2022/expansion/expansion-panel.mjs +7 -7
  114. package/esm2022/form-field/directives/error.mjs +4 -4
  115. package/esm2022/form-field/directives/floating-label.mjs +4 -4
  116. package/esm2022/form-field/directives/hint.mjs +4 -4
  117. package/esm2022/form-field/directives/label.mjs +4 -4
  118. package/esm2022/form-field/directives/line-ripple.mjs +4 -4
  119. package/esm2022/form-field/directives/notched-outline.mjs +4 -4
  120. package/esm2022/form-field/directives/prefix.mjs +4 -4
  121. package/esm2022/form-field/directives/suffix.mjs +4 -4
  122. package/esm2022/form-field/form-field-control.mjs +4 -4
  123. package/esm2022/form-field/form-field.mjs +4 -4
  124. package/esm2022/form-field/module.mjs +5 -5
  125. package/esm2022/grid-list/grid-list-module.mjs +5 -5
  126. package/esm2022/grid-list/grid-list.mjs +4 -4
  127. package/esm2022/grid-list/grid-tile.mjs +16 -16
  128. package/esm2022/icon/icon-module.mjs +5 -5
  129. package/esm2022/icon/icon-registry.mjs +4 -4
  130. package/esm2022/icon/icon.mjs +4 -4
  131. package/esm2022/icon/testing/fake-icon-registry.mjs +8 -8
  132. package/esm2022/input/input.mjs +4 -4
  133. package/esm2022/input/module.mjs +5 -5
  134. package/esm2022/list/action-list.mjs +4 -4
  135. package/esm2022/list/list-base.mjs +7 -7
  136. package/esm2022/list/list-item-sections.mjs +19 -19
  137. package/esm2022/list/list-module.mjs +5 -5
  138. package/esm2022/list/list-option.mjs +4 -4
  139. package/esm2022/list/list.mjs +7 -7
  140. package/esm2022/list/nav-list.mjs +4 -4
  141. package/esm2022/list/selection-list.mjs +4 -4
  142. package/esm2022/list/subheader.mjs +4 -4
  143. package/esm2022/menu/menu-content.mjs +4 -4
  144. package/esm2022/menu/menu-item.mjs +4 -4
  145. package/esm2022/menu/menu-trigger.mjs +4 -4
  146. package/esm2022/menu/menu.mjs +4 -4
  147. package/esm2022/menu/module.mjs +5 -5
  148. package/esm2022/paginator/module.mjs +5 -5
  149. package/esm2022/paginator/paginator-intl.mjs +4 -4
  150. package/esm2022/paginator/paginator.mjs +4 -4
  151. package/esm2022/progress-bar/module.mjs +5 -5
  152. package/esm2022/progress-bar/progress-bar.mjs +4 -4
  153. package/esm2022/progress-spinner/module.mjs +5 -5
  154. package/esm2022/progress-spinner/progress-spinner.mjs +4 -4
  155. package/esm2022/radio/module.mjs +5 -5
  156. package/esm2022/radio/radio.mjs +8 -8
  157. package/esm2022/select/module.mjs +5 -5
  158. package/esm2022/select/select.mjs +7 -7
  159. package/esm2022/sidenav/drawer.mjs +10 -10
  160. package/esm2022/sidenav/sidenav-module.mjs +5 -5
  161. package/esm2022/sidenav/sidenav.mjs +10 -10
  162. package/esm2022/slide-toggle/module.mjs +9 -9
  163. package/esm2022/slide-toggle/slide-toggle-required-validator.mjs +4 -4
  164. package/esm2022/slide-toggle/slide-toggle.mjs +4 -4
  165. package/esm2022/slider/module.mjs +5 -5
  166. package/esm2022/slider/slider-input.mjs +7 -7
  167. package/esm2022/slider/slider-thumb.mjs +4 -4
  168. package/esm2022/slider/slider.mjs +4 -4
  169. package/esm2022/snack-bar/module.mjs +5 -5
  170. package/esm2022/snack-bar/simple-snack-bar.mjs +4 -4
  171. package/esm2022/snack-bar/snack-bar-container.mjs +4 -4
  172. package/esm2022/snack-bar/snack-bar-content.mjs +10 -10
  173. package/esm2022/snack-bar/snack-bar.mjs +4 -4
  174. package/esm2022/sort/sort-header-intl.mjs +4 -4
  175. package/esm2022/sort/sort-header.mjs +4 -4
  176. package/esm2022/sort/sort-module.mjs +5 -5
  177. package/esm2022/sort/sort.mjs +4 -4
  178. package/esm2022/stepper/step-content.mjs +4 -4
  179. package/esm2022/stepper/step-header.mjs +5 -5
  180. package/esm2022/stepper/step-label.mjs +4 -4
  181. package/esm2022/stepper/stepper-button.mjs +7 -7
  182. package/esm2022/stepper/stepper-icon.mjs +4 -4
  183. package/esm2022/stepper/stepper-intl.mjs +4 -4
  184. package/esm2022/stepper/stepper-module.mjs +5 -5
  185. package/esm2022/stepper/stepper.mjs +7 -7
  186. package/esm2022/table/cell.mjs +22 -22
  187. package/esm2022/table/module.mjs +5 -5
  188. package/esm2022/table/row.mjs +22 -22
  189. package/esm2022/table/table.mjs +7 -7
  190. package/esm2022/table/text-column.mjs +4 -4
  191. package/esm2022/tabs/module.mjs +5 -5
  192. package/esm2022/tabs/paginated-tab-header.mjs +4 -4
  193. package/esm2022/tabs/tab-body.mjs +7 -7
  194. package/esm2022/tabs/tab-content.mjs +4 -4
  195. package/esm2022/tabs/tab-group.mjs +4 -4
  196. package/esm2022/tabs/tab-header.mjs +4 -4
  197. package/esm2022/tabs/tab-label-wrapper.mjs +4 -4
  198. package/esm2022/tabs/tab-label.mjs +4 -4
  199. package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +10 -10
  200. package/esm2022/tabs/tab.mjs +4 -4
  201. package/esm2022/toolbar/toolbar-module.mjs +5 -5
  202. package/esm2022/toolbar/toolbar.mjs +7 -7
  203. package/esm2022/tooltip/module.mjs +5 -5
  204. package/esm2022/tooltip/tooltip.mjs +7 -7
  205. package/esm2022/tree/node.mjs +10 -10
  206. package/esm2022/tree/outlet.mjs +4 -4
  207. package/esm2022/tree/padding.mjs +4 -4
  208. package/esm2022/tree/toggle.mjs +4 -4
  209. package/esm2022/tree/tree-module.mjs +5 -5
  210. package/esm2022/tree/tree.mjs +4 -4
  211. package/fesm2022/autocomplete.mjs +13 -13
  212. package/fesm2022/autocomplete.mjs.map +1 -1
  213. package/fesm2022/badge.mjs +11 -11
  214. package/fesm2022/badge.mjs.map +1 -1
  215. package/fesm2022/bottom-sheet.mjs +10 -10
  216. package/fesm2022/bottom-sheet.mjs.map +1 -1
  217. package/fesm2022/button-toggle.mjs +10 -10
  218. package/fesm2022/button-toggle.mjs.map +1 -1
  219. package/fesm2022/button.mjs +42 -42
  220. package/fesm2022/button.mjs.map +1 -1
  221. package/fesm2022/card.mjs +46 -46
  222. package/fesm2022/card.mjs.map +1 -1
  223. package/fesm2022/checkbox.mjs +16 -16
  224. package/fesm2022/checkbox.mjs.map +1 -1
  225. package/fesm2022/chips.mjs +40 -40
  226. package/fesm2022/chips.mjs.map +1 -1
  227. package/fesm2022/core.mjs +59 -59
  228. package/fesm2022/core.mjs.map +1 -1
  229. package/fesm2022/datepicker.mjs +82 -82
  230. package/fesm2022/datepicker.mjs.map +1 -1
  231. package/fesm2022/dialog.mjs +72 -43
  232. package/fesm2022/dialog.mjs.map +1 -1
  233. package/fesm2022/divider.mjs +7 -7
  234. package/fesm2022/divider.mjs.map +1 -1
  235. package/fesm2022/expansion.mjs +25 -25
  236. package/fesm2022/expansion.mjs.map +1 -1
  237. package/fesm2022/form-field.mjs +34 -34
  238. package/fesm2022/form-field.mjs.map +1 -1
  239. package/fesm2022/grid-list.mjs +22 -22
  240. package/fesm2022/grid-list.mjs.map +1 -1
  241. package/fesm2022/icon/testing.mjs +7 -7
  242. package/fesm2022/icon/testing.mjs.map +1 -1
  243. package/fesm2022/icon.mjs +10 -10
  244. package/fesm2022/icon.mjs.map +1 -1
  245. package/fesm2022/input.mjs +7 -7
  246. package/fesm2022/input.mjs.map +1 -1
  247. package/fesm2022/list.mjs +49 -49
  248. package/fesm2022/list.mjs.map +1 -1
  249. package/fesm2022/menu.mjs +16 -16
  250. package/fesm2022/menu.mjs.map +1 -1
  251. package/fesm2022/paginator.mjs +10 -10
  252. package/fesm2022/paginator.mjs.map +1 -1
  253. package/fesm2022/progress-bar.mjs +7 -7
  254. package/fesm2022/progress-bar.mjs.map +1 -1
  255. package/fesm2022/progress-spinner.mjs +7 -7
  256. package/fesm2022/progress-spinner.mjs.map +1 -1
  257. package/fesm2022/radio.mjs +11 -11
  258. package/fesm2022/radio.mjs.map +1 -1
  259. package/fesm2022/select.mjs +10 -10
  260. package/fesm2022/select.mjs.map +1 -1
  261. package/fesm2022/sidenav.mjs +22 -22
  262. package/fesm2022/sidenav.mjs.map +1 -1
  263. package/fesm2022/slide-toggle.mjs +14 -14
  264. package/fesm2022/slide-toggle.mjs.map +1 -1
  265. package/fesm2022/slider.mjs +16 -16
  266. package/fesm2022/slider.mjs.map +1 -1
  267. package/fesm2022/snack-bar.mjs +22 -22
  268. package/fesm2022/snack-bar.mjs.map +1 -1
  269. package/fesm2022/sort.mjs +13 -13
  270. package/fesm2022/sort.mjs.map +1 -1
  271. package/fesm2022/stepper.mjs +32 -32
  272. package/fesm2022/stepper.mjs.map +1 -1
  273. package/fesm2022/table.mjs +55 -55
  274. package/fesm2022/table.mjs.map +1 -1
  275. package/fesm2022/tabs.mjs +40 -40
  276. package/fesm2022/tabs.mjs.map +1 -1
  277. package/fesm2022/toolbar.mjs +10 -10
  278. package/fesm2022/toolbar.mjs.map +1 -1
  279. package/fesm2022/tooltip.mjs +10 -10
  280. package/fesm2022/tooltip.mjs.map +1 -1
  281. package/fesm2022/tree.mjs +25 -25
  282. package/fesm2022/tree.mjs.map +1 -1
  283. package/form-field/_form-field-theme.scss +31 -14
  284. package/icon/_icon-theme.scss +2 -2
  285. package/package.json +7 -7
  286. package/paginator/_paginator-theme.scss +10 -16
  287. package/prebuilt-themes/deeppurple-amber.css +1 -1
  288. package/prebuilt-themes/indigo-pink.css +1 -1
  289. package/prebuilt-themes/pink-bluegrey.css +1 -1
  290. package/prebuilt-themes/purple-green.css +1 -1
  291. package/progress-bar/_progress-bar-theme.scss +27 -9
  292. package/progress-spinner/_progress-spinner-theme.scss +38 -17
  293. package/radio/_radio-theme.scss +34 -18
  294. package/schematics/ng-add/index.js +2 -2
  295. package/schematics/ng-add/index.mjs +2 -2
  296. package/schematics/ng-add/setup-project.js +7 -75
  297. package/schematics/ng-add/setup-project.mjs +7 -75
  298. package/schematics/ng-generate/mdc-migration/index_bundled.js +122 -115
  299. package/schematics/ng-generate/mdc-migration/index_bundled.js.map +4 -4
  300. package/select/_select-theme.scss +24 -10
  301. package/slide-toggle/_slide-toggle-theme.scss +29 -9
  302. package/slider/_slider-theme.scss +28 -11
  303. package/stepper/_stepper-theme.scss +28 -7
  304. package/tabs/_tabs-theme.scss +32 -14
@@ -110,6 +110,28 @@ $_component-prefix: null;
110
110
  @return mdc-custom-properties.create-varname('#{$_component-prefix}-#{$token}');
111
111
  }
112
112
 
113
+ // TODO(crisbeto): should be able to replace the usages of `get-token-variable` with this.
114
+ // Returns a `var()` reference to a specific token. Intended for declarations
115
+ // where the token has to be referenced as a part of a larger expression.
116
+ @function get-token-variable-reference($token, $emit-fallback: false) {
117
+ @if $_component-prefix == null or $_tokens == null {
118
+ @error '`get-token-variable-reference` must be used within `use-tokens`';
119
+ }
120
+ @if not map.has-key($_tokens, $token) {
121
+ @error 'Token #{$token} does not exist. Configured tokens are: #{map.keys($_tokens)}';
122
+ }
123
+
124
+ $var: get-token-variable($token);
125
+ $fallback: if($emit-fallback, map.get($_tokens, $token), null);
126
+
127
+ @if ($fallback != null) {
128
+ @return var($var, $fallback);
129
+ }
130
+ @else {
131
+ @return var($var);
132
+ }
133
+ }
134
+
113
135
  @mixin create-token-values($prefix, $tokens) {
114
136
  @include _configure-token-prefix($prefix...) {
115
137
  @include mdc-keys.declare-custom-properties($tokens, $_component-prefix);
@@ -1,18 +1,21 @@
1
1
  @use 'sass:map';
2
2
  @use 'sass:meta';
3
3
  @use '../../style/sass-utils';
4
+ @use './mat/app' as tokens-mat-app;
4
5
  @use './mat/autocomplete' as tokens-mat-autocomplete;
5
6
  @use './mat/badge' as tokens-mat-badge;
6
7
  @use './mat/text-button' as tokens-mat-text-button;
7
8
  @use './mat/protected-button' as tokens-mat-protected-button;
8
9
  @use './mat/filled-button' as tokens-mat-filled-button;
9
10
  @use './mat/outlined-button' as tokens-mat-outlined-button;
11
+ @use './mat/dialog' as tokens-mat-dialog;
10
12
  @use './mat/bottom-sheet' as tokens-mat-bottom-sheet;
11
13
  @use './mat/card' as tokens-mat-card;
12
14
  @use './mat/datepicker' as tokens-mat-datepicker;
13
15
  @use './mat/divider' as tokens-mat-divider;
14
16
  @use './mat/expansion' as tokens-mat-expansion;
15
17
  @use './mat/fab' as tokens-mat-fab;
18
+ @use './mat/fab-small' as tokens-mat-fab-small;
16
19
  @use './mat/form-field' as tokens-mat-form-field;
17
20
  @use './mat/grid-list' as tokens-mat-grid-list;
18
21
  @use './mat/icon' as tokens-mat-icon;
@@ -21,6 +24,9 @@
21
24
  @use './mat/option' as tokens-mat-option;
22
25
  @use './mat/optgroup' as tokens-mat-optgroup;
23
26
  @use './mat/paginator' as tokens-mat-paginator;
27
+ @use './mat/checkbox' as tokens-mat-checkbox;
28
+ @use './mat/full-pseudo-checkbox' as tokens-mat-full-pseudo-checkbox;
29
+ @use './mat/minimal-pseudo-checkbox' as tokens-mat-minimal-pseudo-checkbox;
24
30
  @use './mat/radio' as tokens-mat-radio;
25
31
  @use './mat/ripple' as tokens-mat-ripple;
26
32
  @use './mat/select' as tokens-mat-select;
@@ -46,6 +52,8 @@
46
52
  @use './mdc/elevated-card' as tokens-mdc-elevated-card;
47
53
  @use './mdc/extended-fab' as tokens-mdc-extended-fab;
48
54
  @use './mdc/fab' as tokens-mdc-fab;
55
+ @use './mdc/fab-small' as tokens-mdc-fab-small;
56
+ @use './mdc/form-field' as tokens-mdc-form-field;
49
57
  @use './mdc/filled-text-field' as tokens-mdc-filled-text-field;
50
58
  @use './mdc/icon-button' as tokens-mdc-icon-button;
51
59
  @use './mdc/linear-progress' as tokens-mdc-linear-progress;
@@ -103,15 +111,18 @@
103
111
  /// )
104
112
  @function m2-tokens-from-theme($theme) {
105
113
  @return sass-utils.deep-merge-all(
114
+ _get-tokens-for-module($theme, tokens-mat-app),
106
115
  _get-tokens-for-module($theme, tokens-mat-autocomplete),
107
116
  _get-tokens-for-module($theme, tokens-mat-badge),
108
117
  _get-tokens-for-module($theme, tokens-mat-bottom-sheet),
109
118
  _get-tokens-for-module($theme, tokens-mat-button-toggle),
110
119
  _get-tokens-for-module($theme, tokens-mat-card),
111
120
  _get-tokens-for-module($theme, tokens-mat-datepicker),
121
+ _get-tokens-for-module($theme, tokens-mat-dialog),
112
122
  _get-tokens-for-module($theme, tokens-mat-divider),
113
123
  _get-tokens-for-module($theme, tokens-mat-expansion),
114
124
  _get-tokens-for-module($theme, tokens-mat-fab),
125
+ _get-tokens-for-module($theme, tokens-mat-fab-small),
115
126
  _get-tokens-for-module($theme, tokens-mat-filled-button),
116
127
  _get-tokens-for-module($theme, tokens-mat-form-field),
117
128
  _get-tokens-for-module($theme, tokens-mat-grid-list),
@@ -122,6 +133,9 @@
122
133
  _get-tokens-for-module($theme, tokens-mat-option),
123
134
  _get-tokens-for-module($theme, tokens-mat-outlined-button),
124
135
  _get-tokens-for-module($theme, tokens-mat-paginator),
136
+ _get-tokens-for-module($theme, tokens-mat-checkbox),
137
+ _get-tokens-for-module($theme, tokens-mat-full-pseudo-checkbox),
138
+ _get-tokens-for-module($theme, tokens-mat-minimal-pseudo-checkbox),
125
139
  _get-tokens-for-module($theme, tokens-mat-protected-button),
126
140
  _get-tokens-for-module($theme, tokens-mat-radio),
127
141
  _get-tokens-for-module($theme, tokens-mat-ripple),
@@ -144,8 +158,10 @@
144
158
  _get-tokens-for-module($theme, tokens-mdc-elevated-card),
145
159
  _get-tokens-for-module($theme, tokens-mdc-extended-fab),
146
160
  _get-tokens-for-module($theme, tokens-mdc-fab),
161
+ _get-tokens-for-module($theme, tokens-mdc-fab-small),
147
162
  _get-tokens-for-module($theme, tokens-mdc-filled-button),
148
163
  _get-tokens-for-module($theme, tokens-mdc-filled-text-field),
164
+ _get-tokens-for-module($theme, tokens-mdc-form-field),
149
165
  _get-tokens-for-module($theme, tokens-mdc-icon-button),
150
166
  _get-tokens-for-module($theme, tokens-mdc-linear-progress),
151
167
  _get-tokens-for-module($theme, tokens-mdc-list),
@@ -1,5 +1,6 @@
1
1
  @use 'sass:meta';
2
2
  @use 'sass:map';
3
+ @use 'sass:math';
3
4
  @use 'sass:color';
4
5
  @use '../../token-utils';
5
6
  @use '../../../theming/inspection';
@@ -11,7 +12,32 @@ $prefix: (mat, badge);
11
12
  // Tokens that can't be configured through Angular Material's current theming API,
12
13
  // but may be in a future version of the theming API.
13
14
  @function get-unthemable-tokens() {
14
- @return ();
15
+ $default-size: 22px;
16
+ $small-size: $default-size - 6;
17
+ $large-size: $default-size + 6;
18
+
19
+ @return (
20
+ container-shape: 50%,
21
+ container-size: unset,
22
+ small-size-container-size: unset,
23
+ large-size-container-size: unset,
24
+
25
+ legacy-container-size: $default-size,
26
+ legacy-small-size-container-size: $small-size,
27
+ legacy-large-size-container-size: $large-size,
28
+
29
+ container-offset: math.div($default-size, -2) 0,
30
+ small-size-container-offset: math.div($small-size, -2) 0,
31
+ large-size-container-offset: math.div($large-size, -2) 0,
32
+
33
+ container-overlap-offset: math.div($default-size, -2),
34
+ small-size-container-overlap-offset: math.div($small-size, -2),
35
+ large-size-container-overlap-offset: math.div($large-size, -2),
36
+
37
+ container-padding: 0,
38
+ small-size-container-padding: 0,
39
+ large-size-container-padding: 0,
40
+ );
15
41
  }
16
42
 
17
43
  // Tokens that can be configured through Angular Material's color theming API.
@@ -0,0 +1,45 @@
1
+ @use '../../token-utils';
2
+ @use '../../../theming/theming';
3
+ @use '../../../theming/inspection';
4
+ @use '../../../style/sass-utils';
5
+
6
+ // The prefix used to generate the fully qualified name for tokens in this file.
7
+ $prefix: (mat, checkbox);
8
+
9
+ // Tokens that can't be configured through Angular Material's current theming API,
10
+ // but may be in a future version of the theming API.
11
+ @function get-unthemable-tokens() {
12
+ @return ();
13
+ }
14
+
15
+ // Tokens that can be configured through Angular Material's color theming API.
16
+ @function get-color-tokens($theme) {
17
+ @return (
18
+ disabled-label-color: inspection.get-theme-color($theme, foreground, disabled-text),
19
+ );
20
+ }
21
+
22
+ // Tokens that can be configured through Angular Material's typography theming API.
23
+ @function get-typography-tokens($theme) {
24
+ @return ();
25
+ }
26
+
27
+ // Tokens that can be configured through Angular Material's density theming API.
28
+ @function get-density-tokens($theme) {
29
+ $density-scale: theming.clamp-density(inspection.get-theme-density($theme), -3);
30
+
31
+ @return (
32
+ touch-target-display: if($density-scale < -1, none, block),
33
+ );
34
+ }
35
+
36
+ // Combines the tokens generated by the above functions into a single map with placeholder values.
37
+ // This is used to create token slots.
38
+ @function get-token-slots() {
39
+ @return sass-utils.deep-merge-all(
40
+ get-unthemable-tokens(),
41
+ get-color-tokens(token-utils.$placeholder-color-config),
42
+ get-typography-tokens(token-utils.$placeholder-typography-config),
43
+ get-density-tokens(token-utils.$placeholder-density-config)
44
+ );
45
+ }
@@ -0,0 +1,49 @@
1
+ @use '../../token-utils';
2
+ @use '../../../style/sass-utils';
3
+
4
+ // The prefix used to generate the fully qualified name for tokens in this file.
5
+ $prefix: (mat, dialog);
6
+
7
+ // Tokens that can't be configured through Angular Material's current theming API,
8
+ // but may be in a future version of the theming API.
9
+ @function get-unthemable-tokens() {
10
+ @return (
11
+ container-max-width: 80vw,
12
+ container-small-max-width: 80vw,
13
+ container-min-width: 0,
14
+ actions-alignment: start,
15
+ actions-padding: 8px,
16
+ content-padding: 20px 24px,
17
+ with-actions-content-padding: 20px 24px,
18
+
19
+ // Note: the CSS class is `title` while the M2 tokens call it `subhead`.
20
+ // M3 calls it `headline` which is what we're aligning with.
21
+ headline-padding: 0 24px 9px,
22
+ );
23
+ }
24
+
25
+ // Tokens that can be configured through Angular Material's color theming API.
26
+ @function get-color-tokens($theme) {
27
+ @return ();
28
+ }
29
+
30
+ // Tokens that can be configured through Angular Material's typography theming API.
31
+ @function get-typography-tokens($theme) {
32
+ @return ();
33
+ }
34
+
35
+ // Tokens that can be configured through Angular Material's density theming API.
36
+ @function get-density-tokens($theme) {
37
+ @return ();
38
+ }
39
+
40
+ // Combines the tokens generated by the above functions into a single map with placeholder values.
41
+ // This is used to create token slots.
42
+ @function get-token-slots() {
43
+ @return sass-utils.deep-merge-all(
44
+ get-unthemable-tokens(),
45
+ get-color-tokens(token-utils.$placeholder-color-config),
46
+ get-typography-tokens(token-utils.$placeholder-typography-config),
47
+ get-density-tokens(token-utils.$placeholder-density-config)
48
+ );
49
+ }
@@ -0,0 +1,95 @@
1
+ @use 'sass:map';
2
+ @use '@material/ripple/ripple-theme' as mdc-ripple-theme;
3
+ @use '../../token-utils';
4
+ @use '../../../theming/theming';
5
+ @use '../../../theming/inspection';
6
+ @use '../../../style/sass-utils';
7
+ @use '../../../mdc-helpers/mdc-helpers';
8
+
9
+ // The prefix used to generate the fully qualified name for tokens in this file.
10
+ $prefix: (mat, fab-small);
11
+
12
+ // Tokens that can't be configured through Angular Material's current theming API,
13
+ // but may be in a future version of the theming API.
14
+ @function get-unthemable-tokens() {
15
+ @return ();
16
+ }
17
+
18
+ // Tokens that can be configured through Angular Material's color theming API.
19
+ @function get-color-tokens($theme) {
20
+ $is-dark: inspection.get-theme-type($theme) == dark;
21
+ $on-surface: if($is-dark, #fff, #000);
22
+ $ripple-opacities: if($is-dark,
23
+ mdc-ripple-theme.$light-ink-opacities,
24
+ mdc-ripple-theme.$dark-ink-opacities
25
+ );
26
+
27
+ @return (
28
+ // Color of icons and text projected into a FAB.
29
+ foreground-color: inspection.get-theme-color($theme, foreground, base),
30
+
31
+ // Color of the element that shows the hover, focus and pressed states.
32
+ state-layer-color: $on-surface,
33
+
34
+ // Color of the element that shows the hover, focus and pressed states while disabled.
35
+ disabled-state-layer-color: $on-surface,
36
+
37
+ // Color of the ripple element.
38
+ ripple-color: rgba($on-surface, 0.1),
39
+
40
+ // Opacity of the ripple when the button is hovered.
41
+ hover-state-layer-opacity: map.get($ripple-opacities, hover),
42
+
43
+ // Opacity of the ripple when the button is focused.
44
+ focus-state-layer-opacity: map.get($ripple-opacities, focus),
45
+
46
+ // Opacity of the ripple when the button is pressed.
47
+ pressed-state-layer-opacity: map.get($ripple-opacities, press),
48
+
49
+ // MDC doesn't have tokens for disabled FABs so we need to implemented them ourselves.
50
+ // Background color of the container when the FAB is disabled.
51
+ disabled-state-container-color: rgba($on-surface, 0.12),
52
+
53
+ // Color of the icons and projected text when the FAB is disabled.
54
+ disabled-state-foreground-color: rgba($on-surface, if($is-dark, 0.5, 0.38)),
55
+ );
56
+ }
57
+
58
+ // Generates the mapping for the properties that change based on the FAB palette color.
59
+ @function private-get-color-palette-color-tokens($theme, $palette-name) {
60
+ $is-dark: inspection.get-theme-type($theme) == dark;
61
+ $container-color: inspection.get-theme-color($theme, $palette-name);
62
+ $contrast-tone: mdc-helpers.variable-safe-contrast-tone($container-color, $is-dark);
63
+ $color: if($contrast-tone == 'dark', #000, #fff);
64
+
65
+ @return (
66
+ foreground-color: $color,
67
+ state-layer-color: $color,
68
+ ripple-color: rgba($color, 0.1),
69
+ );
70
+ }
71
+
72
+ // Tokens that can be configured through Angular Material's typography theming API.
73
+ @function get-typography-tokens($theme) {
74
+ @return ();
75
+ }
76
+
77
+ // Tokens that can be configured through Angular Material's density theming API.
78
+ @function get-density-tokens($theme) {
79
+ $density-scale: theming.clamp-density(inspection.get-theme-density($theme), -3);
80
+
81
+ @return (
82
+ touch-target-display: if($density-scale < -1, none, block),
83
+ );
84
+ }
85
+
86
+ // Combines the tokens generated by the above functions into a single map with placeholder values.
87
+ // This is used to create token slots.
88
+ @function get-token-slots() {
89
+ @return sass-utils.deep-merge-all(
90
+ get-unthemable-tokens(),
91
+ get-color-tokens(token-utils.$placeholder-color-config),
92
+ get-typography-tokens(token-utils.$placeholder-typography-config),
93
+ get-density-tokens(token-utils.$placeholder-density-config)
94
+ );
95
+ }
@@ -1,6 +1,7 @@
1
1
  @use 'sass:map';
2
2
  @use '@material/ripple/ripple-theme' as mdc-ripple-theme;
3
3
  @use '../../token-utils';
4
+ @use '../../../theming/theming';
4
5
  @use '../../../theming/inspection';
5
6
  @use '../../../style/sass-utils';
6
7
  @use '../../../mdc-helpers/mdc-helpers';
@@ -75,7 +76,11 @@ $prefix: (mat, fab);
75
76
 
76
77
  // Tokens that can be configured through Angular Material's density theming API.
77
78
  @function get-density-tokens($theme) {
78
- @return ();
79
+ $density-scale: theming.clamp-density(inspection.get-theme-density($theme), -3);
80
+
81
+ @return (
82
+ touch-target-display: if($density-scale < -1, none, block),
83
+ );
79
84
  }
80
85
 
81
86
  // Combines the tokens generated by the above functions into a single map with placeholder values.
@@ -1,6 +1,7 @@
1
1
  @use 'sass:map';
2
2
  @use '@material/ripple/ripple-theme' as mdc-ripple-theme;
3
3
  @use '../../token-utils';
4
+ @use '../../../theming/theming';
4
5
  @use '../../../theming/inspection';
5
6
  @use '../../../style/sass-utils';
6
7
  @use '../../../mdc-helpers/mdc-helpers';
@@ -11,7 +12,17 @@ $prefix: (mat, filled-button);
11
12
  // Tokens that can't be configured through Angular Material's current theming API,
12
13
  // but may be in a future version of the theming API.
13
14
  @function get-unthemable-tokens() {
14
- @return ();
15
+ @return (
16
+ // Start/end padding of the button.
17
+ horizontal-padding: 16px,
18
+
19
+ // Space between the icon and the button's main content.
20
+ icon-spacing: 8px,
21
+
22
+ // Amount by which to offset the icon so that its presence
23
+ // doesn't increase throw off the horizontal padding.
24
+ icon-offset: -4px,
25
+ );
15
26
  }
16
27
 
17
28
  // Tokens that can be configured through Angular Material's color theming API.
@@ -64,7 +75,11 @@ $prefix: (mat, filled-button);
64
75
 
65
76
  // Tokens that can be configured through Angular Material's density theming API.
66
77
  @function get-density-tokens($theme) {
67
- @return ();
78
+ $density-scale: theming.clamp-density(inspection.get-theme-density($theme), -3);
79
+
80
+ @return (
81
+ touch-target-display: if($density-scale < -1, none, block),
82
+ );
68
83
  }
69
84
 
70
85
  // Combines the tokens generated by the above functions into a single map with placeholder values.
@@ -2,6 +2,7 @@
2
2
  @use 'sass:meta';
3
3
  @use '@material/ripple/ripple-theme' as mdc-ripple-theme;
4
4
  @use '../../token-utils';
5
+ @use '../../../theming/theming';
5
6
  @use '../../../theming/inspection';
6
7
  @use '../../../style/sass-utils';
7
8
 
@@ -61,7 +62,11 @@ $prefix: (mat, icon-button);
61
62
 
62
63
  // Tokens that can be configured through Angular Material's density theming API.
63
64
  @function get-density-tokens($theme) {
64
- @return ();
65
+ $density-scale: theming.clamp-density(inspection.get-theme-density($theme), -3);
66
+
67
+ @return (
68
+ touch-target-display: if($density-scale < -1, none, block),
69
+ );
65
70
  }
66
71
 
67
72
  // Combines the tokens generated by the above functions into a single map with placeholder values.
@@ -2,6 +2,7 @@
2
2
  @use 'sass:meta';
3
3
  @use '@material/ripple/ripple-theme' as mdc-ripple-theme;
4
4
  @use '../../token-utils';
5
+ @use '../../../theming/theming';
5
6
  @use '../../../theming/inspection';
6
7
  @use '../../../style/sass-utils';
7
8
 
@@ -11,7 +12,17 @@ $prefix: (mat, outlined-button);
11
12
  // Tokens that can't be configured through Angular Material's current theming API,
12
13
  // but may be in a future version of the theming API.
13
14
  @function get-unthemable-tokens() {
14
- @return ();
15
+ @return (
16
+ // Start/end padding of the button.
17
+ horizontal-padding: 15px, // Normally it's 16px, but -1px for the outline.
18
+
19
+ // Space between the icon and the button's main content.
20
+ icon-spacing: 8px,
21
+
22
+ // Amount by which to offset the icon so that its presence
23
+ // doesn't increase throw off the horizontal padding.
24
+ icon-offset: -4px,
25
+ );
15
26
  }
16
27
 
17
28
  // Tokens that can be configured through Angular Material's color theming API.
@@ -61,7 +72,11 @@ $prefix: (mat, outlined-button);
61
72
 
62
73
  // Tokens that can be configured through Angular Material's density theming API.
63
74
  @function get-density-tokens($theme) {
64
- @return ();
75
+ $density-scale: theming.clamp-density(inspection.get-theme-density($theme), -3);
76
+
77
+ @return (
78
+ touch-target-display: if($density-scale < -1, none, block),
79
+ );
65
80
  }
66
81
 
67
82
  // Combines the tokens generated by the above functions into a single map with placeholder values.
@@ -1,6 +1,7 @@
1
1
  @use 'sass:map';
2
2
  @use '@material/ripple/ripple-theme' as mdc-ripple-theme;
3
3
  @use '../../token-utils';
4
+ @use '../../../theming/theming';
4
5
  @use '../../../theming/inspection';
5
6
  @use '../../../style/sass-utils';
6
7
  @use '../../../mdc-helpers/mdc-helpers';
@@ -11,7 +12,17 @@ $prefix: (mat, protected-button);
11
12
  // Tokens that can't be configured through Angular Material's current theming API,
12
13
  // but may be in a future version of the theming API.
13
14
  @function get-unthemable-tokens() {
14
- @return ();
15
+ @return (
16
+ // Start/end padding of the button.
17
+ horizontal-padding: 16px,
18
+
19
+ // Space between the icon and the button's main content.
20
+ icon-spacing: 8px,
21
+
22
+ // Amount by which to offset the icon so that its presence
23
+ // doesn't increase throw off the horizontal padding.
24
+ icon-offset: -4px,
25
+ );
15
26
  }
16
27
 
17
28
  // Tokens that can be configured through Angular Material's color theming API.
@@ -64,7 +75,11 @@ $prefix: (mat, protected-button);
64
75
 
65
76
  // Tokens that can be configured through Angular Material's density theming API.
66
77
  @function get-density-tokens($theme) {
67
- @return ();
78
+ $density-scale: theming.clamp-density(inspection.get-theme-density($theme), -3);
79
+
80
+ @return (
81
+ touch-target-display: if($density-scale < -1, none, block),
82
+ );
68
83
  }
69
84
 
70
85
  // Combines the tokens generated by the above functions into a single map with placeholder values.
@@ -1,4 +1,5 @@
1
1
  @use '../../token-utils';
2
+ @use '../../../theming/theming';
2
3
  @use '../../../theming/inspection';
3
4
  @use '../../../style/sass-utils';
4
5
 
@@ -29,7 +30,11 @@ $prefix: (mat, radio);
29
30
 
30
31
  // Tokens that can be configured through Angular Material's density theming API.
31
32
  @function get-density-tokens($theme) {
32
- @return ();
33
+ $density-scale: theming.clamp-density(inspection.get-theme-density($theme), -3);
34
+
35
+ @return (
36
+ touch-target-display: if($density-scale < -1, none, block),
37
+ );
33
38
  }
34
39
 
35
40
  // Combines the tokens generated by the above functions into a single map with placeholder values.
@@ -10,7 +10,12 @@ $prefix: (mat, stepper);
10
10
  // Tokens that can't be configured through Angular Material's current theming API,
11
11
  // but may be in a future version of the theming API.
12
12
  @function get-unthemable-tokens() {
13
- @return ();
13
+ @return (
14
+ // Border radius for step header on focus
15
+ header-focus-state-layer-shape: 0,
16
+ // Border radius for step header on hover
17
+ header-hover-state-layer-shape: 0,
18
+ );
14
19
  }
15
20
 
16
21
  // Tokens that can be configured through Angular Material's color theming API.
@@ -2,6 +2,7 @@
2
2
  @use 'sass:meta';
3
3
  @use '@material/ripple/ripple-theme' as mdc-ripple-theme;
4
4
  @use '../../token-utils';
5
+ @use '../../../theming/theming';
5
6
  @use '../../../theming/inspection';
6
7
  @use '../../../style/sass-utils';
7
8
 
@@ -11,7 +12,20 @@ $prefix: (mat, text-button);
11
12
  // Tokens that can't be configured through Angular Material's current theming API,
12
13
  // but may be in a future version of the theming API.
13
14
  @function get-unthemable-tokens() {
14
- @return ();
15
+ @return (
16
+ // Start/end padding of the button.
17
+ horizontal-padding: 8px,
18
+
19
+ // Start/end padding of the button when it has an icon.
20
+ with-icon-horizontal-padding: 8px,
21
+
22
+ // Space between the icon and the button's main content.
23
+ icon-spacing: 8px,
24
+
25
+ // Amount by which to offset the icon so that its presence
26
+ // doesn't increase throw off the horizontal padding.
27
+ icon-offset: 0,
28
+ );
15
29
  }
16
30
 
17
31
  // Tokens that can be configured through Angular Material's color theming API.
@@ -61,7 +75,11 @@ $prefix: (mat, text-button);
61
75
 
62
76
  // Tokens that can be configured through Angular Material's density theming API.
63
77
  @function get-density-tokens($theme) {
64
- @return ();
78
+ $density-scale: theming.clamp-density(inspection.get-theme-density($theme), -3);
79
+
80
+ @return (
81
+ touch-target-display: if($density-scale < -1, none, block),
82
+ );
65
83
  }
66
84
 
67
85
  // Combines the tokens generated by the above functions into a single map with placeholder values.
@@ -8,12 +8,13 @@ $prefix: (mdc, extended-fab);
8
8
 
9
9
  @function get-unthemable-tokens() {
10
10
  @return (
11
+ container-height: 48px,
12
+ container-shape: 24px,
13
+
11
14
  // =============================================================================================
12
15
  // = TOKENS NOT USED IN ANGULAR MATERIAL =
13
16
  // =============================================================================================
14
17
  container-color: null,
15
- container-height: null,
16
- container-shape: null,
17
18
  container-surface-tint-layer-color: null,
18
19
  focus-icon-color: null,
19
20
  focus-label-text-color: null,