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