@angular/material 18.0.0-next.6 → 18.0.0-rc.1

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/_index.scss +1 -1
  2. package/button/index.d.ts +1 -1
  3. package/core/tokens/_m3-tokens.scss +28 -885
  4. package/core/tokens/_token-utils.scss +151 -0
  5. package/core/tokens/m2/mat/_switch.scss +1 -0
  6. package/core/tokens/m3/_index.scss +161 -0
  7. package/core/tokens/m3/mat/_app.scss +19 -0
  8. package/core/tokens/m3/mat/_autocomplete.scss +22 -0
  9. package/core/tokens/m3/mat/_badge.scss +77 -0
  10. package/core/tokens/m3/mat/_bottom-sheet.scss +24 -0
  11. package/core/tokens/m3/mat/_card.scss +24 -0
  12. package/core/tokens/m3/mat/_checkbox.scss +21 -0
  13. package/core/tokens/m3/mat/_chip.scss +46 -0
  14. package/core/tokens/m3/mat/_datepicker.scss +123 -0
  15. package/core/tokens/m3/mat/_dialog.scss +30 -0
  16. package/core/tokens/m3/mat/_divider.scss +19 -0
  17. package/core/tokens/m3/mat/_expansion.scss +41 -0
  18. package/core/tokens/m3/mat/_fab-small.scss +50 -0
  19. package/core/tokens/m3/mat/_fab.scss +50 -0
  20. package/core/tokens/m3/mat/_filled-button.scss +54 -0
  21. package/core/tokens/m3/mat/_form-field.scss +59 -0
  22. package/core/tokens/m3/mat/_full-pseudo-checkbox.scss +42 -0
  23. package/core/tokens/m3/mat/_grid-list.scss +21 -0
  24. package/core/tokens/m3/mat/_icon-button.scss +27 -0
  25. package/core/tokens/m3/mat/_icon.scss +33 -0
  26. package/core/tokens/m3/mat/_list.scss +19 -0
  27. package/core/tokens/m3/mat/_menu.scss +42 -0
  28. package/core/tokens/m3/mat/_minimal-pseudo-checkbox.scss +33 -0
  29. package/core/tokens/m3/mat/_optgroup.scss +22 -0
  30. package/core/tokens/m3/mat/_option.scss +55 -0
  31. package/core/tokens/m3/mat/_outlined-button.scss +54 -0
  32. package/core/tokens/m3/mat/_paginator.scss +27 -0
  33. package/core/tokens/m3/mat/_protected-button.scss +55 -0
  34. package/core/tokens/m3/mat/_radio.scss +34 -0
  35. package/core/tokens/m3/mat/_ripple.scss +19 -0
  36. package/core/tokens/m3/mat/_select.scss +46 -0
  37. package/core/tokens/m3/mat/_sidenav.scss +28 -0
  38. package/core/tokens/m3/mat/_slider.scss +56 -0
  39. package/core/tokens/m3/mat/_snack-bar.scss +18 -0
  40. package/core/tokens/m3/mat/_sort.scss +18 -0
  41. package/core/tokens/m3/mat/_standard-button-toggle.scss +57 -0
  42. package/core/tokens/m3/mat/_stepper.scss +79 -0
  43. package/core/tokens/m3/mat/_switch.scss +45 -0
  44. package/core/tokens/m3/mat/_tab-header.scss +51 -0
  45. package/core/tokens/m3/mat/_table.scss +28 -0
  46. package/core/tokens/m3/mat/_text-button.scss +55 -0
  47. package/core/tokens/m3/mat/_toolbar.scss +23 -0
  48. package/core/tokens/m3/mat/_tree.scss +22 -0
  49. package/core/tokens/m3/mdc/_checkbox.scss +110 -0
  50. package/core/tokens/m3/mdc/_chip.scss +91 -0
  51. package/core/tokens/m3/mdc/_circular-progress.scss +29 -0
  52. package/core/tokens/m3/mdc/_dialog.scss +39 -0
  53. package/core/tokens/m3/mdc/_elevated-card.scss +15 -0
  54. package/core/tokens/m3/mdc/_extended-fab.scss +21 -0
  55. package/core/tokens/m3/mdc/_fab-small.scss +21 -0
  56. package/core/tokens/m3/mdc/_fab.scss +21 -0
  57. package/core/tokens/m3/mdc/_filled-button.scss +86 -0
  58. package/core/tokens/m3/mdc/_filled-text-field.scss +92 -0
  59. package/core/tokens/m3/mdc/_form-field.scss +25 -0
  60. package/core/tokens/m3/mdc/_icon-button.scss +39 -0
  61. package/core/tokens/m3/mdc/_linear-progress.scss +32 -0
  62. package/core/tokens/m3/mdc/_list.scss +37 -0
  63. package/core/tokens/m3/mdc/_outlined-button.scss +83 -0
  64. package/core/tokens/m3/mdc/_outlined-card.scss +15 -0
  65. package/core/tokens/m3/mdc/_outlined-text-field.scss +85 -0
  66. package/core/tokens/m3/mdc/_plain-tooltip.scss +15 -0
  67. package/core/tokens/m3/mdc/_protected-button.scss +84 -0
  68. package/core/tokens/m3/mdc/_radio.scss +46 -0
  69. package/core/tokens/m3/mdc/_slider.scss +61 -0
  70. package/core/tokens/m3/mdc/_snack-bar.scss +15 -0
  71. package/core/tokens/m3/mdc/_switch.scss +70 -0
  72. package/core/tokens/m3/mdc/_tab-indicator.scss +33 -0
  73. package/core/tokens/m3/mdc/_tab.scss +15 -0
  74. package/core/tokens/m3/mdc/_text-button.scss +79 -0
  75. package/dialog/index.d.ts +4 -3
  76. package/esm2022/autocomplete/autocomplete-origin.mjs +4 -4
  77. package/esm2022/autocomplete/autocomplete-trigger.mjs +4 -4
  78. package/esm2022/autocomplete/autocomplete.mjs +4 -4
  79. package/esm2022/autocomplete/module.mjs +5 -5
  80. package/esm2022/badge/badge-module.mjs +5 -5
  81. package/esm2022/badge/badge.mjs +7 -7
  82. package/esm2022/bottom-sheet/bottom-sheet-container.mjs +4 -4
  83. package/esm2022/bottom-sheet/bottom-sheet-module.mjs +5 -5
  84. package/esm2022/bottom-sheet/bottom-sheet.mjs +4 -4
  85. package/esm2022/button/button-base.mjs +7 -7
  86. package/esm2022/button/button.mjs +7 -7
  87. package/esm2022/button/fab.mjs +13 -13
  88. package/esm2022/button/icon-button.mjs +8 -8
  89. package/esm2022/button/module.mjs +5 -5
  90. package/esm2022/button-toggle/button-toggle-module.mjs +5 -5
  91. package/esm2022/button-toggle/button-toggle.mjs +7 -7
  92. package/esm2022/card/card.mjs +43 -43
  93. package/esm2022/card/module.mjs +5 -5
  94. package/esm2022/checkbox/checkbox-required-validator.mjs +4 -4
  95. package/esm2022/checkbox/checkbox.mjs +4 -4
  96. package/esm2022/checkbox/module.mjs +9 -9
  97. package/esm2022/chips/chip-action.mjs +4 -4
  98. package/esm2022/chips/chip-edit-input.mjs +4 -4
  99. package/esm2022/chips/chip-grid.mjs +4 -4
  100. package/esm2022/chips/chip-icons.mjs +10 -10
  101. package/esm2022/chips/chip-input.mjs +4 -4
  102. package/esm2022/chips/chip-listbox.mjs +4 -4
  103. package/esm2022/chips/chip-option.mjs +6 -6
  104. package/esm2022/chips/chip-row.mjs +6 -6
  105. package/esm2022/chips/chip-set.mjs +4 -4
  106. package/esm2022/chips/chip.mjs +5 -5
  107. package/esm2022/chips/module.mjs +5 -5
  108. package/esm2022/core/common-behaviors/common-module.mjs +5 -5
  109. package/esm2022/core/datetime/index.mjs +9 -9
  110. package/esm2022/core/datetime/native-date-adapter.mjs +4 -4
  111. package/esm2022/core/error/error-options.mjs +7 -7
  112. package/esm2022/core/internal-form-field/internal-form-field.mjs +4 -4
  113. package/esm2022/core/line/line.mjs +8 -8
  114. package/esm2022/core/option/index.mjs +5 -5
  115. package/esm2022/core/option/optgroup.mjs +4 -4
  116. package/esm2022/core/option/option.mjs +4 -4
  117. package/esm2022/core/private/ripple-loader.mjs +4 -4
  118. package/esm2022/core/ripple/index.mjs +5 -5
  119. package/esm2022/core/ripple/ripple.mjs +4 -4
  120. package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox-module.mjs +5 -5
  121. package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +4 -4
  122. package/esm2022/core/version.mjs +1 -1
  123. package/esm2022/datepicker/calendar-body.mjs +4 -4
  124. package/esm2022/datepicker/calendar.mjs +7 -7
  125. package/esm2022/datepicker/date-range-input-parts.mjs +10 -10
  126. package/esm2022/datepicker/date-range-input.mjs +4 -4
  127. package/esm2022/datepicker/date-range-picker.mjs +4 -4
  128. package/esm2022/datepicker/date-range-selection-strategy.mjs +4 -4
  129. package/esm2022/datepicker/date-selection-model.mjs +10 -10
  130. package/esm2022/datepicker/datepicker-actions.mjs +10 -10
  131. package/esm2022/datepicker/datepicker-base.mjs +7 -7
  132. package/esm2022/datepicker/datepicker-input-base.mjs +4 -4
  133. package/esm2022/datepicker/datepicker-input.mjs +4 -4
  134. package/esm2022/datepicker/datepicker-intl.mjs +4 -4
  135. package/esm2022/datepicker/datepicker-module.mjs +5 -5
  136. package/esm2022/datepicker/datepicker-toggle.mjs +7 -7
  137. package/esm2022/datepicker/datepicker.mjs +4 -4
  138. package/esm2022/datepicker/month-view.mjs +4 -4
  139. package/esm2022/datepicker/multi-year-view.mjs +4 -4
  140. package/esm2022/datepicker/year-view.mjs +4 -4
  141. package/esm2022/dialog/dialog-container.mjs +4 -4
  142. package/esm2022/dialog/dialog-content-directives.mjs +19 -16
  143. package/esm2022/dialog/dialog.mjs +4 -4
  144. package/esm2022/dialog/module.mjs +5 -5
  145. package/esm2022/divider/divider-module.mjs +5 -5
  146. package/esm2022/divider/divider.mjs +4 -4
  147. package/esm2022/expansion/accordion.mjs +4 -4
  148. package/esm2022/expansion/expansion-module.mjs +5 -5
  149. package/esm2022/expansion/expansion-panel-content.mjs +4 -4
  150. package/esm2022/expansion/expansion-panel-header.mjs +10 -10
  151. package/esm2022/expansion/expansion-panel.mjs +7 -7
  152. package/esm2022/form-field/directives/error.mjs +4 -4
  153. package/esm2022/form-field/directives/floating-label.mjs +4 -4
  154. package/esm2022/form-field/directives/hint.mjs +4 -4
  155. package/esm2022/form-field/directives/label.mjs +4 -4
  156. package/esm2022/form-field/directives/line-ripple.mjs +4 -4
  157. package/esm2022/form-field/directives/notched-outline.mjs +4 -4
  158. package/esm2022/form-field/directives/prefix.mjs +4 -4
  159. package/esm2022/form-field/directives/suffix.mjs +4 -4
  160. package/esm2022/form-field/form-field-control.mjs +4 -4
  161. package/esm2022/form-field/form-field.mjs +4 -4
  162. package/esm2022/form-field/module.mjs +5 -5
  163. package/esm2022/grid-list/grid-list-module.mjs +5 -5
  164. package/esm2022/grid-list/grid-list.mjs +4 -4
  165. package/esm2022/grid-list/grid-tile.mjs +16 -16
  166. package/esm2022/icon/icon-module.mjs +5 -5
  167. package/esm2022/icon/icon-registry.mjs +4 -4
  168. package/esm2022/icon/icon.mjs +4 -4
  169. package/esm2022/icon/testing/fake-icon-registry.mjs +8 -8
  170. package/esm2022/input/input.mjs +4 -4
  171. package/esm2022/input/module.mjs +5 -5
  172. package/esm2022/list/action-list.mjs +4 -4
  173. package/esm2022/list/list-base.mjs +7 -7
  174. package/esm2022/list/list-item-sections.mjs +19 -19
  175. package/esm2022/list/list-module.mjs +5 -5
  176. package/esm2022/list/list-option.mjs +4 -4
  177. package/esm2022/list/list.mjs +7 -7
  178. package/esm2022/list/nav-list.mjs +4 -4
  179. package/esm2022/list/selection-list.mjs +4 -4
  180. package/esm2022/list/subheader.mjs +4 -4
  181. package/esm2022/menu/menu-content.mjs +4 -4
  182. package/esm2022/menu/menu-item.mjs +4 -4
  183. package/esm2022/menu/menu-trigger.mjs +4 -4
  184. package/esm2022/menu/menu.mjs +4 -4
  185. package/esm2022/menu/module.mjs +5 -5
  186. package/esm2022/paginator/module.mjs +5 -5
  187. package/esm2022/paginator/paginator-intl.mjs +4 -4
  188. package/esm2022/paginator/paginator.mjs +4 -4
  189. package/esm2022/progress-bar/module.mjs +5 -5
  190. package/esm2022/progress-bar/progress-bar.mjs +4 -4
  191. package/esm2022/progress-spinner/module.mjs +5 -5
  192. package/esm2022/progress-spinner/progress-spinner.mjs +4 -4
  193. package/esm2022/radio/module.mjs +5 -5
  194. package/esm2022/radio/radio.mjs +7 -7
  195. package/esm2022/select/module.mjs +5 -5
  196. package/esm2022/select/select.mjs +7 -7
  197. package/esm2022/sidenav/drawer.mjs +10 -10
  198. package/esm2022/sidenav/sidenav-module.mjs +5 -5
  199. package/esm2022/sidenav/sidenav.mjs +10 -10
  200. package/esm2022/slide-toggle/module.mjs +9 -9
  201. package/esm2022/slide-toggle/slide-toggle-required-validator.mjs +4 -4
  202. package/esm2022/slide-toggle/slide-toggle.mjs +6 -6
  203. package/esm2022/slider/module.mjs +5 -5
  204. package/esm2022/slider/slider-input.mjs +7 -7
  205. package/esm2022/slider/slider-thumb.mjs +4 -4
  206. package/esm2022/slider/slider.mjs +4 -4
  207. package/esm2022/snack-bar/module.mjs +5 -5
  208. package/esm2022/snack-bar/simple-snack-bar.mjs +4 -4
  209. package/esm2022/snack-bar/snack-bar-container.mjs +4 -4
  210. package/esm2022/snack-bar/snack-bar-content.mjs +10 -10
  211. package/esm2022/snack-bar/snack-bar.mjs +4 -4
  212. package/esm2022/sort/sort-header-intl.mjs +4 -4
  213. package/esm2022/sort/sort-header.mjs +4 -4
  214. package/esm2022/sort/sort-module.mjs +5 -5
  215. package/esm2022/sort/sort.mjs +4 -4
  216. package/esm2022/stepper/step-content.mjs +4 -4
  217. package/esm2022/stepper/step-header.mjs +4 -4
  218. package/esm2022/stepper/step-label.mjs +4 -4
  219. package/esm2022/stepper/stepper-button.mjs +7 -7
  220. package/esm2022/stepper/stepper-icon.mjs +4 -4
  221. package/esm2022/stepper/stepper-intl.mjs +4 -4
  222. package/esm2022/stepper/stepper-module.mjs +5 -5
  223. package/esm2022/stepper/stepper.mjs +7 -7
  224. package/esm2022/table/cell.mjs +22 -22
  225. package/esm2022/table/module.mjs +5 -5
  226. package/esm2022/table/row.mjs +22 -22
  227. package/esm2022/table/table.mjs +7 -7
  228. package/esm2022/table/text-column.mjs +4 -4
  229. package/esm2022/tabs/ink-bar.mjs +4 -4
  230. package/esm2022/tabs/module.mjs +5 -5
  231. package/esm2022/tabs/paginated-tab-header.mjs +4 -4
  232. package/esm2022/tabs/tab-body.mjs +7 -7
  233. package/esm2022/tabs/tab-content.mjs +4 -4
  234. package/esm2022/tabs/tab-group.mjs +4 -4
  235. package/esm2022/tabs/tab-header.mjs +4 -4
  236. package/esm2022/tabs/tab-label-wrapper.mjs +4 -4
  237. package/esm2022/tabs/tab-label.mjs +4 -4
  238. package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +10 -10
  239. package/esm2022/tabs/tab.mjs +4 -4
  240. package/esm2022/toolbar/toolbar-module.mjs +5 -5
  241. package/esm2022/toolbar/toolbar.mjs +7 -7
  242. package/esm2022/tooltip/module.mjs +5 -5
  243. package/esm2022/tooltip/tooltip.mjs +11 -8
  244. package/esm2022/tree/node.mjs +10 -10
  245. package/esm2022/tree/outlet.mjs +4 -4
  246. package/esm2022/tree/padding.mjs +4 -4
  247. package/esm2022/tree/toggle.mjs +4 -4
  248. package/esm2022/tree/tree-module.mjs +5 -5
  249. package/esm2022/tree/tree.mjs +4 -4
  250. package/fesm2022/autocomplete.mjs +13 -13
  251. package/fesm2022/autocomplete.mjs.map +1 -1
  252. package/fesm2022/badge.mjs +10 -10
  253. package/fesm2022/badge.mjs.map +1 -1
  254. package/fesm2022/bottom-sheet.mjs +10 -10
  255. package/fesm2022/bottom-sheet.mjs.map +1 -1
  256. package/fesm2022/button-toggle.mjs +10 -10
  257. package/fesm2022/button-toggle.mjs.map +1 -1
  258. package/fesm2022/button.mjs +35 -35
  259. package/fesm2022/button.mjs.map +1 -1
  260. package/fesm2022/card.mjs +46 -46
  261. package/fesm2022/card.mjs.map +1 -1
  262. package/fesm2022/checkbox.mjs +14 -14
  263. package/fesm2022/checkbox.mjs.map +1 -1
  264. package/fesm2022/chips.mjs +45 -45
  265. package/fesm2022/chips.mjs.map +1 -1
  266. package/fesm2022/core.mjs +59 -59
  267. package/fesm2022/core.mjs.map +1 -1
  268. package/fesm2022/datepicker.mjs +82 -82
  269. package/fesm2022/datepicker.mjs.map +1 -1
  270. package/fesm2022/dialog.mjs +28 -25
  271. package/fesm2022/dialog.mjs.map +1 -1
  272. package/fesm2022/divider.mjs +7 -7
  273. package/fesm2022/divider.mjs.map +1 -1
  274. package/fesm2022/expansion.mjs +25 -25
  275. package/fesm2022/expansion.mjs.map +1 -1
  276. package/fesm2022/form-field.mjs +34 -34
  277. package/fesm2022/form-field.mjs.map +1 -1
  278. package/fesm2022/grid-list.mjs +22 -22
  279. package/fesm2022/grid-list.mjs.map +1 -1
  280. package/fesm2022/icon/testing.mjs +7 -7
  281. package/fesm2022/icon/testing.mjs.map +1 -1
  282. package/fesm2022/icon.mjs +10 -10
  283. package/fesm2022/icon.mjs.map +1 -1
  284. package/fesm2022/input.mjs +7 -7
  285. package/fesm2022/input.mjs.map +1 -1
  286. package/fesm2022/list.mjs +49 -49
  287. package/fesm2022/list.mjs.map +1 -1
  288. package/fesm2022/menu.mjs +16 -16
  289. package/fesm2022/menu.mjs.map +1 -1
  290. package/fesm2022/paginator.mjs +10 -10
  291. package/fesm2022/paginator.mjs.map +1 -1
  292. package/fesm2022/progress-bar.mjs +7 -7
  293. package/fesm2022/progress-bar.mjs.map +1 -1
  294. package/fesm2022/progress-spinner.mjs +7 -7
  295. package/fesm2022/progress-spinner.mjs.map +1 -1
  296. package/fesm2022/radio.mjs +10 -10
  297. package/fesm2022/radio.mjs.map +1 -1
  298. package/fesm2022/select.mjs +10 -10
  299. package/fesm2022/select.mjs.map +1 -1
  300. package/fesm2022/sidenav.mjs +22 -22
  301. package/fesm2022/sidenav.mjs.map +1 -1
  302. package/fesm2022/slide-toggle.mjs +16 -16
  303. package/fesm2022/slide-toggle.mjs.map +1 -1
  304. package/fesm2022/slider.mjs +16 -16
  305. package/fesm2022/slider.mjs.map +1 -1
  306. package/fesm2022/snack-bar.mjs +22 -22
  307. package/fesm2022/snack-bar.mjs.map +1 -1
  308. package/fesm2022/sort.mjs +13 -13
  309. package/fesm2022/sort.mjs.map +1 -1
  310. package/fesm2022/stepper.mjs +31 -31
  311. package/fesm2022/stepper.mjs.map +1 -1
  312. package/fesm2022/table.mjs +55 -55
  313. package/fesm2022/table.mjs.map +1 -1
  314. package/fesm2022/tabs.mjs +43 -43
  315. package/fesm2022/tabs.mjs.map +1 -1
  316. package/fesm2022/toolbar.mjs +10 -10
  317. package/fesm2022/toolbar.mjs.map +1 -1
  318. package/fesm2022/tooltip.mjs +14 -11
  319. package/fesm2022/tooltip.mjs.map +1 -1
  320. package/fesm2022/tree.mjs +25 -25
  321. package/fesm2022/tree.mjs.map +1 -1
  322. package/package.json +2 -2
  323. package/prebuilt-themes/azure-blue.css +1 -1
  324. package/prebuilt-themes/cyan-orange.css +1 -1
  325. package/prebuilt-themes/deeppurple-amber.css +1 -1
  326. package/prebuilt-themes/indigo-pink.css +1 -1
  327. package/prebuilt-themes/magenta-violet.css +1 -1
  328. package/prebuilt-themes/pink-bluegrey.css +1 -1
  329. package/prebuilt-themes/purple-green.css +1 -1
  330. package/prebuilt-themes/rose-red.css +1 -1
  331. package/schematics/ng-add/index.js +1 -1
  332. package/schematics/ng-add/index.mjs +1 -1
  333. package/schematics/ng-generate/m3-theme/index_bundled.js +4 -3
  334. package/schematics/ng-generate/m3-theme/index_bundled.js.map +2 -2
  335. package/schematics/ng-generate/m3-theme/schema.json +3 -20
  336. package/core/tokens/_custom-tokens.scss +0 -1918
@@ -0,0 +1,22 @@
1
+ @use 'sass:map';
2
+ @use '../../../style/sass-utils';
3
+ @use '../../token-utils';
4
+
5
+ // The prefix used to generate the fully qualified name for tokens in this file.
6
+ $prefix: (mat, optgroup);
7
+
8
+ /// Generates custom tokens for the mat-optgroup.
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-optgroup
13
+ @function get-tokens($systems, $exclude-hardcoded, $token-slots) {
14
+ $tokens: sass-utils.merge-all(
15
+ token-utils.generate-typography-tokens($systems, label-text, title-small),
16
+ (
17
+ label-text-color: map.get($systems, md-sys-color, on-surface-variant),
18
+ )
19
+ );
20
+
21
+ @return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
22
+ }
@@ -0,0 +1,55 @@
1
+ @use 'sass:map';
2
+ @use '../../../style/sass-utils';
3
+ @use '../../token-utils';
4
+
5
+ // The prefix used to generate the fully qualified name for tokens in this file.
6
+ $prefix: (mat, option);
7
+
8
+ /// Generates custom tokens for the mat-option.
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-option
13
+ @function get-tokens($systems, $exclude-hardcoded, $token-slots) {
14
+ $tokens: ((
15
+ selected-state-label-text-color: map.get($systems, md-sys-color, on-secondary-container),
16
+ label-text-color: map.get($systems, md-sys-color, on-surface),
17
+ hover-state-layer-color: sass-utils.safe-color-change(
18
+ map.get($systems, md-sys-color, on-surface),
19
+ $alpha: map.get($systems, md-sys-state, hover-state-layer-opacity)
20
+ ),
21
+ focus-state-layer-color: sass-utils.safe-color-change(
22
+ map.get($systems, md-sys-color, on-surface),
23
+ $alpha: map.get($systems, md-sys-state, focus-state-layer-opacity)
24
+ ),
25
+ selected-state-layer-color: map.get($systems, md-sys-color, secondary-container),
26
+
27
+ // According to the spec the options have to be `label-large` in all typography
28
+ // dimensions, however this is inconsistent with the designs and with MDC's
29
+ // own implementation. This appears to be a bug in the spec, because MDC overrides
30
+ // the font size and weight to be `body-large` (see b/261838263). We make the same
31
+ // override here so the label looks correct.
32
+ label-text-size: map.get($systems, md-sys-typescale, body-large-size),
33
+ label-text-weight: map.get($systems, md-sys-typescale, body-large-weight),
34
+ label-text-font: map.get($systems, md-sys-typescale, label-large-font),
35
+ label-text-line-height: map.get($systems, md-sys-typescale, label-large-line-height),
36
+ label-text-tracking: map.get($systems, md-sys-typescale, label-large-tracking),
37
+ ), (
38
+ // Color variants:
39
+ primary: (
40
+ selected-state-label-text-color: map.get($systems, md-sys-color, on-primary-container),
41
+ selected-state-layer-color: map.get($systems, md-sys-color, primary-container),
42
+ ),
43
+ secondary: (), // Default, no overrides needed
44
+ tertiary: (
45
+ selected-state-label-text-color: map.get($systems, md-sys-color, on-tertiary-container),
46
+ selected-state-layer-color: map.get($systems, md-sys-color, tertiary-container),
47
+ ),
48
+ error: (
49
+ selected-state-label-text-color: map.get($systems, md-sys-color, on-error-container),
50
+ selected-state-layer-color: map.get($systems, md-sys-color, error-container),
51
+ )
52
+ ));
53
+
54
+ @return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
55
+ }
@@ -0,0 +1,54 @@
1
+ @use 'sass:map';
2
+ @use '../../../style/sass-utils';
3
+ @use '../../token-utils';
4
+
5
+ // The prefix used to generate the fully qualified name for tokens in this file.
6
+ $prefix: (mat, outlined-button);
7
+
8
+ /// Generates custom tokens for the mat-outlined-button.
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-outlined-button
13
+ @function get-tokens($systems, $exclude-hardcoded, $token-slots) {
14
+ $tokens: ((
15
+ horizontal-padding: token-utils.hardcode(24px, $exclude-hardcoded),
16
+ icon-spacing: token-utils.hardcode(8px, $exclude-hardcoded),
17
+ icon-offset: token-utils.hardcode(-8px, $exclude-hardcoded),
18
+ state-layer-color: map.get($systems, md-sys-color, primary),
19
+ disabled-state-layer-color: map.get($systems, md-sys-color, on-surface-variant),
20
+ ripple-color: sass-utils.safe-color-change(
21
+ map.get($systems, md-sys-color, primary),
22
+ $alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
23
+ ),
24
+ hover-state-layer-opacity: map.get($systems, md-sys-state, hover-state-layer-opacity),
25
+ focus-state-layer-opacity: map.get($systems, md-sys-state, focus-state-layer-opacity),
26
+ pressed-state-layer-opacity: map.get($systems, md-sys-state, pressed-state-layer-opacity),
27
+ ), (
28
+ // Color variants:
29
+ primary: (), // Default, no overrides needed.
30
+ secondary: (
31
+ state-layer-color: map.get($systems, md-sys-color, secondary),
32
+ ripple-color: sass-utils.safe-color-change(
33
+ map.get($systems, md-sys-color, secondary),
34
+ $alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
35
+ ),
36
+ ),
37
+ tertiary: (
38
+ state-layer-color: map.get($systems, md-sys-color, tertiary),
39
+ ripple-color: sass-utils.safe-color-change(
40
+ map.get($systems, md-sys-color, tertiary),
41
+ $alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
42
+ ),
43
+ ),
44
+ error: (
45
+ state-layer-color: map.get($systems, md-sys-color, error),
46
+ ripple-color: sass-utils.safe-color-change(
47
+ map.get($systems, md-sys-color, error),
48
+ $alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
49
+ ),
50
+ )
51
+ ));
52
+
53
+ @return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
54
+ }
@@ -0,0 +1,27 @@
1
+ @use 'sass:map';
2
+ @use '../../../style/sass-utils';
3
+ @use '../../token-utils';
4
+
5
+ // The prefix used to generate the fully qualified name for tokens in this file.
6
+ $prefix: (mat, paginator);
7
+
8
+ /// Generates custom tokens for the mat-paginator.
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-paginator
13
+ @function get-tokens($systems, $exclude-hardcoded, $token-slots) {
14
+ $tokens: sass-utils.merge-all(
15
+ token-utils.generate-typography-tokens($systems, container-text, body-small),
16
+ (
17
+ container-text-color: map.get($systems, md-sys-color, on-surface),
18
+ container-background-color: map.get($systems, md-sys-color, surface),
19
+ enabled-icon-color: map.get($systems, md-sys-color, on-surface-variant),
20
+ disabled-icon-color: sass-utils.safe-color-change(
21
+ map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
22
+ select-trigger-text-size: map.get($systems, md-sys-typescale, body-small-size),
23
+ )
24
+ );
25
+
26
+ @return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
27
+ }
@@ -0,0 +1,55 @@
1
+ @use 'sass:map';
2
+ @use '../../../style/sass-utils';
3
+ @use '../../token-utils';
4
+
5
+ // The prefix used to generate the fully qualified name for tokens in this file.
6
+ // Note: in M3 the "protected" button is called "elevated".
7
+ $prefix: (mat, protected-button);
8
+
9
+ /// Generates custom tokens for the mat-raised-button.
10
+ /// @param {Map} $systems The MDC system tokens
11
+ /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
12
+ /// @param {Map} $token-slots Possible token slots
13
+ /// @return {Map} A set of custom tokens for the mat-raised-button
14
+ @function get-tokens($systems, $exclude-hardcoded, $token-slots) {
15
+ $tokens: ((
16
+ horizontal-padding: token-utils.hardcode(24px, $exclude-hardcoded),
17
+ icon-spacing: token-utils.hardcode(8px, $exclude-hardcoded),
18
+ icon-offset: token-utils.hardcode(-8px, $exclude-hardcoded),
19
+ state-layer-color: map.get($systems, md-sys-color, primary),
20
+ disabled-state-layer-color: map.get($systems, md-sys-color, on-surface-variant),
21
+ ripple-color: sass-utils.safe-color-change(
22
+ map.get($systems, md-sys-color, primary),
23
+ $alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
24
+ ),
25
+ hover-state-layer-opacity: map.get($systems, md-sys-state, hover-state-layer-opacity),
26
+ focus-state-layer-opacity: map.get($systems, md-sys-state, focus-state-layer-opacity),
27
+ pressed-state-layer-opacity: map.get($systems, md-sys-state, pressed-state-layer-opacity),
28
+ ), (
29
+ // Color variants:
30
+ primary: (), // Default, no overrides needed.
31
+ secondary: (
32
+ state-layer-color: map.get($systems, md-sys-color, secondary),
33
+ ripple-color: sass-utils.safe-color-change(
34
+ map.get($systems, md-sys-color, secondary),
35
+ $alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
36
+ ),
37
+ ),
38
+ tertiary: (
39
+ state-layer-color: map.get($systems, md-sys-color, tertiary),
40
+ ripple-color: sass-utils.safe-color-change(
41
+ map.get($systems, md-sys-color, tertiary),
42
+ $alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
43
+ ),
44
+ ),
45
+ error: (
46
+ state-layer-color: map.get($systems, md-sys-color, error),
47
+ ripple-color: sass-utils.safe-color-change(
48
+ map.get($systems, md-sys-color, error),
49
+ $alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
50
+ ),
51
+ )
52
+ ));
53
+
54
+ @return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
55
+ }
@@ -0,0 +1,34 @@
1
+ @use 'sass:map';
2
+ @use '../../../style/sass-utils';
3
+ @use '../../token-utils';
4
+
5
+ // The prefix used to generate the fully qualified name for tokens in this file.
6
+ $prefix: (mat, radio);
7
+
8
+ /// Generates custom tokens for the mat-radio.
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-radio
13
+ @function get-tokens($systems, $exclude-hardcoded, $token-slots) {
14
+ $tokens: ((
15
+ ripple-color: map.get($systems, md-sys-color, on-surface),
16
+ checked-ripple-color: map.get($systems, md-sys-color, primary),
17
+ disabled-label-color: sass-utils.safe-color-change(
18
+ map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
19
+ ), (
20
+ // Color variants:
21
+ primary: (), // Default, no overrides needed
22
+ secondary: (
23
+ checked-ripple-color: map.get($systems, md-sys-color, secondary),
24
+ ),
25
+ tertiary: (
26
+ checked-ripple-color: map.get($systems, md-sys-color, tertiary),
27
+ ),
28
+ error: (
29
+ checked-ripple-color: map.get($systems, md-sys-color, error),
30
+ ),
31
+ ));
32
+
33
+ @return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
34
+ }
@@ -0,0 +1,19 @@
1
+ @use 'sass:map';
2
+ @use '../../../style/sass-utils';
3
+ @use '../../token-utils';
4
+
5
+ // The prefix used to generate the fully qualified name for tokens in this file.
6
+ $prefix: (mat, ripple);
7
+
8
+ /// 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
+ );
17
+
18
+ @return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
19
+ }
@@ -0,0 +1,46 @@
1
+ @use 'sass:map';
2
+ @use '../../../style/sass-utils';
3
+ @use '../../token-utils';
4
+ @use '@material/elevation' as mdc-elevation;
5
+
6
+ // The prefix used to generate the fully qualified name for tokens in this file.
7
+ $prefix: (mat, select);
8
+
9
+ /// Generates custom tokens for the mat-select.
10
+ /// @param {Map} $systems The MDC system tokens
11
+ /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
12
+ /// @param {Map} $token-slots Possible token slots
13
+ /// @return {Map} A set of custom tokens for the mat-select
14
+ @function get-tokens($systems, $exclude-hardcoded, $token-slots) {
15
+ $tokens: sass-utils.merge-all(
16
+ token-utils.generate-typography-tokens($systems, trigger-text, body-large),
17
+ (
18
+ panel-background-color: map.get($systems, md-sys-color, surface-container),
19
+ enabled-trigger-text-color: map.get($systems, md-sys-color, on-surface),
20
+ disabled-trigger-text-color: sass-utils.safe-color-change(
21
+ map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
22
+ placeholder-text-color: map.get($systems, md-sys-color, on-surface-variant),
23
+ enabled-arrow-color: map.get($systems, md-sys-color, on-surface-variant),
24
+ disabled-arrow-color: sass-utils.safe-color-change(
25
+ map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
26
+ focused-arrow-color: map.get($systems, md-sys-color, primary),
27
+ invalid-arrow-color: map.get($systems, md-sys-color, error),
28
+ container-elevation-shadow:
29
+ token-utils.hardcode(mdc-elevation.elevation-box-shadow(2), $exclude-hardcoded),
30
+ )
31
+ ), (
32
+ // Color variants:
33
+ primary: (), // Default, no overrides needed
34
+ secondary: (
35
+ focused-arrow-color: map.get($systems, md-sys-color, secondary),
36
+ ),
37
+ tertiary: (
38
+ focused-arrow-color: map.get($systems, md-sys-color, tertiary),
39
+ ),
40
+ error: (
41
+ focused-arrow-color: map.get($systems, md-sys-color, error),
42
+ )
43
+ );
44
+
45
+ @return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
46
+ }
@@ -0,0 +1,28 @@
1
+ @use 'sass:map';
2
+ @use '../../../style/sass-utils';
3
+ @use '../../token-utils';
4
+
5
+ // The prefix used to generate the fully qualified name for tokens in this file.
6
+ $prefix: (mat, sidenav);
7
+
8
+ /// Generates custom tokens for the mat-sidenav.
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-sidenav
13
+ @function get-tokens($systems, $exclude-hardcoded, $token-slots) {
14
+ $tokens: (
15
+ container-elevation-shadow: token-utils.hardcode(none, $exclude-hardcoded),
16
+ container-divider-color: token-utils.hardcode(transparent, $exclude-hardcoded),
17
+ container-width: token-utils.hardcode(360px, $exclude-hardcoded),
18
+ container-shape: map.get($systems, md-sys-shape, corner-large),
19
+ container-background-color: map.get($systems, md-sys-color, surface),
20
+ container-text-color: map.get($systems, md-sys-color, on-surface-variant),
21
+ content-background-color: map.get($systems, md-sys-color, background),
22
+ content-text-color: map.get($systems, md-sys-color, on-background),
23
+ scrim-color: sass-utils.safe-color-change(
24
+ map.get($systems, md-ref-palette, neutral-variant20), $alpha: 0.4),
25
+ );
26
+
27
+ @return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
28
+ }
@@ -0,0 +1,56 @@
1
+ @use 'sass:map';
2
+ @use '../../../style/sass-utils';
3
+ @use '../../token-utils';
4
+
5
+ // The prefix used to generate the fully qualified name for tokens in this file.
6
+ $prefix: (mat, slider);
7
+
8
+ /// Generates custom tokens for the mat-slider.
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-slider
13
+ @function get-tokens($systems, $exclude-hardcoded, $token-slots) {
14
+ $tokens: ((
15
+ ripple-color: map.get($systems, md-sys-color, primary),
16
+ hover-state-layer-color: sass-utils.safe-color-change(
17
+ map.get($systems, md-sys-color, primary), $alpha: 0.05),
18
+ focus-state-layer-color: sass-utils.safe-color-change(
19
+ map.get($systems, md-sys-color, primary), $alpha: 0.2),
20
+ value-indicator-opacity: token-utils.hardcode(1, $exclude-hardcoded),
21
+ value-indicator-padding: token-utils.hardcode(0, $exclude-hardcoded),
22
+ value-indicator-width: token-utils.hardcode(28px, $exclude-hardcoded),
23
+ value-indicator-height: token-utils.hardcode(28px, $exclude-hardcoded),
24
+ value-indicator-caret-display: token-utils.hardcode(none, $exclude-hardcoded),
25
+ value-indicator-border-radius: token-utils.hardcode(50% 50% 50% 0, $exclude-hardcoded),
26
+ value-indicator-text-transform: token-utils.hardcode(rotate(45deg), $exclude-hardcoded),
27
+ value-indicator-container-transform:
28
+ token-utils.hardcode(translateX(-50%) rotate(-45deg), $exclude-hardcoded)
29
+ ), (
30
+ // Color variants
31
+ primary: (), // Default, no overrides needed
32
+ secondary: (
33
+ ripple-color: map.get($systems, md-sys-color, secondary),
34
+ hover-state-layer-color: sass-utils.safe-color-change(
35
+ map.get($systems, md-sys-color, secondary), $alpha: 0.05),
36
+ focus-state-layer-color: sass-utils.safe-color-change(
37
+ map.get($systems, md-sys-color, secondary), $alpha: 0.2),
38
+ ),
39
+ tertiary: (
40
+ ripple-color: map.get($systems, md-sys-color, tertiary),
41
+ hover-state-layer-color: sass-utils.safe-color-change(
42
+ map.get($systems, md-sys-color, tertiary), $alpha: 0.05),
43
+ focus-state-layer-color: sass-utils.safe-color-change(
44
+ map.get($systems, md-sys-color, tertiary), $alpha: 0.2),
45
+ ),
46
+ error: (
47
+ ripple-color: map.get($systems, md-sys-color, error),
48
+ hover-state-layer-color: sass-utils.safe-color-change(
49
+ map.get($systems, md-sys-color, error), $alpha: 0.05),
50
+ focus-state-layer-color: sass-utils.safe-color-change(
51
+ map.get($systems, md-sys-color, error), $alpha: 0.2),
52
+ ),
53
+ ));
54
+
55
+ @return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
56
+ }
@@ -0,0 +1,18 @@
1
+ @use 'sass:map';
2
+ @use '../../token-utils';
3
+
4
+ // The prefix used to generate the fully qualified name for tokens in this file.
5
+ $prefix: (mat, snack-bar);
6
+
7
+ /// Generates custom tokens for the mat-snack-bar.
8
+ /// @param {Map} $systems The MDC system tokens
9
+ /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
10
+ /// @param {Map} $token-slots Possible token slots
11
+ /// @return {Map} A set of custom tokens for the mat-snack-bar
12
+ @function get-tokens($systems, $exclude-hardcoded, $token-slots) {
13
+ $tokens: (
14
+ button-color: map.get($systems, md-sys-color, inverse-primary),
15
+ );
16
+
17
+ @return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
18
+ }
@@ -0,0 +1,18 @@
1
+ @use 'sass:map';
2
+ @use '../../token-utils';
3
+
4
+ // The prefix used to generate the fully qualified name for tokens in this file.
5
+ $prefix: (mat, sort);
6
+
7
+ /// Generates custom tokens for the mat-sort.
8
+ /// @param {Map} $systems The MDC system tokens
9
+ /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
10
+ /// @param {Map} $token-slots Possible token slots
11
+ /// @return {Map} A set of custom tokens for the mat-sort
12
+ @function get-tokens($systems, $exclude-hardcoded, $token-slots) {
13
+ $tokens: (
14
+ arrow-color: map.get($systems, md-sys-color, on-surface),
15
+ );
16
+
17
+ @return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
18
+ }
@@ -0,0 +1,57 @@
1
+ @use 'sass:map';
2
+ @use '../../../style/sass-utils';
3
+ @use '../../token-utils';
4
+
5
+ // The prefix used to generate the fully qualified name for tokens in this file.
6
+ $prefix: (mat, standard-button-toggle);
7
+
8
+ /// Generates custom tokens for the mat-button-toggle.
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-button-toggle
13
+ @function get-tokens($systems, $exclude-hardcoded, $token-slots) {
14
+ $tokens: sass-utils.merge-all(
15
+ token-utils.generate-typography-tokens($systems, label-text, label-large),
16
+ (
17
+ shape: map.get($systems, md-sys-shape, corner-full),
18
+ hover-state-layer-opacity: map.get($systems, md-sys-state, hover-state-layer-opacity),
19
+ focus-state-layer-opacity: map.get($systems, md-sys-state, focus-state-layer-opacity),
20
+ text-color: map.get($systems, md-sys-color, on-surface),
21
+ background-color: token-utils.hardcode(transparent, $exclude-hardcoded),
22
+ state-layer-color: map.get($systems, md-sys-color, on-surface),
23
+ selected-state-background-color: map.get($systems, md-sys-color, secondary-container),
24
+ selected-state-text-color: map.get($systems, md-sys-color, on-secondary-container),
25
+ disabled-state-text-color: sass-utils.safe-color-change(
26
+ map.get($systems, md-sys-color, on-surface),
27
+ $alpha: 0.38,
28
+ ),
29
+ disabled-state-background-color: token-utils.hardcode(transparent, $exclude-hardcoded),
30
+ disabled-selected-state-text-color: sass-utils.safe-color-change(
31
+ map.get($systems, md-sys-color, on-surface),
32
+ $alpha: 0.38,
33
+ ),
34
+ disabled-selected-state-background-color: sass-utils.safe-color-change(
35
+ map.get($systems, md-sys-color, on-surface),
36
+ $alpha: 0.12,
37
+ ),
38
+ divider-color: map.get($systems, md-sys-color, outline),
39
+ ), (
40
+ // Color variants:
41
+ primary: (
42
+ selected-state-background-color: map.get($systems, md-sys-color, primary-container),
43
+ selected-state-text-color: map.get($systems, md-sys-color, on-primary-container),
44
+ ),
45
+ secondary: (), // Default, no overrides needed
46
+ tertiary: (
47
+ selected-state-background-color: map.get($systems, md-sys-color, tertiary-container),
48
+ selected-state-text-color: map.get($systems, md-sys-color, on-tertiary-container),
49
+ ),
50
+ error: (
51
+ selected-state-background-color: map.get($systems, md-sys-color, error-container),
52
+ selected-state-text-color: map.get($systems, md-sys-color, on-error-container),
53
+ )
54
+ ));
55
+
56
+ @return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
57
+ }
@@ -0,0 +1,79 @@
1
+ @use 'sass:map';
2
+ @use '../../../style/sass-utils';
3
+ @use '../../token-utils';
4
+
5
+ // The prefix used to generate the fully qualified name for tokens in this file.
6
+ $prefix: (mat, stepper);
7
+
8
+ /// Generates custom tokens for the mat-stepper.
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-stepper
13
+ @function get-tokens($systems, $exclude-hardcoded, $token-slots) {
14
+ $tokens: (
15
+ (
16
+ container-color: map.get($systems, md-sys-color, surface),
17
+ line-color: map.get($systems, md-sys-color, outline-variant),
18
+ header-hover-state-layer-color: sass-utils.safe-color-change(
19
+ map.get($systems, md-sys-color, inverse-surface),
20
+ $alpha: map.get($systems, md-sys-state, hover-state-layer-opacity)
21
+ ),
22
+ header-focus-state-layer-color: sass-utils.safe-color-change(
23
+ map.get($systems, md-sys-color, inverse-surface),
24
+ $alpha: map.get($systems, md-sys-state, focus-state-layer-opacity)
25
+ ),
26
+ header-label-text-color: map.get($systems, md-sys-color, on-surface-variant),
27
+ header-optional-label-text-color: map.get($systems, md-sys-color, on-surface-variant),
28
+ header-selected-state-label-text-color: map.get($systems, md-sys-color, on-surface-variant),
29
+ header-icon-background-color: map.get($systems, md-sys-color, on-surface-variant),
30
+ header-icon-foreground-color: map.get($systems, md-sys-color, surface),
31
+ header-edit-state-icon-background-color: map.get($systems, md-sys-color, primary),
32
+ header-edit-state-icon-foreground-color: map.get($systems, md-sys-color, on-primary),
33
+ header-error-state-label-text-color: map.get($systems, md-sys-color, error),
34
+ header-error-state-icon-foreground-color: map.get($systems, md-sys-color, error),
35
+ header-error-state-icon-background-color:
36
+ token-utils.hardcode(transparent, $exclude-hardcoded),
37
+ container-text-font: map.get($systems, md-sys-typescale, body-medium-font),
38
+ header-label-text-font: map.get($systems, md-sys-typescale, title-small-font),
39
+ header-label-text-size: map.get($systems, md-sys-typescale, title-small-size),
40
+ header-label-text-weight: map.get($systems, md-sys-typescale, title-small-weight),
41
+ header-error-state-label-text-size: map.get($systems, md-sys-typescale, title-small-size),
42
+ header-focus-state-layer-shape: map.get($systems, md-sys-shape, corner-medium),
43
+ header-hover-state-layer-shape: map.get($systems, md-sys-shape, corner-medium),
44
+ header-selected-state-label-text-size: map.get($systems, md-sys-typescale, title-small-size),
45
+ header-selected-state-label-text-weight: map.get(
46
+ $systems, md-sys-typescale, title-small-weight),
47
+ header-selected-state-icon-background-color: map.get($systems, md-sys-color, primary),
48
+ header-selected-state-icon-foreground-color: map.get($systems, md-sys-color, on-primary),
49
+ ), (
50
+ // Color variants
51
+ primary: (
52
+ header-edit-state-icon-background-color: map.get($systems, md-sys-color, primary),
53
+ header-edit-state-icon-foreground-color: map.get($systems, md-sys-color, on-primary),
54
+ header-selected-state-icon-background-color: map.get($systems, md-sys-color, primary),
55
+ header-selected-state-icon-foreground-color: map.get($systems, md-sys-color, on-primary),
56
+ ),
57
+ secondary: (
58
+ header-edit-state-icon-background-color: map.get($systems, md-sys-color, secondary),
59
+ header-edit-state-icon-foreground-color: map.get($systems, md-sys-color, on-secondary),
60
+ header-selected-state-icon-background-color: map.get($systems, md-sys-color, secondary),
61
+ header-selected-state-icon-foreground-color: map.get($systems, md-sys-color, on-secondary),
62
+ ),
63
+ tertiary: (
64
+ header-edit-state-icon-background-color: map.get($systems, md-sys-color, tertiary),
65
+ header-edit-state-icon-foreground-color: map.get($systems, md-sys-color, on-tertiary),
66
+ header-selected-state-icon-background-color: map.get($systems, md-sys-color, tertiary),
67
+ header-selected-state-icon-foreground-color: map.get($systems, md-sys-color, on-tertiary),
68
+ ),
69
+ error: (
70
+ header-edit-state-icon-background-color: map.get($systems, md-sys-color, error),
71
+ header-edit-state-icon-foreground-color: map.get($systems, md-sys-color, on-error),
72
+ header-selected-state-icon-background-color: map.get($systems, md-sys-color, error),
73
+ header-selected-state-icon-foreground-color: map.get($systems, md-sys-color, on-error),
74
+ )
75
+ )
76
+ );
77
+
78
+ @return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
79
+ }
@@ -0,0 +1,45 @@
1
+ @use 'sass:map';
2
+ @use '../../token-utils';
3
+
4
+ // The prefix used to generate the fully qualified name for tokens in this file.
5
+ $prefix: (mat, switch);
6
+
7
+ /// Generates custom tokens for the mat-slide-toggle.
8
+ /// @param {Map} $systems The MDC system tokens
9
+ /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
10
+ /// @param {Map} $token-slots Possible token slots
11
+ /// @return {Map} A set of custom tokens for the mat-slide-toggle
12
+ @function get-tokens($systems, $exclude-hardcoded, $token-slots) {
13
+ $tokens: (
14
+ disabled-selected-handle-opacity: token-utils.hardcode(1, $exclude-hardcoded),
15
+ disabled-unselected-handle-opacity: token-utils.hardcode(0.38, $exclude-hardcoded),
16
+ unselected-handle-size: token-utils.hardcode(16px, $exclude-hardcoded),
17
+ selected-handle-size: token-utils.hardcode(24px, $exclude-hardcoded),
18
+ with-icon-handle-size: token-utils.hardcode(24px, $exclude-hardcoded),
19
+ pressed-handle-size: token-utils.hardcode(28px, $exclude-hardcoded),
20
+ selected-handle-horizontal-margin: token-utils.hardcode(0 24px, $exclude-hardcoded),
21
+ selected-with-icon-handle-horizontal-margin: token-utils.hardcode(0 24px, $exclude-hardcoded),
22
+ selected-pressed-handle-horizontal-margin: token-utils.hardcode(0 22px, $exclude-hardcoded),
23
+ unselected-handle-horizontal-margin: token-utils.hardcode(0 8px, $exclude-hardcoded),
24
+ unselected-with-icon-handle-horizontal-margin: token-utils.hardcode(0 4px, $exclude-hardcoded),
25
+ unselected-pressed-handle-horizontal-margin: token-utils.hardcode(0 2px, $exclude-hardcoded),
26
+ // The hidden and visible track represent whichever track is visible or
27
+ // hidden in the ui. This could be the .mdc-switch__track :before or
28
+ // :after depending on whether the switch is selected or unselected.
29
+ //
30
+ // The m2 slide-toggle uses transforms to hide & show the tracks while
31
+ // the m3 slide-toggle uses opacity.
32
+ visible-track-opacity: token-utils.hardcode(1, $exclude-hardcoded),
33
+ hidden-track-opacity: token-utils.hardcode(0, $exclude-hardcoded),
34
+ visible-track-transition: token-utils.hardcode(opacity 75ms, $exclude-hardcoded),
35
+ hidden-track-transition: token-utils.hardcode(opacity 75ms, $exclude-hardcoded),
36
+ track-outline-width: token-utils.hardcode(2px, $exclude-hardcoded),
37
+ track-outline-color: map.get($systems, md-sys-color, outline),
38
+ selected-track-outline-width: token-utils.hardcode(2px, $exclude-hardcoded),
39
+ selected-track-outline-color: token-utils.hardcode(transparent, $exclude-hardcoded),
40
+ disabled-unselected-track-outline-width: token-utils.hardcode(2px, $exclude-hardcoded),
41
+ disabled-unselected-track-outline-color: map.get($systems, md-sys-color, on-surface),
42
+ );
43
+
44
+ @return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
45
+ }