@validol4ik/uikit 0.3.43 → 0.4.2

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.
@@ -1,985 +0,0 @@
1
- import { computed as s, markRaw as de, defineComponent as X, h as v, withDirectives as fe, getCurrentInstance as Z, unref as F, ref as ee, onBeforeUnmount as Ee, Transition as Se, openBlock as D, createBlock as Le, normalizeClass as V, withCtx as Ce, createElementBlock as Q, createCommentVNode as U, renderSlot as xe, Fragment as Be, createTextVNode as Re, toDisplayString as _e, normalizeStyle as we, defineAsyncComponent as ve } from "vue";
2
- const Pe = {
3
- PRIMARY: "primary",
4
- INFO: "info"
5
- }, R = {
6
- SM: "sm",
7
- MD: "md",
8
- LG: "lg"
9
- }, Me = {
10
- [R.SM]: "3px 9px",
11
- [R.MD]: "5px 12px",
12
- [R.LG]: "9px 20px"
13
- }, Y = {
14
- xs: 18,
15
- sm: 24,
16
- md: 32,
17
- lg: 38,
18
- xl: 46
19
- }, ge = {
20
- size: String
21
- };
22
- function me(e, t = Y) {
23
- return s(() => e.size !== void 0 ? { fontSize: e.size in t ? `${t[e.size]}px` : e.size } : null);
24
- }
25
- function J(e) {
26
- return de(X(e));
27
- }
28
- function Te(e) {
29
- return de(e);
30
- }
31
- function Oe(e, t) {
32
- return e !== void 0 && e() || t;
33
- }
34
- function kt(e, t) {
35
- if (e !== void 0) {
36
- const a = e();
37
- if (a != null)
38
- return a.slice();
39
- }
40
- return t;
41
- }
42
- function I(e, t) {
43
- return e !== void 0 ? t.concat(e()) : t;
44
- }
45
- function $t(e, t) {
46
- return e === void 0 ? t : t !== void 0 ? t.concat(e()) : e();
47
- }
48
- function qt(e, t, a, n, r, d) {
49
- t.key = n + r;
50
- const u = v(e, t, a);
51
- return r === !0 ? fe(u, d()) : u;
52
- }
53
- const te = "0 0 24 24", ne = (e) => e, G = (e) => `ionicons ${e}`, pe = {
54
- "mdi-": (e) => `mdi ${e}`,
55
- "icon-": ne,
56
- // fontawesome equiv
57
- "bt-": (e) => `bt ${e}`,
58
- "eva-": (e) => `eva ${e}`,
59
- "ion-md": G,
60
- "ion-ios": G,
61
- "ion-logo": G,
62
- "iconfont ": ne,
63
- "ti-": (e) => `themify-icon ${e}`,
64
- "bi-": (e) => `bootstrap-icons ${e}`
65
- }, he = {
66
- o_: "-outlined",
67
- r_: "-round",
68
- s_: "-sharp"
69
- }, be = {
70
- sym_o_: "-outlined",
71
- sym_r_: "-rounded",
72
- sym_s_: "-sharp"
73
- }, Ae = new RegExp("^(" + Object.keys(pe).join("|") + ")"), ze = new RegExp("^(" + Object.keys(he).join("|") + ")"), ae = new RegExp("^(" + Object.keys(be).join("|") + ")"), je = /^[Mm]\s?[-+]?\.?\d/, De = /^img:/, Ie = /^svguse:/, Ke = /^ion-/, Ne = /^(fa-(classic|sharp|solid|regular|light|brands|duotone|thin)|[lf]a[srlbdk]?) /, re = J({
74
- name: "QIcon",
75
- props: {
76
- ...ge,
77
- tag: {
78
- type: String,
79
- default: "i"
80
- },
81
- name: String,
82
- color: String,
83
- left: Boolean,
84
- right: Boolean
85
- },
86
- setup(e, { slots: t }) {
87
- const { proxy: { $q: a } } = Z(), n = me(e), r = s(
88
- () => "q-icon" + (e.left === !0 ? " on-left" : "") + (e.right === !0 ? " on-right" : "") + (e.color !== void 0 ? ` text-${e.color}` : "")
89
- ), d = s(() => {
90
- let u, o = e.name;
91
- if (o === "none" || !o)
92
- return { none: !0 };
93
- if (a.iconMapFn !== null) {
94
- const c = a.iconMapFn(o);
95
- if (c !== void 0)
96
- if (c.icon !== void 0) {
97
- if (o = c.icon, o === "none" || !o)
98
- return { none: !0 };
99
- } else
100
- return {
101
- cls: c.cls,
102
- content: c.content !== void 0 ? c.content : " "
103
- };
104
- }
105
- if (je.test(o) === !0) {
106
- const [c, b = te] = o.split("|");
107
- return {
108
- svg: !0,
109
- viewBox: b,
110
- nodes: c.split("&&").map((l) => {
111
- const [y, p, k] = l.split("@@");
112
- return v("path", { style: p, d: y, transform: k });
113
- })
114
- };
115
- }
116
- if (De.test(o) === !0)
117
- return {
118
- img: !0,
119
- src: o.substring(4)
120
- };
121
- if (Ie.test(o) === !0) {
122
- const [c, b = te] = o.split("|");
123
- return {
124
- svguse: !0,
125
- src: c.substring(7),
126
- viewBox: b
127
- };
128
- }
129
- let q = " ";
130
- const h = o.match(Ae);
131
- if (h !== null)
132
- u = pe[h[1]](o);
133
- else if (Ne.test(o) === !0)
134
- u = o;
135
- else if (Ke.test(o) === !0)
136
- u = `ionicons ion-${a.platform.is.ios === !0 ? "ios" : "md"}${o.substring(3)}`;
137
- else if (ae.test(o) === !0) {
138
- u = "notranslate material-symbols";
139
- const c = o.match(ae);
140
- c !== null && (o = o.substring(6), u += be[c[1]]), q = o;
141
- } else {
142
- u = "notranslate material-icons";
143
- const c = o.match(ze);
144
- c !== null && (o = o.substring(2), u += he[c[1]]), q = o;
145
- }
146
- return {
147
- cls: u,
148
- content: q
149
- };
150
- });
151
- return () => {
152
- const u = {
153
- class: r.value,
154
- style: n.value,
155
- "aria-hidden": "true",
156
- role: "presentation"
157
- };
158
- return d.value.none === !0 ? v(e.tag, u, Oe(t.default)) : d.value.img === !0 ? v(e.tag, u, I(t.default, [
159
- v("img", { src: d.value.src })
160
- ])) : d.value.svg === !0 ? v(e.tag, u, I(t.default, [
161
- v("svg", {
162
- viewBox: d.value.viewBox || "0 0 24 24"
163
- }, d.value.nodes)
164
- ])) : d.value.svguse === !0 ? v(e.tag, u, I(t.default, [
165
- v("svg", {
166
- viewBox: d.value.viewBox
167
- }, [
168
- v("use", { "xlink:href": d.value.src })
169
- ])
170
- ])) : (d.value.cls !== void 0 && (u.class += " " + d.value.cls), v(e.tag, u, I(t.default, [
171
- d.value.content
172
- ])));
173
- };
174
- }
175
- }), Fe = {
176
- size: {
177
- type: [String, Number],
178
- default: "1em"
179
- },
180
- color: String
181
- };
182
- function Ve(e) {
183
- return {
184
- cSize: s(() => e.size in Y ? `${Y[e.size]}px` : e.size),
185
- classes: s(
186
- () => "q-spinner" + (e.color ? ` text-${e.color}` : "")
187
- )
188
- };
189
- }
190
- const Qe = J({
191
- name: "QSpinner",
192
- props: {
193
- ...Fe,
194
- thickness: {
195
- type: Number,
196
- default: 5
197
- }
198
- },
199
- setup(e) {
200
- const { cSize: t, classes: a } = Ve(e);
201
- return () => v("svg", {
202
- class: a.value + " q-spinner-mat",
203
- width: t.value,
204
- height: t.value,
205
- viewBox: "25 25 50 50"
206
- }, [
207
- v("circle", {
208
- class: "path",
209
- cx: "50",
210
- cy: "50",
211
- r: "20",
212
- fill: "none",
213
- stroke: "currentColor",
214
- "stroke-width": e.thickness,
215
- "stroke-miterlimit": "10"
216
- })
217
- ]);
218
- }
219
- });
220
- function He(e, t) {
221
- const a = e.style;
222
- for (const n in t)
223
- a[n] = t[n];
224
- }
225
- function Et(e) {
226
- if (e == null)
227
- return;
228
- if (typeof e == "string")
229
- try {
230
- return document.querySelector(e) || void 0;
231
- } catch {
232
- return;
233
- }
234
- const t = F(e);
235
- if (t)
236
- return t.$el || t;
237
- }
238
- function St(e, t) {
239
- if (e == null || e.contains(t) === !0)
240
- return !0;
241
- for (let a = e.nextElementSibling; a !== null; a = a.nextElementSibling)
242
- if (a.contains(t))
243
- return !0;
244
- return !1;
245
- }
246
- const H = {
247
- hasPassive: !1,
248
- passiveCapture: !0,
249
- notPassiveCapture: !0
250
- };
251
- try {
252
- const e = Object.defineProperty({}, "passive", {
253
- get() {
254
- Object.assign(H, {
255
- hasPassive: !0,
256
- passive: { passive: !0 },
257
- notPassive: { passive: !1 },
258
- passiveCapture: { passive: !0, capture: !0 },
259
- notPassiveCapture: { passive: !1, capture: !0 }
260
- });
261
- }
262
- });
263
- window.addEventListener("qtest", null, e), window.removeEventListener("qtest", null, e);
264
- } catch {
265
- }
266
- function Lt() {
267
- }
268
- function Ue(e) {
269
- 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]), {
270
- top: e.clientY,
271
- left: e.clientX
272
- };
273
- }
274
- function Ct(e) {
275
- if (e.path)
276
- return e.path;
277
- if (e.composedPath)
278
- return e.composedPath();
279
- const t = [];
280
- let a = e.target;
281
- for (; a; ) {
282
- if (t.push(a), a.tagName === "HTML")
283
- return t.push(document), t.push(window), t;
284
- a = a.parentElement;
285
- }
286
- }
287
- function ye(e) {
288
- e.stopPropagation();
289
- }
290
- function Ge(e) {
291
- e.cancelable !== !1 && e.preventDefault();
292
- }
293
- function M(e) {
294
- e.cancelable !== !1 && e.preventDefault(), e.stopPropagation();
295
- }
296
- function Ye(e, t, a) {
297
- const n = `__q_${t}_evt`;
298
- e[n] = e[n] !== void 0 ? e[n].concat(a) : a, a.forEach((r) => {
299
- r[0].addEventListener(r[1], e[r[2]], H[r[3]]);
300
- });
301
- }
302
- function We(e, t) {
303
- const a = `__q_${t}_evt`;
304
- e[a] !== void 0 && (e[a].forEach((n) => {
305
- n[0].removeEventListener(n[1], e[n[2]], H[n[3]]);
306
- }), e[a] = void 0);
307
- }
308
- function Xe(e) {
309
- return e !== Object(e) || e.isComposing === !0 || e.qKeyEvent === !0;
310
- }
311
- function W(e, t) {
312
- return Xe(e) === !0 ? !1 : [].concat(t).includes(e.keyCode);
313
- }
314
- function Ze(e, t = 250) {
315
- let a = !1, n;
316
- return function() {
317
- return a === !1 && (a = !0, setTimeout(() => {
318
- a = !1;
319
- }, t), n = e.apply(this, arguments)), n;
320
- };
321
- }
322
- function ie(e, t, a, n) {
323
- a.modifiers.stop === !0 && ye(e);
324
- const r = a.modifiers.color;
325
- let d = a.modifiers.center;
326
- d = d === !0 || n === !0;
327
- const u = document.createElement("span"), o = document.createElement("span"), q = Ue(e), { left: h, top: c, width: b, height: l } = t.getBoundingClientRect(), y = Math.sqrt(b * b + l * l), p = y / 2, k = `${(b - y) / 2}px`, f = d ? k : `${q.left - h - p}px`, $ = `${(l - y) / 2}px`, P = d ? $ : `${q.top - c - p}px`;
328
- o.className = "q-ripple__inner", He(o, {
329
- height: `${y}px`,
330
- width: `${y}px`,
331
- transform: `translate3d(${f},${P},0) scale3d(.2,.2,1)`,
332
- opacity: 0
333
- }), u.className = `q-ripple${r ? " text-" + r : ""}`, u.setAttribute("dir", "ltr"), u.appendChild(o), t.appendChild(u);
334
- const _ = () => {
335
- u.remove(), clearTimeout(w);
336
- };
337
- a.abort.push(_);
338
- let w = setTimeout(() => {
339
- o.classList.add("q-ripple__inner--enter"), o.style.transform = `translate3d(${k},${$},0) scale3d(1,1,1)`, o.style.opacity = 0.2, w = setTimeout(() => {
340
- o.classList.remove("q-ripple__inner--enter"), o.classList.add("q-ripple__inner--leave"), o.style.opacity = 0, w = setTimeout(() => {
341
- u.remove(), a.abort.splice(a.abort.indexOf(_), 1);
342
- }, 275);
343
- }, 250);
344
- }, 50);
345
- }
346
- function oe(e, { modifiers: t, value: a, arg: n }) {
347
- const r = Object.assign({}, e.cfg.ripple, t, a);
348
- e.modifiers = {
349
- early: r.early === !0,
350
- stop: r.stop === !0,
351
- center: r.center === !0,
352
- color: r.color || n,
353
- keyCodes: [].concat(r.keyCodes || 13)
354
- };
355
- }
356
- const Je = Te(
357
- {
358
- name: "ripple",
359
- beforeMount(e, t) {
360
- const a = t.instance.$.appContext.config.globalProperties.$q.config || {};
361
- if (a.ripple === !1)
362
- return;
363
- const n = {
364
- cfg: a,
365
- enabled: t.value !== !1,
366
- modifiers: {},
367
- abort: [],
368
- start(r) {
369
- n.enabled === !0 && r.qSkipRipple !== !0 && r.type === (n.modifiers.early === !0 ? "pointerdown" : "click") && ie(r, e, n, r.qKeyEvent === !0);
370
- },
371
- keystart: Ze((r) => {
372
- n.enabled === !0 && r.qSkipRipple !== !0 && W(r, n.modifiers.keyCodes) === !0 && r.type === `key${n.modifiers.early === !0 ? "down" : "up"}` && ie(r, e, n, !0);
373
- }, 300)
374
- };
375
- oe(n, t), e.__qripple = n, Ye(n, "main", [
376
- [e, "pointerdown", "start", "passive"],
377
- [e, "click", "start", "passive"],
378
- [e, "keydown", "keystart", "passive"],
379
- [e, "keyup", "keystart", "passive"]
380
- ]);
381
- },
382
- updated(e, t) {
383
- if (t.oldValue !== t.value) {
384
- const a = e.__qripple;
385
- a !== void 0 && (a.enabled = t.value !== !1, a.enabled === !0 && Object(t.value) === t.value && oe(a, t));
386
- }
387
- },
388
- beforeUnmount(e) {
389
- const t = e.__qripple;
390
- t !== void 0 && (t.abort.forEach((a) => {
391
- a();
392
- }), We(t, "main"), delete e._qripple);
393
- }
394
- }
395
- ), ke = {
396
- left: "start",
397
- center: "center",
398
- right: "end",
399
- between: "between",
400
- around: "around",
401
- evenly: "evenly",
402
- stretch: "stretch"
403
- }, et = Object.keys(ke), tt = {
404
- align: {
405
- type: String,
406
- validator: (e) => et.includes(e)
407
- }
408
- };
409
- function nt(e) {
410
- return s(() => {
411
- const t = e.align === void 0 ? e.vertical === !0 ? "stretch" : "left" : e.align;
412
- return `${e.vertical === !0 ? "items" : "justify"}-${ke[t]}`;
413
- });
414
- }
415
- function xt(e) {
416
- if (Object(e.$parent) === e.$parent)
417
- return e.$parent;
418
- let { parent: t } = e.$;
419
- for (; Object(t) === t; ) {
420
- if (Object(t.proxy) === t.proxy)
421
- return t.proxy;
422
- t = t.parent;
423
- }
424
- }
425
- function at(e) {
426
- return e.appContext.config.globalProperties.$router !== void 0;
427
- }
428
- function Bt(e) {
429
- return e.isUnmounted === !0 || e.isDeactivated === !0;
430
- }
431
- function le(e) {
432
- return e ? e.aliasOf ? e.aliasOf.path : e.path : "";
433
- }
434
- function ue(e, t) {
435
- return (e.aliasOf || e) === (t.aliasOf || t);
436
- }
437
- function rt(e, t) {
438
- for (const a in t) {
439
- const n = t[a], r = e[a];
440
- if (typeof n == "string") {
441
- if (n !== r)
442
- return !1;
443
- } else if (Array.isArray(r) === !1 || r.length !== n.length || n.some((d, u) => d !== r[u]))
444
- return !1;
445
- }
446
- return !0;
447
- }
448
- function se(e, t) {
449
- return Array.isArray(t) === !0 ? e.length === t.length && e.every((a, n) => a === t[n]) : e.length === 1 && e[0] === t;
450
- }
451
- function it(e, t) {
452
- return Array.isArray(e) === !0 ? se(e, t) : Array.isArray(t) === !0 ? se(t, e) : e === t;
453
- }
454
- function ot(e, t) {
455
- if (Object.keys(e).length !== Object.keys(t).length)
456
- return !1;
457
- for (const a in e)
458
- if (it(e[a], t[a]) === !1)
459
- return !1;
460
- return !0;
461
- }
462
- const $e = {
463
- // router-link
464
- to: [String, Object],
465
- replace: Boolean,
466
- // regular <a> link
467
- href: String,
468
- target: String,
469
- // state
470
- disable: Boolean
471
- }, Rt = {
472
- ...$e,
473
- // router-link
474
- exact: Boolean,
475
- activeClass: {
476
- type: String,
477
- default: "q-router-link--active"
478
- },
479
- exactActiveClass: {
480
- type: String,
481
- default: "q-router-link--exact-active"
482
- }
483
- };
484
- function lt({ fallbackTag: e, useDisableForRouterLinkProps: t = !0 } = {}) {
485
- const a = Z(), { props: n, proxy: r, emit: d } = a, u = at(a), o = s(() => n.disable !== !0 && n.href !== void 0), q = t === !0 ? s(
486
- () => u === !0 && n.disable !== !0 && o.value !== !0 && n.to !== void 0 && n.to !== null && n.to !== ""
487
- ) : s(
488
- () => u === !0 && o.value !== !0 && n.to !== void 0 && n.to !== null && n.to !== ""
489
- ), h = s(() => q.value === !0 ? P(n.to) : null), c = s(() => h.value !== null), b = s(() => o.value === !0 || c.value === !0), l = s(() => n.type === "a" || b.value === !0 ? "a" : n.tag || e || "div"), y = s(() => o.value === !0 ? {
490
- href: n.href,
491
- target: n.target
492
- } : c.value === !0 ? {
493
- href: h.value.href,
494
- target: n.target
495
- } : {}), p = s(() => {
496
- if (c.value === !1)
497
- return -1;
498
- const { matched: g } = h.value, { length: E } = g, L = g[E - 1];
499
- if (L === void 0)
500
- return -1;
501
- const x = r.$route.matched;
502
- if (x.length === 0)
503
- return -1;
504
- const B = x.findIndex(
505
- ue.bind(null, L)
506
- );
507
- if (B !== -1)
508
- return B;
509
- const K = le(g[E - 2]);
510
- return (
511
- // we are dealing with nested routes
512
- E > 1 && le(L) === K && x[x.length - 1].path !== K ? x.findIndex(
513
- ue.bind(null, g[E - 2])
514
- ) : B
515
- );
516
- }), k = s(
517
- () => c.value === !0 && p.value !== -1 && rt(r.$route.params, h.value.params)
518
- ), f = s(
519
- () => k.value === !0 && p.value === r.$route.matched.length - 1 && ot(r.$route.params, h.value.params)
520
- ), $ = s(() => c.value === !0 ? f.value === !0 ? ` ${n.exactActiveClass} ${n.activeClass}` : n.exact === !0 ? "" : k.value === !0 ? ` ${n.activeClass}` : "" : "");
521
- function P(g) {
522
- try {
523
- return r.$router.resolve(g);
524
- } catch {
525
- }
526
- return null;
527
- }
528
- function _(g, { returnRouterError: E, to: L = n.to, replace: x = n.replace } = {}) {
529
- if (n.disable === !0)
530
- return g.preventDefault(), Promise.resolve(!1);
531
- if (
532
- // don't redirect with control keys;
533
- // should match RouterLink from Vue Router
534
- g.metaKey || g.altKey || g.ctrlKey || g.shiftKey || g.button !== void 0 && g.button !== 0 || n.target === "_blank"
535
- )
536
- return Promise.resolve(!1);
537
- g.preventDefault();
538
- const B = r.$router[x === !0 ? "replace" : "push"](L);
539
- return E === !0 ? B : B.then(() => {
540
- }).catch(() => {
541
- });
542
- }
543
- function w(g) {
544
- if (c.value === !0) {
545
- const E = (L) => _(g, L);
546
- d("click", g, E), g.defaultPrevented !== !0 && E();
547
- } else
548
- d("click", g);
549
- }
550
- return {
551
- hasRouterLink: c,
552
- hasHrefLink: o,
553
- hasLink: b,
554
- linkTag: l,
555
- resolvedLink: h,
556
- linkIsActive: k,
557
- linkIsExactActive: f,
558
- linkClass: $,
559
- linkAttrs: y,
560
- getLink: P,
561
- navigateToRouterLink: _,
562
- navigateOnClick: w
563
- };
564
- }
565
- const ce = {
566
- none: 0,
567
- xs: 4,
568
- sm: 8,
569
- md: 16,
570
- lg: 24,
571
- xl: 32
572
- }, ut = {
573
- xs: 8,
574
- sm: 10,
575
- md: 14,
576
- lg: 20,
577
- xl: 24
578
- }, st = ["button", "submit", "reset"], ct = /[^\s]\/[^\s]/, dt = ["flat", "outline", "push", "unelevated"];
579
- function ft(e, t) {
580
- return e.flat === !0 ? "flat" : e.outline === !0 ? "outline" : e.push === !0 ? "push" : e.unelevated === !0 ? "unelevated" : t;
581
- }
582
- const vt = {
583
- ...ge,
584
- ...$e,
585
- type: {
586
- type: String,
587
- default: "button"
588
- },
589
- label: [Number, String],
590
- icon: String,
591
- iconRight: String,
592
- ...dt.reduce(
593
- (e, t) => (e[t] = Boolean) && e,
594
- {}
595
- ),
596
- square: Boolean,
597
- rounded: Boolean,
598
- glossy: Boolean,
599
- size: String,
600
- fab: Boolean,
601
- fabMini: Boolean,
602
- padding: String,
603
- color: String,
604
- textColor: String,
605
- noCaps: Boolean,
606
- noWrap: Boolean,
607
- dense: Boolean,
608
- tabindex: [Number, String],
609
- ripple: {
610
- type: [Boolean, Object],
611
- default: !0
612
- },
613
- align: {
614
- ...tt.align,
615
- default: "center"
616
- },
617
- stack: Boolean,
618
- stretch: Boolean,
619
- loading: {
620
- type: Boolean,
621
- default: null
622
- },
623
- disable: Boolean
624
- }, gt = {
625
- ...vt,
626
- round: Boolean
627
- };
628
- function mt(e) {
629
- const t = me(e, ut), a = nt(e), { hasRouterLink: n, hasLink: r, linkTag: d, linkAttrs: u, navigateOnClick: o } = lt({
630
- fallbackTag: "button"
631
- }), q = s(() => {
632
- const f = e.fab === !1 && e.fabMini === !1 ? t.value : {};
633
- return e.padding !== void 0 ? Object.assign({}, f, {
634
- padding: e.padding.split(/\s+/).map(($) => $ in ce ? ce[$] + "px" : $).join(" "),
635
- minWidth: "0",
636
- minHeight: "0"
637
- }) : f;
638
- }), h = s(
639
- () => e.rounded === !0 || e.fab === !0 || e.fabMini === !0
640
- ), c = s(
641
- () => e.disable !== !0 && e.loading !== !0
642
- ), b = s(() => c.value === !0 ? e.tabindex || 0 : -1), l = s(() => ft(e, "standard")), y = s(() => {
643
- const f = { tabindex: b.value };
644
- return r.value === !0 ? Object.assign(f, u.value) : st.includes(e.type) === !0 && (f.type = e.type), d.value === "a" ? (e.disable === !0 ? f["aria-disabled"] = "true" : f.href === void 0 && (f.role = "button"), n.value !== !0 && ct.test(e.type) === !0 && (f.type = e.type)) : e.disable === !0 && (f.disabled = "", f["aria-disabled"] = "true"), e.loading === !0 && e.percentage !== void 0 && Object.assign(f, {
645
- role: "progressbar",
646
- "aria-valuemin": 0,
647
- "aria-valuemax": 100,
648
- "aria-valuenow": e.percentage
649
- }), f;
650
- }), p = s(() => {
651
- let f;
652
- e.color !== void 0 ? e.flat === !0 || e.outline === !0 ? f = `text-${e.textColor || e.color}` : f = `bg-${e.color} text-${e.textColor || "white"}` : e.textColor && (f = `text-${e.textColor}`);
653
- const $ = e.round === !0 ? "round" : `rectangle${h.value === !0 ? " q-btn--rounded" : e.square === !0 ? " q-btn--square" : ""}`;
654
- return `q-btn--${l.value} q-btn--${$}` + (f !== void 0 ? " " + f : "") + (c.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" : "");
655
- }), k = s(
656
- () => a.value + (e.stack === !0 ? " column" : " row") + (e.noWrap === !0 ? " no-wrap text-no-wrap" : "") + (e.loading === !0 ? " q-btn__content--hidden" : "")
657
- );
658
- return {
659
- classes: p,
660
- style: q,
661
- innerClasses: k,
662
- attributes: y,
663
- hasLink: r,
664
- linkTag: d,
665
- navigateOnClick: o,
666
- isActionable: c
667
- };
668
- }
669
- const { passiveCapture: S } = H;
670
- let T = null, O = null, A = null;
671
- const pt = J({
672
- name: "QBtn",
673
- props: {
674
- ...gt,
675
- percentage: Number,
676
- darkPercentage: Boolean,
677
- onTouchstart: [Function, Array]
678
- },
679
- emits: ["click", "keydown", "mousedown", "keyup"],
680
- setup(e, { slots: t, emit: a }) {
681
- const { proxy: n } = Z(), {
682
- classes: r,
683
- style: d,
684
- innerClasses: u,
685
- attributes: o,
686
- hasLink: q,
687
- linkTag: h,
688
- navigateOnClick: c,
689
- isActionable: b
690
- } = mt(e), l = ee(null), y = ee(null);
691
- let p = null, k, f = null;
692
- const $ = s(
693
- () => e.label !== void 0 && e.label !== null && e.label !== ""
694
- ), P = s(() => e.disable === !0 || e.ripple === !1 ? !1 : {
695
- keyCodes: q.value === !0 ? [13, 32] : [13],
696
- ...e.ripple === !0 ? {} : e.ripple
697
- }), _ = s(() => ({ center: e.round })), w = s(() => {
698
- const i = Math.max(0, Math.min(100, e.percentage));
699
- return i > 0 ? { transition: "transform 0.6s", transform: `translateX(${i - 100}%)` } : {};
700
- }), g = s(() => {
701
- if (e.loading === !0)
702
- return {
703
- onMousedown: j,
704
- onTouchstart: j,
705
- onClick: j,
706
- onKeydown: j,
707
- onKeyup: j
708
- };
709
- if (b.value === !0) {
710
- const i = {
711
- onClick: L,
712
- onKeydown: x,
713
- onMousedown: K
714
- };
715
- if (n.$q.platform.has.touch === !0) {
716
- const m = e.onTouchstart !== void 0 ? "" : "Passive";
717
- i[`onTouchstart${m}`] = B;
718
- }
719
- return i;
720
- }
721
- return {
722
- // needed; especially for disabled <a> tags
723
- onClick: M
724
- };
725
- }), E = s(() => ({
726
- ref: l,
727
- class: "q-btn q-btn-item non-selectable no-outline " + r.value,
728
- style: d.value,
729
- ...o.value,
730
- ...g.value
731
- }));
732
- function L(i) {
733
- if (l.value !== null) {
734
- if (i !== void 0) {
735
- if (i.defaultPrevented === !0)
736
- return;
737
- const m = document.activeElement;
738
- if (e.type === "submit" && m !== document.body && l.value.contains(m) === !1 && m.contains(l.value) === !1) {
739
- l.value.focus();
740
- const N = () => {
741
- document.removeEventListener("keydown", M, !0), document.removeEventListener("keyup", N, S), l.value !== null && l.value.removeEventListener("blur", N, S);
742
- };
743
- document.addEventListener("keydown", M, !0), document.addEventListener("keyup", N, S), l.value.addEventListener("blur", N, S);
744
- }
745
- }
746
- c(i);
747
- }
748
- }
749
- function x(i) {
750
- l.value !== null && (a("keydown", i), W(i, [13, 32]) === !0 && O !== l.value && (O !== null && z(), i.defaultPrevented !== !0 && (l.value.focus(), O = l.value, l.value.classList.add("q-btn--active"), document.addEventListener("keyup", C, !0), l.value.addEventListener("blur", C, S)), M(i)));
751
- }
752
- function B(i) {
753
- l.value !== null && (a("touchstart", i), i.defaultPrevented !== !0 && (T !== l.value && (T !== null && z(), T = l.value, p = i.target, p.addEventListener("touchcancel", C, S), p.addEventListener("touchend", C, S)), k = !0, f !== null && clearTimeout(f), f = setTimeout(() => {
754
- f = null, k = !1;
755
- }, 200)));
756
- }
757
- function K(i) {
758
- l.value !== null && (i.qSkipRipple = k === !0, a("mousedown", i), i.defaultPrevented !== !0 && A !== l.value && (A !== null && z(), A = l.value, l.value.classList.add("q-btn--active"), document.addEventListener("mouseup", C, S)));
759
- }
760
- function C(i) {
761
- if (l.value !== null && !(i !== void 0 && i.type === "blur" && document.activeElement === l.value)) {
762
- if (i !== void 0 && i.type === "keyup") {
763
- if (O === l.value && W(i, [13, 32]) === !0) {
764
- const m = new MouseEvent("click", i);
765
- m.qKeyEvent = !0, i.defaultPrevented === !0 && Ge(m), i.cancelBubble === !0 && ye(m), l.value.dispatchEvent(m), M(i), i.qKeyEvent = !0;
766
- }
767
- a("keyup", i);
768
- }
769
- z();
770
- }
771
- }
772
- function z(i) {
773
- const m = y.value;
774
- i !== !0 && (T === l.value || A === l.value) && m !== null && m !== document.activeElement && (m.setAttribute("tabindex", -1), m.focus()), T === l.value && (p !== null && (p.removeEventListener("touchcancel", C, S), p.removeEventListener("touchend", C, S)), T = p = null), A === l.value && (document.removeEventListener("mouseup", C, S), A = null), O === l.value && (document.removeEventListener("keyup", C, !0), l.value !== null && l.value.removeEventListener("blur", C, S), O = null), l.value !== null && l.value.classList.remove("q-btn--active");
775
- }
776
- function j(i) {
777
- M(i), i.qSkipRipple = !0;
778
- }
779
- return Ee(() => {
780
- z(!0);
781
- }), Object.assign(n, {
782
- click: (i) => {
783
- b.value === !0 && L(i);
784
- }
785
- }), () => {
786
- let i = [];
787
- e.icon !== void 0 && i.push(
788
- v(re, {
789
- name: e.icon,
790
- left: e.stack !== !0 && $.value === !0,
791
- role: "img"
792
- })
793
- ), $.value === !0 && i.push(
794
- v("span", { class: "block" }, [e.label])
795
- ), i = I(t.default, i), e.iconRight !== void 0 && e.round === !1 && i.push(
796
- v(re, {
797
- name: e.iconRight,
798
- right: e.stack !== !0 && $.value === !0,
799
- role: "img"
800
- })
801
- );
802
- const m = [
803
- v("span", {
804
- class: "q-focus-helper",
805
- ref: y
806
- })
807
- ];
808
- return e.loading === !0 && e.percentage !== void 0 && m.push(
809
- v("span", {
810
- class: "q-btn__progress absolute-full overflow-hidden" + (e.darkPercentage === !0 ? " q-btn__progress--dark" : "")
811
- }, [
812
- v("span", {
813
- class: "q-btn__progress-indicator fit block",
814
- style: w.value
815
- })
816
- ])
817
- ), m.push(
818
- v("span", {
819
- class: "q-btn__content text-center col items-center q-anchor--skip " + u.value
820
- }, i)
821
- ), e.loading !== null && m.push(
822
- v(Se, {
823
- name: "q-transition--fade"
824
- }, () => e.loading === !0 ? [
825
- v("span", {
826
- key: "loading",
827
- class: "absolute-full flex flex-center"
828
- }, t.loading !== void 0 ? t.loading() : [v(Qe)])
829
- ] : null)
830
- ), fe(
831
- v(
832
- h.value,
833
- E.value,
834
- m
835
- ),
836
- [[
837
- Je,
838
- P.value,
839
- void 0,
840
- _.value
841
- ]]
842
- );
843
- };
844
- }
845
- }), ht = /* @__PURE__ */ X({
846
- __name: "AppButton",
847
- props: {
848
- size: { default: R.MD },
849
- transparent: { type: Boolean },
850
- flat: { type: Boolean },
851
- rounded: { type: Boolean },
852
- color: { default: Pe.PRIMARY },
853
- iconLeft: {},
854
- iconRight: {},
855
- iconMiddle: {},
856
- disabled: { type: Boolean },
857
- loading: { type: Boolean },
858
- to: {},
859
- href: {},
860
- target: {},
861
- submit: { type: Boolean },
862
- ariaLabel: {},
863
- label: {}
864
- },
865
- emits: ["click"],
866
- setup(e) {
867
- const t = e, a = s(() => [
868
- "app-btn",
869
- {
870
- "app-btn_default": !t.transparent && !t.flat,
871
- "app-btn_trans": t.transparent,
872
- "app-btn_flat": t.flat,
873
- "app-btn_rounded": t.rounded,
874
- "app-btn_sm": t.size === R.SM,
875
- "app-btn_md": t.size === R.MD,
876
- "app-btn_lg": t.size === R.LG,
877
- "app-btn_icon-left": t.iconLeft,
878
- "app-btn_icon-right": t.iconRight,
879
- "app-btn_icon-middle": t.iconMiddle
880
- },
881
- `app-btn_${t.color}`
882
- ]);
883
- return (n, r) => (D(), Le(F(pt), {
884
- "no-caps": "",
885
- unelevated: "",
886
- class: V(a.value),
887
- padding: F(Me)[n.size || F(R).MD],
888
- loading: n.loading,
889
- disable: n.disabled || void 0,
890
- to: n.to,
891
- href: n.href,
892
- target: n.target,
893
- type: n.submit ? "submit" : void 0,
894
- "aria-label": n.ariaLabel,
895
- onClick: r[0] || (r[0] = (d) => n.$emit("click", d))
896
- }, {
897
- default: Ce(() => [
898
- n.iconLeft || n.iconMiddle ? (D(), Q("i", {
899
- key: 0,
900
- class: V([
901
- "icon-kl",
902
- n.iconLeft ? "icon-kl_left" : "icon-kl_middle",
903
- `icon-kl-${n.iconLeft || n.iconMiddle}`,
904
- n.transparent || n.flat ? `text-${n.color}` : "text-secondary"
905
- ])
906
- }, null, 2)) : U("", !0),
907
- xe(n.$slots, "default", {}, void 0, !0),
908
- n.label ? (D(), Q(Be, { key: 1 }, [
909
- Re(_e(n.label), 1)
910
- ], 64)) : U("", !0),
911
- n.iconRight ? (D(), Q("i", {
912
- key: 2,
913
- class: V([
914
- "icon-kl",
915
- "icon-kl_right",
916
- `icon-kl-${n.iconRight}`,
917
- n.transparent ? `text-${n.color}` : "text-secondary"
918
- ])
919
- }, null, 2)) : U("", !0)
920
- ]),
921
- _: 3
922
- }, 8, ["class", "padding", "loading", "disable", "to", "href", "target", "type", "aria-label"]));
923
- }
924
- }), qe = (e, t) => {
925
- const a = e.__vccOpts || e;
926
- for (const [n, r] of t)
927
- a[n] = r;
928
- return a;
929
- }, _t = /* @__PURE__ */ qe(ht, [["__scopeId", "data-v-0aee6cab"]]), bt = /* @__PURE__ */ X({
930
- __name: "AppIcon",
931
- props: {
932
- name: {},
933
- size: {},
934
- color: {}
935
- },
936
- setup(e) {
937
- return (t, a) => (D(), Q("i", {
938
- class: V(["icon-kl", `icon-kl-${t.name}`, t.color ? `text-${t.color}` : ""]),
939
- style: we(t.size ? `font-size: ${t.size}` : void 0)
940
- }, null, 6));
941
- }
942
- }), wt = /* @__PURE__ */ qe(bt, [["__scopeId", "data-v-941765ee"]]), Pt = ve(
943
- () => import("./AppButtonCopy-B9H0zE5S.js")
944
- ), Mt = ve(
945
- () => import("./AppSelect-DQSeOSW5.js")
946
- );
947
- export {
948
- _t as A,
949
- ye as B,
950
- Pe as C,
951
- Xe as D,
952
- wt as E,
953
- Pt as F,
954
- Mt as G,
955
- re as Q,
956
- Je as R,
957
- R as S,
958
- qe as _,
959
- I as a,
960
- ge as b,
961
- J as c,
962
- lt as d,
963
- kt as e,
964
- Rt as f,
965
- Qe as g,
966
- Oe as h,
967
- W as i,
968
- qt as j,
969
- $t as k,
970
- Ye as l,
971
- We as m,
972
- H as n,
973
- xt as o,
974
- Ge as p,
975
- Bt as q,
976
- Et as r,
977
- M as s,
978
- He as t,
979
- me as u,
980
- at as v,
981
- Ue as w,
982
- St as x,
983
- Ct as y,
984
- Lt as z
985
- };