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