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