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