11import type React from 'react' ;
2+ import { clearFix , genFocusStyle , resetComponent } from '../../style' ;
23import { initFadeMotion , initZoomMotion } from '../../style/motion' ;
34import type { AliasToken , FullToken , GenerateStyle } from '../../theme/internal' ;
45import { genComponentStyleHook , mergeToken } from '../../theme/internal' ;
56import type { TokenWithCommonCls } from '../../theme/util/genComponentStyleHook' ;
6- import { clearFix , genFocusStyle , resetComponent } from '../../style' ;
77
88/** Component only token. Which will handle additional calculation of alias token */
99export interface ComponentToken {
@@ -47,12 +47,12 @@ function box(position: React.CSSProperties['position']): React.CSSProperties {
4747}
4848
4949export const genModalMaskStyle : GenerateStyle < TokenWithCommonCls < AliasToken > > = ( token ) => {
50- const { componentCls } = token ;
50+ const { componentCls, antCls } = token ;
5151
5252 return [
5353 {
5454 [ `${ componentCls } -root` ] : {
55- [ `${ componentCls } ${ token . antCls } -zoom-enter, ${ componentCls } ${ token . antCls } -zoom-appear` ] : {
55+ [ `${ componentCls } ${ antCls } -zoom-enter, ${ componentCls } ${ antCls } -zoom-appear` ] : {
5656 // reset scale avoid mousePosition bug
5757 transform : 'none' ,
5858 opacity : 0 ,
@@ -61,6 +61,12 @@ export const genModalMaskStyle: GenerateStyle<TokenWithCommonCls<AliasToken>> =
6161 userSelect : 'none' ,
6262 } ,
6363
64+ // https://github.com/ant-design/ant-design/issues/37329
65+ // https://github.com/ant-design/ant-design/issues/40272
66+ [ `${ componentCls } ${ antCls } -zoom-leave ${ componentCls } -content` ] : {
67+ pointerEvents : 'none' ,
68+ } ,
69+
6470 [ `${ componentCls } -mask` ] : {
6571 ...box ( 'fixed' ) ,
6672 zIndex : token . zIndexPopupBase ,
@@ -349,11 +355,6 @@ const genModalConfirmStyle: GenerateStyle<ModalToken> = (token) => {
349355 [ `${ confirmComponentCls } -success ${ confirmComponentCls } -body > ${ token . iconCls } ` ] : {
350356 color : token . colorSuccess ,
351357 } ,
352-
353- // https://github.com/ant-design/ant-design/issues/37329
354- [ `${ componentCls } -zoom-leave ${ componentCls } -btns` ] : {
355- pointerEvents : 'none' ,
356- } ,
357358 } ;
358359} ;
359360
0 commit comments