@quidgest/ui 0.5.19 → 0.6.1
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 +68 -27
- package/dist/ui.esm.js +669 -570
- 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 +50 -49
- package/dist/ui.min.js.map +1 -1
- package/dist/ui.scss +59 -26
- package/package.json +3 -1
package/dist/ui.esm.js
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
import { getCurrentInstance as
|
|
2
|
-
function
|
|
1
|
+
import { getCurrentInstance as be, computed as y, ref as B, provide as De, inject as ge, watch as I, defineComponent as w, openBlock as r, createElementBlock as f, normalizeStyle as Y, createElementVNode as V, normalizeClass as Q, withModifiers as K, createVNode as J, unref as b, createCommentVNode as g, Fragment as F, createTextVNode as P, toDisplayString as C, renderSlot as q, toRef as oe, createBlock as k, withCtx as D, renderList as le, mergeProps as G, resolveDynamicComponent as _e, h as ue, normalizeProps as ke, reactive as Ee, onBeforeUnmount as Ie, onMounted as Ve, Teleport as Ce, Transition as ze, nextTick as se, useAttrs as Ae, createSlots as Qe, guardReactiveProps as Fe, withDirectives as Oe, vModelText as Re } from "vue";
|
|
2
|
+
function re(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 fe(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
|
-
|
|
17
|
-
|
|
13
|
+
const a = t[o], l = n[o];
|
|
14
|
+
if (fe(a) && fe(l)) {
|
|
15
|
+
e[o] = we(
|
|
16
|
+
a,
|
|
17
|
+
l
|
|
18
18
|
);
|
|
19
19
|
continue;
|
|
20
20
|
}
|
|
21
|
-
e[o] =
|
|
21
|
+
e[o] = l;
|
|
22
22
|
}
|
|
23
23
|
return e;
|
|
24
24
|
}
|
|
25
|
-
const
|
|
26
|
-
function
|
|
27
|
-
const t =
|
|
25
|
+
const ie = "q-defaults";
|
|
26
|
+
function Me() {
|
|
27
|
+
const t = be();
|
|
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 He(t) {
|
|
40
|
+
if (re(t))
|
|
41
41
|
return;
|
|
42
|
-
const n =
|
|
43
|
-
|
|
42
|
+
const n = $e(), e = B(t), o = y(() => re(e.value) ? n.value : we(n.value, e.value));
|
|
43
|
+
De(ie, o);
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
const t =
|
|
45
|
+
function $e() {
|
|
46
|
+
const t = ge(ie, 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 pe = {
|
|
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
|
+
}, Ue = {
|
|
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 Ne(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), xe(e);
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function Ke(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, xe(e);
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function me(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, a = Math.max(n, e, o), l = Math.min(n, e, o);
|
|
141
|
+
let s = 0, d;
|
|
142
|
+
const i = (a + l) / 2;
|
|
143
|
+
if (a === l)
|
|
144
|
+
s = d = 0;
|
|
145
145
|
else {
|
|
146
|
-
const
|
|
147
|
-
switch (
|
|
146
|
+
const p = a - l;
|
|
147
|
+
switch (d = i > 0.5 ? p / (2 - a - l) : p / (a + l), a) {
|
|
148
148
|
case n:
|
|
149
|
-
|
|
149
|
+
s = (e - o) / p + (e < o ? 6 : 0);
|
|
150
150
|
break;
|
|
151
151
|
case e:
|
|
152
|
-
|
|
152
|
+
s = (o - n) / p + 2;
|
|
153
153
|
break;
|
|
154
154
|
case o:
|
|
155
|
-
|
|
155
|
+
s = (n - e) / p + 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 xe(t) {
|
|
167
167
|
const n = t.h / 360, e = t.s / 100, o = t.l / 100;
|
|
168
|
-
let
|
|
168
|
+
let a, l, s;
|
|
169
169
|
if (e === 0)
|
|
170
|
-
|
|
170
|
+
a = l = 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
|
+
a = ae(i, d, n + 1 / 3), l = ae(i, d, n), s = ae(i, d, n - 1 / 3);
|
|
174
174
|
}
|
|
175
175
|
return {
|
|
176
|
-
r: Math.round(
|
|
177
|
-
g: Math.round(
|
|
178
|
-
b: Math.round(
|
|
176
|
+
r: Math.round(a * 255),
|
|
177
|
+
g: Math.round(l * 255),
|
|
178
|
+
b: Math.round(s * 255)
|
|
179
179
|
};
|
|
180
180
|
}
|
|
181
|
-
function
|
|
181
|
+
function ae(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 ee = "q-theme";
|
|
185
|
+
function un() {
|
|
186
|
+
const t = ge(ee);
|
|
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 We(t, n) {
|
|
192
192
|
let e = null;
|
|
193
193
|
if (n)
|
|
194
194
|
for (const o of n.themes) {
|
|
195
|
-
const
|
|
195
|
+
const a = o.mode === "light" ? pe : Ue;
|
|
196
196
|
if (o.colors) {
|
|
197
|
-
let
|
|
198
|
-
for (
|
|
199
|
-
const
|
|
200
|
-
if (
|
|
201
|
-
const
|
|
202
|
-
i in o.colors || (o.colors[i] =
|
|
197
|
+
let l;
|
|
198
|
+
for (l in o.colors) {
|
|
199
|
+
const s = o.colors[l];
|
|
200
|
+
if (s && !l.startsWith("on") && !l.endsWith("Light") && !l.endsWith("Dark")) {
|
|
201
|
+
const d = Se(s), i = `${l}Light`, p = `${l}Dark`;
|
|
202
|
+
i in o.colors || (o.colors[i] = me(Ne(d, 85))), p in o.colors || (o.colors[p] = me(Ke(d, 25)));
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
|
-
o.colors =
|
|
206
|
+
o.colors = Ge(a, 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: pe
|
|
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 = B({
|
|
221
221
|
activeTheme: e.name,
|
|
222
222
|
themes: n.themes
|
|
223
223
|
});
|
|
224
|
-
|
|
224
|
+
I(
|
|
225
225
|
() => o.value.activeTheme,
|
|
226
|
-
(
|
|
227
|
-
const
|
|
228
|
-
|
|
226
|
+
(a) => {
|
|
227
|
+
const l = o.value.themes.find((s) => s.name === a);
|
|
228
|
+
l && Ye(l.colors);
|
|
229
229
|
},
|
|
230
230
|
{ immediate: !0 }
|
|
231
|
-
), t.provide(
|
|
231
|
+
), t.provide(ee, o);
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
|
-
function
|
|
234
|
+
function Ge(t, n = {}) {
|
|
235
235
|
return { ...t, ...n };
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function Ye(t) {
|
|
238
238
|
let n = document.getElementById(
|
|
239
|
-
|
|
239
|
+
ee
|
|
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 = ee, 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 a = t[o];
|
|
246
|
+
if (a) {
|
|
247
|
+
e += ` ${he(o)}: ${a};
|
|
248
248
|
`;
|
|
249
|
-
const
|
|
250
|
-
e += ` ${
|
|
249
|
+
const l = Se(a);
|
|
250
|
+
e += ` ${he(o)}-rgb: ${l.r} ${l.g} ${l.b};
|
|
251
251
|
`;
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
254
|
e += "}", n.textContent = e;
|
|
255
255
|
}
|
|
256
|
-
function
|
|
256
|
+
function he(t) {
|
|
257
257
|
return t ? `--q-theme-${t.replace(/([A-Z])/g, "-$1").replace(/^-/, "").toLowerCase()}` : "";
|
|
258
258
|
}
|
|
259
|
-
function
|
|
259
|
+
function fn(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(
|
|
267
|
-
const
|
|
268
|
-
e.provide(
|
|
262
|
+
for (const s in o)
|
|
263
|
+
e.component(s, o[s]);
|
|
264
|
+
const a = t.directives || {};
|
|
265
|
+
for (const s in a)
|
|
266
|
+
e.directive(s, a[s]);
|
|
267
|
+
const l = t.defaults || {};
|
|
268
|
+
e.provide(ie, B(l)), We(e, t.themes);
|
|
269
269
|
} };
|
|
270
270
|
}
|
|
271
|
-
const
|
|
272
|
-
/* @__PURE__ */
|
|
271
|
+
const Xe = /* @__PURE__ */ V("svg", { viewBox: "25 25 50 50" }, [
|
|
272
|
+
/* @__PURE__ */ V("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), Ze = [
|
|
283
|
+
Xe
|
|
284
|
+
], je = /* @__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, a) => (r(), f("div", {
|
|
294
294
|
class: "q-spinner-loader",
|
|
295
|
-
style:
|
|
296
|
-
},
|
|
295
|
+
style: Y(e.value)
|
|
296
|
+
}, Ze, 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 a = Me();
|
|
307
|
+
if (re(a.value))
|
|
308
308
|
return n(e, o);
|
|
309
|
-
const
|
|
310
|
-
if (
|
|
309
|
+
const l = be();
|
|
310
|
+
if (l === null)
|
|
311
311
|
return n(e, o);
|
|
312
|
-
const
|
|
313
|
-
get(
|
|
314
|
-
var
|
|
315
|
-
const
|
|
316
|
-
return typeof i == "string" && !
|
|
312
|
+
const s = new Proxy(e, {
|
|
313
|
+
get(d, i) {
|
|
314
|
+
var m;
|
|
315
|
+
const p = Reflect.get(d, i), S = (m = a.value) == null ? void 0 : m[i];
|
|
316
|
+
return typeof i == "string" && !Je(l.vnode, i) ? S ?? p : p;
|
|
317
317
|
}
|
|
318
318
|
});
|
|
319
|
-
return n(
|
|
319
|
+
return n(s, o);
|
|
320
320
|
}), t;
|
|
321
321
|
}
|
|
322
|
-
const
|
|
322
|
+
const Be = $(je), Pe = ["disabled", "onClick"], et = {
|
|
323
323
|
key: 0,
|
|
324
324
|
class: "q-btn__spinner"
|
|
325
|
-
},
|
|
325
|
+
}, tt = { class: "q-btn__content" }, nt = /* @__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 a(s) {
|
|
343
|
+
o.value || n("click", s);
|
|
344
344
|
}
|
|
345
|
-
const
|
|
346
|
-
const
|
|
345
|
+
const l = 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(), f("button", {
|
|
361
361
|
type: "button",
|
|
362
|
-
class:
|
|
362
|
+
class: Q(l.value),
|
|
363
363
|
disabled: o.value,
|
|
364
|
-
onClick:
|
|
364
|
+
onClick: K(a, ["stop", "prevent"])
|
|
365
365
|
}, [
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
])) :
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
], 64)) :
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
366
|
+
s.loading ? (r(), f("div", et, [
|
|
367
|
+
J(b(Be), { size: 23 })
|
|
368
|
+
])) : g("", !0),
|
|
369
|
+
V("span", tt, [
|
|
370
|
+
s.iconOnRight ? (r(), f(F, { key: 0 }, [
|
|
371
|
+
P(C(e.label), 1)
|
|
372
|
+
], 64)) : g("", !0),
|
|
373
|
+
q(s.$slots, "default"),
|
|
374
|
+
s.iconOnRight ? g("", !0) : (r(), f(F, { key: 1 }, [
|
|
375
|
+
P(C(e.label), 1)
|
|
376
376
|
], 64))
|
|
377
377
|
])
|
|
378
|
-
], 10,
|
|
378
|
+
], 10, Pe));
|
|
379
379
|
}
|
|
380
|
-
}),
|
|
380
|
+
}), ot = $(nt), at = /* @__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
|
+
He({
|
|
391
391
|
QButton: {
|
|
392
|
-
bStyle:
|
|
393
|
-
disabled:
|
|
394
|
-
borderless:
|
|
392
|
+
bStyle: oe(n, "bStyle"),
|
|
393
|
+
disabled: oe(n, "disabled"),
|
|
394
|
+
borderless: oe(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, a) => (r(), f("div", {
|
|
405
|
+
class: Q(e.value)
|
|
406
406
|
}, [
|
|
407
|
-
|
|
407
|
+
q(o.$slots, "default")
|
|
408
408
|
], 2));
|
|
409
409
|
}
|
|
410
|
-
}),
|
|
410
|
+
}), lt = $(at), st = /* @__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 = B(e.modelValue);
|
|
423
|
+
I(
|
|
424
424
|
() => e.modelValue,
|
|
425
|
-
(
|
|
425
|
+
(s) => o.value = s
|
|
426
426
|
);
|
|
427
|
-
const
|
|
427
|
+
const a = 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
|
|
436
|
-
|
|
435
|
+
function l(s) {
|
|
436
|
+
a.value === s.key && !e.mandatory ? a.value = void 0 : a.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), f(
|
|
444
|
+
default: D(() => [
|
|
445
|
+
(r(!0), f(F, null, le(e.options, (i) => (r(), k(b(ot), {
|
|
446
446
|
key: i.key,
|
|
447
447
|
title: i.title,
|
|
448
448
|
label: i.label,
|
|
449
|
-
active:
|
|
450
|
-
onClick: (
|
|
449
|
+
active: a.value === i.key,
|
|
450
|
+
onClick: (p) => l(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
|
+
}), pn = $(st);
|
|
462
|
+
let rt = 0;
|
|
463
|
+
function te() {
|
|
464
|
+
return `uid-${++rt}`;
|
|
465
|
+
}
|
|
466
|
+
const it = ["for", "data-val-required"], dt = ["id"], ct = { class: "q-field__control" }, ut = {
|
|
467
|
+
key: 0,
|
|
468
|
+
class: "q-field__prepend"
|
|
469
|
+
}, ft = {
|
|
470
|
+
key: 1,
|
|
471
|
+
class: "q-field__append"
|
|
472
|
+
}, pt = {
|
|
473
|
+
key: 0,
|
|
474
|
+
class: "q-field__extras"
|
|
475
|
+
}, mt = /* @__PURE__ */ w({
|
|
476
|
+
__name: "QField",
|
|
477
|
+
props: {
|
|
478
|
+
id: { default: () => te() },
|
|
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 = B(null), a = y(() => e.required && !e.readonly && !e.disabled);
|
|
487
|
+
return n({
|
|
488
|
+
fieldRef: o
|
|
489
|
+
}), (l, s) => (r(), f(F, null, [
|
|
490
|
+
q(l.$slots, "label.prepend"),
|
|
491
|
+
V("label", {
|
|
492
|
+
class: "q-field__label",
|
|
493
|
+
for: e.id,
|
|
494
|
+
"data-val-required": a.value
|
|
495
|
+
}, C(e.label), 9, it),
|
|
496
|
+
q(l.$slots, "label.append"),
|
|
497
|
+
V("div", G({
|
|
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
|
+
}, l.$attrs), [
|
|
507
|
+
V("div", ct, [
|
|
508
|
+
l.$slots.prepend ? (r(), f("div", ut, [
|
|
509
|
+
q(l.$slots, "prepend")
|
|
510
|
+
])) : g("", !0),
|
|
511
|
+
q(l.$slots, "default"),
|
|
512
|
+
l.$slots.append ? (r(), f("div", ft, [
|
|
513
|
+
q(l.$slots, "append")
|
|
514
|
+
])) : g("", !0)
|
|
515
|
+
]),
|
|
516
|
+
l.$slots.extras ? (r(), f("div", pt, [
|
|
517
|
+
q(l.$slots, "extras")
|
|
518
|
+
])) : g("", !0)
|
|
519
|
+
], 16, dt)
|
|
520
|
+
], 64));
|
|
521
|
+
}
|
|
522
|
+
}), Le = $(mt), ht = /* @__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 qt;
|
|
473
534
|
case "font":
|
|
474
|
-
return
|
|
535
|
+
return $t;
|
|
475
536
|
case "img":
|
|
476
|
-
return
|
|
537
|
+
return St;
|
|
477
538
|
default:
|
|
478
539
|
return;
|
|
479
540
|
}
|
|
480
541
|
});
|
|
481
|
-
return (o,
|
|
542
|
+
return (o, a) => n.icon ? (r(), k(_e(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
|
+
}), yt = /* @__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), a = y(() => ({
|
|
497
558
|
"font-size": n.size !== void 0 ? `${n.size}px` : void 0
|
|
498
559
|
}));
|
|
499
|
-
return (
|
|
560
|
+
return (l, s) => o.value ? (r(), f("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: Y(a.value)
|
|
564
|
+
}, null, 6)) : g("", !0);
|
|
504
565
|
}
|
|
505
|
-
}),
|
|
566
|
+
}), vt = ["src"], bt = /* @__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, a) => n.icon ? (r(), f("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: Y(e.value)
|
|
581
|
+
}, null, 12, vt)) : g("", !0);
|
|
521
582
|
}
|
|
522
|
-
}),
|
|
583
|
+
}), N = {}, gt = 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 ue("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, ue("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)), _t(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
|
+
N[t] || (N[t] = kt(this.download(t))), this.svgElSource && N[t].getIsPending() && !this.keepDuringLoading && (this.svgElSource = null, this.$emit("unloaded"));
|
|
648
|
+
const n = await N[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 N[t], this.$emit("error", n);
|
|
591
652
|
}
|
|
592
653
|
},
|
|
593
654
|
/**
|
|
@@ -599,10 +660,10 @@ const Se = w(We), Ye = ["disabled", "onClick"], Xe = {
|
|
|
599
660
|
const n = await fetch(t);
|
|
600
661
|
if (!n.ok)
|
|
601
662
|
throw new Error("Error loading SVG");
|
|
602
|
-
const e = await n.text(),
|
|
603
|
-
if (!
|
|
663
|
+
const e = await n.text(), l = new DOMParser().parseFromString(e, "text/xml").getElementsByTagName("svg")[0];
|
|
664
|
+
if (!l)
|
|
604
665
|
throw new Error("Loaded file is not a valid SVG");
|
|
605
|
-
return
|
|
666
|
+
return l;
|
|
606
667
|
}
|
|
607
668
|
},
|
|
608
669
|
watch: {
|
|
@@ -611,7 +672,7 @@ const Se = w(We), Ye = ["disabled", "onClick"], Xe = {
|
|
|
611
672
|
}
|
|
612
673
|
}
|
|
613
674
|
});
|
|
614
|
-
function
|
|
675
|
+
function _t(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 kt(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 wt = /* @__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 (a, l) => e.icon ? (r(), k(b(gt), {
|
|
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:
|
|
654
|
-
onUnloaded:
|
|
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: Y(o.value),
|
|
714
|
+
onLoaded: l[0] || (l[0] = (s) => n("loaded", s)),
|
|
715
|
+
onUnloaded: l[1] || (l[1] = (s) => n("unloaded", s))
|
|
716
|
+
}, null, 8, ["src", "symbol", "style"])) : g("", !0);
|
|
687
717
|
}
|
|
688
|
-
}),
|
|
718
|
+
}), W = $(ht), $t = $(yt), St = $(bt), qt = $(wt), xt = (t, n) => {
|
|
689
719
|
const e = t.__vccOpts || t;
|
|
690
|
-
for (const [o,
|
|
691
|
-
e[o] =
|
|
720
|
+
for (const [o, a] of n)
|
|
721
|
+
e[o] = a;
|
|
692
722
|
return e;
|
|
693
|
-
},
|
|
694
|
-
function
|
|
695
|
-
return r(), f("div",
|
|
723
|
+
}, Bt = {}, Lt = { class: "q-line-loader" };
|
|
724
|
+
function Tt(t, n) {
|
|
725
|
+
return r(), f("div", Lt);
|
|
696
726
|
}
|
|
697
|
-
const
|
|
727
|
+
const Dt = /* @__PURE__ */ xt(Bt, [["render", Tt]]), mn = $(Dt), Et = /* @__PURE__ */ w({
|
|
698
728
|
__name: "QList",
|
|
699
729
|
props: {
|
|
700
730
|
modelValue: { type: [String, Number, Boolean, Symbol], default: void 0 },
|
|
@@ -706,91 +736,91 @@ 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, a = B(o.modelValue), l = y(() => s.value.length > 1 ? "div" : "ul"), s = y(() => o.groups.length ? o.groups : [{ title: "" }]), d = B(null);
|
|
740
|
+
function i(u) {
|
|
741
|
+
a.value = u, e("update:modelValue", u);
|
|
712
742
|
}
|
|
713
|
-
function
|
|
714
|
-
let
|
|
715
|
-
|
|
743
|
+
function p() {
|
|
744
|
+
let u = 0;
|
|
745
|
+
a.value && (u = o.items.findIndex((x) => x[o.itemValue] === a.value)), E(u);
|
|
716
746
|
}
|
|
717
|
-
function
|
|
718
|
-
switch (["ArrowDown", "ArrowUp", "Home", "End"].includes(
|
|
747
|
+
function S(u) {
|
|
748
|
+
switch (["ArrowDown", "ArrowUp", "Home", "End"].includes(u.key) && u.preventDefault(), u.key) {
|
|
719
749
|
case "ArrowDown":
|
|
720
|
-
|
|
750
|
+
m("next");
|
|
721
751
|
break;
|
|
722
752
|
case "ArrowUp":
|
|
723
|
-
|
|
753
|
+
m("prev");
|
|
724
754
|
break;
|
|
725
755
|
case "Home":
|
|
726
|
-
|
|
756
|
+
m("first");
|
|
727
757
|
break;
|
|
728
758
|
case "End":
|
|
729
|
-
|
|
759
|
+
m("last");
|
|
730
760
|
break;
|
|
731
761
|
}
|
|
732
762
|
}
|
|
733
|
-
function
|
|
734
|
-
switch (
|
|
763
|
+
function m(u) {
|
|
764
|
+
switch (u) {
|
|
735
765
|
case "next":
|
|
736
766
|
case "prev":
|
|
737
|
-
|
|
767
|
+
E(z(u));
|
|
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(u) {
|
|
778
|
+
var v;
|
|
779
|
+
(v = A().at(u)) == null || v.focus();
|
|
750
780
|
}
|
|
751
|
-
function
|
|
752
|
-
var
|
|
753
|
-
const
|
|
754
|
-
return
|
|
781
|
+
function A() {
|
|
782
|
+
var v;
|
|
783
|
+
const u = (v = d.value) == null ? void 0 : v.querySelectorAll("li");
|
|
784
|
+
return u ? Array.from(u).filter((L) => L.tabIndex !== -1) : [];
|
|
755
785
|
}
|
|
756
|
-
function
|
|
757
|
-
return
|
|
786
|
+
function O(u) {
|
|
787
|
+
return u.indexOf(document.activeElement);
|
|
758
788
|
}
|
|
759
|
-
function
|
|
760
|
-
const
|
|
761
|
-
return
|
|
789
|
+
function z(u) {
|
|
790
|
+
const x = A(), v = O(x);
|
|
791
|
+
return u === "next" ? v === x.length - 1 ? v : v + 1 : v === 0 ? 0 : v - 1;
|
|
762
792
|
}
|
|
763
|
-
function
|
|
764
|
-
return
|
|
793
|
+
function M(u) {
|
|
794
|
+
return u ? o.items.filter((x) => x.group === u) : o.items;
|
|
765
795
|
}
|
|
766
|
-
return
|
|
796
|
+
return I(
|
|
767
797
|
() => o.modelValue,
|
|
768
|
-
(
|
|
769
|
-
|
|
798
|
+
(u) => {
|
|
799
|
+
a.value = u;
|
|
770
800
|
}
|
|
771
|
-
), n({ focusItem:
|
|
801
|
+
), n({ focusItem: E }), (u, x) => (r(), k(_e(l.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
|
-
onFocus:
|
|
778
|
-
onKeydown:
|
|
807
|
+
onFocus: p,
|
|
808
|
+
onKeydown: S
|
|
779
809
|
}, {
|
|
780
|
-
default:
|
|
781
|
-
(r(!0), f(
|
|
782
|
-
key:
|
|
783
|
-
title:
|
|
784
|
-
disabled:
|
|
810
|
+
default: D(() => [
|
|
811
|
+
(r(!0), f(F, null, le(s.value, (v) => (r(), k(b(Mt), {
|
|
812
|
+
key: v.id,
|
|
813
|
+
title: v.title,
|
|
814
|
+
disabled: v.disabled
|
|
785
815
|
}, {
|
|
786
|
-
default:
|
|
787
|
-
(r(!0), f(
|
|
816
|
+
default: D(() => [
|
|
817
|
+
(r(!0), f(F, null, le(M(v.id), (L) => (r(), k(b(Rt), {
|
|
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: a.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
|
+
}), It = ["tabindex", "aria-label", "aria-selected", "onClick"], Vt = { class: "q-list-item__check-container" }, Ct = {
|
|
804
834
|
check: {
|
|
805
835
|
icon: "check"
|
|
806
836
|
}
|
|
807
|
-
},
|
|
837
|
+
}, zt = /* @__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
|
|
825
|
-
|
|
854
|
+
function a(l) {
|
|
855
|
+
l.key === "Tab" && o(), (l.key === "Enter" || l.key === " ") && (l.preventDefault(), l.stopPropagation(), o());
|
|
826
856
|
}
|
|
827
|
-
return (
|
|
857
|
+
return (l, s) => (r(), f("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: a,
|
|
871
|
+
onClick: K(o, ["stop", "prevent"])
|
|
842
872
|
}, [
|
|
843
|
-
e.icon ? (r(),
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
e.selected ? (r(),
|
|
873
|
+
e.icon ? (r(), k(b(W), ke(G({ key: 0 }, e.icon)), null, 16)) : g("", !0),
|
|
874
|
+
P(" " + C(e.label) + " ", 1),
|
|
875
|
+
V("div", Vt, [
|
|
876
|
+
e.selected ? (r(), k(b(W), G({ key: 0 }, e.icons.check, { class: "q-list-item__check" }), null, 16)) : g("", !0)
|
|
847
877
|
])
|
|
848
|
-
], 42,
|
|
878
|
+
], 42, It));
|
|
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
|
+
}), At = ["aria-labelledby"], Qt = ["id"], Ft = /* @__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 = te();
|
|
888
|
+
return (o, a) => n.title ? (r(), f("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
894
|
n.title ? (r(), f("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, Qt)) : g("", !0),
|
|
900
|
+
q(o.$slots, "default")
|
|
901
|
+
], 8, At)) : q(o.$slots, "default", { key: 0 });
|
|
877
902
|
}
|
|
878
|
-
}),
|
|
879
|
-
function
|
|
880
|
-
const
|
|
881
|
-
let
|
|
882
|
-
|
|
883
|
-
const
|
|
884
|
-
switch (
|
|
903
|
+
}), Ot = $(Et), Rt = $(zt), Mt = $(Ft);
|
|
904
|
+
function Ht(t, n, e = "right", o) {
|
|
905
|
+
const a = t.getBoundingClientRect(), l = a.x + window.scrollX, s = a.y + window.scrollY, d = n == null ? void 0 : n.getBoundingClientRect(), i = (d == null ? void 0 : d.width) ?? 0, p = (d == null ? void 0 : d.height) ?? 0;
|
|
906
|
+
let S = e;
|
|
907
|
+
d && !Te(a, d, S) && (S = Ut(a, d, S));
|
|
908
|
+
const m = { x: 0, y: 0, placement: S };
|
|
909
|
+
switch (S) {
|
|
885
910
|
case "top":
|
|
886
|
-
o === "anchor" ?
|
|
911
|
+
o === "anchor" ? m.x = l : m.x = l + (a.width - i) / 2, m.y = s - p;
|
|
887
912
|
break;
|
|
888
913
|
case "bottom":
|
|
889
|
-
o === "anchor" ?
|
|
914
|
+
o === "anchor" ? m.x = l : m.x = l + (a.width - i) / 2, m.y = s + a.height;
|
|
890
915
|
break;
|
|
891
916
|
case "left":
|
|
892
|
-
|
|
917
|
+
m.x = l - i, m.y = s + a.height / 2 - p / 2;
|
|
893
918
|
break;
|
|
894
919
|
case "right":
|
|
895
|
-
|
|
920
|
+
m.x = l + a.width, m.y = s + a.height / 2 - p / 2;
|
|
896
921
|
break;
|
|
897
922
|
}
|
|
898
|
-
return o === "anchor" &&
|
|
923
|
+
return o === "anchor" && a.width >= i && (m.width = a.width), m;
|
|
899
924
|
}
|
|
900
|
-
function
|
|
901
|
-
let o = !1,
|
|
925
|
+
function Te(t, n, e) {
|
|
926
|
+
let o = !1, a = !1;
|
|
902
927
|
switch (e) {
|
|
903
928
|
case "top":
|
|
904
|
-
o =
|
|
929
|
+
o = ve(t, n), a = t.top > n.height;
|
|
905
930
|
break;
|
|
906
931
|
case "bottom":
|
|
907
|
-
o =
|
|
932
|
+
o = ve(t, n), a = 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, a = ye(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, a = ye(t, n);
|
|
914
939
|
break;
|
|
915
940
|
}
|
|
916
|
-
return o &&
|
|
941
|
+
return o && a;
|
|
917
942
|
}
|
|
918
|
-
function
|
|
943
|
+
function ye(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 ve(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 Ut(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 a of o[e])
|
|
957
|
+
if (Te(t, n, a))
|
|
958
|
+
return a;
|
|
934
959
|
return e;
|
|
935
960
|
}
|
|
936
|
-
function
|
|
961
|
+
function j(t) {
|
|
937
962
|
return typeof t == "string" ? document.querySelector(t) : t && "$el" in t ? t.$el : t;
|
|
938
963
|
}
|
|
939
|
-
const
|
|
964
|
+
const Nt = {
|
|
940
965
|
key: 0,
|
|
941
966
|
class: "q-overlay__arrow"
|
|
942
|
-
},
|
|
967
|
+
}, Kt = /* @__PURE__ */ w({
|
|
943
968
|
inheritAttrs: !1,
|
|
944
969
|
__name: "QOverlay",
|
|
945
970
|
props: {
|
|
@@ -960,90 +985,90 @@ 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--${a.placement}`,
|
|
966
991
|
{ "q-overlay--inverted": e.appearance === "inverted" },
|
|
967
992
|
...e.contentClasses
|
|
968
|
-
]),
|
|
993
|
+
]), a = 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
|
-
}),
|
|
976
|
-
|
|
1000
|
+
}), l = y(() => a.visible && !e.disabled);
|
|
1001
|
+
I(
|
|
977
1002
|
() => e.modelValue,
|
|
978
|
-
() =>
|
|
979
|
-
),
|
|
980
|
-
() =>
|
|
981
|
-
() =>
|
|
1003
|
+
() => a.visible = e.modelValue
|
|
1004
|
+
), I(
|
|
1005
|
+
() => a.visible,
|
|
1006
|
+
() => a.animating = !0
|
|
982
1007
|
);
|
|
983
|
-
const
|
|
984
|
-
let
|
|
985
|
-
switch (
|
|
1008
|
+
const s = y(() => {
|
|
1009
|
+
let h = 0, T = 0;
|
|
1010
|
+
switch (a.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
|
+
h = -(e.offset || 0);
|
|
994
1019
|
break;
|
|
995
1020
|
case "right":
|
|
996
|
-
|
|
1021
|
+
h = e.offset || 0;
|
|
997
1022
|
break;
|
|
998
1023
|
}
|
|
999
|
-
const
|
|
1000
|
-
top: `${
|
|
1001
|
-
left: `${
|
|
1024
|
+
const H = {
|
|
1025
|
+
top: `${a.top + T}px`,
|
|
1026
|
+
left: `${a.left + h}px`
|
|
1002
1027
|
};
|
|
1003
|
-
return
|
|
1004
|
-
}),
|
|
1028
|
+
return a.width !== void 0 && ["top", "bottom"].includes(a.placement) && (H.width = `${a.width}px`), H;
|
|
1029
|
+
}), d = B(null);
|
|
1005
1030
|
function i() {
|
|
1006
|
-
const
|
|
1007
|
-
if (
|
|
1008
|
-
const
|
|
1009
|
-
|
|
1031
|
+
const h = j(e.anchor);
|
|
1032
|
+
if (h) {
|
|
1033
|
+
const T = Ht(h, d.value, e.placement, e.width);
|
|
1034
|
+
a.left = T.x, a.top = T.y, a.width = T.width, a.placement = T.placement;
|
|
1010
1035
|
}
|
|
1011
1036
|
}
|
|
1012
|
-
|
|
1013
|
-
let
|
|
1014
|
-
function
|
|
1015
|
-
const
|
|
1016
|
-
|
|
1037
|
+
I([() => l.value, () => e.placement], i);
|
|
1038
|
+
let p;
|
|
1039
|
+
function S() {
|
|
1040
|
+
const h = e.trigger === "hover" ? e.delay : 0;
|
|
1041
|
+
p || (p = window.setTimeout(() => a.visible = !0, h));
|
|
1017
1042
|
}
|
|
1018
|
-
function
|
|
1019
|
-
clearTimeout(
|
|
1043
|
+
function m() {
|
|
1044
|
+
clearTimeout(p), p = void 0, a.visible = !1;
|
|
1020
1045
|
}
|
|
1021
|
-
function
|
|
1022
|
-
|
|
1046
|
+
function E() {
|
|
1047
|
+
l.value ? m() : S();
|
|
1023
1048
|
}
|
|
1024
|
-
let
|
|
1025
|
-
function
|
|
1026
|
-
window.clearTimeout(
|
|
1049
|
+
let A;
|
|
1050
|
+
function O() {
|
|
1051
|
+
window.clearTimeout(A), A = window.setTimeout(() => a.animating = !1, 200), n("leave");
|
|
1027
1052
|
}
|
|
1028
|
-
let
|
|
1029
|
-
function
|
|
1030
|
-
|
|
1031
|
-
const
|
|
1032
|
-
if (
|
|
1053
|
+
let z;
|
|
1054
|
+
function M() {
|
|
1055
|
+
se(() => {
|
|
1056
|
+
const h = j(e.anchor);
|
|
1057
|
+
if (h)
|
|
1033
1058
|
switch (e.trigger) {
|
|
1034
1059
|
case "click":
|
|
1035
|
-
|
|
1060
|
+
h.addEventListener("click", E);
|
|
1036
1061
|
break;
|
|
1037
1062
|
case "hover":
|
|
1038
|
-
|
|
1063
|
+
h.addEventListener("mouseenter", S), h.addEventListener("mouseleave", m);
|
|
1039
1064
|
break;
|
|
1040
1065
|
}
|
|
1041
1066
|
});
|
|
1042
1067
|
}
|
|
1043
|
-
function
|
|
1044
|
-
|
|
1045
|
-
const
|
|
1046
|
-
|
|
1068
|
+
function u() {
|
|
1069
|
+
se(() => {
|
|
1070
|
+
const h = j(e.anchor);
|
|
1071
|
+
h && (window.addEventListener("scroll", i), window.addEventListener("resize", i), z = new MutationObserver(i), z.observe(h, {
|
|
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 x() {
|
|
1080
|
+
window.removeEventListener("scroll", i), window.removeEventListener("resize", i), z == null || z.disconnect();
|
|
1056
1081
|
}
|
|
1057
|
-
let
|
|
1082
|
+
let v;
|
|
1058
1083
|
function L() {
|
|
1059
|
-
|
|
1084
|
+
j(e.anchor) ? (i(), v = window.setTimeout(L, 100)) : m();
|
|
1060
1085
|
}
|
|
1061
|
-
function
|
|
1062
|
-
|
|
1086
|
+
function ne() {
|
|
1087
|
+
u(), e.spy && L();
|
|
1063
1088
|
}
|
|
1064
|
-
function
|
|
1065
|
-
|
|
1089
|
+
function X() {
|
|
1090
|
+
x(), e.spy && (clearTimeout(v), v = void 0);
|
|
1066
1091
|
}
|
|
1067
|
-
return
|
|
1092
|
+
return Ie(X), Ve(i), I(
|
|
1068
1093
|
() => e.disabled,
|
|
1069
|
-
(
|
|
1070
|
-
|
|
1094
|
+
(h) => {
|
|
1095
|
+
h || M();
|
|
1071
1096
|
},
|
|
1072
1097
|
{ immediate: !0 }
|
|
1073
|
-
),
|
|
1074
|
-
() =>
|
|
1075
|
-
(
|
|
1076
|
-
|
|
1098
|
+
), I(
|
|
1099
|
+
() => l.value,
|
|
1100
|
+
(h) => {
|
|
1101
|
+
h ? ne() : X();
|
|
1077
1102
|
},
|
|
1078
1103
|
{ immediate: !0 }
|
|
1079
|
-
), (
|
|
1080
|
-
|
|
1081
|
-
|
|
1104
|
+
), (h, T) => (r(), f(F, null, [
|
|
1105
|
+
q(h.$slots, "trigger", { open: l.value }),
|
|
1106
|
+
l.value || a.animating ? (r(), k(Ce, {
|
|
1082
1107
|
key: 0,
|
|
1083
1108
|
disabled: !e.attach,
|
|
1084
1109
|
to: e.attach
|
|
1085
1110
|
}, [
|
|
1086
|
-
|
|
1111
|
+
J(ze, {
|
|
1087
1112
|
name: e.transition,
|
|
1088
1113
|
appear: "",
|
|
1089
|
-
onEnter:
|
|
1090
|
-
onLeave:
|
|
1114
|
+
onEnter: T[0] || (T[0] = (H) => n("enter")),
|
|
1115
|
+
onLeave: O
|
|
1091
1116
|
}, {
|
|
1092
|
-
default:
|
|
1093
|
-
|
|
1117
|
+
default: D(() => [
|
|
1118
|
+
l.value ? (r(), f("div", {
|
|
1094
1119
|
key: 0,
|
|
1095
|
-
class:
|
|
1096
|
-
style:
|
|
1120
|
+
class: Q(o.value),
|
|
1121
|
+
style: Y(s.value)
|
|
1097
1122
|
}, [
|
|
1098
|
-
|
|
1099
|
-
class:
|
|
1123
|
+
V("div", {
|
|
1124
|
+
class: Q(["q-overlay__content"]),
|
|
1100
1125
|
ref_key: "overlay",
|
|
1101
|
-
ref:
|
|
1126
|
+
ref: d
|
|
1102
1127
|
}, [
|
|
1103
|
-
e.arrow ? (r(), f("div",
|
|
1104
|
-
|
|
1128
|
+
e.arrow ? (r(), f("div", Nt)) : g("", !0),
|
|
1129
|
+
q(h.$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
|
+
}), de = $(Kt), Wt = {
|
|
1114
1139
|
key: 0,
|
|
1115
1140
|
class: "q-popover__header"
|
|
1116
|
-
},
|
|
1141
|
+
}, Gt = {
|
|
1117
1142
|
key: 1,
|
|
1118
1143
|
class: "q-popover__body"
|
|
1119
|
-
},
|
|
1144
|
+
}, Yt = ["innerHTML"], Xt = { key: 1 }, Zt = /* @__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(de), {
|
|
1137
1162
|
"model-value": n.modelValue,
|
|
1138
1163
|
trigger: "click",
|
|
1139
1164
|
anchor: n.anchor,
|
|
@@ -1144,233 +1169,296 @@ const Qt = {
|
|
|
1144
1169
|
placement: n.placement,
|
|
1145
1170
|
spy: n.spy
|
|
1146
1171
|
}, {
|
|
1147
|
-
default:
|
|
1148
|
-
n.title || e.$slots.header ? (r(), f("h3",
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
])) :
|
|
1152
|
-
n.text || e.$slots.body ? (r(), f("div",
|
|
1172
|
+
default: D(() => [
|
|
1173
|
+
n.title || e.$slots.header ? (r(), f("h3", Wt, [
|
|
1174
|
+
P(C(n.title) + " ", 1),
|
|
1175
|
+
q(e.$slots, "header")
|
|
1176
|
+
])) : g("", !0),
|
|
1177
|
+
n.text || e.$slots.body ? (r(), f("div", Gt, [
|
|
1153
1178
|
n.html ? (r(), f("span", {
|
|
1154
1179
|
key: 0,
|
|
1155
1180
|
innerHTML: n.text
|
|
1156
|
-
}, null, 8,
|
|
1157
|
-
|
|
1158
|
-
])) :
|
|
1181
|
+
}, null, 8, Yt)) : (r(), f("span", Xt, 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
|
+
}), hn = $(Zt);
|
|
1189
|
+
function jt() {
|
|
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
|
|
1169
|
-
mounted(t, n) {
|
|
1170
|
-
t.clickOutsideEvent = function(e) {
|
|
1171
|
-
const o = e.target;
|
|
1172
|
-
n.arg ? t === o || t.contains(o) || o.closest(n.arg) || n.value(e, t) : t === o || t.contains(o) || n.value(e, t);
|
|
1173
|
-
}, document.addEventListener("click", t.clickOutsideEvent);
|
|
1174
|
-
},
|
|
1175
|
-
unmounted(t) {
|
|
1176
|
-
document.removeEventListener("click", t.clickOutsideEvent);
|
|
1177
|
-
}
|
|
1178
|
-
}, Wt = {
|
|
1193
|
+
const Jt = {
|
|
1179
1194
|
key: 0,
|
|
1180
1195
|
class: "q-select__value"
|
|
1181
|
-
},
|
|
1196
|
+
}, Pt = {
|
|
1182
1197
|
key: 1,
|
|
1183
1198
|
class: "q-select__placeholder"
|
|
1184
|
-
},
|
|
1199
|
+
}, en = ["onKeydown"], tn = {
|
|
1185
1200
|
placeholder: "Choose..."
|
|
1186
|
-
},
|
|
1201
|
+
}, nn = {
|
|
1187
1202
|
chevron: {
|
|
1188
1203
|
icon: "chevron-down"
|
|
1189
1204
|
},
|
|
1190
1205
|
clear: {
|
|
1191
1206
|
icon: "close"
|
|
1192
1207
|
}
|
|
1193
|
-
},
|
|
1208
|
+
}, on = /* @__PURE__ */ w({
|
|
1194
1209
|
inheritAttrs: !1,
|
|
1195
1210
|
__name: "QSelect",
|
|
1196
1211
|
props: {
|
|
1197
1212
|
modelValue: { type: [String, Number, Boolean, Symbol], default: void 0 },
|
|
1213
|
+
id: { default: () => te() },
|
|
1214
|
+
label: { default: "" },
|
|
1198
1215
|
clearable: { type: Boolean, default: !1 },
|
|
1199
1216
|
readonly: { type: Boolean },
|
|
1200
1217
|
disabled: { type: Boolean, default: !1 },
|
|
1218
|
+
required: { type: Boolean, default: !1 },
|
|
1201
1219
|
loading: { type: Boolean, default: !1 },
|
|
1202
|
-
icons: { default: () =>
|
|
1220
|
+
icons: { default: () => nn },
|
|
1203
1221
|
items: {},
|
|
1204
1222
|
groups: { default: () => [] },
|
|
1205
1223
|
itemValue: { default: "key" },
|
|
1206
1224
|
itemLabel: { default: "label" },
|
|
1207
1225
|
size: { default: "medium" },
|
|
1208
|
-
texts: { default: () =>
|
|
1226
|
+
texts: { default: () => tn }
|
|
1209
1227
|
},
|
|
1210
1228
|
emits: ["update:modelValue", "before-show", "before-hide", "show", "hide"],
|
|
1211
1229
|
setup(t, { emit: n }) {
|
|
1212
|
-
const e = t, o =
|
|
1230
|
+
const e = t, o = jt(), a = B(e.modelValue), l = B(!1), s = B(""), d = B(null), i = B(null), p = B(null), S = y(
|
|
1213
1231
|
() => {
|
|
1214
|
-
var
|
|
1215
|
-
return (
|
|
1232
|
+
var c;
|
|
1233
|
+
return (c = e.items) == null ? void 0 : c.find((_) => _[e.itemValue] === a.value);
|
|
1216
1234
|
}
|
|
1217
|
-
),
|
|
1218
|
-
() =>
|
|
1219
|
-
),
|
|
1235
|
+
), m = y(
|
|
1236
|
+
() => S.value ? S.value[e.itemLabel] : ""
|
|
1237
|
+
), E = y(
|
|
1220
1238
|
() => e.clearable && !e.readonly && !e.disabled && !e.loading
|
|
1221
1239
|
);
|
|
1222
|
-
function
|
|
1223
|
-
|
|
1240
|
+
function A(c) {
|
|
1241
|
+
a.value = c, n("update:modelValue", c), x();
|
|
1224
1242
|
}
|
|
1225
|
-
function
|
|
1226
|
-
|
|
1243
|
+
function O() {
|
|
1244
|
+
E.value && A(void 0);
|
|
1227
1245
|
}
|
|
1228
|
-
function
|
|
1229
|
-
e.readonly || e.disabled || (
|
|
1246
|
+
function z() {
|
|
1247
|
+
e.readonly || e.disabled || (l.value ? x() : u());
|
|
1230
1248
|
}
|
|
1231
|
-
function
|
|
1232
|
-
var
|
|
1233
|
-
(
|
|
1249
|
+
function M(c) {
|
|
1250
|
+
var _, R, U;
|
|
1251
|
+
!((_ = p.value) != null && _.contains(c.relatedTarget)) && !((U = (R = d.value) == null ? void 0 : R.fieldRef) != null && U.contains(c.relatedTarget)) && x();
|
|
1234
1252
|
}
|
|
1235
|
-
function
|
|
1236
|
-
|
|
1253
|
+
function u() {
|
|
1254
|
+
l.value || (n("before-show"), l.value = !0);
|
|
1237
1255
|
}
|
|
1238
|
-
function
|
|
1239
|
-
|
|
1256
|
+
function x() {
|
|
1257
|
+
l.value && (n("before-hide"), l.value = !1);
|
|
1240
1258
|
}
|
|
1241
|
-
let
|
|
1242
|
-
function L(
|
|
1243
|
-
if (!(!
|
|
1244
|
-
if (window.clearTimeout(
|
|
1245
|
-
|
|
1246
|
-
for (let
|
|
1247
|
-
if (e.items[
|
|
1248
|
-
|
|
1259
|
+
let v;
|
|
1260
|
+
function L(c) {
|
|
1261
|
+
if (!(!c.key || e.readonly || e.disabled)) {
|
|
1262
|
+
if (window.clearTimeout(v), ["Enter", " ", "ArrowDown", "ArrowUp", "Home", "End"].includes(c.key) && (c.preventDefault(), c.stopPropagation()), ["Enter", " "].includes(c.key) && (l.value = !0), ["Escape", "Tab"].includes(c.key) && (l.value ? l.value = !1 : e.clearable && c.key === "Escape" && O()), c.key === "Delete" && e.clearable && O(), /^[a-z]$/i.test(c.key)) {
|
|
1263
|
+
s.value += c.key.toLowerCase();
|
|
1264
|
+
for (let _ = 0; _ < e.items.length; _++)
|
|
1265
|
+
if (e.items[_][e.itemLabel].toLowerCase().startsWith(s.value)) {
|
|
1266
|
+
H(_);
|
|
1249
1267
|
break;
|
|
1250
1268
|
}
|
|
1251
1269
|
}
|
|
1252
|
-
|
|
1253
|
-
|
|
1270
|
+
v = window.setTimeout(function() {
|
|
1271
|
+
s.value = "";
|
|
1254
1272
|
}, 500);
|
|
1255
1273
|
}
|
|
1256
1274
|
}
|
|
1257
|
-
function
|
|
1258
|
-
var
|
|
1259
|
-
(
|
|
1275
|
+
function ne() {
|
|
1276
|
+
var c;
|
|
1277
|
+
e.loading ? (c = p.value) == null || c.focus() : T(), n("show");
|
|
1260
1278
|
}
|
|
1261
|
-
function
|
|
1262
|
-
|
|
1279
|
+
function X() {
|
|
1280
|
+
h(), n("hide");
|
|
1263
1281
|
}
|
|
1264
|
-
function
|
|
1265
|
-
var
|
|
1266
|
-
(
|
|
1282
|
+
function h() {
|
|
1283
|
+
var c, _;
|
|
1284
|
+
(_ = (c = d.value) == null ? void 0 : c.fieldRef) == null || _.focus();
|
|
1267
1285
|
}
|
|
1268
|
-
function
|
|
1269
|
-
var
|
|
1270
|
-
(
|
|
1286
|
+
function T() {
|
|
1287
|
+
var c;
|
|
1288
|
+
(c = i.value) == null || c.$el.focus();
|
|
1271
1289
|
}
|
|
1272
|
-
|
|
1290
|
+
function H(c) {
|
|
1291
|
+
var _;
|
|
1292
|
+
(_ = i.value) == null || _.focusItem(c);
|
|
1293
|
+
}
|
|
1294
|
+
return I(
|
|
1273
1295
|
() => e.modelValue,
|
|
1274
|
-
(
|
|
1275
|
-
|
|
1296
|
+
(c) => {
|
|
1297
|
+
a.value = c;
|
|
1276
1298
|
}
|
|
1277
|
-
), (
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1299
|
+
), I(
|
|
1300
|
+
() => e.loading,
|
|
1301
|
+
(c) => {
|
|
1302
|
+
!c && l.value && se(T);
|
|
1303
|
+
}
|
|
1304
|
+
), (c, _) => {
|
|
1305
|
+
var R, U, ce;
|
|
1306
|
+
return r(), f(F, null, [
|
|
1307
|
+
J(b(Le), {
|
|
1308
|
+
id: e.id,
|
|
1309
|
+
label: e.label,
|
|
1310
|
+
required: e.required,
|
|
1311
|
+
ref_key: "triggerEl",
|
|
1312
|
+
ref: d,
|
|
1283
1313
|
role: "combobox",
|
|
1284
1314
|
tabindex: "0",
|
|
1285
|
-
class:
|
|
1315
|
+
class: Q([
|
|
1286
1316
|
"q-select",
|
|
1287
1317
|
{
|
|
1288
1318
|
"q-select--readonly": e.readonly,
|
|
1289
1319
|
"q-select--disabled": e.disabled,
|
|
1290
|
-
"q-select--expanded":
|
|
1320
|
+
"q-select--expanded": l.value
|
|
1291
1321
|
},
|
|
1292
|
-
...
|
|
1322
|
+
...b(o).class
|
|
1293
1323
|
]),
|
|
1294
|
-
readonly:
|
|
1324
|
+
readonly: e.readonly,
|
|
1295
1325
|
disabled: e.disabled,
|
|
1296
|
-
"aria-expanded":
|
|
1326
|
+
"aria-expanded": l.value,
|
|
1297
1327
|
"aria-haspopup": "listbox",
|
|
1298
1328
|
size: e.size,
|
|
1299
|
-
onClick:
|
|
1300
|
-
onKeydown:
|
|
1301
|
-
},
|
|
1302
|
-
append:
|
|
1303
|
-
|
|
1329
|
+
onClick: z,
|
|
1330
|
+
onKeydown: K(L, ["stop"])
|
|
1331
|
+
}, Qe({
|
|
1332
|
+
append: D(() => [
|
|
1333
|
+
E.value && a.value ? (r(), k(b(W), G({ key: 0 }, e.icons.clear, {
|
|
1304
1334
|
class: "q-select__clear",
|
|
1305
|
-
onClick:
|
|
1306
|
-
}), null, 16, ["onClick"])) :
|
|
1307
|
-
!e.readonly && !e.disabled ? (r(),
|
|
1335
|
+
onClick: K(O, ["stop", "prevent"])
|
|
1336
|
+
}), null, 16, ["onClick"])) : g("", !0),
|
|
1337
|
+
!e.readonly && !e.disabled ? (r(), k(b(W), G({ key: 1 }, e.icons.chevron, { class: "q-select__chevron" }), null, 16)) : g("", !0)
|
|
1308
1338
|
]),
|
|
1309
|
-
default:
|
|
1310
|
-
|
|
1339
|
+
default: D(() => [
|
|
1340
|
+
a.value ? (r(), f("span", Jt, C(m.value), 1)) : (r(), f("span", Pt, C(c.texts.placeholder), 1))
|
|
1311
1341
|
]),
|
|
1312
1342
|
_: 2
|
|
1313
1343
|
}, [
|
|
1314
|
-
(
|
|
1344
|
+
(R = S.value) != null && R.icon ? {
|
|
1315
1345
|
name: "prepend",
|
|
1316
|
-
fn:
|
|
1317
|
-
var
|
|
1346
|
+
fn: D(() => {
|
|
1347
|
+
var Z;
|
|
1318
1348
|
return [
|
|
1319
|
-
|
|
1349
|
+
J(b(W), ke(Fe((Z = S.value) == null ? void 0 : Z.icon)), null, 16)
|
|
1320
1350
|
];
|
|
1321
1351
|
}),
|
|
1322
1352
|
key: "0"
|
|
1323
1353
|
} : void 0
|
|
1324
|
-
]), 1032, ["class", "disabled", "aria-expanded", "size", "onKeydown"]),
|
|
1325
|
-
|
|
1326
|
-
|
|
1354
|
+
]), 1032, ["id", "label", "required", "class", "readonly", "disabled", "aria-expanded", "size", "onKeydown"]),
|
|
1355
|
+
(U = d.value) != null && U.fieldRef ? (r(), k(b(de), {
|
|
1356
|
+
key: 0,
|
|
1357
|
+
"model-value": l.value,
|
|
1327
1358
|
spy: "",
|
|
1328
1359
|
trigger: "manual",
|
|
1329
1360
|
placement: "bottom",
|
|
1330
1361
|
width: "anchor",
|
|
1331
1362
|
offset: 2,
|
|
1332
|
-
anchor: (
|
|
1333
|
-
onEnter:
|
|
1334
|
-
onLeave:
|
|
1363
|
+
anchor: (ce = d.value) == null ? void 0 : ce.fieldRef,
|
|
1364
|
+
onEnter: ne,
|
|
1365
|
+
onLeave: X
|
|
1335
1366
|
}, {
|
|
1336
|
-
default:
|
|
1337
|
-
|
|
1367
|
+
default: D(() => [
|
|
1368
|
+
V("div", {
|
|
1338
1369
|
ref_key: "contentRef",
|
|
1339
|
-
ref:
|
|
1340
|
-
class: "q-select__body"
|
|
1370
|
+
ref: p,
|
|
1371
|
+
class: "q-select__body",
|
|
1372
|
+
tabindex: "-1",
|
|
1373
|
+
onFocusout: M,
|
|
1374
|
+
onKeydown: K(L, ["stop"])
|
|
1341
1375
|
}, [
|
|
1342
|
-
|
|
1343
|
-
e.loading ? (r(),
|
|
1376
|
+
q(c.$slots, "body.prepend"),
|
|
1377
|
+
e.loading ? (r(), k(b(Be), {
|
|
1344
1378
|
key: 0,
|
|
1345
1379
|
class: "q-select__loader",
|
|
1346
1380
|
size: 24
|
|
1347
|
-
})) : (r(),
|
|
1381
|
+
})) : (r(), k(b(Ot), {
|
|
1348
1382
|
key: 1,
|
|
1349
1383
|
ref_key: "listRef",
|
|
1350
1384
|
ref: i,
|
|
1351
1385
|
class: "q-select__items",
|
|
1352
|
-
modelValue:
|
|
1386
|
+
modelValue: a.value,
|
|
1353
1387
|
"onUpdate:modelValue": [
|
|
1354
|
-
|
|
1355
|
-
|
|
1388
|
+
_[0] || (_[0] = (Z) => a.value = Z),
|
|
1389
|
+
A
|
|
1356
1390
|
],
|
|
1357
1391
|
items: e.items,
|
|
1358
|
-
groups:
|
|
1392
|
+
groups: c.groups,
|
|
1359
1393
|
"item-label": e.itemLabel,
|
|
1360
|
-
"item-value": e.itemValue
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
])), [
|
|
1365
|
-
[g(Kt), F]
|
|
1366
|
-
])
|
|
1394
|
+
"item-value": e.itemValue
|
|
1395
|
+
}, null, 8, ["modelValue", "items", "groups", "item-label", "item-value"])),
|
|
1396
|
+
q(c.$slots, "body.append")
|
|
1397
|
+
], 40, en)
|
|
1367
1398
|
]),
|
|
1368
1399
|
_: 3
|
|
1369
|
-
}, 8, ["model-value", "anchor"])
|
|
1400
|
+
}, 8, ["model-value", "anchor"])) : g("", !0)
|
|
1370
1401
|
], 64);
|
|
1371
1402
|
};
|
|
1372
1403
|
}
|
|
1373
|
-
}),
|
|
1404
|
+
}), yn = $(on), an = ["required", "placeholder", "readonly", "disabled", "maxlength"], ln = /* @__PURE__ */ w({
|
|
1405
|
+
__name: "QTextField",
|
|
1406
|
+
props: {
|
|
1407
|
+
modelValue: { default: "" },
|
|
1408
|
+
id: { default: () => te() },
|
|
1409
|
+
placeholder: { default: "" },
|
|
1410
|
+
label: { default: "" },
|
|
1411
|
+
size: { default: "medium" },
|
|
1412
|
+
maxLength: { default: void 0 },
|
|
1413
|
+
readonly: { type: Boolean, default: !1 },
|
|
1414
|
+
disabled: { type: Boolean, default: !1 },
|
|
1415
|
+
required: { type: Boolean, default: !1 }
|
|
1416
|
+
},
|
|
1417
|
+
emits: ["update:modelValue"],
|
|
1418
|
+
setup(t, { emit: n }) {
|
|
1419
|
+
const e = t, o = B(e.modelValue), a = y({
|
|
1420
|
+
get() {
|
|
1421
|
+
return o.value;
|
|
1422
|
+
},
|
|
1423
|
+
set(l) {
|
|
1424
|
+
o.value = l, n("update:modelValue", l);
|
|
1425
|
+
}
|
|
1426
|
+
});
|
|
1427
|
+
return I(
|
|
1428
|
+
() => e.modelValue,
|
|
1429
|
+
(l) => o.value = l
|
|
1430
|
+
), (l, s) => (r(), k(b(Le), {
|
|
1431
|
+
class: "q-text-field",
|
|
1432
|
+
id: l.id,
|
|
1433
|
+
label: e.label,
|
|
1434
|
+
size: e.size,
|
|
1435
|
+
readonly: e.readonly,
|
|
1436
|
+
disabled: e.disabled,
|
|
1437
|
+
required: e.required
|
|
1438
|
+
}, {
|
|
1439
|
+
default: D(() => [
|
|
1440
|
+
Oe(V("input", {
|
|
1441
|
+
"onUpdate:modelValue": s[0] || (s[0] = (d) => a.value = d),
|
|
1442
|
+
class: "q-text-field__input",
|
|
1443
|
+
type: "text",
|
|
1444
|
+
required: e.required,
|
|
1445
|
+
placeholder: e.placeholder,
|
|
1446
|
+
readonly: e.readonly,
|
|
1447
|
+
disabled: e.disabled,
|
|
1448
|
+
maxlength: e.maxLength
|
|
1449
|
+
}, null, 8, an), [
|
|
1450
|
+
[
|
|
1451
|
+
Re,
|
|
1452
|
+
a.value,
|
|
1453
|
+
void 0,
|
|
1454
|
+
{ lazy: !0 }
|
|
1455
|
+
]
|
|
1456
|
+
])
|
|
1457
|
+
]),
|
|
1458
|
+
_: 1
|
|
1459
|
+
}, 8, ["id", "label", "size", "readonly", "disabled", "required"]));
|
|
1460
|
+
}
|
|
1461
|
+
}), vn = $(ln), sn = ["innerHTML"], rn = { key: 1 }, dn = /* @__PURE__ */ w({
|
|
1374
1462
|
inheritAttrs: !1,
|
|
1375
1463
|
__name: "QTooltip",
|
|
1376
1464
|
props: {
|
|
@@ -1388,7 +1476,7 @@ const Kt = {
|
|
|
1388
1476
|
},
|
|
1389
1477
|
setup(t) {
|
|
1390
1478
|
const n = t;
|
|
1391
|
-
return (e, o) => (r(),
|
|
1479
|
+
return (e, o) => (r(), k(b(de), {
|
|
1392
1480
|
"model-value": n.modelValue,
|
|
1393
1481
|
anchor: n.anchor,
|
|
1394
1482
|
appearance: n.appearance,
|
|
@@ -1400,38 +1488,49 @@ const Kt = {
|
|
|
1400
1488
|
placement: n.placement,
|
|
1401
1489
|
trigger: n.trigger
|
|
1402
1490
|
}, {
|
|
1403
|
-
default:
|
|
1491
|
+
default: D(() => [
|
|
1404
1492
|
n.html ? (r(), f("span", {
|
|
1405
1493
|
key: 0,
|
|
1406
1494
|
innerHTML: n.text
|
|
1407
|
-
}, null, 8,
|
|
1495
|
+
}, null, 8, sn)) : (r(), f("span", rn, C(n.text), 1))
|
|
1408
1496
|
]),
|
|
1409
1497
|
_: 1
|
|
1410
1498
|
}, 8, ["model-value", "anchor", "appearance", "arrow", "attach", "delay", "disabled", "placement", "trigger"]));
|
|
1411
1499
|
}
|
|
1412
|
-
}),
|
|
1500
|
+
}), bn = $(dn), gn = {
|
|
1501
|
+
mounted(t, n) {
|
|
1502
|
+
t.clickOutsideEvent = function(e) {
|
|
1503
|
+
const o = e.target;
|
|
1504
|
+
n.arg ? t === o || t.contains(o) || o.closest(n.arg) || n.value(e, t) : t === o || t.contains(o) || n.value(e, t);
|
|
1505
|
+
}, document.addEventListener("click", t.clickOutsideEvent);
|
|
1506
|
+
},
|
|
1507
|
+
unmounted(t) {
|
|
1508
|
+
document.removeEventListener("click", t.clickOutsideEvent);
|
|
1509
|
+
}
|
|
1510
|
+
};
|
|
1413
1511
|
export {
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1512
|
+
ot as QButton,
|
|
1513
|
+
lt as QButtonGroup,
|
|
1514
|
+
pn as QButtonToggle,
|
|
1515
|
+
Le as QField,
|
|
1516
|
+
W as QIcon,
|
|
1517
|
+
$t as QIconFont,
|
|
1518
|
+
St as QIconImg,
|
|
1519
|
+
qt as QIconSvg,
|
|
1520
|
+
mn as QLineLoader,
|
|
1521
|
+
Ot as QList,
|
|
1522
|
+
Rt as QListItem,
|
|
1523
|
+
Mt as QListItemGroup,
|
|
1524
|
+
de as QOverlay,
|
|
1525
|
+
hn as QPopover,
|
|
1526
|
+
yn as QSelect,
|
|
1527
|
+
Be as QSpinnerLoader,
|
|
1528
|
+
vn as QTextField,
|
|
1529
|
+
bn as QTooltip,
|
|
1530
|
+
gn as clickOutside,
|
|
1531
|
+
fn as createFramework,
|
|
1532
|
+
Ue as defaultDarkColorScheme,
|
|
1533
|
+
pe as defaultLightColorScheme,
|
|
1534
|
+
un as useTheme
|
|
1436
1535
|
};
|
|
1437
1536
|
//# sourceMappingURL=ui.esm.js.map
|