@yamada-ui/motion 2.2.4-dev-20241005224505 → 2.2.4-dev-20241006000212

Sign up to get free protection for your applications and to get access to all the features.
package/dist/utils.js CHANGED
@@ -32,18 +32,18 @@ var import_utils = require("@yamada-ui/utils");
32
32
  var MOTION_TRANSITION_EASINGS = {
33
33
  ease: [0.25, 0.1, 0.25, 1],
34
34
  easeIn: [0.4, 0, 1, 1],
35
- easeOut: [0, 0, 0.2, 1],
36
- easeInOut: [0.4, 0, 0.2, 1]
35
+ easeInOut: [0.4, 0, 0.2, 1],
36
+ easeOut: [0, 0, 0.2, 1]
37
37
  };
38
38
  var MOTION_TRANSITION_VARIANTS = {
39
- scale: {
40
- enter: { scale: 1 },
41
- exit: { scale: 0.95 }
42
- },
43
39
  fade: {
44
40
  enter: { opacity: 1 },
45
41
  exit: { opacity: 0 }
46
42
  },
43
+ pushDown: {
44
+ enter: { y: "-100%" },
45
+ exit: { y: "30%" }
46
+ },
47
47
  pushLeft: {
48
48
  enter: { x: "100%" },
49
49
  exit: { x: "-30%" }
@@ -56,29 +56,29 @@ var MOTION_TRANSITION_VARIANTS = {
56
56
  enter: { y: "100%" },
57
57
  exit: { y: "-30%" }
58
58
  },
59
- pushDown: {
60
- enter: { y: "-100%" },
61
- exit: { y: "30%" }
59
+ scale: {
60
+ enter: { scale: 1 },
61
+ exit: { scale: 0.95 }
62
+ },
63
+ slideDown: {
64
+ enter: { x: 0, y: 0 },
65
+ exit: { x: 0, y: "100%" },
66
+ position: { bottom: 0, left: 0, maxWidth: "100vw", right: 0 }
62
67
  },
63
68
  slideLeft: {
64
- position: { left: 0, top: 0, bottom: 0, width: "100%" },
65
69
  enter: { x: 0, y: 0 },
66
- exit: { x: "-100%", y: 0 }
70
+ exit: { x: "-100%", y: 0 },
71
+ position: { bottom: 0, left: 0, top: 0, width: "100%" }
67
72
  },
68
73
  slideRight: {
69
- position: { right: 0, top: 0, bottom: 0, width: "100%" },
70
74
  enter: { x: 0, y: 0 },
71
- exit: { x: "100%", y: 0 }
75
+ exit: { x: "100%", y: 0 },
76
+ position: { bottom: 0, right: 0, top: 0, width: "100%" }
72
77
  },
73
78
  slideUp: {
74
- position: { top: 0, left: 0, right: 0, maxWidth: "100vw" },
75
- enter: { x: 0, y: 0 },
76
- exit: { x: 0, y: "-100%" }
77
- },
78
- slideDown: {
79
- position: { bottom: 0, left: 0, right: 0, maxWidth: "100vw" },
80
79
  enter: { x: 0, y: 0 },
81
- exit: { x: 0, y: "100%" }
80
+ exit: { x: 0, y: "-100%" },
81
+ position: { left: 0, maxWidth: "100vw", right: 0, top: 0 }
82
82
  }
83
83
  };
84
84
  var MOTION_TRANSITION_DEFAULTS = {
@@ -95,7 +95,7 @@ function transitionEnter(transition) {
95
95
  return function(delay, duration) {
96
96
  return {
97
97
  ...transition != null ? transition : MOTION_TRANSITION_DEFAULTS.enter,
98
- ...duration ? { duration: (0, import_utils.isNumber)(duration) ? duration : duration == null ? void 0 : duration.enter } : {},
98
+ ...duration ? { duration: (0, import_utils.isNumber)(duration) ? duration : duration.enter } : {},
99
99
  delay: (0, import_utils.isNumber)(delay) ? delay : delay == null ? void 0 : delay.enter
100
100
  };
101
101
  };
@@ -104,7 +104,7 @@ function transitionExit(transition) {
104
104
  return function(delay, duration) {
105
105
  return {
106
106
  ...transition != null ? transition : MOTION_TRANSITION_DEFAULTS.exit,
107
- ...duration ? { duration: (0, import_utils.isNumber)(duration) ? duration : duration == null ? void 0 : duration.exit } : {},
107
+ ...duration ? { duration: (0, import_utils.isNumber)(duration) ? duration : duration.exit } : {},
108
108
  delay: (0, import_utils.isNumber)(delay) ? delay : delay == null ? void 0 : delay.exit
109
109
  };
110
110
  };
package/dist/utils.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utils.ts"],"sourcesContent":["import { isNumber } from \"@yamada-ui/utils\"\nimport type { Transition } from \"framer-motion\"\nimport type { MotionTransitionProps } from \"./motion.types\"\n\nexport const MOTION_TRANSITION_EASINGS = {\n ease: [0.25, 0.1, 0.25, 1],\n easeIn: [0.4, 0, 1, 1],\n easeOut: [0, 0, 0.2, 1],\n easeInOut: [0.4, 0, 0.2, 1],\n} as const\n\nexport const MOTION_TRANSITION_VARIANTS = {\n scale: {\n enter: { scale: 1 },\n exit: { scale: 0.95 },\n },\n fade: {\n enter: { opacity: 1 },\n exit: { opacity: 0 },\n },\n pushLeft: {\n enter: { x: \"100%\" },\n exit: { x: \"-30%\" },\n },\n pushRight: {\n enter: { x: \"-100%\" },\n exit: { x: \"30%\" },\n },\n pushUp: {\n enter: { y: \"100%\" },\n exit: { y: \"-30%\" },\n },\n pushDown: {\n enter: { y: \"-100%\" },\n exit: { y: \"30%\" },\n },\n slideLeft: {\n position: { left: 0, top: 0, bottom: 0, width: \"100%\" },\n enter: { x: 0, y: 0 },\n exit: { x: \"-100%\", y: 0 },\n },\n slideRight: {\n position: { right: 0, top: 0, bottom: 0, width: \"100%\" },\n enter: { x: 0, y: 0 },\n exit: { x: \"100%\", y: 0 },\n },\n slideUp: {\n position: { top: 0, left: 0, right: 0, maxWidth: \"100vw\" },\n enter: { x: 0, y: 0 },\n exit: { x: 0, y: \"-100%\" },\n },\n slideDown: {\n position: { bottom: 0, left: 0, right: 0, maxWidth: \"100vw\" },\n enter: { x: 0, y: 0 },\n exit: { x: 0, y: \"100%\" },\n },\n} as const\n\nexport const MOTION_TRANSITION_DEFAULTS = {\n enter: {\n duration: 0.25,\n ease: MOTION_TRANSITION_EASINGS.easeOut,\n },\n exit: {\n duration: 0.2,\n ease: MOTION_TRANSITION_EASINGS.easeIn,\n },\n} as const\n\nexport function transitionEnter(transition?: Transition) {\n return function (\n delay?: MotionTransitionProps[\"delay\"],\n duration?: MotionTransitionProps[\"duration\"],\n ): Transition {\n return {\n ...(transition ?? MOTION_TRANSITION_DEFAULTS.enter),\n ...(duration\n ? { duration: isNumber(duration) ? duration : duration?.enter }\n : {}),\n delay: isNumber(delay) ? delay : delay?.enter,\n }\n }\n}\n\nexport function transitionExit(transition?: Transition) {\n return function (\n delay?: MotionTransitionProps[\"delay\"],\n duration?: MotionTransitionProps[\"duration\"],\n ): Transition {\n return {\n ...(transition ?? MOTION_TRANSITION_DEFAULTS.exit),\n ...(duration\n ? { duration: isNumber(duration) ? duration : duration?.exit }\n : {}),\n delay: isNumber(delay) ? delay : delay?.exit,\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAyB;AAIlB,IAAM,4BAA4B;AAAA,EACvC,MAAM,CAAC,MAAM,KAAK,MAAM,CAAC;AAAA,EACzB,QAAQ,CAAC,KAAK,GAAG,GAAG,CAAC;AAAA,EACrB,SAAS,CAAC,GAAG,GAAG,KAAK,CAAC;AAAA,EACtB,WAAW,CAAC,KAAK,GAAG,KAAK,CAAC;AAC5B;AAEO,IAAM,6BAA6B;AAAA,EACxC,OAAO;AAAA,IACL,OAAO,EAAE,OAAO,EAAE;AAAA,IAClB,MAAM,EAAE,OAAO,KAAK;AAAA,EACtB;AAAA,EACA,MAAM;AAAA,IACJ,OAAO,EAAE,SAAS,EAAE;AAAA,IACpB,MAAM,EAAE,SAAS,EAAE;AAAA,EACrB;AAAA,EACA,UAAU;AAAA,IACR,OAAO,EAAE,GAAG,OAAO;AAAA,IACnB,MAAM,EAAE,GAAG,OAAO;AAAA,EACpB;AAAA,EACA,WAAW;AAAA,IACT,OAAO,EAAE,GAAG,QAAQ;AAAA,IACpB,MAAM,EAAE,GAAG,MAAM;AAAA,EACnB;AAAA,EACA,QAAQ;AAAA,IACN,OAAO,EAAE,GAAG,OAAO;AAAA,IACnB,MAAM,EAAE,GAAG,OAAO;AAAA,EACpB;AAAA,EACA,UAAU;AAAA,IACR,OAAO,EAAE,GAAG,QAAQ;AAAA,IACpB,MAAM,EAAE,GAAG,MAAM;AAAA,EACnB;AAAA,EACA,WAAW;AAAA,IACT,UAAU,EAAE,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO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,GAAI,kCAAc,2BAA2B;AAAA,MAC7C,GAAI,WACA,EAAE,cAAU,uBAAS,QAAQ,IAAI,WAAW,qCAAU,KAAK,IAC3D,CAAC;AAAA,MACL,WAAO,uBAAS,KAAK,IAAI,QAAQ,+BAAO;AAAA,IAC1C;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../src/utils.ts"],"sourcesContent":["import type { Transition } from \"framer-motion\"\nimport type { MotionTransitionProps } from \"./motion.types\"\nimport { isNumber } from \"@yamada-ui/utils\"\n\nexport const MOTION_TRANSITION_EASINGS = {\n ease: [0.25, 0.1, 0.25, 1],\n easeIn: [0.4, 0, 1, 1],\n easeInOut: [0.4, 0, 0.2, 1],\n easeOut: [0, 0, 0.2, 1],\n} as const\n\nexport const MOTION_TRANSITION_VARIANTS = {\n fade: {\n enter: { opacity: 1 },\n exit: { opacity: 0 },\n },\n pushDown: {\n enter: { y: \"-100%\" },\n exit: { y: \"30%\" },\n },\n pushLeft: {\n enter: { x: \"100%\" },\n exit: { x: \"-30%\" },\n },\n pushRight: {\n enter: { x: \"-100%\" },\n exit: { x: \"30%\" },\n },\n pushUp: {\n enter: { y: \"100%\" },\n exit: { y: \"-30%\" },\n },\n scale: {\n enter: { scale: 1 },\n exit: { scale: 0.95 },\n },\n slideDown: {\n enter: { x: 0, y: 0 },\n exit: { x: 0, y: \"100%\" },\n position: { bottom: 0, left: 0, maxWidth: \"100vw\", right: 0 },\n },\n slideLeft: {\n enter: { x: 0, y: 0 },\n exit: { x: \"-100%\", y: 0 },\n position: { bottom: 0, left: 0, top: 0, width: \"100%\" },\n },\n slideRight: {\n enter: { x: 0, y: 0 },\n exit: { x: \"100%\", y: 0 },\n position: { bottom: 0, right: 0, top: 0, width: \"100%\" },\n },\n slideUp: {\n enter: { x: 0, y: 0 },\n exit: { x: 0, y: \"-100%\" },\n position: { left: 0, maxWidth: \"100vw\", right: 0, top: 0 },\n },\n} as const\n\nexport const MOTION_TRANSITION_DEFAULTS = {\n enter: {\n duration: 0.25,\n ease: MOTION_TRANSITION_EASINGS.easeOut,\n },\n exit: {\n duration: 0.2,\n ease: MOTION_TRANSITION_EASINGS.easeIn,\n },\n} as const\n\nexport function transitionEnter(transition?: Transition) {\n return function (\n delay?: MotionTransitionProps[\"delay\"],\n duration?: MotionTransitionProps[\"duration\"],\n ): Transition {\n return {\n ...(transition ?? MOTION_TRANSITION_DEFAULTS.enter),\n ...(duration\n ? { duration: isNumber(duration) ? duration : duration.enter }\n : {}),\n delay: isNumber(delay) ? delay : delay?.enter,\n }\n }\n}\n\nexport function transitionExit(transition?: Transition) {\n return function (\n delay?: MotionTransitionProps[\"delay\"],\n duration?: MotionTransitionProps[\"duration\"],\n ): Transition {\n return {\n ...(transition ?? MOTION_TRANSITION_DEFAULTS.exit),\n ...(duration\n ? { duration: isNumber(duration) ? duration : duration.exit }\n : {}),\n delay: isNumber(delay) ? delay : delay?.exit,\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,mBAAyB;AAElB,IAAM,4BAA4B;AAAA,EACvC,MAAM,CAAC,MAAM,KAAK,MAAM,CAAC;AAAA,EACzB,QAAQ,CAAC,KAAK,GAAG,GAAG,CAAC;AAAA,EACrB,WAAW,CAAC,KAAK,GAAG,KAAK,CAAC;AAAA,EAC1B,SAAS,CAAC,GAAG,GAAG,KAAK,CAAC;AACxB;AAEO,IAAM,6BAA6B;AAAA,EACxC,MAAM;AAAA,IACJ,OAAO,EAAE,SAAS,EAAE;AAAA,IACpB,MAAM,EAAE,SAAS,EAAE;AAAA,EACrB;AAAA,EACA,UAAU;AAAA,IACR,OAAO,EAAE,GAAG,QAAQ;AAAA,IACpB,MAAM,EAAE,GAAG,MAAM;AAAA,EACnB;AAAA,EACA,UAAU;AAAA,IACR,OAAO,EAAE,GAAG,OAAO;AAAA,IACnB,MAAM,EAAE,GAAG,OAAO;AAAA,EACpB;AAAA,E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AAM,0BAA0B;AAAA,EAClC;AACF;AAEO,SAAS,gBAAgB,YAAyB;AACvD,SAAO,SACL,OACA,UACY;AACZ,WAAO;AAAA,MACL,GAAI,kCAAc,2BAA2B;AAAA,MAC7C,GAAI,WACA,EAAE,cAAU,uBAAS,QAAQ,IAAI,WAAW,SAAS,MAAM,IAC3D,CAAC;AAAA,MACL,WAAO,uBAAS,KAAK,IAAI,QAAQ,+BAAO;AAAA,IAC1C;AAAA,EACF;AACF;AAEO,SAAS,eAAe,YAAyB;AACtD,SAAO,SACL,OACA,UACY;AACZ,WAAO;AAAA,MACL,GAAI,kCAAc,2BAA2B;AAAA,MAC7C,GAAI,WACA,EAAE,cAAU,uBAAS,QAAQ,IAAI,WAAW,SAAS,KAAK,IAC1D,CAAC;AAAA,MACL,WAAO,uBAAS,KAAK,IAAI,QAAQ,+BAAO;AAAA,IAC1C;AAAA,EACF;AACF;","names":[]}
package/dist/utils.mjs CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  MOTION_TRANSITION_VARIANTS,
6
6
  transitionEnter,
7
7
  transitionExit
8
- } from "./chunk-Z6I57MQV.mjs";
8
+ } from "./chunk-AWDPDZLD.mjs";
9
9
  export {
10
10
  MOTION_TRANSITION_DEFAULTS,
11
11
  MOTION_TRANSITION_EASINGS,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yamada-ui/motion",
3
- "version": "2.2.4-dev-20241005224505",
3
+ "version": "2.2.4-dev-20241006000212",
4
4
  "description": "Yamada UI motion components",
5
5
  "keywords": [
6
6
  "yamada",
@@ -37,8 +37,8 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "framer-motion": "11.3.24",
40
- "@yamada-ui/core": "1.15.2-dev-20241005224505",
41
- "@yamada-ui/utils": "1.5.2"
40
+ "@yamada-ui/core": "1.15.2-dev-20241006000212",
41
+ "@yamada-ui/utils": "1.5.3-dev-20241006000212"
42
42
  },
43
43
  "devDependencies": {
44
44
  "clean-package": "2.2.0",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/forward-ref.tsx"],"sourcesContent":["import type { WithoutAs } from \"@yamada-ui/core\"\nimport type { Merge } from \"@yamada-ui/utils\"\nimport * as React from \"react\"\nimport type { MotionComponent, MotionAs } from \"./motion.types\"\n\nexport function motionForwardRef<Y extends object, M extends MotionAs>(\n render: React.ForwardRefRenderFunction<\n any,\n Merge<React.ComponentPropsWithoutRef<M>, WithoutAs<Y>> & { as?: MotionAs }\n >,\n) {\n return React.forwardRef(\n render as React.ForwardRefRenderFunction<any>,\n ) as unknown as MotionComponent<M, Y>\n}\n"],"mappings":";;;AAEA,YAAY,WAAW;AAGhB,SAAS,iBACd,QAIA;AACA,SAAa;AAAA,IACX;AAAA,EACF;AACF;","names":[]}
@@ -1,2 +0,0 @@
1
- "use client"
2
- //# sourceMappingURL=chunk-R3D52RAW.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/utils.ts"],"sourcesContent":["import { isNumber } from \"@yamada-ui/utils\"\nimport type { Transition } from \"framer-motion\"\nimport type { MotionTransitionProps } from \"./motion.types\"\n\nexport const MOTION_TRANSITION_EASINGS = {\n ease: [0.25, 0.1, 0.25, 1],\n easeIn: [0.4, 0, 1, 1],\n easeOut: [0, 0, 0.2, 1],\n easeInOut: [0.4, 0, 0.2, 1],\n} as const\n\nexport const MOTION_TRANSITION_VARIANTS = {\n scale: {\n enter: { scale: 1 },\n exit: { scale: 0.95 },\n },\n fade: {\n enter: { opacity: 1 },\n exit: { opacity: 0 },\n },\n pushLeft: {\n enter: { x: \"100%\" },\n exit: { x: \"-30%\" },\n },\n pushRight: {\n enter: { x: \"-100%\" },\n exit: { x: \"30%\" },\n },\n pushUp: {\n enter: { y: \"100%\" },\n exit: { y: \"-30%\" },\n },\n pushDown: {\n enter: { y: \"-100%\" },\n exit: { y: \"30%\" },\n },\n slideLeft: {\n position: { left: 0, top: 0, bottom: 0, width: \"100%\" },\n enter: { x: 0, y: 0 },\n exit: { x: \"-100%\", y: 0 },\n },\n slideRight: {\n position: { right: 0, top: 0, bottom: 0, width: \"100%\" },\n enter: { x: 0, y: 0 },\n exit: { x: \"100%\", y: 0 },\n },\n slideUp: {\n position: { top: 0, left: 0, right: 0, maxWidth: \"100vw\" },\n enter: { x: 0, y: 0 },\n exit: { x: 0, y: \"-100%\" },\n },\n slideDown: {\n position: { bottom: 0, left: 0, right: 0, maxWidth: \"100vw\" },\n enter: { x: 0, y: 0 },\n exit: { x: 0, y: \"100%\" },\n },\n} as const\n\nexport const MOTION_TRANSITION_DEFAULTS = {\n enter: {\n duration: 0.25,\n ease: MOTION_TRANSITION_EASINGS.easeOut,\n },\n exit: {\n duration: 0.2,\n ease: MOTION_TRANSITION_EASINGS.easeIn,\n },\n} as const\n\nexport function transitionEnter(transition?: Transition) {\n return function (\n delay?: MotionTransitionProps[\"delay\"],\n duration?: MotionTransitionProps[\"duration\"],\n ): Transition {\n return {\n ...(transition ?? MOTION_TRANSITION_DEFAULTS.enter),\n ...(duration\n ? { duration: isNumber(duration) ? duration : duration?.enter }\n : {}),\n delay: isNumber(delay) ? delay : delay?.enter,\n }\n }\n}\n\nexport function transitionExit(transition?: Transition) {\n return function (\n delay?: MotionTransitionProps[\"delay\"],\n duration?: MotionTransitionProps[\"duration\"],\n ): Transition {\n return {\n ...(transition ?? MOTION_TRANSITION_DEFAULTS.exit),\n ...(duration\n ? { duration: isNumber(duration) ? duration : duration?.exit }\n : {}),\n delay: isNumber(delay) ? delay : delay?.exit,\n }\n }\n}\n"],"mappings":";;;AAAA,SAAS,gBAAgB;AAIlB,IAAM,4BAA4B;AAAA,EACvC,MAAM,CAAC,MAAM,KAAK,MAAM,CAAC;AAAA,EACzB,QAAQ,CAAC,KAAK,GAAG,GAAG,CAAC;AAAA,EACrB,SAAS,CAAC,GAAG,GAAG,KAAK,CAAC;AAAA,EACtB,WAAW,CAAC,KAAK,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