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