@chakra-ui/transition
Advanced tools
Comparing version 2.0.12 to 2.0.13
@@ -1,190 +0,8 @@ | ||
import * as react from 'react'; | ||
import { Transition, Target, HTMLMotionProps } from 'framer-motion'; | ||
declare type TransitionProperties = { | ||
/** | ||
* Custom `transition` definition for `enter` and `exit` | ||
*/ | ||
transition?: TransitionConfig; | ||
/** | ||
* Custom `transitionEnd` definition for `enter` and `exit` | ||
*/ | ||
transitionEnd?: TransitionEndConfig; | ||
/** | ||
* Custom `delay` definition for `enter` and `exit` | ||
*/ | ||
delay?: number | DelayConfig; | ||
}; | ||
declare type WithMotionState<P> = Partial<Record<"enter" | "exit", P>>; | ||
declare type TransitionConfig = WithMotionState<Transition>; | ||
declare type TransitionEndConfig = WithMotionState<Target>; | ||
declare type DelayConfig = WithMotionState<number>; | ||
declare const TRANSITION_EASINGS: { | ||
readonly ease: readonly [0.25, 0.1, 0.25, 1]; | ||
readonly easeIn: readonly [0.4, 0, 1, 1]; | ||
readonly easeOut: readonly [0, 0, 0.2, 1]; | ||
readonly easeInOut: readonly [0.4, 0, 0.2, 1]; | ||
}; | ||
declare type SlideDirection = "top" | "left" | "bottom" | "right"; | ||
declare function getSlideTransition(options?: { | ||
direction?: SlideDirection; | ||
}): { | ||
position: { | ||
left: number; | ||
top: number; | ||
bottom: number; | ||
width: string; | ||
}; | ||
enter: { | ||
x: number; | ||
y: number; | ||
}; | ||
exit: { | ||
x: string; | ||
y: number; | ||
}; | ||
} | { | ||
position: { | ||
right: number; | ||
top: number; | ||
bottom: number; | ||
width: string; | ||
}; | ||
enter: { | ||
x: number; | ||
y: number; | ||
}; | ||
exit: { | ||
x: string; | ||
y: number; | ||
}; | ||
} | { | ||
position: { | ||
top: number; | ||
left: number; | ||
right: number; | ||
maxWidth: string; | ||
}; | ||
enter: { | ||
x: number; | ||
y: number; | ||
}; | ||
exit: { | ||
x: number; | ||
y: string; | ||
}; | ||
} | { | ||
position: { | ||
bottom: number; | ||
left: number; | ||
right: number; | ||
maxWidth: string; | ||
}; | ||
enter: { | ||
x: number; | ||
y: number; | ||
}; | ||
exit: { | ||
x: number; | ||
y: string; | ||
}; | ||
}; | ||
declare type WithTransitionConfig<P extends object> = Omit<P, "transition"> & TransitionProperties & { | ||
/** | ||
* If `true`, the element will unmount when `in={false}` and animation is done | ||
*/ | ||
unmountOnExit?: boolean; | ||
/** | ||
* Show the component; triggers when enter or exit states | ||
*/ | ||
in?: boolean; | ||
}; | ||
declare const withDelay: { | ||
enter: (transition: Transition, delay?: number | DelayConfig) => Transition & { | ||
delay: number | undefined; | ||
}; | ||
exit: (transition: Transition, delay?: number | DelayConfig) => Transition & { | ||
delay: number | undefined; | ||
}; | ||
}; | ||
interface CollapseOptions { | ||
/** | ||
* If `true`, the opacity of the content will be animated | ||
* @default true | ||
*/ | ||
animateOpacity?: boolean; | ||
/** | ||
* The height you want the content in its collapsed state. | ||
* @default 0 | ||
*/ | ||
startingHeight?: number | string; | ||
/** | ||
* The height you want the content in its expanded state. | ||
* @default "auto" | ||
*/ | ||
endingHeight?: number | string; | ||
} | ||
declare type ICollapse = CollapseProps; | ||
interface CollapseProps extends WithTransitionConfig<HTMLMotionProps<"div">>, CollapseOptions { | ||
} | ||
declare const Collapse: react.ForwardRefExoticComponent<CollapseProps & react.RefAttributes<HTMLDivElement>>; | ||
interface FadeProps extends WithTransitionConfig<HTMLMotionProps<"div">> { | ||
} | ||
declare const fadeConfig: HTMLMotionProps<"div">; | ||
declare const Fade: react.ForwardRefExoticComponent<FadeProps & react.RefAttributes<HTMLDivElement>>; | ||
interface ScaleFadeOptions { | ||
/** | ||
* The initial scale of the element | ||
* @default 0.95 | ||
*/ | ||
initialScale?: number; | ||
/** | ||
* If `true`, the element will transition back to exit state | ||
* @default true | ||
*/ | ||
reverse?: boolean; | ||
} | ||
declare const scaleFadeConfig: HTMLMotionProps<"div">; | ||
interface ScaleFadeProps extends ScaleFadeOptions, WithTransitionConfig<HTMLMotionProps<"div">> { | ||
} | ||
declare const ScaleFade: react.ForwardRefExoticComponent<ScaleFadeProps & react.RefAttributes<HTMLDivElement>>; | ||
interface SlideOptions { | ||
/** | ||
* The direction to slide from | ||
* @default "right" | ||
*/ | ||
direction?: SlideDirection; | ||
} | ||
interface SlideProps extends WithTransitionConfig<HTMLMotionProps<"div">>, SlideOptions { | ||
motionProps?: HTMLMotionProps<"div">; | ||
} | ||
declare const Slide: react.ForwardRefExoticComponent<SlideProps & react.RefAttributes<HTMLDivElement>>; | ||
interface SlideFadeOptions { | ||
/** | ||
* The offset on the horizontal or `x` axis | ||
* @default 0 | ||
*/ | ||
offsetX?: string | number; | ||
/** | ||
* The offset on the vertical or `y` axis | ||
* @default 8 | ||
*/ | ||
offsetY?: string | number; | ||
/** | ||
* If `true`, the element will be transitioned back to the offset when it leaves. | ||
* Otherwise, it'll only fade out | ||
* @default true | ||
*/ | ||
reverse?: boolean; | ||
} | ||
declare const slideFadeConfig: HTMLMotionProps<"div">; | ||
interface SlideFadeProps extends SlideFadeOptions, WithTransitionConfig<HTMLMotionProps<"div">> { | ||
} | ||
declare const SlideFade: react.ForwardRefExoticComponent<SlideFadeProps & react.RefAttributes<HTMLDivElement>>; | ||
export { Collapse, CollapseOptions, CollapseProps, TRANSITION_EASINGS as EASINGS, Fade, FadeProps, ICollapse, ScaleFade, ScaleFadeProps, Slide, SlideDirection, SlideFade, SlideFadeProps, SlideOptions, SlideProps, TransitionProperties, fadeConfig, getSlideTransition, scaleFadeConfig, slideFadeConfig, withDelay }; | ||
export { Collapse, CollapseOptions, CollapseProps, ICollapse } from './collapse.js'; | ||
export { Fade, FadeProps, fadeConfig } from './fade.js'; | ||
export { ScaleFade, ScaleFadeProps, scaleFadeConfig } from './scale-fade.js'; | ||
export { Slide, SlideOptions, SlideProps } from './slide.js'; | ||
export { SlideFade, SlideFadeProps, slideFadeConfig } from './slide-fade.js'; | ||
export { TRANSITION_EASINGS as EASINGS, SlideDirection, TransitionProperties, getSlideTransition, withDelay } from './transition-utils.js'; | ||
import 'react'; | ||
import 'framer-motion'; |
{ | ||
"name": "@chakra-ui/transition", | ||
"version": "2.0.12", | ||
"version": "2.0.13", | ||
"description": "Common transition components for Chakra UI", | ||
@@ -17,3 +17,3 @@ "sideEffects": false, | ||
"license": "MIT", | ||
"main": "dist/index.cjs.js", | ||
"main": "dist/index.js", | ||
"files": [ | ||
@@ -38,15 +38,26 @@ "dist" | ||
"devDependencies": { | ||
"@chakra-ui/hooks": "2.1.2", | ||
"@chakra-ui/shared-utils": "2.0.3", | ||
"framer-motion": "^6.2.9", | ||
"react": "^18.0.0", | ||
"clean-package": "2.1.1" | ||
"clean-package": "2.1.1", | ||
"@chakra-ui/hooks": "2.1.3" | ||
}, | ||
"module": "dist/index.esm.js", | ||
"clean-package": "../../../clean-package.config.json", | ||
"tsup": { | ||
"clean": true, | ||
"target": "es2019", | ||
"format": [ | ||
"cjs", | ||
"esm" | ||
] | ||
}, | ||
"dependencies": { | ||
"@chakra-ui/shared-utils": "2.0.4" | ||
}, | ||
"module": "dist/index.mjs", | ||
"types": "dist/index.d.ts", | ||
"exports": { | ||
".": { | ||
"import": "./dist/index.esm.js", | ||
"require": "./dist/index.cjs.js", | ||
"types": "./dist/index.d.ts" | ||
"types": "./dist/index.d.ts", | ||
"import": "./dist/index.mjs", | ||
"require": "./dist/index.js" | ||
}, | ||
@@ -56,8 +67,8 @@ "./package.json": "./package.json" | ||
"scripts": { | ||
"build": "JSX=1 tsup src/index.ts --dts", | ||
"build": "tsup src --dts", | ||
"dev": "pnpm build:fast -- --watch", | ||
"clean": "rimraf dist .turbo", | ||
"typecheck": "tsc --noEmit", | ||
"build:fast": "JSX=1 tsup src/index.ts" | ||
"build:fast": "tsup src" | ||
} | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
71429
4
30
2328
0
3
1
+ Added@chakra-ui/shared-utils@2.0.4(transitive)