@maltjoy/core-vue 3.8.0 → 3.9.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/README.md +2 -0
- package/dist/components/JoyDropdown/VJoyDropdown.vue.d.ts +4 -0
- package/dist/components/JoyDropdownList/JoyDropdownList.types.d.ts +1 -1
- package/dist/components/JoyDropdownList/VJoyDropdownList.vue.d.ts +2 -0
- package/dist/components/JoySelect/JoySelect.types.d.ts +3 -0
- package/dist/components/JoySelect/VJoySelect.vue.d.ts +10 -3
- package/dist/joy-vue.js +464 -455
- package/dist/joy-vue.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -3
package/dist/joy-vue.js
CHANGED
|
@@ -27,21 +27,21 @@ const vt = ["info", "gray", "green", "orange", "red", "teal", "pink", "dark-blue
|
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
setup(e) {
|
|
30
|
-
return (
|
|
30
|
+
return (l, t) => (m(), p("span", {
|
|
31
31
|
class: w(["joy-badge", `joy-badge__${e.variant}`, { "joy-badge--with-bulletpoint": e.bulletpoint }]),
|
|
32
32
|
role: "status"
|
|
33
33
|
}, [
|
|
34
|
-
h(
|
|
34
|
+
h(l.$slots, "default", {}, () => [
|
|
35
35
|
C(I(e.label), 1)
|
|
36
36
|
], !0)
|
|
37
37
|
], 2));
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
|
-
const V = (e,
|
|
41
|
-
const
|
|
42
|
-
for (const [o, n] of
|
|
43
|
-
|
|
44
|
-
return
|
|
40
|
+
const V = (e, l) => {
|
|
41
|
+
const t = e.__vccOpts || e;
|
|
42
|
+
for (const [o, n] of l)
|
|
43
|
+
t[o] = n;
|
|
44
|
+
return t;
|
|
45
45
|
}, pt = /* @__PURE__ */ V(mt, [["__scopeId", "data-v-1ed08e27"]]), ht = ["teal", "white"], gt = /* @__PURE__ */ $({
|
|
46
46
|
__name: "VJoySpinner",
|
|
47
47
|
props: {
|
|
@@ -53,7 +53,7 @@ const V = (e, t) => {
|
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
55
|
setup(e) {
|
|
56
|
-
return (
|
|
56
|
+
return (l, t) => (m(), p("div", {
|
|
57
57
|
class: w(["joy-spinner", `joy-spinner_${e.color}`])
|
|
58
58
|
}, null, 2));
|
|
59
59
|
}
|
|
@@ -75,7 +75,7 @@ const pe = /* @__PURE__ */ V(gt, [["__scopeId", "data-v-616a29d0"]]), R = /* @__
|
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
77
|
setup(e) {
|
|
78
|
-
return (
|
|
78
|
+
return (l, t) => (m(), p("span", {
|
|
79
79
|
class: w(["joy-icon", `joy-icon--${e.color}`, `joy-icon--${e.size}`])
|
|
80
80
|
}, [
|
|
81
81
|
b("i", {
|
|
@@ -133,8 +133,8 @@ const bt = ["primary", "secondary"], _t = ["neutral", "success", "info", "warnin
|
|
|
133
133
|
}
|
|
134
134
|
},
|
|
135
135
|
setup(e) {
|
|
136
|
-
const
|
|
137
|
-
switch (
|
|
136
|
+
const l = e, t = Me(), o = L(() => {
|
|
137
|
+
switch (l.size) {
|
|
138
138
|
case "xxsmall":
|
|
139
139
|
return "xxsmall";
|
|
140
140
|
case "xsmall":
|
|
@@ -144,10 +144,10 @@ const bt = ["primary", "secondary"], _t = ["neutral", "success", "info", "warnin
|
|
|
144
144
|
default:
|
|
145
145
|
return "small";
|
|
146
146
|
}
|
|
147
|
-
}), n = L(() => ["white", "ghost", "secondary"].includes(
|
|
148
|
-
return (r, s) => (m(), x(ce(k(
|
|
149
|
-
disabled: e.loading || k(
|
|
150
|
-
type: k(
|
|
147
|
+
}), n = L(() => ["white", "ghost", "secondary"].includes(l.variant) ? "teal" : "white");
|
|
148
|
+
return (r, s) => (m(), x(ce(k(t).href ? "a" : "button"), {
|
|
149
|
+
disabled: e.loading || k(t).disabled,
|
|
150
|
+
type: k(t).type || "button",
|
|
151
151
|
class: w([
|
|
152
152
|
"joy-button",
|
|
153
153
|
`joy-button_${e.variant}`,
|
|
@@ -239,20 +239,20 @@ const Ue = /* @__PURE__ */ V($t, [["__scopeId", "data-v-ae0676bb"]]), Vt = ["ari
|
|
|
239
239
|
}
|
|
240
240
|
},
|
|
241
241
|
emits: ["update:checked", "focus", "blur"],
|
|
242
|
-
setup(e, { expose:
|
|
243
|
-
const o = e, n = g(), r = g(o.indeterminate), s = g(o.invalid),
|
|
242
|
+
setup(e, { expose: l, emit: t }) {
|
|
243
|
+
const o = e, n = g(), r = g(o.indeterminate), s = g(o.invalid), i = g(!1), c = {
|
|
244
244
|
onChange: (y) => {
|
|
245
245
|
const u = y.target.checked;
|
|
246
|
-
r.value = !1, s.value = !1,
|
|
246
|
+
r.value = !1, s.value = !1, t("update:checked", u);
|
|
247
247
|
},
|
|
248
248
|
onFocus: () => {
|
|
249
|
-
|
|
249
|
+
i.value = !0, t("focus");
|
|
250
250
|
},
|
|
251
251
|
onBlur: () => {
|
|
252
|
-
|
|
252
|
+
i.value = !1, t("blur");
|
|
253
253
|
}
|
|
254
254
|
};
|
|
255
|
-
return
|
|
255
|
+
return l({
|
|
256
256
|
isIndeterminate: r
|
|
257
257
|
}), (y, u) => (m(), p("div", {
|
|
258
258
|
class: "joy-checkbox__wrapper",
|
|
@@ -267,7 +267,7 @@ const Ue = /* @__PURE__ */ V($t, [["__scopeId", "data-v-ae0676bb"]]), Vt = ["ari
|
|
|
267
267
|
"joy-checkbox__indeterminate": r.value,
|
|
268
268
|
"joy-checkbox__disabled": e.disabled,
|
|
269
269
|
"joy-checkbox__invalid": s.value,
|
|
270
|
-
"joy-checkbox__focusing":
|
|
270
|
+
"joy-checkbox__focusing": i.value && e.displayFocus
|
|
271
271
|
}
|
|
272
272
|
])
|
|
273
273
|
}, [
|
|
@@ -378,15 +378,15 @@ const he = /* @__PURE__ */ V(Lt, [["__scopeId", "data-v-27cc9d8c"]]), Et = { cla
|
|
|
378
378
|
}
|
|
379
379
|
},
|
|
380
380
|
emits: ["update:modelValue"],
|
|
381
|
-
setup(e, { expose:
|
|
381
|
+
setup(e, { expose: l, emit: t }) {
|
|
382
382
|
const o = e, n = g(!1), r = g(!1);
|
|
383
383
|
function s() {
|
|
384
384
|
const d = y(!1);
|
|
385
|
-
d >= 0 ?
|
|
385
|
+
d >= 0 ? t("update:modelValue", d <= o.min ? o.min : d) : t("update:modelValue", 0), c();
|
|
386
386
|
}
|
|
387
|
-
function
|
|
387
|
+
function i() {
|
|
388
388
|
const d = y();
|
|
389
|
-
o.max && d <= o.max ?
|
|
389
|
+
o.max && d <= o.max ? t("update:modelValue", d >= o.max ? o.max : d) : o.max && d > o.max ? t("update:modelValue", o.max) : t("update:modelValue", d), c();
|
|
390
390
|
}
|
|
391
391
|
function c() {
|
|
392
392
|
n.value = !u();
|
|
@@ -396,17 +396,17 @@ const he = /* @__PURE__ */ V(Lt, [["__scopeId", "data-v-27cc9d8c"]]), Et = { cla
|
|
|
396
396
|
return parseFloat(d ? (o.modelValue + o.step).toFixed(S) : (o.modelValue - o.step).toFixed(S));
|
|
397
397
|
}
|
|
398
398
|
function u() {
|
|
399
|
-
return v() &&
|
|
399
|
+
return v() && a();
|
|
400
400
|
}
|
|
401
401
|
function v() {
|
|
402
402
|
return !o.max || o.modelValue <= o.max;
|
|
403
403
|
}
|
|
404
|
-
function
|
|
404
|
+
function a() {
|
|
405
405
|
return o.min <= o.modelValue;
|
|
406
406
|
}
|
|
407
407
|
const f = {
|
|
408
408
|
onInput: (d) => {
|
|
409
|
-
|
|
409
|
+
t("update:modelValue", +d.target.value || 0), n.value = !1;
|
|
410
410
|
},
|
|
411
411
|
onFocus: () => {
|
|
412
412
|
r.value = !0;
|
|
@@ -415,7 +415,7 @@ const he = /* @__PURE__ */ V(Lt, [["__scopeId", "data-v-27cc9d8c"]]), Et = { cla
|
|
|
415
415
|
r.value = !1, c();
|
|
416
416
|
}
|
|
417
417
|
};
|
|
418
|
-
return
|
|
418
|
+
return l({
|
|
419
419
|
props: o
|
|
420
420
|
}), (d, j) => (m(), p("div", Et, [
|
|
421
421
|
e.label ? (m(), x(k(W), {
|
|
@@ -471,7 +471,7 @@ const he = /* @__PURE__ */ V(Lt, [["__scopeId", "data-v-27cc9d8c"]]), Et = { cla
|
|
|
471
471
|
type: "button",
|
|
472
472
|
"aria-label": e.labelIncrement,
|
|
473
473
|
disabled: e.max ? e.modelValue >= e.max : !1,
|
|
474
|
-
onClick:
|
|
474
|
+
onClick: i
|
|
475
475
|
}, [
|
|
476
476
|
N(k(R), { name: "add" })
|
|
477
477
|
], 8, qt),
|
|
@@ -489,42 +489,42 @@ const K = typeof window < "u", Ge = (e) => typeof e == "string", z = () => {
|
|
|
489
489
|
function P(e) {
|
|
490
490
|
return typeof e == "function" ? e() : k(e);
|
|
491
491
|
}
|
|
492
|
-
function Ke(e,
|
|
493
|
-
function
|
|
492
|
+
function Ke(e, l) {
|
|
493
|
+
function t(...o) {
|
|
494
494
|
return new Promise((n, r) => {
|
|
495
|
-
Promise.resolve(e(() =>
|
|
495
|
+
Promise.resolve(e(() => l.apply(this, o), { fn: l, thisArg: this, args: o })).then(n).catch(r);
|
|
496
496
|
});
|
|
497
497
|
}
|
|
498
|
-
return
|
|
498
|
+
return t;
|
|
499
499
|
}
|
|
500
|
-
function Dt(e,
|
|
501
|
-
let
|
|
502
|
-
const r = (
|
|
503
|
-
clearTimeout(
|
|
500
|
+
function Dt(e, l = {}) {
|
|
501
|
+
let t, o, n = z;
|
|
502
|
+
const r = (i) => {
|
|
503
|
+
clearTimeout(i), n(), n = z;
|
|
504
504
|
};
|
|
505
|
-
return (
|
|
506
|
-
const c = P(e), y = P(
|
|
507
|
-
return
|
|
508
|
-
n =
|
|
509
|
-
|
|
510
|
-
}, y)),
|
|
511
|
-
o && r(o), o = null, u(
|
|
505
|
+
return (i) => {
|
|
506
|
+
const c = P(e), y = P(l.maxWait);
|
|
507
|
+
return t && r(t), c <= 0 || y !== void 0 && y <= 0 ? (o && (r(o), o = null), Promise.resolve(i())) : new Promise((u, v) => {
|
|
508
|
+
n = l.rejectOnCancel ? v : u, y && !o && (o = setTimeout(() => {
|
|
509
|
+
t && r(t), o = null, u(i());
|
|
510
|
+
}, y)), t = setTimeout(() => {
|
|
511
|
+
o && r(o), o = null, u(i());
|
|
512
512
|
}, c);
|
|
513
513
|
});
|
|
514
514
|
};
|
|
515
515
|
}
|
|
516
|
-
function Rt(e,
|
|
517
|
-
let n = 0, r, s = !0,
|
|
516
|
+
function Rt(e, l = !0, t = !0, o = !1) {
|
|
517
|
+
let n = 0, r, s = !0, i = z, c;
|
|
518
518
|
const y = () => {
|
|
519
|
-
r && (clearTimeout(r), r = void 0,
|
|
519
|
+
r && (clearTimeout(r), r = void 0, i(), i = z);
|
|
520
520
|
};
|
|
521
521
|
return (v) => {
|
|
522
|
-
const
|
|
523
|
-
return y(),
|
|
524
|
-
|
|
522
|
+
const a = P(e), f = Date.now() - n, d = () => c = v();
|
|
523
|
+
return y(), a <= 0 ? (n = Date.now(), d()) : (f > a && (t || !s) ? (n = Date.now(), d()) : l && (c = new Promise((j, S) => {
|
|
524
|
+
i = o ? S : j, r = setTimeout(() => {
|
|
525
525
|
n = Date.now(), s = !0, j(d()), y();
|
|
526
|
-
}, Math.max(0,
|
|
527
|
-
})), !
|
|
526
|
+
}, Math.max(0, a - f));
|
|
527
|
+
})), !t && !r && (r = setTimeout(() => s = !0, a)), s = !1, c);
|
|
528
528
|
};
|
|
529
529
|
}
|
|
530
530
|
const M = {
|
|
@@ -538,106 +538,106 @@ function Mt(e) {
|
|
|
538
538
|
function Q(e) {
|
|
539
539
|
return nt() ? (at(e), !0) : !1;
|
|
540
540
|
}
|
|
541
|
-
function Nt(e,
|
|
542
|
-
return Ke(Dt(
|
|
541
|
+
function Nt(e, l = 200, t = {}) {
|
|
542
|
+
return Ke(Dt(l, t), e);
|
|
543
543
|
}
|
|
544
|
-
function Ht(e,
|
|
545
|
-
return Ke(Rt(
|
|
544
|
+
function Ht(e, l = 200, t = !1, o = !0, n = !1) {
|
|
545
|
+
return Ke(Rt(l, t, o, n), e);
|
|
546
546
|
}
|
|
547
547
|
function Wt(e) {
|
|
548
548
|
return typeof e == "function" ? L(e) : g(e);
|
|
549
549
|
}
|
|
550
|
-
function Qe(e,
|
|
551
|
-
it() ? X(e) :
|
|
550
|
+
function Qe(e, l = !0) {
|
|
551
|
+
it() ? X(e) : l ? e() : Ne(e);
|
|
552
552
|
}
|
|
553
553
|
function U(e) {
|
|
554
|
-
var
|
|
555
|
-
const
|
|
556
|
-
return (
|
|
554
|
+
var l;
|
|
555
|
+
const t = P(e);
|
|
556
|
+
return (l = t == null ? void 0 : t.$el) != null ? l : t;
|
|
557
557
|
}
|
|
558
558
|
const ge = K ? window : void 0;
|
|
559
559
|
K && window.document;
|
|
560
560
|
K && window.navigator;
|
|
561
561
|
K && window.location;
|
|
562
562
|
function ae(...e) {
|
|
563
|
-
let
|
|
564
|
-
if (Ge(e[0]) || Array.isArray(e[0]) ? ([
|
|
563
|
+
let l, t, o, n;
|
|
564
|
+
if (Ge(e[0]) || Array.isArray(e[0]) ? ([t, o, n] = e, l = ge) : [l, t, o, n] = e, !l)
|
|
565
565
|
return z;
|
|
566
|
-
Array.isArray(
|
|
566
|
+
Array.isArray(t) || (t = [t]), Array.isArray(o) || (o = [o]);
|
|
567
567
|
const r = [], s = () => {
|
|
568
568
|
r.forEach((u) => u()), r.length = 0;
|
|
569
|
-
},
|
|
570
|
-
s(), u && r.push(...
|
|
569
|
+
}, i = (u, v, a, f) => (u.addEventListener(v, a, f), () => u.removeEventListener(v, a, f)), c = J(() => [U(l), P(n)], ([u, v]) => {
|
|
570
|
+
s(), u && r.push(...t.flatMap((a) => o.map((f) => i(u, a, f, v))));
|
|
571
571
|
}, { immediate: !0, flush: "post" }), y = () => {
|
|
572
572
|
c(), s();
|
|
573
573
|
};
|
|
574
574
|
return Q(y), y;
|
|
575
575
|
}
|
|
576
576
|
let Se = !1;
|
|
577
|
-
function Ut(e,
|
|
578
|
-
const { window: o = ge, ignore: n = [], capture: r = !0, detectIframe: s = !1 } =
|
|
577
|
+
function Ut(e, l, t = {}) {
|
|
578
|
+
const { window: o = ge, ignore: n = [], capture: r = !0, detectIframe: s = !1 } = t;
|
|
579
579
|
if (!o)
|
|
580
580
|
return;
|
|
581
|
-
le && !Se && (Se = !0, Array.from(o.document.body.children).forEach((
|
|
582
|
-
let
|
|
583
|
-
const c = (
|
|
581
|
+
le && !Se && (Se = !0, Array.from(o.document.body.children).forEach((a) => a.addEventListener("click", z)));
|
|
582
|
+
let i = !0;
|
|
583
|
+
const c = (a) => n.some((f) => {
|
|
584
584
|
if (typeof f == "string")
|
|
585
|
-
return Array.from(o.document.querySelectorAll(f)).some((d) => d ===
|
|
585
|
+
return Array.from(o.document.querySelectorAll(f)).some((d) => d === a.target || a.composedPath().includes(d));
|
|
586
586
|
{
|
|
587
587
|
const d = U(f);
|
|
588
|
-
return d && (
|
|
588
|
+
return d && (a.target === d || a.composedPath().includes(d));
|
|
589
589
|
}
|
|
590
590
|
}), u = [
|
|
591
|
-
ae(o, "click", (
|
|
591
|
+
ae(o, "click", (a) => {
|
|
592
592
|
const f = U(e);
|
|
593
|
-
if (!(!f || f ===
|
|
594
|
-
if (
|
|
595
|
-
|
|
593
|
+
if (!(!f || f === a.target || a.composedPath().includes(f))) {
|
|
594
|
+
if (a.detail === 0 && (i = !c(a)), !i) {
|
|
595
|
+
i = !0;
|
|
596
596
|
return;
|
|
597
597
|
}
|
|
598
|
-
|
|
598
|
+
l(a);
|
|
599
599
|
}
|
|
600
600
|
}, { passive: !0, capture: r }),
|
|
601
|
-
ae(o, "pointerdown", (
|
|
601
|
+
ae(o, "pointerdown", (a) => {
|
|
602
602
|
const f = U(e);
|
|
603
|
-
f && (
|
|
603
|
+
f && (i = !a.composedPath().includes(f) && !c(a));
|
|
604
604
|
}, { passive: !0 }),
|
|
605
|
-
s && ae(o, "blur", (
|
|
605
|
+
s && ae(o, "blur", (a) => {
|
|
606
606
|
var f;
|
|
607
607
|
const d = U(e);
|
|
608
|
-
((f = o.document.activeElement) == null ? void 0 : f.tagName) === "IFRAME" && !(d != null && d.contains(o.document.activeElement)) &&
|
|
608
|
+
((f = o.document.activeElement) == null ? void 0 : f.tagName) === "IFRAME" && !(d != null && d.contains(o.document.activeElement)) && l(a);
|
|
609
609
|
})
|
|
610
610
|
].filter(Boolean);
|
|
611
|
-
return () => u.forEach((
|
|
611
|
+
return () => u.forEach((a) => a());
|
|
612
612
|
}
|
|
613
|
-
function Gt(e,
|
|
614
|
-
const
|
|
615
|
-
return o(), Qe(o,
|
|
613
|
+
function Gt(e, l = !1) {
|
|
614
|
+
const t = g(), o = () => t.value = Boolean(e());
|
|
615
|
+
return o(), Qe(o, l), t;
|
|
616
616
|
}
|
|
617
617
|
const ie = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, re = "__vueuse_ssr_handlers__";
|
|
618
618
|
ie[re] = ie[re] || {};
|
|
619
619
|
ie[re];
|
|
620
|
-
var je = Object.getOwnPropertySymbols, Kt = Object.prototype.hasOwnProperty, Qt = Object.prototype.propertyIsEnumerable, Zt = (e,
|
|
621
|
-
var
|
|
620
|
+
var je = Object.getOwnPropertySymbols, Kt = Object.prototype.hasOwnProperty, Qt = Object.prototype.propertyIsEnumerable, Zt = (e, l) => {
|
|
621
|
+
var t = {};
|
|
622
622
|
for (var o in e)
|
|
623
|
-
Kt.call(e, o) &&
|
|
623
|
+
Kt.call(e, o) && l.indexOf(o) < 0 && (t[o] = e[o]);
|
|
624
624
|
if (e != null && je)
|
|
625
625
|
for (var o of je(e))
|
|
626
|
-
|
|
627
|
-
return
|
|
626
|
+
l.indexOf(o) < 0 && Qt.call(e, o) && (t[o] = e[o]);
|
|
627
|
+
return t;
|
|
628
628
|
};
|
|
629
|
-
function Yt(e,
|
|
630
|
-
const o =
|
|
629
|
+
function Yt(e, l, t = {}) {
|
|
630
|
+
const o = t, { window: n = ge } = o, r = Zt(o, ["window"]);
|
|
631
631
|
let s;
|
|
632
|
-
const
|
|
632
|
+
const i = Gt(() => n && "ResizeObserver" in n), c = () => {
|
|
633
633
|
s && (s.disconnect(), s = void 0);
|
|
634
634
|
}, y = J(() => U(e), (v) => {
|
|
635
|
-
c(),
|
|
635
|
+
c(), i.value && n && v && (s = new ResizeObserver(l), s.observe(v, r));
|
|
636
636
|
}, { immediate: !0, flush: "post" }), u = () => {
|
|
637
637
|
c(), y();
|
|
638
638
|
};
|
|
639
639
|
return Q(u), {
|
|
640
|
-
isSupported:
|
|
640
|
+
isSupported: i,
|
|
641
641
|
stop: u
|
|
642
642
|
};
|
|
643
643
|
}
|
|
@@ -646,23 +646,23 @@ var ke;
|
|
|
646
646
|
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
|
|
647
647
|
})(ke || (ke = {}));
|
|
648
648
|
function Xt(e) {
|
|
649
|
-
const
|
|
649
|
+
const l = g(e == null ? void 0 : e.element), t = g(e == null ? void 0 : e.input);
|
|
650
650
|
function o() {
|
|
651
651
|
var n, r;
|
|
652
|
-
|
|
652
|
+
l.value && (l.value.style.height = "1px", l.value.style.height = `${(n = l.value) == null ? void 0 : n.scrollHeight}px`, (r = e == null ? void 0 : e.onResize) == null || r.call(e));
|
|
653
653
|
}
|
|
654
|
-
return J([
|
|
655
|
-
textarea:
|
|
656
|
-
input:
|
|
654
|
+
return J([t, l], o, { immediate: !0 }), Yt(l, () => o()), e != null && e.watch && J(e.watch, o, { immediate: !0, deep: !0 }), {
|
|
655
|
+
textarea: l,
|
|
656
|
+
input: t,
|
|
657
657
|
triggerResize: o
|
|
658
658
|
};
|
|
659
659
|
}
|
|
660
|
-
var el = Object.defineProperty, $e = Object.getOwnPropertySymbols, tl = Object.prototype.hasOwnProperty, ll = Object.prototype.propertyIsEnumerable, Ve = (e,
|
|
661
|
-
for (var
|
|
662
|
-
tl.call(
|
|
660
|
+
var el = Object.defineProperty, $e = Object.getOwnPropertySymbols, tl = Object.prototype.hasOwnProperty, ll = Object.prototype.propertyIsEnumerable, Ve = (e, l, t) => l in e ? el(e, l, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[l] = t, ol = (e, l) => {
|
|
661
|
+
for (var t in l || (l = {}))
|
|
662
|
+
tl.call(l, t) && Ve(e, t, l[t]);
|
|
663
663
|
if ($e)
|
|
664
|
-
for (var
|
|
665
|
-
ll.call(
|
|
664
|
+
for (var t of $e(l))
|
|
665
|
+
ll.call(l, t) && Ve(e, t, l[t]);
|
|
666
666
|
return e;
|
|
667
667
|
};
|
|
668
668
|
const nl = {
|
|
@@ -698,200 +698,200 @@ const al = /* @__PURE__ */ $({
|
|
|
698
698
|
name: "OnClickOutside",
|
|
699
699
|
props: ["as", "options"],
|
|
700
700
|
emits: ["trigger"],
|
|
701
|
-
setup(e, { slots:
|
|
701
|
+
setup(e, { slots: l, emit: t }) {
|
|
702
702
|
const o = g();
|
|
703
703
|
return Ut(o, (n) => {
|
|
704
|
-
|
|
704
|
+
t("trigger", n);
|
|
705
705
|
}, e.options), () => {
|
|
706
|
-
if (
|
|
707
|
-
return rt(e.as || "div", { ref: o },
|
|
706
|
+
if (l.default)
|
|
707
|
+
return rt(e.as || "div", { ref: o }, l.default());
|
|
708
708
|
};
|
|
709
709
|
}
|
|
710
710
|
});
|
|
711
711
|
function q(e) {
|
|
712
|
-
var
|
|
713
|
-
const
|
|
714
|
-
return (
|
|
712
|
+
var l;
|
|
713
|
+
const t = P(e);
|
|
714
|
+
return (l = t == null ? void 0 : t.$el) != null ? l : t;
|
|
715
715
|
}
|
|
716
716
|
const H = K ? window : void 0;
|
|
717
717
|
function A(...e) {
|
|
718
|
-
let
|
|
719
|
-
if (Ge(e[0]) || Array.isArray(e[0]) ? ([
|
|
718
|
+
let l, t, o, n;
|
|
719
|
+
if (Ge(e[0]) || Array.isArray(e[0]) ? ([t, o, n] = e, l = H) : [l, t, o, n] = e, !l)
|
|
720
720
|
return z;
|
|
721
|
-
Array.isArray(
|
|
721
|
+
Array.isArray(t) || (t = [t]), Array.isArray(o) || (o = [o]);
|
|
722
722
|
const r = [], s = () => {
|
|
723
723
|
r.forEach((u) => u()), r.length = 0;
|
|
724
|
-
},
|
|
725
|
-
s(), u && r.push(...
|
|
724
|
+
}, i = (u, v, a, f) => (u.addEventListener(v, a, f), () => u.removeEventListener(v, a, f)), c = J(() => [q(l), P(n)], ([u, v]) => {
|
|
725
|
+
s(), u && r.push(...t.flatMap((a) => o.map((f) => i(u, a, f, v))));
|
|
726
726
|
}, { immediate: !0, flush: "post" }), y = () => {
|
|
727
727
|
c(), s();
|
|
728
728
|
};
|
|
729
729
|
return Q(y), y;
|
|
730
730
|
}
|
|
731
731
|
let xe = !1;
|
|
732
|
-
function Ie(e,
|
|
733
|
-
const { window: o = H, ignore: n = [], capture: r = !0, detectIframe: s = !1 } =
|
|
732
|
+
function Ie(e, l, t = {}) {
|
|
733
|
+
const { window: o = H, ignore: n = [], capture: r = !0, detectIframe: s = !1 } = t;
|
|
734
734
|
if (!o)
|
|
735
735
|
return;
|
|
736
|
-
le && !xe && (xe = !0, Array.from(o.document.body.children).forEach((
|
|
737
|
-
let
|
|
738
|
-
const c = (
|
|
736
|
+
le && !xe && (xe = !0, Array.from(o.document.body.children).forEach((a) => a.addEventListener("click", z)));
|
|
737
|
+
let i = !0;
|
|
738
|
+
const c = (a) => n.some((f) => {
|
|
739
739
|
if (typeof f == "string")
|
|
740
|
-
return Array.from(o.document.querySelectorAll(f)).some((d) => d ===
|
|
740
|
+
return Array.from(o.document.querySelectorAll(f)).some((d) => d === a.target || a.composedPath().includes(d));
|
|
741
741
|
{
|
|
742
742
|
const d = q(f);
|
|
743
|
-
return d && (
|
|
743
|
+
return d && (a.target === d || a.composedPath().includes(d));
|
|
744
744
|
}
|
|
745
745
|
}), u = [
|
|
746
|
-
A(o, "click", (
|
|
746
|
+
A(o, "click", (a) => {
|
|
747
747
|
const f = q(e);
|
|
748
|
-
if (!(!f || f ===
|
|
749
|
-
if (
|
|
750
|
-
|
|
748
|
+
if (!(!f || f === a.target || a.composedPath().includes(f))) {
|
|
749
|
+
if (a.detail === 0 && (i = !c(a)), !i) {
|
|
750
|
+
i = !0;
|
|
751
751
|
return;
|
|
752
752
|
}
|
|
753
|
-
|
|
753
|
+
l(a);
|
|
754
754
|
}
|
|
755
755
|
}, { passive: !0, capture: r }),
|
|
756
|
-
A(o, "pointerdown", (
|
|
756
|
+
A(o, "pointerdown", (a) => {
|
|
757
757
|
const f = q(e);
|
|
758
|
-
f && (
|
|
758
|
+
f && (i = !a.composedPath().includes(f) && !c(a));
|
|
759
759
|
}, { passive: !0 }),
|
|
760
|
-
s && A(o, "blur", (
|
|
760
|
+
s && A(o, "blur", (a) => {
|
|
761
761
|
var f;
|
|
762
762
|
const d = q(e);
|
|
763
|
-
((f = o.document.activeElement) == null ? void 0 : f.tagName) === "IFRAME" && !(d != null && d.contains(o.document.activeElement)) &&
|
|
763
|
+
((f = o.document.activeElement) == null ? void 0 : f.tagName) === "IFRAME" && !(d != null && d.contains(o.document.activeElement)) && l(a);
|
|
764
764
|
})
|
|
765
765
|
].filter(Boolean);
|
|
766
|
-
return () => u.forEach((
|
|
766
|
+
return () => u.forEach((a) => a());
|
|
767
767
|
}
|
|
768
768
|
M.mounted + "", M.unmounted + "";
|
|
769
|
-
const il = (e) => typeof e == "function" ? e : typeof e == "string" ? (
|
|
769
|
+
const il = (e) => typeof e == "function" ? e : typeof e == "string" ? (l) => l.key === e : Array.isArray(e) ? (l) => e.includes(l.key) : () => !0;
|
|
770
770
|
function Oe(...e) {
|
|
771
|
-
let
|
|
772
|
-
e.length === 3 ? (
|
|
773
|
-
const { target: n = H, eventName: r = "keydown", passive: s = !1 } = o,
|
|
771
|
+
let l, t, o = {};
|
|
772
|
+
e.length === 3 ? (l = e[0], t = e[1], o = e[2]) : e.length === 2 ? typeof e[1] == "object" ? (l = !0, t = e[0], o = e[1]) : (l = e[0], t = e[1]) : (l = !0, t = e[0]);
|
|
773
|
+
const { target: n = H, eventName: r = "keydown", passive: s = !1 } = o, i = il(l);
|
|
774
774
|
return A(n, r, (y) => {
|
|
775
|
-
|
|
775
|
+
i(y) && t(y);
|
|
776
776
|
}, s);
|
|
777
777
|
}
|
|
778
|
-
var rl = Object.defineProperty, Be = Object.getOwnPropertySymbols, sl = Object.prototype.hasOwnProperty, ul = Object.prototype.propertyIsEnumerable, Le = (e,
|
|
779
|
-
for (var
|
|
780
|
-
sl.call(
|
|
778
|
+
var rl = Object.defineProperty, Be = Object.getOwnPropertySymbols, sl = Object.prototype.hasOwnProperty, ul = Object.prototype.propertyIsEnumerable, Le = (e, l, t) => l in e ? rl(e, l, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[l] = t, dl = (e, l) => {
|
|
779
|
+
for (var t in l || (l = {}))
|
|
780
|
+
sl.call(l, t) && Le(e, t, l[t]);
|
|
781
781
|
if (Be)
|
|
782
|
-
for (var
|
|
783
|
-
ul.call(
|
|
782
|
+
for (var t of Be(l))
|
|
783
|
+
ul.call(l, t) && Le(e, t, l[t]);
|
|
784
784
|
return e;
|
|
785
785
|
};
|
|
786
786
|
M.mounted + "";
|
|
787
787
|
const cl = 500;
|
|
788
|
-
function Ee(e,
|
|
788
|
+
function Ee(e, l, t) {
|
|
789
789
|
var o, n;
|
|
790
790
|
const r = L(() => q(e));
|
|
791
791
|
let s;
|
|
792
|
-
function
|
|
792
|
+
function i() {
|
|
793
793
|
s && (clearTimeout(s), s = void 0);
|
|
794
794
|
}
|
|
795
795
|
function c(u) {
|
|
796
|
-
var v,
|
|
797
|
-
(v =
|
|
796
|
+
var v, a, f, d;
|
|
797
|
+
(v = t == null ? void 0 : t.modifiers) != null && v.self && u.target !== r.value || (i(), (a = t == null ? void 0 : t.modifiers) != null && a.prevent && u.preventDefault(), (f = t == null ? void 0 : t.modifiers) != null && f.stop && u.stopPropagation(), s = setTimeout(() => l(u), (d = t == null ? void 0 : t.delay) != null ? d : cl));
|
|
798
798
|
}
|
|
799
799
|
const y = {
|
|
800
|
-
capture: (o =
|
|
801
|
-
once: (n =
|
|
800
|
+
capture: (o = t == null ? void 0 : t.modifiers) == null ? void 0 : o.capture,
|
|
801
|
+
once: (n = t == null ? void 0 : t.modifiers) == null ? void 0 : n.once
|
|
802
802
|
};
|
|
803
|
-
A(r, "pointerdown", c, y), A(r, "pointerup",
|
|
803
|
+
A(r, "pointerdown", c, y), A(r, "pointerup", i, y), A(r, "pointerleave", i, y);
|
|
804
804
|
}
|
|
805
805
|
M.mounted + "";
|
|
806
806
|
const se = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ue = "__vueuse_ssr_handlers__";
|
|
807
807
|
se[ue] = se[ue] || {};
|
|
808
808
|
se[ue];
|
|
809
|
-
function Ze(e,
|
|
810
|
-
const
|
|
811
|
-
return o(), Qe(o,
|
|
809
|
+
function Ze(e, l = !1) {
|
|
810
|
+
const t = g(), o = () => t.value = Boolean(e());
|
|
811
|
+
return o(), Qe(o, l), t;
|
|
812
812
|
}
|
|
813
|
-
function fl(e,
|
|
814
|
-
const
|
|
813
|
+
function fl(e, l = {}) {
|
|
814
|
+
const t = l ? l.delayEnter : 0, o = l ? l.delayLeave : 0, n = g(!1);
|
|
815
815
|
let r;
|
|
816
|
-
const s = (
|
|
817
|
-
const c =
|
|
818
|
-
r && (clearTimeout(r), r = void 0), c ? r = setTimeout(() => n.value =
|
|
816
|
+
const s = (i) => {
|
|
817
|
+
const c = i ? t : o;
|
|
818
|
+
r && (clearTimeout(r), r = void 0), c ? r = setTimeout(() => n.value = i, c) : n.value = i;
|
|
819
819
|
};
|
|
820
820
|
return window && (A(e, "mouseenter", () => s(!0), { passive: !0 }), A(e, "mouseleave", () => s(!1), { passive: !0 })), n;
|
|
821
821
|
}
|
|
822
822
|
M.mounted + "";
|
|
823
|
-
var Ce = Object.getOwnPropertySymbols, yl = Object.prototype.hasOwnProperty, vl = Object.prototype.propertyIsEnumerable, ml = (e,
|
|
824
|
-
var
|
|
823
|
+
var Ce = Object.getOwnPropertySymbols, yl = Object.prototype.hasOwnProperty, vl = Object.prototype.propertyIsEnumerable, ml = (e, l) => {
|
|
824
|
+
var t = {};
|
|
825
825
|
for (var o in e)
|
|
826
|
-
yl.call(e, o) &&
|
|
826
|
+
yl.call(e, o) && l.indexOf(o) < 0 && (t[o] = e[o]);
|
|
827
827
|
if (e != null && Ce)
|
|
828
828
|
for (var o of Ce(e))
|
|
829
|
-
|
|
830
|
-
return
|
|
829
|
+
l.indexOf(o) < 0 && vl.call(e, o) && (t[o] = e[o]);
|
|
830
|
+
return t;
|
|
831
831
|
};
|
|
832
|
-
function pl(e,
|
|
833
|
-
const o =
|
|
832
|
+
function pl(e, l, t = {}) {
|
|
833
|
+
const o = t, { window: n = H } = o, r = ml(o, ["window"]);
|
|
834
834
|
let s;
|
|
835
|
-
const
|
|
835
|
+
const i = Ze(() => n && "ResizeObserver" in n), c = () => {
|
|
836
836
|
s && (s.disconnect(), s = void 0);
|
|
837
837
|
}, y = J(() => q(e), (v) => {
|
|
838
|
-
c(),
|
|
838
|
+
c(), i.value && n && v && (s = new ResizeObserver(l), s.observe(v, r));
|
|
839
839
|
}, { immediate: !0, flush: "post" }), u = () => {
|
|
840
840
|
c(), y();
|
|
841
841
|
};
|
|
842
842
|
return Q(u), {
|
|
843
|
-
isSupported:
|
|
843
|
+
isSupported: i,
|
|
844
844
|
stop: u
|
|
845
845
|
};
|
|
846
846
|
}
|
|
847
|
-
function hl(e,
|
|
848
|
-
const { window: o = H, box: n = "content-box" } =
|
|
847
|
+
function hl(e, l = { width: 0, height: 0 }, t = {}) {
|
|
848
|
+
const { window: o = H, box: n = "content-box" } = t, r = L(() => {
|
|
849
849
|
var c, y;
|
|
850
850
|
return (y = (c = q(e)) == null ? void 0 : c.namespaceURI) == null ? void 0 : y.includes("svg");
|
|
851
|
-
}), s = g(
|
|
851
|
+
}), s = g(l.width), i = g(l.height);
|
|
852
852
|
return pl(e, ([c]) => {
|
|
853
853
|
const y = n === "border-box" ? c.borderBoxSize : n === "content-box" ? c.contentBoxSize : c.devicePixelContentBoxSize;
|
|
854
854
|
if (o && r.value) {
|
|
855
855
|
const u = q(e);
|
|
856
856
|
if (u) {
|
|
857
857
|
const v = o.getComputedStyle(u);
|
|
858
|
-
s.value = parseFloat(v.width),
|
|
858
|
+
s.value = parseFloat(v.width), i.value = parseFloat(v.height);
|
|
859
859
|
}
|
|
860
860
|
} else if (y) {
|
|
861
861
|
const u = Array.isArray(y) ? y : [y];
|
|
862
|
-
s.value = u.reduce((v, { inlineSize:
|
|
862
|
+
s.value = u.reduce((v, { inlineSize: a }) => v + a, 0), i.value = u.reduce((v, { blockSize: a }) => v + a, 0);
|
|
863
863
|
} else
|
|
864
|
-
s.value = c.contentRect.width,
|
|
865
|
-
},
|
|
866
|
-
s.value = c ?
|
|
864
|
+
s.value = c.contentRect.width, i.value = c.contentRect.height;
|
|
865
|
+
}, t), J(() => q(e), (c) => {
|
|
866
|
+
s.value = c ? l.width : 0, i.value = c ? l.height : 0;
|
|
867
867
|
}), {
|
|
868
868
|
width: s,
|
|
869
|
-
height:
|
|
869
|
+
height: i
|
|
870
870
|
};
|
|
871
871
|
}
|
|
872
872
|
M.mounted + "";
|
|
873
|
-
function Je(e, { window:
|
|
873
|
+
function Je(e, { window: l = H, scrollTarget: t } = {}) {
|
|
874
874
|
const o = g(!1), n = () => {
|
|
875
|
-
if (!
|
|
875
|
+
if (!l)
|
|
876
876
|
return;
|
|
877
|
-
const r =
|
|
877
|
+
const r = l.document, s = q(e);
|
|
878
878
|
if (!s)
|
|
879
879
|
o.value = !1;
|
|
880
880
|
else {
|
|
881
|
-
const
|
|
882
|
-
o.value =
|
|
881
|
+
const i = s.getBoundingClientRect();
|
|
882
|
+
o.value = i.top <= (l.innerHeight || r.documentElement.clientHeight) && i.left <= (l.innerWidth || r.documentElement.clientWidth) && i.bottom >= 0 && i.right >= 0;
|
|
883
883
|
}
|
|
884
884
|
};
|
|
885
|
-
return J(() => q(e), () => n(), { immediate: !0, flush: "post" }),
|
|
885
|
+
return J(() => q(e), () => n(), { immediate: !0, flush: "post" }), l && A(t || l, "scroll", n, {
|
|
886
886
|
capture: !1,
|
|
887
887
|
passive: !0
|
|
888
888
|
}), o;
|
|
889
889
|
}
|
|
890
890
|
M.mounted + "";
|
|
891
891
|
const Pe = 1;
|
|
892
|
-
function de(e,
|
|
892
|
+
function de(e, l = {}) {
|
|
893
893
|
const {
|
|
894
|
-
throttle:
|
|
894
|
+
throttle: t = 0,
|
|
895
895
|
idle: o = 200,
|
|
896
896
|
onStop: n = z,
|
|
897
897
|
onScroll: r = z,
|
|
@@ -901,19 +901,19 @@ function de(e, t = {}) {
|
|
|
901
901
|
top: 0,
|
|
902
902
|
bottom: 0
|
|
903
903
|
},
|
|
904
|
-
eventListenerOptions:
|
|
904
|
+
eventListenerOptions: i = {
|
|
905
905
|
capture: !1,
|
|
906
906
|
passive: !0
|
|
907
907
|
},
|
|
908
908
|
behavior: c = "auto"
|
|
909
|
-
} =
|
|
909
|
+
} = l, y = g(0), u = g(0), v = L({
|
|
910
910
|
get() {
|
|
911
911
|
return y.value;
|
|
912
912
|
},
|
|
913
913
|
set(E) {
|
|
914
914
|
f(E, void 0);
|
|
915
915
|
}
|
|
916
|
-
}),
|
|
916
|
+
}), a = L({
|
|
917
917
|
get() {
|
|
918
918
|
return u.value;
|
|
919
919
|
},
|
|
@@ -925,7 +925,7 @@ function de(e, t = {}) {
|
|
|
925
925
|
var D, F, _e;
|
|
926
926
|
const ne = P(e);
|
|
927
927
|
ne && ((_e = ne instanceof Document ? document.body : ne) == null || _e.scrollTo({
|
|
928
|
-
top: (D = P(T)) != null ? D :
|
|
928
|
+
top: (D = P(T)) != null ? D : a.value,
|
|
929
929
|
left: (F = P(E)) != null ? F : v.value,
|
|
930
930
|
behavior: P(c)
|
|
931
931
|
}));
|
|
@@ -942,43 +942,43 @@ function de(e, t = {}) {
|
|
|
942
942
|
bottom: !1
|
|
943
943
|
}), ee = (E) => {
|
|
944
944
|
d.value && (d.value = !1, S.left = !1, S.right = !1, S.top = !1, S.bottom = !1, n(E));
|
|
945
|
-
}, oe = Nt(ee,
|
|
945
|
+
}, oe = Nt(ee, t + o), O = (E) => {
|
|
946
946
|
const T = E.target === document ? E.target.documentElement : E.target, D = T.scrollLeft;
|
|
947
947
|
S.left = D < y.value, S.right = D > u.value, j.left = D <= 0 + (s.left || 0), j.right = D + T.clientWidth >= T.scrollWidth - (s.right || 0) - Pe, y.value = D;
|
|
948
948
|
let F = T.scrollTop;
|
|
949
949
|
E.target === document && !F && (F = document.body.scrollTop), S.top = F < u.value, S.bottom = F > u.value, j.top = F <= 0 + (s.top || 0), j.bottom = F + T.clientHeight >= T.scrollHeight - (s.bottom || 0) - Pe, u.value = F, d.value = !0, oe(E), r(E);
|
|
950
950
|
};
|
|
951
|
-
return A(e, "scroll",
|
|
951
|
+
return A(e, "scroll", t ? Ht(O, t, !0, !1) : O, i), A(e, "scrollend", ee, i), {
|
|
952
952
|
x: v,
|
|
953
|
-
y:
|
|
953
|
+
y: a,
|
|
954
954
|
isScrolling: d,
|
|
955
955
|
arrivedState: j,
|
|
956
956
|
directions: S
|
|
957
957
|
};
|
|
958
958
|
}
|
|
959
|
-
var gl = Object.defineProperty, bl = Object.defineProperties, _l = Object.getOwnPropertyDescriptors, qe = Object.getOwnPropertySymbols, wl = Object.prototype.hasOwnProperty, Sl = Object.prototype.propertyIsEnumerable, Te = (e,
|
|
960
|
-
for (var
|
|
961
|
-
wl.call(
|
|
959
|
+
var gl = Object.defineProperty, bl = Object.defineProperties, _l = Object.getOwnPropertyDescriptors, qe = Object.getOwnPropertySymbols, wl = Object.prototype.hasOwnProperty, Sl = Object.prototype.propertyIsEnumerable, Te = (e, l, t) => l in e ? gl(e, l, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[l] = t, ze = (e, l) => {
|
|
960
|
+
for (var t in l || (l = {}))
|
|
961
|
+
wl.call(l, t) && Te(e, t, l[t]);
|
|
962
962
|
if (qe)
|
|
963
|
-
for (var
|
|
964
|
-
Sl.call(
|
|
963
|
+
for (var t of qe(l))
|
|
964
|
+
Sl.call(l, t) && Te(e, t, l[t]);
|
|
965
965
|
return e;
|
|
966
|
-
}, jl = (e,
|
|
967
|
-
function Ae(e,
|
|
966
|
+
}, jl = (e, l) => bl(e, _l(l));
|
|
967
|
+
function Ae(e, l, t = {}) {
|
|
968
968
|
var o, n;
|
|
969
|
-
const r = (o =
|
|
969
|
+
const r = (o = t.direction) != null ? o : "bottom", s = te(de(e, jl(ze({}, t), {
|
|
970
970
|
offset: ze({
|
|
971
|
-
[r]: (n =
|
|
972
|
-
},
|
|
971
|
+
[r]: (n = t.distance) != null ? n : 0
|
|
972
|
+
}, t.offset)
|
|
973
973
|
})));
|
|
974
|
-
J(() => s.arrivedState[r], async (
|
|
974
|
+
J(() => s.arrivedState[r], async (i) => {
|
|
975
975
|
var c, y;
|
|
976
|
-
if (
|
|
976
|
+
if (i) {
|
|
977
977
|
const u = P(e), v = {
|
|
978
978
|
height: (c = u == null ? void 0 : u.scrollHeight) != null ? c : 0,
|
|
979
979
|
width: (y = u == null ? void 0 : u.scrollWidth) != null ? y : 0
|
|
980
980
|
};
|
|
981
|
-
await
|
|
981
|
+
await l(s), t.preserveScrollPosition && u && Ne(() => {
|
|
982
982
|
u.scrollTo({
|
|
983
983
|
top: u.scrollHeight - v.height,
|
|
984
984
|
left: u.scrollWidth - v.width
|
|
@@ -988,22 +988,22 @@ function Ae(e, t, l = {}) {
|
|
|
988
988
|
});
|
|
989
989
|
}
|
|
990
990
|
M.mounted + "";
|
|
991
|
-
function Fe(e,
|
|
991
|
+
function Fe(e, l, t = {}) {
|
|
992
992
|
const {
|
|
993
993
|
root: o,
|
|
994
994
|
rootMargin: n = "0px",
|
|
995
995
|
threshold: r = 0.1,
|
|
996
996
|
window: s = H
|
|
997
|
-
} =
|
|
997
|
+
} = t, i = Ze(() => s && "IntersectionObserver" in s);
|
|
998
998
|
let c = z;
|
|
999
|
-
const y =
|
|
999
|
+
const y = i.value ? J(() => ({
|
|
1000
1000
|
el: q(e),
|
|
1001
1001
|
root: q(o)
|
|
1002
|
-
}), ({ el: v, root:
|
|
1002
|
+
}), ({ el: v, root: a }) => {
|
|
1003
1003
|
if (c(), !v)
|
|
1004
1004
|
return;
|
|
1005
|
-
const f = new IntersectionObserver(
|
|
1006
|
-
root:
|
|
1005
|
+
const f = new IntersectionObserver(l, {
|
|
1006
|
+
root: a,
|
|
1007
1007
|
rootMargin: n,
|
|
1008
1008
|
threshold: r
|
|
1009
1009
|
});
|
|
@@ -1014,75 +1014,75 @@ function Fe(e, t, l = {}) {
|
|
|
1014
1014
|
c(), y();
|
|
1015
1015
|
};
|
|
1016
1016
|
return Q(u), {
|
|
1017
|
-
isSupported:
|
|
1017
|
+
isSupported: i,
|
|
1018
1018
|
stop: u
|
|
1019
1019
|
};
|
|
1020
1020
|
}
|
|
1021
1021
|
M.mounted + "";
|
|
1022
|
-
var kl = Object.defineProperty, $l = Object.defineProperties, Vl = Object.getOwnPropertyDescriptors, De = Object.getOwnPropertySymbols, xl = Object.prototype.hasOwnProperty, Il = Object.prototype.propertyIsEnumerable, Re = (e,
|
|
1023
|
-
for (var
|
|
1024
|
-
xl.call(
|
|
1022
|
+
var kl = Object.defineProperty, $l = Object.defineProperties, Vl = Object.getOwnPropertyDescriptors, De = Object.getOwnPropertySymbols, xl = Object.prototype.hasOwnProperty, Il = Object.prototype.propertyIsEnumerable, Re = (e, l, t) => l in e ? kl(e, l, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[l] = t, Ol = (e, l) => {
|
|
1023
|
+
for (var t in l || (l = {}))
|
|
1024
|
+
xl.call(l, t) && Re(e, t, l[t]);
|
|
1025
1025
|
if (De)
|
|
1026
|
-
for (var
|
|
1027
|
-
Il.call(
|
|
1026
|
+
for (var t of De(l))
|
|
1027
|
+
Il.call(l, t) && Re(e, t, l[t]);
|
|
1028
1028
|
return e;
|
|
1029
|
-
}, Bl = (e,
|
|
1029
|
+
}, Bl = (e, l) => $l(e, Vl(l));
|
|
1030
1030
|
M.mounted + "";
|
|
1031
1031
|
function Ye(e) {
|
|
1032
|
-
const
|
|
1033
|
-
if (
|
|
1032
|
+
const l = window.getComputedStyle(e);
|
|
1033
|
+
if (l.overflowX === "scroll" || l.overflowY === "scroll" || l.overflowX === "auto" && e.clientHeight < e.scrollHeight || l.overflowY === "auto" && e.clientWidth < e.scrollWidth)
|
|
1034
1034
|
return !0;
|
|
1035
1035
|
{
|
|
1036
|
-
const
|
|
1037
|
-
return !
|
|
1036
|
+
const t = e.parentNode;
|
|
1037
|
+
return !t || t.tagName === "BODY" ? !1 : Ye(t);
|
|
1038
1038
|
}
|
|
1039
1039
|
}
|
|
1040
1040
|
function Ll(e) {
|
|
1041
|
-
const
|
|
1042
|
-
return Ye(
|
|
1041
|
+
const l = e || window.event, t = l.target;
|
|
1042
|
+
return Ye(t) ? !1 : l.touches.length > 1 ? !0 : (l.preventDefault && l.preventDefault(), !1);
|
|
1043
1043
|
}
|
|
1044
|
-
function El(e,
|
|
1045
|
-
const
|
|
1044
|
+
function El(e, l = !1) {
|
|
1045
|
+
const t = g(l);
|
|
1046
1046
|
let o = null, n;
|
|
1047
|
-
J(Wt(e), (
|
|
1048
|
-
if (
|
|
1049
|
-
const c =
|
|
1050
|
-
n = c.style.overflow,
|
|
1047
|
+
J(Wt(e), (i) => {
|
|
1048
|
+
if (i) {
|
|
1049
|
+
const c = i;
|
|
1050
|
+
n = c.style.overflow, t.value && (c.style.overflow = "hidden");
|
|
1051
1051
|
}
|
|
1052
1052
|
}, {
|
|
1053
1053
|
immediate: !0
|
|
1054
1054
|
});
|
|
1055
1055
|
const r = () => {
|
|
1056
|
-
const
|
|
1057
|
-
!
|
|
1056
|
+
const i = P(e);
|
|
1057
|
+
!i || t.value || (le && (o = A(i, "touchmove", (c) => {
|
|
1058
1058
|
Ll(c);
|
|
1059
|
-
}, { passive: !1 })),
|
|
1059
|
+
}, { passive: !1 })), i.style.overflow = "hidden", t.value = !0);
|
|
1060
1060
|
}, s = () => {
|
|
1061
|
-
const
|
|
1062
|
-
!
|
|
1061
|
+
const i = P(e);
|
|
1062
|
+
!i || !t.value || (le && (o == null || o()), i.style.overflow = n, t.value = !1);
|
|
1063
1063
|
};
|
|
1064
1064
|
return Q(s), L({
|
|
1065
1065
|
get() {
|
|
1066
|
-
return
|
|
1066
|
+
return t.value;
|
|
1067
1067
|
},
|
|
1068
|
-
set(
|
|
1069
|
-
|
|
1068
|
+
set(i) {
|
|
1069
|
+
i ? r() : s();
|
|
1070
1070
|
}
|
|
1071
1071
|
});
|
|
1072
1072
|
}
|
|
1073
1073
|
const Cl = () => {
|
|
1074
1074
|
let e = !1;
|
|
1075
|
-
const
|
|
1076
|
-
return (
|
|
1077
|
-
if (
|
|
1075
|
+
const l = g(!1);
|
|
1076
|
+
return (t, o) => {
|
|
1077
|
+
if (l.value = o.value, e)
|
|
1078
1078
|
return;
|
|
1079
1079
|
e = !0;
|
|
1080
|
-
const n = El(
|
|
1081
|
-
J(
|
|
1080
|
+
const n = El(t, o.value);
|
|
1081
|
+
J(l, (r) => n.value = r);
|
|
1082
1082
|
};
|
|
1083
1083
|
};
|
|
1084
1084
|
Cl();
|
|
1085
|
-
const Xe = ["medium", "small"], Jl = {
|
|
1085
|
+
const Xe = ["medium", "small", "xsmall"], Jl = {
|
|
1086
1086
|
key: 0,
|
|
1087
1087
|
class: "joy-dropdown-list__header"
|
|
1088
1088
|
}, Pl = ["id", "tabindex", "aria-disabled", "aria-selected", "title", "aria-label", ".dataModel", "onClick"], ql = {
|
|
@@ -1097,12 +1097,13 @@ const Xe = ["medium", "small"], Jl = {
|
|
|
1097
1097
|
options: {
|
|
1098
1098
|
type: Array,
|
|
1099
1099
|
validator(e) {
|
|
1100
|
-
return e.every((
|
|
1100
|
+
return e.every((l) => Object.keys(l).includes("value") || Object.keys(l).includes("id"));
|
|
1101
1101
|
},
|
|
1102
1102
|
default() {
|
|
1103
1103
|
return [];
|
|
1104
1104
|
}
|
|
1105
1105
|
},
|
|
1106
|
+
/** Customize the actual size of each items. */
|
|
1106
1107
|
size: {
|
|
1107
1108
|
type: String,
|
|
1108
1109
|
default: "medium",
|
|
@@ -1123,64 +1124,64 @@ const Xe = ["medium", "small"], Jl = {
|
|
|
1123
1124
|
}
|
|
1124
1125
|
},
|
|
1125
1126
|
emits: ["update:modelValue", "close:dropdownList"],
|
|
1126
|
-
setup(e, { expose:
|
|
1127
|
-
const o = e, n = g(), r = L(() => (
|
|
1128
|
-
function s(
|
|
1129
|
-
|
|
1127
|
+
setup(e, { expose: l, emit: t }) {
|
|
1128
|
+
const o = e, n = g(), r = L(() => (a) => !o.modelValue || !a.value && !a.id ? !1 : o.modelValue === a.value || o.modelValue === a.id);
|
|
1129
|
+
function s(a) {
|
|
1130
|
+
a.disabled || t("update:modelValue", a.value || a.id);
|
|
1130
1131
|
}
|
|
1131
|
-
function
|
|
1132
|
-
var
|
|
1133
|
-
return Array.from(((
|
|
1132
|
+
function i() {
|
|
1133
|
+
var a;
|
|
1134
|
+
return Array.from(((a = n.value) == null ? void 0 : a.querySelectorAll("li")) || []);
|
|
1134
1135
|
}
|
|
1135
1136
|
function c() {
|
|
1136
|
-
const
|
|
1137
|
-
|
|
1138
|
-
top:
|
|
1137
|
+
const a = i().find((f) => f.getAttribute("aria-selected") === "true");
|
|
1138
|
+
a && (a.focus(), n.value.scrollTo({
|
|
1139
|
+
top: a.offsetTop
|
|
1139
1140
|
}));
|
|
1140
1141
|
}
|
|
1141
1142
|
function y() {
|
|
1142
|
-
return
|
|
1143
|
+
return i().find((a) => a === document.activeElement);
|
|
1143
1144
|
}
|
|
1144
|
-
function u(
|
|
1145
|
+
function u(a) {
|
|
1145
1146
|
var f;
|
|
1146
|
-
if ((
|
|
1147
|
+
if ((a.key === "Escape" || a.key === "Tab") && t("close:dropdownList"), (a.key === "Enter" || a.key === "enter") && (a.preventDefault(), y() && ((f = n.value) != null && f.contains(y())))) {
|
|
1147
1148
|
const d = y();
|
|
1148
1149
|
if (!d)
|
|
1149
1150
|
return;
|
|
1150
1151
|
if (d.querySelector("a"))
|
|
1151
1152
|
return d.querySelector("a").click();
|
|
1152
|
-
|
|
1153
|
+
t("update:modelValue", d.dataModel);
|
|
1153
1154
|
}
|
|
1154
|
-
if (y() &&
|
|
1155
|
-
const d =
|
|
1155
|
+
if (y() && a.key === " " && a.preventDefault(), ["ArrowDown", "ArrowUp", "Home", "End"].includes(a.key)) {
|
|
1156
|
+
const d = i(), j = y();
|
|
1156
1157
|
let S = d.indexOf(j);
|
|
1157
1158
|
if (d.length) {
|
|
1158
|
-
|
|
1159
|
+
a.preventDefault(), a.key === "ArrowDown" ? S++ : a.key === "ArrowUp" ? S-- : a.key === "Home" ? S = 0 : a.key === "End" && (S = d.length - 1), S < 0 && (S = d.length - 1), S > d.length - 1 && (S = 0), v(d[S]);
|
|
1159
1160
|
return;
|
|
1160
1161
|
}
|
|
1161
1162
|
}
|
|
1162
1163
|
}
|
|
1163
|
-
function v(
|
|
1164
|
-
|
|
1164
|
+
function v(a) {
|
|
1165
|
+
a.focus();
|
|
1165
1166
|
}
|
|
1166
1167
|
return X(() => {
|
|
1167
1168
|
window.addEventListener("keydown", u), c();
|
|
1168
1169
|
}), He(() => {
|
|
1169
1170
|
window.removeEventListener("keydown", u);
|
|
1170
|
-
}),
|
|
1171
|
+
}), l({
|
|
1171
1172
|
isSelected: r
|
|
1172
|
-
}), (
|
|
1173
|
+
}), (a, f) => (m(), p("div", {
|
|
1173
1174
|
class: "joy-dropdown-list",
|
|
1174
1175
|
style: Z({ width: `${e.width}px`, "max-width": `${e.width}px` })
|
|
1175
1176
|
}, [
|
|
1176
|
-
|
|
1177
|
-
h(
|
|
1177
|
+
a.$slots["dropdown-list-header"] ? (m(), p("header", Jl, [
|
|
1178
|
+
h(a.$slots, "dropdown-list-header", {}, void 0, !0)
|
|
1178
1179
|
])) : _("", !0),
|
|
1179
1180
|
b("div", {
|
|
1180
|
-
class: w(["joy-dropdown-list__items", { "joy-dropdown-list__items-slotted":
|
|
1181
|
+
class: w(["joy-dropdown-list__items", { "joy-dropdown-list__items-slotted": a.$slots["dropdown-list-items"] }]),
|
|
1181
1182
|
style: Z({ "max-height": `${e.height}px` })
|
|
1182
1183
|
}, [
|
|
1183
|
-
h(
|
|
1184
|
+
h(a.$slots, "dropdown-list-items", {}, void 0, !0),
|
|
1184
1185
|
e.options.length ? (m(), p("ul", {
|
|
1185
1186
|
key: 0,
|
|
1186
1187
|
ref_key: "listbox",
|
|
@@ -1208,25 +1209,25 @@ const Xe = ["medium", "small"], Jl = {
|
|
|
1208
1209
|
role: "option",
|
|
1209
1210
|
onClick: (j) => s(d)
|
|
1210
1211
|
}, [
|
|
1211
|
-
h(
|
|
1212
|
+
h(a.$slots, "label", ve(me(d)), () => [
|
|
1212
1213
|
b("span", null, I(d.label), 1)
|
|
1213
1214
|
], !0)
|
|
1214
1215
|
], 14, Pl))), 128))
|
|
1215
1216
|
], 512)) : _("", !0)
|
|
1216
1217
|
], 6),
|
|
1217
|
-
|
|
1218
|
-
h(
|
|
1218
|
+
a.$slots["dropdown-list-footer"] ? (m(), p("footer", ql, [
|
|
1219
|
+
h(a.$slots, "dropdown-list-footer", {}, void 0, !0)
|
|
1219
1220
|
])) : _("", !0)
|
|
1220
1221
|
], 4));
|
|
1221
1222
|
}
|
|
1222
1223
|
});
|
|
1223
|
-
const et = /* @__PURE__ */ V(Tl, [["__scopeId", "data-v-
|
|
1224
|
+
const et = /* @__PURE__ */ V(Tl, [["__scopeId", "data-v-0a25fc40"]]);
|
|
1224
1225
|
function zl(e) {
|
|
1225
|
-
const
|
|
1226
|
+
const l = () => e();
|
|
1226
1227
|
X(() => {
|
|
1227
|
-
window.addEventListener("resize",
|
|
1228
|
+
window.addEventListener("resize", l);
|
|
1228
1229
|
}), He(() => {
|
|
1229
|
-
window.removeEventListener("resize",
|
|
1230
|
+
window.removeEventListener("resize", l);
|
|
1230
1231
|
});
|
|
1231
1232
|
}
|
|
1232
1233
|
const Al = /* @__PURE__ */ $({
|
|
@@ -1260,6 +1261,8 @@ const Al = /* @__PURE__ */ $({
|
|
|
1260
1261
|
default: "left"
|
|
1261
1262
|
},
|
|
1262
1263
|
/**
|
|
1264
|
+
* Use options to render a pre-designed list.
|
|
1265
|
+
*
|
|
1263
1266
|
* ```
|
|
1264
1267
|
* interface Option {id?: string; value?: string; label: string; href?: string; disabled?:boolean; checked?:boolean}
|
|
1265
1268
|
* ```
|
|
@@ -1267,7 +1270,7 @@ const Al = /* @__PURE__ */ $({
|
|
|
1267
1270
|
options: {
|
|
1268
1271
|
type: Array,
|
|
1269
1272
|
validator(e) {
|
|
1270
|
-
return e.every((
|
|
1273
|
+
return e.every((t) => Object.keys(t).includes("label"));
|
|
1271
1274
|
},
|
|
1272
1275
|
default() {
|
|
1273
1276
|
return [];
|
|
@@ -1307,23 +1310,23 @@ const Al = /* @__PURE__ */ $({
|
|
|
1307
1310
|
}
|
|
1308
1311
|
},
|
|
1309
1312
|
emits: ["update:modelValue", "dropdown:open", "dropdown:hide"],
|
|
1310
|
-
setup(e, { expose:
|
|
1311
|
-
const o = e, n = g(!1), r = g(null), s = g(),
|
|
1313
|
+
setup(e, { expose: l, emit: t }) {
|
|
1314
|
+
const o = e, n = g(!1), r = g(null), s = g(), i = g(null), c = g(null), y = g(!1), u = {
|
|
1312
1315
|
ignore: [s, ".joy-dropdown__list"]
|
|
1313
1316
|
};
|
|
1314
1317
|
let v = null;
|
|
1315
|
-
const
|
|
1318
|
+
const a = te({
|
|
1316
1319
|
left: "auto",
|
|
1317
1320
|
top: "0px",
|
|
1318
1321
|
right: "auto"
|
|
1319
1322
|
});
|
|
1320
1323
|
function f() {
|
|
1321
1324
|
v && clearTimeout(v), y.value = !0, v = setTimeout(() => {
|
|
1322
|
-
n.value = !1, y.value = !1,
|
|
1325
|
+
n.value = !1, y.value = !1, t("dropdown:hide");
|
|
1323
1326
|
}, 300);
|
|
1324
1327
|
}
|
|
1325
1328
|
function d(O) {
|
|
1326
|
-
y.value = !1, v && clearTimeout(v), ee(), c.value = O.target, n.value = !0,
|
|
1329
|
+
y.value = !1, v && clearTimeout(v), ee(), c.value = O.target, n.value = !0, t("dropdown:open");
|
|
1327
1330
|
}
|
|
1328
1331
|
function j() {
|
|
1329
1332
|
f(), S();
|
|
@@ -1333,12 +1336,12 @@ const Al = /* @__PURE__ */ $({
|
|
|
1333
1336
|
}
|
|
1334
1337
|
function ee() {
|
|
1335
1338
|
const O = s.value.getBoundingClientRect(), E = document.documentElement.scrollTop + O.top, T = O.height, D = O.left, F = O.width;
|
|
1336
|
-
o.justify === "left" ?
|
|
1339
|
+
o.justify === "left" ? a.left = D + "px" : a.left = D + F - parseInt(o.width) + "px", o.direction === "down" ? a.top = E + T + parseInt(o.dropdownGap) + "px" : a.top = E - (parseInt(o.height) + parseInt(o.dropdownGap)) + "px";
|
|
1337
1340
|
}
|
|
1338
1341
|
function oe(O) {
|
|
1339
|
-
|
|
1342
|
+
t("update:modelValue", O), o.closeOnSelect && (f(), S());
|
|
1340
1343
|
}
|
|
1341
|
-
return zl(f),
|
|
1344
|
+
return zl(f), l({
|
|
1342
1345
|
showDropdownList: n
|
|
1343
1346
|
}), (O, E) => (m(), x(k(al), {
|
|
1344
1347
|
ref_key: "dropdown",
|
|
@@ -1363,7 +1366,7 @@ const Al = /* @__PURE__ */ $({
|
|
|
1363
1366
|
n.value ? (m(), p("div", {
|
|
1364
1367
|
key: 0,
|
|
1365
1368
|
ref_key: "list",
|
|
1366
|
-
ref:
|
|
1369
|
+
ref: i,
|
|
1367
1370
|
class: w([
|
|
1368
1371
|
"joy-dropdown__list",
|
|
1369
1372
|
`joy-dropdown__list--${e.direction}`,
|
|
@@ -1373,8 +1376,8 @@ const Al = /* @__PURE__ */ $({
|
|
|
1373
1376
|
}
|
|
1374
1377
|
]),
|
|
1375
1378
|
style: Z({
|
|
1376
|
-
top:
|
|
1377
|
-
left:
|
|
1379
|
+
top: a.top,
|
|
1380
|
+
left: a.left
|
|
1378
1381
|
})
|
|
1379
1382
|
}, [
|
|
1380
1383
|
N(et, {
|
|
@@ -1422,7 +1425,7 @@ const Al = /* @__PURE__ */ $({
|
|
|
1422
1425
|
}, 512));
|
|
1423
1426
|
}
|
|
1424
1427
|
});
|
|
1425
|
-
const Fl = /* @__PURE__ */ V(Al, [["__scopeId", "data-v-
|
|
1428
|
+
const Fl = /* @__PURE__ */ V(Al, [["__scopeId", "data-v-4d9d2251"]]), Dl = ["aria-hidden"], Rl = /* @__PURE__ */ $({
|
|
1426
1429
|
__name: "VJoyFormError",
|
|
1427
1430
|
props: {
|
|
1428
1431
|
/** In some cases you'll need to inject the error in the DOM but hide it. Visible by default */
|
|
@@ -1434,7 +1437,7 @@ const Fl = /* @__PURE__ */ V(Al, [["__scopeId", "data-v-2657fbc4"]]), Dl = ["ari
|
|
|
1434
1437
|
noHtmlErrorText: String
|
|
1435
1438
|
},
|
|
1436
1439
|
setup(e) {
|
|
1437
|
-
return (
|
|
1440
|
+
return (l, t) => (m(), p("div", {
|
|
1438
1441
|
"aria-hidden": e.visible,
|
|
1439
1442
|
class: w(["joy-form-error", { "joy-has-error": e.visible }]),
|
|
1440
1443
|
role: "alert"
|
|
@@ -1444,7 +1447,7 @@ const Fl = /* @__PURE__ */ V(Al, [["__scopeId", "data-v-2657fbc4"]]), Dl = ["ari
|
|
|
1444
1447
|
name: "warning-triangle"
|
|
1445
1448
|
}),
|
|
1446
1449
|
b("div", null, [
|
|
1447
|
-
h(
|
|
1450
|
+
h(l.$slots, "default", {}, () => [
|
|
1448
1451
|
C(I(e.noHtmlErrorText), 1)
|
|
1449
1452
|
], !0)
|
|
1450
1453
|
])
|
|
@@ -1453,18 +1456,18 @@ const Fl = /* @__PURE__ */ V(Al, [["__scopeId", "data-v-2657fbc4"]]), Dl = ["ari
|
|
|
1453
1456
|
});
|
|
1454
1457
|
const tt = /* @__PURE__ */ V(Rl, [["__scopeId", "data-v-581fd33b"]]);
|
|
1455
1458
|
function Ml(e) {
|
|
1456
|
-
let
|
|
1459
|
+
let l;
|
|
1457
1460
|
switch (e) {
|
|
1458
1461
|
case "error":
|
|
1459
|
-
|
|
1462
|
+
l = "warning-triangle";
|
|
1460
1463
|
break;
|
|
1461
1464
|
case "success":
|
|
1462
|
-
|
|
1465
|
+
l = "check";
|
|
1463
1466
|
break;
|
|
1464
1467
|
default:
|
|
1465
|
-
|
|
1468
|
+
l = "info-circle";
|
|
1466
1469
|
}
|
|
1467
|
-
return
|
|
1470
|
+
return l;
|
|
1468
1471
|
}
|
|
1469
1472
|
const Nl = [..._t], Hl = { class: "joy-highlight--text" }, Wl = { key: 0 }, Ul = /* @__PURE__ */ $({
|
|
1470
1473
|
__name: "VJoyHighlight",
|
|
@@ -1488,9 +1491,9 @@ const Nl = [..._t], Hl = { class: "joy-highlight--text" }, Wl = { key: 0 }, Ul =
|
|
|
1488
1491
|
}
|
|
1489
1492
|
}
|
|
1490
1493
|
},
|
|
1491
|
-
setup(e, { expose:
|
|
1492
|
-
const
|
|
1493
|
-
return
|
|
1494
|
+
setup(e, { expose: l }) {
|
|
1495
|
+
const t = e, o = L(() => t.icon ? t.icon : Ml(t.level));
|
|
1496
|
+
return l({
|
|
1494
1497
|
getRelevantIcon: o
|
|
1495
1498
|
}), (n, r) => (m(), p("div", {
|
|
1496
1499
|
class: w([
|
|
@@ -1545,11 +1548,11 @@ const Gl = /* @__PURE__ */ V(Ul, [["__scopeId", "data-v-ba5e6101"]]), Kl = ["sma
|
|
|
1545
1548
|
text: String
|
|
1546
1549
|
},
|
|
1547
1550
|
setup(e) {
|
|
1548
|
-
return (
|
|
1551
|
+
return (l, t) => (m(), x(ce(e.tagName), Y({
|
|
1549
1552
|
class: ["joy-label", `joy-label--${e.size}`]
|
|
1550
|
-
},
|
|
1553
|
+
}, l.$attrs), {
|
|
1551
1554
|
default: B(() => [
|
|
1552
|
-
h(
|
|
1555
|
+
h(l.$slots, "default", {}, () => [
|
|
1553
1556
|
C(I(e.text), 1)
|
|
1554
1557
|
], !0),
|
|
1555
1558
|
e.required ? (m(), p("span", Ql, "*")) : _("", !0),
|
|
@@ -1620,39 +1623,39 @@ const W = /* @__PURE__ */ V(Yl, [["__scopeId", "data-v-1265214a"]]), Xl = ["larg
|
|
|
1620
1623
|
unit: String
|
|
1621
1624
|
},
|
|
1622
1625
|
emits: ["update:modelValue"],
|
|
1623
|
-
setup(e, { emit:
|
|
1624
|
-
const
|
|
1626
|
+
setup(e, { emit: l }) {
|
|
1627
|
+
const t = e, o = g(), n = g(), r = Me(), s = G(), i = g(!1), c = L(() => typeof t.modelValue == "number" || !t.clearable || t.unit || !t.modelValue ? !1 : t.modelValue.length > 0 && !t.unit), y = L(() => s.default && s.default()), u = L(() => {
|
|
1625
1628
|
var f, d;
|
|
1626
1629
|
return !!((f = n.value) != null && f.closest("joy-wrapper")) || !!((d = n.value) != null && d.closest(".joy-wrapper"));
|
|
1627
|
-
}), v = g(
|
|
1630
|
+
}), v = g(t.type);
|
|
1628
1631
|
ut(() => {
|
|
1629
|
-
v.value =
|
|
1632
|
+
v.value = t.unit ? "number" : t.unit || "text";
|
|
1630
1633
|
});
|
|
1631
|
-
const
|
|
1634
|
+
const a = {
|
|
1632
1635
|
onFocus: () => {
|
|
1633
|
-
|
|
1636
|
+
i.value = !0;
|
|
1634
1637
|
},
|
|
1635
1638
|
onBlur: () => {
|
|
1636
|
-
|
|
1639
|
+
i.value = !1;
|
|
1637
1640
|
},
|
|
1638
1641
|
onInput: (f) => {
|
|
1639
1642
|
let d = f.target.value;
|
|
1640
|
-
|
|
1643
|
+
l("update:modelValue", d);
|
|
1641
1644
|
},
|
|
1642
1645
|
clearValue: () => {
|
|
1643
|
-
|
|
1646
|
+
t.disabled || l("update:modelValue", "");
|
|
1644
1647
|
}
|
|
1645
1648
|
};
|
|
1646
1649
|
return (f, d) => (m(), p("div", {
|
|
1647
1650
|
ref_key: "root",
|
|
1648
1651
|
ref: n,
|
|
1649
|
-
class: w([`joy-input--${
|
|
1652
|
+
class: w([`joy-input--${t.size}`])
|
|
1650
1653
|
}, [
|
|
1651
1654
|
b("div", {
|
|
1652
1655
|
class: w([
|
|
1653
1656
|
"joy-input",
|
|
1654
1657
|
{
|
|
1655
|
-
"joy-input--focusing":
|
|
1658
|
+
"joy-input--focusing": i.value,
|
|
1656
1659
|
"joy-input--disabled": e.disabled,
|
|
1657
1660
|
"joy-input--invalid": e.invalid,
|
|
1658
1661
|
"joy-input--valid": !e.invalid && !k(r).disabled
|
|
@@ -1685,7 +1688,7 @@ const W = /* @__PURE__ */ V(Yl, [["__scopeId", "data-v-1265214a"]]), Xl = ["larg
|
|
|
1685
1688
|
])
|
|
1686
1689
|
}, [
|
|
1687
1690
|
b("input", Y(f.$attrs, {
|
|
1688
|
-
id:
|
|
1691
|
+
id: t.name,
|
|
1689
1692
|
ref_key: "input",
|
|
1690
1693
|
ref: o,
|
|
1691
1694
|
required: e.required,
|
|
@@ -1699,11 +1702,11 @@ const W = /* @__PURE__ */ V(Yl, [["__scopeId", "data-v-1265214a"]]), Xl = ["larg
|
|
|
1699
1702
|
type: v.value,
|
|
1700
1703
|
value: e.modelValue,
|
|
1701
1704
|
onFocus: d[0] || (d[0] = //@ts-ignore
|
|
1702
|
-
(...j) =>
|
|
1705
|
+
(...j) => a.onFocus && a.onFocus(...j)),
|
|
1703
1706
|
onBlur: d[1] || (d[1] = //@ts-ignore
|
|
1704
|
-
(...j) =>
|
|
1707
|
+
(...j) => a.onBlur && a.onBlur(...j)),
|
|
1705
1708
|
onInput: d[2] || (d[2] = //@ts-ignore
|
|
1706
|
-
(...j) =>
|
|
1709
|
+
(...j) => a.onInput && a.onInput(...j))
|
|
1707
1710
|
}), null, 16, eo),
|
|
1708
1711
|
c.value ? (m(), x(Ue, {
|
|
1709
1712
|
key: 0,
|
|
@@ -1712,7 +1715,7 @@ const W = /* @__PURE__ */ V(Yl, [["__scopeId", "data-v-1265214a"]]), Xl = ["larg
|
|
|
1712
1715
|
variant: "ghost",
|
|
1713
1716
|
size: "xxsmall",
|
|
1714
1717
|
icon: "cross",
|
|
1715
|
-
onClick:
|
|
1718
|
+
onClick: a.clearValue
|
|
1716
1719
|
}, null, 8, ["onClick"])) : _("", !0),
|
|
1717
1720
|
e.icon && !e.clearable ? (m(), x(R, {
|
|
1718
1721
|
key: 1,
|
|
@@ -1750,14 +1753,14 @@ const oo = /* @__PURE__ */ V(lo, [["__scopeId", "data-v-46a69828"]]), no = ["tea
|
|
|
1750
1753
|
text: String
|
|
1751
1754
|
},
|
|
1752
1755
|
setup(e) {
|
|
1753
|
-
return (
|
|
1756
|
+
return (l, t) => (m(), p("a", Y({ href: e.href }, l.$attrs, {
|
|
1754
1757
|
class: ["joy-link", `joy-link_${e.color}`]
|
|
1755
1758
|
}), [
|
|
1756
1759
|
e.icon ? (m(), x(R, {
|
|
1757
1760
|
key: 0,
|
|
1758
1761
|
name: e.icon
|
|
1759
1762
|
}, null, 8, ["name"])) : _("", !0),
|
|
1760
|
-
h(
|
|
1763
|
+
h(l.$slots, "default", {}, () => [
|
|
1761
1764
|
C(I(e.text), 1)
|
|
1762
1765
|
], !0)
|
|
1763
1766
|
], 16, ao));
|
|
@@ -1772,8 +1775,8 @@ const ro = /* @__PURE__ */ V(io, [["__scopeId", "data-v-a8db21c2"]]), so = ["id"
|
|
|
1772
1775
|
type: Array,
|
|
1773
1776
|
required: !0,
|
|
1774
1777
|
validator(e) {
|
|
1775
|
-
const
|
|
1776
|
-
return
|
|
1778
|
+
const l = e.every((o) => Object.keys(o).includes("value")), t = e.every((o) => Object.keys(o).includes("label"));
|
|
1779
|
+
return l && t;
|
|
1777
1780
|
}
|
|
1778
1781
|
},
|
|
1779
1782
|
id: String,
|
|
@@ -1799,14 +1802,14 @@ const ro = /* @__PURE__ */ V(io, [["__scopeId", "data-v-a8db21c2"]]), so = ["id"
|
|
|
1799
1802
|
}
|
|
1800
1803
|
},
|
|
1801
1804
|
emits: ["update:value"],
|
|
1802
|
-
setup(e, { emit:
|
|
1803
|
-
const
|
|
1805
|
+
setup(e, { emit: l }) {
|
|
1806
|
+
const t = e;
|
|
1804
1807
|
function o(r) {
|
|
1805
|
-
return
|
|
1808
|
+
return t.value.includes(r.value);
|
|
1806
1809
|
}
|
|
1807
1810
|
function n(r, s) {
|
|
1808
|
-
let
|
|
1809
|
-
s ?
|
|
1811
|
+
let i = [...t.value || []];
|
|
1812
|
+
s ? i.push(r) : i.splice(i.indexOf(r), 1), l("update:value", i);
|
|
1810
1813
|
}
|
|
1811
1814
|
return (r, s) => (m(), p("fieldset", {
|
|
1812
1815
|
id: e.id,
|
|
@@ -1825,17 +1828,17 @@ const ro = /* @__PURE__ */ V(io, [["__scopeId", "data-v-a8db21c2"]]), so = ["id"
|
|
|
1825
1828
|
_: 1
|
|
1826
1829
|
}, 8, ["required", "optional-label", "size"])) : _("", !0),
|
|
1827
1830
|
b("div", uo, [
|
|
1828
|
-
(m(!0), p(fe, null, ye(e.options, (
|
|
1829
|
-
id:
|
|
1830
|
-
key:
|
|
1831
|
-
name:
|
|
1832
|
-
value:
|
|
1833
|
-
checked: o(
|
|
1834
|
-
"onUpdate:checked": (c) => n(
|
|
1831
|
+
(m(!0), p(fe, null, ye(e.options, (i) => (m(), x(k(he), {
|
|
1832
|
+
id: i.id,
|
|
1833
|
+
key: i.id,
|
|
1834
|
+
name: i.name,
|
|
1835
|
+
value: i.value,
|
|
1836
|
+
checked: o(i),
|
|
1837
|
+
"onUpdate:checked": (c) => n(i.value, c)
|
|
1835
1838
|
}, {
|
|
1836
1839
|
default: B(() => [
|
|
1837
|
-
h(r.$slots, "checkbox", ve(me(
|
|
1838
|
-
C(I(
|
|
1840
|
+
h(r.$slots, "checkbox", ve(me(i)), () => [
|
|
1841
|
+
C(I(i.label), 1)
|
|
1839
1842
|
], !0)
|
|
1840
1843
|
]),
|
|
1841
1844
|
_: 2
|
|
@@ -1890,8 +1893,8 @@ const fo = /* @__PURE__ */ V(co, [["__scopeId", "data-v-47574ced"]]), yo = ["sma
|
|
|
1890
1893
|
}
|
|
1891
1894
|
},
|
|
1892
1895
|
setup(e) {
|
|
1893
|
-
const
|
|
1894
|
-
return (s,
|
|
1896
|
+
const l = dt("VJoyWrapperContext", {}), t = L(() => Object.keys(l).length > 0), o = G(), n = g(), r = L(() => o["panel-title"] || o["panel-subtitle"] || o["panel-title-action"]);
|
|
1897
|
+
return (s, i) => (m(), p("section", {
|
|
1895
1898
|
ref_key: "panel",
|
|
1896
1899
|
ref: n,
|
|
1897
1900
|
style: Z({ flex: e.flex }),
|
|
@@ -1899,7 +1902,7 @@ const fo = /* @__PURE__ */ V(co, [["__scopeId", "data-v-47574ced"]]), yo = ["sma
|
|
|
1899
1902
|
"joy-panel",
|
|
1900
1903
|
`joy-panel--${e.padding}`,
|
|
1901
1904
|
{
|
|
1902
|
-
"joy-panel--no-margin": e.noMargin ||
|
|
1905
|
+
"joy-panel--no-margin": e.noMargin || t.value,
|
|
1903
1906
|
"joy-panel--loading": e.loading
|
|
1904
1907
|
}
|
|
1905
1908
|
])
|
|
@@ -1946,13 +1949,13 @@ const wo = /* @__PURE__ */ V(_o, [["__scopeId", "data-v-2e3a2baa"]]), So = { cla
|
|
|
1946
1949
|
}, $o = /* @__PURE__ */ $({
|
|
1947
1950
|
__name: "VJoyPanelSection",
|
|
1948
1951
|
setup(e) {
|
|
1949
|
-
const
|
|
1950
|
-
return (
|
|
1951
|
-
k(
|
|
1952
|
-
h(
|
|
1952
|
+
const l = G();
|
|
1953
|
+
return (t, o) => (m(), p("div", So, [
|
|
1954
|
+
k(l)["panel-section-title"] ? (m(), p("div", jo, [
|
|
1955
|
+
h(t.$slots, "panel-section-title", {}, void 0, !0)
|
|
1953
1956
|
])) : _("", !0),
|
|
1954
|
-
k(
|
|
1955
|
-
h(
|
|
1957
|
+
k(l)["panel-section-content"] ? (m(), p("div", ko, [
|
|
1958
|
+
h(t.$slots, "panel-section-content", {}, void 0, !0)
|
|
1956
1959
|
])) : _("", !0)
|
|
1957
1960
|
]));
|
|
1958
1961
|
}
|
|
@@ -1992,18 +1995,18 @@ const Vo = /* @__PURE__ */ V($o, [["__scopeId", "data-v-d88510ab"]]), xo = ["id"
|
|
|
1992
1995
|
}
|
|
1993
1996
|
},
|
|
1994
1997
|
emits: ["update:modelValue"],
|
|
1995
|
-
setup(e, { expose:
|
|
1996
|
-
const o = e, n = g(!1), r = g(!1), s = g(null),
|
|
1998
|
+
setup(e, { expose: l, emit: t }) {
|
|
1999
|
+
const o = e, n = g(!1), r = g(!1), s = g(null), i = g(null), c = G(), y = L(() => !o.modelValue || !o.value ? !1 : o.modelValue === o.value);
|
|
1997
2000
|
function u() {
|
|
1998
2001
|
n.value = !!c["expandable-content"] && y.value;
|
|
1999
2002
|
}
|
|
2000
2003
|
function v() {
|
|
2001
|
-
|
|
2004
|
+
t("update:modelValue", o.value), u();
|
|
2002
2005
|
}
|
|
2003
2006
|
X(() => {
|
|
2004
2007
|
o.theme === "outline" && u();
|
|
2005
2008
|
});
|
|
2006
|
-
function
|
|
2009
|
+
function a() {
|
|
2007
2010
|
r.value = !0;
|
|
2008
2011
|
}
|
|
2009
2012
|
function f() {
|
|
@@ -2014,7 +2017,7 @@ const Vo = /* @__PURE__ */ V($o, [["__scopeId", "data-v-d88510ab"]]), xo = ["id"
|
|
|
2014
2017
|
() => {
|
|
2015
2018
|
u();
|
|
2016
2019
|
}
|
|
2017
|
-
),
|
|
2020
|
+
), l({
|
|
2018
2021
|
checked: y,
|
|
2019
2022
|
isExpanded: n
|
|
2020
2023
|
}), (d, j) => (m(), p("label", {
|
|
@@ -2041,7 +2044,7 @@ const Vo = /* @__PURE__ */ V($o, [["__scopeId", "data-v-d88510ab"]]), xo = ["id"
|
|
|
2041
2044
|
required: e.required,
|
|
2042
2045
|
name: e.name,
|
|
2043
2046
|
onChange: v,
|
|
2044
|
-
onFocus:
|
|
2047
|
+
onFocus: a,
|
|
2045
2048
|
onBlur: f
|
|
2046
2049
|
}, null, 40, xo),
|
|
2047
2050
|
b("span", Io, [
|
|
@@ -2053,7 +2056,7 @@ const Vo = /* @__PURE__ */ V($o, [["__scopeId", "data-v-d88510ab"]]), xo = ["id"
|
|
|
2053
2056
|
]),
|
|
2054
2057
|
b("div", {
|
|
2055
2058
|
ref_key: "expandableElement",
|
|
2056
|
-
ref:
|
|
2059
|
+
ref: i,
|
|
2057
2060
|
class: w(["joy-radio-expandable", { "joy-radio-expandable--expanded": n.value }])
|
|
2058
2061
|
}, [
|
|
2059
2062
|
h(d.$slots, "expandable-content", {}, void 0, !0)
|
|
@@ -2083,18 +2086,18 @@ const Eo = /* @__PURE__ */ V(Lo, [["__scopeId", "data-v-24cea99b"]]), Co = ["for
|
|
|
2083
2086
|
}
|
|
2084
2087
|
},
|
|
2085
2088
|
setup(e) {
|
|
2086
|
-
return (
|
|
2089
|
+
return (l, t) => (m(), p("fieldset", {
|
|
2087
2090
|
ref: "root",
|
|
2088
2091
|
class: "joy-radio-group-fieldset",
|
|
2089
2092
|
role: "radiogroup",
|
|
2090
2093
|
form: e.form,
|
|
2091
2094
|
name: e.name
|
|
2092
2095
|
}, [
|
|
2093
|
-
h(
|
|
2096
|
+
h(l.$slots, "radio-group-legend", {}, void 0, !0),
|
|
2094
2097
|
b("div", {
|
|
2095
2098
|
class: w(["joy-radio-group-container", `joy-radio-group-${e.direction}`])
|
|
2096
2099
|
}, [
|
|
2097
|
-
h(
|
|
2100
|
+
h(l.$slots, "default", {}, void 0, !0)
|
|
2098
2101
|
], 2)
|
|
2099
2102
|
], 8, Co));
|
|
2100
2103
|
}
|
|
@@ -2117,17 +2120,17 @@ const Po = /* @__PURE__ */ V(Jo, [["__scopeId", "data-v-a77e7f95"]]), qo = { cla
|
|
|
2117
2120
|
}
|
|
2118
2121
|
},
|
|
2119
2122
|
setup(e) {
|
|
2120
|
-
return (
|
|
2123
|
+
return (l, t) => (m(), p("div", {
|
|
2121
2124
|
class: w(["joy-screen-loader", `joy-screen-loader--${e.color}`, { "joy-screen-loader--overlay": e.overlay }])
|
|
2122
2125
|
}, [
|
|
2123
2126
|
b("div", qo, [
|
|
2124
|
-
h(
|
|
2127
|
+
h(l.$slots, "spinner", {}, () => [
|
|
2125
2128
|
N(pe, {
|
|
2126
2129
|
color: e.color === "dark" ? "white" : "teal"
|
|
2127
2130
|
}, null, 8, ["color"])
|
|
2128
2131
|
], !0),
|
|
2129
|
-
|
|
2130
|
-
h(
|
|
2132
|
+
l.$slots.content ? (m(), p("div", To, [
|
|
2133
|
+
h(l.$slots, "content", {}, void 0, !0)
|
|
2131
2134
|
])) : _("", !0)
|
|
2132
2135
|
])
|
|
2133
2136
|
], 2));
|
|
@@ -2157,8 +2160,7 @@ const be = /* @__PURE__ */ V(zo, [["__scopeId", "data-v-5c4f6d7f"]]), Ao = ["id"
|
|
|
2157
2160
|
// ...FORM_BASED_PROPS,
|
|
2158
2161
|
label: String,
|
|
2159
2162
|
labelSize: {
|
|
2160
|
-
type: String
|
|
2161
|
-
default: "medium"
|
|
2163
|
+
type: String
|
|
2162
2164
|
},
|
|
2163
2165
|
optionalLabel: String,
|
|
2164
2166
|
requiredMark: {
|
|
@@ -2169,48 +2171,52 @@ const be = /* @__PURE__ */ V(zo, [["__scopeId", "data-v-5c4f6d7f"]]), Ao = ["id"
|
|
|
2169
2171
|
modelValue: {
|
|
2170
2172
|
type: String,
|
|
2171
2173
|
default: ""
|
|
2174
|
+
},
|
|
2175
|
+
size: {
|
|
2176
|
+
type: String,
|
|
2177
|
+
default: "medium"
|
|
2172
2178
|
}
|
|
2173
2179
|
// ...TEXT_BASED_PROPS,
|
|
2174
2180
|
},
|
|
2175
2181
|
emits: ["update:modelValue"],
|
|
2176
|
-
setup(e, { emit:
|
|
2177
|
-
const
|
|
2182
|
+
setup(e, { emit: l }) {
|
|
2183
|
+
const t = e, o = g(), n = g(), r = G(), s = g(!1), i = L(() => t.labelSize ? t.labelSize : t.size !== "medium" ? "small" : "medium");
|
|
2178
2184
|
X(() => {
|
|
2179
|
-
var
|
|
2180
|
-
const
|
|
2181
|
-
if (!
|
|
2185
|
+
var f;
|
|
2186
|
+
const v = r.label && r.label();
|
|
2187
|
+
if (!v || !v.length)
|
|
2182
2188
|
return;
|
|
2183
|
-
const
|
|
2184
|
-
if (
|
|
2185
|
-
const
|
|
2186
|
-
if (!
|
|
2189
|
+
const a = v[0];
|
|
2190
|
+
if (a.type === "JoyLabel") {
|
|
2191
|
+
const d = (f = a.props) == null ? void 0 : f.for;
|
|
2192
|
+
if (!d) {
|
|
2187
2193
|
console.warn("JoyLabel for attribute is missing");
|
|
2188
2194
|
return;
|
|
2189
2195
|
}
|
|
2190
|
-
|
|
2196
|
+
d !== t.id && console.warn("JoyLabel for attribute does not match with JoySelect id");
|
|
2191
2197
|
}
|
|
2192
2198
|
});
|
|
2193
|
-
function
|
|
2194
|
-
const
|
|
2195
|
-
|
|
2199
|
+
function c(v) {
|
|
2200
|
+
const a = v.target.value;
|
|
2201
|
+
l("update:modelValue", a);
|
|
2196
2202
|
}
|
|
2197
|
-
function
|
|
2203
|
+
function y() {
|
|
2198
2204
|
s.value = !0;
|
|
2199
2205
|
}
|
|
2200
|
-
function
|
|
2206
|
+
function u() {
|
|
2201
2207
|
s.value = !1;
|
|
2202
2208
|
}
|
|
2203
|
-
return (
|
|
2209
|
+
return (v, a) => (m(), p("div", {
|
|
2204
2210
|
ref_key: "root",
|
|
2205
2211
|
ref: o
|
|
2206
2212
|
}, [
|
|
2207
|
-
h(
|
|
2213
|
+
h(v.$slots, "select-label", {}, () => [
|
|
2208
2214
|
e.label ? (m(), x(W, {
|
|
2209
2215
|
key: 0,
|
|
2210
2216
|
required: e.required && e.requiredMark,
|
|
2211
2217
|
"optional-label": e.optionalLabel,
|
|
2212
2218
|
for: e.id || e.name,
|
|
2213
|
-
size:
|
|
2219
|
+
size: i.value
|
|
2214
2220
|
}, {
|
|
2215
2221
|
default: B(() => [
|
|
2216
2222
|
C(I(e.label), 1)
|
|
@@ -2219,12 +2225,15 @@ const be = /* @__PURE__ */ V(zo, [["__scopeId", "data-v-5c4f6d7f"]]), Ao = ["id"
|
|
|
2219
2225
|
}, 8, ["required", "optional-label", "for", "size"])) : _("", !0)
|
|
2220
2226
|
], !0),
|
|
2221
2227
|
b("div", {
|
|
2222
|
-
class: w(
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
+
class: w([
|
|
2229
|
+
`joy-select--${e.size}`,
|
|
2230
|
+
{
|
|
2231
|
+
"joy-select__wrapper": !0,
|
|
2232
|
+
"joy-select--invalid": e.invalid,
|
|
2233
|
+
"joy-select--disabled": e.disabled,
|
|
2234
|
+
"joy-select--focusing": s.value
|
|
2235
|
+
}
|
|
2236
|
+
])
|
|
2228
2237
|
}, [
|
|
2229
2238
|
b("select", {
|
|
2230
2239
|
id: e.id || e.name,
|
|
@@ -2236,11 +2245,11 @@ const be = /* @__PURE__ */ V(zo, [["__scopeId", "data-v-5c4f6d7f"]]), Ao = ["id"
|
|
|
2236
2245
|
required: e.required,
|
|
2237
2246
|
disabled: e.disabled,
|
|
2238
2247
|
value: e.modelValue,
|
|
2239
|
-
onInput:
|
|
2240
|
-
onFocus:
|
|
2241
|
-
onBlur:
|
|
2248
|
+
onInput: c,
|
|
2249
|
+
onFocus: y,
|
|
2250
|
+
onBlur: u
|
|
2242
2251
|
}, [
|
|
2243
|
-
h(
|
|
2252
|
+
h(v.$slots, "default", {}, void 0, !0)
|
|
2244
2253
|
], 40, Ao),
|
|
2245
2254
|
N(R, {
|
|
2246
2255
|
class: "joy-select__chevron",
|
|
@@ -2250,7 +2259,7 @@ const be = /* @__PURE__ */ V(zo, [["__scopeId", "data-v-5c4f6d7f"]]), Ao = ["id"
|
|
|
2250
2259
|
], 512));
|
|
2251
2260
|
}
|
|
2252
2261
|
});
|
|
2253
|
-
const Do = /* @__PURE__ */ V(Fo, [["__scopeId", "data-v-
|
|
2262
|
+
const Do = /* @__PURE__ */ V(Fo, [["__scopeId", "data-v-18112ea4"]]), Ro = ["aria-disabled"], Mo = ["id", "value", "checked", "disabled", "required", "name"], No = /* @__PURE__ */ $({
|
|
2254
2263
|
__name: "VJoySelectableItem",
|
|
2255
2264
|
props: {
|
|
2256
2265
|
disabled: {
|
|
@@ -2286,16 +2295,16 @@ const Do = /* @__PURE__ */ V(Fo, [["__scopeId", "data-v-b1af08d1"]]), Ro = ["ari
|
|
|
2286
2295
|
}
|
|
2287
2296
|
},
|
|
2288
2297
|
emits: ["update:checked"],
|
|
2289
|
-
setup(e, { emit:
|
|
2290
|
-
const
|
|
2298
|
+
setup(e, { emit: l }) {
|
|
2299
|
+
const t = e, o = g(t.checked), n = g(), r = g(!1), s = t.multiple ? "div" : "label", i = {
|
|
2291
2300
|
onRadioChange: () => {
|
|
2292
|
-
|
|
2301
|
+
l("update:checked", t.value);
|
|
2293
2302
|
},
|
|
2294
2303
|
onClick: () => {
|
|
2295
|
-
|
|
2304
|
+
t.checked && !t.multiple && l("update:checked", "");
|
|
2296
2305
|
},
|
|
2297
2306
|
onLabelClick: (y) => {
|
|
2298
|
-
|
|
2307
|
+
t.multiple || y.stopPropagation();
|
|
2299
2308
|
},
|
|
2300
2309
|
onFocus: () => {
|
|
2301
2310
|
r.value = !0;
|
|
@@ -2305,7 +2314,7 @@ const Do = /* @__PURE__ */ V(Fo, [["__scopeId", "data-v-b1af08d1"]]), Ro = ["ari
|
|
|
2305
2314
|
}
|
|
2306
2315
|
};
|
|
2307
2316
|
function c(y) {
|
|
2308
|
-
|
|
2317
|
+
l("update:checked", y);
|
|
2309
2318
|
}
|
|
2310
2319
|
return (y, u) => (m(), p("div", {
|
|
2311
2320
|
class: w([
|
|
@@ -2316,7 +2325,7 @@ const Do = /* @__PURE__ */ V(Fo, [["__scopeId", "data-v-b1af08d1"]]), Ro = ["ari
|
|
|
2316
2325
|
]),
|
|
2317
2326
|
"aria-disabled": e.disabled,
|
|
2318
2327
|
onClick: u[4] || (u[4] = //@ts-ignore
|
|
2319
|
-
(...v) =>
|
|
2328
|
+
(...v) => i.onClick && i.onClick(...v))
|
|
2320
2329
|
}, [
|
|
2321
2330
|
e.multiple ? _("", !0) : (m(), p("input", {
|
|
2322
2331
|
key: 0,
|
|
@@ -2330,11 +2339,11 @@ const Do = /* @__PURE__ */ V(Fo, [["__scopeId", "data-v-b1af08d1"]]), Ro = ["ari
|
|
|
2330
2339
|
required: e.required,
|
|
2331
2340
|
name: e.name,
|
|
2332
2341
|
onChange: u[0] || (u[0] = //@ts-ignore
|
|
2333
|
-
(...v) =>
|
|
2342
|
+
(...v) => i.onRadioChange && i.onRadioChange(...v)),
|
|
2334
2343
|
onFocus: u[1] || (u[1] = //@ts-ignore
|
|
2335
|
-
(...v) =>
|
|
2344
|
+
(...v) => i.onFocus && i.onFocus(...v)),
|
|
2336
2345
|
onBlur: u[2] || (u[2] = //@ts-ignore
|
|
2337
|
-
(...v) =>
|
|
2346
|
+
(...v) => i.onBlur && i.onBlur(...v))
|
|
2338
2347
|
}, null, 40, Mo)),
|
|
2339
2348
|
(m(), x(ce(k(s)), {
|
|
2340
2349
|
for: e.id,
|
|
@@ -2347,7 +2356,7 @@ const Do = /* @__PURE__ */ V(Fo, [["__scopeId", "data-v-b1af08d1"]]), Ro = ["ari
|
|
|
2347
2356
|
"joy-selectable-item--single": !e.multiple
|
|
2348
2357
|
}
|
|
2349
2358
|
]),
|
|
2350
|
-
onClick:
|
|
2359
|
+
onClick: i.onLabelClick
|
|
2351
2360
|
}, {
|
|
2352
2361
|
default: B(() => [
|
|
2353
2362
|
e.multiple ? (m(), x(k(he), {
|
|
@@ -2363,8 +2372,8 @@ const Do = /* @__PURE__ */ V(Fo, [["__scopeId", "data-v-b1af08d1"]]), Ro = ["ari
|
|
|
2363
2372
|
name: e.name,
|
|
2364
2373
|
"display-focus": !1,
|
|
2365
2374
|
required: e.required,
|
|
2366
|
-
onFocus:
|
|
2367
|
-
onBlur:
|
|
2375
|
+
onFocus: i.onFocus,
|
|
2376
|
+
onBlur: i.onBlur
|
|
2368
2377
|
}, {
|
|
2369
2378
|
default: B(() => [
|
|
2370
2379
|
h(y.$slots, "default", {}, void 0, !0)
|
|
@@ -2390,8 +2399,8 @@ const lt = /* @__PURE__ */ V(No, [["__scopeId", "data-v-cb2531c0"]]), Ho = ["id"
|
|
|
2390
2399
|
type: Array,
|
|
2391
2400
|
required: !0,
|
|
2392
2401
|
validator(e) {
|
|
2393
|
-
const
|
|
2394
|
-
return
|
|
2402
|
+
const l = e.every((o) => Object.keys(o).includes("value")), t = e.every((o) => Object.keys(o).includes("label"));
|
|
2403
|
+
return l && t;
|
|
2395
2404
|
}
|
|
2396
2405
|
},
|
|
2397
2406
|
id: String,
|
|
@@ -2423,16 +2432,16 @@ const lt = /* @__PURE__ */ V(No, [["__scopeId", "data-v-cb2531c0"]]), Ho = ["id"
|
|
|
2423
2432
|
}
|
|
2424
2433
|
},
|
|
2425
2434
|
emits: ["update:value"],
|
|
2426
|
-
setup(e, { emit:
|
|
2427
|
-
const
|
|
2435
|
+
setup(e, { emit: l }) {
|
|
2436
|
+
const t = e;
|
|
2428
2437
|
function o(r) {
|
|
2429
|
-
return typeof
|
|
2438
|
+
return typeof t.value == "string" ? t.value === r.value : (t.value || []).includes(r.value);
|
|
2430
2439
|
}
|
|
2431
2440
|
function n(r, s) {
|
|
2432
|
-
if (!
|
|
2433
|
-
return
|
|
2434
|
-
let
|
|
2435
|
-
s && typeof s == "boolean" ?
|
|
2441
|
+
if (!t.multiple)
|
|
2442
|
+
return l("update:value", s);
|
|
2443
|
+
let i = [...t.value || []];
|
|
2444
|
+
s && typeof s == "boolean" ? i.push(r) : i.splice(i.indexOf(r), 1), l("update:value", i);
|
|
2436
2445
|
}
|
|
2437
2446
|
return (r, s) => (m(), p("fieldset", {
|
|
2438
2447
|
id: e.id,
|
|
@@ -2460,25 +2469,25 @@ const lt = /* @__PURE__ */ V(No, [["__scopeId", "data-v-cb2531c0"]]), Ho = ["id"
|
|
|
2460
2469
|
}
|
|
2461
2470
|
])
|
|
2462
2471
|
}, [
|
|
2463
|
-
(m(!0), p(fe, null, ye(e.options, (
|
|
2464
|
-
id:
|
|
2465
|
-
key:
|
|
2466
|
-
name:
|
|
2467
|
-
disabled:
|
|
2468
|
-
value:
|
|
2472
|
+
(m(!0), p(fe, null, ye(e.options, (i) => (m(), x(k(lt), {
|
|
2473
|
+
id: i.id,
|
|
2474
|
+
key: i.id,
|
|
2475
|
+
name: i.name,
|
|
2476
|
+
disabled: i.disabled,
|
|
2477
|
+
value: i.value,
|
|
2469
2478
|
multiple: e.multiple,
|
|
2470
|
-
checked: o(
|
|
2471
|
-
"onUpdate:checked": (c) => n(
|
|
2479
|
+
checked: o(i),
|
|
2480
|
+
"onUpdate:checked": (c) => n(i.value, c)
|
|
2472
2481
|
}, We({
|
|
2473
2482
|
default: B(() => [
|
|
2474
|
-
C(I(
|
|
2483
|
+
C(I(i.label) + " ", 1)
|
|
2475
2484
|
]),
|
|
2476
2485
|
_: 2
|
|
2477
2486
|
}, [
|
|
2478
|
-
|
|
2487
|
+
i.subLabel ? {
|
|
2479
2488
|
name: "selectable-item-sublabel",
|
|
2480
2489
|
fn: B(() => [
|
|
2481
|
-
C(I(
|
|
2490
|
+
C(I(i.subLabel), 1)
|
|
2482
2491
|
]),
|
|
2483
2492
|
key: "0"
|
|
2484
2493
|
} : void 0
|
|
@@ -2521,7 +2530,7 @@ const Uo = /* @__PURE__ */ V(Wo, [["__scopeId", "data-v-0730aed0"]]), Go = /* @_
|
|
|
2521
2530
|
}
|
|
2522
2531
|
},
|
|
2523
2532
|
setup(e) {
|
|
2524
|
-
return ct("VJoyWrapperContext", e), (
|
|
2533
|
+
return ct("VJoyWrapperContext", e), (t, o) => (m(), p("div", {
|
|
2525
2534
|
class: w([
|
|
2526
2535
|
"joy-wrapper",
|
|
2527
2536
|
`joy-wrapper--justify-${e.justify}`,
|
|
@@ -2532,7 +2541,7 @@ const Uo = /* @__PURE__ */ V(Wo, [["__scopeId", "data-v-0730aed0"]]), Go = /* @_
|
|
|
2532
2541
|
{ "joy-wrapper--has-margin": !e.noMargin }
|
|
2533
2542
|
])
|
|
2534
2543
|
}, [
|
|
2535
|
-
h(
|
|
2544
|
+
h(t.$slots, "default", {}, void 0, !0)
|
|
2536
2545
|
], 2));
|
|
2537
2546
|
}
|
|
2538
2547
|
});
|
|
@@ -2572,24 +2581,24 @@ const Ko = /* @__PURE__ */ V(Go, [["__scopeId", "data-v-e2f29698"]]), Qo = { cla
|
|
|
2572
2581
|
}
|
|
2573
2582
|
},
|
|
2574
2583
|
setup(e) {
|
|
2575
|
-
const
|
|
2584
|
+
const l = e, t = G(), o = L(() => !!t["template-back"] || !!t["template-title"] || !!t["template-subtitle"] || !!t["template-actions"]);
|
|
2576
2585
|
return (n, r) => (m(), p("main", {
|
|
2577
2586
|
class: w(["joy-template", { "joy-template--full": e.full, "joy-template--loading": e.loading }])
|
|
2578
2587
|
}, [
|
|
2579
2588
|
b("div", Qo, [
|
|
2580
2589
|
o.value ? (m(), p("div", Zo, [
|
|
2581
|
-
k(
|
|
2590
|
+
k(t)["template-back"] ? (m(), p("div", Yo, [
|
|
2582
2591
|
h(n.$slots, "template-back", {}, void 0, !0)
|
|
2583
2592
|
])) : _("", !0),
|
|
2584
2593
|
b("div", Xo, [
|
|
2585
|
-
k(
|
|
2594
|
+
k(t)["template-title"] ? (m(), p("div", en, [
|
|
2586
2595
|
h(n.$slots, "template-title", {}, void 0, !0)
|
|
2587
2596
|
])) : _("", !0),
|
|
2588
|
-
k(
|
|
2597
|
+
k(t)["template-subtitle"] ? (m(), p("div", tn, [
|
|
2589
2598
|
h(n.$slots, "template-subtitle", {}, void 0, !0)
|
|
2590
2599
|
])) : _("", !0)
|
|
2591
2600
|
]),
|
|
2592
|
-
k(
|
|
2601
|
+
k(t)["template-actions"] ? (m(), p("div", ln, [
|
|
2593
2602
|
h(n.$slots, "template-actions", {}, void 0, !0)
|
|
2594
2603
|
])) : _("", !0)
|
|
2595
2604
|
])) : _("", !0),
|
|
@@ -2597,7 +2606,7 @@ const Ko = /* @__PURE__ */ V(Go, [["__scopeId", "data-v-e2f29698"]]), Qo = { cla
|
|
|
2597
2606
|
class: w([
|
|
2598
2607
|
"joy-template__content",
|
|
2599
2608
|
{
|
|
2600
|
-
"joy-template__content--reverse":
|
|
2609
|
+
"joy-template__content--reverse": l.sidebar === "left"
|
|
2601
2610
|
}
|
|
2602
2611
|
])
|
|
2603
2612
|
}, [
|
|
@@ -2676,25 +2685,25 @@ const rn = /* @__PURE__ */ V(an, [["__scopeId", "data-v-a2355e4b"]]), sn = ["ari
|
|
|
2676
2685
|
}
|
|
2677
2686
|
},
|
|
2678
2687
|
emits: ["update:modelValue"],
|
|
2679
|
-
setup(e, { expose:
|
|
2688
|
+
setup(e, { expose: l, emit: t }) {
|
|
2680
2689
|
const o = e, n = g(), { triggerResize: r } = Xt({
|
|
2681
2690
|
element: o.autogrow ? n : void 0
|
|
2682
|
-
}), s = g(!1),
|
|
2691
|
+
}), s = g(!1), i = g(!1), c = L(() => o.maxlength ? o.modelValue.length > o.maxlength : !1), y = L(() => o.minlength ? o.modelValue.length < o.minlength : !1), u = {
|
|
2683
2692
|
onInput: (v) => {
|
|
2684
|
-
|
|
2693
|
+
t("update:modelValue", v.target.value), r();
|
|
2685
2694
|
},
|
|
2686
2695
|
onBlur: () => {
|
|
2687
|
-
|
|
2696
|
+
i.value = !1, s.value = c.value || y.value;
|
|
2688
2697
|
},
|
|
2689
2698
|
onFocus: () => {
|
|
2690
|
-
|
|
2699
|
+
i.value = !0;
|
|
2691
2700
|
}
|
|
2692
2701
|
};
|
|
2693
|
-
return
|
|
2702
|
+
return l({
|
|
2694
2703
|
isInvalid: s,
|
|
2695
2704
|
valueOverMaxlength: c,
|
|
2696
2705
|
valueUnderMinlength: y
|
|
2697
|
-
}), (v,
|
|
2706
|
+
}), (v, a) => (m(), p("div", {
|
|
2698
2707
|
"aria-disabled": e.disabled,
|
|
2699
2708
|
class: w([
|
|
2700
2709
|
"joy-textarea",
|
|
@@ -2702,7 +2711,7 @@ const rn = /* @__PURE__ */ V(an, [["__scopeId", "data-v-a2355e4b"]]), sn = ["ari
|
|
|
2702
2711
|
"joy-textarea_invalid": s.value || e.invalid,
|
|
2703
2712
|
"joy-textarea_disabled": e.disabled,
|
|
2704
2713
|
"joy-textarea_autogrow": e.autogrow,
|
|
2705
|
-
"joy-textarea_focusing":
|
|
2714
|
+
"joy-textarea_focusing": i.value
|
|
2706
2715
|
}
|
|
2707
2716
|
])
|
|
2708
2717
|
}, [
|
|
@@ -2730,11 +2739,11 @@ const rn = /* @__PURE__ */ V(an, [["__scopeId", "data-v-a2355e4b"]]), sn = ["ari
|
|
|
2730
2739
|
required: e.required,
|
|
2731
2740
|
minlength: e.minlength,
|
|
2732
2741
|
value: e.modelValue,
|
|
2733
|
-
onInput:
|
|
2742
|
+
onInput: a[0] || (a[0] = //@ts-ignore
|
|
2734
2743
|
(...f) => u.onInput && u.onInput(...f)),
|
|
2735
|
-
onFocus:
|
|
2744
|
+
onFocus: a[1] || (a[1] = //@ts-ignore
|
|
2736
2745
|
(...f) => u.onFocus && u.onFocus(...f)),
|
|
2737
|
-
onBlur:
|
|
2746
|
+
onBlur: a[2] || (a[2] = //@ts-ignore
|
|
2738
2747
|
(...f) => u.onBlur && u.onBlur(...f))
|
|
2739
2748
|
}), null, 16, dn)
|
|
2740
2749
|
]),
|
|
@@ -2805,17 +2814,17 @@ const vn = /* @__PURE__ */ V(yn, [["__scopeId", "data-v-d0d2c93e"]]), ot = (e) =
|
|
|
2805
2814
|
label: String
|
|
2806
2815
|
},
|
|
2807
2816
|
emits: ["update:modelValue"],
|
|
2808
|
-
setup(e, { emit:
|
|
2809
|
-
const
|
|
2817
|
+
setup(e, { emit: l }) {
|
|
2818
|
+
const t = g(!1), o = {
|
|
2810
2819
|
onChange: (n) => {
|
|
2811
2820
|
const r = n.target.checked;
|
|
2812
|
-
|
|
2821
|
+
l("update:modelValue", r);
|
|
2813
2822
|
},
|
|
2814
2823
|
onFocus: () => {
|
|
2815
|
-
|
|
2824
|
+
t.value = !0;
|
|
2816
2825
|
},
|
|
2817
2826
|
onBlur: () => {
|
|
2818
|
-
|
|
2827
|
+
t.value = !1;
|
|
2819
2828
|
}
|
|
2820
2829
|
};
|
|
2821
2830
|
return (n, r) => (m(), p("div", mn, [
|
|
@@ -2825,7 +2834,7 @@ const vn = /* @__PURE__ */ V(yn, [["__scopeId", "data-v-d0d2c93e"]]), ot = (e) =
|
|
|
2825
2834
|
{
|
|
2826
2835
|
"joy-toggle__checked": e.modelValue,
|
|
2827
2836
|
"joy-toggle__disabled": e.disabled,
|
|
2828
|
-
"joy-toggle__focusing":
|
|
2837
|
+
"joy-toggle__focusing": t.value
|
|
2829
2838
|
}
|
|
2830
2839
|
])
|
|
2831
2840
|
}, [
|
|
@@ -2890,8 +2899,8 @@ const Sn = /* @__PURE__ */ V(wn, [["__scopeId", "data-v-cf79d999"]]), jn = /* @_
|
|
|
2890
2899
|
VJoyWrapper: Ko
|
|
2891
2900
|
}, Symbol.toStringTag, { value: "Module" })), $n = {
|
|
2892
2901
|
install: (e) => {
|
|
2893
|
-
Object.entries(jn).forEach(([
|
|
2894
|
-
e.component(
|
|
2902
|
+
Object.entries(jn).forEach(([l, t]) => {
|
|
2903
|
+
e.component(l, t);
|
|
2895
2904
|
});
|
|
2896
2905
|
}
|
|
2897
2906
|
};
|