@validol4ik/uikit 0.3.28 → 0.3.30

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