@angular/material 20.0.0-rc.1 → 20.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (336) 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/autocomplete/index.d.ts +2 -2
  5. package/badge/_badge-theme.scss +9 -35
  6. package/badge/_m2-badge.scss +32 -35
  7. package/badge/_m3-badge.scss +31 -32
  8. package/bottom-sheet/_bottom-sheet-theme.scss +16 -27
  9. package/bottom-sheet/_m2-bottom-sheet.scss +11 -11
  10. package/bottom-sheet/_m3-bottom-sheet.scss +18 -17
  11. package/button/_button-theme.scss +29 -46
  12. package/button/_fab-theme.scss +22 -41
  13. package/button/_icon-button-theme.scss +29 -46
  14. package/button/_m2-button.scss +135 -133
  15. package/button/_m2-fab.scss +51 -53
  16. package/button/_m2-icon-button.scss +14 -17
  17. package/button/_m3-button.scss +145 -240
  18. package/button/_m3-fab.scss +69 -166
  19. package/button/_m3-icon-button.scss +28 -56
  20. package/button-toggle/_button-toggle-theme.scss +23 -49
  21. package/button-toggle/_m2-button-toggle.scss +45 -37
  22. package/button-toggle/_m3-button-toggle.scss +53 -53
  23. package/card/_card-theme.scss +16 -37
  24. package/card/_m2-card.scss +24 -25
  25. package/card/_m3-card.scss +32 -36
  26. package/checkbox/_checkbox-theme.scss +25 -52
  27. package/checkbox/_m2-checkbox.scss +32 -35
  28. package/checkbox/_m3-checkbox.scss +49 -84
  29. package/chips/_chips-theme.scss +24 -44
  30. package/chips/_m2-chip.scss +47 -51
  31. package/chips/_m3-chip.scss +63 -110
  32. package/core/_core-theme.scss +58 -56
  33. package/core/_core.scss +15 -18
  34. package/core/_m2-app.scss +3 -7
  35. package/core/_m3-app.scss +37 -24
  36. package/core/index.d.ts +2 -2
  37. package/core/option/_m2-optgroup.scss +6 -9
  38. package/core/option/_m2-option.scss +10 -13
  39. package/core/option/_m3-optgroup.scss +16 -13
  40. package/core/option/_m3-option.scss +28 -48
  41. package/core/option/_optgroup-theme.scss +14 -25
  42. package/core/option/_option-theme.scss +22 -33
  43. package/core/ripple/_m2-ripple.scss +1 -4
  44. package/core/ripple/_m3-ripple.scss +11 -13
  45. package/core/ripple/_ripple-theme.scss +15 -33
  46. package/core/ripple/_ripple.scss +5 -5
  47. package/core/selection/pseudo-checkbox/_m2-pseudo-checkbox.scss +10 -11
  48. package/core/selection/pseudo-checkbox/_m3-pseudo-checkbox.scss +25 -40
  49. package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +16 -27
  50. package/core/style/_sass-utils.scss +0 -29
  51. package/core/theming/_color-api-backwards-compatibility.scss +46 -29
  52. package/core/theming/_definition.scss +6 -0
  53. package/core/theming/_inspection.scss +0 -25
  54. package/core/tokens/_m3-system.scss +19 -68
  55. package/core/tokens/_m3-tokens.scss +0 -128
  56. package/core/tokens/_m3-utils.scss +11 -83
  57. package/core/tokens/_token-utils.scss +52 -246
  58. package/core/tokens/m3/_index.scss +1 -0
  59. package/core/tokens/m3/_theme.scss +47 -0
  60. package/datepicker/_datepicker-theme.scss +24 -39
  61. package/datepicker/_m2-datepicker.scss +55 -50
  62. package/datepicker/_m3-datepicker.scss +65 -113
  63. package/datepicker/index.d.ts +9 -0
  64. package/dialog/_dialog-theme.scss +15 -27
  65. package/dialog/_m2-dialog.scss +25 -26
  66. package/dialog/_m3-dialog.scss +35 -35
  67. package/divider/_divider-theme.scss +14 -25
  68. package/divider/_m2-divider.scss +2 -5
  69. package/divider/_m3-divider.scss +13 -13
  70. package/expansion/_expansion-theme.scss +15 -33
  71. package/expansion/_m2-expansion.scss +28 -27
  72. package/expansion/_m3-expansion.scss +41 -36
  73. package/fesm2022/animation-DfMFjxHu.mjs.map +1 -1
  74. package/fesm2022/autocomplete/testing.mjs.map +1 -1
  75. package/fesm2022/autocomplete.mjs +23 -23
  76. package/fesm2022/autocomplete.mjs.map +1 -1
  77. package/fesm2022/badge/testing.mjs.map +1 -1
  78. package/fesm2022/badge.mjs +11 -11
  79. package/fesm2022/badge.mjs.map +1 -1
  80. package/fesm2022/bottom-sheet/testing.mjs.map +1 -1
  81. package/fesm2022/bottom-sheet.mjs +11 -11
  82. package/fesm2022/bottom-sheet.mjs.map +1 -1
  83. package/fesm2022/button/testing.mjs.map +1 -1
  84. package/fesm2022/button-toggle/testing.mjs.map +1 -1
  85. package/fesm2022/button-toggle.mjs +19 -23
  86. package/fesm2022/button-toggle.mjs.map +1 -1
  87. package/fesm2022/button.mjs +20 -20
  88. package/fesm2022/button.mjs.map +1 -1
  89. package/fesm2022/card/testing.mjs.map +1 -1
  90. package/fesm2022/card.mjs +47 -47
  91. package/fesm2022/card.mjs.map +1 -1
  92. package/fesm2022/checkbox/testing.mjs.map +1 -1
  93. package/fesm2022/checkbox.mjs +22 -22
  94. package/fesm2022/checkbox.mjs.map +1 -1
  95. package/fesm2022/chips/testing.mjs.map +1 -1
  96. package/fesm2022/chips.mjs +52 -52
  97. package/fesm2022/chips.mjs.map +1 -1
  98. package/fesm2022/{common-module-CF0eSYO4.mjs → common-module-cKSwHniA.mjs} +5 -5
  99. package/fesm2022/common-module-cKSwHniA.mjs.map +1 -0
  100. package/fesm2022/core/testing.mjs.map +1 -1
  101. package/fesm2022/core.mjs +24 -24
  102. package/fesm2022/core.mjs.map +1 -1
  103. package/fesm2022/date-formats-K6TQue-Y.mjs.map +1 -1
  104. package/fesm2022/date-range-input-harness-Bp1T4oUe.mjs.map +1 -1
  105. package/fesm2022/datepicker/testing.mjs.map +1 -1
  106. package/fesm2022/datepicker.mjs +154 -133
  107. package/fesm2022/datepicker.mjs.map +1 -1
  108. package/fesm2022/dialog/testing.mjs +18 -5
  109. package/fesm2022/dialog/testing.mjs.map +1 -1
  110. package/fesm2022/dialog.mjs +2 -2
  111. package/fesm2022/dialog.mjs.map +1 -1
  112. package/fesm2022/divider/testing.mjs.map +1 -1
  113. package/fesm2022/divider.mjs +8 -8
  114. package/fesm2022/divider.mjs.map +1 -1
  115. package/fesm2022/{error-options-CbAHLQL5.mjs → error-options-DCNQlTOA.mjs} +7 -7
  116. package/fesm2022/error-options-DCNQlTOA.mjs.map +1 -0
  117. package/fesm2022/error-state-Dtb1IHM-.mjs.map +1 -1
  118. package/fesm2022/expansion/testing.mjs.map +1 -1
  119. package/fesm2022/expansion.mjs +28 -28
  120. package/fesm2022/expansion.mjs.map +1 -1
  121. package/fesm2022/form-field/testing/control.mjs.map +1 -1
  122. package/fesm2022/form-field/testing.mjs.map +1 -1
  123. package/fesm2022/{form-field-sL9_TuE-.mjs → form-field-C9DZXojn.mjs} +33 -33
  124. package/fesm2022/form-field-C9DZXojn.mjs.map +1 -0
  125. package/fesm2022/form-field.mjs +3 -3
  126. package/fesm2022/form-field.mjs.map +1 -1
  127. package/fesm2022/grid-list/testing.mjs.map +1 -1
  128. package/fesm2022/grid-list.mjs +24 -24
  129. package/fesm2022/grid-list.mjs.map +1 -1
  130. package/fesm2022/icon/testing.mjs +8 -8
  131. package/fesm2022/icon/testing.mjs.map +1 -1
  132. package/fesm2022/{icon-button-BASP1JI8.mjs → icon-button-B2tPB5AH.mjs} +9 -9
  133. package/fesm2022/icon-button-B2tPB5AH.mjs.map +1 -0
  134. package/fesm2022/{icon-registry-DVLYRZv3.mjs → icon-registry-CwOTJ7YM.mjs} +4 -4
  135. package/fesm2022/icon-registry-CwOTJ7YM.mjs.map +1 -0
  136. package/fesm2022/icon.mjs +10 -10
  137. package/fesm2022/icon.mjs.map +1 -1
  138. package/fesm2022/index-BFRo2fUq.mjs +20 -0
  139. package/fesm2022/index-BFRo2fUq.mjs.map +1 -0
  140. package/fesm2022/index-DwiL-HGk.mjs +22 -0
  141. package/fesm2022/index-DwiL-HGk.mjs.map +1 -0
  142. package/fesm2022/input/testing.mjs.map +1 -1
  143. package/fesm2022/input-harness-oQzj5EsQ.mjs.map +1 -1
  144. package/fesm2022/input-value-accessor-D1GvPuqO.mjs.map +1 -1
  145. package/fesm2022/input.mjs +12 -12
  146. package/fesm2022/input.mjs.map +1 -1
  147. package/fesm2022/{internal-form-field-_OHaksOO.mjs → internal-form-field-D5iFxU6d.mjs} +4 -4
  148. package/fesm2022/internal-form-field-D5iFxU6d.mjs.map +1 -0
  149. package/fesm2022/{line-CtAKiRo6.mjs → line-Bz5f9Cyx.mjs} +9 -9
  150. package/fesm2022/line-Bz5f9Cyx.mjs.map +1 -0
  151. package/fesm2022/list/testing.mjs.map +1 -1
  152. package/fesm2022/list.mjs +66 -66
  153. package/fesm2022/list.mjs.map +1 -1
  154. package/fesm2022/material.mjs.map +1 -1
  155. package/fesm2022/menu/testing.mjs.map +1 -1
  156. package/fesm2022/menu.mjs +20 -20
  157. package/fesm2022/menu.mjs.map +1 -1
  158. package/fesm2022/{module-DqTK2swA.mjs → module-BDiw_nWS.mjs} +25 -19
  159. package/fesm2022/module-BDiw_nWS.mjs.map +1 -0
  160. package/fesm2022/{module-m5vWw9-5.mjs → module-CWxMD37a.mjs} +12 -12
  161. package/fesm2022/module-CWxMD37a.mjs.map +1 -0
  162. package/fesm2022/{module-ChwDH6BC.mjs → module-Ce6F7TNm.mjs} +28 -28
  163. package/fesm2022/module-Ce6F7TNm.mjs.map +1 -0
  164. package/fesm2022/{module-DToxyW7l.mjs → module-DzZHEh7B.mjs} +7 -7
  165. package/fesm2022/module-DzZHEh7B.mjs.map +1 -0
  166. package/fesm2022/{option-hkPAbXDN.mjs → option-BzhYL_xC.mjs} +15 -15
  167. package/fesm2022/option-BzhYL_xC.mjs.map +1 -0
  168. package/fesm2022/option-harness-BFcc-M_4.mjs.map +1 -1
  169. package/fesm2022/paginator/testing.mjs.map +1 -1
  170. package/fesm2022/paginator.mjs +25 -25
  171. package/fesm2022/paginator.mjs.map +1 -1
  172. package/fesm2022/progress-bar/testing.mjs.map +1 -1
  173. package/fesm2022/progress-bar.mjs +8 -8
  174. package/fesm2022/progress-bar.mjs.map +1 -1
  175. package/fesm2022/progress-spinner/testing.mjs.map +1 -1
  176. package/fesm2022/progress-spinner.mjs +8 -8
  177. package/fesm2022/progress-spinner.mjs.map +1 -1
  178. package/fesm2022/{pseudo-checkbox-Ddidc23S.mjs → pseudo-checkbox-DDmgx3P4.mjs} +4 -4
  179. package/fesm2022/pseudo-checkbox-DDmgx3P4.mjs.map +1 -0
  180. package/fesm2022/pseudo-checkbox-module-4F8Up4PL.mjs +20 -0
  181. package/fesm2022/pseudo-checkbox-module-4F8Up4PL.mjs.map +1 -0
  182. package/fesm2022/public-api-BoO5eSq-.mjs.map +1 -1
  183. package/fesm2022/radio/testing.mjs.map +1 -1
  184. package/fesm2022/radio.mjs +19 -16
  185. package/fesm2022/radio.mjs.map +1 -1
  186. package/fesm2022/{ripple-DUGA2BAa.mjs → ripple-BYgV4oZC.mjs} +7 -7
  187. package/fesm2022/ripple-BYgV4oZC.mjs.map +1 -0
  188. package/fesm2022/{ripple-loader-Xy4bv6Xh.mjs → ripple-loader-BnMiRtmT.mjs} +5 -5
  189. package/fesm2022/ripple-loader-BnMiRtmT.mjs.map +1 -0
  190. package/fesm2022/select/testing.mjs.map +1 -1
  191. package/fesm2022/select.mjs +12 -12
  192. package/fesm2022/select.mjs.map +1 -1
  193. package/fesm2022/sidenav/testing.mjs.map +1 -1
  194. package/fesm2022/sidenav.mjs +35 -31
  195. package/fesm2022/sidenav.mjs.map +1 -1
  196. package/fesm2022/slide-toggle/testing.mjs.map +1 -1
  197. package/fesm2022/slide-toggle.mjs +11 -11
  198. package/fesm2022/slide-toggle.mjs.map +1 -1
  199. package/fesm2022/slider/testing.mjs.map +1 -1
  200. package/fesm2022/slider.mjs +21 -21
  201. package/fesm2022/slider.mjs.map +1 -1
  202. package/fesm2022/snack-bar/testing.mjs.map +1 -1
  203. package/fesm2022/snack-bar.mjs +29 -29
  204. package/fesm2022/snack-bar.mjs.map +1 -1
  205. package/fesm2022/sort/testing.mjs.map +1 -1
  206. package/fesm2022/sort.mjs +15 -15
  207. package/fesm2022/sort.mjs.map +1 -1
  208. package/fesm2022/stepper/testing.mjs.map +1 -1
  209. package/fesm2022/stepper.mjs +39 -50
  210. package/fesm2022/stepper.mjs.map +1 -1
  211. package/fesm2022/{structural-styles-DA18Hchc.mjs → structural-styles-CObeNzjn.mjs} +4 -4
  212. package/fesm2022/structural-styles-CObeNzjn.mjs.map +1 -0
  213. package/fesm2022/table/testing.mjs.map +1 -1
  214. package/fesm2022/table.mjs +56 -56
  215. package/fesm2022/table.mjs.map +1 -1
  216. package/fesm2022/tabs/testing.mjs.map +1 -1
  217. package/fesm2022/tabs.mjs +81 -65
  218. package/fesm2022/tabs.mjs.map +1 -1
  219. package/fesm2022/timepicker/testing.mjs.map +1 -1
  220. package/fesm2022/timepicker.mjs +20 -20
  221. package/fesm2022/timepicker.mjs.map +1 -1
  222. package/fesm2022/toolbar/testing.mjs.map +1 -1
  223. package/fesm2022/toolbar.mjs +12 -12
  224. package/fesm2022/toolbar.mjs.map +1 -1
  225. package/fesm2022/tooltip/testing.mjs.map +1 -1
  226. package/fesm2022/tooltip.mjs +2 -2
  227. package/fesm2022/tooltip.mjs.map +1 -1
  228. package/fesm2022/tree/testing.mjs.map +1 -1
  229. package/fesm2022/tree.mjs +26 -26
  230. package/fesm2022/tree.mjs.map +1 -1
  231. package/form-field/_form-field-theme.scss +23 -55
  232. package/form-field/_m2-form-field.scss +112 -91
  233. package/form-field/_m3-form-field.scss +116 -131
  234. package/grid-list/_grid-list-theme.scss +13 -23
  235. package/grid-list/_m2-grid-list.scss +8 -7
  236. package/grid-list/_m3-grid-list.scss +14 -15
  237. package/icon/_icon-theme.scss +20 -30
  238. package/icon/_m2-icon.scss +1 -4
  239. package/icon/_m3-icon.scss +13 -27
  240. package/{index.d-CikM2bbf.d.ts → index.d-DAhBYbjm.d.ts} +1 -1
  241. package/input/_input-theme.scss +7 -40
  242. package/list/_list-theme.scss +22 -52
  243. package/list/_m2-list.scss +56 -55
  244. package/list/_m3-list.scss +69 -67
  245. package/menu/_m2-menu.scss +22 -25
  246. package/menu/_m3-menu.scss +35 -38
  247. package/menu/_menu-theme.scss +15 -27
  248. package/{module.d-DMabQ4_c.d.ts → module.d-bebo7gS5.d.ts} +5 -3
  249. package/package.json +6 -6
  250. package/paginator/_m2-paginator.scss +16 -17
  251. package/paginator/_m3-paginator.scss +28 -27
  252. package/paginator/_paginator-theme.scss +14 -40
  253. package/paginator/index.d.ts +3 -3
  254. package/prebuilt-themes/deeppurple-amber.css +1 -1
  255. package/prebuilt-themes/indigo-pink.css +1 -1
  256. package/prebuilt-themes/pink-bluegrey.css +1 -1
  257. package/prebuilt-themes/purple-green.css +1 -1
  258. package/progress-bar/_m2-progress-bar.scss +5 -8
  259. package/progress-bar/_m3-progress-bar.scss +17 -26
  260. package/progress-bar/_progress-bar-theme.scss +17 -27
  261. package/progress-spinner/_m2-progress-spinner.scss +3 -6
  262. package/progress-spinner/_m3-progress-spinner.scss +15 -22
  263. package/progress-spinner/_progress-spinner-theme.scss +20 -43
  264. package/radio/_m2-radio.scss +24 -27
  265. package/radio/_m3-radio.scss +44 -58
  266. package/radio/_radio-theme.scss +23 -50
  267. package/schematics/ng-add/index.js +2 -2
  268. package/schematics/ng-update/index_bundled.js +2 -0
  269. package/schematics/ng-update/index_bundled.js.map +1 -1
  270. package/select/_m2-select.scss +15 -18
  271. package/select/_m3-select.scss +32 -38
  272. package/select/_select-theme.scss +23 -50
  273. package/select/index.d.ts +3 -3
  274. package/sidenav/_m2-sidenav.scss +9 -12
  275. package/sidenav/_m3-sidenav.scss +20 -22
  276. package/sidenav/_sidenav-theme.scss +14 -25
  277. package/slide-toggle/_m2-slide-toggle.scss +82 -83
  278. package/slide-toggle/_m3-slide-toggle.scss +102 -143
  279. package/slide-toggle/_slide-toggle-theme.scss +26 -61
  280. package/slider/_m2-slider.scss +46 -46
  281. package/slider/_m3-slider.scss +54 -109
  282. package/slider/_slider-theme.scss +23 -34
  283. package/snack-bar/_m2-snack-bar.scss +10 -11
  284. package/snack-bar/_m3-snack-bar.scss +20 -19
  285. package/snack-bar/_snack-bar-theme.scss +14 -26
  286. package/sort/_m2-sort.scss +1 -4
  287. package/sort/_m3-sort.scss +11 -9
  288. package/sort/_sort-theme.scss +15 -27
  289. package/stepper/_m2-stepper.scss +32 -31
  290. package/stepper/_m3-stepper.scss +44 -79
  291. package/stepper/_stepper-theme.scss +22 -50
  292. package/stepper/index.d.ts +0 -3
  293. package/table/_m2-table.scss +25 -26
  294. package/table/_m3-table.scss +36 -27
  295. package/table/_table-theme.scss +15 -32
  296. package/tabs/_m2-tabs.scss +26 -29
  297. package/tabs/_m3-tabs.scss +40 -51
  298. package/tabs/_tabs-theme.scss +37 -58
  299. package/tabs/index.d.ts +11 -5
  300. package/timepicker/_m2-timepicker.scss +3 -6
  301. package/timepicker/_m3-timepicker.scss +14 -15
  302. package/timepicker/_timepicker-theme.scss +20 -45
  303. package/timepicker/index.d.ts +1 -1
  304. package/toolbar/_m2-toolbar.scss +11 -12
  305. package/toolbar/_m3-toolbar.scss +22 -17
  306. package/toolbar/_toolbar-theme.scss +13 -37
  307. package/tooltip/_m2-tooltip.scss +9 -11
  308. package/tooltip/_m3-tooltip.scss +19 -19
  309. package/tooltip/_tooltip-theme.scss +17 -35
  310. package/tree/_m2-tree.scss +6 -9
  311. package/tree/_m3-tree.scss +19 -16
  312. package/tree/_tree-theme.scss +14 -36
  313. package/fesm2022/common-module-CF0eSYO4.mjs.map +0 -1
  314. package/fesm2022/error-options-CbAHLQL5.mjs.map +0 -1
  315. package/fesm2022/form-field-sL9_TuE-.mjs.map +0 -1
  316. package/fesm2022/icon-button-BASP1JI8.mjs.map +0 -1
  317. package/fesm2022/icon-registry-DVLYRZv3.mjs.map +0 -1
  318. package/fesm2022/index-BNtCg9r0.mjs +0 -22
  319. package/fesm2022/index-BNtCg9r0.mjs.map +0 -1
  320. package/fesm2022/index-DxCSjCL3.mjs +0 -20
  321. package/fesm2022/index-DxCSjCL3.mjs.map +0 -1
  322. package/fesm2022/internal-form-field-_OHaksOO.mjs.map +0 -1
  323. package/fesm2022/line-CtAKiRo6.mjs.map +0 -1
  324. package/fesm2022/module-ChwDH6BC.mjs.map +0 -1
  325. package/fesm2022/module-DToxyW7l.mjs.map +0 -1
  326. package/fesm2022/module-DqTK2swA.mjs.map +0 -1
  327. package/fesm2022/module-m5vWw9-5.mjs.map +0 -1
  328. package/fesm2022/option-hkPAbXDN.mjs.map +0 -1
  329. package/fesm2022/pseudo-checkbox-Ddidc23S.mjs.map +0 -1
  330. package/fesm2022/pseudo-checkbox-module--am9-RIA.mjs +0 -20
  331. package/fesm2022/pseudo-checkbox-module--am9-RIA.mjs.map +0 -1
  332. package/fesm2022/ripple-DUGA2BAa.mjs.map +0 -1
  333. package/fesm2022/ripple-loader-Xy4bv6Xh.mjs.map +0 -1
  334. package/fesm2022/structural-styles-DA18Hchc.mjs.map +0 -1
  335. package/schematics/tsconfig.json +0 -26
  336. package/{option.d-BVGX3edu.d.ts → option.d-BcvS44bt.d.ts} +1 -1
@@ -1,44 +1,42 @@
1
1
  @use 'sass:map';
2
2
  @use './m2-optgroup';
3
+ @use './m3-optgroup';
3
4
  @use '../tokens/token-utils';
4
5
  @use '../style/sass-utils';
5
6
  @use '../theming/theming';
6
- @use '../theming/validation';
7
7
  @use '../theming/inspection';
8
8
  @use '../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-optgroup.get-tokens($theme), base));
13
13
  } @else {
14
14
  }
15
15
  }
16
16
 
17
17
  @mixin color($theme) {
18
18
  @if inspection.get-theme-version($theme) == 1 {
19
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
19
+ @include token-utils.create-token-values(map.get(m3-optgroup.get-tokens($theme), color));
20
20
  } @else {
21
21
  @include sass-utils.current-selector-or-root() {
22
- @include token-utils.create-token-values-mixed(
23
- m2-optgroup.$prefix, m2-optgroup.get-color-tokens($theme));
22
+ @include token-utils.create-token-values-mixed(m2-optgroup.get-color-tokens($theme));
24
23
  }
25
24
  }
26
25
  }
27
26
 
28
27
  @mixin typography($theme) {
29
28
  @if inspection.get-theme-version($theme) == 1 {
30
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
29
+ @include token-utils.create-token-values(map.get(m3-optgroup.get-tokens($theme), typography));
31
30
  } @else {
32
31
  @include sass-utils.current-selector-or-root() {
33
- @include token-utils.create-token-values-mixed(
34
- m2-optgroup.$prefix, m2-optgroup.get-typography-tokens($theme));
32
+ @include token-utils.create-token-values-mixed(m2-optgroup.get-typography-tokens($theme));
35
33
  }
36
34
  }
37
35
  }
38
36
 
39
37
  @mixin density($theme) {
40
38
  @if inspection.get-theme-version($theme) == 1 {
41
- // There are no M3 density tokens for this component
39
+ @include token-utils.create-token-values(map.get(m3-optgroup.get-tokens($theme), base));
42
40
  } @else {
43
41
  }
44
42
  }
@@ -47,20 +45,23 @@
47
45
  @function _define-overrides() {
48
46
  @return (
49
47
  (
50
- namespace: m2-optgroup.$prefix,
51
- tokens: m2-optgroup.get-token-slots(),
48
+ namespace: optgroup,
49
+ tokens: token-utils.get-overrides(m3-optgroup.get-tokens(), optgroup)
52
50
  ),
53
51
  );
54
52
  }
55
53
 
56
54
  @mixin overrides($tokens: ()) {
57
- @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
55
+ @include token-utils.batch-create-token-values($tokens, _define-overrides());
58
56
  }
59
57
 
60
58
  @mixin theme($theme) {
61
59
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-optgroup') {
62
60
  @if inspection.get-theme-version($theme) == 1 {
63
- @include _theme-from-tokens(inspection.get-theme-tokens($theme));
61
+ @include base($theme);
62
+ @include color($theme);
63
+ @include density($theme);
64
+ @include typography($theme);
64
65
  } @else {
65
66
  @include base($theme);
66
67
  @if inspection.theme-has($theme, color) {
@@ -75,15 +76,3 @@
75
76
  }
76
77
  }
77
78
  }
78
-
79
- @mixin _theme-from-tokens($tokens) {
80
- @include validation.selector-defined(
81
- 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
82
- );
83
- @if ($tokens != ()) {
84
- @include token-utils.create-token-values(
85
- m2-optgroup.$prefix,
86
- map.get($tokens, m2-optgroup.$prefix)
87
- );
88
- }
89
- }
@@ -1,43 +1,40 @@
1
1
  @use './m2-option';
2
+ @use './m3-option';
2
3
  @use '../tokens/token-utils';
3
4
  @use '../style/sass-utils';
4
5
  @use '../theming/theming';
5
6
  @use '../theming/inspection';
6
- @use '../theming/validation';
7
7
  @use '../typography/typography';
8
+ @use 'sass:map';
8
9
 
9
10
  /// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
10
11
  /// for the mat-option.
11
12
  /// @param {Map} $theme The theme to generate base styles for.
12
13
  @mixin base($theme) {
13
14
  @if inspection.get-theme-version($theme) == 1 {
14
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
15
+ @include token-utils.create-token-values(map.get(m3-option.get-tokens($theme), base));
15
16
  } @else {
16
17
  }
17
18
  }
18
19
 
19
20
  /// Outputs color theme styles for the mat-option.
20
21
  /// @param {Map} $theme The theme to generate color styles for.
21
- /// @param {ArgList} Additional optional arguments (only supported for M3 themes):
22
- /// $color-variant: The color variant to use for the selected option: primary, secondary,
23
- /// tertiary, or error (If not specified, default secondary color will be used).
24
- @mixin color($theme, $options...) {
22
+ /// @param {String} $color-variant The color variant to use for the component (M3 only)
23
+ @mixin color($theme, $color-variant: null) {
25
24
  @if inspection.get-theme-version($theme) == 1 {
26
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
25
+ @include token-utils.create-token-values(
26
+ map.get(m3-option.get-tokens($theme, $color-variant), color));
27
27
  } @else {
28
28
  @include sass-utils.current-selector-or-root() {
29
- @include token-utils.create-token-values-mixed(
30
- m2-option.$prefix, m2-option.get-color-tokens($theme));
29
+ @include token-utils.create-token-values-mixed(m2-option.get-color-tokens($theme));
31
30
  }
32
31
 
33
32
  .mat-accent {
34
- @include token-utils.create-token-values-mixed(
35
- m2-option.$prefix, m2-option.get-color-tokens($theme, accent));
33
+ @include token-utils.create-token-values-mixed(m2-option.get-color-tokens($theme, accent));
36
34
  }
37
35
 
38
36
  .mat-warn {
39
- @include token-utils.create-token-values-mixed(
40
- m2-option.$prefix, m2-option.get-color-tokens($theme, warn));
37
+ @include token-utils.create-token-values-mixed(m2-option.get-color-tokens($theme, warn));
41
38
  }
42
39
  }
43
40
  }
@@ -46,11 +43,10 @@
46
43
  /// @param {Map} $theme The theme to generate typography styles for.
47
44
  @mixin typography($theme) {
48
45
  @if inspection.get-theme-version($theme) == 1 {
49
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
46
+ @include token-utils.create-token-values(map.get(m3-option.get-tokens($theme), typography));
50
47
  } @else {
51
48
  @include sass-utils.current-selector-or-root() {
52
- @include token-utils.create-token-values-mixed(
53
- m2-option.$prefix, m2-option.get-typography-tokens($theme));
49
+ @include token-utils.create-token-values-mixed(m2-option.get-typography-tokens($theme));
54
50
  }
55
51
  }
56
52
  }
@@ -59,7 +55,7 @@
59
55
  /// @param {Map} $theme The theme to generate density styles for.
60
56
  @mixin density($theme) {
61
57
  @if inspection.get-theme-version($theme) == 1 {
62
- // There are no M3 density tokens for this component
58
+ @include token-utils.create-token-values(map.get(m3-option.get-tokens($theme), density));
63
59
  } @else {
64
60
  }
65
61
  }
@@ -68,8 +64,8 @@
68
64
  @function _define-overrides() {
69
65
  @return (
70
66
  (
71
- namespace: m2-option.$prefix,
72
- tokens: m2-option.get-token-slots(),
67
+ namespace: option,
68
+ tokens: token-utils.get-overrides(m3-option.get-tokens(), option)
73
69
  ),
74
70
  );
75
71
  }
@@ -77,18 +73,19 @@
77
73
  /// Outputs the CSS variable values for the given tokens.
78
74
  /// @param {Map} $tokens The token values to emit.
79
75
  @mixin overrides($tokens: ()) {
80
- @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
76
+ @include token-utils.batch-create-token-values($tokens, _define-overrides());
81
77
  }
82
78
 
83
79
  /// Outputs all (base, color, typography, and density) theme styles for the mat-option.
84
80
  /// @param {Map} $theme The theme to generate styles for.
85
- /// @param {ArgList} Additional optional arguments (only supported for M3 themes):
86
- /// $color-variant: The color variant to use for the selected option: primary, secondary,
87
- /// tertiary, or error (If not specified, default secondary color will be used).
88
- @mixin theme($theme, $options...) {
81
+ /// @param {String} $color-variant The color variant to use for the component (M3 only)
82
+ @mixin theme($theme, $color-variant: null) {
89
83
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-option') {
90
84
  @if inspection.get-theme-version($theme) == 1 {
91
- @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);
85
+ @include base($theme);
86
+ @include color($theme, $color-variant);
87
+ @include density($theme);
88
+ @include typography($theme);
92
89
  } @else {
93
90
  @include base($theme);
94
91
  @if inspection.theme-has($theme, color) {
@@ -103,11 +100,3 @@
103
100
  }
104
101
  }
105
102
  }
106
-
107
- @mixin _theme-from-tokens($tokens, $options...) {
108
- @include validation.selector-defined(
109
- 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
110
- );
111
- $mat-option-tokens: token-utils.get-tokens-for($tokens, m2-option.$prefix, $options...);
112
- @include token-utils.create-token-values(m2-option.$prefix, $mat-option-tokens);
113
- }
@@ -3,9 +3,6 @@
3
3
  @use '../theming/inspection';
4
4
  @use '../style/sass-utils';
5
5
 
6
- // The prefix used to generate the fully qualified name for tokens in this file.
7
- $prefix: (mat, ripple);
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() {
@@ -23,7 +20,7 @@ $prefix: (mat, ripple);
23
20
  $color: if(meta.type-of($base) == color, $base, if($is-dark, #fff, #000));
24
21
 
25
22
  @return (
26
- color: rgba($color, 0.1),
23
+ ripple-color: rgba($color, 0.1),
27
24
  );
28
25
  }
29
26
 
@@ -1,19 +1,17 @@
1
1
  @use 'sass:map';
2
- @use '../style/sass-utils';
3
2
  @use '../tokens/m3-utils';
4
-
5
- // The prefix used to generate the fully qualified name for tokens in this file.
6
- $prefix: (mat, ripple);
3
+ @use '../tokens/m3';
7
4
 
8
5
  /// Generates custom tokens for the mat-ripple.
9
- /// @param {Map} $systems The MDC system tokens
10
- /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
11
- /// @param {Map} $token-slots Possible token slots
12
- /// @return {Map} A set of custom tokens for the mat-ripple
13
- @function get-tokens($systems, $exclude-hardcoded, $token-slots) {
14
- $tokens: (
15
- color: sass-utils.safe-color-change(map.get($systems, md-sys-color, on-surface), $alpha: 0.1),
16
- );
6
+ @function get-tokens($theme: m3.$sys-theme) {
7
+ $system: m3-utils.get-system($theme);
17
8
 
18
- @return m3-utils.namespace($prefix, $tokens, $token-slots);
9
+ @return (
10
+ base: (),
11
+ color: (
12
+ ripple-color: m3-utils.color-with-opacity(map.get($system, on-surface), 10%),
13
+ ),
14
+ typography: (),
15
+ density: (),
16
+ );
19
17
  }
@@ -1,53 +1,44 @@
1
1
  @use 'sass:map';
2
2
  @use './m2-ripple';
3
+ @use './m3-ripple';
3
4
  @use '../tokens/token-utils';
4
5
  @use '../style/sass-utils';
5
6
  @use '../theming/theming';
6
7
  @use '../theming/inspection';
7
- @use '../theming/validation';
8
8
 
9
9
  @mixin base($theme) {
10
10
  @if inspection.get-theme-version($theme) == 1 {
11
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
11
+ @include token-utils.create-token-values(map.get(m3-ripple.get-tokens($theme), base));
12
12
  } @else {
13
13
  }
14
14
  }
15
15
 
16
16
  @mixin color($theme) {
17
17
  @if inspection.get-theme-version($theme) == 1 {
18
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
18
+ @include token-utils.create-token-values(map.get(m3-ripple.get-tokens($theme), color));
19
19
  } @else {
20
20
  @include sass-utils.current-selector-or-root() {
21
- @include token-utils.create-token-values-mixed(
22
- m2-ripple.$prefix,
23
- m2-ripple.get-color-tokens($theme)
24
- );
21
+ @include token-utils.create-token-values-mixed(m2-ripple.get-color-tokens($theme));
25
22
  }
26
23
  }
27
24
  }
28
25
 
29
26
  @mixin typography($theme) {
30
27
  @if inspection.get-theme-version($theme) == 1 {
31
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
28
+ @include token-utils.create-token-values(map.get(m3-ripple.get-tokens($theme), typography));
32
29
  } @else {
33
30
  @include sass-utils.current-selector-or-root() {
34
- @include token-utils.create-token-values-mixed(
35
- m2-ripple.$prefix,
36
- m2-ripple.get-typography-tokens($theme)
37
- );
31
+ @include token-utils.create-token-values-mixed(m2-ripple.get-typography-tokens($theme));
38
32
  }
39
33
  }
40
34
  }
41
35
 
42
36
  @mixin density($theme) {
43
37
  @if inspection.get-theme-version($theme) == 1 {
44
- // There are no M3 density tokens for this component
38
+ @include token-utils.create-token-values(map.get(m3-ripple.get-tokens($theme), density));
45
39
  } @else {
46
40
  @include sass-utils.current-selector-or-root() {
47
- @include token-utils.create-token-values-mixed(
48
- m2-ripple.$prefix,
49
- m2-ripple.get-density-tokens($theme)
50
- );
41
+ @include token-utils.create-token-values-mixed(m2-ripple.get-density-tokens($theme));
51
42
  }
52
43
  }
53
44
  }
@@ -56,20 +47,23 @@
56
47
  @function _define-overrides() {
57
48
  @return (
58
49
  (
59
- namespace: m2-ripple.$prefix,
60
- tokens: m2-ripple.get-token-slots(),
50
+ namespace: ripple,
51
+ tokens: token-utils.get-overrides(m3-ripple.get-tokens(), ripple)
61
52
  ),
62
53
  );
63
54
  }
64
55
 
65
56
  @mixin overrides($tokens: ()) {
66
- @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
57
+ @include token-utils.batch-create-token-values($tokens, _define-overrides());
67
58
  }
68
59
 
69
60
  @mixin theme($theme) {
70
61
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-ripple') {
71
62
  @if inspection.get-theme-version($theme) == 1 {
72
- @include _theme-from-tokens(inspection.get-theme-tokens($theme));
63
+ @include base($theme);
64
+ @include color($theme);
65
+ @include density($theme);
66
+ @include typography($theme);
73
67
  } @else {
74
68
  @include base($theme);
75
69
  @if inspection.theme-has($theme, color) {
@@ -84,15 +78,3 @@
84
78
  }
85
79
  }
86
80
  }
87
-
88
- @mixin _theme-from-tokens($tokens) {
89
- @include validation.selector-defined(
90
- 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
91
- );
92
- @if ($tokens != ()) {
93
- @include token-utils.create-token-values(
94
- m2-ripple.$prefix,
95
- map.get($tokens, m2-ripple.$prefix)
96
- );
97
- }
98
- }
@@ -1,7 +1,9 @@
1
1
  @use '@angular/cdk';
2
- @use './m2-ripple';
2
+ @use './m3-ripple';
3
3
  @use '../tokens/token-utils';
4
4
 
5
+ $fallbacks: m3-ripple.get-tokens();
6
+
5
7
  @mixin ripple() {
6
8
  // The host element of an mat-ripple directive should always have a position of "absolute" or
7
9
  // "relative" so that the ripples inside are correctly positioned relatively to the container.
@@ -37,10 +39,8 @@
37
39
  // the ripples aren't clipped when inside the shadow DOM (see #24028).
38
40
  transform: scale3d(0, 0, 0);
39
41
 
40
- @include token-utils.use-tokens(m2-ripple.$prefix, m2-ripple.get-token-slots()) {
41
- // We have to emit a fallback value here, because some internal builds depend on it.
42
- background-color: token-utils.slot(color, $fallback: rgba(#000, 0.1));
43
- }
42
+ // We have to emit a fallback value here, because some internal builds depend on it.
43
+ background-color: token-utils.slot(ripple-color, $fallbacks, $fallback: rgba(#000, 0.1));
44
44
 
45
45
  // In high contrast mode the ripple is opaque, causing it to obstruct the content.
46
46
  @include cdk.high-contrast {
@@ -2,9 +2,6 @@
2
2
  @use '../../theming/inspection';
3
3
  @use '../../style/sass-utils';
4
4
 
5
- // The prefix used to generate the fully qualified name for tokens in this file.
6
- $prefix: (mat, pseudo-checkbox);
7
-
8
5
  // Tokens that can't be configured through Angular Material's current theming API,
9
6
  // but may be in a future version of the theming API.
10
7
  @function get-unthemable-tokens() {
@@ -18,14 +15,16 @@ $prefix: (mat, pseudo-checkbox);
18
15
  $checkmark-color: inspection.get-theme-color($theme, background, background);
19
16
 
20
17
  @return (
21
- full-selected-icon-color: inspection.get-theme-color($theme, $palette-name),
22
- full-selected-checkmark-color: $checkmark-color,
23
- full-unselected-icon-color: inspection.get-theme-color($theme, foreground, secondary-text),
24
- full-disabled-selected-checkmark-color: $checkmark-color,
25
- full-disabled-unselected-icon-color: $disabled-color,
26
- full-disabled-selected-icon-color: $disabled-color,
27
- minimal-selected-checkmark-color: inspection.get-theme-color($theme, $palette-name),
28
- minimal-disabled-selected-checkmark-color: if($is-dark, #686868, #b0b0b0),
18
+ pseudo-checkbox-full-selected-icon-color: inspection.get-theme-color($theme, $palette-name),
19
+ pseudo-checkbox-full-selected-checkmark-color: $checkmark-color,
20
+ pseudo-checkbox-full-unselected-icon-color:
21
+ inspection.get-theme-color($theme, foreground, secondary-text),
22
+ pseudo-checkbox-full-disabled-selected-checkmark-color: $checkmark-color,
23
+ pseudo-checkbox-full-disabled-unselected-icon-color: $disabled-color,
24
+ pseudo-checkbox-full-disabled-selected-icon-color: $disabled-color,
25
+ pseudo-checkbox-minimal-selected-checkmark-color:
26
+ inspection.get-theme-color($theme, $palette-name),
27
+ pseudo-checkbox-minimal-disabled-selected-checkmark-color: if($is-dark, #686868, #b0b0b0),
29
28
  );
30
29
  }
31
30
 
@@ -1,49 +1,34 @@
1
1
  @use 'sass:map';
2
- @use '../../style/sass-utils';
3
2
  @use '../../tokens/m3-utils';
4
-
5
- // The prefix used to generate the fully qualified name for tokens in this file.
6
- $prefix: (mat, pseudo-checkbox);
3
+ @use '../../tokens/m3';
7
4
 
8
5
  /// Generates custom tokens for the full variant of mat-pseudo-checkbox.
9
- /// @param {Map} $systems The MDC system tokens
10
- /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
11
- /// @param {Map} $token-slots Possible token slots
12
- /// @return {Map} A set of custom tokens for the full variant of mat-pseudo-checkbox
13
- @function get-tokens($systems, $exclude-hardcoded, $token-slots) {
14
- $tokens: (
15
- full-disabled-selected-checkmark-color: map.get($systems, md-sys-color, surface),
16
- full-disabled-selected-icon-color: sass-utils.safe-color-change(
17
- map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
18
- full-disabled-unselected-icon-color: sass-utils.safe-color-change(
19
- map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
20
- full-selected-checkmark-color: map.get($systems, md-sys-color, on-primary),
21
- full-selected-icon-color: map.get($systems, md-sys-color, primary),
22
- full-unselected-icon-color: map.get($systems, md-sys-color, on-surface-variant),
23
- minimal-disabled-selected-checkmark-color: sass-utils.safe-color-change(
24
- map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
25
- minimal-selected-checkmark-color: map.get($systems, md-sys-color, primary),
26
- );
6
+ /// @param {String} $color-variant The color variant to use for the component (M3 only)
7
+ @function get-tokens($theme: m3.$sys-theme, $color-variant: null) {
8
+ $system: m3-utils.get-system($theme);
9
+ @if $color-variant {
10
+ $system: m3-utils.replace-colors-with-variant($system, primary, $color-variant);
11
+ }
27
12
 
28
- $variant-tokens: (
29
- // Color variants:
30
- primary: (), // Default, no overrides needed.
31
- secondary: (
32
- full-selected-checkmark-color: map.get($systems, md-sys-color, on-secondary),
33
- full-selected-icon-color: map.get($systems, md-sys-color, secondary),
34
- minimal-selected-checkmark-color: map.get($systems, md-sys-color, secondary),
13
+ @return (
14
+ base: (),
15
+ color: (
16
+ pseudo-checkbox-full-disabled-selected-checkmark-color: map.get($system, surface),
17
+ pseudo-checkbox-full-disabled-selected-icon-color:
18
+ m3-utils.color-with-opacity(map.get($system, on-surface), 38%),
19
+ pseudo-checkbox-full-disabled-unselected-icon-color:
20
+ m3-utils.color-with-opacity(map.get($system, on-surface), 38%),
21
+ pseudo-checkbox-full-selected-checkmark-color: map.get($system, on-primary),
22
+ pseudo-checkbox-full-selected-icon-color: map.get($system, primary),
23
+ pseudo-checkbox-full-unselected-icon-color: map.get($system, on-surface-variant),
24
+ pseudo-checkbox-minimal-disabled-selected-checkmark-color:
25
+ m3-utils.color-with-opacity(map.get($system, on-surface), 38%),
26
+ pseudo-checkbox-minimal-selected-checkmark-color: map.get($system, primary),
35
27
  ),
36
- tertiary: (
37
- full-selected-checkmark-color: map.get($systems, md-sys-color, on-tertiary),
38
- full-selected-icon-color: map.get($systems, md-sys-color, tertiary),
39
- minimal-selected-checkmark-color: map.get($systems, md-sys-color, tertiary),
40
- ),
41
- error: (
42
- full-selected-checkmark-color: map.get($systems, md-sys-color, on-error),
43
- full-selected-icon-color: map.get($systems, md-sys-color, error),
44
- minimal-selected-checkmark-color: map.get($systems, md-sys-color, error),
45
- )
28
+ typography: (),
29
+ density: (),
46
30
  );
47
31
 
48
- @return m3-utils.namespace($prefix, ($tokens, $variant-tokens), $token-slots);
32
+ $tokens: (
33
+ );
49
34
  }
@@ -1,29 +1,18 @@
1
1
  @use '../../theming/theming';
2
2
  @use '../../theming/inspection';
3
- @use '../../theming/validation';
4
3
  @use '../../style/sass-utils';
5
4
  @use '../../tokens/token-utils';
6
5
  @use './m2-pseudo-checkbox';
6
+ @use './m3-pseudo-checkbox';
7
+ @use 'sass:map';
7
8
 
8
9
  @mixin _palette-styles($theme, $palette-name) {
9
10
  @include sass-utils.current-selector-or-root() {
10
11
  @include token-utils.create-token-values-mixed(
11
- m2-pseudo-checkbox.$prefix,
12
- m2-pseudo-checkbox.get-color-tokens($theme, $palette-name)
13
- );
12
+ m2-pseudo-checkbox.get-color-tokens($theme, $palette-name));
14
13
  }
15
14
  }
16
15
 
17
- @mixin _theme-from-tokens($tokens, $options...) {
18
- @include validation.selector-defined(
19
- 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
20
- );
21
- $mat-pseudo-checkbox-tokens: token-utils.get-tokens-for(
22
- $tokens, m2-pseudo-checkbox.$prefix, $options...);
23
- @include token-utils.create-token-values-mixed(
24
- m2-pseudo-checkbox.$prefix, $mat-pseudo-checkbox-tokens);
25
- }
26
-
27
16
  /// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
28
17
  /// for the mat-pseudo-checkbox.
29
18
  /// @param {Map} $theme The theme to generate base styles for.
@@ -34,8 +23,8 @@
34
23
  @function _define-overrides() {
35
24
  @return (
36
25
  (
37
- namespace: m2-pseudo-checkbox.$prefix,
38
- tokens: m2-pseudo-checkbox.get-token-slots(),
26
+ namespace: pseudo-checkbox,
27
+ tokens: token-utils.get-overrides(m3-pseudo-checkbox.get-tokens(), pseudo-checkbox)
39
28
  ),
40
29
  );
41
30
  }
@@ -43,17 +32,16 @@
43
32
  /// Outputs the CSS variable values for the given tokens.
44
33
  /// @param {Map} $tokens The token values to emit.
45
34
  @mixin overrides($tokens: ()) {
46
- @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
35
+ @include token-utils.batch-create-token-values($tokens, _define-overrides());
47
36
  }
48
37
 
49
38
  /// Outputs color theme styles for the mat-pseudo-checkbox.
50
39
  /// @param {Map} $theme The theme to generate color styles for.
51
- /// @param {ArgList} Additional optional arguments (only supported for M3 themes):
52
- /// $color-variant: The color variant to use for the pseudo-checkbox: primary, secondary,
53
- /// tertiary, or error (If not specified, default primary color will be used).
54
- @mixin color($theme, $options...) {
40
+ /// @param {String} $color-variant The color variant to use for the component (M3 only)
41
+ @mixin color($theme, $color-variant: null) {
55
42
  @if inspection.get-theme-version($theme) == 1 {
56
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
43
+ @include token-utils.create-token-values(
44
+ map.get(m3-pseudo-checkbox.get-tokens($theme, $color-variant), color));
57
45
  } @else {
58
46
  // Default to the accent color. Note that the pseudo checkboxes are meant to inherit the
59
47
  // theme from their parent, rather than implementing their own theming, which is why we
@@ -88,13 +76,14 @@
88
76
 
89
77
  /// Outputs all (base, color, typography, and density) theme styles for the mat-pseudo-checkbox.
90
78
  /// @param {Map} $theme The theme to generate styles for.
91
- /// @param {ArgList} Additional optional arguments (only supported for M3 themes):
92
- /// $color-variant: The color variant to use for the pseudo-checkbox: primary, secondary,
93
- /// tertiary, or error (If not specified, default primary color will be used).
94
- @mixin theme($theme, $options...) {
79
+ /// @param {String} $color-variant The color variant to use for the component (M3 only)
80
+ @mixin theme($theme, $color-variant: null) {
95
81
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-pseudo-checkbox') {
96
82
  @if inspection.get-theme-version($theme) == 1 {
97
- @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);
83
+ @include base($theme);
84
+ @include color($theme, $color-variant);
85
+ @include density($theme);
86
+ @include typography($theme);
98
87
  } @else {
99
88
  @include base($theme);
100
89
  @if inspection.theme-has($theme, color) {
@@ -1,6 +1,5 @@
1
1
  @use 'sass:color';
2
2
  @use 'sass:string';
3
- @use 'sass:list';
4
3
  @use 'sass:map';
5
4
  @use 'sass:meta';
6
5
 
@@ -52,16 +51,6 @@ $use-system-typography-variables: false;
52
51
  @return $result;
53
52
  }
54
53
 
55
- /// Coerces the given value to a list, by converting any non-list value into a single-item list.
56
- /// This should be used when dealing with user-passed lists of args to avoid confusing errors,
57
- /// since Sass treats `($x)` as equivalent to `$x`.
58
- /// @param {Any} $value The value to coerce to a list.
59
- /// @return {List} The original $value if it was a list, otherwise a single-item list containing
60
- /// $value.
61
- @function coerce-to-list($value) {
62
- @return if(meta.type-of($value) != 'list', ($value,), $value);
63
- }
64
-
65
54
  /// A version of the Sass `color.change` function that is safe ot use with CSS variables.
66
55
  @function safe-color-change($color, $args...) {
67
56
  $args: meta.keywords($args);
@@ -90,24 +79,6 @@ $use-system-typography-variables: false;
90
79
  @return $color;
91
80
  }
92
81
 
93
- /// Gets the given arguments as a map of keywords and validates that only supported arguments were
94
- /// passed.
95
- /// @param {ArgList} $args The arguments to convert to a keywords map.
96
- /// @param {List} $supported-args The supported argument names.
97
- /// @return {Map} The $args as a map of argument name to argument value.
98
- @function validate-keyword-args($args, $supported-args) {
99
- @if list.length($args) > 0 {
100
- @error #{'Expected keyword args, but got positional args: '}#{$args};
101
- }
102
- $kwargs: meta.keywords($args);
103
- @each $arg, $v in $kwargs {
104
- @if list.index($supported-args, $arg) == null {
105
- @error #{'Unsupported argument '}#{$arg}#{'. Valid arguments are: '}#{$supported-args};
106
- }
107
- }
108
- @return $kwargs;
109
- }
110
-
111
82
  // Returns whether the $value is a CSS variable name based on whether it's a string prefixed
112
83
  // by "--".
113
84
  @function is-css-var-name($value) {