@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,35 +1,21 @@
1
1
  @use '../core/theming/theming';
2
- @use '../core/theming/inspection';
3
- @use '../core/theming/validation';
4
2
  @use '../core/typography/typography';
5
3
  @use '../core/tokens/token-utils';
6
4
 
7
5
  @mixin base($theme) {
8
- @if inspection.get-theme-version($theme) == 1 {
9
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
10
- } @else {
11
- }
6
+ // No-op
12
7
  }
13
8
 
14
9
  @mixin color($theme) {
15
- @if inspection.get-theme-version($theme) == 1 {
16
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
17
- } @else {
18
- }
10
+ // No-op
19
11
  }
20
12
 
21
13
  @mixin typography($theme) {
22
- @if inspection.get-theme-version($theme) == 1 {
23
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
24
- } @else {
25
- }
14
+ // No-op
26
15
  }
27
16
 
28
17
  @mixin density($theme) {
29
- @if inspection.get-theme-version($theme) == 1 {
30
- // There are no M3 density tokens for this component
31
- } @else {
32
- }
18
+ // No-op
33
19
  }
34
20
 
35
21
  /// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
@@ -37,36 +23,17 @@
37
23
  @return (
38
24
  (
39
25
  namespace: '',
40
- tokens: (),
26
+ tokens: token-utils.get-overrides((base: (), color: (), typography: (), density: ()), input),
41
27
  ),
42
28
  );
43
29
  }
44
30
 
45
31
  @mixin overrides($tokens: ()) {
46
- @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
32
+ @include token-utils.batch-create-token-values($tokens, _define-overrides());
47
33
  }
48
34
 
49
35
  @mixin theme($theme) {
50
36
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-input') {
51
- @if inspection.get-theme-version($theme) == 1 {
52
- @include _theme-from-tokens(inspection.get-theme-tokens($theme));
53
- } @else {
54
- @include base($theme);
55
- @if inspection.theme-has($theme, color) {
56
- @include color($theme);
57
- }
58
- @if inspection.theme-has($theme, density) {
59
- @include density($theme);
60
- }
61
- @if inspection.theme-has($theme, typography) {
62
- @include typography($theme);
63
- }
64
- }
37
+ // No-op
65
38
  }
66
39
  }
67
-
68
- @mixin _theme-from-tokens($tokens) {
69
- @include validation.selector-defined(
70
- 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
71
- );
72
- }
@@ -4,7 +4,6 @@
4
4
  @use '../core/style/sass-utils';
5
5
  @use '../core/theming/inspection';
6
6
  @use '../core/theming/theming';
7
- @use '../core/theming/validation';
8
7
  @use '../core/tokens/token-utils';
9
8
  @use '../core/typography/typography';
10
9
  @use '../radio/m2-radio';
@@ -14,67 +13,49 @@
14
13
  @mixin base($theme) {
15
14
  // Add default values for tokens not related to color, typography, or density.
16
15
  @if inspection.get-theme-version($theme) == 1 {
17
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
16
+ @include token-utils.create-token-values(map.get(m3-list.get-tokens($theme), base));
18
17
  } @else {
19
18
  @include sass-utils.current-selector-or-root() {
20
- @include token-utils.create-token-values-mixed(
21
- m2-list.$prefix, m2-list.get-unthemable-tokens());
19
+ @include token-utils.create-token-values-mixed(m2-list.get-unthemable-tokens());
22
20
  }
23
21
  }
24
22
  }
25
23
 
26
24
  @mixin color($theme) {
27
25
  @if inspection.get-theme-version($theme) == 1 {
28
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
26
+ @include token-utils.create-token-values(map.get(m3-list.get-tokens($theme), color));
29
27
  } @else {
30
28
  @include sass-utils.current-selector-or-root() {
31
- @include token-utils.create-token-values-mixed(
32
- m2-list.$prefix, m2-list.get-color-tokens($theme));
29
+ @include token-utils.create-token-values-mixed(m2-list.get-color-tokens($theme));
33
30
  }
34
31
 
35
32
  .mdc-list-item__start,
36
33
  .mdc-list-item__end {
37
- @include token-utils.create-token-values-mixed(
38
- m2-radio.$prefix, m2-radio.get-color-tokens($theme, primary));
34
+ @include token-utils.create-token-values-mixed(m2-radio.get-color-tokens($theme, primary));
39
35
  }
40
36
 
41
37
  .mat-accent {
42
38
  .mdc-list-item__start,
43
39
  .mdc-list-item__end {
44
- @include token-utils.create-token-values-mixed(
45
- m2-radio.$prefix,
46
- m2-radio.get-color-tokens($theme, accent)
47
- );
40
+ @include token-utils.create-token-values-mixed(m2-radio.get-color-tokens($theme, accent));
48
41
  }
49
42
  }
50
43
 
51
44
  .mat-warn {
52
45
  .mdc-list-item__start,
53
46
  .mdc-list-item__end {
54
- @include token-utils.create-token-values-mixed(
55
- m2-radio.$prefix,
56
- m2-radio.get-color-tokens($theme, warn)
57
- );
47
+ @include token-utils.create-token-values-mixed(m2-radio.get-color-tokens($theme, warn));
58
48
  }
59
49
  }
60
50
 
61
51
  .mat-mdc-list-option {
62
- @include token-utils.create-token-values-mixed(
63
- m2-checkbox.$prefix,
64
- m2-checkbox.get-color-tokens($theme, primary)
65
- );
52
+ @include token-utils.create-token-values-mixed(m2-checkbox.get-color-tokens($theme, primary));
66
53
  }
67
54
  .mat-mdc-list-option.mat-accent {
68
- @include token-utils.create-token-values-mixed(
69
- m2-checkbox.$prefix,
70
- m2-checkbox.get-color-tokens($theme, accent)
71
- );
55
+ @include token-utils.create-token-values-mixed(m2-checkbox.get-color-tokens($theme, accent));
72
56
  }
73
57
  .mat-mdc-list-option.mat-warn {
74
- @include token-utils.create-token-values-mixed(
75
- m2-checkbox.$prefix,
76
- m2-checkbox.get-color-tokens($theme, warn)
77
- );
58
+ @include token-utils.create-token-values-mixed(m2-checkbox.get-color-tokens($theme, warn));
78
59
  }
79
60
 
80
61
  // There is no token for activated color on nav list.
@@ -104,20 +85,18 @@
104
85
 
105
86
  @mixin density($theme) {
106
87
  @if inspection.get-theme-version($theme) == 1 {
107
- @include token-utils.create-token-values(m3-list.$prefix, m3-list.get-density-tokens($theme));
88
+ @include token-utils.create-token-values(map.get(m3-list.get-tokens($theme), density));
108
89
  } @else {
109
90
  $density-scale: inspection.get-theme-density($theme);
110
91
 
111
92
  @include sass-utils.current-selector-or-root() {
112
93
  // TODO: See if this can be removed
113
- @include token-utils.create-token-values-mixed(
114
- m2-list.$prefix, m2-list.get-density-tokens($theme));
94
+ @include token-utils.create-token-values-mixed(m2-list.get-density-tokens($theme));
115
95
  }
116
96
 
117
97
  .mdc-list-item__start,
118
98
  .mdc-list-item__end {
119
- @include token-utils.create-token-values-mixed(
120
- m2-radio.$prefix, m2-radio.get-density-tokens($theme));
99
+ @include token-utils.create-token-values-mixed(m2-radio.get-density-tokens($theme));
121
100
  }
122
101
 
123
102
  // TODO(mmalerba): This is added to maintain the same style MDC used prior to the token-based
@@ -161,11 +140,10 @@
161
140
 
162
141
  @mixin typography($theme) {
163
142
  @if inspection.get-theme-version($theme) == 1 {
164
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
143
+ @include token-utils.create-token-values(map.get(m3-list.get-tokens($theme), typography));
165
144
  } @else {
166
145
  @include sass-utils.current-selector-or-root() {
167
- @include token-utils.create-token-values-mixed(
168
- m2-list.$prefix, m2-list.get-typography-tokens($theme));
146
+ @include token-utils.create-token-values-mixed(m2-list.get-typography-tokens($theme));
169
147
  }
170
148
 
171
149
  // MDC does not have tokens for the subheader.
@@ -181,23 +159,23 @@
181
159
  @function _define-overrides() {
182
160
  @return (
183
161
  (
184
- namespace: m2-list.$prefix,
185
- tokens: m2-list.get-token-slots(),
162
+ namespace: list,
163
+ tokens: token-utils.get-overrides(m3-list.get-tokens(), list)
186
164
  ),
187
165
  );
188
166
  }
189
167
 
190
168
  @mixin overrides($tokens: ()) {
191
- @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
169
+ @include token-utils.batch-create-token-values($tokens, _define-overrides());
192
170
  }
193
171
 
194
172
  @mixin theme($theme) {
195
173
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-list') {
196
174
  @if inspection.get-theme-version($theme) == 1 {
197
- @include _theme-from-tokens(inspection.get-theme-tokens($theme));
198
- @if inspection.theme-has($theme, density) {
199
- @include density($theme);
200
- }
175
+ @include base($theme);
176
+ @include color($theme);
177
+ @include density($theme);
178
+ @include typography($theme);
201
179
  } @else {
202
180
  @include base($theme);
203
181
  @if inspection.theme-has($theme, color) {
@@ -212,11 +190,3 @@
212
190
  }
213
191
  }
214
192
  }
215
-
216
- @mixin _theme-from-tokens($tokens) {
217
- @include validation.selector-defined(
218
- 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
219
- );
220
- $mat-list-tokens: token-utils.get-tokens-for($tokens, m2-list.$prefix);
221
- @include token-utils.create-token-values(m2-list.$prefix, $mat-list-tokens);
222
- }
@@ -3,28 +3,25 @@
3
3
  @use '../core/theming/inspection';
4
4
  @use 'sass:map';
5
5
 
6
- // The prefix used to generate the fully qualified name for tokens in this file.
7
- $prefix: (mat, list);
8
-
9
6
  // Tokens that can't be configured through Angular Material's current theming API,
10
7
  // but may be in a future version of the theming API.
11
8
  @function get-unthemable-tokens() {
12
9
  @return (
13
- active-indicator-color: transparent,
14
- active-indicator-shape: 4px,
15
- list-item-container-shape: 0,
16
- list-item-leading-avatar-shape: 50%,
17
- list-item-container-color: transparent,
18
- list-item-selected-container-color: transparent,
19
- list-item-leading-avatar-color: transparent,
20
- list-item-leading-icon-size: 24px,
21
- list-item-leading-avatar-size: 40px,
22
- list-item-trailing-icon-size: 24px,
23
- list-item-disabled-state-layer-color: transparent,
24
- list-item-disabled-state-layer-opacity: 0,
25
- list-item-disabled-label-text-opacity: 0.38,
26
- list-item-disabled-leading-icon-opacity: 0.38,
27
- list-item-disabled-trailing-icon-opacity: 0.38,
10
+ list-active-indicator-color: transparent,
11
+ list-active-indicator-shape: 4px,
12
+ list-list-item-container-shape: 0,
13
+ list-list-item-leading-avatar-shape: 50%,
14
+ list-list-item-container-color: transparent,
15
+ list-list-item-selected-container-color: transparent,
16
+ list-list-item-leading-avatar-color: transparent,
17
+ list-list-item-leading-icon-size: 24px,
18
+ list-list-item-leading-avatar-size: 40px,
19
+ list-list-item-trailing-icon-size: 24px,
20
+ list-list-item-disabled-state-layer-color: transparent,
21
+ list-list-item-disabled-state-layer-opacity: 0,
22
+ list-list-item-disabled-label-text-opacity: 0.38,
23
+ list-list-item-disabled-leading-icon-opacity: 0.38,
24
+ list-list-item-disabled-trailing-icon-opacity: 0.38,
28
25
  );
29
26
  }
30
27
 
@@ -39,50 +36,54 @@ $prefix: (mat, list);
39
36
  $foreground-base, $alpha: if($is-dark, 0.5, 0.38));
40
37
 
41
38
  @return (
42
- list-item-label-text-color: $foreground-text,
43
- list-item-supporting-text-color: $foreground-secondary-text,
44
- list-item-leading-icon-color: $text-icon-on-background,
45
- list-item-trailing-supporting-text-color: $foreground-hint-text,
46
- list-item-trailing-icon-color: $text-icon-on-background,
47
- list-item-selected-trailing-icon-color: $text-icon-on-background,
48
- list-item-disabled-label-text-color: $foreground-base,
49
- list-item-disabled-leading-icon-color: $foreground-base,
50
- list-item-disabled-trailing-icon-color: $foreground-base,
51
- list-item-hover-label-text-color: $foreground-text,
52
- list-item-hover-leading-icon-color: $text-icon-on-background,
53
- list-item-hover-state-layer-color: $foreground-base,
54
- list-item-hover-state-layer-opacity: if($is-dark, 0.08, 0.04),
55
- list-item-hover-trailing-icon-color: $text-icon-on-background,
56
- list-item-focus-label-text-color: $foreground-text,
57
- list-item-focus-state-layer-color: $foreground-base,
58
- list-item-focus-state-layer-opacity: if($is-dark, 0.24, 0.12),
39
+ list-list-item-label-text-color: $foreground-text,
40
+ list-list-item-supporting-text-color: $foreground-secondary-text,
41
+ list-list-item-leading-icon-color: $text-icon-on-background,
42
+ list-list-item-trailing-supporting-text-color: $foreground-hint-text,
43
+ list-list-item-trailing-icon-color: $text-icon-on-background,
44
+ list-list-item-selected-trailing-icon-color: $text-icon-on-background,
45
+ list-list-item-disabled-label-text-color: $foreground-base,
46
+ list-list-item-disabled-leading-icon-color: $foreground-base,
47
+ list-list-item-disabled-trailing-icon-color: $foreground-base,
48
+ list-list-item-hover-label-text-color: $foreground-text,
49
+ list-list-item-hover-leading-icon-color: $text-icon-on-background,
50
+ list-list-item-hover-state-layer-color: $foreground-base,
51
+ list-list-item-hover-state-layer-opacity: if($is-dark, 0.08, 0.04),
52
+ list-list-item-hover-trailing-icon-color: $text-icon-on-background,
53
+ list-list-item-focus-label-text-color: $foreground-text,
54
+ list-list-item-focus-state-layer-color: $foreground-base,
55
+ list-list-item-focus-state-layer-opacity: if($is-dark, 0.24, 0.12),
59
56
  );
60
57
  }
61
58
 
62
59
  // Tokens that can be configured through Angular Material's typography theming API.
63
60
  @function get-typography-tokens($theme) {
64
61
  @return (
65
- list-item-label-text-font: inspection.get-theme-typography($theme, body-1, font-family),
66
- list-item-label-text-line-height: inspection.get-theme-typography($theme, body-1, line-height),
67
- list-item-label-text-size: inspection.get-theme-typography($theme, body-1, font-size),
68
- list-item-label-text-tracking: inspection.get-theme-typography($theme, body-1, letter-spacing),
69
- list-item-label-text-weight: inspection.get-theme-typography($theme, body-1, font-weight),
70
- list-item-supporting-text-font: inspection.get-theme-typography($theme, body-2, font-family),
71
- list-item-supporting-text-line-height:inspection.get-theme-typography(
62
+ list-list-item-label-text-font: inspection.get-theme-typography($theme, body-1, font-family),
63
+ list-list-item-label-text-line-height:
64
+ inspection.get-theme-typography($theme, body-1, line-height),
65
+ list-list-item-label-text-size: inspection.get-theme-typography($theme, body-1, font-size),
66
+ list-list-item-label-text-tracking:
67
+ inspection.get-theme-typography($theme, body-1, letter-spacing),
68
+ list-list-item-label-text-weight: inspection.get-theme-typography($theme, body-1, font-weight),
69
+ list-list-item-supporting-text-font:
70
+ inspection.get-theme-typography($theme, body-2, font-family),
71
+ list-list-item-supporting-text-line-height:inspection.get-theme-typography(
72
72
  $theme, body-2, line-height),
73
- list-item-supporting-text-size: inspection.get-theme-typography($theme, body-2, font-size),
74
- list-item-supporting-text-tracking: inspection.get-theme-typography(
73
+ list-list-item-supporting-text-size: inspection.get-theme-typography($theme, body-2, font-size),
74
+ list-list-item-supporting-text-tracking: inspection.get-theme-typography(
75
75
  $theme, body-2, letter-spacing),
76
- list-item-supporting-text-weight: inspection.get-theme-typography($theme, body-2, font-weight),
77
- list-item-trailing-supporting-text-font: inspection.get-theme-typography(
76
+ list-list-item-supporting-text-weight:
77
+ inspection.get-theme-typography($theme, body-2, font-weight),
78
+ list-list-item-trailing-supporting-text-font: inspection.get-theme-typography(
78
79
  $theme, caption, font-family),
79
- list-item-trailing-supporting-text-line-height: inspection.get-theme-typography(
80
+ list-list-item-trailing-supporting-text-line-height: inspection.get-theme-typography(
80
81
  $theme, caption, line-height),
81
- list-item-trailing-supporting-text-size: inspection.get-theme-typography(
82
+ list-list-item-trailing-supporting-text-size: inspection.get-theme-typography(
82
83
  $theme, caption, font-size),
83
- list-item-trailing-supporting-text-tracking: inspection.get-theme-typography(
84
+ list-list-item-trailing-supporting-text-tracking: inspection.get-theme-typography(
84
85
  $theme, caption, letter-spacing),
85
- list-item-trailing-supporting-text-weight: inspection.get-theme-typography(
86
+ list-list-item-trailing-supporting-text-weight: inspection.get-theme-typography(
86
87
  $theme, caption, font-weight),
87
88
  );
88
89
  }
@@ -92,9 +93,9 @@ $prefix: (mat, list);
92
93
  $scale: inspection.get-theme-density($theme);
93
94
 
94
95
  @return (
95
- list-item-leading-icon-start-space: 16px,
96
- list-item-leading-icon-end-space: 32px,
97
- list-item-one-line-container-height: map.get((
96
+ list-list-item-leading-icon-start-space: 16px,
97
+ list-list-item-leading-icon-end-space: 32px,
98
+ list-list-item-one-line-container-height: map.get((
98
99
  0: 48px,
99
100
  -1: 44px,
100
101
  -2: 40px,
@@ -102,7 +103,7 @@ $prefix: (mat, list);
102
103
  -4: 32px,
103
104
  -5: 24px,
104
105
  ), $scale),
105
- list-item-two-line-container-height: map.get((
106
+ list-list-item-two-line-container-height: map.get((
106
107
  0: 64px,
107
108
  -1: 60px,
108
109
  -2: 56px,
@@ -110,7 +111,7 @@ $prefix: (mat, list);
110
111
  -4: 48px,
111
112
  -5: 48px,
112
113
  ), $scale),
113
- list-item-three-line-container-height: map.get((
114
+ list-list-item-three-line-container-height: map.get((
114
115
  0: 88px,
115
116
  -1: 84px,
116
117
  -2: 80px,
@@ -3,16 +3,12 @@
3
3
  @use '../core/tokens/m3-utils';
4
4
  @use '../core/theming/theming';
5
5
  @use '../core/theming/inspection';
6
-
7
- // The prefix used to generate the fully qualified name for tokens in this file.
8
- $prefix: (mat, list);
6
+ @use '../core/tokens/m3';
9
7
 
10
8
  /// Generates custom tokens for the mat-list.
11
- /// @param {Map} $systems The MDC system tokens
12
- /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
13
- /// @param {Map} $token-slots Possible token slots
14
- /// @return {Map} A set of custom tokens for the mat-list
15
- @function get-tokens($systems, $exclude-hardcoded, $token-slots) {
9
+ @function get-tokens($theme: m3.$sys-theme) {
10
+ $system: m3-utils.get-system($theme);
11
+
16
12
  // list-item-container-color
17
13
  // This does not match the spec, which defines this to be `md.sys.color.surface`.
18
14
  // However, this interferes with the use case of placing a list on other components. For example,
@@ -22,71 +18,77 @@ $prefix: (mat, list);
22
18
  // list-item-leading-icon-size
23
19
  // Match spec, which has list-item-leading-icon-size of 24px.
24
20
  // Current version of tokens (0_161) has 18px.
25
- $tokens: (
26
- active-indicator-color: map.get($systems, md-sys-color, secondary-container),
27
- active-indicator-shape: map.get($systems, md-sys-shape, corner-full),
28
- list-item-container-color: if($exclude-hardcoded, null, transparent),
29
- list-item-container-shape: map.get($systems, md-sys-shape, corner-none),
30
- list-item-disabled-label-text-color: map.get($systems, md-sys-color, on-surface),
31
- list-item-disabled-label-text-opacity: if($exclude-hardcoded, null, 0.3),
32
- list-item-disabled-leading-icon-color: map.get($systems, md-sys-color, on-surface),
33
- list-item-disabled-leading-icon-opacity: if($exclude-hardcoded, null, 0.38),
34
- list-item-disabled-state-layer-color: map.get($systems, md-sys-color, on-surface),
35
- list-item-disabled-state-layer-opacity:
36
- map.get($systems, md-sys-state, focus-state-layer-opacity),
37
- list-item-disabled-trailing-icon-color: map.get($systems, md-sys-color, on-surface),
38
- list-item-disabled-trailing-icon-opacity: if($exclude-hardcoded, null, 0.38),
39
- list-item-focus-label-text-color: map.get($systems, md-sys-color, on-surface),
40
- list-item-focus-state-layer-color: map.get($systems, md-sys-color, on-surface),
41
- list-item-focus-state-layer-opacity: map.get($systems, md-sys-state, focus-state-layer-opacity),
42
- list-item-hover-label-text-color: map.get($systems, md-sys-color, on-surface),
43
- list-item-hover-state-layer-color: map.get($systems, md-sys-color, on-surface),
44
- list-item-hover-state-layer-opacity: map.get($systems, md-sys-state, hover-state-layer-opacity),
45
- list-item-label-text-color: map.get($systems, md-sys-color, on-surface),
46
- list-item-label-text-font: map.get($systems, md-sys-typescale, body-large-font),
47
- list-item-label-text-line-height: map.get($systems, md-sys-typescale, body-large-line-height),
48
- list-item-label-text-size: map.get($systems, md-sys-typescale, body-large-size),
49
- list-item-label-text-tracking: map.get($systems, md-sys-typescale, body-large-tracking),
50
- list-item-label-text-weight: map.get($systems, md-sys-typescale, body-large-weight),
51
- list-item-leading-avatar-color: map.get($systems, md-sys-color, primary-container),
52
- list-item-leading-avatar-shape: map.get($systems, md-sys-shape, corner-full),
53
- list-item-leading-avatar-size: if($exclude-hardcoded, null, 40px),
54
- list-item-leading-icon-color: map.get($systems, md-sys-color, on-surface-variant),
55
- list-item-leading-icon-size: if($exclude-hardcoded, null, 24px),
56
- list-item-selected-trailing-icon-color: map.get($systems, md-sys-color, primary),
57
- list-item-supporting-text-color: map.get($systems, md-sys-color, on-surface-variant),
58
- list-item-supporting-text-font: map.get($systems, md-sys-typescale, body-medium-font),
59
- list-item-supporting-text-line-height:
60
- map.get($systems, md-sys-typescale, body-medium-line-height),
61
- list-item-supporting-text-size: map.get($systems, md-sys-typescale, body-medium-size),
62
- list-item-supporting-text-tracking: map.get($systems, md-sys-typescale, body-medium-tracking),
63
- list-item-supporting-text-weight: map.get($systems, md-sys-typescale, body-medium-weight),
64
- list-item-trailing-icon-color: map.get($systems, md-sys-color, on-surface-variant),
65
- list-item-trailing-icon-size: if($exclude-hardcoded, null, 24px),
66
- list-item-trailing-supporting-text-color: map.get($systems, md-sys-color, on-surface-variant),
67
- list-item-trailing-supporting-text-font: map.get($systems, md-sys-typescale, label-small-font),
68
- list-item-trailing-supporting-text-line-height:
69
- map.get($systems, md-sys-typescale, label-small-line-height),
70
- list-item-trailing-supporting-text-size: map.get($systems, md-sys-typescale, label-small-size),
71
- list-item-trailing-supporting-text-tracking:
72
- map.get($systems, md-sys-typescale, label-small-tracking),
73
- list-item-trailing-supporting-text-weight:
74
- map.get($systems, md-sys-typescale, label-small-weight),
21
+ @return (
22
+ base: (),
23
+ color: (
24
+ list-active-indicator-color: map.get($system, secondary-container),
25
+ list-active-indicator-shape: map.get($system, corner-full),
26
+ list-list-item-container-color: transparent,
27
+ list-list-item-container-shape: map.get($system, corner-none),
28
+ list-list-item-disabled-label-text-color: map.get($system, on-surface),
29
+ list-list-item-disabled-label-text-opacity: 0.3,
30
+ list-list-item-disabled-leading-icon-color: map.get($system, on-surface),
31
+ list-list-item-disabled-leading-icon-opacity: 0.38,
32
+ list-list-item-disabled-state-layer-color: map.get($system, on-surface),
33
+ list-list-item-disabled-state-layer-opacity: map.get($system, focus-state-layer-opacity),
34
+ list-list-item-disabled-trailing-icon-color: map.get($system, on-surface),
35
+ list-list-item-disabled-trailing-icon-opacity: 0.38,
36
+ list-list-item-focus-label-text-color: map.get($system, on-surface),
37
+ list-list-item-focus-state-layer-color: map.get($system, on-surface),
38
+ list-list-item-focus-state-layer-opacity: map.get($system, focus-state-layer-opacity),
39
+ list-list-item-hover-label-text-color: map.get($system, on-surface),
40
+ list-list-item-hover-state-layer-color: map.get($system, on-surface),
41
+ list-list-item-hover-state-layer-opacity: map.get($system, hover-state-layer-opacity),
42
+ list-list-item-label-text-color: map.get($system, on-surface),
43
+ list-list-item-leading-avatar-color: map.get($system, primary-container),
44
+ list-list-item-leading-avatar-shape: map.get($system, corner-full),
45
+ list-list-item-leading-avatar-size: 40px,
46
+ list-list-item-leading-icon-color: map.get($system, on-surface-variant),
47
+ list-list-item-leading-icon-size: 24px,
48
+ list-list-item-selected-trailing-icon-color: map.get($system, primary),
49
+ list-list-item-supporting-text-color: map.get($system, on-surface-variant),
50
+ list-list-item-trailing-icon-color: map.get($system, on-surface-variant),
51
+ list-list-item-trailing-icon-size: 24px,
52
+ list-list-item-trailing-supporting-text-color: map.get($system, on-surface-variant),
53
+ list-list-item-selected-container-color: null,
54
+ list-list-item-hover-leading-icon-color: null,
55
+ list-list-item-hover-trailing-icon-color: null,
56
+ ),
57
+ typography: (
58
+ list-list-item-label-text-font: map.get($system, body-large-font),
59
+ list-list-item-label-text-line-height: map.get($system, body-large-line-height),
60
+ list-list-item-label-text-size: map.get($system, body-large-size),
61
+ list-list-item-label-text-tracking: map.get($system, body-large-tracking),
62
+ list-list-item-label-text-weight: map.get($system, body-large-weight),
63
+ list-list-item-supporting-text-font: map.get($system, body-medium-font),
64
+ list-list-item-supporting-text-line-height: map.get($system, body-medium-line-height),
65
+ list-list-item-supporting-text-size: map.get($system, body-medium-size),
66
+ list-list-item-supporting-text-tracking: map.get($system, body-medium-tracking),
67
+ list-list-item-supporting-text-weight: map.get($system, body-medium-weight),
68
+ list-list-item-trailing-supporting-text-font: map.get($system, label-small-font),
69
+ list-list-item-trailing-supporting-text-line-height:
70
+ map.get($system, label-small-line-height),
71
+ list-list-item-trailing-supporting-text-size: map.get($system, label-small-size),
72
+ list-list-item-trailing-supporting-text-tracking: map.get($system, label-small-tracking),
73
+ list-list-item-trailing-supporting-text-weight: map.get($system, label-small-weight),
74
+ ),
75
+ density: get-density-tokens(map.get($theme, inspection.$internals, density-scale)),
75
76
  );
76
-
77
- @return m3-utils.namespace($prefix, $tokens, $token-slots);
78
77
  }
79
78
 
80
79
  // Tokens that can be configured through Angular Material's density theming API.
81
- @function get-density-tokens($theme) {
82
- $scale: theming.clamp-density(inspection.get-theme-density($theme), -5);
80
+ @function get-density-tokens($scale) {
81
+ $scale: theming.clamp-density($scale, -5);
83
82
  $index: ($scale * -1) + 1;
84
83
 
85
84
  @return (
86
- list-item-leading-icon-start-space: list.nth((16px, 12px, 8px, 4px, 4px, 4px), $index),
87
- list-item-leading-icon-end-space: list.nth((16px, 12px, 8px, 4px, 4px, 4px), $index),
88
- list-item-one-line-container-height: list.nth((48px, 44px, 40px, 36px, 32px, 24px), $index),
89
- list-item-two-line-container-height: list.nth((64px, 60px, 56px, 52px, 48px, 48px), $index),
90
- list-item-three-line-container-height: list.nth((88px, 84px, 80px, 76px, 72px, 56px), $index),
85
+ list-list-item-leading-icon-start-space: list.nth((16px, 12px, 8px, 4px, 4px, 4px), $index),
86
+ list-list-item-leading-icon-end-space: list.nth((16px, 12px, 8px, 4px, 4px, 4px), $index),
87
+ list-list-item-one-line-container-height:
88
+ list.nth((48px, 44px, 40px, 36px, 32px, 24px), $index),
89
+ list-list-item-two-line-container-height:
90
+ list.nth((64px, 60px, 56px, 52px, 48px, 48px), $index),
91
+ list-list-item-three-line-container-height:
92
+ list.nth((88px, 84px, 80px, 76px, 72px, 56px), $index),
91
93
  );
92
94
  }
@@ -3,26 +3,23 @@
3
3
  @use '../core/style/sass-utils';
4
4
  @use '../core/style/elevation';
5
5
 
6
- // The prefix used to generate the fully qualified name for tokens in this file.
7
- $prefix: (mat, menu);
8
-
9
6
  // Tokens that can't be configured through Angular Material's current theming API,
10
7
  // but may be in a future version of the theming API.
11
8
  @function get-unthemable-tokens() {
12
9
  @return (
13
- container-shape: 4px,
14
- divider-bottom-spacing: 0,
15
- divider-top-spacing: 0,
16
- item-spacing: 16px,
17
- item-icon-size: 24px,
18
- item-leading-spacing: 16px,
19
- item-trailing-spacing: 16px,
20
- item-with-icon-leading-spacing: 16px,
21
- item-with-icon-trailing-spacing: 16px,
22
- container-elevation-shadow: elevation.get-box-shadow(8),
10
+ menu-container-shape: 4px,
11
+ menu-divider-bottom-spacing: 0,
12
+ menu-divider-top-spacing: 0,
13
+ menu-item-spacing: 16px,
14
+ menu-item-icon-size: 24px,
15
+ menu-item-leading-spacing: 16px,
16
+ menu-item-trailing-spacing: 16px,
17
+ menu-item-with-icon-leading-spacing: 16px,
18
+ menu-item-with-icon-trailing-spacing: 16px,
19
+ menu-container-elevation-shadow: elevation.get-box-shadow(8),
23
20
 
24
21
  // Unused
25
- base-elevation-level: null,
22
+ menu-base-elevation-level: null,
26
23
  );
27
24
  }
28
25
 
@@ -34,23 +31,23 @@ $prefix: (mat, menu);
34
31
  $text-color: inspection.get-theme-color($theme, foreground, text);
35
32
 
36
33
  @return (
37
- item-label-text-color: $text-color,
38
- item-icon-color: $text-color,
39
- item-hover-state-layer-color: $active-state-layer-color,
40
- item-focus-state-layer-color: $active-state-layer-color,
41
- container-color: inspection.get-theme-color($theme, background, card),
42
- divider-color: inspection.get-theme-color($theme, foreground, divider),
34
+ menu-item-label-text-color: $text-color,
35
+ menu-item-icon-color: $text-color,
36
+ menu-item-hover-state-layer-color: $active-state-layer-color,
37
+ menu-item-focus-state-layer-color: $active-state-layer-color,
38
+ menu-container-color: inspection.get-theme-color($theme, background, card),
39
+ menu-divider-color: inspection.get-theme-color($theme, foreground, divider),
43
40
  );
44
41
  }
45
42
 
46
43
  // Tokens that can be configured through Angular Material's typography theming API.
47
44
  @function get-typography-tokens($theme) {
48
45
  @return (
49
- item-label-text-font: inspection.get-theme-typography($theme, body-1, font-family),
50
- item-label-text-size: inspection.get-theme-typography($theme, body-1, font-size),
51
- item-label-text-tracking: inspection.get-theme-typography($theme, body-1, letter-spacing),
52
- item-label-text-line-height: inspection.get-theme-typography($theme, body-1, line-height),
53
- item-label-text-weight: inspection.get-theme-typography($theme, body-1, font-weight),
46
+ menu-item-label-text-font: inspection.get-theme-typography($theme, body-1, font-family),
47
+ menu-item-label-text-size: inspection.get-theme-typography($theme, body-1, font-size),
48
+ menu-item-label-text-tracking: inspection.get-theme-typography($theme, body-1, letter-spacing),
49
+ menu-item-label-text-line-height: inspection.get-theme-typography($theme, body-1, line-height),
50
+ menu-item-label-text-weight: inspection.get-theme-typography($theme, body-1, font-weight),
54
51
  );
55
52
  }
56
53