@varlet/ui 3.8.0-alpha.1735486215545 → 3.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/action-sheet/style/index.mjs +1 -1
- package/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/menu-option/MenuOption.mjs +2 -4
- package/es/snackbar/style/index.mjs +1 -1
- package/es/varlet.esm.js +69 -69
- package/highlight/web-types.en-US.json +1 -1
- package/highlight/web-types.zh-CN.json +1 -1
- package/lib/varlet.cjs.js +3 -5
- package/package.json +7 -7
- package/umd/varlet.js +5 -5
package/es/index.bundle.mjs
CHANGED
|
@@ -280,7 +280,7 @@ import './tooltip/style/index.mjs'
|
|
|
280
280
|
import './uploader/style/index.mjs'
|
|
281
281
|
import './watermark/style/index.mjs'
|
|
282
282
|
|
|
283
|
-
const version = '3.8.
|
|
283
|
+
const version = '3.8.1'
|
|
284
284
|
|
|
285
285
|
function install(app) {
|
|
286
286
|
ActionSheet.install && app.use(ActionSheet)
|
package/es/index.mjs
CHANGED
|
@@ -186,7 +186,7 @@ export * from './tooltip/index.mjs'
|
|
|
186
186
|
export * from './uploader/index.mjs'
|
|
187
187
|
export * from './watermark/index.mjs'
|
|
188
188
|
|
|
189
|
-
const version = '3.8.
|
|
189
|
+
const version = '3.8.1'
|
|
190
190
|
|
|
191
191
|
function install(app) {
|
|
192
192
|
ActionSheet.install && app.use(ActionSheet)
|
|
@@ -192,10 +192,8 @@ const __sfc__ = defineComponent({
|
|
|
192
192
|
if (!isFocusing.value && !((_a = checkbox.value) == null ? void 0 : _a.isFocusing)) {
|
|
193
193
|
return;
|
|
194
194
|
}
|
|
195
|
-
if (event.key === "ArrowRight") {
|
|
196
|
-
|
|
197
|
-
}
|
|
198
|
-
if (event.key === "ArrowLeft") {
|
|
195
|
+
if (event.key === "ArrowRight" || event.key === "ArrowLeft") {
|
|
196
|
+
preventDefault(event);
|
|
199
197
|
call(props2.onKeyArrowX, event.key);
|
|
200
198
|
}
|
|
201
199
|
if (!isFocusing.value) {
|
package/es/varlet.esm.js
CHANGED
|
@@ -138,7 +138,7 @@ Sf(Of, {
|
|
|
138
138
|
pick: () => Bb,
|
|
139
139
|
pickBy: () => Ib,
|
|
140
140
|
prettyJSONObject: () => jf,
|
|
141
|
-
preventDefault: () =>
|
|
141
|
+
preventDefault: () => Me,
|
|
142
142
|
promiseWithResolvers: () => Nb,
|
|
143
143
|
raf: () => vo,
|
|
144
144
|
randomColor: () => jb,
|
|
@@ -548,7 +548,7 @@ Sf(Gs, {
|
|
|
548
548
|
mitt: () => Ws,
|
|
549
549
|
motion: () => eu,
|
|
550
550
|
prettyJSONObject: () => jf,
|
|
551
|
-
preventDefault: () =>
|
|
551
|
+
preventDefault: () => Me,
|
|
552
552
|
raf: () => vo,
|
|
553
553
|
requestAnimationFrame: () => Ao,
|
|
554
554
|
sessionStorage: () => Yf,
|
|
@@ -690,7 +690,7 @@ function xs(e) {
|
|
|
690
690
|
function jf(e) {
|
|
691
691
|
return JSON.stringify(e, null, 2);
|
|
692
692
|
}
|
|
693
|
-
function
|
|
693
|
+
function Me(e) {
|
|
694
694
|
e.cancelable !== !1 && e.preventDefault();
|
|
695
695
|
}
|
|
696
696
|
function vo() {
|
|
@@ -1719,7 +1719,7 @@ var ga = ee({
|
|
|
1719
1719
|
});
|
|
1720
1720
|
}
|
|
1721
1721
|
function v(m) {
|
|
1722
|
-
!i() || m.key !== "Escape" || !e.show || (C(e.onKeyEscape), e.closeOnKeyEscape && (
|
|
1722
|
+
!i() || m.key !== "Escape" || !e.show || (C(e.onKeyEscape), e.closeOnKeyEscape && (Me(m), C(e["onUpdate:show"], !1)));
|
|
1723
1723
|
}
|
|
1724
1724
|
return () => {
|
|
1725
1725
|
const {
|
|
@@ -3951,7 +3951,7 @@ const Hp = ee({
|
|
|
3951
3951
|
}
|
|
3952
3952
|
function Y(Z) {
|
|
3953
3953
|
const { disabled: oe } = e;
|
|
3954
|
-
i != null && i.disabled.value || oe || Z.target === o.value || (D(),
|
|
3954
|
+
i != null && i.disabled.value || oe || Z.target === o.value || (D(), Me(Z));
|
|
3955
3955
|
}
|
|
3956
3956
|
function H() {
|
|
3957
3957
|
C(e["onUpdate:modelValue"], ""), c();
|
|
@@ -5108,7 +5108,7 @@ function Zp(e) {
|
|
|
5108
5108
|
}
|
|
5109
5109
|
function M(D) {
|
|
5110
5110
|
const { closeOnKeyEscape: Q = !1 } = e;
|
|
5111
|
-
D.key === "Escape" && Q && r.value && (
|
|
5111
|
+
D.key === "Escape" && Q && r.value && (Me(D), U());
|
|
5112
5112
|
}
|
|
5113
5113
|
function Y() {
|
|
5114
5114
|
i.setOptions(A());
|
|
@@ -5462,10 +5462,10 @@ const xp = ee({
|
|
|
5462
5462
|
if (!o.value)
|
|
5463
5463
|
return;
|
|
5464
5464
|
const { key: Y } = M;
|
|
5465
|
-
(Y === "Enter" || Y === " ") &&
|
|
5465
|
+
(Y === "Enter" || Y === " ") && Me(M), Y === "Enter" && n.value.click();
|
|
5466
5466
|
}
|
|
5467
5467
|
function E(M) {
|
|
5468
|
-
o.value && M.key === " " && (
|
|
5468
|
+
o.value && M.key === " " && (Me(M), n.value.click());
|
|
5469
5469
|
}
|
|
5470
5470
|
function z() {
|
|
5471
5471
|
return g(e.rules, e.modelValue);
|
|
@@ -5677,10 +5677,10 @@ const ov = ee({
|
|
|
5677
5677
|
}
|
|
5678
5678
|
function O(E) {
|
|
5679
5679
|
var z;
|
|
5680
|
-
!t.value && !((z = o.value) != null && z.isFocusing) || (E.key === "ArrowRight"
|
|
5680
|
+
!t.value && !((z = o.value) != null && z.isFocusing) || ((E.key === "ArrowRight" || E.key === "ArrowLeft") && (Me(E), C(e.onKeyArrowX, E.key)), t.value && ((E.key === " " || E.key === "Enter") && Me(E), E.key === "Enter" && n.value.click()));
|
|
5681
5681
|
}
|
|
5682
5682
|
function B(E) {
|
|
5683
|
-
t.value && E.key === " " && (
|
|
5683
|
+
t.value && E.key === " " && (Me(E), n.value.click());
|
|
5684
5684
|
}
|
|
5685
5685
|
function A() {
|
|
5686
5686
|
return Ww(this, null, function* () {
|
|
@@ -6202,7 +6202,7 @@ const av = ee({
|
|
|
6202
6202
|
if (e.disabled || !n.value)
|
|
6203
6203
|
return;
|
|
6204
6204
|
const { key: M } = z;
|
|
6205
|
-
if (["Escape", "ArrowDown", "ArrowUp"].includes(M) &&
|
|
6205
|
+
if (["Escape", "ArrowDown", "ArrowUp"].includes(M) && Me(z), M === "Escape") {
|
|
6206
6206
|
o.value.$el.focus(), A(), C(e.onKeyEscape);
|
|
6207
6207
|
return;
|
|
6208
6208
|
}
|
|
@@ -6505,7 +6505,7 @@ const lv = ee({
|
|
|
6505
6505
|
return;
|
|
6506
6506
|
const { key: Q } = U;
|
|
6507
6507
|
if (Q === "Tab") {
|
|
6508
|
-
|
|
6508
|
+
Me(U), n.value.focus(), i.value = !1;
|
|
6509
6509
|
return;
|
|
6510
6510
|
}
|
|
6511
6511
|
if (!["ArrowUp", "ArrowDown", "Enter"].includes(Q)) {
|
|
@@ -12428,19 +12428,19 @@ const Nm = ee({
|
|
|
12428
12428
|
const Te = $e === "year" ? g : $e === "month" ? w : $, Re = $e === "year" ? "YYYY" : $e === "month" ? "YYYY-MM" : "YYYY-MM-DD", Le = Te.value.map((hn) => ue(hn).format(Re)), fn = Le.findIndex((hn) => hn === ie);
|
|
12429
12429
|
fn === -1 ? Le.push(ie) : Le.splice(fn, 1), C(e["onUpdate:modelValue"], Le), C(e.onChange, Le);
|
|
12430
12430
|
}
|
|
12431
|
-
function
|
|
12431
|
+
function Ne(ie, $e) {
|
|
12432
12432
|
return !c.value || !u.value ? !1 : Z.value ? ie === "year" ? $e < j(c.value) : ie === "month" ? $e < u.value : oe.value ? $e < j(d.value) : u.value > f.value : c.value > v.value;
|
|
12433
12433
|
}
|
|
12434
12434
|
function rn(ie) {
|
|
12435
12435
|
const { readonly: $e, range: Te, multiple: Re, onChange: Le, "onUpdate:modelValue": fn } = e;
|
|
12436
12436
|
if (ie < 0 || $e) return;
|
|
12437
|
-
m.value =
|
|
12437
|
+
m.value = Ne("day", ie);
|
|
12438
12438
|
const hn = `${v.value}-${f.value}-${ie}`, gn = ue(hn).format("YYYY-MM-DD");
|
|
12439
12439
|
Te ? Se(gn, "day") : Re ? Ue(gn, "day") : (C(fn, gn), C(Le, gn));
|
|
12440
12440
|
}
|
|
12441
12441
|
function un(ie) {
|
|
12442
12442
|
const { type: $e, readonly: Te, range: Re, multiple: Le, onChange: fn, onPreview: hn, "onUpdate:modelValue": gn } = e;
|
|
12443
|
-
if (m.value =
|
|
12443
|
+
if (m.value = Ne("month", ie), $e === "month" && !Te) {
|
|
12444
12444
|
const Ko = `${v.value}-${ie}`;
|
|
12445
12445
|
Re ? Se(Ko, "month") : Le ? Ue(Ko, "month") : (C(gn, Ko), C(fn, Ko));
|
|
12446
12446
|
} else
|
|
@@ -12454,7 +12454,7 @@ const Nm = ee({
|
|
|
12454
12454
|
}
|
|
12455
12455
|
function Pn(ie) {
|
|
12456
12456
|
const { type: $e, readonly: Te, range: Re, multiple: Le, onChange: fn, onPreview: hn, "onUpdate:modelValue": gn } = e;
|
|
12457
|
-
m.value =
|
|
12457
|
+
m.value = Ne("year", ie), $e === "year" && !Te ? Re ? Se(`${ie}`, "year") : Le ? Ue(`${ie}`, "year") : (C(gn, `${ie}`), C(fn, `${ie}`)) : (v.value = `${ie}`, C(
|
|
12458
12458
|
hn,
|
|
12459
12459
|
j(v.value),
|
|
12460
12460
|
j(f.value),
|
|
@@ -13059,7 +13059,7 @@ const Hm = ee({
|
|
|
13059
13059
|
}
|
|
13060
13060
|
function y(H) {
|
|
13061
13061
|
return SP(this, null, function* () {
|
|
13062
|
-
!l.value || e.disabled || (f(H),
|
|
13062
|
+
!l.value || e.disabled || (f(H), Me(H), i.value = !1, a.value = !0, e.direction.includes("x") && (t.value += u.value), e.direction.includes("y") && (r.value += c.value), N());
|
|
13063
13063
|
});
|
|
13064
13064
|
}
|
|
13065
13065
|
function b() {
|
|
@@ -13710,11 +13710,11 @@ const Gm = ee({
|
|
|
13710
13710
|
if (M && !e.contentDraggable)
|
|
13711
13711
|
return;
|
|
13712
13712
|
if (M && e.contentDraggable && n.value >= s.value && !g(o.value)) {
|
|
13713
|
-
w(o.value) &&
|
|
13713
|
+
w(o.value) && Me(N);
|
|
13714
13714
|
return;
|
|
13715
13715
|
}
|
|
13716
13716
|
const Y = $ - c.value;
|
|
13717
|
-
O(B(Y)),
|
|
13717
|
+
O(B(Y)), Me(N);
|
|
13718
13718
|
}
|
|
13719
13719
|
function T() {
|
|
13720
13720
|
m();
|
|
@@ -13831,13 +13831,13 @@ const Jm = ee({
|
|
|
13831
13831
|
}
|
|
13832
13832
|
function l(f) {
|
|
13833
13833
|
return Od(this, null, function* () {
|
|
13834
|
-
|
|
13834
|
+
Me(f);
|
|
13835
13835
|
const v = yield u();
|
|
13836
13836
|
C(e.onSubmit, v);
|
|
13837
13837
|
});
|
|
13838
13838
|
}
|
|
13839
13839
|
function s(f) {
|
|
13840
|
-
|
|
13840
|
+
Me(f), c(), C(e.onReset);
|
|
13841
13841
|
}
|
|
13842
13842
|
function u() {
|
|
13843
13843
|
return Od(this, null, function* () {
|
|
@@ -14267,14 +14267,14 @@ const eh = ee({
|
|
|
14267
14267
|
}), We(() => window, "keydown", Ue), C(g, null), C(v, null), pe(
|
|
14268
14268
|
() => d.value,
|
|
14269
14269
|
() => nt(this, null, function* () {
|
|
14270
|
-
yield bn(), W(),
|
|
14270
|
+
yield bn(), W(), Ne();
|
|
14271
14271
|
})
|
|
14272
14272
|
), m && pe(
|
|
14273
14273
|
() => m.show.value,
|
|
14274
14274
|
(me) => nt(this, null, function* () {
|
|
14275
|
-
me ? (yield bn(),
|
|
14275
|
+
me ? (yield bn(), Ne()) : re();
|
|
14276
14276
|
})
|
|
14277
|
-
), Fo(
|
|
14277
|
+
), Fo(Ne), ar(re), lo(Ne);
|
|
14278
14278
|
function D(me) {
|
|
14279
14279
|
return u.find(({ index: Ke }) => Ke.value === me);
|
|
14280
14280
|
}
|
|
@@ -14317,7 +14317,7 @@ const eh = ee({
|
|
|
14317
14317
|
}
|
|
14318
14318
|
function V(me) {
|
|
14319
14319
|
const { touchable: Ke, vertical: te } = e;
|
|
14320
|
-
!O.value || !Ke || (E(me), M.value && (
|
|
14320
|
+
!O.value || !Ke || (E(me), M.value && (Me(me), a.value += te ? b.value : y.value, Q()));
|
|
14321
14321
|
}
|
|
14322
14322
|
function K() {
|
|
14323
14323
|
if (!O.value || (z(), !M.value))
|
|
@@ -14337,9 +14337,9 @@ const eh = ee({
|
|
|
14337
14337
|
if (!u.length || u.findIndex(({ isFocusing: de }) => de.value) === -1)
|
|
14338
14338
|
return;
|
|
14339
14339
|
const { key: te } = me;
|
|
14340
|
-
|
|
14340
|
+
Me(me), te === "ArrowLeft" && un(), te === "ArrowRight" && rn();
|
|
14341
14341
|
}
|
|
14342
|
-
function
|
|
14342
|
+
function Ne() {
|
|
14343
14343
|
n.value && (i.value = !0, o.value = e.vertical ? n.value.offsetHeight : n.value.offsetWidth, r.value = o.value * d.value, a.value = l.value * -o.value, u.forEach((me) => {
|
|
14344
14344
|
me.setTranslate(0);
|
|
14345
14345
|
}), J(), setTimeout(() => {
|
|
@@ -14400,7 +14400,7 @@ const eh = ee({
|
|
|
14400
14400
|
next: rn,
|
|
14401
14401
|
prev: un,
|
|
14402
14402
|
to: Pn,
|
|
14403
|
-
resize:
|
|
14403
|
+
resize: Ne,
|
|
14404
14404
|
toNumber: j,
|
|
14405
14405
|
handleHovering: ve,
|
|
14406
14406
|
getNavigationAnimation: Se
|
|
@@ -14720,7 +14720,7 @@ const th = ee({
|
|
|
14720
14720
|
C(e["onUpdate:show"], !1);
|
|
14721
14721
|
}
|
|
14722
14722
|
function Q(W) {
|
|
14723
|
-
w.value &&
|
|
14723
|
+
w.value && Me(W);
|
|
14724
14724
|
}
|
|
14725
14725
|
function Z(W) {
|
|
14726
14726
|
var J;
|
|
@@ -15625,10 +15625,10 @@ const Oh = ee({
|
|
|
15625
15625
|
e.disabled || T();
|
|
15626
15626
|
}
|
|
15627
15627
|
function b(B) {
|
|
15628
|
-
o.value && ((B.key === " " || B.key === "Enter") &&
|
|
15628
|
+
o.value && ((B.key === " " || B.key === "Enter") && Me(B), B.key === "Enter" && n.value.click());
|
|
15629
15629
|
}
|
|
15630
15630
|
function P(B) {
|
|
15631
|
-
o.value && B.key === " " && (
|
|
15631
|
+
o.value && B.key === " " && (Me(B), n.value.click());
|
|
15632
15632
|
}
|
|
15633
15633
|
function T() {
|
|
15634
15634
|
c.value && (t.value = !t.value), f($);
|
|
@@ -15693,7 +15693,7 @@ var Oi = ee({
|
|
|
15693
15693
|
} = xo();
|
|
15694
15694
|
lr(() => e.show, () => e.lockScroll), We(() => window, "keydown", i);
|
|
15695
15695
|
function i(c) {
|
|
15696
|
-
!r() || c.key !== "Escape" || !e.show || (C(e.onKeyEscape), e.closeOnKeyEscape && (
|
|
15696
|
+
!r() || c.key !== "Escape" || !e.show || (C(e.onKeyEscape), e.closeOnKeyEscape && (Me(c), C(e["onUpdate:show"], !1)));
|
|
15697
15697
|
}
|
|
15698
15698
|
function l() {
|
|
15699
15699
|
C(e.onClick), C(e["onUpdate:show"], !1);
|
|
@@ -16490,7 +16490,7 @@ const Ah = ee({
|
|
|
16490
16490
|
column: ve,
|
|
16491
16491
|
scrollEl: null,
|
|
16492
16492
|
scrolling: !1
|
|
16493
|
-
},
|
|
16493
|
+
}, Ne = n.value[Se], rn = Ue.column.findIndex((un) => Ne === $(un));
|
|
16494
16494
|
return Ue.index = rn === -1 ? 0 : rn, H(Ue), Ue;
|
|
16495
16495
|
});
|
|
16496
16496
|
}
|
|
@@ -16501,7 +16501,7 @@ const Ah = ee({
|
|
|
16501
16501
|
function T(V, K, ve = !0, Se = 1) {
|
|
16502
16502
|
var Ue;
|
|
16503
16503
|
if (K.length && (e.columnsCount == null || Se <= t.value)) {
|
|
16504
|
-
const
|
|
16504
|
+
const Ne = {
|
|
16505
16505
|
id: qd++,
|
|
16506
16506
|
prevY: 0,
|
|
16507
16507
|
momentumPrevY: 0,
|
|
@@ -16514,13 +16514,13 @@ const Ah = ee({
|
|
|
16514
16514
|
scrollEl: null,
|
|
16515
16515
|
scrolling: !1
|
|
16516
16516
|
};
|
|
16517
|
-
if (V.push(
|
|
16517
|
+
if (V.push(Ne), ve) {
|
|
16518
16518
|
const rn = n.value[V.length - 1], un = K.findIndex((Pn) => rn === $(Pn));
|
|
16519
|
-
|
|
16519
|
+
Ne.index = un === -1 ? 0 : un;
|
|
16520
16520
|
}
|
|
16521
|
-
H(
|
|
16521
|
+
H(Ne), T(
|
|
16522
16522
|
V,
|
|
16523
|
-
(Ue =
|
|
16523
|
+
(Ue = Ne.column[Ne.index][w("children")]) != null ? Ue : [],
|
|
16524
16524
|
ve,
|
|
16525
16525
|
Se + 1
|
|
16526
16526
|
);
|
|
@@ -16560,8 +16560,8 @@ const Ah = ee({
|
|
|
16560
16560
|
function Y() {
|
|
16561
16561
|
const V = [], K = [], ve = [];
|
|
16562
16562
|
return o.value.forEach(({ column: Se, index: Ue }) => {
|
|
16563
|
-
const
|
|
16564
|
-
V.push($(
|
|
16563
|
+
const Ne = Se[Ue];
|
|
16564
|
+
V.push($(Ne)), K.push(Ue), ve.push(Ne);
|
|
16565
16565
|
}), {
|
|
16566
16566
|
values: V,
|
|
16567
16567
|
indexes: K,
|
|
@@ -16607,8 +16607,8 @@ const Ah = ee({
|
|
|
16607
16607
|
const Se = o.value.some((Pn) => Pn.scrolling), Ue = o.value.some((Pn) => Pn.touching);
|
|
16608
16608
|
if (Se || Ue)
|
|
16609
16609
|
return;
|
|
16610
|
-
const { values:
|
|
16611
|
-
y(rn), C(K,
|
|
16610
|
+
const { values: Ne, indexes: rn, options: un } = Y();
|
|
16611
|
+
y(rn), C(K, Ne, rn, un), n.value = Ne;
|
|
16612
16612
|
}
|
|
16613
16613
|
function J() {
|
|
16614
16614
|
if (e.cascade) {
|
|
@@ -17081,7 +17081,7 @@ const Rh = ee({
|
|
|
17081
17081
|
function O(E) {
|
|
17082
17082
|
if (m(E), !d.value || !y || y !== $ && go(y) > 0 || go($) > 0)
|
|
17083
17083
|
return;
|
|
17084
|
-
w($) &&
|
|
17084
|
+
w($) && Me(E), l.value !== "pulling" && (l.value = "pulling", r.value = E.touches[0].clientY), w($) && Tn(a.value) && a.value > n.value && P("add");
|
|
17085
17085
|
const M = (E.touches[0].clientY - r.value) / 2 + n.value;
|
|
17086
17086
|
a.value = M >= u.value ? u.value : M, b(a.value >= u.value * 0.2 ? "refresh" : "arrow-down");
|
|
17087
17087
|
}
|
|
@@ -17292,10 +17292,10 @@ const Uh = ee({
|
|
|
17292
17292
|
if (!o.value)
|
|
17293
17293
|
return;
|
|
17294
17294
|
const { key: z } = E;
|
|
17295
|
-
(z === "Enter" || z === " ") &&
|
|
17295
|
+
(z === "Enter" || z === " ") && Me(E), z === "Enter" && n.value.click();
|
|
17296
17296
|
}
|
|
17297
17297
|
function $(E) {
|
|
17298
|
-
o.value && E.key === " " && (
|
|
17298
|
+
o.value && E.key === " " && (Me(E), n.value.click());
|
|
17299
17299
|
}
|
|
17300
17300
|
function y(E) {
|
|
17301
17301
|
He(() => {
|
|
@@ -17450,7 +17450,7 @@ const jh = ee({
|
|
|
17450
17450
|
function d(y) {
|
|
17451
17451
|
const b = o.findIndex(({ isFocusing: T }) => T.value);
|
|
17452
17452
|
if (!(b === -1 || !o.some(({ moveable: T }, O) => O === b ? !1 : T()))) {
|
|
17453
|
-
if (["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(y.key) &&
|
|
17453
|
+
if (["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(y.key) && Me(y), y.key === "ArrowUp" || y.key === "ArrowLeft") {
|
|
17454
17454
|
f(b, "prev");
|
|
17455
17455
|
return;
|
|
17456
17456
|
}
|
|
@@ -18416,29 +18416,29 @@ const og = ee({
|
|
|
18416
18416
|
return;
|
|
18417
18417
|
const { key: Se } = V;
|
|
18418
18418
|
if (Se === " " && !o.value) {
|
|
18419
|
-
|
|
18419
|
+
Me(V);
|
|
18420
18420
|
return;
|
|
18421
18421
|
}
|
|
18422
18422
|
if (Se === "Escape" && o.value) {
|
|
18423
|
-
t.value.focus(),
|
|
18423
|
+
t.value.focus(), Me(V), o.value = !1;
|
|
18424
18424
|
return;
|
|
18425
18425
|
}
|
|
18426
18426
|
if (Se === "Tab" && o.value) {
|
|
18427
|
-
t.value.focus(),
|
|
18427
|
+
t.value.focus(), Me(V), U();
|
|
18428
18428
|
return;
|
|
18429
18429
|
}
|
|
18430
18430
|
if (Se === "Enter" && !o.value) {
|
|
18431
|
-
|
|
18431
|
+
Me(V), o.value = !0;
|
|
18432
18432
|
return;
|
|
18433
18433
|
}
|
|
18434
|
-
(Se === "ArrowDown" || Se === "ArrowUp") && o.value && (
|
|
18434
|
+
(Se === "ArrowDown" || Se === "ArrowUp") && o.value && (Me(V), ru(t.value, O.value, Se));
|
|
18435
18435
|
}
|
|
18436
18436
|
function M(V) {
|
|
18437
18437
|
const { disabled: K, readonly: ve } = e;
|
|
18438
18438
|
if (c != null && c.disabled.value || c != null && c.readonly.value || K || ve || o.value || !n.value)
|
|
18439
18439
|
return;
|
|
18440
18440
|
const { key: Se } = V;
|
|
18441
|
-
Se === " " && !o.value && (
|
|
18441
|
+
Se === " " && !o.value && (Me(V), o.value = !0);
|
|
18442
18442
|
}
|
|
18443
18443
|
function Y(V) {
|
|
18444
18444
|
He(() => {
|
|
@@ -18464,8 +18464,8 @@ const og = ee({
|
|
|
18464
18464
|
const { disabled: K, readonly: ve, multiple: Se, onChange: Ue } = e;
|
|
18465
18465
|
if (c != null && c.disabled.value || c != null && c.readonly.value || K || ve)
|
|
18466
18466
|
return;
|
|
18467
|
-
const
|
|
18468
|
-
C(e["onUpdate:modelValue"],
|
|
18467
|
+
const Ne = $(V);
|
|
18468
|
+
C(e["onUpdate:modelValue"], Ne), C(Ue, Ne), Y("onChange"), Se || (t.value.focus(), bn().then(() => {
|
|
18469
18469
|
o.value = !1;
|
|
18470
18470
|
}));
|
|
18471
18471
|
}
|
|
@@ -18473,8 +18473,8 @@ const og = ee({
|
|
|
18473
18473
|
const { disabled: V, readonly: K, multiple: ve, clearable: Se, onClear: Ue } = e;
|
|
18474
18474
|
if (c != null && c.disabled.value || c != null && c.readonly.value || V || K || !Se)
|
|
18475
18475
|
return;
|
|
18476
|
-
const
|
|
18477
|
-
C(e["onUpdate:modelValue"],
|
|
18476
|
+
const Ne = ve ? [] : void 0;
|
|
18477
|
+
C(e["onUpdate:modelValue"], Ne), C(Ue, Ne), Y("onClear");
|
|
18478
18478
|
}
|
|
18479
18479
|
function ye(V) {
|
|
18480
18480
|
const { disabled: K, onClick: ve } = e;
|
|
@@ -18484,10 +18484,10 @@ const og = ee({
|
|
|
18484
18484
|
const { disabled: K, readonly: ve, modelValue: Se, onClose: Ue } = e;
|
|
18485
18485
|
if (c != null && c.disabled.value || c != null && c.readonly.value || K || ve)
|
|
18486
18486
|
return;
|
|
18487
|
-
const
|
|
18487
|
+
const Ne = f.find(({ label: un }) => un.value === V), rn = Se.filter(
|
|
18488
18488
|
(un) => {
|
|
18489
18489
|
var Pn;
|
|
18490
|
-
return un !== ((Pn =
|
|
18490
|
+
return un !== ((Pn = Ne.value.value) != null ? Pn : Ne.label.value);
|
|
18491
18491
|
}
|
|
18492
18492
|
);
|
|
18493
18493
|
C(e["onUpdate:modelValue"], rn), C(Ue, rn), Y("onClose");
|
|
@@ -19019,8 +19019,8 @@ const ig = ee({
|
|
|
19019
19019
|
validate: z,
|
|
19020
19020
|
resetValidation: w
|
|
19021
19021
|
}), pe([() => e.modelValue, () => e.step], ([te, de]) => {
|
|
19022
|
-
!Se() || !Ue() || t.value ||
|
|
19023
|
-
}), pe(n, () =>
|
|
19022
|
+
!Se() || !Ue() || t.value || Ne(te, j(de));
|
|
19023
|
+
}), pe(n, () => Ne()), yn(() => {
|
|
19024
19024
|
!Se() || !Ue() || E();
|
|
19025
19025
|
}), da(re), We(() => window, "keydown", Pn), lo(E);
|
|
19026
19026
|
function E() {
|
|
@@ -19097,7 +19097,7 @@ const ig = ee({
|
|
|
19097
19097
|
B[de].startPosition = s.value ? Be : ke;
|
|
19098
19098
|
}
|
|
19099
19099
|
function V(te) {
|
|
19100
|
-
if (
|
|
19100
|
+
if (Me(te), i.value || l.value || !t.value)
|
|
19101
19101
|
return;
|
|
19102
19102
|
const { startPosition: de, currentOffset: ke } = B[A], { clientX: Be, clientY: Qe } = te.touches[0];
|
|
19103
19103
|
let ie = (s.value ? de - Qe : Be - de) + ke;
|
|
@@ -19126,7 +19126,7 @@ const ig = ee({
|
|
|
19126
19126
|
const { range: te, modelValue: de } = e;
|
|
19127
19127
|
return te && !Fe(de) ? (st("Slider", '"modelValue" should be an Array'), !1) : !te && Fe(de) ? (st("Slider", '"modelValue" should be a Number'), !1) : te && Fe(de) && de.length < 2 ? (st("Slider", '"modelValue" should have two value'), !1) : !0;
|
|
19128
19128
|
}
|
|
19129
|
-
function
|
|
19129
|
+
function Ne(te = e.modelValue, de = j(e.step)) {
|
|
19130
19130
|
const ke = (Be) => {
|
|
19131
19131
|
const { min: Qe, max: ie } = e;
|
|
19132
19132
|
return Be < j(Qe) ? 0 : Be > j(ie) ? r.value / de : (Be - j(Qe)) / de;
|
|
@@ -19154,7 +19154,7 @@ const ig = ee({
|
|
|
19154
19154
|
}, { key: ke } = te;
|
|
19155
19155
|
if (!Go(de, ke) || l.value || i.value || e.range && !u.value && !c.value || !e.range && !u.value)
|
|
19156
19156
|
return;
|
|
19157
|
-
|
|
19157
|
+
Me(te);
|
|
19158
19158
|
const Be = de[ke], Qe = un(Be, e.modelValue);
|
|
19159
19159
|
ye(Qe);
|
|
19160
19160
|
}
|
|
@@ -20093,10 +20093,10 @@ const $g = ee({
|
|
|
20093
20093
|
resetValidation: s
|
|
20094
20094
|
}), We(() => window, "keydown", g), We(() => window, "keyup", w);
|
|
20095
20095
|
function g(O) {
|
|
20096
|
-
o.value && ((O.key === " " || O.key === "Enter") &&
|
|
20096
|
+
o.value && ((O.key === " " || O.key === "Enter") && Me(O), O.key === "Enter" && n.value.click());
|
|
20097
20097
|
}
|
|
20098
20098
|
function w(O) {
|
|
20099
|
-
!o.value || O.key !== " " || (
|
|
20099
|
+
!o.value || O.key !== " " || (Me(O), n.value.click());
|
|
20100
20100
|
}
|
|
20101
20101
|
function $() {
|
|
20102
20102
|
return l(e.rules, e.modelValue);
|
|
@@ -24211,7 +24211,7 @@ const Fg = ee({
|
|
|
24211
24211
|
}
|
|
24212
24212
|
}
|
|
24213
24213
|
function oe(W) {
|
|
24214
|
-
if (
|
|
24214
|
+
if (Me(W), e.readonly) return;
|
|
24215
24215
|
Z();
|
|
24216
24216
|
const { clientX: J, clientY: re } = W.touches[0], fe = J - $.x, V = re - $.y, K = Math.round(B(Math.atan2(V, fe)));
|
|
24217
24217
|
m.value === "hour" ? U(J, re, K) : m.value === "minute" ? D(K) : Q(K);
|
|
@@ -24622,7 +24622,7 @@ const Hg = ee({
|
|
|
24622
24622
|
const { maxsize: J, maxlength: re, modelValue: fe, onOversize: V, onAfterRead: K, onBeforeFilter: ve, readonly: Se, disabled: Ue } = e;
|
|
24623
24623
|
if (l != null && l.disabled.value || l != null && l.readonly.value || Ue || Se)
|
|
24624
24624
|
return;
|
|
24625
|
-
const
|
|
24625
|
+
const Ne = (ke) => ke.filter((Be) => Be.file.size > j(J) ? (C(V, xe(Be)), !1) : !0), rn = (ke) => {
|
|
24626
24626
|
const Be = Math.min(ke.length, j(re) - fe.length);
|
|
24627
24627
|
return ke.slice(0, Be);
|
|
24628
24628
|
}, un = (ke) => Dr(this, null, function* () {
|
|
@@ -24634,7 +24634,7 @@ const Hg = ee({
|
|
|
24634
24634
|
return ke;
|
|
24635
24635
|
});
|
|
24636
24636
|
let me = B(W).map(O);
|
|
24637
|
-
me = yield un(me), me = J != null ?
|
|
24637
|
+
me = yield un(me), me = J != null ? Ne(me) : me, me = re != null ? rn(me) : me;
|
|
24638
24638
|
const Ke = yield Promise.all(N(me)), de = (yield Promise.all(E(Ke))).filter(({ valid: ke }) => ke).map(({ varFile: ke }) => ke);
|
|
24639
24639
|
C(e["onUpdate:modelValue"], [...fe, ...de]), W.target.value = "", de.forEach((ke) => C(K, xe(ke)));
|
|
24640
24640
|
});
|
|
@@ -24975,7 +24975,7 @@ ae(xi);
|
|
|
24975
24975
|
le(xi, jg);
|
|
24976
24976
|
const qI = xi;
|
|
24977
24977
|
var Hs = xi;
|
|
24978
|
-
const aB = "3.8.
|
|
24978
|
+
const aB = "3.8.1";
|
|
24979
24979
|
function iB(e) {
|
|
24980
24980
|
ml.install && e.use(ml), hl.install && e.use(hl), gl.install && e.use(gl), wl.install && e.use(wl), Cl.install && e.use(Cl), Sl.install && e.use(Sl), Pl.install && e.use(Pl), ea.install && e.use(ea), Ol.install && e.use(Ol), zl.install && e.use(zl), Tl.install && e.use(Tl), El.install && e.use(El), Bn.install && e.use(Bn), Bl.install && e.use(Bl), Il.install && e.use(Il), Dl.install && e.use(Dl), pt.install && e.use(pt), Al.install && e.use(Al), na.install && e.use(na), Nl.install && e.use(Nl), Vl.install && e.use(Vl), Rl.install && e.use(Rl), Ll.install && e.use(Ll), Fl.install && e.use(Fl), Vn.install && e.use(Vn), Ul.install && e.use(Ul), Wl.install && e.use(Wl), Jl.install && e.use(Jl), _l.install && e.use(_l), xl.install && e.use(xl), es.install && e.use(es), la.install && e.use(la), ns.install && e.use(ns), os.install && e.use(os), Lt.install && e.use(Lt), ts.install && e.use(ts), rs.install && e.use(rs), En.install && e.use(En), as.install && e.use(as), Dn.install && e.use(Dn), Fn.install && e.use(Fn), Ge.install && e.use(Ge), is.install && e.use(is), Gt.install && e.use(Gt), ls.install && e.use(ls), ss.install && e.use(ss), Ft.install && e.use(Ft), Wt.install && e.use(Wt), us.install && e.use(us), cs.install && e.use(cs), ht.install && e.use(ht), ds.install && e.use(ds), pl.install && e.use(pl), fs.install && e.use(fs), jt.install && e.use(jt), vt.install && e.use(vt), Yt.install && e.use(Yt), ua.install && e.use(ua), ps.install && e.use(ps), vs.install && e.use(vs), ms.install && e.use(ms), hs.install && e.use(hs), Mo.install && e.use(Mo), gs.install && e.use(gs), bs.install && e.use(bs), ca.install && e.use(ca), ys.install && e.use(ys), ws.install && e.use(ws), ks.install && e.use(ks), tn.install && e.use(tn), $s.install && e.use($s), Cs.install && e.use(Cs), Ss.install && e.use(Ss), Ps.install && e.use(Ps), zs.install && e.use(zs), Ts.install && e.use(Ts), Es.install && e.use(Es), Bs.install && e.use(Bs), yt.install && e.use(yt), Is.install && e.use(Is), qt.install && e.use(qt), Xt.install && e.use(Xt), Ds.install && e.use(Ds), As.install && e.use(As), Ms.install && e.use(Ms), Ns.install && e.use(Ns), Vs.install && e.use(Vs), Rs.install && e.use(Rs), Ls.install && e.use(Ls), Fs.install && e.use(Fs), sa.install && e.use(sa), Us.install && e.use(Us), Hs.install && e.use(Hs);
|
|
24981
24981
|
}
|
package/lib/varlet.cjs.js
CHANGED
|
@@ -7348,10 +7348,8 @@ const __sfc__$1k = vue.defineComponent({
|
|
|
7348
7348
|
if (!isFocusing.value && !((_a = checkbox.value) == null ? void 0 : _a.isFocusing)) {
|
|
7349
7349
|
return;
|
|
7350
7350
|
}
|
|
7351
|
-
if (event.key === "ArrowRight") {
|
|
7352
|
-
|
|
7353
|
-
}
|
|
7354
|
-
if (event.key === "ArrowLeft") {
|
|
7351
|
+
if (event.key === "ArrowRight" || event.key === "ArrowLeft") {
|
|
7352
|
+
preventDefault(event);
|
|
7355
7353
|
call(props2.onKeyArrowX, event.key);
|
|
7356
7354
|
}
|
|
7357
7355
|
if (!isFocusing.value) {
|
|
@@ -31480,7 +31478,7 @@ withInstall(stdin_default$1);
|
|
|
31480
31478
|
withPropsDefaultsSetter(stdin_default$1, props);
|
|
31481
31479
|
const _WatermarkComponent = stdin_default$1;
|
|
31482
31480
|
var stdin_default = stdin_default$1;
|
|
31483
|
-
const version = "3.8.
|
|
31481
|
+
const version = "3.8.1";
|
|
31484
31482
|
function install(app) {
|
|
31485
31483
|
stdin_default$5X.install && app.use(stdin_default$5X);
|
|
31486
31484
|
stdin_default$5V.install && app.use(stdin_default$5V);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varlet/ui",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.1",
|
|
4
4
|
"description": "A material like components library",
|
|
5
5
|
"main": "lib/varlet.cjs.js",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
"@popperjs/core": "^2.11.6",
|
|
49
49
|
"dayjs": "^1.10.4",
|
|
50
50
|
"decimal.js": "^10.2.1",
|
|
51
|
-
"@varlet/icons": "3.8.
|
|
52
|
-
"@varlet/
|
|
53
|
-
"@varlet/
|
|
51
|
+
"@varlet/icons": "3.8.1",
|
|
52
|
+
"@varlet/use": "3.8.1",
|
|
53
|
+
"@varlet/shared": "3.8.1"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@types/node": "^18.7.18",
|
|
@@ -66,9 +66,9 @@
|
|
|
66
66
|
"vue": "3.4.21",
|
|
67
67
|
"vue-router": "4.2.0",
|
|
68
68
|
"zod": "^3.23.8",
|
|
69
|
-
"@varlet/
|
|
70
|
-
"@varlet/
|
|
71
|
-
"@varlet/
|
|
69
|
+
"@varlet/touch-emulator": "3.8.1",
|
|
70
|
+
"@varlet/ui": "3.8.1",
|
|
71
|
+
"@varlet/cli": "3.8.1"
|
|
72
72
|
},
|
|
73
73
|
"scripts": {
|
|
74
74
|
"dev": "varlet-cli dev",
|