@quidgest/ui 0.9.9 → 0.10.1
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 +176 -133
- package/dist/ui.css +42 -120
- package/dist/ui.esm.js +915 -850
- 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.css +1 -1
- package/dist/ui.min.js +124 -109
- package/dist/ui.min.js.map +1 -1
- package/dist/ui.scss +46 -131
- package/package.json +37 -36
package/dist/ui.esm.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { getCurrentInstance as
|
|
2
|
-
function
|
|
1
|
+
import { getCurrentInstance as Ue, computed as w, ref as B, provide as Pe, inject as Ne, watch as W, defineComponent as L, openBlock as c, createElementBlock as m, normalizeClass as D, normalizeStyle as de, withModifiers as ue, createVNode as Q, unref as b, createCommentVNode as q, createElementVNode as se, Fragment as le, createTextVNode as me, toDisplayString as R, renderSlot as h, toRef as Ee, mergeModels as X, useModel as te, createBlock as E, withCtx as k, renderList as qe, resolveDynamicComponent as He, h as De, normalizeProps as ae, mergeProps as ce, reactive as Ae, nextTick as j, onMounted as Ke, onBeforeUnmount as Xe, Teleport as Ye, Transition as Ze, withKeys as Je, createSlots as we, withDirectives as et, vModelDynamic as tt, guardReactiveProps as fe } from "vue";
|
|
2
|
+
function Ie(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 ze(t) {
|
|
6
6
|
return t !== null && typeof t == "object" && !Array.isArray(t);
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function xe(t = {}, o = {}) {
|
|
9
9
|
const e = {};
|
|
10
10
|
for (const n in t)
|
|
11
11
|
e[n] = t[n];
|
|
12
12
|
for (const n in o) {
|
|
13
13
|
const l = t[n], s = o[n];
|
|
14
|
-
if (
|
|
15
|
-
e[n] =
|
|
14
|
+
if (ze(l) && ze(s)) {
|
|
15
|
+
e[n] = xe(
|
|
16
16
|
l,
|
|
17
17
|
s
|
|
18
18
|
);
|
|
@@ -22,45 +22,45 @@ function ke(t = {}, o = {}) {
|
|
|
22
22
|
}
|
|
23
23
|
return e;
|
|
24
24
|
}
|
|
25
|
-
const
|
|
26
|
-
function
|
|
27
|
-
var s,
|
|
28
|
-
const t =
|
|
25
|
+
const Le = "q-defaults";
|
|
26
|
+
function ot() {
|
|
27
|
+
var s, i;
|
|
28
|
+
const t = Ue();
|
|
29
29
|
if (!t)
|
|
30
30
|
throw new Error("[Quidgest UI] useDefaults must be called from inside a setup function");
|
|
31
31
|
const o = t.type.name ?? t.type.__name;
|
|
32
32
|
if (!o)
|
|
33
33
|
throw new Error("[Quidgest UI] Could not determine component name");
|
|
34
|
-
const e =
|
|
35
|
-
return w(() =>
|
|
34
|
+
const e = We(), n = (s = e.value) == null ? void 0 : s.Global, l = (i = e.value) == null ? void 0 : i[o];
|
|
35
|
+
return w(() => xe(n, l));
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
if (
|
|
37
|
+
function Ge(t) {
|
|
38
|
+
if (Ie(t))
|
|
39
39
|
return;
|
|
40
|
-
const o =
|
|
41
|
-
|
|
40
|
+
const o = We(), e = B(t), n = w(() => Ie(e.value) ? o.value : xe(o.value, e.value));
|
|
41
|
+
Pe(Le, n);
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
const t =
|
|
43
|
+
function We() {
|
|
44
|
+
const t = Ne(Le, void 0);
|
|
45
45
|
if (!t)
|
|
46
46
|
throw new Error("[Quidgest UI] Could not find defaults instance");
|
|
47
47
|
return t;
|
|
48
48
|
}
|
|
49
|
-
const
|
|
50
|
-
function
|
|
51
|
-
const t =
|
|
49
|
+
const ve = "q-theme";
|
|
50
|
+
function nt() {
|
|
51
|
+
const t = Ne(ve);
|
|
52
52
|
if (!t)
|
|
53
53
|
throw new Error("[Quidgest UI] Could not find theme instance");
|
|
54
54
|
return t;
|
|
55
55
|
}
|
|
56
|
-
function
|
|
57
|
-
const o =
|
|
58
|
-
activeTheme:
|
|
56
|
+
function Oo(t) {
|
|
57
|
+
const o = nt(), e = {
|
|
58
|
+
activeTheme: B(t),
|
|
59
59
|
themes: o.themes
|
|
60
60
|
};
|
|
61
|
-
return
|
|
61
|
+
return Pe(ve, e), e;
|
|
62
62
|
}
|
|
63
|
-
const
|
|
63
|
+
const Qe = {
|
|
64
64
|
primary: "#008ad2",
|
|
65
65
|
primaryLight: "#cde5ff",
|
|
66
66
|
primaryDark: "#006398",
|
|
@@ -91,7 +91,7 @@ const Se = {
|
|
|
91
91
|
onWarning: "#fff",
|
|
92
92
|
onDanger: "#fff",
|
|
93
93
|
onInfo: "#fff"
|
|
94
|
-
},
|
|
94
|
+
}, lt = {
|
|
95
95
|
primary: "#009ff5",
|
|
96
96
|
primaryLight: "#ade2ff",
|
|
97
97
|
primaryDark: "#164965",
|
|
@@ -123,26 +123,26 @@ const Se = {
|
|
|
123
123
|
onDanger: "#fff",
|
|
124
124
|
onInfo: "#fff"
|
|
125
125
|
};
|
|
126
|
-
function
|
|
126
|
+
function at(t) {
|
|
127
127
|
return /^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/.test(t);
|
|
128
128
|
}
|
|
129
|
-
function
|
|
130
|
-
if (!
|
|
129
|
+
function st(t) {
|
|
130
|
+
if (!at(t))
|
|
131
131
|
throw new Error("Invalid color format");
|
|
132
132
|
t.length === 4 && (t = "#" + t[1] + t[1] + t[2] + t[2] + t[3] + t[3]);
|
|
133
133
|
const o = parseInt(t.slice(1, 3), 16), e = parseInt(t.slice(3, 5), 16), n = parseInt(t.slice(5, 7), 16);
|
|
134
134
|
return { r: o, g: e, b: n };
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function je(t) {
|
|
137
137
|
return t.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/([0-9])([A-Za-z])/g, "$1-$2").replace(/([A-Za-z])([0-9])/g, "$1-$2").toLowerCase();
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function it() {
|
|
140
140
|
let t = document.getElementById(
|
|
141
|
-
|
|
141
|
+
ve
|
|
142
142
|
);
|
|
143
|
-
return t || (t = document.createElement("style"), t.id =
|
|
143
|
+
return t || (t = document.createElement("style"), t.id = ve, document.head.appendChild(t)), t;
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function rt(t) {
|
|
146
146
|
let o = "";
|
|
147
147
|
for (const n of t) {
|
|
148
148
|
o += `.q-theme--${n.name} {
|
|
@@ -150,77 +150,64 @@ function ot(t) {
|
|
|
150
150
|
const l = n.scheme;
|
|
151
151
|
let s;
|
|
152
152
|
for (s in l) {
|
|
153
|
-
const
|
|
154
|
-
if (
|
|
155
|
-
o += ` ${
|
|
153
|
+
const i = l[s];
|
|
154
|
+
if (i) {
|
|
155
|
+
o += ` ${Me(s)}: ${i};
|
|
156
156
|
`;
|
|
157
|
-
const
|
|
158
|
-
o += ` ${
|
|
157
|
+
const a = st(i);
|
|
158
|
+
o += ` ${Me(s)}-rgb: ${a.r} ${a.g} ${a.b};
|
|
159
159
|
`;
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
o += `}
|
|
163
163
|
`;
|
|
164
164
|
}
|
|
165
|
-
const e =
|
|
165
|
+
const e = it();
|
|
166
166
|
e.textContent = o;
|
|
167
167
|
}
|
|
168
|
-
function
|
|
169
|
-
return t ? `--q-theme-${
|
|
168
|
+
function Me(t) {
|
|
169
|
+
return t ? `--q-theme-${je(t)}` : "";
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function Uo(t = {}) {
|
|
172
172
|
return { install: (e) => {
|
|
173
173
|
const n = t.components || {};
|
|
174
174
|
for (const s in n)
|
|
175
175
|
e.component(s, n[s]);
|
|
176
176
|
const l = t.defaults || {};
|
|
177
|
-
e.provide(
|
|
177
|
+
e.provide(Le, B(l)), dt(e, t.themes);
|
|
178
178
|
} };
|
|
179
179
|
}
|
|
180
|
-
function
|
|
180
|
+
function dt(t, o) {
|
|
181
181
|
const e = [];
|
|
182
182
|
let n;
|
|
183
183
|
if (!o)
|
|
184
184
|
n = "default", e.push({
|
|
185
185
|
name: n,
|
|
186
186
|
mode: "light",
|
|
187
|
-
scheme:
|
|
187
|
+
scheme: Qe
|
|
188
188
|
});
|
|
189
189
|
else
|
|
190
190
|
for (const l of o.themes) {
|
|
191
|
-
const
|
|
191
|
+
const i = { ...l.mode === "light" ? Qe : lt, ...l.colors };
|
|
192
192
|
e.push({
|
|
193
193
|
name: l.name,
|
|
194
194
|
mode: l.mode,
|
|
195
|
-
scheme:
|
|
195
|
+
scheme: i
|
|
196
196
|
}), l.name === o.defaultTheme && (n = l.name);
|
|
197
197
|
}
|
|
198
198
|
if (n) {
|
|
199
199
|
const l = {
|
|
200
|
-
activeTheme:
|
|
200
|
+
activeTheme: B(n),
|
|
201
201
|
themes: e
|
|
202
202
|
};
|
|
203
|
-
|
|
203
|
+
rt(e), W(l.activeTheme, ut, { immediate: !0 }), t.provide(ve, l);
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
|
-
function
|
|
206
|
+
function ut(t) {
|
|
207
207
|
const o = document.documentElement, n = Array.from(o.classList).filter((l) => !l.startsWith("q-theme"));
|
|
208
208
|
o.className = n.join(" "), o.classList.add(`q-theme--${t}`);
|
|
209
209
|
}
|
|
210
|
-
const
|
|
211
|
-
/* @__PURE__ */ J("circle", {
|
|
212
|
-
class: "path",
|
|
213
|
-
cx: "50",
|
|
214
|
-
cy: "50",
|
|
215
|
-
r: "20",
|
|
216
|
-
fill: "none",
|
|
217
|
-
stroke: "currentColor",
|
|
218
|
-
"stroke-width": "5",
|
|
219
|
-
"stroke-miterlimit": "10"
|
|
220
|
-
})
|
|
221
|
-
], -1), st = [
|
|
222
|
-
at
|
|
223
|
-
], it = /* @__PURE__ */ x({
|
|
210
|
+
const ct = /* @__PURE__ */ L({
|
|
224
211
|
__name: "QSpinnerLoader",
|
|
225
212
|
props: {
|
|
226
213
|
size: { default: 48 },
|
|
@@ -230,40 +217,40 @@ const at = /* @__PURE__ */ J("svg", { viewBox: "25 25 50 50" }, [
|
|
|
230
217
|
const o = t, e = w(() => ({
|
|
231
218
|
"font-size": o.size !== 48 ? `${o.size}px` : void 0
|
|
232
219
|
}));
|
|
233
|
-
return (n, l) => (
|
|
234
|
-
class:
|
|
235
|
-
style:
|
|
236
|
-
},
|
|
220
|
+
return (n, l) => (c(), m("div", {
|
|
221
|
+
class: D(["q-spinner-loader", o.class]),
|
|
222
|
+
style: de(e.value)
|
|
223
|
+
}, null, 6));
|
|
237
224
|
}
|
|
238
225
|
});
|
|
239
|
-
function
|
|
226
|
+
function ft(t, o) {
|
|
240
227
|
var n;
|
|
241
|
-
const e =
|
|
228
|
+
const e = je(o);
|
|
242
229
|
return e ? typeof ((n = t.props) == null ? void 0 : n[e]) < "u" : !1;
|
|
243
230
|
}
|
|
244
|
-
function
|
|
231
|
+
function V(t) {
|
|
245
232
|
const o = t.setup;
|
|
246
233
|
return o && (t.setup = (e, n) => {
|
|
247
|
-
const l =
|
|
248
|
-
if (
|
|
234
|
+
const l = ot();
|
|
235
|
+
if (Ie(l.value))
|
|
249
236
|
return o(e, n);
|
|
250
|
-
const s =
|
|
237
|
+
const s = Ue();
|
|
251
238
|
if (s === null)
|
|
252
239
|
return o(e, n);
|
|
253
|
-
const
|
|
254
|
-
get(
|
|
255
|
-
var
|
|
256
|
-
const
|
|
257
|
-
return typeof
|
|
240
|
+
const i = new Proxy(e, {
|
|
241
|
+
get(a, u) {
|
|
242
|
+
var x;
|
|
243
|
+
const v = Reflect.get(a, u), $ = (x = l.value) == null ? void 0 : x[u];
|
|
244
|
+
return typeof u == "string" && !ft(s.vnode, u) ? $ ?? v : v;
|
|
258
245
|
}
|
|
259
246
|
});
|
|
260
|
-
return o(
|
|
247
|
+
return o(i, n);
|
|
261
248
|
}), t;
|
|
262
249
|
}
|
|
263
|
-
const
|
|
250
|
+
const Se = V(ct), pt = ["disabled"], mt = {
|
|
264
251
|
key: 0,
|
|
265
252
|
class: "q-btn__spinner"
|
|
266
|
-
},
|
|
253
|
+
}, vt = { class: "q-btn__content" }, ht = /* @__PURE__ */ L({
|
|
267
254
|
__name: "QButton",
|
|
268
255
|
props: {
|
|
269
256
|
active: { type: Boolean },
|
|
@@ -281,15 +268,15 @@ const $e = S(it), dt = ["disabled"], ut = {
|
|
|
281
268
|
emits: ["click"],
|
|
282
269
|
setup(t, { emit: o }) {
|
|
283
270
|
const e = t, n = o, l = w(() => e.disabled || e.loading);
|
|
284
|
-
function s(
|
|
285
|
-
l.value || n("click",
|
|
271
|
+
function s(a) {
|
|
272
|
+
l.value || n("click", a);
|
|
286
273
|
}
|
|
287
|
-
const
|
|
288
|
-
const
|
|
274
|
+
const i = w(() => {
|
|
275
|
+
const a = e.size !== "regular" ? `q-btn--${e.size}` : void 0;
|
|
289
276
|
return [
|
|
290
277
|
"q-btn",
|
|
291
278
|
`q-btn--${e.bStyle}`,
|
|
292
|
-
|
|
279
|
+
a,
|
|
293
280
|
{
|
|
294
281
|
"q-btn--active": e.active,
|
|
295
282
|
"q-btn--borderless": e.borderless,
|
|
@@ -300,27 +287,27 @@ const $e = S(it), dt = ["disabled"], ut = {
|
|
|
300
287
|
e.class
|
|
301
288
|
];
|
|
302
289
|
});
|
|
303
|
-
return (
|
|
290
|
+
return (a, u) => (c(), m("button", {
|
|
304
291
|
type: "button",
|
|
305
|
-
class:
|
|
292
|
+
class: D(i.value),
|
|
306
293
|
disabled: l.value,
|
|
307
|
-
onClick:
|
|
294
|
+
onClick: ue(s, ["stop", "prevent"])
|
|
308
295
|
}, [
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
])) :
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
], 64)) :
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
296
|
+
a.loading ? (c(), m("div", mt, [
|
|
297
|
+
Q(b(Se), { size: 20 })
|
|
298
|
+
])) : q("", !0),
|
|
299
|
+
se("span", vt, [
|
|
300
|
+
a.iconOnRight ? (c(), m(le, { key: 0 }, [
|
|
301
|
+
me(R(e.label), 1)
|
|
302
|
+
], 64)) : q("", !0),
|
|
303
|
+
h(a.$slots, "default"),
|
|
304
|
+
a.iconOnRight ? q("", !0) : (c(), m(le, { key: 1 }, [
|
|
305
|
+
me(R(e.label), 1)
|
|
319
306
|
], 64))
|
|
320
307
|
])
|
|
321
|
-
], 10,
|
|
308
|
+
], 10, pt));
|
|
322
309
|
}
|
|
323
|
-
}),
|
|
310
|
+
}), he = V(ht), yt = /* @__PURE__ */ L({
|
|
324
311
|
__name: "QButtonGroup",
|
|
325
312
|
props: {
|
|
326
313
|
disabled: { type: Boolean },
|
|
@@ -330,15 +317,15 @@ const $e = S(it), dt = ["disabled"], ut = {
|
|
|
330
317
|
},
|
|
331
318
|
setup(t) {
|
|
332
319
|
const o = t;
|
|
333
|
-
return
|
|
320
|
+
return Ge({
|
|
334
321
|
QButton: {
|
|
335
322
|
bStyle: "secondary",
|
|
336
|
-
disabled:
|
|
337
|
-
borderless:
|
|
323
|
+
disabled: Ee(o, "disabled"),
|
|
324
|
+
borderless: Ee(o, "borderless"),
|
|
338
325
|
elevated: !1
|
|
339
326
|
}
|
|
340
|
-
}), (e, n) => (
|
|
341
|
-
class:
|
|
327
|
+
}), (e, n) => (c(), m("div", {
|
|
328
|
+
class: D([
|
|
342
329
|
"q-btn-group",
|
|
343
330
|
{
|
|
344
331
|
"q-btn-group--elevated": o.elevated
|
|
@@ -346,12 +333,12 @@ const $e = S(it), dt = ["disabled"], ut = {
|
|
|
346
333
|
o.class
|
|
347
334
|
])
|
|
348
335
|
}, [
|
|
349
|
-
|
|
336
|
+
h(e.$slots, "default")
|
|
350
337
|
], 2));
|
|
351
338
|
}
|
|
352
|
-
}),
|
|
339
|
+
}), bt = V(yt), gt = /* @__PURE__ */ L({
|
|
353
340
|
__name: "QButtonToggle",
|
|
354
|
-
props: /* @__PURE__ */
|
|
341
|
+
props: /* @__PURE__ */ X({
|
|
355
342
|
options: {},
|
|
356
343
|
disabled: { type: Boolean },
|
|
357
344
|
borderless: { type: Boolean },
|
|
@@ -364,27 +351,27 @@ const $e = S(it), dt = ["disabled"], ut = {
|
|
|
364
351
|
}),
|
|
365
352
|
emits: ["update:modelValue"],
|
|
366
353
|
setup(t) {
|
|
367
|
-
const o = t, e =
|
|
354
|
+
const o = t, e = te(t, "modelValue");
|
|
368
355
|
function n(l) {
|
|
369
356
|
e.value === l.key && !o.required ? e.value = void 0 : e.value = l.key;
|
|
370
357
|
}
|
|
371
|
-
return (l, s) => (
|
|
358
|
+
return (l, s) => (c(), E(b(bt), {
|
|
372
359
|
"b-style": "secondary",
|
|
373
|
-
class:
|
|
360
|
+
class: D(o.class),
|
|
374
361
|
disabled: o.disabled,
|
|
375
362
|
borderless: o.borderless,
|
|
376
363
|
elevated: o.elevated
|
|
377
364
|
}, {
|
|
378
365
|
default: k(() => [
|
|
379
|
-
(
|
|
380
|
-
key:
|
|
381
|
-
title:
|
|
382
|
-
label:
|
|
383
|
-
active: e.value ===
|
|
384
|
-
onClick: () => n(
|
|
366
|
+
(c(!0), m(le, null, qe(o.options, (i) => (c(), E(b(he), {
|
|
367
|
+
key: i.key,
|
|
368
|
+
title: i.title,
|
|
369
|
+
label: i.label,
|
|
370
|
+
active: e.value === i.key,
|
|
371
|
+
onClick: () => n(i)
|
|
385
372
|
}, {
|
|
386
373
|
default: k(() => [
|
|
387
|
-
|
|
374
|
+
h(l.$slots, i.key)
|
|
388
375
|
]),
|
|
389
376
|
_: 2
|
|
390
377
|
}, 1032, ["title", "label", "active", "onClick"]))), 128))
|
|
@@ -392,7 +379,7 @@ const $e = S(it), dt = ["disabled"], ut = {
|
|
|
392
379
|
_: 3
|
|
393
380
|
}, 8, ["class", "disabled", "borderless", "elevated"]));
|
|
394
381
|
}
|
|
395
|
-
}),
|
|
382
|
+
}), Po = V(gt), _t = /* @__PURE__ */ L({
|
|
396
383
|
__name: "QIcon",
|
|
397
384
|
props: {
|
|
398
385
|
icon: {},
|
|
@@ -404,22 +391,22 @@ const $e = S(it), dt = ["disabled"], ut = {
|
|
|
404
391
|
const o = t, e = w(() => {
|
|
405
392
|
switch (o.type) {
|
|
406
393
|
case "svg":
|
|
407
|
-
return
|
|
394
|
+
return Vt;
|
|
408
395
|
case "font":
|
|
409
|
-
return
|
|
396
|
+
return St;
|
|
410
397
|
case "img":
|
|
411
|
-
return
|
|
398
|
+
return Bt;
|
|
412
399
|
default:
|
|
413
400
|
return;
|
|
414
401
|
}
|
|
415
402
|
});
|
|
416
|
-
return (n, l) => (
|
|
417
|
-
class:
|
|
403
|
+
return (n, l) => (c(), E(He(e.value), {
|
|
404
|
+
class: D(o.class),
|
|
418
405
|
icon: o.icon,
|
|
419
406
|
size: o.size
|
|
420
407
|
}, null, 8, ["class", "icon", "size"]));
|
|
421
408
|
}
|
|
422
|
-
}),
|
|
409
|
+
}), kt = /* @__PURE__ */ L({
|
|
423
410
|
__name: "QIconFont",
|
|
424
411
|
props: {
|
|
425
412
|
icon: {},
|
|
@@ -432,12 +419,12 @@ const $e = S(it), dt = ["disabled"], ut = {
|
|
|
432
419
|
const o = t, e = w(() => o.variant ? `${o.library}-${o.variant}` : o.library), n = w(() => o.library && o.icon ? `${o.library}-${o.icon}` : o.icon), l = w(() => ({
|
|
433
420
|
"font-size": o.size !== void 0 ? `${o.size}px` : void 0
|
|
434
421
|
}));
|
|
435
|
-
return (s,
|
|
436
|
-
class:
|
|
437
|
-
style:
|
|
422
|
+
return (s, i) => (c(), m("i", {
|
|
423
|
+
class: D(["q-icon", "q-icon__font", e.value, n.value, o.class]),
|
|
424
|
+
style: de(l.value)
|
|
438
425
|
}, null, 6));
|
|
439
426
|
}
|
|
440
|
-
}),
|
|
427
|
+
}), wt = ["src"], $t = /* @__PURE__ */ L({
|
|
441
428
|
__name: "QIconImg",
|
|
442
429
|
props: {
|
|
443
430
|
icon: {},
|
|
@@ -448,13 +435,13 @@ const $e = S(it), dt = ["disabled"], ut = {
|
|
|
448
435
|
const o = t, e = w(() => ({
|
|
449
436
|
"font-size": o.size !== void 0 ? `${o.size}px` : void 0
|
|
450
437
|
}));
|
|
451
|
-
return (n, l) => (
|
|
438
|
+
return (n, l) => (c(), m("img", {
|
|
452
439
|
src: o.icon,
|
|
453
|
-
class:
|
|
454
|
-
style:
|
|
455
|
-
}, null, 14,
|
|
440
|
+
class: D(["q-icon", "q-icon__img", o.class]),
|
|
441
|
+
style: de(e.value)
|
|
442
|
+
}, null, 14, wt));
|
|
456
443
|
}
|
|
457
|
-
}),
|
|
444
|
+
}), pe = {}, qt = L({
|
|
458
445
|
name: "InlineSvg",
|
|
459
446
|
emits: {
|
|
460
447
|
loaded: (t) => typeof t == "object",
|
|
@@ -467,9 +454,9 @@ const $e = S(it), dt = ["disabled"], ut = {
|
|
|
467
454
|
return null;
|
|
468
455
|
const t = this.getSvgContent(this.svgElSource);
|
|
469
456
|
if (!t)
|
|
470
|
-
return
|
|
457
|
+
return De("div", this.$attrs);
|
|
471
458
|
const o = {};
|
|
472
|
-
return this.copySvgAttrs(o, this.svgElSource), this.copySvgAttrs(o, t), this.copyComponentAttrs(o, this.$attrs), o.innerHTML = t.innerHTML,
|
|
459
|
+
return this.copySvgAttrs(o, this.svgElSource), this.copySvgAttrs(o, t), this.copyComponentAttrs(o, this.$attrs), o.innerHTML = t.innerHTML, De("svg", o);
|
|
473
460
|
},
|
|
474
461
|
props: {
|
|
475
462
|
/**
|
|
@@ -531,7 +518,7 @@ const $e = S(it), dt = ["disabled"], ut = {
|
|
|
531
518
|
n !== !1 && n !== null && n !== void 0 && (t[e] = n);
|
|
532
519
|
},
|
|
533
520
|
getSvgContent(t) {
|
|
534
|
-
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)),
|
|
521
|
+
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)), It(t, this.title)), t);
|
|
535
522
|
},
|
|
536
523
|
/**
|
|
537
524
|
* Get svgElSource
|
|
@@ -539,11 +526,11 @@ const $e = S(it), dt = ["disabled"], ut = {
|
|
|
539
526
|
*/
|
|
540
527
|
async getSource(t) {
|
|
541
528
|
try {
|
|
542
|
-
|
|
543
|
-
const o = await
|
|
529
|
+
pe[t] || (pe[t] = xt(this.download(t))), this.svgElSource && pe[t].getIsPending() && !this.keepDuringLoading && (this.svgElSource = null, this.$emit("unloaded"));
|
|
530
|
+
const o = await pe[t];
|
|
544
531
|
this.svgElSource = o, await this.$nextTick(), this.$emit("loaded", this.$el);
|
|
545
532
|
} catch (o) {
|
|
546
|
-
this.svgElSource && (this.svgElSource = null, this.$emit("unloaded")), delete
|
|
533
|
+
this.svgElSource && (this.svgElSource = null, this.$emit("unloaded")), delete pe[t], this.$emit("error", o);
|
|
547
534
|
}
|
|
548
535
|
},
|
|
549
536
|
/**
|
|
@@ -568,7 +555,7 @@ const $e = S(it), dt = ["disabled"], ut = {
|
|
|
568
555
|
},
|
|
569
556
|
expose: []
|
|
570
557
|
});
|
|
571
|
-
function
|
|
558
|
+
function It(t, o) {
|
|
572
559
|
const e = t.getElementsByTagName("title");
|
|
573
560
|
if (e.length)
|
|
574
561
|
e[0].textContent = o;
|
|
@@ -577,7 +564,7 @@ function kt(t, o) {
|
|
|
577
564
|
n.textContent = o, t.insertBefore(n, t.firstChild);
|
|
578
565
|
}
|
|
579
566
|
}
|
|
580
|
-
function
|
|
567
|
+
function xt(t) {
|
|
581
568
|
if (t.getIsPending)
|
|
582
569
|
return t;
|
|
583
570
|
let o = !0;
|
|
@@ -589,7 +576,7 @@ function wt(t) {
|
|
|
589
576
|
);
|
|
590
577
|
return e.getIsPending = () => o, e;
|
|
591
578
|
}
|
|
592
|
-
const
|
|
579
|
+
const Lt = /* @__PURE__ */ L({
|
|
593
580
|
__name: "QIconSvg",
|
|
594
581
|
props: {
|
|
595
582
|
icon: {},
|
|
@@ -602,24 +589,24 @@ const $t = /* @__PURE__ */ x({
|
|
|
602
589
|
const e = t, n = o, l = w(() => ({
|
|
603
590
|
"font-size": e.size !== void 0 ? `${e.size}px` : void 0
|
|
604
591
|
}));
|
|
605
|
-
function s(
|
|
606
|
-
n("loaded",
|
|
592
|
+
function s(a) {
|
|
593
|
+
n("loaded", a);
|
|
607
594
|
}
|
|
608
|
-
function
|
|
595
|
+
function i() {
|
|
609
596
|
n("unloaded");
|
|
610
597
|
}
|
|
611
|
-
return (
|
|
612
|
-
class:
|
|
598
|
+
return (a, u) => (c(), E(b(qt), {
|
|
599
|
+
class: D(["q-icon", "q-icon__svg", e.class]),
|
|
613
600
|
src: e.bundle,
|
|
614
601
|
symbol: e.icon,
|
|
615
|
-
style:
|
|
602
|
+
style: de(l.value),
|
|
616
603
|
onLoaded: s,
|
|
617
|
-
onUnloaded:
|
|
604
|
+
onUnloaded: i
|
|
618
605
|
}, null, 8, ["class", "src", "symbol", "style"]));
|
|
619
606
|
}
|
|
620
|
-
}),
|
|
607
|
+
}), ne = V(_t), St = V(kt), Bt = V($t), Vt = V(Lt), Ct = /* @__PURE__ */ L({
|
|
621
608
|
__name: "QList",
|
|
622
|
-
props: /* @__PURE__ */
|
|
609
|
+
props: /* @__PURE__ */ X({
|
|
623
610
|
highlighted: { type: [String, Number, Boolean, Symbol], default: void 0 },
|
|
624
611
|
items: {},
|
|
625
612
|
groups: { default: () => [] },
|
|
@@ -635,161 +622,161 @@ const $t = /* @__PURE__ */ x({
|
|
|
635
622
|
}),
|
|
636
623
|
emits: ["update:modelValue"],
|
|
637
624
|
setup(t, { expose: o }) {
|
|
638
|
-
const e = t, n =
|
|
639
|
-
(
|
|
640
|
-
) : [{ id: "", title: "" }]),
|
|
641
|
-
function f
|
|
642
|
-
n.value =
|
|
625
|
+
const e = t, n = te(t, "modelValue"), l = B(!1), s = w(() => i.value.length > 1 ? "div" : "ul"), i = w(() => e.groups.length ? e.groups.filter(
|
|
626
|
+
(f) => e.items.some((g) => g.group === f.id)
|
|
627
|
+
) : [{ id: "", title: "" }]), a = B(null);
|
|
628
|
+
function u(f) {
|
|
629
|
+
n.value = f;
|
|
643
630
|
}
|
|
644
|
-
function
|
|
631
|
+
function v() {
|
|
645
632
|
l.value = !0;
|
|
646
633
|
}
|
|
647
|
-
function
|
|
634
|
+
function $() {
|
|
648
635
|
l.value = !1;
|
|
649
636
|
}
|
|
650
|
-
function
|
|
651
|
-
var
|
|
652
|
-
if ((
|
|
637
|
+
function x(f) {
|
|
638
|
+
var p;
|
|
639
|
+
if ((p = a.value) != null && p.contains(f.relatedTarget))
|
|
653
640
|
return;
|
|
654
|
-
let
|
|
655
|
-
n.value ?
|
|
656
|
-
const
|
|
657
|
-
|
|
641
|
+
let g;
|
|
642
|
+
n.value ? g = e.items.findIndex((F) => F[e.itemValue] === n.value) : g = H();
|
|
643
|
+
const d = l.value;
|
|
644
|
+
I(g, d);
|
|
658
645
|
}
|
|
659
|
-
function
|
|
660
|
-
switch (["ArrowDown", "ArrowUp", "Home", "End"].includes(
|
|
646
|
+
function z(f) {
|
|
647
|
+
switch (["ArrowDown", "ArrowUp", "Home", "End"].includes(f.key) && f.preventDefault(), f.key) {
|
|
661
648
|
case "ArrowDown":
|
|
662
|
-
|
|
649
|
+
C("next");
|
|
663
650
|
break;
|
|
664
651
|
case "ArrowUp":
|
|
665
|
-
|
|
652
|
+
C("prev");
|
|
666
653
|
break;
|
|
667
654
|
case "Home":
|
|
668
|
-
|
|
655
|
+
C("first");
|
|
669
656
|
break;
|
|
670
657
|
case "End":
|
|
671
|
-
|
|
658
|
+
C("last");
|
|
672
659
|
break;
|
|
673
660
|
}
|
|
674
661
|
}
|
|
675
|
-
function
|
|
676
|
-
switch (
|
|
662
|
+
function C(f) {
|
|
663
|
+
switch (f) {
|
|
677
664
|
case "next":
|
|
678
665
|
case "prev":
|
|
679
|
-
|
|
666
|
+
I(U(f));
|
|
680
667
|
break;
|
|
681
668
|
case "first":
|
|
682
|
-
|
|
669
|
+
I(H());
|
|
683
670
|
break;
|
|
684
671
|
case "last":
|
|
685
|
-
|
|
672
|
+
I(M());
|
|
686
673
|
break;
|
|
687
674
|
}
|
|
688
675
|
}
|
|
689
|
-
function
|
|
690
|
-
var
|
|
691
|
-
(
|
|
676
|
+
function I(f, g = !1) {
|
|
677
|
+
var p;
|
|
678
|
+
(p = S()[f]) == null || p.focus({ preventScroll: g });
|
|
692
679
|
}
|
|
693
|
-
function
|
|
694
|
-
var
|
|
695
|
-
const
|
|
696
|
-
return
|
|
680
|
+
function S() {
|
|
681
|
+
var g;
|
|
682
|
+
const f = (g = a.value) == null ? void 0 : g.querySelectorAll("li");
|
|
683
|
+
return f ? Array.from(f) : [];
|
|
697
684
|
}
|
|
698
|
-
function
|
|
699
|
-
return
|
|
685
|
+
function K(f) {
|
|
686
|
+
return S()[f];
|
|
700
687
|
}
|
|
701
|
-
function
|
|
702
|
-
return
|
|
688
|
+
function Y() {
|
|
689
|
+
return S().indexOf(document.activeElement);
|
|
703
690
|
}
|
|
704
|
-
function
|
|
705
|
-
const
|
|
706
|
-
return
|
|
691
|
+
function H() {
|
|
692
|
+
const f = S(), g = f.find((d) => A(d));
|
|
693
|
+
return g ? f.indexOf(g) : -1;
|
|
707
694
|
}
|
|
708
|
-
function
|
|
709
|
-
const
|
|
710
|
-
return
|
|
711
|
-
}
|
|
712
|
-
function
|
|
713
|
-
return
|
|
714
|
-
}
|
|
715
|
-
function
|
|
716
|
-
const
|
|
717
|
-
return
|
|
718
|
-
}
|
|
719
|
-
function
|
|
720
|
-
const
|
|
721
|
-
if (
|
|
722
|
-
return
|
|
723
|
-
let
|
|
724
|
-
for (; !
|
|
725
|
-
if (
|
|
726
|
-
return
|
|
727
|
-
|
|
695
|
+
function M() {
|
|
696
|
+
const f = S(), g = [...f].reverse().find((d) => A(d));
|
|
697
|
+
return g ? f.indexOf(g) : -1;
|
|
698
|
+
}
|
|
699
|
+
function Z(f, g, d) {
|
|
700
|
+
return g === "prev" && f === 0 || g === "next" && f === d.length - 1;
|
|
701
|
+
}
|
|
702
|
+
function U(f) {
|
|
703
|
+
const g = Y();
|
|
704
|
+
return J(g, f);
|
|
705
|
+
}
|
|
706
|
+
function J(f, g) {
|
|
707
|
+
const d = S();
|
|
708
|
+
if (Z(f, g, d))
|
|
709
|
+
return f;
|
|
710
|
+
let p = f + (g === "next" ? 1 : -1);
|
|
711
|
+
for (; !A(d[p]); ) {
|
|
712
|
+
if (Z(p, g, d))
|
|
713
|
+
return f;
|
|
714
|
+
p += g === "next" ? 1 : -1;
|
|
728
715
|
}
|
|
729
|
-
return
|
|
716
|
+
return p;
|
|
730
717
|
}
|
|
731
|
-
function
|
|
732
|
-
return
|
|
718
|
+
function A(f) {
|
|
719
|
+
return f.tabIndex === -2;
|
|
733
720
|
}
|
|
734
|
-
function
|
|
735
|
-
return
|
|
721
|
+
function G(f) {
|
|
722
|
+
return f ? e.items.filter((g) => g.group === f) : e.items;
|
|
736
723
|
}
|
|
737
724
|
return o({
|
|
738
|
-
focusItem:
|
|
739
|
-
getItem:
|
|
740
|
-
getAdjacentItemIndex:
|
|
741
|
-
getFirstFocusableItemIndex:
|
|
742
|
-
getLastFocusableItemIndex:
|
|
743
|
-
}), (
|
|
725
|
+
focusItem: I,
|
|
726
|
+
getItem: K,
|
|
727
|
+
getAdjacentItemIndex: J,
|
|
728
|
+
getFirstFocusableItemIndex: H,
|
|
729
|
+
getLastFocusableItemIndex: M
|
|
730
|
+
}), (f, g) => (c(), E(He(s.value), {
|
|
744
731
|
ref_key: "listRef",
|
|
745
|
-
ref:
|
|
746
|
-
class:
|
|
732
|
+
ref: a,
|
|
733
|
+
class: D(["q-list", { "q-list--disabled": e.disabled }, e.class]),
|
|
747
734
|
role: "listbox",
|
|
748
735
|
tabindex: e.disabled ? -1 : 0,
|
|
749
|
-
onFocus:
|
|
750
|
-
onMousedown:
|
|
751
|
-
onMouseup:
|
|
752
|
-
onKeydown:
|
|
736
|
+
onFocus: x,
|
|
737
|
+
onMousedown: v,
|
|
738
|
+
onMouseup: $,
|
|
739
|
+
onKeydown: z
|
|
753
740
|
}, {
|
|
754
741
|
default: k(() => [
|
|
755
|
-
(
|
|
756
|
-
key:
|
|
757
|
-
|
|
758
|
-
|
|
742
|
+
(c(!0), m(le, null, qe(i.value, (d) => (c(), E(b(Ut), {
|
|
743
|
+
key: d.id,
|
|
744
|
+
id: d.id,
|
|
745
|
+
title: i.value.length === 1 ? void 0 : d.title
|
|
759
746
|
}, {
|
|
760
747
|
default: k(() => [
|
|
761
|
-
(
|
|
762
|
-
key:
|
|
763
|
-
value:
|
|
764
|
-
label:
|
|
765
|
-
icon:
|
|
766
|
-
disabled: e.disabled || d.disabled,
|
|
767
|
-
highlighted: e.highlighted ===
|
|
768
|
-
selected: n.value ===
|
|
769
|
-
onSelect:
|
|
748
|
+
(c(!0), m(le, null, qe(G(d.id), (p) => (c(), E(b(Ot), {
|
|
749
|
+
key: p[e.itemValue],
|
|
750
|
+
value: p[e.itemValue],
|
|
751
|
+
label: p[e.itemLabel],
|
|
752
|
+
icon: p.icon,
|
|
753
|
+
disabled: e.disabled || d.disabled || p.disabled,
|
|
754
|
+
highlighted: e.highlighted === p[e.itemValue],
|
|
755
|
+
selected: n.value === p[e.itemValue],
|
|
756
|
+
onSelect: u
|
|
770
757
|
}, {
|
|
771
758
|
default: k(() => [
|
|
772
|
-
|
|
759
|
+
h(f.$slots, "item", { item: p })
|
|
773
760
|
]),
|
|
774
761
|
_: 2
|
|
775
762
|
}, 1032, ["value", "label", "icon", "disabled", "highlighted", "selected"]))), 128))
|
|
776
763
|
]),
|
|
777
764
|
_: 2
|
|
778
|
-
}, 1032, ["
|
|
765
|
+
}, 1032, ["id", "title"]))), 128))
|
|
779
766
|
]),
|
|
780
767
|
_: 3
|
|
781
768
|
}, 40, ["class", "tabindex"]));
|
|
782
769
|
}
|
|
783
770
|
});
|
|
784
|
-
let
|
|
785
|
-
function
|
|
786
|
-
return t || `uid-${++
|
|
771
|
+
let Tt = 0;
|
|
772
|
+
function ye(t) {
|
|
773
|
+
return t || `uid-${++Tt}`;
|
|
787
774
|
}
|
|
788
|
-
const
|
|
775
|
+
const Et = ["id", "data-key", "tabindex", "aria-label", "aria-selected"], Dt = { class: "q-list-item__check-container" }, At = {
|
|
789
776
|
check: {
|
|
790
777
|
icon: "check"
|
|
791
778
|
}
|
|
792
|
-
},
|
|
779
|
+
}, zt = /* @__PURE__ */ L({
|
|
793
780
|
__name: "QListItem",
|
|
794
781
|
props: {
|
|
795
782
|
value: { type: [String, Number, Boolean, Symbol] },
|
|
@@ -797,24 +784,24 @@ const St = ["id", "data-key", "tabindex", "aria-label", "aria-selected"], Vt = {
|
|
|
797
784
|
icon: { default: void 0 },
|
|
798
785
|
selected: { type: Boolean },
|
|
799
786
|
highlighted: { type: Boolean },
|
|
800
|
-
icons: { default: () =>
|
|
787
|
+
icons: { default: () => At },
|
|
801
788
|
disabled: { type: Boolean }
|
|
802
789
|
},
|
|
803
790
|
emits: ["select"],
|
|
804
791
|
setup(t, { emit: o }) {
|
|
805
|
-
const e = t, n = o, l =
|
|
792
|
+
const e = t, n = o, l = ye();
|
|
806
793
|
function s() {
|
|
807
794
|
e.disabled || n("select", e.value);
|
|
808
795
|
}
|
|
809
|
-
function
|
|
810
|
-
|
|
796
|
+
function i(a) {
|
|
797
|
+
a.key === "Tab" && s(), (a.key === "Enter" || a.key === " ") && (a.preventDefault(), a.stopPropagation(), s());
|
|
811
798
|
}
|
|
812
|
-
return (
|
|
813
|
-
id:
|
|
799
|
+
return (a, u) => (c(), m("li", {
|
|
800
|
+
id: b(l),
|
|
814
801
|
"data-key": e.value,
|
|
815
802
|
role: "option",
|
|
816
803
|
tabindex: e.disabled ? void 0 : -2,
|
|
817
|
-
class:
|
|
804
|
+
class: D([
|
|
818
805
|
"q-list-item",
|
|
819
806
|
{
|
|
820
807
|
"q-list-item--disabled": e.disabled,
|
|
@@ -824,123 +811,189 @@ const St = ["id", "data-key", "tabindex", "aria-label", "aria-selected"], Vt = {
|
|
|
824
811
|
]),
|
|
825
812
|
"aria-label": e.label,
|
|
826
813
|
"aria-selected": e.disabled ? void 0 : e.selected,
|
|
827
|
-
onKeydown:
|
|
828
|
-
onClick:
|
|
814
|
+
onKeydown: i,
|
|
815
|
+
onClick: ue(s, ["stop", "prevent"])
|
|
829
816
|
}, [
|
|
830
|
-
|
|
831
|
-
e.icon ? (
|
|
832
|
-
|
|
817
|
+
h(a.$slots, "default", {}, () => [
|
|
818
|
+
e.icon ? (c(), E(b(ne), ae(ce({ key: 0 }, e.icon)), null, 16)) : q("", !0),
|
|
819
|
+
me(" " + R(e.label), 1)
|
|
833
820
|
]),
|
|
834
|
-
|
|
835
|
-
e.selected ? (
|
|
821
|
+
se("div", Dt, [
|
|
822
|
+
e.selected ? (c(), E(b(ne), ce({ key: 0 }, e.icons.check, { class: "q-list-item__check" }), null, 16)) : q("", !0)
|
|
836
823
|
])
|
|
837
|
-
], 42,
|
|
824
|
+
], 42, Et));
|
|
838
825
|
}
|
|
839
|
-
}),
|
|
826
|
+
}), Qt = ["data-key", "aria-labelledby"], Mt = ["id"], Ft = /* @__PURE__ */ L({
|
|
840
827
|
__name: "QListItemGroup",
|
|
841
828
|
props: {
|
|
842
|
-
|
|
843
|
-
|
|
829
|
+
id: {},
|
|
830
|
+
title: { default: "" }
|
|
844
831
|
},
|
|
845
832
|
setup(t) {
|
|
846
|
-
const o = t, e =
|
|
847
|
-
return (n, l) => (
|
|
833
|
+
const o = t, e = ye();
|
|
834
|
+
return (n, l) => (c(), m("ul", {
|
|
848
835
|
class: "q-list-item-group",
|
|
849
836
|
role: "group",
|
|
850
|
-
"
|
|
837
|
+
"data-key": o.id,
|
|
838
|
+
"aria-labelledby": o.title ? b(e) : void 0
|
|
851
839
|
}, [
|
|
852
|
-
o.title ? (
|
|
840
|
+
o.title ? (c(), m("li", {
|
|
853
841
|
key: 0,
|
|
854
|
-
id:
|
|
842
|
+
id: b(e),
|
|
855
843
|
class: "q-list-item-group__title",
|
|
856
844
|
role: "presentation"
|
|
857
|
-
},
|
|
858
|
-
|
|
859
|
-
], 8,
|
|
845
|
+
}, R(o.title), 9, Mt)) : q("", !0),
|
|
846
|
+
h(n.$slots, "default")
|
|
847
|
+
], 8, Qt));
|
|
848
|
+
}
|
|
849
|
+
}), Re = V(Ct), Ot = V(zt), Ut = V(Ft), _e = 8;
|
|
850
|
+
function Pt(t, o, e, n) {
|
|
851
|
+
const l = (n == null ? void 0 : n.offset) ?? 0, s = (n == null ? void 0 : n.placement) ?? "bottom", i = t.getBoundingClientRect(), a = o.getBoundingClientRect(), u = e == null ? void 0 : e.getBoundingClientRect(), v = Nt(i, a, s, l), $ = Wt(i, a, v), x = Kt($, v, l), z = Ht(x, a, v);
|
|
852
|
+
let C;
|
|
853
|
+
if (n != null && n.arrow) {
|
|
854
|
+
if (!u)
|
|
855
|
+
throw new Error("[Quidgest UI] The arrow element must exist to compute its position");
|
|
856
|
+
C = Gt(z, i, a, u, v);
|
|
860
857
|
}
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
858
|
+
return { overlayCoords: z, arrowCoords: C, placement: v };
|
|
859
|
+
}
|
|
860
|
+
function Nt(t, o, e, n) {
|
|
861
|
+
const l = Fe(t, o, e, n);
|
|
862
|
+
if (Oe(l)) {
|
|
863
|
+
const s = be(e), a = {
|
|
864
|
+
top: "bottom",
|
|
865
|
+
bottom: "top",
|
|
866
|
+
left: "right",
|
|
867
|
+
right: "left"
|
|
868
|
+
}[s], u = Fe(
|
|
869
|
+
t,
|
|
870
|
+
o,
|
|
871
|
+
a,
|
|
872
|
+
n
|
|
873
|
+
);
|
|
874
|
+
if (Oe(u))
|
|
875
|
+
return e;
|
|
876
|
+
const v = Xt(e);
|
|
877
|
+
return v ? `${a}-${v}` : a;
|
|
878
|
+
}
|
|
879
|
+
return e;
|
|
880
|
+
}
|
|
881
|
+
function Ht(t, o, e) {
|
|
882
|
+
const n = ke(e), l = (i, a, u) => Math.min(Math.max(i, a), u), s = { ...t };
|
|
883
|
+
return n === "x" ? s.x = l(t.x, _e, window.innerWidth - o.width - _e) : s.y = l(t.y, _e, window.innerHeight - o.height - _e), s;
|
|
884
|
+
}
|
|
885
|
+
function Kt(t, o, e) {
|
|
886
|
+
const n = be(o);
|
|
887
|
+
return {
|
|
888
|
+
x: t.x + (n === "left" ? -e : n === "right" ? e : 0),
|
|
889
|
+
y: t.y + (n === "top" ? -e : n === "bottom" ? e : 0)
|
|
890
|
+
};
|
|
891
|
+
}
|
|
892
|
+
function Gt(t, o, e, n, l) {
|
|
893
|
+
if (ke(l) === "y") {
|
|
894
|
+
const i = o.top + o.height / 2, a = t.y + e.height / 2, u = a - i, v = e.height / 2 - u - n.height / 2 + 2;
|
|
895
|
+
if (v > 0 && v < e.height - n.height)
|
|
896
|
+
return {
|
|
897
|
+
y: v
|
|
898
|
+
};
|
|
899
|
+
} else {
|
|
900
|
+
const i = o.left + o.width / 2, a = t.x + e.width / 2, u = a - i, v = e.width / 2 - u - n.width / 2 + 2;
|
|
901
|
+
if (v > 0 && v < e.width - n.width)
|
|
902
|
+
return {
|
|
903
|
+
x: v
|
|
904
|
+
};
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
function Wt(t, o, e) {
|
|
908
|
+
const [n, l] = e.split("-"), s = t.x + t.width / 2 - o.width / 2, i = t.y + t.height / 2 - o.height / 2;
|
|
909
|
+
let a;
|
|
910
|
+
switch (n) {
|
|
868
911
|
case "top":
|
|
869
|
-
|
|
912
|
+
a = { x: s, y: t.y - o.height };
|
|
870
913
|
break;
|
|
871
914
|
case "bottom":
|
|
872
|
-
|
|
915
|
+
a = { x: s, y: t.y + t.height };
|
|
873
916
|
break;
|
|
874
917
|
case "left":
|
|
875
|
-
|
|
918
|
+
a = { x: t.x - o.width, y: i };
|
|
876
919
|
break;
|
|
877
920
|
case "right":
|
|
878
|
-
|
|
921
|
+
a = { x: t.x + t.width, y: i };
|
|
922
|
+
break;
|
|
923
|
+
default:
|
|
924
|
+
throw new Error(`[Quidgest UI] Invalid placement value: ${e}`);
|
|
925
|
+
}
|
|
926
|
+
if (!l)
|
|
927
|
+
return a;
|
|
928
|
+
const v = ke(e) === "y" ? "height" : "width", $ = ke(e), x = t[v] / 2 - o[v] / 2;
|
|
929
|
+
switch (l) {
|
|
930
|
+
case "start":
|
|
931
|
+
a[$] -= x;
|
|
932
|
+
break;
|
|
933
|
+
case "end":
|
|
934
|
+
a[$] += x;
|
|
879
935
|
break;
|
|
936
|
+
default:
|
|
937
|
+
throw new Error(`[Quidgest UI] Invalid alignment value: ${l}`);
|
|
880
938
|
}
|
|
881
|
-
return
|
|
939
|
+
return a;
|
|
882
940
|
}
|
|
883
|
-
function
|
|
884
|
-
|
|
885
|
-
|
|
941
|
+
function Fe(t, o, e, n) {
|
|
942
|
+
const l = be(e);
|
|
943
|
+
let s = 0;
|
|
944
|
+
switch (l) {
|
|
886
945
|
case "top":
|
|
887
|
-
|
|
946
|
+
s = t.top - (o.height + n);
|
|
888
947
|
break;
|
|
889
948
|
case "bottom":
|
|
890
|
-
|
|
949
|
+
s = window.innerHeight - t.bottom - (o.height + n);
|
|
891
950
|
break;
|
|
892
951
|
case "left":
|
|
893
|
-
|
|
952
|
+
s = t.left - (o.width + n);
|
|
894
953
|
break;
|
|
895
954
|
case "right":
|
|
896
|
-
|
|
955
|
+
s = window.innerWidth - t.right - (o.width + n);
|
|
897
956
|
break;
|
|
957
|
+
default:
|
|
958
|
+
throw new Error(`[Quidgest UI] Invalid side value: ${l}`);
|
|
898
959
|
}
|
|
899
|
-
return
|
|
960
|
+
return s;
|
|
900
961
|
}
|
|
901
|
-
function
|
|
902
|
-
return
|
|
903
|
-
window.innerHeight - t.top - t.height / 2 - o.height / 2,
|
|
904
|
-
t.top + t.height / 2 - o.height / 2
|
|
905
|
-
);
|
|
962
|
+
function jt(t) {
|
|
963
|
+
return t === "x" ? "y" : "x";
|
|
906
964
|
}
|
|
907
|
-
function
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
t.left + t.width / 2 - o.width / 2
|
|
911
|
-
);
|
|
965
|
+
function Rt(t) {
|
|
966
|
+
const o = be(t);
|
|
967
|
+
return ["left", "right"].includes(o) ? "x" : "y";
|
|
912
968
|
}
|
|
913
|
-
function
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
return
|
|
969
|
+
function ke(t) {
|
|
970
|
+
return jt(Rt(t));
|
|
971
|
+
}
|
|
972
|
+
function be(t) {
|
|
973
|
+
const [o] = t.split("-");
|
|
974
|
+
return o;
|
|
975
|
+
}
|
|
976
|
+
function Xt(t) {
|
|
977
|
+
const [, o] = t.split("-");
|
|
978
|
+
return o;
|
|
979
|
+
}
|
|
980
|
+
function Oe(t) {
|
|
981
|
+
return t < 0;
|
|
926
982
|
}
|
|
927
|
-
function
|
|
983
|
+
function Yt(t) {
|
|
928
984
|
return typeof t == "string" ? document.querySelector(t) : t;
|
|
929
985
|
}
|
|
930
|
-
const
|
|
931
|
-
key: 0,
|
|
932
|
-
role: "presentation",
|
|
933
|
-
class: "q-overlay__arrow"
|
|
934
|
-
}, Nt = /* @__PURE__ */ x({
|
|
986
|
+
const Zt = ["role"], Jt = /* @__PURE__ */ L({
|
|
935
987
|
inheritAttrs: !1,
|
|
936
988
|
__name: "QOverlay",
|
|
937
|
-
props: /* @__PURE__ */
|
|
989
|
+
props: /* @__PURE__ */ X({
|
|
938
990
|
anchor: { default: void 0 },
|
|
939
991
|
appearance: { default: "regular" },
|
|
940
992
|
arrow: { type: Boolean },
|
|
941
993
|
attach: { default: "body" },
|
|
942
994
|
backdropBlur: { type: Boolean },
|
|
943
995
|
delay: { default: 500 },
|
|
996
|
+
nonModal: { type: Boolean },
|
|
944
997
|
scrollLock: { type: Boolean },
|
|
945
998
|
offset: { default: 8 },
|
|
946
999
|
persistent: { type: Boolean },
|
|
@@ -954,212 +1007,218 @@ const Rt = ["role"], Ut = {
|
|
|
954
1007
|
modelValue: { type: Boolean },
|
|
955
1008
|
modelModifiers: {}
|
|
956
1009
|
}),
|
|
957
|
-
emits: /* @__PURE__ */
|
|
1010
|
+
emits: /* @__PURE__ */ X(["enter", "leave"], ["update:modelValue"]),
|
|
958
1011
|
setup(t, { emit: o }) {
|
|
959
|
-
const e = t, n = o, l =
|
|
1012
|
+
const e = t, n = o, l = te(t, "modelValue"), s = w(() => [
|
|
960
1013
|
"q-overlay",
|
|
961
|
-
`q-overlay--${
|
|
1014
|
+
`q-overlay--${be(a.placement)}`,
|
|
962
1015
|
{
|
|
963
1016
|
"q-overlay--independent": e.anchor === void 0,
|
|
964
1017
|
"q-overlay--inverted": e.appearance === "inverted"
|
|
965
1018
|
},
|
|
966
1019
|
e.class
|
|
967
|
-
]),
|
|
968
|
-
() => (l.value || i.animating) && (e.anchor === void 0 || e.trigger === "click")
|
|
969
|
-
), i = Ne({
|
|
1020
|
+
]), i = w(() => (l.value || a.animating) && !e.nonModal), a = Ae({
|
|
970
1021
|
animating: !1,
|
|
971
1022
|
top: 0,
|
|
972
1023
|
left: 0,
|
|
973
1024
|
width: 0,
|
|
974
1025
|
placement: e.placement
|
|
975
|
-
})
|
|
976
|
-
|
|
977
|
-
|
|
1026
|
+
}), u = Ae({
|
|
1027
|
+
top: void 0,
|
|
1028
|
+
left: void 0,
|
|
1029
|
+
hidden: !0
|
|
1030
|
+
}), v = w(() => a.top !== 0 && a.left !== 0);
|
|
1031
|
+
W(l, () => a.animating = !0);
|
|
1032
|
+
const $ = w(() => {
|
|
978
1033
|
if (e.anchor === void 0)
|
|
979
1034
|
return;
|
|
980
|
-
const
|
|
1035
|
+
const y = A(), ie = e.width === "anchor", N = ie ? y == null ? void 0 : y.getBoundingClientRect().width : void 0;
|
|
981
1036
|
return {
|
|
982
|
-
top: `${
|
|
983
|
-
left: `${
|
|
984
|
-
width:
|
|
1037
|
+
top: `${a.top}px`,
|
|
1038
|
+
left: `${a.left}px`,
|
|
1039
|
+
width: N !== void 0 ? `${N}px` : void 0
|
|
985
1040
|
};
|
|
986
|
-
}),
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
1041
|
+
}), x = w(() => {
|
|
1042
|
+
if (e.arrow)
|
|
1043
|
+
return {
|
|
1044
|
+
top: u.top !== void 0 ? `${u.top}px` : void 0,
|
|
1045
|
+
left: u.left !== void 0 ? `${u.left}px` : void 0,
|
|
1046
|
+
opacity: u.hidden ? 0 : 1
|
|
1047
|
+
};
|
|
1048
|
+
}), z = B(null), C = B(null);
|
|
1049
|
+
function I() {
|
|
1050
|
+
const y = A();
|
|
1051
|
+
if (!y || !C.value)
|
|
990
1052
|
return;
|
|
991
|
-
const
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
case "right":
|
|
1004
|
-
R = e.offset || 0;
|
|
1005
|
-
break;
|
|
1006
|
-
}
|
|
1007
|
-
i.left = M.x + R, i.top = M.y + oe, i.width = M.width, i.placement = M.placement;
|
|
1053
|
+
const ie = {
|
|
1054
|
+
placement: e.placement,
|
|
1055
|
+
width: e.width,
|
|
1056
|
+
offset: e.offset,
|
|
1057
|
+
arrow: e.arrow
|
|
1058
|
+
}, N = Pt(
|
|
1059
|
+
y,
|
|
1060
|
+
C.value,
|
|
1061
|
+
(z == null ? void 0 : z.value) ?? void 0,
|
|
1062
|
+
ie
|
|
1063
|
+
);
|
|
1064
|
+
a.left = N.overlayCoords.x, a.top = N.overlayCoords.y, a.placement = N.placement, u.hidden = N.arrowCoords === void 0, N.arrowCoords && (u.top = N.arrowCoords.y, u.left = N.arrowCoords.x);
|
|
1008
1065
|
}
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1066
|
+
W(
|
|
1067
|
+
() => e.placement,
|
|
1068
|
+
() => j(I)
|
|
1069
|
+
);
|
|
1070
|
+
let S;
|
|
1071
|
+
function K() {
|
|
1072
|
+
H(0);
|
|
1013
1073
|
}
|
|
1014
|
-
function
|
|
1015
|
-
|
|
1074
|
+
function Y() {
|
|
1075
|
+
H(e.delay);
|
|
1016
1076
|
}
|
|
1017
|
-
function
|
|
1018
|
-
|
|
1077
|
+
function H(y) {
|
|
1078
|
+
S || (S = window.setTimeout(() => {
|
|
1019
1079
|
l.value = !0;
|
|
1020
|
-
},
|
|
1080
|
+
}, y));
|
|
1021
1081
|
}
|
|
1022
|
-
function
|
|
1023
|
-
clearTimeout(
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
}
|
|
1028
|
-
});
|
|
1082
|
+
function M() {
|
|
1083
|
+
if (clearTimeout(S), S = void 0, l.value = !1, e.anchor && e.trigger === "click") {
|
|
1084
|
+
const y = A();
|
|
1085
|
+
y == null || y.focus();
|
|
1086
|
+
}
|
|
1029
1087
|
}
|
|
1030
|
-
|
|
1031
|
-
function
|
|
1088
|
+
W(v, () => j(Z));
|
|
1089
|
+
function Z() {
|
|
1032
1090
|
n("enter");
|
|
1033
1091
|
}
|
|
1034
|
-
|
|
1035
|
-
|
|
1092
|
+
let U;
|
|
1093
|
+
function J() {
|
|
1094
|
+
window.clearTimeout(U), U = window.setTimeout(() => a.animating = !1, 200), n("leave");
|
|
1036
1095
|
}
|
|
1037
1096
|
function A() {
|
|
1038
|
-
return e.anchor ?
|
|
1039
|
-
}
|
|
1040
|
-
let
|
|
1041
|
-
function
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
}
|
|
1058
|
-
});
|
|
1097
|
+
return e.anchor ? Yt(e.anchor) : null;
|
|
1098
|
+
}
|
|
1099
|
+
let G;
|
|
1100
|
+
function f() {
|
|
1101
|
+
const y = A();
|
|
1102
|
+
if (y)
|
|
1103
|
+
switch (G = new MutationObserver(I), G.observe(y, {
|
|
1104
|
+
attributes: !1,
|
|
1105
|
+
childList: !0,
|
|
1106
|
+
characterData: !0,
|
|
1107
|
+
subtree: !0
|
|
1108
|
+
}), e.trigger) {
|
|
1109
|
+
case "click":
|
|
1110
|
+
y.addEventListener("click", K);
|
|
1111
|
+
break;
|
|
1112
|
+
case "hover":
|
|
1113
|
+
y.addEventListener("mouseenter", Y), y.addEventListener("mouseleave", M), y.addEventListener("focusin", K), y.addEventListener("focusout", M);
|
|
1114
|
+
break;
|
|
1115
|
+
}
|
|
1059
1116
|
}
|
|
1060
|
-
function
|
|
1061
|
-
const
|
|
1062
|
-
if (
|
|
1063
|
-
switch (
|
|
1117
|
+
function g() {
|
|
1118
|
+
const y = A();
|
|
1119
|
+
if (y)
|
|
1120
|
+
switch (G == null || G.disconnect(), e.trigger) {
|
|
1064
1121
|
case "click":
|
|
1065
|
-
|
|
1122
|
+
y.removeEventListener("click", K);
|
|
1066
1123
|
break;
|
|
1067
1124
|
case "hover":
|
|
1068
|
-
|
|
1125
|
+
y.removeEventListener("mouseenter", Y), y.removeEventListener("mouseleave", M), y.removeEventListener("focusin", K), y.removeEventListener("focusout", M);
|
|
1069
1126
|
break;
|
|
1070
1127
|
}
|
|
1071
1128
|
}
|
|
1072
|
-
function
|
|
1073
|
-
|
|
1074
|
-
window.addEventListener("resize", _), e.scrollLock || window.addEventListener("scroll", _), _();
|
|
1075
|
-
});
|
|
1129
|
+
function d() {
|
|
1130
|
+
window.addEventListener("resize", I), e.scrollLock || window.addEventListener("scroll", I);
|
|
1076
1131
|
}
|
|
1077
|
-
function
|
|
1078
|
-
window.removeEventListener("resize",
|
|
1132
|
+
function p() {
|
|
1133
|
+
window.removeEventListener("resize", I), e.scrollLock || window.removeEventListener("scroll", I);
|
|
1079
1134
|
}
|
|
1080
|
-
let
|
|
1081
|
-
function
|
|
1082
|
-
A() ? (
|
|
1135
|
+
let F;
|
|
1136
|
+
function ee() {
|
|
1137
|
+
A() ? (I(), F = window.setTimeout(ee, 100)) : M();
|
|
1083
1138
|
}
|
|
1084
|
-
function
|
|
1085
|
-
|
|
1086
|
-
var
|
|
1087
|
-
|
|
1139
|
+
function P() {
|
|
1140
|
+
d(), e.spy ? ee() : I(), e.scrollLock && document.body.classList.add("no-scroll"), (e.anchor === void 0 || e.trigger === "click") && j(() => {
|
|
1141
|
+
var y;
|
|
1142
|
+
return (y = C.value) == null ? void 0 : y.focus();
|
|
1088
1143
|
});
|
|
1089
1144
|
}
|
|
1090
|
-
function
|
|
1091
|
-
|
|
1145
|
+
function oe() {
|
|
1146
|
+
p(), e.spy && (clearTimeout(F), F = void 0), e.scrollLock && document.body.classList.remove("no-scroll"), a.top = 0, a.left = 0;
|
|
1092
1147
|
}
|
|
1093
|
-
function
|
|
1094
|
-
e.persistent ||
|
|
1148
|
+
function ge() {
|
|
1149
|
+
e.persistent || M();
|
|
1095
1150
|
}
|
|
1096
|
-
return
|
|
1097
|
-
|
|
1098
|
-
}),
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
});
|
|
1102
|
-
}), Y(
|
|
1151
|
+
return Ke(() => {
|
|
1152
|
+
j(f);
|
|
1153
|
+
}), Xe(() => {
|
|
1154
|
+
g(), oe();
|
|
1155
|
+
}), W(
|
|
1103
1156
|
l,
|
|
1104
|
-
(
|
|
1105
|
-
|
|
1157
|
+
(y) => {
|
|
1158
|
+
j(() => y ? P() : oe());
|
|
1106
1159
|
},
|
|
1107
1160
|
{ immediate: !0 }
|
|
1108
|
-
), (
|
|
1109
|
-
disabled: !l.value && !
|
|
1161
|
+
), (y, ie) => (c(), E(Ye, {
|
|
1162
|
+
disabled: !l.value && !a.animating || !e.attach,
|
|
1110
1163
|
to: e.attach
|
|
1111
1164
|
}, [
|
|
1112
|
-
|
|
1165
|
+
i.value ? (c(), m("div", {
|
|
1113
1166
|
key: 0,
|
|
1114
|
-
class:
|
|
1167
|
+
class: D([
|
|
1115
1168
|
"q-overlay__underlay",
|
|
1116
1169
|
{ "q-overlay__underlay--blur": e.backdropBlur }
|
|
1117
1170
|
])
|
|
1118
|
-
}, null, 2)) :
|
|
1119
|
-
|
|
1171
|
+
}, null, 2)) : q("", !0),
|
|
1172
|
+
Q(Ze, {
|
|
1120
1173
|
name: e.transition,
|
|
1121
1174
|
appear: "",
|
|
1122
|
-
|
|
1123
|
-
onLeave: j
|
|
1175
|
+
onLeave: J
|
|
1124
1176
|
}, {
|
|
1125
1177
|
default: k(() => [
|
|
1126
|
-
l.value ? (
|
|
1178
|
+
l.value ? (c(), m("div", {
|
|
1127
1179
|
key: 0,
|
|
1128
|
-
class:
|
|
1129
|
-
style:
|
|
1180
|
+
class: D(s.value),
|
|
1181
|
+
style: de($.value)
|
|
1130
1182
|
}, [
|
|
1131
|
-
|
|
1183
|
+
se("div", ce({
|
|
1132
1184
|
class: "q-overlay__content",
|
|
1133
1185
|
ref_key: "overlayRef",
|
|
1134
|
-
ref:
|
|
1186
|
+
ref: C,
|
|
1135
1187
|
tabindex: "-1",
|
|
1136
|
-
role:
|
|
1137
|
-
},
|
|
1138
|
-
onKeydown:
|
|
1139
|
-
onBlur:
|
|
1188
|
+
role: i.value ? "dialog" : void 0
|
|
1189
|
+
}, y.$attrs, {
|
|
1190
|
+
onKeydown: Je(ge, ["escape"]),
|
|
1191
|
+
onBlur: ge
|
|
1140
1192
|
}), [
|
|
1141
|
-
e.arrow ? (
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1193
|
+
e.arrow ? (c(), m("div", {
|
|
1194
|
+
key: 0,
|
|
1195
|
+
ref_key: "arrowRef",
|
|
1196
|
+
ref: z,
|
|
1197
|
+
role: "presentation",
|
|
1198
|
+
class: "q-overlay__arrow",
|
|
1199
|
+
style: de(x.value)
|
|
1200
|
+
}, null, 4)) : q("", !0),
|
|
1201
|
+
h(y.$slots, "default")
|
|
1202
|
+
], 16, Zt)
|
|
1203
|
+
], 6)) : q("", !0)
|
|
1145
1204
|
]),
|
|
1146
1205
|
_: 3
|
|
1147
1206
|
}, 8, ["name"])
|
|
1148
1207
|
], 8, ["disabled", "to"]));
|
|
1149
1208
|
}
|
|
1150
|
-
}),
|
|
1209
|
+
}), $e = V(Jt), eo = ["id"], to = {
|
|
1151
1210
|
key: 0,
|
|
1152
1211
|
class: "q-field__label"
|
|
1153
|
-
},
|
|
1212
|
+
}, oo = ["for"], no = {
|
|
1154
1213
|
key: 0,
|
|
1155
1214
|
class: "q-field__prepend"
|
|
1156
|
-
},
|
|
1215
|
+
}, lo = {
|
|
1157
1216
|
key: 1,
|
|
1158
1217
|
class: "q-field__append"
|
|
1159
|
-
},
|
|
1218
|
+
}, ao = {
|
|
1160
1219
|
key: 1,
|
|
1161
1220
|
class: "q-field__extras"
|
|
1162
|
-
},
|
|
1221
|
+
}, so = /* @__PURE__ */ L({
|
|
1163
1222
|
inheritAttrs: !1,
|
|
1164
1223
|
__name: "QField",
|
|
1165
1224
|
props: {
|
|
@@ -1173,12 +1232,12 @@ const Rt = ["role"], Ut = {
|
|
|
1173
1232
|
class: { default: void 0 }
|
|
1174
1233
|
},
|
|
1175
1234
|
setup(t, { expose: o }) {
|
|
1176
|
-
const e = t, n =
|
|
1235
|
+
const e = t, n = ye(e.id), l = B(null), s = w(() => e.required && !e.readonly && !e.disabled);
|
|
1177
1236
|
return o({
|
|
1178
1237
|
fieldRef: l
|
|
1179
|
-
}), (
|
|
1180
|
-
id:
|
|
1181
|
-
class:
|
|
1238
|
+
}), (i, a) => (c(), m("div", {
|
|
1239
|
+
id: b(n),
|
|
1240
|
+
class: D([
|
|
1182
1241
|
"q-field",
|
|
1183
1242
|
`q-field--${e.size}`,
|
|
1184
1243
|
{
|
|
@@ -1189,37 +1248,37 @@ const Rt = ["role"], Ut = {
|
|
|
1189
1248
|
e.class
|
|
1190
1249
|
])
|
|
1191
1250
|
}, [
|
|
1192
|
-
e.label ? (
|
|
1193
|
-
|
|
1194
|
-
|
|
1251
|
+
e.label ? (c(), m("div", to, [
|
|
1252
|
+
h(i.$slots, "label.prepend"),
|
|
1253
|
+
se("label", {
|
|
1195
1254
|
for: e.for
|
|
1196
|
-
},
|
|
1197
|
-
|
|
1198
|
-
])) :
|
|
1199
|
-
|
|
1200
|
-
|
|
1255
|
+
}, R(e.label), 9, oo),
|
|
1256
|
+
h(i.$slots, "label.append")
|
|
1257
|
+
])) : q("", !0),
|
|
1258
|
+
h(i.$slots, "control", {}, () => [
|
|
1259
|
+
se("div", ce({
|
|
1201
1260
|
class: "q-field__control",
|
|
1202
1261
|
ref_key: "fieldRef",
|
|
1203
1262
|
ref: l
|
|
1204
|
-
},
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
])) :
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
])) :
|
|
1263
|
+
}, i.$attrs), [
|
|
1264
|
+
i.$slots.prepend ? (c(), m("div", no, [
|
|
1265
|
+
h(i.$slots, "prepend")
|
|
1266
|
+
])) : q("", !0),
|
|
1267
|
+
h(i.$slots, "default"),
|
|
1268
|
+
i.$slots.append ? (c(), m("div", lo, [
|
|
1269
|
+
h(i.$slots, "append")
|
|
1270
|
+
])) : q("", !0)
|
|
1212
1271
|
], 16)
|
|
1213
1272
|
]),
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
])) :
|
|
1217
|
-
], 10,
|
|
1273
|
+
i.$slots.extras ? (c(), m("div", ao, [
|
|
1274
|
+
h(i.$slots, "extras")
|
|
1275
|
+
])) : q("", !0)
|
|
1276
|
+
], 10, eo));
|
|
1218
1277
|
}
|
|
1219
|
-
}),
|
|
1278
|
+
}), Be = V(so), io = ["id", "type", "role", "required", "placeholder", "readonly", "disabled", "maxlength"], ro = /* @__PURE__ */ L({
|
|
1220
1279
|
inheritAttrs: !1,
|
|
1221
1280
|
__name: "QTextField",
|
|
1222
|
-
props: /* @__PURE__ */
|
|
1281
|
+
props: /* @__PURE__ */ X({
|
|
1223
1282
|
id: { default: void 0 },
|
|
1224
1283
|
placeholder: { default: "" },
|
|
1225
1284
|
label: { default: "" },
|
|
@@ -1237,93 +1296,93 @@ const Rt = ["role"], Ut = {
|
|
|
1237
1296
|
}),
|
|
1238
1297
|
emits: ["update:modelValue"],
|
|
1239
1298
|
setup(t, { expose: o }) {
|
|
1240
|
-
const e = t, n =
|
|
1299
|
+
const e = t, n = te(t, "modelValue"), l = ye(e.id), s = B(null), i = B(null), a = w(
|
|
1241
1300
|
() => e.readonly || e.disabled ? "" : e.placeholder
|
|
1242
1301
|
);
|
|
1243
1302
|
return o({
|
|
1244
1303
|
fieldRef: w(() => {
|
|
1245
|
-
var
|
|
1246
|
-
return (
|
|
1304
|
+
var u;
|
|
1305
|
+
return (u = s.value) == null ? void 0 : u.fieldRef;
|
|
1247
1306
|
}),
|
|
1248
|
-
inputRef:
|
|
1249
|
-
}), (
|
|
1307
|
+
inputRef: i
|
|
1308
|
+
}), (u, v) => (c(), E(b(Be), {
|
|
1250
1309
|
ref_key: "fieldRef",
|
|
1251
1310
|
ref: s,
|
|
1252
|
-
class:
|
|
1253
|
-
for:
|
|
1311
|
+
class: D(["q-text-field", e.class]),
|
|
1312
|
+
for: b(l),
|
|
1254
1313
|
label: e.label,
|
|
1255
1314
|
size: e.size,
|
|
1256
1315
|
readonly: e.readonly,
|
|
1257
1316
|
disabled: e.disabled,
|
|
1258
1317
|
required: e.required
|
|
1259
|
-
},
|
|
1318
|
+
}, we({
|
|
1260
1319
|
"label.prepend": k(() => [
|
|
1261
|
-
|
|
1320
|
+
h(u.$slots, "label.prepend")
|
|
1262
1321
|
]),
|
|
1263
1322
|
"label.append": k(() => [
|
|
1264
|
-
|
|
1323
|
+
h(u.$slots, "label.append")
|
|
1265
1324
|
]),
|
|
1266
1325
|
default: k(() => [
|
|
1267
|
-
|
|
1268
|
-
"onUpdate:modelValue":
|
|
1326
|
+
et(se("input", ce({
|
|
1327
|
+
"onUpdate:modelValue": v[0] || (v[0] = ($) => n.value = $),
|
|
1269
1328
|
ref_key: "inputRef",
|
|
1270
|
-
ref:
|
|
1271
|
-
id:
|
|
1329
|
+
ref: i,
|
|
1330
|
+
id: b(l),
|
|
1272
1331
|
class: "q-text-field__input",
|
|
1273
1332
|
type: e.type,
|
|
1274
1333
|
role: e.role,
|
|
1275
1334
|
required: e.required,
|
|
1276
|
-
placeholder:
|
|
1335
|
+
placeholder: a.value,
|
|
1277
1336
|
readonly: e.readonly,
|
|
1278
1337
|
disabled: e.disabled,
|
|
1279
1338
|
maxlength: e.maxLength
|
|
1280
|
-
},
|
|
1281
|
-
[
|
|
1339
|
+
}, u.$attrs), null, 16, io), [
|
|
1340
|
+
[tt, n.value]
|
|
1282
1341
|
])
|
|
1283
1342
|
]),
|
|
1284
1343
|
_: 2
|
|
1285
1344
|
}, [
|
|
1286
|
-
|
|
1345
|
+
u.$slots.prepend ? {
|
|
1287
1346
|
name: "prepend",
|
|
1288
1347
|
fn: k(() => [
|
|
1289
|
-
|
|
1348
|
+
h(u.$slots, "prepend")
|
|
1290
1349
|
]),
|
|
1291
1350
|
key: "0"
|
|
1292
1351
|
} : void 0,
|
|
1293
|
-
|
|
1352
|
+
u.$slots.append ? {
|
|
1294
1353
|
name: "append",
|
|
1295
1354
|
fn: k(() => [
|
|
1296
|
-
|
|
1355
|
+
h(u.$slots, "append")
|
|
1297
1356
|
]),
|
|
1298
1357
|
key: "1"
|
|
1299
1358
|
} : void 0,
|
|
1300
|
-
|
|
1359
|
+
u.$slots.extras ? {
|
|
1301
1360
|
name: "extras",
|
|
1302
1361
|
fn: k(() => [
|
|
1303
|
-
|
|
1362
|
+
h(u.$slots, "extras")
|
|
1304
1363
|
]),
|
|
1305
1364
|
key: "2"
|
|
1306
1365
|
} : void 0
|
|
1307
1366
|
]), 1032, ["class", "for", "label", "size", "readonly", "disabled", "required"]));
|
|
1308
1367
|
}
|
|
1309
|
-
}),
|
|
1368
|
+
}), uo = V(ro), co = ["data-key"], fo = {
|
|
1310
1369
|
key: 0,
|
|
1311
1370
|
class: "q-select__loader"
|
|
1312
|
-
},
|
|
1371
|
+
}, po = {
|
|
1313
1372
|
key: 2,
|
|
1314
1373
|
class: "q-select__loader"
|
|
1315
|
-
},
|
|
1374
|
+
}, mo = {
|
|
1316
1375
|
noData: "No data available"
|
|
1317
|
-
},
|
|
1376
|
+
}, vo = {
|
|
1318
1377
|
chevron: {
|
|
1319
1378
|
icon: "chevron-down"
|
|
1320
1379
|
},
|
|
1321
1380
|
clear: {
|
|
1322
1381
|
icon: "close"
|
|
1323
1382
|
}
|
|
1324
|
-
},
|
|
1383
|
+
}, ho = /* @__PURE__ */ L({
|
|
1325
1384
|
__name: "QCombobox",
|
|
1326
|
-
props: /* @__PURE__ */
|
|
1385
|
+
props: /* @__PURE__ */ X({
|
|
1327
1386
|
id: { default: void 0 },
|
|
1328
1387
|
placeholder: { default: "" },
|
|
1329
1388
|
selectionMode: { default: "automatic" },
|
|
@@ -1340,8 +1399,8 @@ const Rt = ["role"], Ut = {
|
|
|
1340
1399
|
itemLabel: { default: "label" },
|
|
1341
1400
|
emptyValue: { type: [String, Number, Boolean, Symbol], default: void 0 },
|
|
1342
1401
|
size: { default: void 0 },
|
|
1343
|
-
texts: { default: () =>
|
|
1344
|
-
icons: { default: () =>
|
|
1402
|
+
texts: { default: () => mo },
|
|
1403
|
+
icons: { default: () => vo },
|
|
1345
1404
|
class: { default: void 0 }
|
|
1346
1405
|
}, {
|
|
1347
1406
|
modelValue: {
|
|
@@ -1353,161 +1412,166 @@ const Rt = ["role"], Ut = {
|
|
|
1353
1412
|
search: { default: "" },
|
|
1354
1413
|
searchModifiers: {}
|
|
1355
1414
|
}),
|
|
1356
|
-
emits: /* @__PURE__ */
|
|
1415
|
+
emits: /* @__PURE__ */ X(["before-show", "before-hide", "show", "hide"], ["update:modelValue", "update:open", "update:search"]),
|
|
1357
1416
|
setup(t, { expose: o, emit: e }) {
|
|
1358
|
-
const n = t, l = e, s =
|
|
1359
|
-
|
|
1360
|
-
const
|
|
1361
|
-
var
|
|
1362
|
-
return n.filterMode === "manual" || !
|
|
1363
|
-
(
|
|
1417
|
+
const n = t, l = e, s = te(t, "modelValue"), i = te(t, "open"), a = te(t, "search"), u = B(void 0), v = B(null), $ = B(null), x = B(null), z = B(null);
|
|
1418
|
+
Ke(U);
|
|
1419
|
+
const C = w(() => n.clearable && !n.readonly && !n.disabled), I = w(() => {
|
|
1420
|
+
var r;
|
|
1421
|
+
return n.filterMode === "manual" || !M.value ? n.items : (r = n.items) == null ? void 0 : r.filter(
|
|
1422
|
+
(_) => _[n.itemLabel].toLowerCase().startsWith(a.value.toLowerCase())
|
|
1364
1423
|
);
|
|
1365
|
-
}),
|
|
1366
|
-
var
|
|
1367
|
-
return (
|
|
1368
|
-
}),
|
|
1369
|
-
const
|
|
1370
|
-
if (
|
|
1371
|
-
return
|
|
1372
|
-
}),
|
|
1373
|
-
var
|
|
1374
|
-
if (
|
|
1424
|
+
}), S = w(() => {
|
|
1425
|
+
var r;
|
|
1426
|
+
return (r = n.items) == null ? void 0 : r.find((_) => _[n.itemValue] === s.value);
|
|
1427
|
+
}), K = w(() => S.value === void 0), Y = w(() => {
|
|
1428
|
+
const r = u.value;
|
|
1429
|
+
if (r !== void 0 && I.value[r])
|
|
1430
|
+
return I.value[r];
|
|
1431
|
+
}), H = w(() => {
|
|
1432
|
+
var _;
|
|
1433
|
+
if (u.value === void 0)
|
|
1375
1434
|
return;
|
|
1376
|
-
const
|
|
1377
|
-
return
|
|
1378
|
-
}),
|
|
1379
|
-
var
|
|
1380
|
-
return
|
|
1435
|
+
const r = (_ = $.value) == null ? void 0 : _.getItem(u.value);
|
|
1436
|
+
return r == null ? void 0 : r.id;
|
|
1437
|
+
}), M = w(() => {
|
|
1438
|
+
var r;
|
|
1439
|
+
return a.value.length > 0 && a.value !== ((r = S.value) == null ? void 0 : r[n.itemLabel]);
|
|
1381
1440
|
});
|
|
1382
|
-
function
|
|
1383
|
-
s.value =
|
|
1441
|
+
function Z(r) {
|
|
1442
|
+
s.value = r, A();
|
|
1384
1443
|
}
|
|
1385
|
-
function
|
|
1386
|
-
var
|
|
1387
|
-
const
|
|
1388
|
-
|
|
1444
|
+
function U() {
|
|
1445
|
+
var _;
|
|
1446
|
+
const r = ((_ = S.value) == null ? void 0 : _[n.itemLabel]) || "";
|
|
1447
|
+
a.value !== r && (a.value = r);
|
|
1389
1448
|
}
|
|
1390
|
-
function
|
|
1391
|
-
|
|
1449
|
+
function J() {
|
|
1450
|
+
i.value || n.readonly || n.disabled || (l("before-show"), i.value = !0, oe());
|
|
1392
1451
|
}
|
|
1393
|
-
function
|
|
1394
|
-
|
|
1452
|
+
function A() {
|
|
1453
|
+
i.value && (l("before-hide"), i.value = !1, u.value = void 0);
|
|
1395
1454
|
}
|
|
1396
|
-
function
|
|
1397
|
-
|
|
1455
|
+
function G() {
|
|
1456
|
+
i.value ? A() : g();
|
|
1398
1457
|
}
|
|
1399
|
-
function
|
|
1400
|
-
|
|
1458
|
+
function f() {
|
|
1459
|
+
C.value && (s.value = n.emptyValue, u.value = void 0, oe());
|
|
1401
1460
|
}
|
|
1402
|
-
function
|
|
1403
|
-
if (
|
|
1404
|
-
const
|
|
1405
|
-
|
|
1461
|
+
function g() {
|
|
1462
|
+
if (J(), S.value !== void 0) {
|
|
1463
|
+
const r = I.value.indexOf(S.value);
|
|
1464
|
+
r !== -1 && j(() => N(r));
|
|
1406
1465
|
}
|
|
1407
1466
|
}
|
|
1408
|
-
function
|
|
1409
|
-
var
|
|
1410
|
-
if (!(!
|
|
1411
|
-
if (["ArrowDown", "ArrowUp", "Home", "End"].includes(
|
|
1412
|
-
|
|
1413
|
-
else if (["ArrowDown", "ArrowUp"].includes(
|
|
1414
|
-
|
|
1415
|
-
if (
|
|
1416
|
-
|
|
1467
|
+
function d(r) {
|
|
1468
|
+
var _, T;
|
|
1469
|
+
if (!(!r.key || n.readonly || n.disabled))
|
|
1470
|
+
if (["ArrowDown", "ArrowUp", "Home", "End"].includes(r.key) && (r.preventDefault(), r.stopPropagation()), r.key === "Escape")
|
|
1471
|
+
U(), i.value && A();
|
|
1472
|
+
else if (["ArrowDown", "ArrowUp"].includes(r.key))
|
|
1473
|
+
i.value ? j(() => {
|
|
1474
|
+
if (u.value === void 0)
|
|
1475
|
+
p();
|
|
1417
1476
|
else {
|
|
1418
|
-
const O =
|
|
1419
|
-
|
|
1477
|
+
const O = r.key === "ArrowDown" ? "next" : "prev";
|
|
1478
|
+
ee(u.value, O);
|
|
1420
1479
|
}
|
|
1421
|
-
}) : (
|
|
1422
|
-
|
|
1480
|
+
}) : (J(), j(() => {
|
|
1481
|
+
r.key === "ArrowDown" ? p() : F();
|
|
1423
1482
|
}));
|
|
1424
|
-
else if (
|
|
1425
|
-
if (
|
|
1483
|
+
else if (r.key === "Enter") {
|
|
1484
|
+
if (Y.value === void 0)
|
|
1426
1485
|
return;
|
|
1427
|
-
|
|
1486
|
+
Z(Y.value[n.itemValue]);
|
|
1428
1487
|
} else
|
|
1429
|
-
|
|
1488
|
+
r.key === "Home" ? u.value = (_ = $.value) == null ? void 0 : _.getFirstFocusableItemIndex() : r.key === "End" ? u.value = (T = $.value) == null ? void 0 : T.getLastFocusableItemIndex() : (/^[a-z]$/i.test(r.key) || r.key === "Backspace") && J();
|
|
1430
1489
|
}
|
|
1431
|
-
function
|
|
1432
|
-
var
|
|
1433
|
-
if (
|
|
1434
|
-
|
|
1490
|
+
function p() {
|
|
1491
|
+
var r, _;
|
|
1492
|
+
if (K.value)
|
|
1493
|
+
u.value = (_ = $.value) == null ? void 0 : _.getFirstFocusableItemIndex();
|
|
1435
1494
|
else {
|
|
1436
|
-
const
|
|
1495
|
+
const T = I.value.findIndex(
|
|
1437
1496
|
(O) => O[n.itemValue] === s.value
|
|
1438
1497
|
);
|
|
1439
|
-
|
|
1498
|
+
T === -1 ? u.value = (r = $.value) == null ? void 0 : r.getFirstFocusableItemIndex() : u.value = T;
|
|
1440
1499
|
}
|
|
1441
1500
|
}
|
|
1442
|
-
function
|
|
1443
|
-
var
|
|
1444
|
-
|
|
1501
|
+
function F() {
|
|
1502
|
+
var r;
|
|
1503
|
+
u.value = (r = $.value) == null ? void 0 : r.getLastFocusableItemIndex();
|
|
1445
1504
|
}
|
|
1446
|
-
function
|
|
1447
|
-
var
|
|
1448
|
-
|
|
1505
|
+
function ee(r, _) {
|
|
1506
|
+
var T;
|
|
1507
|
+
u.value = (T = $.value) == null ? void 0 : T.getAdjacentItemIndex(r, _);
|
|
1449
1508
|
}
|
|
1450
|
-
function
|
|
1451
|
-
var
|
|
1452
|
-
|
|
1509
|
+
function P(r) {
|
|
1510
|
+
var re, Ve, Ce, Te;
|
|
1511
|
+
const _ = ((re = x == null ? void 0 : x.value) == null ? void 0 : re.$el) === r.relatedTarget, T = (Ce = (Ve = v == null ? void 0 : v.value) == null ? void 0 : Ve.$el) == null ? void 0 : Ce.contains(r.relatedTarget), O = (Te = z == null ? void 0 : z.value) == null ? void 0 : Te.contains(r.relatedTarget);
|
|
1512
|
+
if (_ || O || T) {
|
|
1513
|
+
r.preventDefault(), r.stopPropagation();
|
|
1514
|
+
return;
|
|
1515
|
+
}
|
|
1516
|
+
A(), C.value && !a.value && (s.value = n.emptyValue), U();
|
|
1453
1517
|
}
|
|
1454
|
-
function
|
|
1455
|
-
var
|
|
1456
|
-
(
|
|
1518
|
+
function oe() {
|
|
1519
|
+
var r, _;
|
|
1520
|
+
(_ = (r = v.value) == null ? void 0 : r.inputRef) == null || _.focus();
|
|
1457
1521
|
}
|
|
1458
|
-
function
|
|
1459
|
-
|
|
1522
|
+
function ge() {
|
|
1523
|
+
oe();
|
|
1460
1524
|
}
|
|
1461
|
-
function
|
|
1525
|
+
function y() {
|
|
1462
1526
|
l("show");
|
|
1463
1527
|
}
|
|
1464
|
-
function
|
|
1528
|
+
function ie() {
|
|
1465
1529
|
l("hide");
|
|
1466
1530
|
}
|
|
1467
|
-
function
|
|
1468
|
-
var
|
|
1469
|
-
const
|
|
1470
|
-
|
|
1531
|
+
function N(r) {
|
|
1532
|
+
var T;
|
|
1533
|
+
const _ = (T = $.value) == null ? void 0 : T.getItem(r);
|
|
1534
|
+
$.value && ($.value.$el.scrollTop = _ == null ? void 0 : _.offsetTop);
|
|
1471
1535
|
}
|
|
1472
|
-
return
|
|
1536
|
+
return W(s, U), W(
|
|
1473
1537
|
() => n.items,
|
|
1474
|
-
(
|
|
1475
|
-
if (!
|
|
1476
|
-
const
|
|
1477
|
-
|
|
1538
|
+
(r, _) => {
|
|
1539
|
+
if (!K.value) {
|
|
1540
|
+
const T = _.find((O) => O[n.itemValue] === s.value);
|
|
1541
|
+
a.value === (T == null ? void 0 : T[n.itemLabel]) && U();
|
|
1478
1542
|
}
|
|
1479
1543
|
},
|
|
1480
1544
|
{ deep: !0 }
|
|
1481
|
-
),
|
|
1482
|
-
|
|
1483
|
-
}),
|
|
1484
|
-
|
|
1485
|
-
}),
|
|
1545
|
+
), W(u, (r) => {
|
|
1546
|
+
r !== void 0 && N(r);
|
|
1547
|
+
}), W(a, (r) => {
|
|
1548
|
+
r && i.value && n.selectionMode === "automatic" && j(p);
|
|
1549
|
+
}), W(
|
|
1486
1550
|
() => n.loading,
|
|
1487
|
-
(
|
|
1488
|
-
!
|
|
1551
|
+
(r) => {
|
|
1552
|
+
!r && i.value && j(p);
|
|
1489
1553
|
}
|
|
1490
1554
|
), o({
|
|
1491
|
-
triggerEl:
|
|
1492
|
-
}), (
|
|
1493
|
-
var
|
|
1494
|
-
return
|
|
1495
|
-
|
|
1496
|
-
modelValue:
|
|
1497
|
-
"onUpdate:modelValue":
|
|
1555
|
+
triggerEl: v
|
|
1556
|
+
}), (r, _) => {
|
|
1557
|
+
var T;
|
|
1558
|
+
return c(), m(le, null, [
|
|
1559
|
+
Q(b(uo), {
|
|
1560
|
+
modelValue: a.value,
|
|
1561
|
+
"onUpdate:modelValue": _[0] || (_[0] = (O) => a.value = O),
|
|
1498
1562
|
id: n.id,
|
|
1499
1563
|
label: n.label,
|
|
1500
1564
|
required: n.required,
|
|
1501
1565
|
ref_key: "triggerEl",
|
|
1502
|
-
ref:
|
|
1566
|
+
ref: v,
|
|
1503
1567
|
role: "combobox",
|
|
1504
1568
|
placeholder: n.placeholder,
|
|
1505
|
-
class:
|
|
1569
|
+
class: D([
|
|
1506
1570
|
"q-combobox",
|
|
1507
1571
|
{
|
|
1508
1572
|
"q-combobox--readonly": n.readonly,
|
|
1509
1573
|
"q-combobox--disabled": n.disabled,
|
|
1510
|
-
"q-combobox--expanded":
|
|
1574
|
+
"q-combobox--expanded": i.value
|
|
1511
1575
|
},
|
|
1512
1576
|
n.class
|
|
1513
1577
|
]),
|
|
@@ -1515,118 +1579,121 @@ const Rt = ["role"], Ut = {
|
|
|
1515
1579
|
disabled: n.disabled,
|
|
1516
1580
|
"data-loading": n.loading,
|
|
1517
1581
|
autocomplete: "off",
|
|
1518
|
-
"aria-expanded":
|
|
1582
|
+
"aria-expanded": i.value,
|
|
1519
1583
|
"aria-haspopup": "listbox",
|
|
1520
1584
|
"aria-autocomplete": "list",
|
|
1521
|
-
"aria-activedescendant":
|
|
1585
|
+
"aria-activedescendant": H.value,
|
|
1522
1586
|
size: n.size,
|
|
1523
|
-
onClick:
|
|
1524
|
-
onFocusout:
|
|
1525
|
-
onKeydown:
|
|
1526
|
-
},
|
|
1587
|
+
onClick: g,
|
|
1588
|
+
onFocusout: P,
|
|
1589
|
+
onKeydown: ue(d, ["stop"])
|
|
1590
|
+
}, we({
|
|
1527
1591
|
"label.prepend": k(() => [
|
|
1528
|
-
|
|
1592
|
+
h(r.$slots, "label.prepend")
|
|
1529
1593
|
]),
|
|
1530
1594
|
"label.append": k(() => [
|
|
1531
|
-
|
|
1595
|
+
h(r.$slots, "label.append")
|
|
1532
1596
|
]),
|
|
1533
1597
|
append: k(() => [
|
|
1534
|
-
|
|
1535
|
-
|
|
1598
|
+
h(r.$slots, "append"),
|
|
1599
|
+
C.value && a.value ? (c(), E(b(he), {
|
|
1536
1600
|
key: 0,
|
|
1537
1601
|
class: "q-combobox__clear",
|
|
1538
1602
|
"b-style": "plain",
|
|
1539
1603
|
borderless: "",
|
|
1540
1604
|
tabindex: "-1",
|
|
1541
|
-
onClick:
|
|
1605
|
+
onClick: f
|
|
1542
1606
|
}, {
|
|
1543
1607
|
default: k(() => [
|
|
1544
|
-
|
|
1608
|
+
Q(b(ne), ae(fe(n.icons.clear)), null, 16)
|
|
1545
1609
|
]),
|
|
1546
1610
|
_: 1
|
|
1547
|
-
})) :
|
|
1548
|
-
n.readonly ?
|
|
1611
|
+
})) : q("", !0),
|
|
1612
|
+
n.readonly ? q("", !0) : (c(), E(b(he), {
|
|
1549
1613
|
key: 1,
|
|
1614
|
+
ref_key: "toggleRef",
|
|
1615
|
+
ref: x,
|
|
1550
1616
|
class: "q-combobox__chevron",
|
|
1551
1617
|
"b-style": "plain",
|
|
1552
1618
|
borderless: "",
|
|
1553
1619
|
tabindex: "-1",
|
|
1554
1620
|
disabled: n.disabled,
|
|
1555
|
-
|
|
1621
|
+
onMousedown: ue(G, ["stop", "prevent"])
|
|
1556
1622
|
}, {
|
|
1557
1623
|
default: k(() => [
|
|
1558
|
-
|
|
1624
|
+
Q(b(ne), ae(fe(n.icons.chevron)), null, 16)
|
|
1559
1625
|
]),
|
|
1560
1626
|
_: 1
|
|
1561
1627
|
}, 8, ["disabled"]))
|
|
1562
1628
|
]),
|
|
1563
1629
|
_: 2
|
|
1564
1630
|
}, [
|
|
1565
|
-
|
|
1631
|
+
r.$slots.prepend ? {
|
|
1566
1632
|
name: "prepend",
|
|
1567
1633
|
fn: k(() => [
|
|
1568
|
-
|
|
1634
|
+
h(r.$slots, "prepend")
|
|
1569
1635
|
]),
|
|
1570
1636
|
key: "0"
|
|
1571
1637
|
} : void 0,
|
|
1572
|
-
|
|
1638
|
+
r.$slots.extras ? {
|
|
1573
1639
|
name: "extras",
|
|
1574
1640
|
fn: k(() => [
|
|
1575
|
-
|
|
1641
|
+
h(r.$slots, "extras")
|
|
1576
1642
|
]),
|
|
1577
1643
|
key: "1"
|
|
1578
1644
|
} : void 0
|
|
1579
1645
|
]), 1032, ["modelValue", "id", "label", "required", "placeholder", "class", "readonly", "disabled", "data-loading", "aria-expanded", "aria-activedescendant", "size"]),
|
|
1580
|
-
|
|
1581
|
-
modelValue:
|
|
1582
|
-
"onUpdate:modelValue":
|
|
1646
|
+
Q(b($e), {
|
|
1647
|
+
modelValue: i.value,
|
|
1648
|
+
"onUpdate:modelValue": _[2] || (_[2] = (O) => i.value = O),
|
|
1583
1649
|
spy: "",
|
|
1650
|
+
"non-modal": "",
|
|
1584
1651
|
trigger: "manual",
|
|
1585
|
-
placement: "bottom",
|
|
1652
|
+
placement: "bottom-start",
|
|
1586
1653
|
width: "anchor",
|
|
1587
1654
|
offset: 4,
|
|
1588
|
-
anchor: (
|
|
1589
|
-
onEnter:
|
|
1590
|
-
onLeave:
|
|
1655
|
+
anchor: (T = v.value) == null ? void 0 : T.$el,
|
|
1656
|
+
onEnter: y,
|
|
1657
|
+
onLeave: ie
|
|
1591
1658
|
}, {
|
|
1592
1659
|
default: k(() => {
|
|
1593
1660
|
var O;
|
|
1594
1661
|
return [
|
|
1595
|
-
|
|
1662
|
+
se("div", {
|
|
1596
1663
|
ref_key: "contentRef",
|
|
1597
|
-
ref:
|
|
1664
|
+
ref: z,
|
|
1665
|
+
class: "q-select__body",
|
|
1598
1666
|
"data-testid": "combobox-dropdown",
|
|
1599
1667
|
"data-key": n.id,
|
|
1600
|
-
|
|
1601
|
-
onFocusout: p
|
|
1668
|
+
onFocusout: P
|
|
1602
1669
|
}, [
|
|
1603
|
-
|
|
1604
|
-
n.loading ? (
|
|
1605
|
-
|
|
1606
|
-
])) :
|
|
1670
|
+
h(r.$slots, "body.prepend"),
|
|
1671
|
+
n.loading ? (c(), m("div", fo, [
|
|
1672
|
+
Q(b(Se), { size: 24 })
|
|
1673
|
+
])) : I.value.length ? (c(), E(b(Re), {
|
|
1607
1674
|
key: 1,
|
|
1608
1675
|
ref_key: "listRef",
|
|
1609
|
-
ref:
|
|
1676
|
+
ref: $,
|
|
1610
1677
|
class: "q-select__items",
|
|
1611
1678
|
modelValue: s.value,
|
|
1612
1679
|
"onUpdate:modelValue": [
|
|
1613
|
-
|
|
1614
|
-
|
|
1680
|
+
_[1] || (_[1] = (re) => s.value = re),
|
|
1681
|
+
Z
|
|
1615
1682
|
],
|
|
1616
|
-
highlighted: (O =
|
|
1617
|
-
items:
|
|
1618
|
-
groups:
|
|
1683
|
+
highlighted: (O = Y.value) == null ? void 0 : O[n.itemValue],
|
|
1684
|
+
items: I.value,
|
|
1685
|
+
groups: r.groups,
|
|
1619
1686
|
"item-label": n.itemLabel,
|
|
1620
1687
|
"item-value": n.itemValue,
|
|
1621
|
-
onMouseup:
|
|
1688
|
+
onMouseup: ge
|
|
1622
1689
|
}, {
|
|
1623
|
-
item: k(({ item:
|
|
1624
|
-
|
|
1690
|
+
item: k(({ item: re }) => [
|
|
1691
|
+
h(r.$slots, "item", { item: re })
|
|
1625
1692
|
]),
|
|
1626
1693
|
_: 3
|
|
1627
|
-
}, 8, ["modelValue", "highlighted", "items", "groups", "item-label", "item-value"])) : (
|
|
1628
|
-
|
|
1629
|
-
], 40,
|
|
1694
|
+
}, 8, ["modelValue", "highlighted", "items", "groups", "item-label", "item-value"])) : (c(), m("div", po, R(r.texts.noData), 1)),
|
|
1695
|
+
h(r.$slots, "body.append")
|
|
1696
|
+
], 40, co)
|
|
1630
1697
|
];
|
|
1631
1698
|
}),
|
|
1632
1699
|
_: 3
|
|
@@ -1634,13 +1701,13 @@ const Rt = ["role"], Ut = {
|
|
|
1634
1701
|
], 64);
|
|
1635
1702
|
};
|
|
1636
1703
|
}
|
|
1637
|
-
}),
|
|
1704
|
+
}), No = V(ho), yo = {
|
|
1638
1705
|
key: 0,
|
|
1639
1706
|
class: "q-input-group__prepend"
|
|
1640
|
-
},
|
|
1707
|
+
}, bo = { key: 0 }, go = {
|
|
1641
1708
|
key: 1,
|
|
1642
1709
|
class: "q-input-group__append"
|
|
1643
|
-
},
|
|
1710
|
+
}, _o = { key: 0 }, ko = /* @__PURE__ */ L({
|
|
1644
1711
|
__name: "QInputGroup",
|
|
1645
1712
|
props: {
|
|
1646
1713
|
id: { default: void 0 },
|
|
@@ -1653,64 +1720,64 @@ const Rt = ["role"], Ut = {
|
|
|
1653
1720
|
},
|
|
1654
1721
|
setup(t) {
|
|
1655
1722
|
const o = t;
|
|
1656
|
-
return
|
|
1723
|
+
return Ge({
|
|
1657
1724
|
QField: {
|
|
1658
1725
|
size: "block"
|
|
1659
1726
|
}
|
|
1660
|
-
}), (e, n) => (
|
|
1727
|
+
}), (e, n) => (c(), E(b(Be), {
|
|
1661
1728
|
id: o.id,
|
|
1662
|
-
class:
|
|
1729
|
+
class: D(["q-input-group", o.class]),
|
|
1663
1730
|
label: o.label,
|
|
1664
1731
|
required: o.required,
|
|
1665
1732
|
size: o.size
|
|
1666
|
-
},
|
|
1733
|
+
}, we({
|
|
1667
1734
|
default: k(() => [
|
|
1668
|
-
e.$slots.prepend || o.prependIcon ? (
|
|
1669
|
-
o.prependIcon ? (
|
|
1670
|
-
|
|
1671
|
-
])) :
|
|
1672
|
-
|
|
1673
|
-
])) :
|
|
1674
|
-
|
|
1675
|
-
e.$slots.append || o.appendIcon ? (
|
|
1676
|
-
o.appendIcon ? (
|
|
1677
|
-
|
|
1678
|
-
])) :
|
|
1679
|
-
|
|
1680
|
-
])) :
|
|
1735
|
+
e.$slots.prepend || o.prependIcon ? (c(), m("div", yo, [
|
|
1736
|
+
o.prependIcon ? (c(), m("span", bo, [
|
|
1737
|
+
Q(b(ne), ae(fe(o.prependIcon)), null, 16)
|
|
1738
|
+
])) : q("", !0),
|
|
1739
|
+
h(e.$slots, "prepend")
|
|
1740
|
+
])) : q("", !0),
|
|
1741
|
+
h(e.$slots, "default"),
|
|
1742
|
+
e.$slots.append || o.appendIcon ? (c(), m("div", go, [
|
|
1743
|
+
o.appendIcon ? (c(), m("span", _o, [
|
|
1744
|
+
Q(b(ne), ae(fe(o.appendIcon)), null, 16)
|
|
1745
|
+
])) : q("", !0),
|
|
1746
|
+
h(e.$slots, "append")
|
|
1747
|
+
])) : q("", !0)
|
|
1681
1748
|
]),
|
|
1682
1749
|
_: 2
|
|
1683
1750
|
}, [
|
|
1684
1751
|
e.$slots.extras ? {
|
|
1685
1752
|
name: "extras",
|
|
1686
1753
|
fn: k(() => [
|
|
1687
|
-
|
|
1754
|
+
h(e.$slots, "extras")
|
|
1688
1755
|
]),
|
|
1689
1756
|
key: "0"
|
|
1690
1757
|
} : void 0
|
|
1691
1758
|
]), 1032, ["id", "class", "label", "required", "size"]));
|
|
1692
1759
|
}
|
|
1693
|
-
}),
|
|
1760
|
+
}), Ho = V(ko), wo = /* @__PURE__ */ L({
|
|
1694
1761
|
__name: "QLineLoader",
|
|
1695
1762
|
props: {
|
|
1696
1763
|
class: { default: void 0 }
|
|
1697
1764
|
},
|
|
1698
1765
|
setup(t) {
|
|
1699
1766
|
const o = t;
|
|
1700
|
-
return (e, n) => (
|
|
1701
|
-
class:
|
|
1767
|
+
return (e, n) => (c(), m("div", {
|
|
1768
|
+
class: D(["q-line-loader", o.class])
|
|
1702
1769
|
}, null, 2));
|
|
1703
1770
|
}
|
|
1704
|
-
}),
|
|
1771
|
+
}), Ko = V(wo), $o = {
|
|
1705
1772
|
key: 0,
|
|
1706
1773
|
class: "q-popover__header"
|
|
1707
|
-
},
|
|
1774
|
+
}, qo = {
|
|
1708
1775
|
key: 1,
|
|
1709
1776
|
class: "q-popover__body"
|
|
1710
|
-
},
|
|
1777
|
+
}, Io = ["innerHTML"], xo = { key: 1 }, Lo = /* @__PURE__ */ L({
|
|
1711
1778
|
inheritAttrs: !1,
|
|
1712
1779
|
__name: "QPopover",
|
|
1713
|
-
props: /* @__PURE__ */
|
|
1780
|
+
props: /* @__PURE__ */ X({
|
|
1714
1781
|
anchor: {},
|
|
1715
1782
|
arrow: { type: Boolean, default: !0 },
|
|
1716
1783
|
attach: { default: "body" },
|
|
@@ -1718,15 +1785,15 @@ const Rt = ["role"], Ut = {
|
|
|
1718
1785
|
html: { type: Boolean, default: !0 },
|
|
1719
1786
|
placement: { default: "right" },
|
|
1720
1787
|
text: {},
|
|
1721
|
-
title: {}
|
|
1788
|
+
title: { default: "" }
|
|
1722
1789
|
}, {
|
|
1723
1790
|
modelValue: { type: Boolean },
|
|
1724
1791
|
modelModifiers: {}
|
|
1725
1792
|
}),
|
|
1726
1793
|
emits: ["update:modelValue"],
|
|
1727
1794
|
setup(t) {
|
|
1728
|
-
const o = t, e =
|
|
1729
|
-
return (n, l) => (
|
|
1795
|
+
const o = t, e = te(t, "modelValue");
|
|
1796
|
+
return (n, l) => (c(), E(b($e), {
|
|
1730
1797
|
"model-value": e.value,
|
|
1731
1798
|
class: "q-popover",
|
|
1732
1799
|
trigger: "click",
|
|
@@ -1737,42 +1804,42 @@ const Rt = ["role"], Ut = {
|
|
|
1737
1804
|
placement: o.placement
|
|
1738
1805
|
}, {
|
|
1739
1806
|
default: k(() => [
|
|
1740
|
-
o.title || n.$slots.header ? (
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
])) :
|
|
1744
|
-
o.text || n.$slots.body ? (
|
|
1745
|
-
o.html ? (
|
|
1807
|
+
o.title || n.$slots.header ? (c(), m("h3", $o, [
|
|
1808
|
+
me(R(o.title) + " ", 1),
|
|
1809
|
+
h(n.$slots, "header")
|
|
1810
|
+
])) : q("", !0),
|
|
1811
|
+
o.text || n.$slots.body ? (c(), m("div", qo, [
|
|
1812
|
+
o.html ? (c(), m("span", {
|
|
1746
1813
|
key: 0,
|
|
1747
1814
|
innerHTML: o.text
|
|
1748
|
-
}, null, 8,
|
|
1749
|
-
|
|
1750
|
-
])) :
|
|
1815
|
+
}, null, 8, Io)) : (c(), m("span", xo, R(o.text), 1)),
|
|
1816
|
+
h(n.$slots, "body")
|
|
1817
|
+
])) : q("", !0)
|
|
1751
1818
|
]),
|
|
1752
1819
|
_: 3
|
|
1753
1820
|
}, 8, ["model-value", "anchor", "arrow", "attach", "disabled", "placement"]));
|
|
1754
1821
|
}
|
|
1755
|
-
}),
|
|
1822
|
+
}), Go = V(Lo), So = {
|
|
1756
1823
|
key: 0,
|
|
1757
1824
|
class: "q-select__value"
|
|
1758
|
-
},
|
|
1825
|
+
}, Bo = {
|
|
1759
1826
|
key: 1,
|
|
1760
1827
|
class: "q-select__placeholder"
|
|
1761
|
-
},
|
|
1828
|
+
}, Vo = ["data-key"], Co = {
|
|
1762
1829
|
key: 0,
|
|
1763
1830
|
class: "q-select__loader"
|
|
1764
|
-
},
|
|
1831
|
+
}, To = {
|
|
1765
1832
|
placeholder: "Choose..."
|
|
1766
|
-
},
|
|
1833
|
+
}, Eo = {
|
|
1767
1834
|
chevron: {
|
|
1768
1835
|
icon: "chevron-down"
|
|
1769
1836
|
},
|
|
1770
1837
|
clear: {
|
|
1771
1838
|
icon: "close"
|
|
1772
1839
|
}
|
|
1773
|
-
},
|
|
1840
|
+
}, Do = /* @__PURE__ */ L({
|
|
1774
1841
|
__name: "QSelect",
|
|
1775
|
-
props: /* @__PURE__ */
|
|
1842
|
+
props: /* @__PURE__ */ X({
|
|
1776
1843
|
id: { default: void 0 },
|
|
1777
1844
|
label: { default: "" },
|
|
1778
1845
|
clearable: { type: Boolean },
|
|
@@ -1780,14 +1847,14 @@ const Rt = ["role"], Ut = {
|
|
|
1780
1847
|
disabled: { type: Boolean },
|
|
1781
1848
|
required: { type: Boolean },
|
|
1782
1849
|
loading: { type: Boolean },
|
|
1783
|
-
icons: { default: () =>
|
|
1850
|
+
icons: { default: () => Eo },
|
|
1784
1851
|
items: {},
|
|
1785
1852
|
groups: { default: () => [] },
|
|
1786
1853
|
itemValue: { default: "key" },
|
|
1787
1854
|
itemLabel: { default: "label" },
|
|
1788
1855
|
emptyValue: { type: [String, Number, Boolean, Symbol], default: void 0 },
|
|
1789
1856
|
size: { default: void 0 },
|
|
1790
|
-
texts: { default: () =>
|
|
1857
|
+
texts: { default: () => To },
|
|
1791
1858
|
class: { default: "" }
|
|
1792
1859
|
}, {
|
|
1793
1860
|
modelValue: {
|
|
@@ -1795,92 +1862,89 @@ const Rt = ["role"], Ut = {
|
|
|
1795
1862
|
},
|
|
1796
1863
|
modelModifiers: {}
|
|
1797
1864
|
}),
|
|
1798
|
-
emits: /* @__PURE__ */
|
|
1865
|
+
emits: /* @__PURE__ */ X(["before-show", "before-hide", "show", "hide"], ["update:modelValue"]),
|
|
1799
1866
|
setup(t, { emit: o }) {
|
|
1800
|
-
const e = t, n = o, l =
|
|
1867
|
+
const e = t, n = o, l = te(t, "modelValue"), s = B(!1), i = B(""), a = B(null), u = B(null), v = B(null), $ = w(() => x.value === void 0), x = w(
|
|
1801
1868
|
() => {
|
|
1802
1869
|
var d;
|
|
1803
|
-
return (d = e.items) == null ? void 0 : d.find((
|
|
1870
|
+
return (d = e.items) == null ? void 0 : d.find((p) => p[e.itemValue] === l.value);
|
|
1804
1871
|
}
|
|
1805
|
-
), U = w(
|
|
1806
|
-
() => y.value ? y.value[e.itemLabel] : ""
|
|
1807
1872
|
), z = w(
|
|
1873
|
+
() => x.value ? x.value[e.itemLabel] : ""
|
|
1874
|
+
), C = w(
|
|
1808
1875
|
() => e.clearable && !e.readonly && !e.disabled && !e.loading
|
|
1809
1876
|
);
|
|
1810
|
-
function
|
|
1811
|
-
l.value = d,
|
|
1812
|
-
}
|
|
1813
|
-
function V() {
|
|
1814
|
-
z.value && C(e.emptyValue);
|
|
1877
|
+
function I(d) {
|
|
1878
|
+
l.value = d, H();
|
|
1815
1879
|
}
|
|
1816
|
-
function
|
|
1817
|
-
|
|
1880
|
+
function S() {
|
|
1881
|
+
C.value && I(e.emptyValue);
|
|
1818
1882
|
}
|
|
1819
|
-
function
|
|
1820
|
-
var
|
|
1821
|
-
!((
|
|
1883
|
+
function K(d) {
|
|
1884
|
+
var p, F, ee;
|
|
1885
|
+
!((p = v.value) != null && p.contains(d.relatedTarget)) && !((ee = (F = a.value) == null ? void 0 : F.fieldRef) != null && ee.contains(d.relatedTarget)) && H();
|
|
1822
1886
|
}
|
|
1823
|
-
function
|
|
1887
|
+
function Y() {
|
|
1824
1888
|
s.value || (n("before-show"), s.value = !0);
|
|
1825
1889
|
}
|
|
1826
|
-
function
|
|
1890
|
+
function H() {
|
|
1827
1891
|
s.value && (n("before-hide"), s.value = !1);
|
|
1828
1892
|
}
|
|
1829
|
-
function
|
|
1830
|
-
s.value ?
|
|
1893
|
+
function M() {
|
|
1894
|
+
e.readonly || e.disabled || (s.value ? H() : Y());
|
|
1831
1895
|
}
|
|
1832
|
-
let
|
|
1833
|
-
function
|
|
1896
|
+
let Z;
|
|
1897
|
+
function U(d) {
|
|
1834
1898
|
if (!(!d.key || e.readonly || e.disabled)) {
|
|
1835
|
-
if (window.clearTimeout(
|
|
1836
|
-
|
|
1837
|
-
for (let
|
|
1838
|
-
if (e.items[
|
|
1839
|
-
|
|
1899
|
+
if (window.clearTimeout(Z), ["Enter", " ", "ArrowDown", "ArrowUp", "Home", "End"].includes(d.key) && (d.preventDefault(), d.stopPropagation()), ["Enter", " "].includes(d.key) && (s.value = !0), ["Escape", "Tab"].includes(d.key) && (s.value ? s.value = !1 : C.value && d.key === "Escape" && S()), d.key === "Delete" && e.clearable && S(), /^[a-z]$/i.test(d.key)) {
|
|
1900
|
+
i.value += d.key.toLowerCase();
|
|
1901
|
+
for (let p = 0; p < e.items.length; p++)
|
|
1902
|
+
if (e.items[p][e.itemLabel].toLowerCase().startsWith(i.value)) {
|
|
1903
|
+
g(p);
|
|
1840
1904
|
break;
|
|
1841
1905
|
}
|
|
1842
1906
|
}
|
|
1843
|
-
|
|
1844
|
-
|
|
1907
|
+
Z = window.setTimeout(function() {
|
|
1908
|
+
i.value = "";
|
|
1845
1909
|
}, 500);
|
|
1846
1910
|
}
|
|
1847
1911
|
}
|
|
1848
|
-
function
|
|
1912
|
+
function J() {
|
|
1849
1913
|
var d;
|
|
1850
|
-
e.loading ? (d =
|
|
1914
|
+
e.loading ? (d = v.value) == null || d.focus() : f(), n("show");
|
|
1851
1915
|
}
|
|
1852
|
-
function
|
|
1853
|
-
|
|
1916
|
+
function A() {
|
|
1917
|
+
G(), n("hide");
|
|
1854
1918
|
}
|
|
1855
|
-
function
|
|
1856
|
-
var d,
|
|
1857
|
-
(
|
|
1919
|
+
function G() {
|
|
1920
|
+
var d, p;
|
|
1921
|
+
(p = (d = a.value) == null ? void 0 : d.fieldRef) == null || p.focus();
|
|
1858
1922
|
}
|
|
1859
|
-
function
|
|
1923
|
+
function f() {
|
|
1860
1924
|
var d;
|
|
1861
|
-
(d =
|
|
1925
|
+
(d = u.value) == null || d.$el.focus();
|
|
1862
1926
|
}
|
|
1863
|
-
function
|
|
1864
|
-
var
|
|
1865
|
-
(
|
|
1927
|
+
function g(d) {
|
|
1928
|
+
var p;
|
|
1929
|
+
(p = u.value) == null || p.focusItem(d);
|
|
1866
1930
|
}
|
|
1867
|
-
return
|
|
1931
|
+
return W(
|
|
1868
1932
|
() => e.loading,
|
|
1869
1933
|
(d) => {
|
|
1870
|
-
!d && s.value &&
|
|
1934
|
+
!d && s.value && j(f);
|
|
1871
1935
|
}
|
|
1872
|
-
), (d,
|
|
1873
|
-
var
|
|
1874
|
-
return
|
|
1875
|
-
|
|
1936
|
+
), (d, p) => {
|
|
1937
|
+
var F, ee;
|
|
1938
|
+
return c(), m(le, null, [
|
|
1939
|
+
Q(b(Be), {
|
|
1876
1940
|
id: e.id,
|
|
1877
1941
|
label: e.label,
|
|
1878
1942
|
required: e.required,
|
|
1879
1943
|
ref_key: "triggerEl",
|
|
1880
|
-
ref:
|
|
1944
|
+
ref: a,
|
|
1881
1945
|
role: "combobox",
|
|
1882
1946
|
tabindex: e.disabled ? -1 : 0,
|
|
1883
|
-
class:
|
|
1947
|
+
class: D([
|
|
1884
1948
|
"q-select",
|
|
1885
1949
|
{
|
|
1886
1950
|
"q-select--readonly": e.readonly,
|
|
@@ -1895,55 +1959,55 @@ const Rt = ["role"], Ut = {
|
|
|
1895
1959
|
"aria-expanded": s.value,
|
|
1896
1960
|
"aria-haspopup": "listbox",
|
|
1897
1961
|
size: e.size,
|
|
1898
|
-
onClick:
|
|
1899
|
-
onKeydown:
|
|
1900
|
-
},
|
|
1962
|
+
onClick: M,
|
|
1963
|
+
onKeydown: ue(U, ["stop"])
|
|
1964
|
+
}, we({
|
|
1901
1965
|
append: k(() => [
|
|
1902
|
-
|
|
1903
|
-
|
|
1966
|
+
h(d.$slots, "append"),
|
|
1967
|
+
C.value && l.value ? (c(), E(b(he), {
|
|
1904
1968
|
key: 0,
|
|
1905
1969
|
class: "q-select__clear",
|
|
1906
1970
|
"b-style": "plain",
|
|
1907
1971
|
borderless: "",
|
|
1908
1972
|
tabindex: "-1",
|
|
1909
|
-
onClick:
|
|
1973
|
+
onClick: S
|
|
1910
1974
|
}, {
|
|
1911
1975
|
default: k(() => [
|
|
1912
|
-
|
|
1976
|
+
Q(b(ne), ae(fe(e.icons.clear)), null, 16)
|
|
1913
1977
|
]),
|
|
1914
1978
|
_: 1
|
|
1915
|
-
})) :
|
|
1916
|
-
e.readonly ?
|
|
1979
|
+
})) : q("", !0),
|
|
1980
|
+
e.readonly ? q("", !0) : (c(), E(b(he), {
|
|
1917
1981
|
key: 1,
|
|
1918
1982
|
class: "q-select__chevron",
|
|
1919
1983
|
"b-style": "plain",
|
|
1920
1984
|
borderless: "",
|
|
1921
1985
|
tabindex: "-1",
|
|
1922
1986
|
disabled: e.disabled,
|
|
1923
|
-
onClick:
|
|
1987
|
+
onClick: M
|
|
1924
1988
|
}, {
|
|
1925
1989
|
default: k(() => [
|
|
1926
|
-
|
|
1990
|
+
Q(b(ne), ae(fe(e.icons.chevron)), null, 16)
|
|
1927
1991
|
]),
|
|
1928
1992
|
_: 1
|
|
1929
1993
|
}, 8, ["disabled"]))
|
|
1930
1994
|
]),
|
|
1931
1995
|
default: k(() => [
|
|
1932
|
-
|
|
1933
|
-
!e.readonly && !e.disabled ? (
|
|
1934
|
-
|
|
1935
|
-
], 64)) :
|
|
1936
|
-
])) : (
|
|
1996
|
+
$.value ? (c(), m("span", Bo, [
|
|
1997
|
+
!e.readonly && !e.disabled ? (c(), m(le, { key: 0 }, [
|
|
1998
|
+
me(R(d.texts.placeholder), 1)
|
|
1999
|
+
], 64)) : q("", !0)
|
|
2000
|
+
])) : (c(), m("span", So, R(z.value), 1))
|
|
1937
2001
|
]),
|
|
1938
2002
|
_: 2
|
|
1939
2003
|
}, [
|
|
1940
|
-
(
|
|
2004
|
+
(F = x.value) != null && F.icon || d.$slots.prepend ? {
|
|
1941
2005
|
name: "prepend",
|
|
1942
2006
|
fn: k(() => {
|
|
1943
|
-
var
|
|
2007
|
+
var P, oe;
|
|
1944
2008
|
return [
|
|
1945
|
-
|
|
1946
|
-
(
|
|
2009
|
+
h(d.$slots, "prepend"),
|
|
2010
|
+
(P = x.value) != null && P.icon ? (c(), E(b(ne), ae(ce({ key: 0 }, (oe = x.value) == null ? void 0 : oe.icon)), null, 16)) : q("", !0)
|
|
1947
2011
|
];
|
|
1948
2012
|
}),
|
|
1949
2013
|
key: "0"
|
|
@@ -1951,82 +2015,82 @@ const Rt = ["role"], Ut = {
|
|
|
1951
2015
|
d.$slots.extras ? {
|
|
1952
2016
|
name: "extras",
|
|
1953
2017
|
fn: k(() => [
|
|
1954
|
-
|
|
2018
|
+
h(d.$slots, "extras")
|
|
1955
2019
|
]),
|
|
1956
2020
|
key: "1"
|
|
1957
2021
|
} : void 0
|
|
1958
2022
|
]), 1032, ["id", "label", "required", "tabindex", "class", "readonly", "disabled", "data-loading", "aria-expanded", "size"]),
|
|
1959
|
-
|
|
2023
|
+
Q(b($e), {
|
|
1960
2024
|
modelValue: s.value,
|
|
1961
|
-
"onUpdate:modelValue":
|
|
2025
|
+
"onUpdate:modelValue": p[1] || (p[1] = (P) => s.value = P),
|
|
1962
2026
|
spy: "",
|
|
1963
2027
|
trigger: "manual",
|
|
1964
|
-
placement: "bottom",
|
|
2028
|
+
placement: "bottom-start",
|
|
1965
2029
|
width: "anchor",
|
|
1966
2030
|
"scroll-lock": "",
|
|
1967
|
-
anchor: (
|
|
2031
|
+
anchor: (ee = a.value) == null ? void 0 : ee.$el,
|
|
1968
2032
|
offset: 2,
|
|
1969
|
-
onEnter:
|
|
1970
|
-
onLeave:
|
|
2033
|
+
onEnter: J,
|
|
2034
|
+
onLeave: A
|
|
1971
2035
|
}, {
|
|
1972
2036
|
default: k(() => [
|
|
1973
|
-
|
|
2037
|
+
se("div", {
|
|
1974
2038
|
ref_key: "contentRef",
|
|
1975
|
-
ref:
|
|
2039
|
+
ref: v,
|
|
1976
2040
|
"data-testid": "combobox-dropdown",
|
|
1977
2041
|
"data-key": e.id,
|
|
1978
2042
|
class: "q-select__body",
|
|
1979
2043
|
tabindex: "-1",
|
|
1980
|
-
onFocusout:
|
|
1981
|
-
onKeydown:
|
|
2044
|
+
onFocusout: K,
|
|
2045
|
+
onKeydown: ue(U, ["stop"])
|
|
1982
2046
|
}, [
|
|
1983
|
-
|
|
1984
|
-
e.loading ? (
|
|
1985
|
-
|
|
1986
|
-
])) : (
|
|
2047
|
+
h(d.$slots, "body.prepend"),
|
|
2048
|
+
e.loading ? (c(), m("div", Co, [
|
|
2049
|
+
Q(b(Se), { size: 24 })
|
|
2050
|
+
])) : (c(), E(b(Re), {
|
|
1987
2051
|
key: 1,
|
|
1988
2052
|
ref_key: "listRef",
|
|
1989
|
-
ref:
|
|
2053
|
+
ref: u,
|
|
1990
2054
|
class: "q-select__items",
|
|
1991
2055
|
modelValue: l.value,
|
|
1992
2056
|
"onUpdate:modelValue": [
|
|
1993
|
-
|
|
1994
|
-
|
|
2057
|
+
p[0] || (p[0] = (P) => l.value = P),
|
|
2058
|
+
I
|
|
1995
2059
|
],
|
|
1996
2060
|
items: e.items,
|
|
1997
2061
|
groups: d.groups,
|
|
1998
2062
|
"item-label": e.itemLabel,
|
|
1999
2063
|
"item-value": e.itemValue
|
|
2000
2064
|
}, {
|
|
2001
|
-
item: k(({ item:
|
|
2002
|
-
|
|
2065
|
+
item: k(({ item: P }) => [
|
|
2066
|
+
h(d.$slots, "item", { item: P })
|
|
2003
2067
|
]),
|
|
2004
2068
|
_: 3
|
|
2005
2069
|
}, 8, ["modelValue", "items", "groups", "item-label", "item-value"])),
|
|
2006
|
-
|
|
2007
|
-
], 40,
|
|
2070
|
+
h(d.$slots, "body.append")
|
|
2071
|
+
], 40, Vo)
|
|
2008
2072
|
]),
|
|
2009
2073
|
_: 3
|
|
2010
2074
|
}, 8, ["modelValue", "anchor"])
|
|
2011
2075
|
], 64);
|
|
2012
2076
|
};
|
|
2013
2077
|
}
|
|
2014
|
-
}),
|
|
2078
|
+
}), Wo = V(Do), Ao = /* @__PURE__ */ L({
|
|
2015
2079
|
__name: "QThemeProvider",
|
|
2016
2080
|
props: {
|
|
2017
2081
|
theme: {}
|
|
2018
2082
|
},
|
|
2019
2083
|
setup(t) {
|
|
2020
2084
|
const o = t;
|
|
2021
|
-
return (e, n) => (
|
|
2022
|
-
class:
|
|
2085
|
+
return (e, n) => (c(), m("div", {
|
|
2086
|
+
class: D(["q-theme-provider", `q-theme--${o.theme}`])
|
|
2023
2087
|
}, [
|
|
2024
|
-
|
|
2088
|
+
h(e.$slots, "default")
|
|
2025
2089
|
], 2));
|
|
2026
2090
|
}
|
|
2027
|
-
}),
|
|
2091
|
+
}), jo = V(Ao), zo = ["innerHTML"], Qo = { key: 1 }, Mo = /* @__PURE__ */ L({
|
|
2028
2092
|
__name: "QTooltip",
|
|
2029
|
-
props: /* @__PURE__ */
|
|
2093
|
+
props: /* @__PURE__ */ X({
|
|
2030
2094
|
id: { default: void 0 },
|
|
2031
2095
|
anchor: {},
|
|
2032
2096
|
appearance: { default: "inverted" },
|
|
@@ -2045,62 +2109,63 @@ const Rt = ["role"], Ut = {
|
|
|
2045
2109
|
}),
|
|
2046
2110
|
emits: ["update:modelValue"],
|
|
2047
2111
|
setup(t) {
|
|
2048
|
-
const o = t, e =
|
|
2049
|
-
return (l, s) => (
|
|
2050
|
-
|
|
2051
|
-
props: { "aria-describedby":
|
|
2112
|
+
const o = t, e = te(t, "modelValue"), n = ye(o.id);
|
|
2113
|
+
return (l, s) => (c(), m(le, null, [
|
|
2114
|
+
h(l.$slots, "anchor", {
|
|
2115
|
+
props: { "aria-describedby": b(n) }
|
|
2052
2116
|
}),
|
|
2053
|
-
|
|
2117
|
+
Q(b($e), {
|
|
2054
2118
|
"model-value": e.value,
|
|
2055
2119
|
anchor: o.anchor,
|
|
2056
2120
|
role: "tooltip",
|
|
2057
|
-
|
|
2121
|
+
"non-modal": "",
|
|
2122
|
+
id: b(n),
|
|
2058
2123
|
appearance: o.appearance,
|
|
2059
2124
|
arrow: o.arrow,
|
|
2060
2125
|
attach: o.attach,
|
|
2061
|
-
class:
|
|
2126
|
+
class: D(["q-tooltip", o.class]),
|
|
2062
2127
|
delay: o.delay,
|
|
2063
2128
|
disabled: o.disabled,
|
|
2064
2129
|
placement: o.placement,
|
|
2065
2130
|
trigger: o.trigger
|
|
2066
2131
|
}, {
|
|
2067
2132
|
default: k(() => [
|
|
2068
|
-
o.html ? (
|
|
2133
|
+
o.html ? (c(), m("span", {
|
|
2069
2134
|
key: 0,
|
|
2070
2135
|
innerHTML: o.text
|
|
2071
|
-
}, null, 8,
|
|
2136
|
+
}, null, 8, zo)) : (c(), m("span", Qo, R(o.text), 1))
|
|
2072
2137
|
]),
|
|
2073
2138
|
_: 1
|
|
2074
2139
|
}, 8, ["model-value", "anchor", "id", "appearance", "arrow", "attach", "class", "delay", "disabled", "placement", "trigger"])
|
|
2075
2140
|
], 64));
|
|
2076
2141
|
}
|
|
2077
|
-
}),
|
|
2142
|
+
}), Ro = V(Mo);
|
|
2078
2143
|
export {
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2144
|
+
he as QButton,
|
|
2145
|
+
bt as QButtonGroup,
|
|
2146
|
+
Po as QButtonToggle,
|
|
2147
|
+
No as QCombobox,
|
|
2148
|
+
Be as QField,
|
|
2149
|
+
ne as QIcon,
|
|
2150
|
+
St as QIconFont,
|
|
2151
|
+
Bt as QIconImg,
|
|
2152
|
+
Vt as QIconSvg,
|
|
2153
|
+
Ho as QInputGroup,
|
|
2154
|
+
Ko as QLineLoader,
|
|
2090
2155
|
Re as QList,
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2156
|
+
Ot as QListItem,
|
|
2157
|
+
Ut as QListItemGroup,
|
|
2158
|
+
$e as QOverlay,
|
|
2159
|
+
Go as QPopover,
|
|
2160
|
+
Wo as QSelect,
|
|
2161
|
+
Se as QSpinnerLoader,
|
|
2162
|
+
uo as QTextField,
|
|
2163
|
+
jo as QThemeProvider,
|
|
2164
|
+
Ro as QTooltip,
|
|
2165
|
+
Uo as createFramework,
|
|
2166
|
+
lt as defaultDarkColorScheme,
|
|
2167
|
+
Qe as defaultLightColorScheme,
|
|
2168
|
+
Oo as provideTheme,
|
|
2169
|
+
nt as useTheme
|
|
2105
2170
|
};
|
|
2106
2171
|
//# sourceMappingURL=ui.esm.js.map
|