@angular/material 17.1.0-next.3 → 17.1.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 (292) hide show
  1. package/LICENSE +1 -1
  2. package/_index.scss +6 -6
  3. package/bottom-sheet/index.d.ts +2 -4
  4. package/button/_button-base.scss +6 -0
  5. package/button/_button-theme.scss +131 -97
  6. package/button/_fab-theme.scss +1 -0
  7. package/button/_icon-button-theme.scss +11 -9
  8. package/core/_core-theme.scss +6 -7
  9. package/core/_core.scss +17 -2
  10. package/core/index.d.ts +4 -1
  11. package/core/mdc-helpers/_mdc-helpers.scss +0 -184
  12. package/core/style/_sass-utils.scss +19 -0
  13. package/core/tokens/_token-utils.scss +56 -0
  14. package/core/tokens/m2/_index.scss +19 -5
  15. package/core/tokens/m2/mat/{_slide-toggle.scss → _app.scss} +12 -15
  16. package/core/tokens/m2/mat/_form-field.scss +50 -1
  17. package/core/tokens/m2/mat/_slider.scss +34 -8
  18. package/core/tokens/m2/mdc/_extended-fab.scss +7 -6
  19. package/core/tokens/m2/mdc/_fab.scss +5 -5
  20. package/core/tokens/m2/mdc/_filled-button.scss +6 -6
  21. package/core/tokens/m2/mdc/_protected-button.scss +7 -7
  22. package/core/tokens/m2/mdc/_text-button.scss +0 -4
  23. package/esm2022/autocomplete/autocomplete-origin.mjs +3 -3
  24. package/esm2022/autocomplete/autocomplete-trigger.mjs +7 -5
  25. package/esm2022/autocomplete/autocomplete.mjs +4 -5
  26. package/esm2022/autocomplete/module.mjs +4 -4
  27. package/esm2022/badge/badge-module.mjs +4 -4
  28. package/esm2022/badge/badge.mjs +3 -3
  29. package/esm2022/bottom-sheet/bottom-sheet-container.mjs +7 -8
  30. package/esm2022/bottom-sheet/bottom-sheet-module.mjs +4 -4
  31. package/esm2022/bottom-sheet/bottom-sheet.mjs +3 -3
  32. package/esm2022/button/button-base.mjs +6 -6
  33. package/esm2022/button/button.mjs +8 -8
  34. package/esm2022/button/fab.mjs +16 -16
  35. package/esm2022/button/icon-button.mjs +6 -6
  36. package/esm2022/button/module.mjs +4 -4
  37. package/esm2022/button-toggle/button-toggle-module.mjs +4 -4
  38. package/esm2022/button-toggle/button-toggle.mjs +6 -6
  39. package/esm2022/card/card.mjs +42 -42
  40. package/esm2022/card/module.mjs +4 -4
  41. package/esm2022/checkbox/checkbox-required-validator.mjs +3 -3
  42. package/esm2022/checkbox/checkbox.mjs +3 -3
  43. package/esm2022/checkbox/module.mjs +8 -8
  44. package/esm2022/chips/chip-action.mjs +3 -3
  45. package/esm2022/chips/chip-edit-input.mjs +3 -3
  46. package/esm2022/chips/chip-grid.mjs +3 -3
  47. package/esm2022/chips/chip-icons.mjs +9 -9
  48. package/esm2022/chips/chip-input.mjs +3 -3
  49. package/esm2022/chips/chip-listbox.mjs +3 -3
  50. package/esm2022/chips/chip-option.mjs +3 -3
  51. package/esm2022/chips/chip-row.mjs +3 -3
  52. package/esm2022/chips/chip-set.mjs +3 -3
  53. package/esm2022/chips/chip.mjs +3 -3
  54. package/esm2022/chips/module.mjs +4 -4
  55. package/esm2022/core/common-behaviors/common-module.mjs +4 -4
  56. package/esm2022/core/datetime/index.mjs +16 -11
  57. package/esm2022/core/datetime/native-date-adapter.mjs +3 -3
  58. package/esm2022/core/error/error-options.mjs +6 -6
  59. package/esm2022/core/internal-form-field/internal-form-field.mjs +3 -3
  60. package/esm2022/core/line/line.mjs +7 -7
  61. package/esm2022/core/option/index.mjs +4 -4
  62. package/esm2022/core/option/optgroup.mjs +3 -3
  63. package/esm2022/core/option/option.mjs +3 -3
  64. package/esm2022/core/private/ripple-loader.mjs +3 -3
  65. package/esm2022/core/ripple/index.mjs +4 -4
  66. package/esm2022/core/ripple/ripple-renderer.mjs +1 -1
  67. package/esm2022/core/ripple/ripple.mjs +3 -3
  68. package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox-module.mjs +4 -4
  69. package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +3 -3
  70. package/esm2022/core/version.mjs +1 -1
  71. package/esm2022/datepicker/calendar-body.mjs +3 -3
  72. package/esm2022/datepicker/calendar.mjs +8 -8
  73. package/esm2022/datepicker/date-range-input-parts.mjs +9 -9
  74. package/esm2022/datepicker/date-range-input.mjs +3 -3
  75. package/esm2022/datepicker/date-range-picker.mjs +3 -3
  76. package/esm2022/datepicker/date-range-selection-strategy.mjs +3 -3
  77. package/esm2022/datepicker/date-selection-model.mjs +9 -9
  78. package/esm2022/datepicker/datepicker-actions.mjs +9 -9
  79. package/esm2022/datepicker/datepicker-base.mjs +6 -6
  80. package/esm2022/datepicker/datepicker-errors.mjs +4 -4
  81. package/esm2022/datepicker/datepicker-input-base.mjs +3 -3
  82. package/esm2022/datepicker/datepicker-input.mjs +3 -3
  83. package/esm2022/datepicker/datepicker-intl.mjs +3 -3
  84. package/esm2022/datepicker/datepicker-module.mjs +4 -4
  85. package/esm2022/datepicker/datepicker-toggle.mjs +6 -6
  86. package/esm2022/datepicker/datepicker.mjs +3 -3
  87. package/esm2022/datepicker/month-view.mjs +3 -3
  88. package/esm2022/datepicker/multi-year-view.mjs +3 -3
  89. package/esm2022/datepicker/year-view.mjs +3 -3
  90. package/esm2022/dialog/dialog-container.mjs +5 -5
  91. package/esm2022/dialog/dialog-content-directives.mjs +18 -21
  92. package/esm2022/dialog/dialog.mjs +3 -3
  93. package/esm2022/dialog/module.mjs +4 -4
  94. package/esm2022/divider/divider-module.mjs +4 -4
  95. package/esm2022/divider/divider.mjs +3 -3
  96. package/esm2022/expansion/accordion.mjs +4 -5
  97. package/esm2022/expansion/expansion-module.mjs +4 -4
  98. package/esm2022/expansion/expansion-panel-content.mjs +3 -3
  99. package/esm2022/expansion/expansion-panel-header.mjs +9 -9
  100. package/esm2022/expansion/expansion-panel.mjs +8 -8
  101. package/esm2022/form-field/directives/error.mjs +3 -3
  102. package/esm2022/form-field/directives/floating-label.mjs +3 -3
  103. package/esm2022/form-field/directives/hint.mjs +3 -3
  104. package/esm2022/form-field/directives/label.mjs +3 -3
  105. package/esm2022/form-field/directives/line-ripple.mjs +3 -3
  106. package/esm2022/form-field/directives/notched-outline.mjs +3 -3
  107. package/esm2022/form-field/directives/prefix.mjs +3 -3
  108. package/esm2022/form-field/directives/suffix.mjs +3 -3
  109. package/esm2022/form-field/form-field-control.mjs +3 -3
  110. package/esm2022/form-field/form-field.mjs +6 -6
  111. package/esm2022/form-field/module.mjs +4 -4
  112. package/esm2022/grid-list/grid-list-module.mjs +4 -4
  113. package/esm2022/grid-list/grid-list.mjs +3 -3
  114. package/esm2022/grid-list/grid-tile.mjs +15 -15
  115. package/esm2022/icon/icon-module.mjs +4 -4
  116. package/esm2022/icon/icon-registry.mjs +3 -3
  117. package/esm2022/icon/icon.mjs +3 -3
  118. package/esm2022/icon/testing/fake-icon-registry.mjs +7 -7
  119. package/esm2022/input/input.mjs +3 -3
  120. package/esm2022/input/module.mjs +4 -4
  121. package/esm2022/list/action-list.mjs +3 -3
  122. package/esm2022/list/list-base.mjs +6 -6
  123. package/esm2022/list/list-item-sections.mjs +18 -18
  124. package/esm2022/list/list-module.mjs +4 -4
  125. package/esm2022/list/list-option.mjs +6 -6
  126. package/esm2022/list/list.mjs +6 -6
  127. package/esm2022/list/nav-list.mjs +3 -3
  128. package/esm2022/list/selection-list.mjs +3 -3
  129. package/esm2022/list/subheader.mjs +3 -3
  130. package/esm2022/list/tokens.mjs +2 -2
  131. package/esm2022/menu/menu-content.mjs +3 -3
  132. package/esm2022/menu/menu-item.mjs +3 -3
  133. package/esm2022/menu/menu-trigger.mjs +3 -3
  134. package/esm2022/menu/menu.mjs +4 -5
  135. package/esm2022/menu/module.mjs +4 -4
  136. package/esm2022/paginator/module.mjs +4 -4
  137. package/esm2022/paginator/paginator-intl.mjs +3 -3
  138. package/esm2022/paginator/paginator.mjs +5 -5
  139. package/esm2022/progress-bar/module.mjs +4 -4
  140. package/esm2022/progress-bar/progress-bar.mjs +4 -4
  141. package/esm2022/progress-spinner/module.mjs +4 -4
  142. package/esm2022/progress-spinner/progress-spinner.mjs +3 -3
  143. package/esm2022/radio/module.mjs +4 -4
  144. package/esm2022/radio/radio.mjs +6 -6
  145. package/esm2022/select/module.mjs +4 -4
  146. package/esm2022/select/select.mjs +19 -19
  147. package/esm2022/sidenav/drawer.mjs +22 -18
  148. package/esm2022/sidenav/sidenav-module.mjs +4 -4
  149. package/esm2022/sidenav/sidenav.mjs +10 -13
  150. package/esm2022/slide-toggle/module.mjs +8 -8
  151. package/esm2022/slide-toggle/slide-toggle-required-validator.mjs +3 -3
  152. package/esm2022/slide-toggle/slide-toggle.mjs +7 -7
  153. package/esm2022/slider/module.mjs +4 -4
  154. package/esm2022/slider/slider-input.mjs +43 -26
  155. package/esm2022/slider/slider-interface.mjs +1 -1
  156. package/esm2022/slider/slider-thumb.mjs +12 -5
  157. package/esm2022/slider/slider.mjs +5 -6
  158. package/esm2022/snack-bar/module.mjs +4 -4
  159. package/esm2022/snack-bar/simple-snack-bar.mjs +3 -3
  160. package/esm2022/snack-bar/snack-bar-container.mjs +13 -12
  161. package/esm2022/snack-bar/snack-bar-content.mjs +9 -9
  162. package/esm2022/snack-bar/snack-bar.mjs +3 -3
  163. package/esm2022/sort/sort-header-intl.mjs +3 -3
  164. package/esm2022/sort/sort-header.mjs +3 -3
  165. package/esm2022/sort/sort-module.mjs +4 -4
  166. package/esm2022/sort/sort.mjs +3 -3
  167. package/esm2022/stepper/step-content.mjs +3 -3
  168. package/esm2022/stepper/step-header.mjs +3 -3
  169. package/esm2022/stepper/step-label.mjs +3 -3
  170. package/esm2022/stepper/stepper-button.mjs +7 -9
  171. package/esm2022/stepper/stepper-icon.mjs +3 -3
  172. package/esm2022/stepper/stepper-intl.mjs +3 -3
  173. package/esm2022/stepper/stepper-module.mjs +4 -4
  174. package/esm2022/stepper/stepper.mjs +16 -12
  175. package/esm2022/table/cell.mjs +21 -21
  176. package/esm2022/table/module.mjs +4 -4
  177. package/esm2022/table/row.mjs +21 -21
  178. package/esm2022/table/table.mjs +64 -31
  179. package/esm2022/table/text-column.mjs +3 -3
  180. package/esm2022/tabs/ink-bar.mjs +4 -4
  181. package/esm2022/tabs/module.mjs +4 -4
  182. package/esm2022/tabs/paginated-tab-header.mjs +13 -6
  183. package/esm2022/tabs/tab-body.mjs +6 -6
  184. package/esm2022/tabs/tab-content.mjs +3 -3
  185. package/esm2022/tabs/tab-group.mjs +10 -8
  186. package/esm2022/tabs/tab-header.mjs +5 -5
  187. package/esm2022/tabs/tab-label-wrapper.mjs +3 -3
  188. package/esm2022/tabs/tab-label.mjs +3 -3
  189. package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +11 -11
  190. package/esm2022/tabs/tab.mjs +9 -5
  191. package/esm2022/toolbar/toolbar-module.mjs +4 -4
  192. package/esm2022/toolbar/toolbar.mjs +7 -7
  193. package/esm2022/tooltip/module.mjs +4 -4
  194. package/esm2022/tooltip/tooltip.mjs +6 -6
  195. package/esm2022/tree/node.mjs +9 -9
  196. package/esm2022/tree/outlet.mjs +3 -3
  197. package/esm2022/tree/padding.mjs +3 -3
  198. package/esm2022/tree/toggle.mjs +3 -3
  199. package/esm2022/tree/tree-module.mjs +4 -4
  200. package/esm2022/tree/tree.mjs +3 -3
  201. package/expansion/index.d.ts +2 -2
  202. package/fesm2022/autocomplete.mjs +16 -15
  203. package/fesm2022/autocomplete.mjs.map +1 -1
  204. package/fesm2022/badge.mjs +7 -7
  205. package/fesm2022/bottom-sheet.mjs +12 -13
  206. package/fesm2022/bottom-sheet.mjs.map +1 -1
  207. package/fesm2022/button-toggle.mjs +10 -10
  208. package/fesm2022/button.mjs +40 -40
  209. package/fesm2022/button.mjs.map +1 -1
  210. package/fesm2022/card.mjs +46 -46
  211. package/fesm2022/checkbox.mjs +14 -14
  212. package/fesm2022/chips.mjs +40 -40
  213. package/fesm2022/core.mjs +67 -62
  214. package/fesm2022/core.mjs.map +1 -1
  215. package/fesm2022/datepicker.mjs +86 -86
  216. package/fesm2022/datepicker.mjs.map +1 -1
  217. package/fesm2022/dialog.mjs +28 -31
  218. package/fesm2022/dialog.mjs.map +1 -1
  219. package/fesm2022/divider.mjs +7 -7
  220. package/fesm2022/expansion.mjs +26 -27
  221. package/fesm2022/expansion.mjs.map +1 -1
  222. package/fesm2022/form-field.mjs +36 -36
  223. package/fesm2022/form-field.mjs.map +1 -1
  224. package/fesm2022/grid-list.mjs +22 -22
  225. package/fesm2022/icon/testing.mjs +7 -7
  226. package/fesm2022/icon.mjs +10 -10
  227. package/fesm2022/input.mjs +7 -7
  228. package/fesm2022/list.mjs +52 -52
  229. package/fesm2022/list.mjs.map +1 -1
  230. package/fesm2022/menu.mjs +16 -17
  231. package/fesm2022/menu.mjs.map +1 -1
  232. package/fesm2022/paginator.mjs +11 -11
  233. package/fesm2022/paginator.mjs.map +1 -1
  234. package/fesm2022/progress-bar.mjs +8 -8
  235. package/fesm2022/progress-bar.mjs.map +1 -1
  236. package/fesm2022/progress-spinner.mjs +7 -7
  237. package/fesm2022/radio.mjs +10 -10
  238. package/fesm2022/select.mjs +22 -22
  239. package/fesm2022/select.mjs.map +1 -1
  240. package/fesm2022/sidenav.mjs +34 -33
  241. package/fesm2022/sidenav.mjs.map +1 -1
  242. package/fesm2022/slide-toggle.mjs +17 -17
  243. package/fesm2022/slide-toggle.mjs.map +1 -1
  244. package/fesm2022/slider.mjs +60 -38
  245. package/fesm2022/slider.mjs.map +1 -1
  246. package/fesm2022/snack-bar.mjs +32 -30
  247. package/fesm2022/snack-bar.mjs.map +1 -1
  248. package/fesm2022/sort.mjs +13 -13
  249. package/fesm2022/stepper.mjs +40 -38
  250. package/fesm2022/stepper.mjs.map +1 -1
  251. package/fesm2022/table.mjs +111 -78
  252. package/fesm2022/table.mjs.map +1 -1
  253. package/fesm2022/tabs.mjs +64 -52
  254. package/fesm2022/tabs.mjs.map +1 -1
  255. package/fesm2022/toolbar.mjs +11 -11
  256. package/fesm2022/toolbar.mjs.map +1 -1
  257. package/fesm2022/tooltip.mjs +10 -10
  258. package/fesm2022/tree.mjs +25 -25
  259. package/form-field/_form-field-subscript.scss +1 -2
  260. package/form-field/_form-field-theme.scss +4 -2
  261. package/form-field/_mdc-text-field-density-overrides.scss +60 -0
  262. package/icon/_icon-theme.scss +24 -10
  263. package/list/index.d.ts +1 -1
  264. package/package.json +54 -54
  265. package/paginator/_paginator-theme.scss +5 -4
  266. package/prebuilt-themes/deeppurple-amber.css +1 -1
  267. package/prebuilt-themes/indigo-pink.css +1 -1
  268. package/prebuilt-themes/pink-bluegrey.css +1 -1
  269. package/prebuilt-themes/purple-green.css +1 -1
  270. package/progress-bar/_progress-bar-theme.scss +2 -15
  271. package/schematics/ng-add/index.js +2 -2
  272. package/schematics/ng-add/index.mjs +2 -2
  273. package/schematics/ng-generate/address-form/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +3 -3
  274. package/schematics/ng-generate/dashboard/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +1 -1
  275. package/schematics/ng-generate/dashboard/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +5 -3
  276. package/schematics/ng-generate/mdc-migration/index_bundled.js +1295 -677
  277. package/schematics/ng-generate/mdc-migration/index_bundled.js.map +4 -4
  278. package/schematics/ng-generate/mdc-migration/schema.json +0 -1
  279. package/schematics/ng-generate/navigation/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +3 -3
  280. package/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +3 -3
  281. package/schematics/ng-generate/tree/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +3 -3
  282. package/schematics/ng-update/index_bundled.js +31 -31
  283. package/slide-toggle/_slide-toggle-theme.scss +16 -28
  284. package/slide-toggle/index.d.ts +2 -2
  285. package/slider/_slider-theme.scss +10 -12
  286. package/slider/index.d.ts +9 -12
  287. package/snack-bar/index.d.ts +2 -2
  288. package/stepper/index.d.ts +5 -3
  289. package/table/index.d.ts +2 -4
  290. package/tabs/index.d.ts +9 -6
  291. package/form-field/_form-field-density.scss +0 -118
  292. package/form-field/_form-field-sizing.scss +0 -40
@@ -1,12 +1,10 @@
1
1
  // TODO(mmalerba): this file should be split into separate cohesive partials for things like
2
2
  // "theming", "typography", "core".
3
- @use '../theming/inspection';
4
3
  @use '../typography/typography';
5
4
  @use '@material/feature-targeting' as mdc-feature-targeting;
6
5
  @use '@material/typography' as mdc-typography;
7
6
  @use '@material/theme/theme-color' as mdc-theme-color;
8
7
  @use '@material/theme/css' as mdc-theme-css;
9
- @use 'sass:map';
10
8
  @use 'sass:meta';
11
9
 
12
10
  // A set of standard queries to use with MDC's queryable mixins.
@@ -16,71 +14,6 @@ $mdc-base-styles-without-animation-query:
16
14
  $mdc-theme-styles-query: color;
17
15
  $mdc-typography-styles-query: typography;
18
16
 
19
- // Mappings from Angular Material's typography levels to MDC's typography levels.
20
- $mat-typography-mdc-level-mappings: (
21
- headline-1: headline1,
22
- headline-2: headline2,
23
- headline-3: headline3,
24
- headline-4: headline4,
25
- headline-5: headline5,
26
- headline-6: headline6,
27
- subtitle-1: subtitle1,
28
- subtitle-2: subtitle2,
29
- body-1: body1,
30
- body-2: body2,
31
- caption: caption,
32
- button: button,
33
- overline: overline
34
- );
35
-
36
- // Converts an Angular Material typography level config to an MDC one.
37
- @function typography-level-config-to-mdc($theme, $mat-level) {
38
- $mdc-level: map.get($mat-typography-mdc-level-mappings, $mat-level);
39
-
40
- $result-with-nulls: map.merge(
41
- if($mdc-level,
42
- map.get(mdc-typography.$styles, $mdc-level),
43
- (
44
- text-decoration: none,
45
- -moz-osx-font-smoothing: grayscale,
46
- -webkit-font-smoothing: antialiased
47
- )),
48
- if($mat-level,
49
- (
50
- font-size: inspection.get-theme-typography($theme, $mat-level, font-size),
51
- line-height: inspection.get-theme-typography($theme, $mat-level, line-height),
52
- font-weight: inspection.get-theme-typography($theme, $mat-level, font-weight),
53
- letter-spacing: inspection.get-theme-typography($theme, $mat-level, letter-spacing),
54
- font-family: inspection.get-theme-typography($theme, $mat-level, font-family),
55
- // Angular Material doesn't use text-transform, so disable it.
56
- text-transform: none,
57
- ),
58
- ()));
59
-
60
- // We need to strip out any keys with a null value. Leaving them in will cause MDC to emit CSS
61
- // variables with no fallback value, which breaks some builds.
62
- $result: ();
63
- @each $property, $value in $result-with-nulls {
64
- @if $value != null {
65
- $result: map.merge($result, ($property: $value));
66
- }
67
- }
68
- @return $result;
69
- }
70
-
71
- // Converts an Angular Material typography config to an MDC one.
72
- @function typography-config-to-mdc($theme) {
73
- $mdc-config: ();
74
-
75
- @each $mat-level, $mdc-level in $mat-typography-mdc-level-mappings {
76
- $mdc-config: map.merge(
77
- $mdc-config,
78
- ($mdc-level: typography-level-config-to-mdc($theme, $mat-level)));
79
- }
80
-
81
- @return $mdc-config;
82
- }
83
-
84
17
  // MDC logs a warning if the `contrast-tone` function is called with a CSS variable.
85
18
  // This function falls back to determining the tone based on whether the theme is light or dark.
86
19
  @function variable-safe-contrast-tone($value, $is-dark) {
@@ -91,123 +24,6 @@ $mat-typography-mdc-level-mappings: (
91
24
  @return if($is-dark, 'light', 'dark');
92
25
  }
93
26
 
94
- @function _variable-safe-ink-color-for-fill($text-style, $fill-color, $is-dark) {
95
- $contrast-tone: variable-safe-contrast-tone($fill-color, $is-dark);
96
- @return map.get(map.get(mdc-theme-color.$text-colors, $contrast-tone), $text-style);
97
- }
98
-
99
- // Configures MDC's global variables to reflect the given theme, applies the given styles,
100
- // then resets the global variables to prevent unintended side effects.
101
- @mixin using-mdc-theme($theme) {
102
- $primary: inspection.get-theme-color($theme, primary);
103
- $accent: inspection.get-theme-color($theme, accent);
104
- $warn: inspection.get-theme-color($theme, warn);
105
- $is-dark: inspection.get-theme-type($theme) == dark;
106
-
107
- // Save the original values.
108
- $orig-primary: mdc-theme-color.$primary;
109
- $orig-on-primary: mdc-theme-color.$on-primary;
110
- $orig-secondary: mdc-theme-color.$secondary;
111
- $orig-on-secondary: mdc-theme-color.$on-secondary;
112
- $orig-background: mdc-theme-color.$background;
113
- $orig-surface: mdc-theme-color.$surface;
114
- $orig-on-surface: mdc-theme-color.$on-surface;
115
- $orig-error: mdc-theme-color.$error;
116
- $orig-on-error: mdc-theme-color.$on-error;
117
- $orig-property-values: mdc-theme-color.$property-values;
118
-
119
- // Set new values based on the given Angular Material theme.
120
- mdc-theme-color.$primary: $primary;
121
- mdc-theme-color.$on-primary:
122
- if(variable-safe-contrast-tone(mdc-theme-color.$primary, $is-dark) == 'dark', #000, #fff);
123
- mdc-theme-color.$secondary: $accent;
124
- mdc-theme-color.$on-secondary:
125
- if(variable-safe-contrast-tone(mdc-theme-color.$secondary, $is-dark) == 'dark', #000, #fff);
126
- mdc-theme-color.$background: inspection.get-theme-color($theme, background, background);
127
- mdc-theme-color.$surface: inspection.get-theme-color($theme, background, card);
128
- mdc-theme-color.$on-surface:
129
- if(variable-safe-contrast-tone(mdc-theme-color.$surface, $is-dark) == 'dark', #000, #fff);
130
- mdc-theme-color.$error: $warn;
131
- mdc-theme-color.$on-error:
132
- if(variable-safe-contrast-tone(mdc-theme-color.$error, $is-dark) == 'dark', #000, #fff);
133
- mdc-theme-color.$property-values: (
134
- // Primary
135
- primary: mdc-theme-color.$primary,
136
- // Secondary
137
- secondary: mdc-theme-color.$secondary,
138
- // Background
139
- background: mdc-theme-color.$background,
140
- // Surface
141
- surface: mdc-theme-color.$surface,
142
- // Error
143
- error: mdc-theme-color.$error,
144
- on-primary: mdc-theme-color.$on-primary,
145
- on-secondary: mdc-theme-color.$on-secondary,
146
- on-surface: mdc-theme-color.$on-surface,
147
- on-error: mdc-theme-color.$on-error,
148
- // Text-primary on "background" background
149
- text-primary-on-background:
150
- _variable-safe-ink-color-for-fill(primary, mdc-theme-color.$background, $is-dark),
151
- text-secondary-on-background:
152
- _variable-safe-ink-color-for-fill(secondary, mdc-theme-color.$background, $is-dark),
153
- text-hint-on-background:
154
- _variable-safe-ink-color-for-fill(hint, mdc-theme-color.$background, $is-dark),
155
- text-disabled-on-background:
156
- _variable-safe-ink-color-for-fill(disabled, mdc-theme-color.$background, $is-dark),
157
- text-icon-on-background:
158
- _variable-safe-ink-color-for-fill(icon, mdc-theme-color.$background, $is-dark),
159
- // Text-primary on "light" background
160
- text-primary-on-light: _variable-safe-ink-color-for-fill(primary, light, $is-dark),
161
- text-secondary-on-light: _variable-safe-ink-color-for-fill(secondary, light, $is-dark),
162
- text-hint-on-light: _variable-safe-ink-color-for-fill(hint, light, $is-dark),
163
- text-disabled-on-light: _variable-safe-ink-color-for-fill(disabled, light, $is-dark),
164
- text-icon-on-light: _variable-safe-ink-color-for-fill(icon, light, $is-dark),
165
- // Text-primary on "dark" background
166
- text-primary-on-dark: _variable-safe-ink-color-for-fill(primary, dark, $is-dark),
167
- text-secondary-on-dark: _variable-safe-ink-color-for-fill(secondary, dark, $is-dark),
168
- text-hint-on-dark: _variable-safe-ink-color-for-fill(hint, dark, $is-dark),
169
- text-disabled-on-dark: _variable-safe-ink-color-for-fill(disabled, dark, $is-dark),
170
- text-icon-on-dark: _variable-safe-ink-color-for-fill(icon, dark, $is-dark)
171
- );
172
-
173
- // Apply given rules.
174
- @include disable-mdc-fallback-declarations {
175
- @content;
176
- }
177
-
178
- // Reset the original values.
179
- mdc-theme-color.$primary: $orig-primary;
180
- mdc-theme-color.$on-primary: $orig-on-primary;
181
- mdc-theme-color.$secondary: $orig-secondary;
182
- mdc-theme-color.$on-secondary: $orig-on-secondary;
183
- mdc-theme-color.$background: $orig-background;
184
- mdc-theme-color.$surface: $orig-surface;
185
- mdc-theme-color.$on-surface: $orig-on-surface;
186
- mdc-theme-color.$error: $orig-error;
187
- mdc-theme-color.$on-error: $orig-on-error;
188
- mdc-theme-color.$property-values: $orig-property-values;
189
- }
190
-
191
- // Configures MDC's global variables to reflect the given typography config,
192
- // applies the given styles, then resets the global variables to prevent unintended side effects.
193
- @mixin using-mdc-typography($theme) {
194
- // Save the original values.
195
- $orig-mdc-typography-styles: mdc-typography.$styles;
196
-
197
- // Set new values based on the given Angular Material typography configuration.
198
- @if inspection.theme-has($theme, typography) {
199
- mdc-typography.$styles: typography-config-to-mdc($theme);
200
- }
201
-
202
- // Apply given rules.
203
- @include disable-mdc-fallback-declarations {
204
- @content;
205
- }
206
-
207
- // Reset the original values.
208
- mdc-typography.$styles: $orig-mdc-typography-styles;
209
- }
210
-
211
27
  // Function to create an Angular Material typography config from MDC's predefined typography levels.
212
28
  // This is used for components where we accidentally ended up supporting null typography configs
213
29
  // that were silently falling back to MDC's typography. At the moment of writing this includes
@@ -1,4 +1,5 @@
1
1
  @use 'sass:color';
2
+ @use 'sass:list';
2
3
  @use 'sass:map';
3
4
  @use 'sass:meta';
4
5
 
@@ -59,3 +60,21 @@
59
60
  $args: meta.keywords($args);
60
61
  @return if(meta.type-of($color) == 'color', color.change($color, $args...), $color);
61
62
  }
63
+
64
+ /// Gets the given arguments as a map of keywords and validates that only supported arguments were
65
+ /// passed.
66
+ /// @param {ArgList} $args The arguments to convert to a keywords map.
67
+ /// @param {List} $supported-args The supported argument names.
68
+ /// @return {Map} The $args as a map of argument name to argument value.
69
+ @function validate-keyword-args($args, $supported-args) {
70
+ @if list.length($args) > 0 {
71
+ @error #{'Expected keyword args, but got positional args: '}#{$args};
72
+ }
73
+ $kwargs: meta.keywords($args);
74
+ @each $arg, $v in $kwargs {
75
+ @if list.index($supported-args, $arg) == null {
76
+ @error #{'Unsupported argument '}#{$arg}#{'. Valid arguments are: '}#{$supported-args};
77
+ }
78
+ }
79
+ @return $kwargs;
80
+ }
@@ -1,8 +1,10 @@
1
+ @use 'sass:list';
1
2
  @use 'sass:map';
2
3
  @use '@material/elevation/elevation-theme' as mdc-elevation-theme;
3
4
  @use '@material/theme/custom-properties' as mdc-custom-properties;
4
5
  @use '@material/theme/theme' as mdc-theme;
5
6
  @use '@material/theme/keys' as mdc-keys;
7
+ @use '../style/sass-utils';
6
8
  @use '../theming/palette';
7
9
  @use '../theming/theming';
8
10
  @use '../typography/typography';
@@ -125,3 +127,57 @@ $_component-prefix: null;
125
127
  $shadow-color-token: null,
126
128
  ));
127
129
  }
130
+
131
+ /// Checks whether a list starts wih a given prefix
132
+ /// @param {List} $list The list value to check the prefix of.
133
+ /// @param {List} $prefix The prefix to check.
134
+ /// @return {Boolean} Whether the list starts with the prefix.
135
+ @function _is-prefix($list, $prefix) {
136
+ @for $i from 1 through list.length($prefix) {
137
+ @if list.nth($list, $i) != list.nth($prefix, $i) {
138
+ @return false;
139
+ }
140
+ }
141
+ @return true;
142
+ }
143
+
144
+ /// Gets the supported color variants in the given token set for the given prefix.
145
+ /// @param {Map} $tokens The full token map.
146
+ /// @param {List} $prefix The component prefix to get color variants for.
147
+ /// @return {List} The supported color variants.
148
+ @function _supported-color-variants($tokens, $prefix) {
149
+ $result: ();
150
+ @each $namespace in map.keys($tokens) {
151
+ @if list.length($prefix) == list.length($namespace) - 1 and _is-prefix($namespace, $prefix) {
152
+ $result: list.append($result, list.nth($namespace, list.length($namespace)), comma);
153
+ }
154
+ }
155
+ @return $result;
156
+ }
157
+
158
+ /// Gets the token values for the given components prefix with the given options.
159
+ /// @param {Map} $tokens The full token map.
160
+ /// @param {List} $prefix The component prefix to get the token values for.
161
+ /// @param {ArgList} Any additional options
162
+ /// Currently the additional supported options are:
163
+ // - $color-variant (The color variant to use for the component)
164
+ /// @throws If given options are invalid
165
+ /// @return {Map} The token values for the requested component.
166
+ @function get-tokens-for($tokens, $prefix, $options...) {
167
+ $options: sass-utils.validate-keyword-args($options, (color-variant));
168
+ @if $tokens == () {
169
+ @return ();
170
+ }
171
+ $values: map.get($tokens, $prefix);
172
+ $color-variant: map.get($options, color-variant);
173
+ @if $color-variant == null {
174
+ @return $values;
175
+ }
176
+ $overrides: map.get($tokens, list.append($prefix, $color-variant));
177
+ @if $overrides == null {
178
+ @error #{'Invalid color variant: '}#{$color-variant}#{'. Supported color variants are: '}#{
179
+ _supported-color-variants($tokens, $prefix)
180
+ }#{'.'};
181
+ }
182
+ @return map.merge($values, $overrides);
183
+ }
@@ -3,6 +3,10 @@
3
3
  @use '../../style/sass-utils';
4
4
  @use './mat/autocomplete' as tokens-mat-autocomplete;
5
5
  @use './mat/badge' as tokens-mat-badge;
6
+ @use './mat/text-button' as tokens-mat-text-button;
7
+ @use './mat/protected-button' as tokens-mat-protected-button;
8
+ @use './mat/filled-button' as tokens-mat-filled-button;
9
+ @use './mat/outlined-button' as tokens-mat-outlined-button;
6
10
  @use './mat/bottom-sheet' as tokens-mat-bottom-sheet;
7
11
  @use './mat/card' as tokens-mat-card;
8
12
  @use './mat/datepicker' as tokens-mat-datepicker;
@@ -21,7 +25,6 @@
21
25
  @use './mat/ripple' as tokens-mat-ripple;
22
26
  @use './mat/select' as tokens-mat-select;
23
27
  @use './mat/sidenav' as tokens-mat-sidenav;
24
- @use './mat/slide-toggle' as tokens-mat-slide-toggle;
25
28
  @use './mat/slider' as tokens-mat-slider;
26
29
  @use './mat/snack-bar' as tokens-mat-snack-bar;
27
30
  @use './mat/sort' as tokens-mat-sort;
@@ -33,6 +36,10 @@
33
36
  @use './mat/toolbar' as tokens-mat-toolbar;
34
37
  @use './mat/tree' as tokens-mat-tree;
35
38
  @use './mdc/checkbox' as tokens-mdc-checkbox;
39
+ @use './mdc/text-button' as tokens-mdc-text-button;
40
+ @use './mdc/protected-button' as tokens-mdc-protected-button;
41
+ @use './mdc/filled-button' as tokens-mdc-filled-button;
42
+ @use './mdc/outlined-button' as tokens-mdc-outlined-button;
36
43
  @use './mdc/chip' as tokens-mdc-chip;
37
44
  @use './mdc/circular-progress' as tokens-mdc-circular-progress;
38
45
  @use './mdc/dialog' as tokens-mdc-dialog;
@@ -105,26 +112,29 @@
105
112
  _get-tokens-for-module($theme, tokens-mat-divider),
106
113
  _get-tokens-for-module($theme, tokens-mat-expansion),
107
114
  _get-tokens-for-module($theme, tokens-mat-fab),
115
+ _get-tokens-for-module($theme, tokens-mat-filled-button),
108
116
  _get-tokens-for-module($theme, tokens-mat-form-field),
109
117
  _get-tokens-for-module($theme, tokens-mat-grid-list),
110
- _get-tokens-for-module($theme, tokens-mat-icon),
111
118
  _get-tokens-for-module($theme, tokens-mat-icon-button),
119
+ _get-tokens-for-module($theme, tokens-mat-icon),
112
120
  _get-tokens-for-module($theme, tokens-mat-menu),
113
121
  _get-tokens-for-module($theme, tokens-mat-optgroup),
114
122
  _get-tokens-for-module($theme, tokens-mat-option),
123
+ _get-tokens-for-module($theme, tokens-mat-outlined-button),
115
124
  _get-tokens-for-module($theme, tokens-mat-paginator),
125
+ _get-tokens-for-module($theme, tokens-mat-protected-button),
116
126
  _get-tokens-for-module($theme, tokens-mat-radio),
117
127
  _get-tokens-for-module($theme, tokens-mat-ripple),
118
128
  _get-tokens-for-module($theme, tokens-mat-select),
119
129
  _get-tokens-for-module($theme, tokens-mat-sidenav),
120
- _get-tokens-for-module($theme, tokens-mat-slide-toggle),
121
130
  _get-tokens-for-module($theme, tokens-mat-slider),
122
131
  _get-tokens-for-module($theme, tokens-mat-snack-bar),
123
132
  _get-tokens-for-module($theme, tokens-mat-sort),
124
133
  _get-tokens-for-module($theme, tokens-mat-stepper),
125
- _get-tokens-for-module($theme, tokens-mat-tab-header),
126
134
  _get-tokens-for-module($theme, tokens-mat-tab-header-with-background),
135
+ _get-tokens-for-module($theme, tokens-mat-tab-header),
127
136
  _get-tokens-for-module($theme, tokens-mat-table),
137
+ _get-tokens-for-module($theme, tokens-mat-text-button),
128
138
  _get-tokens-for-module($theme, tokens-mat-toolbar),
129
139
  _get-tokens-for-module($theme, tokens-mat-tree),
130
140
  _get-tokens-for-module($theme, tokens-mdc-checkbox),
@@ -134,18 +144,22 @@
134
144
  _get-tokens-for-module($theme, tokens-mdc-elevated-card),
135
145
  _get-tokens-for-module($theme, tokens-mdc-extended-fab),
136
146
  _get-tokens-for-module($theme, tokens-mdc-fab),
147
+ _get-tokens-for-module($theme, tokens-mdc-filled-button),
137
148
  _get-tokens-for-module($theme, tokens-mdc-filled-text-field),
138
149
  _get-tokens-for-module($theme, tokens-mdc-icon-button),
139
150
  _get-tokens-for-module($theme, tokens-mdc-linear-progress),
140
151
  _get-tokens-for-module($theme, tokens-mdc-list),
152
+ _get-tokens-for-module($theme, tokens-mdc-outlined-button),
141
153
  _get-tokens-for-module($theme, tokens-mdc-outlined-card),
142
154
  _get-tokens-for-module($theme, tokens-mdc-outlined-text-field),
143
155
  _get-tokens-for-module($theme, tokens-mdc-plain-tooltip),
156
+ _get-tokens-for-module($theme, tokens-mdc-protected-button),
144
157
  _get-tokens-for-module($theme, tokens-mdc-radio),
145
158
  _get-tokens-for-module($theme, tokens-mdc-slider),
146
159
  _get-tokens-for-module($theme, tokens-mdc-snack-bar),
147
160
  _get-tokens-for-module($theme, tokens-mdc-switch),
148
- _get-tokens-for-module($theme, tokens-mdc-tab),
149
161
  _get-tokens-for-module($theme, tokens-mdc-tab-indicator),
162
+ _get-tokens-for-module($theme, tokens-mdc-tab),
163
+ _get-tokens-for-module($theme, tokens-mdc-text-button),
150
164
  );
151
165
  }
@@ -1,9 +1,9 @@
1
1
  @use '../../token-utils';
2
- @use '../../../style/sass-utils';
3
2
  @use '../../../theming/inspection';
3
+ @use '../../../style/sass-utils';
4
4
 
5
5
  // The prefix used to generate the fully qualified name for tokens in this file.
6
- $prefix: (mat, slide-toggle);
6
+ $prefix: (mat, app);
7
7
 
8
8
  // Tokens that can't be configured through Angular Material's current theming API,
9
9
  // but may be in a future version of the theming API.
@@ -13,19 +13,16 @@ $prefix: (mat, slide-toggle);
13
13
 
14
14
  // Tokens that can be configured through Angular Material's color theming API.
15
15
  @function get-color-tokens($theme) {
16
- @return ();
16
+ @return (
17
+ background-color: inspection.get-theme-color($theme, background, background),
18
+ text-color: inspection.get-theme-color($theme, foreground, text),
19
+ );
17
20
  }
18
21
 
19
22
  // Tokens that can be configured through Angular Material's typography theming API.
20
23
  @function get-typography-tokens($theme) {
21
- @return (
22
- label-text-font: inspection.get-theme-typography($theme, body-2, font-family),
23
- label-text-size: inspection.get-theme-typography($theme, body-2, font-size),
24
- label-text-tracking: inspection.get-theme-typography($theme, body-2, letter-spacing),
25
- label-text-line-height: inspection.get-theme-typography($theme, body-2, line-height),
26
- label-text-weight: inspection.get-theme-typography($theme, body-2, font-weight),
27
- );
28
- }
24
+ @return ();
25
+ }
29
26
 
30
27
  // Tokens that can be configured through Angular Material's density theming API.
31
28
  @function get-density-tokens($theme) {
@@ -36,9 +33,9 @@ $prefix: (mat, slide-toggle);
36
33
  // This is used to create token slots.
37
34
  @function get-token-slots() {
38
35
  @return sass-utils.deep-merge-all(
39
- get-unthemable-tokens(),
40
- get-color-tokens(token-utils.$placeholder-color-config),
41
- get-typography-tokens(token-utils.$placeholder-typography-config),
42
- get-density-tokens(token-utils.$placeholder-density-config)
36
+ get-unthemable-tokens(),
37
+ get-color-tokens(token-utils.$placeholder-color-config),
38
+ get-typography-tokens(token-utils.$placeholder-typography-config),
39
+ get-density-tokens(token-utils.$placeholder-density-config)
43
40
  );
44
41
  }
@@ -1,6 +1,10 @@
1
+ @use 'sass:math';
1
2
  @use 'sass:map';
3
+ @use '@material/textfield' as mdc-textfield;
4
+ @use '@material/density' as mdc-density;
2
5
  @use '../../token-utils';
3
6
  @use '../../../style/sass-utils';
7
+ @use '../../../theming/theming';
4
8
  @use '../../../theming/inspection';
5
9
  @use '../../../theming/palette';
6
10
 
@@ -86,7 +90,52 @@ $prefix: (mat, form-field);
86
90
 
87
91
  // Tokens that can be configured through Angular Material's density theming API.
88
92
  @function get-density-tokens($theme) {
89
- @return ();
93
+ $density-scale: theming.clamp-density(inspection.get-theme-density($theme), -4);
94
+ $height: mdc-density.prop-value(
95
+ $density-config: mdc-textfield.$density-config,
96
+ $density-scale: inspection.get-theme-density($theme),
97
+ $property-name: height,
98
+ );
99
+ $hide-label: $height < mdc-textfield.$minimum-height-for-filled-label;
100
+
101
+ // We computed the desired height of the form-field using the density configuration. The
102
+ // spec only describes vertical spacing/alignment in non-dense mode. This means that we
103
+ // cannot update the spacing to explicit numbers based on the density scale. Instead, we
104
+ // determine the height reduction and equally subtract it from the default `top` and `bottom`
105
+ // padding that is provided by the Material Design specification.
106
+ $vertical-deduction: math.div(mdc-textfield.$height - $height, 2);
107
+
108
+ // Note: these calculations are trivial enough that we could do them at runtime with `calc`
109
+ // and the value of the `height` token. The problem is that because we need to hide the label
110
+ // if the container becomes too short, we have to change the padding calculation. This is
111
+ // complicated further by the fact that filled form fields without labels have the same
112
+ // vertical padding as outlined ones. Alternatives:
113
+ // 1. Using container queries to hide the label and change the padding - this doesn't work
114
+ // because size container queries require setting the `container-type` property which breaks
115
+ // the form field layout. We could use style queries, but they're only supported in Chrome.
116
+ // 2. Monitoring the size of the label - we already have a `ResizeObserver` on the label so we
117
+ // could reuse it to also check when it becomes `display: none`. This would allows us to remove
118
+ // the three padding tokens. We don't do it, because it would require us to always set up
119
+ // the resize observer, as opposed to currently where it's only set up for outlined form fields.
120
+ // This may lead to performance regressions.
121
+ // 3. Conditionally adding `::before` and `::after` to the infix with positive and negative
122
+ // margin respectively - this works, but is likely to break a lot of overrides that are targeting
123
+ // a specific padding. It also runs the risk of overflowing the container.
124
+ // TODO: switch the padding tokens to style-based container queries
125
+ // when they become available in all the browsers we support.
126
+ $filled-with-label-padding-top: 24px - $vertical-deduction;
127
+ $filled-with-label-padding-bottom: 8px - $vertical-deduction;
128
+ $vertical-padding: 16px - $vertical-deduction;
129
+
130
+ @return (
131
+ container-height: $height,
132
+ filled-label-display: if($hide-label, none, block),
133
+ container-vertical-padding: $vertical-padding,
134
+ filled-with-label-container-padding-top:
135
+ if($hide-label, $vertical-padding, $filled-with-label-padding-top),
136
+ filled-with-label-container-padding-bottom:
137
+ if($hide-label, $vertical-padding, $filled-with-label-padding-bottom),
138
+ );
90
139
  }
91
140
 
92
141
  // Combines the tokens generated by the above functions into a single map with placeholder values.
@@ -1,3 +1,4 @@
1
+ @use 'sass:map';
1
2
  @use '../../token-utils';
2
3
  @use '../../../style/sass-utils';
3
4
  @use '../../../theming/inspection';
@@ -8,23 +9,48 @@ $prefix: (mat, slider);
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
+ value-indicator-width: auto,
14
+ value-indicator-height: 32px,
15
+ value-indicator-caret-display: block,
16
+ value-indicator-border-radius: 4px,
17
+ value-indicator-padding: 0 12px,
18
+ value-indicator-text-transform: none,
19
+ value-indicator-container-transform: translateX(-50%)
20
+ );
12
21
  }
13
22
 
14
23
  // Tokens that can be configured through Angular Material's color theming API.
15
24
  @function get-color-tokens($theme) {
25
+ $theme-color-tokens: private-get-color-palette-color-tokens($theme, primary);
16
26
  $is-dark: inspection.get-theme-type($theme) == dark;
17
27
 
28
+ @return map.merge(
29
+ $theme-color-tokens,
30
+ (
31
+ // Opacity of value indicator text container
32
+ value-indicator-opacity: if($is-dark, 0.9, 0.6)
33
+ ),
34
+ );
35
+ }
36
+
37
+ // Generates tokens for the slider properties that change based on the theme.
38
+ @function private-get-color-palette-color-tokens($theme, $palette-name) {
39
+ $ripple-color: inspection.get-theme-color($theme, $palette-name);
40
+ $hover-ripple-color: if($ripple-color == null, null, #{rgba($ripple-color, 0.05)});
41
+ $focus-ripple-color: if($ripple-color == null, null, #{rgba($ripple-color, 0.2)});
42
+
18
43
  @return (
19
- // Opacity of value indicator text container
20
- value-indicator-opacity: if($is-dark, 0.9, 0.6),
44
+ ripple-color: $ripple-color,
45
+ hover-state-layer-color: $hover-ripple-color,
46
+ focus-state-layer-color: $focus-ripple-color
21
47
  );
22
48
  }
23
49
 
24
50
  // Tokens that can be configured through Angular Material's typography theming API.
25
51
  @function get-typography-tokens($theme) {
26
52
  @return ();
27
- }
53
+ }
28
54
 
29
55
  // Tokens that can be configured through Angular Material's density theming API.
30
56
  @function get-density-tokens($theme) {
@@ -35,9 +61,9 @@ $prefix: (mat, slider);
35
61
  // This is used to create token slots.
36
62
  @function get-token-slots() {
37
63
  @return sass-utils.deep-merge-all(
38
- get-unthemable-tokens(),
39
- get-color-tokens(token-utils.$placeholder-color-config),
40
- get-typography-tokens(token-utils.$placeholder-typography-config),
41
- get-density-tokens(token-utils.$placeholder-density-config)
64
+ get-unthemable-tokens(),
65
+ get-color-tokens(token-utils.$placeholder-color-config),
66
+ get-typography-tokens(token-utils.$placeholder-typography-config),
67
+ get-density-tokens(token-utils.$placeholder-density-config)
42
68
  );
43
69
  }
@@ -12,19 +12,15 @@ $prefix: (mdc, extended-fab);
12
12
  // = TOKENS NOT USED IN ANGULAR MATERIAL =
13
13
  // =============================================================================================
14
14
  container-color: null,
15
- container-elevation: null,
16
15
  container-height: null,
17
- container-shadow-color: null,
18
16
  container-shape: null,
19
17
  container-surface-tint-layer-color: null,
20
- focus-container-elevation: null,
21
18
  focus-icon-color: null,
22
19
  focus-label-text-color: null,
23
20
  focus-outline-color: null,
24
21
  focus-outline-width: null,
25
22
  focus-state-layer-color: null,
26
23
  focus-state-layer-opacity: null,
27
- hover-container-elevation: null,
28
24
  hover-icon-color: null,
29
25
  hover-label-text-color: null,
30
26
  hover-state-layer-color: null,
@@ -36,7 +32,6 @@ $prefix: (mdc, extended-fab);
36
32
  lowered-focus-container-elevation: null,
37
33
  lowered-hover-container-elevation: null,
38
34
  lowered-pressed-container-elevation: null,
39
- pressed-container-elevation: null,
40
35
  pressed-icon-color: null,
41
36
  pressed-label-text-color: null,
42
37
  pressed-ripple-color: null,
@@ -48,7 +43,13 @@ $prefix: (mdc, extended-fab);
48
43
 
49
44
  // Tokens that can be configured through Angular Material's color theming API.
50
45
  @function get-color-tokens($theme) {
51
- @return ();
46
+ @return (
47
+ container-elevation: 6,
48
+ focus-container-elevation: 8,
49
+ hover-container-elevation: 8,
50
+ pressed-container-elevation: 12,
51
+ container-shadow-color: #000,
52
+ );
52
53
  }
53
54
 
54
55
  // Tokens that can be configured through Angular Material's typography theming API.
@@ -29,20 +29,16 @@ $ripple-target: '.mdc-fab__ripple';
29
29
  // =============================================================================================
30
30
  // = TOKENS NOT USED IN ANGULAR MATERIAL =
31
31
  // =============================================================================================
32
- container-elevation: null,
33
32
  container-height: null,
34
- container-shadow-color: null,
35
33
  container-surface-tint-layer-color: null,
36
34
  container-width: null,
37
35
 
38
- focus-container-elevation: null,
39
36
  focus-icon-color: null,
40
37
  focus-outline-color: null,
41
38
  focus-outline-width: null,
42
39
  focus-state-layer-color: null,
43
40
  focus-state-layer-opacity: null,
44
41
 
45
- hover-container-elevation: null,
46
42
  hover-icon-color: null,
47
43
  hover-state-layer-color: null,
48
44
  hover-state-layer-opacity: null,
@@ -52,7 +48,6 @@ $ripple-target: '.mdc-fab__ripple';
52
48
  lowered-hover-container-elevation: null,
53
49
  lowered-pressed-container-elevation: null,
54
50
 
55
- pressed-container-elevation: null,
56
51
  pressed-icon-color: null,
57
52
  pressed-ripple-color: null,
58
53
  pressed-ripple-opacity: null,
@@ -66,6 +61,11 @@ $ripple-target: '.mdc-fab__ripple';
66
61
  @return (
67
62
  // Background color of the FAB.
68
63
  container-color: inspection.get-theme-color($theme, background, card),
64
+ container-elevation: 6,
65
+ focus-container-elevation: 8,
66
+ hover-container-elevation: 8,
67
+ pressed-container-elevation: 12,
68
+ container-shadow-color: #000,
69
69
  );
70
70
  }
71
71