@yamada-ui/motion 2.2.7-next-20241111190044 → 2.2.8-dev-20241113103942

Sign up to get free protection for your applications and to get access to all the features.
@@ -72,8 +72,14 @@ interface MotionTransitionProps {
72
72
  type WithTransitionProps<Y extends object> = {
73
73
  /**
74
74
  * Show the component. triggers when enter or exit states.
75
+ *
76
+ * @deprecated Use `open` instead.
75
77
  */
76
78
  isOpen?: boolean;
79
+ /**
80
+ * Show the component. triggers when enter or exit states.
81
+ */
82
+ open?: boolean;
77
83
  /**
78
84
  * If `true`, the element will unmount when `isOpen={false}` and animation is done.
79
85
  */
@@ -72,8 +72,14 @@ interface MotionTransitionProps {
72
72
  type WithTransitionProps<Y extends object> = {
73
73
  /**
74
74
  * Show the component. triggers when enter or exit states.
75
+ *
76
+ * @deprecated Use `open` instead.
75
77
  */
76
78
  isOpen?: boolean;
79
+ /**
80
+ * Show the component. triggers when enter or exit states.
81
+ */
82
+ open?: boolean;
77
83
  /**
78
84
  * If `true`, the element will unmount when `isOpen={false}` and animation is done.
79
85
  */
@@ -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 \"framer-motion\"\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 AnimationScope as MotionAnimationScope,\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 DevMessage as MotionDevMessage,\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 ElementOrSelector as MotionElementOrSelector,\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 \"framer-motion\"\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 isOpen?: 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":[]}
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 \"framer-motion\"\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 AnimationScope as MotionAnimationScope,\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 DevMessage as MotionDevMessage,\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 ElementOrSelector as MotionElementOrSelector,\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 \"framer-motion\"\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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yamada-ui/motion",
3
- "version": "2.2.7-next-20241111190044",
3
+ "version": "2.2.8-dev-20241113103942",
4
4
  "description": "Yamada UI motion components",
5
5
  "keywords": [
6
6
  "yamada",
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "framer-motion": "11.11.11",
40
- "@yamada-ui/core": "1.15.5-next-20241111190044",
40
+ "@yamada-ui/core": "1.15.5",
41
41
  "@yamada-ui/utils": "1.5.4"
42
42
  },
43
43
  "devDependencies": {