@wikicasa-dev/components 1.8.3 → 1.8.4
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
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as x, ref as k,
|
|
1
|
+
import { defineComponent as x, ref as k, onUnmounted as M, watch as B, nextTick as E, openBlock as c, createBlock as b, Teleport as L, createElementVNode as a, normalizeClass as o, withModifiers as y, withCtx as $, createVNode as T, unref as z, createCommentVNode as h, renderSlot as d, createElementBlock as H } from "vue";
|
|
2
2
|
import "./js.cookie.CkZE2oaL.js";
|
|
3
|
-
import { _ as
|
|
4
|
-
import { l as
|
|
3
|
+
import { _ as O } from "./BaseButton.vue_vue_type_script_setup_true_lang.dlLTK59i.js";
|
|
4
|
+
import { l as I } from "./CloseIcon._moEkaop.js";
|
|
5
5
|
import "./DownloadIcon.DHCHRETy.js";
|
|
6
|
-
import '../assets/BaseModal.css';const
|
|
6
|
+
import '../assets/BaseModal.css';const K = (l, n) => new Promise((s, u) => {
|
|
7
7
|
setTimeout(() => {
|
|
8
8
|
try {
|
|
9
9
|
l && l(), s();
|
|
@@ -11,7 +11,7 @@ import '../assets/BaseModal.css';const I = (l, n) => new Promise((s, u) => {
|
|
|
11
11
|
u();
|
|
12
12
|
}
|
|
13
13
|
}, n);
|
|
14
|
-
}),
|
|
14
|
+
}), N = ["id", "data-cy"], V = ["innerHTML"], j = /* @__PURE__ */ x({
|
|
15
15
|
__name: "BaseModal",
|
|
16
16
|
props: {
|
|
17
17
|
id: { default: "base-bt-modal" },
|
|
@@ -32,11 +32,11 @@ import '../assets/BaseModal.css';const I = (l, n) => new Promise((s, u) => {
|
|
|
32
32
|
},
|
|
33
33
|
emits: ["closed", "opened"],
|
|
34
34
|
setup(l, { emit: n }) {
|
|
35
|
-
const s = l, u = n, e = k(!1), r = k(null),
|
|
35
|
+
const s = l, u = n, e = k(!1), r = k(null), v = k(null), m = ({ key: t }) => {
|
|
36
36
|
t === "Escape" && i();
|
|
37
37
|
}, w = () => {
|
|
38
38
|
document.body.addEventListener("keydown", m);
|
|
39
|
-
},
|
|
39
|
+
}, p = () => {
|
|
40
40
|
document.body.removeEventListener("keydown", m);
|
|
41
41
|
}, C = async () => {
|
|
42
42
|
e.value = !0, w(), document.documentElement.classList.add("uikit-no-scrolling"), document.body.classList.add("uikit-no-scrolling", "sm:uikit-pr-15px"), u("opened"), s.autoClose !== void 0 && setTimeout(() => {
|
|
@@ -45,19 +45,21 @@ import '../assets/BaseModal.css';const I = (l, n) => new Promise((s, u) => {
|
|
|
45
45
|
}, g = async () => {
|
|
46
46
|
s.closeOnClickOut && await i();
|
|
47
47
|
}, i = async () => {
|
|
48
|
-
e.value = !1,
|
|
48
|
+
e.value = !1, p(), document.body.classList.remove("uikit-no-scrolling", "sm:uikit-pr-15px"), document.documentElement.classList.remove("uikit-no-scrolling"), await K(() => {
|
|
49
49
|
r.value?.classList.add("uikit-hidden"), u("closed");
|
|
50
50
|
}, 250);
|
|
51
51
|
};
|
|
52
|
-
return M(
|
|
52
|
+
return M(() => {
|
|
53
|
+
p(), document.body.classList.remove("uikit-no-scrolling", "sm:uikit-pr-15px"), document.documentElement.classList.remove("uikit-no-scrolling");
|
|
54
|
+
}), B(
|
|
53
55
|
() => s.showModal,
|
|
54
56
|
async (t) => {
|
|
55
|
-
!t && !e.value &&
|
|
57
|
+
!t && !e.value && E(() => {
|
|
56
58
|
r.value?.classList.add("uikit-hidden");
|
|
57
59
|
}), t && !e.value && await C(), !t && e.value && await i(), e.value = t;
|
|
58
60
|
},
|
|
59
61
|
{ immediate: !0 }
|
|
60
|
-
), (t,
|
|
62
|
+
), (t, f) => (c(), b(L, { to: "body" }, [
|
|
61
63
|
a("div", {
|
|
62
64
|
ref_key: "backdropEl",
|
|
63
65
|
ref: r,
|
|
@@ -75,7 +77,7 @@ import '../assets/BaseModal.css';const I = (l, n) => new Promise((s, u) => {
|
|
|
75
77
|
a("dialog", {
|
|
76
78
|
id: t.id,
|
|
77
79
|
ref_key: "modalEl",
|
|
78
|
-
ref:
|
|
80
|
+
ref: v,
|
|
79
81
|
"data-cy": t.$attrs["data-cy"],
|
|
80
82
|
class: o(["uikit-modal-dialog transition-y uikit-mx-auto uikit-block uikit-w-full uikit-overflow-y-auto uikit-overflow-x-hidden uikit-rounded uikit-border-none uikit-bg-transparent uikit-bg-white uikit-p-0 uikit-shadow-lg uikit-no-scrollbar uikit-safe-bottom max-sm:uikit-fixed max-sm:uikit-bottom-0 max-sm:uikit-max-h-[95%] max-sm:uikit-rounded-bl-none max-sm:uikit-rounded-br-none sm:uikit-h-auto", [
|
|
81
83
|
t.customModalDialogClasses,
|
|
@@ -85,13 +87,13 @@ import '../assets/BaseModal.css';const I = (l, n) => new Promise((s, u) => {
|
|
|
85
87
|
`base-${t.size}`,
|
|
86
88
|
t.fullHeight ? "uikit-h-[95%]" : "uikit-h-auto"
|
|
87
89
|
]]),
|
|
88
|
-
onClick:
|
|
90
|
+
onClick: f[0] || (f[0] = y(() => {
|
|
89
91
|
}, ["stop"]))
|
|
90
92
|
}, [
|
|
91
93
|
a("div", {
|
|
92
94
|
class: o(["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", [t.customModalHeaderClasses]])
|
|
93
95
|
}, [
|
|
94
|
-
t.withCloseIcon ? (c(),
|
|
96
|
+
t.withCloseIcon ? (c(), b(O, {
|
|
95
97
|
key: 0,
|
|
96
98
|
id: "close-icon-btn",
|
|
97
99
|
"data-cy": "bbt-default-close-icon-btn",
|
|
@@ -99,22 +101,22 @@ import '../assets/BaseModal.css';const I = (l, n) => new Promise((s, u) => {
|
|
|
99
101
|
type: "button",
|
|
100
102
|
"aria-label": "Close",
|
|
101
103
|
"is-empty": !0,
|
|
102
|
-
onClick:
|
|
104
|
+
onClick: y(i, ["prevent", "stop"])
|
|
103
105
|
}, {
|
|
104
|
-
default:
|
|
105
|
-
|
|
106
|
+
default: $(() => [
|
|
107
|
+
T(z(I), {
|
|
106
108
|
class: "bbt-close-icon uikit-box-border uikit-p-5px",
|
|
107
109
|
width: 30,
|
|
108
110
|
height: 30
|
|
109
111
|
})
|
|
110
112
|
]),
|
|
111
113
|
_: 1
|
|
112
|
-
}, 8, ["class"])) :
|
|
114
|
+
}, 8, ["class"])) : h("", !0),
|
|
113
115
|
d(t.$slots, "header", { closeModal: i }, () => [
|
|
114
116
|
a("span", {
|
|
115
117
|
class: o(["uikit-w-auto uikit-text-18 uikit-font-semibold sm:uikit-text-22", t.$attrs["title-classes"]]),
|
|
116
118
|
innerHTML: t.headerTitle
|
|
117
|
-
}, null, 10,
|
|
119
|
+
}, null, 10, V)
|
|
118
120
|
])
|
|
119
121
|
], 2),
|
|
120
122
|
a("div", {
|
|
@@ -122,14 +124,14 @@ import '../assets/BaseModal.css';const I = (l, n) => new Promise((s, u) => {
|
|
|
122
124
|
}, [
|
|
123
125
|
d(t.$slots, "body", { closeModal: i })
|
|
124
126
|
], 2),
|
|
125
|
-
t.$slots.footer ? (c(),
|
|
127
|
+
t.$slots.footer ? (c(), H("div", {
|
|
126
128
|
key: 0,
|
|
127
129
|
class: o(["uikit-bbt-footer uikit-sticky uikit-bottom-0 uikit-border-0 uikit-bg-white uikit-px-4 uikit-py-15px sm:uikit-px-6", t.customModalFooterClasses])
|
|
128
130
|
}, [
|
|
129
131
|
d(t.$slots, "footer", { closeModal: i })
|
|
130
|
-
], 2)) :
|
|
132
|
+
], 2)) : h("", !0),
|
|
131
133
|
d(t.$slots, "fixed-bottom")
|
|
132
|
-
], 10,
|
|
134
|
+
], 10, N)
|
|
133
135
|
], 2)
|
|
134
136
|
]));
|
|
135
137
|
}
|
package/dist/index.js
CHANGED
|
@@ -28,7 +28,7 @@ import { default as ee } from "./BaseTextarea.js";
|
|
|
28
28
|
import { default as re } from "./BaseToggle.js";
|
|
29
29
|
import { default as te } from "./BaseTooltip.js";
|
|
30
30
|
import { _ as fe } from "./chunks/BaseUploadFile.vue_vue_type_script_setup_true_lang.Dj2egDaT.js";
|
|
31
|
-
import { _ as me } from "./chunks/BaseModal.vue_vue_type_style_index_0_lang.
|
|
31
|
+
import { _ as me } from "./chunks/BaseModal.vue_vue_type_style_index_0_lang.DSPssuBQ.js";
|
|
32
32
|
import { default as le } from "./BaseSnackbar.js";
|
|
33
33
|
import { default as de } from "./StaticSpinner.js";
|
|
34
34
|
import { default as ue } from "./BaseShimmerLoader.js";
|