@@ -2,7 +2,7 @@ import type { CSSObject } from '@ant-design/cssinjs';
22import { unit } from '@ant-design/cssinjs' ;
33
44import { genPlaceholderStyle , initInputToken } from '../../input/style' ;
5- import { resetComponent , textEllipsis } from '../../style' ;
5+ import { genFocusOutline , resetComponent , textEllipsis } from '../../style' ;
66import { genCompactItemStyle } from '../../style/compact-item' ;
77import {
88 initMoveMotion ,
@@ -210,6 +210,7 @@ const genPickerStyle: GenerateStyle<PickerToken> = (token) => {
210210 transform : 'translateY(-50%)' ,
211211 cursor : 'pointer' ,
212212 opacity : 0 ,
213+ pointerEvents : 'none' ,
213214 transition : [ 'opacity' , 'color' ] . map ( ( prop ) => `${ prop } ${ motionDurationMid } ` ) . join ( ', ' ) ,
214215
215216 '> *' : {
@@ -219,11 +220,18 @@ const genPickerStyle: GenerateStyle<PickerToken> = (token) => {
219220 '&:hover' : {
220221 color : colorIcon ,
221222 } ,
223+
224+ '&:focus-visible' : {
225+ color : token . colorIcon ,
226+ borderRadius : token . borderRadiusSM ,
227+ ...genFocusOutline ( token ) ,
228+ } ,
222229 } ,
223230
224- '&:hover' : {
231+ '&:hover, &:focus-within ' : {
225232 [ `${ componentCls } -clear` ] : {
226233 opacity : 1 ,
234+ pointerEvents : 'auto' ,
227235 } ,
228236 // Should use the following selector, but since `:has` has poor compatibility,
229237 // we use `:not(:last-child)` instead, which may cause some problems in some cases.
0 commit comments