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