@yamada-ui/motion 1.0.9 → 1.0.10-dev-20240131005057
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/{chunk-CC4SJRTT.mjs → chunk-3XJJIQVE.mjs} +1 -1
- package/dist/{chunk-CC4SJRTT.mjs.map → chunk-3XJJIQVE.mjs.map} +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{motion-6FH35pOn.d.mts → motion-9JSjwDHn.d.mts} +1 -1
- package/dist/{motion-6FH35pOn.d.ts → motion-9JSjwDHn.d.ts} +1 -1
- package/dist/motion.d.mts +1 -1
- package/dist/motion.d.ts +1 -1
- package/dist/motion.js.map +1 -1
- package/dist/motion.mjs +1 -1
- package/dist/motion.types.d.mts +1 -1
- package/dist/motion.types.d.ts +1 -1
- package/dist/utils.d.mts +1 -1
- package/dist/utils.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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\"\nimport type { MotionAs } from \"./motion.types\"\n\ntype UIProps = \"children\" | \"color\"\n\ntype MotionOptions = {\n as?: MotionAs\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/
|
|
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\"\nimport type { MotionAs } from \"./motion.types\"\n\ntype UIProps = \"children\" | \"color\"\n\ntype MotionOptions = {\n as?: MotionAs\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/components/other/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;AAyBjB;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.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { AnimatePresence, DragControls, HTMLMotionProps, LayoutGroup, LazyMotion, AnimatePresenceProps as MotionAnimatePresenceProps, AnimationControls as MotionAnimationControls, AnimationLifecycles as MotionAnimationLifecycles, AnimationOptions as MotionAnimationOptions, AnimationPlaybackControls as MotionAnimationPlaybackControls, AnimationProps as MotionAnimationProps, AnimationType as MotionAnimationType, MotionConfig, MotionConfigProps, LayoutProps as MotionLayoutProps, LazyProps as MotionLazyProps, Reorder as MotionReorder, MotionStyle, Transition as MotionTransition, MotionValue, Variants as MotionVariants, SVGMotionProps, m, motion, transform, useCycle, useDragControls, useInView, useIsPresent, useAnimation as useMotionAnimation, useAnimationControls as useMotionAnimationControls, useAnimationFrame as useMotionAnimationFrame, useMotionTemplate, useMotionValue, useMotionValueEvent, useReducedMotion, useScroll, useSpring, useTime, useTransform, useVelocity, useViewportScroll } from 'framer-motion';
|
|
2
|
-
export { a as Motion, c as MotionAs, g as MotionDelayProps, h as MotionDurationProps, b as MotionProps, f as MotionTransitionEndProps, M as MotionTransitionProperties, e as MotionTransitionProps, d as MotionTransitionVariants, i as MotionUIPropGetter, R as RequiredMotionUIPropGetter, W as WithTransitionProps } from './motion-
|
|
2
|
+
export { a as Motion, c as MotionAs, g as MotionDelayProps, h as MotionDurationProps, b as MotionProps, f as MotionTransitionEndProps, M as MotionTransitionProperties, e as MotionTransitionProps, d as MotionTransitionVariants, i as MotionUIPropGetter, R as RequiredMotionUIPropGetter, W as WithTransitionProps } from './motion-9JSjwDHn.mjs';
|
|
3
3
|
export { MOTION_TRANSITION_DEFAULTS, MOTION_TRANSITION_EASINGS, MOTION_TRANSITION_VARIANTS, transitionEnter, transitionExit } from './utils.mjs';
|
|
4
4
|
import '@yamada-ui/core';
|
|
5
5
|
import 'react';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { AnimatePresence, DragControls, HTMLMotionProps, LayoutGroup, LazyMotion, AnimatePresenceProps as MotionAnimatePresenceProps, AnimationControls as MotionAnimationControls, AnimationLifecycles as MotionAnimationLifecycles, AnimationOptions as MotionAnimationOptions, AnimationPlaybackControls as MotionAnimationPlaybackControls, AnimationProps as MotionAnimationProps, AnimationType as MotionAnimationType, MotionConfig, MotionConfigProps, LayoutProps as MotionLayoutProps, LazyProps as MotionLazyProps, Reorder as MotionReorder, MotionStyle, Transition as MotionTransition, MotionValue, Variants as MotionVariants, SVGMotionProps, m, motion, transform, useCycle, useDragControls, useInView, useIsPresent, useAnimation as useMotionAnimation, useAnimationControls as useMotionAnimationControls, useAnimationFrame as useMotionAnimationFrame, useMotionTemplate, useMotionValue, useMotionValueEvent, useReducedMotion, useScroll, useSpring, useTime, useTransform, useVelocity, useViewportScroll } from 'framer-motion';
|
|
2
|
-
export { a as Motion, c as MotionAs, g as MotionDelayProps, h as MotionDurationProps, b as MotionProps, f as MotionTransitionEndProps, M as MotionTransitionProperties, e as MotionTransitionProps, d as MotionTransitionVariants, i as MotionUIPropGetter, R as RequiredMotionUIPropGetter, W as WithTransitionProps } from './motion-
|
|
2
|
+
export { a as Motion, c as MotionAs, g as MotionDelayProps, h as MotionDurationProps, b as MotionProps, f as MotionTransitionEndProps, M as MotionTransitionProperties, e as MotionTransitionProps, d as MotionTransitionVariants, i as MotionUIPropGetter, R as RequiredMotionUIPropGetter, W as WithTransitionProps } from './motion-9JSjwDHn.js';
|
|
3
3
|
export { MOTION_TRANSITION_DEFAULTS, MOTION_TRANSITION_EASINGS, MOTION_TRANSITION_VARIANTS, transitionEnter, transitionExit } from './utils.js';
|
|
4
4
|
import '@yamada-ui/core';
|
|
5
5
|
import 'react';
|
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\"\nimport type { MotionAs } from \"./motion.types\"\n\ntype UIProps = \"children\" | \"color\"\n\ntype MotionOptions = {\n as?: MotionAs\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/
|
|
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\"\nimport type { MotionAs } from \"./motion.types\"\n\ntype UIProps = \"children\" | \"color\"\n\ntype MotionOptions = {\n as?: MotionAs\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/components/other/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;AAyBjB;AAHC,IAAM,aAAS;AAAA,EACpB,CAAC,EAAE,KAAK,OAAO,WAAW,GAAG,KAAK,GAAG,QAAQ;AAC3C,WACE;AAAA,MAAC,eAAG;AAAA,MAAH;AAAA,QACC,IAAI,4B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7 +68,7 @@ type MotionProps<Y extends keyof ReactHTML = "div"> = OmitProps<HTMLUIProps<Y>,
|
|
|
68
68
|
/**
|
|
69
69
|
* `Motion` is a component that allows for the easy implementation of a wide variety of animations.
|
|
70
70
|
*
|
|
71
|
-
* @see Docs https://yamada-ui.com/
|
|
71
|
+
* @see Docs https://yamada-ui.com/components/other/motion
|
|
72
72
|
*/
|
|
73
73
|
declare const Motion: _yamada_ui_core.Component<"div", MotionProps<"div">>;
|
|
74
74
|
|
|
@@ -68,7 +68,7 @@ type MotionProps<Y extends keyof ReactHTML = "div"> = OmitProps<HTMLUIProps<Y>,
|
|
|
68
68
|
/**
|
|
69
69
|
* `Motion` is a component that allows for the easy implementation of a wide variety of animations.
|
|
70
70
|
*
|
|
71
|
-
* @see Docs https://yamada-ui.com/
|
|
71
|
+
* @see Docs https://yamada-ui.com/components/other/motion
|
|
72
72
|
*/
|
|
73
73
|
declare const Motion: _yamada_ui_core.Component<"div", MotionProps<"div">>;
|
|
74
74
|
|
package/dist/motion.d.mts
CHANGED
package/dist/motion.d.ts
CHANGED
package/dist/motion.js.map
CHANGED
|
@@ -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\"\nimport type { MotionAs } from \"./motion.types\"\n\ntype UIProps = \"children\" | \"color\"\n\ntype MotionOptions = {\n as?: MotionAs\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/
|
|
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\"\nimport type { MotionAs } from \"./motion.types\"\n\ntype UIProps = \"children\" | \"color\"\n\ntype MotionOptions = {\n as?: MotionAs\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/components/other/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;AAyBjB;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
package/dist/motion.types.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@yamada-ui/utils';
|
|
2
2
|
export { DragControls, HTMLMotionProps, AnimatePresenceProps as MotionAnimatePresenceProps, AnimationControls as MotionAnimationControls, AnimationLifecycles as MotionAnimationLifecycles, AnimationOptions as MotionAnimationOptions, AnimationPlaybackControls as MotionAnimationPlaybackControls, AnimationProps as MotionAnimationProps, AnimationType as MotionAnimationType, MotionConfigProps, LayoutProps as MotionLayoutProps, LazyProps as MotionLazyProps, MotionStyle, Transition as MotionTransition, MotionValue, Variants as MotionVariants, SVGMotionProps } from 'framer-motion';
|
|
3
3
|
import 'react';
|
|
4
|
-
export { c as MotionAs, g as MotionDelayProps, h as MotionDurationProps, f as MotionTransitionEndProps, M as MotionTransitionProperties, e as MotionTransitionProps, d as MotionTransitionVariants, i as MotionUIPropGetter, R as RequiredMotionUIPropGetter, W as WithTransitionProps } from './motion-
|
|
4
|
+
export { c as MotionAs, g as MotionDelayProps, h as MotionDurationProps, f as MotionTransitionEndProps, M as MotionTransitionProperties, e as MotionTransitionProps, d as MotionTransitionVariants, i as MotionUIPropGetter, R as RequiredMotionUIPropGetter, W as WithTransitionProps } from './motion-9JSjwDHn.mjs';
|
|
5
5
|
import '@yamada-ui/core';
|
package/dist/motion.types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@yamada-ui/utils';
|
|
2
2
|
export { DragControls, HTMLMotionProps, AnimatePresenceProps as MotionAnimatePresenceProps, AnimationControls as MotionAnimationControls, AnimationLifecycles as MotionAnimationLifecycles, AnimationOptions as MotionAnimationOptions, AnimationPlaybackControls as MotionAnimationPlaybackControls, AnimationProps as MotionAnimationProps, AnimationType as MotionAnimationType, MotionConfigProps, LayoutProps as MotionLayoutProps, LazyProps as MotionLazyProps, MotionStyle, Transition as MotionTransition, MotionValue, Variants as MotionVariants, SVGMotionProps } from 'framer-motion';
|
|
3
3
|
import 'react';
|
|
4
|
-
export { c as MotionAs, g as MotionDelayProps, h as MotionDurationProps, f as MotionTransitionEndProps, M as MotionTransitionProperties, e as MotionTransitionProps, d as MotionTransitionVariants, i as MotionUIPropGetter, R as RequiredMotionUIPropGetter, W as WithTransitionProps } from './motion-
|
|
4
|
+
export { c as MotionAs, g as MotionDelayProps, h as MotionDurationProps, f as MotionTransitionEndProps, M as MotionTransitionProperties, e as MotionTransitionProps, d as MotionTransitionVariants, i as MotionUIPropGetter, R as RequiredMotionUIPropGetter, W as WithTransitionProps } from './motion-9JSjwDHn.js';
|
|
5
5
|
import '@yamada-ui/core';
|
package/dist/utils.d.mts
CHANGED
package/dist/utils.d.ts
CHANGED