@adgytec/adgytec-web-ui-components 2.1.4 → 2.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/Input2 +94 -94
- package/dist/chunks/Input2.map +1 -1
- package/dist/chunks/useGlobalListeners +294 -0
- package/dist/chunks/useGlobalListeners.map +1 -0
- package/dist/chunks/useHover +86 -86
- package/dist/chunks/usePress +282 -568
- package/dist/chunks/usePress.map +1 -1
- package/dist/components/Input/TextArea/index.js +1 -1
- package/dist/components/Input/TextArea/index.js.map +1 -1
- package/package.json +1 -1
package/dist/chunks/usePress
CHANGED
|
@@ -1,440 +1,154 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { _ as e, a as t, f as n, g as r, h as i, i as a, l as o, n as s, o as c, p as l, r as ee, s as te, t as ne, u, v as re } from "./useGlobalListeners";
|
|
2
|
+
import d from "clsx";
|
|
3
|
+
import f, { useCallback as p, useContext as m, useEffect as h, useMemo as ie, useRef as g, useState as ae } from "react";
|
|
4
|
+
import { flushSync as oe } from "react-dom";
|
|
4
5
|
//#region node_modules/react-aria/dist/private/utils/chain.mjs
|
|
5
|
-
function
|
|
6
|
+
function _(...e) {
|
|
6
7
|
return (...t) => {
|
|
7
8
|
for (let n of e) typeof n == "function" && n(...t);
|
|
8
9
|
};
|
|
9
10
|
}
|
|
10
11
|
//#endregion
|
|
11
|
-
//#region node_modules/react-aria/dist/private/utils/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
else {
|
|
15
|
-
let t = p(e);
|
|
16
|
-
e.focus(), m(t);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
var d = null;
|
|
20
|
-
function f() {
|
|
21
|
-
if (d == null) {
|
|
22
|
-
d = !1;
|
|
23
|
-
try {
|
|
24
|
-
document.createElement("div").focus({ get preventScroll() {
|
|
25
|
-
return d = !0, !0;
|
|
26
|
-
} });
|
|
27
|
-
} catch {}
|
|
28
|
-
}
|
|
29
|
-
return d;
|
|
30
|
-
}
|
|
31
|
-
function p(e) {
|
|
32
|
-
let t = e.parentNode, n = [], r = document.scrollingElement || document.documentElement;
|
|
33
|
-
for (; t instanceof HTMLElement && t !== r;) (t.offsetHeight < t.scrollHeight || t.offsetWidth < t.scrollWidth) && n.push({
|
|
34
|
-
element: t,
|
|
35
|
-
scrollTop: t.scrollTop,
|
|
36
|
-
scrollLeft: t.scrollLeft
|
|
37
|
-
}), t = t.parentNode;
|
|
38
|
-
return r instanceof HTMLElement && n.push({
|
|
39
|
-
element: r,
|
|
40
|
-
scrollTop: r.scrollTop,
|
|
41
|
-
scrollLeft: r.scrollLeft
|
|
42
|
-
}), n;
|
|
43
|
-
}
|
|
44
|
-
function m(e) {
|
|
45
|
-
for (let { element: t, scrollTop: n, scrollLeft: r } of e) t.scrollTop = n, t.scrollLeft = r;
|
|
46
|
-
}
|
|
47
|
-
//#endregion
|
|
48
|
-
//#region node_modules/react-aria/dist/private/utils/domHelpers.mjs
|
|
49
|
-
var h = (e) => e?.ownerDocument ?? document, g = (e) => e && "window" in e && e.window === e ? e : h(e).defaultView || window;
|
|
50
|
-
function _(e) {
|
|
51
|
-
return typeof e == "object" && !!e && "nodeType" in e && typeof e.nodeType == "number";
|
|
52
|
-
}
|
|
53
|
-
function ee(e) {
|
|
54
|
-
return _(e) && e.nodeType === Node.DOCUMENT_FRAGMENT_NODE && "host" in e;
|
|
55
|
-
}
|
|
56
|
-
//#endregion
|
|
57
|
-
//#region node_modules/react-stately/dist/private/flags/flags.mjs
|
|
58
|
-
var v = !1;
|
|
59
|
-
function y() {
|
|
60
|
-
return v;
|
|
61
|
-
}
|
|
62
|
-
//#endregion
|
|
63
|
-
//#region node_modules/react-aria/dist/private/utils/shadowdom/DOMFunctions.mjs
|
|
64
|
-
function b(e, t) {
|
|
65
|
-
if (!y()) return t && e ? e.contains(t) : !1;
|
|
66
|
-
if (!e || !t) return !1;
|
|
67
|
-
let n = t;
|
|
68
|
-
for (; n !== null;) {
|
|
69
|
-
if (n === e) return !0;
|
|
70
|
-
n = n.tagName === "SLOT" && n.assignedSlot ? n.assignedSlot.parentNode : ee(n) ? n.host : n.parentNode;
|
|
71
|
-
}
|
|
72
|
-
return !1;
|
|
73
|
-
}
|
|
74
|
-
var x = (e = document) => {
|
|
75
|
-
if (!y()) return e.activeElement;
|
|
76
|
-
let t = e.activeElement;
|
|
77
|
-
for (; t && "shadowRoot" in t && t.shadowRoot?.activeElement;) t = t.shadowRoot.activeElement;
|
|
78
|
-
return t;
|
|
79
|
-
};
|
|
80
|
-
function S(e) {
|
|
81
|
-
if (y() && e.target instanceof Element && e.target.shadowRoot) {
|
|
82
|
-
if ("composedPath" in e) return e.composedPath()[0] ?? null;
|
|
83
|
-
if ("composedPath" in e.nativeEvent) return e.nativeEvent.composedPath()[0] ?? null;
|
|
84
|
-
}
|
|
85
|
-
return e.target;
|
|
86
|
-
}
|
|
87
|
-
//#endregion
|
|
88
|
-
//#region node_modules/react-aria/dist/private/utils/isElementVisible.mjs
|
|
89
|
-
var C = typeof Element < "u" && "checkVisibility" in Element.prototype;
|
|
90
|
-
function te(e) {
|
|
91
|
-
let t = g(e);
|
|
92
|
-
if (!(e instanceof t.HTMLElement) && !(e instanceof t.SVGElement)) return !1;
|
|
93
|
-
let { display: n, visibility: r } = e.style, i = n !== "none" && r !== "hidden" && r !== "collapse";
|
|
94
|
-
if (i) {
|
|
95
|
-
let { getComputedStyle: t } = e.ownerDocument.defaultView, { display: n, visibility: r } = t(e);
|
|
96
|
-
i = n !== "none" && r !== "hidden" && r !== "collapse";
|
|
97
|
-
}
|
|
98
|
-
return i;
|
|
99
|
-
}
|
|
100
|
-
function ne(e, t) {
|
|
101
|
-
return !e.hasAttribute("hidden") && !e.hasAttribute("data-react-aria-prevent-focus") && (e.nodeName === "DETAILS" && t && t.nodeName !== "SUMMARY" ? e.hasAttribute("open") : !0);
|
|
102
|
-
}
|
|
103
|
-
function w(e, t) {
|
|
104
|
-
return C ? e.checkVisibility({ visibilityProperty: !0 }) && !e.closest("[data-react-aria-prevent-focus]") : e.nodeName !== "#comment" && te(e) && ne(e, t) && (!e.parentElement || w(e.parentElement, e));
|
|
105
|
-
}
|
|
106
|
-
//#endregion
|
|
107
|
-
//#region node_modules/react-aria/dist/private/utils/isFocusable.mjs
|
|
108
|
-
var T = [
|
|
109
|
-
"input:not([disabled]):not([type=hidden])",
|
|
110
|
-
"select:not([disabled])",
|
|
111
|
-
"textarea:not([disabled])",
|
|
112
|
-
"button:not([disabled])",
|
|
113
|
-
"a[href]",
|
|
114
|
-
"area[href]",
|
|
115
|
-
"summary",
|
|
116
|
-
"iframe",
|
|
117
|
-
"object",
|
|
118
|
-
"embed",
|
|
119
|
-
"audio[controls]",
|
|
120
|
-
"video[controls]",
|
|
121
|
-
"[contenteditable]:not([contenteditable^=\"false\"])",
|
|
122
|
-
"permission"
|
|
123
|
-
], E = T.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
|
|
124
|
-
T.push("[tabindex]:not([tabindex=\"-1\"]):not([disabled])"), T.join(":not([hidden]):not([tabindex=\"-1\"]),");
|
|
125
|
-
function D(e, t) {
|
|
126
|
-
return e.matches(E) && !O(e) && (t?.skipVisibilityCheck || w(e));
|
|
127
|
-
}
|
|
128
|
-
function O(e) {
|
|
129
|
-
let t = e;
|
|
130
|
-
for (; t != null;) {
|
|
131
|
-
if (t instanceof t.ownerDocument.defaultView.HTMLElement && t.inert) return !0;
|
|
132
|
-
t = t.parentElement;
|
|
133
|
-
}
|
|
134
|
-
return !1;
|
|
135
|
-
}
|
|
136
|
-
//#endregion
|
|
137
|
-
//#region node_modules/react-aria/dist/private/utils/useLayoutEffect.mjs
|
|
138
|
-
var k = typeof document < "u" ? t.useLayoutEffect : () => {};
|
|
139
|
-
//#endregion
|
|
140
|
-
//#region node_modules/react-aria/dist/private/interactions/utils.mjs
|
|
141
|
-
function A(e) {
|
|
142
|
-
let t = e;
|
|
143
|
-
return t.nativeEvent = e, t.isDefaultPrevented = () => t.defaultPrevented, t.isPropagationStopped = () => t.cancelBubble, t.persist = () => {}, t;
|
|
144
|
-
}
|
|
145
|
-
function re(e, t) {
|
|
146
|
-
Object.defineProperty(e, "target", { value: t }), Object.defineProperty(e, "currentTarget", { value: t });
|
|
147
|
-
}
|
|
148
|
-
function j(e) {
|
|
149
|
-
let t = o({
|
|
150
|
-
isFocused: !1,
|
|
151
|
-
observer: null
|
|
152
|
-
});
|
|
153
|
-
return k(() => {
|
|
154
|
-
let e = t.current;
|
|
155
|
-
return () => {
|
|
156
|
-
e.observer &&= (e.observer.disconnect(), null);
|
|
157
|
-
};
|
|
158
|
-
}, []), n((n) => {
|
|
159
|
-
let r = S(n);
|
|
160
|
-
if (r instanceof HTMLButtonElement || r instanceof HTMLInputElement || r instanceof HTMLTextAreaElement || r instanceof HTMLSelectElement) {
|
|
161
|
-
t.current.isFocused = !0;
|
|
162
|
-
let n = r;
|
|
163
|
-
n.addEventListener("focusout", (r) => {
|
|
164
|
-
if (t.current.isFocused = !1, n.disabled) {
|
|
165
|
-
let t = A(r);
|
|
166
|
-
e?.(t);
|
|
167
|
-
}
|
|
168
|
-
t.current.observer && (t.current.observer.disconnect(), t.current.observer = null);
|
|
169
|
-
}, { once: !0 }), t.current.observer = new MutationObserver(() => {
|
|
170
|
-
if (t.current.isFocused && n.disabled) {
|
|
171
|
-
t.current.observer?.disconnect();
|
|
172
|
-
let e = n === x() ? null : x();
|
|
173
|
-
n.dispatchEvent(new FocusEvent("blur", { relatedTarget: e })), n.dispatchEvent(new FocusEvent("focusout", {
|
|
174
|
-
bubbles: !0,
|
|
175
|
-
relatedTarget: e
|
|
176
|
-
}));
|
|
177
|
-
}
|
|
178
|
-
}), t.current.observer.observe(n, {
|
|
179
|
-
attributes: !0,
|
|
180
|
-
attributeFilter: ["disabled"]
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
}, [e]);
|
|
184
|
-
}
|
|
185
|
-
var M = !1;
|
|
186
|
-
function ie(e) {
|
|
187
|
-
for (; e && !D(e, { skipVisibilityCheck: !0 });) e = e.parentElement;
|
|
188
|
-
let t = g(e), n = t.document.activeElement;
|
|
189
|
-
if (!n || n === e) return;
|
|
190
|
-
M = !0;
|
|
191
|
-
let r = !1, i = (e) => {
|
|
192
|
-
(S(e) === n || r) && e.stopImmediatePropagation();
|
|
193
|
-
}, a = (t) => {
|
|
194
|
-
(S(t) === n || r) && (t.stopImmediatePropagation(), !e && !r && (r = !0, u(n), c()));
|
|
195
|
-
}, o = (t) => {
|
|
196
|
-
(S(t) === e || r) && t.stopImmediatePropagation();
|
|
197
|
-
}, s = (t) => {
|
|
198
|
-
(S(t) === e || r) && (t.stopImmediatePropagation(), r || (r = !0, u(n), c()));
|
|
199
|
-
};
|
|
200
|
-
t.addEventListener("blur", i, !0), t.addEventListener("focusout", a, !0), t.addEventListener("focusin", s, !0), t.addEventListener("focus", o, !0);
|
|
201
|
-
let c = () => {
|
|
202
|
-
cancelAnimationFrame(l), t.removeEventListener("blur", i, !0), t.removeEventListener("focusout", a, !0), t.removeEventListener("focusin", s, !0), t.removeEventListener("focus", o, !0), M = !1, r = !1;
|
|
203
|
-
}, l = requestAnimationFrame(c);
|
|
204
|
-
return c;
|
|
205
|
-
}
|
|
206
|
-
//#endregion
|
|
207
|
-
//#region node_modules/react-aria/dist/private/utils/platform.mjs
|
|
208
|
-
function N(e) {
|
|
209
|
-
if (typeof window > "u" || window.navigator == null) return !1;
|
|
210
|
-
let t = window.navigator.userAgentData?.brands;
|
|
211
|
-
return Array.isArray(t) && t.some((t) => e.test(t.brand)) || e.test(window.navigator.userAgent);
|
|
212
|
-
}
|
|
213
|
-
function P(e) {
|
|
214
|
-
return typeof window < "u" && window.navigator != null ? e.test(window.navigator.userAgentData?.platform || window.navigator.platform) : !1;
|
|
215
|
-
}
|
|
216
|
-
function F(e) {
|
|
217
|
-
if (process.env.NODE_ENV === "test") return e;
|
|
218
|
-
let t = null;
|
|
219
|
-
return () => (t ??= e(), t);
|
|
220
|
-
}
|
|
221
|
-
var I = F(function() {
|
|
222
|
-
return P(/^Mac/i);
|
|
223
|
-
}), L = F(function() {
|
|
224
|
-
return P(/^iPhone/i);
|
|
225
|
-
}), R = F(function() {
|
|
226
|
-
return P(/^iPad/i) || I() && navigator.maxTouchPoints > 1;
|
|
227
|
-
}), z = F(function() {
|
|
228
|
-
return L() || R();
|
|
229
|
-
});
|
|
230
|
-
F(function() {
|
|
231
|
-
return I() || z();
|
|
232
|
-
});
|
|
233
|
-
var ae = F(function() {
|
|
234
|
-
return N(/AppleWebKit/i) && !oe();
|
|
235
|
-
}), oe = F(function() {
|
|
236
|
-
return N(/Chrome/i);
|
|
237
|
-
}), se = F(function() {
|
|
238
|
-
return N(/Android/i);
|
|
239
|
-
}), ce = F(function() {
|
|
240
|
-
return N(/Firefox/i);
|
|
241
|
-
}), B = /* @__PURE__ */ new Map(), V = /* @__PURE__ */ new Set();
|
|
242
|
-
function le() {
|
|
12
|
+
//#region node_modules/react-aria/dist/private/utils/runAfterTransition.mjs
|
|
13
|
+
var v = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Set();
|
|
14
|
+
function b() {
|
|
243
15
|
if (typeof window > "u") return;
|
|
244
16
|
function e(e) {
|
|
245
17
|
return "propertyName" in e;
|
|
246
18
|
}
|
|
247
19
|
let t = (t) => {
|
|
248
|
-
let r =
|
|
20
|
+
let r = i(t);
|
|
249
21
|
if (!e(t) || !r) return;
|
|
250
|
-
let
|
|
251
|
-
|
|
22
|
+
let a = v.get(r);
|
|
23
|
+
a || (a = /* @__PURE__ */ new Set(), v.set(r, a), r.addEventListener("transitioncancel", n, { once: !0 })), a.add(t.propertyName);
|
|
252
24
|
}, n = (t) => {
|
|
253
|
-
let r =
|
|
25
|
+
let r = i(t);
|
|
254
26
|
if (!e(t) || !r) return;
|
|
255
|
-
let
|
|
256
|
-
if (
|
|
257
|
-
for (let e of
|
|
258
|
-
|
|
27
|
+
let a = v.get(r);
|
|
28
|
+
if (a && (a.delete(t.propertyName), a.size === 0 && (r.removeEventListener("transitioncancel", n), v.delete(r)), v.size === 0)) {
|
|
29
|
+
for (let e of y) e();
|
|
30
|
+
y.clear();
|
|
259
31
|
}
|
|
260
32
|
};
|
|
261
33
|
document.body.addEventListener("transitionrun", t), document.body.addEventListener("transitionend", n);
|
|
262
34
|
}
|
|
263
|
-
typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded",
|
|
264
|
-
function
|
|
265
|
-
for (let [e] of
|
|
35
|
+
typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", b) : b());
|
|
36
|
+
function x() {
|
|
37
|
+
for (let [e] of v) "isConnected" in e && !e.isConnected && v.delete(e);
|
|
266
38
|
}
|
|
267
|
-
function
|
|
39
|
+
function S(e) {
|
|
268
40
|
requestAnimationFrame(() => {
|
|
269
|
-
|
|
41
|
+
x(), v.size === 0 ? e() : y.add(e);
|
|
270
42
|
});
|
|
271
43
|
}
|
|
272
44
|
//#endregion
|
|
273
45
|
//#region node_modules/react-aria/dist/private/interactions/textSelection.mjs
|
|
274
|
-
var
|
|
275
|
-
function
|
|
276
|
-
if (
|
|
277
|
-
if (
|
|
278
|
-
let t =
|
|
279
|
-
|
|
46
|
+
var C = "default", w = "", T = /* @__PURE__ */ new WeakMap();
|
|
47
|
+
function E(e) {
|
|
48
|
+
if (c()) {
|
|
49
|
+
if (C === "default") {
|
|
50
|
+
let t = r(e);
|
|
51
|
+
w = t.documentElement.style.webkitUserSelect, t.documentElement.style.webkitUserSelect = "none";
|
|
280
52
|
}
|
|
281
|
-
|
|
53
|
+
C = "disabled";
|
|
282
54
|
} else if (e instanceof HTMLElement || e instanceof SVGElement) {
|
|
283
55
|
let t = "userSelect" in e.style ? "userSelect" : "webkitUserSelect";
|
|
284
|
-
|
|
56
|
+
T.set(e, e.style[t]), e.style[t] = "none";
|
|
285
57
|
}
|
|
286
58
|
}
|
|
287
|
-
function
|
|
288
|
-
if (
|
|
289
|
-
if (
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
if (
|
|
293
|
-
let t =
|
|
294
|
-
t.documentElement.style.webkitUserSelect === "none" && (t.documentElement.style.webkitUserSelect =
|
|
59
|
+
function D(e) {
|
|
60
|
+
if (c()) {
|
|
61
|
+
if (C !== "disabled") return;
|
|
62
|
+
C = "restoring", setTimeout(() => {
|
|
63
|
+
S(() => {
|
|
64
|
+
if (C === "restoring") {
|
|
65
|
+
let t = r(e);
|
|
66
|
+
t.documentElement.style.webkitUserSelect === "none" && (t.documentElement.style.webkitUserSelect = w || ""), w = "", C = "default";
|
|
295
67
|
}
|
|
296
68
|
});
|
|
297
69
|
}, 300);
|
|
298
|
-
} else if ((e instanceof HTMLElement || e instanceof SVGElement) && e &&
|
|
299
|
-
let t =
|
|
300
|
-
e.style[n] === "none" && (e.style[n] = t), e.getAttribute("style") === "" && e.removeAttribute("style"),
|
|
70
|
+
} else if ((e instanceof HTMLElement || e instanceof SVGElement) && e && T.has(e)) {
|
|
71
|
+
let t = T.get(e), n = "userSelect" in e.style ? "userSelect" : "webkitUserSelect";
|
|
72
|
+
e.style[n] === "none" && (e.style[n] = t), e.getAttribute("style") === "" && e.removeAttribute("style"), T.delete(e);
|
|
301
73
|
}
|
|
302
74
|
}
|
|
303
75
|
//#endregion
|
|
304
76
|
//#region node_modules/react-aria/dist/private/utils/getNonce.mjs
|
|
305
|
-
function
|
|
77
|
+
function O(e) {
|
|
306
78
|
return e?.defaultView?.__webpack_nonce__ || globalThis.__webpack_nonce__ || void 0;
|
|
307
79
|
}
|
|
308
|
-
var
|
|
309
|
-
function
|
|
310
|
-
let
|
|
311
|
-
if (!
|
|
312
|
-
if (
|
|
313
|
-
let
|
|
314
|
-
return
|
|
315
|
-
}
|
|
316
|
-
//#endregion
|
|
317
|
-
//#region node_modules/react-aria/dist/private/utils/isVirtualEvent.mjs
|
|
318
|
-
function q(e) {
|
|
319
|
-
return e.pointerType === "" && e.isTrusted ? !0 : se() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
|
|
320
|
-
}
|
|
321
|
-
function he(e) {
|
|
322
|
-
return !se() && e.width === 0 && e.height === 0 || e.width === 1 && e.height === 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "mouse";
|
|
80
|
+
var k = /* @__PURE__ */ new WeakMap();
|
|
81
|
+
function se(t) {
|
|
82
|
+
let n = t ?? (typeof document < "u" ? document : void 0);
|
|
83
|
+
if (!n) return O(n);
|
|
84
|
+
if (k.has(n)) return k.get(n);
|
|
85
|
+
let r = n.querySelector("meta[property=\"csp-nonce\"]"), i = r && r instanceof e(r).HTMLMetaElement && (r.nonce || r.content) || O(n) || void 0;
|
|
86
|
+
return i !== void 0 && k.set(n, i), i;
|
|
323
87
|
}
|
|
324
88
|
typeof window < "u" && window.document && window.document.createElement;
|
|
325
|
-
var
|
|
89
|
+
var A = /* @__PURE__ */ new Map();
|
|
326
90
|
typeof FinalizationRegistry < "u" && new FinalizationRegistry((e) => {
|
|
327
|
-
|
|
91
|
+
A.delete(e);
|
|
328
92
|
});
|
|
329
|
-
function
|
|
93
|
+
function j(e, t) {
|
|
330
94
|
if (e === t) return e;
|
|
331
|
-
let n =
|
|
95
|
+
let n = A.get(e);
|
|
332
96
|
if (n) return n.forEach((e) => e.current = t), t;
|
|
333
|
-
let r =
|
|
97
|
+
let r = A.get(t);
|
|
334
98
|
return r ? (r.forEach((t) => t.current = e), e) : t;
|
|
335
99
|
}
|
|
336
100
|
//#endregion
|
|
337
101
|
//#region node_modules/react-aria/dist/private/utils/mergeRefs.mjs
|
|
338
|
-
function
|
|
102
|
+
function M(...e) {
|
|
339
103
|
return e.length === 1 && e[0] ? e[0] : (t) => {
|
|
340
104
|
let n = !1, r = e.map((e) => {
|
|
341
|
-
let r =
|
|
105
|
+
let r = N(e, t);
|
|
342
106
|
return n ||= typeof r == "function", r;
|
|
343
107
|
});
|
|
344
108
|
if (n) return () => {
|
|
345
109
|
r.forEach((t, n) => {
|
|
346
|
-
typeof t == "function" ? t() :
|
|
110
|
+
typeof t == "function" ? t() : N(e[n], null);
|
|
347
111
|
});
|
|
348
112
|
};
|
|
349
113
|
};
|
|
350
114
|
}
|
|
351
|
-
function
|
|
115
|
+
function N(e, t) {
|
|
352
116
|
if (typeof e == "function") return e(t);
|
|
353
117
|
e != null && (e.current = t);
|
|
354
118
|
}
|
|
355
119
|
//#endregion
|
|
356
120
|
//#region node_modules/react-aria/dist/private/utils/mergeProps.mjs
|
|
357
|
-
function
|
|
358
|
-
let
|
|
359
|
-
for (let
|
|
360
|
-
let
|
|
361
|
-
for (let
|
|
362
|
-
let
|
|
363
|
-
typeof
|
|
121
|
+
function P(...e) {
|
|
122
|
+
let t = { ...e[0] };
|
|
123
|
+
for (let n = 1; n < e.length; n++) {
|
|
124
|
+
let r = e[n];
|
|
125
|
+
for (let e in r) {
|
|
126
|
+
let n = t[e], i = r[e];
|
|
127
|
+
typeof n == "function" && typeof i == "function" && e[0] === "o" && e[1] === "n" && e.charCodeAt(2) >= 65 && e.charCodeAt(2) <= 90 ? t[e] = _(n, i) : (e === "className" || e === "UNSAFE_className") && typeof n == "string" && typeof i == "string" ? t[e] = d(n, i) : e === "id" && n && i ? t.id = j(n, i) : e === "ref" && n && i ? t.ref = M(n, i) : t[e] = i === void 0 ? n : i;
|
|
364
128
|
}
|
|
365
129
|
}
|
|
366
|
-
return
|
|
367
|
-
}
|
|
368
|
-
//#endregion
|
|
369
|
-
//#region node_modules/react-aria/dist/private/utils/openLink.mjs
|
|
370
|
-
function Y(e, t, n = !0) {
|
|
371
|
-
let { metaKey: r, ctrlKey: i, altKey: a, shiftKey: o } = t;
|
|
372
|
-
ce() && window.event?.type?.startsWith("key") && e.target === "_blank" && (I() ? r = !0 : i = !0);
|
|
373
|
-
let s = ae() && I() && !R() && process.env.NODE_ENV !== "test" ? new KeyboardEvent("keydown", {
|
|
374
|
-
keyIdentifier: "Enter",
|
|
375
|
-
metaKey: r,
|
|
376
|
-
ctrlKey: i,
|
|
377
|
-
altKey: a,
|
|
378
|
-
shiftKey: o
|
|
379
|
-
}) : new MouseEvent("click", {
|
|
380
|
-
metaKey: r,
|
|
381
|
-
ctrlKey: i,
|
|
382
|
-
altKey: a,
|
|
383
|
-
shiftKey: o,
|
|
384
|
-
detail: 1,
|
|
385
|
-
bubbles: !0,
|
|
386
|
-
cancelable: !0
|
|
387
|
-
});
|
|
388
|
-
Y.isOpening = n, u(e), e.dispatchEvent(s), Y.isOpening = !1;
|
|
130
|
+
return t;
|
|
389
131
|
}
|
|
390
|
-
Y.isOpening = !1;
|
|
391
132
|
//#endregion
|
|
392
133
|
//#region node_modules/react-aria/dist/private/interactions/context.mjs
|
|
393
|
-
var
|
|
394
|
-
|
|
134
|
+
var F = f.createContext({ register: () => {} });
|
|
135
|
+
F.displayName = "PressResponderContext";
|
|
395
136
|
//#endregion
|
|
396
137
|
//#region node_modules/react-aria/dist/private/utils/useEffectEvent.mjs
|
|
397
|
-
var
|
|
398
|
-
function
|
|
399
|
-
let t =
|
|
400
|
-
return
|
|
138
|
+
var I = f.useInsertionEffect ?? n;
|
|
139
|
+
function L(e) {
|
|
140
|
+
let t = g(null);
|
|
141
|
+
return I(() => {
|
|
401
142
|
t.current = e;
|
|
402
|
-
}, [e]),
|
|
143
|
+
}, [e]), p((...e) => {
|
|
403
144
|
let n = t.current;
|
|
404
145
|
return n?.(...e);
|
|
405
146
|
}, []);
|
|
406
147
|
}
|
|
407
148
|
//#endregion
|
|
408
|
-
//#region node_modules/react-aria/dist/private/utils/useGlobalListeners.mjs
|
|
409
|
-
function Se() {
|
|
410
|
-
let e = o(/* @__PURE__ */ new Map()), t = n((t, n, r, i) => {
|
|
411
|
-
let a = i?.once ? (...t) => {
|
|
412
|
-
e.current.delete(r), r(...t);
|
|
413
|
-
} : r;
|
|
414
|
-
e.current.set(r, {
|
|
415
|
-
type: n,
|
|
416
|
-
eventTarget: t,
|
|
417
|
-
fn: a,
|
|
418
|
-
options: i
|
|
419
|
-
}), t.addEventListener(n, a, i);
|
|
420
|
-
}, []), r = n((t, n, r, i) => {
|
|
421
|
-
let a = e.current.get(r)?.fn || r;
|
|
422
|
-
t.removeEventListener(n, a, i), e.current.delete(r);
|
|
423
|
-
}, []), a = n(() => {
|
|
424
|
-
e.current.forEach((e, t) => {
|
|
425
|
-
r(e.eventTarget, e.type, t, e.options);
|
|
426
|
-
});
|
|
427
|
-
}, [r]);
|
|
428
|
-
return i(() => a, [a]), {
|
|
429
|
-
addGlobalListener: t,
|
|
430
|
-
removeGlobalListener: r,
|
|
431
|
-
removeAllGlobalListeners: a
|
|
432
|
-
};
|
|
433
|
-
}
|
|
434
|
-
//#endregion
|
|
435
149
|
//#region node_modules/react-aria/dist/private/utils/useSyncRef.mjs
|
|
436
|
-
function
|
|
437
|
-
|
|
150
|
+
function R(e, t) {
|
|
151
|
+
n(() => {
|
|
438
152
|
if (e && e.ref && t) return e.ref.current = t.current, () => {
|
|
439
153
|
e.ref && (e.ref.current = null);
|
|
440
154
|
};
|
|
@@ -442,15 +156,15 @@ function Ce(e, t) {
|
|
|
442
156
|
}
|
|
443
157
|
//#endregion
|
|
444
158
|
//#region node_modules/react-aria/dist/private/interactions/usePress.mjs
|
|
445
|
-
function
|
|
446
|
-
let t =
|
|
159
|
+
function ce(e) {
|
|
160
|
+
let t = m(F);
|
|
447
161
|
if (t) {
|
|
448
162
|
let { register: n, ref: r, ...i } = t;
|
|
449
|
-
e =
|
|
163
|
+
e = P(i, e), n();
|
|
450
164
|
}
|
|
451
|
-
return
|
|
165
|
+
return R(t, e.ref), e;
|
|
452
166
|
}
|
|
453
|
-
var
|
|
167
|
+
var z = class {
|
|
454
168
|
#e;
|
|
455
169
|
constructor(e, t, n, r) {
|
|
456
170
|
this.#e = !0;
|
|
@@ -463,9 +177,9 @@ var Z = class {
|
|
|
463
177
|
get shouldStopPropagation() {
|
|
464
178
|
return this.#e;
|
|
465
179
|
}
|
|
466
|
-
},
|
|
467
|
-
function
|
|
468
|
-
let { onPress:
|
|
180
|
+
}, B = Symbol("linkClicked"), V = "react-aria-pressable-style", H = "data-react-aria-pressable";
|
|
181
|
+
function U(n) {
|
|
182
|
+
let { onPress: c, onPressChange: d, onPressStart: f, onPressEnd: m, onPressUp: v, onClick: y, isDisabled: b, isPressed: x, preventFocusOnPress: S, shouldCancelOnPointerExit: C, allowTextSelectionOnPress: w, ref: T, ...O } = ce(n), [k, A] = ae(!1), j = g({
|
|
469
183
|
isPressed: !1,
|
|
470
184
|
ignoreEmulatedMouseEvents: !1,
|
|
471
185
|
didFirePressStart: !1,
|
|
@@ -475,269 +189,269 @@ function Oe(e) {
|
|
|
475
189
|
isOverTarget: !1,
|
|
476
190
|
pointerType: null,
|
|
477
191
|
disposables: []
|
|
478
|
-
}), { addGlobalListener:
|
|
479
|
-
let n =
|
|
480
|
-
if (
|
|
481
|
-
let
|
|
482
|
-
if (n.isTriggeringEvent = !0,
|
|
483
|
-
let n = new
|
|
484
|
-
|
|
192
|
+
}), { addGlobalListener: M, removeAllGlobalListeners: N } = ne(), F = p((e, t) => {
|
|
193
|
+
let n = j.current;
|
|
194
|
+
if (b || n.didFirePressStart) return !1;
|
|
195
|
+
let r = !0;
|
|
196
|
+
if (n.isTriggeringEvent = !0, f) {
|
|
197
|
+
let n = new z("pressstart", t, e);
|
|
198
|
+
f(n), r = n.shouldStopPropagation;
|
|
485
199
|
}
|
|
486
|
-
return
|
|
200
|
+
return d && d(!0), n.isTriggeringEvent = !1, n.didFirePressStart = !0, A(!0), r;
|
|
487
201
|
}, [
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
]),
|
|
492
|
-
let
|
|
493
|
-
if (!
|
|
494
|
-
|
|
495
|
-
let
|
|
496
|
-
if (
|
|
497
|
-
let
|
|
498
|
-
|
|
202
|
+
b,
|
|
203
|
+
f,
|
|
204
|
+
d
|
|
205
|
+
]), I = p((e, t, n = !0) => {
|
|
206
|
+
let r = j.current;
|
|
207
|
+
if (!r.didFirePressStart) return !1;
|
|
208
|
+
r.didFirePressStart = !1, r.isTriggeringEvent = !0;
|
|
209
|
+
let i = !0;
|
|
210
|
+
if (m) {
|
|
211
|
+
let n = new z("pressend", t, e);
|
|
212
|
+
m(n), i = n.shouldStopPropagation;
|
|
499
213
|
}
|
|
500
|
-
if (
|
|
501
|
-
let
|
|
502
|
-
|
|
214
|
+
if (d && d(!1), A(!1), c && n && !b) {
|
|
215
|
+
let n = new z("press", t, e);
|
|
216
|
+
c(n), i &&= n.shouldStopPropagation;
|
|
503
217
|
}
|
|
504
|
-
return
|
|
218
|
+
return r.isTriggeringEvent = !1, i;
|
|
505
219
|
}, [
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
]),
|
|
511
|
-
let n =
|
|
512
|
-
if (
|
|
513
|
-
if (
|
|
220
|
+
b,
|
|
221
|
+
m,
|
|
222
|
+
d,
|
|
223
|
+
c
|
|
224
|
+
]), R = L(I), U = L(p((e, t) => {
|
|
225
|
+
let n = j.current;
|
|
226
|
+
if (b) return !1;
|
|
227
|
+
if (v) {
|
|
514
228
|
n.isTriggeringEvent = !0;
|
|
515
|
-
let r = new
|
|
516
|
-
return
|
|
229
|
+
let r = new z("pressup", t, e);
|
|
230
|
+
return v(r), n.isTriggeringEvent = !1, r.shouldStopPropagation;
|
|
517
231
|
}
|
|
518
232
|
return !0;
|
|
519
|
-
}, [
|
|
520
|
-
let t =
|
|
233
|
+
}, [b, v])), Y = p((e) => {
|
|
234
|
+
let t = j.current;
|
|
521
235
|
if (t.isPressed && t.target) {
|
|
522
|
-
t.didFirePressStart && t.pointerType != null &&
|
|
236
|
+
t.didFirePressStart && t.pointerType != null && I(J(t.target, e), t.pointerType, !1), t.isPressed = !1, t.isOverTarget = !1, t.activePointerId = null, t.pointerType = null, N(), w || D(t.target);
|
|
523
237
|
for (let e of t.disposables) e();
|
|
524
238
|
t.disposables = [];
|
|
525
239
|
}
|
|
526
240
|
}, [
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
]),
|
|
531
|
-
|
|
532
|
-
}, [
|
|
533
|
-
|
|
534
|
-
}, [
|
|
535
|
-
if (!
|
|
241
|
+
w,
|
|
242
|
+
N,
|
|
243
|
+
I
|
|
244
|
+
]), X = L(Y), Z = p((e) => {
|
|
245
|
+
C && Y(e);
|
|
246
|
+
}, [C, Y]), Q = p((e) => {
|
|
247
|
+
b || y?.(e);
|
|
248
|
+
}, [b, y]), $ = p((e, t) => {
|
|
249
|
+
if (!b && y) {
|
|
536
250
|
let n = new MouseEvent("click", e);
|
|
537
|
-
|
|
251
|
+
o(n, t), y(te(n));
|
|
538
252
|
}
|
|
539
|
-
}, [
|
|
540
|
-
let
|
|
541
|
-
onKeyDown(
|
|
542
|
-
if (
|
|
543
|
-
|
|
544
|
-
let
|
|
545
|
-
!
|
|
546
|
-
let
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
},
|
|
550
|
-
} else
|
|
253
|
+
}, [b, y]), fe = ie(() => {
|
|
254
|
+
let n = j.current, o = {
|
|
255
|
+
onKeyDown(e) {
|
|
256
|
+
if (G(e.nativeEvent, e.currentTarget) && l(e.currentTarget, i(e))) {
|
|
257
|
+
de(i(e), e.key) && e.preventDefault();
|
|
258
|
+
let a = !0;
|
|
259
|
+
!n.isPressed && !e.repeat && (n.target = e.currentTarget, n.isPressed = !0, n.pointerType = "keyboard", a = F(e, "keyboard"));
|
|
260
|
+
let o = e.currentTarget;
|
|
261
|
+
M(r(e.currentTarget), "keyup", _((e) => {
|
|
262
|
+
G(e, o) && !e.repeat && l(o, i(e)) && n.target && U(J(n.target, e), "keyboard");
|
|
263
|
+
}, c), !0), a && e.stopPropagation(), e.metaKey && t() && n.metaKeyEvents?.set(e.key, e.nativeEvent);
|
|
264
|
+
} else e.key === "Meta" && (n.metaKeyEvents = /* @__PURE__ */ new Map());
|
|
551
265
|
},
|
|
552
|
-
onClick(
|
|
553
|
-
if (!(
|
|
554
|
-
let
|
|
555
|
-
if (
|
|
556
|
-
let
|
|
557
|
-
|
|
558
|
-
} else if (
|
|
559
|
-
let r =
|
|
560
|
-
|
|
266
|
+
onClick(e) {
|
|
267
|
+
if (!(e && !l(e.currentTarget, i(e))) && e && e.button === 0 && !n.isTriggeringEvent && !s.isOpening) {
|
|
268
|
+
let t = !0;
|
|
269
|
+
if (b && e.preventDefault(), !n.ignoreEmulatedMouseEvents && !n.isPressed && (n.pointerType === "virtual" || a(e.nativeEvent))) {
|
|
270
|
+
let n = F(e, "virtual"), r = U(e, "virtual"), i = R(e, "virtual");
|
|
271
|
+
Q(e), t = n && r && i;
|
|
272
|
+
} else if (n.isPressed && n.pointerType !== "keyboard") {
|
|
273
|
+
let r = n.pointerType || e.nativeEvent.pointerType || "virtual", i = U(J(e.currentTarget, e), r), a = R(J(e.currentTarget, e), r, !0);
|
|
274
|
+
t = i && a, n.isOverTarget = !1, Q(e), X(e);
|
|
561
275
|
}
|
|
562
|
-
|
|
276
|
+
n.ignoreEmulatedMouseEvents = !1, t && e.stopPropagation();
|
|
563
277
|
}
|
|
564
278
|
}
|
|
565
|
-
},
|
|
566
|
-
if (
|
|
567
|
-
|
|
568
|
-
let
|
|
569
|
-
|
|
570
|
-
} else if (
|
|
571
|
-
let
|
|
572
|
-
|
|
573
|
-
for (let
|
|
279
|
+
}, c = (e) => {
|
|
280
|
+
if (n.isPressed && n.target && G(e, n.target)) {
|
|
281
|
+
de(i(e), e.key) && e.preventDefault();
|
|
282
|
+
let t = i(e), r = l(n.target, t);
|
|
283
|
+
R(J(n.target, e), "keyboard", r), r && $(e, n.target), N(), e.key !== "Enter" && W(n.target) && l(n.target, t) && !e[B] && (e[B] = !0, s(n.target, e, !1)), n.isPressed = !1, n.metaKeyEvents?.delete(e.key);
|
|
284
|
+
} else if (e.key === "Meta" && n.metaKeyEvents?.size) {
|
|
285
|
+
let e = n.metaKeyEvents;
|
|
286
|
+
n.metaKeyEvents = void 0;
|
|
287
|
+
for (let t of e.values()) n.target?.dispatchEvent(new KeyboardEvent("keyup", t));
|
|
574
288
|
}
|
|
575
289
|
};
|
|
576
290
|
if (typeof PointerEvent < "u") {
|
|
577
|
-
|
|
578
|
-
if (
|
|
579
|
-
if (
|
|
580
|
-
|
|
291
|
+
o.onPointerDown = (a) => {
|
|
292
|
+
if (a.button !== 0 || !l(a.currentTarget, i(a))) return;
|
|
293
|
+
if (ee(a.nativeEvent)) {
|
|
294
|
+
n.pointerType = "virtual";
|
|
581
295
|
return;
|
|
582
296
|
}
|
|
583
|
-
|
|
584
|
-
let
|
|
585
|
-
if (!
|
|
586
|
-
|
|
587
|
-
let
|
|
588
|
-
"releasePointerCapture" in
|
|
297
|
+
n.pointerType = a.pointerType;
|
|
298
|
+
let o = !0;
|
|
299
|
+
if (!n.isPressed) {
|
|
300
|
+
n.isPressed = !0, n.isOverTarget = !0, n.activePointerId = a.pointerId, n.target = a.currentTarget, w || E(n.target), o = F(a, n.pointerType);
|
|
301
|
+
let s = i(a);
|
|
302
|
+
"releasePointerCapture" in s && ("hasPointerCapture" in s ? s.hasPointerCapture(a.pointerId) && s.releasePointerCapture(a.pointerId) : s.releasePointerCapture(a.pointerId)), M(r(a.currentTarget), "pointerup", e, !1), M(r(a.currentTarget), "pointercancel", t, !1);
|
|
589
303
|
}
|
|
590
|
-
|
|
591
|
-
},
|
|
592
|
-
if (
|
|
593
|
-
if (
|
|
594
|
-
let
|
|
595
|
-
|
|
304
|
+
o && a.stopPropagation();
|
|
305
|
+
}, o.onMouseDown = (e) => {
|
|
306
|
+
if (l(e.currentTarget, i(e)) && e.button === 0) {
|
|
307
|
+
if (S) {
|
|
308
|
+
let t = u(e.target);
|
|
309
|
+
t && n.disposables.push(t);
|
|
596
310
|
}
|
|
597
|
-
|
|
311
|
+
e.stopPropagation();
|
|
598
312
|
}
|
|
599
|
-
},
|
|
600
|
-
!
|
|
601
|
-
},
|
|
602
|
-
|
|
603
|
-
},
|
|
604
|
-
|
|
313
|
+
}, o.onPointerUp = (e) => {
|
|
314
|
+
!l(e.currentTarget, i(e)) || n.pointerType === "virtual" || e.button === 0 && !n.isPressed && U(e, n.pointerType || e.pointerType);
|
|
315
|
+
}, o.onPointerEnter = (e) => {
|
|
316
|
+
e.pointerId === n.activePointerId && n.target && !n.isOverTarget && n.pointerType != null && (n.isOverTarget = !0, F(J(n.target, e), n.pointerType));
|
|
317
|
+
}, o.onPointerLeave = (e) => {
|
|
318
|
+
e.pointerId === n.activePointerId && n.target && n.isOverTarget && n.pointerType != null && (n.isOverTarget = !1, R(J(n.target, e), n.pointerType, !1), Z(e));
|
|
605
319
|
};
|
|
606
|
-
let
|
|
607
|
-
if (
|
|
608
|
-
if (
|
|
609
|
-
let
|
|
610
|
-
|
|
320
|
+
let e = (e) => {
|
|
321
|
+
if (e.pointerId === n.activePointerId && n.isPressed && e.button === 0 && n.target) {
|
|
322
|
+
if (l(n.target, i(e)) && n.pointerType != null) {
|
|
323
|
+
let t = !1, r = setTimeout(() => {
|
|
324
|
+
n.isPressed && n.target instanceof HTMLElement && (t ? X(e) : (re(n.target), n.target.click()));
|
|
611
325
|
}, 80);
|
|
612
|
-
|
|
613
|
-
} else
|
|
614
|
-
|
|
326
|
+
M(e.currentTarget, "click", () => t = !0, !0), n.disposables.push(() => clearTimeout(r));
|
|
327
|
+
} else X(e);
|
|
328
|
+
n.isOverTarget = !1;
|
|
615
329
|
}
|
|
616
|
-
},
|
|
617
|
-
|
|
330
|
+
}, t = (e) => {
|
|
331
|
+
X(e);
|
|
618
332
|
};
|
|
619
|
-
|
|
620
|
-
|
|
333
|
+
o.onDragStart = (e) => {
|
|
334
|
+
l(e.currentTarget, i(e)) && X(e);
|
|
621
335
|
};
|
|
622
336
|
} else if (process.env.NODE_ENV === "test") {
|
|
623
|
-
|
|
624
|
-
if (!(
|
|
625
|
-
if (
|
|
626
|
-
|
|
337
|
+
o.onMouseDown = (e) => {
|
|
338
|
+
if (!(e.button !== 0 || !l(e.currentTarget, i(e)))) {
|
|
339
|
+
if (n.ignoreEmulatedMouseEvents) {
|
|
340
|
+
e.stopPropagation();
|
|
627
341
|
return;
|
|
628
342
|
}
|
|
629
|
-
if (
|
|
630
|
-
let
|
|
631
|
-
|
|
343
|
+
if (n.isPressed = !0, n.isOverTarget = !0, n.target = e.currentTarget, n.pointerType = a(e.nativeEvent) ? "virtual" : "mouse", oe(() => F(e, n.pointerType)) && e.stopPropagation(), S) {
|
|
344
|
+
let t = u(e.target);
|
|
345
|
+
t && n.disposables.push(t);
|
|
632
346
|
}
|
|
633
|
-
|
|
347
|
+
M(r(e.currentTarget), "mouseup", t, !1);
|
|
634
348
|
}
|
|
635
|
-
},
|
|
636
|
-
if (!
|
|
637
|
-
let
|
|
638
|
-
|
|
639
|
-
},
|
|
640
|
-
if (!
|
|
641
|
-
let
|
|
642
|
-
|
|
643
|
-
},
|
|
644
|
-
|
|
349
|
+
}, o.onMouseEnter = (e) => {
|
|
350
|
+
if (!l(e.currentTarget, i(e))) return;
|
|
351
|
+
let t = !0;
|
|
352
|
+
n.isPressed && !n.ignoreEmulatedMouseEvents && n.pointerType != null && (n.isOverTarget = !0, t = F(e, n.pointerType)), t && e.stopPropagation();
|
|
353
|
+
}, o.onMouseLeave = (e) => {
|
|
354
|
+
if (!l(e.currentTarget, i(e))) return;
|
|
355
|
+
let t = !0;
|
|
356
|
+
n.isPressed && !n.ignoreEmulatedMouseEvents && n.pointerType != null && (n.isOverTarget = !1, t = R(e, n.pointerType, !1), Z(e)), t && e.stopPropagation();
|
|
357
|
+
}, o.onMouseUp = (e) => {
|
|
358
|
+
l(e.currentTarget, i(e)) && !n.ignoreEmulatedMouseEvents && e.button === 0 && !n.isPressed && U(e, n.pointerType || "mouse");
|
|
645
359
|
};
|
|
646
|
-
let
|
|
647
|
-
if (
|
|
648
|
-
if (
|
|
649
|
-
|
|
360
|
+
let t = (e) => {
|
|
361
|
+
if (e.button === 0) {
|
|
362
|
+
if (n.ignoreEmulatedMouseEvents) {
|
|
363
|
+
n.ignoreEmulatedMouseEvents = !1;
|
|
650
364
|
return;
|
|
651
365
|
}
|
|
652
|
-
|
|
366
|
+
n.target && l(n.target, i(e)) && n.pointerType != null || X(e), n.isOverTarget = !1;
|
|
653
367
|
}
|
|
654
368
|
};
|
|
655
|
-
|
|
656
|
-
if (!
|
|
657
|
-
let
|
|
658
|
-
|
|
659
|
-
},
|
|
660
|
-
if (!
|
|
661
|
-
if (!
|
|
662
|
-
|
|
369
|
+
o.onTouchStart = (t) => {
|
|
370
|
+
if (!l(t.currentTarget, i(t))) return;
|
|
371
|
+
let r = le(t.nativeEvent);
|
|
372
|
+
r && (n.activePointerId = r.identifier, n.ignoreEmulatedMouseEvents = !0, n.isOverTarget = !0, n.isPressed = !0, n.target = t.currentTarget, n.pointerType = "touch", w || E(n.target), F(q(n.target, t), n.pointerType) && t.stopPropagation(), M(e(t.currentTarget), "scroll", s, !0));
|
|
373
|
+
}, o.onTouchMove = (e) => {
|
|
374
|
+
if (!l(e.currentTarget, i(e))) return;
|
|
375
|
+
if (!n.isPressed) {
|
|
376
|
+
e.stopPropagation();
|
|
663
377
|
return;
|
|
664
378
|
}
|
|
665
|
-
let
|
|
666
|
-
|
|
667
|
-
},
|
|
668
|
-
if (!
|
|
669
|
-
if (!
|
|
670
|
-
|
|
379
|
+
let t = K(e.nativeEvent, n.activePointerId), r = !0;
|
|
380
|
+
t && ue(t, e.currentTarget) ? !n.isOverTarget && n.pointerType != null && (n.isOverTarget = !0, r = F(q(n.target, e), n.pointerType)) : n.isOverTarget && n.pointerType != null && (n.isOverTarget = !1, r = R(q(n.target, e), n.pointerType, !1), Z(q(n.target, e))), r && e.stopPropagation();
|
|
381
|
+
}, o.onTouchEnd = (e) => {
|
|
382
|
+
if (!l(e.currentTarget, i(e))) return;
|
|
383
|
+
if (!n.isPressed) {
|
|
384
|
+
e.stopPropagation();
|
|
671
385
|
return;
|
|
672
386
|
}
|
|
673
|
-
let
|
|
674
|
-
|
|
675
|
-
},
|
|
676
|
-
|
|
387
|
+
let t = K(e.nativeEvent, n.activePointerId), r = !0;
|
|
388
|
+
t && ue(t, e.currentTarget) && n.pointerType != null ? (U(q(n.target, e), n.pointerType), r = R(q(n.target, e), n.pointerType), $(e.nativeEvent, n.target)) : n.isOverTarget && n.pointerType != null && (r = R(q(n.target, e), n.pointerType, !1)), r && e.stopPropagation(), n.isPressed = !1, n.activePointerId = null, n.isOverTarget = !1, n.ignoreEmulatedMouseEvents = !0, n.target && !w && D(n.target), N();
|
|
389
|
+
}, o.onTouchCancel = (e) => {
|
|
390
|
+
l(e.currentTarget, i(e)) && (e.stopPropagation(), n.isPressed && X(q(n.target, e)));
|
|
677
391
|
};
|
|
678
|
-
let
|
|
679
|
-
|
|
680
|
-
currentTarget:
|
|
392
|
+
let s = (e) => {
|
|
393
|
+
n.isPressed && l(i(e), n.target) && X({
|
|
394
|
+
currentTarget: n.target,
|
|
681
395
|
shiftKey: !1,
|
|
682
396
|
ctrlKey: !1,
|
|
683
397
|
metaKey: !1,
|
|
684
398
|
altKey: !1
|
|
685
399
|
});
|
|
686
400
|
};
|
|
687
|
-
|
|
688
|
-
|
|
401
|
+
o.onDragStart = (e) => {
|
|
402
|
+
l(e.currentTarget, i(e)) && X(e);
|
|
689
403
|
};
|
|
690
404
|
}
|
|
691
|
-
return
|
|
405
|
+
return o;
|
|
692
406
|
}, [
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
407
|
+
M,
|
|
408
|
+
b,
|
|
409
|
+
S,
|
|
410
|
+
N,
|
|
411
|
+
w,
|
|
412
|
+
Z,
|
|
698
413
|
F,
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
R
|
|
414
|
+
Q,
|
|
415
|
+
$
|
|
702
416
|
]);
|
|
703
|
-
return
|
|
704
|
-
if (!
|
|
705
|
-
let e =
|
|
706
|
-
if (!e || !e.head || e.getElementById(
|
|
417
|
+
return h(() => {
|
|
418
|
+
if (!T || process.env.NODE_ENV === "test") return;
|
|
419
|
+
let e = r(T.current);
|
|
420
|
+
if (!e || !e.head || e.getElementById(V)) return;
|
|
707
421
|
let t = e.createElement("style");
|
|
708
|
-
t.id =
|
|
709
|
-
let n =
|
|
422
|
+
t.id = V;
|
|
423
|
+
let n = se(e);
|
|
710
424
|
n && (t.nonce = n), t.textContent = `
|
|
711
425
|
@layer {
|
|
712
|
-
[${
|
|
426
|
+
[${H}] {
|
|
713
427
|
touch-action: pan-x pan-y pinch-zoom;
|
|
714
428
|
}
|
|
715
429
|
}
|
|
716
430
|
`.trim(), e.head.prepend(t);
|
|
717
|
-
}, [
|
|
718
|
-
let e =
|
|
431
|
+
}, [T]), h(() => {
|
|
432
|
+
let e = j.current;
|
|
719
433
|
return () => {
|
|
720
|
-
|
|
434
|
+
w || D(e.target ?? void 0);
|
|
721
435
|
for (let t of e.disposables) t();
|
|
722
436
|
e.disposables = [];
|
|
723
437
|
};
|
|
724
|
-
}, [
|
|
725
|
-
isPressed:
|
|
726
|
-
pressProps:
|
|
438
|
+
}, [w]), {
|
|
439
|
+
isPressed: x || k,
|
|
440
|
+
pressProps: P(O, fe, { [H]: !0 })
|
|
727
441
|
};
|
|
728
442
|
}
|
|
729
|
-
function
|
|
443
|
+
function W(e) {
|
|
730
444
|
return e.tagName === "A" && e.hasAttribute("href");
|
|
731
445
|
}
|
|
732
|
-
function
|
|
733
|
-
let { key:
|
|
734
|
-
return (
|
|
446
|
+
function G(t, n) {
|
|
447
|
+
let { key: r, code: i } = t, a = n, o = a.getAttribute("role");
|
|
448
|
+
return (r === "Enter" || r === " " || r === "Spacebar" || i === "Space") && !(a instanceof e(a).HTMLInputElement && !$(a, r) || a instanceof e(a).HTMLTextAreaElement || a.isContentEditable) && !((o === "link" || !o && W(a)) && r !== "Enter");
|
|
735
449
|
}
|
|
736
|
-
function
|
|
450
|
+
function le(e) {
|
|
737
451
|
let { targetTouches: t } = e;
|
|
738
452
|
return t.length > 0 ? t[0] : null;
|
|
739
453
|
}
|
|
740
|
-
function
|
|
454
|
+
function K(e, t) {
|
|
741
455
|
let n = e.changedTouches;
|
|
742
456
|
for (let e = 0; e < n.length; e++) {
|
|
743
457
|
let r = n[e];
|
|
@@ -745,7 +459,7 @@ function Me(e, t) {
|
|
|
745
459
|
}
|
|
746
460
|
return null;
|
|
747
461
|
}
|
|
748
|
-
function
|
|
462
|
+
function q(e, t) {
|
|
749
463
|
let n = 0, r = 0;
|
|
750
464
|
return t.targetTouches && t.targetTouches.length === 1 && (n = t.targetTouches[0].clientX, r = t.targetTouches[0].clientY), {
|
|
751
465
|
currentTarget: e,
|
|
@@ -757,7 +471,7 @@ function Q(e, t) {
|
|
|
757
471
|
clientY: r
|
|
758
472
|
};
|
|
759
473
|
}
|
|
760
|
-
function
|
|
474
|
+
function J(e, t) {
|
|
761
475
|
let n = t.clientX, r = t.clientY;
|
|
762
476
|
return {
|
|
763
477
|
currentTarget: e,
|
|
@@ -770,7 +484,7 @@ function $(e, t) {
|
|
|
770
484
|
key: t.key
|
|
771
485
|
};
|
|
772
486
|
}
|
|
773
|
-
function
|
|
487
|
+
function Y(e) {
|
|
774
488
|
let t = 0, n = 0;
|
|
775
489
|
return e.width === void 0 ? e.radiusX !== void 0 && (t = e.radiusX) : t = e.width / 2, e.height === void 0 ? e.radiusY !== void 0 && (n = e.radiusY) : n = e.height / 2, {
|
|
776
490
|
top: e.clientY - n,
|
|
@@ -779,19 +493,19 @@ function Ne(e) {
|
|
|
779
493
|
left: e.clientX - t
|
|
780
494
|
};
|
|
781
495
|
}
|
|
782
|
-
function
|
|
496
|
+
function X(e, t) {
|
|
783
497
|
return !(e.left > t.right || t.left > e.right || e.top > t.bottom || t.top > e.bottom);
|
|
784
498
|
}
|
|
785
|
-
function
|
|
786
|
-
return
|
|
499
|
+
function ue(e, t) {
|
|
500
|
+
return X(t.getBoundingClientRect(), Y(e));
|
|
787
501
|
}
|
|
788
|
-
function
|
|
789
|
-
return e instanceof HTMLInputElement ? !1 : e instanceof HTMLButtonElement ? e.type !== "submit" && e.type !== "reset" : !
|
|
502
|
+
function Z(e) {
|
|
503
|
+
return e instanceof HTMLInputElement ? !1 : e instanceof HTMLButtonElement ? e.type !== "submit" && e.type !== "reset" : !W(e);
|
|
790
504
|
}
|
|
791
|
-
function
|
|
792
|
-
return e instanceof HTMLInputElement ?
|
|
505
|
+
function de(e, t) {
|
|
506
|
+
return e instanceof HTMLInputElement ? !$(e, t) : Z(e);
|
|
793
507
|
}
|
|
794
|
-
var
|
|
508
|
+
var Q = new Set([
|
|
795
509
|
"checkbox",
|
|
796
510
|
"radio",
|
|
797
511
|
"range",
|
|
@@ -802,10 +516,10 @@ var Re = new Set([
|
|
|
802
516
|
"submit",
|
|
803
517
|
"reset"
|
|
804
518
|
]);
|
|
805
|
-
function
|
|
806
|
-
return e.type === "checkbox" || e.type === "radio" ? t === " " :
|
|
519
|
+
function $(e, t) {
|
|
520
|
+
return e.type === "checkbox" || e.type === "radio" ? t === " " : Q.has(e.type);
|
|
807
521
|
}
|
|
808
522
|
//#endregion
|
|
809
|
-
export {
|
|
523
|
+
export { U as t };
|
|
810
524
|
|
|
811
525
|
//# sourceMappingURL=usePress.map
|