@okam/stack-ui 1.42.2 → 1.42.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/components/Menu/interface.d.ts +7 -1
- package/index100.js +1 -1
- package/index100.mjs +1 -1
- package/index101.js +1 -1
- package/index101.mjs +1 -1
- package/index102.js +1 -1
- package/index102.mjs +1 -1
- package/index153.js +1 -1
- package/index153.mjs +4 -4
- package/index154.js +1 -1
- package/index154.mjs +2 -2
- package/index155.js +1 -1
- package/index155.mjs +1 -1
- package/index156.js +1 -1
- package/index156.mjs +1 -1
- package/index161.js +1 -1
- package/index161.mjs +2 -2
- package/index162.js +1 -1
- package/index162.mjs +15 -14
- package/index163.js +1 -1
- package/index163.mjs +2 -2
- package/index164.js +1 -1
- package/index164.mjs +5 -5
- package/index165.js +1 -1
- package/index165.mjs +3 -3
- package/index172.js +1 -1
- package/index172.mjs +2 -2
- package/index176.js +1 -1
- package/index176.mjs +1 -1
- package/index178.js +1 -1
- package/index178.mjs +1 -1
- package/index179.js +1 -1
- package/index179.mjs +1 -1
- package/index181.js +1 -1
- package/index181.mjs +3 -3
- package/index232.js +1 -1
- package/index232.mjs +117 -132
- package/index233.js +1 -1
- package/index233.mjs +65 -189
- package/index234.js +1 -1
- package/index234.mjs +378 -19
- package/index235.js +1 -1
- package/index235.mjs +47 -4
- package/index236.js +1 -1
- package/index236.mjs +4 -29
- package/index237.js +1 -1
- package/index237.mjs +23 -48
- package/index238.js +1 -1
- package/index238.mjs +45 -52
- package/index239.js +1 -1
- package/index239.mjs +5 -48
- package/index240.js +1 -1
- package/index240.mjs +22 -95
- package/index241.js +1 -1
- package/index241.mjs +12 -5
- package/index242.js +1 -1
- package/index242.mjs +4 -6
- package/index243.js +1 -1
- package/index243.mjs +13 -40
- package/index244.js +1 -1
- package/index244.mjs +43 -72
- package/index245.js +1 -1
- package/index245.mjs +56 -13
- package/index246.js +1 -1
- package/index246.mjs +40 -67
- package/index247.js +1 -1
- package/index247.mjs +28 -7
- package/index248.js +1 -1
- package/index248.mjs +31 -11
- package/index249.js +1 -1
- package/index249.mjs +13 -46
- package/index250.js +1 -1
- package/index250.mjs +10 -125
- package/index251.js +1 -1
- package/index251.mjs +25 -24
- package/index252.js +1 -1
- package/index252.mjs +8 -72
- package/index253.js +1 -1
- package/index253.mjs +6 -381
- package/index254.js +1 -1
- package/index254.mjs +5 -46
- package/index255.js +1 -1
- package/index255.mjs +7 -24
- package/index256.js +1 -1
- package/index256.mjs +29 -24
- package/index257.js +1 -1
- package/index257.mjs +18 -12
- package/index258.js +1 -1
- package/index258.mjs +13 -4
- package/index259.js +1 -1
- package/index259.mjs +42 -13
- package/index260.js +1 -1
- package/index260.mjs +7 -41
- package/index261.js +1 -1
- package/index261.mjs +16 -56
- package/index262.js +1 -1
- package/index262.mjs +3 -29
- package/index263.js +1 -1
- package/index263.mjs +4 -31
- package/index264.js +1 -1
- package/index264.mjs +19 -10
- package/index265.js +1 -1
- package/index265.mjs +54 -9
- package/index266.js +1 -1
- package/index266.mjs +27 -5
- package/index267.js +1 -1
- package/index267.mjs +140 -7
- package/index268.js +1 -1
- package/index268.mjs +196 -28
- package/index269.js +1 -1
- package/index269.mjs +18 -14
- package/index270.js +1 -1
- package/index270.mjs +48 -12
- package/index271.js +1 -1
- package/index271.mjs +45 -40
- package/index272.js +1 -1
- package/index272.mjs +96 -7
- package/index273.js +1 -1
- package/index273.mjs +72 -18
- package/index274.js +1 -1
- package/index274.mjs +69 -3
- package/index275.js +1 -1
- package/index275.mjs +7 -4
- package/index276.js +1 -1
- package/index276.mjs +11 -19
- package/index278.js +1 -1
- package/index278.mjs +4 -4
- package/index280.js +1 -1
- package/index280.mjs +9 -9
- package/index281.js +1 -1
- package/index281.mjs +1 -1
- package/index324.js +1 -1
- package/index324.mjs +63 -7
- package/index325.js +1 -1
- package/index325.mjs +25 -23
- package/index326.js +1 -1
- package/index326.mjs +7 -93
- package/index327.js +1 -1
- package/index327.mjs +27 -62
- package/index328.js +1 -1
- package/index328.mjs +90 -7
- package/index329.js +1 -1
- package/index329.mjs +8 -24
- package/index330.js +1 -1
- package/index330.mjs +25 -33
- package/index331.js +1 -1
- package/index331.mjs +33 -6
- package/index332.js +1 -1
- package/index332.mjs +6 -6
- package/index333.js +1 -1
- package/index333.mjs +6 -50
- package/index334.js +1 -1
- package/index334.mjs +49 -28
- package/index335.js +1 -1
- package/index335.mjs +5 -5
- package/index336.js +1 -1
- package/index336.mjs +1 -1
- package/index340.js +1 -1
- package/index340.mjs +2 -2
- package/index341.js +1 -1
- package/index341.mjs +1 -1
- package/index342.js +1 -1
- package/index342.mjs +1 -1
- package/index346.js +1 -1
- package/index346.mjs +166 -4
- package/index348.js +1 -1
- package/index348.mjs +4 -166
- package/index45.js +1 -1
- package/index45.mjs +68 -63
- package/index99.js +1 -1
- package/index99.mjs +1 -1
- package/package.json +1 -1
package/index327.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index328.js"),a=require("react"),r=require("./index240.js"),F=require("./index241.js");function v(l){let{isDisabled:u,onFocus:o,onBlur:n,onFocusChange:t}=l;const c=a.useCallback(e=>{if(e.target===e.currentTarget)return n&&n(e),t&&t(!1),!0},[n,t]),s=g.useSyntheticBlurEvent(c),d=a.useCallback(e=>{const i=F.getOwnerDocument(e.target),f=i?r.getActiveElement(i):r.getActiveElement();e.target===e.currentTarget&&f===r.getEventTarget(e.nativeEvent)&&(o&&o(e),t&&t(!0),s(e))},[t,o,s]);return{focusProps:{onFocus:!u&&(o||t||n)?d:void 0,onBlur:!u&&(n||t)?c:void 0}}}exports.useFocus=v;
|
package/index327.mjs
CHANGED
|
@@ -1,65 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
let
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
function $(e) {
|
|
29
|
-
if (typeof window > "u" || i.get(s(e))) return;
|
|
30
|
-
const n = s(e), t = v(e);
|
|
31
|
-
let r = n.HTMLElement.prototype.focus;
|
|
32
|
-
n.HTMLElement.prototype.focus = function() {
|
|
33
|
-
a = !0, r.apply(this, arguments);
|
|
34
|
-
}, t.addEventListener("keydown", d, !0), t.addEventListener("keyup", d, !0), t.addEventListener("click", l, !0), n.addEventListener("focus", p, !0), n.addEventListener("blur", E, !1), typeof PointerEvent < "u" ? (t.addEventListener("pointerdown", o, !0), t.addEventListener("pointermove", o, !0), t.addEventListener("pointerup", o, !0)) : process.env.NODE_ENV === "test" && (t.addEventListener("mousedown", o, !0), t.addEventListener("mousemove", o, !0), t.addEventListener("mouseup", o, !0)), n.addEventListener("beforeunload", () => {
|
|
35
|
-
m(e);
|
|
36
|
-
}, {
|
|
37
|
-
once: !0
|
|
38
|
-
}), i.set(n, {
|
|
39
|
-
focus: r
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
const m = (e, n) => {
|
|
43
|
-
const t = s(e), r = v(e);
|
|
44
|
-
n && r.removeEventListener("DOMContentLoaded", n), i.has(t) && (t.HTMLElement.prototype.focus = i.get(t).focus, r.removeEventListener("keydown", d, !0), r.removeEventListener("keyup", d, !0), r.removeEventListener("click", l, !0), t.removeEventListener("focus", p, !0), t.removeEventListener("blur", E, !1), typeof PointerEvent < "u" ? (r.removeEventListener("pointerdown", o, !0), r.removeEventListener("pointermove", o, !0), r.removeEventListener("pointerup", o, !0)) : process.env.NODE_ENV === "test" && (r.removeEventListener("mousedown", o, !0), r.removeEventListener("mousemove", o, !0), r.removeEventListener("mouseup", o, !0)), i.delete(t));
|
|
45
|
-
};
|
|
46
|
-
function k(e) {
|
|
47
|
-
const n = v(e);
|
|
48
|
-
let t;
|
|
49
|
-
return n.readyState !== "loading" ? $(e) : (t = () => {
|
|
50
|
-
$(e);
|
|
51
|
-
}, n.addEventListener("DOMContentLoaded", t)), () => m(e, t);
|
|
52
|
-
}
|
|
53
|
-
typeof document < "u" && k();
|
|
54
|
-
function D() {
|
|
55
|
-
return f;
|
|
56
|
-
}
|
|
57
|
-
function F(e) {
|
|
58
|
-
f = e, u(e, null);
|
|
1
|
+
import { useSyntheticBlurEvent as l } from "./index328.mjs";
|
|
2
|
+
import { useCallback as u } from "react";
|
|
3
|
+
import { getActiveElement as a, getEventTarget as p } from "./index240.mjs";
|
|
4
|
+
import { getOwnerDocument as m } from "./index241.mjs";
|
|
5
|
+
function x(d) {
|
|
6
|
+
let { isDisabled: r, onFocus: n, onBlur: o, onFocusChange: t } = d;
|
|
7
|
+
const c = u((e) => {
|
|
8
|
+
if (e.target === e.currentTarget)
|
|
9
|
+
return o && o(e), t && t(!1), !0;
|
|
10
|
+
}, [
|
|
11
|
+
o,
|
|
12
|
+
t
|
|
13
|
+
]), f = l(c), i = u((e) => {
|
|
14
|
+
const s = m(e.target), $ = s ? a(s) : a();
|
|
15
|
+
e.target === e.currentTarget && $ === p(e.nativeEvent) && (n && n(e), t && t(!0), f(e));
|
|
16
|
+
}, [
|
|
17
|
+
t,
|
|
18
|
+
n,
|
|
19
|
+
f
|
|
20
|
+
]);
|
|
21
|
+
return {
|
|
22
|
+
focusProps: {
|
|
23
|
+
onFocus: !r && (n || t || o) ? i : void 0,
|
|
24
|
+
onBlur: !r && (o || t) ? c : void 0
|
|
25
|
+
}
|
|
26
|
+
};
|
|
59
27
|
}
|
|
60
28
|
export {
|
|
61
|
-
|
|
62
|
-
D as getInteractionModality,
|
|
63
|
-
i as hasSetupGlobalListeners,
|
|
64
|
-
F as setInteractionModality
|
|
29
|
+
x as useFocus
|
|
65
30
|
};
|
package/index328.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./index241.js"),l=require("./index244.js"),E=require("./index236.js"),m=require("./index258.js"),p=require("./index264.js"),d=require("react");function f(r){let e=r;return e.nativeEvent=r,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function g(r,e){Object.defineProperty(r,"target",{value:e}),Object.defineProperty(r,"currentTarget",{value:e})}function F(r){let e=d.useRef({isFocused:!1,observer:null});E.useLayoutEffect(()=>{const t=e.current;return()=>{t.observer&&(t.observer.disconnect(),t.observer=null)}},[]);let u=m.useEffectEvent(t=>{r==null||r(t)});return d.useCallback(t=>{if(t.target instanceof HTMLButtonElement||t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement||t.target instanceof HTMLSelectElement){e.current.isFocused=!0;let o=t.target,s=c=>{if(e.current.isFocused=!1,o.disabled){let i=f(c);u(i)}e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};o.addEventListener("focusout",s,{once:!0}),e.current.observer=new MutationObserver(()=>{if(e.current.isFocused&&o.disabled){var c;(c=e.current.observer)===null||c===void 0||c.disconnect();let i=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:i})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:i}))}}),e.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[u])}exports.ignoreFocusEvent=!1;function L(r){for(;r&&!p.isFocusable(r);)r=r.parentElement;let e=b.getOwnerWindow(r),u=e.document.activeElement;if(!u||u===r)return;exports.ignoreFocusEvent=!0;let t=!1,o=n=>{(n.target===u||t)&&n.stopImmediatePropagation()},s=n=>{(n.target===u||t)&&(n.stopImmediatePropagation(),!r&&!t&&(t=!0,l.focusWithoutScrolling(u),a()))},c=n=>{(n.target===r||t)&&n.stopImmediatePropagation()},i=n=>{(n.target===r||t)&&(n.stopImmediatePropagation(),t||(t=!0,l.focusWithoutScrolling(u),a()))};e.addEventListener("blur",o,!0),e.addEventListener("focusout",s,!0),e.addEventListener("focusin",i,!0),e.addEventListener("focus",c,!0);let a=()=>{cancelAnimationFrame(v),e.removeEventListener("blur",o,!0),e.removeEventListener("focusout",s,!0),e.removeEventListener("focusin",i,!0),e.removeEventListener("focus",c,!0),exports.ignoreFocusEvent=!1,t=!1},v=requestAnimationFrame(a);return a}exports.createSyntheticEvent=f;exports.preventFocus=L;exports.setEventTarget=g;exports.useSyntheticBlurEvent=F;
|
package/index328.mjs
CHANGED
|
@@ -1,12 +1,95 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { getOwnerWindow as b } from "./index241.mjs";
|
|
2
|
+
import { focusWithoutScrolling as l } from "./index244.mjs";
|
|
3
|
+
import { useLayoutEffect as v } from "./index236.mjs";
|
|
4
|
+
import { useEffectEvent as m } from "./index258.mjs";
|
|
5
|
+
import { isFocusable as p } from "./index264.mjs";
|
|
6
|
+
import { useRef as E, useCallback as $ } from "react";
|
|
7
|
+
function g(r) {
|
|
8
|
+
let e = r;
|
|
9
|
+
return e.nativeEvent = r, e.isDefaultPrevented = () => e.defaultPrevented, e.isPropagationStopped = () => e.cancelBubble, e.persist = () => {
|
|
10
|
+
}, e;
|
|
11
|
+
}
|
|
12
|
+
function h(r, e) {
|
|
13
|
+
Object.defineProperty(r, "target", {
|
|
14
|
+
value: e
|
|
15
|
+
}), Object.defineProperty(r, "currentTarget", {
|
|
16
|
+
value: e
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function I(r) {
|
|
20
|
+
let e = E({
|
|
21
|
+
isFocused: !1,
|
|
22
|
+
observer: null
|
|
23
|
+
});
|
|
24
|
+
v(() => {
|
|
25
|
+
const t = e.current;
|
|
26
|
+
return () => {
|
|
27
|
+
t.observer && (t.observer.disconnect(), t.observer = null);
|
|
28
|
+
};
|
|
29
|
+
}, []);
|
|
30
|
+
let a = m((t) => {
|
|
31
|
+
r == null || r(t);
|
|
32
|
+
});
|
|
33
|
+
return $((t) => {
|
|
34
|
+
if (t.target instanceof HTMLButtonElement || t.target instanceof HTMLInputElement || t.target instanceof HTMLTextAreaElement || t.target instanceof HTMLSelectElement) {
|
|
35
|
+
e.current.isFocused = !0;
|
|
36
|
+
let o = t.target, u = (c) => {
|
|
37
|
+
if (e.current.isFocused = !1, o.disabled) {
|
|
38
|
+
let s = g(c);
|
|
39
|
+
a(s);
|
|
40
|
+
}
|
|
41
|
+
e.current.observer && (e.current.observer.disconnect(), e.current.observer = null);
|
|
42
|
+
};
|
|
43
|
+
o.addEventListener("focusout", u, {
|
|
44
|
+
once: !0
|
|
45
|
+
}), e.current.observer = new MutationObserver(() => {
|
|
46
|
+
if (e.current.isFocused && o.disabled) {
|
|
47
|
+
var c;
|
|
48
|
+
(c = e.current.observer) === null || c === void 0 || c.disconnect();
|
|
49
|
+
let s = o === document.activeElement ? null : document.activeElement;
|
|
50
|
+
o.dispatchEvent(new FocusEvent("blur", {
|
|
51
|
+
relatedTarget: s
|
|
52
|
+
})), o.dispatchEvent(new FocusEvent("focusout", {
|
|
53
|
+
bubbles: !0,
|
|
54
|
+
relatedTarget: s
|
|
55
|
+
}));
|
|
56
|
+
}
|
|
57
|
+
}), e.current.observer.observe(o, {
|
|
58
|
+
attributes: !0,
|
|
59
|
+
attributeFilter: [
|
|
60
|
+
"disabled"
|
|
61
|
+
]
|
|
62
|
+
});
|
|
7
63
|
}
|
|
64
|
+
}, [
|
|
65
|
+
a
|
|
66
|
+
]);
|
|
67
|
+
}
|
|
68
|
+
let d = !1;
|
|
69
|
+
function y(r) {
|
|
70
|
+
for (; r && !p(r); ) r = r.parentElement;
|
|
71
|
+
let e = b(r), a = e.document.activeElement;
|
|
72
|
+
if (!a || a === r) return;
|
|
73
|
+
d = !0;
|
|
74
|
+
let t = !1, o = (n) => {
|
|
75
|
+
(n.target === a || t) && n.stopImmediatePropagation();
|
|
76
|
+
}, u = (n) => {
|
|
77
|
+
(n.target === a || t) && (n.stopImmediatePropagation(), !r && !t && (t = !0, l(a), i()));
|
|
78
|
+
}, c = (n) => {
|
|
79
|
+
(n.target === r || t) && n.stopImmediatePropagation();
|
|
80
|
+
}, s = (n) => {
|
|
81
|
+
(n.target === r || t) && (n.stopImmediatePropagation(), t || (t = !0, l(a), i()));
|
|
8
82
|
};
|
|
83
|
+
e.addEventListener("blur", o, !0), e.addEventListener("focusout", u, !0), e.addEventListener("focusin", s, !0), e.addEventListener("focus", c, !0);
|
|
84
|
+
let i = () => {
|
|
85
|
+
cancelAnimationFrame(f), e.removeEventListener("blur", o, !0), e.removeEventListener("focusout", u, !0), e.removeEventListener("focusin", s, !0), e.removeEventListener("focus", c, !0), d = !1, t = !1;
|
|
86
|
+
}, f = requestAnimationFrame(i);
|
|
87
|
+
return i;
|
|
9
88
|
}
|
|
10
89
|
export {
|
|
11
|
-
|
|
90
|
+
g as createSyntheticEvent,
|
|
91
|
+
d as ignoreFocusEvent,
|
|
92
|
+
y as preventFocus,
|
|
93
|
+
h as setEventTarget,
|
|
94
|
+
I as useSyntheticBlurEvent
|
|
12
95
|
};
|
package/index329.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index330.js");function r(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:n.createEventHandler(e.onKeyDown),onKeyUp:n.createEventHandler(e.onKeyUp)}}}exports.useKeyboard=r;
|
package/index329.mjs
CHANGED
|
@@ -1,28 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
t.preventDefault();
|
|
9
|
-
},
|
|
10
|
-
isDefaultPrevented() {
|
|
11
|
-
return t.isDefaultPrevented();
|
|
12
|
-
},
|
|
13
|
-
stopPropagation() {
|
|
14
|
-
e && process.env.NODE_ENV !== "production" ? console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.") : e = !0;
|
|
15
|
-
},
|
|
16
|
-
continuePropagation() {
|
|
17
|
-
e = !1;
|
|
18
|
-
},
|
|
19
|
-
isPropagationStopped() {
|
|
20
|
-
return e;
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
o(r), e && t.stopPropagation();
|
|
1
|
+
import { createEventHandler as o } from "./index330.mjs";
|
|
2
|
+
function r(e) {
|
|
3
|
+
return {
|
|
4
|
+
keyboardProps: e.isDisabled ? {} : {
|
|
5
|
+
onKeyDown: o(e.onKeyDown),
|
|
6
|
+
onKeyUp: o(e.onKeyUp)
|
|
7
|
+
}
|
|
24
8
|
};
|
|
25
9
|
}
|
|
26
10
|
export {
|
|
27
|
-
|
|
11
|
+
r as useKeyboard
|
|
28
12
|
};
|
package/index330.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function n(o){if(!o)return;let e=!0;return t=>{let r={...t,preventDefault(){t.preventDefault()},isDefaultPrevented(){return t.isDefaultPrevented()},stopPropagation(){e&&process.env.NODE_ENV!=="production"?console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior."):e=!0},continuePropagation(){e=!1},isPropagationStopped(){return e}};o(r),e&&t.stopPropagation()}}exports.createEventHandler=n;
|
package/index330.mjs
CHANGED
|
@@ -1,36 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}, 300);
|
|
28
|
-
} else if ((e instanceof HTMLElement || e instanceof SVGElement) && e && n.has(e)) {
|
|
29
|
-
let t = n.get(e), c = "userSelect" in e.style ? "userSelect" : "webkitUserSelect";
|
|
30
|
-
e.style[c] === "none" && (e.style[c] = t), e.getAttribute("style") === "" && e.removeAttribute("style"), n.delete(e);
|
|
31
|
-
}
|
|
1
|
+
function n(o) {
|
|
2
|
+
if (!o) return;
|
|
3
|
+
let e = !0;
|
|
4
|
+
return (t) => {
|
|
5
|
+
let r = {
|
|
6
|
+
...t,
|
|
7
|
+
preventDefault() {
|
|
8
|
+
t.preventDefault();
|
|
9
|
+
},
|
|
10
|
+
isDefaultPrevented() {
|
|
11
|
+
return t.isDefaultPrevented();
|
|
12
|
+
},
|
|
13
|
+
stopPropagation() {
|
|
14
|
+
e && process.env.NODE_ENV !== "production" ? console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.") : e = !0;
|
|
15
|
+
},
|
|
16
|
+
continuePropagation() {
|
|
17
|
+
e = !1;
|
|
18
|
+
},
|
|
19
|
+
isPropagationStopped() {
|
|
20
|
+
return e;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
o(r), e && t.stopPropagation();
|
|
24
|
+
};
|
|
32
25
|
}
|
|
33
26
|
export {
|
|
34
|
-
|
|
35
|
-
$ as restoreTextSelection
|
|
27
|
+
n as createEventHandler
|
|
36
28
|
};
|
package/index331.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index241.js"),r=require("./index247.js"),c=require("./index246.js");let n="default",s="",l=new WeakMap;function u(e){if(c.isIOS()){if(n==="default"){const t=o.getOwnerDocument(e);s=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}n="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";l.set(e,e.style[t]),e.style[t]="none"}}function d(e){if(c.isIOS()){if(n!=="disabled")return;n="restoring",setTimeout(()=>{r.runAfterTransition(()=>{if(n==="restoring"){const t=o.getOwnerDocument(e);t.documentElement.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=s||""),s="",n="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&l.has(e)){let t=l.get(e),i="userSelect"in e.style?"userSelect":"webkitUserSelect";e.style[i]==="none"&&(e.style[i]=t),e.getAttribute("style")===""&&e.removeAttribute("style"),l.delete(e)}}exports.disableTextSelection=u;exports.restoreTextSelection=d;
|
package/index331.mjs
CHANGED
|
@@ -1,9 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { getOwnerDocument as i } from "./index241.mjs";
|
|
2
|
+
import { runAfterTransition as f } from "./index247.mjs";
|
|
3
|
+
import { isIOS as o } from "./index246.mjs";
|
|
4
|
+
let l = "default", s = "", n = /* @__PURE__ */ new WeakMap();
|
|
5
|
+
function m(e) {
|
|
6
|
+
if (o()) {
|
|
7
|
+
if (l === "default") {
|
|
8
|
+
const t = i(e);
|
|
9
|
+
s = t.documentElement.style.webkitUserSelect, t.documentElement.style.webkitUserSelect = "none";
|
|
10
|
+
}
|
|
11
|
+
l = "disabled";
|
|
12
|
+
} else if (e instanceof HTMLElement || e instanceof SVGElement) {
|
|
13
|
+
let t = "userSelect" in e.style ? "userSelect" : "webkitUserSelect";
|
|
14
|
+
n.set(e, e.style[t]), e.style[t] = "none";
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function $(e) {
|
|
18
|
+
if (o()) {
|
|
19
|
+
if (l !== "disabled") return;
|
|
20
|
+
l = "restoring", setTimeout(() => {
|
|
21
|
+
f(() => {
|
|
22
|
+
if (l === "restoring") {
|
|
23
|
+
const t = i(e);
|
|
24
|
+
t.documentElement.style.webkitUserSelect === "none" && (t.documentElement.style.webkitUserSelect = s || ""), s = "", l = "default";
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}, 300);
|
|
28
|
+
} else if ((e instanceof HTMLElement || e instanceof SVGElement) && e && n.has(e)) {
|
|
29
|
+
let t = n.get(e), c = "userSelect" in e.style ? "userSelect" : "webkitUserSelect";
|
|
30
|
+
e.style[c] === "none" && (e.style[c] = t), e.getAttribute("style") === "" && e.removeAttribute("style"), n.delete(e);
|
|
31
|
+
}
|
|
6
32
|
}
|
|
7
33
|
export {
|
|
8
|
-
|
|
34
|
+
m as disableTextSelection,
|
|
35
|
+
$ as restoreTextSelection
|
|
9
36
|
};
|
package/index332.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("./index343.js"),s=require("./index344.js");function c(e,t){var r=s._(e,t,"get");return _._(e,r)}exports._=c;
|
package/index332.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { _ as
|
|
3
|
-
function
|
|
4
|
-
var t =
|
|
5
|
-
return
|
|
1
|
+
import { _ as s } from "./index343.mjs";
|
|
2
|
+
import { _ as a } from "./index344.mjs";
|
|
3
|
+
function p(_, r) {
|
|
4
|
+
var t = a(_, r, "get");
|
|
5
|
+
return s(_, t);
|
|
6
6
|
}
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
p as _
|
|
9
9
|
};
|
package/index333.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("./index345.js"),c=require("./index344.js");function i(t,r,e){var s=c._(t,r,"set");return _._(t,s,e),e}exports._=i;
|
package/index333.mjs
CHANGED
|
@@ -1,53 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { useDescription as x } from "./index268.mjs";
|
|
7
|
-
import { useRef as y } from "react";
|
|
8
|
-
const D = 500;
|
|
9
|
-
function R(p) {
|
|
10
|
-
let { isDisabled: o, onLongPressStart: s, onLongPressEnd: n, onLongPress: r, threshold: c = D, accessibilityDescription: f } = p;
|
|
11
|
-
const t = y(void 0);
|
|
12
|
-
let { addGlobalListener: i, removeGlobalListener: d } = L(), { pressProps: u } = $({
|
|
13
|
-
isDisabled: o,
|
|
14
|
-
onPressStart(e) {
|
|
15
|
-
if (e.continuePropagation(), (e.pointerType === "mouse" || e.pointerType === "touch") && (s && s({
|
|
16
|
-
...e,
|
|
17
|
-
type: "longpressstart"
|
|
18
|
-
}), t.current = setTimeout(() => {
|
|
19
|
-
e.target.dispatchEvent(new PointerEvent("pointercancel", {
|
|
20
|
-
bubbles: !0
|
|
21
|
-
})), b(e.target).activeElement !== e.target && P(e.target), r && r({
|
|
22
|
-
...e,
|
|
23
|
-
type: "longpress"
|
|
24
|
-
}), t.current = void 0;
|
|
25
|
-
}, c), e.pointerType === "touch")) {
|
|
26
|
-
let a = (m) => {
|
|
27
|
-
m.preventDefault();
|
|
28
|
-
};
|
|
29
|
-
i(e.target, "contextmenu", a, {
|
|
30
|
-
once: !0
|
|
31
|
-
}), i(window, "pointerup", () => {
|
|
32
|
-
setTimeout(() => {
|
|
33
|
-
d(e.target, "contextmenu", a);
|
|
34
|
-
}, 30);
|
|
35
|
-
}, {
|
|
36
|
-
once: !0
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
onPressEnd(e) {
|
|
41
|
-
t.current && clearTimeout(t.current), n && (e.pointerType === "mouse" || e.pointerType === "touch") && n({
|
|
42
|
-
...e,
|
|
43
|
-
type: "longpressend"
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
}), l = x(r && !o ? f : void 0);
|
|
47
|
-
return {
|
|
48
|
-
longPressProps: g(u, l)
|
|
49
|
-
};
|
|
1
|
+
import { _ as a } from "./index345.mjs";
|
|
2
|
+
import { _ as o } from "./index344.mjs";
|
|
3
|
+
function i(s, r, _) {
|
|
4
|
+
var t = o(s, r, "set");
|
|
5
|
+
return a(s, t, _), _;
|
|
50
6
|
}
|
|
51
7
|
export {
|
|
52
|
-
|
|
8
|
+
i as _
|
|
53
9
|
};
|
package/index334.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./index234.js"),f=require("./index241.js"),m=require("./index154.js"),L=require("./index244.js"),y=require("./index248.js"),D=require("./index256.js"),T=require("react"),h=500;function v(c){let{isDisabled:s,onLongPressStart:n,onLongPressEnd:o,onLongPress:r,threshold:l=h,accessibilityDescription:p}=c;const t=T.useRef(void 0);let{addGlobalListener:i,removeGlobalListener:a}=y.useGlobalListeners(),{pressProps:d}=b.usePress({isDisabled:s,onPressStart(e){if(e.continuePropagation(),(e.pointerType==="mouse"||e.pointerType==="touch")&&(n&&n({...e,type:"longpressstart"}),t.current=setTimeout(()=>{e.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),f.getOwnerDocument(e.target).activeElement!==e.target&&L.focusWithoutScrolling(e.target),r&&r({...e,type:"longpress"}),t.current=void 0},l),e.pointerType==="touch")){let u=P=>{P.preventDefault()};i(e.target,"contextmenu",u,{once:!0}),i(window,"pointerup",()=>{setTimeout(()=>{a(e.target,"contextmenu",u)},30)},{once:!0})}},onPressEnd(e){t.current&&clearTimeout(t.current),o&&(e.pointerType==="mouse"||e.pointerType==="touch")&&o({...e,type:"longpressend"})}}),g=D.useDescription(r&&!s?p:void 0);return{longPressProps:m.mergeProps(d,g)}}exports.useLongPress=v;
|
package/index334.mjs
CHANGED
|
@@ -1,32 +1,53 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
1
|
+
import { usePress as $ } from "./index234.mjs";
|
|
2
|
+
import { getOwnerDocument as b } from "./index241.mjs";
|
|
3
|
+
import { mergeProps as g } from "./index154.mjs";
|
|
4
|
+
import { focusWithoutScrolling as P } from "./index244.mjs";
|
|
5
|
+
import { useGlobalListeners as L } from "./index248.mjs";
|
|
6
|
+
import { useDescription as x } from "./index256.mjs";
|
|
7
|
+
import { useRef as y } from "react";
|
|
8
|
+
const D = 500;
|
|
9
|
+
function R(p) {
|
|
10
|
+
let { isDisabled: o, onLongPressStart: s, onLongPressEnd: n, onLongPress: r, threshold: c = D, accessibilityDescription: f } = p;
|
|
11
|
+
const t = y(void 0);
|
|
12
|
+
let { addGlobalListener: i, removeGlobalListener: d } = L(), { pressProps: u } = $({
|
|
13
|
+
isDisabled: o,
|
|
14
|
+
onPressStart(e) {
|
|
15
|
+
if (e.continuePropagation(), (e.pointerType === "mouse" || e.pointerType === "touch") && (s && s({
|
|
16
|
+
...e,
|
|
17
|
+
type: "longpressstart"
|
|
18
|
+
}), t.current = setTimeout(() => {
|
|
19
|
+
e.target.dispatchEvent(new PointerEvent("pointercancel", {
|
|
20
|
+
bubbles: !0
|
|
21
|
+
})), b(e.target).activeElement !== e.target && P(e.target), r && r({
|
|
22
|
+
...e,
|
|
23
|
+
type: "longpress"
|
|
24
|
+
}), t.current = void 0;
|
|
25
|
+
}, c), e.pointerType === "touch")) {
|
|
26
|
+
let a = (m) => {
|
|
27
|
+
m.preventDefault();
|
|
28
|
+
};
|
|
29
|
+
i(e.target, "contextmenu", a, {
|
|
30
|
+
once: !0
|
|
31
|
+
}), i(window, "pointerup", () => {
|
|
32
|
+
setTimeout(() => {
|
|
33
|
+
d(e.target, "contextmenu", a);
|
|
34
|
+
}, 30);
|
|
35
|
+
}, {
|
|
36
|
+
once: !0
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
onPressEnd(e) {
|
|
41
|
+
t.current && clearTimeout(t.current), n && (e.pointerType === "mouse" || e.pointerType === "touch") && n({
|
|
42
|
+
...e,
|
|
43
|
+
type: "longpressend"
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}), l = x(r && !o ? f : void 0);
|
|
47
|
+
return {
|
|
48
|
+
longPressProps: g(u, l)
|
|
27
49
|
};
|
|
28
50
|
}
|
|
29
51
|
export {
|
|
30
|
-
|
|
31
|
-
S as useFocusable
|
|
52
|
+
R as useLongPress
|
|
32
53
|
};
|
package/index335.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index324.js"),o=require("./index240.js"),u=require("./index241.js"),i=require("./index244.js"),s=require("./index247.js");function l(e){const t=u.getOwnerDocument(e),n=o.getActiveElement(t);if(r.getInteractionModality()==="virtual"){let c=n;s.runAfterTransition(()=>{o.getActiveElement(t)===c&&e.isConnected&&i.focusWithoutScrolling(e)})}else i.focusWithoutScrolling(e)}exports.focusSafely=l;
|
package/index335.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { getInteractionModality as a } from "./
|
|
2
|
-
import { getActiveElement as o } from "./
|
|
3
|
-
import { getOwnerDocument as i } from "./
|
|
4
|
-
import { focusWithoutScrolling as f } from "./
|
|
5
|
-
import { runAfterTransition as $ } from "./
|
|
1
|
+
import { getInteractionModality as a } from "./index324.mjs";
|
|
2
|
+
import { getActiveElement as o } from "./index240.mjs";
|
|
3
|
+
import { getOwnerDocument as i } from "./index241.mjs";
|
|
4
|
+
import { focusWithoutScrolling as f } from "./index244.mjs";
|
|
5
|
+
import { runAfterTransition as $ } from "./index247.mjs";
|
|
6
6
|
function p(e) {
|
|
7
7
|
const t = i(e), c = o(t);
|
|
8
8
|
if (a() === "virtual") {
|
package/index336.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index181.js"),i=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index181.js"),i=require("./index246.js");function u(e){return i.isAppleDevice()?e.altKey:e.ctrlKey}function a(e,t){var o,f;let r=`[data-key="${CSS.escape(String(t))}"]`,n=(o=e.current)===null||o===void 0?void 0:o.dataset.collection;return n&&(r=`[data-collection="${CSS.escape(n)}"]${r}`),(f=e.current)===null||f===void 0?void 0:f.querySelector(r)}const c=new WeakMap;function d(e){let t=l.useId();return c.set(e,t),t}function $(e){return c.get(e)}exports.getCollectionId=$;exports.getItemElement=a;exports.isNonContiguousSelectionModifier=u;exports.useCollectionId=d;
|
package/index336.mjs
CHANGED
package/index340.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./index348.js"),F=require("./index266.js"),t=require("react");function M(e,o){if(e.size!==o.size)return!1;for(let c of e)if(!o.has(c))return!1;return!0}function R(e){let{selectionMode:o="none",disallowEmptySelection:c=!1,allowDuplicateSelectionEvents:K,selectionBehavior:s="toggle",disabledBehavior:b="all"}=e,r=t.useRef(!1),[,v]=t.useState(!1),u=t.useRef(null),a=t.useRef(null),[,h]=t.useState(null),g=t.useMemo(()=>S(e.selectedKeys),[e.selectedKeys]),w=t.useMemo(()=>S(e.defaultSelectedKeys,new y.Selection),[e.defaultSelectedKeys]),[i,B]=F.useControlledState(g,w,e.onSelectionChange),$=t.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[d,n]=t.useState(s);s==="replace"&&d==="toggle"&&typeof i=="object"&&i.size===0&&n("replace");let f=t.useRef(s);return t.useEffect(()=>{s!==f.current&&(n(s),f.current=s)},[s]),{selectionMode:o,disallowEmptySelection:c,selectionBehavior:d,setSelectionBehavior:n,get isFocused(){return r.current},setFocused(l){r.current=l,v(l)},get focusedKey(){return u.current},get childFocusStrategy(){return a.current},setFocusedKey(l,m="first"){u.current=l,a.current=m,h(l)},selectedKeys:i,setSelectedKeys(l){(K||!M(l,i))&&B(l)},disabledKeys:$,disabledBehavior:b}}function S(e,o){return e?e==="all"?"all":new y.Selection(e):o}exports.useMultipleSelectionState=R;
|