import React from 'react'; import { AnimationEventProps } from '../internals/types'; export declare enum STATUS { UNMOUNTED = 0, EXITED = 1, ENTERING = 2, ENTERED = 3, EXITING = 4 } export interface TransitionProps extends AnimationEventProps { animation?: boolean; /** Primary content */ children?: ((props: any, ref: React.Ref) => React.ReactNode) | React.ReactNode; /** Additional classes */ className?: string; /** Show the component; triggers the enter or exit animation */ in?: boolean; /** Unmount the component (remove it from the DOM) when it is not shown */ unmountOnExit?: boolean; /** Run the enter animation when the component mounts, if it is initially shown */ transitionAppear?: boolean; /** A Timeout for the animation */ timeout?: number; /** CSS class or classes applied when the component is exited */ exitedClassName?: string; /** CSS class or classes applied while the component is exiting */ exitingClassName?: string; /** CSS class or classes applied when the component is entered */ enteredClassName?: string; /** CSS class or classes applied while the component is entering */ enteringClassName?: string; } interface TransitionState { status?: number; } type EventToken = { off: () => void; }; /** * A Transition component for animation. * @see https://rsuitejs.com/components/animation/#transition */ declare class Transition extends React.Component { static displayName: string; static defaultProps: { timeout: number; }; animationEventListener: EventToken | null; instanceElement: HTMLElement | null; nextCallback: { (event?: React.AnimationEvent): void; cancel: () => any; } | null; needsUpdate: boolean | null; childRef: React.RefObject; constructor(props: TransitionProps); static getDerivedStateFromProps(nextProps: TransitionProps, prevState: TransitionState): { status: STATUS; } | null; getSnapshotBeforeUpdate(): null; componentDidMount(): void; componentDidUpdate(): void; componentWillUnmount(): void; onTransitionEnd(node: HTMLElement, handler: (event?: React.AnimationEvent) => void): void; setNextCallback(callback: (event?: React.AnimationEvent) => void): { (event?: React.AnimationEvent): void; cancel: () => any; } | null; getChildElement(): HTMLElement; performEnter(props: TransitionProps): void; performExit(props: TransitionProps): void; cancelNextCallback(): void; safeSetState(nextState: TransitionState, callback: (event?: React.AnimationEvent) => void): void; render(): string | number | bigint | boolean | React.ReactElement> | Iterable | Promise> | Iterable | null | undefined> | React.DetailedReactHTMLElement | null | undefined; } export default Transition;