@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
@@ -8,6 +8,9 @@ $prefix: (mdc, extended-fab);
8
8
 
9
9
  @function get-unthemable-tokens() {
10
10
  @return (
11
+ // =============================================================================================
12
+ // = TOKENS NOT USED IN ANGULAR MATERIAL =
13
+ // =============================================================================================
11
14
  container-color: null,
12
15
  container-elevation: null,
13
16
  container-height: null,
@@ -22,6 +22,13 @@ $ripple-target: '.mdc-fab__ripple';
22
22
  container-shape: 50%,
23
23
  icon-size: 24px,
24
24
 
25
+ // We don't use this token, because it doesn't set the color of any text inside the FAB.
26
+ // We create a custom token for it instead.
27
+ icon-color: null,
28
+
29
+ // =============================================================================================
30
+ // = TOKENS NOT USED IN ANGULAR MATERIAL =
31
+ // =============================================================================================
25
32
  container-elevation: null,
26
33
  container-height: null,
27
34
  container-shadow-color: null,
@@ -56,10 +63,17 @@ $ripple-target: '.mdc-fab__ripple';
56
63
 
57
64
  // Tokens that can be configured through Angular Material's color theming API.
58
65
  @function get-color-tokens($theme) {
59
- $surface: inspection.get-theme-color($theme, primary, default);
60
- $on-surface: inspection.get-theme-color($theme, primary, default-contrast);
66
+ @return (
67
+ // Background color of the FAB.
68
+ container-color: inspection.get-theme-color($theme, background, card),
69
+ );
70
+ }
61
71
 
62
- @return (container-color: $surface, icon-color: $on-surface);
72
+ // Generates the mapping for the properties that change based on the FAB palette color.
73
+ @function private-get-color-palette-color-tokens($theme, $palette-name) {
74
+ @return (
75
+ container-color: inspection.get-theme-color($theme, $palette-name, default),
76
+ );
63
77
  }
64
78
 
65
79
  // Tokens that can be configured through Angular Material's typography theming API.
@@ -1,9 +1,9 @@
1
1
  @use 'sass:map';
2
2
  @use '../../token-utils';
3
- @use '../../../mdc-helpers/mdc-helpers';
4
3
  @use '../../../style/sass-utils';
5
4
  @use '../../../theming/inspection';
6
5
  @use '../../../theming/theming';
6
+ @use '../../../mdc-helpers/mdc-helpers';
7
7
 
8
8
  // The prefix used to generate the fully qualified name for tokens in this file.
9
9
  $prefix: (mdc, filled-button);
@@ -24,6 +24,9 @@ $prefix: (mdc, filled-button);
24
24
  keep-touch-target: false,
25
25
  pressed-container-elevation: 0,
26
26
 
27
+ // =============================================================================================
28
+ // = TOKENS NOT USED IN ANGULAR MATERIAL =
29
+ // =============================================================================================
27
30
  focus-ring-color: null,
28
31
  focus-ring-offset: null,
29
32
  focus-state-layer-opacity: null,
@@ -43,33 +46,36 @@ $prefix: (mdc, filled-button);
43
46
  with-icon-hover-icon-color: null,
44
47
  with-icon-icon-color: null,
45
48
  with-icon-icon-size: null,
46
- with-icon-pressed-icon-color: null
49
+ with-icon-pressed-icon-color: null,
50
+ focus-state-layer-color: null,
51
+ hover-state-layer-color: null,
52
+ pressed-state-layer-color: null,
47
53
  );
48
54
  }
49
55
 
50
- @function _on-color($theme, $palette) {
51
- @if ($palette) {
52
- $is-dark: inspection.get-theme-type($theme) == dark;
53
- @return if(mdc-helpers.variable-safe-contrast-tone($palette, $is-dark) == 'dark', #000, #fff);
54
- }
55
- }
56
-
57
56
  // Tokens that can be configured through Angular Material's color theming API.
58
- @function get-color-tokens($theme, $color: null, $on-color: null) {
57
+ @function get-color-tokens($theme) {
59
58
  $is-dark: inspection.get-theme-type($theme) == dark;
60
- $primary: inspection.get-theme-color($theme, primary);
61
59
  $surface: inspection.get-theme-color($theme, background, card);
62
- $on-primary: _on-color($theme, $primary);
63
- $on-surface: _on-color($theme, $surface);
60
+ $on-surface: if($is-dark, #fff, #000);
64
61
 
65
62
  @return (
66
- container-color: if($color, $color, transparent),
63
+ container-color: $surface,
64
+ label-text-color: $on-surface,
67
65
  disabled-container-color: rgba($on-surface, 0.12),
68
66
  disabled-label-text-color: rgba($on-surface, if($is-dark, 0.5, 0.38)),
69
- focus-state-layer-color: $on-primary,
70
- hover-state-layer-color: $on-primary,
71
- label-text-color: if($on-color, $on-color, inherit),
72
- pressed-state-layer-color: $on-primary
67
+ );
68
+ }
69
+
70
+ // Generates the mapping for the properties that change based on the button palette color.
71
+ @function private-get-color-palette-color-tokens($theme, $palette-name) {
72
+ $is-dark: inspection.get-theme-type($theme) == dark;
73
+ $container-color: inspection.get-theme-color($theme, $palette-name, default);
74
+ $contrast-tone: mdc-helpers.variable-safe-contrast-tone($container-color, $is-dark);
75
+
76
+ @return (
77
+ container-color: $container-color,
78
+ label-text-color: if($contrast-tone == 'dark', #000, #fff),
73
79
  );
74
80
  }
75
81
 
@@ -1,4 +1,5 @@
1
1
  @use '../../../style/sass-utils';
2
+ @use '../../../theming/inspection';
2
3
  @use '../../token-utils';
3
4
 
4
5
  // The prefix used to generate the fully qualified name for tokens in this file.
@@ -20,12 +21,7 @@ $prefix: (mdc, icon-button);
20
21
  state-layer-size: 48px,
21
22
  // MDC's icon size applied to svg and img elements inside the component
22
23
  icon-size: 24px,
23
- // Only applies to :disabled icons, but Angular Components uses [disabled] since :disabled
24
- // wouldn't work on <a> tags.
25
- disabled-icon-color: black,
26
- // Angular version applies an opacity 1 with a color change, and this only applies with
27
- // :disabled anyways.
28
- disabled-icon-opacity: 0.38,
24
+
29
25
  // =============================================================================================
30
26
  // = TOKENS NOT USED IN ANGULAR MATERIAL =
31
27
  // =============================================================================================
@@ -41,13 +37,27 @@ $prefix: (mdc, icon-button);
41
37
  pressed-state-layer-opacity: null,
42
38
  focus-ring-color: null,
43
39
  focus-ring-offset: null,
40
+
41
+ // We use a color with an opacity to show the disabled state,
42
+ // instead of applying it to the entire button.
43
+ disabled-icon-opacity: null,
44
44
  );
45
45
  }
46
46
 
47
47
  // Tokens that can be configured through Angular Material's color theming API.
48
48
  @function get-color-tokens($theme) {
49
+ $is-dark: inspection.get-theme-type($theme) == dark;
50
+
49
51
  @return (
50
52
  icon-color: inherit,
53
+ disabled-icon-color: if($is-dark, rgba(#fff, 0.5), rgba(#000, 0.38)),
54
+ );
55
+ }
56
+
57
+ // Generates the mapping for the properties that change based on the button palette color.
58
+ @function private-get-color-palette-color-tokens($theme, $palette-name) {
59
+ @return (
60
+ icon-color: inspection.get-theme-color($theme, $palette-name)
51
61
  );
52
62
  }
53
63
 
@@ -0,0 +1,120 @@
1
+ @use 'sass:map';
2
+ @use '../../token-utils';
3
+ @use '../../../style/sass-utils';
4
+ @use '../../../theming/inspection';
5
+ @use '../../../theming/theming';
6
+ @use '../../../mdc-helpers/mdc-helpers';
7
+
8
+ // The prefix used to generate the fully qualified name for tokens in this file.
9
+ $prefix: (mdc, 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
+ //
14
+ // Tokens that are available in MDC, but not used in Angular Material should be mapped to `null`.
15
+ // `null` indicates that we are intentionally choosing not to emit a slot or value for the token in
16
+ // our CSS.
17
+ @function get-unthemable-tokens() {
18
+ @return (
19
+ keep-touch-target: false,
20
+
21
+ outline-width: 1px,
22
+ container-shape: 4px,
23
+
24
+ // =============================================================================================
25
+ // = TOKENS NOT USED IN ANGULAR MATERIAL =
26
+ // =============================================================================================
27
+ hover-state-layer-opacity: null,
28
+ focus-state-layer-opacity: null,
29
+ pressed-state-layer-opacity: null,
30
+
31
+ focus-state-layer-color: null,
32
+ hover-state-layer-color: null,
33
+ pressed-state-layer-color: null,
34
+
35
+ hover-label-text-color: null,
36
+ focus-label-text-color: null,
37
+ pressed-label-text-color: null,
38
+
39
+ hover-outline-color: null,
40
+ focus-outline-color: null,
41
+ pressed-outline-color: null,
42
+
43
+ focus-ring-color: null,
44
+ focus-ring-offset: null,
45
+
46
+ with-icon-icon-size: null,
47
+ with-icon-icon-color: null,
48
+ with-icon-hover-icon-color: null,
49
+ with-icon-focus-icon-color: null,
50
+ with-icon-pressed-icon-color: null,
51
+ with-icon-disabled-icon-color: null,
52
+
53
+ label-text-size: null,
54
+ label-text-font: null,
55
+ label-text-weight: null,
56
+ label-text-tracking: null,
57
+ label-text-transform: null
58
+ );
59
+ }
60
+
61
+ // Tokens that can be configured through Angular Material's color theming API.
62
+ @function get-color-tokens($theme) {
63
+ $is-dark: inspection.get-theme-type($theme) == dark;
64
+ $surface: inspection.get-theme-color($theme, background, card);
65
+ $contrast-tone: mdc-helpers.variable-safe-contrast-tone($surface, $is-dark);
66
+ $on-surface: if($contrast-tone == 'dark', #000, #fff);
67
+
68
+ @return (
69
+ disabled-outline-color: rgba($on-surface, 0.12),
70
+ disabled-label-text-color: rgba($on-surface, if($is-dark, 0.5, 0.38)),
71
+ label-text-color: if($is-dark, #fff, #000),
72
+ outline-color: rgba($on-surface, 0.12)
73
+ );
74
+ }
75
+
76
+ // Generates the mapping for the properties that change based on the button palette color.
77
+ @function private-get-color-palette-color-tokens($theme, $palette-name) {
78
+ @return (
79
+ label-text-color: inspection.get-theme-color($theme, $palette-name, default),
80
+
81
+ // TODO: we shouldn't have to set this since it's the same as the non-palette version, however
82
+ // there are a bunch of tests internally that depend on it. We should remove this and clean
83
+ // up the screenshots separately.
84
+ outline-color: map.get(get-color-tokens($theme), outline-color),
85
+ );
86
+ }
87
+
88
+ // Tokens that can be configured through Angular Material's typography theming API.
89
+ @function get-typography-tokens($theme) {
90
+ @return ();
91
+ }
92
+
93
+ // Tokens that can be configured through Angular Material's density theming API.
94
+ @function get-density-tokens($theme) {
95
+ $scale: theming.clamp-density(inspection.get-theme-density($theme), -3);
96
+
97
+ @return (
98
+ container-height:
99
+ map.get(
100
+ (
101
+ 0: 36px,
102
+ -1: 32px,
103
+ -2: 28px,
104
+ -3: 24px,
105
+ ),
106
+ $scale
107
+ )
108
+ );
109
+ }
110
+
111
+ // Combines the tokens generated by the above functions into a single map with placeholder values.
112
+ // This is used to create token slots.
113
+ @function get-token-slots() {
114
+ @return sass-utils.deep-merge-all(
115
+ get-unthemable-tokens(),
116
+ get-color-tokens(token-utils.$placeholder-color-config),
117
+ get-typography-tokens(token-utils.$placeholder-typography-config),
118
+ get-density-tokens(token-utils.$placeholder-density-config)
119
+ );
120
+ }
@@ -1,9 +1,9 @@
1
1
  @use 'sass:map';
2
2
  @use '../../token-utils';
3
- @use '../../../mdc-helpers/mdc-helpers';
4
3
  @use '../../../style/sass-utils';
5
4
  @use '../../../theming/inspection';
6
5
  @use '../../../theming/theming';
6
+ @use '../../../mdc-helpers/mdc-helpers';
7
7
 
8
8
  // The prefix used to generate the fully qualified name for tokens in this file.
9
9
  $prefix: (mdc, protected-button);
@@ -19,6 +19,9 @@ $prefix: (mdc, protected-button);
19
19
  container-shape: 4px,
20
20
  keep-touch-target: false,
21
21
 
22
+ // =============================================================================================
23
+ // = TOKENS NOT USED IN ANGULAR MATERIAL =
24
+ // =============================================================================================
22
25
  focus-ring-color: null,
23
26
  focus-ring-offset: null,
24
27
  focus-state-layer-opacity: null,
@@ -43,36 +46,38 @@ $prefix: (mdc, protected-button);
43
46
  with-icon-focus-icon-color: null,
44
47
  with-icon-hover-icon-color: null,
45
48
  with-icon-icon-color: null,
46
- with-icon-pressed-icon-color: null
49
+ with-icon-pressed-icon-color: null,
50
+ focus-state-layer-color: null,
51
+ hover-state-layer-color: null,
52
+ pressed-state-layer-color: null,
47
53
  );
48
54
  }
49
55
 
50
- @function _on-color($theme, $palette) {
51
- @if ($palette) {
52
- $is-dark: inspection.get-theme-type($theme) == dark;
53
- @return if(mdc-helpers.variable-safe-contrast-tone($palette, $is-dark) == 'dark', #000, #fff);
54
- }
55
- }
56
-
57
56
  // Tokens that can be configured through Angular Material's color theming API.
58
- @function get-color-tokens($theme, $color: null, $on-color: null) {
57
+ @function get-color-tokens($theme) {
59
58
  $is-dark: inspection.get-theme-type($theme) == dark;
60
- $primary: inspection.get-theme-color($theme, primary);
61
- $surface: inspection.get-theme-color($theme, background, card);
62
- $on-primary: _on-color($theme, $primary);
63
- $on-surface: _on-color($theme, $surface);
59
+ $on-surface: if($is-dark, #fff, #000);
64
60
 
65
61
  @return (
66
- container-color: if($color, $color, transparent),
67
- focus-state-layer-color: $on-primary,
68
- hover-state-layer-color: $on-primary,
69
- pressed-state-layer-color: $on-primary,
70
- label-text-color: if($on-color, $on-color, inherit),
62
+ container-color: inspection.get-theme-color($theme, background, card),
63
+ label-text-color: $on-surface,
71
64
  disabled-container-color: rgba($on-surface, 0.12),
72
65
  disabled-label-text-color: rgba($on-surface, if($is-dark, 0.5, 0.38))
73
66
  );
74
67
  }
75
68
 
69
+ // Generates the mapping for the properties that change based on the button palette color.
70
+ @function private-get-color-palette-color-tokens($theme, $palette-name) {
71
+ $is-dark: inspection.get-theme-type($theme) == dark;
72
+ $container-color: inspection.get-theme-color($theme, $palette-name, default);
73
+ $contrast-tone: mdc-helpers.variable-safe-contrast-tone($container-color, $is-dark);
74
+
75
+ @return (
76
+ container-color: $container-color,
77
+ label-text-color: if($contrast-tone == 'dark', #000, #fff),
78
+ );
79
+ }
80
+
76
81
  // Tokens that can be configured through Angular Material's typography theming API.
77
82
  @function get-typography-tokens($theme) {
78
83
  @return ();
package/dialog/index.d.ts CHANGED
@@ -4,6 +4,7 @@ import { ComponentFactoryResolver } from '@angular/core';
4
4
  import { ComponentPortal } from '@angular/cdk/portal';
5
5
  import { ComponentRef } from '@angular/core';
6
6
  import { ComponentType } from '@angular/cdk/overlay';
7
+ import { Dialog } from '@angular/cdk/dialog';
7
8
  import { DialogRef } from '@angular/cdk/dialog';
8
9
  import { Direction } from '@angular/cdk/bidi';
9
10
  import { ElementRef } from '@angular/core';
@@ -134,7 +135,7 @@ export declare class MatDialog implements OnDestroy {
134
135
  private readonly _openDialogsAtThisLevel;
135
136
  private readonly _afterAllClosedAtThisLevel;
136
137
  private readonly _afterOpenedAtThisLevel;
137
- private _dialog;
138
+ protected _dialog: Dialog;
138
139
  protected dialogConfigClass: typeof MatDialogConfig;
139
140
  private readonly _dialogRefConstructor;
140
141
  private readonly _dialogContainerType;
@@ -5,7 +5,10 @@
5
5
  @use '../core/tokens/m2/mat/divider' as tokens-mat-divider;
6
6
 
7
7
  @mixin base($theme) {
8
- // TODO(mmalerba): Move divider base tokens here
8
+ @include sass-utils.current-selector-or-root() {
9
+ @include token-utils.create-token-values(
10
+ tokens-mat-divider.$prefix, tokens-mat-divider.get-unthemable-tokens());
11
+ }
9
12
  }
10
13
 
11
14
  @mixin color($theme) {
@@ -17,14 +17,14 @@ export class MatAutocompleteOrigin {
17
17
  elementRef) {
18
18
  this.elementRef = elementRef;
19
19
  }
20
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: MatAutocompleteOrigin, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
21
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.0-next.6", type: MatAutocompleteOrigin, selector: "[matAutocompleteOrigin]", exportAs: ["matAutocompleteOrigin"], ngImport: i0 }); }
20
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: MatAutocompleteOrigin, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
21
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.0-rc.0", type: MatAutocompleteOrigin, selector: "[matAutocompleteOrigin]", exportAs: ["matAutocompleteOrigin"], ngImport: i0 }); }
22
22
  }
23
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: MatAutocompleteOrigin, decorators: [{
23
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: MatAutocompleteOrigin, decorators: [{
24
24
  type: Directive,
25
25
  args: [{
26
26
  selector: '[matAutocompleteOrigin]',
27
27
  exportAs: 'matAutocompleteOrigin',
28
28
  }]
29
29
  }], ctorParameters: () => [{ type: i0.ElementRef }] });
30
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0b2NvbXBsZXRlLW9yaWdpbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYXRlcmlhbC9hdXRvY29tcGxldGUvYXV0b2NvbXBsZXRlLW9yaWdpbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7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