kelt-ui-kit-react 1.9.8 → 1.9.9
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.js +54 -54
- package/package.json +1 -1
- package/src/sidebar/Sidebar.tsx +8 -4
package/dist/index.js
CHANGED
|
@@ -83,7 +83,7 @@ function Xo() {
|
|
|
83
83
|
var K = w.displayName || w.name || "";
|
|
84
84
|
return K !== "" ? E + "(" + K + ")" : E;
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function H(u) {
|
|
87
87
|
return u.displayName || "Context";
|
|
88
88
|
}
|
|
89
89
|
function F(u) {
|
|
@@ -111,10 +111,10 @@ function Xo() {
|
|
|
111
111
|
switch (u.$$typeof) {
|
|
112
112
|
case c:
|
|
113
113
|
var w = u;
|
|
114
|
-
return
|
|
114
|
+
return H(w) + ".Consumer";
|
|
115
115
|
case s:
|
|
116
116
|
var E = u;
|
|
117
|
-
return
|
|
117
|
+
return H(E._context) + ".Provider";
|
|
118
118
|
case l:
|
|
119
119
|
return U(u, u.render, "ForwardRef");
|
|
120
120
|
case f:
|
|
@@ -262,18 +262,18 @@ function Xo() {
|
|
|
262
262
|
if (Ce && $ && typeof Ce.stack == "string") {
|
|
263
263
|
for (var A = Ce.stack.split(`
|
|
264
264
|
`), te = $.stack.split(`
|
|
265
|
-
`),
|
|
265
|
+
`), G = A.length - 1, ie = te.length - 1; G >= 1 && ie >= 0 && A[G] !== te[ie]; )
|
|
266
266
|
ie--;
|
|
267
|
-
for (;
|
|
268
|
-
if (A[
|
|
269
|
-
if (
|
|
267
|
+
for (; G >= 1 && ie >= 0; G--, ie--)
|
|
268
|
+
if (A[G] !== te[ie]) {
|
|
269
|
+
if (G !== 1 || ie !== 1)
|
|
270
270
|
do
|
|
271
|
-
if (
|
|
271
|
+
if (G--, ie--, ie < 0 || A[G] !== te[ie]) {
|
|
272
272
|
var Ee = `
|
|
273
|
-
` + A[
|
|
273
|
+
` + A[G].replace(" at new ", " at ");
|
|
274
274
|
return u.displayName && Ee.includes("<anonymous>") && (Ee = Ee.replace("<anonymous>", u.displayName)), typeof u == "function" && I.set(u, Ee), Ee;
|
|
275
275
|
}
|
|
276
|
-
while (
|
|
276
|
+
while (G >= 1 && ie >= 0);
|
|
277
277
|
break;
|
|
278
278
|
}
|
|
279
279
|
}
|
|
@@ -339,8 +339,8 @@ function Xo() {
|
|
|
339
339
|
throw te.name = "Invariant Violation", te;
|
|
340
340
|
}
|
|
341
341
|
A = u[R](w, R, $, E, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
342
|
-
} catch (
|
|
343
|
-
A =
|
|
342
|
+
} catch (G) {
|
|
343
|
+
A = G;
|
|
344
344
|
}
|
|
345
345
|
A && !(A instanceof Error) && (be(K), S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", $ || "React class", E, R, typeof A), be(null)), A instanceof Error && !(A.message in je) && (je[A.message] = !0, be(K), S("Failed %s type: %s", E, A.message), be(null));
|
|
346
346
|
}
|
|
@@ -453,9 +453,9 @@ function Xo() {
|
|
|
453
453
|
for (k in w)
|
|
454
454
|
X.call(w, k) && !Vr.hasOwnProperty(k) && (R[k] = w[k]);
|
|
455
455
|
if (u && u.defaultProps) {
|
|
456
|
-
var
|
|
457
|
-
for (k in
|
|
458
|
-
R[k] === void 0 && (R[k] =
|
|
456
|
+
var G = u.defaultProps;
|
|
457
|
+
for (k in G)
|
|
458
|
+
R[k] === void 0 && (R[k] = G[k]);
|
|
459
459
|
}
|
|
460
460
|
if (A || te) {
|
|
461
461
|
var ie = typeof u == "function" ? u.displayName || u.name || "Unknown" : u;
|
|
@@ -583,8 +583,8 @@ Check the top-level render call using <` + E + ">.");
|
|
|
583
583
|
(u === void 0 || typeof u == "object" && u !== null && Object.keys(u).length === 0) && (A += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
584
584
|
var te = De();
|
|
585
585
|
te ? A += te : A += xe();
|
|
586
|
-
var
|
|
587
|
-
u === null ?
|
|
586
|
+
var G;
|
|
587
|
+
u === null ? G = "null" : kt(u) ? G = "array" : u !== void 0 && u.$$typeof === t ? (G = "<" + (F(u.type) || "Unknown") + " />", A = " Did you accidentally export a JSX literal instead of a component?") : G = typeof u, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", G, A);
|
|
588
588
|
}
|
|
589
589
|
var ie = rr(u, w, E, K, k);
|
|
590
590
|
if (ie == null)
|
|
@@ -1970,7 +1970,7 @@ function ps(e, t, r) {
|
|
|
1970
1970
|
var b = new vs(r, p, n ? a.componentStyle : void 0);
|
|
1971
1971
|
function S(N, x) {
|
|
1972
1972
|
return function(O, P, z) {
|
|
1973
|
-
var j = O.attrs, _ = O.componentStyle, U = O.defaultProps,
|
|
1973
|
+
var j = O.attrs, _ = O.componentStyle, U = O.defaultProps, H = O.foldedComponentIds, F = O.styledComponentId, re = O.target, Se = Fe.useContext(lo), le = da(), ue = O.shouldForwardProp || le.shouldForwardProp;
|
|
1974
1974
|
process.env.NODE_ENV !== "production" && Gn(F);
|
|
1975
1975
|
var _e = Ai(P, Se, U) || wt, Q = function(Re, fe, ye) {
|
|
1976
1976
|
for (var pe, D = ke(ke({}, fe), { className: void 0, theme: ye }), I = 0; I < Re.length; I += 1) {
|
|
@@ -1985,7 +1985,7 @@ function ps(e, t, r) {
|
|
|
1985
1985
|
return process.env.NODE_ENV !== "production" && Gn(pe), pe;
|
|
1986
1986
|
}(_, Q);
|
|
1987
1987
|
process.env.NODE_ENV !== "production" && O.warnTooManyClasses && O.warnTooManyClasses(Oe);
|
|
1988
|
-
var Ne = rt(
|
|
1988
|
+
var Ne = rt(H, F);
|
|
1989
1989
|
return Oe && (Ne += " " + Oe), Q.className && (Ne += " " + Q.className), ve[Gr(ee) && !an.has(ee) ? "class" : "className"] = Ne, z && (ve.ref = z), Bo(ee, ve);
|
|
1990
1990
|
}(C, N, x);
|
|
1991
1991
|
}
|
|
@@ -2921,7 +2921,7 @@ function Bl(e) {
|
|
|
2921
2921
|
onRowClassName: P,
|
|
2922
2922
|
rowStyle: z,
|
|
2923
2923
|
rowClassName: j
|
|
2924
|
-
} = e, _ = se(null), U = se(null),
|
|
2924
|
+
} = e, _ = se(null), U = se(null), H = se(!1), [F, re] = W(!1), [Se, le] = W(0), [ue, _e] = W(
|
|
2925
2925
|
/* @__PURE__ */ new Set()
|
|
2926
2926
|
), Q = T((D) => {
|
|
2927
2927
|
D && (D.scrollIntoView({ block: "nearest", inline: "nearest" }), requestAnimationFrame(() => {
|
|
@@ -3045,10 +3045,10 @@ function Bl(e) {
|
|
|
3045
3045
|
);
|
|
3046
3046
|
return Z(() => {
|
|
3047
3047
|
if (f || !S || s.length === 0) {
|
|
3048
|
-
|
|
3048
|
+
H.current = !1;
|
|
3049
3049
|
return;
|
|
3050
3050
|
}
|
|
3051
|
-
if (
|
|
3051
|
+
if (H.current)
|
|
3052
3052
|
return;
|
|
3053
3053
|
const D = h.findIndex(
|
|
3054
3054
|
(de) => de.editable && de.enterToNextColumn && de.type !== "select" && de.type !== "image"
|
|
@@ -3063,7 +3063,7 @@ function Bl(e) {
|
|
|
3063
3063
|
const M = V.querySelector(
|
|
3064
3064
|
'input:not([disabled]), textarea:not([disabled]), [contenteditable="true"]'
|
|
3065
3065
|
);
|
|
3066
|
-
M && (
|
|
3066
|
+
M && (H.current = !0, Q(M));
|
|
3067
3067
|
}, [
|
|
3068
3068
|
S,
|
|
3069
3069
|
h,
|
|
@@ -3819,7 +3819,7 @@ function Po(e, t) {
|
|
|
3819
3819
|
}
|
|
3820
3820
|
var Me = "react-calendar__navigation";
|
|
3821
3821
|
function Dc(e) {
|
|
3822
|
-
var t = e.activeStartDate, r = e.drillUp, n = e.formatMonthYear, a = n === void 0 ? Eo : n, i = e.formatYear, s = i === void 0 ? Mr : i, c = e.locale, l = e.maxDate, d = e.minDate, h = e.navigationAriaLabel, f = h === void 0 ? "" : h, p = e.navigationAriaLive, v = e.navigationLabel, g = e.next2AriaLabel, m = g === void 0 ? "" : g, y = e.next2Label, b = y === void 0 ? "»" : y, S = e.nextAriaLabel, C = S === void 0 ? "" : S, N = e.nextLabel, x = N === void 0 ? "›" : N, O = e.prev2AriaLabel, P = O === void 0 ? "" : O, z = e.prev2Label, j = z === void 0 ? "«" : z, _ = e.prevAriaLabel, U = _ === void 0 ? "" : _,
|
|
3822
|
+
var t = e.activeStartDate, r = e.drillUp, n = e.formatMonthYear, a = n === void 0 ? Eo : n, i = e.formatYear, s = i === void 0 ? Mr : i, c = e.locale, l = e.maxDate, d = e.minDate, h = e.navigationAriaLabel, f = h === void 0 ? "" : h, p = e.navigationAriaLive, v = e.navigationLabel, g = e.next2AriaLabel, m = g === void 0 ? "" : g, y = e.next2Label, b = y === void 0 ? "»" : y, S = e.nextAriaLabel, C = S === void 0 ? "" : S, N = e.nextLabel, x = N === void 0 ? "›" : N, O = e.prev2AriaLabel, P = O === void 0 ? "" : O, z = e.prev2Label, j = z === void 0 ? "«" : z, _ = e.prevAriaLabel, U = _ === void 0 ? "" : _, H = e.prevLabel, F = H === void 0 ? "‹" : H, re = e.setActiveStartDate, Se = e.showDoubleView, le = e.view, ue = e.views, _e = ue.indexOf(le) > 0, Q = le !== "century", ee = mc(le, t), ve = Q ? gc(le, t) : void 0, oe = Co(le, t), Oe = Q ? yc(le, t) : void 0, Ne = function() {
|
|
3823
3823
|
if (ee.getFullYear() < 0)
|
|
3824
3824
|
return !0;
|
|
3825
3825
|
var Y = bc(le, t);
|
|
@@ -4424,7 +4424,7 @@ function fr(e, t) {
|
|
|
4424
4424
|
return e instanceof Date && t instanceof Date && e.getTime() === t.getTime();
|
|
4425
4425
|
}
|
|
4426
4426
|
var al = Xe(function(t, r) {
|
|
4427
|
-
var n = t.activeStartDate, a = t.allowPartialRange, i = t.calendarType, s = t.className, c = t.defaultActiveStartDate, l = t.defaultValue, d = t.defaultView, h = t.formatDay, f = t.formatLongDate, p = t.formatMonth, v = t.formatMonthYear, g = t.formatShortWeekday, m = t.formatWeekday, y = t.formatYear, b = t.goToRangeStartOnSelect, S = b === void 0 ? !0 : b, C = t.inputRef, N = t.locale, x = t.maxDate, O = x === void 0 ? Zc : x, P = t.maxDetail, z = P === void 0 ? "month" : P, j = t.minDate, _ = j === void 0 ? Un : j, U = t.minDetail,
|
|
4427
|
+
var n = t.activeStartDate, a = t.allowPartialRange, i = t.calendarType, s = t.className, c = t.defaultActiveStartDate, l = t.defaultValue, d = t.defaultView, h = t.formatDay, f = t.formatLongDate, p = t.formatMonth, v = t.formatMonthYear, g = t.formatShortWeekday, m = t.formatWeekday, y = t.formatYear, b = t.goToRangeStartOnSelect, S = b === void 0 ? !0 : b, C = t.inputRef, N = t.locale, x = t.maxDate, O = x === void 0 ? Zc : x, P = t.maxDetail, z = P === void 0 ? "month" : P, j = t.minDate, _ = j === void 0 ? Un : j, U = t.minDetail, H = U === void 0 ? "century" : U, F = t.navigationAriaLabel, re = t.navigationAriaLive, Se = t.navigationLabel, le = t.next2AriaLabel, ue = t.next2Label, _e = t.nextAriaLabel, Q = t.nextLabel, ee = t.onActiveStartDateChange, ve = t.onChange, oe = t.onClickDay, Oe = t.onClickDecade, Ne = t.onClickMonth, Re = t.onClickWeekNumber, fe = t.onClickYear, ye = t.onDrillDown, pe = t.onDrillUp, D = t.onViewChange, I = t.prev2AriaLabel, V = t.prev2Label, M = t.prevAriaLabel, de = t.prevLabel, Y = t.returnValue, q = Y === void 0 ? "start" : Y, X = t.selectRange, je = t.showDoubleView, me = t.showFixedNumberOfWeeks, be = t.showNavigation, $e = be === void 0 ? !0 : be, lt = t.showNeighboringCentury, kt = t.showNeighboringDecade, Xt = t.showNeighboringMonth, Fr = Xt === void 0 ? !0 : Xt, Kt = t.showWeekNumbers, Jt = t.tileClassName, Qt = t.tileContent, Vr = t.tileDisabled, ut = t.value, _t = t.view, Zt = W(c), Yr = Zt[0], dt = Zt[1], er = W(null), Br = er[0], tr = er[1], rr = W(Array.isArray(l) ? l.map(function(k) {
|
|
4428
4428
|
return k !== null ? Vt(k) : null;
|
|
4429
4429
|
}) : l != null ? Vt(l) : null), Qe = rr[0], nr = rr[1], Ve = W(d), Tt = Ve[0], ft = Ve[1], xe = n || Yr || nl({
|
|
4430
4430
|
activeStartDate: n,
|
|
@@ -4434,7 +4434,7 @@ var al = Xe(function(t, r) {
|
|
|
4434
4434
|
maxDate: O,
|
|
4435
4435
|
maxDetail: z,
|
|
4436
4436
|
minDate: _,
|
|
4437
|
-
minDetail:
|
|
4437
|
+
minDetail: H,
|
|
4438
4438
|
value: ut,
|
|
4439
4439
|
view: _t
|
|
4440
4440
|
}), De = function() {
|
|
@@ -4444,7 +4444,7 @@ var al = Xe(function(t, r) {
|
|
|
4444
4444
|
return k ? Array.isArray(k) ? k.map(function(R) {
|
|
4445
4445
|
return R !== null ? Vt(R) : null;
|
|
4446
4446
|
}) : k !== null ? Vt(k) : null : null;
|
|
4447
|
-
}(), Ze = $o(z), ne = zn(_t || Tt,
|
|
4447
|
+
}(), Ze = $o(z), ne = zn(_t || Tt, H, z), Te = Io(H, z), ar = X ? Br : null, Pt = Te.indexOf(ne) < Te.length - 1, or = Te.indexOf(ne) > 0, Rt = T(function(k) {
|
|
4448
4448
|
var R = function() {
|
|
4449
4449
|
switch (q) {
|
|
4450
4450
|
case "start":
|
|
@@ -4540,19 +4540,19 @@ var al = Xe(function(t, r) {
|
|
|
4540
4540
|
]), $t = T(function(k, R) {
|
|
4541
4541
|
var A = De;
|
|
4542
4542
|
vt(k, R);
|
|
4543
|
-
var te = X && !Zr(A),
|
|
4543
|
+
var te = X && !Zr(A), G;
|
|
4544
4544
|
if (X)
|
|
4545
4545
|
if (te)
|
|
4546
|
-
|
|
4546
|
+
G = ot(Ze, k);
|
|
4547
4547
|
else {
|
|
4548
4548
|
if (!A)
|
|
4549
4549
|
throw new Error("previousValue is required");
|
|
4550
4550
|
if (Array.isArray(A))
|
|
4551
4551
|
throw new Error("previousValue must not be an array");
|
|
4552
|
-
|
|
4552
|
+
G = wc(Ze, A, k);
|
|
4553
4553
|
}
|
|
4554
4554
|
else
|
|
4555
|
-
|
|
4555
|
+
G = Rt(k);
|
|
4556
4556
|
var ie = (
|
|
4557
4557
|
// Range selection turned off
|
|
4558
4558
|
!X || // Range selection turned on, first value
|
|
@@ -4561,30 +4561,30 @@ var al = Xe(function(t, r) {
|
|
|
4561
4561
|
maxDate: O,
|
|
4562
4562
|
maxDetail: z,
|
|
4563
4563
|
minDate: _,
|
|
4564
|
-
minDetail:
|
|
4565
|
-
value:
|
|
4564
|
+
minDetail: H,
|
|
4565
|
+
value: G,
|
|
4566
4566
|
view: ne
|
|
4567
4567
|
}) : null
|
|
4568
4568
|
);
|
|
4569
|
-
R.persist(), dt(ie), nr(
|
|
4569
|
+
R.persist(), dt(ie), nr(G);
|
|
4570
4570
|
var Ee = {
|
|
4571
4571
|
action: "onChange",
|
|
4572
4572
|
activeStartDate: ie,
|
|
4573
|
-
value:
|
|
4573
|
+
value: G,
|
|
4574
4574
|
view: ne
|
|
4575
4575
|
};
|
|
4576
4576
|
if (ee && !fr(xe, ie) && ee(Ee), ve)
|
|
4577
4577
|
if (X) {
|
|
4578
|
-
var ze = Zr(
|
|
4578
|
+
var ze = Zr(G);
|
|
4579
4579
|
if (!ze)
|
|
4580
|
-
ve(
|
|
4580
|
+
ve(G || null, R);
|
|
4581
4581
|
else if (a) {
|
|
4582
|
-
if (Array.isArray(
|
|
4582
|
+
if (Array.isArray(G))
|
|
4583
4583
|
throw new Error("value must not be an array");
|
|
4584
|
-
ve([
|
|
4584
|
+
ve([G || null, null], R);
|
|
4585
4585
|
}
|
|
4586
4586
|
} else
|
|
4587
|
-
ve(
|
|
4587
|
+
ve(G || null, R);
|
|
4588
4588
|
}, [
|
|
4589
4589
|
xe,
|
|
4590
4590
|
a,
|
|
@@ -4593,7 +4593,7 @@ var al = Xe(function(t, r) {
|
|
|
4593
4593
|
O,
|
|
4594
4594
|
z,
|
|
4595
4595
|
_,
|
|
4596
|
-
|
|
4596
|
+
H,
|
|
4597
4597
|
ee,
|
|
4598
4598
|
ve,
|
|
4599
4599
|
vt,
|
|
@@ -4931,7 +4931,7 @@ const Ul = ({
|
|
|
4931
4931
|
}), j;
|
|
4932
4932
|
}), m = se({}), y = T(
|
|
4933
4933
|
(j, _) => {
|
|
4934
|
-
const { name: U, type:
|
|
4934
|
+
const { name: U, type: H, checked: F, value: re } = j.target, Se = H === "checkbox" ? F : re;
|
|
4935
4935
|
_.onChange && _.onChange(Se, U), g((le) => {
|
|
4936
4936
|
const ue = { ...le, [U]: Se };
|
|
4937
4937
|
return s && s(ue), ue;
|
|
@@ -4940,16 +4940,16 @@ const Ul = ({
|
|
|
4940
4940
|
[s]
|
|
4941
4941
|
), b = T(
|
|
4942
4942
|
(j, _, U) => {
|
|
4943
|
-
U.onChange && U.onChange(_, j), g((
|
|
4944
|
-
const F = { ...
|
|
4943
|
+
U.onChange && U.onChange(_, j), g((H) => {
|
|
4944
|
+
const F = { ...H, [j]: _ };
|
|
4945
4945
|
return s && s(F), F;
|
|
4946
4946
|
});
|
|
4947
4947
|
},
|
|
4948
4948
|
[s]
|
|
4949
4949
|
), S = T(
|
|
4950
4950
|
(j, _, U) => {
|
|
4951
|
-
U.onChange && U.onChange(j, _), g((
|
|
4952
|
-
const F = { ...
|
|
4951
|
+
U.onChange && U.onChange(j, _), g((H) => {
|
|
4952
|
+
const F = { ...H, [_]: j };
|
|
4953
4953
|
return s && s(F), F;
|
|
4954
4954
|
});
|
|
4955
4955
|
},
|
|
@@ -4999,7 +4999,7 @@ const Ul = ({
|
|
|
4999
4999
|
children: [
|
|
5000
5000
|
/* @__PURE__ */ o.jsxs("div", { className: "form-content", children: [
|
|
5001
5001
|
e.map((j, _) => {
|
|
5002
|
-
const U = j.onRequired ? j.onRequired(j.value) : j.required ?? !1,
|
|
5002
|
+
const U = j.onRequired ? j.onRequired(j.value) : j.required ?? !1, H = j.onDisabled ? j.onDisabled(j.value) : j.disabled ?? !1;
|
|
5003
5003
|
return /* @__PURE__ */ o.jsxs(
|
|
5004
5004
|
"div",
|
|
5005
5005
|
{
|
|
@@ -5014,7 +5014,7 @@ const Ul = ({
|
|
|
5014
5014
|
label: void 0,
|
|
5015
5015
|
name: j.name,
|
|
5016
5016
|
options: j.options ?? [],
|
|
5017
|
-
disabled:
|
|
5017
|
+
disabled: H,
|
|
5018
5018
|
multiple: j.multiple,
|
|
5019
5019
|
value: v[j.name],
|
|
5020
5020
|
required: U,
|
|
@@ -5030,7 +5030,7 @@ const Ul = ({
|
|
|
5030
5030
|
name: j.name,
|
|
5031
5031
|
className: "textarea-input",
|
|
5032
5032
|
placeholder: j.placeholder ?? "",
|
|
5033
|
-
disabled:
|
|
5033
|
+
disabled: H,
|
|
5034
5034
|
required: U,
|
|
5035
5035
|
value: v[j.name],
|
|
5036
5036
|
onChange: (F, re) => b(re, F, j)
|
|
@@ -5045,7 +5045,7 @@ const Ul = ({
|
|
|
5045
5045
|
placeholder: j.placeholder ?? "",
|
|
5046
5046
|
autoComplete: j.autoComplete,
|
|
5047
5047
|
tabIndex: 0,
|
|
5048
|
-
disabled:
|
|
5048
|
+
disabled: H,
|
|
5049
5049
|
autoFocus: j.focus ?? !1,
|
|
5050
5050
|
required: U,
|
|
5051
5051
|
step: j.step ?? "0.01",
|
|
@@ -5517,13 +5517,13 @@ const Gl = Xe(
|
|
|
5517
5517
|
}, []), P = T(
|
|
5518
5518
|
(_) => {
|
|
5519
5519
|
if (!d) return;
|
|
5520
|
-
const U = _.touches[0],
|
|
5520
|
+
const U = _.touches[0], H = U.clientX - b.current, F = U.clientY - S.current;
|
|
5521
5521
|
if (!C.current) {
|
|
5522
|
-
if (Math.abs(
|
|
5522
|
+
if (Math.abs(H) < Pa && Math.abs(F) < Pa)
|
|
5523
5523
|
return;
|
|
5524
|
-
C.current = Math.abs(
|
|
5524
|
+
C.current = Math.abs(H) > Math.abs(F) ? "x" : "y";
|
|
5525
5525
|
}
|
|
5526
|
-
C.current === "x" && (_.preventDefault(), g(!0), p(Math.max(0,
|
|
5526
|
+
C.current === "x" && (H < 20 || (_.preventDefault(), g(!0), p(Math.max(0, H))));
|
|
5527
5527
|
},
|
|
5528
5528
|
[d]
|
|
5529
5529
|
), z = T(
|
package/package.json
CHANGED
package/src/sidebar/Sidebar.tsx
CHANGED
|
@@ -108,14 +108,18 @@ export const Sidebar = ({
|
|
|
108
108
|
axisLocked.current = Math.abs(deltaX) > Math.abs(deltaY) ? "x" : "y";
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
if (axisLocked.current !== "x")
|
|
111
|
+
if (axisLocked.current !== "x") {
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// Ignore les petits mouvements horizontaux
|
|
116
|
+
if (deltaX < 20) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
112
119
|
|
|
113
|
-
// On gère le swipe horizontal nous-mêmes : on empêche le scroll natif
|
|
114
|
-
// et on bloque le bounce/scroll de la page pendant le drag
|
|
115
120
|
event.preventDefault();
|
|
116
121
|
|
|
117
122
|
setIsDragging(true);
|
|
118
|
-
// On ne permet que le swipe vers la droite (fermeture), pas de drag négatif
|
|
119
123
|
setDragX(Math.max(0, deltaX));
|
|
120
124
|
},
|
|
121
125
|
[isOpen],
|