@wikicasa-dev/components 2.2.9-alpha.45 → 2.2.9-alpha.48
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/AccessibleSelect.vue.js +2 -1
- package/dist/packages/components/lib/UIKit/Accordion/BaseAccordionItem.vue.js +4 -6
- package/dist/packages/components/lib/UIKit/Autocomplete/ClearableAutocomplete.vue.js +55 -46
- 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
|
@@ -47,6 +47,7 @@ const q = { class: "uikit-relative uikit-flex uikit-h-12 uikit-items-center" },
|
|
|
47
47
|
open: m.value,
|
|
48
48
|
"onUpdate:open": v[1] || (v[1] = (d) => m.value = d),
|
|
49
49
|
class: s([e.wrapperClasses]),
|
|
50
|
+
"data-cy": e.dataCy,
|
|
50
51
|
"activate-keyboard-controller": "",
|
|
51
52
|
"close-when-clicked-outside": e.closeOnBodyPressed,
|
|
52
53
|
direction: e.dropdownPosition === "top" ? "up" : "down",
|
|
@@ -176,7 +177,7 @@ const q = { class: "uikit-relative uikit-flex uikit-h-12 uikit-items-center" },
|
|
|
176
177
|
], 42, J))), 128))
|
|
177
178
|
]),
|
|
178
179
|
_: 3
|
|
179
|
-
}, 8, ["open", "class", "close-when-clicked-outside", "direction", "dropdown-classes"]),
|
|
180
|
+
}, 8, ["open", "class", "data-cy", "close-when-clicked-outside", "direction", "dropdown-classes"]),
|
|
180
181
|
e.feedback ? (l(), o(g, { key: 0 }, [
|
|
181
182
|
e.feedback.valid ? (l(), o("span", {
|
|
182
183
|
key: 0,
|
|
@@ -17,10 +17,7 @@ const b = /* @__PURE__ */ n({
|
|
|
17
17
|
},
|
|
18
18
|
setup(e) {
|
|
19
19
|
const o = c("isActive");
|
|
20
|
-
return (i, v) => (d(), u(t(h), {
|
|
21
|
-
value: e.value,
|
|
22
|
-
"data-cy": e.dataCy
|
|
23
|
-
}, {
|
|
20
|
+
return (i, v) => (d(), u(t(h), { value: e.value }, {
|
|
24
21
|
default: a(() => [
|
|
25
22
|
s(t(m), {
|
|
26
23
|
as: e.headerTag,
|
|
@@ -32,6 +29,7 @@ const b = /* @__PURE__ */ n({
|
|
|
32
29
|
default: a(() => [
|
|
33
30
|
l(i.$slots, "header-content"),
|
|
34
31
|
s(t(g), {
|
|
32
|
+
"data-cy": e.dataCy,
|
|
35
33
|
class: r([
|
|
36
34
|
e.triggerClasses,
|
|
37
35
|
{
|
|
@@ -54,7 +52,7 @@ const b = /* @__PURE__ */ n({
|
|
|
54
52
|
])
|
|
55
53
|
]),
|
|
56
54
|
_: 3
|
|
57
|
-
}, 8, ["class"])
|
|
55
|
+
}, 8, ["data-cy", "class"])
|
|
58
56
|
]),
|
|
59
57
|
_: 3
|
|
60
58
|
}, 8, ["as", "class"]),
|
|
@@ -71,7 +69,7 @@ const b = /* @__PURE__ */ n({
|
|
|
71
69
|
}, 8, ["class"])
|
|
72
70
|
]),
|
|
73
71
|
_: 3
|
|
74
|
-
}, 8, ["value"
|
|
72
|
+
}, 8, ["value"]));
|
|
75
73
|
}
|
|
76
74
|
});
|
|
77
75
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as P, mergeModels as O, useModel as B, useId as
|
|
1
|
+
import { defineComponent as P, mergeModels as O, useModel as B, useId as G, useTemplateRef as c, shallowRef as f, onBeforeMount as X, watch as T, nextTick as j, createBlock as V, openBlock as g, withCtx as S, createElementBlock as q, Fragment as J, renderList as Q, renderSlot as y, createElementVNode as s, normalizeClass as p, withDirectives as U, unref as Y, vModelText as Z, toDisplayString as _, withModifiers as ee, normalizeStyle as te, createTextVNode as le, vShow as ne } from "vue";
|
|
2
2
|
import oe from "../BaseDropDown.vue.js";
|
|
3
3
|
import '../../../../../assets/BaseDropDown.css';/* empty css */
|
|
4
4
|
import ae from "../BaseSelect/SelectItem.vue.js";
|
|
@@ -30,34 +30,43 @@ const ue = ["id", "data-cy", "placeholder"], se = ["innerHTML"], ke = /* @__PURE
|
|
|
30
30
|
inputValueModifiers: {}
|
|
31
31
|
}),
|
|
32
32
|
emits: /* @__PURE__ */ O(["input", "click", "inputClick", "keydown"], ["update:open", "update:modelValue", "update:inputValue"]),
|
|
33
|
-
setup(t, { expose:
|
|
33
|
+
setup(t, { expose: W, emit: E }) {
|
|
34
34
|
const r = B(t, "open"), u = B(t, "modelValue"), o = B(t, "inputValue");
|
|
35
35
|
o.value = o.value ?? u.value?.label ?? "";
|
|
36
|
-
const
|
|
37
|
-
o.value = "", u.value = null,
|
|
36
|
+
const v = E, I = G(), h = c("inputRef"), k = f(0), w = f(!1), m = f(!!u.value?.label), x = f(null), i = f([]), M = c("dropdownRef"), F = c("hiddenSpan"), D = c("inputWrapperRef"), L = c("clearButtonRef"), z = () => {
|
|
37
|
+
o.value = "", u.value = null, m.value = !1;
|
|
38
38
|
}, K = async (l) => {
|
|
39
39
|
if (!l) {
|
|
40
|
-
|
|
40
|
+
i.value = [], r.value = !1;
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
43
|
-
t.disableCb || (
|
|
43
|
+
t.disableCb || (i.value = await x.value?.(l) || [], w.value = !0, r.value = !!i.value.length);
|
|
44
44
|
}, R = (l = -1) => {
|
|
45
|
-
const e =
|
|
46
|
-
!e || e.id === u.value?.id || (t.onOptionSelectedCb?.(e), o.value = e.label, r.value = !1, u.value = e,
|
|
45
|
+
const e = i.value[l];
|
|
46
|
+
!e || e.id === u.value?.id || (t.onOptionSelectedCb?.(e), o.value = e.label, r.value = !1, u.value = e, m.value = !0, i.value = []);
|
|
47
47
|
}, N = () => {
|
|
48
|
-
|
|
48
|
+
h.value?.select();
|
|
49
49
|
}, A = () => {
|
|
50
|
-
|
|
50
|
+
h.value?.focus();
|
|
51
51
|
};
|
|
52
|
-
return
|
|
52
|
+
return X(() => {
|
|
53
53
|
x.value = ie({ delay: 300 }, t.onInputChangeCb);
|
|
54
54
|
}), T(
|
|
55
|
-
[o, F,
|
|
55
|
+
[o, F, D, L],
|
|
56
56
|
([, l, e, n]) => {
|
|
57
|
-
!l || !e ||
|
|
57
|
+
!l || !e || j(() => {
|
|
58
58
|
if (!l || !e) return;
|
|
59
|
-
const
|
|
60
|
-
|
|
59
|
+
const C = l.offsetWidth, d = e.offsetWidth, a = t.clearButton?.offset || 0, b = t.clearButton?.width || n?.offsetWidth || 0, H = d - a - b;
|
|
60
|
+
console.log("DEBUG:", {
|
|
61
|
+
curSpanEl: l,
|
|
62
|
+
curWrapperEl: e,
|
|
63
|
+
textWidth: C,
|
|
64
|
+
wrapperWidth: d,
|
|
65
|
+
buttonOffset: a,
|
|
66
|
+
buttonWidth: b
|
|
67
|
+
});
|
|
68
|
+
const $ = Math.min(C, H);
|
|
69
|
+
$ !== k.value && (k.value = $);
|
|
61
70
|
});
|
|
62
71
|
},
|
|
63
72
|
{ immediate: !0 }
|
|
@@ -73,7 +82,7 @@ const ue = ["id", "data-cy", "placeholder"], se = ["innerHTML"], ke = /* @__PURE
|
|
|
73
82
|
l === e || l?.label === o.value || (o.value = l?.label || "");
|
|
74
83
|
},
|
|
75
84
|
{ immediate: !0 }
|
|
76
|
-
),
|
|
85
|
+
), W({
|
|
77
86
|
getRootElement: () => M.value?.getRootElement(),
|
|
78
87
|
select: N,
|
|
79
88
|
focus: A
|
|
@@ -83,24 +92,24 @@ const ue = ["id", "data-cy", "placeholder"], se = ["innerHTML"], ke = /* @__PURE
|
|
|
83
92
|
"data-cy": t.dataCy,
|
|
84
93
|
"dropdown-element": "ul",
|
|
85
94
|
"dropdown-classes": ["uikit-z-30", t.dropdownClasses],
|
|
86
|
-
"keep-state": !
|
|
95
|
+
"keep-state": !i.value.length || t.keepState === "closed" ? "closed" : "opened",
|
|
87
96
|
"activate-keyboard-controller": t.enableKeyboardController,
|
|
88
|
-
"reset-keyboard-controller":
|
|
89
|
-
"onUpdate:resetKeyboardController": e[5] || (e[5] = (n) =>
|
|
97
|
+
"reset-keyboard-controller": w.value,
|
|
98
|
+
"onUpdate:resetKeyboardController": e[5] || (e[5] = (n) => w.value = n),
|
|
90
99
|
open: r.value,
|
|
91
100
|
"onUpdate:open": e[6] || (e[6] = (n) => r.value = n)
|
|
92
101
|
}, {
|
|
93
102
|
btn_slot: S(() => [
|
|
94
103
|
s("div", {
|
|
95
|
-
class:
|
|
96
|
-
onClick: e[4] || (e[4] = (n) =>
|
|
104
|
+
class: p(["uikit-text-16", t.triggerWrapperClasses]),
|
|
105
|
+
onClick: e[4] || (e[4] = (n) => v("click", n))
|
|
97
106
|
}, [
|
|
98
|
-
|
|
107
|
+
y(l.$slots, "left-icon"),
|
|
99
108
|
s("div", {
|
|
100
109
|
ref: "inputWrapperRef",
|
|
101
|
-
class:
|
|
110
|
+
class: p(["uikit-relative", t.inputWrapperClasses])
|
|
102
111
|
}, [
|
|
103
|
-
|
|
112
|
+
U(s("input", {
|
|
104
113
|
ref: "inputRef",
|
|
105
114
|
"onUpdate:modelValue": [
|
|
106
115
|
e[0] || (e[0] = (n) => o.value = n),
|
|
@@ -110,18 +119,18 @@ const ue = ["id", "data-cy", "placeholder"], se = ["innerHTML"], ke = /* @__PURE
|
|
|
110
119
|
"data-cy": t.dataCy ? `ac_input_${t.dataCy}` : "",
|
|
111
120
|
type: "text",
|
|
112
121
|
autocomplete: "off",
|
|
113
|
-
class:
|
|
122
|
+
class: p(["uikit-w-full uikit-border-none focus-visible:uikit-outline-none", t.inputClasses]),
|
|
114
123
|
style: {
|
|
115
124
|
font: "inherit",
|
|
116
125
|
fontSize: "inherit"
|
|
117
126
|
},
|
|
118
127
|
placeholder: t.placeholder,
|
|
119
|
-
onKeydown: e[1] || (e[1] = (n) =>
|
|
128
|
+
onKeydown: e[1] || (e[1] = (n) => v("keydown", n)),
|
|
120
129
|
onInput: e[2] || (e[2] = (n) => {
|
|
121
|
-
|
|
130
|
+
v("input", n), m.value = !1;
|
|
122
131
|
}),
|
|
123
132
|
onClick: e[3] || (e[3] = (n) => {
|
|
124
|
-
|
|
133
|
+
v("inputClick", n), h.value?.select();
|
|
125
134
|
})
|
|
126
135
|
}, null, 42, ue), [
|
|
127
136
|
[Z, o.value]
|
|
@@ -129,49 +138,49 @@ const ue = ["id", "data-cy", "placeholder"], se = ["innerHTML"], ke = /* @__PURE
|
|
|
129
138
|
s("span", {
|
|
130
139
|
ref_key: "hiddenSpan",
|
|
131
140
|
ref: F,
|
|
132
|
-
class:
|
|
141
|
+
class: p(["uikit-invisible uikit-absolute uikit-left-0 uikit-top-0 uikit-whitespace-pre", t.hiddenTextClasses]),
|
|
133
142
|
style: {
|
|
134
143
|
font: "inherit",
|
|
135
144
|
fontSize: "inherit"
|
|
136
145
|
}
|
|
137
146
|
}, _(o.value), 3),
|
|
138
|
-
|
|
147
|
+
U(s("button", {
|
|
139
148
|
ref: "clearButtonRef",
|
|
140
149
|
type: "button",
|
|
141
|
-
class:
|
|
150
|
+
class: p(["uikit-clear-btn uikit-absolute uikit-top-1/2 -uikit-translate-y-1/2 uikit-appearance-none", t.clearButton?.classes]),
|
|
142
151
|
"aria-label": "Clear input",
|
|
143
152
|
style: te({
|
|
144
|
-
left: `${
|
|
153
|
+
left: `${k.value + (t.clearButton?.offset || 0)}px`,
|
|
145
154
|
width: t.clearButton?.width ? `${t.clearButton.width}px` : "auto",
|
|
146
155
|
height: t.clearButton?.height ? `${t.clearButton.height}px` : "auto"
|
|
147
156
|
}),
|
|
148
|
-
onClick: ee(
|
|
157
|
+
onClick: ee(z, ["stop"])
|
|
149
158
|
}, [
|
|
150
|
-
|
|
159
|
+
y(l.$slots, "clear-icon", {}, () => [
|
|
151
160
|
e[7] || (e[7] = le("X", -1))
|
|
152
161
|
])
|
|
153
162
|
], 6), [
|
|
154
|
-
[ne,
|
|
163
|
+
[ne, m.value && k.value]
|
|
155
164
|
])
|
|
156
165
|
], 2),
|
|
157
|
-
|
|
166
|
+
y(l.$slots, "right-icon")
|
|
158
167
|
], 2)
|
|
159
168
|
]),
|
|
160
|
-
default: S(({ activeIdx: n, setActiveIdx:
|
|
161
|
-
(g(!0),
|
|
162
|
-
key:
|
|
163
|
-
active: n ===
|
|
169
|
+
default: S(({ activeIdx: n, setActiveIdx: C }) => [
|
|
170
|
+
(g(!0), q(J, null, Q(i.value, (d, a) => (g(), V(ae, {
|
|
171
|
+
key: a,
|
|
172
|
+
active: n === a,
|
|
164
173
|
class: "uikit-m-1 uikit-rounded-[5px] uikit-px-5 uikit-py-10px hover:uikit-cursor-pointer",
|
|
165
|
-
onClick: (
|
|
166
|
-
onMouseover: (
|
|
174
|
+
onClick: (b) => R(a),
|
|
175
|
+
onMouseover: (b) => C(a)
|
|
167
176
|
}, {
|
|
168
177
|
default: S(() => [
|
|
169
|
-
|
|
170
|
-
option:
|
|
171
|
-
idx:
|
|
178
|
+
y(l.$slots, "option-content", {
|
|
179
|
+
option: d,
|
|
180
|
+
idx: a
|
|
172
181
|
}, () => [
|
|
173
182
|
s("span", {
|
|
174
|
-
innerHTML:
|
|
183
|
+
innerHTML: d.label
|
|
175
184
|
}, null, 8, se)
|
|
176
185
|
])
|
|
177
186
|
]),
|
package/package.json
CHANGED
|
File without changes
|