Add velocity-react for animations

This commit is contained in:
Eric Schultz 2019-02-14 16:10:31 -06:00
parent 961695403c
commit 159932b51e
3 changed files with 631 additions and 201 deletions

784
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -48,8 +48,8 @@
"copy-webpack-plugin": "^4.5.1",
"css-loader": "^0.28.10",
"cssnano": "3.10.0",
"enzyme": "^3.4.2",
"enzyme-adapter-react-16": "^1.1.1",
"enzyme": "^3.8.0",
"enzyme-adapter-react-16": "^1.9.1",
"enzyme-to-json": "^3.3.3",
"exports-loader": "^0.7.0",
"expose-loader": "^0.7.5",
@ -61,7 +61,7 @@
"jsdom": "^11.10.0",
"less": "^3.0.4",
"less-loader": "^4.1.0",
"lodash": "^4.17.5",
"lodash": "^4.17.11",
"node-sass": "^4.11.0",
"phantomjs-prebuilt": "^2.1.16",
"postcss-cssnext": "^2.9.0",
@ -83,8 +83,9 @@
"webpack-sweet-entry": "^1.1.4"
},
"dependencies": {
"@types/velocity-animate": "^1.2.33",
"attr-binder": "0.3.1",
"aws-sdk": "2.2.39",
"aws-sdk": "^2.402.0",
"chart.js": "2.1.4",
"color": "0.11.3",
"colors": "1.1.2",
@ -146,6 +147,7 @@
"uuid": "2.0.2",
"validator": "^9.4.1",
"vdom-thunk": "3.0.0",
"velocity-react": "^1.4.1",
"view-script": "0.3.6",
"virtual-dom": "2.1.1",
"vvvview": "0.4.3"

38
types/velocity-react/index.d.ts vendored Normal file
View file

@ -0,0 +1,38 @@
// License: LGPL-3.0-or-later
declare module "velocity-react"
import * as React from 'react'
import * as Velocity from 'velocity-animate'
import 'velocity-animate/velocity.ui'
type Animation = object|string
type TargetQuerySelector = "children" | string
interface VelocityComponentProps
{
animation: Animation
runOnMount?: boolean
targetQuerySelector?: TargetQuerySelector
}
export declare class VelocityComponent extends React.Component<VelocityComponentProps, {}>
{
runAnimation():void
}
interface VelocityTransitionGroupProps {
enter: Animation
leave?: Animation
runOnMount?: boolean
style?: CSSProperties
}
export declare class VelocityTransitionGroup extends React.Component<VelocityTransitionGroupProps, {}> {
static disabledForTest: boolean
}
export declare namespace velocityHelpers {
declare function registerEffect(animation:Animation)
declare function registerEffect(suffix:string, animation:Animation)
}