@quidgest/ui 0.5.14 → 0.5.16
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 +139 -55
- package/dist/ui.esm.js +495 -474
- package/dist/ui.esm.js.map +1 -1
- package/dist/ui.js +4 -4
- package/dist/ui.js.map +1 -1
- package/dist/ui.min.js +53 -51
- package/dist/ui.min.js.map +1 -1
- package/dist/ui.scss +1 -1
- package/package.json +1 -1
package/dist/ui.esm.js
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
import { getCurrentInstance as
|
|
2
|
-
function
|
|
1
|
+
import { getCurrentInstance as he, computed as v, ref as I, provide as Le, inject as ye, watch as C, defineComponent as k, openBlock as r, createElementBlock as f, normalizeStyle as K, createElementVNode as N, normalizeClass as V, withModifiers as R, createVNode as H, unref as g, createCommentVNode as b, Fragment as O, createTextVNode as X, toDisplayString as A, renderSlot as x, toRef as ee, createBlock as $, withCtx as T, renderList as ne, resolveDynamicComponent as ve, h as re, normalizeProps as ge, mergeProps as Z, reactive as xe, onBeforeUnmount as qe, onMounted as Ie, Teleport as De, Transition as Te, nextTick as ie, useAttrs as Ee, createSlots as Ce, guardReactiveProps as Ve, withDirectives as Ae } from "vue";
|
|
2
|
+
function oe(t) {
|
|
3
3
|
return t == null ? !0 : typeof t == "string" || Array.isArray(t) ? t.length === 0 : typeof t == "object" ? Object.keys(t).length === 0 : !1;
|
|
4
4
|
}
|
|
5
|
-
function
|
|
5
|
+
function ce(t) {
|
|
6
6
|
return t !== null && typeof t == "object" && !Array.isArray(t);
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function be(t = {}, n = {}) {
|
|
9
9
|
const e = {};
|
|
10
10
|
for (const o in t)
|
|
11
11
|
e[o] = t[o];
|
|
12
12
|
for (const o in n) {
|
|
13
|
-
const
|
|
14
|
-
if (
|
|
15
|
-
e[o] =
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
const s = t[o], a = n[o];
|
|
14
|
+
if (ce(s) && ce(a)) {
|
|
15
|
+
e[o] = be(
|
|
16
|
+
s,
|
|
17
|
+
a
|
|
18
18
|
);
|
|
19
19
|
continue;
|
|
20
20
|
}
|
|
21
|
-
e[o] =
|
|
21
|
+
e[o] = a;
|
|
22
22
|
}
|
|
23
23
|
return e;
|
|
24
24
|
}
|
|
25
|
-
const
|
|
26
|
-
function
|
|
27
|
-
const t =
|
|
25
|
+
const se = "q-defaults";
|
|
26
|
+
function ze() {
|
|
27
|
+
const t = he();
|
|
28
28
|
if (!t)
|
|
29
29
|
throw new Error("[Quidgest UI] useDefaults must be called from inside a setup function");
|
|
30
30
|
const n = t.type.name ?? t.type.__name;
|
|
31
31
|
if (!n)
|
|
32
32
|
throw new Error("[Quidgest UI] Could not determine component name");
|
|
33
|
-
const e =
|
|
34
|
-
return
|
|
33
|
+
const e = _e();
|
|
34
|
+
return v(() => {
|
|
35
35
|
var o;
|
|
36
36
|
return (o = e.value) == null ? void 0 : o[n];
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
if (
|
|
39
|
+
function Qe(t) {
|
|
40
|
+
if (oe(t))
|
|
41
41
|
return;
|
|
42
|
-
const n =
|
|
43
|
-
|
|
42
|
+
const n = _e(), e = I(t), o = v(() => oe(e.value) ? n.value : be(n.value, e.value));
|
|
43
|
+
Le(se, o);
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
const t =
|
|
45
|
+
function _e() {
|
|
46
|
+
const t = ye(se, void 0);
|
|
47
47
|
if (!t)
|
|
48
48
|
throw new Error("[Quidgest UI] Could not find defaults instance");
|
|
49
49
|
return t;
|
|
50
50
|
}
|
|
51
|
-
const
|
|
51
|
+
const ue = {
|
|
52
52
|
primary: "#00a1f8",
|
|
53
53
|
primaryLight: "#e5f6ff",
|
|
54
54
|
primaryDark: "#0079ba",
|
|
@@ -78,7 +78,7 @@ const ce = {
|
|
|
78
78
|
onWarning: "#fff",
|
|
79
79
|
onDanger: "#fff",
|
|
80
80
|
onInfo: "#fff"
|
|
81
|
-
},
|
|
81
|
+
}, Oe = {
|
|
82
82
|
primary: "#018BD2",
|
|
83
83
|
primaryLight: "#cce7f6",
|
|
84
84
|
primaryDark: "#006fac",
|
|
@@ -109,50 +109,50 @@ const ce = {
|
|
|
109
109
|
onDanger: "#fff",
|
|
110
110
|
onInfo: "#fff"
|
|
111
111
|
};
|
|
112
|
-
function
|
|
112
|
+
function ke(t) {
|
|
113
113
|
if (!/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/.test(t))
|
|
114
114
|
throw new Error("Invalid color format");
|
|
115
115
|
t.length === 4 && (t = "#" + t[1] + t[1] + t[2] + t[2] + t[3] + t[3]);
|
|
116
116
|
const n = parseInt(t.slice(1, 3), 16), e = parseInt(t.slice(3, 5), 16), o = parseInt(t.slice(5, 7), 16);
|
|
117
117
|
return { r: n, g: e, b: o };
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function Fe(t, n) {
|
|
120
120
|
if (n < 0 || n > 100)
|
|
121
121
|
throw new Error("Amount must be in the range [0, 100]");
|
|
122
122
|
if (n === 0)
|
|
123
123
|
return t;
|
|
124
|
-
const e =
|
|
125
|
-
return e.l = e.l + o * (100 - e.l),
|
|
124
|
+
const e = we(t), o = n / 100;
|
|
125
|
+
return e.l = e.l + o * (100 - e.l), $e(e);
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function Me(t, n) {
|
|
128
128
|
if (n < 0 || n > 100)
|
|
129
129
|
throw new Error("Amount must be in the range [0, 100]");
|
|
130
130
|
if (n === 0)
|
|
131
131
|
return t;
|
|
132
|
-
const e =
|
|
133
|
-
return e.l = e.l - o * e.l,
|
|
132
|
+
const e = we(t), o = n / 100;
|
|
133
|
+
return e.l = e.l - o * e.l, $e(e);
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function de(t) {
|
|
136
136
|
const n = t.r.toString(16).padStart(2, "0"), e = t.g.toString(16).padStart(2, "0"), o = t.b.toString(16).padStart(2, "0");
|
|
137
137
|
return `#${n}${e}${o}`;
|
|
138
138
|
}
|
|
139
|
-
function
|
|
140
|
-
const n = t.r / 255, e = t.g / 255, o = t.b / 255,
|
|
139
|
+
function we(t) {
|
|
140
|
+
const n = t.r / 255, e = t.g / 255, o = t.b / 255, s = Math.max(n, e, o), a = Math.min(n, e, o);
|
|
141
141
|
let l = 0, c;
|
|
142
|
-
const i = (
|
|
143
|
-
if (
|
|
142
|
+
const i = (s + a) / 2;
|
|
143
|
+
if (s === a)
|
|
144
144
|
l = c = 0;
|
|
145
145
|
else {
|
|
146
|
-
const
|
|
147
|
-
switch (c = i > 0.5 ?
|
|
146
|
+
const h = s - a;
|
|
147
|
+
switch (c = i > 0.5 ? h / (2 - s - a) : h / (s + a), s) {
|
|
148
148
|
case n:
|
|
149
|
-
l = (e - o) /
|
|
149
|
+
l = (e - o) / h + (e < o ? 6 : 0);
|
|
150
150
|
break;
|
|
151
151
|
case e:
|
|
152
|
-
l = (o - n) /
|
|
152
|
+
l = (o - n) / h + 2;
|
|
153
153
|
break;
|
|
154
154
|
case o:
|
|
155
|
-
l = (n - e) /
|
|
155
|
+
l = (n - e) / h + 4;
|
|
156
156
|
break;
|
|
157
157
|
}
|
|
158
158
|
l /= 6;
|
|
@@ -163,54 +163,54 @@ function ke(t) {
|
|
|
163
163
|
l: Math.round(i * 100)
|
|
164
164
|
};
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function $e(t) {
|
|
167
167
|
const n = t.h / 360, e = t.s / 100, o = t.l / 100;
|
|
168
|
-
let
|
|
168
|
+
let s, a, l;
|
|
169
169
|
if (e === 0)
|
|
170
|
-
|
|
170
|
+
s = a = l = o;
|
|
171
171
|
else {
|
|
172
172
|
const c = o < 0.5 ? o * (1 + e) : o + e - o * e, i = 2 * o - c;
|
|
173
|
-
|
|
173
|
+
s = te(i, c, n + 1 / 3), a = te(i, c, n), l = te(i, c, n - 1 / 3);
|
|
174
174
|
}
|
|
175
175
|
return {
|
|
176
|
-
r: Math.round(
|
|
177
|
-
g: Math.round(
|
|
176
|
+
r: Math.round(s * 255),
|
|
177
|
+
g: Math.round(a * 255),
|
|
178
178
|
b: Math.round(l * 255)
|
|
179
179
|
};
|
|
180
180
|
}
|
|
181
|
-
function
|
|
181
|
+
function te(t, n, e) {
|
|
182
182
|
return e < 0 && (e += 1), e > 1 && (e -= 1), e < 1 / 6 ? t + (n - t) * 6 * e : e < 1 / 2 ? n : e < 2 / 3 ? t + (n - t) * (2 / 3 - e) * 6 : t;
|
|
183
183
|
}
|
|
184
184
|
const j = "q-theme";
|
|
185
|
-
function
|
|
186
|
-
const t =
|
|
185
|
+
function tn() {
|
|
186
|
+
const t = ye(j);
|
|
187
187
|
if (!t)
|
|
188
188
|
throw new Error("[Quidgest UI] Could not find theme instance");
|
|
189
189
|
return t;
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function Re(t, n) {
|
|
192
192
|
let e = null;
|
|
193
193
|
if (n)
|
|
194
194
|
for (const o of n.themes) {
|
|
195
|
-
const
|
|
195
|
+
const s = o.mode === "light" ? ue : Oe;
|
|
196
196
|
if (o.colors) {
|
|
197
|
-
let
|
|
198
|
-
for (
|
|
199
|
-
const l = o.colors[
|
|
200
|
-
if (l && !
|
|
201
|
-
const c =
|
|
202
|
-
i in o.colors || (o.colors[i] =
|
|
197
|
+
let a;
|
|
198
|
+
for (a in o.colors) {
|
|
199
|
+
const l = o.colors[a];
|
|
200
|
+
if (l && !a.startsWith("on") && !a.endsWith("Light") && !a.endsWith("Dark")) {
|
|
201
|
+
const c = ke(l), i = `${a}Light`, h = `${a}Dark`;
|
|
202
|
+
i in o.colors || (o.colors[i] = de(Fe(c, 85))), h in o.colors || (o.colors[h] = de(Me(c, 25)));
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
|
-
o.colors =
|
|
206
|
+
o.colors = He(s, o.colors), o.name === n.defaultTheme && (e = o);
|
|
207
207
|
}
|
|
208
208
|
else {
|
|
209
209
|
const o = "default";
|
|
210
210
|
e = {
|
|
211
211
|
name: o,
|
|
212
212
|
mode: "light",
|
|
213
|
-
colors:
|
|
213
|
+
colors: ue
|
|
214
214
|
}, n = {
|
|
215
215
|
defaultTheme: o,
|
|
216
216
|
themes: [e]
|
|
@@ -221,20 +221,20 @@ function Fe(t, n) {
|
|
|
221
221
|
activeTheme: e.name,
|
|
222
222
|
themes: n.themes
|
|
223
223
|
});
|
|
224
|
-
|
|
224
|
+
C(
|
|
225
225
|
() => o.value.activeTheme,
|
|
226
|
-
(
|
|
227
|
-
const
|
|
228
|
-
|
|
226
|
+
(s) => {
|
|
227
|
+
const a = o.value.themes.find((l) => l.name === s);
|
|
228
|
+
a && Ue(a.colors);
|
|
229
229
|
},
|
|
230
230
|
{ immediate: !0 }
|
|
231
231
|
), t.provide(j, o);
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
|
-
function
|
|
234
|
+
function He(t, n = {}) {
|
|
235
235
|
return { ...t, ...n };
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function Ue(t) {
|
|
238
238
|
let n = document.getElementById(
|
|
239
239
|
j
|
|
240
240
|
);
|
|
@@ -242,34 +242,34 @@ function Re(t) {
|
|
|
242
242
|
let e = `:root {
|
|
243
243
|
`, o;
|
|
244
244
|
for (o in t) {
|
|
245
|
-
const
|
|
246
|
-
if (
|
|
247
|
-
e += ` ${
|
|
245
|
+
const s = t[o];
|
|
246
|
+
if (s) {
|
|
247
|
+
e += ` ${fe(o)}: ${s};
|
|
248
248
|
`;
|
|
249
|
-
const
|
|
250
|
-
e += ` ${
|
|
249
|
+
const a = ke(s);
|
|
250
|
+
e += ` ${fe(o)}-rgb: ${a.r} ${a.g} ${a.b};
|
|
251
251
|
`;
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
254
|
e += "}", n.textContent = e;
|
|
255
255
|
}
|
|
256
|
-
function
|
|
256
|
+
function fe(t) {
|
|
257
257
|
return t ? `--q-theme-${t.replace(/([A-Z])/g, "-$1").replace(/^-/, "").toLowerCase()}` : "";
|
|
258
258
|
}
|
|
259
|
-
function
|
|
259
|
+
function nn(t = {}) {
|
|
260
260
|
return { install: (e) => {
|
|
261
261
|
const o = t.components || {};
|
|
262
262
|
for (const l in o)
|
|
263
263
|
e.component(l, o[l]);
|
|
264
|
-
const
|
|
265
|
-
for (const l in
|
|
266
|
-
e.directive(l,
|
|
267
|
-
const
|
|
268
|
-
e.provide(
|
|
264
|
+
const s = t.directives || {};
|
|
265
|
+
for (const l in s)
|
|
266
|
+
e.directive(l, s[l]);
|
|
267
|
+
const a = t.defaults || {};
|
|
268
|
+
e.provide(se, I(a)), Re(e, t.themes);
|
|
269
269
|
} };
|
|
270
270
|
}
|
|
271
|
-
const
|
|
272
|
-
/* @__PURE__ */
|
|
271
|
+
const Ne = /* @__PURE__ */ N("svg", { viewBox: "25 25 50 50" }, [
|
|
272
|
+
/* @__PURE__ */ N("circle", {
|
|
273
273
|
class: "path",
|
|
274
274
|
cx: "50",
|
|
275
275
|
cy: "50",
|
|
@@ -279,50 +279,50 @@ const He = /* @__PURE__ */ K("svg", { viewBox: "25 25 50 50" }, [
|
|
|
279
279
|
"stroke-width": "5",
|
|
280
280
|
"stroke-miterlimit": "10"
|
|
281
281
|
})
|
|
282
|
-
], -1),
|
|
283
|
-
|
|
284
|
-
],
|
|
282
|
+
], -1), Ke = [
|
|
283
|
+
Ne
|
|
284
|
+
], We = /* @__PURE__ */ k({
|
|
285
285
|
__name: "QSpinnerLoader",
|
|
286
286
|
props: {
|
|
287
287
|
size: { default: 48 }
|
|
288
288
|
},
|
|
289
289
|
setup(t) {
|
|
290
|
-
const n = t, e =
|
|
290
|
+
const n = t, e = v(() => ({
|
|
291
291
|
"font-size": n.size !== 48 ? `${n.size}px` : void 0
|
|
292
292
|
}));
|
|
293
|
-
return (o,
|
|
293
|
+
return (o, s) => (r(), f("div", {
|
|
294
294
|
class: "q-spinner-loader",
|
|
295
|
-
style:
|
|
296
|
-
},
|
|
295
|
+
style: K(e.value)
|
|
296
|
+
}, Ke, 4));
|
|
297
297
|
}
|
|
298
298
|
});
|
|
299
|
-
function
|
|
299
|
+
function Ge(t, n) {
|
|
300
300
|
var e;
|
|
301
301
|
return typeof ((e = t.props) == null ? void 0 : e[n]) < "u";
|
|
302
302
|
}
|
|
303
|
-
function
|
|
303
|
+
function w(t) {
|
|
304
304
|
const n = t.setup;
|
|
305
305
|
return n && (t.setup = (e, o) => {
|
|
306
|
-
const
|
|
307
|
-
if (
|
|
306
|
+
const s = ze();
|
|
307
|
+
if (oe(s.value))
|
|
308
308
|
return n(e, o);
|
|
309
|
-
const
|
|
310
|
-
if (
|
|
309
|
+
const a = he();
|
|
310
|
+
if (a === null)
|
|
311
311
|
return n(e, o);
|
|
312
312
|
const l = new Proxy(e, {
|
|
313
313
|
get(c, i) {
|
|
314
|
-
var
|
|
315
|
-
const
|
|
316
|
-
return
|
|
314
|
+
var p;
|
|
315
|
+
const h = Reflect.get(c, i), _ = (p = s.value) == null ? void 0 : p[i];
|
|
316
|
+
return typeof i == "string" && !Ge(a.vnode, i) ? _ ?? h : h;
|
|
317
317
|
}
|
|
318
318
|
});
|
|
319
319
|
return n(l, o);
|
|
320
320
|
}), t;
|
|
321
321
|
}
|
|
322
|
-
const
|
|
322
|
+
const Se = w(We), Ye = ["disabled", "onClick"], Xe = {
|
|
323
323
|
key: 0,
|
|
324
324
|
class: "q-btn__spinner"
|
|
325
|
-
},
|
|
325
|
+
}, Ze = { class: "q-btn__content" }, je = /* @__PURE__ */ k({
|
|
326
326
|
__name: "QButton",
|
|
327
327
|
props: {
|
|
328
328
|
active: { type: Boolean },
|
|
@@ -338,12 +338,12 @@ const $e = k(Ne), We = ["disabled", "onClick"], Ge = {
|
|
|
338
338
|
},
|
|
339
339
|
emits: ["click"],
|
|
340
340
|
setup(t, { emit: n }) {
|
|
341
|
-
const e = t, o =
|
|
342
|
-
function
|
|
341
|
+
const e = t, o = v(() => e.disabled || e.loading);
|
|
342
|
+
function s(l) {
|
|
343
343
|
o.value || n("click", l);
|
|
344
344
|
}
|
|
345
|
-
const
|
|
346
|
-
const l =
|
|
345
|
+
const a = v(() => {
|
|
346
|
+
const l = v(() => e.bStyle ? `q-btn--${e.bStyle}` : void 0), c = v(() => e.size !== "regular" ? `q-btn--${e.size}` : void 0);
|
|
347
347
|
return [
|
|
348
348
|
"q-btn",
|
|
349
349
|
l.value,
|
|
@@ -359,25 +359,25 @@ const $e = k(Ne), We = ["disabled", "onClick"], Ge = {
|
|
|
359
359
|
});
|
|
360
360
|
return (l, c) => (r(), f("button", {
|
|
361
361
|
type: "button",
|
|
362
|
-
class:
|
|
362
|
+
class: V(a.value),
|
|
363
363
|
disabled: o.value,
|
|
364
|
-
onClick:
|
|
364
|
+
onClick: R(s, ["stop", "prevent"])
|
|
365
365
|
}, [
|
|
366
|
-
l.loading ? (r(), f("div",
|
|
367
|
-
|
|
366
|
+
l.loading ? (r(), f("div", Xe, [
|
|
367
|
+
H(g(Se), { size: 23 })
|
|
368
368
|
])) : b("", !0),
|
|
369
|
-
|
|
370
|
-
l.iconOnRight ? (r(), f(
|
|
371
|
-
|
|
369
|
+
N("span", Ze, [
|
|
370
|
+
l.iconOnRight ? (r(), f(O, { key: 0 }, [
|
|
371
|
+
X(A(e.label), 1)
|
|
372
372
|
], 64)) : b("", !0),
|
|
373
373
|
x(l.$slots, "default"),
|
|
374
|
-
l.iconOnRight ? b("", !0) : (r(), f(
|
|
375
|
-
|
|
374
|
+
l.iconOnRight ? b("", !0) : (r(), f(O, { key: 1 }, [
|
|
375
|
+
X(A(e.label), 1)
|
|
376
376
|
], 64))
|
|
377
377
|
])
|
|
378
|
-
], 10,
|
|
378
|
+
], 10, Ye));
|
|
379
379
|
}
|
|
380
|
-
}),
|
|
380
|
+
}), Je = w(je), Pe = /* @__PURE__ */ k({
|
|
381
381
|
__name: "QButtonGroup",
|
|
382
382
|
props: {
|
|
383
383
|
bStyle: {},
|
|
@@ -387,27 +387,27 @@ const $e = k(Ne), We = ["disabled", "onClick"], Ge = {
|
|
|
387
387
|
},
|
|
388
388
|
setup(t) {
|
|
389
389
|
const n = t;
|
|
390
|
-
|
|
390
|
+
Qe({
|
|
391
391
|
QButton: {
|
|
392
|
-
bStyle:
|
|
393
|
-
disabled:
|
|
394
|
-
borderless:
|
|
392
|
+
bStyle: ee(n, "bStyle"),
|
|
393
|
+
disabled: ee(n, "disabled"),
|
|
394
|
+
borderless: ee(n, "borderless"),
|
|
395
395
|
elevated: !1
|
|
396
396
|
}
|
|
397
397
|
});
|
|
398
|
-
const e =
|
|
398
|
+
const e = v(() => [
|
|
399
399
|
"q-btn-group",
|
|
400
400
|
{
|
|
401
401
|
"q-btn-group--elevated": n.elevated
|
|
402
402
|
}
|
|
403
403
|
]);
|
|
404
|
-
return (o,
|
|
405
|
-
class:
|
|
404
|
+
return (o, s) => (r(), f("div", {
|
|
405
|
+
class: V(e.value)
|
|
406
406
|
}, [
|
|
407
407
|
x(o.$slots, "default")
|
|
408
408
|
], 2));
|
|
409
409
|
}
|
|
410
|
-
}),
|
|
410
|
+
}), et = w(Pe), tt = /* @__PURE__ */ k({
|
|
411
411
|
__name: "QButtonToggle",
|
|
412
412
|
props: {
|
|
413
413
|
modelValue: {},
|
|
@@ -420,11 +420,11 @@ const $e = k(Ne), We = ["disabled", "onClick"], Ge = {
|
|
|
420
420
|
emits: ["update:modelValue"],
|
|
421
421
|
setup(t, { emit: n }) {
|
|
422
422
|
const e = t, o = I(e.modelValue);
|
|
423
|
-
|
|
423
|
+
C(
|
|
424
424
|
() => e.modelValue,
|
|
425
425
|
(l) => o.value = l
|
|
426
426
|
);
|
|
427
|
-
const
|
|
427
|
+
const s = v({
|
|
428
428
|
get() {
|
|
429
429
|
return o.value;
|
|
430
430
|
},
|
|
@@ -432,24 +432,24 @@ const $e = k(Ne), We = ["disabled", "onClick"], Ge = {
|
|
|
432
432
|
o.value = l, n("update:modelValue", l);
|
|
433
433
|
}
|
|
434
434
|
});
|
|
435
|
-
function
|
|
436
|
-
|
|
435
|
+
function a(l) {
|
|
436
|
+
s.value === l.key && !e.mandatory ? s.value = void 0 : s.value = l.key;
|
|
437
437
|
}
|
|
438
|
-
return (l, c) => (r(),
|
|
438
|
+
return (l, c) => (r(), $(g(et), {
|
|
439
439
|
"b-style": "secondary",
|
|
440
440
|
disabled: e.disabled,
|
|
441
441
|
borderless: e.borderless,
|
|
442
442
|
elevated: e.elevated
|
|
443
443
|
}, {
|
|
444
|
-
default:
|
|
445
|
-
(r(!0), f(
|
|
444
|
+
default: T(() => [
|
|
445
|
+
(r(!0), f(O, null, ne(e.options, (i) => (r(), $(g(Je), {
|
|
446
446
|
key: i.key,
|
|
447
447
|
title: i.title,
|
|
448
448
|
label: i.label,
|
|
449
|
-
active:
|
|
450
|
-
onClick: (
|
|
449
|
+
active: s.value === i.key,
|
|
450
|
+
onClick: (h) => a(i)
|
|
451
451
|
}, {
|
|
452
|
-
default:
|
|
452
|
+
default: T(() => [
|
|
453
453
|
x(l.$slots, i.key)
|
|
454
454
|
]),
|
|
455
455
|
_: 2
|
|
@@ -458,7 +458,7 @@ const $e = k(Ne), We = ["disabled", "onClick"], Ge = {
|
|
|
458
458
|
_: 3
|
|
459
459
|
}, 8, ["disabled", "borderless", "elevated"]));
|
|
460
460
|
}
|
|
461
|
-
}),
|
|
461
|
+
}), on = w(tt), nt = /* @__PURE__ */ k({
|
|
462
462
|
__name: "QIcon",
|
|
463
463
|
props: {
|
|
464
464
|
icon: {},
|
|
@@ -466,25 +466,25 @@ const $e = k(Ne), We = ["disabled", "onClick"], Ge = {
|
|
|
466
466
|
size: { default: void 0 }
|
|
467
467
|
},
|
|
468
468
|
setup(t) {
|
|
469
|
-
const n = t, e =
|
|
469
|
+
const n = t, e = v(() => {
|
|
470
470
|
switch (n.type) {
|
|
471
471
|
case "svg":
|
|
472
|
-
return
|
|
472
|
+
return ft;
|
|
473
473
|
case "font":
|
|
474
|
-
return
|
|
474
|
+
return ut;
|
|
475
475
|
case "img":
|
|
476
|
-
return
|
|
476
|
+
return dt;
|
|
477
477
|
default:
|
|
478
478
|
return;
|
|
479
479
|
}
|
|
480
480
|
});
|
|
481
|
-
return (o,
|
|
481
|
+
return (o, s) => n.icon ? (r(), $(ve(e.value), {
|
|
482
482
|
key: 0,
|
|
483
483
|
icon: n.icon,
|
|
484
484
|
size: n.size
|
|
485
485
|
}, null, 8, ["icon", "size"])) : b("", !0);
|
|
486
486
|
}
|
|
487
|
-
}),
|
|
487
|
+
}), ot = /* @__PURE__ */ k({
|
|
488
488
|
__name: "QIconFont",
|
|
489
489
|
props: {
|
|
490
490
|
icon: {},
|
|
@@ -493,33 +493,33 @@ const $e = k(Ne), We = ["disabled", "onClick"], Ge = {
|
|
|
493
493
|
size: { default: void 0 }
|
|
494
494
|
},
|
|
495
495
|
setup(t) {
|
|
496
|
-
const n = t, e =
|
|
496
|
+
const n = t, e = v(() => n.variant ? `${n.library}-${n.variant}` : n.library), o = v(() => n.library && n.icon ? `${n.library}-${n.icon}` : n.icon), s = v(() => ({
|
|
497
497
|
"font-size": n.size !== void 0 ? `${n.size}px` : void 0
|
|
498
498
|
}));
|
|
499
|
-
return (
|
|
499
|
+
return (a, l) => o.value ? (r(), f("i", {
|
|
500
500
|
key: 0,
|
|
501
|
-
class:
|
|
502
|
-
style:
|
|
501
|
+
class: V(["q-icon", "q-icon__font", e.value, o.value]),
|
|
502
|
+
style: K(s.value)
|
|
503
503
|
}, null, 6)) : b("", !0);
|
|
504
504
|
}
|
|
505
|
-
}),
|
|
505
|
+
}), st = ["src"], at = /* @__PURE__ */ k({
|
|
506
506
|
__name: "QIconImg",
|
|
507
507
|
props: {
|
|
508
508
|
icon: {},
|
|
509
509
|
size: {}
|
|
510
510
|
},
|
|
511
511
|
setup(t) {
|
|
512
|
-
const n = t, e =
|
|
512
|
+
const n = t, e = v(() => ({
|
|
513
513
|
"font-size": n.size !== void 0 ? `${n.size}px` : void 0
|
|
514
514
|
}));
|
|
515
|
-
return (o,
|
|
515
|
+
return (o, s) => n.icon ? (r(), f("img", {
|
|
516
516
|
key: 0,
|
|
517
517
|
src: n.icon,
|
|
518
518
|
class: "q-icon",
|
|
519
|
-
style:
|
|
520
|
-
}, null, 12,
|
|
519
|
+
style: K(e.value)
|
|
520
|
+
}, null, 12, st)) : b("", !0);
|
|
521
521
|
}
|
|
522
|
-
}),
|
|
522
|
+
}), M = {}, lt = k({
|
|
523
523
|
name: "InlineSvg",
|
|
524
524
|
emits: ["loaded", "unloaded", "error"],
|
|
525
525
|
inheritAttrs: !1,
|
|
@@ -528,9 +528,9 @@ const $e = k(Ne), We = ["disabled", "onClick"], Ge = {
|
|
|
528
528
|
return null;
|
|
529
529
|
const t = this.getSvgContent(this.svgElSource);
|
|
530
530
|
if (!t)
|
|
531
|
-
return
|
|
531
|
+
return re("div", this.$attrs);
|
|
532
532
|
const n = {};
|
|
533
|
-
return this.copySvgAttrs(n, this.svgElSource), this.copySvgAttrs(n, t), this.copyComponentAttrs(n, this.$attrs), n.innerHTML = t.innerHTML,
|
|
533
|
+
return this.copySvgAttrs(n, this.svgElSource), this.copySvgAttrs(n, t), this.copyComponentAttrs(n, this.$attrs), n.innerHTML = t.innerHTML, re("svg", n);
|
|
534
534
|
},
|
|
535
535
|
props: {
|
|
536
536
|
src: {
|
|
@@ -575,7 +575,7 @@ const $e = k(Ne), We = ["disabled", "onClick"], Ge = {
|
|
|
575
575
|
o !== !1 && o !== null && o !== void 0 && (t[e] = o);
|
|
576
576
|
},
|
|
577
577
|
getSvgContent(t) {
|
|
578
|
-
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)),
|
|
578
|
+
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)), rt(t, this.title)), t);
|
|
579
579
|
},
|
|
580
580
|
/**
|
|
581
581
|
* Get svgElSource
|
|
@@ -583,11 +583,11 @@ const $e = k(Ne), We = ["disabled", "onClick"], Ge = {
|
|
|
583
583
|
*/
|
|
584
584
|
async getSource(t) {
|
|
585
585
|
try {
|
|
586
|
-
|
|
587
|
-
const n = await
|
|
586
|
+
M[t] || (M[t] = it(this.download(t))), this.svgElSource && M[t].getIsPending() && !this.keepDuringLoading && (this.svgElSource = null, this.$emit("unloaded"));
|
|
587
|
+
const n = await M[t];
|
|
588
588
|
this.svgElSource = n, await this.$nextTick(), this.$emit("loaded", this.$el);
|
|
589
589
|
} catch (n) {
|
|
590
|
-
this.svgElSource && (this.svgElSource = null, this.$emit("unloaded")), delete
|
|
590
|
+
this.svgElSource && (this.svgElSource = null, this.$emit("unloaded")), delete M[t], this.$emit("error", n);
|
|
591
591
|
}
|
|
592
592
|
},
|
|
593
593
|
/**
|
|
@@ -599,10 +599,10 @@ const $e = k(Ne), We = ["disabled", "onClick"], Ge = {
|
|
|
599
599
|
const n = await fetch(t);
|
|
600
600
|
if (!n.ok)
|
|
601
601
|
throw new Error("Error loading SVG");
|
|
602
|
-
const e = await n.text(),
|
|
603
|
-
if (!
|
|
602
|
+
const e = await n.text(), a = new DOMParser().parseFromString(e, "text/xml").getElementsByTagName("svg")[0];
|
|
603
|
+
if (!a)
|
|
604
604
|
throw new Error("Loaded file is not a valid SVG");
|
|
605
|
-
return
|
|
605
|
+
return a;
|
|
606
606
|
}
|
|
607
607
|
},
|
|
608
608
|
watch: {
|
|
@@ -611,7 +611,7 @@ const $e = k(Ne), We = ["disabled", "onClick"], Ge = {
|
|
|
611
611
|
}
|
|
612
612
|
}
|
|
613
613
|
});
|
|
614
|
-
function
|
|
614
|
+
function rt(t, n) {
|
|
615
615
|
const e = t.getElementsByTagName("title");
|
|
616
616
|
if (e.length)
|
|
617
617
|
e[0].textContent = n;
|
|
@@ -620,7 +620,7 @@ function st(t, n) {
|
|
|
620
620
|
o.textContent = n, t.insertBefore(o, t.firstChild);
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
|
-
function
|
|
623
|
+
function it(t) {
|
|
624
624
|
if (t.getIsPending)
|
|
625
625
|
return t;
|
|
626
626
|
let n = !0;
|
|
@@ -632,7 +632,7 @@ function lt(t) {
|
|
|
632
632
|
);
|
|
633
633
|
return e.getIsPending = () => n, e;
|
|
634
634
|
}
|
|
635
|
-
const
|
|
635
|
+
const ct = /* @__PURE__ */ k({
|
|
636
636
|
__name: "QIconSvg",
|
|
637
637
|
props: {
|
|
638
638
|
icon: {},
|
|
@@ -641,26 +641,26 @@ const rt = /* @__PURE__ */ _({
|
|
|
641
641
|
},
|
|
642
642
|
emits: ["loaded", "unloaded"],
|
|
643
643
|
setup(t, { emit: n }) {
|
|
644
|
-
const e = t, o =
|
|
644
|
+
const e = t, o = v(() => ({
|
|
645
645
|
"font-size": e.size !== void 0 ? `${e.size}px` : void 0
|
|
646
646
|
}));
|
|
647
|
-
return (
|
|
647
|
+
return (s, a) => e.icon ? (r(), $(g(lt), {
|
|
648
648
|
key: 0,
|
|
649
649
|
class: "q-icon q-icon__svg",
|
|
650
650
|
src: e.bundle,
|
|
651
651
|
symbol: e.icon,
|
|
652
|
-
style:
|
|
653
|
-
onLoaded:
|
|
654
|
-
onUnloaded:
|
|
652
|
+
style: K(o.value),
|
|
653
|
+
onLoaded: a[0] || (a[0] = (l) => n("loaded", l)),
|
|
654
|
+
onUnloaded: a[1] || (a[1] = (l) => n("unloaded", l))
|
|
655
655
|
}, null, 8, ["src", "symbol", "style"])) : b("", !0);
|
|
656
656
|
}
|
|
657
|
-
}),
|
|
657
|
+
}), U = w(nt), ut = w(ot), dt = w(at), ft = w(ct), pt = {
|
|
658
658
|
key: 0,
|
|
659
659
|
class: "q-input__prepend"
|
|
660
|
-
},
|
|
660
|
+
}, mt = {
|
|
661
661
|
key: 1,
|
|
662
662
|
class: "q-input__append"
|
|
663
|
-
},
|
|
663
|
+
}, ht = /* @__PURE__ */ k({
|
|
664
664
|
__name: "QInput",
|
|
665
665
|
props: {
|
|
666
666
|
size: { default: "medium" },
|
|
@@ -670,31 +670,31 @@ const rt = /* @__PURE__ */ _({
|
|
|
670
670
|
setup(t) {
|
|
671
671
|
const n = t;
|
|
672
672
|
return (e, o) => (r(), f("div", {
|
|
673
|
-
class:
|
|
673
|
+
class: V([
|
|
674
674
|
"q-input",
|
|
675
675
|
`q-input--${n.size}`,
|
|
676
676
|
{ "q-input--readonly": n.readonly, "q-input--disabled": n.disabled }
|
|
677
677
|
])
|
|
678
678
|
}, [
|
|
679
|
-
e.$slots.prepend ? (r(), f("div",
|
|
679
|
+
e.$slots.prepend ? (r(), f("div", pt, [
|
|
680
680
|
x(e.$slots, "prepend")
|
|
681
681
|
])) : b("", !0),
|
|
682
682
|
x(e.$slots, "default"),
|
|
683
|
-
e.$slots.append ? (r(), f("div",
|
|
683
|
+
e.$slots.append ? (r(), f("div", mt, [
|
|
684
684
|
x(e.$slots, "append")
|
|
685
685
|
])) : b("", !0)
|
|
686
686
|
], 2));
|
|
687
687
|
}
|
|
688
|
-
}),
|
|
688
|
+
}), yt = w(ht), vt = (t, n) => {
|
|
689
689
|
const e = t.__vccOpts || t;
|
|
690
|
-
for (const [o,
|
|
691
|
-
e[o] =
|
|
690
|
+
for (const [o, s] of n)
|
|
691
|
+
e[o] = s;
|
|
692
692
|
return e;
|
|
693
|
-
},
|
|
694
|
-
function
|
|
695
|
-
return r(), f("div",
|
|
693
|
+
}, gt = {}, bt = { class: "q-line-loader" };
|
|
694
|
+
function _t(t, n) {
|
|
695
|
+
return r(), f("div", bt);
|
|
696
696
|
}
|
|
697
|
-
const
|
|
697
|
+
const kt = /* @__PURE__ */ vt(gt, [["render", _t]]), sn = w(kt), wt = /* @__PURE__ */ k({
|
|
698
698
|
__name: "QList",
|
|
699
699
|
props: {
|
|
700
700
|
modelValue: { type: [String, Number, Boolean, Symbol], default: void 0 },
|
|
@@ -706,103 +706,105 @@ const bt = /* @__PURE__ */ ht(yt, [["render", gt]]), tn = k(bt), _t = /* @__PURE
|
|
|
706
706
|
},
|
|
707
707
|
emits: ["update:modelValue"],
|
|
708
708
|
setup(t, { expose: n, emit: e }) {
|
|
709
|
-
const o = t,
|
|
710
|
-
function i(
|
|
711
|
-
|
|
709
|
+
const o = t, s = I(o.modelValue), a = v(() => l.value.length > 1 ? "div" : "ul"), l = v(() => o.groups.length ? o.groups : [{ title: "" }]), c = I(null);
|
|
710
|
+
function i(d) {
|
|
711
|
+
s.value = d, e("update:modelValue", d);
|
|
712
712
|
}
|
|
713
|
-
function
|
|
714
|
-
let
|
|
715
|
-
|
|
713
|
+
function h() {
|
|
714
|
+
let d = 0;
|
|
715
|
+
s.value && (d = o.items.findIndex((S) => S[o.itemValue] === s.value)), D(d);
|
|
716
716
|
}
|
|
717
|
-
function
|
|
718
|
-
switch (["ArrowDown", "ArrowUp", "Home", "End"].includes(
|
|
717
|
+
function _(d) {
|
|
718
|
+
switch (["ArrowDown", "ArrowUp", "Home", "End"].includes(d.key) && d.preventDefault(), d.key) {
|
|
719
719
|
case "ArrowDown":
|
|
720
|
-
|
|
720
|
+
p("next");
|
|
721
721
|
break;
|
|
722
722
|
case "ArrowUp":
|
|
723
|
-
|
|
723
|
+
p("prev");
|
|
724
724
|
break;
|
|
725
725
|
case "Home":
|
|
726
|
-
|
|
726
|
+
p("first");
|
|
727
727
|
break;
|
|
728
728
|
case "End":
|
|
729
|
-
|
|
729
|
+
p("last");
|
|
730
730
|
break;
|
|
731
731
|
}
|
|
732
732
|
}
|
|
733
|
-
function
|
|
734
|
-
switch (
|
|
733
|
+
function p(d) {
|
|
734
|
+
switch (d) {
|
|
735
735
|
case "next":
|
|
736
736
|
case "prev":
|
|
737
|
-
|
|
737
|
+
D(E(d));
|
|
738
738
|
break;
|
|
739
739
|
case "first":
|
|
740
|
-
|
|
740
|
+
D(0);
|
|
741
741
|
break;
|
|
742
742
|
case "last":
|
|
743
|
-
|
|
743
|
+
D(-1);
|
|
744
744
|
break;
|
|
745
745
|
}
|
|
746
746
|
}
|
|
747
|
-
function
|
|
748
|
-
var
|
|
749
|
-
(
|
|
747
|
+
function D(d) {
|
|
748
|
+
var y;
|
|
749
|
+
(y = z().at(d)) == null || y.focus();
|
|
750
750
|
}
|
|
751
|
-
function
|
|
752
|
-
var
|
|
753
|
-
const
|
|
754
|
-
return
|
|
751
|
+
function z() {
|
|
752
|
+
var y;
|
|
753
|
+
const d = (y = c.value) == null ? void 0 : y.querySelectorAll("li");
|
|
754
|
+
return d ? Array.from(d).filter((L) => L.tabIndex !== -1) : [];
|
|
755
755
|
}
|
|
756
|
-
function
|
|
757
|
-
return
|
|
756
|
+
function Q(d) {
|
|
757
|
+
return d.indexOf(document.activeElement);
|
|
758
758
|
}
|
|
759
|
-
function
|
|
760
|
-
const S =
|
|
761
|
-
return
|
|
759
|
+
function E(d) {
|
|
760
|
+
const S = z(), y = Q(S);
|
|
761
|
+
return d === "next" ? y === S.length - 1 ? y : y + 1 : y === 0 ? 0 : y - 1;
|
|
762
762
|
}
|
|
763
|
-
function
|
|
764
|
-
return
|
|
763
|
+
function F(d) {
|
|
764
|
+
return d ? o.items.filter((S) => S.group === d) : o.items;
|
|
765
765
|
}
|
|
766
|
-
return
|
|
766
|
+
return C(
|
|
767
767
|
() => o.modelValue,
|
|
768
|
-
(
|
|
769
|
-
|
|
768
|
+
(d) => {
|
|
769
|
+
s.value = d;
|
|
770
770
|
}
|
|
771
|
-
), n({ focusItem:
|
|
771
|
+
), n({ focusItem: D }), (d, S) => (r(), $(ve(a.value), {
|
|
772
772
|
ref_key: "listRef",
|
|
773
773
|
ref: c,
|
|
774
|
-
class:
|
|
774
|
+
class: V(["q-list", { "q-list--disabled": o.disabled }]),
|
|
775
775
|
role: "listbox",
|
|
776
776
|
tabindex: o.disabled ? -1 : 0,
|
|
777
|
-
onFocus:
|
|
778
|
-
onKeydown:
|
|
777
|
+
onFocus: h,
|
|
778
|
+
onKeydown: _
|
|
779
779
|
}, {
|
|
780
|
-
default:
|
|
781
|
-
(r(!0), f(
|
|
782
|
-
key:
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
780
|
+
default: T(() => [
|
|
781
|
+
(r(!0), f(O, null, ne(l.value, (y) => (r(), $(g(Vt), {
|
|
782
|
+
key: y.id,
|
|
783
|
+
title: y.title,
|
|
784
|
+
disabled: y.disabled
|
|
785
|
+
}, {
|
|
786
|
+
default: T(() => [
|
|
787
|
+
(r(!0), f(O, null, ne(F(y.id), (L) => (r(), $(g(Ct), {
|
|
788
|
+
key: L[o.itemValue],
|
|
789
|
+
value: L[o.itemValue],
|
|
790
|
+
label: L[o.itemLabel],
|
|
791
|
+
icon: L.icon,
|
|
792
|
+
disabled: o.disabled || L.disabled,
|
|
793
|
+
selected: s.value === L[o.itemValue],
|
|
792
794
|
onSelect: i
|
|
793
795
|
}, null, 8, ["value", "label", "icon", "disabled", "selected"]))), 128))
|
|
794
796
|
]),
|
|
795
797
|
_: 2
|
|
796
|
-
},
|
|
798
|
+
}, 1032, ["title", "disabled"]))), 128))
|
|
797
799
|
]),
|
|
798
800
|
_: 1
|
|
799
801
|
}, 40, ["class", "tabindex"]));
|
|
800
802
|
}
|
|
801
|
-
}),
|
|
803
|
+
}), $t = ["tabindex", "aria-label", "aria-selected", "onClick"], St = { class: "q-list-item__check-container" }, Bt = {
|
|
802
804
|
check: {
|
|
803
805
|
icon: "check"
|
|
804
806
|
}
|
|
805
|
-
},
|
|
807
|
+
}, Lt = /* @__PURE__ */ k({
|
|
806
808
|
__name: "QListItem",
|
|
807
809
|
props: {
|
|
808
810
|
value: { type: [String, Number, Boolean, Symbol] },
|
|
@@ -810,7 +812,7 @@ const bt = /* @__PURE__ */ ht(yt, [["render", gt]]), tn = k(bt), _t = /* @__PURE
|
|
|
810
812
|
icon: { default: void 0 },
|
|
811
813
|
selected: { type: Boolean, default: !1 },
|
|
812
814
|
highlighted: { type: Boolean, default: !1 },
|
|
813
|
-
icons: { default: () =>
|
|
815
|
+
icons: { default: () => Bt },
|
|
814
816
|
disabled: { type: Boolean, default: !1 }
|
|
815
817
|
},
|
|
816
818
|
emits: ["select"],
|
|
@@ -819,13 +821,13 @@ const bt = /* @__PURE__ */ ht(yt, [["render", gt]]), tn = k(bt), _t = /* @__PURE
|
|
|
819
821
|
function o() {
|
|
820
822
|
e.disabled || n("select", e.value);
|
|
821
823
|
}
|
|
822
|
-
function a
|
|
823
|
-
|
|
824
|
+
function s(a) {
|
|
825
|
+
a.key === "Tab" && o(), (a.key === "Enter" || a.key === " ") && (a.preventDefault(), a.stopPropagation(), o());
|
|
824
826
|
}
|
|
825
|
-
return (
|
|
827
|
+
return (a, l) => (r(), f("li", {
|
|
826
828
|
role: "option",
|
|
827
829
|
tabindex: e.disabled ? void 0 : -2,
|
|
828
|
-
class:
|
|
830
|
+
class: V([
|
|
829
831
|
"q-list-item",
|
|
830
832
|
{
|
|
831
833
|
"q-list-item--disabled": e.disabled,
|
|
@@ -835,110 +837,110 @@ const bt = /* @__PURE__ */ ht(yt, [["render", gt]]), tn = k(bt), _t = /* @__PURE
|
|
|
835
837
|
]),
|
|
836
838
|
"aria-label": e.label,
|
|
837
839
|
"aria-selected": e.disabled ? void 0 : e.selected,
|
|
838
|
-
onKeydown:
|
|
839
|
-
onClick:
|
|
840
|
+
onKeydown: s,
|
|
841
|
+
onClick: R(o, ["stop", "prevent"])
|
|
840
842
|
}, [
|
|
841
|
-
e.icon ? (r(),
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
e.selected ? (r(),
|
|
843
|
+
e.icon ? (r(), $(g(U), ge(Z({ key: 0 }, e.icon)), null, 16)) : b("", !0),
|
|
844
|
+
X(" " + A(e.label) + " ", 1),
|
|
845
|
+
N("div", St, [
|
|
846
|
+
e.selected ? (r(), $(g(U), Z({ key: 0 }, e.icons.check, { class: "q-list-item__check" }), null, 16)) : b("", !0)
|
|
845
847
|
])
|
|
846
|
-
], 42,
|
|
848
|
+
], 42, $t));
|
|
847
849
|
}
|
|
848
850
|
});
|
|
849
|
-
let
|
|
850
|
-
function
|
|
851
|
-
return `uid-${++
|
|
851
|
+
let xt = 0;
|
|
852
|
+
function qt() {
|
|
853
|
+
return `uid-${++xt}`;
|
|
852
854
|
}
|
|
853
|
-
const
|
|
855
|
+
const It = ["aria-labelledby"], Dt = ["id"], Tt = /* @__PURE__ */ k({
|
|
854
856
|
__name: "QListItemGroup",
|
|
855
857
|
props: {
|
|
856
|
-
id: { default: () => Lt() },
|
|
857
858
|
title: { default: "" },
|
|
858
859
|
disabled: { type: Boolean, default: !1 }
|
|
859
860
|
},
|
|
860
861
|
setup(t) {
|
|
861
|
-
const n = t;
|
|
862
|
-
return (
|
|
862
|
+
const n = t, e = qt();
|
|
863
|
+
return (o, s) => n.title ? (r(), f("ul", {
|
|
863
864
|
key: 1,
|
|
864
865
|
class: "q-list-item-group",
|
|
865
866
|
role: "group",
|
|
866
|
-
"aria-labelledby":
|
|
867
|
+
"aria-labelledby": g(e)
|
|
867
868
|
}, [
|
|
868
869
|
n.title ? (r(), f("li", {
|
|
869
870
|
key: 0,
|
|
870
|
-
id:
|
|
871
|
+
id: g(e),
|
|
871
872
|
class: "q-list-item-group__title",
|
|
872
873
|
role: "presentation"
|
|
873
|
-
},
|
|
874
|
-
x(
|
|
875
|
-
], 8,
|
|
874
|
+
}, A(n.title), 9, Dt)) : b("", !0),
|
|
875
|
+
x(o.$slots, "default")
|
|
876
|
+
], 8, It)) : x(o.$slots, "default", { key: 0 });
|
|
876
877
|
}
|
|
877
|
-
}),
|
|
878
|
-
function
|
|
879
|
-
const
|
|
880
|
-
let
|
|
881
|
-
c && !
|
|
882
|
-
const
|
|
883
|
-
switch (
|
|
878
|
+
}), Et = w(wt), Ct = w(Lt), Vt = w(Tt);
|
|
879
|
+
function At(t, n, e = "right", o) {
|
|
880
|
+
const s = t.getBoundingClientRect(), a = s.x + window.scrollX, l = s.y + window.scrollY, c = n == null ? void 0 : n.getBoundingClientRect(), i = (c == null ? void 0 : c.width) ?? 0, h = (c == null ? void 0 : c.height) ?? 0;
|
|
881
|
+
let _ = e;
|
|
882
|
+
c && !Be(s, c, _) && (_ = zt(s, c, _));
|
|
883
|
+
const p = { x: 0, y: 0, placement: _ };
|
|
884
|
+
switch (_) {
|
|
884
885
|
case "top":
|
|
885
|
-
o === "anchor" ?
|
|
886
|
+
o === "anchor" ? p.x = a : p.x = a + (s.width - i) / 2, p.y = l - h;
|
|
886
887
|
break;
|
|
887
888
|
case "bottom":
|
|
888
|
-
o === "anchor" ?
|
|
889
|
+
o === "anchor" ? p.x = a : p.x = a + (s.width - i) / 2, p.y = l + s.height;
|
|
889
890
|
break;
|
|
890
891
|
case "left":
|
|
891
|
-
|
|
892
|
+
p.x = a - i, p.y = l + s.height / 2 - h / 2;
|
|
892
893
|
break;
|
|
893
894
|
case "right":
|
|
894
|
-
|
|
895
|
+
p.x = a + s.width, p.y = l + s.height / 2 - h / 2;
|
|
895
896
|
break;
|
|
896
897
|
}
|
|
897
|
-
return o === "anchor" &&
|
|
898
|
+
return o === "anchor" && s.width >= i && (p.width = s.width), p;
|
|
898
899
|
}
|
|
899
|
-
function
|
|
900
|
-
let o = !1,
|
|
900
|
+
function Be(t, n, e) {
|
|
901
|
+
let o = !1, s = !1;
|
|
901
902
|
switch (e) {
|
|
902
903
|
case "top":
|
|
903
|
-
o =
|
|
904
|
+
o = me(t, n), s = t.top > n.height;
|
|
904
905
|
break;
|
|
905
906
|
case "bottom":
|
|
906
|
-
o =
|
|
907
|
+
o = me(t, n), s = window.innerHeight - t.top - t.height > n.height;
|
|
907
908
|
break;
|
|
908
909
|
case "left":
|
|
909
|
-
o = t.left > n.width,
|
|
910
|
+
o = t.left > n.width, s = pe(t, n);
|
|
910
911
|
break;
|
|
911
912
|
case "right":
|
|
912
|
-
o = window.innerWidth - t.left - t.width > n.width,
|
|
913
|
+
o = window.innerWidth - t.left - t.width > n.width, s = pe(t, n);
|
|
913
914
|
break;
|
|
914
915
|
}
|
|
915
|
-
return o &&
|
|
916
|
+
return o && s;
|
|
916
917
|
}
|
|
917
|
-
function
|
|
918
|
+
function pe(t, n) {
|
|
918
919
|
return window.innerHeight - t.top - t.height / 2 > n.height / 2 && t.top + t.height / 2 > n.height / 2;
|
|
919
920
|
}
|
|
920
|
-
function
|
|
921
|
+
function me(t, n) {
|
|
921
922
|
return window.innerWidth - t.left - t.width / 2 > n.width / 2 && t.left + t.width / 2 > n.width / 2;
|
|
922
923
|
}
|
|
923
|
-
function
|
|
924
|
+
function zt(t, n, e) {
|
|
924
925
|
const o = {
|
|
925
926
|
top: ["bottom", "left", "right"],
|
|
926
927
|
bottom: ["top", "left", "right"],
|
|
927
928
|
left: ["right", "top", "bottom"],
|
|
928
929
|
right: ["left", "top", "bottom"]
|
|
929
930
|
};
|
|
930
|
-
for (const
|
|
931
|
-
if (
|
|
932
|
-
return
|
|
931
|
+
for (const s of o[e])
|
|
932
|
+
if (Be(t, n, s))
|
|
933
|
+
return s;
|
|
933
934
|
return e;
|
|
934
935
|
}
|
|
935
|
-
function
|
|
936
|
+
function Y(t) {
|
|
936
937
|
return typeof t == "string" ? document.querySelector(t) : t && "$el" in t ? t.$el : t;
|
|
937
938
|
}
|
|
938
|
-
const
|
|
939
|
+
const Qt = {
|
|
939
940
|
key: 0,
|
|
940
941
|
class: "q-overlay__arrow"
|
|
941
|
-
},
|
|
942
|
+
}, Ot = /* @__PURE__ */ k({
|
|
943
|
+
inheritAttrs: !1,
|
|
942
944
|
__name: "QOverlay",
|
|
943
945
|
props: {
|
|
944
946
|
modelValue: { type: Boolean },
|
|
@@ -958,82 +960,90 @@ const zt = {
|
|
|
958
960
|
},
|
|
959
961
|
emits: ["enter", "leave"],
|
|
960
962
|
setup(t, { emit: n }) {
|
|
961
|
-
const e = t, o =
|
|
963
|
+
const e = t, o = v(() => [
|
|
962
964
|
"q-overlay",
|
|
963
|
-
`q-overlay--${
|
|
965
|
+
`q-overlay--${s.placement}`,
|
|
964
966
|
{ "q-overlay--inverted": e.appearance === "inverted" },
|
|
965
967
|
...e.contentClasses
|
|
966
|
-
]),
|
|
968
|
+
]), s = xe({
|
|
967
969
|
visible: e.modelValue,
|
|
970
|
+
animating: !1,
|
|
968
971
|
top: 0,
|
|
969
972
|
left: 0,
|
|
970
973
|
width: 0,
|
|
971
974
|
placement: e.placement
|
|
972
|
-
}),
|
|
973
|
-
|
|
975
|
+
}), a = v(() => s.visible && !e.disabled);
|
|
976
|
+
C(
|
|
974
977
|
() => e.modelValue,
|
|
975
|
-
() =>
|
|
978
|
+
() => s.visible = e.modelValue
|
|
979
|
+
), C(
|
|
980
|
+
() => s.visible,
|
|
981
|
+
() => s.animating = !0
|
|
976
982
|
);
|
|
977
|
-
const l =
|
|
978
|
-
let
|
|
979
|
-
switch (
|
|
983
|
+
const l = v(() => {
|
|
984
|
+
let m = 0, q = 0;
|
|
985
|
+
switch (s.placement) {
|
|
980
986
|
case "top":
|
|
981
|
-
|
|
987
|
+
q = -(e.offset || 0);
|
|
982
988
|
break;
|
|
983
989
|
case "bottom":
|
|
984
|
-
|
|
990
|
+
q = e.offset || 0;
|
|
985
991
|
break;
|
|
986
992
|
case "left":
|
|
987
|
-
|
|
993
|
+
m = -(e.offset || 0);
|
|
988
994
|
break;
|
|
989
995
|
case "right":
|
|
990
|
-
|
|
996
|
+
m = e.offset || 0;
|
|
991
997
|
break;
|
|
992
998
|
}
|
|
993
|
-
const
|
|
994
|
-
top: `${
|
|
995
|
-
left: `${
|
|
999
|
+
const u = {
|
|
1000
|
+
top: `${s.top + q}px`,
|
|
1001
|
+
left: `${s.left + m}px`
|
|
996
1002
|
};
|
|
997
|
-
return
|
|
1003
|
+
return s.width !== void 0 && ["top", "bottom"].includes(s.placement) && (u.width = `${s.width}px`), u;
|
|
998
1004
|
}), c = I(null);
|
|
999
1005
|
function i() {
|
|
1000
|
-
const
|
|
1001
|
-
if (
|
|
1002
|
-
const
|
|
1003
|
-
|
|
1006
|
+
const m = Y(e.anchor);
|
|
1007
|
+
if (m) {
|
|
1008
|
+
const q = At(m, c.value, e.placement, e.width);
|
|
1009
|
+
s.left = q.x, s.top = q.y, s.width = q.width, s.placement = q.placement;
|
|
1004
1010
|
}
|
|
1005
1011
|
}
|
|
1006
|
-
|
|
1007
|
-
let
|
|
1008
|
-
function
|
|
1009
|
-
const
|
|
1010
|
-
|
|
1012
|
+
C([() => a.value, () => e.placement], i);
|
|
1013
|
+
let h;
|
|
1014
|
+
function _() {
|
|
1015
|
+
const m = e.trigger === "hover" ? e.delay : 0;
|
|
1016
|
+
h || (h = window.setTimeout(() => s.visible = !0, m));
|
|
1011
1017
|
}
|
|
1012
|
-
function
|
|
1013
|
-
clearTimeout(
|
|
1018
|
+
function p() {
|
|
1019
|
+
clearTimeout(h), h = void 0, s.visible = !1;
|
|
1020
|
+
}
|
|
1021
|
+
function D() {
|
|
1022
|
+
a.value ? p() : _();
|
|
1014
1023
|
}
|
|
1015
|
-
|
|
1016
|
-
|
|
1024
|
+
let z;
|
|
1025
|
+
function Q() {
|
|
1026
|
+
window.clearTimeout(z), z = window.setTimeout(() => s.animating = !1, 200), n("leave");
|
|
1017
1027
|
}
|
|
1018
1028
|
let E;
|
|
1019
|
-
function
|
|
1020
|
-
|
|
1021
|
-
const
|
|
1022
|
-
if (
|
|
1029
|
+
function F() {
|
|
1030
|
+
ie(() => {
|
|
1031
|
+
const m = Y(e.anchor);
|
|
1032
|
+
if (m)
|
|
1023
1033
|
switch (e.trigger) {
|
|
1024
1034
|
case "click":
|
|
1025
|
-
|
|
1035
|
+
m.addEventListener("click", D);
|
|
1026
1036
|
break;
|
|
1027
1037
|
case "hover":
|
|
1028
|
-
|
|
1038
|
+
m.addEventListener("mouseenter", _), m.addEventListener("mouseleave", p);
|
|
1029
1039
|
break;
|
|
1030
1040
|
}
|
|
1031
1041
|
});
|
|
1032
1042
|
}
|
|
1033
|
-
function
|
|
1034
|
-
|
|
1035
|
-
const
|
|
1036
|
-
|
|
1043
|
+
function d() {
|
|
1044
|
+
ie(() => {
|
|
1045
|
+
const m = Y(e.anchor);
|
|
1046
|
+
m && (window.addEventListener("scroll", i), window.addEventListener("resize", i), E = new MutationObserver(i), E.observe(m, {
|
|
1037
1047
|
attributes: !1,
|
|
1038
1048
|
childList: !0,
|
|
1039
1049
|
characterData: !0,
|
|
@@ -1041,70 +1051,73 @@ const zt = {
|
|
|
1041
1051
|
}), i());
|
|
1042
1052
|
});
|
|
1043
1053
|
}
|
|
1044
|
-
function
|
|
1054
|
+
function S() {
|
|
1045
1055
|
window.removeEventListener("scroll", i), window.removeEventListener("resize", i), E == null || E.disconnect();
|
|
1046
1056
|
}
|
|
1047
|
-
let
|
|
1048
|
-
function
|
|
1049
|
-
|
|
1057
|
+
let y;
|
|
1058
|
+
function L() {
|
|
1059
|
+
Y(e.anchor) ? (i(), y = window.setTimeout(L, 100)) : p();
|
|
1050
1060
|
}
|
|
1051
|
-
function
|
|
1052
|
-
|
|
1061
|
+
function J() {
|
|
1062
|
+
d(), e.spy && L();
|
|
1053
1063
|
}
|
|
1054
|
-
function
|
|
1055
|
-
|
|
1064
|
+
function W() {
|
|
1065
|
+
S(), e.spy && (clearTimeout(y), y = void 0);
|
|
1056
1066
|
}
|
|
1057
|
-
return
|
|
1067
|
+
return qe(W), Ie(i), C(
|
|
1058
1068
|
() => e.disabled,
|
|
1059
|
-
(
|
|
1060
|
-
|
|
1069
|
+
(m) => {
|
|
1070
|
+
m || F();
|
|
1061
1071
|
},
|
|
1062
1072
|
{ immediate: !0 }
|
|
1063
|
-
),
|
|
1064
|
-
() =>
|
|
1065
|
-
(
|
|
1066
|
-
|
|
1073
|
+
), C(
|
|
1074
|
+
() => a.value,
|
|
1075
|
+
(m) => {
|
|
1076
|
+
m ? J() : W();
|
|
1067
1077
|
},
|
|
1068
1078
|
{ immediate: !0 }
|
|
1069
|
-
), (
|
|
1070
|
-
x(
|
|
1071
|
-
(r(),
|
|
1079
|
+
), (m, q) => (r(), f(O, null, [
|
|
1080
|
+
x(m.$slots, "trigger", { open: a.value }),
|
|
1081
|
+
a.value || s.animating ? (r(), $(De, {
|
|
1082
|
+
key: 0,
|
|
1083
|
+
disabled: !e.attach,
|
|
1072
1084
|
to: e.attach
|
|
1073
1085
|
}, [
|
|
1074
|
-
|
|
1086
|
+
H(Te, {
|
|
1075
1087
|
name: e.transition,
|
|
1076
1088
|
appear: "",
|
|
1077
|
-
onEnter:
|
|
1078
|
-
onLeave:
|
|
1089
|
+
onEnter: q[0] || (q[0] = (u) => n("enter")),
|
|
1090
|
+
onLeave: Q
|
|
1079
1091
|
}, {
|
|
1080
|
-
default:
|
|
1081
|
-
|
|
1092
|
+
default: T(() => [
|
|
1093
|
+
a.value ? (r(), f("div", {
|
|
1082
1094
|
key: 0,
|
|
1083
|
-
class:
|
|
1084
|
-
style:
|
|
1095
|
+
class: V(o.value),
|
|
1096
|
+
style: K(l.value)
|
|
1085
1097
|
}, [
|
|
1086
|
-
|
|
1087
|
-
class:
|
|
1098
|
+
N("div", {
|
|
1099
|
+
class: V(["q-overlay__content"]),
|
|
1088
1100
|
ref_key: "overlay",
|
|
1089
1101
|
ref: c
|
|
1090
1102
|
}, [
|
|
1091
|
-
e.arrow ? (r(), f("div",
|
|
1092
|
-
x(
|
|
1103
|
+
e.arrow ? (r(), f("div", Qt)) : b("", !0),
|
|
1104
|
+
x(m.$slots, "default")
|
|
1093
1105
|
], 512)
|
|
1094
1106
|
], 6)) : b("", !0)
|
|
1095
1107
|
]),
|
|
1096
1108
|
_: 3
|
|
1097
1109
|
}, 8, ["name"])
|
|
1098
|
-
], 8, ["to"]))
|
|
1110
|
+
], 8, ["disabled", "to"])) : b("", !0)
|
|
1099
1111
|
], 64));
|
|
1100
1112
|
}
|
|
1101
|
-
}), ae =
|
|
1113
|
+
}), ae = w(Ot), Ft = {
|
|
1102
1114
|
key: 0,
|
|
1103
1115
|
class: "q-popover__header"
|
|
1104
|
-
},
|
|
1116
|
+
}, Mt = {
|
|
1105
1117
|
key: 1,
|
|
1106
1118
|
class: "q-popover__body"
|
|
1107
|
-
},
|
|
1119
|
+
}, Rt = ["innerHTML"], Ht = { key: 1 }, Ut = /* @__PURE__ */ k({
|
|
1120
|
+
inheritAttrs: !1,
|
|
1108
1121
|
__name: "QPopover",
|
|
1109
1122
|
props: {
|
|
1110
1123
|
modelValue: { type: Boolean },
|
|
@@ -1120,7 +1133,7 @@ const zt = {
|
|
|
1120
1133
|
},
|
|
1121
1134
|
setup(t) {
|
|
1122
1135
|
const n = t;
|
|
1123
|
-
return (e, o) => (r(),
|
|
1136
|
+
return (e, o) => (r(), $(g(ae), {
|
|
1124
1137
|
"model-value": n.modelValue,
|
|
1125
1138
|
trigger: "click",
|
|
1126
1139
|
anchor: n.anchor,
|
|
@@ -1131,23 +1144,28 @@ const zt = {
|
|
|
1131
1144
|
placement: n.placement,
|
|
1132
1145
|
spy: n.spy
|
|
1133
1146
|
}, {
|
|
1134
|
-
default:
|
|
1135
|
-
n.title || e.$slots.header ? (r(), f("h3",
|
|
1136
|
-
|
|
1147
|
+
default: T(() => [
|
|
1148
|
+
n.title || e.$slots.header ? (r(), f("h3", Ft, [
|
|
1149
|
+
X(A(n.title) + " ", 1),
|
|
1137
1150
|
x(e.$slots, "header")
|
|
1138
1151
|
])) : b("", !0),
|
|
1139
|
-
n.text || e.$slots.body ? (r(), f("div",
|
|
1152
|
+
n.text || e.$slots.body ? (r(), f("div", Mt, [
|
|
1140
1153
|
n.html ? (r(), f("span", {
|
|
1141
1154
|
key: 0,
|
|
1142
1155
|
innerHTML: n.text
|
|
1143
|
-
}, null, 8,
|
|
1156
|
+
}, null, 8, Rt)) : (r(), f("span", Ht, A(n.text), 1)),
|
|
1144
1157
|
x(e.$slots, "body")
|
|
1145
1158
|
])) : b("", !0)
|
|
1146
1159
|
]),
|
|
1147
1160
|
_: 3
|
|
1148
1161
|
}, 8, ["model-value", "anchor", "arrow", "attach", "disabled", "placement", "spy"]));
|
|
1149
1162
|
}
|
|
1150
|
-
}),
|
|
1163
|
+
}), an = w(Ut);
|
|
1164
|
+
function Nt() {
|
|
1165
|
+
const t = Ee(), n = {};
|
|
1166
|
+
return typeof t.class == "string" ? n.class = t.class.split(" ") : Array.isArray(t.class) ? n.class = t.class : n.class = [], n;
|
|
1167
|
+
}
|
|
1168
|
+
const Kt = {
|
|
1151
1169
|
mounted(t, n) {
|
|
1152
1170
|
t.clickOutsideEvent = function(e) {
|
|
1153
1171
|
const o = e.target;
|
|
@@ -1157,22 +1175,23 @@ const zt = {
|
|
|
1157
1175
|
unmounted(t) {
|
|
1158
1176
|
document.removeEventListener("click", t.clickOutsideEvent);
|
|
1159
1177
|
}
|
|
1160
|
-
},
|
|
1178
|
+
}, Wt = {
|
|
1161
1179
|
key: 0,
|
|
1162
1180
|
class: "q-select__value"
|
|
1163
|
-
},
|
|
1181
|
+
}, Gt = {
|
|
1164
1182
|
key: 1,
|
|
1165
1183
|
class: "q-select__placeholder"
|
|
1166
|
-
},
|
|
1184
|
+
}, Yt = {
|
|
1167
1185
|
placeholder: "Choose..."
|
|
1168
|
-
},
|
|
1186
|
+
}, Xt = {
|
|
1169
1187
|
chevron: {
|
|
1170
1188
|
icon: "chevron-down"
|
|
1171
1189
|
},
|
|
1172
1190
|
clear: {
|
|
1173
1191
|
icon: "close"
|
|
1174
1192
|
}
|
|
1175
|
-
},
|
|
1193
|
+
}, Zt = /* @__PURE__ */ k({
|
|
1194
|
+
inheritAttrs: !1,
|
|
1176
1195
|
__name: "QSelect",
|
|
1177
1196
|
props: {
|
|
1178
1197
|
modelValue: { type: [String, Number, Boolean, Symbol], default: void 0 },
|
|
@@ -1180,169 +1199,170 @@ const zt = {
|
|
|
1180
1199
|
readonly: { type: Boolean },
|
|
1181
1200
|
disabled: { type: Boolean, default: !1 },
|
|
1182
1201
|
loading: { type: Boolean, default: !1 },
|
|
1183
|
-
icons: { default: () =>
|
|
1202
|
+
icons: { default: () => Xt },
|
|
1184
1203
|
items: {},
|
|
1185
1204
|
groups: { default: () => [] },
|
|
1186
1205
|
itemValue: { default: "key" },
|
|
1187
1206
|
itemLabel: { default: "label" },
|
|
1188
1207
|
size: { default: "medium" },
|
|
1189
|
-
texts: { default: () =>
|
|
1208
|
+
texts: { default: () => Yt }
|
|
1190
1209
|
},
|
|
1191
1210
|
emits: ["update:modelValue", "before-show", "before-hide", "show", "hide"],
|
|
1192
1211
|
setup(t, { emit: n }) {
|
|
1193
|
-
const e = t, o = I(e.modelValue), a = I(!1),
|
|
1212
|
+
const e = t, o = Nt(), s = I(e.modelValue), a = I(!1), l = I(""), c = I(null), i = I(null), h = I(null), _ = v(
|
|
1194
1213
|
() => {
|
|
1195
|
-
var
|
|
1196
|
-
return (
|
|
1214
|
+
var u;
|
|
1215
|
+
return (u = e.items) == null ? void 0 : u.find((B) => B[e.itemValue] === s.value);
|
|
1197
1216
|
}
|
|
1198
|
-
),
|
|
1199
|
-
() =>
|
|
1200
|
-
),
|
|
1217
|
+
), p = v(
|
|
1218
|
+
() => _.value ? _.value[e.itemLabel] : ""
|
|
1219
|
+
), D = v(
|
|
1201
1220
|
() => e.clearable && !e.readonly && !e.disabled && !e.loading
|
|
1202
1221
|
);
|
|
1203
|
-
function
|
|
1204
|
-
|
|
1222
|
+
function z(u) {
|
|
1223
|
+
s.value = u, n("update:modelValue", u), S();
|
|
1205
1224
|
}
|
|
1206
|
-
function
|
|
1207
|
-
|
|
1225
|
+
function Q() {
|
|
1226
|
+
D.value && z(void 0);
|
|
1208
1227
|
}
|
|
1209
|
-
function
|
|
1210
|
-
e.readonly || e.disabled || (a.value ?
|
|
1228
|
+
function E() {
|
|
1229
|
+
e.readonly || e.disabled || (a.value ? S() : d());
|
|
1211
1230
|
}
|
|
1212
|
-
function F(
|
|
1213
|
-
var
|
|
1214
|
-
(
|
|
1231
|
+
function F(u) {
|
|
1232
|
+
var B;
|
|
1233
|
+
(B = c.value) != null && B.$el.contains(u.target) || S();
|
|
1215
1234
|
}
|
|
1216
|
-
function
|
|
1235
|
+
function d() {
|
|
1217
1236
|
a.value || (n("before-show"), a.value = !0);
|
|
1218
1237
|
}
|
|
1219
|
-
function
|
|
1238
|
+
function S() {
|
|
1220
1239
|
a.value && (n("before-hide"), a.value = !1);
|
|
1221
1240
|
}
|
|
1222
|
-
let
|
|
1223
|
-
function
|
|
1224
|
-
if (!(!
|
|
1225
|
-
if (window.clearTimeout(
|
|
1226
|
-
|
|
1227
|
-
for (let
|
|
1228
|
-
if (e.items[
|
|
1229
|
-
|
|
1241
|
+
let y;
|
|
1242
|
+
function L(u) {
|
|
1243
|
+
if (!(!u.key || e.readonly || e.disabled)) {
|
|
1244
|
+
if (window.clearTimeout(y), ["Enter", " ", "ArrowDown", "ArrowUp", "Home", "End"].includes(u.key) && (u.preventDefault(), u.stopPropagation()), ["Enter", " "].includes(u.key) && (a.value = !0), ["Escape", "Tab"].includes(u.key) && (a.value ? a.value = !1 : e.clearable && u.key === "Escape" && Q()), u.key === "Delete" && e.clearable && Q(), /^[a-z]$/i.test(u.key)) {
|
|
1245
|
+
l.value += u.key.toLowerCase();
|
|
1246
|
+
for (let B = 0; B < e.items.length; B++)
|
|
1247
|
+
if (e.items[B][e.itemLabel].toLowerCase().startsWith(l.value)) {
|
|
1248
|
+
q(B);
|
|
1230
1249
|
break;
|
|
1231
1250
|
}
|
|
1232
1251
|
}
|
|
1233
|
-
|
|
1234
|
-
|
|
1252
|
+
y = window.setTimeout(function() {
|
|
1253
|
+
l.value = "";
|
|
1235
1254
|
}, 500);
|
|
1236
1255
|
}
|
|
1237
1256
|
}
|
|
1238
|
-
function
|
|
1239
|
-
var
|
|
1240
|
-
(
|
|
1257
|
+
function J() {
|
|
1258
|
+
var u;
|
|
1259
|
+
(u = i.value) == null || u.$el.focus(), n("show");
|
|
1241
1260
|
}
|
|
1242
|
-
function
|
|
1243
|
-
|
|
1261
|
+
function W() {
|
|
1262
|
+
m(), n("hide");
|
|
1244
1263
|
}
|
|
1245
|
-
function
|
|
1246
|
-
var
|
|
1247
|
-
(
|
|
1264
|
+
function m() {
|
|
1265
|
+
var u;
|
|
1266
|
+
(u = c.value) == null || u.$el.focus();
|
|
1248
1267
|
}
|
|
1249
|
-
function
|
|
1250
|
-
var
|
|
1251
|
-
(
|
|
1268
|
+
function q(u) {
|
|
1269
|
+
var B;
|
|
1270
|
+
(B = i.value) == null || B.focusItem(u);
|
|
1252
1271
|
}
|
|
1253
|
-
return
|
|
1272
|
+
return C(
|
|
1254
1273
|
() => e.modelValue,
|
|
1255
|
-
(
|
|
1256
|
-
|
|
1274
|
+
(u) => {
|
|
1275
|
+
s.value = u;
|
|
1257
1276
|
}
|
|
1258
|
-
), (
|
|
1259
|
-
var
|
|
1260
|
-
return r(), f(
|
|
1261
|
-
|
|
1277
|
+
), (u, B) => {
|
|
1278
|
+
var P, le;
|
|
1279
|
+
return r(), f(O, null, [
|
|
1280
|
+
H(g(yt), {
|
|
1262
1281
|
ref_key: "inputRef",
|
|
1263
|
-
ref:
|
|
1282
|
+
ref: c,
|
|
1264
1283
|
role: "combobox",
|
|
1265
1284
|
tabindex: "0",
|
|
1266
|
-
class:
|
|
1285
|
+
class: V([
|
|
1267
1286
|
"q-select",
|
|
1268
1287
|
{
|
|
1269
1288
|
"q-select--readonly": e.readonly,
|
|
1270
1289
|
"q-select--disabled": e.disabled,
|
|
1271
1290
|
"q-select--expanded": a.value
|
|
1272
|
-
}
|
|
1291
|
+
},
|
|
1292
|
+
...g(o).class
|
|
1273
1293
|
]),
|
|
1274
1294
|
readonly: "",
|
|
1275
1295
|
disabled: e.disabled,
|
|
1276
1296
|
"aria-expanded": a.value,
|
|
1277
1297
|
"aria-haspopup": "listbox",
|
|
1278
1298
|
size: e.size,
|
|
1279
|
-
onClick:
|
|
1280
|
-
onKeydown:
|
|
1281
|
-
},
|
|
1282
|
-
append:
|
|
1283
|
-
|
|
1299
|
+
onClick: E,
|
|
1300
|
+
onKeydown: R(L, ["stop"])
|
|
1301
|
+
}, Ce({
|
|
1302
|
+
append: T(() => [
|
|
1303
|
+
D.value && s.value ? (r(), $(g(U), Z({ key: 0 }, e.icons.clear, {
|
|
1284
1304
|
class: "q-select__clear",
|
|
1285
|
-
onClick:
|
|
1305
|
+
onClick: R(Q, ["stop", "prevent"])
|
|
1286
1306
|
}), null, 16, ["onClick"])) : b("", !0),
|
|
1287
|
-
!e.readonly && !e.disabled ? (r(),
|
|
1307
|
+
!e.readonly && !e.disabled ? (r(), $(g(U), Z({ key: 1 }, e.icons.chevron, { class: "q-select__chevron" }), null, 16)) : b("", !0)
|
|
1288
1308
|
]),
|
|
1289
|
-
default:
|
|
1290
|
-
|
|
1309
|
+
default: T(() => [
|
|
1310
|
+
s.value ? (r(), f("span", Wt, A(p.value), 1)) : (r(), f("span", Gt, A(u.texts.placeholder), 1))
|
|
1291
1311
|
]),
|
|
1292
1312
|
_: 2
|
|
1293
1313
|
}, [
|
|
1294
|
-
(
|
|
1314
|
+
(P = _.value) != null && P.icon ? {
|
|
1295
1315
|
name: "prepend",
|
|
1296
|
-
fn:
|
|
1297
|
-
var
|
|
1316
|
+
fn: T(() => {
|
|
1317
|
+
var G;
|
|
1298
1318
|
return [
|
|
1299
|
-
|
|
1319
|
+
H(g(U), ge(Ve((G = _.value) == null ? void 0 : G.icon)), null, 16)
|
|
1300
1320
|
];
|
|
1301
1321
|
}),
|
|
1302
1322
|
key: "0"
|
|
1303
1323
|
} : void 0
|
|
1304
1324
|
]), 1032, ["class", "disabled", "aria-expanded", "size", "onKeydown"]),
|
|
1305
|
-
|
|
1325
|
+
H(g(ae), {
|
|
1306
1326
|
"model-value": a.value,
|
|
1307
1327
|
spy: "",
|
|
1308
1328
|
trigger: "manual",
|
|
1309
1329
|
placement: "bottom",
|
|
1310
1330
|
width: "anchor",
|
|
1311
1331
|
offset: 2,
|
|
1312
|
-
anchor: (
|
|
1313
|
-
onEnter:
|
|
1314
|
-
onLeave:
|
|
1332
|
+
anchor: (le = c.value) == null ? void 0 : le.$el,
|
|
1333
|
+
onEnter: J,
|
|
1334
|
+
onLeave: W
|
|
1315
1335
|
}, {
|
|
1316
|
-
default:
|
|
1317
|
-
|
|
1336
|
+
default: T(() => [
|
|
1337
|
+
Ae((r(), f("div", {
|
|
1318
1338
|
ref_key: "contentRef",
|
|
1319
|
-
ref:
|
|
1339
|
+
ref: h,
|
|
1320
1340
|
class: "q-select__body"
|
|
1321
1341
|
}, [
|
|
1322
|
-
x(
|
|
1323
|
-
e.loading ? (r(),
|
|
1342
|
+
x(u.$slots, "body.prepend"),
|
|
1343
|
+
e.loading ? (r(), $(g(Se), {
|
|
1324
1344
|
key: 0,
|
|
1325
1345
|
class: "q-select__loader",
|
|
1326
1346
|
size: 24
|
|
1327
|
-
})) : (r(),
|
|
1347
|
+
})) : (r(), $(g(Et), {
|
|
1328
1348
|
key: 1,
|
|
1329
1349
|
ref_key: "listRef",
|
|
1330
|
-
ref:
|
|
1350
|
+
ref: i,
|
|
1331
1351
|
class: "q-select__items",
|
|
1332
|
-
modelValue:
|
|
1352
|
+
modelValue: s.value,
|
|
1333
1353
|
"onUpdate:modelValue": [
|
|
1334
|
-
|
|
1335
|
-
|
|
1354
|
+
B[0] || (B[0] = (G) => s.value = G),
|
|
1355
|
+
z
|
|
1336
1356
|
],
|
|
1337
1357
|
items: e.items,
|
|
1338
|
-
groups:
|
|
1358
|
+
groups: u.groups,
|
|
1339
1359
|
"item-label": e.itemLabel,
|
|
1340
1360
|
"item-value": e.itemValue,
|
|
1341
|
-
onKeydown:
|
|
1361
|
+
onKeydown: R(L, ["stop"])
|
|
1342
1362
|
}, null, 8, ["modelValue", "items", "groups", "item-label", "item-value", "onKeydown"])),
|
|
1343
|
-
x(
|
|
1363
|
+
x(u.$slots, "body.append")
|
|
1344
1364
|
])), [
|
|
1345
|
-
[g(
|
|
1365
|
+
[g(Kt), F]
|
|
1346
1366
|
])
|
|
1347
1367
|
]),
|
|
1348
1368
|
_: 3
|
|
@@ -1350,7 +1370,8 @@ const zt = {
|
|
|
1350
1370
|
], 64);
|
|
1351
1371
|
};
|
|
1352
1372
|
}
|
|
1353
|
-
}),
|
|
1373
|
+
}), ln = w(Zt), jt = ["innerHTML"], Jt = { key: 1 }, Pt = /* @__PURE__ */ k({
|
|
1374
|
+
inheritAttrs: !1,
|
|
1354
1375
|
__name: "QTooltip",
|
|
1355
1376
|
props: {
|
|
1356
1377
|
modelValue: { type: Boolean },
|
|
@@ -1367,7 +1388,7 @@ const zt = {
|
|
|
1367
1388
|
},
|
|
1368
1389
|
setup(t) {
|
|
1369
1390
|
const n = t;
|
|
1370
|
-
return (e, o) => (r(),
|
|
1391
|
+
return (e, o) => (r(), $(g(ae), {
|
|
1371
1392
|
"model-value": n.modelValue,
|
|
1372
1393
|
anchor: n.anchor,
|
|
1373
1394
|
appearance: n.appearance,
|
|
@@ -1379,38 +1400,38 @@ const zt = {
|
|
|
1379
1400
|
placement: n.placement,
|
|
1380
1401
|
trigger: n.trigger
|
|
1381
1402
|
}, {
|
|
1382
|
-
default:
|
|
1403
|
+
default: T(() => [
|
|
1383
1404
|
n.html ? (r(), f("span", {
|
|
1384
1405
|
key: 0,
|
|
1385
1406
|
innerHTML: n.text
|
|
1386
|
-
}, null, 8,
|
|
1407
|
+
}, null, 8, jt)) : (r(), f("span", Jt, A(n.text), 1))
|
|
1387
1408
|
]),
|
|
1388
1409
|
_: 1
|
|
1389
1410
|
}, 8, ["model-value", "anchor", "appearance", "arrow", "attach", "delay", "disabled", "placement", "trigger"]));
|
|
1390
1411
|
}
|
|
1391
|
-
}),
|
|
1412
|
+
}), rn = w(Pt);
|
|
1392
1413
|
export {
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1414
|
+
Je as QButton,
|
|
1415
|
+
et as QButtonGroup,
|
|
1416
|
+
on as QButtonToggle,
|
|
1417
|
+
U as QIcon,
|
|
1418
|
+
ut as QIconFont,
|
|
1419
|
+
dt as QIconImg,
|
|
1420
|
+
ft as QIconSvg,
|
|
1421
|
+
yt as QInput,
|
|
1422
|
+
sn as QLineLoader,
|
|
1423
|
+
Et as QList,
|
|
1424
|
+
Ct as QListItem,
|
|
1425
|
+
Vt as QListItemGroup,
|
|
1405
1426
|
ae as QOverlay,
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1427
|
+
an as QPopover,
|
|
1428
|
+
ln as QSelect,
|
|
1429
|
+
Se as QSpinnerLoader,
|
|
1430
|
+
rn as QTooltip,
|
|
1431
|
+
Kt as clickOutside,
|
|
1432
|
+
nn as createFramework,
|
|
1433
|
+
Oe as defaultDarkColorScheme,
|
|
1434
|
+
ue as defaultLightColorScheme,
|
|
1435
|
+
tn as useTheme
|
|
1415
1436
|
};
|
|
1416
1437
|
//# sourceMappingURL=ui.esm.js.map
|