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