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