|
1 |
| -@use '@material/tab-indicator/tab-indicator-theme' as mdc-tab-indicator-theme; |
2 |
| -@use '@material/tab/tab-theme' as mdc-tab-theme; |
3 | 1 | @use '../core/style/sass-utils';
|
4 |
| -@use '../core/tokens/m2/mdc/tab' as tokens-mdc-tab; |
| 2 | +@use '../core/tokens/m2/mdc/secondary-navigation-tab' as tokens-mdc-secondary-navigation-tab; |
5 | 3 | @use '../core/tokens/m2/mdc/tab-indicator' as tokens-mdc-tab-indicator;
|
6 | 4 | @use '../core/tokens/m2/mat/tab-header' as tokens-mat-tab-header;
|
7 | 5 | @use '../core/tokens/m2/mat/tab-header-with-background' as tokens-mat-tab-header-with-background;
|
|
20 | 18 | }
|
21 | 19 | @else {
|
22 | 20 | @include sass-utils.current-selector-or-root() {
|
23 |
| - @include mdc-tab-indicator-theme.theme(tokens-mdc-tab-indicator.get-unthemable-tokens()); |
24 |
| - @include mdc-tab-theme.secondary-navigation-tab-theme(tokens-mdc-tab.get-unthemable-tokens()); |
25 | 21 | @include token-utils.create-token-values(
|
26 |
| - tokens-mat-tab-header.$prefix, tokens-mat-tab-header.get-unthemable-tokens()); |
| 22 | + tokens-mdc-secondary-navigation-tab.$prefix, |
| 23 | + tokens-mdc-secondary-navigation-tab.get-unthemable-tokens()); |
27 | 24 | @include token-utils.create-token-values(
|
28 |
| - tokens-mat-tab-header-with-background.$prefix, |
29 |
| - tokens-mat-tab-header-with-background.get-unthemable-tokens() |
30 |
| - ); |
| 25 | + tokens-mdc-tab-indicator.$prefix, tokens-mdc-tab-indicator.get-unthemable-tokens()); |
| 26 | + @include token-utils.create-token-values( |
| 27 | + tokens-mat-tab-header.$prefix, tokens-mat-tab-header.get-unthemable-tokens()); |
| 28 | + @include token-utils.create-token-values( |
| 29 | + tokens-mat-tab-header-with-background.$prefix, |
| 30 | + tokens-mat-tab-header-with-background.get-unthemable-tokens()); |
31 | 31 | }
|
32 | 32 | }
|
33 | 33 | }
|
|
74 | 74 | }
|
75 | 75 |
|
76 | 76 | @mixin _palette-styles($theme, $palette-name) {
|
77 |
| - @include mdc-tab-theme.secondary-navigation-tab-theme( |
78 |
| - tokens-mdc-tab.get-color-tokens($theme, $palette-name)); |
79 |
| - @include mdc-tab-indicator-theme.theme( |
| 77 | + @include token-utils.create-token-values( |
| 78 | + tokens-mdc-secondary-navigation-tab.$prefix, |
| 79 | + tokens-mdc-secondary-navigation-tab.get-color-tokens($theme, $palette-name) |
| 80 | + ); |
| 81 | + @include token-utils.create-token-values( |
| 82 | + tokens-mdc-tab-indicator.$prefix, |
80 | 83 | tokens-mdc-tab-indicator.get-color-tokens($theme, $palette-name));
|
81 | 84 | @include token-utils.create-token-values(tokens-mat-tab-header.$prefix,
|
82 | 85 | tokens-mat-tab-header.get-color-tokens($theme, $palette-name));
|
|
90 | 93 | }
|
91 | 94 | @else {
|
92 | 95 | .mat-mdc-tab-header {
|
93 |
| - @include mdc-tab-theme.secondary-navigation-tab-theme( |
94 |
| - tokens-mdc-tab.get-typography-tokens($theme)); |
95 |
| - @include mdc-tab-indicator-theme.theme( |
96 |
| - tokens-mdc-tab-indicator.get-typography-tokens($theme)); |
| 96 | + @include token-utils.create-token-values( |
| 97 | + tokens-mdc-secondary-navigation-tab.$prefix, |
| 98 | + tokens-mdc-secondary-navigation-tab.get-typography-tokens($theme)); |
| 99 | + @include token-utils.create-token-values( |
| 100 | + tokens-mdc-tab-indicator.$prefix, tokens-mdc-tab-indicator.get-typography-tokens($theme)); |
97 | 101 | @include token-utils.create-token-values(tokens-mat-tab-header.$prefix,
|
98 | 102 | tokens-mat-tab-header.get-typography-tokens($theme));
|
99 | 103 | @include token-utils.create-token-values(tokens-mat-tab-header-with-background.$prefix,
|
|
110 | 114 | }
|
111 | 115 | @else {
|
112 | 116 | .mat-mdc-tab-header {
|
113 |
| - @include mdc-tab-theme.secondary-navigation-tab-theme( |
114 |
| - tokens-mdc-tab.get-density-tokens($theme)); |
115 |
| - @include mdc-tab-indicator-theme.theme( |
116 |
| - tokens-mdc-tab-indicator.get-density-tokens($theme)); |
| 117 | + @include token-utils.create-token-values( |
| 118 | + tokens-mdc-secondary-navigation-tab.$prefix, |
| 119 | + tokens-mdc-secondary-navigation-tab.get-density-tokens($theme)); |
| 120 | + @include token-utils.create-token-values( |
| 121 | + tokens-mdc-tab-indicator.$prefix, tokens-mdc-tab-indicator.get-density-tokens($theme)); |
117 | 122 | @include token-utils.create-token-values(tokens-mat-tab-header.$prefix,
|
118 | 123 | tokens-mat-tab-header.get-density-tokens($theme));
|
119 | 124 | @include token-utils.create-token-values(tokens-mat-tab-header-with-background.$prefix,
|
|
125 | 130 | /// Outputs the CSS variable values for the given tokens.
|
126 | 131 | /// @param {Map} $tokens The token values to emit.
|
127 | 132 | @mixin overrides($tokens: ()) {
|
128 |
| - $tab-tokens: tokens-mdc-tab.get-token-slots(); |
| 133 | + $tab-tokens: tokens-mdc-secondary-navigation-tab.get-token-slots(); |
129 | 134 | $tab-indicator-tokens: tokens-mdc-tab-indicator.get-token-slots();
|
130 | 135 | $tab-header-tokens: tokens-mat-tab-header.get-token-slots();
|
131 | 136 | $tab-header-with-background-tokens: tokens-mat-tab-header-with-background.get-token-slots();
|
132 | 137 |
|
133 | 138 | @include token-utils.batch-create-token-values(
|
134 | 139 | $tokens,
|
135 |
| - (prefix: tokens-mdc-tab.$prefix, tokens: $tab-tokens), |
| 140 | + (prefix: tokens-mdc-secondary-navigation-tab.$prefix, tokens: $tab-tokens), |
136 | 141 | (prefix: tokens-mdc-tab-indicator.$prefix, tokens: $tab-indicator-tokens),
|
137 | 142 | (prefix: tokens-mat-tab-header.$prefix, tokens: $tab-header-tokens),
|
138 | 143 | (
|
|
176 | 181 | $tokens, tokens-mat-tab-header.$prefix, $options...);
|
177 | 182 | // Don't pass $options here, because the mdc-tab doesn't have color variants,
|
178 | 183 | // only the mdc-tab-indicator and mat-tab-header do.
|
179 |
| - $mdc-tab-tokens: token-utils.get-tokens-for($tokens, tokens-mdc-tab.$prefix); |
180 |
| - @include mdc-tab-theme.secondary-navigation-tab-theme($mdc-tab-tokens); |
181 |
| - @include mdc-tab-indicator-theme.theme($mdc-tab-indicator-tokens); |
| 184 | + $mdc-secondary-navigation-tab-tokens: |
| 185 | + token-utils.get-tokens-for($tokens, tokens-mdc-secondary-navigation-tab.$prefix); |
| 186 | + @include token-utils.create-token-values(tokens-mdc-secondary-navigation-tab.$prefix, |
| 187 | + $mdc-secondary-navigation-tab-tokens); |
| 188 | + @include token-utils.create-token-values(tokens-mdc-tab-indicator.$prefix, |
| 189 | + $mdc-tab-indicator-tokens); |
182 | 190 | @include token-utils.create-token-values(tokens-mat-tab-header.$prefix, $mat-tab-header-tokens);
|
183 | 191 | }
|
0 commit comments