@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,55 +1,8 @@
1
- @use '../style/elevation';
2
1
  @use '../style/sass-utils';
3
- @use './m3-system';
4
2
  @use 'sass:list';
5
- @use 'sass:meta';
6
3
  @use 'sass:map';
7
4
  @use 'sass:string';
8
5
 
9
- $_tokens: null;
10
- $_component-prefix: null;
11
- $_system-fallbacks: m3-system.create-system-fallbacks();
12
- $_direct-system-fallbacks: ();
13
-
14
- // Sets the token prefix and map to use when creating token slots.
15
- @mixin use-tokens($prefix, $tokens, $direct-system-fallbacks: null) {
16
- $_component-prefix: $prefix !global;
17
- $_tokens: $tokens !global;
18
-
19
- // Direct system fallbacks are a map of base, color, typography, and density tokens. To simplify
20
- // lookup, flatten these token groups into a single map.
21
- @if $direct-system-fallbacks {
22
- $_direct-system-fallbacks: () !global;
23
- @each $tokens in map.values($direct-system-fallbacks) {
24
- @each $token, $value in $tokens {
25
- $_direct-system-fallbacks: map.set($_direct-system-fallbacks, $token, $value) !global;
26
- }
27
- }
28
- }
29
-
30
- @content;
31
-
32
- $_component-prefix: null !global;
33
- $_tokens: null !global;
34
- $_direct-system-fallbacks: () !global;
35
- }
36
-
37
- // Combines a prefix and a string to generate a CSS variable name for a token.
38
- @function _create-var-name($prefix, $token) {
39
- @if $prefix == null or $token == null {
40
- @error 'Must specify both prefix and name when generating token';
41
- }
42
-
43
- $string-prefix: '';
44
-
45
- // Prefixes are lists so we need to combine them.
46
- @each $part in $prefix {
47
- $string-prefix: if($string-prefix == '', $part, '#{$string-prefix}-#{$part}');
48
- }
49
-
50
- @return string.unquote('--#{$string-prefix}-#{$token}');
51
- }
52
-
53
6
  // Creates a CSS variable, including the fallback if provided.
54
7
  @function _create-var($name, $fallback: null) {
55
8
  @if ($fallback) {
@@ -59,194 +12,98 @@ $_direct-system-fallbacks: ();
59
12
  }
60
13
  }
61
14
 
62
- // Gets the value of the token given the current global context state.
63
- @function _get-token-value($token, $fallback) {
64
- $var-name: _create-var-name($_component-prefix, $token);
65
- $fallback: _get-token-fallback($token, $fallback);
66
- @return _create-var($var-name, $fallback);
15
+ // Returns a list of overrides for the given M3 get-tokens mixin and prefix. Each token has its
16
+ // prefix removed since the overrides API expects its absence. The returned map includes "all" for
17
+ // all override tokens, and also the subsets with keys base, color, typography, and density.
18
+ @function get-overrides($tokens, $prefix) {
19
+ $base: remove-token-prefixes(map.get($tokens, base), $prefix);
20
+ $color: remove-token-prefixes(map.get($tokens, color), $prefix);
21
+ $typography: remove-token-prefixes(map.get($tokens, typography), $prefix);
22
+ $density: remove-token-prefixes(map.get($tokens, density), $prefix);
23
+ $all: ();
24
+ @each $map in ($base, $color, $typography, $density) {
25
+ $all: map.merge($all, $map);
26
+ }
27
+
28
+ @return (
29
+ all: $all,
30
+ base: $base,
31
+ color: $color,
32
+ typography: $typography,
33
+ density: $density,
34
+ );
67
35
  }
68
36
 
69
- // Assertion mixin that throws an error if the global state has not been set up by wrapping
70
- // calls with `use-tokens`.
71
- @function _assert-use-tokens($token) {
72
- @if $_component-prefix == null or $_tokens == null {
73
- @error 'Function was not called within a wrapping call of `use-tokens`';
37
+ // Removes a prefix from each component token in the provided map of prefixed tokens.
38
+ @function remove-token-prefixes($prefixed-tokens: (), $prefix) {
39
+ $tokens: ();
40
+ @each $prefixed-token, $value in $prefixed-tokens {
41
+ $token: string.slice($prefixed-token, string.length($prefix) + 2);
42
+ $tokens: map.set($tokens, $token, $value);
74
43
  }
75
- @if not map.has-key($_tokens, $token) {
76
- @error 'Token #{$token} does not exist. Configured tokens are: #{map.keys($_tokens)}';
77
- }
78
-
79
- @return true;
44
+ @return $tokens;
80
45
  }
81
46
 
82
47
  // Returns the token slot value.
83
48
  // Accepts an optional fallback parameter to include in the CSS variable.
84
49
  // If $fallback is `true`, then use the tokens map to get the fallback.
85
- // TODO: Remove the use case where we accept "true" and handle any failing client screenshots
86
- @function slot($token, $fallback: null) {
87
- $_assert: _assert-use-tokens($token);
88
- @return _get-token-value($token, $fallback);
89
- }
90
-
91
- // Returns the name of a token including the current prefix. Intended to be used in calculations
92
- // involving tokens. `create-token-slot` should be used when outputting tokens.
93
- @function get-token-variable-name($token) {
94
- $_assert: _assert-use-tokens($token);
95
- @return _create-var-name($_component-prefix, $token);
96
- }
97
-
98
- // Gets the token's fallback value. Prefers adding a system-level fallback if one exists, otherwise
99
- // use the provided fallback.
100
- @function _get-token-fallback($token, $fallback: null) {
101
- // If the $fallback is `true`, this is the component's signal to use the current token map value
102
- @if ($fallback == true) {
103
- $fallback: map.get($_tokens, $token);
104
- }
105
-
106
- $direct-sys-fallback: map.get($_direct-system-fallbacks, $token);
107
- @if ($direct-sys-fallback) {
108
- @if (sass-utils.is-css-var-name($direct-sys-fallback)) {
109
- @return _create-var($direct-sys-fallback, $fallback);
50
+ @function slot($token, $fallbacks, $fallback: null) {
51
+ // Fallbacks are a map of base, color, typography, and density tokens. To simplify
52
+ // lookup, flatten these token groups into a single map.
53
+ $fallbacks-flattened: ();
54
+ @each $tokens in map.values($fallbacks) {
55
+ @each $token, $value in $tokens {
56
+ $fallbacks-flattened: map.set($fallbacks-flattened, $token, $value);
110
57
  }
111
- @return $direct-sys-fallback;
112
58
  }
113
-
114
- // Check whether there's a system-level fallback. If not, return the optional
115
- // provided fallback (otherwise null).
116
- $sys-fallback: map.get($_system-fallbacks, $_component-prefix, $token);
117
- @if (not $sys-fallback) {
118
- @return $fallback;
59
+ @if not map.has-key($fallbacks-flattened, $token) {
60
+ @error 'Token #{$token} does not exist. Configured tokens are:' +
61
+ #{map.keys($fallbacks-flattened)};
119
62
  }
120
63
 
64
+ $sys-fallback: map.get($fallbacks-flattened, $token);
121
65
  @if (sass-utils.is-css-var-name($sys-fallback)) {
122
- @return _create-var($sys-fallback, $fallback);
66
+ $sys-fallback: _create-var($sys-fallback, $fallback);
123
67
  }
124
68
 
125
- @return $sys-fallback;
69
+ @return _create-var(--mat-#{$token}, $sys-fallback);
126
70
  }
127
71
 
128
- // Outputs a map of tokens under a specific prefix.
129
- @mixin create-token-values($prefix, $tokens) {
130
- @include _create-token-values-internal($prefix, $tokens, false);
72
+ // Outputs a map of tokens.
73
+ @mixin create-token-values($tokens) {
74
+ @include _create-token-values-internal($tokens, false);
131
75
  }
132
76
 
133
77
  // Outputs a map of tokens under a specific prefix in scenarios where tokens may be mixed with
134
78
  // other declarations (e.g. M2 themes). Used to avoid https://sass-lang.com/documentation/breaking-changes/mixed-decls/
135
- @mixin create-token-values-mixed($prefix, $tokens) {
136
- @include _create-token-values-internal($prefix, $tokens, true);
79
+ @mixin create-token-values-mixed($tokens) {
80
+ @include _create-token-values-internal($tokens, true);
137
81
  }
138
82
 
139
- @mixin _create-token-values-internal($prefix, $tokens, $in-place) {
83
+ @mixin _create-token-values-internal($tokens, $in-place) {
140
84
  @if ($tokens != null) {
141
85
  @if ($in-place) {
142
86
  & {
143
87
  @each $key, $value in $tokens {
144
88
  @if $value != null {
145
- @include define-css_var($prefix, $key, $value);
89
+ --mat-#{$key}: #{$value};
146
90
  }
147
91
  }
148
92
  }
149
93
  } @else {
150
94
  @each $key, $value in $tokens {
151
95
  @if $value != null {
152
- @include define-css-var($prefix, $key, $value);
96
+ --mat-#{$key}: #{$value};
153
97
  }
154
98
  }
155
99
  }
156
100
  }
157
101
  }
158
102
 
159
- @mixin define-css-var($prefix, $key, $value) {
160
- $name: _create-var-name($prefix, $key);
161
- #{$name}: #{$value};
162
- }
163
-
164
- // MDC doesn't currently handle elevation tokens properly. As a temporary workaround we can combine
165
- // the elevation and shadow-color tokens into a full box-shadow and use it as the value for the
166
- // elevation token.
167
- @function resolve-elevation($tokens, $elevation-token, $shadow-color-token) {
168
- $elevation: map.get($tokens, $elevation-token);
169
- $shadow-color: map.get($tokens, $shadow-color-token);
170
- @return map.merge(
171
- $tokens,
172
- (
173
- $elevation-token: elevation.get-box-shadow($elevation, $shadow-color),
174
- $shadow-color-token: null,
175
- )
176
- );
177
- }
178
-
179
- /// Checks whether a list starts wih a given prefix
180
- /// @param {List} $list The list value to check the prefix of.
181
- /// @param {List} $prefix The prefix to check.
182
- /// @return {Boolean} Whether the list starts with the prefix.
183
- @function _is-prefix($list, $prefix) {
184
- @for $i from 1 through list.length($prefix) {
185
- @if list.nth($list, $i) != list.nth($prefix, $i) {
186
- @return false;
187
- }
188
- }
189
- @return true;
190
- }
191
-
192
- /// Gets the supported color variants in the given token set for the given prefix.
193
- /// @param {Map} $tokens The full token map.
194
- /// @param {List} $prefix The component prefix to get color variants for.
195
- /// @return {List} The supported color variants.
196
- @function _supported-color-variants($tokens, $prefix) {
197
- $result: ();
198
- @each $namespace in map.keys($tokens) {
199
- @if list.length($prefix) == list.length($namespace) - 1 and _is-prefix($namespace, $prefix) {
200
- $result: list.append($result, list.nth($namespace, list.length($namespace)), comma);
201
- }
202
- }
203
- @return $result;
204
- }
205
-
206
- /// Gets the token values for the given components prefix with the given options.
207
- /// @param {Map} $tokens The full token map.
208
- /// @param {List} $prefix The component prefix to get the token values for.
209
- /// @param {ArgList} Any additional options
210
- /// Currently the additional supported options are:
211
- // - $color-variant - The color variant to use for the component
212
- // - $emit-overrides-only - Whether to emit *only* the overrides for the
213
- // specific color variant, or all color styles. Defaults to false.
214
- /// @throws If given options are invalid
215
- /// @return {Map} The token values for the requested component.
216
- @function get-tokens-for($tokens, $prefix, $options...) {
217
- $options: sass-utils.validate-keyword-args($options, (color-variant, emit-overrides-only));
218
- @if $tokens == () {
219
- @return ();
220
- }
221
- $values: map.get($tokens, $prefix);
222
- @if ($values == null) {
223
- @return ();
224
- }
225
-
226
- $color-variant: map.get($options, color-variant);
227
- $emit-overrides-only: map.get($options, emit-overrides-only);
228
- @if $color-variant == null {
229
- @return $values;
230
- }
231
- $overrides: map.get($tokens, list.append($prefix, $color-variant));
232
- @if $overrides == null {
233
- $variants: _supported-color-variants($tokens, $prefix);
234
- $secondary-message: if(
235
- $variants == (),
236
- 'Mixin does not support color variants',
237
- 'Supported color variants are: #{$variants}'
238
- );
239
-
240
- @error 'Invalid color variant: #{$color-variant}. #{$secondary-message}.';
241
- }
242
-
243
- @return if($emit-overrides-only, $overrides, map.merge($values, $overrides));
244
- }
245
-
246
103
  /// Emits new token values for the given token overrides.
247
104
  /// Verifies that the overrides passed in are valid tokens.
248
105
  /// New token values are emitted under the current selector or root.
249
- @mixin batch-create-token-values($overrides: (), $namespace-configs...) {
106
+ @mixin batch-create-token-values($overrides: (), $namespace-configs) {
250
107
  @include sass-utils.current-selector-or-root() {
251
108
  $prefixed-name-data: ();
252
109
  $all-names: ();
@@ -254,7 +111,7 @@ $_direct-system-fallbacks: ();
254
111
  @each $config in $namespace-configs {
255
112
  $namespace: map.get($config, namespace);
256
113
  $prefix: if(map.has-key($config, prefix), map.get($config, prefix), '');
257
- $tokens: _filter-nulls(map.get($config, tokens));
114
+ $tokens: map.get(map.get($config, tokens), all);
258
115
  @each $name, $value in $tokens {
259
116
  $prefixed-name: $prefix + $name;
260
117
  $all-names: list.append($all-names, $prefixed-name, $separator: comma);
@@ -267,62 +124,11 @@ $_direct-system-fallbacks: ();
267
124
  $data: map.get($prefixed-name-data, $name);
268
125
  $namespace: list.nth($data, 1);
269
126
  $name: list.nth($data, 2);
270
- @include create-token-values(
271
- $namespace,
272
- (
273
- $name: $value,
274
- )
275
- );
127
+ $prefixed-name: $namespace + '-' + $name;
128
+ @include create-token-values(($prefixed-name: $value));
276
129
  } @else {
277
130
  @error #{'Invalid token name `'}#{$name}#{'`. '}#{'Valid tokens are: '}#{$all-names};
278
131
  }
279
132
  }
280
133
  }
281
134
  }
282
-
283
- /// Filters keys with a null value out of the map.
284
- /// @param {Map} $map The map to filter.
285
- /// @return {Map} The given map with all of the null keys filtered out.
286
- @function _filter-nulls($map) {
287
- $result: ();
288
- @each $key, $val in $map {
289
- @if $val != null {
290
- $result: map.set($result, $key, $val);
291
- }
292
- }
293
- @return $result;
294
- }
295
-
296
- /// Gets the MDC tokens for the given prefix, M3 token values, and supported token slots.
297
- /// @param {List} $prefix The token prefix for the given tokens.
298
- /// @param {Map|(Map, Map)} $values A map of M3 token values for the given prefix.
299
- /// This param may also be a tuple of maps, the first one representing the default M3 token values,
300
- // and the second containing overrides for different color variants.
301
- // Single map example:
302
- // (token1: green, token2: 2px)
303
- // Tuple example:
304
- // (
305
- // (token1: green, token2: 2px),
306
- // (
307
- // secondary: (token1: blue),
308
- // error: (token1: red),
309
- // )
310
- // )
311
- /// @param {Map} $slots A map of token slots, with null value indicating the token is not supported.
312
- /// @param {String|null} $variant The name of the variant the token values are for.
313
- /// @return {Map} A map of fully qualified token names to values, for only the supported tokens.
314
- @function namespace-tokens($prefix, $values, $slots, $variant: null) {
315
- $result: ();
316
- @if $variant == null and meta.type-of($values) == 'list' and list.length($values == 2) {
317
- $variants: list.nth($values, 2);
318
- $values: list.nth($values, 1);
319
- @each $variant, $overrides in $variants {
320
-
321
- $result: map.merge($result, namespace-tokens($prefix, $overrides, $slots, $variant));
322
- }
323
- }
324
- $used-token-names: map.keys(_filter-nulls(map.get($slots, $prefix)));
325
- $used-m3-tokens: _pick(_filter-nulls($values), $used-token-names);
326
- $prefix: if($variant == null, $prefix, list.append($prefix, $variant));
327
- @return map.merge($result, ($prefix: $used-m3-tokens));
328
- }
@@ -4,3 +4,4 @@
4
4
  @forward './md-sys-shape';
5
5
  @forward './md-sys-state';
6
6
  @forward './md-sys-typescale';
7
+ @forward './theme';
@@ -0,0 +1,47 @@
1
+ @use '../../theming/palettes';
2
+ @use './md-sys-color';
3
+ @use './md-sys-elevation';
4
+ @use './md-sys-shape';
5
+ @use './md-sys-state';
6
+ @use './md-sys-typescale';
7
+ @use 'sass:map';
8
+
9
+ // Return a new map where the values are the same as the provided map's
10
+ // keys, prefixed with "--mat-sys-". For example:
11
+ // (key1: '', key2: '') --> (key1: --mat-sys-key1, key2: --mat-sys-key2)
12
+ @function _create-system-app-vars-map($map) {
13
+ $new-map: ();
14
+ @each $key, $value in $map {
15
+ $new-map: map.set($new-map, $key, --mat-sys-#{$key});
16
+ }
17
+ @return $new-map;
18
+ }
19
+
20
+ /// Map key used to store internals of theme config.
21
+ $internals: _mat-theming-internals-do-not-access;
22
+
23
+ $placeholder-palettes: md-sys-color.md-sys-color-values-light(palettes.$blue-palette);
24
+ $placeholder-palettes: map.set($placeholder-palettes, primary, palettes.$blue-palette);
25
+ $app-vars: (
26
+ 'md-sys-color': _create-system-app-vars-map(
27
+ md-sys-color.md-sys-color-values-light($placeholder-palettes)),
28
+ 'md-sys-typescale': _create-system-app-vars-map(md-sys-typescale.md-sys-typescale-values((
29
+ brand: (Roboto),
30
+ plain: (Roboto),
31
+ bold: 700,
32
+ medium: 500,
33
+ regular: 400
34
+ ))),
35
+ 'md-sys-elevation': _create-system-app-vars-map(md-sys-elevation.md-sys-elevation-values()),
36
+ 'md-sys-state': _create-system-app-vars-map(md-sys-state.md-sys-state-values()),
37
+ 'md-sys-shape': _create-system-app-vars-map(md-sys-shape.md-sys-shape-values()),
38
+ // Add a subset of palette-specific colors used by components instead of system values
39
+ 'md-ref-palette': _create-system-app-vars-map(
40
+ (
41
+ neutral10: '', // Form field native select option text color
42
+ neutral-variant20: '', // Sidenav scrim (container background shadow when opened),
43
+ )
44
+ ),
45
+ );
46
+
47
+ $sys-theme: ($internals: $app-vars);
@@ -1,9 +1,9 @@
1
1
  @use 'sass:color';
2
2
  @use 'sass:map';
3
3
  @use './m2-datepicker';
4
+ @use './m3-datepicker';
4
5
  @use '../core/theming/theming';
5
6
  @use '../core/theming/inspection';
6
- @use '../core/theming/validation';
7
7
  @use '../core/tokens/token-utils';
8
8
  @use '../core/style/sass-utils';
9
9
  @use '../core/typography/typography';
@@ -26,8 +26,7 @@ $calendar-weekday-table-font-size: 11px !default;
26
26
  $palette-name
27
27
  );
28
28
 
29
- @include token-utils.create-token-values-mixed(
30
- m2-datepicker.$prefix, map.merge($calendar-tokens, $range-tokens));
29
+ @include token-utils.create-token-values-mixed(map.merge($calendar-tokens, $range-tokens));
31
30
  }
32
31
 
33
32
  /// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
@@ -35,27 +34,24 @@ $calendar-weekday-table-font-size: 11px !default;
35
34
  /// @param {Map} $theme The theme to generate base styles for.
36
35
  @mixin base($theme) {
37
36
  @if inspection.get-theme-version($theme) == 1 {
38
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
37
+ @include token-utils.create-token-values(map.get(m3-datepicker.get-tokens($theme), base));
39
38
  } @else {
40
39
  @include sass-utils.current-selector-or-root() {
41
- @include token-utils.create-token-values-mixed(
42
- m2-datepicker.$prefix, m2-datepicker.get-unthemable-tokens());
40
+ @include token-utils.create-token-values-mixed(m2-datepicker.get-unthemable-tokens());
43
41
  }
44
42
  }
45
43
  }
46
44
 
47
45
  /// Outputs color theme styles for the mat-datepicker.
48
46
  /// @param {Map} $theme The theme to generate color styles for.
49
- /// @param {ArgList} Additional optional arguments (only supported for M3 themes):
50
- /// $color-variant: The color variant to use for the main selection: primary, secondary, tertiary,
51
- /// or error (If not specified, default primary color will be used).
52
- @mixin color($theme, $options...) {
47
+ /// @param {String} $color-variant The color variant to use for the component (M3 only)
48
+ @mixin color($theme, $color-variant: null) {
53
49
  @if inspection.get-theme-version($theme) == 1 {
54
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
50
+ @include token-utils.create-token-values(
51
+ map.get(m3-datepicker.get-tokens($theme, $color-variant), color));
55
52
  } @else {
56
53
  @include sass-utils.current-selector-or-root() {
57
- @include token-utils.create-token-values-mixed(
58
- m2-datepicker.$prefix, m2-datepicker.get-color-tokens($theme));
54
+ @include token-utils.create-token-values-mixed(m2-datepicker.get-color-tokens($theme));
59
55
  }
60
56
 
61
57
  .mat-datepicker-content {
@@ -71,12 +67,12 @@ $calendar-weekday-table-font-size: 11px !default;
71
67
  .mat-datepicker-toggle-active {
72
68
  &.mat-accent {
73
69
  $accent-tokens: m2-datepicker.private-get-toggle-color-palette-color-tokens($theme, accent);
74
- @include token-utils.create-token-values-mixed(m2-datepicker.$prefix, $accent-tokens);
70
+ @include token-utils.create-token-values-mixed($accent-tokens);
75
71
  }
76
72
 
77
73
  &.mat-warn {
78
74
  $warn-tokens: m2-datepicker.private-get-toggle-color-palette-color-tokens($theme, warn);
79
- @include token-utils.create-token-values-mixed(m2-datepicker.$prefix, $warn-tokens);
75
+ @include token-utils.create-token-values-mixed($warn-tokens);
80
76
  }
81
77
  }
82
78
  }
@@ -86,13 +82,10 @@ $calendar-weekday-table-font-size: 11px !default;
86
82
  /// @param {Map} $theme The theme to generate typography styles for.
87
83
  @mixin typography($theme) {
88
84
  @if inspection.get-theme-version($theme) == 1 {
89
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
85
+ @include token-utils.create-token-values(map.get(m3-datepicker.get-tokens($theme), typography));
90
86
  } @else {
91
87
  @include sass-utils.current-selector-or-root() {
92
- @include token-utils.create-token-values-mixed(
93
- m2-datepicker.$prefix,
94
- m2-datepicker.get-typography-tokens($theme)
95
- );
88
+ @include token-utils.create-token-values-mixed(m2-datepicker.get-typography-tokens($theme));
96
89
  }
97
90
  }
98
91
  }
@@ -112,7 +105,7 @@ $calendar-weekday-table-font-size: 11px !default;
112
105
  );
113
106
 
114
107
  @include sass-utils.current-selector-or-root() {
115
- @include token-utils.create-token-values-mixed(m2-datepicker.$prefix, $tokens);
108
+ @include token-utils.create-token-values-mixed($tokens);
116
109
  }
117
110
  }
118
111
 
@@ -120,7 +113,7 @@ $calendar-weekday-table-font-size: 11px !default;
120
113
  /// @param {Map} $theme The theme to generate density styles for.
121
114
  @mixin density($theme) {
122
115
  @if inspection.get-theme-version($theme) == 1 {
123
- // There are no M3 density tokens for this component
116
+ @include token-utils.create-token-values(map.get(m3-datepicker.get-tokens($theme), density));
124
117
  } @else {
125
118
  // TODO(crisbeto): move this into the structural styles
126
119
  // once the icon button density is switched to tokens.
@@ -137,8 +130,8 @@ $calendar-weekday-table-font-size: 11px !default;
137
130
  @function _define-overrides() {
138
131
  @return (
139
132
  (
140
- namespace: m2-datepicker.$prefix,
141
- tokens: m2-datepicker.get-token-slots(),
133
+ namespace: datepicker,
134
+ tokens: token-utils.get-overrides(m3-datepicker.get-tokens(), datepicker)
142
135
  ),
143
136
  );
144
137
  }
@@ -146,18 +139,19 @@ $calendar-weekday-table-font-size: 11px !default;
146
139
  /// Outputs the CSS variable values for the given tokens.
147
140
  /// @param {Map} $tokens The token values to emit.
148
141
  @mixin overrides($tokens: ()) {
149
- @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
142
+ @include token-utils.batch-create-token-values($tokens, _define-overrides());
150
143
  }
151
144
 
152
145
  /// Outputs all (base, color, typography, and density) theme styles for the mat-datepicker.
153
146
  /// @param {Map} $theme The theme to generate styles for.
154
- /// @param {ArgList} Additional optional arguments (only supported for M3 themes):
155
- /// $color-variant: The color variant to use for the main selection: primary, secondary, tertiary,
156
- /// or error (If not specified, default primary color will be used).
157
- @mixin theme($theme, $options...) {
147
+ /// @param {String} $color-variant The color variant to use for the component (M3 only)
148
+ @mixin theme($theme, $color-variant: null) {
158
149
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-datepicker') {
159
150
  @if inspection.get-theme-version($theme) == 1 {
160
- @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);
151
+ @include base($theme);
152
+ @include color($theme, $color-variant);
153
+ @include density($theme);
154
+ @include typography($theme);
161
155
  } @else {
162
156
  @include base($theme);
163
157
  @if inspection.theme-has($theme, color) {
@@ -172,12 +166,3 @@ $calendar-weekday-table-font-size: 11px !default;
172
166
  }
173
167
  }
174
168
  }
175
-
176
- @mixin _theme-from-tokens($tokens, $options...) {
177
- @include validation.selector-defined(
178
- 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
179
- );
180
- $mat-datepicker-tokens: token-utils.get-tokens-for(
181
- $tokens, m2-datepicker.$prefix, $options...);
182
- @include token-utils.create-token-values(m2-datepicker.$prefix, $mat-datepicker-tokens);
183
- }