@quidgest/ui 0.5.2 → 0.5.3
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 +18 -2
- package/dist/ui.esm.js +113 -103
- package/dist/ui.esm.js.map +1 -1
- package/dist/ui.js +3 -3
- package/dist/ui.js.map +1 -1
- package/dist/ui.min.js +35 -31
- package/dist/ui.min.js.map +1 -1
- package/dist/ui.scss +1 -1
- package/package.json +1 -1
package/dist/ui.esm.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { provide as
|
|
1
|
+
import { provide as De, inject as pe, getCurrentInstance as me, ref as D, watch as z, defineComponent as _, computed as y, openBlock as r, createElementBlock as f, normalizeStyle as W, createElementVNode as X, unref as g, normalizeClass as C, withModifiers as H, createVNode as N, createCommentVNode as b, Fragment as Q, createTextVNode as U, toDisplayString as I, renderSlot as L, toRef as J, createBlock as k, withCtx as E, renderList as ee, resolveDynamicComponent as he, h as se, mergeProps as K, normalizeProps as ye, reactive as Ee, onBeforeUnmount as Te, onMounted as Ce, Teleport as Ie, Transition as Ve, nextTick as le, createSlots as ze, guardReactiveProps as Qe, withDirectives as Ae } from "vue";
|
|
2
2
|
function re(t) {
|
|
3
3
|
return t !== null && typeof t == "object" && !Array.isArray(t);
|
|
4
4
|
}
|
|
5
|
-
function
|
|
5
|
+
function ve(t = {}, n = {}) {
|
|
6
6
|
const e = {};
|
|
7
7
|
for (const o in t)
|
|
8
8
|
e[o] = t[o];
|
|
9
9
|
for (const o in n) {
|
|
10
10
|
const a = t[o], s = n[o];
|
|
11
11
|
if (re(a) && re(s)) {
|
|
12
|
-
e[o] =
|
|
12
|
+
e[o] = ve(
|
|
13
13
|
a,
|
|
14
14
|
s
|
|
15
15
|
);
|
|
@@ -21,20 +21,20 @@ function ye(t = {}, n = {}) {
|
|
|
21
21
|
}
|
|
22
22
|
const te = "q-defaults";
|
|
23
23
|
function Oe() {
|
|
24
|
-
const t =
|
|
24
|
+
const t = me();
|
|
25
25
|
if (!t)
|
|
26
26
|
throw new Error("[framework] useDefaults must be called from inside a setup function");
|
|
27
27
|
const n = t.type.name ?? t.type.__name;
|
|
28
28
|
if (!n)
|
|
29
29
|
throw new Error("[framework] Could not determine component name");
|
|
30
|
-
return
|
|
30
|
+
return ge()[n] || {};
|
|
31
31
|
}
|
|
32
32
|
function Fe(t) {
|
|
33
|
-
const n = structuredClone(
|
|
34
|
-
|
|
33
|
+
const n = structuredClone(ge()), e = ve(n, t);
|
|
34
|
+
De(te, e);
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
return
|
|
36
|
+
function ge() {
|
|
37
|
+
return pe(te, void 0) || {};
|
|
38
38
|
}
|
|
39
39
|
const ie = {
|
|
40
40
|
primary: "#00a1f8",
|
|
@@ -97,7 +97,7 @@ const ie = {
|
|
|
97
97
|
onDanger: "#fff",
|
|
98
98
|
onInfo: "#fff"
|
|
99
99
|
};
|
|
100
|
-
function
|
|
100
|
+
function be(t) {
|
|
101
101
|
if (!/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/.test(t))
|
|
102
102
|
throw new Error("Invalid color format");
|
|
103
103
|
t.length === 4 && (t = "#" + t[1] + t[1] + t[2] + t[2] + t[3] + t[3]);
|
|
@@ -109,22 +109,22 @@ function Re(t, n) {
|
|
|
109
109
|
throw new Error("Amount must be in the range [0, 100]");
|
|
110
110
|
if (n === 0)
|
|
111
111
|
return t;
|
|
112
|
-
const e =
|
|
113
|
-
return e.l = e.l + o * (100 - e.l),
|
|
112
|
+
const e = _e(t), o = n / 100;
|
|
113
|
+
return e.l = e.l + o * (100 - e.l), ke(e);
|
|
114
114
|
}
|
|
115
115
|
function He(t, n) {
|
|
116
116
|
if (n < 0 || n > 100)
|
|
117
117
|
throw new Error("Amount must be in the range [0, 100]");
|
|
118
118
|
if (n === 0)
|
|
119
119
|
return t;
|
|
120
|
-
const e =
|
|
121
|
-
return e.l = e.l - o * e.l,
|
|
120
|
+
const e = _e(t), o = n / 100;
|
|
121
|
+
return e.l = e.l - o * e.l, ke(e);
|
|
122
122
|
}
|
|
123
123
|
function ce(t) {
|
|
124
124
|
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");
|
|
125
125
|
return `#${n}${e}${o}`;
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function _e(t) {
|
|
128
128
|
const n = t.r / 255, e = t.g / 255, o = t.b / 255, a = Math.max(n, e, o), s = Math.min(n, e, o);
|
|
129
129
|
let l = 0, c;
|
|
130
130
|
const i = (a + s) / 2;
|
|
@@ -151,14 +151,14 @@ function be(t) {
|
|
|
151
151
|
l: Math.round(i * 100)
|
|
152
152
|
};
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function ke(t) {
|
|
155
155
|
const n = t.h / 360, e = t.s / 100, o = t.l / 100;
|
|
156
156
|
let a, s, l;
|
|
157
157
|
if (e === 0)
|
|
158
158
|
a = s = l = o;
|
|
159
159
|
else {
|
|
160
160
|
const c = o < 0.5 ? o * (1 + e) : o + e - o * e, i = 2 * o - c;
|
|
161
|
-
a =
|
|
161
|
+
a = P(i, c, n + 1 / 3), s = P(i, c, n), l = P(i, c, n - 1 / 3);
|
|
162
162
|
}
|
|
163
163
|
return {
|
|
164
164
|
r: Math.round(a * 255),
|
|
@@ -166,10 +166,16 @@ function _e(t) {
|
|
|
166
166
|
b: Math.round(l * 255)
|
|
167
167
|
};
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function P(t, n, e) {
|
|
170
170
|
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;
|
|
171
171
|
}
|
|
172
|
-
const
|
|
172
|
+
const Z = "q-theme";
|
|
173
|
+
function Ct() {
|
|
174
|
+
const t = pe(Z);
|
|
175
|
+
if (!t)
|
|
176
|
+
throw new Error("[framework] Could not find theme instance");
|
|
177
|
+
return t;
|
|
178
|
+
}
|
|
173
179
|
function Ne(t, n) {
|
|
174
180
|
let e = null;
|
|
175
181
|
if (n)
|
|
@@ -180,7 +186,7 @@ function Ne(t, n) {
|
|
|
180
186
|
for (s in o.colors) {
|
|
181
187
|
const l = o.colors[s];
|
|
182
188
|
if (l && !s.startsWith("on") && !s.endsWith("Light") && !s.endsWith("Dark")) {
|
|
183
|
-
const c =
|
|
189
|
+
const c = be(l), i = `${s}Light`, p = `${s}Dark`;
|
|
184
190
|
i in o.colors || (o.colors[i] = ce(Re(c, 85))), p in o.colors || (o.colors[p] = ce(He(c, 25)));
|
|
185
191
|
}
|
|
186
192
|
}
|
|
@@ -210,7 +216,7 @@ function Ne(t, n) {
|
|
|
210
216
|
s && Ke(s.colors);
|
|
211
217
|
},
|
|
212
218
|
{ immediate: !0 }
|
|
213
|
-
), t.provide(
|
|
219
|
+
), t.provide(Z, o);
|
|
214
220
|
}
|
|
215
221
|
}
|
|
216
222
|
function Ue(t, n = {}) {
|
|
@@ -218,9 +224,9 @@ function Ue(t, n = {}) {
|
|
|
218
224
|
}
|
|
219
225
|
function Ke(t) {
|
|
220
226
|
let n = document.getElementById(
|
|
221
|
-
|
|
227
|
+
Z
|
|
222
228
|
);
|
|
223
|
-
n || (n = document.createElement("style"), n.type = "text/css", n.id =
|
|
229
|
+
n || (n = document.createElement("style"), n.type = "text/css", n.id = Z, document.head.appendChild(n));
|
|
224
230
|
let e = `:root {
|
|
225
231
|
`, o;
|
|
226
232
|
for (o in t) {
|
|
@@ -228,7 +234,7 @@ function Ke(t) {
|
|
|
228
234
|
if (a) {
|
|
229
235
|
e += ` ${ue(o)}: ${a};
|
|
230
236
|
`;
|
|
231
|
-
const s =
|
|
237
|
+
const s = be(a);
|
|
232
238
|
e += ` ${ue(o)}-rgb: ${s.r} ${s.g} ${s.b};
|
|
233
239
|
`;
|
|
234
240
|
}
|
|
@@ -238,13 +244,16 @@ function Ke(t) {
|
|
|
238
244
|
function ue(t) {
|
|
239
245
|
return t ? `--q-theme-${t.replace(/([A-Z])/g, "-$1").replace(/^-/, "").toLowerCase()}` : "";
|
|
240
246
|
}
|
|
241
|
-
function
|
|
247
|
+
function It(t = {}) {
|
|
242
248
|
return { install: (e) => {
|
|
243
|
-
const o = t.
|
|
244
|
-
for (const
|
|
245
|
-
e.
|
|
246
|
-
const a = t.
|
|
247
|
-
|
|
249
|
+
const o = t.components || {};
|
|
250
|
+
for (const l in o)
|
|
251
|
+
e.component(l, o[l]);
|
|
252
|
+
const a = t.directives || {};
|
|
253
|
+
for (const l in a)
|
|
254
|
+
e.directive(l, a[l]);
|
|
255
|
+
const s = t.defaults || {};
|
|
256
|
+
e.provide(te, s), Ne(e, t.themes);
|
|
248
257
|
} };
|
|
249
258
|
}
|
|
250
259
|
const We = /* @__PURE__ */ X("svg", { viewBox: "25 25 50 50" }, [
|
|
@@ -288,7 +297,7 @@ function A(t) {
|
|
|
288
297
|
const a = Oe();
|
|
289
298
|
if (Ye(a))
|
|
290
299
|
return n(e, o);
|
|
291
|
-
const s =
|
|
300
|
+
const s = me();
|
|
292
301
|
if (s === null)
|
|
293
302
|
return n(e, o);
|
|
294
303
|
const l = new Proxy(e, {
|
|
@@ -341,7 +350,7 @@ const Ze = ["disabled", "onClick"], je = {
|
|
|
341
350
|
});
|
|
342
351
|
return (l, c) => (r(), f("button", {
|
|
343
352
|
type: "button",
|
|
344
|
-
class:
|
|
353
|
+
class: C(s.value),
|
|
345
354
|
disabled: o.value,
|
|
346
355
|
onClick: H(a, ["stop", "prevent"])
|
|
347
356
|
}, [
|
|
@@ -350,11 +359,11 @@ const Ze = ["disabled", "onClick"], je = {
|
|
|
350
359
|
])) : b("", !0),
|
|
351
360
|
X("span", Je, [
|
|
352
361
|
l.iconOnRight ? (r(), f(Q, { key: 0 }, [
|
|
353
|
-
U(
|
|
362
|
+
U(I(e.label), 1)
|
|
354
363
|
], 64)) : b("", !0),
|
|
355
364
|
L(l.$slots, "default"),
|
|
356
365
|
l.iconOnRight ? b("", !0) : (r(), f(Q, { key: 1 }, [
|
|
357
|
-
U(
|
|
366
|
+
U(I(e.label), 1)
|
|
358
367
|
], 64))
|
|
359
368
|
])
|
|
360
369
|
], 10, Ze));
|
|
@@ -371,9 +380,9 @@ const Ze = ["disabled", "onClick"], je = {
|
|
|
371
380
|
const n = t;
|
|
372
381
|
Fe({
|
|
373
382
|
QButton: {
|
|
374
|
-
bStyle:
|
|
375
|
-
disabled:
|
|
376
|
-
borderless:
|
|
383
|
+
bStyle: J(n, "bStyle"),
|
|
384
|
+
disabled: J(n, "disabled"),
|
|
385
|
+
borderless: J(n, "borderless"),
|
|
377
386
|
elevated: !1
|
|
378
387
|
}
|
|
379
388
|
});
|
|
@@ -384,12 +393,12 @@ const Ze = ["disabled", "onClick"], je = {
|
|
|
384
393
|
}
|
|
385
394
|
]);
|
|
386
395
|
return (o, a) => (r(), f("div", {
|
|
387
|
-
class:
|
|
396
|
+
class: C(e.value)
|
|
388
397
|
}, [
|
|
389
398
|
L(o.$slots, "default")
|
|
390
399
|
], 2));
|
|
391
400
|
}
|
|
392
|
-
}),
|
|
401
|
+
}), Vt = /* @__PURE__ */ _({
|
|
393
402
|
__name: "QButtonToggle",
|
|
394
403
|
props: {
|
|
395
404
|
modelValue: {},
|
|
@@ -424,7 +433,7 @@ const Ze = ["disabled", "onClick"], je = {
|
|
|
424
433
|
elevated: e.elevated
|
|
425
434
|
}, {
|
|
426
435
|
default: E(() => [
|
|
427
|
-
(r(!0), f(Q, null,
|
|
436
|
+
(r(!0), f(Q, null, ee(e.options, (i) => (r(), k(g(Pe), {
|
|
428
437
|
key: i.key,
|
|
429
438
|
title: i.title,
|
|
430
439
|
label: i.label,
|
|
@@ -451,21 +460,21 @@ const Ze = ["disabled", "onClick"], je = {
|
|
|
451
460
|
const n = t, e = y(() => {
|
|
452
461
|
switch (n.type) {
|
|
453
462
|
case "svg":
|
|
454
|
-
return
|
|
463
|
+
return Se;
|
|
455
464
|
case "font":
|
|
456
|
-
return ke;
|
|
457
|
-
case "img":
|
|
458
465
|
return we;
|
|
466
|
+
case "img":
|
|
467
|
+
return $e;
|
|
459
468
|
default:
|
|
460
469
|
return;
|
|
461
470
|
}
|
|
462
471
|
});
|
|
463
|
-
return (o, a) => (r(), k(
|
|
472
|
+
return (o, a) => (r(), k(he(e.value), {
|
|
464
473
|
icon: n.name,
|
|
465
474
|
size: n.size
|
|
466
475
|
}, null, 8, ["icon", "size"]));
|
|
467
476
|
}
|
|
468
|
-
}),
|
|
477
|
+
}), we = /* @__PURE__ */ _({
|
|
469
478
|
__name: "QIconFont",
|
|
470
479
|
props: {
|
|
471
480
|
icon: {},
|
|
@@ -479,11 +488,11 @@ const Ze = ["disabled", "onClick"], je = {
|
|
|
479
488
|
}));
|
|
480
489
|
return (a, s) => n.icon ? (r(), f("i", {
|
|
481
490
|
key: 0,
|
|
482
|
-
class:
|
|
491
|
+
class: C(["q-icon", "q-icon__font", e.value, `${n.library}-${n.icon}`]),
|
|
483
492
|
style: W(o.value)
|
|
484
493
|
}, null, 6)) : b("", !0);
|
|
485
494
|
}
|
|
486
|
-
}), tt = ["src"],
|
|
495
|
+
}), tt = ["src"], $e = /* @__PURE__ */ _({
|
|
487
496
|
__name: "QIconImg",
|
|
488
497
|
props: {
|
|
489
498
|
icon: {},
|
|
@@ -613,7 +622,7 @@ function at(t) {
|
|
|
613
622
|
);
|
|
614
623
|
return e.getIsPending = () => n, e;
|
|
615
624
|
}
|
|
616
|
-
const
|
|
625
|
+
const Se = /* @__PURE__ */ _({
|
|
617
626
|
__name: "QIconSvg",
|
|
618
627
|
props: {
|
|
619
628
|
icon: {},
|
|
@@ -637,9 +646,9 @@ const $e = /* @__PURE__ */ _({
|
|
|
637
646
|
}
|
|
638
647
|
});
|
|
639
648
|
A(O);
|
|
640
|
-
A(ke);
|
|
641
649
|
A(we);
|
|
642
650
|
A($e);
|
|
651
|
+
A(Se);
|
|
643
652
|
const st = {
|
|
644
653
|
key: 0,
|
|
645
654
|
class: "q-input__prepend"
|
|
@@ -656,7 +665,7 @@ const st = {
|
|
|
656
665
|
setup(t) {
|
|
657
666
|
const n = t;
|
|
658
667
|
return (e, o) => (r(), f("div", {
|
|
659
|
-
class:
|
|
668
|
+
class: C([
|
|
660
669
|
"q-input",
|
|
661
670
|
`q-input--${n.size}`,
|
|
662
671
|
{ "q-input--readonly": n.readonly, "q-input--disabled": n.disabled }
|
|
@@ -680,7 +689,7 @@ const st = {
|
|
|
680
689
|
function dt(t, n) {
|
|
681
690
|
return r(), f("div", ut);
|
|
682
691
|
}
|
|
683
|
-
const
|
|
692
|
+
const zt = /* @__PURE__ */ it(ct, [["render", dt]]), Be = /* @__PURE__ */ _({
|
|
684
693
|
__name: "QList",
|
|
685
694
|
props: {
|
|
686
695
|
modelValue: { type: [String, Number, Boolean, Symbol], default: void 0 },
|
|
@@ -732,9 +741,9 @@ const Vt = /* @__PURE__ */ it(ct, [["render", dt]]), Se = /* @__PURE__ */ _({
|
|
|
732
741
|
}
|
|
733
742
|
function q(d) {
|
|
734
743
|
var v;
|
|
735
|
-
(v =
|
|
744
|
+
(v = T().at(d)) == null || v.focus();
|
|
736
745
|
}
|
|
737
|
-
function
|
|
746
|
+
function T() {
|
|
738
747
|
var v;
|
|
739
748
|
const d = (v = c.value) == null ? void 0 : v.querySelectorAll("li");
|
|
740
749
|
return d ? Array.from(d).filter((x) => x.tabIndex !== -1) : [];
|
|
@@ -743,7 +752,7 @@ const Vt = /* @__PURE__ */ it(ct, [["render", dt]]), Se = /* @__PURE__ */ _({
|
|
|
743
752
|
return d.indexOf(document.activeElement);
|
|
744
753
|
}
|
|
745
754
|
function M(d) {
|
|
746
|
-
const $ =
|
|
755
|
+
const $ = T(), v = F($);
|
|
747
756
|
return d === "next" ? v === $.length - 1 ? v : v + 1 : v === 0 ? 0 : v - 1;
|
|
748
757
|
}
|
|
749
758
|
function V(d) {
|
|
@@ -754,21 +763,21 @@ const Vt = /* @__PURE__ */ it(ct, [["render", dt]]), Se = /* @__PURE__ */ _({
|
|
|
754
763
|
(d) => {
|
|
755
764
|
a.value = d;
|
|
756
765
|
}
|
|
757
|
-
), n({ focusItem: q }), (d, $) => (r(), k(
|
|
766
|
+
), n({ focusItem: q }), (d, $) => (r(), k(he(s.value), {
|
|
758
767
|
ref_key: "listRef",
|
|
759
768
|
ref: c,
|
|
760
|
-
class:
|
|
769
|
+
class: C(["q-list", { "q-list--disabled": o.disabled }]),
|
|
761
770
|
role: "listbox",
|
|
762
771
|
tabindex: o.disabled ? -1 : 0,
|
|
763
772
|
onFocus: p,
|
|
764
773
|
onKeydown: w
|
|
765
774
|
}, {
|
|
766
775
|
default: E(() => [
|
|
767
|
-
(r(!0), f(Q, null,
|
|
776
|
+
(r(!0), f(Q, null, ee(l.value, (v) => (r(), k(g(xe), K({
|
|
768
777
|
key: v.title
|
|
769
778
|
}, v), {
|
|
770
779
|
default: E(() => [
|
|
771
|
-
(r(!0), f(Q, null,
|
|
780
|
+
(r(!0), f(Q, null, ee(V(v.title), (x) => (r(), k(g(Le), {
|
|
772
781
|
key: x[o.itemValue],
|
|
773
782
|
value: x[o.itemValue],
|
|
774
783
|
label: x[o.itemLabel],
|
|
@@ -788,7 +797,7 @@ const Vt = /* @__PURE__ */ it(ct, [["render", dt]]), Se = /* @__PURE__ */ _({
|
|
|
788
797
|
check: {
|
|
789
798
|
name: "check"
|
|
790
799
|
}
|
|
791
|
-
},
|
|
800
|
+
}, Le = /* @__PURE__ */ _({
|
|
792
801
|
__name: "QListItem",
|
|
793
802
|
props: {
|
|
794
803
|
value: { type: [String, Number, Boolean, Symbol] },
|
|
@@ -811,7 +820,7 @@ const Vt = /* @__PURE__ */ it(ct, [["render", dt]]), Se = /* @__PURE__ */ _({
|
|
|
811
820
|
return (s, l) => (r(), f("li", {
|
|
812
821
|
role: "option",
|
|
813
822
|
tabindex: e.disabled ? void 0 : -2,
|
|
814
|
-
class:
|
|
823
|
+
class: C([
|
|
815
824
|
"q-list-item",
|
|
816
825
|
{
|
|
817
826
|
"q-list-item--disabled": e.disabled,
|
|
@@ -824,8 +833,8 @@ const Vt = /* @__PURE__ */ it(ct, [["render", dt]]), Se = /* @__PURE__ */ _({
|
|
|
824
833
|
onKeydown: a,
|
|
825
834
|
onClick: H(o, ["stop", "prevent"])
|
|
826
835
|
}, [
|
|
827
|
-
e.icon ? (r(), k(g(O),
|
|
828
|
-
U(" " +
|
|
836
|
+
e.icon ? (r(), k(g(O), ye(K({ key: 0 }, e.icon)), null, 16)) : b("", !0),
|
|
837
|
+
U(" " + I(e.label) + " ", 1),
|
|
829
838
|
e.selected ? (r(), k(g(O), K({ key: 1 }, e.icons.check, { class: "q-list-item__check" }), null, 16)) : b("", !0)
|
|
830
839
|
], 42, ft));
|
|
831
840
|
}
|
|
@@ -834,7 +843,7 @@ let mt = 0;
|
|
|
834
843
|
function ht() {
|
|
835
844
|
return `uid-${++mt}`;
|
|
836
845
|
}
|
|
837
|
-
const yt = ["aria-labelledby"], vt = ["id"],
|
|
846
|
+
const yt = ["aria-labelledby"], vt = ["id"], xe = /* @__PURE__ */ _({
|
|
838
847
|
__name: "QListItemGroup",
|
|
839
848
|
props: {
|
|
840
849
|
id: { default: () => ht() },
|
|
@@ -854,18 +863,18 @@ const yt = ["aria-labelledby"], vt = ["id"], Le = /* @__PURE__ */ _({
|
|
|
854
863
|
id: n.id,
|
|
855
864
|
class: "q-list-item-group__title",
|
|
856
865
|
role: "presentation"
|
|
857
|
-
},
|
|
866
|
+
}, I(n.title), 9, vt)) : b("", !0),
|
|
858
867
|
L(e.$slots, "default")
|
|
859
868
|
], 8, yt)) : L(e.$slots, "default", { key: 0 });
|
|
860
869
|
}
|
|
861
870
|
});
|
|
862
|
-
A(Se);
|
|
863
871
|
A(Be);
|
|
864
872
|
A(Le);
|
|
873
|
+
A(xe);
|
|
865
874
|
function gt(t, n, e = "right", o) {
|
|
866
875
|
const a = t.getBoundingClientRect(), s = a.x + window.scrollX, l = a.y + window.scrollY, c = n == null ? void 0 : n.getBoundingClientRect(), i = (c == null ? void 0 : c.width) ?? 0, p = (c == null ? void 0 : c.height) ?? 0;
|
|
867
876
|
let w = e;
|
|
868
|
-
c && !
|
|
877
|
+
c && !qe(a, c, w) && (w = bt(a, c, w));
|
|
869
878
|
const m = { x: 0, y: 0, placement: w };
|
|
870
879
|
switch (w) {
|
|
871
880
|
case "top":
|
|
@@ -883,7 +892,7 @@ function gt(t, n, e = "right", o) {
|
|
|
883
892
|
}
|
|
884
893
|
return o === "anchor" && (m.width = a.width), m;
|
|
885
894
|
}
|
|
886
|
-
function
|
|
895
|
+
function qe(t, n, e) {
|
|
887
896
|
let o = !1, a = !1;
|
|
888
897
|
switch (e) {
|
|
889
898
|
case "top":
|
|
@@ -915,7 +924,7 @@ function bt(t, n, e) {
|
|
|
915
924
|
right: ["left", "top", "bottom"]
|
|
916
925
|
};
|
|
917
926
|
for (const a of o[e])
|
|
918
|
-
if (
|
|
927
|
+
if (qe(t, n, a))
|
|
919
928
|
return a;
|
|
920
929
|
return e;
|
|
921
930
|
}
|
|
@@ -1002,7 +1011,7 @@ const _t = {
|
|
|
1002
1011
|
function q() {
|
|
1003
1012
|
s.value ? m() : w();
|
|
1004
1013
|
}
|
|
1005
|
-
let
|
|
1014
|
+
let T;
|
|
1006
1015
|
function F() {
|
|
1007
1016
|
le(() => {
|
|
1008
1017
|
const h = Y(e.anchor);
|
|
@@ -1020,7 +1029,7 @@ const _t = {
|
|
|
1020
1029
|
function M() {
|
|
1021
1030
|
le(() => {
|
|
1022
1031
|
const h = Y(e.anchor);
|
|
1023
|
-
h && (window.addEventListener("scroll", i), window.addEventListener("resize", i),
|
|
1032
|
+
h && (window.addEventListener("scroll", i), window.addEventListener("resize", i), T = new MutationObserver(i), T.observe(h, {
|
|
1024
1033
|
attributes: !1,
|
|
1025
1034
|
childList: !0,
|
|
1026
1035
|
characterData: !0,
|
|
@@ -1029,7 +1038,7 @@ const _t = {
|
|
|
1029
1038
|
});
|
|
1030
1039
|
}
|
|
1031
1040
|
function V() {
|
|
1032
|
-
window.removeEventListener("scroll", i), window.removeEventListener("resize", i),
|
|
1041
|
+
window.removeEventListener("scroll", i), window.removeEventListener("resize", i), T == null || T.disconnect();
|
|
1033
1042
|
}
|
|
1034
1043
|
let d;
|
|
1035
1044
|
function $() {
|
|
@@ -1041,7 +1050,7 @@ const _t = {
|
|
|
1041
1050
|
function x() {
|
|
1042
1051
|
V(), e.spy && (clearTimeout(d), d = void 0);
|
|
1043
1052
|
}
|
|
1044
|
-
return
|
|
1053
|
+
return Te(x), Ce(i), z(
|
|
1045
1054
|
() => e.disabled,
|
|
1046
1055
|
(h) => {
|
|
1047
1056
|
h || F();
|
|
@@ -1055,7 +1064,7 @@ const _t = {
|
|
|
1055
1064
|
{ immediate: !0 }
|
|
1056
1065
|
), (h, S) => (r(), f(Q, null, [
|
|
1057
1066
|
L(h.$slots, "trigger", { open: s.value }),
|
|
1058
|
-
(r(), k(
|
|
1067
|
+
(r(), k(Ie, {
|
|
1059
1068
|
to: e.attach
|
|
1060
1069
|
}, [
|
|
1061
1070
|
N(Ve, {
|
|
@@ -1067,11 +1076,11 @@ const _t = {
|
|
|
1067
1076
|
default: E(() => [
|
|
1068
1077
|
s.value ? (r(), f("div", {
|
|
1069
1078
|
key: 0,
|
|
1070
|
-
class:
|
|
1079
|
+
class: C(o.value),
|
|
1071
1080
|
style: W(l.value)
|
|
1072
1081
|
}, [
|
|
1073
1082
|
X("div", {
|
|
1074
|
-
class:
|
|
1083
|
+
class: C(["q-overlay__content"]),
|
|
1075
1084
|
ref_key: "overlay",
|
|
1076
1085
|
ref: c
|
|
1077
1086
|
}, [
|
|
@@ -1091,7 +1100,7 @@ const _t = {
|
|
|
1091
1100
|
}, wt = {
|
|
1092
1101
|
key: 1,
|
|
1093
1102
|
class: "q-popover__body"
|
|
1094
|
-
}, $t = ["innerHTML"], St = { key: 1 },
|
|
1103
|
+
}, $t = ["innerHTML"], St = { key: 1 }, Qt = /* @__PURE__ */ _({
|
|
1095
1104
|
__name: "QPopover",
|
|
1096
1105
|
props: {
|
|
1097
1106
|
modelValue: { type: Boolean },
|
|
@@ -1120,14 +1129,14 @@ const _t = {
|
|
|
1120
1129
|
}, {
|
|
1121
1130
|
default: E(() => [
|
|
1122
1131
|
n.title || e.$slots.header ? (r(), f("h3", kt, [
|
|
1123
|
-
U(
|
|
1132
|
+
U(I(n.title) + " ", 1),
|
|
1124
1133
|
L(e.$slots, "header")
|
|
1125
1134
|
])) : b("", !0),
|
|
1126
1135
|
n.text || e.$slots.body ? (r(), f("div", wt, [
|
|
1127
1136
|
n.html ? (r(), f("span", {
|
|
1128
1137
|
key: 0,
|
|
1129
1138
|
innerHTML: n.text
|
|
1130
|
-
}, null, 8, $t)) : (r(), f("span", St,
|
|
1139
|
+
}, null, 8, $t)) : (r(), f("span", St, I(n.text), 1)),
|
|
1131
1140
|
L(e.$slots, "body")
|
|
1132
1141
|
])) : b("", !0)
|
|
1133
1142
|
]),
|
|
@@ -1156,7 +1165,7 @@ const _t = {
|
|
|
1156
1165
|
clear: {
|
|
1157
1166
|
name: "close"
|
|
1158
1167
|
}
|
|
1159
|
-
},
|
|
1168
|
+
}, At = /* @__PURE__ */ _({
|
|
1160
1169
|
__name: "QSelect",
|
|
1161
1170
|
props: {
|
|
1162
1171
|
modelValue: { type: [String, Number, Boolean, Symbol], default: void 0 },
|
|
@@ -1187,7 +1196,7 @@ const _t = {
|
|
|
1187
1196
|
function q() {
|
|
1188
1197
|
m.value && (o.value = void 0, n("update:modelValue", o.value), V());
|
|
1189
1198
|
}
|
|
1190
|
-
function
|
|
1199
|
+
function T() {
|
|
1191
1200
|
e.readonly || e.disabled || (a.value ? V() : M());
|
|
1192
1201
|
}
|
|
1193
1202
|
function F(u) {
|
|
@@ -1237,14 +1246,14 @@ const _t = {
|
|
|
1237
1246
|
o.value = u;
|
|
1238
1247
|
}
|
|
1239
1248
|
), (u, B) => {
|
|
1240
|
-
var
|
|
1249
|
+
var j, ae;
|
|
1241
1250
|
return r(), f(Q, null, [
|
|
1242
1251
|
N(g(rt), {
|
|
1243
1252
|
ref_key: "inputRef",
|
|
1244
1253
|
ref: l,
|
|
1245
1254
|
role: "combobox",
|
|
1246
1255
|
tabindex: "0",
|
|
1247
|
-
class:
|
|
1256
|
+
class: C([
|
|
1248
1257
|
"q-select",
|
|
1249
1258
|
{
|
|
1250
1259
|
"q-select--readonly": e.readonly,
|
|
@@ -1257,7 +1266,7 @@ const _t = {
|
|
|
1257
1266
|
"aria-expanded": a.value,
|
|
1258
1267
|
"aria-haspopup": "listbox",
|
|
1259
1268
|
size: e.size,
|
|
1260
|
-
onClick:
|
|
1269
|
+
onClick: T,
|
|
1261
1270
|
onKeydown: H($, ["stop"])
|
|
1262
1271
|
}, ze({
|
|
1263
1272
|
append: E(() => [
|
|
@@ -1269,17 +1278,17 @@ const _t = {
|
|
|
1269
1278
|
]),
|
|
1270
1279
|
default: E(() => [
|
|
1271
1280
|
o.value ? (r(), f(Q, { key: 0 }, [
|
|
1272
|
-
U(
|
|
1273
|
-
], 64)) : (r(), f("span", Lt,
|
|
1281
|
+
U(I(w.value), 1)
|
|
1282
|
+
], 64)) : (r(), f("span", Lt, I(u.texts.placeholder), 1))
|
|
1274
1283
|
]),
|
|
1275
1284
|
_: 2
|
|
1276
1285
|
}, [
|
|
1277
|
-
(
|
|
1286
|
+
(j = p.value) != null && j.icon ? {
|
|
1278
1287
|
name: "prepend",
|
|
1279
1288
|
fn: E(() => {
|
|
1280
1289
|
var G;
|
|
1281
1290
|
return [
|
|
1282
|
-
N(g(O),
|
|
1291
|
+
N(g(O), ye(Qe((G = p.value) == null ? void 0 : G.icon)), null, 16)
|
|
1283
1292
|
];
|
|
1284
1293
|
}),
|
|
1285
1294
|
key: "0"
|
|
@@ -1307,7 +1316,7 @@ const _t = {
|
|
|
1307
1316
|
key: 0,
|
|
1308
1317
|
class: "q-select__loader",
|
|
1309
1318
|
size: 24
|
|
1310
|
-
})) : (r(), k(g(
|
|
1319
|
+
})) : (r(), k(g(Be), {
|
|
1311
1320
|
key: 1,
|
|
1312
1321
|
ref_key: "listRef",
|
|
1313
1322
|
ref: c,
|
|
@@ -1333,7 +1342,7 @@ const _t = {
|
|
|
1333
1342
|
], 64);
|
|
1334
1343
|
};
|
|
1335
1344
|
}
|
|
1336
|
-
}), Dt = ["innerHTML"], Et = { key: 1 },
|
|
1345
|
+
}), Dt = ["innerHTML"], Et = { key: 1 }, Ot = /* @__PURE__ */ _({
|
|
1337
1346
|
__name: "QTooltip",
|
|
1338
1347
|
props: {
|
|
1339
1348
|
modelValue: { type: Boolean },
|
|
@@ -1366,7 +1375,7 @@ const _t = {
|
|
|
1366
1375
|
n.html ? (r(), f("span", {
|
|
1367
1376
|
key: 0,
|
|
1368
1377
|
innerHTML: n.text
|
|
1369
|
-
}, null, 8, Dt)) : (r(), f("span", Et,
|
|
1378
|
+
}, null, 8, Dt)) : (r(), f("span", Et, I(n.text), 1))
|
|
1370
1379
|
]),
|
|
1371
1380
|
_: 1
|
|
1372
1381
|
}, 8, ["model-value", "anchor", "appearance", "arrow", "attach", "delay", "disabled", "placement", "trigger"]));
|
|
@@ -1375,24 +1384,25 @@ const _t = {
|
|
|
1375
1384
|
export {
|
|
1376
1385
|
Pe as QButton,
|
|
1377
1386
|
et as QButtonGroup,
|
|
1378
|
-
|
|
1387
|
+
Vt as QButtonToggle,
|
|
1379
1388
|
O as QIcon,
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1389
|
+
we as QIconFont,
|
|
1390
|
+
$e as QIconImg,
|
|
1391
|
+
Se as QIconSvg,
|
|
1383
1392
|
rt as QInput,
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1393
|
+
zt as QLineLoader,
|
|
1394
|
+
Be as QList,
|
|
1395
|
+
Le as QListItem,
|
|
1396
|
+
xe as QListItemGroup,
|
|
1388
1397
|
oe as QOverlay,
|
|
1389
|
-
|
|
1390
|
-
|
|
1398
|
+
Qt as QPopover,
|
|
1399
|
+
At as QSelect,
|
|
1391
1400
|
ne as QSpinnerLoader,
|
|
1392
|
-
|
|
1401
|
+
Ot as QTooltip,
|
|
1393
1402
|
Bt as clickOutside,
|
|
1394
|
-
|
|
1403
|
+
It as createFramework,
|
|
1395
1404
|
Me as defaultDarkColorScheme,
|
|
1396
|
-
ie as defaultLightColorScheme
|
|
1405
|
+
ie as defaultLightColorScheme,
|
|
1406
|
+
Ct as useTheme
|
|
1397
1407
|
};
|
|
1398
1408
|
//# sourceMappingURL=ui.esm.js.map
|