@quidgest/ui 0.5.3 → 0.5.4
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.
- package/dist/index.d.ts +1960 -1360
- package/dist/ui.esm.js +275 -274
- package/dist/ui.esm.js.map +1 -1
- package/dist/ui.js +4 -4
- package/dist/ui.js.map +1 -1
- package/dist/ui.min.js +89 -87
- package/dist/ui.min.js.map +1 -1
- package/dist/ui.scss +1 -1
- package/package.json +1 -1
package/dist/ui.esm.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getCurrentInstance as pe, computed as y, ref as I, provide as Se, inject as me, watch as Q, defineComponent as _, openBlock as r, createElementBlock as f, normalizeStyle as W, createElementVNode as X, normalizeClass as C, withModifiers as R, createVNode as H, unref as g, createCommentVNode as b, Fragment as A, createTextVNode as N, toDisplayString as V, renderSlot as q, toRef as J, createBlock as w, withCtx as E, renderList as ee, resolveDynamicComponent as he, h as se, mergeProps as K, normalizeProps as ye, reactive as Be, onBeforeUnmount as Le, onMounted as xe, Teleport as qe, Transition as De, nextTick as le, createSlots as Ie, guardReactiveProps as Ee, withDirectives as Te } from "vue";
|
|
2
|
+
function te(t) {
|
|
3
|
+
return t == null ? !0 : typeof t == "string" || Array.isArray(t) ? t.length === 0 : typeof t == "object" ? Object.keys(t).length === 0 : !1;
|
|
4
|
+
}
|
|
2
5
|
function re(t) {
|
|
3
6
|
return t !== null && typeof t == "object" && !Array.isArray(t);
|
|
4
7
|
}
|
|
@@ -19,22 +22,31 @@ function ve(t = {}, n = {}) {
|
|
|
19
22
|
}
|
|
20
23
|
return e;
|
|
21
24
|
}
|
|
22
|
-
const
|
|
23
|
-
function
|
|
24
|
-
const t =
|
|
25
|
+
const ne = "q-defaults";
|
|
26
|
+
function Ce() {
|
|
27
|
+
const t = pe();
|
|
25
28
|
if (!t)
|
|
26
|
-
throw new Error("[
|
|
29
|
+
throw new Error("[Quidgest UI] useDefaults must be called from inside a setup function");
|
|
27
30
|
const n = t.type.name ?? t.type.__name;
|
|
28
31
|
if (!n)
|
|
29
|
-
throw new Error("[
|
|
30
|
-
|
|
32
|
+
throw new Error("[Quidgest UI] Could not determine component name");
|
|
33
|
+
const e = ge();
|
|
34
|
+
return y(() => {
|
|
35
|
+
var o;
|
|
36
|
+
return (o = e.value) == null ? void 0 : o[n];
|
|
37
|
+
});
|
|
31
38
|
}
|
|
32
|
-
function
|
|
33
|
-
|
|
34
|
-
|
|
39
|
+
function Ve(t) {
|
|
40
|
+
if (te(t))
|
|
41
|
+
return;
|
|
42
|
+
const n = ge(), e = I(t), o = y(() => te(e.value) ? n.value : ve(n.value, e.value));
|
|
43
|
+
Se(ne, o);
|
|
35
44
|
}
|
|
36
45
|
function ge() {
|
|
37
|
-
|
|
46
|
+
const t = me(ne, void 0);
|
|
47
|
+
if (!t)
|
|
48
|
+
throw new Error("[Quidgest UI] Could not find defaults instance");
|
|
49
|
+
return t;
|
|
38
50
|
}
|
|
39
51
|
const ie = {
|
|
40
52
|
primary: "#00a1f8",
|
|
@@ -66,7 +78,7 @@ const ie = {
|
|
|
66
78
|
onWarning: "#fff",
|
|
67
79
|
onDanger: "#fff",
|
|
68
80
|
onInfo: "#fff"
|
|
69
|
-
},
|
|
81
|
+
}, ze = {
|
|
70
82
|
primary: "#018BD2",
|
|
71
83
|
primaryLight: "#cce7f6",
|
|
72
84
|
primaryDark: "#006fac",
|
|
@@ -104,7 +116,7 @@ function be(t) {
|
|
|
104
116
|
const n = parseInt(t.slice(1, 3), 16), e = parseInt(t.slice(3, 5), 16), o = parseInt(t.slice(5, 7), 16);
|
|
105
117
|
return { r: n, g: e, b: o };
|
|
106
118
|
}
|
|
107
|
-
function
|
|
119
|
+
function Qe(t, n) {
|
|
108
120
|
if (n < 0 || n > 100)
|
|
109
121
|
throw new Error("Amount must be in the range [0, 100]");
|
|
110
122
|
if (n === 0)
|
|
@@ -112,7 +124,7 @@ function Re(t, n) {
|
|
|
112
124
|
const e = _e(t), o = n / 100;
|
|
113
125
|
return e.l = e.l + o * (100 - e.l), ke(e);
|
|
114
126
|
}
|
|
115
|
-
function
|
|
127
|
+
function Ae(t, n) {
|
|
116
128
|
if (n < 0 || n > 100)
|
|
117
129
|
throw new Error("Amount must be in the range [0, 100]");
|
|
118
130
|
if (n === 0)
|
|
@@ -170,28 +182,28 @@ function P(t, n, e) {
|
|
|
170
182
|
return e < 0 && (e += 1), e > 1 && (e -= 1), e < 1 / 6 ? t + (n - t) * 6 * e : e < 1 / 2 ? n : e < 2 / 3 ? t + (n - t) * (2 / 3 - e) * 6 : t;
|
|
171
183
|
}
|
|
172
184
|
const Z = "q-theme";
|
|
173
|
-
function
|
|
174
|
-
const t =
|
|
185
|
+
function Xt() {
|
|
186
|
+
const t = me(Z);
|
|
175
187
|
if (!t)
|
|
176
|
-
throw new Error("[
|
|
188
|
+
throw new Error("[Quidgest UI] Could not find theme instance");
|
|
177
189
|
return t;
|
|
178
190
|
}
|
|
179
|
-
function
|
|
191
|
+
function Oe(t, n) {
|
|
180
192
|
let e = null;
|
|
181
193
|
if (n)
|
|
182
194
|
for (const o of n.themes) {
|
|
183
|
-
const a = o.mode === "light" ? ie :
|
|
195
|
+
const a = o.mode === "light" ? ie : ze;
|
|
184
196
|
if (o.colors) {
|
|
185
197
|
let s;
|
|
186
198
|
for (s in o.colors) {
|
|
187
199
|
const l = o.colors[s];
|
|
188
200
|
if (l && !s.startsWith("on") && !s.endsWith("Light") && !s.endsWith("Dark")) {
|
|
189
201
|
const c = be(l), i = `${s}Light`, p = `${s}Dark`;
|
|
190
|
-
i in o.colors || (o.colors[i] = ce(
|
|
202
|
+
i in o.colors || (o.colors[i] = ce(Qe(c, 85))), p in o.colors || (o.colors[p] = ce(Ae(c, 25)));
|
|
191
203
|
}
|
|
192
204
|
}
|
|
193
205
|
}
|
|
194
|
-
o.colors =
|
|
206
|
+
o.colors = Fe(a, o.colors), o.name === n.defaultTheme && (e = o);
|
|
195
207
|
}
|
|
196
208
|
else {
|
|
197
209
|
const o = "default";
|
|
@@ -205,24 +217,24 @@ function Ne(t, n) {
|
|
|
205
217
|
};
|
|
206
218
|
}
|
|
207
219
|
if (e) {
|
|
208
|
-
const o =
|
|
220
|
+
const o = I({
|
|
209
221
|
activeTheme: e.name,
|
|
210
222
|
themes: n.themes
|
|
211
223
|
});
|
|
212
|
-
|
|
224
|
+
Q(
|
|
213
225
|
() => o.value.activeTheme,
|
|
214
226
|
(a) => {
|
|
215
227
|
const s = o.value.themes.find((l) => l.name === a);
|
|
216
|
-
s &&
|
|
228
|
+
s && Me(s.colors);
|
|
217
229
|
},
|
|
218
230
|
{ immediate: !0 }
|
|
219
231
|
), t.provide(Z, o);
|
|
220
232
|
}
|
|
221
233
|
}
|
|
222
|
-
function
|
|
234
|
+
function Fe(t, n = {}) {
|
|
223
235
|
return { ...t, ...n };
|
|
224
236
|
}
|
|
225
|
-
function
|
|
237
|
+
function Me(t) {
|
|
226
238
|
let n = document.getElementById(
|
|
227
239
|
Z
|
|
228
240
|
);
|
|
@@ -244,7 +256,7 @@ function Ke(t) {
|
|
|
244
256
|
function ue(t) {
|
|
245
257
|
return t ? `--q-theme-${t.replace(/([A-Z])/g, "-$1").replace(/^-/, "").toLowerCase()}` : "";
|
|
246
258
|
}
|
|
247
|
-
function
|
|
259
|
+
function Zt(t = {}) {
|
|
248
260
|
return { install: (e) => {
|
|
249
261
|
const o = t.components || {};
|
|
250
262
|
for (const l in o)
|
|
@@ -253,10 +265,10 @@ function It(t = {}) {
|
|
|
253
265
|
for (const l in a)
|
|
254
266
|
e.directive(l, a[l]);
|
|
255
267
|
const s = t.defaults || {};
|
|
256
|
-
e.provide(
|
|
268
|
+
e.provide(ne, s), Oe(e, t.themes);
|
|
257
269
|
} };
|
|
258
270
|
}
|
|
259
|
-
const
|
|
271
|
+
const Re = /* @__PURE__ */ X("svg", { viewBox: "25 25 50 50" }, [
|
|
260
272
|
/* @__PURE__ */ X("circle", {
|
|
261
273
|
class: "path",
|
|
262
274
|
cx: "50",
|
|
@@ -267,9 +279,9 @@ const We = /* @__PURE__ */ X("svg", { viewBox: "25 25 50 50" }, [
|
|
|
267
279
|
"stroke-width": "5",
|
|
268
280
|
"stroke-miterlimit": "10"
|
|
269
281
|
})
|
|
270
|
-
], -1),
|
|
271
|
-
|
|
272
|
-
],
|
|
282
|
+
], -1), He = [
|
|
283
|
+
Re
|
|
284
|
+
], Ue = /* @__PURE__ */ _({
|
|
273
285
|
__name: "QSpinnerLoader",
|
|
274
286
|
props: {
|
|
275
287
|
size: { default: 48 }
|
|
@@ -281,39 +293,36 @@ const We = /* @__PURE__ */ X("svg", { viewBox: "25 25 50 50" }, [
|
|
|
281
293
|
return (o, a) => (r(), f("div", {
|
|
282
294
|
class: "q-spinner-loader",
|
|
283
295
|
style: W(e.value)
|
|
284
|
-
},
|
|
296
|
+
}, He, 4));
|
|
285
297
|
}
|
|
286
298
|
});
|
|
287
|
-
function
|
|
288
|
-
return t == null ? !0 : typeof t == "string" || Array.isArray(t) ? t.length === 0 : typeof t == "object" ? Object.keys(t).length === 0 : !1;
|
|
289
|
-
}
|
|
290
|
-
function Xe(t, n) {
|
|
299
|
+
function Ne(t, n) {
|
|
291
300
|
var e;
|
|
292
301
|
return typeof ((e = t.props) == null ? void 0 : e[n]) < "u";
|
|
293
302
|
}
|
|
294
|
-
function
|
|
303
|
+
function k(t) {
|
|
295
304
|
const n = t.setup;
|
|
296
305
|
return n && (t.setup = (e, o) => {
|
|
297
|
-
const a =
|
|
298
|
-
if (
|
|
306
|
+
const a = Ce();
|
|
307
|
+
if (te(a.value))
|
|
299
308
|
return n(e, o);
|
|
300
|
-
const s =
|
|
309
|
+
const s = pe();
|
|
301
310
|
if (s === null)
|
|
302
311
|
return n(e, o);
|
|
303
312
|
const l = new Proxy(e, {
|
|
304
313
|
get(c, i) {
|
|
305
|
-
|
|
306
|
-
|
|
314
|
+
var m;
|
|
315
|
+
const p = Reflect.get(c, i), $ = (m = a.value) == null ? void 0 : m[i];
|
|
316
|
+
return i === "class" || i === "style" ? [$, p].filter((x) => x != null) : typeof i == "string" && !Ne(s.vnode, i) ? $ ?? p : p;
|
|
307
317
|
}
|
|
308
318
|
});
|
|
309
319
|
return n(l, o);
|
|
310
320
|
}), t;
|
|
311
321
|
}
|
|
312
|
-
|
|
313
|
-
const Ze = ["disabled", "onClick"], je = {
|
|
322
|
+
const we = k(Ue), Ke = ["disabled", "onClick"], We = {
|
|
314
323
|
key: 0,
|
|
315
324
|
class: "q-btn__spinner"
|
|
316
|
-
},
|
|
325
|
+
}, Ge = { class: "q-btn__content" }, Ye = /* @__PURE__ */ _({
|
|
317
326
|
__name: "QButton",
|
|
318
327
|
props: {
|
|
319
328
|
active: { type: Boolean },
|
|
@@ -352,23 +361,23 @@ const Ze = ["disabled", "onClick"], je = {
|
|
|
352
361
|
type: "button",
|
|
353
362
|
class: C(s.value),
|
|
354
363
|
disabled: o.value,
|
|
355
|
-
onClick:
|
|
364
|
+
onClick: R(a, ["stop", "prevent"])
|
|
356
365
|
}, [
|
|
357
|
-
l.loading ? (r(), f("div",
|
|
358
|
-
|
|
366
|
+
l.loading ? (r(), f("div", We, [
|
|
367
|
+
H(g(we), { size: 23 })
|
|
359
368
|
])) : b("", !0),
|
|
360
|
-
X("span",
|
|
361
|
-
l.iconOnRight ? (r(), f(
|
|
362
|
-
|
|
369
|
+
X("span", Ge, [
|
|
370
|
+
l.iconOnRight ? (r(), f(A, { key: 0 }, [
|
|
371
|
+
N(V(e.label), 1)
|
|
363
372
|
], 64)) : b("", !0),
|
|
364
|
-
|
|
365
|
-
l.iconOnRight ? b("", !0) : (r(), f(
|
|
366
|
-
|
|
373
|
+
q(l.$slots, "default"),
|
|
374
|
+
l.iconOnRight ? b("", !0) : (r(), f(A, { key: 1 }, [
|
|
375
|
+
N(V(e.label), 1)
|
|
367
376
|
], 64))
|
|
368
377
|
])
|
|
369
|
-
], 10,
|
|
378
|
+
], 10, Ke));
|
|
370
379
|
}
|
|
371
|
-
}),
|
|
380
|
+
}), Xe = k(Ye), Ze = /* @__PURE__ */ _({
|
|
372
381
|
__name: "QButtonGroup",
|
|
373
382
|
props: {
|
|
374
383
|
bStyle: {},
|
|
@@ -378,7 +387,7 @@ const Ze = ["disabled", "onClick"], je = {
|
|
|
378
387
|
},
|
|
379
388
|
setup(t) {
|
|
380
389
|
const n = t;
|
|
381
|
-
|
|
390
|
+
Ve({
|
|
382
391
|
QButton: {
|
|
383
392
|
bStyle: J(n, "bStyle"),
|
|
384
393
|
disabled: J(n, "disabled"),
|
|
@@ -395,10 +404,10 @@ const Ze = ["disabled", "onClick"], je = {
|
|
|
395
404
|
return (o, a) => (r(), f("div", {
|
|
396
405
|
class: C(e.value)
|
|
397
406
|
}, [
|
|
398
|
-
|
|
407
|
+
q(o.$slots, "default")
|
|
399
408
|
], 2));
|
|
400
409
|
}
|
|
401
|
-
}),
|
|
410
|
+
}), je = k(Ze), Je = /* @__PURE__ */ _({
|
|
402
411
|
__name: "QButtonToggle",
|
|
403
412
|
props: {
|
|
404
413
|
modelValue: {},
|
|
@@ -410,8 +419,8 @@ const Ze = ["disabled", "onClick"], je = {
|
|
|
410
419
|
},
|
|
411
420
|
emits: ["update:modelValue"],
|
|
412
421
|
setup(t, { emit: n }) {
|
|
413
|
-
const e = t, o =
|
|
414
|
-
|
|
422
|
+
const e = t, o = I(e.modelValue);
|
|
423
|
+
Q(
|
|
415
424
|
() => e.modelValue,
|
|
416
425
|
(l) => o.value = l
|
|
417
426
|
);
|
|
@@ -426,14 +435,14 @@ const Ze = ["disabled", "onClick"], je = {
|
|
|
426
435
|
function s(l) {
|
|
427
436
|
a.value === l.key && !e.mandatory ? a.value = void 0 : a.value = l.key;
|
|
428
437
|
}
|
|
429
|
-
return (l, c) => (r(),
|
|
438
|
+
return (l, c) => (r(), w(g(je), {
|
|
430
439
|
"b-style": "secondary",
|
|
431
440
|
disabled: e.disabled,
|
|
432
441
|
borderless: e.borderless,
|
|
433
442
|
elevated: e.elevated
|
|
434
443
|
}, {
|
|
435
444
|
default: E(() => [
|
|
436
|
-
(r(!0), f(
|
|
445
|
+
(r(!0), f(A, null, ee(e.options, (i) => (r(), w(g(Xe), {
|
|
437
446
|
key: i.key,
|
|
438
447
|
title: i.title,
|
|
439
448
|
label: i.label,
|
|
@@ -441,7 +450,7 @@ const Ze = ["disabled", "onClick"], je = {
|
|
|
441
450
|
onClick: (p) => s(i)
|
|
442
451
|
}, {
|
|
443
452
|
default: E(() => [
|
|
444
|
-
|
|
453
|
+
q(l.$slots, i.key)
|
|
445
454
|
]),
|
|
446
455
|
_: 2
|
|
447
456
|
}, 1032, ["title", "label", "active", "onClick"]))), 128))
|
|
@@ -449,7 +458,7 @@ const Ze = ["disabled", "onClick"], je = {
|
|
|
449
458
|
_: 3
|
|
450
459
|
}, 8, ["disabled", "borderless", "elevated"]));
|
|
451
460
|
}
|
|
452
|
-
}),
|
|
461
|
+
}), jt = k(Je), Pe = /* @__PURE__ */ _({
|
|
453
462
|
__name: "QIcon",
|
|
454
463
|
props: {
|
|
455
464
|
name: {},
|
|
@@ -460,21 +469,21 @@ const Ze = ["disabled", "onClick"], je = {
|
|
|
460
469
|
const n = t, e = y(() => {
|
|
461
470
|
switch (n.type) {
|
|
462
471
|
case "svg":
|
|
463
|
-
return
|
|
472
|
+
return ct;
|
|
464
473
|
case "font":
|
|
465
|
-
return
|
|
474
|
+
return rt;
|
|
466
475
|
case "img":
|
|
467
|
-
return
|
|
476
|
+
return it;
|
|
468
477
|
default:
|
|
469
478
|
return;
|
|
470
479
|
}
|
|
471
480
|
});
|
|
472
|
-
return (o, a) => (r(),
|
|
481
|
+
return (o, a) => (r(), w(he(e.value), {
|
|
473
482
|
icon: n.name,
|
|
474
483
|
size: n.size
|
|
475
484
|
}, null, 8, ["icon", "size"]));
|
|
476
485
|
}
|
|
477
|
-
}),
|
|
486
|
+
}), et = /* @__PURE__ */ _({
|
|
478
487
|
__name: "QIconFont",
|
|
479
488
|
props: {
|
|
480
489
|
icon: {},
|
|
@@ -492,7 +501,7 @@ const Ze = ["disabled", "onClick"], je = {
|
|
|
492
501
|
style: W(o.value)
|
|
493
502
|
}, null, 6)) : b("", !0);
|
|
494
503
|
}
|
|
495
|
-
}), tt = ["src"],
|
|
504
|
+
}), tt = ["src"], nt = /* @__PURE__ */ _({
|
|
496
505
|
__name: "QIconImg",
|
|
497
506
|
props: {
|
|
498
507
|
icon: {},
|
|
@@ -509,7 +518,7 @@ const Ze = ["disabled", "onClick"], je = {
|
|
|
509
518
|
style: W(e.value)
|
|
510
519
|
}, null, 12, tt)) : b("", !0);
|
|
511
520
|
}
|
|
512
|
-
}),
|
|
521
|
+
}), M = {}, ot = _({
|
|
513
522
|
name: "InlineSvg",
|
|
514
523
|
emits: ["loaded", "unloaded", "error"],
|
|
515
524
|
inheritAttrs: !1,
|
|
@@ -565,7 +574,7 @@ const Ze = ["disabled", "onClick"], je = {
|
|
|
565
574
|
o !== !1 && o !== null && o !== void 0 && (t[e] = o);
|
|
566
575
|
},
|
|
567
576
|
getSvgContent(t) {
|
|
568
|
-
return this.symbol && (t = t.getElementById(this.symbol), !t) ? null : (this.transformSource && (t = t.cloneNode(!0), t = this.transformSource(t)), this.title && (this.transformSource || (t = t.cloneNode(!0)),
|
|
577
|
+
return this.symbol && (t = t.getElementById(this.symbol), !t) ? null : (this.transformSource && (t = t.cloneNode(!0), t = this.transformSource(t)), this.title && (this.transformSource || (t = t.cloneNode(!0)), at(t, this.title)), t);
|
|
569
578
|
},
|
|
570
579
|
/**
|
|
571
580
|
* Get svgElSource
|
|
@@ -573,11 +582,11 @@ const Ze = ["disabled", "onClick"], je = {
|
|
|
573
582
|
*/
|
|
574
583
|
async getSource(t) {
|
|
575
584
|
try {
|
|
576
|
-
|
|
577
|
-
const n = await
|
|
585
|
+
M[t] || (M[t] = st(this.download(t))), this.svgElSource && M[t].getIsPending() && !this.keepDuringLoading && (this.svgElSource = null, this.$emit("unloaded"));
|
|
586
|
+
const n = await M[t];
|
|
578
587
|
this.svgElSource = n, await this.$nextTick(), this.$emit("loaded", this.$el);
|
|
579
588
|
} catch (n) {
|
|
580
|
-
this.svgElSource && (this.svgElSource = null, this.$emit("unloaded")), delete
|
|
589
|
+
this.svgElSource && (this.svgElSource = null, this.$emit("unloaded")), delete M[t], this.$emit("error", n);
|
|
581
590
|
}
|
|
582
591
|
},
|
|
583
592
|
/**
|
|
@@ -601,7 +610,7 @@ const Ze = ["disabled", "onClick"], je = {
|
|
|
601
610
|
}
|
|
602
611
|
}
|
|
603
612
|
});
|
|
604
|
-
function
|
|
613
|
+
function at(t, n) {
|
|
605
614
|
const e = t.getElementsByTagName("title");
|
|
606
615
|
if (e.length)
|
|
607
616
|
e[0].textContent = n;
|
|
@@ -610,7 +619,7 @@ function ot(t, n) {
|
|
|
610
619
|
o.textContent = n, t.insertBefore(o, t.firstChild);
|
|
611
620
|
}
|
|
612
621
|
}
|
|
613
|
-
function
|
|
622
|
+
function st(t) {
|
|
614
623
|
if (t.getIsPending)
|
|
615
624
|
return t;
|
|
616
625
|
let n = !0;
|
|
@@ -622,7 +631,7 @@ function at(t) {
|
|
|
622
631
|
);
|
|
623
632
|
return e.getIsPending = () => n, e;
|
|
624
633
|
}
|
|
625
|
-
const
|
|
634
|
+
const lt = /* @__PURE__ */ _({
|
|
626
635
|
__name: "QIconSvg",
|
|
627
636
|
props: {
|
|
628
637
|
icon: {},
|
|
@@ -634,7 +643,7 @@ const Se = /* @__PURE__ */ _({
|
|
|
634
643
|
const e = t, o = y(() => ({
|
|
635
644
|
"font-size": e.size !== void 0 ? `${e.size}px` : void 0
|
|
636
645
|
}));
|
|
637
|
-
return (a, s) => e.icon ? (r(),
|
|
646
|
+
return (a, s) => e.icon ? (r(), w(g(ot), {
|
|
638
647
|
key: 0,
|
|
639
648
|
class: "q-icon q-icon__svg",
|
|
640
649
|
src: e.bundle,
|
|
@@ -644,18 +653,13 @@ const Se = /* @__PURE__ */ _({
|
|
|
644
653
|
onUnloaded: s[1] || (s[1] = (l) => n("unloaded", l))
|
|
645
654
|
}, null, 8, ["src", "symbol", "style"])) : b("", !0);
|
|
646
655
|
}
|
|
647
|
-
})
|
|
648
|
-
A(O);
|
|
649
|
-
A(we);
|
|
650
|
-
A($e);
|
|
651
|
-
A(Se);
|
|
652
|
-
const st = {
|
|
656
|
+
}), U = k(Pe), rt = k(et), it = k(nt), ct = k(lt), ut = {
|
|
653
657
|
key: 0,
|
|
654
658
|
class: "q-input__prepend"
|
|
655
|
-
},
|
|
659
|
+
}, dt = {
|
|
656
660
|
key: 1,
|
|
657
661
|
class: "q-input__append"
|
|
658
|
-
},
|
|
662
|
+
}, ft = /* @__PURE__ */ _({
|
|
659
663
|
__name: "QInput",
|
|
660
664
|
props: {
|
|
661
665
|
size: { default: "medium" },
|
|
@@ -671,25 +675,25 @@ const st = {
|
|
|
671
675
|
{ "q-input--readonly": n.readonly, "q-input--disabled": n.disabled }
|
|
672
676
|
])
|
|
673
677
|
}, [
|
|
674
|
-
e.$slots.prepend ? (r(), f("div",
|
|
675
|
-
|
|
678
|
+
e.$slots.prepend ? (r(), f("div", ut, [
|
|
679
|
+
q(e.$slots, "prepend")
|
|
676
680
|
])) : b("", !0),
|
|
677
|
-
|
|
678
|
-
e.$slots.append ? (r(), f("div",
|
|
679
|
-
|
|
681
|
+
q(e.$slots, "default"),
|
|
682
|
+
e.$slots.append ? (r(), f("div", dt, [
|
|
683
|
+
q(e.$slots, "append")
|
|
680
684
|
])) : b("", !0)
|
|
681
685
|
], 2));
|
|
682
686
|
}
|
|
683
|
-
}),
|
|
687
|
+
}), pt = k(ft), mt = (t, n) => {
|
|
684
688
|
const e = t.__vccOpts || t;
|
|
685
689
|
for (const [o, a] of n)
|
|
686
690
|
e[o] = a;
|
|
687
691
|
return e;
|
|
688
|
-
},
|
|
689
|
-
function
|
|
690
|
-
return r(), f("div",
|
|
692
|
+
}, ht = {}, yt = { class: "q-line-loader" };
|
|
693
|
+
function vt(t, n) {
|
|
694
|
+
return r(), f("div", yt);
|
|
691
695
|
}
|
|
692
|
-
const
|
|
696
|
+
const gt = /* @__PURE__ */ mt(ht, [["render", vt]]), Jt = k(gt), bt = /* @__PURE__ */ _({
|
|
693
697
|
__name: "QList",
|
|
694
698
|
props: {
|
|
695
699
|
modelValue: { type: [String, Number, Boolean, Symbol], default: void 0 },
|
|
@@ -701,15 +705,15 @@ const zt = /* @__PURE__ */ it(ct, [["render", dt]]), Be = /* @__PURE__ */ _({
|
|
|
701
705
|
},
|
|
702
706
|
emits: ["update:modelValue"],
|
|
703
707
|
setup(t, { expose: n, emit: e }) {
|
|
704
|
-
const o = t, a =
|
|
708
|
+
const o = t, a = I(o.modelValue), s = y(() => l.value.length > 1 ? "div" : "ul"), l = y(() => o.groups.length ? o.groups : [{ title: "" }]), c = I(null);
|
|
705
709
|
function i(d) {
|
|
706
710
|
a.value = d, e("update:modelValue", d);
|
|
707
711
|
}
|
|
708
712
|
function p() {
|
|
709
713
|
let d = 0;
|
|
710
|
-
a.value && (d = o.items.findIndex((
|
|
714
|
+
a.value && (d = o.items.findIndex((S) => S[o.itemValue] === a.value)), x(d);
|
|
711
715
|
}
|
|
712
|
-
function
|
|
716
|
+
function $(d) {
|
|
713
717
|
switch (["ArrowDown", "ArrowUp", "Home", "End"].includes(d.key) && d.preventDefault(), d.key) {
|
|
714
718
|
case "ArrowDown":
|
|
715
719
|
m("next");
|
|
@@ -729,61 +733,61 @@ const zt = /* @__PURE__ */ it(ct, [["render", dt]]), Be = /* @__PURE__ */ _({
|
|
|
729
733
|
switch (d) {
|
|
730
734
|
case "next":
|
|
731
735
|
case "prev":
|
|
732
|
-
|
|
736
|
+
x(F(d));
|
|
733
737
|
break;
|
|
734
738
|
case "first":
|
|
735
|
-
|
|
739
|
+
x(0);
|
|
736
740
|
break;
|
|
737
741
|
case "last":
|
|
738
|
-
|
|
742
|
+
x(-1);
|
|
739
743
|
break;
|
|
740
744
|
}
|
|
741
745
|
}
|
|
742
|
-
function
|
|
746
|
+
function x(d) {
|
|
743
747
|
var v;
|
|
744
748
|
(v = T().at(d)) == null || v.focus();
|
|
745
749
|
}
|
|
746
750
|
function T() {
|
|
747
751
|
var v;
|
|
748
752
|
const d = (v = c.value) == null ? void 0 : v.querySelectorAll("li");
|
|
749
|
-
return d ? Array.from(d).filter((
|
|
753
|
+
return d ? Array.from(d).filter((D) => D.tabIndex !== -1) : [];
|
|
750
754
|
}
|
|
751
|
-
function
|
|
755
|
+
function O(d) {
|
|
752
756
|
return d.indexOf(document.activeElement);
|
|
753
757
|
}
|
|
754
|
-
function
|
|
755
|
-
const
|
|
756
|
-
return d === "next" ? v ===
|
|
758
|
+
function F(d) {
|
|
759
|
+
const S = T(), v = O(S);
|
|
760
|
+
return d === "next" ? v === S.length - 1 ? v : v + 1 : v === 0 ? 0 : v - 1;
|
|
757
761
|
}
|
|
758
|
-
function
|
|
759
|
-
return d ? o.items.filter((
|
|
762
|
+
function z(d) {
|
|
763
|
+
return d ? o.items.filter((S) => S.group === d) : o.items;
|
|
760
764
|
}
|
|
761
|
-
return
|
|
765
|
+
return Q(
|
|
762
766
|
() => o.modelValue,
|
|
763
767
|
(d) => {
|
|
764
768
|
a.value = d;
|
|
765
769
|
}
|
|
766
|
-
), n({ focusItem:
|
|
770
|
+
), n({ focusItem: x }), (d, S) => (r(), w(he(s.value), {
|
|
767
771
|
ref_key: "listRef",
|
|
768
772
|
ref: c,
|
|
769
773
|
class: C(["q-list", { "q-list--disabled": o.disabled }]),
|
|
770
774
|
role: "listbox",
|
|
771
775
|
tabindex: o.disabled ? -1 : 0,
|
|
772
776
|
onFocus: p,
|
|
773
|
-
onKeydown:
|
|
777
|
+
onKeydown: $
|
|
774
778
|
}, {
|
|
775
779
|
default: E(() => [
|
|
776
|
-
(r(!0), f(
|
|
780
|
+
(r(!0), f(A, null, ee(l.value, (v) => (r(), w(g(It), K({
|
|
777
781
|
key: v.title
|
|
778
782
|
}, v), {
|
|
779
783
|
default: E(() => [
|
|
780
|
-
(r(!0), f(
|
|
781
|
-
key:
|
|
782
|
-
value:
|
|
783
|
-
label:
|
|
784
|
-
icon:
|
|
785
|
-
disabled: o.disabled ||
|
|
786
|
-
selected: a.value ===
|
|
784
|
+
(r(!0), f(A, null, ee(z(v.title), (D) => (r(), w(g(Dt), {
|
|
785
|
+
key: D[o.itemValue],
|
|
786
|
+
value: D[o.itemValue],
|
|
787
|
+
label: D[o.itemLabel],
|
|
788
|
+
icon: D.icon,
|
|
789
|
+
disabled: o.disabled || D.disabled,
|
|
790
|
+
selected: a.value === D[o.itemValue],
|
|
787
791
|
onSelect: i
|
|
788
792
|
}, null, 8, ["value", "label", "icon", "disabled", "selected"]))), 128))
|
|
789
793
|
]),
|
|
@@ -793,11 +797,11 @@ const zt = /* @__PURE__ */ it(ct, [["render", dt]]), Be = /* @__PURE__ */ _({
|
|
|
793
797
|
_: 1
|
|
794
798
|
}, 40, ["class", "tabindex"]));
|
|
795
799
|
}
|
|
796
|
-
}),
|
|
800
|
+
}), _t = ["tabindex", "aria-label", "aria-selected", "onClick"], kt = {
|
|
797
801
|
check: {
|
|
798
802
|
name: "check"
|
|
799
803
|
}
|
|
800
|
-
},
|
|
804
|
+
}, wt = /* @__PURE__ */ _({
|
|
801
805
|
__name: "QListItem",
|
|
802
806
|
props: {
|
|
803
807
|
value: { type: [String, Number, Boolean, Symbol] },
|
|
@@ -805,7 +809,7 @@ const zt = /* @__PURE__ */ it(ct, [["render", dt]]), Be = /* @__PURE__ */ _({
|
|
|
805
809
|
icon: { default: void 0 },
|
|
806
810
|
selected: { type: Boolean, default: !1 },
|
|
807
811
|
highlighted: { type: Boolean, default: !1 },
|
|
808
|
-
icons: { default: () =>
|
|
812
|
+
icons: { default: () => kt },
|
|
809
813
|
disabled: { type: Boolean, default: !1 }
|
|
810
814
|
},
|
|
811
815
|
emits: ["select"],
|
|
@@ -831,22 +835,22 @@ const zt = /* @__PURE__ */ it(ct, [["render", dt]]), Be = /* @__PURE__ */ _({
|
|
|
831
835
|
"aria-label": e.label,
|
|
832
836
|
"aria-selected": e.disabled ? void 0 : e.selected,
|
|
833
837
|
onKeydown: a,
|
|
834
|
-
onClick:
|
|
838
|
+
onClick: R(o, ["stop", "prevent"])
|
|
835
839
|
}, [
|
|
836
|
-
e.icon ? (r(),
|
|
837
|
-
|
|
838
|
-
e.selected ? (r(),
|
|
839
|
-
], 42,
|
|
840
|
+
e.icon ? (r(), w(g(U), ye(K({ key: 0 }, e.icon)), null, 16)) : b("", !0),
|
|
841
|
+
N(" " + V(e.label) + " ", 1),
|
|
842
|
+
e.selected ? (r(), w(g(U), K({ key: 1 }, e.icons.check, { class: "q-list-item__check" }), null, 16)) : b("", !0)
|
|
843
|
+
], 42, _t));
|
|
840
844
|
}
|
|
841
845
|
});
|
|
842
|
-
let
|
|
843
|
-
function
|
|
844
|
-
return `uid-${
|
|
846
|
+
let $t = 0;
|
|
847
|
+
function St() {
|
|
848
|
+
return `uid-${++$t}`;
|
|
845
849
|
}
|
|
846
|
-
const
|
|
850
|
+
const Bt = ["aria-labelledby"], Lt = ["id"], xt = /* @__PURE__ */ _({
|
|
847
851
|
__name: "QListItemGroup",
|
|
848
852
|
props: {
|
|
849
|
-
id: { default: () =>
|
|
853
|
+
id: { default: () => St() },
|
|
850
854
|
title: { default: "" },
|
|
851
855
|
disabled: { type: Boolean, default: !1 }
|
|
852
856
|
},
|
|
@@ -863,20 +867,17 @@ const yt = ["aria-labelledby"], vt = ["id"], xe = /* @__PURE__ */ _({
|
|
|
863
867
|
id: n.id,
|
|
864
868
|
class: "q-list-item-group__title",
|
|
865
869
|
role: "presentation"
|
|
866
|
-
},
|
|
867
|
-
|
|
868
|
-
], 8,
|
|
870
|
+
}, V(n.title), 9, Lt)) : b("", !0),
|
|
871
|
+
q(e.$slots, "default")
|
|
872
|
+
], 8, Bt)) : q(e.$slots, "default", { key: 0 });
|
|
869
873
|
}
|
|
870
|
-
});
|
|
871
|
-
|
|
872
|
-
A(Le);
|
|
873
|
-
A(xe);
|
|
874
|
-
function gt(t, n, e = "right", o) {
|
|
874
|
+
}), qt = k(bt), Dt = k(wt), It = k(xt);
|
|
875
|
+
function Et(t, n, e = "right", o) {
|
|
875
876
|
const a = t.getBoundingClientRect(), s = a.x + window.scrollX, l = a.y + window.scrollY, c = n == null ? void 0 : n.getBoundingClientRect(), i = (c == null ? void 0 : c.width) ?? 0, p = (c == null ? void 0 : c.height) ?? 0;
|
|
876
|
-
let
|
|
877
|
-
c &&
|
|
878
|
-
const m = { x: 0, y: 0, placement:
|
|
879
|
-
switch (
|
|
877
|
+
let $ = e;
|
|
878
|
+
c && !$e(a, c, $) && ($ = Tt(a, c, $));
|
|
879
|
+
const m = { x: 0, y: 0, placement: $ };
|
|
880
|
+
switch ($) {
|
|
880
881
|
case "top":
|
|
881
882
|
o === "anchor" ? m.x = s : m.x = s + (a.width - i) / 2, m.y = l - p;
|
|
882
883
|
break;
|
|
@@ -892,7 +893,7 @@ function gt(t, n, e = "right", o) {
|
|
|
892
893
|
}
|
|
893
894
|
return o === "anchor" && (m.width = a.width), m;
|
|
894
895
|
}
|
|
895
|
-
function
|
|
896
|
+
function $e(t, n, e) {
|
|
896
897
|
let o = !1, a = !1;
|
|
897
898
|
switch (e) {
|
|
898
899
|
case "top":
|
|
@@ -916,7 +917,7 @@ function de(t, n) {
|
|
|
916
917
|
function fe(t, n) {
|
|
917
918
|
return window.innerWidth - t.left - t.width / 2 > n.width / 2 && t.left + t.width / 2 > n.width / 2;
|
|
918
919
|
}
|
|
919
|
-
function
|
|
920
|
+
function Tt(t, n, e) {
|
|
920
921
|
const o = {
|
|
921
922
|
top: ["bottom", "left", "right"],
|
|
922
923
|
bottom: ["top", "left", "right"],
|
|
@@ -924,17 +925,17 @@ function bt(t, n, e) {
|
|
|
924
925
|
right: ["left", "top", "bottom"]
|
|
925
926
|
};
|
|
926
927
|
for (const a of o[e])
|
|
927
|
-
if (
|
|
928
|
+
if ($e(t, n, a))
|
|
928
929
|
return a;
|
|
929
930
|
return e;
|
|
930
931
|
}
|
|
931
932
|
function Y(t) {
|
|
932
933
|
return typeof t == "string" ? document.querySelector(t) : t && "$el" in t ? t.$el : t;
|
|
933
934
|
}
|
|
934
|
-
const
|
|
935
|
+
const Ct = {
|
|
935
936
|
key: 0,
|
|
936
937
|
class: "q-overlay__arrow"
|
|
937
|
-
},
|
|
938
|
+
}, Vt = /* @__PURE__ */ _({
|
|
938
939
|
__name: "QOverlay",
|
|
939
940
|
props: {
|
|
940
941
|
modelValue: { type: Boolean },
|
|
@@ -959,25 +960,25 @@ const _t = {
|
|
|
959
960
|
`q-overlay--${a.placement}`,
|
|
960
961
|
{ "q-overlay--inverted": e.appearance === "inverted" },
|
|
961
962
|
...e.contentClasses
|
|
962
|
-
]), a =
|
|
963
|
+
]), a = Be({
|
|
963
964
|
visible: e.modelValue,
|
|
964
965
|
top: 0,
|
|
965
966
|
left: 0,
|
|
966
967
|
width: 0,
|
|
967
968
|
placement: e.placement
|
|
968
969
|
}), s = y(() => a.visible && !e.disabled);
|
|
969
|
-
|
|
970
|
+
Q(
|
|
970
971
|
() => e.modelValue,
|
|
971
972
|
() => a.visible = e.modelValue
|
|
972
973
|
);
|
|
973
974
|
const l = y(() => {
|
|
974
|
-
let h = 0,
|
|
975
|
+
let h = 0, B = 0;
|
|
975
976
|
switch (a.placement) {
|
|
976
977
|
case "top":
|
|
977
|
-
|
|
978
|
+
B = -(e.offset || 0);
|
|
978
979
|
break;
|
|
979
980
|
case "bottom":
|
|
980
|
-
|
|
981
|
+
B = e.offset || 0;
|
|
981
982
|
break;
|
|
982
983
|
case "left":
|
|
983
984
|
h = -(e.offset || 0);
|
|
@@ -987,46 +988,46 @@ const _t = {
|
|
|
987
988
|
break;
|
|
988
989
|
}
|
|
989
990
|
const u = {
|
|
990
|
-
top: `${a.top +
|
|
991
|
+
top: `${a.top + B}px`,
|
|
991
992
|
left: `${a.left + h}px`
|
|
992
993
|
};
|
|
993
994
|
return a.width !== void 0 && ["top", "bottom"].includes(a.placement) && (u.width = `${a.width}px`), u;
|
|
994
|
-
}), c =
|
|
995
|
+
}), c = I(null);
|
|
995
996
|
function i() {
|
|
996
997
|
const h = Y(e.anchor);
|
|
997
998
|
if (h) {
|
|
998
|
-
const
|
|
999
|
-
a.left =
|
|
999
|
+
const B = Et(h, c.value, e.placement, e.width);
|
|
1000
|
+
a.left = B.x, a.top = B.y, a.width = B.width, a.placement = B.placement;
|
|
1000
1001
|
}
|
|
1001
1002
|
}
|
|
1002
|
-
|
|
1003
|
+
Q([() => s.value, () => e.placement], i);
|
|
1003
1004
|
let p;
|
|
1004
|
-
function
|
|
1005
|
+
function $() {
|
|
1005
1006
|
const h = e.trigger === "hover" ? e.delay : 0;
|
|
1006
1007
|
p || (p = window.setTimeout(() => a.visible = !0, h));
|
|
1007
1008
|
}
|
|
1008
1009
|
function m() {
|
|
1009
1010
|
clearTimeout(p), p = void 0, a.visible = !1;
|
|
1010
1011
|
}
|
|
1011
|
-
function
|
|
1012
|
-
s.value ? m() :
|
|
1012
|
+
function x() {
|
|
1013
|
+
s.value ? m() : $();
|
|
1013
1014
|
}
|
|
1014
1015
|
let T;
|
|
1015
|
-
function
|
|
1016
|
+
function O() {
|
|
1016
1017
|
le(() => {
|
|
1017
1018
|
const h = Y(e.anchor);
|
|
1018
1019
|
if (h)
|
|
1019
1020
|
switch (e.trigger) {
|
|
1020
1021
|
case "click":
|
|
1021
|
-
h.addEventListener("click",
|
|
1022
|
+
h.addEventListener("click", x);
|
|
1022
1023
|
break;
|
|
1023
1024
|
case "hover":
|
|
1024
|
-
h.addEventListener("mouseenter",
|
|
1025
|
+
h.addEventListener("mouseenter", $), h.addEventListener("mouseleave", m);
|
|
1025
1026
|
break;
|
|
1026
1027
|
}
|
|
1027
1028
|
});
|
|
1028
1029
|
}
|
|
1029
|
-
function
|
|
1030
|
+
function F() {
|
|
1030
1031
|
le(() => {
|
|
1031
1032
|
const h = Y(e.anchor);
|
|
1032
1033
|
h && (window.addEventListener("scroll", i), window.addEventListener("resize", i), T = new MutationObserver(i), T.observe(h, {
|
|
@@ -1037,41 +1038,41 @@ const _t = {
|
|
|
1037
1038
|
}), i());
|
|
1038
1039
|
});
|
|
1039
1040
|
}
|
|
1040
|
-
function
|
|
1041
|
+
function z() {
|
|
1041
1042
|
window.removeEventListener("scroll", i), window.removeEventListener("resize", i), T == null || T.disconnect();
|
|
1042
1043
|
}
|
|
1043
1044
|
let d;
|
|
1044
|
-
function
|
|
1045
|
-
Y(e.anchor) ? (i(), d = window.setTimeout(
|
|
1045
|
+
function S() {
|
|
1046
|
+
Y(e.anchor) ? (i(), d = window.setTimeout(S, 100)) : m();
|
|
1046
1047
|
}
|
|
1047
1048
|
function v() {
|
|
1048
|
-
|
|
1049
|
+
F(), e.spy && S();
|
|
1049
1050
|
}
|
|
1050
|
-
function
|
|
1051
|
-
|
|
1051
|
+
function D() {
|
|
1052
|
+
z(), e.spy && (clearTimeout(d), d = void 0);
|
|
1052
1053
|
}
|
|
1053
|
-
return
|
|
1054
|
+
return Le(D), xe(i), Q(
|
|
1054
1055
|
() => e.disabled,
|
|
1055
1056
|
(h) => {
|
|
1056
|
-
h ||
|
|
1057
|
+
h || O();
|
|
1057
1058
|
},
|
|
1058
1059
|
{ immediate: !0 }
|
|
1059
|
-
),
|
|
1060
|
+
), Q(
|
|
1060
1061
|
() => s.value,
|
|
1061
1062
|
(h) => {
|
|
1062
|
-
h ? v() :
|
|
1063
|
+
h ? v() : D();
|
|
1063
1064
|
},
|
|
1064
1065
|
{ immediate: !0 }
|
|
1065
|
-
), (h,
|
|
1066
|
-
|
|
1067
|
-
(r(),
|
|
1066
|
+
), (h, B) => (r(), f(A, null, [
|
|
1067
|
+
q(h.$slots, "trigger", { open: s.value }),
|
|
1068
|
+
(r(), w(qe, {
|
|
1068
1069
|
to: e.attach
|
|
1069
1070
|
}, [
|
|
1070
|
-
|
|
1071
|
+
H(De, {
|
|
1071
1072
|
name: e.transition,
|
|
1072
1073
|
appear: "",
|
|
1073
|
-
onEnter:
|
|
1074
|
-
onLeave:
|
|
1074
|
+
onEnter: B[0] || (B[0] = (u) => n("enter")),
|
|
1075
|
+
onLeave: B[1] || (B[1] = (u) => n("leave"))
|
|
1075
1076
|
}, {
|
|
1076
1077
|
default: E(() => [
|
|
1077
1078
|
s.value ? (r(), f("div", {
|
|
@@ -1084,8 +1085,8 @@ const _t = {
|
|
|
1084
1085
|
ref_key: "overlay",
|
|
1085
1086
|
ref: c
|
|
1086
1087
|
}, [
|
|
1087
|
-
e.arrow ? (r(), f("div",
|
|
1088
|
-
|
|
1088
|
+
e.arrow ? (r(), f("div", Ct)) : b("", !0),
|
|
1089
|
+
q(h.$slots, "default")
|
|
1089
1090
|
], 512)
|
|
1090
1091
|
], 6)) : b("", !0)
|
|
1091
1092
|
]),
|
|
@@ -1094,13 +1095,13 @@ const _t = {
|
|
|
1094
1095
|
], 8, ["to"]))
|
|
1095
1096
|
], 64));
|
|
1096
1097
|
}
|
|
1097
|
-
}),
|
|
1098
|
+
}), oe = k(Vt), zt = {
|
|
1098
1099
|
key: 0,
|
|
1099
1100
|
class: "q-popover__header"
|
|
1100
|
-
},
|
|
1101
|
+
}, Qt = {
|
|
1101
1102
|
key: 1,
|
|
1102
1103
|
class: "q-popover__body"
|
|
1103
|
-
},
|
|
1104
|
+
}, At = ["innerHTML"], Ot = { key: 1 }, Ft = /* @__PURE__ */ _({
|
|
1104
1105
|
__name: "QPopover",
|
|
1105
1106
|
props: {
|
|
1106
1107
|
modelValue: { type: Boolean },
|
|
@@ -1116,7 +1117,7 @@ const _t = {
|
|
|
1116
1117
|
},
|
|
1117
1118
|
setup(t) {
|
|
1118
1119
|
const n = t;
|
|
1119
|
-
return (e, o) => (r(),
|
|
1120
|
+
return (e, o) => (r(), w(g(oe), {
|
|
1120
1121
|
"model-value": n.modelValue,
|
|
1121
1122
|
trigger: "click",
|
|
1122
1123
|
anchor: n.anchor,
|
|
@@ -1128,22 +1129,22 @@ const _t = {
|
|
|
1128
1129
|
spy: n.spy
|
|
1129
1130
|
}, {
|
|
1130
1131
|
default: E(() => [
|
|
1131
|
-
n.title || e.$slots.header ? (r(), f("h3",
|
|
1132
|
-
|
|
1133
|
-
|
|
1132
|
+
n.title || e.$slots.header ? (r(), f("h3", zt, [
|
|
1133
|
+
N(V(n.title) + " ", 1),
|
|
1134
|
+
q(e.$slots, "header")
|
|
1134
1135
|
])) : b("", !0),
|
|
1135
|
-
n.text || e.$slots.body ? (r(), f("div",
|
|
1136
|
+
n.text || e.$slots.body ? (r(), f("div", Qt, [
|
|
1136
1137
|
n.html ? (r(), f("span", {
|
|
1137
1138
|
key: 0,
|
|
1138
1139
|
innerHTML: n.text
|
|
1139
|
-
}, null, 8,
|
|
1140
|
-
|
|
1140
|
+
}, null, 8, At)) : (r(), f("span", Ot, V(n.text), 1)),
|
|
1141
|
+
q(e.$slots, "body")
|
|
1141
1142
|
])) : b("", !0)
|
|
1142
1143
|
]),
|
|
1143
1144
|
_: 3
|
|
1144
1145
|
}, 8, ["model-value", "anchor", "arrow", "attach", "disabled", "placement", "spy"]));
|
|
1145
1146
|
}
|
|
1146
|
-
}),
|
|
1147
|
+
}), Pt = k(Ft), Mt = {
|
|
1147
1148
|
mounted(t, n) {
|
|
1148
1149
|
t.clickOutsideEvent = function(e) {
|
|
1149
1150
|
const o = e.target;
|
|
@@ -1153,19 +1154,19 @@ const _t = {
|
|
|
1153
1154
|
unmounted(t) {
|
|
1154
1155
|
document.removeEventListener("click", t.clickOutsideEvent);
|
|
1155
1156
|
}
|
|
1156
|
-
},
|
|
1157
|
+
}, Rt = {
|
|
1157
1158
|
key: 1,
|
|
1158
1159
|
class: "q-select__placeholder"
|
|
1159
|
-
},
|
|
1160
|
+
}, Ht = {
|
|
1160
1161
|
placeholder: "Choose..."
|
|
1161
|
-
},
|
|
1162
|
+
}, Ut = {
|
|
1162
1163
|
chevron: {
|
|
1163
1164
|
name: "chevron-down"
|
|
1164
1165
|
},
|
|
1165
1166
|
clear: {
|
|
1166
1167
|
name: "close"
|
|
1167
1168
|
}
|
|
1168
|
-
},
|
|
1169
|
+
}, Nt = /* @__PURE__ */ _({
|
|
1169
1170
|
__name: "QSelect",
|
|
1170
1171
|
props: {
|
|
1171
1172
|
modelValue: { type: [String, Number, Boolean, Symbol], default: void 0 },
|
|
@@ -1173,50 +1174,50 @@ const _t = {
|
|
|
1173
1174
|
readonly: { type: Boolean },
|
|
1174
1175
|
disabled: { type: Boolean, default: !1 },
|
|
1175
1176
|
loading: { type: Boolean, default: !1 },
|
|
1176
|
-
icons: { default: () =>
|
|
1177
|
+
icons: { default: () => Ut },
|
|
1177
1178
|
items: {},
|
|
1178
1179
|
groups: { default: () => [] },
|
|
1179
1180
|
itemValue: { default: "key" },
|
|
1180
1181
|
itemLabel: { default: "label" },
|
|
1181
1182
|
size: { default: "medium" },
|
|
1182
|
-
texts: { default: () =>
|
|
1183
|
+
texts: { default: () => Ht }
|
|
1183
1184
|
},
|
|
1184
1185
|
emits: ["update:modelValue", "before-show", "before-hide", "show", "hide"],
|
|
1185
1186
|
setup(t, { emit: n }) {
|
|
1186
|
-
const e = t, o =
|
|
1187
|
+
const e = t, o = I(e.modelValue), a = I(!1), s = I(""), l = I(null), c = I(null), i = I(null), p = y(
|
|
1187
1188
|
() => {
|
|
1188
1189
|
var u;
|
|
1189
|
-
return (u = e.items) == null ? void 0 : u.find((
|
|
1190
|
+
return (u = e.items) == null ? void 0 : u.find((L) => L[e.itemValue] === o.value);
|
|
1190
1191
|
}
|
|
1191
|
-
),
|
|
1192
|
+
), $ = y(
|
|
1192
1193
|
() => p.value ? p.value[e.itemLabel] : ""
|
|
1193
1194
|
), m = y(
|
|
1194
1195
|
() => e.clearable && !e.readonly && !e.disabled && !e.loading
|
|
1195
1196
|
);
|
|
1196
|
-
function
|
|
1197
|
-
m.value && (o.value = void 0, n("update:modelValue", o.value),
|
|
1197
|
+
function x() {
|
|
1198
|
+
m.value && (o.value = void 0, n("update:modelValue", o.value), z());
|
|
1198
1199
|
}
|
|
1199
1200
|
function T() {
|
|
1200
|
-
e.readonly || e.disabled || (a.value ?
|
|
1201
|
+
e.readonly || e.disabled || (a.value ? z() : F());
|
|
1201
1202
|
}
|
|
1202
|
-
function
|
|
1203
|
-
var
|
|
1204
|
-
(
|
|
1203
|
+
function O(u) {
|
|
1204
|
+
var L;
|
|
1205
|
+
(L = l.value) != null && L.$el.contains(u.target) || z();
|
|
1205
1206
|
}
|
|
1206
|
-
function
|
|
1207
|
+
function F() {
|
|
1207
1208
|
a.value || (n("before-show"), a.value = !0);
|
|
1208
1209
|
}
|
|
1209
|
-
function
|
|
1210
|
+
function z() {
|
|
1210
1211
|
a.value && (n("before-hide"), a.value = !1);
|
|
1211
1212
|
}
|
|
1212
1213
|
let d;
|
|
1213
|
-
function
|
|
1214
|
+
function S(u) {
|
|
1214
1215
|
if (!(!u.key || e.readonly || e.disabled)) {
|
|
1215
|
-
if (window.clearTimeout(d), ["Enter", " ", "ArrowDown", "ArrowUp", "Home", "End"].includes(u.key) && (u.preventDefault(), u.stopPropagation()), ["Enter", " "].includes(u.key) && (a.value = !0), ["Escape", "Tab"].includes(u.key) && (a.value ? a.value = !1 : e.clearable && u.key === "Escape" &&
|
|
1216
|
+
if (window.clearTimeout(d), ["Enter", " ", "ArrowDown", "ArrowUp", "Home", "End"].includes(u.key) && (u.preventDefault(), u.stopPropagation()), ["Enter", " "].includes(u.key) && (a.value = !0), ["Escape", "Tab"].includes(u.key) && (a.value ? a.value = !1 : e.clearable && u.key === "Escape" && x()), u.key === "Delete" && e.clearable && x(), /^[a-z]$/i.test(u.key)) {
|
|
1216
1217
|
s.value += u.key.toLowerCase();
|
|
1217
|
-
for (let
|
|
1218
|
-
if (e.items[
|
|
1219
|
-
|
|
1218
|
+
for (let L = 0; L < e.items.length; L++)
|
|
1219
|
+
if (e.items[L][e.itemLabel].toLowerCase().startsWith(s.value)) {
|
|
1220
|
+
B(L);
|
|
1220
1221
|
break;
|
|
1221
1222
|
}
|
|
1222
1223
|
}
|
|
@@ -1229,26 +1230,26 @@ const _t = {
|
|
|
1229
1230
|
var u;
|
|
1230
1231
|
(u = c.value) == null || u.$el.focus(), n("show");
|
|
1231
1232
|
}
|
|
1232
|
-
function
|
|
1233
|
+
function D() {
|
|
1233
1234
|
h(), n("hide");
|
|
1234
1235
|
}
|
|
1235
1236
|
function h() {
|
|
1236
1237
|
var u;
|
|
1237
1238
|
(u = l.value) == null || u.$el.focus();
|
|
1238
1239
|
}
|
|
1239
|
-
function
|
|
1240
|
-
var
|
|
1241
|
-
(
|
|
1240
|
+
function B(u) {
|
|
1241
|
+
var L;
|
|
1242
|
+
(L = c.value) == null || L.focusItem(u);
|
|
1242
1243
|
}
|
|
1243
|
-
return
|
|
1244
|
+
return Q(
|
|
1244
1245
|
() => e.modelValue,
|
|
1245
1246
|
(u) => {
|
|
1246
1247
|
o.value = u;
|
|
1247
1248
|
}
|
|
1248
|
-
), (u,
|
|
1249
|
+
), (u, L) => {
|
|
1249
1250
|
var j, ae;
|
|
1250
|
-
return r(), f(
|
|
1251
|
-
|
|
1251
|
+
return r(), f(A, null, [
|
|
1252
|
+
H(g(pt), {
|
|
1252
1253
|
ref_key: "inputRef",
|
|
1253
1254
|
ref: l,
|
|
1254
1255
|
role: "combobox",
|
|
@@ -1267,19 +1268,19 @@ const _t = {
|
|
|
1267
1268
|
"aria-haspopup": "listbox",
|
|
1268
1269
|
size: e.size,
|
|
1269
1270
|
onClick: T,
|
|
1270
|
-
onKeydown:
|
|
1271
|
-
},
|
|
1271
|
+
onKeydown: R(S, ["stop"])
|
|
1272
|
+
}, Ie({
|
|
1272
1273
|
append: E(() => [
|
|
1273
|
-
m.value && o.value ? (r(),
|
|
1274
|
+
m.value && o.value ? (r(), w(g(U), K({ key: 0 }, e.icons.clear, {
|
|
1274
1275
|
class: "q-select__clear",
|
|
1275
|
-
onClick:
|
|
1276
|
+
onClick: R(x, ["stop", "prevent"])
|
|
1276
1277
|
}), null, 16, ["onClick"])) : b("", !0),
|
|
1277
|
-
!e.readonly && !e.disabled ? (r(),
|
|
1278
|
+
!e.readonly && !e.disabled ? (r(), w(g(U), K({ key: 1 }, e.icons.chevron, { class: "q-select__chevron" }), null, 16)) : b("", !0)
|
|
1278
1279
|
]),
|
|
1279
1280
|
default: E(() => [
|
|
1280
|
-
o.value ? (r(), f(
|
|
1281
|
-
|
|
1282
|
-
], 64)) : (r(), f("span",
|
|
1281
|
+
o.value ? (r(), f(A, { key: 0 }, [
|
|
1282
|
+
N(V($.value), 1)
|
|
1283
|
+
], 64)) : (r(), f("span", Rt, V(u.texts.placeholder), 1))
|
|
1283
1284
|
]),
|
|
1284
1285
|
_: 2
|
|
1285
1286
|
}, [
|
|
@@ -1288,13 +1289,13 @@ const _t = {
|
|
|
1288
1289
|
fn: E(() => {
|
|
1289
1290
|
var G;
|
|
1290
1291
|
return [
|
|
1291
|
-
|
|
1292
|
+
H(g(U), ye(Ee((G = p.value) == null ? void 0 : G.icon)), null, 16)
|
|
1292
1293
|
];
|
|
1293
1294
|
}),
|
|
1294
1295
|
key: "0"
|
|
1295
1296
|
} : void 0
|
|
1296
1297
|
]), 1032, ["class", "disabled", "aria-expanded", "size", "onKeydown"]),
|
|
1297
|
-
|
|
1298
|
+
H(g(oe), {
|
|
1298
1299
|
"model-value": a.value,
|
|
1299
1300
|
spy: "",
|
|
1300
1301
|
trigger: "manual",
|
|
@@ -1303,38 +1304,38 @@ const _t = {
|
|
|
1303
1304
|
offset: 2,
|
|
1304
1305
|
anchor: (ae = l.value) == null ? void 0 : ae.$el,
|
|
1305
1306
|
onEnter: v,
|
|
1306
|
-
onLeave:
|
|
1307
|
+
onLeave: D
|
|
1307
1308
|
}, {
|
|
1308
1309
|
default: E(() => [
|
|
1309
|
-
|
|
1310
|
+
Te((r(), f("div", {
|
|
1310
1311
|
ref_key: "contentRef",
|
|
1311
1312
|
ref: i,
|
|
1312
1313
|
class: "q-select__body"
|
|
1313
1314
|
}, [
|
|
1314
|
-
|
|
1315
|
-
e.loading ? (r(),
|
|
1315
|
+
q(u.$slots, "body.prepend"),
|
|
1316
|
+
e.loading ? (r(), w(g(we), {
|
|
1316
1317
|
key: 0,
|
|
1317
1318
|
class: "q-select__loader",
|
|
1318
1319
|
size: 24
|
|
1319
|
-
})) : (r(),
|
|
1320
|
+
})) : (r(), w(g(qt), {
|
|
1320
1321
|
key: 1,
|
|
1321
1322
|
ref_key: "listRef",
|
|
1322
1323
|
ref: c,
|
|
1323
1324
|
class: "q-select__items",
|
|
1324
1325
|
modelValue: o.value,
|
|
1325
1326
|
"onUpdate:modelValue": [
|
|
1326
|
-
|
|
1327
|
-
|
|
1327
|
+
L[0] || (L[0] = (G) => o.value = G),
|
|
1328
|
+
z
|
|
1328
1329
|
],
|
|
1329
1330
|
items: e.items,
|
|
1330
1331
|
groups: u.groups,
|
|
1331
1332
|
"item-label": e.itemLabel,
|
|
1332
1333
|
"item-value": e.itemValue,
|
|
1333
|
-
onKeydown:
|
|
1334
|
+
onKeydown: R(S, ["stop"])
|
|
1334
1335
|
}, null, 8, ["modelValue", "items", "groups", "item-label", "item-value", "onKeydown"])),
|
|
1335
|
-
|
|
1336
|
+
q(u.$slots, "body.append")
|
|
1336
1337
|
])), [
|
|
1337
|
-
[g(
|
|
1338
|
+
[g(Mt), O]
|
|
1338
1339
|
])
|
|
1339
1340
|
]),
|
|
1340
1341
|
_: 3
|
|
@@ -1342,7 +1343,7 @@ const _t = {
|
|
|
1342
1343
|
], 64);
|
|
1343
1344
|
};
|
|
1344
1345
|
}
|
|
1345
|
-
}),
|
|
1346
|
+
}), en = k(Nt), Kt = ["innerHTML"], Wt = { key: 1 }, Gt = /* @__PURE__ */ _({
|
|
1346
1347
|
__name: "QTooltip",
|
|
1347
1348
|
props: {
|
|
1348
1349
|
modelValue: { type: Boolean },
|
|
@@ -1359,7 +1360,7 @@ const _t = {
|
|
|
1359
1360
|
},
|
|
1360
1361
|
setup(t) {
|
|
1361
1362
|
const n = t;
|
|
1362
|
-
return (e, o) => (r(),
|
|
1363
|
+
return (e, o) => (r(), w(g(oe), {
|
|
1363
1364
|
"model-value": n.modelValue,
|
|
1364
1365
|
anchor: n.anchor,
|
|
1365
1366
|
appearance: n.appearance,
|
|
@@ -1375,34 +1376,34 @@ const _t = {
|
|
|
1375
1376
|
n.html ? (r(), f("span", {
|
|
1376
1377
|
key: 0,
|
|
1377
1378
|
innerHTML: n.text
|
|
1378
|
-
}, null, 8,
|
|
1379
|
+
}, null, 8, Kt)) : (r(), f("span", Wt, V(n.text), 1))
|
|
1379
1380
|
]),
|
|
1380
1381
|
_: 1
|
|
1381
1382
|
}, 8, ["model-value", "anchor", "appearance", "arrow", "attach", "delay", "disabled", "placement", "trigger"]));
|
|
1382
1383
|
}
|
|
1383
|
-
});
|
|
1384
|
+
}), tn = k(Gt);
|
|
1384
1385
|
export {
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1386
|
+
Xe as QButton,
|
|
1387
|
+
je as QButtonGroup,
|
|
1388
|
+
jt as QButtonToggle,
|
|
1389
|
+
U as QIcon,
|
|
1390
|
+
rt as QIconFont,
|
|
1391
|
+
it as QIconImg,
|
|
1392
|
+
ct as QIconSvg,
|
|
1393
|
+
pt as QInput,
|
|
1394
|
+
Jt as QLineLoader,
|
|
1395
|
+
qt as QList,
|
|
1396
|
+
Dt as QListItem,
|
|
1397
|
+
It as QListItemGroup,
|
|
1397
1398
|
oe as QOverlay,
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1399
|
+
Pt as QPopover,
|
|
1400
|
+
en as QSelect,
|
|
1401
|
+
we as QSpinnerLoader,
|
|
1402
|
+
tn as QTooltip,
|
|
1403
|
+
Mt as clickOutside,
|
|
1404
|
+
Zt as createFramework,
|
|
1405
|
+
ze as defaultDarkColorScheme,
|
|
1405
1406
|
ie as defaultLightColorScheme,
|
|
1406
|
-
|
|
1407
|
+
Xt as useTheme
|
|
1407
1408
|
};
|
|
1408
1409
|
//# sourceMappingURL=ui.esm.js.map
|