@chakra-ui/transition
Advanced tools
Comparing version 0.0.0-dev-20230116124502 to 0.0.0-dev-20230329123951
@@ -22,3 +22,3 @@ import * as react from 'react'; | ||
} | ||
declare type ICollapse = CollapseProps; | ||
type ICollapse = CollapseProps; | ||
interface CollapseProps extends WithTransitionConfig<HTMLMotionProps<"div">>, CollapseOptions { | ||
@@ -25,0 +25,0 @@ } |
@@ -125,3 +125,3 @@ "use strict"; | ||
(0, import_shared_utils.warn)({ | ||
condition: Boolean(startingHeight > 0 && unmountOnExit), | ||
condition: Number(startingHeight) > 0 && !!unmountOnExit, | ||
message: `startingHeight and unmountOnExit are mutually exclusive. You can't use them together` | ||
@@ -128,0 +128,0 @@ }); |
@@ -199,3 +199,3 @@ "use strict"; | ||
(0, import_shared_utils.warn)({ | ||
condition: Boolean(startingHeight > 0 && unmountOnExit), | ||
condition: Number(startingHeight) > 0 && !!unmountOnExit, | ||
message: `startingHeight and unmountOnExit are mutually exclusive. You can't use them together` | ||
@@ -202,0 +202,0 @@ }); |
import { Transition, Target, TargetAndTransition } from 'framer-motion'; | ||
declare type TransitionProperties = { | ||
type TransitionProperties = { | ||
/** | ||
@@ -17,5 +17,5 @@ * Custom `transition` definition for `enter` and `exit` | ||
}; | ||
declare type TargetResolver<P = {}> = (props: P & TransitionProperties) => TargetAndTransition; | ||
declare type Variant<P = {}> = TargetAndTransition | TargetResolver<P>; | ||
declare type Variants<P = {}> = { | ||
type TargetResolver<P = {}> = (props: P & TransitionProperties) => TargetAndTransition; | ||
type Variant<P = {}> = TargetAndTransition | TargetResolver<P>; | ||
type Variants<P = {}> = { | ||
enter: Variant<P>; | ||
@@ -25,6 +25,6 @@ exit: Variant<P>; | ||
}; | ||
declare type WithMotionState<P> = Partial<Record<"enter" | "exit", P>>; | ||
declare type TransitionConfig = WithMotionState<Transition>; | ||
declare type TransitionEndConfig = WithMotionState<Target>; | ||
declare type DelayConfig = WithMotionState<number>; | ||
type WithMotionState<P> = Partial<Record<"enter" | "exit", P>>; | ||
type TransitionConfig = WithMotionState<Transition>; | ||
type TransitionEndConfig = WithMotionState<Target>; | ||
type DelayConfig = WithMotionState<number>; | ||
declare const TRANSITION_EASINGS: { | ||
@@ -150,3 +150,3 @@ readonly ease: readonly [0.25, 0.1, 0.25, 1]; | ||
}; | ||
declare type SlideDirection = "top" | "left" | "bottom" | "right"; | ||
type SlideDirection = "top" | "left" | "bottom" | "right"; | ||
declare function getSlideTransition(options?: { | ||
@@ -225,3 +225,3 @@ direction?: SlideDirection; | ||
}; | ||
declare type WithTransitionConfig<P extends object> = Omit<P, "transition"> & TransitionProperties & { | ||
type WithTransitionConfig<P extends object> = Omit<P, "transition"> & TransitionProperties & { | ||
/** | ||
@@ -228,0 +228,0 @@ * If `true`, the element will unmount when `in={false}` and animation is done |
{ | ||
"name": "@chakra-ui/transition", | ||
"version": "0.0.0-dev-20230116124502", | ||
"version": "0.0.0-dev-20230329123951", | ||
"description": "Common transition components for Chakra UI", | ||
@@ -39,4 +39,4 @@ "sideEffects": false, | ||
"react": "^18.0.0", | ||
"clean-package": "2.1.1", | ||
"@chakra-ui/hooks": "2.1.5" | ||
"clean-package": "2.2.0", | ||
"@chakra-ui/hooks": "2.1.6" | ||
}, | ||
@@ -43,0 +43,0 @@ "clean-package": "../../../clean-package.config.json", |
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
71424