@teammodlr/ui-kit 2.1.28 → 2.1.29
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/lib/components/select/Select.vue.d.ts +1 -1
- package/lib/index.cjs.js +1 -1
- package/lib/index.es.js +101 -101
- package/package.json +1 -1
- package/src/components/select/Select.vue +2 -4
package/lib/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as P, renderSlot as L, ref as b, watch as
|
|
1
|
+
import { defineComponent as P, renderSlot as L, ref as b, watch as q, computed as p, openBlock as v, createElementBlock as y, normalizeClass as h, normalizeStyle as re, inject as fe, onMounted as pe, resolveComponent as le, createBlock as ne, mergeProps as $e, reactive as ze, toRef as X, provide as Se, Fragment as Q, renderList as he, createElementVNode as T, createVNode as J, withCtx as Z, createTextVNode as ie, toDisplayString as W, createCommentVNode as N, onBeforeUnmount as It, resolveDynamicComponent as rn, readonly as oo, onUnmounted as dr, withDirectives as _t, vModelCheckbox as cr, getCurrentScope as so, onScopeDispose as lo, unref as an, isRef as io, toRefs as uo, customRef as co, getCurrentInstance as fr, watchEffect as ct, nextTick as Ge, toHandlers as ft, Teleport as Le, Transition as Je, withModifiers as _e, withKeys as nt, shallowRef as Nt, TransitionGroup as fo, vModelRadio as po, vModelText as vo, toRaw as Mn, onActivated as mo, onDeactivated as ho, h as rt } from "vue";
|
|
2
2
|
const go = {
|
|
3
3
|
h: {
|
|
4
4
|
type: Function,
|
|
@@ -39,7 +39,7 @@ const go = {
|
|
|
39
39
|
},
|
|
40
40
|
setup(e, { emit: t }) {
|
|
41
41
|
const n = b("");
|
|
42
|
-
typeof window < "u" && Image &&
|
|
42
|
+
typeof window < "u" && Image && q(
|
|
43
43
|
() => e.src,
|
|
44
44
|
(s) => {
|
|
45
45
|
if (!s)
|
|
@@ -313,12 +313,12 @@ const Xo = /* @__PURE__ */ V(Go, [["render", Uo]]), Yo = P({
|
|
|
313
313
|
},
|
|
314
314
|
setup(e) {
|
|
315
315
|
const t = fe(hr), n = b(e.label), r = b("/");
|
|
316
|
-
return
|
|
316
|
+
return q(
|
|
317
317
|
() => e.label,
|
|
318
318
|
(s) => {
|
|
319
319
|
n.value = s, t == null || t.refreshItems();
|
|
320
320
|
}
|
|
321
|
-
), t && (
|
|
321
|
+
), t && (q(
|
|
322
322
|
() => t == null ? void 0 : t.separator,
|
|
323
323
|
(s) => {
|
|
324
324
|
r.value = s;
|
|
@@ -553,10 +553,10 @@ const oe = (e, {
|
|
|
553
553
|
withListeners: r = !0
|
|
554
554
|
}) => {
|
|
555
555
|
const a = b(!0), s = b(e.error), { id: o } = wr("input"), l = e.name ? e.name : o.value, i = b(l);
|
|
556
|
-
|
|
556
|
+
q(
|
|
557
557
|
() => e.error,
|
|
558
558
|
(g) => s.value = g
|
|
559
|
-
),
|
|
559
|
+
), q(
|
|
560
560
|
() => e.name,
|
|
561
561
|
(g) => l.value = g
|
|
562
562
|
);
|
|
@@ -817,14 +817,14 @@ function Ve(e) {
|
|
|
817
817
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
818
818
|
}
|
|
819
819
|
const Qe = sn ? window : void 0;
|
|
820
|
-
function
|
|
820
|
+
function te(...e) {
|
|
821
821
|
let t, n, r, a;
|
|
822
822
|
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, r, a] = e, t = Qe) : [t, n, r, a] = e, !t)
|
|
823
823
|
return Xt;
|
|
824
824
|
Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
|
|
825
825
|
const s = [], o = () => {
|
|
826
826
|
s.forEach((d) => d()), s.length = 0;
|
|
827
|
-
}, l = (d, c, f, m) => (d.addEventListener(c, f, m), () => d.removeEventListener(c, f, m)), i =
|
|
827
|
+
}, l = (d, c, f, m) => (d.addEventListener(c, f, m), () => d.removeEventListener(c, f, m)), i = q(
|
|
828
828
|
() => [Ve(t), Ee(a)],
|
|
829
829
|
([d, c]) => {
|
|
830
830
|
if (o(), !d)
|
|
@@ -855,7 +855,7 @@ function ln(e, t, n = {}) {
|
|
|
855
855
|
return g && (f.target === g || f.composedPath().includes(g));
|
|
856
856
|
}
|
|
857
857
|
}), d = [
|
|
858
|
-
|
|
858
|
+
te(r, "click", (f) => {
|
|
859
859
|
const m = Ve(e);
|
|
860
860
|
if (!(!m || m === f.target || f.composedPath().includes(m))) {
|
|
861
861
|
if (f.detail === 0 && (l = !i(f)), !l) {
|
|
@@ -865,11 +865,11 @@ function ln(e, t, n = {}) {
|
|
|
865
865
|
t(f);
|
|
866
866
|
}
|
|
867
867
|
}, { passive: !0, capture: s }),
|
|
868
|
-
|
|
868
|
+
te(r, "pointerdown", (f) => {
|
|
869
869
|
const m = Ve(e);
|
|
870
870
|
m && (l = !f.composedPath().includes(m) && !i(f));
|
|
871
871
|
}, { passive: !0 }),
|
|
872
|
-
o &&
|
|
872
|
+
o && te(r, "blur", (f) => {
|
|
873
873
|
setTimeout(() => {
|
|
874
874
|
var m;
|
|
875
875
|
const g = Ve(e);
|
|
@@ -930,7 +930,7 @@ function Ps(e, t = {}) {
|
|
|
930
930
|
};
|
|
931
931
|
if (sn) {
|
|
932
932
|
const A = { capture: (r = t.capture) != null ? r : !0 };
|
|
933
|
-
|
|
933
|
+
te(O, "pointerdown", C, A), te(m, "pointermove", w, A), te(m, "pointerup", E, A);
|
|
934
934
|
}
|
|
935
935
|
return {
|
|
936
936
|
...js(k),
|
|
@@ -987,7 +987,7 @@ function Fs(e = {}) {
|
|
|
987
987
|
}, B = i ? (w) => i(() => g(w), {}) : (w) => g(w), R = i ? (w) => i(() => O(w), {}) : (w) => O(w), C = i ? () => i(() => k(), {}) : () => k();
|
|
988
988
|
if (o) {
|
|
989
989
|
const w = { passive: !0 };
|
|
990
|
-
|
|
990
|
+
te(o, ["mousemove", "dragover"], B, w), n && t !== "movement" && (te(o, ["touchstart", "touchmove"], R, w), r && te(o, "touchend", M, w)), l && t === "page" && te(s, "scroll", C, { passive: !0 });
|
|
991
991
|
}
|
|
992
992
|
return {
|
|
993
993
|
x: d,
|
|
@@ -1002,7 +1002,7 @@ function Mr(e, t = {}) {
|
|
|
1002
1002
|
} = t, { x: a, y: s, sourceType: o } = Fs(t), l = b(e ?? (r == null ? void 0 : r.document.body)), i = b(0), u = b(0), d = b(0), c = b(0), f = b(0), m = b(0), g = b(!0);
|
|
1003
1003
|
let O = () => {
|
|
1004
1004
|
};
|
|
1005
|
-
return r && (O =
|
|
1005
|
+
return r && (O = q(
|
|
1006
1006
|
[l, a, s],
|
|
1007
1007
|
() => {
|
|
1008
1008
|
const k = Ve(l);
|
|
@@ -1019,7 +1019,7 @@ function Mr(e, t = {}) {
|
|
|
1019
1019
|
g.value = R === 0 || C === 0 || w < 0 || E < 0 || w > R || E > C, (n || !g.value) && (i.value = w, u.value = E);
|
|
1020
1020
|
},
|
|
1021
1021
|
{ immediate: !0 }
|
|
1022
|
-
),
|
|
1022
|
+
), te(document, "mouseleave", () => {
|
|
1023
1023
|
g.value = !0;
|
|
1024
1024
|
})), {
|
|
1025
1025
|
x: a,
|
|
@@ -1052,7 +1052,7 @@ function Or(e = {}) {
|
|
|
1052
1052
|
}, i = () => {
|
|
1053
1053
|
s.value = !1, o.value = null;
|
|
1054
1054
|
}, u = p(() => Ve(e.target) || a);
|
|
1055
|
-
return
|
|
1055
|
+
return te(u, "mousedown", l("mouse"), { passive: !0 }), te(a, "mouseleave", i, { passive: !0 }), te(a, "mouseup", i, { passive: !0 }), n && (te(u, "dragstart", l("mouse"), { passive: !0 }), te(a, "drop", i, { passive: !0 }), te(a, "dragend", i, { passive: !0 })), t && (te(u, "touchstart", l("touch"), { passive: !0 }), te(a, "touchend", i, { passive: !0 }), te(a, "touchcancel", i, { passive: !0 })), {
|
|
1056
1056
|
pressed: s,
|
|
1057
1057
|
sourceType: o
|
|
1058
1058
|
};
|
|
@@ -1649,15 +1649,15 @@ function Vl(e) {
|
|
|
1649
1649
|
function Nl(e) {
|
|
1650
1650
|
var t = e.state, n = e.options, r = e.name;
|
|
1651
1651
|
if (!t.modifiersData[r]._skip) {
|
|
1652
|
-
for (var a = n.mainAxis, s = a === void 0 ? !0 : a, o = n.altAxis, l = o === void 0 ? !0 : o, i = n.fallbackPlacements, u = n.padding, d = n.boundary, c = n.rootBoundary, f = n.altBoundary, m = n.flipVariations, g = m === void 0 ? !0 : m, O = n.allowedAutoPlacements, k = t.options.placement, M = Ae(k), B = M === k, R = i || (B || !g ? [Mt(k)] : Vl(k)), C = [k].concat(R).reduce(function(Ie,
|
|
1653
|
-
return Ie.concat(Ae(
|
|
1654
|
-
placement:
|
|
1652
|
+
for (var a = n.mainAxis, s = a === void 0 ? !0 : a, o = n.altAxis, l = o === void 0 ? !0 : o, i = n.fallbackPlacements, u = n.padding, d = n.boundary, c = n.rootBoundary, f = n.altBoundary, m = n.flipVariations, g = m === void 0 ? !0 : m, O = n.allowedAutoPlacements, k = t.options.placement, M = Ae(k), B = M === k, R = i || (B || !g ? [Mt(k)] : Vl(k)), C = [k].concat(R).reduce(function(Ie, G) {
|
|
1653
|
+
return Ie.concat(Ae(G) === un ? Pl(t, {
|
|
1654
|
+
placement: G,
|
|
1655
1655
|
boundary: d,
|
|
1656
1656
|
rootBoundary: c,
|
|
1657
1657
|
padding: u,
|
|
1658
1658
|
flipVariations: g,
|
|
1659
1659
|
allowedAutoPlacements: O
|
|
1660
|
-
}) :
|
|
1660
|
+
}) : G);
|
|
1661
1661
|
}, []), w = t.rects.reference, E = t.rects.popper, A = /* @__PURE__ */ new Map(), _ = !0, j = C[0], z = 0; z < C.length; z++) {
|
|
1662
1662
|
var $ = C[z], S = Ae($), D = Ze($) === Ue, H = [ge, Te].indexOf(S) >= 0, K = H ? "width" : "height", I = ut(t, {
|
|
1663
1663
|
placement: $,
|
|
@@ -1677,11 +1677,11 @@ function Nl(e) {
|
|
|
1677
1677
|
A.set($, ae);
|
|
1678
1678
|
}
|
|
1679
1679
|
if (_)
|
|
1680
|
-
for (var ue = g ? 3 : 1, be = function(
|
|
1680
|
+
for (var ue = g ? 3 : 1, be = function(G) {
|
|
1681
1681
|
var de = C.find(function(ve) {
|
|
1682
1682
|
var ce = A.get(ve);
|
|
1683
1683
|
if (ce)
|
|
1684
|
-
return ce.slice(0,
|
|
1684
|
+
return ce.slice(0, G).every(function(xe) {
|
|
1685
1685
|
return xe;
|
|
1686
1686
|
});
|
|
1687
1687
|
});
|
|
@@ -1811,7 +1811,7 @@ function Yl(e) {
|
|
|
1811
1811
|
var D, H = C === "y" ? ge : ye, K = C === "y" ? Te : Me, I = C === "y" ? "height" : "width", x = E[C], Y = x + k[H], ae = x - k[K], ue = m ? -_[I] / 2 : 0, be = B === Ue ? A[I] : _[I], se = B === Ue ? -_[I] : -A[I], ke = t.elements.arrow, Ie = m && ke ? cn(ke) : {
|
|
1812
1812
|
width: 0,
|
|
1813
1813
|
height: 0
|
|
1814
|
-
},
|
|
1814
|
+
}, G = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : _r(), de = G[H], ve = G[K], ce = ot(0, A[I], Ie[I]), xe = R ? A[I] / 2 - ue - ce - de - z.mainAxis : be - ce - de - z.mainAxis, Pt = R ? -A[I] / 2 + ue + ce + ve + z.mainAxis : se + ce + ve + z.mainAxis, tt = t.elements.arrow && vt(t.elements.arrow), F = tt ? C === "y" ? tt.clientTop || 0 : tt.clientLeft || 0 : 0, ee = (D = $ == null ? void 0 : $[C]) != null ? D : 0, U = x + xe - ee - F, Oe = x + Pt - ee, Ke = ot(m ? At(Y, U) : Y, x, m ? Ne(ae, Oe) : ae);
|
|
1815
1815
|
E[C] = Ke, S[C] = Ke - x;
|
|
1816
1816
|
}
|
|
1817
1817
|
if (l) {
|
|
@@ -2071,7 +2071,7 @@ function Dt(e) {
|
|
|
2071
2071
|
}
|
|
2072
2072
|
});
|
|
2073
2073
|
let u = null;
|
|
2074
|
-
|
|
2074
|
+
q(t, (M) => {
|
|
2075
2075
|
i.placement = M, u && (u == null || u.setOptions({ placement: M }));
|
|
2076
2076
|
});
|
|
2077
2077
|
const d = b(0);
|
|
@@ -2079,7 +2079,7 @@ function Dt(e) {
|
|
|
2079
2079
|
r.value && o.value && (r.value.__transferElement = o.value);
|
|
2080
2080
|
});
|
|
2081
2081
|
let c = null;
|
|
2082
|
-
n &&
|
|
2082
|
+
n && q(n, (M) => {
|
|
2083
2083
|
g(M), f();
|
|
2084
2084
|
}), pe(() => {
|
|
2085
2085
|
Ge(m);
|
|
@@ -2091,7 +2091,7 @@ function Dt(e) {
|
|
|
2091
2091
|
}
|
|
2092
2092
|
function m() {
|
|
2093
2093
|
k(), u && u.destroy(), O();
|
|
2094
|
-
const M =
|
|
2094
|
+
const M = q(s, O), B = q(o, O);
|
|
2095
2095
|
c = () => {
|
|
2096
2096
|
M(), B();
|
|
2097
2097
|
};
|
|
@@ -2159,9 +2159,9 @@ const gi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2159
2159
|
emits: ["update:modelValue"],
|
|
2160
2160
|
setup(e, { emit: t }) {
|
|
2161
2161
|
const n = b(), { elementX: r } = Mr(n), { pressed: a } = Or();
|
|
2162
|
-
|
|
2162
|
+
q(() => a.value, () => {
|
|
2163
2163
|
a.value || (s.value = !1);
|
|
2164
|
-
}),
|
|
2164
|
+
}), q(() => r.value, () => {
|
|
2165
2165
|
s.value && o();
|
|
2166
2166
|
});
|
|
2167
2167
|
const s = b(!1), o = () => {
|
|
@@ -2450,42 +2450,42 @@ const Ur = /* @__PURE__ */ V(Ai, [["render", Ii]]), _i = P({
|
|
|
2450
2450
|
}), H = p(() => 1 - E.y), K = p(() => E.x), I = p(() => tl(R.value * 3.6, H.value, K.value, C.value / 100)), x = p(() => nl(R.value * 3.6, C.value / 100)), Y = () => {
|
|
2451
2451
|
i.value = Qs(I.value.r, I.value.g, I.value.b, I.value.a), u.value = I.value.r.toString(), d.value = I.value.g.toString(), c.value = I.value.b.toString(), f.value = I.value.a.toFixed(2).toString(), t("update:modelValue", i.value);
|
|
2452
2452
|
};
|
|
2453
|
-
|
|
2453
|
+
q(() => I.value, () => {
|
|
2454
2454
|
Y();
|
|
2455
2455
|
});
|
|
2456
|
-
const ae = (
|
|
2457
|
-
E.x =
|
|
2456
|
+
const ae = (G, de) => {
|
|
2457
|
+
E.x = G.s, E.y = 1 - G.v, R.value = 1 / 360 * G.h * 100, C.value = de * 100, Y();
|
|
2458
2458
|
}, ue = () => {
|
|
2459
|
-
var
|
|
2460
|
-
ae(Bn(
|
|
2459
|
+
var G = el(i.value, I.value.r, I.value.g, I.value.b, I.value.a);
|
|
2460
|
+
ae(Bn(G.r, G.g, G.b), G.a);
|
|
2461
2461
|
}, be = () => {
|
|
2462
|
-
var
|
|
2463
|
-
(isNaN(
|
|
2462
|
+
var G = parseInt(u.value);
|
|
2463
|
+
(isNaN(G) || G > 255 || G < 0) && (G = I.value.r);
|
|
2464
2464
|
var de = parseInt(d.value);
|
|
2465
2465
|
(isNaN(de) || de > 255 || de < 0) && (de = I.value.g);
|
|
2466
2466
|
var ve = parseInt(c.value);
|
|
2467
2467
|
(isNaN(ve) || ve > 255 || ve < 0) && (ve = I.value.b);
|
|
2468
2468
|
var ce = parseFloat(f.value);
|
|
2469
|
-
(isNaN(ce) || ce > 1 || ce < 0) && (ce = I.value.a), ae(Bn(
|
|
2469
|
+
(isNaN(ce) || ce > 1 || ce < 0) && (ce = I.value.a), ae(Bn(G, de, ve), ce);
|
|
2470
2470
|
};
|
|
2471
|
-
|
|
2471
|
+
q(() => z.value, () => {
|
|
2472
2472
|
z.value || (w.value = !1);
|
|
2473
|
-
}),
|
|
2473
|
+
}), q(() => [_.value, j.value], () => {
|
|
2474
2474
|
w.value && se();
|
|
2475
|
-
}),
|
|
2475
|
+
}), q(() => e.modelValue, () => {
|
|
2476
2476
|
i.value = e.modelValue, ue(), console.log("hi");
|
|
2477
2477
|
});
|
|
2478
2478
|
const se = () => {
|
|
2479
|
-
var
|
|
2480
|
-
E.x = Math.min(Math.max(_.value, 0), ((
|
|
2479
|
+
var G, de, ve, ce;
|
|
2480
|
+
E.x = Math.min(Math.max(_.value, 0), ((G = m.value) == null ? void 0 : G.clientWidth) || 0) / (((de = m.value) == null ? void 0 : de.clientWidth) || 0), E.y = Math.min(Math.max(j.value, 0), ((ve = m.value) == null ? void 0 : ve.clientHeight) || 0) / (((ce = m.value) == null ? void 0 : ce.clientHeight) || 0);
|
|
2481
2481
|
}, ke = () => {
|
|
2482
2482
|
w.value = !0, se();
|
|
2483
2483
|
};
|
|
2484
2484
|
return pe(() => {
|
|
2485
2485
|
i.value = e.modelValue, ue();
|
|
2486
|
-
}), ln($, (
|
|
2486
|
+
}), ln($, (G) => {
|
|
2487
2487
|
o.value = !1;
|
|
2488
|
-
}),
|
|
2488
|
+
}), q(() => a.value, () => {
|
|
2489
2489
|
i.value = a.value, ue();
|
|
2490
2490
|
}), {
|
|
2491
2491
|
isOpen: o,
|
|
@@ -2520,8 +2520,8 @@ const Ur = /* @__PURE__ */ V(Ai, [["render", Ii]]), _i = P({
|
|
|
2520
2520
|
openEyeDropper: () => {
|
|
2521
2521
|
try {
|
|
2522
2522
|
r();
|
|
2523
|
-
} catch (
|
|
2524
|
-
console.log(
|
|
2523
|
+
} catch (G) {
|
|
2524
|
+
console.log(G);
|
|
2525
2525
|
}
|
|
2526
2526
|
},
|
|
2527
2527
|
scale: jt
|
|
@@ -2728,7 +2728,7 @@ function Yr(e, t) {
|
|
|
2728
2728
|
var s;
|
|
2729
2729
|
t.value ? n.value = a ?? ((s = t.value.textContent) == null ? void 0 : s.trim()) ?? null : n.value = a;
|
|
2730
2730
|
}
|
|
2731
|
-
return
|
|
2731
|
+
return q(e, (a) => {
|
|
2732
2732
|
r(a);
|
|
2733
2733
|
}), pe(() => {
|
|
2734
2734
|
Ge(() => {
|
|
@@ -2832,23 +2832,23 @@ const ta = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2832
2832
|
handleSelect: C,
|
|
2833
2833
|
isOpen: o
|
|
2834
2834
|
});
|
|
2835
|
-
Se(Jt, M),
|
|
2835
|
+
Se(Jt, M), q(
|
|
2836
2836
|
() => e.open,
|
|
2837
2837
|
($) => {
|
|
2838
2838
|
o.value = $;
|
|
2839
2839
|
}
|
|
2840
|
-
),
|
|
2840
|
+
), q(
|
|
2841
2841
|
() => e.placement,
|
|
2842
2842
|
($) => {
|
|
2843
2843
|
B($);
|
|
2844
2844
|
}
|
|
2845
|
-
),
|
|
2845
|
+
), q(o, ($) => {
|
|
2846
2846
|
$ && O(), t("update:open", $);
|
|
2847
2847
|
}), pe(() => {
|
|
2848
2848
|
Ge(() => {
|
|
2849
2849
|
B(e.placement);
|
|
2850
2850
|
});
|
|
2851
|
-
}),
|
|
2851
|
+
}), te("resize", () => {
|
|
2852
2852
|
O();
|
|
2853
2853
|
}), ln(u, ($) => {
|
|
2854
2854
|
let S = $.target, D = 0;
|
|
@@ -2879,7 +2879,7 @@ const ta = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2879
2879
|
}
|
|
2880
2880
|
]), E = p(() => {
|
|
2881
2881
|
}), A = p(() => ["m-dropdown-menu", Jr]), _ = p(() => `m-transition__${e.transitionName}`), j = b("auto");
|
|
2882
|
-
|
|
2882
|
+
te(window, "resize", () => {
|
|
2883
2883
|
o.value && (z(), O());
|
|
2884
2884
|
}), ct(() => {
|
|
2885
2885
|
z();
|
|
@@ -3182,7 +3182,7 @@ const vu = P({
|
|
|
3182
3182
|
});
|
|
3183
3183
|
Se(on, r), pe(() => {
|
|
3184
3184
|
e.autoFocus && n && n.length > 0 && n[0].focus();
|
|
3185
|
-
}),
|
|
3185
|
+
}), q(() => e.errors, (i) => {
|
|
3186
3186
|
i && Ge(() => {
|
|
3187
3187
|
if (Array.isArray(i))
|
|
3188
3188
|
i.forEach((u) => {
|
|
@@ -3329,7 +3329,7 @@ const Tu = P({
|
|
|
3329
3329
|
]), o = p(() => [
|
|
3330
3330
|
$u
|
|
3331
3331
|
]);
|
|
3332
|
-
return
|
|
3332
|
+
return q(() => e.timeout, () => {
|
|
3333
3333
|
r();
|
|
3334
3334
|
}), {
|
|
3335
3335
|
show: n,
|
|
@@ -3881,7 +3881,7 @@ const bd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3881
3881
|
function d(c) {
|
|
3882
3882
|
e.loading || t("update:page", c);
|
|
3883
3883
|
}
|
|
3884
|
-
return
|
|
3884
|
+
return q(() => e.page, (c) => {
|
|
3885
3885
|
t("update:page", c);
|
|
3886
3886
|
}, { immediate: !0 }), {
|
|
3887
3887
|
realTotal: n,
|
|
@@ -4462,37 +4462,37 @@ const _c = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4462
4462
|
if (!e.options || e.options.length == 0)
|
|
4463
4463
|
return [];
|
|
4464
4464
|
if (e.searchable && c.value) {
|
|
4465
|
-
let
|
|
4466
|
-
if (
|
|
4465
|
+
let ee = e.options.filter((U) => U[e.optionLabel].toLowerCase().includes(c.value.toLowerCase())).map((U) => {
|
|
4466
|
+
if (U[e.optionValue] === void 0)
|
|
4467
4467
|
throw new Error("Option value is undefined");
|
|
4468
|
-
if (
|
|
4468
|
+
if (U[e.optionLabel] === void 0)
|
|
4469
4469
|
throw new Error("Option label is undefined");
|
|
4470
|
-
let Oe =
|
|
4470
|
+
let Oe = U[e.optionValue], Ke;
|
|
4471
4471
|
return e.multiple && Array.isArray(S.value) ? Ke = S.value.includes(Oe) : Ke = S.value === Oe, {
|
|
4472
4472
|
value: Oe,
|
|
4473
|
-
label:
|
|
4473
|
+
label: U[e.optionLabel],
|
|
4474
4474
|
active: Ke,
|
|
4475
4475
|
onClick: () => ue(Oe)
|
|
4476
4476
|
};
|
|
4477
4477
|
});
|
|
4478
|
-
return e.allowBlank &&
|
|
4478
|
+
return e.allowBlank && ee.unshift({
|
|
4479
4479
|
value: "",
|
|
4480
4480
|
label: "",
|
|
4481
4481
|
active: !1,
|
|
4482
4482
|
onClick: () => ue("")
|
|
4483
|
-
}),
|
|
4483
|
+
}), ee;
|
|
4484
4484
|
}
|
|
4485
|
-
let F = e.options.map((
|
|
4486
|
-
if (
|
|
4485
|
+
let F = e.options.map((ee) => {
|
|
4486
|
+
if (ee[e.optionValue] === void 0)
|
|
4487
4487
|
throw new Error("Option value is undefined");
|
|
4488
|
-
if (
|
|
4488
|
+
if (ee[e.optionLabel] === void 0)
|
|
4489
4489
|
throw new Error("Option label is undefined");
|
|
4490
|
-
let
|
|
4491
|
-
return e.multiple && Array.isArray(S.value) ? Oe = S.value.includes(
|
|
4492
|
-
value:
|
|
4493
|
-
label:
|
|
4490
|
+
let U = ee[e.optionValue], Oe;
|
|
4491
|
+
return e.multiple && Array.isArray(S.value) ? Oe = S.value.includes(U) : Oe = S.value === U, {
|
|
4492
|
+
value: U,
|
|
4493
|
+
label: ee[e.optionLabel],
|
|
4494
4494
|
active: Oe,
|
|
4495
|
-
onClick: () => ue(
|
|
4495
|
+
onClick: () => ue(U)
|
|
4496
4496
|
};
|
|
4497
4497
|
});
|
|
4498
4498
|
return e.allowBlank && F.unshift({
|
|
@@ -4516,36 +4516,36 @@ const _c = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4516
4516
|
u.value = !0;
|
|
4517
4517
|
}
|
|
4518
4518
|
}
|
|
4519
|
-
function ae(F,
|
|
4520
|
-
if (typeof F > "u" && (F =
|
|
4521
|
-
let
|
|
4522
|
-
|
|
4519
|
+
function ae(F, ee = "down") {
|
|
4520
|
+
if (typeof F > "u" && (F = ee === "down" ? -1 : 1), ee === "down") {
|
|
4521
|
+
let U = F + 1;
|
|
4522
|
+
U > I.value.length - 1 && (U = 0), i.value = U;
|
|
4523
4523
|
} else {
|
|
4524
|
-
let
|
|
4525
|
-
|
|
4524
|
+
let U = F - 1;
|
|
4525
|
+
U < 0 && (U = I.value.length - 1), i.value = U;
|
|
4526
4526
|
}
|
|
4527
4527
|
}
|
|
4528
4528
|
function ue(F) {
|
|
4529
4529
|
if (I.value.find(
|
|
4530
|
-
(
|
|
4530
|
+
(U) => U.value === F
|
|
4531
4531
|
))
|
|
4532
4532
|
if (e.multiple) {
|
|
4533
4533
|
if (Array.isArray(S.value)) {
|
|
4534
|
-
const
|
|
4535
|
-
|
|
4534
|
+
const U = S.value.indexOf(F);
|
|
4535
|
+
U !== -1 ? S.value.splice(U, 1) : (S.value.push(F), t("update:modelValue", S.value));
|
|
4536
4536
|
} else
|
|
4537
4537
|
S.value = [F];
|
|
4538
4538
|
j();
|
|
4539
4539
|
} else
|
|
4540
4540
|
S.value = F, u.value = !1;
|
|
4541
4541
|
}
|
|
4542
|
-
function be(F
|
|
4543
|
-
if (
|
|
4544
|
-
const
|
|
4545
|
-
|
|
4542
|
+
function be(F) {
|
|
4543
|
+
if (e.multiple && Array.isArray(S.value)) {
|
|
4544
|
+
const ee = S.value.indexOf(F);
|
|
4545
|
+
ee !== -1 && S.value.splice(ee, 1), j();
|
|
4546
4546
|
}
|
|
4547
4547
|
}
|
|
4548
|
-
|
|
4548
|
+
te("resize", () => {
|
|
4549
4549
|
u.value = !1;
|
|
4550
4550
|
});
|
|
4551
4551
|
function se(F) {
|
|
@@ -4588,7 +4588,7 @@ const _c = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4588
4588
|
{
|
|
4589
4589
|
"m-form__input": R
|
|
4590
4590
|
}
|
|
4591
|
-
]),
|
|
4591
|
+
]), G = p(() => [
|
|
4592
4592
|
wa,
|
|
4593
4593
|
{
|
|
4594
4594
|
[Qt]: d.value
|
|
@@ -4606,12 +4606,12 @@ const _c = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4606
4606
|
}
|
|
4607
4607
|
]);
|
|
4608
4608
|
function ve(F) {
|
|
4609
|
-
const
|
|
4610
|
-
(
|
|
4609
|
+
const ee = e.options.find(
|
|
4610
|
+
(U) => U[e.optionValue] === F
|
|
4611
4611
|
);
|
|
4612
|
-
return
|
|
4612
|
+
return ee ? ee[e.optionLabel] : null;
|
|
4613
4613
|
}
|
|
4614
|
-
|
|
4614
|
+
te(l, "keydown", se), te(o, "keydown", se), ln(
|
|
4615
4615
|
r,
|
|
4616
4616
|
() => {
|
|
4617
4617
|
u.value = !1;
|
|
@@ -4619,20 +4619,20 @@ const _c = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4619
4619
|
{ ignore: [o, _] }
|
|
4620
4620
|
), ct(() => {
|
|
4621
4621
|
r.value && u.value && (g.value = r.value.offsetWidth);
|
|
4622
|
-
}),
|
|
4622
|
+
}), q(i, (F) => {
|
|
4623
4623
|
O.value && typeof F < "u" && s.value && s.value[F].scrollIntoView({
|
|
4624
4624
|
block: "nearest",
|
|
4625
4625
|
inline: "nearest"
|
|
4626
4626
|
});
|
|
4627
|
-
}),
|
|
4627
|
+
}), q(u, (F) => {
|
|
4628
4628
|
Ge(() => {
|
|
4629
4629
|
if (F || (c.value = ""), e.searchable && o.value && o.value.focus(), F && s.value) {
|
|
4630
|
-
const
|
|
4631
|
-
(
|
|
4630
|
+
const ee = I.value.findIndex(
|
|
4631
|
+
(U) => U.value === S.value
|
|
4632
4632
|
);
|
|
4633
|
-
|
|
4633
|
+
ee !== -1 && (s.value[ee].scrollIntoView({
|
|
4634
4634
|
block: "nearest"
|
|
4635
|
-
}), i.value =
|
|
4635
|
+
}), i.value = ee);
|
|
4636
4636
|
}
|
|
4637
4637
|
O.value = !1;
|
|
4638
4638
|
});
|
|
@@ -4664,7 +4664,7 @@ const _c = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4664
4664
|
search: c,
|
|
4665
4665
|
containerComputedClasses: Ie,
|
|
4666
4666
|
selectComputedClasses: de,
|
|
4667
|
-
computedWrapperClasses:
|
|
4667
|
+
computedWrapperClasses: G,
|
|
4668
4668
|
computedConsistentWidth: K,
|
|
4669
4669
|
getSelectedLabel: ve,
|
|
4670
4670
|
openSelect: Y,
|
|
@@ -4735,7 +4735,7 @@ function Gc(e, t, n, r, a, s) {
|
|
|
4735
4735
|
(v(!0), y(Q, null, he(e.selectedMax, (l) => (v(), ne(o, {
|
|
4736
4736
|
key: l,
|
|
4737
4737
|
closeable: !0,
|
|
4738
|
-
onClose: (i) => e.removeSelected(
|
|
4738
|
+
onClose: (i) => e.removeSelected(l),
|
|
4739
4739
|
size: e.size
|
|
4740
4740
|
}, {
|
|
4741
4741
|
default: Z(() => [
|
|
@@ -4937,9 +4937,9 @@ const rf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4937
4937
|
[$a]: B.value
|
|
4938
4938
|
}
|
|
4939
4939
|
]), w = p(() => f.value || e.error);
|
|
4940
|
-
|
|
4940
|
+
q(() => e.modelValue, (A) => {
|
|
4941
4941
|
B.value = !!A;
|
|
4942
|
-
}, { immediate: !0 }),
|
|
4942
|
+
}, { immediate: !0 }), q(() => B.value, (A) => {
|
|
4943
4943
|
n("update:modelValue", A);
|
|
4944
4944
|
});
|
|
4945
4945
|
function E() {
|
|
@@ -5614,7 +5614,7 @@ const ep = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
5614
5614
|
[ja]: e.reverse
|
|
5615
5615
|
}
|
|
5616
5616
|
]);
|
|
5617
|
-
|
|
5617
|
+
q(
|
|
5618
5618
|
() => o.value,
|
|
5619
5619
|
(k) => {
|
|
5620
5620
|
k && f();
|
|
@@ -6242,7 +6242,7 @@ function bt(e) {
|
|
|
6242
6242
|
}
|
|
6243
6243
|
function Xp(e) {
|
|
6244
6244
|
const t = p(e), n = b(t.value);
|
|
6245
|
-
return
|
|
6245
|
+
return q(t, (r) => {
|
|
6246
6246
|
n.value = r;
|
|
6247
6247
|
}), typeof e == "function" ? n : {
|
|
6248
6248
|
__v_isRef: !0,
|
|
@@ -7877,7 +7877,7 @@ function zm(e, t, n, r, a, s) {
|
|
|
7877
7877
|
}
|
|
7878
7878
|
const Im = /* @__PURE__ */ V(Am, [["render", zm]]);
|
|
7879
7879
|
function _m(e, t) {
|
|
7880
|
-
return
|
|
7880
|
+
return q(e, (n) => {
|
|
7881
7881
|
n !== void 0 && (t.value = n);
|
|
7882
7882
|
}), p(() => e.value === void 0 ? t.value : e.value);
|
|
7883
7883
|
}
|
package/package.json
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
v-for="value in selectedMax"
|
|
29
29
|
:key="value"
|
|
30
30
|
:closeable="true"
|
|
31
|
-
@close="removeSelected(
|
|
31
|
+
@close="removeSelected(value)"
|
|
32
32
|
:size="size">
|
|
33
33
|
{{ getSelectedLabel(value) }}
|
|
34
34
|
</MTag>
|
|
@@ -514,9 +514,7 @@ export default defineComponent({
|
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
516
|
|
|
517
|
-
function removeSelected(
|
|
518
|
-
event.stopPropagation();
|
|
519
|
-
event.preventDefault();
|
|
517
|
+
function removeSelected(value: string | number) {
|
|
520
518
|
if (!props.multiple) {
|
|
521
519
|
return;
|
|
522
520
|
}
|