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