@yamada-ui/motion 1.0.2 → 1.0.3-next-20231228211945

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.
@@ -22,4 +22,4 @@ var Motion = forwardRef(
22
22
  export {
23
23
  Motion
24
24
  };
25
- //# sourceMappingURL=chunk-BRU5IQGF.mjs.map
25
+ //# sourceMappingURL=chunk-Q3FXVOF4.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/motion.tsx"],"sourcesContent":["import type { HTMLUIProps, OmitProps } from \"@yamada-ui/core\"\nimport { ui, forwardRef } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport type { HTMLMotionProps } from \"framer-motion\"\nimport { motion } from \"framer-motion\"\nimport type { ReactHTML } from \"react\"\n\ntype UIProps = \"children\" | \"color\"\n\ntype MotionOptions = {\n as?: keyof typeof motion\n}\n\nexport type MotionProps<Y extends keyof ReactHTML = \"div\"> = OmitProps<\n HTMLUIProps<Y>,\n keyof Omit<HTMLMotionProps<Y>, UIProps>\n> &\n Omit<HTMLMotionProps<Y>, UIProps> &\n MotionOptions\n\n/**\n * `Motion` is a component that allows for the easy implementation of a wide variety of animations.\n *\n * @see Docs https://yamada-ui.com/others/#motion\n */\nexport const Motion = forwardRef<MotionProps, \"div\", false>(\n ({ as = \"div\", className, ...rest }, ref) => {\n return (\n <ui.div\n as={motion[as]}\n ref={ref}\n className={cx(\"ui-motion\", className)}\n {...rest}\n />\n )\n },\n)\n"],"mappings":";;;AACA,SAAS,IAAI,kBAAkB;AAC/B,SAAS,UAAU;AAEnB,SAAS,cAAc;AAwBjB;AAHC,IAAM,SAAS;AAAA,EACpB,CAAC,EAAE,KAAK,OAAO,WAAW,GAAG,KAAK,GAAG,QAAQ;AAC3C,WACE;AAAA,MAAC,GAAG;AAAA,MAAH;AAAA,QACC,IAAI,OAAO,EAAE;AAAA,QACb;AAAA,QACA,WAAW,GAAG,aAAa,SAAS;AAAA,QACnC,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;","names":[]}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/motion.tsx","../src/utils.ts"],"sourcesContent":["export {\n m,\n motion,\n AnimatePresence,\n LayoutGroup,\n LazyMotion,\n MotionConfig,\n Reorder as MotionReorder,\n useMotionTemplate,\n useScroll,\n useSpring,\n useTime,\n useTransform,\n transform,\n useVelocity,\n useViewportScroll,\n useAnimation as useMotionAnimation,\n useAnimationControls as useMotionAnimationControls,\n useAnimationFrame as useMotionAnimationFrame,\n useDragControls,\n useInView,\n useIsPresent,\n useReducedMotion,\n useMotionValue,\n useMotionValueEvent,\n useCycle,\n} from \"framer-motion\"\nexport { Motion } from \"./motion\"\nexport type { MotionProps } from \"./motion\"\nexport * from \"./motion.types\"\nexport * from \"./utils\"\n","import type { HTMLUIProps, OmitProps } from \"@yamada-ui/core\"\nimport { ui, forwardRef } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport type { HTMLMotionProps } from \"framer-motion\"\nimport { motion } from \"framer-motion\"\nimport type { ReactHTML } from \"react\"\n\ntype MotionOptions = {\n as?: keyof typeof motion\n}\n\nexport type MotionProps<Y extends keyof ReactHTML = \"div\"> = OmitProps<\n HTMLUIProps<Y>,\n keyof HTMLMotionProps<Y>\n> &\n HTMLMotionProps<Y> &\n MotionOptions\n\n/**\n * `Motion` is a component that allows for the easy implementation of a wide variety of animations.\n *\n * @see Docs https://yamada-ui.com/styled-system/animation#motion\n */\nexport const Motion = forwardRef<MotionProps, \"div\", false>(\n ({ as = \"div\", className, ...rest }, ref) => {\n return (\n <ui.div\n as={motion[as]}\n ref={ref}\n className={cx(\"ui-motion\", className)}\n {...rest}\n />\n )\n },\n)\n","import { isNumber } from \"@yamada-ui/utils\"\nimport type { Transition } from \"framer-motion\"\nimport type { MotionTransitionProperties } 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 const transitionEnter =\n (transition?: Transition) =>\n (\n delay?: MotionTransitionProperties[\"delay\"],\n duration?: MotionTransitionProperties[\"duration\"],\n ): Transition => ({\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\nexport const transitionExit =\n (transition?: Transition) =>\n (\n delay?: MotionTransitionProperties[\"delay\"],\n duration?: MotionTransitionProperties[\"duration\"],\n ): Transition => ({\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"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,wBA0BO;;;ACzBP,kBAA+B;AAC/B,mBAAmB;AAEnB,2BAAuB;AAsBjB;AAHC,IAAM,aAAS;AAAA,EACpB,CAAC,EAAE,KAAK,OAAO,WAAW,GAAG,KAAK,GAAG,QAAQ;AAC3C,WACE;AAAA,MAAC,eAAG;AAAA,MAAH;AAAA,QACC,IAAI,4BAAO,EAAE;AAAA,QACb;AAAA,QACA,eAAW,iBAAG,aAAa,SAAS;AAAA,QACnC,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;;;AClCA,IAAAC,gBAAyB;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,E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ACF;AAEO,IAAM,6BAA6B;AAAA,EACxC,OAAO;AAAA,IACL,UAAU;AAAA,IACV,MAAM,0BAA0B;AAAA,EAClC;AAAA,EACA,MAAM;AAAA,IACJ,UAAU;AAAA,IACV,MAAM,0BAA0B;AAAA,EAClC;AACF;AAEO,IAAM,kBACX,CAAC,eACD,CACE,OACA,cACgB;AAAA,EAChB,GAAI,kCAAc,2BAA2B;AAAA,EAC7C,GAAI,WACA,EAAE,cAAU,wBAAS,QAAQ,IAAI,WAAW,qCAAU,MAAM,IAC5D,CAAC;AAAA,EACL,WAAO,wBAAS,KAAK,IAAI,QAAQ,+BAAO;AAC1C;AAEK,IAAM,iBACX,CAAC,eACD,CACE,OACA,cACgB;AAAA,EAChB,GAAI,kCAAc,2BAA2B;AAAA,EAC7C,GAAI,WACA,EAAE,cAAU,wBAAS,QAAQ,IAAI,WAAW,qCAAU,KAAK,IAC3D,CAAC;AAAA,EACL,WAAO,wBAAS,KAAK,IAAI,QAAQ,+BAAO;AAC1C;","names":["import_framer_motion","import_utils"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/motion.tsx","../src/utils.ts"],"sourcesContent":["export {\n m,\n motion,\n AnimatePresence,\n LayoutGroup,\n LazyMotion,\n MotionConfig,\n Reorder as MotionReorder,\n useMotionTemplate,\n useScroll,\n useSpring,\n useTime,\n useTransform,\n transform,\n useVelocity,\n useViewportScroll,\n useAnimation as useMotionAnimation,\n useAnimationControls as useMotionAnimationControls,\n useAnimationFrame as useMotionAnimationFrame,\n useDragControls,\n useInView,\n useIsPresent,\n useReducedMotion,\n useMotionValue,\n useMotionValueEvent,\n useCycle,\n} from \"framer-motion\"\nexport { Motion } from \"./motion\"\nexport type { MotionProps } from \"./motion\"\nexport * from \"./motion.types\"\nexport * from \"./utils\"\n","import type { HTMLUIProps, OmitProps } from \"@yamada-ui/core\"\nimport { ui, forwardRef } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport type { HTMLMotionProps } from \"framer-motion\"\nimport { motion } from \"framer-motion\"\nimport type { ReactHTML } from \"react\"\n\ntype UIProps = \"children\" | \"color\"\n\ntype MotionOptions = {\n as?: keyof typeof motion\n}\n\nexport type MotionProps<Y extends keyof ReactHTML = \"div\"> = OmitProps<\n HTMLUIProps<Y>,\n keyof Omit<HTMLMotionProps<Y>, UIProps>\n> &\n Omit<HTMLMotionProps<Y>, UIProps> &\n MotionOptions\n\n/**\n * `Motion` is a component that allows for the easy implementation of a wide variety of animations.\n *\n * @see Docs https://yamada-ui.com/others/#motion\n */\nexport const Motion = forwardRef<MotionProps, \"div\", false>(\n ({ as = \"div\", className, ...rest }, ref) => {\n return (\n <ui.div\n as={motion[as]}\n ref={ref}\n className={cx(\"ui-motion\", className)}\n {...rest}\n />\n )\n },\n)\n","import { isNumber } from \"@yamada-ui/utils\"\nimport type { Transition } from \"framer-motion\"\nimport type { MotionTransitionProperties } 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 const transitionEnter =\n (transition?: Transition) =>\n (\n delay?: MotionTransitionProperties[\"delay\"],\n duration?: MotionTransitionProperties[\"duration\"],\n ): Transition => ({\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\nexport const transitionExit =\n (transition?: Transition) =>\n (\n delay?: MotionTransitionProperties[\"delay\"],\n duration?: MotionTransitionProperties[\"duration\"],\n ): Transition => ({\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"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,wBA0BO;;;ACzBP,kBAA+B;AAC/B,mBAAmB;AAEnB,2BAAuB;AAwBjB;AAHC,IAAM,aAAS;AAAA,EACpB,CAAC,EAAE,KAAK,OAAO,WAAW,GAAG,KAAK,GAAG,QAAQ;AAC3C,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":["import_framer_motion","import_utils"]}
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
  import {
3
3
  Motion
4
- } from "./chunk-BRU5IQGF.mjs";
4
+ } from "./chunk-Q3FXVOF4.mjs";
5
5
  import "./chunk-R3D52RAW.mjs";
6
6
  import {
7
7
  MOTION_TRANSITION_DEFAULTS,
package/dist/motion.d.mts CHANGED
@@ -3,14 +3,15 @@ import { OmitProps, HTMLUIProps } from '@yamada-ui/core';
3
3
  import { HTMLMotionProps, motion } from 'framer-motion';
4
4
  import { ReactHTML } from 'react';
5
5
 
6
+ type UIProps = "children" | "color";
6
7
  type MotionOptions = {
7
8
  as?: keyof typeof motion;
8
9
  };
9
- type MotionProps<Y extends keyof ReactHTML = "div"> = OmitProps<HTMLUIProps<Y>, keyof HTMLMotionProps<Y>> & HTMLMotionProps<Y> & MotionOptions;
10
+ type MotionProps<Y extends keyof ReactHTML = "div"> = OmitProps<HTMLUIProps<Y>, keyof Omit<HTMLMotionProps<Y>, UIProps>> & Omit<HTMLMotionProps<Y>, UIProps> & MotionOptions;
10
11
  /**
11
12
  * `Motion` is a component that allows for the easy implementation of a wide variety of animations.
12
13
  *
13
- * @see Docs https://yamada-ui.com/styled-system/animation#motion
14
+ * @see Docs https://yamada-ui.com/others/#motion
14
15
  */
15
16
  declare const Motion: _yamada_ui_core.Component<"div", MotionProps<"div">>;
16
17
 
package/dist/motion.d.ts CHANGED
@@ -3,14 +3,15 @@ import { OmitProps, HTMLUIProps } from '@yamada-ui/core';
3
3
  import { HTMLMotionProps, motion } from 'framer-motion';
4
4
  import { ReactHTML } from 'react';
5
5
 
6
+ type UIProps = "children" | "color";
6
7
  type MotionOptions = {
7
8
  as?: keyof typeof motion;
8
9
  };
9
- type MotionProps<Y extends keyof ReactHTML = "div"> = OmitProps<HTMLUIProps<Y>, keyof HTMLMotionProps<Y>> & HTMLMotionProps<Y> & MotionOptions;
10
+ type MotionProps<Y extends keyof ReactHTML = "div"> = OmitProps<HTMLUIProps<Y>, keyof Omit<HTMLMotionProps<Y>, UIProps>> & Omit<HTMLMotionProps<Y>, UIProps> & MotionOptions;
10
11
  /**
11
12
  * `Motion` is a component that allows for the easy implementation of a wide variety of animations.
12
13
  *
13
- * @see Docs https://yamada-ui.com/styled-system/animation#motion
14
+ * @see Docs https://yamada-ui.com/others/#motion
14
15
  */
15
16
  declare const Motion: _yamada_ui_core.Component<"div", MotionProps<"div">>;
16
17
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/motion.tsx"],"sourcesContent":["import type { HTMLUIProps, OmitProps } from \"@yamada-ui/core\"\nimport { ui, forwardRef } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport type { HTMLMotionProps } from \"framer-motion\"\nimport { motion } from \"framer-motion\"\nimport type { ReactHTML } from \"react\"\n\ntype MotionOptions = {\n as?: keyof typeof motion\n}\n\nexport type MotionProps<Y extends keyof ReactHTML = \"div\"> = OmitProps<\n HTMLUIProps<Y>,\n keyof HTMLMotionProps<Y>\n> &\n HTMLMotionProps<Y> &\n MotionOptions\n\n/**\n * `Motion` is a component that allows for the easy implementation of a wide variety of animations.\n *\n * @see Docs https://yamada-ui.com/styled-system/animation#motion\n */\nexport const Motion = forwardRef<MotionProps, \"div\", false>(\n ({ as = \"div\", className, ...rest }, ref) => {\n return (\n <ui.div\n as={motion[as]}\n ref={ref}\n className={cx(\"ui-motion\", className)}\n {...rest}\n />\n )\n },\n)\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,kBAA+B;AAC/B,mBAAmB;AAEnB,2BAAuB;AAsBjB;AAHC,IAAM,aAAS;AAAA,EACpB,CAAC,EAAE,KAAK,OAAO,WAAW,GAAG,KAAK,GAAG,QAAQ;AAC3C,WACE;AAAA,MAAC,eAAG;AAAA,MAAH;AAAA,QACC,IAAI,4BAAO,EAAE;AAAA,QACb;AAAA,QACA,eAAW,iBAAG,aAAa,SAAS;AAAA,QACnC,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;","names":[]}
1
+ {"version":3,"sources":["../src/motion.tsx"],"sourcesContent":["import type { HTMLUIProps, OmitProps } from \"@yamada-ui/core\"\nimport { ui, forwardRef } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport type { HTMLMotionProps } from \"framer-motion\"\nimport { motion } from \"framer-motion\"\nimport type { ReactHTML } from \"react\"\n\ntype UIProps = \"children\" | \"color\"\n\ntype MotionOptions = {\n as?: keyof typeof motion\n}\n\nexport type MotionProps<Y extends keyof ReactHTML = \"div\"> = OmitProps<\n HTMLUIProps<Y>,\n keyof Omit<HTMLMotionProps<Y>, UIProps>\n> &\n Omit<HTMLMotionProps<Y>, UIProps> &\n MotionOptions\n\n/**\n * `Motion` is a component that allows for the easy implementation of a wide variety of animations.\n *\n * @see Docs https://yamada-ui.com/others/#motion\n */\nexport const Motion = forwardRef<MotionProps, \"div\", false>(\n ({ as = \"div\", className, ...rest }, ref) => {\n return (\n <ui.div\n as={motion[as]}\n ref={ref}\n className={cx(\"ui-motion\", className)}\n {...rest}\n />\n )\n },\n)\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,kBAA+B;AAC/B,mBAAmB;AAEnB,2BAAuB;AAwBjB;AAHC,IAAM,aAAS;AAAA,EACpB,CAAC,EAAE,KAAK,OAAO,WAAW,GAAG,KAAK,GAAG,QAAQ;AAC3C,WACE;AAAA,MAAC,eAAG;AAAA,MAAH;AAAA,QACC,IAAI,4BAAO,EAAE;AAAA,QACb;AAAA,QACA,eAAW,iBAAG,aAAa,SAAS;AAAA,QACnC,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;","names":[]}
package/dist/motion.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
  import {
3
3
  Motion
4
- } from "./chunk-BRU5IQGF.mjs";
4
+ } from "./chunk-Q3FXVOF4.mjs";
5
5
  export {
6
6
  Motion
7
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yamada-ui/motion",
3
- "version": "1.0.2",
3
+ "version": "1.0.3-next-20231228211945",
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": "^9.1.7",
40
- "@yamada-ui/core": "1.1.1",
41
- "@yamada-ui/utils": "1.0.0"
40
+ "@yamada-ui/core": "1.1.2-next-20231228211945",
41
+ "@yamada-ui/utils": "1.0.1-next-20231228211945"
42
42
  },
43
43
  "devDependencies": {
44
44
  "react": "^18.0.0",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/motion.tsx"],"sourcesContent":["import type { HTMLUIProps, OmitProps } from \"@yamada-ui/core\"\nimport { ui, forwardRef } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport type { HTMLMotionProps } from \"framer-motion\"\nimport { motion } from \"framer-motion\"\nimport type { ReactHTML } from \"react\"\n\ntype MotionOptions = {\n as?: keyof typeof motion\n}\n\nexport type MotionProps<Y extends keyof ReactHTML = \"div\"> = OmitProps<\n HTMLUIProps<Y>,\n keyof HTMLMotionProps<Y>\n> &\n HTMLMotionProps<Y> &\n MotionOptions\n\n/**\n * `Motion` is a component that allows for the easy implementation of a wide variety of animations.\n *\n * @see Docs https://yamada-ui.com/styled-system/animation#motion\n */\nexport const Motion = forwardRef<MotionProps, \"div\", false>(\n ({ as = \"div\", className, ...rest }, ref) => {\n return (\n <ui.div\n as={motion[as]}\n ref={ref}\n className={cx(\"ui-motion\", className)}\n {...rest}\n />\n )\n },\n)\n"],"mappings":";;;AACA,SAAS,IAAI,kBAAkB;AAC/B,SAAS,UAAU;AAEnB,SAAS,cAAc;AAsBjB;AAHC,IAAM,SAAS;AAAA,EACpB,CAAC,EAAE,KAAK,OAAO,WAAW,GAAG,KAAK,GAAG,QAAQ;AAC3C,WACE;AAAA,MAAC,GAAG;AAAA,MAAH;AAAA,QACC,IAAI,OAAO,EAAE;AAAA,QACb;AAAA,QACA,WAAW,GAAG,aAAa,SAAS;AAAA,QACnC,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;","names":[]}