@wikicasa-dev/components 2.0.45 → 2.0.46
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/BaseModal.js
CHANGED
|
@@ -43,6 +43,7 @@ declare const __VLS_component: import('vue').DefineComponent<{
|
|
|
43
43
|
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
44
44
|
opened: () => any;
|
|
45
45
|
closed: () => any;
|
|
46
|
+
dialogClick: (args_0: MouseEvent) => any;
|
|
46
47
|
}, string, import('vue').PublicProps, Readonly<{
|
|
47
48
|
id?: string;
|
|
48
49
|
size?: "modal-sm" | "modal-md" | "modal-lg" | "modal-xxl" | "modal-full";
|
|
@@ -67,6 +68,7 @@ declare const __VLS_component: import('vue').DefineComponent<{
|
|
|
67
68
|
}> & Readonly<{
|
|
68
69
|
onOpened?: (() => any) | undefined;
|
|
69
70
|
onClosed?: (() => any) | undefined;
|
|
71
|
+
onDialogClick?: ((args_0: MouseEvent) => any) | undefined;
|
|
70
72
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
71
73
|
backdropEl: HTMLDivElement;
|
|
72
74
|
modalDialog: HTMLDialogElement;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as T, ref as d, useTemplateRef as z, onUnmounted as H, watch as O, openBlock as m, createBlock as $, Teleport as D, createElementVNode as a, normalizeClass as s, withModifiers as y, createElementBlock as h, createVNode as I, unref as K, createCommentVNode as w, renderSlot as r, nextTick as N } from "vue";
|
|
2
2
|
import "./types-B0dZ7OiV.D29wNgoj.js";
|
|
3
|
-
import { l as
|
|
3
|
+
import { l as V } from "./CloseIcon.DIkr4soH.js";
|
|
4
4
|
import "./PharmacyIcon.56ql_DYl.js";
|
|
5
|
-
import '../assets/BaseModal.css';const g = () => navigator?.userAgent.includes("Windows"),
|
|
5
|
+
import '../assets/BaseModal.css';const g = () => navigator?.userAgent.includes("Windows"), A = (o, c) => new Promise((l, t) => {
|
|
6
6
|
setTimeout(() => {
|
|
7
7
|
try {
|
|
8
|
-
o && o(),
|
|
8
|
+
o && o(), l();
|
|
9
9
|
} catch {
|
|
10
10
|
t();
|
|
11
11
|
}
|
|
12
12
|
}, c);
|
|
13
|
-
}),
|
|
13
|
+
}), F = ["id", "data-cy"], P = ["innerHTML"], j = /* @__PURE__ */ T({
|
|
14
14
|
__name: "BaseModal",
|
|
15
15
|
props: {
|
|
16
16
|
id: { default: "base-bt-modal" },
|
|
@@ -31,25 +31,25 @@ import '../assets/BaseModal.css';const g = () => navigator?.userAgent.includes("
|
|
|
31
31
|
closeIconBtnClasses: {},
|
|
32
32
|
titleClasses: {}
|
|
33
33
|
},
|
|
34
|
-
emits: ["closed", "opened"],
|
|
34
|
+
emits: ["closed", "opened", "dialogClick"],
|
|
35
35
|
setup(o, { emit: c }) {
|
|
36
|
-
const
|
|
36
|
+
const l = c, t = d(!1), f = d(null), u = z("modalDialog"), k = d(!1), n = d(!1), p = ({ key: e }) => {
|
|
37
37
|
e === "Escape" && i();
|
|
38
38
|
}, C = () => {
|
|
39
39
|
document?.body.addEventListener("keydown", p);
|
|
40
40
|
}, b = () => {
|
|
41
41
|
document?.body.removeEventListener("keydown", p);
|
|
42
42
|
}, M = async () => {
|
|
43
|
-
t.value = !0,
|
|
44
|
-
C(),
|
|
45
|
-
}),
|
|
43
|
+
t.value = !0, N(() => {
|
|
44
|
+
C(), g() ? document?.body.classList.add("uikit-no-scrolling", "sm:uikit-pr-15px") : document?.body.classList.add("uikit-no-scrolling");
|
|
45
|
+
}), l("opened"), o.autoClose !== void 0 && setTimeout(() => {
|
|
46
46
|
i();
|
|
47
47
|
}, o.autoClose);
|
|
48
48
|
}, B = (e) => {
|
|
49
49
|
u.value && u.value.contains(e.target) && (n.value = !0);
|
|
50
|
-
},
|
|
50
|
+
}, x = (e) => {
|
|
51
51
|
u.value && u.value.contains(e.target) && (n.value = !1);
|
|
52
|
-
},
|
|
52
|
+
}, L = async () => {
|
|
53
53
|
if (o.closeOnClickOut) {
|
|
54
54
|
if (n.value) {
|
|
55
55
|
n.value = !1;
|
|
@@ -58,20 +58,20 @@ import '../assets/BaseModal.css';const g = () => navigator?.userAgent.includes("
|
|
|
58
58
|
await i();
|
|
59
59
|
}
|
|
60
60
|
}, i = async () => {
|
|
61
|
-
t.value = !1, b(), document?.documentElement.classList.remove("uikit-no-scrolling"), navigator.userAgent.includes("Windows") ? document?.body.classList.remove("uikit-no-scrolling", "sm:uikit-pr-15px") : document?.body.classList.remove("uikit-no-scrolling"), await
|
|
62
|
-
f.value?.classList.add("uikit-hidden"),
|
|
61
|
+
t.value = !1, b(), document?.documentElement.classList.remove("uikit-no-scrolling"), navigator.userAgent.includes("Windows") ? document?.body.classList.remove("uikit-no-scrolling", "sm:uikit-pr-15px") : document?.body.classList.remove("uikit-no-scrolling"), await A(() => {
|
|
62
|
+
f.value?.classList.add("uikit-hidden"), l("closed");
|
|
63
63
|
}, 250);
|
|
64
64
|
};
|
|
65
|
-
return
|
|
65
|
+
return H(() => {
|
|
66
66
|
b(), document?.documentElement.classList.remove("uikit-no-scrolling"), g() ? document?.body.classList.remove("uikit-no-scrolling", "sm:uikit-pr-15px") : document?.body.classList.remove("uikit-no-scrolling");
|
|
67
|
-
}),
|
|
67
|
+
}), O(
|
|
68
68
|
() => o.showModal,
|
|
69
69
|
async (e) => {
|
|
70
70
|
!e && !t.value ? k.value = !0 : k.value = !1, e && !t.value && await M(), !e && t.value && await i(), t.value = e;
|
|
71
71
|
},
|
|
72
72
|
{ immediate: !0 }
|
|
73
|
-
), (e, v) => (m(),
|
|
74
|
-
|
|
73
|
+
), (e, v) => (m(), $(D, { to: "body" }, [
|
|
74
|
+
a("div", {
|
|
75
75
|
ref_key: "backdropEl",
|
|
76
76
|
ref: f,
|
|
77
77
|
class: s(["bbt-backdrop uikit-fixed uikit-left-0 uikit-top-0 uikit-h-full uikit-w-full", [
|
|
@@ -84,11 +84,11 @@ import '../assets/BaseModal.css';const g = () => navigator?.userAgent.includes("
|
|
|
84
84
|
{ hide: k.value }
|
|
85
85
|
]]),
|
|
86
86
|
style: { "z-index": "1062" },
|
|
87
|
-
onClick:
|
|
87
|
+
onClick: L,
|
|
88
88
|
onMousedown: B,
|
|
89
|
-
onMouseup:
|
|
89
|
+
onMouseup: x
|
|
90
90
|
}, [
|
|
91
|
-
|
|
91
|
+
a("dialog", {
|
|
92
92
|
id: e.id,
|
|
93
93
|
ref: "modalDialog",
|
|
94
94
|
"data-cy": e.dataCy,
|
|
@@ -102,10 +102,9 @@ import '../assets/BaseModal.css';const g = () => navigator?.userAgent.includes("
|
|
|
102
102
|
`base-${e.size}`,
|
|
103
103
|
e.fullHeight ? "uikit-h-[95%]" : "uikit-h-auto"
|
|
104
104
|
]]),
|
|
105
|
-
onClick: v[0] || (v[0] = y(() =>
|
|
106
|
-
}, ["stop"]))
|
|
105
|
+
onClick: v[0] || (v[0] = y((E) => l("dialogClick", E), ["stop"]))
|
|
107
106
|
}, [
|
|
108
|
-
|
|
107
|
+
a("div", {
|
|
109
108
|
class: s(["default-header uikit-sticky uikit-top-0 uikit-z-10 uikit-rounded-t uikit-border-0 uikit-bg-white uikit-px-4 uikit-pb-10px uikit-pt-20px sm:uikit-px-6", [e.customModalHeaderClasses]])
|
|
110
109
|
}, [
|
|
111
110
|
e.withCloseIcon ? (m(), h("button", {
|
|
@@ -117,20 +116,20 @@ import '../assets/BaseModal.css';const g = () => navigator?.userAgent.includes("
|
|
|
117
116
|
"aria-label": "Close",
|
|
118
117
|
onClick: y(i, ["prevent", "stop"])
|
|
119
118
|
}, [
|
|
120
|
-
|
|
119
|
+
I(K(V), {
|
|
121
120
|
class: "bbt-close-icon uikit-box-border uikit-p-5px",
|
|
122
121
|
width: 30,
|
|
123
122
|
height: 30
|
|
124
123
|
})
|
|
125
124
|
], 2)) : w("", !0),
|
|
126
125
|
r(e.$slots, "header", { closeModal: i }, () => [
|
|
127
|
-
|
|
126
|
+
a("span", {
|
|
128
127
|
class: s(["uikit-w-auto uikit-text-18 uikit-font-semibold sm:uikit-text-22", e.titleClasses]),
|
|
129
128
|
innerHTML: e.headerTitle
|
|
130
|
-
}, null, 10,
|
|
129
|
+
}, null, 10, P)
|
|
131
130
|
])
|
|
132
131
|
], 2),
|
|
133
|
-
|
|
132
|
+
a("div", {
|
|
134
133
|
class: s(["uikit-bbt-body uikit-flex-auto uikit-overflow-y-auto uikit-overflow-x-hidden uikit-px-4 uikit-pb-0 uikit-no-scrollbar sm:uikit-px-6 sm:uikit-pb-25px", [e.customModalBodyClasses]])
|
|
135
134
|
}, [
|
|
136
135
|
r(e.$slots, "body", { closeModal: i })
|
|
@@ -142,11 +141,11 @@ import '../assets/BaseModal.css';const g = () => navigator?.userAgent.includes("
|
|
|
142
141
|
r(e.$slots, "footer", { closeModal: i })
|
|
143
142
|
], 2)) : w("", !0),
|
|
144
143
|
r(e.$slots, "fixed-bottom")
|
|
145
|
-
], 10,
|
|
144
|
+
], 10, F)
|
|
146
145
|
], 34)
|
|
147
146
|
]));
|
|
148
147
|
}
|
|
149
148
|
});
|
|
150
149
|
export {
|
|
151
|
-
|
|
150
|
+
j as _
|
|
152
151
|
};
|
package/dist/index.js
CHANGED
|
@@ -27,7 +27,7 @@ import { default as Z } from "./BaseTextarea.js";
|
|
|
27
27
|
import { default as ee } from "./BaseToggle.js";
|
|
28
28
|
import { default as re } from "./BaseTooltip.js";
|
|
29
29
|
import { _ as te } from "./chunks/BaseUploadFile.vue_vue_type_script_setup_true_lang.2elmVcZt.js";
|
|
30
|
-
import { _ as fe } from "./chunks/BaseModal.vue_vue_type_style_index_0_lang.
|
|
30
|
+
import { _ as fe } from "./chunks/BaseModal.vue_vue_type_style_index_0_lang.CeKWAwpg.js";
|
|
31
31
|
import { default as me } from "./BaseSnackbar.js";
|
|
32
32
|
import { default as le } from "./StaticSpinner.js";
|
|
33
33
|
import { default as de } from "./BaseShimmerLoader.js";
|