@wikicasa-dev/components 2.2.9-alpha.66 → 2.2.9-alpha.7
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/AccessibleSelect.d.ts +4 -5
- package/dist/UIKit/AccessibleSelect.js +2 -3
- package/dist/UIKit/Autocomplete/ClearableAutocomplete.d.ts +2 -7
- package/dist/UIKit/BaseAutocomplete.d.ts +4 -4
- package/dist/UIKit/BaseButton.d.ts +8 -14
- package/dist/UIKit/BaseCard.js +3 -1
- package/dist/UIKit/BaseDropDown.d.ts +11 -17
- package/dist/UIKit/BaseFloatingLabel.js +4 -4
- package/dist/UIKit/BaseInput.d.ts +2 -3
- package/dist/UIKit/BaseInput.js +1 -1
- package/dist/UIKit/BaseSnackbar.d.ts +2 -2
- package/dist/UIKit/BaseTextarea.d.ts +2 -2
- package/dist/UIKit/Checkbox/CheckboxBtn.d.ts +7 -14
- package/dist/UIKit/Checkbox/CheckboxGroup.d.ts +2 -5
- package/dist/UIKit/Radio/RadioButton.d.ts +23 -28
- package/dist/UIKit/Radio/RadioGroup.d.ts +50 -49
- package/dist/assets/BaseCard.css +1 -1
- package/dist/assets/BaseDropDown.css +1 -1
- package/dist/assets/BaseFloatingLabel.css +1 -1
- package/dist/assets/BaseInput.css +1 -1
- package/dist/assets/tailwind.css +1 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.js +83 -92
- package/dist/packages/components/lib/UIKit/AccessibleSelect.vue.js +160 -158
- package/dist/packages/components/lib/UIKit/Accordion/BaseAccordionItem.vue.js +6 -4
- package/dist/packages/components/lib/UIKit/Autocomplete/ClearableAutocomplete.vue.js +106 -112
- package/dist/packages/components/lib/UIKit/BaseAutocomplete.vue.js +36 -36
- package/dist/packages/components/lib/UIKit/BaseButton.vue.js +24 -28
- package/dist/packages/components/lib/UIKit/BaseCard.vue.js +13 -13
- package/dist/packages/components/lib/UIKit/BaseDropDown.vue.js +105 -102
- package/dist/packages/components/lib/UIKit/BaseFloatingLabel.vue.js +8 -8
- package/dist/packages/components/lib/UIKit/BaseInput.vue.js +64 -65
- package/dist/packages/components/lib/UIKit/BaseModal.vue.js +36 -42
- package/dist/packages/components/lib/UIKit/BaseSelect/SelectItem.vue.js +17 -18
- package/dist/packages/components/lib/UIKit/Checkbox/CheckboxBtn.vue.js +37 -50
- package/dist/packages/components/lib/UIKit/Checkbox/CheckboxGroup.vue.js +55 -60
- package/dist/packages/components/lib/UIKit/Radio/RadioButton.vue.js +14 -16
- package/dist/packages/components/lib/UIKit/Radio/RadioGroup.vue.js +33 -37
- package/dist/types/index.d.ts +0 -3
- package/package.json +7 -8
- package/dist/UIKit/Checkbox/v2/CheckboxButtonGroup.d.ts +0 -40
- package/dist/UIKit/Checkbox/v2/CheckboxButtonGroup.js +0 -4
- package/dist/UIKit/Radio/v2/RadioButtonGroup.d.ts +0 -29
- package/dist/UIKit/Radio/v2/RadioButtonGroup.js +0 -4
- package/dist/UIKit/Radio/v2/RadioButtonItem.d.ts +0 -16
- package/dist/UIKit/Radio/v2/RadioButtonItem.js +0 -5
- package/dist/assets/AccessibleSelect.css +0 -1
- package/dist/assets/RadioButtonItem.css +0 -1
- package/dist/composables/mock.d.ts +0 -25
- package/dist/composables/mock.js +0 -49
- package/dist/packages/components/lib/UIKit/Checkbox/v2/CheckboxButtonGroup.vue.js +0 -78
- package/dist/packages/components/lib/UIKit/Radio/v2/RadioButtonGroup.vue.js +0 -49
- package/dist/packages/components/lib/UIKit/Radio/v2/RadioButtonItem.vue.js +0 -45
- /package/dist/assets/{swiper-controller.css → swiper-keyboard.css} +0 -0
|
@@ -1,22 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as D, mergeModels as $, useModel as y, shallowRef as d, useId as N, useTemplateRef as b, onBeforeMount as A, watch as w, nextTick as H, createBlock as F, openBlock as h, withCtx as g, createElementBlock as P, Fragment as X, renderList as j, renderSlot as p, createElementVNode as u, normalizeClass as f, withDirectives as O, unref as q, vModelText as G, toDisplayString as J, withModifiers as Q, normalizeStyle as Y, createTextVNode as Z, vShow as _ } from "vue";
|
|
2
|
+
import ee from "../BaseDropDown.vue.js";
|
|
3
3
|
import '../../../../../assets/BaseDropDown.css';/* empty css */
|
|
4
|
-
import
|
|
5
|
-
import { debounce as
|
|
6
|
-
const
|
|
4
|
+
import te from "../BaseSelect/SelectItem.vue.js";
|
|
5
|
+
import { debounce as le } from "@wikicasa-dev/utilities";
|
|
6
|
+
const ne = ["id", "data-cy", "placeholder"], oe = ["innerHTML"], ce = /* @__PURE__ */ D({
|
|
7
7
|
__name: "ClearableAutocomplete",
|
|
8
|
-
props: /* @__PURE__ */
|
|
8
|
+
props: /* @__PURE__ */ $({
|
|
9
9
|
dataCy: {},
|
|
10
10
|
placeholder: {},
|
|
11
11
|
enableKeyboardController: { type: Boolean, default: !0 },
|
|
12
12
|
triggerWrapperClasses: {},
|
|
13
13
|
inputWrapperClasses: {},
|
|
14
14
|
inputClasses: {},
|
|
15
|
-
hiddenTextClasses: {},
|
|
16
15
|
dropdownClasses: {},
|
|
17
16
|
clearButton: {},
|
|
18
17
|
keepState: {},
|
|
19
|
-
disableCb: { type: Boolean, default: !1 },
|
|
20
18
|
onInputChangeCb: { type: Function },
|
|
21
19
|
onOptionSelectedCb: { type: [Function, null] }
|
|
22
20
|
}, {
|
|
@@ -29,164 +27,160 @@ const ce = ["id", "data-cy", "placeholder"], fe = ["innerHTML"], ye = /* @__PURE
|
|
|
29
27
|
},
|
|
30
28
|
inputValueModifiers: {}
|
|
31
29
|
}),
|
|
32
|
-
emits: /* @__PURE__ */
|
|
33
|
-
setup(
|
|
34
|
-
const s =
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
30
|
+
emits: /* @__PURE__ */ $(["click", "inputClick", "keydown"], ["update:open", "update:modelValue", "update:inputValue"]),
|
|
31
|
+
setup(l, { expose: R, emit: x }) {
|
|
32
|
+
const s = y(l, "open"), a = y(l, "modelValue"), o = y(l, "inputValue");
|
|
33
|
+
o.value = o.value ?? a.value?.label ?? "";
|
|
34
|
+
const v = x, k = d(!1), E = N(), m = b("inputRef"), c = d(0), C = d(!1), S = d(null), i = d([]), T = b("dropdownRef"), M = b("hiddenSpan"), U = () => {
|
|
35
|
+
o.value = "", a.value = null;
|
|
36
|
+
}, I = async (t) => {
|
|
37
|
+
if (!t) {
|
|
38
|
+
i.value = [], s.value = !1;
|
|
39
39
|
return;
|
|
40
40
|
}
|
|
41
|
-
|
|
42
|
-
},
|
|
43
|
-
const e =
|
|
44
|
-
!e || e.id ===
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
},
|
|
48
|
-
|
|
41
|
+
i.value = await S.value?.(t) || [], C.value = !0, s.value = !!i.value.length;
|
|
42
|
+
}, B = (t = -1) => {
|
|
43
|
+
const e = i.value[t];
|
|
44
|
+
!e || e.id === a.value?.id || (l.onOptionSelectedCb?.(e), o.value = e.label, s.value = !1, a.value = e, i.value = []);
|
|
45
|
+
}, W = () => {
|
|
46
|
+
m.value?.select();
|
|
47
|
+
}, z = () => {
|
|
48
|
+
m.value?.focus();
|
|
49
49
|
};
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}), E(
|
|
68
|
-
() => O.value?.selectedIdx,
|
|
69
|
-
(l) => {
|
|
70
|
-
const e = l ?? -1;
|
|
71
|
-
e !== -1 && F(e);
|
|
50
|
+
return A(() => {
|
|
51
|
+
S.value = le({ delay: 300 }, l.onInputChangeCb);
|
|
52
|
+
}), w(
|
|
53
|
+
[o, () => M.value],
|
|
54
|
+
([, t]) => {
|
|
55
|
+
t && H(() => {
|
|
56
|
+
if (!t) return;
|
|
57
|
+
const e = t.offsetWidth;
|
|
58
|
+
e !== c.value && (c.value = e);
|
|
59
|
+
});
|
|
60
|
+
},
|
|
61
|
+
{ immediate: !0 }
|
|
62
|
+
), w(
|
|
63
|
+
() => T.value?.selectedIdx,
|
|
64
|
+
(t) => {
|
|
65
|
+
const e = t ?? -1;
|
|
66
|
+
e !== -1 && B(e);
|
|
72
67
|
}
|
|
73
|
-
),
|
|
74
|
-
|
|
75
|
-
(
|
|
76
|
-
if (
|
|
77
|
-
|
|
78
|
-
|
|
68
|
+
), w(
|
|
69
|
+
a,
|
|
70
|
+
(t, e) => {
|
|
71
|
+
if (!(t === e || t?.label === o.value)) {
|
|
72
|
+
if (k.value) {
|
|
73
|
+
k.value = !1;
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
o.value = t?.label || "";
|
|
77
|
+
}
|
|
79
78
|
},
|
|
80
79
|
{ immediate: !0 }
|
|
81
|
-
),
|
|
82
|
-
getRootElement: () =>
|
|
83
|
-
select:
|
|
84
|
-
focus:
|
|
85
|
-
}), (
|
|
80
|
+
), R({
|
|
81
|
+
getRootElement: () => T.value?.getRootElement(),
|
|
82
|
+
select: W,
|
|
83
|
+
focus: z
|
|
84
|
+
}), (t, e) => (h(), F(ee, {
|
|
86
85
|
ref: "dropdownRef",
|
|
87
86
|
class: "uikit-clearable-autocomplete",
|
|
88
|
-
"data-cy":
|
|
87
|
+
"data-cy": l.dataCy,
|
|
89
88
|
"dropdown-element": "ul",
|
|
90
|
-
"dropdown-classes": ["uikit-z-30",
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
|
|
96
|
-
"onUpdate:
|
|
89
|
+
"dropdown-classes": ["uikit-z-30", l.dropdownClasses],
|
|
90
|
+
"open-dropdown": s.value,
|
|
91
|
+
"keep-state": !i.value.length || l.keepState === "closed" ? "closed" : "opened",
|
|
92
|
+
"activate-keyboard-controller": l.enableKeyboardController,
|
|
93
|
+
"reset-keyboard-controller": C.value,
|
|
94
|
+
"onUpdate:resetKeyboardController": e[4] || (e[4] = (n) => C.value = n),
|
|
95
|
+
"onUpdate:dropdownState": e[5] || (e[5] = (n) => s.value = n)
|
|
97
96
|
}, {
|
|
98
|
-
btn_slot:
|
|
97
|
+
btn_slot: g(() => [
|
|
99
98
|
u("div", {
|
|
100
|
-
class: f(["uikit-text-16",
|
|
101
|
-
onClick: e[
|
|
99
|
+
class: f(["uikit-text-16", l.triggerWrapperClasses]),
|
|
100
|
+
onClick: e[3] || (e[3] = (n) => v("click", n))
|
|
102
101
|
}, [
|
|
103
|
-
|
|
102
|
+
p(t.$slots, "left-icon"),
|
|
104
103
|
u("div", {
|
|
105
|
-
|
|
106
|
-
class: f(["uikit-relative", t.inputWrapperClasses])
|
|
104
|
+
class: f(["uikit-relative", l.inputWrapperClasses])
|
|
107
105
|
}, [
|
|
108
|
-
|
|
106
|
+
O(u("input", {
|
|
109
107
|
ref: "inputRef",
|
|
110
108
|
"onUpdate:modelValue": [
|
|
111
109
|
e[0] || (e[0] = (n) => o.value = n),
|
|
112
|
-
|
|
110
|
+
I
|
|
113
111
|
],
|
|
114
|
-
id:
|
|
115
|
-
"data-cy":
|
|
112
|
+
id: q(E),
|
|
113
|
+
"data-cy": l.dataCy ? `ac_input_${l.dataCy}` : "",
|
|
116
114
|
type: "text",
|
|
117
115
|
autocomplete: "off",
|
|
118
|
-
class: f(["uikit-w-full uikit-border-none focus-visible:uikit-outline-none",
|
|
116
|
+
class: f(["uikit-w-full uikit-border-none focus-visible:uikit-outline-none", l.inputClasses]),
|
|
119
117
|
style: {
|
|
120
118
|
font: "inherit",
|
|
121
119
|
fontSize: "inherit"
|
|
122
120
|
},
|
|
123
|
-
placeholder:
|
|
124
|
-
onKeydown: e[1] || (e[1] = (n) =>
|
|
125
|
-
|
|
126
|
-
v("input", n), r.value = !1;
|
|
121
|
+
placeholder: l.placeholder,
|
|
122
|
+
onKeydown: e[1] || (e[1] = (n) => {
|
|
123
|
+
v("keydown", n), o.value && (k.value = !0, a.value = null);
|
|
127
124
|
}),
|
|
128
|
-
onClick: e[
|
|
129
|
-
v("inputClick", n),
|
|
125
|
+
onClick: e[2] || (e[2] = (n) => {
|
|
126
|
+
v("inputClick", n), m.value?.select();
|
|
130
127
|
})
|
|
131
|
-
}, null, 42,
|
|
132
|
-
[
|
|
128
|
+
}, null, 42, ne), [
|
|
129
|
+
[G, o.value]
|
|
133
130
|
]),
|
|
134
131
|
u("span", {
|
|
135
132
|
ref_key: "hiddenSpan",
|
|
136
|
-
ref:
|
|
137
|
-
class:
|
|
133
|
+
ref: M,
|
|
134
|
+
class: "uikit-invisible uikit-absolute uikit-left-0 uikit-top-0 uikit-whitespace-pre",
|
|
138
135
|
style: {
|
|
139
136
|
font: "inherit",
|
|
140
137
|
fontSize: "inherit"
|
|
141
138
|
}
|
|
142
|
-
},
|
|
143
|
-
|
|
144
|
-
ref: "clearButtonRef",
|
|
139
|
+
}, J(o.value), 513),
|
|
140
|
+
O(u("button", {
|
|
145
141
|
type: "button",
|
|
146
|
-
class: f(["uikit-clear-btn uikit-absolute uikit-top-1/2 -uikit-translate-y-1/2 uikit-appearance-none",
|
|
142
|
+
class: f(["uikit-clear-btn uikit-absolute uikit-top-1/2 -uikit-translate-y-1/2 uikit-appearance-none", l.clearButton?.classes]),
|
|
147
143
|
"aria-label": "Clear input",
|
|
148
|
-
style:
|
|
149
|
-
left: `${
|
|
150
|
-
width: t.clearButton?.width ? `${t.clearButton.width}px` : "auto",
|
|
151
|
-
height: t.clearButton?.height ? `${t.clearButton.height}px` : "auto"
|
|
144
|
+
style: Y({
|
|
145
|
+
left: `${c.value + (l.clearButton?.offset || 10)}px`
|
|
152
146
|
}),
|
|
153
|
-
onClick:
|
|
147
|
+
onClick: Q(U, ["stop"])
|
|
154
148
|
}, [
|
|
155
|
-
|
|
156
|
-
e[
|
|
149
|
+
p(t.$slots, "clear-icon", {}, () => [
|
|
150
|
+
e[6] || (e[6] = Z("X", -1))
|
|
157
151
|
])
|
|
158
152
|
], 6), [
|
|
159
|
-
[
|
|
153
|
+
[_, a.value?.label && c.value]
|
|
160
154
|
])
|
|
161
155
|
], 2),
|
|
162
|
-
|
|
156
|
+
p(t.$slots, "right-icon")
|
|
163
157
|
], 2)
|
|
164
158
|
]),
|
|
165
|
-
default:
|
|
166
|
-
(
|
|
167
|
-
key:
|
|
168
|
-
active: n ===
|
|
159
|
+
default: g(({ activeIdx: n, setActiveIdx: K }) => [
|
|
160
|
+
(h(!0), P(X, null, j(i.value, (V, r) => (h(), F(te, {
|
|
161
|
+
key: r,
|
|
162
|
+
active: n === r,
|
|
169
163
|
class: "uikit-m-1 uikit-rounded-[5px] uikit-px-5 uikit-py-10px hover:uikit-cursor-pointer",
|
|
170
|
-
onClick: (
|
|
171
|
-
onMouseover: (
|
|
164
|
+
onClick: (L) => B(r),
|
|
165
|
+
onMouseover: (L) => K(r)
|
|
172
166
|
}, {
|
|
173
|
-
default:
|
|
174
|
-
|
|
175
|
-
option:
|
|
176
|
-
idx:
|
|
167
|
+
default: g(() => [
|
|
168
|
+
p(t.$slots, "option-content", {
|
|
169
|
+
option: V,
|
|
170
|
+
idx: r
|
|
177
171
|
}, () => [
|
|
178
172
|
u("span", {
|
|
179
|
-
innerHTML:
|
|
180
|
-
}, null, 8,
|
|
173
|
+
innerHTML: V.label
|
|
174
|
+
}, null, 8, oe)
|
|
181
175
|
])
|
|
182
176
|
]),
|
|
183
177
|
_: 2
|
|
184
178
|
}, 1032, ["active", "onClick", "onMouseover"]))), 128))
|
|
185
179
|
]),
|
|
186
180
|
_: 3
|
|
187
|
-
}, 8, ["data-cy", "dropdown-classes", "keep-state", "activate-keyboard-controller", "reset-keyboard-controller"
|
|
181
|
+
}, 8, ["data-cy", "dropdown-classes", "open-dropdown", "keep-state", "activate-keyboard-controller", "reset-keyboard-controller"]));
|
|
188
182
|
}
|
|
189
183
|
});
|
|
190
184
|
export {
|
|
191
|
-
|
|
185
|
+
ce as default
|
|
192
186
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as x, mergeModels as $, useModel as F,
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as x, mergeModels as $, useModel as F, ref as d, computed as k, onBeforeMount as L, watch as f, createBlock as g, openBlock as w, normalizeClass as H, withCtx as c, createElementBlock as K, Fragment as T, renderList as z, unref as N, renderSlot as p, createElementVNode as U, createVNode as A } from "vue";
|
|
2
|
+
import W from "../../../../UIKit/BaseInput.js";
|
|
3
|
+
import j from "./BaseDropDown.vue.js";
|
|
4
4
|
import '../../../../assets/BaseDropDown.css';/* empty css */
|
|
5
|
-
import { debounce as
|
|
6
|
-
import
|
|
7
|
-
import { useKeyboardController as
|
|
8
|
-
const
|
|
5
|
+
import { debounce as q } from "@wikicasa-dev/utilities";
|
|
6
|
+
import G from "./BaseSelect/SelectItem.vue.js";
|
|
7
|
+
import { useKeyboardController as J } from "@wikicasa-dev/vue-composables";
|
|
8
|
+
const Q = ["innerHTML"], ne = /* @__PURE__ */ x({
|
|
9
9
|
__name: "BaseAutocomplete",
|
|
10
10
|
props: /* @__PURE__ */ $({
|
|
11
11
|
isValid: { type: [Boolean, null], default: null },
|
|
@@ -30,13 +30,13 @@ const J = ["innerHTML"], ne = /* @__PURE__ */ x({
|
|
|
30
30
|
modelModifiers: {}
|
|
31
31
|
}),
|
|
32
32
|
emits: /* @__PURE__ */ $(["update:dropdownState", "changedValue", "click", "keydown", "keydownEnterPressed"], ["update:modelValue"]),
|
|
33
|
-
setup(t, { expose:
|
|
34
|
-
const u = F(t, "modelValue"), r =
|
|
33
|
+
setup(t, { expose: S, emit: V }) {
|
|
34
|
+
const u = F(t, "modelValue"), r = V, i = d(""), a = d([]), v = d(null), b = d(!1), n = d(!1), C = d(null), B = k(() => a.value.length);
|
|
35
35
|
L(() => {
|
|
36
|
-
v.value =
|
|
36
|
+
v.value = q({ delay: 300 }, t.onInputChangeCb);
|
|
37
37
|
});
|
|
38
|
-
const { activeIdx: m, selectedIdx: h } =
|
|
39
|
-
optionsLength:
|
|
38
|
+
const { activeIdx: m, selectedIdx: h } = J({
|
|
39
|
+
optionsLength: B,
|
|
40
40
|
isDropdownOpen: n,
|
|
41
41
|
disableSpaceHandler: !0
|
|
42
42
|
}), O = k(() => {
|
|
@@ -76,15 +76,15 @@ const J = ["innerHTML"], ne = /* @__PURE__ */ x({
|
|
|
76
76
|
}), D = async (e) => {
|
|
77
77
|
if (i.value !== e && (r("changedValue", e), i.value = e, !!t.onInputChangeCb)) {
|
|
78
78
|
if (!e || b.value) {
|
|
79
|
-
|
|
79
|
+
a.value = [], b.value = !1, h.value = -1, m.value = -1, u.value && (u.value.label = ""), n.value = !1, await v.value(null);
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
|
-
t.disableCb || (
|
|
82
|
+
t.disableCb || (a.value = await v.value(e), n.value = !!a.value.length);
|
|
83
83
|
}
|
|
84
84
|
}, y = (e, l) => {
|
|
85
|
-
t.onOptionSelectedCb && t.onOptionSelectedCb(e), t.cleanupOnClose && (
|
|
85
|
+
t.onOptionSelectedCb && t.onOptionSelectedCb(e), t.cleanupOnClose && (a.value = []), b.value = !0, i.value = e.label, u.value = e, n.value = !1, h.value = l;
|
|
86
86
|
}, E = () => {
|
|
87
|
-
|
|
87
|
+
a.value.length && t.keepState !== "closed" && (n.value = !0);
|
|
88
88
|
};
|
|
89
89
|
return f(
|
|
90
90
|
u,
|
|
@@ -93,21 +93,21 @@ const J = ["innerHTML"], ne = /* @__PURE__ */ x({
|
|
|
93
93
|
},
|
|
94
94
|
{ immediate: !0 }
|
|
95
95
|
), f(h, (e) => {
|
|
96
|
-
if (e === -1 || !
|
|
97
|
-
const l =
|
|
96
|
+
if (e === -1 || !a.value.length) return;
|
|
97
|
+
const l = a.value[e];
|
|
98
98
|
b.value && l.label === u.value?.label || y(l, e);
|
|
99
99
|
}), f(
|
|
100
100
|
() => t.keepState,
|
|
101
101
|
(e) => {
|
|
102
|
-
e === "closed" ? (n.value = !1, t.cleanupOnClose && (
|
|
102
|
+
e === "closed" ? (n.value = !1, t.cleanupOnClose && (a.value = [])) : e === "open" && a.value.length && (n.value = !0);
|
|
103
103
|
}
|
|
104
104
|
), f(n, (e) => {
|
|
105
105
|
r("update:dropdownState", e);
|
|
106
|
-
}),
|
|
106
|
+
}), S({
|
|
107
107
|
select: () => {
|
|
108
108
|
C.value?.select();
|
|
109
109
|
}
|
|
110
|
-
}), (e, l) => (w(), g(
|
|
110
|
+
}), (e, l) => (w(), g(j, {
|
|
111
111
|
class: H(["uikit-autocomplete", e.$attrs["root-classes"]]),
|
|
112
112
|
"data-cy": t.dataCy ? t.dataCy : `ac_${e.$attrs.id}`,
|
|
113
113
|
"dropdown-element": "ul",
|
|
@@ -122,17 +122,17 @@ const J = ["innerHTML"], ne = /* @__PURE__ */ x({
|
|
|
122
122
|
"uikit-z-30",
|
|
123
123
|
t.dropdownClasses
|
|
124
124
|
],
|
|
125
|
-
open: n.value,
|
|
126
|
-
"keep-state": !
|
|
125
|
+
"open-dropdown": n.value,
|
|
126
|
+
"keep-state": !a.value.length || t.keepState === "closed" ? "closed" : "opened",
|
|
127
127
|
"close-when-clicked-outside": t.closeDropdownOnBodyPressed,
|
|
128
128
|
"activate-keyboard-controller": !1,
|
|
129
|
-
"onUpdate:
|
|
130
|
-
onClick: l[4] || (l[4] = (
|
|
129
|
+
"onUpdate:dropdownState": l[3] || (l[3] = (o) => n.value = o),
|
|
130
|
+
onClick: l[4] || (l[4] = (o) => {
|
|
131
131
|
r("click"), E();
|
|
132
132
|
})
|
|
133
133
|
}, {
|
|
134
134
|
btn_slot: c(() => [
|
|
135
|
-
A(
|
|
135
|
+
A(W, {
|
|
136
136
|
id: e.$attrs.id ? `ac_input_${e.$attrs.id}` : "",
|
|
137
137
|
ref_key: "baseInput",
|
|
138
138
|
ref: C,
|
|
@@ -150,42 +150,42 @@ const J = ["innerHTML"], ne = /* @__PURE__ */ x({
|
|
|
150
150
|
"!uikit-ml-0 !uikit-w-full"
|
|
151
151
|
],
|
|
152
152
|
"fieldset-classes": [I.value, t.fieldsetClasses],
|
|
153
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
154
|
-
onKeydown: l[1] || (l[1] = (
|
|
153
|
+
"onUpdate:modelValue": l[0] || (l[0] = (o) => D(o === void 0 ? "" : `${o}`)),
|
|
154
|
+
onKeydown: l[1] || (l[1] = (o) => r("keydown", o)),
|
|
155
155
|
onKeydownEnterPressed: l[2] || (l[2] = () => r("keydownEnterPressed"))
|
|
156
156
|
}, {
|
|
157
157
|
leftIcon: c(() => [
|
|
158
158
|
p(e.$slots, "lefticon")
|
|
159
159
|
]),
|
|
160
|
-
righticon: c(({ handleClean:
|
|
161
|
-
p(e.$slots, "righticon", { handleClean:
|
|
160
|
+
righticon: c(({ handleClean: o }) => [
|
|
161
|
+
p(e.$slots, "righticon", { handleClean: o })
|
|
162
162
|
]),
|
|
163
163
|
_: 3
|
|
164
164
|
}, 8, ["id", "data-cy", "label-text", "model-value", "is-valid", "disabled", "placeholder", "with-left-icon", "with-right-icon", "input-class", "fieldset-classes"])
|
|
165
165
|
]),
|
|
166
166
|
default: c(() => [
|
|
167
|
-
(w(!0), K(T, null, z(
|
|
167
|
+
(w(!0), K(T, null, z(a.value, (o, s) => (w(), g(G, {
|
|
168
168
|
key: s,
|
|
169
169
|
active: N(m) === s,
|
|
170
170
|
class: "uikit-m-1 uikit-rounded-[5px] uikit-px-5 uikit-py-10px hover:uikit-cursor-pointer",
|
|
171
|
-
onClick: (P) => y(
|
|
171
|
+
onClick: (P) => y(o, s),
|
|
172
172
|
onMouseover: (P) => m.value = s
|
|
173
173
|
}, {
|
|
174
174
|
default: c(() => [
|
|
175
175
|
p(e.$slots, "option-content", {
|
|
176
|
-
option:
|
|
176
|
+
option: o,
|
|
177
177
|
idx: s
|
|
178
178
|
}, () => [
|
|
179
179
|
U("span", {
|
|
180
|
-
innerHTML:
|
|
181
|
-
}, null, 8,
|
|
180
|
+
innerHTML: o.label
|
|
181
|
+
}, null, 8, Q)
|
|
182
182
|
])
|
|
183
183
|
]),
|
|
184
184
|
_: 2
|
|
185
185
|
}, 1032, ["active", "onClick", "onMouseover"]))), 128))
|
|
186
186
|
]),
|
|
187
187
|
_: 3
|
|
188
|
-
}, 8, ["class", "data-cy", "dropdown-classes", "open", "keep-state", "close-when-clicked-outside"]));
|
|
188
|
+
}, 8, ["class", "data-cy", "dropdown-classes", "open-dropdown", "keep-state", "close-when-clicked-outside"]));
|
|
189
189
|
}
|
|
190
190
|
});
|
|
191
191
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as c, ref as b, computed as l, createElementBlock as f, openBlock as v, withModifiers as s, normalizeStyle as B, normalizeClass as C, renderSlot as u, createVNode as M } from "vue";
|
|
2
|
+
import z from "../../../../UIKit/StaticSpinner.js";
|
|
3
|
+
const L = ["id", "data-cy", "type", "data-active", "disabled", "aria-label", "title"], $ = /* @__PURE__ */ c({
|
|
4
4
|
__name: "BaseButton",
|
|
5
5
|
props: {
|
|
6
6
|
btnClass: { default: "uikit-btn-w-primary" },
|
|
@@ -15,21 +15,18 @@ const S = ["id", "data-cy", "type", "data-active", "disabled", "aria-label", "ti
|
|
|
15
15
|
dataCy: {},
|
|
16
16
|
type: {}
|
|
17
17
|
},
|
|
18
|
-
emits: ["mouseover", "mouseout", "click"
|
|
19
|
-
setup(e, {
|
|
20
|
-
const o =
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
|
|
18
|
+
emits: ["mouseover", "mouseout", "click"],
|
|
19
|
+
setup(e, { emit: d }) {
|
|
20
|
+
const o = d, n = b(!1), r = l(() => e.size ? `uikit-btn-${e.size}` : ""), m = l(() => e.outlined ? "uikit-btn-outline" : ""), k = () => {
|
|
21
|
+
n.value = !0;
|
|
22
|
+
}, y = () => {
|
|
23
|
+
n.value = !1;
|
|
24
24
|
};
|
|
25
|
-
return
|
|
26
|
-
|
|
27
|
-
}), (n, t) => (w(), C("button", {
|
|
28
|
-
ref: "buttonEl",
|
|
29
|
-
id: n.$attrs.id,
|
|
25
|
+
return (a, t) => (v(), f("button", {
|
|
26
|
+
id: a.$attrs.id,
|
|
30
27
|
"data-cy": e.dataCy,
|
|
31
28
|
type: e.type,
|
|
32
|
-
class:
|
|
29
|
+
class: C([
|
|
33
30
|
"uikit-btn",
|
|
34
31
|
{
|
|
35
32
|
"uikit-btn-empty": !e.withMinWidth,
|
|
@@ -37,34 +34,33 @@ const S = ["id", "data-cy", "type", "data-active", "disabled", "aria-label", "ti
|
|
|
37
34
|
"uikit-flex uikit-items-center uikit-justify-center": e.isLoading
|
|
38
35
|
},
|
|
39
36
|
e.btnClass,
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
r.value,
|
|
38
|
+
m.value
|
|
42
39
|
]),
|
|
43
|
-
style:
|
|
40
|
+
style: B(a.$attrs.style),
|
|
44
41
|
"data-active": e.keepActive,
|
|
45
42
|
disabled: e.isLoading || e.disabled,
|
|
46
43
|
"aria-label": e.ariaLabel,
|
|
47
44
|
title: e.title,
|
|
48
45
|
onMouseover: t[0] || (t[0] = s((i) => {
|
|
49
|
-
|
|
46
|
+
k(), o("mouseover", i);
|
|
50
47
|
}, ["stop"])),
|
|
51
48
|
onMouseout: t[1] || (t[1] = s((i) => {
|
|
52
|
-
|
|
49
|
+
y(), o("mouseout", i);
|
|
53
50
|
}, ["stop"])),
|
|
54
|
-
onClick: t[2] || (t[2] = (i) => o("click", i))
|
|
55
|
-
onKeydown: t[3] || (t[3] = (i) => o("keydown", i))
|
|
51
|
+
onClick: t[2] || (t[2] = (i) => o("click", i))
|
|
56
52
|
}, [
|
|
57
|
-
e.isLoading ? u(
|
|
58
|
-
|
|
53
|
+
e.isLoading ? u(a.$slots, "spinner", { key: 1 }, () => [
|
|
54
|
+
M(z, {
|
|
59
55
|
"stroke-color": e.outlined ? "#ACB4C3" : "#fff"
|
|
60
56
|
}, null, 8, ["stroke-color"])
|
|
61
|
-
]) : u(
|
|
57
|
+
]) : u(a.$slots, "default", {
|
|
62
58
|
key: 0,
|
|
63
|
-
hover:
|
|
59
|
+
hover: n.value
|
|
64
60
|
})
|
|
65
|
-
], 46,
|
|
61
|
+
], 46, L));
|
|
66
62
|
}
|
|
67
63
|
});
|
|
68
64
|
export {
|
|
69
|
-
|
|
65
|
+
$ as default
|
|
70
66
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const p = /* @__PURE__ */
|
|
1
|
+
import { defineComponent as u, computed as d, createBlock as C, openBlock as y, resolveDynamicComponent as f, normalizeClass as a, withCtx as v, createElementVNode as o, renderSlot as c } from "vue";
|
|
2
|
+
const p = /* @__PURE__ */ u({
|
|
3
3
|
__name: "BaseCard",
|
|
4
4
|
props: {
|
|
5
5
|
type: { default: "" },
|
|
@@ -8,24 +8,24 @@ const p = /* @__PURE__ */ C({
|
|
|
8
8
|
cardBodyClasses: { default: "" }
|
|
9
9
|
},
|
|
10
10
|
emits: ["click"],
|
|
11
|
-
setup(e, { emit:
|
|
12
|
-
const n =
|
|
11
|
+
setup(e, { emit: l }) {
|
|
12
|
+
const n = l, r = d(
|
|
13
13
|
() => e.type === "news" ? "news-card" : e.type
|
|
14
|
-
), i =
|
|
15
|
-
return (
|
|
16
|
-
class: a(["
|
|
17
|
-
onClick:
|
|
14
|
+
), i = d(() => e.type ? `${e.type}-img` : "");
|
|
15
|
+
return (t, s) => (y(), C(f(e.rootComponent), {
|
|
16
|
+
class: a(["card", [r.value]]),
|
|
17
|
+
onClick: s[0] || (s[0] = (m) => n("click", m))
|
|
18
18
|
}, {
|
|
19
|
-
default:
|
|
20
|
-
|
|
19
|
+
default: v(() => [
|
|
20
|
+
o("div", {
|
|
21
21
|
class: a(["card-img", [i.value, e.cardImgClasses]])
|
|
22
22
|
}, [
|
|
23
|
-
|
|
23
|
+
c(t.$slots, "card-image", {}, void 0, !0)
|
|
24
24
|
], 2),
|
|
25
|
-
|
|
25
|
+
o("div", {
|
|
26
26
|
class: a(["card-body", [e.cardBodyClasses]])
|
|
27
27
|
}, [
|
|
28
|
-
|
|
28
|
+
c(t.$slots, "card-description", {}, void 0, !0)
|
|
29
29
|
], 2)
|
|
30
30
|
]),
|
|
31
31
|
_: 3
|