@luciodale/swipe-bar 1.0.4 → 1.0.5

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ToggleIcon.d.ts","sourceRoot":"","sources":["../../src/components/ToggleIcon.tsx"],"names":[],"mappings":"AAGA,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,2CAqD1E"}
1
+ {"version":3,"file":"ToggleIcon.d.ts","sourceRoot":"","sources":["../../src/components/ToggleIcon.tsx"],"names":[],"mappings":"AAOA,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,2CAyD1E"}
@@ -1,4 +1,4 @@
1
- import ye, { createContext as Te, useState as W, useRef as L, useCallback as Q, useContext as _e, useMemo as Oe, useEffect as G } from "react";
1
+ import Te, { createContext as _e, useState as W, useRef as L, useCallback as Q, useContext as Oe, useMemo as Ae, useEffect as G } from "react";
2
2
  var ne = { exports: {} }, F = {};
3
3
  /**
4
4
  * @license React
@@ -10,7 +10,7 @@ var ne = { exports: {} }, F = {};
10
10
  * LICENSE file in the root directory of this source tree.
11
11
  */
12
12
  var ae;
13
- function Ae() {
13
+ function Ie() {
14
14
  if (ae) return F;
15
15
  ae = 1;
16
16
  var e = Symbol.for("react.transitional.element"), n = Symbol.for("react.fragment");
@@ -42,7 +42,7 @@ var B = {};
42
42
  * LICENSE file in the root directory of this source tree.
43
43
  */
44
44
  var se;
45
- function Ie() {
45
+ function Pe() {
46
46
  return se || (se = 1, process.env.NODE_ENV !== "production" && function() {
47
47
  function e(t) {
48
48
  if (t == null) return null;
@@ -119,14 +119,14 @@ function Ie() {
119
119
  }
120
120
  }
121
121
  function a() {
122
- var t = D.A;
122
+ var t = C.A;
123
123
  return t === null ? null : t.getOwner();
124
124
  }
125
125
  function i() {
126
126
  return Error("react-stack-top-frame");
127
127
  }
128
128
  function c(t) {
129
- if (C.call(t, "key")) {
129
+ if (D.call(t, "key")) {
130
130
  var d = Object.getOwnPropertyDescriptor(t, "key").get;
131
131
  if (d && d.isReactWarning) return !1;
132
132
  }
@@ -134,7 +134,7 @@ function Ie() {
134
134
  }
135
135
  function s(t, d) {
136
136
  function m() {
137
- Z || (Z = !0, console.error(
137
+ U || (U = !0, console.error(
138
138
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
139
139
  d
140
140
  ));
@@ -146,7 +146,7 @@ function Ie() {
146
146
  }
147
147
  function p() {
148
148
  var t = e(this.type);
149
- return U[t] || (U[t] = !0, console.error(
149
+ return Z[t] || (Z[t] = !0, console.error(
150
150
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
151
151
  )), t = this.props.ref, t !== void 0 ? t : null;
152
152
  }
@@ -196,10 +196,10 @@ function Ie() {
196
196
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
197
197
  );
198
198
  else b(S);
199
- if (C.call(d, "key")) {
199
+ if (D.call(d, "key")) {
200
200
  S = e(t);
201
- var Y = Object.keys(d).filter(function(xe) {
202
- return xe !== "key";
201
+ var Y = Object.keys(d).filter(function(ye) {
202
+ return ye !== "key";
203
203
  });
204
204
  R = 0 < Y.length ? "{key: someKey, " + Y.join(": ..., ") + ": ...}" : "{key: someKey}", w[S + R] || (Y = 0 < Y.length ? "{" + Y.join(": ..., ") + ": ...}" : "{}", console.error(
205
205
  `A props object containing a "key" prop is being spread into JSX:
@@ -237,7 +237,7 @@ React keys must be passed directly to JSX without using spread:
237
237
  function h(t) {
238
238
  return typeof t == "object" && t !== null && t.$$typeof === O;
239
239
  }
240
- var f = ye, O = Symbol.for("react.transitional.element"), M = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), T = Symbol.for("react.strict_mode"), P = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), _ = Symbol.for("react.context"), X = Symbol.for("react.forward_ref"), x = Symbol.for("react.suspense"), l = Symbol.for("react.suspense_list"), g = Symbol.for("react.memo"), I = Symbol.for("react.lazy"), j = Symbol.for("react.activity"), N = Symbol.for("react.client.reference"), D = f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, C = Object.prototype.hasOwnProperty, ee = Array.isArray, $ = console.createTask ? console.createTask : function() {
240
+ var f = Te, O = Symbol.for("react.transitional.element"), M = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), T = Symbol.for("react.strict_mode"), P = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), _ = Symbol.for("react.context"), X = Symbol.for("react.forward_ref"), x = Symbol.for("react.suspense"), l = Symbol.for("react.suspense_list"), g = Symbol.for("react.memo"), I = Symbol.for("react.lazy"), j = Symbol.for("react.activity"), N = Symbol.for("react.client.reference"), C = f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, D = Object.prototype.hasOwnProperty, ee = Array.isArray, $ = console.createTask ? console.createTask : function() {
241
241
  return null;
242
242
  };
243
243
  f = {
@@ -245,12 +245,12 @@ React keys must be passed directly to JSX without using spread:
245
245
  return t();
246
246
  }
247
247
  };
248
- var Z, U = {}, z = f.react_stack_bottom_frame.bind(
248
+ var U, Z = {}, z = f.react_stack_bottom_frame.bind(
249
249
  f,
250
250
  i
251
251
  )(), V = $(o(i)), w = {};
252
252
  B.Fragment = y, B.jsx = function(t, d, m) {
253
- var R = 1e4 > D.recentlyCreatedOwnerStacks++;
253
+ var R = 1e4 > C.recentlyCreatedOwnerStacks++;
254
254
  return E(
255
255
  t,
256
256
  d,
@@ -260,7 +260,7 @@ React keys must be passed directly to JSX without using spread:
260
260
  R ? $(o(t)) : V
261
261
  );
262
262
  }, B.jsxs = function(t, d, m) {
263
- var R = 1e4 > D.recentlyCreatedOwnerStacks++;
263
+ var R = 1e4 > C.recentlyCreatedOwnerStacks++;
264
264
  return E(
265
265
  t,
266
266
  d,
@@ -272,9 +272,9 @@ React keys must be passed directly to JSX without using spread:
272
272
  };
273
273
  }()), B;
274
274
  }
275
- process.env.NODE_ENV === "production" ? ne.exports = Ae() : ne.exports = Ie();
275
+ process.env.NODE_ENV === "production" ? ne.exports = Ie() : ne.exports = Pe();
276
276
  var v = ne.exports;
277
- const fe = Te(null), rt = ({
277
+ const ge = _e(null), it = ({
278
278
  children: e,
279
279
  sidebarWidthPx: n,
280
280
  transitionMs: r,
@@ -292,31 +292,31 @@ const fe = Te(null), rt = ({
292
292
  toggleZIndex: O,
293
293
  overlayZIndex: M
294
294
  }) => {
295
- const [y, T] = W(null), [P, A] = W(!1), [_, X] = W(!1), [x, l] = W({}), [g, I] = W({}), j = L(null), N = L(null), D = L(null), C = L(null), [ee, $] = W({
296
- sidebarWidthPx: n ?? Xe,
297
- transitionMs: r ?? Pe,
298
- edgeActivationWidthPx: o ?? Le,
299
- dragActivationDeltaPx: a ?? Me,
295
+ const [y, T] = W(null), [P, A] = W(!1), [_, X] = W(!1), [x, l] = W({}), [g, I] = W({}), j = L(null), N = L(null), C = L(null), D = L(null), [ee, $] = W({
296
+ sidebarWidthPx: n ?? Ce,
297
+ transitionMs: r ?? Le,
298
+ edgeActivationWidthPx: o ?? Me,
299
+ dragActivationDeltaPx: a ?? Xe,
300
300
  showOverlay: i ?? De,
301
- isAbsolute: c ?? Ce,
302
- overlayBackgroundColor: s ?? ge,
303
- toggleIconColor: p ?? We,
304
- toggleIconSizePx: u ?? ke,
305
- toggleIconEdgeDistancePx: E ?? je,
306
- showToggle: b ?? Ne,
301
+ isAbsolute: c ?? We,
302
+ overlayBackgroundColor: s ?? he,
303
+ toggleIconColor: p ?? ke,
304
+ toggleIconSizePx: u ?? je,
305
+ toggleIconEdgeDistancePx: E ?? Ne,
306
+ showToggle: b ?? Ye,
307
307
  mediaQueryWidth: h ?? ie,
308
- swipeBarZIndex: f ?? Ye,
309
- toggleZIndex: O ?? $e,
310
- overlayZIndex: M ?? Fe
311
- }), Z = Q((w) => {
308
+ swipeBarZIndex: f ?? $e,
309
+ toggleZIndex: O ?? Fe,
310
+ overlayZIndex: M ?? Be
311
+ }), U = Q((w) => {
312
312
  $((t) => ({ ...t, ...w }));
313
- }, []), U = Q(
313
+ }, []), Z = Q(
314
314
  (w) => {
315
- Ve({
315
+ Qe({
316
316
  side: w,
317
317
  ref: w === "left" ? j : N,
318
318
  options: w === "left" ? x : g,
319
- toggleRef: w === "left" ? D : C,
319
+ toggleRef: w === "left" ? C : D,
320
320
  afterApply: () => {
321
321
  w === "left" ? A(!0) : X(!0), T(w);
322
322
  }
@@ -325,10 +325,10 @@ const fe = Te(null), rt = ({
325
325
  [x, g]
326
326
  ), z = Q(
327
327
  (w) => {
328
- qe({
328
+ He({
329
329
  ref: w === "left" ? j : N,
330
330
  options: w === "left" ? x : g,
331
- toggleRef: w === "left" ? D : C,
331
+ toggleRef: w === "left" ? C : D,
332
332
  side: w,
333
333
  afterApply: () => {
334
334
  w === "left" ? A(!1) : X(!1), T(null);
@@ -338,9 +338,9 @@ const fe = Te(null), rt = ({
338
338
  [x, g]
339
339
  ), V = Q(
340
340
  (w, t) => {
341
- Qe({
341
+ Je({
342
342
  ref: w === "left" ? j : N,
343
- toggleRef: w === "left" ? D : C,
343
+ toggleRef: w === "left" ? C : D,
344
344
  options: w === "left" ? x : g,
345
345
  translateX: t
346
346
  });
@@ -348,7 +348,7 @@ const fe = Te(null), rt = ({
348
348
  [x, g]
349
349
  );
350
350
  return /* @__PURE__ */ v.jsx(
351
- fe.Provider,
351
+ ge.Provider,
352
352
  {
353
353
  value: {
354
354
  lockedSidebar: y,
@@ -357,64 +357,64 @@ const fe = Te(null), rt = ({
357
357
  isRightOpen: _,
358
358
  leftSidebarRef: j,
359
359
  rightSidebarRef: N,
360
- openSidebar: U,
360
+ openSidebar: Z,
361
361
  closeSidebar: z,
362
362
  dragSidebar: V,
363
363
  globalOptions: ee,
364
- setGlobalOptions: Z,
364
+ setGlobalOptions: U,
365
365
  leftSidebarOptions: x,
366
366
  rightSidebarOptions: g,
367
367
  setLeftSidebarOptions: l,
368
368
  setRightSidebarOptions: I,
369
- leftToggleRef: D,
370
- rightToggleRef: C
369
+ leftToggleRef: C,
370
+ rightToggleRef: D
371
371
  },
372
372
  children: e
373
373
  }
374
374
  );
375
375
  }, k = () => {
376
- const e = _e(fe);
376
+ const e = Oe(ge);
377
377
  if (!e)
378
378
  throw new Error("useSwipeBarContext must be used within SwipeBarProvider");
379
379
  return e;
380
- }, Pe = 300, Le = 40, Me = 20, Xe = 320, De = !0, Ce = !1, ge = "rgba(0, 0, 0, 0.5)", he = "rgb(36,36,36)", We = "white", ke = 40, je = 40, Ne = !0, ie = 640, Ye = 30, $e = 15, Fe = 20, ve = {
380
+ }, Le = 300, Me = 40, Xe = 20, Ce = 320, De = !0, We = !1, he = "rgba(0, 0, 0, 0.5)", ve = "rgb(36,36,36)", ke = "white", je = 40, Ne = 40, Ye = !0, ie = 640, $e = 30, Fe = 15, Be = 20, ce = 0.6, Ge = 200, pe = {
381
381
  width: 0,
382
382
  top: 0,
383
383
  bottom: 0,
384
384
  flexShrink: 0,
385
385
  overflowX: "hidden",
386
386
  willChange: "transform"
387
- }, Be = {
387
+ }, Ue = {
388
388
  position: "fixed",
389
389
  left: 0,
390
390
  top: 0,
391
391
  bottom: 0
392
- }, Ge = {
392
+ }, Ze = {
393
393
  position: "fixed",
394
394
  right: 0,
395
395
  top: 0,
396
396
  bottom: 0
397
- }, Ze = {
397
+ }, ze = {
398
398
  position: "fixed",
399
399
  top: 0,
400
400
  left: 0,
401
401
  width: "100%",
402
402
  height: "100%",
403
- backgroundColor: ge,
403
+ backgroundColor: he,
404
404
  transitionProperty: "opacity",
405
405
  pointerEvents: "none",
406
406
  opacity: 0
407
- }, Ue = {
407
+ }, Ve = {
408
408
  opacity: 1,
409
409
  pointerEvents: "auto"
410
- }, pe = {
410
+ }, me = {
411
411
  position: "fixed",
412
412
  top: "50%",
413
413
  transform: "translateY(-50%)",
414
414
  width: "1px",
415
415
  display: "flex",
416
416
  justifyContent: "center"
417
- }, ze = {
417
+ }, qe = {
418
418
  position: "relative",
419
419
  cursor: "pointer",
420
420
  display: "flex",
@@ -424,7 +424,7 @@ const fe = Te(null), rt = ({
424
424
  }, oe = (e) => {
425
425
  var n;
426
426
  return (n = e.current) == null ? void 0 : n.firstElementChild;
427
- }, Ve = ({
427
+ }, Qe = ({
428
428
  ref: e,
429
429
  side: n,
430
430
  options: r,
@@ -440,7 +440,7 @@ const fe = Te(null), rt = ({
440
440
  }));
441
441
  }), setTimeout(() => {
442
442
  }, 0);
443
- }, qe = ({
443
+ }, He = ({
444
444
  ref: e,
445
445
  options: n,
446
446
  side: r,
@@ -453,7 +453,7 @@ const fe = Te(null), rt = ({
453
453
  e.current && (e.current.style.transform = r === "left" ? "translateX(-100%)" : "translateX(100%)", e.current.style.width = "0px", o.current && (o.current.style.opacity = "1", o.current.style.transform = "translateY(-50%)"), i.style.opacity = "0", a());
454
454
  }));
455
455
  });
456
- }, Qe = ({
456
+ }, Je = ({
457
457
  ref: e,
458
458
  toggleRef: n,
459
459
  options: r,
@@ -474,21 +474,21 @@ const fe = Te(null), rt = ({
474
474
  isMouse: a,
475
475
  isActivated: !1
476
476
  }, e.currentXRef.current = n, e.prevXRef.current = n;
477
- }, me = ({ refs: e, dragSidebar: n, onDeactivate: r }) => {
477
+ }, we = ({ refs: e, dragSidebar: n, onDeactivate: r }) => {
478
478
  e.draggingRef.current = null, e.currentXRef.current = null, e.prevXRef.current = null, n(null), r();
479
- }, J = (e) => e instanceof Element ? !!e.closest("input, textarea, [contenteditable='true']") : !1, we = (e, n) => {
479
+ }, J = (e) => e instanceof Element ? !!e.closest("input, textarea, [contenteditable='true']") : !1, Ee = (e, n) => {
480
480
  for (let r = 0; r < e.length; r++) {
481
481
  const o = e[r];
482
482
  if (n == null || o.identifier === n)
483
483
  return o;
484
484
  }
485
485
  return null;
486
- }, Ee = (e, n) => {
486
+ }, Re = (e, n) => {
487
487
  for (let r = 0; r < e.length; r++)
488
488
  if (e[r].identifier === n)
489
489
  return !0;
490
490
  return !1;
491
- }, Re = (e, n) => {
491
+ }, Se = (e, n) => {
492
492
  const { globalOptions: r, setLeftSidebarOptions: o, setRightSidebarOptions: a } = k(), {
493
493
  sidebarWidthPx: i,
494
494
  transitionMs: c,
@@ -505,7 +505,7 @@ const fe = Te(null), rt = ({
505
505
  swipeBarZIndex: T,
506
506
  toggleZIndex: P,
507
507
  overlayZIndex: A
508
- } = n, _ = Oe(
508
+ } = n, _ = Ae(
509
509
  () => ({
510
510
  sidebarWidthPx: i ?? r.sidebarWidthPx,
511
511
  transitionMs: c ?? r.transitionMs,
@@ -546,7 +546,7 @@ const fe = Te(null), rt = ({
546
546
  e === "left" ? o(_) : a(_);
547
547
  }, [e, _, o, a]), _;
548
548
  };
549
- function Se({
549
+ function be({
550
550
  isCollapsed: e,
551
551
  setCollapsed: n,
552
552
  closeSidebarOnClick: r = !0,
@@ -559,8 +559,8 @@ function Se({
559
559
  {
560
560
  style: {
561
561
  transitionDuration: `${o}ms`,
562
- ...Ze,
563
- ...e ? {} : Ue,
562
+ ...ze,
563
+ ...e ? {} : Ve,
564
564
  ...a ? { backgroundColor: a } : {},
565
565
  zIndex: i
566
566
  },
@@ -570,24 +570,28 @@ function Se({
570
570
  }
571
571
  );
572
572
  }
573
- function be({ size: e, color: n }) {
573
+ function xe({ size: e, color: n }) {
574
574
  const r = L(null);
575
575
  return G(() => {
576
576
  const o = () => {
577
577
  r.current && (r.current.style.opacity = "1");
578
578
  }, a = () => {
579
- r.current && (r.current.style.opacity = "0.5");
579
+ r.current && (r.current.style.opacity = `${ce}`);
580
580
  };
581
581
  r.current && (r.current.addEventListener("mouseenter", o), r.current.addEventListener("mouseleave", a));
582
582
  }, []), /* @__PURE__ */ v.jsx(
583
583
  "div",
584
584
  {
585
585
  style: {
586
- ...ze
586
+ ...qe
587
587
  },
588
588
  children: /* @__PURE__ */ v.jsxs(
589
589
  "svg",
590
590
  {
591
+ style: {
592
+ transition: `opacity ${Ge}ms ease`,
593
+ opacity: `${ce}`
594
+ },
591
595
  ref: r,
592
596
  "aria-hidden": "true",
593
597
  viewBox: "0 0 24 24",
@@ -611,14 +615,14 @@ function be({ size: e, color: n }) {
611
615
  }
612
616
  );
613
617
  }
614
- function He({ options: e, showToggle: n = !0, ToggleComponent: r }) {
618
+ function Ke({ options: e, showToggle: n = !0, ToggleComponent: r }) {
615
619
  const { openSidebar: o, leftToggleRef: a, isLeftOpen: i, closeSidebar: c } = k();
616
620
  return n ? /* @__PURE__ */ v.jsx(
617
621
  "div",
618
622
  {
619
623
  ref: a,
620
624
  style: {
621
- ...pe,
625
+ ...me,
622
626
  transition: `transform ${e.transitionMs}ms ease, opacity ${e.transitionMs}ms ease`,
623
627
  left: 0,
624
628
  zIndex: e.toggleZIndex
@@ -632,7 +636,7 @@ function He({ options: e, showToggle: n = !0, ToggleComponent: r }) {
632
636
  marginLeft: `${e.toggleIconEdgeDistancePx}px`,
633
637
  ...i ? { transform: "rotate(180deg)" } : {}
634
638
  },
635
- children: r ?? /* @__PURE__ */ v.jsx(be, { size: e.toggleIconSizePx, color: e.toggleIconColor })
639
+ children: r ?? /* @__PURE__ */ v.jsx(xe, { size: e.toggleIconSizePx, color: e.toggleIconColor })
636
640
  }
637
641
  )
638
642
  }
@@ -647,7 +651,7 @@ function K(e = ie) {
647
651
  return c(), i.addEventListener("change", c), () => i.removeEventListener("change", c);
648
652
  }, [n]), o;
649
653
  }
650
- const ce = ({
654
+ const ue = ({
651
655
  refs: e,
652
656
  callbacks: n,
653
657
  currentX: r,
@@ -686,7 +690,7 @@ const ce = ({
686
690
  );
687
691
  n.dragSidebar(E);
688
692
  }
689
- }, ue = ({
693
+ }, le = ({
690
694
  refs: e,
691
695
  callbacks: n,
692
696
  options: r
@@ -701,7 +705,7 @@ const ce = ({
701
705
  const s = o >= a, p = o < a, u = i <= r.edgeActivationWidthPx;
702
706
  c ? (p ? n.closeSidebar() : n.openSidebar(), n.dragSidebar(null)) : u && s ? (n.openSidebar(), n.dragSidebar(null)) : (n.closeSidebar(), n.dragSidebar(null));
703
707
  };
704
- function Je(e) {
708
+ function et(e) {
705
709
  const n = K(e.mediaQueryWidth), {
706
710
  lockedSidebar: r,
707
711
  setLockedSidebar: o,
@@ -736,8 +740,8 @@ function Je(e) {
736
740
  }
737
741
  function T(l) {
738
742
  if (r === "right" || !u.current || u.current.isMouse) return;
739
- const g = u.current.activeTouchId, I = we(l.changedTouches, g);
740
- I && ce({
743
+ const g = u.current.activeTouchId, I = Ee(l.changedTouches, g);
744
+ I && ue({
741
745
  refs: f,
742
746
  callbacks: h,
743
747
  currentX: I.clientX,
@@ -749,14 +753,14 @@ function Je(e) {
749
753
  function P(l) {
750
754
  if (r === "right" || !u.current || u.current.isMouse) return;
751
755
  const g = u.current.activeTouchId;
752
- Ee(l.changedTouches, g) && ue({
756
+ Re(l.changedTouches, g) && le({
753
757
  refs: f,
754
758
  callbacks: h,
755
759
  options: e
756
760
  });
757
761
  }
758
762
  function A() {
759
- r !== "right" && (!u.current || u.current.isMouse || me({
763
+ r !== "right" && (!u.current || u.current.isMouse || we({
760
764
  refs: f,
761
765
  dragSidebar: h.dragSidebar,
762
766
  onDeactivate: M
@@ -772,7 +776,7 @@ function Je(e) {
772
776
  }));
773
777
  }
774
778
  function X(l) {
775
- r !== "right" && (!u.current || !u.current.isMouse || ce({
779
+ r !== "right" && (!u.current || !u.current.isMouse || ue({
776
780
  refs: f,
777
781
  callbacks: h,
778
782
  currentX: l.clientX,
@@ -782,7 +786,7 @@ function Je(e) {
782
786
  }));
783
787
  }
784
788
  function x() {
785
- r !== "right" && (!u.current || !u.current.isMouse || ue({
789
+ r !== "right" && (!u.current || !u.current.isMouse || le({
786
790
  refs: f,
787
791
  callbacks: h,
788
792
  options: e
@@ -803,7 +807,7 @@ function Je(e) {
803
807
  e
804
808
  ]);
805
809
  }
806
- function nt({
810
+ function ot({
807
811
  className: e,
808
812
  children: n,
809
813
  ToggleComponent: r,
@@ -811,10 +815,10 @@ function nt({
811
815
  }) {
812
816
  if ((n == null ? void 0 : n.type) === v.Fragment)
813
817
  throw new Error("Fragments is not allowed in SwipeBarLeft");
814
- const { isLeftOpen: a, closeSidebar: i, leftSidebarRef: c } = k(), s = Re("left", o), p = K(s.mediaQueryWidth);
815
- return Je(s), /* @__PURE__ */ v.jsxs(v.Fragment, { children: [
818
+ const { isLeftOpen: a, closeSidebar: i, leftSidebarRef: c } = k(), s = Se("left", o), p = K(s.mediaQueryWidth);
819
+ return et(s), /* @__PURE__ */ v.jsxs(v.Fragment, { children: [
816
820
  s.showOverlay && /* @__PURE__ */ v.jsx(
817
- Se,
821
+ be,
818
822
  {
819
823
  isCollapsed: !a,
820
824
  setCollapsed: () => i("left"),
@@ -824,7 +828,7 @@ function nt({
824
828
  }
825
829
  ),
826
830
  /* @__PURE__ */ v.jsx(
827
- He,
831
+ Ke,
828
832
  {
829
833
  options: s,
830
834
  showToggle: s.showToggle,
@@ -836,9 +840,9 @@ function nt({
836
840
  {
837
841
  ref: c,
838
842
  style: {
839
- ...ve,
840
- ...s.isAbsolute || p ? Be : {},
841
- ...e ? {} : { backgroundColor: he },
843
+ ...pe,
844
+ ...s.isAbsolute || p ? Ue : {},
845
+ ...e ? {} : { backgroundColor: ve },
842
846
  zIndex: s.swipeBarZIndex
843
847
  },
844
848
  className: e,
@@ -847,7 +851,7 @@ function nt({
847
851
  )
848
852
  ] });
849
853
  }
850
- function Ke({ options: e, showToggle: n = !0, ToggleComponent: r }) {
854
+ function tt({ options: e, showToggle: n = !0, ToggleComponent: r }) {
851
855
  const { openSidebar: o, rightToggleRef: a, isRightOpen: i, closeSidebar: c } = k();
852
856
  return n ? (
853
857
  // 1px wide container
@@ -856,7 +860,7 @@ function Ke({ options: e, showToggle: n = !0, ToggleComponent: r }) {
856
860
  {
857
861
  ref: a,
858
862
  style: {
859
- ...pe,
863
+ ...me,
860
864
  transition: `transform ${e.transitionMs}ms ease, opacity ${e.transitionMs}ms ease`,
861
865
  right: 0,
862
866
  zIndex: e.toggleZIndex
@@ -871,14 +875,14 @@ function Ke({ options: e, showToggle: n = !0, ToggleComponent: r }) {
871
875
  // reverse because we are using the same icon for both left and right
872
876
  ...i ? {} : { transform: "rotate(180deg)" }
873
877
  },
874
- children: r ?? /* @__PURE__ */ v.jsx(be, { size: e.toggleIconSizePx, color: e.toggleIconColor })
878
+ children: r ?? /* @__PURE__ */ v.jsx(xe, { size: e.toggleIconSizePx, color: e.toggleIconColor })
875
879
  }
876
880
  )
877
881
  }
878
882
  )
879
883
  ) : null;
880
884
  }
881
- const le = ({
885
+ const de = ({
882
886
  refs: e,
883
887
  callbacks: n,
884
888
  currentX: r,
@@ -917,7 +921,7 @@ const le = ({
917
921
  );
918
922
  n.dragSidebar(f);
919
923
  }
920
- }, de = ({
924
+ }, fe = ({
921
925
  refs: e,
922
926
  callbacks: n,
923
927
  options: r
@@ -932,7 +936,7 @@ const le = ({
932
936
  const p = o > a, u = o < a, E = i >= s - r.edgeActivationWidthPx;
933
937
  c ? (p ? n.closeSidebar() : n.openSidebar(), n.dragSidebar(null)) : E && u ? (n.openSidebar(), n.dragSidebar(null)) : (n.closeSidebar(), n.dragSidebar(null));
934
938
  };
935
- function et(e) {
939
+ function rt(e) {
936
940
  const n = K(e.mediaQueryWidth), {
937
941
  lockedSidebar: r,
938
942
  setLockedSidebar: o,
@@ -967,8 +971,8 @@ function et(e) {
967
971
  }
968
972
  function T(l) {
969
973
  if (r === "left" || !u.current || u.current.isMouse) return;
970
- const g = u.current.activeTouchId, I = we(l.changedTouches, g);
971
- I && le({
974
+ const g = u.current.activeTouchId, I = Ee(l.changedTouches, g);
975
+ I && de({
972
976
  refs: f,
973
977
  callbacks: h,
974
978
  currentX: I.clientX,
@@ -980,14 +984,14 @@ function et(e) {
980
984
  function P(l) {
981
985
  if (r === "left" || !u.current || u.current.isMouse) return;
982
986
  const g = u.current.activeTouchId;
983
- Ee(l.changedTouches, g) && de({
987
+ Re(l.changedTouches, g) && fe({
984
988
  refs: f,
985
989
  callbacks: h,
986
990
  options: e
987
991
  });
988
992
  }
989
993
  function A() {
990
- r !== "left" && (!u.current || u.current.isMouse || me({
994
+ r !== "left" && (!u.current || u.current.isMouse || we({
991
995
  refs: f,
992
996
  dragSidebar: h.dragSidebar,
993
997
  onDeactivate: M
@@ -1005,7 +1009,7 @@ function et(e) {
1005
1009
  });
1006
1010
  }
1007
1011
  function X(l) {
1008
- r !== "left" && (!u.current || !u.current.isMouse || le({
1012
+ r !== "left" && (!u.current || !u.current.isMouse || de({
1009
1013
  refs: f,
1010
1014
  callbacks: h,
1011
1015
  currentX: l.clientX,
@@ -1015,7 +1019,7 @@ function et(e) {
1015
1019
  }));
1016
1020
  }
1017
1021
  function x() {
1018
- r !== "left" && (!u.current || !u.current.isMouse || de({
1022
+ r !== "left" && (!u.current || !u.current.isMouse || fe({
1019
1023
  refs: f,
1020
1024
  callbacks: h,
1021
1025
  options: e
@@ -1036,7 +1040,7 @@ function et(e) {
1036
1040
  e
1037
1041
  ]);
1038
1042
  }
1039
- function it({
1043
+ function at({
1040
1044
  className: e,
1041
1045
  children: n,
1042
1046
  ToggleComponent: r,
@@ -1044,10 +1048,10 @@ function it({
1044
1048
  }) {
1045
1049
  if ((n == null ? void 0 : n.type) === v.Fragment)
1046
1050
  throw new Error("Fragments is not allowed in SwipeBarRight");
1047
- const { isRightOpen: a, closeSidebar: i, rightSidebarRef: c } = k(), s = Re("right", o), p = K(s.mediaQueryWidth);
1048
- return et(s), /* @__PURE__ */ v.jsxs(v.Fragment, { children: [
1051
+ const { isRightOpen: a, closeSidebar: i, rightSidebarRef: c } = k(), s = Se("right", o), p = K(s.mediaQueryWidth);
1052
+ return rt(s), /* @__PURE__ */ v.jsxs(v.Fragment, { children: [
1049
1053
  s.showOverlay && /* @__PURE__ */ v.jsx(
1050
- Se,
1054
+ be,
1051
1055
  {
1052
1056
  isCollapsed: !a,
1053
1057
  setCollapsed: () => i("right"),
@@ -1057,7 +1061,7 @@ function it({
1057
1061
  }
1058
1062
  ),
1059
1063
  /* @__PURE__ */ v.jsx(
1060
- Ke,
1064
+ tt,
1061
1065
  {
1062
1066
  options: s,
1063
1067
  showToggle: s.showToggle,
@@ -1069,9 +1073,9 @@ function it({
1069
1073
  {
1070
1074
  ref: c,
1071
1075
  style: {
1072
- ...ve,
1073
- ...s.isAbsolute || p ? Ge : {},
1074
- ...e ? {} : { backgroundColor: he },
1076
+ ...pe,
1077
+ ...s.isAbsolute || p ? Ze : {},
1078
+ ...e ? {} : { backgroundColor: ve },
1075
1079
  zIndex: s.swipeBarZIndex
1076
1080
  },
1077
1081
  className: e,
@@ -1081,12 +1085,12 @@ function it({
1081
1085
  ] });
1082
1086
  }
1083
1087
  export {
1084
- Se as Overlay,
1085
- nt as SwipeBarLeft,
1086
- rt as SwipeBarProvider,
1087
- it as SwipeBarRight,
1088
- He as ToggleLeft,
1089
- Ke as ToggleRight,
1088
+ be as Overlay,
1089
+ ot as SwipeBarLeft,
1090
+ it as SwipeBarProvider,
1091
+ at as SwipeBarRight,
1092
+ Ke as ToggleLeft,
1093
+ tt as ToggleRight,
1090
1094
  K as useMediaQuery,
1091
1095
  k as useSwipeBarContext
1092
1096
  };
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var oe;function ye(){if(oe)return B;oe=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function n(o,a,i){var c=null;if(i!==void 0&&(c=""+i),a.key!==void 0&&(c=""+a.key),"key"in a){i={};for(var s in a)s!=="key"&&(i[s]=a[s])}else i=a;return a=i.ref,{$$typeof:e,type:o,key:c,ref:a!==void 0?a:null,props:i}}return B.Fragment=r,B.jsx=n,B.jsxs=n,B}var F={};/**
9
+ */var oe;function xe(){if(oe)return B;oe=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function n(o,a,i){var c=null;if(i!==void 0&&(c=""+i),a.key!==void 0&&(c=""+a.key),"key"in a){i={};for(var s in a)s!=="key"&&(i[s]=a[s])}else i=a;return a=i.ref,{$$typeof:e,type:o,key:c,ref:a!==void 0?a:null,props:i}}return B.Fragment=r,B.jsx=n,B.jsxs=n,B}var F={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,9 +14,9 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var ae;function xe(){return ae||(ae=1,process.env.NODE_ENV!=="production"&&function(){function e(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===N?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case O:return"Fragment";case M:return"Profiler";case _:return"StrictMode";case x:return"Suspense";case l:return"SuspenseList";case j:return"Activity"}if(typeof t=="object")switch(typeof t.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),t.$$typeof){case X:return"Portal";case A:return t.displayName||"Context";case P:return(t._context.displayName||"Context")+".Consumer";case C:var d=t.render;return t=t.displayName,t||(t=d.displayName||d.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case h:return d=t.displayName||null,d!==null?d:e(t.type)||"Memo";case L:d=t._payload,t=t._init;try{return e(t(d))}catch{}}return null}function r(t){return""+t}function n(t){try{r(t);var d=!1}catch{d=!0}if(d){d=console;var w=d.error,E=typeof Symbol=="function"&&Symbol.toStringTag&&t[Symbol.toStringTag]||t.constructor.name||"Object";return w.call(d,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",E),r(t)}}function o(t){if(t===O)return"<>";if(typeof t=="object"&&t!==null&&t.$$typeof===L)return"<...>";try{var d=e(t);return d?"<"+d+">":"<...>"}catch{return"<...>"}}function a(){var t=k.A;return t===null?null:t.getOwner()}function i(){return Error("react-stack-top-frame")}function c(t){if(W.call(t,"key")){var d=Object.getOwnPropertyDescriptor(t,"key").get;if(d&&d.isReactWarning)return!1}return t.key!==void 0}function s(t,d){function w(){V||(V=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",d))}w.isReactWarning=!0,Object.defineProperty(t,"key",{get:w,configurable:!0})}function m(){var t=e(this.type);return Q[t]||(Q[t]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),t=this.props.ref,t!==void 0?t:null}function u(t,d,w,E,K,re){var b=w.ref;return t={$$typeof:I,type:t,key:d,props:w,_owner:E},(b!==void 0?b:null)!==null?Object.defineProperty(t,"ref",{enumerable:!1,get:m}):Object.defineProperty(t,"ref",{enumerable:!1,value:null}),t._store={},Object.defineProperty(t._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(t,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(t,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:K}),Object.defineProperty(t,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:re}),Object.freeze&&(Object.freeze(t.props),Object.freeze(t)),t}function S(t,d,w,E,K,re){var b=d.children;if(b!==void 0)if(E)if(ne(b)){for(E=0;E<b.length;E++)y(b[E]);Object.freeze&&Object.freeze(b)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else y(b);if(W.call(d,"key")){b=e(t);var Y=Object.keys(d).filter(function(Ke){return Ke!=="key"});E=0<Y.length?"{key: someKey, "+Y.join(": ..., ")+": ...}":"{key: someKey}",R[b+E]||(Y=0<Y.length?"{"+Y.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var ae;function Te(){return ae||(ae=1,process.env.NODE_ENV!=="production"&&function(){function e(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===N?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case O:return"Fragment";case M:return"Profiler";case _:return"StrictMode";case x:return"Suspense";case l:return"SuspenseList";case j:return"Activity"}if(typeof t=="object")switch(typeof t.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),t.$$typeof){case C:return"Portal";case A:return t.displayName||"Context";case P:return(t._context.displayName||"Context")+".Consumer";case X:var d=t.render;return t=t.displayName,t||(t=d.displayName||d.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case h:return d=t.displayName||null,d!==null?d:e(t.type)||"Memo";case L:d=t._payload,t=t._init;try{return e(t(d))}catch{}}return null}function r(t){return""+t}function n(t){try{r(t);var d=!1}catch{d=!0}if(d){d=console;var w=d.error,E=typeof Symbol=="function"&&Symbol.toStringTag&&t[Symbol.toStringTag]||t.constructor.name||"Object";return w.call(d,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",E),r(t)}}function o(t){if(t===O)return"<>";if(typeof t=="object"&&t!==null&&t.$$typeof===L)return"<...>";try{var d=e(t);return d?"<"+d+">":"<...>"}catch{return"<...>"}}function a(){var t=k.A;return t===null?null:t.getOwner()}function i(){return Error("react-stack-top-frame")}function c(t){if(W.call(t,"key")){var d=Object.getOwnPropertyDescriptor(t,"key").get;if(d&&d.isReactWarning)return!1}return t.key!==void 0}function s(t,d){function w(){V||(V=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",d))}w.isReactWarning=!0,Object.defineProperty(t,"key",{get:w,configurable:!0})}function m(){var t=e(this.type);return Q[t]||(Q[t]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),t=this.props.ref,t!==void 0?t:null}function u(t,d,w,E,K,re){var b=w.ref;return t={$$typeof:I,type:t,key:d,props:w,_owner:E},(b!==void 0?b:null)!==null?Object.defineProperty(t,"ref",{enumerable:!1,get:m}):Object.defineProperty(t,"ref",{enumerable:!1,value:null}),t._store={},Object.defineProperty(t._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(t,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(t,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:K}),Object.defineProperty(t,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:re}),Object.freeze&&(Object.freeze(t.props),Object.freeze(t)),t}function S(t,d,w,E,K,re){var b=d.children;if(b!==void 0)if(E)if(ne(b)){for(E=0;E<b.length;E++)y(b[E]);Object.freeze&&Object.freeze(b)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else y(b);if(W.call(d,"key")){b=e(t);var Y=Object.keys(d).filter(function($e){return $e!=="key"});E=0<Y.length?"{key: someKey, "+Y.join(": ..., ")+": ...}":"{key: someKey}",R[b+E]||(Y=0<Y.length?"{"+Y.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
18
  let props = %s;
19
19
  <%s {...props} />
20
20
  React keys must be passed directly to JSX without using spread:
21
21
  let props = %s;
22
- <%s key={someKey} {...props} />`,E,b,Y,b),R[b+E]=!0)}if(b=null,w!==void 0&&(n(w),b=""+w),c(d)&&(n(d.key),b=""+d.key),"key"in d){w={};for(var ie in d)ie!=="key"&&(w[ie]=d[ie])}else w=d;return b&&s(w,typeof t=="function"?t.displayName||t.name||"Unknown":t),u(t,b,w,a(),K,re)}function y(t){v(t)?t._store&&(t._store.validated=1):typeof t=="object"&&t!==null&&t.$$typeof===L&&(t._payload.status==="fulfilled"?v(t._payload.value)&&t._payload.value._store&&(t._payload.value._store.validated=1):t._store&&(t._store.validated=1))}function v(t){return typeof t=="object"&&t!==null&&t.$$typeof===I}var g=f,I=Symbol.for("react.transitional.element"),X=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),P=Symbol.for("react.consumer"),A=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),N=Symbol.for("react.client.reference"),k=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=Object.prototype.hasOwnProperty,ne=Array.isArray,Z=console.createTask?console.createTask:function(){return null};g={react_stack_bottom_frame:function(t){return t()}};var V,Q={},H=g.react_stack_bottom_frame.bind(g,i)(),J=Z(o(i)),R={};F.Fragment=O,F.jsx=function(t,d,w){var E=1e4>k.recentlyCreatedOwnerStacks++;return S(t,d,w,!1,E?Error("react-stack-top-frame"):H,E?Z(o(t)):J)},F.jsxs=function(t,d,w){var E=1e4>k.recentlyCreatedOwnerStacks++;return S(t,d,w,!0,E?Error("react-stack-top-frame"):H,E?Z(o(t)):J)}}()),F}process.env.NODE_ENV==="production"?q.exports=ye():q.exports=xe();var p=q.exports;const se=f.createContext(null),Te=({children:e,sidebarWidthPx:r,transitionMs:n,edgeActivationWidthPx:o,dragActivationDeltaPx:a,showOverlay:i,isAbsolute:c,overlayBackgroundColor:s,toggleIconColor:m,toggleIconSizePx:u,toggleIconEdgeDistancePx:S,showToggle:y,mediaQueryWidth:v,swipeBarZIndex:g,toggleZIndex:I,overlayZIndex:X})=>{const[O,_]=f.useState(null),[M,P]=f.useState(!1),[A,C]=f.useState(!1),[x,l]=f.useState({}),[h,L]=f.useState({}),j=f.useRef(null),N=f.useRef(null),k=f.useRef(null),W=f.useRef(null),[ne,Z]=f.useState({sidebarWidthPx:r??Ie,transitionMs:n??Oe,edgeActivationWidthPx:o??_e,dragActivationDeltaPx:a??Ae,showOverlay:i??Pe,isAbsolute:c??Le,overlayBackgroundColor:s??ce,toggleIconColor:m??Me,toggleIconSizePx:u??Xe,toggleIconEdgeDistancePx:S??Ce,showToggle:y??De,mediaQueryWidth:v??$,swipeBarZIndex:g??ke,toggleZIndex:I??We,overlayZIndex:X??je}),V=f.useCallback(R=>{Z(t=>({...t,...R}))},[]),Q=f.useCallback(R=>{Ze({side:R,ref:R==="left"?j:N,options:R==="left"?x:h,toggleRef:R==="left"?k:W,afterApply:()=>{R==="left"?P(!0):C(!0),_(R)}})},[x,h]),H=f.useCallback(R=>{Ue({ref:R==="left"?j:N,options:R==="left"?x:h,toggleRef:R==="left"?k:W,side:R,afterApply:()=>{R==="left"?P(!1):C(!1),_(null)}})},[x,h]),J=f.useCallback((R,t)=>{ze({ref:R==="left"?j:N,toggleRef:R==="left"?k:W,options:R==="left"?x:h,translateX:t})},[x,h]);return p.jsx(se.Provider,{value:{lockedSidebar:O,setLockedSidebar:_,isLeftOpen:M,isRightOpen:A,leftSidebarRef:j,rightSidebarRef:N,openSidebar:Q,closeSidebar:H,dragSidebar:J,globalOptions:ne,setGlobalOptions:V,leftSidebarOptions:x,rightSidebarOptions:h,setLeftSidebarOptions:l,setRightSidebarOptions:L,leftToggleRef:k,rightToggleRef:W},children:e})},D=()=>{const e=f.useContext(se);if(!e)throw new Error("useSwipeBarContext must be used within SwipeBarProvider");return e},Oe=300,_e=40,Ae=20,Ie=320,Pe=!0,Le=!1,ce="rgba(0, 0, 0, 0.5)",ue="rgb(36,36,36)",Me="white",Xe=40,Ce=40,De=!0,$=640,ke=30,We=15,je=20,le={width:0,top:0,bottom:0,flexShrink:0,overflowX:"hidden",willChange:"transform"},Ne={position:"fixed",left:0,top:0,bottom:0},Ye={position:"fixed",right:0,top:0,bottom:0},Be={position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:ce,transitionProperty:"opacity",pointerEvents:"none",opacity:0},Fe={opacity:1,pointerEvents:"auto"},de={position:"fixed",top:"50%",transform:"translateY(-50%)",width:"1px",display:"flex",justifyContent:"center"},Ge={position:"relative",cursor:"pointer",display:"flex",height:"72px",alignItems:"center",justifyContent:"center"},ee=e=>{var r;return(r=e.current)==null?void 0:r.firstElementChild},Ze=({ref:e,side:r,options:n,toggleRef:o,afterApply:a})=>{const i=ee(e),c=n.transitionMs?n.transitionMs*2/3:0;i&&(i.style.opacity="0"),requestAnimationFrame(()=>{!e.current||!i||(e.current.style.transition=`transform ${n.transitionMs}ms ease, width ${n.transitionMs}ms ease`,i.style.transition=`opacity ${c}ms ease`,requestAnimationFrame(()=>{e.current&&(e.current.style.transform="",e.current.style.width=`${n.sidebarWidthPx}px`,o.current&&n.sidebarWidthPx&&(o.current.style.opacity="1",o.current.style.transform=`translateY(-50%) translateX(${r==="left"?n.sidebarWidthPx:-n.sidebarWidthPx}px)`),setTimeout(()=>{i.style.opacity="1"},c),a())}))}),setTimeout(()=>{},0)},Ue=({ref:e,options:r,side:n,toggleRef:o,afterApply:a})=>{const i=ee(e),c=r.transitionMs?r.transitionMs*1/3:0;requestAnimationFrame(()=>{!e.current||!i||(e.current.style.transition=`transform ${r.transitionMs}ms ease, width ${r.transitionMs}ms ease`,i.style.transition=`opacity ${c}ms ease`,requestAnimationFrame(()=>{e.current&&(e.current.style.transform=n==="left"?"translateX(-100%)":"translateX(100%)",e.current.style.width="0px",o.current&&(o.current.style.opacity="1",o.current.style.transform="translateY(-50%)"),i.style.opacity="0",a())}))})},ze=({ref:e,toggleRef:r,options:n,translateX:o})=>{!e.current||o===null||(e.current.style.transition="none",requestAnimationFrame(()=>{const a=ee(e);if(!e.current||!a)return;a.style.opacity="0";const i=`${n.sidebarWidthPx}px`;e.current.style.width!==i&&(e.current.style.width=i),e.current.style.transform=`translateX(${o}px)`,r.current&&(r.current.style.opacity="0",r.current.style.transform=`translateY(-50%) translateX(${o}px)`)}))},U=({refs:e,clientX:r,clientY:n,touchId:o,isMouse:a})=>{e.draggingRef.current={startX:r,startY:n,activeTouchId:o,isMouse:a,isActivated:!1},e.currentXRef.current=r,e.prevXRef.current=r},fe=({refs:e,dragSidebar:r,onDeactivate:n})=>{e.draggingRef.current=null,e.currentXRef.current=null,e.prevXRef.current=null,r(null),n()},z=e=>e instanceof Element?!!e.closest("input, textarea, [contenteditable='true']"):!1,ge=(e,r)=>{for(let n=0;n<e.length;n++){const o=e[n];if(r==null||o.identifier===r)return o}return null},he=(e,r)=>{for(let n=0;n<e.length;n++)if(e[n].identifier===r)return!0;return!1},ve=(e,r)=>{const{globalOptions:n,setLeftSidebarOptions:o,setRightSidebarOptions:a}=D(),{sidebarWidthPx:i,transitionMs:c,edgeActivationWidthPx:s,dragActivationDeltaPx:m,showOverlay:u,isAbsolute:S,overlayBackgroundColor:y,toggleIconColor:v,toggleIconSizePx:g,toggleIconEdgeDistancePx:I,showToggle:X,mediaQueryWidth:O,swipeBarZIndex:_,toggleZIndex:M,overlayZIndex:P}=r,A=f.useMemo(()=>({sidebarWidthPx:i??n.sidebarWidthPx,transitionMs:c??n.transitionMs,edgeActivationWidthPx:s??n.edgeActivationWidthPx,dragActivationDeltaPx:m??n.dragActivationDeltaPx,showOverlay:u??n.showOverlay,isAbsolute:S??n.isAbsolute,overlayBackgroundColor:y??n.overlayBackgroundColor,toggleIconColor:v??n.toggleIconColor,toggleIconSizePx:g??n.toggleIconSizePx,toggleIconEdgeDistancePx:I??n.toggleIconEdgeDistancePx,showToggle:X??n.showToggle,mediaQueryWidth:O??n.mediaQueryWidth,swipeBarZIndex:_??n.swipeBarZIndex,toggleZIndex:M??n.toggleZIndex,overlayZIndex:P??n.overlayZIndex}),[i,c,s,m,u,S,y,v,g,I,X,n,O,_,M,P]);return f.useEffect(()=>{e==="left"?o(A):a(A)},[e,A,o,a]),A};function te({isCollapsed:e,setCollapsed:r,closeSidebarOnClick:n=!0,transitionMs:o,overlayBackgroundColor:a,overlayZIndex:i}){return p.jsx("div",{style:{transitionDuration:`${o}ms`,...Be,...e?{}:Fe,...a?{backgroundColor:a}:{},zIndex:i},onMouseDown:c=>{n&&(c.stopPropagation(),r())}})}function pe({size:e,color:r}){const n=f.useRef(null);return f.useEffect(()=>{const o=()=>{n.current&&(n.current.style.opacity="1")},a=()=>{n.current&&(n.current.style.opacity="0.5")};n.current&&(n.current.addEventListener("mouseenter",o),n.current.addEventListener("mouseleave",a))},[]),p.jsx("div",{style:{...Ge},children:p.jsxs("svg",{ref:n,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:e,children:[p.jsx("g",{strokeWidth:"0"}),p.jsx("g",{strokeLinecap:"round",strokeLinejoin:"round",children:p.jsx("g",{children:p.jsx("path",{clipRule:"evenodd",d:"m9.46967 5.46967c.29289-.29289.76773-.29289 1.06063 0l2.6286 2.62858c.5748.57477 1.0384 1.03835 1.3831 1.44443.355.41812.6278.82432.7818 1.29852.2447.7531.2447 1.5645 0 2.3176-.154.4742-.4268.8804-.7818 1.2985-.3447.4061-.8083.8697-1.3831 1.4444l-2.6286 2.6286c-.2929.2929-.76774.2929-1.06063 0s-.29289-.7677 0-1.0606l2.60593-2.6059c.6027-.6028 1.0225-1.0234 1.3229-1.3773.2947-.3471.4302-.5804.4987-.7912.1469-.4519.1469-.9387 0-1.3906-.0685-.2108-.204-.4441-.4987-.7912-.3004-.3539-.7202-.77451-1.3229-1.37728l-2.60593-2.60589c-.29289-.29289-.29289-.76777 0-1.06066z",fill:r,fillRule:"evenodd"})})})]})})}function me({options:e,showToggle:r=!0,ToggleComponent:n}){const{openSidebar:o,leftToggleRef:a,isLeftOpen:i,closeSidebar:c}=D();return r?p.jsx("div",{ref:a,style:{...de,transition:`transform ${e.transitionMs}ms ease, opacity ${e.transitionMs}ms ease`,left:0,zIndex:e.toggleZIndex},children:(!i||i&&!e.showOverlay)&&p.jsx("button",{type:"button",onClick:()=>i?c("left"):o("left"),style:{marginLeft:`${e.toggleIconEdgeDistancePx}px`,...i?{transform:"rotate(180deg)"}:{}},children:n??p.jsx(pe,{size:e.toggleIconSizePx,color:e.toggleIconColor})})}):null}function G(e=$){const r=`(max-width: ${Math.min(e,$)}px)`,n=()=>typeof window>"u"||typeof window.matchMedia>"u"?!1:window.matchMedia(r).matches,[o,a]=f.useState(n);return f.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia>"u")return;const i=window.matchMedia(r),c=()=>a(i.matches);return c(),i.addEventListener("change",c),()=>i.removeEventListener("change",c)},[r]),o}const we=({refs:e,callbacks:r,currentX:n,preventDefault:o,lockPane:a,options:i})=>{if(!e.draggingRef.current)return;const c=n-e.draggingRef.current.startX;if(!e.draggingRef.current.isActivated&&Math.abs(c)>=i.dragActivationDeltaPx&&(e.draggingRef.current.isActivated=!0,a()),!e.draggingRef.current.isActivated)return;e.prevXRef.current=e.currentXRef.current,e.currentXRef.current=n;const s=r.getIsOpen();let m=!1;if((s||e.draggingRef.current.startX<=i.edgeActivationWidthPx)&&(m=!0),!m){e.draggingRef.current=null,r.dragSidebar(null);return}o();const u=i.sidebarWidthPx;if(s){const S=Math.min(0,Math.max(-u,c+i.dragActivationDeltaPx));r.dragSidebar(S)}else if(e.draggingRef.current.startX<=i.edgeActivationWidthPx){const S=Math.min(0,Math.max(-u,-u+c-i.dragActivationDeltaPx));r.dragSidebar(S)}},Re=({refs:e,callbacks:r,options:n})=>{if(!e.draggingRef.current)return;if(!e.draggingRef.current.isActivated){e.draggingRef.current=null,e.currentXRef.current=null,e.prevXRef.current=null;return}const o=e.currentXRef.current??e.draggingRef.current.startX,a=e.prevXRef.current??e.draggingRef.current.startX,i=e.draggingRef.current.startX,c=r.getIsOpen();e.draggingRef.current=null,e.currentXRef.current=null,e.prevXRef.current=null;const s=o>=a,m=o<a,u=i<=n.edgeActivationWidthPx;c?(m?r.closeSidebar():r.openSidebar(),r.dragSidebar(null)):u&&s?(r.openSidebar(),r.dragSidebar(null)):(r.closeSidebar(),r.dragSidebar(null))};function Ve(e){const r=G(e.mediaQueryWidth),{lockedSidebar:n,setLockedSidebar:o,isLeftOpen:a,openSidebar:i,closeSidebar:c,dragSidebar:s,leftSidebarRef:m}=D(),u=f.useRef(null),S=f.useRef(null),y=f.useRef(null);f.useEffect(()=>{if(!r||n==="right")return;const v={getIsOpen:()=>a,openSidebar:()=>i("left"),closeSidebar:()=>c("left"),dragSidebar:l=>s("left",l)},g={draggingRef:u,currentXRef:S,prevXRef:y},I=()=>o("left"),X=()=>o(null);function O(l){if(n==="right"||z(l.target)||l.changedTouches.length===0)return;const h=l.changedTouches[0];(v.getIsOpen()||h.clientX<=e.edgeActivationWidthPx)&&U({refs:g,clientX:h.clientX,clientY:h.clientY,touchId:h.identifier,isMouse:!1})}function _(l){if(n==="right"||!u.current||u.current.isMouse)return;const h=u.current.activeTouchId,L=ge(l.changedTouches,h);L&&we({refs:g,callbacks:v,currentX:L.clientX,preventDefault:()=>l.preventDefault(),lockPane:I,options:e})}function M(l){if(n==="right"||!u.current||u.current.isMouse)return;const h=u.current.activeTouchId;he(l.changedTouches,h)&&Re({refs:g,callbacks:v,options:e})}function P(){n!=="right"&&(!u.current||u.current.isMouse||fe({refs:g,dragSidebar:v.dragSidebar,onDeactivate:X}))}function A(l){n!=="right"&&(z(l.target)||l.button===0&&(v.getIsOpen()||l.clientX<=e.edgeActivationWidthPx)&&U({refs:g,clientX:l.clientX,clientY:l.clientY,touchId:null,isMouse:!0}))}function C(l){n!=="right"&&(!u.current||!u.current.isMouse||we({refs:g,callbacks:v,currentX:l.clientX,preventDefault:()=>l.preventDefault(),lockPane:I,options:e}))}function x(){n!=="right"&&(!u.current||!u.current.isMouse||Re({refs:g,callbacks:v,options:e}))}return window.addEventListener("touchstart",O,{passive:!0}),window.addEventListener("touchmove",_,{passive:!1}),window.addEventListener("touchend",M,{passive:!0}),window.addEventListener("touchcancel",P,{passive:!0}),window.addEventListener("mousedown",A,{passive:!0}),window.addEventListener("mousemove",C,{passive:!1}),window.addEventListener("mouseup",x,{passive:!0}),()=>{window.removeEventListener("touchstart",O),window.removeEventListener("touchmove",_),window.removeEventListener("touchend",M),window.removeEventListener("touchcancel",P),window.removeEventListener("mousedown",A),window.removeEventListener("mousemove",C),window.removeEventListener("mouseup",x)}},[r,a,i,c,s,n,o,m,e])}function Qe({className:e,children:r,ToggleComponent:n,...o}){if((r==null?void 0:r.type)===p.Fragment)throw new Error("Fragments is not allowed in SwipeBarLeft");const{isLeftOpen:a,closeSidebar:i,leftSidebarRef:c}=D(),s=ve("left",o),m=G(s.mediaQueryWidth);return Ve(s),p.jsxs(p.Fragment,{children:[s.showOverlay&&p.jsx(te,{isCollapsed:!a,setCollapsed:()=>i("left"),transitionMs:s.transitionMs,overlayBackgroundColor:s.overlayBackgroundColor,overlayZIndex:s.overlayZIndex}),p.jsx(me,{options:s,showToggle:s.showToggle,ToggleComponent:n}),p.jsx("div",{ref:c,style:{...le,...s.isAbsolute||m?Ne:{},...e?{}:{backgroundColor:ue},zIndex:s.swipeBarZIndex},className:e,children:r})]})}function Se({options:e,showToggle:r=!0,ToggleComponent:n}){const{openSidebar:o,rightToggleRef:a,isRightOpen:i,closeSidebar:c}=D();return r?p.jsx("div",{ref:a,style:{...de,transition:`transform ${e.transitionMs}ms ease, opacity ${e.transitionMs}ms ease`,right:0,zIndex:e.toggleZIndex},children:(!i||i&&!e.showOverlay)&&p.jsx("button",{type:"button",onClick:()=>i?c("right"):o("right"),style:{marginRight:`${e.toggleIconEdgeDistancePx}px`,...i?{}:{transform:"rotate(180deg)"}},children:n??p.jsx(pe,{size:e.toggleIconSizePx,color:e.toggleIconColor})})}):null}const Ee=({refs:e,callbacks:r,currentX:n,preventDefault:o,lockPane:a,options:i})=>{if(!e.draggingRef.current)return;const c=window.innerWidth,s=n-e.draggingRef.current.startX,m=e.draggingRef.current.startX>=c-i.edgeActivationWidthPx,u=e.draggingRef.current.isActivated;if(!u&&Math.abs(s)>=i.dragActivationDeltaPx&&(e.draggingRef.current.isActivated=!0,a()),!u)return;e.prevXRef.current=e.currentXRef.current,e.currentXRef.current=n;const S=r.getIsOpen();let y=!1;if((S||m)&&(y=!0),!y){e.draggingRef.current=null,r.dragSidebar(null);return}o();const v=i.sidebarWidthPx;if(S){const g=Math.max(0,Math.min(v,s-i.dragActivationDeltaPx));r.dragSidebar(g)}else{const g=Math.max(0,Math.min(v,v+s+i.dragActivationDeltaPx));r.dragSidebar(g)}},be=({refs:e,callbacks:r,options:n})=>{if(!e.draggingRef.current)return;if(!e.draggingRef.current.isActivated){e.draggingRef.current=null,e.currentXRef.current=null,e.prevXRef.current=null;return}const o=e.currentXRef.current??e.draggingRef.current.startX,a=e.prevXRef.current??e.draggingRef.current.startX,i=e.draggingRef.current.startX,c=r.getIsOpen(),s=window.innerWidth;e.draggingRef.current=null,e.currentXRef.current=null,e.prevXRef.current=null;const m=o>a,u=o<a,S=i>=s-n.edgeActivationWidthPx;c?(m?r.closeSidebar():r.openSidebar(),r.dragSidebar(null)):S&&u?(r.openSidebar(),r.dragSidebar(null)):(r.closeSidebar(),r.dragSidebar(null))};function He(e){const r=G(e.mediaQueryWidth),{lockedSidebar:n,setLockedSidebar:o,isRightOpen:a,openSidebar:i,closeSidebar:c,dragSidebar:s,rightSidebarRef:m}=D(),u=f.useRef(null),S=f.useRef(null),y=f.useRef(null);f.useEffect(()=>{if(!r||n==="left")return;const v={getIsOpen:()=>a,openSidebar:()=>i("right"),closeSidebar:()=>c("right"),dragSidebar:l=>s("right",l)},g={draggingRef:u,currentXRef:S,prevXRef:y},I=()=>o("right"),X=()=>o(null);function O(l){if(n==="left"||z(l.target)||l.changedTouches.length===0)return;const h=l.changedTouches[0],L=window.innerWidth;(v.getIsOpen()||h.clientX>=L-e.edgeActivationWidthPx)&&U({refs:g,clientX:h.clientX,clientY:h.clientY,touchId:h.identifier,isMouse:!1})}function _(l){if(n==="left"||!u.current||u.current.isMouse)return;const h=u.current.activeTouchId,L=ge(l.changedTouches,h);L&&Ee({refs:g,callbacks:v,currentX:L.clientX,preventDefault:()=>l.preventDefault(),lockPane:I,options:e})}function M(l){if(n==="left"||!u.current||u.current.isMouse)return;const h=u.current.activeTouchId;he(l.changedTouches,h)&&be({refs:g,callbacks:v,options:e})}function P(){n!=="left"&&(!u.current||u.current.isMouse||fe({refs:g,dragSidebar:v.dragSidebar,onDeactivate:X}))}function A(l){if(n==="left"||z(l.target)||l.button!==0)return;const h=window.innerWidth;(v.getIsOpen()||l.clientX>=h-e.edgeActivationWidthPx)&&U({refs:g,clientX:l.clientX,clientY:l.clientY,touchId:null,isMouse:!0})}function C(l){n!=="left"&&(!u.current||!u.current.isMouse||Ee({refs:g,callbacks:v,currentX:l.clientX,preventDefault:()=>l.preventDefault(),lockPane:I,options:e}))}function x(){n!=="left"&&(!u.current||!u.current.isMouse||be({refs:g,callbacks:v,options:e}))}return window.addEventListener("touchstart",O,{passive:!0}),window.addEventListener("touchmove",_,{passive:!1}),window.addEventListener("touchend",M,{passive:!0}),window.addEventListener("touchcancel",P,{passive:!0}),window.addEventListener("mousedown",A,{passive:!0}),window.addEventListener("mousemove",C,{passive:!1}),window.addEventListener("mouseup",x,{passive:!0}),()=>{window.removeEventListener("touchstart",O),window.removeEventListener("touchmove",_),window.removeEventListener("touchend",M),window.removeEventListener("touchcancel",P),window.removeEventListener("mousedown",A),window.removeEventListener("mousemove",C),window.removeEventListener("mouseup",x)}},[r,a,i,c,s,n,o,m,e])}function Je({className:e,children:r,ToggleComponent:n,...o}){if((r==null?void 0:r.type)===p.Fragment)throw new Error("Fragments is not allowed in SwipeBarRight");const{isRightOpen:a,closeSidebar:i,rightSidebarRef:c}=D(),s=ve("right",o),m=G(s.mediaQueryWidth);return He(s),p.jsxs(p.Fragment,{children:[s.showOverlay&&p.jsx(te,{isCollapsed:!a,setCollapsed:()=>i("right"),transitionMs:s.transitionMs,overlayBackgroundColor:s.overlayBackgroundColor,overlayZIndex:s.overlayZIndex}),p.jsx(Se,{options:s,showToggle:s.showToggle,ToggleComponent:n}),p.jsx("div",{ref:c,style:{...le,...s.isAbsolute||m?Ye:{},...e?{}:{backgroundColor:ue},zIndex:s.swipeBarZIndex},className:e,children:r})]})}T.Overlay=te,T.SwipeBarLeft=Qe,T.SwipeBarProvider=Te,T.SwipeBarRight=Je,T.ToggleLeft=me,T.ToggleRight=Se,T.useMediaQuery=G,T.useSwipeBarContext=D,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})});
22
+ <%s key={someKey} {...props} />`,E,b,Y,b),R[b+E]=!0)}if(b=null,w!==void 0&&(n(w),b=""+w),c(d)&&(n(d.key),b=""+d.key),"key"in d){w={};for(var ie in d)ie!=="key"&&(w[ie]=d[ie])}else w=d;return b&&s(w,typeof t=="function"?t.displayName||t.name||"Unknown":t),u(t,b,w,a(),K,re)}function y(t){v(t)?t._store&&(t._store.validated=1):typeof t=="object"&&t!==null&&t.$$typeof===L&&(t._payload.status==="fulfilled"?v(t._payload.value)&&t._payload.value._store&&(t._payload.value._store.validated=1):t._store&&(t._store.validated=1))}function v(t){return typeof t=="object"&&t!==null&&t.$$typeof===I}var g=f,I=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),P=Symbol.for("react.consumer"),A=Symbol.for("react.context"),X=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),N=Symbol.for("react.client.reference"),k=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=Object.prototype.hasOwnProperty,ne=Array.isArray,U=console.createTask?console.createTask:function(){return null};g={react_stack_bottom_frame:function(t){return t()}};var V,Q={},H=g.react_stack_bottom_frame.bind(g,i)(),J=U(o(i)),R={};F.Fragment=O,F.jsx=function(t,d,w){var E=1e4>k.recentlyCreatedOwnerStacks++;return S(t,d,w,!1,E?Error("react-stack-top-frame"):H,E?U(o(t)):J)},F.jsxs=function(t,d,w){var E=1e4>k.recentlyCreatedOwnerStacks++;return S(t,d,w,!0,E?Error("react-stack-top-frame"):H,E?U(o(t)):J)}}()),F}process.env.NODE_ENV==="production"?q.exports=xe():q.exports=Te();var p=q.exports;const se=f.createContext(null),Oe=({children:e,sidebarWidthPx:r,transitionMs:n,edgeActivationWidthPx:o,dragActivationDeltaPx:a,showOverlay:i,isAbsolute:c,overlayBackgroundColor:s,toggleIconColor:m,toggleIconSizePx:u,toggleIconEdgeDistancePx:S,showToggle:y,mediaQueryWidth:v,swipeBarZIndex:g,toggleZIndex:I,overlayZIndex:C})=>{const[O,_]=f.useState(null),[M,P]=f.useState(!1),[A,X]=f.useState(!1),[x,l]=f.useState({}),[h,L]=f.useState({}),j=f.useRef(null),N=f.useRef(null),k=f.useRef(null),W=f.useRef(null),[ne,U]=f.useState({sidebarWidthPx:r??Pe,transitionMs:n??_e,edgeActivationWidthPx:o??Ae,dragActivationDeltaPx:a??Ie,showOverlay:i??Le,isAbsolute:c??Me,overlayBackgroundColor:s??ce,toggleIconColor:m??Ce,toggleIconSizePx:u??Xe,toggleIconEdgeDistancePx:S??De,showToggle:y??ke,mediaQueryWidth:v??$,swipeBarZIndex:g??We,toggleZIndex:I??je,overlayZIndex:C??Ne}),V=f.useCallback(R=>{U(t=>({...t,...R}))},[]),Q=f.useCallback(R=>{ze({side:R,ref:R==="left"?j:N,options:R==="left"?x:h,toggleRef:R==="left"?k:W,afterApply:()=>{R==="left"?P(!0):X(!0),_(R)}})},[x,h]),H=f.useCallback(R=>{Ve({ref:R==="left"?j:N,options:R==="left"?x:h,toggleRef:R==="left"?k:W,side:R,afterApply:()=>{R==="left"?P(!1):X(!1),_(null)}})},[x,h]),J=f.useCallback((R,t)=>{Qe({ref:R==="left"?j:N,toggleRef:R==="left"?k:W,options:R==="left"?x:h,translateX:t})},[x,h]);return p.jsx(se.Provider,{value:{lockedSidebar:O,setLockedSidebar:_,isLeftOpen:M,isRightOpen:A,leftSidebarRef:j,rightSidebarRef:N,openSidebar:Q,closeSidebar:H,dragSidebar:J,globalOptions:ne,setGlobalOptions:V,leftSidebarOptions:x,rightSidebarOptions:h,setLeftSidebarOptions:l,setRightSidebarOptions:L,leftToggleRef:k,rightToggleRef:W},children:e})},D=()=>{const e=f.useContext(se);if(!e)throw new Error("useSwipeBarContext must be used within SwipeBarProvider");return e},_e=300,Ae=40,Ie=20,Pe=320,Le=!0,Me=!1,ce="rgba(0, 0, 0, 0.5)",ue="rgb(36,36,36)",Ce="white",Xe=40,De=40,ke=!0,$=640,We=30,je=15,Ne=20,le=.6,Ye=200,de={width:0,top:0,bottom:0,flexShrink:0,overflowX:"hidden",willChange:"transform"},Be={position:"fixed",left:0,top:0,bottom:0},Fe={position:"fixed",right:0,top:0,bottom:0},Ge={position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:ce,transitionProperty:"opacity",pointerEvents:"none",opacity:0},Ue={opacity:1,pointerEvents:"auto"},fe={position:"fixed",top:"50%",transform:"translateY(-50%)",width:"1px",display:"flex",justifyContent:"center"},Ze={position:"relative",cursor:"pointer",display:"flex",height:"72px",alignItems:"center",justifyContent:"center"},ee=e=>{var r;return(r=e.current)==null?void 0:r.firstElementChild},ze=({ref:e,side:r,options:n,toggleRef:o,afterApply:a})=>{const i=ee(e),c=n.transitionMs?n.transitionMs*2/3:0;i&&(i.style.opacity="0"),requestAnimationFrame(()=>{!e.current||!i||(e.current.style.transition=`transform ${n.transitionMs}ms ease, width ${n.transitionMs}ms ease`,i.style.transition=`opacity ${c}ms ease`,requestAnimationFrame(()=>{e.current&&(e.current.style.transform="",e.current.style.width=`${n.sidebarWidthPx}px`,o.current&&n.sidebarWidthPx&&(o.current.style.opacity="1",o.current.style.transform=`translateY(-50%) translateX(${r==="left"?n.sidebarWidthPx:-n.sidebarWidthPx}px)`),setTimeout(()=>{i.style.opacity="1"},c),a())}))}),setTimeout(()=>{},0)},Ve=({ref:e,options:r,side:n,toggleRef:o,afterApply:a})=>{const i=ee(e),c=r.transitionMs?r.transitionMs*1/3:0;requestAnimationFrame(()=>{!e.current||!i||(e.current.style.transition=`transform ${r.transitionMs}ms ease, width ${r.transitionMs}ms ease`,i.style.transition=`opacity ${c}ms ease`,requestAnimationFrame(()=>{e.current&&(e.current.style.transform=n==="left"?"translateX(-100%)":"translateX(100%)",e.current.style.width="0px",o.current&&(o.current.style.opacity="1",o.current.style.transform="translateY(-50%)"),i.style.opacity="0",a())}))})},Qe=({ref:e,toggleRef:r,options:n,translateX:o})=>{!e.current||o===null||(e.current.style.transition="none",requestAnimationFrame(()=>{const a=ee(e);if(!e.current||!a)return;a.style.opacity="0";const i=`${n.sidebarWidthPx}px`;e.current.style.width!==i&&(e.current.style.width=i),e.current.style.transform=`translateX(${o}px)`,r.current&&(r.current.style.opacity="0",r.current.style.transform=`translateY(-50%) translateX(${o}px)`)}))},Z=({refs:e,clientX:r,clientY:n,touchId:o,isMouse:a})=>{e.draggingRef.current={startX:r,startY:n,activeTouchId:o,isMouse:a,isActivated:!1},e.currentXRef.current=r,e.prevXRef.current=r},ge=({refs:e,dragSidebar:r,onDeactivate:n})=>{e.draggingRef.current=null,e.currentXRef.current=null,e.prevXRef.current=null,r(null),n()},z=e=>e instanceof Element?!!e.closest("input, textarea, [contenteditable='true']"):!1,he=(e,r)=>{for(let n=0;n<e.length;n++){const o=e[n];if(r==null||o.identifier===r)return o}return null},ve=(e,r)=>{for(let n=0;n<e.length;n++)if(e[n].identifier===r)return!0;return!1},pe=(e,r)=>{const{globalOptions:n,setLeftSidebarOptions:o,setRightSidebarOptions:a}=D(),{sidebarWidthPx:i,transitionMs:c,edgeActivationWidthPx:s,dragActivationDeltaPx:m,showOverlay:u,isAbsolute:S,overlayBackgroundColor:y,toggleIconColor:v,toggleIconSizePx:g,toggleIconEdgeDistancePx:I,showToggle:C,mediaQueryWidth:O,swipeBarZIndex:_,toggleZIndex:M,overlayZIndex:P}=r,A=f.useMemo(()=>({sidebarWidthPx:i??n.sidebarWidthPx,transitionMs:c??n.transitionMs,edgeActivationWidthPx:s??n.edgeActivationWidthPx,dragActivationDeltaPx:m??n.dragActivationDeltaPx,showOverlay:u??n.showOverlay,isAbsolute:S??n.isAbsolute,overlayBackgroundColor:y??n.overlayBackgroundColor,toggleIconColor:v??n.toggleIconColor,toggleIconSizePx:g??n.toggleIconSizePx,toggleIconEdgeDistancePx:I??n.toggleIconEdgeDistancePx,showToggle:C??n.showToggle,mediaQueryWidth:O??n.mediaQueryWidth,swipeBarZIndex:_??n.swipeBarZIndex,toggleZIndex:M??n.toggleZIndex,overlayZIndex:P??n.overlayZIndex}),[i,c,s,m,u,S,y,v,g,I,C,n,O,_,M,P]);return f.useEffect(()=>{e==="left"?o(A):a(A)},[e,A,o,a]),A};function te({isCollapsed:e,setCollapsed:r,closeSidebarOnClick:n=!0,transitionMs:o,overlayBackgroundColor:a,overlayZIndex:i}){return p.jsx("div",{style:{transitionDuration:`${o}ms`,...Ge,...e?{}:Ue,...a?{backgroundColor:a}:{},zIndex:i},onMouseDown:c=>{n&&(c.stopPropagation(),r())}})}function me({size:e,color:r}){const n=f.useRef(null);return f.useEffect(()=>{const o=()=>{n.current&&(n.current.style.opacity="1")},a=()=>{n.current&&(n.current.style.opacity=`${le}`)};n.current&&(n.current.addEventListener("mouseenter",o),n.current.addEventListener("mouseleave",a))},[]),p.jsx("div",{style:{...Ze},children:p.jsxs("svg",{style:{transition:`opacity ${Ye}ms ease`,opacity:`${le}`},ref:n,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:e,children:[p.jsx("g",{strokeWidth:"0"}),p.jsx("g",{strokeLinecap:"round",strokeLinejoin:"round",children:p.jsx("g",{children:p.jsx("path",{clipRule:"evenodd",d:"m9.46967 5.46967c.29289-.29289.76773-.29289 1.06063 0l2.6286 2.62858c.5748.57477 1.0384 1.03835 1.3831 1.44443.355.41812.6278.82432.7818 1.29852.2447.7531.2447 1.5645 0 2.3176-.154.4742-.4268.8804-.7818 1.2985-.3447.4061-.8083.8697-1.3831 1.4444l-2.6286 2.6286c-.2929.2929-.76774.2929-1.06063 0s-.29289-.7677 0-1.0606l2.60593-2.6059c.6027-.6028 1.0225-1.0234 1.3229-1.3773.2947-.3471.4302-.5804.4987-.7912.1469-.4519.1469-.9387 0-1.3906-.0685-.2108-.204-.4441-.4987-.7912-.3004-.3539-.7202-.77451-1.3229-1.37728l-2.60593-2.60589c-.29289-.29289-.29289-.76777 0-1.06066z",fill:r,fillRule:"evenodd"})})})]})})}function we({options:e,showToggle:r=!0,ToggleComponent:n}){const{openSidebar:o,leftToggleRef:a,isLeftOpen:i,closeSidebar:c}=D();return r?p.jsx("div",{ref:a,style:{...fe,transition:`transform ${e.transitionMs}ms ease, opacity ${e.transitionMs}ms ease`,left:0,zIndex:e.toggleZIndex},children:(!i||i&&!e.showOverlay)&&p.jsx("button",{type:"button",onClick:()=>i?c("left"):o("left"),style:{marginLeft:`${e.toggleIconEdgeDistancePx}px`,...i?{transform:"rotate(180deg)"}:{}},children:n??p.jsx(me,{size:e.toggleIconSizePx,color:e.toggleIconColor})})}):null}function G(e=$){const r=`(max-width: ${Math.min(e,$)}px)`,n=()=>typeof window>"u"||typeof window.matchMedia>"u"?!1:window.matchMedia(r).matches,[o,a]=f.useState(n);return f.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia>"u")return;const i=window.matchMedia(r),c=()=>a(i.matches);return c(),i.addEventListener("change",c),()=>i.removeEventListener("change",c)},[r]),o}const Re=({refs:e,callbacks:r,currentX:n,preventDefault:o,lockPane:a,options:i})=>{if(!e.draggingRef.current)return;const c=n-e.draggingRef.current.startX;if(!e.draggingRef.current.isActivated&&Math.abs(c)>=i.dragActivationDeltaPx&&(e.draggingRef.current.isActivated=!0,a()),!e.draggingRef.current.isActivated)return;e.prevXRef.current=e.currentXRef.current,e.currentXRef.current=n;const s=r.getIsOpen();let m=!1;if((s||e.draggingRef.current.startX<=i.edgeActivationWidthPx)&&(m=!0),!m){e.draggingRef.current=null,r.dragSidebar(null);return}o();const u=i.sidebarWidthPx;if(s){const S=Math.min(0,Math.max(-u,c+i.dragActivationDeltaPx));r.dragSidebar(S)}else if(e.draggingRef.current.startX<=i.edgeActivationWidthPx){const S=Math.min(0,Math.max(-u,-u+c-i.dragActivationDeltaPx));r.dragSidebar(S)}},Se=({refs:e,callbacks:r,options:n})=>{if(!e.draggingRef.current)return;if(!e.draggingRef.current.isActivated){e.draggingRef.current=null,e.currentXRef.current=null,e.prevXRef.current=null;return}const o=e.currentXRef.current??e.draggingRef.current.startX,a=e.prevXRef.current??e.draggingRef.current.startX,i=e.draggingRef.current.startX,c=r.getIsOpen();e.draggingRef.current=null,e.currentXRef.current=null,e.prevXRef.current=null;const s=o>=a,m=o<a,u=i<=n.edgeActivationWidthPx;c?(m?r.closeSidebar():r.openSidebar(),r.dragSidebar(null)):u&&s?(r.openSidebar(),r.dragSidebar(null)):(r.closeSidebar(),r.dragSidebar(null))};function He(e){const r=G(e.mediaQueryWidth),{lockedSidebar:n,setLockedSidebar:o,isLeftOpen:a,openSidebar:i,closeSidebar:c,dragSidebar:s,leftSidebarRef:m}=D(),u=f.useRef(null),S=f.useRef(null),y=f.useRef(null);f.useEffect(()=>{if(!r||n==="right")return;const v={getIsOpen:()=>a,openSidebar:()=>i("left"),closeSidebar:()=>c("left"),dragSidebar:l=>s("left",l)},g={draggingRef:u,currentXRef:S,prevXRef:y},I=()=>o("left"),C=()=>o(null);function O(l){if(n==="right"||z(l.target)||l.changedTouches.length===0)return;const h=l.changedTouches[0];(v.getIsOpen()||h.clientX<=e.edgeActivationWidthPx)&&Z({refs:g,clientX:h.clientX,clientY:h.clientY,touchId:h.identifier,isMouse:!1})}function _(l){if(n==="right"||!u.current||u.current.isMouse)return;const h=u.current.activeTouchId,L=he(l.changedTouches,h);L&&Re({refs:g,callbacks:v,currentX:L.clientX,preventDefault:()=>l.preventDefault(),lockPane:I,options:e})}function M(l){if(n==="right"||!u.current||u.current.isMouse)return;const h=u.current.activeTouchId;ve(l.changedTouches,h)&&Se({refs:g,callbacks:v,options:e})}function P(){n!=="right"&&(!u.current||u.current.isMouse||ge({refs:g,dragSidebar:v.dragSidebar,onDeactivate:C}))}function A(l){n!=="right"&&(z(l.target)||l.button===0&&(v.getIsOpen()||l.clientX<=e.edgeActivationWidthPx)&&Z({refs:g,clientX:l.clientX,clientY:l.clientY,touchId:null,isMouse:!0}))}function X(l){n!=="right"&&(!u.current||!u.current.isMouse||Re({refs:g,callbacks:v,currentX:l.clientX,preventDefault:()=>l.preventDefault(),lockPane:I,options:e}))}function x(){n!=="right"&&(!u.current||!u.current.isMouse||Se({refs:g,callbacks:v,options:e}))}return window.addEventListener("touchstart",O,{passive:!0}),window.addEventListener("touchmove",_,{passive:!1}),window.addEventListener("touchend",M,{passive:!0}),window.addEventListener("touchcancel",P,{passive:!0}),window.addEventListener("mousedown",A,{passive:!0}),window.addEventListener("mousemove",X,{passive:!1}),window.addEventListener("mouseup",x,{passive:!0}),()=>{window.removeEventListener("touchstart",O),window.removeEventListener("touchmove",_),window.removeEventListener("touchend",M),window.removeEventListener("touchcancel",P),window.removeEventListener("mousedown",A),window.removeEventListener("mousemove",X),window.removeEventListener("mouseup",x)}},[r,a,i,c,s,n,o,m,e])}function Je({className:e,children:r,ToggleComponent:n,...o}){if((r==null?void 0:r.type)===p.Fragment)throw new Error("Fragments is not allowed in SwipeBarLeft");const{isLeftOpen:a,closeSidebar:i,leftSidebarRef:c}=D(),s=pe("left",o),m=G(s.mediaQueryWidth);return He(s),p.jsxs(p.Fragment,{children:[s.showOverlay&&p.jsx(te,{isCollapsed:!a,setCollapsed:()=>i("left"),transitionMs:s.transitionMs,overlayBackgroundColor:s.overlayBackgroundColor,overlayZIndex:s.overlayZIndex}),p.jsx(we,{options:s,showToggle:s.showToggle,ToggleComponent:n}),p.jsx("div",{ref:c,style:{...de,...s.isAbsolute||m?Be:{},...e?{}:{backgroundColor:ue},zIndex:s.swipeBarZIndex},className:e,children:r})]})}function Ee({options:e,showToggle:r=!0,ToggleComponent:n}){const{openSidebar:o,rightToggleRef:a,isRightOpen:i,closeSidebar:c}=D();return r?p.jsx("div",{ref:a,style:{...fe,transition:`transform ${e.transitionMs}ms ease, opacity ${e.transitionMs}ms ease`,right:0,zIndex:e.toggleZIndex},children:(!i||i&&!e.showOverlay)&&p.jsx("button",{type:"button",onClick:()=>i?c("right"):o("right"),style:{marginRight:`${e.toggleIconEdgeDistancePx}px`,...i?{}:{transform:"rotate(180deg)"}},children:n??p.jsx(me,{size:e.toggleIconSizePx,color:e.toggleIconColor})})}):null}const be=({refs:e,callbacks:r,currentX:n,preventDefault:o,lockPane:a,options:i})=>{if(!e.draggingRef.current)return;const c=window.innerWidth,s=n-e.draggingRef.current.startX,m=e.draggingRef.current.startX>=c-i.edgeActivationWidthPx,u=e.draggingRef.current.isActivated;if(!u&&Math.abs(s)>=i.dragActivationDeltaPx&&(e.draggingRef.current.isActivated=!0,a()),!u)return;e.prevXRef.current=e.currentXRef.current,e.currentXRef.current=n;const S=r.getIsOpen();let y=!1;if((S||m)&&(y=!0),!y){e.draggingRef.current=null,r.dragSidebar(null);return}o();const v=i.sidebarWidthPx;if(S){const g=Math.max(0,Math.min(v,s-i.dragActivationDeltaPx));r.dragSidebar(g)}else{const g=Math.max(0,Math.min(v,v+s+i.dragActivationDeltaPx));r.dragSidebar(g)}},ye=({refs:e,callbacks:r,options:n})=>{if(!e.draggingRef.current)return;if(!e.draggingRef.current.isActivated){e.draggingRef.current=null,e.currentXRef.current=null,e.prevXRef.current=null;return}const o=e.currentXRef.current??e.draggingRef.current.startX,a=e.prevXRef.current??e.draggingRef.current.startX,i=e.draggingRef.current.startX,c=r.getIsOpen(),s=window.innerWidth;e.draggingRef.current=null,e.currentXRef.current=null,e.prevXRef.current=null;const m=o>a,u=o<a,S=i>=s-n.edgeActivationWidthPx;c?(m?r.closeSidebar():r.openSidebar(),r.dragSidebar(null)):S&&u?(r.openSidebar(),r.dragSidebar(null)):(r.closeSidebar(),r.dragSidebar(null))};function Ke(e){const r=G(e.mediaQueryWidth),{lockedSidebar:n,setLockedSidebar:o,isRightOpen:a,openSidebar:i,closeSidebar:c,dragSidebar:s,rightSidebarRef:m}=D(),u=f.useRef(null),S=f.useRef(null),y=f.useRef(null);f.useEffect(()=>{if(!r||n==="left")return;const v={getIsOpen:()=>a,openSidebar:()=>i("right"),closeSidebar:()=>c("right"),dragSidebar:l=>s("right",l)},g={draggingRef:u,currentXRef:S,prevXRef:y},I=()=>o("right"),C=()=>o(null);function O(l){if(n==="left"||z(l.target)||l.changedTouches.length===0)return;const h=l.changedTouches[0],L=window.innerWidth;(v.getIsOpen()||h.clientX>=L-e.edgeActivationWidthPx)&&Z({refs:g,clientX:h.clientX,clientY:h.clientY,touchId:h.identifier,isMouse:!1})}function _(l){if(n==="left"||!u.current||u.current.isMouse)return;const h=u.current.activeTouchId,L=he(l.changedTouches,h);L&&be({refs:g,callbacks:v,currentX:L.clientX,preventDefault:()=>l.preventDefault(),lockPane:I,options:e})}function M(l){if(n==="left"||!u.current||u.current.isMouse)return;const h=u.current.activeTouchId;ve(l.changedTouches,h)&&ye({refs:g,callbacks:v,options:e})}function P(){n!=="left"&&(!u.current||u.current.isMouse||ge({refs:g,dragSidebar:v.dragSidebar,onDeactivate:C}))}function A(l){if(n==="left"||z(l.target)||l.button!==0)return;const h=window.innerWidth;(v.getIsOpen()||l.clientX>=h-e.edgeActivationWidthPx)&&Z({refs:g,clientX:l.clientX,clientY:l.clientY,touchId:null,isMouse:!0})}function X(l){n!=="left"&&(!u.current||!u.current.isMouse||be({refs:g,callbacks:v,currentX:l.clientX,preventDefault:()=>l.preventDefault(),lockPane:I,options:e}))}function x(){n!=="left"&&(!u.current||!u.current.isMouse||ye({refs:g,callbacks:v,options:e}))}return window.addEventListener("touchstart",O,{passive:!0}),window.addEventListener("touchmove",_,{passive:!1}),window.addEventListener("touchend",M,{passive:!0}),window.addEventListener("touchcancel",P,{passive:!0}),window.addEventListener("mousedown",A,{passive:!0}),window.addEventListener("mousemove",X,{passive:!1}),window.addEventListener("mouseup",x,{passive:!0}),()=>{window.removeEventListener("touchstart",O),window.removeEventListener("touchmove",_),window.removeEventListener("touchend",M),window.removeEventListener("touchcancel",P),window.removeEventListener("mousedown",A),window.removeEventListener("mousemove",X),window.removeEventListener("mouseup",x)}},[r,a,i,c,s,n,o,m,e])}function qe({className:e,children:r,ToggleComponent:n,...o}){if((r==null?void 0:r.type)===p.Fragment)throw new Error("Fragments is not allowed in SwipeBarRight");const{isRightOpen:a,closeSidebar:i,rightSidebarRef:c}=D(),s=pe("right",o),m=G(s.mediaQueryWidth);return Ke(s),p.jsxs(p.Fragment,{children:[s.showOverlay&&p.jsx(te,{isCollapsed:!a,setCollapsed:()=>i("right"),transitionMs:s.transitionMs,overlayBackgroundColor:s.overlayBackgroundColor,overlayZIndex:s.overlayZIndex}),p.jsx(Ee,{options:s,showToggle:s.showToggle,ToggleComponent:n}),p.jsx("div",{ref:c,style:{...de,...s.isAbsolute||m?Fe:{},...e?{}:{backgroundColor:ue},zIndex:s.swipeBarZIndex},className:e,children:r})]})}T.Overlay=te,T.SwipeBarLeft=Je,T.SwipeBarProvider=Oe,T.SwipeBarRight=qe,T.ToggleLeft=we,T.ToggleRight=Ee,T.useMediaQuery=G,T.useSwipeBarContext=D,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})});
@@ -62,6 +62,8 @@ export declare const LATENCY_OPACITY_TRANSITION_MS = 100;
62
62
  export declare const DEFAULT_SWIPEBAR_Z_INDEX = 30;
63
63
  export declare const DEFAULT_TOGGLE_Z_INDEX = 15;
64
64
  export declare const DEFAULT_OVERLAY_Z_INDEX = 20;
65
+ export declare const DEFAULT_TOGGLE_ICON_OPACITY = 0.6;
66
+ export declare const DEFAULT_TOGGLE_ICON_OPACITY_TRANSITION_MS = 200;
65
67
  export declare const swipeBarStyle: {
66
68
  width: number;
67
69
  top: number;
@@ -1 +1 @@
1
- {"version":3,"file":"swipeSidebarShared.d.ts","sourceRoot":"","sources":["../src/swipeSidebarShared.ts"],"names":[],"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,WAAW,EAAE,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACjD,YAAY,EAAE,MAAM,IAAI,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,qCAAqC,iBAAiB,SAMtF,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,IAAI,WAAW,GAAG,IAAI,KAAG,OAIzD,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAC5B,gBAAgB,SAAS,EACzB,WAAW,MAAM,GAAG,IAAI,KACtB,KAAK,GAAG,IAQV,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAChC,gBAAgB,SAAS,EACzB,WAAW,MAAM,GAAG,IAAI,KACtB,OAOF,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,MAAM,YAAY,EAAE,SAAS,gBAAgB;;;;;;;;;;;;;;;;CAmEhF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luciodale/swipe-bar",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "author": "Lucio D'Alessandro",
5
5
  "repository": {
6
6
  "type": "git",