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