@angular/material 17.1.2 → 17.2.0-next.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 (304) hide show
  1. package/_index.scss +4 -4
  2. package/badge/_badge-theme.scss +30 -11
  3. package/button/_button-base.scss +50 -10
  4. package/button/_button-theme.scss +92 -51
  5. package/button/_fab-theme.scss +82 -15
  6. package/button/_icon-button-theme.scss +11 -4
  7. package/button-toggle/_button-toggle-theme.scss +26 -11
  8. package/checkbox/_checkbox-theme.scss +41 -23
  9. package/chips/_chips-theme.scss +36 -9
  10. package/core/_core-theme.scss +85 -38
  11. package/core/mdc-helpers/_mdc-helpers.scss +0 -8
  12. package/core/option/_option-theme.scss +24 -10
  13. package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +64 -24
  14. package/core/tokens/_token-utils.scss +22 -0
  15. package/core/tokens/m2/_index.scss +16 -0
  16. package/core/tokens/m2/mat/_badge.scss +27 -1
  17. package/core/tokens/m2/mat/_checkbox.scss +45 -0
  18. package/core/tokens/m2/mat/_chip.scss +39 -0
  19. package/core/tokens/m2/mat/_dialog.scss +49 -0
  20. package/core/tokens/m2/mat/_fab-small.scss +95 -0
  21. package/core/tokens/m2/mat/_fab.scss +6 -1
  22. package/core/tokens/m2/mat/_filled-button.scss +17 -2
  23. package/core/tokens/m2/mat/_icon-button.scss +6 -1
  24. package/core/tokens/m2/mat/_outlined-button.scss +17 -2
  25. package/core/tokens/m2/mat/_protected-button.scss +17 -2
  26. package/core/tokens/m2/mat/_radio.scss +6 -1
  27. package/core/tokens/m2/mat/_stepper.scss +6 -1
  28. package/core/tokens/m2/mat/_text-button.scss +20 -2
  29. package/core/tokens/m2/mdc/_chip.scss +8 -8
  30. package/core/tokens/m2/mdc/_extended-fab.scss +3 -2
  31. package/core/tokens/m2/mdc/_fab-small.scss +90 -0
  32. package/core/tokens/m2/mdc/_fab.scss +0 -11
  33. package/core/tokens/m2/mdc/_icon-button.scss +15 -7
  34. package/datepicker/_datepicker-theme.scss +25 -9
  35. package/dialog/_dialog-theme.scss +10 -0
  36. package/dialog/index.d.ts +28 -9
  37. package/esm2022/autocomplete/autocomplete-origin.mjs +4 -4
  38. package/esm2022/autocomplete/autocomplete-trigger.mjs +4 -4
  39. package/esm2022/autocomplete/autocomplete.mjs +4 -4
  40. package/esm2022/autocomplete/module.mjs +5 -5
  41. package/esm2022/badge/badge-module.mjs +5 -5
  42. package/esm2022/badge/badge.mjs +8 -8
  43. package/esm2022/bottom-sheet/bottom-sheet-container.mjs +4 -4
  44. package/esm2022/bottom-sheet/bottom-sheet-module.mjs +5 -5
  45. package/esm2022/bottom-sheet/bottom-sheet.mjs +4 -4
  46. package/esm2022/button/button-base.mjs +7 -7
  47. package/esm2022/button/button.mjs +9 -9
  48. package/esm2022/button/fab.mjs +17 -17
  49. package/esm2022/button/icon-button.mjs +9 -9
  50. package/esm2022/button/module.mjs +5 -5
  51. package/esm2022/button-toggle/button-toggle-module.mjs +5 -5
  52. package/esm2022/button-toggle/button-toggle.mjs +7 -7
  53. package/esm2022/card/card.mjs +43 -43
  54. package/esm2022/card/module.mjs +5 -5
  55. package/esm2022/checkbox/checkbox-required-validator.mjs +4 -4
  56. package/esm2022/checkbox/checkbox.mjs +6 -6
  57. package/esm2022/checkbox/module.mjs +9 -9
  58. package/esm2022/chips/chip-action.mjs +4 -4
  59. package/esm2022/chips/chip-edit-input.mjs +4 -4
  60. package/esm2022/chips/chip-grid.mjs +4 -4
  61. package/esm2022/chips/chip-icons.mjs +10 -10
  62. package/esm2022/chips/chip-input.mjs +4 -4
  63. package/esm2022/chips/chip-listbox.mjs +4 -4
  64. package/esm2022/chips/chip-option.mjs +6 -6
  65. package/esm2022/chips/chip-row.mjs +6 -6
  66. package/esm2022/chips/chip-set.mjs +4 -4
  67. package/esm2022/chips/chip.mjs +5 -5
  68. package/esm2022/chips/module.mjs +5 -5
  69. package/esm2022/core/common-behaviors/common-module.mjs +5 -5
  70. package/esm2022/core/datetime/index.mjs +9 -9
  71. package/esm2022/core/datetime/native-date-adapter.mjs +4 -4
  72. package/esm2022/core/error/error-options.mjs +7 -7
  73. package/esm2022/core/internal-form-field/internal-form-field.mjs +4 -4
  74. package/esm2022/core/line/line.mjs +8 -8
  75. package/esm2022/core/option/index.mjs +5 -5
  76. package/esm2022/core/option/optgroup.mjs +4 -4
  77. package/esm2022/core/option/option.mjs +5 -5
  78. package/esm2022/core/private/ripple-loader.mjs +4 -4
  79. package/esm2022/core/ripple/index.mjs +5 -5
  80. package/esm2022/core/ripple/ripple.mjs +4 -4
  81. package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox-module.mjs +5 -5
  82. package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +4 -4
  83. package/esm2022/core/version.mjs +1 -1
  84. package/esm2022/datepicker/calendar-body.mjs +4 -4
  85. package/esm2022/datepicker/calendar.mjs +7 -7
  86. package/esm2022/datepicker/date-range-input-parts.mjs +10 -10
  87. package/esm2022/datepicker/date-range-input.mjs +4 -4
  88. package/esm2022/datepicker/date-range-picker.mjs +4 -4
  89. package/esm2022/datepicker/date-range-selection-strategy.mjs +4 -4
  90. package/esm2022/datepicker/date-selection-model.mjs +10 -10
  91. package/esm2022/datepicker/datepicker-actions.mjs +10 -10
  92. package/esm2022/datepicker/datepicker-base.mjs +7 -7
  93. package/esm2022/datepicker/datepicker-input-base.mjs +4 -4
  94. package/esm2022/datepicker/datepicker-input.mjs +4 -4
  95. package/esm2022/datepicker/datepicker-intl.mjs +4 -4
  96. package/esm2022/datepicker/datepicker-module.mjs +5 -5
  97. package/esm2022/datepicker/datepicker-toggle.mjs +7 -7
  98. package/esm2022/datepicker/datepicker.mjs +4 -4
  99. package/esm2022/datepicker/month-view.mjs +4 -4
  100. package/esm2022/datepicker/multi-year-view.mjs +4 -4
  101. package/esm2022/datepicker/year-view.mjs +4 -4
  102. package/esm2022/dialog/dialog-config.mjs +1 -3
  103. package/esm2022/dialog/dialog-container.mjs +16 -5
  104. package/esm2022/dialog/dialog-content-directives.mjs +49 -31
  105. package/esm2022/dialog/dialog-ref.mjs +3 -1
  106. package/esm2022/dialog/dialog.mjs +4 -4
  107. package/esm2022/dialog/module.mjs +5 -5
  108. package/esm2022/dialog/public-api.mjs +2 -2
  109. package/esm2022/divider/divider-module.mjs +5 -5
  110. package/esm2022/divider/divider.mjs +4 -4
  111. package/esm2022/expansion/accordion.mjs +4 -4
  112. package/esm2022/expansion/expansion-module.mjs +5 -5
  113. package/esm2022/expansion/expansion-panel-content.mjs +4 -4
  114. package/esm2022/expansion/expansion-panel-header.mjs +10 -10
  115. package/esm2022/expansion/expansion-panel.mjs +7 -7
  116. package/esm2022/form-field/directives/error.mjs +4 -4
  117. package/esm2022/form-field/directives/floating-label.mjs +4 -4
  118. package/esm2022/form-field/directives/hint.mjs +4 -4
  119. package/esm2022/form-field/directives/label.mjs +4 -4
  120. package/esm2022/form-field/directives/line-ripple.mjs +4 -4
  121. package/esm2022/form-field/directives/notched-outline.mjs +4 -4
  122. package/esm2022/form-field/directives/prefix.mjs +4 -4
  123. package/esm2022/form-field/directives/suffix.mjs +4 -4
  124. package/esm2022/form-field/form-field-control.mjs +4 -4
  125. package/esm2022/form-field/form-field.mjs +4 -4
  126. package/esm2022/form-field/module.mjs +5 -5
  127. package/esm2022/grid-list/grid-list-module.mjs +5 -5
  128. package/esm2022/grid-list/grid-list.mjs +4 -4
  129. package/esm2022/grid-list/grid-tile.mjs +16 -16
  130. package/esm2022/icon/icon-module.mjs +5 -5
  131. package/esm2022/icon/icon-registry.mjs +4 -4
  132. package/esm2022/icon/icon.mjs +4 -4
  133. package/esm2022/icon/testing/fake-icon-registry.mjs +8 -8
  134. package/esm2022/input/input.mjs +4 -4
  135. package/esm2022/input/module.mjs +5 -5
  136. package/esm2022/list/action-list.mjs +4 -4
  137. package/esm2022/list/list-base.mjs +7 -7
  138. package/esm2022/list/list-item-sections.mjs +19 -19
  139. package/esm2022/list/list-module.mjs +5 -5
  140. package/esm2022/list/list-option.mjs +4 -4
  141. package/esm2022/list/list.mjs +7 -7
  142. package/esm2022/list/nav-list.mjs +4 -4
  143. package/esm2022/list/selection-list.mjs +4 -4
  144. package/esm2022/list/subheader.mjs +4 -4
  145. package/esm2022/menu/menu-content.mjs +4 -4
  146. package/esm2022/menu/menu-item.mjs +4 -4
  147. package/esm2022/menu/menu-trigger.mjs +4 -4
  148. package/esm2022/menu/menu.mjs +4 -4
  149. package/esm2022/menu/module.mjs +5 -5
  150. package/esm2022/paginator/module.mjs +5 -5
  151. package/esm2022/paginator/paginator-intl.mjs +4 -4
  152. package/esm2022/paginator/paginator.mjs +4 -4
  153. package/esm2022/progress-bar/module.mjs +5 -5
  154. package/esm2022/progress-bar/progress-bar.mjs +4 -4
  155. package/esm2022/progress-spinner/module.mjs +5 -5
  156. package/esm2022/progress-spinner/progress-spinner.mjs +4 -4
  157. package/esm2022/radio/module.mjs +5 -5
  158. package/esm2022/radio/radio.mjs +8 -8
  159. package/esm2022/select/module.mjs +5 -5
  160. package/esm2022/select/select.mjs +7 -7
  161. package/esm2022/sidenav/drawer.mjs +10 -10
  162. package/esm2022/sidenav/sidenav-module.mjs +5 -5
  163. package/esm2022/sidenav/sidenav.mjs +10 -10
  164. package/esm2022/slide-toggle/module.mjs +9 -9
  165. package/esm2022/slide-toggle/slide-toggle-required-validator.mjs +4 -4
  166. package/esm2022/slide-toggle/slide-toggle.mjs +4 -4
  167. package/esm2022/slider/module.mjs +5 -5
  168. package/esm2022/slider/slider-input.mjs +7 -7
  169. package/esm2022/slider/slider-thumb.mjs +4 -4
  170. package/esm2022/slider/slider.mjs +4 -4
  171. package/esm2022/snack-bar/module.mjs +5 -5
  172. package/esm2022/snack-bar/simple-snack-bar.mjs +4 -4
  173. package/esm2022/snack-bar/snack-bar-container.mjs +4 -4
  174. package/esm2022/snack-bar/snack-bar-content.mjs +10 -10
  175. package/esm2022/snack-bar/snack-bar.mjs +4 -4
  176. package/esm2022/sort/sort-header-intl.mjs +4 -4
  177. package/esm2022/sort/sort-header.mjs +4 -4
  178. package/esm2022/sort/sort-module.mjs +5 -5
  179. package/esm2022/sort/sort.mjs +4 -4
  180. package/esm2022/stepper/step-content.mjs +4 -4
  181. package/esm2022/stepper/step-header.mjs +5 -5
  182. package/esm2022/stepper/step-label.mjs +4 -4
  183. package/esm2022/stepper/stepper-button.mjs +7 -7
  184. package/esm2022/stepper/stepper-icon.mjs +4 -4
  185. package/esm2022/stepper/stepper-intl.mjs +4 -4
  186. package/esm2022/stepper/stepper-module.mjs +5 -5
  187. package/esm2022/stepper/stepper.mjs +7 -7
  188. package/esm2022/table/cell.mjs +22 -22
  189. package/esm2022/table/module.mjs +5 -5
  190. package/esm2022/table/row.mjs +22 -22
  191. package/esm2022/table/table.mjs +7 -7
  192. package/esm2022/table/text-column.mjs +4 -4
  193. package/esm2022/tabs/module.mjs +5 -5
  194. package/esm2022/tabs/paginated-tab-header.mjs +4 -4
  195. package/esm2022/tabs/tab-body.mjs +7 -7
  196. package/esm2022/tabs/tab-content.mjs +4 -4
  197. package/esm2022/tabs/tab-group.mjs +4 -4
  198. package/esm2022/tabs/tab-header.mjs +4 -4
  199. package/esm2022/tabs/tab-label-wrapper.mjs +4 -4
  200. package/esm2022/tabs/tab-label.mjs +4 -4
  201. package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +10 -10
  202. package/esm2022/tabs/tab.mjs +4 -4
  203. package/esm2022/toolbar/toolbar-module.mjs +5 -5
  204. package/esm2022/toolbar/toolbar.mjs +7 -7
  205. package/esm2022/tooltip/module.mjs +5 -5
  206. package/esm2022/tooltip/tooltip.mjs +7 -7
  207. package/esm2022/tree/node.mjs +10 -10
  208. package/esm2022/tree/outlet.mjs +4 -4
  209. package/esm2022/tree/padding.mjs +4 -4
  210. package/esm2022/tree/toggle.mjs +4 -4
  211. package/esm2022/tree/tree-module.mjs +5 -5
  212. package/esm2022/tree/tree.mjs +4 -4
  213. package/fesm2022/autocomplete.mjs +13 -13
  214. package/fesm2022/autocomplete.mjs.map +1 -1
  215. package/fesm2022/badge.mjs +11 -11
  216. package/fesm2022/badge.mjs.map +1 -1
  217. package/fesm2022/bottom-sheet.mjs +10 -10
  218. package/fesm2022/bottom-sheet.mjs.map +1 -1
  219. package/fesm2022/button-toggle.mjs +10 -10
  220. package/fesm2022/button-toggle.mjs.map +1 -1
  221. package/fesm2022/button.mjs +42 -42
  222. package/fesm2022/button.mjs.map +1 -1
  223. package/fesm2022/card.mjs +46 -46
  224. package/fesm2022/card.mjs.map +1 -1
  225. package/fesm2022/checkbox.mjs +16 -16
  226. package/fesm2022/checkbox.mjs.map +1 -1
  227. package/fesm2022/chips.mjs +45 -45
  228. package/fesm2022/chips.mjs.map +1 -1
  229. package/fesm2022/core.mjs +60 -60
  230. package/fesm2022/core.mjs.map +1 -1
  231. package/fesm2022/datepicker.mjs +82 -82
  232. package/fesm2022/datepicker.mjs.map +1 -1
  233. package/fesm2022/dialog.mjs +72 -43
  234. package/fesm2022/dialog.mjs.map +1 -1
  235. package/fesm2022/divider.mjs +7 -7
  236. package/fesm2022/divider.mjs.map +1 -1
  237. package/fesm2022/expansion.mjs +25 -25
  238. package/fesm2022/expansion.mjs.map +1 -1
  239. package/fesm2022/form-field.mjs +34 -34
  240. package/fesm2022/form-field.mjs.map +1 -1
  241. package/fesm2022/grid-list.mjs +22 -22
  242. package/fesm2022/grid-list.mjs.map +1 -1
  243. package/fesm2022/icon/testing.mjs +7 -7
  244. package/fesm2022/icon/testing.mjs.map +1 -1
  245. package/fesm2022/icon.mjs +10 -10
  246. package/fesm2022/icon.mjs.map +1 -1
  247. package/fesm2022/input.mjs +7 -7
  248. package/fesm2022/input.mjs.map +1 -1
  249. package/fesm2022/list.mjs +49 -49
  250. package/fesm2022/list.mjs.map +1 -1
  251. package/fesm2022/menu.mjs +16 -16
  252. package/fesm2022/menu.mjs.map +1 -1
  253. package/fesm2022/paginator.mjs +10 -10
  254. package/fesm2022/paginator.mjs.map +1 -1
  255. package/fesm2022/progress-bar.mjs +7 -7
  256. package/fesm2022/progress-bar.mjs.map +1 -1
  257. package/fesm2022/progress-spinner.mjs +7 -7
  258. package/fesm2022/progress-spinner.mjs.map +1 -1
  259. package/fesm2022/radio.mjs +11 -11
  260. package/fesm2022/radio.mjs.map +1 -1
  261. package/fesm2022/select.mjs +10 -10
  262. package/fesm2022/select.mjs.map +1 -1
  263. package/fesm2022/sidenav.mjs +22 -22
  264. package/fesm2022/sidenav.mjs.map +1 -1
  265. package/fesm2022/slide-toggle.mjs +14 -14
  266. package/fesm2022/slide-toggle.mjs.map +1 -1
  267. package/fesm2022/slider.mjs +16 -16
  268. package/fesm2022/slider.mjs.map +1 -1
  269. package/fesm2022/snack-bar.mjs +22 -22
  270. package/fesm2022/snack-bar.mjs.map +1 -1
  271. package/fesm2022/sort.mjs +13 -13
  272. package/fesm2022/sort.mjs.map +1 -1
  273. package/fesm2022/stepper.mjs +32 -32
  274. package/fesm2022/stepper.mjs.map +1 -1
  275. package/fesm2022/table.mjs +55 -55
  276. package/fesm2022/table.mjs.map +1 -1
  277. package/fesm2022/tabs.mjs +40 -40
  278. package/fesm2022/tabs.mjs.map +1 -1
  279. package/fesm2022/toolbar.mjs +10 -10
  280. package/fesm2022/toolbar.mjs.map +1 -1
  281. package/fesm2022/tooltip.mjs +10 -10
  282. package/fesm2022/tooltip.mjs.map +1 -1
  283. package/fesm2022/tree.mjs +25 -25
  284. package/fesm2022/tree.mjs.map +1 -1
  285. package/form-field/_form-field-theme.scss +31 -14
  286. package/icon/_icon-theme.scss +2 -2
  287. package/package.json +7 -7
  288. package/paginator/_paginator-theme.scss +10 -16
  289. package/prebuilt-themes/deeppurple-amber.css +1 -1
  290. package/prebuilt-themes/indigo-pink.css +1 -1
  291. package/prebuilt-themes/pink-bluegrey.css +1 -1
  292. package/prebuilt-themes/purple-green.css +1 -1
  293. package/progress-bar/_progress-bar-theme.scss +27 -9
  294. package/progress-spinner/_progress-spinner-theme.scss +38 -17
  295. package/radio/_radio-theme.scss +34 -18
  296. package/schematics/ng-add/index.js +2 -2
  297. package/schematics/ng-add/index.mjs +2 -2
  298. package/schematics/ng-generate/mdc-migration/index_bundled.js +163 -122
  299. package/schematics/ng-generate/mdc-migration/index_bundled.js.map +4 -4
  300. package/select/_select-theme.scss +24 -10
  301. package/slide-toggle/_slide-toggle-theme.scss +29 -9
  302. package/slider/_slider-theme.scss +28 -11
  303. package/stepper/_stepper-theme.scss +28 -7
  304. package/tabs/_tabs-theme.scss +32 -14
@@ -1,4 +1,3 @@
1
- @use 'sass:map';
2
1
  @use '../core/theming/theming';
3
2
  @use '../core/theming/inspection';
4
3
  @use '../core/typography/typography';
@@ -7,6 +6,9 @@
7
6
  @use '../core/tokens/token-utils';
8
7
  @use '../core/style/sass-utils';
9
8
 
9
+ /// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
10
+ /// for the mat-button-toggle.
11
+ /// @param {Map} $theme The theme to generate base styles for.
10
12
  @mixin base($theme) {
11
13
  @if inspection.get-theme-version($theme) == 1 {
12
14
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
@@ -25,9 +27,14 @@
25
27
  }
26
28
  }
27
29
 
28
- @mixin color($theme) {
30
+ /// Outputs color theme styles for the mat-button-toggle.
31
+ /// @param {Map} $theme The theme to generate color styles for.
32
+ /// @param {ArgList} Additional optional arguments (only supported for M3 themes):
33
+ /// $color-variant: The color variant to use for the button toggle: primary, secondary, tertiary,
34
+ /// or error (If not specified, default secondary color will be used).
35
+ @mixin color($theme, $options...) {
29
36
  @if inspection.get-theme-version($theme) == 1 {
30
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
37
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
31
38
  }
32
39
  @else {
33
40
  @include sass-utils.current-selector-or-root() {
@@ -39,6 +46,8 @@
39
46
  }
40
47
  }
41
48
 
49
+ /// Outputs typography theme styles for the mat-button-toggle.
50
+ /// @param {Map} $theme The theme to generate typography styles for.
42
51
  @mixin typography($theme) {
43
52
  @if inspection.get-theme-version($theme) == 1 {
44
53
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
@@ -53,6 +62,8 @@
53
62
  }
54
63
  }
55
64
 
65
+ /// Outputs density theme styles for the mat-button-toggle.
66
+ /// @param {Map} $theme The theme to generate density styles for.
56
67
  @mixin density($theme) {
57
68
  @if inspection.get-theme-version($theme) == 1 {
58
69
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
@@ -67,10 +78,15 @@
67
78
  }
68
79
  }
69
80
 
70
- @mixin theme($theme) {
81
+ /// Outputs all (base, color, typography, and density) theme styles for the mat-button-toggle.
82
+ /// @param {Map} $theme The theme to generate styles for.
83
+ /// @param {ArgList} Additional optional arguments (only supported for M3 themes):
84
+ /// $color-variant: The color variant to use for the button toggle: primary, secondary, tertiary,
85
+ /// or error (If not specified, default secondary color will be used).
86
+ @mixin theme($theme, $options...) {
71
87
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-button-toggle') {
72
88
  @if inspection.get-theme-version($theme) == 1 {
73
- @include _theme-from-tokens(inspection.get-theme-tokens($theme));
89
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);
74
90
  }
75
91
  @else {
76
92
  @include base($theme);
@@ -87,10 +103,9 @@
87
103
  }
88
104
  }
89
105
 
90
- @mixin _theme-from-tokens($tokens) {
91
- @if ($tokens != ()) {
92
- @include token-utils.create-token-values(
93
- tokens-mat-standard-button-toggle.$prefix,
94
- map.get($tokens, tokens-mat-standard-button-toggle.$prefix));
95
- }
106
+ @mixin _theme-from-tokens($tokens, $options...) {
107
+ $mat-standard-button-toggle-tokens:
108
+ token-utils.get-tokens-for($tokens, tokens-mat-standard-button-toggle.$prefix, $options...);
109
+ @include token-utils.create-token-values(
110
+ tokens-mat-standard-button-toggle.$prefix, $mat-standard-button-toggle-tokens);
96
111
  }
@@ -1,14 +1,17 @@
1
- @use 'sass:map';
2
1
  @use '@material/checkbox/checkbox-theme' as mdc-checkbox-theme;
3
2
  @use '@material/form-field/form-field-theme' as mdc-form-field-theme;
4
3
  @use '../core/style/sass-utils';
5
4
  @use '../core/theming/theming';
6
5
  @use '../core/theming/inspection';
6
+ @use '../core/tokens/token-utils';
7
7
  @use '../core/typography/typography';
8
- @use '../core/mdc-helpers/mdc-helpers';
9
8
  @use '../core/tokens/m2/mdc/checkbox' as tokens-mdc-checkbox;
10
9
  @use '../core/tokens/m2/mdc/form-field' as tokens-mdc-form-field;
10
+ @use '../core/tokens/m2/mat/checkbox' as tokens-mat-checkbox;
11
11
 
12
+ /// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
13
+ /// for the mat-checkbox.
14
+ /// @param {Map} $theme The theme to generate base styles for.
12
15
  @mixin base($theme) {
13
16
  @if inspection.get-theme-version($theme) == 1 {
14
17
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
@@ -16,17 +19,26 @@
16
19
  @else {
17
20
  @include sass-utils.current-selector-or-root() {
18
21
  @include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-unthemable-tokens());
22
+ @include token-utils.create-token-values(
23
+ tokens-mat-checkbox.$prefix, tokens-mat-checkbox.get-unthemable-tokens());
19
24
  }
20
25
  }
21
26
  }
22
27
 
23
- @mixin color($theme) {
28
+ /// Outputs color theme styles for the mat-checkbox.
29
+ /// @param {Map} $theme The theme to generate color styles for.
30
+ /// @param {ArgList} Additional optional arguments (only supported for M3 themes):
31
+ /// $color-variant: The color variant to use for the checkbox: primary, secondary, tertiary, or
32
+ /// error (If not specified, default primary color will be used).
33
+ @mixin color($theme, $options...) {
24
34
  @if inspection.get-theme-version($theme) == 1 {
25
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
35
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
26
36
  }
27
37
  @else {
28
38
  @include sass-utils.current-selector-or-root() {
29
39
  @include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-color-tokens($theme));
40
+ @include token-utils.create-token-values(
41
+ tokens-mat-checkbox.$prefix, tokens-mat-checkbox.get-color-tokens($theme));
30
42
  }
31
43
 
32
44
  .mat-mdc-checkbox {
@@ -39,15 +51,12 @@
39
51
  &.mat-warn {
40
52
  @include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-color-tokens($theme, warn));
41
53
  }
42
-
43
- &.mat-mdc-checkbox-disabled label {
44
- // MDC should set the disabled color on the label, but doesn't, so we do it here instead.
45
- color: inspection.get-theme-color($theme, foreground, disabled-text);
46
- }
47
54
  }
48
55
  }
49
56
  }
50
57
 
58
+ /// Outputs typography theme styles for the mat-checkbox.
59
+ /// @param {Map} $theme The theme to generate typography styles for.
51
60
  @mixin typography($theme) {
52
61
  @if inspection.get-theme-version($theme) == 1 {
53
62
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
@@ -55,6 +64,8 @@
55
64
  @else {
56
65
  @include sass-utils.current-selector-or-root() {
57
66
  @include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-typography-tokens($theme));
67
+ @include token-utils.create-token-values(
68
+ tokens-mat-checkbox.$prefix, tokens-mat-checkbox.get-typography-tokens($theme));
58
69
  }
59
70
 
60
71
  .mat-mdc-checkbox {
@@ -63,6 +74,8 @@
63
74
  }
64
75
  }
65
76
 
77
+ /// Outputs density theme styles for the mat-checkbox.
78
+ /// @param {Map} $theme The theme to generate density styles for.
66
79
  @mixin density($theme) {
67
80
  $density-scale: inspection.get-theme-density($theme);
68
81
 
@@ -72,20 +85,21 @@
72
85
  @else {
73
86
  @include sass-utils.current-selector-or-root() {
74
87
  @include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-density-tokens($theme));
75
- }
76
-
77
- @include mdc-helpers.if-touch-targets-unsupported($density-scale) {
78
- .mat-mdc-checkbox-touch-target {
79
- display: none;
80
- }
88
+ @include token-utils.create-token-values(
89
+ tokens-mat-checkbox.$prefix, tokens-mat-checkbox.get-density-tokens($theme));
81
90
  }
82
91
  }
83
92
  }
84
93
 
85
- @mixin theme($theme) {
94
+ /// Outputs all (base, color, typography, and density) theme styles for the mat-checkbox.
95
+ /// @param {Map} $theme The theme to generate styles for.
96
+ /// @param {ArgList} Additional optional arguments (only supported for M3 themes):
97
+ /// $color-variant: The color variant to use for the checkbox: primary, secondary, tertiary, or
98
+ /// error (If not specified, default primary color will be used).
99
+ @mixin theme($theme, $options...) {
86
100
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-checkbox') {
87
101
  @if inspection.get-theme-version($theme) == 1 {
88
- @include _theme-from-tokens(inspection.get-theme-tokens($theme));
102
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);
89
103
  }
90
104
  @else {
91
105
  @include base($theme);
@@ -102,10 +116,14 @@
102
116
  }
103
117
  }
104
118
 
105
- @mixin _theme-from-tokens($tokens) {
106
- @if ($tokens != ()) {
107
- // TODO(mmalerba): Some of the theme styles above are not represented in terms of tokens,
108
- // so this mixin is currently incomplete.
109
- @include mdc-checkbox-theme.theme(map.get($tokens, tokens-mdc-checkbox.$prefix));
110
- }
119
+ @mixin _theme-from-tokens($tokens, $options...) {
120
+ $mdc-checkbox-tokens: token-utils.get-tokens-for(
121
+ $tokens, tokens-mdc-checkbox.$prefix, $options...);
122
+ // Don't pass $options here, since the mdc-form-field doesn't support color options,
123
+ // only the mdc-checkbox does.
124
+ $mdc-form-field-tokens: token-utils.get-tokens-for($tokens, tokens-mdc-form-field.$prefix);
125
+ $mat-checkbox-tokens: token-utils.get-tokens-for($tokens, tokens-mat-checkbox.$prefix);
126
+ @include mdc-checkbox-theme.theme($mdc-checkbox-tokens);
127
+ @include mdc-form-field-theme.theme($mdc-form-field-tokens);
128
+ @include token-utils.create-token-values(tokens-mat-checkbox.$prefix, $mat-checkbox-tokens);
111
129
  }
@@ -1,11 +1,15 @@
1
- @use 'sass:map';
2
1
  @use 'sass:color';
3
2
  @use '@material/chips/chip-theme' as mdc-chip-theme;
4
3
  @use '../core/tokens/m2/mdc/chip' as tokens-mdc-chip;
4
+ @use '../core/tokens/m2/mat/chip' as tokens-mat-chip;
5
+ @use '../core/tokens/token-utils';
5
6
  @use '../core/theming/theming';
6
7
  @use '../core/theming/inspection';
7
8
  @use '../core/typography/typography';
8
9
 
10
+ /// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
11
+ /// for the mat-chips.
12
+ /// @param {Map} $theme The theme to generate base styles for.
9
13
  @mixin base($theme) {
10
14
  @if inspection.get-theme-version($theme) == 1 {
11
15
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
@@ -13,18 +17,27 @@
13
17
  @else {
14
18
  .mat-mdc-standard-chip {
15
19
  @include mdc-chip-theme.theme(tokens-mdc-chip.get-unthemable-tokens());
20
+ @include token-utils.create-token-values(
21
+ tokens-mat-chip.$prefix, tokens-mat-chip.get-unthemable-tokens());
16
22
  }
17
23
  }
18
24
  }
19
25
 
20
- @mixin color($theme) {
26
+ /// Outputs color theme styles for the mat-chips.
27
+ /// @param {Map} $theme The theme to generate color styles for.
28
+ /// @param {ArgList} Additional optional arguments (only supported for M3 themes):
29
+ /// $color-variant: The color variant to use for the selected chip: primary, secondary, tertiary,
30
+ /// or error (If not specified, default secondary color will be used).
31
+ @mixin color($theme, $options...) {
21
32
  @if inspection.get-theme-version($theme) == 1 {
22
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
33
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
23
34
  }
24
35
  @else {
25
36
  .mat-mdc-standard-chip {
26
37
  $default-color-tokens: tokens-mdc-chip.get-color-tokens($theme);
27
38
  @include mdc-chip-theme.theme($default-color-tokens);
39
+ @include token-utils.create-token-values(
40
+ tokens-mat-chip.$prefix, tokens-mat-chip.get-color-tokens($theme));
28
41
 
29
42
  &.mat-mdc-chip-selected,
30
43
  &.mat-mdc-chip-highlighted {
@@ -47,6 +60,8 @@
47
60
  }
48
61
  }
49
62
 
63
+ /// Outputs typography theme styles for the mat-chips.
64
+ /// @param {Map} $theme The theme to generate typography styles for.
50
65
  @mixin typography($theme) {
51
66
  @if inspection.get-theme-version($theme) == 1 {
52
67
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
@@ -56,10 +71,14 @@
56
71
 
57
72
  .mat-mdc-standard-chip {
58
73
  @include mdc-chip-theme.theme($typography-tokens);
74
+ @include token-utils.create-token-values(
75
+ tokens-mat-chip.$prefix, tokens-mat-chip.get-typography-tokens($theme));
59
76
  }
60
77
  }
61
78
  }
62
79
 
80
+ /// Outputs density theme styles for the mat-chips.
81
+ /// @param {Map} $theme The theme to generate density styles for.
63
82
  @mixin density($theme) {
64
83
  @if inspection.get-theme-version($theme) == 1 {
65
84
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
@@ -69,14 +88,21 @@
69
88
 
70
89
  .mat-mdc-chip.mat-mdc-standard-chip {
71
90
  @include mdc-chip-theme.theme($density-tokens);
91
+ @include token-utils.create-token-values(
92
+ tokens-mat-chip.$prefix, tokens-mat-chip.get-density-tokens($theme));
72
93
  }
73
94
  }
74
95
  }
75
96
 
76
- @mixin theme($theme) {
97
+ /// Outputs all (base, color, typography, and density) theme styles for the mat-chips.
98
+ /// @param {Map} $theme The theme to generate styles for.
99
+ /// @param {ArgList} Additional optional arguments (only supported for M3 themes):
100
+ /// $color-variant: The color variant to use for the selected chip: primary, secondary, tertiary,
101
+ /// or error (If not specified, default secondary color will be used).
102
+ @mixin theme($theme, $options...) {
77
103
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-chips') {
78
104
  @if inspection.get-theme-version($theme) == 1 {
79
- @include _theme-from-tokens(inspection.get-theme-tokens($theme));
105
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);
80
106
  }
81
107
  @else {
82
108
  @include base($theme);
@@ -93,8 +119,9 @@
93
119
  }
94
120
  }
95
121
 
96
- @mixin _theme-from-tokens($tokens) {
97
- @if ($tokens != ()) {
98
- @include mdc-chip-theme.theme(map.get($tokens, tokens-mdc-chip.$prefix));
99
- }
122
+ @mixin _theme-from-tokens($tokens, $options...) {
123
+ $mdc-chip-tokens: token-utils.get-tokens-for($tokens, tokens-mdc-chip.$prefix, $options...);
124
+ $mat-chip-tokens: token-utils.get-tokens-for($tokens, tokens-mat-chip.$prefix);
125
+ @include mdc-chip-theme.theme($mdc-chip-tokens);
126
+ @include token-utils.create-token-values(tokens-mat-chip.$prefix, $mat-chip-tokens);
100
127
  }
@@ -10,37 +10,51 @@
10
10
  @use './typography/typography';
11
11
  @use './tokens/token-utils';
12
12
  @use './tokens/m2/mat/app' as tokens-mat-app;
13
+ @use './tokens/m2/mat/ripple' as tokens-mat-ripple;
14
+ @use './tokens/m2/mat/option' as tokens-mat-option;
15
+ @use './tokens/m2/mat/full-pseudo-checkbox' as tokens-mat-full-pseudo-checkbox;
16
+ @use './tokens/m2/mat/minimal-pseudo-checkbox' as tokens-mat-minimal-pseudo-checkbox;
13
17
 
14
18
  @mixin base($theme) {
15
- @include ripple-theme.base($theme);
16
- @include option-theme.base($theme);
17
- @include optgroup-theme.base($theme);
18
- @include pseudo-checkbox-theme.base($theme);
19
- // TODO(mmalerba): Move additional core base tokens here
19
+ @if inspection.get-theme-version($theme) == 1 {
20
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
21
+ }
22
+ @else {
23
+ @include ripple-theme.base($theme);
24
+ @include option-theme.base($theme);
25
+ @include optgroup-theme.base($theme);
26
+ @include pseudo-checkbox-theme.base($theme);
27
+ }
20
28
  }
21
29
 
22
30
  @mixin color($theme) {
23
- @include ripple-theme.color($theme);
24
- @include option-theme.color($theme);
25
- @include optgroup-theme.color($theme);
26
- @include pseudo-checkbox-theme.color($theme);
27
- @include sass-utils.current-selector-or-root() {
28
- @include token-utils.create-token-values(tokens-mat-app.$prefix,
29
- tokens-mat-app.get-color-tokens($theme));
31
+ @if inspection.get-theme-version($theme) == 1 {
32
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
30
33
  }
34
+ @else {
35
+ @include ripple-theme.color($theme);
36
+ @include option-theme.color($theme);
37
+ @include optgroup-theme.color($theme);
38
+ @include pseudo-checkbox-theme.color($theme);
39
+ @include sass-utils.current-selector-or-root() {
40
+ @include token-utils.create-token-values(tokens-mat-app.$prefix,
41
+ tokens-mat-app.get-color-tokens($theme));
42
+ }
31
43
 
32
- // Provides external CSS classes for each elevation value. Each CSS class is formatted as
33
- // `mat-elevation-z$zValue` where `$zValue` corresponds to the z-space to which the element is
34
- // elevated.
35
- @for $zValue from 0 through 24 {
36
- $selector: elevation.$prefix + $zValue;
37
- // We need the `mat-mdc-elevation-specific`, because some MDC mixins
38
- // come with elevation baked in and we don't have a way of removing it.
39
- .#{$selector}, .mat-mdc-elevation-specific.#{$selector} {
40
- @include private.private-theme-elevation($zValue, $theme);
44
+ // Provides external CSS classes for each elevation value. Each CSS class is formatted as
45
+ // `mat-elevation-z$zValue` where `$zValue` corresponds to the z-space to which the element is
46
+ // elevated.
47
+ @for $zValue from 0 through 24 {
48
+ $selector: elevation.$prefix + $zValue;
49
+ // We need the `mat-mdc-elevation-specific`, because some MDC mixins
50
+ // come with elevation baked in and we don't have a way of removing it.
51
+ .#{$selector}, .mat-mdc-elevation-specific.#{$selector} {
52
+ @include private.private-theme-elevation($zValue, $theme);
53
+ }
41
54
  }
42
55
  }
43
56
 
57
+ // TODO(crisbeto): move this into the base.
44
58
  // Marker that is used to determine whether the user has added a theme to their page.
45
59
  @at-root {
46
60
  .mat-theme-loaded-marker {
@@ -50,34 +64,67 @@
50
64
  }
51
65
 
52
66
  @mixin typography($theme) {
53
- @include option-theme.typography($theme);
54
- @include optgroup-theme.typography($theme);
55
- @include pseudo-checkbox-theme.typography($theme);
56
- @include ripple-theme.typography($theme);
67
+ @if inspection.get-theme-version($theme) == 1 {
68
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
69
+ }
70
+ @else {
71
+ @include option-theme.typography($theme);
72
+ @include optgroup-theme.typography($theme);
73
+ @include pseudo-checkbox-theme.typography($theme);
74
+ @include ripple-theme.typography($theme);
75
+ }
57
76
  }
58
77
 
59
78
  @mixin density($theme) {
60
- @include option-theme.density($theme);
61
- @include optgroup-theme.density($theme);
62
- @include pseudo-checkbox-theme.density($theme);
63
- @include ripple-theme.density($theme);
79
+ @if inspection.get-theme-version($theme) == 1 {
80
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
81
+ }
82
+ @else {
83
+ @include option-theme.density($theme);
84
+ @include optgroup-theme.density($theme);
85
+ @include pseudo-checkbox-theme.density($theme);
86
+ @include ripple-theme.density($theme);
87
+ }
64
88
  }
65
89
 
66
90
  // Mixin that renders all of the core styles that depend on the theme.
67
- @mixin theme($theme) {
91
+ @mixin theme($theme, $options...) {
68
92
  // Wrap the sub-theme includes in the duplicate theme styles mixin. This ensures that
69
93
  // there won't be multiple warnings. e.g. if `mat-core-theme` reports a warning, then
70
94
  // the imported themes (such as `mat-ripple-theme`) should not report again.
71
95
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-core') {
72
- @include base($theme);
73
- @if inspection.theme-has($theme, color) {
74
- @include color($theme);
75
- }
76
- @if inspection.theme-has($theme, density) {
77
- @include density($theme);
96
+ @if inspection.get-theme-version($theme) == 1 {
97
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);
78
98
  }
79
- @if inspection.theme-has($theme, typography) {
80
- @include typography($theme);
99
+ @else {
100
+ @include base($theme);
101
+ @if inspection.theme-has($theme, color) {
102
+ @include color($theme);
103
+ }
104
+ @if inspection.theme-has($theme, density) {
105
+ @include density($theme);
106
+ }
107
+ @if inspection.theme-has($theme, typography) {
108
+ @include typography($theme);
109
+ }
81
110
  }
82
111
  }
83
112
  }
113
+
114
+ @mixin _theme-from-tokens($tokens, $options...) {
115
+ $mat-app-tokens: token-utils.get-tokens-for($tokens, tokens-mat-app.$prefix, $options...);
116
+ $mat-ripple-tokens: token-utils.get-tokens-for($tokens, tokens-mat-ripple.$prefix, $options...);
117
+ $mat-option-tokens: token-utils.get-tokens-for($tokens, tokens-mat-option.$prefix, $options...);
118
+ $mat-full-pseudo-checkbox-tokens: token-utils.get-tokens-for($tokens,
119
+ tokens-mat-full-pseudo-checkbox.$prefix, $options...);
120
+ $mat-minimal-pseudo-checkbox-tokens: token-utils.get-tokens-for($tokens,
121
+ tokens-mat-minimal-pseudo-checkbox.$prefix, $options...);
122
+
123
+ @include token-utils.create-token-values(tokens-mat-app.$prefix, $mat-app-tokens);
124
+ @include token-utils.create-token-values(tokens-mat-ripple.$prefix, $mat-ripple-tokens);
125
+ @include token-utils.create-token-values(tokens-mat-option.$prefix, $mat-option-tokens);
126
+ @include token-utils.create-token-values(tokens-mat-full-pseudo-checkbox.$prefix,
127
+ $mat-full-pseudo-checkbox-tokens);
128
+ @include token-utils.create-token-values(tokens-mat-minimal-pseudo-checkbox.$prefix,
129
+ $mat-minimal-pseudo-checkbox-tokens);
130
+ }
@@ -5,7 +5,6 @@
5
5
  @use '@material/typography' as mdc-typography;
6
6
  @use '@material/theme/theme-color' as mdc-theme-color;
7
7
  @use '@material/theme/css' as mdc-theme-css;
8
- @use 'sass:meta';
9
8
 
10
9
  // A set of standard queries to use with MDC's queryable mixins.
11
10
  $mdc-base-styles-query: mdc-feature-targeting.without(mdc-feature-targeting.any(color, typography));
@@ -59,10 +58,3 @@ $mdc-typography-styles-query: typography;
59
58
  @content;
60
59
  mdc-theme-css.$enable-fallback-declarations: $previous-value;
61
60
  }
62
-
63
- // Excludes the passed-in CSS content if the layout is too dense to supports touch targets.
64
- @mixin if-touch-targets-unsupported($scale) {
65
- @if ($scale == 'minimum' or (meta.type-of($scale) == 'number' and $scale < -1)) {
66
- @content;
67
- }
68
- }
@@ -1,4 +1,3 @@
1
- @use 'sass:map';
2
1
  @use '../tokens/m2/mat/option' as tokens-mat-option;
3
2
  @use '../tokens/token-utils';
4
3
  @use '../style/sass-utils';
@@ -6,6 +5,9 @@
6
5
  @use '../theming/inspection';
7
6
  @use '../typography/typography';
8
7
 
8
+ /// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
9
+ /// for the mat-option.
10
+ /// @param {Map} $theme The theme to generate base styles for.
9
11
  @mixin base($theme) {
10
12
  @if inspection.get-theme-version($theme) == 1 {
11
13
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
@@ -13,9 +15,14 @@
13
15
  @else {}
14
16
  }
15
17
 
16
- @mixin color($theme) {
18
+ /// Outputs color theme styles for the mat-option.
19
+ /// @param {Map} $theme The theme to generate color styles for.
20
+ /// @param {ArgList} Additional optional arguments (only supported for M3 themes):
21
+ /// $color-variant: The color variant to use for the selected option: primary, secondary,
22
+ /// tertiary, or error (If not specified, default secondary color will be used).
23
+ @mixin color($theme, $options...) {
17
24
  @if inspection.get-theme-version($theme) == 1 {
18
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
25
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);
19
26
  }
20
27
  @else {
21
28
  @include sass-utils.current-selector-or-root() {
@@ -35,6 +42,8 @@
35
42
  }
36
43
  }
37
44
 
45
+ /// Outputs typography theme styles for the mat-option.
46
+ /// @param {Map} $theme The theme to generate typography styles for.
38
47
  @mixin typography($theme) {
39
48
  @if inspection.get-theme-version($theme) == 1 {
40
49
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
@@ -47,6 +56,8 @@
47
56
  }
48
57
  }
49
58
 
59
+ /// Outputs density theme styles for the mat-option.
60
+ /// @param {Map} $theme The theme to generate density styles for.
50
61
  @mixin density($theme) {
51
62
  @if inspection.get-theme-version($theme) == 1 {
52
63
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
@@ -54,10 +65,15 @@
54
65
  @else {}
55
66
  }
56
67
 
57
- @mixin theme($theme) {
68
+ /// Outputs all (base, color, typography, and density) theme styles for the mat-option.
69
+ /// @param {Map} $theme The theme to generate styles for.
70
+ /// @param {ArgList} Additional optional arguments (only supported for M3 themes):
71
+ /// $color-variant: The color variant to use for the selected option: primary, secondary,
72
+ /// tertiary, or error (If not specified, default secondary color will be used).
73
+ @mixin theme($theme, $options...) {
58
74
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-option') {
59
75
  @if inspection.get-theme-version($theme) == 1 {
60
- @include _theme-from-tokens(inspection.get-theme-tokens($theme));
76
+ @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);
61
77
  }
62
78
  @else {
63
79
  @include base($theme);
@@ -74,9 +90,7 @@
74
90
  }
75
91
  }
76
92
 
77
- @mixin _theme-from-tokens($tokens) {
78
- @if ($tokens != ()) {
79
- @include token-utils.create-token-values(
80
- tokens-mat-option.$prefix, map.get($tokens, tokens-mat-option.$prefix));
81
- }
93
+ @mixin _theme-from-tokens($tokens, $options...) {
94
+ $mat-option-tokens: token-utils.get-tokens-for($tokens, tokens-mat-option.$prefix, $options...);
95
+ @include token-utils.create-token-values(tokens-mat-option.$prefix, $mat-option-tokens);
82
96
  }