|
1 | 1 | @use 'sass:map'; |
2 | 2 | @use '@material/checkbox/checkbox-theme' as mdc-checkbox-theme; |
3 | | -@use '@material/form-field' as mdc-form-field; |
| 3 | +@use '@material/form-field/form-field-theme' as mdc-form-field-theme; |
4 | 4 | @use '../core/style/sass-utils'; |
5 | 5 | @use '../core/theming/theming'; |
6 | 6 | @use '../core/theming/inspection'; |
7 | 7 | @use '../core/typography/typography'; |
8 | 8 | @use '../core/mdc-helpers/mdc-helpers'; |
9 | 9 | @use '../core/tokens/m2/mdc/checkbox' as tokens-mdc-checkbox; |
| 10 | +@use '../core/tokens/m2/mdc/form-field' as tokens-mdc-form-field; |
10 | 11 |
|
11 | 12 | @mixin base($theme) { |
12 | 13 | @if inspection.get-theme-version($theme) == 1 { |
|
29 | 30 | } |
30 | 31 |
|
31 | 32 | .mat-mdc-checkbox { |
| 33 | + @include mdc-form-field-theme.theme(tokens-mdc-form-field.get-color-tokens($theme)); |
| 34 | + |
32 | 35 | &.mat-primary { |
33 | 36 | @include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-color-tokens($theme, primary)); |
34 | 37 | } |
|
37 | 40 | @include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-color-tokens($theme, warn)); |
38 | 41 | } |
39 | 42 |
|
40 | | - @include mdc-helpers.using-mdc-theme($theme) { |
41 | | - // TODO(mmalerba): Switch to static-styles, theme-styles, and theme once they're available. |
42 | | - @include mdc-form-field.core-styles($query: mdc-helpers.$mdc-theme-styles-query); |
43 | | - } |
44 | | - |
45 | 43 | &.mat-mdc-checkbox-disabled label { |
46 | 44 | // MDC should set the disabled color on the label, but doesn't, so we do it here instead. |
47 | 45 | color: inspection.get-theme-color($theme, foreground, disabled-text); |
|
60 | 58 | } |
61 | 59 |
|
62 | 60 | .mat-mdc-checkbox { |
63 | | - @include mdc-helpers.using-mdc-typography($theme) { |
64 | | - // TODO(mmalerba): Switch to static-styles, theme-styles, and theme once they're available. |
65 | | - @include mdc-form-field.core-styles($query: mdc-helpers.$mdc-typography-styles-query); |
66 | | - } |
| 61 | + @include mdc-form-field-theme.theme(tokens-mdc-form-field.get-typography-tokens($theme)); |
67 | 62 | } |
68 | 63 | } |
69 | 64 | } |
|
0 commit comments