26
26
27
27
@use ' sass:map' ;
28
28
@use ' @material/line-ripple/mixins' as line-ripple-mixins ;
29
+ @use ' @material/ripple/ripple-theme' ;
29
30
@use ' @material/theme/theme' ;
30
31
@use ' @material/tokens/resolvers' ;
31
32
@use ' ./text-field-theme' ;
@@ -126,8 +127,10 @@ $_light-theme: (
126
127
@include theme .validate-theme ($_light-theme , $theme );
127
128
@include text-field-theme .theme-styles ($theme , $resolvers : $resolvers );
128
129
129
- @if map .get ($theme , container-height ) {
130
- @include mixins .height (map .get ($theme , container-height ));
130
+ & :not (.mdc-text-field--textarea ) {
131
+ @if map .get ($theme , container-height ) {
132
+ @include mixins .height (map .get ($theme , container-height ));
133
+ }
131
134
}
132
135
@if map .get ($theme , container-shape ) {
133
136
@include mixins .shape-radius (map .get ($theme , container-shape ));
@@ -144,7 +147,7 @@ $_light-theme: (
144
147
default : map .get ($theme , active-indicator-color ),
145
148
hover: map .get ($theme , hover-active-indicator-color ),
146
149
focus: map .get ($theme , focus-active-indicator-color ),
147
- disabled : map .get ($theme , disabled-indicator-color ),
150
+ disabled : map .get ($theme , disabled-active- indicator-color ),
148
151
)
149
152
);
150
153
@include _error-active-indicator-color (
@@ -155,6 +158,16 @@ $_light-theme: (
155
158
)
156
159
);
157
160
@include _active-indicator-height (map .get ($theme , active-indicator-height ));
161
+ @include _hover-state-layer (
162
+ (
163
+ error- hover- state- layer- color:
164
+ map .get ($theme , error-hover-state-layer-color ),
165
+ error- hover- state- layer- opacity:
166
+ map .get ($theme , error-hover-state-layer-opacity ),
167
+ hover- state- layer- color: map .get ($theme , hover-state-layer-color ),
168
+ hover- state- layer- opacity: map .get ($theme , hover-state-layer-opacity ),
169
+ )
170
+ );
158
171
}
159
172
160
173
@mixin _container-color ($colors ) {
@@ -175,7 +188,7 @@ $_light-theme: (
175
188
@include text-field-theme .if-enabled {
176
189
@include _set-active-indicator-color (map .get ($colors , default ));
177
190
178
- & :hover {
191
+ @include text-field-theme . if-hovered {
179
192
@include _set-active-indicator-color (map .get ($colors , hover ));
180
193
}
181
194
@@ -210,3 +223,24 @@ $_light-theme: (
210
223
@include line-ripple-mixins .height ($height );
211
224
}
212
225
}
226
+
227
+ @mixin _hover-state-layer ($colors ) {
228
+ @include ripple-theme .theme-styles (
229
+ (
230
+ hover- state- layer- color: map .get ($colors , hover-state-layer-color ),
231
+ hover- state- layer- opacity: map .get ($colors , hover-state-layer-opacity ),
232
+ ),
233
+ $ripple-target : ' .mdc-text-field__ripple'
234
+ );
235
+
236
+ & .mdc-text-field--invalid {
237
+ @include ripple-theme .theme-styles (
238
+ (
239
+ hover- state- layer- color: map .get ($colors , error-hover-state-layer-color ),
240
+ hover- state- layer- opacity:
241
+ map .get ($colors , error-hover-state-layer-opacity ),
242
+ ),
243
+ $ripple-target : ' .mdc-text-field__ripple'
244
+ );
245
+ }
246
+ }
0 commit comments