@wikicasa-dev/components 2.4.1-alpha.4 → 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 +50 -57
- 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
|
|
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 G = ["id", "data-cy"], P = ["innerHTML"], q = /* @__PURE__ */ D({
|
|
|
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 G = ["id", "data-cy"], P = ["innerHTML"], q = /* @__PURE__ */ D({
|
|
|
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,10 +61,10 @@ const G = ["id", "data-cy"], P = ["innerHTML"], q = /* @__PURE__ */ D({
|
|
|
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",
|
|
@@ -72,33 +74,24 @@ const G = ["id", "data-cy"], P = ["innerHTML"], q = /* @__PURE__ */ D({
|
|
|
72
74
|
const z = (t) => {
|
|
73
75
|
s.value === t.target && t.stopPropagation();
|
|
74
76
|
};
|
|
75
|
-
return
|
|
76
|
-
(
|
|
77
|
-
async (t) => {
|
|
78
|
-
t !== i.value && (console.log("DEBUG:showModal => watcher", {
|
|
79
|
-
cur: t,
|
|
80
|
-
showValue: i.value
|
|
81
|
-
}), i.value = t);
|
|
82
|
-
},
|
|
83
|
-
{ immediate: !0 }
|
|
84
|
-
), (t, n) => (c(), H(O, { to: "body" }, [
|
|
85
|
-
y(F, {
|
|
77
|
+
return (t, n) => (c(), O(F, { to: "body" }, [
|
|
78
|
+
y(K, {
|
|
86
79
|
appear: e.appear,
|
|
87
80
|
name: "modal-transition",
|
|
88
81
|
duration: { enter: 500, leave: 250 },
|
|
89
82
|
onBeforeEnter: g,
|
|
90
|
-
onAfterEnter:
|
|
91
|
-
onAfterLeave:
|
|
83
|
+
onAfterEnter: M,
|
|
84
|
+
onAfterLeave: B
|
|
92
85
|
}, {
|
|
93
|
-
default:
|
|
94
|
-
|
|
86
|
+
default: N(() => [
|
|
87
|
+
S(l("div", {
|
|
95
88
|
ref: "backdrop",
|
|
96
|
-
class:
|
|
89
|
+
class: i(["bbt-backdrop uikit-fixed uikit-left-0 uikit-top-0 uikit-z-50 uikit-h-full uikit-w-full", [
|
|
97
90
|
e.customBackdropClasses,
|
|
98
91
|
{
|
|
99
|
-
"uikit-bg-w-secondary/70":
|
|
92
|
+
"uikit-bg-w-secondary/70": a.value
|
|
100
93
|
},
|
|
101
|
-
{ "uikit-bg-transparent": !
|
|
94
|
+
{ "uikit-bg-transparent": !a.value },
|
|
102
95
|
{ "sm:uikit-pt-[30px]": !e.centered }
|
|
103
96
|
]]),
|
|
104
97
|
onClick: L,
|
|
@@ -109,7 +102,7 @@ const G = ["id", "data-cy"], P = ["innerHTML"], q = /* @__PURE__ */ D({
|
|
|
109
102
|
id: e.id,
|
|
110
103
|
ref: "modalDialog",
|
|
111
104
|
"data-cy": e.dataCy,
|
|
112
|
-
class:
|
|
105
|
+
class: i(["uikit-modal-dialog uikit-mx-auto uikit-block uikit-w-full uikit-overflow-y-auto uikit-overflow-x-hidden uikit-rounded uikit-border-none uikit-bg-transparent uikit-bg-white uikit-p-0 uikit-shadow-lg uikit-no-scrollbar uikit-safe-bottom max-sm:uikit-fixed max-sm:uikit-bottom-0 max-sm:uikit-max-h-[95%] max-sm:uikit-rounded-bl-none max-sm:uikit-rounded-br-none sm:uikit-h-auto", [
|
|
113
106
|
e.customModalDialogClasses,
|
|
114
107
|
{
|
|
115
108
|
"centered sm:uikit-absolute sm:uikit-top-1/2 sm:-uikit-translate-y-1/2": e.centered
|
|
@@ -123,45 +116,45 @@ const G = ["id", "data-cy"], P = ["innerHTML"], q = /* @__PURE__ */ D({
|
|
|
123
116
|
onFocusin: z
|
|
124
117
|
}, [
|
|
125
118
|
l("div", {
|
|
126
|
-
class:
|
|
119
|
+
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]])
|
|
127
120
|
}, [
|
|
128
|
-
e.withCloseIcon ? (c(),
|
|
121
|
+
e.withCloseIcon ? (c(), C("button", {
|
|
129
122
|
key: 0,
|
|
130
123
|
id: "close-icon-btn",
|
|
131
124
|
"data-cy": "bbt-default-close-icon-btn",
|
|
132
|
-
class:
|
|
125
|
+
class: i(["uikit-absolute uikit-right-15px uikit-top-15px uikit-z-10 uikit-bg-transparent uikit-p-5px", e.closeIconBtnClasses]),
|
|
133
126
|
type: "button",
|
|
134
127
|
"aria-label": "Close",
|
|
135
|
-
onClick: n[0] || (n[0] =
|
|
128
|
+
onClick: n[0] || (n[0] = U((b) => a.value = !1, ["prevent", "stop"]))
|
|
136
129
|
}, [
|
|
137
|
-
y(
|
|
138
|
-
class:
|
|
130
|
+
y(V(P), {
|
|
131
|
+
class: i(["bbt-close-icon uikit-box-border", e.closeIcon?.classes]),
|
|
139
132
|
width: e.closeIcon?.size || 20,
|
|
140
133
|
height: e.closeIcon?.size || 20
|
|
141
134
|
}, null, 8, ["class", "width", "height"])
|
|
142
|
-
], 2)) :
|
|
143
|
-
d(t.$slots, "header", { closeModal:
|
|
135
|
+
], 2)) : w("", !0),
|
|
136
|
+
d(t.$slots, "header", { closeModal: o }, () => [
|
|
144
137
|
l("span", {
|
|
145
|
-
class:
|
|
138
|
+
class: i(["uikit-w-auto uikit-text-18 uikit-font-semibold sm:uikit-text-22", e.titleClasses]),
|
|
146
139
|
innerHTML: e.headerTitle
|
|
147
|
-
}, null, 10,
|
|
140
|
+
}, null, 10, G)
|
|
148
141
|
])
|
|
149
142
|
], 2),
|
|
150
143
|
l("div", {
|
|
151
|
-
class:
|
|
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]])
|
|
152
145
|
}, [
|
|
153
|
-
d(t.$slots, "body", { closeModal:
|
|
146
|
+
d(t.$slots, "body", { closeModal: o })
|
|
154
147
|
], 2),
|
|
155
|
-
t.$slots.footer ? (c(),
|
|
148
|
+
t.$slots.footer ? (c(), C("div", {
|
|
156
149
|
key: 0,
|
|
157
|
-
class:
|
|
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])
|
|
158
151
|
}, [
|
|
159
|
-
d(t.$slots, "footer", { closeModal:
|
|
160
|
-
], 2)) :
|
|
152
|
+
d(t.$slots, "footer", { closeModal: o })
|
|
153
|
+
], 2)) : w("", !0),
|
|
161
154
|
d(t.$slots, "fixed-bottom")
|
|
162
|
-
], 42,
|
|
155
|
+
], 42, R)
|
|
163
156
|
], 34), [
|
|
164
|
-
[
|
|
157
|
+
[A, a.value]
|
|
165
158
|
])
|
|
166
159
|
]),
|
|
167
160
|
_: 3
|
|
@@ -170,5 +163,5 @@ const G = ["id", "data-cy"], P = ["innerHTML"], q = /* @__PURE__ */ D({
|
|
|
170
163
|
}
|
|
171
164
|
});
|
|
172
165
|
export {
|
|
173
|
-
|
|
166
|
+
J as default
|
|
174
167
|
};
|
package/package.json
CHANGED
|
File without changes
|