@validol4ik/uikit 0.7.0 → 0.7.3

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 (33) hide show
  1. package/dist/{AppButtonCopy-BAsaHaa4.js → AppButtonCopy-BiINPcGV.js} +1 -1
  2. package/dist/{AppButtonCopy-Dyb9GEq2.cjs → AppButtonCopy-CF4gM6Vq.cjs} +1 -1
  3. package/dist/AppSelect-BTYfDOxZ.js +2302 -0
  4. package/dist/AppSelect-Cqe1_ktM.cjs +1 -0
  5. package/dist/DropdownButton-6Hdgx4O7.js +285 -0
  6. package/dist/DropdownButton-rQuDxHty.cjs +1 -0
  7. package/dist/QMenu-BMHBzPuP.cjs +1 -0
  8. package/dist/{QMenu-CFrDqWMF.js → QMenu-CHfaaKhO.js} +234 -247
  9. package/dist/index-DLgdVg4z.js +1670 -0
  10. package/dist/index-DgJr5_Pb.cjs +1 -0
  11. package/dist/kl.woff +0 -0
  12. package/dist/style.css +1 -1
  13. package/dist/types/components/buttons/AppButton/types.d.ts +1 -0
  14. package/dist/types/components/buttons/DropdownButton/types.d.ts +2 -1
  15. package/dist/types/components/constants.d.ts +3 -0
  16. package/dist/types/components/form/AppSelect/AppSelect.vue.d.ts +4 -0
  17. package/dist/types/components/form/AppSelect/types.d.ts +1 -0
  18. package/dist/types/components/menu/PopupItem/PopupItem.vue.d.ts +22 -0
  19. package/dist/types/components/menu/PopupItem/types.d.ts +23 -0
  20. package/dist/types/components/types.d.ts +1 -1
  21. package/dist/types/index.d.ts +7 -2
  22. package/dist/types/types/types.d.ts +1 -0
  23. package/dist/uikit.cjs +1 -1
  24. package/dist/uikit.es.js +11 -10
  25. package/package.json +7 -1
  26. package/dist/AppSelect-5p3euh6R.cjs +0 -1
  27. package/dist/AppSelect-WIENN4a-.js +0 -2524
  28. package/dist/DropdownButton-BL00UPY1.cjs +0 -1
  29. package/dist/DropdownButton-DUUK14vz.js +0 -313
  30. package/dist/QMenu-DtmHqodr.cjs +0 -1
  31. package/dist/index-CheOtzui.js +0 -1319
  32. package/dist/index-d12F-Rqz.cjs +0 -1
  33. /package/dist/types/{components/AppIcon/quasarBoot.d.ts → bootFiles/iconSet.d.ts} +0 -0
@@ -1,1319 +0,0 @@
1
- import { computed as c, markRaw as Se, defineComponent as F, h as m, withDirectives as se, getCurrentInstance as Z, unref as W, ref as J, onBeforeUnmount as Oe, Transition as De, createBlock as Be, openBlock as B, normalizeClass as R, withCtx as Ie, createElementBlock as C, createCommentVNode as T, renderSlot as re, Fragment as ie, createTextVNode as Ce, toDisplayString as H, createElementVNode as D, normalizeStyle as ue, watch as je, onMounted as xe, renderList as we, withKeys as Ve, vModelText as Ke, nextTick as ve, mergeModels as Ne, useModel as Fe, defineAsyncComponent as ce } from "vue";
2
- const Xt = ({ app: e }) => {
3
- const t = e.config.globalProperties.$q;
4
- t.iconMapFn = (a) => {
5
- if (a.startsWith("icon-kl:"))
6
- return {
7
- cls: `icon-kl icon-kl-${a.slice(8)}`
8
- };
9
- };
10
- }, Le = {
11
- PRIMARY: "primary",
12
- INFO: "info"
13
- }, k = {
14
- SM: "sm",
15
- MD: "md",
16
- LG: "lg"
17
- }, Qe = {
18
- [k.SM]: "3px 9px",
19
- [k.MD]: "5px 12px",
20
- [k.LG]: "9px 20px"
21
- }, le = {
22
- xs: 18,
23
- sm: 24,
24
- md: 32,
25
- lg: 38,
26
- xl: 46
27
- }, de = {
28
- size: String
29
- };
30
- function fe(e, t = le) {
31
- return c(() => e.size !== void 0 ? { fontSize: e.size in t ? `${t[e.size]}px` : e.size } : null);
32
- }
33
- function ee(e) {
34
- return Se(F(e));
35
- }
36
- function Ge(e) {
37
- return Se(e);
38
- }
39
- function Ue(e, t) {
40
- return e !== void 0 && e() || t;
41
- }
42
- function Yt(e, t) {
43
- if (e !== void 0) {
44
- const a = e();
45
- if (a != null)
46
- return a.slice();
47
- }
48
- return t;
49
- }
50
- function N(e, t) {
51
- return e !== void 0 ? t.concat(e()) : t;
52
- }
53
- function Wt(e, t) {
54
- return e === void 0 ? t : t !== void 0 ? t.concat(e()) : e();
55
- }
56
- function Jt(e, t, a, n, o, r) {
57
- t.key = n + o;
58
- const l = m(e, t, a);
59
- return o === !0 ? se(l, r()) : l;
60
- }
61
- const ge = "0 0 24 24", ne = (e) => e, ae = (e) => `ionicons ${e}`, Ee = {
62
- "mdi-": (e) => `mdi ${e}`,
63
- "icon-": ne,
64
- // fontawesome equiv
65
- "bt-": (e) => `bt ${e}`,
66
- "eva-": (e) => `eva ${e}`,
67
- "ion-md": ae,
68
- "ion-ios": ae,
69
- "ion-logo": ae,
70
- "iconfont ": ne,
71
- "ti-": (e) => `themify-icon ${e}`,
72
- "bi-": (e) => `bootstrap-icons ${e}`,
73
- "i-": ne
74
- // UnoCSS pure icons
75
- }, Me = {
76
- o_: "-outlined",
77
- r_: "-round",
78
- s_: "-sharp"
79
- }, Re = {
80
- sym_o_: "-outlined",
81
- sym_r_: "-rounded",
82
- sym_s_: "-sharp"
83
- }, He = new RegExp("^(" + Object.keys(Ee).join("|") + ")"), Xe = new RegExp("^(" + Object.keys(Me).join("|") + ")"), pe = new RegExp("^(" + Object.keys(Re).join("|") + ")"), Ye = /^[Mm]\s?[-+]?\.?\d/, We = /^img:/, Je = /^svguse:/, Ze = /^ion-/, et = /^(fa-(classic|sharp|solid|regular|light|brands|duotone|thin)|[lf]a[srlbdk]?) /, me = ee({
84
- name: "QIcon",
85
- props: {
86
- ...de,
87
- tag: {
88
- type: String,
89
- default: "i"
90
- },
91
- name: String,
92
- color: String,
93
- left: Boolean,
94
- right: Boolean
95
- },
96
- setup(e, { slots: t }) {
97
- const { proxy: { $q: a } } = Z(), n = fe(e), o = c(
98
- () => "q-icon" + (e.left === !0 ? " on-left" : "") + (e.right === !0 ? " on-right" : "") + (e.color !== void 0 ? ` text-${e.color}` : "")
99
- ), r = c(() => {
100
- let l, s = e.name;
101
- if (s === "none" || !s)
102
- return { none: !0 };
103
- if (a.iconMapFn !== null) {
104
- const f = a.iconMapFn(s);
105
- if (f !== void 0)
106
- if (f.icon !== void 0) {
107
- if (s = f.icon, s === "none" || !s)
108
- return { none: !0 };
109
- } else
110
- return {
111
- cls: f.cls,
112
- content: f.content !== void 0 ? f.content : " "
113
- };
114
- }
115
- if (Ye.test(s) === !0) {
116
- const [f, $ = ge] = s.split("|");
117
- return {
118
- svg: !0,
119
- viewBox: $,
120
- nodes: f.split("&&").map((d) => {
121
- const [S, u, g] = d.split("@@");
122
- return m("path", { style: u, d: S, transform: g });
123
- })
124
- };
125
- }
126
- if (We.test(s) === !0)
127
- return {
128
- img: !0,
129
- src: s.substring(4)
130
- };
131
- if (Je.test(s) === !0) {
132
- const [f, $ = ge] = s.split("|");
133
- return {
134
- svguse: !0,
135
- src: f.substring(7),
136
- viewBox: $
137
- };
138
- }
139
- let _ = " ";
140
- const b = s.match(He);
141
- if (b !== null)
142
- l = Ee[b[1]](s);
143
- else if (et.test(s) === !0)
144
- l = s;
145
- else if (Ze.test(s) === !0)
146
- l = `ionicons ion-${a.platform.is.ios === !0 ? "ios" : "md"}${s.substring(3)}`;
147
- else if (pe.test(s) === !0) {
148
- l = "notranslate material-symbols";
149
- const f = s.match(pe);
150
- f !== null && (s = s.substring(6), l += Re[f[1]]), _ = s;
151
- } else {
152
- l = "notranslate material-icons";
153
- const f = s.match(Xe);
154
- f !== null && (s = s.substring(2), l += Me[f[1]]), _ = s;
155
- }
156
- return {
157
- cls: l,
158
- content: _
159
- };
160
- });
161
- return () => {
162
- const l = {
163
- class: o.value,
164
- style: n.value,
165
- "aria-hidden": "true"
166
- };
167
- return r.value.none === !0 ? m(e.tag, l, Ue(t.default)) : r.value.img === !0 ? m(e.tag, l, N(t.default, [
168
- m("img", { src: r.value.src })
169
- ])) : r.value.svg === !0 ? m(e.tag, l, N(t.default, [
170
- m("svg", {
171
- viewBox: r.value.viewBox || "0 0 24 24"
172
- }, r.value.nodes)
173
- ])) : r.value.svguse === !0 ? m(e.tag, l, N(t.default, [
174
- m("svg", {
175
- viewBox: r.value.viewBox
176
- }, [
177
- m("use", { "xlink:href": r.value.src })
178
- ])
179
- ])) : (r.value.cls !== void 0 && (l.class += " " + r.value.cls), m(e.tag, l, N(t.default, [
180
- r.value.content
181
- ])));
182
- };
183
- }
184
- }), tt = {
185
- size: {
186
- type: [String, Number],
187
- default: "1em"
188
- },
189
- color: String
190
- };
191
- function nt(e) {
192
- return {
193
- cSize: c(() => e.size in le ? `${le[e.size]}px` : e.size),
194
- classes: c(
195
- () => "q-spinner" + (e.color ? ` text-${e.color}` : "")
196
- )
197
- };
198
- }
199
- const at = ee({
200
- name: "QSpinner",
201
- props: {
202
- ...tt,
203
- thickness: {
204
- type: Number,
205
- default: 5
206
- }
207
- },
208
- setup(e) {
209
- const { cSize: t, classes: a } = nt(e);
210
- return () => m("svg", {
211
- class: a.value + " q-spinner-mat",
212
- width: t.value,
213
- height: t.value,
214
- viewBox: "25 25 50 50"
215
- }, [
216
- m("circle", {
217
- class: "path",
218
- cx: "50",
219
- cy: "50",
220
- r: "20",
221
- fill: "none",
222
- stroke: "currentColor",
223
- "stroke-width": e.thickness,
224
- "stroke-miterlimit": "10"
225
- })
226
- ]);
227
- }
228
- });
229
- function lt(e, t) {
230
- const a = e.style;
231
- for (const n in t)
232
- a[n] = t[n];
233
- }
234
- function Zt(e) {
235
- if (e == null)
236
- return;
237
- if (typeof e == "string")
238
- try {
239
- return document.querySelector(e) || void 0;
240
- } catch {
241
- return;
242
- }
243
- const t = W(e);
244
- if (t)
245
- return t.$el || t;
246
- }
247
- function en(e, t) {
248
- if (e == null || e.contains(t) === !0)
249
- return !0;
250
- for (let a = e.nextElementSibling; a !== null; a = a.nextElementSibling)
251
- if (a.contains(t))
252
- return !0;
253
- return !1;
254
- }
255
- const te = {
256
- hasPassive: !1,
257
- passiveCapture: !0,
258
- notPassiveCapture: !0
259
- };
260
- try {
261
- const e = Object.defineProperty({}, "passive", {
262
- get() {
263
- Object.assign(te, {
264
- hasPassive: !0,
265
- passive: { passive: !0 },
266
- notPassive: { passive: !1 },
267
- passiveCapture: { passive: !0, capture: !0 },
268
- notPassiveCapture: { passive: !1, capture: !0 }
269
- });
270
- }
271
- });
272
- window.addEventListener("qtest", null, e), window.removeEventListener("qtest", null, e);
273
- } catch {
274
- }
275
- function tn() {
276
- }
277
- function ot(e) {
278
- return e.touches && e.touches[0] ? e = e.touches[0] : e.changedTouches && e.changedTouches[0] ? e = e.changedTouches[0] : e.targetTouches && e.targetTouches[0] && (e = e.targetTouches[0]), {
279
- top: e.clientY,
280
- left: e.clientX
281
- };
282
- }
283
- function nn(e) {
284
- if (e.path)
285
- return e.path;
286
- if (e.composedPath)
287
- return e.composedPath();
288
- const t = [];
289
- let a = e.target;
290
- for (; a; ) {
291
- if (t.push(a), a.tagName === "HTML")
292
- return t.push(document), t.push(window), t;
293
- a = a.parentElement;
294
- }
295
- }
296
- function Pe(e) {
297
- e.stopPropagation();
298
- }
299
- function st(e) {
300
- e.cancelable !== !1 && e.preventDefault();
301
- }
302
- function j(e) {
303
- e.cancelable !== !1 && e.preventDefault(), e.stopPropagation();
304
- }
305
- function rt(e, t, a) {
306
- const n = `__q_${t}_evt`;
307
- e[n] = e[n] !== void 0 ? e[n].concat(a) : a, a.forEach((o) => {
308
- o[0].addEventListener(o[1], e[o[2]], te[o[3]]);
309
- });
310
- }
311
- function it(e, t) {
312
- const a = `__q_${t}_evt`;
313
- e[a] !== void 0 && (e[a].forEach((n) => {
314
- n[0].removeEventListener(n[1], e[n[2]], te[n[3]]);
315
- }), e[a] = void 0);
316
- }
317
- function ut(e) {
318
- return e !== Object(e) || e.isComposing === !0 || e.qKeyEvent === !0;
319
- }
320
- function oe(e, t) {
321
- return ut(e) === !0 ? !1 : [].concat(t).includes(e.keyCode);
322
- }
323
- function ct(e, t = 250) {
324
- let a = !1, n;
325
- return function() {
326
- return a === !1 && (a = !0, setTimeout(() => {
327
- a = !1;
328
- }, t), n = e.apply(this, arguments)), n;
329
- };
330
- }
331
- function he(e, t, a, n) {
332
- a.modifiers.stop === !0 && Pe(e);
333
- const o = a.modifiers.color;
334
- let r = a.modifiers.center;
335
- r = r === !0 || n === !0;
336
- const l = document.createElement("span"), s = document.createElement("span"), _ = ot(e), { left: b, top: f, width: $, height: d } = t.getBoundingClientRect(), S = Math.sqrt($ * $ + d * d), u = S / 2, g = `${($ - S) / 2}px`, v = r ? g : `${_.left - b - u}px`, p = `${(d - S) / 2}px`, q = r ? p : `${_.top - f - u}px`;
337
- s.className = "q-ripple__inner", lt(s, {
338
- height: `${S}px`,
339
- width: `${S}px`,
340
- transform: `translate3d(${v},${q},0) scale3d(.2,.2,1)`,
341
- opacity: 0
342
- }), l.className = `q-ripple${o ? " text-" + o : ""}`, l.setAttribute("dir", "ltr"), l.appendChild(s), t.appendChild(l);
343
- const w = () => {
344
- l.remove(), clearTimeout(L);
345
- };
346
- a.abort.push(w);
347
- let L = setTimeout(() => {
348
- s.classList.add("q-ripple__inner--enter"), s.style.transform = `translate3d(${g},${p},0) scale3d(1,1,1)`, s.style.opacity = 0.2, L = setTimeout(() => {
349
- s.classList.remove("q-ripple__inner--enter"), s.classList.add("q-ripple__inner--leave"), s.style.opacity = 0, L = setTimeout(() => {
350
- l.remove(), a.abort.splice(a.abort.indexOf(w), 1);
351
- }, 275);
352
- }, 250);
353
- }, 50);
354
- }
355
- function be(e, { modifiers: t, value: a, arg: n }) {
356
- const o = Object.assign({}, e.cfg.ripple, t, a);
357
- e.modifiers = {
358
- early: o.early === !0,
359
- stop: o.stop === !0,
360
- center: o.center === !0,
361
- color: o.color || n,
362
- keyCodes: [].concat(o.keyCodes || 13)
363
- };
364
- }
365
- const dt = Ge(
366
- {
367
- name: "ripple",
368
- beforeMount(e, t) {
369
- const a = t.instance.$.appContext.config.globalProperties.$q.config || {};
370
- if (a.ripple === !1) return;
371
- const n = {
372
- cfg: a,
373
- enabled: t.value !== !1,
374
- modifiers: {},
375
- abort: [],
376
- start(o) {
377
- n.enabled === !0 && o.qSkipRipple !== !0 && o.type === (n.modifiers.early === !0 ? "pointerdown" : "click") && he(o, e, n, o.qKeyEvent === !0);
378
- },
379
- keystart: ct((o) => {
380
- n.enabled === !0 && o.qSkipRipple !== !0 && oe(o, n.modifiers.keyCodes) === !0 && o.type === `key${n.modifiers.early === !0 ? "down" : "up"}` && he(o, e, n, !0);
381
- }, 300)
382
- };
383
- be(n, t), e.__qripple = n, rt(n, "main", [
384
- [e, "pointerdown", "start", "passive"],
385
- [e, "click", "start", "passive"],
386
- [e, "keydown", "keystart", "passive"],
387
- [e, "keyup", "keystart", "passive"]
388
- ]);
389
- },
390
- updated(e, t) {
391
- if (t.oldValue !== t.value) {
392
- const a = e.__qripple;
393
- a !== void 0 && (a.enabled = t.value !== !1, a.enabled === !0 && Object(t.value) === t.value && be(a, t));
394
- }
395
- },
396
- beforeUnmount(e) {
397
- const t = e.__qripple;
398
- t !== void 0 && (t.abort.forEach((a) => {
399
- a();
400
- }), it(t, "main"), delete e._qripple);
401
- }
402
- }
403
- ), Ae = {
404
- left: "start",
405
- center: "center",
406
- right: "end",
407
- between: "between",
408
- around: "around",
409
- evenly: "evenly",
410
- stretch: "stretch"
411
- }, ft = Object.keys(Ae), vt = {
412
- align: {
413
- type: String,
414
- validator: (e) => ft.includes(e)
415
- }
416
- };
417
- function gt(e) {
418
- return c(() => {
419
- const t = e.align === void 0 ? e.vertical === !0 ? "stretch" : "left" : e.align;
420
- return `${e.vertical === !0 ? "items" : "justify"}-${Ae[t]}`;
421
- });
422
- }
423
- function an(e) {
424
- if (Object(e.$parent) === e.$parent)
425
- return e.$parent;
426
- let { parent: t } = e.$;
427
- for (; Object(t) === t; ) {
428
- if (Object(t.proxy) === t.proxy)
429
- return t.proxy;
430
- t = t.parent;
431
- }
432
- }
433
- function pt(e) {
434
- return e.appContext.config.globalProperties.$router !== void 0;
435
- }
436
- function ln(e) {
437
- return e.isUnmounted === !0 || e.isDeactivated === !0;
438
- }
439
- function ye(e) {
440
- return e ? e.aliasOf ? e.aliasOf.path : e.path : "";
441
- }
442
- function ke(e, t) {
443
- return (e.aliasOf || e) === (t.aliasOf || t);
444
- }
445
- function mt(e, t) {
446
- for (const a in t) {
447
- const n = t[a], o = e[a];
448
- if (typeof n == "string") {
449
- if (n !== o)
450
- return !1;
451
- } else if (Array.isArray(o) === !1 || o.length !== n.length || n.some((r, l) => r !== o[l]))
452
- return !1;
453
- }
454
- return !0;
455
- }
456
- function _e(e, t) {
457
- return Array.isArray(t) === !0 ? e.length === t.length && e.every((a, n) => a === t[n]) : e.length === 1 && e[0] === t;
458
- }
459
- function ht(e, t) {
460
- return Array.isArray(e) === !0 ? _e(e, t) : Array.isArray(t) === !0 ? _e(t, e) : e === t;
461
- }
462
- function bt(e, t) {
463
- if (Object.keys(e).length !== Object.keys(t).length)
464
- return !1;
465
- for (const a in e)
466
- if (ht(e[a], t[a]) === !1)
467
- return !1;
468
- return !0;
469
- }
470
- const ze = {
471
- // router-link
472
- to: [String, Object],
473
- replace: Boolean,
474
- // regular <a> link
475
- href: String,
476
- target: String,
477
- // state
478
- disable: Boolean
479
- }, on = {
480
- ...ze,
481
- // router-link
482
- exact: Boolean,
483
- activeClass: {
484
- type: String,
485
- default: "q-router-link--active"
486
- },
487
- exactActiveClass: {
488
- type: String,
489
- default: "q-router-link--exact-active"
490
- }
491
- };
492
- function yt({ fallbackTag: e, useDisableForRouterLinkProps: t = !0 } = {}) {
493
- const a = Z(), { props: n, proxy: o, emit: r } = a, l = pt(a), s = c(() => n.disable !== !0 && n.href !== void 0), _ = t === !0 ? c(
494
- () => l === !0 && n.disable !== !0 && s.value !== !0 && n.to !== void 0 && n.to !== null && n.to !== ""
495
- ) : c(
496
- () => l === !0 && s.value !== !0 && n.to !== void 0 && n.to !== null && n.to !== ""
497
- ), b = c(() => _.value === !0 ? q(n.to) : null), f = c(() => b.value !== null), $ = c(() => s.value === !0 || f.value === !0), d = c(() => n.type === "a" || $.value === !0 ? "a" : n.tag || e || "div"), S = c(() => s.value === !0 ? {
498
- href: n.href,
499
- target: n.target
500
- } : f.value === !0 ? {
501
- href: b.value.href,
502
- target: n.target
503
- } : {}), u = c(() => {
504
- if (f.value === !1)
505
- return -1;
506
- const { matched: h } = b.value, { length: E } = h, P = h[E - 1];
507
- if (P === void 0)
508
- return -1;
509
- const z = o.$route.matched;
510
- if (z.length === 0)
511
- return -1;
512
- const O = z.findIndex(
513
- ke.bind(null, P)
514
- );
515
- if (O !== -1)
516
- return O;
517
- const Y = ye(h[E - 2]);
518
- return (
519
- // we are dealing with nested routes
520
- E > 1 && ye(P) === Y && z[z.length - 1].path !== Y ? z.findIndex(
521
- ke.bind(null, h[E - 2])
522
- ) : O
523
- );
524
- }), g = c(
525
- () => f.value === !0 && u.value !== -1 && mt(o.$route.params, b.value.params)
526
- ), v = c(
527
- () => g.value === !0 && u.value === o.$route.matched.length - 1 && bt(o.$route.params, b.value.params)
528
- ), p = c(() => f.value === !0 ? v.value === !0 ? ` ${n.exactActiveClass} ${n.activeClass}` : n.exact === !0 ? "" : g.value === !0 ? ` ${n.activeClass}` : "" : "");
529
- function q(h) {
530
- try {
531
- return o.$router.resolve(h);
532
- } catch {
533
- }
534
- return null;
535
- }
536
- function w(h, { returnRouterError: E, to: P = n.to, replace: z = n.replace } = {}) {
537
- if (n.disable === !0)
538
- return h.preventDefault(), Promise.resolve(!1);
539
- if (
540
- // don't redirect with control keys;
541
- // should match RouterLink from Vue Router
542
- h.metaKey || h.altKey || h.ctrlKey || h.shiftKey || h.button !== void 0 && h.button !== 0 || n.target === "_blank"
543
- )
544
- return Promise.resolve(!1);
545
- h.preventDefault();
546
- const O = o.$router[z === !0 ? "replace" : "push"](P);
547
- return E === !0 ? O : O.then(() => {
548
- }).catch(() => {
549
- });
550
- }
551
- function L(h) {
552
- if (f.value === !0) {
553
- const E = (P) => w(h, P);
554
- r("click", h, E), h.defaultPrevented !== !0 && E();
555
- } else
556
- r("click", h);
557
- }
558
- return {
559
- hasRouterLink: f,
560
- hasHrefLink: s,
561
- hasLink: $,
562
- linkTag: d,
563
- resolvedLink: b,
564
- linkIsActive: g,
565
- linkIsExactActive: v,
566
- linkClass: p,
567
- linkAttrs: S,
568
- getLink: q,
569
- navigateToRouterLink: w,
570
- navigateOnClick: L
571
- };
572
- }
573
- const $e = {
574
- none: 0,
575
- xs: 4,
576
- sm: 8,
577
- md: 16,
578
- lg: 24,
579
- xl: 32
580
- }, kt = {
581
- xs: 8,
582
- sm: 10,
583
- md: 14,
584
- lg: 20,
585
- xl: 24
586
- }, _t = ["button", "submit", "reset"], $t = /[^\s]\/[^\s]/, qt = ["flat", "outline", "push", "unelevated"];
587
- function Te(e, t) {
588
- return e.flat === !0 ? "flat" : e.outline === !0 ? "outline" : e.push === !0 ? "push" : e.unelevated === !0 ? "unelevated" : t;
589
- }
590
- function sn(e) {
591
- const t = Te(e);
592
- return t !== void 0 ? { [t]: !0 } : {};
593
- }
594
- const St = {
595
- ...de,
596
- ...ze,
597
- type: {
598
- type: String,
599
- default: "button"
600
- },
601
- label: [Number, String],
602
- icon: String,
603
- iconRight: String,
604
- ...qt.reduce(
605
- (e, t) => (e[t] = Boolean) && e,
606
- {}
607
- ),
608
- square: Boolean,
609
- rounded: Boolean,
610
- glossy: Boolean,
611
- size: String,
612
- fab: Boolean,
613
- fabMini: Boolean,
614
- padding: String,
615
- color: String,
616
- textColor: String,
617
- noCaps: Boolean,
618
- noWrap: Boolean,
619
- dense: Boolean,
620
- tabindex: [Number, String],
621
- ripple: {
622
- type: [Boolean, Object],
623
- default: !0
624
- },
625
- align: {
626
- ...vt.align,
627
- default: "center"
628
- },
629
- stack: Boolean,
630
- stretch: Boolean,
631
- loading: {
632
- type: Boolean,
633
- default: null
634
- },
635
- disable: Boolean
636
- }, Bt = {
637
- ...St,
638
- round: Boolean
639
- };
640
- function Ct(e) {
641
- const t = fe(e, kt), a = gt(e), { hasRouterLink: n, hasLink: o, linkTag: r, linkAttrs: l, navigateOnClick: s } = yt({
642
- fallbackTag: "button"
643
- }), _ = c(() => {
644
- const v = e.fab === !1 && e.fabMini === !1 ? t.value : {};
645
- return e.padding !== void 0 ? Object.assign({}, v, {
646
- padding: e.padding.split(/\s+/).map((p) => p in $e ? $e[p] + "px" : p).join(" "),
647
- minWidth: "0",
648
- minHeight: "0"
649
- }) : v;
650
- }), b = c(
651
- () => e.rounded === !0 || e.fab === !0 || e.fabMini === !0
652
- ), f = c(
653
- () => e.disable !== !0 && e.loading !== !0
654
- ), $ = c(() => f.value === !0 ? e.tabindex || 0 : -1), d = c(() => Te(e, "standard")), S = c(() => {
655
- const v = { tabindex: $.value };
656
- return o.value === !0 ? Object.assign(v, l.value) : _t.includes(e.type) === !0 && (v.type = e.type), r.value === "a" ? (e.disable === !0 ? v["aria-disabled"] = "true" : v.href === void 0 && (v.role = "button"), n.value !== !0 && $t.test(e.type) === !0 && (v.type = e.type)) : e.disable === !0 && (v.disabled = "", v["aria-disabled"] = "true"), e.loading === !0 && e.percentage !== void 0 && Object.assign(v, {
657
- role: "progressbar",
658
- "aria-valuemin": 0,
659
- "aria-valuemax": 100,
660
- "aria-valuenow": e.percentage
661
- }), v;
662
- }), u = c(() => {
663
- let v;
664
- e.color !== void 0 ? e.flat === !0 || e.outline === !0 ? v = `text-${e.textColor || e.color}` : v = `bg-${e.color} text-${e.textColor || "white"}` : e.textColor && (v = `text-${e.textColor}`);
665
- const p = e.round === !0 ? "round" : `rectangle${b.value === !0 ? " q-btn--rounded" : e.square === !0 ? " q-btn--square" : ""}`;
666
- return `q-btn--${d.value} q-btn--${p}` + (v !== void 0 ? " " + v : "") + (f.value === !0 ? " q-btn--actionable q-focusable q-hoverable" : e.disable === !0 ? " disabled" : "") + (e.fab === !0 ? " q-btn--fab" : e.fabMini === !0 ? " q-btn--fab-mini" : "") + (e.noCaps === !0 ? " q-btn--no-uppercase" : "") + (e.dense === !0 ? " q-btn--dense" : "") + (e.stretch === !0 ? " no-border-radius self-stretch" : "") + (e.glossy === !0 ? " glossy" : "") + (e.square ? " q-btn--square" : "");
667
- }), g = c(
668
- () => a.value + (e.stack === !0 ? " column" : " row") + (e.noWrap === !0 ? " no-wrap text-no-wrap" : "") + (e.loading === !0 ? " q-btn__content--hidden" : "")
669
- );
670
- return {
671
- classes: u,
672
- style: _,
673
- innerClasses: g,
674
- attributes: S,
675
- hasLink: o,
676
- linkTag: r,
677
- navigateOnClick: s,
678
- isActionable: f
679
- };
680
- }
681
- const { passiveCapture: M } = te;
682
- let x = null, V = null, K = null;
683
- const wt = ee({
684
- name: "QBtn",
685
- props: {
686
- ...Bt,
687
- percentage: Number,
688
- darkPercentage: Boolean,
689
- onTouchstart: [Function, Array]
690
- },
691
- emits: ["click", "keydown", "mousedown", "keyup"],
692
- setup(e, { slots: t, emit: a }) {
693
- const { proxy: n } = Z(), {
694
- classes: o,
695
- style: r,
696
- innerClasses: l,
697
- attributes: s,
698
- hasLink: _,
699
- linkTag: b,
700
- navigateOnClick: f,
701
- isActionable: $
702
- } = Ct(e), d = J(null), S = J(null);
703
- let u = null, g, v = null;
704
- const p = c(
705
- () => e.label !== void 0 && e.label !== null && e.label !== ""
706
- ), q = c(() => e.disable === !0 || e.ripple === !1 ? !1 : {
707
- keyCodes: _.value === !0 ? [13, 32] : [13],
708
- ...e.ripple === !0 ? {} : e.ripple
709
- }), w = c(() => ({ center: e.round })), L = c(() => {
710
- const i = Math.max(0, Math.min(100, e.percentage));
711
- return i > 0 ? { transition: "transform 0.6s", transform: `translateX(${i - 100}%)` } : {};
712
- }), h = c(() => {
713
- if (e.loading === !0)
714
- return {
715
- onMousedown: G,
716
- onTouchstart: G,
717
- onClick: G,
718
- onKeydown: G,
719
- onKeyup: G
720
- };
721
- if ($.value === !0) {
722
- const i = {
723
- onClick: P,
724
- onKeydown: z,
725
- onMousedown: Y
726
- };
727
- if (n.$q.platform.has.touch === !0) {
728
- const y = e.onTouchstart !== void 0 ? "" : "Passive";
729
- i[`onTouchstart${y}`] = O;
730
- }
731
- return i;
732
- }
733
- return {
734
- // needed; especially for disabled <a> tags
735
- onClick: j
736
- };
737
- }), E = c(() => ({
738
- ref: d,
739
- class: "q-btn q-btn-item non-selectable no-outline " + o.value,
740
- style: r.value,
741
- ...s.value,
742
- ...h.value
743
- }));
744
- function P(i) {
745
- if (d.value !== null) {
746
- if (i !== void 0) {
747
- if (i.defaultPrevented === !0) return;
748
- const y = document.activeElement;
749
- if (e.type === "submit" && y !== document.body && d.value.contains(y) === !1 && y.contains(d.value) === !1) {
750
- i.qAvoidFocus !== !0 && d.value.focus();
751
- const I = () => {
752
- var U;
753
- document.removeEventListener("keydown", j, !0), document.removeEventListener("keyup", I, M), (U = d.value) == null || U.removeEventListener("blur", I, M);
754
- };
755
- document.addEventListener("keydown", j, !0), document.addEventListener("keyup", I, M), d.value.addEventListener("blur", I, M);
756
- }
757
- }
758
- f(i);
759
- }
760
- }
761
- function z(i) {
762
- d.value !== null && (a("keydown", i), oe(i, [13, 32]) === !0 && V !== d.value && (V !== null && Q(), i.defaultPrevented !== !0 && (i.qAvoidFocus !== !0 && d.value.focus(), V = d.value, d.value.classList.add("q-btn--active"), document.addEventListener("keyup", A, !0), d.value.addEventListener("blur", A, M)), j(i)));
763
- }
764
- function O(i) {
765
- d.value !== null && (a("touchstart", i), i.defaultPrevented !== !0 && (x !== d.value && (x !== null && Q(), x = d.value, u = i.target, u.addEventListener("touchcancel", A, M), u.addEventListener("touchend", A, M)), g = !0, v !== null && clearTimeout(v), v = setTimeout(() => {
766
- v = null, g = !1;
767
- }, 200)));
768
- }
769
- function Y(i) {
770
- d.value !== null && (i.qSkipRipple = g === !0, a("mousedown", i), i.defaultPrevented !== !0 && K !== d.value && (K !== null && Q(), K = d.value, d.value.classList.add("q-btn--active"), document.addEventListener("mouseup", A, M)));
771
- }
772
- function A(i) {
773
- if (d.value !== null && !((i == null ? void 0 : i.type) === "blur" && document.activeElement === d.value)) {
774
- if ((i == null ? void 0 : i.type) === "keyup") {
775
- if (V === d.value && oe(i, [13, 32]) === !0) {
776
- const y = new MouseEvent("click", i);
777
- y.qKeyEvent = !0, i.defaultPrevented === !0 && st(y), i.cancelBubble === !0 && Pe(y), d.value.dispatchEvent(y), j(i), i.qKeyEvent = !0;
778
- }
779
- a("keyup", i);
780
- }
781
- Q();
782
- }
783
- }
784
- function Q(i) {
785
- var I, U;
786
- const y = S.value;
787
- i !== !0 && (x === d.value || K === d.value) && y !== null && y !== document.activeElement && (y.setAttribute("tabindex", -1), y.focus()), x === d.value && (u !== null && (u.removeEventListener("touchcancel", A, M), u.removeEventListener("touchend", A, M)), x = u = null), K === d.value && (document.removeEventListener("mouseup", A, M), K = null), V === d.value && (document.removeEventListener("keyup", A, !0), (I = d.value) == null || I.removeEventListener("blur", A, M), V = null), (U = d.value) == null || U.classList.remove("q-btn--active");
788
- }
789
- function G(i) {
790
- j(i), i.qSkipRipple = !0;
791
- }
792
- return Oe(() => {
793
- Q(!0);
794
- }), Object.assign(n, {
795
- click: (i) => {
796
- $.value === !0 && P(i);
797
- }
798
- }), () => {
799
- let i = [];
800
- e.icon !== void 0 && i.push(
801
- m(me, {
802
- name: e.icon,
803
- left: e.stack !== !0 && p.value === !0,
804
- role: "img"
805
- })
806
- ), p.value === !0 && i.push(
807
- m("span", { class: "block" }, [e.label])
808
- ), i = N(t.default, i), e.iconRight !== void 0 && e.round === !1 && i.push(
809
- m(me, {
810
- name: e.iconRight,
811
- right: e.stack !== !0 && p.value === !0,
812
- role: "img"
813
- })
814
- );
815
- const y = [
816
- m("span", {
817
- class: "q-focus-helper",
818
- ref: S
819
- })
820
- ];
821
- return e.loading === !0 && e.percentage !== void 0 && y.push(
822
- m("span", {
823
- class: "q-btn__progress absolute-full overflow-hidden" + (e.darkPercentage === !0 ? " q-btn__progress--dark" : "")
824
- }, [
825
- m("span", {
826
- class: "q-btn__progress-indicator fit block",
827
- style: L.value
828
- })
829
- ])
830
- ), y.push(
831
- m("span", {
832
- class: "q-btn__content text-center col items-center q-anchor--skip " + l.value
833
- }, i)
834
- ), e.loading !== null && y.push(
835
- m(De, {
836
- name: "q-transition--fade"
837
- }, () => e.loading === !0 ? [
838
- m("span", {
839
- key: "loading",
840
- class: "absolute-full flex flex-center"
841
- }, t.loading !== void 0 ? t.loading() : [m(at)])
842
- ] : null)
843
- ), se(
844
- m(
845
- b.value,
846
- E.value,
847
- y
848
- ),
849
- [[
850
- dt,
851
- q.value,
852
- void 0,
853
- w.value
854
- ]]
855
- );
856
- };
857
- }
858
- }), Lt = /* @__PURE__ */ F({
859
- __name: "AppButton",
860
- props: {
861
- size: { default: k.MD },
862
- transparent: { type: Boolean },
863
- flat: { type: Boolean },
864
- rounded: { type: Boolean },
865
- color: { default: Le.PRIMARY },
866
- iconLeft: {},
867
- iconRight: {},
868
- iconMiddle: {},
869
- disabled: { type: Boolean },
870
- loading: { type: Boolean },
871
- to: {},
872
- href: {},
873
- target: {},
874
- submit: { type: Boolean },
875
- ariaLabel: {},
876
- label: {},
877
- download: {}
878
- },
879
- emits: ["click"],
880
- setup(e) {
881
- const t = e, a = c(() => [
882
- "app-btn",
883
- {
884
- "app-btn_default": !t.transparent && !t.flat,
885
- "app-btn_trans": t.transparent,
886
- "app-btn_flat": t.flat,
887
- "app-btn_rounded": t.rounded,
888
- "app-btn_sm": t.size === k.SM,
889
- "app-btn_md": t.size === k.MD,
890
- "app-btn_lg": t.size === k.LG,
891
- "app-btn_icon-left": t.iconLeft,
892
- "app-btn_icon-right": t.iconRight,
893
- "app-btn_icon-middle": t.iconMiddle
894
- },
895
- `app-btn_${t.color}`
896
- ]);
897
- return (n, o) => (B(), Be(W(wt), {
898
- "no-caps": "",
899
- unelevated: "",
900
- class: R(a.value),
901
- padding: W(Qe)[n.size || W(k).MD],
902
- loading: n.loading,
903
- disable: n.disabled || void 0,
904
- to: n.to,
905
- href: n.href,
906
- target: n.target,
907
- type: n.submit ? "submit" : void 0,
908
- "aria-label": n.ariaLabel,
909
- download: n.download,
910
- onClick: o[0] || (o[0] = (r) => n.$emit("click", r))
911
- }, {
912
- default: Ie(() => [
913
- n.iconLeft || n.iconMiddle ? (B(), C("i", {
914
- key: 0,
915
- class: R([
916
- "icon-kl",
917
- n.iconLeft ? "icon-kl_left" : "icon-kl_middle",
918
- `icon-kl-${n.iconLeft || n.iconMiddle}`,
919
- n.transparent || n.flat ? `text-${n.color}` : "text-secondary"
920
- ])
921
- }, null, 2)) : T("", !0),
922
- re(n.$slots, "default", {}, void 0, !0),
923
- n.label ? (B(), C(ie, { key: 1 }, [
924
- Ce(H(n.label), 1)
925
- ], 64)) : T("", !0),
926
- n.iconRight ? (B(), C("i", {
927
- key: 2,
928
- class: R([
929
- "icon-kl",
930
- "icon-kl_right",
931
- `icon-kl-${n.iconRight}`,
932
- n.transparent ? `text-${n.color}` : "text-secondary"
933
- ])
934
- }, null, 2)) : T("", !0)
935
- ]),
936
- _: 3
937
- }, 8, ["class", "padding", "loading", "disable", "to", "href", "target", "type", "aria-label", "download"]));
938
- }
939
- }), X = (e, t) => {
940
- const a = e.__vccOpts || e;
941
- for (const [n, o] of t)
942
- a[n] = o;
943
- return a;
944
- }, rn = /* @__PURE__ */ X(Lt, [["__scopeId", "data-v-99788ad1"]]), Et = {
945
- key: 0,
946
- class: "app-toggle__label app-toggle__label_left"
947
- }, Mt = { class: "app-toggle__container" }, Rt = ["checked", "disabled"], Pt = { class: "app-toggle__thumb" }, At = {
948
- key: 1,
949
- class: "app-toggle__label"
950
- }, zt = /* @__PURE__ */ F({
951
- __name: "AppToggle",
952
- props: {
953
- modelValue: { type: Boolean },
954
- size: { default: k.MD },
955
- label: {},
956
- disabled: { type: Boolean },
957
- color: { default: Le.PRIMARY },
958
- iconColor: {},
959
- icon: {},
960
- iconActive: {},
961
- labelLeft: { type: Boolean }
962
- },
963
- emits: ["update:modelValue"],
964
- setup(e, { emit: t }) {
965
- const a = e, n = t, o = c({
966
- get: () => a.modelValue,
967
- set: (l) => {
968
- n("update:modelValue", l);
969
- }
970
- }), r = c(() => [
971
- "app-toggle",
972
- {
973
- "app-toggle_sm": a.size === k.SM,
974
- "app-toggle_md": a.size === k.MD,
975
- "app-toggle_lg": a.size === k.LG,
976
- "app-toggle_active": o.value,
977
- "app-toggle_disabled": a.disabled
978
- },
979
- `app-toggle_${a.color}`
980
- ]);
981
- return (l, s) => (B(), C("div", {
982
- class: R(r.value)
983
- }, [
984
- l.label && l.labelLeft ? (B(), C("span", Et, H(l.label), 1)) : T("", !0),
985
- D("label", Mt, [
986
- D("input", {
987
- type: "checkbox",
988
- checked: o.value,
989
- onChange: s[0] || (s[0] = (_) => o.value = !o.value),
990
- disabled: l.disabled,
991
- class: "app-toggle__input"
992
- }, null, 40, Rt),
993
- D("span", {
994
- class: R(["app-toggle__slider", o.value ? `bg-${l.color}` : ""])
995
- }, [
996
- D("span", Pt, [
997
- l.icon && !l.modelValue ? (B(), C("i", {
998
- key: 0,
999
- class: R(["icon-kl", `icon-kl-${l.icon}`, "app-toggle__icon"])
1000
- }, null, 2)) : T("", !0),
1001
- l.modelValue && (l.iconActive || l.icon) ? (B(), C("i", {
1002
- key: 1,
1003
- class: R([
1004
- "icon-kl",
1005
- `icon-kl-${l.iconActive || l.icon}`,
1006
- "app-toggle__icon",
1007
- o.value ? `text-${l.iconColor}` : ""
1008
- ])
1009
- }, null, 2)) : T("", !0)
1010
- ])
1011
- ], 2),
1012
- re(l.$slots, "default", {}, void 0, !0)
1013
- ]),
1014
- l.label && !l.labelLeft ? (B(), C("span", At, H(l.label), 1)) : T("", !0)
1015
- ], 2));
1016
- }
1017
- }), un = /* @__PURE__ */ X(zt, [["__scopeId", "data-v-e0e56123"]]), Tt = /* @__PURE__ */ F({
1018
- __name: "AppIcon",
1019
- props: {
1020
- name: {},
1021
- size: {},
1022
- color: {}
1023
- },
1024
- setup(e) {
1025
- return (t, a) => (B(), C("i", {
1026
- class: R(["icon-kl", `icon-kl-${t.name}`, t.color ? `text-${t.color}` : ""]),
1027
- style: ue(t.size ? `font-size: ${t.size}` : void 0)
1028
- }, null, 6));
1029
- }
1030
- }), cn = /* @__PURE__ */ X(Tt, [["__scopeId", "data-v-941765ee"]]), Ot = {
1031
- dark: {
1032
- type: Boolean,
1033
- default: null
1034
- }
1035
- };
1036
- function Dt(e, t) {
1037
- return c(() => e.dark === null ? t.dark.isActive : e.dark);
1038
- }
1039
- const It = {
1040
- xs: 2,
1041
- sm: 4,
1042
- md: 6,
1043
- lg: 10,
1044
- xl: 14
1045
- };
1046
- function qe(e, t, a) {
1047
- return {
1048
- transform: t === !0 ? `translateX(${a.lang.rtl === !0 ? "-" : ""}100%) scale3d(${-e},1,1)` : `scale3d(${e},1,1)`
1049
- };
1050
- }
1051
- const jt = ee({
1052
- name: "QLinearProgress",
1053
- props: {
1054
- ...Ot,
1055
- ...de,
1056
- value: {
1057
- type: Number,
1058
- default: 0
1059
- },
1060
- buffer: Number,
1061
- color: String,
1062
- trackColor: String,
1063
- reverse: Boolean,
1064
- stripe: Boolean,
1065
- indeterminate: Boolean,
1066
- query: Boolean,
1067
- rounded: Boolean,
1068
- animationSpeed: {
1069
- type: [String, Number],
1070
- default: 2100
1071
- },
1072
- instantFeedback: Boolean
1073
- },
1074
- setup(e, { slots: t }) {
1075
- const { proxy: a } = Z(), n = Dt(e, a.$q), o = fe(e, It), r = c(() => e.indeterminate === !0 || e.query === !0), l = c(() => e.reverse !== e.query), s = c(() => ({
1076
- ...o.value !== null ? o.value : {},
1077
- "--q-linear-progress-speed": `${e.animationSpeed}ms`
1078
- })), _ = c(
1079
- () => "q-linear-progress" + (e.color !== void 0 ? ` text-${e.color}` : "") + (e.reverse === !0 || e.query === !0 ? " q-linear-progress--reverse" : "") + (e.rounded === !0 ? " rounded-borders" : "")
1080
- ), b = c(() => qe(e.buffer !== void 0 ? e.buffer : 1, l.value, a.$q)), f = c(() => `with${e.instantFeedback === !0 ? "out" : ""}-transition`), $ = c(
1081
- () => `q-linear-progress__track absolute-full q-linear-progress__track--${f.value} q-linear-progress__track--${n.value === !0 ? "dark" : "light"}` + (e.trackColor !== void 0 ? ` bg-${e.trackColor}` : "")
1082
- ), d = c(() => qe(r.value === !0 ? 1 : e.value, l.value, a.$q)), S = c(
1083
- () => `q-linear-progress__model absolute-full q-linear-progress__model--${f.value} q-linear-progress__model--${r.value === !0 ? "in" : ""}determinate`
1084
- ), u = c(() => ({ width: `${e.value * 100}%` })), g = c(
1085
- () => `q-linear-progress__stripe absolute-${e.reverse === !0 ? "right" : "left"} q-linear-progress__stripe--${f.value}`
1086
- );
1087
- return () => {
1088
- const v = [
1089
- m("div", {
1090
- class: $.value,
1091
- style: b.value
1092
- }),
1093
- m("div", {
1094
- class: S.value,
1095
- style: d.value
1096
- })
1097
- ];
1098
- return e.stripe === !0 && r.value === !1 && v.push(
1099
- m("div", {
1100
- class: g.value,
1101
- style: u.value
1102
- })
1103
- ), m("div", {
1104
- class: _.value,
1105
- style: s.value,
1106
- role: "progressbar",
1107
- "aria-valuemin": 0,
1108
- "aria-valuemax": 1,
1109
- "aria-valuenow": e.indeterminate === !0 ? void 0 : e.value
1110
- }, N(t.default, v));
1111
- };
1112
- }
1113
- }), xt = {
1114
- key: 0,
1115
- class: "code-field__label"
1116
- }, Vt = { class: "code-field__inputs" }, Kt = ["onUpdate:modelValue", "disabled", "onInput", "onKeydown", "onPaste"], Nt = /* @__PURE__ */ F({
1117
- __name: "AppCodeInput",
1118
- props: {
1119
- length: { default: 5 },
1120
- size: { default: k.MD },
1121
- label: {},
1122
- disabled: { type: Boolean },
1123
- loading: { type: Boolean },
1124
- autofocus: { type: Boolean },
1125
- color: {}
1126
- },
1127
- emits: ["update:modelValue", "completed"],
1128
- setup(e, { expose: t, emit: a }) {
1129
- const n = e, o = a, r = J(Array(n.length).fill("")), l = J([]), s = c(() => [
1130
- "code-field",
1131
- {
1132
- "code-field_sm": n.size === k.SM,
1133
- "code-field_md": n.size === k.MD,
1134
- "code-field_lg": n.size === k.LG,
1135
- "code-field_disabled": n.disabled || n.loading
1136
- },
1137
- `code-field_${n.color}`
1138
- ]), _ = c(() => {
1139
- let u = "";
1140
- return n.size == k.SM && (u += `width: ${n.length * 26 + (n.length - 1) * 5}px`), n.size == k.MD && (u += `width: ${n.length * 32 + (n.length - 1) * 8}px`), n.size == k.LG && (u += `width: ${n.length * 44 + (n.length - 1) * 10}px`), u;
1141
- }), b = (u, g) => {
1142
- var q;
1143
- const p = u.target.value;
1144
- if (p.length === 1)
1145
- g < n.length - 1 && l.value && ((q = l.value[g + 1]) == null || q.focus());
1146
- else if (p.length > 1) {
1147
- const w = p.slice(0, n.length - g).split("");
1148
- w.forEach((L, h) => {
1149
- r.value[g + h] = L;
1150
- }), ve(() => {
1151
- var L;
1152
- l.value && ((L = l.value[Math.min(g + w.length, n.length - 1)]) == null || L.focus());
1153
- });
1154
- }
1155
- }, f = (u) => {
1156
- var g;
1157
- r.value[u] === "" && l.value && u > 0 && ((g = l.value[u - 1]) == null || g.focus());
1158
- }, $ = (u, g) => {
1159
- var q;
1160
- u.preventDefault();
1161
- const v = ((q = u.clipboardData) == null ? void 0 : q.getData("text")) ?? "";
1162
- if (!v) return;
1163
- const p = v.slice(0, n.length - g).split("");
1164
- p.forEach((w, L) => {
1165
- r.value[g + L] = w;
1166
- }), ve(() => {
1167
- var w;
1168
- l.value && ((w = l.value[Math.min(g + p.length, n.length - 1)]) == null || w.focus());
1169
- });
1170
- };
1171
- je(
1172
- r,
1173
- (u) => {
1174
- const g = u.join("");
1175
- d(g);
1176
- },
1177
- { deep: !0 }
1178
- );
1179
- const d = (u) => {
1180
- o("update:modelValue", u), u.length === n.length && !u.includes(" ") && o("completed", u);
1181
- }, S = (u) => {
1182
- u && (r.value = u.split("").slice(0, n.length));
1183
- };
1184
- return xe(() => {
1185
- n.autofocus && l.value && l.value[0] && l.value[0].focus();
1186
- }), t({
1187
- injectCode: S
1188
- }), (u, g) => (B(), C("div", {
1189
- class: R(s.value),
1190
- style: ue(_.value)
1191
- }, [
1192
- u.label ? (B(), C("label", xt, H(u.label), 1)) : T("", !0),
1193
- D("div", Vt, [
1194
- (B(!0), C(ie, null, we(u.length, (v, p) => se((B(), C("input", {
1195
- key: p,
1196
- "onUpdate:modelValue": (q) => r.value[p] = q,
1197
- ref_for: !0,
1198
- ref_key: "inputRefs",
1199
- ref: l,
1200
- type: "number",
1201
- maxlength: "1",
1202
- class: "code-field__input",
1203
- disabled: u.disabled || u.loading,
1204
- onInput: (q) => b(q, p),
1205
- onKeydown: Ve((q) => f(p), ["backspace"]),
1206
- onPaste: (q) => $(q, p)
1207
- }, null, 40, Kt)), [
1208
- [Ke, r.value[p]]
1209
- ])), 128))
1210
- ]),
1211
- u.loading ? (B(), Be(jt, {
1212
- key: 1,
1213
- indeterminate: "",
1214
- rounded: "",
1215
- color: u.color,
1216
- class: "code-field__loading"
1217
- }, null, 8, ["color"])) : T("", !0)
1218
- ], 6));
1219
- }
1220
- }), dn = /* @__PURE__ */ X(Nt, [["__scopeId", "data-v-8d579e24"]]), Ft = { class: "app-segment__track" }, Qt = { class: "app-segment__buttons" }, Gt = ["onClick", "disabled"], Ut = /* @__PURE__ */ F({
1221
- __name: "AppSegment",
1222
- props: /* @__PURE__ */ Ne({
1223
- options: {},
1224
- disabled: { type: Boolean },
1225
- size: { default: k.MD }
1226
- }, {
1227
- modelValue: {},
1228
- modelModifiers: {}
1229
- }),
1230
- emits: ["update:modelValue"],
1231
- setup(e) {
1232
- const t = Fe(e, "modelValue"), a = e, n = c(
1233
- () => a.options.findIndex((r) => r.value === t.value)
1234
- );
1235
- function o(r) {
1236
- a.disabled || (t.value = r);
1237
- }
1238
- return (r, l) => (B(), C("div", {
1239
- class: R(["app-segment", [{ "app-segment_disabled": r.disabled }, `app-segment_${r.size}`]])
1240
- }, [
1241
- D("div", Ft, [
1242
- D("div", {
1243
- class: "app-segment__thumb",
1244
- style: ue({
1245
- width: `${100 / r.options.length}%`,
1246
- transform: `translateX(${n.value * 100}%)`
1247
- })
1248
- }, null, 4)
1249
- ]),
1250
- D("div", Qt, [
1251
- (B(!0), C(ie, null, we(r.options, (s, _) => (B(), C("button", {
1252
- key: _,
1253
- class: R(["app-segment__btn", { active: t.value === s.value }]),
1254
- onClick: (b) => o(s.value),
1255
- disabled: r.disabled
1256
- }, [
1257
- re(r.$slots, "option", { option: s }, () => [
1258
- Ce(H(s.label), 1)
1259
- ], !0)
1260
- ], 10, Gt))), 128))
1261
- ])
1262
- ], 2));
1263
- }
1264
- }), fn = /* @__PURE__ */ X(Ut, [["__scopeId", "data-v-ff56abdf"]]), vn = ce(
1265
- () => import("./AppButtonCopy-BAsaHaa4.js")
1266
- ), gn = ce(
1267
- () => import("./AppSelect-WIENN4a-.js")
1268
- ), pn = ce(
1269
- () => import("./DropdownButton-DUUK14vz.js")
1270
- );
1271
- export {
1272
- rn as A,
1273
- it as B,
1274
- Le as C,
1275
- pt as D,
1276
- an as E,
1277
- ln as F,
1278
- Zt as G,
1279
- lt as H,
1280
- ot as I,
1281
- pn as J,
1282
- vn as K,
1283
- gn as L,
1284
- fn as M,
1285
- dn as N,
1286
- un as O,
1287
- cn as P,
1288
- me as Q,
1289
- dt as R,
1290
- k as S,
1291
- Xt as T,
1292
- X as _,
1293
- Ot as a,
1294
- Dt as b,
1295
- ee as c,
1296
- fe as d,
1297
- N as e,
1298
- on as f,
1299
- yt as g,
1300
- Ue as h,
1301
- oe as i,
1302
- Yt as j,
1303
- at as k,
1304
- Jt as l,
1305
- Wt as m,
1306
- te as n,
1307
- nn as o,
1308
- st as p,
1309
- en as q,
1310
- tn as r,
1311
- j as s,
1312
- ut as t,
1313
- de as u,
1314
- Pe as v,
1315
- St as w,
1316
- sn as x,
1317
- wt as y,
1318
- rt as z
1319
- };