@quidgest/ui 0.5.15 → 0.5.16
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/ui.esm.js +298 -288
- 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 +8 -8
- 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,18 +1,18 @@
|
|
|
1
|
-
import { getCurrentInstance as
|
|
2
|
-
function
|
|
1
|
+
import { getCurrentInstance as he, computed as v, ref as I, provide as Le, inject as ye, watch as C, defineComponent as k, openBlock as r, createElementBlock as f, normalizeStyle as K, createElementVNode as N, normalizeClass as V, withModifiers as R, createVNode as H, unref as g, createCommentVNode as b, Fragment as O, createTextVNode as X, toDisplayString as A, renderSlot as x, toRef as ee, createBlock as $, withCtx as T, renderList as ne, resolveDynamicComponent as ve, h as re, normalizeProps as ge, mergeProps as Z, reactive as xe, onBeforeUnmount as qe, onMounted as Ie, Teleport as De, Transition as Te, nextTick as ie, useAttrs as Ee, createSlots as Ce, guardReactiveProps as Ve, withDirectives as Ae } from "vue";
|
|
2
|
+
function oe(t) {
|
|
3
3
|
return t == null ? !0 : typeof t == "string" || Array.isArray(t) ? t.length === 0 : typeof t == "object" ? Object.keys(t).length === 0 : !1;
|
|
4
4
|
}
|
|
5
|
-
function
|
|
5
|
+
function ce(t) {
|
|
6
6
|
return t !== null && typeof t == "object" && !Array.isArray(t);
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function be(t = {}, n = {}) {
|
|
9
9
|
const e = {};
|
|
10
10
|
for (const o in t)
|
|
11
11
|
e[o] = t[o];
|
|
12
12
|
for (const o in n) {
|
|
13
13
|
const s = t[o], a = n[o];
|
|
14
|
-
if (
|
|
15
|
-
e[o] =
|
|
14
|
+
if (ce(s) && ce(a)) {
|
|
15
|
+
e[o] = be(
|
|
16
16
|
s,
|
|
17
17
|
a
|
|
18
18
|
);
|
|
@@ -22,33 +22,33 @@ function ge(t = {}, n = {}) {
|
|
|
22
22
|
}
|
|
23
23
|
return e;
|
|
24
24
|
}
|
|
25
|
-
const
|
|
25
|
+
const se = "q-defaults";
|
|
26
26
|
function ze() {
|
|
27
|
-
const t =
|
|
27
|
+
const t = he();
|
|
28
28
|
if (!t)
|
|
29
29
|
throw new Error("[Quidgest UI] useDefaults must be called from inside a setup function");
|
|
30
30
|
const n = t.type.name ?? t.type.__name;
|
|
31
31
|
if (!n)
|
|
32
32
|
throw new Error("[Quidgest UI] Could not determine component name");
|
|
33
|
-
const e =
|
|
34
|
-
return
|
|
33
|
+
const e = _e();
|
|
34
|
+
return v(() => {
|
|
35
35
|
var o;
|
|
36
36
|
return (o = e.value) == null ? void 0 : o[n];
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
39
|
function Qe(t) {
|
|
40
|
-
if (
|
|
40
|
+
if (oe(t))
|
|
41
41
|
return;
|
|
42
|
-
const n =
|
|
43
|
-
Le(
|
|
42
|
+
const n = _e(), e = I(t), o = v(() => oe(e.value) ? n.value : be(n.value, e.value));
|
|
43
|
+
Le(se, o);
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
const t =
|
|
45
|
+
function _e() {
|
|
46
|
+
const t = ye(se, void 0);
|
|
47
47
|
if (!t)
|
|
48
48
|
throw new Error("[Quidgest UI] Could not find defaults instance");
|
|
49
49
|
return t;
|
|
50
50
|
}
|
|
51
|
-
const
|
|
51
|
+
const ue = {
|
|
52
52
|
primary: "#00a1f8",
|
|
53
53
|
primaryLight: "#e5f6ff",
|
|
54
54
|
primaryDark: "#0079ba",
|
|
@@ -109,7 +109,7 @@ const ce = {
|
|
|
109
109
|
onDanger: "#fff",
|
|
110
110
|
onInfo: "#fff"
|
|
111
111
|
};
|
|
112
|
-
function
|
|
112
|
+
function ke(t) {
|
|
113
113
|
if (!/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/.test(t))
|
|
114
114
|
throw new Error("Invalid color format");
|
|
115
115
|
t.length === 4 && (t = "#" + t[1] + t[1] + t[2] + t[2] + t[3] + t[3]);
|
|
@@ -121,22 +121,22 @@ function Fe(t, n) {
|
|
|
121
121
|
throw new Error("Amount must be in the range [0, 100]");
|
|
122
122
|
if (n === 0)
|
|
123
123
|
return t;
|
|
124
|
-
const e =
|
|
125
|
-
return e.l = e.l + o * (100 - e.l),
|
|
124
|
+
const e = we(t), o = n / 100;
|
|
125
|
+
return e.l = e.l + o * (100 - e.l), $e(e);
|
|
126
126
|
}
|
|
127
127
|
function Me(t, n) {
|
|
128
128
|
if (n < 0 || n > 100)
|
|
129
129
|
throw new Error("Amount must be in the range [0, 100]");
|
|
130
130
|
if (n === 0)
|
|
131
131
|
return t;
|
|
132
|
-
const e =
|
|
133
|
-
return e.l = e.l - o * e.l,
|
|
132
|
+
const e = we(t), o = n / 100;
|
|
133
|
+
return e.l = e.l - o * e.l, $e(e);
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function de(t) {
|
|
136
136
|
const n = t.r.toString(16).padStart(2, "0"), e = t.g.toString(16).padStart(2, "0"), o = t.b.toString(16).padStart(2, "0");
|
|
137
137
|
return `#${n}${e}${o}`;
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function we(t) {
|
|
140
140
|
const n = t.r / 255, e = t.g / 255, o = t.b / 255, s = Math.max(n, e, o), a = Math.min(n, e, o);
|
|
141
141
|
let l = 0, c;
|
|
142
142
|
const i = (s + a) / 2;
|
|
@@ -163,14 +163,14 @@ function ke(t) {
|
|
|
163
163
|
l: Math.round(i * 100)
|
|
164
164
|
};
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function $e(t) {
|
|
167
167
|
const n = t.h / 360, e = t.s / 100, o = t.l / 100;
|
|
168
168
|
let s, a, l;
|
|
169
169
|
if (e === 0)
|
|
170
170
|
s = a = l = o;
|
|
171
171
|
else {
|
|
172
172
|
const c = o < 0.5 ? o * (1 + e) : o + e - o * e, i = 2 * o - c;
|
|
173
|
-
s =
|
|
173
|
+
s = te(i, c, n + 1 / 3), a = te(i, c, n), l = te(i, c, n - 1 / 3);
|
|
174
174
|
}
|
|
175
175
|
return {
|
|
176
176
|
r: Math.round(s * 255),
|
|
@@ -178,12 +178,12 @@ function we(t) {
|
|
|
178
178
|
b: Math.round(l * 255)
|
|
179
179
|
};
|
|
180
180
|
}
|
|
181
|
-
function
|
|
181
|
+
function te(t, n, e) {
|
|
182
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;
|
|
183
183
|
}
|
|
184
184
|
const j = "q-theme";
|
|
185
185
|
function tn() {
|
|
186
|
-
const t =
|
|
186
|
+
const t = ye(j);
|
|
187
187
|
if (!t)
|
|
188
188
|
throw new Error("[Quidgest UI] Could not find theme instance");
|
|
189
189
|
return t;
|
|
@@ -192,14 +192,14 @@ function Re(t, n) {
|
|
|
192
192
|
let e = null;
|
|
193
193
|
if (n)
|
|
194
194
|
for (const o of n.themes) {
|
|
195
|
-
const s = o.mode === "light" ?
|
|
195
|
+
const s = o.mode === "light" ? ue : Oe;
|
|
196
196
|
if (o.colors) {
|
|
197
197
|
let a;
|
|
198
198
|
for (a in o.colors) {
|
|
199
199
|
const l = o.colors[a];
|
|
200
200
|
if (l && !a.startsWith("on") && !a.endsWith("Light") && !a.endsWith("Dark")) {
|
|
201
|
-
const c =
|
|
202
|
-
i in o.colors || (o.colors[i] =
|
|
201
|
+
const c = ke(l), i = `${a}Light`, h = `${a}Dark`;
|
|
202
|
+
i in o.colors || (o.colors[i] = de(Fe(c, 85))), h in o.colors || (o.colors[h] = de(Me(c, 25)));
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
}
|
|
@@ -210,18 +210,18 @@ function Re(t, n) {
|
|
|
210
210
|
e = {
|
|
211
211
|
name: o,
|
|
212
212
|
mode: "light",
|
|
213
|
-
colors:
|
|
213
|
+
colors: ue
|
|
214
214
|
}, n = {
|
|
215
215
|
defaultTheme: o,
|
|
216
216
|
themes: [e]
|
|
217
217
|
};
|
|
218
218
|
}
|
|
219
219
|
if (e) {
|
|
220
|
-
const o =
|
|
220
|
+
const o = I({
|
|
221
221
|
activeTheme: e.name,
|
|
222
222
|
themes: n.themes
|
|
223
223
|
});
|
|
224
|
-
|
|
224
|
+
C(
|
|
225
225
|
() => o.value.activeTheme,
|
|
226
226
|
(s) => {
|
|
227
227
|
const a = o.value.themes.find((l) => l.name === s);
|
|
@@ -244,16 +244,16 @@ function Ue(t) {
|
|
|
244
244
|
for (o in t) {
|
|
245
245
|
const s = t[o];
|
|
246
246
|
if (s) {
|
|
247
|
-
e += ` ${
|
|
247
|
+
e += ` ${fe(o)}: ${s};
|
|
248
248
|
`;
|
|
249
|
-
const a =
|
|
250
|
-
e += ` ${
|
|
249
|
+
const a = ke(s);
|
|
250
|
+
e += ` ${fe(o)}-rgb: ${a.r} ${a.g} ${a.b};
|
|
251
251
|
`;
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
254
|
e += "}", n.textContent = e;
|
|
255
255
|
}
|
|
256
|
-
function
|
|
256
|
+
function fe(t) {
|
|
257
257
|
return t ? `--q-theme-${t.replace(/([A-Z])/g, "-$1").replace(/^-/, "").toLowerCase()}` : "";
|
|
258
258
|
}
|
|
259
259
|
function nn(t = {}) {
|
|
@@ -265,11 +265,11 @@ function nn(t = {}) {
|
|
|
265
265
|
for (const l in s)
|
|
266
266
|
e.directive(l, s[l]);
|
|
267
267
|
const a = t.defaults || {};
|
|
268
|
-
e.provide(
|
|
268
|
+
e.provide(se, I(a)), Re(e, t.themes);
|
|
269
269
|
} };
|
|
270
270
|
}
|
|
271
|
-
const Ne = /* @__PURE__ */
|
|
272
|
-
/* @__PURE__ */
|
|
271
|
+
const Ne = /* @__PURE__ */ N("svg", { viewBox: "25 25 50 50" }, [
|
|
272
|
+
/* @__PURE__ */ N("circle", {
|
|
273
273
|
class: "path",
|
|
274
274
|
cx: "50",
|
|
275
275
|
cy: "50",
|
|
@@ -287,12 +287,12 @@ const Ne = /* @__PURE__ */ K("svg", { viewBox: "25 25 50 50" }, [
|
|
|
287
287
|
size: { default: 48 }
|
|
288
288
|
},
|
|
289
289
|
setup(t) {
|
|
290
|
-
const n = t, e =
|
|
290
|
+
const n = t, e = v(() => ({
|
|
291
291
|
"font-size": n.size !== 48 ? `${n.size}px` : void 0
|
|
292
292
|
}));
|
|
293
293
|
return (o, s) => (r(), f("div", {
|
|
294
294
|
class: "q-spinner-loader",
|
|
295
|
-
style:
|
|
295
|
+
style: K(e.value)
|
|
296
296
|
}, Ke, 4));
|
|
297
297
|
}
|
|
298
298
|
});
|
|
@@ -304,9 +304,9 @@ function w(t) {
|
|
|
304
304
|
const n = t.setup;
|
|
305
305
|
return n && (t.setup = (e, o) => {
|
|
306
306
|
const s = ze();
|
|
307
|
-
if (
|
|
307
|
+
if (oe(s.value))
|
|
308
308
|
return n(e, o);
|
|
309
|
-
const a =
|
|
309
|
+
const a = he();
|
|
310
310
|
if (a === null)
|
|
311
311
|
return n(e, o);
|
|
312
312
|
const l = new Proxy(e, {
|
|
@@ -319,7 +319,7 @@ function w(t) {
|
|
|
319
319
|
return n(l, o);
|
|
320
320
|
}), t;
|
|
321
321
|
}
|
|
322
|
-
const
|
|
322
|
+
const Se = w(We), Ye = ["disabled", "onClick"], Xe = {
|
|
323
323
|
key: 0,
|
|
324
324
|
class: "q-btn__spinner"
|
|
325
325
|
}, Ze = { class: "q-btn__content" }, je = /* @__PURE__ */ k({
|
|
@@ -338,12 +338,12 @@ const $e = w(We), Ye = ["disabled", "onClick"], Xe = {
|
|
|
338
338
|
},
|
|
339
339
|
emits: ["click"],
|
|
340
340
|
setup(t, { emit: n }) {
|
|
341
|
-
const e = t, o =
|
|
341
|
+
const e = t, o = v(() => e.disabled || e.loading);
|
|
342
342
|
function s(l) {
|
|
343
343
|
o.value || n("click", l);
|
|
344
344
|
}
|
|
345
|
-
const a =
|
|
346
|
-
const l =
|
|
345
|
+
const a = v(() => {
|
|
346
|
+
const l = v(() => e.bStyle ? `q-btn--${e.bStyle}` : void 0), c = v(() => e.size !== "regular" ? `q-btn--${e.size}` : void 0);
|
|
347
347
|
return [
|
|
348
348
|
"q-btn",
|
|
349
349
|
l.value,
|
|
@@ -359,20 +359,20 @@ const $e = w(We), Ye = ["disabled", "onClick"], Xe = {
|
|
|
359
359
|
});
|
|
360
360
|
return (l, c) => (r(), f("button", {
|
|
361
361
|
type: "button",
|
|
362
|
-
class:
|
|
362
|
+
class: V(a.value),
|
|
363
363
|
disabled: o.value,
|
|
364
|
-
onClick:
|
|
364
|
+
onClick: R(s, ["stop", "prevent"])
|
|
365
365
|
}, [
|
|
366
366
|
l.loading ? (r(), f("div", Xe, [
|
|
367
|
-
|
|
367
|
+
H(g(Se), { size: 23 })
|
|
368
368
|
])) : b("", !0),
|
|
369
|
-
|
|
370
|
-
l.iconOnRight ? (r(), f(
|
|
371
|
-
X(
|
|
369
|
+
N("span", Ze, [
|
|
370
|
+
l.iconOnRight ? (r(), f(O, { key: 0 }, [
|
|
371
|
+
X(A(e.label), 1)
|
|
372
372
|
], 64)) : b("", !0),
|
|
373
|
-
|
|
374
|
-
l.iconOnRight ? b("", !0) : (r(), f(
|
|
375
|
-
X(
|
|
373
|
+
x(l.$slots, "default"),
|
|
374
|
+
l.iconOnRight ? b("", !0) : (r(), f(O, { key: 1 }, [
|
|
375
|
+
X(A(e.label), 1)
|
|
376
376
|
], 64))
|
|
377
377
|
])
|
|
378
378
|
], 10, Ye));
|
|
@@ -389,22 +389,22 @@ const $e = w(We), Ye = ["disabled", "onClick"], Xe = {
|
|
|
389
389
|
const n = t;
|
|
390
390
|
Qe({
|
|
391
391
|
QButton: {
|
|
392
|
-
bStyle:
|
|
393
|
-
disabled:
|
|
394
|
-
borderless:
|
|
392
|
+
bStyle: ee(n, "bStyle"),
|
|
393
|
+
disabled: ee(n, "disabled"),
|
|
394
|
+
borderless: ee(n, "borderless"),
|
|
395
395
|
elevated: !1
|
|
396
396
|
}
|
|
397
397
|
});
|
|
398
|
-
const e =
|
|
398
|
+
const e = v(() => [
|
|
399
399
|
"q-btn-group",
|
|
400
400
|
{
|
|
401
401
|
"q-btn-group--elevated": n.elevated
|
|
402
402
|
}
|
|
403
403
|
]);
|
|
404
404
|
return (o, s) => (r(), f("div", {
|
|
405
|
-
class:
|
|
405
|
+
class: V(e.value)
|
|
406
406
|
}, [
|
|
407
|
-
|
|
407
|
+
x(o.$slots, "default")
|
|
408
408
|
], 2));
|
|
409
409
|
}
|
|
410
410
|
}), et = w(Pe), tt = /* @__PURE__ */ k({
|
|
@@ -419,12 +419,12 @@ const $e = w(We), Ye = ["disabled", "onClick"], Xe = {
|
|
|
419
419
|
},
|
|
420
420
|
emits: ["update:modelValue"],
|
|
421
421
|
setup(t, { emit: n }) {
|
|
422
|
-
const e = t, o =
|
|
423
|
-
|
|
422
|
+
const e = t, o = I(e.modelValue);
|
|
423
|
+
C(
|
|
424
424
|
() => e.modelValue,
|
|
425
425
|
(l) => o.value = l
|
|
426
426
|
);
|
|
427
|
-
const s =
|
|
427
|
+
const s = v({
|
|
428
428
|
get() {
|
|
429
429
|
return o.value;
|
|
430
430
|
},
|
|
@@ -435,22 +435,22 @@ const $e = w(We), Ye = ["disabled", "onClick"], Xe = {
|
|
|
435
435
|
function a(l) {
|
|
436
436
|
s.value === l.key && !e.mandatory ? s.value = void 0 : s.value = l.key;
|
|
437
437
|
}
|
|
438
|
-
return (l, c) => (r(),
|
|
438
|
+
return (l, c) => (r(), $(g(et), {
|
|
439
439
|
"b-style": "secondary",
|
|
440
440
|
disabled: e.disabled,
|
|
441
441
|
borderless: e.borderless,
|
|
442
442
|
elevated: e.elevated
|
|
443
443
|
}, {
|
|
444
|
-
default:
|
|
445
|
-
(r(!0), f(
|
|
444
|
+
default: T(() => [
|
|
445
|
+
(r(!0), f(O, null, ne(e.options, (i) => (r(), $(g(Je), {
|
|
446
446
|
key: i.key,
|
|
447
447
|
title: i.title,
|
|
448
448
|
label: i.label,
|
|
449
449
|
active: s.value === i.key,
|
|
450
450
|
onClick: (h) => a(i)
|
|
451
451
|
}, {
|
|
452
|
-
default:
|
|
453
|
-
|
|
452
|
+
default: T(() => [
|
|
453
|
+
x(l.$slots, i.key)
|
|
454
454
|
]),
|
|
455
455
|
_: 2
|
|
456
456
|
}, 1032, ["title", "label", "active", "onClick"]))), 128))
|
|
@@ -466,7 +466,7 @@ const $e = w(We), Ye = ["disabled", "onClick"], Xe = {
|
|
|
466
466
|
size: { default: void 0 }
|
|
467
467
|
},
|
|
468
468
|
setup(t) {
|
|
469
|
-
const n = t, e =
|
|
469
|
+
const n = t, e = v(() => {
|
|
470
470
|
switch (n.type) {
|
|
471
471
|
case "svg":
|
|
472
472
|
return ft;
|
|
@@ -478,7 +478,7 @@ const $e = w(We), Ye = ["disabled", "onClick"], Xe = {
|
|
|
478
478
|
return;
|
|
479
479
|
}
|
|
480
480
|
});
|
|
481
|
-
return (o, s) => n.icon ? (r(),
|
|
481
|
+
return (o, s) => n.icon ? (r(), $(ve(e.value), {
|
|
482
482
|
key: 0,
|
|
483
483
|
icon: n.icon,
|
|
484
484
|
size: n.size
|
|
@@ -493,13 +493,13 @@ const $e = w(We), Ye = ["disabled", "onClick"], Xe = {
|
|
|
493
493
|
size: { default: void 0 }
|
|
494
494
|
},
|
|
495
495
|
setup(t) {
|
|
496
|
-
const n = t, e =
|
|
496
|
+
const n = t, e = v(() => n.variant ? `${n.library}-${n.variant}` : n.library), o = v(() => n.library && n.icon ? `${n.library}-${n.icon}` : n.icon), s = v(() => ({
|
|
497
497
|
"font-size": n.size !== void 0 ? `${n.size}px` : void 0
|
|
498
498
|
}));
|
|
499
499
|
return (a, l) => o.value ? (r(), f("i", {
|
|
500
500
|
key: 0,
|
|
501
|
-
class:
|
|
502
|
-
style:
|
|
501
|
+
class: V(["q-icon", "q-icon__font", e.value, o.value]),
|
|
502
|
+
style: K(s.value)
|
|
503
503
|
}, null, 6)) : b("", !0);
|
|
504
504
|
}
|
|
505
505
|
}), st = ["src"], at = /* @__PURE__ */ k({
|
|
@@ -509,17 +509,17 @@ const $e = w(We), Ye = ["disabled", "onClick"], Xe = {
|
|
|
509
509
|
size: {}
|
|
510
510
|
},
|
|
511
511
|
setup(t) {
|
|
512
|
-
const n = t, e =
|
|
512
|
+
const n = t, e = v(() => ({
|
|
513
513
|
"font-size": n.size !== void 0 ? `${n.size}px` : void 0
|
|
514
514
|
}));
|
|
515
515
|
return (o, s) => n.icon ? (r(), f("img", {
|
|
516
516
|
key: 0,
|
|
517
517
|
src: n.icon,
|
|
518
518
|
class: "q-icon",
|
|
519
|
-
style:
|
|
519
|
+
style: K(e.value)
|
|
520
520
|
}, null, 12, st)) : b("", !0);
|
|
521
521
|
}
|
|
522
|
-
}),
|
|
522
|
+
}), M = {}, lt = k({
|
|
523
523
|
name: "InlineSvg",
|
|
524
524
|
emits: ["loaded", "unloaded", "error"],
|
|
525
525
|
inheritAttrs: !1,
|
|
@@ -528,9 +528,9 @@ const $e = w(We), Ye = ["disabled", "onClick"], Xe = {
|
|
|
528
528
|
return null;
|
|
529
529
|
const t = this.getSvgContent(this.svgElSource);
|
|
530
530
|
if (!t)
|
|
531
|
-
return
|
|
531
|
+
return re("div", this.$attrs);
|
|
532
532
|
const n = {};
|
|
533
|
-
return this.copySvgAttrs(n, this.svgElSource), this.copySvgAttrs(n, t), this.copyComponentAttrs(n, this.$attrs), n.innerHTML = t.innerHTML,
|
|
533
|
+
return this.copySvgAttrs(n, this.svgElSource), this.copySvgAttrs(n, t), this.copyComponentAttrs(n, this.$attrs), n.innerHTML = t.innerHTML, re("svg", n);
|
|
534
534
|
},
|
|
535
535
|
props: {
|
|
536
536
|
src: {
|
|
@@ -583,11 +583,11 @@ const $e = w(We), Ye = ["disabled", "onClick"], Xe = {
|
|
|
583
583
|
*/
|
|
584
584
|
async getSource(t) {
|
|
585
585
|
try {
|
|
586
|
-
|
|
587
|
-
const n = await
|
|
586
|
+
M[t] || (M[t] = it(this.download(t))), this.svgElSource && M[t].getIsPending() && !this.keepDuringLoading && (this.svgElSource = null, this.$emit("unloaded"));
|
|
587
|
+
const n = await M[t];
|
|
588
588
|
this.svgElSource = n, await this.$nextTick(), this.$emit("loaded", this.$el);
|
|
589
589
|
} catch (n) {
|
|
590
|
-
this.svgElSource && (this.svgElSource = null, this.$emit("unloaded")), delete
|
|
590
|
+
this.svgElSource && (this.svgElSource = null, this.$emit("unloaded")), delete M[t], this.$emit("error", n);
|
|
591
591
|
}
|
|
592
592
|
},
|
|
593
593
|
/**
|
|
@@ -641,20 +641,20 @@ const ct = /* @__PURE__ */ k({
|
|
|
641
641
|
},
|
|
642
642
|
emits: ["loaded", "unloaded"],
|
|
643
643
|
setup(t, { emit: n }) {
|
|
644
|
-
const e = t, o =
|
|
644
|
+
const e = t, o = v(() => ({
|
|
645
645
|
"font-size": e.size !== void 0 ? `${e.size}px` : void 0
|
|
646
646
|
}));
|
|
647
|
-
return (s, a) => e.icon ? (r(),
|
|
647
|
+
return (s, a) => e.icon ? (r(), $(g(lt), {
|
|
648
648
|
key: 0,
|
|
649
649
|
class: "q-icon q-icon__svg",
|
|
650
650
|
src: e.bundle,
|
|
651
651
|
symbol: e.icon,
|
|
652
|
-
style:
|
|
652
|
+
style: K(o.value),
|
|
653
653
|
onLoaded: a[0] || (a[0] = (l) => n("loaded", l)),
|
|
654
654
|
onUnloaded: a[1] || (a[1] = (l) => n("unloaded", l))
|
|
655
655
|
}, null, 8, ["src", "symbol", "style"])) : b("", !0);
|
|
656
656
|
}
|
|
657
|
-
}),
|
|
657
|
+
}), U = w(nt), ut = w(ot), dt = w(at), ft = w(ct), pt = {
|
|
658
658
|
key: 0,
|
|
659
659
|
class: "q-input__prepend"
|
|
660
660
|
}, mt = {
|
|
@@ -670,18 +670,18 @@ const ct = /* @__PURE__ */ k({
|
|
|
670
670
|
setup(t) {
|
|
671
671
|
const n = t;
|
|
672
672
|
return (e, o) => (r(), f("div", {
|
|
673
|
-
class:
|
|
673
|
+
class: V([
|
|
674
674
|
"q-input",
|
|
675
675
|
`q-input--${n.size}`,
|
|
676
676
|
{ "q-input--readonly": n.readonly, "q-input--disabled": n.disabled }
|
|
677
677
|
])
|
|
678
678
|
}, [
|
|
679
679
|
e.$slots.prepend ? (r(), f("div", pt, [
|
|
680
|
-
|
|
680
|
+
x(e.$slots, "prepend")
|
|
681
681
|
])) : b("", !0),
|
|
682
|
-
|
|
682
|
+
x(e.$slots, "default"),
|
|
683
683
|
e.$slots.append ? (r(), f("div", mt, [
|
|
684
|
-
|
|
684
|
+
x(e.$slots, "append")
|
|
685
685
|
])) : b("", !0)
|
|
686
686
|
], 2));
|
|
687
687
|
}
|
|
@@ -706,16 +706,16 @@ const kt = /* @__PURE__ */ vt(gt, [["render", _t]]), sn = w(kt), wt = /* @__PURE
|
|
|
706
706
|
},
|
|
707
707
|
emits: ["update:modelValue"],
|
|
708
708
|
setup(t, { expose: n, emit: e }) {
|
|
709
|
-
const o = t, s =
|
|
710
|
-
function i(
|
|
711
|
-
s.value =
|
|
709
|
+
const o = t, s = I(o.modelValue), a = v(() => l.value.length > 1 ? "div" : "ul"), l = v(() => o.groups.length ? o.groups : [{ title: "" }]), c = I(null);
|
|
710
|
+
function i(d) {
|
|
711
|
+
s.value = d, e("update:modelValue", d);
|
|
712
712
|
}
|
|
713
713
|
function h() {
|
|
714
|
-
let
|
|
715
|
-
s.value && (
|
|
714
|
+
let d = 0;
|
|
715
|
+
s.value && (d = o.items.findIndex((S) => S[o.itemValue] === s.value)), D(d);
|
|
716
716
|
}
|
|
717
|
-
function _(
|
|
718
|
-
switch (["ArrowDown", "ArrowUp", "Home", "End"].includes(
|
|
717
|
+
function _(d) {
|
|
718
|
+
switch (["ArrowDown", "ArrowUp", "Home", "End"].includes(d.key) && d.preventDefault(), d.key) {
|
|
719
719
|
case "ArrowDown":
|
|
720
720
|
p("next");
|
|
721
721
|
break;
|
|
@@ -730,67 +730,67 @@ const kt = /* @__PURE__ */ vt(gt, [["render", _t]]), sn = w(kt), wt = /* @__PURE
|
|
|
730
730
|
break;
|
|
731
731
|
}
|
|
732
732
|
}
|
|
733
|
-
function p(
|
|
734
|
-
switch (
|
|
733
|
+
function p(d) {
|
|
734
|
+
switch (d) {
|
|
735
735
|
case "next":
|
|
736
736
|
case "prev":
|
|
737
|
-
|
|
737
|
+
D(E(d));
|
|
738
738
|
break;
|
|
739
739
|
case "first":
|
|
740
|
-
|
|
740
|
+
D(0);
|
|
741
741
|
break;
|
|
742
742
|
case "last":
|
|
743
|
-
|
|
743
|
+
D(-1);
|
|
744
744
|
break;
|
|
745
745
|
}
|
|
746
746
|
}
|
|
747
|
-
function
|
|
748
|
-
var
|
|
749
|
-
(
|
|
747
|
+
function D(d) {
|
|
748
|
+
var y;
|
|
749
|
+
(y = z().at(d)) == null || y.focus();
|
|
750
750
|
}
|
|
751
|
-
function
|
|
752
|
-
var
|
|
753
|
-
const
|
|
754
|
-
return
|
|
751
|
+
function z() {
|
|
752
|
+
var y;
|
|
753
|
+
const d = (y = c.value) == null ? void 0 : y.querySelectorAll("li");
|
|
754
|
+
return d ? Array.from(d).filter((L) => L.tabIndex !== -1) : [];
|
|
755
755
|
}
|
|
756
|
-
function
|
|
757
|
-
return
|
|
756
|
+
function Q(d) {
|
|
757
|
+
return d.indexOf(document.activeElement);
|
|
758
758
|
}
|
|
759
|
-
function
|
|
760
|
-
const
|
|
761
|
-
return
|
|
759
|
+
function E(d) {
|
|
760
|
+
const S = z(), y = Q(S);
|
|
761
|
+
return d === "next" ? y === S.length - 1 ? y : y + 1 : y === 0 ? 0 : y - 1;
|
|
762
762
|
}
|
|
763
|
-
function
|
|
764
|
-
return
|
|
763
|
+
function F(d) {
|
|
764
|
+
return d ? o.items.filter((S) => S.group === d) : o.items;
|
|
765
765
|
}
|
|
766
|
-
return
|
|
766
|
+
return C(
|
|
767
767
|
() => o.modelValue,
|
|
768
|
-
(
|
|
769
|
-
s.value =
|
|
768
|
+
(d) => {
|
|
769
|
+
s.value = d;
|
|
770
770
|
}
|
|
771
|
-
), n({ focusItem:
|
|
771
|
+
), n({ focusItem: D }), (d, S) => (r(), $(ve(a.value), {
|
|
772
772
|
ref_key: "listRef",
|
|
773
773
|
ref: c,
|
|
774
|
-
class:
|
|
774
|
+
class: V(["q-list", { "q-list--disabled": o.disabled }]),
|
|
775
775
|
role: "listbox",
|
|
776
776
|
tabindex: o.disabled ? -1 : 0,
|
|
777
777
|
onFocus: h,
|
|
778
778
|
onKeydown: _
|
|
779
779
|
}, {
|
|
780
|
-
default:
|
|
781
|
-
(r(!0), f(
|
|
782
|
-
key:
|
|
783
|
-
title:
|
|
784
|
-
disabled:
|
|
780
|
+
default: T(() => [
|
|
781
|
+
(r(!0), f(O, null, ne(l.value, (y) => (r(), $(g(Vt), {
|
|
782
|
+
key: y.id,
|
|
783
|
+
title: y.title,
|
|
784
|
+
disabled: y.disabled
|
|
785
785
|
}, {
|
|
786
|
-
default:
|
|
787
|
-
(r(!0), f(
|
|
788
|
-
key:
|
|
789
|
-
value:
|
|
790
|
-
label:
|
|
791
|
-
icon:
|
|
792
|
-
disabled: o.disabled ||
|
|
793
|
-
selected: s.value ===
|
|
786
|
+
default: T(() => [
|
|
787
|
+
(r(!0), f(O, null, ne(F(y.id), (L) => (r(), $(g(Ct), {
|
|
788
|
+
key: L[o.itemValue],
|
|
789
|
+
value: L[o.itemValue],
|
|
790
|
+
label: L[o.itemLabel],
|
|
791
|
+
icon: L.icon,
|
|
792
|
+
disabled: o.disabled || L.disabled,
|
|
793
|
+
selected: s.value === L[o.itemValue],
|
|
794
794
|
onSelect: i
|
|
795
795
|
}, null, 8, ["value", "label", "icon", "disabled", "selected"]))), 128))
|
|
796
796
|
]),
|
|
@@ -827,7 +827,7 @@ const kt = /* @__PURE__ */ vt(gt, [["render", _t]]), sn = w(kt), wt = /* @__PURE
|
|
|
827
827
|
return (a, l) => (r(), f("li", {
|
|
828
828
|
role: "option",
|
|
829
829
|
tabindex: e.disabled ? void 0 : -2,
|
|
830
|
-
class:
|
|
830
|
+
class: V([
|
|
831
831
|
"q-list-item",
|
|
832
832
|
{
|
|
833
833
|
"q-list-item--disabled": e.disabled,
|
|
@@ -838,12 +838,12 @@ const kt = /* @__PURE__ */ vt(gt, [["render", _t]]), sn = w(kt), wt = /* @__PURE
|
|
|
838
838
|
"aria-label": e.label,
|
|
839
839
|
"aria-selected": e.disabled ? void 0 : e.selected,
|
|
840
840
|
onKeydown: s,
|
|
841
|
-
onClick:
|
|
841
|
+
onClick: R(o, ["stop", "prevent"])
|
|
842
842
|
}, [
|
|
843
|
-
e.icon ? (r(),
|
|
844
|
-
X(" " +
|
|
845
|
-
|
|
846
|
-
e.selected ? (r(),
|
|
843
|
+
e.icon ? (r(), $(g(U), ge(Z({ key: 0 }, e.icon)), null, 16)) : b("", !0),
|
|
844
|
+
X(" " + A(e.label) + " ", 1),
|
|
845
|
+
N("div", St, [
|
|
846
|
+
e.selected ? (r(), $(g(U), Z({ key: 0 }, e.icons.check, { class: "q-list-item__check" }), null, 16)) : b("", !0)
|
|
847
847
|
])
|
|
848
848
|
], 42, $t));
|
|
849
849
|
}
|
|
@@ -852,7 +852,7 @@ let xt = 0;
|
|
|
852
852
|
function qt() {
|
|
853
853
|
return `uid-${++xt}`;
|
|
854
854
|
}
|
|
855
|
-
const
|
|
855
|
+
const It = ["aria-labelledby"], Dt = ["id"], Tt = /* @__PURE__ */ k({
|
|
856
856
|
__name: "QListItemGroup",
|
|
857
857
|
props: {
|
|
858
858
|
title: { default: "" },
|
|
@@ -871,15 +871,15 @@ const Dt = ["aria-labelledby"], It = ["id"], Et = /* @__PURE__ */ k({
|
|
|
871
871
|
id: g(e),
|
|
872
872
|
class: "q-list-item-group__title",
|
|
873
873
|
role: "presentation"
|
|
874
|
-
},
|
|
875
|
-
|
|
876
|
-
], 8,
|
|
874
|
+
}, A(n.title), 9, Dt)) : b("", !0),
|
|
875
|
+
x(o.$slots, "default")
|
|
876
|
+
], 8, It)) : x(o.$slots, "default", { key: 0 });
|
|
877
877
|
}
|
|
878
|
-
}),
|
|
878
|
+
}), Et = w(wt), Ct = w(Lt), Vt = w(Tt);
|
|
879
879
|
function At(t, n, e = "right", o) {
|
|
880
880
|
const s = t.getBoundingClientRect(), a = s.x + window.scrollX, l = s.y + window.scrollY, c = n == null ? void 0 : n.getBoundingClientRect(), i = (c == null ? void 0 : c.width) ?? 0, h = (c == null ? void 0 : c.height) ?? 0;
|
|
881
881
|
let _ = e;
|
|
882
|
-
c && !
|
|
882
|
+
c && !Be(s, c, _) && (_ = zt(s, c, _));
|
|
883
883
|
const p = { x: 0, y: 0, placement: _ };
|
|
884
884
|
switch (_) {
|
|
885
885
|
case "top":
|
|
@@ -897,28 +897,28 @@ function At(t, n, e = "right", o) {
|
|
|
897
897
|
}
|
|
898
898
|
return o === "anchor" && s.width >= i && (p.width = s.width), p;
|
|
899
899
|
}
|
|
900
|
-
function
|
|
900
|
+
function Be(t, n, e) {
|
|
901
901
|
let o = !1, s = !1;
|
|
902
902
|
switch (e) {
|
|
903
903
|
case "top":
|
|
904
|
-
o =
|
|
904
|
+
o = me(t, n), s = t.top > n.height;
|
|
905
905
|
break;
|
|
906
906
|
case "bottom":
|
|
907
|
-
o =
|
|
907
|
+
o = me(t, n), s = window.innerHeight - t.top - t.height > n.height;
|
|
908
908
|
break;
|
|
909
909
|
case "left":
|
|
910
|
-
o = t.left > n.width, s =
|
|
910
|
+
o = t.left > n.width, s = pe(t, n);
|
|
911
911
|
break;
|
|
912
912
|
case "right":
|
|
913
|
-
o = window.innerWidth - t.left - t.width > n.width, s =
|
|
913
|
+
o = window.innerWidth - t.left - t.width > n.width, s = pe(t, n);
|
|
914
914
|
break;
|
|
915
915
|
}
|
|
916
916
|
return o && s;
|
|
917
917
|
}
|
|
918
|
-
function
|
|
918
|
+
function pe(t, n) {
|
|
919
919
|
return window.innerHeight - t.top - t.height / 2 > n.height / 2 && t.top + t.height / 2 > n.height / 2;
|
|
920
920
|
}
|
|
921
|
-
function
|
|
921
|
+
function me(t, n) {
|
|
922
922
|
return window.innerWidth - t.left - t.width / 2 > n.width / 2 && t.left + t.width / 2 > n.width / 2;
|
|
923
923
|
}
|
|
924
924
|
function zt(t, n, e) {
|
|
@@ -929,7 +929,7 @@ function zt(t, n, e) {
|
|
|
929
929
|
right: ["left", "top", "bottom"]
|
|
930
930
|
};
|
|
931
931
|
for (const s of o[e])
|
|
932
|
-
if (
|
|
932
|
+
if (Be(t, n, s))
|
|
933
933
|
return s;
|
|
934
934
|
return e;
|
|
935
935
|
}
|
|
@@ -960,30 +960,34 @@ const Qt = {
|
|
|
960
960
|
},
|
|
961
961
|
emits: ["enter", "leave"],
|
|
962
962
|
setup(t, { emit: n }) {
|
|
963
|
-
const e = t, o =
|
|
963
|
+
const e = t, o = v(() => [
|
|
964
964
|
"q-overlay",
|
|
965
965
|
`q-overlay--${s.placement}`,
|
|
966
966
|
{ "q-overlay--inverted": e.appearance === "inverted" },
|
|
967
967
|
...e.contentClasses
|
|
968
968
|
]), s = xe({
|
|
969
969
|
visible: e.modelValue,
|
|
970
|
+
animating: !1,
|
|
970
971
|
top: 0,
|
|
971
972
|
left: 0,
|
|
972
973
|
width: 0,
|
|
973
974
|
placement: e.placement
|
|
974
|
-
}), a =
|
|
975
|
-
|
|
975
|
+
}), a = v(() => s.visible && !e.disabled);
|
|
976
|
+
C(
|
|
976
977
|
() => e.modelValue,
|
|
977
978
|
() => s.visible = e.modelValue
|
|
979
|
+
), C(
|
|
980
|
+
() => s.visible,
|
|
981
|
+
() => s.animating = !0
|
|
978
982
|
);
|
|
979
|
-
const l =
|
|
980
|
-
let m = 0,
|
|
983
|
+
const l = v(() => {
|
|
984
|
+
let m = 0, q = 0;
|
|
981
985
|
switch (s.placement) {
|
|
982
986
|
case "top":
|
|
983
|
-
|
|
987
|
+
q = -(e.offset || 0);
|
|
984
988
|
break;
|
|
985
989
|
case "bottom":
|
|
986
|
-
|
|
990
|
+
q = e.offset || 0;
|
|
987
991
|
break;
|
|
988
992
|
case "left":
|
|
989
993
|
m = -(e.offset || 0);
|
|
@@ -992,20 +996,20 @@ const Qt = {
|
|
|
992
996
|
m = e.offset || 0;
|
|
993
997
|
break;
|
|
994
998
|
}
|
|
995
|
-
const
|
|
996
|
-
top: `${s.top +
|
|
999
|
+
const u = {
|
|
1000
|
+
top: `${s.top + q}px`,
|
|
997
1001
|
left: `${s.left + m}px`
|
|
998
1002
|
};
|
|
999
|
-
return s.width !== void 0 && ["top", "bottom"].includes(s.placement) && (
|
|
1000
|
-
}), c =
|
|
1003
|
+
return s.width !== void 0 && ["top", "bottom"].includes(s.placement) && (u.width = `${s.width}px`), u;
|
|
1004
|
+
}), c = I(null);
|
|
1001
1005
|
function i() {
|
|
1002
1006
|
const m = Y(e.anchor);
|
|
1003
1007
|
if (m) {
|
|
1004
|
-
const
|
|
1005
|
-
s.left =
|
|
1008
|
+
const q = At(m, c.value, e.placement, e.width);
|
|
1009
|
+
s.left = q.x, s.top = q.y, s.width = q.width, s.placement = q.placement;
|
|
1006
1010
|
}
|
|
1007
1011
|
}
|
|
1008
|
-
|
|
1012
|
+
C([() => a.value, () => e.placement], i);
|
|
1009
1013
|
let h;
|
|
1010
1014
|
function _() {
|
|
1011
1015
|
const m = e.trigger === "hover" ? e.delay : 0;
|
|
@@ -1014,17 +1018,21 @@ const Qt = {
|
|
|
1014
1018
|
function p() {
|
|
1015
1019
|
clearTimeout(h), h = void 0, s.visible = !1;
|
|
1016
1020
|
}
|
|
1017
|
-
function
|
|
1021
|
+
function D() {
|
|
1018
1022
|
a.value ? p() : _();
|
|
1019
1023
|
}
|
|
1024
|
+
let z;
|
|
1025
|
+
function Q() {
|
|
1026
|
+
window.clearTimeout(z), z = window.setTimeout(() => s.animating = !1, 200), n("leave");
|
|
1027
|
+
}
|
|
1020
1028
|
let E;
|
|
1021
|
-
function
|
|
1022
|
-
|
|
1029
|
+
function F() {
|
|
1030
|
+
ie(() => {
|
|
1023
1031
|
const m = Y(e.anchor);
|
|
1024
1032
|
if (m)
|
|
1025
1033
|
switch (e.trigger) {
|
|
1026
1034
|
case "click":
|
|
1027
|
-
m.addEventListener("click",
|
|
1035
|
+
m.addEventListener("click", D);
|
|
1028
1036
|
break;
|
|
1029
1037
|
case "hover":
|
|
1030
1038
|
m.addEventListener("mouseenter", _), m.addEventListener("mouseleave", p);
|
|
@@ -1032,8 +1040,8 @@ const Qt = {
|
|
|
1032
1040
|
}
|
|
1033
1041
|
});
|
|
1034
1042
|
}
|
|
1035
|
-
function
|
|
1036
|
-
|
|
1043
|
+
function d() {
|
|
1044
|
+
ie(() => {
|
|
1037
1045
|
const m = Y(e.anchor);
|
|
1038
1046
|
m && (window.addEventListener("scroll", i), window.addEventListener("resize", i), E = new MutationObserver(i), E.observe(m, {
|
|
1039
1047
|
attributes: !1,
|
|
@@ -1043,64 +1051,66 @@ const Qt = {
|
|
|
1043
1051
|
}), i());
|
|
1044
1052
|
});
|
|
1045
1053
|
}
|
|
1046
|
-
function
|
|
1054
|
+
function S() {
|
|
1047
1055
|
window.removeEventListener("scroll", i), window.removeEventListener("resize", i), E == null || E.disconnect();
|
|
1048
1056
|
}
|
|
1049
|
-
let
|
|
1050
|
-
function
|
|
1051
|
-
Y(e.anchor) ? (i(),
|
|
1057
|
+
let y;
|
|
1058
|
+
function L() {
|
|
1059
|
+
Y(e.anchor) ? (i(), y = window.setTimeout(L, 100)) : p();
|
|
1052
1060
|
}
|
|
1053
|
-
function
|
|
1054
|
-
|
|
1061
|
+
function J() {
|
|
1062
|
+
d(), e.spy && L();
|
|
1055
1063
|
}
|
|
1056
|
-
function
|
|
1057
|
-
|
|
1064
|
+
function W() {
|
|
1065
|
+
S(), e.spy && (clearTimeout(y), y = void 0);
|
|
1058
1066
|
}
|
|
1059
|
-
return qe(
|
|
1067
|
+
return qe(W), Ie(i), C(
|
|
1060
1068
|
() => e.disabled,
|
|
1061
1069
|
(m) => {
|
|
1062
|
-
m ||
|
|
1070
|
+
m || F();
|
|
1063
1071
|
},
|
|
1064
1072
|
{ immediate: !0 }
|
|
1065
|
-
),
|
|
1073
|
+
), C(
|
|
1066
1074
|
() => a.value,
|
|
1067
1075
|
(m) => {
|
|
1068
|
-
m ?
|
|
1076
|
+
m ? J() : W();
|
|
1069
1077
|
},
|
|
1070
1078
|
{ immediate: !0 }
|
|
1071
|
-
), (m,
|
|
1072
|
-
|
|
1073
|
-
(r(),
|
|
1079
|
+
), (m, q) => (r(), f(O, null, [
|
|
1080
|
+
x(m.$slots, "trigger", { open: a.value }),
|
|
1081
|
+
a.value || s.animating ? (r(), $(De, {
|
|
1082
|
+
key: 0,
|
|
1083
|
+
disabled: !e.attach,
|
|
1074
1084
|
to: e.attach
|
|
1075
1085
|
}, [
|
|
1076
|
-
|
|
1086
|
+
H(Te, {
|
|
1077
1087
|
name: e.transition,
|
|
1078
1088
|
appear: "",
|
|
1079
|
-
onEnter:
|
|
1080
|
-
onLeave:
|
|
1089
|
+
onEnter: q[0] || (q[0] = (u) => n("enter")),
|
|
1090
|
+
onLeave: Q
|
|
1081
1091
|
}, {
|
|
1082
|
-
default:
|
|
1092
|
+
default: T(() => [
|
|
1083
1093
|
a.value ? (r(), f("div", {
|
|
1084
1094
|
key: 0,
|
|
1085
|
-
class:
|
|
1086
|
-
style:
|
|
1095
|
+
class: V(o.value),
|
|
1096
|
+
style: K(l.value)
|
|
1087
1097
|
}, [
|
|
1088
|
-
|
|
1089
|
-
class:
|
|
1098
|
+
N("div", {
|
|
1099
|
+
class: V(["q-overlay__content"]),
|
|
1090
1100
|
ref_key: "overlay",
|
|
1091
1101
|
ref: c
|
|
1092
1102
|
}, [
|
|
1093
1103
|
e.arrow ? (r(), f("div", Qt)) : b("", !0),
|
|
1094
|
-
|
|
1104
|
+
x(m.$slots, "default")
|
|
1095
1105
|
], 512)
|
|
1096
1106
|
], 6)) : b("", !0)
|
|
1097
1107
|
]),
|
|
1098
1108
|
_: 3
|
|
1099
1109
|
}, 8, ["name"])
|
|
1100
|
-
], 8, ["to"]))
|
|
1110
|
+
], 8, ["disabled", "to"])) : b("", !0)
|
|
1101
1111
|
], 64));
|
|
1102
1112
|
}
|
|
1103
|
-
}),
|
|
1113
|
+
}), ae = w(Ot), Ft = {
|
|
1104
1114
|
key: 0,
|
|
1105
1115
|
class: "q-popover__header"
|
|
1106
1116
|
}, Mt = {
|
|
@@ -1123,7 +1133,7 @@ const Qt = {
|
|
|
1123
1133
|
},
|
|
1124
1134
|
setup(t) {
|
|
1125
1135
|
const n = t;
|
|
1126
|
-
return (e, o) => (r(),
|
|
1136
|
+
return (e, o) => (r(), $(g(ae), {
|
|
1127
1137
|
"model-value": n.modelValue,
|
|
1128
1138
|
trigger: "click",
|
|
1129
1139
|
anchor: n.anchor,
|
|
@@ -1134,17 +1144,17 @@ const Qt = {
|
|
|
1134
1144
|
placement: n.placement,
|
|
1135
1145
|
spy: n.spy
|
|
1136
1146
|
}, {
|
|
1137
|
-
default:
|
|
1147
|
+
default: T(() => [
|
|
1138
1148
|
n.title || e.$slots.header ? (r(), f("h3", Ft, [
|
|
1139
|
-
X(
|
|
1140
|
-
|
|
1149
|
+
X(A(n.title) + " ", 1),
|
|
1150
|
+
x(e.$slots, "header")
|
|
1141
1151
|
])) : b("", !0),
|
|
1142
1152
|
n.text || e.$slots.body ? (r(), f("div", Mt, [
|
|
1143
1153
|
n.html ? (r(), f("span", {
|
|
1144
1154
|
key: 0,
|
|
1145
1155
|
innerHTML: n.text
|
|
1146
|
-
}, null, 8, Rt)) : (r(), f("span", Ht,
|
|
1147
|
-
|
|
1156
|
+
}, null, 8, Rt)) : (r(), f("span", Ht, A(n.text), 1)),
|
|
1157
|
+
x(e.$slots, "body")
|
|
1148
1158
|
])) : b("", !0)
|
|
1149
1159
|
]),
|
|
1150
1160
|
_: 3
|
|
@@ -1152,7 +1162,7 @@ const Qt = {
|
|
|
1152
1162
|
}
|
|
1153
1163
|
}), an = w(Ut);
|
|
1154
1164
|
function Nt() {
|
|
1155
|
-
const t =
|
|
1165
|
+
const t = Ee(), n = {};
|
|
1156
1166
|
return typeof t.class == "string" ? n.class = t.class.split(" ") : Array.isArray(t.class) ? n.class = t.class : n.class = [], n;
|
|
1157
1167
|
}
|
|
1158
1168
|
const Kt = {
|
|
@@ -1199,80 +1209,80 @@ const Kt = {
|
|
|
1199
1209
|
},
|
|
1200
1210
|
emits: ["update:modelValue", "before-show", "before-hide", "show", "hide"],
|
|
1201
1211
|
setup(t, { emit: n }) {
|
|
1202
|
-
const e = t, o = Nt(), s =
|
|
1212
|
+
const e = t, o = Nt(), s = I(e.modelValue), a = I(!1), l = I(""), c = I(null), i = I(null), h = I(null), _ = v(
|
|
1203
1213
|
() => {
|
|
1204
|
-
var
|
|
1205
|
-
return (
|
|
1214
|
+
var u;
|
|
1215
|
+
return (u = e.items) == null ? void 0 : u.find((B) => B[e.itemValue] === s.value);
|
|
1206
1216
|
}
|
|
1207
|
-
), p =
|
|
1217
|
+
), p = v(
|
|
1208
1218
|
() => _.value ? _.value[e.itemLabel] : ""
|
|
1209
|
-
),
|
|
1219
|
+
), D = v(
|
|
1210
1220
|
() => e.clearable && !e.readonly && !e.disabled && !e.loading
|
|
1211
1221
|
);
|
|
1212
|
-
function
|
|
1213
|
-
s.value =
|
|
1222
|
+
function z(u) {
|
|
1223
|
+
s.value = u, n("update:modelValue", u), S();
|
|
1214
1224
|
}
|
|
1215
|
-
function
|
|
1216
|
-
|
|
1225
|
+
function Q() {
|
|
1226
|
+
D.value && z(void 0);
|
|
1217
1227
|
}
|
|
1218
|
-
function
|
|
1219
|
-
e.readonly || e.disabled || (a.value ?
|
|
1228
|
+
function E() {
|
|
1229
|
+
e.readonly || e.disabled || (a.value ? S() : d());
|
|
1220
1230
|
}
|
|
1221
|
-
function
|
|
1222
|
-
var
|
|
1223
|
-
(
|
|
1231
|
+
function F(u) {
|
|
1232
|
+
var B;
|
|
1233
|
+
(B = c.value) != null && B.$el.contains(u.target) || S();
|
|
1224
1234
|
}
|
|
1225
|
-
function
|
|
1235
|
+
function d() {
|
|
1226
1236
|
a.value || (n("before-show"), a.value = !0);
|
|
1227
1237
|
}
|
|
1228
|
-
function
|
|
1238
|
+
function S() {
|
|
1229
1239
|
a.value && (n("before-hide"), a.value = !1);
|
|
1230
1240
|
}
|
|
1231
|
-
let
|
|
1232
|
-
function
|
|
1233
|
-
if (!(!
|
|
1234
|
-
if (window.clearTimeout(
|
|
1235
|
-
l.value +=
|
|
1236
|
-
for (let
|
|
1237
|
-
if (e.items[
|
|
1238
|
-
|
|
1241
|
+
let y;
|
|
1242
|
+
function L(u) {
|
|
1243
|
+
if (!(!u.key || e.readonly || e.disabled)) {
|
|
1244
|
+
if (window.clearTimeout(y), ["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" && Q()), u.key === "Delete" && e.clearable && Q(), /^[a-z]$/i.test(u.key)) {
|
|
1245
|
+
l.value += u.key.toLowerCase();
|
|
1246
|
+
for (let B = 0; B < e.items.length; B++)
|
|
1247
|
+
if (e.items[B][e.itemLabel].toLowerCase().startsWith(l.value)) {
|
|
1248
|
+
q(B);
|
|
1239
1249
|
break;
|
|
1240
1250
|
}
|
|
1241
1251
|
}
|
|
1242
|
-
|
|
1252
|
+
y = window.setTimeout(function() {
|
|
1243
1253
|
l.value = "";
|
|
1244
1254
|
}, 500);
|
|
1245
1255
|
}
|
|
1246
1256
|
}
|
|
1247
|
-
function
|
|
1248
|
-
var
|
|
1249
|
-
(
|
|
1257
|
+
function J() {
|
|
1258
|
+
var u;
|
|
1259
|
+
(u = i.value) == null || u.$el.focus(), n("show");
|
|
1250
1260
|
}
|
|
1251
|
-
function
|
|
1252
|
-
|
|
1261
|
+
function W() {
|
|
1262
|
+
m(), n("hide");
|
|
1253
1263
|
}
|
|
1254
|
-
function
|
|
1255
|
-
var
|
|
1256
|
-
(
|
|
1264
|
+
function m() {
|
|
1265
|
+
var u;
|
|
1266
|
+
(u = c.value) == null || u.$el.focus();
|
|
1257
1267
|
}
|
|
1258
|
-
function
|
|
1259
|
-
var
|
|
1260
|
-
(
|
|
1268
|
+
function q(u) {
|
|
1269
|
+
var B;
|
|
1270
|
+
(B = i.value) == null || B.focusItem(u);
|
|
1261
1271
|
}
|
|
1262
|
-
return
|
|
1272
|
+
return C(
|
|
1263
1273
|
() => e.modelValue,
|
|
1264
|
-
(
|
|
1265
|
-
s.value =
|
|
1274
|
+
(u) => {
|
|
1275
|
+
s.value = u;
|
|
1266
1276
|
}
|
|
1267
|
-
), (
|
|
1268
|
-
var
|
|
1269
|
-
return r(), f(
|
|
1270
|
-
|
|
1277
|
+
), (u, B) => {
|
|
1278
|
+
var P, le;
|
|
1279
|
+
return r(), f(O, null, [
|
|
1280
|
+
H(g(yt), {
|
|
1271
1281
|
ref_key: "inputRef",
|
|
1272
1282
|
ref: c,
|
|
1273
1283
|
role: "combobox",
|
|
1274
1284
|
tabindex: "0",
|
|
1275
|
-
class:
|
|
1285
|
+
class: V([
|
|
1276
1286
|
"q-select",
|
|
1277
1287
|
{
|
|
1278
1288
|
"q-select--readonly": e.readonly,
|
|
@@ -1286,73 +1296,73 @@ const Kt = {
|
|
|
1286
1296
|
"aria-expanded": a.value,
|
|
1287
1297
|
"aria-haspopup": "listbox",
|
|
1288
1298
|
size: e.size,
|
|
1289
|
-
onClick:
|
|
1290
|
-
onKeydown:
|
|
1291
|
-
},
|
|
1292
|
-
append:
|
|
1293
|
-
|
|
1299
|
+
onClick: E,
|
|
1300
|
+
onKeydown: R(L, ["stop"])
|
|
1301
|
+
}, Ce({
|
|
1302
|
+
append: T(() => [
|
|
1303
|
+
D.value && s.value ? (r(), $(g(U), Z({ key: 0 }, e.icons.clear, {
|
|
1294
1304
|
class: "q-select__clear",
|
|
1295
|
-
onClick:
|
|
1305
|
+
onClick: R(Q, ["stop", "prevent"])
|
|
1296
1306
|
}), null, 16, ["onClick"])) : b("", !0),
|
|
1297
|
-
!e.readonly && !e.disabled ? (r(),
|
|
1307
|
+
!e.readonly && !e.disabled ? (r(), $(g(U), Z({ key: 1 }, e.icons.chevron, { class: "q-select__chevron" }), null, 16)) : b("", !0)
|
|
1298
1308
|
]),
|
|
1299
|
-
default:
|
|
1300
|
-
s.value ? (r(), f("span", Wt,
|
|
1309
|
+
default: T(() => [
|
|
1310
|
+
s.value ? (r(), f("span", Wt, A(p.value), 1)) : (r(), f("span", Gt, A(u.texts.placeholder), 1))
|
|
1301
1311
|
]),
|
|
1302
1312
|
_: 2
|
|
1303
1313
|
}, [
|
|
1304
|
-
(
|
|
1314
|
+
(P = _.value) != null && P.icon ? {
|
|
1305
1315
|
name: "prepend",
|
|
1306
|
-
fn:
|
|
1316
|
+
fn: T(() => {
|
|
1307
1317
|
var G;
|
|
1308
1318
|
return [
|
|
1309
|
-
|
|
1319
|
+
H(g(U), ge(Ve((G = _.value) == null ? void 0 : G.icon)), null, 16)
|
|
1310
1320
|
];
|
|
1311
1321
|
}),
|
|
1312
1322
|
key: "0"
|
|
1313
1323
|
} : void 0
|
|
1314
1324
|
]), 1032, ["class", "disabled", "aria-expanded", "size", "onKeydown"]),
|
|
1315
|
-
|
|
1325
|
+
H(g(ae), {
|
|
1316
1326
|
"model-value": a.value,
|
|
1317
1327
|
spy: "",
|
|
1318
1328
|
trigger: "manual",
|
|
1319
1329
|
placement: "bottom",
|
|
1320
1330
|
width: "anchor",
|
|
1321
1331
|
offset: 2,
|
|
1322
|
-
anchor: (
|
|
1323
|
-
onEnter:
|
|
1324
|
-
onLeave:
|
|
1332
|
+
anchor: (le = c.value) == null ? void 0 : le.$el,
|
|
1333
|
+
onEnter: J,
|
|
1334
|
+
onLeave: W
|
|
1325
1335
|
}, {
|
|
1326
|
-
default:
|
|
1336
|
+
default: T(() => [
|
|
1327
1337
|
Ae((r(), f("div", {
|
|
1328
1338
|
ref_key: "contentRef",
|
|
1329
1339
|
ref: h,
|
|
1330
1340
|
class: "q-select__body"
|
|
1331
1341
|
}, [
|
|
1332
|
-
|
|
1333
|
-
e.loading ? (r(),
|
|
1342
|
+
x(u.$slots, "body.prepend"),
|
|
1343
|
+
e.loading ? (r(), $(g(Se), {
|
|
1334
1344
|
key: 0,
|
|
1335
1345
|
class: "q-select__loader",
|
|
1336
1346
|
size: 24
|
|
1337
|
-
})) : (r(),
|
|
1347
|
+
})) : (r(), $(g(Et), {
|
|
1338
1348
|
key: 1,
|
|
1339
1349
|
ref_key: "listRef",
|
|
1340
1350
|
ref: i,
|
|
1341
1351
|
class: "q-select__items",
|
|
1342
1352
|
modelValue: s.value,
|
|
1343
1353
|
"onUpdate:modelValue": [
|
|
1344
|
-
|
|
1345
|
-
|
|
1354
|
+
B[0] || (B[0] = (G) => s.value = G),
|
|
1355
|
+
z
|
|
1346
1356
|
],
|
|
1347
1357
|
items: e.items,
|
|
1348
|
-
groups:
|
|
1358
|
+
groups: u.groups,
|
|
1349
1359
|
"item-label": e.itemLabel,
|
|
1350
1360
|
"item-value": e.itemValue,
|
|
1351
|
-
onKeydown:
|
|
1361
|
+
onKeydown: R(L, ["stop"])
|
|
1352
1362
|
}, null, 8, ["modelValue", "items", "groups", "item-label", "item-value", "onKeydown"])),
|
|
1353
|
-
|
|
1363
|
+
x(u.$slots, "body.append")
|
|
1354
1364
|
])), [
|
|
1355
|
-
[g(Kt),
|
|
1365
|
+
[g(Kt), F]
|
|
1356
1366
|
])
|
|
1357
1367
|
]),
|
|
1358
1368
|
_: 3
|
|
@@ -1378,7 +1388,7 @@ const Kt = {
|
|
|
1378
1388
|
},
|
|
1379
1389
|
setup(t) {
|
|
1380
1390
|
const n = t;
|
|
1381
|
-
return (e, o) => (r(),
|
|
1391
|
+
return (e, o) => (r(), $(g(ae), {
|
|
1382
1392
|
"model-value": n.modelValue,
|
|
1383
1393
|
anchor: n.anchor,
|
|
1384
1394
|
appearance: n.appearance,
|
|
@@ -1390,11 +1400,11 @@ const Kt = {
|
|
|
1390
1400
|
placement: n.placement,
|
|
1391
1401
|
trigger: n.trigger
|
|
1392
1402
|
}, {
|
|
1393
|
-
default:
|
|
1403
|
+
default: T(() => [
|
|
1394
1404
|
n.html ? (r(), f("span", {
|
|
1395
1405
|
key: 0,
|
|
1396
1406
|
innerHTML: n.text
|
|
1397
|
-
}, null, 8, jt)) : (r(), f("span", Jt,
|
|
1407
|
+
}, null, 8, jt)) : (r(), f("span", Jt, A(n.text), 1))
|
|
1398
1408
|
]),
|
|
1399
1409
|
_: 1
|
|
1400
1410
|
}, 8, ["model-value", "anchor", "appearance", "arrow", "attach", "delay", "disabled", "placement", "trigger"]));
|
|
@@ -1404,24 +1414,24 @@ export {
|
|
|
1404
1414
|
Je as QButton,
|
|
1405
1415
|
et as QButtonGroup,
|
|
1406
1416
|
on as QButtonToggle,
|
|
1407
|
-
|
|
1417
|
+
U as QIcon,
|
|
1408
1418
|
ut as QIconFont,
|
|
1409
1419
|
dt as QIconImg,
|
|
1410
1420
|
ft as QIconSvg,
|
|
1411
1421
|
yt as QInput,
|
|
1412
1422
|
sn as QLineLoader,
|
|
1413
|
-
|
|
1414
|
-
|
|
1423
|
+
Et as QList,
|
|
1424
|
+
Ct as QListItem,
|
|
1415
1425
|
Vt as QListItemGroup,
|
|
1416
|
-
|
|
1426
|
+
ae as QOverlay,
|
|
1417
1427
|
an as QPopover,
|
|
1418
1428
|
ln as QSelect,
|
|
1419
|
-
|
|
1429
|
+
Se as QSpinnerLoader,
|
|
1420
1430
|
rn as QTooltip,
|
|
1421
1431
|
Kt as clickOutside,
|
|
1422
1432
|
nn as createFramework,
|
|
1423
1433
|
Oe as defaultDarkColorScheme,
|
|
1424
|
-
|
|
1434
|
+
ue as defaultLightColorScheme,
|
|
1425
1435
|
tn as useTheme
|
|
1426
1436
|
};
|
|
1427
1437
|
//# sourceMappingURL=ui.esm.js.map
|