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