|
1 | | -@use './m2-filled-text-field'; |
2 | | -@use './m2-outlined-text-field'; |
3 | 1 | @use './m2-form-field'; |
4 | 2 | @use '../core/theming/theming'; |
5 | 3 | @use '../core/theming/inspection'; |
|
16 | 14 | @include _theme-from-tokens(inspection.get-theme-tokens($theme, base)); |
17 | 15 | } @else { |
18 | 16 | @include sass-utils.current-selector-or-root() { |
19 | | - @include token-utils.create-token-values-mixed( |
20 | | - m2-filled-text-field.$prefix, |
21 | | - m2-filled-text-field.get-unthemable-tokens() |
22 | | - ); |
23 | | - @include token-utils.create-token-values-mixed( |
24 | | - m2-outlined-text-field.$prefix, |
25 | | - m2-outlined-text-field.get-unthemable-tokens() |
26 | | - ); |
27 | 17 | @include token-utils.create-token-values-mixed( |
28 | 18 | m2-form-field.$prefix, |
29 | 19 | m2-form-field.get-unthemable-tokens() |
|
42 | 32 | @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...); |
43 | 33 | } @else { |
44 | 34 | @include sass-utils.current-selector-or-root() { |
45 | | - @include token-utils.create-token-values-mixed( |
46 | | - m2-filled-text-field.$prefix, |
47 | | - m2-filled-text-field.get-color-tokens($theme) |
48 | | - ); |
49 | | - @include token-utils.create-token-values-mixed( |
50 | | - m2-outlined-text-field.$prefix, |
51 | | - m2-outlined-text-field.get-color-tokens($theme) |
52 | | - ); |
53 | 35 | @include token-utils.create-token-values-mixed( |
54 | 36 | m2-form-field.$prefix, |
55 | 37 | m2-form-field.get-color-tokens($theme) |
56 | 38 | ); |
57 | 39 | } |
58 | 40 |
|
59 | 41 | .mat-mdc-form-field.mat-accent { |
60 | | - @include token-utils.create-token-values-mixed( |
61 | | - m2-filled-text-field.$prefix, |
62 | | - m2-filled-text-field.private-get-color-palette-color-tokens($theme, accent) |
63 | | - ); |
64 | | - @include token-utils.create-token-values-mixed( |
65 | | - m2-outlined-text-field.$prefix, |
66 | | - m2-outlined-text-field.private-get-color-palette-color-tokens($theme, accent) |
67 | | - ); |
68 | 42 | @include token-utils.create-token-values-mixed( |
69 | 43 | m2-form-field.$prefix, |
70 | 44 | m2-form-field.private-get-color-palette-color-tokens($theme, accent) |
71 | 45 | ); |
72 | 46 | } |
73 | 47 |
|
74 | 48 | .mat-mdc-form-field.mat-warn { |
75 | | - @include token-utils.create-token-values-mixed( |
76 | | - m2-filled-text-field.$prefix, |
77 | | - m2-filled-text-field.private-get-color-palette-color-tokens($theme, warn) |
78 | | - ); |
79 | | - @include token-utils.create-token-values-mixed( |
80 | | - m2-outlined-text-field.$prefix, |
81 | | - m2-outlined-text-field.private-get-color-palette-color-tokens($theme, warn) |
82 | | - ); |
83 | 49 | @include token-utils.create-token-values-mixed( |
84 | 50 | m2-form-field.$prefix, |
85 | 51 | m2-form-field.private-get-color-palette-color-tokens($theme, warn) |
|
95 | 61 | @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography)); |
96 | 62 | } @else { |
97 | 63 | @include sass-utils.current-selector-or-root() { |
98 | | - @include token-utils.create-token-values-mixed( |
99 | | - m2-filled-text-field.$prefix, |
100 | | - m2-filled-text-field.get-typography-tokens($theme) |
101 | | - ); |
102 | | - @include token-utils.create-token-values-mixed( |
103 | | - m2-outlined-text-field.$prefix, |
104 | | - m2-outlined-text-field.get-typography-tokens($theme) |
105 | | - ); |
106 | 64 | @include token-utils.create-token-values-mixed( |
107 | 65 | m2-form-field.$prefix, |
108 | 66 | m2-form-field.get-typography-tokens($theme) |
|
128 | 86 |
|
129 | 87 | /// Defines the tokens that will be available in the `overrides` mixin and for docs extraction. |
130 | 88 | @function _define-overrides() { |
131 | | - $filled-text-field-tokens: m2-filled-text-field.get-token-slots(); |
132 | | - $outlined-text-field-tokens: m2-outlined-text-field.get-token-slots(); |
133 | 89 | $form-field-tokens: m2-form-field.get-token-slots(); |
134 | 90 |
|
135 | 91 | @return ( |
136 | | - ( |
137 | | - namespace: m2-filled-text-field.$prefix, |
138 | | - tokens: $filled-text-field-tokens, |
139 | | - prefix: 'filled-', |
140 | | - ), |
141 | | - ( |
142 | | - namespace: m2-outlined-text-field.$prefix, |
143 | | - tokens: $outlined-text-field-tokens, |
144 | | - prefix: 'outlined-', |
145 | | - ), |
146 | 92 | ( |
147 | 93 | namespace: m2-form-field.$prefix, |
148 | 94 | tokens: $form-field-tokens, |
|
184 | 130 | @include validation.selector-defined( |
185 | 131 | 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector' |
186 | 132 | ); |
187 | | - $mdc-filled-text-field-tokens: token-utils.get-tokens-for( |
188 | | - $tokens, |
189 | | - m2-filled-text-field.$prefix, |
190 | | - $options... |
191 | | - ); |
192 | | - $mdc-outlined-text-field-tokens: token-utils.get-tokens-for( |
193 | | - $tokens, |
194 | | - m2-outlined-text-field.$prefix, |
195 | | - $options... |
196 | | - ); |
197 | 133 | $mat-form-field-tokens: token-utils.get-tokens-for( |
198 | 134 | $tokens, |
199 | 135 | m2-form-field.$prefix, |
200 | 136 | $options... |
201 | 137 | ); |
202 | | - @include token-utils.create-token-values( |
203 | | - m2-filled-text-field.$prefix, |
204 | | - $mdc-filled-text-field-tokens |
205 | | - ); |
206 | | - @include token-utils.create-token-values( |
207 | | - m2-outlined-text-field.$prefix, |
208 | | - $mdc-outlined-text-field-tokens |
209 | | - ); |
210 | 138 | @include token-utils.create-token-values(m2-form-field.$prefix, $mat-form-field-tokens); |
211 | 139 | } |
0 commit comments