@luciodale/swipe-bar 1.3.2 → 1.3.4
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/SwipeBarProvider.d.ts.map +1 -1
- package/dist/ToggleBottom.d.ts.map +1 -1
- package/dist/ToggleLeft.d.ts.map +1 -1
- package/dist/ToggleRight.d.ts.map +1 -1
- package/dist/components/Overlay.d.ts.map +1 -1
- package/dist/components/SwipeBarBottom.d.ts +1 -1
- package/dist/components/SwipeBarBottom.d.ts.map +1 -1
- package/dist/components/SwipeBarLeft.d.ts +1 -1
- package/dist/components/SwipeBarLeft.d.ts.map +1 -1
- package/dist/components/SwipeBarRight.d.ts +1 -1
- package/dist/components/SwipeBarRight.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/swipe-bar.es.js +923 -826
- package/dist/swipe-bar.umd.js +4 -4
- package/dist/swipeSidebarShared.d.ts +1 -0
- package/dist/swipeSidebarShared.d.ts.map +1 -1
- package/dist/useFocusTrap.d.ts +12 -0
- package/dist/useFocusTrap.d.ts.map +1 -0
- package/dist/useSwipeBarContext.d.ts.map +1 -1
- package/dist/useSwipeBottomSidebar.d.ts.map +1 -1
- package/dist/useSwipeLeftSidebar.d.ts.map +1 -1
- package/dist/useSwipeRightSidebar.d.ts.map +1 -1
- package/package.json +5 -2
package/dist/swipe-bar.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Rt, { createContext as Tt, useState as Q, useRef as _, useMemo as Ke, useCallback as Y, useEffect as G, useContext as Et } from "react";
|
|
2
2
|
var Re = { exports: {} }, me = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
@@ -9,29 +9,29 @@ var Re = { exports: {} }, me = {};
|
|
|
9
9
|
* This source code is licensed under the MIT license found in the
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
11
|
*/
|
|
12
|
-
var
|
|
12
|
+
var Be;
|
|
13
13
|
function Ot() {
|
|
14
|
-
if (
|
|
15
|
-
|
|
14
|
+
if (Be) return me;
|
|
15
|
+
Be = 1;
|
|
16
16
|
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
17
|
-
function r(i,
|
|
18
|
-
var
|
|
19
|
-
if (o !== void 0 && (
|
|
17
|
+
function r(i, c, o) {
|
|
18
|
+
var u = null;
|
|
19
|
+
if (o !== void 0 && (u = "" + o), c.key !== void 0 && (u = "" + c.key), "key" in c) {
|
|
20
20
|
o = {};
|
|
21
|
-
for (var
|
|
22
|
-
|
|
23
|
-
} else o =
|
|
24
|
-
return
|
|
21
|
+
for (var f in c)
|
|
22
|
+
f !== "key" && (o[f] = c[f]);
|
|
23
|
+
} else o = c;
|
|
24
|
+
return c = o.ref, {
|
|
25
25
|
$$typeof: e,
|
|
26
26
|
type: i,
|
|
27
|
-
key:
|
|
28
|
-
ref:
|
|
27
|
+
key: u,
|
|
28
|
+
ref: c !== void 0 ? c : null,
|
|
29
29
|
props: o
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
return me.Fragment = t, me.jsx = r, me.jsxs = r, me;
|
|
33
33
|
}
|
|
34
|
-
var
|
|
34
|
+
var be = {};
|
|
35
35
|
/**
|
|
36
36
|
* @license React
|
|
37
37
|
* react-jsx-runtime.development.js
|
|
@@ -42,25 +42,25 @@ var ve = {};
|
|
|
42
42
|
* LICENSE file in the root directory of this source tree.
|
|
43
43
|
*/
|
|
44
44
|
var We;
|
|
45
|
-
function
|
|
45
|
+
function At() {
|
|
46
46
|
return We || (We = 1, process.env.NODE_ENV !== "production" && function() {
|
|
47
47
|
function e(n) {
|
|
48
48
|
if (n == null) return null;
|
|
49
49
|
if (typeof n == "function")
|
|
50
|
-
return n.$$typeof ===
|
|
50
|
+
return n.$$typeof === q ? null : n.displayName || n.name || null;
|
|
51
51
|
if (typeof n == "string") return n;
|
|
52
52
|
switch (n) {
|
|
53
|
-
case
|
|
53
|
+
case P:
|
|
54
54
|
return "Fragment";
|
|
55
|
-
case
|
|
55
|
+
case I:
|
|
56
56
|
return "Profiler";
|
|
57
|
-
case
|
|
57
|
+
case L:
|
|
58
58
|
return "StrictMode";
|
|
59
59
|
case k:
|
|
60
60
|
return "Suspense";
|
|
61
61
|
case v:
|
|
62
62
|
return "SuspenseList";
|
|
63
|
-
case
|
|
63
|
+
case M:
|
|
64
64
|
return "Activity";
|
|
65
65
|
}
|
|
66
66
|
if (typeof n == "object")
|
|
@@ -71,17 +71,17 @@ function Et() {
|
|
|
71
71
|
return "Portal";
|
|
72
72
|
case j:
|
|
73
73
|
return n.displayName || "Context";
|
|
74
|
-
case Y:
|
|
75
|
-
return (n._context.displayName || "Context") + ".Consumer";
|
|
76
74
|
case $:
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
return
|
|
81
|
-
case
|
|
82
|
-
|
|
75
|
+
return (n._context.displayName || "Context") + ".Consumer";
|
|
76
|
+
case B:
|
|
77
|
+
var m = n.render;
|
|
78
|
+
return n = n.displayName, n || (n = m.displayName || m.name || "", n = n !== "" ? "ForwardRef(" + n + ")" : "ForwardRef"), n;
|
|
79
|
+
case x:
|
|
80
|
+
return m = n.displayName || null, m !== null ? m : e(n.type) || "Memo";
|
|
81
|
+
case E:
|
|
82
|
+
m = n._payload, n = n._init;
|
|
83
83
|
try {
|
|
84
|
-
return e(n(
|
|
84
|
+
return e(n(m));
|
|
85
85
|
} catch {
|
|
86
86
|
}
|
|
87
87
|
}
|
|
@@ -93,74 +93,74 @@ function Et() {
|
|
|
93
93
|
function r(n) {
|
|
94
94
|
try {
|
|
95
95
|
t(n);
|
|
96
|
-
var
|
|
96
|
+
var m = !1;
|
|
97
97
|
} catch {
|
|
98
|
-
|
|
98
|
+
m = !0;
|
|
99
99
|
}
|
|
100
|
-
if (
|
|
101
|
-
|
|
102
|
-
var
|
|
103
|
-
return
|
|
104
|
-
|
|
100
|
+
if (m) {
|
|
101
|
+
m = console;
|
|
102
|
+
var T = m.error, R = typeof Symbol == "function" && Symbol.toStringTag && n[Symbol.toStringTag] || n.constructor.name || "Object";
|
|
103
|
+
return T.call(
|
|
104
|
+
m,
|
|
105
105
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
106
|
-
|
|
106
|
+
R
|
|
107
107
|
), t(n);
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
function i(n) {
|
|
111
|
-
if (n ===
|
|
112
|
-
if (typeof n == "object" && n !== null && n.$$typeof ===
|
|
111
|
+
if (n === P) return "<>";
|
|
112
|
+
if (typeof n == "object" && n !== null && n.$$typeof === E)
|
|
113
113
|
return "<...>";
|
|
114
114
|
try {
|
|
115
|
-
var
|
|
116
|
-
return
|
|
115
|
+
var m = e(n);
|
|
116
|
+
return m ? "<" + m + ">" : "<...>";
|
|
117
117
|
} catch {
|
|
118
118
|
return "<...>";
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
|
-
function
|
|
121
|
+
function c() {
|
|
122
122
|
var n = D.A;
|
|
123
123
|
return n === null ? null : n.getOwner();
|
|
124
124
|
}
|
|
125
125
|
function o() {
|
|
126
126
|
return Error("react-stack-top-frame");
|
|
127
127
|
}
|
|
128
|
-
function
|
|
129
|
-
if (
|
|
130
|
-
var
|
|
131
|
-
if (
|
|
128
|
+
function u(n) {
|
|
129
|
+
if (V.call(n, "key")) {
|
|
130
|
+
var m = Object.getOwnPropertyDescriptor(n, "key").get;
|
|
131
|
+
if (m && m.isReactWarning) return !1;
|
|
132
132
|
}
|
|
133
133
|
return n.key !== void 0;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
function
|
|
137
|
-
|
|
135
|
+
function f(n, m) {
|
|
136
|
+
function T() {
|
|
137
|
+
N || (N = !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
|
+
m
|
|
140
140
|
));
|
|
141
141
|
}
|
|
142
|
-
|
|
143
|
-
get:
|
|
142
|
+
T.isReactWarning = !0, Object.defineProperty(n, "key", {
|
|
143
|
+
get: T,
|
|
144
144
|
configurable: !0
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function l() {
|
|
148
148
|
var n = e(this.type);
|
|
149
|
-
return
|
|
149
|
+
return Z[n] || (Z[n] = !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
|
)), n = this.props.ref, n !== void 0 ? n : null;
|
|
152
152
|
}
|
|
153
|
-
function
|
|
154
|
-
var X =
|
|
153
|
+
function s(n, m, T, R, z, F) {
|
|
154
|
+
var X = T.ref;
|
|
155
155
|
return n = {
|
|
156
|
-
$$typeof:
|
|
156
|
+
$$typeof: C,
|
|
157
157
|
type: n,
|
|
158
|
-
key:
|
|
159
|
-
props:
|
|
160
|
-
_owner:
|
|
158
|
+
key: m,
|
|
159
|
+
props: T,
|
|
160
|
+
_owner: R
|
|
161
161
|
}, (X !== void 0 ? X : null) !== null ? Object.defineProperty(n, "ref", {
|
|
162
162
|
enumerable: !1,
|
|
163
|
-
get:
|
|
163
|
+
get: l
|
|
164
164
|
}) : Object.defineProperty(n, "ref", { enumerable: !1, value: null }), n._store = {}, Object.defineProperty(n._store, "validated", {
|
|
165
165
|
configurable: !1,
|
|
166
166
|
enumerable: !1,
|
|
@@ -175,69 +175,69 @@ function Et() {
|
|
|
175
175
|
configurable: !1,
|
|
176
176
|
enumerable: !1,
|
|
177
177
|
writable: !0,
|
|
178
|
-
value:
|
|
178
|
+
value: z
|
|
179
179
|
}), Object.defineProperty(n, "_debugTask", {
|
|
180
180
|
configurable: !1,
|
|
181
181
|
enumerable: !1,
|
|
182
182
|
writable: !0,
|
|
183
|
-
value:
|
|
183
|
+
value: F
|
|
184
184
|
}), Object.freeze && (Object.freeze(n.props), Object.freeze(n)), n;
|
|
185
185
|
}
|
|
186
|
-
function
|
|
187
|
-
var X =
|
|
186
|
+
function w(n, m, T, R, z, F) {
|
|
187
|
+
var X = m.children;
|
|
188
188
|
if (X !== void 0)
|
|
189
|
-
if (
|
|
190
|
-
if (
|
|
191
|
-
for (
|
|
192
|
-
|
|
189
|
+
if (R)
|
|
190
|
+
if (U(X)) {
|
|
191
|
+
for (R = 0; R < X.length; R++)
|
|
192
|
+
y(X[R]);
|
|
193
193
|
Object.freeze && Object.freeze(X);
|
|
194
194
|
} else
|
|
195
195
|
console.error(
|
|
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
|
-
else
|
|
199
|
-
if (
|
|
198
|
+
else y(X);
|
|
199
|
+
if (V.call(m, "key")) {
|
|
200
200
|
X = e(n);
|
|
201
|
-
var J = Object.keys(
|
|
202
|
-
return
|
|
201
|
+
var J = Object.keys(m).filter(function(Se) {
|
|
202
|
+
return Se !== "key";
|
|
203
203
|
});
|
|
204
|
-
|
|
204
|
+
R = 0 < J.length ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}", ae[X + R] || (J = 0 < J.length ? "{" + J.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
205
205
|
`A props object containing a "key" prop is being spread into JSX:
|
|
206
206
|
let props = %s;
|
|
207
207
|
<%s {...props} />
|
|
208
208
|
React keys must be passed directly to JSX without using spread:
|
|
209
209
|
let props = %s;
|
|
210
210
|
<%s key={someKey} {...props} />`,
|
|
211
|
-
|
|
211
|
+
R,
|
|
212
212
|
X,
|
|
213
213
|
J,
|
|
214
214
|
X
|
|
215
|
-
), ae[X +
|
|
215
|
+
), ae[X + R] = !0);
|
|
216
216
|
}
|
|
217
|
-
if (X = null,
|
|
218
|
-
|
|
219
|
-
for (var ge in
|
|
220
|
-
ge !== "key" && (
|
|
221
|
-
} else
|
|
222
|
-
return X &&
|
|
223
|
-
|
|
217
|
+
if (X = null, T !== void 0 && (r(T), X = "" + T), u(m) && (r(m.key), X = "" + m.key), "key" in m) {
|
|
218
|
+
T = {};
|
|
219
|
+
for (var ge in m)
|
|
220
|
+
ge !== "key" && (T[ge] = m[ge]);
|
|
221
|
+
} else T = m;
|
|
222
|
+
return X && f(
|
|
223
|
+
T,
|
|
224
224
|
typeof n == "function" ? n.displayName || n.name || "Unknown" : n
|
|
225
|
-
),
|
|
225
|
+
), s(
|
|
226
226
|
n,
|
|
227
227
|
X,
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
228
|
+
T,
|
|
229
|
+
c(),
|
|
230
|
+
z,
|
|
231
|
+
F
|
|
232
232
|
);
|
|
233
233
|
}
|
|
234
|
-
function
|
|
235
|
-
|
|
234
|
+
function y(n) {
|
|
235
|
+
h(n) ? n._store && (n._store.validated = 1) : typeof n == "object" && n !== null && n.$$typeof === E && (n._payload.status === "fulfilled" ? h(n._payload.value) && n._payload.value._store && (n._payload.value._store.validated = 1) : n._store && (n._store.validated = 1));
|
|
236
236
|
}
|
|
237
|
-
function
|
|
238
|
-
return typeof n == "object" && n !== null && n.$$typeof ===
|
|
237
|
+
function h(n) {
|
|
238
|
+
return typeof n == "object" && n !== null && n.$$typeof === C;
|
|
239
239
|
}
|
|
240
|
-
var S =
|
|
240
|
+
var S = Rt, C = Symbol.for("react.transitional.element"), p = Symbol.for("react.portal"), P = Symbol.for("react.fragment"), L = Symbol.for("react.strict_mode"), I = Symbol.for("react.profiler"), $ = Symbol.for("react.consumer"), j = Symbol.for("react.context"), B = Symbol.for("react.forward_ref"), k = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), x = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), M = Symbol.for("react.activity"), q = Symbol.for("react.client.reference"), D = S.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, V = Object.prototype.hasOwnProperty, U = Array.isArray, H = console.createTask ? console.createTask : function() {
|
|
241
241
|
return null;
|
|
242
242
|
};
|
|
243
243
|
S = {
|
|
@@ -245,164 +245,164 @@ React keys must be passed directly to JSX without using spread:
|
|
|
245
245
|
return n();
|
|
246
246
|
}
|
|
247
247
|
};
|
|
248
|
-
var
|
|
248
|
+
var N, Z = {}, oe = S.react_stack_bottom_frame.bind(
|
|
249
249
|
S,
|
|
250
250
|
o
|
|
251
251
|
)(), ne = H(i(o)), ae = {};
|
|
252
|
-
|
|
253
|
-
var
|
|
254
|
-
return
|
|
252
|
+
be.Fragment = P, be.jsx = function(n, m, T) {
|
|
253
|
+
var R = 1e4 > D.recentlyCreatedOwnerStacks++;
|
|
254
|
+
return w(
|
|
255
255
|
n,
|
|
256
|
-
|
|
257
|
-
|
|
256
|
+
m,
|
|
257
|
+
T,
|
|
258
258
|
!1,
|
|
259
|
-
|
|
260
|
-
|
|
259
|
+
R ? Error("react-stack-top-frame") : oe,
|
|
260
|
+
R ? H(i(n)) : ne
|
|
261
261
|
);
|
|
262
|
-
},
|
|
263
|
-
var
|
|
264
|
-
return
|
|
262
|
+
}, be.jsxs = function(n, m, T) {
|
|
263
|
+
var R = 1e4 > D.recentlyCreatedOwnerStacks++;
|
|
264
|
+
return w(
|
|
265
265
|
n,
|
|
266
|
-
|
|
267
|
-
|
|
266
|
+
m,
|
|
267
|
+
T,
|
|
268
268
|
!0,
|
|
269
|
-
|
|
270
|
-
|
|
269
|
+
R ? Error("react-stack-top-frame") : oe,
|
|
270
|
+
R ? H(i(n)) : ne
|
|
271
271
|
);
|
|
272
272
|
};
|
|
273
|
-
}()),
|
|
273
|
+
}()), be;
|
|
274
274
|
}
|
|
275
|
-
process.env.NODE_ENV === "production" ? Re.exports = Ot() : Re.exports =
|
|
276
|
-
var
|
|
277
|
-
const
|
|
275
|
+
process.env.NODE_ENV === "production" ? Re.exports = Ot() : Re.exports = At();
|
|
276
|
+
var O = Re.exports;
|
|
277
|
+
const et = Tt(null), ye = (e) => {
|
|
278
278
|
throw new Error(`Unhandled sidebar side: ${e}`);
|
|
279
279
|
}, we = {
|
|
280
280
|
isOpen: !1,
|
|
281
281
|
anchorState: "closed",
|
|
282
282
|
meta: null
|
|
283
|
-
},
|
|
283
|
+
}, vr = ({
|
|
284
284
|
children: e,
|
|
285
285
|
sidebarWidthPx: t,
|
|
286
286
|
transitionMs: r,
|
|
287
287
|
edgeActivationWidthPx: i,
|
|
288
|
-
dragActivationDeltaPx:
|
|
288
|
+
dragActivationDeltaPx: c,
|
|
289
289
|
showOverlay: o,
|
|
290
|
-
isAbsolute:
|
|
291
|
-
overlayBackgroundColor:
|
|
292
|
-
toggleIconColor:
|
|
293
|
-
toggleIconSizePx:
|
|
294
|
-
toggleIconEdgeDistancePx:
|
|
295
|
-
showToggle:
|
|
296
|
-
mediaQueryWidth:
|
|
290
|
+
isAbsolute: u,
|
|
291
|
+
overlayBackgroundColor: f,
|
|
292
|
+
toggleIconColor: l,
|
|
293
|
+
toggleIconSizePx: s,
|
|
294
|
+
toggleIconEdgeDistancePx: w,
|
|
295
|
+
showToggle: y,
|
|
296
|
+
mediaQueryWidth: h,
|
|
297
297
|
swipeBarZIndex: S,
|
|
298
|
-
toggleZIndex:
|
|
298
|
+
toggleZIndex: C,
|
|
299
299
|
overlayZIndex: p,
|
|
300
|
-
fadeContent:
|
|
301
|
-
fadeContentTransitionMs:
|
|
302
|
-
closeSidebarOnOverlayClick:
|
|
303
|
-
resetMetaOnClose:
|
|
300
|
+
fadeContent: P,
|
|
301
|
+
fadeContentTransitionMs: L,
|
|
302
|
+
closeSidebarOnOverlayClick: I,
|
|
303
|
+
resetMetaOnClose: $
|
|
304
304
|
}) => {
|
|
305
|
-
var
|
|
306
|
-
const [j,
|
|
307
|
-
() => Object.values(
|
|
308
|
-
[
|
|
309
|
-
), ce =
|
|
305
|
+
var Xe, Ye;
|
|
306
|
+
const [j, B] = Q(null), [k, v] = Q(!1), [x, E] = Q(!1), [M, q] = Q({}), [D, V] = Q({}), U = _(null), H = _(null), N = _(null), Z = _(null), [oe, ne] = Q(null), [ae, n] = Q(null), [m, T] = Q({}), [R, z] = Q({}), F = _(/* @__PURE__ */ new Map()), X = _(null), J = _([]), ge = ((Xe = m.primary) == null ? void 0 : Xe.isOpen) ?? !1, Se = ((Ye = m.primary) == null ? void 0 : Ye.anchorState) ?? "closed", Le = Ke(
|
|
307
|
+
() => Object.values(m).some((d) => d.isOpen),
|
|
308
|
+
[m]
|
|
309
|
+
), ce = F.current.get("primary"), ot = (ce == null ? void 0 : ce.sidebarRef) ?? { current: null }, at = (ce == null ? void 0 : ce.toggleRef) ?? { current: null }, st = R.primary ?? {}, [ct, lt] = Q({
|
|
310
310
|
sidebarWidthPx: t ?? It,
|
|
311
|
-
sidebarHeightPx:
|
|
312
|
-
transitionMs: r ??
|
|
313
|
-
edgeActivationWidthPx: i ??
|
|
314
|
-
dragActivationDeltaPx:
|
|
315
|
-
showOverlay: o ??
|
|
316
|
-
isAbsolute:
|
|
317
|
-
overlayBackgroundColor:
|
|
318
|
-
toggleIconColor:
|
|
319
|
-
toggleIconSizePx:
|
|
320
|
-
toggleIconEdgeDistancePx:
|
|
321
|
-
showToggle:
|
|
322
|
-
mediaQueryWidth:
|
|
311
|
+
sidebarHeightPx: je,
|
|
312
|
+
transitionMs: r ?? Pt,
|
|
313
|
+
edgeActivationWidthPx: i ?? Mt,
|
|
314
|
+
dragActivationDeltaPx: c ?? Ct,
|
|
315
|
+
showOverlay: o ?? _t,
|
|
316
|
+
isAbsolute: u ?? Dt,
|
|
317
|
+
overlayBackgroundColor: f ?? tt,
|
|
318
|
+
toggleIconColor: l ?? Xt,
|
|
319
|
+
toggleIconSizePx: s ?? Yt,
|
|
320
|
+
toggleIconEdgeDistancePx: w ?? $t,
|
|
321
|
+
showToggle: y ?? Bt,
|
|
322
|
+
mediaQueryWidth: h ?? Te,
|
|
323
323
|
swipeBarZIndex: S ?? Wt,
|
|
324
|
-
toggleZIndex:
|
|
325
|
-
overlayZIndex: p ??
|
|
326
|
-
fadeContent:
|
|
327
|
-
fadeContentTransitionMs:
|
|
328
|
-
swipeToOpen:
|
|
329
|
-
swipeToClose:
|
|
330
|
-
midAnchorPoint:
|
|
331
|
-
midAnchorPointPx:
|
|
324
|
+
toggleZIndex: C ?? jt,
|
|
325
|
+
overlayZIndex: p ?? kt,
|
|
326
|
+
fadeContent: P ?? Ht,
|
|
327
|
+
fadeContentTransitionMs: L ?? Nt,
|
|
328
|
+
swipeToOpen: Gt,
|
|
329
|
+
swipeToClose: Ut,
|
|
330
|
+
midAnchorPoint: Zt,
|
|
331
|
+
midAnchorPointPx: je / 3,
|
|
332
332
|
disabled: !1,
|
|
333
|
-
closeSidebarOnOverlayClick:
|
|
334
|
-
resetMetaOnClose:
|
|
335
|
-
}),
|
|
336
|
-
|
|
337
|
-
}, []),
|
|
338
|
-
|
|
333
|
+
closeSidebarOnOverlayClick: I ?? Lt,
|
|
334
|
+
resetMetaOnClose: $ ?? !1
|
|
335
|
+
}), ut = Y((d, a) => {
|
|
336
|
+
F.current.set(d, a), T((g) => g[d] ? g : { ...g, [d]: { ...we } });
|
|
337
|
+
}, []), dt = Y((d) => {
|
|
338
|
+
F.current.delete(d), T((a) => {
|
|
339
339
|
const g = { ...a };
|
|
340
|
-
return delete g[
|
|
341
|
-
}),
|
|
340
|
+
return delete g[d], g;
|
|
341
|
+
}), z((a) => {
|
|
342
342
|
const g = { ...a };
|
|
343
|
-
return delete g[
|
|
343
|
+
return delete g[d], g;
|
|
344
344
|
});
|
|
345
|
-
}, []),
|
|
346
|
-
(
|
|
347
|
-
|
|
345
|
+
}, []), ft = Y((d) => F.current.get(d), []), gt = Y(
|
|
346
|
+
(d, a) => {
|
|
347
|
+
z((g) => g[d] === a ? g : { ...g, [d]: a });
|
|
348
348
|
},
|
|
349
349
|
[]
|
|
350
|
-
), te =
|
|
351
|
-
|
|
352
|
-
const
|
|
353
|
-
return
|
|
350
|
+
), te = Y((d, a) => {
|
|
351
|
+
T((g) => {
|
|
352
|
+
const b = g[d] ?? we;
|
|
353
|
+
return b.isOpen === a ? g : { ...g, [d]: { ...b, isOpen: a } };
|
|
354
354
|
});
|
|
355
|
-
}, []), re =
|
|
356
|
-
(
|
|
357
|
-
|
|
358
|
-
const
|
|
359
|
-
return
|
|
355
|
+
}, []), re = Y(
|
|
356
|
+
(d, a) => {
|
|
357
|
+
T((g) => {
|
|
358
|
+
const b = g[d] ?? we;
|
|
359
|
+
return b.anchorState === a ? g : { ...g, [d]: { ...b, anchorState: a } };
|
|
360
360
|
});
|
|
361
361
|
},
|
|
362
362
|
[]
|
|
363
|
-
), he =
|
|
364
|
-
|
|
365
|
-
const
|
|
366
|
-
return
|
|
363
|
+
), he = Y((d, a) => {
|
|
364
|
+
T((g) => {
|
|
365
|
+
const b = g[d] ?? we;
|
|
366
|
+
return b.meta === a ? g : { ...g, [d]: { ...b, meta: a } };
|
|
367
367
|
});
|
|
368
368
|
}, []);
|
|
369
|
-
|
|
369
|
+
G(() => (k || x || Le ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
|
|
370
370
|
document.body.style.overflow = "";
|
|
371
|
-
}), [k,
|
|
372
|
-
var
|
|
373
|
-
if (
|
|
374
|
-
const a = (
|
|
371
|
+
}), [k, x, Le]), G(() => {
|
|
372
|
+
var d;
|
|
373
|
+
if (M.fadeContent === !1) {
|
|
374
|
+
const a = (d = U.current) == null ? void 0 : d.firstElementChild;
|
|
375
375
|
a && (a.style.opacity = "1");
|
|
376
376
|
}
|
|
377
|
-
}, [
|
|
378
|
-
var
|
|
377
|
+
}, [M.fadeContent]), G(() => {
|
|
378
|
+
var d;
|
|
379
379
|
if (D.fadeContent === !1) {
|
|
380
|
-
const a = (
|
|
380
|
+
const a = (d = H.current) == null ? void 0 : d.firstElementChild;
|
|
381
381
|
a && (a.style.opacity = "1");
|
|
382
382
|
}
|
|
383
|
-
}, [D.fadeContent]),
|
|
384
|
-
var
|
|
385
|
-
for (const [a, g] of Object.entries(
|
|
383
|
+
}, [D.fadeContent]), G(() => {
|
|
384
|
+
var d;
|
|
385
|
+
for (const [a, g] of Object.entries(R))
|
|
386
386
|
if (g.fadeContent === !1) {
|
|
387
|
-
const
|
|
387
|
+
const b = F.current.get(a), A = (d = b == null ? void 0 : b.sidebarRef.current) == null ? void 0 : d.firstElementChild;
|
|
388
388
|
A && (A.style.opacity = "1");
|
|
389
389
|
}
|
|
390
|
-
}, [
|
|
391
|
-
const
|
|
392
|
-
|
|
393
|
-
}, []), le =
|
|
394
|
-
const g =
|
|
390
|
+
}, [R]);
|
|
391
|
+
const ht = Y((d) => {
|
|
392
|
+
lt((a) => ({ ...a, ...d }));
|
|
393
|
+
}, []), le = Y((d, a) => {
|
|
394
|
+
const g = d === "left" ? ne : n;
|
|
395
395
|
a != null && a.resetMeta ? g(null) : (a == null ? void 0 : a.meta) !== void 0 && g(a.meta);
|
|
396
|
-
}, []), ie =
|
|
397
|
-
(
|
|
398
|
-
a != null && a.resetMeta ? he(
|
|
396
|
+
}, []), ie = Y(
|
|
397
|
+
(d, a) => {
|
|
398
|
+
a != null && a.resetMeta ? he(d, null) : (a == null ? void 0 : a.meta) !== void 0 && he(d, a.meta);
|
|
399
399
|
},
|
|
400
400
|
[he]
|
|
401
|
-
),
|
|
402
|
-
(
|
|
403
|
-
if (
|
|
401
|
+
), mt = Y(
|
|
402
|
+
(d, a) => {
|
|
403
|
+
if (d === "left")
|
|
404
404
|
ne(a);
|
|
405
|
-
else if (
|
|
405
|
+
else if (d === "right")
|
|
406
406
|
n(a);
|
|
407
407
|
else {
|
|
408
408
|
const g = a;
|
|
@@ -410,72 +410,72 @@ const Ke = Rt(null), ye = (e) => {
|
|
|
410
410
|
}
|
|
411
411
|
},
|
|
412
412
|
[he]
|
|
413
|
-
), se =
|
|
414
|
-
const a = J.current, g = a.indexOf(
|
|
415
|
-
g !== -1 && a.splice(g, 1), a.push(
|
|
416
|
-
}, []),
|
|
417
|
-
const a = J.current, g = a.indexOf(
|
|
418
|
-
g !== -1 && a.splice(g, 1),
|
|
419
|
-
}, []),
|
|
420
|
-
(
|
|
421
|
-
const g = (
|
|
413
|
+
), se = Y((d) => {
|
|
414
|
+
const a = J.current, g = a.indexOf(d);
|
|
415
|
+
g !== -1 && a.splice(g, 1), a.push(d), B("bottom");
|
|
416
|
+
}, []), De = Y((d) => {
|
|
417
|
+
const a = J.current, g = a.indexOf(d);
|
|
418
|
+
g !== -1 && a.splice(g, 1), T((b) => (Object.entries(b).some(([W, K]) => W !== d && K.isOpen) || B(null), b));
|
|
419
|
+
}, []), bt = Y(
|
|
420
|
+
(d, a) => {
|
|
421
|
+
const g = (b, A, W, K) => {
|
|
422
422
|
xe({
|
|
423
|
-
side:
|
|
424
|
-
ref:
|
|
423
|
+
side: d,
|
|
424
|
+
ref: b,
|
|
425
425
|
options: A,
|
|
426
426
|
toggleRef: W,
|
|
427
427
|
afterApply: () => {
|
|
428
|
-
K(!0),
|
|
428
|
+
K(!0), B(d);
|
|
429
429
|
}
|
|
430
430
|
});
|
|
431
431
|
};
|
|
432
|
-
if (
|
|
433
|
-
if (
|
|
434
|
-
le("left", a), g(
|
|
435
|
-
} else if (
|
|
432
|
+
if (d === "left") {
|
|
433
|
+
if (M.disabled) return;
|
|
434
|
+
le("left", a), g(U, M, N, v);
|
|
435
|
+
} else if (d === "right") {
|
|
436
436
|
if (D.disabled) return;
|
|
437
|
-
le("right", a), g(H, D,
|
|
438
|
-
} else if (
|
|
439
|
-
const
|
|
437
|
+
le("right", a), g(H, D, Z, E);
|
|
438
|
+
} else if (d === "bottom") {
|
|
439
|
+
const b = (a == null ? void 0 : a.id) ?? "primary", A = R[b], W = F.current.get(b);
|
|
440
440
|
if (!A || !W || A.disabled) return;
|
|
441
|
-
ie(
|
|
442
|
-
const K = A.sidebarHeightPx ?? 0,
|
|
443
|
-
|
|
441
|
+
ie(b, a);
|
|
442
|
+
const K = A.sidebarHeightPx ?? 0, yt = A.mediaQueryWidth ?? 640, $e = window.innerWidth < yt, xt = $e ? A.midAnchorPointPx ?? 0 : K;
|
|
443
|
+
$e && A.midAnchorPoint && !A.swipeToOpen && xt < K ? Ne({
|
|
444
444
|
ref: W.sidebarRef,
|
|
445
445
|
options: A,
|
|
446
446
|
toggleRef: W.toggleRef,
|
|
447
447
|
afterApply: () => {
|
|
448
|
-
te(
|
|
448
|
+
te(b, !0), re(b, "midAnchor"), se(b);
|
|
449
449
|
}
|
|
450
450
|
}) : xe({
|
|
451
|
-
side:
|
|
451
|
+
side: d,
|
|
452
452
|
ref: W.sidebarRef,
|
|
453
453
|
options: A,
|
|
454
454
|
toggleRef: W.toggleRef,
|
|
455
455
|
afterApply: () => {
|
|
456
|
-
te(
|
|
456
|
+
te(b, !0), re(b, "open"), se(b);
|
|
457
457
|
}
|
|
458
458
|
});
|
|
459
459
|
} else
|
|
460
|
-
ye(
|
|
460
|
+
ye(d);
|
|
461
461
|
},
|
|
462
462
|
[
|
|
463
|
-
|
|
463
|
+
M,
|
|
464
464
|
D,
|
|
465
|
-
|
|
465
|
+
R,
|
|
466
466
|
te,
|
|
467
467
|
re,
|
|
468
468
|
se,
|
|
469
469
|
le,
|
|
470
470
|
ie
|
|
471
471
|
]
|
|
472
|
-
), vt =
|
|
473
|
-
(
|
|
474
|
-
if (
|
|
475
|
-
const g = (a == null ? void 0 : a.id) ?? "primary",
|
|
476
|
-
!
|
|
472
|
+
), vt = Y(
|
|
473
|
+
(d, a) => {
|
|
474
|
+
if (d !== "bottom") return;
|
|
475
|
+
const g = (a == null ? void 0 : a.id) ?? "primary", b = R[g], A = F.current.get(g);
|
|
476
|
+
!b || !A || b.disabled || (ie(g, a), Ne({
|
|
477
477
|
ref: A.sidebarRef,
|
|
478
|
-
options:
|
|
478
|
+
options: b,
|
|
479
479
|
toggleRef: A.toggleRef,
|
|
480
480
|
afterApply: () => {
|
|
481
481
|
te(g, !0), re(g, "midAnchor"), se(g);
|
|
@@ -483,20 +483,20 @@ const Ke = Rt(null), ye = (e) => {
|
|
|
483
483
|
}));
|
|
484
484
|
},
|
|
485
485
|
[
|
|
486
|
-
|
|
486
|
+
R,
|
|
487
487
|
te,
|
|
488
488
|
re,
|
|
489
489
|
se,
|
|
490
490
|
ie
|
|
491
491
|
]
|
|
492
|
-
),
|
|
493
|
-
(
|
|
494
|
-
if (
|
|
495
|
-
const g = (a == null ? void 0 : a.id) ?? "primary",
|
|
496
|
-
!
|
|
497
|
-
side:
|
|
492
|
+
), wt = Y(
|
|
493
|
+
(d, a) => {
|
|
494
|
+
if (d !== "bottom") return;
|
|
495
|
+
const g = (a == null ? void 0 : a.id) ?? "primary", b = R[g], A = F.current.get(g);
|
|
496
|
+
!b || !A || b.disabled || (ie(g, a), xe({
|
|
497
|
+
side: d,
|
|
498
498
|
ref: A.sidebarRef,
|
|
499
|
-
options:
|
|
499
|
+
options: b,
|
|
500
500
|
toggleRef: A.toggleRef,
|
|
501
501
|
afterApply: () => {
|
|
502
502
|
te(g, !0), re(g, "open"), se(g);
|
|
@@ -504,198 +504,198 @@ const Ke = Rt(null), ye = (e) => {
|
|
|
504
504
|
}));
|
|
505
505
|
},
|
|
506
506
|
[
|
|
507
|
-
|
|
507
|
+
R,
|
|
508
508
|
te,
|
|
509
509
|
re,
|
|
510
510
|
se,
|
|
511
511
|
ie
|
|
512
512
|
]
|
|
513
|
-
),
|
|
514
|
-
(
|
|
515
|
-
const g = (
|
|
516
|
-
|
|
517
|
-
ref:
|
|
513
|
+
), pt = Y(
|
|
514
|
+
(d, a) => {
|
|
515
|
+
const g = (b, A, W, K) => {
|
|
516
|
+
Fe({
|
|
517
|
+
ref: b,
|
|
518
518
|
options: A,
|
|
519
519
|
toggleRef: W,
|
|
520
|
-
side:
|
|
520
|
+
side: d,
|
|
521
521
|
afterApply: () => {
|
|
522
|
-
K(!1),
|
|
522
|
+
K(!1), B(null);
|
|
523
523
|
}
|
|
524
524
|
});
|
|
525
525
|
};
|
|
526
|
-
if (
|
|
527
|
-
if (
|
|
528
|
-
const
|
|
529
|
-
le("left",
|
|
530
|
-
} else if (
|
|
526
|
+
if (d === "left") {
|
|
527
|
+
if (M.disabled) return;
|
|
528
|
+
const b = M.resetMetaOnClose && (a == null ? void 0 : a.meta) === void 0 && (a == null ? void 0 : a.resetMeta) === void 0 ? { ...a, resetMeta: !0 } : a;
|
|
529
|
+
le("left", b), g(U, M, N, v);
|
|
530
|
+
} else if (d === "right") {
|
|
531
531
|
if (D.disabled) return;
|
|
532
|
-
const
|
|
533
|
-
le("right",
|
|
534
|
-
} else if (
|
|
535
|
-
const
|
|
532
|
+
const b = D.resetMetaOnClose && (a == null ? void 0 : a.meta) === void 0 && (a == null ? void 0 : a.resetMeta) === void 0 ? { ...a, resetMeta: !0 } : a;
|
|
533
|
+
le("right", b), g(H, D, Z, E);
|
|
534
|
+
} else if (d === "bottom") {
|
|
535
|
+
const b = (a == null ? void 0 : a.id) ?? "primary", A = R[b], W = F.current.get(b);
|
|
536
536
|
if (!A || !W || A.disabled) return;
|
|
537
537
|
const K = A.resetMetaOnClose && (a == null ? void 0 : a.meta) === void 0 && (a == null ? void 0 : a.resetMeta) === void 0 ? { ...a, resetMeta: !0 } : a;
|
|
538
|
-
ie(
|
|
538
|
+
ie(b, K), Fe({
|
|
539
539
|
ref: W.sidebarRef,
|
|
540
540
|
options: A,
|
|
541
541
|
toggleRef: W.toggleRef,
|
|
542
|
-
side:
|
|
542
|
+
side: d,
|
|
543
543
|
afterApply: () => {
|
|
544
|
-
te(
|
|
544
|
+
te(b, !1), re(b, "closed"), De(b);
|
|
545
545
|
}
|
|
546
546
|
});
|
|
547
547
|
} else
|
|
548
|
-
ye(
|
|
548
|
+
ye(d);
|
|
549
549
|
},
|
|
550
550
|
[
|
|
551
|
-
|
|
551
|
+
M,
|
|
552
552
|
D,
|
|
553
|
-
|
|
553
|
+
R,
|
|
554
554
|
te,
|
|
555
555
|
re,
|
|
556
|
-
|
|
556
|
+
De,
|
|
557
557
|
le,
|
|
558
558
|
ie
|
|
559
559
|
]
|
|
560
|
-
), St =
|
|
561
|
-
(
|
|
562
|
-
if (
|
|
563
|
-
|
|
564
|
-
ref:
|
|
565
|
-
toggleRef:
|
|
566
|
-
options:
|
|
560
|
+
), St = Y(
|
|
561
|
+
(d, a, g) => {
|
|
562
|
+
if (d === "left")
|
|
563
|
+
He({
|
|
564
|
+
ref: U,
|
|
565
|
+
toggleRef: N,
|
|
566
|
+
options: M,
|
|
567
567
|
translateX: a
|
|
568
568
|
});
|
|
569
|
-
else if (
|
|
570
|
-
|
|
569
|
+
else if (d === "right")
|
|
570
|
+
He({
|
|
571
571
|
ref: H,
|
|
572
|
-
toggleRef:
|
|
572
|
+
toggleRef: Z,
|
|
573
573
|
options: D,
|
|
574
574
|
translateX: a
|
|
575
575
|
});
|
|
576
|
-
else if (
|
|
577
|
-
const
|
|
576
|
+
else if (d === "bottom") {
|
|
577
|
+
const b = (g == null ? void 0 : g.id) ?? "primary", A = R[b], W = F.current.get(b);
|
|
578
578
|
if (!A || !W) return;
|
|
579
|
-
|
|
579
|
+
or({
|
|
580
580
|
ref: W.sidebarRef,
|
|
581
581
|
toggleRef: W.toggleRef,
|
|
582
582
|
options: A,
|
|
583
583
|
translateY: a
|
|
584
584
|
});
|
|
585
585
|
} else
|
|
586
|
-
ye(
|
|
586
|
+
ye(d);
|
|
587
587
|
},
|
|
588
|
-
[
|
|
588
|
+
[M, D, R]
|
|
589
589
|
);
|
|
590
|
-
return /* @__PURE__ */
|
|
591
|
-
|
|
590
|
+
return /* @__PURE__ */ O.jsx(
|
|
591
|
+
et.Provider,
|
|
592
592
|
{
|
|
593
593
|
value: {
|
|
594
594
|
lockedSidebar: j,
|
|
595
|
-
setLockedSidebar:
|
|
596
|
-
leftSidebarRef:
|
|
595
|
+
setLockedSidebar: B,
|
|
596
|
+
leftSidebarRef: U,
|
|
597
597
|
rightSidebarRef: H,
|
|
598
598
|
isLeftOpen: k,
|
|
599
|
-
isRightOpen:
|
|
599
|
+
isRightOpen: x,
|
|
600
600
|
// Backwards-compat aliases for primary bottom sidebar
|
|
601
601
|
isBottomOpen: ge,
|
|
602
|
-
bottomAnchorState:
|
|
603
|
-
bottomSidebarRef:
|
|
604
|
-
bottomToggleRef:
|
|
605
|
-
bottomSidebarOptions:
|
|
602
|
+
bottomAnchorState: Se,
|
|
603
|
+
bottomSidebarRef: ot,
|
|
604
|
+
bottomToggleRef: at,
|
|
605
|
+
bottomSidebarOptions: st,
|
|
606
606
|
// Multi-instance bottom sidebar
|
|
607
|
-
bottomSidebars:
|
|
608
|
-
bottomSidebarOptionsMap:
|
|
609
|
-
registerBottomSidebar:
|
|
610
|
-
unregisterBottomSidebar:
|
|
611
|
-
getBottomSidebarRefs:
|
|
607
|
+
bottomSidebars: m,
|
|
608
|
+
bottomSidebarOptionsMap: R,
|
|
609
|
+
registerBottomSidebar: ut,
|
|
610
|
+
unregisterBottomSidebar: dt,
|
|
611
|
+
getBottomSidebarRefs: ft,
|
|
612
612
|
activeBottomDragIdRef: X,
|
|
613
613
|
bottomFocusStackRef: J,
|
|
614
614
|
// Functions
|
|
615
|
-
openSidebar:
|
|
616
|
-
openSidebarFully:
|
|
615
|
+
openSidebar: bt,
|
|
616
|
+
openSidebarFully: wt,
|
|
617
617
|
openSidebarToMidAnchor: vt,
|
|
618
|
-
closeSidebar:
|
|
618
|
+
closeSidebar: pt,
|
|
619
619
|
dragSidebar: St,
|
|
620
|
-
globalOptions:
|
|
621
|
-
setGlobalOptions:
|
|
622
|
-
leftSidebarOptions:
|
|
620
|
+
globalOptions: ct,
|
|
621
|
+
setGlobalOptions: ht,
|
|
622
|
+
leftSidebarOptions: M,
|
|
623
623
|
rightSidebarOptions: D,
|
|
624
|
-
setLeftSidebarOptions:
|
|
625
|
-
setRightSidebarOptions:
|
|
626
|
-
setBottomSidebarOptionsById:
|
|
627
|
-
leftToggleRef:
|
|
628
|
-
rightToggleRef:
|
|
624
|
+
setLeftSidebarOptions: q,
|
|
625
|
+
setRightSidebarOptions: V,
|
|
626
|
+
setBottomSidebarOptionsById: gt,
|
|
627
|
+
leftToggleRef: N,
|
|
628
|
+
rightToggleRef: Z,
|
|
629
629
|
leftMeta: oe,
|
|
630
630
|
rightMeta: ae,
|
|
631
|
-
setMeta:
|
|
631
|
+
setMeta: mt
|
|
632
632
|
},
|
|
633
633
|
children: e
|
|
634
634
|
}
|
|
635
635
|
);
|
|
636
636
|
};
|
|
637
637
|
function ee() {
|
|
638
|
-
const e =
|
|
638
|
+
const e = Et(et);
|
|
639
639
|
if (!e)
|
|
640
640
|
throw new Error("useSwipeBarContext must be used within SwipeBarProvider");
|
|
641
641
|
return e;
|
|
642
642
|
}
|
|
643
|
-
const
|
|
643
|
+
const Pt = 300, Mt = 40, Ct = 20, It = 320, je = window.innerHeight, _t = !0, Lt = !0, Dt = !1, tt = "rgba(0, 0, 0, 0.5)", Ee = "rgb(36,36,36)", Xt = "white", Yt = 40, $t = 40, Bt = !0, Te = 640, Wt = 30, jt = 15, kt = 20, ke = 0.6, Ft = 200, Nt = 100, Ht = !1, Gt = !0, Ut = !0, Zt = !1, ue = "cubic-bezier(0.22, 1, 0.36, 1)", rt = {
|
|
644
644
|
width: 0,
|
|
645
645
|
top: 0,
|
|
646
646
|
bottom: 0,
|
|
647
647
|
flexShrink: 0,
|
|
648
648
|
overflowX: "hidden",
|
|
649
649
|
willChange: "transform"
|
|
650
|
-
}, Zt = {
|
|
651
|
-
transform: "translateX(-100%)"
|
|
652
650
|
}, zt = {
|
|
651
|
+
transform: "translateX(-100%)"
|
|
652
|
+
}, qt = {
|
|
653
653
|
transform: "translateX(100%)"
|
|
654
654
|
}, Vt = {
|
|
655
655
|
position: "fixed",
|
|
656
656
|
left: 0,
|
|
657
657
|
top: 0,
|
|
658
658
|
bottom: 0
|
|
659
|
-
},
|
|
659
|
+
}, Qt = {
|
|
660
660
|
position: "fixed",
|
|
661
661
|
right: 0,
|
|
662
662
|
top: 0,
|
|
663
663
|
bottom: 0
|
|
664
|
-
},
|
|
664
|
+
}, Jt = {
|
|
665
665
|
height: 0,
|
|
666
666
|
left: 0,
|
|
667
667
|
right: 0,
|
|
668
668
|
flexShrink: 0,
|
|
669
669
|
overflowY: "hidden",
|
|
670
670
|
willChange: "transform"
|
|
671
|
-
}, Jt = {
|
|
672
|
-
transform: "translateY(100%)"
|
|
673
671
|
}, Kt = {
|
|
672
|
+
transform: "translateY(100%)"
|
|
673
|
+
}, er = {
|
|
674
674
|
position: "fixed",
|
|
675
675
|
bottom: 0,
|
|
676
676
|
left: 0,
|
|
677
677
|
right: 0
|
|
678
|
-
},
|
|
678
|
+
}, tr = {
|
|
679
679
|
position: "fixed",
|
|
680
680
|
top: 0,
|
|
681
681
|
left: 0,
|
|
682
682
|
width: "100%",
|
|
683
683
|
height: "100%",
|
|
684
|
-
backgroundColor:
|
|
684
|
+
backgroundColor: tt,
|
|
685
685
|
transitionProperty: "opacity",
|
|
686
686
|
pointerEvents: "none",
|
|
687
687
|
opacity: 0
|
|
688
|
-
},
|
|
688
|
+
}, rr = {
|
|
689
689
|
opacity: 1,
|
|
690
690
|
pointerEvents: "auto"
|
|
691
|
-
},
|
|
691
|
+
}, nt = {
|
|
692
692
|
position: "fixed",
|
|
693
693
|
top: "50%",
|
|
694
694
|
transform: "translateY(-50%)",
|
|
695
695
|
width: "1px",
|
|
696
696
|
display: "flex",
|
|
697
697
|
justifyContent: "center"
|
|
698
|
-
},
|
|
698
|
+
}, nr = {
|
|
699
699
|
position: "fixed",
|
|
700
700
|
bottom: 0,
|
|
701
701
|
left: "50%",
|
|
@@ -703,16 +703,16 @@ const At = 300, Pt = 40, Mt = 20, It = 320, Be = window.innerHeight, Ct = !0, _t
|
|
|
703
703
|
height: "1px",
|
|
704
704
|
display: "flex",
|
|
705
705
|
alignItems: "center"
|
|
706
|
-
},
|
|
706
|
+
}, ir = {
|
|
707
707
|
position: "relative",
|
|
708
708
|
cursor: "pointer",
|
|
709
709
|
display: "flex",
|
|
710
710
|
height: "72px",
|
|
711
711
|
alignItems: "center",
|
|
712
712
|
justifyContent: "center"
|
|
713
|
-
},
|
|
713
|
+
}, Oe = (e) => {
|
|
714
714
|
throw new Error(`Unhandled sidebar side: ${e}`);
|
|
715
|
-
},
|
|
715
|
+
}, ve = (e) => {
|
|
716
716
|
var t;
|
|
717
717
|
return (t = e.current) == null ? void 0 : t.firstElementChild;
|
|
718
718
|
}, xe = ({
|
|
@@ -720,43 +720,43 @@ const At = 300, Pt = 40, Mt = 20, It = 320, Be = window.innerHeight, Ct = !0, _t
|
|
|
720
720
|
side: t,
|
|
721
721
|
options: r,
|
|
722
722
|
toggleRef: i,
|
|
723
|
-
afterApply:
|
|
723
|
+
afterApply: c
|
|
724
724
|
}) => {
|
|
725
|
-
const o =
|
|
725
|
+
const o = ve(e), u = r.transitionMs ? r.transitionMs / 2 : 0;
|
|
726
726
|
o && r.fadeContent && (o.style.opacity = "0");
|
|
727
|
-
let
|
|
728
|
-
t === "left" || t === "right" ? (
|
|
727
|
+
let f, l;
|
|
728
|
+
t === "left" || t === "right" ? (f = "width", l = r.sidebarWidthPx, o && l && (o.style.minWidth = `${l}px`)) : t === "bottom" ? (f = "height", l = r.sidebarHeightPx, o && l && (o.style.minHeight = `${l}px`)) : Oe(t), requestAnimationFrame(() => {
|
|
729
729
|
if (!e.current) return;
|
|
730
|
-
const
|
|
731
|
-
e.current.style.transition = `${
|
|
730
|
+
const s = `transform ${r.transitionMs}ms ${ue}`, w = r.isAbsolute ? "" : `, ${f} ${r.transitionMs}ms ${ue}`;
|
|
731
|
+
e.current.style.transition = `${s}${w}`, o && r.fadeContent && (o.style.transition = `opacity ${r.fadeContentTransitionMs}ms ease`), requestAnimationFrame(() => {
|
|
732
732
|
if (e.current) {
|
|
733
733
|
if (e.current.style.transform = t === "bottom" ? "translateY(0px)" : "translateX(0px)", !r.isAbsolute)
|
|
734
|
-
e.current.style[
|
|
735
|
-
else if (e.current.style[
|
|
736
|
-
const
|
|
737
|
-
e.current.style.transition =
|
|
734
|
+
e.current.style[f] = `${l}px`;
|
|
735
|
+
else if (e.current.style[f] !== `${l}px`) {
|
|
736
|
+
const y = e.current.style.transition;
|
|
737
|
+
e.current.style.transition = s, e.current.style[f] = `${l}px`, e.current.style.transition = y;
|
|
738
738
|
}
|
|
739
|
-
i.current &&
|
|
739
|
+
i.current && l && (i.current.style.opacity = "1", t === "left" ? i.current.style.transform = `translateY(-50%) translateX(${l}px)` : t === "right" ? i.current.style.transform = `translateY(-50%) translateX(-${l}px)` : t === "bottom" && (i.current.style.transform = `translateX(-50%) translateY(-${l}px)`)), o && r.fadeContent && setTimeout(() => {
|
|
740
740
|
o.style.opacity = "1";
|
|
741
|
-
},
|
|
741
|
+
}, u), c();
|
|
742
742
|
}
|
|
743
743
|
});
|
|
744
744
|
}), setTimeout(() => {
|
|
745
745
|
}, 0);
|
|
746
|
-
},
|
|
746
|
+
}, Fe = ({
|
|
747
747
|
ref: e,
|
|
748
748
|
options: t,
|
|
749
749
|
side: r,
|
|
750
750
|
toggleRef: i,
|
|
751
|
-
afterApply:
|
|
751
|
+
afterApply: c
|
|
752
752
|
}) => {
|
|
753
|
-
const o =
|
|
754
|
-
let
|
|
755
|
-
r === "left" || r === "right" ? (
|
|
753
|
+
const o = ve(e);
|
|
754
|
+
let u;
|
|
755
|
+
r === "left" || r === "right" ? (u = "width", o && t.sidebarWidthPx && (o.style.minWidth = `${t.sidebarWidthPx}px`)) : r === "bottom" ? (u = "height", o && t.sidebarHeightPx && (o.style.minHeight = `${t.sidebarHeightPx}px`)) : Oe(r), requestAnimationFrame(() => {
|
|
756
756
|
if (!e.current) return;
|
|
757
|
-
const
|
|
758
|
-
e.current.style.transition = `${
|
|
759
|
-
e.current && (r === "left" ? (e.current.style.transform = "translateX(-100%)", t.isAbsolute || (e.current.style.width = "0px")) : r === "right" ? (e.current.style.transform = "translateX(100%)", t.isAbsolute || (e.current.style.width = "0px")) : r === "bottom" && (e.current.style.transform = "translateY(100%)", t.isAbsolute || (e.current.style.height = "0px")), i.current && (i.current.style.opacity = "1", r === "left" || r === "right" ? i.current.style.transform = "translateY(-50%)" : r === "bottom" && (i.current.style.transform = "translateX(-50%)")), o && t.fadeContent && (o.style.opacity = "0"),
|
|
757
|
+
const f = `transform ${t.transitionMs}ms ${ue}`, l = t.isAbsolute ? "" : `, ${u} ${t.transitionMs}ms ${ue}`;
|
|
758
|
+
e.current.style.transition = `${f}${l}`, o && t.fadeContent && (o.style.transition = `opacity ${t.fadeContentTransitionMs}ms ease`), requestAnimationFrame(() => {
|
|
759
|
+
e.current && (r === "left" ? (e.current.style.transform = "translateX(-100%)", t.isAbsolute || (e.current.style.width = "0px")) : r === "right" ? (e.current.style.transform = "translateX(100%)", t.isAbsolute || (e.current.style.width = "0px")) : r === "bottom" && (e.current.style.transform = "translateY(100%)", t.isAbsolute || (e.current.style.height = "0px")), i.current && (i.current.style.opacity = "1", r === "left" || r === "right" ? i.current.style.transform = "translateY(-50%)" : r === "bottom" && (i.current.style.transform = "translateX(-50%)")), o && t.fadeContent && (o.style.opacity = "0"), c());
|
|
760
760
|
});
|
|
761
761
|
});
|
|
762
762
|
}, Ne = ({
|
|
@@ -765,85 +765,85 @@ const At = 300, Pt = 40, Mt = 20, It = 320, Be = window.innerHeight, Ct = !0, _t
|
|
|
765
765
|
toggleRef: r,
|
|
766
766
|
afterApply: i
|
|
767
767
|
}) => {
|
|
768
|
-
const
|
|
769
|
-
|
|
768
|
+
const c = ve(e), o = t.transitionMs ? t.transitionMs / 2 : 0;
|
|
769
|
+
c && t.fadeContent && (c.style.opacity = "0"), c && t.midAnchorPointPx && (c.style.minHeight = `${t.sidebarHeightPx}px`), requestAnimationFrame(() => {
|
|
770
770
|
if (!e.current) return;
|
|
771
|
-
const
|
|
772
|
-
e.current.style.transition = `${
|
|
771
|
+
const u = `transform ${t.transitionMs}ms ${ue}`, f = t.isAbsolute ? "" : `, height ${t.transitionMs}ms ${ue}`;
|
|
772
|
+
e.current.style.transition = `${u}${f}`, c && t.fadeContent && (c.style.transition = `opacity ${t.fadeContentTransitionMs}ms ease`), requestAnimationFrame(() => {
|
|
773
773
|
if (!e.current) return;
|
|
774
|
-
const
|
|
775
|
-
if (e.current.style.transform = `translateY(${
|
|
776
|
-
e.current.style.height = `${
|
|
777
|
-
else if (e.current.style.height !== `${
|
|
778
|
-
const
|
|
779
|
-
e.current.style.transition =
|
|
774
|
+
const l = t.midAnchorPointPx ?? 0, s = t.sidebarHeightPx ?? 0, w = s - l;
|
|
775
|
+
if (e.current.style.transform = `translateY(${w}px)`, !t.isAbsolute)
|
|
776
|
+
e.current.style.height = `${s}px`;
|
|
777
|
+
else if (e.current.style.height !== `${s}px`) {
|
|
778
|
+
const y = e.current.style.transition;
|
|
779
|
+
e.current.style.transition = u, e.current.style.height = `${s}px`, e.current.style.transition = y;
|
|
780
780
|
}
|
|
781
|
-
r.current && (r.current.style.opacity = "1", r.current.style.transform = `translateX(-50%) translateY(-${
|
|
782
|
-
|
|
781
|
+
r.current && (r.current.style.opacity = "1", r.current.style.transform = `translateX(-50%) translateY(-${l}px)`), c && t.fadeContent && setTimeout(() => {
|
|
782
|
+
c.style.opacity = "1";
|
|
783
783
|
}, o), i();
|
|
784
784
|
});
|
|
785
785
|
}), setTimeout(() => {
|
|
786
786
|
}, 0);
|
|
787
|
-
},
|
|
787
|
+
}, He = ({
|
|
788
788
|
ref: e,
|
|
789
789
|
toggleRef: t,
|
|
790
790
|
options: r,
|
|
791
791
|
translateX: i
|
|
792
792
|
}) => {
|
|
793
793
|
!e.current || i === null || (e.current.style.transition = "none", requestAnimationFrame(() => {
|
|
794
|
-
const
|
|
794
|
+
const c = ve(e);
|
|
795
795
|
if (e.current) {
|
|
796
|
-
if (
|
|
796
|
+
if (c && r.fadeContent && (c.style.opacity = "0"), c && r.sidebarWidthPx && (c.style.minWidth = `${r.sidebarWidthPx}px`), !r.isAbsolute) {
|
|
797
797
|
const o = `${r.sidebarWidthPx}px`;
|
|
798
798
|
e.current.style.width !== o && (e.current.style.width = o);
|
|
799
799
|
}
|
|
800
800
|
e.current.style.transform = `translateX(${i}px)`, t.current && (t.current.style.opacity = "0", t.current.style.transform = `translateY(-50%) translateX(${i}px)`);
|
|
801
801
|
}
|
|
802
802
|
}));
|
|
803
|
-
},
|
|
803
|
+
}, or = ({
|
|
804
804
|
ref: e,
|
|
805
805
|
toggleRef: t,
|
|
806
806
|
options: r,
|
|
807
807
|
translateY: i
|
|
808
808
|
}) => {
|
|
809
809
|
!e.current || i === null || (e.current.style.transition = "none", requestAnimationFrame(() => {
|
|
810
|
-
const
|
|
810
|
+
const c = ve(e);
|
|
811
811
|
if (e.current) {
|
|
812
|
-
if (
|
|
812
|
+
if (c && r.fadeContent && (c.style.opacity = "0"), c && r.sidebarHeightPx && (c.style.minHeight = `${r.sidebarHeightPx}px`), !r.isAbsolute) {
|
|
813
813
|
const o = `${r.sidebarHeightPx}px`;
|
|
814
814
|
e.current.style.height !== o && (e.current.style.height = o);
|
|
815
815
|
}
|
|
816
816
|
e.current.style.transform = `translateY(${i}px)`, t.current && (t.current.style.opacity = "0", t.current.style.transform = `translateX(-50%) translateY(${i}px)`);
|
|
817
817
|
}
|
|
818
818
|
}));
|
|
819
|
-
},
|
|
819
|
+
}, pe = ({ refs: e, clientX: t, clientY: r, touchId: i, isMouse: c }) => {
|
|
820
820
|
e.draggingRef.current = {
|
|
821
821
|
startX: t,
|
|
822
822
|
startY: r,
|
|
823
823
|
activeTouchId: i,
|
|
824
|
-
isMouse:
|
|
824
|
+
isMouse: c,
|
|
825
825
|
isActivated: !1
|
|
826
826
|
}, e.currentXRef.current = t, e.prevXRef.current = t;
|
|
827
|
-
},
|
|
827
|
+
}, Ge = ({
|
|
828
828
|
refs: e,
|
|
829
829
|
clientX: t,
|
|
830
830
|
clientY: r,
|
|
831
831
|
touchId: i,
|
|
832
|
-
isMouse:
|
|
832
|
+
isMouse: c
|
|
833
833
|
}) => {
|
|
834
834
|
e.draggingRef.current = {
|
|
835
835
|
startX: t,
|
|
836
836
|
startY: r,
|
|
837
837
|
activeTouchId: i,
|
|
838
|
-
isMouse:
|
|
838
|
+
isMouse: c,
|
|
839
839
|
isActivated: !1
|
|
840
840
|
}, e.currentYRef.current = r, e.prevYRef.current = r;
|
|
841
|
-
},
|
|
841
|
+
}, it = ({ refs: e, dragSidebar: t, onDeactivate: r }) => {
|
|
842
842
|
e.draggingRef.current = null, e.currentXRef.current = null, e.prevXRef.current = null, t(null), r();
|
|
843
|
-
},
|
|
843
|
+
}, ar = ({ refs: e, dragSidebar: t, onDeactivate: r }) => {
|
|
844
844
|
e.draggingRef.current = null, e.currentYRef.current = null, e.prevYRef.current = null, t(null);
|
|
845
845
|
}, de = (e) => e instanceof Element ? !!e.closest("input, textarea, [contenteditable='true']") : !1;
|
|
846
|
-
function
|
|
846
|
+
function Ue(e) {
|
|
847
847
|
let t = e instanceof HTMLElement ? e : null;
|
|
848
848
|
for (; t; ) {
|
|
849
849
|
const r = getComputedStyle(t);
|
|
@@ -868,148 +868,149 @@ const Ae = (e, t) => {
|
|
|
868
868
|
}, Me = (e, t, r) => {
|
|
869
869
|
const {
|
|
870
870
|
globalOptions: i,
|
|
871
|
-
setLeftSidebarOptions:
|
|
871
|
+
setLeftSidebarOptions: c,
|
|
872
872
|
setRightSidebarOptions: o,
|
|
873
|
-
setBottomSidebarOptionsById:
|
|
873
|
+
setBottomSidebarOptionsById: u
|
|
874
874
|
} = ee(), {
|
|
875
|
-
sidebarWidthPx:
|
|
876
|
-
sidebarHeightPx:
|
|
877
|
-
transitionMs:
|
|
878
|
-
edgeActivationWidthPx:
|
|
879
|
-
dragActivationDeltaPx:
|
|
880
|
-
showOverlay:
|
|
875
|
+
sidebarWidthPx: f,
|
|
876
|
+
sidebarHeightPx: l,
|
|
877
|
+
transitionMs: s,
|
|
878
|
+
edgeActivationWidthPx: w,
|
|
879
|
+
dragActivationDeltaPx: y,
|
|
880
|
+
showOverlay: h,
|
|
881
881
|
isAbsolute: S,
|
|
882
|
-
overlayBackgroundColor:
|
|
882
|
+
overlayBackgroundColor: C,
|
|
883
883
|
toggleIconColor: p,
|
|
884
|
-
toggleIconSizePx:
|
|
885
|
-
toggleIconEdgeDistancePx:
|
|
886
|
-
showToggle:
|
|
887
|
-
mediaQueryWidth:
|
|
884
|
+
toggleIconSizePx: P,
|
|
885
|
+
toggleIconEdgeDistancePx: L,
|
|
886
|
+
showToggle: I,
|
|
887
|
+
mediaQueryWidth: $,
|
|
888
888
|
swipeBarZIndex: j,
|
|
889
|
-
toggleZIndex:
|
|
889
|
+
toggleZIndex: B,
|
|
890
890
|
overlayZIndex: k,
|
|
891
891
|
fadeContent: v,
|
|
892
|
-
fadeContentTransitionMs:
|
|
893
|
-
swipeToOpen:
|
|
894
|
-
swipeToClose:
|
|
895
|
-
midAnchorPoint:
|
|
892
|
+
fadeContentTransitionMs: x,
|
|
893
|
+
swipeToOpen: E,
|
|
894
|
+
swipeToClose: M,
|
|
895
|
+
midAnchorPoint: q,
|
|
896
896
|
midAnchorPointPx: D,
|
|
897
|
-
disabled:
|
|
898
|
-
closeSidebarOnOverlayClick:
|
|
897
|
+
disabled: V,
|
|
898
|
+
closeSidebarOnOverlayClick: U,
|
|
899
899
|
resetMetaOnClose: H
|
|
900
|
-
} = t,
|
|
901
|
-
const
|
|
900
|
+
} = t, N = Ke(() => {
|
|
901
|
+
const Z = l ?? i.sidebarHeightPx;
|
|
902
902
|
return {
|
|
903
|
-
sidebarWidthPx:
|
|
904
|
-
sidebarHeightPx:
|
|
905
|
-
transitionMs:
|
|
906
|
-
edgeActivationWidthPx:
|
|
907
|
-
dragActivationDeltaPx:
|
|
908
|
-
showOverlay:
|
|
903
|
+
sidebarWidthPx: f ?? i.sidebarWidthPx,
|
|
904
|
+
sidebarHeightPx: Z,
|
|
905
|
+
transitionMs: s ?? i.transitionMs,
|
|
906
|
+
edgeActivationWidthPx: w ?? i.edgeActivationWidthPx,
|
|
907
|
+
dragActivationDeltaPx: y ?? i.dragActivationDeltaPx,
|
|
908
|
+
showOverlay: h ?? i.showOverlay,
|
|
909
909
|
isAbsolute: S ?? i.isAbsolute,
|
|
910
|
-
overlayBackgroundColor:
|
|
910
|
+
overlayBackgroundColor: C ?? i.overlayBackgroundColor,
|
|
911
911
|
toggleIconColor: p ?? i.toggleIconColor,
|
|
912
|
-
toggleIconSizePx:
|
|
913
|
-
toggleIconEdgeDistancePx:
|
|
914
|
-
showToggle:
|
|
915
|
-
mediaQueryWidth:
|
|
912
|
+
toggleIconSizePx: P ?? i.toggleIconSizePx,
|
|
913
|
+
toggleIconEdgeDistancePx: L ?? i.toggleIconEdgeDistancePx,
|
|
914
|
+
showToggle: I ?? i.showToggle,
|
|
915
|
+
mediaQueryWidth: $ ?? i.mediaQueryWidth,
|
|
916
916
|
swipeBarZIndex: j ?? i.swipeBarZIndex,
|
|
917
|
-
toggleZIndex:
|
|
917
|
+
toggleZIndex: B ?? i.toggleZIndex,
|
|
918
918
|
overlayZIndex: k ?? i.overlayZIndex,
|
|
919
919
|
fadeContent: v ?? i.fadeContent,
|
|
920
|
-
fadeContentTransitionMs:
|
|
921
|
-
swipeToOpen:
|
|
922
|
-
swipeToClose:
|
|
923
|
-
midAnchorPoint:
|
|
924
|
-
midAnchorPointPx: D ?? i.midAnchorPointPx ?? Math.floor(
|
|
925
|
-
disabled:
|
|
926
|
-
closeSidebarOnOverlayClick:
|
|
920
|
+
fadeContentTransitionMs: x ?? i.fadeContentTransitionMs,
|
|
921
|
+
swipeToOpen: E ?? i.swipeToOpen,
|
|
922
|
+
swipeToClose: M ?? i.swipeToClose,
|
|
923
|
+
midAnchorPoint: q ?? i.midAnchorPoint,
|
|
924
|
+
midAnchorPointPx: D ?? i.midAnchorPointPx ?? Math.floor(Z / 3),
|
|
925
|
+
disabled: V ?? i.disabled,
|
|
926
|
+
closeSidebarOnOverlayClick: U ?? i.closeSidebarOnOverlayClick,
|
|
927
927
|
resetMetaOnClose: H ?? i.resetMetaOnClose
|
|
928
928
|
};
|
|
929
929
|
}, [
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
T,
|
|
930
|
+
f,
|
|
931
|
+
l,
|
|
932
|
+
s,
|
|
934
933
|
w,
|
|
935
|
-
|
|
934
|
+
y,
|
|
935
|
+
h,
|
|
936
936
|
S,
|
|
937
|
-
I,
|
|
938
|
-
p,
|
|
939
|
-
M,
|
|
940
|
-
_,
|
|
941
937
|
C,
|
|
938
|
+
p,
|
|
939
|
+
P,
|
|
940
|
+
L,
|
|
941
|
+
I,
|
|
942
942
|
i,
|
|
943
|
-
Y,
|
|
944
|
-
j,
|
|
945
943
|
$,
|
|
944
|
+
j,
|
|
945
|
+
B,
|
|
946
946
|
k,
|
|
947
947
|
v,
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
V,
|
|
952
|
-
D,
|
|
948
|
+
x,
|
|
949
|
+
E,
|
|
950
|
+
M,
|
|
953
951
|
q,
|
|
954
|
-
|
|
952
|
+
D,
|
|
953
|
+
V,
|
|
954
|
+
U,
|
|
955
955
|
H
|
|
956
956
|
]);
|
|
957
|
-
return
|
|
958
|
-
e === "left" ?
|
|
957
|
+
return G(() => {
|
|
958
|
+
e === "left" ? c(N) : e === "right" ? o(N) : e === "bottom" ? u(r ?? "primary", N) : Oe(e);
|
|
959
959
|
}, [
|
|
960
960
|
e,
|
|
961
961
|
r,
|
|
962
|
-
|
|
963
|
-
|
|
962
|
+
N,
|
|
963
|
+
c,
|
|
964
964
|
o,
|
|
965
|
-
|
|
966
|
-
]),
|
|
965
|
+
u
|
|
966
|
+
]), N;
|
|
967
967
|
};
|
|
968
|
-
function
|
|
968
|
+
function Ce({
|
|
969
969
|
isCollapsed: e,
|
|
970
970
|
setCollapsed: t,
|
|
971
971
|
closeSidebarOnClick: r = !0,
|
|
972
972
|
transitionMs: i,
|
|
973
|
-
overlayBackgroundColor:
|
|
973
|
+
overlayBackgroundColor: c,
|
|
974
974
|
overlayZIndex: o
|
|
975
975
|
}) {
|
|
976
|
-
return /* @__PURE__ */
|
|
976
|
+
return /* @__PURE__ */ O.jsx(
|
|
977
977
|
"div",
|
|
978
978
|
{
|
|
979
|
+
"aria-hidden": "true",
|
|
979
980
|
style: {
|
|
980
981
|
transitionDuration: `${i}ms`,
|
|
981
|
-
...
|
|
982
|
-
...e ? {} :
|
|
983
|
-
...
|
|
982
|
+
...tr,
|
|
983
|
+
...e ? {} : rr,
|
|
984
|
+
...c ? { backgroundColor: c } : {},
|
|
984
985
|
zIndex: o
|
|
985
986
|
},
|
|
986
|
-
onMouseDown: (
|
|
987
|
-
r && (
|
|
987
|
+
onMouseDown: (u) => {
|
|
988
|
+
r && (u.stopPropagation(), t());
|
|
988
989
|
}
|
|
989
990
|
}
|
|
990
991
|
);
|
|
991
992
|
}
|
|
992
|
-
function
|
|
993
|
-
const r =
|
|
994
|
-
return
|
|
993
|
+
function Ie({ size: e, color: t }) {
|
|
994
|
+
const r = _(null);
|
|
995
|
+
return G(() => {
|
|
995
996
|
const i = () => {
|
|
996
997
|
r.current && (r.current.style.opacity = "1");
|
|
997
|
-
},
|
|
998
|
-
r.current && (r.current.style.opacity = `${
|
|
998
|
+
}, c = () => {
|
|
999
|
+
r.current && (r.current.style.opacity = `${ke}`);
|
|
999
1000
|
};
|
|
1000
|
-
r.current && (r.current.addEventListener("mouseenter", i), r.current.addEventListener("mouseleave",
|
|
1001
|
-
}, []), /* @__PURE__ */
|
|
1001
|
+
r.current && (r.current.addEventListener("mouseenter", i), r.current.addEventListener("mouseleave", c));
|
|
1002
|
+
}, []), /* @__PURE__ */ O.jsx(
|
|
1002
1003
|
"div",
|
|
1003
1004
|
{
|
|
1004
1005
|
style: {
|
|
1005
|
-
...
|
|
1006
|
+
...ir
|
|
1006
1007
|
},
|
|
1007
|
-
children: /* @__PURE__ */
|
|
1008
|
+
children: /* @__PURE__ */ O.jsxs(
|
|
1008
1009
|
"svg",
|
|
1009
1010
|
{
|
|
1010
1011
|
style: {
|
|
1011
|
-
transition: `opacity ${
|
|
1012
|
-
opacity: `${
|
|
1012
|
+
transition: `opacity ${Ft}ms ease`,
|
|
1013
|
+
opacity: `${ke}`
|
|
1013
1014
|
},
|
|
1014
1015
|
ref: r,
|
|
1015
1016
|
"aria-hidden": "true",
|
|
@@ -1018,8 +1019,8 @@ function Ce({ size: e, color: t }) {
|
|
|
1018
1019
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1019
1020
|
width: e,
|
|
1020
1021
|
children: [
|
|
1021
|
-
/* @__PURE__ */
|
|
1022
|
-
/* @__PURE__ */
|
|
1022
|
+
/* @__PURE__ */ O.jsx("g", { strokeWidth: "0" }),
|
|
1023
|
+
/* @__PURE__ */ O.jsx("g", { strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ O.jsx("g", { children: /* @__PURE__ */ O.jsx(
|
|
1023
1024
|
"path",
|
|
1024
1025
|
{
|
|
1025
1026
|
clipRule: "evenodd",
|
|
@@ -1034,135 +1035,185 @@ function Ce({ size: e, color: t }) {
|
|
|
1034
1035
|
}
|
|
1035
1036
|
);
|
|
1036
1037
|
}
|
|
1037
|
-
function
|
|
1038
|
+
function sr({
|
|
1038
1039
|
id: e,
|
|
1039
1040
|
toggleRef: t,
|
|
1040
1041
|
options: r,
|
|
1041
1042
|
showToggle: i = !0,
|
|
1042
|
-
ToggleComponent:
|
|
1043
|
+
ToggleComponent: c
|
|
1043
1044
|
}) {
|
|
1044
|
-
var
|
|
1045
|
-
const { openSidebar: o, closeSidebar:
|
|
1046
|
-
return i ? /* @__PURE__ */
|
|
1045
|
+
var s;
|
|
1046
|
+
const { openSidebar: o, closeSidebar: u, bottomSidebars: f } = ee(), l = ((s = f[e]) == null ? void 0 : s.isOpen) ?? !1;
|
|
1047
|
+
return i ? /* @__PURE__ */ O.jsx(
|
|
1047
1048
|
"div",
|
|
1048
1049
|
{
|
|
1049
1050
|
ref: t,
|
|
1050
1051
|
style: {
|
|
1051
|
-
...
|
|
1052
|
+
...nr,
|
|
1052
1053
|
transition: `transform ${r.transitionMs}ms ease, opacity ${r.transitionMs}ms ease`,
|
|
1053
1054
|
zIndex: r.toggleZIndex
|
|
1054
1055
|
},
|
|
1055
|
-
children: (!
|
|
1056
|
+
children: (!l || l && !r.showOverlay) && /* @__PURE__ */ O.jsx(
|
|
1056
1057
|
"button",
|
|
1057
1058
|
{
|
|
1058
1059
|
type: "button",
|
|
1060
|
+
"aria-expanded": l,
|
|
1061
|
+
"aria-controls": `swipebar-bottom-${e}`,
|
|
1062
|
+
"aria-label": l ? "Close bottom sidebar" : "Open bottom sidebar",
|
|
1059
1063
|
onClick: () => {
|
|
1060
|
-
r.disabled || (
|
|
1064
|
+
r.disabled || (l ? u("bottom", { id: e }) : o("bottom", { id: e }));
|
|
1061
1065
|
},
|
|
1062
1066
|
disabled: r.disabled,
|
|
1063
1067
|
style: {
|
|
1064
1068
|
marginBottom: `${r.toggleIconEdgeDistancePx}px`,
|
|
1065
1069
|
// Rotate icon: -90deg points up when closed, 90deg points down when open
|
|
1066
|
-
transform:
|
|
1070
|
+
transform: l ? "rotate(90deg)" : "rotate(-90deg)"
|
|
1067
1071
|
},
|
|
1068
|
-
children:
|
|
1072
|
+
children: c ?? /* @__PURE__ */ O.jsx(Ie, { size: r.toggleIconSizePx, color: r.toggleIconColor })
|
|
1069
1073
|
}
|
|
1070
1074
|
)
|
|
1071
1075
|
}
|
|
1072
1076
|
) : null;
|
|
1073
1077
|
}
|
|
1078
|
+
const cr = 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
1079
|
+
function lr(e) {
|
|
1080
|
+
return Array.from(e.querySelectorAll(cr)).filter(
|
|
1081
|
+
(t) => !t.closest("[inert]")
|
|
1082
|
+
);
|
|
1083
|
+
}
|
|
1084
|
+
function _e({
|
|
1085
|
+
sidebarRef: e,
|
|
1086
|
+
triggerRef: t,
|
|
1087
|
+
isOpen: r,
|
|
1088
|
+
onClose: i,
|
|
1089
|
+
transitionMs: c
|
|
1090
|
+
}) {
|
|
1091
|
+
const o = _(null);
|
|
1092
|
+
G(() => {
|
|
1093
|
+
var f;
|
|
1094
|
+
if (r) {
|
|
1095
|
+
o.current = document.activeElement;
|
|
1096
|
+
const l = setTimeout(() => {
|
|
1097
|
+
e.current && (e.current.setAttribute("tabindex", "-1"), e.current.focus());
|
|
1098
|
+
}, c);
|
|
1099
|
+
return () => clearTimeout(l);
|
|
1100
|
+
}
|
|
1101
|
+
const u = o.current;
|
|
1102
|
+
if (u) {
|
|
1103
|
+
const l = ((f = t.current) == null ? void 0 : f.querySelector("button")) ?? u;
|
|
1104
|
+
requestAnimationFrame(() => {
|
|
1105
|
+
l.focus();
|
|
1106
|
+
}), o.current = null;
|
|
1107
|
+
}
|
|
1108
|
+
}, [r, e, t, c]), G(() => {
|
|
1109
|
+
if (!r) return;
|
|
1110
|
+
function u(f) {
|
|
1111
|
+
if (f.key === "Escape") {
|
|
1112
|
+
if (!e.current) return;
|
|
1113
|
+
e.current.contains(document.activeElement) && (f.preventDefault(), i());
|
|
1114
|
+
return;
|
|
1115
|
+
}
|
|
1116
|
+
if (f.key !== "Tab" || !e.current) return;
|
|
1117
|
+
const l = lr(e.current);
|
|
1118
|
+
if (l.length === 0) return;
|
|
1119
|
+
const s = l[0], w = l[l.length - 1];
|
|
1120
|
+
f.shiftKey ? document.activeElement === s && (f.preventDefault(), w.focus()) : document.activeElement === w && (f.preventDefault(), s.focus());
|
|
1121
|
+
}
|
|
1122
|
+
return document.addEventListener("keydown", u), () => document.removeEventListener("keydown", u);
|
|
1123
|
+
}, [r, e, i]);
|
|
1124
|
+
}
|
|
1074
1125
|
function fe(e = Te) {
|
|
1075
|
-
const t = `(max-width: ${Math.min(e, Te)}px)`, r = () => typeof window > "u" || typeof window.matchMedia > "u" ? !1 : window.matchMedia(t).matches, [i,
|
|
1076
|
-
return
|
|
1126
|
+
const t = `(max-width: ${Math.min(e, Te)}px)`, r = () => typeof window > "u" || typeof window.matchMedia > "u" ? !1 : window.matchMedia(t).matches, [i, c] = Q(r);
|
|
1127
|
+
return G(() => {
|
|
1077
1128
|
if (typeof window > "u" || typeof window.matchMedia > "u")
|
|
1078
1129
|
return;
|
|
1079
|
-
const o = window.matchMedia(t),
|
|
1080
|
-
return
|
|
1130
|
+
const o = window.matchMedia(t), u = () => c(o.matches);
|
|
1131
|
+
return u(), o.addEventListener("change", u), () => o.removeEventListener("change", u);
|
|
1081
1132
|
}, [t]), i;
|
|
1082
1133
|
}
|
|
1083
|
-
const
|
|
1134
|
+
const Ze = ({
|
|
1084
1135
|
refs: e,
|
|
1085
1136
|
callbacks: t,
|
|
1086
1137
|
currentY: r,
|
|
1087
1138
|
preventDefault: i,
|
|
1088
|
-
lockPane:
|
|
1139
|
+
lockPane: c,
|
|
1089
1140
|
options: o,
|
|
1090
|
-
scrollableAncestor:
|
|
1091
|
-
initialScrollTop:
|
|
1141
|
+
scrollableAncestor: u,
|
|
1142
|
+
initialScrollTop: f
|
|
1092
1143
|
}) => {
|
|
1093
1144
|
if (!e.draggingRef.current) return;
|
|
1094
|
-
const
|
|
1095
|
-
if (!e.draggingRef.current.isActivated && Math.abs(
|
|
1096
|
-
if (
|
|
1097
|
-
if (
|
|
1145
|
+
const l = r - e.draggingRef.current.startY;
|
|
1146
|
+
if (!e.draggingRef.current.isActivated && Math.abs(l) >= o.dragActivationDeltaPx) {
|
|
1147
|
+
if (u && t.getIsOpen()) {
|
|
1148
|
+
if (u.scrollTop !== f) {
|
|
1098
1149
|
e.draggingRef.current = null, t.dragSidebar(null);
|
|
1099
1150
|
return;
|
|
1100
1151
|
}
|
|
1101
|
-
const { scrollTop: p, scrollHeight:
|
|
1102
|
-
if (
|
|
1152
|
+
const { scrollTop: p, scrollHeight: P, clientHeight: L } = u, I = p > 1, $ = p + L < P - 1;
|
|
1153
|
+
if (l > 0 && I || l < 0 && $) {
|
|
1103
1154
|
e.draggingRef.current = null, t.dragSidebar(null);
|
|
1104
1155
|
return;
|
|
1105
1156
|
}
|
|
1106
1157
|
}
|
|
1107
|
-
e.draggingRef.current.isActivated = !0,
|
|
1158
|
+
e.draggingRef.current.isActivated = !0, c();
|
|
1108
1159
|
}
|
|
1109
1160
|
if (!e.draggingRef.current.isActivated) return;
|
|
1110
1161
|
e.prevYRef.current = e.currentYRef.current, e.currentYRef.current = r;
|
|
1111
|
-
const
|
|
1112
|
-
let
|
|
1113
|
-
if ((
|
|
1162
|
+
const s = t.getIsOpen(), w = window.innerHeight;
|
|
1163
|
+
let y = !1;
|
|
1164
|
+
if ((s || e.draggingRef.current.startY >= w - o.edgeActivationWidthPx) && (y = !0), !y) {
|
|
1114
1165
|
e.draggingRef.current = null, t.dragSidebar(null);
|
|
1115
1166
|
return;
|
|
1116
1167
|
}
|
|
1117
1168
|
i();
|
|
1118
|
-
const
|
|
1119
|
-
if (
|
|
1120
|
-
if (
|
|
1169
|
+
const h = o.sidebarHeightPx, S = o.midAnchorPointPx, C = o.midAnchorPoint && !o.swipeToOpen && S < h;
|
|
1170
|
+
if (s)
|
|
1171
|
+
if (C) {
|
|
1121
1172
|
const p = t.getBottomAnchorState();
|
|
1122
1173
|
if (p === "open") {
|
|
1123
|
-
const
|
|
1174
|
+
const P = Math.max(
|
|
1124
1175
|
0,
|
|
1125
|
-
Math.min(
|
|
1176
|
+
Math.min(h, l - o.dragActivationDeltaPx)
|
|
1126
1177
|
);
|
|
1127
|
-
t.dragSidebar(
|
|
1178
|
+
t.dragSidebar(P);
|
|
1128
1179
|
} else if (p === "midAnchor") {
|
|
1129
|
-
const
|
|
1180
|
+
const P = h - S, L = Math.max(
|
|
1130
1181
|
0,
|
|
1131
1182
|
Math.min(
|
|
1132
|
-
|
|
1133
|
-
|
|
1183
|
+
h,
|
|
1184
|
+
P + l - o.dragActivationDeltaPx
|
|
1134
1185
|
)
|
|
1135
1186
|
);
|
|
1136
|
-
t.dragSidebar(
|
|
1187
|
+
t.dragSidebar(L);
|
|
1137
1188
|
}
|
|
1138
1189
|
} else {
|
|
1139
1190
|
const p = Math.max(
|
|
1140
1191
|
0,
|
|
1141
|
-
Math.min(
|
|
1192
|
+
Math.min(h, l - o.dragActivationDeltaPx)
|
|
1142
1193
|
);
|
|
1143
1194
|
t.dragSidebar(p);
|
|
1144
1195
|
}
|
|
1145
|
-
else if (e.draggingRef.current.startY >=
|
|
1146
|
-
if (
|
|
1147
|
-
const p =
|
|
1196
|
+
else if (e.draggingRef.current.startY >= w - o.edgeActivationWidthPx)
|
|
1197
|
+
if (C) {
|
|
1198
|
+
const p = h - S, P = Math.max(
|
|
1148
1199
|
p,
|
|
1149
1200
|
Math.min(
|
|
1150
|
-
|
|
1151
|
-
|
|
1201
|
+
h,
|
|
1202
|
+
h + l + o.dragActivationDeltaPx
|
|
1152
1203
|
)
|
|
1153
1204
|
);
|
|
1154
|
-
t.dragSidebar(
|
|
1205
|
+
t.dragSidebar(P);
|
|
1155
1206
|
} else {
|
|
1156
1207
|
const p = Math.max(
|
|
1157
1208
|
0,
|
|
1158
1209
|
Math.min(
|
|
1159
|
-
|
|
1160
|
-
|
|
1210
|
+
h,
|
|
1211
|
+
h + l + o.dragActivationDeltaPx
|
|
1161
1212
|
)
|
|
1162
1213
|
);
|
|
1163
1214
|
t.dragSidebar(p);
|
|
1164
1215
|
}
|
|
1165
|
-
},
|
|
1216
|
+
}, ze = ({
|
|
1166
1217
|
refs: e,
|
|
1167
1218
|
callbacks: t,
|
|
1168
1219
|
options: r,
|
|
@@ -1173,127 +1224,127 @@ const Ue = ({
|
|
|
1173
1224
|
e.draggingRef.current = null, e.currentYRef.current = null, e.prevYRef.current = null;
|
|
1174
1225
|
return;
|
|
1175
1226
|
}
|
|
1176
|
-
const
|
|
1227
|
+
const c = e.currentYRef.current ?? e.draggingRef.current.startY, o = e.prevYRef.current ?? e.draggingRef.current.startY, u = e.draggingRef.current.startY, f = t.getIsOpen(), l = window.innerHeight;
|
|
1177
1228
|
e.draggingRef.current = null, e.currentYRef.current = null, e.prevYRef.current = null, i();
|
|
1178
|
-
const
|
|
1179
|
-
if (
|
|
1180
|
-
if (
|
|
1181
|
-
const p = t.getBottomAnchorState(),
|
|
1229
|
+
const s = c < o, w = c >= o, y = u >= l - r.edgeActivationWidthPx, h = r.midAnchorPointPx, S = r.sidebarHeightPx, C = r.midAnchorPoint && !r.swipeToOpen && h < S;
|
|
1230
|
+
if (f)
|
|
1231
|
+
if (C) {
|
|
1232
|
+
const p = t.getBottomAnchorState(), P = S - h;
|
|
1182
1233
|
if (p === "open") {
|
|
1183
|
-
const
|
|
1184
|
-
|
|
1234
|
+
const L = Math.max(0, c - u);
|
|
1235
|
+
w ? L > P ? t.closeSidebar() : t.openToMidAnchor() : L < P ? t.openSidebarFully() : t.closeSidebar(), t.dragSidebar(null);
|
|
1185
1236
|
} else if (p === "midAnchor") {
|
|
1186
|
-
const
|
|
1237
|
+
const L = S - h, I = Math.max(
|
|
1187
1238
|
0,
|
|
1188
|
-
Math.min(S,
|
|
1239
|
+
Math.min(S, L + (c - u))
|
|
1189
1240
|
);
|
|
1190
|
-
|
|
1241
|
+
s ? I < P ? t.openSidebarFully() : t.openToMidAnchor() : t.closeSidebar(), t.dragSidebar(null);
|
|
1191
1242
|
}
|
|
1192
1243
|
} else
|
|
1193
|
-
|
|
1194
|
-
else
|
|
1244
|
+
w ? t.closeSidebar() : t.openSidebar(), t.dragSidebar(null);
|
|
1245
|
+
else y && s ? (C ? t.openToMidAnchor() : t.openSidebar(), t.dragSidebar(null)) : (t.closeSidebar(), t.dragSidebar(null));
|
|
1195
1246
|
};
|
|
1196
|
-
function
|
|
1247
|
+
function ur(e, t) {
|
|
1197
1248
|
var k, v;
|
|
1198
1249
|
const r = fe(e.mediaQueryWidth), {
|
|
1199
1250
|
lockedSidebar: i,
|
|
1200
|
-
setLockedSidebar:
|
|
1251
|
+
setLockedSidebar: c,
|
|
1201
1252
|
bottomSidebars: o,
|
|
1202
|
-
openSidebar:
|
|
1203
|
-
openSidebarFully:
|
|
1204
|
-
closeSidebar:
|
|
1205
|
-
dragSidebar:
|
|
1206
|
-
openSidebarToMidAnchor:
|
|
1207
|
-
activeBottomDragIdRef:
|
|
1208
|
-
bottomFocusStackRef:
|
|
1209
|
-
} = ee(), S = ((k = o[t]) == null ? void 0 : k.isOpen) ?? !1,
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
}, [
|
|
1253
|
+
openSidebar: u,
|
|
1254
|
+
openSidebarFully: f,
|
|
1255
|
+
closeSidebar: l,
|
|
1256
|
+
dragSidebar: s,
|
|
1257
|
+
openSidebarToMidAnchor: w,
|
|
1258
|
+
activeBottomDragIdRef: y,
|
|
1259
|
+
bottomFocusStackRef: h
|
|
1260
|
+
} = ee(), S = ((k = o[t]) == null ? void 0 : k.isOpen) ?? !1, C = ((v = o[t]) == null ? void 0 : v.anchorState) ?? "closed", p = _(null), P = _(null), L = _(null), I = _(null), $ = _(0), j = _(null), B = _(C);
|
|
1261
|
+
G(() => {
|
|
1262
|
+
B.current = C;
|
|
1263
|
+
}, [C]), G(() => {
|
|
1213
1264
|
if (!r || i && i !== "bottom" || e.disabled) return;
|
|
1214
|
-
const
|
|
1265
|
+
const x = {
|
|
1215
1266
|
getIsOpen: () => S,
|
|
1216
|
-
openSidebar: () =>
|
|
1217
|
-
openSidebarFully: () =>
|
|
1218
|
-
closeSidebar: () =>
|
|
1219
|
-
dragSidebar: (n) =>
|
|
1220
|
-
getBottomAnchorState: () =>
|
|
1221
|
-
openToMidAnchor: () =>
|
|
1222
|
-
},
|
|
1267
|
+
openSidebar: () => u("bottom", { id: t }),
|
|
1268
|
+
openSidebarFully: () => f("bottom", { id: t }),
|
|
1269
|
+
closeSidebar: () => l("bottom", { id: t }),
|
|
1270
|
+
dragSidebar: (n) => s("bottom", n, { id: t }),
|
|
1271
|
+
getBottomAnchorState: () => B.current,
|
|
1272
|
+
openToMidAnchor: () => w("bottom", { id: t })
|
|
1273
|
+
}, E = {
|
|
1223
1274
|
draggingRef: p,
|
|
1224
|
-
currentYRef:
|
|
1225
|
-
prevYRef:
|
|
1226
|
-
},
|
|
1227
|
-
const n =
|
|
1275
|
+
currentYRef: P,
|
|
1276
|
+
prevYRef: L
|
|
1277
|
+
}, M = () => y.current !== null && y.current !== t, q = () => {
|
|
1278
|
+
const n = h.current;
|
|
1228
1279
|
return n.length === 0 ? !0 : n[n.length - 1] === t;
|
|
1229
1280
|
}, D = () => {
|
|
1230
|
-
if (
|
|
1281
|
+
if (M()) {
|
|
1231
1282
|
p.current = null;
|
|
1232
1283
|
return;
|
|
1233
1284
|
}
|
|
1234
|
-
|
|
1235
|
-
const n =
|
|
1285
|
+
y.current = t, c("bottom");
|
|
1286
|
+
const n = I.current;
|
|
1236
1287
|
n && (j.current = n.style.overflowY, n.style.overflowY = "hidden");
|
|
1237
|
-
},
|
|
1238
|
-
|
|
1239
|
-
const n =
|
|
1288
|
+
}, V = () => {
|
|
1289
|
+
y.current === t && (y.current = null);
|
|
1290
|
+
const n = I.current;
|
|
1240
1291
|
n && j.current !== null && (n.style.overflowY = j.current, j.current = null);
|
|
1241
1292
|
};
|
|
1242
|
-
function
|
|
1243
|
-
var
|
|
1244
|
-
if (i && i !== "bottom" ||
|
|
1245
|
-
const
|
|
1246
|
-
|
|
1247
|
-
refs:
|
|
1248
|
-
clientX:
|
|
1249
|
-
clientY:
|
|
1250
|
-
touchId:
|
|
1293
|
+
function U(n) {
|
|
1294
|
+
var F;
|
|
1295
|
+
if (i && i !== "bottom" || M() || !q() || de(n.target) || n.changedTouches.length === 0) return;
|
|
1296
|
+
const m = n.changedTouches[0], T = window.innerHeight, R = x.getIsOpen(), z = m.clientY >= T - e.edgeActivationWidthPx;
|
|
1297
|
+
R && !e.swipeToClose || !R && !e.swipeToOpen || (R || z) && (I.current = Ue(n.target), $.current = ((F = I.current) == null ? void 0 : F.scrollTop) ?? 0, Ge({
|
|
1298
|
+
refs: E,
|
|
1299
|
+
clientX: m.clientX,
|
|
1300
|
+
clientY: m.clientY,
|
|
1301
|
+
touchId: m.identifier,
|
|
1251
1302
|
isMouse: !1
|
|
1252
1303
|
}));
|
|
1253
1304
|
}
|
|
1254
1305
|
function H(n) {
|
|
1255
1306
|
if (i && i !== "bottom") return;
|
|
1256
|
-
if (
|
|
1307
|
+
if (M()) {
|
|
1257
1308
|
p.current = null;
|
|
1258
1309
|
return;
|
|
1259
1310
|
}
|
|
1260
1311
|
if (!p.current || p.current.isMouse) return;
|
|
1261
|
-
const
|
|
1262
|
-
|
|
1263
|
-
refs:
|
|
1264
|
-
callbacks:
|
|
1265
|
-
currentY:
|
|
1312
|
+
const m = p.current.activeTouchId, T = Ae(n.changedTouches, m);
|
|
1313
|
+
T && Ze({
|
|
1314
|
+
refs: E,
|
|
1315
|
+
callbacks: x,
|
|
1316
|
+
currentY: T.clientY,
|
|
1266
1317
|
preventDefault: () => n.preventDefault(),
|
|
1267
1318
|
lockPane: D,
|
|
1268
1319
|
options: e,
|
|
1269
|
-
scrollableAncestor:
|
|
1270
|
-
initialScrollTop:
|
|
1320
|
+
scrollableAncestor: I.current,
|
|
1321
|
+
initialScrollTop: $.current
|
|
1271
1322
|
});
|
|
1272
1323
|
}
|
|
1273
|
-
function
|
|
1324
|
+
function N(n) {
|
|
1274
1325
|
if (i && i !== "bottom" || !p.current || p.current.isMouse) return;
|
|
1275
|
-
const
|
|
1276
|
-
Pe(n.changedTouches,
|
|
1277
|
-
refs:
|
|
1278
|
-
callbacks:
|
|
1326
|
+
const m = p.current.activeTouchId;
|
|
1327
|
+
Pe(n.changedTouches, m) && ze({
|
|
1328
|
+
refs: E,
|
|
1329
|
+
callbacks: x,
|
|
1279
1330
|
options: e,
|
|
1280
|
-
onDragEnd:
|
|
1331
|
+
onDragEnd: V
|
|
1281
1332
|
});
|
|
1282
1333
|
}
|
|
1283
|
-
function
|
|
1284
|
-
i && i !== "bottom" || !p.current || p.current.isMouse || (
|
|
1285
|
-
refs:
|
|
1286
|
-
dragSidebar:
|
|
1334
|
+
function Z() {
|
|
1335
|
+
i && i !== "bottom" || !p.current || p.current.isMouse || (V(), ar({
|
|
1336
|
+
refs: E,
|
|
1337
|
+
dragSidebar: x.dragSidebar,
|
|
1287
1338
|
onDeactivate: () => {
|
|
1288
1339
|
}
|
|
1289
1340
|
}));
|
|
1290
1341
|
}
|
|
1291
1342
|
function oe(n) {
|
|
1292
|
-
var
|
|
1293
|
-
if (i && i !== "bottom" ||
|
|
1294
|
-
const
|
|
1295
|
-
|
|
1296
|
-
refs:
|
|
1343
|
+
var z;
|
|
1344
|
+
if (i && i !== "bottom" || M() || !q() || de(n.target) || n.button !== 0) return;
|
|
1345
|
+
const m = window.innerHeight, T = x.getIsOpen(), R = n.clientY >= m - e.edgeActivationWidthPx;
|
|
1346
|
+
T && !e.swipeToClose || !T && !e.swipeToOpen || (T || R) && (I.current = Ue(n.target), $.current = ((z = I.current) == null ? void 0 : z.scrollTop) ?? 0, Ge({
|
|
1347
|
+
refs: E,
|
|
1297
1348
|
clientX: n.clientX,
|
|
1298
1349
|
clientY: n.clientY,
|
|
1299
1350
|
touchId: null,
|
|
@@ -1302,96 +1353,108 @@ function sr(e, t) {
|
|
|
1302
1353
|
}
|
|
1303
1354
|
function ne(n) {
|
|
1304
1355
|
if (!(i && i !== "bottom")) {
|
|
1305
|
-
if (
|
|
1356
|
+
if (M()) {
|
|
1306
1357
|
p.current = null;
|
|
1307
1358
|
return;
|
|
1308
1359
|
}
|
|
1309
|
-
!p.current || !p.current.isMouse ||
|
|
1310
|
-
refs:
|
|
1311
|
-
callbacks:
|
|
1360
|
+
!p.current || !p.current.isMouse || Ze({
|
|
1361
|
+
refs: E,
|
|
1362
|
+
callbacks: x,
|
|
1312
1363
|
currentY: n.clientY,
|
|
1313
1364
|
preventDefault: () => n.preventDefault(),
|
|
1314
1365
|
lockPane: D,
|
|
1315
1366
|
options: e,
|
|
1316
|
-
scrollableAncestor:
|
|
1317
|
-
initialScrollTop:
|
|
1367
|
+
scrollableAncestor: I.current,
|
|
1368
|
+
initialScrollTop: $.current
|
|
1318
1369
|
});
|
|
1319
1370
|
}
|
|
1320
1371
|
}
|
|
1321
1372
|
function ae() {
|
|
1322
|
-
i && i !== "bottom" || !p.current || !p.current.isMouse ||
|
|
1323
|
-
refs:
|
|
1324
|
-
callbacks:
|
|
1373
|
+
i && i !== "bottom" || !p.current || !p.current.isMouse || ze({
|
|
1374
|
+
refs: E,
|
|
1375
|
+
callbacks: x,
|
|
1325
1376
|
options: e,
|
|
1326
|
-
onDragEnd:
|
|
1377
|
+
onDragEnd: V
|
|
1327
1378
|
});
|
|
1328
1379
|
}
|
|
1329
|
-
return window.addEventListener("touchstart",
|
|
1330
|
-
window.removeEventListener("touchstart",
|
|
1380
|
+
return window.addEventListener("touchstart", U, { passive: !0 }), window.addEventListener("touchmove", H, { passive: !1 }), window.addEventListener("touchend", N, { passive: !0 }), window.addEventListener("touchcancel", Z, { passive: !0 }), window.addEventListener("mousedown", oe, { passive: !0 }), window.addEventListener("mousemove", ne, { passive: !1 }), window.addEventListener("mouseup", ae, { passive: !0 }), () => {
|
|
1381
|
+
window.removeEventListener("touchstart", U), window.removeEventListener("touchmove", H), window.removeEventListener("touchend", N), window.removeEventListener("touchcancel", Z), window.removeEventListener("mousedown", oe), window.removeEventListener("mousemove", ne), window.removeEventListener("mouseup", ae);
|
|
1331
1382
|
};
|
|
1332
1383
|
}, [
|
|
1333
1384
|
t,
|
|
1334
1385
|
r,
|
|
1335
1386
|
S,
|
|
1336
|
-
f,
|
|
1337
|
-
c,
|
|
1338
|
-
d,
|
|
1339
1387
|
u,
|
|
1340
|
-
|
|
1388
|
+
f,
|
|
1389
|
+
l,
|
|
1341
1390
|
s,
|
|
1391
|
+
i,
|
|
1392
|
+
c,
|
|
1342
1393
|
e,
|
|
1343
|
-
T,
|
|
1344
1394
|
w,
|
|
1345
|
-
|
|
1395
|
+
y,
|
|
1396
|
+
h
|
|
1346
1397
|
]);
|
|
1347
1398
|
}
|
|
1348
|
-
function
|
|
1399
|
+
function wr({
|
|
1349
1400
|
id: e = "primary",
|
|
1350
1401
|
className: t,
|
|
1351
1402
|
children: r,
|
|
1352
1403
|
ToggleComponent: i,
|
|
1353
|
-
|
|
1404
|
+
ariaLabel: c,
|
|
1405
|
+
...o
|
|
1354
1406
|
}) {
|
|
1355
|
-
var
|
|
1356
|
-
if ((r == null ? void 0 : r.type) ===
|
|
1407
|
+
var P;
|
|
1408
|
+
if ((r == null ? void 0 : r.type) === O.Fragment)
|
|
1357
1409
|
throw new Error("Fragments is not allowed in SwipeBarBottom");
|
|
1358
|
-
const { bottomSidebars:
|
|
1359
|
-
|
|
1360
|
-
const
|
|
1361
|
-
|
|
1362
|
-
const
|
|
1363
|
-
return
|
|
1364
|
-
w
|
|
1365
|
-
|
|
1410
|
+
const { bottomSidebars: u, closeSidebar: f, registerBottomSidebar: l, unregisterBottomSidebar: s } = ee(), w = _(null), y = _(null);
|
|
1411
|
+
G(() => (l(e, { sidebarRef: w, toggleRef: y }), () => s(e)), [e, l, s]);
|
|
1412
|
+
const h = Me("bottom", o, e), S = fe(h.mediaQueryWidth);
|
|
1413
|
+
ur(h, e);
|
|
1414
|
+
const C = ((P = u[e]) == null ? void 0 : P.isOpen) ?? !1, p = Y(() => f("bottom", { id: e }), [f, e]);
|
|
1415
|
+
return _e({
|
|
1416
|
+
sidebarRef: w,
|
|
1417
|
+
triggerRef: y,
|
|
1418
|
+
isOpen: C,
|
|
1419
|
+
onClose: p,
|
|
1420
|
+
transitionMs: h.transitionMs
|
|
1421
|
+
}), /* @__PURE__ */ O.jsxs(O.Fragment, { children: [
|
|
1422
|
+
h.showOverlay && /* @__PURE__ */ O.jsx(
|
|
1423
|
+
Ce,
|
|
1366
1424
|
{
|
|
1367
|
-
isCollapsed: !
|
|
1425
|
+
isCollapsed: !C,
|
|
1368
1426
|
setCollapsed: () => f("bottom", { id: e }),
|
|
1369
|
-
closeSidebarOnClick:
|
|
1370
|
-
transitionMs:
|
|
1371
|
-
overlayBackgroundColor:
|
|
1372
|
-
overlayZIndex:
|
|
1427
|
+
closeSidebarOnClick: h.closeSidebarOnOverlayClick,
|
|
1428
|
+
transitionMs: h.transitionMs,
|
|
1429
|
+
overlayBackgroundColor: h.overlayBackgroundColor,
|
|
1430
|
+
overlayZIndex: h.overlayZIndex
|
|
1373
1431
|
}
|
|
1374
1432
|
),
|
|
1375
|
-
/* @__PURE__ */
|
|
1376
|
-
|
|
1433
|
+
/* @__PURE__ */ O.jsx(
|
|
1434
|
+
sr,
|
|
1377
1435
|
{
|
|
1378
1436
|
id: e,
|
|
1379
|
-
toggleRef:
|
|
1380
|
-
options:
|
|
1381
|
-
showToggle:
|
|
1437
|
+
toggleRef: y,
|
|
1438
|
+
options: h,
|
|
1439
|
+
showToggle: h.showToggle,
|
|
1382
1440
|
ToggleComponent: i
|
|
1383
1441
|
}
|
|
1384
1442
|
),
|
|
1385
|
-
/* @__PURE__ */
|
|
1443
|
+
/* @__PURE__ */ O.jsx(
|
|
1386
1444
|
"div",
|
|
1387
1445
|
{
|
|
1388
|
-
ref:
|
|
1446
|
+
ref: w,
|
|
1447
|
+
id: `swipebar-bottom-${e}`,
|
|
1448
|
+
role: "dialog",
|
|
1449
|
+
"aria-modal": C,
|
|
1450
|
+
"aria-label": c ?? "Bottom sidebar",
|
|
1451
|
+
inert: !C,
|
|
1389
1452
|
style: {
|
|
1390
|
-
...Qt,
|
|
1391
1453
|
...Jt,
|
|
1392
|
-
...
|
|
1393
|
-
...
|
|
1394
|
-
|
|
1454
|
+
...Kt,
|
|
1455
|
+
...h.isAbsolute || S ? er : {},
|
|
1456
|
+
...t ? {} : { backgroundColor: Ee },
|
|
1457
|
+
zIndex: h.swipeBarZIndex
|
|
1395
1458
|
},
|
|
1396
1459
|
className: t,
|
|
1397
1460
|
children: r
|
|
@@ -1399,71 +1462,74 @@ function mr({
|
|
|
1399
1462
|
)
|
|
1400
1463
|
] });
|
|
1401
1464
|
}
|
|
1402
|
-
function
|
|
1403
|
-
const { openSidebar: i, leftToggleRef:
|
|
1404
|
-
return t ? /* @__PURE__ */
|
|
1465
|
+
function dr({ options: e, showToggle: t = !0, ToggleComponent: r }) {
|
|
1466
|
+
const { openSidebar: i, leftToggleRef: c, isLeftOpen: o, closeSidebar: u } = ee();
|
|
1467
|
+
return t ? /* @__PURE__ */ O.jsx(
|
|
1405
1468
|
"div",
|
|
1406
1469
|
{
|
|
1407
|
-
ref:
|
|
1470
|
+
ref: c,
|
|
1408
1471
|
style: {
|
|
1409
|
-
...
|
|
1472
|
+
...nt,
|
|
1410
1473
|
transition: `transform ${e.transitionMs}ms ease, opacity ${e.transitionMs}ms ease`,
|
|
1411
1474
|
left: 0,
|
|
1412
1475
|
zIndex: e.toggleZIndex
|
|
1413
1476
|
},
|
|
1414
|
-
children: (!o || o && !e.showOverlay) && /* @__PURE__ */
|
|
1477
|
+
children: (!o || o && !e.showOverlay) && /* @__PURE__ */ O.jsx(
|
|
1415
1478
|
"button",
|
|
1416
1479
|
{
|
|
1417
1480
|
type: "button",
|
|
1481
|
+
"aria-expanded": o,
|
|
1482
|
+
"aria-controls": "swipebar-left",
|
|
1483
|
+
"aria-label": o ? "Close left sidebar" : "Open left sidebar",
|
|
1418
1484
|
onClick: () => {
|
|
1419
|
-
e.disabled || (o ?
|
|
1485
|
+
e.disabled || (o ? u("left") : i("left"));
|
|
1420
1486
|
},
|
|
1421
1487
|
disabled: e.disabled,
|
|
1422
1488
|
style: {
|
|
1423
1489
|
marginLeft: `${e.toggleIconEdgeDistancePx}px`,
|
|
1424
1490
|
...o ? { transform: "rotate(180deg)" } : {}
|
|
1425
1491
|
},
|
|
1426
|
-
children: r ?? /* @__PURE__ */
|
|
1492
|
+
children: r ?? /* @__PURE__ */ O.jsx(Ie, { size: e.toggleIconSizePx, color: e.toggleIconColor })
|
|
1427
1493
|
}
|
|
1428
1494
|
)
|
|
1429
1495
|
}
|
|
1430
1496
|
) : null;
|
|
1431
1497
|
}
|
|
1432
|
-
const
|
|
1498
|
+
const qe = ({
|
|
1433
1499
|
refs: e,
|
|
1434
1500
|
callbacks: t,
|
|
1435
1501
|
currentX: r,
|
|
1436
1502
|
preventDefault: i,
|
|
1437
|
-
lockPane:
|
|
1503
|
+
lockPane: c,
|
|
1438
1504
|
options: o
|
|
1439
1505
|
}) => {
|
|
1440
1506
|
if (!e.draggingRef.current) return;
|
|
1441
|
-
const
|
|
1442
|
-
if (!e.draggingRef.current.isActivated && Math.abs(
|
|
1507
|
+
const u = r - e.draggingRef.current.startX;
|
|
1508
|
+
if (!e.draggingRef.current.isActivated && Math.abs(u) >= o.dragActivationDeltaPx && (e.draggingRef.current.isActivated = !0, c()), !e.draggingRef.current.isActivated) return;
|
|
1443
1509
|
e.prevXRef.current = e.currentXRef.current, e.currentXRef.current = r;
|
|
1444
|
-
const
|
|
1445
|
-
let
|
|
1446
|
-
if ((
|
|
1510
|
+
const f = t.getIsOpen();
|
|
1511
|
+
let l = !1;
|
|
1512
|
+
if ((f || e.draggingRef.current.startX <= o.edgeActivationWidthPx) && (l = !0), !l) {
|
|
1447
1513
|
e.draggingRef.current = null, t.dragSidebar(null);
|
|
1448
1514
|
return;
|
|
1449
1515
|
}
|
|
1450
1516
|
i();
|
|
1451
|
-
const
|
|
1452
|
-
if (
|
|
1453
|
-
const
|
|
1517
|
+
const s = o.sidebarWidthPx;
|
|
1518
|
+
if (f) {
|
|
1519
|
+
const w = Math.min(
|
|
1454
1520
|
0,
|
|
1455
|
-
Math.max(-
|
|
1521
|
+
Math.max(-s, u + o.dragActivationDeltaPx)
|
|
1456
1522
|
);
|
|
1457
|
-
t.dragSidebar(
|
|
1523
|
+
t.dragSidebar(w);
|
|
1458
1524
|
} else if (e.draggingRef.current.startX <= o.edgeActivationWidthPx) {
|
|
1459
|
-
const
|
|
1525
|
+
const w = Math.min(
|
|
1460
1526
|
0,
|
|
1461
1527
|
Math.max(
|
|
1462
|
-
-
|
|
1463
|
-
-
|
|
1528
|
+
-s,
|
|
1529
|
+
-s + u - o.dragActivationDeltaPx
|
|
1464
1530
|
)
|
|
1465
1531
|
);
|
|
1466
|
-
t.dragSidebar(
|
|
1532
|
+
t.dragSidebar(w);
|
|
1467
1533
|
}
|
|
1468
1534
|
}, Ve = ({ refs: e, callbacks: t, options: r }) => {
|
|
1469
1535
|
if (!e.draggingRef.current) return;
|
|
@@ -1471,76 +1537,76 @@ const ze = ({
|
|
|
1471
1537
|
e.draggingRef.current = null, e.currentXRef.current = null, e.prevXRef.current = null;
|
|
1472
1538
|
return;
|
|
1473
1539
|
}
|
|
1474
|
-
const i = e.currentXRef.current ?? e.draggingRef.current.startX,
|
|
1540
|
+
const i = e.currentXRef.current ?? e.draggingRef.current.startX, c = e.prevXRef.current ?? e.draggingRef.current.startX, o = e.draggingRef.current.startX, u = t.getIsOpen();
|
|
1475
1541
|
e.draggingRef.current = null, e.currentXRef.current = null, e.prevXRef.current = null;
|
|
1476
|
-
const
|
|
1477
|
-
|
|
1542
|
+
const f = i >= c, l = i < c, s = o <= r.edgeActivationWidthPx;
|
|
1543
|
+
u ? (l ? t.closeSidebar() : t.openSidebar(), t.dragSidebar(null)) : s && f ? (t.openSidebar(), t.dragSidebar(null)) : (t.closeSidebar(), t.dragSidebar(null));
|
|
1478
1544
|
};
|
|
1479
|
-
function
|
|
1545
|
+
function fr(e) {
|
|
1480
1546
|
const t = fe(e.mediaQueryWidth), {
|
|
1481
1547
|
lockedSidebar: r,
|
|
1482
1548
|
setLockedSidebar: i,
|
|
1483
|
-
isLeftOpen:
|
|
1549
|
+
isLeftOpen: c,
|
|
1484
1550
|
openSidebar: o,
|
|
1485
|
-
closeSidebar:
|
|
1486
|
-
dragSidebar:
|
|
1487
|
-
leftSidebarRef:
|
|
1488
|
-
} = ee(),
|
|
1489
|
-
|
|
1551
|
+
closeSidebar: u,
|
|
1552
|
+
dragSidebar: f,
|
|
1553
|
+
leftSidebarRef: l
|
|
1554
|
+
} = ee(), s = _(null), w = _(null), y = _(null);
|
|
1555
|
+
G(() => {
|
|
1490
1556
|
if (!t || r && r !== "left" || e.disabled) return;
|
|
1491
|
-
const
|
|
1492
|
-
getIsOpen: () =>
|
|
1557
|
+
const h = {
|
|
1558
|
+
getIsOpen: () => c,
|
|
1493
1559
|
openSidebar: () => o("left"),
|
|
1494
|
-
closeSidebar: () =>
|
|
1495
|
-
dragSidebar: (v) =>
|
|
1560
|
+
closeSidebar: () => u("left"),
|
|
1561
|
+
dragSidebar: (v) => f("left", v)
|
|
1496
1562
|
}, S = {
|
|
1497
|
-
draggingRef:
|
|
1498
|
-
currentXRef:
|
|
1499
|
-
prevXRef:
|
|
1500
|
-
},
|
|
1501
|
-
function
|
|
1563
|
+
draggingRef: s,
|
|
1564
|
+
currentXRef: w,
|
|
1565
|
+
prevXRef: y
|
|
1566
|
+
}, C = () => i("left"), p = () => i(null);
|
|
1567
|
+
function P(v) {
|
|
1502
1568
|
if (r && r !== "left" || de(v.target) || v.changedTouches.length === 0) return;
|
|
1503
|
-
const
|
|
1504
|
-
|
|
1569
|
+
const x = v.changedTouches[0], E = h.getIsOpen(), M = x.clientX <= e.edgeActivationWidthPx;
|
|
1570
|
+
E && !e.swipeToClose || !E && !e.swipeToOpen || (E || M) && pe({
|
|
1505
1571
|
refs: S,
|
|
1506
|
-
clientX:
|
|
1507
|
-
clientY:
|
|
1508
|
-
touchId:
|
|
1572
|
+
clientX: x.clientX,
|
|
1573
|
+
clientY: x.clientY,
|
|
1574
|
+
touchId: x.identifier,
|
|
1509
1575
|
isMouse: !1
|
|
1510
1576
|
});
|
|
1511
1577
|
}
|
|
1512
|
-
function
|
|
1513
|
-
if (r && r !== "left" || !
|
|
1514
|
-
const
|
|
1515
|
-
|
|
1578
|
+
function L(v) {
|
|
1579
|
+
if (r && r !== "left" || !s.current || s.current.isMouse) return;
|
|
1580
|
+
const x = s.current.activeTouchId, E = Ae(v.changedTouches, x);
|
|
1581
|
+
E && qe({
|
|
1516
1582
|
refs: S,
|
|
1517
|
-
callbacks:
|
|
1518
|
-
currentX:
|
|
1583
|
+
callbacks: h,
|
|
1584
|
+
currentX: E.clientX,
|
|
1519
1585
|
preventDefault: () => v.preventDefault(),
|
|
1520
|
-
lockPane:
|
|
1586
|
+
lockPane: C,
|
|
1521
1587
|
options: e
|
|
1522
1588
|
});
|
|
1523
1589
|
}
|
|
1524
|
-
function
|
|
1525
|
-
if (r && r !== "left" || !
|
|
1526
|
-
const
|
|
1527
|
-
Pe(v.changedTouches,
|
|
1590
|
+
function I(v) {
|
|
1591
|
+
if (r && r !== "left" || !s.current || s.current.isMouse) return;
|
|
1592
|
+
const x = s.current.activeTouchId;
|
|
1593
|
+
Pe(v.changedTouches, x) && Ve({
|
|
1528
1594
|
refs: S,
|
|
1529
|
-
callbacks:
|
|
1595
|
+
callbacks: h,
|
|
1530
1596
|
options: e
|
|
1531
1597
|
});
|
|
1532
1598
|
}
|
|
1533
|
-
function
|
|
1534
|
-
r && r !== "left" || !
|
|
1599
|
+
function $() {
|
|
1600
|
+
r && r !== "left" || !s.current || s.current.isMouse || it({
|
|
1535
1601
|
refs: S,
|
|
1536
|
-
dragSidebar:
|
|
1602
|
+
dragSidebar: h.dragSidebar,
|
|
1537
1603
|
onDeactivate: p
|
|
1538
1604
|
});
|
|
1539
1605
|
}
|
|
1540
1606
|
function j(v) {
|
|
1541
1607
|
if (r && r !== "left" || de(v.target) || v.button !== 0) return;
|
|
1542
|
-
const
|
|
1543
|
-
|
|
1608
|
+
const x = h.getIsOpen(), E = v.clientX <= e.edgeActivationWidthPx;
|
|
1609
|
+
x && !e.swipeToClose || !x && !e.swipeToOpen || (x || E) && pe({
|
|
1544
1610
|
refs: S,
|
|
1545
1611
|
clientX: v.clientX,
|
|
1546
1612
|
clientY: v.clientY,
|
|
@@ -1548,77 +1614,91 @@ function lr(e) {
|
|
|
1548
1614
|
isMouse: !0
|
|
1549
1615
|
});
|
|
1550
1616
|
}
|
|
1551
|
-
function
|
|
1552
|
-
r && r !== "left" || !
|
|
1617
|
+
function B(v) {
|
|
1618
|
+
r && r !== "left" || !s.current || !s.current.isMouse || qe({
|
|
1553
1619
|
refs: S,
|
|
1554
|
-
callbacks:
|
|
1620
|
+
callbacks: h,
|
|
1555
1621
|
currentX: v.clientX,
|
|
1556
1622
|
preventDefault: () => v.preventDefault(),
|
|
1557
|
-
lockPane:
|
|
1623
|
+
lockPane: C,
|
|
1558
1624
|
options: e
|
|
1559
1625
|
});
|
|
1560
1626
|
}
|
|
1561
1627
|
function k() {
|
|
1562
|
-
r && r !== "left" || !
|
|
1628
|
+
r && r !== "left" || !s.current || !s.current.isMouse || Ve({
|
|
1563
1629
|
refs: S,
|
|
1564
|
-
callbacks:
|
|
1630
|
+
callbacks: h,
|
|
1565
1631
|
options: e
|
|
1566
1632
|
});
|
|
1567
1633
|
}
|
|
1568
|
-
return window.addEventListener("touchstart",
|
|
1569
|
-
window.removeEventListener("touchstart",
|
|
1634
|
+
return window.addEventListener("touchstart", P, { passive: !0 }), window.addEventListener("touchmove", L, { passive: !1 }), window.addEventListener("touchend", I, { passive: !0 }), window.addEventListener("touchcancel", $, { passive: !0 }), window.addEventListener("mousedown", j, { passive: !0 }), window.addEventListener("mousemove", B, { passive: !1 }), window.addEventListener("mouseup", k, { passive: !0 }), () => {
|
|
1635
|
+
window.removeEventListener("touchstart", P), window.removeEventListener("touchmove", L), window.removeEventListener("touchend", I), window.removeEventListener("touchcancel", $), window.removeEventListener("mousedown", j), window.removeEventListener("mousemove", B), window.removeEventListener("mouseup", k);
|
|
1570
1636
|
};
|
|
1571
1637
|
}, [
|
|
1572
1638
|
t,
|
|
1573
|
-
|
|
1639
|
+
c,
|
|
1574
1640
|
o,
|
|
1641
|
+
u,
|
|
1575
1642
|
f,
|
|
1576
|
-
c,
|
|
1577
1643
|
r,
|
|
1578
1644
|
i,
|
|
1579
|
-
|
|
1645
|
+
l,
|
|
1580
1646
|
e
|
|
1581
1647
|
]);
|
|
1582
1648
|
}
|
|
1583
|
-
function
|
|
1649
|
+
function pr({
|
|
1584
1650
|
className: e,
|
|
1585
1651
|
children: t,
|
|
1586
1652
|
ToggleComponent: r,
|
|
1587
|
-
|
|
1653
|
+
ariaLabel: i,
|
|
1654
|
+
...c
|
|
1588
1655
|
}) {
|
|
1589
|
-
if ((t == null ? void 0 : t.type) ===
|
|
1656
|
+
if ((t == null ? void 0 : t.type) === O.Fragment)
|
|
1590
1657
|
throw new Error("Fragments is not allowed in SwipeBarLeft");
|
|
1591
|
-
const { isLeftOpen:
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1658
|
+
const { isLeftOpen: o, closeSidebar: u, leftSidebarRef: f, leftToggleRef: l } = ee(), s = Me("left", c), w = fe(s.mediaQueryWidth);
|
|
1659
|
+
fr(s);
|
|
1660
|
+
const y = Y(() => u("left"), [u]);
|
|
1661
|
+
return _e({
|
|
1662
|
+
sidebarRef: f,
|
|
1663
|
+
triggerRef: l,
|
|
1664
|
+
isOpen: o,
|
|
1665
|
+
onClose: y,
|
|
1666
|
+
transitionMs: s.transitionMs
|
|
1667
|
+
}), /* @__PURE__ */ O.jsxs(O.Fragment, { children: [
|
|
1668
|
+
s.showOverlay && /* @__PURE__ */ O.jsx(
|
|
1669
|
+
Ce,
|
|
1595
1670
|
{
|
|
1596
|
-
isCollapsed: !
|
|
1597
|
-
setCollapsed: () =>
|
|
1598
|
-
closeSidebarOnClick:
|
|
1599
|
-
transitionMs:
|
|
1600
|
-
overlayBackgroundColor:
|
|
1601
|
-
overlayZIndex:
|
|
1671
|
+
isCollapsed: !o,
|
|
1672
|
+
setCollapsed: () => u("left"),
|
|
1673
|
+
closeSidebarOnClick: s.closeSidebarOnOverlayClick,
|
|
1674
|
+
transitionMs: s.transitionMs,
|
|
1675
|
+
overlayBackgroundColor: s.overlayBackgroundColor,
|
|
1676
|
+
overlayZIndex: s.overlayZIndex
|
|
1602
1677
|
}
|
|
1603
1678
|
),
|
|
1604
|
-
/* @__PURE__ */
|
|
1605
|
-
|
|
1679
|
+
/* @__PURE__ */ O.jsx(
|
|
1680
|
+
dr,
|
|
1606
1681
|
{
|
|
1607
|
-
options:
|
|
1608
|
-
showToggle:
|
|
1682
|
+
options: s,
|
|
1683
|
+
showToggle: s.showToggle,
|
|
1609
1684
|
ToggleComponent: r
|
|
1610
1685
|
}
|
|
1611
1686
|
),
|
|
1612
|
-
/* @__PURE__ */
|
|
1687
|
+
/* @__PURE__ */ O.jsx(
|
|
1613
1688
|
"div",
|
|
1614
1689
|
{
|
|
1615
1690
|
ref: f,
|
|
1691
|
+
id: "swipebar-left",
|
|
1692
|
+
role: "dialog",
|
|
1693
|
+
"aria-modal": o,
|
|
1694
|
+
"aria-label": i ?? "Left sidebar",
|
|
1695
|
+
inert: !o,
|
|
1616
1696
|
style: {
|
|
1617
|
-
...
|
|
1618
|
-
...
|
|
1619
|
-
...
|
|
1620
|
-
...e ? {} : { backgroundColor:
|
|
1621
|
-
zIndex:
|
|
1697
|
+
...rt,
|
|
1698
|
+
...zt,
|
|
1699
|
+
...s.isAbsolute || w ? Vt : {},
|
|
1700
|
+
...e ? {} : { backgroundColor: Ee },
|
|
1701
|
+
zIndex: s.swipeBarZIndex
|
|
1622
1702
|
},
|
|
1623
1703
|
className: e,
|
|
1624
1704
|
children: t
|
|
@@ -1626,26 +1706,29 @@ function vr({
|
|
|
1626
1706
|
)
|
|
1627
1707
|
] });
|
|
1628
1708
|
}
|
|
1629
|
-
function
|
|
1630
|
-
const { openSidebar: i, rightToggleRef:
|
|
1709
|
+
function gr({ options: e, showToggle: t = !0, ToggleComponent: r }) {
|
|
1710
|
+
const { openSidebar: i, rightToggleRef: c, isRightOpen: o, closeSidebar: u } = ee();
|
|
1631
1711
|
return t ? (
|
|
1632
1712
|
// 1px wide container
|
|
1633
|
-
/* @__PURE__ */
|
|
1713
|
+
/* @__PURE__ */ O.jsx(
|
|
1634
1714
|
"div",
|
|
1635
1715
|
{
|
|
1636
|
-
ref:
|
|
1716
|
+
ref: c,
|
|
1637
1717
|
style: {
|
|
1638
|
-
...
|
|
1718
|
+
...nt,
|
|
1639
1719
|
transition: `transform ${e.transitionMs}ms ease, opacity ${e.transitionMs}ms ease`,
|
|
1640
1720
|
right: 0,
|
|
1641
1721
|
zIndex: e.toggleZIndex
|
|
1642
1722
|
},
|
|
1643
|
-
children: (!o || o && !e.showOverlay) && /* @__PURE__ */
|
|
1723
|
+
children: (!o || o && !e.showOverlay) && /* @__PURE__ */ O.jsx(
|
|
1644
1724
|
"button",
|
|
1645
1725
|
{
|
|
1646
1726
|
type: "button",
|
|
1727
|
+
"aria-expanded": o,
|
|
1728
|
+
"aria-controls": "swipebar-right",
|
|
1729
|
+
"aria-label": o ? "Close right sidebar" : "Open right sidebar",
|
|
1647
1730
|
onClick: () => {
|
|
1648
|
-
e.disabled || (o ?
|
|
1731
|
+
e.disabled || (o ? u("right") : i("right"));
|
|
1649
1732
|
},
|
|
1650
1733
|
disabled: e.disabled,
|
|
1651
1734
|
style: {
|
|
@@ -1653,125 +1736,125 @@ function ur({ options: e, showToggle: t = !0, ToggleComponent: r }) {
|
|
|
1653
1736
|
// reverse because we are using the same icon for both left and right
|
|
1654
1737
|
...o ? {} : { transform: "rotate(180deg)" }
|
|
1655
1738
|
},
|
|
1656
|
-
children: r ?? /* @__PURE__ */
|
|
1739
|
+
children: r ?? /* @__PURE__ */ O.jsx(Ie, { size: e.toggleIconSizePx, color: e.toggleIconColor })
|
|
1657
1740
|
}
|
|
1658
1741
|
)
|
|
1659
1742
|
}
|
|
1660
1743
|
)
|
|
1661
1744
|
) : null;
|
|
1662
1745
|
}
|
|
1663
|
-
const
|
|
1746
|
+
const Qe = ({
|
|
1664
1747
|
refs: e,
|
|
1665
1748
|
callbacks: t,
|
|
1666
1749
|
currentX: r,
|
|
1667
1750
|
preventDefault: i,
|
|
1668
|
-
lockPane:
|
|
1751
|
+
lockPane: c,
|
|
1669
1752
|
options: o
|
|
1670
1753
|
}) => {
|
|
1671
1754
|
if (!e.draggingRef.current) return;
|
|
1672
|
-
const
|
|
1673
|
-
if (!
|
|
1755
|
+
const u = window.innerWidth, f = r - e.draggingRef.current.startX, l = e.draggingRef.current.startX >= u - o.edgeActivationWidthPx, s = e.draggingRef.current.isActivated;
|
|
1756
|
+
if (!s && Math.abs(f) >= o.dragActivationDeltaPx && (e.draggingRef.current.isActivated = !0, c()), !s) return;
|
|
1674
1757
|
e.prevXRef.current = e.currentXRef.current, e.currentXRef.current = r;
|
|
1675
|
-
const
|
|
1676
|
-
let
|
|
1677
|
-
if ((
|
|
1758
|
+
const w = t.getIsOpen();
|
|
1759
|
+
let y = !1;
|
|
1760
|
+
if ((w || l) && (y = !0), !y) {
|
|
1678
1761
|
e.draggingRef.current = null, t.dragSidebar(null);
|
|
1679
1762
|
return;
|
|
1680
1763
|
}
|
|
1681
1764
|
i();
|
|
1682
|
-
const
|
|
1683
|
-
if (
|
|
1765
|
+
const h = o.sidebarWidthPx;
|
|
1766
|
+
if (w) {
|
|
1684
1767
|
const S = Math.max(
|
|
1685
1768
|
0,
|
|
1686
|
-
Math.min(
|
|
1769
|
+
Math.min(h, f - o.dragActivationDeltaPx)
|
|
1687
1770
|
);
|
|
1688
1771
|
t.dragSidebar(S);
|
|
1689
1772
|
} else {
|
|
1690
1773
|
const S = Math.max(
|
|
1691
1774
|
0,
|
|
1692
1775
|
Math.min(
|
|
1693
|
-
|
|
1694
|
-
|
|
1776
|
+
h,
|
|
1777
|
+
h + f + o.dragActivationDeltaPx
|
|
1695
1778
|
)
|
|
1696
1779
|
);
|
|
1697
1780
|
t.dragSidebar(S);
|
|
1698
1781
|
}
|
|
1699
|
-
},
|
|
1782
|
+
}, Je = ({ refs: e, callbacks: t, options: r }) => {
|
|
1700
1783
|
if (!e.draggingRef.current) return;
|
|
1701
1784
|
if (!e.draggingRef.current.isActivated) {
|
|
1702
1785
|
e.draggingRef.current = null, e.currentXRef.current = null, e.prevXRef.current = null;
|
|
1703
1786
|
return;
|
|
1704
1787
|
}
|
|
1705
|
-
const i = e.currentXRef.current ?? e.draggingRef.current.startX,
|
|
1788
|
+
const i = e.currentXRef.current ?? e.draggingRef.current.startX, c = e.prevXRef.current ?? e.draggingRef.current.startX, o = e.draggingRef.current.startX, u = t.getIsOpen(), f = window.innerWidth;
|
|
1706
1789
|
e.draggingRef.current = null, e.currentXRef.current = null, e.prevXRef.current = null;
|
|
1707
|
-
const
|
|
1708
|
-
|
|
1790
|
+
const l = i > c, s = i < c, w = o >= f - r.edgeActivationWidthPx;
|
|
1791
|
+
u ? (l ? t.closeSidebar() : t.openSidebar(), t.dragSidebar(null)) : w && s ? (t.openSidebar(), t.dragSidebar(null)) : (t.closeSidebar(), t.dragSidebar(null));
|
|
1709
1792
|
};
|
|
1710
|
-
function
|
|
1793
|
+
function hr(e) {
|
|
1711
1794
|
const t = fe(e.mediaQueryWidth), {
|
|
1712
1795
|
lockedSidebar: r,
|
|
1713
1796
|
setLockedSidebar: i,
|
|
1714
|
-
isRightOpen:
|
|
1797
|
+
isRightOpen: c,
|
|
1715
1798
|
openSidebar: o,
|
|
1716
|
-
closeSidebar:
|
|
1717
|
-
dragSidebar:
|
|
1718
|
-
rightSidebarRef:
|
|
1719
|
-
} = ee(),
|
|
1720
|
-
|
|
1799
|
+
closeSidebar: u,
|
|
1800
|
+
dragSidebar: f,
|
|
1801
|
+
rightSidebarRef: l
|
|
1802
|
+
} = ee(), s = _(null), w = _(null), y = _(null);
|
|
1803
|
+
G(() => {
|
|
1721
1804
|
if (!t || r && r !== "right" || e.disabled) return;
|
|
1722
|
-
const
|
|
1723
|
-
getIsOpen: () =>
|
|
1805
|
+
const h = {
|
|
1806
|
+
getIsOpen: () => c,
|
|
1724
1807
|
openSidebar: () => o("right"),
|
|
1725
|
-
closeSidebar: () =>
|
|
1726
|
-
dragSidebar: (v) =>
|
|
1808
|
+
closeSidebar: () => u("right"),
|
|
1809
|
+
dragSidebar: (v) => f("right", v)
|
|
1727
1810
|
}, S = {
|
|
1728
|
-
draggingRef:
|
|
1729
|
-
currentXRef:
|
|
1730
|
-
prevXRef:
|
|
1731
|
-
},
|
|
1732
|
-
function
|
|
1811
|
+
draggingRef: s,
|
|
1812
|
+
currentXRef: w,
|
|
1813
|
+
prevXRef: y
|
|
1814
|
+
}, C = () => i("right"), p = () => i(null);
|
|
1815
|
+
function P(v) {
|
|
1733
1816
|
if (r && r !== "right" || de(v.target) || v.changedTouches.length === 0) return;
|
|
1734
|
-
const
|
|
1735
|
-
|
|
1817
|
+
const x = v.changedTouches[0], E = window.innerWidth, M = h.getIsOpen(), q = x.clientX >= E - e.edgeActivationWidthPx;
|
|
1818
|
+
M && !e.swipeToClose || !M && !e.swipeToOpen || (M || q) && pe({
|
|
1736
1819
|
refs: S,
|
|
1737
|
-
clientX:
|
|
1738
|
-
clientY:
|
|
1739
|
-
touchId:
|
|
1820
|
+
clientX: x.clientX,
|
|
1821
|
+
clientY: x.clientY,
|
|
1822
|
+
touchId: x.identifier,
|
|
1740
1823
|
isMouse: !1
|
|
1741
1824
|
});
|
|
1742
1825
|
}
|
|
1743
|
-
function
|
|
1744
|
-
if (r && r !== "right" || !
|
|
1745
|
-
const
|
|
1746
|
-
|
|
1826
|
+
function L(v) {
|
|
1827
|
+
if (r && r !== "right" || !s.current || s.current.isMouse) return;
|
|
1828
|
+
const x = s.current.activeTouchId, E = Ae(v.changedTouches, x);
|
|
1829
|
+
E && Qe({
|
|
1747
1830
|
refs: S,
|
|
1748
|
-
callbacks:
|
|
1749
|
-
currentX:
|
|
1831
|
+
callbacks: h,
|
|
1832
|
+
currentX: E.clientX,
|
|
1750
1833
|
preventDefault: () => v.preventDefault(),
|
|
1751
|
-
lockPane:
|
|
1834
|
+
lockPane: C,
|
|
1752
1835
|
options: e
|
|
1753
1836
|
});
|
|
1754
1837
|
}
|
|
1755
|
-
function
|
|
1756
|
-
if (r && r !== "right" || !
|
|
1757
|
-
const
|
|
1758
|
-
Pe(v.changedTouches,
|
|
1838
|
+
function I(v) {
|
|
1839
|
+
if (r && r !== "right" || !s.current || s.current.isMouse) return;
|
|
1840
|
+
const x = s.current.activeTouchId;
|
|
1841
|
+
Pe(v.changedTouches, x) && Je({
|
|
1759
1842
|
refs: S,
|
|
1760
|
-
callbacks:
|
|
1843
|
+
callbacks: h,
|
|
1761
1844
|
options: e
|
|
1762
1845
|
});
|
|
1763
1846
|
}
|
|
1764
|
-
function
|
|
1765
|
-
r && r !== "right" || !
|
|
1847
|
+
function $() {
|
|
1848
|
+
r && r !== "right" || !s.current || s.current.isMouse || it({
|
|
1766
1849
|
refs: S,
|
|
1767
|
-
dragSidebar:
|
|
1850
|
+
dragSidebar: h.dragSidebar,
|
|
1768
1851
|
onDeactivate: p
|
|
1769
1852
|
});
|
|
1770
1853
|
}
|
|
1771
1854
|
function j(v) {
|
|
1772
1855
|
if (r && r !== "right" || de(v.target) || v.button !== 0) return;
|
|
1773
|
-
const
|
|
1774
|
-
|
|
1856
|
+
const x = window.innerWidth, E = h.getIsOpen(), M = v.clientX >= x - e.edgeActivationWidthPx;
|
|
1857
|
+
E && !e.swipeToClose || !E && !e.swipeToOpen || (E || M) && pe({
|
|
1775
1858
|
refs: S,
|
|
1776
1859
|
clientX: v.clientX,
|
|
1777
1860
|
clientY: v.clientY,
|
|
@@ -1779,77 +1862,91 @@ function dr(e) {
|
|
|
1779
1862
|
isMouse: !0
|
|
1780
1863
|
});
|
|
1781
1864
|
}
|
|
1782
|
-
function
|
|
1783
|
-
r && r !== "right" || !
|
|
1865
|
+
function B(v) {
|
|
1866
|
+
r && r !== "right" || !s.current || !s.current.isMouse || Qe({
|
|
1784
1867
|
refs: S,
|
|
1785
|
-
callbacks:
|
|
1868
|
+
callbacks: h,
|
|
1786
1869
|
currentX: v.clientX,
|
|
1787
1870
|
preventDefault: () => v.preventDefault(),
|
|
1788
|
-
lockPane:
|
|
1871
|
+
lockPane: C,
|
|
1789
1872
|
options: e
|
|
1790
1873
|
});
|
|
1791
1874
|
}
|
|
1792
1875
|
function k() {
|
|
1793
|
-
r && r !== "right" || !
|
|
1876
|
+
r && r !== "right" || !s.current || !s.current.isMouse || Je({
|
|
1794
1877
|
refs: S,
|
|
1795
|
-
callbacks:
|
|
1878
|
+
callbacks: h,
|
|
1796
1879
|
options: e
|
|
1797
1880
|
});
|
|
1798
1881
|
}
|
|
1799
|
-
return window.addEventListener("touchstart",
|
|
1800
|
-
window.removeEventListener("touchstart",
|
|
1882
|
+
return window.addEventListener("touchstart", P, { passive: !0 }), window.addEventListener("touchmove", L, { passive: !1 }), window.addEventListener("touchend", I, { passive: !0 }), window.addEventListener("touchcancel", $, { passive: !0 }), window.addEventListener("mousedown", j, { passive: !0 }), window.addEventListener("mousemove", B, { passive: !1 }), window.addEventListener("mouseup", k, { passive: !0 }), () => {
|
|
1883
|
+
window.removeEventListener("touchstart", P), window.removeEventListener("touchmove", L), window.removeEventListener("touchend", I), window.removeEventListener("touchcancel", $), window.removeEventListener("mousedown", j), window.removeEventListener("mousemove", B), window.removeEventListener("mouseup", k);
|
|
1801
1884
|
};
|
|
1802
1885
|
}, [
|
|
1803
1886
|
t,
|
|
1804
|
-
|
|
1887
|
+
c,
|
|
1805
1888
|
o,
|
|
1889
|
+
u,
|
|
1806
1890
|
f,
|
|
1807
|
-
c,
|
|
1808
1891
|
r,
|
|
1809
1892
|
i,
|
|
1810
|
-
|
|
1893
|
+
l,
|
|
1811
1894
|
e
|
|
1812
1895
|
]);
|
|
1813
1896
|
}
|
|
1814
|
-
function
|
|
1897
|
+
function Sr({
|
|
1815
1898
|
className: e,
|
|
1816
1899
|
children: t,
|
|
1817
1900
|
ToggleComponent: r,
|
|
1818
|
-
|
|
1901
|
+
ariaLabel: i,
|
|
1902
|
+
...c
|
|
1819
1903
|
}) {
|
|
1820
|
-
if ((t == null ? void 0 : t.type) ===
|
|
1904
|
+
if ((t == null ? void 0 : t.type) === O.Fragment)
|
|
1821
1905
|
throw new Error("Fragments is not allowed in SwipeBarRight");
|
|
1822
|
-
const { isRightOpen:
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1906
|
+
const { isRightOpen: o, closeSidebar: u, rightSidebarRef: f, rightToggleRef: l } = ee(), s = Me("right", c), w = fe(s.mediaQueryWidth);
|
|
1907
|
+
hr(s);
|
|
1908
|
+
const y = Y(() => u("right"), [u]);
|
|
1909
|
+
return _e({
|
|
1910
|
+
sidebarRef: f,
|
|
1911
|
+
triggerRef: l,
|
|
1912
|
+
isOpen: o,
|
|
1913
|
+
onClose: y,
|
|
1914
|
+
transitionMs: s.transitionMs
|
|
1915
|
+
}), /* @__PURE__ */ O.jsxs(O.Fragment, { children: [
|
|
1916
|
+
s.showOverlay && /* @__PURE__ */ O.jsx(
|
|
1917
|
+
Ce,
|
|
1826
1918
|
{
|
|
1827
|
-
isCollapsed: !
|
|
1828
|
-
setCollapsed: () =>
|
|
1829
|
-
closeSidebarOnClick:
|
|
1830
|
-
transitionMs:
|
|
1831
|
-
overlayBackgroundColor:
|
|
1832
|
-
overlayZIndex:
|
|
1919
|
+
isCollapsed: !o,
|
|
1920
|
+
setCollapsed: () => u("right"),
|
|
1921
|
+
closeSidebarOnClick: s.closeSidebarOnOverlayClick,
|
|
1922
|
+
transitionMs: s.transitionMs,
|
|
1923
|
+
overlayBackgroundColor: s.overlayBackgroundColor,
|
|
1924
|
+
overlayZIndex: s.overlayZIndex
|
|
1833
1925
|
}
|
|
1834
1926
|
),
|
|
1835
|
-
/* @__PURE__ */
|
|
1836
|
-
|
|
1927
|
+
/* @__PURE__ */ O.jsx(
|
|
1928
|
+
gr,
|
|
1837
1929
|
{
|
|
1838
|
-
options:
|
|
1839
|
-
showToggle:
|
|
1930
|
+
options: s,
|
|
1931
|
+
showToggle: s.showToggle,
|
|
1840
1932
|
ToggleComponent: r
|
|
1841
1933
|
}
|
|
1842
1934
|
),
|
|
1843
|
-
/* @__PURE__ */
|
|
1935
|
+
/* @__PURE__ */ O.jsx(
|
|
1844
1936
|
"div",
|
|
1845
1937
|
{
|
|
1846
1938
|
ref: f,
|
|
1939
|
+
id: "swipebar-right",
|
|
1940
|
+
role: "dialog",
|
|
1941
|
+
"aria-modal": o,
|
|
1942
|
+
"aria-label": i ?? "Right sidebar",
|
|
1943
|
+
inert: !o,
|
|
1847
1944
|
style: {
|
|
1848
|
-
...
|
|
1849
|
-
...
|
|
1850
|
-
...
|
|
1851
|
-
...e ? {} : { backgroundColor:
|
|
1852
|
-
zIndex:
|
|
1945
|
+
...rt,
|
|
1946
|
+
...qt,
|
|
1947
|
+
...s.isAbsolute || w ? Qt : {},
|
|
1948
|
+
...e ? {} : { backgroundColor: Ee },
|
|
1949
|
+
zIndex: s.swipeBarZIndex
|
|
1853
1950
|
},
|
|
1854
1951
|
className: e,
|
|
1855
1952
|
children: t
|
|
@@ -1858,14 +1955,14 @@ function br({
|
|
|
1858
1955
|
] });
|
|
1859
1956
|
}
|
|
1860
1957
|
export {
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1958
|
+
Ce as Overlay,
|
|
1959
|
+
wr as SwipeBarBottom,
|
|
1960
|
+
pr as SwipeBarLeft,
|
|
1961
|
+
vr as SwipeBarProvider,
|
|
1962
|
+
Sr as SwipeBarRight,
|
|
1963
|
+
sr as ToggleBottom,
|
|
1964
|
+
dr as ToggleLeft,
|
|
1965
|
+
gr as ToggleRight,
|
|
1869
1966
|
fe as useMediaQuery,
|
|
1870
1967
|
ee as useSwipeBarContext
|
|
1871
1968
|
};
|