@wikicasa-dev/components 2.2.9-alpha.14 → 2.2.9-alpha.16
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/BaseButton.d.ts +6 -2
- package/dist/packages/components/lib/UIKit/Autocomplete/ClearableAutocomplete.vue.js +60 -58
- package/dist/packages/components/lib/UIKit/BaseButton.vue.js +26 -23
- package/dist/packages/components/lib/UIKit/BaseSelect/SelectItem.vue.js +18 -17
- package/package.json +1 -1
- /package/dist/assets/{swiper-thumbs.css → swiper-autoplay.css} +0 -0
package/dist/Swiper/autoplay.js
CHANGED
package/dist/Swiper/keyboard.js
CHANGED
package/dist/Swiper/thumbs.js
CHANGED
|
@@ -16,7 +16,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
16
16
|
title?: string;
|
|
17
17
|
dataCy?: string;
|
|
18
18
|
type?: "button" | "submit" | "reset" | undefined;
|
|
19
|
-
}, {
|
|
19
|
+
}, {
|
|
20
|
+
getRootElement: () => HTMLButtonElement | null;
|
|
21
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
20
22
|
click: (e: Event) => any;
|
|
21
23
|
mouseover: (e: Event) => any;
|
|
22
24
|
mouseout: (e: Event) => any;
|
|
@@ -39,7 +41,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
39
41
|
onClick?: ((e: Event) => any) | undefined;
|
|
40
42
|
onMouseover?: ((e: Event) => any) | undefined;
|
|
41
43
|
onMouseout?: ((e: Event) => any) | undefined;
|
|
42
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
44
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
45
|
+
buttonEl: HTMLButtonElement;
|
|
46
|
+
}, HTMLButtonElement>, {
|
|
43
47
|
default?(_: {
|
|
44
48
|
hover: boolean;
|
|
45
49
|
}): any;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as D, mergeModels as $, useModel as b, useId as N, useTemplateRef as y, shallowRef as d, onBeforeMount as A, watch as w, nextTick as H, createBlock as F, openBlock as h, withCtx as g, createElementBlock as P, Fragment as X, renderList as j, renderSlot as f, createElementVNode as u, normalizeClass as v, withDirectives as O, unref as q, vModelText as G, toDisplayString as J, withModifiers as Q, normalizeStyle as Y, createTextVNode as Z, vShow as _ } from "vue";
|
|
2
|
+
import ee from "../BaseDropDown.vue.js";
|
|
3
3
|
import '../../../../../assets/BaseDropDown.css';/* empty css */
|
|
4
|
-
import
|
|
5
|
-
import { debounce as
|
|
6
|
-
const
|
|
4
|
+
import te from "../BaseSelect/SelectItem.vue.js";
|
|
5
|
+
import { debounce as le } from "@wikicasa-dev/utilities";
|
|
6
|
+
const ne = ["id", "data-cy", "placeholder"], oe = ["innerHTML"], pe = /* @__PURE__ */ D({
|
|
7
7
|
__name: "ClearableAutocomplete",
|
|
8
|
-
props: /* @__PURE__ */
|
|
8
|
+
props: /* @__PURE__ */ $({
|
|
9
9
|
dataCy: {},
|
|
10
10
|
placeholder: {},
|
|
11
11
|
enableKeyboardController: { type: Boolean, default: !0 },
|
|
@@ -28,55 +28,55 @@ const le = ["id", "data-cy", "placeholder"], ne = ["innerHTML"], de = /* @__PURE
|
|
|
28
28
|
},
|
|
29
29
|
inputValueModifiers: {}
|
|
30
30
|
}),
|
|
31
|
-
emits: /* @__PURE__ */
|
|
32
|
-
setup(l, { expose:
|
|
33
|
-
const s =
|
|
31
|
+
emits: /* @__PURE__ */ $(["input", "click", "inputClick", "keydown"], ["update:open", "update:modelValue", "update:inputValue"]),
|
|
32
|
+
setup(l, { expose: R, emit: x }) {
|
|
33
|
+
const s = b(l, "open"), i = b(l, "modelValue"), o = b(l, "inputValue");
|
|
34
34
|
o.value = o.value ?? i.value?.label ?? "";
|
|
35
|
-
const
|
|
35
|
+
const p = x, E = N(), k = y("inputRef"), c = d(0), m = d(!1), C = d(!!i.value?.label), S = d(null), a = d([]), T = y("dropdownRef"), B = y("hiddenSpan"), I = () => {
|
|
36
36
|
o.value = "", i.value = null;
|
|
37
|
-
},
|
|
37
|
+
}, U = async (t) => {
|
|
38
38
|
if (!t) {
|
|
39
39
|
a.value = [], s.value = !1;
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
|
-
l.disableCb || (a.value = await
|
|
43
|
-
},
|
|
42
|
+
l.disableCb || (a.value = await S.value?.(t) || [], m.value = !0, s.value = !!a.value.length);
|
|
43
|
+
}, M = (t = -1) => {
|
|
44
44
|
const e = a.value[t];
|
|
45
|
-
!e || e.id === i.value?.id || (l.onOptionSelectedCb?.(e), o.value = e.label, s.value = !1, i.value = e, a.value = []);
|
|
46
|
-
}, U = () => {
|
|
47
|
-
k.value?.select();
|
|
45
|
+
!e || e.id === i.value?.id || (l.onOptionSelectedCb?.(e), o.value = e.label, s.value = !1, i.value = e, C.value = !0, a.value = []);
|
|
48
46
|
}, z = () => {
|
|
47
|
+
k.value?.select();
|
|
48
|
+
}, K = () => {
|
|
49
49
|
k.value?.focus();
|
|
50
50
|
};
|
|
51
|
-
return
|
|
52
|
-
|
|
53
|
-
}),
|
|
54
|
-
[o, () =>
|
|
51
|
+
return A(() => {
|
|
52
|
+
S.value = le({ delay: 300 }, l.onInputChangeCb);
|
|
53
|
+
}), w(
|
|
54
|
+
[o, () => B.value],
|
|
55
55
|
([, t]) => {
|
|
56
|
-
t &&
|
|
56
|
+
t && H(() => {
|
|
57
57
|
if (!t) return;
|
|
58
58
|
const e = t.offsetWidth;
|
|
59
|
-
e !==
|
|
59
|
+
e !== c.value && (c.value = e);
|
|
60
60
|
});
|
|
61
61
|
},
|
|
62
62
|
{ immediate: !0 }
|
|
63
|
-
),
|
|
64
|
-
() =>
|
|
63
|
+
), w(
|
|
64
|
+
() => T.value?.selectedIdx,
|
|
65
65
|
(t) => {
|
|
66
66
|
const e = t ?? -1;
|
|
67
|
-
e !== -1 &&
|
|
67
|
+
e !== -1 && M(e);
|
|
68
68
|
}
|
|
69
|
-
),
|
|
69
|
+
), w(
|
|
70
70
|
i,
|
|
71
71
|
(t, e) => {
|
|
72
72
|
t === e || t?.label === o.value || (o.value = t?.label || "");
|
|
73
73
|
},
|
|
74
74
|
{ immediate: !0 }
|
|
75
|
-
),
|
|
76
|
-
getRootElement: () =>
|
|
77
|
-
select:
|
|
78
|
-
focus:
|
|
79
|
-
}), (t, e) => (
|
|
75
|
+
), R({
|
|
76
|
+
getRootElement: () => T.value?.getRootElement(),
|
|
77
|
+
select: z,
|
|
78
|
+
focus: K
|
|
79
|
+
}), (t, e) => (h(), F(ee, {
|
|
80
80
|
ref: "dropdownRef",
|
|
81
81
|
class: "uikit-clearable-autocomplete",
|
|
82
82
|
"data-cy": l.dataCy,
|
|
@@ -89,22 +89,22 @@ const le = ["id", "data-cy", "placeholder"], ne = ["innerHTML"], de = /* @__PURE
|
|
|
89
89
|
"onUpdate:resetKeyboardController": e[5] || (e[5] = (n) => m.value = n),
|
|
90
90
|
"onUpdate:dropdownState": e[6] || (e[6] = (n) => s.value = n)
|
|
91
91
|
}, {
|
|
92
|
-
btn_slot:
|
|
92
|
+
btn_slot: g(() => [
|
|
93
93
|
u("div", {
|
|
94
94
|
class: v(["uikit-text-16", l.triggerWrapperClasses]),
|
|
95
|
-
onClick: e[4] || (e[4] = (n) =>
|
|
95
|
+
onClick: e[4] || (e[4] = (n) => p("click", n))
|
|
96
96
|
}, [
|
|
97
97
|
f(t.$slots, "left-icon"),
|
|
98
98
|
u("div", {
|
|
99
99
|
class: v(["uikit-relative", l.inputWrapperClasses])
|
|
100
100
|
}, [
|
|
101
|
-
|
|
101
|
+
O(u("input", {
|
|
102
102
|
ref: "inputRef",
|
|
103
103
|
"onUpdate:modelValue": [
|
|
104
104
|
e[0] || (e[0] = (n) => o.value = n),
|
|
105
|
-
|
|
105
|
+
U
|
|
106
106
|
],
|
|
107
|
-
id:
|
|
107
|
+
id: q(E),
|
|
108
108
|
"data-cy": l.dataCy ? `ac_input_${l.dataCy}` : "",
|
|
109
109
|
type: "text",
|
|
110
110
|
autocomplete: "off",
|
|
@@ -114,58 +114,60 @@ const le = ["id", "data-cy", "placeholder"], ne = ["innerHTML"], de = /* @__PURE
|
|
|
114
114
|
fontSize: "inherit"
|
|
115
115
|
},
|
|
116
116
|
placeholder: l.placeholder,
|
|
117
|
-
onKeydown: e[1] || (e[1] = (n) =>
|
|
118
|
-
onInput: e[2] || (e[2] = (n) =>
|
|
117
|
+
onKeydown: e[1] || (e[1] = (n) => p("keydown", n)),
|
|
118
|
+
onInput: e[2] || (e[2] = (n) => {
|
|
119
|
+
p("input", n), C.value = !1;
|
|
120
|
+
}),
|
|
119
121
|
onClick: e[3] || (e[3] = (n) => {
|
|
120
|
-
|
|
122
|
+
p("inputClick", n), k.value?.select();
|
|
121
123
|
})
|
|
122
|
-
}, null, 42,
|
|
123
|
-
[
|
|
124
|
+
}, null, 42, ne), [
|
|
125
|
+
[G, o.value]
|
|
124
126
|
]),
|
|
125
127
|
u("span", {
|
|
126
128
|
ref_key: "hiddenSpan",
|
|
127
|
-
ref:
|
|
129
|
+
ref: B,
|
|
128
130
|
class: "uikit-invisible uikit-absolute uikit-left-0 uikit-top-0 uikit-whitespace-pre",
|
|
129
131
|
style: {
|
|
130
132
|
font: "inherit",
|
|
131
133
|
fontSize: "inherit"
|
|
132
134
|
}
|
|
133
|
-
},
|
|
134
|
-
|
|
135
|
+
}, J(o.value), 513),
|
|
136
|
+
O(u("button", {
|
|
135
137
|
type: "button",
|
|
136
138
|
class: v(["uikit-clear-btn uikit-absolute uikit-top-1/2 -uikit-translate-y-1/2 uikit-appearance-none", l.clearButton?.classes]),
|
|
137
139
|
"aria-label": "Clear input",
|
|
138
|
-
style:
|
|
139
|
-
left: `${
|
|
140
|
+
style: Y({
|
|
141
|
+
left: `${c.value + (l.clearButton?.offset || 10)}px`
|
|
140
142
|
}),
|
|
141
|
-
onClick:
|
|
143
|
+
onClick: Q(I, ["stop"])
|
|
142
144
|
}, [
|
|
143
145
|
f(t.$slots, "clear-icon", {}, () => [
|
|
144
|
-
e[7] || (e[7] =
|
|
146
|
+
e[7] || (e[7] = Z("X", -1))
|
|
145
147
|
])
|
|
146
148
|
], 6), [
|
|
147
|
-
[
|
|
149
|
+
[_, C.value && c.value]
|
|
148
150
|
])
|
|
149
151
|
], 2),
|
|
150
152
|
f(t.$slots, "right-icon")
|
|
151
153
|
], 2)
|
|
152
154
|
]),
|
|
153
|
-
default:
|
|
154
|
-
(
|
|
155
|
+
default: g(({ activeIdx: n, setActiveIdx: L }) => [
|
|
156
|
+
(h(!0), P(X, null, j(a.value, (V, r) => (h(), F(te, {
|
|
155
157
|
key: r,
|
|
156
158
|
active: n === r,
|
|
157
159
|
class: "uikit-m-1 uikit-rounded-[5px] uikit-px-5 uikit-py-10px hover:uikit-cursor-pointer",
|
|
158
|
-
onClick: (
|
|
159
|
-
onMouseover: (
|
|
160
|
+
onClick: (W) => M(r),
|
|
161
|
+
onMouseover: (W) => L(r)
|
|
160
162
|
}, {
|
|
161
|
-
default:
|
|
163
|
+
default: g(() => [
|
|
162
164
|
f(t.$slots, "option-content", {
|
|
163
|
-
option:
|
|
165
|
+
option: V,
|
|
164
166
|
idx: r
|
|
165
167
|
}, () => [
|
|
166
168
|
u("span", {
|
|
167
|
-
innerHTML:
|
|
168
|
-
}, null, 8,
|
|
169
|
+
innerHTML: V.label
|
|
170
|
+
}, null, 8, oe)
|
|
169
171
|
])
|
|
170
172
|
]),
|
|
171
173
|
_: 2
|
|
@@ -176,5 +178,5 @@ const le = ["id", "data-cy", "placeholder"], ne = ["innerHTML"], de = /* @__PURE
|
|
|
176
178
|
}
|
|
177
179
|
});
|
|
178
180
|
export {
|
|
179
|
-
|
|
181
|
+
pe as default
|
|
180
182
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as y, useTemplateRef as v, shallowRef as B, computed as n, createElementBlock as C, openBlock as M, withModifiers as s, normalizeStyle as h, normalizeClass as z, renderSlot as u, createVNode as L } from "vue";
|
|
2
|
+
import g from "../../../../UIKit/StaticSpinner.js";
|
|
3
|
+
const w = ["id", "data-cy", "type", "data-active", "disabled", "aria-label", "title"], A = /* @__PURE__ */ y({
|
|
4
4
|
__name: "BaseButton",
|
|
5
5
|
props: {
|
|
6
6
|
btnClass: { default: "uikit-btn-w-primary" },
|
|
@@ -16,17 +16,20 @@ const L = ["id", "data-cy", "type", "data-active", "disabled", "aria-label", "ti
|
|
|
16
16
|
type: {}
|
|
17
17
|
},
|
|
18
18
|
emits: ["mouseover", "mouseout", "click"],
|
|
19
|
-
setup(e, {
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
|
|
19
|
+
setup(e, { expose: d, emit: r }) {
|
|
20
|
+
const a = r, m = v("buttonEl"), l = B(!1), b = n(() => e.size ? `uikit-btn-${e.size}` : ""), c = n(() => e.outlined ? "uikit-btn-outline" : ""), f = () => {
|
|
21
|
+
l.value = !0;
|
|
22
|
+
}, k = () => {
|
|
23
|
+
l.value = !1;
|
|
24
24
|
};
|
|
25
|
-
return (
|
|
26
|
-
|
|
25
|
+
return d({
|
|
26
|
+
getRootElement: () => m.value
|
|
27
|
+
}), (o, t) => (M(), C("button", {
|
|
28
|
+
ref: "buttonEl",
|
|
29
|
+
id: o.$attrs.id,
|
|
27
30
|
"data-cy": e.dataCy,
|
|
28
31
|
type: e.type,
|
|
29
|
-
class:
|
|
32
|
+
class: z([
|
|
30
33
|
"uikit-btn",
|
|
31
34
|
{
|
|
32
35
|
"uikit-btn-empty": !e.withMinWidth,
|
|
@@ -34,33 +37,33 @@ const L = ["id", "data-cy", "type", "data-active", "disabled", "aria-label", "ti
|
|
|
34
37
|
"uikit-flex uikit-items-center uikit-justify-center": e.isLoading
|
|
35
38
|
},
|
|
36
39
|
e.btnClass,
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
b.value,
|
|
41
|
+
c.value
|
|
39
42
|
]),
|
|
40
|
-
style:
|
|
43
|
+
style: h(o.$attrs.style),
|
|
41
44
|
"data-active": e.keepActive,
|
|
42
45
|
disabled: e.isLoading || e.disabled,
|
|
43
46
|
"aria-label": e.ariaLabel,
|
|
44
47
|
title: e.title,
|
|
45
48
|
onMouseover: t[0] || (t[0] = s((i) => {
|
|
46
|
-
|
|
49
|
+
f(), a("mouseover", i);
|
|
47
50
|
}, ["stop"])),
|
|
48
51
|
onMouseout: t[1] || (t[1] = s((i) => {
|
|
49
|
-
|
|
52
|
+
k(), a("mouseout", i);
|
|
50
53
|
}, ["stop"])),
|
|
51
|
-
onClick: t[2] || (t[2] = (i) =>
|
|
54
|
+
onClick: t[2] || (t[2] = (i) => a("click", i))
|
|
52
55
|
}, [
|
|
53
|
-
e.isLoading ? u(
|
|
54
|
-
|
|
56
|
+
e.isLoading ? u(o.$slots, "spinner", { key: 1 }, () => [
|
|
57
|
+
L(g, {
|
|
55
58
|
"stroke-color": e.outlined ? "#ACB4C3" : "#fff"
|
|
56
59
|
}, null, 8, ["stroke-color"])
|
|
57
|
-
]) : u(
|
|
60
|
+
]) : u(o.$slots, "default", {
|
|
58
61
|
key: 0,
|
|
59
|
-
hover:
|
|
62
|
+
hover: l.value
|
|
60
63
|
})
|
|
61
|
-
], 46,
|
|
64
|
+
], 46, w));
|
|
62
65
|
}
|
|
63
66
|
});
|
|
64
67
|
export {
|
|
65
|
-
|
|
68
|
+
A as default
|
|
66
69
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as u, useTemplateRef as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as u, useTemplateRef as c, watch as d, nextTick as m, createElementBlock as r, openBlock as f, normalizeClass as v, renderSlot as k, createElementVNode as x } from "vue";
|
|
2
|
+
const b = ["data-active", "tabindex"], p = ["innerHTML"], $ = /* @__PURE__ */ u({
|
|
3
3
|
__name: "SelectItem",
|
|
4
4
|
props: {
|
|
5
5
|
label: { default: "" },
|
|
@@ -7,33 +7,34 @@ const p = ["tabindex"], b = ["innerHTML"], $ = /* @__PURE__ */ u({
|
|
|
7
7
|
idx: { default: -1 }
|
|
8
8
|
},
|
|
9
9
|
emits: ["click", "mouseover"],
|
|
10
|
-
setup(
|
|
11
|
-
const
|
|
12
|
-
return
|
|
13
|
-
() =>
|
|
10
|
+
setup(t, { emit: o }) {
|
|
11
|
+
const a = o, i = t, n = c("liItem");
|
|
12
|
+
return d(
|
|
13
|
+
() => i.active,
|
|
14
14
|
(e) => {
|
|
15
|
-
e &&
|
|
16
|
-
|
|
15
|
+
e && m(() => {
|
|
16
|
+
n.value && n.value.focus();
|
|
17
17
|
});
|
|
18
18
|
},
|
|
19
19
|
{ immediate: !0 }
|
|
20
|
-
), (e,
|
|
20
|
+
), (e, l) => (f(), r("li", {
|
|
21
21
|
ref: "liItem",
|
|
22
|
-
class:
|
|
23
|
-
{ "active uikit-bg-w-cultured":
|
|
22
|
+
class: v(["uikit-list-none uikit-text-w-black", [
|
|
23
|
+
{ "active uikit-bg-w-cultured": t.active },
|
|
24
24
|
"uikit-outline-none",
|
|
25
25
|
e.$attrs.class
|
|
26
26
|
]]),
|
|
27
|
+
"data-active": t.active,
|
|
27
28
|
tabindex: e.$attrs.tabindex ?? -1,
|
|
28
|
-
onClick:
|
|
29
|
-
onMouseover:
|
|
29
|
+
onClick: l[0] || (l[0] = (s) => a("click", i.idx)),
|
|
30
|
+
onMouseover: l[1] || (l[1] = (s) => a("mouseover", i.idx))
|
|
30
31
|
}, [
|
|
31
|
-
|
|
32
|
+
k(e.$slots, "default", { itemIdx: t.idx }, () => [
|
|
32
33
|
x("span", {
|
|
33
|
-
innerHTML:
|
|
34
|
-
}, null, 8,
|
|
34
|
+
innerHTML: i.label
|
|
35
|
+
}, null, 8, p)
|
|
35
36
|
])
|
|
36
|
-
], 42,
|
|
37
|
+
], 42, b));
|
|
37
38
|
}
|
|
38
39
|
});
|
|
39
40
|
export {
|
package/package.json
CHANGED
|
File without changes
|