@@ -21,7 +21,8 @@ export const genOtherStyle: GenerateStyle = (token) => {
21
21
lineHeight,
22
22
controlOutlineWidth,
23
23
controlOutline,
24
- colorPrimaryHover,
24
+ colorErrorOutline,
25
+ colorWarningOutline,
25
26
colorTextSecondary,
26
27
paddingXS,
27
28
} = token
@@ -31,11 +32,14 @@ export const genOtherStyle: GenerateStyle = (token) => {
31
32
borderInlineEndWidth : lineWidth ,
32
33
} )
33
34
34
- const active = ( color = colorPrimary ) : CSSProperties => ( {
35
+ const active = (
36
+ color = colorPrimary ,
37
+ outlineColor = controlOutline
38
+ ) : CSSProperties => ( {
35
39
borderColor : color ,
36
40
borderInlineEndWidth : lineWidth ,
37
41
outline : 0 ,
38
- boxShadow : `${ controlOutlineWidth } 0 ${ controlOutline } ${ colorPrimaryHover } ` ,
42
+ boxShadow : `0 0 0 ${ controlOutlineWidth } px ${ outlineColor } ` ,
39
43
} )
40
44
41
45
const extraLabelHeight = controlHeightSM - 2
@@ -126,7 +130,7 @@ export const genOtherStyle: GenerateStyle = (token) => {
126
130
127
131
[ `&${ antCls } -select-open ${ antCls } -select-selector,
128
132
&${ antCls } -select-focused ${ antCls } -select-selector` ] : {
129
- ...active ( colorWarning ) ,
133
+ ...active ( colorWarning , colorWarningOutline ) ,
130
134
} ,
131
135
} ,
132
136
@@ -137,7 +141,7 @@ export const genOtherStyle: GenerateStyle = (token) => {
137
141
138
142
[ `&-focused,
139
143
&:focus` ] : {
140
- ...active ( colorWarning ) ,
144
+ ...active ( colorWarning , colorWarningOutline ) ,
141
145
} ,
142
146
143
147
'&:not([disabled]):hover' : {
@@ -148,14 +152,14 @@ export const genOtherStyle: GenerateStyle = (token) => {
148
152
149
153
[ `${ antCls } -cascader-picker:focus ${ antCls } -cascader-input` ] : {
150
154
backgroundColor : colorWarningBg ,
151
- ...active ( colorWarning ) ,
155
+ ...active ( colorWarning , colorWarningOutline ) ,
152
156
} ,
153
157
154
158
[ `${ antCls } -input-affix-wrapper-focused,
155
159
${ antCls } -input-affix-wrapper:focus,
156
160
${ antCls } -input-focused,
157
161
${ antCls } -input:focus` ] : {
158
- ...active ( colorWarning ) ,
162
+ ...active ( colorWarning , colorWarningOutline ) ,
159
163
} ,
160
164
} ,
161
165
@@ -189,7 +193,7 @@ export const genOtherStyle: GenerateStyle = (token) => {
189
193
190
194
[ `&${ antCls } -select-open ${ antCls } -select-selector,
191
195
&${ antCls } -select-focused ${ antCls } -select-selector` ] : {
192
- ...active ( colorError ) ,
196
+ ...active ( colorError , colorErrorOutline ) ,
193
197
} ,
194
198
} ,
195
199
@@ -199,7 +203,7 @@ export const genOtherStyle: GenerateStyle = (token) => {
199
203
200
204
[ `&-focused,
201
205
&:focus` ] : {
202
- ...active ( colorError ) ,
206
+ ...active ( colorError , colorErrorOutline ) ,
203
207
} ,
204
208
205
209
[ `&:not([disabled]):hover` ] : {
@@ -208,14 +212,14 @@ export const genOtherStyle: GenerateStyle = (token) => {
208
212
} ,
209
213
210
214
[ `${ antCls } -cascader-picker:focus ${ antCls } -cascader-input` ] : {
211
- ...active ( colorError ) ,
215
+ ...active ( colorError , colorErrorOutline ) ,
212
216
} ,
213
217
214
218
[ `${ antCls } -input-affix-wrapper-focused,
215
219
${ antCls } -input-affix-wrapper:focus,
216
220
${ antCls } -input-focused,
217
221
${ antCls } -input:focus` ] : {
218
- ...active ( colorError ) ,
222
+ ...active ( colorError , colorErrorOutline ) ,
219
223
} ,
220
224
} ,
221
225
0 commit comments