@wikicasa-dev/components 2.2.8-alpha.15 → 2.2.8-alpha.17
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/Autocomplete/ClearableAutocomplete.vue.js +36 -32
- 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
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as L, mergeModels as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as L, mergeModels as M, useModel as V, useTemplateRef as b, shallowRef as s, onBeforeMount as N, watch as C, nextTick as O, createBlock as $, openBlock as c, withCtx as y, createElementBlock as B, Fragment as U, renderList as D, renderSlot as v, createElementVNode as d, normalizeClass as f, withDirectives as H, createCommentVNode as A, vModelText as P, toDisplayString as X, withModifiers as j, normalizeStyle as q, createTextVNode as G } from "vue";
|
|
2
|
+
import J from "../BaseDropDown.vue.js";
|
|
3
3
|
import '../../../../../assets/BaseDropDown.css';/* empty css */
|
|
4
|
-
import
|
|
5
|
-
import { debounce as
|
|
6
|
-
const
|
|
4
|
+
import Q from "../BaseSelect/SelectItem.vue.js";
|
|
5
|
+
import { debounce as Y } from "@wikicasa-dev/utilities";
|
|
6
|
+
const Z = ["readonly", "placeholder"], _ = ["innerHTML"], ae = /* @__PURE__ */ L({
|
|
7
7
|
__name: "ClearableAutocomplete",
|
|
8
|
-
props: /* @__PURE__ */
|
|
8
|
+
props: /* @__PURE__ */ M({
|
|
9
9
|
dataCy: {},
|
|
10
10
|
placeholder: {},
|
|
11
11
|
enableKeyboardController: { type: Boolean, default: !0 },
|
|
@@ -23,50 +23,54 @@ const Y = ["readonly", "placeholder"], Z = ["innerHTML"], oe = /* @__PURE__ */ L
|
|
|
23
23
|
modelValue: { default: null },
|
|
24
24
|
modelModifiers: {}
|
|
25
25
|
}),
|
|
26
|
-
emits: /* @__PURE__ */
|
|
26
|
+
emits: /* @__PURE__ */ M(["click", "update:inputValue", "keydown"], ["update:open", "update:modelValue"]),
|
|
27
27
|
setup(l, { expose: x, emit: R }) {
|
|
28
|
-
const u =
|
|
29
|
-
o.value = "",
|
|
28
|
+
const u = V(l, "open"), a = V(l, "modelValue"), p = R, T = b("inputRef"), o = s(a.value?.label || ""), w = s(0), k = s(!1), h = s(null), i = s([]), z = b("dropdownRef"), m = b("hiddenSpan"), K = () => {
|
|
29
|
+
o.value = "", a.value = null, p("update:inputValue", "");
|
|
30
30
|
}, W = async (t) => {
|
|
31
31
|
if (p("update:inputValue", t), !t) {
|
|
32
|
-
|
|
32
|
+
i.value = [], u.value = !1;
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
|
-
|
|
35
|
+
i.value = await h.value?.(t) || [], k.value = !0, u.value = !!i.value.length;
|
|
36
36
|
}, S = (t = -1) => {
|
|
37
|
-
const e =
|
|
38
|
-
!e || e.id ===
|
|
37
|
+
const e = i.value[t];
|
|
38
|
+
!e || e.id === a.value?.id || (l.onOptionSelectedCb?.(e), o.value = e.label, u.value = !1, a.value = e, i.value = []);
|
|
39
39
|
}, I = () => {
|
|
40
40
|
T.value?.select();
|
|
41
41
|
};
|
|
42
42
|
return N(() => {
|
|
43
|
-
h.value =
|
|
44
|
-
}),
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
h.value = Y({ delay: 300 }, l.onInputChangeCb);
|
|
44
|
+
}), C(
|
|
45
|
+
o,
|
|
46
|
+
() => {
|
|
47
|
+
O(() => {
|
|
48
|
+
m.value && (w.value = m.value.offsetWidth);
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
{ immediate: !0 }
|
|
52
|
+
), C(
|
|
49
53
|
() => z.value?.selectedIdx,
|
|
50
54
|
(t) => {
|
|
51
55
|
const e = t ?? -1;
|
|
52
56
|
e !== -1 && S(e);
|
|
53
57
|
}
|
|
54
|
-
),
|
|
55
|
-
|
|
58
|
+
), C(
|
|
59
|
+
a,
|
|
56
60
|
(t, e) => {
|
|
57
61
|
t === e || t?.label === o.value || (o.value = t?.label || "");
|
|
58
62
|
},
|
|
59
63
|
{ immediate: !0 }
|
|
60
64
|
), x({
|
|
61
65
|
select: I
|
|
62
|
-
}), (t, e) => (c(), $(
|
|
66
|
+
}), (t, e) => (c(), $(J, {
|
|
63
67
|
ref: "dropdownRef",
|
|
64
68
|
class: "uikit-clearable-autocomplete",
|
|
65
69
|
"data-cy": l.dataCy,
|
|
66
70
|
"dropdown-element": "ul",
|
|
67
71
|
"dropdown-classes": ["uikit-z-30", l.dropdownClasses],
|
|
68
72
|
"open-dropdown": u.value,
|
|
69
|
-
"keep-state": !
|
|
73
|
+
"keep-state": !i.value.length || l.keepState === "closed" ? "closed" : "opened",
|
|
70
74
|
"activate-keyboard-controller": l.enableKeyboardController,
|
|
71
75
|
"reset-keyboard-controller": k.value,
|
|
72
76
|
"onUpdate:resetKeyboardController": e[2] || (e[2] = (n) => k.value = n),
|
|
@@ -87,7 +91,7 @@ const Y = ["readonly", "placeholder"], Z = ["innerHTML"], oe = /* @__PURE__ */ L
|
|
|
87
91
|
e[0] || (e[0] = (n) => o.value = n),
|
|
88
92
|
W
|
|
89
93
|
],
|
|
90
|
-
readonly: !!
|
|
94
|
+
readonly: !!a.value?.label,
|
|
91
95
|
class: f(["uikit-w-full uikit-border-none focus-visible:uikit-outline-none", l.inputClasses]),
|
|
92
96
|
style: {
|
|
93
97
|
font: "inherit",
|
|
@@ -95,7 +99,7 @@ const Y = ["readonly", "placeholder"], Z = ["innerHTML"], oe = /* @__PURE__ */ L
|
|
|
95
99
|
},
|
|
96
100
|
placeholder: l.placeholder,
|
|
97
101
|
onKeydown: e[1] || (e[1] = (n) => p("keydown", n))
|
|
98
|
-
}, null, 42,
|
|
102
|
+
}, null, 42, Z), [
|
|
99
103
|
[P, o.value]
|
|
100
104
|
]),
|
|
101
105
|
d("span", {
|
|
@@ -107,18 +111,18 @@ const Y = ["readonly", "placeholder"], Z = ["innerHTML"], oe = /* @__PURE__ */ L
|
|
|
107
111
|
fontSize: "inherit"
|
|
108
112
|
}
|
|
109
113
|
}, X(o.value), 513),
|
|
110
|
-
|
|
114
|
+
a.value?.label ? (c(), B("button", {
|
|
111
115
|
key: 0,
|
|
112
116
|
type: "button",
|
|
113
117
|
class: f(["uikit-clear-btn uikit-absolute uikit-top-1/2 -uikit-translate-y-1/2 uikit-appearance-none", l.clearButtonClasses]),
|
|
114
118
|
"aria-label": "Clear input",
|
|
115
|
-
style:
|
|
119
|
+
style: q({
|
|
116
120
|
left: `${w.value + 16}px`
|
|
117
121
|
}),
|
|
118
|
-
onClick: K
|
|
122
|
+
onClick: j(K, ["stop"])
|
|
119
123
|
}, [
|
|
120
124
|
v(t.$slots, "clear-icon", {}, () => [
|
|
121
|
-
e[5] || (e[5] =
|
|
125
|
+
e[5] || (e[5] = G("X", -1))
|
|
122
126
|
])
|
|
123
127
|
], 6)) : A("", !0)
|
|
124
128
|
], 2),
|
|
@@ -126,7 +130,7 @@ const Y = ["readonly", "placeholder"], Z = ["innerHTML"], oe = /* @__PURE__ */ L
|
|
|
126
130
|
], 2)
|
|
127
131
|
]),
|
|
128
132
|
default: y(({ activeIdx: n, setActiveIdx: E }) => [
|
|
129
|
-
(c(!0), B(U, null, D(
|
|
133
|
+
(c(!0), B(U, null, D(i.value, (g, r) => (c(), $(Q, {
|
|
130
134
|
key: r,
|
|
131
135
|
active: n === r,
|
|
132
136
|
class: "uikit-m-1 uikit-rounded-[5px] uikit-px-5 uikit-py-10px hover:uikit-cursor-pointer",
|
|
@@ -140,7 +144,7 @@ const Y = ["readonly", "placeholder"], Z = ["innerHTML"], oe = /* @__PURE__ */ L
|
|
|
140
144
|
}, () => [
|
|
141
145
|
d("span", {
|
|
142
146
|
innerHTML: g.label
|
|
143
|
-
}, null, 8,
|
|
147
|
+
}, null, 8, _)
|
|
144
148
|
])
|
|
145
149
|
]),
|
|
146
150
|
_: 2
|
|
@@ -151,5 +155,5 @@ const Y = ["readonly", "placeholder"], Z = ["innerHTML"], oe = /* @__PURE__ */ L
|
|
|
151
155
|
}
|
|
152
156
|
});
|
|
153
157
|
export {
|
|
154
|
-
|
|
158
|
+
ae as default
|
|
155
159
|
};
|
package/package.json
CHANGED
|
File without changes
|