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