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