@purpurds/drawer 8.3.1 → 8.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/LICENSE.txt +4 -4
- package/dist/drawer-content.d.ts.map +1 -1
- package/dist/drawer-frame.d.ts +0 -1
- package/dist/drawer-frame.d.ts.map +1 -1
- package/dist/drawer-header.d.ts.map +1 -1
- package/dist/drawer.cjs.js +14 -14
- package/dist/drawer.cjs.js.map +1 -1
- package/dist/drawer.d.ts.map +1 -1
- package/dist/drawer.es.js +1173 -1175
- package/dist/drawer.es.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/use-swipe-to-dismiss.hook.d.ts +2 -3
- package/dist/use-swipe-to-dismiss.hook.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/drawer-container.module.scss +1 -5
- package/src/drawer-content.module.scss +71 -35
- package/src/drawer-content.tsx +17 -5
- package/src/drawer-frame.module.scss +28 -0
- package/src/drawer-frame.tsx +4 -9
- package/src/drawer-header.module.scss +11 -4
- package/src/drawer-header.tsx +4 -6
- package/src/drawer-scroll-area.module.scss +1 -0
- package/src/drawer.stories.tsx +37 -5
- package/src/drawer.tsx +1 -8
- package/src/use-swipe-to-dismiss.hook.ts +4 -9
- package/src/drawer.module.scss +0 -2
package/dist/drawer.es.js
CHANGED
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
import { jsx as f, jsxs as D, Fragment as
|
|
1
|
+
import { jsx as f, jsxs as D, Fragment as re } from "react/jsx-runtime";
|
|
2
2
|
import * as c from "react";
|
|
3
|
-
import ke, { useState as
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
6
|
-
function A(e,
|
|
3
|
+
import ke, { useState as Tr, createContext as Or, forwardRef as H, useRef as et, useContext as Lr, useEffect as $r } from "react";
|
|
4
|
+
import * as Mr from "react-dom";
|
|
5
|
+
import Ir from "react-dom";
|
|
6
|
+
function A(e, t, { checkForDefaultPrevented: r = !0 } = {}) {
|
|
7
7
|
return function(a) {
|
|
8
|
-
if (e == null || e(a),
|
|
9
|
-
return
|
|
8
|
+
if (e == null || e(a), r === !1 || !a.defaultPrevented)
|
|
9
|
+
return t == null ? void 0 : t(a);
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function tt(e, t) {
|
|
13
13
|
if (typeof e == "function")
|
|
14
|
-
return e(
|
|
15
|
-
e != null && (e.current =
|
|
14
|
+
return e(t);
|
|
15
|
+
e != null && (e.current = t);
|
|
16
16
|
}
|
|
17
|
-
function
|
|
18
|
-
return (
|
|
19
|
-
let
|
|
17
|
+
function At(...e) {
|
|
18
|
+
return (t) => {
|
|
19
|
+
let r = !1;
|
|
20
20
|
const o = e.map((a) => {
|
|
21
|
-
const n =
|
|
22
|
-
return !
|
|
21
|
+
const n = tt(a, t);
|
|
22
|
+
return !r && typeof n == "function" && (r = !0), n;
|
|
23
23
|
});
|
|
24
|
-
if (
|
|
24
|
+
if (r)
|
|
25
25
|
return () => {
|
|
26
26
|
for (let a = 0; a < o.length; a++) {
|
|
27
27
|
const n = o[a];
|
|
28
|
-
typeof n == "function" ? n() :
|
|
28
|
+
typeof n == "function" ? n() : tt(e[a], null);
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
return c.useCallback(
|
|
33
|
+
function L(...e) {
|
|
34
|
+
return c.useCallback(At(...e), e);
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
const
|
|
36
|
+
function kr(e, t) {
|
|
37
|
+
const r = c.createContext(t), o = (n) => {
|
|
38
38
|
const { children: s, ...i } = n, u = c.useMemo(() => i, Object.values(i));
|
|
39
|
-
return /* @__PURE__ */ f(
|
|
39
|
+
return /* @__PURE__ */ f(r.Provider, { value: u, children: s });
|
|
40
40
|
};
|
|
41
41
|
o.displayName = e + "Provider";
|
|
42
42
|
function a(n) {
|
|
43
|
-
const s = c.useContext(
|
|
43
|
+
const s = c.useContext(r);
|
|
44
44
|
if (s) return s;
|
|
45
|
-
if (
|
|
45
|
+
if (t !== void 0) return t;
|
|
46
46
|
throw new Error(`\`${n}\` must be used within \`${e}\``);
|
|
47
47
|
}
|
|
48
48
|
return [o, a];
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
let
|
|
50
|
+
function Dt(e, t = []) {
|
|
51
|
+
let r = [];
|
|
52
52
|
function o(n, s) {
|
|
53
|
-
const i = c.createContext(s), u =
|
|
54
|
-
|
|
53
|
+
const i = c.createContext(s), u = r.length;
|
|
54
|
+
r = [...r, s];
|
|
55
55
|
const l = (p) => {
|
|
56
|
-
var
|
|
57
|
-
const { scope:
|
|
58
|
-
return /* @__PURE__ */ f(
|
|
56
|
+
var b;
|
|
57
|
+
const { scope: v, children: m, ..._ } = p, h = ((b = v == null ? void 0 : v[e]) == null ? void 0 : b[u]) || i, g = c.useMemo(() => _, Object.values(_));
|
|
58
|
+
return /* @__PURE__ */ f(h.Provider, { value: g, children: m });
|
|
59
59
|
};
|
|
60
60
|
l.displayName = n + "Provider";
|
|
61
|
-
function d(p,
|
|
62
|
-
var
|
|
63
|
-
const m = ((
|
|
64
|
-
if (
|
|
61
|
+
function d(p, v) {
|
|
62
|
+
var h;
|
|
63
|
+
const m = ((h = v == null ? void 0 : v[e]) == null ? void 0 : h[u]) || i, _ = c.useContext(m);
|
|
64
|
+
if (_) return _;
|
|
65
65
|
if (s !== void 0) return s;
|
|
66
66
|
throw new Error(`\`${p}\` must be used within \`${n}\``);
|
|
67
67
|
}
|
|
68
68
|
return [l, d];
|
|
69
69
|
}
|
|
70
70
|
const a = () => {
|
|
71
|
-
const n =
|
|
71
|
+
const n = r.map((s) => c.createContext(s));
|
|
72
72
|
return function(i) {
|
|
73
73
|
const u = (i == null ? void 0 : i[e]) || n;
|
|
74
74
|
return c.useMemo(
|
|
@@ -77,12 +77,12 @@ function Ar(e, r = []) {
|
|
|
77
77
|
);
|
|
78
78
|
};
|
|
79
79
|
};
|
|
80
|
-
return a.scopeName = e, [o,
|
|
80
|
+
return a.scopeName = e, [o, Wr(a, ...t)];
|
|
81
81
|
}
|
|
82
|
-
function
|
|
83
|
-
const
|
|
84
|
-
if (e.length === 1) return
|
|
85
|
-
const
|
|
82
|
+
function Wr(...e) {
|
|
83
|
+
const t = e[0];
|
|
84
|
+
if (e.length === 1) return t;
|
|
85
|
+
const r = () => {
|
|
86
86
|
const o = e.map((a) => ({
|
|
87
87
|
useScope: a(),
|
|
88
88
|
scopeName: a.scopeName
|
|
@@ -92,31 +92,31 @@ function kt(...e) {
|
|
|
92
92
|
const p = u(n)[`__scope${l}`];
|
|
93
93
|
return { ...i, ...p };
|
|
94
94
|
}, {});
|
|
95
|
-
return c.useMemo(() => ({ [`__scope${
|
|
95
|
+
return c.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
|
|
96
96
|
};
|
|
97
97
|
};
|
|
98
|
-
return
|
|
98
|
+
return r.scopeName = t.scopeName, r;
|
|
99
99
|
}
|
|
100
100
|
var ne = globalThis != null && globalThis.document ? c.useLayoutEffect : () => {
|
|
101
|
-
},
|
|
102
|
-
}),
|
|
101
|
+
}, jr = c[" useId ".trim().toString()] || (() => {
|
|
102
|
+
}), Fr = 0;
|
|
103
103
|
function xe(e) {
|
|
104
|
-
const [
|
|
104
|
+
const [t, r] = c.useState(jr());
|
|
105
105
|
return ne(() => {
|
|
106
|
-
|
|
107
|
-
}, [e]), e || (
|
|
106
|
+
r((o) => o ?? String(Fr++));
|
|
107
|
+
}, [e]), e || (t ? `radix-${t}` : "");
|
|
108
108
|
}
|
|
109
|
-
var
|
|
110
|
-
function
|
|
109
|
+
var Ur = c[" useInsertionEffect ".trim().toString()] || ne;
|
|
110
|
+
function Br({
|
|
111
111
|
prop: e,
|
|
112
|
-
defaultProp:
|
|
113
|
-
onChange:
|
|
112
|
+
defaultProp: t,
|
|
113
|
+
onChange: r = () => {
|
|
114
114
|
},
|
|
115
115
|
caller: o
|
|
116
116
|
}) {
|
|
117
|
-
const [a, n, s] =
|
|
118
|
-
defaultProp:
|
|
119
|
-
onChange:
|
|
117
|
+
const [a, n, s] = Hr({
|
|
118
|
+
defaultProp: t,
|
|
119
|
+
onChange: r
|
|
120
120
|
}), i = e !== void 0, u = i ? e : a;
|
|
121
121
|
{
|
|
122
122
|
const d = c.useRef(e !== void 0);
|
|
@@ -131,8 +131,8 @@ function Ht({
|
|
|
131
131
|
(d) => {
|
|
132
132
|
var p;
|
|
133
133
|
if (i) {
|
|
134
|
-
const
|
|
135
|
-
|
|
134
|
+
const v = Vr(d) ? d(e) : d;
|
|
135
|
+
v !== e && ((p = s.current) == null || p.call(s, v));
|
|
136
136
|
} else
|
|
137
137
|
n(d);
|
|
138
138
|
},
|
|
@@ -140,66 +140,66 @@ function Ht({
|
|
|
140
140
|
);
|
|
141
141
|
return [u, l];
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function Hr({
|
|
144
144
|
defaultProp: e,
|
|
145
|
-
onChange:
|
|
145
|
+
onChange: t
|
|
146
146
|
}) {
|
|
147
|
-
const [
|
|
148
|
-
return
|
|
149
|
-
n.current =
|
|
150
|
-
}, [
|
|
147
|
+
const [r, o] = c.useState(e), a = c.useRef(r), n = c.useRef(t);
|
|
148
|
+
return Ur(() => {
|
|
149
|
+
n.current = t;
|
|
150
|
+
}, [t]), c.useEffect(() => {
|
|
151
151
|
var s;
|
|
152
|
-
a.current !==
|
|
153
|
-
}, [
|
|
152
|
+
a.current !== r && ((s = n.current) == null || s.call(n, r), a.current = r);
|
|
153
|
+
}, [r, a]), [r, o, n];
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function Vr(e) {
|
|
156
156
|
return typeof e == "function";
|
|
157
157
|
}
|
|
158
158
|
// @__NO_SIDE_EFFECTS__
|
|
159
|
-
function
|
|
160
|
-
const
|
|
161
|
-
const { children: n, ...s } = o, i = c.Children.toArray(n), u = i.find(
|
|
159
|
+
function Tt(e) {
|
|
160
|
+
const t = /* @__PURE__ */ zr(e), r = c.forwardRef((o, a) => {
|
|
161
|
+
const { children: n, ...s } = o, i = c.Children.toArray(n), u = i.find(Xr);
|
|
162
162
|
if (u) {
|
|
163
163
|
const l = u.props.children, d = i.map((p) => p === u ? c.Children.count(l) > 1 ? c.Children.only(null) : c.isValidElement(l) ? l.props.children : null : p);
|
|
164
|
-
return /* @__PURE__ */ f(
|
|
164
|
+
return /* @__PURE__ */ f(t, { ...s, ref: a, children: c.isValidElement(l) ? c.cloneElement(l, void 0, d) : null });
|
|
165
165
|
}
|
|
166
|
-
return /* @__PURE__ */ f(
|
|
166
|
+
return /* @__PURE__ */ f(t, { ...s, ref: a, children: n });
|
|
167
167
|
});
|
|
168
|
-
return
|
|
168
|
+
return r.displayName = `${e}.Slot`, r;
|
|
169
169
|
}
|
|
170
170
|
// @__NO_SIDE_EFFECTS__
|
|
171
|
-
function
|
|
172
|
-
const
|
|
173
|
-
const { children: a, ...n } =
|
|
171
|
+
function zr(e) {
|
|
172
|
+
const t = c.forwardRef((r, o) => {
|
|
173
|
+
const { children: a, ...n } = r;
|
|
174
174
|
if (c.isValidElement(a)) {
|
|
175
|
-
const s =
|
|
176
|
-
return a.type !== c.Fragment && (i.ref = o ?
|
|
175
|
+
const s = Gr(a), i = qr(n, a.props);
|
|
176
|
+
return a.type !== c.Fragment && (i.ref = o ? At(o, s) : s), c.cloneElement(a, i);
|
|
177
177
|
}
|
|
178
178
|
return c.Children.count(a) > 1 ? c.Children.only(null) : null;
|
|
179
179
|
});
|
|
180
|
-
return
|
|
180
|
+
return t.displayName = `${e}.SlotClone`, t;
|
|
181
181
|
}
|
|
182
|
-
var
|
|
183
|
-
function
|
|
184
|
-
return c.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId ===
|
|
182
|
+
var Yr = Symbol("radix.slottable");
|
|
183
|
+
function Xr(e) {
|
|
184
|
+
return c.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Yr;
|
|
185
185
|
}
|
|
186
|
-
function
|
|
187
|
-
const
|
|
188
|
-
for (const o in
|
|
189
|
-
const a = e[o], n =
|
|
190
|
-
/^on[A-Z]/.test(o) ? a && n ?
|
|
186
|
+
function qr(e, t) {
|
|
187
|
+
const r = { ...t };
|
|
188
|
+
for (const o in t) {
|
|
189
|
+
const a = e[o], n = t[o];
|
|
190
|
+
/^on[A-Z]/.test(o) ? a && n ? r[o] = (...i) => {
|
|
191
191
|
const u = n(...i);
|
|
192
192
|
return a(...i), u;
|
|
193
|
-
} : a && (
|
|
193
|
+
} : a && (r[o] = a) : o === "style" ? r[o] = { ...a, ...n } : o === "className" && (r[o] = [a, n].filter(Boolean).join(" "));
|
|
194
194
|
}
|
|
195
|
-
return { ...e, ...
|
|
195
|
+
return { ...e, ...r };
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function Gr(e) {
|
|
198
198
|
var o, a;
|
|
199
|
-
let
|
|
200
|
-
return
|
|
199
|
+
let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, r = t && "isReactWarning" in t && t.isReactWarning;
|
|
200
|
+
return r ? e.ref : (t = (a = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : a.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
|
|
201
201
|
}
|
|
202
|
-
var
|
|
202
|
+
var Kr = [
|
|
203
203
|
"a",
|
|
204
204
|
"button",
|
|
205
205
|
"div",
|
|
@@ -217,64 +217,64 @@ var Gt = [
|
|
|
217
217
|
"span",
|
|
218
218
|
"svg",
|
|
219
219
|
"ul"
|
|
220
|
-
], T =
|
|
221
|
-
const
|
|
222
|
-
const { asChild: s, ...i } = a, u = s ?
|
|
220
|
+
], T = Kr.reduce((e, t) => {
|
|
221
|
+
const r = /* @__PURE__ */ Tt(`Primitive.${t}`), o = c.forwardRef((a, n) => {
|
|
222
|
+
const { asChild: s, ...i } = a, u = s ? r : t;
|
|
223
223
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ f(u, { ...i, ref: n });
|
|
224
224
|
});
|
|
225
|
-
return o.displayName = `Primitive.${
|
|
225
|
+
return o.displayName = `Primitive.${t}`, { ...e, [t]: o };
|
|
226
226
|
}, {});
|
|
227
|
-
function
|
|
228
|
-
e &&
|
|
227
|
+
function Zr(e, t) {
|
|
228
|
+
e && Mr.flushSync(() => e.dispatchEvent(t));
|
|
229
229
|
}
|
|
230
|
-
function
|
|
231
|
-
const
|
|
230
|
+
function $(e) {
|
|
231
|
+
const t = c.useRef(e);
|
|
232
232
|
return c.useEffect(() => {
|
|
233
|
-
|
|
234
|
-
}), c.useMemo(() => (...
|
|
233
|
+
t.current = e;
|
|
234
|
+
}), c.useMemo(() => (...r) => {
|
|
235
235
|
var o;
|
|
236
|
-
return (o =
|
|
236
|
+
return (o = t.current) == null ? void 0 : o.call(t, ...r);
|
|
237
237
|
}, []);
|
|
238
238
|
}
|
|
239
|
-
function
|
|
240
|
-
const
|
|
239
|
+
function Qr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
240
|
+
const r = $(e);
|
|
241
241
|
c.useEffect(() => {
|
|
242
242
|
const o = (a) => {
|
|
243
|
-
a.key === "Escape" &&
|
|
243
|
+
a.key === "Escape" && r(a);
|
|
244
244
|
};
|
|
245
|
-
return
|
|
246
|
-
}, [
|
|
245
|
+
return t.addEventListener("keydown", o, { capture: !0 }), () => t.removeEventListener("keydown", o, { capture: !0 });
|
|
246
|
+
}, [r, t]);
|
|
247
247
|
}
|
|
248
|
-
var
|
|
248
|
+
var Jr = "DismissableLayer", We = "dismissableLayer.update", en = "dismissableLayer.pointerDownOutside", tn = "dismissableLayer.focusOutside", rt, Ot = c.createContext({
|
|
249
249
|
layers: /* @__PURE__ */ new Set(),
|
|
250
250
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
251
251
|
branches: /* @__PURE__ */ new Set()
|
|
252
|
-
}),
|
|
253
|
-
(e,
|
|
252
|
+
}), Lt = c.forwardRef(
|
|
253
|
+
(e, t) => {
|
|
254
254
|
const {
|
|
255
|
-
disableOutsidePointerEvents:
|
|
255
|
+
disableOutsidePointerEvents: r = !1,
|
|
256
256
|
onEscapeKeyDown: o,
|
|
257
257
|
onPointerDownOutside: a,
|
|
258
258
|
onFocusOutside: n,
|
|
259
259
|
onInteractOutside: s,
|
|
260
260
|
onDismiss: i,
|
|
261
261
|
...u
|
|
262
|
-
} = e, l = c.useContext(
|
|
262
|
+
} = e, l = c.useContext(Ot), [d, p] = c.useState(null), v = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, m] = c.useState({}), _ = L(t, (S) => p(S)), h = Array.from(l.layers), [g] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), b = h.indexOf(g), w = d ? h.indexOf(d) : -1, E = l.layersWithOutsidePointerEventsDisabled.size > 0, y = w >= b, C = on((S) => {
|
|
263
263
|
const N = S.target, P = [...l.branches].some((R) => R.contains(N));
|
|
264
264
|
!y || P || (a == null || a(S), s == null || s(S), S.defaultPrevented || i == null || i());
|
|
265
|
-
},
|
|
265
|
+
}, v), x = an((S) => {
|
|
266
266
|
const N = S.target;
|
|
267
267
|
[...l.branches].some((R) => R.contains(N)) || (n == null || n(S), s == null || s(S), S.defaultPrevented || i == null || i());
|
|
268
|
-
},
|
|
269
|
-
return
|
|
270
|
-
|
|
271
|
-
},
|
|
268
|
+
}, v);
|
|
269
|
+
return Qr((S) => {
|
|
270
|
+
w === l.layers.size - 1 && (o == null || o(S), !S.defaultPrevented && i && (S.preventDefault(), i()));
|
|
271
|
+
}, v), c.useEffect(() => {
|
|
272
272
|
if (d)
|
|
273
|
-
return
|
|
274
|
-
|
|
273
|
+
return r && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (rt = v.body.style.pointerEvents, v.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(d)), l.layers.add(d), nt(), () => {
|
|
274
|
+
r && l.layersWithOutsidePointerEventsDisabled.size === 1 && (v.body.style.pointerEvents = rt);
|
|
275
275
|
};
|
|
276
|
-
}, [d,
|
|
277
|
-
d && (l.layers.delete(d), l.layersWithOutsidePointerEventsDisabled.delete(d),
|
|
276
|
+
}, [d, v, r, l]), c.useEffect(() => () => {
|
|
277
|
+
d && (l.layers.delete(d), l.layersWithOutsidePointerEventsDisabled.delete(d), nt());
|
|
278
278
|
}, [d, l]), c.useEffect(() => {
|
|
279
279
|
const S = () => m({});
|
|
280
280
|
return document.addEventListener(We, S), () => document.removeEventListener(We, S);
|
|
@@ -282,7 +282,7 @@ var Qt = "DismissableLayer", We = "dismissableLayer.update", Jt = "dismissableLa
|
|
|
282
282
|
T.div,
|
|
283
283
|
{
|
|
284
284
|
...u,
|
|
285
|
-
ref:
|
|
285
|
+
ref: _,
|
|
286
286
|
style: {
|
|
287
287
|
pointerEvents: E ? y ? "auto" : "none" : void 0,
|
|
288
288
|
...e.style
|
|
@@ -297,78 +297,78 @@ var Qt = "DismissableLayer", We = "dismissableLayer.update", Jt = "dismissableLa
|
|
|
297
297
|
);
|
|
298
298
|
}
|
|
299
299
|
);
|
|
300
|
-
|
|
301
|
-
var rn = "DismissableLayerBranch",
|
|
302
|
-
const
|
|
300
|
+
Lt.displayName = Jr;
|
|
301
|
+
var rn = "DismissableLayerBranch", nn = c.forwardRef((e, t) => {
|
|
302
|
+
const r = c.useContext(Ot), o = c.useRef(null), a = L(t, o);
|
|
303
303
|
return c.useEffect(() => {
|
|
304
304
|
const n = o.current;
|
|
305
305
|
if (n)
|
|
306
|
-
return
|
|
307
|
-
|
|
306
|
+
return r.branches.add(n), () => {
|
|
307
|
+
r.branches.delete(n);
|
|
308
308
|
};
|
|
309
|
-
}, [
|
|
309
|
+
}, [r.branches]), /* @__PURE__ */ f(T.div, { ...e, ref: a });
|
|
310
310
|
});
|
|
311
|
-
|
|
312
|
-
function
|
|
313
|
-
const
|
|
311
|
+
nn.displayName = rn;
|
|
312
|
+
function on(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
313
|
+
const r = $(e), o = c.useRef(!1), a = c.useRef(() => {
|
|
314
314
|
});
|
|
315
315
|
return c.useEffect(() => {
|
|
316
316
|
const n = (i) => {
|
|
317
317
|
if (i.target && !o.current) {
|
|
318
318
|
let u = function() {
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
319
|
+
$t(
|
|
320
|
+
en,
|
|
321
|
+
r,
|
|
322
322
|
l,
|
|
323
323
|
{ discrete: !0 }
|
|
324
324
|
);
|
|
325
325
|
};
|
|
326
326
|
const l = { originalEvent: i };
|
|
327
|
-
i.pointerType === "touch" ? (
|
|
327
|
+
i.pointerType === "touch" ? (t.removeEventListener("click", a.current), a.current = u, t.addEventListener("click", a.current, { once: !0 })) : u();
|
|
328
328
|
} else
|
|
329
|
-
|
|
329
|
+
t.removeEventListener("click", a.current);
|
|
330
330
|
o.current = !1;
|
|
331
331
|
}, s = window.setTimeout(() => {
|
|
332
|
-
|
|
332
|
+
t.addEventListener("pointerdown", n);
|
|
333
333
|
}, 0);
|
|
334
334
|
return () => {
|
|
335
|
-
window.clearTimeout(s),
|
|
335
|
+
window.clearTimeout(s), t.removeEventListener("pointerdown", n), t.removeEventListener("click", a.current);
|
|
336
336
|
};
|
|
337
|
-
}, [
|
|
337
|
+
}, [t, r]), {
|
|
338
338
|
// ensures we check React component tree (not just DOM tree)
|
|
339
339
|
onPointerDownCapture: () => o.current = !0
|
|
340
340
|
};
|
|
341
341
|
}
|
|
342
|
-
function
|
|
343
|
-
const
|
|
342
|
+
function an(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
343
|
+
const r = $(e), o = c.useRef(!1);
|
|
344
344
|
return c.useEffect(() => {
|
|
345
345
|
const a = (n) => {
|
|
346
|
-
n.target && !o.current &&
|
|
346
|
+
n.target && !o.current && $t(tn, r, { originalEvent: n }, {
|
|
347
347
|
discrete: !1
|
|
348
348
|
});
|
|
349
349
|
};
|
|
350
|
-
return
|
|
351
|
-
}, [
|
|
350
|
+
return t.addEventListener("focusin", a), () => t.removeEventListener("focusin", a);
|
|
351
|
+
}, [t, r]), {
|
|
352
352
|
onFocusCapture: () => o.current = !0,
|
|
353
353
|
onBlurCapture: () => o.current = !1
|
|
354
354
|
};
|
|
355
355
|
}
|
|
356
|
-
function
|
|
356
|
+
function nt() {
|
|
357
357
|
const e = new CustomEvent(We);
|
|
358
358
|
document.dispatchEvent(e);
|
|
359
359
|
}
|
|
360
|
-
function
|
|
361
|
-
const a =
|
|
362
|
-
|
|
360
|
+
function $t(e, t, r, { discrete: o }) {
|
|
361
|
+
const a = r.originalEvent.target, n = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: r });
|
|
362
|
+
t && a.addEventListener(e, t, { once: !0 }), o ? Zr(a, n) : a.dispatchEvent(n);
|
|
363
363
|
}
|
|
364
|
-
var Re = "focusScope.autoFocusOnMount", Ne = "focusScope.autoFocusOnUnmount",
|
|
364
|
+
var Re = "focusScope.autoFocusOnMount", Ne = "focusScope.autoFocusOnUnmount", ot = { bubbles: !1, cancelable: !0 }, sn = "FocusScope", Mt = c.forwardRef((e, t) => {
|
|
365
365
|
const {
|
|
366
|
-
loop:
|
|
366
|
+
loop: r = !1,
|
|
367
367
|
trapped: o = !1,
|
|
368
368
|
onMountAutoFocus: a,
|
|
369
369
|
onUnmountAutoFocus: n,
|
|
370
370
|
...s
|
|
371
|
-
} = e, [i, u] = c.useState(null), l =
|
|
371
|
+
} = e, [i, u] = c.useState(null), l = $(a), d = $(n), p = c.useRef(null), v = L(t, (h) => u(h)), m = c.useRef({
|
|
372
372
|
paused: !1,
|
|
373
373
|
pause() {
|
|
374
374
|
this.paused = !0;
|
|
@@ -379,135 +379,135 @@ var Re = "focusScope.autoFocusOnMount", Ne = "focusScope.autoFocusOnUnmount", nr
|
|
|
379
379
|
}).current;
|
|
380
380
|
c.useEffect(() => {
|
|
381
381
|
if (o) {
|
|
382
|
-
let
|
|
382
|
+
let h = function(E) {
|
|
383
383
|
if (m.paused || !i) return;
|
|
384
384
|
const y = E.target;
|
|
385
|
-
i.contains(y) ? p.current = y :
|
|
385
|
+
i.contains(y) ? p.current = y : B(p.current, { select: !0 });
|
|
386
386
|
}, g = function(E) {
|
|
387
387
|
if (m.paused || !i) return;
|
|
388
388
|
const y = E.relatedTarget;
|
|
389
|
-
y !== null && (i.contains(y) ||
|
|
390
|
-
},
|
|
389
|
+
y !== null && (i.contains(y) || B(p.current, { select: !0 }));
|
|
390
|
+
}, b = function(E) {
|
|
391
391
|
if (document.activeElement === document.body)
|
|
392
392
|
for (const C of E)
|
|
393
|
-
C.removedNodes.length > 0 &&
|
|
393
|
+
C.removedNodes.length > 0 && B(i);
|
|
394
394
|
};
|
|
395
|
-
document.addEventListener("focusin",
|
|
396
|
-
const
|
|
397
|
-
return i &&
|
|
398
|
-
document.removeEventListener("focusin",
|
|
395
|
+
document.addEventListener("focusin", h), document.addEventListener("focusout", g);
|
|
396
|
+
const w = new MutationObserver(b);
|
|
397
|
+
return i && w.observe(i, { childList: !0, subtree: !0 }), () => {
|
|
398
|
+
document.removeEventListener("focusin", h), document.removeEventListener("focusout", g), w.disconnect();
|
|
399
399
|
};
|
|
400
400
|
}
|
|
401
401
|
}, [o, i, m.paused]), c.useEffect(() => {
|
|
402
402
|
if (i) {
|
|
403
|
-
|
|
404
|
-
const
|
|
405
|
-
if (!i.contains(
|
|
406
|
-
const
|
|
407
|
-
i.addEventListener(Re, l), i.dispatchEvent(
|
|
403
|
+
it.add(m);
|
|
404
|
+
const h = document.activeElement;
|
|
405
|
+
if (!i.contains(h)) {
|
|
406
|
+
const b = new CustomEvent(Re, ot);
|
|
407
|
+
i.addEventListener(Re, l), i.dispatchEvent(b), b.defaultPrevented || (cn(pn(It(i)), { select: !0 }), document.activeElement === h && B(i));
|
|
408
408
|
}
|
|
409
409
|
return () => {
|
|
410
410
|
i.removeEventListener(Re, l), setTimeout(() => {
|
|
411
|
-
const
|
|
412
|
-
i.addEventListener(Ne, d), i.dispatchEvent(
|
|
411
|
+
const b = new CustomEvent(Ne, ot);
|
|
412
|
+
i.addEventListener(Ne, d), i.dispatchEvent(b), b.defaultPrevented || B(h ?? document.body, { select: !0 }), i.removeEventListener(Ne, d), it.remove(m);
|
|
413
413
|
}, 0);
|
|
414
414
|
};
|
|
415
415
|
}
|
|
416
416
|
}, [i, l, d, m]);
|
|
417
|
-
const
|
|
418
|
-
(
|
|
419
|
-
if (!
|
|
420
|
-
const g =
|
|
421
|
-
if (g &&
|
|
422
|
-
const
|
|
423
|
-
E && y ? !
|
|
417
|
+
const _ = c.useCallback(
|
|
418
|
+
(h) => {
|
|
419
|
+
if (!r && !o || m.paused) return;
|
|
420
|
+
const g = h.key === "Tab" && !h.altKey && !h.ctrlKey && !h.metaKey, b = document.activeElement;
|
|
421
|
+
if (g && b) {
|
|
422
|
+
const w = h.currentTarget, [E, y] = ln(w);
|
|
423
|
+
E && y ? !h.shiftKey && b === y ? (h.preventDefault(), r && B(E, { select: !0 })) : h.shiftKey && b === E && (h.preventDefault(), r && B(y, { select: !0 })) : b === w && h.preventDefault();
|
|
424
424
|
}
|
|
425
425
|
},
|
|
426
|
-
[
|
|
426
|
+
[r, o, m.paused]
|
|
427
427
|
);
|
|
428
|
-
return /* @__PURE__ */ f(T.div, { tabIndex: -1, ...s, ref:
|
|
428
|
+
return /* @__PURE__ */ f(T.div, { tabIndex: -1, ...s, ref: v, onKeyDown: _ });
|
|
429
429
|
});
|
|
430
|
-
|
|
431
|
-
function
|
|
432
|
-
const
|
|
430
|
+
Mt.displayName = sn;
|
|
431
|
+
function cn(e, { select: t = !1 } = {}) {
|
|
432
|
+
const r = document.activeElement;
|
|
433
433
|
for (const o of e)
|
|
434
|
-
if (
|
|
434
|
+
if (B(o, { select: t }), document.activeElement !== r) return;
|
|
435
435
|
}
|
|
436
|
-
function
|
|
437
|
-
const
|
|
438
|
-
return [
|
|
436
|
+
function ln(e) {
|
|
437
|
+
const t = It(e), r = at(t, e), o = at(t.reverse(), e);
|
|
438
|
+
return [r, o];
|
|
439
439
|
}
|
|
440
|
-
function
|
|
441
|
-
const
|
|
440
|
+
function It(e) {
|
|
441
|
+
const t = [], r = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
442
442
|
acceptNode: (o) => {
|
|
443
443
|
const a = o.tagName === "INPUT" && o.type === "hidden";
|
|
444
444
|
return o.disabled || o.hidden || a ? NodeFilter.FILTER_SKIP : o.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
445
445
|
}
|
|
446
446
|
});
|
|
447
|
-
for (;
|
|
448
|
-
return
|
|
447
|
+
for (; r.nextNode(); ) t.push(r.currentNode);
|
|
448
|
+
return t;
|
|
449
449
|
}
|
|
450
|
-
function
|
|
451
|
-
for (const
|
|
452
|
-
if (!
|
|
450
|
+
function at(e, t) {
|
|
451
|
+
for (const r of e)
|
|
452
|
+
if (!un(r, { upTo: t })) return r;
|
|
453
453
|
}
|
|
454
|
-
function
|
|
454
|
+
function un(e, { upTo: t }) {
|
|
455
455
|
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
456
456
|
for (; e; ) {
|
|
457
|
-
if (
|
|
457
|
+
if (t !== void 0 && e === t) return !1;
|
|
458
458
|
if (getComputedStyle(e).display === "none") return !0;
|
|
459
459
|
e = e.parentElement;
|
|
460
460
|
}
|
|
461
461
|
return !1;
|
|
462
462
|
}
|
|
463
|
-
function
|
|
463
|
+
function dn(e) {
|
|
464
464
|
return e instanceof HTMLInputElement && "select" in e;
|
|
465
465
|
}
|
|
466
|
-
function
|
|
466
|
+
function B(e, { select: t = !1 } = {}) {
|
|
467
467
|
if (e && e.focus) {
|
|
468
|
-
const
|
|
469
|
-
e.focus({ preventScroll: !0 }), e !==
|
|
468
|
+
const r = document.activeElement;
|
|
469
|
+
e.focus({ preventScroll: !0 }), e !== r && dn(e) && t && e.select();
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
|
-
var
|
|
473
|
-
function
|
|
472
|
+
var it = fn();
|
|
473
|
+
function fn() {
|
|
474
474
|
let e = [];
|
|
475
475
|
return {
|
|
476
|
-
add(
|
|
477
|
-
const
|
|
478
|
-
|
|
476
|
+
add(t) {
|
|
477
|
+
const r = e[0];
|
|
478
|
+
t !== r && (r == null || r.pause()), e = st(e, t), e.unshift(t);
|
|
479
479
|
},
|
|
480
|
-
remove(
|
|
481
|
-
var
|
|
482
|
-
e =
|
|
480
|
+
remove(t) {
|
|
481
|
+
var r;
|
|
482
|
+
e = st(e, t), (r = e[0]) == null || r.resume();
|
|
483
483
|
}
|
|
484
484
|
};
|
|
485
485
|
}
|
|
486
|
-
function
|
|
487
|
-
const
|
|
488
|
-
return o !== -1 &&
|
|
486
|
+
function st(e, t) {
|
|
487
|
+
const r = [...e], o = r.indexOf(t);
|
|
488
|
+
return o !== -1 && r.splice(o, 1), r;
|
|
489
489
|
}
|
|
490
|
-
function
|
|
491
|
-
return e.filter((
|
|
490
|
+
function pn(e) {
|
|
491
|
+
return e.filter((t) => t.tagName !== "A");
|
|
492
492
|
}
|
|
493
|
-
var
|
|
493
|
+
var vn = "Portal", kt = c.forwardRef((e, t) => {
|
|
494
494
|
var i;
|
|
495
|
-
const { container:
|
|
495
|
+
const { container: r, ...o } = e, [a, n] = c.useState(!1);
|
|
496
496
|
ne(() => n(!0), []);
|
|
497
|
-
const s =
|
|
498
|
-
return s ?
|
|
497
|
+
const s = r || a && ((i = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : i.body);
|
|
498
|
+
return s ? Ir.createPortal(/* @__PURE__ */ f(T.div, { ...o, ref: t }), s) : null;
|
|
499
499
|
});
|
|
500
|
-
|
|
501
|
-
function hn(e,
|
|
502
|
-
return c.useReducer((
|
|
500
|
+
kt.displayName = vn;
|
|
501
|
+
function hn(e, t) {
|
|
502
|
+
return c.useReducer((r, o) => t[r][o] ?? r, e);
|
|
503
503
|
}
|
|
504
|
-
var
|
|
505
|
-
const { present:
|
|
506
|
-
return typeof
|
|
504
|
+
var V = (e) => {
|
|
505
|
+
const { present: t, children: r } = e, o = mn(t), a = typeof r == "function" ? r({ present: o.isPresent }) : c.Children.only(r), n = L(o.ref, gn(a));
|
|
506
|
+
return typeof r == "function" || o.isPresent ? c.cloneElement(a, { ref: n }) : null;
|
|
507
507
|
};
|
|
508
|
-
|
|
509
|
-
function
|
|
510
|
-
const [
|
|
508
|
+
V.displayName = "Presence";
|
|
509
|
+
function mn(e) {
|
|
510
|
+
const [t, r] = c.useState(), o = c.useRef(null), a = c.useRef(e), n = c.useRef("none"), s = e ? "mounted" : "unmounted", [i, u] = hn(s, {
|
|
511
511
|
mounted: {
|
|
512
512
|
UNMOUNT: "unmounted",
|
|
513
513
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -526,162 +526,162 @@ function vn(e) {
|
|
|
526
526
|
}, [i]), ne(() => {
|
|
527
527
|
const l = o.current, d = a.current;
|
|
528
528
|
if (d !== e) {
|
|
529
|
-
const
|
|
530
|
-
e ? u("MOUNT") : m === "none" || (l == null ? void 0 : l.display) === "none" ? u("UNMOUNT") : u(d &&
|
|
529
|
+
const v = n.current, m = le(l);
|
|
530
|
+
e ? u("MOUNT") : m === "none" || (l == null ? void 0 : l.display) === "none" ? u("UNMOUNT") : u(d && v !== m ? "ANIMATION_OUT" : "UNMOUNT"), a.current = e;
|
|
531
531
|
}
|
|
532
532
|
}, [e, u]), ne(() => {
|
|
533
|
-
if (
|
|
533
|
+
if (t) {
|
|
534
534
|
let l;
|
|
535
|
-
const d =
|
|
536
|
-
const
|
|
537
|
-
if (m.target ===
|
|
538
|
-
const g =
|
|
539
|
-
|
|
540
|
-
|
|
535
|
+
const d = t.ownerDocument.defaultView ?? window, p = (m) => {
|
|
536
|
+
const h = le(o.current).includes(CSS.escape(m.animationName));
|
|
537
|
+
if (m.target === t && h && (u("ANIMATION_END"), !a.current)) {
|
|
538
|
+
const g = t.style.animationFillMode;
|
|
539
|
+
t.style.animationFillMode = "forwards", l = d.setTimeout(() => {
|
|
540
|
+
t.style.animationFillMode === "forwards" && (t.style.animationFillMode = g);
|
|
541
541
|
});
|
|
542
542
|
}
|
|
543
|
-
},
|
|
544
|
-
m.target ===
|
|
543
|
+
}, v = (m) => {
|
|
544
|
+
m.target === t && (n.current = le(o.current));
|
|
545
545
|
};
|
|
546
|
-
return
|
|
547
|
-
d.clearTimeout(l),
|
|
546
|
+
return t.addEventListener("animationstart", v), t.addEventListener("animationcancel", p), t.addEventListener("animationend", p), () => {
|
|
547
|
+
d.clearTimeout(l), t.removeEventListener("animationstart", v), t.removeEventListener("animationcancel", p), t.removeEventListener("animationend", p);
|
|
548
548
|
};
|
|
549
549
|
} else
|
|
550
550
|
u("ANIMATION_END");
|
|
551
|
-
}, [
|
|
551
|
+
}, [t, u]), {
|
|
552
552
|
isPresent: ["mounted", "unmountSuspended"].includes(i),
|
|
553
553
|
ref: c.useCallback((l) => {
|
|
554
|
-
o.current = l ? getComputedStyle(l) : null,
|
|
554
|
+
o.current = l ? getComputedStyle(l) : null, r(l);
|
|
555
555
|
}, [])
|
|
556
556
|
};
|
|
557
557
|
}
|
|
558
558
|
function le(e) {
|
|
559
559
|
return (e == null ? void 0 : e.animationName) || "none";
|
|
560
560
|
}
|
|
561
|
-
function
|
|
561
|
+
function gn(e) {
|
|
562
562
|
var o, a;
|
|
563
|
-
let
|
|
564
|
-
return
|
|
563
|
+
let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, r = t && "isReactWarning" in t && t.isReactWarning;
|
|
564
|
+
return r ? e.ref : (t = (a = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : a.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
|
|
565
565
|
}
|
|
566
566
|
var Ae = 0;
|
|
567
|
-
function
|
|
567
|
+
function _n() {
|
|
568
568
|
c.useEffect(() => {
|
|
569
569
|
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
570
|
-
return document.body.insertAdjacentElement("afterbegin", e[0] ??
|
|
571
|
-
Ae === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((
|
|
570
|
+
return document.body.insertAdjacentElement("afterbegin", e[0] ?? ct()), document.body.insertAdjacentElement("beforeend", e[1] ?? ct()), Ae++, () => {
|
|
571
|
+
Ae === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), Ae--;
|
|
572
572
|
};
|
|
573
573
|
}, []);
|
|
574
574
|
}
|
|
575
|
-
function
|
|
575
|
+
function ct() {
|
|
576
576
|
const e = document.createElement("span");
|
|
577
577
|
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
578
578
|
}
|
|
579
579
|
var k = function() {
|
|
580
|
-
return k = Object.assign || function(
|
|
581
|
-
for (var
|
|
582
|
-
|
|
583
|
-
for (var n in
|
|
580
|
+
return k = Object.assign || function(t) {
|
|
581
|
+
for (var r, o = 1, a = arguments.length; o < a; o++) {
|
|
582
|
+
r = arguments[o];
|
|
583
|
+
for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (t[n] = r[n]);
|
|
584
584
|
}
|
|
585
|
-
return
|
|
585
|
+
return t;
|
|
586
586
|
}, k.apply(this, arguments);
|
|
587
587
|
};
|
|
588
|
-
function
|
|
589
|
-
var
|
|
590
|
-
for (var o in e) Object.prototype.hasOwnProperty.call(e, o) &&
|
|
588
|
+
function Wt(e, t) {
|
|
589
|
+
var r = {};
|
|
590
|
+
for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (r[o] = e[o]);
|
|
591
591
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
592
592
|
for (var a = 0, o = Object.getOwnPropertySymbols(e); a < o.length; a++)
|
|
593
|
-
|
|
594
|
-
return
|
|
593
|
+
t.indexOf(o[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[a]) && (r[o[a]] = e[o[a]]);
|
|
594
|
+
return r;
|
|
595
595
|
}
|
|
596
|
-
function
|
|
597
|
-
if (
|
|
598
|
-
(n || !(o in
|
|
599
|
-
return e.concat(n || Array.prototype.slice.call(
|
|
596
|
+
function bn(e, t, r) {
|
|
597
|
+
if (r || arguments.length === 2) for (var o = 0, a = t.length, n; o < a; o++)
|
|
598
|
+
(n || !(o in t)) && (n || (n = Array.prototype.slice.call(t, 0, o)), n[o] = t[o]);
|
|
599
|
+
return e.concat(n || Array.prototype.slice.call(t));
|
|
600
600
|
}
|
|
601
|
-
var ge = "right-scroll-bar-position", _e = "width-before-scroll-bar", wn = "with-scroll-bars-hidden",
|
|
602
|
-
function De(e,
|
|
603
|
-
return typeof e == "function" ? e(
|
|
601
|
+
var ge = "right-scroll-bar-position", _e = "width-before-scroll-bar", wn = "with-scroll-bars-hidden", yn = "--removed-body-scroll-bar-size";
|
|
602
|
+
function De(e, t) {
|
|
603
|
+
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
604
604
|
}
|
|
605
|
-
function
|
|
606
|
-
var
|
|
605
|
+
function Sn(e, t) {
|
|
606
|
+
var r = Tr(function() {
|
|
607
607
|
return {
|
|
608
608
|
// value
|
|
609
609
|
value: e,
|
|
610
610
|
// last callback
|
|
611
|
-
callback:
|
|
611
|
+
callback: t,
|
|
612
612
|
// "memoized" public interface
|
|
613
613
|
facade: {
|
|
614
614
|
get current() {
|
|
615
|
-
return
|
|
615
|
+
return r.value;
|
|
616
616
|
},
|
|
617
617
|
set current(o) {
|
|
618
|
-
var a =
|
|
619
|
-
a !== o && (
|
|
618
|
+
var a = r.value;
|
|
619
|
+
a !== o && (r.value = o, r.callback(o, a));
|
|
620
620
|
}
|
|
621
621
|
}
|
|
622
622
|
};
|
|
623
623
|
})[0];
|
|
624
|
-
return
|
|
624
|
+
return r.callback = t, r.facade;
|
|
625
625
|
}
|
|
626
|
-
var
|
|
627
|
-
function
|
|
628
|
-
var
|
|
626
|
+
var En = typeof window < "u" ? c.useLayoutEffect : c.useEffect, lt = /* @__PURE__ */ new WeakMap();
|
|
627
|
+
function Cn(e, t) {
|
|
628
|
+
var r = Sn(null, function(o) {
|
|
629
629
|
return e.forEach(function(a) {
|
|
630
630
|
return De(a, o);
|
|
631
631
|
});
|
|
632
632
|
});
|
|
633
|
-
return
|
|
634
|
-
var o =
|
|
633
|
+
return En(function() {
|
|
634
|
+
var o = lt.get(r);
|
|
635
635
|
if (o) {
|
|
636
|
-
var a = new Set(o), n = new Set(e), s =
|
|
636
|
+
var a = new Set(o), n = new Set(e), s = r.current;
|
|
637
637
|
a.forEach(function(i) {
|
|
638
638
|
n.has(i) || De(i, null);
|
|
639
639
|
}), n.forEach(function(i) {
|
|
640
640
|
a.has(i) || De(i, s);
|
|
641
641
|
});
|
|
642
642
|
}
|
|
643
|
-
|
|
644
|
-
}, [e]),
|
|
643
|
+
lt.set(r, e);
|
|
644
|
+
}, [e]), r;
|
|
645
645
|
}
|
|
646
|
-
function
|
|
646
|
+
function Pn(e) {
|
|
647
647
|
return e;
|
|
648
648
|
}
|
|
649
|
-
function
|
|
650
|
-
|
|
651
|
-
var
|
|
649
|
+
function xn(e, t) {
|
|
650
|
+
t === void 0 && (t = Pn);
|
|
651
|
+
var r = [], o = !1, a = {
|
|
652
652
|
read: function() {
|
|
653
653
|
if (o)
|
|
654
654
|
throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
|
|
655
|
-
return
|
|
655
|
+
return r.length ? r[r.length - 1] : e;
|
|
656
656
|
},
|
|
657
657
|
useMedium: function(n) {
|
|
658
|
-
var s =
|
|
659
|
-
return
|
|
660
|
-
|
|
658
|
+
var s = t(n, o);
|
|
659
|
+
return r.push(s), function() {
|
|
660
|
+
r = r.filter(function(i) {
|
|
661
661
|
return i !== s;
|
|
662
662
|
});
|
|
663
663
|
};
|
|
664
664
|
},
|
|
665
665
|
assignSyncMedium: function(n) {
|
|
666
|
-
for (o = !0;
|
|
667
|
-
var s =
|
|
668
|
-
|
|
666
|
+
for (o = !0; r.length; ) {
|
|
667
|
+
var s = r;
|
|
668
|
+
r = [], s.forEach(n);
|
|
669
669
|
}
|
|
670
|
-
|
|
670
|
+
r = {
|
|
671
671
|
push: function(i) {
|
|
672
672
|
return n(i);
|
|
673
673
|
},
|
|
674
674
|
filter: function() {
|
|
675
|
-
return
|
|
675
|
+
return r;
|
|
676
676
|
}
|
|
677
677
|
};
|
|
678
678
|
},
|
|
679
679
|
assignMedium: function(n) {
|
|
680
680
|
o = !0;
|
|
681
681
|
var s = [];
|
|
682
|
-
if (
|
|
683
|
-
var i =
|
|
684
|
-
|
|
682
|
+
if (r.length) {
|
|
683
|
+
var i = r;
|
|
684
|
+
r = [], i.forEach(n), s = r;
|
|
685
685
|
}
|
|
686
686
|
var u = function() {
|
|
687
687
|
var d = s;
|
|
@@ -689,48 +689,48 @@ function Pn(e, r) {
|
|
|
689
689
|
}, l = function() {
|
|
690
690
|
return Promise.resolve().then(u);
|
|
691
691
|
};
|
|
692
|
-
l(),
|
|
692
|
+
l(), r = {
|
|
693
693
|
push: function(d) {
|
|
694
694
|
s.push(d), l();
|
|
695
695
|
},
|
|
696
696
|
filter: function(d) {
|
|
697
|
-
return s = s.filter(d),
|
|
697
|
+
return s = s.filter(d), r;
|
|
698
698
|
}
|
|
699
699
|
};
|
|
700
700
|
}
|
|
701
701
|
};
|
|
702
702
|
return a;
|
|
703
703
|
}
|
|
704
|
-
function
|
|
704
|
+
function Rn(e) {
|
|
705
705
|
e === void 0 && (e = {});
|
|
706
|
-
var
|
|
707
|
-
return
|
|
706
|
+
var t = xn(null);
|
|
707
|
+
return t.options = k({ async: !0, ssr: !1 }, e), t;
|
|
708
708
|
}
|
|
709
|
-
var
|
|
710
|
-
var
|
|
711
|
-
if (!
|
|
709
|
+
var jt = function(e) {
|
|
710
|
+
var t = e.sideCar, r = Wt(e, ["sideCar"]);
|
|
711
|
+
if (!t)
|
|
712
712
|
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
713
|
-
var o =
|
|
713
|
+
var o = t.read();
|
|
714
714
|
if (!o)
|
|
715
715
|
throw new Error("Sidecar medium not found");
|
|
716
|
-
return c.createElement(o, k({},
|
|
716
|
+
return c.createElement(o, k({}, r));
|
|
717
717
|
};
|
|
718
|
-
|
|
719
|
-
function
|
|
720
|
-
return e.useMedium(
|
|
718
|
+
jt.isSideCarExport = !0;
|
|
719
|
+
function Nn(e, t) {
|
|
720
|
+
return e.useMedium(t), jt;
|
|
721
721
|
}
|
|
722
|
-
var
|
|
723
|
-
}, Se = c.forwardRef(function(e,
|
|
724
|
-
var
|
|
722
|
+
var Ft = Rn(), Te = function() {
|
|
723
|
+
}, Se = c.forwardRef(function(e, t) {
|
|
724
|
+
var r = c.useRef(null), o = c.useState({
|
|
725
725
|
onScrollCapture: Te,
|
|
726
726
|
onWheelCapture: Te,
|
|
727
727
|
onTouchMoveCapture: Te
|
|
728
|
-
}), a = o[0], n = o[1], s = e.forwardProps, i = e.children, u = e.className, l = e.removeScrollBar, d = e.enabled, p = e.shards,
|
|
728
|
+
}), a = o[0], n = o[1], s = e.forwardProps, i = e.children, u = e.className, l = e.removeScrollBar, d = e.enabled, p = e.shards, v = e.sideCar, m = e.noRelative, _ = e.noIsolation, h = e.inert, g = e.allowPinchZoom, b = e.as, w = b === void 0 ? "div" : b, E = e.gapMode, y = Wt(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), C = v, x = Cn([r, t]), S = k(k({}, y), a);
|
|
729
729
|
return c.createElement(
|
|
730
730
|
c.Fragment,
|
|
731
731
|
null,
|
|
732
|
-
d && c.createElement(C, { sideCar:
|
|
733
|
-
s ? c.cloneElement(c.Children.only(i), k(k({}, S), { ref: x })) : c.createElement(
|
|
732
|
+
d && c.createElement(C, { sideCar: Ft, removeScrollBar: l, shards: p, noRelative: m, noIsolation: _, inert: h, setCallbacks: n, allowPinchZoom: !!g, lockRef: r, gapMode: E }),
|
|
733
|
+
s ? c.cloneElement(c.Children.only(i), k(k({}, S), { ref: x })) : c.createElement(w, k({}, S, { className: u, ref: x }), i)
|
|
734
734
|
);
|
|
735
735
|
});
|
|
736
736
|
Se.defaultProps = {
|
|
@@ -742,83 +742,83 @@ Se.classNames = {
|
|
|
742
742
|
fullWidth: _e,
|
|
743
743
|
zeroRight: ge
|
|
744
744
|
};
|
|
745
|
-
var
|
|
745
|
+
var An = function() {
|
|
746
746
|
if (typeof __webpack_nonce__ < "u")
|
|
747
747
|
return __webpack_nonce__;
|
|
748
748
|
};
|
|
749
|
-
function
|
|
749
|
+
function Dn() {
|
|
750
750
|
if (!document)
|
|
751
751
|
return null;
|
|
752
752
|
var e = document.createElement("style");
|
|
753
753
|
e.type = "text/css";
|
|
754
|
-
var
|
|
755
|
-
return
|
|
754
|
+
var t = An();
|
|
755
|
+
return t && e.setAttribute("nonce", t), e;
|
|
756
756
|
}
|
|
757
|
-
function
|
|
758
|
-
e.styleSheet ? e.styleSheet.cssText =
|
|
757
|
+
function Tn(e, t) {
|
|
758
|
+
e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
|
|
759
759
|
}
|
|
760
|
-
function
|
|
761
|
-
var
|
|
762
|
-
|
|
760
|
+
function On(e) {
|
|
761
|
+
var t = document.head || document.getElementsByTagName("head")[0];
|
|
762
|
+
t.appendChild(e);
|
|
763
763
|
}
|
|
764
|
-
var
|
|
765
|
-
var e = 0,
|
|
764
|
+
var Ln = function() {
|
|
765
|
+
var e = 0, t = null;
|
|
766
766
|
return {
|
|
767
|
-
add: function(
|
|
768
|
-
e == 0 && (
|
|
767
|
+
add: function(r) {
|
|
768
|
+
e == 0 && (t = Dn()) && (Tn(t, r), On(t)), e++;
|
|
769
769
|
},
|
|
770
770
|
remove: function() {
|
|
771
|
-
e--, !e &&
|
|
771
|
+
e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
|
|
772
772
|
}
|
|
773
773
|
};
|
|
774
|
-
},
|
|
775
|
-
var e =
|
|
776
|
-
return function(
|
|
774
|
+
}, $n = function() {
|
|
775
|
+
var e = Ln();
|
|
776
|
+
return function(t, r) {
|
|
777
777
|
c.useEffect(function() {
|
|
778
|
-
return e.add(
|
|
778
|
+
return e.add(t), function() {
|
|
779
779
|
e.remove();
|
|
780
780
|
};
|
|
781
|
-
}, [
|
|
781
|
+
}, [t && r]);
|
|
782
782
|
};
|
|
783
|
-
},
|
|
784
|
-
var e =
|
|
785
|
-
var o =
|
|
783
|
+
}, Ut = function() {
|
|
784
|
+
var e = $n(), t = function(r) {
|
|
785
|
+
var o = r.styles, a = r.dynamic;
|
|
786
786
|
return e(o, a), null;
|
|
787
787
|
};
|
|
788
|
-
return
|
|
789
|
-
},
|
|
788
|
+
return t;
|
|
789
|
+
}, Mn = {
|
|
790
790
|
left: 0,
|
|
791
791
|
top: 0,
|
|
792
792
|
right: 0,
|
|
793
793
|
gap: 0
|
|
794
794
|
}, Oe = function(e) {
|
|
795
795
|
return parseInt(e || "", 10) || 0;
|
|
796
|
-
}, Mn = function(e) {
|
|
797
|
-
var r = window.getComputedStyle(document.body), t = r[e === "padding" ? "paddingLeft" : "marginLeft"], o = r[e === "padding" ? "paddingTop" : "marginTop"], a = r[e === "padding" ? "paddingRight" : "marginRight"];
|
|
798
|
-
return [Oe(t), Oe(o), Oe(a)];
|
|
799
796
|
}, In = function(e) {
|
|
797
|
+
var t = window.getComputedStyle(document.body), r = t[e === "padding" ? "paddingLeft" : "marginLeft"], o = t[e === "padding" ? "paddingTop" : "marginTop"], a = t[e === "padding" ? "paddingRight" : "marginRight"];
|
|
798
|
+
return [Oe(r), Oe(o), Oe(a)];
|
|
799
|
+
}, kn = function(e) {
|
|
800
800
|
if (e === void 0 && (e = "margin"), typeof window > "u")
|
|
801
|
-
return
|
|
802
|
-
var
|
|
801
|
+
return Mn;
|
|
802
|
+
var t = In(e), r = document.documentElement.clientWidth, o = window.innerWidth;
|
|
803
803
|
return {
|
|
804
|
-
left:
|
|
805
|
-
top:
|
|
806
|
-
right:
|
|
807
|
-
gap: Math.max(0, o -
|
|
804
|
+
left: t[0],
|
|
805
|
+
top: t[1],
|
|
806
|
+
right: t[2],
|
|
807
|
+
gap: Math.max(0, o - r + t[2] - t[0])
|
|
808
808
|
};
|
|
809
|
-
},
|
|
809
|
+
}, Wn = Ut(), te = "data-scroll-locked", jn = function(e, t, r, o) {
|
|
810
810
|
var a = e.left, n = e.top, s = e.right, i = e.gap;
|
|
811
|
-
return
|
|
811
|
+
return r === void 0 && (r = "margin"), `
|
|
812
812
|
.`.concat(wn, ` {
|
|
813
813
|
overflow: hidden `).concat(o, `;
|
|
814
814
|
padding-right: `).concat(i, "px ").concat(o, `;
|
|
815
815
|
}
|
|
816
|
-
body[`).concat(
|
|
816
|
+
body[`).concat(te, `] {
|
|
817
817
|
overflow: hidden `).concat(o, `;
|
|
818
818
|
overscroll-behavior: contain;
|
|
819
819
|
`).concat([
|
|
820
|
-
|
|
821
|
-
|
|
820
|
+
t && "position: relative ".concat(o, ";"),
|
|
821
|
+
r === "margin" && `
|
|
822
822
|
padding-left: `.concat(a, `px;
|
|
823
823
|
padding-top: `).concat(n, `px;
|
|
824
824
|
padding-right: `).concat(s, `px;
|
|
@@ -826,7 +826,7 @@ var On = function() {
|
|
|
826
826
|
margin-top:0;
|
|
827
827
|
margin-right: `).concat(i, "px ").concat(o, `;
|
|
828
828
|
`),
|
|
829
|
-
|
|
829
|
+
r === "padding" && "padding-right: ".concat(i, "px ").concat(o, ";")
|
|
830
830
|
].filter(Boolean).join(""), `
|
|
831
831
|
}
|
|
832
832
|
|
|
@@ -846,274 +846,274 @@ var On = function() {
|
|
|
846
846
|
margin-right: 0 `).concat(o, `;
|
|
847
847
|
}
|
|
848
848
|
|
|
849
|
-
body[`).concat(
|
|
850
|
-
`).concat(
|
|
849
|
+
body[`).concat(te, `] {
|
|
850
|
+
`).concat(yn, ": ").concat(i, `px;
|
|
851
851
|
}
|
|
852
852
|
`);
|
|
853
|
-
},
|
|
854
|
-
var e = parseInt(document.body.getAttribute(
|
|
853
|
+
}, ut = function() {
|
|
854
|
+
var e = parseInt(document.body.getAttribute(te) || "0", 10);
|
|
855
855
|
return isFinite(e) ? e : 0;
|
|
856
856
|
}, Fn = function() {
|
|
857
857
|
c.useEffect(function() {
|
|
858
|
-
return document.body.setAttribute(
|
|
859
|
-
var e =
|
|
860
|
-
e <= 0 ? document.body.removeAttribute(
|
|
858
|
+
return document.body.setAttribute(te, (ut() + 1).toString()), function() {
|
|
859
|
+
var e = ut() - 1;
|
|
860
|
+
e <= 0 ? document.body.removeAttribute(te) : document.body.setAttribute(te, e.toString());
|
|
861
861
|
};
|
|
862
862
|
}, []);
|
|
863
863
|
}, Un = function(e) {
|
|
864
|
-
var
|
|
864
|
+
var t = e.noRelative, r = e.noImportant, o = e.gapMode, a = o === void 0 ? "margin" : o;
|
|
865
865
|
Fn();
|
|
866
866
|
var n = c.useMemo(function() {
|
|
867
|
-
return
|
|
867
|
+
return kn(a);
|
|
868
868
|
}, [a]);
|
|
869
|
-
return c.createElement(
|
|
870
|
-
},
|
|
869
|
+
return c.createElement(Wn, { styles: jn(n, !t, a, r ? "" : "!important") });
|
|
870
|
+
}, je = !1;
|
|
871
871
|
if (typeof window < "u")
|
|
872
872
|
try {
|
|
873
873
|
var ue = Object.defineProperty({}, "passive", {
|
|
874
874
|
get: function() {
|
|
875
|
-
return
|
|
875
|
+
return je = !0, !0;
|
|
876
876
|
}
|
|
877
877
|
});
|
|
878
878
|
window.addEventListener("test", ue, ue), window.removeEventListener("test", ue, ue);
|
|
879
879
|
} catch {
|
|
880
|
-
|
|
880
|
+
je = !1;
|
|
881
881
|
}
|
|
882
|
-
var q =
|
|
882
|
+
var q = je ? { passive: !1 } : !1, Bn = function(e) {
|
|
883
883
|
return e.tagName === "TEXTAREA";
|
|
884
|
-
},
|
|
884
|
+
}, Bt = function(e, t) {
|
|
885
885
|
if (!(e instanceof Element))
|
|
886
886
|
return !1;
|
|
887
|
-
var
|
|
887
|
+
var r = window.getComputedStyle(e);
|
|
888
888
|
return (
|
|
889
889
|
// not-not-scrollable
|
|
890
|
-
t
|
|
891
|
-
!(
|
|
890
|
+
r[t] !== "hidden" && // contains scroll inside self
|
|
891
|
+
!(r.overflowY === r.overflowX && !Bn(e) && r[t] === "visible")
|
|
892
892
|
);
|
|
893
|
-
},
|
|
894
|
-
return
|
|
895
|
-
},
|
|
896
|
-
return
|
|
897
|
-
},
|
|
898
|
-
var
|
|
893
|
+
}, Hn = function(e) {
|
|
894
|
+
return Bt(e, "overflowY");
|
|
895
|
+
}, Vn = function(e) {
|
|
896
|
+
return Bt(e, "overflowX");
|
|
897
|
+
}, dt = function(e, t) {
|
|
898
|
+
var r = t.ownerDocument, o = t;
|
|
899
899
|
do {
|
|
900
900
|
typeof ShadowRoot < "u" && o instanceof ShadowRoot && (o = o.host);
|
|
901
|
-
var a =
|
|
901
|
+
var a = Ht(e, o);
|
|
902
902
|
if (a) {
|
|
903
|
-
var n =
|
|
903
|
+
var n = Vt(e, o), s = n[1], i = n[2];
|
|
904
904
|
if (s > i)
|
|
905
905
|
return !0;
|
|
906
906
|
}
|
|
907
907
|
o = o.parentNode;
|
|
908
|
-
} while (o && o !==
|
|
908
|
+
} while (o && o !== r.body);
|
|
909
909
|
return !1;
|
|
910
|
-
},
|
|
911
|
-
var
|
|
910
|
+
}, zn = function(e) {
|
|
911
|
+
var t = e.scrollTop, r = e.scrollHeight, o = e.clientHeight;
|
|
912
912
|
return [
|
|
913
|
-
r,
|
|
914
913
|
t,
|
|
914
|
+
r,
|
|
915
915
|
o
|
|
916
916
|
];
|
|
917
|
-
},
|
|
918
|
-
var
|
|
917
|
+
}, Yn = function(e) {
|
|
918
|
+
var t = e.scrollLeft, r = e.scrollWidth, o = e.clientWidth;
|
|
919
919
|
return [
|
|
920
|
-
r,
|
|
921
920
|
t,
|
|
921
|
+
r,
|
|
922
922
|
o
|
|
923
923
|
];
|
|
924
|
-
},
|
|
925
|
-
return e === "v" ?
|
|
926
|
-
},
|
|
927
|
-
return e === "v" ?
|
|
928
|
-
},
|
|
929
|
-
return e === "h" &&
|
|
930
|
-
},
|
|
931
|
-
var n =
|
|
924
|
+
}, Ht = function(e, t) {
|
|
925
|
+
return e === "v" ? Hn(t) : Vn(t);
|
|
926
|
+
}, Vt = function(e, t) {
|
|
927
|
+
return e === "v" ? zn(t) : Yn(t);
|
|
928
|
+
}, Xn = function(e, t) {
|
|
929
|
+
return e === "h" && t === "rtl" ? -1 : 1;
|
|
930
|
+
}, qn = function(e, t, r, o, a) {
|
|
931
|
+
var n = Xn(e, window.getComputedStyle(t).direction), s = n * o, i = r.target, u = t.contains(i), l = !1, d = s > 0, p = 0, v = 0;
|
|
932
932
|
do {
|
|
933
933
|
if (!i)
|
|
934
934
|
break;
|
|
935
|
-
var m =
|
|
936
|
-
(
|
|
937
|
-
var
|
|
938
|
-
i =
|
|
935
|
+
var m = Vt(e, i), _ = m[0], h = m[1], g = m[2], b = h - g - n * _;
|
|
936
|
+
(_ || b) && Ht(e, i) && (p += b, v += _);
|
|
937
|
+
var w = i.parentNode;
|
|
938
|
+
i = w && w.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? w.host : w;
|
|
939
939
|
} while (
|
|
940
940
|
// portaled content
|
|
941
941
|
!u && i !== document.body || // self content
|
|
942
|
-
u && (
|
|
942
|
+
u && (t.contains(i) || t === i)
|
|
943
943
|
);
|
|
944
|
-
return (d && Math.abs(p) < 1 || !d && Math.abs(
|
|
944
|
+
return (d && Math.abs(p) < 1 || !d && Math.abs(v) < 1) && (l = !0), l;
|
|
945
945
|
}, de = function(e) {
|
|
946
946
|
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
947
|
-
},
|
|
947
|
+
}, ft = function(e) {
|
|
948
948
|
return [e.deltaX, e.deltaY];
|
|
949
|
-
},
|
|
949
|
+
}, pt = function(e) {
|
|
950
950
|
return e && "current" in e ? e.current : e;
|
|
951
|
-
},
|
|
952
|
-
return e[0] ===
|
|
953
|
-
},
|
|
951
|
+
}, Gn = function(e, t) {
|
|
952
|
+
return e[0] === t[0] && e[1] === t[1];
|
|
953
|
+
}, Kn = function(e) {
|
|
954
954
|
return `
|
|
955
955
|
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
956
956
|
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
957
957
|
`);
|
|
958
|
-
},
|
|
959
|
-
function
|
|
960
|
-
var
|
|
958
|
+
}, Zn = 0, G = [];
|
|
959
|
+
function Qn(e) {
|
|
960
|
+
var t = c.useRef([]), r = c.useRef([0, 0]), o = c.useRef(), a = c.useState(Zn++)[0], n = c.useState(Ut)[0], s = c.useRef(e);
|
|
961
961
|
c.useEffect(function() {
|
|
962
962
|
s.current = e;
|
|
963
963
|
}, [e]), c.useEffect(function() {
|
|
964
964
|
if (e.inert) {
|
|
965
965
|
document.body.classList.add("block-interactivity-".concat(a));
|
|
966
|
-
var
|
|
967
|
-
return
|
|
966
|
+
var h = bn([e.lockRef.current], (e.shards || []).map(pt), !0).filter(Boolean);
|
|
967
|
+
return h.forEach(function(g) {
|
|
968
968
|
return g.classList.add("allow-interactivity-".concat(a));
|
|
969
969
|
}), function() {
|
|
970
|
-
document.body.classList.remove("block-interactivity-".concat(a)),
|
|
970
|
+
document.body.classList.remove("block-interactivity-".concat(a)), h.forEach(function(g) {
|
|
971
971
|
return g.classList.remove("allow-interactivity-".concat(a));
|
|
972
972
|
});
|
|
973
973
|
};
|
|
974
974
|
}
|
|
975
975
|
}, [e.inert, e.lockRef.current, e.shards]);
|
|
976
|
-
var i = c.useCallback(function(
|
|
977
|
-
if ("touches" in
|
|
976
|
+
var i = c.useCallback(function(h, g) {
|
|
977
|
+
if ("touches" in h && h.touches.length === 2 || h.type === "wheel" && h.ctrlKey)
|
|
978
978
|
return !s.current.allowPinchZoom;
|
|
979
|
-
var
|
|
980
|
-
if ("touches" in
|
|
979
|
+
var b = de(h), w = r.current, E = "deltaX" in h ? h.deltaX : w[0] - b[0], y = "deltaY" in h ? h.deltaY : w[1] - b[1], C, x = h.target, S = Math.abs(E) > Math.abs(y) ? "h" : "v";
|
|
980
|
+
if ("touches" in h && S === "h" && x.type === "range")
|
|
981
981
|
return !1;
|
|
982
|
-
var N =
|
|
982
|
+
var N = dt(S, x);
|
|
983
983
|
if (!N)
|
|
984
984
|
return !0;
|
|
985
|
-
if (N ? C = S : (C = S === "v" ? "h" : "v", N =
|
|
985
|
+
if (N ? C = S : (C = S === "v" ? "h" : "v", N = dt(S, x)), !N)
|
|
986
986
|
return !1;
|
|
987
|
-
if (!o.current && "changedTouches" in
|
|
987
|
+
if (!o.current && "changedTouches" in h && (E || y) && (o.current = C), !C)
|
|
988
988
|
return !0;
|
|
989
989
|
var P = o.current || C;
|
|
990
|
-
return
|
|
991
|
-
}, []), u = c.useCallback(function(
|
|
992
|
-
var g =
|
|
990
|
+
return qn(P, g, h, P === "h" ? E : y);
|
|
991
|
+
}, []), u = c.useCallback(function(h) {
|
|
992
|
+
var g = h;
|
|
993
993
|
if (!(!G.length || G[G.length - 1] !== n)) {
|
|
994
|
-
var
|
|
995
|
-
return C.name === g.type && (C.target === g.target || g.target === C.shadowParent) &&
|
|
994
|
+
var b = "deltaY" in g ? ft(g) : de(g), w = t.current.filter(function(C) {
|
|
995
|
+
return C.name === g.type && (C.target === g.target || g.target === C.shadowParent) && Gn(C.delta, b);
|
|
996
996
|
})[0];
|
|
997
|
-
if (
|
|
997
|
+
if (w && w.should) {
|
|
998
998
|
g.cancelable && g.preventDefault();
|
|
999
999
|
return;
|
|
1000
1000
|
}
|
|
1001
|
-
if (!
|
|
1002
|
-
var E = (s.current.shards || []).map(
|
|
1001
|
+
if (!w) {
|
|
1002
|
+
var E = (s.current.shards || []).map(pt).filter(Boolean).filter(function(C) {
|
|
1003
1003
|
return C.contains(g.target);
|
|
1004
1004
|
}), y = E.length > 0 ? i(g, E[0]) : !s.current.noIsolation;
|
|
1005
1005
|
y && g.cancelable && g.preventDefault();
|
|
1006
1006
|
}
|
|
1007
1007
|
}
|
|
1008
|
-
}, []), l = c.useCallback(function(
|
|
1009
|
-
var E = { name:
|
|
1010
|
-
|
|
1011
|
-
|
|
1008
|
+
}, []), l = c.useCallback(function(h, g, b, w) {
|
|
1009
|
+
var E = { name: h, delta: g, target: b, should: w, shadowParent: Jn(b) };
|
|
1010
|
+
t.current.push(E), setTimeout(function() {
|
|
1011
|
+
t.current = t.current.filter(function(y) {
|
|
1012
1012
|
return y !== E;
|
|
1013
1013
|
});
|
|
1014
1014
|
}, 1);
|
|
1015
|
-
}, []), d = c.useCallback(function(
|
|
1016
|
-
|
|
1017
|
-
}, []), p = c.useCallback(function(
|
|
1018
|
-
l(
|
|
1019
|
-
}, []),
|
|
1020
|
-
l(
|
|
1015
|
+
}, []), d = c.useCallback(function(h) {
|
|
1016
|
+
r.current = de(h), o.current = void 0;
|
|
1017
|
+
}, []), p = c.useCallback(function(h) {
|
|
1018
|
+
l(h.type, ft(h), h.target, i(h, e.lockRef.current));
|
|
1019
|
+
}, []), v = c.useCallback(function(h) {
|
|
1020
|
+
l(h.type, de(h), h.target, i(h, e.lockRef.current));
|
|
1021
1021
|
}, []);
|
|
1022
1022
|
c.useEffect(function() {
|
|
1023
1023
|
return G.push(n), e.setCallbacks({
|
|
1024
1024
|
onScrollCapture: p,
|
|
1025
1025
|
onWheelCapture: p,
|
|
1026
|
-
onTouchMoveCapture:
|
|
1026
|
+
onTouchMoveCapture: v
|
|
1027
1027
|
}), document.addEventListener("wheel", u, q), document.addEventListener("touchmove", u, q), document.addEventListener("touchstart", d, q), function() {
|
|
1028
|
-
G = G.filter(function(
|
|
1029
|
-
return
|
|
1028
|
+
G = G.filter(function(h) {
|
|
1029
|
+
return h !== n;
|
|
1030
1030
|
}), document.removeEventListener("wheel", u, q), document.removeEventListener("touchmove", u, q), document.removeEventListener("touchstart", d, q);
|
|
1031
1031
|
};
|
|
1032
1032
|
}, []);
|
|
1033
|
-
var m = e.removeScrollBar,
|
|
1033
|
+
var m = e.removeScrollBar, _ = e.inert;
|
|
1034
1034
|
return c.createElement(
|
|
1035
1035
|
c.Fragment,
|
|
1036
1036
|
null,
|
|
1037
|
-
|
|
1037
|
+
_ ? c.createElement(n, { styles: Kn(a) }) : null,
|
|
1038
1038
|
m ? c.createElement(Un, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
|
|
1039
1039
|
);
|
|
1040
1040
|
}
|
|
1041
|
-
function
|
|
1042
|
-
for (var
|
|
1043
|
-
e instanceof ShadowRoot && (
|
|
1044
|
-
return
|
|
1041
|
+
function Jn(e) {
|
|
1042
|
+
for (var t = null; e !== null; )
|
|
1043
|
+
e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
|
|
1044
|
+
return t;
|
|
1045
1045
|
}
|
|
1046
|
-
const
|
|
1047
|
-
var
|
|
1048
|
-
return c.createElement(Se, k({}, e, { ref:
|
|
1046
|
+
const eo = Nn(Ft, Qn);
|
|
1047
|
+
var zt = c.forwardRef(function(e, t) {
|
|
1048
|
+
return c.createElement(Se, k({}, e, { ref: t, sideCar: eo }));
|
|
1049
1049
|
});
|
|
1050
|
-
|
|
1051
|
-
var
|
|
1050
|
+
zt.classNames = Se.classNames;
|
|
1051
|
+
var to = function(e) {
|
|
1052
1052
|
if (typeof document > "u")
|
|
1053
1053
|
return null;
|
|
1054
|
-
var
|
|
1055
|
-
return
|
|
1056
|
-
}, K = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakMap(), pe = {}, Le = 0,
|
|
1057
|
-
return e && (e.host ||
|
|
1058
|
-
}, ro = function(e,
|
|
1059
|
-
return
|
|
1060
|
-
if (e.contains(
|
|
1061
|
-
return
|
|
1062
|
-
var o =
|
|
1063
|
-
return o && e.contains(o) ? o : (console.error("aria-hidden",
|
|
1064
|
-
}).filter(function(
|
|
1065
|
-
return !!
|
|
1054
|
+
var t = Array.isArray(e) ? e[0] : e;
|
|
1055
|
+
return t.ownerDocument.body;
|
|
1056
|
+
}, K = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakMap(), pe = {}, Le = 0, Yt = function(e) {
|
|
1057
|
+
return e && (e.host || Yt(e.parentNode));
|
|
1058
|
+
}, ro = function(e, t) {
|
|
1059
|
+
return t.map(function(r) {
|
|
1060
|
+
if (e.contains(r))
|
|
1061
|
+
return r;
|
|
1062
|
+
var o = Yt(r);
|
|
1063
|
+
return o && e.contains(o) ? o : (console.error("aria-hidden", r, "in not contained inside", e, ". Doing nothing"), null);
|
|
1064
|
+
}).filter(function(r) {
|
|
1065
|
+
return !!r;
|
|
1066
1066
|
});
|
|
1067
|
-
},
|
|
1068
|
-
var a = ro(
|
|
1069
|
-
pe[
|
|
1070
|
-
var n = pe[
|
|
1067
|
+
}, no = function(e, t, r, o) {
|
|
1068
|
+
var a = ro(t, Array.isArray(e) ? e : [e]);
|
|
1069
|
+
pe[r] || (pe[r] = /* @__PURE__ */ new WeakMap());
|
|
1070
|
+
var n = pe[r], s = [], i = /* @__PURE__ */ new Set(), u = new Set(a), l = function(p) {
|
|
1071
1071
|
!p || i.has(p) || (i.add(p), l(p.parentNode));
|
|
1072
1072
|
};
|
|
1073
1073
|
a.forEach(l);
|
|
1074
1074
|
var d = function(p) {
|
|
1075
|
-
!p || u.has(p) || Array.prototype.forEach.call(p.children, function(
|
|
1076
|
-
if (i.has(
|
|
1077
|
-
d(
|
|
1075
|
+
!p || u.has(p) || Array.prototype.forEach.call(p.children, function(v) {
|
|
1076
|
+
if (i.has(v))
|
|
1077
|
+
d(v);
|
|
1078
1078
|
else
|
|
1079
1079
|
try {
|
|
1080
|
-
var m =
|
|
1081
|
-
K.set(
|
|
1082
|
-
} catch (
|
|
1083
|
-
console.error("aria-hidden: cannot operate on ",
|
|
1080
|
+
var m = v.getAttribute(o), _ = m !== null && m !== "false", h = (K.get(v) || 0) + 1, g = (n.get(v) || 0) + 1;
|
|
1081
|
+
K.set(v, h), n.set(v, g), s.push(v), h === 1 && _ && fe.set(v, !0), g === 1 && v.setAttribute(r, "true"), _ || v.setAttribute(o, "true");
|
|
1082
|
+
} catch (b) {
|
|
1083
|
+
console.error("aria-hidden: cannot operate on ", v, b);
|
|
1084
1084
|
}
|
|
1085
1085
|
});
|
|
1086
1086
|
};
|
|
1087
|
-
return d(
|
|
1087
|
+
return d(t), i.clear(), Le++, function() {
|
|
1088
1088
|
s.forEach(function(p) {
|
|
1089
|
-
var
|
|
1090
|
-
K.set(p,
|
|
1089
|
+
var v = K.get(p) - 1, m = n.get(p) - 1;
|
|
1090
|
+
K.set(p, v), n.set(p, m), v || (fe.has(p) || p.removeAttribute(o), fe.delete(p)), m || p.removeAttribute(r);
|
|
1091
1091
|
}), Le--, Le || (K = /* @__PURE__ */ new WeakMap(), K = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakMap(), pe = {});
|
|
1092
1092
|
};
|
|
1093
|
-
},
|
|
1094
|
-
|
|
1095
|
-
var o = Array.from(Array.isArray(e) ? e : [e]), a =
|
|
1096
|
-
return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live], script"))),
|
|
1093
|
+
}, oo = function(e, t, r) {
|
|
1094
|
+
r === void 0 && (r = "data-aria-hidden");
|
|
1095
|
+
var o = Array.from(Array.isArray(e) ? e : [e]), a = to(e);
|
|
1096
|
+
return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live], script"))), no(o, a, r, "aria-hidden")) : function() {
|
|
1097
1097
|
return null;
|
|
1098
1098
|
};
|
|
1099
|
-
}, Ee = "Dialog", [
|
|
1099
|
+
}, Ee = "Dialog", [Xt] = Dt(Ee), [ao, I] = Xt(Ee), qt = (e) => {
|
|
1100
1100
|
const {
|
|
1101
|
-
__scopeDialog:
|
|
1102
|
-
children:
|
|
1101
|
+
__scopeDialog: t,
|
|
1102
|
+
children: r,
|
|
1103
1103
|
open: o,
|
|
1104
1104
|
defaultOpen: a,
|
|
1105
1105
|
onOpenChange: n,
|
|
1106
1106
|
modal: s = !0
|
|
1107
|
-
} = e, i = c.useRef(null), u = c.useRef(null), [l, d] =
|
|
1107
|
+
} = e, i = c.useRef(null), u = c.useRef(null), [l, d] = Br({
|
|
1108
1108
|
prop: o,
|
|
1109
1109
|
defaultProp: a ?? !1,
|
|
1110
1110
|
onChange: n,
|
|
1111
1111
|
caller: Ee
|
|
1112
1112
|
});
|
|
1113
1113
|
return /* @__PURE__ */ f(
|
|
1114
|
-
|
|
1114
|
+
ao,
|
|
1115
1115
|
{
|
|
1116
|
-
scope:
|
|
1116
|
+
scope: t,
|
|
1117
1117
|
triggerRef: i,
|
|
1118
1118
|
contentRef: u,
|
|
1119
1119
|
contentId: xe(),
|
|
@@ -1123,14 +1123,14 @@ var eo = function(e) {
|
|
|
1123
1123
|
onOpenChange: d,
|
|
1124
1124
|
onOpenToggle: c.useCallback(() => d((p) => !p), [d]),
|
|
1125
1125
|
modal: s,
|
|
1126
|
-
children:
|
|
1126
|
+
children: r
|
|
1127
1127
|
}
|
|
1128
1128
|
);
|
|
1129
1129
|
};
|
|
1130
|
-
|
|
1131
|
-
var
|
|
1132
|
-
(e,
|
|
1133
|
-
const { __scopeDialog:
|
|
1130
|
+
qt.displayName = Ee;
|
|
1131
|
+
var Gt = "DialogTrigger", Kt = c.forwardRef(
|
|
1132
|
+
(e, t) => {
|
|
1133
|
+
const { __scopeDialog: r, ...o } = e, a = I(Gt, r), n = L(t, a.triggerRef);
|
|
1134
1134
|
return /* @__PURE__ */ f(
|
|
1135
1135
|
T.button,
|
|
1136
1136
|
{
|
|
@@ -1146,61 +1146,61 @@ var qr = "DialogTrigger", Gr = c.forwardRef(
|
|
|
1146
1146
|
);
|
|
1147
1147
|
}
|
|
1148
1148
|
);
|
|
1149
|
-
|
|
1150
|
-
var Ve = "DialogPortal", [
|
|
1149
|
+
Kt.displayName = Gt;
|
|
1150
|
+
var Ve = "DialogPortal", [io, Zt] = Xt(Ve, {
|
|
1151
1151
|
forceMount: void 0
|
|
1152
|
-
}),
|
|
1153
|
-
const { __scopeDialog:
|
|
1154
|
-
return /* @__PURE__ */ f(
|
|
1152
|
+
}), Qt = (e) => {
|
|
1153
|
+
const { __scopeDialog: t, forceMount: r, children: o, container: a } = e, n = I(Ve, t);
|
|
1154
|
+
return /* @__PURE__ */ f(io, { scope: t, forceMount: r, children: c.Children.map(o, (s) => /* @__PURE__ */ f(V, { present: r || n.open, children: /* @__PURE__ */ f(kt, { asChild: !0, container: a, children: s }) })) });
|
|
1155
1155
|
};
|
|
1156
|
-
|
|
1157
|
-
var
|
|
1158
|
-
(e,
|
|
1159
|
-
const
|
|
1160
|
-
return n.modal ? /* @__PURE__ */ f(
|
|
1156
|
+
Qt.displayName = Ve;
|
|
1157
|
+
var be = "DialogOverlay", Jt = c.forwardRef(
|
|
1158
|
+
(e, t) => {
|
|
1159
|
+
const r = Zt(be, e.__scopeDialog), { forceMount: o = r.forceMount, ...a } = e, n = I(be, e.__scopeDialog);
|
|
1160
|
+
return n.modal ? /* @__PURE__ */ f(V, { present: o || n.open, children: /* @__PURE__ */ f(co, { ...a, ref: t }) }) : null;
|
|
1161
1161
|
}
|
|
1162
1162
|
);
|
|
1163
|
-
|
|
1164
|
-
var
|
|
1165
|
-
(e,
|
|
1166
|
-
const { __scopeDialog:
|
|
1163
|
+
Jt.displayName = be;
|
|
1164
|
+
var so = /* @__PURE__ */ Tt("DialogOverlay.RemoveScroll"), co = c.forwardRef(
|
|
1165
|
+
(e, t) => {
|
|
1166
|
+
const { __scopeDialog: r, ...o } = e, a = I(be, r);
|
|
1167
1167
|
return (
|
|
1168
1168
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
1169
1169
|
// ie. when `Overlay` and `Content` are siblings
|
|
1170
|
-
/* @__PURE__ */ f(
|
|
1170
|
+
/* @__PURE__ */ f(zt, { as: so, allowPinchZoom: !0, shards: [a.contentRef], children: /* @__PURE__ */ f(
|
|
1171
1171
|
T.div,
|
|
1172
1172
|
{
|
|
1173
1173
|
"data-state": Ye(a.open),
|
|
1174
1174
|
...o,
|
|
1175
|
-
ref:
|
|
1175
|
+
ref: t,
|
|
1176
1176
|
style: { pointerEvents: "auto", ...o.style }
|
|
1177
1177
|
}
|
|
1178
1178
|
) })
|
|
1179
1179
|
);
|
|
1180
1180
|
}
|
|
1181
|
-
),
|
|
1182
|
-
(e,
|
|
1183
|
-
const
|
|
1184
|
-
return /* @__PURE__ */ f(
|
|
1181
|
+
), X = "DialogContent", er = c.forwardRef(
|
|
1182
|
+
(e, t) => {
|
|
1183
|
+
const r = Zt(X, e.__scopeDialog), { forceMount: o = r.forceMount, ...a } = e, n = I(X, e.__scopeDialog);
|
|
1184
|
+
return /* @__PURE__ */ f(V, { present: o || n.open, children: n.modal ? /* @__PURE__ */ f(lo, { ...a, ref: t }) : /* @__PURE__ */ f(uo, { ...a, ref: t }) });
|
|
1185
1185
|
}
|
|
1186
1186
|
);
|
|
1187
|
-
|
|
1188
|
-
var
|
|
1189
|
-
(e,
|
|
1190
|
-
const
|
|
1187
|
+
er.displayName = X;
|
|
1188
|
+
var lo = c.forwardRef(
|
|
1189
|
+
(e, t) => {
|
|
1190
|
+
const r = I(X, e.__scopeDialog), o = c.useRef(null), a = L(t, r.contentRef, o);
|
|
1191
1191
|
return c.useEffect(() => {
|
|
1192
1192
|
const n = o.current;
|
|
1193
|
-
if (n) return
|
|
1193
|
+
if (n) return oo(n);
|
|
1194
1194
|
}, []), /* @__PURE__ */ f(
|
|
1195
|
-
|
|
1195
|
+
tr,
|
|
1196
1196
|
{
|
|
1197
1197
|
...e,
|
|
1198
1198
|
ref: a,
|
|
1199
|
-
trapFocus:
|
|
1199
|
+
trapFocus: r.open,
|
|
1200
1200
|
disableOutsidePointerEvents: !0,
|
|
1201
1201
|
onCloseAutoFocus: A(e.onCloseAutoFocus, (n) => {
|
|
1202
1202
|
var s;
|
|
1203
|
-
n.preventDefault(), (s =
|
|
1203
|
+
n.preventDefault(), (s = r.triggerRef.current) == null || s.focus();
|
|
1204
1204
|
}),
|
|
1205
1205
|
onPointerDownOutside: A(e.onPointerDownOutside, (n) => {
|
|
1206
1206
|
const s = n.detail.originalEvent, i = s.button === 0 && s.ctrlKey === !0;
|
|
@@ -1213,35 +1213,35 @@ var co = c.forwardRef(
|
|
|
1213
1213
|
}
|
|
1214
1214
|
);
|
|
1215
1215
|
}
|
|
1216
|
-
),
|
|
1217
|
-
(e,
|
|
1218
|
-
const
|
|
1216
|
+
), uo = c.forwardRef(
|
|
1217
|
+
(e, t) => {
|
|
1218
|
+
const r = I(X, e.__scopeDialog), o = c.useRef(!1), a = c.useRef(!1);
|
|
1219
1219
|
return /* @__PURE__ */ f(
|
|
1220
|
-
|
|
1220
|
+
tr,
|
|
1221
1221
|
{
|
|
1222
1222
|
...e,
|
|
1223
|
-
ref:
|
|
1223
|
+
ref: t,
|
|
1224
1224
|
trapFocus: !1,
|
|
1225
1225
|
disableOutsidePointerEvents: !1,
|
|
1226
1226
|
onCloseAutoFocus: (n) => {
|
|
1227
1227
|
var s, i;
|
|
1228
|
-
(s = e.onCloseAutoFocus) == null || s.call(e, n), n.defaultPrevented || (o.current || (i =
|
|
1228
|
+
(s = e.onCloseAutoFocus) == null || s.call(e, n), n.defaultPrevented || (o.current || (i = r.triggerRef.current) == null || i.focus(), n.preventDefault()), o.current = !1, a.current = !1;
|
|
1229
1229
|
},
|
|
1230
1230
|
onInteractOutside: (n) => {
|
|
1231
1231
|
var u, l;
|
|
1232
1232
|
(u = e.onInteractOutside) == null || u.call(e, n), n.defaultPrevented || (o.current = !0, n.detail.originalEvent.type === "pointerdown" && (a.current = !0));
|
|
1233
1233
|
const s = n.target;
|
|
1234
|
-
((l =
|
|
1234
|
+
((l = r.triggerRef.current) == null ? void 0 : l.contains(s)) && n.preventDefault(), n.detail.originalEvent.type === "focusin" && a.current && n.preventDefault();
|
|
1235
1235
|
}
|
|
1236
1236
|
}
|
|
1237
1237
|
);
|
|
1238
1238
|
}
|
|
1239
|
-
),
|
|
1240
|
-
(e,
|
|
1241
|
-
const { __scopeDialog:
|
|
1242
|
-
return
|
|
1239
|
+
), tr = c.forwardRef(
|
|
1240
|
+
(e, t) => {
|
|
1241
|
+
const { __scopeDialog: r, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: n, ...s } = e, i = I(X, r), u = c.useRef(null), l = L(t, u);
|
|
1242
|
+
return _n(), /* @__PURE__ */ D(re, { children: [
|
|
1243
1243
|
/* @__PURE__ */ f(
|
|
1244
|
-
|
|
1244
|
+
Mt,
|
|
1245
1245
|
{
|
|
1246
1246
|
asChild: !0,
|
|
1247
1247
|
loop: !0,
|
|
@@ -1249,7 +1249,7 @@ var co = c.forwardRef(
|
|
|
1249
1249
|
onMountAutoFocus: a,
|
|
1250
1250
|
onUnmountAutoFocus: n,
|
|
1251
1251
|
children: /* @__PURE__ */ f(
|
|
1252
|
-
|
|
1252
|
+
Lt,
|
|
1253
1253
|
{
|
|
1254
1254
|
role: "dialog",
|
|
1255
1255
|
id: i.contentId,
|
|
@@ -1263,66 +1263,67 @@ var co = c.forwardRef(
|
|
|
1263
1263
|
)
|
|
1264
1264
|
}
|
|
1265
1265
|
),
|
|
1266
|
-
/* @__PURE__ */ D(
|
|
1267
|
-
/* @__PURE__ */ f(
|
|
1268
|
-
/* @__PURE__ */ f(
|
|
1266
|
+
/* @__PURE__ */ D(re, { children: [
|
|
1267
|
+
/* @__PURE__ */ f(fo, { titleId: i.titleId }),
|
|
1268
|
+
/* @__PURE__ */ f(vo, { contentRef: u, descriptionId: i.descriptionId })
|
|
1269
1269
|
] })
|
|
1270
1270
|
] });
|
|
1271
1271
|
}
|
|
1272
|
-
), ze = "DialogTitle",
|
|
1273
|
-
(e,
|
|
1274
|
-
const { __scopeDialog:
|
|
1275
|
-
return /* @__PURE__ */ f(T.h2, { id: a.titleId, ...o, ref:
|
|
1272
|
+
), ze = "DialogTitle", rr = c.forwardRef(
|
|
1273
|
+
(e, t) => {
|
|
1274
|
+
const { __scopeDialog: r, ...o } = e, a = I(ze, r);
|
|
1275
|
+
return /* @__PURE__ */ f(T.h2, { id: a.titleId, ...o, ref: t });
|
|
1276
1276
|
}
|
|
1277
1277
|
);
|
|
1278
|
-
|
|
1279
|
-
var
|
|
1280
|
-
(e,
|
|
1281
|
-
const { __scopeDialog:
|
|
1282
|
-
return /* @__PURE__ */ f(T.p, { id: a.descriptionId, ...o, ref:
|
|
1278
|
+
rr.displayName = ze;
|
|
1279
|
+
var nr = "DialogDescription", or = c.forwardRef(
|
|
1280
|
+
(e, t) => {
|
|
1281
|
+
const { __scopeDialog: r, ...o } = e, a = I(nr, r);
|
|
1282
|
+
return /* @__PURE__ */ f(T.p, { id: a.descriptionId, ...o, ref: t });
|
|
1283
1283
|
}
|
|
1284
1284
|
);
|
|
1285
|
-
|
|
1286
|
-
var
|
|
1287
|
-
(e,
|
|
1288
|
-
const { __scopeDialog:
|
|
1285
|
+
or.displayName = nr;
|
|
1286
|
+
var ar = "DialogClose", ir = c.forwardRef(
|
|
1287
|
+
(e, t) => {
|
|
1288
|
+
const { __scopeDialog: r, ...o } = e, a = I(ar, r);
|
|
1289
1289
|
return /* @__PURE__ */ f(
|
|
1290
1290
|
T.button,
|
|
1291
1291
|
{
|
|
1292
1292
|
type: "button",
|
|
1293
1293
|
...o,
|
|
1294
|
-
ref:
|
|
1294
|
+
ref: t,
|
|
1295
1295
|
onClick: A(e.onClick, () => a.onOpenChange(!1))
|
|
1296
1296
|
}
|
|
1297
1297
|
);
|
|
1298
1298
|
}
|
|
1299
1299
|
);
|
|
1300
|
-
|
|
1300
|
+
ir.displayName = ar;
|
|
1301
1301
|
function Ye(e) {
|
|
1302
1302
|
return e ? "open" : "closed";
|
|
1303
1303
|
}
|
|
1304
|
-
var
|
|
1305
|
-
contentName:
|
|
1304
|
+
var sr = "DialogTitleWarning", [ti, cr] = kr(sr, {
|
|
1305
|
+
contentName: X,
|
|
1306
1306
|
titleName: ze,
|
|
1307
1307
|
docsSlug: "dialog"
|
|
1308
|
-
}),
|
|
1309
|
-
const
|
|
1308
|
+
}), fo = ({ titleId: e }) => {
|
|
1309
|
+
const t = cr(sr), r = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
1310
1310
|
|
|
1311
|
-
If you want to hide the \`${
|
|
1311
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
1312
1312
|
|
|
1313
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${
|
|
1313
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;
|
|
1314
1314
|
return c.useEffect(() => {
|
|
1315
|
-
e && (document.getElementById(e) || console.error(
|
|
1316
|
-
}, [
|
|
1317
|
-
},
|
|
1318
|
-
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${
|
|
1315
|
+
e && (document.getElementById(e) || console.error(r));
|
|
1316
|
+
}, [r, e]), null;
|
|
1317
|
+
}, po = "DialogDescriptionWarning", vo = ({ contentRef: e, descriptionId: t }) => {
|
|
1318
|
+
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${cr(po).contentName}}.`;
|
|
1319
1319
|
return c.useEffect(() => {
|
|
1320
1320
|
var n;
|
|
1321
1321
|
const a = (n = e.current) == null ? void 0 : n.getAttribute("aria-describedby");
|
|
1322
|
-
|
|
1323
|
-
}, [o, e,
|
|
1324
|
-
}, ho =
|
|
1325
|
-
|
|
1322
|
+
t && a && (document.getElementById(t) || console.warn(o));
|
|
1323
|
+
}, [o, e, t]), null;
|
|
1324
|
+
}, ho = qt, mo = Kt, go = Qt, _o = Jt, bo = er, ve = rr, wo = or, yo = ir;
|
|
1325
|
+
const lr = Or(null);
|
|
1326
|
+
function So(e) {
|
|
1326
1327
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1327
1328
|
}
|
|
1328
1329
|
var $e = { exports: {} };
|
|
@@ -1331,12 +1332,12 @@ var $e = { exports: {} };
|
|
|
1331
1332
|
Licensed under the MIT License (MIT), see
|
|
1332
1333
|
http://jedwatson.github.io/classnames
|
|
1333
1334
|
*/
|
|
1334
|
-
var
|
|
1335
|
-
function
|
|
1336
|
-
return
|
|
1335
|
+
var vt;
|
|
1336
|
+
function Eo() {
|
|
1337
|
+
return vt || (vt = 1, (function(e) {
|
|
1337
1338
|
(function() {
|
|
1338
|
-
var
|
|
1339
|
-
function
|
|
1339
|
+
var t = {}.hasOwnProperty;
|
|
1340
|
+
function r() {
|
|
1340
1341
|
for (var n = "", s = 0; s < arguments.length; s++) {
|
|
1341
1342
|
var i = arguments[s];
|
|
1342
1343
|
i && (n = a(n, o.call(this, i)));
|
|
@@ -1349,52 +1350,54 @@ function So() {
|
|
|
1349
1350
|
if (typeof n != "object")
|
|
1350
1351
|
return "";
|
|
1351
1352
|
if (Array.isArray(n))
|
|
1352
|
-
return
|
|
1353
|
+
return r.apply(this, n);
|
|
1353
1354
|
if (n.toString !== Object.prototype.toString && !n.toString.toString().includes("[native code]"))
|
|
1354
1355
|
return n.toString();
|
|
1355
1356
|
var s = "";
|
|
1356
1357
|
for (var i in n)
|
|
1357
|
-
|
|
1358
|
+
t.call(n, i) && n[i] && (s = a(s, this && this[i] || i));
|
|
1358
1359
|
return s;
|
|
1359
1360
|
}
|
|
1360
1361
|
function a(n, s) {
|
|
1361
1362
|
return s ? n ? n + " " + s : n + s : n;
|
|
1362
1363
|
}
|
|
1363
|
-
e.exports ? (
|
|
1364
|
+
e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
|
|
1364
1365
|
})();
|
|
1365
1366
|
})($e)), $e.exports;
|
|
1366
1367
|
}
|
|
1367
|
-
var
|
|
1368
|
-
const
|
|
1369
|
-
"purpur-drawer-content": "_purpur-drawer-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
"purpur-drawer-content--
|
|
1373
|
-
"purpur-drawer-content--
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
"purpur-drawer-
|
|
1380
|
-
"purpur-drawer-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
"purpur-drawer-container--
|
|
1386
|
-
"purpur-drawer-container--
|
|
1387
|
-
|
|
1368
|
+
var Co = Eo();
|
|
1369
|
+
const ae = /* @__PURE__ */ So(Co), Po = "_slideUp_71yig_1", xo = "_slideDown_71yig_1", Ro = "_slideInRight_71yig_1", No = "_slideInLeft_71yig_1", Ao = "_slideOutRight_71yig_1", Do = "_slideOutLeft_71yig_1", To = "_fadeIn_71yig_1", Oo = "_fadeOut_71yig_1", Lo = {
|
|
1370
|
+
"purpur-drawer-content": "_purpur-drawer-content_71yig_1",
|
|
1371
|
+
slideUp: Po,
|
|
1372
|
+
slideDown: xo,
|
|
1373
|
+
"purpur-drawer-content--left": "_purpur-drawer-content--left_71yig_21",
|
|
1374
|
+
"purpur-drawer-content--right": "_purpur-drawer-content--right_71yig_24",
|
|
1375
|
+
"purpur-drawer-content--fit-to-content": "_purpur-drawer-content--fit-to-content_71yig_27",
|
|
1376
|
+
slideInRight: Ro,
|
|
1377
|
+
slideInLeft: No,
|
|
1378
|
+
slideOutRight: Ao,
|
|
1379
|
+
slideOutLeft: Do,
|
|
1380
|
+
"purpur-drawer-content__content-container": "_purpur-drawer-content__content-container_71yig_63",
|
|
1381
|
+
"purpur-drawer-content__description": "_purpur-drawer-content__description_71yig_68",
|
|
1382
|
+
"purpur-drawer-overlay": "_purpur-drawer-overlay_71yig_79",
|
|
1383
|
+
fadeIn: To,
|
|
1384
|
+
fadeOut: Oo
|
|
1385
|
+
}, $o = {
|
|
1386
|
+
"purpur-drawer-container--header": "_purpur-drawer-container--header_1bcla_1",
|
|
1387
|
+
"purpur-drawer-container--body": "_purpur-drawer-container--body_1bcla_4",
|
|
1388
|
+
"purpur-drawer-container--sticky": "_purpur-drawer-container--sticky_1bcla_12",
|
|
1389
|
+
"purpur-drawer-container--footer": "_purpur-drawer-container--footer_1bcla_20"
|
|
1390
|
+
}, Mo = ae.bind($o), Me = "purpur-drawer-container", ee = H(
|
|
1388
1391
|
({
|
|
1389
1392
|
["data-testid"]: e = "purpur-drawer-container",
|
|
1390
|
-
children:
|
|
1391
|
-
className:
|
|
1393
|
+
children: t,
|
|
1394
|
+
className: r,
|
|
1392
1395
|
variant: o = "body",
|
|
1393
1396
|
stickyFooter: a,
|
|
1394
1397
|
...n
|
|
1395
1398
|
}, s) => {
|
|
1396
|
-
const i =
|
|
1397
|
-
|
|
1399
|
+
const i = Mo([
|
|
1400
|
+
r,
|
|
1398
1401
|
Me,
|
|
1399
1402
|
{
|
|
1400
1403
|
[`${Me}--${o}`]: o
|
|
@@ -1403,56 +1406,58 @@ const X = /* @__PURE__ */ yo(Eo), ct = Dt(null), Co = {}, Po = "_drawerSmallScre
|
|
|
1403
1406
|
[`${Me}--sticky`]: a
|
|
1404
1407
|
}
|
|
1405
1408
|
]);
|
|
1406
|
-
return /* @__PURE__ */ f("div", { className: i, "data-testid": e, ref: s, ...n, children:
|
|
1409
|
+
return /* @__PURE__ */ f("div", { className: i, "data-testid": e, ref: s, ...n, children: t });
|
|
1407
1410
|
}
|
|
1408
1411
|
);
|
|
1409
1412
|
ee.displayName = "DrawerContainer";
|
|
1410
|
-
const
|
|
1411
|
-
"purpur-drawer-frame": "_purpur-drawer-
|
|
1412
|
-
"purpur-drawer-frame--
|
|
1413
|
-
"purpur-drawer-
|
|
1414
|
-
"purpur-drawer-frame--
|
|
1415
|
-
"purpur-drawer-
|
|
1416
|
-
"purpur-drawer-
|
|
1417
|
-
"purpur-drawer-frame--
|
|
1418
|
-
"purpur-drawer-
|
|
1419
|
-
"purpur-drawer-
|
|
1420
|
-
"purpur-drawer-
|
|
1421
|
-
|
|
1413
|
+
const Io = {
|
|
1414
|
+
"purpur-drawer-frame": "_purpur-drawer-frame_1didd_1",
|
|
1415
|
+
"purpur-drawer-frame--without-back-button": "_purpur-drawer-frame--without-back-button_1didd_11",
|
|
1416
|
+
"purpur-drawer-frame__header": "_purpur-drawer-frame__header_1didd_11",
|
|
1417
|
+
"purpur-drawer-frame--with-back-button": "_purpur-drawer-frame--with-back-button_1didd_14",
|
|
1418
|
+
"purpur-drawer-frame--left": "_purpur-drawer-frame--left_1didd_18",
|
|
1419
|
+
"purpur-drawer-frame--right": "_purpur-drawer-frame--right_1didd_22",
|
|
1420
|
+
"purpur-drawer-frame--sticky-footer": "_purpur-drawer-frame--sticky-footer_1didd_33",
|
|
1421
|
+
"purpur-drawer-frame__body": "_purpur-drawer-frame__body_1didd_39",
|
|
1422
|
+
"purpur-drawer-frame--fit-to-content": "_purpur-drawer-frame--fit-to-content_1didd_43",
|
|
1423
|
+
"purpur-drawer-frame__footer": "_purpur-drawer-frame__footer_1didd_52",
|
|
1424
|
+
"purpur-drawer-frame__content-container": "_purpur-drawer-frame__content-container_1didd_55",
|
|
1425
|
+
"purpur-drawer-frame__content-container--no-footer": "_purpur-drawer-frame__content-container--no-footer_1didd_60"
|
|
1426
|
+
}, ko = {
|
|
1422
1427
|
"purpur-drawer-handle": "_purpur-drawer-handle_3n0ew_1"
|
|
1423
|
-
},
|
|
1428
|
+
}, Wo = (e, t, r, o, a, n) => ({
|
|
1424
1429
|
onPointerDown: (l) => {
|
|
1425
1430
|
e.current = { y: l.clientY };
|
|
1426
1431
|
},
|
|
1427
1432
|
onPointerMove: (l) => {
|
|
1428
1433
|
if (!e.current)
|
|
1429
1434
|
return;
|
|
1430
|
-
const d = l.clientY - e.current.y, p = !!
|
|
1431
|
-
p ? (
|
|
1435
|
+
const d = l.clientY - e.current.y, p = !!t.current, v = Math.max(0, d), m = l.pointerType === "touch" ? 10 : 2, _ = { y: v }, h = { originalEvent: l, delta: _ };
|
|
1436
|
+
p ? (t.current = _, o(h)) : ht(_, 0) ? (t.current = _, r(), l.target.setPointerCapture(l.pointerId)) : Math.abs(d) > m && (e.current = null);
|
|
1432
1437
|
},
|
|
1433
1438
|
onPointerUp: (l) => {
|
|
1434
|
-
const d =
|
|
1435
|
-
if (p.hasPointerCapture(l.pointerId) && p.releasePointerCapture(l.pointerId),
|
|
1436
|
-
const
|
|
1437
|
-
|
|
1439
|
+
const d = t.current, p = l.target;
|
|
1440
|
+
if (p.hasPointerCapture(l.pointerId) && p.releasePointerCapture(l.pointerId), t.current = null, e.current = null, d) {
|
|
1441
|
+
const v = l.currentTarget, m = { originalEvent: l, delta: d };
|
|
1442
|
+
ht(d, 0) && d.y > 200 ? n(m) : a(), v.addEventListener("click", (_) => _.preventDefault(), {
|
|
1438
1443
|
once: !0
|
|
1439
1444
|
});
|
|
1440
1445
|
}
|
|
1441
1446
|
}
|
|
1442
|
-
}),
|
|
1447
|
+
}), ht = (e, t = 0) => Math.abs(e.y) > t, jo = ae.bind(ko), Fo = "purpur-drawer-handle", ur = H(
|
|
1443
1448
|
({
|
|
1444
1449
|
["data-testid"]: e = "purpur-drawer-handle",
|
|
1445
|
-
className:
|
|
1446
|
-
onSwipeStart:
|
|
1450
|
+
className: t,
|
|
1451
|
+
onSwipeStart: r,
|
|
1447
1452
|
onSwipeMove: o,
|
|
1448
1453
|
onSwipeCancel: a,
|
|
1449
1454
|
onSwipeEnd: n,
|
|
1450
1455
|
...s
|
|
1451
1456
|
}, i) => {
|
|
1452
|
-
const u =
|
|
1457
|
+
const u = jo([t, Fo]), l = ke.useRef(null), d = ke.useRef(null), { onPointerDown: p, onPointerMove: v, onPointerUp: m } = Wo(
|
|
1453
1458
|
d,
|
|
1454
1459
|
l,
|
|
1455
|
-
|
|
1460
|
+
r,
|
|
1456
1461
|
o,
|
|
1457
1462
|
a,
|
|
1458
1463
|
n
|
|
@@ -1463,7 +1468,7 @@ const Lo = {
|
|
|
1463
1468
|
className: u,
|
|
1464
1469
|
"data-testid": e,
|
|
1465
1470
|
onPointerDown: p,
|
|
1466
|
-
onPointerMove:
|
|
1471
|
+
onPointerMove: v,
|
|
1467
1472
|
onPointerUp: m,
|
|
1468
1473
|
ref: i,
|
|
1469
1474
|
...s
|
|
@@ -1471,25 +1476,25 @@ const Lo = {
|
|
|
1471
1476
|
);
|
|
1472
1477
|
}
|
|
1473
1478
|
);
|
|
1474
|
-
|
|
1475
|
-
const
|
|
1479
|
+
ur.displayName = "DrawerHandle";
|
|
1480
|
+
const Uo = {
|
|
1476
1481
|
LG: "lg"
|
|
1477
1482
|
};
|
|
1478
|
-
function
|
|
1483
|
+
function Bo(e) {
|
|
1479
1484
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1480
1485
|
}
|
|
1481
|
-
var
|
|
1486
|
+
var mt = { exports: {} };
|
|
1482
1487
|
/*!
|
|
1483
1488
|
Copyright (c) 2018 Jed Watson.
|
|
1484
1489
|
Licensed under the MIT License (MIT), see
|
|
1485
1490
|
http://jedwatson.github.io/classnames
|
|
1486
1491
|
*/
|
|
1487
|
-
var
|
|
1488
|
-
function
|
|
1489
|
-
return
|
|
1492
|
+
var gt;
|
|
1493
|
+
function Ho() {
|
|
1494
|
+
return gt || (gt = 1, (function(e) {
|
|
1490
1495
|
(function() {
|
|
1491
|
-
var
|
|
1492
|
-
function
|
|
1496
|
+
var t = {}.hasOwnProperty;
|
|
1497
|
+
function r() {
|
|
1493
1498
|
for (var n = "", s = 0; s < arguments.length; s++) {
|
|
1494
1499
|
var i = arguments[s];
|
|
1495
1500
|
i && (n = a(n, o.call(this, i)));
|
|
@@ -1502,68 +1507,68 @@ function Uo() {
|
|
|
1502
1507
|
if (typeof n != "object")
|
|
1503
1508
|
return "";
|
|
1504
1509
|
if (Array.isArray(n))
|
|
1505
|
-
return
|
|
1510
|
+
return r.apply(this, n);
|
|
1506
1511
|
if (n.toString !== Object.prototype.toString && !n.toString.toString().includes("[native code]"))
|
|
1507
1512
|
return n.toString();
|
|
1508
1513
|
var s = "";
|
|
1509
1514
|
for (var i in n)
|
|
1510
|
-
|
|
1515
|
+
t.call(n, i) && n[i] && (s = a(s, this && this[i] || i));
|
|
1511
1516
|
return s;
|
|
1512
1517
|
}
|
|
1513
1518
|
function a(n, s) {
|
|
1514
1519
|
return s ? n ? n + " " + s : n + s : n;
|
|
1515
1520
|
}
|
|
1516
|
-
e.exports ? (
|
|
1521
|
+
e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
|
|
1517
1522
|
})();
|
|
1518
|
-
})(
|
|
1523
|
+
})(mt)), mt.exports;
|
|
1519
1524
|
}
|
|
1520
|
-
var
|
|
1521
|
-
const
|
|
1525
|
+
var Vo = Ho();
|
|
1526
|
+
const zo = /* @__PURE__ */ Bo(Vo), Yo = "_rotate_12t9p_1", Xo = "_dash_12t9p_1", qo = {
|
|
1522
1527
|
"purpur-spinner": "_purpur-spinner_12t9p_2",
|
|
1523
|
-
rotate:
|
|
1528
|
+
rotate: Yo,
|
|
1524
1529
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
|
|
1525
1530
|
"purpur-spinner--xs": "_purpur-spinner--xs_12t9p_10",
|
|
1526
1531
|
"purpur-spinner--sm": "_purpur-spinner--sm_12t9p_14",
|
|
1527
1532
|
"purpur-spinner--md": "_purpur-spinner--md_12t9p_18",
|
|
1528
1533
|
"purpur-spinner--lg": "_purpur-spinner--lg_12t9p_22",
|
|
1529
1534
|
"purpur-spinner__circle": "_purpur-spinner__circle_12t9p_26",
|
|
1530
|
-
dash:
|
|
1535
|
+
dash: Xo,
|
|
1531
1536
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
|
|
1532
1537
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
|
|
1533
|
-
},
|
|
1538
|
+
}, _t = zo.bind(qo), ie = "purpur-spinner", Go = {
|
|
1534
1539
|
SM: "sm"
|
|
1535
|
-
},
|
|
1540
|
+
}, Ko = ({
|
|
1536
1541
|
disabled: e = !1,
|
|
1537
|
-
negative:
|
|
1538
|
-
size:
|
|
1542
|
+
negative: t = !1,
|
|
1543
|
+
size: r = Go.SM,
|
|
1539
1544
|
...o
|
|
1540
|
-
}) => /* @__PURE__ */ f("div", { className:
|
|
1545
|
+
}) => /* @__PURE__ */ f("div", { className: _t(ie, `${ie}--${r}`), ...o, children: /* @__PURE__ */ f("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ f(
|
|
1541
1546
|
"circle",
|
|
1542
1547
|
{
|
|
1543
|
-
className:
|
|
1544
|
-
[`${
|
|
1545
|
-
[`${
|
|
1548
|
+
className: _t(`${ie}__circle`, {
|
|
1549
|
+
[`${ie}__circle--disabled`]: e,
|
|
1550
|
+
[`${ie}__circle--negative`]: t
|
|
1546
1551
|
}),
|
|
1547
1552
|
cx: "25",
|
|
1548
1553
|
cy: "25",
|
|
1549
1554
|
r: "20"
|
|
1550
1555
|
}
|
|
1551
1556
|
) }) });
|
|
1552
|
-
function
|
|
1557
|
+
function Zo(e) {
|
|
1553
1558
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1554
1559
|
}
|
|
1555
|
-
var
|
|
1560
|
+
var bt = { exports: {} };
|
|
1556
1561
|
/*!
|
|
1557
1562
|
Copyright (c) 2018 Jed Watson.
|
|
1558
1563
|
Licensed under the MIT License (MIT), see
|
|
1559
1564
|
http://jedwatson.github.io/classnames
|
|
1560
1565
|
*/
|
|
1561
|
-
var
|
|
1562
|
-
function
|
|
1563
|
-
return
|
|
1566
|
+
var wt;
|
|
1567
|
+
function Qo() {
|
|
1568
|
+
return wt || (wt = 1, (function(e) {
|
|
1564
1569
|
(function() {
|
|
1565
|
-
var
|
|
1566
|
-
function
|
|
1570
|
+
var t = {}.hasOwnProperty;
|
|
1571
|
+
function r() {
|
|
1567
1572
|
for (var n = "", s = 0; s < arguments.length; s++) {
|
|
1568
1573
|
var i = arguments[s];
|
|
1569
1574
|
i && (n = a(n, o.call(this, i)));
|
|
@@ -1576,52 +1581,52 @@ function Go() {
|
|
|
1576
1581
|
if (typeof n != "object")
|
|
1577
1582
|
return "";
|
|
1578
1583
|
if (Array.isArray(n))
|
|
1579
|
-
return
|
|
1584
|
+
return r.apply(this, n);
|
|
1580
1585
|
if (n.toString !== Object.prototype.toString && !n.toString.toString().includes("[native code]"))
|
|
1581
1586
|
return n.toString();
|
|
1582
1587
|
var s = "";
|
|
1583
1588
|
for (var i in n)
|
|
1584
|
-
|
|
1589
|
+
t.call(n, i) && n[i] && (s = a(s, this && this[i] || i));
|
|
1585
1590
|
return s;
|
|
1586
1591
|
}
|
|
1587
1592
|
function a(n, s) {
|
|
1588
1593
|
return s ? n ? n + " " + s : n + s : n;
|
|
1589
1594
|
}
|
|
1590
|
-
e.exports ? (
|
|
1595
|
+
e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
|
|
1591
1596
|
})();
|
|
1592
|
-
})(
|
|
1593
|
-
}
|
|
1594
|
-
var
|
|
1595
|
-
const
|
|
1596
|
-
"purpur-button": "_purpur-
|
|
1597
|
-
"purpur-button--xs": "_purpur-button--
|
|
1598
|
-
"purpur-button--icon-only": "_purpur-button--icon-
|
|
1599
|
-
"purpur-button--sm": "_purpur-button--
|
|
1600
|
-
"purpur-button--md": "_purpur-button--
|
|
1601
|
-
"purpur-button--lg": "_purpur-button--
|
|
1602
|
-
"purpur-button--full-width": "_purpur-button--full-
|
|
1603
|
-
"purpur-button--primary": "_purpur-button--
|
|
1604
|
-
"purpur-button--disabled": "_purpur-button--
|
|
1605
|
-
"purpur-button--primary-negative": "_purpur-button--primary-
|
|
1606
|
-
"purpur-button--secondary": "_purpur-button--
|
|
1607
|
-
"purpur-button--secondary-negative": "_purpur-button--secondary-
|
|
1608
|
-
"purpur-button--expressive": "_purpur-button--
|
|
1609
|
-
"purpur-button--expressive-negative": "_purpur-button--expressive-
|
|
1610
|
-
"purpur-button--negative": "_purpur-button--
|
|
1611
|
-
"purpur-button--destructive": "_purpur-button--
|
|
1612
|
-
"purpur-button--destructive-negative": "_purpur-button--destructive-
|
|
1613
|
-
"purpur-button--tertiary-purple": "_purpur-button--tertiary-
|
|
1614
|
-
"purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-
|
|
1615
|
-
"purpur-button--text-negative": "_purpur-button--text-
|
|
1616
|
-
"purpur-button--text": "_purpur-button--
|
|
1597
|
+
})(bt)), bt.exports;
|
|
1598
|
+
}
|
|
1599
|
+
var Jo = Qo();
|
|
1600
|
+
const ea = /* @__PURE__ */ Zo(Jo), ta = {
|
|
1601
|
+
"purpur-button": "_purpur-button_cjx7j_1",
|
|
1602
|
+
"purpur-button--xs": "_purpur-button--xs_cjx7j_22",
|
|
1603
|
+
"purpur-button--icon-only": "_purpur-button--icon-only_cjx7j_25",
|
|
1604
|
+
"purpur-button--sm": "_purpur-button--sm_cjx7j_28",
|
|
1605
|
+
"purpur-button--md": "_purpur-button--md_cjx7j_34",
|
|
1606
|
+
"purpur-button--lg": "_purpur-button--lg_cjx7j_40",
|
|
1607
|
+
"purpur-button--full-width": "_purpur-button--full-width_cjx7j_46",
|
|
1608
|
+
"purpur-button--primary": "_purpur-button--primary_cjx7j_64",
|
|
1609
|
+
"purpur-button--disabled": "_purpur-button--disabled_cjx7j_68",
|
|
1610
|
+
"purpur-button--primary-negative": "_purpur-button--primary-negative_cjx7j_74",
|
|
1611
|
+
"purpur-button--secondary": "_purpur-button--secondary_cjx7j_86",
|
|
1612
|
+
"purpur-button--secondary-negative": "_purpur-button--secondary-negative_cjx7j_97",
|
|
1613
|
+
"purpur-button--expressive": "_purpur-button--expressive_cjx7j_108",
|
|
1614
|
+
"purpur-button--expressive-negative": "_purpur-button--expressive-negative_cjx7j_118",
|
|
1615
|
+
"purpur-button--negative": "_purpur-button--negative_cjx7j_130",
|
|
1616
|
+
"purpur-button--destructive": "_purpur-button--destructive_cjx7j_137",
|
|
1617
|
+
"purpur-button--destructive-negative": "_purpur-button--destructive-negative_cjx7j_147",
|
|
1618
|
+
"purpur-button--tertiary-purple": "_purpur-button--tertiary-purple_cjx7j_157",
|
|
1619
|
+
"purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_cjx7j_170",
|
|
1620
|
+
"purpur-button--text-negative": "_purpur-button--text-negative_cjx7j_185",
|
|
1621
|
+
"purpur-button--text": "_purpur-button--text_cjx7j_185"
|
|
1617
1622
|
}, Ie = {
|
|
1618
1623
|
TERTIARY_PURPLE: "tertiary-purple",
|
|
1619
1624
|
TEXT: "text"
|
|
1620
|
-
},
|
|
1625
|
+
}, ra = ea.bind(ta), z = "purpur-button", Fe = H(
|
|
1621
1626
|
({
|
|
1622
1627
|
children: e,
|
|
1623
|
-
className:
|
|
1624
|
-
disabled:
|
|
1628
|
+
className: t,
|
|
1629
|
+
disabled: r = !1,
|
|
1625
1630
|
fullWidth: o = !1,
|
|
1626
1631
|
iconOnly: a,
|
|
1627
1632
|
loading: n = !1,
|
|
@@ -1631,41 +1636,41 @@ const Zo = /* @__PURE__ */ qo(Ko), Qo = {
|
|
|
1631
1636
|
variant: l,
|
|
1632
1637
|
type: d = "button",
|
|
1633
1638
|
...p
|
|
1634
|
-
},
|
|
1639
|
+
}, v) => {
|
|
1635
1640
|
if (a && l === "destructive")
|
|
1636
1641
|
return null;
|
|
1637
|
-
const m =
|
|
1642
|
+
const m = ra(
|
|
1638
1643
|
[
|
|
1639
|
-
|
|
1640
|
-
`${
|
|
1641
|
-
`${
|
|
1644
|
+
z,
|
|
1645
|
+
`${z}--${s ? `${l}-negative` : l}`,
|
|
1646
|
+
`${z}--${u}`
|
|
1642
1647
|
],
|
|
1643
1648
|
{
|
|
1644
|
-
[`${
|
|
1645
|
-
[`${
|
|
1646
|
-
[`${
|
|
1647
|
-
[`${
|
|
1649
|
+
[`${z}--icon-only`]: a,
|
|
1650
|
+
[`${z}--negative`]: s,
|
|
1651
|
+
[`${z}--full-width`]: o,
|
|
1652
|
+
[`${z}--disabled`]: r || n
|
|
1648
1653
|
},
|
|
1649
|
-
|
|
1650
|
-
),
|
|
1651
|
-
|
|
1652
|
-
},
|
|
1654
|
+
t
|
|
1655
|
+
), _ = (g) => {
|
|
1656
|
+
r || n ? g.preventDefault() : i && i(g);
|
|
1657
|
+
}, h = !!p["aria-disabled"] || r || n;
|
|
1653
1658
|
return /* @__PURE__ */ D(
|
|
1654
1659
|
"button",
|
|
1655
1660
|
{
|
|
1656
1661
|
className: m,
|
|
1657
1662
|
type: d,
|
|
1658
|
-
ref:
|
|
1659
|
-
"aria-disabled":
|
|
1660
|
-
onClick:
|
|
1663
|
+
ref: v,
|
|
1664
|
+
"aria-disabled": h,
|
|
1665
|
+
onClick: _,
|
|
1661
1666
|
...p,
|
|
1662
1667
|
children: [
|
|
1663
1668
|
n && /* @__PURE__ */ f(
|
|
1664
|
-
|
|
1669
|
+
Ko,
|
|
1665
1670
|
{
|
|
1666
|
-
size: u ===
|
|
1671
|
+
size: u === Uo.LG ? "xs" : "xxs",
|
|
1667
1672
|
negative: s,
|
|
1668
|
-
disabled:
|
|
1673
|
+
disabled: h
|
|
1669
1674
|
}
|
|
1670
1675
|
),
|
|
1671
1676
|
" ",
|
|
@@ -1675,22 +1680,22 @@ const Zo = /* @__PURE__ */ qo(Ko), Qo = {
|
|
|
1675
1680
|
);
|
|
1676
1681
|
}
|
|
1677
1682
|
);
|
|
1678
|
-
|
|
1679
|
-
function
|
|
1683
|
+
Fe.displayName = "Button";
|
|
1684
|
+
function na(e) {
|
|
1680
1685
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1681
1686
|
}
|
|
1682
|
-
var
|
|
1687
|
+
var yt = { exports: {} };
|
|
1683
1688
|
/*!
|
|
1684
1689
|
Copyright (c) 2018 Jed Watson.
|
|
1685
1690
|
Licensed under the MIT License (MIT), see
|
|
1686
1691
|
http://jedwatson.github.io/classnames
|
|
1687
1692
|
*/
|
|
1688
|
-
var
|
|
1689
|
-
function
|
|
1690
|
-
return
|
|
1693
|
+
var St;
|
|
1694
|
+
function oa() {
|
|
1695
|
+
return St || (St = 1, (function(e) {
|
|
1691
1696
|
(function() {
|
|
1692
|
-
var
|
|
1693
|
-
function
|
|
1697
|
+
var t = {}.hasOwnProperty;
|
|
1698
|
+
function r() {
|
|
1694
1699
|
for (var n = "", s = 0; s < arguments.length; s++) {
|
|
1695
1700
|
var i = arguments[s];
|
|
1696
1701
|
i && (n = a(n, o(i)));
|
|
@@ -1703,23 +1708,23 @@ function ra() {
|
|
|
1703
1708
|
if (typeof n != "object")
|
|
1704
1709
|
return "";
|
|
1705
1710
|
if (Array.isArray(n))
|
|
1706
|
-
return
|
|
1711
|
+
return r.apply(null, n);
|
|
1707
1712
|
if (n.toString !== Object.prototype.toString && !n.toString.toString().includes("[native code]"))
|
|
1708
1713
|
return n.toString();
|
|
1709
1714
|
var s = "";
|
|
1710
1715
|
for (var i in n)
|
|
1711
|
-
|
|
1716
|
+
t.call(n, i) && n[i] && (s = a(s, i));
|
|
1712
1717
|
return s;
|
|
1713
1718
|
}
|
|
1714
1719
|
function a(n, s) {
|
|
1715
1720
|
return s ? n ? n + " " + s : n + s : n;
|
|
1716
1721
|
}
|
|
1717
|
-
e.exports ? (
|
|
1722
|
+
e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
|
|
1718
1723
|
})();
|
|
1719
|
-
})(
|
|
1724
|
+
})(yt)), yt.exports;
|
|
1720
1725
|
}
|
|
1721
|
-
var
|
|
1722
|
-
const
|
|
1726
|
+
var aa = oa();
|
|
1727
|
+
const ia = /* @__PURE__ */ na(aa), he = {
|
|
1723
1728
|
"purpur-heading": "_purpur-heading_vo751_1",
|
|
1724
1729
|
"purpur-heading--hyphens": "_purpur-heading--hyphens_vo751_8",
|
|
1725
1730
|
"purpur-heading--negative": "_purpur-heading--negative_vo751_11",
|
|
@@ -1739,45 +1744,45 @@ const na = /* @__PURE__ */ ea(ta), ve = {
|
|
|
1739
1744
|
"purpur-heading--display-50": "_purpur-heading--display-50_vo751_92",
|
|
1740
1745
|
"purpur-heading--display-100": "_purpur-heading--display-100_vo751_98",
|
|
1741
1746
|
"purpur-heading--display-200": "_purpur-heading--display-200_vo751_104"
|
|
1742
|
-
},
|
|
1747
|
+
}, Ue = {
|
|
1743
1748
|
TITLE100: "title-100",
|
|
1744
1749
|
TITLE200: "title-200"
|
|
1745
1750
|
}, me = "purpur-heading", Be = ({
|
|
1746
1751
|
children: e,
|
|
1747
|
-
className:
|
|
1748
|
-
enableHyphenation:
|
|
1752
|
+
className: t = "",
|
|
1753
|
+
enableHyphenation: r = !1,
|
|
1749
1754
|
negative: o = !1,
|
|
1750
1755
|
tag: a,
|
|
1751
|
-
variant: n =
|
|
1756
|
+
variant: n = Ue.TITLE100,
|
|
1752
1757
|
...s
|
|
1753
1758
|
}) => {
|
|
1754
|
-
const i = a, u =
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1759
|
+
const i = a, u = ia([
|
|
1760
|
+
t,
|
|
1761
|
+
he[me],
|
|
1762
|
+
he[`${me}--${n}`],
|
|
1758
1763
|
{
|
|
1759
|
-
[
|
|
1760
|
-
[
|
|
1764
|
+
[he[`${me}--hyphens`]]: r,
|
|
1765
|
+
[he[`${me}--negative`]]: o
|
|
1761
1766
|
}
|
|
1762
1767
|
]);
|
|
1763
1768
|
return /* @__PURE__ */ f(i, { className: u, ...s, children: e });
|
|
1764
1769
|
};
|
|
1765
1770
|
Be.displayName = "Heading";
|
|
1766
|
-
function
|
|
1771
|
+
function sa(e) {
|
|
1767
1772
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1768
1773
|
}
|
|
1769
|
-
var
|
|
1774
|
+
var Et = { exports: {} };
|
|
1770
1775
|
/*!
|
|
1771
1776
|
Copyright (c) 2018 Jed Watson.
|
|
1772
1777
|
Licensed under the MIT License (MIT), see
|
|
1773
1778
|
http://jedwatson.github.io/classnames
|
|
1774
1779
|
*/
|
|
1775
|
-
var
|
|
1776
|
-
function
|
|
1777
|
-
return
|
|
1780
|
+
var Ct;
|
|
1781
|
+
function ca() {
|
|
1782
|
+
return Ct || (Ct = 1, (function(e) {
|
|
1778
1783
|
(function() {
|
|
1779
|
-
var
|
|
1780
|
-
function
|
|
1784
|
+
var t = {}.hasOwnProperty;
|
|
1785
|
+
function r() {
|
|
1781
1786
|
for (var n = "", s = 0; s < arguments.length; s++) {
|
|
1782
1787
|
var i = arguments[s];
|
|
1783
1788
|
i && (n = a(n, o.call(this, i)));
|
|
@@ -1790,23 +1795,23 @@ function aa() {
|
|
|
1790
1795
|
if (typeof n != "object")
|
|
1791
1796
|
return "";
|
|
1792
1797
|
if (Array.isArray(n))
|
|
1793
|
-
return
|
|
1798
|
+
return r.apply(this, n);
|
|
1794
1799
|
if (n.toString !== Object.prototype.toString && !n.toString.toString().includes("[native code]"))
|
|
1795
1800
|
return n.toString();
|
|
1796
1801
|
var s = "";
|
|
1797
1802
|
for (var i in n)
|
|
1798
|
-
|
|
1803
|
+
t.call(n, i) && n[i] && (s = a(s, this && this[i] || i));
|
|
1799
1804
|
return s;
|
|
1800
1805
|
}
|
|
1801
1806
|
function a(n, s) {
|
|
1802
1807
|
return s ? n ? n + " " + s : n + s : n;
|
|
1803
1808
|
}
|
|
1804
|
-
e.exports ? (
|
|
1809
|
+
e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
|
|
1805
1810
|
})();
|
|
1806
|
-
})(
|
|
1811
|
+
})(Et)), Et.exports;
|
|
1807
1812
|
}
|
|
1808
|
-
var
|
|
1809
|
-
const
|
|
1813
|
+
var la = ca();
|
|
1814
|
+
const ua = /* @__PURE__ */ sa(la), da = {
|
|
1810
1815
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
1811
1816
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
1812
1817
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -1814,101 +1819,101 @@ const sa = /* @__PURE__ */ oa(ia), ca = {
|
|
|
1814
1819
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
1815
1820
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
1816
1821
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
1817
|
-
},
|
|
1818
|
-
const
|
|
1822
|
+
}, fa = ua.bind(da), Pt = "purpur-icon", pa = "md", va = (e) => e.filter((t) => Object.keys(t).length >= 1).map((t) => `${t.name}="${t.value}"`).join(" "), ha = ({ content: e = "", title: t } = {}) => {
|
|
1823
|
+
const r = [
|
|
1819
1824
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
1820
1825
|
{ name: "fill", value: "currentColor" },
|
|
1821
1826
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
1822
|
-
|
|
1823
|
-
], o =
|
|
1824
|
-
return `<svg ${
|
|
1825
|
-
},
|
|
1826
|
-
const n =
|
|
1827
|
-
content:
|
|
1828
|
-
title:
|
|
1829
|
-
}), s =
|
|
1827
|
+
t ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
1828
|
+
], o = t ? `<title>${t}</title>` : "";
|
|
1829
|
+
return `<svg ${va(r)}>${o}${e}</svg>`;
|
|
1830
|
+
}, ma = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Xe = ({ svg: e, allyTitle: t, className: r, size: o = pa, ...a }) => {
|
|
1831
|
+
const n = ha({
|
|
1832
|
+
content: ma(e.svg),
|
|
1833
|
+
title: t
|
|
1834
|
+
}), s = fa(r, Pt, `${Pt}--${o}`);
|
|
1830
1835
|
return /* @__PURE__ */ f("span", { className: s, dangerouslySetInnerHTML: { __html: n }, ...a });
|
|
1831
1836
|
};
|
|
1832
1837
|
Xe.displayName = "Icon";
|
|
1833
|
-
const
|
|
1838
|
+
const ga = {
|
|
1834
1839
|
name: "arrow-left",
|
|
1835
1840
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M3.1 12a.9.9 0 0 1 .264-.636l5.5-5.5a.9.9 0 0 1 1.272 1.272L6.173 11.1H20a.9.9 0 0 1 0 1.8H6.173l3.963 3.964a.9.9 0 1 1-1.272 1.272l-5.5-5.5A.9.9 0 0 1 3.1 12Z" clip-rule="evenodd"/></svg>',
|
|
1836
1841
|
keywords: ["arrow-left"],
|
|
1837
1842
|
category: "utility"
|
|
1838
|
-
},
|
|
1839
|
-
|
|
1840
|
-
const
|
|
1843
|
+
}, dr = (e) => /* @__PURE__ */ f(Xe, { ...e, svg: ga });
|
|
1844
|
+
dr.displayName = "IconArrowLeft";
|
|
1845
|
+
const _a = {
|
|
1841
1846
|
name: "close",
|
|
1842
1847
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M4.864 4.864a.9.9 0 0 1 1.273 0L12 10.727l5.864-5.863a.9.9 0 0 1 1.272 1.272L13.273 12l5.863 5.864a.9.9 0 1 1-1.272 1.272L12 13.273l-5.863 5.863a.9.9 0 0 1-1.273-1.272L10.727 12 4.864 6.136a.9.9 0 0 1 0-1.272Z" clip-rule="evenodd"/></svg>',
|
|
1843
1848
|
keywords: ["close"],
|
|
1844
1849
|
category: "utility"
|
|
1845
|
-
},
|
|
1846
|
-
|
|
1847
|
-
function
|
|
1850
|
+
}, fr = (e) => /* @__PURE__ */ f(Xe, { ...e, svg: _a });
|
|
1851
|
+
fr.displayName = "IconClose";
|
|
1852
|
+
function xt(e, t) {
|
|
1848
1853
|
if (typeof e == "function")
|
|
1849
|
-
return e(
|
|
1850
|
-
e != null && (e.current =
|
|
1854
|
+
return e(t);
|
|
1855
|
+
e != null && (e.current = t);
|
|
1851
1856
|
}
|
|
1852
|
-
function
|
|
1853
|
-
return (
|
|
1854
|
-
let
|
|
1857
|
+
function ba(...e) {
|
|
1858
|
+
return (t) => {
|
|
1859
|
+
let r = !1;
|
|
1855
1860
|
const o = e.map((a) => {
|
|
1856
|
-
const n =
|
|
1857
|
-
return !
|
|
1861
|
+
const n = xt(a, t);
|
|
1862
|
+
return !r && typeof n == "function" && (r = !0), n;
|
|
1858
1863
|
});
|
|
1859
|
-
if (
|
|
1864
|
+
if (r)
|
|
1860
1865
|
return () => {
|
|
1861
1866
|
for (let a = 0; a < o.length; a++) {
|
|
1862
1867
|
const n = o[a];
|
|
1863
|
-
typeof n == "function" ? n() :
|
|
1868
|
+
typeof n == "function" ? n() : xt(e[a], null);
|
|
1864
1869
|
}
|
|
1865
1870
|
};
|
|
1866
1871
|
};
|
|
1867
1872
|
}
|
|
1868
1873
|
// @__NO_SIDE_EFFECTS__
|
|
1869
|
-
function
|
|
1870
|
-
const
|
|
1871
|
-
const { children: n, ...s } = o, i = c.Children.toArray(n), u = i.find(
|
|
1874
|
+
function wa(e) {
|
|
1875
|
+
const t = /* @__PURE__ */ ya(e), r = c.forwardRef((o, a) => {
|
|
1876
|
+
const { children: n, ...s } = o, i = c.Children.toArray(n), u = i.find(Ea);
|
|
1872
1877
|
if (u) {
|
|
1873
1878
|
const l = u.props.children, d = i.map((p) => p === u ? c.Children.count(l) > 1 ? c.Children.only(null) : c.isValidElement(l) ? l.props.children : null : p);
|
|
1874
|
-
return /* @__PURE__ */ f(
|
|
1879
|
+
return /* @__PURE__ */ f(t, { ...s, ref: a, children: c.isValidElement(l) ? c.cloneElement(l, void 0, d) : null });
|
|
1875
1880
|
}
|
|
1876
|
-
return /* @__PURE__ */ f(
|
|
1881
|
+
return /* @__PURE__ */ f(t, { ...s, ref: a, children: n });
|
|
1877
1882
|
});
|
|
1878
|
-
return
|
|
1883
|
+
return r.displayName = `${e}.Slot`, r;
|
|
1879
1884
|
}
|
|
1880
1885
|
// @__NO_SIDE_EFFECTS__
|
|
1881
|
-
function
|
|
1882
|
-
const
|
|
1883
|
-
const { children: a, ...n } =
|
|
1886
|
+
function ya(e) {
|
|
1887
|
+
const t = c.forwardRef((r, o) => {
|
|
1888
|
+
const { children: a, ...n } = r;
|
|
1884
1889
|
if (c.isValidElement(a)) {
|
|
1885
|
-
const s =
|
|
1886
|
-
return a.type !== c.Fragment && (i.ref = o ?
|
|
1890
|
+
const s = Pa(a), i = Ca(n, a.props);
|
|
1891
|
+
return a.type !== c.Fragment && (i.ref = o ? ba(o, s) : s), c.cloneElement(a, i);
|
|
1887
1892
|
}
|
|
1888
1893
|
return c.Children.count(a) > 1 ? c.Children.only(null) : null;
|
|
1889
1894
|
});
|
|
1890
|
-
return
|
|
1895
|
+
return t.displayName = `${e}.SlotClone`, t;
|
|
1891
1896
|
}
|
|
1892
|
-
var
|
|
1893
|
-
function
|
|
1894
|
-
return c.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId ===
|
|
1897
|
+
var Sa = Symbol("radix.slottable");
|
|
1898
|
+
function Ea(e) {
|
|
1899
|
+
return c.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Sa;
|
|
1895
1900
|
}
|
|
1896
|
-
function
|
|
1897
|
-
const
|
|
1898
|
-
for (const o in
|
|
1899
|
-
const a = e[o], n =
|
|
1900
|
-
/^on[A-Z]/.test(o) ? a && n ?
|
|
1901
|
+
function Ca(e, t) {
|
|
1902
|
+
const r = { ...t };
|
|
1903
|
+
for (const o in t) {
|
|
1904
|
+
const a = e[o], n = t[o];
|
|
1905
|
+
/^on[A-Z]/.test(o) ? a && n ? r[o] = (...s) => {
|
|
1901
1906
|
n(...s), a(...s);
|
|
1902
|
-
} : a && (
|
|
1907
|
+
} : a && (r[o] = a) : o === "style" ? r[o] = { ...a, ...n } : o === "className" && (r[o] = [a, n].filter(Boolean).join(" "));
|
|
1903
1908
|
}
|
|
1904
|
-
return { ...e, ...
|
|
1909
|
+
return { ...e, ...r };
|
|
1905
1910
|
}
|
|
1906
|
-
function
|
|
1907
|
-
var
|
|
1908
|
-
let o = (
|
|
1909
|
-
return a ? e.ref : (o = (
|
|
1911
|
+
function Pa(e) {
|
|
1912
|
+
var t, r;
|
|
1913
|
+
let o = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get, a = o && "isReactWarning" in o && o.isReactWarning;
|
|
1914
|
+
return a ? e.ref : (o = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, a = o && "isReactWarning" in o && o.isReactWarning, a ? e.props.ref : e.props.ref || e.ref);
|
|
1910
1915
|
}
|
|
1911
|
-
var
|
|
1916
|
+
var xa = [
|
|
1912
1917
|
"a",
|
|
1913
1918
|
"button",
|
|
1914
1919
|
"div",
|
|
@@ -1925,18 +1930,18 @@ var Ea = [
|
|
|
1925
1930
|
"span",
|
|
1926
1931
|
"svg",
|
|
1927
1932
|
"ul"
|
|
1928
|
-
],
|
|
1929
|
-
const
|
|
1930
|
-
const { asChild: s, ...i } = a, u = s ?
|
|
1933
|
+
], Ra = xa.reduce((e, t) => {
|
|
1934
|
+
const r = /* @__PURE__ */ wa(`Primitive.${t}`), o = c.forwardRef((a, n) => {
|
|
1935
|
+
const { asChild: s, ...i } = a, u = s ? r : t;
|
|
1931
1936
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ f(u, { ...i, ref: n });
|
|
1932
1937
|
});
|
|
1933
|
-
return o.displayName = `Primitive.${
|
|
1934
|
-
}, {}),
|
|
1935
|
-
(e,
|
|
1936
|
-
|
|
1938
|
+
return o.displayName = `Primitive.${t}`, { ...e, [t]: o };
|
|
1939
|
+
}, {}), Na = "VisuallyHidden", pr = c.forwardRef(
|
|
1940
|
+
(e, t) => /* @__PURE__ */ f(
|
|
1941
|
+
Ra.span,
|
|
1937
1942
|
{
|
|
1938
1943
|
...e,
|
|
1939
|
-
ref:
|
|
1944
|
+
ref: t,
|
|
1940
1945
|
style: {
|
|
1941
1946
|
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
1942
1947
|
position: "absolute",
|
|
@@ -1954,20 +1959,21 @@ var Ea = [
|
|
|
1954
1959
|
}
|
|
1955
1960
|
)
|
|
1956
1961
|
);
|
|
1957
|
-
|
|
1958
|
-
var
|
|
1959
|
-
const
|
|
1960
|
-
"purpur-drawer-header__row": "_purpur-drawer-
|
|
1961
|
-
"purpur-drawer-header__row--with-back-button": "_purpur-drawer-header__row--with-back-
|
|
1962
|
-
"purpur-drawer-header__left": "_purpur-drawer-
|
|
1963
|
-
"purpur-drawer-header__right": "_purpur-drawer-
|
|
1964
|
-
"purpur-drawer-
|
|
1965
|
-
"purpur-drawer-
|
|
1966
|
-
|
|
1962
|
+
pr.displayName = Na;
|
|
1963
|
+
var Aa = pr;
|
|
1964
|
+
const Rt = ({ asChild: e, children: t, ...r }) => /* @__PURE__ */ f(Aa, { asChild: e, ...r, children: t }), Da = {
|
|
1965
|
+
"purpur-drawer-header__row": "_purpur-drawer-header__row_12p9v_1",
|
|
1966
|
+
"purpur-drawer-header__row--with-back-button": "_purpur-drawer-header__row--with-back-button_12p9v_4",
|
|
1967
|
+
"purpur-drawer-header__left": "_purpur-drawer-header__left_12p9v_7",
|
|
1968
|
+
"purpur-drawer-header__right": "_purpur-drawer-header__right_12p9v_10",
|
|
1969
|
+
"purpur-drawer-header": "_purpur-drawer-header_12p9v_1",
|
|
1970
|
+
"purpur-drawer-header__close-button": "_purpur-drawer-header__close-button_12p9v_13",
|
|
1971
|
+
"purpur-drawer-header__back-button--only-icon": "_purpur-drawer-header__back-button--only-icon_12p9v_24"
|
|
1972
|
+
}, Z = ae.bind(Da), U = "purpur-drawer-header", vr = H(
|
|
1967
1973
|
({
|
|
1968
1974
|
["data-testid"]: e = "purpur-drawer-header",
|
|
1969
|
-
backButton:
|
|
1970
|
-
backButtonText:
|
|
1975
|
+
backButton: t,
|
|
1976
|
+
backButtonText: r,
|
|
1971
1977
|
backButtonOnlyIcon: o,
|
|
1972
1978
|
className: a,
|
|
1973
1979
|
closeButtonAriaLabel: n,
|
|
@@ -1976,7 +1982,7 @@ const xr = ({ asChild: e, children: r, ...t }) => /* @__PURE__ */ f(xa, { asChil
|
|
|
1976
1982
|
title: u,
|
|
1977
1983
|
...l
|
|
1978
1984
|
}, d) => {
|
|
1979
|
-
const p = Z([a, U]);
|
|
1985
|
+
const p = Z([a, U]), v = !!(t && r && i);
|
|
1980
1986
|
return /* @__PURE__ */ D("div", { className: p, "data-testid": e, ref: d, ...l, children: [
|
|
1981
1987
|
/* @__PURE__ */ D(
|
|
1982
1988
|
"div",
|
|
@@ -1984,15 +1990,15 @@ const xr = ({ asChild: e, children: r, ...t }) => /* @__PURE__ */ f(xa, { asChil
|
|
|
1984
1990
|
className: Z([
|
|
1985
1991
|
`${U}__row`,
|
|
1986
1992
|
{
|
|
1987
|
-
[`${U}__row--with-back-button`]:
|
|
1993
|
+
[`${U}__row--with-back-button`]: v
|
|
1988
1994
|
}
|
|
1989
1995
|
]),
|
|
1990
1996
|
"data-testid": `${e}-row`,
|
|
1991
1997
|
children: [
|
|
1992
|
-
/* @__PURE__ */ f("div", { className: Z(`${U}__left`), children:
|
|
1993
|
-
|
|
1998
|
+
/* @__PURE__ */ f("div", { className: Z(`${U}__left`), children: v ? /* @__PURE__ */ D(
|
|
1999
|
+
Fe,
|
|
1994
2000
|
{
|
|
1995
|
-
"aria-label": o ?
|
|
2001
|
+
"aria-label": o ? r : "",
|
|
1996
2002
|
className: Z([
|
|
1997
2003
|
`${U}__back-button`,
|
|
1998
2004
|
{
|
|
@@ -2005,78 +2011,78 @@ const xr = ({ asChild: e, children: r, ...t }) => /* @__PURE__ */ f(xa, { asChil
|
|
|
2005
2011
|
size: "sm",
|
|
2006
2012
|
variant: o ? Ie.TERTIARY_PURPLE : Ie.TEXT,
|
|
2007
2013
|
children: [
|
|
2008
|
-
/* @__PURE__ */ f(
|
|
2009
|
-
!o &&
|
|
2014
|
+
/* @__PURE__ */ f(dr, { size: "sm" }),
|
|
2015
|
+
!o && r
|
|
2010
2016
|
]
|
|
2011
2017
|
}
|
|
2012
|
-
) : s ? /* @__PURE__ */ D(
|
|
2018
|
+
) : s ? /* @__PURE__ */ D(re, { children: [
|
|
2013
2019
|
s,
|
|
2014
|
-
/* @__PURE__ */ f(
|
|
2015
|
-
] }) : /* @__PURE__ */ f(
|
|
2020
|
+
/* @__PURE__ */ f(Rt, { asChild: !0, children: /* @__PURE__ */ f(ve, { children: u }) })
|
|
2021
|
+
] }) : /* @__PURE__ */ f(ve, { asChild: !0, children: /* @__PURE__ */ f(
|
|
2016
2022
|
Be,
|
|
2017
2023
|
{
|
|
2018
2024
|
"data-testid": `${e}-title`,
|
|
2019
2025
|
tag: "h2",
|
|
2020
|
-
variant:
|
|
2026
|
+
variant: Ue.TITLE200,
|
|
2021
2027
|
tabIndex: -1,
|
|
2022
2028
|
children: u
|
|
2023
2029
|
}
|
|
2024
2030
|
) }) }),
|
|
2025
|
-
/* @__PURE__ */ f("div", { className: Z(`${U}__right`), children: /* @__PURE__ */ f(
|
|
2026
|
-
|
|
2031
|
+
/* @__PURE__ */ f("div", { className: Z(`${U}__right`), children: /* @__PURE__ */ f(yo, { asChild: !0, children: /* @__PURE__ */ f(
|
|
2032
|
+
Fe,
|
|
2027
2033
|
{
|
|
2028
2034
|
"aria-label": n,
|
|
2029
2035
|
className: Z(`${U}__close-button`),
|
|
2030
2036
|
iconOnly: !0,
|
|
2031
2037
|
size: "sm",
|
|
2032
2038
|
variant: Ie.TERTIARY_PURPLE,
|
|
2033
|
-
children: /* @__PURE__ */ f(
|
|
2039
|
+
children: /* @__PURE__ */ f(fr, { size: "sm" })
|
|
2034
2040
|
}
|
|
2035
2041
|
) }) })
|
|
2036
2042
|
]
|
|
2037
2043
|
}
|
|
2038
2044
|
),
|
|
2039
|
-
|
|
2045
|
+
v && (s ? /* @__PURE__ */ D(re, { children: [
|
|
2040
2046
|
s,
|
|
2041
|
-
/* @__PURE__ */ f(
|
|
2042
|
-
] }) : /* @__PURE__ */ f(
|
|
2047
|
+
/* @__PURE__ */ f(Rt, { asChild: !0, children: /* @__PURE__ */ f(ve, { children: u }) })
|
|
2048
|
+
] }) : /* @__PURE__ */ f(ve, { asChild: !0, children: /* @__PURE__ */ f(
|
|
2043
2049
|
Be,
|
|
2044
2050
|
{
|
|
2045
2051
|
"data-testid": `${e}-title-with-back-button`,
|
|
2046
2052
|
tag: "h2",
|
|
2047
2053
|
tabIndex: -1,
|
|
2048
|
-
variant:
|
|
2054
|
+
variant: Ue.TITLE200,
|
|
2049
2055
|
children: u
|
|
2050
2056
|
}
|
|
2051
2057
|
) }))
|
|
2052
2058
|
] });
|
|
2053
2059
|
}
|
|
2054
2060
|
);
|
|
2055
|
-
|
|
2056
|
-
var
|
|
2057
|
-
function
|
|
2058
|
-
const
|
|
2059
|
-
return e ||
|
|
2061
|
+
vr.displayName = "DrawerHeader";
|
|
2062
|
+
var Ta = c.createContext(void 0);
|
|
2063
|
+
function Oa(e) {
|
|
2064
|
+
const t = c.useContext(Ta);
|
|
2065
|
+
return e || t || "ltr";
|
|
2060
2066
|
}
|
|
2061
|
-
function
|
|
2062
|
-
return Math.min(
|
|
2067
|
+
function La(e, [t, r]) {
|
|
2068
|
+
return Math.min(r, Math.max(t, e));
|
|
2063
2069
|
}
|
|
2064
|
-
function
|
|
2065
|
-
return c.useReducer((
|
|
2070
|
+
function $a(e, t) {
|
|
2071
|
+
return c.useReducer((r, o) => t[r][o] ?? r, e);
|
|
2066
2072
|
}
|
|
2067
|
-
var qe = "ScrollArea", [
|
|
2068
|
-
(e,
|
|
2073
|
+
var qe = "ScrollArea", [hr] = Dt(qe), [Ma, M] = hr(qe), mr = c.forwardRef(
|
|
2074
|
+
(e, t) => {
|
|
2069
2075
|
const {
|
|
2070
|
-
__scopeScrollArea:
|
|
2076
|
+
__scopeScrollArea: r,
|
|
2071
2077
|
type: o = "hover",
|
|
2072
2078
|
dir: a,
|
|
2073
2079
|
scrollHideDelay: n = 600,
|
|
2074
2080
|
...s
|
|
2075
|
-
} = e, [i, u] = c.useState(null), [l, d] = c.useState(null), [p,
|
|
2081
|
+
} = e, [i, u] = c.useState(null), [l, d] = c.useState(null), [p, v] = c.useState(null), [m, _] = c.useState(null), [h, g] = c.useState(null), [b, w] = c.useState(0), [E, y] = c.useState(0), [C, x] = c.useState(!1), [S, N] = c.useState(!1), P = L(t, (j) => u(j)), R = Oa(a);
|
|
2076
2082
|
return /* @__PURE__ */ f(
|
|
2077
|
-
|
|
2083
|
+
Ma,
|
|
2078
2084
|
{
|
|
2079
|
-
scope:
|
|
2085
|
+
scope: r,
|
|
2080
2086
|
type: o,
|
|
2081
2087
|
dir: R,
|
|
2082
2088
|
scrollHideDelay: n,
|
|
@@ -2084,16 +2090,16 @@ var qe = "ScrollArea", [ht] = Ar(qe), [Oa, $] = ht(qe), vt = c.forwardRef(
|
|
|
2084
2090
|
viewport: l,
|
|
2085
2091
|
onViewportChange: d,
|
|
2086
2092
|
content: p,
|
|
2087
|
-
onContentChange:
|
|
2093
|
+
onContentChange: v,
|
|
2088
2094
|
scrollbarX: m,
|
|
2089
|
-
onScrollbarXChange:
|
|
2095
|
+
onScrollbarXChange: _,
|
|
2090
2096
|
scrollbarXEnabled: C,
|
|
2091
2097
|
onScrollbarXEnabledChange: x,
|
|
2092
|
-
scrollbarY:
|
|
2098
|
+
scrollbarY: h,
|
|
2093
2099
|
onScrollbarYChange: g,
|
|
2094
2100
|
scrollbarYEnabled: S,
|
|
2095
2101
|
onScrollbarYEnabledChange: N,
|
|
2096
|
-
onCornerWidthChange:
|
|
2102
|
+
onCornerWidthChange: w,
|
|
2097
2103
|
onCornerHeightChange: y,
|
|
2098
2104
|
children: /* @__PURE__ */ f(
|
|
2099
2105
|
T.div,
|
|
@@ -2104,7 +2110,7 @@ var qe = "ScrollArea", [ht] = Ar(qe), [Oa, $] = ht(qe), vt = c.forwardRef(
|
|
|
2104
2110
|
style: {
|
|
2105
2111
|
position: "relative",
|
|
2106
2112
|
// Pass corner sizes as CSS vars to reduce re-renders of context consumers
|
|
2107
|
-
"--radix-scroll-area-corner-width":
|
|
2113
|
+
"--radix-scroll-area-corner-width": b + "px",
|
|
2108
2114
|
"--radix-scroll-area-corner-height": E + "px",
|
|
2109
2115
|
...e.style
|
|
2110
2116
|
}
|
|
@@ -2114,11 +2120,11 @@ var qe = "ScrollArea", [ht] = Ar(qe), [Oa, $] = ht(qe), vt = c.forwardRef(
|
|
|
2114
2120
|
);
|
|
2115
2121
|
}
|
|
2116
2122
|
);
|
|
2117
|
-
|
|
2118
|
-
var
|
|
2119
|
-
(e,
|
|
2120
|
-
const { __scopeScrollArea:
|
|
2121
|
-
return /* @__PURE__ */ D(
|
|
2123
|
+
mr.displayName = qe;
|
|
2124
|
+
var gr = "ScrollAreaViewport", _r = c.forwardRef(
|
|
2125
|
+
(e, t) => {
|
|
2126
|
+
const { __scopeScrollArea: r, children: o, nonce: a, ...n } = e, s = M(gr, r), i = c.useRef(null), u = L(t, i, s.onViewportChange);
|
|
2127
|
+
return /* @__PURE__ */ D(re, { children: [
|
|
2122
2128
|
/* @__PURE__ */ f(
|
|
2123
2129
|
"style",
|
|
2124
2130
|
{
|
|
@@ -2156,18 +2162,18 @@ var mt = "ScrollAreaViewport", gt = c.forwardRef(
|
|
|
2156
2162
|
] });
|
|
2157
2163
|
}
|
|
2158
2164
|
);
|
|
2159
|
-
|
|
2160
|
-
var W = "ScrollAreaScrollbar",
|
|
2161
|
-
(e,
|
|
2162
|
-
const { forceMount:
|
|
2165
|
+
_r.displayName = gr;
|
|
2166
|
+
var W = "ScrollAreaScrollbar", br = c.forwardRef(
|
|
2167
|
+
(e, t) => {
|
|
2168
|
+
const { forceMount: r, ...o } = e, a = M(W, e.__scopeScrollArea), { onScrollbarXEnabledChange: n, onScrollbarYEnabledChange: s } = a, i = e.orientation === "horizontal";
|
|
2163
2169
|
return c.useEffect(() => (i ? n(!0) : s(!0), () => {
|
|
2164
2170
|
i ? n(!1) : s(!1);
|
|
2165
|
-
}), [i, n, s]), a.type === "hover" ? /* @__PURE__ */ f(
|
|
2171
|
+
}), [i, n, s]), a.type === "hover" ? /* @__PURE__ */ f(Ia, { ...o, ref: t, forceMount: r }) : a.type === "scroll" ? /* @__PURE__ */ f(ka, { ...o, ref: t, forceMount: r }) : a.type === "auto" ? /* @__PURE__ */ f(wr, { ...o, ref: t, forceMount: r }) : a.type === "always" ? /* @__PURE__ */ f(Ge, { ...o, ref: t }) : null;
|
|
2166
2172
|
}
|
|
2167
2173
|
);
|
|
2168
|
-
|
|
2169
|
-
var
|
|
2170
|
-
const { forceMount:
|
|
2174
|
+
br.displayName = W;
|
|
2175
|
+
var Ia = c.forwardRef((e, t) => {
|
|
2176
|
+
const { forceMount: r, ...o } = e, a = M(W, e.__scopeScrollArea), [n, s] = c.useState(!1);
|
|
2171
2177
|
return c.useEffect(() => {
|
|
2172
2178
|
const i = a.scrollArea;
|
|
2173
2179
|
let u = 0;
|
|
@@ -2181,16 +2187,16 @@ var La = c.forwardRef((e, r) => {
|
|
|
2181
2187
|
window.clearTimeout(u), i.removeEventListener("pointerenter", l), i.removeEventListener("pointerleave", d);
|
|
2182
2188
|
};
|
|
2183
2189
|
}
|
|
2184
|
-
}, [a.scrollArea, a.scrollHideDelay]), /* @__PURE__ */ f(
|
|
2185
|
-
|
|
2190
|
+
}, [a.scrollArea, a.scrollHideDelay]), /* @__PURE__ */ f(V, { present: r || n, children: /* @__PURE__ */ f(
|
|
2191
|
+
wr,
|
|
2186
2192
|
{
|
|
2187
2193
|
"data-state": n ? "visible" : "hidden",
|
|
2188
2194
|
...o,
|
|
2189
|
-
ref:
|
|
2195
|
+
ref: t
|
|
2190
2196
|
}
|
|
2191
2197
|
) });
|
|
2192
|
-
}),
|
|
2193
|
-
const { forceMount:
|
|
2198
|
+
}), ka = c.forwardRef((e, t) => {
|
|
2199
|
+
const { forceMount: r, ...o } = e, a = M(W, e.__scopeScrollArea), n = e.orientation === "horizontal", s = Pe(() => u("SCROLL_END"), 100), [i, u] = $a("hidden", {
|
|
2194
2200
|
hidden: {
|
|
2195
2201
|
SCROLL: "scrolling"
|
|
2196
2202
|
},
|
|
@@ -2217,115 +2223,115 @@ var La = c.forwardRef((e, r) => {
|
|
|
2217
2223
|
const l = a.viewport, d = n ? "scrollLeft" : "scrollTop";
|
|
2218
2224
|
if (l) {
|
|
2219
2225
|
let p = l[d];
|
|
2220
|
-
const
|
|
2226
|
+
const v = () => {
|
|
2221
2227
|
const m = l[d];
|
|
2222
2228
|
p !== m && (u("SCROLL"), s()), p = m;
|
|
2223
2229
|
};
|
|
2224
|
-
return l.addEventListener("scroll",
|
|
2230
|
+
return l.addEventListener("scroll", v), () => l.removeEventListener("scroll", v);
|
|
2225
2231
|
}
|
|
2226
|
-
}, [a.viewport, n, u, s]), /* @__PURE__ */ f(
|
|
2232
|
+
}, [a.viewport, n, u, s]), /* @__PURE__ */ f(V, { present: r || i !== "hidden", children: /* @__PURE__ */ f(
|
|
2227
2233
|
Ge,
|
|
2228
2234
|
{
|
|
2229
2235
|
"data-state": i === "hidden" ? "hidden" : "visible",
|
|
2230
2236
|
...o,
|
|
2231
|
-
ref:
|
|
2237
|
+
ref: t,
|
|
2232
2238
|
onPointerEnter: A(e.onPointerEnter, () => u("POINTER_ENTER")),
|
|
2233
2239
|
onPointerLeave: A(e.onPointerLeave, () => u("POINTER_LEAVE"))
|
|
2234
2240
|
}
|
|
2235
2241
|
) });
|
|
2236
|
-
}),
|
|
2237
|
-
const
|
|
2238
|
-
if (
|
|
2239
|
-
const l =
|
|
2242
|
+
}), wr = c.forwardRef((e, t) => {
|
|
2243
|
+
const r = M(W, e.__scopeScrollArea), { forceMount: o, ...a } = e, [n, s] = c.useState(!1), i = e.orientation === "horizontal", u = Pe(() => {
|
|
2244
|
+
if (r.viewport) {
|
|
2245
|
+
const l = r.viewport.offsetWidth < r.viewport.scrollWidth, d = r.viewport.offsetHeight < r.viewport.scrollHeight;
|
|
2240
2246
|
s(i ? l : d);
|
|
2241
2247
|
}
|
|
2242
2248
|
}, 10);
|
|
2243
|
-
return oe(
|
|
2249
|
+
return oe(r.viewport, u), oe(r.content, u), /* @__PURE__ */ f(V, { present: o || n, children: /* @__PURE__ */ f(
|
|
2244
2250
|
Ge,
|
|
2245
2251
|
{
|
|
2246
2252
|
"data-state": n ? "visible" : "hidden",
|
|
2247
2253
|
...a,
|
|
2248
|
-
ref:
|
|
2254
|
+
ref: t
|
|
2249
2255
|
}
|
|
2250
2256
|
) });
|
|
2251
|
-
}), Ge = c.forwardRef((e,
|
|
2252
|
-
const { orientation:
|
|
2257
|
+
}), Ge = c.forwardRef((e, t) => {
|
|
2258
|
+
const { orientation: r = "vertical", ...o } = e, a = M(W, e.__scopeScrollArea), n = c.useRef(null), s = c.useRef(0), [i, u] = c.useState({
|
|
2253
2259
|
content: 0,
|
|
2254
2260
|
viewport: 0,
|
|
2255
2261
|
scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
|
|
2256
|
-
}), l =
|
|
2262
|
+
}), l = Cr(i.viewport, i.content), d = {
|
|
2257
2263
|
...o,
|
|
2258
2264
|
sizes: i,
|
|
2259
2265
|
onSizesChange: u,
|
|
2260
2266
|
hasThumb: l > 0 && l < 1,
|
|
2261
|
-
onThumbChange: (
|
|
2267
|
+
onThumbChange: (v) => n.current = v,
|
|
2262
2268
|
onThumbPointerUp: () => s.current = 0,
|
|
2263
|
-
onThumbPointerDown: (
|
|
2269
|
+
onThumbPointerDown: (v) => s.current = v
|
|
2264
2270
|
};
|
|
2265
|
-
function p(
|
|
2266
|
-
return
|
|
2271
|
+
function p(v, m) {
|
|
2272
|
+
return Va(v, s.current, i, m);
|
|
2267
2273
|
}
|
|
2268
|
-
return
|
|
2269
|
-
|
|
2274
|
+
return r === "horizontal" ? /* @__PURE__ */ f(
|
|
2275
|
+
Wa,
|
|
2270
2276
|
{
|
|
2271
2277
|
...d,
|
|
2272
|
-
ref:
|
|
2278
|
+
ref: t,
|
|
2273
2279
|
onThumbPositionChange: () => {
|
|
2274
2280
|
if (a.viewport && n.current) {
|
|
2275
|
-
const
|
|
2281
|
+
const v = a.viewport.scrollLeft, m = Nt(v, i, a.dir);
|
|
2276
2282
|
n.current.style.transform = `translate3d(${m}px, 0, 0)`;
|
|
2277
2283
|
}
|
|
2278
2284
|
},
|
|
2279
|
-
onWheelScroll: (
|
|
2280
|
-
a.viewport && (a.viewport.scrollLeft =
|
|
2285
|
+
onWheelScroll: (v) => {
|
|
2286
|
+
a.viewport && (a.viewport.scrollLeft = v);
|
|
2281
2287
|
},
|
|
2282
|
-
onDragScroll: (
|
|
2283
|
-
a.viewport && (a.viewport.scrollLeft = p(
|
|
2288
|
+
onDragScroll: (v) => {
|
|
2289
|
+
a.viewport && (a.viewport.scrollLeft = p(v, a.dir));
|
|
2284
2290
|
}
|
|
2285
2291
|
}
|
|
2286
|
-
) :
|
|
2287
|
-
|
|
2292
|
+
) : r === "vertical" ? /* @__PURE__ */ f(
|
|
2293
|
+
ja,
|
|
2288
2294
|
{
|
|
2289
2295
|
...d,
|
|
2290
|
-
ref:
|
|
2296
|
+
ref: t,
|
|
2291
2297
|
onThumbPositionChange: () => {
|
|
2292
2298
|
if (a.viewport && n.current) {
|
|
2293
|
-
const
|
|
2299
|
+
const v = a.viewport.scrollTop, m = Nt(v, i);
|
|
2294
2300
|
n.current.style.transform = `translate3d(0, ${m}px, 0)`;
|
|
2295
2301
|
}
|
|
2296
2302
|
},
|
|
2297
|
-
onWheelScroll: (
|
|
2298
|
-
a.viewport && (a.viewport.scrollTop =
|
|
2303
|
+
onWheelScroll: (v) => {
|
|
2304
|
+
a.viewport && (a.viewport.scrollTop = v);
|
|
2299
2305
|
},
|
|
2300
|
-
onDragScroll: (
|
|
2301
|
-
a.viewport && (a.viewport.scrollTop = p(
|
|
2306
|
+
onDragScroll: (v) => {
|
|
2307
|
+
a.viewport && (a.viewport.scrollTop = p(v));
|
|
2302
2308
|
}
|
|
2303
2309
|
}
|
|
2304
2310
|
) : null;
|
|
2305
|
-
}),
|
|
2306
|
-
const { sizes:
|
|
2311
|
+
}), Wa = c.forwardRef((e, t) => {
|
|
2312
|
+
const { sizes: r, onSizesChange: o, ...a } = e, n = M(W, e.__scopeScrollArea), [s, i] = c.useState(), u = c.useRef(null), l = L(t, u, n.onScrollbarXChange);
|
|
2307
2313
|
return c.useEffect(() => {
|
|
2308
2314
|
u.current && i(getComputedStyle(u.current));
|
|
2309
2315
|
}, [u]), /* @__PURE__ */ f(
|
|
2310
|
-
|
|
2316
|
+
Sr,
|
|
2311
2317
|
{
|
|
2312
2318
|
"data-orientation": "horizontal",
|
|
2313
2319
|
...a,
|
|
2314
2320
|
ref: l,
|
|
2315
|
-
sizes:
|
|
2321
|
+
sizes: r,
|
|
2316
2322
|
style: {
|
|
2317
2323
|
bottom: 0,
|
|
2318
2324
|
left: n.dir === "rtl" ? "var(--radix-scroll-area-corner-width)" : 0,
|
|
2319
2325
|
right: n.dir === "ltr" ? "var(--radix-scroll-area-corner-width)" : 0,
|
|
2320
|
-
"--radix-scroll-area-thumb-width": Ce(
|
|
2326
|
+
"--radix-scroll-area-thumb-width": Ce(r) + "px",
|
|
2321
2327
|
...e.style
|
|
2322
2328
|
},
|
|
2323
2329
|
onThumbPointerDown: (d) => e.onThumbPointerDown(d.x),
|
|
2324
2330
|
onDragScroll: (d) => e.onDragScroll(d.x),
|
|
2325
2331
|
onWheelScroll: (d, p) => {
|
|
2326
2332
|
if (n.viewport) {
|
|
2327
|
-
const
|
|
2328
|
-
e.onWheelScroll(
|
|
2333
|
+
const v = n.viewport.scrollLeft + d.deltaX;
|
|
2334
|
+
e.onWheelScroll(v), xr(v, p) && d.preventDefault();
|
|
2329
2335
|
}
|
|
2330
2336
|
},
|
|
2331
2337
|
onResize: () => {
|
|
@@ -2341,31 +2347,31 @@ var La = c.forwardRef((e, r) => {
|
|
|
2341
2347
|
}
|
|
2342
2348
|
}
|
|
2343
2349
|
);
|
|
2344
|
-
}),
|
|
2345
|
-
const { sizes:
|
|
2350
|
+
}), ja = c.forwardRef((e, t) => {
|
|
2351
|
+
const { sizes: r, onSizesChange: o, ...a } = e, n = M(W, e.__scopeScrollArea), [s, i] = c.useState(), u = c.useRef(null), l = L(t, u, n.onScrollbarYChange);
|
|
2346
2352
|
return c.useEffect(() => {
|
|
2347
2353
|
u.current && i(getComputedStyle(u.current));
|
|
2348
2354
|
}, [u]), /* @__PURE__ */ f(
|
|
2349
|
-
|
|
2355
|
+
Sr,
|
|
2350
2356
|
{
|
|
2351
2357
|
"data-orientation": "vertical",
|
|
2352
2358
|
...a,
|
|
2353
2359
|
ref: l,
|
|
2354
|
-
sizes:
|
|
2360
|
+
sizes: r,
|
|
2355
2361
|
style: {
|
|
2356
2362
|
top: 0,
|
|
2357
2363
|
right: n.dir === "ltr" ? 0 : void 0,
|
|
2358
2364
|
left: n.dir === "rtl" ? 0 : void 0,
|
|
2359
2365
|
bottom: "var(--radix-scroll-area-corner-height)",
|
|
2360
|
-
"--radix-scroll-area-thumb-height": Ce(
|
|
2366
|
+
"--radix-scroll-area-thumb-height": Ce(r) + "px",
|
|
2361
2367
|
...e.style
|
|
2362
2368
|
},
|
|
2363
2369
|
onThumbPointerDown: (d) => e.onThumbPointerDown(d.y),
|
|
2364
2370
|
onDragScroll: (d) => e.onDragScroll(d.y),
|
|
2365
2371
|
onWheelScroll: (d, p) => {
|
|
2366
2372
|
if (n.viewport) {
|
|
2367
|
-
const
|
|
2368
|
-
e.onWheelScroll(
|
|
2373
|
+
const v = n.viewport.scrollTop + d.deltaY;
|
|
2374
|
+
e.onWheelScroll(v), xr(v, p) && d.preventDefault();
|
|
2369
2375
|
}
|
|
2370
2376
|
},
|
|
2371
2377
|
onResize: () => {
|
|
@@ -2381,9 +2387,9 @@ var La = c.forwardRef((e, r) => {
|
|
|
2381
2387
|
}
|
|
2382
2388
|
}
|
|
2383
2389
|
);
|
|
2384
|
-
}), [
|
|
2390
|
+
}), [Fa, yr] = hr(W), Sr = c.forwardRef((e, t) => {
|
|
2385
2391
|
const {
|
|
2386
|
-
__scopeScrollArea:
|
|
2392
|
+
__scopeScrollArea: r,
|
|
2387
2393
|
sizes: o,
|
|
2388
2394
|
hasThumb: a,
|
|
2389
2395
|
onThumbChange: n,
|
|
@@ -2393,57 +2399,57 @@ var La = c.forwardRef((e, r) => {
|
|
|
2393
2399
|
onDragScroll: l,
|
|
2394
2400
|
onWheelScroll: d,
|
|
2395
2401
|
onResize: p,
|
|
2396
|
-
...
|
|
2397
|
-
} = e, m =
|
|
2402
|
+
...v
|
|
2403
|
+
} = e, m = M(W, r), [_, h] = c.useState(null), g = L(t, (P) => h(P)), b = c.useRef(null), w = c.useRef(""), E = m.viewport, y = o.content - o.viewport, C = $(d), x = $(u), S = Pe(p, 10);
|
|
2398
2404
|
function N(P) {
|
|
2399
|
-
if (
|
|
2400
|
-
const R = P.clientX -
|
|
2401
|
-
l({ x: R, y:
|
|
2405
|
+
if (b.current) {
|
|
2406
|
+
const R = P.clientX - b.current.left, j = P.clientY - b.current.top;
|
|
2407
|
+
l({ x: R, y: j });
|
|
2402
2408
|
}
|
|
2403
2409
|
}
|
|
2404
2410
|
return c.useEffect(() => {
|
|
2405
2411
|
const P = (R) => {
|
|
2406
|
-
const
|
|
2407
|
-
(
|
|
2412
|
+
const j = R.target;
|
|
2413
|
+
(_ == null ? void 0 : _.contains(j)) && C(R, y);
|
|
2408
2414
|
};
|
|
2409
2415
|
return document.addEventListener("wheel", P, { passive: !1 }), () => document.removeEventListener("wheel", P, { passive: !1 });
|
|
2410
|
-
}, [E,
|
|
2411
|
-
|
|
2416
|
+
}, [E, _, y, C]), c.useEffect(x, [o, x]), oe(_, S), oe(m.content, S), /* @__PURE__ */ f(
|
|
2417
|
+
Fa,
|
|
2412
2418
|
{
|
|
2413
|
-
scope:
|
|
2414
|
-
scrollbar:
|
|
2419
|
+
scope: r,
|
|
2420
|
+
scrollbar: _,
|
|
2415
2421
|
hasThumb: a,
|
|
2416
|
-
onThumbChange:
|
|
2417
|
-
onThumbPointerUp:
|
|
2422
|
+
onThumbChange: $(n),
|
|
2423
|
+
onThumbPointerUp: $(s),
|
|
2418
2424
|
onThumbPositionChange: x,
|
|
2419
|
-
onThumbPointerDown:
|
|
2425
|
+
onThumbPointerDown: $(i),
|
|
2420
2426
|
children: /* @__PURE__ */ f(
|
|
2421
2427
|
T.div,
|
|
2422
2428
|
{
|
|
2423
|
-
...
|
|
2429
|
+
...v,
|
|
2424
2430
|
ref: g,
|
|
2425
|
-
style: { position: "absolute", ...
|
|
2431
|
+
style: { position: "absolute", ...v.style },
|
|
2426
2432
|
onPointerDown: A(e.onPointerDown, (P) => {
|
|
2427
|
-
P.button === 0 && (P.target.setPointerCapture(P.pointerId),
|
|
2433
|
+
P.button === 0 && (P.target.setPointerCapture(P.pointerId), b.current = _.getBoundingClientRect(), w.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", m.viewport && (m.viewport.style.scrollBehavior = "auto"), N(P));
|
|
2428
2434
|
}),
|
|
2429
2435
|
onPointerMove: A(e.onPointerMove, N),
|
|
2430
2436
|
onPointerUp: A(e.onPointerUp, (P) => {
|
|
2431
2437
|
const R = P.target;
|
|
2432
|
-
R.hasPointerCapture(P.pointerId) && R.releasePointerCapture(P.pointerId), document.body.style.webkitUserSelect =
|
|
2438
|
+
R.hasPointerCapture(P.pointerId) && R.releasePointerCapture(P.pointerId), document.body.style.webkitUserSelect = w.current, m.viewport && (m.viewport.style.scrollBehavior = ""), b.current = null;
|
|
2433
2439
|
})
|
|
2434
2440
|
}
|
|
2435
2441
|
)
|
|
2436
2442
|
}
|
|
2437
2443
|
);
|
|
2438
|
-
}),
|
|
2439
|
-
(e,
|
|
2440
|
-
const { forceMount:
|
|
2441
|
-
return /* @__PURE__ */ f(
|
|
2444
|
+
}), we = "ScrollAreaThumb", Er = c.forwardRef(
|
|
2445
|
+
(e, t) => {
|
|
2446
|
+
const { forceMount: r, ...o } = e, a = yr(we, e.__scopeScrollArea);
|
|
2447
|
+
return /* @__PURE__ */ f(V, { present: r || a.hasThumb, children: /* @__PURE__ */ f(Ua, { ref: t, ...o }) });
|
|
2442
2448
|
}
|
|
2443
|
-
),
|
|
2444
|
-
(e,
|
|
2445
|
-
const { __scopeScrollArea:
|
|
2446
|
-
|
|
2449
|
+
), Ua = c.forwardRef(
|
|
2450
|
+
(e, t) => {
|
|
2451
|
+
const { __scopeScrollArea: r, style: o, ...a } = e, n = M(we, r), s = yr(we, r), { onThumbPositionChange: i } = s, u = L(
|
|
2452
|
+
t,
|
|
2447
2453
|
(p) => s.onThumbChange(p)
|
|
2448
2454
|
), l = c.useRef(void 0), d = Pe(() => {
|
|
2449
2455
|
l.current && (l.current(), l.current = void 0);
|
|
@@ -2451,13 +2457,13 @@ var La = c.forwardRef((e, r) => {
|
|
|
2451
2457
|
return c.useEffect(() => {
|
|
2452
2458
|
const p = n.viewport;
|
|
2453
2459
|
if (p) {
|
|
2454
|
-
const
|
|
2460
|
+
const v = () => {
|
|
2455
2461
|
if (d(), !l.current) {
|
|
2456
|
-
const m =
|
|
2462
|
+
const m = za(p, i);
|
|
2457
2463
|
l.current = m, i();
|
|
2458
2464
|
}
|
|
2459
2465
|
};
|
|
2460
|
-
return i(), p.addEventListener("scroll",
|
|
2466
|
+
return i(), p.addEventListener("scroll", v), () => p.removeEventListener("scroll", v);
|
|
2461
2467
|
}
|
|
2462
2468
|
}, [n.viewport, d, i]), /* @__PURE__ */ f(
|
|
2463
2469
|
T.div,
|
|
@@ -2471,24 +2477,24 @@ var La = c.forwardRef((e, r) => {
|
|
|
2471
2477
|
...o
|
|
2472
2478
|
},
|
|
2473
2479
|
onPointerDownCapture: A(e.onPointerDownCapture, (p) => {
|
|
2474
|
-
const m = p.target.getBoundingClientRect(),
|
|
2475
|
-
s.onThumbPointerDown({ x:
|
|
2480
|
+
const m = p.target.getBoundingClientRect(), _ = p.clientX - m.left, h = p.clientY - m.top;
|
|
2481
|
+
s.onThumbPointerDown({ x: _, y: h });
|
|
2476
2482
|
}),
|
|
2477
2483
|
onPointerUp: A(e.onPointerUp, s.onThumbPointerUp)
|
|
2478
2484
|
}
|
|
2479
2485
|
);
|
|
2480
2486
|
}
|
|
2481
2487
|
);
|
|
2482
|
-
|
|
2483
|
-
var Ke = "ScrollAreaCorner",
|
|
2484
|
-
(e,
|
|
2485
|
-
const
|
|
2486
|
-
return
|
|
2488
|
+
Er.displayName = we;
|
|
2489
|
+
var Ke = "ScrollAreaCorner", Ba = c.forwardRef(
|
|
2490
|
+
(e, t) => {
|
|
2491
|
+
const r = M(Ke, e.__scopeScrollArea), o = !!(r.scrollbarX && r.scrollbarY);
|
|
2492
|
+
return r.type !== "scroll" && o ? /* @__PURE__ */ f(Ha, { ...e, ref: t }) : null;
|
|
2487
2493
|
}
|
|
2488
2494
|
);
|
|
2489
|
-
|
|
2490
|
-
var
|
|
2491
|
-
const { __scopeScrollArea:
|
|
2495
|
+
Ba.displayName = Ke;
|
|
2496
|
+
var Ha = c.forwardRef((e, t) => {
|
|
2497
|
+
const { __scopeScrollArea: r, ...o } = e, a = M(Ke, r), [n, s] = c.useState(0), [i, u] = c.useState(0), l = !!(n && i);
|
|
2492
2498
|
return oe(a.scrollbarX, () => {
|
|
2493
2499
|
var p;
|
|
2494
2500
|
const d = ((p = a.scrollbarX) == null ? void 0 : p.offsetHeight) || 0;
|
|
@@ -2501,7 +2507,7 @@ var Ua = c.forwardRef((e, r) => {
|
|
|
2501
2507
|
T.div,
|
|
2502
2508
|
{
|
|
2503
2509
|
...o,
|
|
2504
|
-
ref:
|
|
2510
|
+
ref: t,
|
|
2505
2511
|
style: {
|
|
2506
2512
|
width: n,
|
|
2507
2513
|
height: i,
|
|
@@ -2517,90 +2523,90 @@ var Ua = c.forwardRef((e, r) => {
|
|
|
2517
2523
|
function ye(e) {
|
|
2518
2524
|
return e ? parseInt(e, 10) : 0;
|
|
2519
2525
|
}
|
|
2520
|
-
function
|
|
2521
|
-
const
|
|
2522
|
-
return isNaN(
|
|
2526
|
+
function Cr(e, t) {
|
|
2527
|
+
const r = e / t;
|
|
2528
|
+
return isNaN(r) ? 0 : r;
|
|
2523
2529
|
}
|
|
2524
2530
|
function Ce(e) {
|
|
2525
|
-
const
|
|
2531
|
+
const t = Cr(e.viewport, e.content), r = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, o = (e.scrollbar.size - r) * t;
|
|
2526
2532
|
return Math.max(o, 18);
|
|
2527
2533
|
}
|
|
2528
|
-
function
|
|
2529
|
-
const a = Ce(
|
|
2530
|
-
return
|
|
2534
|
+
function Va(e, t, r, o = "ltr") {
|
|
2535
|
+
const a = Ce(r), n = a / 2, s = t || n, i = a - s, u = r.scrollbar.paddingStart + s, l = r.scrollbar.size - r.scrollbar.paddingEnd - i, d = r.content - r.viewport, p = o === "ltr" ? [0, d] : [d * -1, 0];
|
|
2536
|
+
return Pr([u, l], p)(e);
|
|
2531
2537
|
}
|
|
2532
|
-
function
|
|
2533
|
-
const o = Ce(
|
|
2534
|
-
return
|
|
2538
|
+
function Nt(e, t, r = "ltr") {
|
|
2539
|
+
const o = Ce(t), a = t.scrollbar.paddingStart + t.scrollbar.paddingEnd, n = t.scrollbar.size - a, s = t.content - t.viewport, i = n - o, u = r === "ltr" ? [0, s] : [s * -1, 0], l = La(e, u);
|
|
2540
|
+
return Pr([0, s], [0, i])(l);
|
|
2535
2541
|
}
|
|
2536
|
-
function
|
|
2537
|
-
return (
|
|
2538
|
-
if (e[0] === e[1] ||
|
|
2539
|
-
const o = (
|
|
2540
|
-
return
|
|
2542
|
+
function Pr(e, t) {
|
|
2543
|
+
return (r) => {
|
|
2544
|
+
if (e[0] === e[1] || t[0] === t[1]) return t[0];
|
|
2545
|
+
const o = (t[1] - t[0]) / (e[1] - e[0]);
|
|
2546
|
+
return t[0] + o * (r - e[0]);
|
|
2541
2547
|
};
|
|
2542
2548
|
}
|
|
2543
|
-
function
|
|
2544
|
-
return e > 0 && e <
|
|
2549
|
+
function xr(e, t) {
|
|
2550
|
+
return e > 0 && e < t;
|
|
2545
2551
|
}
|
|
2546
|
-
var
|
|
2552
|
+
var za = (e, t = () => {
|
|
2547
2553
|
}) => {
|
|
2548
|
-
let
|
|
2554
|
+
let r = { left: e.scrollLeft, top: e.scrollTop }, o = 0;
|
|
2549
2555
|
return (function a() {
|
|
2550
|
-
const n = { left: e.scrollLeft, top: e.scrollTop }, s =
|
|
2551
|
-
(s || i) &&
|
|
2556
|
+
const n = { left: e.scrollLeft, top: e.scrollTop }, s = r.left !== n.left, i = r.top !== n.top;
|
|
2557
|
+
(s || i) && t(), r = n, o = window.requestAnimationFrame(a);
|
|
2552
2558
|
})(), () => window.cancelAnimationFrame(o);
|
|
2553
2559
|
};
|
|
2554
|
-
function Pe(e,
|
|
2555
|
-
const
|
|
2560
|
+
function Pe(e, t) {
|
|
2561
|
+
const r = $(e), o = c.useRef(0);
|
|
2556
2562
|
return c.useEffect(() => () => window.clearTimeout(o.current), []), c.useCallback(() => {
|
|
2557
|
-
window.clearTimeout(o.current), o.current = window.setTimeout(
|
|
2558
|
-
}, [
|
|
2563
|
+
window.clearTimeout(o.current), o.current = window.setTimeout(r, t);
|
|
2564
|
+
}, [r, t]);
|
|
2559
2565
|
}
|
|
2560
|
-
function oe(e,
|
|
2561
|
-
const
|
|
2566
|
+
function oe(e, t) {
|
|
2567
|
+
const r = $(t);
|
|
2562
2568
|
ne(() => {
|
|
2563
2569
|
let o = 0;
|
|
2564
2570
|
if (e) {
|
|
2565
2571
|
const a = new ResizeObserver(() => {
|
|
2566
|
-
cancelAnimationFrame(o), o = window.requestAnimationFrame(
|
|
2572
|
+
cancelAnimationFrame(o), o = window.requestAnimationFrame(r);
|
|
2567
2573
|
});
|
|
2568
2574
|
return a.observe(e), () => {
|
|
2569
2575
|
window.cancelAnimationFrame(o), a.unobserve(e);
|
|
2570
2576
|
};
|
|
2571
2577
|
}
|
|
2572
|
-
}, [e,
|
|
2573
|
-
}
|
|
2574
|
-
var
|
|
2575
|
-
const
|
|
2576
|
-
"purpur-drawer-scroll-area__root": "_purpur-drawer-scroll-
|
|
2577
|
-
"purpur-drawer-scroll-area__root--fit-to-content": "_purpur-drawer-scroll-area__root--fit-to-
|
|
2578
|
-
"purpur-drawer-scroll-area__viewport": "_purpur-drawer-scroll-
|
|
2579
|
-
"purpur-drawer-scroll-area__scrollbar": "_purpur-drawer-scroll-
|
|
2580
|
-
"purpur-drawer-scroll-area__thumb": "_purpur-drawer-scroll-
|
|
2581
|
-
},
|
|
2578
|
+
}, [e, r]);
|
|
2579
|
+
}
|
|
2580
|
+
var Ya = mr, Xa = _r, qa = br, Ga = Er;
|
|
2581
|
+
const Ka = {
|
|
2582
|
+
"purpur-drawer-scroll-area__root": "_purpur-drawer-scroll-area__root_1hyos_1",
|
|
2583
|
+
"purpur-drawer-scroll-area__root--fit-to-content": "_purpur-drawer-scroll-area__root--fit-to-content_1hyos_4",
|
|
2584
|
+
"purpur-drawer-scroll-area__viewport": "_purpur-drawer-scroll-area__viewport_1hyos_10",
|
|
2585
|
+
"purpur-drawer-scroll-area__scrollbar": "_purpur-drawer-scroll-area__scrollbar_1hyos_14",
|
|
2586
|
+
"purpur-drawer-scroll-area__thumb": "_purpur-drawer-scroll-area__thumb_1hyos_25"
|
|
2587
|
+
}, se = ae.bind(Ka), Q = "purpur-drawer-scroll-area", He = H(
|
|
2582
2588
|
({
|
|
2583
2589
|
["data-testid"]: e = "purpur-drawer-scroll-area",
|
|
2584
|
-
children:
|
|
2585
|
-
className:
|
|
2590
|
+
children: t,
|
|
2591
|
+
className: r,
|
|
2586
2592
|
fitToContent: o = !1,
|
|
2587
2593
|
...a
|
|
2588
2594
|
}, n) => {
|
|
2589
|
-
const s =
|
|
2595
|
+
const s = se([r, Q]);
|
|
2590
2596
|
return /* @__PURE__ */ f("div", { className: s, "data-testid": e, ref: n, ...a, children: /* @__PURE__ */ D(
|
|
2591
|
-
|
|
2597
|
+
Ya,
|
|
2592
2598
|
{
|
|
2593
|
-
className:
|
|
2599
|
+
className: se(`${Q}__root`, {
|
|
2594
2600
|
[`${Q}__root--fit-to-content`]: o
|
|
2595
2601
|
}),
|
|
2596
2602
|
children: [
|
|
2597
|
-
/* @__PURE__ */ f(
|
|
2603
|
+
/* @__PURE__ */ f(Xa, { className: se(`${Q}__viewport`), children: t }),
|
|
2598
2604
|
/* @__PURE__ */ f(
|
|
2599
|
-
|
|
2605
|
+
qa,
|
|
2600
2606
|
{
|
|
2601
|
-
className:
|
|
2607
|
+
className: se(`${Q}__scrollbar`),
|
|
2602
2608
|
orientation: "vertical",
|
|
2603
|
-
children: /* @__PURE__ */ f(
|
|
2609
|
+
children: /* @__PURE__ */ f(Ga, { className: se(`${Q}__thumb`) })
|
|
2604
2610
|
}
|
|
2605
2611
|
)
|
|
2606
2612
|
]
|
|
@@ -2608,12 +2614,12 @@ const Xa = {
|
|
|
2608
2614
|
) });
|
|
2609
2615
|
}
|
|
2610
2616
|
);
|
|
2611
|
-
|
|
2612
|
-
const J =
|
|
2617
|
+
He.displayName = "DrawerScrollArea";
|
|
2618
|
+
const J = ae.bind(Io), O = "purpur-drawer-frame", Rr = H(
|
|
2613
2619
|
({
|
|
2614
2620
|
["data-testid"]: e = "purpur-drawer-frame",
|
|
2615
|
-
backButton:
|
|
2616
|
-
backButtonText:
|
|
2621
|
+
backButton: t,
|
|
2622
|
+
backButtonText: r,
|
|
2617
2623
|
backButtonOnlyIcon: o,
|
|
2618
2624
|
children: a,
|
|
2619
2625
|
className: n,
|
|
@@ -2621,147 +2627,135 @@ const J = X.bind(Lo), M = "purpur-drawer-frame", xt = B(
|
|
|
2621
2627
|
fitToContent: i = !1,
|
|
2622
2628
|
footerContent: u,
|
|
2623
2629
|
headerContent: l,
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
stickyFooter: _,
|
|
2630
|
+
onBackButtonClick: d,
|
|
2631
|
+
onSwipeStart: p,
|
|
2632
|
+
onSwipeMove: v,
|
|
2633
|
+
onSwipeCancel: m,
|
|
2634
|
+
onSwipeEnd: _,
|
|
2635
|
+
title: h,
|
|
2636
|
+
stickyFooter: g,
|
|
2632
2637
|
position: b = "right",
|
|
2633
|
-
...
|
|
2634
|
-
},
|
|
2635
|
-
const C = J([
|
|
2638
|
+
...w
|
|
2639
|
+
}, E) => {
|
|
2640
|
+
const y = !!(t && r && d), C = J([
|
|
2636
2641
|
n,
|
|
2637
|
-
|
|
2642
|
+
O,
|
|
2638
2643
|
{
|
|
2639
|
-
[`${
|
|
2640
|
-
[`${
|
|
2641
|
-
[`${
|
|
2642
|
-
[`${
|
|
2644
|
+
[`${O}--fit-to-content`]: i,
|
|
2645
|
+
[`${O}--sticky-footer`]: g,
|
|
2646
|
+
[`${O}--left`]: b === "left",
|
|
2647
|
+
[`${O}--right`]: b === "right",
|
|
2648
|
+
[`${O}--without-back-button`]: !y,
|
|
2649
|
+
[`${O}--with-back-button`]: y
|
|
2643
2650
|
}
|
|
2644
2651
|
]);
|
|
2645
|
-
return /* @__PURE__ */ D(
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
/* @__PURE__ */ f(
|
|
2664
|
-
ee,
|
|
2652
|
+
return /* @__PURE__ */ D("div", { className: C, "data-testid": e, ref: E, ...w, children: [
|
|
2653
|
+
/* @__PURE__ */ f(
|
|
2654
|
+
ur,
|
|
2655
|
+
{
|
|
2656
|
+
onSwipeStart: p,
|
|
2657
|
+
onSwipeMove: v,
|
|
2658
|
+
onSwipeCancel: m,
|
|
2659
|
+
onSwipeEnd: _
|
|
2660
|
+
}
|
|
2661
|
+
),
|
|
2662
|
+
/* @__PURE__ */ f(
|
|
2663
|
+
ee,
|
|
2664
|
+
{
|
|
2665
|
+
className: J(`${O}__header`),
|
|
2666
|
+
variant: "header",
|
|
2667
|
+
stickyFooter: g,
|
|
2668
|
+
children: /* @__PURE__ */ f(
|
|
2669
|
+
vr,
|
|
2665
2670
|
{
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
headerContent: l,
|
|
2674
|
-
backButtonOnlyIcon: o,
|
|
2675
|
-
backButton: r,
|
|
2676
|
-
backButtonText: t,
|
|
2677
|
-
closeButtonAriaLabel: s,
|
|
2678
|
-
onBackButtonClick: p
|
|
2679
|
-
}
|
|
2680
|
-
)
|
|
2671
|
+
title: h,
|
|
2672
|
+
headerContent: l,
|
|
2673
|
+
backButtonOnlyIcon: o,
|
|
2674
|
+
backButton: t,
|
|
2675
|
+
backButtonText: r,
|
|
2676
|
+
closeButtonAriaLabel: s,
|
|
2677
|
+
onBackButtonClick: d
|
|
2681
2678
|
}
|
|
2682
|
-
)
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
)
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2679
|
+
)
|
|
2680
|
+
}
|
|
2681
|
+
),
|
|
2682
|
+
g ? /* @__PURE__ */ D(re, { children: [
|
|
2683
|
+
/* @__PURE__ */ f(
|
|
2684
|
+
He,
|
|
2685
|
+
{
|
|
2686
|
+
className: J(`${O}__body`),
|
|
2687
|
+
"data-testid": `${e}-sticky-footer-scroll-area`,
|
|
2688
|
+
fitToContent: i,
|
|
2689
|
+
children: /* @__PURE__ */ f(ee, { stickyFooter: !0, children: a })
|
|
2690
|
+
}
|
|
2691
|
+
),
|
|
2692
|
+
u && /* @__PURE__ */ f(
|
|
2693
|
+
ee,
|
|
2694
|
+
{
|
|
2695
|
+
className: J(`${O}__footer`),
|
|
2696
|
+
"data-testid": `${e}-sticky-footer`,
|
|
2697
|
+
variant: "footer",
|
|
2698
|
+
stickyFooter: g,
|
|
2699
|
+
children: u
|
|
2700
|
+
}
|
|
2701
|
+
)
|
|
2702
|
+
] }) : /* @__PURE__ */ f(
|
|
2703
|
+
He,
|
|
2704
|
+
{
|
|
2705
|
+
className: J(`${O}__body`),
|
|
2706
|
+
"data-testid": `${e}-scroll-area`,
|
|
2707
|
+
fitToContent: i,
|
|
2708
|
+
children: /* @__PURE__ */ D(
|
|
2709
|
+
"div",
|
|
2705
2710
|
{
|
|
2706
|
-
className: J(
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
{
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
u
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
stickyFooter: _,
|
|
2723
|
-
variant: "footer",
|
|
2724
|
-
children: u
|
|
2725
|
-
}
|
|
2726
|
-
)
|
|
2727
|
-
]
|
|
2728
|
-
}
|
|
2729
|
-
)
|
|
2711
|
+
className: J([
|
|
2712
|
+
`${O}__content-container`,
|
|
2713
|
+
{ [`${O}__content-container--no-footer`]: !u }
|
|
2714
|
+
]),
|
|
2715
|
+
children: [
|
|
2716
|
+
/* @__PURE__ */ f(ee, { stickyFooter: g, children: a }),
|
|
2717
|
+
u && /* @__PURE__ */ f(
|
|
2718
|
+
ee,
|
|
2719
|
+
{
|
|
2720
|
+
"data-testid": `${e}-footer`,
|
|
2721
|
+
stickyFooter: g,
|
|
2722
|
+
variant: "footer",
|
|
2723
|
+
children: u
|
|
2724
|
+
}
|
|
2725
|
+
)
|
|
2726
|
+
]
|
|
2730
2727
|
}
|
|
2731
2728
|
)
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
);
|
|
2729
|
+
}
|
|
2730
|
+
)
|
|
2731
|
+
] });
|
|
2735
2732
|
}
|
|
2736
2733
|
);
|
|
2737
|
-
|
|
2738
|
-
const
|
|
2739
|
-
onAnimationEnd: (i) => {
|
|
2740
|
-
i.currentTarget.getAttribute("data-swipe") === "end" && r(!1);
|
|
2741
|
-
},
|
|
2734
|
+
Rr.displayName = "DrawerFrame";
|
|
2735
|
+
const Za = (e, t) => ({
|
|
2742
2736
|
onSwipeStart: () => {
|
|
2743
2737
|
e.current && e.current.setAttribute("data-swipe", "start");
|
|
2744
2738
|
},
|
|
2745
|
-
onSwipeMove: (
|
|
2739
|
+
onSwipeMove: (s) => {
|
|
2746
2740
|
if (!e.current)
|
|
2747
2741
|
return;
|
|
2748
|
-
const { y:
|
|
2749
|
-
e.current.setAttribute("data-swipe", "move"), e.current.style.setProperty("--purpur-drawer-swipe-move-y", `${
|
|
2742
|
+
const { y: i } = s.delta;
|
|
2743
|
+
e.current.setAttribute("data-swipe", "move"), e.current.style.setProperty("--purpur-drawer-swipe-move-y", `${i}px`);
|
|
2750
2744
|
},
|
|
2751
2745
|
onSwipeCancel: () => {
|
|
2752
2746
|
e.current && (e.current.setAttribute("data-swipe", "cancel"), e.current.style.removeProperty("--purpur-drawer-swipe-move-y"), e.current.style.removeProperty("--purpur-drawer-swipe-end-y"));
|
|
2753
2747
|
},
|
|
2754
|
-
onSwipeEnd: (
|
|
2748
|
+
onSwipeEnd: (s) => {
|
|
2755
2749
|
if (!e.current)
|
|
2756
2750
|
return;
|
|
2757
|
-
const { y:
|
|
2758
|
-
e.current.setAttribute("data-swipe", "end"), e.current.style.removeProperty("--purpur-drawer-swipe-move-y"), e.current.style.setProperty("--purpur-drawer-swipe-end-y", `${
|
|
2751
|
+
const { y: i } = s.delta;
|
|
2752
|
+
e.current.setAttribute("data-swipe", "end"), e.current.style.removeProperty("--purpur-drawer-swipe-move-y"), e.current.style.setProperty("--purpur-drawer-swipe-end-y", `${i}px`), t == null || t(!1);
|
|
2759
2753
|
}
|
|
2760
|
-
}),
|
|
2754
|
+
}), ce = ae.bind(Lo), Y = "purpur-drawer-content", Nr = H(
|
|
2761
2755
|
({
|
|
2762
2756
|
["data-testid"]: e = "purpur-drawer-content",
|
|
2763
|
-
backButton:
|
|
2764
|
-
backButtonText:
|
|
2757
|
+
backButton: t = !1,
|
|
2758
|
+
backButtonText: r,
|
|
2765
2759
|
backButtonOnlyIcon: o = !1,
|
|
2766
2760
|
bodyText: a,
|
|
2767
2761
|
children: n,
|
|
@@ -2771,72 +2765,76 @@ const qa = (e, r) => ({
|
|
|
2771
2765
|
fitToContent: l = !1,
|
|
2772
2766
|
footerContent: d,
|
|
2773
2767
|
headerContent: p,
|
|
2774
|
-
onBackButtonClick:
|
|
2768
|
+
onBackButtonClick: v,
|
|
2775
2769
|
stickyFooter: m = !1,
|
|
2776
|
-
title:
|
|
2777
|
-
zIndex:
|
|
2770
|
+
title: _,
|
|
2771
|
+
zIndex: h,
|
|
2778
2772
|
position: g = "right",
|
|
2779
|
-
...
|
|
2780
|
-
},
|
|
2781
|
-
const E =
|
|
2773
|
+
...b
|
|
2774
|
+
}, w) => {
|
|
2775
|
+
const E = ce([
|
|
2782
2776
|
s,
|
|
2783
|
-
|
|
2784
|
-
{ [`${
|
|
2785
|
-
{ [`${
|
|
2786
|
-
{ [`${
|
|
2787
|
-
]), y =
|
|
2788
|
-
|
|
2789
|
-
},
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2777
|
+
Y,
|
|
2778
|
+
{ [`${Y}--fit-to-content`]: l },
|
|
2779
|
+
{ [`${Y}--left`]: g === "left" },
|
|
2780
|
+
{ [`${Y}--right`]: g === "right" }
|
|
2781
|
+
]), y = et(null), C = et(null), x = (F) => {
|
|
2782
|
+
C.current = F, typeof w == "function" ? w(F) : w && (w.current = F);
|
|
2783
|
+
}, S = Lr(lr), { onSwipeStart: N, onSwipeMove: P, onSwipeCancel: R, onSwipeEnd: j } = Za(
|
|
2784
|
+
C,
|
|
2785
|
+
S
|
|
2786
|
+
), Qe = (F) => {
|
|
2787
|
+
u && F.preventDefault();
|
|
2788
|
+
}, Dr = () => {
|
|
2789
|
+
const F = y.current;
|
|
2790
|
+
if (F) {
|
|
2791
|
+
const Je = F.querySelector("h2");
|
|
2793
2792
|
Je && setTimeout(() => {
|
|
2794
2793
|
Je.focus();
|
|
2795
2794
|
});
|
|
2796
2795
|
}
|
|
2797
2796
|
};
|
|
2798
|
-
return /* @__PURE__ */ f(
|
|
2799
|
-
|
|
2797
|
+
return /* @__PURE__ */ f(go, { children: /* @__PURE__ */ f(
|
|
2798
|
+
_o,
|
|
2800
2799
|
{
|
|
2801
|
-
className:
|
|
2802
|
-
style:
|
|
2800
|
+
className: ce("purpur-drawer-overlay"),
|
|
2801
|
+
style: h ? { zIndex: h } : void 0,
|
|
2803
2802
|
"data-testid": `${e}-overlay`,
|
|
2804
2803
|
children: /* @__PURE__ */ f(
|
|
2805
|
-
|
|
2804
|
+
bo,
|
|
2806
2805
|
{
|
|
2807
|
-
onPointerDownOutside:
|
|
2808
|
-
onOpenAutoFocus:
|
|
2806
|
+
onPointerDownOutside: Qe,
|
|
2807
|
+
onOpenAutoFocus: Dr,
|
|
2809
2808
|
className: E,
|
|
2810
2809
|
"data-testid": e,
|
|
2811
|
-
ref:
|
|
2810
|
+
ref: x,
|
|
2812
2811
|
...!a && { "aria-describedby": void 0 },
|
|
2813
|
-
...
|
|
2812
|
+
...b,
|
|
2814
2813
|
children: /* @__PURE__ */ f(
|
|
2815
|
-
|
|
2814
|
+
Rr,
|
|
2816
2815
|
{
|
|
2817
|
-
backButton:
|
|
2818
|
-
backButtonText:
|
|
2816
|
+
backButton: t,
|
|
2817
|
+
backButtonText: r,
|
|
2819
2818
|
backButtonOnlyIcon: o,
|
|
2820
2819
|
closeButtonAriaLabel: i,
|
|
2821
|
-
className:
|
|
2820
|
+
className: ce(`${Y}__drawer-frame`),
|
|
2822
2821
|
fitToContent: l,
|
|
2823
2822
|
footerContent: d,
|
|
2824
2823
|
headerContent: p,
|
|
2825
2824
|
ref: y,
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
onSwipeEnd: R,
|
|
2825
|
+
onBackButtonClick: v,
|
|
2826
|
+
onSwipeStart: N,
|
|
2827
|
+
onSwipeMove: P,
|
|
2828
|
+
onSwipeCancel: R,
|
|
2829
|
+
onSwipeEnd: j,
|
|
2832
2830
|
stickyFooter: m,
|
|
2833
|
-
title:
|
|
2831
|
+
title: _,
|
|
2834
2832
|
position: g,
|
|
2835
|
-
children: a ? /* @__PURE__ */ D("div", { className:
|
|
2833
|
+
children: a ? /* @__PURE__ */ D("div", { className: ce(`${Y}__content-container`), children: [
|
|
2836
2834
|
/* @__PURE__ */ f(
|
|
2837
2835
|
wo,
|
|
2838
2836
|
{
|
|
2839
|
-
className:
|
|
2837
|
+
className: ce(`${Y}__description`),
|
|
2840
2838
|
"data-testid": `${e}-description`,
|
|
2841
2839
|
children: a
|
|
2842
2840
|
}
|
|
@@ -2851,28 +2849,28 @@ const qa = (e, r) => ({
|
|
|
2851
2849
|
) });
|
|
2852
2850
|
}
|
|
2853
2851
|
);
|
|
2854
|
-
|
|
2855
|
-
const
|
|
2856
|
-
({ ["data-testid"]: e = "purpur-drawer-trigger", children:
|
|
2852
|
+
Nr.displayName = "DrawerContent";
|
|
2853
|
+
const Ar = H(
|
|
2854
|
+
({ ["data-testid"]: e = "purpur-drawer-trigger", children: t, ...r }, o) => /* @__PURE__ */ f(mo, { asChild: !0, "data-testid": e, ref: o, ...r, children: t })
|
|
2857
2855
|
);
|
|
2858
|
-
|
|
2859
|
-
const
|
|
2856
|
+
Ar.displayName = "DrawerTrigger";
|
|
2857
|
+
const Ze = ({
|
|
2860
2858
|
["data-testid"]: e = "purpur-drawer",
|
|
2861
|
-
children:
|
|
2862
|
-
className:
|
|
2859
|
+
children: t,
|
|
2860
|
+
className: r,
|
|
2863
2861
|
onOpenChange: o,
|
|
2864
2862
|
open: a = !1,
|
|
2865
2863
|
...n
|
|
2866
2864
|
}) => {
|
|
2867
|
-
const [s, i] = ke.useState(a), u =
|
|
2868
|
-
i(
|
|
2865
|
+
const [s, i] = ke.useState(a), u = (l) => {
|
|
2866
|
+
i(l), o == null || o(l);
|
|
2869
2867
|
};
|
|
2870
|
-
return
|
|
2868
|
+
return $r(() => {
|
|
2871
2869
|
i(a);
|
|
2872
|
-
}, [a]), /* @__PURE__ */ f(
|
|
2870
|
+
}, [a]), /* @__PURE__ */ f(lr.Provider, { value: u, children: /* @__PURE__ */ f("div", { className: r, "data-testid": e, ...n, children: /* @__PURE__ */ f(ho, { open: s, onOpenChange: u, children: t }) }) });
|
|
2873
2871
|
};
|
|
2874
|
-
Ze.Trigger =
|
|
2875
|
-
Ze.Content =
|
|
2872
|
+
Ze.Trigger = Ar;
|
|
2873
|
+
Ze.Content = Nr;
|
|
2876
2874
|
Ze.displayName = "Drawer";
|
|
2877
2875
|
export {
|
|
2878
2876
|
Ze as Drawer
|