@angular/material 20.0.0-rc.1 → 20.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 (324) hide show
  1. package/autocomplete/_autocomplete-theme.scss +17 -37
  2. package/autocomplete/_m2-autocomplete.scss +3 -6
  3. package/autocomplete/_m3-autocomplete.scss +14 -9
  4. package/badge/_badge-theme.scss +9 -35
  5. package/badge/_m2-badge.scss +32 -35
  6. package/badge/_m3-badge.scss +31 -32
  7. package/bottom-sheet/_bottom-sheet-theme.scss +16 -27
  8. package/bottom-sheet/_m2-bottom-sheet.scss +11 -11
  9. package/bottom-sheet/_m3-bottom-sheet.scss +18 -17
  10. package/button/_button-theme.scss +29 -46
  11. package/button/_fab-theme.scss +22 -41
  12. package/button/_icon-button-theme.scss +29 -46
  13. package/button/_m2-button.scss +135 -133
  14. package/button/_m2-fab.scss +51 -53
  15. package/button/_m2-icon-button.scss +14 -17
  16. package/button/_m3-button.scss +145 -240
  17. package/button/_m3-fab.scss +69 -166
  18. package/button/_m3-icon-button.scss +28 -56
  19. package/button-toggle/_button-toggle-theme.scss +23 -49
  20. package/button-toggle/_m2-button-toggle.scss +45 -37
  21. package/button-toggle/_m3-button-toggle.scss +53 -53
  22. package/card/_card-theme.scss +16 -37
  23. package/card/_m2-card.scss +24 -25
  24. package/card/_m3-card.scss +32 -36
  25. package/checkbox/_checkbox-theme.scss +25 -52
  26. package/checkbox/_m2-checkbox.scss +32 -35
  27. package/checkbox/_m3-checkbox.scss +49 -84
  28. package/chips/_chips-theme.scss +24 -44
  29. package/chips/_m2-chip.scss +47 -51
  30. package/chips/_m3-chip.scss +63 -110
  31. package/core/_core-theme.scss +58 -56
  32. package/core/_core.scss +15 -18
  33. package/core/_m2-app.scss +3 -7
  34. package/core/_m3-app.scss +37 -24
  35. package/core/option/_m2-optgroup.scss +6 -9
  36. package/core/option/_m2-option.scss +10 -13
  37. package/core/option/_m3-optgroup.scss +16 -13
  38. package/core/option/_m3-option.scss +28 -48
  39. package/core/option/_optgroup-theme.scss +14 -25
  40. package/core/option/_option-theme.scss +22 -33
  41. package/core/ripple/_m2-ripple.scss +1 -4
  42. package/core/ripple/_m3-ripple.scss +11 -13
  43. package/core/ripple/_ripple-theme.scss +15 -33
  44. package/core/ripple/_ripple.scss +5 -5
  45. package/core/selection/pseudo-checkbox/_m2-pseudo-checkbox.scss +10 -11
  46. package/core/selection/pseudo-checkbox/_m3-pseudo-checkbox.scss +25 -40
  47. package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +16 -27
  48. package/core/style/_sass-utils.scss +0 -29
  49. package/core/theming/_color-api-backwards-compatibility.scss +46 -29
  50. package/core/theming/_definition.scss +6 -0
  51. package/core/theming/_inspection.scss +0 -25
  52. package/core/tokens/_m3-system.scss +19 -68
  53. package/core/tokens/_m3-tokens.scss +0 -128
  54. package/core/tokens/_m3-utils.scss +11 -83
  55. package/core/tokens/_token-utils.scss +52 -246
  56. package/core/tokens/m3/_index.scss +1 -0
  57. package/core/tokens/m3/_theme.scss +47 -0
  58. package/datepicker/_datepicker-theme.scss +24 -39
  59. package/datepicker/_m2-datepicker.scss +55 -50
  60. package/datepicker/_m3-datepicker.scss +65 -113
  61. package/datepicker/index.d.ts +1 -0
  62. package/dialog/_dialog-theme.scss +15 -27
  63. package/dialog/_m2-dialog.scss +25 -26
  64. package/dialog/_m3-dialog.scss +35 -35
  65. package/divider/_divider-theme.scss +14 -25
  66. package/divider/_m2-divider.scss +2 -5
  67. package/divider/_m3-divider.scss +13 -13
  68. package/expansion/_expansion-theme.scss +15 -33
  69. package/expansion/_m2-expansion.scss +28 -27
  70. package/expansion/_m3-expansion.scss +41 -36
  71. package/fesm2022/animation-DfMFjxHu.mjs.map +1 -1
  72. package/fesm2022/autocomplete/testing.mjs.map +1 -1
  73. package/fesm2022/autocomplete.mjs +23 -23
  74. package/fesm2022/autocomplete.mjs.map +1 -1
  75. package/fesm2022/badge/testing.mjs.map +1 -1
  76. package/fesm2022/badge.mjs +11 -11
  77. package/fesm2022/badge.mjs.map +1 -1
  78. package/fesm2022/bottom-sheet/testing.mjs.map +1 -1
  79. package/fesm2022/bottom-sheet.mjs +11 -11
  80. package/fesm2022/bottom-sheet.mjs.map +1 -1
  81. package/fesm2022/button/testing.mjs.map +1 -1
  82. package/fesm2022/button-toggle/testing.mjs.map +1 -1
  83. package/fesm2022/button-toggle.mjs +19 -23
  84. package/fesm2022/button-toggle.mjs.map +1 -1
  85. package/fesm2022/button.mjs +20 -20
  86. package/fesm2022/button.mjs.map +1 -1
  87. package/fesm2022/card/testing.mjs.map +1 -1
  88. package/fesm2022/card.mjs +47 -47
  89. package/fesm2022/card.mjs.map +1 -1
  90. package/fesm2022/checkbox/testing.mjs.map +1 -1
  91. package/fesm2022/checkbox.mjs +11 -11
  92. package/fesm2022/checkbox.mjs.map +1 -1
  93. package/fesm2022/chips/testing.mjs.map +1 -1
  94. package/fesm2022/chips.mjs +52 -52
  95. package/fesm2022/chips.mjs.map +1 -1
  96. package/fesm2022/{common-module-CF0eSYO4.mjs → common-module-BeAwwoi6.mjs} +5 -5
  97. package/fesm2022/common-module-BeAwwoi6.mjs.map +1 -0
  98. package/fesm2022/core/testing.mjs.map +1 -1
  99. package/fesm2022/core.mjs +24 -24
  100. package/fesm2022/core.mjs.map +1 -1
  101. package/fesm2022/date-formats-K6TQue-Y.mjs.map +1 -1
  102. package/fesm2022/date-range-input-harness-Bp1T4oUe.mjs.map +1 -1
  103. package/fesm2022/datepicker/testing.mjs.map +1 -1
  104. package/fesm2022/datepicker.mjs +99 -95
  105. package/fesm2022/datepicker.mjs.map +1 -1
  106. package/fesm2022/dialog/testing.mjs +18 -5
  107. package/fesm2022/dialog/testing.mjs.map +1 -1
  108. package/fesm2022/dialog.mjs +2 -2
  109. package/fesm2022/dialog.mjs.map +1 -1
  110. package/fesm2022/divider/testing.mjs.map +1 -1
  111. package/fesm2022/divider.mjs +8 -8
  112. package/fesm2022/divider.mjs.map +1 -1
  113. package/fesm2022/{error-options-CbAHLQL5.mjs → error-options-C79tZCHG.mjs} +7 -7
  114. package/fesm2022/error-options-C79tZCHG.mjs.map +1 -0
  115. package/fesm2022/error-state-Dtb1IHM-.mjs.map +1 -1
  116. package/fesm2022/expansion/testing.mjs.map +1 -1
  117. package/fesm2022/expansion.mjs +28 -28
  118. package/fesm2022/expansion.mjs.map +1 -1
  119. package/fesm2022/form-field/testing/control.mjs.map +1 -1
  120. package/fesm2022/form-field/testing.mjs.map +1 -1
  121. package/fesm2022/{form-field-sL9_TuE-.mjs → form-field-Cdw3iYrm.mjs} +33 -33
  122. package/fesm2022/form-field-Cdw3iYrm.mjs.map +1 -0
  123. package/fesm2022/form-field.mjs +3 -3
  124. package/fesm2022/form-field.mjs.map +1 -1
  125. package/fesm2022/grid-list/testing.mjs.map +1 -1
  126. package/fesm2022/grid-list.mjs +24 -24
  127. package/fesm2022/grid-list.mjs.map +1 -1
  128. package/fesm2022/icon/testing.mjs +8 -8
  129. package/fesm2022/icon/testing.mjs.map +1 -1
  130. package/fesm2022/{icon-button-BASP1JI8.mjs → icon-button-D5zzuoJc.mjs} +9 -9
  131. package/fesm2022/icon-button-D5zzuoJc.mjs.map +1 -0
  132. package/fesm2022/{icon-registry-DVLYRZv3.mjs → icon-registry-DVrJNtTv.mjs} +4 -4
  133. package/fesm2022/icon-registry-DVrJNtTv.mjs.map +1 -0
  134. package/fesm2022/icon.mjs +10 -10
  135. package/fesm2022/icon.mjs.map +1 -1
  136. package/fesm2022/{index-BNtCg9r0.mjs → index-CrjYeoWX.mjs} +9 -9
  137. package/fesm2022/index-CrjYeoWX.mjs.map +1 -0
  138. package/fesm2022/{index-DxCSjCL3.mjs → index-DTIUI_kX.mjs} +7 -7
  139. package/fesm2022/index-DTIUI_kX.mjs.map +1 -0
  140. package/fesm2022/input/testing.mjs.map +1 -1
  141. package/fesm2022/input-harness-oQzj5EsQ.mjs.map +1 -1
  142. package/fesm2022/input-value-accessor-D1GvPuqO.mjs.map +1 -1
  143. package/fesm2022/input.mjs +12 -12
  144. package/fesm2022/input.mjs.map +1 -1
  145. package/fesm2022/{internal-form-field-_OHaksOO.mjs → internal-form-field-B9_shC5z.mjs} +4 -4
  146. package/fesm2022/internal-form-field-B9_shC5z.mjs.map +1 -0
  147. package/fesm2022/{line-CtAKiRo6.mjs → line-XysKlyvU.mjs} +9 -9
  148. package/fesm2022/line-XysKlyvU.mjs.map +1 -0
  149. package/fesm2022/list/testing.mjs.map +1 -1
  150. package/fesm2022/list.mjs +55 -55
  151. package/fesm2022/list.mjs.map +1 -1
  152. package/fesm2022/material.mjs.map +1 -1
  153. package/fesm2022/menu/testing.mjs.map +1 -1
  154. package/fesm2022/menu.mjs +20 -20
  155. package/fesm2022/menu.mjs.map +1 -1
  156. package/fesm2022/{module-DToxyW7l.mjs → module-CVpKZX1V.mjs} +7 -7
  157. package/fesm2022/module-CVpKZX1V.mjs.map +1 -0
  158. package/fesm2022/{module-ChwDH6BC.mjs → module-CdXqcjot.mjs} +28 -28
  159. package/fesm2022/module-CdXqcjot.mjs.map +1 -0
  160. package/fesm2022/{module-m5vWw9-5.mjs → module-CwYXiMoV.mjs} +12 -12
  161. package/fesm2022/module-CwYXiMoV.mjs.map +1 -0
  162. package/fesm2022/{module-DqTK2swA.mjs → module-r2U_2G3G.mjs} +17 -17
  163. package/fesm2022/module-r2U_2G3G.mjs.map +1 -0
  164. package/fesm2022/{option-hkPAbXDN.mjs → option-D4ZNnnWi.mjs} +11 -11
  165. package/fesm2022/option-D4ZNnnWi.mjs.map +1 -0
  166. package/fesm2022/option-harness-BFcc-M_4.mjs.map +1 -1
  167. package/fesm2022/paginator/testing.mjs.map +1 -1
  168. package/fesm2022/paginator.mjs +25 -25
  169. package/fesm2022/paginator.mjs.map +1 -1
  170. package/fesm2022/progress-bar/testing.mjs.map +1 -1
  171. package/fesm2022/progress-bar.mjs +8 -8
  172. package/fesm2022/progress-bar.mjs.map +1 -1
  173. package/fesm2022/progress-spinner/testing.mjs.map +1 -1
  174. package/fesm2022/progress-spinner.mjs +8 -8
  175. package/fesm2022/progress-spinner.mjs.map +1 -1
  176. package/fesm2022/{pseudo-checkbox-Ddidc23S.mjs → pseudo-checkbox-DQugCpur.mjs} +4 -4
  177. package/fesm2022/pseudo-checkbox-DQugCpur.mjs.map +1 -0
  178. package/fesm2022/{pseudo-checkbox-module--am9-RIA.mjs → pseudo-checkbox-module-BXWS_-PP.mjs} +7 -7
  179. package/fesm2022/pseudo-checkbox-module-BXWS_-PP.mjs.map +1 -0
  180. package/fesm2022/public-api-BoO5eSq-.mjs.map +1 -1
  181. package/fesm2022/radio/testing.mjs.map +1 -1
  182. package/fesm2022/radio.mjs +19 -16
  183. package/fesm2022/radio.mjs.map +1 -1
  184. package/fesm2022/{ripple-DUGA2BAa.mjs → ripple-BtLhcfGO.mjs} +7 -7
  185. package/fesm2022/ripple-BtLhcfGO.mjs.map +1 -0
  186. package/fesm2022/{ripple-loader-Xy4bv6Xh.mjs → ripple-loader-DBdhLqHy.mjs} +5 -5
  187. package/fesm2022/ripple-loader-DBdhLqHy.mjs.map +1 -0
  188. package/fesm2022/select/testing.mjs.map +1 -1
  189. package/fesm2022/select.mjs +12 -12
  190. package/fesm2022/select.mjs.map +1 -1
  191. package/fesm2022/sidenav/testing.mjs.map +1 -1
  192. package/fesm2022/sidenav.mjs +29 -25
  193. package/fesm2022/sidenav.mjs.map +1 -1
  194. package/fesm2022/slide-toggle/testing.mjs.map +1 -1
  195. package/fesm2022/slide-toggle.mjs +11 -11
  196. package/fesm2022/slide-toggle.mjs.map +1 -1
  197. package/fesm2022/slider/testing.mjs.map +1 -1
  198. package/fesm2022/slider.mjs +21 -21
  199. package/fesm2022/slider.mjs.map +1 -1
  200. package/fesm2022/snack-bar/testing.mjs.map +1 -1
  201. package/fesm2022/snack-bar.mjs +29 -29
  202. package/fesm2022/snack-bar.mjs.map +1 -1
  203. package/fesm2022/sort/testing.mjs.map +1 -1
  204. package/fesm2022/sort.mjs +15 -15
  205. package/fesm2022/sort.mjs.map +1 -1
  206. package/fesm2022/stepper/testing.mjs.map +1 -1
  207. package/fesm2022/stepper.mjs +38 -38
  208. package/fesm2022/stepper.mjs.map +1 -1
  209. package/fesm2022/{structural-styles-DA18Hchc.mjs → structural-styles-DWEe15sC.mjs} +4 -4
  210. package/fesm2022/structural-styles-DWEe15sC.mjs.map +1 -0
  211. package/fesm2022/table/testing.mjs.map +1 -1
  212. package/fesm2022/table.mjs +56 -56
  213. package/fesm2022/table.mjs.map +1 -1
  214. package/fesm2022/tabs/testing.mjs.map +1 -1
  215. package/fesm2022/tabs.mjs +67 -63
  216. package/fesm2022/tabs.mjs.map +1 -1
  217. package/fesm2022/timepicker/testing.mjs.map +1 -1
  218. package/fesm2022/timepicker.mjs +20 -20
  219. package/fesm2022/timepicker.mjs.map +1 -1
  220. package/fesm2022/toolbar/testing.mjs.map +1 -1
  221. package/fesm2022/toolbar.mjs +12 -12
  222. package/fesm2022/toolbar.mjs.map +1 -1
  223. package/fesm2022/tooltip/testing.mjs.map +1 -1
  224. package/fesm2022/tooltip.mjs +2 -2
  225. package/fesm2022/tooltip.mjs.map +1 -1
  226. package/fesm2022/tree/testing.mjs.map +1 -1
  227. package/fesm2022/tree.mjs +26 -26
  228. package/fesm2022/tree.mjs.map +1 -1
  229. package/form-field/_form-field-theme.scss +23 -55
  230. package/form-field/_m2-form-field.scss +112 -91
  231. package/form-field/_m3-form-field.scss +116 -131
  232. package/grid-list/_grid-list-theme.scss +13 -23
  233. package/grid-list/_m2-grid-list.scss +8 -7
  234. package/grid-list/_m3-grid-list.scss +14 -15
  235. package/icon/_icon-theme.scss +20 -30
  236. package/icon/_m2-icon.scss +1 -4
  237. package/icon/_m3-icon.scss +13 -27
  238. package/input/_input-theme.scss +7 -40
  239. package/list/_list-theme.scss +22 -52
  240. package/list/_m2-list.scss +56 -55
  241. package/list/_m3-list.scss +69 -67
  242. package/menu/_m2-menu.scss +22 -25
  243. package/menu/_m3-menu.scss +35 -38
  244. package/menu/_menu-theme.scss +15 -27
  245. package/package.json +2 -2
  246. package/paginator/_m2-paginator.scss +16 -17
  247. package/paginator/_m3-paginator.scss +28 -27
  248. package/paginator/_paginator-theme.scss +14 -40
  249. package/prebuilt-themes/deeppurple-amber.css +1 -1
  250. package/prebuilt-themes/indigo-pink.css +1 -1
  251. package/prebuilt-themes/pink-bluegrey.css +1 -1
  252. package/prebuilt-themes/purple-green.css +1 -1
  253. package/progress-bar/_m2-progress-bar.scss +5 -8
  254. package/progress-bar/_m3-progress-bar.scss +17 -26
  255. package/progress-bar/_progress-bar-theme.scss +17 -27
  256. package/progress-spinner/_m2-progress-spinner.scss +3 -6
  257. package/progress-spinner/_m3-progress-spinner.scss +15 -22
  258. package/progress-spinner/_progress-spinner-theme.scss +20 -43
  259. package/radio/_m2-radio.scss +24 -27
  260. package/radio/_m3-radio.scss +44 -58
  261. package/radio/_radio-theme.scss +23 -50
  262. package/schematics/ng-add/index.js +1 -1
  263. package/schematics/ng-update/index_bundled.js +2 -0
  264. package/schematics/ng-update/index_bundled.js.map +1 -1
  265. package/select/_m2-select.scss +15 -18
  266. package/select/_m3-select.scss +32 -38
  267. package/select/_select-theme.scss +23 -50
  268. package/sidenav/_m2-sidenav.scss +9 -12
  269. package/sidenav/_m3-sidenav.scss +20 -22
  270. package/sidenav/_sidenav-theme.scss +14 -25
  271. package/slide-toggle/_m2-slide-toggle.scss +82 -83
  272. package/slide-toggle/_m3-slide-toggle.scss +102 -143
  273. package/slide-toggle/_slide-toggle-theme.scss +26 -61
  274. package/slider/_m2-slider.scss +46 -46
  275. package/slider/_m3-slider.scss +54 -109
  276. package/slider/_slider-theme.scss +23 -34
  277. package/snack-bar/_m2-snack-bar.scss +10 -11
  278. package/snack-bar/_m3-snack-bar.scss +20 -19
  279. package/snack-bar/_snack-bar-theme.scss +14 -26
  280. package/sort/_m2-sort.scss +1 -4
  281. package/sort/_m3-sort.scss +11 -9
  282. package/sort/_sort-theme.scss +15 -27
  283. package/stepper/_m2-stepper.scss +32 -31
  284. package/stepper/_m3-stepper.scss +44 -79
  285. package/stepper/_stepper-theme.scss +22 -50
  286. package/table/_m2-table.scss +25 -26
  287. package/table/_m3-table.scss +36 -27
  288. package/table/_table-theme.scss +15 -32
  289. package/tabs/_m2-tabs.scss +26 -29
  290. package/tabs/_m3-tabs.scss +40 -51
  291. package/tabs/_tabs-theme.scss +37 -58
  292. package/tabs/index.d.ts +5 -3
  293. package/timepicker/_m2-timepicker.scss +3 -6
  294. package/timepicker/_m3-timepicker.scss +14 -15
  295. package/timepicker/_timepicker-theme.scss +20 -45
  296. package/toolbar/_m2-toolbar.scss +11 -12
  297. package/toolbar/_m3-toolbar.scss +22 -17
  298. package/toolbar/_toolbar-theme.scss +13 -37
  299. package/tooltip/_m2-tooltip.scss +9 -11
  300. package/tooltip/_m3-tooltip.scss +19 -19
  301. package/tooltip/_tooltip-theme.scss +17 -35
  302. package/tree/_m2-tree.scss +6 -9
  303. package/tree/_m3-tree.scss +19 -16
  304. package/tree/_tree-theme.scss +14 -36
  305. package/fesm2022/common-module-CF0eSYO4.mjs.map +0 -1
  306. package/fesm2022/error-options-CbAHLQL5.mjs.map +0 -1
  307. package/fesm2022/form-field-sL9_TuE-.mjs.map +0 -1
  308. package/fesm2022/icon-button-BASP1JI8.mjs.map +0 -1
  309. package/fesm2022/icon-registry-DVLYRZv3.mjs.map +0 -1
  310. package/fesm2022/index-BNtCg9r0.mjs.map +0 -1
  311. package/fesm2022/index-DxCSjCL3.mjs.map +0 -1
  312. package/fesm2022/internal-form-field-_OHaksOO.mjs.map +0 -1
  313. package/fesm2022/line-CtAKiRo6.mjs.map +0 -1
  314. package/fesm2022/module-ChwDH6BC.mjs.map +0 -1
  315. package/fesm2022/module-DToxyW7l.mjs.map +0 -1
  316. package/fesm2022/module-DqTK2swA.mjs.map +0 -1
  317. package/fesm2022/module-m5vWw9-5.mjs.map +0 -1
  318. package/fesm2022/option-hkPAbXDN.mjs.map +0 -1
  319. package/fesm2022/pseudo-checkbox-Ddidc23S.mjs.map +0 -1
  320. package/fesm2022/pseudo-checkbox-module--am9-RIA.mjs.map +0 -1
  321. package/fesm2022/ripple-DUGA2BAa.mjs.map +0 -1
  322. package/fesm2022/ripple-loader-Xy4bv6Xh.mjs.map +0 -1
  323. package/fesm2022/structural-styles-DA18Hchc.mjs.map +0 -1
  324. package/schematics/tsconfig.json +0 -26
@@ -1,45 +1,42 @@
1
1
  @use 'sass:map';
2
- @use '../core/style/sass-utils';
3
2
  @use '../core/tokens/m3-utils';
4
3
  @use '../core/style/elevation';
5
-
6
- // The prefix used to generate the fully qualified name for tokens in this file.
7
- $prefix: (mat, menu);
4
+ @use '../core/tokens/m3';
8
5
 
9
6
  /// Generates custom tokens for the mat-menu.
10
- /// @param {Map} $systems The MDC system tokens
11
- /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
12
- /// @param {Map} $token-slots Possible token slots
13
- /// @return {Map} A set of custom tokens for the mat-menu
14
- @function get-tokens($systems, $exclude-hardcoded, $token-slots) {
15
- $tokens: sass-utils.merge-all(
16
- m3-utils.generate-typography-tokens($systems, item-label-text, label-large),
17
- (
18
- container-shape: map.get($systems, md-sys-shape, corner-extra-small),
19
- divider-color: map.get($systems, md-sys-color, surface-variant),
20
- divider-bottom-spacing: m3-utils.hardcode(8px, $exclude-hardcoded),
21
- divider-top-spacing: m3-utils.hardcode(8px, $exclude-hardcoded),
22
- item-label-text-color: map.get($systems, md-sys-color, on-surface),
23
- item-icon-color: map.get($systems, md-sys-color, on-surface-variant),
24
- item-icon-size: m3-utils.hardcode(24px, $exclude-hardcoded),
25
- item-hover-state-layer-color: sass-utils.safe-color-change(
26
- map.get($systems, md-sys-color, on-surface),
27
- $alpha: map.get($systems, md-sys-state, hover-state-layer-opacity)
28
- ),
29
- item-focus-state-layer-color: sass-utils.safe-color-change(
30
- map.get($systems, md-sys-color, on-surface),
31
- $alpha: map.get($systems, md-sys-state, focus-state-layer-opacity)
32
- ),
33
- item-spacing: m3-utils.hardcode(12px, $exclude-hardcoded),
34
- item-leading-spacing: m3-utils.hardcode(12px, $exclude-hardcoded),
35
- item-trailing-spacing: m3-utils.hardcode(12px, $exclude-hardcoded),
36
- item-with-icon-leading-spacing: m3-utils.hardcode(12px, $exclude-hardcoded),
37
- item-with-icon-trailing-spacing: m3-utils.hardcode(12px, $exclude-hardcoded),
38
- container-color: map.get($systems, md-sys-color, surface-container),
39
- container-elevation-shadow: m3-utils.hardcode(
40
- elevation.get-box-shadow(2), $exclude-hardcoded),
41
- )
42
- );
7
+ @function get-tokens($theme: m3.$sys-theme) {
8
+ $system: m3-utils.get-system($theme);
43
9
 
44
- @return m3-utils.namespace($prefix, $tokens, $token-slots);
10
+ @return (
11
+ base: (
12
+ menu-divider-bottom-spacing: 8px,
13
+ menu-divider-top-spacing: 8px,
14
+ menu-item-icon-size: 24px,
15
+ menu-item-spacing: 12px,
16
+ menu-item-leading-spacing: 12px,
17
+ menu-item-trailing-spacing: 12px,
18
+ menu-item-with-icon-leading-spacing: 12px,
19
+ menu-item-with-icon-trailing-spacing: 12px,
20
+ ),
21
+ color: (
22
+ menu-container-shape: map.get($system, corner-extra-small),
23
+ menu-divider-color: map.get($system, surface-variant),
24
+ menu-item-label-text-color: map.get($system, on-surface),
25
+ menu-item-icon-color: map.get($system, on-surface-variant),
26
+ menu-item-hover-state-layer-color: m3-utils.color-with-opacity(
27
+ map.get($system, on-surface), map.get($system, hover-state-layer-opacity)),
28
+ menu-item-focus-state-layer-color: m3-utils.color-with-opacity(
29
+ map.get($system, on-surface), map.get($system, focus-state-layer-opacity)),
30
+ menu-container-color: map.get($system, surface-container),
31
+ menu-container-elevation-shadow: elevation.get-box-shadow(2),
32
+ ),
33
+ typography: (
34
+ menu-item-label-text-font: map.get($system, label-large-font),
35
+ menu-item-label-text-line-height: map.get($system, label-large-line-height),
36
+ menu-item-label-text-size: map.get($system, label-large-size),
37
+ menu-item-label-text-tracking: map.get($system, label-large-tracking),
38
+ menu-item-label-text-weight: map.get($system, label-large-weight),
39
+ ),
40
+ density: (),
41
+ );
45
42
  }
@@ -1,48 +1,45 @@
1
1
  @use 'sass:map';
2
2
  @use './m2-menu';
3
+ @use './m3-menu';
3
4
  @use '../core/style/sass-utils';
4
5
  @use '../core/tokens/token-utils';
5
6
  @use '../core/theming/theming';
6
7
  @use '../core/theming/inspection';
7
- @use '../core/theming/validation';
8
8
  @use '../core/typography/typography';
9
9
 
10
10
  @mixin base($theme) {
11
11
  @if inspection.get-theme-version($theme) == 1 {
12
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
12
+ @include token-utils.create-token-values(map.get(m3-menu.get-tokens($theme), base));
13
13
  } @else {
14
14
  @include sass-utils.current-selector-or-root() {
15
- @include token-utils.create-token-values-mixed(
16
- m2-menu.$prefix, m2-menu.get-unthemable-tokens());
15
+ @include token-utils.create-token-values-mixed(m2-menu.get-unthemable-tokens());
17
16
  }
18
17
  }
19
18
  }
20
19
 
21
20
  @mixin color($theme) {
22
21
  @if inspection.get-theme-version($theme) == 1 {
23
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
22
+ @include token-utils.create-token-values(map.get(m3-menu.get-tokens($theme), color));
24
23
  } @else {
25
24
  @include sass-utils.current-selector-or-root() {
26
- @include token-utils.create-token-values-mixed(
27
- m2-menu.$prefix, m2-menu.get-color-tokens($theme));
25
+ @include token-utils.create-token-values-mixed(m2-menu.get-color-tokens($theme));
28
26
  }
29
27
  }
30
28
  }
31
29
 
32
30
  @mixin typography($theme) {
33
31
  @if inspection.get-theme-version($theme) == 1 {
34
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
32
+ @include token-utils.create-token-values(map.get(m3-menu.get-tokens($theme), typography));
35
33
  } @else {
36
34
  @include sass-utils.current-selector-or-root() {
37
- @include token-utils.create-token-values-mixed(
38
- m2-menu.$prefix, m2-menu.get-typography-tokens($theme));
35
+ @include token-utils.create-token-values-mixed(m2-menu.get-typography-tokens($theme));
39
36
  }
40
37
  }
41
38
  }
42
39
 
43
40
  @mixin density($theme) {
44
41
  @if inspection.get-theme-version($theme) == 1 {
45
- // There are no M3 density tokens for this component
42
+ @include token-utils.create-token-values(map.get(m3-menu.get-tokens($theme), density));
46
43
  } @else {
47
44
  }
48
45
  }
@@ -51,20 +48,23 @@
51
48
  @function _define-overrides() {
52
49
  @return (
53
50
  (
54
- namespace: m2-menu.$prefix,
55
- tokens: m2-menu.get-token-slots(),
51
+ namespace: menu,
52
+ tokens: token-utils.get-overrides(m3-menu.get-tokens(), menu)
56
53
  ),
57
54
  );
58
55
  }
59
56
 
60
57
  @mixin overrides($tokens: ()) {
61
- @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
58
+ @include token-utils.batch-create-token-values($tokens, _define-overrides());
62
59
  }
63
60
 
64
61
  @mixin theme($theme) {
65
62
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-menu') {
66
63
  @if inspection.get-theme-version($theme) == 1 {
67
- @include _theme-from-tokens(inspection.get-theme-tokens($theme));
64
+ @include base($theme);
65
+ @include color($theme);
66
+ @include density($theme);
67
+ @include typography($theme);
68
68
  } @else {
69
69
  @include base($theme);
70
70
  @if inspection.theme-has($theme, color) {
@@ -79,15 +79,3 @@
79
79
  }
80
80
  }
81
81
  }
82
-
83
- @mixin _theme-from-tokens($tokens) {
84
- @include validation.selector-defined(
85
- 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
86
- );
87
- @if ($tokens != ()) {
88
- @include token-utils.create-token-values(
89
- m2-menu.$prefix,
90
- map.get($tokens, m2-menu.$prefix)
91
- );
92
- }
93
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/material",
3
- "version": "20.0.0-rc.1",
3
+ "version": "20.0.0-rc.2",
4
4
  "description": "Angular Material",
5
5
  "repository": {
6
6
  "type": "git",
@@ -353,7 +353,7 @@
353
353
  }
354
354
  },
355
355
  "peerDependencies": {
356
- "@angular/cdk": "20.0.0-rc.1",
356
+ "@angular/cdk": "20.0.0-rc.2",
357
357
  "@angular/core": "^20.0.0-0 || ^20.1.0-0 || ^20.2.0-0 || ^20.3.0-0 || ^21.0.0-0",
358
358
  "@angular/common": "^20.0.0-0 || ^20.1.0-0 || ^20.2.0-0 || ^20.3.0-0 || ^21.0.0-0",
359
359
  "@angular/forms": "^20.0.0-0 || ^20.1.0-0 || ^20.2.0-0 || ^20.3.0-0 || ^21.0.0-0",
@@ -5,9 +5,6 @@
5
5
  @use '../core/theming/inspection';
6
6
  @use '../core/style/sass-utils';
7
7
 
8
- // The prefix used to generate the fully qualified name for tokens in this file.
9
- $prefix: (mat, paginator);
10
-
11
8
  // Tokens that can't be configured through Angular Material's current theming API,
12
9
  // but may be in a future version of the theming API.
13
10
  @function get-unthemable-tokens() {
@@ -19,22 +16,24 @@ $prefix: (mat, paginator);
19
16
  $foreground-base: inspection.get-theme-color($theme, foreground, base);
20
17
 
21
18
  @return (
22
- container-text-color: sass-utils.safe-color-change($foreground-base, $alpha: 0.87),
23
- container-background-color: inspection.get-theme-color($theme, background, card),
24
- enabled-icon-color: sass-utils.safe-color-change($foreground-base, $alpha: 0.54),
25
- disabled-icon-color: sass-utils.safe-color-change($foreground-base, $alpha: 0.12),
19
+ paginator-container-text-color: sass-utils.safe-color-change($foreground-base, $alpha: 0.87),
20
+ paginator-container-background-color: inspection.get-theme-color($theme, background, card),
21
+ paginator-enabled-icon-color: sass-utils.safe-color-change($foreground-base, $alpha: 0.54),
22
+ paginator-disabled-icon-color: sass-utils.safe-color-change($foreground-base, $alpha: 0.12),
26
23
  );
27
24
  }
28
25
 
29
26
  // Tokens that can be configured through Angular Material's typography theming API.
30
27
  @function get-typography-tokens($theme) {
31
28
  @return (
32
- container-text-font: inspection.get-theme-typography($theme, caption, font-family),
33
- container-text-line-height: inspection.get-theme-typography($theme, caption, line-height),
34
- container-text-size: inspection.get-theme-typography($theme, caption, font-size),
35
- container-text-tracking: inspection.get-theme-typography($theme, caption, letter-spacing),
36
- container-text-weight: inspection.get-theme-typography($theme, caption, font-weight),
37
- select-trigger-text-size: inspection.get-theme-typography($theme, caption, font-size),
29
+ paginator-container-text-font: inspection.get-theme-typography($theme, caption, font-family),
30
+ paginator-container-text-line-height:
31
+ inspection.get-theme-typography($theme, caption, line-height),
32
+ paginator-container-text-size: inspection.get-theme-typography($theme, caption, font-size),
33
+ paginator-container-text-tracking:
34
+ inspection.get-theme-typography($theme, caption, letter-spacing),
35
+ paginator-container-text-weight: inspection.get-theme-typography($theme, caption, font-weight),
36
+ paginator-select-trigger-text-size: inspection.get-theme-typography($theme, caption, font-size),
38
37
  );
39
38
  }
40
39
 
@@ -69,10 +68,10 @@ $prefix: (mat, paginator);
69
68
  $form-field-vertical-padding: 16px - $form-field-vertical-deduction;
70
69
 
71
70
  @return (
72
- container-size: map.get($size-scale, $density-scale),
73
- form-field-container-height: $form-field-height,
74
- form-field-container-vertical-padding: $form-field-vertical-padding,
75
- touch-target-display: if($density-scale < -2, none, block),
71
+ paginator-container-size: map.get($size-scale, $density-scale),
72
+ paginator-form-field-container-height: $form-field-height,
73
+ paginator-form-field-container-vertical-padding: $form-field-vertical-padding,
74
+ paginator-touch-target-display: if($density-scale < -2, none, block),
76
75
  );
77
76
  }
78
77
 
@@ -1,43 +1,44 @@
1
1
  @use 'sass:map';
2
2
  @use 'sass:list';
3
- @use '../core/style/sass-utils';
4
3
  @use '../core/tokens/m3-utils';
5
4
  @use '../core/theming/theming';
6
5
  @use '../core/theming/inspection';
7
-
8
- // The prefix used to generate the fully qualified name for tokens in this file.
9
- $prefix: (mat, paginator);
6
+ @use '../core/tokens/m3';
10
7
 
11
8
  /// Generates custom tokens for the mat-paginator.
12
- /// @param {Map} $systems The MDC system tokens
13
- /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
14
- /// @param {Map} $token-slots Possible token slots
15
- /// @return {Map} A set of custom tokens for the mat-paginator
16
- @function get-tokens($systems, $exclude-hardcoded, $token-slots) {
17
- $tokens: sass-utils.merge-all(
18
- m3-utils.generate-typography-tokens($systems, container-text, body-small),
19
- (
20
- container-text-color: map.get($systems, md-sys-color, on-surface),
21
- container-background-color: map.get($systems, md-sys-color, surface),
22
- enabled-icon-color: map.get($systems, md-sys-color, on-surface-variant),
23
- disabled-icon-color: sass-utils.safe-color-change(
24
- map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
25
- select-trigger-text-size: map.get($systems, md-sys-typescale, body-small-size),
26
- )
27
- );
9
+ @function get-tokens($theme: m3.$sys-theme) {
10
+ $system: m3-utils.get-system($theme);
28
11
 
29
- @return m3-utils.namespace($prefix, $tokens, $token-slots);
12
+ @return (
13
+ base: (),
14
+ color: (
15
+ paginator-container-text-color: map.get($system, on-surface),
16
+ paginator-container-background-color: map.get($system, surface),
17
+ paginator-disabled-icon-color: m3-utils.color-with-opacity(map.get($system, on-surface), 38%),
18
+ paginator-enabled-icon-color: map.get($system, on-surface-variant),
19
+ ),
20
+ typography: (
21
+ paginator-container-text-font: map.get($system, body-small-font),
22
+ paginator-container-text-line-height: map.get($system, body-small-line-height),
23
+ paginator-container-text-size: map.get($system, body-small-size),
24
+ paginator-container-text-tracking: map.get($system, body-small-tracking),
25
+ paginator-container-text-weight: map.get($system, body-small-weight),
26
+ paginator-select-trigger-text-size: map.get($system, body-small-size),
27
+ ),
28
+ density: get-density-tokens(map.get($theme, inspection.$internals, density-scale)),
29
+ );
30
30
  }
31
31
 
32
32
  // Tokens that can be configured through Angular Material's density theming API.
33
- @function get-density-tokens($theme) {
34
- $scale: theming.clamp-density(inspection.get-theme-density($theme), -5);
33
+ @function get-density-tokens($scale) {
34
+ $scale: theming.clamp-density($scale, -5);
35
35
  $index: ($scale * -1) + 1;
36
36
 
37
37
  @return (
38
- container-size: list.nth((56px, 52px, 48px, 40px, 40px, 40px), $index),
39
- form-field-container-height: list.nth((40px, 40px, 40px, 40px, 40px, 36px), $index),
40
- form-field-container-vertical-padding: list.nth((8px, 8px, 8px, 8px, 8px, 6px), $index),
41
- touch-target-display: list.nth((block, block, none, none, none, none), $index),
38
+ paginator-container-size: list.nth((56px, 52px, 48px, 40px, 40px, 40px), $index),
39
+ paginator-form-field-container-height: list.nth((40px, 40px, 40px, 40px, 40px, 36px), $index),
40
+ paginator-form-field-container-vertical-padding:
41
+ list.nth((8px, 8px, 8px, 8px, 8px, 6px), $index),
42
+ paginator-touch-target-display: list.nth((block, block, none, none, none, none), $index),
42
43
  );
43
44
  }
@@ -1,59 +1,45 @@
1
1
  @use 'sass:map';
2
- @use 'sass:meta';
3
2
  @use './m2-paginator';
4
3
  @use './m3-paginator';
5
4
  @use '../core/style/sass-utils';
6
5
  @use '../core/typography/typography';
7
6
  @use '../core/theming/theming';
8
7
  @use '../core/theming/inspection';
9
- @use '../core/theming/validation';
10
8
  @use '../core/tokens/token-utils';
11
9
 
12
10
  @mixin base($theme) {
13
11
  @if inspection.get-theme-version($theme) == 1 {
14
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
12
+ @include token-utils.create-token-values(map.get(m3-paginator.get-tokens($theme), base));
15
13
  } @else {
16
14
  }
17
15
  }
18
16
 
19
17
  @mixin color($theme) {
20
18
  @if inspection.get-theme-version($theme) == 1 {
21
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
19
+ @include token-utils.create-token-values(map.get(m3-paginator.get-tokens($theme), color));
22
20
  } @else {
23
21
  @include sass-utils.current-selector-or-root() {
24
- @include token-utils.create-token-values-mixed(
25
- m2-paginator.$prefix, m2-paginator.get-color-tokens($theme));
22
+ @include token-utils.create-token-values-mixed(m2-paginator.get-color-tokens($theme));
26
23
  }
27
24
  }
28
25
  }
29
26
 
30
27
  @mixin typography($theme) {
31
28
  @if inspection.get-theme-version($theme) == 1 {
32
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
29
+ @include token-utils.create-token-values(map.get(m3-paginator.get-tokens($theme), typography));
33
30
  } @else {
34
31
  @include sass-utils.current-selector-or-root() {
35
- @include token-utils.create-token-values-mixed(
36
- m2-paginator.$prefix, m2-paginator.get-typography-tokens($theme));
32
+ @include token-utils.create-token-values-mixed(m2-paginator.get-typography-tokens($theme));
37
33
  }
38
34
  }
39
35
  }
40
36
 
41
37
  @mixin density($theme) {
42
- $density-scale: inspection.get-theme-density($theme);
43
- $form-field-density: if(
44
- (meta.type-of($density-scale) == 'number' and $density-scale >= -4) or
45
- ($density-scale == maximum),
46
- -4,
47
- $density-scale
48
- );
49
-
50
38
  @if inspection.get-theme-version($theme) == 1 {
51
- @include token-utils.create-token-values(
52
- m3-paginator.$prefix, m3-paginator.get-density-tokens($theme));
39
+ @include token-utils.create-token-values(map.get(m3-paginator.get-tokens($theme), density));
53
40
  } @else {
54
41
  @include sass-utils.current-selector-or-root() {
55
- @include token-utils.create-token-values-mixed(
56
- m2-paginator.$prefix, m2-paginator.get-density-tokens($theme));
42
+ @include token-utils.create-token-values-mixed(m2-paginator.get-density-tokens($theme));
57
43
  }
58
44
  }
59
45
  }
@@ -62,23 +48,23 @@
62
48
  @function _define-overrides() {
63
49
  @return (
64
50
  (
65
- namespace: m2-paginator.$prefix,
66
- tokens: m2-paginator.get-token-slots(),
51
+ namespace: paginator,
52
+ tokens: token-utils.get-overrides(m3-paginator.get-tokens(), paginator)
67
53
  ),
68
54
  );
69
55
  }
70
56
 
71
57
  @mixin overrides($tokens: ()) {
72
- @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
58
+ @include token-utils.batch-create-token-values($tokens, _define-overrides());
73
59
  }
74
60
 
75
61
  @mixin theme($theme) {
76
62
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-paginator') {
77
63
  @if inspection.get-theme-version($theme) == 1 {
78
- @include _theme-from-tokens(inspection.get-theme-tokens($theme));
79
- @if inspection.theme-has($theme, density) {
80
- @include density($theme);
81
- }
64
+ @include base($theme);
65
+ @include color($theme);
66
+ @include density($theme);
67
+ @include typography($theme);
82
68
  } @else {
83
69
  @include base($theme);
84
70
  @if inspection.theme-has($theme, color) {
@@ -93,15 +79,3 @@
93
79
  }
94
80
  }
95
81
  }
96
-
97
- @mixin _theme-from-tokens($tokens) {
98
- @include validation.selector-defined(
99
- 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
100
- );
101
- @if ($tokens != ()) {
102
- @include token-utils.create-token-values(
103
- m2-paginator.$prefix,
104
- map.get($tokens, m2-paginator.$prefix)
105
- );
106
- }
107
- }