@wikicasa-dev/components 2.4.1-alpha.7 → 2.4.1-alpha.8
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/Swiper/autoplay.js +1 -1
- package/dist/Swiper/controller.js +1 -1
- package/dist/Swiper/keyboard.js +1 -1
- package/dist/Swiper/thumbs.js +1 -1
- package/dist/packages/components/lib/UIKit/BaseModal.vue.js +41 -46
- package/package.json +1 -1
- /package/dist/assets/{swiper-controller.css → swiper-keyboard.css} +0 -0
package/dist/Swiper/autoplay.js
CHANGED
package/dist/Swiper/keyboard.js
CHANGED
package/dist/Swiper/thumbs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { CloseIcon as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as $, mergeModels as w, useModel as H, useTemplateRef as C, shallowRef as p, onUnmounted as O, createBlock as F, openBlock as n, Teleport as A, createVNode as x, Transition as K, withCtx as N, createElementBlock as m, createCommentVNode as f, normalizeClass as i, createElementVNode as d, renderSlot as r, withModifiers as U, unref as V } from "vue";
|
|
2
|
+
import { CloseIcon as P } from "@wikicasa-dev/svg-icons";
|
|
3
|
+
const R = ["id", "data-cy"], S = ["innerHTML"], q = /* @__PURE__ */ $({
|
|
4
4
|
__name: "BaseModal",
|
|
5
5
|
props: /* @__PURE__ */ w({
|
|
6
6
|
id: { default: "base-bt-modal" },
|
|
@@ -26,46 +26,41 @@ const G = ["id", "data-cy"], P = ["innerHTML"], j = /* @__PURE__ */ z({
|
|
|
26
26
|
showModalModifiers: {}
|
|
27
27
|
}),
|
|
28
28
|
emits: /* @__PURE__ */ w(["closed", "opened", "dialogClick"], ["update:showModal"]),
|
|
29
|
-
setup(e, { emit:
|
|
30
|
-
const c =
|
|
29
|
+
setup(e, { emit: g }) {
|
|
30
|
+
const c = g, o = H(e, "showModal"), b = C("backdrop"), s = C("modalDialog"), l = p(!1), k = p(!1), v = ({ key: t }) => {
|
|
31
31
|
t === "Escape" && a();
|
|
32
|
-
},
|
|
33
|
-
document?.body.addEventListener("keydown",
|
|
32
|
+
}, M = () => {
|
|
33
|
+
document?.body.addEventListener("keydown", v);
|
|
34
34
|
}, h = () => {
|
|
35
|
-
document?.body.removeEventListener("keydown",
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
showModal: o.value,
|
|
39
|
-
timestamp: Date.now()
|
|
40
|
-
});
|
|
41
|
-
const g = () => {
|
|
42
|
-
console.log("DEBUG:onBeforeEnter called", {
|
|
35
|
+
document?.body.removeEventListener("keydown", v);
|
|
36
|
+
}, B = () => {
|
|
37
|
+
k.value || (console.log("DEBUG:onBeforeEnter called", {
|
|
43
38
|
timestamp: Date.now(),
|
|
44
39
|
showModal: o.value,
|
|
45
40
|
stack: new Error().stack
|
|
46
|
-
}),
|
|
41
|
+
}), M(), document?.body.classList.add(
|
|
47
42
|
"sm:uikit-pr-15px",
|
|
48
43
|
"sm:uikit-mr-0",
|
|
49
44
|
"uikit-overflow-hidden"
|
|
50
|
-
);
|
|
51
|
-
},
|
|
45
|
+
), k.value = !0);
|
|
46
|
+
}, E = () => {
|
|
52
47
|
c("opened"), e.autoClose !== void 0 && setTimeout(() => {
|
|
53
48
|
a();
|
|
54
49
|
}, e.autoClose);
|
|
55
|
-
},
|
|
50
|
+
}, I = () => {
|
|
56
51
|
h(), document?.body.classList.remove(
|
|
57
52
|
"sm:uikit-pr-15px",
|
|
58
53
|
"sm:uikit-mr-0",
|
|
59
54
|
"uikit-overflow-hidden"
|
|
60
|
-
), c("closed");
|
|
55
|
+
), k.value = !1, c("closed");
|
|
61
56
|
}, a = () => {
|
|
62
57
|
o.value = !1;
|
|
63
|
-
},
|
|
58
|
+
}, L = (t) => {
|
|
64
59
|
s.value && s.value.contains(t.target) && (l.value = !0);
|
|
65
|
-
},
|
|
60
|
+
}, z = (t) => {
|
|
66
61
|
s.value && s.value.contains(t.target) && (l.value = !1);
|
|
67
|
-
},
|
|
68
|
-
if (!(t.target !==
|
|
62
|
+
}, T = async (t) => {
|
|
63
|
+
if (!(t.target !== b.value && b.value?.contains(t.target)) && e.closeOnClickOut) {
|
|
69
64
|
if (l.value) {
|
|
70
65
|
l.value = !1;
|
|
71
66
|
return;
|
|
@@ -73,7 +68,7 @@ const G = ["id", "data-cy"], P = ["innerHTML"], j = /* @__PURE__ */ z({
|
|
|
73
68
|
a();
|
|
74
69
|
}
|
|
75
70
|
};
|
|
76
|
-
|
|
71
|
+
O(() => {
|
|
77
72
|
h(), document?.body.classList.remove(
|
|
78
73
|
"sm:uikit-pr-15px",
|
|
79
74
|
"sm:uikit-mr-0",
|
|
@@ -83,17 +78,17 @@ const G = ["id", "data-cy"], P = ["innerHTML"], j = /* @__PURE__ */ z({
|
|
|
83
78
|
const D = (t) => {
|
|
84
79
|
s.value === t.target && t.stopPropagation();
|
|
85
80
|
};
|
|
86
|
-
return (t, u) => (n(),
|
|
87
|
-
|
|
81
|
+
return (t, u) => (n(), F(A, { to: "body" }, [
|
|
82
|
+
x(K, {
|
|
88
83
|
appear: e.appear,
|
|
89
84
|
name: "modal-transition",
|
|
90
85
|
duration: { enter: 500, leave: 250 },
|
|
91
|
-
onBeforeEnter:
|
|
92
|
-
onAfterEnter:
|
|
93
|
-
onAfterLeave:
|
|
86
|
+
onBeforeEnter: B,
|
|
87
|
+
onAfterEnter: E,
|
|
88
|
+
onAfterLeave: I
|
|
94
89
|
}, {
|
|
95
|
-
default:
|
|
96
|
-
o.value ? (n(),
|
|
90
|
+
default: N(() => [
|
|
91
|
+
o.value ? (n(), m("div", {
|
|
97
92
|
key: 0,
|
|
98
93
|
ref: "backdrop",
|
|
99
94
|
class: i(["bbt-backdrop uikit-fixed uikit-left-0 uikit-top-0 uikit-z-50 uikit-h-full uikit-w-full", [
|
|
@@ -104,9 +99,9 @@ const G = ["id", "data-cy"], P = ["innerHTML"], j = /* @__PURE__ */ z({
|
|
|
104
99
|
{ "uikit-bg-transparent": !o.value },
|
|
105
100
|
{ "sm:uikit-pt-[30px]": !e.centered }
|
|
106
101
|
]]),
|
|
107
|
-
onClick:
|
|
108
|
-
onMousedown:
|
|
109
|
-
onMouseup:
|
|
102
|
+
onClick: T,
|
|
103
|
+
onMousedown: L,
|
|
104
|
+
onMouseup: z
|
|
110
105
|
}, [
|
|
111
106
|
d("dialog", {
|
|
112
107
|
id: e.id,
|
|
@@ -122,32 +117,32 @@ const G = ["id", "data-cy"], P = ["innerHTML"], j = /* @__PURE__ */ z({
|
|
|
122
117
|
e.fullHeight ? "uikit-h-[95%]" : "uikit-h-auto"
|
|
123
118
|
]]),
|
|
124
119
|
tabindex: "-1",
|
|
125
|
-
onClick: u[1] || (u[1] = (
|
|
120
|
+
onClick: u[1] || (u[1] = (y) => c("dialogClick", y)),
|
|
126
121
|
onFocusin: D
|
|
127
122
|
}, [
|
|
128
123
|
d("div", {
|
|
129
124
|
class: i(["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]])
|
|
130
125
|
}, [
|
|
131
|
-
e.withCloseIcon ? (n(),
|
|
126
|
+
e.withCloseIcon ? (n(), m("button", {
|
|
132
127
|
key: 0,
|
|
133
128
|
id: "close-icon-btn",
|
|
134
129
|
"data-cy": "bbt-default-close-icon-btn",
|
|
135
130
|
class: i(["uikit-absolute uikit-right-15px uikit-top-15px uikit-z-10 uikit-bg-transparent uikit-p-5px", e.closeIconBtnClasses]),
|
|
136
131
|
type: "button",
|
|
137
132
|
"aria-label": "Close",
|
|
138
|
-
onClick: u[0] || (u[0] =
|
|
133
|
+
onClick: u[0] || (u[0] = U((y) => o.value = !1, ["prevent", "stop"]))
|
|
139
134
|
}, [
|
|
140
|
-
|
|
135
|
+
x(V(P), {
|
|
141
136
|
class: i(["bbt-close-icon uikit-box-border", e.closeIcon?.classes]),
|
|
142
137
|
width: e.closeIcon?.size || 20,
|
|
143
138
|
height: e.closeIcon?.size || 20
|
|
144
139
|
}, null, 8, ["class", "width", "height"])
|
|
145
|
-
], 2)) :
|
|
140
|
+
], 2)) : f("", !0),
|
|
146
141
|
r(t.$slots, "header", { closeModal: a }, () => [
|
|
147
142
|
d("span", {
|
|
148
143
|
class: i(["uikit-w-auto uikit-text-18 uikit-font-semibold sm:uikit-text-22", e.titleClasses]),
|
|
149
144
|
innerHTML: e.headerTitle
|
|
150
|
-
}, null, 10,
|
|
145
|
+
}, null, 10, S)
|
|
151
146
|
])
|
|
152
147
|
], 2),
|
|
153
148
|
d("div", {
|
|
@@ -155,15 +150,15 @@ const G = ["id", "data-cy"], P = ["innerHTML"], j = /* @__PURE__ */ z({
|
|
|
155
150
|
}, [
|
|
156
151
|
r(t.$slots, "body", { closeModal: a })
|
|
157
152
|
], 2),
|
|
158
|
-
t.$slots.footer ? (n(),
|
|
153
|
+
t.$slots.footer ? (n(), m("div", {
|
|
159
154
|
key: 0,
|
|
160
155
|
class: i(["uikit-bbt-footer uikit-sticky uikit-bottom-0 uikit-border-0 uikit-bg-white uikit-px-4 uikit-py-15px sm:uikit-px-6", e.customModalFooterClasses])
|
|
161
156
|
}, [
|
|
162
157
|
r(t.$slots, "footer", { closeModal: a })
|
|
163
|
-
], 2)) :
|
|
158
|
+
], 2)) : f("", !0),
|
|
164
159
|
r(t.$slots, "fixed-bottom")
|
|
165
|
-
], 42,
|
|
166
|
-
], 34)) :
|
|
160
|
+
], 42, R)
|
|
161
|
+
], 34)) : f("", !0)
|
|
167
162
|
]),
|
|
168
163
|
_: 3
|
|
169
164
|
}, 8, ["appear"])
|
|
@@ -171,5 +166,5 @@ const G = ["id", "data-cy"], P = ["innerHTML"], j = /* @__PURE__ */ z({
|
|
|
171
166
|
}
|
|
172
167
|
});
|
|
173
168
|
export {
|
|
174
|
-
|
|
169
|
+
q as default
|
|
175
170
|
};
|
package/package.json
CHANGED
|
File without changes
|