nuxt-glorious 1.1.9-3 → 1.1.9-4
Sign up to get free protection for your applications and to get access to all the features.
package/dist/module.json
CHANGED
package/package.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"version": "1.1.9-
|
2
|
+
"version": "1.1.9-4",
|
3
3
|
"name": "nuxt-glorious",
|
4
4
|
"description": "This package provides many things needed by a project, including server requests and authentication, SEO and other requirements of a project.",
|
5
5
|
"repository": "sajadhzj/nuxt-glorious",
|
@@ -1 +0,0 @@
|
|
1
|
-
export default function modal(key?: string, keepData?: {}): void;
|
@@ -1,26 +0,0 @@
|
|
1
|
-
import { GloriousStore } from "#imports";
|
2
|
-
export default function modal(key = "modal", keepData = {}) {
|
3
|
-
const addBlurBackground = (key2) => {
|
4
|
-
const backgroundBlur = document.createElement("div");
|
5
|
-
backgroundBlur.classList.add("bg-blur-modal");
|
6
|
-
const nuxt = document.getElementById("__nuxt");
|
7
|
-
nuxt.appendChild(backgroundBlur);
|
8
|
-
backgroundBlur.addEventListener("click", () => {
|
9
|
-
const componentId = document.getElementById(key2);
|
10
|
-
componentId.classList.replace("open", "close");
|
11
|
-
backgroundBlur.remove();
|
12
|
-
});
|
13
|
-
};
|
14
|
-
const modal2 = document.getElementById(key);
|
15
|
-
const gloriousStore = GloriousStore();
|
16
|
-
gloriousStore.keepData = keepData;
|
17
|
-
if (modal2?.classList.contains("close")) {
|
18
|
-
modal2?.classList.replace("close", "open");
|
19
|
-
modal2.style.bottom = `-${modal2.offsetHeight}px`;
|
20
|
-
addBlurBackground(key);
|
21
|
-
} else {
|
22
|
-
modal2?.classList.add("close");
|
23
|
-
const bgBlur = document.querySelector(".bg-blur-modal");
|
24
|
-
bgBlur?.remove();
|
25
|
-
}
|
26
|
-
}
|