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