@types/react-transition-group
Advanced tools
Comparing version 4.2.1 to 4.2.2
@@ -1,47 +0,45 @@ | ||
import { Component } from "react"; | ||
import { Component } from 'react'; | ||
import { TransitionProps } from "./Transition"; | ||
declare namespace CSSTransition { | ||
interface CSSTransitionClassNames { | ||
appear?: string; | ||
appearActive?: string; | ||
appearDone?: string; | ||
enter?: string; | ||
enterActive?: string; | ||
enterDone?: string; | ||
exit?: string; | ||
exitActive?: string; | ||
exitDone?: string; | ||
} | ||
export interface CSSTransitionClassNames { | ||
appear?: string; | ||
appearActive?: string; | ||
appearDone?: string; | ||
enter?: string; | ||
enterActive?: string; | ||
enterDone?: string; | ||
exit?: string; | ||
exitActive?: string; | ||
exitDone?: string; | ||
} | ||
interface CSSTransitionProps extends TransitionProps { | ||
/** | ||
* The animation `classNames` applied to the component as it enters or exits. | ||
* A single name can be provided and it will be suffixed for each stage: e.g. | ||
* | ||
* `classNames="fade"` applies `fade-enter`, `fade-enter-active`, | ||
* `fade-exit`, `fade-exit-active`, `fade-appear`, and `fade-appear-active`. | ||
* | ||
* Each individual classNames can also be specified independently like: | ||
* | ||
* ```js | ||
* classNames={{ | ||
* appear: 'my-appear', | ||
* appearActive: 'my-appear-active', | ||
* appearDone: 'my-appear-done', | ||
* enter: 'my-enter', | ||
* enterActive: 'my-enter-active', | ||
* enterDone: 'my-enter-done', | ||
* exit: 'my-exit', | ||
* exitActive: 'my-exit-active', | ||
* exitDone: 'my-exit-done' | ||
* }} | ||
* ``` | ||
*/ | ||
classNames?: string | CSSTransitionClassNames; | ||
} | ||
export interface CSSTransitionProps extends TransitionProps { | ||
/** | ||
* The animation `classNames` applied to the component as it enters or exits. | ||
* A single name can be provided and it will be suffixed for each stage: e.g. | ||
* | ||
* `classNames="fade"` applies `fade-enter`, `fade-enter-active`, | ||
* `fade-exit`, `fade-exit-active`, `fade-appear`, and `fade-appear-active`. | ||
* | ||
* Each individual classNames can also be specified independently like: | ||
* | ||
* ```js | ||
* classNames={{ | ||
* appear: 'my-appear', | ||
* appearActive: 'my-appear-active', | ||
* appearDone: 'my-appear-done', | ||
* enter: 'my-enter', | ||
* enterActive: 'my-enter-active', | ||
* enterDone: 'my-enter-done', | ||
* exit: 'my-exit', | ||
* exitActive: 'my-exit-active', | ||
* exitDone: 'my-exit-done' | ||
* }} | ||
* ``` | ||
*/ | ||
classNames?: string | CSSTransitionClassNames; | ||
} | ||
declare class CSSTransition extends Component<CSSTransition.CSSTransitionProps> {} | ||
declare class CSSTransition extends Component<CSSTransitionProps> {} | ||
export = CSSTransition; | ||
export default CSSTransition; |
@@ -9,12 +9,5 @@ // Type definitions for react-transition-group 4.2 | ||
import CSSTransition = require("./CSSTransition"); | ||
import Transition from "./Transition"; | ||
import TransitionGroup = require("./TransitionGroup"); | ||
import SwitchTransition from "./SwitchTransition"; | ||
export { | ||
CSSTransition, | ||
Transition, | ||
TransitionGroup, | ||
SwitchTransition | ||
}; | ||
export { default as Transition } from './Transition'; | ||
export { default as CSSTransition } from './CSSTransition'; | ||
export { default as TransitionGroup } from './TransitionGroup'; | ||
export { default as SwitchTransition } from './SwitchTransition'; |
{ | ||
"name": "@types/react-transition-group", | ||
"version": "4.2.1", | ||
"version": "4.2.2", | ||
"description": "TypeScript definitions for react-transition-group", | ||
@@ -34,4 +34,4 @@ "license": "MIT", | ||
}, | ||
"typesPublisherContentHash": "edf50e097ec6b821d4708cd757aabe1a0e87178ea1ad878dff70a3beeb296eb7", | ||
"typesPublisherContentHash": "4949dd3ccc6a0b720f3a7f28b3be73145ada8db72c317d0419b404b235af4dcb", | ||
"typeScriptVersion": "2.8" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
Additional Details | ||
* Last updated: Tue, 06 Aug 2019 16:04:04 GMT | ||
* Last updated: Wed, 07 Aug 2019 21:32:19 GMT | ||
* Dependencies: @types/react | ||
@@ -14,0 +14,0 @@ * Global values: none |
@@ -1,2 +0,2 @@ | ||
import { Component } from "react"; | ||
import { Component, ReactElement } from "react"; | ||
@@ -8,16 +8,14 @@ export enum modes { | ||
declare namespace SwitchTransition { | ||
interface SwitchTransitionProps { | ||
/** | ||
* Transition modes. | ||
* `out-in`: Current element transitions out first, then when complete, the new element transitions in. | ||
* `in-out`: New element transitions in first, then when complete, the current element transitions out. | ||
*/ | ||
mode?: 'out-in' | 'in-out'; | ||
export interface SwitchTransitionProps { | ||
/** | ||
* Transition modes. | ||
* `out-in`: Current element transitions out first, then when complete, the new element transitions in. | ||
* `in-out`: New element transitions in first, then when complete, the current element transitions out. | ||
*/ | ||
mode?: 'out-in' | 'in-out'; | ||
/** | ||
* Any `Transition` or `CSSTransition` component | ||
*/ | ||
children: React.ReactElement; | ||
} | ||
/** | ||
* Any `Transition` or `CSSTransition` component | ||
*/ | ||
children: ReactElement; | ||
} | ||
@@ -50,4 +48,4 @@ | ||
*/ | ||
declare class SwitchTransition extends Component<SwitchTransition.SwitchTransitionProps> {} | ||
declare class SwitchTransition extends Component<SwitchTransitionProps> {} | ||
export default SwitchTransition; |
@@ -1,2 +0,2 @@ | ||
import { Component } from "react"; | ||
import { Component, ReactNode } from "react"; | ||
@@ -40,3 +40,3 @@ export type EndHandler = (node: HTMLElement, done: () => void) => void; | ||
typeof UNMOUNTED; | ||
export type TransitionChildren = React.ReactNode | ((status: TransitionStatus) => React.ReactNode); | ||
export type TransitionChildren = ReactNode | ((status: TransitionStatus) => ReactNode); | ||
export interface TransitionProps extends TransitionActions { | ||
@@ -43,0 +43,0 @@ /** |
import { Component, ReactType, HTMLProps, ReactElement } from "react"; | ||
import { TransitionActions, TransitionProps } from "./Transition"; | ||
declare namespace TransitionGroup { | ||
interface IntrinsicTransitionGroupProps<T extends keyof JSX.IntrinsicElements = "div"> extends TransitionActions { | ||
component?: T|null; | ||
} | ||
export interface IntrinsicTransitionGroupProps<T extends keyof JSX.IntrinsicElements = 'div'> | ||
extends TransitionActions { | ||
component?: T | null; | ||
} | ||
interface ComponentTransitionGroupProps<T extends ReactType> extends TransitionActions { | ||
component: T; | ||
} | ||
type TransitionGroupProps<T extends keyof JSX.IntrinsicElements = "div", V extends ReactType = any> = | ||
(IntrinsicTransitionGroupProps<T> & JSX.IntrinsicElements[T]) | (ComponentTransitionGroupProps<V>) & { | ||
children?: ReactElement<TransitionProps> | Array<ReactElement<TransitionProps>>; | ||
childFactory?(child: ReactElement): ReactElement; | ||
[prop: string]: any; | ||
}; | ||
export interface ComponentTransitionGroupProps<T extends ReactType> extends TransitionActions { | ||
component: T; | ||
} | ||
export type TransitionGroupProps<T extends keyof JSX.IntrinsicElements = 'div', V extends ReactType = any> = | ||
| (IntrinsicTransitionGroupProps<T> & JSX.IntrinsicElements[T]) | ||
| (ComponentTransitionGroupProps<V>) & { | ||
children?: ReactElement<TransitionProps> | Array<ReactElement<TransitionProps>>; | ||
childFactory?(child: ReactElement): ReactElement; | ||
[prop: string]: any; | ||
}; | ||
/** | ||
@@ -78,4 +78,4 @@ * The `<TransitionGroup>` component manages a set of `<Transition>` components | ||
*/ | ||
declare class TransitionGroup extends Component<TransitionGroup.TransitionGroupProps> {} | ||
declare class TransitionGroup extends Component<TransitionGroupProps> {} | ||
export = TransitionGroup; | ||
export default TransitionGroup; |
15297
339