@manhphi1309/dialog 0.3.1 → 0.3.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.cjs +2 -1
- package/dist/index.mjs +2 -1
- package/package.json +6 -6
package/dist/index.cjs
CHANGED
|
@@ -291,7 +291,7 @@ function ResponsiveDialog({ children, snapPoints, activeSnapPoint, setActiveSnap
|
|
|
291
291
|
if (!isControlled) setInternalOpen(newOpen);
|
|
292
292
|
onOpenChange?.(newOpen);
|
|
293
293
|
}, [isControlled, onOpenChange]);
|
|
294
|
-
const defaultSnapPoints = react.useMemo(() => [
|
|
294
|
+
const defaultSnapPoints = react.useMemo(() => [1], []);
|
|
295
295
|
if (isMobile) {
|
|
296
296
|
const drawerProps = {
|
|
297
297
|
...props,
|
|
@@ -307,6 +307,7 @@ function ResponsiveDialog({ children, snapPoints, activeSnapPoint, setActiveSnap
|
|
|
307
307
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ResponsiveDialogContext.Provider, {
|
|
308
308
|
value: { snap },
|
|
309
309
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_manhphi1309_drawer.Drawer, {
|
|
310
|
+
shouldScaleBackground: true,
|
|
310
311
|
...drawerProps,
|
|
311
312
|
children
|
|
312
313
|
})
|
package/dist/index.mjs
CHANGED
|
@@ -267,7 +267,7 @@ function ResponsiveDialog({ children, snapPoints, activeSnapPoint, setActiveSnap
|
|
|
267
267
|
if (!isControlled) setInternalOpen(newOpen);
|
|
268
268
|
onOpenChange?.(newOpen);
|
|
269
269
|
}, [isControlled, onOpenChange]);
|
|
270
|
-
const defaultSnapPoints = React.useMemo(() => [
|
|
270
|
+
const defaultSnapPoints = React.useMemo(() => [1], []);
|
|
271
271
|
if (isMobile) {
|
|
272
272
|
const drawerProps = {
|
|
273
273
|
...props,
|
|
@@ -283,6 +283,7 @@ function ResponsiveDialog({ children, snapPoints, activeSnapPoint, setActiveSnap
|
|
|
283
283
|
return /* @__PURE__ */ jsx(ResponsiveDialogContext.Provider, {
|
|
284
284
|
value: { snap },
|
|
285
285
|
children: /* @__PURE__ */ jsx(Drawer, {
|
|
286
|
+
shouldScaleBackground: true,
|
|
286
287
|
...drawerProps,
|
|
287
288
|
children
|
|
288
289
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manhphi1309/dialog",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"react-dom": "^19.0.0"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@manhphi1309/button": "
|
|
32
|
-
"@manhphi1309/drawer": "
|
|
33
|
-
"@manhphi1309/hooks": "
|
|
34
|
-
"@manhphi1309/utils": "
|
|
35
|
-
"class-variance-authority": "
|
|
31
|
+
"@manhphi1309/button": "^0.3.9",
|
|
32
|
+
"@manhphi1309/drawer": "^0.1.3",
|
|
33
|
+
"@manhphi1309/hooks": "^0.3.6",
|
|
34
|
+
"@manhphi1309/utils": "^0.3.4",
|
|
35
|
+
"class-variance-authority": "^0.7.1"
|
|
36
36
|
}
|
|
37
37
|
}
|