react-modal-sheet 5.2.2 → 5.2.3

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/index.d.mts CHANGED
@@ -6,7 +6,8 @@ type CommonProps = {
6
6
  className?: string;
7
7
  unstyled?: boolean;
8
8
  };
9
- type MotionCommonProps = Omit<ComponentPropsWithoutRef<typeof motion.div>, 'initial' | 'animate' | 'exit'>;
9
+ type MotionDivProps = ComponentPropsWithoutRef<typeof motion.div>;
10
+ type MotionCommonProps = Omit<MotionDivProps, 'initial' | 'animate' | 'exit'>;
10
11
  interface SheetTweenConfig {
11
12
  ease: EasingDefinition;
12
13
  duration: number;
@@ -50,7 +51,7 @@ type SheetContentProps = MotionCommonProps & CommonProps & {
50
51
  scrollClassName?: string;
51
52
  scrollStyle?: MotionProps['style'];
52
53
  };
53
- type SheetBackdropProps = MotionCommonProps & CommonProps;
54
+ type SheetBackdropProps = MotionDivProps & CommonProps;
54
55
  type SheetDragIndicatorProps = HTMLAttributes<HTMLDivElement> & CommonProps;
55
56
  type SheetStateInfo = {
56
57
  scrollPosition?: 'top' | 'bottom' | 'middle';
package/dist/index.d.ts CHANGED
@@ -6,7 +6,8 @@ type CommonProps = {
6
6
  className?: string;
7
7
  unstyled?: boolean;
8
8
  };
9
- type MotionCommonProps = Omit<ComponentPropsWithoutRef<typeof motion.div>, 'initial' | 'animate' | 'exit'>;
9
+ type MotionDivProps = ComponentPropsWithoutRef<typeof motion.div>;
10
+ type MotionCommonProps = Omit<MotionDivProps, 'initial' | 'animate' | 'exit'>;
10
11
  interface SheetTweenConfig {
11
12
  ease: EasingDefinition;
12
13
  duration: number;
@@ -50,7 +51,7 @@ type SheetContentProps = MotionCommonProps & CommonProps & {
50
51
  scrollClassName?: string;
51
52
  scrollStyle?: MotionProps['style'];
52
53
  };
53
- type SheetBackdropProps = MotionCommonProps & CommonProps;
54
+ type SheetBackdropProps = MotionDivProps & CommonProps;
54
55
  type SheetDragIndicatorProps = HTMLAttributes<HTMLDivElement> & CommonProps;
55
56
  type SheetStateInfo = {
56
57
  scrollPosition?: 'top' | 'bottom' | 'middle';
package/dist/index.js CHANGED
@@ -221,14 +221,14 @@ var SheetBackdrop = React4.forwardRef(
221
221
  return /* @__PURE__ */ React4__default.default.createElement(
222
222
  Comp,
223
223
  {
224
- ...rest,
225
- ref,
226
- className: `react-modal-sheet-backdrop ${className}`,
227
- style: backdropStyle,
228
224
  initial: { opacity: 0 },
229
225
  animate: { opacity: 1 },
230
226
  exit: { opacity: 0 },
231
- transition: { duration: 1 }
227
+ transition: { duration: 1 },
228
+ ...rest,
229
+ ref,
230
+ className: `react-modal-sheet-backdrop ${className}`,
231
+ style: backdropStyle
232
232
  }
233
233
  );
234
234
  }