@addsign/moje-agenda-shared-lib 1.0.50 → 1.0.51
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.
|
@@ -33,7 +33,7 @@ function ModalDialog({
|
|
|
33
33
|
{
|
|
34
34
|
ref,
|
|
35
35
|
className: `w-full max-w-[80vw] bg-white rounded-lg shadow-lg flex flex-col justify-start items-center
|
|
36
|
-
relative gap-5 p-5
|
|
36
|
+
relative gap-5 p-5 ` + (classNameWrapper ? ` ${classNameWrapper}` : ""),
|
|
37
37
|
style: { maxHeight: "90vh" },
|
|
38
38
|
children: [
|
|
39
39
|
/* @__PURE__ */ jsx(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalDialog.js","sources":["../../lib/components/ModalDialog.tsx"],"sourcesContent":["import { createRef, useEffect } from \"react\";\nimport { IoCloseOutline } from \"react-icons/io5\";\nimport { useClickAway } from \"react-use\";\n\nexport interface IModalDialogProps {\n cancelAction: () => void;\n children?: React.ReactNode;\n classNameWrapper?: string;\n closeOnCLickAway?: boolean;\n}\n\nexport function ModalDialog({\n cancelAction,\n classNameWrapper,\n children,\n closeOnCLickAway = true,\n}: IModalDialogProps) {\n const ref = createRef<HTMLDivElement>();\n\n useClickAway(ref, () => {\n closeOnCLickAway ? cancelAction() : null;\n });\n\n useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === \"Escape\") {\n cancelAction();\n }\n };\n window.addEventListener(\"keydown\", handleKeyDown);\n return () => {\n window.removeEventListener(\"keydown\", handleKeyDown);\n };\n }, [cancelAction]);\n\n return (\n <div\n className=\"fixed inset-0 bg-black bg-opacity-25 flex items-center justify-center p-4\"\n style={{ zIndex: 50 }}\n >\n <div\n ref={ref}\n className={\n `w-full max-w-[80vw] bg-white rounded-lg shadow-lg flex flex-col justify-start items-center \n relative gap-5 p-5
|
|
1
|
+
{"version":3,"file":"ModalDialog.js","sources":["../../lib/components/ModalDialog.tsx"],"sourcesContent":["import { createRef, useEffect } from \"react\";\nimport { IoCloseOutline } from \"react-icons/io5\";\nimport { useClickAway } from \"react-use\";\n\nexport interface IModalDialogProps {\n cancelAction: () => void;\n children?: React.ReactNode;\n classNameWrapper?: string;\n closeOnCLickAway?: boolean;\n}\n\nexport function ModalDialog({\n cancelAction,\n classNameWrapper,\n children,\n closeOnCLickAway = true,\n}: IModalDialogProps) {\n const ref = createRef<HTMLDivElement>();\n\n useClickAway(ref, () => {\n closeOnCLickAway ? cancelAction() : null;\n });\n\n useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === \"Escape\") {\n cancelAction();\n }\n };\n window.addEventListener(\"keydown\", handleKeyDown);\n return () => {\n window.removeEventListener(\"keydown\", handleKeyDown);\n };\n }, [cancelAction]);\n\n return (\n <div\n className=\"fixed inset-0 bg-black bg-opacity-25 flex items-center justify-center p-4\"\n style={{ zIndex: 50 }}\n >\n <div\n ref={ref}\n className={\n `w-full max-w-[80vw] bg-white rounded-lg shadow-lg flex flex-col justify-start items-center \n relative gap-5 p-5 ` +\n (classNameWrapper ? ` ${classNameWrapper}` : \"\")\n }\n style={{ maxHeight: \"90vh\" }}\n >\n <div\n className=\"w-11 h-11 p-2 right-0 top-[16px] absolute rounded-full justify-center items-center inline-flex mr-4 hover:bg-gray-100 cursor-pointer\"\n onClick={cancelAction}\n >\n <IoCloseOutline className=\"w-6 h-6 relative text-gray-400\" />\n </div>\n\n {children && <div className=\"text-left w-full\">{children}</div>}\n </div>\n </div>\n );\n}\n\nexport default ModalDialog;\n"],"names":[],"mappings":";;;;AAWO,SAAS,YAAY;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA,mBAAmB;AACrB,GAAsB;AACpB,QAAM,MAAM;AAEZ,eAAa,KAAK,MAAM;AACtB,uBAAmB,aAAiB,IAAA;AAAA,EAAA,CACrC;AAED,YAAU,MAAM;AACR,UAAA,gBAAgB,CAAC,UAAyB;AAC1C,UAAA,MAAM,QAAQ,UAAU;AACb;MACf;AAAA,IAAA;AAEK,WAAA,iBAAiB,WAAW,aAAa;AAChD,WAAO,MAAM;AACJ,aAAA,oBAAoB,WAAW,aAAa;AAAA,IAAA;AAAA,EACrD,GACC,CAAC,YAAY,CAAC;AAGf,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACV,OAAO,EAAE,QAAQ,GAAG;AAAA,MAEpB,UAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC;AAAA,UACA,WACE;AAAA,oCAEC,mBAAmB,IAAI,gBAAgB,KAAK;AAAA,UAE/C,OAAO,EAAE,WAAW,OAAO;AAAA,UAE3B,UAAA;AAAA,YAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAU;AAAA,gBACV,SAAS;AAAA,gBAET,UAAA,oBAAC,gBAAe,EAAA,WAAU,iCAAiC,CAAA;AAAA,cAAA;AAAA,YAC7D;AAAA,YAEC,YAAY,oBAAC,OAAI,EAAA,WAAU,oBAAoB,UAAS;AAAA,UAAA;AAAA,QAAA;AAAA,MAC3D;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|