@codemonster-ru/vueforge 0.84.0 → 0.86.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.ts.mjs +647 -625
- package/dist/index.ts.umd.js +4 -4
- package/dist/package/components/__tests__/input.test.d.ts +1 -0
- package/dist/package/components/filter-chips.vue.d.ts +1 -1
- package/dist/package/components/form-field.vue.d.ts +2 -0
- package/dist/package/components/form.vue.d.ts +1 -1
- package/dist/package/components/input.vue.d.ts +21 -0
- package/dist/package/components/otp-input.vue.d.ts +1 -1
- package/dist/package/components/password-input.vue.d.ts +1 -1
- package/dist/package/components/progress.vue.d.ts +1 -1
- package/dist/package/components/search-input.vue.d.ts +1 -1
- package/dist/package/components/slider.vue.d.ts +1 -1
- package/package.json +2 -1
package/dist/index.ts.mjs
CHANGED
|
@@ -15,7 +15,7 @@ const Ht = ["href", "aria-disabled", "tabindex"], it = /* @__PURE__ */ ne({
|
|
|
15
15
|
},
|
|
16
16
|
emits: ["click", "active", "update:active", "onActive"],
|
|
17
17
|
setup(n, { emit: o }) {
|
|
18
|
-
const a = o, e = n, t = Ot(), i = At(), s = G(null),
|
|
18
|
+
const a = o, e = n, t = Ot(), i = At(), s = G(null), u = f(() => e.href ?? e.url), r = f(() => e.as ? e.as === "router-link" && !e.to ? "a" : e.as : e.type === "router-link" || e.type === "a" ? e.type === "router-link" && !e.to ? "a" : e.type : e.to ? "router-link" : "a"), d = f(() => e.to), v = f(() => e.to ? i.resolve(e.to) : null), p = f(() => {
|
|
19
19
|
if (r.value !== "router-link")
|
|
20
20
|
return !1;
|
|
21
21
|
const _ = v.value;
|
|
@@ -35,7 +35,7 @@ const Ht = ["href", "aria-disabled", "tabindex"], it = /* @__PURE__ */ ne({
|
|
|
35
35
|
const y = nt("router-link");
|
|
36
36
|
return r.value === "a" ? (c(), b("a", {
|
|
37
37
|
key: 0,
|
|
38
|
-
href: _.disabled ? void 0 :
|
|
38
|
+
href: _.disabled ? void 0 : u.value,
|
|
39
39
|
class: ee(["vf-link", { "vf-link_active": m.value, "vf-link_disabled": _.disabled }]),
|
|
40
40
|
"aria-disabled": _.disabled ? "true" : void 0,
|
|
41
41
|
tabindex: _.disabled ? -1 : void 0,
|
|
@@ -49,7 +49,7 @@ const Ht = ["href", "aria-disabled", "tabindex"], it = /* @__PURE__ */ ne({
|
|
|
49
49
|
key: 1,
|
|
50
50
|
ref_key: "link",
|
|
51
51
|
ref: s,
|
|
52
|
-
to:
|
|
52
|
+
to: d.value,
|
|
53
53
|
class: ee(["vf-link", { "vf-link_active": m.value }]),
|
|
54
54
|
"aria-disabled": _.disabled ? "true" : void 0,
|
|
55
55
|
tabindex: _.disabled ? -1 : void 0,
|
|
@@ -175,12 +175,12 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
175
175
|
const t = {}, i = a(o.columns);
|
|
176
176
|
i && (t["--vf-grid-columns-override"] = i), o.gap && (t["--vf-grid-gap-override"] = o.gap), o.columnGap && (t["--vf-grid-column-gap-override"] = o.columnGap), o.rowGap && (t["--vf-grid-row-gap-override"] = o.rowGap), t["--vf-grid-align-items-override"] = o.align, t["--vf-grid-justify-items-override"] = o.justify;
|
|
177
177
|
const s = ["sm", "md", "lg", "xl"];
|
|
178
|
-
for (const
|
|
179
|
-
const r = o.breakpoints[
|
|
178
|
+
for (const u of s) {
|
|
179
|
+
const r = o.breakpoints[u];
|
|
180
180
|
if (!r)
|
|
181
181
|
continue;
|
|
182
|
-
const
|
|
183
|
-
|
|
182
|
+
const d = a(r.columns);
|
|
183
|
+
d && (t[`--vf-grid-columns-${u}-override`] = d), r.gap && (t[`--vf-grid-gap-${u}-override`] = r.gap), r.columnGap && (t[`--vf-grid-column-gap-${u}-override`] = r.columnGap), r.rowGap && (t[`--vf-grid-row-gap-${u}-override`] = r.rowGap), r.align && (t[`--vf-grid-align-items-${u}-override`] = r.align), r.justify && (t[`--vf-grid-justify-items-${u}-override`] = r.justify);
|
|
184
184
|
}
|
|
185
185
|
return t;
|
|
186
186
|
});
|
|
@@ -206,18 +206,18 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
206
206
|
},
|
|
207
207
|
setup(n) {
|
|
208
208
|
const o = n, a = (t, i, s) => {
|
|
209
|
-
const
|
|
210
|
-
return !
|
|
209
|
+
const u = t === "" || t === void 0 ? "" : String(t).trim(), r = i === "" || i === void 0 ? "" : String(i).trim(), d = s === "" || s === void 0 ? "" : String(s).trim();
|
|
210
|
+
return !u && !r && !d ? "" : r && d ? `${r} / ${d}` : r && u ? `${r} / span ${u}` : d && u ? `span ${u} / ${d}` : r || (d ? `auto / ${d}` : `span ${u} / span ${u}`);
|
|
211
211
|
}, e = f(() => {
|
|
212
212
|
const t = {}, i = a(o.span, o.start, o.end);
|
|
213
213
|
i && (t["--vf-grid-item-column-override"] = i);
|
|
214
214
|
const s = ["sm", "md", "lg", "xl"];
|
|
215
|
-
for (const
|
|
216
|
-
const r = o.breakpoints[
|
|
215
|
+
for (const u of s) {
|
|
216
|
+
const r = o.breakpoints[u];
|
|
217
217
|
if (!r)
|
|
218
218
|
continue;
|
|
219
|
-
const
|
|
220
|
-
|
|
219
|
+
const d = a(r.span, r.start, r.end);
|
|
220
|
+
d && (t[`--vf-grid-item-column-${u}-override`] = d);
|
|
221
221
|
}
|
|
222
222
|
return t;
|
|
223
223
|
});
|
|
@@ -302,7 +302,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
302
302
|
},
|
|
303
303
|
emits: ["active", "onActive"],
|
|
304
304
|
setup(n, { emit: o }) {
|
|
305
|
-
const a = o, e = n, t = G([]), i = (y, z) => `${y.label ?? y.to ?? y.href ?? y.url ?? "item"}_${z.toString()}`, s = (y) => y.toLowerCase().replace(/[^a-z0-9_-]+/g, "-"),
|
|
305
|
+
const a = o, e = n, t = G([]), i = (y, z) => `${y.label ?? y.to ?? y.href ?? y.url ?? "item"}_${z.toString()}`, s = (y) => y.toLowerCase().replace(/[^a-z0-9_-]+/g, "-"), u = (y, z) => `vf-menu-parent-${s(i(y, z))}`, r = (y, z) => `vf-menu-submenu-${s(i(y, z))}`, d = (y) => y.to ? "router-link" : "a", v = (y) => y.map((z) => ({
|
|
306
306
|
...z,
|
|
307
307
|
items: z.items ? v(z.items) : void 0
|
|
308
308
|
})), p = (y) => {
|
|
@@ -359,7 +359,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
359
359
|
item: { ...g, class: "vf-menu__link" }
|
|
360
360
|
}) : g.separator ? (c(), b("hr", Zt)) : g.items && g.items.length ? (c(), b(fe, { key: 2 }, [
|
|
361
361
|
B("button", {
|
|
362
|
-
id:
|
|
362
|
+
id: u(g, w),
|
|
363
363
|
class: ee(["vf-menu__parent", { "vf-menu__parent_active": g.active }]),
|
|
364
364
|
type: "button",
|
|
365
365
|
role: "menuitem",
|
|
@@ -392,7 +392,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
392
392
|
key: 3,
|
|
393
393
|
to: g.to,
|
|
394
394
|
href: g.href ?? g.url,
|
|
395
|
-
as:
|
|
395
|
+
as: d(g),
|
|
396
396
|
class: "vf-menu__link",
|
|
397
397
|
active: g.active,
|
|
398
398
|
disabled: g.disabled,
|
|
@@ -436,16 +436,16 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
436
436
|
disabled: { type: Boolean, default: !1 }
|
|
437
437
|
},
|
|
438
438
|
setup(n) {
|
|
439
|
-
const o = n, a = qe(dt, null), e = ["button", "submit", "reset"], t = (m) => !!m && e.includes(m), i = f(() => o.as ? o.as === "button" : !(o.to || o.href || o.url || o.type && !t(o.type))), s = f(() => t(o.type) ? o.type : "button"),
|
|
439
|
+
const o = n, a = qe(dt, null), e = ["button", "submit", "reset"], t = (m) => !!m && e.includes(m), i = f(() => o.as ? o.as === "button" : !(o.to || o.href || o.url || o.type && !t(o.type))), s = f(() => t(o.type) ? o.type : "button"), u = f(() => o.as === "link" ? o.to ? "router-link" : "a" : o.type && !t(o.type) ? o.type === "router-link" && o.to ? "router-link" : "a" : o.to ? "router-link" : "a"), r = f(() => {
|
|
440
440
|
const m = o.size ?? (a == null ? void 0 : a.value.size) ?? "normal", $ = o.variant ?? (a == null ? void 0 : a.value.variant), l = o.severity ?? (a == null ? void 0 : a.value.severity) ?? "primary", _ = o.loading || o.disabled || (a == null ? void 0 : a.value.disabled);
|
|
441
441
|
let k = ["vf-button", `vf-button_${l}`];
|
|
442
442
|
return ["top", "bottom"].includes(o.iconPos) && k.push("vf-button_vertical"), $ === "text" && k.push("vf-button_text"), $ === "outlined" && k.push("vf-button_outlined"), ["small", "large"].indexOf(m) > -1 && k.push(`vf-button_${m}`), _ && k.push("vf-button_disabled"), o.rounded && k.push("vf-button_rounded"), k;
|
|
443
|
-
}),
|
|
443
|
+
}), d = f(() => o.disabled || (a == null ? void 0 : a.value.disabled) === !0), v = f(() => ["vf-button__icon", `vf-button__icon_${o.iconPos}`]), p = f(() => ["vf-button__label"]);
|
|
444
444
|
return (m, $) => i.value ? (c(), b("button", {
|
|
445
445
|
key: 0,
|
|
446
446
|
type: s.value,
|
|
447
447
|
class: ee(r.value),
|
|
448
|
-
disabled: o.loading ||
|
|
448
|
+
disabled: o.loading || d.value
|
|
449
449
|
}, [
|
|
450
450
|
o.icon && !o.loading ? (c(), be(We(Ne), {
|
|
451
451
|
key: 0,
|
|
@@ -471,9 +471,9 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
471
471
|
key: 1,
|
|
472
472
|
to: o.to,
|
|
473
473
|
href: o.href ?? o.url,
|
|
474
|
-
as:
|
|
474
|
+
as: u.value,
|
|
475
475
|
class: ee(r.value),
|
|
476
|
-
disabled: o.loading ||
|
|
476
|
+
disabled: o.loading || d.value
|
|
477
477
|
}, {
|
|
478
478
|
default: Ce(() => [
|
|
479
479
|
o.icon ? (c(), be(We(Ne), {
|
|
@@ -528,7 +528,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
528
528
|
}), aa = {
|
|
529
529
|
key: 0,
|
|
530
530
|
class: "vf-input__prefix"
|
|
531
|
-
}, oa = ["type", "value", "placeholder", "disabled", "readonly"], ra = {
|
|
531
|
+
}, oa = ["id", "type", "name", "value", "placeholder", "autocomplete", "inputmode", "disabled", "readonly", "required", "aria-label", "aria-labelledby", "aria-describedby", "aria-invalid", "aria-required"], ra = {
|
|
532
532
|
key: 1,
|
|
533
533
|
class: "vf-input__suffix"
|
|
534
534
|
}, cc = /* @__PURE__ */ ne({
|
|
@@ -539,38 +539,58 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
539
539
|
placeholder: { default: "" },
|
|
540
540
|
disabled: { type: Boolean, default: !1 },
|
|
541
541
|
readonly: { type: Boolean, default: !1 },
|
|
542
|
+
required: { type: Boolean, default: !1 },
|
|
543
|
+
id: { default: void 0 },
|
|
544
|
+
name: { default: void 0 },
|
|
545
|
+
autocomplete: { default: void 0 },
|
|
546
|
+
inputmode: { default: void 0 },
|
|
547
|
+
ariaLabel: { default: void 0 },
|
|
548
|
+
ariaLabelledby: { default: void 0 },
|
|
549
|
+
ariaDescribedby: { default: void 0 },
|
|
550
|
+
ariaInvalid: { type: [Boolean, String], default: void 0 },
|
|
551
|
+
ariaRequired: { type: [Boolean, String], default: void 0 },
|
|
542
552
|
size: { default: "normal" },
|
|
543
553
|
variant: { default: "filled" }
|
|
544
554
|
},
|
|
545
555
|
emits: ["update:modelValue", "input", "change", "focus", "blur"],
|
|
546
556
|
setup(n, { emit: o }) {
|
|
547
557
|
const a = o, e = n, t = f(() => {
|
|
548
|
-
const
|
|
549
|
-
return e.size !== "normal" &&
|
|
550
|
-
}), i = (
|
|
551
|
-
const v =
|
|
552
|
-
a("update:modelValue", v.value), a("input",
|
|
553
|
-
}, s = (
|
|
554
|
-
return (
|
|
558
|
+
const d = ["vf-input", `vf-input_${e.variant}`];
|
|
559
|
+
return e.size !== "normal" && d.push(`vf-input_${e.size}`), e.disabled && d.push("vf-input_disabled"), d;
|
|
560
|
+
}), i = (d) => {
|
|
561
|
+
const v = d.target;
|
|
562
|
+
a("update:modelValue", v.value), a("input", d);
|
|
563
|
+
}, s = (d) => a("change", d), u = (d) => a("focus", d), r = (d) => a("blur", d);
|
|
564
|
+
return (d, v) => (c(), b("div", {
|
|
555
565
|
class: ee(t.value)
|
|
556
566
|
}, [
|
|
557
|
-
|
|
558
|
-
q(
|
|
567
|
+
d.$slots.prefix ? (c(), b("span", aa, [
|
|
568
|
+
q(d.$slots, "prefix")
|
|
559
569
|
])) : Q("", !0),
|
|
560
570
|
B("input", {
|
|
571
|
+
id: d.id,
|
|
561
572
|
class: "vf-input__control",
|
|
562
|
-
type:
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
573
|
+
type: d.type,
|
|
574
|
+
name: d.name,
|
|
575
|
+
value: d.modelValue,
|
|
576
|
+
placeholder: d.placeholder,
|
|
577
|
+
autocomplete: d.autocomplete,
|
|
578
|
+
inputmode: d.inputmode,
|
|
579
|
+
disabled: d.disabled,
|
|
580
|
+
readonly: d.readonly,
|
|
581
|
+
required: d.required,
|
|
582
|
+
"aria-label": d.ariaLabel,
|
|
583
|
+
"aria-labelledby": d.ariaLabelledby,
|
|
584
|
+
"aria-describedby": d.ariaDescribedby,
|
|
585
|
+
"aria-invalid": d.ariaInvalid === !0 || d.ariaInvalid === "true" ? "true" : d.ariaInvalid === "false" ? "false" : void 0,
|
|
586
|
+
"aria-required": d.required || d.ariaRequired === !0 || d.ariaRequired === "true" ? "true" : d.ariaRequired === "false" ? "false" : void 0,
|
|
567
587
|
onInput: i,
|
|
568
588
|
onChange: s,
|
|
569
|
-
onFocus:
|
|
589
|
+
onFocus: u,
|
|
570
590
|
onBlur: r
|
|
571
591
|
}, null, 40, oa),
|
|
572
|
-
|
|
573
|
-
q(
|
|
592
|
+
d.$slots.suffix ? (c(), b("span", ra, [
|
|
593
|
+
q(d.$slots, "suffix")
|
|
574
594
|
])) : Q("", !0)
|
|
575
595
|
], 2));
|
|
576
596
|
}
|
|
@@ -623,7 +643,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
623
643
|
},
|
|
624
644
|
emits: ["update:modelValue", "save", "cancel", "start", "end", "focus", "blur"],
|
|
625
645
|
setup(n, { emit: o }) {
|
|
626
|
-
const a = o, e = n, t = G(!1), i = G(""), s = G(null),
|
|
646
|
+
const a = o, e = n, t = G(!1), i = G(""), s = G(null), u = f(() => !e.disabled && !e.readonly), r = f(() => e.type === "number" ? "number" : "text"), d = f(() => e.modelValue === null || e.modelValue === void 0 || e.modelValue === "" ? e.placeholder : String(e.modelValue)), v = f(
|
|
627
647
|
() => e.modelValue === null || e.modelValue === void 0 || e.modelValue === ""
|
|
628
648
|
), p = f(() => {
|
|
629
649
|
const g = ["vf-inline-edit", `vf-inline-edit_${e.variant}`];
|
|
@@ -636,7 +656,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
636
656
|
i.value = String(e.modelValue);
|
|
637
657
|
}, $ = async () => {
|
|
638
658
|
var g, w;
|
|
639
|
-
!
|
|
659
|
+
!u.value || t.value || (m(), t.value = !0, a("start"), await $e(), (g = s.value) == null || g.focus(), (w = s.value) == null || w.select());
|
|
640
660
|
}, l = () => {
|
|
641
661
|
if (e.type === "number") {
|
|
642
662
|
if (!i.value.trim())
|
|
@@ -694,8 +714,8 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
694
714
|
], 64)) : (c(), b(fe, { key: 1 }, [
|
|
695
715
|
B("span", {
|
|
696
716
|
class: ee(["vf-inline-edit__value", { "vf-inline-edit__value_placeholder": v.value }])
|
|
697
|
-
}, j(
|
|
698
|
-
|
|
717
|
+
}, j(d.value), 3),
|
|
718
|
+
u.value ? (c(), b("button", {
|
|
699
719
|
key: 0,
|
|
700
720
|
class: "vf-inline-edit__action",
|
|
701
721
|
type: "button",
|
|
@@ -727,7 +747,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
727
747
|
setup(n, { emit: o }) {
|
|
728
748
|
const a = o, e = n, t = G(null), i = G(`${e.modelValue ?? ""}`);
|
|
729
749
|
let s = null;
|
|
730
|
-
const
|
|
750
|
+
const u = f(() => {
|
|
731
751
|
const k = ["vf-search-input", `vf-search-input_${e.variant}`];
|
|
732
752
|
return e.size !== "normal" && k.push(`vf-search-input_${e.size}`), e.disabled && k.push("vf-search-input_disabled"), k;
|
|
733
753
|
});
|
|
@@ -739,7 +759,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
739
759
|
);
|
|
740
760
|
const r = () => {
|
|
741
761
|
s && (clearTimeout(s), s = null);
|
|
742
|
-
},
|
|
762
|
+
}, d = (k, y = !1) => {
|
|
743
763
|
if (!(e.disabled || e.readonly)) {
|
|
744
764
|
if (r(), y || e.debounce <= 0) {
|
|
745
765
|
a("search", k);
|
|
@@ -751,17 +771,17 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
751
771
|
}
|
|
752
772
|
}, v = (k) => {
|
|
753
773
|
const z = k.target.value;
|
|
754
|
-
i.value = z, a("update:modelValue", z), a("input", k),
|
|
774
|
+
i.value = z, a("update:modelValue", z), a("input", k), d(z);
|
|
755
775
|
}, p = (k) => a("change", k), m = (k) => a("focus", k), $ = (k) => a("blur", k), l = () => {
|
|
756
|
-
|
|
776
|
+
d(i.value, !0);
|
|
757
777
|
}, _ = () => {
|
|
758
778
|
var k;
|
|
759
|
-
e.disabled || e.readonly || (i.value = "", a("update:modelValue", ""), a("change", ""), a("clear"),
|
|
779
|
+
e.disabled || e.readonly || (i.value = "", a("update:modelValue", ""), a("change", ""), a("clear"), d("", !0), (k = t.value) == null || k.focus());
|
|
760
780
|
};
|
|
761
781
|
return we(() => {
|
|
762
782
|
r();
|
|
763
783
|
}), (k, y) => (c(), b("div", {
|
|
764
|
-
class: ee(
|
|
784
|
+
class: ee(u.value)
|
|
765
785
|
}, [
|
|
766
786
|
y[0] || (y[0] = B("span", {
|
|
767
787
|
class: "vf-search-input__icon",
|
|
@@ -821,7 +841,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
821
841
|
emits: ["update:modelValue", "input", "change", "search", "insert", "select", "focus", "blur"],
|
|
822
842
|
setup(n, { emit: o }) {
|
|
823
843
|
let a = 0;
|
|
824
|
-
const e = o, t = n, i = G(null), s = G(null),
|
|
844
|
+
const e = o, t = n, i = G(null), s = G(null), u = G(!1), r = G(-1), d = `vf-mention-input-panel-${++a}`, v = G(null), p = f(() => {
|
|
825
845
|
var F;
|
|
826
846
|
return ((F = v.value) == null ? void 0 : F.trigger) ?? t.triggers[0] ?? "@";
|
|
827
847
|
}), m = f(() => t.suggestions.map((F) => ({
|
|
@@ -839,18 +859,18 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
839
859
|
const F = [
|
|
840
860
|
"vf-mention-input",
|
|
841
861
|
`vf-mention-input_${t.variant}`,
|
|
842
|
-
|
|
862
|
+
u.value ? "vf-mention-input_open" : ""
|
|
843
863
|
];
|
|
844
864
|
return t.size !== "normal" && F.push(`vf-mention-input_${t.size}`), t.disabled && F.push("vf-mention-input_disabled"), F.filter(Boolean);
|
|
845
865
|
}), k = () => {
|
|
846
|
-
|
|
866
|
+
u.value = !1, r.value = -1;
|
|
847
867
|
}, y = () => {
|
|
848
868
|
if (!(t.disabled || t.readonly)) {
|
|
849
869
|
if (!l.value.length) {
|
|
850
870
|
k();
|
|
851
871
|
return;
|
|
852
872
|
}
|
|
853
|
-
|
|
873
|
+
u.value = !0, r.value < 0 && (r.value = z());
|
|
854
874
|
}
|
|
855
875
|
}, z = () => l.value.findIndex((F) => !F.disabled), C = (F, H) => {
|
|
856
876
|
const Z = F.slice(0, H);
|
|
@@ -884,7 +904,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
884
904
|
(H = i.value) != null && H.contains(document.activeElement) || k();
|
|
885
905
|
}, 0);
|
|
886
906
|
}, O = (F) => {
|
|
887
|
-
if (!
|
|
907
|
+
if (!u.value || !l.value.length)
|
|
888
908
|
return;
|
|
889
909
|
let H = r.value;
|
|
890
910
|
(H < 0 || H >= l.value.length) && (H = F > 0 ? -1 : l.value.length);
|
|
@@ -894,13 +914,13 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
894
914
|
return;
|
|
895
915
|
}
|
|
896
916
|
}, E = () => {
|
|
897
|
-
if (!
|
|
917
|
+
if (!u.value) {
|
|
898
918
|
y();
|
|
899
919
|
return;
|
|
900
920
|
}
|
|
901
921
|
O(1);
|
|
902
922
|
}, T = () => {
|
|
903
|
-
if (!
|
|
923
|
+
if (!u.value) {
|
|
904
924
|
y();
|
|
905
925
|
return;
|
|
906
926
|
}
|
|
@@ -920,7 +940,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
920
940
|
(V = s.value) == null || V.focus(), (Y = s.value) == null || Y.setSelectionRange(A, A);
|
|
921
941
|
});
|
|
922
942
|
}, M = () => {
|
|
923
|
-
if (!
|
|
943
|
+
if (!u.value)
|
|
924
944
|
return;
|
|
925
945
|
const F = l.value[r.value];
|
|
926
946
|
F && D(F);
|
|
@@ -966,8 +986,8 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
966
986
|
disabled: F.disabled,
|
|
967
987
|
readonly: F.readonly,
|
|
968
988
|
"aria-label": F.ariaLabel,
|
|
969
|
-
"aria-expanded":
|
|
970
|
-
"aria-controls":
|
|
989
|
+
"aria-expanded": u.value,
|
|
990
|
+
"aria-controls": d,
|
|
971
991
|
"aria-autocomplete": "list",
|
|
972
992
|
onInput: w,
|
|
973
993
|
onChange: L,
|
|
@@ -976,7 +996,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
976
996
|
onKeydown: S
|
|
977
997
|
}, null, 40, pa),
|
|
978
998
|
ze(B("div", {
|
|
979
|
-
id:
|
|
999
|
+
id: d,
|
|
980
1000
|
class: "vf-mention-input__panel",
|
|
981
1001
|
role: "listbox"
|
|
982
1002
|
}, [
|
|
@@ -994,7 +1014,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
994
1014
|
B("span", null, j(Z.label), 1)
|
|
995
1015
|
], 42, ga))), 128)) : (c(), b("div", ha, j(F.emptyText), 1))
|
|
996
1016
|
], 512), [
|
|
997
|
-
[Se,
|
|
1017
|
+
[Se, u.value]
|
|
998
1018
|
])
|
|
999
1019
|
], 2));
|
|
1000
1020
|
}
|
|
@@ -1038,14 +1058,14 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1038
1058
|
const a = o, e = n, t = G(!1), i = G(!1), s = f(() => {
|
|
1039
1059
|
const y = ["vf-password-input", `vf-password-input_${e.variant}`];
|
|
1040
1060
|
return e.size !== "normal" && y.push(`vf-password-input_${e.size}`), e.disabled && y.push("vf-password-input_disabled"), y;
|
|
1041
|
-
}),
|
|
1061
|
+
}), u = f(() => {
|
|
1042
1062
|
const y = e.modelValue ?? "";
|
|
1043
1063
|
if (!y)
|
|
1044
1064
|
return "weak";
|
|
1045
1065
|
let z = 0;
|
|
1046
1066
|
return y.length >= 8 && (z += 1), /[a-z]/.test(y) && /[A-Z]/.test(y) && (z += 1), /\d/.test(y) && (z += 1), /[^a-zA-Z0-9]/.test(y) && (z += 1), z >= 4 ? "strong" : z >= 2 ? "medium" : "weak";
|
|
1047
|
-
}), r = f(() =>
|
|
1048
|
-
() => `vf-password-input__strength-fill vf-password-input__strength-fill_${
|
|
1067
|
+
}), r = f(() => u.value === "strong" ? 100 : u.value === "medium" ? 66 : 33), d = f(() => u.value === "strong" ? e.strongLabel : u.value === "medium" ? e.mediumLabel : e.weakLabel), v = f(
|
|
1068
|
+
() => `vf-password-input__strength-fill vf-password-input__strength-fill_${u.value}`
|
|
1049
1069
|
), p = (y) => {
|
|
1050
1070
|
const z = y.target;
|
|
1051
1071
|
a("update:modelValue", z.value), a("input", y);
|
|
@@ -1099,7 +1119,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1099
1119
|
style: ke({ width: `${r.value}%` })
|
|
1100
1120
|
}, null, 6)
|
|
1101
1121
|
]),
|
|
1102
|
-
B("span", Sa, j(
|
|
1122
|
+
B("span", Sa, j(d.value), 1)
|
|
1103
1123
|
])) : Q("", !0),
|
|
1104
1124
|
y.showCapsLockHint && i.value && !y.disabled ? (c(), b("p", Ba, j(y.capsLockHint), 1)) : Q("", !0)
|
|
1105
1125
|
], 2));
|
|
@@ -1122,18 +1142,18 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1122
1142
|
},
|
|
1123
1143
|
emits: ["update:modelValue", "change", "complete", "focus", "blur", "paste"],
|
|
1124
1144
|
setup(n, { emit: o }) {
|
|
1125
|
-
const a = o, e = n, t = G([]), i = f(() => Math.max(1, Math.floor(e.length))), s = f(() => e.alphanumeric ? /[0-9a-z]/i : /[0-9]/),
|
|
1145
|
+
const a = o, e = n, t = G([]), i = f(() => Math.max(1, Math.floor(e.length))), s = f(() => e.alphanumeric ? /[0-9a-z]/i : /[0-9]/), u = (C) => {
|
|
1126
1146
|
const g = `${C ?? ""}`;
|
|
1127
1147
|
let w = "";
|
|
1128
1148
|
for (const L of g)
|
|
1129
1149
|
s.value.test(L) && (w += L);
|
|
1130
1150
|
return w.slice(0, i.value);
|
|
1131
1151
|
}, r = f(() => {
|
|
1132
|
-
const C =
|
|
1152
|
+
const C = u(e.modelValue), g = Array.from({ length: i.value }, () => "");
|
|
1133
1153
|
for (let w = 0; w < C.length; w += 1)
|
|
1134
1154
|
g[w] = C[w];
|
|
1135
1155
|
return g;
|
|
1136
|
-
}),
|
|
1156
|
+
}), d = f(() => {
|
|
1137
1157
|
const C = ["vf-otp-input", `vf-otp-input_${e.variant}`];
|
|
1138
1158
|
return e.size !== "normal" && C.push(`vf-otp-input_${e.size}`), e.disabled && C.push("vf-otp-input_disabled"), C;
|
|
1139
1159
|
}), v = (C, g) => {
|
|
@@ -1145,7 +1165,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1145
1165
|
const g = C.join("");
|
|
1146
1166
|
a("update:modelValue", g), a("change", g), g.length === i.value && a("complete", g);
|
|
1147
1167
|
}, $ = (C, g) => {
|
|
1148
|
-
const w = [...r.value], L =
|
|
1168
|
+
const w = [...r.value], L = u(C);
|
|
1149
1169
|
let R = g;
|
|
1150
1170
|
for (let I = 0; I < L.length; I += 1) {
|
|
1151
1171
|
const O = g + I;
|
|
@@ -1188,7 +1208,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1188
1208
|
return Ve(() => {
|
|
1189
1209
|
e.autoFocus && !e.disabled && !e.readonly && p(0);
|
|
1190
1210
|
}), (C, g) => (c(), b("div", {
|
|
1191
|
-
class: ee(
|
|
1211
|
+
class: ee(d.value),
|
|
1192
1212
|
role: "group",
|
|
1193
1213
|
"aria-label": C.ariaLabel,
|
|
1194
1214
|
onPaste: _
|
|
@@ -1239,7 +1259,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1239
1259
|
},
|
|
1240
1260
|
emits: ["update:modelValue", "change", "open", "close"],
|
|
1241
1261
|
setup(n, { emit: o }) {
|
|
1242
|
-
const a = o, e = n, t = G(null), i = G(!1), s = G("#3b82f6"),
|
|
1262
|
+
const a = o, e = n, t = G(null), i = G(!1), s = G("#3b82f6"), u = G(100), r = (S, F, H) => Math.min(H, Math.max(F, S)), d = (S) => r(Math.round(S), 0, 255).toString(16).padStart(2, "0"), v = (S) => {
|
|
1243
1263
|
const F = S.trim().replace(/^#/, "");
|
|
1244
1264
|
if (![3, 4, 6, 8].includes(F.length))
|
|
1245
1265
|
return null;
|
|
@@ -1296,11 +1316,11 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1296
1316
|
const W = $(S, F, H);
|
|
1297
1317
|
return e.alpha ? `hsla(${W.h}, ${W.s}%, ${W.l}%, ${Z.toFixed(2)})` : `hsl(${W.h}, ${W.s}%, ${W.l}%)`;
|
|
1298
1318
|
}
|
|
1299
|
-
const x = `#${
|
|
1300
|
-
return e.alpha ? `${x}${
|
|
1319
|
+
const x = `#${d(S)}${d(F)}${d(H)}`;
|
|
1320
|
+
return e.alpha ? `${x}${d(Z * 255)}` : x;
|
|
1301
1321
|
}, y = (S) => {
|
|
1302
1322
|
const F = _(S);
|
|
1303
|
-
s.value = `#${
|
|
1323
|
+
s.value = `#${d(F.r)}${d(F.g)}${d(F.b)}`, u.value = Math.round(r(F.a, 0, 1) * 100);
|
|
1304
1324
|
};
|
|
1305
1325
|
ve(
|
|
1306
1326
|
() => e.modelValue,
|
|
@@ -1311,34 +1331,34 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1311
1331
|
);
|
|
1312
1332
|
const z = f(() => {
|
|
1313
1333
|
const S = _(s.value);
|
|
1314
|
-
return `rgba(${S.r}, ${S.g}, ${S.b}, ${e.alpha ?
|
|
1334
|
+
return `rgba(${S.r}, ${S.g}, ${S.b}, ${e.alpha ? u.value / 100 : 1})`;
|
|
1315
1335
|
}), C = f(() => {
|
|
1316
|
-
const S = _(s.value), F = e.alpha ?
|
|
1336
|
+
const S = _(s.value), F = e.alpha ? u.value / 100 : 1;
|
|
1317
1337
|
return k(S.r, S.g, S.b, F);
|
|
1318
1338
|
}), g = f(() => {
|
|
1319
1339
|
const S = ["vf-color-picker", `vf-color-picker_${e.variant}`];
|
|
1320
1340
|
return e.size !== "normal" && S.push(`vf-color-picker_${e.size}`), e.disabled && S.push("vf-color-picker_disabled"), S;
|
|
1321
1341
|
}), w = () => {
|
|
1322
|
-
const S = _(s.value), F = e.alpha ?
|
|
1342
|
+
const S = _(s.value), F = e.alpha ? u.value / 100 : 1, H = k(S.r, S.g, S.b, F);
|
|
1323
1343
|
a("update:modelValue", H), a("change", H);
|
|
1324
1344
|
}, L = (S) => {
|
|
1325
1345
|
const F = S.target;
|
|
1326
1346
|
s.value = F.value, w();
|
|
1327
1347
|
}, R = (S) => {
|
|
1328
1348
|
const F = S.target;
|
|
1329
|
-
|
|
1349
|
+
u.value = r(Number(F.value), 0, 100), w();
|
|
1330
1350
|
}, I = (S) => {
|
|
1331
1351
|
const F = S.target, H = _(F.value);
|
|
1332
1352
|
if (!H.valid) {
|
|
1333
1353
|
F.value = C.value;
|
|
1334
1354
|
return;
|
|
1335
1355
|
}
|
|
1336
|
-
s.value = `#${
|
|
1356
|
+
s.value = `#${d(H.r)}${d(H.g)}${d(H.b)}`, e.alpha && (u.value = Math.round(H.a * 100)), w();
|
|
1337
1357
|
}, O = (S) => {
|
|
1338
1358
|
if (e.disabled || e.readonly)
|
|
1339
1359
|
return;
|
|
1340
1360
|
const F = _(S);
|
|
1341
|
-
F.valid && (s.value = `#${
|
|
1361
|
+
F.valid && (s.value = `#${d(F.r)}${d(F.g)}${d(F.b)}`, e.alpha && (u.value = Math.round(F.a * 100)), w());
|
|
1342
1362
|
}, E = () => {
|
|
1343
1363
|
i.value && (i.value = !1, a("close"));
|
|
1344
1364
|
}, T = () => {
|
|
@@ -1388,10 +1408,10 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1388
1408
|
min: "0",
|
|
1389
1409
|
max: "100",
|
|
1390
1410
|
step: "1",
|
|
1391
|
-
value:
|
|
1411
|
+
value: u.value,
|
|
1392
1412
|
onInput: R
|
|
1393
1413
|
}, null, 40, Ra),
|
|
1394
|
-
B("span", Pa, j(
|
|
1414
|
+
B("span", Pa, j(u.value) + "%", 1)
|
|
1395
1415
|
])) : Q("", !0),
|
|
1396
1416
|
B("div", Ea, [
|
|
1397
1417
|
B("input", {
|
|
@@ -1439,9 +1459,9 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1439
1459
|
"#": /\d/,
|
|
1440
1460
|
A: /[a-zA-Z]/,
|
|
1441
1461
|
"*": /[a-zA-Z0-9]/
|
|
1442
|
-
}, i = f(() => typeof e.mask == "string" ? e.mask : ""), s = f(() => typeof e.mask == "function" ? e.mask : null),
|
|
1462
|
+
}, i = f(() => typeof e.mask == "string" ? e.mask : ""), s = f(() => typeof e.mask == "function" ? e.mask : null), u = f(() => i.value.split("").filter((w) => !!t[w])), r = f(() => u.value.length), d = (w) => `${w ?? ""}`.replace(/\s+/g, ""), v = (w) => {
|
|
1443
1463
|
if (!i.value)
|
|
1444
|
-
return
|
|
1464
|
+
return d(w);
|
|
1445
1465
|
const L = `${w ?? ""}`.split(""), R = i.value.split(""), I = [];
|
|
1446
1466
|
let O = 0, E = 0;
|
|
1447
1467
|
for (; O < R.length && E < L.length; ) {
|
|
@@ -1485,7 +1505,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1485
1505
|
I < L.length && (O += E);
|
|
1486
1506
|
}
|
|
1487
1507
|
return O;
|
|
1488
|
-
}, m = (w) => s.value ?
|
|
1508
|
+
}, m = (w) => s.value ? d(w) : v(w), $ = (w) => s.value ? s.value(w) : p(w), l = f(() => {
|
|
1489
1509
|
const w = `${e.modelValue ?? ""}`;
|
|
1490
1510
|
return e.mask ? e.unmask ? $(m(w)) : s.value ? w : $(m(w)) : w;
|
|
1491
1511
|
}), _ = (w) => i.value ? w.length === r.value : !1, k = f(() => {
|
|
@@ -1546,31 +1566,31 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1546
1566
|
},
|
|
1547
1567
|
emits: ["update:modelValue", "input", "change", "focus", "blur"],
|
|
1548
1568
|
setup(n, { emit: o }) {
|
|
1549
|
-
const a = o, e = n, t = f(() => typeof e.min == "number" && Number.isFinite(e.min) ? e.min : void 0), i = f(() => typeof e.max == "number" && Number.isFinite(e.max) ? e.max : void 0), s = f(() => e.step && e.step > 0 ? e.step : 1),
|
|
1569
|
+
const a = o, e = n, t = f(() => typeof e.min == "number" && Number.isFinite(e.min) ? e.min : void 0), i = f(() => typeof e.max == "number" && Number.isFinite(e.max) ? e.max : void 0), s = f(() => e.step && e.step > 0 ? e.step : 1), u = (C) => (typeof t.value == "number" && (C = Math.max(t.value, C)), typeof i.value == "number" && (C = Math.min(i.value, C)), C), r = (C) => {
|
|
1550
1570
|
if (typeof e.precision != "number" || !Number.isFinite(e.precision))
|
|
1551
1571
|
return C;
|
|
1552
1572
|
const g = Math.max(0, Math.floor(e.precision));
|
|
1553
1573
|
return Number.parseFloat(C.toFixed(g));
|
|
1554
|
-
},
|
|
1574
|
+
}, d = (C) => {
|
|
1555
1575
|
if (!C.trim())
|
|
1556
1576
|
return null;
|
|
1557
1577
|
const g = Number(C);
|
|
1558
|
-
return Number.isFinite(g) ? r(
|
|
1578
|
+
return Number.isFinite(g) ? r(u(g)) : null;
|
|
1559
1579
|
}, v = f(() => e.modelValue === null || e.modelValue === void 0 || !Number.isFinite(e.modelValue) ? "" : `${e.modelValue}`), p = f(() => {
|
|
1560
1580
|
const C = ["vf-number-input", `vf-number-input_${e.variant}`];
|
|
1561
1581
|
return e.size !== "normal" && C.push(`vf-number-input_${e.size}`), e.disabled && C.push("vf-number-input_disabled"), e.controls && C.push("vf-number-input_controls"), C;
|
|
1562
1582
|
}), m = (C) => {
|
|
1563
|
-
const g = C.target, w =
|
|
1583
|
+
const g = C.target, w = d(g.value);
|
|
1564
1584
|
a("update:modelValue", w), a("input", C);
|
|
1565
1585
|
}, $ = (C) => a("change", C), l = (C) => a("focus", C), _ = (C) => a("blur", C), k = () => Number.isFinite(e.modelValue) ? e.modelValue : typeof t.value == "number" ? t.value : 0, y = () => {
|
|
1566
1586
|
if (e.disabled || e.readonly)
|
|
1567
1587
|
return;
|
|
1568
|
-
const C = r(
|
|
1588
|
+
const C = r(u(k() + s.value));
|
|
1569
1589
|
a("update:modelValue", C);
|
|
1570
1590
|
}, z = () => {
|
|
1571
1591
|
if (e.disabled || e.readonly)
|
|
1572
1592
|
return;
|
|
1573
|
-
const C = r(
|
|
1593
|
+
const C = r(u(k() - s.value));
|
|
1574
1594
|
a("update:modelValue", C);
|
|
1575
1595
|
};
|
|
1576
1596
|
return (C, g) => (c(), b("div", {
|
|
@@ -1643,7 +1663,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1643
1663
|
"reset"
|
|
1644
1664
|
],
|
|
1645
1665
|
setup(n, { emit: o }) {
|
|
1646
|
-
const a = n, e = o, t = G(null), i = G(D(S(a.initialValues, a.modelValue))), s = G(D(i.value)),
|
|
1666
|
+
const a = n, e = o, t = G(null), i = G(D(S(a.initialValues, a.modelValue))), s = G(D(i.value)), u = G({}), r = G({}), d = G(!1);
|
|
1647
1667
|
ve(
|
|
1648
1668
|
() => a.modelValue,
|
|
1649
1669
|
(h) => {
|
|
@@ -1666,8 +1686,8 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1666
1686
|
[h]: P
|
|
1667
1687
|
}, e("update:modelValue", D(s.value)), K.emitChange !== !1 && e("change", D(s.value), h, P));
|
|
1668
1688
|
}, _ = (h, P = !0) => {
|
|
1669
|
-
h && (
|
|
1670
|
-
...
|
|
1689
|
+
h && (u.value = {
|
|
1690
|
+
...u.value,
|
|
1671
1691
|
[h]: P
|
|
1672
1692
|
});
|
|
1673
1693
|
}, k = (h, P = "") => {
|
|
@@ -1676,10 +1696,10 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1676
1696
|
const K = { ...r.value };
|
|
1677
1697
|
P ? K[h] = P : delete K[h], r.value = K;
|
|
1678
1698
|
}, y = () => {
|
|
1679
|
-
const h = { ...
|
|
1699
|
+
const h = { ...u.value };
|
|
1680
1700
|
for (const P in s.value)
|
|
1681
1701
|
h[P] = !0;
|
|
1682
|
-
|
|
1702
|
+
u.value = h;
|
|
1683
1703
|
}, z = (h) => v.value.has(h), C = async (h = "submit") => {
|
|
1684
1704
|
if (!a.validate)
|
|
1685
1705
|
return h !== "submit" && e("validate", {}, D(s.value), h), !0;
|
|
@@ -1687,7 +1707,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1687
1707
|
return r.value = K, e("validate", D(K), D(s.value), h), !Object.keys(K).length;
|
|
1688
1708
|
}, g = async (h) => {
|
|
1689
1709
|
if (!a.disabled) {
|
|
1690
|
-
|
|
1710
|
+
d.value = !0, y();
|
|
1691
1711
|
try {
|
|
1692
1712
|
const P = await C("submit"), K = D(s.value);
|
|
1693
1713
|
if (!P) {
|
|
@@ -1706,11 +1726,11 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1706
1726
|
r.value = Y, e("submitError", A, D(Y), K, h), e("invalidSubmit", D(Y), K, h);
|
|
1707
1727
|
}
|
|
1708
1728
|
} finally {
|
|
1709
|
-
|
|
1729
|
+
d.value = !1;
|
|
1710
1730
|
}
|
|
1711
1731
|
}
|
|
1712
1732
|
}, w = (h) => {
|
|
1713
|
-
a.disabled || (s.value = D(i.value),
|
|
1733
|
+
a.disabled || (s.value = D(i.value), u.value = {}, r.value = {}, e("update:modelValue", D(s.value)), e("reset", D(s.value), h));
|
|
1714
1734
|
}, L = async (h) => {
|
|
1715
1735
|
await g(h);
|
|
1716
1736
|
}, R = (h) => {
|
|
@@ -1837,10 +1857,10 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1837
1857
|
q(h.$slots, "default", {
|
|
1838
1858
|
values: s.value,
|
|
1839
1859
|
errors: r.value,
|
|
1840
|
-
touched:
|
|
1860
|
+
touched: u.value,
|
|
1841
1861
|
isValid: p.value,
|
|
1842
1862
|
isDirty: m.value,
|
|
1843
|
-
isSubmitting:
|
|
1863
|
+
isSubmitting: d.value,
|
|
1844
1864
|
setFieldValue: l,
|
|
1845
1865
|
setFieldTouched: _,
|
|
1846
1866
|
setFieldError: k,
|
|
@@ -1866,17 +1886,17 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1866
1886
|
size: { default: "normal" }
|
|
1867
1887
|
},
|
|
1868
1888
|
setup(n) {
|
|
1869
|
-
const o = n, a = Xe(), e = `vf-form-field-${Math.random().toString(36).slice(2, 10)}`, t = f(() => o.id || e), i = f(() => `${t.value}-hint`), s = f(() => `${t.value}-error`),
|
|
1889
|
+
const o = n, a = Xe(), e = `vf-form-field-${Math.random().toString(36).slice(2, 10)}`, t = f(() => o.id || e), i = f(() => `${t.value}-hint`), s = f(() => `${t.value}-error`), u = f(() => !!o.label || !!a.label), r = f(() => !!o.hint || !!a.hint), d = f(() => !!o.error || !!a.error), v = f(() => {
|
|
1870
1890
|
const m = [];
|
|
1871
|
-
return r.value && m.push(i.value),
|
|
1891
|
+
return r.value && m.push(i.value), d.value && m.push(s.value), m.length ? m.join(" ") : void 0;
|
|
1872
1892
|
}), p = f(() => {
|
|
1873
1893
|
const m = ["vf-form-field"];
|
|
1874
|
-
return o.size !== "normal" && m.push(`vf-form-field_${o.size}`), o.disabled && m.push("vf-form-field_disabled"),
|
|
1894
|
+
return o.size !== "normal" && m.push(`vf-form-field_${o.size}`), o.disabled && m.push("vf-form-field_disabled"), d.value && m.push("vf-form-field_invalid"), m;
|
|
1875
1895
|
});
|
|
1876
1896
|
return (m, $) => (c(), b("div", {
|
|
1877
1897
|
class: ee(p.value)
|
|
1878
1898
|
}, [
|
|
1879
|
-
|
|
1899
|
+
u.value ? (c(), b("label", {
|
|
1880
1900
|
key: 0,
|
|
1881
1901
|
class: "vf-form-field__label",
|
|
1882
1902
|
for: t.value
|
|
@@ -1890,8 +1910,10 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1890
1910
|
q(m.$slots, "default", {
|
|
1891
1911
|
id: t.value,
|
|
1892
1912
|
describedBy: v.value,
|
|
1893
|
-
invalid:
|
|
1894
|
-
required: m.required
|
|
1913
|
+
invalid: d.value,
|
|
1914
|
+
required: m.required,
|
|
1915
|
+
ariaInvalid: d.value ? "true" : void 0,
|
|
1916
|
+
ariaRequired: m.required ? "true" : void 0
|
|
1895
1917
|
})
|
|
1896
1918
|
]),
|
|
1897
1919
|
r.value ? (c(), b("p", {
|
|
@@ -1903,7 +1925,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1903
1925
|
me(j(m.hint), 1)
|
|
1904
1926
|
])
|
|
1905
1927
|
], 8, to)) : Q("", !0),
|
|
1906
|
-
|
|
1928
|
+
d.value ? (c(), b("p", {
|
|
1907
1929
|
key: 2,
|
|
1908
1930
|
id: s.value,
|
|
1909
1931
|
class: "vf-form-field__error",
|
|
@@ -1929,25 +1951,25 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1929
1951
|
emits: ["update:modelValue", "input", "change", "focus", "blur"],
|
|
1930
1952
|
setup(n, { emit: o }) {
|
|
1931
1953
|
const a = o, e = n, t = f(() => {
|
|
1932
|
-
const
|
|
1933
|
-
return e.size !== "normal" &&
|
|
1934
|
-
}), i = (
|
|
1935
|
-
const v =
|
|
1936
|
-
a("update:modelValue", v.value), a("input",
|
|
1937
|
-
}, s = (
|
|
1938
|
-
return (
|
|
1954
|
+
const d = ["vf-textarea", `vf-textarea_${e.variant}`];
|
|
1955
|
+
return e.size !== "normal" && d.push(`vf-textarea_${e.size}`), e.disabled && d.push("vf-textarea_disabled"), d;
|
|
1956
|
+
}), i = (d) => {
|
|
1957
|
+
const v = d.target;
|
|
1958
|
+
a("update:modelValue", v.value), a("input", d);
|
|
1959
|
+
}, s = (d) => a("change", d), u = (d) => a("focus", d), r = (d) => a("blur", d);
|
|
1960
|
+
return (d, v) => (c(), b("div", {
|
|
1939
1961
|
class: ee(t.value)
|
|
1940
1962
|
}, [
|
|
1941
1963
|
B("textarea", {
|
|
1942
1964
|
class: "vf-textarea__control",
|
|
1943
|
-
value:
|
|
1944
|
-
placeholder:
|
|
1945
|
-
disabled:
|
|
1946
|
-
readonly:
|
|
1947
|
-
rows:
|
|
1965
|
+
value: d.modelValue,
|
|
1966
|
+
placeholder: d.placeholder,
|
|
1967
|
+
disabled: d.disabled,
|
|
1968
|
+
readonly: d.readonly,
|
|
1969
|
+
rows: d.rows,
|
|
1948
1970
|
onInput: i,
|
|
1949
1971
|
onChange: s,
|
|
1950
|
-
onFocus:
|
|
1972
|
+
onFocus: u,
|
|
1951
1973
|
onBlur: r
|
|
1952
1974
|
}, null, 40, oo)
|
|
1953
1975
|
], 2));
|
|
@@ -1974,7 +1996,7 @@ const Ut = /* @__PURE__ */ Wt(Kt, [["render", Xt]]), rc = /* @__PURE__ */ ne({
|
|
|
1974
1996
|
const a = n, e = o, t = G(null), i = f(() => {
|
|
1975
1997
|
const g = ["vf-rich-text-editor", `vf-rich-text-editor_${a.variant}`];
|
|
1976
1998
|
return a.size !== "normal" && g.push(`vf-rich-text-editor_${a.size}`), a.disabled && g.push("vf-rich-text-editor_disabled"), g;
|
|
1977
|
-
}), s = f(() => a.toolbar.filter(Boolean)),
|
|
1999
|
+
}), s = f(() => a.toolbar.filter(Boolean)), u = f(() => (a.modelValue ?? "").length), r = f(() => a.maxLength > 0), d = f(() => a.maxLength > 0 && u.value >= a.maxLength), v = (g) => {
|
|
1978
2000
|
switch (g) {
|
|
1979
2001
|
case "bold":
|
|
1980
2002
|
return "Bold";
|
|
@@ -2087,8 +2109,8 @@ ${w}
|
|
|
2087
2109
|
}, null, 40, no),
|
|
2088
2110
|
r.value ? (c(), b("div", {
|
|
2089
2111
|
key: 1,
|
|
2090
|
-
class: ee(["vf-rich-text-editor__counter", { "is-limit":
|
|
2091
|
-
}, j(
|
|
2112
|
+
class: ee(["vf-rich-text-editor__counter", { "is-limit": d.value }])
|
|
2113
|
+
}, j(u.value) + " / " + j(g.maxLength), 3)) : Q("", !0)
|
|
2092
2114
|
], 2));
|
|
2093
2115
|
}
|
|
2094
2116
|
}), so = ["accept", "multiple", "disabled"], io = ["tabindex", "aria-disabled", "onKeydown"], uo = { class: "vf-file-upload__content" }, co = {
|
|
@@ -2114,14 +2136,14 @@ ${w}
|
|
|
2114
2136
|
},
|
|
2115
2137
|
emits: ["update:modelValue", "change", "reject", "focus", "blur"],
|
|
2116
2138
|
setup(n, { emit: o }) {
|
|
2117
|
-
const a = o, e = n, t = G(null), i = G(null), s = G(!1),
|
|
2139
|
+
const a = o, e = n, t = G(null), i = G(null), s = G(!1), u = f(() => Array.isArray(e.modelValue) ? e.modelValue : e.modelValue instanceof File ? [e.modelValue] : []), r = f(() => {
|
|
2118
2140
|
const L = [
|
|
2119
2141
|
"vf-file-upload",
|
|
2120
2142
|
`vf-file-upload_${e.variant}`,
|
|
2121
2143
|
s.value ? "vf-file-upload_dragging" : ""
|
|
2122
2144
|
];
|
|
2123
2145
|
return e.size !== "normal" && L.push(`vf-file-upload_${e.size}`), (e.disabled || e.readonly) && L.push("vf-file-upload_disabled"), L.filter(Boolean);
|
|
2124
|
-
}),
|
|
2146
|
+
}), d = (L, R) => `${L.name}-${L.size}-${L.lastModified}-${R}`, v = (L) => {
|
|
2125
2147
|
if (!Number.isFinite(L))
|
|
2126
2148
|
return "";
|
|
2127
2149
|
const R = ["B", "KB", "MB", "GB"];
|
|
@@ -2154,7 +2176,7 @@ ${w}
|
|
|
2154
2176
|
}, $ = (L) => {
|
|
2155
2177
|
if (e.disabled || e.readonly)
|
|
2156
2178
|
return;
|
|
2157
|
-
const R = e.multiple ?
|
|
2179
|
+
const R = e.multiple ? u.value : [], I = e.multiple ? R.concat(L) : L, { accepted: O, rejected: E } = m(I);
|
|
2158
2180
|
p(O), E.length > 0 && a("reject", E);
|
|
2159
2181
|
}, l = () => {
|
|
2160
2182
|
var L;
|
|
@@ -2176,7 +2198,7 @@ ${w}
|
|
|
2176
2198
|
}, C = (L) => {
|
|
2177
2199
|
if (e.disabled || e.readonly)
|
|
2178
2200
|
return;
|
|
2179
|
-
const R =
|
|
2201
|
+
const R = u.value.filter((I, O) => O !== L);
|
|
2180
2202
|
p(R);
|
|
2181
2203
|
}, g = (L) => a("focus", L), w = (L) => a("blur", L);
|
|
2182
2204
|
return (L, R) => (c(), b("div", {
|
|
@@ -2211,9 +2233,9 @@ ${w}
|
|
|
2211
2233
|
onBlur: w
|
|
2212
2234
|
}, [
|
|
2213
2235
|
B("div", uo, [
|
|
2214
|
-
|
|
2215
|
-
(c(!0), b(fe, null, he(
|
|
2216
|
-
key:
|
|
2236
|
+
u.value.length === 0 ? (c(), b("span", co, j(L.placeholder), 1)) : (c(), b("div", vo, [
|
|
2237
|
+
(c(!0), b(fe, null, he(u.value, (I, O) => (c(), b("div", {
|
|
2238
|
+
key: d(I, O),
|
|
2217
2239
|
class: "vf-file-upload__item"
|
|
2218
2240
|
}, [
|
|
2219
2241
|
B("span", fo, j(I.name), 1),
|
|
@@ -2266,9 +2288,9 @@ function bo(n) {
|
|
|
2266
2288
|
const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke = (n, o) => ho(n, o) === "fixed", Fe = (n, o, a = {}) => {
|
|
2267
2289
|
const e = n.getBoundingClientRect(), t = o ? o.offsetParent : null, i = o ? Ke(a, o) : !1;
|
|
2268
2290
|
if (t && !i) {
|
|
2269
|
-
const s = t.getBoundingClientRect(),
|
|
2291
|
+
const s = t.getBoundingClientRect(), u = t.scrollLeft, r = t.scrollTop;
|
|
2270
2292
|
return {
|
|
2271
|
-
left: e.left - s.left +
|
|
2293
|
+
left: e.left - s.left + u,
|
|
2272
2294
|
top: e.top - s.top + r,
|
|
2273
2295
|
width: e.width,
|
|
2274
2296
|
height: e.height
|
|
@@ -2334,11 +2356,11 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
2334
2356
|
reference: i,
|
|
2335
2357
|
scrollDirection: s
|
|
2336
2358
|
}) => {
|
|
2337
|
-
const
|
|
2359
|
+
const u = at(i, e, t, n), r = je(n, "offset");
|
|
2338
2360
|
if (r) {
|
|
2339
|
-
const
|
|
2340
|
-
x:
|
|
2341
|
-
y:
|
|
2361
|
+
const d = r.fn({
|
|
2362
|
+
x: u.x,
|
|
2363
|
+
y: u.y,
|
|
2342
2364
|
options: n,
|
|
2343
2365
|
primaryX: o,
|
|
2344
2366
|
primaryY: a,
|
|
@@ -2347,11 +2369,11 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
2347
2369
|
reference: i,
|
|
2348
2370
|
scrollDirection: s
|
|
2349
2371
|
});
|
|
2350
|
-
|
|
2372
|
+
u.x = d.x, u.y = d.y;
|
|
2351
2373
|
}
|
|
2352
|
-
return Do(
|
|
2353
|
-
x:
|
|
2354
|
-
y:
|
|
2374
|
+
return Do(u, e, i, n) ? {
|
|
2375
|
+
x: u.x,
|
|
2376
|
+
y: u.y,
|
|
2355
2377
|
placement: t
|
|
2356
2378
|
} : !1;
|
|
2357
2379
|
}, Te = (n) => ({
|
|
@@ -2364,15 +2386,15 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
2364
2386
|
primaryX: t,
|
|
2365
2387
|
primaryY: i,
|
|
2366
2388
|
floating: s,
|
|
2367
|
-
placement:
|
|
2389
|
+
placement: u,
|
|
2368
2390
|
reference: r,
|
|
2369
|
-
scrollDirection:
|
|
2391
|
+
scrollDirection: d
|
|
2370
2392
|
}) => {
|
|
2371
2393
|
var v;
|
|
2372
2394
|
const p = {
|
|
2373
2395
|
x: o,
|
|
2374
2396
|
y: a,
|
|
2375
|
-
placement:
|
|
2397
|
+
placement: u
|
|
2376
2398
|
}, m = {
|
|
2377
2399
|
...e,
|
|
2378
2400
|
middleware: (v = e.middleware) == null ? void 0 : v.filter((C) => C.name !== "shift")
|
|
@@ -2388,11 +2410,11 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
2388
2410
|
floating: s,
|
|
2389
2411
|
placement: C,
|
|
2390
2412
|
reference: r,
|
|
2391
|
-
scrollDirection:
|
|
2413
|
+
scrollDirection: d
|
|
2392
2414
|
});
|
|
2393
2415
|
g && (p.x = g.x, p.y = g.y, p.placement = g.placement, k = !0);
|
|
2394
2416
|
}, z = Ro(r, s, m);
|
|
2395
|
-
if (!l && $.includes(
|
|
2417
|
+
if (!l && $.includes(u) && y(u), k || _.forEach(y), !k) {
|
|
2396
2418
|
const C = $.reduce(
|
|
2397
2419
|
(g, w) => {
|
|
2398
2420
|
const L = pt({
|
|
@@ -2402,7 +2424,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
2402
2424
|
floating: s,
|
|
2403
2425
|
placement: w,
|
|
2404
2426
|
reference: r,
|
|
2405
|
-
scrollDirection:
|
|
2427
|
+
scrollDirection: d
|
|
2406
2428
|
});
|
|
2407
2429
|
if (!L)
|
|
2408
2430
|
return g;
|
|
@@ -2414,13 +2436,13 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
2414
2436
|
C && (p.x = C.result.x, p.y = C.result.y, p.placement = C.result.placement, k = !0);
|
|
2415
2437
|
}
|
|
2416
2438
|
if (!k && $.length > 0) {
|
|
2417
|
-
const C = Je(
|
|
2439
|
+
const C = Je(u);
|
|
2418
2440
|
let g = C, w = z[C];
|
|
2419
2441
|
$.forEach((O) => {
|
|
2420
2442
|
const E = Je(O), T = z[E];
|
|
2421
2443
|
T > w && (w = T, g = E);
|
|
2422
2444
|
});
|
|
2423
|
-
const L = Mo(g,
|
|
2445
|
+
const L = Mo(g, u, $), R = at(r, s, L, m), I = je(m, "offset");
|
|
2424
2446
|
if (I) {
|
|
2425
2447
|
const O = I.fn({
|
|
2426
2448
|
x: R.x,
|
|
@@ -2431,7 +2453,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
2431
2453
|
floating: s,
|
|
2432
2454
|
placement: L,
|
|
2433
2455
|
reference: r,
|
|
2434
|
-
scrollDirection:
|
|
2456
|
+
scrollDirection: d
|
|
2435
2457
|
});
|
|
2436
2458
|
R.x = O.x, R.y = O.y;
|
|
2437
2459
|
}
|
|
@@ -2440,34 +2462,34 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
2440
2462
|
return p;
|
|
2441
2463
|
}
|
|
2442
2464
|
}), _t = (n, o, a, e, t) => {
|
|
2443
|
-
var i, s,
|
|
2465
|
+
var i, s, u;
|
|
2444
2466
|
let r = 0;
|
|
2445
2467
|
e.startsWith("right") ? r = -n : e.startsWith("left") && (r = n);
|
|
2446
|
-
const
|
|
2447
|
-
if (
|
|
2448
|
-
const p = ((i =
|
|
2468
|
+
const d = je(o, "arrow"), v = je(o, "shift");
|
|
2469
|
+
if (d) {
|
|
2470
|
+
const p = ((i = d.params) == null ? void 0 : i.arrow).getBoundingClientRect();
|
|
2449
2471
|
e.startsWith("right") ? r -= p.width / 2 : e.startsWith("left") && (r += p.width / 2);
|
|
2450
2472
|
}
|
|
2451
|
-
if (yt(o, "shift") &&
|
|
2473
|
+
if (yt(o, "shift") && d) {
|
|
2452
2474
|
let p = null, m = 0;
|
|
2453
2475
|
v && (p = (s = v.params) == null ? void 0 : s.parent);
|
|
2454
|
-
const $ = (
|
|
2476
|
+
const $ = (u = d.params) == null ? void 0 : u.arrow;
|
|
2455
2477
|
m = $.getBoundingClientRect().width / 2, m += _o($), m -= n, e.startsWith("right") ? Pe(a - r, t, p, o) <= n ? Pe(a, t, p, o) > 0 ? r = n - Pe(a, t, p, o) : r = n : Ee(a - r - m, t, p, o) <= n && (Ee(a - r - m, t, p, o) >= 0 ? (r = -n - (Ee(a - r - m, t, p, o) + n), p && (r = -n)) : r = -n) : e.startsWith("left") ? Pe(a - r + m, t, p, o) <= n ? (r = n + Pe(a - m, t, p, o), r <= n && (r = n)) : Ee(a - r, t, p, o) <= n && (r = -n + Ee(a, t, p, o), r <= -n && (r = -n)) : Pe(a - r, t, p, o) <= n ? Pe(a - r, t, p, o) <= n && Pe(a, t, p, o) > 0 ? r = n - Pe(a, t, p, o) : r = n : Ee(a - r, t, p, o) <= n && (Ee(a - r, t, p, o) <= n && Ee(a, t, p, o) > 0 ? r = -(n - Ee(a, t, p, o)) : r = -n);
|
|
2456
2478
|
}
|
|
2457
2479
|
return r;
|
|
2458
2480
|
}, kt = (n, o, a, e, t) => {
|
|
2459
|
-
var i, s,
|
|
2481
|
+
var i, s, u;
|
|
2460
2482
|
let r = 0;
|
|
2461
2483
|
e.startsWith("top") ? r = n : e.startsWith("bottom") && (r = -n);
|
|
2462
|
-
const
|
|
2463
|
-
if (
|
|
2464
|
-
const p = ((i =
|
|
2484
|
+
const d = je(o, "arrow"), v = je(o, "shift");
|
|
2485
|
+
if (d) {
|
|
2486
|
+
const p = ((i = d.params) == null ? void 0 : i.arrow).getBoundingClientRect();
|
|
2465
2487
|
e.startsWith("top") ? r += p.height / 2 : e.startsWith("bottom") && (r -= p.height / 2);
|
|
2466
2488
|
}
|
|
2467
|
-
if (yt(o, "shift") &&
|
|
2489
|
+
if (yt(o, "shift") && d) {
|
|
2468
2490
|
let p = null, m = 0;
|
|
2469
2491
|
v && (p = (s = v.params) == null ? void 0 : s.parent);
|
|
2470
|
-
const $ = (
|
|
2492
|
+
const $ = (u = d.params) == null ? void 0 : u.arrow;
|
|
2471
2493
|
m = $.getBoundingClientRect().height / 2, m += ko($), m -= n, e.startsWith("top") ? Re(a - r, t, p, o) <= n ? Re(a, t, p, o) >= 0 ? r = -(n - Re(a, t, p, o)) : r = -n : Ae(a - r + m, t, p, o) <= n && (r = n + Ae(a - m, t, p, o), r <= n && (r = n)) : e.startsWith("bottom") ? Re(a - r - m, t, p, o) <= n ? Re(a - r - m, t, p, o) >= 0 ? (r = -n - (Re(a - r - m, t, p, o) + n), p && (r = -n)) : r = -n : Ae(a - r, t, p, o) <= n && (Ae(a, t, p, o) >= 0 ? r = n - Ae(a, t, p, o) : r = n) : Re(a - r, t, p, o) <= n ? Re(a - r, t, p, o) >= 0 ? r = -(n - Re(a - r, t, p, o)) : r = -n : Ae(a - r, t, p, o) <= n && (Ae(a - r, t, p, o) >= 0 ? r = n - Ae(a - r, t, p, o) : r = n);
|
|
2472
2494
|
}
|
|
2473
2495
|
return r;
|
|
@@ -2481,11 +2503,11 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
2481
2503
|
primaryX: t,
|
|
2482
2504
|
primaryY: i,
|
|
2483
2505
|
floating: s,
|
|
2484
|
-
placement:
|
|
2506
|
+
placement: u
|
|
2485
2507
|
}) => ({
|
|
2486
|
-
x: o - _t(n, e, t,
|
|
2487
|
-
y: a - kt(n, e, i,
|
|
2488
|
-
placement:
|
|
2508
|
+
x: o - _t(n, e, t, u, s),
|
|
2509
|
+
y: a - kt(n, e, i, u, s),
|
|
2510
|
+
placement: u
|
|
2489
2511
|
})
|
|
2490
2512
|
}), Ct = (n) => ({
|
|
2491
2513
|
name: "shift",
|
|
@@ -2497,15 +2519,15 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
2497
2519
|
primaryX: t,
|
|
2498
2520
|
primaryY: i,
|
|
2499
2521
|
floating: s,
|
|
2500
|
-
placement:
|
|
2522
|
+
placement: u,
|
|
2501
2523
|
reference: r
|
|
2502
2524
|
}) => {
|
|
2503
|
-
var
|
|
2525
|
+
var d;
|
|
2504
2526
|
const v = {
|
|
2505
2527
|
x: o,
|
|
2506
2528
|
y: a,
|
|
2507
|
-
placement:
|
|
2508
|
-
}, p = e.middleware || [], m = p.findIndex((T) => T.name === "shift"), $ = p.findIndex((T) => T.name === "offset"), l = $ !== -1 && (m === -1 || $ > m), _ = p.find((T) => T.name === "offset"), k = _ ? (
|
|
2529
|
+
placement: u
|
|
2530
|
+
}, p = e.middleware || [], m = p.findIndex((T) => T.name === "shift"), $ = p.findIndex((T) => T.name === "offset"), l = $ !== -1 && (m === -1 || $ > m), _ = p.find((T) => T.name === "offset"), k = _ ? (d = _.params) == null ? void 0 : d.value : 0, y = l ? _t(k, e, t, u, s) : 0, z = l ? kt(k, e, i, u, s) : 0, C = o - y, g = a - z;
|
|
2509
2531
|
let w = C, L = g;
|
|
2510
2532
|
const R = _ ? Math.abs(k) : 0, I = R, O = R;
|
|
2511
2533
|
if (Ke(e, s) && typeof window < "u") {
|
|
@@ -2673,8 +2695,8 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
2673
2695
|
const p = s.getBoundingClientRect(), m = p.left + n.x, $ = p.top + n.y, l = m + o.clientWidth, _ = $ + o.clientHeight;
|
|
2674
2696
|
return m >= 0 && $ >= 0 && l <= t && _ <= i;
|
|
2675
2697
|
}
|
|
2676
|
-
const
|
|
2677
|
-
return
|
|
2698
|
+
const u = n.x, r = n.y, d = u + o.clientWidth, v = r + o.clientHeight;
|
|
2699
|
+
return u >= 0 && r >= 0 && d <= t && v <= i;
|
|
2678
2700
|
}, Je = (n) => n.startsWith("right") ? "right" : n.startsWith("left") ? "left" : n.startsWith("top") ? "top" : "bottom", Mo = (n, o, a) => Je(o) === n && a.includes(o) ? o : a.find((e) => Je(e) === n) ?? a[0], Ro = (n, o, a = {}) => {
|
|
2679
2701
|
if (typeof window > "u")
|
|
2680
2702
|
return {
|
|
@@ -2697,36 +2719,36 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
2697
2719
|
};
|
|
2698
2720
|
}, Me = (n, o, a = {}) => new Promise((e) => {
|
|
2699
2721
|
var t, i;
|
|
2700
|
-
const s = a.placement ? a.placement : "bottom",
|
|
2722
|
+
const s = a.placement ? a.placement : "bottom", u = {
|
|
2701
2723
|
x: 0,
|
|
2702
2724
|
y: 0,
|
|
2703
2725
|
placement: s,
|
|
2704
2726
|
middlewareData: {}
|
|
2705
2727
|
}, r = at(n, o, s, a);
|
|
2706
|
-
|
|
2707
|
-
const
|
|
2728
|
+
u.x = r.x, u.y = r.y, u.placement = r.placement;
|
|
2729
|
+
const d = u.x, v = u.y, p = yo(n);
|
|
2708
2730
|
(t = a.middleware) == null || t.forEach((_) => {
|
|
2709
2731
|
const k = _.fn({
|
|
2710
|
-
x:
|
|
2711
|
-
y:
|
|
2732
|
+
x: u.x,
|
|
2733
|
+
y: u.y,
|
|
2712
2734
|
options: a,
|
|
2713
|
-
primaryX:
|
|
2735
|
+
primaryX: d,
|
|
2714
2736
|
primaryY: v,
|
|
2715
2737
|
floating: o,
|
|
2716
|
-
placement:
|
|
2738
|
+
placement: u.placement,
|
|
2717
2739
|
reference: n,
|
|
2718
2740
|
scrollDirection: p
|
|
2719
2741
|
});
|
|
2720
|
-
|
|
2742
|
+
u.x = k.x, u.y = k.y, u.placement = k.placement, _.name === "arrow" && (k.baseX = k.x, k.baseY = k.y, k.x = k.arrowX ?? k.x, k.y = k.arrowY ?? k.y), u.middlewareData[_.name] = k;
|
|
2721
2743
|
});
|
|
2722
|
-
const m = at(n, o,
|
|
2723
|
-
if (Number.isFinite(
|
|
2744
|
+
const m = at(n, o, u.placement, a), $ = je(a, "offset"), l = $ ? (i = $.params) == null ? void 0 : i.value : 0;
|
|
2745
|
+
if (Number.isFinite(u.x) || (u.x = m.x), !Number.isFinite(u.y))
|
|
2724
2746
|
if (Ke(a, o)) {
|
|
2725
2747
|
const _ = n.getBoundingClientRect(), k = o.getBoundingClientRect().height;
|
|
2726
|
-
|
|
2748
|
+
u.placement.startsWith("top") ? u.y = _.top - k - l : u.placement.startsWith("bottom") ? u.y = _.bottom + l : u.y = m.y;
|
|
2727
2749
|
} else
|
|
2728
|
-
|
|
2729
|
-
e(
|
|
2750
|
+
u.y = m.y;
|
|
2751
|
+
e(u);
|
|
2730
2752
|
}), Po = ["disabled", "aria-expanded", "onKeydown"], Eo = ["data-placement"], Oo = ["disabled", "aria-selected", "onClick"], Bc = /* @__PURE__ */ ne({
|
|
2731
2753
|
__name: "select",
|
|
2732
2754
|
props: {
|
|
@@ -2742,7 +2764,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
2742
2764
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
2743
2765
|
setup(n, { emit: o }) {
|
|
2744
2766
|
let a = 0;
|
|
2745
|
-
const e = o, t = n, i = G(null), s = G(null),
|
|
2767
|
+
const e = o, t = n, i = G(null), s = G(null), u = G(null), r = G(!1), d = G("bottom"), v = G("bottom"), p = `vf-select-panel-${++a}`;
|
|
2746
2768
|
let m = null;
|
|
2747
2769
|
const $ = f(() => t.options.map((E) => ({
|
|
2748
2770
|
label: E[t.optionLabel],
|
|
@@ -2757,32 +2779,32 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
2757
2779
|
}), y = (E) => E.value === t.modelValue, z = (E) => {
|
|
2758
2780
|
E.disabled || (e("update:modelValue", E.value), e("change", E.value), w());
|
|
2759
2781
|
}, C = (E) => e("focus", E), g = (E) => e("blur", E), w = () => {
|
|
2760
|
-
r.value = !1,
|
|
2782
|
+
r.value = !1, d.value = "bottom", v.value = "bottom";
|
|
2761
2783
|
}, L = () => {
|
|
2762
|
-
t.disabled || (r.value = !r.value, r.value && (
|
|
2784
|
+
t.disabled || (r.value = !r.value, r.value && (d.value = "bottom", v.value = "bottom"));
|
|
2763
2785
|
}, R = async () => {
|
|
2764
2786
|
var E, T;
|
|
2765
|
-
r.value || (r.value = !0, await $e()), (T = (E =
|
|
2787
|
+
r.value || (r.value = !0, await $e()), (T = (E = u.value) == null ? void 0 : E.querySelector(".vf-select__option:not(.is-disabled)")) == null || T.focus();
|
|
2766
2788
|
}, I = (E) => {
|
|
2767
2789
|
var D;
|
|
2768
2790
|
if (!r.value || !i.value)
|
|
2769
2791
|
return;
|
|
2770
2792
|
const T = E.target;
|
|
2771
|
-
i.value.contains(T) || (D =
|
|
2793
|
+
i.value.contains(T) || (D = u.value) != null && D.contains(T) || w();
|
|
2772
2794
|
}, O = () => {
|
|
2773
|
-
if (!s.value || !
|
|
2795
|
+
if (!s.value || !u.value)
|
|
2774
2796
|
return;
|
|
2775
|
-
const E = s.value, T =
|
|
2797
|
+
const E = s.value, T = u.value, D = async () => {
|
|
2776
2798
|
const {
|
|
2777
2799
|
x: H,
|
|
2778
2800
|
y: Z,
|
|
2779
2801
|
placement: x
|
|
2780
2802
|
} = await Me(E, T, {
|
|
2781
|
-
placement:
|
|
2803
|
+
placement: d.value,
|
|
2782
2804
|
strategy: "fixed",
|
|
2783
2805
|
middleware: [Ie(2), Te({ placements: ["bottom", "top"] })]
|
|
2784
2806
|
});
|
|
2785
|
-
v.value = x ??
|
|
2807
|
+
v.value = x ?? d.value, T.style.minWidth = `${E.getBoundingClientRect().width}px`, T.style.left = `${H}px`, T.style.top = `${Z}px`;
|
|
2786
2808
|
}, M = async () => {
|
|
2787
2809
|
await D();
|
|
2788
2810
|
}, S = De(E, () => {
|
|
@@ -2848,7 +2870,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
2848
2870
|
ze(B("div", {
|
|
2849
2871
|
id: p,
|
|
2850
2872
|
ref_key: "panel",
|
|
2851
|
-
ref:
|
|
2873
|
+
ref: u,
|
|
2852
2874
|
class: "vf-select__panel",
|
|
2853
2875
|
role: "listbox",
|
|
2854
2876
|
"data-placement": v.value
|
|
@@ -2894,7 +2916,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
2894
2916
|
emits: ["update:modelValue", "change", "focus", "blur", "search"],
|
|
2895
2917
|
setup(n, { emit: o }) {
|
|
2896
2918
|
let a = 0;
|
|
2897
|
-
const e = o, t = n, i = G(null), s = G(null),
|
|
2919
|
+
const e = o, t = n, i = G(null), s = G(null), u = G(null), r = G(!1), d = G(""), v = G(-1), p = G("bottom"), m = G("bottom"), $ = `vf-autocomplete-panel-${++a}`;
|
|
2898
2920
|
let l = null;
|
|
2899
2921
|
const _ = f(() => t.options.map((h) => ({
|
|
2900
2922
|
label: h[t.optionLabel],
|
|
@@ -2903,7 +2925,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
2903
2925
|
}))), k = f(() => _.value.find((h) => h.value === t.modelValue)), y = f(() => {
|
|
2904
2926
|
if (!t.filter)
|
|
2905
2927
|
return _.value;
|
|
2906
|
-
const h =
|
|
2928
|
+
const h = d.value.trim().toLowerCase();
|
|
2907
2929
|
return h ? _.value.filter((P) => P.label.toLowerCase().includes(h)) : _.value;
|
|
2908
2930
|
}), z = f(() => {
|
|
2909
2931
|
if (!(!r.value || v.value < 0))
|
|
@@ -2936,10 +2958,10 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
2936
2958
|
}
|
|
2937
2959
|
I();
|
|
2938
2960
|
}, T = (h) => {
|
|
2939
|
-
h.disabled || (
|
|
2961
|
+
h.disabled || (d.value = h.label, e("update:modelValue", h.value), e("change", h.value), O());
|
|
2940
2962
|
}, D = (h) => {
|
|
2941
2963
|
const P = h.target;
|
|
2942
|
-
|
|
2964
|
+
d.value = P.value, e("search", P.value), I(), v.value = L();
|
|
2943
2965
|
}, M = (h) => {
|
|
2944
2966
|
e("focus", h), I();
|
|
2945
2967
|
}, S = (h) => {
|
|
@@ -2968,11 +2990,11 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
2968
2990
|
if (!r.value || !i.value)
|
|
2969
2991
|
return;
|
|
2970
2992
|
const P = h.target;
|
|
2971
|
-
i.value.contains(P) || (K =
|
|
2993
|
+
i.value.contains(P) || (K = u.value) != null && K.contains(P) || O();
|
|
2972
2994
|
}, W = () => {
|
|
2973
|
-
if (!s.value || !
|
|
2995
|
+
if (!s.value || !u.value)
|
|
2974
2996
|
return;
|
|
2975
|
-
const h = s.value, P =
|
|
2997
|
+
const h = s.value, P = u.value, K = async () => {
|
|
2976
2998
|
const {
|
|
2977
2999
|
x: ae,
|
|
2978
3000
|
y: se,
|
|
@@ -3001,14 +3023,14 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3001
3023
|
() => t.modelValue,
|
|
3002
3024
|
() => {
|
|
3003
3025
|
var h;
|
|
3004
|
-
|
|
3026
|
+
d.value = ((h = k.value) == null ? void 0 : h.label) ?? "";
|
|
3005
3027
|
},
|
|
3006
3028
|
{ immediate: !0 }
|
|
3007
3029
|
), ve(
|
|
3008
3030
|
() => t.options,
|
|
3009
3031
|
() => {
|
|
3010
3032
|
var h;
|
|
3011
|
-
r.value || (
|
|
3033
|
+
r.value || (d.value = ((h = k.value) == null ? void 0 : h.label) ?? ""), l == null || l.update();
|
|
3012
3034
|
},
|
|
3013
3035
|
{ deep: !0 }
|
|
3014
3036
|
), ve(y, () => {
|
|
@@ -3034,7 +3056,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3034
3056
|
class: "vf-autocomplete__control",
|
|
3035
3057
|
type: "text",
|
|
3036
3058
|
role: "combobox",
|
|
3037
|
-
value:
|
|
3059
|
+
value: d.value,
|
|
3038
3060
|
placeholder: h.placeholder,
|
|
3039
3061
|
disabled: h.disabled,
|
|
3040
3062
|
readonly: h.readonly,
|
|
@@ -3068,7 +3090,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3068
3090
|
ze(B("div", {
|
|
3069
3091
|
id: $,
|
|
3070
3092
|
ref_key: "panel",
|
|
3071
|
-
ref:
|
|
3093
|
+
ref: u,
|
|
3072
3094
|
class: "vf-autocomplete__panel",
|
|
3073
3095
|
role: "listbox",
|
|
3074
3096
|
"data-placement": m.value
|
|
@@ -3125,13 +3147,13 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3125
3147
|
emits: ["update:modelValue", "update:inputValue", "change", "focus", "blur", "search", "create"],
|
|
3126
3148
|
setup(n, { emit: o }) {
|
|
3127
3149
|
let a = 0;
|
|
3128
|
-
const e = o, t = n, i = G(null), s = G(null),
|
|
3150
|
+
const e = o, t = n, i = G(null), s = G(null), u = G(null), r = G(!1), d = G(""), v = G(-1), p = G("bottom"), m = G("bottom"), $ = `vf-combobox-panel-${++a}`;
|
|
3129
3151
|
let l = null;
|
|
3130
3152
|
const _ = f(() => t.options.map((U) => ({
|
|
3131
3153
|
label: U[t.optionLabel],
|
|
3132
3154
|
value: U[t.optionValue],
|
|
3133
3155
|
disabled: U.disabled
|
|
3134
|
-
}))), k = f(() => _.value.find((U) => U.value === t.modelValue)), y = f(() =>
|
|
3156
|
+
}))), k = f(() => _.value.find((U) => U.value === t.modelValue)), y = f(() => d.value.trim().toLowerCase()), z = f(() => !t.filter || !y.value ? _.value : _.value.filter((U) => U.label.toLowerCase().includes(y.value))), C = f(() => y.value ? _.value.some(
|
|
3135
3157
|
(U) => U.label.toLowerCase() === y.value && !U.disabled
|
|
3136
3158
|
) : !1), g = f(() => {
|
|
3137
3159
|
if (!(!r.value || v.value < 0))
|
|
@@ -3168,24 +3190,24 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3168
3190
|
}
|
|
3169
3191
|
M();
|
|
3170
3192
|
}, H = () => {
|
|
3171
|
-
const U =
|
|
3193
|
+
const U = d.value.trim();
|
|
3172
3194
|
return !U || !w.value ? !1 : (t.allowCreate && !C.value && e("create", U), T(U), E(U), S(), !0);
|
|
3173
3195
|
}, Z = () => {
|
|
3174
3196
|
var X;
|
|
3175
3197
|
const U = ((X = k.value) == null ? void 0 : X.label) ?? "";
|
|
3176
|
-
|
|
3198
|
+
d.value = U, E(U);
|
|
3177
3199
|
}, x = (U) => {
|
|
3178
|
-
U.disabled || (
|
|
3200
|
+
U.disabled || (d.value = U.label, E(U.label), T(U.value), S());
|
|
3179
3201
|
}, W = () => {
|
|
3180
|
-
|
|
3202
|
+
d.value = "", E(""), e("update:modelValue", void 0), e("change", void 0), S();
|
|
3181
3203
|
}, h = (U) => {
|
|
3182
3204
|
const X = U.target;
|
|
3183
|
-
|
|
3205
|
+
d.value = X.value, E(X.value), e("search", X.value), M(), v.value = O();
|
|
3184
3206
|
}, P = (U) => {
|
|
3185
3207
|
e("focus", U), M();
|
|
3186
3208
|
}, K = (U) => {
|
|
3187
3209
|
var X;
|
|
3188
|
-
e("blur", U), t.strict &&
|
|
3210
|
+
e("blur", U), t.strict && d.value.trim() !== ((X = k.value) == null ? void 0 : X.label) && Z();
|
|
3189
3211
|
}, A = () => {
|
|
3190
3212
|
if (!r.value) {
|
|
3191
3213
|
M();
|
|
@@ -3214,11 +3236,11 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3214
3236
|
if (!r.value || !i.value)
|
|
3215
3237
|
return;
|
|
3216
3238
|
const X = U.target;
|
|
3217
|
-
i.value.contains(X) || (re =
|
|
3239
|
+
i.value.contains(X) || (re = u.value) != null && re.contains(X) || S();
|
|
3218
3240
|
}, se = () => {
|
|
3219
|
-
if (!s.value || !
|
|
3241
|
+
if (!s.value || !u.value)
|
|
3220
3242
|
return;
|
|
3221
|
-
const U = s.value, X =
|
|
3243
|
+
const U = s.value, X = u.value, re = async () => {
|
|
3222
3244
|
const {
|
|
3223
3245
|
x: N,
|
|
3224
3246
|
y: oe,
|
|
@@ -3246,21 +3268,21 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3246
3268
|
return ve(
|
|
3247
3269
|
() => t.inputValue,
|
|
3248
3270
|
(U) => {
|
|
3249
|
-
typeof U == "string" && (
|
|
3271
|
+
typeof U == "string" && (d.value = U);
|
|
3250
3272
|
},
|
|
3251
3273
|
{ immediate: !0 }
|
|
3252
3274
|
), ve(
|
|
3253
3275
|
() => t.modelValue,
|
|
3254
3276
|
() => {
|
|
3255
3277
|
var U;
|
|
3256
|
-
typeof t.inputValue != "string" && (
|
|
3278
|
+
typeof t.inputValue != "string" && (d.value = ((U = k.value) == null ? void 0 : U.label) ?? "");
|
|
3257
3279
|
},
|
|
3258
3280
|
{ immediate: !0 }
|
|
3259
3281
|
), ve(
|
|
3260
3282
|
() => t.options,
|
|
3261
3283
|
() => {
|
|
3262
3284
|
var U;
|
|
3263
|
-
!r.value && t.strict && typeof t.inputValue != "string" && (
|
|
3285
|
+
!r.value && t.strict && typeof t.inputValue != "string" && (d.value = ((U = k.value) == null ? void 0 : U.label) ?? ""), l == null || l.update();
|
|
3264
3286
|
},
|
|
3265
3287
|
{ deep: !0 }
|
|
3266
3288
|
), ve(z, () => {
|
|
@@ -3286,7 +3308,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3286
3308
|
class: "vf-combobox__control",
|
|
3287
3309
|
type: "text",
|
|
3288
3310
|
role: "combobox",
|
|
3289
|
-
value:
|
|
3311
|
+
value: d.value,
|
|
3290
3312
|
placeholder: U.placeholder,
|
|
3291
3313
|
disabled: U.disabled,
|
|
3292
3314
|
readonly: U.readonly,
|
|
@@ -3306,7 +3328,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3306
3328
|
pe(S, ["tab"])
|
|
3307
3329
|
]
|
|
3308
3330
|
}, null, 40, jo),
|
|
3309
|
-
U.clearable &&
|
|
3331
|
+
U.clearable && d.value.length > 0 && !U.disabled && !U.readonly ? (c(), b("button", {
|
|
3310
3332
|
key: 0,
|
|
3311
3333
|
class: "vf-combobox__clear",
|
|
3312
3334
|
type: "button",
|
|
@@ -3329,7 +3351,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3329
3351
|
ze(B("div", {
|
|
3330
3352
|
id: $,
|
|
3331
3353
|
ref_key: "panel",
|
|
3332
|
-
ref:
|
|
3354
|
+
ref: u,
|
|
3333
3355
|
class: "vf-combobox__panel",
|
|
3334
3356
|
role: "listbox",
|
|
3335
3357
|
"data-placement": m.value
|
|
@@ -3391,7 +3413,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3391
3413
|
emits: ["update:modelValue", "change", "search", "focus", "blur"],
|
|
3392
3414
|
setup(n, { emit: o }) {
|
|
3393
3415
|
let a = 0;
|
|
3394
|
-
const e = o, t = n, i = G(null), s = G(null),
|
|
3416
|
+
const e = o, t = n, i = G(null), s = G(null), u = G(null), r = G(null), d = G(!1), v = G(""), p = G(-1), m = G("bottom"), $ = G("bottom"), l = `vf-multiselect-panel-${++a}`;
|
|
3395
3417
|
let _ = null;
|
|
3396
3418
|
const k = f(() => t.options.map((V) => ({
|
|
3397
3419
|
label: V[t.optionLabel],
|
|
@@ -3403,7 +3425,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3403
3425
|
const V = v.value.trim().toLowerCase();
|
|
3404
3426
|
return V ? k.value.filter((Y) => Y.label.toLowerCase().includes(V)) : k.value;
|
|
3405
3427
|
}), C = f(() => k.value.filter((V) => y.value.includes(V.value))), g = f(() => C.value.length === 0 ? t.placeholder : C.value.map((V) => V.label).join(", ")), w = f(() => {
|
|
3406
|
-
const V = ["vf-multiselect", `vf-multiselect_${t.variant}`,
|
|
3428
|
+
const V = ["vf-multiselect", `vf-multiselect_${t.variant}`, d.value ? "vf-multiselect_open" : ""];
|
|
3407
3429
|
return t.size !== "normal" && V.push(`vf-multiselect_${t.size}`), t.disabled && V.push("vf-multiselect_disabled"), V.filter(Boolean);
|
|
3408
3430
|
}), L = (V) => `${l}-option-${V}`, R = () => z.value.findIndex((V) => !V.disabled), I = (V) => y.value.includes(V.value), O = (V) => {
|
|
3409
3431
|
e("update:modelValue", V), e("change", V);
|
|
@@ -3433,29 +3455,29 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3433
3455
|
p.value = -1;
|
|
3434
3456
|
}, M = async () => {
|
|
3435
3457
|
var V;
|
|
3436
|
-
t.disabled || (
|
|
3458
|
+
t.disabled || (d.value = !0, m.value = "bottom", $.value = "bottom", p.value < 0 && (p.value = R()), t.filter && (await $e(), (V = r.value) == null || V.focus()));
|
|
3437
3459
|
}, S = () => {
|
|
3438
|
-
|
|
3460
|
+
d.value = !1, p.value = -1, m.value = "bottom", $.value = "bottom", v.value = "";
|
|
3439
3461
|
}, F = () => {
|
|
3440
|
-
if (
|
|
3462
|
+
if (d.value) {
|
|
3441
3463
|
S();
|
|
3442
3464
|
return;
|
|
3443
3465
|
}
|
|
3444
3466
|
M();
|
|
3445
3467
|
}, H = () => {
|
|
3446
|
-
if (!
|
|
3468
|
+
if (!d.value) {
|
|
3447
3469
|
M();
|
|
3448
3470
|
return;
|
|
3449
3471
|
}
|
|
3450
3472
|
D(1);
|
|
3451
3473
|
}, Z = () => {
|
|
3452
|
-
if (!
|
|
3474
|
+
if (!d.value) {
|
|
3453
3475
|
M();
|
|
3454
3476
|
return;
|
|
3455
3477
|
}
|
|
3456
3478
|
D(-1);
|
|
3457
3479
|
}, x = () => {
|
|
3458
|
-
if (!
|
|
3480
|
+
if (!d.value) {
|
|
3459
3481
|
M();
|
|
3460
3482
|
return;
|
|
3461
3483
|
}
|
|
@@ -3466,14 +3488,14 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3466
3488
|
v.value = Y.value, e("search", Y.value), p.value = R();
|
|
3467
3489
|
}, h = (V) => e("focus", V), P = (V) => e("blur", V), K = (V) => {
|
|
3468
3490
|
var ae;
|
|
3469
|
-
if (!
|
|
3491
|
+
if (!d.value || !i.value)
|
|
3470
3492
|
return;
|
|
3471
3493
|
const Y = V.target;
|
|
3472
|
-
i.value.contains(Y) || (ae =
|
|
3494
|
+
i.value.contains(Y) || (ae = u.value) != null && ae.contains(Y) || S();
|
|
3473
3495
|
}, A = () => {
|
|
3474
|
-
if (!s.value || !
|
|
3496
|
+
if (!s.value || !u.value)
|
|
3475
3497
|
return;
|
|
3476
|
-
const V = s.value, Y =
|
|
3498
|
+
const V = s.value, Y = u.value, ae = async () => {
|
|
3477
3499
|
const {
|
|
3478
3500
|
x: re,
|
|
3479
3501
|
y: de,
|
|
@@ -3504,7 +3526,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3504
3526
|
p.value >= z.value.length && (p.value = R()), _ == null || _.update();
|
|
3505
3527
|
},
|
|
3506
3528
|
{ deep: !0 }
|
|
3507
|
-
), ve(
|
|
3529
|
+
), ve(d, async (V) => {
|
|
3508
3530
|
if (!V) {
|
|
3509
3531
|
_ && (_.destroy(), _ = null);
|
|
3510
3532
|
return;
|
|
@@ -3527,7 +3549,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3527
3549
|
class: "vf-multiselect__control",
|
|
3528
3550
|
type: "button",
|
|
3529
3551
|
disabled: V.disabled,
|
|
3530
|
-
"aria-expanded":
|
|
3552
|
+
"aria-expanded": d.value,
|
|
3531
3553
|
"aria-controls": l,
|
|
3532
3554
|
"aria-haspopup": "listbox",
|
|
3533
3555
|
onClick: F,
|
|
@@ -3559,7 +3581,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3559
3581
|
ze(B("div", {
|
|
3560
3582
|
id: l,
|
|
3561
3583
|
ref_key: "panel",
|
|
3562
|
-
ref:
|
|
3584
|
+
ref: u,
|
|
3563
3585
|
class: "vf-multiselect__panel",
|
|
3564
3586
|
role: "listbox",
|
|
3565
3587
|
"aria-multiselectable": "true",
|
|
@@ -3600,7 +3622,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3600
3622
|
I(ae) ? (c(), b("span", lr, "✓")) : Q("", !0)
|
|
3601
3623
|
], 10, or))), 128)) : (c(), b("div", nr, j(V.emptyText), 1))
|
|
3602
3624
|
], 8, Jo), [
|
|
3603
|
-
[Se,
|
|
3625
|
+
[Se, d.value]
|
|
3604
3626
|
])
|
|
3605
3627
|
]))
|
|
3606
3628
|
], 2));
|
|
@@ -3635,7 +3657,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3635
3657
|
emits: ["update:modelValue", "change", "focus", "blur", "search", "add", "remove", "reject"],
|
|
3636
3658
|
setup(n, { emit: o }) {
|
|
3637
3659
|
let a = 0;
|
|
3638
|
-
const e = o, t = n, i = G(null), s = G(null),
|
|
3660
|
+
const e = o, t = n, i = G(null), s = G(null), u = G(null), r = G(""), d = G(!1), v = G(-1), p = G("bottom"), m = G("bottom"), $ = `vf-tag-input-panel-${++a}`;
|
|
3639
3661
|
let l = null;
|
|
3640
3662
|
const _ = f(() => Array.isArray(t.modelValue) ? t.modelValue : []), k = f(() => t.options.map((te) => ({
|
|
3641
3663
|
label: te[t.optionLabel],
|
|
@@ -3648,10 +3670,10 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3648
3670
|
const N = r.value.trim().toLowerCase();
|
|
3649
3671
|
return N ? te.filter((oe) => oe.label.toLowerCase().includes(N)) : te;
|
|
3650
3672
|
}), C = f(() => new Map(k.value.map((te) => [String(te.value), te.label]))), g = f(() => {
|
|
3651
|
-
if (!(!
|
|
3673
|
+
if (!(!d.value || v.value < 0))
|
|
3652
3674
|
return L(v.value);
|
|
3653
3675
|
}), w = f(() => {
|
|
3654
|
-
const te = ["vf-tag-input", `vf-tag-input_${t.variant}`,
|
|
3676
|
+
const te = ["vf-tag-input", `vf-tag-input_${t.variant}`, d.value ? "vf-tag-input_open" : ""];
|
|
3655
3677
|
return t.size !== "normal" && te.push(`vf-tag-input_${t.size}`), t.disabled && te.push("vf-tag-input_disabled"), te.filter(Boolean);
|
|
3656
3678
|
}), L = (te) => `${$}-option-${te}`, R = () => z.value.findIndex((te) => !te.disabled), I = (te) => C.value.get(String(te)) ?? String(te), O = (te) => {
|
|
3657
3679
|
e("update:modelValue", te), e("change", te);
|
|
@@ -3692,11 +3714,11 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3692
3714
|
}
|
|
3693
3715
|
v.value = -1;
|
|
3694
3716
|
}, x = () => {
|
|
3695
|
-
t.disabled || (
|
|
3717
|
+
t.disabled || (d.value = !0, p.value = "bottom", m.value = "bottom", v.value < 0 && (v.value = R()));
|
|
3696
3718
|
}, W = () => {
|
|
3697
|
-
|
|
3719
|
+
d.value = !1, v.value = -1, p.value = "bottom", m.value = "bottom";
|
|
3698
3720
|
}, h = () => {
|
|
3699
|
-
if (
|
|
3721
|
+
if (d.value) {
|
|
3700
3722
|
W();
|
|
3701
3723
|
return;
|
|
3702
3724
|
}
|
|
@@ -3712,19 +3734,19 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3712
3734
|
}, V = (te) => {
|
|
3713
3735
|
e("blur", te);
|
|
3714
3736
|
}, Y = () => {
|
|
3715
|
-
if (!
|
|
3737
|
+
if (!d.value) {
|
|
3716
3738
|
x();
|
|
3717
3739
|
return;
|
|
3718
3740
|
}
|
|
3719
3741
|
Z(1);
|
|
3720
3742
|
}, ae = () => {
|
|
3721
|
-
if (!
|
|
3743
|
+
if (!d.value) {
|
|
3722
3744
|
x();
|
|
3723
3745
|
return;
|
|
3724
3746
|
}
|
|
3725
3747
|
Z(-1);
|
|
3726
3748
|
}, se = () => {
|
|
3727
|
-
if (
|
|
3749
|
+
if (d.value) {
|
|
3728
3750
|
const te = z.value[v.value];
|
|
3729
3751
|
if (te && !te.disabled) {
|
|
3730
3752
|
M(te);
|
|
@@ -3740,14 +3762,14 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3740
3762
|
te.key === "," && (te.preventDefault(), S());
|
|
3741
3763
|
}, de = (te) => {
|
|
3742
3764
|
var oe;
|
|
3743
|
-
if (!
|
|
3765
|
+
if (!d.value || !i.value)
|
|
3744
3766
|
return;
|
|
3745
3767
|
const N = te.target;
|
|
3746
|
-
i.value.contains(N) || (oe =
|
|
3768
|
+
i.value.contains(N) || (oe = u.value) != null && oe.contains(N) || W();
|
|
3747
3769
|
}, ye = () => {
|
|
3748
|
-
if (!i.value || !
|
|
3770
|
+
if (!i.value || !u.value)
|
|
3749
3771
|
return;
|
|
3750
|
-
const te = i.value, N =
|
|
3772
|
+
const te = i.value, N = u.value, oe = async () => {
|
|
3751
3773
|
const {
|
|
3752
3774
|
x: ue,
|
|
3753
3775
|
y: ce,
|
|
@@ -3780,7 +3802,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3780
3802
|
{ deep: !0 }
|
|
3781
3803
|
), ve(z, () => {
|
|
3782
3804
|
v.value >= z.value.length && (v.value = R());
|
|
3783
|
-
}), ve(
|
|
3805
|
+
}), ve(d, async (te) => {
|
|
3784
3806
|
if (!te) {
|
|
3785
3807
|
l && (l.destroy(), l = null);
|
|
3786
3808
|
return;
|
|
@@ -3820,7 +3842,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3820
3842
|
placeholder: _.value.length === 0 ? te.placeholder : "",
|
|
3821
3843
|
disabled: te.disabled,
|
|
3822
3844
|
readonly: te.readonly,
|
|
3823
|
-
"aria-expanded":
|
|
3845
|
+
"aria-expanded": d.value,
|
|
3824
3846
|
"aria-autocomplete": "list",
|
|
3825
3847
|
"aria-controls": $,
|
|
3826
3848
|
"aria-activedescendant": g.value,
|
|
@@ -3859,7 +3881,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3859
3881
|
ze(B("div", {
|
|
3860
3882
|
id: $,
|
|
3861
3883
|
ref_key: "panel",
|
|
3862
|
-
ref:
|
|
3884
|
+
ref: u,
|
|
3863
3885
|
class: "vf-tag-input__panel",
|
|
3864
3886
|
role: "listbox",
|
|
3865
3887
|
"data-placement": m.value
|
|
@@ -3879,7 +3901,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3879
3901
|
onClick: (ge) => M(oe)
|
|
3880
3902
|
}, j(oe.label), 43, pr))), 128)) : (c(), b("div", mr, j(te.emptyText), 1))
|
|
3881
3903
|
], 8, vr), [
|
|
3882
|
-
[Se,
|
|
3904
|
+
[Se, d.value]
|
|
3883
3905
|
])
|
|
3884
3906
|
]))
|
|
3885
3907
|
], 2));
|
|
@@ -3907,7 +3929,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3907
3929
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
3908
3930
|
setup(n, { emit: o }) {
|
|
3909
3931
|
let a = 0;
|
|
3910
|
-
const e = o, t = n, i = G(null), s = G(null),
|
|
3932
|
+
const e = o, t = n, i = G(null), s = G(null), u = G(null), r = G(!1), d = G("bottom"), v = G("bottom"), p = `vf-datepicker-panel-${++a}`, m = G(x(H(t.modelValue) ?? /* @__PURE__ */ new Date()));
|
|
3911
3933
|
let $ = null;
|
|
3912
3934
|
const l = f(() => H(t.modelValue)), _ = f(() => H(t.min)), k = f(() => H(t.max)), y = f(() => l.value ? l.value.toLocaleDateString(t.locale, {
|
|
3913
3935
|
year: "numeric",
|
|
@@ -3941,9 +3963,9 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3941
3963
|
const V = ["vf-datepicker", `vf-datepicker_${t.variant}`, r.value ? "vf-datepicker_open" : ""];
|
|
3942
3964
|
return t.size !== "normal" && V.push(`vf-datepicker_${t.size}`), t.disabled && V.push("vf-datepicker_disabled"), V.filter(Boolean);
|
|
3943
3965
|
}), L = (V) => e("focus", V), R = (V) => e("blur", V), I = () => {
|
|
3944
|
-
t.disabled || t.readonly || (r.value = !0,
|
|
3966
|
+
t.disabled || t.readonly || (r.value = !0, d.value = "bottom", v.value = "bottom");
|
|
3945
3967
|
}, O = () => {
|
|
3946
|
-
r.value = !1,
|
|
3968
|
+
r.value = !1, d.value = "bottom", v.value = "bottom";
|
|
3947
3969
|
}, E = () => {
|
|
3948
3970
|
if (r.value) {
|
|
3949
3971
|
O();
|
|
@@ -3964,21 +3986,21 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
3964
3986
|
if (!r.value || !i.value)
|
|
3965
3987
|
return;
|
|
3966
3988
|
const Y = V.target;
|
|
3967
|
-
i.value.contains(Y) || (ae =
|
|
3989
|
+
i.value.contains(Y) || (ae = u.value) != null && ae.contains(Y) || O();
|
|
3968
3990
|
}, F = () => {
|
|
3969
|
-
if (!s.value || !
|
|
3991
|
+
if (!s.value || !u.value)
|
|
3970
3992
|
return;
|
|
3971
|
-
const V = s.value, Y =
|
|
3993
|
+
const V = s.value, Y = u.value, ae = async () => {
|
|
3972
3994
|
const {
|
|
3973
3995
|
x: re,
|
|
3974
3996
|
y: de,
|
|
3975
3997
|
placement: ye
|
|
3976
3998
|
} = await Me(V, Y, {
|
|
3977
|
-
placement:
|
|
3999
|
+
placement: d.value,
|
|
3978
4000
|
strategy: "fixed",
|
|
3979
4001
|
middleware: [Ie(2), Te({ placements: ["bottom", "top"] })]
|
|
3980
4002
|
});
|
|
3981
|
-
v.value = ye ??
|
|
4003
|
+
v.value = ye ?? d.value, Y.style.left = `${re}px`, Y.style.top = `${de}px`;
|
|
3982
4004
|
}, se = async () => {
|
|
3983
4005
|
await ae();
|
|
3984
4006
|
}, U = De(V, () => {
|
|
@@ -4084,7 +4106,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4084
4106
|
ze(B("div", {
|
|
4085
4107
|
id: p,
|
|
4086
4108
|
ref_key: "panel",
|
|
4087
|
-
ref:
|
|
4109
|
+
ref: u,
|
|
4088
4110
|
class: "vf-datepicker__panel",
|
|
4089
4111
|
role: "dialog",
|
|
4090
4112
|
"data-placement": v.value,
|
|
@@ -4157,7 +4179,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4157
4179
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
4158
4180
|
setup(n, { emit: o }) {
|
|
4159
4181
|
let a = 0;
|
|
4160
|
-
const e = o, t = n, i = G(null), s = G(null),
|
|
4182
|
+
const e = o, t = n, i = G(null), s = G(null), u = G(null), r = G(!1), d = G("bottom"), v = G("bottom"), p = `vf-daterangepicker-panel-${++a}`, m = G(A(/* @__PURE__ */ new Date()));
|
|
4161
4183
|
let $ = null;
|
|
4162
4184
|
const l = f(() => P(t.min)), _ = f(() => P(t.max)), k = f(() => h(t.modelValue)), y = f(() => k.value[0]), z = f(() => k.value[1]), C = f(() => !y.value && !z.value), g = f(() => {
|
|
4163
4185
|
if (C.value)
|
|
@@ -4203,9 +4225,9 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4203
4225
|
];
|
|
4204
4226
|
return t.size !== "normal" && X.push(`vf-daterangepicker_${t.size}`), t.disabled && X.push("vf-daterangepicker_disabled"), X.filter(Boolean);
|
|
4205
4227
|
}), O = (X) => e("focus", X), E = (X) => e("blur", X), T = () => {
|
|
4206
|
-
t.disabled || t.readonly || (r.value = !0,
|
|
4228
|
+
t.disabled || t.readonly || (r.value = !0, d.value = "bottom", v.value = "bottom");
|
|
4207
4229
|
}, D = () => {
|
|
4208
|
-
r.value = !1,
|
|
4230
|
+
r.value = !1, d.value = "bottom", v.value = "bottom";
|
|
4209
4231
|
}, M = () => {
|
|
4210
4232
|
if (r.value) {
|
|
4211
4233
|
D();
|
|
@@ -4234,21 +4256,21 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4234
4256
|
if (!r.value || !i.value)
|
|
4235
4257
|
return;
|
|
4236
4258
|
const re = X.target;
|
|
4237
|
-
i.value.contains(re) || (de =
|
|
4259
|
+
i.value.contains(re) || (de = u.value) != null && de.contains(re) || D();
|
|
4238
4260
|
}, W = () => {
|
|
4239
|
-
if (!s.value || !
|
|
4261
|
+
if (!s.value || !u.value)
|
|
4240
4262
|
return;
|
|
4241
|
-
const X = s.value, re =
|
|
4263
|
+
const X = s.value, re = u.value, de = async () => {
|
|
4242
4264
|
const {
|
|
4243
4265
|
x: oe,
|
|
4244
4266
|
y: le,
|
|
4245
4267
|
placement: ge
|
|
4246
4268
|
} = await Me(X, re, {
|
|
4247
|
-
placement:
|
|
4269
|
+
placement: d.value,
|
|
4248
4270
|
strategy: "fixed",
|
|
4249
4271
|
middleware: [Ie(2), Te({ placements: ["bottom", "top"] })]
|
|
4250
4272
|
});
|
|
4251
|
-
v.value = ge ??
|
|
4273
|
+
v.value = ge ?? d.value, re.style.left = `${oe}px`, re.style.top = `${le}px`;
|
|
4252
4274
|
}, ye = async () => {
|
|
4253
4275
|
await de();
|
|
4254
4276
|
}, te = De(X, () => {
|
|
@@ -4360,7 +4382,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4360
4382
|
ze(B("div", {
|
|
4361
4383
|
id: p,
|
|
4362
4384
|
ref_key: "panel",
|
|
4363
|
-
ref:
|
|
4385
|
+
ref: u,
|
|
4364
4386
|
class: "vf-daterangepicker__panel",
|
|
4365
4387
|
role: "dialog",
|
|
4366
4388
|
"data-placement": v.value,
|
|
@@ -4427,7 +4449,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4427
4449
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
4428
4450
|
setup(n, { emit: o }) {
|
|
4429
4451
|
let a = 0;
|
|
4430
|
-
const e = o, t = n, i = G(null), s = G(null),
|
|
4452
|
+
const e = o, t = n, i = G(null), s = G(null), u = G(null), r = G(!1), d = G("bottom"), v = G("bottom"), p = `vf-timepicker-panel-${++a}`;
|
|
4431
4453
|
let m = null;
|
|
4432
4454
|
const $ = f(() => S(t.min)), l = f(() => S(t.max)), _ = f(() => S(t.modelValue)), k = f(() => _.value === null ? "" : H(_.value, t.format)), y = f(() => !t.step || t.step <= 0 ? 30 : Math.min(Math.max(Math.round(t.step), 1), 1440)), z = f(() => {
|
|
4433
4455
|
const x = [], W = y.value, h = $.value, P = l.value;
|
|
@@ -4446,9 +4468,9 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4446
4468
|
const x = ["vf-timepicker", `vf-timepicker_${t.variant}`, r.value ? "vf-timepicker_open" : ""];
|
|
4447
4469
|
return t.size !== "normal" && x.push(`vf-timepicker_${t.size}`), t.disabled && x.push("vf-timepicker_disabled"), x.filter(Boolean);
|
|
4448
4470
|
}), g = (x) => e("focus", x), w = (x) => e("blur", x), L = () => {
|
|
4449
|
-
t.disabled || t.readonly || (r.value = !0,
|
|
4471
|
+
t.disabled || t.readonly || (r.value = !0, d.value = "bottom", v.value = "bottom");
|
|
4450
4472
|
}, R = () => {
|
|
4451
|
-
r.value = !1,
|
|
4473
|
+
r.value = !1, d.value = "bottom", v.value = "bottom";
|
|
4452
4474
|
}, I = () => {
|
|
4453
4475
|
if (r.value) {
|
|
4454
4476
|
R();
|
|
@@ -4457,7 +4479,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4457
4479
|
L();
|
|
4458
4480
|
}, O = async () => {
|
|
4459
4481
|
var x, W;
|
|
4460
|
-
r.value || (L(), await $e()), (W = (x =
|
|
4482
|
+
r.value || (L(), await $e()), (W = (x = u.value) == null ? void 0 : x.querySelector(".vf-timepicker__option:not(.is-disabled)")) == null || W.focus();
|
|
4461
4483
|
}, E = (x) => {
|
|
4462
4484
|
if (t.readonly)
|
|
4463
4485
|
return;
|
|
@@ -4468,21 +4490,21 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4468
4490
|
if (!r.value || !i.value)
|
|
4469
4491
|
return;
|
|
4470
4492
|
const W = x.target;
|
|
4471
|
-
i.value.contains(W) || (h =
|
|
4493
|
+
i.value.contains(W) || (h = u.value) != null && h.contains(W) || R();
|
|
4472
4494
|
}, D = () => {
|
|
4473
|
-
if (!s.value || !
|
|
4495
|
+
if (!s.value || !u.value)
|
|
4474
4496
|
return;
|
|
4475
|
-
const x = s.value, W =
|
|
4497
|
+
const x = s.value, W = u.value, h = async () => {
|
|
4476
4498
|
const {
|
|
4477
4499
|
x: V,
|
|
4478
4500
|
y: Y,
|
|
4479
4501
|
placement: ae
|
|
4480
4502
|
} = await Me(x, W, {
|
|
4481
|
-
placement:
|
|
4503
|
+
placement: d.value,
|
|
4482
4504
|
strategy: "fixed",
|
|
4483
4505
|
middleware: [Ie(2), Te({ placements: ["bottom", "top"] })]
|
|
4484
4506
|
});
|
|
4485
|
-
v.value = ae ??
|
|
4507
|
+
v.value = ae ?? d.value;
|
|
4486
4508
|
const se = x.getBoundingClientRect().width;
|
|
4487
4509
|
W.style.minWidth = `${se}px`, W.style.width = `${se}px`, W.style.left = `${V}px`, W.style.top = `${Y}px`;
|
|
4488
4510
|
}, P = async () => {
|
|
@@ -4499,9 +4521,9 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4499
4521
|
}
|
|
4500
4522
|
}, m.update();
|
|
4501
4523
|
}, M = () => {
|
|
4502
|
-
if (!
|
|
4524
|
+
if (!u.value || _.value === null)
|
|
4503
4525
|
return;
|
|
4504
|
-
const x =
|
|
4526
|
+
const x = u.value.querySelector(`[data-time="${F(_.value)}"]`);
|
|
4505
4527
|
!x || typeof x.scrollIntoView != "function" || x.scrollIntoView({ block: "nearest" });
|
|
4506
4528
|
};
|
|
4507
4529
|
ve(r, async (x) => {
|
|
@@ -4578,7 +4600,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4578
4600
|
ze(B("div", {
|
|
4579
4601
|
id: p,
|
|
4580
4602
|
ref_key: "panel",
|
|
4581
|
-
ref:
|
|
4603
|
+
ref: u,
|
|
4582
4604
|
class: "vf-timepicker__panel",
|
|
4583
4605
|
role: "listbox",
|
|
4584
4606
|
"data-placement": v.value
|
|
@@ -4627,7 +4649,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4627
4649
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
4628
4650
|
setup(n, { emit: o }) {
|
|
4629
4651
|
let a = 0;
|
|
4630
|
-
const e = o, t = n, i = G(null), s = G(null),
|
|
4652
|
+
const e = o, t = n, i = G(null), s = G(null), u = G(null), r = G(!1), d = G("bottom"), v = G("bottom"), p = `vf-datetimepicker-panel-${++a}`, m = G(U(/* @__PURE__ */ new Date())), $ = G(null), l = G(null);
|
|
4631
4653
|
let _ = null;
|
|
4632
4654
|
const k = f(() => !t.minuteStep || t.minuteStep <= 0 ? 30 : Math.min(Math.max(Math.round(t.minuteStep), 1), 1440)), y = f(() => ae(t.modelValue)), z = f(() => ae(t.min)), C = f(() => ae(t.max)), g = f(() => {
|
|
4633
4655
|
if (!y.value)
|
|
@@ -4700,9 +4722,9 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4700
4722
|
);
|
|
4701
4723
|
l.value = ue ? ue.minutes : null;
|
|
4702
4724
|
}, F = () => {
|
|
4703
|
-
t.disabled || t.readonly || (M(), $.value || ($.value = se(/* @__PURE__ */ new Date()), m.value = U($.value)), S($.value), r.value = !0,
|
|
4725
|
+
t.disabled || t.readonly || (M(), $.value || ($.value = se(/* @__PURE__ */ new Date()), m.value = U($.value)), S($.value), r.value = !0, d.value = "bottom", v.value = "bottom");
|
|
4704
4726
|
}, H = () => {
|
|
4705
|
-
r.value = !1,
|
|
4727
|
+
r.value = !1, d.value = "bottom", v.value = "bottom";
|
|
4706
4728
|
}, Z = () => {
|
|
4707
4729
|
if (r.value) {
|
|
4708
4730
|
H();
|
|
@@ -4722,21 +4744,21 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4722
4744
|
if (!r.value || !i.value)
|
|
4723
4745
|
return;
|
|
4724
4746
|
const ue = J.target;
|
|
4725
|
-
i.value.contains(ue) || (ce =
|
|
4747
|
+
i.value.contains(ue) || (ce = u.value) != null && ce.contains(ue) || H();
|
|
4726
4748
|
}, A = () => {
|
|
4727
|
-
if (!s.value || !
|
|
4749
|
+
if (!s.value || !u.value)
|
|
4728
4750
|
return;
|
|
4729
|
-
const J = s.value, ue =
|
|
4751
|
+
const J = s.value, ue = u.value, ce = async () => {
|
|
4730
4752
|
const {
|
|
4731
4753
|
x: Ue,
|
|
4732
4754
|
y: Lt,
|
|
4733
4755
|
placement: Vt
|
|
4734
4756
|
} = await Me(J, ue, {
|
|
4735
|
-
placement:
|
|
4757
|
+
placement: d.value,
|
|
4736
4758
|
strategy: "fixed",
|
|
4737
4759
|
middleware: [Ie(2), Te({ placements: ["bottom", "top"] })]
|
|
4738
4760
|
});
|
|
4739
|
-
v.value = Vt ??
|
|
4761
|
+
v.value = Vt ?? d.value;
|
|
4740
4762
|
const rt = 8, Ft = ue.getBoundingClientRect().width, Tt = Math.max(rt, window.innerWidth - Ft - rt), It = Math.min(Math.max(Ue, rt), Tt);
|
|
4741
4763
|
ue.style.left = `${It}px`, ue.style.top = `${Lt}px`;
|
|
4742
4764
|
}, _e = async () => {
|
|
@@ -4882,7 +4904,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4882
4904
|
ze(B("div", {
|
|
4883
4905
|
id: p,
|
|
4884
4906
|
ref_key: "panel",
|
|
4885
|
-
ref:
|
|
4907
|
+
ref: u,
|
|
4886
4908
|
class: "vf-datetimepicker__panel",
|
|
4887
4909
|
role: "dialog",
|
|
4888
4910
|
"data-placement": v.value,
|
|
@@ -4964,10 +4986,10 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4964
4986
|
},
|
|
4965
4987
|
emits: ["update:modelValue", "change"],
|
|
4966
4988
|
setup(n, { emit: o }) {
|
|
4967
|
-
const a = o, e = n, t = G(y(_(e.modelValue) ?? /* @__PURE__ */ new Date())), i = f(() => _(e.modelValue)), s = f(() => _(e.min)),
|
|
4989
|
+
const a = o, e = n, t = G(y(_(e.modelValue) ?? /* @__PURE__ */ new Date())), i = f(() => _(e.modelValue)), s = f(() => _(e.min)), u = f(() => _(e.max)), r = f(() => t.value.toLocaleDateString(e.locale, {
|
|
4968
4990
|
year: "numeric",
|
|
4969
4991
|
month: "long"
|
|
4970
|
-
})),
|
|
4992
|
+
})), d = f(() => {
|
|
4971
4993
|
const R = new Intl.DateTimeFormat(e.locale, { weekday: "short" }), I = new Date(2026, 0, 4);
|
|
4972
4994
|
return Array.from({ length: 7 }, (O, E) => {
|
|
4973
4995
|
const T = (E + e.firstDayOfWeek) % 7, D = new Date(I);
|
|
@@ -4983,7 +5005,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4983
5005
|
date: D,
|
|
4984
5006
|
day: D.getDate(),
|
|
4985
5007
|
inCurrentMonth: D.getMonth() === t.value.getMonth(),
|
|
4986
|
-
isDisabled: L(D, s.value,
|
|
5008
|
+
isDisabled: L(D, s.value, u.value),
|
|
4987
5009
|
isSelected: I === M,
|
|
4988
5010
|
isToday: M === O
|
|
4989
5011
|
};
|
|
@@ -4996,7 +5018,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
4996
5018
|
}, $ = () => {
|
|
4997
5019
|
t.value = z(t.value, 1);
|
|
4998
5020
|
}, l = (R) => {
|
|
4999
|
-
if (e.disabled || e.readonly || L(R, s.value,
|
|
5021
|
+
if (e.disabled || e.readonly || L(R, s.value, u.value))
|
|
5000
5022
|
return;
|
|
5001
5023
|
const I = w(R);
|
|
5002
5024
|
a("update:modelValue", I), a("change", I);
|
|
@@ -5063,7 +5085,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5063
5085
|
}, " › ", 8, jr)
|
|
5064
5086
|
]),
|
|
5065
5087
|
B("div", Yr, [
|
|
5066
|
-
(c(!0), b(fe, null, he(
|
|
5088
|
+
(c(!0), b(fe, null, he(d.value, (O) => (c(), b("span", {
|
|
5067
5089
|
key: O,
|
|
5068
5090
|
class: "vf-calendar__weekday"
|
|
5069
5091
|
}, j(O), 1))), 128))
|
|
@@ -5114,8 +5136,8 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5114
5136
|
return Math.max(1, Math.floor(a.totalPages));
|
|
5115
5137
|
const l = Math.max(1, Math.floor(a.pageSize));
|
|
5116
5138
|
return Math.max(1, Math.ceil(Math.max(0, a.totalItems) / l));
|
|
5117
|
-
}),
|
|
5118
|
-
const l = s.value, _ =
|
|
5139
|
+
}), u = f(() => t(Math.floor(a.modelValue), 1, s.value)), r = f(() => u.value <= 1), d = f(() => u.value >= s.value), v = f(() => a.disabled || s.value <= 1), p = f(() => {
|
|
5140
|
+
const l = s.value, _ = u.value, k = Math.max(0, Math.floor(a.siblingCount)), y = Math.max(0, Math.floor(a.boundaryCount)), z = k * 2 + y * 2 + 3, C = [];
|
|
5119
5141
|
if (l <= z)
|
|
5120
5142
|
return i(1, l).map((I) => ({ key: `page-${I}`, type: "page", page: I }));
|
|
5121
5143
|
const g = i(1, y), w = i(l - y + 1, l), L = Math.max(Math.min(_ - k, l - y - k * 2 - 1), y + 2), R = Math.min(Math.max(_ + k, y + k * 2 + 2), l - y - 1);
|
|
@@ -5146,17 +5168,17 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5146
5168
|
type: "button",
|
|
5147
5169
|
disabled: v.value || r.value,
|
|
5148
5170
|
"aria-label": "Previous page",
|
|
5149
|
-
onClick: _[0] || (_[0] = (k) => $(
|
|
5171
|
+
onClick: _[0] || (_[0] = (k) => $(u.value - 1, k))
|
|
5150
5172
|
}, j(l.prevLabel), 9, Ur),
|
|
5151
5173
|
(c(!0), b(fe, null, he(p.value, (k) => (c(), b("button", {
|
|
5152
5174
|
key: k.key,
|
|
5153
5175
|
class: ee(["vf-pagination__item", {
|
|
5154
|
-
"is-current": k.type === "page" && k.page ===
|
|
5176
|
+
"is-current": k.type === "page" && k.page === u.value,
|
|
5155
5177
|
"is-ellipsis": k.type === "ellipsis"
|
|
5156
5178
|
}]),
|
|
5157
5179
|
type: "button",
|
|
5158
5180
|
disabled: v.value || k.type === "ellipsis",
|
|
5159
|
-
"aria-current": k.type === "page" && k.page ===
|
|
5181
|
+
"aria-current": k.type === "page" && k.page === u.value ? "page" : void 0,
|
|
5160
5182
|
"aria-label": k.type === "page" ? `Page ${k.page}` : void 0,
|
|
5161
5183
|
onClick: (y) => k.type === "page" && $(k.page, y)
|
|
5162
5184
|
}, [
|
|
@@ -5169,9 +5191,9 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5169
5191
|
B("button", {
|
|
5170
5192
|
class: "vf-pagination__item vf-pagination__item_nav",
|
|
5171
5193
|
type: "button",
|
|
5172
|
-
disabled: v.value ||
|
|
5194
|
+
disabled: v.value || d.value,
|
|
5173
5195
|
"aria-label": "Next page",
|
|
5174
|
-
onClick: _[1] || (_[1] = (k) => $(
|
|
5196
|
+
onClick: _[1] || (_[1] = (k) => $(u.value + 1, k))
|
|
5175
5197
|
}, j(l.nextLabel), 9, Zr)
|
|
5176
5198
|
], 2));
|
|
5177
5199
|
}
|
|
@@ -5192,10 +5214,10 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5192
5214
|
const s = ["vf-checkbox", `vf-checkbox_${e.variant}`];
|
|
5193
5215
|
return e.disabled && s.push("vf-checkbox_disabled"), s;
|
|
5194
5216
|
}), i = (s) => {
|
|
5195
|
-
const
|
|
5196
|
-
a("update:modelValue",
|
|
5217
|
+
const u = s.target;
|
|
5218
|
+
a("update:modelValue", u.checked), a("change", s);
|
|
5197
5219
|
};
|
|
5198
|
-
return (s,
|
|
5220
|
+
return (s, u) => (c(), b("label", {
|
|
5199
5221
|
class: ee(t.value)
|
|
5200
5222
|
}, [
|
|
5201
5223
|
B("input", {
|
|
@@ -5205,7 +5227,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5205
5227
|
disabled: s.disabled,
|
|
5206
5228
|
onChange: i
|
|
5207
5229
|
}, null, 40, Jr),
|
|
5208
|
-
|
|
5230
|
+
u[0] || (u[0] = B("span", { class: "vf-checkbox__box" }, null, -1)),
|
|
5209
5231
|
s.label || s.$slots.default ? (c(), b("span", el, [
|
|
5210
5232
|
q(s.$slots, "default", {}, () => [
|
|
5211
5233
|
me(j(s.label), 1)
|
|
@@ -5227,10 +5249,10 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5227
5249
|
emits: ["update:modelValue", "change"],
|
|
5228
5250
|
setup(n, { emit: o }) {
|
|
5229
5251
|
const a = o, e = n, t = f(() => {
|
|
5230
|
-
const
|
|
5231
|
-
return e.direction === "horizontal" &&
|
|
5232
|
-
}), i = (
|
|
5233
|
-
a("update:modelValue",
|
|
5252
|
+
const u = ["vf-radio-group"];
|
|
5253
|
+
return e.direction === "horizontal" && u.push("vf-radio-group_horizontal"), u;
|
|
5254
|
+
}), i = (u, r) => {
|
|
5255
|
+
a("update:modelValue", u), a("change", u, r);
|
|
5234
5256
|
}, s = {
|
|
5235
5257
|
name: f(() => e.name),
|
|
5236
5258
|
modelValue: f(() => e.modelValue),
|
|
@@ -5238,14 +5260,14 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5238
5260
|
variant: f(() => e.variant),
|
|
5239
5261
|
onChange: i
|
|
5240
5262
|
};
|
|
5241
|
-
return Qe(wt, s), (
|
|
5263
|
+
return Qe(wt, s), (u, r) => (c(), b("div", {
|
|
5242
5264
|
class: ee(t.value),
|
|
5243
5265
|
role: "radiogroup",
|
|
5244
|
-
"aria-disabled":
|
|
5245
|
-
"aria-label":
|
|
5246
|
-
"aria-labelledby":
|
|
5266
|
+
"aria-disabled": u.disabled || void 0,
|
|
5267
|
+
"aria-label": u.ariaLabel || void 0,
|
|
5268
|
+
"aria-labelledby": u.ariaLabelledby || void 0
|
|
5247
5269
|
}, [
|
|
5248
|
-
q(
|
|
5270
|
+
q(u.$slots, "default")
|
|
5249
5271
|
], 10, tl));
|
|
5250
5272
|
}
|
|
5251
5273
|
}), al = ["name", "value", "checked", "disabled"], ol = {
|
|
@@ -5263,8 +5285,8 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5263
5285
|
},
|
|
5264
5286
|
emits: ["update:modelValue", "change"],
|
|
5265
5287
|
setup(n, { emit: o }) {
|
|
5266
|
-
const a = o, e = n, t = qe(wt, null), i = f(() => t ? t.modelValue.value : e.modelValue), s = f(() => t ? t.name.value : e.name),
|
|
5267
|
-
const m = ["vf-radio", `vf-radio_${
|
|
5288
|
+
const a = o, e = n, t = qe(wt, null), i = f(() => t ? t.modelValue.value : e.modelValue), s = f(() => t ? t.name.value : e.name), u = f(() => t ? t.variant.value : e.variant), r = f(() => (t ? t.disabled.value : !1) || e.disabled), d = f(() => i.value === e.value), v = f(() => {
|
|
5289
|
+
const m = ["vf-radio", `vf-radio_${u.value}`];
|
|
5268
5290
|
return r.value && m.push("vf-radio_disabled"), m;
|
|
5269
5291
|
}), p = (m) => {
|
|
5270
5292
|
r.value || (t ? t.onChange(e.value, m) : a("update:modelValue", e.value), a("change", e.value, m));
|
|
@@ -5277,7 +5299,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5277
5299
|
type: "radio",
|
|
5278
5300
|
name: s.value,
|
|
5279
5301
|
value: m.value,
|
|
5280
|
-
checked:
|
|
5302
|
+
checked: d.value,
|
|
5281
5303
|
disabled: r.value,
|
|
5282
5304
|
onChange: p
|
|
5283
5305
|
}, null, 40, al),
|
|
@@ -5306,10 +5328,10 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5306
5328
|
const a = o, e = n, t = G([]), i = f(() => e.options.map((l, _) => ({
|
|
5307
5329
|
...l,
|
|
5308
5330
|
key: `${String(l.value)}-${_}`
|
|
5309
|
-
}))), s = f(() => i.value.reduce((l, _, k) => (_.disabled || l.push(k), l), [])),
|
|
5331
|
+
}))), s = f(() => i.value.reduce((l, _, k) => (_.disabled || l.push(k), l), [])), u = f(() => {
|
|
5310
5332
|
const l = ["vf-segmented-control", `vf-segmented-control_${e.variant}`];
|
|
5311
5333
|
return e.fullWidth && l.push("vf-segmented-control_full-width"), e.size !== "normal" && l.push(`vf-segmented-control_${e.size}`), e.disabled && l.push("vf-segmented-control_disabled"), l;
|
|
5312
|
-
}), r = (l) => e.modelValue === l,
|
|
5334
|
+
}), r = (l) => e.modelValue === l, d = (l) => a("focus", l), v = (l) => a("blur", l), p = (l, _) => {
|
|
5313
5335
|
if (e.disabled)
|
|
5314
5336
|
return;
|
|
5315
5337
|
const k = i.value.find((y) => y.value === l);
|
|
@@ -5330,7 +5352,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5330
5352
|
L == null || L.focus(), w && p(w.value, _);
|
|
5331
5353
|
};
|
|
5332
5354
|
return (l, _) => (c(), b("div", {
|
|
5333
|
-
class: ee(
|
|
5355
|
+
class: ee(u.value),
|
|
5334
5356
|
role: "radiogroup",
|
|
5335
5357
|
"aria-label": l.ariaLabel || void 0,
|
|
5336
5358
|
"aria-labelledby": l.ariaLabelledby || void 0
|
|
@@ -5346,7 +5368,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5346
5368
|
disabled: l.disabled || k.disabled,
|
|
5347
5369
|
onClick: (z) => p(k.value, z),
|
|
5348
5370
|
onKeydown: (z) => $(y, z),
|
|
5349
|
-
onFocus:
|
|
5371
|
+
onFocus: d,
|
|
5350
5372
|
onBlur: v
|
|
5351
5373
|
}, j(k.label), 43, ll))), 128))
|
|
5352
5374
|
], 10, rl));
|
|
@@ -5363,10 +5385,10 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5363
5385
|
emits: ["update:modelValue", "change"],
|
|
5364
5386
|
setup(n, { emit: o }) {
|
|
5365
5387
|
let a = 0;
|
|
5366
|
-
const e = o, t = n, i = ++a, s = (l) => String(l).toLowerCase().trim().replace(/\s+/g, "-").replace(/[^a-z0-9_-]/g, ""),
|
|
5388
|
+
const e = o, t = n, i = ++a, s = (l) => String(l).toLowerCase().trim().replace(/\s+/g, "-").replace(/[^a-z0-9_-]/g, ""), u = f(() => {
|
|
5367
5389
|
const l = ["vf-tabs"];
|
|
5368
5390
|
return t.orientation === "vertical" && l.push("vf-tabs_vertical"), t.disabled && l.push("vf-tabs_disabled"), l;
|
|
5369
|
-
}), r = G(null),
|
|
5391
|
+
}), r = G(null), d = () => r.value ? Array.from(r.value.querySelectorAll('[role="tab"]:not([disabled])')) : [], v = (l) => {
|
|
5370
5392
|
l && (l.focus(), l.click());
|
|
5371
5393
|
}, p = (l) => {
|
|
5372
5394
|
if (t.disabled)
|
|
@@ -5374,7 +5396,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5374
5396
|
const _ = t.orientation === "horizontal", k = l.key, y = _ ? ["ArrowRight"] : ["ArrowDown"], z = _ ? ["ArrowLeft"] : ["ArrowUp"];
|
|
5375
5397
|
if (![...y, ...z, "Home", "End"].includes(k))
|
|
5376
5398
|
return;
|
|
5377
|
-
const C =
|
|
5399
|
+
const C = d();
|
|
5378
5400
|
if (!C.length)
|
|
5379
5401
|
return;
|
|
5380
5402
|
const g = C.findIndex((I) => I.getAttribute("aria-selected") === "true"), w = C.findIndex((I) => I === document.activeElement), L = w >= 0 ? w : Math.max(g, 0);
|
|
@@ -5391,7 +5413,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5391
5413
|
getPanelId: (l) => `vf-tabpanel-${i}-${s(l)}`
|
|
5392
5414
|
};
|
|
5393
5415
|
return Qe(ut, $), (l, _) => (c(), b("div", {
|
|
5394
|
-
class: ee(
|
|
5416
|
+
class: ee(u.value)
|
|
5395
5417
|
}, [
|
|
5396
5418
|
B("div", {
|
|
5397
5419
|
ref_key: "list",
|
|
@@ -5419,18 +5441,18 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5419
5441
|
},
|
|
5420
5442
|
emits: ["change"],
|
|
5421
5443
|
setup(n, { emit: o }) {
|
|
5422
|
-
const a = o, e = n, t = qe(ut, null), i = f(() => (t == null ? void 0 : t.activeValue.value) === e.value), s = f(() => ((t == null ? void 0 : t.disabled.value) ?? !1) || e.disabled),
|
|
5444
|
+
const a = o, e = n, t = qe(ut, null), i = f(() => (t == null ? void 0 : t.activeValue.value) === e.value), s = f(() => ((t == null ? void 0 : t.disabled.value) ?? !1) || e.disabled), u = f(() => t ? t.getTabId(e.value) : void 0), r = f(() => t ? t.getPanelId(e.value) : void 0), d = f(() => s.value ? -1 : i.value ? 0 : -1), v = (p) => {
|
|
5423
5445
|
!t || s.value || (t.onChange(e.value, p), a("change", e.value, p));
|
|
5424
5446
|
};
|
|
5425
5447
|
return (p, m) => (c(), b("button", {
|
|
5426
|
-
id:
|
|
5448
|
+
id: u.value,
|
|
5427
5449
|
class: ee(["vf-tab", { "vf-tab_active": i.value, "vf-tab_disabled": s.value }]),
|
|
5428
5450
|
type: "button",
|
|
5429
5451
|
role: "tab",
|
|
5430
5452
|
"aria-selected": i.value,
|
|
5431
5453
|
"aria-controls": r.value,
|
|
5432
5454
|
disabled: s.value,
|
|
5433
|
-
tabindex:
|
|
5455
|
+
tabindex: d.value,
|
|
5434
5456
|
onClick: v
|
|
5435
5457
|
}, [
|
|
5436
5458
|
q(p.$slots, "default", {}, () => [
|
|
@@ -5445,7 +5467,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5445
5467
|
},
|
|
5446
5468
|
setup(n) {
|
|
5447
5469
|
const o = n, a = qe(ut, null), e = f(() => (a == null ? void 0 : a.activeValue.value) === o.value), t = f(() => a ? a.getTabId(o.value) : void 0), i = f(() => a ? a.getPanelId(o.value) : void 0);
|
|
5448
|
-
return (s,
|
|
5470
|
+
return (s, u) => ze((c(), b("div", {
|
|
5449
5471
|
id: i.value,
|
|
5450
5472
|
class: "vf-tab-panel",
|
|
5451
5473
|
role: "tabpanel",
|
|
@@ -5471,10 +5493,10 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5471
5493
|
emits: ["update:modelValue", "change"],
|
|
5472
5494
|
setup(n, { emit: o }) {
|
|
5473
5495
|
let a = 0;
|
|
5474
|
-
const e = o, t = n, i = ++a, s = (p) => String(p).toLowerCase().trim().replace(/\s+/g, "-").replace(/[^a-z0-9_-]/g, ""),
|
|
5496
|
+
const e = o, t = n, i = ++a, s = (p) => String(p).toLowerCase().trim().replace(/\s+/g, "-").replace(/[^a-z0-9_-]/g, ""), u = f(() => {
|
|
5475
5497
|
const p = ["vf-accordion", `vf-accordion_${t.variant}`];
|
|
5476
5498
|
return t.size !== "normal" && p.push(`vf-accordion_${t.size}`), t.disabled && p.push("vf-accordion_disabled"), p;
|
|
5477
|
-
}), r = (p) => Array.isArray(p) ? p : p == null ? [] : [p],
|
|
5499
|
+
}), r = (p) => Array.isArray(p) ? p : p == null ? [] : [p], d = (p, m) => {
|
|
5478
5500
|
if (t.disabled)
|
|
5479
5501
|
return;
|
|
5480
5502
|
if (t.multiple) {
|
|
@@ -5490,12 +5512,12 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5490
5512
|
disabled: f(() => t.disabled),
|
|
5491
5513
|
variant: f(() => t.variant),
|
|
5492
5514
|
size: f(() => t.size),
|
|
5493
|
-
onToggle:
|
|
5515
|
+
onToggle: d,
|
|
5494
5516
|
getHeaderId: (p) => `vf-accordion-header-${i}-${s(p)}`,
|
|
5495
5517
|
getPanelId: (p) => `vf-accordion-panel-${i}-${s(p)}`
|
|
5496
5518
|
};
|
|
5497
5519
|
return Qe($t, v), (p, m) => (c(), b("div", {
|
|
5498
|
-
class: ee(
|
|
5520
|
+
class: ee(u.value),
|
|
5499
5521
|
"aria-label": p.ariaLabel || void 0,
|
|
5500
5522
|
"aria-labelledby": p.ariaLabelledby || void 0
|
|
5501
5523
|
}, [
|
|
@@ -5516,10 +5538,10 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5516
5538
|
return !1;
|
|
5517
5539
|
const v = a.modelValue.value;
|
|
5518
5540
|
return Array.isArray(v) ? v.includes(o.value) : v === o.value;
|
|
5519
|
-
}), t = f(() => ((a == null ? void 0 : a.disabled.value) ?? !1) || o.disabled), i = f(() => a ? a.getHeaderId(o.value) : void 0), s = f(() => a ? a.getPanelId(o.value) : void 0),
|
|
5541
|
+
}), t = f(() => ((a == null ? void 0 : a.disabled.value) ?? !1) || o.disabled), i = f(() => a ? a.getHeaderId(o.value) : void 0), s = f(() => a ? a.getPanelId(o.value) : void 0), u = f(() => o.unmount ? e.value : !0), r = f(() => {
|
|
5520
5542
|
const v = ["vf-accordion-item"];
|
|
5521
5543
|
return e.value && v.push("vf-accordion-item_open"), t.value && v.push("vf-accordion-item_disabled"), v;
|
|
5522
|
-
}),
|
|
5544
|
+
}), d = (v) => {
|
|
5523
5545
|
!a || t.value || a.onToggle(o.value, v);
|
|
5524
5546
|
};
|
|
5525
5547
|
return (v, p) => (c(), b("div", {
|
|
@@ -5532,7 +5554,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5532
5554
|
disabled: t.value,
|
|
5533
5555
|
"aria-expanded": e.value,
|
|
5534
5556
|
"aria-controls": s.value,
|
|
5535
|
-
onClick:
|
|
5557
|
+
onClick: d
|
|
5536
5558
|
}, [
|
|
5537
5559
|
B("span", vl, [
|
|
5538
5560
|
q(v.$slots, "title", {}, () => [
|
|
@@ -5544,7 +5566,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5544
5566
|
"aria-hidden": "true"
|
|
5545
5567
|
}, null, -1))
|
|
5546
5568
|
], 8, cl),
|
|
5547
|
-
|
|
5569
|
+
u.value ? (c(), b("div", {
|
|
5548
5570
|
key: 0,
|
|
5549
5571
|
id: s.value,
|
|
5550
5572
|
class: ee(["vf-accordion__panel", { "vf-accordion__panel_open": e.value }]),
|
|
@@ -5584,7 +5606,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5584
5606
|
i(), !(!e.modelValue || e.duration <= 0) && (t = window.setTimeout(() => {
|
|
5585
5607
|
a("update:modelValue", !1), a("close");
|
|
5586
5608
|
}, e.duration));
|
|
5587
|
-
},
|
|
5609
|
+
}, u = () => {
|
|
5588
5610
|
i(), a("update:modelValue", !1), a("close");
|
|
5589
5611
|
};
|
|
5590
5612
|
return ve(
|
|
@@ -5595,7 +5617,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5595
5617
|
{ immediate: !0 }
|
|
5596
5618
|
), we(() => {
|
|
5597
5619
|
i();
|
|
5598
|
-
}), (r,
|
|
5620
|
+
}), (r, d) => ze((c(), b("div", {
|
|
5599
5621
|
class: "vf-toast",
|
|
5600
5622
|
role: "status",
|
|
5601
5623
|
"aria-live": "polite",
|
|
@@ -5613,10 +5635,10 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5613
5635
|
key: 0,
|
|
5614
5636
|
class: "vf-toast__close",
|
|
5615
5637
|
type: "button",
|
|
5616
|
-
onClick:
|
|
5638
|
+
onClick: u
|
|
5617
5639
|
}, [
|
|
5618
5640
|
q(r.$slots, "close", {}, () => [
|
|
5619
|
-
|
|
5641
|
+
d[0] || (d[0] = me("×"))
|
|
5620
5642
|
])
|
|
5621
5643
|
])) : Q("", !0)
|
|
5622
5644
|
], 8, ml)), [
|
|
@@ -5673,10 +5695,10 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5673
5695
|
},
|
|
5674
5696
|
{ immediate: !0 }
|
|
5675
5697
|
);
|
|
5676
|
-
const
|
|
5698
|
+
const u = () => {
|
|
5677
5699
|
i.value ? a("update:modelValue", !1) : t.value = !1, a("close");
|
|
5678
5700
|
};
|
|
5679
|
-
return (r,
|
|
5701
|
+
return (r, d) => ze((c(), b("div", {
|
|
5680
5702
|
class: "vf-alert",
|
|
5681
5703
|
role: "alert",
|
|
5682
5704
|
"data-severity": r.severity
|
|
@@ -5706,10 +5728,10 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5706
5728
|
class: "vf-alert__close",
|
|
5707
5729
|
type: "button",
|
|
5708
5730
|
"aria-label": "Close",
|
|
5709
|
-
onClick:
|
|
5731
|
+
onClick: u
|
|
5710
5732
|
}, [
|
|
5711
5733
|
q(r.$slots, "close", {}, () => [
|
|
5712
|
-
|
|
5734
|
+
d[0] || (d[0] = me("×"))
|
|
5713
5735
|
])
|
|
5714
5736
|
])) : Q("", !0)
|
|
5715
5737
|
], 8, yl)), [
|
|
@@ -5786,10 +5808,10 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5786
5808
|
const s = ["vf-switch"];
|
|
5787
5809
|
return e.disabled && s.push("vf-switch_disabled"), s;
|
|
5788
5810
|
}), i = (s) => {
|
|
5789
|
-
const
|
|
5790
|
-
a("update:modelValue",
|
|
5811
|
+
const u = s.target;
|
|
5812
|
+
a("update:modelValue", u.checked), a("change", s);
|
|
5791
5813
|
};
|
|
5792
|
-
return (s,
|
|
5814
|
+
return (s, u) => (c(), b("label", {
|
|
5793
5815
|
class: ee(t.value)
|
|
5794
5816
|
}, [
|
|
5795
5817
|
B("input", {
|
|
@@ -5799,7 +5821,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5799
5821
|
disabled: s.disabled,
|
|
5800
5822
|
onChange: i
|
|
5801
5823
|
}, null, 40, Vl),
|
|
5802
|
-
|
|
5824
|
+
u[0] || (u[0] = B("span", { class: "vf-switch__track" }, [
|
|
5803
5825
|
B("span", { class: "vf-switch__thumb" })
|
|
5804
5826
|
], -1)),
|
|
5805
5827
|
s.label || s.$slots.default ? (c(), b("span", Fl, [
|
|
@@ -5815,10 +5837,10 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5815
5837
|
setup(n, { expose: o, emit: a }) {
|
|
5816
5838
|
const e = a, t = Dt({ visible: !1 });
|
|
5817
5839
|
let i = 0;
|
|
5818
|
-
const s = `vf-popover-panel-${++i}`,
|
|
5819
|
-
|
|
5840
|
+
const s = `vf-popover-panel-${++i}`, u = () => t.visible = !0, r = () => t.visible = !1, d = () => t.visible = !t.visible, v = () => {
|
|
5841
|
+
d(), e("click"), e("onClick");
|
|
5820
5842
|
};
|
|
5821
|
-
return o({ show:
|
|
5843
|
+
return o({ show: u, hide: r, toggle: d }), (p, m) => (c(), b("div", Tl, [
|
|
5822
5844
|
B("div", {
|
|
5823
5845
|
class: "vf-popover__button",
|
|
5824
5846
|
role: "button",
|
|
@@ -5903,8 +5925,8 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5903
5925
|
emits: ["update:modelValue", "open", "close"],
|
|
5904
5926
|
setup(n, { expose: o, emit: a }) {
|
|
5905
5927
|
const e = a, t = n;
|
|
5906
|
-
let i = 0, s = 0,
|
|
5907
|
-
const
|
|
5928
|
+
let i = 0, s = 0, u = "", r = null;
|
|
5929
|
+
const d = G(null), v = Mt(), p = Xe(), m = `vf-modal-title-${++i}`, $ = `vf-modal-body-${i}`, l = f(() => !!t.title || !!p.header), _ = f(() => !!p.body || !!p.default), k = f(() => {
|
|
5908
5930
|
const E = ["vf-modal"];
|
|
5909
5931
|
return t.size !== "md" && E.push(`vf-modal_${t.size}`), E;
|
|
5910
5932
|
}), y = () => e("update:modelValue", !0), z = () => {
|
|
@@ -5913,17 +5935,17 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5913
5935
|
t.closeOnOverlay && z();
|
|
5914
5936
|
}, g = (E) => {
|
|
5915
5937
|
!t.modelValue || !t.closeOnEsc || E.key === "Escape" && (E.preventDefault(), z());
|
|
5916
|
-
}, w = () =>
|
|
5938
|
+
}, w = () => d.value ? Array.from(d.value.querySelectorAll('a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])')).filter((T) => !T.hasAttribute("disabled") && !T.getAttribute("aria-hidden")) : [], L = () => {
|
|
5917
5939
|
var T;
|
|
5918
5940
|
const E = w();
|
|
5919
|
-
E.length ? E[0].focus() : (T =
|
|
5941
|
+
E.length ? E[0].focus() : (T = d.value) == null || T.focus();
|
|
5920
5942
|
}, R = (E) => {
|
|
5921
5943
|
var F;
|
|
5922
5944
|
if (E.key !== "Tab")
|
|
5923
5945
|
return;
|
|
5924
5946
|
const T = w();
|
|
5925
5947
|
if (!T.length) {
|
|
5926
|
-
E.preventDefault(), (F =
|
|
5948
|
+
E.preventDefault(), (F = d.value) == null || F.focus();
|
|
5927
5949
|
return;
|
|
5928
5950
|
}
|
|
5929
5951
|
const D = T[0], M = T[T.length - 1], S = document.activeElement;
|
|
@@ -5933,9 +5955,9 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5933
5955
|
}
|
|
5934
5956
|
!E.shiftKey && S === M && (E.preventDefault(), D.focus());
|
|
5935
5957
|
}, I = () => {
|
|
5936
|
-
!t.lockScroll || typeof document > "u" || (s === 0 && (
|
|
5958
|
+
!t.lockScroll || typeof document > "u" || (s === 0 && (u = document.body.style.overflow, document.body.style.overflow = "hidden"), s += 1);
|
|
5937
5959
|
}, O = () => {
|
|
5938
|
-
!t.lockScroll || typeof document > "u" || (s = Math.max(0, s - 1), s === 0 && (document.body.style.overflow =
|
|
5960
|
+
!t.lockScroll || typeof document > "u" || (s = Math.max(0, s - 1), s === 0 && (document.body.style.overflow = u));
|
|
5939
5961
|
};
|
|
5940
5962
|
return ve(
|
|
5941
5963
|
() => t.modelValue,
|
|
@@ -5956,7 +5978,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
5956
5978
|
}),
|
|
5957
5979
|
B("div", {
|
|
5958
5980
|
ref_key: "panel",
|
|
5959
|
-
ref:
|
|
5981
|
+
ref: d,
|
|
5960
5982
|
class: "vf-modal__panel",
|
|
5961
5983
|
role: "dialog",
|
|
5962
5984
|
"aria-modal": "true",
|
|
@@ -6022,7 +6044,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6022
6044
|
},
|
|
6023
6045
|
emits: ["update:modelValue", "confirm", "cancel", "open", "close"],
|
|
6024
6046
|
setup(n, { expose: o, emit: a }) {
|
|
6025
|
-
const e = n, t = a, i = G(null), s = G(null),
|
|
6047
|
+
const e = n, t = a, i = G(null), s = G(null), u = () => {
|
|
6026
6048
|
if (i.value) {
|
|
6027
6049
|
i.value.close();
|
|
6028
6050
|
return;
|
|
@@ -6030,16 +6052,16 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6030
6052
|
t("update:modelValue", !1), t("close");
|
|
6031
6053
|
}, r = (m) => {
|
|
6032
6054
|
t("update:modelValue", m);
|
|
6033
|
-
},
|
|
6055
|
+
}, d = () => {
|
|
6034
6056
|
if (t("close"), s.value === "confirm") {
|
|
6035
6057
|
s.value = null;
|
|
6036
6058
|
return;
|
|
6037
6059
|
}
|
|
6038
6060
|
s.value = null, t("cancel");
|
|
6039
6061
|
}, v = () => {
|
|
6040
|
-
s.value = "cancel",
|
|
6062
|
+
s.value = "cancel", u();
|
|
6041
6063
|
}, p = () => {
|
|
6042
|
-
e.loading || (t("confirm"), e.closeOnConfirm && (s.value = "confirm",
|
|
6064
|
+
e.loading || (t("confirm"), e.closeOnConfirm && (s.value = "confirm", u()));
|
|
6043
6065
|
};
|
|
6044
6066
|
return o({
|
|
6045
6067
|
open: () => {
|
|
@@ -6047,7 +6069,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6047
6069
|
return (m = i.value) == null ? void 0 : m.open();
|
|
6048
6070
|
},
|
|
6049
6071
|
close: () => {
|
|
6050
|
-
s.value = "cancel",
|
|
6072
|
+
s.value = "cancel", u();
|
|
6051
6073
|
}
|
|
6052
6074
|
}), (m, $) => (c(), be(El, {
|
|
6053
6075
|
ref_key: "modal",
|
|
@@ -6062,7 +6084,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6062
6084
|
"lock-scroll": m.lockScroll,
|
|
6063
6085
|
"onUpdate:modelValue": r,
|
|
6064
6086
|
onOpen: $[0] || ($[0] = (l) => t("open")),
|
|
6065
|
-
onClose:
|
|
6087
|
+
onClose: d
|
|
6066
6088
|
}, {
|
|
6067
6089
|
body: Ce(() => [
|
|
6068
6090
|
B("div", Ol, [
|
|
@@ -6123,8 +6145,8 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6123
6145
|
emits: ["update:modelValue", "open", "close"],
|
|
6124
6146
|
setup(n, { expose: o, emit: a }) {
|
|
6125
6147
|
const e = a, t = n;
|
|
6126
|
-
let i = 0, s = 0,
|
|
6127
|
-
const
|
|
6148
|
+
let i = 0, s = 0, u = "", r = null;
|
|
6149
|
+
const d = G(null), v = Xe(), p = `vf-drawer-title-${++i}`, m = `vf-drawer-body-${i}`, $ = f(() => !!t.title || !!v.header), l = f(() => !!v.body || !!v.default), _ = f(() => {
|
|
6128
6150
|
switch (t.position) {
|
|
6129
6151
|
case "left":
|
|
6130
6152
|
return "translate3d(-100%, 0, 0)";
|
|
@@ -6148,17 +6170,17 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6148
6170
|
t.overlay && t.closeOnOverlay && C();
|
|
6149
6171
|
}, w = (T) => {
|
|
6150
6172
|
!t.modelValue || !t.closeOnEsc || T.key === "Escape" && (T.preventDefault(), C());
|
|
6151
|
-
}, L = () =>
|
|
6173
|
+
}, L = () => d.value ? Array.from(d.value.querySelectorAll('a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])')).filter((D) => !D.hasAttribute("disabled") && !D.getAttribute("aria-hidden")) : [], R = () => {
|
|
6152
6174
|
var D;
|
|
6153
6175
|
const T = L();
|
|
6154
|
-
T.length ? T[0].focus() : (D =
|
|
6176
|
+
T.length ? T[0].focus() : (D = d.value) == null || D.focus();
|
|
6155
6177
|
}, I = (T) => {
|
|
6156
6178
|
var H;
|
|
6157
6179
|
if (T.key !== "Tab")
|
|
6158
6180
|
return;
|
|
6159
6181
|
const D = L();
|
|
6160
6182
|
if (!D.length) {
|
|
6161
|
-
T.preventDefault(), (H =
|
|
6183
|
+
T.preventDefault(), (H = d.value) == null || H.focus();
|
|
6162
6184
|
return;
|
|
6163
6185
|
}
|
|
6164
6186
|
const M = D[0], S = D[D.length - 1], F = document.activeElement;
|
|
@@ -6168,9 +6190,9 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6168
6190
|
}
|
|
6169
6191
|
!T.shiftKey && F === S && (T.preventDefault(), M.focus());
|
|
6170
6192
|
}, O = () => {
|
|
6171
|
-
!t.lockScroll || typeof document > "u" || (s === 0 && (
|
|
6193
|
+
!t.lockScroll || typeof document > "u" || (s === 0 && (u = document.body.style.overflow, document.body.style.overflow = "hidden"), s += 1);
|
|
6172
6194
|
}, E = () => {
|
|
6173
|
-
!t.lockScroll || typeof document > "u" || (s = Math.max(0, s - 1), s === 0 && (document.body.style.overflow =
|
|
6195
|
+
!t.lockScroll || typeof document > "u" || (s = Math.max(0, s - 1), s === 0 && (document.body.style.overflow = u));
|
|
6174
6196
|
};
|
|
6175
6197
|
return ve(
|
|
6176
6198
|
() => t.modelValue,
|
|
@@ -6198,7 +6220,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6198
6220
|
})) : Q("", !0),
|
|
6199
6221
|
B("div", {
|
|
6200
6222
|
ref_key: "panel",
|
|
6201
|
-
ref:
|
|
6223
|
+
ref: d,
|
|
6202
6224
|
class: "vf-drawer__panel",
|
|
6203
6225
|
role: "dialog",
|
|
6204
6226
|
"aria-modal": "true",
|
|
@@ -6265,16 +6287,16 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6265
6287
|
setup(n, { expose: o, emit: a }) {
|
|
6266
6288
|
const e = a, t = n;
|
|
6267
6289
|
let i = 0;
|
|
6268
|
-
const s = G(null),
|
|
6290
|
+
const s = G(null), u = G(null), r = G(null), d = G(!1), v = G(t.placement), p = G(t.placement), m = `vf-dropdown-panel-${++i}`;
|
|
6269
6291
|
let $ = null;
|
|
6270
6292
|
const l = f(() => t.modelValue !== void 0), _ = (O) => {
|
|
6271
|
-
t.disabled || (e("update:modelValue", O), l.value || (
|
|
6293
|
+
t.disabled || (e("update:modelValue", O), l.value || (d.value = O));
|
|
6272
6294
|
}, k = () => {
|
|
6273
6295
|
v.value = t.placement, p.value = t.placement, _(!0);
|
|
6274
6296
|
}, y = () => {
|
|
6275
6297
|
_(!1);
|
|
6276
6298
|
}, z = () => {
|
|
6277
|
-
|
|
6299
|
+
d.value ? y() : k();
|
|
6278
6300
|
}, C = () => {
|
|
6279
6301
|
t.disabled || z();
|
|
6280
6302
|
}, g = (O) => {
|
|
@@ -6284,12 +6306,12 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6284
6306
|
E && (E.closest(".vf-menu__parent") || (E.closest(".vf-menu__link") || E.closest("[data-dropdown-close]")) && y());
|
|
6285
6307
|
}, w = (O) => {
|
|
6286
6308
|
var T;
|
|
6287
|
-
if (!
|
|
6309
|
+
if (!d.value || !s.value)
|
|
6288
6310
|
return;
|
|
6289
6311
|
const E = O.target;
|
|
6290
6312
|
s.value.contains(E) || (T = r.value) != null && T.contains(E) || y();
|
|
6291
6313
|
}, L = (O) => {
|
|
6292
|
-
!
|
|
6314
|
+
!d.value || !t.closeOnEsc || O.key === "Escape" && (O.preventDefault(), y());
|
|
6293
6315
|
}, R = (O) => {
|
|
6294
6316
|
switch (O) {
|
|
6295
6317
|
case "bottom-start":
|
|
@@ -6307,9 +6329,9 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6307
6329
|
return ["top"];
|
|
6308
6330
|
}
|
|
6309
6331
|
}, I = () => {
|
|
6310
|
-
if (!
|
|
6332
|
+
if (!u.value || !r.value)
|
|
6311
6333
|
return;
|
|
6312
|
-
const O =
|
|
6334
|
+
const O = u.value, E = r.value, T = async () => {
|
|
6313
6335
|
const {
|
|
6314
6336
|
x: F,
|
|
6315
6337
|
y: H,
|
|
@@ -6337,7 +6359,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6337
6359
|
return ve(
|
|
6338
6360
|
() => t.modelValue,
|
|
6339
6361
|
(O) => {
|
|
6340
|
-
l.value && (
|
|
6362
|
+
l.value && (d.value = !!O);
|
|
6341
6363
|
},
|
|
6342
6364
|
{ immediate: !0 }
|
|
6343
6365
|
), ve(
|
|
@@ -6345,7 +6367,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6345
6367
|
(O) => {
|
|
6346
6368
|
v.value = O, p.value = O;
|
|
6347
6369
|
}
|
|
6348
|
-
), ve(
|
|
6370
|
+
), ve(d, async (O) => {
|
|
6349
6371
|
if (e(O ? "open" : "close"), !O) {
|
|
6350
6372
|
$ && ($.destroy(), $ = null);
|
|
6351
6373
|
return;
|
|
@@ -6362,11 +6384,11 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6362
6384
|
}, [
|
|
6363
6385
|
B("div", {
|
|
6364
6386
|
ref_key: "trigger",
|
|
6365
|
-
ref:
|
|
6387
|
+
ref: u,
|
|
6366
6388
|
class: "vf-dropdown__trigger",
|
|
6367
6389
|
role: "button",
|
|
6368
6390
|
tabindex: "0",
|
|
6369
|
-
"aria-expanded":
|
|
6391
|
+
"aria-expanded": d.value,
|
|
6370
6392
|
"aria-controls": m,
|
|
6371
6393
|
"aria-disabled": O.disabled ? "true" : "false",
|
|
6372
6394
|
onClick: C,
|
|
@@ -6394,7 +6416,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6394
6416
|
}, null, 8, ["items"])) : Q("", !0)
|
|
6395
6417
|
])
|
|
6396
6418
|
], 8, jl), [
|
|
6397
|
-
[Se,
|
|
6419
|
+
[Se, d.value]
|
|
6398
6420
|
])
|
|
6399
6421
|
]))
|
|
6400
6422
|
], 2));
|
|
@@ -6422,9 +6444,9 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6422
6444
|
},
|
|
6423
6445
|
emits: ["click", "update:modelValue", "open", "close", "select"],
|
|
6424
6446
|
setup(n, { expose: o, emit: a }) {
|
|
6425
|
-
const e = n, t = a, i = qe(dt, null), s = G(null),
|
|
6447
|
+
const e = n, t = a, i = qe(dt, null), s = G(null), u = f(() => e.size ?? (i == null ? void 0 : i.value.size) ?? "normal"), r = f(() => e.variant ?? (i == null ? void 0 : i.value.variant)), d = f(() => e.severity ?? (i == null ? void 0 : i.value.severity) ?? "primary"), v = f(() => e.disabled || (i == null ? void 0 : i.value.disabled) === !0), p = f(() => {
|
|
6426
6448
|
const l = ["vf-splitbutton"];
|
|
6427
|
-
return (v.value || e.loading) && l.push("vf-splitbutton_disabled"), (
|
|
6449
|
+
return (v.value || e.loading) && l.push("vf-splitbutton_disabled"), (u.value === "small" || u.value === "large") && l.push(`vf-splitbutton_${u.value}`), l;
|
|
6428
6450
|
}), m = (l) => {
|
|
6429
6451
|
var _;
|
|
6430
6452
|
if (v.value || e.loading) {
|
|
@@ -6457,9 +6479,9 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6457
6479
|
label: l.label,
|
|
6458
6480
|
icon: l.icon,
|
|
6459
6481
|
type: l.type,
|
|
6460
|
-
size:
|
|
6482
|
+
size: u.value,
|
|
6461
6483
|
variant: r.value,
|
|
6462
|
-
severity:
|
|
6484
|
+
severity: d.value,
|
|
6463
6485
|
loading: l.loading,
|
|
6464
6486
|
disabled: v.value,
|
|
6465
6487
|
onClick: m
|
|
@@ -6474,9 +6496,9 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6474
6496
|
label: l.label,
|
|
6475
6497
|
icon: l.icon,
|
|
6476
6498
|
type: l.type,
|
|
6477
|
-
size:
|
|
6499
|
+
size: u.value,
|
|
6478
6500
|
variant: r.value,
|
|
6479
|
-
severity:
|
|
6501
|
+
severity: d.value,
|
|
6480
6502
|
loading: l.loading,
|
|
6481
6503
|
disabled: v.value,
|
|
6482
6504
|
onClick: m
|
|
@@ -6502,9 +6524,9 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6502
6524
|
Ge(Ze, {
|
|
6503
6525
|
class: "vf-splitbutton__toggle",
|
|
6504
6526
|
icon: "chevronDown",
|
|
6505
|
-
size:
|
|
6527
|
+
size: u.value,
|
|
6506
6528
|
variant: r.value,
|
|
6507
|
-
severity:
|
|
6529
|
+
severity: d.value,
|
|
6508
6530
|
disabled: v.value || l.loading,
|
|
6509
6531
|
"aria-label": l.toggleAriaLabel
|
|
6510
6532
|
}, null, 8, ["size", "variant", "severity", "disabled", "aria-label"])
|
|
@@ -6536,7 +6558,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6536
6558
|
setup(n, { expose: o, emit: a }) {
|
|
6537
6559
|
const e = a, t = n;
|
|
6538
6560
|
let i = 0;
|
|
6539
|
-
const s = G(null),
|
|
6561
|
+
const s = G(null), u = G(null), r = G(!1), d = G({}), v = `vf-context-menu-panel-${++i}`, p = G({ x: 0, y: 0 }), m = f(() => t.modelValue !== void 0), $ = () => {
|
|
6540
6562
|
if (!s.value)
|
|
6541
6563
|
return { x: 0, y: 0 };
|
|
6542
6564
|
const I = s.value.getBoundingClientRect();
|
|
@@ -6547,11 +6569,11 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6547
6569
|
}, l = (I) => {
|
|
6548
6570
|
t.disabled || (e("update:modelValue", I), m.value || (r.value = I));
|
|
6549
6571
|
}, _ = () => {
|
|
6550
|
-
if (!
|
|
6572
|
+
if (!u.value)
|
|
6551
6573
|
return;
|
|
6552
|
-
const O =
|
|
6574
|
+
const O = u.value.getBoundingClientRect(), E = window.innerWidth, T = window.innerHeight, D = 8;
|
|
6553
6575
|
let M = p.value.x + t.offset, S = p.value.y + t.offset;
|
|
6554
|
-
M + O.width > E - D && (M = Math.max(D, E - O.width - D)), S + O.height > T - D && (S = Math.max(D, T - O.height - D)),
|
|
6576
|
+
M + O.width > E - D && (M = Math.max(D, E - O.width - D)), S + O.height > T - D && (S = Math.max(D, T - O.height - D)), d.value = {
|
|
6555
6577
|
left: `${M}px`,
|
|
6556
6578
|
top: `${S}px`,
|
|
6557
6579
|
minWidth: "var(--vf-context-menu-min-width)"
|
|
@@ -6574,7 +6596,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6574
6596
|
if (!r.value || !s.value)
|
|
6575
6597
|
return;
|
|
6576
6598
|
const O = I.target;
|
|
6577
|
-
s.value.contains(O) || (E =
|
|
6599
|
+
s.value.contains(O) || (E = u.value) != null && E.contains(O) || y();
|
|
6578
6600
|
}, L = (I) => {
|
|
6579
6601
|
!r.value || !t.closeOnEsc || I.key === "Escape" && (I.preventDefault(), y());
|
|
6580
6602
|
}, R = () => {
|
|
@@ -6607,10 +6629,10 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6607
6629
|
ze(B("div", {
|
|
6608
6630
|
id: v,
|
|
6609
6631
|
ref_key: "panel",
|
|
6610
|
-
ref:
|
|
6632
|
+
ref: u,
|
|
6611
6633
|
class: "vf-context-menu__panel",
|
|
6612
6634
|
role: "menu",
|
|
6613
|
-
style: ke(
|
|
6635
|
+
style: ke(d.value),
|
|
6614
6636
|
onClick: g
|
|
6615
6637
|
}, [
|
|
6616
6638
|
q(I.$slots, "menu", {}, () => [
|
|
@@ -6661,7 +6683,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6661
6683
|
},
|
|
6662
6684
|
emits: ["update:modelValue", "open", "close", "select", "search"],
|
|
6663
6685
|
setup(n, { expose: o, emit: a }) {
|
|
6664
|
-
const e = n, t = a, i = G(null), s = G(null),
|
|
6686
|
+
const e = n, t = a, i = G(null), s = G(null), u = G(!1), r = G(""), d = G(-1), v = f(() => e.modelValue !== void 0), p = f(() => e.items.map((M, S) => {
|
|
6665
6687
|
const F = M.group ?? "";
|
|
6666
6688
|
return {
|
|
6667
6689
|
...M,
|
|
@@ -6687,15 +6709,15 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6687
6709
|
await $e(), (M = s.value) == null || M.focus();
|
|
6688
6710
|
}, k = () => {
|
|
6689
6711
|
const M = l.value[0];
|
|
6690
|
-
|
|
6712
|
+
d.value = M ? M._index : -1;
|
|
6691
6713
|
}, y = (M) => {
|
|
6692
|
-
t("update:modelValue", M), v.value || (
|
|
6714
|
+
t("update:modelValue", M), v.value || (u.value = M);
|
|
6693
6715
|
}, z = async () => {
|
|
6694
6716
|
y(!0), r.value = "", k(), await _();
|
|
6695
6717
|
}, C = () => {
|
|
6696
6718
|
y(!1);
|
|
6697
6719
|
}, g = async () => {
|
|
6698
|
-
if (
|
|
6720
|
+
if (u.value) {
|
|
6699
6721
|
C();
|
|
6700
6722
|
return;
|
|
6701
6723
|
}
|
|
@@ -6711,15 +6733,15 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6711
6733
|
typeof M.command == "function" && M.command(), t("select", M, S), e.closeOnSelect && C();
|
|
6712
6734
|
}, R = (M) => {
|
|
6713
6735
|
if (!l.value.length) {
|
|
6714
|
-
|
|
6736
|
+
d.value = -1;
|
|
6715
6737
|
return;
|
|
6716
6738
|
}
|
|
6717
|
-
const S = l.value.findIndex((Z) => Z._index ===
|
|
6718
|
-
|
|
6739
|
+
const S = l.value.findIndex((Z) => Z._index === d.value), H = ((S >= 0 ? S : M > 0 ? -1 : 0) + M + l.value.length) % l.value.length;
|
|
6740
|
+
d.value = l.value[H]._index;
|
|
6719
6741
|
}, I = (M) => {
|
|
6720
|
-
if (
|
|
6742
|
+
if (d.value < 0)
|
|
6721
6743
|
return;
|
|
6722
|
-
const S = m.value.find((F) => F._index ===
|
|
6744
|
+
const S = m.value.find((F) => F._index === d.value);
|
|
6723
6745
|
S && L(S, M);
|
|
6724
6746
|
}, O = (M) => {
|
|
6725
6747
|
if (M.key === "ArrowDown") {
|
|
@@ -6748,10 +6770,10 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6748
6770
|
return ve(
|
|
6749
6771
|
() => e.modelValue,
|
|
6750
6772
|
(M) => {
|
|
6751
|
-
v.value && (
|
|
6773
|
+
v.value && (u.value = !!M);
|
|
6752
6774
|
},
|
|
6753
6775
|
{ immediate: !0 }
|
|
6754
|
-
), ve(
|
|
6776
|
+
), ve(u, async (M) => {
|
|
6755
6777
|
if (M) {
|
|
6756
6778
|
t("open"), r.value = "", k(), await _();
|
|
6757
6779
|
return;
|
|
@@ -6760,7 +6782,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6760
6782
|
}), ve(
|
|
6761
6783
|
() => m.value,
|
|
6762
6784
|
() => {
|
|
6763
|
-
m.value.some((S) => S._index ===
|
|
6785
|
+
m.value.some((S) => S._index === d.value && !S.disabled) || k();
|
|
6764
6786
|
},
|
|
6765
6787
|
{ deep: !0 }
|
|
6766
6788
|
), Ve(() => {
|
|
@@ -6803,12 +6825,12 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6803
6825
|
(c(!0), b(fe, null, he(F.items, (H) => (c(), b("button", {
|
|
6804
6826
|
key: H._key,
|
|
6805
6827
|
class: ee(["vf-command-palette__item", {
|
|
6806
|
-
"is-active": H._index ===
|
|
6828
|
+
"is-active": H._index === d.value,
|
|
6807
6829
|
"is-disabled": H.disabled
|
|
6808
6830
|
}]),
|
|
6809
6831
|
type: "button",
|
|
6810
6832
|
role: "option",
|
|
6811
|
-
"aria-selected": H._index ===
|
|
6833
|
+
"aria-selected": H._index === d.value,
|
|
6812
6834
|
disabled: H.disabled,
|
|
6813
6835
|
onClick: (Z) => L(H, Z)
|
|
6814
6836
|
}, [
|
|
@@ -6822,7 +6844,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6822
6844
|
])
|
|
6823
6845
|
], 40, Xl)
|
|
6824
6846
|
], 512), [
|
|
6825
|
-
[Se,
|
|
6847
|
+
[Se, u.value]
|
|
6826
6848
|
])
|
|
6827
6849
|
]));
|
|
6828
6850
|
}
|
|
@@ -6864,7 +6886,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6864
6886
|
},
|
|
6865
6887
|
emits: ["update:modelValue", "update:items", "open", "close", "click", "read", "readAll", "clear"],
|
|
6866
6888
|
setup(n, { emit: o }) {
|
|
6867
|
-
const a = o, e = n, t = G(null), i = G([]), s = f(() => i.value.filter((z) => !z.read).length),
|
|
6889
|
+
const a = o, e = n, t = G(null), i = G([]), s = f(() => i.value.filter((z) => !z.read).length), u = f(() => s.value > 0), r = (z) => z.map((C) => ({
|
|
6868
6890
|
...C,
|
|
6869
6891
|
read: !!C.read
|
|
6870
6892
|
}));
|
|
@@ -6875,7 +6897,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6875
6897
|
},
|
|
6876
6898
|
{ deep: !0, immediate: !0 }
|
|
6877
6899
|
);
|
|
6878
|
-
const
|
|
6900
|
+
const d = () => {
|
|
6879
6901
|
a(
|
|
6880
6902
|
"update:items",
|
|
6881
6903
|
i.value.map((z) => ({ ...z }))
|
|
@@ -6907,17 +6929,17 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6907
6929
|
...w,
|
|
6908
6930
|
read: !w.read
|
|
6909
6931
|
}), g = C.find((w) => w.id === z);
|
|
6910
|
-
i.value = C,
|
|
6932
|
+
i.value = C, d(), g && a("read", g, g.read);
|
|
6911
6933
|
}, k = () => {
|
|
6912
|
-
|
|
6934
|
+
u.value && (i.value = i.value.map((z) => ({
|
|
6913
6935
|
...z,
|
|
6914
6936
|
read: !0
|
|
6915
|
-
})),
|
|
6937
|
+
})), d(), a("readAll", i.value));
|
|
6916
6938
|
}, y = () => {
|
|
6917
6939
|
if (!i.value.length)
|
|
6918
6940
|
return;
|
|
6919
6941
|
const z = i.value.map((C) => ({ ...C }));
|
|
6920
|
-
i.value = [],
|
|
6942
|
+
i.value = [], d(), a("clear", z);
|
|
6921
6943
|
};
|
|
6922
6944
|
return (z, C) => (c(), be(Le, { to: "body" }, [
|
|
6923
6945
|
ze(B("div", sn, [
|
|
@@ -6943,7 +6965,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
6943
6965
|
B("button", {
|
|
6944
6966
|
type: "button",
|
|
6945
6967
|
class: "vf-notification-center__action",
|
|
6946
|
-
disabled: !
|
|
6968
|
+
disabled: !u.value,
|
|
6947
6969
|
onClick: k
|
|
6948
6970
|
}, j(z.markAllLabel), 9, mn),
|
|
6949
6971
|
B("button", {
|
|
@@ -7024,22 +7046,22 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7024
7046
|
},
|
|
7025
7047
|
emits: ["update:modelValue", "sidebar-toggle", "breakpoint-change"],
|
|
7026
7048
|
setup(n, { emit: o }) {
|
|
7027
|
-
const a = o, e = n, t = Xe(), i = f(() => !!t.footer), s = G(!!e.modelValue),
|
|
7049
|
+
const a = o, e = n, t = Xe(), i = f(() => !!t.footer), s = G(!!e.modelValue), u = G(!1), r = G(!1), d = f(() => ({
|
|
7028
7050
|
"--vf-app-shell-sidebar-width-prop": e.sidebarWidth,
|
|
7029
7051
|
"--vf-app-shell-sidebar-collapsed-width-prop": e.sidebarCollapsedWidth
|
|
7030
7052
|
})), v = () => {
|
|
7031
7053
|
if (typeof window > "u")
|
|
7032
7054
|
return;
|
|
7033
7055
|
const _ = window.innerWidth < e.mobileBreakpoint;
|
|
7034
|
-
_ !==
|
|
7056
|
+
_ !== u.value && (u.value = _, a("breakpoint-change", _)), _ || (r.value = !1);
|
|
7035
7057
|
}, p = () => {
|
|
7036
7058
|
a("sidebar-toggle", {
|
|
7037
|
-
mobile:
|
|
7059
|
+
mobile: u.value,
|
|
7038
7060
|
collapsed: s.value,
|
|
7039
|
-
open:
|
|
7061
|
+
open: u.value ? r.value : !s.value
|
|
7040
7062
|
});
|
|
7041
7063
|
}, m = () => {
|
|
7042
|
-
if (
|
|
7064
|
+
if (u.value) {
|
|
7043
7065
|
r.value = !r.value, p();
|
|
7044
7066
|
return;
|
|
7045
7067
|
}
|
|
@@ -7058,24 +7080,24 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7058
7080
|
typeof window < "u" && (window.removeEventListener("resize", v, !1), window.removeEventListener("keydown", l, !1));
|
|
7059
7081
|
}), (_, k) => (c(), b("div", {
|
|
7060
7082
|
class: ee(["vf-app-shell", {
|
|
7061
|
-
"vf-app-shell_collapsed": !
|
|
7062
|
-
"vf-app-shell_mobile":
|
|
7063
|
-
"vf-app-shell_mobile-open":
|
|
7083
|
+
"vf-app-shell_collapsed": !u.value && s.value,
|
|
7084
|
+
"vf-app-shell_mobile": u.value,
|
|
7085
|
+
"vf-app-shell_mobile-open": u.value && r.value,
|
|
7064
7086
|
"vf-app-shell_sticky-header": _.stickyHeader,
|
|
7065
7087
|
"vf-app-shell_full-height": _.fullHeight
|
|
7066
7088
|
}]),
|
|
7067
|
-
style: ke(
|
|
7089
|
+
style: ke(d.value)
|
|
7068
7090
|
}, [
|
|
7069
7091
|
B("aside", {
|
|
7070
7092
|
class: "vf-app-shell__sidebar",
|
|
7071
|
-
"aria-hidden":
|
|
7093
|
+
"aria-hidden": u.value && !r.value ? "true" : "false"
|
|
7072
7094
|
}, [
|
|
7073
7095
|
q(_.$slots, "sidebar", {
|
|
7074
|
-
mobile:
|
|
7096
|
+
mobile: u.value,
|
|
7075
7097
|
collapsed: s.value
|
|
7076
7098
|
})
|
|
7077
7099
|
], 8, Ln),
|
|
7078
|
-
|
|
7100
|
+
u.value && r.value ? (c(), b("button", {
|
|
7079
7101
|
key: 0,
|
|
7080
7102
|
type: "button",
|
|
7081
7103
|
class: "vf-app-shell__overlay",
|
|
@@ -7092,7 +7114,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7092
7114
|
}, j(_.toggleIcon), 9, Tn)) : Q("", !0),
|
|
7093
7115
|
B("div", In, [
|
|
7094
7116
|
q(_.$slots, "header", {
|
|
7095
|
-
mobile:
|
|
7117
|
+
mobile: u.value,
|
|
7096
7118
|
collapsed: s.value,
|
|
7097
7119
|
mobileSidebarOpen: r.value,
|
|
7098
7120
|
toggleSidebar: m
|
|
@@ -7107,7 +7129,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7107
7129
|
], 8, Dn),
|
|
7108
7130
|
i.value ? (c(), b("footer", Mn, [
|
|
7109
7131
|
q(_.$slots, "footer", {
|
|
7110
|
-
mobile:
|
|
7132
|
+
mobile: u.value,
|
|
7111
7133
|
collapsed: s.value
|
|
7112
7134
|
})
|
|
7113
7135
|
])) : Q("", !0)
|
|
@@ -7135,10 +7157,10 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7135
7157
|
},
|
|
7136
7158
|
emits: ["update:items", "move", "click"],
|
|
7137
7159
|
setup(n, { emit: o }) {
|
|
7138
|
-
const a = o, e = n, t = G([]), i = G(null), s = G(null),
|
|
7160
|
+
const a = o, e = n, t = G([]), i = G(null), s = G(null), u = f(() => e.columns ?? []), r = (y) => y.map((z) => ({
|
|
7139
7161
|
...z,
|
|
7140
7162
|
tags: z.tags ? [...z.tags] : []
|
|
7141
|
-
})),
|
|
7163
|
+
})), d = (y) => t.value.filter((z) => String(z.columnId) === String(y)), v = (y, z, C) => {
|
|
7142
7164
|
const g = [];
|
|
7143
7165
|
return y.forEach((w, L) => {
|
|
7144
7166
|
String(w.columnId) === String(z) && g.push(L);
|
|
@@ -7185,7 +7207,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7185
7207
|
"aria-label": y.ariaLabel || void 0
|
|
7186
7208
|
}, [
|
|
7187
7209
|
B("div", Pn, [
|
|
7188
|
-
(c(!0), b(fe, null, he(
|
|
7210
|
+
(c(!0), b(fe, null, he(u.value, (C) => (c(), b("section", {
|
|
7189
7211
|
key: String(C.id),
|
|
7190
7212
|
class: "vf-kanban-board__column",
|
|
7191
7213
|
"data-column-id": String(C.id)
|
|
@@ -7193,10 +7215,10 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7193
7215
|
B("header", On, [
|
|
7194
7216
|
q(y.$slots, "column-header", {
|
|
7195
7217
|
column: C,
|
|
7196
|
-
items:
|
|
7218
|
+
items: d(C.id)
|
|
7197
7219
|
}, () => [
|
|
7198
7220
|
B("h3", An, j(C.title), 1),
|
|
7199
|
-
B("span", Hn, j(
|
|
7221
|
+
B("span", Hn, j(d(C.id).length), 1)
|
|
7200
7222
|
])
|
|
7201
7223
|
]),
|
|
7202
7224
|
B("ul", {
|
|
@@ -7205,7 +7227,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7205
7227
|
}, ["prevent"])),
|
|
7206
7228
|
onDrop: ie((g) => k(C.id, g), ["prevent"])
|
|
7207
7229
|
}, [
|
|
7208
|
-
(c(!0), b(fe, null, he(
|
|
7230
|
+
(c(!0), b(fe, null, he(d(C.id), (g, w) => (c(), b("li", {
|
|
7209
7231
|
key: String(g.id),
|
|
7210
7232
|
class: ee(["vf-kanban-board__item", {
|
|
7211
7233
|
"is-dragging": i.value === g.id,
|
|
@@ -7242,7 +7264,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7242
7264
|
];
|
|
7243
7265
|
})
|
|
7244
7266
|
], 42, Kn))), 128)),
|
|
7245
|
-
|
|
7267
|
+
d(C.id).length ? Q("", !0) : (c(), b("li", Xn, [
|
|
7246
7268
|
q(y.$slots, "empty-column", { column: C }, () => [
|
|
7247
7269
|
me(j(y.emptyColumnText), 1)
|
|
7248
7270
|
])
|
|
@@ -7251,7 +7273,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7251
7273
|
B("footer", Un, [
|
|
7252
7274
|
q(y.$slots, "column-footer", {
|
|
7253
7275
|
column: C,
|
|
7254
|
-
items:
|
|
7276
|
+
items: d(C.id)
|
|
7255
7277
|
})
|
|
7256
7278
|
])
|
|
7257
7279
|
], 8, En))), 128))
|
|
@@ -7273,9 +7295,9 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7273
7295
|
setup(n) {
|
|
7274
7296
|
const o = n;
|
|
7275
7297
|
let a = 0;
|
|
7276
|
-
const e = G(null), t = G(null), i = G(!1), s = G("top"),
|
|
7298
|
+
const e = G(null), t = G(null), i = G(!1), s = G("top"), u = `vf-tooltip-${++a}`;
|
|
7277
7299
|
let r = null;
|
|
7278
|
-
const
|
|
7300
|
+
const d = () => {
|
|
7279
7301
|
o.disabled || (i.value = !0);
|
|
7280
7302
|
}, v = () => {
|
|
7281
7303
|
i.value = !1;
|
|
@@ -7326,17 +7348,17 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7326
7348
|
ref_key: "trigger",
|
|
7327
7349
|
ref: e,
|
|
7328
7350
|
class: "vf-tooltip__trigger",
|
|
7329
|
-
"aria-describedby":
|
|
7330
|
-
onMouseenter:
|
|
7351
|
+
"aria-describedby": u,
|
|
7352
|
+
onMouseenter: d,
|
|
7331
7353
|
onMouseleave: v,
|
|
7332
|
-
onFocus:
|
|
7354
|
+
onFocus: d,
|
|
7333
7355
|
onBlur: v
|
|
7334
7356
|
}, [
|
|
7335
7357
|
q($.$slots, "default")
|
|
7336
7358
|
], 544),
|
|
7337
7359
|
(c(), be(Le, { to: "body" }, [
|
|
7338
7360
|
ze(B("div", {
|
|
7339
|
-
id:
|
|
7361
|
+
id: u,
|
|
7340
7362
|
ref_key: "panel",
|
|
7341
7363
|
ref: t,
|
|
7342
7364
|
class: "vf-tooltip",
|
|
@@ -7389,18 +7411,18 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7389
7411
|
},
|
|
7390
7412
|
emits: ["update:modelValue", "open", "close", "stepChange", "next", "prev", "complete", "skip"],
|
|
7391
7413
|
setup(n, { emit: o }) {
|
|
7392
|
-
const a = o, e = n, t = G(null), i = G(0), s = G("bottom"),
|
|
7393
|
-
let
|
|
7414
|
+
const a = o, e = n, t = G(null), i = G(0), s = G("bottom"), u = G({}), r = G(null);
|
|
7415
|
+
let d = null;
|
|
7394
7416
|
const v = f(() => e.steps.length), p = f(() => {
|
|
7395
7417
|
if (v.value)
|
|
7396
7418
|
return e.steps[i.value];
|
|
7397
7419
|
}), m = f(() => i.value <= 0), $ = f(() => i.value >= v.value - 1), l = f(() => !!r.value), _ = (D) => v.value ? Math.min(v.value - 1, Math.max(0, D)) : 0, k = (D) => !D || typeof document > "u" ? null : typeof D == "string" ? document.querySelector(D) : D, y = () => {
|
|
7398
7420
|
if (!r.value) {
|
|
7399
|
-
|
|
7421
|
+
u.value = {};
|
|
7400
7422
|
return;
|
|
7401
7423
|
}
|
|
7402
7424
|
const D = r.value.getBoundingClientRect(), M = e.spotlightPadding;
|
|
7403
|
-
|
|
7425
|
+
u.value = {
|
|
7404
7426
|
top: `${D.top - M}px`,
|
|
7405
7427
|
left: `${D.left - M}px`,
|
|
7406
7428
|
width: `${D.width + M * 2}px`,
|
|
@@ -7440,15 +7462,15 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7440
7462
|
}), W = () => {
|
|
7441
7463
|
Z();
|
|
7442
7464
|
};
|
|
7443
|
-
document.addEventListener("scroll", W, !0), window.addEventListener("resize", W, !1),
|
|
7465
|
+
document.addEventListener("scroll", W, !0), window.addEventListener("resize", W, !1), d = {
|
|
7444
7466
|
update: Z,
|
|
7445
7467
|
destroy: () => {
|
|
7446
7468
|
x(), document.removeEventListener("scroll", W, !0), window.removeEventListener("resize", W, !1);
|
|
7447
7469
|
}
|
|
7448
|
-
},
|
|
7470
|
+
}, d.update();
|
|
7449
7471
|
}, g = async () => {
|
|
7450
7472
|
var D;
|
|
7451
|
-
|
|
7473
|
+
d == null || d.destroy(), d = null, r.value = k((D = p.value) == null ? void 0 : D.target), await $e(), C();
|
|
7452
7474
|
}, w = (D) => {
|
|
7453
7475
|
a("update:modelValue", !1), a("close", D);
|
|
7454
7476
|
}, L = (D, M) => {
|
|
@@ -7472,7 +7494,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7472
7494
|
return ve(
|
|
7473
7495
|
() => e.modelValue,
|
|
7474
7496
|
async (D) => {
|
|
7475
|
-
D ? (i.value = _(e.startIndex), a("open"), a("stepChange", i.value, p.value), await g(), document.addEventListener("keydown", T, !1)) : (
|
|
7497
|
+
D ? (i.value = _(e.startIndex), a("open"), a("stepChange", i.value, p.value), await g(), document.addEventListener("keydown", T, !1)) : (d == null || d.destroy(), d = null, u.value = {}, r.value = null, document.removeEventListener("keydown", T, !1));
|
|
7476
7498
|
},
|
|
7477
7499
|
{ immediate: !0 }
|
|
7478
7500
|
), ve(
|
|
@@ -7482,7 +7504,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7482
7504
|
},
|
|
7483
7505
|
{ deep: !0 }
|
|
7484
7506
|
), we(() => {
|
|
7485
|
-
|
|
7507
|
+
d == null || d.destroy(), d = null, typeof document < "u" && document.removeEventListener("keydown", T, !1);
|
|
7486
7508
|
}), (D, M) => {
|
|
7487
7509
|
var S, F;
|
|
7488
7510
|
return c(), be(Le, { to: "body" }, [
|
|
@@ -7494,7 +7516,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7494
7516
|
D.mask && l.value ? (c(), b("div", {
|
|
7495
7517
|
key: 0,
|
|
7496
7518
|
class: "vf-tour__spotlight",
|
|
7497
|
-
style: ke(
|
|
7519
|
+
style: ke(u.value)
|
|
7498
7520
|
}, null, 4)) : Q("", !0),
|
|
7499
7521
|
B("div", {
|
|
7500
7522
|
ref_key: "panel",
|
|
@@ -7577,8 +7599,8 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7577
7599
|
if (!(i == null || i === ""))
|
|
7578
7600
|
return typeof i == "number" ? `${i}px` : i;
|
|
7579
7601
|
}, e = f(() => {
|
|
7580
|
-
const i = a(o.width), s = a(o.height),
|
|
7581
|
-
return i && (
|
|
7602
|
+
const i = a(o.width), s = a(o.height), u = {};
|
|
7603
|
+
return i && (u.width = i), s && (u.height = s), o.variant === "circle" && (!i && s && (u.width = s), !s && i && (u.height = i)), u;
|
|
7582
7604
|
}), t = f(() => {
|
|
7583
7605
|
const i = ["vf-skeleton", `vf-skeleton_${o.variant}`];
|
|
7584
7606
|
return o.animated && i.push("vf-skeleton_animated"), i;
|
|
@@ -7614,7 +7636,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7614
7636
|
ariaLabel: { default: "" }
|
|
7615
7637
|
},
|
|
7616
7638
|
setup(n) {
|
|
7617
|
-
const o = n, a = Xe(), e = ($) => Math.min(100, Math.max(0, $)), t = f(() => o.value === void 0 || o.value === null || Number.isNaN(o.value)), i = f(() => t.value ? 0 : e(Number(o.value))), s = f(() => t.value ? void 0 : i.value),
|
|
7639
|
+
const o = n, a = Xe(), e = ($) => Math.min(100, Math.max(0, $)), t = f(() => o.value === void 0 || o.value === null || Number.isNaN(o.value)), i = f(() => t.value ? 0 : e(Number(o.value))), s = f(() => t.value ? void 0 : i.value), u = f(() => !!a.default), r = f(() => o.label ? o.label : o.showValue && !t.value ? `${Math.round(i.value)}%` : ""), d = f(() => {
|
|
7618
7640
|
const $ = ["vf-progress", `vf-progress_${o.variant}`, `vf-progress_size-${o.size}`];
|
|
7619
7641
|
return t.value && $.push("vf-progress_indeterminate"), $;
|
|
7620
7642
|
}), v = f(() => {
|
|
@@ -7633,7 +7655,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7633
7655
|
};
|
|
7634
7656
|
});
|
|
7635
7657
|
return ($, l) => (c(), b("div", {
|
|
7636
|
-
class: ee(
|
|
7658
|
+
class: ee(d.value),
|
|
7637
7659
|
role: "progressbar",
|
|
7638
7660
|
"aria-label": $.ariaLabel || void 0,
|
|
7639
7661
|
"aria-valuemin": "0",
|
|
@@ -7663,7 +7685,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7663
7685
|
}, null, 4)
|
|
7664
7686
|
]))
|
|
7665
7687
|
])),
|
|
7666
|
-
r.value ||
|
|
7688
|
+
r.value || u.value ? (c(), b("span", cs, [
|
|
7667
7689
|
q($.$slots, "default", {}, () => [
|
|
7668
7690
|
me(j(r.value), 1)
|
|
7669
7691
|
])
|
|
@@ -7717,7 +7739,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7717
7739
|
}), i = (s) => {
|
|
7718
7740
|
e.disabled || a("close", s);
|
|
7719
7741
|
};
|
|
7720
|
-
return (s,
|
|
7742
|
+
return (s, u) => (c(), b("span", {
|
|
7721
7743
|
class: ee(["vf-chip", t.value]),
|
|
7722
7744
|
"data-variant": s.variant,
|
|
7723
7745
|
"data-severity": s.severity,
|
|
@@ -7743,7 +7765,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7743
7765
|
onClick: i
|
|
7744
7766
|
}, [
|
|
7745
7767
|
q(s.$slots, "close", {}, () => [
|
|
7746
|
-
|
|
7768
|
+
u[0] || (u[0] = me("×"))
|
|
7747
7769
|
])
|
|
7748
7770
|
], 8, gs)) : Q("", !0)
|
|
7749
7771
|
], 10, fs));
|
|
@@ -7773,7 +7795,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7773
7795
|
const a = o, e = n, t = f(() => e.multiple ? Array.isArray(e.modelValue) ? e.modelValue : [] : e.modelValue === null || Array.isArray(e.modelValue) || e.modelValue === void 0 ? [] : [e.modelValue]), i = f(() => t.value.length > 0), s = f(() => {
|
|
7774
7796
|
const v = ["vf-filter-chips", `vf-filter-chips_${e.variant}`];
|
|
7775
7797
|
return e.wrap || v.push("vf-filter-chips_nowrap"), e.size !== "normal" && v.push(`vf-filter-chips_${e.size}`), e.disabled && v.push("vf-filter-chips_disabled"), v;
|
|
7776
|
-
}),
|
|
7798
|
+
}), u = (v) => t.value.includes(v), r = (v, p) => {
|
|
7777
7799
|
if (e.disabled)
|
|
7778
7800
|
return;
|
|
7779
7801
|
const m = e.options.find(($) => $.value === v);
|
|
@@ -7785,7 +7807,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7785
7807
|
a("update:modelValue", l), a("change", l, p);
|
|
7786
7808
|
return;
|
|
7787
7809
|
}
|
|
7788
|
-
if (
|
|
7810
|
+
if (u(v)) {
|
|
7789
7811
|
if (!e.allowEmpty)
|
|
7790
7812
|
return;
|
|
7791
7813
|
a("update:modelValue", null), a("change", null, p);
|
|
@@ -7793,7 +7815,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7793
7815
|
}
|
|
7794
7816
|
a("update:modelValue", v), a("change", v, p);
|
|
7795
7817
|
}
|
|
7796
|
-
},
|
|
7818
|
+
}, d = (v) => {
|
|
7797
7819
|
if (e.disabled)
|
|
7798
7820
|
return;
|
|
7799
7821
|
const p = e.multiple ? [] : null;
|
|
@@ -7807,7 +7829,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7807
7829
|
}, [
|
|
7808
7830
|
(c(!0), b(fe, null, he(v.options, (m) => (c(), b("button", {
|
|
7809
7831
|
key: String(m.value),
|
|
7810
|
-
class: ee(["vf-filter-chips__chip", { "is-active":
|
|
7832
|
+
class: ee(["vf-filter-chips__chip", { "is-active": u(m.value) }]),
|
|
7811
7833
|
type: "button",
|
|
7812
7834
|
disabled: v.disabled || m.disabled,
|
|
7813
7835
|
"data-value": String(m.value),
|
|
@@ -7822,7 +7844,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7822
7844
|
type: "button",
|
|
7823
7845
|
disabled: v.disabled,
|
|
7824
7846
|
"aria-label": v.clearLabel || "Clear filters",
|
|
7825
|
-
onClick:
|
|
7847
|
+
onClick: d
|
|
7826
7848
|
}, j(v.clearText), 9, ks)) : Q("", !0)
|
|
7827
7849
|
], 10, bs));
|
|
7828
7850
|
}
|
|
@@ -7840,8 +7862,8 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7840
7862
|
status: { default: void 0 }
|
|
7841
7863
|
},
|
|
7842
7864
|
setup(n) {
|
|
7843
|
-
const o = n, a = G(!1), e = (
|
|
7844
|
-
const v =
|
|
7865
|
+
const o = n, a = G(!1), e = (d) => {
|
|
7866
|
+
const v = d.trim();
|
|
7845
7867
|
if (!v)
|
|
7846
7868
|
return "";
|
|
7847
7869
|
const p = v.split(/\s+/).filter(Boolean);
|
|
@@ -7851,7 +7873,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7851
7873
|
return o.alt;
|
|
7852
7874
|
if (o.name)
|
|
7853
7875
|
return o.name;
|
|
7854
|
-
}),
|
|
7876
|
+
}), u = f(() => [`vf-avatar_size-${o.size}`, `vf-avatar_shape-${o.shape}`]), r = () => {
|
|
7855
7877
|
a.value = !0;
|
|
7856
7878
|
};
|
|
7857
7879
|
return ve(
|
|
@@ -7859,27 +7881,27 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7859
7881
|
() => {
|
|
7860
7882
|
a.value = !1;
|
|
7861
7883
|
}
|
|
7862
|
-
), (
|
|
7863
|
-
class: ee(["vf-avatar",
|
|
7864
|
-
"data-status":
|
|
7884
|
+
), (d, v) => (c(), b("div", {
|
|
7885
|
+
class: ee(["vf-avatar", u.value]),
|
|
7886
|
+
"data-status": d.status || void 0,
|
|
7865
7887
|
role: "img",
|
|
7866
7888
|
"aria-label": s.value
|
|
7867
7889
|
}, [
|
|
7868
7890
|
B("div", ws, [
|
|
7869
|
-
q(
|
|
7891
|
+
q(d.$slots, "default", {}, () => [
|
|
7870
7892
|
i.value ? (c(), b("img", {
|
|
7871
7893
|
key: 0,
|
|
7872
7894
|
class: "vf-avatar__image",
|
|
7873
|
-
src:
|
|
7874
|
-
alt:
|
|
7895
|
+
src: d.src,
|
|
7896
|
+
alt: d.alt || d.name || "",
|
|
7875
7897
|
onError: r
|
|
7876
7898
|
}, null, 40, $s)) : (c(), b("span", zs, j(t.value), 1))
|
|
7877
7899
|
])
|
|
7878
7900
|
]),
|
|
7879
|
-
|
|
7901
|
+
d.status ? (c(), b("span", {
|
|
7880
7902
|
key: 0,
|
|
7881
7903
|
class: "vf-avatar__status",
|
|
7882
|
-
"data-status":
|
|
7904
|
+
"data-status": d.status,
|
|
7883
7905
|
"aria-hidden": "true"
|
|
7884
7906
|
}, null, 8, Ss)) : Q("", !0)
|
|
7885
7907
|
], 10, Cs));
|
|
@@ -7899,13 +7921,13 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7899
7921
|
},
|
|
7900
7922
|
setup(n) {
|
|
7901
7923
|
const o = n, a = Xe(), e = f(() => !!a.default), t = f(() => o.label || ""), i = f(() => ["vf-spinner", `vf-spinner_${o.variant}`, `vf-spinner_size-${o.size}`]);
|
|
7902
|
-
return (s,
|
|
7924
|
+
return (s, u) => (c(), b("div", {
|
|
7903
7925
|
class: ee(i.value),
|
|
7904
7926
|
role: "status",
|
|
7905
7927
|
"aria-label": s.ariaLabel || void 0,
|
|
7906
7928
|
"data-severity": s.severity
|
|
7907
7929
|
}, [
|
|
7908
|
-
|
|
7930
|
+
u[0] || (u[0] = B("span", {
|
|
7909
7931
|
class: "vf-spinner__icon",
|
|
7910
7932
|
"aria-hidden": "true"
|
|
7911
7933
|
}, null, -1)),
|
|
@@ -7983,7 +8005,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7983
8005
|
"bulkAction"
|
|
7984
8006
|
],
|
|
7985
8007
|
setup(n, { expose: o, emit: a }) {
|
|
7986
|
-
const e = n, t = a, i = G(e.sortField ?? null), s = G(e.sortOrder ?? null),
|
|
8008
|
+
const e = n, t = a, i = G(e.sortField ?? null), s = G(e.sortOrder ?? null), u = G(Math.max(1, e.page ?? 1)), r = G(Math.max(1, e.pageSize ?? 10)), d = G({ ...e.filters ?? {} }), v = G(e.selection ?? null);
|
|
7987
8009
|
ve(
|
|
7988
8010
|
() => e.sortField,
|
|
7989
8011
|
(N) => {
|
|
@@ -7997,7 +8019,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
7997
8019
|
), ve(
|
|
7998
8020
|
() => e.page,
|
|
7999
8021
|
(N) => {
|
|
8000
|
-
|
|
8022
|
+
u.value = Math.max(1, N ?? 1);
|
|
8001
8023
|
}
|
|
8002
8024
|
), ve(
|
|
8003
8025
|
() => e.pageSize,
|
|
@@ -8007,7 +8029,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8007
8029
|
), ve(
|
|
8008
8030
|
() => e.filters,
|
|
8009
8031
|
(N) => {
|
|
8010
|
-
|
|
8032
|
+
d.value = { ...N ?? {} };
|
|
8011
8033
|
},
|
|
8012
8034
|
{ deep: !0 }
|
|
8013
8035
|
), ve(
|
|
@@ -8017,7 +8039,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8017
8039
|
},
|
|
8018
8040
|
{ deep: !0 }
|
|
8019
8041
|
);
|
|
8020
|
-
const p = f(() => i.value), m = f(() => s.value), $ = f(() =>
|
|
8042
|
+
const p = f(() => i.value), m = f(() => s.value), $ = f(() => u.value), l = f(() => r.value), _ = f(() => d.value), k = f(() => e.selectionMode === "single" || e.selectionMode === "multiple"), y = f(() => Math.max(1, e.columns.length + (k.value ? 1 : 0))), z = f(() => e.selectionMode === "single" ? v.value == null ? [] : [v.value] : e.selectionMode === "multiple" ? Array.isArray(v.value) ? v.value : [] : []), C = f(() => {
|
|
8021
8043
|
const N = new Set(z.value);
|
|
8022
8044
|
return (e.rows ?? []).filter((oe, le) => {
|
|
8023
8045
|
const ge = T(oe, le);
|
|
@@ -8120,12 +8142,12 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8120
8142
|
t("rowClick", N, oe, le);
|
|
8121
8143
|
}, U = (N) => {
|
|
8122
8144
|
const oe = Math.max(1, Number(N) || 1);
|
|
8123
|
-
|
|
8145
|
+
u.value = oe, t("update:page", oe), t("page", oe), e.server && t("request", O());
|
|
8124
8146
|
}, X = (N) => {
|
|
8125
8147
|
const oe = Math.max(1, Number(N) || 1);
|
|
8126
8148
|
r.value = oe, t("update:pageSize", oe), t("page", $.value), e.server && t("request", O());
|
|
8127
8149
|
}, re = (N) => {
|
|
8128
|
-
|
|
8150
|
+
d.value = { ...N ?? {} }, t("update:filters", { ...d.value }), t("filter", { ...d.value }), e.server && t("request", O());
|
|
8129
8151
|
}, de = () => {
|
|
8130
8152
|
re({});
|
|
8131
8153
|
}, ye = () => {
|
|
@@ -8306,11 +8328,11 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8306
8328
|
},
|
|
8307
8329
|
emits: ["update:modelValue", "input", "change", "focus", "blur"],
|
|
8308
8330
|
setup(n, { emit: o }) {
|
|
8309
|
-
const a = o, e = n, t = f(() => e.range || Array.isArray(e.modelValue)), i = f(() => Number.isFinite(e.min) ? e.min : 0), s = f(() => Number.isFinite(e.max) ? e.max : 100),
|
|
8331
|
+
const a = o, e = n, t = f(() => e.range || Array.isArray(e.modelValue)), i = f(() => Number.isFinite(e.min) ? e.min : 0), s = f(() => Number.isFinite(e.max) ? e.max : 100), u = f(() => e.step && e.step > 0 ? e.step : 1), r = (x) => {
|
|
8310
8332
|
const W = x.toString();
|
|
8311
8333
|
return W.includes(".") ? W.split(".")[1].length : 0;
|
|
8312
|
-
},
|
|
8313
|
-
const W = Number(x), h = i.value, P = Number.isFinite(W) ? W : h, K =
|
|
8334
|
+
}, d = (x) => Math.min(s.value, Math.max(i.value, x)), v = (x) => {
|
|
8335
|
+
const W = Number(x), h = i.value, P = Number.isFinite(W) ? W : h, K = d(P), A = u.value, V = r(A), Y = Math.round((K - i.value) / A) * A + i.value;
|
|
8314
8336
|
return Number.parseFloat(Y.toFixed(V));
|
|
8315
8337
|
}, p = f(() => {
|
|
8316
8338
|
if (!t.value) {
|
|
@@ -8366,7 +8388,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8366
8388
|
}, E = (x) => {
|
|
8367
8389
|
const W = x.target;
|
|
8368
8390
|
L(W.value, "end", x, "change");
|
|
8369
|
-
}, T = (x) => a("focus", x), D = (x) => a("blur", x), M = f(() => e.marks ?? []), S = (x) => ({ left: `${l(
|
|
8391
|
+
}, T = (x) => a("focus", x), D = (x) => a("blur", x), M = f(() => e.marks ?? []), S = (x) => ({ left: `${l(d(x))}%` }), F = f(() => t.value ? `${p.value[0]} - ${p.value[1]}` : `${m.value}`), H = f(() => t.value ? e.ariaLabelStart : e.ariaLabel), Z = f(() => t.value ? e.ariaLabelEnd : e.ariaLabel);
|
|
8370
8392
|
return (x, W) => (c(), b("div", {
|
|
8371
8393
|
class: ee(z.value),
|
|
8372
8394
|
style: ke(y.value)
|
|
@@ -8380,7 +8402,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8380
8402
|
type: "range",
|
|
8381
8403
|
min: i.value,
|
|
8382
8404
|
max: s.value,
|
|
8383
|
-
step:
|
|
8405
|
+
step: u.value,
|
|
8384
8406
|
value: m.value,
|
|
8385
8407
|
disabled: x.disabled,
|
|
8386
8408
|
"aria-label": H.value,
|
|
@@ -8396,7 +8418,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8396
8418
|
type: "range",
|
|
8397
8419
|
min: i.value,
|
|
8398
8420
|
max: s.value,
|
|
8399
|
-
step:
|
|
8421
|
+
step: u.value,
|
|
8400
8422
|
value: $.value,
|
|
8401
8423
|
disabled: x.disabled,
|
|
8402
8424
|
"aria-label": Z.value,
|
|
@@ -8432,7 +8454,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8432
8454
|
setup(n, { emit: o }) {
|
|
8433
8455
|
const a = n, e = o;
|
|
8434
8456
|
let t = 0;
|
|
8435
|
-
const i = G(null), s = G([]),
|
|
8457
|
+
const i = G(null), s = G([]), u = G([]), r = G(null), d = (x) => typeof x == "number" ? `${x}px` : x, v = (x) => typeof x == "number" && Number.isFinite(x) && x > 0, p = (x, W, h) => Math.min(h, Math.max(W, x)), m = (x, W = 4) => {
|
|
8436
8458
|
const h = 10 ** W;
|
|
8437
8459
|
return Math.round(x * h) / h;
|
|
8438
8460
|
}, $ = (x) => {
|
|
@@ -8499,15 +8521,15 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8499
8521
|
return v(h) ? h : v(x.minSize) ? x.minSize : 5;
|
|
8500
8522
|
}), y = () => {
|
|
8501
8523
|
const x = s.value.length, W = _(x), h = l(W, k());
|
|
8502
|
-
|
|
8524
|
+
u.value = h;
|
|
8503
8525
|
}, z = f(() => {
|
|
8504
8526
|
const x = ["vf-splitter", `vf-splitter_${a.direction}`];
|
|
8505
8527
|
return a.disabled && x.push("vf-splitter_disabled"), x;
|
|
8506
|
-
}), C = f(() => Math.max(0, s.value.length - 1)), g = f(() => a.direction === "horizontal" ? "vertical" : "horizontal"), w = f(() =>
|
|
8528
|
+
}), C = f(() => Math.max(0, s.value.length - 1)), g = f(() => a.direction === "horizontal" ? "vertical" : "horizontal"), w = f(() => d(a.gutterSize)), L = (x) => {
|
|
8507
8529
|
const W = s.value.findIndex((K) => K.id === x);
|
|
8508
8530
|
if (W < 0)
|
|
8509
8531
|
return;
|
|
8510
|
-
const h = `${
|
|
8532
|
+
const h = `${u.value[W] ?? 0}%`, P = `${k()[W] ?? 0}%`;
|
|
8511
8533
|
return a.direction === "vertical" ? {
|
|
8512
8534
|
flex: `0 0 ${h}`,
|
|
8513
8535
|
minHeight: P
|
|
@@ -8515,7 +8537,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8515
8537
|
flex: `0 0 ${h}`,
|
|
8516
8538
|
minWidth: P
|
|
8517
8539
|
};
|
|
8518
|
-
}, R = (x) =>
|
|
8540
|
+
}, R = (x) => u.value.slice(0, x + 1).reduce((W, h) => W + h, 0), I = (x) => {
|
|
8519
8541
|
const W = R(x);
|
|
8520
8542
|
return a.direction === "vertical" ? {
|
|
8521
8543
|
top: `calc(${W}% - (${w.value} / 2))`,
|
|
@@ -8529,13 +8551,13 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8529
8551
|
width: w.value
|
|
8530
8552
|
};
|
|
8531
8553
|
}, O = (x, W, h = !0) => {
|
|
8532
|
-
const P = [...
|
|
8554
|
+
const P = [...u.value];
|
|
8533
8555
|
if (!P[x] || !P[x + 1])
|
|
8534
8556
|
return;
|
|
8535
8557
|
const K = k(), A = P[x] + P[x + 1], V = K[x] ?? 0, Y = K[x + 1] ?? 0, ae = p(P[x] + W, V, A - Y), se = A - ae;
|
|
8536
8558
|
P[x] = m(ae), P[x + 1] = m(se);
|
|
8537
8559
|
const U = l($(P), K);
|
|
8538
|
-
|
|
8560
|
+
u.value = U, h && e("update:modelValue", [...U]);
|
|
8539
8561
|
};
|
|
8540
8562
|
let E = 0, T = [0, 0];
|
|
8541
8563
|
const D = (x) => {
|
|
@@ -8544,28 +8566,28 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8544
8566
|
const W = i.value.getBoundingClientRect(), h = a.direction === "vertical" ? W.height : W.width;
|
|
8545
8567
|
if (h <= 0)
|
|
8546
8568
|
return;
|
|
8547
|
-
const K = ((a.direction === "vertical" ? x.clientY : x.clientX) - E) / h * 100, V = T[0] + K - (
|
|
8569
|
+
const K = ((a.direction === "vertical" ? x.clientY : x.clientX) - E) / h * 100, V = T[0] + K - (u.value[r.value] ?? 0);
|
|
8548
8570
|
O(r.value, V, !0);
|
|
8549
8571
|
}, M = () => {
|
|
8550
|
-
r.value !== null && (r.value = null, window.removeEventListener("mousemove", D), window.removeEventListener("mouseup", M), e("change", [...
|
|
8572
|
+
r.value !== null && (r.value = null, window.removeEventListener("mousemove", D), window.removeEventListener("mouseup", M), e("change", [...u.value]));
|
|
8551
8573
|
}, S = (x, W) => {
|
|
8552
|
-
a.disabled || !i.value || (r.value = W, E = a.direction === "vertical" ? x.clientY : x.clientX, T = [
|
|
8574
|
+
a.disabled || !i.value || (r.value = W, E = a.direction === "vertical" ? x.clientY : x.clientX, T = [u.value[W] ?? 0, u.value[W + 1] ?? 0], window.addEventListener("mousemove", D), window.addEventListener("mouseup", M));
|
|
8553
8575
|
}, F = (x, W) => {
|
|
8554
8576
|
if (a.disabled)
|
|
8555
8577
|
return;
|
|
8556
8578
|
const h = a.direction === "horizontal", P = h ? "ArrowLeft" : "ArrowUp", K = h ? "ArrowRight" : "ArrowDown";
|
|
8557
8579
|
if ([P, K, "Home", "End"].includes(x.key)) {
|
|
8558
8580
|
if (x.preventDefault(), x.key === "Home") {
|
|
8559
|
-
const A = k(), V =
|
|
8581
|
+
const A = k(), V = u.value[W] ?? 0, Y = A[W] ?? 0;
|
|
8560
8582
|
O(W, Y - V);
|
|
8561
8583
|
} else if (x.key === "End") {
|
|
8562
|
-
const A = k(), V = (
|
|
8584
|
+
const A = k(), V = (u.value[W] ?? 0) + (u.value[W + 1] ?? 0), Y = u.value[W] ?? 0, ae = V - (A[W + 1] ?? 0);
|
|
8563
8585
|
O(W, ae - Y);
|
|
8564
8586
|
} else {
|
|
8565
8587
|
const A = x.shiftKey ? 5 : 2, V = x.key === K ? A : -A;
|
|
8566
8588
|
O(W, V);
|
|
8567
8589
|
}
|
|
8568
|
-
e("change", [...
|
|
8590
|
+
e("change", [...u.value]);
|
|
8569
8591
|
}
|
|
8570
8592
|
}, H = (x) => {
|
|
8571
8593
|
const W = `vf-splitter-panel-${++t}`;
|
|
@@ -8586,13 +8608,13 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8586
8608
|
}), ve(
|
|
8587
8609
|
() => a.modelValue,
|
|
8588
8610
|
() => {
|
|
8589
|
-
r.value === null && a.modelValue.length === s.value.length && a.modelValue.every(v) && (
|
|
8611
|
+
r.value === null && a.modelValue.length === s.value.length && a.modelValue.every(v) && (u.value = l($(a.modelValue), k()));
|
|
8590
8612
|
},
|
|
8591
8613
|
{ deep: !0 }
|
|
8592
8614
|
), ve(
|
|
8593
8615
|
() => a.minSizes,
|
|
8594
8616
|
() => {
|
|
8595
|
-
|
|
8617
|
+
u.value = l($(u.value), k());
|
|
8596
8618
|
},
|
|
8597
8619
|
{ deep: !0 }
|
|
8598
8620
|
), we(() => {
|
|
@@ -8609,7 +8631,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8609
8631
|
style: ke(I(P)),
|
|
8610
8632
|
role: "separator",
|
|
8611
8633
|
"aria-orientation": g.value,
|
|
8612
|
-
"aria-valuenow": Math.round(
|
|
8634
|
+
"aria-valuenow": Math.round(u.value[P] ?? 0),
|
|
8613
8635
|
tabindex: "0",
|
|
8614
8636
|
onMousedown: ie((K) => S(K, P), ["prevent"]),
|
|
8615
8637
|
onKeydown: (K) => F(K, P)
|
|
@@ -8640,7 +8662,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8640
8662
|
a.direction.value === "vertical" ? "vf-splitter__panel_vertical" : "",
|
|
8641
8663
|
a.disabled.value ? "vf-splitter__panel_disabled" : ""
|
|
8642
8664
|
]), i = f(() => a.getPanelStyle(e));
|
|
8643
|
-
return (s,
|
|
8665
|
+
return (s, u) => (c(), b("div", {
|
|
8644
8666
|
class: ee(t.value),
|
|
8645
8667
|
style: ke(i.value)
|
|
8646
8668
|
}, [
|
|
@@ -8676,11 +8698,11 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8676
8698
|
return 0;
|
|
8677
8699
|
const g = t.value.findIndex((w, L) => i(w, L) === e.modelValue);
|
|
8678
8700
|
return g >= 0 ? g : 0;
|
|
8679
|
-
}),
|
|
8701
|
+
}), u = f(() => {
|
|
8680
8702
|
const g = ["vf-stepper", `vf-stepper_${e.orientation}`, `vf-stepper_size-${e.size}`];
|
|
8681
8703
|
return e.clickable && g.push("vf-stepper_clickable"), g;
|
|
8682
|
-
}), r = (g, w) => g.status ? g.status : w < s.value ? "completed" : w === s.value ? "active" : "upcoming",
|
|
8683
|
-
"is-active":
|
|
8704
|
+
}), r = (g, w) => g.status ? g.status : w < s.value ? "completed" : w === s.value ? "active" : "upcoming", d = (g) => r(t.value[g], g) === "active", v = (g) => r(t.value[g], g) === "completed", p = (g) => r(t.value[g], g) === "upcoming", m = (g, w) => r(g, w) === "error", $ = (g) => !!g.disabled, l = (g, w) => ({
|
|
8705
|
+
"is-active": d(w),
|
|
8684
8706
|
"is-completed": v(w),
|
|
8685
8707
|
"is-upcoming": p(w),
|
|
8686
8708
|
"is-error": m(g, w),
|
|
@@ -8692,7 +8714,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8692
8714
|
a("update:modelValue", R), a("change", R, g, w, L);
|
|
8693
8715
|
}, C = (g, w) => `${g.value ?? g.label ?? "step"}_${w.toString()}`;
|
|
8694
8716
|
return (g, w) => (c(), b("nav", {
|
|
8695
|
-
class: ee(
|
|
8717
|
+
class: ee(u.value),
|
|
8696
8718
|
"aria-label": g.ariaLabel || void 0,
|
|
8697
8719
|
"aria-labelledby": g.ariaLabelledby || void 0
|
|
8698
8720
|
}, [
|
|
@@ -8705,7 +8727,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8705
8727
|
class: "vf-stepper__button",
|
|
8706
8728
|
type: k(L),
|
|
8707
8729
|
disabled: y(L),
|
|
8708
|
-
"aria-current":
|
|
8730
|
+
"aria-current": d(R) ? "step" : void 0,
|
|
8709
8731
|
"aria-disabled": $(L) ? "true" : void 0,
|
|
8710
8732
|
onClick: (I) => z(L, R, I)
|
|
8711
8733
|
}, {
|
|
@@ -8716,7 +8738,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8716
8738
|
step: L,
|
|
8717
8739
|
index: R,
|
|
8718
8740
|
status: r(L, R),
|
|
8719
|
-
active:
|
|
8741
|
+
active: d(R),
|
|
8720
8742
|
completed: v(R),
|
|
8721
8743
|
upcoming: p(R),
|
|
8722
8744
|
error: m(L, R)
|
|
@@ -8731,7 +8753,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8731
8753
|
step: L,
|
|
8732
8754
|
index: R,
|
|
8733
8755
|
status: r(L, R),
|
|
8734
|
-
active:
|
|
8756
|
+
active: d(R),
|
|
8735
8757
|
completed: v(R),
|
|
8736
8758
|
upcoming: p(R),
|
|
8737
8759
|
error: m(L, R)
|
|
@@ -8778,18 +8800,18 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8778
8800
|
setup(n, { emit: o }) {
|
|
8779
8801
|
const a = o, e = n;
|
|
8780
8802
|
let t = 0;
|
|
8781
|
-
const i = ++t, s = G(void 0),
|
|
8782
|
-
if (!(
|
|
8783
|
-
return r.value[
|
|
8784
|
-
}), p = f(() =>
|
|
8803
|
+
const i = ++t, s = G(void 0), u = G({}), r = f(() => e.steps ?? []), d = f(() => s.value === void 0 ? -1 : r.value.findIndex((S) => S.value === s.value)), v = f(() => {
|
|
8804
|
+
if (!(d.value < 0))
|
|
8805
|
+
return r.value[d.value];
|
|
8806
|
+
}), p = f(() => d.value <= 0), m = f(() => d.value >= r.value.length - 1), $ = f(() => {
|
|
8785
8807
|
const S = ["vf-wizard"];
|
|
8786
8808
|
return e.disabled && S.push("vf-wizard_disabled"), S;
|
|
8787
|
-
}), l = (S) => String(S).toLowerCase().trim().replace(/\s+/g, "-").replace(/[^a-z0-9_-]/g, ""), _ = (S) => `vf-wizard-step-${i}-${l(S)}`, k = (S) => `vf-wizard-panel-${i}-${l(S)}`, y = (S) => s.value === S, z = (S) => S <
|
|
8809
|
+
}), l = (S) => String(S).toLowerCase().trim().replace(/\s+/g, "-").replace(/[^a-z0-9_-]/g, ""), _ = (S) => `vf-wizard-step-${i}-${l(S)}`, k = (S) => `vf-wizard-panel-${i}-${l(S)}`, y = (S) => s.value === S, z = (S) => S < d.value, C = (S) => u.value[String(S)], g = (S, F) => ({
|
|
8788
8810
|
"is-active": y(S.value),
|
|
8789
8811
|
"is-completed": z(F),
|
|
8790
8812
|
"is-error": !!C(S.value),
|
|
8791
8813
|
"is-disabled": w(S, F)
|
|
8792
|
-
}), w = (S, F) => e.disabled || S.disabled ? !0 : !e.linear ||
|
|
8814
|
+
}), w = (S, F) => e.disabled || S.disabled ? !0 : !e.linear || d.value < 0 ? !1 : F > d.value + 1, L = () => {
|
|
8793
8815
|
var S;
|
|
8794
8816
|
if (r.value.length) {
|
|
8795
8817
|
if (e.modelValue !== void 0) {
|
|
@@ -8800,34 +8822,34 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8800
8822
|
return ((S = r.value.find((F) => !F.disabled)) == null ? void 0 : S.value) ?? r.value[0].value;
|
|
8801
8823
|
}
|
|
8802
8824
|
}, R = (S, F) => {
|
|
8803
|
-
s.value = S, a("update:modelValue", S), a("change", S, v.value,
|
|
8825
|
+
s.value = S, a("update:modelValue", S), a("change", S, v.value, d.value), a(F, S, v.value, d.value);
|
|
8804
8826
|
}, I = async (S) => {
|
|
8805
8827
|
const F = r.value[S];
|
|
8806
8828
|
if (!F)
|
|
8807
8829
|
return !0;
|
|
8808
8830
|
const H = F.value, Z = F.validate ? await F.validate(H, S) : !0, x = e.validateStep ? await e.validateStep(F, S, H) : !0, W = (V) => V == null || V === !0 ? "" : V === !1 ? "Step is invalid" : String(V), h = W(Z), P = W(x), K = h || P;
|
|
8809
8831
|
if (K)
|
|
8810
|
-
return
|
|
8811
|
-
...
|
|
8832
|
+
return u.value = {
|
|
8833
|
+
...u.value,
|
|
8812
8834
|
[String(H)]: K
|
|
8813
8835
|
}, a("invalidStep", K, F, S), !1;
|
|
8814
|
-
const A = { ...
|
|
8815
|
-
return delete A[String(H)],
|
|
8836
|
+
const A = { ...u.value };
|
|
8837
|
+
return delete A[String(H)], u.value = A, !0;
|
|
8816
8838
|
}, O = async (S, F) => {
|
|
8817
8839
|
const H = r.value[S];
|
|
8818
|
-
!H || w(H, S) ||
|
|
8840
|
+
!H || w(H, S) || d.value >= 0 && S > d.value && !await I(d.value) || R(H.value, F);
|
|
8819
8841
|
}, E = async () => {
|
|
8820
|
-
|
|
8842
|
+
d.value <= 0 || await O(d.value - 1, "prev");
|
|
8821
8843
|
}, T = async () => {
|
|
8822
|
-
|
|
8844
|
+
d.value < 0 || !await I(d.value) || a("complete", s.value, v.value, d.value);
|
|
8823
8845
|
}, D = async () => {
|
|
8824
8846
|
if (m.value) {
|
|
8825
8847
|
await T();
|
|
8826
8848
|
return;
|
|
8827
8849
|
}
|
|
8828
|
-
await O(
|
|
8850
|
+
await O(d.value + 1, "next");
|
|
8829
8851
|
}, M = async (S) => {
|
|
8830
|
-
e.disabled || S ===
|
|
8852
|
+
e.disabled || S === d.value || await O(S, S > d.value ? "next" : "prev");
|
|
8831
8853
|
};
|
|
8832
8854
|
return ve(
|
|
8833
8855
|
() => e.steps,
|
|
@@ -8889,7 +8911,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8889
8911
|
B("div", _i, [
|
|
8890
8912
|
q(S.$slots, "actions", {
|
|
8891
8913
|
step: v.value,
|
|
8892
|
-
index:
|
|
8914
|
+
index: d.value,
|
|
8893
8915
|
isFirst: p.value,
|
|
8894
8916
|
isLast: m.value,
|
|
8895
8917
|
next: D,
|
|
@@ -8921,7 +8943,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8921
8943
|
if (!a)
|
|
8922
8944
|
throw new Error("WizardStep must be used inside Wizard");
|
|
8923
8945
|
const e = f(() => a.isActive(o.value)), t = f(() => a.getPanelId(o.value)), i = f(() => a.getStepId(o.value));
|
|
8924
|
-
return (s,
|
|
8946
|
+
return (s, u) => ze((c(), b("section", {
|
|
8925
8947
|
id: t.value,
|
|
8926
8948
|
class: "vf-wizard-step",
|
|
8927
8949
|
role: "tabpanel",
|
|
@@ -8967,20 +8989,20 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8967
8989
|
"aria-labelledby": i.ariaLabelledby || void 0
|
|
8968
8990
|
}, [
|
|
8969
8991
|
B("ol", $i, [
|
|
8970
|
-
(c(!0), b(fe, null, he(a.value, (
|
|
8971
|
-
key: t(
|
|
8992
|
+
(c(!0), b(fe, null, he(a.value, (u, r) => (c(), b("li", {
|
|
8993
|
+
key: t(u, r),
|
|
8972
8994
|
class: "vf-timeline__item",
|
|
8973
|
-
"data-status":
|
|
8995
|
+
"data-status": u.status ?? "neutral"
|
|
8974
8996
|
}, [
|
|
8975
8997
|
B("div", Si, [
|
|
8976
8998
|
B("span", Bi, [
|
|
8977
8999
|
q(i.$slots, "marker", {
|
|
8978
|
-
item:
|
|
9000
|
+
item: u,
|
|
8979
9001
|
index: r
|
|
8980
9002
|
}, () => [
|
|
8981
|
-
|
|
9003
|
+
u.icon ? (c(), be(We(Ne), {
|
|
8982
9004
|
key: 0,
|
|
8983
|
-
icon:
|
|
9005
|
+
icon: u.icon
|
|
8984
9006
|
}, null, 8, ["icon"])) : (c(), b("span", xi))
|
|
8985
9007
|
])
|
|
8986
9008
|
]),
|
|
@@ -8988,12 +9010,12 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
8988
9010
|
]),
|
|
8989
9011
|
B("div", Vi, [
|
|
8990
9012
|
q(i.$slots, "item", {
|
|
8991
|
-
item:
|
|
9013
|
+
item: u,
|
|
8992
9014
|
index: r
|
|
8993
9015
|
}, () => [
|
|
8994
|
-
|
|
8995
|
-
|
|
8996
|
-
|
|
9016
|
+
u.date ? (c(), b("time", Fi, j(u.date), 1)) : Q("", !0),
|
|
9017
|
+
u.title ? (c(), b("h4", Ti, j(u.title), 1)) : Q("", !0),
|
|
9018
|
+
u.description ? (c(), b("p", Ii, j(u.description), 1)) : Q("", !0)
|
|
8997
9019
|
])
|
|
8998
9020
|
])
|
|
8999
9021
|
], 8, zi))), 128))
|
|
@@ -9013,7 +9035,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9013
9035
|
},
|
|
9014
9036
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
9015
9037
|
setup(n, { emit: o }) {
|
|
9016
|
-
const a = o, e = n, t = G(null), i = G(null), s = G([]),
|
|
9038
|
+
const a = o, e = n, t = G(null), i = G(null), s = G([]), u = f(() => e.allowHalf ? 0.5 : 1), r = f(() => Math.max(1, Math.floor(e.max))), d = f(() => Array.from({ length: r.value }, (T, D) => D + 1)), v = f(() => {
|
|
9017
9039
|
const T = t.value ?? e.modelValue ?? 0, D = Math.min(r.value, Math.max(0, T));
|
|
9018
9040
|
return e.allowHalf ? Math.round(D * 2) / 2 : Math.round(D);
|
|
9019
9041
|
}), p = f(() => {
|
|
@@ -9023,7 +9045,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9023
9045
|
const T = [`vf-rating_${e.size}`];
|
|
9024
9046
|
return e.disabled && T.push("vf-rating_disabled"), e.readonly && T.push("vf-rating_readonly"), t.value !== null && T.push("vf-rating_hover"), T;
|
|
9025
9047
|
}), $ = (T) => Math.min(r.value, Math.max(0, T)), l = (T) => {
|
|
9026
|
-
const D = Math.round(T /
|
|
9048
|
+
const D = Math.round(T / u.value) * u.value;
|
|
9027
9049
|
return $(D);
|
|
9028
9050
|
}, _ = (T, D) => {
|
|
9029
9051
|
if (!e.allowHalf)
|
|
@@ -9070,11 +9092,11 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9070
9092
|
switch (D.key) {
|
|
9071
9093
|
case "ArrowRight":
|
|
9072
9094
|
case "ArrowUp":
|
|
9073
|
-
M = (e.modelValue ?? 0) +
|
|
9095
|
+
M = (e.modelValue ?? 0) + u.value;
|
|
9074
9096
|
break;
|
|
9075
9097
|
case "ArrowLeft":
|
|
9076
9098
|
case "ArrowDown":
|
|
9077
|
-
M = (e.modelValue ?? 0) -
|
|
9099
|
+
M = (e.modelValue ?? 0) - u.value;
|
|
9078
9100
|
break;
|
|
9079
9101
|
case "Home":
|
|
9080
9102
|
M = 0;
|
|
@@ -9105,7 +9127,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9105
9127
|
onMousemove: y,
|
|
9106
9128
|
onMouseleave: z
|
|
9107
9129
|
}, [
|
|
9108
|
-
(c(!0), b(fe, null, he(
|
|
9130
|
+
(c(!0), b(fe, null, he(d.value, (M) => (c(), b("button", {
|
|
9109
9131
|
key: M,
|
|
9110
9132
|
ref_for: !0,
|
|
9111
9133
|
ref_key: "itemRefs",
|
|
@@ -9192,11 +9214,11 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9192
9214
|
}), e = f(() => o.isDisabled(o.node)), t = f(() => o.isSelected(o.node.key)), i = f(() => o.isExpanded(o.node.key)), s = f(() => {
|
|
9193
9215
|
const l = [`vf-tree__row_${o.variant}`];
|
|
9194
9216
|
return o.size !== "normal" && l.push(`vf-tree__row_${o.size}`), t.value && l.push("is-selected"), e.value && l.push("is-disabled"), l;
|
|
9195
|
-
}),
|
|
9217
|
+
}), u = f(() => ({
|
|
9196
9218
|
"--vf-tree-level": String(o.level)
|
|
9197
9219
|
})), r = (l) => {
|
|
9198
9220
|
e.value || (o.expandOnClick && a.value && o.onToggle(o.node, l), o.onSelect(o.node, l));
|
|
9199
|
-
},
|
|
9221
|
+
}, d = (l) => {
|
|
9200
9222
|
const _ = l, k = _ == null ? void 0 : _.closest('[role="tree"]');
|
|
9201
9223
|
return k ? Array.from(k.querySelectorAll('[role="treeitem"]')) : [];
|
|
9202
9224
|
}, v = (l, _) => {
|
|
@@ -9220,7 +9242,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9220
9242
|
o.onToggle(o.node, l);
|
|
9221
9243
|
return;
|
|
9222
9244
|
}
|
|
9223
|
-
const k =
|
|
9245
|
+
const k = d(l.target), y = k.indexOf(_);
|
|
9224
9246
|
v(k, y + 1);
|
|
9225
9247
|
return;
|
|
9226
9248
|
}
|
|
@@ -9234,7 +9256,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9234
9256
|
}
|
|
9235
9257
|
if (l.key === "ArrowDown" || l.key === "ArrowUp" || l.key === "Home" || l.key === "End") {
|
|
9236
9258
|
l.preventDefault();
|
|
9237
|
-
const k =
|
|
9259
|
+
const k = d(l.target);
|
|
9238
9260
|
if (!k.length)
|
|
9239
9261
|
return;
|
|
9240
9262
|
const y = k.indexOf(_);
|
|
@@ -9260,7 +9282,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9260
9282
|
return c(), b("li", Ei, [
|
|
9261
9283
|
B("div", {
|
|
9262
9284
|
class: ee(["vf-tree__row", s.value]),
|
|
9263
|
-
style: ke(
|
|
9285
|
+
style: ke(u.value),
|
|
9264
9286
|
role: "treeitem",
|
|
9265
9287
|
"aria-level": l.level,
|
|
9266
9288
|
"aria-expanded": a.value ? i.value : void 0,
|
|
@@ -9339,8 +9361,8 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9339
9361
|
const a = n, e = o, t = (l) => Array.isArray(l) ? l : l == null ? [] : [l], i = f(() => {
|
|
9340
9362
|
const l = ["vf-tree", `vf-tree_${a.variant}`];
|
|
9341
9363
|
return a.size !== "normal" && l.push(`vf-tree_${a.size}`), a.disabled && l.push("vf-tree_disabled"), l;
|
|
9342
|
-
}), s = f(() => t(a.modelValue)),
|
|
9343
|
-
if (e("nodeClick", l, _), !a.selectable ||
|
|
9364
|
+
}), s = f(() => t(a.modelValue)), u = f(() => new Set(s.value)), r = f(() => new Set(a.expandedKeys)), d = (l) => a.disabled || !!l.disabled, v = (l) => u.value.has(l), p = (l) => r.value.has(l), m = (l, _) => {
|
|
9365
|
+
if (e("nodeClick", l, _), !a.selectable || d(l))
|
|
9344
9366
|
return;
|
|
9345
9367
|
if (a.multiple) {
|
|
9346
9368
|
const y = s.value, C = y.includes(l.key) ? y.filter((g) => g !== l.key) : [...y, l.key];
|
|
@@ -9350,7 +9372,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9350
9372
|
const k = a.modelValue === l.key ? void 0 : l.key;
|
|
9351
9373
|
e("update:modelValue", k), e("change", k, l, _);
|
|
9352
9374
|
}, $ = (l, _) => {
|
|
9353
|
-
if (
|
|
9375
|
+
if (d(l))
|
|
9354
9376
|
return;
|
|
9355
9377
|
const k = a.expandedKeys, y = k.includes(l.key), z = y ? k.filter((C) => C !== l.key) : [...k, l.key];
|
|
9356
9378
|
e("update:expandedKeys", z), e("toggle", l.key, !y, l, _);
|
|
@@ -9373,7 +9395,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9373
9395
|
selectable: l.selectable,
|
|
9374
9396
|
"is-selected": v,
|
|
9375
9397
|
"is-expanded": p,
|
|
9376
|
-
"is-disabled":
|
|
9398
|
+
"is-disabled": d,
|
|
9377
9399
|
"on-select": m,
|
|
9378
9400
|
"on-toggle": $
|
|
9379
9401
|
}, {
|
|
@@ -9427,7 +9449,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9427
9449
|
],
|
|
9428
9450
|
setup(n, { emit: o }) {
|
|
9429
9451
|
let a = 0;
|
|
9430
|
-
const e = o, t = n, i = G(null), s = G(null),
|
|
9452
|
+
const e = o, t = n, i = G(null), s = G(null), u = G(null), r = G(null), d = G(!1), v = G(""), p = G("bottom"), m = G("bottom"), $ = `vf-treeselect-panel-${++a}`;
|
|
9431
9453
|
let l = null;
|
|
9432
9454
|
const _ = (A) => Array.isArray(A) ? A : A == null ? [] : [A], k = (A) => {
|
|
9433
9455
|
const V = [], Y = (ae) => {
|
|
@@ -9463,15 +9485,15 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9463
9485
|
const A = v.value.trim().toLowerCase();
|
|
9464
9486
|
return A ? L(t.items, A) : t.items;
|
|
9465
9487
|
}), I = f(() => {
|
|
9466
|
-
const A = ["vf-treeselect", `vf-treeselect_${t.variant}`,
|
|
9488
|
+
const A = ["vf-treeselect", `vf-treeselect_${t.variant}`, d.value ? "vf-treeselect_open" : ""];
|
|
9467
9489
|
return t.size !== "normal" && A.push(`vf-treeselect_${t.size}`), t.disabled && A.push("vf-treeselect_disabled"), A.filter(Boolean);
|
|
9468
9490
|
}), O = () => {
|
|
9469
|
-
|
|
9491
|
+
d.value = !1, p.value = "bottom", m.value = "bottom", v.value = "";
|
|
9470
9492
|
}, E = async () => {
|
|
9471
9493
|
var A;
|
|
9472
|
-
t.disabled || (
|
|
9494
|
+
t.disabled || (d.value = !0, p.value = "bottom", m.value = "bottom", t.filter && (await $e(), (A = r.value) == null || A.focus()));
|
|
9473
9495
|
}, T = () => {
|
|
9474
|
-
if (
|
|
9496
|
+
if (d.value) {
|
|
9475
9497
|
O();
|
|
9476
9498
|
return;
|
|
9477
9499
|
}
|
|
@@ -9496,14 +9518,14 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9496
9518
|
v.value = V.value, e("search", V.value);
|
|
9497
9519
|
}, W = (A) => e("focus", A), h = (A) => e("blur", A), P = (A) => {
|
|
9498
9520
|
var Y;
|
|
9499
|
-
if (!
|
|
9521
|
+
if (!d.value || !i.value)
|
|
9500
9522
|
return;
|
|
9501
9523
|
const V = A.target;
|
|
9502
|
-
i.value.contains(V) || (Y =
|
|
9524
|
+
i.value.contains(V) || (Y = u.value) != null && Y.contains(V) || O();
|
|
9503
9525
|
}, K = () => {
|
|
9504
|
-
if (!s.value || !
|
|
9526
|
+
if (!s.value || !u.value)
|
|
9505
9527
|
return;
|
|
9506
|
-
const A = s.value, V =
|
|
9528
|
+
const A = s.value, V = u.value, Y = async () => {
|
|
9507
9529
|
const {
|
|
9508
9530
|
x: X,
|
|
9509
9531
|
y: re,
|
|
@@ -9528,7 +9550,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9528
9550
|
}
|
|
9529
9551
|
}, l.update();
|
|
9530
9552
|
};
|
|
9531
|
-
return ve(
|
|
9553
|
+
return ve(d, async (A) => {
|
|
9532
9554
|
if (!A) {
|
|
9533
9555
|
l && (l.destroy(), l = null);
|
|
9534
9556
|
return;
|
|
@@ -9555,7 +9577,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9555
9577
|
class: "vf-treeselect__control",
|
|
9556
9578
|
type: "button",
|
|
9557
9579
|
disabled: A.disabled,
|
|
9558
|
-
"aria-expanded":
|
|
9580
|
+
"aria-expanded": d.value,
|
|
9559
9581
|
"aria-controls": $,
|
|
9560
9582
|
"aria-haspopup": "tree",
|
|
9561
9583
|
onClick: T,
|
|
@@ -9586,7 +9608,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9586
9608
|
ze(B("div", {
|
|
9587
9609
|
id: $,
|
|
9588
9610
|
ref_key: "panel",
|
|
9589
|
-
ref:
|
|
9611
|
+
ref: u,
|
|
9590
9612
|
class: "vf-treeselect__panel",
|
|
9591
9613
|
"data-placement": m.value
|
|
9592
9614
|
}, [
|
|
@@ -9626,7 +9648,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9626
9648
|
_: 3
|
|
9627
9649
|
}, 8, ["items", "model-value", "expanded-keys", "multiple", "selectable", "expand-on-click", "disabled", "size", "variant"])) : (c(), b("div", Ji, j(A.emptyText), 1))
|
|
9628
9650
|
], 8, Xi), [
|
|
9629
|
-
[Se,
|
|
9651
|
+
[Se, d.value]
|
|
9630
9652
|
])
|
|
9631
9653
|
]))
|
|
9632
9654
|
], 2));
|
|
@@ -9648,25 +9670,25 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9648
9670
|
ariaLabel: { default: "Breadcrumbs" }
|
|
9649
9671
|
},
|
|
9650
9672
|
setup(n) {
|
|
9651
|
-
const o = n, a = f(() => o.items ?? []), e = f(() => a.value.some((s) => s.active !== void 0)), t = (s,
|
|
9652
|
-
return (s,
|
|
9673
|
+
const o = n, a = f(() => o.items ?? []), e = f(() => a.value.some((s) => s.active !== void 0)), t = (s, u) => e.value ? s.active === !0 : u === a.value.length - 1, i = (s, u) => `${s.label ?? s.to ?? s.href ?? s.url ?? "crumb"}_${u.toString()}`;
|
|
9674
|
+
return (s, u) => (c(), b("nav", {
|
|
9653
9675
|
class: "vf-breadcrumbs",
|
|
9654
9676
|
"aria-label": s.ariaLabel
|
|
9655
9677
|
}, [
|
|
9656
9678
|
B("ol", td, [
|
|
9657
|
-
(c(!0), b(fe, null, he(a.value, (r,
|
|
9658
|
-
key: i(r,
|
|
9679
|
+
(c(!0), b(fe, null, he(a.value, (r, d) => (c(), b(fe, {
|
|
9680
|
+
key: i(r, d)
|
|
9659
9681
|
}, [
|
|
9660
9682
|
B("li", {
|
|
9661
|
-
class: ee(["vf-breadcrumbs__item", { "is-current": t(r,
|
|
9683
|
+
class: ee(["vf-breadcrumbs__item", { "is-current": t(r, d), "is-disabled": r.disabled }])
|
|
9662
9684
|
}, [
|
|
9663
9685
|
q(s.$slots, "item", {
|
|
9664
9686
|
item: r,
|
|
9665
|
-
index:
|
|
9666
|
-
isLast:
|
|
9667
|
-
active: t(r,
|
|
9687
|
+
index: d,
|
|
9688
|
+
isLast: d === a.value.length - 1,
|
|
9689
|
+
active: t(r, d)
|
|
9668
9690
|
}, () => [
|
|
9669
|
-
t(r,
|
|
9691
|
+
t(r, d) ? (c(), b("span", ad, j(r.label), 1)) : (c(), be(it, {
|
|
9670
9692
|
key: 1,
|
|
9671
9693
|
class: "vf-breadcrumbs__link",
|
|
9672
9694
|
to: r.to,
|
|
@@ -9680,7 +9702,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9680
9702
|
}, 1032, ["to", "href", "disabled"]))
|
|
9681
9703
|
])
|
|
9682
9704
|
], 2),
|
|
9683
|
-
|
|
9705
|
+
d < a.value.length - 1 ? (c(), b("li", od, [
|
|
9684
9706
|
q(s.$slots, "separator", { separator: s.separator }, () => [
|
|
9685
9707
|
me(j(s.separator), 1)
|
|
9686
9708
|
])
|
|
@@ -9747,14 +9769,14 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9747
9769
|
setup(n) {
|
|
9748
9770
|
const o = n, a = Xe(), e = f(() => !!o.title || !!a.title), t = f(() => !!o.subtitle || !!a.subtitle), i = G(!1), s = () => {
|
|
9749
9771
|
typeof window > "u" || (i.value = window.innerWidth <= o.mobileBreakpoint);
|
|
9750
|
-
},
|
|
9772
|
+
}, u = f(() => {
|
|
9751
9773
|
const r = ["vf-page-header"];
|
|
9752
9774
|
return o.size !== "normal" && r.push(`vf-page-header_${o.size}`), o.divider && r.push("vf-page-header_divider"), i.value && r.push("vf-page-header_mobile"), r;
|
|
9753
9775
|
});
|
|
9754
9776
|
return typeof window < "u" && (s(), window.addEventListener("resize", s, !1)), we(() => {
|
|
9755
9777
|
typeof window < "u" && window.removeEventListener("resize", s, !1);
|
|
9756
|
-
}), (r,
|
|
9757
|
-
class: ee(
|
|
9778
|
+
}), (r, d) => (c(), b("header", {
|
|
9779
|
+
class: ee(u.value)
|
|
9758
9780
|
}, [
|
|
9759
9781
|
r.$slots.breadcrumbs ? (c(), b("div", nd, [
|
|
9760
9782
|
q(r.$slots, "breadcrumbs")
|
|
@@ -9815,7 +9837,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9815
9837
|
},
|
|
9816
9838
|
emits: ["scroll", "rangeChange", "reachEnd"],
|
|
9817
9839
|
setup(n, { emit: o }) {
|
|
9818
|
-
const a = o, e = n, t = G(null), i = G(0), s = G({ start: -1, end: -1 }),
|
|
9840
|
+
const a = o, e = n, t = G(null), i = G(0), s = G({ start: -1, end: -1 }), u = G(!1), r = f(() => e.items ?? []), d = f(() => r.value.length), v = f(
|
|
9819
9841
|
() => Number.isFinite(e.itemHeight) && e.itemHeight > 0 ? e.itemHeight : 36
|
|
9820
9842
|
), p = f(
|
|
9821
9843
|
() => Number.isFinite(e.overscan) && e.overscan >= 0 ? Math.floor(e.overscan) : 4
|
|
@@ -9834,7 +9856,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9834
9856
|
return 0;
|
|
9835
9857
|
const M = Math.floor(i.value / v.value) - p.value;
|
|
9836
9858
|
return Math.max(0, M);
|
|
9837
|
-
}), _ = f(() => e.virtual ? Math.ceil($.value / v.value) + p.value * 2 :
|
|
9859
|
+
}), _ = f(() => e.virtual ? Math.ceil($.value / v.value) + p.value * 2 : d.value), k = f(() => e.virtual ? Math.min(d.value, l.value + _.value) : d.value), y = f(() => {
|
|
9838
9860
|
const M = [];
|
|
9839
9861
|
for (let S = l.value; S < k.value; S += 1) {
|
|
9840
9862
|
const F = r.value[S];
|
|
@@ -9845,7 +9867,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9845
9867
|
});
|
|
9846
9868
|
}
|
|
9847
9869
|
return M;
|
|
9848
|
-
}), z = f(() => e.virtual ? l.value * v.value : 0), C = f(() =>
|
|
9870
|
+
}), z = f(() => e.virtual ? l.value * v.value : 0), C = f(() => d.value * v.value), g = f(() => ["vf-virtual-scroller"]), w = f(() => ({ height: e.height })), L = f(() => ({ height: `${C.value}px` })), R = f(() => ({ transform: `translateY(${z.value}px)` })), I = f(() => ({ minHeight: `${v.value}px` })), O = (M, S) => {
|
|
9849
9871
|
if (M && typeof M == "object") {
|
|
9850
9872
|
const F = M[e.keyField];
|
|
9851
9873
|
if (typeof F == "string" || typeof F == "number")
|
|
@@ -9856,8 +9878,8 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9856
9878
|
const M = { start: l.value, end: Math.max(l.value, k.value - 1) };
|
|
9857
9879
|
(s.value.start !== M.start || s.value.end !== M.end) && (s.value = M, a("rangeChange", M));
|
|
9858
9880
|
}, T = () => {
|
|
9859
|
-
const M = k.value >=
|
|
9860
|
-
M && !
|
|
9881
|
+
const M = k.value >= d.value && d.value > 0;
|
|
9882
|
+
M && !u.value && (u.value = !0, a("reachEnd")), M || (u.value = !1);
|
|
9861
9883
|
}, D = (M) => {
|
|
9862
9884
|
const S = M.target;
|
|
9863
9885
|
i.value = S.scrollTop, a("scroll", M), E(), T();
|
|
@@ -9877,7 +9899,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9877
9899
|
"aria-label": M.ariaLabel || void 0,
|
|
9878
9900
|
onScroll: D
|
|
9879
9901
|
}, [
|
|
9880
|
-
|
|
9902
|
+
d.value ? M.virtual ? (c(), b("div", {
|
|
9881
9903
|
key: 1,
|
|
9882
9904
|
class: "vf-virtual-scroller__spacer",
|
|
9883
9905
|
style: ke(L.value)
|
|
@@ -9942,35 +9964,35 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9942
9964
|
const [o, a, e] = Bt(n);
|
|
9943
9965
|
return `${o}, ${a}, ${e}`;
|
|
9944
9966
|
}, kd = (n, o, a) => {
|
|
9945
|
-
const e = n / 255, t = o / 255, i = a / 255, s = Math.max(e, t, i),
|
|
9946
|
-
let
|
|
9947
|
-
const p = (s +
|
|
9967
|
+
const e = n / 255, t = o / 255, i = a / 255, s = Math.max(e, t, i), u = Math.min(e, t, i), r = s - u;
|
|
9968
|
+
let d = 0, v = 0;
|
|
9969
|
+
const p = (s + u) / 2;
|
|
9948
9970
|
if (r !== 0) {
|
|
9949
9971
|
switch (v = r / (1 - Math.abs(2 * p - 1)), s) {
|
|
9950
9972
|
case e:
|
|
9951
|
-
|
|
9973
|
+
d = (t - i) / r % 6;
|
|
9952
9974
|
break;
|
|
9953
9975
|
case t:
|
|
9954
|
-
|
|
9976
|
+
d = (i - e) / r + 2;
|
|
9955
9977
|
break;
|
|
9956
9978
|
case i:
|
|
9957
|
-
|
|
9979
|
+
d = (e - t) / r + 4;
|
|
9958
9980
|
break;
|
|
9959
9981
|
}
|
|
9960
|
-
|
|
9982
|
+
d *= 60, d < 0 && (d += 360);
|
|
9961
9983
|
}
|
|
9962
|
-
return [
|
|
9984
|
+
return [d, v * 100, p * 100];
|
|
9963
9985
|
}, Cd = (n, o, a) => {
|
|
9964
|
-
const e = o / 100, t = a / 100, i = (1 - Math.abs(2 * t - 1)) * e, s = i * (1 - Math.abs(n / 60 % 2 - 1)),
|
|
9965
|
-
let r = 0,
|
|
9966
|
-
n >= 0 && n < 60 ? (r = i,
|
|
9967
|
-
const p = Math.round((r +
|
|
9986
|
+
const e = o / 100, t = a / 100, i = (1 - Math.abs(2 * t - 1)) * e, s = i * (1 - Math.abs(n / 60 % 2 - 1)), u = t - i / 2;
|
|
9987
|
+
let r = 0, d = 0, v = 0;
|
|
9988
|
+
n >= 0 && n < 60 ? (r = i, d = s, v = 0) : n >= 60 && n < 120 ? (r = s, d = i, v = 0) : n >= 120 && n < 180 ? (r = 0, d = i, v = s) : n >= 180 && n < 240 ? (r = 0, d = s, v = i) : n >= 240 && n < 300 ? (r = s, d = 0, v = i) : (r = i, d = 0, v = s);
|
|
9989
|
+
const p = Math.round((r + u) * 255), m = Math.round((d + u) * 255), $ = Math.round((v + u) * 255);
|
|
9968
9990
|
return [p, m, $];
|
|
9969
9991
|
}, wd = (n, o, a) => `#${[n, o, a].map((e) => e.toString(16).padStart(2, "0")).join("")}`, $d = (n, o, a) => Math.min(a, Math.max(o, n)), zd = (n, o) => {
|
|
9970
9992
|
const a = ct(n);
|
|
9971
9993
|
if (!a)
|
|
9972
9994
|
return n;
|
|
9973
|
-
const [e, t, i] = Bt(a), [s,
|
|
9995
|
+
const [e, t, i] = Bt(a), [s, u, r] = kd(e, t, i), v = (o - 5) * 7, p = $d(r + v, 0, 100), [m, $, l] = Cd(s, u, p);
|
|
9974
9996
|
return wd(m, $, l);
|
|
9975
9997
|
}, ot = (n) => !!n && typeof n == "object" && !Array.isArray(n), vt = (n, o) => {
|
|
9976
9998
|
if (!o)
|
|
@@ -9996,12 +10018,12 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
9996
10018
|
}
|
|
9997
10019
|
return { preset: n };
|
|
9998
10020
|
}, Bd = (n) => {
|
|
9999
|
-
const o = [], a = [], e = [], t = [], i = (r) => e.push(r), s = (r) => t.push(r),
|
|
10021
|
+
const o = [], a = [], e = [], t = [], i = (r) => e.push(r), s = (r) => t.push(r), u = (r, d) => {
|
|
10000
10022
|
if (!(!r || typeof r != "object"))
|
|
10001
10023
|
for (const v in r) {
|
|
10002
|
-
const p = r[v], m =
|
|
10024
|
+
const p = r[v], m = d.concat([v]);
|
|
10003
10025
|
if (ot(p)) {
|
|
10004
|
-
|
|
10026
|
+
u(p, m);
|
|
10005
10027
|
continue;
|
|
10006
10028
|
}
|
|
10007
10029
|
if (p && typeof p == "object") {
|
|
@@ -10029,7 +10051,7 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
10029
10051
|
}
|
|
10030
10052
|
}
|
|
10031
10053
|
};
|
|
10032
|
-
return
|
|
10054
|
+
return u(n, []), { baseVars: o, darkVars: a, warnings: e, errors: t };
|
|
10033
10055
|
}, xd = (n) => {
|
|
10034
10056
|
if (typeof document > "u")
|
|
10035
10057
|
return null;
|
|
@@ -10042,20 +10064,20 @@ const ho = (n, o) => n.strategy ? n.strategy : bo(o) ? "fixed" : "absolute", Ke
|
|
|
10042
10064
|
selector: n.selector ?? ":root",
|
|
10043
10065
|
darkSelector: n.darkSelector ?? ":root[data-theme=dark]"
|
|
10044
10066
|
}), Vd = (n, o, a, e) => {
|
|
10045
|
-
const { baseVars: t, darkVars: i, warnings: s, errors:
|
|
10067
|
+
const { baseVars: t, darkVars: i, warnings: s, errors: u } = Bd(n), r = xd("vueforge-theme");
|
|
10046
10068
|
if (!r)
|
|
10047
10069
|
return;
|
|
10048
|
-
if (
|
|
10070
|
+
if (u.length) {
|
|
10049
10071
|
if (e)
|
|
10050
|
-
throw new Error(`[VueForge] ${
|
|
10051
|
-
for (const v of
|
|
10072
|
+
throw new Error(`[VueForge] ${u.join(" ")}`);
|
|
10073
|
+
for (const v of u)
|
|
10052
10074
|
console.warn(`[VueForge] ${v}`);
|
|
10053
10075
|
}
|
|
10054
10076
|
if (s.length)
|
|
10055
10077
|
for (const v of s)
|
|
10056
10078
|
console.warn(`[VueForge] ${v}`);
|
|
10057
|
-
const
|
|
10058
|
-
t.length &&
|
|
10079
|
+
const d = [];
|
|
10080
|
+
t.length && d.push(`${o} { ${t.join(";")} }`), i.length && d.push(`${a} { ${i.join(";")} }`), r.textContent = d.join(`
|
|
10059
10081
|
`);
|
|
10060
10082
|
};
|
|
10061
10083
|
let He = null;
|