@wikicasa-dev/components 2.2.8-alpha.18 → 2.2.8-alpha.19
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 +29 -27
- package/package.json +1 -1
- /package/dist/assets/{swiper-thumbs.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,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as K, mergeModels as T, useModel as B, useTemplateRef as
|
|
1
|
+
import { defineComponent as K, mergeModels as T, useModel as B, useTemplateRef as b, shallowRef as s, onBeforeMount as L, watch as y, nextTick as N, createBlock as M, openBlock as c, withCtx as C, createElementBlock as V, Fragment as W, renderList as I, renderSlot as f, createElementVNode as d, normalizeClass as v, withDirectives as A, createCommentVNode as H, vModelText as G, toDisplayString as P, withModifiers as X, normalizeStyle as j, createTextVNode as q } from "vue";
|
|
2
2
|
import J from "../BaseDropDown.vue.js";
|
|
3
3
|
import '../../../../../assets/BaseDropDown.css';/* empty css */
|
|
4
4
|
import Q from "../BaseSelect/SelectItem.vue.js";
|
|
@@ -25,42 +25,44 @@ const Z = ["readonly", "placeholder"], _ = ["innerHTML"], ie = /* @__PURE__ */ K
|
|
|
25
25
|
}),
|
|
26
26
|
emits: /* @__PURE__ */ T(["click", "update:inputValue", "keydown"], ["update:open", "update:modelValue"]),
|
|
27
27
|
setup(l, { expose: $, emit: F }) {
|
|
28
|
-
const u = B(l, "open"), a = B(l, "modelValue"), p = F,
|
|
29
|
-
|
|
28
|
+
const u = B(l, "open"), a = B(l, "modelValue"), p = F, O = b("inputRef"), o = s(a.value?.label || ""), k = s(0), m = s(!1), w = s(null), i = s([]), U = b("dropdownRef"), h = b("hiddenSpan"), x = () => {
|
|
29
|
+
o.value = "", a.value = null, p("update:inputValue", "");
|
|
30
30
|
}, E = async (t) => {
|
|
31
31
|
if (p("update:inputValue", t), !t) {
|
|
32
32
|
i.value = [], u.value = !1;
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
|
-
i.value = await w.value?.(t) || [],
|
|
35
|
+
i.value = await w.value?.(t) || [], m.value = !0, u.value = !!i.value.length;
|
|
36
36
|
}, g = (t = -1) => {
|
|
37
37
|
const e = i.value[t];
|
|
38
|
-
!e || e.id === a.value?.id || (l.onOptionSelectedCb?.(e),
|
|
38
|
+
!e || e.id === a.value?.id || (l.onOptionSelectedCb?.(e), o.value = e.label, u.value = !1, a.value = e, i.value = []);
|
|
39
39
|
}, R = () => {
|
|
40
|
-
|
|
40
|
+
O.value?.select();
|
|
41
41
|
};
|
|
42
42
|
return L(() => {
|
|
43
43
|
w.value = Y({ delay: 300 }, l.onInputChangeCb);
|
|
44
|
-
}),
|
|
45
|
-
[
|
|
44
|
+
}), y(
|
|
45
|
+
[o, () => h.value],
|
|
46
46
|
([t, e]) => {
|
|
47
47
|
e && N(() => {
|
|
48
|
-
|
|
48
|
+
if (!e) return;
|
|
49
|
+
const n = e.offsetWidth;
|
|
50
|
+
n !== k.value && (console.log("DEBUG:updating icon positioning", {
|
|
49
51
|
curInputValue: t
|
|
50
|
-
}),
|
|
52
|
+
}), k.value = n);
|
|
51
53
|
});
|
|
52
54
|
},
|
|
53
55
|
{ immediate: !0 }
|
|
54
|
-
),
|
|
55
|
-
() =>
|
|
56
|
+
), y(
|
|
57
|
+
() => U.value?.selectedIdx,
|
|
56
58
|
(t) => {
|
|
57
59
|
const e = t ?? -1;
|
|
58
60
|
e !== -1 && g(e);
|
|
59
61
|
}
|
|
60
|
-
),
|
|
62
|
+
), y(
|
|
61
63
|
a,
|
|
62
64
|
(t, e) => {
|
|
63
|
-
t === e || t?.label ===
|
|
65
|
+
t === e || t?.label === o.value || (o.value = t?.label || "");
|
|
64
66
|
},
|
|
65
67
|
{ immediate: !0 }
|
|
66
68
|
), $({
|
|
@@ -74,12 +76,12 @@ const Z = ["readonly", "placeholder"], _ = ["innerHTML"], ie = /* @__PURE__ */ K
|
|
|
74
76
|
"open-dropdown": u.value,
|
|
75
77
|
"keep-state": !i.value.length || l.keepState === "closed" ? "closed" : "opened",
|
|
76
78
|
"activate-keyboard-controller": l.enableKeyboardController,
|
|
77
|
-
"reset-keyboard-controller":
|
|
78
|
-
"onUpdate:resetKeyboardController": e[2] || (e[2] = (
|
|
79
|
-
"onUpdate:dropdownState": e[3] || (e[3] = (
|
|
80
|
-
onClick: e[4] || (e[4] = (
|
|
79
|
+
"reset-keyboard-controller": m.value,
|
|
80
|
+
"onUpdate:resetKeyboardController": e[2] || (e[2] = (n) => m.value = n),
|
|
81
|
+
"onUpdate:dropdownState": e[3] || (e[3] = (n) => u.value = n),
|
|
82
|
+
onClick: e[4] || (e[4] = (n) => p("click"))
|
|
81
83
|
}, {
|
|
82
|
-
btn_slot:
|
|
84
|
+
btn_slot: C(() => [
|
|
83
85
|
d("div", {
|
|
84
86
|
class: v(["uikit-text-16", l.triggerWrapperClasses])
|
|
85
87
|
}, [
|
|
@@ -90,7 +92,7 @@ const Z = ["readonly", "placeholder"], _ = ["innerHTML"], ie = /* @__PURE__ */ K
|
|
|
90
92
|
A(d("input", {
|
|
91
93
|
ref: "inputRef",
|
|
92
94
|
"onUpdate:modelValue": [
|
|
93
|
-
e[0] || (e[0] = (
|
|
95
|
+
e[0] || (e[0] = (n) => o.value = n),
|
|
94
96
|
E
|
|
95
97
|
],
|
|
96
98
|
readonly: !!a.value?.label,
|
|
@@ -100,9 +102,9 @@ const Z = ["readonly", "placeholder"], _ = ["innerHTML"], ie = /* @__PURE__ */ K
|
|
|
100
102
|
fontSize: "inherit"
|
|
101
103
|
},
|
|
102
104
|
placeholder: l.placeholder,
|
|
103
|
-
onKeydown: e[1] || (e[1] = (
|
|
105
|
+
onKeydown: e[1] || (e[1] = (n) => p("keydown", n))
|
|
104
106
|
}, null, 42, Z), [
|
|
105
|
-
[G,
|
|
107
|
+
[G, o.value]
|
|
106
108
|
]),
|
|
107
109
|
d("span", {
|
|
108
110
|
ref_key: "hiddenSpan",
|
|
@@ -112,14 +114,14 @@ const Z = ["readonly", "placeholder"], _ = ["innerHTML"], ie = /* @__PURE__ */ K
|
|
|
112
114
|
font: "inherit",
|
|
113
115
|
fontSize: "inherit"
|
|
114
116
|
}
|
|
115
|
-
}, P(
|
|
117
|
+
}, P(o.value), 513),
|
|
116
118
|
a.value?.label ? (c(), V("button", {
|
|
117
119
|
key: 0,
|
|
118
120
|
type: "button",
|
|
119
121
|
class: v(["uikit-clear-btn uikit-absolute uikit-top-1/2 -uikit-translate-y-1/2 uikit-appearance-none", l.clearButton?.classes]),
|
|
120
122
|
"aria-label": "Clear input",
|
|
121
123
|
style: j({
|
|
122
|
-
left: `${
|
|
124
|
+
left: `${k.value + (l.clearButton?.offset || 10)}px`
|
|
123
125
|
}),
|
|
124
126
|
onClick: X(x, ["stop"])
|
|
125
127
|
}, [
|
|
@@ -131,15 +133,15 @@ const Z = ["readonly", "placeholder"], _ = ["innerHTML"], ie = /* @__PURE__ */ K
|
|
|
131
133
|
f(t.$slots, "right-icon")
|
|
132
134
|
], 2)
|
|
133
135
|
]),
|
|
134
|
-
default:
|
|
136
|
+
default: C(({ activeIdx: n, setActiveIdx: z }) => [
|
|
135
137
|
(c(!0), V(W, null, I(i.value, (S, r) => (c(), M(Q, {
|
|
136
138
|
key: r,
|
|
137
|
-
active:
|
|
139
|
+
active: n === r,
|
|
138
140
|
class: "uikit-m-1 uikit-rounded-[5px] uikit-px-5 uikit-py-10px hover:uikit-cursor-pointer",
|
|
139
141
|
onClick: (D) => g(r),
|
|
140
142
|
onMouseover: (D) => z(r)
|
|
141
143
|
}, {
|
|
142
|
-
default:
|
|
144
|
+
default: C(() => [
|
|
143
145
|
f(t.$slots, "option-content", {
|
|
144
146
|
option: S,
|
|
145
147
|
idx: r
|
package/package.json
CHANGED
|
File without changes
|