@@ -20,13 +20,11 @@ import useWinClick from './hooks/useWinClick';
2020import type {
2121 ActionType ,
2222 AlignType ,
23- AnimationType ,
2423 ArrowPos ,
2524 ArrowTypeOuter ,
2625 BuildInPlacements ,
27- TransitionNameType ,
2826} from './interface' ;
29- import { getAlignPopupClassName , getMotion } from './util' ;
27+ import { getAlignPopupClassName } from './util' ;
3028
3129export type {
3230 ActionType ,
@@ -72,9 +70,6 @@ export interface TriggerProps {
7270 forceRender ?: boolean ;
7371 autoDestroy ?: boolean ;
7472
75- /** @deprecated Please use `autoDestroy` instead */
76- destroyPopupOnHide ?: boolean ;
77-
7873 // ==================== Mask =====================
7974 mask ?: boolean ;
8075 maskClosable ?: boolean ;
@@ -85,15 +80,6 @@ export interface TriggerProps {
8580 /** Set mask motion. You can ref `rc-motion` for more info. */
8681 maskMotion ?: CSSMotionProps ;
8782
88- /** @deprecated Please us `popupMotion` instead. */
89- popupTransitionName ?: TransitionNameType ;
90- /** @deprecated Please us `popupMotion` instead. */
91- popupAnimation ?: AnimationType ;
92- /** @deprecated Please us `maskMotion` instead. */
93- maskTransitionName ?: TransitionNameType ;
94- /** @deprecated Please us `maskMotion` instead. */
95- maskAnimation ?: AnimationType ;
96-
9783 // ==================== Delay ====================
9884 mouseEnterDelay ?: number ;
9985 mouseLeaveDelay ?: number ;
@@ -123,10 +109,6 @@ export interface TriggerProps {
123109 // ==================== Arrow ====================
124110 arrow ?: boolean | ArrowTypeOuter ;
125111
126- // ================= Deprecated ==================
127- /** @deprecated Add `className` on `children`. Please add `className` directly instead. */
128- className ?: string ;
129-
130112 // =================== Private ===================
131113 /**
132114 * @private Get trigger DOM node.
@@ -174,7 +156,6 @@ export function generateTrigger(
174156 getPopupContainer,
175157 forceRender,
176158 autoDestroy,
177- destroyPopupOnHide,
178159
179160 // Popup
180161 popup,
@@ -200,21 +181,14 @@ export function generateTrigger(
200181 // Motion
201182 popupMotion,
202183 maskMotion,
203- popupTransitionName,
204- popupAnimation,
205- maskTransitionName,
206- maskAnimation,
207-
208- // Deprecated
209- className,
210184
211185 // Private
212186 getTriggerDOMNode,
213187
214188 ...restProps
215189 } = props ;
216190
217- const mergedAutoDestroy = autoDestroy || destroyPopupOnHide || false ;
191+ const mergedAutoDestroy = autoDestroy || false ;
218192
219193 // =========================== Mobile ===========================
220194 const [ mobile , setMobile ] = React . useState ( false ) ;
@@ -289,21 +263,6 @@ export function generateTrigger(
289263 ) ;
290264 } ) ;
291265
292- // =========================== Motion ===========================
293- const mergePopupMotion = getMotion (
294- prefixCls ,
295- popupMotion ,
296- popupAnimation ,
297- popupTransitionName ,
298- ) ;
299-
300- const mergeMaskMotion = getMotion (
301- prefixCls ,
302- maskMotion ,
303- maskAnimation ,
304- maskTransitionName ,
305- ) ;
306-
307266 // ============================ Open ============================
308267 const [ internalOpen , setInternalOpen ] = React . useState (
309268 defaultPopupVisible || false ,
@@ -639,11 +598,6 @@ export function generateTrigger(
639598 } ;
640599 }
641600
642- // ========================= ClassName ==========================
643- if ( className ) {
644- cloneProps . className = classNames ( originChildProps . className , className ) ;
645- }
646-
647601 // =========================== Render ===========================
648602 const mergedChildrenProps = {
649603 ...originChildProps ,
@@ -726,8 +680,8 @@ export function generateTrigger(
726680 // Mask
727681 mask = { mask }
728682 // Motion
729- motion = { mergePopupMotion }
730- maskMotion = { mergeMaskMotion }
683+ motion = { popupMotion }
684+ maskMotion = { maskMotion }
731685 onVisibleChanged = { onVisibleChanged }
732686 onPrepare = { onPrepare }
733687 // Portal
0 commit comments