@yamada-ui/motion 0.1.10 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/motion.d.ts +27 -0
- package/package.json +3 -3
package/dist/motion.d.ts
CHANGED
|
@@ -11,12 +11,33 @@ type MotionTransitionVariants<Y = Dict> = {
|
|
|
11
11
|
initial?: Variant<Y>;
|
|
12
12
|
};
|
|
13
13
|
type MotionTransitionProperties = {
|
|
14
|
+
/**
|
|
15
|
+
* Custom `transition` definition for `enter` and `exit`.
|
|
16
|
+
*/
|
|
14
17
|
transition?: MotionTransitionProps;
|
|
18
|
+
/**
|
|
19
|
+
* Custom `transitionEnd` definition for `enter` and `exit`.
|
|
20
|
+
*/
|
|
15
21
|
transitionEnd?: MotionTransitionEndProps;
|
|
22
|
+
/**
|
|
23
|
+
* Custom `delay` definition for `enter` and `exit`.
|
|
24
|
+
*/
|
|
16
25
|
delay?: number | MotionDelayProps;
|
|
26
|
+
/**
|
|
27
|
+
* Custom `duration` definition for `enter` and `exit`.
|
|
28
|
+
*/
|
|
17
29
|
duration?: number | MotionDurationProps;
|
|
30
|
+
/**
|
|
31
|
+
* Custom `enter`.
|
|
32
|
+
*/
|
|
18
33
|
enter?: any;
|
|
34
|
+
/**
|
|
35
|
+
* Custom `exit`.
|
|
36
|
+
*/
|
|
19
37
|
exit?: any;
|
|
38
|
+
/**
|
|
39
|
+
* Custom `initial`.
|
|
40
|
+
*/
|
|
20
41
|
initial?: any;
|
|
21
42
|
};
|
|
22
43
|
type WithMotionProps<Y> = Partial<Record<'enter' | 'exit', Y>>;
|
|
@@ -25,7 +46,13 @@ type MotionTransitionEndProps = WithMotionProps<Target>;
|
|
|
25
46
|
type MotionDelayProps = WithMotionProps<number>;
|
|
26
47
|
type MotionDurationProps = WithMotionProps<number>;
|
|
27
48
|
type WithTransitionProps<Y extends object> = Omit<Y, 'transition'> & MotionTransitionProperties & {
|
|
49
|
+
/**
|
|
50
|
+
* If `true`, the element will unmount when `isOpen={false}` and animation is done.
|
|
51
|
+
*/
|
|
28
52
|
unmountOnExit?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Show the component. triggers when enter or exit states.
|
|
55
|
+
*/
|
|
29
56
|
isOpen?: boolean;
|
|
30
57
|
};
|
|
31
58
|
declare const MOTION_TRANSITION_EASINGS: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yamada-ui/motion",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Yamada UI motion components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"yamada",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"framer-motion": "^9.1.7",
|
|
39
|
-
"@yamada-ui/
|
|
40
|
-
"@yamada-ui/
|
|
39
|
+
"@yamada-ui/utils": "0.1.1",
|
|
40
|
+
"@yamada-ui/core": "0.3.1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"react": "^18.0.0",
|