@angular/material 17.2.0-next.1 → 17.2.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 (294) hide show
  1. package/_index.scss +3 -20
  2. package/autocomplete/_autocomplete-theme.scss +21 -3
  3. package/badge/_badge-theme.scss +3 -0
  4. package/bottom-sheet/_bottom-sheet-theme.scss +3 -0
  5. package/button/_button-theme.scss +4 -1
  6. package/button/_fab-theme.scss +3 -0
  7. package/button/_icon-button-theme.scss +3 -0
  8. package/button-toggle/_button-toggle-theme.scss +3 -0
  9. package/card/_card-theme.scss +3 -0
  10. package/checkbox/_checkbox-theme.scss +3 -0
  11. package/chips/_chips-theme.scss +10 -1
  12. package/core/_core-theme.scss +3 -0
  13. package/core/option/_optgroup-theme.scss +3 -0
  14. package/core/option/_option-theme.scss +3 -0
  15. package/core/ripple/_ripple-theme.scss +3 -0
  16. package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +3 -0
  17. package/core/style/_menu-common.scss +5 -18
  18. package/core/theming/_inspection.scss +2 -1
  19. package/core/theming/_m2-inspection.scss +2 -1
  20. package/core/theming/_validation.scss +5 -0
  21. package/core/tokens/m2/_index.scss +9 -2
  22. package/core/tokens/m2/mat/_autocomplete.scss +5 -1
  23. package/core/tokens/m2/mat/_chip.scss +26 -2
  24. package/core/tokens/m2/mat/_datepicker.scss +10 -1
  25. package/core/tokens/m2/mat/_legacy-button-toggle.scss +5 -5
  26. package/core/tokens/m2/mat/_list.scss +44 -0
  27. package/core/tokens/m2/mat/_menu.scss +9 -0
  28. package/core/tokens/m2/mat/_paginator.scss +22 -2
  29. package/core/tokens/m2/mat/_select.scss +15 -2
  30. package/core/tokens/m2/mat/_sidenav.scss +3 -0
  31. package/core/tokens/m2/mat/_standard-button-toggle.scss +5 -5
  32. package/core/tokens/m2/mat/_switch.scss +69 -0
  33. package/core/tokens/m2/mdc/_chip.scss +26 -26
  34. package/core/tokens/m2/mdc/_switch.scss +1 -1
  35. package/core/typography/_all-typography.scss +6 -1
  36. package/core/typography/_typography.scss +126 -1
  37. package/datepicker/_datepicker-theme.scss +9 -1
  38. package/dialog/_dialog-theme.scss +3 -0
  39. package/divider/_divider-theme.scss +3 -0
  40. package/esm2022/autocomplete/autocomplete-origin.mjs +3 -3
  41. package/esm2022/autocomplete/autocomplete-trigger.mjs +3 -3
  42. package/esm2022/autocomplete/autocomplete.mjs +5 -5
  43. package/esm2022/autocomplete/module.mjs +4 -4
  44. package/esm2022/badge/badge-module.mjs +4 -4
  45. package/esm2022/badge/badge.mjs +6 -6
  46. package/esm2022/bottom-sheet/bottom-sheet-container.mjs +3 -3
  47. package/esm2022/bottom-sheet/bottom-sheet-module.mjs +4 -4
  48. package/esm2022/bottom-sheet/bottom-sheet.mjs +3 -3
  49. package/esm2022/button/button-base.mjs +6 -6
  50. package/esm2022/button/button.mjs +6 -6
  51. package/esm2022/button/fab.mjs +12 -12
  52. package/esm2022/button/icon-button.mjs +6 -6
  53. package/esm2022/button/module.mjs +4 -4
  54. package/esm2022/button-toggle/button-toggle-module.mjs +4 -4
  55. package/esm2022/button-toggle/button-toggle.mjs +8 -8
  56. package/esm2022/card/card.mjs +42 -42
  57. package/esm2022/card/module.mjs +4 -4
  58. package/esm2022/checkbox/checkbox-required-validator.mjs +3 -3
  59. package/esm2022/checkbox/checkbox.mjs +3 -3
  60. package/esm2022/checkbox/module.mjs +8 -8
  61. package/esm2022/chips/chip-action.mjs +3 -3
  62. package/esm2022/chips/chip-edit-input.mjs +3 -3
  63. package/esm2022/chips/chip-grid.mjs +3 -3
  64. package/esm2022/chips/chip-icons.mjs +9 -9
  65. package/esm2022/chips/chip-input.mjs +3 -3
  66. package/esm2022/chips/chip-listbox.mjs +3 -3
  67. package/esm2022/chips/chip-option.mjs +6 -6
  68. package/esm2022/chips/chip-row.mjs +6 -6
  69. package/esm2022/chips/chip-set.mjs +3 -3
  70. package/esm2022/chips/chip.mjs +5 -5
  71. package/esm2022/chips/module.mjs +4 -4
  72. package/esm2022/core/common-behaviors/common-module.mjs +4 -4
  73. package/esm2022/core/datetime/index.mjs +8 -8
  74. package/esm2022/core/datetime/native-date-adapter.mjs +3 -3
  75. package/esm2022/core/error/error-options.mjs +6 -6
  76. package/esm2022/core/internal-form-field/internal-form-field.mjs +3 -3
  77. package/esm2022/core/line/line.mjs +7 -7
  78. package/esm2022/core/option/index.mjs +4 -4
  79. package/esm2022/core/option/optgroup.mjs +3 -3
  80. package/esm2022/core/option/option.mjs +5 -5
  81. package/esm2022/core/private/ripple-loader.mjs +3 -3
  82. package/esm2022/core/ripple/index.mjs +4 -4
  83. package/esm2022/core/ripple/ripple.mjs +3 -3
  84. package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox-module.mjs +4 -4
  85. package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +3 -3
  86. package/esm2022/core/version.mjs +1 -1
  87. package/esm2022/datepicker/calendar-body.mjs +5 -5
  88. package/esm2022/datepicker/calendar.mjs +8 -8
  89. package/esm2022/datepicker/date-range-input-parts.mjs +9 -9
  90. package/esm2022/datepicker/date-range-input.mjs +3 -3
  91. package/esm2022/datepicker/date-range-picker.mjs +3 -3
  92. package/esm2022/datepicker/date-range-selection-strategy.mjs +3 -3
  93. package/esm2022/datepicker/date-selection-model.mjs +9 -9
  94. package/esm2022/datepicker/datepicker-actions.mjs +9 -9
  95. package/esm2022/datepicker/datepicker-base.mjs +8 -8
  96. package/esm2022/datepicker/datepicker-input-base.mjs +3 -3
  97. package/esm2022/datepicker/datepicker-input.mjs +3 -3
  98. package/esm2022/datepicker/datepicker-intl.mjs +3 -3
  99. package/esm2022/datepicker/datepicker-module.mjs +4 -4
  100. package/esm2022/datepicker/datepicker-toggle.mjs +6 -6
  101. package/esm2022/datepicker/datepicker.mjs +3 -3
  102. package/esm2022/datepicker/month-view.mjs +3 -3
  103. package/esm2022/datepicker/multi-year-view.mjs +3 -3
  104. package/esm2022/datepicker/year-view.mjs +3 -3
  105. package/esm2022/dialog/dialog-container.mjs +3 -3
  106. package/esm2022/dialog/dialog-content-directives.mjs +15 -15
  107. package/esm2022/dialog/dialog.mjs +3 -3
  108. package/esm2022/dialog/module.mjs +4 -4
  109. package/esm2022/divider/divider-module.mjs +4 -4
  110. package/esm2022/divider/divider.mjs +3 -3
  111. package/esm2022/expansion/accordion.mjs +3 -3
  112. package/esm2022/expansion/expansion-module.mjs +4 -4
  113. package/esm2022/expansion/expansion-panel-content.mjs +3 -3
  114. package/esm2022/expansion/expansion-panel-header.mjs +9 -9
  115. package/esm2022/expansion/expansion-panel.mjs +6 -6
  116. package/esm2022/form-field/directives/error.mjs +3 -3
  117. package/esm2022/form-field/directives/floating-label.mjs +3 -3
  118. package/esm2022/form-field/directives/hint.mjs +3 -3
  119. package/esm2022/form-field/directives/label.mjs +3 -3
  120. package/esm2022/form-field/directives/line-ripple.mjs +3 -3
  121. package/esm2022/form-field/directives/notched-outline.mjs +3 -3
  122. package/esm2022/form-field/directives/prefix.mjs +3 -3
  123. package/esm2022/form-field/directives/suffix.mjs +3 -3
  124. package/esm2022/form-field/form-field-control.mjs +3 -3
  125. package/esm2022/form-field/form-field.mjs +6 -6
  126. package/esm2022/form-field/module.mjs +4 -4
  127. package/esm2022/grid-list/grid-list-module.mjs +4 -4
  128. package/esm2022/grid-list/grid-list.mjs +3 -3
  129. package/esm2022/grid-list/grid-tile.mjs +15 -15
  130. package/esm2022/icon/icon-module.mjs +4 -4
  131. package/esm2022/icon/icon-registry.mjs +3 -3
  132. package/esm2022/icon/icon.mjs +3 -3
  133. package/esm2022/icon/testing/fake-icon-registry.mjs +7 -7
  134. package/esm2022/input/input.mjs +3 -3
  135. package/esm2022/input/module.mjs +4 -4
  136. package/esm2022/list/action-list.mjs +4 -4
  137. package/esm2022/list/list-base.mjs +6 -6
  138. package/esm2022/list/list-item-sections.mjs +18 -18
  139. package/esm2022/list/list-module.mjs +4 -4
  140. package/esm2022/list/list-option.mjs +3 -3
  141. package/esm2022/list/list.mjs +7 -7
  142. package/esm2022/list/nav-list.mjs +4 -4
  143. package/esm2022/list/selection-list.mjs +7 -7
  144. package/esm2022/list/subheader.mjs +3 -3
  145. package/esm2022/menu/menu-content.mjs +3 -3
  146. package/esm2022/menu/menu-item.mjs +3 -3
  147. package/esm2022/menu/menu-trigger.mjs +3 -3
  148. package/esm2022/menu/menu.mjs +5 -5
  149. package/esm2022/menu/module.mjs +4 -4
  150. package/esm2022/paginator/module.mjs +4 -4
  151. package/esm2022/paginator/paginator-intl.mjs +3 -3
  152. package/esm2022/paginator/paginator.mjs +5 -5
  153. package/esm2022/progress-bar/module.mjs +4 -4
  154. package/esm2022/progress-bar/progress-bar.mjs +4 -4
  155. package/esm2022/progress-spinner/module.mjs +4 -4
  156. package/esm2022/progress-spinner/progress-spinner.mjs +3 -3
  157. package/esm2022/radio/module.mjs +4 -4
  158. package/esm2022/radio/radio.mjs +6 -6
  159. package/esm2022/select/module.mjs +4 -4
  160. package/esm2022/select/select.mjs +9 -9
  161. package/esm2022/sidenav/drawer.mjs +12 -12
  162. package/esm2022/sidenav/sidenav-module.mjs +4 -4
  163. package/esm2022/sidenav/sidenav.mjs +12 -12
  164. package/esm2022/slide-toggle/module.mjs +8 -8
  165. package/esm2022/slide-toggle/slide-toggle-required-validator.mjs +3 -3
  166. package/esm2022/slide-toggle/slide-toggle.mjs +6 -6
  167. package/esm2022/slider/module.mjs +4 -4
  168. package/esm2022/slider/slider-input.mjs +6 -6
  169. package/esm2022/slider/slider-thumb.mjs +3 -3
  170. package/esm2022/slider/slider.mjs +3 -3
  171. package/esm2022/snack-bar/module.mjs +4 -4
  172. package/esm2022/snack-bar/simple-snack-bar.mjs +3 -3
  173. package/esm2022/snack-bar/snack-bar-container.mjs +3 -3
  174. package/esm2022/snack-bar/snack-bar-content.mjs +9 -9
  175. package/esm2022/snack-bar/snack-bar.mjs +3 -3
  176. package/esm2022/sort/sort-header-intl.mjs +3 -3
  177. package/esm2022/sort/sort-header.mjs +3 -3
  178. package/esm2022/sort/sort-module.mjs +4 -4
  179. package/esm2022/sort/sort.mjs +3 -3
  180. package/esm2022/stepper/step-content.mjs +3 -3
  181. package/esm2022/stepper/step-header.mjs +3 -3
  182. package/esm2022/stepper/step-label.mjs +3 -3
  183. package/esm2022/stepper/stepper-button.mjs +6 -6
  184. package/esm2022/stepper/stepper-icon.mjs +3 -3
  185. package/esm2022/stepper/stepper-intl.mjs +3 -3
  186. package/esm2022/stepper/stepper-module.mjs +4 -4
  187. package/esm2022/stepper/stepper.mjs +6 -6
  188. package/esm2022/table/cell.mjs +21 -21
  189. package/esm2022/table/module.mjs +4 -4
  190. package/esm2022/table/row.mjs +21 -21
  191. package/esm2022/table/table.mjs +6 -6
  192. package/esm2022/table/text-column.mjs +3 -3
  193. package/esm2022/tabs/module.mjs +4 -4
  194. package/esm2022/tabs/paginated-tab-header.mjs +3 -3
  195. package/esm2022/tabs/tab-body.mjs +6 -6
  196. package/esm2022/tabs/tab-content.mjs +3 -3
  197. package/esm2022/tabs/tab-group.mjs +3 -3
  198. package/esm2022/tabs/tab-header.mjs +3 -3
  199. package/esm2022/tabs/tab-label-wrapper.mjs +3 -3
  200. package/esm2022/tabs/tab-label.mjs +3 -3
  201. package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +15 -10
  202. package/esm2022/tabs/tab.mjs +3 -3
  203. package/esm2022/toolbar/toolbar-module.mjs +4 -4
  204. package/esm2022/toolbar/toolbar.mjs +6 -6
  205. package/esm2022/tooltip/module.mjs +4 -4
  206. package/esm2022/tooltip/tooltip.mjs +6 -6
  207. package/esm2022/tree/node.mjs +9 -9
  208. package/esm2022/tree/outlet.mjs +3 -3
  209. package/esm2022/tree/padding.mjs +3 -3
  210. package/esm2022/tree/toggle.mjs +3 -3
  211. package/esm2022/tree/tree-module.mjs +4 -4
  212. package/esm2022/tree/tree.mjs +3 -3
  213. package/expansion/_expansion-theme.scss +3 -0
  214. package/fesm2022/autocomplete.mjs +14 -14
  215. package/fesm2022/autocomplete.mjs.map +1 -1
  216. package/fesm2022/badge.mjs +10 -10
  217. package/fesm2022/bottom-sheet.mjs +10 -10
  218. package/fesm2022/button-toggle.mjs +11 -11
  219. package/fesm2022/button-toggle.mjs.map +1 -1
  220. package/fesm2022/button.mjs +34 -34
  221. package/fesm2022/card.mjs +46 -46
  222. package/fesm2022/checkbox.mjs +14 -14
  223. package/fesm2022/chips.mjs +45 -45
  224. package/fesm2022/chips.mjs.map +1 -1
  225. package/fesm2022/core.mjs +60 -60
  226. package/fesm2022/core.mjs.map +1 -1
  227. package/fesm2022/datepicker.mjs +85 -85
  228. package/fesm2022/datepicker.mjs.map +1 -1
  229. package/fesm2022/dialog.mjs +25 -25
  230. package/fesm2022/divider.mjs +7 -7
  231. package/fesm2022/expansion.mjs +25 -25
  232. package/fesm2022/form-field.mjs +36 -36
  233. package/fesm2022/form-field.mjs.map +1 -1
  234. package/fesm2022/grid-list.mjs +22 -22
  235. package/fesm2022/icon/testing.mjs +7 -7
  236. package/fesm2022/icon.mjs +10 -10
  237. package/fesm2022/input.mjs +7 -7
  238. package/fesm2022/list.mjs +55 -55
  239. package/fesm2022/list.mjs.map +1 -1
  240. package/fesm2022/menu.mjs +17 -17
  241. package/fesm2022/menu.mjs.map +1 -1
  242. package/fesm2022/paginator.mjs +11 -11
  243. package/fesm2022/paginator.mjs.map +1 -1
  244. package/fesm2022/progress-bar.mjs +8 -8
  245. package/fesm2022/progress-bar.mjs.map +1 -1
  246. package/fesm2022/progress-spinner.mjs +7 -7
  247. package/fesm2022/radio.mjs +10 -10
  248. package/fesm2022/select.mjs +12 -12
  249. package/fesm2022/select.mjs.map +1 -1
  250. package/fesm2022/sidenav.mjs +26 -26
  251. package/fesm2022/sidenav.mjs.map +1 -1
  252. package/fesm2022/slide-toggle.mjs +16 -16
  253. package/fesm2022/slide-toggle.mjs.map +1 -1
  254. package/fesm2022/slider.mjs +16 -16
  255. package/fesm2022/snack-bar.mjs +22 -22
  256. package/fesm2022/sort.mjs +13 -13
  257. package/fesm2022/stepper.mjs +31 -31
  258. package/fesm2022/table.mjs +55 -55
  259. package/fesm2022/tabs.mjs +45 -40
  260. package/fesm2022/tabs.mjs.map +1 -1
  261. package/fesm2022/toolbar.mjs +10 -10
  262. package/fesm2022/tooltip.mjs +10 -10
  263. package/fesm2022/tree.mjs +25 -25
  264. package/form-field/_form-field-theme.scss +3 -0
  265. package/grid-list/_grid-list-theme.scss +3 -0
  266. package/icon/_icon-theme.scss +3 -0
  267. package/input/_input-theme.scss +5 -1
  268. package/list/_list-theme.scss +17 -3
  269. package/menu/_menu-theme.scss +3 -0
  270. package/package.json +7 -7
  271. package/paginator/_paginator-theme.scss +3 -7
  272. package/prebuilt-themes/deeppurple-amber.css +1 -1
  273. package/prebuilt-themes/indigo-pink.css +1 -1
  274. package/prebuilt-themes/pink-bluegrey.css +1 -1
  275. package/prebuilt-themes/purple-green.css +1 -1
  276. package/progress-bar/_progress-bar-theme.scss +3 -0
  277. package/progress-spinner/_progress-spinner-theme.scss +3 -0
  278. package/radio/_radio-theme.scss +3 -0
  279. package/schematics/ng-add/index.js +2 -2
  280. package/schematics/ng-add/index.mjs +2 -2
  281. package/schematics/ng-generate/mdc-migration/index_bundled.js +981 -568
  282. package/schematics/ng-generate/mdc-migration/index_bundled.js.map +4 -4
  283. package/select/_select-theme.scss +9 -20
  284. package/sidenav/_sidenav-theme.scss +3 -0
  285. package/slide-toggle/_slide-toggle-theme.scss +23 -7
  286. package/slider/_slider-theme.scss +3 -0
  287. package/snack-bar/_snack-bar-theme.scss +3 -0
  288. package/sort/_sort-theme.scss +3 -0
  289. package/stepper/_stepper-theme.scss +3 -0
  290. package/table/_table-theme.scss +3 -0
  291. package/tabs/_tabs-theme.scss +3 -0
  292. package/toolbar/_toolbar-theme.scss +3 -0
  293. package/tooltip/_tooltip-theme.scss +3 -0
  294. package/tree/_tree-theme.scss +3 -0
package/_index.scss CHANGED
@@ -20,22 +20,11 @@
20
20
  @forward './core/density/private/all-density' show all-component-densities;
21
21
  @forward './core/theming/theming' show private-check-duplicate-theme-styles,
22
22
  private-legacy-get-theme, private-is-theme-object;
23
- @forward './core/style/layout-common' as private-* show private-fill;
24
- @forward './core/style/private' show private-theme-elevation, private-animation-noop;
25
- @forward './core/style/vendor-prefixes' as private-* show private-user-select,
26
- private-position-sticky, private-color-adjust, private-clip-path;
27
- @forward './core/theming/palette' as private-* show $private-dark-primary-text,
28
- $private-dark-disabled-text;
23
+ @forward './core/style/private' show private-theme-elevation;
24
+ @forward './core/style/vendor-prefixes' as private-* show private-user-select;
29
25
  @forward './core/style/variables' as private-* show $private-swift-ease-in-duration,
30
26
  $private-swift-ease-in-timing-function, $private-swift-ease-out-timing-function,
31
27
  $private-ease-in-out-curve-function, $private-swift-ease-out-duration, $private-xsmall;
32
- @forward './core/typography/typography' show private-typography-to-2014-config,
33
- private-typography-to-2018-config;
34
- @forward './table/table-flex-styles' show private-table-flex-styles;
35
- @forward './core/style/menu-common' as private-menu-common-*;
36
- @forward './core/style/button-common' as private-button-common-*;
37
- // The form field density mixin needs to be exposed, because the paginator depends on it.
38
- @forward './form-field/form-field-theme' as private-form-field-* show private-form-field-density;
39
28
  @forward './core/style/sass-utils' as private-*;
40
29
  @forward './core/style/validation' as private-*;
41
30
 
@@ -143,12 +132,6 @@
143
132
  @forward './tree/tree-theme' as tree-* show tree-theme, tree-color, tree-typography, tree-density,
144
133
  tree-base;
145
134
 
146
- // MDC Helpers
147
- @forward './core/mdc-helpers/mdc-helpers' as private-* show
148
- private-disable-mdc-fallback-declarations, private-typography-config-level-from-mdc,
149
- $private-mdc-base-styles-query, $private-mdc-base-styles-without-animation-query,
150
- $private-mdc-theme-styles-query, $private-mdc-typography-styles-query;
151
-
152
- // New theming APIs:
135
+ // New theming APIs
153
136
  @forward './core/theming/inspection' show get-theme-version, get-theme-type, get-theme-color,
154
137
  get-theme-typography, get-theme-density, theme-has, theme-remove;
@@ -1,6 +1,7 @@
1
1
  @use 'sass:map';
2
2
  @use '../core/theming/theming';
3
3
  @use '../core/theming/inspection';
4
+ @use '../core/theming/validation';
4
5
  @use '../core/typography/typography';
5
6
  @use '../core/style/sass-utils';
6
7
  @use '../core/tokens/token-utils';
@@ -10,7 +11,12 @@
10
11
  @if inspection.get-theme-version($theme) == 1 {
11
12
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
12
13
  }
13
- @else {}
14
+ @else {
15
+ @include sass-utils.current-selector-or-root() {
16
+ @include token-utils.create-token-values(tokens-mat-autocomplete.$prefix,
17
+ tokens-mat-autocomplete.get-unthemable-tokens());
18
+ }
19
+ }
14
20
  }
15
21
 
16
22
  @mixin color($theme) {
@@ -29,14 +35,24 @@
29
35
  @if inspection.get-theme-version($theme) == 1 {
30
36
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
31
37
  }
32
- @else {}
38
+ @else {
39
+ @include sass-utils.current-selector-or-root() {
40
+ @include token-utils.create-token-values(tokens-mat-autocomplete.$prefix,
41
+ tokens-mat-autocomplete.get-typography-tokens($theme));
42
+ }
43
+ }
33
44
  }
34
45
 
35
46
  @mixin density($theme) {
36
47
  @if inspection.get-theme-version($theme) == 1 {
37
48
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
38
49
  }
39
- @else {}
50
+ @else {
51
+ @include sass-utils.current-selector-or-root() {
52
+ @include token-utils.create-token-values(tokens-mat-autocomplete.$prefix,
53
+ tokens-mat-autocomplete.get-density-tokens($theme));
54
+ }
55
+ }
40
56
  }
41
57
 
42
58
  @mixin theme($theme) {
@@ -60,6 +76,8 @@
60
76
  }
61
77
 
62
78
  @mixin _theme-from-tokens($tokens) {
79
+ @include validation.selector-defined(
80
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
63
81
  @if ($tokens != ()) {
64
82
  @include token-utils.create-token-values(
65
83
  tokens-mat-autocomplete.$prefix, map.get($tokens, tokens-mat-autocomplete.$prefix));
@@ -1,6 +1,7 @@
1
1
  @use 'sass:color';
2
2
  @use '../core/theming/theming';
3
3
  @use '../core/theming/inspection';
4
+ @use '../core/theming/validation';
4
5
  @use '../core/typography/typography';
5
6
  @use '../core/tokens/m2/mat/badge' as tokens-mat-badge;
6
7
  @use '../core/tokens/token-utils';
@@ -97,6 +98,8 @@
97
98
  }
98
99
 
99
100
  @mixin _theme-from-tokens($tokens, $options...) {
101
+ @include validation.selector-defined(
102
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
100
103
  $mat-badge-tokens: token-utils.get-tokens-for($tokens, tokens-mat-badge.$prefix, $options...);
101
104
  @include token-utils.create-token-values(tokens-mat-badge.$prefix, $mat-badge-tokens);
102
105
  }
@@ -2,6 +2,7 @@
2
2
  @use '../core/typography/typography';
3
3
  @use '../core/theming/theming';
4
4
  @use '../core/theming/inspection';
5
+ @use '../core/theming/validation';
5
6
  @use '../core/style/sass-utils';
6
7
  @use '../core/tokens/token-utils';
7
8
  @use '../core/tokens/m2/mat/bottom-sheet' as tokens-mat-bottom-sheet;
@@ -70,6 +71,8 @@
70
71
  }
71
72
 
72
73
  @mixin _theme-from-tokens($tokens) {
74
+ @include validation.selector-defined(
75
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
73
76
  @if ($tokens != ()) {
74
77
  @include token-utils.create-token-values(
75
78
  tokens-mat-bottom-sheet.$prefix, map.get($tokens, tokens-mat-bottom-sheet.$prefix));
@@ -5,6 +5,7 @@
5
5
 
6
6
  @use '../core/theming/theming';
7
7
  @use '../core/theming/inspection';
8
+ @use '../core/theming/validation';
8
9
  @use '../core/tokens/token-utils';
9
10
  @use '../core/typography/typography';
10
11
  @use '../core/tokens/m2/mdc/filled-button' as tokens-mdc-filled-button;
@@ -78,6 +79,8 @@
78
79
  }
79
80
 
80
81
  @mixin _theme-from-tokens($tokens, $options...) {
82
+ @include validation.selector-defined(
83
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
81
84
  $mdc-text-button-tokens:
82
85
  token-utils.get-tokens-for($tokens, tokens-mdc-text-button.$prefix, $options...);
83
86
  $mdc-protected-button-tokens:
@@ -112,7 +115,7 @@
112
115
  /// @param {Map} $theme The theme to generate base styles for.
113
116
  @mixin base($theme) {
114
117
  @if inspection.get-theme-version($theme) == 1 {
115
- @include theme-from-tokens(inspection.get-theme-tokens($theme, base));
118
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
116
119
  }
117
120
  @else {
118
121
  @include sass-utils.current-selector-or-root() {
@@ -4,6 +4,7 @@
4
4
  @use '../core/style/sass-utils';
5
5
  @use '../core/theming/theming';
6
6
  @use '../core/theming/inspection';
7
+ @use '../core/theming/validation';
7
8
  @use '../core/tokens/m2/mdc/fab' as tokens-mdc-fab;
8
9
  @use '../core/tokens/m2/mdc/fab-small' as tokens-mdc-fab-small;
9
10
  @use '../core/tokens/m2/mdc/extended-fab' as tokens-mdc-extended-fab;
@@ -166,6 +167,8 @@
166
167
  }
167
168
 
168
169
  @mixin _theme-from-tokens($tokens, $options...) {
170
+ @include validation.selector-defined(
171
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
169
172
  $mdc-extended-fab-tokens: token-utils.get-tokens-for(
170
173
  $tokens, tokens-mdc-extended-fab.$prefix, $options...);
171
174
  $mdc-fab-tokens: token-utils.get-tokens-for($tokens, tokens-mdc-fab.$prefix, $options...);
@@ -8,6 +8,7 @@
8
8
  @use '../core/tokens/token-utils';
9
9
  @use '../core/theming/theming';
10
10
  @use '../core/theming/inspection';
11
+ @use '../core/theming/validation';
11
12
 
12
13
 
13
14
  @mixin base($theme) {
@@ -141,6 +142,8 @@
141
142
  }
142
143
 
143
144
  @mixin _theme-from-tokens($tokens) {
145
+ @include validation.selector-defined(
146
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
144
147
  @if ($tokens != ()) {
145
148
  @include mdc-icon-button-theme.theme(map.get($tokens, tokens-mdc-icon-button.$prefix));
146
149
  @include token-utils.create-token-values(
@@ -1,5 +1,6 @@
1
1
  @use '../core/theming/theming';
2
2
  @use '../core/theming/inspection';
3
+ @use '../core/theming/validation';
3
4
  @use '../core/typography/typography';
4
5
  @use '../core/tokens/m2/mat/legacy-button-toggle' as tokens-mat-legacy-button-toggle;
5
6
  @use '../core/tokens/m2/mat/standard-button-toggle' as tokens-mat-standard-button-toggle;
@@ -104,6 +105,8 @@
104
105
  }
105
106
 
106
107
  @mixin _theme-from-tokens($tokens, $options...) {
108
+ @include validation.selector-defined(
109
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
107
110
  $mat-standard-button-toggle-tokens:
108
111
  token-utils.get-tokens-for($tokens, tokens-mat-standard-button-toggle.$prefix, $options...);
109
112
  @include token-utils.create-token-values(
@@ -2,6 +2,7 @@
2
2
  @use '../core/style/sass-utils';
3
3
  @use '../core/theming/theming';
4
4
  @use '../core/theming/inspection';
5
+ @use '../core/theming/validation';
5
6
  @use '../core/typography/typography';
6
7
  @use '../core/tokens/token-utils';
7
8
  @use '../core/tokens/m2/mat/card' as tokens-mat-card;
@@ -108,6 +109,8 @@
108
109
  }
109
110
 
110
111
  @mixin _theme-from-tokens($tokens) {
112
+ @include validation.selector-defined(
113
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
111
114
  @if ($tokens != ()) {
112
115
  $elevated-card-tokens: map.get($tokens, tokens-mdc-elevated-card.$prefix);
113
116
  // Work around a bug in MDC where the elevation is not resolved to an actual shadow value.
@@ -3,6 +3,7 @@
3
3
  @use '../core/style/sass-utils';
4
4
  @use '../core/theming/theming';
5
5
  @use '../core/theming/inspection';
6
+ @use '../core/theming/validation';
6
7
  @use '../core/tokens/token-utils';
7
8
  @use '../core/typography/typography';
8
9
  @use '../core/tokens/m2/mdc/checkbox' as tokens-mdc-checkbox;
@@ -117,6 +118,8 @@
117
118
  }
118
119
 
119
120
  @mixin _theme-from-tokens($tokens, $options...) {
121
+ @include validation.selector-defined(
122
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
120
123
  $mdc-checkbox-tokens: token-utils.get-tokens-for(
121
124
  $tokens, tokens-mdc-checkbox.$prefix, $options...);
122
125
  // Don't pass $options here, since the mdc-form-field doesn't support color options,
@@ -5,6 +5,7 @@
5
5
  @use '../core/tokens/token-utils';
6
6
  @use '../core/theming/theming';
7
7
  @use '../core/theming/inspection';
8
+ @use '../core/theming/validation';
8
9
  @use '../core/typography/typography';
9
10
 
10
11
  /// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
@@ -44,16 +45,22 @@
44
45
  &.mat-primary {
45
46
  $primary-color-tokens: tokens-mdc-chip.get-color-tokens($theme, primary);
46
47
  @include mdc-chip-theme.theme($primary-color-tokens);
48
+ @include token-utils.create-token-values(
49
+ tokens-mat-chip.$prefix, tokens-mat-chip.get-color-tokens($theme, primary));
47
50
  }
48
51
 
49
52
  &.mat-accent {
50
53
  $accent-color-tokens: tokens-mdc-chip.get-color-tokens($theme, accent);
51
54
  @include mdc-chip-theme.theme($accent-color-tokens);
55
+ @include token-utils.create-token-values(
56
+ tokens-mat-chip.$prefix, tokens-mat-chip.get-color-tokens($theme, accent));
52
57
  }
53
58
 
54
59
  &.mat-warn {
55
60
  $warn-color-tokens: tokens-mdc-chip.get-color-tokens($theme, warn);
56
61
  @include mdc-chip-theme.theme($warn-color-tokens);
62
+ @include token-utils.create-token-values(
63
+ tokens-mat-chip.$prefix, tokens-mat-chip.get-color-tokens($theme, warn));
57
64
  }
58
65
  }
59
66
  }
@@ -120,8 +127,10 @@
120
127
  }
121
128
 
122
129
  @mixin _theme-from-tokens($tokens, $options...) {
130
+ @include validation.selector-defined(
131
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
123
132
  $mdc-chip-tokens: token-utils.get-tokens-for($tokens, tokens-mdc-chip.$prefix, $options...);
124
- $mat-chip-tokens: token-utils.get-tokens-for($tokens, tokens-mat-chip.$prefix);
133
+ $mat-chip-tokens: token-utils.get-tokens-for($tokens, tokens-mat-chip.$prefix, $options...);
125
134
  @include mdc-chip-theme.theme($mdc-chip-tokens);
126
135
  @include token-utils.create-token-values(tokens-mat-chip.$prefix, $mat-chip-tokens);
127
136
  }
@@ -1,5 +1,6 @@
1
1
  @use './theming/theming';
2
2
  @use './theming/inspection';
3
+ @use './theming/validation';
3
4
  @use './style/private';
4
5
  @use './ripple/ripple-theme';
5
6
  @use './option/option-theme';
@@ -112,6 +113,8 @@
112
113
  }
113
114
 
114
115
  @mixin _theme-from-tokens($tokens, $options...) {
116
+ @include validation.selector-defined(
117
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
115
118
  $mat-app-tokens: token-utils.get-tokens-for($tokens, tokens-mat-app.$prefix, $options...);
116
119
  $mat-ripple-tokens: token-utils.get-tokens-for($tokens, tokens-mat-ripple.$prefix, $options...);
117
120
  $mat-option-tokens: token-utils.get-tokens-for($tokens, tokens-mat-option.$prefix, $options...);
@@ -3,6 +3,7 @@
3
3
  @use '../tokens/token-utils';
4
4
  @use '../style/sass-utils';
5
5
  @use '../theming/theming';
6
+ @use '../theming/validation';
6
7
  @use '../theming/inspection';
7
8
  @use '../typography/typography';
8
9
 
@@ -65,6 +66,8 @@
65
66
  }
66
67
 
67
68
  @mixin _theme-from-tokens($tokens) {
69
+ @include validation.selector-defined(
70
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
68
71
  @if ($tokens != ()) {
69
72
  @include token-utils.create-token-values(
70
73
  tokens-mat-optgroup.$prefix, map.get($tokens, tokens-mat-optgroup.$prefix));
@@ -3,6 +3,7 @@
3
3
  @use '../style/sass-utils';
4
4
  @use '../theming/theming';
5
5
  @use '../theming/inspection';
6
+ @use '../theming/validation';
6
7
  @use '../typography/typography';
7
8
 
8
9
  /// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
@@ -91,6 +92,8 @@
91
92
  }
92
93
 
93
94
  @mixin _theme-from-tokens($tokens, $options...) {
95
+ @include validation.selector-defined(
96
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
94
97
  $mat-option-tokens: token-utils.get-tokens-for($tokens, tokens-mat-option.$prefix, $options...);
95
98
  @include token-utils.create-token-values(tokens-mat-option.$prefix, $mat-option-tokens);
96
99
  }
@@ -4,6 +4,7 @@
4
4
  @use '../style/sass-utils';
5
5
  @use '../theming/theming';
6
6
  @use '../theming/inspection';
7
+ @use '../theming/validation';
7
8
 
8
9
  @mixin base($theme) {
9
10
  @if inspection.get-theme-version($theme) == 1 {
@@ -69,6 +70,8 @@
69
70
  }
70
71
 
71
72
  @mixin _theme-from-tokens($tokens) {
73
+ @include validation.selector-defined(
74
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
72
75
  @if ($tokens != ()) {
73
76
  @include token-utils.create-token-values(
74
77
  tokens-mat-ripple.$prefix, map.get($tokens, tokens-mat-ripple.$prefix));
@@ -1,5 +1,6 @@
1
1
  @use '../../theming/theming';
2
2
  @use '../../theming/inspection';
3
+ @use '../../theming/validation';
3
4
  @use '../../style/sass-utils';
4
5
  @use '../../tokens/token-utils';
5
6
  @use '../../tokens/m2/mat/full-pseudo-checkbox' as tokens-mat-full-pseudo-checkbox;
@@ -15,6 +16,8 @@
15
16
  }
16
17
 
17
18
  @mixin _theme-from-tokens($tokens, $options...) {
19
+ @include validation.selector-defined(
20
+ 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
18
21
  $mat-full-pseudo-checkbox-tokens:
19
22
  token-utils.get-tokens-for($tokens, tokens-mat-full-pseudo-checkbox.$prefix, $options...);
20
23
  $mat-minimal-pseudo-checkbox-tokens:
@@ -59,29 +59,16 @@ $icon-margin: 16px !default;
59
59
  }
60
60
  }
61
61
 
62
- @mixin item-submenu-trigger($side-padding) {
63
- // Increase the side padding to prevent the indicator from overlapping the text.
64
- padding-right: $side-padding * 2;
65
-
66
- [dir='rtl'] & {
67
- padding-right: $side-padding;
68
- padding-left: $side-padding * 2;
69
- }
70
- }
71
-
72
- @mixin item-submenu-icon($side-padding) {
73
- position: absolute;
74
- top: 50%;
75
- right: $side-padding;
76
- transform: translateY(-50%);
77
- width: 5px;
62
+ @mixin item-submenu-icon($item-spacing, $icon-size) {
63
+ width: $icon-size;
78
64
  height: 10px;
79
65
  fill: currentColor;
66
+ padding-left: $item-spacing;
80
67
 
81
68
  [dir='rtl'] & {
82
69
  right: auto;
83
- left: $side-padding;
84
- transform: translateY(-50%) scaleX(-1);
70
+ padding-right: $item-spacing;
71
+ padding-left: 0;
85
72
  }
86
73
 
87
74
  // Fix for Chromium-based browsers blending in the `currentColor` with the background.
@@ -260,6 +260,7 @@ $_typography-properties: (font, font-family, line-height, font-size, letter-spac
260
260
  }
261
261
  @else if $system == density {
262
262
  $theme: map.deep-remove($theme, $_internals, density-scale);
263
+ $theme: map.deep-remove($theme, $_internals, density-tokens);
263
264
  }
264
265
  }
265
266
  @return $theme;
@@ -285,7 +286,7 @@ $_typography-properties: (font, font-family, line-height, font-size, letter-spac
285
286
  }
286
287
  $result: ();
287
288
  @each $system in $systems {
288
- $result: map.deep-merge($result, map.get($theme, $_internals, '#{$system}-tokens'));
289
+ $result: map.deep-merge($result, map.get($theme, $_internals, '#{$system}-tokens') or ());
289
290
  }
290
291
  @return $result;
291
292
  }
@@ -123,7 +123,8 @@ $_typography-properties: (font, font-family, line-height, font-size, letter-spac
123
123
  }
124
124
  $palette: map.get($colors, $palette-name);
125
125
  @if not $palette {
126
- @error 'Unrecognized palette name:' $palette-name;
126
+ @error $palette-name $args $theme;
127
+ @error #{'Unrecognized palette name:'} $palette-name;
127
128
  }
128
129
  @return theming.get-color-from-palette($palette, $args...);
129
130
  }
@@ -0,0 +1,5 @@
1
+ @mixin selector-defined($msg) {
2
+ @if #{&} == '' {
3
+ @error $msg;
4
+ }
5
+ }
@@ -11,6 +11,7 @@
11
11
  @use './mat/dialog' as tokens-mat-dialog;
12
12
  @use './mat/bottom-sheet' as tokens-mat-bottom-sheet;
13
13
  @use './mat/card' as tokens-mat-card;
14
+ @use './mat/chip' as tokens-mat-chip;
14
15
  @use './mat/datepicker' as tokens-mat-datepicker;
15
16
  @use './mat/divider' as tokens-mat-divider;
16
17
  @use './mat/expansion' as tokens-mat-expansion;
@@ -20,6 +21,7 @@
20
21
  @use './mat/grid-list' as tokens-mat-grid-list;
21
22
  @use './mat/icon' as tokens-mat-icon;
22
23
  @use './mat/icon-button' as tokens-mat-icon-button;
24
+ @use './mat/list' as tokens-mat-list;
23
25
  @use './mat/menu' as tokens-mat-menu;
24
26
  @use './mat/option' as tokens-mat-option;
25
27
  @use './mat/optgroup' as tokens-mat-optgroup;
@@ -32,6 +34,7 @@
32
34
  @use './mat/select' as tokens-mat-select;
33
35
  @use './mat/sidenav' as tokens-mat-sidenav;
34
36
  @use './mat/slider' as tokens-mat-slider;
37
+ @use './mat/switch' as tokens-mat-switch;
35
38
  @use './mat/snack-bar' as tokens-mat-snack-bar;
36
39
  @use './mat/sort' as tokens-mat-sort;
37
40
  @use './mat/standard-button-toggle' as tokens-mat-button-toggle;
@@ -67,6 +70,7 @@
67
70
  @use './mdc/switch' as tokens-mdc-switch;
68
71
  @use './mdc/tab' as tokens-mdc-tab;
69
72
  @use './mdc/tab-indicator' as tokens-mdc-tab-indicator;
73
+ @use '../../theming/inspection';
70
74
 
71
75
  /// Gets the tokens for the given theme, m2 tokens module, and theming system.
72
76
  /// @param {Map} $theme The Angular Material theme object to generate token values from.
@@ -80,11 +84,11 @@
80
84
  @return meta.call(
81
85
  meta.get-function(get-#{$system}-tokens, $module: $module));
82
86
  }
83
- @if not map.get($theme, $system) {
87
+ @if not inspection.theme-has($theme, $system) {
84
88
  @return ();
85
89
  }
86
90
  @return meta.call(
87
- meta.get-function(get-#{$system}-tokens, $module: $module), map.get($theme, $system));
91
+ meta.get-function(get-#{$system}-tokens, $module: $module), $theme);
88
92
  }
89
93
 
90
94
  /// Gets the fully qualified tokens map for the given theme and m2 tokens module.
@@ -117,6 +121,7 @@
117
121
  _get-tokens-for-module($theme, tokens-mat-bottom-sheet),
118
122
  _get-tokens-for-module($theme, tokens-mat-button-toggle),
119
123
  _get-tokens-for-module($theme, tokens-mat-card),
124
+ _get-tokens-for-module($theme, tokens-mat-chip),
120
125
  _get-tokens-for-module($theme, tokens-mat-datepicker),
121
126
  _get-tokens-for-module($theme, tokens-mat-dialog),
122
127
  _get-tokens-for-module($theme, tokens-mat-divider),
@@ -135,6 +140,7 @@
135
140
  _get-tokens-for-module($theme, tokens-mat-paginator),
136
141
  _get-tokens-for-module($theme, tokens-mat-checkbox),
137
142
  _get-tokens-for-module($theme, tokens-mat-full-pseudo-checkbox),
143
+ _get-tokens-for-module($theme, tokens-mat-list),
138
144
  _get-tokens-for-module($theme, tokens-mat-minimal-pseudo-checkbox),
139
145
  _get-tokens-for-module($theme, tokens-mat-protected-button),
140
146
  _get-tokens-for-module($theme, tokens-mat-radio),
@@ -142,6 +148,7 @@
142
148
  _get-tokens-for-module($theme, tokens-mat-select),
143
149
  _get-tokens-for-module($theme, tokens-mat-sidenav),
144
150
  _get-tokens-for-module($theme, tokens-mat-slider),
151
+ _get-tokens-for-module($theme, tokens-mat-switch),
145
152
  _get-tokens-for-module($theme, tokens-mat-snack-bar),
146
153
  _get-tokens-for-module($theme, tokens-mat-sort),
147
154
  _get-tokens-for-module($theme, tokens-mat-stepper),
@@ -1,3 +1,4 @@
1
+ @use '@material/elevation/elevation-theme' as mdc-elevation;
1
2
  @use '../../token-utils';
2
3
  @use '../../../theming/inspection';
3
4
  @use '../../../style/sass-utils';
@@ -8,7 +9,10 @@ $prefix: (mat, autocomplete);
8
9
  // Tokens that can't be configured through Angular Material's current theming API,
9
10
  // but may be in a future version of the theming API.
10
11
  @function get-unthemable-tokens() {
11
- @return ();
12
+ @return (
13
+ container-shape: 4px,
14
+ container-elevation-shadow: mdc-elevation.elevation-box-shadow(8),
15
+ );
12
16
  }
13
17
 
14
18
  // Tokens that can be configured through Angular Material's color theming API.
@@ -1,5 +1,8 @@
1
+ @use 'sass:map';
1
2
  @use '../../token-utils';
3
+ @use '../../../theming/inspection';
2
4
  @use '../../../style/sass-utils';
5
+ @use '../../../theming/palette';
3
6
 
4
7
  // The prefix used to generate the fully qualified name for tokens in this file.
5
8
  $prefix: (mat, chip);
@@ -9,12 +12,33 @@ $prefix: (mat, chip);
9
12
  @function get-unthemable-tokens() {
10
13
  @return (
11
14
  disabled-container-opacity: 0.4,
15
+ trailing-action-opacity: 0.54,
16
+ trailing-action-focus-opacity: 1,
17
+ trailing-action-state-layer-color: transparent,
18
+ selected-trailing-action-state-layer-color: transparent,
19
+ trailing-action-hover-state-layer-opacity: 0,
20
+ trailing-action-focus-state-layer-opacity: 0,
12
21
  );
13
22
  }
14
23
 
15
24
  // Tokens that can be configured through Angular Material's color theming API.
16
- @function get-color-tokens($theme) {
17
- @return ();
25
+ @function get-color-tokens($theme, $palette-name: null) {
26
+ $foreground: null;
27
+ @if $palette-name == null {
28
+ $is-dark: inspection.get-theme-type($theme) == dark;
29
+ $grey-50: map.get(palette.$grey-palette, 50);
30
+ $grey-900: map.get(palette.$grey-palette, 900);
31
+ $foreground: if($is-dark, $grey-50, $grey-900);
32
+ }
33
+ @else {
34
+ $foreground: inspection.get-theme-color($theme, $palette-name, default-contrast);
35
+ }
36
+ @return (
37
+ // The color of the icon at the end of a disabled chip.
38
+ selected-disabled-trailing-icon-color: $foreground,
39
+ // The color of the icon at the end of the chip.
40
+ selected-trailing-icon-color: $foreground
41
+ );
18
42
  }
19
43
 
20
44
  // Tokens that can be configured through Angular Material's typography theming API.
@@ -1,3 +1,4 @@
1
+ @use '@material/elevation/elevation-theme' as mdc-elevation;
1
2
  @use 'sass:color';
2
3
  @use 'sass:meta';
3
4
  @use 'sass:math';
@@ -30,7 +31,12 @@ $private-default-overlap-color: #a8dab5;
30
31
  // Tokens that can't be configured through Angular Material's current theming API,
31
32
  // but may be in a future version of the theming API.
32
33
  @function get-unthemable-tokens() {
33
- @return ();
34
+ @return (
35
+ calendar-container-shape: 4px,
36
+ calendar-container-touch-shape: 4px,
37
+ calendar-container-elevation-shadow: mdc-elevation.elevation-box-shadow(4),
38
+ calendar-container-touch-elevation-shadow: mdc-elevation.elevation-box-shadow(24),
39
+ );
34
40
  }
35
41
 
36
42
  // Tokens that can be configured through Angular Material's color theming API.
@@ -43,6 +49,8 @@ $private-default-overlap-color: #a8dab5;
43
49
  $hint-text-color: inspection.get-theme-color($theme, foreground, hint-text);
44
50
  $preview-outline-color: $divider-color;
45
51
  $today-disabled-outline-color: null;
52
+ $is-dark: inspection.get-theme-type($theme) == dark;
53
+ $on-surface: if($is-dark, #fff, #000);
46
54
 
47
55
  $primary-color: inspection.get-theme-color($theme, primary);
48
56
  $range-tokens: get-range-color-tokens(private-get-range-background-color($primary-color));
@@ -67,6 +75,7 @@ $private-default-overlap-color: #a8dab5;
67
75
  @return sass-utils.merge-all($calendar-tokens, $toggle-tokens, $range-tokens, (
68
76
  toggle-icon-color: $inactive-icon-color,
69
77
  calendar-body-label-text-color: $secondary-text-color,
78
+ calendar-period-button-text-color: $on-surface,
70
79
  calendar-period-button-icon-color: $inactive-icon-color,
71
80
  calendar-navigation-button-icon-color: $inactive-icon-color,
72
81
  calendar-header-divider-color: $divider-color,
@@ -34,11 +34,11 @@ $prefix: (mat, legacy-button-toggle);
34
34
  // Tokens that can be configured through Angular Material's typography theming API.
35
35
  @function get-typography-tokens($theme) {
36
36
  @return (
37
- // TODO(crisbeto): other components have tokens for all typography dimensions (font weight,
38
- // letter spacing etc). The button toggle only has the font to match what it had in the
39
- // old theming API and to reduce internal breakages. We should introduce more typography
40
- // tokens at some point.
41
- text-font: inspection.get-theme-typography($theme, body-1, font-family),
37
+ label-text-font: inspection.get-theme-typography($theme, body-1, font-family),
38
+ label-text-line-height: inspection.get-theme-typography($theme, body-1, line-height),
39
+ label-text-size: inspection.get-theme-typography($theme, body-1, font-size),
40
+ label-text-tracking: inspection.get-theme-typography($theme, body-1, letter-spacing),
41
+ label-text-weight: inspection.get-theme-typography($theme, body-1, font-weight),
42
42
  );
43
43
  }
44
44