@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,24 +1,25 @@
1
1
  @use 'sass:map';
2
- @use '../core/style/sass-utils';
3
2
  @use '../core/tokens/m3-utils';
4
-
5
- // The prefix used to generate the fully qualified name for tokens in this file.
6
- $prefix: (mat, bottom-sheet);
3
+ @use '../core/tokens/m3';
7
4
 
8
5
  /// Generates custom tokens for the mat-bottom-sheet.
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-bottom-sheet
13
- @function get-tokens($systems, $exclude-hardcoded, $token-slots) {
14
- $tokens: sass-utils.merge-all(
15
- m3-utils.generate-typography-tokens($systems, container-text, body-large),
16
- (
17
- container-shape: m3-utils.hardcode(28px, $exclude-hardcoded),
18
- container-text-color: map.get($systems, md-sys-color, on-surface),
19
- container-background-color: map.get($systems, md-sys-color, surface-container-low),
6
+ @function get-tokens($theme: m3.$sys-theme) {
7
+ $system: m3-utils.get-system($theme);
8
+ @return (
9
+ base: (
10
+ bottom-sheet-container-shape: 28px,
11
+ ),
12
+ color: (
13
+ bottom-sheet-container-text-color: map.get($system, on-surface),
14
+ bottom-sheet-container-background-color: map.get($system, surface-container-low),
20
15
  ),
16
+ typography: (
17
+ bottom-sheet-container-text-font: map.get($system, body-large-font),
18
+ bottom-sheet-container-text-line-height: map.get($system, body-large-line-height),
19
+ bottom-sheet-container-text-size: map.get($system, body-large-size),
20
+ bottom-sheet-container-text-tracking: map.get($system, body-large-tracking),
21
+ bottom-sheet-container-text-weight: map.get($system, body-large-weight),
22
+ ),
23
+ density: (),
21
24
  );
22
-
23
- @return m3-utils.namespace($prefix, $tokens, $token-slots);
24
25
  }
@@ -1,29 +1,20 @@
1
1
  @use '../core/style/sass-utils';
2
2
  @use '../core/theming/inspection';
3
3
  @use '../core/theming/theming';
4
- @use '../core/theming/validation';
5
4
  @use '../core/tokens/token-utils';
6
5
  @use '../core/typography/typography';
7
6
  @use './m2-button';
8
7
  @use './m3-button';
8
+ @use 'sass:map';
9
9
 
10
- @mixin _button-variant($theme, $palette) {
10
+ @mixin _m2-button-variant($theme, $palette) {
11
11
  $mat-tokens: if(
12
12
  $palette,
13
13
  m2-button.private-get-color-palette-color-tokens($theme, $palette),
14
14
  m2-button.get-color-tokens($theme)
15
15
  );
16
16
 
17
- @include token-utils.create-token-values-mixed(m2-button.$prefix, $mat-tokens);
18
- }
19
-
20
- @mixin _theme-from-tokens($tokens, $options...) {
21
- @include validation.selector-defined(
22
- 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
23
- );
24
- $mat-text-button-tokens: token-utils.get-tokens-for(
25
- $tokens, m2-button.$prefix, $options...);
26
- @include token-utils.create-token-values(m2-button.$prefix, $mat-text-button-tokens);
17
+ @include token-utils.create-token-values-mixed($mat-tokens);
27
18
  }
28
19
 
29
20
  /// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
@@ -31,26 +22,26 @@
31
22
  /// @param {Map} $theme The theme to generate base styles for.
32
23
  @mixin base($theme) {
33
24
  @if inspection.get-theme-version($theme) == 1 {
34
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
25
+ @include token-utils.create-token-values(map.get(m3-button.get-tokens($theme), base));
35
26
  } @else {
36
27
  @include sass-utils.current-selector-or-root() {
37
- @include token-utils.create-token-values-mixed(
38
- m2-button.$prefix, m2-button.get-unthemable-tokens());
28
+ @include token-utils.create-token-values-mixed(m2-button.get-unthemable-tokens());
39
29
  }
40
30
  }
41
31
  }
42
32
 
43
33
  /// Outputs color theme styles for the mat-button.
44
34
  /// @param {Map} $theme The theme to generate color styles for.
45
- /// @param {ArgList} Additional optional arguments (only supported for M3 themes):
46
- /// $color-variant: The color variant to use for the button: primary, secondary, tertiary,
47
- /// or error (If not specified, default primary color will be used).
48
- @mixin color($theme, $options...) {
35
+ /// @param {String} $color-variant The color variant to use for
36
+ /// the badge: primary, secondary, tertiary, or error (If not specified,
37
+ /// default primary color will be used).
38
+ @mixin color($theme, $color-variant: null) {
49
39
  @if inspection.get-theme-version($theme) == 1 {
50
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
40
+ @include token-utils.create-token-values(
41
+ map.get(m3-button.get-tokens($theme, $color-variant), color));
51
42
  } @else {
52
43
  @include sass-utils.current-selector-or-root() {
53
- @include _button-variant($theme, null);
44
+ @include _m2-button-variant($theme, null);
54
45
  }
55
46
 
56
47
  .mat-mdc-button,
@@ -59,15 +50,15 @@
59
50
  .mat-mdc-outlined-button,
60
51
  .mat-tonal-button {
61
52
  &.mat-primary {
62
- @include _button-variant($theme, primary);
53
+ @include _m2-button-variant($theme, primary);
63
54
  }
64
55
 
65
56
  &.mat-accent {
66
- @include _button-variant($theme, accent);
57
+ @include _m2-button-variant($theme, accent);
67
58
  }
68
59
 
69
60
  &.mat-warn {
70
- @include _button-variant($theme, warn);
61
+ @include _m2-button-variant($theme, warn);
71
62
  }
72
63
  }
73
64
  }
@@ -77,13 +68,10 @@
77
68
  /// @param {Map} $theme The theme to generate typography styles for.
78
69
  @mixin typography($theme) {
79
70
  @if inspection.get-theme-version($theme) == 1 {
80
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
71
+ @include token-utils.create-token-values(map.get(m3-button.get-tokens($theme), typography));
81
72
  } @else {
82
73
  @include sass-utils.current-selector-or-root() {
83
- @include token-utils.create-token-values-mixed(
84
- m2-button.$prefix,
85
- m2-button.get-typography-tokens($theme)
86
- );
74
+ @include token-utils.create-token-values-mixed(m2-button.get-typography-tokens($theme));
87
75
  }
88
76
  }
89
77
  }
@@ -92,14 +80,10 @@
92
80
  /// @param {Map} $theme The theme to generate density styles for.
93
81
  @mixin density($theme) {
94
82
  @if inspection.get-theme-version($theme) == 1 {
95
- @include token-utils.create-token-values(
96
- m3-button.$prefix, m3-button.get-density-tokens($theme));
83
+ @include token-utils.create-token-values(map.get(m3-button.get-tokens($theme), density));
97
84
  } @else {
98
85
  @include sass-utils.current-selector-or-root() {
99
- @include token-utils.create-token-values-mixed(
100
- m2-button.$prefix,
101
- m2-button.get-density-tokens($theme)
102
- );
86
+ @include token-utils.create-token-values-mixed(m2-button.get-density-tokens($theme));
103
87
  }
104
88
  }
105
89
  }
@@ -108,8 +92,8 @@
108
92
  @function _define-overrides() {
109
93
  @return (
110
94
  (
111
- namespace: m2-button.$prefix,
112
- tokens: m2-button.get-token-slots(),
95
+ namespace: button,
96
+ tokens: token-utils.get-overrides(m3-button.get-tokens(), button),
113
97
  ),
114
98
  );
115
99
  }
@@ -117,21 +101,20 @@
117
101
  /// Outputs the CSS variable values for the given tokens.
118
102
  /// @param {Map} $tokens The token values to emit.
119
103
  @mixin overrides($tokens: ()) {
120
- @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
104
+ @include token-utils.batch-create-token-values($tokens, _define-overrides());
121
105
  }
122
106
 
123
107
  /// Outputs all (base, color, typography, and density) theme styles for the mat-button.
124
108
  /// @param {Map} $theme The theme to generate styles for.
125
- /// @param {ArgList} Additional optional arguments (only supported for M3 themes):
126
- /// $color-variant: The color variant to use for the button: primary, secondary, tertiary,
127
- /// or error (If not specified, default primary color will be used).
128
- @mixin theme($theme, $options...) {
109
+ /// @param {String} $color-variant: The color variant to use for the button: primary, secondary,
110
+ // tertiary, or error (If not specified, default primary color will be used).
111
+ @mixin theme($theme, $color-variant: null) {
129
112
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-button') {
130
113
  @if inspection.get-theme-version($theme) == 1 {
131
- @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);
132
- @if inspection.theme-has($theme, density) {
133
- @include density($theme);
134
- }
114
+ @include base($theme);
115
+ @include color($theme, $color-variant);
116
+ @include density($theme);
117
+ @include typography($theme);
135
118
  } @else {
136
119
  @include base($theme);
137
120
  @if inspection.theme-has($theme, color) {
@@ -1,24 +1,21 @@
1
1
  @use '../core/style/sass-utils';
2
2
  @use '../core/theming/theming';
3
3
  @use '../core/theming/inspection';
4
- @use '../core/theming/validation';
5
4
  @use './m2-fab';
6
5
  @use './m3-fab';
7
6
  @use '../core/tokens/token-utils';
8
7
  @use '../core/typography/typography';
8
+ @use 'sass:map';
9
9
 
10
10
  /// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
11
11
  /// for the mat-fab.
12
12
  /// @param {Map} $theme The theme to generate base styles for.
13
13
  @mixin base($theme) {
14
14
  @if inspection.get-theme-version($theme) == 1 {
15
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
15
+ @include token-utils.create-token-values(map.get(m3-fab.get-tokens($theme), base));
16
16
  } @else {
17
17
  @include sass-utils.current-selector-or-root() {
18
- @include token-utils.create-token-values-mixed(
19
- m2-fab.$prefix,
20
- m2-fab.get-unthemable-tokens()
21
- );
18
+ @include token-utils.create-token-values-mixed(m2-fab.get-unthemable-tokens());
22
19
  }
23
20
  }
24
21
  }
@@ -30,17 +27,17 @@
30
27
  m2-fab.get-color-tokens($theme)
31
28
  );
32
29
 
33
- @include token-utils.create-token-values-mixed(m2-fab.$prefix, $mat-tokens);
30
+ @include token-utils.create-token-values-mixed($mat-tokens);
34
31
  }
35
32
 
36
33
  /// Outputs color theme styles for the mat-fab.
37
34
  /// @param {Map} $theme The theme to generate color styles for.
38
- /// @param {ArgList} Additional optional arguments (only supported for M3 themes):
39
- /// $color-variant: The color variant to use for the fab: primary, secondary, or tertiary
40
- /// (If not specified, default primary color will be used).
41
- @mixin color($theme, $options...) {
35
+ /// @param {ArgList} $color-variant: The color variant to use for the fab: primary, secondary,
36
+ // or tertiary. (If not specified, default primary color will be used).
37
+ @mixin color($theme, $color-variant: null) {
42
38
  @if inspection.get-theme-version($theme) == 1 {
43
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
39
+ @include token-utils.create-token-values(
40
+ map.get(m3-fab.get-tokens($theme, $color-variant), color));
44
41
  } @else {
45
42
  @include sass-utils.current-selector-or-root() {
46
43
  @include _fab-variant($theme, null);
@@ -66,13 +63,10 @@
66
63
  /// @param {Map} $theme The theme to generate typography styles for.
67
64
  @mixin typography($theme) {
68
65
  @if inspection.get-theme-version($theme) == 1 {
69
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
66
+ @include token-utils.create-token-values(map.get(m3-fab.get-tokens($theme), typography));
70
67
  } @else {
71
68
  @include sass-utils.current-selector-or-root() {
72
- @include token-utils.create-token-values-mixed(
73
- m2-fab.$prefix,
74
- m2-fab.get-typography-tokens($theme)
75
- );
69
+ @include token-utils.create-token-values-mixed(m2-fab.get-typography-tokens($theme));
76
70
  }
77
71
  }
78
72
  }
@@ -81,13 +75,10 @@
81
75
  /// @param {Map} $theme The theme to generate density styles for.
82
76
  @mixin density($theme) {
83
77
  @if inspection.get-theme-version($theme) == 1 {
84
- @include token-utils.create-token-values(m3-fab.$prefix, m3-fab.get-density-tokens($theme));
78
+ @include token-utils.create-token-values(map.get(m3-fab.get-tokens($theme), density));
85
79
  } @else {
86
80
  @include sass-utils.current-selector-or-root() {
87
- @include token-utils.create-token-values-mixed(
88
- m2-fab.$prefix,
89
- m2-fab.get-density-tokens($theme)
90
- );
81
+ @include token-utils.create-token-values-mixed(m2-fab.get-density-tokens($theme));
91
82
  }
92
83
  }
93
84
  }
@@ -96,8 +87,8 @@
96
87
  @function _define-overrides() {
97
88
  @return (
98
89
  (
99
- namespace: m2-fab.$prefix,
100
- tokens: m2-fab.get-token-slots(),
90
+ namespace: fab,
91
+ tokens: token-utils.get-overrides(m3-fab.get-tokens(), fab)
101
92
  ),
102
93
  );
103
94
  }
@@ -105,21 +96,19 @@
105
96
  /// Outputs the CSS variable values for the given tokens.
106
97
  /// @param {Map} $tokens The token values to emit.
107
98
  @mixin overrides($tokens: ()) {
108
- @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
99
+ @include token-utils.batch-create-token-values($tokens, _define-overrides());
109
100
  }
110
101
 
111
102
  /// Outputs all (base, color, typography, and density) theme styles for the mat-checkbox.
112
103
  /// @param {Map} $theme The theme to generate styles for.
113
- /// @param {ArgList} Additional optional arguments (only supported for M3 themes):
114
- /// $color-variant: The color variant to use for the fab: primary, secondary, or tertiary
115
- /// (If not specified, default primary color will be used).
116
- @mixin theme($theme, $options...) {
104
+ /// @param {String} $color-variant: The color variant to use for the fab
105
+ @mixin theme($theme, $color-variant: null) {
117
106
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-fab') {
118
107
  @if inspection.get-theme-version($theme) == 1 {
119
- @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);
120
- @if inspection.theme-has($theme, density) {
121
- @include density($theme);
122
- }
108
+ @include base($theme);
109
+ @include color($theme, $color-variant);
110
+ @include density($theme);
111
+ @include typography($theme);
123
112
  } @else {
124
113
  @include base($theme);
125
114
  @if inspection.theme-has($theme, color) {
@@ -134,11 +123,3 @@
134
123
  }
135
124
  }
136
125
  }
137
-
138
- @mixin _theme-from-tokens($tokens, $options...) {
139
- @include validation.selector-defined(
140
- 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
141
- );
142
- $mat-fab-tokens: token-utils.get-tokens-for($tokens, m2-fab.$prefix, $options...);
143
- @include token-utils.create-token-values(m2-fab.$prefix, $mat-fab-tokens);
144
- }
@@ -6,54 +6,51 @@
6
6
  @use '../core/tokens/token-utils';
7
7
  @use '../core/theming/theming';
8
8
  @use '../core/theming/inspection';
9
- @use '../core/theming/validation';
10
9
 
11
10
  @mixin base($theme) {
12
11
  @if inspection.get-theme-version($theme) == 1 {
13
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
12
+ @include token-utils.create-token-values(map.get(m3-icon-button.get-tokens($theme), base));
14
13
  } @else {
15
14
  // Add default values for tokens not related to color, typography, or density.
16
15
  @include sass-utils.current-selector-or-root() {
17
- @include token-utils.create-token-values-mixed(
18
- m2-icon-button.$prefix,
19
- m2-icon-button.get-unthemable-tokens()
20
- );
16
+ @include token-utils.create-token-values-mixed(m2-icon-button.get-unthemable-tokens());
21
17
  }
22
18
  }
23
19
  }
24
20
 
25
- @mixin _icon-button-variant($theme, $palette) {
21
+ @mixin _m2-icon-button-variant($theme, $palette) {
26
22
  $mat-tokens: if(
27
23
  $palette,
28
24
  m2-icon-button.private-get-color-palette-color-tokens($theme, $palette),
29
25
  m2-icon-button.get-color-tokens($theme)
30
26
  );
31
27
 
32
- @include token-utils.create-token-values-mixed(m2-icon-button.$prefix, $mat-tokens);
28
+ @include token-utils.create-token-values-mixed($mat-tokens);
33
29
  }
34
30
 
35
31
  /// Outputs color theme styles for the mat-icon-button.
36
32
  /// @param {Map} $theme The theme to generate color styles for.
37
- /// @param {ArgList} Additional optional arguments (only supported for M3 themes):
38
- /// $color-variant: The color variant to use for the button: primary, secondary, tertiary, or error.
39
- @mixin color($theme, $options...) {
33
+ /// @param {String} $color-variant: The color variant to use for the
34
+ // button: primary, secondary, tertiary, or error.
35
+ @mixin color($theme, $color-variant: null) {
40
36
  @if inspection.get-theme-version($theme) == 1 {
41
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
37
+ @include token-utils.create-token-values(
38
+ map.get(m3-icon-button.get-tokens($theme, $color-variant), color));
42
39
  } @else {
43
40
  @include sass-utils.current-selector-or-root() {
44
- @include _icon-button-variant($theme, null);
41
+ @include _m2-icon-button-variant($theme, null);
45
42
 
46
43
  .mat-mdc-icon-button {
47
44
  &.mat-primary {
48
- @include _icon-button-variant($theme, primary);
45
+ @include _m2-icon-button-variant($theme, primary);
49
46
  }
50
47
 
51
48
  &.mat-accent {
52
- @include _icon-button-variant($theme, accent);
49
+ @include _m2-icon-button-variant($theme, accent);
53
50
  }
54
51
 
55
52
  &.mat-warn {
56
- @include _icon-button-variant($theme, warn);
53
+ @include _m2-icon-button-variant($theme, warn);
57
54
  }
58
55
  }
59
56
  }
@@ -62,12 +59,11 @@
62
59
 
63
60
  @mixin typography($theme) {
64
61
  @if inspection.get-theme-version($theme) == 1 {
65
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
62
+ @include token-utils.create-token-values(
63
+ map.get(m3-icon-button.get-tokens($theme), typography));
66
64
  } @else {
67
65
  @include sass-utils.current-selector-or-root() {
68
- @include token-utils.create-token-values-mixed(
69
- m2-icon-button.$prefix,
70
- m2-icon-button.get-typography-tokens($theme)
66
+ @include token-utils.create-token-values-mixed(m2-icon-button.get-typography-tokens($theme)
71
67
  );
72
68
  }
73
69
  }
@@ -75,8 +71,7 @@
75
71
 
76
72
  @mixin density($theme) {
77
73
  @if inspection.get-theme-version($theme) == 1 {
78
- @include token-utils.create-token-values(
79
- m3-icon-button.$prefix, m3-icon-button.get-density-tokens($theme));
74
+ @include token-utils.create-token-values(map.get(m3-icon-button.get-tokens($theme), density));
80
75
  } @else {
81
76
  $icon-size: 24px;
82
77
  $density-scale: inspection.get-theme-density($theme);
@@ -92,9 +87,8 @@
92
87
 
93
88
  @include sass-utils.current-selector-or-root() {
94
89
  @include token-utils.create-token-values-mixed(
95
- m2-icon-button.$prefix,
96
- m2-icon-button.get-density-tokens(
97
- $theme, $exclude: (state-layer-size))
90
+ m2-icon-button.get-density-tokens(
91
+ $theme, $exclude: (icon-button-state-layer-size))
98
92
  );
99
93
  }
100
94
 
@@ -121,27 +115,27 @@
121
115
  @function _define-overrides() {
122
116
  @return (
123
117
  (
124
- namespace: m2-icon-button.$prefix,
125
- tokens: m2-icon-button.get-token-slots(),
118
+ namespace: icon-button,
119
+ tokens: token-utils.get-overrides(m3-icon-button.get-tokens(), icon-button)
126
120
  ),
127
121
  );
128
122
  }
129
123
 
130
124
  @mixin overrides($tokens: ()) {
131
- @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
125
+ @include token-utils.batch-create-token-values($tokens, _define-overrides());
132
126
  }
133
127
 
134
128
  /// Outputs all (base, color, typography, and density) theme styles for the mat-icon-button.
135
129
  /// @param {Map} $theme The theme to generate styles for.
136
- /// @param {ArgList} Additional optional arguments (only supported for M3 themes):
137
- /// $color-variant: The color variant to use for the button: primary, secondary, tertiary, or error.
138
- @mixin theme($theme, $options...) {
130
+ /// @param {String} $color-variant: The color variant to use for the button: primary,
131
+ // secondary, tertiary, or error.
132
+ @mixin theme($theme, $color-variant: null) {
139
133
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-icon-button') {
140
134
  @if inspection.get-theme-version($theme) == 1 {
141
- @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);
142
- @if inspection.theme-has($theme, density) {
143
- @include density($theme);
144
- }
135
+ @include base($theme);
136
+ @include color($theme, $color-variant);
137
+ @include density($theme);
138
+ @include typography($theme);
145
139
  } @else {
146
140
  @include base($theme);
147
141
  @if inspection.theme-has($theme, color) {
@@ -156,14 +150,3 @@
156
150
  }
157
151
  }
158
152
  }
159
-
160
- @mixin _theme-from-tokens($tokens, $options...) {
161
- @include validation.selector-defined(
162
- 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector'
163
- );
164
- @if ($tokens != ()) {
165
- $mat-tokens: token-utils.get-tokens-for($tokens, m2-icon-button.$prefix, $options...);
166
-
167
- @include token-utils.create-token-values(m2-icon-button.$prefix, $mat-tokens);
168
- }
169
- }