@angular/material 17.1.0-next.2 → 17.1.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (304) 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 +20 -2
  5. package/button/_button-theme.scss +131 -97
  6. package/button/_fab-theme.scss +2 -8
  7. package/button/_icon-button-theme.scss +11 -9
  8. package/button/index.d.ts +31 -2
  9. package/core/_core-theme.scss +6 -7
  10. package/core/_core.scss +17 -2
  11. package/core/index.d.ts +10 -3
  12. package/core/mdc-helpers/_mdc-helpers.scss +0 -184
  13. package/core/style/_sass-utils.scss +19 -0
  14. package/core/tokens/_token-utils.scss +56 -0
  15. package/core/tokens/m2/_index.scss +19 -5
  16. package/core/tokens/m2/mat/{_slide-toggle.scss → _app.scss} +12 -15
  17. package/core/tokens/m2/mat/_fab.scss +3 -0
  18. package/core/tokens/m2/mat/_filled-button.scss +3 -0
  19. package/core/tokens/m2/mat/_form-field.scss +50 -1
  20. package/core/tokens/m2/mat/_icon-button.scss +3 -0
  21. package/core/tokens/m2/mat/_outlined-button.scss +3 -0
  22. package/core/tokens/m2/mat/_protected-button.scss +3 -0
  23. package/core/tokens/m2/mat/_slider.scss +34 -8
  24. package/core/tokens/m2/mat/_tab-header.scss +6 -1
  25. package/core/tokens/m2/mat/_text-button.scss +3 -0
  26. package/core/tokens/m2/mdc/_extended-fab.scss +7 -6
  27. package/core/tokens/m2/mdc/_fab.scss +5 -5
  28. package/core/tokens/m2/mdc/_filled-button.scss +13 -12
  29. package/core/tokens/m2/mdc/_outlined-button.scss +7 -7
  30. package/core/tokens/m2/mdc/_protected-button.scss +14 -13
  31. package/core/tokens/m2/mdc/_text-button.scss +7 -12
  32. package/esm2022/autocomplete/autocomplete-origin.mjs +3 -3
  33. package/esm2022/autocomplete/autocomplete-trigger.mjs +7 -5
  34. package/esm2022/autocomplete/autocomplete.mjs +4 -5
  35. package/esm2022/autocomplete/module.mjs +4 -4
  36. package/esm2022/badge/badge-module.mjs +4 -4
  37. package/esm2022/badge/badge.mjs +3 -3
  38. package/esm2022/bottom-sheet/bottom-sheet-container.mjs +7 -8
  39. package/esm2022/bottom-sheet/bottom-sheet-module.mjs +4 -4
  40. package/esm2022/bottom-sheet/bottom-sheet.mjs +3 -3
  41. package/esm2022/button/button-base.mjs +46 -19
  42. package/esm2022/button/button.mjs +9 -9
  43. package/esm2022/button/fab.mjs +17 -17
  44. package/esm2022/button/icon-button.mjs +9 -9
  45. package/esm2022/button/module.mjs +4 -4
  46. package/esm2022/button/public-api.mjs +2 -1
  47. package/esm2022/button/testing/button-harness.mjs +4 -3
  48. package/esm2022/button-toggle/button-toggle-module.mjs +4 -4
  49. package/esm2022/button-toggle/button-toggle.mjs +6 -6
  50. package/esm2022/card/card.mjs +42 -42
  51. package/esm2022/card/module.mjs +4 -4
  52. package/esm2022/checkbox/checkbox-required-validator.mjs +3 -3
  53. package/esm2022/checkbox/checkbox.mjs +3 -3
  54. package/esm2022/checkbox/module.mjs +8 -8
  55. package/esm2022/chips/chip-action.mjs +3 -3
  56. package/esm2022/chips/chip-edit-input.mjs +3 -3
  57. package/esm2022/chips/chip-grid.mjs +3 -3
  58. package/esm2022/chips/chip-icons.mjs +9 -9
  59. package/esm2022/chips/chip-input.mjs +3 -3
  60. package/esm2022/chips/chip-listbox.mjs +4 -5
  61. package/esm2022/chips/chip-option.mjs +3 -3
  62. package/esm2022/chips/chip-row.mjs +3 -3
  63. package/esm2022/chips/chip-set.mjs +3 -3
  64. package/esm2022/chips/chip.mjs +5 -4
  65. package/esm2022/chips/module.mjs +4 -4
  66. package/esm2022/core/common-behaviors/common-module.mjs +4 -4
  67. package/esm2022/core/datetime/index.mjs +16 -11
  68. package/esm2022/core/datetime/native-date-adapter.mjs +3 -3
  69. package/esm2022/core/error/error-options.mjs +6 -6
  70. package/esm2022/core/internal-form-field/internal-form-field.mjs +3 -3
  71. package/esm2022/core/line/line.mjs +7 -7
  72. package/esm2022/core/option/index.mjs +4 -4
  73. package/esm2022/core/option/optgroup.mjs +3 -3
  74. package/esm2022/core/option/option.mjs +3 -3
  75. package/esm2022/core/private/ripple-loader.mjs +30 -12
  76. package/esm2022/core/ripple/index.mjs +4 -4
  77. package/esm2022/core/ripple/ripple-renderer.mjs +1 -1
  78. package/esm2022/core/ripple/ripple.mjs +3 -3
  79. package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox-module.mjs +4 -4
  80. package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +3 -3
  81. package/esm2022/core/version.mjs +1 -1
  82. package/esm2022/datepicker/calendar-body.mjs +3 -3
  83. package/esm2022/datepicker/calendar.mjs +8 -8
  84. package/esm2022/datepicker/date-range-input-parts.mjs +9 -9
  85. package/esm2022/datepicker/date-range-input.mjs +3 -3
  86. package/esm2022/datepicker/date-range-picker.mjs +3 -3
  87. package/esm2022/datepicker/date-range-selection-strategy.mjs +3 -3
  88. package/esm2022/datepicker/date-selection-model.mjs +9 -9
  89. package/esm2022/datepicker/datepicker-actions.mjs +9 -9
  90. package/esm2022/datepicker/datepicker-base.mjs +6 -6
  91. package/esm2022/datepicker/datepicker-errors.mjs +4 -4
  92. package/esm2022/datepicker/datepicker-input-base.mjs +3 -3
  93. package/esm2022/datepicker/datepicker-input.mjs +3 -3
  94. package/esm2022/datepicker/datepicker-intl.mjs +3 -3
  95. package/esm2022/datepicker/datepicker-module.mjs +4 -4
  96. package/esm2022/datepicker/datepicker-toggle.mjs +6 -6
  97. package/esm2022/datepicker/datepicker.mjs +3 -3
  98. package/esm2022/datepicker/month-view.mjs +3 -3
  99. package/esm2022/datepicker/multi-year-view.mjs +3 -3
  100. package/esm2022/datepicker/year-view.mjs +3 -3
  101. package/esm2022/dialog/dialog-container.mjs +5 -5
  102. package/esm2022/dialog/dialog-content-directives.mjs +18 -21
  103. package/esm2022/dialog/dialog.mjs +3 -3
  104. package/esm2022/dialog/module.mjs +4 -4
  105. package/esm2022/divider/divider-module.mjs +4 -4
  106. package/esm2022/divider/divider.mjs +3 -3
  107. package/esm2022/expansion/accordion.mjs +4 -5
  108. package/esm2022/expansion/expansion-module.mjs +4 -4
  109. package/esm2022/expansion/expansion-panel-content.mjs +3 -3
  110. package/esm2022/expansion/expansion-panel-header.mjs +9 -9
  111. package/esm2022/expansion/expansion-panel.mjs +8 -8
  112. package/esm2022/form-field/directives/error.mjs +3 -3
  113. package/esm2022/form-field/directives/floating-label.mjs +3 -3
  114. package/esm2022/form-field/directives/hint.mjs +3 -3
  115. package/esm2022/form-field/directives/label.mjs +3 -3
  116. package/esm2022/form-field/directives/line-ripple.mjs +3 -3
  117. package/esm2022/form-field/directives/notched-outline.mjs +3 -3
  118. package/esm2022/form-field/directives/prefix.mjs +3 -3
  119. package/esm2022/form-field/directives/suffix.mjs +3 -3
  120. package/esm2022/form-field/form-field-control.mjs +3 -3
  121. package/esm2022/form-field/form-field.mjs +6 -6
  122. package/esm2022/form-field/module.mjs +4 -4
  123. package/esm2022/grid-list/grid-list-module.mjs +4 -4
  124. package/esm2022/grid-list/grid-list.mjs +3 -3
  125. package/esm2022/grid-list/grid-tile.mjs +15 -15
  126. package/esm2022/icon/icon-module.mjs +4 -4
  127. package/esm2022/icon/icon-registry.mjs +3 -3
  128. package/esm2022/icon/icon.mjs +3 -3
  129. package/esm2022/icon/testing/fake-icon-registry.mjs +7 -7
  130. package/esm2022/input/input.mjs +3 -3
  131. package/esm2022/input/module.mjs +4 -4
  132. package/esm2022/list/action-list.mjs +3 -3
  133. package/esm2022/list/list-base.mjs +6 -6
  134. package/esm2022/list/list-item-sections.mjs +18 -18
  135. package/esm2022/list/list-module.mjs +4 -4
  136. package/esm2022/list/list-option.mjs +6 -6
  137. package/esm2022/list/list.mjs +6 -6
  138. package/esm2022/list/nav-list.mjs +3 -3
  139. package/esm2022/list/selection-list.mjs +3 -3
  140. package/esm2022/list/subheader.mjs +3 -3
  141. package/esm2022/list/tokens.mjs +2 -2
  142. package/esm2022/menu/menu-content.mjs +3 -3
  143. package/esm2022/menu/menu-item.mjs +3 -3
  144. package/esm2022/menu/menu-trigger.mjs +3 -3
  145. package/esm2022/menu/menu.mjs +4 -5
  146. package/esm2022/menu/module.mjs +4 -4
  147. package/esm2022/paginator/module.mjs +4 -4
  148. package/esm2022/paginator/paginator-intl.mjs +3 -3
  149. package/esm2022/paginator/paginator.mjs +5 -5
  150. package/esm2022/progress-bar/module.mjs +4 -4
  151. package/esm2022/progress-bar/progress-bar.mjs +3 -3
  152. package/esm2022/progress-spinner/module.mjs +4 -4
  153. package/esm2022/progress-spinner/progress-spinner.mjs +3 -3
  154. package/esm2022/radio/module.mjs +4 -4
  155. package/esm2022/radio/radio.mjs +6 -6
  156. package/esm2022/select/module.mjs +4 -4
  157. package/esm2022/select/select.mjs +19 -19
  158. package/esm2022/sidenav/drawer.mjs +22 -18
  159. package/esm2022/sidenav/sidenav-module.mjs +4 -4
  160. package/esm2022/sidenav/sidenav.mjs +10 -13
  161. package/esm2022/slide-toggle/module.mjs +8 -8
  162. package/esm2022/slide-toggle/slide-toggle-required-validator.mjs +3 -3
  163. package/esm2022/slide-toggle/slide-toggle.mjs +7 -7
  164. package/esm2022/slider/module.mjs +4 -4
  165. package/esm2022/slider/slider-input.mjs +43 -26
  166. package/esm2022/slider/slider-interface.mjs +1 -1
  167. package/esm2022/slider/slider-thumb.mjs +12 -5
  168. package/esm2022/slider/slider.mjs +5 -6
  169. package/esm2022/snack-bar/module.mjs +4 -4
  170. package/esm2022/snack-bar/simple-snack-bar.mjs +3 -3
  171. package/esm2022/snack-bar/snack-bar-container.mjs +13 -12
  172. package/esm2022/snack-bar/snack-bar-content.mjs +9 -9
  173. package/esm2022/snack-bar/snack-bar.mjs +3 -3
  174. package/esm2022/sort/sort-header-intl.mjs +3 -3
  175. package/esm2022/sort/sort-header.mjs +3 -3
  176. package/esm2022/sort/sort-module.mjs +4 -4
  177. package/esm2022/sort/sort.mjs +3 -3
  178. package/esm2022/stepper/step-content.mjs +3 -3
  179. package/esm2022/stepper/step-header.mjs +3 -3
  180. package/esm2022/stepper/step-label.mjs +3 -3
  181. package/esm2022/stepper/stepper-button.mjs +7 -9
  182. package/esm2022/stepper/stepper-icon.mjs +3 -3
  183. package/esm2022/stepper/stepper-intl.mjs +3 -3
  184. package/esm2022/stepper/stepper-module.mjs +4 -4
  185. package/esm2022/stepper/stepper.mjs +16 -12
  186. package/esm2022/table/cell.mjs +21 -21
  187. package/esm2022/table/module.mjs +4 -4
  188. package/esm2022/table/row.mjs +21 -21
  189. package/esm2022/table/table.mjs +64 -31
  190. package/esm2022/table/text-column.mjs +3 -3
  191. package/esm2022/tabs/ink-bar.mjs +4 -4
  192. package/esm2022/tabs/module.mjs +4 -4
  193. package/esm2022/tabs/paginated-tab-header.mjs +13 -6
  194. package/esm2022/tabs/tab-body.mjs +6 -6
  195. package/esm2022/tabs/tab-content.mjs +3 -3
  196. package/esm2022/tabs/tab-group.mjs +20 -9
  197. package/esm2022/tabs/tab-header.mjs +6 -6
  198. package/esm2022/tabs/tab-label-wrapper.mjs +3 -3
  199. package/esm2022/tabs/tab-label.mjs +3 -3
  200. package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +12 -12
  201. package/esm2022/tabs/tab.mjs +9 -5
  202. package/esm2022/toolbar/toolbar-module.mjs +4 -4
  203. package/esm2022/toolbar/toolbar.mjs +7 -7
  204. package/esm2022/tooltip/module.mjs +4 -4
  205. package/esm2022/tooltip/tooltip.mjs +6 -6
  206. package/esm2022/tree/node.mjs +9 -9
  207. package/esm2022/tree/outlet.mjs +3 -3
  208. package/esm2022/tree/padding.mjs +3 -3
  209. package/esm2022/tree/toggle.mjs +3 -3
  210. package/esm2022/tree/tree-module.mjs +4 -4
  211. package/esm2022/tree/tree.mjs +3 -3
  212. package/expansion/index.d.ts +2 -2
  213. package/fesm2022/autocomplete.mjs +16 -15
  214. package/fesm2022/autocomplete.mjs.map +1 -1
  215. package/fesm2022/badge.mjs +7 -7
  216. package/fesm2022/bottom-sheet.mjs +12 -13
  217. package/fesm2022/bottom-sheet.mjs.map +1 -1
  218. package/fesm2022/button/testing.mjs +3 -2
  219. package/fesm2022/button/testing.mjs.map +1 -1
  220. package/fesm2022/button-toggle.mjs +10 -10
  221. package/fesm2022/button.mjs +82 -55
  222. package/fesm2022/button.mjs.map +1 -1
  223. package/fesm2022/card.mjs +46 -46
  224. package/fesm2022/checkbox.mjs +14 -14
  225. package/fesm2022/chips.mjs +41 -41
  226. package/fesm2022/chips.mjs.map +1 -1
  227. package/fesm2022/core.mjs +93 -70
  228. package/fesm2022/core.mjs.map +1 -1
  229. package/fesm2022/datepicker.mjs +86 -86
  230. package/fesm2022/datepicker.mjs.map +1 -1
  231. package/fesm2022/dialog.mjs +28 -31
  232. package/fesm2022/dialog.mjs.map +1 -1
  233. package/fesm2022/divider.mjs +7 -7
  234. package/fesm2022/expansion.mjs +26 -27
  235. package/fesm2022/expansion.mjs.map +1 -1
  236. package/fesm2022/form-field.mjs +36 -36
  237. package/fesm2022/form-field.mjs.map +1 -1
  238. package/fesm2022/grid-list.mjs +22 -22
  239. package/fesm2022/icon/testing.mjs +7 -7
  240. package/fesm2022/icon.mjs +10 -10
  241. package/fesm2022/input.mjs +7 -7
  242. package/fesm2022/list.mjs +52 -52
  243. package/fesm2022/list.mjs.map +1 -1
  244. package/fesm2022/menu.mjs +16 -17
  245. package/fesm2022/menu.mjs.map +1 -1
  246. package/fesm2022/paginator.mjs +11 -11
  247. package/fesm2022/paginator.mjs.map +1 -1
  248. package/fesm2022/progress-bar.mjs +7 -7
  249. package/fesm2022/progress-spinner.mjs +7 -7
  250. package/fesm2022/radio.mjs +10 -10
  251. package/fesm2022/select.mjs +22 -22
  252. package/fesm2022/select.mjs.map +1 -1
  253. package/fesm2022/sidenav.mjs +34 -33
  254. package/fesm2022/sidenav.mjs.map +1 -1
  255. package/fesm2022/slide-toggle.mjs +17 -17
  256. package/fesm2022/slide-toggle.mjs.map +1 -1
  257. package/fesm2022/slider.mjs +60 -38
  258. package/fesm2022/slider.mjs.map +1 -1
  259. package/fesm2022/snack-bar.mjs +32 -30
  260. package/fesm2022/snack-bar.mjs.map +1 -1
  261. package/fesm2022/sort.mjs +13 -13
  262. package/fesm2022/stepper.mjs +40 -38
  263. package/fesm2022/stepper.mjs.map +1 -1
  264. package/fesm2022/table.mjs +111 -78
  265. package/fesm2022/table.mjs.map +1 -1
  266. package/fesm2022/tabs.mjs +76 -55
  267. package/fesm2022/tabs.mjs.map +1 -1
  268. package/fesm2022/toolbar.mjs +11 -11
  269. package/fesm2022/toolbar.mjs.map +1 -1
  270. package/fesm2022/tooltip.mjs +10 -10
  271. package/fesm2022/tree.mjs +25 -25
  272. package/form-field/_form-field-subscript.scss +1 -2
  273. package/form-field/_form-field-theme.scss +4 -2
  274. package/form-field/_mdc-text-field-density-overrides.scss +60 -0
  275. package/icon/_icon-theme.scss +24 -10
  276. package/list/index.d.ts +1 -1
  277. package/package.json +49 -49
  278. package/paginator/_paginator-theme.scss +5 -4
  279. package/prebuilt-themes/deeppurple-amber.css +1 -1
  280. package/prebuilt-themes/indigo-pink.css +1 -1
  281. package/prebuilt-themes/pink-bluegrey.css +1 -1
  282. package/prebuilt-themes/purple-green.css +1 -1
  283. package/schematics/ng-add/index.js +1 -1
  284. package/schematics/ng-add/index.mjs +1 -1
  285. package/schematics/ng-generate/address-form/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +3 -3
  286. package/schematics/ng-generate/dashboard/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +1 -1
  287. package/schematics/ng-generate/dashboard/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +5 -3
  288. package/schematics/ng-generate/mdc-migration/index_bundled.js +1251 -633
  289. package/schematics/ng-generate/mdc-migration/index_bundled.js.map +4 -4
  290. package/schematics/ng-generate/mdc-migration/schema.json +0 -1
  291. package/schematics/ng-generate/navigation/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +3 -3
  292. package/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +3 -3
  293. package/schematics/ng-generate/tree/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +3 -3
  294. package/slide-toggle/_slide-toggle-theme.scss +16 -28
  295. package/slide-toggle/index.d.ts +2 -2
  296. package/slider/_slider-theme.scss +10 -12
  297. package/slider/index.d.ts +9 -12
  298. package/snack-bar/index.d.ts +2 -2
  299. package/stepper/index.d.ts +5 -3
  300. package/table/index.d.ts +2 -4
  301. package/tabs/_tabs-common.scss +20 -1
  302. package/tabs/index.d.ts +14 -7
  303. package/form-field/_form-field-density.scss +0 -118
  304. package/form-field/_form-field-sizing.scss +0 -40
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License
2
2
 
3
- Copyright (c) 2023 Google LLC.
3
+ Copyright (c) 2024 Google LLC.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/_index.scss CHANGED
@@ -143,12 +143,12 @@
143
143
  tree-base;
144
144
 
145
145
  // MDC Helpers
146
- @forward './core/mdc-helpers/mdc-helpers' as private-* show private-using-mdc-theme,
147
- private-using-mdc-typography, private-disable-mdc-fallback-declarations,
148
- private-typography-config-level-from-mdc, private-if-touch-targets-unsupported,
149
- $private-mdc-base-styles-query, $private-mdc-base-styles-without-animation-query,
150
- $private-mdc-theme-styles-query, $private-mdc-typography-styles-query;
146
+ @forward './core/mdc-helpers/mdc-helpers' as private-* show
147
+ private-disable-mdc-fallback-declarations, private-typography-config-level-from-mdc,
148
+ private-if-touch-targets-unsupported, $private-mdc-base-styles-query,
149
+ $private-mdc-base-styles-without-animation-query, $private-mdc-theme-styles-query,
150
+ $private-mdc-typography-styles-query;
151
151
 
152
152
  // New theming APIs:
153
153
  @forward './core/theming/inspection' show get-theme-version, get-theme-type, get-theme-color,
154
- get-theme-typography, get-theme-density, theme-has;
154
+ get-theme-typography, get-theme-density, theme-has, theme-remove;
@@ -2,7 +2,6 @@ import { AnimationEvent as AnimationEvent_2 } from '@angular/animations';
2
2
  import { AnimationTriggerMetadata } from '@angular/animations';
3
3
  import { BreakpointObserver } from '@angular/cdk/layout';
4
4
  import { CdkDialogContainer } from '@angular/cdk/dialog';
5
- import { ChangeDetectorRef } from '@angular/core';
6
5
  import { ComponentRef } from '@angular/core';
7
6
  import { ComponentType } from '@angular/cdk/portal';
8
7
  import { DialogConfig } from '@angular/cdk/dialog';
@@ -133,7 +132,6 @@ export declare class MatBottomSheetConfig<D = any> {
133
132
  * @docs-private
134
133
  */
135
134
  export declare class MatBottomSheetContainer extends CdkDialogContainer implements OnDestroy {
136
- private _changeDetectorRef;
137
135
  private _breakpointSubscription;
138
136
  /** The state of the bottom sheet animations. */
139
137
  _animationState: 'void' | 'visible' | 'hidden';
@@ -141,7 +139,7 @@ export declare class MatBottomSheetContainer extends CdkDialogContainer implemen
141
139
  _animationStateChanged: EventEmitter<AnimationEvent_2>;
142
140
  /** Whether the component has been destroyed. */
143
141
  private _destroyed;
144
- constructor(elementRef: ElementRef, focusTrapFactory: FocusTrapFactory, document: any, config: DialogConfig, checker: InteractivityChecker, ngZone: NgZone, overlayRef: OverlayRef, breakpointObserver: BreakpointObserver, _changeDetectorRef: ChangeDetectorRef, focusMonitor?: FocusMonitor);
142
+ constructor(elementRef: ElementRef, focusTrapFactory: FocusTrapFactory, document: any, config: DialogConfig, checker: InteractivityChecker, ngZone: NgZone, overlayRef: OverlayRef, breakpointObserver: BreakpointObserver, focusMonitor?: FocusMonitor);
145
143
  /** Begin animation of bottom sheet entrance into view. */
146
144
  enter(): void;
147
145
  /** Begin animation of the bottom sheet exiting from view. */
@@ -151,7 +149,7 @@ export declare class MatBottomSheetContainer extends CdkDialogContainer implemen
151
149
  _onAnimationStart(event: AnimationEvent_2): void;
152
150
  protected _captureInitialFocus(): void;
153
151
  private _toggleClass;
154
- static ɵfac: i0.ɵɵFactoryDeclaration<MatBottomSheetContainer, [null, null, { optional: true; }, null, null, null, null, null, null, null]>;
152
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatBottomSheetContainer, [null, null, { optional: true; }, null, null, null, null, null, null]>;
155
153
  static ɵcmp: i0.ɵɵComponentDeclaration<MatBottomSheetContainer, "mat-bottom-sheet-container", never, {}, {}, never, never, true, never>;
156
154
  }
157
155
 
@@ -68,12 +68,17 @@
68
68
  @include token-utils.create-token-slot(background-color, state-layer-color);
69
69
  }
70
70
 
71
+ &.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before {
72
+ @include token-utils.create-token-slot(background-color, disabled-state-layer-color);
73
+ }
74
+
71
75
  &:hover .mat-mdc-button-persistent-ripple::before {
72
76
  @include token-utils.create-token-slot(opacity, hover-state-layer-opacity);
73
77
  }
74
78
 
75
79
  &.cdk-program-focused,
76
- &.cdk-keyboard-focused {
80
+ &.cdk-keyboard-focused,
81
+ &.mat-mdc-button-disabled-interactive:focus {
77
82
  .mat-mdc-button-persistent-ripple::before {
78
83
  @include token-utils.create-token-slot(opacity, focus-state-layer-opacity);
79
84
  }
@@ -91,11 +96,18 @@
91
96
  // and note that having pointer-events may have unintended side-effects, e.g. allowing the user
92
97
  // to click the target underneath the button.
93
98
  @mixin mat-private-button-disabled() {
94
- &[disabled] {
99
+ // `[disabled]` shouldn't be necessary, but we keep it to maintain
100
+ // compatibility with apps setting it through host bindings.
101
+ &[disabled],
102
+ &.mat-mdc-button-disabled {
95
103
  cursor: default;
96
104
  pointer-events: none;
97
105
  @content;
98
106
  }
107
+
108
+ &.mat-mdc-button-disabled-interactive {
109
+ pointer-events: auto;
110
+ }
99
111
  }
100
112
 
101
113
  // Hides the touch target on lower densities.
@@ -107,6 +119,12 @@
107
119
  }
108
120
  }
109
121
 
122
+ // Adds an elevation shadow to a button.
123
+ @mixin mat-private-button-elevation($token-name) {
124
+ // MDC outputs a variable that is the same as the token name, but suffixed with `-shadow`.
125
+ box-shadow: var(#{token-utils.get-token-variable($token-name) + '-shadow'});
126
+ }
127
+
110
128
  @mixin mat-private-button-touch-target($is-square) {
111
129
  // Element used to ensure that the button has a touch target that meets the required minimum.
112
130
  // Note that we use this, instead of MDC's built-in `mdc-button--touch` class, because the MDC
@@ -1,12 +1,10 @@
1
- @use '@material/button/button' as mdc-button;
1
+ @use 'sass:map';
2
2
  @use '@material/button/button-text-theme' as mdc-button-text-theme;
3
3
  @use '@material/button/button-filled-theme' as mdc-button-filled-theme;
4
4
  @use '@material/button/button-protected-theme' as mdc-button-protected-theme;
5
5
  @use '@material/button/button-outlined-theme' as mdc-button-outlined-theme;
6
- @use '@material/elevation/elevation-theme' as mdc-elevation-theme;
7
6
 
8
7
  @use './button-base';
9
- @use '../core/mdc-helpers/mdc-helpers';
10
8
  @use '../core/theming/theming';
11
9
  @use '../core/theming/inspection';
12
10
  @use '../core/tokens/token-utils';
@@ -19,7 +17,7 @@
19
17
  @use '../core/tokens/m2/mat/protected-button' as tokens-mat-protected-button;
20
18
  @use '../core/tokens/m2/mdc/text-button' as tokens-mdc-text-button;
21
19
  @use '../core/tokens/m2/mat/text-button' as tokens-mat-text-button;
22
-
20
+ @use '../core/style/sass-utils';
23
21
 
24
22
  @mixin _text-button-variant($theme, $palette) {
25
23
  $mdc-tokens: if($palette,
@@ -81,141 +79,177 @@
81
79
  @include token-utils.create-token-values(tokens-mat-outlined-button.$prefix, $mat-tokens);
82
80
  }
83
81
 
84
- @mixin base($theme) {
85
- // TODO(mmalerba): Move button base tokens here
82
+ @mixin _theme-from-tokens($tokens) {
83
+ @if ($tokens != ()) {
84
+ @include mdc-button-text-theme.theme(map.get($tokens, tokens-mdc-text-button.$prefix));
85
+ @include mdc-button-protected-theme.theme(
86
+ map.get($tokens, tokens-mdc-protected-button.$prefix));
87
+ @include mdc-button-filled-theme.theme(map.get($tokens, tokens-mdc-filled-button.$prefix));
88
+ @include mdc-button-outlined-theme.theme(map.get($tokens, tokens-mdc-outlined-button.$prefix));
89
+
90
+ @include token-utils.create-token-values(
91
+ tokens-mat-text-button.$prefix, map.get($tokens, tokens-mat-text-button.$prefix));
92
+ @include token-utils.create-token-values(
93
+ tokens-mat-protected-button.$prefix, map.get($tokens, tokens-mat-protected-button.$prefix));
94
+ @include token-utils.create-token-values(
95
+ tokens-mat-filled-button.$prefix, map.get($tokens, tokens-mat-filled-button.$prefix));
96
+ @include token-utils.create-token-values(
97
+ tokens-mat-outlined-button.$prefix, map.get($tokens, tokens-mat-outlined-button.$prefix));
98
+ }
86
99
  }
87
100
 
88
- @mixin color($theme) {
89
- .mat-mdc-button {
90
- @include _text-button-variant($theme, null);
91
-
92
- &.mat-primary {
93
- @include _text-button-variant($theme, primary);
94
- }
95
-
96
- &.mat-accent {
97
- @include _text-button-variant($theme, accent);
98
- }
99
-
100
- &.mat-warn {
101
- @include _text-button-variant($theme, warn);
102
- }
101
+ @mixin base($theme) {
102
+ @if inspection.get-theme-version($theme) == 1 {
103
+ @include theme-from-tokens(inspection.get-theme-tokens($theme, base));
103
104
  }
104
-
105
- .mat-mdc-unelevated-button {
106
- @include _filled-button-variant($theme, null);
107
-
108
- &.mat-primary {
109
- @include _filled-button-variant($theme, primary);
105
+ @else {
106
+ @include sass-utils.current-selector-or-root() {
107
+ @include mdc-button-text-theme.theme(
108
+ tokens-mdc-text-button.get-unthemable-tokens());
109
+ @include mdc-button-filled-theme.theme(
110
+ tokens-mdc-filled-button.get-unthemable-tokens());
111
+ @include mdc-button-protected-theme.theme(
112
+ tokens-mdc-protected-button.get-unthemable-tokens());
113
+ @include mdc-button-outlined-theme.theme(
114
+ tokens-mdc-outlined-button.get-unthemable-tokens());
110
115
  }
116
+ }
117
+ }
111
118
 
112
- &.mat-accent {
113
- @include _filled-button-variant($theme, accent);
119
+ @mixin color($theme) {
120
+ @if inspection.get-theme-version($theme) == 1 {
121
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
122
+ }
123
+ @else {
124
+ @include sass-utils.current-selector-or-root() {
125
+ @include _text-button-variant($theme, null);
126
+ @include _filled-button-variant($theme, null);
127
+ @include _protected-button-variant($theme, null);
128
+ @include _outlined-button-variant($theme, null);
114
129
  }
115
130
 
116
- &.mat-warn {
117
- @include _filled-button-variant($theme, warn);
118
- }
119
- }
131
+ .mat-mdc-button {
132
+ &.mat-primary {
133
+ @include _text-button-variant($theme, primary);
134
+ }
120
135
 
121
- .mat-mdc-raised-button {
122
- @include _protected-button-variant($theme, null);
136
+ &.mat-accent {
137
+ @include _text-button-variant($theme, accent);
138
+ }
123
139
 
124
- &.mat-primary {
125
- @include _protected-button-variant($theme, primary);
140
+ &.mat-warn {
141
+ @include _text-button-variant($theme, warn);
142
+ }
126
143
  }
127
144
 
128
- &.mat-accent {
129
- @include _protected-button-variant($theme, accent);
130
- }
145
+ .mat-mdc-unelevated-button {
146
+ &.mat-primary {
147
+ @include _filled-button-variant($theme, primary);
148
+ }
149
+
150
+ &.mat-accent {
151
+ @include _filled-button-variant($theme, accent);
152
+ }
131
153
 
132
- &.mat-warn {
133
- @include _protected-button-variant($theme, warn);
154
+ &.mat-warn {
155
+ @include _filled-button-variant($theme, warn);
156
+ }
134
157
  }
135
158
 
136
- // TODO(wagnermaciel): Remove this workaround when b/301126527 is resolved
137
- @include mdc-helpers.disable-mdc-fallback-declarations {
138
- @include mdc-elevation-theme.elevation(2);
159
+ .mat-mdc-raised-button {
160
+ &.mat-primary {
161
+ @include _protected-button-variant($theme, primary);
162
+ }
139
163
 
140
- &:hover, &:focus {
141
- @include mdc-elevation-theme.elevation(4);
164
+ &.mat-accent {
165
+ @include _protected-button-variant($theme, accent);
142
166
  }
143
167
 
144
- &:active, &:focus:active {
145
- @include mdc-elevation-theme.elevation(8);
168
+ &.mat-warn {
169
+ @include _protected-button-variant($theme, warn);
146
170
  }
147
171
  }
148
- }
149
172
 
150
- .mat-mdc-outlined-button {
151
- @include _outlined-button-variant($theme, null);
152
-
153
- &.mat-primary {
154
- @include _outlined-button-variant($theme, primary);
155
- }
173
+ .mat-mdc-outlined-button {
174
+ &.mat-primary {
175
+ @include _outlined-button-variant($theme, primary);
176
+ }
156
177
 
157
- &.mat-accent {
158
- @include _outlined-button-variant($theme, accent);
159
- }
178
+ &.mat-accent {
179
+ @include _outlined-button-variant($theme, accent);
180
+ }
160
181
 
161
- &.mat-warn {
162
- @include _outlined-button-variant($theme, warn);
182
+ &.mat-warn {
183
+ @include _outlined-button-variant($theme, warn);
184
+ }
163
185
  }
164
186
  }
165
187
  }
166
188
 
167
189
  @mixin typography($theme) {
168
- @include mdc-helpers.using-mdc-typography($theme) {
169
- @include mdc-button.without-ripple($query: mdc-helpers.$mdc-typography-styles-query);
190
+ @if inspection.get-theme-version($theme) == 1 {
191
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
170
192
  }
171
-
172
- .mat-mdc-button,
173
- .mat-mdc-raised-button,
174
- .mat-mdc-outlined-button,
175
- .mat-mdc-unelevated-button {
176
- line-height: inherit;
193
+ @else {
194
+ @include sass-utils.current-selector-or-root() {
195
+ $text-typography-tokens: tokens-mdc-text-button.get-typography-tokens($theme);
196
+ $filled-typography-tokens: tokens-mdc-filled-button.get-typography-tokens($theme);
197
+ $outlined-typography-tokens: tokens-mdc-outlined-button.get-typography-tokens($theme);
198
+ $protected-typography-tokens: tokens-mdc-protected-button.get-typography-tokens($theme);
199
+
200
+ @include mdc-button-text-theme.theme($text-typography-tokens);
201
+ @include mdc-button-filled-theme.theme($filled-typography-tokens);
202
+ @include mdc-button-outlined-theme.theme($outlined-typography-tokens);
203
+ @include mdc-button-protected-theme.theme($protected-typography-tokens);
204
+ }
177
205
  }
178
206
  }
179
207
 
180
208
  @mixin density($theme) {
181
- $density-scale: theming.clamp-density(inspection.get-theme-density($theme), -3);
182
-
183
- .mat-mdc-button {
184
- $density-tokens: tokens-mdc-text-button.get-density-tokens($theme);
185
- @include mdc-button-text-theme.theme($density-tokens);
186
- @include button-base.mat-private-button-touch-target-density($density-scale);
209
+ @if inspection.get-theme-version($theme) == 1 {
210
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
187
211
  }
212
+ @else {
213
+ $density-scale: theming.clamp-density(inspection.get-theme-density($theme), -3);
188
214
 
189
- .mat-mdc-raised-button {
190
- $density-tokens: tokens-mdc-protected-button.get-density-tokens($theme);
191
- @include mdc-button-protected-theme.theme($density-tokens);
192
- @include button-base.mat-private-button-touch-target-density($density-scale);
193
- }
215
+ @include sass-utils.current-selector-or-root() {
216
+ $text-density-tokens: tokens-mdc-text-button.get-density-tokens($theme);
217
+ $filled-density-tokens: tokens-mdc-filled-button.get-density-tokens($theme);
218
+ $outlined-density-tokens: tokens-mdc-outlined-button.get-density-tokens($theme);
219
+ $protected-density-tokens: tokens-mdc-protected-button.get-density-tokens($theme);
194
220
 
195
- .mat-mdc-unelevated-button {
196
- $density-tokens: tokens-mdc-filled-button.get-density-tokens($theme);
197
- @include mdc-button-filled-theme.theme($density-tokens);
198
- @include button-base.mat-private-button-touch-target-density($density-scale);
199
- }
221
+ @include mdc-button-text-theme.theme($text-density-tokens);
222
+ @include mdc-button-filled-theme.theme($filled-density-tokens);
223
+ @include mdc-button-outlined-theme.theme($outlined-density-tokens);
224
+ @include mdc-button-protected-theme.theme($protected-density-tokens);
225
+ }
200
226
 
201
- .mat-mdc-outlined-button {
202
- $density-tokens: tokens-mdc-outlined-button.get-density-tokens($theme);
203
- @include mdc-button-outlined-theme.theme($density-tokens);
204
- @include button-base.mat-private-button-touch-target-density($density-scale);
227
+ .mat-mdc-button,
228
+ .mat-mdc-raised-button,
229
+ .mat-mdc-unelevated-button,
230
+ .mat-mdc-outlined-button {
231
+ // TODO: tokenize the touch target visibility.
232
+ @include button-base.mat-private-button-touch-target-density($density-scale);
233
+ }
205
234
  }
206
235
  }
207
236
 
208
237
  @mixin theme($theme) {
209
238
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-button') {
210
- @include base($theme);
211
- @if inspection.theme-has($theme, color) {
212
- @include color($theme);
213
- }
214
- @if inspection.theme-has($theme, density) {
215
- @include density($theme);
239
+ @if inspection.get-theme-version($theme) == 1 {
240
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme));
216
241
  }
217
- @if inspection.theme-has($theme, typography) {
218
- @include typography($theme);
242
+ @else {
243
+ @include base($theme);
244
+ @if inspection.theme-has($theme, color) {
245
+ @include color($theme);
246
+ }
247
+ @if inspection.theme-has($theme, density) {
248
+ @include density($theme);
249
+ }
250
+ @if inspection.theme-has($theme, typography) {
251
+ @include typography($theme);
252
+ }
219
253
  }
220
254
  }
221
255
  }
@@ -1,8 +1,6 @@
1
1
  @use 'sass:map';
2
- @use '@material/fab/fab' as mdc-fab;
3
2
  @use '@material/fab/fab-theme' as mdc-fab-theme;
4
3
  @use '@material/fab/extended-fab-theme' as mdc-extended-fab-theme;
5
- @use '../core/mdc-helpers/mdc-helpers';
6
4
  @use '../core/style/sass-utils';
7
5
  @use '../core/theming/theming';
8
6
  @use '../core/theming/inspection';
@@ -49,6 +47,7 @@
49
47
  @else {
50
48
  @include sass-utils.current-selector-or-root() {
51
49
  @include _fab-variant($theme, null);
50
+ @include mdc-extended-fab-theme.theme(tokens-mdc-extended-fab.get-color-tokens($theme));
52
51
 
53
52
  .mat-mdc-fab,
54
53
  .mat-mdc-mini-fab {
@@ -73,13 +72,8 @@
73
72
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
74
73
  }
75
74
  @else {
76
- @include mdc-helpers.using-mdc-typography($theme) {
77
- @include mdc-fab.without-ripple($query: mdc-helpers.$mdc-typography-styles-query);
78
- }
79
-
80
- $typography-tokens: tokens-mdc-extended-fab.get-typography-tokens($theme);
81
75
  @include sass-utils.current-selector-or-root() {
82
- @include mdc-extended-fab-theme.theme($typography-tokens);
76
+ @include mdc-extended-fab-theme.theme(tokens-mdc-extended-fab.get-typography-tokens($theme));
83
77
  }
84
78
  }
85
79
  }
@@ -43,19 +43,21 @@
43
43
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
44
44
  }
45
45
  @else {
46
- .mat-mdc-icon-button {
46
+ @include sass-utils.current-selector-or-root() {
47
47
  @include _icon-button-variant($theme, null);
48
48
 
49
- &.mat-primary {
50
- @include _icon-button-variant($theme, primary);
51
- }
49
+ .mat-mdc-icon-button {
50
+ &.mat-primary {
51
+ @include _icon-button-variant($theme, primary);
52
+ }
52
53
 
53
- &.mat-accent {
54
- @include _icon-button-variant($theme, accent);
55
- }
54
+ &.mat-accent {
55
+ @include _icon-button-variant($theme, accent);
56
+ }
56
57
 
57
- &.mat-warn {
58
- @include _icon-button-variant($theme, warn);
58
+ &.mat-warn {
59
+ @include _icon-button-variant($theme, warn);
60
+ }
59
61
  }
60
62
  }
61
63
  }
package/button/index.d.ts CHANGED
@@ -38,6 +38,9 @@ declare namespace i4 {
38
38
  }
39
39
  }
40
40
 
41
+ /** Injection token that can be used to provide the default options the button component. */
42
+ export declare const MAT_BUTTON_CONFIG: InjectionToken<MatButtonConfig>;
43
+
41
44
  /** Injection token to be used to override the default options for FAB. */
42
45
  export declare const MAT_FAB_DEFAULT_OPTIONS: InjectionToken<MatFabDefaultOptions>;
43
46
 
@@ -69,6 +72,7 @@ declare class MatAnchorBase extends MatButtonBase implements OnInit, OnDestroy {
69
72
  ngOnInit(): void;
70
73
  ngOnDestroy(): void;
71
74
  _haltDisabledEvents: (event: Event) => void;
75
+ protected _getAriaDisabled(): boolean;
72
76
  static ɵfac: i0.ɵɵFactoryDeclaration<MatAnchorBase, never>;
73
77
  static ɵdir: i0.ɵɵDirectiveDeclaration<MatAnchorBase, never, never, { "tabIndex": { "alias": "tabIndex"; "required": false; }; }, {}, never, never, false, never>;
74
78
  static ngAcceptInputType_tabIndex: unknown;
@@ -116,19 +120,44 @@ declare class MatButtonBase implements AfterViewInit, OnDestroy {
116
120
  get disableRipple(): boolean;
117
121
  set disableRipple(value: any);
118
122
  private _disableRipple;
123
+ /** Whether the button is disabled. */
119
124
  get disabled(): boolean;
120
125
  set disabled(value: any);
121
126
  private _disabled;
127
+ /** `aria-disabled` value of the button. */
128
+ ariaDisabled: boolean | undefined;
129
+ /**
130
+ * Natively disabled buttons prevent focus and any pointer events from reaching the button.
131
+ * In some scenarios this might not be desirable, because it can prevent users from finding out
132
+ * why the button is disabled (e.g. via tooltip).
133
+ *
134
+ * Enabling this input will change the button so that it is styled to be disabled and will be
135
+ * marked as `aria-disabled`, but it will allow the button to receive events and focus.
136
+ *
137
+ * Note that by enabling this, you need to set the `tabindex` yourself if the button isn't
138
+ * meant to be tabbable and you have to prevent the button action (e.g. form submissions).
139
+ */
140
+ disabledInteractive: boolean;
122
141
  constructor(_elementRef: ElementRef, _platform: Platform, _ngZone: NgZone, _animationMode?: string | undefined);
123
142
  ngAfterViewInit(): void;
124
143
  ngOnDestroy(): void;
125
144
  /** Focuses the button. */
126
- focus(_origin?: FocusOrigin, options?: FocusOptions): void;
145
+ focus(origin?: FocusOrigin, options?: FocusOptions): void;
146
+ protected _getAriaDisabled(): boolean | null;
147
+ protected _getDisabledAttribute(): true | null;
127
148
  private _updateRippleDisabled;
128
149
  static ɵfac: i0.ɵɵFactoryDeclaration<MatButtonBase, never>;
129
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatButtonBase, never, never, { "color": { "alias": "color"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, false, never>;
150
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatButtonBase, never, never, { "color": { "alias": "color"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "ariaDisabled": { "alias": "aria-disabled"; "required": false; }; "disabledInteractive": { "alias": "disabledInteractive"; "required": false; }; }, {}, never, never, false, never>;
130
151
  static ngAcceptInputType_disableRipple: unknown;
131
152
  static ngAcceptInputType_disabled: unknown;
153
+ static ngAcceptInputType_ariaDisabled: unknown;
154
+ static ngAcceptInputType_disabledInteractive: unknown;
155
+ }
156
+
157
+ /** Object that can be used to configure the default options for the button component. */
158
+ export declare interface MatButtonConfig {
159
+ /** Whether disabled buttons should be interactive. */
160
+ disabledInteractive?: boolean;
132
161
  }
133
162
 
134
163
  export declare class MatButtonModule {
@@ -6,7 +6,10 @@
6
6
  @use './option/optgroup-theme';
7
7
  @use './selection/pseudo-checkbox/pseudo-checkbox-theme';
8
8
  @use './style/elevation';
9
+ @use './style/sass-utils';
9
10
  @use './typography/typography';
11
+ @use './tokens/token-utils';
12
+ @use './tokens/m2/mat/app' as tokens-mat-app;
10
13
 
11
14
  @mixin base($theme) {
12
15
  @include ripple-theme.base($theme);
@@ -21,13 +24,9 @@
21
24
  @include option-theme.color($theme);
22
25
  @include optgroup-theme.color($theme);
23
26
  @include pseudo-checkbox-theme.color($theme);
24
-
25
- // Wrapper element that provides the theme background when the user's content isn't
26
- // inside of a `mat-sidenav-container`. Note that we need to exclude the ampersand
27
- // selector in case the mixin is included at the top level.
28
- .mat-app-background#{if(&, ', &.mat-app-background', '')} {
29
- background-color: inspection.get-theme-color($theme, background, background);
30
- color: inspection.get-theme-color($theme, foreground, text);
27
+ @include sass-utils.current-selector-or-root() {
28
+ @include token-utils.create-token-values(tokens-mat-app.$prefix,
29
+ tokens-mat-app.get-color-tokens($theme));
31
30
  }
32
31
 
33
32
  // Provides external CSS classes for each elevation value. Each CSS class is formatted as
package/core/_core.scss CHANGED
@@ -1,8 +1,9 @@
1
1
  @use '@angular/cdk';
2
-
3
- // Core styles that can be used to apply material design treatments to any element.
2
+ @use './tokens/m2/mat/app' as tokens-mat-app;
3
+ @use './tokens/token-utils';
4
4
  @use './ripple/ripple';
5
5
  @use './focus-indicators/private';
6
+ @use './mdc-helpers/mdc-helpers';
6
7
 
7
8
  // Mixin that renders all of the core styles that are not theme-dependent.
8
9
  @mixin core() {
@@ -13,4 +14,18 @@
13
14
  @include cdk.text-field-autofill();
14
15
  @include private.structural-styling('mat');
15
16
  @include private.structural-styling('mat-mdc');
17
+
18
+ // Wrapper element that provides the theme background when the
19
+ // user's content isn't inside of a `mat-sidenav-container`.
20
+ @at-root {
21
+ .mat-app-background {
22
+ @include mdc-helpers.disable-mdc-fallback-declarations {
23
+ @include token-utils.use-tokens(tokens-mat-app.$prefix, tokens-mat-app.get-token-slots()) {
24
+ // Note: we need to emit fallback values here to avoid errors in internal builds.
25
+ @include token-utils.create-token-slot(background-color, background-color, transparent);
26
+ @include token-utils.create-token-slot(color, text-color, inherit);
27
+ }
28
+ }
29
+ }
30
+ }
16
31
  }
package/core/index.d.ts CHANGED
@@ -17,6 +17,7 @@ import { Observable } from 'rxjs';
17
17
  import { OnDestroy } from '@angular/core';
18
18
  import { OnInit } from '@angular/core';
19
19
  import { Platform } from '@angular/cdk/platform';
20
+ import { Provider } from '@angular/core';
20
21
  import { QueryList } from '@angular/core';
21
22
  import { Subject } from 'rxjs';
22
23
  import { Version } from '@angular/core';
@@ -549,7 +550,7 @@ export declare class MatLineModule {
549
550
 
550
551
  export declare class MatNativeDateModule {
551
552
  static ɵfac: i0.ɵɵFactoryDeclaration<MatNativeDateModule, never>;
552
- static ɵmod: i0.ɵɵNgModuleDeclaration<MatNativeDateModule, never, [typeof NativeDateModule], never>;
553
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MatNativeDateModule, never, never, never>;
553
554
  static ɵinj: i0.ɵɵInjectorDeclaration<MatNativeDateModule>;
554
555
  }
555
556
 
@@ -815,6 +816,8 @@ export declare class MatRipple implements OnInit, OnDestroy, RippleTarget {
815
816
  *
816
817
  * This service allows us to avoid eagerly creating & attaching MatRipples.
817
818
  * It works by creating & attaching a ripple only when a component is first interacted with.
819
+ *
820
+ * @docs-private
818
821
  */
819
822
  export declare class MatRippleLoader implements OnDestroy {
820
823
  private _document;
@@ -822,6 +825,7 @@ export declare class MatRippleLoader implements OnDestroy {
822
825
  private _globalRippleOptions;
823
826
  private _platform;
824
827
  private _ngZone;
828
+ private _hosts;
825
829
  constructor();
826
830
  ngOnDestroy(): void;
827
831
  /**
@@ -842,8 +846,9 @@ export declare class MatRippleLoader implements OnDestroy {
842
846
  /** Handles creating and attaching component internals when a component it is initially interacted with. */
843
847
  private _onInteraction;
844
848
  /** Creates a MatRipple and appends it to the given element. */
845
- createRipple(host: HTMLElement): MatRipple | undefined;
846
- attachRipple(host: Element, ripple: MatRipple): void;
849
+ private _createRipple;
850
+ attachRipple(host: HTMLElement, ripple: MatRipple): void;
851
+ destroyRipple(host: HTMLElement): void;
847
852
  static ɵfac: i0.ɵɵFactoryDeclaration<MatRippleLoader, never>;
848
853
  static ɵprov: i0.ɵɵInjectableDeclaration<MatRippleLoader>;
849
854
  }
@@ -948,6 +953,8 @@ export declare class NativeDateModule {
948
953
  static ɵinj: i0.ɵɵInjectorDeclaration<NativeDateModule>;
949
954
  }
950
955
 
956
+ export declare function provideNativeDateAdapter(formats?: MatDateFormats): Provider[];
957
+
951
958
  /**
952
959
  * Interface that describes the configuration for the animation of a ripple.
953
960
  * There are two animation phases with different durations for the ripples.