Socket
Socket
Sign inDemoInstall

@chakra-ui/modal

Package Overview
Dependencies
14
Maintainers
2
Versions
511
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.2.11 to 2.2.12

dist/chunk-6TYU4DP7.mjs

13

dist/alert-dialog.js

@@ -71,3 +71,3 @@ "use strict";

};
var manager = new ModalManager();
var modalManager = new ModalManager();
function useModalManager(ref, isOpen) {

@@ -80,7 +80,7 @@ const [index, setIndex] = (0, import_react.useState)(0);

if (isOpen) {
const index2 = manager.add(node);
const index2 = modalManager.add(node);
setIndex(index2);
}
return () => {
manager.remove(node);
modalManager.remove(node);
setIndex(0);

@@ -113,3 +113,3 @@ };

useAriaHidden(dialogRef, isOpen && useInert);
useModalManager(dialogRef, isOpen);
const index = useModalManager(dialogRef, isOpen);
const mouseDownTarget = (0, import_react2.useRef)(null);

@@ -155,3 +155,3 @@ const onMouseDown = (0, import_react2.useCallback)((event) => {

return;
if (!manager.isTopModal(dialogRef.current))
if (!modalManager.isTopModal(dialogRef.current))
return;

@@ -185,3 +185,4 @@ if (closeOnOverlayClick) {

getDialogProps,
getDialogContainerProps
getDialogContainerProps,
index
};

@@ -188,0 +189,0 @@ }

@@ -71,3 +71,3 @@ "use strict";

};
var manager = new ModalManager();
var modalManager = new ModalManager();
function useModalManager(ref, isOpen) {

@@ -80,7 +80,7 @@ const [index, setIndex] = (0, import_react.useState)(0);

if (isOpen) {
const index2 = manager.add(node);
const index2 = modalManager.add(node);
setIndex(index2);
}
return () => {
manager.remove(node);
modalManager.remove(node);
setIndex(0);

@@ -113,3 +113,3 @@ };

useAriaHidden(dialogRef, isOpen && useInert);
useModalManager(dialogRef, isOpen);
const index = useModalManager(dialogRef, isOpen);
const mouseDownTarget = (0, import_react2.useRef)(null);

@@ -155,3 +155,3 @@ const onMouseDown = (0, import_react2.useCallback)((event) => {

return;
if (!manager.isTopModal(dialogRef.current))
if (!modalManager.isTopModal(dialogRef.current))
return;

@@ -185,3 +185,4 @@ if (closeOnOverlayClick) {

getDialogProps,
getDialogContainerProps
getDialogContainerProps,
index
};

@@ -188,0 +189,0 @@ }

@@ -72,3 +72,3 @@ "use strict";

};
var manager = new ModalManager();
var modalManager = new ModalManager();
function useModalManager(ref, isOpen) {

@@ -81,7 +81,7 @@ const [index, setIndex] = (0, import_react.useState)(0);

if (isOpen) {
const index2 = manager.add(node);
const index2 = modalManager.add(node);
setIndex(index2);
}
return () => {
manager.remove(node);
modalManager.remove(node);
setIndex(0);

@@ -114,3 +114,3 @@ };

useAriaHidden(dialogRef, isOpen && useInert);
useModalManager(dialogRef, isOpen);
const index = useModalManager(dialogRef, isOpen);
const mouseDownTarget = (0, import_react2.useRef)(null);

@@ -156,3 +156,3 @@ const onMouseDown = (0, import_react2.useCallback)((event) => {

return;
if (!manager.isTopModal(dialogRef.current))
if (!modalManager.isTopModal(dialogRef.current))
return;

@@ -186,3 +186,4 @@ if (closeOnOverlayClick) {

getDialogProps,
getDialogContainerProps
getDialogContainerProps,
index
};

@@ -189,0 +190,0 @@ }

@@ -13,2 +13,3 @@ export { AlertDialog, AlertDialogContent, AlertDialogProps } from './alert-dialog.js';

export { UseModalProps, UseModalReturn, useModal } from './use-modal.js';
export { useModalManager } from './modal-manager.js';
import '@chakra-ui/system';

@@ -15,0 +16,0 @@ import 'react';

@@ -54,2 +54,3 @@ "use strict";

useModalContext: () => useModalContext,
useModalManager: () => useModalManager,
useModalStyles: () => useModalStyles

@@ -94,3 +95,3 @@ });

};
var manager = new ModalManager();
var modalManager = new ModalManager();
function useModalManager(ref, isOpen) {

@@ -103,7 +104,7 @@ const [index, setIndex] = (0, import_react.useState)(0);

if (isOpen) {
const index2 = manager.add(node);
const index2 = modalManager.add(node);
setIndex(index2);
}
return () => {
manager.remove(node);
modalManager.remove(node);
setIndex(0);

@@ -136,3 +137,3 @@ };

useAriaHidden(dialogRef, isOpen && useInert);
useModalManager(dialogRef, isOpen);
const index = useModalManager(dialogRef, isOpen);
const mouseDownTarget = (0, import_react2.useRef)(null);

@@ -178,3 +179,3 @@ const onMouseDown = (0, import_react2.useCallback)((event) => {

return;
if (!manager.isTopModal(dialogRef.current))
if (!modalManager.isTopModal(dialogRef.current))
return;

@@ -208,3 +209,4 @@ if (closeOnOverlayClick) {

getDialogProps,
getDialogContainerProps
getDialogContainerProps,
index
};

@@ -722,3 +724,4 @@ }

useModalContext,
useModalManager,
useModalStyles
});

@@ -67,3 +67,3 @@ "use strict";

};
var manager = new ModalManager();
var modalManager = new ModalManager();
function useModalManager(ref, isOpen) {

@@ -76,7 +76,7 @@ const [index, setIndex] = (0, import_react.useState)(0);

if (isOpen) {
const index2 = manager.add(node);
const index2 = modalManager.add(node);
setIndex(index2);
}
return () => {
manager.remove(node);
modalManager.remove(node);
setIndex(0);

@@ -109,3 +109,3 @@ };

useAriaHidden(dialogRef, isOpen && useInert);
useModalManager(dialogRef, isOpen);
const index = useModalManager(dialogRef, isOpen);
const mouseDownTarget = (0, import_react2.useRef)(null);

@@ -151,3 +151,3 @@ const onMouseDown = (0, import_react2.useCallback)((event) => {

return;
if (!manager.isTopModal(dialogRef.current))
if (!modalManager.isTopModal(dialogRef.current))
return;

@@ -181,3 +181,4 @@ if (closeOnOverlayClick) {

getDialogProps,
getDialogContainerProps
getDialogContainerProps,
index
};

@@ -184,0 +185,0 @@ }

@@ -67,3 +67,3 @@ "use strict";

};
var manager = new ModalManager();
var modalManager = new ModalManager();
function useModalManager(ref, isOpen) {

@@ -76,7 +76,7 @@ const [index, setIndex] = (0, import_react.useState)(0);

if (isOpen) {
const index2 = manager.add(node);
const index2 = modalManager.add(node);
setIndex(index2);
}
return () => {
manager.remove(node);
modalManager.remove(node);
setIndex(0);

@@ -109,3 +109,3 @@ };

useAriaHidden(dialogRef, isOpen && useInert);
useModalManager(dialogRef, isOpen);
const index = useModalManager(dialogRef, isOpen);
const mouseDownTarget = (0, import_react2.useRef)(null);

@@ -151,3 +151,3 @@ const onMouseDown = (0, import_react2.useCallback)((event) => {

return;
if (!manager.isTopModal(dialogRef.current))
if (!modalManager.isTopModal(dialogRef.current))
return;

@@ -181,3 +181,4 @@ if (closeOnOverlayClick) {

getDialogProps,
getDialogContainerProps
getDialogContainerProps,
index
};

@@ -184,0 +185,0 @@ }

@@ -66,3 +66,3 @@ "use strict";

};
var manager = new ModalManager();
var modalManager = new ModalManager();
function useModalManager(ref, isOpen) {

@@ -75,7 +75,7 @@ const [index, setIndex] = (0, import_react.useState)(0);

if (isOpen) {
const index2 = manager.add(node);
const index2 = modalManager.add(node);
setIndex(index2);
}
return () => {
manager.remove(node);
modalManager.remove(node);
setIndex(0);

@@ -108,3 +108,3 @@ };

useAriaHidden(dialogRef, isOpen && useInert);
useModalManager(dialogRef, isOpen);
const index = useModalManager(dialogRef, isOpen);
const mouseDownTarget = (0, import_react2.useRef)(null);

@@ -150,3 +150,3 @@ const onMouseDown = (0, import_react2.useCallback)((event) => {

return;
if (!manager.isTopModal(dialogRef.current))
if (!modalManager.isTopModal(dialogRef.current))
return;

@@ -180,3 +180,4 @@ if (closeOnOverlayClick) {

getDialogProps,
getDialogContainerProps
getDialogContainerProps,
index
};

@@ -183,0 +184,0 @@ }

@@ -68,3 +68,3 @@ "use strict";

};
var manager = new ModalManager();
var modalManager = new ModalManager();
function useModalManager(ref, isOpen) {

@@ -77,7 +77,7 @@ const [index, setIndex] = (0, import_react.useState)(0);

if (isOpen) {
const index2 = manager.add(node);
const index2 = modalManager.add(node);
setIndex(index2);
}
return () => {
manager.remove(node);
modalManager.remove(node);
setIndex(0);

@@ -110,3 +110,3 @@ };

useAriaHidden(dialogRef, isOpen && useInert);
useModalManager(dialogRef, isOpen);
const index = useModalManager(dialogRef, isOpen);
const mouseDownTarget = (0, import_react2.useRef)(null);

@@ -152,3 +152,3 @@ const onMouseDown = (0, import_react2.useCallback)((event) => {

return;
if (!manager.isTopModal(dialogRef.current))
if (!modalManager.isTopModal(dialogRef.current))
return;

@@ -182,3 +182,4 @@ if (closeOnOverlayClick) {

getDialogProps,
getDialogContainerProps
getDialogContainerProps,
index
};

@@ -185,0 +186,0 @@ }

@@ -66,3 +66,3 @@ "use strict";

};
var manager = new ModalManager();
var modalManager = new ModalManager();
function useModalManager(ref, isOpen) {

@@ -75,7 +75,7 @@ const [index, setIndex] = (0, import_react.useState)(0);

if (isOpen) {
const index2 = manager.add(node);
const index2 = modalManager.add(node);
setIndex(index2);
}
return () => {
manager.remove(node);
modalManager.remove(node);
setIndex(0);

@@ -108,3 +108,3 @@ };

useAriaHidden(dialogRef, isOpen && useInert);
useModalManager(dialogRef, isOpen);
const index = useModalManager(dialogRef, isOpen);
const mouseDownTarget = (0, import_react2.useRef)(null);

@@ -150,3 +150,3 @@ const onMouseDown = (0, import_react2.useCallback)((event) => {

return;
if (!manager.isTopModal(dialogRef.current))
if (!modalManager.isTopModal(dialogRef.current))
return;

@@ -180,3 +180,4 @@ if (closeOnOverlayClick) {

getDialogProps,
getDialogContainerProps
getDialogContainerProps,
index
};

@@ -183,0 +184,0 @@ }

@@ -67,3 +67,3 @@ "use strict";

};
var manager = new ModalManager();
var modalManager = new ModalManager();
function useModalManager(ref, isOpen) {

@@ -76,7 +76,7 @@ const [index, setIndex] = (0, import_react.useState)(0);

if (isOpen) {
const index2 = manager.add(node);
const index2 = modalManager.add(node);
setIndex(index2);
}
return () => {
manager.remove(node);
modalManager.remove(node);
setIndex(0);

@@ -109,3 +109,3 @@ };

useAriaHidden(dialogRef, isOpen && useInert);
useModalManager(dialogRef, isOpen);
const index = useModalManager(dialogRef, isOpen);
const mouseDownTarget = (0, import_react2.useRef)(null);

@@ -151,3 +151,3 @@ const onMouseDown = (0, import_react2.useCallback)((event) => {

return;
if (!manager.isTopModal(dialogRef.current))
if (!modalManager.isTopModal(dialogRef.current))
return;

@@ -181,3 +181,4 @@ if (closeOnOverlayClick) {

getDialogProps,
getDialogContainerProps
getDialogContainerProps,
index
};

@@ -184,0 +185,0 @@ }

@@ -14,5 +14,5 @@ import { RefObject } from 'react';

}
declare const manager: ModalManager;
declare const modalManager: ModalManager;
declare function useModalManager(ref: RefObject<HTMLElement>, isOpen?: boolean): number;
export { manager, useModalManager };
export { modalManager, useModalManager };

@@ -28,3 +28,3 @@ "use strict";

__export(modal_manager_exports, {
manager: () => manager,
modalManager: () => modalManager,
useModalManager: () => useModalManager

@@ -52,3 +52,3 @@ });

};
var manager = new ModalManager();
var modalManager = new ModalManager();
function useModalManager(ref, isOpen) {

@@ -61,7 +61,7 @@ const [index, setIndex] = (0, import_react.useState)(0);

if (isOpen) {
const index2 = manager.add(node);
const index2 = modalManager.add(node);
setIndex(index2);
}
return () => {
manager.remove(node);
modalManager.remove(node);
setIndex(0);

@@ -74,4 +74,4 @@ };

0 && (module.exports = {
manager,
modalManager,
useModalManager
});

@@ -68,3 +68,3 @@ "use strict";

};
var manager = new ModalManager();
var modalManager = new ModalManager();
function useModalManager(ref, isOpen) {

@@ -77,7 +77,7 @@ const [index, setIndex] = (0, import_react.useState)(0);

if (isOpen) {
const index2 = manager.add(node);
const index2 = modalManager.add(node);
setIndex(index2);
}
return () => {
manager.remove(node);
modalManager.remove(node);
setIndex(0);

@@ -110,3 +110,3 @@ };

useAriaHidden(dialogRef, isOpen && useInert);
useModalManager(dialogRef, isOpen);
const index = useModalManager(dialogRef, isOpen);
const mouseDownTarget = (0, import_react2.useRef)(null);

@@ -152,3 +152,3 @@ const onMouseDown = (0, import_react2.useCallback)((event) => {

return;
if (!manager.isTopModal(dialogRef.current))
if (!modalManager.isTopModal(dialogRef.current))
return;

@@ -182,3 +182,4 @@ if (closeOnOverlayClick) {

getDialogProps,
getDialogContainerProps
getDialogContainerProps,
index
};

@@ -185,0 +186,0 @@ }

@@ -65,3 +65,3 @@ "use strict";

};
var manager = new ModalManager();
var modalManager = new ModalManager();
function useModalManager(ref, isOpen) {

@@ -74,7 +74,7 @@ const [index, setIndex] = (0, import_react.useState)(0);

if (isOpen) {
const index2 = manager.add(node);
const index2 = modalManager.add(node);
setIndex(index2);
}
return () => {
manager.remove(node);
modalManager.remove(node);
setIndex(0);

@@ -107,3 +107,3 @@ };

useAriaHidden(dialogRef, isOpen && useInert);
useModalManager(dialogRef, isOpen);
const index = useModalManager(dialogRef, isOpen);
const mouseDownTarget = (0, import_react2.useRef)(null);

@@ -149,3 +149,3 @@ const onMouseDown = (0, import_react2.useCallback)((event) => {

return;
if (!manager.isTopModal(dialogRef.current))
if (!modalManager.isTopModal(dialogRef.current))
return;

@@ -179,3 +179,4 @@ if (closeOnOverlayClick) {

getDialogProps,
getDialogContainerProps
getDialogContainerProps,
index
};

@@ -182,0 +183,0 @@ }

@@ -62,2 +62,3 @@ import * as react from 'react';

getDialogContainerProps: PropGetter;
index: number;
};

@@ -64,0 +65,0 @@ type UseModalReturn = ReturnType<typeof useModal>;

@@ -57,3 +57,3 @@ "use strict";

};
var manager = new ModalManager();
var modalManager = new ModalManager();
function useModalManager(ref, isOpen) {

@@ -66,7 +66,7 @@ const [index, setIndex] = (0, import_react.useState)(0);

if (isOpen) {
const index2 = manager.add(node);
const index2 = modalManager.add(node);
setIndex(index2);
}
return () => {
manager.remove(node);
modalManager.remove(node);
setIndex(0);

@@ -99,3 +99,3 @@ };

useAriaHidden(dialogRef, isOpen && useInert);
useModalManager(dialogRef, isOpen);
const index = useModalManager(dialogRef, isOpen);
const mouseDownTarget = (0, import_react2.useRef)(null);

@@ -141,3 +141,3 @@ const onMouseDown = (0, import_react2.useCallback)((event) => {

return;
if (!manager.isTopModal(dialogRef.current))
if (!modalManager.isTopModal(dialogRef.current))
return;

@@ -171,3 +171,4 @@ if (closeOnOverlayClick) {

getDialogProps,
getDialogContainerProps
getDialogContainerProps,
index
};

@@ -174,0 +175,0 @@ }

{
"name": "@chakra-ui/modal",
"version": "2.2.11",
"version": "2.2.12",
"description": "An accessible dialog (modal) component for React & Chakra UI",

@@ -43,3 +43,3 @@ "keywords": [

"@chakra-ui/close-button": "2.0.17",
"@chakra-ui/focus-lock": "2.0.16",
"@chakra-ui/focus-lock": "2.0.17",
"@chakra-ui/portal": "2.0.16",

@@ -54,3 +54,3 @@ "@chakra-ui/react-context": "2.0.8",

"@testing-library/react-hooks": "8.0.1",
"framer-motion": "^6.2.9",
"framer-motion": "^10.12.16",
"react-lorem-component": "0.13.0",

@@ -60,4 +60,4 @@ "react": "^18.0.0",

"clean-package": "2.2.0",
"@chakra-ui/system": "2.5.5",
"@chakra-ui/hooks": "2.1.6"
"@chakra-ui/system": "2.5.8",
"@chakra-ui/hooks": "2.2.0"
},

@@ -64,0 +64,0 @@ "peerDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc