rc-trigger
Advanced tools
Comparing version 4.3.5 to 4.4.0
import React from 'react'; | ||
import { ActionType, AlignType, BuildInPlacements, TransitionNameType, AnimationType, MotionType } from './interface'; | ||
import { CSSMotionProps } from 'rc-motion'; | ||
import { ActionType, AlignType, BuildInPlacements, TransitionNameType, AnimationType } from './interface'; | ||
export interface TriggerProps { | ||
@@ -36,6 +37,6 @@ children: React.ReactElement; | ||
alignPoint?: boolean; | ||
/** Set popup motion. You can ref `rc-animate` for more info. */ | ||
popupMotion?: MotionType; | ||
/** Set mask motion. You can ref `rc-animate` for more info. */ | ||
maskMotion?: MotionType; | ||
/** Set popup motion. You can ref `rc-motion` for more info. */ | ||
popupMotion?: CSSMotionProps; | ||
/** Set mask motion. You can ref `rc-motion` for more info. */ | ||
maskMotion?: CSSMotionProps; | ||
/** @deprecated Please us `popupMotion` instead. */ | ||
@@ -42,0 +43,0 @@ popupTransitionName?: TransitionNameType; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
/** Two char of 't' 'b' 'c' 'l' 'r'. Example: 'lt' */ | ||
@@ -57,34 +56,1 @@ export declare type AlignPoint = string; | ||
} | ||
declare type MotionStatus = 'none' | 'appear' | 'enter' | 'leave'; | ||
declare type MotionActiveStatus = 'appear-active' | 'enter-active' | 'leave-active'; | ||
declare type MotionNameObject = { | ||
[key in MotionStatus | MotionActiveStatus]?: string; | ||
}; | ||
declare type MotionEventHandler = (element: HTMLElement, event: React.TransitionEvent<HTMLElement> | React.AnimationEvent<HTMLElement> | undefined) => React.CSSProperties | false | null | undefined | void; | ||
export interface MotionType { | ||
motionName?: string | MotionNameObject; | ||
motionAppear?: boolean; | ||
motionEnter?: boolean; | ||
motionLeave?: boolean; | ||
motionLeaveImmediately?: boolean; | ||
removeOnLeave?: boolean; | ||
leavedClassName?: string; | ||
onAppearStart?: MotionEventHandler; | ||
onAppearActive?: MotionEventHandler; | ||
onAppearEnd?: MotionEventHandler; | ||
onEnterStart?: MotionEventHandler; | ||
onEnterActive?: MotionEventHandler; | ||
onEnterEnd?: MotionEventHandler; | ||
onLeaveStart?: MotionEventHandler; | ||
onLeaveActive?: MotionEventHandler; | ||
onLeaveEnd?: MotionEventHandler; | ||
} | ||
export interface MotionProps extends MotionType { | ||
visible?: boolean; | ||
children: (props: { | ||
className: string; | ||
style: React.CSSProperties; | ||
}, ref: React.Ref<any>) => React.ReactElement; | ||
} | ||
export declare type CSSMotionClass = React.ComponentClass<MotionProps>; | ||
export {}; |
import React, { Component } from 'react'; | ||
import { StretchType, AlignType, TransitionNameType, AnimationType, Point, MotionType } from './interface'; | ||
import { CSSMotionProps } from 'rc-motion'; | ||
import { StretchType, AlignType, TransitionNameType, AnimationType, Point } from './interface'; | ||
/** | ||
@@ -33,4 +34,4 @@ * Popup should follow the steps for each component work correctly: | ||
mask?: boolean; | ||
motion: MotionType; | ||
maskMotion: MotionType; | ||
motion: CSSMotionProps; | ||
maskMotion: CSSMotionProps; | ||
animation: AnimationType; | ||
@@ -67,11 +68,4 @@ transitionName: TransitionNameType; | ||
getMotion: () => { | ||
motionName?: string | { | ||
none?: string; | ||
enter?: string; | ||
appear?: string; | ||
leave?: string; | ||
"appear-active"?: string; | ||
"enter-active"?: string; | ||
"leave-active"?: string; | ||
}; | ||
motionName?: import("rc-motion/lib/CSSMotion").MotionName; | ||
visible?: boolean; | ||
motionAppear?: boolean; | ||
@@ -81,13 +75,21 @@ motionEnter?: boolean; | ||
motionLeaveImmediately?: boolean; | ||
motionDeadline?: number; | ||
removeOnLeave?: boolean; | ||
leavedClassName?: string; | ||
onAppearStart?: (element: HTMLElement, event: React.AnimationEvent<HTMLElement> | React.TransitionEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onAppearActive?: (element: HTMLElement, event: React.AnimationEvent<HTMLElement> | React.TransitionEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onAppearEnd?: (element: HTMLElement, event: React.AnimationEvent<HTMLElement> | React.TransitionEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onEnterStart?: (element: HTMLElement, event: React.AnimationEvent<HTMLElement> | React.TransitionEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onEnterActive?: (element: HTMLElement, event: React.AnimationEvent<HTMLElement> | React.TransitionEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onEnterEnd?: (element: HTMLElement, event: React.AnimationEvent<HTMLElement> | React.TransitionEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onLeaveStart?: (element: HTMLElement, event: React.AnimationEvent<HTMLElement> | React.TransitionEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onLeaveActive?: (element: HTMLElement, event: React.AnimationEvent<HTMLElement> | React.TransitionEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onLeaveEnd?: (element: HTMLElement, event: React.AnimationEvent<HTMLElement> | React.TransitionEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
eventProps?: object; | ||
onAppearStart?: import("rc-motion/lib/CSSMotion").MotionEventHandler; | ||
onEnterStart?: import("rc-motion/lib/CSSMotion").MotionEventHandler; | ||
onLeaveStart?: import("rc-motion/lib/CSSMotion").MotionEventHandler; | ||
onAppearActive?: import("rc-motion/lib/CSSMotion").MotionEventHandler; | ||
onEnterActive?: import("rc-motion/lib/CSSMotion").MotionEventHandler; | ||
onLeaveActive?: import("rc-motion/lib/CSSMotion").MotionEventHandler; | ||
onAppearEnd?: import("rc-motion/lib/CSSMotion").MotionEndEventHandler; | ||
onEnterEnd?: import("rc-motion/lib/CSSMotion").MotionEndEventHandler; | ||
onLeaveEnd?: import("rc-motion/lib/CSSMotion").MotionEndEventHandler; | ||
internalRef?: React.Ref<any>; | ||
children?: (props: { | ||
[key: string]: any; | ||
className?: string; | ||
style?: React.CSSProperties; | ||
}, ref: (node: any) => void) => React.ReactNode; | ||
}; | ||
@@ -94,0 +96,0 @@ getAlignTarget: () => Point | (() => HTMLElement); |
@@ -14,6 +14,5 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; | ||
import classNames from 'classnames'; | ||
import RawCSSMotion from "rc-animate/es/CSSMotion"; | ||
import CSSMotion from 'rc-motion'; | ||
import PopupInner from './PopupInner'; | ||
import { getMotion } from './utils/legacyUtil'; | ||
var CSSMotion = RawCSSMotion; | ||
@@ -20,0 +19,0 @@ function supportMotion(motion) { |
@@ -1,4 +0,5 @@ | ||
import { MotionType, AnimationType, TransitionNameType } from '../interface'; | ||
import { CSSMotionProps } from 'rc-motion'; | ||
import { AnimationType, TransitionNameType } from '../interface'; | ||
interface GetMotionProps { | ||
motion: MotionType; | ||
motion: CSSMotionProps; | ||
animation: AnimationType; | ||
@@ -8,3 +9,3 @@ transitionName: TransitionNameType; | ||
} | ||
export declare function getMotion({ prefixCls, motion, animation, transitionName, }: GetMotionProps): MotionType; | ||
export declare function getMotion({ prefixCls, motion, animation, transitionName, }: GetMotionProps): CSSMotionProps; | ||
export {}; |
import React from 'react'; | ||
import { ActionType, AlignType, BuildInPlacements, TransitionNameType, AnimationType, MotionType } from './interface'; | ||
import { CSSMotionProps } from 'rc-motion'; | ||
import { ActionType, AlignType, BuildInPlacements, TransitionNameType, AnimationType } from './interface'; | ||
export interface TriggerProps { | ||
@@ -36,6 +37,6 @@ children: React.ReactElement; | ||
alignPoint?: boolean; | ||
/** Set popup motion. You can ref `rc-animate` for more info. */ | ||
popupMotion?: MotionType; | ||
/** Set mask motion. You can ref `rc-animate` for more info. */ | ||
maskMotion?: MotionType; | ||
/** Set popup motion. You can ref `rc-motion` for more info. */ | ||
popupMotion?: CSSMotionProps; | ||
/** Set mask motion. You can ref `rc-motion` for more info. */ | ||
maskMotion?: CSSMotionProps; | ||
/** @deprecated Please us `popupMotion` instead. */ | ||
@@ -42,0 +43,0 @@ popupTransitionName?: TransitionNameType; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="react" /> | ||
/** Two char of 't' 'b' 'c' 'l' 'r'. Example: 'lt' */ | ||
@@ -57,34 +56,1 @@ export declare type AlignPoint = string; | ||
} | ||
declare type MotionStatus = 'none' | 'appear' | 'enter' | 'leave'; | ||
declare type MotionActiveStatus = 'appear-active' | 'enter-active' | 'leave-active'; | ||
declare type MotionNameObject = { | ||
[key in MotionStatus | MotionActiveStatus]?: string; | ||
}; | ||
declare type MotionEventHandler = (element: HTMLElement, event: React.TransitionEvent<HTMLElement> | React.AnimationEvent<HTMLElement> | undefined) => React.CSSProperties | false | null | undefined | void; | ||
export interface MotionType { | ||
motionName?: string | MotionNameObject; | ||
motionAppear?: boolean; | ||
motionEnter?: boolean; | ||
motionLeave?: boolean; | ||
motionLeaveImmediately?: boolean; | ||
removeOnLeave?: boolean; | ||
leavedClassName?: string; | ||
onAppearStart?: MotionEventHandler; | ||
onAppearActive?: MotionEventHandler; | ||
onAppearEnd?: MotionEventHandler; | ||
onEnterStart?: MotionEventHandler; | ||
onEnterActive?: MotionEventHandler; | ||
onEnterEnd?: MotionEventHandler; | ||
onLeaveStart?: MotionEventHandler; | ||
onLeaveActive?: MotionEventHandler; | ||
onLeaveEnd?: MotionEventHandler; | ||
} | ||
export interface MotionProps extends MotionType { | ||
visible?: boolean; | ||
children: (props: { | ||
className: string; | ||
style: React.CSSProperties; | ||
}, ref: React.Ref<any>) => React.ReactElement; | ||
} | ||
export declare type CSSMotionClass = React.ComponentClass<MotionProps>; | ||
export {}; |
import React, { Component } from 'react'; | ||
import { StretchType, AlignType, TransitionNameType, AnimationType, Point, MotionType } from './interface'; | ||
import { CSSMotionProps } from 'rc-motion'; | ||
import { StretchType, AlignType, TransitionNameType, AnimationType, Point } from './interface'; | ||
/** | ||
@@ -33,4 +34,4 @@ * Popup should follow the steps for each component work correctly: | ||
mask?: boolean; | ||
motion: MotionType; | ||
maskMotion: MotionType; | ||
motion: CSSMotionProps; | ||
maskMotion: CSSMotionProps; | ||
animation: AnimationType; | ||
@@ -67,11 +68,4 @@ transitionName: TransitionNameType; | ||
getMotion: () => { | ||
motionName?: string | { | ||
none?: string; | ||
enter?: string; | ||
appear?: string; | ||
leave?: string; | ||
"appear-active"?: string; | ||
"enter-active"?: string; | ||
"leave-active"?: string; | ||
}; | ||
motionName?: import("rc-motion/lib/CSSMotion").MotionName; | ||
visible?: boolean; | ||
motionAppear?: boolean; | ||
@@ -81,13 +75,21 @@ motionEnter?: boolean; | ||
motionLeaveImmediately?: boolean; | ||
motionDeadline?: number; | ||
removeOnLeave?: boolean; | ||
leavedClassName?: string; | ||
onAppearStart?: (element: HTMLElement, event: React.AnimationEvent<HTMLElement> | React.TransitionEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onAppearActive?: (element: HTMLElement, event: React.AnimationEvent<HTMLElement> | React.TransitionEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onAppearEnd?: (element: HTMLElement, event: React.AnimationEvent<HTMLElement> | React.TransitionEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onEnterStart?: (element: HTMLElement, event: React.AnimationEvent<HTMLElement> | React.TransitionEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onEnterActive?: (element: HTMLElement, event: React.AnimationEvent<HTMLElement> | React.TransitionEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onEnterEnd?: (element: HTMLElement, event: React.AnimationEvent<HTMLElement> | React.TransitionEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onLeaveStart?: (element: HTMLElement, event: React.AnimationEvent<HTMLElement> | React.TransitionEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onLeaveActive?: (element: HTMLElement, event: React.AnimationEvent<HTMLElement> | React.TransitionEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
onLeaveEnd?: (element: HTMLElement, event: React.AnimationEvent<HTMLElement> | React.TransitionEvent<HTMLElement>) => false | void | React.CSSProperties; | ||
eventProps?: object; | ||
onAppearStart?: import("rc-motion/lib/CSSMotion").MotionEventHandler; | ||
onEnterStart?: import("rc-motion/lib/CSSMotion").MotionEventHandler; | ||
onLeaveStart?: import("rc-motion/lib/CSSMotion").MotionEventHandler; | ||
onAppearActive?: import("rc-motion/lib/CSSMotion").MotionEventHandler; | ||
onEnterActive?: import("rc-motion/lib/CSSMotion").MotionEventHandler; | ||
onLeaveActive?: import("rc-motion/lib/CSSMotion").MotionEventHandler; | ||
onAppearEnd?: import("rc-motion/lib/CSSMotion").MotionEndEventHandler; | ||
onEnterEnd?: import("rc-motion/lib/CSSMotion").MotionEndEventHandler; | ||
onLeaveEnd?: import("rc-motion/lib/CSSMotion").MotionEndEventHandler; | ||
internalRef?: React.Ref<any>; | ||
children?: (props: { | ||
[key: string]: any; | ||
className?: string; | ||
style?: React.CSSProperties; | ||
}, ref: (node: any) => void) => React.ReactNode; | ||
}; | ||
@@ -94,0 +96,0 @@ getAlignTarget: () => Point | (() => HTMLElement); |
@@ -34,3 +34,3 @@ "use strict"; | ||
var _CSSMotion = _interopRequireDefault(require("rc-animate/lib/CSSMotion")); | ||
var _rcMotion = _interopRequireDefault(require("rc-motion")); | ||
@@ -42,4 +42,2 @@ var _PopupInner = _interopRequireDefault(require("./PopupInner")); | ||
/* eslint-disable no-param-reassign */ | ||
var CSSMotion = _CSSMotion.default; | ||
function supportMotion(motion) { | ||
@@ -230,3 +228,3 @@ return motion && motion.motionName; | ||
return _react.default.createElement(CSSMotion, Object.assign({ | ||
return _react.default.createElement(_rcMotion.default, Object.assign({ | ||
visible: mergedMotionVisible | ||
@@ -288,3 +286,3 @@ }, mergedMotion, { | ||
return _react.default.createElement(CSSMotion, Object.assign({}, motion, { | ||
return _react.default.createElement(_rcMotion.default, Object.assign({}, motion, { | ||
visible: visible, | ||
@@ -291,0 +289,0 @@ removeOnLeave: true |
@@ -1,4 +0,5 @@ | ||
import { MotionType, AnimationType, TransitionNameType } from '../interface'; | ||
import { CSSMotionProps } from 'rc-motion'; | ||
import { AnimationType, TransitionNameType } from '../interface'; | ||
interface GetMotionProps { | ||
motion: MotionType; | ||
motion: CSSMotionProps; | ||
animation: AnimationType; | ||
@@ -8,3 +9,3 @@ transitionName: TransitionNameType; | ||
} | ||
export declare function getMotion({ prefixCls, motion, animation, transitionName, }: GetMotionProps): MotionType; | ||
export declare function getMotion({ prefixCls, motion, animation, transitionName, }: GetMotionProps): CSSMotionProps; | ||
export {}; |
{ | ||
"name": "rc-trigger", | ||
"version": "4.3.5", | ||
"version": "4.4.0", | ||
"description": "base abstract trigger component for react", | ||
@@ -62,5 +62,5 @@ "engines": { | ||
"rc-align": "^4.0.0", | ||
"rc-animate": "^3.0.0", | ||
"rc-motion": "^1.0.0", | ||
"rc-util": "^5.0.1" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
117421
2619
+ Addedrc-motion@^1.0.0
+ Addedrc-motion@1.1.2(transitive)
+ Addedreact@16.14.0(transitive)
+ Addedreact-dom@16.14.0(transitive)
+ Addedscheduler@0.19.1(transitive)
- Removedrc-animate@^3.0.0
- Removed@ant-design/css-animation@1.7.3(transitive)
- Removedadd-dom-event-listener@1.1.0(transitive)
- Removedrc-animate@3.1.1(transitive)
- Removedrc-util@4.21.1(transitive)
- Removedreact-lifecycles-compat@3.0.4(transitive)
- Removedshallowequal@1.1.0(transitive)