react-transitions-library
Advanced tools
Comparing version 1.8.2 to 1.8.3
import { ForwardRefExoticComponent } from "react"; | ||
import { TransitionProps } from "../transition/TransitionProps.type"; | ||
declare type BackdropTransitionProps = TransitionProps & { | ||
declare type BackdropTransitionProps = { | ||
from: string; | ||
to: string; | ||
backgroundColor: string; | ||
}; | ||
} & TransitionProps; | ||
/** | ||
@@ -9,0 +9,0 @@ * NOTE: css backdrop-filter transition is a ducking bitch! |
@@ -24,3 +24,3 @@ var __assign = (this && this.__assign) || function () { | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
import { forwardRef, useMemo, } from "react"; | ||
import { forwardRef, useMemo } from "react"; | ||
import { useCSSStyle } from "../../hooks"; | ||
@@ -57,4 +57,5 @@ import { Transition } from "../transition"; | ||
}); }, [from, to]); | ||
return (_jsx(Transition, __assign({}, props, { timeout: timeout, ref: outsideRef, defaultStyle: defaultStyle, transitionStyle: transitionStyle }, { children: children }), void 0)); | ||
return (_jsx(Transition, __assign({}, props, { timeout: timeout, ref: outsideRef, defaultStyle: defaultStyle, transitionStyle: transitionStyle, className: "BackdropTransition" }, { children: children }), void 0)); | ||
}); | ||
BackdropTransition.displayName = "BackdropTransition"; | ||
export { BackdropTransition }; |
@@ -1,12 +0,9 @@ | ||
import { FC } from "react"; | ||
import { ForwardRefExoticComponent } from "react"; | ||
import { TransitionProps } from "../transition/TransitionProps.type"; | ||
declare type Props = { | ||
timeout: number; | ||
delay?: number; | ||
in: boolean; | ||
from: number; | ||
to: number; | ||
appear?: boolean; | ||
}; | ||
declare const ScaleTransition: FC<Props>; | ||
} & TransitionProps; | ||
declare const ScaleTransition: ForwardRefExoticComponent<Props>; | ||
export { ScaleTransition }; | ||
//# sourceMappingURL=ScaleTransition.d.ts.map |
@@ -24,10 +24,10 @@ var __assign = (this && this.__assign) || function () { | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
import { useMemo } from "react"; | ||
import { forwardRef, useMemo } from "react"; | ||
import { Transition } from "../transition"; | ||
// | ||
var ScaleTransition = function (_a) { | ||
var children = _a.children, timeout = _a.timeout, _b = _a.delay, delay = _b === void 0 ? "0" : _b, _in = _a["in"], from = _a.from, to = _a.to, props = __rest(_a, ["children", "timeout", "delay", "in", "from", "to"]); | ||
import { Ease } from "../../ease"; | ||
var ScaleTransition = forwardRef(function (_a, outsideRef) { | ||
var children = _a.children, timeout = _a.timeout, _b = _a.delay, delay = _b === void 0 ? "0" : _b, _in = _a["in"], from = _a.from, _c = _a.ease, ease = _c === void 0 ? Ease.ease : _c, to = _a.to, props = __rest(_a, ["children", "timeout", "delay", "in", "from", "ease", "to"]); | ||
var defaultStyle = useMemo(function () { return ({ | ||
transform: "scale(".concat(from, ")"), | ||
transition: "transform ".concat(timeout, "ms ease ").concat(delay, "ms"), | ||
transition: "transform ".concat(timeout, "ms ").concat(ease, " ").concat(delay, "ms"), | ||
}); }, [from, timeout, delay]); | ||
@@ -42,4 +42,5 @@ var transitionStyle = useMemo(function () { return ({ | ||
}); }, [to]); | ||
return (_jsx(Transition, __assign({}, props, { in: _in, timeout: timeout, defaultStyle: defaultStyle, transitionStyle: transitionStyle }, { children: children }), void 0)); | ||
}; | ||
return (_jsx(Transition, __assign({}, props, { in: _in, ref: outsideRef, timeout: timeout, defaultStyle: defaultStyle, transitionStyle: transitionStyle }, { children: children }), void 0)); | ||
}); | ||
ScaleTransition.displayName = "ScaleTransition"; | ||
export { ScaleTransition }; |
{ | ||
"name": "react-transitions-library", | ||
"version": "1.8.2", | ||
"version": "1.8.3", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "A react component library for animations.", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
1804781
400
11232