@quidgest/ui 0.5.2 → 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 +1978 -1362
- package/dist/ui.esm.js +323 -312
- 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 +104 -98
- 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,15 +1,18 @@
|
|
|
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
|
}
|
|
5
|
-
function
|
|
8
|
+
function ve(t = {}, n = {}) {
|
|
6
9
|
const e = {};
|
|
7
10
|
for (const o in t)
|
|
8
11
|
e[o] = t[o];
|
|
9
12
|
for (const o in n) {
|
|
10
13
|
const a = t[o], s = n[o];
|
|
11
14
|
if (re(a) && re(s)) {
|
|
12
|
-
e[o] =
|
|
15
|
+
e[o] = ve(
|
|
13
16
|
a,
|
|
14
17
|
s
|
|
15
18
|
);
|
|
@@ -19,22 +22,31 @@ function ye(t = {}, n = {}) {
|
|
|
19
22
|
}
|
|
20
23
|
return e;
|
|
21
24
|
}
|
|
22
|
-
const
|
|
23
|
-
function
|
|
25
|
+
const ne = "q-defaults";
|
|
26
|
+
function Ce() {
|
|
24
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
|
-
function
|
|
37
|
-
|
|
45
|
+
function ge() {
|
|
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",
|
|
@@ -97,34 +109,34 @@ const ie = {
|
|
|
97
109
|
onDanger: "#fff",
|
|
98
110
|
onInfo: "#fff"
|
|
99
111
|
};
|
|
100
|
-
function
|
|
112
|
+
function be(t) {
|
|
101
113
|
if (!/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/.test(t))
|
|
102
114
|
throw new Error("Invalid color format");
|
|
103
115
|
t.length === 4 && (t = "#" + t[1] + t[1] + t[2] + t[2] + t[3] + t[3]);
|
|
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)
|
|
111
123
|
return t;
|
|
112
|
-
const e =
|
|
113
|
-
return e.l = e.l + o * (100 - e.l),
|
|
124
|
+
const e = _e(t), o = n / 100;
|
|
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)
|
|
119
131
|
return t;
|
|
120
|
-
const e =
|
|
121
|
-
return e.l = e.l - o * e.l,
|
|
132
|
+
const e = _e(t), o = n / 100;
|
|
133
|
+
return e.l = e.l - o * e.l, ke(e);
|
|
122
134
|
}
|
|
123
135
|
function ce(t) {
|
|
124
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");
|
|
125
137
|
return `#${n}${e}${o}`;
|
|
126
138
|
}
|
|
127
|
-
function
|
|
139
|
+
function _e(t) {
|
|
128
140
|
const n = t.r / 255, e = t.g / 255, o = t.b / 255, a = Math.max(n, e, o), s = Math.min(n, e, o);
|
|
129
141
|
let l = 0, c;
|
|
130
142
|
const i = (a + s) / 2;
|
|
@@ -151,14 +163,14 @@ function be(t) {
|
|
|
151
163
|
l: Math.round(i * 100)
|
|
152
164
|
};
|
|
153
165
|
}
|
|
154
|
-
function
|
|
166
|
+
function ke(t) {
|
|
155
167
|
const n = t.h / 360, e = t.s / 100, o = t.l / 100;
|
|
156
168
|
let a, s, l;
|
|
157
169
|
if (e === 0)
|
|
158
170
|
a = s = l = o;
|
|
159
171
|
else {
|
|
160
172
|
const c = o < 0.5 ? o * (1 + e) : o + e - o * e, i = 2 * o - c;
|
|
161
|
-
a =
|
|
173
|
+
a = P(i, c, n + 1 / 3), s = P(i, c, n), l = P(i, c, n - 1 / 3);
|
|
162
174
|
}
|
|
163
175
|
return {
|
|
164
176
|
r: Math.round(a * 255),
|
|
@@ -166,26 +178,32 @@ function _e(t) {
|
|
|
166
178
|
b: Math.round(l * 255)
|
|
167
179
|
};
|
|
168
180
|
}
|
|
169
|
-
function
|
|
181
|
+
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
|
-
const
|
|
173
|
-
function
|
|
184
|
+
const Z = "q-theme";
|
|
185
|
+
function Xt() {
|
|
186
|
+
const t = me(Z);
|
|
187
|
+
if (!t)
|
|
188
|
+
throw new Error("[Quidgest UI] Could not find theme instance");
|
|
189
|
+
return t;
|
|
190
|
+
}
|
|
191
|
+
function Oe(t, n) {
|
|
174
192
|
let e = null;
|
|
175
193
|
if (n)
|
|
176
194
|
for (const o of n.themes) {
|
|
177
|
-
const a = o.mode === "light" ? ie :
|
|
195
|
+
const a = o.mode === "light" ? ie : ze;
|
|
178
196
|
if (o.colors) {
|
|
179
197
|
let s;
|
|
180
198
|
for (s in o.colors) {
|
|
181
199
|
const l = o.colors[s];
|
|
182
200
|
if (l && !s.startsWith("on") && !s.endsWith("Light") && !s.endsWith("Dark")) {
|
|
183
|
-
const c =
|
|
184
|
-
i in o.colors || (o.colors[i] = ce(
|
|
201
|
+
const c = be(l), i = `${s}Light`, p = `${s}Dark`;
|
|
202
|
+
i in o.colors || (o.colors[i] = ce(Qe(c, 85))), p in o.colors || (o.colors[p] = ce(Ae(c, 25)));
|
|
185
203
|
}
|
|
186
204
|
}
|
|
187
205
|
}
|
|
188
|
-
o.colors =
|
|
206
|
+
o.colors = Fe(a, o.colors), o.name === n.defaultTheme && (e = o);
|
|
189
207
|
}
|
|
190
208
|
else {
|
|
191
209
|
const o = "default";
|
|
@@ -199,28 +217,28 @@ function Ne(t, n) {
|
|
|
199
217
|
};
|
|
200
218
|
}
|
|
201
219
|
if (e) {
|
|
202
|
-
const o =
|
|
220
|
+
const o = I({
|
|
203
221
|
activeTheme: e.name,
|
|
204
222
|
themes: n.themes
|
|
205
223
|
});
|
|
206
|
-
|
|
224
|
+
Q(
|
|
207
225
|
() => o.value.activeTheme,
|
|
208
226
|
(a) => {
|
|
209
227
|
const s = o.value.themes.find((l) => l.name === a);
|
|
210
|
-
s &&
|
|
228
|
+
s && Me(s.colors);
|
|
211
229
|
},
|
|
212
230
|
{ immediate: !0 }
|
|
213
|
-
), t.provide(
|
|
231
|
+
), t.provide(Z, o);
|
|
214
232
|
}
|
|
215
233
|
}
|
|
216
|
-
function
|
|
234
|
+
function Fe(t, n = {}) {
|
|
217
235
|
return { ...t, ...n };
|
|
218
236
|
}
|
|
219
|
-
function
|
|
237
|
+
function Me(t) {
|
|
220
238
|
let n = document.getElementById(
|
|
221
|
-
|
|
239
|
+
Z
|
|
222
240
|
);
|
|
223
|
-
n || (n = document.createElement("style"), n.type = "text/css", n.id =
|
|
241
|
+
n || (n = document.createElement("style"), n.type = "text/css", n.id = Z, document.head.appendChild(n));
|
|
224
242
|
let e = `:root {
|
|
225
243
|
`, o;
|
|
226
244
|
for (o in t) {
|
|
@@ -228,7 +246,7 @@ function Ke(t) {
|
|
|
228
246
|
if (a) {
|
|
229
247
|
e += ` ${ue(o)}: ${a};
|
|
230
248
|
`;
|
|
231
|
-
const s =
|
|
249
|
+
const s = be(a);
|
|
232
250
|
e += ` ${ue(o)}-rgb: ${s.r} ${s.g} ${s.b};
|
|
233
251
|
`;
|
|
234
252
|
}
|
|
@@ -238,16 +256,19 @@ function Ke(t) {
|
|
|
238
256
|
function ue(t) {
|
|
239
257
|
return t ? `--q-theme-${t.replace(/([A-Z])/g, "-$1").replace(/^-/, "").toLowerCase()}` : "";
|
|
240
258
|
}
|
|
241
|
-
function
|
|
259
|
+
function Zt(t = {}) {
|
|
242
260
|
return { install: (e) => {
|
|
243
|
-
const o = t.
|
|
244
|
-
for (const
|
|
245
|
-
e.
|
|
246
|
-
const a = t.
|
|
247
|
-
|
|
261
|
+
const o = t.components || {};
|
|
262
|
+
for (const l in o)
|
|
263
|
+
e.component(l, o[l]);
|
|
264
|
+
const a = t.directives || {};
|
|
265
|
+
for (const l in a)
|
|
266
|
+
e.directive(l, a[l]);
|
|
267
|
+
const s = t.defaults || {};
|
|
268
|
+
e.provide(ne, s), Oe(e, t.themes);
|
|
248
269
|
} };
|
|
249
270
|
}
|
|
250
|
-
const
|
|
271
|
+
const Re = /* @__PURE__ */ X("svg", { viewBox: "25 25 50 50" }, [
|
|
251
272
|
/* @__PURE__ */ X("circle", {
|
|
252
273
|
class: "path",
|
|
253
274
|
cx: "50",
|
|
@@ -258,9 +279,9 @@ const We = /* @__PURE__ */ X("svg", { viewBox: "25 25 50 50" }, [
|
|
|
258
279
|
"stroke-width": "5",
|
|
259
280
|
"stroke-miterlimit": "10"
|
|
260
281
|
})
|
|
261
|
-
], -1),
|
|
262
|
-
|
|
263
|
-
],
|
|
282
|
+
], -1), He = [
|
|
283
|
+
Re
|
|
284
|
+
], Ue = /* @__PURE__ */ _({
|
|
264
285
|
__name: "QSpinnerLoader",
|
|
265
286
|
props: {
|
|
266
287
|
size: { default: 48 }
|
|
@@ -272,39 +293,36 @@ const We = /* @__PURE__ */ X("svg", { viewBox: "25 25 50 50" }, [
|
|
|
272
293
|
return (o, a) => (r(), f("div", {
|
|
273
294
|
class: "q-spinner-loader",
|
|
274
295
|
style: W(e.value)
|
|
275
|
-
},
|
|
296
|
+
}, He, 4));
|
|
276
297
|
}
|
|
277
298
|
});
|
|
278
|
-
function
|
|
279
|
-
return t == null ? !0 : typeof t == "string" || Array.isArray(t) ? t.length === 0 : typeof t == "object" ? Object.keys(t).length === 0 : !1;
|
|
280
|
-
}
|
|
281
|
-
function Xe(t, n) {
|
|
299
|
+
function Ne(t, n) {
|
|
282
300
|
var e;
|
|
283
301
|
return typeof ((e = t.props) == null ? void 0 : e[n]) < "u";
|
|
284
302
|
}
|
|
285
|
-
function
|
|
303
|
+
function k(t) {
|
|
286
304
|
const n = t.setup;
|
|
287
305
|
return n && (t.setup = (e, o) => {
|
|
288
|
-
const a =
|
|
289
|
-
if (
|
|
306
|
+
const a = Ce();
|
|
307
|
+
if (te(a.value))
|
|
290
308
|
return n(e, o);
|
|
291
309
|
const s = pe();
|
|
292
310
|
if (s === null)
|
|
293
311
|
return n(e, o);
|
|
294
312
|
const l = new Proxy(e, {
|
|
295
313
|
get(c, i) {
|
|
296
|
-
|
|
297
|
-
|
|
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;
|
|
298
317
|
}
|
|
299
318
|
});
|
|
300
319
|
return n(l, o);
|
|
301
320
|
}), t;
|
|
302
321
|
}
|
|
303
|
-
|
|
304
|
-
const Ze = ["disabled", "onClick"], je = {
|
|
322
|
+
const we = k(Ue), Ke = ["disabled", "onClick"], We = {
|
|
305
323
|
key: 0,
|
|
306
324
|
class: "q-btn__spinner"
|
|
307
|
-
},
|
|
325
|
+
}, Ge = { class: "q-btn__content" }, Ye = /* @__PURE__ */ _({
|
|
308
326
|
__name: "QButton",
|
|
309
327
|
props: {
|
|
310
328
|
active: { type: Boolean },
|
|
@@ -341,25 +359,25 @@ const Ze = ["disabled", "onClick"], je = {
|
|
|
341
359
|
});
|
|
342
360
|
return (l, c) => (r(), f("button", {
|
|
343
361
|
type: "button",
|
|
344
|
-
class:
|
|
362
|
+
class: C(s.value),
|
|
345
363
|
disabled: o.value,
|
|
346
|
-
onClick:
|
|
364
|
+
onClick: R(a, ["stop", "prevent"])
|
|
347
365
|
}, [
|
|
348
|
-
l.loading ? (r(), f("div",
|
|
349
|
-
|
|
366
|
+
l.loading ? (r(), f("div", We, [
|
|
367
|
+
H(g(we), { size: 23 })
|
|
350
368
|
])) : b("", !0),
|
|
351
|
-
X("span",
|
|
352
|
-
l.iconOnRight ? (r(), f(
|
|
353
|
-
|
|
369
|
+
X("span", Ge, [
|
|
370
|
+
l.iconOnRight ? (r(), f(A, { key: 0 }, [
|
|
371
|
+
N(V(e.label), 1)
|
|
354
372
|
], 64)) : b("", !0),
|
|
355
|
-
|
|
356
|
-
l.iconOnRight ? b("", !0) : (r(), f(
|
|
357
|
-
|
|
373
|
+
q(l.$slots, "default"),
|
|
374
|
+
l.iconOnRight ? b("", !0) : (r(), f(A, { key: 1 }, [
|
|
375
|
+
N(V(e.label), 1)
|
|
358
376
|
], 64))
|
|
359
377
|
])
|
|
360
|
-
], 10,
|
|
378
|
+
], 10, Ke));
|
|
361
379
|
}
|
|
362
|
-
}),
|
|
380
|
+
}), Xe = k(Ye), Ze = /* @__PURE__ */ _({
|
|
363
381
|
__name: "QButtonGroup",
|
|
364
382
|
props: {
|
|
365
383
|
bStyle: {},
|
|
@@ -369,11 +387,11 @@ const Ze = ["disabled", "onClick"], je = {
|
|
|
369
387
|
},
|
|
370
388
|
setup(t) {
|
|
371
389
|
const n = t;
|
|
372
|
-
|
|
390
|
+
Ve({
|
|
373
391
|
QButton: {
|
|
374
|
-
bStyle:
|
|
375
|
-
disabled:
|
|
376
|
-
borderless:
|
|
392
|
+
bStyle: J(n, "bStyle"),
|
|
393
|
+
disabled: J(n, "disabled"),
|
|
394
|
+
borderless: J(n, "borderless"),
|
|
377
395
|
elevated: !1
|
|
378
396
|
}
|
|
379
397
|
});
|
|
@@ -384,12 +402,12 @@ const Ze = ["disabled", "onClick"], je = {
|
|
|
384
402
|
}
|
|
385
403
|
]);
|
|
386
404
|
return (o, a) => (r(), f("div", {
|
|
387
|
-
class:
|
|
405
|
+
class: C(e.value)
|
|
388
406
|
}, [
|
|
389
|
-
|
|
407
|
+
q(o.$slots, "default")
|
|
390
408
|
], 2));
|
|
391
409
|
}
|
|
392
|
-
}),
|
|
410
|
+
}), je = k(Ze), Je = /* @__PURE__ */ _({
|
|
393
411
|
__name: "QButtonToggle",
|
|
394
412
|
props: {
|
|
395
413
|
modelValue: {},
|
|
@@ -401,8 +419,8 @@ const Ze = ["disabled", "onClick"], je = {
|
|
|
401
419
|
},
|
|
402
420
|
emits: ["update:modelValue"],
|
|
403
421
|
setup(t, { emit: n }) {
|
|
404
|
-
const e = t, o =
|
|
405
|
-
|
|
422
|
+
const e = t, o = I(e.modelValue);
|
|
423
|
+
Q(
|
|
406
424
|
() => e.modelValue,
|
|
407
425
|
(l) => o.value = l
|
|
408
426
|
);
|
|
@@ -417,14 +435,14 @@ const Ze = ["disabled", "onClick"], je = {
|
|
|
417
435
|
function s(l) {
|
|
418
436
|
a.value === l.key && !e.mandatory ? a.value = void 0 : a.value = l.key;
|
|
419
437
|
}
|
|
420
|
-
return (l, c) => (r(),
|
|
438
|
+
return (l, c) => (r(), w(g(je), {
|
|
421
439
|
"b-style": "secondary",
|
|
422
440
|
disabled: e.disabled,
|
|
423
441
|
borderless: e.borderless,
|
|
424
442
|
elevated: e.elevated
|
|
425
443
|
}, {
|
|
426
444
|
default: E(() => [
|
|
427
|
-
(r(!0), f(
|
|
445
|
+
(r(!0), f(A, null, ee(e.options, (i) => (r(), w(g(Xe), {
|
|
428
446
|
key: i.key,
|
|
429
447
|
title: i.title,
|
|
430
448
|
label: i.label,
|
|
@@ -432,7 +450,7 @@ const Ze = ["disabled", "onClick"], je = {
|
|
|
432
450
|
onClick: (p) => s(i)
|
|
433
451
|
}, {
|
|
434
452
|
default: E(() => [
|
|
435
|
-
|
|
453
|
+
q(l.$slots, i.key)
|
|
436
454
|
]),
|
|
437
455
|
_: 2
|
|
438
456
|
}, 1032, ["title", "label", "active", "onClick"]))), 128))
|
|
@@ -440,7 +458,7 @@ const Ze = ["disabled", "onClick"], je = {
|
|
|
440
458
|
_: 3
|
|
441
459
|
}, 8, ["disabled", "borderless", "elevated"]));
|
|
442
460
|
}
|
|
443
|
-
}),
|
|
461
|
+
}), jt = k(Je), Pe = /* @__PURE__ */ _({
|
|
444
462
|
__name: "QIcon",
|
|
445
463
|
props: {
|
|
446
464
|
name: {},
|
|
@@ -451,21 +469,21 @@ const Ze = ["disabled", "onClick"], je = {
|
|
|
451
469
|
const n = t, e = y(() => {
|
|
452
470
|
switch (n.type) {
|
|
453
471
|
case "svg":
|
|
454
|
-
return
|
|
472
|
+
return ct;
|
|
455
473
|
case "font":
|
|
456
|
-
return
|
|
474
|
+
return rt;
|
|
457
475
|
case "img":
|
|
458
|
-
return
|
|
476
|
+
return it;
|
|
459
477
|
default:
|
|
460
478
|
return;
|
|
461
479
|
}
|
|
462
480
|
});
|
|
463
|
-
return (o, a) => (r(),
|
|
481
|
+
return (o, a) => (r(), w(he(e.value), {
|
|
464
482
|
icon: n.name,
|
|
465
483
|
size: n.size
|
|
466
484
|
}, null, 8, ["icon", "size"]));
|
|
467
485
|
}
|
|
468
|
-
}),
|
|
486
|
+
}), et = /* @__PURE__ */ _({
|
|
469
487
|
__name: "QIconFont",
|
|
470
488
|
props: {
|
|
471
489
|
icon: {},
|
|
@@ -479,11 +497,11 @@ const Ze = ["disabled", "onClick"], je = {
|
|
|
479
497
|
}));
|
|
480
498
|
return (a, s) => n.icon ? (r(), f("i", {
|
|
481
499
|
key: 0,
|
|
482
|
-
class:
|
|
500
|
+
class: C(["q-icon", "q-icon__font", e.value, `${n.library}-${n.icon}`]),
|
|
483
501
|
style: W(o.value)
|
|
484
502
|
}, null, 6)) : b("", !0);
|
|
485
503
|
}
|
|
486
|
-
}), tt = ["src"],
|
|
504
|
+
}), tt = ["src"], nt = /* @__PURE__ */ _({
|
|
487
505
|
__name: "QIconImg",
|
|
488
506
|
props: {
|
|
489
507
|
icon: {},
|
|
@@ -500,7 +518,7 @@ const Ze = ["disabled", "onClick"], je = {
|
|
|
500
518
|
style: W(e.value)
|
|
501
519
|
}, null, 12, tt)) : b("", !0);
|
|
502
520
|
}
|
|
503
|
-
}),
|
|
521
|
+
}), M = {}, ot = _({
|
|
504
522
|
name: "InlineSvg",
|
|
505
523
|
emits: ["loaded", "unloaded", "error"],
|
|
506
524
|
inheritAttrs: !1,
|
|
@@ -556,7 +574,7 @@ const Ze = ["disabled", "onClick"], je = {
|
|
|
556
574
|
o !== !1 && o !== null && o !== void 0 && (t[e] = o);
|
|
557
575
|
},
|
|
558
576
|
getSvgContent(t) {
|
|
559
|
-
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);
|
|
560
578
|
},
|
|
561
579
|
/**
|
|
562
580
|
* Get svgElSource
|
|
@@ -564,11 +582,11 @@ const Ze = ["disabled", "onClick"], je = {
|
|
|
564
582
|
*/
|
|
565
583
|
async getSource(t) {
|
|
566
584
|
try {
|
|
567
|
-
|
|
568
|
-
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];
|
|
569
587
|
this.svgElSource = n, await this.$nextTick(), this.$emit("loaded", this.$el);
|
|
570
588
|
} catch (n) {
|
|
571
|
-
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);
|
|
572
590
|
}
|
|
573
591
|
},
|
|
574
592
|
/**
|
|
@@ -592,7 +610,7 @@ const Ze = ["disabled", "onClick"], je = {
|
|
|
592
610
|
}
|
|
593
611
|
}
|
|
594
612
|
});
|
|
595
|
-
function
|
|
613
|
+
function at(t, n) {
|
|
596
614
|
const e = t.getElementsByTagName("title");
|
|
597
615
|
if (e.length)
|
|
598
616
|
e[0].textContent = n;
|
|
@@ -601,7 +619,7 @@ function ot(t, n) {
|
|
|
601
619
|
o.textContent = n, t.insertBefore(o, t.firstChild);
|
|
602
620
|
}
|
|
603
621
|
}
|
|
604
|
-
function
|
|
622
|
+
function st(t) {
|
|
605
623
|
if (t.getIsPending)
|
|
606
624
|
return t;
|
|
607
625
|
let n = !0;
|
|
@@ -613,7 +631,7 @@ function at(t) {
|
|
|
613
631
|
);
|
|
614
632
|
return e.getIsPending = () => n, e;
|
|
615
633
|
}
|
|
616
|
-
const
|
|
634
|
+
const lt = /* @__PURE__ */ _({
|
|
617
635
|
__name: "QIconSvg",
|
|
618
636
|
props: {
|
|
619
637
|
icon: {},
|
|
@@ -625,7 +643,7 @@ const $e = /* @__PURE__ */ _({
|
|
|
625
643
|
const e = t, o = y(() => ({
|
|
626
644
|
"font-size": e.size !== void 0 ? `${e.size}px` : void 0
|
|
627
645
|
}));
|
|
628
|
-
return (a, s) => e.icon ? (r(),
|
|
646
|
+
return (a, s) => e.icon ? (r(), w(g(ot), {
|
|
629
647
|
key: 0,
|
|
630
648
|
class: "q-icon q-icon__svg",
|
|
631
649
|
src: e.bundle,
|
|
@@ -635,18 +653,13 @@ const $e = /* @__PURE__ */ _({
|
|
|
635
653
|
onUnloaded: s[1] || (s[1] = (l) => n("unloaded", l))
|
|
636
654
|
}, null, 8, ["src", "symbol", "style"])) : b("", !0);
|
|
637
655
|
}
|
|
638
|
-
})
|
|
639
|
-
A(O);
|
|
640
|
-
A(ke);
|
|
641
|
-
A(we);
|
|
642
|
-
A($e);
|
|
643
|
-
const st = {
|
|
656
|
+
}), U = k(Pe), rt = k(et), it = k(nt), ct = k(lt), ut = {
|
|
644
657
|
key: 0,
|
|
645
658
|
class: "q-input__prepend"
|
|
646
|
-
},
|
|
659
|
+
}, dt = {
|
|
647
660
|
key: 1,
|
|
648
661
|
class: "q-input__append"
|
|
649
|
-
},
|
|
662
|
+
}, ft = /* @__PURE__ */ _({
|
|
650
663
|
__name: "QInput",
|
|
651
664
|
props: {
|
|
652
665
|
size: { default: "medium" },
|
|
@@ -656,31 +669,31 @@ const st = {
|
|
|
656
669
|
setup(t) {
|
|
657
670
|
const n = t;
|
|
658
671
|
return (e, o) => (r(), f("div", {
|
|
659
|
-
class:
|
|
672
|
+
class: C([
|
|
660
673
|
"q-input",
|
|
661
674
|
`q-input--${n.size}`,
|
|
662
675
|
{ "q-input--readonly": n.readonly, "q-input--disabled": n.disabled }
|
|
663
676
|
])
|
|
664
677
|
}, [
|
|
665
|
-
e.$slots.prepend ? (r(), f("div",
|
|
666
|
-
|
|
678
|
+
e.$slots.prepend ? (r(), f("div", ut, [
|
|
679
|
+
q(e.$slots, "prepend")
|
|
667
680
|
])) : b("", !0),
|
|
668
|
-
|
|
669
|
-
e.$slots.append ? (r(), f("div",
|
|
670
|
-
|
|
681
|
+
q(e.$slots, "default"),
|
|
682
|
+
e.$slots.append ? (r(), f("div", dt, [
|
|
683
|
+
q(e.$slots, "append")
|
|
671
684
|
])) : b("", !0)
|
|
672
685
|
], 2));
|
|
673
686
|
}
|
|
674
|
-
}),
|
|
687
|
+
}), pt = k(ft), mt = (t, n) => {
|
|
675
688
|
const e = t.__vccOpts || t;
|
|
676
689
|
for (const [o, a] of n)
|
|
677
690
|
e[o] = a;
|
|
678
691
|
return e;
|
|
679
|
-
},
|
|
680
|
-
function
|
|
681
|
-
return r(), f("div",
|
|
692
|
+
}, ht = {}, yt = { class: "q-line-loader" };
|
|
693
|
+
function vt(t, n) {
|
|
694
|
+
return r(), f("div", yt);
|
|
682
695
|
}
|
|
683
|
-
const
|
|
696
|
+
const gt = /* @__PURE__ */ mt(ht, [["render", vt]]), Jt = k(gt), bt = /* @__PURE__ */ _({
|
|
684
697
|
__name: "QList",
|
|
685
698
|
props: {
|
|
686
699
|
modelValue: { type: [String, Number, Boolean, Symbol], default: void 0 },
|
|
@@ -692,15 +705,15 @@ const Vt = /* @__PURE__ */ it(ct, [["render", dt]]), Se = /* @__PURE__ */ _({
|
|
|
692
705
|
},
|
|
693
706
|
emits: ["update:modelValue"],
|
|
694
707
|
setup(t, { expose: n, emit: e }) {
|
|
695
|
-
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);
|
|
696
709
|
function i(d) {
|
|
697
710
|
a.value = d, e("update:modelValue", d);
|
|
698
711
|
}
|
|
699
712
|
function p() {
|
|
700
713
|
let d = 0;
|
|
701
|
-
a.value && (d = o.items.findIndex((
|
|
714
|
+
a.value && (d = o.items.findIndex((S) => S[o.itemValue] === a.value)), x(d);
|
|
702
715
|
}
|
|
703
|
-
function
|
|
716
|
+
function $(d) {
|
|
704
717
|
switch (["ArrowDown", "ArrowUp", "Home", "End"].includes(d.key) && d.preventDefault(), d.key) {
|
|
705
718
|
case "ArrowDown":
|
|
706
719
|
m("next");
|
|
@@ -720,61 +733,61 @@ const Vt = /* @__PURE__ */ it(ct, [["render", dt]]), Se = /* @__PURE__ */ _({
|
|
|
720
733
|
switch (d) {
|
|
721
734
|
case "next":
|
|
722
735
|
case "prev":
|
|
723
|
-
|
|
736
|
+
x(F(d));
|
|
724
737
|
break;
|
|
725
738
|
case "first":
|
|
726
|
-
|
|
739
|
+
x(0);
|
|
727
740
|
break;
|
|
728
741
|
case "last":
|
|
729
|
-
|
|
742
|
+
x(-1);
|
|
730
743
|
break;
|
|
731
744
|
}
|
|
732
745
|
}
|
|
733
|
-
function
|
|
746
|
+
function x(d) {
|
|
734
747
|
var v;
|
|
735
|
-
(v =
|
|
748
|
+
(v = T().at(d)) == null || v.focus();
|
|
736
749
|
}
|
|
737
|
-
function
|
|
750
|
+
function T() {
|
|
738
751
|
var v;
|
|
739
752
|
const d = (v = c.value) == null ? void 0 : v.querySelectorAll("li");
|
|
740
|
-
return d ? Array.from(d).filter((
|
|
753
|
+
return d ? Array.from(d).filter((D) => D.tabIndex !== -1) : [];
|
|
741
754
|
}
|
|
742
|
-
function
|
|
755
|
+
function O(d) {
|
|
743
756
|
return d.indexOf(document.activeElement);
|
|
744
757
|
}
|
|
745
|
-
function
|
|
746
|
-
const
|
|
747
|
-
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;
|
|
748
761
|
}
|
|
749
|
-
function
|
|
750
|
-
return d ? o.items.filter((
|
|
762
|
+
function z(d) {
|
|
763
|
+
return d ? o.items.filter((S) => S.group === d) : o.items;
|
|
751
764
|
}
|
|
752
|
-
return
|
|
765
|
+
return Q(
|
|
753
766
|
() => o.modelValue,
|
|
754
767
|
(d) => {
|
|
755
768
|
a.value = d;
|
|
756
769
|
}
|
|
757
|
-
), n({ focusItem:
|
|
770
|
+
), n({ focusItem: x }), (d, S) => (r(), w(he(s.value), {
|
|
758
771
|
ref_key: "listRef",
|
|
759
772
|
ref: c,
|
|
760
|
-
class:
|
|
773
|
+
class: C(["q-list", { "q-list--disabled": o.disabled }]),
|
|
761
774
|
role: "listbox",
|
|
762
775
|
tabindex: o.disabled ? -1 : 0,
|
|
763
776
|
onFocus: p,
|
|
764
|
-
onKeydown:
|
|
777
|
+
onKeydown: $
|
|
765
778
|
}, {
|
|
766
779
|
default: E(() => [
|
|
767
|
-
(r(!0), f(
|
|
780
|
+
(r(!0), f(A, null, ee(l.value, (v) => (r(), w(g(It), K({
|
|
768
781
|
key: v.title
|
|
769
782
|
}, v), {
|
|
770
783
|
default: E(() => [
|
|
771
|
-
(r(!0), f(
|
|
772
|
-
key:
|
|
773
|
-
value:
|
|
774
|
-
label:
|
|
775
|
-
icon:
|
|
776
|
-
disabled: o.disabled ||
|
|
777
|
-
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],
|
|
778
791
|
onSelect: i
|
|
779
792
|
}, null, 8, ["value", "label", "icon", "disabled", "selected"]))), 128))
|
|
780
793
|
]),
|
|
@@ -784,11 +797,11 @@ const Vt = /* @__PURE__ */ it(ct, [["render", dt]]), Se = /* @__PURE__ */ _({
|
|
|
784
797
|
_: 1
|
|
785
798
|
}, 40, ["class", "tabindex"]));
|
|
786
799
|
}
|
|
787
|
-
}),
|
|
800
|
+
}), _t = ["tabindex", "aria-label", "aria-selected", "onClick"], kt = {
|
|
788
801
|
check: {
|
|
789
802
|
name: "check"
|
|
790
803
|
}
|
|
791
|
-
},
|
|
804
|
+
}, wt = /* @__PURE__ */ _({
|
|
792
805
|
__name: "QListItem",
|
|
793
806
|
props: {
|
|
794
807
|
value: { type: [String, Number, Boolean, Symbol] },
|
|
@@ -796,7 +809,7 @@ const Vt = /* @__PURE__ */ it(ct, [["render", dt]]), Se = /* @__PURE__ */ _({
|
|
|
796
809
|
icon: { default: void 0 },
|
|
797
810
|
selected: { type: Boolean, default: !1 },
|
|
798
811
|
highlighted: { type: Boolean, default: !1 },
|
|
799
|
-
icons: { default: () =>
|
|
812
|
+
icons: { default: () => kt },
|
|
800
813
|
disabled: { type: Boolean, default: !1 }
|
|
801
814
|
},
|
|
802
815
|
emits: ["select"],
|
|
@@ -811,7 +824,7 @@ const Vt = /* @__PURE__ */ it(ct, [["render", dt]]), Se = /* @__PURE__ */ _({
|
|
|
811
824
|
return (s, l) => (r(), f("li", {
|
|
812
825
|
role: "option",
|
|
813
826
|
tabindex: e.disabled ? void 0 : -2,
|
|
814
|
-
class:
|
|
827
|
+
class: C([
|
|
815
828
|
"q-list-item",
|
|
816
829
|
{
|
|
817
830
|
"q-list-item--disabled": e.disabled,
|
|
@@ -822,22 +835,22 @@ const Vt = /* @__PURE__ */ it(ct, [["render", dt]]), Se = /* @__PURE__ */ _({
|
|
|
822
835
|
"aria-label": e.label,
|
|
823
836
|
"aria-selected": e.disabled ? void 0 : e.selected,
|
|
824
837
|
onKeydown: a,
|
|
825
|
-
onClick:
|
|
838
|
+
onClick: R(o, ["stop", "prevent"])
|
|
826
839
|
}, [
|
|
827
|
-
e.icon ? (r(),
|
|
828
|
-
|
|
829
|
-
e.selected ? (r(),
|
|
830
|
-
], 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));
|
|
831
844
|
}
|
|
832
845
|
});
|
|
833
|
-
let
|
|
834
|
-
function
|
|
835
|
-
return `uid-${
|
|
846
|
+
let $t = 0;
|
|
847
|
+
function St() {
|
|
848
|
+
return `uid-${++$t}`;
|
|
836
849
|
}
|
|
837
|
-
const
|
|
850
|
+
const Bt = ["aria-labelledby"], Lt = ["id"], xt = /* @__PURE__ */ _({
|
|
838
851
|
__name: "QListItemGroup",
|
|
839
852
|
props: {
|
|
840
|
-
id: { default: () =>
|
|
853
|
+
id: { default: () => St() },
|
|
841
854
|
title: { default: "" },
|
|
842
855
|
disabled: { type: Boolean, default: !1 }
|
|
843
856
|
},
|
|
@@ -854,20 +867,17 @@ const yt = ["aria-labelledby"], vt = ["id"], Le = /* @__PURE__ */ _({
|
|
|
854
867
|
id: n.id,
|
|
855
868
|
class: "q-list-item-group__title",
|
|
856
869
|
role: "presentation"
|
|
857
|
-
},
|
|
858
|
-
|
|
859
|
-
], 8,
|
|
870
|
+
}, V(n.title), 9, Lt)) : b("", !0),
|
|
871
|
+
q(e.$slots, "default")
|
|
872
|
+
], 8, Bt)) : q(e.$slots, "default", { key: 0 });
|
|
860
873
|
}
|
|
861
|
-
});
|
|
862
|
-
|
|
863
|
-
A(Be);
|
|
864
|
-
A(Le);
|
|
865
|
-
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) {
|
|
866
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;
|
|
867
|
-
let
|
|
868
|
-
c &&
|
|
869
|
-
const m = { x: 0, y: 0, placement:
|
|
870
|
-
switch (
|
|
877
|
+
let $ = e;
|
|
878
|
+
c && !$e(a, c, $) && ($ = Tt(a, c, $));
|
|
879
|
+
const m = { x: 0, y: 0, placement: $ };
|
|
880
|
+
switch ($) {
|
|
871
881
|
case "top":
|
|
872
882
|
o === "anchor" ? m.x = s : m.x = s + (a.width - i) / 2, m.y = l - p;
|
|
873
883
|
break;
|
|
@@ -883,7 +893,7 @@ function gt(t, n, e = "right", o) {
|
|
|
883
893
|
}
|
|
884
894
|
return o === "anchor" && (m.width = a.width), m;
|
|
885
895
|
}
|
|
886
|
-
function
|
|
896
|
+
function $e(t, n, e) {
|
|
887
897
|
let o = !1, a = !1;
|
|
888
898
|
switch (e) {
|
|
889
899
|
case "top":
|
|
@@ -907,7 +917,7 @@ function de(t, n) {
|
|
|
907
917
|
function fe(t, n) {
|
|
908
918
|
return window.innerWidth - t.left - t.width / 2 > n.width / 2 && t.left + t.width / 2 > n.width / 2;
|
|
909
919
|
}
|
|
910
|
-
function
|
|
920
|
+
function Tt(t, n, e) {
|
|
911
921
|
const o = {
|
|
912
922
|
top: ["bottom", "left", "right"],
|
|
913
923
|
bottom: ["top", "left", "right"],
|
|
@@ -915,17 +925,17 @@ function bt(t, n, e) {
|
|
|
915
925
|
right: ["left", "top", "bottom"]
|
|
916
926
|
};
|
|
917
927
|
for (const a of o[e])
|
|
918
|
-
if (
|
|
928
|
+
if ($e(t, n, a))
|
|
919
929
|
return a;
|
|
920
930
|
return e;
|
|
921
931
|
}
|
|
922
932
|
function Y(t) {
|
|
923
933
|
return typeof t == "string" ? document.querySelector(t) : t && "$el" in t ? t.$el : t;
|
|
924
934
|
}
|
|
925
|
-
const
|
|
935
|
+
const Ct = {
|
|
926
936
|
key: 0,
|
|
927
937
|
class: "q-overlay__arrow"
|
|
928
|
-
},
|
|
938
|
+
}, Vt = /* @__PURE__ */ _({
|
|
929
939
|
__name: "QOverlay",
|
|
930
940
|
props: {
|
|
931
941
|
modelValue: { type: Boolean },
|
|
@@ -950,25 +960,25 @@ const _t = {
|
|
|
950
960
|
`q-overlay--${a.placement}`,
|
|
951
961
|
{ "q-overlay--inverted": e.appearance === "inverted" },
|
|
952
962
|
...e.contentClasses
|
|
953
|
-
]), a =
|
|
963
|
+
]), a = Be({
|
|
954
964
|
visible: e.modelValue,
|
|
955
965
|
top: 0,
|
|
956
966
|
left: 0,
|
|
957
967
|
width: 0,
|
|
958
968
|
placement: e.placement
|
|
959
969
|
}), s = y(() => a.visible && !e.disabled);
|
|
960
|
-
|
|
970
|
+
Q(
|
|
961
971
|
() => e.modelValue,
|
|
962
972
|
() => a.visible = e.modelValue
|
|
963
973
|
);
|
|
964
974
|
const l = y(() => {
|
|
965
|
-
let h = 0,
|
|
975
|
+
let h = 0, B = 0;
|
|
966
976
|
switch (a.placement) {
|
|
967
977
|
case "top":
|
|
968
|
-
|
|
978
|
+
B = -(e.offset || 0);
|
|
969
979
|
break;
|
|
970
980
|
case "bottom":
|
|
971
|
-
|
|
981
|
+
B = e.offset || 0;
|
|
972
982
|
break;
|
|
973
983
|
case "left":
|
|
974
984
|
h = -(e.offset || 0);
|
|
@@ -978,49 +988,49 @@ const _t = {
|
|
|
978
988
|
break;
|
|
979
989
|
}
|
|
980
990
|
const u = {
|
|
981
|
-
top: `${a.top +
|
|
991
|
+
top: `${a.top + B}px`,
|
|
982
992
|
left: `${a.left + h}px`
|
|
983
993
|
};
|
|
984
994
|
return a.width !== void 0 && ["top", "bottom"].includes(a.placement) && (u.width = `${a.width}px`), u;
|
|
985
|
-
}), c =
|
|
995
|
+
}), c = I(null);
|
|
986
996
|
function i() {
|
|
987
997
|
const h = Y(e.anchor);
|
|
988
998
|
if (h) {
|
|
989
|
-
const
|
|
990
|
-
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;
|
|
991
1001
|
}
|
|
992
1002
|
}
|
|
993
|
-
|
|
1003
|
+
Q([() => s.value, () => e.placement], i);
|
|
994
1004
|
let p;
|
|
995
|
-
function
|
|
1005
|
+
function $() {
|
|
996
1006
|
const h = e.trigger === "hover" ? e.delay : 0;
|
|
997
1007
|
p || (p = window.setTimeout(() => a.visible = !0, h));
|
|
998
1008
|
}
|
|
999
1009
|
function m() {
|
|
1000
1010
|
clearTimeout(p), p = void 0, a.visible = !1;
|
|
1001
1011
|
}
|
|
1002
|
-
function
|
|
1003
|
-
s.value ? m() :
|
|
1012
|
+
function x() {
|
|
1013
|
+
s.value ? m() : $();
|
|
1004
1014
|
}
|
|
1005
|
-
let
|
|
1006
|
-
function
|
|
1015
|
+
let T;
|
|
1016
|
+
function O() {
|
|
1007
1017
|
le(() => {
|
|
1008
1018
|
const h = Y(e.anchor);
|
|
1009
1019
|
if (h)
|
|
1010
1020
|
switch (e.trigger) {
|
|
1011
1021
|
case "click":
|
|
1012
|
-
h.addEventListener("click",
|
|
1022
|
+
h.addEventListener("click", x);
|
|
1013
1023
|
break;
|
|
1014
1024
|
case "hover":
|
|
1015
|
-
h.addEventListener("mouseenter",
|
|
1025
|
+
h.addEventListener("mouseenter", $), h.addEventListener("mouseleave", m);
|
|
1016
1026
|
break;
|
|
1017
1027
|
}
|
|
1018
1028
|
});
|
|
1019
1029
|
}
|
|
1020
|
-
function
|
|
1030
|
+
function F() {
|
|
1021
1031
|
le(() => {
|
|
1022
1032
|
const h = Y(e.anchor);
|
|
1023
|
-
h && (window.addEventListener("scroll", i), window.addEventListener("resize", i),
|
|
1033
|
+
h && (window.addEventListener("scroll", i), window.addEventListener("resize", i), T = new MutationObserver(i), T.observe(h, {
|
|
1024
1034
|
attributes: !1,
|
|
1025
1035
|
childList: !0,
|
|
1026
1036
|
characterData: !0,
|
|
@@ -1028,55 +1038,55 @@ const _t = {
|
|
|
1028
1038
|
}), i());
|
|
1029
1039
|
});
|
|
1030
1040
|
}
|
|
1031
|
-
function
|
|
1032
|
-
window.removeEventListener("scroll", i), window.removeEventListener("resize", i),
|
|
1041
|
+
function z() {
|
|
1042
|
+
window.removeEventListener("scroll", i), window.removeEventListener("resize", i), T == null || T.disconnect();
|
|
1033
1043
|
}
|
|
1034
1044
|
let d;
|
|
1035
|
-
function
|
|
1036
|
-
Y(e.anchor) ? (i(), d = window.setTimeout(
|
|
1045
|
+
function S() {
|
|
1046
|
+
Y(e.anchor) ? (i(), d = window.setTimeout(S, 100)) : m();
|
|
1037
1047
|
}
|
|
1038
1048
|
function v() {
|
|
1039
|
-
|
|
1049
|
+
F(), e.spy && S();
|
|
1040
1050
|
}
|
|
1041
|
-
function
|
|
1042
|
-
|
|
1051
|
+
function D() {
|
|
1052
|
+
z(), e.spy && (clearTimeout(d), d = void 0);
|
|
1043
1053
|
}
|
|
1044
|
-
return
|
|
1054
|
+
return Le(D), xe(i), Q(
|
|
1045
1055
|
() => e.disabled,
|
|
1046
1056
|
(h) => {
|
|
1047
|
-
h ||
|
|
1057
|
+
h || O();
|
|
1048
1058
|
},
|
|
1049
1059
|
{ immediate: !0 }
|
|
1050
|
-
),
|
|
1060
|
+
), Q(
|
|
1051
1061
|
() => s.value,
|
|
1052
1062
|
(h) => {
|
|
1053
|
-
h ? v() :
|
|
1063
|
+
h ? v() : D();
|
|
1054
1064
|
},
|
|
1055
1065
|
{ immediate: !0 }
|
|
1056
|
-
), (h,
|
|
1057
|
-
|
|
1058
|
-
(r(),
|
|
1066
|
+
), (h, B) => (r(), f(A, null, [
|
|
1067
|
+
q(h.$slots, "trigger", { open: s.value }),
|
|
1068
|
+
(r(), w(qe, {
|
|
1059
1069
|
to: e.attach
|
|
1060
1070
|
}, [
|
|
1061
|
-
|
|
1071
|
+
H(De, {
|
|
1062
1072
|
name: e.transition,
|
|
1063
1073
|
appear: "",
|
|
1064
|
-
onEnter:
|
|
1065
|
-
onLeave:
|
|
1074
|
+
onEnter: B[0] || (B[0] = (u) => n("enter")),
|
|
1075
|
+
onLeave: B[1] || (B[1] = (u) => n("leave"))
|
|
1066
1076
|
}, {
|
|
1067
1077
|
default: E(() => [
|
|
1068
1078
|
s.value ? (r(), f("div", {
|
|
1069
1079
|
key: 0,
|
|
1070
|
-
class:
|
|
1080
|
+
class: C(o.value),
|
|
1071
1081
|
style: W(l.value)
|
|
1072
1082
|
}, [
|
|
1073
1083
|
X("div", {
|
|
1074
|
-
class:
|
|
1084
|
+
class: C(["q-overlay__content"]),
|
|
1075
1085
|
ref_key: "overlay",
|
|
1076
1086
|
ref: c
|
|
1077
1087
|
}, [
|
|
1078
|
-
e.arrow ? (r(), f("div",
|
|
1079
|
-
|
|
1088
|
+
e.arrow ? (r(), f("div", Ct)) : b("", !0),
|
|
1089
|
+
q(h.$slots, "default")
|
|
1080
1090
|
], 512)
|
|
1081
1091
|
], 6)) : b("", !0)
|
|
1082
1092
|
]),
|
|
@@ -1085,13 +1095,13 @@ const _t = {
|
|
|
1085
1095
|
], 8, ["to"]))
|
|
1086
1096
|
], 64));
|
|
1087
1097
|
}
|
|
1088
|
-
}),
|
|
1098
|
+
}), oe = k(Vt), zt = {
|
|
1089
1099
|
key: 0,
|
|
1090
1100
|
class: "q-popover__header"
|
|
1091
|
-
},
|
|
1101
|
+
}, Qt = {
|
|
1092
1102
|
key: 1,
|
|
1093
1103
|
class: "q-popover__body"
|
|
1094
|
-
},
|
|
1104
|
+
}, At = ["innerHTML"], Ot = { key: 1 }, Ft = /* @__PURE__ */ _({
|
|
1095
1105
|
__name: "QPopover",
|
|
1096
1106
|
props: {
|
|
1097
1107
|
modelValue: { type: Boolean },
|
|
@@ -1107,7 +1117,7 @@ const _t = {
|
|
|
1107
1117
|
},
|
|
1108
1118
|
setup(t) {
|
|
1109
1119
|
const n = t;
|
|
1110
|
-
return (e, o) => (r(),
|
|
1120
|
+
return (e, o) => (r(), w(g(oe), {
|
|
1111
1121
|
"model-value": n.modelValue,
|
|
1112
1122
|
trigger: "click",
|
|
1113
1123
|
anchor: n.anchor,
|
|
@@ -1119,22 +1129,22 @@ const _t = {
|
|
|
1119
1129
|
spy: n.spy
|
|
1120
1130
|
}, {
|
|
1121
1131
|
default: E(() => [
|
|
1122
|
-
n.title || e.$slots.header ? (r(), f("h3",
|
|
1123
|
-
|
|
1124
|
-
|
|
1132
|
+
n.title || e.$slots.header ? (r(), f("h3", zt, [
|
|
1133
|
+
N(V(n.title) + " ", 1),
|
|
1134
|
+
q(e.$slots, "header")
|
|
1125
1135
|
])) : b("", !0),
|
|
1126
|
-
n.text || e.$slots.body ? (r(), f("div",
|
|
1136
|
+
n.text || e.$slots.body ? (r(), f("div", Qt, [
|
|
1127
1137
|
n.html ? (r(), f("span", {
|
|
1128
1138
|
key: 0,
|
|
1129
1139
|
innerHTML: n.text
|
|
1130
|
-
}, null, 8,
|
|
1131
|
-
|
|
1140
|
+
}, null, 8, At)) : (r(), f("span", Ot, V(n.text), 1)),
|
|
1141
|
+
q(e.$slots, "body")
|
|
1132
1142
|
])) : b("", !0)
|
|
1133
1143
|
]),
|
|
1134
1144
|
_: 3
|
|
1135
1145
|
}, 8, ["model-value", "anchor", "arrow", "attach", "disabled", "placement", "spy"]));
|
|
1136
1146
|
}
|
|
1137
|
-
}),
|
|
1147
|
+
}), Pt = k(Ft), Mt = {
|
|
1138
1148
|
mounted(t, n) {
|
|
1139
1149
|
t.clickOutsideEvent = function(e) {
|
|
1140
1150
|
const o = e.target;
|
|
@@ -1144,19 +1154,19 @@ const _t = {
|
|
|
1144
1154
|
unmounted(t) {
|
|
1145
1155
|
document.removeEventListener("click", t.clickOutsideEvent);
|
|
1146
1156
|
}
|
|
1147
|
-
},
|
|
1157
|
+
}, Rt = {
|
|
1148
1158
|
key: 1,
|
|
1149
1159
|
class: "q-select__placeholder"
|
|
1150
|
-
},
|
|
1160
|
+
}, Ht = {
|
|
1151
1161
|
placeholder: "Choose..."
|
|
1152
|
-
},
|
|
1162
|
+
}, Ut = {
|
|
1153
1163
|
chevron: {
|
|
1154
1164
|
name: "chevron-down"
|
|
1155
1165
|
},
|
|
1156
1166
|
clear: {
|
|
1157
1167
|
name: "close"
|
|
1158
1168
|
}
|
|
1159
|
-
},
|
|
1169
|
+
}, Nt = /* @__PURE__ */ _({
|
|
1160
1170
|
__name: "QSelect",
|
|
1161
1171
|
props: {
|
|
1162
1172
|
modelValue: { type: [String, Number, Boolean, Symbol], default: void 0 },
|
|
@@ -1164,50 +1174,50 @@ const _t = {
|
|
|
1164
1174
|
readonly: { type: Boolean },
|
|
1165
1175
|
disabled: { type: Boolean, default: !1 },
|
|
1166
1176
|
loading: { type: Boolean, default: !1 },
|
|
1167
|
-
icons: { default: () =>
|
|
1177
|
+
icons: { default: () => Ut },
|
|
1168
1178
|
items: {},
|
|
1169
1179
|
groups: { default: () => [] },
|
|
1170
1180
|
itemValue: { default: "key" },
|
|
1171
1181
|
itemLabel: { default: "label" },
|
|
1172
1182
|
size: { default: "medium" },
|
|
1173
|
-
texts: { default: () =>
|
|
1183
|
+
texts: { default: () => Ht }
|
|
1174
1184
|
},
|
|
1175
1185
|
emits: ["update:modelValue", "before-show", "before-hide", "show", "hide"],
|
|
1176
1186
|
setup(t, { emit: n }) {
|
|
1177
|
-
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(
|
|
1178
1188
|
() => {
|
|
1179
1189
|
var u;
|
|
1180
|
-
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);
|
|
1181
1191
|
}
|
|
1182
|
-
),
|
|
1192
|
+
), $ = y(
|
|
1183
1193
|
() => p.value ? p.value[e.itemLabel] : ""
|
|
1184
1194
|
), m = y(
|
|
1185
1195
|
() => e.clearable && !e.readonly && !e.disabled && !e.loading
|
|
1186
1196
|
);
|
|
1187
|
-
function
|
|
1188
|
-
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());
|
|
1189
1199
|
}
|
|
1190
|
-
function
|
|
1191
|
-
e.readonly || e.disabled || (a.value ?
|
|
1200
|
+
function T() {
|
|
1201
|
+
e.readonly || e.disabled || (a.value ? z() : F());
|
|
1192
1202
|
}
|
|
1193
|
-
function
|
|
1194
|
-
var
|
|
1195
|
-
(
|
|
1203
|
+
function O(u) {
|
|
1204
|
+
var L;
|
|
1205
|
+
(L = l.value) != null && L.$el.contains(u.target) || z();
|
|
1196
1206
|
}
|
|
1197
|
-
function
|
|
1207
|
+
function F() {
|
|
1198
1208
|
a.value || (n("before-show"), a.value = !0);
|
|
1199
1209
|
}
|
|
1200
|
-
function
|
|
1210
|
+
function z() {
|
|
1201
1211
|
a.value && (n("before-hide"), a.value = !1);
|
|
1202
1212
|
}
|
|
1203
1213
|
let d;
|
|
1204
|
-
function
|
|
1214
|
+
function S(u) {
|
|
1205
1215
|
if (!(!u.key || e.readonly || e.disabled)) {
|
|
1206
|
-
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)) {
|
|
1207
1217
|
s.value += u.key.toLowerCase();
|
|
1208
|
-
for (let
|
|
1209
|
-
if (e.items[
|
|
1210
|
-
|
|
1218
|
+
for (let L = 0; L < e.items.length; L++)
|
|
1219
|
+
if (e.items[L][e.itemLabel].toLowerCase().startsWith(s.value)) {
|
|
1220
|
+
B(L);
|
|
1211
1221
|
break;
|
|
1212
1222
|
}
|
|
1213
1223
|
}
|
|
@@ -1220,31 +1230,31 @@ const _t = {
|
|
|
1220
1230
|
var u;
|
|
1221
1231
|
(u = c.value) == null || u.$el.focus(), n("show");
|
|
1222
1232
|
}
|
|
1223
|
-
function
|
|
1233
|
+
function D() {
|
|
1224
1234
|
h(), n("hide");
|
|
1225
1235
|
}
|
|
1226
1236
|
function h() {
|
|
1227
1237
|
var u;
|
|
1228
1238
|
(u = l.value) == null || u.$el.focus();
|
|
1229
1239
|
}
|
|
1230
|
-
function
|
|
1231
|
-
var
|
|
1232
|
-
(
|
|
1240
|
+
function B(u) {
|
|
1241
|
+
var L;
|
|
1242
|
+
(L = c.value) == null || L.focusItem(u);
|
|
1233
1243
|
}
|
|
1234
|
-
return
|
|
1244
|
+
return Q(
|
|
1235
1245
|
() => e.modelValue,
|
|
1236
1246
|
(u) => {
|
|
1237
1247
|
o.value = u;
|
|
1238
1248
|
}
|
|
1239
|
-
), (u,
|
|
1240
|
-
var
|
|
1241
|
-
return r(), f(
|
|
1242
|
-
|
|
1249
|
+
), (u, L) => {
|
|
1250
|
+
var j, ae;
|
|
1251
|
+
return r(), f(A, null, [
|
|
1252
|
+
H(g(pt), {
|
|
1243
1253
|
ref_key: "inputRef",
|
|
1244
1254
|
ref: l,
|
|
1245
1255
|
role: "combobox",
|
|
1246
1256
|
tabindex: "0",
|
|
1247
|
-
class:
|
|
1257
|
+
class: C([
|
|
1248
1258
|
"q-select",
|
|
1249
1259
|
{
|
|
1250
1260
|
"q-select--readonly": e.readonly,
|
|
@@ -1257,35 +1267,35 @@ const _t = {
|
|
|
1257
1267
|
"aria-expanded": a.value,
|
|
1258
1268
|
"aria-haspopup": "listbox",
|
|
1259
1269
|
size: e.size,
|
|
1260
|
-
onClick:
|
|
1261
|
-
onKeydown:
|
|
1262
|
-
},
|
|
1270
|
+
onClick: T,
|
|
1271
|
+
onKeydown: R(S, ["stop"])
|
|
1272
|
+
}, Ie({
|
|
1263
1273
|
append: E(() => [
|
|
1264
|
-
m.value && o.value ? (r(),
|
|
1274
|
+
m.value && o.value ? (r(), w(g(U), K({ key: 0 }, e.icons.clear, {
|
|
1265
1275
|
class: "q-select__clear",
|
|
1266
|
-
onClick:
|
|
1276
|
+
onClick: R(x, ["stop", "prevent"])
|
|
1267
1277
|
}), null, 16, ["onClick"])) : b("", !0),
|
|
1268
|
-
!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)
|
|
1269
1279
|
]),
|
|
1270
1280
|
default: E(() => [
|
|
1271
|
-
o.value ? (r(), f(
|
|
1272
|
-
|
|
1273
|
-
], 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))
|
|
1274
1284
|
]),
|
|
1275
1285
|
_: 2
|
|
1276
1286
|
}, [
|
|
1277
|
-
(
|
|
1287
|
+
(j = p.value) != null && j.icon ? {
|
|
1278
1288
|
name: "prepend",
|
|
1279
1289
|
fn: E(() => {
|
|
1280
1290
|
var G;
|
|
1281
1291
|
return [
|
|
1282
|
-
|
|
1292
|
+
H(g(U), ye(Ee((G = p.value) == null ? void 0 : G.icon)), null, 16)
|
|
1283
1293
|
];
|
|
1284
1294
|
}),
|
|
1285
1295
|
key: "0"
|
|
1286
1296
|
} : void 0
|
|
1287
1297
|
]), 1032, ["class", "disabled", "aria-expanded", "size", "onKeydown"]),
|
|
1288
|
-
|
|
1298
|
+
H(g(oe), {
|
|
1289
1299
|
"model-value": a.value,
|
|
1290
1300
|
spy: "",
|
|
1291
1301
|
trigger: "manual",
|
|
@@ -1294,38 +1304,38 @@ const _t = {
|
|
|
1294
1304
|
offset: 2,
|
|
1295
1305
|
anchor: (ae = l.value) == null ? void 0 : ae.$el,
|
|
1296
1306
|
onEnter: v,
|
|
1297
|
-
onLeave:
|
|
1307
|
+
onLeave: D
|
|
1298
1308
|
}, {
|
|
1299
1309
|
default: E(() => [
|
|
1300
|
-
|
|
1310
|
+
Te((r(), f("div", {
|
|
1301
1311
|
ref_key: "contentRef",
|
|
1302
1312
|
ref: i,
|
|
1303
1313
|
class: "q-select__body"
|
|
1304
1314
|
}, [
|
|
1305
|
-
|
|
1306
|
-
e.loading ? (r(),
|
|
1315
|
+
q(u.$slots, "body.prepend"),
|
|
1316
|
+
e.loading ? (r(), w(g(we), {
|
|
1307
1317
|
key: 0,
|
|
1308
1318
|
class: "q-select__loader",
|
|
1309
1319
|
size: 24
|
|
1310
|
-
})) : (r(),
|
|
1320
|
+
})) : (r(), w(g(qt), {
|
|
1311
1321
|
key: 1,
|
|
1312
1322
|
ref_key: "listRef",
|
|
1313
1323
|
ref: c,
|
|
1314
1324
|
class: "q-select__items",
|
|
1315
1325
|
modelValue: o.value,
|
|
1316
1326
|
"onUpdate:modelValue": [
|
|
1317
|
-
|
|
1318
|
-
|
|
1327
|
+
L[0] || (L[0] = (G) => o.value = G),
|
|
1328
|
+
z
|
|
1319
1329
|
],
|
|
1320
1330
|
items: e.items,
|
|
1321
1331
|
groups: u.groups,
|
|
1322
1332
|
"item-label": e.itemLabel,
|
|
1323
1333
|
"item-value": e.itemValue,
|
|
1324
|
-
onKeydown:
|
|
1334
|
+
onKeydown: R(S, ["stop"])
|
|
1325
1335
|
}, null, 8, ["modelValue", "items", "groups", "item-label", "item-value", "onKeydown"])),
|
|
1326
|
-
|
|
1336
|
+
q(u.$slots, "body.append")
|
|
1327
1337
|
])), [
|
|
1328
|
-
[g(
|
|
1338
|
+
[g(Mt), O]
|
|
1329
1339
|
])
|
|
1330
1340
|
]),
|
|
1331
1341
|
_: 3
|
|
@@ -1333,7 +1343,7 @@ const _t = {
|
|
|
1333
1343
|
], 64);
|
|
1334
1344
|
};
|
|
1335
1345
|
}
|
|
1336
|
-
}),
|
|
1346
|
+
}), en = k(Nt), Kt = ["innerHTML"], Wt = { key: 1 }, Gt = /* @__PURE__ */ _({
|
|
1337
1347
|
__name: "QTooltip",
|
|
1338
1348
|
props: {
|
|
1339
1349
|
modelValue: { type: Boolean },
|
|
@@ -1350,7 +1360,7 @@ const _t = {
|
|
|
1350
1360
|
},
|
|
1351
1361
|
setup(t) {
|
|
1352
1362
|
const n = t;
|
|
1353
|
-
return (e, o) => (r(),
|
|
1363
|
+
return (e, o) => (r(), w(g(oe), {
|
|
1354
1364
|
"model-value": n.modelValue,
|
|
1355
1365
|
anchor: n.anchor,
|
|
1356
1366
|
appearance: n.appearance,
|
|
@@ -1366,33 +1376,34 @@ const _t = {
|
|
|
1366
1376
|
n.html ? (r(), f("span", {
|
|
1367
1377
|
key: 0,
|
|
1368
1378
|
innerHTML: n.text
|
|
1369
|
-
}, null, 8,
|
|
1379
|
+
}, null, 8, Kt)) : (r(), f("span", Wt, V(n.text), 1))
|
|
1370
1380
|
]),
|
|
1371
1381
|
_: 1
|
|
1372
1382
|
}, 8, ["model-value", "anchor", "appearance", "arrow", "attach", "delay", "disabled", "placement", "trigger"]));
|
|
1373
1383
|
}
|
|
1374
|
-
});
|
|
1384
|
+
}), tn = k(Gt);
|
|
1375
1385
|
export {
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
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,
|
|
1388
1398
|
oe as QOverlay,
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
ie as defaultLightColorScheme
|
|
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,
|
|
1406
|
+
ie as defaultLightColorScheme,
|
|
1407
|
+
Xt as useTheme
|
|
1397
1408
|
};
|
|
1398
1409
|
//# sourceMappingURL=ui.esm.js.map
|