@quidgest/ui 0.7.6 → 0.7.8
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 +6 -1
- package/dist/ui.css +9 -12
- package/dist/ui.esm.js +426 -400
- package/dist/ui.esm.js.map +1 -1
- package/dist/ui.js +2 -2
- package/dist/ui.js.map +1 -1
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +45 -45
- package/dist/ui.min.js.map +1 -1
- package/dist/ui.scss +13 -34
- package/package.json +27 -27
package/dist/ui.esm.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { getCurrentInstance as
|
|
1
|
+
import { getCurrentInstance as Ve, computed as _, ref as I, provide as He, inject as De, watch as z, defineComponent as x, openBlock as c, createElementBlock as m, normalizeStyle as se, createElementVNode as H, normalizeClass as K, withModifiers as J, createVNode as ee, unref as b, createCommentVNode as S, Fragment as P, createTextVNode as de, toDisplayString as U, renderSlot as h, toRef as pe, createBlock as L, withCtx as q, renderList as ve, resolveDynamicComponent as Ee, h as $e, normalizeProps as ue, mergeProps as le, reactive as Ke, onBeforeUnmount as We, onMounted as Te, Teleport as Ge, Transition as je, nextTick as Z, createSlots as be, withDirectives as Xe, vModelDynamic as Ye, useAttrs as Pe, guardReactiveProps as he } from "vue";
|
|
2
2
|
function ye(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 Ie(t) {
|
|
6
6
|
return t !== null && typeof t == "object" && !Array.isArray(t);
|
|
7
7
|
}
|
|
8
8
|
function ze(t = {}, n = {}) {
|
|
@@ -11,7 +11,7 @@ function ze(t = {}, n = {}) {
|
|
|
11
11
|
o[e] = t[e];
|
|
12
12
|
for (const e in n) {
|
|
13
13
|
const a = t[e], l = n[e];
|
|
14
|
-
if (
|
|
14
|
+
if (Ie(a) && Ie(l)) {
|
|
15
15
|
o[e] = ze(
|
|
16
16
|
a,
|
|
17
17
|
l
|
|
@@ -22,16 +22,16 @@ function ze(t = {}, n = {}) {
|
|
|
22
22
|
}
|
|
23
23
|
return o;
|
|
24
24
|
}
|
|
25
|
-
const
|
|
25
|
+
const ge = "q-defaults";
|
|
26
26
|
function Ze() {
|
|
27
|
-
const t =
|
|
27
|
+
const t = Ve();
|
|
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
33
|
const o = Ce();
|
|
34
|
-
return
|
|
34
|
+
return _(() => {
|
|
35
35
|
var e;
|
|
36
36
|
return (e = o.value) == null ? void 0 : e[n];
|
|
37
37
|
});
|
|
@@ -39,16 +39,16 @@ function Ze() {
|
|
|
39
39
|
function Ae(t) {
|
|
40
40
|
if (ye(t))
|
|
41
41
|
return;
|
|
42
|
-
const n = Ce(), o = I(t), e =
|
|
43
|
-
He(
|
|
42
|
+
const n = Ce(), o = I(t), e = _(() => ye(o.value) ? n.value : ze(n.value, o.value));
|
|
43
|
+
He(ge, e);
|
|
44
44
|
}
|
|
45
45
|
function Ce() {
|
|
46
|
-
const t =
|
|
46
|
+
const t = De(ge, 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 qe = {
|
|
52
52
|
primary: "#00a1f8",
|
|
53
53
|
primaryLight: "#e5f6ff",
|
|
54
54
|
primaryDark: "#0079ba",
|
|
@@ -132,58 +132,58 @@ function tt(t, n) {
|
|
|
132
132
|
const o = Qe(t), e = n / 100;
|
|
133
133
|
return o.l = o.l - e * o.l, Re(o);
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function Se(t) {
|
|
136
136
|
const n = t.r.toString(16).padStart(2, "0"), o = t.g.toString(16).padStart(2, "0"), e = t.b.toString(16).padStart(2, "0");
|
|
137
137
|
return `#${n}${o}${e}`;
|
|
138
138
|
}
|
|
139
139
|
function Qe(t) {
|
|
140
140
|
const n = t.r / 255, o = t.g / 255, e = t.b / 255, a = Math.max(n, o, e), l = Math.min(n, o, e);
|
|
141
|
-
let
|
|
141
|
+
let r = 0, d;
|
|
142
142
|
const f = (a + l) / 2;
|
|
143
143
|
if (a === l)
|
|
144
|
-
|
|
144
|
+
r = d = 0;
|
|
145
145
|
else {
|
|
146
146
|
const u = a - l;
|
|
147
|
-
switch (
|
|
147
|
+
switch (d = f > 0.5 ? u / (2 - a - l) : u / (a + l), a) {
|
|
148
148
|
case n:
|
|
149
|
-
|
|
149
|
+
r = (o - e) / u + (o < e ? 6 : 0);
|
|
150
150
|
break;
|
|
151
151
|
case o:
|
|
152
|
-
|
|
152
|
+
r = (e - n) / u + 2;
|
|
153
153
|
break;
|
|
154
154
|
case e:
|
|
155
|
-
|
|
155
|
+
r = (n - o) / u + 4;
|
|
156
156
|
break;
|
|
157
157
|
}
|
|
158
|
-
|
|
158
|
+
r /= 6;
|
|
159
159
|
}
|
|
160
160
|
return {
|
|
161
|
-
h: Math.round(
|
|
162
|
-
s: Math.round(
|
|
161
|
+
h: Math.round(r * 360),
|
|
162
|
+
s: Math.round(d * 100),
|
|
163
163
|
l: Math.round(f * 100)
|
|
164
164
|
};
|
|
165
165
|
}
|
|
166
166
|
function Re(t) {
|
|
167
167
|
const n = t.h / 360, o = t.s / 100, e = t.l / 100;
|
|
168
|
-
let a, l,
|
|
168
|
+
let a, l, r;
|
|
169
169
|
if (o === 0)
|
|
170
|
-
a = l =
|
|
170
|
+
a = l = r = e;
|
|
171
171
|
else {
|
|
172
|
-
const
|
|
173
|
-
a = me(f,
|
|
172
|
+
const d = e < 0.5 ? e * (1 + o) : e + o - e * o, f = 2 * e - d;
|
|
173
|
+
a = me(f, d, n + 1 / 3), l = me(f, d, n), r = me(f, d, n - 1 / 3);
|
|
174
174
|
}
|
|
175
175
|
return {
|
|
176
176
|
r: Math.round(a * 255),
|
|
177
177
|
g: Math.round(l * 255),
|
|
178
|
-
b: Math.round(
|
|
178
|
+
b: Math.round(r * 255)
|
|
179
179
|
};
|
|
180
180
|
}
|
|
181
181
|
function me(t, n, o) {
|
|
182
182
|
return o < 0 && (o += 1), o > 1 && (o -= 1), o < 1 / 6 ? t + (n - t) * 6 * o : o < 1 / 2 ? n : o < 2 / 3 ? t + (n - t) * (2 / 3 - o) * 6 : t;
|
|
183
183
|
}
|
|
184
184
|
const ce = "q-theme";
|
|
185
|
-
function
|
|
186
|
-
const t =
|
|
185
|
+
function xn() {
|
|
186
|
+
const t = De(ce);
|
|
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 nt(t, n) {
|
|
|
192
192
|
let o = null;
|
|
193
193
|
if (n)
|
|
194
194
|
for (const e of n.themes) {
|
|
195
|
-
const a = e.mode === "light" ?
|
|
195
|
+
const a = e.mode === "light" ? qe : Je;
|
|
196
196
|
if (e.colors) {
|
|
197
197
|
let l;
|
|
198
198
|
for (l in e.colors) {
|
|
199
|
-
const
|
|
200
|
-
if (
|
|
201
|
-
const
|
|
202
|
-
f in e.colors || (e.colors[f] =
|
|
199
|
+
const r = e.colors[l];
|
|
200
|
+
if (r && !l.startsWith("on") && !l.endsWith("Light") && !l.endsWith("Dark")) {
|
|
201
|
+
const d = Fe(r), f = `${l}Light`, u = `${l}Dark`;
|
|
202
|
+
f in e.colors || (e.colors[f] = Se(et(d, 85))), u in e.colors || (e.colors[u] = Se(tt(d, 25)));
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
}
|
|
@@ -210,7 +210,7 @@ function nt(t, n) {
|
|
|
210
210
|
o = {
|
|
211
211
|
name: e,
|
|
212
212
|
mode: "light",
|
|
213
|
-
colors:
|
|
213
|
+
colors: qe
|
|
214
214
|
}, n = {
|
|
215
215
|
defaultTheme: e,
|
|
216
216
|
themes: [o]
|
|
@@ -224,7 +224,7 @@ function nt(t, n) {
|
|
|
224
224
|
z(
|
|
225
225
|
() => e.value.activeTheme,
|
|
226
226
|
(a) => {
|
|
227
|
-
const l = e.value.themes.find((
|
|
227
|
+
const l = e.value.themes.find((r) => r.name === a);
|
|
228
228
|
l && lt(l.colors);
|
|
229
229
|
},
|
|
230
230
|
{ immediate: !0 }
|
|
@@ -244,28 +244,28 @@ function lt(t) {
|
|
|
244
244
|
for (e in t) {
|
|
245
245
|
const a = t[e];
|
|
246
246
|
if (a) {
|
|
247
|
-
o += ` ${
|
|
247
|
+
o += ` ${Le(e)}: ${a};
|
|
248
248
|
`;
|
|
249
249
|
const l = Fe(a);
|
|
250
|
-
o += ` ${
|
|
250
|
+
o += ` ${Le(e)}-rgb: ${l.r} ${l.g} ${l.b};
|
|
251
251
|
`;
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
254
|
o += "}", n.textContent = o;
|
|
255
255
|
}
|
|
256
|
-
function
|
|
256
|
+
function Le(t) {
|
|
257
257
|
return t ? `--q-theme-${t.replace(/([A-Z])/g, "-$1").replace(/^-/, "").toLowerCase()}` : "";
|
|
258
258
|
}
|
|
259
259
|
function Bn(t = {}) {
|
|
260
260
|
return { install: (o) => {
|
|
261
261
|
const e = t.components || {};
|
|
262
|
-
for (const
|
|
263
|
-
o.component(
|
|
262
|
+
for (const r in e)
|
|
263
|
+
o.component(r, e[r]);
|
|
264
264
|
const a = t.directives || {};
|
|
265
|
-
for (const
|
|
266
|
-
o.directive(
|
|
265
|
+
for (const r in a)
|
|
266
|
+
o.directive(r, a[r]);
|
|
267
267
|
const l = t.defaults || {};
|
|
268
|
-
o.provide(
|
|
268
|
+
o.provide(ge, I(l)), nt(o, t.themes);
|
|
269
269
|
} };
|
|
270
270
|
}
|
|
271
271
|
const at = /* @__PURE__ */ H("svg", { viewBox: "25 25 50 50" }, [
|
|
@@ -281,13 +281,13 @@ const at = /* @__PURE__ */ H("svg", { viewBox: "25 25 50 50" }, [
|
|
|
281
281
|
})
|
|
282
282
|
], -1), st = [
|
|
283
283
|
at
|
|
284
|
-
], it = /* @__PURE__ */
|
|
284
|
+
], it = /* @__PURE__ */ x({
|
|
285
285
|
__name: "QSpinnerLoader",
|
|
286
286
|
props: {
|
|
287
287
|
size: { default: 48 }
|
|
288
288
|
},
|
|
289
289
|
setup(t) {
|
|
290
|
-
const n = t, o =
|
|
290
|
+
const n = t, o = _(() => ({
|
|
291
291
|
"font-size": n.size !== 48 ? `${n.size}px` : void 0
|
|
292
292
|
}));
|
|
293
293
|
return (e, a) => (c(), m("div", {
|
|
@@ -306,23 +306,23 @@ function B(t) {
|
|
|
306
306
|
const a = Ze();
|
|
307
307
|
if (ye(a.value))
|
|
308
308
|
return n(o, e);
|
|
309
|
-
const l =
|
|
309
|
+
const l = Ve();
|
|
310
310
|
if (l === null)
|
|
311
311
|
return n(o, e);
|
|
312
|
-
const
|
|
313
|
-
get(
|
|
314
|
-
var
|
|
315
|
-
const u = Reflect.get(
|
|
316
|
-
return typeof f == "string" && !rt(l.vnode, f) ?
|
|
312
|
+
const r = new Proxy(o, {
|
|
313
|
+
get(d, f) {
|
|
314
|
+
var g;
|
|
315
|
+
const u = Reflect.get(d, f), y = (g = a.value) == null ? void 0 : g[f];
|
|
316
|
+
return typeof f == "string" && !rt(l.vnode, f) ? y ?? u : u;
|
|
317
317
|
}
|
|
318
318
|
});
|
|
319
|
-
return n(
|
|
319
|
+
return n(r, e);
|
|
320
320
|
}), t;
|
|
321
321
|
}
|
|
322
|
-
const
|
|
322
|
+
const _e = B(it), dt = ["disabled"], ut = {
|
|
323
323
|
key: 0,
|
|
324
324
|
class: "q-btn__spinner"
|
|
325
|
-
}, ct = { class: "q-btn__content" }, ft = /* @__PURE__ */
|
|
325
|
+
}, ct = { class: "q-btn__content" }, ft = /* @__PURE__ */ x({
|
|
326
326
|
__name: "QButton",
|
|
327
327
|
props: {
|
|
328
328
|
active: { type: Boolean },
|
|
@@ -338,16 +338,16 @@ const ge = B(it), dt = ["disabled"], ut = {
|
|
|
338
338
|
},
|
|
339
339
|
emits: ["click"],
|
|
340
340
|
setup(t, { emit: n }) {
|
|
341
|
-
const o = n, e = t, a =
|
|
342
|
-
function l(
|
|
343
|
-
a.value || o("click",
|
|
341
|
+
const o = n, e = t, a = _(() => e.disabled || e.loading);
|
|
342
|
+
function l(d) {
|
|
343
|
+
a.value || o("click", d);
|
|
344
344
|
}
|
|
345
|
-
const
|
|
346
|
-
const
|
|
345
|
+
const r = _(() => {
|
|
346
|
+
const d = e.size !== "regular" ? `q-btn--${e.size}` : void 0;
|
|
347
347
|
return [
|
|
348
348
|
"q-btn",
|
|
349
349
|
`q-btn--${e.bStyle}`,
|
|
350
|
-
|
|
350
|
+
d,
|
|
351
351
|
{
|
|
352
352
|
"q-btn--active": e.active,
|
|
353
353
|
"q-btn--borderless": e.borderless,
|
|
@@ -357,27 +357,27 @@ const ge = B(it), dt = ["disabled"], ut = {
|
|
|
357
357
|
}
|
|
358
358
|
];
|
|
359
359
|
});
|
|
360
|
-
return (
|
|
360
|
+
return (d, f) => (c(), m("button", {
|
|
361
361
|
type: "button",
|
|
362
|
-
class: K(
|
|
362
|
+
class: K(r.value),
|
|
363
363
|
disabled: a.value,
|
|
364
364
|
onClick: J(l, ["stop", "prevent"])
|
|
365
365
|
}, [
|
|
366
|
-
|
|
367
|
-
ee(
|
|
368
|
-
])) :
|
|
366
|
+
d.loading ? (c(), m("div", ut, [
|
|
367
|
+
ee(b(_e), { size: 23 })
|
|
368
|
+
])) : S("", !0),
|
|
369
369
|
H("span", ct, [
|
|
370
|
-
|
|
370
|
+
d.iconOnRight ? (c(), m(P, { key: 0 }, [
|
|
371
371
|
de(U(e.label), 1)
|
|
372
|
-
], 64)) :
|
|
373
|
-
|
|
374
|
-
|
|
372
|
+
], 64)) : S("", !0),
|
|
373
|
+
h(d.$slots, "default"),
|
|
374
|
+
d.iconOnRight ? S("", !0) : (c(), m(P, { key: 1 }, [
|
|
375
375
|
de(U(e.label), 1)
|
|
376
376
|
], 64))
|
|
377
377
|
])
|
|
378
378
|
], 10, dt));
|
|
379
379
|
}
|
|
380
|
-
}), pt = B(ft), mt = /* @__PURE__ */
|
|
380
|
+
}), pt = B(ft), mt = /* @__PURE__ */ x({
|
|
381
381
|
__name: "QButtonGroup",
|
|
382
382
|
props: {
|
|
383
383
|
bStyle: { default: void 0 },
|
|
@@ -395,7 +395,7 @@ const ge = B(it), dt = ["disabled"], ut = {
|
|
|
395
395
|
elevated: !1
|
|
396
396
|
}
|
|
397
397
|
});
|
|
398
|
-
const o =
|
|
398
|
+
const o = _(() => [
|
|
399
399
|
"q-btn-group",
|
|
400
400
|
{
|
|
401
401
|
"q-btn-group--elevated": n.elevated
|
|
@@ -404,10 +404,10 @@ const ge = B(it), dt = ["disabled"], ut = {
|
|
|
404
404
|
return (e, a) => (c(), m("div", {
|
|
405
405
|
class: K(o.value)
|
|
406
406
|
}, [
|
|
407
|
-
|
|
407
|
+
h(e.$slots, "default")
|
|
408
408
|
], 2));
|
|
409
409
|
}
|
|
410
|
-
}), vt = B(mt), ht = /* @__PURE__ */
|
|
410
|
+
}), vt = B(mt), ht = /* @__PURE__ */ x({
|
|
411
411
|
__name: "QButtonToggle",
|
|
412
412
|
props: {
|
|
413
413
|
modelValue: {},
|
|
@@ -422,35 +422,35 @@ const ge = B(it), dt = ["disabled"], ut = {
|
|
|
422
422
|
const o = n, e = t, a = I(e.modelValue);
|
|
423
423
|
z(
|
|
424
424
|
() => e.modelValue,
|
|
425
|
-
(
|
|
425
|
+
(d) => a.value = d
|
|
426
426
|
);
|
|
427
|
-
const l =
|
|
427
|
+
const l = _({
|
|
428
428
|
get() {
|
|
429
429
|
return a.value;
|
|
430
430
|
},
|
|
431
|
-
set(
|
|
432
|
-
a.value =
|
|
431
|
+
set(d) {
|
|
432
|
+
a.value = d, o("update:modelValue", d);
|
|
433
433
|
}
|
|
434
434
|
});
|
|
435
|
-
function
|
|
436
|
-
l.value ===
|
|
435
|
+
function r(d) {
|
|
436
|
+
l.value === d.key && !e.mandatory ? l.value = void 0 : l.value = d.key;
|
|
437
437
|
}
|
|
438
|
-
return (
|
|
438
|
+
return (d, f) => (c(), L(b(vt), {
|
|
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
|
-
(c(!0), m(P, null, ve(e.options, (u) => (c(),
|
|
444
|
+
default: q(() => [
|
|
445
|
+
(c(!0), m(P, null, ve(e.options, (u) => (c(), L(b(pt), {
|
|
446
446
|
key: u.key,
|
|
447
447
|
title: u.title,
|
|
448
448
|
label: u.label,
|
|
449
449
|
active: l.value === u.key,
|
|
450
|
-
onClick: () =>
|
|
450
|
+
onClick: () => r(u)
|
|
451
451
|
}, {
|
|
452
|
-
default:
|
|
453
|
-
|
|
452
|
+
default: q(() => [
|
|
453
|
+
h(d.$slots, u.key)
|
|
454
454
|
]),
|
|
455
455
|
_: 2
|
|
456
456
|
}, 1032, ["title", "label", "active", "onClick"]))), 128))
|
|
@@ -458,7 +458,7 @@ const ge = B(it), dt = ["disabled"], ut = {
|
|
|
458
458
|
_: 3
|
|
459
459
|
}, 8, ["disabled", "borderless", "elevated"]));
|
|
460
460
|
}
|
|
461
|
-
}), Vn = B(ht), yt = /* @__PURE__ */
|
|
461
|
+
}), Vn = B(ht), yt = /* @__PURE__ */ x({
|
|
462
462
|
__name: "QIcon",
|
|
463
463
|
props: {
|
|
464
464
|
icon: {},
|
|
@@ -466,24 +466,24 @@ const ge = B(it), dt = ["disabled"], ut = {
|
|
|
466
466
|
size: { default: void 0 }
|
|
467
467
|
},
|
|
468
468
|
setup(t) {
|
|
469
|
-
const n = t, o =
|
|
469
|
+
const n = t, o = _(() => {
|
|
470
470
|
switch (n.type) {
|
|
471
471
|
case "svg":
|
|
472
|
-
return
|
|
472
|
+
return Lt;
|
|
473
473
|
case "font":
|
|
474
474
|
return qt;
|
|
475
475
|
case "img":
|
|
476
|
-
return
|
|
476
|
+
return St;
|
|
477
477
|
default:
|
|
478
478
|
return;
|
|
479
479
|
}
|
|
480
480
|
});
|
|
481
|
-
return (e, a) => (c(),
|
|
481
|
+
return (e, a) => (c(), L(Ee(o.value), {
|
|
482
482
|
icon: n.icon,
|
|
483
483
|
size: n.size
|
|
484
484
|
}, null, 8, ["icon", "size"]));
|
|
485
485
|
}
|
|
486
|
-
}), bt = /* @__PURE__ */
|
|
486
|
+
}), bt = /* @__PURE__ */ x({
|
|
487
487
|
__name: "QIconFont",
|
|
488
488
|
props: {
|
|
489
489
|
icon: {},
|
|
@@ -492,22 +492,22 @@ const ge = B(it), dt = ["disabled"], ut = {
|
|
|
492
492
|
size: { default: void 0 }
|
|
493
493
|
},
|
|
494
494
|
setup(t) {
|
|
495
|
-
const n = t, o =
|
|
495
|
+
const n = t, o = _(() => n.variant ? `${n.library}-${n.variant}` : n.library), e = _(() => n.library && n.icon ? `${n.library}-${n.icon}` : n.icon), a = _(() => ({
|
|
496
496
|
"font-size": n.size !== void 0 ? `${n.size}px` : void 0
|
|
497
497
|
}));
|
|
498
|
-
return (l,
|
|
498
|
+
return (l, r) => (c(), m("i", {
|
|
499
499
|
class: K(["q-icon", "q-icon__font", o.value, e.value]),
|
|
500
500
|
style: se(a.value)
|
|
501
501
|
}, null, 6));
|
|
502
502
|
}
|
|
503
|
-
}), gt = ["src"], _t = /* @__PURE__ */
|
|
503
|
+
}), gt = ["src"], _t = /* @__PURE__ */ x({
|
|
504
504
|
__name: "QIconImg",
|
|
505
505
|
props: {
|
|
506
506
|
icon: {},
|
|
507
507
|
size: {}
|
|
508
508
|
},
|
|
509
509
|
setup(t) {
|
|
510
|
-
const n = t, o =
|
|
510
|
+
const n = t, o = _(() => ({
|
|
511
511
|
"font-size": n.size !== void 0 ? `${n.size}px` : void 0
|
|
512
512
|
}));
|
|
513
513
|
return (e, a) => (c(), m("img", {
|
|
@@ -516,7 +516,7 @@ const ge = B(it), dt = ["disabled"], ut = {
|
|
|
516
516
|
style: se(o.value)
|
|
517
517
|
}, null, 12, gt));
|
|
518
518
|
}
|
|
519
|
-
}), ae = {}, kt =
|
|
519
|
+
}), ae = {}, kt = x({
|
|
520
520
|
name: "InlineSvg",
|
|
521
521
|
emits: ["loaded", "unloaded", "error"],
|
|
522
522
|
inheritAttrs: !1,
|
|
@@ -525,9 +525,9 @@ const ge = B(it), dt = ["disabled"], ut = {
|
|
|
525
525
|
return null;
|
|
526
526
|
const t = this.getSvgContent(this.svgElSource);
|
|
527
527
|
if (!t)
|
|
528
|
-
return
|
|
528
|
+
return $e("div", this.$attrs);
|
|
529
529
|
const n = {};
|
|
530
|
-
return this.copySvgAttrs(n, this.svgElSource), this.copySvgAttrs(n, t), this.copyComponentAttrs(n, this.$attrs), n.innerHTML = t.innerHTML,
|
|
530
|
+
return this.copySvgAttrs(n, this.svgElSource), this.copySvgAttrs(n, t), this.copyComponentAttrs(n, this.$attrs), n.innerHTML = t.innerHTML, $e("svg", n);
|
|
531
531
|
},
|
|
532
532
|
props: {
|
|
533
533
|
src: {
|
|
@@ -629,7 +629,7 @@ function $t(t) {
|
|
|
629
629
|
);
|
|
630
630
|
return o.getIsPending = () => n, o;
|
|
631
631
|
}
|
|
632
|
-
const It = /* @__PURE__ */
|
|
632
|
+
const It = /* @__PURE__ */ x({
|
|
633
633
|
__name: "QIconSvg",
|
|
634
634
|
props: {
|
|
635
635
|
icon: {},
|
|
@@ -638,25 +638,25 @@ const It = /* @__PURE__ */ L({
|
|
|
638
638
|
},
|
|
639
639
|
emits: ["loaded", "unloaded"],
|
|
640
640
|
setup(t, { emit: n }) {
|
|
641
|
-
const o = n, e = t, a =
|
|
641
|
+
const o = n, e = t, a = _(() => ({
|
|
642
642
|
"font-size": e.size !== void 0 ? `${e.size}px` : void 0
|
|
643
643
|
}));
|
|
644
|
-
function l(
|
|
645
|
-
o("loaded",
|
|
644
|
+
function l(d) {
|
|
645
|
+
o("loaded", d);
|
|
646
646
|
}
|
|
647
|
-
function
|
|
647
|
+
function r() {
|
|
648
648
|
o("unloaded");
|
|
649
649
|
}
|
|
650
|
-
return (
|
|
650
|
+
return (d, f) => (c(), L(b(kt), {
|
|
651
651
|
class: "q-icon q-icon__svg",
|
|
652
652
|
src: e.bundle,
|
|
653
653
|
symbol: e.icon,
|
|
654
654
|
style: se(a.value),
|
|
655
655
|
onLoaded: l,
|
|
656
|
-
onUnloaded:
|
|
656
|
+
onUnloaded: r
|
|
657
657
|
}, null, 8, ["src", "symbol", "style"]));
|
|
658
658
|
}
|
|
659
|
-
}), Y = B(yt), qt = B(bt),
|
|
659
|
+
}), Y = B(yt), qt = B(bt), St = B(_t), Lt = B(It), xt = /* @__PURE__ */ x({
|
|
660
660
|
__name: "QList",
|
|
661
661
|
props: {
|
|
662
662
|
modelValue: { type: [String, Number, Boolean, Symbol], default: void 0 },
|
|
@@ -669,26 +669,26 @@ const It = /* @__PURE__ */ L({
|
|
|
669
669
|
},
|
|
670
670
|
emits: ["update:modelValue"],
|
|
671
671
|
setup(t, { expose: n, emit: o }) {
|
|
672
|
-
const e = o, a = t, l = I(a.modelValue),
|
|
673
|
-
function
|
|
672
|
+
const e = o, a = t, l = I(a.modelValue), r = I(!1), d = _(() => f.value.length > 1 ? "div" : "ul"), f = _(() => a.groups.length ? a.groups : [{ title: "" }]), u = I(null);
|
|
673
|
+
function y(s) {
|
|
674
674
|
l.value = s, e("update:modelValue", s);
|
|
675
675
|
}
|
|
676
|
-
function
|
|
677
|
-
|
|
676
|
+
function g() {
|
|
677
|
+
r.value = !0;
|
|
678
678
|
}
|
|
679
|
-
function
|
|
680
|
-
|
|
679
|
+
function F() {
|
|
680
|
+
r.value = !1;
|
|
681
681
|
}
|
|
682
682
|
function A(s) {
|
|
683
683
|
var $;
|
|
684
684
|
if (($ = u.value) != null && $.contains(s.relatedTarget))
|
|
685
685
|
return;
|
|
686
686
|
let p;
|
|
687
|
-
l.value ? p = a.items.findIndex((ne) => ne[a.itemValue] === l.value) : p =
|
|
688
|
-
const
|
|
689
|
-
O(p,
|
|
687
|
+
l.value ? p = a.items.findIndex((ne) => ne[a.itemValue] === l.value) : p = R();
|
|
688
|
+
const w = r.value;
|
|
689
|
+
O(p, w);
|
|
690
690
|
}
|
|
691
|
-
function
|
|
691
|
+
function Q(s) {
|
|
692
692
|
switch (["ArrowDown", "ArrowUp", "Home", "End"].includes(s.key) && s.preventDefault(), s.key) {
|
|
693
693
|
case "ArrowDown":
|
|
694
694
|
T("next");
|
|
@@ -711,7 +711,7 @@ const It = /* @__PURE__ */ L({
|
|
|
711
711
|
O(W(s));
|
|
712
712
|
break;
|
|
713
713
|
case "first":
|
|
714
|
-
O(
|
|
714
|
+
O(R());
|
|
715
715
|
break;
|
|
716
716
|
case "last":
|
|
717
717
|
O(C());
|
|
@@ -733,28 +733,28 @@ const It = /* @__PURE__ */ L({
|
|
|
733
733
|
function N() {
|
|
734
734
|
return E().indexOf(document.activeElement);
|
|
735
735
|
}
|
|
736
|
-
function
|
|
737
|
-
const s = E(), p = s.find((
|
|
736
|
+
function R() {
|
|
737
|
+
const s = E(), p = s.find((w) => v(w));
|
|
738
738
|
return p ? s.indexOf(p) : -1;
|
|
739
739
|
}
|
|
740
740
|
function C() {
|
|
741
|
-
const s = E(), p = [...s].reverse().find((
|
|
741
|
+
const s = E(), p = [...s].reverse().find((w) => v(w));
|
|
742
742
|
return p ? s.indexOf(p) : -1;
|
|
743
743
|
}
|
|
744
|
-
function M(s, p,
|
|
745
|
-
return p === "prev" && s === 0 || p === "next" && s ===
|
|
744
|
+
function M(s, p, w) {
|
|
745
|
+
return p === "prev" && s === 0 || p === "next" && s === w.length - 1;
|
|
746
746
|
}
|
|
747
747
|
function W(s) {
|
|
748
748
|
const p = N();
|
|
749
749
|
return G(p, s);
|
|
750
750
|
}
|
|
751
751
|
function G(s, p) {
|
|
752
|
-
const
|
|
753
|
-
if (M(s, p,
|
|
752
|
+
const w = E();
|
|
753
|
+
if (M(s, p, w))
|
|
754
754
|
return s;
|
|
755
755
|
let $ = s + (p === "next" ? 1 : -1);
|
|
756
|
-
for (; !v(
|
|
757
|
-
if (M($, p,
|
|
756
|
+
for (; !v(w[$]); ) {
|
|
757
|
+
if (M($, p, w))
|
|
758
758
|
return s;
|
|
759
759
|
$ += p === "next" ? 1 : -1;
|
|
760
760
|
}
|
|
@@ -775,27 +775,27 @@ const It = /* @__PURE__ */ L({
|
|
|
775
775
|
focusItem: O,
|
|
776
776
|
getItem: X,
|
|
777
777
|
getAdjacentItemIndex: G,
|
|
778
|
-
getFirstFocusableItemIndex:
|
|
778
|
+
getFirstFocusableItemIndex: R,
|
|
779
779
|
getLastFocusableItemIndex: C
|
|
780
|
-
}), (s, p) => (c(),
|
|
780
|
+
}), (s, p) => (c(), L(Ee(d.value), {
|
|
781
781
|
ref_key: "listRef",
|
|
782
782
|
ref: u,
|
|
783
783
|
class: K(["q-list", { "q-list--disabled": a.disabled }]),
|
|
784
784
|
role: "listbox",
|
|
785
785
|
tabindex: a.disabled ? -1 : 0,
|
|
786
786
|
onFocus: A,
|
|
787
|
-
onMousedown:
|
|
788
|
-
onMouseup:
|
|
789
|
-
onKeydown:
|
|
787
|
+
onMousedown: g,
|
|
788
|
+
onMouseup: F,
|
|
789
|
+
onKeydown: Q
|
|
790
790
|
}, {
|
|
791
|
-
default:
|
|
792
|
-
(c(!0), m(P, null, ve(f.value, (
|
|
793
|
-
key:
|
|
794
|
-
title:
|
|
795
|
-
disabled:
|
|
791
|
+
default: q(() => [
|
|
792
|
+
(c(!0), m(P, null, ve(f.value, (w) => (c(), L(b(Qt), {
|
|
793
|
+
key: w.id,
|
|
794
|
+
title: w.title,
|
|
795
|
+
disabled: w.disabled
|
|
796
796
|
}, {
|
|
797
|
-
default:
|
|
798
|
-
(c(!0), m(P, null, ve(V(
|
|
797
|
+
default: q(() => [
|
|
798
|
+
(c(!0), m(P, null, ve(V(w.id), ($) => (c(), L(b(Ft), {
|
|
799
799
|
key: $[a.itemValue],
|
|
800
800
|
value: $[a.itemValue],
|
|
801
801
|
label: $[a.itemLabel],
|
|
@@ -803,7 +803,7 @@ const It = /* @__PURE__ */ L({
|
|
|
803
803
|
disabled: a.disabled || $.disabled,
|
|
804
804
|
highlighted: a.highlighted === $[a.itemValue],
|
|
805
805
|
selected: l.value === $[a.itemValue],
|
|
806
|
-
onSelect:
|
|
806
|
+
onSelect: y
|
|
807
807
|
}, null, 8, ["value", "label", "icon", "disabled", "highlighted", "selected"]))), 128))
|
|
808
808
|
]),
|
|
809
809
|
_: 2
|
|
@@ -821,7 +821,7 @@ const Vt = ["id", "tabindex", "aria-label", "aria-selected"], Dt = { class: "q-l
|
|
|
821
821
|
check: {
|
|
822
822
|
icon: "check"
|
|
823
823
|
}
|
|
824
|
-
}, Tt = /* @__PURE__ */
|
|
824
|
+
}, Tt = /* @__PURE__ */ x({
|
|
825
825
|
__name: "QListItem",
|
|
826
826
|
props: {
|
|
827
827
|
value: { type: [String, Number, Boolean, Symbol] },
|
|
@@ -838,11 +838,11 @@ const Vt = ["id", "tabindex", "aria-label", "aria-selected"], Dt = { class: "q-l
|
|
|
838
838
|
function l() {
|
|
839
839
|
e.disabled || o("select", e.value);
|
|
840
840
|
}
|
|
841
|
-
function
|
|
842
|
-
|
|
841
|
+
function r(d) {
|
|
842
|
+
d.key === "Tab" && l(), (d.key === "Enter" || d.key === " ") && (d.preventDefault(), d.stopPropagation(), l());
|
|
843
843
|
}
|
|
844
|
-
return (
|
|
845
|
-
id:
|
|
844
|
+
return (d, f) => (c(), m("li", {
|
|
845
|
+
id: b(a),
|
|
846
846
|
role: "option",
|
|
847
847
|
tabindex: e.disabled ? void 0 : -2,
|
|
848
848
|
class: K([
|
|
@@ -855,17 +855,17 @@ const Vt = ["id", "tabindex", "aria-label", "aria-selected"], Dt = { class: "q-l
|
|
|
855
855
|
]),
|
|
856
856
|
"aria-label": e.label,
|
|
857
857
|
"aria-selected": e.disabled ? void 0 : e.selected,
|
|
858
|
-
onKeydown:
|
|
858
|
+
onKeydown: r,
|
|
859
859
|
onClick: J(l, ["stop", "prevent"])
|
|
860
860
|
}, [
|
|
861
|
-
e.icon ? (c(),
|
|
861
|
+
e.icon ? (c(), L(b(Y), ue(le({ key: 0 }, e.icon)), null, 16)) : S("", !0),
|
|
862
862
|
de(" " + U(e.label) + " ", 1),
|
|
863
863
|
H("div", Dt, [
|
|
864
|
-
e.selected ? (c(),
|
|
864
|
+
e.selected ? (c(), L(b(Y), le({ key: 0 }, e.icons.check, { class: "q-list-item__check" }), null, 16)) : S("", !0)
|
|
865
865
|
])
|
|
866
866
|
], 42, Vt));
|
|
867
867
|
}
|
|
868
|
-
}), zt = ["aria-labelledby"], At = ["id"], Ct = /* @__PURE__ */
|
|
868
|
+
}), zt = ["aria-labelledby"], At = ["id"], Ct = /* @__PURE__ */ x({
|
|
869
869
|
__name: "QListItemGroup",
|
|
870
870
|
props: {
|
|
871
871
|
title: { default: "" },
|
|
@@ -876,61 +876,61 @@ const Vt = ["id", "tabindex", "aria-label", "aria-selected"], Dt = { class: "q-l
|
|
|
876
876
|
return (e, a) => (c(), m("ul", {
|
|
877
877
|
class: "q-list-item-group",
|
|
878
878
|
role: "group",
|
|
879
|
-
"aria-labelledby": n.title ?
|
|
879
|
+
"aria-labelledby": n.title ? b(o) : void 0
|
|
880
880
|
}, [
|
|
881
881
|
n.title ? (c(), m("li", {
|
|
882
882
|
key: 0,
|
|
883
|
-
id:
|
|
883
|
+
id: b(o),
|
|
884
884
|
class: "q-list-item-group__title",
|
|
885
885
|
role: "presentation"
|
|
886
|
-
}, U(n.title), 9, At)) :
|
|
887
|
-
|
|
886
|
+
}, U(n.title), 9, At)) : S("", !0),
|
|
887
|
+
h(e.$slots, "default")
|
|
888
888
|
], 8, zt));
|
|
889
889
|
}
|
|
890
|
-
}), Oe = B(
|
|
890
|
+
}), Oe = B(xt), Ft = B(Tt), Qt = B(Ct);
|
|
891
891
|
function Rt(t, n, o = "right", e) {
|
|
892
|
-
const a = t.getBoundingClientRect(), l = a.x + window.scrollX,
|
|
893
|
-
let
|
|
894
|
-
|
|
895
|
-
const
|
|
896
|
-
switch (
|
|
892
|
+
const a = t.getBoundingClientRect(), l = a.x + window.scrollX, r = a.y + window.scrollY, d = n == null ? void 0 : n.getBoundingClientRect(), f = (d == null ? void 0 : d.width) ?? 0, u = (d == null ? void 0 : d.height) ?? 0;
|
|
893
|
+
let y = o;
|
|
894
|
+
d && !Me(a, d, y) && (y = Ot(a, d, y));
|
|
895
|
+
const g = { x: 0, y: 0, placement: y };
|
|
896
|
+
switch (y) {
|
|
897
897
|
case "top":
|
|
898
|
-
e === "anchor" ?
|
|
898
|
+
e === "anchor" ? g.x = l : g.x = l + (a.width - f) / 2, g.y = r - u;
|
|
899
899
|
break;
|
|
900
900
|
case "bottom":
|
|
901
|
-
e === "anchor" ?
|
|
901
|
+
e === "anchor" ? g.x = l : g.x = l + (a.width - f) / 2, g.y = r + a.height;
|
|
902
902
|
break;
|
|
903
903
|
case "left":
|
|
904
|
-
|
|
904
|
+
g.x = l - f, g.y = r + a.height / 2 - u / 2;
|
|
905
905
|
break;
|
|
906
906
|
case "right":
|
|
907
|
-
|
|
907
|
+
g.x = l + a.width, g.y = r + a.height / 2 - u / 2;
|
|
908
908
|
break;
|
|
909
909
|
}
|
|
910
|
-
return e === "anchor" && a.width >= f && (
|
|
910
|
+
return e === "anchor" && a.width >= f && (g.width = a.width), g;
|
|
911
911
|
}
|
|
912
912
|
function Me(t, n, o) {
|
|
913
913
|
let e = !1, a = !1;
|
|
914
914
|
switch (o) {
|
|
915
915
|
case "top":
|
|
916
|
-
e =
|
|
916
|
+
e = Be(t, n), a = t.top > n.height;
|
|
917
917
|
break;
|
|
918
918
|
case "bottom":
|
|
919
|
-
e =
|
|
919
|
+
e = Be(t, n), a = window.innerHeight - t.top - t.height > n.height;
|
|
920
920
|
break;
|
|
921
921
|
case "left":
|
|
922
|
-
e = t.left > n.width, a =
|
|
922
|
+
e = t.left > n.width, a = xe(t, n);
|
|
923
923
|
break;
|
|
924
924
|
case "right":
|
|
925
|
-
e = window.innerWidth - t.left - t.width > n.width, a =
|
|
925
|
+
e = window.innerWidth - t.left - t.width > n.width, a = xe(t, n);
|
|
926
926
|
break;
|
|
927
927
|
}
|
|
928
928
|
return e && a;
|
|
929
929
|
}
|
|
930
|
-
function
|
|
930
|
+
function xe(t, n) {
|
|
931
931
|
return window.innerHeight - t.top - t.height / 2 > n.height / 2 && t.top + t.height / 2 > n.height / 2;
|
|
932
932
|
}
|
|
933
|
-
function
|
|
933
|
+
function Be(t, n) {
|
|
934
934
|
return window.innerWidth - t.left - t.width / 2 > n.width / 2 && t.left + t.width / 2 > n.width / 2;
|
|
935
935
|
}
|
|
936
936
|
function Ot(t, n, o) {
|
|
@@ -951,7 +951,7 @@ function re(t) {
|
|
|
951
951
|
const Mt = {
|
|
952
952
|
key: 0,
|
|
953
953
|
class: "q-overlay__arrow"
|
|
954
|
-
}, Ut = /* @__PURE__ */
|
|
954
|
+
}, Ut = /* @__PURE__ */ x({
|
|
955
955
|
inheritAttrs: !1,
|
|
956
956
|
__name: "QOverlay",
|
|
957
957
|
props: {
|
|
@@ -972,7 +972,7 @@ const Mt = {
|
|
|
972
972
|
},
|
|
973
973
|
emits: ["enter", "leave"],
|
|
974
974
|
setup(t, { emit: n }) {
|
|
975
|
-
const o = n, e = t, a =
|
|
975
|
+
const o = n, e = t, a = _(() => [
|
|
976
976
|
"q-overlay",
|
|
977
977
|
`q-overlay--${l.placement}`,
|
|
978
978
|
{ "q-overlay--inverted": e.appearance === "inverted" },
|
|
@@ -984,7 +984,7 @@ const Mt = {
|
|
|
984
984
|
left: 0,
|
|
985
985
|
width: 0,
|
|
986
986
|
placement: e.placement
|
|
987
|
-
}),
|
|
987
|
+
}), r = _(() => l.visible && !e.disabled);
|
|
988
988
|
z(
|
|
989
989
|
() => e.modelValue,
|
|
990
990
|
() => l.visible = e.modelValue
|
|
@@ -992,7 +992,7 @@ const Mt = {
|
|
|
992
992
|
() => l.visible,
|
|
993
993
|
() => l.animating = !0
|
|
994
994
|
);
|
|
995
|
-
const
|
|
995
|
+
const d = _(() => {
|
|
996
996
|
let v = 0, V = 0;
|
|
997
997
|
switch (l.placement) {
|
|
998
998
|
case "top":
|
|
@@ -1021,24 +1021,24 @@ const Mt = {
|
|
|
1021
1021
|
l.left = V.x, l.top = V.y, l.width = V.width, l.placement = V.placement;
|
|
1022
1022
|
}
|
|
1023
1023
|
}
|
|
1024
|
-
z([() =>
|
|
1025
|
-
let
|
|
1026
|
-
function
|
|
1024
|
+
z([() => r.value, () => e.placement], u);
|
|
1025
|
+
let y;
|
|
1026
|
+
function g() {
|
|
1027
1027
|
const v = e.trigger === "hover" ? e.delay : 0;
|
|
1028
|
-
|
|
1028
|
+
y || (y = window.setTimeout(() => l.visible = !0, v));
|
|
1029
1029
|
}
|
|
1030
|
-
function
|
|
1031
|
-
clearTimeout(
|
|
1030
|
+
function F() {
|
|
1031
|
+
clearTimeout(y), y = void 0, l.visible = !1;
|
|
1032
1032
|
}
|
|
1033
1033
|
function A() {
|
|
1034
|
-
|
|
1034
|
+
r.value ? F() : g();
|
|
1035
1035
|
}
|
|
1036
|
-
let
|
|
1036
|
+
let Q;
|
|
1037
1037
|
function T() {
|
|
1038
1038
|
o("enter");
|
|
1039
1039
|
}
|
|
1040
1040
|
function O() {
|
|
1041
|
-
window.clearTimeout(
|
|
1041
|
+
window.clearTimeout(Q), Q = window.setTimeout(() => l.animating = !1, 200), o("leave");
|
|
1042
1042
|
}
|
|
1043
1043
|
let E;
|
|
1044
1044
|
function X() {
|
|
@@ -1050,7 +1050,7 @@ const Mt = {
|
|
|
1050
1050
|
v.addEventListener("click", A);
|
|
1051
1051
|
break;
|
|
1052
1052
|
case "hover":
|
|
1053
|
-
v.addEventListener("mouseenter",
|
|
1053
|
+
v.addEventListener("mouseenter", g), v.addEventListener("mouseleave", F);
|
|
1054
1054
|
break;
|
|
1055
1055
|
}
|
|
1056
1056
|
});
|
|
@@ -1066,34 +1066,34 @@ const Mt = {
|
|
|
1066
1066
|
}), u());
|
|
1067
1067
|
});
|
|
1068
1068
|
}
|
|
1069
|
-
function
|
|
1069
|
+
function R() {
|
|
1070
1070
|
window.removeEventListener("scroll", u), window.removeEventListener("resize", u), E == null || E.disconnect();
|
|
1071
1071
|
}
|
|
1072
1072
|
let C;
|
|
1073
1073
|
function M() {
|
|
1074
|
-
re(e.anchor) ? (u(), C = window.setTimeout(M, 100)) :
|
|
1074
|
+
re(e.anchor) ? (u(), C = window.setTimeout(M, 100)) : F();
|
|
1075
1075
|
}
|
|
1076
1076
|
function W() {
|
|
1077
1077
|
N(), e.spy && M();
|
|
1078
1078
|
}
|
|
1079
1079
|
function G() {
|
|
1080
|
-
|
|
1080
|
+
R(), e.spy && (clearTimeout(C), C = void 0);
|
|
1081
1081
|
}
|
|
1082
|
-
return We(G),
|
|
1082
|
+
return We(G), Te(u), z(
|
|
1083
1083
|
() => e.disabled,
|
|
1084
1084
|
(v) => {
|
|
1085
1085
|
v || X();
|
|
1086
1086
|
},
|
|
1087
1087
|
{ immediate: !0 }
|
|
1088
1088
|
), z(
|
|
1089
|
-
() =>
|
|
1089
|
+
() => r.value,
|
|
1090
1090
|
(v) => {
|
|
1091
1091
|
v ? W() : G();
|
|
1092
1092
|
},
|
|
1093
1093
|
{ immediate: !0 }
|
|
1094
1094
|
), (v, V) => (c(), m(P, null, [
|
|
1095
|
-
|
|
1096
|
-
|
|
1095
|
+
h(v.$slots, "trigger", { open: r.value }),
|
|
1096
|
+
r.value || l.animating ? (c(), L(Ge, {
|
|
1097
1097
|
key: 0,
|
|
1098
1098
|
disabled: !e.attach,
|
|
1099
1099
|
to: e.attach
|
|
@@ -1104,25 +1104,25 @@ const Mt = {
|
|
|
1104
1104
|
onEnter: T,
|
|
1105
1105
|
onLeave: O
|
|
1106
1106
|
}, {
|
|
1107
|
-
default:
|
|
1108
|
-
|
|
1107
|
+
default: q(() => [
|
|
1108
|
+
r.value ? (c(), m("div", {
|
|
1109
1109
|
key: 0,
|
|
1110
1110
|
class: K(a.value),
|
|
1111
|
-
style: se(
|
|
1111
|
+
style: se(d.value)
|
|
1112
1112
|
}, [
|
|
1113
1113
|
H("div", {
|
|
1114
1114
|
class: K(["q-overlay__content"]),
|
|
1115
1115
|
ref_key: "overlay",
|
|
1116
1116
|
ref: f
|
|
1117
1117
|
}, [
|
|
1118
|
-
e.arrow ? (c(), m("div", Mt)) :
|
|
1119
|
-
|
|
1118
|
+
e.arrow ? (c(), m("div", Mt)) : S("", !0),
|
|
1119
|
+
h(v.$slots, "default")
|
|
1120
1120
|
], 512)
|
|
1121
|
-
], 6)) :
|
|
1121
|
+
], 6)) : S("", !0)
|
|
1122
1122
|
]),
|
|
1123
1123
|
_: 3
|
|
1124
1124
|
}, 8, ["name"])
|
|
1125
|
-
], 8, ["disabled", "to"])) :
|
|
1125
|
+
], 8, ["disabled", "to"])) : S("", !0)
|
|
1126
1126
|
], 64));
|
|
1127
1127
|
}
|
|
1128
1128
|
}), fe = B(Ut), Nt = ["id"], Ht = {
|
|
@@ -1137,7 +1137,7 @@ const Mt = {
|
|
|
1137
1137
|
}, jt = {
|
|
1138
1138
|
key: 1,
|
|
1139
1139
|
class: "q-field__extras"
|
|
1140
|
-
}, Xt = /* @__PURE__ */
|
|
1140
|
+
}, Xt = /* @__PURE__ */ x({
|
|
1141
1141
|
inheritAttrs: !1,
|
|
1142
1142
|
__name: "QField",
|
|
1143
1143
|
props: {
|
|
@@ -1149,10 +1149,10 @@ const Mt = {
|
|
|
1149
1149
|
required: { type: Boolean }
|
|
1150
1150
|
},
|
|
1151
1151
|
setup(t, { expose: n }) {
|
|
1152
|
-
const o = t, e = I(null), a =
|
|
1152
|
+
const o = t, e = I(null), a = _(() => o.required && !o.readonly && !o.disabled);
|
|
1153
1153
|
return n({
|
|
1154
1154
|
fieldRef: e
|
|
1155
|
-
}), (l,
|
|
1155
|
+
}), (l, r) => (c(), m("div", {
|
|
1156
1156
|
id: o.id,
|
|
1157
1157
|
class: K([
|
|
1158
1158
|
"q-field",
|
|
@@ -1165,33 +1165,33 @@ const Mt = {
|
|
|
1165
1165
|
])
|
|
1166
1166
|
}, [
|
|
1167
1167
|
o.label ? (c(), m("div", Ht, [
|
|
1168
|
-
|
|
1168
|
+
h(l.$slots, "label.prepend"),
|
|
1169
1169
|
H("label", {
|
|
1170
1170
|
for: o.id
|
|
1171
1171
|
}, U(o.label), 9, Kt),
|
|
1172
|
-
|
|
1173
|
-
])) :
|
|
1174
|
-
|
|
1172
|
+
h(l.$slots, "label.append")
|
|
1173
|
+
])) : S("", !0),
|
|
1174
|
+
h(l.$slots, "control", {}, () => [
|
|
1175
1175
|
H("div", le({
|
|
1176
1176
|
class: "q-field__control",
|
|
1177
1177
|
ref_key: "fieldRef",
|
|
1178
1178
|
ref: e
|
|
1179
1179
|
}, l.$attrs), [
|
|
1180
1180
|
l.$slots.prepend ? (c(), m("div", Wt, [
|
|
1181
|
-
|
|
1182
|
-
])) :
|
|
1183
|
-
|
|
1181
|
+
h(l.$slots, "prepend")
|
|
1182
|
+
])) : S("", !0),
|
|
1183
|
+
h(l.$slots, "default"),
|
|
1184
1184
|
l.$slots.append ? (c(), m("div", Gt, [
|
|
1185
|
-
|
|
1186
|
-
])) :
|
|
1185
|
+
h(l.$slots, "append")
|
|
1186
|
+
])) : S("", !0)
|
|
1187
1187
|
], 16)
|
|
1188
1188
|
]),
|
|
1189
1189
|
l.$slots.extras ? (c(), m("div", jt, [
|
|
1190
|
-
|
|
1191
|
-
])) :
|
|
1190
|
+
h(l.$slots, "extras")
|
|
1191
|
+
])) : S("", !0)
|
|
1192
1192
|
], 10, Nt));
|
|
1193
1193
|
}
|
|
1194
|
-
}),
|
|
1194
|
+
}), ke = B(Xt), Yt = ["type", "role", "required", "placeholder", "readonly", "disabled", "maxlength"], Pt = /* @__PURE__ */ x({
|
|
1195
1195
|
__name: "QTextField",
|
|
1196
1196
|
props: {
|
|
1197
1197
|
modelValue: { default: "" },
|
|
@@ -1208,7 +1208,7 @@ const Mt = {
|
|
|
1208
1208
|
},
|
|
1209
1209
|
emits: ["update:modelValue"],
|
|
1210
1210
|
setup(t, { expose: n, emit: o }) {
|
|
1211
|
-
const e = o, a = t, l = I(a.modelValue),
|
|
1211
|
+
const e = o, a = t, l = I(a.modelValue), r = I(null), d = I(null), f = _({
|
|
1212
1212
|
get() {
|
|
1213
1213
|
return l.value;
|
|
1214
1214
|
},
|
|
@@ -1220,14 +1220,14 @@ const Mt = {
|
|
|
1220
1220
|
() => a.modelValue,
|
|
1221
1221
|
(u) => l.value = u
|
|
1222
1222
|
), n({
|
|
1223
|
-
fieldRef:
|
|
1223
|
+
fieldRef: _(() => {
|
|
1224
1224
|
var u;
|
|
1225
|
-
return (u =
|
|
1225
|
+
return (u = r.value) == null ? void 0 : u.fieldRef;
|
|
1226
1226
|
}),
|
|
1227
|
-
inputRef:
|
|
1228
|
-
}), (u,
|
|
1227
|
+
inputRef: d
|
|
1228
|
+
}), (u, y) => (c(), L(b(ke), {
|
|
1229
1229
|
ref_key: "fieldRef",
|
|
1230
|
-
ref:
|
|
1230
|
+
ref: r,
|
|
1231
1231
|
class: "q-text-field",
|
|
1232
1232
|
id: a.id,
|
|
1233
1233
|
label: a.label,
|
|
@@ -1235,18 +1235,18 @@ const Mt = {
|
|
|
1235
1235
|
readonly: a.readonly,
|
|
1236
1236
|
disabled: a.disabled,
|
|
1237
1237
|
required: a.required
|
|
1238
|
-
},
|
|
1239
|
-
"label.prepend":
|
|
1240
|
-
|
|
1238
|
+
}, be({
|
|
1239
|
+
"label.prepend": q(() => [
|
|
1240
|
+
h(u.$slots, "label.prepend")
|
|
1241
1241
|
]),
|
|
1242
|
-
"label.append":
|
|
1243
|
-
|
|
1242
|
+
"label.append": q(() => [
|
|
1243
|
+
h(u.$slots, "label.append")
|
|
1244
1244
|
]),
|
|
1245
|
-
default:
|
|
1245
|
+
default: q(() => [
|
|
1246
1246
|
Xe(H("input", {
|
|
1247
|
-
"onUpdate:modelValue":
|
|
1247
|
+
"onUpdate:modelValue": y[0] || (y[0] = (g) => f.value = g),
|
|
1248
1248
|
ref_key: "inputRef",
|
|
1249
|
-
ref:
|
|
1249
|
+
ref: d,
|
|
1250
1250
|
class: "q-text-field__input",
|
|
1251
1251
|
type: a.type,
|
|
1252
1252
|
role: a.role,
|
|
@@ -1263,22 +1263,22 @@ const Mt = {
|
|
|
1263
1263
|
}, [
|
|
1264
1264
|
u.$slots.prepend ? {
|
|
1265
1265
|
name: "prepend",
|
|
1266
|
-
fn:
|
|
1267
|
-
|
|
1266
|
+
fn: q(() => [
|
|
1267
|
+
h(u.$slots, "prepend")
|
|
1268
1268
|
]),
|
|
1269
1269
|
key: "0"
|
|
1270
1270
|
} : void 0,
|
|
1271
1271
|
u.$slots.append ? {
|
|
1272
1272
|
name: "append",
|
|
1273
|
-
fn:
|
|
1274
|
-
|
|
1273
|
+
fn: q(() => [
|
|
1274
|
+
h(u.$slots, "append")
|
|
1275
1275
|
]),
|
|
1276
1276
|
key: "1"
|
|
1277
1277
|
} : void 0,
|
|
1278
1278
|
u.$slots.extras ? {
|
|
1279
1279
|
name: "extras",
|
|
1280
|
-
fn:
|
|
1281
|
-
|
|
1280
|
+
fn: q(() => [
|
|
1281
|
+
h(u.$slots, "extras")
|
|
1282
1282
|
]),
|
|
1283
1283
|
key: "2"
|
|
1284
1284
|
} : void 0
|
|
@@ -1298,7 +1298,7 @@ const Jt = {
|
|
|
1298
1298
|
clear: {
|
|
1299
1299
|
icon: "close"
|
|
1300
1300
|
}
|
|
1301
|
-
}, nn = /* @__PURE__ */
|
|
1301
|
+
}, nn = /* @__PURE__ */ x({
|
|
1302
1302
|
inheritAttrs: !1,
|
|
1303
1303
|
__name: "QCombobox",
|
|
1304
1304
|
props: {
|
|
@@ -1322,105 +1322,105 @@ const Jt = {
|
|
|
1322
1322
|
},
|
|
1323
1323
|
emits: ["update:modelValue", "update:inputValue", "before-show", "before-hide", "show", "hide"],
|
|
1324
1324
|
setup(t, { emit: n }) {
|
|
1325
|
-
const o = n, e = t, a = Ue(), l = I(e.modelValue),
|
|
1326
|
-
|
|
1327
|
-
const
|
|
1325
|
+
const o = n, e = t, a = Ue(), l = I(e.modelValue), r = I(!1), d = I(""), f = I(void 0), u = I(null), y = I(null), g = I(null);
|
|
1326
|
+
Te(R);
|
|
1327
|
+
const F = _(
|
|
1328
1328
|
() => e.clearable && !e.readonly && !e.disabled && !e.loading
|
|
1329
|
-
), A =
|
|
1330
|
-
var
|
|
1331
|
-
return e.filterMode === "manual" || !E.value ? e.items : (
|
|
1332
|
-
(
|
|
1329
|
+
), A = _(() => {
|
|
1330
|
+
var i;
|
|
1331
|
+
return e.filterMode === "manual" || !E.value ? e.items : (i = e.items) == null ? void 0 : i.filter(
|
|
1332
|
+
(k) => k[e.itemLabel].toLowerCase().startsWith(d.value.toLowerCase())
|
|
1333
1333
|
);
|
|
1334
|
-
}),
|
|
1335
|
-
var
|
|
1336
|
-
return (
|
|
1337
|
-
}), T =
|
|
1338
|
-
const
|
|
1339
|
-
if (
|
|
1340
|
-
return A.value[
|
|
1341
|
-
}), O =
|
|
1342
|
-
var
|
|
1334
|
+
}), Q = _(() => {
|
|
1335
|
+
var i;
|
|
1336
|
+
return (i = e.items) == null ? void 0 : i.find((k) => k[e.itemValue] === l.value);
|
|
1337
|
+
}), T = _(() => {
|
|
1338
|
+
const i = f.value;
|
|
1339
|
+
if (i !== void 0 && A.value[i])
|
|
1340
|
+
return A.value[i];
|
|
1341
|
+
}), O = _(() => {
|
|
1342
|
+
var k;
|
|
1343
1343
|
if (f.value === void 0)
|
|
1344
1344
|
return;
|
|
1345
|
-
const
|
|
1346
|
-
return
|
|
1347
|
-
}), E =
|
|
1348
|
-
var
|
|
1349
|
-
return
|
|
1345
|
+
const i = (k = y.value) == null ? void 0 : k.getItem(f.value);
|
|
1346
|
+
return i == null ? void 0 : i.id;
|
|
1347
|
+
}), E = _(() => {
|
|
1348
|
+
var i;
|
|
1349
|
+
return d.value.length > 0 && d.value !== ((i = Q.value) == null ? void 0 : i[e.itemLabel]);
|
|
1350
1350
|
});
|
|
1351
|
-
function X(
|
|
1352
|
-
l.value =
|
|
1351
|
+
function X(i) {
|
|
1352
|
+
l.value = i, R(), o("update:modelValue", i);
|
|
1353
1353
|
}
|
|
1354
|
-
function N(
|
|
1355
|
-
X(
|
|
1354
|
+
function N(i) {
|
|
1355
|
+
X(i), M();
|
|
1356
1356
|
}
|
|
1357
|
-
function
|
|
1358
|
-
var
|
|
1359
|
-
|
|
1357
|
+
function R() {
|
|
1358
|
+
var i;
|
|
1359
|
+
d.value = ((i = Q.value) == null ? void 0 : i[e.itemLabel]) || "";
|
|
1360
1360
|
}
|
|
1361
1361
|
function C() {
|
|
1362
|
-
|
|
1362
|
+
r.value || e.readonly || e.disabled || (o("before-show"), r.value = !0);
|
|
1363
1363
|
}
|
|
1364
1364
|
function M() {
|
|
1365
|
-
|
|
1365
|
+
r.value && (o("before-hide"), r.value = !1, f.value = void 0);
|
|
1366
1366
|
}
|
|
1367
1367
|
function W() {
|
|
1368
1368
|
X(void 0), f.value = void 0;
|
|
1369
1369
|
}
|
|
1370
1370
|
function G() {
|
|
1371
|
-
if (C(),
|
|
1372
|
-
const
|
|
1373
|
-
|
|
1371
|
+
if (C(), Q.value !== void 0) {
|
|
1372
|
+
const i = A.value.indexOf(Q.value);
|
|
1373
|
+
i !== -1 && Z(() => we(i));
|
|
1374
1374
|
}
|
|
1375
1375
|
}
|
|
1376
|
-
function v(
|
|
1377
|
-
var
|
|
1378
|
-
if (!(!
|
|
1379
|
-
if (["ArrowDown", "ArrowUp", "Home", "End"].includes(
|
|
1380
|
-
|
|
1381
|
-
else if (["ArrowDown", "ArrowUp"].includes(
|
|
1382
|
-
|
|
1376
|
+
function v(i) {
|
|
1377
|
+
var k, D;
|
|
1378
|
+
if (!(!i.key || e.readonly || e.disabled))
|
|
1379
|
+
if (["ArrowDown", "ArrowUp", "Home", "End"].includes(i.key) && (i.preventDefault(), i.stopPropagation()), i.key === "Escape")
|
|
1380
|
+
r.value ? M() : W();
|
|
1381
|
+
else if (["ArrowDown", "ArrowUp"].includes(i.key))
|
|
1382
|
+
r.value ? Z(() => {
|
|
1383
1383
|
if (f.value === void 0)
|
|
1384
1384
|
V();
|
|
1385
1385
|
else {
|
|
1386
|
-
const j =
|
|
1386
|
+
const j = i.key === "ArrowDown" ? "next" : "prev";
|
|
1387
1387
|
p(f.value, j);
|
|
1388
1388
|
}
|
|
1389
1389
|
}) : (C(), Z(() => {
|
|
1390
|
-
|
|
1390
|
+
i.key === "ArrowDown" ? V() : s();
|
|
1391
1391
|
}));
|
|
1392
|
-
else if (
|
|
1392
|
+
else if (i.key === "Enter") {
|
|
1393
1393
|
if (T.value === void 0)
|
|
1394
1394
|
return;
|
|
1395
1395
|
N(T.value[e.itemValue]);
|
|
1396
1396
|
} else
|
|
1397
|
-
|
|
1397
|
+
i.key === "Home" ? f.value = (k = y.value) == null ? void 0 : k.getFirstFocusableItemIndex() : i.key === "End" ? f.value = (D = y.value) == null ? void 0 : D.getLastFocusableItemIndex() : (/^[a-z]$/i.test(i.key) || i.key === "Backspace") && C();
|
|
1398
1398
|
}
|
|
1399
1399
|
function V() {
|
|
1400
|
-
var
|
|
1400
|
+
var i, k;
|
|
1401
1401
|
if (l.value !== void 0) {
|
|
1402
1402
|
const D = A.value.findIndex(
|
|
1403
1403
|
(j) => j[e.itemValue] === l.value
|
|
1404
1404
|
);
|
|
1405
|
-
D === -1 ? f.value = (
|
|
1405
|
+
D === -1 ? f.value = (i = y.value) == null ? void 0 : i.getFirstFocusableItemIndex() : f.value = D;
|
|
1406
1406
|
} else
|
|
1407
|
-
f.value = (
|
|
1407
|
+
f.value = (k = y.value) == null ? void 0 : k.getFirstFocusableItemIndex();
|
|
1408
1408
|
}
|
|
1409
1409
|
function s() {
|
|
1410
|
-
var
|
|
1411
|
-
f.value = (
|
|
1410
|
+
var i;
|
|
1411
|
+
f.value = (i = y.value) == null ? void 0 : i.getLastFocusableItemIndex();
|
|
1412
1412
|
}
|
|
1413
|
-
function p(
|
|
1413
|
+
function p(i, k) {
|
|
1414
1414
|
var D;
|
|
1415
|
-
f.value = (D =
|
|
1415
|
+
f.value = (D = y.value) == null ? void 0 : D.getAdjacentItemIndex(i, k);
|
|
1416
1416
|
}
|
|
1417
|
-
function
|
|
1418
|
-
var
|
|
1419
|
-
!((
|
|
1417
|
+
function w(i) {
|
|
1418
|
+
var k, D, j;
|
|
1419
|
+
!((k = g.value) != null && k.contains(i.relatedTarget)) && !((j = (D = u.value) == null ? void 0 : D.fieldRef) != null && j.contains(i.relatedTarget)) && (M(), R());
|
|
1420
1420
|
}
|
|
1421
1421
|
function $() {
|
|
1422
|
-
var
|
|
1423
|
-
(
|
|
1422
|
+
var i, k;
|
|
1423
|
+
(k = (i = u.value) == null ? void 0 : i.inputRef) == null || k.focus();
|
|
1424
1424
|
}
|
|
1425
1425
|
function ne() {
|
|
1426
1426
|
o("show");
|
|
@@ -1428,55 +1428,81 @@ const Jt = {
|
|
|
1428
1428
|
function oe() {
|
|
1429
1429
|
o("hide");
|
|
1430
1430
|
}
|
|
1431
|
-
function
|
|
1431
|
+
function we(i) {
|
|
1432
1432
|
var D;
|
|
1433
|
-
const
|
|
1434
|
-
|
|
1433
|
+
const k = (D = y.value) == null ? void 0 : D.getItem(i);
|
|
1434
|
+
k == null || k.scrollIntoView({ block: "nearest", inline: "start" });
|
|
1435
1435
|
}
|
|
1436
1436
|
return z(
|
|
1437
1437
|
() => e.modelValue,
|
|
1438
|
-
(
|
|
1439
|
-
l.value =
|
|
1438
|
+
(i) => {
|
|
1439
|
+
l.value = i;
|
|
1440
1440
|
}
|
|
1441
|
-
), z(f, (
|
|
1442
|
-
|
|
1443
|
-
}), z(
|
|
1444
|
-
!
|
|
1445
|
-
}), (
|
|
1441
|
+
), z(f, (i) => {
|
|
1442
|
+
i !== void 0 && we(i);
|
|
1443
|
+
}), z(d, (i) => {
|
|
1444
|
+
!i && F.value ? W() : r.value && e.selectionMode === "automatic" && Z(V);
|
|
1445
|
+
}), (i, k) => {
|
|
1446
1446
|
var D, j;
|
|
1447
1447
|
return c(), m(P, null, [
|
|
1448
|
-
ee(
|
|
1449
|
-
modelValue:
|
|
1450
|
-
"onUpdate:modelValue":
|
|
1448
|
+
ee(b(Zt), {
|
|
1449
|
+
modelValue: d.value,
|
|
1450
|
+
"onUpdate:modelValue": k[0] || (k[0] = (ie) => d.value = ie),
|
|
1451
1451
|
id: e.id,
|
|
1452
1452
|
label: e.label,
|
|
1453
1453
|
required: e.required,
|
|
1454
1454
|
ref_key: "triggerEl",
|
|
1455
1455
|
ref: u,
|
|
1456
1456
|
role: "combobox",
|
|
1457
|
-
class: K(["q-combobox", ...
|
|
1457
|
+
class: K(["q-combobox", ...b(a).class]),
|
|
1458
1458
|
readonly: e.readonly,
|
|
1459
1459
|
disabled: e.disabled,
|
|
1460
|
-
"aria-expanded":
|
|
1460
|
+
"aria-expanded": r.value,
|
|
1461
1461
|
"aria-haspopup": "listbox",
|
|
1462
1462
|
"aria-autocomplete": "list",
|
|
1463
1463
|
"aria-activedescendant": O.value,
|
|
1464
1464
|
size: e.size,
|
|
1465
1465
|
onClick: G,
|
|
1466
|
-
onFocusout:
|
|
1466
|
+
onFocusout: w,
|
|
1467
1467
|
onKeydown: J(v, ["stop"])
|
|
1468
|
-
}, {
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1468
|
+
}, be({
|
|
1469
|
+
"label.prepend": q(() => [
|
|
1470
|
+
h(i.$slots, "label.prepend")
|
|
1471
|
+
]),
|
|
1472
|
+
"label.append": q(() => [
|
|
1473
|
+
h(i.$slots, "label.append")
|
|
1474
1474
|
]),
|
|
1475
|
-
_:
|
|
1476
|
-
},
|
|
1477
|
-
|
|
1475
|
+
_: 2
|
|
1476
|
+
}, [
|
|
1477
|
+
i.$slots.prepend ? {
|
|
1478
|
+
name: "prepend",
|
|
1479
|
+
fn: q(() => [
|
|
1480
|
+
h(i.$slots, "prepend")
|
|
1481
|
+
]),
|
|
1482
|
+
key: "0"
|
|
1483
|
+
} : void 0,
|
|
1484
|
+
F.value && d.value || i.$slots.append ? {
|
|
1485
|
+
name: "append",
|
|
1486
|
+
fn: q(() => [
|
|
1487
|
+
F.value && d.value ? (c(), L(b(Y), le({ key: 0 }, e.icons.clear, {
|
|
1488
|
+
class: "q-combobox__clear",
|
|
1489
|
+
onClick: J(W, ["stop", "prevent"])
|
|
1490
|
+
}), null, 16)) : S("", !0),
|
|
1491
|
+
h(i.$slots, "append")
|
|
1492
|
+
]),
|
|
1493
|
+
key: "1"
|
|
1494
|
+
} : void 0,
|
|
1495
|
+
i.$slots.extras ? {
|
|
1496
|
+
name: "extras",
|
|
1497
|
+
fn: q(() => [
|
|
1498
|
+
h(i.$slots, "extras")
|
|
1499
|
+
]),
|
|
1500
|
+
key: "2"
|
|
1501
|
+
} : void 0
|
|
1502
|
+
]), 1032, ["modelValue", "id", "label", "required", "class", "readonly", "disabled", "aria-expanded", "aria-activedescendant", "size"]),
|
|
1503
|
+
(D = u.value) != null && D.fieldRef ? (c(), L(b(fe), {
|
|
1478
1504
|
key: 0,
|
|
1479
|
-
"model-value":
|
|
1505
|
+
"model-value": r.value,
|
|
1480
1506
|
spy: "",
|
|
1481
1507
|
trigger: "manual",
|
|
1482
1508
|
placement: "bottom",
|
|
@@ -1486,43 +1512,43 @@ const Jt = {
|
|
|
1486
1512
|
onEnter: ne,
|
|
1487
1513
|
onLeave: oe
|
|
1488
1514
|
}, {
|
|
1489
|
-
default:
|
|
1515
|
+
default: q(() => {
|
|
1490
1516
|
var ie;
|
|
1491
1517
|
return [
|
|
1492
1518
|
H("div", {
|
|
1493
1519
|
ref_key: "contentRef",
|
|
1494
|
-
ref:
|
|
1520
|
+
ref: g,
|
|
1495
1521
|
class: "q-select__body",
|
|
1496
|
-
onFocusout:
|
|
1522
|
+
onFocusout: w
|
|
1497
1523
|
}, [
|
|
1498
|
-
|
|
1499
|
-
e.loading ? (c(),
|
|
1524
|
+
h(i.$slots, "body.prepend"),
|
|
1525
|
+
e.loading ? (c(), L(b(_e), {
|
|
1500
1526
|
key: 0,
|
|
1501
1527
|
class: "q-select__loader",
|
|
1502
1528
|
size: 24
|
|
1503
|
-
})) : A.value.length ? (c(),
|
|
1529
|
+
})) : A.value.length ? (c(), L(b(Oe), {
|
|
1504
1530
|
key: 1,
|
|
1505
1531
|
ref_key: "listRef",
|
|
1506
|
-
ref:
|
|
1532
|
+
ref: y,
|
|
1507
1533
|
class: "q-select__items",
|
|
1508
1534
|
modelValue: l.value,
|
|
1509
1535
|
"onUpdate:modelValue": [
|
|
1510
|
-
|
|
1536
|
+
k[1] || (k[1] = (Ne) => l.value = Ne),
|
|
1511
1537
|
N
|
|
1512
1538
|
],
|
|
1513
1539
|
highlighted: (ie = T.value) == null ? void 0 : ie[e.itemValue],
|
|
1514
1540
|
items: A.value,
|
|
1515
|
-
groups:
|
|
1541
|
+
groups: i.groups,
|
|
1516
1542
|
"item-label": e.itemLabel,
|
|
1517
1543
|
"item-value": e.itemValue,
|
|
1518
1544
|
onMouseup: $
|
|
1519
|
-
}, null, 8, ["modelValue", "highlighted", "items", "groups", "item-label", "item-value"])) : (c(), m("div", Jt, U(
|
|
1520
|
-
|
|
1545
|
+
}, null, 8, ["modelValue", "highlighted", "items", "groups", "item-label", "item-value"])) : (c(), m("div", Jt, U(i.texts.noData), 1)),
|
|
1546
|
+
h(i.$slots, "body.append")
|
|
1521
1547
|
], 544)
|
|
1522
1548
|
];
|
|
1523
1549
|
}),
|
|
1524
1550
|
_: 3
|
|
1525
|
-
}, 8, ["model-value", "anchor"])) :
|
|
1551
|
+
}, 8, ["model-value", "anchor"])) : S("", !0)
|
|
1526
1552
|
], 64);
|
|
1527
1553
|
};
|
|
1528
1554
|
}
|
|
@@ -1532,7 +1558,7 @@ const Jt = {
|
|
|
1532
1558
|
}, ln = { key: 0 }, an = {
|
|
1533
1559
|
key: 1,
|
|
1534
1560
|
class: "q-input-group__append"
|
|
1535
|
-
}, sn = { key: 0 }, rn = /* @__PURE__ */
|
|
1561
|
+
}, sn = { key: 0 }, rn = /* @__PURE__ */ x({
|
|
1536
1562
|
__name: "QInputGroup",
|
|
1537
1563
|
props: {
|
|
1538
1564
|
id: { default: () => te() },
|
|
@@ -1550,7 +1576,7 @@ const Jt = {
|
|
|
1550
1576
|
QField: {
|
|
1551
1577
|
size: "block"
|
|
1552
1578
|
}
|
|
1553
|
-
}), (o, e) => (c(),
|
|
1579
|
+
}), (o, e) => (c(), L(b(ke), {
|
|
1554
1580
|
class: "q-input-group",
|
|
1555
1581
|
id: n.id,
|
|
1556
1582
|
label: n.label,
|
|
@@ -1559,20 +1585,20 @@ const Jt = {
|
|
|
1559
1585
|
required: n.required,
|
|
1560
1586
|
size: n.size
|
|
1561
1587
|
}, {
|
|
1562
|
-
default:
|
|
1588
|
+
default: q(() => [
|
|
1563
1589
|
o.$slots.prepend || n.prependIcon ? (c(), m("div", on, [
|
|
1564
1590
|
n.prependIcon ? (c(), m("span", ln, [
|
|
1565
|
-
ee(
|
|
1566
|
-
])) :
|
|
1567
|
-
|
|
1568
|
-
])) :
|
|
1569
|
-
|
|
1591
|
+
ee(b(Y), ue(he(n.prependIcon)), null, 16)
|
|
1592
|
+
])) : S("", !0),
|
|
1593
|
+
h(o.$slots, "prepend")
|
|
1594
|
+
])) : S("", !0),
|
|
1595
|
+
h(o.$slots, "default"),
|
|
1570
1596
|
o.$slots.append || n.appendIcon ? (c(), m("div", an, [
|
|
1571
1597
|
n.appendIcon ? (c(), m("span", sn, [
|
|
1572
|
-
ee(
|
|
1573
|
-
])) :
|
|
1574
|
-
|
|
1575
|
-
])) :
|
|
1598
|
+
ee(b(Y), ue(he(n.appendIcon)), null, 16)
|
|
1599
|
+
])) : S("", !0),
|
|
1600
|
+
h(o.$slots, "append")
|
|
1601
|
+
])) : S("", !0)
|
|
1576
1602
|
]),
|
|
1577
1603
|
_: 3
|
|
1578
1604
|
}, 8, ["id", "label", "readonly", "disabled", "required", "size"]));
|
|
@@ -1592,7 +1618,7 @@ const pn = /* @__PURE__ */ dn(un, [["render", fn]]), Tn = B(pn), mn = {
|
|
|
1592
1618
|
}, vn = {
|
|
1593
1619
|
key: 1,
|
|
1594
1620
|
class: "q-popover__body"
|
|
1595
|
-
}, hn = ["innerHTML"], yn = { key: 1 }, bn = /* @__PURE__ */
|
|
1621
|
+
}, hn = ["innerHTML"], yn = { key: 1 }, bn = /* @__PURE__ */ x({
|
|
1596
1622
|
inheritAttrs: !1,
|
|
1597
1623
|
__name: "QPopover",
|
|
1598
1624
|
props: {
|
|
@@ -1609,7 +1635,7 @@ const pn = /* @__PURE__ */ dn(un, [["render", fn]]), Tn = B(pn), mn = {
|
|
|
1609
1635
|
},
|
|
1610
1636
|
setup(t) {
|
|
1611
1637
|
const n = t;
|
|
1612
|
-
return (o, e) => (c(),
|
|
1638
|
+
return (o, e) => (c(), L(b(fe), {
|
|
1613
1639
|
"model-value": n.modelValue,
|
|
1614
1640
|
trigger: "click",
|
|
1615
1641
|
anchor: n.anchor,
|
|
@@ -1620,18 +1646,18 @@ const pn = /* @__PURE__ */ dn(un, [["render", fn]]), Tn = B(pn), mn = {
|
|
|
1620
1646
|
placement: n.placement,
|
|
1621
1647
|
spy: n.spy
|
|
1622
1648
|
}, {
|
|
1623
|
-
default:
|
|
1649
|
+
default: q(() => [
|
|
1624
1650
|
n.title || o.$slots.header ? (c(), m("h3", mn, [
|
|
1625
1651
|
de(U(n.title) + " ", 1),
|
|
1626
|
-
|
|
1627
|
-
])) :
|
|
1652
|
+
h(o.$slots, "header")
|
|
1653
|
+
])) : S("", !0),
|
|
1628
1654
|
n.text || o.$slots.body ? (c(), m("div", vn, [
|
|
1629
1655
|
n.html ? (c(), m("span", {
|
|
1630
1656
|
key: 0,
|
|
1631
1657
|
innerHTML: n.text
|
|
1632
1658
|
}, null, 8, hn)) : (c(), m("span", yn, U(n.text), 1)),
|
|
1633
|
-
|
|
1634
|
-
])) :
|
|
1659
|
+
h(o.$slots, "body")
|
|
1660
|
+
])) : S("", !0)
|
|
1635
1661
|
]),
|
|
1636
1662
|
_: 3
|
|
1637
1663
|
}, 8, ["model-value", "anchor", "arrow", "attach", "disabled", "placement", "spy"]));
|
|
@@ -1651,7 +1677,7 @@ const pn = /* @__PURE__ */ dn(un, [["render", fn]]), Tn = B(pn), mn = {
|
|
|
1651
1677
|
clear: {
|
|
1652
1678
|
icon: "close"
|
|
1653
1679
|
}
|
|
1654
|
-
}, $n = /* @__PURE__ */
|
|
1680
|
+
}, $n = /* @__PURE__ */ x({
|
|
1655
1681
|
inheritAttrs: !1,
|
|
1656
1682
|
__name: "QSelect",
|
|
1657
1683
|
props: {
|
|
@@ -1673,54 +1699,54 @@ const pn = /* @__PURE__ */ dn(un, [["render", fn]]), Tn = B(pn), mn = {
|
|
|
1673
1699
|
},
|
|
1674
1700
|
emits: ["update:modelValue", "before-show", "before-hide", "show", "hide"],
|
|
1675
1701
|
setup(t, { emit: n }) {
|
|
1676
|
-
const o = n, e = t, a = Ue(), l = I(e.modelValue),
|
|
1702
|
+
const o = n, e = t, a = Ue(), l = I(e.modelValue), r = I(!1), d = I(""), f = I(null), u = I(null), y = I(null), g = _(
|
|
1677
1703
|
() => {
|
|
1678
1704
|
var s;
|
|
1679
1705
|
return (s = e.items) == null ? void 0 : s.find((p) => p[e.itemValue] === l.value);
|
|
1680
1706
|
}
|
|
1681
|
-
),
|
|
1682
|
-
() =>
|
|
1683
|
-
), A =
|
|
1707
|
+
), F = _(
|
|
1708
|
+
() => g.value ? g.value[e.itemLabel] : ""
|
|
1709
|
+
), A = _(
|
|
1684
1710
|
() => e.clearable && !e.readonly && !e.disabled && !e.loading
|
|
1685
1711
|
);
|
|
1686
|
-
function
|
|
1712
|
+
function Q(s) {
|
|
1687
1713
|
l.value = s, o("update:modelValue", s), N();
|
|
1688
1714
|
}
|
|
1689
1715
|
function T() {
|
|
1690
|
-
A.value &&
|
|
1716
|
+
A.value && Q(void 0);
|
|
1691
1717
|
}
|
|
1692
1718
|
function O() {
|
|
1693
|
-
e.readonly || e.disabled || (
|
|
1719
|
+
e.readonly || e.disabled || (r.value ? N() : X());
|
|
1694
1720
|
}
|
|
1695
1721
|
function E(s) {
|
|
1696
|
-
var p,
|
|
1697
|
-
!((p =
|
|
1722
|
+
var p, w, $;
|
|
1723
|
+
!((p = y.value) != null && p.contains(s.relatedTarget)) && !(($ = (w = f.value) == null ? void 0 : w.fieldRef) != null && $.contains(s.relatedTarget)) && N();
|
|
1698
1724
|
}
|
|
1699
1725
|
function X() {
|
|
1700
|
-
|
|
1726
|
+
r.value || (o("before-show"), r.value = !0);
|
|
1701
1727
|
}
|
|
1702
1728
|
function N() {
|
|
1703
|
-
|
|
1729
|
+
r.value && (o("before-hide"), r.value = !1);
|
|
1704
1730
|
}
|
|
1705
|
-
let
|
|
1731
|
+
let R;
|
|
1706
1732
|
function C(s) {
|
|
1707
1733
|
if (!(!s.key || e.readonly || e.disabled)) {
|
|
1708
|
-
if (window.clearTimeout(
|
|
1709
|
-
|
|
1734
|
+
if (window.clearTimeout(R), ["Enter", " ", "ArrowDown", "ArrowUp", "Home", "End"].includes(s.key) && (s.preventDefault(), s.stopPropagation()), ["Enter", " "].includes(s.key) && (r.value = !0), ["Escape", "Tab"].includes(s.key) && (r.value ? r.value = !1 : e.clearable && s.key === "Escape" && T()), s.key === "Delete" && e.clearable && T(), /^[a-z]$/i.test(s.key)) {
|
|
1735
|
+
d.value += s.key.toLowerCase();
|
|
1710
1736
|
for (let p = 0; p < e.items.length; p++)
|
|
1711
|
-
if (e.items[p][e.itemLabel].toLowerCase().startsWith(
|
|
1737
|
+
if (e.items[p][e.itemLabel].toLowerCase().startsWith(d.value)) {
|
|
1712
1738
|
V(p);
|
|
1713
1739
|
break;
|
|
1714
1740
|
}
|
|
1715
1741
|
}
|
|
1716
|
-
|
|
1717
|
-
|
|
1742
|
+
R = window.setTimeout(function() {
|
|
1743
|
+
d.value = "";
|
|
1718
1744
|
}, 500);
|
|
1719
1745
|
}
|
|
1720
1746
|
}
|
|
1721
1747
|
function M() {
|
|
1722
1748
|
var s;
|
|
1723
|
-
e.loading ? (s =
|
|
1749
|
+
e.loading ? (s = y.value) == null || s.focus() : v(), o("show");
|
|
1724
1750
|
}
|
|
1725
1751
|
function W() {
|
|
1726
1752
|
G(), o("hide");
|
|
@@ -1745,12 +1771,12 @@ const pn = /* @__PURE__ */ dn(un, [["render", fn]]), Tn = B(pn), mn = {
|
|
|
1745
1771
|
), z(
|
|
1746
1772
|
() => e.loading,
|
|
1747
1773
|
(s) => {
|
|
1748
|
-
!s &&
|
|
1774
|
+
!s && r.value && Z(v);
|
|
1749
1775
|
}
|
|
1750
1776
|
), (s, p) => {
|
|
1751
|
-
var
|
|
1777
|
+
var w, $, ne;
|
|
1752
1778
|
return c(), m(P, null, [
|
|
1753
|
-
ee(
|
|
1779
|
+
ee(b(ke), {
|
|
1754
1780
|
id: e.id,
|
|
1755
1781
|
label: e.label,
|
|
1756
1782
|
required: e.required,
|
|
@@ -1763,44 +1789,44 @@ const pn = /* @__PURE__ */ dn(un, [["render", fn]]), Tn = B(pn), mn = {
|
|
|
1763
1789
|
{
|
|
1764
1790
|
"q-select--readonly": e.readonly,
|
|
1765
1791
|
"q-select--disabled": e.disabled,
|
|
1766
|
-
"q-select--expanded":
|
|
1792
|
+
"q-select--expanded": r.value
|
|
1767
1793
|
},
|
|
1768
|
-
...
|
|
1794
|
+
...b(a).class
|
|
1769
1795
|
]),
|
|
1770
1796
|
readonly: e.readonly,
|
|
1771
1797
|
disabled: e.disabled,
|
|
1772
|
-
"aria-expanded":
|
|
1798
|
+
"aria-expanded": r.value,
|
|
1773
1799
|
"aria-haspopup": "listbox",
|
|
1774
1800
|
size: e.size,
|
|
1775
1801
|
onClick: O,
|
|
1776
1802
|
onKeydown: J(C, ["stop"])
|
|
1777
|
-
},
|
|
1778
|
-
append:
|
|
1779
|
-
A.value && l.value ? (c(),
|
|
1803
|
+
}, be({
|
|
1804
|
+
append: q(() => [
|
|
1805
|
+
A.value && l.value ? (c(), L(b(Y), le({ key: 0 }, e.icons.clear, {
|
|
1780
1806
|
class: "q-select__clear",
|
|
1781
1807
|
onClick: J(T, ["stop", "prevent"])
|
|
1782
|
-
}), null, 16)) :
|
|
1783
|
-
!e.readonly && !e.disabled ? (c(),
|
|
1808
|
+
}), null, 16)) : S("", !0),
|
|
1809
|
+
!e.readonly && !e.disabled ? (c(), L(b(Y), le({ key: 1 }, e.icons.chevron, { class: "q-select__chevron" }), null, 16)) : S("", !0)
|
|
1784
1810
|
]),
|
|
1785
|
-
default:
|
|
1786
|
-
l.value ? (c(), m("span", gn, U(
|
|
1811
|
+
default: q(() => [
|
|
1812
|
+
l.value ? (c(), m("span", gn, U(F.value), 1)) : (c(), m("span", _n, U(s.texts.placeholder), 1))
|
|
1787
1813
|
]),
|
|
1788
1814
|
_: 2
|
|
1789
1815
|
}, [
|
|
1790
|
-
(
|
|
1816
|
+
(w = g.value) != null && w.icon ? {
|
|
1791
1817
|
name: "prepend",
|
|
1792
|
-
fn:
|
|
1818
|
+
fn: q(() => {
|
|
1793
1819
|
var oe;
|
|
1794
1820
|
return [
|
|
1795
|
-
ee(
|
|
1821
|
+
ee(b(Y), ue(he((oe = g.value) == null ? void 0 : oe.icon)), null, 16)
|
|
1796
1822
|
];
|
|
1797
1823
|
}),
|
|
1798
1824
|
key: "0"
|
|
1799
1825
|
} : void 0
|
|
1800
1826
|
]), 1032, ["id", "label", "required", "class", "readonly", "disabled", "aria-expanded", "size"]),
|
|
1801
|
-
($ = f.value) != null && $.fieldRef ? (c(),
|
|
1827
|
+
($ = f.value) != null && $.fieldRef ? (c(), L(b(fe), {
|
|
1802
1828
|
key: 0,
|
|
1803
|
-
"model-value":
|
|
1829
|
+
"model-value": r.value,
|
|
1804
1830
|
spy: "",
|
|
1805
1831
|
trigger: "manual",
|
|
1806
1832
|
placement: "bottom",
|
|
@@ -1810,21 +1836,21 @@ const pn = /* @__PURE__ */ dn(un, [["render", fn]]), Tn = B(pn), mn = {
|
|
|
1810
1836
|
onEnter: M,
|
|
1811
1837
|
onLeave: W
|
|
1812
1838
|
}, {
|
|
1813
|
-
default:
|
|
1839
|
+
default: q(() => [
|
|
1814
1840
|
H("div", {
|
|
1815
1841
|
ref_key: "contentRef",
|
|
1816
|
-
ref:
|
|
1842
|
+
ref: y,
|
|
1817
1843
|
class: "q-select__body",
|
|
1818
1844
|
tabindex: "-1",
|
|
1819
1845
|
onFocusout: E,
|
|
1820
1846
|
onKeydown: J(C, ["stop"])
|
|
1821
1847
|
}, [
|
|
1822
|
-
|
|
1823
|
-
e.loading ? (c(),
|
|
1848
|
+
h(s.$slots, "body.prepend"),
|
|
1849
|
+
e.loading ? (c(), L(b(_e), {
|
|
1824
1850
|
key: 0,
|
|
1825
1851
|
class: "q-select__loader",
|
|
1826
1852
|
size: 24
|
|
1827
|
-
})) : (c(),
|
|
1853
|
+
})) : (c(), L(b(Oe), {
|
|
1828
1854
|
key: 1,
|
|
1829
1855
|
ref_key: "listRef",
|
|
1830
1856
|
ref: u,
|
|
@@ -1832,22 +1858,22 @@ const pn = /* @__PURE__ */ dn(un, [["render", fn]]), Tn = B(pn), mn = {
|
|
|
1832
1858
|
modelValue: l.value,
|
|
1833
1859
|
"onUpdate:modelValue": [
|
|
1834
1860
|
p[0] || (p[0] = (oe) => l.value = oe),
|
|
1835
|
-
|
|
1861
|
+
Q
|
|
1836
1862
|
],
|
|
1837
1863
|
items: e.items,
|
|
1838
1864
|
groups: s.groups,
|
|
1839
1865
|
"item-label": e.itemLabel,
|
|
1840
1866
|
"item-value": e.itemValue
|
|
1841
1867
|
}, null, 8, ["modelValue", "items", "groups", "item-label", "item-value"])),
|
|
1842
|
-
|
|
1868
|
+
h(s.$slots, "body.append")
|
|
1843
1869
|
], 544)
|
|
1844
1870
|
]),
|
|
1845
1871
|
_: 3
|
|
1846
|
-
}, 8, ["model-value", "anchor"])) :
|
|
1872
|
+
}, 8, ["model-value", "anchor"])) : S("", !0)
|
|
1847
1873
|
], 64);
|
|
1848
1874
|
};
|
|
1849
1875
|
}
|
|
1850
|
-
}), An = B($n), In = ["innerHTML"], qn = { key: 1 },
|
|
1876
|
+
}), An = B($n), In = ["innerHTML"], qn = { key: 1 }, Sn = /* @__PURE__ */ x({
|
|
1851
1877
|
inheritAttrs: !1,
|
|
1852
1878
|
__name: "QTooltip",
|
|
1853
1879
|
props: {
|
|
@@ -1865,7 +1891,7 @@ const pn = /* @__PURE__ */ dn(un, [["render", fn]]), Tn = B(pn), mn = {
|
|
|
1865
1891
|
},
|
|
1866
1892
|
setup(t) {
|
|
1867
1893
|
const n = t;
|
|
1868
|
-
return (o, e) => (c(),
|
|
1894
|
+
return (o, e) => (c(), L(b(fe), {
|
|
1869
1895
|
"model-value": n.modelValue,
|
|
1870
1896
|
anchor: n.anchor,
|
|
1871
1897
|
appearance: n.appearance,
|
|
@@ -1877,7 +1903,7 @@ const pn = /* @__PURE__ */ dn(un, [["render", fn]]), Tn = B(pn), mn = {
|
|
|
1877
1903
|
placement: n.placement,
|
|
1878
1904
|
trigger: n.trigger
|
|
1879
1905
|
}, {
|
|
1880
|
-
default:
|
|
1906
|
+
default: q(() => [
|
|
1881
1907
|
n.html ? (c(), m("span", {
|
|
1882
1908
|
key: 0,
|
|
1883
1909
|
innerHTML: n.text
|
|
@@ -1886,7 +1912,7 @@ const pn = /* @__PURE__ */ dn(un, [["render", fn]]), Tn = B(pn), mn = {
|
|
|
1886
1912
|
_: 1
|
|
1887
1913
|
}, 8, ["model-value", "anchor", "appearance", "arrow", "attach", "delay", "disabled", "placement", "trigger"]));
|
|
1888
1914
|
}
|
|
1889
|
-
}), Cn = B(
|
|
1915
|
+
}), Cn = B(Sn), Fn = {
|
|
1890
1916
|
mounted(t, n) {
|
|
1891
1917
|
t.clickOutsideEvent = function(o) {
|
|
1892
1918
|
const e = o.target;
|
|
@@ -1902,11 +1928,11 @@ export {
|
|
|
1902
1928
|
vt as QButtonGroup,
|
|
1903
1929
|
Vn as QButtonToggle,
|
|
1904
1930
|
Dn as QCombobox,
|
|
1905
|
-
|
|
1931
|
+
ke as QField,
|
|
1906
1932
|
Y as QIcon,
|
|
1907
1933
|
qt as QIconFont,
|
|
1908
|
-
|
|
1909
|
-
|
|
1934
|
+
St as QIconImg,
|
|
1935
|
+
Lt as QIconSvg,
|
|
1910
1936
|
En as QInputGroup,
|
|
1911
1937
|
Tn as QLineLoader,
|
|
1912
1938
|
Oe as QList,
|
|
@@ -1915,13 +1941,13 @@ export {
|
|
|
1915
1941
|
fe as QOverlay,
|
|
1916
1942
|
zn as QPopover,
|
|
1917
1943
|
An as QSelect,
|
|
1918
|
-
|
|
1944
|
+
_e as QSpinnerLoader,
|
|
1919
1945
|
Zt as QTextField,
|
|
1920
1946
|
Cn as QTooltip,
|
|
1921
1947
|
Fn as clickOutside,
|
|
1922
1948
|
Bn as createFramework,
|
|
1923
1949
|
Je as defaultDarkColorScheme,
|
|
1924
|
-
|
|
1925
|
-
|
|
1950
|
+
qe as defaultLightColorScheme,
|
|
1951
|
+
xn as useTheme
|
|
1926
1952
|
};
|
|
1927
1953
|
//# sourceMappingURL=ui.esm.js.map
|