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 +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/SheetBackdrop.tsx +4 -5
- package/src/types.tsx +4 -5
package/dist/index.d.mts
CHANGED
|
@@ -6,7 +6,8 @@ type CommonProps = {
|
|
|
6
6
|
className?: string;
|
|
7
7
|
unstyled?: boolean;
|
|
8
8
|
};
|
|
9
|
-
type
|
|
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 =
|
|
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
|
|
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 =
|
|
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
|
}
|