@validol4ik/uikit 0.11.11 → 0.11.13

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