|
10 | 10 | /// for the mat-chips. |
11 | 11 | /// @param {Map} $theme The theme to generate base styles for. |
12 | 12 | @mixin base($theme) { |
| 13 | + $tokens: m2-chip.get-unthemable-tokens($theme); |
13 | 14 | @if inspection.get-theme-version($theme) == 1 { |
14 | | - @include token-utils.create-token-values(map.get(m3-chip.get-tokens($theme), base)); |
15 | | - } @else { |
16 | | - .mat-mdc-standard-chip { |
17 | | - @include token-utils.create-token-values-mixed(m2-chip.get-unthemable-tokens($theme)); |
18 | | - } |
| 15 | + $tokens: map.get(m3-chip.get-tokens($theme), base); |
19 | 16 | } |
| 17 | + |
| 18 | + @include token-utils.values($tokens); |
20 | 19 | } |
21 | 20 |
|
22 | 21 | /// Outputs color theme styles for the mat-chips. |
23 | 22 | /// @param {Map} $theme The theme to generate color styles for. |
24 | 23 | /// @param {String} $color-variant The color variant to use for the component (M3 only) |
25 | 24 | @mixin color($theme, $color-variant: null) { |
26 | 25 | @if inspection.get-theme-version($theme) == 1 { |
27 | | - @include token-utils.create-token-values( |
| 26 | + @include token-utils.values( |
28 | 27 | map.get(m3-chip.get-tokens($theme, $color-variant), color)); |
29 | 28 | } @else { |
30 | 29 | .mat-mdc-standard-chip { |
31 | | - @include token-utils.create-token-values-mixed(m2-chip.get-color-tokens($theme)); |
| 30 | + @include token-utils.values(m2-chip.get-color-tokens($theme)); |
32 | 31 |
|
33 | 32 | &.mat-mdc-chip-selected, |
34 | 33 | &.mat-mdc-chip-highlighted { |
35 | 34 | &.mat-primary { |
36 | | - @include token-utils.create-token-values-mixed( |
37 | | - m2-chip.get-color-tokens($theme, primary)); |
| 35 | + @include token-utils.values(m2-chip.get-color-tokens($theme, primary)); |
38 | 36 | } |
39 | 37 |
|
40 | 38 | &.mat-accent { |
41 | | - @include token-utils.create-token-values-mixed( |
42 | | - m2-chip.get-color-tokens($theme, secondary)); |
| 39 | + @include token-utils.values(m2-chip.get-color-tokens($theme, secondary)); |
43 | 40 | } |
44 | 41 |
|
45 | 42 | &.mat-warn { |
46 | | - @include token-utils.create-token-values-mixed( |
47 | | - m2-chip.get-color-tokens($theme, error)); |
| 43 | + @include token-utils.values(m2-chip.get-color-tokens($theme, error)); |
48 | 44 | } |
49 | 45 | } |
50 | 46 | } |
|
54 | 50 | /// Outputs typography theme styles for the mat-chips. |
55 | 51 | /// @param {Map} $theme The theme to generate typography styles for. |
56 | 52 | @mixin typography($theme) { |
| 53 | + $tokens: m2-chip.get-typography-tokens($theme); |
57 | 54 | @if inspection.get-theme-version($theme) == 1 { |
58 | | - @include token-utils.create-token-values(map.get(m3-chip.get-tokens($theme), typography)); |
59 | | - } @else { |
60 | | - .mat-mdc-standard-chip { |
61 | | - @include token-utils.create-token-values-mixed(m2-chip.get-typography-tokens($theme)); |
62 | | - } |
| 55 | + $tokens: map.get(m3-chip.get-tokens($theme), typography); |
63 | 56 | } |
| 57 | + |
| 58 | + @include token-utils.values($tokens); |
64 | 59 | } |
65 | 60 |
|
66 | 61 | /// Outputs density theme styles for the mat-chips. |
67 | 62 | /// @param {Map} $theme The theme to generate density styles for. |
68 | 63 | @mixin density($theme) { |
| 64 | + $tokens: m2-chip.get-density-tokens($theme); |
69 | 65 | @if inspection.get-theme-version($theme) == 1 { |
70 | | - @include token-utils.create-token-values(map.get(m3-chip.get-tokens($theme), density)); |
71 | | - } @else { |
72 | | - .mat-mdc-chip.mat-mdc-standard-chip { |
73 | | - @include token-utils.create-token-values-mixed(m2-chip.get-density-tokens($theme)); |
74 | | - } |
| 66 | + $tokens: map.get(m3-chip.get-tokens($theme), density); |
75 | 67 | } |
| 68 | + |
| 69 | + @include token-utils.values($tokens); |
76 | 70 | } |
77 | 71 |
|
78 | 72 | /// Defines the tokens that will be available in the `overrides` mixin and for docs extraction. |
|
0 commit comments