@angular/material 17.0.0-rc.0 → 17.0.0-rc.2

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 (295) hide show
  1. package/_index.scss +1 -1
  2. package/button/_button-base.scss +37 -18
  3. package/button/_button-theme.scss +86 -142
  4. package/button/_fab-theme.scss +21 -49
  5. package/button/_icon-button-theme.scss +25 -43
  6. package/button/index.d.ts +0 -2
  7. package/chips/index.d.ts +2 -3
  8. package/core/index.d.ts +2 -3
  9. package/core/theming/_theming.scss +0 -14
  10. package/core/tokens/m2/mat/_fab.scss +87 -0
  11. package/core/tokens/m2/mat/_filled-button.scss +76 -0
  12. package/core/tokens/m2/mat/_icon-button.scss +73 -0
  13. package/core/tokens/m2/mat/_outlined-button.scss +73 -0
  14. package/core/tokens/m2/mat/_protected-button.scss +76 -0
  15. package/core/tokens/m2/mat/_sort.scss +60 -0
  16. package/core/tokens/m2/mat/_text-button.scss +73 -0
  17. package/core/tokens/m2/mat/_tree.scss +62 -0
  18. package/core/tokens/m2/mdc/_extended-fab.scss +3 -0
  19. package/core/tokens/m2/mdc/_fab.scss +17 -3
  20. package/core/tokens/m2/mdc/_filled-button.scss +24 -18
  21. package/core/tokens/m2/mdc/_icon-button.scss +16 -6
  22. package/core/tokens/m2/mdc/_outlined-button.scss +120 -0
  23. package/core/tokens/m2/mdc/_protected-button.scss +24 -19
  24. package/dialog/index.d.ts +2 -1
  25. package/divider/_divider-theme.scss +4 -1
  26. package/esm2022/autocomplete/autocomplete-origin.mjs +4 -4
  27. package/esm2022/autocomplete/autocomplete-trigger.mjs +4 -4
  28. package/esm2022/autocomplete/autocomplete.mjs +4 -4
  29. package/esm2022/autocomplete/module.mjs +5 -5
  30. package/esm2022/badge/badge-module.mjs +5 -5
  31. package/esm2022/badge/badge.mjs +4 -4
  32. package/esm2022/bottom-sheet/bottom-sheet-container.mjs +4 -4
  33. package/esm2022/bottom-sheet/bottom-sheet-module.mjs +5 -5
  34. package/esm2022/bottom-sheet/bottom-sheet.mjs +4 -4
  35. package/esm2022/button/button-base.mjs +19 -24
  36. package/esm2022/button/button.mjs +9 -9
  37. package/esm2022/button/fab.mjs +17 -17
  38. package/esm2022/button/icon-button.mjs +9 -9
  39. package/esm2022/button/module.mjs +5 -5
  40. package/esm2022/button-toggle/button-toggle-module.mjs +5 -5
  41. package/esm2022/button-toggle/button-toggle.mjs +8 -8
  42. package/esm2022/card/card.mjs +43 -43
  43. package/esm2022/card/module.mjs +5 -5
  44. package/esm2022/checkbox/checkbox-required-validator.mjs +4 -4
  45. package/esm2022/checkbox/checkbox.mjs +5 -5
  46. package/esm2022/checkbox/module.mjs +9 -9
  47. package/esm2022/chips/chip-action.mjs +4 -4
  48. package/esm2022/chips/chip-edit-input.mjs +4 -4
  49. package/esm2022/chips/chip-grid.mjs +4 -4
  50. package/esm2022/chips/chip-icons.mjs +10 -10
  51. package/esm2022/chips/chip-input.mjs +4 -4
  52. package/esm2022/chips/chip-listbox.mjs +4 -4
  53. package/esm2022/chips/chip-option.mjs +7 -8
  54. package/esm2022/chips/chip-row.mjs +8 -9
  55. package/esm2022/chips/chip-set.mjs +4 -4
  56. package/esm2022/chips/chip.mjs +6 -7
  57. package/esm2022/chips/module.mjs +8 -9
  58. package/esm2022/core/common-behaviors/common-module.mjs +5 -5
  59. package/esm2022/core/datetime/index.mjs +9 -9
  60. package/esm2022/core/datetime/native-date-adapter.mjs +4 -4
  61. package/esm2022/core/error/error-options.mjs +7 -7
  62. package/esm2022/core/line/line.mjs +8 -8
  63. package/esm2022/core/option/index.mjs +6 -7
  64. package/esm2022/core/option/optgroup.mjs +4 -4
  65. package/esm2022/core/option/option.mjs +8 -9
  66. package/esm2022/core/private/ripple-loader.mjs +4 -4
  67. package/esm2022/core/ripple/index.mjs +5 -5
  68. package/esm2022/core/ripple/ripple.mjs +4 -4
  69. package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox-module.mjs +5 -5
  70. package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +4 -4
  71. package/esm2022/core/version.mjs +1 -1
  72. package/esm2022/datepicker/calendar-body.mjs +5 -5
  73. package/esm2022/datepicker/calendar.mjs +13 -14
  74. package/esm2022/datepicker/date-range-input-parts.mjs +10 -10
  75. package/esm2022/datepicker/date-range-input.mjs +4 -4
  76. package/esm2022/datepicker/date-range-picker.mjs +4 -4
  77. package/esm2022/datepicker/date-range-selection-strategy.mjs +4 -4
  78. package/esm2022/datepicker/date-selection-model.mjs +10 -10
  79. package/esm2022/datepicker/datepicker-actions.mjs +10 -10
  80. package/esm2022/datepicker/datepicker-base.mjs +7 -7
  81. package/esm2022/datepicker/datepicker-input-base.mjs +4 -4
  82. package/esm2022/datepicker/datepicker-input.mjs +4 -4
  83. package/esm2022/datepicker/datepicker-intl.mjs +4 -4
  84. package/esm2022/datepicker/datepicker-module.mjs +5 -5
  85. package/esm2022/datepicker/datepicker-toggle.mjs +9 -10
  86. package/esm2022/datepicker/datepicker.mjs +4 -4
  87. package/esm2022/datepicker/month-view.mjs +6 -7
  88. package/esm2022/datepicker/multi-year-view.mjs +4 -4
  89. package/esm2022/datepicker/year-view.mjs +4 -4
  90. package/esm2022/dialog/dialog-container.mjs +4 -4
  91. package/esm2022/dialog/dialog-content-directives.mjs +13 -13
  92. package/esm2022/dialog/dialog.mjs +4 -4
  93. package/esm2022/dialog/module.mjs +5 -5
  94. package/esm2022/divider/divider-module.mjs +5 -5
  95. package/esm2022/divider/divider.mjs +5 -5
  96. package/esm2022/expansion/accordion.mjs +4 -4
  97. package/esm2022/expansion/expansion-module.mjs +7 -8
  98. package/esm2022/expansion/expansion-panel-content.mjs +4 -4
  99. package/esm2022/expansion/expansion-panel-header.mjs +11 -12
  100. package/esm2022/expansion/expansion-panel.mjs +7 -7
  101. package/esm2022/form-field/directives/error.mjs +4 -4
  102. package/esm2022/form-field/directives/floating-label.mjs +4 -4
  103. package/esm2022/form-field/directives/hint.mjs +4 -4
  104. package/esm2022/form-field/directives/label.mjs +4 -4
  105. package/esm2022/form-field/directives/line-ripple.mjs +4 -4
  106. package/esm2022/form-field/directives/notched-outline.mjs +4 -4
  107. package/esm2022/form-field/directives/prefix.mjs +4 -4
  108. package/esm2022/form-field/directives/suffix.mjs +4 -4
  109. package/esm2022/form-field/form-field-control.mjs +4 -4
  110. package/esm2022/form-field/form-field.mjs +6 -6
  111. package/esm2022/form-field/module.mjs +5 -5
  112. package/esm2022/grid-list/grid-list-module.mjs +5 -5
  113. package/esm2022/grid-list/grid-list.mjs +4 -4
  114. package/esm2022/grid-list/grid-tile.mjs +16 -16
  115. package/esm2022/icon/icon-module.mjs +5 -5
  116. package/esm2022/icon/icon-registry.mjs +4 -4
  117. package/esm2022/icon/icon.mjs +4 -4
  118. package/esm2022/icon/testing/fake-icon-registry.mjs +8 -8
  119. package/esm2022/input/input.mjs +4 -4
  120. package/esm2022/input/module.mjs +5 -5
  121. package/esm2022/list/action-list.mjs +4 -4
  122. package/esm2022/list/list-base.mjs +7 -7
  123. package/esm2022/list/list-item-sections.mjs +19 -19
  124. package/esm2022/list/list-module.mjs +5 -5
  125. package/esm2022/list/list-option.mjs +6 -6
  126. package/esm2022/list/list.mjs +7 -7
  127. package/esm2022/list/nav-list.mjs +4 -4
  128. package/esm2022/list/selection-list.mjs +4 -4
  129. package/esm2022/list/subheader.mjs +4 -4
  130. package/esm2022/menu/menu-content.mjs +4 -4
  131. package/esm2022/menu/menu-item.mjs +6 -7
  132. package/esm2022/menu/menu-trigger.mjs +4 -4
  133. package/esm2022/menu/menu.mjs +4 -4
  134. package/esm2022/menu/module.mjs +5 -5
  135. package/esm2022/paginator/module.mjs +6 -7
  136. package/esm2022/paginator/paginator-intl.mjs +4 -4
  137. package/esm2022/paginator/paginator.mjs +10 -11
  138. package/esm2022/progress-bar/module.mjs +5 -5
  139. package/esm2022/progress-bar/progress-bar.mjs +4 -4
  140. package/esm2022/progress-spinner/module.mjs +5 -5
  141. package/esm2022/progress-spinner/progress-spinner.mjs +4 -4
  142. package/esm2022/radio/module.mjs +5 -5
  143. package/esm2022/radio/radio.mjs +8 -8
  144. package/esm2022/select/module.mjs +5 -5
  145. package/esm2022/select/select.mjs +9 -9
  146. package/esm2022/sidenav/drawer.mjs +12 -13
  147. package/esm2022/sidenav/sidenav-module.mjs +7 -8
  148. package/esm2022/sidenav/sidenav.mjs +12 -13
  149. package/esm2022/slide-toggle/module.mjs +10 -11
  150. package/esm2022/slide-toggle/slide-toggle-required-validator.mjs +4 -4
  151. package/esm2022/slide-toggle/slide-toggle.mjs +5 -6
  152. package/esm2022/slider/module.mjs +6 -7
  153. package/esm2022/slider/slider-input.mjs +7 -7
  154. package/esm2022/slider/slider-thumb.mjs +6 -7
  155. package/esm2022/slider/slider.mjs +6 -7
  156. package/esm2022/snack-bar/module.mjs +5 -5
  157. package/esm2022/snack-bar/simple-snack-bar.mjs +5 -6
  158. package/esm2022/snack-bar/snack-bar-container.mjs +5 -5
  159. package/esm2022/snack-bar/snack-bar-content.mjs +10 -10
  160. package/esm2022/snack-bar/snack-bar.mjs +4 -4
  161. package/esm2022/sort/sort-header-intl.mjs +4 -4
  162. package/esm2022/sort/sort-header.mjs +5 -6
  163. package/esm2022/sort/sort-module.mjs +6 -7
  164. package/esm2022/sort/sort.mjs +4 -4
  165. package/esm2022/stepper/step-content.mjs +4 -4
  166. package/esm2022/stepper/step-header.mjs +5 -5
  167. package/esm2022/stepper/step-label.mjs +4 -4
  168. package/esm2022/stepper/stepper-button.mjs +7 -7
  169. package/esm2022/stepper/stepper-icon.mjs +4 -4
  170. package/esm2022/stepper/stepper-intl.mjs +4 -4
  171. package/esm2022/stepper/stepper-module.mjs +5 -5
  172. package/esm2022/stepper/stepper.mjs +8 -8
  173. package/esm2022/table/cell.mjs +22 -22
  174. package/esm2022/table/module.mjs +5 -5
  175. package/esm2022/table/row.mjs +22 -22
  176. package/esm2022/table/table.mjs +7 -7
  177. package/esm2022/table/text-column.mjs +4 -4
  178. package/esm2022/tabs/module.mjs +5 -5
  179. package/esm2022/tabs/paginated-tab-header.mjs +4 -4
  180. package/esm2022/tabs/tab-body.mjs +7 -7
  181. package/esm2022/tabs/tab-content.mjs +4 -4
  182. package/esm2022/tabs/tab-group.mjs +6 -6
  183. package/esm2022/tabs/tab-header.mjs +4 -4
  184. package/esm2022/tabs/tab-label-wrapper.mjs +4 -4
  185. package/esm2022/tabs/tab-label.mjs +4 -4
  186. package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +10 -10
  187. package/esm2022/tabs/tab.mjs +4 -4
  188. package/esm2022/toolbar/toolbar-module.mjs +5 -5
  189. package/esm2022/toolbar/toolbar.mjs +7 -7
  190. package/esm2022/tooltip/module.mjs +5 -5
  191. package/esm2022/tooltip/tooltip.mjs +7 -7
  192. package/esm2022/tree/node.mjs +10 -10
  193. package/esm2022/tree/outlet.mjs +4 -4
  194. package/esm2022/tree/padding.mjs +4 -4
  195. package/esm2022/tree/toggle.mjs +4 -4
  196. package/esm2022/tree/tree-module.mjs +5 -5
  197. package/esm2022/tree/tree.mjs +5 -5
  198. package/expansion/index.d.ts +4 -5
  199. package/fesm2022/autocomplete.mjs +13 -13
  200. package/fesm2022/autocomplete.mjs.map +1 -1
  201. package/fesm2022/badge.mjs +7 -7
  202. package/fesm2022/badge.mjs.map +1 -1
  203. package/fesm2022/bottom-sheet.mjs +10 -10
  204. package/fesm2022/bottom-sheet.mjs.map +1 -1
  205. package/fesm2022/button-toggle.mjs +11 -11
  206. package/fesm2022/button-toggle.mjs.map +1 -1
  207. package/fesm2022/button.mjs +54 -59
  208. package/fesm2022/button.mjs.map +1 -1
  209. package/fesm2022/card.mjs +46 -46
  210. package/fesm2022/card.mjs.map +1 -1
  211. package/fesm2022/checkbox.mjs +15 -15
  212. package/fesm2022/checkbox.mjs.map +1 -1
  213. package/fesm2022/chips.mjs +53 -54
  214. package/fesm2022/chips.mjs.map +1 -1
  215. package/fesm2022/core.mjs +59 -60
  216. package/fesm2022/core.mjs.map +1 -1
  217. package/fesm2022/datepicker.mjs +89 -89
  218. package/fesm2022/datepicker.mjs.map +1 -1
  219. package/fesm2022/dialog.mjs +22 -22
  220. package/fesm2022/dialog.mjs.map +1 -1
  221. package/fesm2022/divider.mjs +8 -8
  222. package/fesm2022/divider.mjs.map +1 -1
  223. package/fesm2022/expansion.mjs +29 -30
  224. package/fesm2022/expansion.mjs.map +1 -1
  225. package/fesm2022/form-field.mjs +36 -36
  226. package/fesm2022/form-field.mjs.map +1 -1
  227. package/fesm2022/grid-list.mjs +22 -22
  228. package/fesm2022/grid-list.mjs.map +1 -1
  229. package/fesm2022/icon/testing.mjs +7 -7
  230. package/fesm2022/icon/testing.mjs.map +1 -1
  231. package/fesm2022/icon.mjs +10 -10
  232. package/fesm2022/icon.mjs.map +1 -1
  233. package/fesm2022/input.mjs +7 -7
  234. package/fesm2022/input.mjs.map +1 -1
  235. package/fesm2022/list.mjs +51 -51
  236. package/fesm2022/list.mjs.map +1 -1
  237. package/fesm2022/menu.mjs +23 -23
  238. package/fesm2022/menu.mjs.map +1 -1
  239. package/fesm2022/paginator.mjs +17 -19
  240. package/fesm2022/paginator.mjs.map +1 -1
  241. package/fesm2022/progress-bar.mjs +7 -7
  242. package/fesm2022/progress-bar.mjs.map +1 -1
  243. package/fesm2022/progress-spinner.mjs +7 -7
  244. package/fesm2022/progress-spinner.mjs.map +1 -1
  245. package/fesm2022/radio.mjs +11 -11
  246. package/fesm2022/radio.mjs.map +1 -1
  247. package/fesm2022/select.mjs +12 -12
  248. package/fesm2022/select.mjs.map +1 -1
  249. package/fesm2022/sidenav.mjs +29 -30
  250. package/fesm2022/sidenav.mjs.map +1 -1
  251. package/fesm2022/slide-toggle.mjs +16 -18
  252. package/fesm2022/slide-toggle.mjs.map +1 -1
  253. package/fesm2022/slider.mjs +22 -24
  254. package/fesm2022/slider.mjs.map +1 -1
  255. package/fesm2022/snack-bar.mjs +27 -28
  256. package/fesm2022/snack-bar.mjs.map +1 -1
  257. package/fesm2022/sort.mjs +15 -17
  258. package/fesm2022/sort.mjs.map +1 -1
  259. package/fesm2022/stepper.mjs +33 -33
  260. package/fesm2022/stepper.mjs.map +1 -1
  261. package/fesm2022/table.mjs +55 -55
  262. package/fesm2022/table.mjs.map +1 -1
  263. package/fesm2022/tabs.mjs +42 -42
  264. package/fesm2022/tabs.mjs.map +1 -1
  265. package/fesm2022/toolbar.mjs +10 -10
  266. package/fesm2022/toolbar.mjs.map +1 -1
  267. package/fesm2022/tooltip.mjs +10 -10
  268. package/fesm2022/tooltip.mjs.map +1 -1
  269. package/fesm2022/tree.mjs +26 -26
  270. package/fesm2022/tree.mjs.map +1 -1
  271. package/form-field/_form-field-theme.scss +11 -1
  272. package/package.json +2 -2
  273. package/paginator/index.d.ts +4 -5
  274. package/prebuilt-themes/deeppurple-amber.css +1 -1
  275. package/prebuilt-themes/indigo-pink.css +1 -1
  276. package/prebuilt-themes/pink-bluegrey.css +1 -1
  277. package/prebuilt-themes/purple-green.css +1 -1
  278. package/schematics/migration.json +1 -1
  279. package/schematics/ng-add/fonts/material-fonts.js +1 -3
  280. package/schematics/ng-add/fonts/material-fonts.mjs +1 -3
  281. package/schematics/ng-add/index.js +1 -1
  282. package/schematics/ng-add/index.mjs +1 -1
  283. package/schematics/ng-generate/mdc-migration/index_bundled.js +1183 -455
  284. package/schematics/ng-generate/mdc-migration/index_bundled.js.map +4 -4
  285. package/schematics/ng-update/index_bundled.js +397 -2
  286. package/schematics/ng-update/index_bundled.js.map +4 -4
  287. package/sidenav/index.d.ts +3 -4
  288. package/slide-toggle/index.d.ts +1 -2
  289. package/slider/index.d.ts +1 -2
  290. package/sort/_sort-theme.scss +21 -23
  291. package/sort/index.d.ts +2 -3
  292. package/tree/_tree-theme.scss +13 -26
  293. package/button/_button-theme-private.scss +0 -67
  294. package/core/density/private/_compatibility.scss +0 -74
  295. package/tree/_tree-variables.scss +0 -14
package/chips/index.d.ts CHANGED
@@ -20,7 +20,6 @@ import { FormGroupDirective } from '@angular/forms';
20
20
  import { HasTabIndex } from '@angular/material/core';
21
21
  import * as i0 from '@angular/core';
22
22
  import * as i11 from '@angular/material/core';
23
- import * as i12 from '@angular/common';
24
23
  import { InjectionToken } from '@angular/core';
25
24
  import { MatFormField } from '@angular/material/form-field';
26
25
  import { MatFormFieldControl } from '@angular/material/form-field';
@@ -881,7 +880,7 @@ export declare class MatChipRow extends MatChip implements AfterViewInit {
881
880
  */
882
881
  private _getEditInput;
883
882
  static ɵfac: i0.ɵɵFactoryDeclaration<MatChipRow, [null, null, null, null, null, { optional: true; }, { optional: true; }, { attribute: "tabindex"; }]>;
884
- static ɵcmp: i0.ɵɵComponentDeclaration<MatChipRow, "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", never, { "color": { "alias": "color"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "editable": { "alias": "editable"; "required": false; }; }, { "edited": "edited"; }, ["contentEditInput"], ["mat-chip-avatar, [matChipAvatar]", "*", "[matChipEditInput]", "mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"], false, never>;
883
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatChipRow, "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", never, { "color": { "alias": "color"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "editable": { "alias": "editable"; "required": false; }; }, { "edited": "edited"; }, ["contentEditInput"], ["mat-chip-avatar, [matChipAvatar]", "[matChipEditInput]", "*", "mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"], false, never>;
885
884
  }
886
885
 
887
886
  /** Default options, for the chips module, that can be overridden. */
@@ -1010,7 +1009,7 @@ declare const _MatChipSetMixinBase: _Constructor<HasTabIndex> & _AbstractConstru
1010
1009
 
1011
1010
  export declare class MatChipsModule {
1012
1011
  static ɵfac: i0.ɵɵFactoryDeclaration<MatChipsModule, never>;
1013
- static ɵmod: i0.ɵɵNgModuleDeclaration<MatChipsModule, [typeof i1.MatChipAction, typeof i2.MatChip, typeof i3.MatChipAvatar, typeof i4.MatChipEditInput, typeof i5.MatChipGrid, typeof i6.MatChipInput, typeof i7.MatChipListbox, typeof i8.MatChipOption, typeof i3.MatChipRemove, typeof i9.MatChipRow, typeof i10.MatChipSet, typeof i3.MatChipTrailingIcon], [typeof i11.MatCommonModule, typeof i12.CommonModule, typeof i11.MatRippleModule], [typeof i11.MatCommonModule, typeof i2.MatChip, typeof i3.MatChipAvatar, typeof i4.MatChipEditInput, typeof i5.MatChipGrid, typeof i6.MatChipInput, typeof i7.MatChipListbox, typeof i8.MatChipOption, typeof i3.MatChipRemove, typeof i9.MatChipRow, typeof i10.MatChipSet, typeof i3.MatChipTrailingIcon]>;
1012
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MatChipsModule, [typeof i1.MatChipAction, typeof i2.MatChip, typeof i3.MatChipAvatar, typeof i4.MatChipEditInput, typeof i5.MatChipGrid, typeof i6.MatChipInput, typeof i7.MatChipListbox, typeof i8.MatChipOption, typeof i3.MatChipRemove, typeof i9.MatChipRow, typeof i10.MatChipSet, typeof i3.MatChipTrailingIcon], [typeof i11.MatCommonModule, typeof i11.MatRippleModule], [typeof i11.MatCommonModule, typeof i2.MatChip, typeof i3.MatChipAvatar, typeof i4.MatChipEditInput, typeof i5.MatChipGrid, typeof i6.MatChipInput, typeof i7.MatChipListbox, typeof i8.MatChipOption, typeof i3.MatChipRemove, typeof i9.MatChipRow, typeof i10.MatChipSet, typeof i3.MatChipTrailingIcon]>;
1014
1013
  static ɵinj: i0.ɵɵInjectorDeclaration<MatChipsModule>;
1015
1014
  }
1016
1015
 
package/core/index.d.ts CHANGED
@@ -9,7 +9,6 @@ import { FormGroupDirective } from '@angular/forms';
9
9
  import { HighContrastModeDetector } from '@angular/cdk/a11y';
10
10
  import * as i0 from '@angular/core';
11
11
  import * as i1 from '@angular/cdk/bidi';
12
- import * as i4 from '@angular/common';
13
12
  import { InjectionToken } from '@angular/core';
14
13
  import { NgControl } from '@angular/forms';
15
14
  import { NgForm } from '@angular/forms';
@@ -432,7 +431,7 @@ declare namespace i3 {
432
431
  }
433
432
  }
434
433
 
435
- declare namespace i6 {
434
+ declare namespace i5 {
436
435
  export {
437
436
  MatPseudoCheckboxModule
438
437
  }
@@ -629,7 +628,7 @@ export declare class MatOption<T = any> implements FocusableOption, AfterViewChe
629
628
 
630
629
  export declare class MatOptionModule {
631
630
  static ɵfac: i0.ɵɵFactoryDeclaration<MatOptionModule, never>;
632
- static ɵmod: i0.ɵɵNgModuleDeclaration<MatOptionModule, [typeof i1_3.MatOption, typeof i2.MatOptgroup], [typeof i3.MatRippleModule, typeof i4.CommonModule, typeof i1_2.MatCommonModule, typeof i6.MatPseudoCheckboxModule], [typeof i1_3.MatOption, typeof i2.MatOptgroup]>;
631
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MatOptionModule, [typeof i1_3.MatOption, typeof i2.MatOptgroup], [typeof i3.MatRippleModule, typeof i1_2.MatCommonModule, typeof i5.MatPseudoCheckboxModule], [typeof i1_3.MatOption, typeof i2.MatOptgroup]>;
633
632
  static ɵinj: i0.ɵɵInjectorDeclaration<MatOptionModule>;
634
633
  }
635
634
 
@@ -3,7 +3,6 @@
3
3
  @use 'sass:math';
4
4
  @use 'sass:meta';
5
5
  @use 'palette';
6
- @use '../density/private/compatibility';
7
6
 
8
7
  // Whether to enable compatibility with legacy methods for accessing theme information.
9
8
  $theme-legacy-inspection-api-compatibility: true !default;
@@ -481,20 +480,7 @@ $_internals: _mat-theming-internals-do-not-access;
481
480
  $_emitted-density: map.merge($_emitted-density, ($id: $previous-density)) !global;
482
481
  $_emitted-typography: map.merge($_emitted-typography, ($id: $previous-typography)) !global;
483
482
 
484
- // If duplicate default density styles would be generated for a legacy constructed theme,
485
- // we adjust the density generation so that no density styles are generated by default.
486
- // If no default density styles have been generated yet, we ensure that the styles
487
- // are generated at root. For legacy themes our goal is to generate default density
488
- // styles **once** and at root. This matches the old behavior where density styles were
489
- // part of the base component styles (that did not use view encapsulation).
490
- // TODO: Remove this compatibility logic when the legacy theming API is removed.
491
- compatibility.$private-density-generate-at-root: private-is-legacy-constructed-theme($theme);
492
- compatibility.$private-density-generate-styles: not $duplicate-legacy-density;
493
-
494
483
  @content;
495
-
496
- compatibility.$private-density-generate-at-root: false;
497
- compatibility.$private-density-generate-styles: true;
498
484
  }
499
485
 
500
486
  // Checks whether the given value resolves to a theme object. Theme objects are always
@@ -0,0 +1,87 @@
1
+ @use 'sass:map';
2
+ @use '@material/ripple/ripple-theme' as mdc-ripple-theme;
3
+ @use '../../token-utils';
4
+ @use '../../../theming/inspection';
5
+ @use '../../../style/sass-utils';
6
+ @use '../../../mdc-helpers/mdc-helpers';
7
+
8
+ // The prefix used to generate the fully qualified name for tokens in this file.
9
+ $prefix: (mat, fab);
10
+
11
+ // Tokens that can't be configured through Angular Material's current theming API,
12
+ // but may be in a future version of the theming API.
13
+ @function get-unthemable-tokens() {
14
+ @return ();
15
+ }
16
+
17
+ // Tokens that can be configured through Angular Material's color theming API.
18
+ @function get-color-tokens($theme) {
19
+ $is-dark: inspection.get-theme-type($theme) == dark;
20
+ $on-surface: if($is-dark, #fff, #000);
21
+ $ripple-opacities: if($is-dark,
22
+ mdc-ripple-theme.$light-ink-opacities,
23
+ mdc-ripple-theme.$dark-ink-opacities
24
+ );
25
+
26
+ @return (
27
+ // Color of icons and text projected into a FAB.
28
+ foreground-color: inspection.get-theme-color($theme, foreground, base),
29
+
30
+ // Color of the element that shows the hover, focus and pressed states.
31
+ state-layer-color: $on-surface,
32
+
33
+ // Color of the ripple element.
34
+ ripple-color: rgba($on-surface, 0.1),
35
+
36
+ // Opacity of the ripple when the button is hovered.
37
+ hover-state-layer-opacity: map.get($ripple-opacities, hover),
38
+
39
+ // Opacity of the ripple when the button is focused.
40
+ focus-state-layer-opacity: map.get($ripple-opacities, focus),
41
+
42
+ // Opacity of the ripple when the button is pressed.
43
+ pressed-state-layer-opacity: map.get($ripple-opacities, press),
44
+
45
+ // MDC doesn't have tokens for disabled FABs so we need to implemented them ourselves.
46
+ // Background color of the container when the FAB is disabled.
47
+ disabled-state-container-color: rgba($on-surface, 0.12),
48
+
49
+ // Color of the icons and projected text when the FAB is disabled.
50
+ disabled-state-foreground-color: rgba($on-surface, if($is-dark, 0.5, 0.38)),
51
+ );
52
+ }
53
+
54
+ // Generates the mapping for the properties that change based on the FAB palette color.
55
+ @function private-get-color-palette-color-tokens($theme, $palette-name) {
56
+ $is-dark: inspection.get-theme-type($theme) == dark;
57
+ $container-color: inspection.get-theme-color($theme, $palette-name);
58
+ $contrast-tone: mdc-helpers.variable-safe-contrast-tone($container-color, $is-dark);
59
+ $color: if($contrast-tone == 'dark', #000, #fff);
60
+
61
+ @return (
62
+ foreground-color: $color,
63
+ state-layer-color: $color,
64
+ ripple-color: rgba($color, 0.1),
65
+ );
66
+ }
67
+
68
+ // Tokens that can be configured through Angular Material's typography theming API.
69
+ @function get-typography-tokens($theme) {
70
+ @return ();
71
+ }
72
+
73
+ // Tokens that can be configured through Angular Material's density theming API.
74
+ @function get-density-tokens($theme) {
75
+ @return ();
76
+ }
77
+
78
+ // Combines the tokens generated by the above functions into a single map with placeholder values.
79
+ // This is used to create token slots.
80
+ @function get-token-slots() {
81
+ @return sass-utils.deep-merge-all(
82
+ get-unthemable-tokens(),
83
+ get-color-tokens(token-utils.$placeholder-color-config),
84
+ get-typography-tokens(token-utils.$placeholder-typography-config),
85
+ get-density-tokens(token-utils.$placeholder-density-config)
86
+ );
87
+ }
@@ -0,0 +1,76 @@
1
+ @use 'sass:map';
2
+ @use '@material/ripple/ripple-theme' as mdc-ripple-theme;
3
+ @use '../../token-utils';
4
+ @use '../../../theming/inspection';
5
+ @use '../../../style/sass-utils';
6
+ @use '../../../mdc-helpers/mdc-helpers';
7
+
8
+ // The prefix used to generate the fully qualified name for tokens in this file.
9
+ $prefix: (mat, filled-button);
10
+
11
+ // Tokens that can't be configured through Angular Material's current theming API,
12
+ // but may be in a future version of the theming API.
13
+ @function get-unthemable-tokens() {
14
+ @return ();
15
+ }
16
+
17
+ // Tokens that can be configured through Angular Material's color theming API.
18
+ @function get-color-tokens($theme) {
19
+ $is-dark: inspection.get-theme-type($theme) == dark;
20
+ $on-surface: if($is-dark, #fff, #000);
21
+ $ripple-opacities: if($is-dark,
22
+ mdc-ripple-theme.$light-ink-opacities,
23
+ mdc-ripple-theme.$dark-ink-opacities
24
+ );
25
+
26
+ @return (
27
+ // Color of the element that shows the hover, focus and pressed states.
28
+ state-layer-color: $on-surface,
29
+
30
+ // Color of the ripple element.
31
+ ripple-color: rgba($on-surface, 0.1),
32
+
33
+ // Opacity of the ripple when the button is hovered.
34
+ hover-state-layer-opacity: map.get($ripple-opacities, hover),
35
+
36
+ // Opacity of the ripple when the button is focused.
37
+ focus-state-layer-opacity: map.get($ripple-opacities, focus),
38
+
39
+ // Opacity of the ripple when the button is pressed.
40
+ pressed-state-layer-opacity: map.get($ripple-opacities, press),
41
+ );
42
+ }
43
+
44
+ // Generates the mapping for the properties that change based on the button palette color.
45
+ @function private-get-color-palette-color-tokens($theme, $palette-name) {
46
+ $is-dark: inspection.get-theme-type($theme) == dark;
47
+ $container-color: inspection.get-theme-color($theme, $palette-name);
48
+ $contrast-tone: mdc-helpers.variable-safe-contrast-tone($container-color, $is-dark);
49
+ $color: if($contrast-tone == 'dark', #000, #fff);
50
+
51
+ @return (
52
+ state-layer-color: $color,
53
+ ripple-color: rgba($color, 0.1),
54
+ );
55
+ }
56
+
57
+ // Tokens that can be configured through Angular Material's typography theming API.
58
+ @function get-typography-tokens($theme) {
59
+ @return ();
60
+ }
61
+
62
+ // Tokens that can be configured through Angular Material's density theming API.
63
+ @function get-density-tokens($theme) {
64
+ @return ();
65
+ }
66
+
67
+ // Combines the tokens generated by the above functions into a single map with placeholder values.
68
+ // This is used to create token slots.
69
+ @function get-token-slots() {
70
+ @return sass-utils.deep-merge-all(
71
+ get-unthemable-tokens(),
72
+ get-color-tokens(token-utils.$placeholder-color-config),
73
+ get-typography-tokens(token-utils.$placeholder-typography-config),
74
+ get-density-tokens(token-utils.$placeholder-density-config)
75
+ );
76
+ }
@@ -0,0 +1,73 @@
1
+ @use 'sass:map';
2
+ @use 'sass:meta';
3
+ @use '@material/ripple/ripple-theme' as mdc-ripple-theme;
4
+ @use '../../token-utils';
5
+ @use '../../../theming/inspection';
6
+ @use '../../../style/sass-utils';
7
+
8
+ // The prefix used to generate the fully qualified name for tokens in this file.
9
+ $prefix: (mat, icon-button);
10
+
11
+ // Tokens that can't be configured through Angular Material's current theming API,
12
+ // but may be in a future version of the theming API.
13
+ @function get-unthemable-tokens() {
14
+ @return ();
15
+ }
16
+
17
+ // Tokens that can be configured through Angular Material's color theming API.
18
+ @function get-color-tokens($theme) {
19
+ $is-dark: inspection.get-theme-type($theme) == dark;
20
+ $on-surface: if($is-dark, #fff, #000);
21
+ $ripple-opacities: if($is-dark,
22
+ mdc-ripple-theme.$light-ink-opacities,
23
+ mdc-ripple-theme.$dark-ink-opacities
24
+ );
25
+
26
+ @return (
27
+ // Color of the element that shows the hover, focus and pressed states.
28
+ state-layer-color: $on-surface,
29
+
30
+ // Color of the ripple element.
31
+ ripple-color: rgba($on-surface, 0.1),
32
+
33
+ // Opacity of the ripple when the button is hovered.
34
+ hover-state-layer-opacity: map.get($ripple-opacities, hover),
35
+
36
+ // Opacity of the ripple when the button is focused.
37
+ focus-state-layer-opacity: map.get($ripple-opacities, focus),
38
+
39
+ // Opacity of the ripple when the button is pressed.
40
+ pressed-state-layer-opacity: map.get($ripple-opacities, press),
41
+ );
42
+ }
43
+
44
+ // Generates the mapping for the properties that change based on the button palette color.
45
+ @function private-get-color-palette-color-tokens($theme, $palette-name) {
46
+ $color: inspection.get-theme-color($theme, $palette-name);
47
+
48
+ @return (
49
+ state-layer-color: $color,
50
+ ripple-color: if(meta.type-of($color) == color, rgba($color, 0.1), $color),
51
+ );
52
+ }
53
+
54
+ // Tokens that can be configured through Angular Material's typography theming API.
55
+ @function get-typography-tokens($theme) {
56
+ @return ();
57
+ }
58
+
59
+ // Tokens that can be configured through Angular Material's density theming API.
60
+ @function get-density-tokens($theme) {
61
+ @return ();
62
+ }
63
+
64
+ // Combines the tokens generated by the above functions into a single map with placeholder values.
65
+ // This is used to create token slots.
66
+ @function get-token-slots() {
67
+ @return sass-utils.deep-merge-all(
68
+ get-unthemable-tokens(),
69
+ get-color-tokens(token-utils.$placeholder-color-config),
70
+ get-typography-tokens(token-utils.$placeholder-typography-config),
71
+ get-density-tokens(token-utils.$placeholder-density-config)
72
+ );
73
+ }
@@ -0,0 +1,73 @@
1
+ @use 'sass:map';
2
+ @use 'sass:meta';
3
+ @use '@material/ripple/ripple-theme' as mdc-ripple-theme;
4
+ @use '../../token-utils';
5
+ @use '../../../theming/inspection';
6
+ @use '../../../style/sass-utils';
7
+
8
+ // The prefix used to generate the fully qualified name for tokens in this file.
9
+ $prefix: (mat, outlined-button);
10
+
11
+ // Tokens that can't be configured through Angular Material's current theming API,
12
+ // but may be in a future version of the theming API.
13
+ @function get-unthemable-tokens() {
14
+ @return ();
15
+ }
16
+
17
+ // Tokens that can be configured through Angular Material's color theming API.
18
+ @function get-color-tokens($theme) {
19
+ $is-dark: inspection.get-theme-type($theme) == dark;
20
+ $on-surface: if($is-dark, #fff, #000);
21
+ $ripple-opacities: if($is-dark,
22
+ mdc-ripple-theme.$light-ink-opacities,
23
+ mdc-ripple-theme.$dark-ink-opacities
24
+ );
25
+
26
+ @return (
27
+ // Color of the element that shows the hover, focus and pressed states.
28
+ state-layer-color: $on-surface,
29
+
30
+ // Color of the ripple element.
31
+ ripple-color: rgba($on-surface, 0.1),
32
+
33
+ // Opacity of the ripple when the button is hovered.
34
+ hover-state-layer-opacity: map.get($ripple-opacities, hover),
35
+
36
+ // Opacity of the ripple when the button is focused.
37
+ focus-state-layer-opacity: map.get($ripple-opacities, focus),
38
+
39
+ // Opacity of the ripple when the button is pressed.
40
+ pressed-state-layer-opacity: map.get($ripple-opacities, press),
41
+ );
42
+ }
43
+
44
+ // Generates the mapping for the properties that change based on the button palette color.
45
+ @function private-get-color-palette-color-tokens($theme, $palette-name) {
46
+ $color: inspection.get-theme-color($theme, $palette-name);
47
+
48
+ @return (
49
+ state-layer-color: $color,
50
+ ripple-color: if(meta.type-of($color) == color, rgba($color, 0.1), $color),
51
+ );
52
+ }
53
+
54
+ // Tokens that can be configured through Angular Material's typography theming API.
55
+ @function get-typography-tokens($theme) {
56
+ @return ();
57
+ }
58
+
59
+ // Tokens that can be configured through Angular Material's density theming API.
60
+ @function get-density-tokens($theme) {
61
+ @return ();
62
+ }
63
+
64
+ // Combines the tokens generated by the above functions into a single map with placeholder values.
65
+ // This is used to create token slots.
66
+ @function get-token-slots() {
67
+ @return sass-utils.deep-merge-all(
68
+ get-unthemable-tokens(),
69
+ get-color-tokens(token-utils.$placeholder-color-config),
70
+ get-typography-tokens(token-utils.$placeholder-typography-config),
71
+ get-density-tokens(token-utils.$placeholder-density-config)
72
+ );
73
+ }
@@ -0,0 +1,76 @@
1
+ @use 'sass:map';
2
+ @use '@material/ripple/ripple-theme' as mdc-ripple-theme;
3
+ @use '../../token-utils';
4
+ @use '../../../theming/inspection';
5
+ @use '../../../style/sass-utils';
6
+ @use '../../../mdc-helpers/mdc-helpers';
7
+
8
+ // The prefix used to generate the fully qualified name for tokens in this file.
9
+ $prefix: (mat, protected-button);
10
+
11
+ // Tokens that can't be configured through Angular Material's current theming API,
12
+ // but may be in a future version of the theming API.
13
+ @function get-unthemable-tokens() {
14
+ @return ();
15
+ }
16
+
17
+ // Tokens that can be configured through Angular Material's color theming API.
18
+ @function get-color-tokens($theme) {
19
+ $is-dark: inspection.get-theme-type($theme) == dark;
20
+ $on-surface: if($is-dark, #fff, #000);
21
+ $ripple-opacities: if($is-dark,
22
+ mdc-ripple-theme.$light-ink-opacities,
23
+ mdc-ripple-theme.$dark-ink-opacities
24
+ );
25
+
26
+ @return (
27
+ // Color of the element that shows the hover, focus and pressed states.
28
+ state-layer-color: $on-surface,
29
+
30
+ // Color of the ripple element.
31
+ ripple-color: rgba($on-surface, 0.1),
32
+
33
+ // Opacity of the ripple when the button is hovered.
34
+ hover-state-layer-opacity: map.get($ripple-opacities, hover),
35
+
36
+ // Opacity of the ripple when the button is focused.
37
+ focus-state-layer-opacity: map.get($ripple-opacities, focus),
38
+
39
+ // Opacity of the ripple when the button is pressed.
40
+ pressed-state-layer-opacity: map.get($ripple-opacities, press),
41
+ );
42
+ }
43
+
44
+ // Generates the mapping for the properties that change based on the button palette color.
45
+ @function private-get-color-palette-color-tokens($theme, $palette-name) {
46
+ $is-dark: inspection.get-theme-type($theme) == dark;
47
+ $container-color: inspection.get-theme-color($theme, $palette-name);
48
+ $contrast-tone: mdc-helpers.variable-safe-contrast-tone($container-color, $is-dark);
49
+ $color: if($contrast-tone == 'dark', #000, #fff);
50
+
51
+ @return (
52
+ state-layer-color: $color,
53
+ ripple-color: rgba($color, 0.1),
54
+ );
55
+ }
56
+
57
+ // Tokens that can be configured through Angular Material's typography theming API.
58
+ @function get-typography-tokens($theme) {
59
+ @return ();
60
+ }
61
+
62
+ // Tokens that can be configured through Angular Material's density theming API.
63
+ @function get-density-tokens($theme) {
64
+ @return ();
65
+ }
66
+
67
+ // Combines the tokens generated by the above functions into a single map with placeholder values.
68
+ // This is used to create token slots.
69
+ @function get-token-slots() {
70
+ @return sass-utils.deep-merge-all(
71
+ get-unthemable-tokens(),
72
+ get-color-tokens(token-utils.$placeholder-color-config),
73
+ get-typography-tokens(token-utils.$placeholder-typography-config),
74
+ get-density-tokens(token-utils.$placeholder-density-config)
75
+ );
76
+ }
@@ -0,0 +1,60 @@
1
+ @use 'sass:color';
2
+ @use 'sass:meta';
3
+ @use '../../token-utils';
4
+ @use '../../../theming/inspection';
5
+ @use '../../../style/sass-utils';
6
+
7
+ // The prefix used to generate the fully qualified name for tokens in this file.
8
+ $prefix: (mat, sort);
9
+
10
+ // Tokens that can't be configured through Angular Material's current theming API,
11
+ // but may be in a future version of the theming API.
12
+ @function get-unthemable-tokens() {
13
+ @return ();
14
+ }
15
+
16
+ // Tokens that can be configured through Angular Material's color theming API.
17
+ @function get-color-tokens($theme) {
18
+ $table-background: inspection.get-theme-color($theme, background, card);
19
+ $text-color: inspection.get-theme-color($theme, foreground, secondary-text);
20
+ $arrow-color: null;
21
+
22
+ // Because the arrow is made up of multiple elements that are stacked on top of each other,
23
+ // we can't use the semi-transparent color from the theme directly. If the value is a color
24
+ // *type*, we convert it into a solid color by taking the opacity from the rgba value and
25
+ // using the value to determine the percentage of the background to put into foreground
26
+ // when mixing the colors together. Otherwise, if it resolves to something different
27
+ // (e.g. it resolves to a CSS variable), we use the color directly.
28
+ @if (meta.type-of($table-background) == color and meta.type-of($text-color) == color) {
29
+ $text-opacity: opacity($text-color);
30
+ $arrow-color: color.mix($table-background, rgba($text-color, 1), (1 - $text-opacity) * 100%);
31
+ }
32
+ @else {
33
+ $arrow-color: $text-color;
34
+ }
35
+
36
+ @return (
37
+ arrow-color: $arrow-color,
38
+ );
39
+ }
40
+
41
+ // Tokens that can be configured through Angular Material's typography theming API.
42
+ @function get-typography-tokens($theme) {
43
+ @return ();
44
+ }
45
+
46
+ // Tokens that can be configured through Angular Material's density theming API.
47
+ @function get-density-tokens($theme) {
48
+ @return ();
49
+ }
50
+
51
+ // Combines the tokens generated by the above functions into a single map with placeholder values.
52
+ // This is used to create token slots.
53
+ @function get-token-slots() {
54
+ @return sass-utils.deep-merge-all(
55
+ get-unthemable-tokens(),
56
+ get-color-tokens(token-utils.$placeholder-color-config),
57
+ get-typography-tokens(token-utils.$placeholder-typography-config),
58
+ get-density-tokens(token-utils.$placeholder-density-config)
59
+ );
60
+ }
@@ -0,0 +1,73 @@
1
+ @use 'sass:map';
2
+ @use 'sass:meta';
3
+ @use '@material/ripple/ripple-theme' as mdc-ripple-theme;
4
+ @use '../../token-utils';
5
+ @use '../../../theming/inspection';
6
+ @use '../../../style/sass-utils';
7
+
8
+ // The prefix used to generate the fully qualified name for tokens in this file.
9
+ $prefix: (mat, text-button);
10
+
11
+ // Tokens that can't be configured through Angular Material's current theming API,
12
+ // but may be in a future version of the theming API.
13
+ @function get-unthemable-tokens() {
14
+ @return ();
15
+ }
16
+
17
+ // Tokens that can be configured through Angular Material's color theming API.
18
+ @function get-color-tokens($theme) {
19
+ $is-dark: inspection.get-theme-type($theme) == dark;
20
+ $on-surface: if($is-dark, #fff, #000);
21
+ $ripple-opacities: if($is-dark,
22
+ mdc-ripple-theme.$light-ink-opacities,
23
+ mdc-ripple-theme.$dark-ink-opacities
24
+ );
25
+
26
+ @return (
27
+ // Color of the element that shows the hover, focus and pressed states.
28
+ state-layer-color: $on-surface,
29
+
30
+ // Color of the ripple element.
31
+ ripple-color: rgba($on-surface, 0.1),
32
+
33
+ // Opacity of the ripple when the button is hovered.
34
+ hover-state-layer-opacity: map.get($ripple-opacities, hover),
35
+
36
+ // Opacity of the ripple when the button is focused.
37
+ focus-state-layer-opacity: map.get($ripple-opacities, focus),
38
+
39
+ // Opacity of the ripple when the button is pressed.
40
+ pressed-state-layer-opacity: map.get($ripple-opacities, press),
41
+ );
42
+ }
43
+
44
+ // Generates the mapping for the properties that change based on the button palette color.
45
+ @function private-get-color-palette-color-tokens($theme, $palette-name) {
46
+ $color: inspection.get-theme-color($theme, $palette-name);
47
+
48
+ @return (
49
+ state-layer-color: $color,
50
+ ripple-color: if(meta.type-of($color) == color, rgba($color, 0.1), $color),
51
+ );
52
+ }
53
+
54
+ // Tokens that can be configured through Angular Material's typography theming API.
55
+ @function get-typography-tokens($theme) {
56
+ @return ();
57
+ }
58
+
59
+ // Tokens that can be configured through Angular Material's density theming API.
60
+ @function get-density-tokens($theme) {
61
+ @return ();
62
+ }
63
+
64
+ // Combines the tokens generated by the above functions into a single map with placeholder values.
65
+ // This is used to create token slots.
66
+ @function get-token-slots() {
67
+ @return sass-utils.deep-merge-all(
68
+ get-unthemable-tokens(),
69
+ get-color-tokens(token-utils.$placeholder-color-config),
70
+ get-typography-tokens(token-utils.$placeholder-typography-config),
71
+ get-density-tokens(token-utils.$placeholder-density-config)
72
+ );
73
+ }
@@ -0,0 +1,62 @@
1
+ @use 'sass:map';
2
+ @use '../../token-utils';
3
+ @use '../../../theming/theming';
4
+ @use '../../../theming/inspection';
5
+ @use '../../../style/sass-utils';
6
+
7
+ // The prefix used to generate the fully qualified name for tokens in this file.
8
+ $prefix: (mat, tree);
9
+
10
+ // Tokens that can't be configured through Angular Material's current theming API,
11
+ // but may be in a future version of the theming API.
12
+ @function get-unthemable-tokens() {
13
+ @return ();
14
+ }
15
+
16
+ // Tokens that can be configured through Angular Material's color theming API.
17
+ @function get-color-tokens($theme) {
18
+ $foreground-base: inspection.get-theme-color($theme, foreground, base);
19
+
20
+ @return (
21
+ container-background-color: inspection.get-theme-color($theme, background, card),
22
+ node-text-color: inspection.get-theme-color($theme, foreground, text),
23
+ );
24
+ }
25
+
26
+ // Tokens that can be configured through Angular Material's typography theming API.
27
+ @function get-typography-tokens($theme) {
28
+ @return (
29
+ node-text-font: inspection.get-theme-typography($theme, body-2, font-family),
30
+ node-text-size: inspection.get-theme-typography($theme, body-2, font-size),
31
+ node-text-weight: inspection.get-theme-typography($theme, body-2, font-weight),
32
+
33
+ // TODO(crisbeto): provide tokens for line height and letter spacing to match other components.
34
+ );
35
+ }
36
+
37
+ // Tokens that can be configured through Angular Material's density theming API.
38
+ @function get-density-tokens($theme) {
39
+ $density-scale: theming.clamp-density(inspection.get-theme-density($theme), -4);
40
+ $min-height-scale: (
41
+ 0: 48px,
42
+ -1: 44px,
43
+ -2: 40px,
44
+ -3: 36px,
45
+ -4: 28px,
46
+ );
47
+
48
+ @return (
49
+ node-min-height: map.get($min-height-scale, $density-scale)
50
+ );
51
+ }
52
+
53
+ // Combines the tokens generated by the above functions into a single map with placeholder values.
54
+ // This is used to create token slots.
55
+ @function get-token-slots() {
56
+ @return sass-utils.deep-merge-all(
57
+ get-unthemable-tokens(),
58
+ get-color-tokens(token-utils.$placeholder-color-config),
59
+ get-typography-tokens(token-utils.$placeholder-typography-config),
60
+ get-density-tokens(token-utils.$placeholder-density-config)
61
+ );
62
+ }