@gnome-ui/react 1.22.0 → 1.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +19 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2304,7 +2304,25 @@ function er({ sidebar: e, content: r, showSidebar: i = !1, onClose: a, sidebarPo
|
|
|
2304
2304
|
!h || !i || (g.current?.querySelector("button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])"))?.focus();
|
|
2305
2305
|
}, [h, i]);
|
|
2306
2306
|
let v = o === "end";
|
|
2307
|
-
return
|
|
2307
|
+
return l(() => {
|
|
2308
|
+
if (!h || !i) return;
|
|
2309
|
+
let e = g.current;
|
|
2310
|
+
if (!e) return;
|
|
2311
|
+
let t = 0, n = (e) => {
|
|
2312
|
+
t = e.touches[0].clientX;
|
|
2313
|
+
}, r = (e) => {
|
|
2314
|
+
let n = e.changedTouches[0].clientX - t;
|
|
2315
|
+
(v ? n > 80 : n < -80) && a?.();
|
|
2316
|
+
};
|
|
2317
|
+
return e.addEventListener("touchstart", n, { passive: !0 }), e.addEventListener("touchend", r, { passive: !0 }), () => {
|
|
2318
|
+
e.removeEventListener("touchstart", n), e.removeEventListener("touchend", r);
|
|
2319
|
+
};
|
|
2320
|
+
}, [
|
|
2321
|
+
h,
|
|
2322
|
+
i,
|
|
2323
|
+
v,
|
|
2324
|
+
a
|
|
2325
|
+
]), /* @__PURE__ */ n("div", {
|
|
2308
2326
|
className: [
|
|
2309
2327
|
K.root,
|
|
2310
2328
|
h ? K.narrow : K.wide,
|