|
1 |
| -// stylelint-disable max-line-length |
2 |
| - |
3 | 1 | @use '@material/theme/theme-color' as mdc-theme-color;
|
4 | 2 | @use '@material/theme/theme' as mdc-theme;
|
5 |
| -@use '@material/list' as mdc-list; |
| 3 | +@use '@material/list/evolution-mixins' as mdc-list-mixins; |
6 | 4 | @use '@material/typography' as mdc-typography;
|
7 | 5 | @use '@material/ripple' as mdc-ripple;
|
8 | 6 | @use '../../mdc-helpers/mdc-helpers';
|
|
17 | 15 | // Since this will usually be rendered in an overlay,
|
18 | 16 | // we have explicitly set the default color.
|
19 | 17 | @include mdc-theme.prop(color, text-primary-on-background);
|
20 |
| - @include mdc-list.deprecated-item-disabled-text-color( |
21 |
| - mdc-list.$deprecated-text-disabled-color, $query: mdc-helpers.$mat-theme-styles-query); |
22 | 18 |
|
23 |
| - &:hover:not(.mdc-deprecated-list-item--disabled), |
24 |
| - &:focus:not(.mdc-deprecated-list-item--disabled), |
| 19 | + &:hover:not(.mdc-list-item--disabled), |
| 20 | + &:focus:not(.mdc-list-item--disabled), |
25 | 21 | &.mat-mdc-option-active,
|
26 | 22 |
|
27 | 23 | // In multiple mode there is a checkbox to show that the option is selected.
|
28 |
| - &.mdc-deprecated-list-item--selected:not(.mat-mdc-option-multiple):not(.mdc-deprecated-list-item--disabled) { |
| 24 | + &.mdc-list-item--selected:not(.mat-mdc-option-multiple):not(.mdc-list-item--disabled) { |
29 | 25 | $color: mdc-theme-color.$on-surface;
|
30 | 26 | background: rgba($color, mdc-ripple.states-opacity($color, hover));
|
31 | 27 | }
|
32 | 28 | }
|
33 | 29 |
|
34 | 30 | .mat-primary {
|
35 |
| - .mat-mdc-option.mdc-deprecated-list-item--selected:not(.mdc-deprecated-list-item--disabled) { |
36 |
| - @include mdc-list.deprecated-item-primary-text-ink-color( |
37 |
| - primary, $query: mdc-helpers.$mat-theme-styles-query); |
| 31 | + .mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled) { |
| 32 | + @include mdc-list-mixins.list-primary-text-ink-color(primary, |
| 33 | + $query: mdc-helpers.$mat-theme-styles-query); |
38 | 34 | }
|
39 | 35 | }
|
40 | 36 |
|
41 | 37 | .mat-accent {
|
42 |
| - .mat-mdc-option.mdc-deprecated-list-item--selected:not(.mdc-deprecated-list-item--disabled) { |
43 |
| - @include mdc-list.deprecated-item-primary-text-ink-color( |
44 |
| - secondary, $query: mdc-helpers.$mat-theme-styles-query); |
| 38 | + .mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled) { |
| 39 | + @include mdc-list-mixins.list-primary-text-ink-color(secondary, |
| 40 | + $query: mdc-helpers.$mat-theme-styles-query); |
45 | 41 | }
|
46 | 42 | }
|
47 | 43 |
|
48 | 44 | .mat-warn {
|
49 |
| - .mat-mdc-option.mdc-deprecated-list-item--selected:not(.mdc-deprecated-list-item--disabled) { |
50 |
| - @include mdc-list.deprecated-item-primary-text-ink-color( |
51 |
| - error, $query: mdc-helpers.$mat-theme-styles-query); |
| 45 | + .mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled) { |
| 46 | + @include mdc-list-mixins.list-primary-text-ink-color(error, |
| 47 | + $query: mdc-helpers.$mat-theme-styles-query); |
52 | 48 | }
|
53 | 49 | }
|
54 | 50 | }
|
|
61 | 57 | @include mdc-helpers.mat-using-mdc-typography($config) {
|
62 | 58 | // MDC uses the `subtitle1` level for list items, but the spec shows `body1` as the correct
|
63 | 59 | // level. Class is repeated for increased specificity.
|
64 |
| - .mat-mdc-option { |
| 60 | + .mat-mdc-option .mdc-list-item__primary-text { |
65 | 61 | @include mdc-typography.typography(body1, $query: mdc-helpers.$mat-typography-styles-query);
|
66 | 62 | }
|
67 | 63 | }
|
|
0 commit comments