@validol4ik/uikit 0.11.8 → 0.11.10
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/{AppButtonCopy-BcnKy0Hr.js → AppButtonCopy-DQu1KNBi.js} +1 -1
- package/dist/{AppButtonCopy-CbU7oM_6.cjs → AppButtonCopy-DbH7hw-F.cjs} +1 -1
- package/dist/{BottomSheet-K4jnP9UL.cjs → BottomSheet-BobTTaFL.cjs} +1 -1
- package/dist/{BottomSheet-DIlZ1F2d.js → BottomSheet-CrndNgjV.js} +1 -1
- package/dist/index-CA8Ocm4H.cjs +1 -0
- package/dist/index-q0nYd4fI.js +1068 -0
- package/dist/style.css +1 -1
- package/dist/types/components/form/AppSelect/types.d.ts +1 -0
- package/dist/uikit.cjs +1 -1
- package/dist/uikit.es.js +1 -1
- package/package.json +1 -1
- package/dist/index-DDGnD5HB.cjs +0 -1
- package/dist/index-DouQ9AIq.js +0 -1056
package/dist/index-DouQ9AIq.js
DELETED
|
@@ -1,1056 +0,0 @@
|
|
|
1
|
-
import { defineComponent as R, computed as B, openBlock as t, createBlock as z, unref as M, normalizeClass as y, withCtx as T, createElementBlock as u, createCommentVNode as g, renderSlot as D, Fragment as V, createTextVNode as N, toDisplayString as A, createElementVNode as $, withModifiers as F, withDirectives as oe, createVNode as H, normalizeStyle as X, ref as U, watch as J, onMounted as ae, renderList as Q, withKeys as ie, vModelText as ue, nextTick as E, useModel as G, useTemplateRef as j, onBeforeUnmount as re, mergeModels as Y, mergeProps as de, createSlots as pe, defineAsyncComponent as x } from "vue";
|
|
2
|
-
import { boot as ce } from "quasar/wrappers";
|
|
3
|
-
import me from "quasar/src/components/btn/QBtn.js";
|
|
4
|
-
import fe from "quasar/src/components/checkbox/QCheckbox.js";
|
|
5
|
-
import be from "quasar/src/directives/close-popup/ClosePopup.js";
|
|
6
|
-
import ge from "quasar/src/components/spinner/QSpinner.js";
|
|
7
|
-
import ve from "quasar/src/components/linear-progress/QLinearProgress.js";
|
|
8
|
-
import ye from "quasar/src/components/btn-dropdown/QBtnDropdown.js";
|
|
9
|
-
import he from "quasar/src/components/item/QItem.js";
|
|
10
|
-
import ke from "quasar/src/components/chip/QChip.js";
|
|
11
|
-
import _e from "quasar/src/components/select/QSelect.js";
|
|
12
|
-
const _l = ce(({ app: m }) => {
|
|
13
|
-
const r = m.config.globalProperties.$q;
|
|
14
|
-
r.iconMapFn = (l) => {
|
|
15
|
-
if (l.startsWith("icon-kl:"))
|
|
16
|
-
return {
|
|
17
|
-
cls: `icon-kl icon-kl-${l.slice(8)}`
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
}), W = {
|
|
21
|
-
PRIMARY: "primary",
|
|
22
|
-
INFO: "info"
|
|
23
|
-
}, w = {
|
|
24
|
-
SM: "sm",
|
|
25
|
-
MD: "md",
|
|
26
|
-
LG: "lg",
|
|
27
|
-
XL: "xl"
|
|
28
|
-
}, $e = {
|
|
29
|
-
[w.SM]: "3px 9px",
|
|
30
|
-
[w.MD]: "5px 12px",
|
|
31
|
-
[w.LG]: "6px 15px",
|
|
32
|
-
[w.XL]: "9px 20px"
|
|
33
|
-
}, Be = /* @__PURE__ */ R({
|
|
34
|
-
__name: "AppButton",
|
|
35
|
-
props: {
|
|
36
|
-
size: { default: w.MD },
|
|
37
|
-
transparent: { type: Boolean },
|
|
38
|
-
flat: { type: Boolean },
|
|
39
|
-
rounded: { type: Boolean },
|
|
40
|
-
color: { default: W.PRIMARY },
|
|
41
|
-
iconLeft: {},
|
|
42
|
-
iconRight: {},
|
|
43
|
-
iconMiddle: {},
|
|
44
|
-
disabled: { type: Boolean },
|
|
45
|
-
loading: { type: Boolean },
|
|
46
|
-
to: {},
|
|
47
|
-
href: {},
|
|
48
|
-
target: {},
|
|
49
|
-
submit: { type: Boolean },
|
|
50
|
-
ariaLabel: {},
|
|
51
|
-
label: {},
|
|
52
|
-
download: {}
|
|
53
|
-
},
|
|
54
|
-
emits: ["click"],
|
|
55
|
-
setup(m) {
|
|
56
|
-
const r = m, l = B(() => [
|
|
57
|
-
"app-btn",
|
|
58
|
-
{
|
|
59
|
-
"app-btn_default": !r.transparent && !r.flat,
|
|
60
|
-
"app-btn_trans": r.transparent,
|
|
61
|
-
"app-btn_flat": r.flat,
|
|
62
|
-
"app-btn_rounded": r.rounded,
|
|
63
|
-
"app-btn_icon-left": r.iconLeft,
|
|
64
|
-
"app-btn_icon-right": r.iconRight,
|
|
65
|
-
"app-btn_icon-middle": r.iconMiddle
|
|
66
|
-
},
|
|
67
|
-
`app-btn_${r.size}`,
|
|
68
|
-
`app-btn_${r.color}`
|
|
69
|
-
]);
|
|
70
|
-
return (e, p) => (t(), z(M(me), {
|
|
71
|
-
"no-caps": "",
|
|
72
|
-
unelevated: "",
|
|
73
|
-
class: y(l.value),
|
|
74
|
-
padding: M($e)[e.size || M(w).MD],
|
|
75
|
-
loading: e.loading,
|
|
76
|
-
disable: e.disabled || void 0,
|
|
77
|
-
to: e.to,
|
|
78
|
-
href: e.href,
|
|
79
|
-
target: e.target,
|
|
80
|
-
type: e.submit ? "submit" : void 0,
|
|
81
|
-
"aria-label": e.ariaLabel,
|
|
82
|
-
download: e.download,
|
|
83
|
-
onClick: p[0] || (p[0] = (s) => e.$emit("click", s))
|
|
84
|
-
}, {
|
|
85
|
-
default: T(() => [
|
|
86
|
-
e.iconLeft || e.iconMiddle ? (t(), u("i", {
|
|
87
|
-
key: 0,
|
|
88
|
-
class: y([
|
|
89
|
-
"icon-kl",
|
|
90
|
-
e.iconLeft ? "icon-kl_left" : "icon-kl_middle",
|
|
91
|
-
`icon-kl-${e.iconLeft || e.iconMiddle}`,
|
|
92
|
-
e.transparent || e.flat ? `text-${e.color}` : "text-secondary"
|
|
93
|
-
])
|
|
94
|
-
}, null, 2)) : g("", !0),
|
|
95
|
-
D(e.$slots, "default", {}, void 0, !0),
|
|
96
|
-
e.label ? (t(), u(V, { key: 1 }, [
|
|
97
|
-
N(A(e.label), 1)
|
|
98
|
-
], 64)) : g("", !0),
|
|
99
|
-
e.iconRight ? (t(), u("i", {
|
|
100
|
-
key: 2,
|
|
101
|
-
class: y([
|
|
102
|
-
"icon-kl",
|
|
103
|
-
"icon-kl_right",
|
|
104
|
-
`icon-kl-${e.iconRight}`,
|
|
105
|
-
e.transparent ? `text-${e.color}` : "text-secondary"
|
|
106
|
-
])
|
|
107
|
-
}, null, 2)) : g("", !0)
|
|
108
|
-
]),
|
|
109
|
-
_: 3
|
|
110
|
-
}, 8, ["class", "padding", "loading", "disable", "to", "href", "target", "type", "aria-label", "download"]));
|
|
111
|
-
}
|
|
112
|
-
}), L = (m, r) => {
|
|
113
|
-
const l = m.__vccOpts || m;
|
|
114
|
-
for (const [e, p] of r)
|
|
115
|
-
l[e] = p;
|
|
116
|
-
return l;
|
|
117
|
-
}, $l = /* @__PURE__ */ L(Be, [["__scopeId", "data-v-c9951ab6"]]), we = /* @__PURE__ */ R({
|
|
118
|
-
__name: "CloseButton",
|
|
119
|
-
props: {
|
|
120
|
-
size: { default: w.MD }
|
|
121
|
-
},
|
|
122
|
-
setup(m) {
|
|
123
|
-
const r = m, l = B(() => ["close-btn", `close-btn_${r.size}`]);
|
|
124
|
-
return (e, p) => (t(), u("button", {
|
|
125
|
-
class: y(l.value),
|
|
126
|
-
type: "button",
|
|
127
|
-
"aria-label": "Close"
|
|
128
|
-
}, [...p[0] || (p[0] = [
|
|
129
|
-
$("i", { class: "icon-kl icon-kl-close" }, null, -1)
|
|
130
|
-
])], 2));
|
|
131
|
-
}
|
|
132
|
-
}), Bl = /* @__PURE__ */ L(we, [["__scopeId", "data-v-7cc56d51"]]), Me = {
|
|
133
|
-
key: 0,
|
|
134
|
-
class: "app-toggle__label app-toggle__label_left"
|
|
135
|
-
}, Ce = { class: "app-toggle__container" }, Ve = ["checked", "disabled"], Ae = { class: "app-toggle__thumb" }, ze = {
|
|
136
|
-
key: 1,
|
|
137
|
-
class: "app-toggle__label"
|
|
138
|
-
}, Le = /* @__PURE__ */ R({
|
|
139
|
-
__name: "AppToggle",
|
|
140
|
-
props: {
|
|
141
|
-
modelValue: { type: Boolean },
|
|
142
|
-
size: { default: w.MD },
|
|
143
|
-
label: {},
|
|
144
|
-
disabled: { type: Boolean },
|
|
145
|
-
color: { default: W.PRIMARY },
|
|
146
|
-
iconColor: {},
|
|
147
|
-
icon: {},
|
|
148
|
-
iconActive: {},
|
|
149
|
-
labelLeft: { type: Boolean }
|
|
150
|
-
},
|
|
151
|
-
emits: ["update:modelValue"],
|
|
152
|
-
setup(m, { emit: r }) {
|
|
153
|
-
const l = m, e = r, p = B({
|
|
154
|
-
get: () => l.modelValue,
|
|
155
|
-
set: (o) => {
|
|
156
|
-
e("update:modelValue", o);
|
|
157
|
-
}
|
|
158
|
-
}), s = B(() => [
|
|
159
|
-
"app-toggle",
|
|
160
|
-
{
|
|
161
|
-
"app-toggle_active": p.value,
|
|
162
|
-
"app-toggle_disabled": l.disabled
|
|
163
|
-
},
|
|
164
|
-
`app-toggle_${l.size}`,
|
|
165
|
-
`app-toggle_${l.color}`
|
|
166
|
-
]);
|
|
167
|
-
return (o, v) => (t(), u("div", {
|
|
168
|
-
class: y(s.value),
|
|
169
|
-
onClick: v[1] || (v[1] = F(() => {
|
|
170
|
-
}, ["stop"]))
|
|
171
|
-
}, [
|
|
172
|
-
o.label && o.labelLeft ? (t(), u("span", Me, A(o.label), 1)) : g("", !0),
|
|
173
|
-
$("label", Ce, [
|
|
174
|
-
$("input", {
|
|
175
|
-
type: "checkbox",
|
|
176
|
-
checked: p.value,
|
|
177
|
-
onChange: v[0] || (v[0] = (i) => p.value = !p.value),
|
|
178
|
-
disabled: o.disabled,
|
|
179
|
-
class: "app-toggle__input"
|
|
180
|
-
}, null, 40, Ve),
|
|
181
|
-
$("span", {
|
|
182
|
-
class: y(["app-toggle__slider", p.value ? `bg-${o.color}` : ""])
|
|
183
|
-
}, [
|
|
184
|
-
$("span", Ae, [
|
|
185
|
-
o.icon && !o.modelValue ? (t(), u("i", {
|
|
186
|
-
key: 0,
|
|
187
|
-
class: y(["icon-kl", `icon-kl-${o.icon}`, "app-toggle__icon"])
|
|
188
|
-
}, null, 2)) : g("", !0),
|
|
189
|
-
o.modelValue && (o.iconActive || o.icon) ? (t(), u("i", {
|
|
190
|
-
key: 1,
|
|
191
|
-
class: y([
|
|
192
|
-
"icon-kl",
|
|
193
|
-
`icon-kl-${o.iconActive || o.icon}`,
|
|
194
|
-
"app-toggle__icon",
|
|
195
|
-
p.value ? `text-${o.iconColor}` : ""
|
|
196
|
-
])
|
|
197
|
-
}, null, 2)) : g("", !0)
|
|
198
|
-
])
|
|
199
|
-
], 2),
|
|
200
|
-
D(o.$slots, "default", {}, void 0, !0)
|
|
201
|
-
]),
|
|
202
|
-
o.label && !o.labelLeft ? (t(), u("span", ze, A(o.label), 1)) : g("", !0)
|
|
203
|
-
], 2));
|
|
204
|
-
}
|
|
205
|
-
}), ne = /* @__PURE__ */ L(Le, [["__scopeId", "data-v-ba49356e"]]), Se = {
|
|
206
|
-
key: 0,
|
|
207
|
-
class: "menu-item__loading"
|
|
208
|
-
}, Ie = {
|
|
209
|
-
key: 0,
|
|
210
|
-
class: "menu-item__checked"
|
|
211
|
-
}, Pe = {
|
|
212
|
-
key: 2,
|
|
213
|
-
class: "menu-item__icon"
|
|
214
|
-
}, Re = { class: "menu-item__label" }, De = {
|
|
215
|
-
key: 3,
|
|
216
|
-
class: "menu-item__icon-right icon-kl icon-kl-arrow-right"
|
|
217
|
-
}, Oe = /* @__PURE__ */ R({
|
|
218
|
-
__name: "PopupItem",
|
|
219
|
-
props: {
|
|
220
|
-
label: {},
|
|
221
|
-
icon: {},
|
|
222
|
-
iconSize: {},
|
|
223
|
-
color: {},
|
|
224
|
-
iconRight: {},
|
|
225
|
-
arrow: { type: Boolean },
|
|
226
|
-
toggle: { type: Boolean },
|
|
227
|
-
checkbox: { type: Boolean },
|
|
228
|
-
active: { type: Boolean },
|
|
229
|
-
modelValue: { type: Boolean },
|
|
230
|
-
persistent: { type: Boolean },
|
|
231
|
-
loading: { type: Boolean },
|
|
232
|
-
disabled: { type: Boolean },
|
|
233
|
-
gap: { type: Boolean },
|
|
234
|
-
checked: { type: Boolean },
|
|
235
|
-
isMobile: { type: Boolean }
|
|
236
|
-
},
|
|
237
|
-
emits: ["update:modelValue", "closePopup"],
|
|
238
|
-
setup(m, { emit: r }) {
|
|
239
|
-
const l = m, e = r, p = () => {
|
|
240
|
-
l.disabled || (l.toggle || l.checkbox ? e("update:modelValue", !l.modelValue) : l.persistent || e("closePopup"));
|
|
241
|
-
};
|
|
242
|
-
return (s, o) => oe((t(), u("div", {
|
|
243
|
-
class: y(["menu-item", [
|
|
244
|
-
{ "menu-item_gap": s.gap },
|
|
245
|
-
{ "menu-item_disabled": s.disabled },
|
|
246
|
-
{ "menu-item_active": s.active },
|
|
247
|
-
{ "menu-item_mobile": s.isMobile }
|
|
248
|
-
]]),
|
|
249
|
-
onClick: p
|
|
250
|
-
}, [
|
|
251
|
-
$("div", {
|
|
252
|
-
class: y(["row items-center no-wrap", `text-${s.color ? s.color : "dark"}`])
|
|
253
|
-
}, [
|
|
254
|
-
s.loading ? (t(), u("div", Se, [
|
|
255
|
-
H(M(ge), {
|
|
256
|
-
size: "19px",
|
|
257
|
-
color: s.color ? s.color : "dark"
|
|
258
|
-
}, null, 8, ["color"])
|
|
259
|
-
])) : (t(), u(V, { key: 1 }, [
|
|
260
|
-
s.checked ? (t(), u("div", Ie, [...o[3] || (o[3] = [
|
|
261
|
-
$("i", { class: "icon-kl icon-kl-check" }, null, -1)
|
|
262
|
-
])])) : g("", !0),
|
|
263
|
-
s.checkbox ? (t(), z(fe, {
|
|
264
|
-
key: 1,
|
|
265
|
-
class: "menu-item__checkbox",
|
|
266
|
-
size: "34px",
|
|
267
|
-
"model-value": s.modelValue,
|
|
268
|
-
"onUpdate:modelValue": o[0] || (o[0] = (v) => e("update:modelValue", v)),
|
|
269
|
-
onClick: o[1] || (o[1] = F(() => {
|
|
270
|
-
}, ["stop"]))
|
|
271
|
-
}, null, 8, ["model-value"])) : g("", !0),
|
|
272
|
-
s.icon ? (t(), u("div", Pe, [
|
|
273
|
-
$("i", {
|
|
274
|
-
class: y(`icon-kl icon-kl-${s.icon}`),
|
|
275
|
-
style: X({ fontSize: s.iconSize || "27px" })
|
|
276
|
-
}, null, 6)
|
|
277
|
-
])) : g("", !0)
|
|
278
|
-
], 64)),
|
|
279
|
-
$("span", Re, A(s.label), 1)
|
|
280
|
-
], 2),
|
|
281
|
-
s.$slots.right ? D(s.$slots, "right", { key: 0 }, void 0, !0) : s.toggle ? (t(), z(ne, {
|
|
282
|
-
key: 1,
|
|
283
|
-
class: "menu-item__toggle",
|
|
284
|
-
"model-value": s.modelValue,
|
|
285
|
-
disabled: s.disabled || s.loading,
|
|
286
|
-
"onUpdate:modelValue": o[2] || (o[2] = (v) => e("update:modelValue", v))
|
|
287
|
-
}, null, 8, ["model-value", "disabled"])) : s.iconRight ? (t(), u("i", {
|
|
288
|
-
key: 2,
|
|
289
|
-
class: y([
|
|
290
|
-
"menu-item__icon-right menu-item__icon-right_custom icon-kl",
|
|
291
|
-
`icon-kl-${s.iconRight}`
|
|
292
|
-
])
|
|
293
|
-
}, null, 2)) : s.arrow ? (t(), u("i", De)) : g("", !0)
|
|
294
|
-
], 2)), [
|
|
295
|
-
[be, !s.toggle && !s.checkbox && !s.persistent && !s.disabled]
|
|
296
|
-
]);
|
|
297
|
-
}
|
|
298
|
-
}), te = /* @__PURE__ */ L(Oe, [["__scopeId", "data-v-19bf5ec2"]]), Te = /* @__PURE__ */ R({
|
|
299
|
-
__name: "AppIcon",
|
|
300
|
-
props: {
|
|
301
|
-
name: {},
|
|
302
|
-
size: {},
|
|
303
|
-
color: {}
|
|
304
|
-
},
|
|
305
|
-
setup(m) {
|
|
306
|
-
return (r, l) => (t(), u("i", {
|
|
307
|
-
class: y(["icon-kl", `icon-kl-${r.name}`, r.color ? `text-${r.color}` : ""]),
|
|
308
|
-
style: X(r.size ? `font-size: ${r.size}` : void 0)
|
|
309
|
-
}, null, 6));
|
|
310
|
-
}
|
|
311
|
-
}), K = /* @__PURE__ */ L(Te, [["__scopeId", "data-v-941765ee"]]), Ue = {
|
|
312
|
-
key: 0,
|
|
313
|
-
class: "code-field__label"
|
|
314
|
-
}, qe = { class: "code-field__inputs" }, Ee = ["onUpdate:modelValue", "disabled", "onInput", "onKeydown", "onPaste"], Ne = /* @__PURE__ */ R({
|
|
315
|
-
__name: "AppCodeInput",
|
|
316
|
-
props: {
|
|
317
|
-
length: { default: 5 },
|
|
318
|
-
size: { default: w.MD },
|
|
319
|
-
label: {},
|
|
320
|
-
disabled: { type: Boolean },
|
|
321
|
-
loading: { type: Boolean },
|
|
322
|
-
autofocus: { type: Boolean },
|
|
323
|
-
color: {}
|
|
324
|
-
},
|
|
325
|
-
emits: ["update:modelValue", "completed"],
|
|
326
|
-
setup(m, { expose: r, emit: l }) {
|
|
327
|
-
const e = m, p = l, s = U(Array(e.length).fill("")), o = U([]), v = B(() => [
|
|
328
|
-
"code-field",
|
|
329
|
-
{
|
|
330
|
-
"code-field_disabled": e.disabled || e.loading
|
|
331
|
-
},
|
|
332
|
-
`code-field_${e.size}`,
|
|
333
|
-
`code-field_${e.color}`
|
|
334
|
-
]), i = B(() => {
|
|
335
|
-
let a = "";
|
|
336
|
-
return e.size == w.SM && (a += `width: ${e.length * 26 + (e.length - 1) * 5}px`), e.size == w.MD && (a += `width: ${e.length * 32 + (e.length - 1) * 8}px`), e.size == w.LG && (a += `width: ${e.length * 44 + (e.length - 1) * 10}px`), a;
|
|
337
|
-
}), S = (a, d) => {
|
|
338
|
-
var _;
|
|
339
|
-
const h = a.target.value;
|
|
340
|
-
if (h.length === 1)
|
|
341
|
-
d < e.length - 1 && o.value && ((_ = o.value[d + 1]) == null || _.focus());
|
|
342
|
-
else if (h.length > 1) {
|
|
343
|
-
const n = h.slice(0, e.length - d).split("");
|
|
344
|
-
n.forEach((b, f) => {
|
|
345
|
-
s.value[d + f] = b;
|
|
346
|
-
}), E(() => {
|
|
347
|
-
var b;
|
|
348
|
-
o.value && ((b = o.value[Math.min(d + n.length, e.length - 1)]) == null || b.focus());
|
|
349
|
-
});
|
|
350
|
-
}
|
|
351
|
-
}, C = (a) => {
|
|
352
|
-
var d;
|
|
353
|
-
s.value[a] === "" && o.value && a > 0 && ((d = o.value[a - 1]) == null || d.focus());
|
|
354
|
-
}, I = (a, d) => {
|
|
355
|
-
var _;
|
|
356
|
-
a.preventDefault();
|
|
357
|
-
const k = ((_ = a.clipboardData) == null ? void 0 : _.getData("text")) ?? "";
|
|
358
|
-
if (!k) return;
|
|
359
|
-
const h = k.slice(0, e.length - d).split("");
|
|
360
|
-
h.forEach((n, b) => {
|
|
361
|
-
s.value[d + b] = n;
|
|
362
|
-
}), E(() => {
|
|
363
|
-
var n;
|
|
364
|
-
o.value && ((n = o.value[Math.min(d + h.length, e.length - 1)]) == null || n.focus());
|
|
365
|
-
});
|
|
366
|
-
};
|
|
367
|
-
J(
|
|
368
|
-
s,
|
|
369
|
-
(a) => {
|
|
370
|
-
const d = a.join("");
|
|
371
|
-
O(d);
|
|
372
|
-
},
|
|
373
|
-
{ deep: !0 }
|
|
374
|
-
);
|
|
375
|
-
const O = (a) => {
|
|
376
|
-
p("update:modelValue", a), a.length === e.length && !a.includes(" ") && p("completed", a);
|
|
377
|
-
}, c = (a) => {
|
|
378
|
-
a && (s.value = a.split("").slice(0, e.length));
|
|
379
|
-
};
|
|
380
|
-
return ae(() => {
|
|
381
|
-
e.autofocus && o.value && o.value[0] && o.value[0].focus();
|
|
382
|
-
}), r({
|
|
383
|
-
injectCode: c
|
|
384
|
-
}), (a, d) => (t(), u("div", {
|
|
385
|
-
class: y(v.value),
|
|
386
|
-
style: X(i.value)
|
|
387
|
-
}, [
|
|
388
|
-
a.label ? (t(), u("label", Ue, A(a.label), 1)) : g("", !0),
|
|
389
|
-
$("div", qe, [
|
|
390
|
-
(t(!0), u(V, null, Q(a.length, (k, h) => oe((t(), u("input", {
|
|
391
|
-
key: h,
|
|
392
|
-
"onUpdate:modelValue": (_) => s.value[h] = _,
|
|
393
|
-
ref_for: !0,
|
|
394
|
-
ref_key: "inputRefs",
|
|
395
|
-
ref: o,
|
|
396
|
-
type: "number",
|
|
397
|
-
maxlength: "1",
|
|
398
|
-
class: "code-field__input",
|
|
399
|
-
disabled: a.disabled || a.loading,
|
|
400
|
-
onInput: (_) => S(_, h),
|
|
401
|
-
onKeydown: ie((_) => C(h), ["backspace"]),
|
|
402
|
-
onPaste: (_) => I(_, h)
|
|
403
|
-
}, null, 40, Ee)), [
|
|
404
|
-
[ue, s.value[h]]
|
|
405
|
-
])), 128))
|
|
406
|
-
]),
|
|
407
|
-
a.loading ? (t(), z(ve, {
|
|
408
|
-
key: 1,
|
|
409
|
-
indeterminate: "",
|
|
410
|
-
rounded: "",
|
|
411
|
-
color: a.color,
|
|
412
|
-
class: "code-field__loading"
|
|
413
|
-
}, null, 8, ["color"])) : g("", !0)
|
|
414
|
-
], 6));
|
|
415
|
-
}
|
|
416
|
-
}), wl = /* @__PURE__ */ L(Ne, [["__scopeId", "data-v-4e11db87"]]), Qe = ["onClick", "disabled"], We = /* @__PURE__ */ R({
|
|
417
|
-
__name: "AppSegment",
|
|
418
|
-
props: /* @__PURE__ */ Y({
|
|
419
|
-
options: {},
|
|
420
|
-
disabled: { type: Boolean },
|
|
421
|
-
size: { default: w.MD },
|
|
422
|
-
color: { default: W.PRIMARY },
|
|
423
|
-
glass: { type: Boolean },
|
|
424
|
-
blur: { type: Boolean }
|
|
425
|
-
}, {
|
|
426
|
-
modelValue: {},
|
|
427
|
-
modelModifiers: {}
|
|
428
|
-
}),
|
|
429
|
-
emits: ["update:modelValue"],
|
|
430
|
-
setup(m) {
|
|
431
|
-
const r = G(m, "modelValue"), l = m, e = j("scroller"), p = j("content"), s = j("buttons"), o = U(!1), v = U(!1), i = U({ left: 0, width: 0 }), S = B(() => [
|
|
432
|
-
"app-segment",
|
|
433
|
-
{
|
|
434
|
-
"app-segment_disabled": l.disabled,
|
|
435
|
-
"app-segment_scrollable": v.value,
|
|
436
|
-
"app-segment_glass": l.glass,
|
|
437
|
-
"app-segment_blur": l.blur
|
|
438
|
-
},
|
|
439
|
-
`app-segment_${l.size}`,
|
|
440
|
-
`app-segment_${l.color}`
|
|
441
|
-
]), C = B(
|
|
442
|
-
() => l.options.findIndex((n) => n.value === r.value)
|
|
443
|
-
), I = B(() => ({
|
|
444
|
-
width: `${i.value.width}px`,
|
|
445
|
-
transform: `translateX(${i.value.left}px)`,
|
|
446
|
-
opacity: i.value.width ? 1 : 0
|
|
447
|
-
}));
|
|
448
|
-
function O() {
|
|
449
|
-
var b;
|
|
450
|
-
const n = (b = s.value) == null ? void 0 : b[C.value];
|
|
451
|
-
i.value = n ? { left: n.offsetLeft, width: n.offsetWidth } : { left: 0, width: 0 }, e.value && (v.value = e.value.scrollWidth - e.value.clientWidth > 1);
|
|
452
|
-
}
|
|
453
|
-
function c(n = "smooth") {
|
|
454
|
-
var f, P;
|
|
455
|
-
const b = (f = s.value) == null ? void 0 : f[C.value];
|
|
456
|
-
!b || !((P = e.value) != null && P.scrollTo) || e.value.scrollTo({
|
|
457
|
-
left: b.offsetLeft + b.offsetWidth / 2 - e.value.clientWidth / 2,
|
|
458
|
-
behavior: n
|
|
459
|
-
});
|
|
460
|
-
}
|
|
461
|
-
function a(n) {
|
|
462
|
-
l.disabled || (r.value = n);
|
|
463
|
-
}
|
|
464
|
-
let d = !0;
|
|
465
|
-
function k() {
|
|
466
|
-
d = !1;
|
|
467
|
-
}
|
|
468
|
-
function h() {
|
|
469
|
-
O(), d && c();
|
|
470
|
-
}
|
|
471
|
-
let _;
|
|
472
|
-
return ae(async () => {
|
|
473
|
-
O(), await E(), c("auto"), o.value = !0, typeof ResizeObserver < "u" && e.value && p.value && (_ = new ResizeObserver(h), _.observe(e.value), _.observe(p.value));
|
|
474
|
-
}), re(() => _ == null ? void 0 : _.disconnect()), J(
|
|
475
|
-
[C, v, () => l.options, () => l.size],
|
|
476
|
-
() => E(O)
|
|
477
|
-
), J(C, () => {
|
|
478
|
-
d = !0, E(() => c());
|
|
479
|
-
}), (n, b) => (t(), u("div", {
|
|
480
|
-
ref_key: "scroller",
|
|
481
|
-
ref: e,
|
|
482
|
-
class: y(S.value),
|
|
483
|
-
onWheelPassive: k,
|
|
484
|
-
onTouchstartPassive: k
|
|
485
|
-
}, [
|
|
486
|
-
$("div", {
|
|
487
|
-
ref_key: "content",
|
|
488
|
-
ref: p,
|
|
489
|
-
class: "app-segment__content"
|
|
490
|
-
}, [
|
|
491
|
-
$("div", {
|
|
492
|
-
class: y(["app-segment__thumb", { "app-segment__thumb_animated": o.value }]),
|
|
493
|
-
style: X(I.value)
|
|
494
|
-
}, null, 6),
|
|
495
|
-
(t(!0), u(V, null, Q(n.options, (f, P) => (t(), u("button", {
|
|
496
|
-
ref_for: !0,
|
|
497
|
-
ref_key: "buttons",
|
|
498
|
-
ref: s,
|
|
499
|
-
key: P,
|
|
500
|
-
class: y(["app-segment__btn", { "app-segment__btn_active": r.value === f.value }]),
|
|
501
|
-
onClick: (q) => a(f.value),
|
|
502
|
-
disabled: n.disabled
|
|
503
|
-
}, [
|
|
504
|
-
D(n.$slots, "option", { option: f }, () => [
|
|
505
|
-
N(A(f.label), 1)
|
|
506
|
-
], !0)
|
|
507
|
-
], 10, Qe))), 128))
|
|
508
|
-
], 512)
|
|
509
|
-
], 34));
|
|
510
|
-
}
|
|
511
|
-
}), Ml = /* @__PURE__ */ L(We, [["__scopeId", "data-v-11d8f417"]]), ee = [10, 20, 50, 100], Fe = "стор.", He = {
|
|
512
|
-
[w.SM]: "3px 9px",
|
|
513
|
-
[w.MD]: "5px 12px",
|
|
514
|
-
[w.LG]: "6px 15px",
|
|
515
|
-
[w.XL]: "9px 20px"
|
|
516
|
-
}, Ge = {
|
|
517
|
-
key: 1,
|
|
518
|
-
class: "dropdown-btn__label"
|
|
519
|
-
}, Ye = /* @__PURE__ */ R({
|
|
520
|
-
__name: "DropdownButton",
|
|
521
|
-
props: {
|
|
522
|
-
size: { default: w.MD },
|
|
523
|
-
transparent: { type: Boolean },
|
|
524
|
-
flat: { type: Boolean },
|
|
525
|
-
rounded: { type: Boolean },
|
|
526
|
-
color: { default: W.PRIMARY },
|
|
527
|
-
iconLeft: {},
|
|
528
|
-
iconMiddle: {},
|
|
529
|
-
hideDropIcon: { type: Boolean },
|
|
530
|
-
disabled: { type: Boolean },
|
|
531
|
-
loading: { type: Boolean },
|
|
532
|
-
ariaLabel: {},
|
|
533
|
-
label: {},
|
|
534
|
-
menuOffset: {},
|
|
535
|
-
menuAnchor: {},
|
|
536
|
-
menuSelf: {},
|
|
537
|
-
menuClass: {},
|
|
538
|
-
glass: { type: Boolean }
|
|
539
|
-
},
|
|
540
|
-
emits: ["menuShown", "menuHidden"],
|
|
541
|
-
setup(m, { emit: r }) {
|
|
542
|
-
const l = m, e = r, p = U(!1), s = B(() => [
|
|
543
|
-
"dropdown-btn",
|
|
544
|
-
{
|
|
545
|
-
"dropdown-btn_default": !l.transparent && !l.flat,
|
|
546
|
-
"dropdown-btn_trans": l.transparent,
|
|
547
|
-
"dropdown-btn_flat": l.flat,
|
|
548
|
-
"dropdown-btn_rounded": l.rounded,
|
|
549
|
-
"dropdown-btn_icon-left": l.iconLeft,
|
|
550
|
-
"dropdown-btn_icon-middle": l.iconMiddle,
|
|
551
|
-
"dropdown-btn_no-drop": l.hideDropIcon
|
|
552
|
-
},
|
|
553
|
-
`dropdown-btn_${l.size}`,
|
|
554
|
-
`dropdown-btn_${l.color}`
|
|
555
|
-
]), o = () => {
|
|
556
|
-
p.value = !0, e("menuShown");
|
|
557
|
-
}, v = () => {
|
|
558
|
-
p.value = !1, e("menuHidden");
|
|
559
|
-
};
|
|
560
|
-
return (i, S) => (t(), z(M(ye), {
|
|
561
|
-
"no-caps": "",
|
|
562
|
-
unelevated: "",
|
|
563
|
-
modelValue: p.value,
|
|
564
|
-
"onUpdate:modelValue": S[0] || (S[0] = (C) => p.value = C),
|
|
565
|
-
class: y(s.value),
|
|
566
|
-
padding: M(He)[i.size || M(w).MD],
|
|
567
|
-
loading: i.loading,
|
|
568
|
-
disable: i.disabled || void 0,
|
|
569
|
-
"aria-label": i.ariaLabel,
|
|
570
|
-
"menu-offset": i.menuOffset,
|
|
571
|
-
"menu-anchor": i.menuAnchor,
|
|
572
|
-
"menu-self": i.menuSelf,
|
|
573
|
-
"content-class": [
|
|
574
|
-
"kl-menu dropdown-menu",
|
|
575
|
-
{ "glass-menu": i.glass },
|
|
576
|
-
i.menuClass
|
|
577
|
-
],
|
|
578
|
-
"dropdown-icon": "icon-kl icon-kl-arrow-down",
|
|
579
|
-
onBeforeShow: o,
|
|
580
|
-
onBeforeHide: v
|
|
581
|
-
}, {
|
|
582
|
-
label: T(() => [
|
|
583
|
-
i.iconLeft || i.iconMiddle ? (t(), u("i", {
|
|
584
|
-
key: 0,
|
|
585
|
-
class: y([
|
|
586
|
-
"icon-kl",
|
|
587
|
-
i.iconLeft ? "icon-kl_left" : "icon-kl_middle",
|
|
588
|
-
`icon-kl-${i.iconLeft || i.iconMiddle}`,
|
|
589
|
-
i.transparent || i.flat ? `text-${i.color}` : "text-secondary"
|
|
590
|
-
])
|
|
591
|
-
}, null, 2)) : g("", !0),
|
|
592
|
-
i.label ? (t(), u("span", Ge, A(i.label), 1)) : g("", !0),
|
|
593
|
-
D(i.$slots, "label", {}, void 0, !0)
|
|
594
|
-
]),
|
|
595
|
-
default: T(() => [
|
|
596
|
-
D(i.$slots, "default", {}, void 0, !0),
|
|
597
|
-
D(i.$slots, "options", {
|
|
598
|
-
hideMenu: v,
|
|
599
|
-
showMenu: o
|
|
600
|
-
}, void 0, !0)
|
|
601
|
-
]),
|
|
602
|
-
_: 3
|
|
603
|
-
}, 8, ["modelValue", "class", "padding", "loading", "disable", "aria-label", "menu-offset", "menu-anchor", "menu-self", "content-class"]));
|
|
604
|
-
}
|
|
605
|
-
}), se = /* @__PURE__ */ L(Ye, [["__scopeId", "data-v-9ad6865d"]]), Xe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
606
|
-
__proto__: null,
|
|
607
|
-
default: se
|
|
608
|
-
}, Symbol.toStringTag, { value: "Module" })), je = ["disabled"], Ke = ["disabled"], Ze = ["disabled", "aria-current", "onClick"], Je = ["disabled"], xe = ["disabled"], Z = "...", el = /* @__PURE__ */ R({
|
|
609
|
-
__name: "AppPagination",
|
|
610
|
-
props: /* @__PURE__ */ Y({
|
|
611
|
-
max: {},
|
|
612
|
-
maxPages: { default: 5 },
|
|
613
|
-
boundaryNumbers: { type: Boolean, default: !0 },
|
|
614
|
-
ellipses: { type: Boolean, default: !0 },
|
|
615
|
-
directionLinks: { type: Boolean, default: !0 },
|
|
616
|
-
boundaryLinks: { type: Boolean },
|
|
617
|
-
perPage: { type: Boolean },
|
|
618
|
-
size: { default: w.MD },
|
|
619
|
-
color: { default: W.PRIMARY },
|
|
620
|
-
glass: { type: Boolean },
|
|
621
|
-
disabled: { type: Boolean }
|
|
622
|
-
}, {
|
|
623
|
-
modelValue: { default: 1 },
|
|
624
|
-
modelModifiers: {},
|
|
625
|
-
limit: { default: ee[0] },
|
|
626
|
-
limitModifiers: {}
|
|
627
|
-
}),
|
|
628
|
-
emits: ["update:modelValue", "update:limit"],
|
|
629
|
-
setup(m) {
|
|
630
|
-
const r = G(m, "modelValue"), l = G(m, "limit"), e = m, p = (c, a, d) => Math.min(Math.max(c, a), d), s = B(() => Math.max(1, Math.floor(e.max) || 1)), o = B(() => p(r.value, 1, s.value)), v = B(
|
|
631
|
-
() => p(Math.floor(e.maxPages) || 1, 1, 100)
|
|
632
|
-
), i = B(() => {
|
|
633
|
-
const c = s.value;
|
|
634
|
-
if (c <= v.value)
|
|
635
|
-
return Array.from({ length: c }, (h, _) => _ + 1);
|
|
636
|
-
let a = Math.max(1, o.value - Math.floor((v.value - 1) / 2)), d = a + v.value - 1;
|
|
637
|
-
d > c && (d = c, a = d - v.value + 1);
|
|
638
|
-
const k = [];
|
|
639
|
-
e.boundaryNumbers && a > 1 && (k.push(1), e.ellipses && a > 2 && k.push(Z));
|
|
640
|
-
for (let h = a; h <= d; h++) k.push(h);
|
|
641
|
-
return e.boundaryNumbers && d < c && (e.ellipses && d < c - 1 && k.push(Z), k.push(c)), k;
|
|
642
|
-
}), S = B(() => [
|
|
643
|
-
"app-pagination",
|
|
644
|
-
{
|
|
645
|
-
"app-pagination_glass": e.glass,
|
|
646
|
-
"app-pagination_boundary": e.boundaryLinks,
|
|
647
|
-
"app-pagination_disabled": e.disabled
|
|
648
|
-
},
|
|
649
|
-
`app-pagination_${e.size}`,
|
|
650
|
-
`app-pagination_${e.color}`
|
|
651
|
-
]), C = (c) => `${c} / ${Fe}`, I = (c) => {
|
|
652
|
-
if (e.disabled) return;
|
|
653
|
-
const a = p(c, 1, s.value);
|
|
654
|
-
a !== r.value && (r.value = a);
|
|
655
|
-
}, O = (c, a) => {
|
|
656
|
-
a(), c !== l.value && (l.value = c, r.value = 1);
|
|
657
|
-
};
|
|
658
|
-
return (c, a) => (t(), u("nav", {
|
|
659
|
-
class: y(S.value),
|
|
660
|
-
role: "navigation",
|
|
661
|
-
"aria-label": "Пагінація"
|
|
662
|
-
}, [
|
|
663
|
-
c.boundaryLinks ? (t(), u("button", {
|
|
664
|
-
key: 0,
|
|
665
|
-
type: "button",
|
|
666
|
-
class: "app-pagination__btn app-pagination__btn_icon",
|
|
667
|
-
disabled: c.disabled || o.value <= 1,
|
|
668
|
-
"aria-label": "Перша сторінка",
|
|
669
|
-
onClick: a[0] || (a[0] = (d) => I(1))
|
|
670
|
-
}, [...a[4] || (a[4] = [
|
|
671
|
-
$("i", { class: "icon-kl icon-kl-arrow-start" }, null, -1)
|
|
672
|
-
])], 8, je)) : g("", !0),
|
|
673
|
-
c.directionLinks ? (t(), u("button", {
|
|
674
|
-
key: 1,
|
|
675
|
-
type: "button",
|
|
676
|
-
class: "app-pagination__btn app-pagination__btn_icon",
|
|
677
|
-
disabled: c.disabled || o.value <= 1,
|
|
678
|
-
"aria-label": "Попередня сторінка",
|
|
679
|
-
onClick: a[1] || (a[1] = (d) => I(o.value - 1))
|
|
680
|
-
}, [...a[5] || (a[5] = [
|
|
681
|
-
$("i", { class: "icon-kl icon-kl-arrow-left" }, null, -1)
|
|
682
|
-
])], 8, Ke)) : g("", !0),
|
|
683
|
-
(t(!0), u(V, null, Q(i.value, (d, k) => (t(), u(V, null, [
|
|
684
|
-
d === Z ? (t(), u("span", {
|
|
685
|
-
key: `gap-${k}`,
|
|
686
|
-
class: "app-pagination__gap"
|
|
687
|
-
}, [...a[6] || (a[6] = [
|
|
688
|
-
$("i", { class: "icon-kl icon-kl-more-horizontal" }, null, -1)
|
|
689
|
-
])])) : (t(), u("button", {
|
|
690
|
-
key: `page-${d}`,
|
|
691
|
-
type: "button",
|
|
692
|
-
class: y(["app-pagination__btn", { "app-pagination__btn_active": d === o.value }]),
|
|
693
|
-
disabled: c.disabled,
|
|
694
|
-
"aria-current": d === o.value ? "page" : void 0,
|
|
695
|
-
onClick: (h) => I(d)
|
|
696
|
-
}, A(d), 11, Ze))
|
|
697
|
-
], 64))), 256)),
|
|
698
|
-
c.directionLinks ? (t(), u("button", {
|
|
699
|
-
key: 2,
|
|
700
|
-
type: "button",
|
|
701
|
-
class: "app-pagination__btn app-pagination__btn_icon",
|
|
702
|
-
disabled: c.disabled || o.value >= s.value,
|
|
703
|
-
"aria-label": "Наступна сторінка",
|
|
704
|
-
onClick: a[2] || (a[2] = (d) => I(o.value + 1))
|
|
705
|
-
}, [...a[7] || (a[7] = [
|
|
706
|
-
$("i", { class: "icon-kl icon-kl-arrow-right" }, null, -1)
|
|
707
|
-
])], 8, Je)) : g("", !0),
|
|
708
|
-
c.boundaryLinks ? (t(), u("button", {
|
|
709
|
-
key: 3,
|
|
710
|
-
type: "button",
|
|
711
|
-
class: "app-pagination__btn app-pagination__btn_icon",
|
|
712
|
-
disabled: c.disabled || o.value >= s.value,
|
|
713
|
-
"aria-label": "Остання сторінка",
|
|
714
|
-
onClick: a[3] || (a[3] = (d) => I(s.value))
|
|
715
|
-
}, [...a[8] || (a[8] = [
|
|
716
|
-
$("i", { class: "icon-kl icon-kl-arrow-end" }, null, -1)
|
|
717
|
-
])], 8, xe)) : g("", !0),
|
|
718
|
-
c.perPage ? (t(), u(V, { key: 4 }, [
|
|
719
|
-
a[9] || (a[9] = $("span", { class: "app-pagination__divider" }, null, -1)),
|
|
720
|
-
H(se, {
|
|
721
|
-
flat: "",
|
|
722
|
-
rounded: "",
|
|
723
|
-
size: c.size,
|
|
724
|
-
color: c.color,
|
|
725
|
-
glass: c.glass,
|
|
726
|
-
disabled: c.disabled,
|
|
727
|
-
label: C(l.value),
|
|
728
|
-
class: "app-pagination__per-page"
|
|
729
|
-
}, {
|
|
730
|
-
options: T(({ hideMenu: d }) => [
|
|
731
|
-
(t(!0), u(V, null, Q(M(ee), (k) => (t(), z(te, {
|
|
732
|
-
key: k,
|
|
733
|
-
"no-arrow": "",
|
|
734
|
-
label: C(k),
|
|
735
|
-
active: k === l.value,
|
|
736
|
-
onClick: (h) => O(k, d)
|
|
737
|
-
}, null, 8, ["label", "active", "onClick"]))), 128))
|
|
738
|
-
]),
|
|
739
|
-
_: 1
|
|
740
|
-
}, 8, ["size", "color", "glass", "disabled", "label"])
|
|
741
|
-
], 64)) : g("", !0)
|
|
742
|
-
], 2));
|
|
743
|
-
}
|
|
744
|
-
}), Cl = /* @__PURE__ */ L(el, [["__scopeId", "data-v-94758f8d"]]), ll = {}, ol = { class: "system-menu" };
|
|
745
|
-
function al(m, r) {
|
|
746
|
-
return t(), u("div", ol, [
|
|
747
|
-
D(m.$slots, "default", {}, void 0, !0)
|
|
748
|
-
]);
|
|
749
|
-
}
|
|
750
|
-
const Vl = /* @__PURE__ */ L(ll, [["render", al], ["__scopeId", "data-v-5649b2f4"]]), nl = { class: "menu-item__content" }, tl = {
|
|
751
|
-
key: 0,
|
|
752
|
-
class: "menu-item__value"
|
|
753
|
-
}, sl = /* @__PURE__ */ R({
|
|
754
|
-
__name: "MenuItem",
|
|
755
|
-
props: /* @__PURE__ */ Y({
|
|
756
|
-
label: {},
|
|
757
|
-
icon: {},
|
|
758
|
-
iconRight: {},
|
|
759
|
-
arrow: { type: Boolean },
|
|
760
|
-
color: {},
|
|
761
|
-
to: {},
|
|
762
|
-
href: {},
|
|
763
|
-
target: {},
|
|
764
|
-
disabled: { type: Boolean },
|
|
765
|
-
toggle: { type: Boolean },
|
|
766
|
-
isMobile: { type: Boolean }
|
|
767
|
-
}, {
|
|
768
|
-
modelValue: { type: Boolean },
|
|
769
|
-
modelModifiers: {}
|
|
770
|
-
}),
|
|
771
|
-
emits: /* @__PURE__ */ Y(["click"], ["update:modelValue"]),
|
|
772
|
-
setup(m, { emit: r }) {
|
|
773
|
-
const l = m, e = r, p = G(m, "modelValue"), s = async () => {
|
|
774
|
-
l.toggle && (p.value = !p.value), e("click");
|
|
775
|
-
};
|
|
776
|
-
return (o, v) => (t(), z(M(he), {
|
|
777
|
-
class: y(["menu-item", {
|
|
778
|
-
"menu-item_disabled": o.disabled,
|
|
779
|
-
"menu-item_mobile": o.isMobile
|
|
780
|
-
}]),
|
|
781
|
-
to: o.to,
|
|
782
|
-
href: o.href,
|
|
783
|
-
target: o.target,
|
|
784
|
-
disable: o.disabled,
|
|
785
|
-
clickable: "",
|
|
786
|
-
onClick: s
|
|
787
|
-
}, {
|
|
788
|
-
default: T(() => [
|
|
789
|
-
o.icon ? (t(), z(M(K), {
|
|
790
|
-
key: 0,
|
|
791
|
-
name: o.icon.name,
|
|
792
|
-
class: y(["menu-item__icon", `bg-${o.icon.color}`])
|
|
793
|
-
}, null, 8, ["name", "class"])) : g("", !0),
|
|
794
|
-
$("div", nl, [
|
|
795
|
-
$("span", {
|
|
796
|
-
class: y(["app-menu-item__label", o.color ? `text-${o.color}` : ""])
|
|
797
|
-
}, [
|
|
798
|
-
N(A(o.label) + " ", 1),
|
|
799
|
-
D(o.$slots, "default", {}, void 0, !0)
|
|
800
|
-
], 2),
|
|
801
|
-
o.$slots.value ? (t(), u("span", tl, [
|
|
802
|
-
D(o.$slots, "value", {}, void 0, !0)
|
|
803
|
-
])) : g("", !0),
|
|
804
|
-
o.toggle ? (t(), z(M(ne), {
|
|
805
|
-
key: 1,
|
|
806
|
-
modelValue: p.value,
|
|
807
|
-
"onUpdate:modelValue": v[0] || (v[0] = (i) => p.value = i)
|
|
808
|
-
}, null, 8, ["modelValue"])) : g("", !0),
|
|
809
|
-
o.iconRight ? (t(), z(M(K), {
|
|
810
|
-
key: 2,
|
|
811
|
-
class: "menu-item__icon-right",
|
|
812
|
-
name: o.iconRight.name,
|
|
813
|
-
color: o.iconRight.color
|
|
814
|
-
}, null, 8, ["name", "color"])) : g("", !0),
|
|
815
|
-
o.arrow ? (t(), z(M(K), {
|
|
816
|
-
key: 3,
|
|
817
|
-
class: "menu-item__icon-right menu-item__arrow",
|
|
818
|
-
name: "arrow-right"
|
|
819
|
-
})) : g("", !0)
|
|
820
|
-
])
|
|
821
|
-
]),
|
|
822
|
-
_: 3
|
|
823
|
-
}, 8, ["class", "to", "href", "target", "disable"]));
|
|
824
|
-
}
|
|
825
|
-
}), Al = /* @__PURE__ */ L(sl, [["__scopeId", "data-v-b9907ab7"]]), le = (m) => m ? !0 : "Обовʼязкове поле", il = { class: "app-select__amount" }, ul = ["onClick"], rl = /* @__PURE__ */ R({
|
|
826
|
-
__name: "AppSelect",
|
|
827
|
-
props: {
|
|
828
|
-
modelValue: {},
|
|
829
|
-
size: { default: w.MD },
|
|
830
|
-
options: {},
|
|
831
|
-
multiple: { type: Boolean },
|
|
832
|
-
label: {},
|
|
833
|
-
placeholder: {},
|
|
834
|
-
required: { type: Boolean },
|
|
835
|
-
clearable: { type: Boolean },
|
|
836
|
-
disabled: { type: Boolean },
|
|
837
|
-
loading: { type: Boolean },
|
|
838
|
-
filtering: { type: Boolean },
|
|
839
|
-
autofocus: { type: Boolean },
|
|
840
|
-
rules: {},
|
|
841
|
-
lazyRules: { type: [Boolean, String] },
|
|
842
|
-
menuClass: {},
|
|
843
|
-
glass: { type: Boolean },
|
|
844
|
-
isMobile: { type: Boolean },
|
|
845
|
-
chips: { type: Boolean },
|
|
846
|
-
creatable: { type: Boolean },
|
|
847
|
-
onCreate: {},
|
|
848
|
-
deletable: { type: Boolean }
|
|
849
|
-
},
|
|
850
|
-
emits: [
|
|
851
|
-
"update:modelValue",
|
|
852
|
-
"popupShow",
|
|
853
|
-
"popupHide",
|
|
854
|
-
"delete"
|
|
855
|
-
],
|
|
856
|
-
setup(m, { emit: r }) {
|
|
857
|
-
const l = m, e = r, p = U(!1), s = U(""), o = U(!1), v = B(() => l.filtering || l.creatable), i = B({
|
|
858
|
-
get() {
|
|
859
|
-
if (l.modelValue) {
|
|
860
|
-
if (l.multiple && Array.isArray(l.modelValue))
|
|
861
|
-
return l.options.filter(
|
|
862
|
-
(n) => l.modelValue.includes(n.value)
|
|
863
|
-
);
|
|
864
|
-
if (!Array.isArray(l.modelValue))
|
|
865
|
-
return l.options.find(
|
|
866
|
-
(n) => n.value === l.modelValue
|
|
867
|
-
);
|
|
868
|
-
}
|
|
869
|
-
},
|
|
870
|
-
set(n) {
|
|
871
|
-
if (!n) {
|
|
872
|
-
e("update:modelValue", void 0);
|
|
873
|
-
return;
|
|
874
|
-
}
|
|
875
|
-
if (l.multiple && Array.isArray(n)) {
|
|
876
|
-
const b = n.map((f) => f.value);
|
|
877
|
-
e("update:modelValue", b);
|
|
878
|
-
} else Array.isArray(n) || e("update:modelValue", n.value);
|
|
879
|
-
}
|
|
880
|
-
}), S = B(() => Array.isArray(i.value) ? i.value : i.value ? [i.value] : []), C = B(() => {
|
|
881
|
-
var n;
|
|
882
|
-
if (Array.isArray(i.value)) {
|
|
883
|
-
if (l.multiple && i.value.length == 0)
|
|
884
|
-
return l.placeholder;
|
|
885
|
-
} else return ((n = i.value) == null ? void 0 : n.label) || l.placeholder || "";
|
|
886
|
-
return "";
|
|
887
|
-
}), I = B(() => !(!l.clearable || !l.modelValue || l.modelValue && Array.isArray(l.modelValue) && !l.modelValue.length)), O = B(() => s.value ? l.options.filter(
|
|
888
|
-
(n) => n.label.toLowerCase().includes(s.value.toLowerCase())
|
|
889
|
-
) : l.options), c = B(() => {
|
|
890
|
-
if (l.rules)
|
|
891
|
-
return l.required ? [...l.rules, le] : l.rules;
|
|
892
|
-
if (l.required)
|
|
893
|
-
return [le];
|
|
894
|
-
}), a = () => {
|
|
895
|
-
p.value = !0, e("popupShow");
|
|
896
|
-
}, d = () => {
|
|
897
|
-
p.value = !1, e("popupHide");
|
|
898
|
-
}, k = () => {
|
|
899
|
-
i.value = void 0;
|
|
900
|
-
}, h = (n, b) => {
|
|
901
|
-
b(() => {
|
|
902
|
-
s.value = n;
|
|
903
|
-
});
|
|
904
|
-
}, _ = async (n, b) => {
|
|
905
|
-
const f = n.trim();
|
|
906
|
-
if (!f) return b();
|
|
907
|
-
if (o.value) return;
|
|
908
|
-
const P = l.options.find(
|
|
909
|
-
(q) => q.label.toLowerCase() === f.toLowerCase()
|
|
910
|
-
);
|
|
911
|
-
if (P) return b(P, "add-unique");
|
|
912
|
-
if (l.onCreate) {
|
|
913
|
-
o.value = !0;
|
|
914
|
-
try {
|
|
915
|
-
const q = await l.onCreate(f);
|
|
916
|
-
b(q || void 0, "add-unique");
|
|
917
|
-
} catch {
|
|
918
|
-
} finally {
|
|
919
|
-
o.value = !1;
|
|
920
|
-
}
|
|
921
|
-
}
|
|
922
|
-
};
|
|
923
|
-
return (n, b) => (t(), u("div", {
|
|
924
|
-
class: y(["app-select", [
|
|
925
|
-
{ "app-select_opened": p.value, "app-select_chips": n.chips },
|
|
926
|
-
`app-select_${n.size}`
|
|
927
|
-
]])
|
|
928
|
-
}, [
|
|
929
|
-
n.label ? (t(), u("label", {
|
|
930
|
-
key: 0,
|
|
931
|
-
class: y(["app-select__label", { "app-select__label_bold": n.required }])
|
|
932
|
-
}, A(n.required ? `${n.label} *` : n.label), 3)) : g("", !0),
|
|
933
|
-
H(M(_e), {
|
|
934
|
-
standout: "",
|
|
935
|
-
"hide-bottom-space": "",
|
|
936
|
-
"hide-dropdown-icon": "",
|
|
937
|
-
"no-error-icon": "",
|
|
938
|
-
behavior: "menu",
|
|
939
|
-
"popup-no-route-dismiss": "",
|
|
940
|
-
"popup-content-class": `kl-menu ${n.glass ? "glass-menu" : ""} app-select-menu app-select-menu_${n.size} ${n.menuClass}`,
|
|
941
|
-
placeholder: n.creatable ? n.placeholder : n.filtering && "Почніть вводити",
|
|
942
|
-
"input-debounce": "50",
|
|
943
|
-
modelValue: i.value,
|
|
944
|
-
"onUpdate:modelValue": b[0] || (b[0] = (f) => i.value = f),
|
|
945
|
-
options: O.value,
|
|
946
|
-
multiple: n.multiple,
|
|
947
|
-
"use-input": n.creatable || n.filtering && (Array.isArray(i.value) || !i.value),
|
|
948
|
-
rules: c.value,
|
|
949
|
-
"lazy-rules": n.lazyRules,
|
|
950
|
-
autofocus: n.autofocus,
|
|
951
|
-
disable: n.disabled,
|
|
952
|
-
loading: n.loading || o.value,
|
|
953
|
-
"menu-offset": [0, 2],
|
|
954
|
-
"on-new-value": n.creatable ? _ : void 0,
|
|
955
|
-
onFilter: h,
|
|
956
|
-
onPopupShow: a,
|
|
957
|
-
onPopupHide: d
|
|
958
|
-
}, {
|
|
959
|
-
append: T(() => [
|
|
960
|
-
I.value ? (t(), u("i", {
|
|
961
|
-
key: 0,
|
|
962
|
-
class: "icon-kl icon-kl-circle-close app-select__clear",
|
|
963
|
-
onClick: F(k, ["stop", "prevent"])
|
|
964
|
-
})) : g("", !0),
|
|
965
|
-
b[1] || (b[1] = $("i", { class: "icon-kl icon-kl-arrow-down app-select__drop-icon" }, null, -1))
|
|
966
|
-
]),
|
|
967
|
-
selected: T(() => {
|
|
968
|
-
var f, P;
|
|
969
|
-
return [
|
|
970
|
-
n.chips && S.value.length ? (t(!0), u(V, { key: 0 }, Q(S.value, (q) => (t(), z(M(ke), {
|
|
971
|
-
key: q.value,
|
|
972
|
-
dense: "",
|
|
973
|
-
class: "app-select__chip",
|
|
974
|
-
label: q.label
|
|
975
|
-
}, null, 8, ["label"]))), 128)) : Array.isArray(i.value) ? (t(), u(V, { key: 1 }, [
|
|
976
|
-
!v.value || i.value.length ? (t(), u("span", {
|
|
977
|
-
key: 0,
|
|
978
|
-
class: y([
|
|
979
|
-
"app-select__selected",
|
|
980
|
-
{
|
|
981
|
-
"app-select__placeholder": !((f = i.value) != null && f.length) && n.placeholder
|
|
982
|
-
}
|
|
983
|
-
])
|
|
984
|
-
}, [
|
|
985
|
-
(P = i.value) != null && P.length ? (t(), u(V, { key: 0 }, [
|
|
986
|
-
b[2] || (b[2] = N(" Вибрано ", -1)),
|
|
987
|
-
$("span", il, A(i.value.length), 1)
|
|
988
|
-
], 64)) : (t(), u(V, { key: 1 }, [
|
|
989
|
-
N(A(l.placeholder), 1)
|
|
990
|
-
], 64))
|
|
991
|
-
], 2)) : g("", !0)
|
|
992
|
-
], 64)) : (t(), u(V, { key: 2 }, [
|
|
993
|
-
!v.value || i.value ? (t(), u("span", {
|
|
994
|
-
key: 0,
|
|
995
|
-
class: y([
|
|
996
|
-
"app-select__selected",
|
|
997
|
-
{ "app-select__placeholder": !i.value && n.placeholder }
|
|
998
|
-
])
|
|
999
|
-
}, A(C.value), 3)) : g("", !0)
|
|
1000
|
-
], 64))
|
|
1001
|
-
];
|
|
1002
|
-
}),
|
|
1003
|
-
option: T((f) => [
|
|
1004
|
-
H(te, de({
|
|
1005
|
-
"no-arrow": "",
|
|
1006
|
-
label: f.opt.label,
|
|
1007
|
-
checked: f.opt.done,
|
|
1008
|
-
active: f.selected,
|
|
1009
|
-
"is-mobile": n.isMobile,
|
|
1010
|
-
checkbox: l.multiple,
|
|
1011
|
-
"model-value": f.selected
|
|
1012
|
-
}, l.multiple ? { ...f.itemProps, onClick: void 0 } : f.itemProps, {
|
|
1013
|
-
"onUpdate:modelValue": () => f.toggleOption(f.opt)
|
|
1014
|
-
}), pe({ _: 2 }, [
|
|
1015
|
-
n.deletable ? {
|
|
1016
|
-
name: "right",
|
|
1017
|
-
fn: T(() => [
|
|
1018
|
-
$("i", {
|
|
1019
|
-
class: "icon-kl icon-kl-trash app-select__delete",
|
|
1020
|
-
onClick: F((P) => e("delete", f.opt), ["stop"])
|
|
1021
|
-
}, null, 8, ul)
|
|
1022
|
-
]),
|
|
1023
|
-
key: "0"
|
|
1024
|
-
} : void 0
|
|
1025
|
-
]), 1040, ["label", "checked", "active", "is-mobile", "checkbox", "model-value", "onUpdate:modelValue"])
|
|
1026
|
-
]),
|
|
1027
|
-
_: 1
|
|
1028
|
-
}, 8, ["popup-content-class", "placeholder", "modelValue", "options", "multiple", "use-input", "rules", "lazy-rules", "autofocus", "disable", "loading", "on-new-value"])
|
|
1029
|
-
], 2));
|
|
1030
|
-
}
|
|
1031
|
-
}), zl = /* @__PURE__ */ L(rl, [["__scopeId", "data-v-4dbbcd8f"]]), Ll = x(
|
|
1032
|
-
() => import("./AppButtonCopy-BcnKy0Hr.js")
|
|
1033
|
-
), Sl = x(
|
|
1034
|
-
() => Promise.resolve().then(() => Xe)
|
|
1035
|
-
), Il = x(
|
|
1036
|
-
() => import("./BottomSheet-DIlZ1F2d.js")
|
|
1037
|
-
);
|
|
1038
|
-
export {
|
|
1039
|
-
$l as A,
|
|
1040
|
-
Il as B,
|
|
1041
|
-
W as C,
|
|
1042
|
-
Sl as D,
|
|
1043
|
-
Al as M,
|
|
1044
|
-
te as P,
|
|
1045
|
-
Vl as S,
|
|
1046
|
-
L as _,
|
|
1047
|
-
Bl as a,
|
|
1048
|
-
Ll as b,
|
|
1049
|
-
wl as c,
|
|
1050
|
-
K as d,
|
|
1051
|
-
Cl as e,
|
|
1052
|
-
Ml as f,
|
|
1053
|
-
zl as g,
|
|
1054
|
-
ne as h,
|
|
1055
|
-
_l as i
|
|
1056
|
-
};
|