@yamada-ui/motion 2.2.10 → 2.2.11-dev-20241209054915
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-AWDPDZLD.mjs → chunk-4WGGFOFE.mjs} +1 -1
- package/dist/chunk-4WGGFOFE.mjs.map +1 -0
- package/dist/{chunk-IZKY3DFG.mjs → chunk-BEURCB7M.mjs} +2 -2
- package/dist/chunk-BEURCB7M.mjs.map +1 -0
- package/dist/{chunk-PKBGX7QR.mjs → chunk-XGL4MMJG.mjs} +2 -2
- package/dist/chunk-XGL4MMJG.mjs.map +1 -0
- package/dist/factory.d.mts +1 -1
- package/dist/factory.d.ts +1 -1
- package/dist/factory.js +3 -3
- package/dist/factory.js.map +1 -1
- package/dist/factory.mjs +1 -1
- package/dist/forward-ref.d.mts +1 -1
- package/dist/forward-ref.d.ts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +119 -121
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -6
- package/dist/index.mjs.map +1 -1
- package/dist/motion.d.mts +1 -1
- package/dist/motion.d.ts +1 -1
- package/dist/motion.js +2 -2
- package/dist/motion.js.map +1 -1
- package/dist/motion.mjs +1 -1
- package/dist/motion.types.d.mts +2 -2
- package/dist/motion.types.d.ts +2 -2
- package/dist/motion.types.js.map +1 -1
- package/dist/utils.d.mts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js.map +1 -1
- package/dist/utils.mjs +1 -1
- package/package.json +4 -4
- package/dist/chunk-AWDPDZLD.mjs.map +0 -1
- package/dist/chunk-IZKY3DFG.mjs.map +0 -1
- package/dist/chunk-PKBGX7QR.mjs.map +0 -1
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/utils.ts"],"sourcesContent":["import type { Transition } from \"motion/react\"\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":";;;AAEA,SAAS,gBAAgB;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,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,OAAO;AAAA,IACL,OAAO,EAAE,OAAO,EAAE;AAAA,IAClB,MAAM,EAAE,OAAO,KAAK;AAAA,EACtB;AAAA,EACA,WAAW;AAAA,IACT,OAAO,EAAE,GAAG,GAAG,GAAG,EAAE;AAAA,IACpB,MAAM,EAAE,GAAG,GAAG,GAA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C7C,GAAI,WACA,EAAE,UAAU,SAAS,QAAQ,IAAI,WAAW,SAAS,KAAK,IAC1D,CAAC;AAAA,MACL,OAAO,SAAS,KAAK,IAAI,QAAQ,+BAAO;AAAA,IAC1C;AAAA,EACF;AACF;","names":[]}
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
// src/factory.ts
|
4
4
|
import { styled } from "@yamada-ui/core";
|
5
|
-
import { motion as _motion } from "
|
5
|
+
import { motion as _motion } from "motion/react";
|
6
6
|
function factory() {
|
7
7
|
const cache = /* @__PURE__ */ new Map();
|
8
8
|
return new Proxy(styled, {
|
@@ -24,4 +24,4 @@ var motion = factory();
|
|
24
24
|
export {
|
25
25
|
motion
|
26
26
|
};
|
27
|
-
//# sourceMappingURL=chunk-
|
27
|
+
//# sourceMappingURL=chunk-BEURCB7M.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/factory.ts"],"sourcesContent":["import type { StyledOptions } from \"@yamada-ui/core\"\nimport type { ForwardRefExoticComponent } from \"react\"\nimport type { MotionAs, MotionComponents, MotionFactory } from \"./motion.types\"\nimport { styled } from \"@yamada-ui/core\"\nimport { motion as _motion } from \"motion/react\"\n\ninterface Factory extends MotionFactory, MotionComponents {}\n\nfunction factory() {\n const cache = new Map<MotionAs, ForwardRefExoticComponent<any>>()\n\n return new Proxy(styled, {\n apply: (_target, _thisArg, [el, options]: [MotionAs, StyledOptions]) => {\n const component = styled(el, options) as ForwardRefExoticComponent<any>\n\n return _motion.create(component)\n },\n\n get: (_target, el: MotionAs) => {\n if (!cache.has(el)) {\n const component = styled(el) as ForwardRefExoticComponent<any>\n\n cache.set(el, _motion.create(component))\n }\n\n return cache.get(el)\n },\n }) as Factory\n}\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 = factory()\n"],"mappings":";;;AAGA,SAAS,cAAc;AACvB,SAAS,UAAU,eAAe;AAIlC,SAAS,UAAU;AACjB,QAAM,QAAQ,oBAAI,IAA8C;AAEhE,SAAO,IAAI,MAAM,QAAQ;AAAA,IACvB,OAAO,CAAC,SAAS,UAAU,CAAC,IAAI,OAAO,MAAiC;AACtE,YAAM,YAAY,OAAO,IAAI,OAAO;AAEpC,aAAO,QAAQ,OAAO,SAAS;AAAA,IACjC;AAAA,IAEA,KAAK,CAAC,SAAS,OAAiB;AAC9B,UAAI,CAAC,MAAM,IAAI,EAAE,GAAG;AAClB,cAAM,YAAY,OAAO,EAAE;AAE3B,cAAM,IAAI,IAAI,QAAQ,OAAO,SAAS,CAAC;AAAA,MACzC;AAEA,aAAO,MAAM,IAAI,EAAE;AAAA,IACrB;AAAA,EACF,CAAC;AACH;AAOO,IAAM,SAAS,QAAQ;","names":[]}
|
@@ -6,7 +6,7 @@ import {
|
|
6
6
|
// src/motion.tsx
|
7
7
|
import { ui } from "@yamada-ui/core";
|
8
8
|
import { cx } from "@yamada-ui/utils";
|
9
|
-
import { motion } from "
|
9
|
+
import { motion } from "motion/react";
|
10
10
|
import { jsx } from "react/jsx-runtime";
|
11
11
|
var disableStyleProps = ["transition"];
|
12
12
|
var disableStyleProp = (prop) => disableStyleProps.includes(prop);
|
@@ -28,4 +28,4 @@ Motion.__ui__ = "Motion";
|
|
28
28
|
export {
|
29
29
|
Motion
|
30
30
|
};
|
31
|
-
//# sourceMappingURL=chunk-
|
31
|
+
//# sourceMappingURL=chunk-XGL4MMJG.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/motion.tsx"],"sourcesContent":["import type { Dict } from \"@yamada-ui/utils\"\nimport type { MotionProps } from \"./motion.types\"\nimport { ui } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { motion } from \"motion/react\"\nimport { motionForwardRef } from \"./forward-ref\"\n\nconst disableStyleProps = [\"transition\"]\n\nconst disableStyleProp = (prop: string) => disableStyleProps.includes(prop)\n\nconst Component = ui<\"div\", Dict>(\"div\", { disableStyleProp })\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 = motionForwardRef<MotionProps, \"div\">(\n ({ as = \"div\", className, ...rest }, ref) => (\n <Component\n ref={ref}\n as={motion.create(as)}\n className={cx(\"ui-motion\", className)}\n {...rest}\n />\n ),\n)\n\nMotion.displayName = \"Motion\"\nMotion.__ui__ = \"Motion\"\n"],"mappings":";;;;;;AAEA,SAAS,UAAU;AACnB,SAAS,UAAU;AACnB,SAAS,cAAc;AAgBnB;AAbJ,IAAM,oBAAoB,CAAC,YAAY;AAEvC,IAAM,mBAAmB,CAAC,SAAiB,kBAAkB,SAAS,IAAI;AAE1E,IAAM,YAAY,GAAgB,OAAO,EAAE,iBAAiB,CAAC;AAOtD,IAAM,SAAS;AAAA,EACpB,CAAC,EAAE,KAAK,OAAO,WAAW,GAAG,KAAK,GAAG,QACnC;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,IAAI,OAAO,OAAO,EAAE;AAAA,MACpB,WAAW,GAAG,aAAa,SAAS;AAAA,MACnC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,OAAO,cAAc;AACrB,OAAO,SAAS;","names":[]}
|
package/dist/factory.d.mts
CHANGED
package/dist/factory.d.ts
CHANGED
package/dist/factory.js
CHANGED
@@ -25,18 +25,18 @@ __export(factory_exports, {
|
|
25
25
|
});
|
26
26
|
module.exports = __toCommonJS(factory_exports);
|
27
27
|
var import_core = require("@yamada-ui/core");
|
28
|
-
var
|
28
|
+
var import_react = require("motion/react");
|
29
29
|
function factory() {
|
30
30
|
const cache = /* @__PURE__ */ new Map();
|
31
31
|
return new Proxy(import_core.styled, {
|
32
32
|
apply: (_target, _thisArg, [el, options]) => {
|
33
33
|
const component = (0, import_core.styled)(el, options);
|
34
|
-
return
|
34
|
+
return import_react.motion.create(component);
|
35
35
|
},
|
36
36
|
get: (_target, el) => {
|
37
37
|
if (!cache.has(el)) {
|
38
38
|
const component = (0, import_core.styled)(el);
|
39
|
-
cache.set(el,
|
39
|
+
cache.set(el, import_react.motion.create(component));
|
40
40
|
}
|
41
41
|
return cache.get(el);
|
42
42
|
}
|
package/dist/factory.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/factory.ts"],"sourcesContent":["import type { StyledOptions } from \"@yamada-ui/core\"\nimport type { ForwardRefExoticComponent } from \"react\"\nimport type { MotionAs, MotionComponents, MotionFactory } from \"./motion.types\"\nimport { styled } from \"@yamada-ui/core\"\nimport { motion as _motion } from \"
|
1
|
+
{"version":3,"sources":["../src/factory.ts"],"sourcesContent":["import type { StyledOptions } from \"@yamada-ui/core\"\nimport type { ForwardRefExoticComponent } from \"react\"\nimport type { MotionAs, MotionComponents, MotionFactory } from \"./motion.types\"\nimport { styled } from \"@yamada-ui/core\"\nimport { motion as _motion } from \"motion/react\"\n\ninterface Factory extends MotionFactory, MotionComponents {}\n\nfunction factory() {\n const cache = new Map<MotionAs, ForwardRefExoticComponent<any>>()\n\n return new Proxy(styled, {\n apply: (_target, _thisArg, [el, options]: [MotionAs, StyledOptions]) => {\n const component = styled(el, options) as ForwardRefExoticComponent<any>\n\n return _motion.create(component)\n },\n\n get: (_target, el: MotionAs) => {\n if (!cache.has(el)) {\n const component = styled(el) as ForwardRefExoticComponent<any>\n\n cache.set(el, _motion.create(component))\n }\n\n return cache.get(el)\n },\n }) as Factory\n}\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 = factory()\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAuB;AACvB,mBAAkC;AAIlC,SAAS,UAAU;AACjB,QAAM,QAAQ,oBAAI,IAA8C;AAEhE,SAAO,IAAI,MAAM,oBAAQ;AAAA,IACvB,OAAO,CAAC,SAAS,UAAU,CAAC,IAAI,OAAO,MAAiC;AACtE,YAAM,gBAAY,oBAAO,IAAI,OAAO;AAEpC,aAAO,aAAAA,OAAQ,OAAO,SAAS;AAAA,IACjC;AAAA,IAEA,KAAK,CAAC,SAAS,OAAiB;AAC9B,UAAI,CAAC,MAAM,IAAI,EAAE,GAAG;AAClB,cAAM,gBAAY,oBAAO,EAAE;AAE3B,cAAM,IAAI,IAAI,aAAAA,OAAQ,OAAO,SAAS,CAAC;AAAA,MACzC;AAEA,aAAO,MAAM,IAAI,EAAE;AAAA,IACrB;AAAA,EACF,CAAC;AACH;AAOO,IAAM,SAAS,QAAQ;","names":["_motion"]}
|
package/dist/factory.mjs
CHANGED
package/dist/forward-ref.d.mts
CHANGED
@@ -2,7 +2,7 @@ import { WithoutAs } from '@yamada-ui/core';
|
|
2
2
|
import { Merge } from '@yamada-ui/utils';
|
3
3
|
import { MotionAs, MotionComponent } from './motion.types.mjs';
|
4
4
|
import * as React from 'react';
|
5
|
-
import '
|
5
|
+
import 'motion/react';
|
6
6
|
|
7
7
|
declare function motionForwardRef<Y extends object, M extends MotionAs>(render: React.ForwardRefRenderFunction<any, {
|
8
8
|
as?: MotionAs;
|
package/dist/forward-ref.d.ts
CHANGED
@@ -2,7 +2,7 @@ import { WithoutAs } from '@yamada-ui/core';
|
|
2
2
|
import { Merge } from '@yamada-ui/utils';
|
3
3
|
import { MotionAs, MotionComponent } from './motion.types.js';
|
4
4
|
import * as React from 'react';
|
5
|
-
import '
|
5
|
+
import 'motion/react';
|
6
6
|
|
7
7
|
declare function motionForwardRef<Y extends object, M extends MotionAs>(render: React.ForwardRefRenderFunction<any, {
|
8
8
|
as?: MotionAs;
|
package/dist/index.d.mts
CHANGED
@@ -3,7 +3,7 @@ export { motionForwardRef } from './forward-ref.mjs';
|
|
3
3
|
export { Motion } from './motion.mjs';
|
4
4
|
export { MotionAs, MotionComponent, MotionComponents, MotionFactory, MotionProps, MotionPropsWithoutAs, MotionPropsWithoutChildren, MotionTransitionProps, MotionTransitionVariants, UIMotionComponent, WithTransitionProps } from './motion.types.mjs';
|
5
5
|
export { MOTION_TRANSITION_DEFAULTS, MOTION_TRANSITION_EASINGS, MOTION_TRANSITION_VARIANTS, transitionEnter, transitionExit } from './utils.mjs';
|
6
|
-
export { AcceleratedAnimation, AnimatePresence, AnimateSharedLayout, CSSStyleDeclarationWithTransform, DOMMotionComponents, DeprecatedLayoutGroupContext, DragControls, FlatTree, HTMLMotionProps, LayoutGroup, LayoutGroupContext, LazyMotion, AbsoluteKeyframe as MotionAbsoluteKeyframe, MotionAdvancedProps, AnimatePresenceProps as MotionAnimatePresenceProps, AnimationControls as MotionAnimationControls, AnimationDefinition as MotionAnimationDefinition, AnimationLifecycles as MotionAnimationLifecycles, AnimationOptionsWithValueOverrides as MotionAnimationOptionsWithValueOverrides, AnimationPlaybackControls as MotionAnimationPlaybackControls, AnimationPlaybackLifecycles as MotionAnimationPlaybackLifecycles, AnimationPlaybackOptions as MotionAnimationPlaybackOptions, AnimationProps as MotionAnimationProps,
|
6
|
+
export { AcceleratedAnimation, AnimatePresence, AnimateSharedLayout, CSSStyleDeclarationWithTransform, DOMMotionComponents, DeprecatedLayoutGroupContext, DragControls, FlatTree, HTMLMotionProps, LayoutGroup, LayoutGroupContext, LazyMotion, AbsoluteKeyframe as MotionAbsoluteKeyframe, MotionAdvancedProps, AnimatePresenceProps as MotionAnimatePresenceProps, AnimationControls as MotionAnimationControls, AnimationDefinition as MotionAnimationDefinition, AnimationLifecycles as MotionAnimationLifecycles, AnimationOptionsWithValueOverrides as MotionAnimationOptionsWithValueOverrides, AnimationPlaybackControls as MotionAnimationPlaybackControls, AnimationPlaybackLifecycles as MotionAnimationPlaybackLifecycles, AnimationPlaybackOptions as MotionAnimationPlaybackOptions, AnimationProps as MotionAnimationProps, AnimationSequence as MotionAnimationSequence, AnimationType as MotionAnimationType, At as MotionAt, Axis as MotionAxis, AxisDelta as MotionAxisDelta, BezierDefinition as MotionBezierDefinition, BoundingBox as MotionBoundingBox, Box as MotionBox, MotionConfig, MotionConfigContext, MotionConfigProps, MotionContext, CreateVisualElement as MotionCreateVisualElement, CustomValueType as MotionCustomValueType, Cycle as MotionCycle, CycleState as MotionCycleState, DOMKeyframesDefinition as MotionDOMKeyframesDefinition, DOMSegment as MotionDOMSegment, DOMSegmentWithTransition as MotionDOMSegmentWithTransition, DecayOptions as MotionDecayOptions, DelayedFunction as MotionDelayedFunction, Delta as MotionDelta, DragElastic as MotionDragElastic, DragHandlers as MotionDragHandlers, DraggableProps as MotionDraggableProps, DurationSpringOptions as MotionDurationSpringOptions, DynamicAnimationOptions as MotionDynamicAnimationOptions, DynamicOption as MotionDynamicOption, Easing as MotionEasing, EasingDefinition as MotionEasingDefinition, EasingFunction as MotionEasingFunction, EasingModifier as MotionEasingModifier, EventInfo as MotionEventInfo, FeatureBundle as MotionFeatureBundle, FeatureDefinition as MotionFeatureDefinition, FeatureDefinitions as MotionFeatureDefinitions, FeaturePackage as MotionFeaturePackage, FeaturePackages as MotionFeaturePackages, FocusHandlers as MotionFocusHandlers, MotionGlobalConfig, HoverHandlers as MotionHoverHandlers, HydratedFeatureDefinition as MotionHydratedFeatureDefinition, HydratedFeatureDefinitions as MotionHydratedFeatureDefinitions, IProjectionNode as MotionIProjectionNode, Inertia as MotionInertia, InertiaOptions as MotionInertiaOptions, InterpolateOptions as MotionInterpolateOptions, KeyframeOptions as MotionKeyframeOptions, Keyframes as MotionKeyframes, KeyframesTarget as MotionKeyframesTarget, LayoutProps as MotionLayoutProps, LazyFeatureBundle as MotionLazyFeatureBundle, LazyProps as MotionLazyProps, MixerFactory as MotionMixerFactory, None as MotionNone, Orchestration as MotionOrchestration, PanHandlers as MotionPanHandlers, PanInfo as MotionPanInfo, PassiveEffect as MotionPassiveEffect, Point as MotionPoint, RenderComponent as MotionRenderComponent, Reorder as MotionReorder, Repeat as MotionRepeat, RepeatType as MotionRepeatType, ResolveKeyframes as MotionResolveKeyframes, ResolvedAnimationDefinition as MotionResolvedAnimationDefinition, ResolvedAnimationDefinitions as MotionResolvedAnimationDefinitions, ResolvedKeyframesTarget as MotionResolvedKeyframesTarget, ResolvedSingleTarget as MotionResolvedSingleTarget, ResolvedValueTarget as MotionResolvedValueTarget, ResolvedValues as MotionResolvedValues, Segment as MotionSegment, SequenceLabel as MotionSequenceLabel, SequenceLabelWithTime as MotionSequenceLabelWithTime, SequenceMap as MotionSequenceMap, SequenceOptions as MotionSequenceOptions, SequenceTime as MotionSequenceTime, SingleTarget as MotionSingleTarget, Spring as MotionSpring, SpringOptions as MotionSpringOptions, MotionStyle, StyleKeyframesDefinition as MotionStyleKeyframesDefinition, StyleTransitions as MotionStyleTransitions, Subscriber as MotionSubscriber, TapHandlers as MotionTapHandlers, TapInfo as MotionTapInfo, Target as MotionTarget, TargetAndTransition as MotionTargetAndTransition, MotionTransform, TransformPoint as MotionTransformPoint, Transition as MotionTransition, Tween as MotionTween, UnresolvedValueKeyframe as MotionUnresolvedValueKeyframe, UseInViewOptions as MotionUseInViewOptions, MotionValue, ValueAnimationOptions as MotionValueAnimationOptions, ValueAnimationTransition as MotionValueAnimationTransition, ValueKeyframe as MotionValueKeyframe, ValueKeyframesDefinition as MotionValueKeyframesDefinition, MotionValueSegment, MotionValueSegmentWithTransition, ValueSequence as MotionValueSequence, ValueTarget as MotionValueTarget, ValueType as MotionValueType, VariableKeyframesDefinition as MotionVariableKeyframesDefinition, VariableTransitions as MotionVariableTransitions, Variant as MotionVariant, VariantLabels as MotionVariantLabels, Variants as MotionVariants, VelocityOptions as MotionVelocityOptions, VisualState as MotionVisualState, PresenceContext, SVGAttributesAsMotionValues, SVGKeyframesDefinition, SVGMotionProps, SVGPathKeyframesDefinition, SVGPathTransitions, SVGTransitions, ScrapeMotionValuesFromProps, ScrollMotionValues, SwitchLayoutGroupContext, VisualElement, addPointerInfo, addScaleCorrector, animate, animateValue, animateVisualElement, animationControls, animations, anticipate, backIn, backInOut, backOut, buildTransform, calcLength, cancelFrame, cancelSync, circIn, circInOut, circOut, clamp, color, complex, createBox, createScopedAnimate, cubicBezier, delay, disableInstantTransitions, distance, distance2D, domAnimation, domMax, easeIn, easeInOut, easeOut, filterProps, frame, frameData, inView, interpolate, invariant, isBrowser, isDragActive, isMotionComponent, isMotionValue, isValidMotionProp, m, makeUseVisualState, mirrorEasing, mix, motionValue, optimizedAppearDataAttribute, pipe, progress, px, resolveMotionValue, reverseEasing, scroll, scrollInfo, spring, stagger, startOptimizedAppearAnimation, steps, sync, transform, unwrapMotionComponent, useAnimate, useAnimationControls, useAnimationFrame, useCycle, useDeprecatedAnimatedState, useDeprecatedInvertedScale, useDomEvent, useDragControls, useElementScroll, useForceUpdate, useInView, useInstantLayoutTransition, useInstantTransition, useIsPresent, useIsomorphicLayoutEffect, useAnimation as useMotionAnimation, useMotionTemplate, useMotionValue, useMotionValueEvent, usePresence, useReducedMotion, useReducedMotionConfig, useResetProjection, useScroll, useSpring, useTime, useTransform, useVelocity, useViewportScroll, useWillChange, visualElementStore, wrap } from 'motion/react';
|
7
7
|
import '@yamada-ui/core';
|
8
8
|
import '@yamada-ui/utils';
|
9
9
|
import 'react';
|
package/dist/index.d.ts
CHANGED
@@ -3,7 +3,7 @@ export { motionForwardRef } from './forward-ref.js';
|
|
3
3
|
export { Motion } from './motion.js';
|
4
4
|
export { MotionAs, MotionComponent, MotionComponents, MotionFactory, MotionProps, MotionPropsWithoutAs, MotionPropsWithoutChildren, MotionTransitionProps, MotionTransitionVariants, UIMotionComponent, WithTransitionProps } from './motion.types.js';
|
5
5
|
export { MOTION_TRANSITION_DEFAULTS, MOTION_TRANSITION_EASINGS, MOTION_TRANSITION_VARIANTS, transitionEnter, transitionExit } from './utils.js';
|
6
|
-
export { AcceleratedAnimation, AnimatePresence, AnimateSharedLayout, CSSStyleDeclarationWithTransform, DOMMotionComponents, DeprecatedLayoutGroupContext, DragControls, FlatTree, HTMLMotionProps, LayoutGroup, LayoutGroupContext, LazyMotion, AbsoluteKeyframe as MotionAbsoluteKeyframe, MotionAdvancedProps, AnimatePresenceProps as MotionAnimatePresenceProps, AnimationControls as MotionAnimationControls, AnimationDefinition as MotionAnimationDefinition, AnimationLifecycles as MotionAnimationLifecycles, AnimationOptionsWithValueOverrides as MotionAnimationOptionsWithValueOverrides, AnimationPlaybackControls as MotionAnimationPlaybackControls, AnimationPlaybackLifecycles as MotionAnimationPlaybackLifecycles, AnimationPlaybackOptions as MotionAnimationPlaybackOptions, AnimationProps as MotionAnimationProps,
|
6
|
+
export { AcceleratedAnimation, AnimatePresence, AnimateSharedLayout, CSSStyleDeclarationWithTransform, DOMMotionComponents, DeprecatedLayoutGroupContext, DragControls, FlatTree, HTMLMotionProps, LayoutGroup, LayoutGroupContext, LazyMotion, AbsoluteKeyframe as MotionAbsoluteKeyframe, MotionAdvancedProps, AnimatePresenceProps as MotionAnimatePresenceProps, AnimationControls as MotionAnimationControls, AnimationDefinition as MotionAnimationDefinition, AnimationLifecycles as MotionAnimationLifecycles, AnimationOptionsWithValueOverrides as MotionAnimationOptionsWithValueOverrides, AnimationPlaybackControls as MotionAnimationPlaybackControls, AnimationPlaybackLifecycles as MotionAnimationPlaybackLifecycles, AnimationPlaybackOptions as MotionAnimationPlaybackOptions, AnimationProps as MotionAnimationProps, AnimationSequence as MotionAnimationSequence, AnimationType as MotionAnimationType, At as MotionAt, Axis as MotionAxis, AxisDelta as MotionAxisDelta, BezierDefinition as MotionBezierDefinition, BoundingBox as MotionBoundingBox, Box as MotionBox, MotionConfig, MotionConfigContext, MotionConfigProps, MotionContext, CreateVisualElement as MotionCreateVisualElement, CustomValueType as MotionCustomValueType, Cycle as MotionCycle, CycleState as MotionCycleState, DOMKeyframesDefinition as MotionDOMKeyframesDefinition, DOMSegment as MotionDOMSegment, DOMSegmentWithTransition as MotionDOMSegmentWithTransition, DecayOptions as MotionDecayOptions, DelayedFunction as MotionDelayedFunction, Delta as MotionDelta, DragElastic as MotionDragElastic, DragHandlers as MotionDragHandlers, DraggableProps as MotionDraggableProps, DurationSpringOptions as MotionDurationSpringOptions, DynamicAnimationOptions as MotionDynamicAnimationOptions, DynamicOption as MotionDynamicOption, Easing as MotionEasing, EasingDefinition as MotionEasingDefinition, EasingFunction as MotionEasingFunction, EasingModifier as MotionEasingModifier, EventInfo as MotionEventInfo, FeatureBundle as MotionFeatureBundle, FeatureDefinition as MotionFeatureDefinition, FeatureDefinitions as MotionFeatureDefinitions, FeaturePackage as MotionFeaturePackage, FeaturePackages as MotionFeaturePackages, FocusHandlers as MotionFocusHandlers, MotionGlobalConfig, HoverHandlers as MotionHoverHandlers, HydratedFeatureDefinition as MotionHydratedFeatureDefinition, HydratedFeatureDefinitions as MotionHydratedFeatureDefinitions, IProjectionNode as MotionIProjectionNode, Inertia as MotionInertia, InertiaOptions as MotionInertiaOptions, InterpolateOptions as MotionInterpolateOptions, KeyframeOptions as MotionKeyframeOptions, Keyframes as MotionKeyframes, KeyframesTarget as MotionKeyframesTarget, LayoutProps as MotionLayoutProps, LazyFeatureBundle as MotionLazyFeatureBundle, LazyProps as MotionLazyProps, MixerFactory as MotionMixerFactory, None as MotionNone, Orchestration as MotionOrchestration, PanHandlers as MotionPanHandlers, PanInfo as MotionPanInfo, PassiveEffect as MotionPassiveEffect, Point as MotionPoint, RenderComponent as MotionRenderComponent, Reorder as MotionReorder, Repeat as MotionRepeat, RepeatType as MotionRepeatType, ResolveKeyframes as MotionResolveKeyframes, ResolvedAnimationDefinition as MotionResolvedAnimationDefinition, ResolvedAnimationDefinitions as MotionResolvedAnimationDefinitions, ResolvedKeyframesTarget as MotionResolvedKeyframesTarget, ResolvedSingleTarget as MotionResolvedSingleTarget, ResolvedValueTarget as MotionResolvedValueTarget, ResolvedValues as MotionResolvedValues, Segment as MotionSegment, SequenceLabel as MotionSequenceLabel, SequenceLabelWithTime as MotionSequenceLabelWithTime, SequenceMap as MotionSequenceMap, SequenceOptions as MotionSequenceOptions, SequenceTime as MotionSequenceTime, SingleTarget as MotionSingleTarget, Spring as MotionSpring, SpringOptions as MotionSpringOptions, MotionStyle, StyleKeyframesDefinition as MotionStyleKeyframesDefinition, StyleTransitions as MotionStyleTransitions, Subscriber as MotionSubscriber, TapHandlers as MotionTapHandlers, TapInfo as MotionTapInfo, Target as MotionTarget, TargetAndTransition as MotionTargetAndTransition, MotionTransform, TransformPoint as MotionTransformPoint, Transition as MotionTransition, Tween as MotionTween, UnresolvedValueKeyframe as MotionUnresolvedValueKeyframe, UseInViewOptions as MotionUseInViewOptions, MotionValue, ValueAnimationOptions as MotionValueAnimationOptions, ValueAnimationTransition as MotionValueAnimationTransition, ValueKeyframe as MotionValueKeyframe, ValueKeyframesDefinition as MotionValueKeyframesDefinition, MotionValueSegment, MotionValueSegmentWithTransition, ValueSequence as MotionValueSequence, ValueTarget as MotionValueTarget, ValueType as MotionValueType, VariableKeyframesDefinition as MotionVariableKeyframesDefinition, VariableTransitions as MotionVariableTransitions, Variant as MotionVariant, VariantLabels as MotionVariantLabels, Variants as MotionVariants, VelocityOptions as MotionVelocityOptions, VisualState as MotionVisualState, PresenceContext, SVGAttributesAsMotionValues, SVGKeyframesDefinition, SVGMotionProps, SVGPathKeyframesDefinition, SVGPathTransitions, SVGTransitions, ScrapeMotionValuesFromProps, ScrollMotionValues, SwitchLayoutGroupContext, VisualElement, addPointerInfo, addScaleCorrector, animate, animateValue, animateVisualElement, animationControls, animations, anticipate, backIn, backInOut, backOut, buildTransform, calcLength, cancelFrame, cancelSync, circIn, circInOut, circOut, clamp, color, complex, createBox, createScopedAnimate, cubicBezier, delay, disableInstantTransitions, distance, distance2D, domAnimation, domMax, easeIn, easeInOut, easeOut, filterProps, frame, frameData, inView, interpolate, invariant, isBrowser, isDragActive, isMotionComponent, isMotionValue, isValidMotionProp, m, makeUseVisualState, mirrorEasing, mix, motionValue, optimizedAppearDataAttribute, pipe, progress, px, resolveMotionValue, reverseEasing, scroll, scrollInfo, spring, stagger, startOptimizedAppearAnimation, steps, sync, transform, unwrapMotionComponent, useAnimate, useAnimationControls, useAnimationFrame, useCycle, useDeprecatedAnimatedState, useDeprecatedInvertedScale, useDomEvent, useDragControls, useElementScroll, useForceUpdate, useInView, useInstantLayoutTransition, useInstantTransition, useIsPresent, useIsomorphicLayoutEffect, useAnimation as useMotionAnimation, useMotionTemplate, useMotionValue, useMotionValueEvent, usePresence, useReducedMotion, useReducedMotionConfig, useResetProjection, useScroll, useSpring, useTime, useTransform, useVelocity, useViewportScroll, useWillChange, visualElementStore, wrap } from 'motion/react';
|
7
7
|
import '@yamada-ui/core';
|
8
8
|
import '@yamada-ui/utils';
|
9
9
|
import 'react';
|
package/dist/index.js
CHANGED
@@ -31,145 +31,144 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
31
31
|
// src/index.ts
|
32
32
|
var src_exports = {};
|
33
33
|
__export(src_exports, {
|
34
|
-
AcceleratedAnimation: () =>
|
35
|
-
AnimatePresence: () =>
|
36
|
-
AnimateSharedLayout: () =>
|
37
|
-
DeprecatedLayoutGroupContext: () =>
|
38
|
-
DragControls: () =>
|
39
|
-
FlatTree: () =>
|
40
|
-
LayoutGroup: () =>
|
41
|
-
LayoutGroupContext: () =>
|
42
|
-
LazyMotion: () =>
|
34
|
+
AcceleratedAnimation: () => import_react3.AcceleratedAnimation,
|
35
|
+
AnimatePresence: () => import_react3.AnimatePresence,
|
36
|
+
AnimateSharedLayout: () => import_react3.AnimateSharedLayout,
|
37
|
+
DeprecatedLayoutGroupContext: () => import_react3.DeprecatedLayoutGroupContext,
|
38
|
+
DragControls: () => import_react3.DragControls,
|
39
|
+
FlatTree: () => import_react3.FlatTree,
|
40
|
+
LayoutGroup: () => import_react3.LayoutGroup,
|
41
|
+
LayoutGroupContext: () => import_react3.LayoutGroupContext,
|
42
|
+
LazyMotion: () => import_react3.LazyMotion,
|
43
43
|
MOTION_TRANSITION_DEFAULTS: () => MOTION_TRANSITION_DEFAULTS,
|
44
44
|
MOTION_TRANSITION_EASINGS: () => MOTION_TRANSITION_EASINGS,
|
45
45
|
MOTION_TRANSITION_VARIANTS: () => MOTION_TRANSITION_VARIANTS,
|
46
46
|
Motion: () => Motion,
|
47
|
-
MotionConfig: () =>
|
48
|
-
MotionConfigContext: () =>
|
49
|
-
MotionContext: () =>
|
50
|
-
MotionGlobalConfig: () =>
|
51
|
-
MotionReorder: () =>
|
52
|
-
PresenceContext: () =>
|
53
|
-
SwitchLayoutGroupContext: () =>
|
54
|
-
VisualElement: () =>
|
55
|
-
addPointerInfo: () =>
|
56
|
-
addScaleCorrector: () =>
|
57
|
-
animate: () =>
|
58
|
-
animateValue: () =>
|
59
|
-
animateVisualElement: () =>
|
60
|
-
animationControls: () =>
|
61
|
-
animations: () =>
|
62
|
-
anticipate: () =>
|
63
|
-
backIn: () =>
|
64
|
-
backInOut: () =>
|
65
|
-
backOut: () =>
|
66
|
-
buildTransform: () =>
|
67
|
-
calcLength: () =>
|
68
|
-
cancelFrame: () =>
|
69
|
-
cancelSync: () =>
|
70
|
-
circIn: () =>
|
71
|
-
circInOut: () =>
|
72
|
-
circOut: () =>
|
73
|
-
clamp: () =>
|
74
|
-
color: () =>
|
75
|
-
complex: () =>
|
76
|
-
createBox: () =>
|
77
|
-
createScopedAnimate: () =>
|
78
|
-
cubicBezier: () =>
|
79
|
-
delay: () =>
|
80
|
-
disableInstantTransitions: () =>
|
81
|
-
distance: () =>
|
82
|
-
distance2D: () =>
|
83
|
-
domAnimation: () =>
|
84
|
-
domMax: () =>
|
85
|
-
easeIn: () =>
|
86
|
-
easeInOut: () =>
|
87
|
-
easeOut: () =>
|
88
|
-
filterProps: () =>
|
89
|
-
frame: () =>
|
90
|
-
frameData: () =>
|
91
|
-
inView: () =>
|
92
|
-
interpolate: () =>
|
93
|
-
invariant: () =>
|
94
|
-
isBrowser: () =>
|
95
|
-
isDragActive: () =>
|
96
|
-
isMotionComponent: () =>
|
97
|
-
isMotionValue: () =>
|
98
|
-
isValidMotionProp: () =>
|
99
|
-
m: () =>
|
100
|
-
makeUseVisualState: () =>
|
101
|
-
mirrorEasing: () =>
|
102
|
-
mix: () =>
|
47
|
+
MotionConfig: () => import_react3.MotionConfig,
|
48
|
+
MotionConfigContext: () => import_react3.MotionConfigContext,
|
49
|
+
MotionContext: () => import_react3.MotionContext,
|
50
|
+
MotionGlobalConfig: () => import_react3.MotionGlobalConfig,
|
51
|
+
MotionReorder: () => import_react3.Reorder,
|
52
|
+
PresenceContext: () => import_react3.PresenceContext,
|
53
|
+
SwitchLayoutGroupContext: () => import_react3.SwitchLayoutGroupContext,
|
54
|
+
VisualElement: () => import_react3.VisualElement,
|
55
|
+
addPointerInfo: () => import_react3.addPointerInfo,
|
56
|
+
addScaleCorrector: () => import_react3.addScaleCorrector,
|
57
|
+
animate: () => import_react3.animate,
|
58
|
+
animateValue: () => import_react3.animateValue,
|
59
|
+
animateVisualElement: () => import_react3.animateVisualElement,
|
60
|
+
animationControls: () => import_react3.animationControls,
|
61
|
+
animations: () => import_react3.animations,
|
62
|
+
anticipate: () => import_react3.anticipate,
|
63
|
+
backIn: () => import_react3.backIn,
|
64
|
+
backInOut: () => import_react3.backInOut,
|
65
|
+
backOut: () => import_react3.backOut,
|
66
|
+
buildTransform: () => import_react3.buildTransform,
|
67
|
+
calcLength: () => import_react3.calcLength,
|
68
|
+
cancelFrame: () => import_react3.cancelFrame,
|
69
|
+
cancelSync: () => import_react3.cancelSync,
|
70
|
+
circIn: () => import_react3.circIn,
|
71
|
+
circInOut: () => import_react3.circInOut,
|
72
|
+
circOut: () => import_react3.circOut,
|
73
|
+
clamp: () => import_react3.clamp,
|
74
|
+
color: () => import_react3.color,
|
75
|
+
complex: () => import_react3.complex,
|
76
|
+
createBox: () => import_react3.createBox,
|
77
|
+
createScopedAnimate: () => import_react3.createScopedAnimate,
|
78
|
+
cubicBezier: () => import_react3.cubicBezier,
|
79
|
+
delay: () => import_react3.delay,
|
80
|
+
disableInstantTransitions: () => import_react3.disableInstantTransitions,
|
81
|
+
distance: () => import_react3.distance,
|
82
|
+
distance2D: () => import_react3.distance2D,
|
83
|
+
domAnimation: () => import_react3.domAnimation,
|
84
|
+
domMax: () => import_react3.domMax,
|
85
|
+
easeIn: () => import_react3.easeIn,
|
86
|
+
easeInOut: () => import_react3.easeInOut,
|
87
|
+
easeOut: () => import_react3.easeOut,
|
88
|
+
filterProps: () => import_react3.filterProps,
|
89
|
+
frame: () => import_react3.frame,
|
90
|
+
frameData: () => import_react3.frameData,
|
91
|
+
inView: () => import_react3.inView,
|
92
|
+
interpolate: () => import_react3.interpolate,
|
93
|
+
invariant: () => import_react3.invariant,
|
94
|
+
isBrowser: () => import_react3.isBrowser,
|
95
|
+
isDragActive: () => import_react3.isDragActive,
|
96
|
+
isMotionComponent: () => import_react3.isMotionComponent,
|
97
|
+
isMotionValue: () => import_react3.isMotionValue,
|
98
|
+
isValidMotionProp: () => import_react3.isValidMotionProp,
|
99
|
+
m: () => import_react3.m,
|
100
|
+
makeUseVisualState: () => import_react3.makeUseVisualState,
|
101
|
+
mirrorEasing: () => import_react3.mirrorEasing,
|
102
|
+
mix: () => import_react3.mix,
|
103
103
|
motion: () => motion,
|
104
104
|
motionForwardRef: () => motionForwardRef,
|
105
|
-
motionValue: () =>
|
106
|
-
optimizedAppearDataAttribute: () =>
|
107
|
-
pipe: () =>
|
108
|
-
progress: () =>
|
109
|
-
px: () =>
|
110
|
-
resolveMotionValue: () =>
|
111
|
-
reverseEasing: () =>
|
112
|
-
scroll: () =>
|
113
|
-
scrollInfo: () =>
|
114
|
-
spring: () =>
|
115
|
-
stagger: () =>
|
116
|
-
startOptimizedAppearAnimation: () =>
|
117
|
-
steps: () =>
|
118
|
-
sync: () =>
|
119
|
-
transform: () =>
|
105
|
+
motionValue: () => import_react3.motionValue,
|
106
|
+
optimizedAppearDataAttribute: () => import_react3.optimizedAppearDataAttribute,
|
107
|
+
pipe: () => import_react3.pipe,
|
108
|
+
progress: () => import_react3.progress,
|
109
|
+
px: () => import_react3.px,
|
110
|
+
resolveMotionValue: () => import_react3.resolveMotionValue,
|
111
|
+
reverseEasing: () => import_react3.reverseEasing,
|
112
|
+
scroll: () => import_react3.scroll,
|
113
|
+
scrollInfo: () => import_react3.scrollInfo,
|
114
|
+
spring: () => import_react3.spring,
|
115
|
+
stagger: () => import_react3.stagger,
|
116
|
+
startOptimizedAppearAnimation: () => import_react3.startOptimizedAppearAnimation,
|
117
|
+
steps: () => import_react3.steps,
|
118
|
+
sync: () => import_react3.sync,
|
119
|
+
transform: () => import_react3.transform,
|
120
120
|
transitionEnter: () => transitionEnter,
|
121
121
|
transitionExit: () => transitionExit,
|
122
|
-
unwrapMotionComponent: () =>
|
123
|
-
useAnimate: () =>
|
124
|
-
useAnimationControls: () =>
|
125
|
-
useAnimationFrame: () =>
|
126
|
-
useCycle: () =>
|
127
|
-
useDeprecatedAnimatedState: () =>
|
128
|
-
useDeprecatedInvertedScale: () =>
|
129
|
-
useDomEvent: () =>
|
130
|
-
useDragControls: () =>
|
131
|
-
useElementScroll: () =>
|
132
|
-
useForceUpdate: () =>
|
133
|
-
useInView: () =>
|
134
|
-
useInstantLayoutTransition: () =>
|
135
|
-
useInstantTransition: () =>
|
136
|
-
useIsPresent: () =>
|
137
|
-
useIsomorphicLayoutEffect: () =>
|
138
|
-
useMotionAnimation: () =>
|
139
|
-
useMotionTemplate: () =>
|
140
|
-
useMotionValue: () =>
|
141
|
-
useMotionValueEvent: () =>
|
142
|
-
usePresence: () =>
|
143
|
-
useReducedMotion: () =>
|
144
|
-
useReducedMotionConfig: () =>
|
145
|
-
useResetProjection: () =>
|
146
|
-
useScroll: () =>
|
147
|
-
useSpring: () =>
|
148
|
-
useTime: () =>
|
149
|
-
useTransform: () =>
|
150
|
-
useVelocity: () =>
|
151
|
-
useViewportScroll: () =>
|
152
|
-
useWillChange: () =>
|
153
|
-
visualElementStore: () =>
|
154
|
-
|
155
|
-
wrap: () => import_framer_motion3.wrap
|
122
|
+
unwrapMotionComponent: () => import_react3.unwrapMotionComponent,
|
123
|
+
useAnimate: () => import_react3.useAnimate,
|
124
|
+
useAnimationControls: () => import_react3.useAnimationControls,
|
125
|
+
useAnimationFrame: () => import_react3.useAnimationFrame,
|
126
|
+
useCycle: () => import_react3.useCycle,
|
127
|
+
useDeprecatedAnimatedState: () => import_react3.useDeprecatedAnimatedState,
|
128
|
+
useDeprecatedInvertedScale: () => import_react3.useDeprecatedInvertedScale,
|
129
|
+
useDomEvent: () => import_react3.useDomEvent,
|
130
|
+
useDragControls: () => import_react3.useDragControls,
|
131
|
+
useElementScroll: () => import_react3.useElementScroll,
|
132
|
+
useForceUpdate: () => import_react3.useForceUpdate,
|
133
|
+
useInView: () => import_react3.useInView,
|
134
|
+
useInstantLayoutTransition: () => import_react3.useInstantLayoutTransition,
|
135
|
+
useInstantTransition: () => import_react3.useInstantTransition,
|
136
|
+
useIsPresent: () => import_react3.useIsPresent,
|
137
|
+
useIsomorphicLayoutEffect: () => import_react3.useIsomorphicLayoutEffect,
|
138
|
+
useMotionAnimation: () => import_react3.useAnimation,
|
139
|
+
useMotionTemplate: () => import_react3.useMotionTemplate,
|
140
|
+
useMotionValue: () => import_react3.useMotionValue,
|
141
|
+
useMotionValueEvent: () => import_react3.useMotionValueEvent,
|
142
|
+
usePresence: () => import_react3.usePresence,
|
143
|
+
useReducedMotion: () => import_react3.useReducedMotion,
|
144
|
+
useReducedMotionConfig: () => import_react3.useReducedMotionConfig,
|
145
|
+
useResetProjection: () => import_react3.useResetProjection,
|
146
|
+
useScroll: () => import_react3.useScroll,
|
147
|
+
useSpring: () => import_react3.useSpring,
|
148
|
+
useTime: () => import_react3.useTime,
|
149
|
+
useTransform: () => import_react3.useTransform,
|
150
|
+
useVelocity: () => import_react3.useVelocity,
|
151
|
+
useViewportScroll: () => import_react3.useViewportScroll,
|
152
|
+
useWillChange: () => import_react3.useWillChange,
|
153
|
+
visualElementStore: () => import_react3.visualElementStore,
|
154
|
+
wrap: () => import_react3.wrap
|
156
155
|
});
|
157
156
|
module.exports = __toCommonJS(src_exports);
|
158
157
|
|
159
158
|
// src/factory.ts
|
160
159
|
var import_core = require("@yamada-ui/core");
|
161
|
-
var
|
160
|
+
var import_react = require("motion/react");
|
162
161
|
function factory() {
|
163
162
|
const cache = /* @__PURE__ */ new Map();
|
164
163
|
return new Proxy(import_core.styled, {
|
165
164
|
apply: (_target, _thisArg, [el, options]) => {
|
166
165
|
const component = (0, import_core.styled)(el, options);
|
167
|
-
return
|
166
|
+
return import_react.motion.create(component);
|
168
167
|
},
|
169
168
|
get: (_target, el) => {
|
170
169
|
if (!cache.has(el)) {
|
171
170
|
const component = (0, import_core.styled)(el);
|
172
|
-
cache.set(el,
|
171
|
+
cache.set(el, import_react.motion.create(component));
|
173
172
|
}
|
174
173
|
return cache.get(el);
|
175
174
|
}
|
@@ -188,7 +187,7 @@ function motionForwardRef(render) {
|
|
188
187
|
// src/motion.tsx
|
189
188
|
var import_core2 = require("@yamada-ui/core");
|
190
189
|
var import_utils = require("@yamada-ui/utils");
|
191
|
-
var
|
190
|
+
var import_react2 = require("motion/react");
|
192
191
|
var import_jsx_runtime = require("react/jsx-runtime");
|
193
192
|
var disableStyleProps = ["transition"];
|
194
193
|
var disableStyleProp = (prop) => disableStyleProps.includes(prop);
|
@@ -198,7 +197,7 @@ var Motion = motionForwardRef(
|
|
198
197
|
Component,
|
199
198
|
{
|
200
199
|
ref,
|
201
|
-
as:
|
200
|
+
as: import_react2.motion.create(as),
|
202
201
|
className: (0, import_utils.cx)("ui-motion", className),
|
203
202
|
...rest
|
204
203
|
}
|
@@ -291,7 +290,7 @@ function transitionExit(transition) {
|
|
291
290
|
}
|
292
291
|
|
293
292
|
// src/index.ts
|
294
|
-
var
|
293
|
+
var import_react3 = require("motion/react");
|
295
294
|
// Annotate the CommonJS export names for ESM import in node:
|
296
295
|
0 && (module.exports = {
|
297
296
|
AcceleratedAnimation,
|
@@ -414,7 +413,6 @@ var import_framer_motion3 = require("framer-motion");
|
|
414
413
|
useViewportScroll,
|
415
414
|
useWillChange,
|
416
415
|
visualElementStore,
|
417
|
-
warning,
|
418
416
|
wrap
|
419
417
|
});
|
420
418
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/factory.ts","../src/forward-ref.tsx","../src/motion.tsx","../src/utils.ts"],"sourcesContent":["export * from \"./factory\"\nexport * from \"./forward-ref\"\nexport { Motion } from \"./motion\"\nexport type * from \"./motion.types\"\nexport * from \"./utils\"\nexport {\n AcceleratedAnimation,\n addPointerInfo,\n addScaleCorrector,\n animate,\n AnimatePresence,\n AnimateSharedLayout,\n animateValue,\n animateVisualElement,\n animationControls,\n animations,\n anticipate,\n backIn,\n backInOut,\n backOut,\n buildTransform,\n calcLength,\n cancelFrame,\n cancelSync,\n circIn,\n circInOut,\n circOut,\n clamp,\n color,\n complex,\n createBox,\n createScopedAnimate,\n cubicBezier,\n delay,\n DeprecatedLayoutGroupContext,\n disableInstantTransitions,\n distance,\n distance2D,\n domAnimation,\n domMax,\n DragControls,\n easeIn,\n easeInOut,\n easeOut,\n filterProps,\n FlatTree,\n frame,\n frameData,\n interpolate,\n invariant,\n inView,\n isBrowser,\n isDragActive,\n isMotionComponent,\n isMotionValue,\n isValidMotionProp,\n LayoutGroup,\n LayoutGroupContext,\n LazyMotion,\n m,\n makeUseVisualState,\n mirrorEasing,\n mix,\n MotionConfig,\n MotionConfigContext,\n MotionContext,\n MotionGlobalConfig,\n motionValue,\n optimizedAppearDataAttribute,\n pipe,\n PresenceContext,\n progress,\n px,\n Reorder as MotionReorder,\n resolveMotionValue,\n reverseEasing,\n scroll,\n scrollInfo,\n spring,\n stagger,\n startOptimizedAppearAnimation,\n steps,\n SwitchLayoutGroupContext,\n sync,\n transform,\n unwrapMotionComponent,\n useAnimate,\n useAnimation as useMotionAnimation,\n useAnimationControls,\n useAnimationFrame,\n useCycle,\n useDeprecatedAnimatedState,\n useDeprecatedInvertedScale,\n useDomEvent,\n useDragControls,\n useElementScroll,\n useForceUpdate,\n useInstantLayoutTransition,\n useInstantTransition,\n useInView,\n useIsomorphicLayoutEffect,\n useIsPresent,\n useMotionTemplate,\n useMotionValue,\n useMotionValueEvent,\n usePresence,\n useReducedMotion,\n useReducedMotionConfig,\n useResetProjection,\n useScroll,\n useSpring,\n useTime,\n useTransform,\n useVelocity,\n useViewportScroll,\n useWillChange,\n VisualElement,\n visualElementStore,\n warning,\n wrap,\n} from \"framer-motion\"\n","import type { StyledOptions } from \"@yamada-ui/core\"\nimport type { ForwardRefExoticComponent } from \"react\"\nimport type { MotionAs, MotionComponents, MotionFactory } from \"./motion.types\"\nimport { styled } from \"@yamada-ui/core\"\nimport { motion as _motion } from \"framer-motion\"\n\ninterface Factory extends MotionFactory, MotionComponents {}\n\nfunction factory() {\n const cache = new Map<MotionAs, ForwardRefExoticComponent<any>>()\n\n return new Proxy(styled, {\n apply: (_target, _thisArg, [el, options]: [MotionAs, StyledOptions]) => {\n const component = styled(el, options) as ForwardRefExoticComponent<any>\n\n return _motion.create(component)\n },\n\n get: (_target, el: MotionAs) => {\n if (!cache.has(el)) {\n const component = styled(el) as ForwardRefExoticComponent<any>\n\n cache.set(el, _motion.create(component))\n }\n\n return cache.get(el)\n },\n }) as Factory\n}\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 = factory()\n","import type { WithoutAs } from \"@yamada-ui/core\"\nimport type { Merge } from \"@yamada-ui/utils\"\nimport type { MotionAs, MotionComponent } from \"./motion.types\"\nimport * as React from \"react\"\n\nexport function motionForwardRef<Y extends object, M extends MotionAs>(\n render: React.ForwardRefRenderFunction<\n any,\n { as?: MotionAs } & Merge<React.ComponentPropsWithoutRef<M>, WithoutAs<Y>>\n >,\n) {\n return React.forwardRef(\n render as React.ForwardRefRenderFunction<any>,\n ) as unknown as MotionComponent<M, Y>\n}\n","import type { Dict } from \"@yamada-ui/utils\"\nimport type { MotionProps } from \"./motion.types\"\nimport { ui } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { motion } from \"framer-motion\"\nimport { motionForwardRef } from \"./forward-ref\"\n\nconst disableStyleProps = [\"transition\"]\n\nconst disableStyleProp = (prop: string) => disableStyleProps.includes(prop)\n\nconst Component = ui<\"div\", Dict>(\"div\", { disableStyleProp })\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 = motionForwardRef<MotionProps, \"div\">(\n ({ as = \"div\", className, ...rest }, ref) => (\n <Component\n ref={ref}\n as={motion.create(as)}\n className={cx(\"ui-motion\", className)}\n {...rest}\n />\n ),\n)\n\nMotion.displayName = \"Motion\"\nMotion.__ui__ = \"Motion\"\n","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;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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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A,EAAE,cAAU,wBAAS,QAAQ,IAAI,WAAW,SAAS,KAAK,IAC1D,CAAC;AAAA,MACL,WAAO,wBAASA,MAAK,IAAIA,SAAQA,UAAA,gBAAAA,OAAO;AAAA,IAC1C;AAAA,EACF;AACF;;;AJ5FA,IAAAC,wBAmHO;","names":["_motion","import_core","import_framer_motion","import_utils","delay","import_framer_motion"]}
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/factory.ts","../src/forward-ref.tsx","../src/motion.tsx","../src/utils.ts"],"sourcesContent":["export * from \"./factory\"\nexport * from \"./forward-ref\"\nexport { Motion } from \"./motion\"\nexport type * from \"./motion.types\"\nexport * from \"./utils\"\nexport {\n AcceleratedAnimation,\n addPointerInfo,\n addScaleCorrector,\n animate,\n AnimatePresence,\n AnimateSharedLayout,\n animateValue,\n animateVisualElement,\n animationControls,\n animations,\n anticipate,\n backIn,\n backInOut,\n backOut,\n buildTransform,\n calcLength,\n cancelFrame,\n cancelSync,\n circIn,\n circInOut,\n circOut,\n clamp,\n color,\n complex,\n createBox,\n createScopedAnimate,\n cubicBezier,\n delay,\n DeprecatedLayoutGroupContext,\n disableInstantTransitions,\n distance,\n distance2D,\n domAnimation,\n domMax,\n DragControls,\n easeIn,\n easeInOut,\n easeOut,\n filterProps,\n FlatTree,\n frame,\n frameData,\n interpolate,\n invariant,\n inView,\n isBrowser,\n isDragActive,\n isMotionComponent,\n isMotionValue,\n isValidMotionProp,\n LayoutGroup,\n LayoutGroupContext,\n LazyMotion,\n m,\n makeUseVisualState,\n mirrorEasing,\n mix,\n MotionConfig,\n MotionConfigContext,\n MotionContext,\n MotionGlobalConfig,\n motionValue,\n optimizedAppearDataAttribute,\n pipe,\n PresenceContext,\n progress,\n px,\n Reorder as MotionReorder,\n resolveMotionValue,\n reverseEasing,\n scroll,\n scrollInfo,\n spring,\n stagger,\n startOptimizedAppearAnimation,\n steps,\n SwitchLayoutGroupContext,\n sync,\n transform,\n unwrapMotionComponent,\n useAnimate,\n useAnimation as useMotionAnimation,\n useAnimationControls,\n useAnimationFrame,\n useCycle,\n useDeprecatedAnimatedState,\n useDeprecatedInvertedScale,\n useDomEvent,\n useDragControls,\n useElementScroll,\n useForceUpdate,\n useInstantLayoutTransition,\n useInstantTransition,\n useInView,\n useIsomorphicLayoutEffect,\n useIsPresent,\n useMotionTemplate,\n useMotionValue,\n useMotionValueEvent,\n usePresence,\n useReducedMotion,\n useReducedMotionConfig,\n useResetProjection,\n useScroll,\n useSpring,\n useTime,\n useTransform,\n useVelocity,\n useViewportScroll,\n useWillChange,\n VisualElement,\n visualElementStore,\n wrap,\n} from \"motion/react\"\n","import type { StyledOptions } from \"@yamada-ui/core\"\nimport type { ForwardRefExoticComponent } from \"react\"\nimport type { MotionAs, MotionComponents, MotionFactory } from \"./motion.types\"\nimport { styled } from \"@yamada-ui/core\"\nimport { motion as _motion } from \"motion/react\"\n\ninterface Factory extends MotionFactory, MotionComponents {}\n\nfunction factory() {\n const cache = new Map<MotionAs, ForwardRefExoticComponent<any>>()\n\n return new Proxy(styled, {\n apply: (_target, _thisArg, [el, options]: [MotionAs, StyledOptions]) => {\n const component = styled(el, options) as ForwardRefExoticComponent<any>\n\n return _motion.create(component)\n },\n\n get: (_target, el: MotionAs) => {\n if (!cache.has(el)) {\n const component = styled(el) as ForwardRefExoticComponent<any>\n\n cache.set(el, _motion.create(component))\n }\n\n return cache.get(el)\n },\n }) as Factory\n}\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 = factory()\n","import type { WithoutAs } from \"@yamada-ui/core\"\nimport type { Merge } from \"@yamada-ui/utils\"\nimport type { MotionAs, MotionComponent } from \"./motion.types\"\nimport * as React from \"react\"\n\nexport function motionForwardRef<Y extends object, M extends MotionAs>(\n render: React.ForwardRefRenderFunction<\n any,\n { as?: MotionAs } & Merge<React.ComponentPropsWithoutRef<M>, WithoutAs<Y>>\n >,\n) {\n return React.forwardRef(\n render as React.ForwardRefRenderFunction<any>,\n ) as unknown as MotionComponent<M, Y>\n}\n","import type { Dict } from \"@yamada-ui/utils\"\nimport type { MotionProps } from \"./motion.types\"\nimport { ui } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { motion } from \"motion/react\"\nimport { motionForwardRef } from \"./forward-ref\"\n\nconst disableStyleProps = [\"transition\"]\n\nconst disableStyleProp = (prop: string) => disableStyleProps.includes(prop)\n\nconst Component = ui<\"div\", Dict>(\"div\", { disableStyleProp })\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 = motionForwardRef<MotionProps, \"div\">(\n ({ as = \"div\", className, ...rest }, ref) => (\n <Component\n ref={ref}\n as={motion.create(as)}\n className={cx(\"ui-motion\", className)}\n {...rest}\n />\n ),\n)\n\nMotion.displayName = \"Motion\"\nMotion.__ui__ = \"Motion\"\n","import type { Transition } from \"motion/react\"\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;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;AA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AAAA,EACF;AACF;AAEO,SAAS,eAAe,YAAyB;AACtD,SAAO,SACLA,QACA,UACY;AACZ,WAAO;AAAA,MACL,GAAI,kCAAc,2BAA2B;AAAA,MAC7C,GAAI,WACA,EAAE,cAAU,wBAAS,QAAQ,IAAI,WAAW,SAAS,KAAK,IAC1D,CAAC;AAAA,MACL,WAAO,wBAASA,MAAK,IAAIA,SAAQA,UAAA,gBAAAA,OAAO;AAAA,IAC1C;AAAA,EACF;AACF;;;AJ5FA,IAAAC,gBAkHO;","names":["_motion","import_core","import_react","import_utils","delay","import_react"]}
|
package/dist/index.mjs
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
"use client"
|
2
2
|
import {
|
3
3
|
motion
|
4
|
-
} from "./chunk-
|
4
|
+
} from "./chunk-BEURCB7M.mjs";
|
5
5
|
import {
|
6
6
|
Motion
|
7
|
-
} from "./chunk-
|
7
|
+
} from "./chunk-XGL4MMJG.mjs";
|
8
8
|
import {
|
9
9
|
motionForwardRef
|
10
10
|
} from "./chunk-RXCU3ZFK.mjs";
|
@@ -14,7 +14,7 @@ import {
|
|
14
14
|
MOTION_TRANSITION_VARIANTS,
|
15
15
|
transitionEnter,
|
16
16
|
transitionExit
|
17
|
-
} from "./chunk-
|
17
|
+
} from "./chunk-4WGGFOFE.mjs";
|
18
18
|
|
19
19
|
// src/index.ts
|
20
20
|
import {
|
@@ -130,9 +130,8 @@ import {
|
|
130
130
|
useWillChange,
|
131
131
|
VisualElement,
|
132
132
|
visualElementStore,
|
133
|
-
warning,
|
134
133
|
wrap
|
135
|
-
} from "
|
134
|
+
} from "motion/react";
|
136
135
|
export {
|
137
136
|
AcceleratedAnimation,
|
138
137
|
AnimatePresence,
|
@@ -254,7 +253,6 @@ export {
|
|
254
253
|
useViewportScroll,
|
255
254
|
useWillChange,
|
256
255
|
visualElementStore,
|
257
|
-
warning,
|
258
256
|
wrap
|
259
257
|
};
|
260
258
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from \"./factory\"\nexport * from \"./forward-ref\"\nexport { Motion } from \"./motion\"\nexport type * from \"./motion.types\"\nexport * from \"./utils\"\nexport {\n AcceleratedAnimation,\n addPointerInfo,\n addScaleCorrector,\n animate,\n AnimatePresence,\n AnimateSharedLayout,\n animateValue,\n animateVisualElement,\n animationControls,\n animations,\n anticipate,\n backIn,\n backInOut,\n backOut,\n buildTransform,\n calcLength,\n cancelFrame,\n cancelSync,\n circIn,\n circInOut,\n circOut,\n clamp,\n color,\n complex,\n createBox,\n createScopedAnimate,\n cubicBezier,\n delay,\n DeprecatedLayoutGroupContext,\n disableInstantTransitions,\n distance,\n distance2D,\n domAnimation,\n domMax,\n DragControls,\n easeIn,\n easeInOut,\n easeOut,\n filterProps,\n FlatTree,\n frame,\n frameData,\n interpolate,\n invariant,\n inView,\n isBrowser,\n isDragActive,\n isMotionComponent,\n isMotionValue,\n isValidMotionProp,\n LayoutGroup,\n LayoutGroupContext,\n LazyMotion,\n m,\n makeUseVisualState,\n mirrorEasing,\n mix,\n MotionConfig,\n MotionConfigContext,\n MotionContext,\n MotionGlobalConfig,\n motionValue,\n optimizedAppearDataAttribute,\n pipe,\n PresenceContext,\n progress,\n px,\n Reorder as MotionReorder,\n resolveMotionValue,\n reverseEasing,\n scroll,\n scrollInfo,\n spring,\n stagger,\n startOptimizedAppearAnimation,\n steps,\n SwitchLayoutGroupContext,\n sync,\n transform,\n unwrapMotionComponent,\n useAnimate,\n useAnimation as useMotionAnimation,\n useAnimationControls,\n useAnimationFrame,\n useCycle,\n useDeprecatedAnimatedState,\n useDeprecatedInvertedScale,\n useDomEvent,\n useDragControls,\n useElementScroll,\n useForceUpdate,\n useInstantLayoutTransition,\n useInstantTransition,\n useInView,\n useIsomorphicLayoutEffect,\n useIsPresent,\n useMotionTemplate,\n useMotionValue,\n useMotionValueEvent,\n usePresence,\n useReducedMotion,\n useReducedMotionConfig,\n useResetProjection,\n useScroll,\n useSpring,\n useTime,\n useTransform,\n useVelocity,\n useViewportScroll,\n useWillChange,\n VisualElement,\n visualElementStore,\n
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from \"./factory\"\nexport * from \"./forward-ref\"\nexport { Motion } from \"./motion\"\nexport type * from \"./motion.types\"\nexport * from \"./utils\"\nexport {\n AcceleratedAnimation,\n addPointerInfo,\n addScaleCorrector,\n animate,\n AnimatePresence,\n AnimateSharedLayout,\n animateValue,\n animateVisualElement,\n animationControls,\n animations,\n anticipate,\n backIn,\n backInOut,\n backOut,\n buildTransform,\n calcLength,\n cancelFrame,\n cancelSync,\n circIn,\n circInOut,\n circOut,\n clamp,\n color,\n complex,\n createBox,\n createScopedAnimate,\n cubicBezier,\n delay,\n DeprecatedLayoutGroupContext,\n disableInstantTransitions,\n distance,\n distance2D,\n domAnimation,\n domMax,\n DragControls,\n easeIn,\n easeInOut,\n easeOut,\n filterProps,\n FlatTree,\n frame,\n frameData,\n interpolate,\n invariant,\n inView,\n isBrowser,\n isDragActive,\n isMotionComponent,\n isMotionValue,\n isValidMotionProp,\n LayoutGroup,\n LayoutGroupContext,\n LazyMotion,\n m,\n makeUseVisualState,\n mirrorEasing,\n mix,\n MotionConfig,\n MotionConfigContext,\n MotionContext,\n MotionGlobalConfig,\n motionValue,\n optimizedAppearDataAttribute,\n pipe,\n PresenceContext,\n progress,\n px,\n Reorder as MotionReorder,\n resolveMotionValue,\n reverseEasing,\n scroll,\n scrollInfo,\n spring,\n stagger,\n startOptimizedAppearAnimation,\n steps,\n SwitchLayoutGroupContext,\n sync,\n transform,\n unwrapMotionComponent,\n useAnimate,\n useAnimation as useMotionAnimation,\n useAnimationControls,\n useAnimationFrame,\n useCycle,\n useDeprecatedAnimatedState,\n useDeprecatedInvertedScale,\n useDomEvent,\n useDragControls,\n useElementScroll,\n useForceUpdate,\n useInstantLayoutTransition,\n useInstantTransition,\n useInView,\n useIsomorphicLayoutEffect,\n useIsPresent,\n useMotionTemplate,\n useMotionValue,\n useMotionValueEvent,\n usePresence,\n useReducedMotion,\n useReducedMotionConfig,\n useResetProjection,\n useScroll,\n useSpring,\n useTime,\n useTransform,\n useVelocity,\n useViewportScroll,\n useWillChange,\n VisualElement,\n visualElementStore,\n wrap,\n} from \"motion/react\"\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAKA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACW;AAAA,EACX;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACgB;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":[]}
|
package/dist/motion.d.mts
CHANGED
package/dist/motion.d.ts
CHANGED
package/dist/motion.js
CHANGED
@@ -36,7 +36,7 @@ __export(motion_exports, {
|
|
36
36
|
module.exports = __toCommonJS(motion_exports);
|
37
37
|
var import_core = require("@yamada-ui/core");
|
38
38
|
var import_utils = require("@yamada-ui/utils");
|
39
|
-
var
|
39
|
+
var import_react = require("motion/react");
|
40
40
|
|
41
41
|
// src/forward-ref.tsx
|
42
42
|
var React = __toESM(require("react"));
|
@@ -56,7 +56,7 @@ var Motion = motionForwardRef(
|
|
56
56
|
Component,
|
57
57
|
{
|
58
58
|
ref,
|
59
|
-
as:
|
59
|
+
as: import_react.motion.create(as),
|
60
60
|
className: (0, import_utils.cx)("ui-motion", className),
|
61
61
|
...rest
|
62
62
|
}
|
package/dist/motion.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/motion.tsx","../src/forward-ref.tsx"],"sourcesContent":["import type { Dict } from \"@yamada-ui/utils\"\nimport type { MotionProps } from \"./motion.types\"\nimport { ui } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { motion } from \"
|
1
|
+
{"version":3,"sources":["../src/motion.tsx","../src/forward-ref.tsx"],"sourcesContent":["import type { Dict } from \"@yamada-ui/utils\"\nimport type { MotionProps } from \"./motion.types\"\nimport { ui } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { motion } from \"motion/react\"\nimport { motionForwardRef } from \"./forward-ref\"\n\nconst disableStyleProps = [\"transition\"]\n\nconst disableStyleProp = (prop: string) => disableStyleProps.includes(prop)\n\nconst Component = ui<\"div\", Dict>(\"div\", { disableStyleProp })\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 = motionForwardRef<MotionProps, \"div\">(\n ({ as = \"div\", className, ...rest }, ref) => (\n <Component\n ref={ref}\n as={motion.create(as)}\n className={cx(\"ui-motion\", className)}\n {...rest}\n />\n ),\n)\n\nMotion.displayName = \"Motion\"\nMotion.__ui__ = \"Motion\"\n","import type { WithoutAs } from \"@yamada-ui/core\"\nimport type { Merge } from \"@yamada-ui/utils\"\nimport type { MotionAs, MotionComponent } from \"./motion.types\"\nimport * as React from \"react\"\n\nexport function motionForwardRef<Y extends object, M extends MotionAs>(\n render: React.ForwardRefRenderFunction<\n any,\n { as?: MotionAs } & Merge<React.ComponentPropsWithoutRef<M>, WithoutAs<Y>>\n >,\n) {\n return React.forwardRef(\n render as React.ForwardRefRenderFunction<any>,\n ) as unknown as MotionComponent<M, Y>\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,kBAAmB;AACnB,mBAAmB;AACnB,mBAAuB;;;ACDvB,YAAuB;AAEhB,SAAS,iBACd,QAIA;AACA,SAAa;AAAA,IACX;AAAA,EACF;AACF;;;ADMI;AAbJ,IAAM,oBAAoB,CAAC,YAAY;AAEvC,IAAM,mBAAmB,CAAC,SAAiB,kBAAkB,SAAS,IAAI;AAE1E,IAAM,gBAAY,gBAAgB,OAAO,EAAE,iBAAiB,CAAC;AAOtD,IAAM,SAAS;AAAA,EACpB,CAAC,EAAE,KAAK,OAAO,WAAW,GAAG,KAAK,GAAG,QACnC;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,IAAI,oBAAO,OAAO,EAAE;AAAA,MACpB,eAAW,iBAAG,aAAa,SAAS;AAAA,MACnC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,OAAO,cAAc;AACrB,OAAO,SAAS;","names":[]}
|
package/dist/motion.mjs
CHANGED
package/dist/motion.types.d.mts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { StyledOptions, ComponentArgs, UIProps, WithoutAs, OmitProps } from '@yamada-ui/core';
|
2
2
|
import { Merge, Dict } from '@yamada-ui/utils';
|
3
|
-
import { DOMMotionComponents, MotionProps as MotionProps$1, Transition, Target, TargetAndTransition } from '
|
4
|
-
export { CSSStyleDeclarationWithTransform, DOMMotionComponents, HTMLMotionProps, AbsoluteKeyframe as MotionAbsoluteKeyframe, MotionAdvancedProps, AnimatePresenceProps as MotionAnimatePresenceProps, AnimationControls as MotionAnimationControls, AnimationDefinition as MotionAnimationDefinition, AnimationLifecycles as MotionAnimationLifecycles, AnimationOptionsWithValueOverrides as MotionAnimationOptionsWithValueOverrides, AnimationPlaybackControls as MotionAnimationPlaybackControls, AnimationPlaybackLifecycles as MotionAnimationPlaybackLifecycles, AnimationPlaybackOptions as MotionAnimationPlaybackOptions, AnimationProps as MotionAnimationProps,
|
3
|
+
import { DOMMotionComponents, MotionProps as MotionProps$1, Transition, Target, TargetAndTransition } from 'motion/react';
|
4
|
+
export { CSSStyleDeclarationWithTransform, DOMMotionComponents, HTMLMotionProps, AbsoluteKeyframe as MotionAbsoluteKeyframe, MotionAdvancedProps, AnimatePresenceProps as MotionAnimatePresenceProps, AnimationControls as MotionAnimationControls, AnimationDefinition as MotionAnimationDefinition, AnimationLifecycles as MotionAnimationLifecycles, AnimationOptionsWithValueOverrides as MotionAnimationOptionsWithValueOverrides, AnimationPlaybackControls as MotionAnimationPlaybackControls, AnimationPlaybackLifecycles as MotionAnimationPlaybackLifecycles, AnimationPlaybackOptions as MotionAnimationPlaybackOptions, AnimationProps as MotionAnimationProps, AnimationSequence as MotionAnimationSequence, AnimationType as MotionAnimationType, At as MotionAt, Axis as MotionAxis, AxisDelta as MotionAxisDelta, BezierDefinition as MotionBezierDefinition, BoundingBox as MotionBoundingBox, Box as MotionBox, MotionConfigProps, CreateVisualElement as MotionCreateVisualElement, CustomValueType as MotionCustomValueType, Cycle as MotionCycle, CycleState as MotionCycleState, DOMKeyframesDefinition as MotionDOMKeyframesDefinition, DOMSegment as MotionDOMSegment, DOMSegmentWithTransition as MotionDOMSegmentWithTransition, DecayOptions as MotionDecayOptions, DelayedFunction as MotionDelayedFunction, Delta as MotionDelta, DragElastic as MotionDragElastic, DragHandlers as MotionDragHandlers, DraggableProps as MotionDraggableProps, DurationSpringOptions as MotionDurationSpringOptions, DynamicAnimationOptions as MotionDynamicAnimationOptions, DynamicOption as MotionDynamicOption, Easing as MotionEasing, EasingDefinition as MotionEasingDefinition, EasingFunction as MotionEasingFunction, EasingModifier as MotionEasingModifier, EventInfo as MotionEventInfo, FeatureBundle as MotionFeatureBundle, FeatureDefinition as MotionFeatureDefinition, FeatureDefinitions as MotionFeatureDefinitions, FeaturePackage as MotionFeaturePackage, FeaturePackages as MotionFeaturePackages, FocusHandlers as MotionFocusHandlers, HoverHandlers as MotionHoverHandlers, HydratedFeatureDefinition as MotionHydratedFeatureDefinition, HydratedFeatureDefinitions as MotionHydratedFeatureDefinitions, IProjectionNode as MotionIProjectionNode, Inertia as MotionInertia, InertiaOptions as MotionInertiaOptions, InterpolateOptions as MotionInterpolateOptions, KeyframeOptions as MotionKeyframeOptions, Keyframes as MotionKeyframes, KeyframesTarget as MotionKeyframesTarget, LayoutProps as MotionLayoutProps, LazyFeatureBundle as MotionLazyFeatureBundle, LazyProps as MotionLazyProps, MixerFactory as MotionMixerFactory, None as MotionNone, Orchestration as MotionOrchestration, PanHandlers as MotionPanHandlers, PanInfo as MotionPanInfo, PassiveEffect as MotionPassiveEffect, Point as MotionPoint, RenderComponent as MotionRenderComponent, Repeat as MotionRepeat, RepeatType as MotionRepeatType, ResolveKeyframes as MotionResolveKeyframes, ResolvedAnimationDefinition as MotionResolvedAnimationDefinition, ResolvedAnimationDefinitions as MotionResolvedAnimationDefinitions, ResolvedKeyframesTarget as MotionResolvedKeyframesTarget, ResolvedSingleTarget as MotionResolvedSingleTarget, ResolvedValueTarget as MotionResolvedValueTarget, ResolvedValues as MotionResolvedValues, Segment as MotionSegment, SequenceLabel as MotionSequenceLabel, SequenceLabelWithTime as MotionSequenceLabelWithTime, SequenceMap as MotionSequenceMap, SequenceOptions as MotionSequenceOptions, SequenceTime as MotionSequenceTime, SingleTarget as MotionSingleTarget, Spring as MotionSpring, SpringOptions as MotionSpringOptions, MotionStyle, StyleKeyframesDefinition as MotionStyleKeyframesDefinition, StyleTransitions as MotionStyleTransitions, Subscriber as MotionSubscriber, TapHandlers as MotionTapHandlers, TapInfo as MotionTapInfo, Target as MotionTarget, TargetAndTransition as MotionTargetAndTransition, MotionTransform, TransformPoint as MotionTransformPoint, Transition as MotionTransition, Tween as MotionTween, UnresolvedValueKeyframe as MotionUnresolvedValueKeyframe, UseInViewOptions as MotionUseInViewOptions, MotionValue, ValueAnimationOptions as MotionValueAnimationOptions, ValueAnimationTransition as MotionValueAnimationTransition, ValueKeyframe as MotionValueKeyframe, ValueKeyframesDefinition as MotionValueKeyframesDefinition, MotionValueSegment, MotionValueSegmentWithTransition, ValueSequence as MotionValueSequence, ValueTarget as MotionValueTarget, ValueType as MotionValueType, VariableKeyframesDefinition as MotionVariableKeyframesDefinition, VariableTransitions as MotionVariableTransitions, Variant as MotionVariant, VariantLabels as MotionVariantLabels, Variants as MotionVariants, VelocityOptions as MotionVelocityOptions, VisualState as MotionVisualState, SVGAttributesAsMotionValues, SVGKeyframesDefinition, SVGMotionProps, SVGPathKeyframesDefinition, SVGPathTransitions, SVGTransitions, ScrapeMotionValuesFromProps, ScrollMotionValues } from 'motion/react';
|
5
5
|
import * as React from 'react';
|
6
6
|
|
7
7
|
interface MotionFactory {
|
package/dist/motion.types.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { StyledOptions, ComponentArgs, UIProps, WithoutAs, OmitProps } from '@yamada-ui/core';
|
2
2
|
import { Merge, Dict } from '@yamada-ui/utils';
|
3
|
-
import { DOMMotionComponents, MotionProps as MotionProps$1, Transition, Target, TargetAndTransition } from '
|
4
|
-
export { CSSStyleDeclarationWithTransform, DOMMotionComponents, HTMLMotionProps, AbsoluteKeyframe as MotionAbsoluteKeyframe, MotionAdvancedProps, AnimatePresenceProps as MotionAnimatePresenceProps, AnimationControls as MotionAnimationControls, AnimationDefinition as MotionAnimationDefinition, AnimationLifecycles as MotionAnimationLifecycles, AnimationOptionsWithValueOverrides as MotionAnimationOptionsWithValueOverrides, AnimationPlaybackControls as MotionAnimationPlaybackControls, AnimationPlaybackLifecycles as MotionAnimationPlaybackLifecycles, AnimationPlaybackOptions as MotionAnimationPlaybackOptions, AnimationProps as MotionAnimationProps,
|
3
|
+
import { DOMMotionComponents, MotionProps as MotionProps$1, Transition, Target, TargetAndTransition } from 'motion/react';
|
4
|
+
export { CSSStyleDeclarationWithTransform, DOMMotionComponents, HTMLMotionProps, AbsoluteKeyframe as MotionAbsoluteKeyframe, MotionAdvancedProps, AnimatePresenceProps as MotionAnimatePresenceProps, AnimationControls as MotionAnimationControls, AnimationDefinition as MotionAnimationDefinition, AnimationLifecycles as MotionAnimationLifecycles, AnimationOptionsWithValueOverrides as MotionAnimationOptionsWithValueOverrides, AnimationPlaybackControls as MotionAnimationPlaybackControls, AnimationPlaybackLifecycles as MotionAnimationPlaybackLifecycles, AnimationPlaybackOptions as MotionAnimationPlaybackOptions, AnimationProps as MotionAnimationProps, AnimationSequence as MotionAnimationSequence, AnimationType as MotionAnimationType, At as MotionAt, Axis as MotionAxis, AxisDelta as MotionAxisDelta, BezierDefinition as MotionBezierDefinition, BoundingBox as MotionBoundingBox, Box as MotionBox, MotionConfigProps, CreateVisualElement as MotionCreateVisualElement, CustomValueType as MotionCustomValueType, Cycle as MotionCycle, CycleState as MotionCycleState, DOMKeyframesDefinition as MotionDOMKeyframesDefinition, DOMSegment as MotionDOMSegment, DOMSegmentWithTransition as MotionDOMSegmentWithTransition, DecayOptions as MotionDecayOptions, DelayedFunction as MotionDelayedFunction, Delta as MotionDelta, DragElastic as MotionDragElastic, DragHandlers as MotionDragHandlers, DraggableProps as MotionDraggableProps, DurationSpringOptions as MotionDurationSpringOptions, DynamicAnimationOptions as MotionDynamicAnimationOptions, DynamicOption as MotionDynamicOption, Easing as MotionEasing, EasingDefinition as MotionEasingDefinition, EasingFunction as MotionEasingFunction, EasingModifier as MotionEasingModifier, EventInfo as MotionEventInfo, FeatureBundle as MotionFeatureBundle, FeatureDefinition as MotionFeatureDefinition, FeatureDefinitions as MotionFeatureDefinitions, FeaturePackage as MotionFeaturePackage, FeaturePackages as MotionFeaturePackages, FocusHandlers as MotionFocusHandlers, HoverHandlers as MotionHoverHandlers, HydratedFeatureDefinition as MotionHydratedFeatureDefinition, HydratedFeatureDefinitions as MotionHydratedFeatureDefinitions, IProjectionNode as MotionIProjectionNode, Inertia as MotionInertia, InertiaOptions as MotionInertiaOptions, InterpolateOptions as MotionInterpolateOptions, KeyframeOptions as MotionKeyframeOptions, Keyframes as MotionKeyframes, KeyframesTarget as MotionKeyframesTarget, LayoutProps as MotionLayoutProps, LazyFeatureBundle as MotionLazyFeatureBundle, LazyProps as MotionLazyProps, MixerFactory as MotionMixerFactory, None as MotionNone, Orchestration as MotionOrchestration, PanHandlers as MotionPanHandlers, PanInfo as MotionPanInfo, PassiveEffect as MotionPassiveEffect, Point as MotionPoint, RenderComponent as MotionRenderComponent, Repeat as MotionRepeat, RepeatType as MotionRepeatType, ResolveKeyframes as MotionResolveKeyframes, ResolvedAnimationDefinition as MotionResolvedAnimationDefinition, ResolvedAnimationDefinitions as MotionResolvedAnimationDefinitions, ResolvedKeyframesTarget as MotionResolvedKeyframesTarget, ResolvedSingleTarget as MotionResolvedSingleTarget, ResolvedValueTarget as MotionResolvedValueTarget, ResolvedValues as MotionResolvedValues, Segment as MotionSegment, SequenceLabel as MotionSequenceLabel, SequenceLabelWithTime as MotionSequenceLabelWithTime, SequenceMap as MotionSequenceMap, SequenceOptions as MotionSequenceOptions, SequenceTime as MotionSequenceTime, SingleTarget as MotionSingleTarget, Spring as MotionSpring, SpringOptions as MotionSpringOptions, MotionStyle, StyleKeyframesDefinition as MotionStyleKeyframesDefinition, StyleTransitions as MotionStyleTransitions, Subscriber as MotionSubscriber, TapHandlers as MotionTapHandlers, TapInfo as MotionTapInfo, Target as MotionTarget, TargetAndTransition as MotionTargetAndTransition, MotionTransform, TransformPoint as MotionTransformPoint, Transition as MotionTransition, Tween as MotionTween, UnresolvedValueKeyframe as MotionUnresolvedValueKeyframe, UseInViewOptions as MotionUseInViewOptions, MotionValue, ValueAnimationOptions as MotionValueAnimationOptions, ValueAnimationTransition as MotionValueAnimationTransition, ValueKeyframe as MotionValueKeyframe, ValueKeyframesDefinition as MotionValueKeyframesDefinition, MotionValueSegment, MotionValueSegmentWithTransition, ValueSequence as MotionValueSequence, ValueTarget as MotionValueTarget, ValueType as MotionValueType, VariableKeyframesDefinition as MotionVariableKeyframesDefinition, VariableTransitions as MotionVariableTransitions, Variant as MotionVariant, VariantLabels as MotionVariantLabels, Variants as MotionVariants, VelocityOptions as MotionVelocityOptions, VisualState as MotionVisualState, SVGAttributesAsMotionValues, SVGKeyframesDefinition, SVGMotionProps, SVGPathKeyframesDefinition, SVGPathTransitions, SVGTransitions, ScrapeMotionValuesFromProps, ScrollMotionValues } from 'motion/react';
|
5
5
|
import * as React from 'react';
|
6
6
|
|
7
7
|
interface MotionFactory {
|
package/dist/motion.types.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/motion.types.ts"],"sourcesContent":["import type {\n ComponentArgs,\n OmitProps,\n StyledOptions,\n UIProps,\n WithoutAs,\n} from \"@yamada-ui/core\"\nimport type { Dict, Merge } from \"@yamada-ui/utils\"\nimport type {\n DOMMotionComponents,\n MotionProps as OriginMotionProps,\n Target,\n TargetAndTransition,\n Transition,\n} from \"
|
1
|
+
{"version":3,"sources":["../src/motion.types.ts"],"sourcesContent":["import type {\n ComponentArgs,\n OmitProps,\n StyledOptions,\n UIProps,\n WithoutAs,\n} from \"@yamada-ui/core\"\nimport type { Dict, Merge } from \"@yamada-ui/utils\"\nimport type {\n DOMMotionComponents,\n MotionProps as OriginMotionProps,\n Target,\n TargetAndTransition,\n Transition,\n} from \"motion/react\"\nimport type * as React from \"react\"\n\nexport type {\n AbsoluteKeyframe as MotionAbsoluteKeyframe,\n AnimatePresenceProps as MotionAnimatePresenceProps,\n AnimationControls as MotionAnimationControls,\n AnimationDefinition as MotionAnimationDefinition,\n AnimationLifecycles as MotionAnimationLifecycles,\n AnimationOptionsWithValueOverrides as MotionAnimationOptionsWithValueOverrides,\n AnimationPlaybackControls as MotionAnimationPlaybackControls,\n AnimationPlaybackLifecycles as MotionAnimationPlaybackLifecycles,\n AnimationPlaybackOptions as MotionAnimationPlaybackOptions,\n AnimationProps as MotionAnimationProps,\n AnimationSequence as MotionAnimationSequence,\n AnimationType as MotionAnimationType,\n At as MotionAt,\n Axis as MotionAxis,\n AxisDelta as MotionAxisDelta,\n BezierDefinition as MotionBezierDefinition,\n BoundingBox as MotionBoundingBox,\n Box as MotionBox,\n CreateVisualElement as MotionCreateVisualElement,\n CSSStyleDeclarationWithTransform,\n CustomValueType as MotionCustomValueType,\n Cycle as MotionCycle,\n CycleState as MotionCycleState,\n DecayOptions as MotionDecayOptions,\n DelayedFunction as MotionDelayedFunction,\n Delta as MotionDelta,\n DOMKeyframesDefinition as MotionDOMKeyframesDefinition,\n DOMMotionComponents,\n DOMSegment as MotionDOMSegment,\n DOMSegmentWithTransition as MotionDOMSegmentWithTransition,\n DragElastic as MotionDragElastic,\n DraggableProps as MotionDraggableProps,\n DragHandlers as MotionDragHandlers,\n DurationSpringOptions as MotionDurationSpringOptions,\n DynamicAnimationOptions as MotionDynamicAnimationOptions,\n DynamicOption as MotionDynamicOption,\n Easing as MotionEasing,\n EasingDefinition as MotionEasingDefinition,\n EasingFunction as MotionEasingFunction,\n EasingModifier as MotionEasingModifier,\n EventInfo as MotionEventInfo,\n FeatureBundle as MotionFeatureBundle,\n FeatureDefinition as MotionFeatureDefinition,\n FeatureDefinitions as MotionFeatureDefinitions,\n FeaturePackage as MotionFeaturePackage,\n FeaturePackages as MotionFeaturePackages,\n FocusHandlers as MotionFocusHandlers,\n HoverHandlers as MotionHoverHandlers,\n HTMLMotionProps,\n HydratedFeatureDefinition as MotionHydratedFeatureDefinition,\n HydratedFeatureDefinitions as MotionHydratedFeatureDefinitions,\n Inertia as MotionInertia,\n InertiaOptions as MotionInertiaOptions,\n InterpolateOptions as MotionInterpolateOptions,\n IProjectionNode as MotionIProjectionNode,\n KeyframeOptions as MotionKeyframeOptions,\n Keyframes as MotionKeyframes,\n KeyframesTarget as MotionKeyframesTarget,\n LayoutProps as MotionLayoutProps,\n LazyFeatureBundle as MotionLazyFeatureBundle,\n LazyProps as MotionLazyProps,\n MixerFactory as MotionMixerFactory,\n MotionAdvancedProps,\n MotionConfigProps,\n MotionStyle,\n MotionTransform,\n MotionValue,\n MotionValueSegment,\n MotionValueSegmentWithTransition,\n None as MotionNone,\n Orchestration as MotionOrchestration,\n PanHandlers as MotionPanHandlers,\n PanInfo as MotionPanInfo,\n PassiveEffect as MotionPassiveEffect,\n Point as MotionPoint,\n RenderComponent as MotionRenderComponent,\n Repeat as MotionRepeat,\n RepeatType as MotionRepeatType,\n ResolvedAnimationDefinition as MotionResolvedAnimationDefinition,\n ResolvedAnimationDefinitions as MotionResolvedAnimationDefinitions,\n ResolvedKeyframesTarget as MotionResolvedKeyframesTarget,\n ResolvedSingleTarget as MotionResolvedSingleTarget,\n ResolvedValues as MotionResolvedValues,\n ResolvedValueTarget as MotionResolvedValueTarget,\n ResolveKeyframes as MotionResolveKeyframes,\n ScrapeMotionValuesFromProps,\n ScrollMotionValues,\n Segment as MotionSegment,\n SequenceLabel as MotionSequenceLabel,\n SequenceLabelWithTime as MotionSequenceLabelWithTime,\n SequenceMap as MotionSequenceMap,\n SequenceOptions as MotionSequenceOptions,\n SequenceTime as MotionSequenceTime,\n SingleTarget as MotionSingleTarget,\n Spring as MotionSpring,\n SpringOptions as MotionSpringOptions,\n StyleKeyframesDefinition as MotionStyleKeyframesDefinition,\n StyleTransitions as MotionStyleTransitions,\n Subscriber as MotionSubscriber,\n SVGAttributesAsMotionValues,\n SVGKeyframesDefinition,\n SVGMotionProps,\n SVGPathKeyframesDefinition,\n SVGPathTransitions,\n SVGTransitions,\n TapHandlers as MotionTapHandlers,\n TapInfo as MotionTapInfo,\n Target as MotionTarget,\n TargetAndTransition as MotionTargetAndTransition,\n TransformPoint as MotionTransformPoint,\n Transition as MotionTransition,\n Tween as MotionTween,\n UnresolvedValueKeyframe as MotionUnresolvedValueKeyframe,\n UseInViewOptions as MotionUseInViewOptions,\n ValueAnimationOptions as MotionValueAnimationOptions,\n ValueAnimationTransition as MotionValueAnimationTransition,\n ValueKeyframe as MotionValueKeyframe,\n ValueKeyframesDefinition as MotionValueKeyframesDefinition,\n ValueSequence as MotionValueSequence,\n ValueTarget as MotionValueTarget,\n ValueType as MotionValueType,\n VariableKeyframesDefinition as MotionVariableKeyframesDefinition,\n VariableTransitions as MotionVariableTransitions,\n Variant as MotionVariant,\n VariantLabels as MotionVariantLabels,\n Variants as MotionVariants,\n VelocityOptions as MotionVelocityOptions,\n VisualState as MotionVisualState,\n} from \"motion/react\"\n\nexport interface MotionFactory {\n <T extends MotionAs = MotionAs, M extends object = {}>(\n el: T,\n options?: StyledOptions,\n ): UIMotionComponent<T, M>\n}\n\ntype ComponentConditionalProps<\n Y extends MotionAs,\n M extends MotionAs,\n D extends object = {},\n> = Y extends M\n ? OmitProps<React.ComponentProps<Y>, D>\n :\n | OmitProps<React.ComponentProps<M>, D>\n | OmitProps<React.ComponentProps<Y>, D>\n\ntype ComponentProps<\n Y extends MotionAs,\n M extends MotionAs,\n D extends object = {},\n> = {\n as?: M\n} & ComponentConditionalProps<Y, M, D>\n\nexport interface MotionComponent<Y extends MotionAs, D extends object = {}>\n extends ComponentArgs {\n <M extends MotionAs = Y>(props: ComponentProps<Y, M, D>): React.ReactElement\n}\n\nexport type MotionAs = keyof DOMMotionComponents\n\nexport type MotionComponents = {\n [Y in MotionAs]: UIMotionComponent<Y>\n}\n\nexport interface UIMotionComponent<Y extends MotionAs, M extends object = {}>\n extends MotionComponent<Y, Merge<UIMotionProps, M>> {}\n\ninterface UIMotionProps extends Merge<UIProps, OriginMotionProps> {\n as?: MotionAs\n}\n\ntype FactoryAttributes<Y> =\n Y extends React.DetailedHTMLFactory<infer M, any>\n ? M\n : Y extends React.SVGFactory\n ? React.SVGAttributes<SVGElement>\n : never\ntype FactoryElement<Y> =\n Y extends React.DetailedHTMLFactory<any, infer M>\n ? M\n : Y extends React.SVGFactory\n ? SVGElement\n : never\ntype DOMAttributes<\n Y extends React.HTMLAttributes<M> | React.SVGAttributes<SVGElement>,\n M extends HTMLElement | SVGElement,\n> = Y\n\nexport type MotionProps<Y extends MotionAs = \"div\"> = Merge<\n DOMAttributes<\n FactoryAttributes<React.ReactDOM[Y]>,\n FactoryElement<React.ReactDOM[Y]>\n >,\n UIMotionProps\n>\n\nexport type MotionPropsWithoutAs<Y extends MotionAs = \"div\"> = WithoutAs<\n MotionProps<Y>\n>\n\nexport type MotionPropsWithoutChildren<Y extends MotionAs = \"div\"> = Omit<\n MotionProps<Y>,\n \"children\"\n>\n\ntype TargetResolver<Y = Dict> = (\n props: MotionTransitionProps & Y,\n) => TargetAndTransition\n\ntype Variant<Y = Dict> = TargetAndTransition | TargetResolver<Y>\n\nexport interface MotionTransitionVariants<Y = Dict> {\n enter: Variant<Y>\n exit: Variant<Y>\n initial?: Variant<Y>\n}\n\ntype MotionLifecycleProps<Y> = { [key in \"enter\" | \"exit\"]?: Y }\n\nexport interface MotionTransitionProps {\n /**\n * Custom `delay` definition for `enter` and `exit`.\n */\n delay?: MotionLifecycleProps<number> | number\n /**\n * Custom `duration` definition for `enter` and `exit`.\n */\n duration?: MotionLifecycleProps<number> | number\n /**\n * Custom `enter`.\n */\n enter?: any\n /**\n * Custom `exit`.\n */\n exit?: any\n /**\n * Custom `initial`.\n */\n initial?: any\n /**\n * Custom `transition` definition for `enter` and `exit`.\n */\n transition?: MotionLifecycleProps<Transition>\n /**\n * Custom `transitionEnd` definition for `enter` and `exit`.\n */\n transitionEnd?: MotionLifecycleProps<Target>\n}\n\nexport type WithTransitionProps<Y extends object> = {\n /**\n * Show the component. triggers when enter or exit states.\n *\n * @deprecated Use `open` instead.\n */\n isOpen?: boolean\n /**\n * Show the component. triggers when enter or exit states.\n */\n open?: boolean\n /**\n * If `true`, the element will unmount when `isOpen={false}` and animation is done.\n */\n unmountOnExit?: boolean\n} & MotionTransitionProps &\n Omit<Y, \"transition\" | \"variants\">\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/dist/utils.d.mts
CHANGED
package/dist/utils.d.ts
CHANGED
package/dist/utils.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/utils.ts"],"sourcesContent":["import type { Transition } from \"
|
1
|
+
{"version":3,"sources":["../src/utils.ts"],"sourcesContent":["import type { Transition } from \"motion/react\"\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,K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AE,GAAG,QAAQ,GAAG,EAAE;AAAA,IACxB,UAAU,EAAE,QAAQ,GAAG,OAAO,GAAG,KAAK,GAAG,OAAO,OAAO;AAAA,EACzD;AAAA,EACA,SAAS;AAAA,IACP,OAAO,EAAE,GAAG,GAAG,GAAG,EAAE;AAAA,IACpB,MAAM,EAAE,GAAG,GAAG,GAAG,QAAQ;AAAA,IACzB,UAAU,EAAE,MAAM,GAAG,UAAU,SAAS,OAAO,GAAG,KAAK,EAAE;AAAA,EAC3D;AACF;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,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
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@yamada-ui/motion",
|
3
|
-
"version": "2.2.
|
3
|
+
"version": "2.2.11-dev-20241209054915",
|
4
4
|
"description": "Yamada UI motion components",
|
5
5
|
"keywords": [
|
6
6
|
"yamada",
|
@@ -36,9 +36,9 @@
|
|
36
36
|
"url": "https://github.com/yamada-ui/yamada-ui/issues"
|
37
37
|
},
|
38
38
|
"dependencies": {
|
39
|
-
"
|
40
|
-
"@yamada-ui/core": "1.16.
|
41
|
-
"@yamada-ui/utils": "1.6.
|
39
|
+
"motion": "^11.13.1",
|
40
|
+
"@yamada-ui/core": "1.16.1-dev-20241209054915",
|
41
|
+
"@yamada-ui/utils": "1.6.1-dev-20241209054915"
|
42
42
|
},
|
43
43
|
"devDependencies": {
|
44
44
|
"clean-package": "2.2.0",
|
@@ -1 +0,0 @@
|
|
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":";;;AAEA,SAAS,gBAAgB;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,E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ACxC,OAAO;AAAA,IACL,UAAU;AAAA,IACV,MAAM,0BAA0B;AAAA,EAClC;AAAA,EACA,MAAM;AAAA,IACJ,UAAU;AAAA,IACV,MAAM,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,UAAU,SAAS,QAAQ,IAAI,WAAW,SAAS,MAAM,IAC3D,CAAC;AAAA,MACL,OAAO,SAAS,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,UAAU,SAAS,QAAQ,IAAI,WAAW,SAAS,KAAK,IAC1D,CAAC;AAAA,MACL,OAAO,SAAS,KAAK,IAAI,QAAQ,+BAAO;AAAA,IAC1C;AAAA,EACF;AACF;","names":[]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../src/factory.ts"],"sourcesContent":["import type { StyledOptions } from \"@yamada-ui/core\"\nimport type { ForwardRefExoticComponent } from \"react\"\nimport type { MotionAs, MotionComponents, MotionFactory } from \"./motion.types\"\nimport { styled } from \"@yamada-ui/core\"\nimport { motion as _motion } from \"framer-motion\"\n\ninterface Factory extends MotionFactory, MotionComponents {}\n\nfunction factory() {\n const cache = new Map<MotionAs, ForwardRefExoticComponent<any>>()\n\n return new Proxy(styled, {\n apply: (_target, _thisArg, [el, options]: [MotionAs, StyledOptions]) => {\n const component = styled(el, options) as ForwardRefExoticComponent<any>\n\n return _motion.create(component)\n },\n\n get: (_target, el: MotionAs) => {\n if (!cache.has(el)) {\n const component = styled(el) as ForwardRefExoticComponent<any>\n\n cache.set(el, _motion.create(component))\n }\n\n return cache.get(el)\n },\n }) as Factory\n}\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 = factory()\n"],"mappings":";;;AAGA,SAAS,cAAc;AACvB,SAAS,UAAU,eAAe;AAIlC,SAAS,UAAU;AACjB,QAAM,QAAQ,oBAAI,IAA8C;AAEhE,SAAO,IAAI,MAAM,QAAQ;AAAA,IACvB,OAAO,CAAC,SAAS,UAAU,CAAC,IAAI,OAAO,MAAiC;AACtE,YAAM,YAAY,OAAO,IAAI,OAAO;AAEpC,aAAO,QAAQ,OAAO,SAAS;AAAA,IACjC;AAAA,IAEA,KAAK,CAAC,SAAS,OAAiB;AAC9B,UAAI,CAAC,MAAM,IAAI,EAAE,GAAG;AAClB,cAAM,YAAY,OAAO,EAAE;AAE3B,cAAM,IAAI,IAAI,QAAQ,OAAO,SAAS,CAAC;AAAA,MACzC;AAEA,aAAO,MAAM,IAAI,EAAE;AAAA,IACrB;AAAA,EACF,CAAC;AACH;AAOO,IAAM,SAAS,QAAQ;","names":[]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../src/motion.tsx"],"sourcesContent":["import type { Dict } from \"@yamada-ui/utils\"\nimport type { MotionProps } from \"./motion.types\"\nimport { ui } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { motion } from \"framer-motion\"\nimport { motionForwardRef } from \"./forward-ref\"\n\nconst disableStyleProps = [\"transition\"]\n\nconst disableStyleProp = (prop: string) => disableStyleProps.includes(prop)\n\nconst Component = ui<\"div\", Dict>(\"div\", { disableStyleProp })\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 = motionForwardRef<MotionProps, \"div\">(\n ({ as = \"div\", className, ...rest }, ref) => (\n <Component\n ref={ref}\n as={motion.create(as)}\n className={cx(\"ui-motion\", className)}\n {...rest}\n />\n ),\n)\n\nMotion.displayName = \"Motion\"\nMotion.__ui__ = \"Motion\"\n"],"mappings":";;;;;;AAEA,SAAS,UAAU;AACnB,SAAS,UAAU;AACnB,SAAS,cAAc;AAgBnB;AAbJ,IAAM,oBAAoB,CAAC,YAAY;AAEvC,IAAM,mBAAmB,CAAC,SAAiB,kBAAkB,SAAS,IAAI;AAE1E,IAAM,YAAY,GAAgB,OAAO,EAAE,iBAAiB,CAAC;AAOtD,IAAM,SAAS;AAAA,EACpB,CAAC,EAAE,KAAK,OAAO,WAAW,GAAG,KAAK,GAAG,QACnC;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,IAAI,OAAO,OAAO,EAAE;AAAA,MACpB,WAAW,GAAG,aAAa,SAAS;AAAA,MACnC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,OAAO,cAAc;AACrB,OAAO,SAAS;","names":[]}
|