@okam/stack-ui 1.41.1 → 1.41.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/CHANGELOG.md +10 -0
- package/README.md +1 -0
- package/index108.js +1 -1
- package/index108.mjs +19 -13
- package/index109.js +1 -1
- package/index109.mjs +18 -12
- package/index149.js +1 -1
- package/index149.mjs +3 -3
- package/index150.js +1 -1
- package/index150.mjs +2 -2
- package/index151.js +1 -1
- package/index151.mjs +1 -1
- package/index152.js +1 -1
- package/index152.mjs +1 -1
- package/index157.js +1 -1
- package/index157.mjs +1 -1
- package/index159.js +1 -1
- package/index159.mjs +2 -2
- package/index160.js +1 -1
- package/index160.mjs +5 -5
- package/index161.js +1 -1
- package/index161.mjs +3 -3
- package/index168.js +1 -1
- package/index168.mjs +1 -1
- package/index172.js +1 -1
- package/index172.mjs +1 -1
- package/index174.js +1 -1
- package/index174.mjs +1 -1
- package/index175.js +1 -1
- package/index175.mjs +1 -1
- package/index177.js +1 -1
- package/index177.mjs +3 -3
- package/index229.js +1 -1
- package/index229.mjs +22 -68
- package/index230.js +1 -1
- package/index230.mjs +129 -370
- package/index231.js +1 -1
- package/index231.mjs +196 -45
- package/index232.js +1 -1
- package/index232.mjs +23 -4
- package/index233.js +1 -1
- package/index233.mjs +4 -25
- package/index234.js +1 -1
- package/index234.mjs +27 -46
- package/index235.js +1 -1
- package/index235.mjs +48 -4
- package/index236.js +1 -1
- package/index236.mjs +54 -24
- package/index237.js +1 -1
- package/index237.mjs +47 -11
- package/index238.js +1 -1
- package/index238.mjs +97 -4
- package/index239.js +1 -1
- package/index239.mjs +5 -14
- package/index240.js +1 -1
- package/index240.mjs +6 -42
- package/index241.js +1 -1
- package/index241.mjs +39 -55
- package/index242.js +1 -1
- package/index242.mjs +72 -42
- package/index243.js +1 -1
- package/index243.mjs +13 -27
- package/index244.js +1 -1
- package/index244.mjs +67 -30
- package/index245.js +1 -1
- package/index245.mjs +7 -14
- package/index246.js +1 -1
- package/index246.mjs +11 -10
- package/index247.js +1 -1
- package/index247.mjs +46 -27
- package/index248.js +1 -1
- package/index248.mjs +72 -8
- package/index249.js +1 -1
- package/index249.mjs +381 -6
- package/index250.js +1 -1
- package/index250.mjs +46 -5
- package/index251.js +1 -1
- package/index251.mjs +24 -7
- package/index252.js +1 -1
- package/index252.mjs +24 -29
- package/index253.js +1 -1
- package/index253.mjs +12 -18
- package/index254.js +1 -1
- package/index254.mjs +4 -13
- package/index255.js +1 -1
- package/index255.mjs +13 -42
- package/index256.js +1 -1
- package/index256.mjs +41 -7
- package/index257.js +1 -1
- package/index257.mjs +56 -16
- package/index258.js +1 -1
- package/index258.mjs +29 -3
- package/index259.js +1 -1
- package/index259.mjs +31 -4
- package/index260.js +1 -1
- package/index260.mjs +10 -19
- package/index261.js +1 -1
- package/index261.mjs +9 -54
- package/index262.js +1 -1
- package/index262.mjs +5 -27
- package/index263.js +1 -1
- package/index263.mjs +7 -140
- package/index264.js +1 -1
- package/index264.mjs +28 -196
- package/index265.js +1 -1
- package/index265.mjs +14 -18
- package/index266.js +1 -1
- package/index266.mjs +12 -48
- package/index267.js +1 -1
- package/index267.mjs +40 -45
- package/index268.js +1 -1
- package/index268.mjs +7 -96
- package/index269.js +1 -1
- package/index269.mjs +18 -72
- package/index270.js +1 -1
- package/index270.mjs +3 -69
- package/index271.js +1 -1
- package/index271.mjs +4 -7
- package/index272.js +1 -1
- package/index272.mjs +19 -11
- package/index274.js +1 -1
- package/index274.mjs +3 -3
- package/index276.js +1 -1
- package/index276.mjs +9 -9
- package/index277.js +1 -1
- package/index277.mjs +1 -1
- package/index320.js +1 -1
- package/index320.mjs +7 -63
- package/index321.js +1 -1
- package/index321.mjs +28 -7
- package/index322.js +1 -1
- package/index322.mjs +89 -24
- package/index323.js +1 -1
- package/index323.mjs +58 -88
- package/index326.js +1 -1
- package/index326.mjs +3 -3
- package/index329.js +1 -1
- package/index329.mjs +5 -5
- package/index330.js +1 -1
- package/index330.mjs +2 -2
- package/index331.js +1 -1
- package/index331.mjs +5 -5
- package/index332.js +1 -1
- package/index332.mjs +1 -1
- package/index336.js +1 -1
- package/index336.mjs +1 -1
- package/package.json +1 -1
package/index267.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 W=require("./index263.js");function L(e,o){let d=T(e,o,"left"),t=T(e,o,"top"),l=o.offsetWidth,f=o.offsetHeight,r=e.scrollLeft,n=e.scrollTop,{borderTopWidth:i,borderLeftWidth:s,scrollPaddingTop:c,scrollPaddingRight:a,scrollPaddingBottom:$,scrollPaddingLeft:S}=getComputedStyle(e),I=r+parseInt(s,10),u=n+parseInt(i,10),b=I+e.clientWidth,P=u+e.clientHeight,p=parseInt(c,10)||0,v=parseInt($,10)||0,h=parseInt(a,10)||0,g=parseInt(S,10)||0;d<=r+g?r=d-parseInt(s,10)-g:d+l>b-h&&(r+=d+l-b+h),t<=u+p?n=t-parseInt(i,10)-p:t+f>P-v&&(n+=t+f-P+v),e.scrollLeft=r,e.scrollTop=n}function T(e,o,d){const t=d==="left"?"offsetLeft":"offsetTop";let l=0;for(;o.offsetParent&&(l+=o[t],o.offsetParent!==e);){if(o.offsetParent.contains(e)){l-=e[t];break}o=o.offsetParent}return l}function k(e,o){if(e&&document.contains(e)){let r=document.scrollingElement||document.documentElement;if(window.getComputedStyle(r).overflow==="hidden"){let i=W.getScrollParents(e);for(let s of i)L(s,e)}else{var d;let{left:i,top:s}=e.getBoundingClientRect();e==null||(d=e.scrollIntoView)===null||d===void 0||d.call(e,{block:"nearest"});let{left:c,top:a}=e.getBoundingClientRect();if(Math.abs(i-c)>1||Math.abs(s-a)>1){var t,l,f;o==null||(l=o.containingElement)===null||l===void 0||(t=l.scrollIntoView)===null||t===void 0||t.call(l,{block:"center",inline:"center"}),(f=e.scrollIntoView)===null||f===void 0||f.call(e,{block:"nearest"})}}}}exports.scrollIntoView=L;exports.scrollIntoViewport=k;
|
package/index267.mjs
CHANGED
|
@@ -1,51 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
D(() => {
|
|
14
|
-
let e = E.current;
|
|
15
|
-
if (d) return;
|
|
16
|
-
const v = n.current, t = p(v);
|
|
17
|
-
if (typeof PointerEvent < "u") {
|
|
18
|
-
let i = (u) => {
|
|
19
|
-
e.isPointerDown && c(u, n) && f(u), e.isPointerDown = !1;
|
|
20
|
-
};
|
|
21
|
-
return t.addEventListener("pointerdown", o, !0), t.addEventListener("pointerup", i, !0), () => {
|
|
22
|
-
t.removeEventListener("pointerdown", o, !0), t.removeEventListener("pointerup", i, !0);
|
|
23
|
-
};
|
|
24
|
-
} else if (process.env.NODE_ENV === "test") {
|
|
25
|
-
let i = (a) => {
|
|
26
|
-
e.ignoreEmulatedMouseEvents ? e.ignoreEmulatedMouseEvents = !1 : e.isPointerDown && c(a, n) && f(a), e.isPointerDown = !1;
|
|
27
|
-
}, u = (a) => {
|
|
28
|
-
e.ignoreEmulatedMouseEvents = !0, e.isPointerDown && c(a, n) && f(a), e.isPointerDown = !1;
|
|
29
|
-
};
|
|
30
|
-
return t.addEventListener("mousedown", o, !0), t.addEventListener("mouseup", i, !0), t.addEventListener("touchstart", o, !0), t.addEventListener("touchend", u, !0), () => {
|
|
31
|
-
t.removeEventListener("mousedown", o, !0), t.removeEventListener("mouseup", i, !0), t.removeEventListener("touchstart", o, !0), t.removeEventListener("touchend", u, !0);
|
|
32
|
-
};
|
|
1
|
+
import { getScrollParents as I } from "./index263.mjs";
|
|
2
|
+
function W(o, e) {
|
|
3
|
+
let t = L(o, e, "left"), d = L(o, e, "top"), l = e.offsetWidth, r = e.offsetHeight, f = o.scrollLeft, c = o.scrollTop, { borderTopWidth: i, borderLeftWidth: s, scrollPaddingTop: n, scrollPaddingRight: a, scrollPaddingBottom: T, scrollPaddingLeft: g } = getComputedStyle(o), x = f + parseInt(s, 10), u = c + parseInt(i, 10), b = x + o.clientWidth, p = u + o.clientHeight, P = parseInt(n, 10) || 0, v = parseInt(T, 10) || 0, h = parseInt(a, 10) || 0, $ = parseInt(g, 10) || 0;
|
|
4
|
+
t <= f + $ ? f = t - parseInt(s, 10) - $ : t + l > b - h && (f += t + l - b + h), d <= u + P ? c = d - parseInt(i, 10) - P : d + r > p - v && (c += d + r - p + v), o.scrollLeft = f, o.scrollTop = c;
|
|
5
|
+
}
|
|
6
|
+
function L(o, e, t) {
|
|
7
|
+
const d = t === "left" ? "offsetLeft" : "offsetTop";
|
|
8
|
+
let l = 0;
|
|
9
|
+
for (; e.offsetParent && (l += e[d], e.offsetParent !== o); ) {
|
|
10
|
+
if (e.offsetParent.contains(o)) {
|
|
11
|
+
l -= o[d];
|
|
12
|
+
break;
|
|
33
13
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
o,
|
|
38
|
-
f
|
|
39
|
-
]);
|
|
14
|
+
e = e.offsetParent;
|
|
15
|
+
}
|
|
16
|
+
return l;
|
|
40
17
|
}
|
|
41
|
-
function
|
|
42
|
-
if (
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
18
|
+
function B(o, e) {
|
|
19
|
+
if (o && document.contains(o)) {
|
|
20
|
+
let f = document.scrollingElement || document.documentElement;
|
|
21
|
+
if (window.getComputedStyle(f).overflow === "hidden") {
|
|
22
|
+
let i = I(o);
|
|
23
|
+
for (let s of i) W(s, o);
|
|
24
|
+
} else {
|
|
25
|
+
var t;
|
|
26
|
+
let { left: i, top: s } = o.getBoundingClientRect();
|
|
27
|
+
o == null || (t = o.scrollIntoView) === null || t === void 0 || t.call(o, {
|
|
28
|
+
block: "nearest"
|
|
29
|
+
});
|
|
30
|
+
let { left: n, top: a } = o.getBoundingClientRect();
|
|
31
|
+
if (Math.abs(i - n) > 1 || Math.abs(s - a) > 1) {
|
|
32
|
+
var d, l, r;
|
|
33
|
+
e == null || (l = e.containingElement) === null || l === void 0 || (d = l.scrollIntoView) === null || d === void 0 || d.call(l, {
|
|
34
|
+
block: "center",
|
|
35
|
+
inline: "center"
|
|
36
|
+
}), (r = o.scrollIntoView) === null || r === void 0 || r.call(o, {
|
|
37
|
+
block: "nearest"
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
46
41
|
}
|
|
47
|
-
return n.current ? !r.composedPath().includes(n.current) : !1;
|
|
48
42
|
}
|
|
49
43
|
export {
|
|
50
|
-
|
|
44
|
+
W as scrollIntoView,
|
|
45
|
+
B as scrollIntoViewport
|
|
51
46
|
};
|
package/index268.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 i=require("./index241.js");function t(r){return r.mozInputSource===0&&r.isTrusted?!0:i.isAndroid()&&r.pointerType?r.type==="click"&&r.buttons===1:r.detail===0&&!r.pointerType}function o(r){return!i.isAndroid()&&r.width===0&&r.height===0||r.width===1&&r.height===1&&r.pressure===0&&r.detail===0&&r.pointerType==="mouse"}exports.isVirtualClick=t;exports.isVirtualPointerEvent=o;
|
package/index268.mjs
CHANGED
|
@@ -1,100 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { isIOS as g } from "./index242.mjs";
|
|
5
|
-
const m = typeof document < "u" && window.visualViewport, T = /* @__PURE__ */ new Set([
|
|
6
|
-
"checkbox",
|
|
7
|
-
"radio",
|
|
8
|
-
"range",
|
|
9
|
-
"color",
|
|
10
|
-
"file",
|
|
11
|
-
"image",
|
|
12
|
-
"button",
|
|
13
|
-
"submit",
|
|
14
|
-
"reset"
|
|
15
|
-
]);
|
|
16
|
-
let s = 0, f;
|
|
17
|
-
function C(e = {}) {
|
|
18
|
-
let { isDisabled: t } = e;
|
|
19
|
-
b(() => {
|
|
20
|
-
if (!t)
|
|
21
|
-
return s++, s === 1 && (g() ? f = S() : f = y()), () => {
|
|
22
|
-
s--, s === 0 && f();
|
|
23
|
-
};
|
|
24
|
-
}, [
|
|
25
|
-
t
|
|
26
|
-
]);
|
|
1
|
+
import { isAndroid as i } from "./index241.mjs";
|
|
2
|
+
function o(r) {
|
|
3
|
+
return r.mozInputSource === 0 && r.isTrusted ? !0 : i() && r.pointerType ? r.type === "click" && r.buttons === 1 : r.detail === 0 && !r.pointerType;
|
|
27
4
|
}
|
|
28
|
-
function
|
|
29
|
-
return
|
|
30
|
-
}
|
|
31
|
-
function S() {
|
|
32
|
-
let e, t, n = (c) => {
|
|
33
|
-
e = w(c.target, !0), !(e === document.documentElement && e === document.body) && e instanceof HTMLElement && window.getComputedStyle(e).overscrollBehavior === "auto" && (t = l(e, "overscrollBehavior", "contain"));
|
|
34
|
-
}, o = (c) => {
|
|
35
|
-
if (!e || e === document.documentElement || e === document.body) {
|
|
36
|
-
c.preventDefault();
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
e.scrollHeight === e.clientHeight && e.scrollWidth === e.clientWidth && c.preventDefault();
|
|
40
|
-
}, u = () => {
|
|
41
|
-
t && t();
|
|
42
|
-
}, a = (c) => {
|
|
43
|
-
let r = c.target;
|
|
44
|
-
x(r) && (h(), r.style.transform = "translateY(-2000px)", requestAnimationFrame(() => {
|
|
45
|
-
r.style.transform = "", m && (m.height < window.innerHeight ? requestAnimationFrame(() => {
|
|
46
|
-
v(r);
|
|
47
|
-
}) : m.addEventListener("resize", () => v(r), {
|
|
48
|
-
once: !0
|
|
49
|
-
}));
|
|
50
|
-
}));
|
|
51
|
-
}, d = null, h = () => {
|
|
52
|
-
if (d) return;
|
|
53
|
-
let c = () => {
|
|
54
|
-
window.scrollTo(0, 0);
|
|
55
|
-
}, r = window.pageXOffset, p = window.pageYOffset;
|
|
56
|
-
d = $(i(window, "scroll", c), l(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`), l(document.documentElement, "overflow", "hidden"), l(document.body, "marginTop", `-${p}px`), () => {
|
|
57
|
-
window.scrollTo(r, p);
|
|
58
|
-
}), window.scrollTo(0, 0);
|
|
59
|
-
}, E = $(i(document, "touchstart", n, {
|
|
60
|
-
passive: !1,
|
|
61
|
-
capture: !0
|
|
62
|
-
}), i(document, "touchmove", o, {
|
|
63
|
-
passive: !1,
|
|
64
|
-
capture: !0
|
|
65
|
-
}), i(document, "touchend", u, {
|
|
66
|
-
passive: !1,
|
|
67
|
-
capture: !0
|
|
68
|
-
}), i(document, "focus", a, !0));
|
|
69
|
-
return () => {
|
|
70
|
-
t == null || t(), d == null || d(), E();
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
function l(e, t, n) {
|
|
74
|
-
let o = e.style[t];
|
|
75
|
-
return e.style[t] = n, () => {
|
|
76
|
-
e.style[t] = o;
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
function i(e, t, n, o) {
|
|
80
|
-
return e.addEventListener(t, n, o), () => {
|
|
81
|
-
e.removeEventListener(t, n, o);
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
function v(e) {
|
|
85
|
-
let t = document.scrollingElement || document.documentElement, n = e;
|
|
86
|
-
for (; n && n !== t; ) {
|
|
87
|
-
let o = w(n);
|
|
88
|
-
if (o !== document.documentElement && o !== document.body && o !== n) {
|
|
89
|
-
let u = o.getBoundingClientRect().top, a = n.getBoundingClientRect().top;
|
|
90
|
-
a > u + n.clientHeight && (o.scrollTop += a - u);
|
|
91
|
-
}
|
|
92
|
-
n = o.parentElement;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
function x(e) {
|
|
96
|
-
return e instanceof HTMLInputElement && !T.has(e.type) || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable;
|
|
5
|
+
function u(r) {
|
|
6
|
+
return !i() && r.width === 0 && r.height === 0 || r.width === 1 && r.height === 1 && r.pressure === 0 && r.detail === 0 && r.pointerType === "mouse";
|
|
97
7
|
}
|
|
98
8
|
export {
|
|
99
|
-
|
|
9
|
+
o as isVirtualClick,
|
|
10
|
+
u as isVirtualPointerEvent
|
|
100
11
|
};
|
package/index269.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index266.js"),o=require("react");function s(t,d,u){let i=o.useRef(d),r=l.useEffectEvent(()=>{u&&u(i.current)});o.useEffect(()=>{var n;let e=t==null||(n=t.current)===null||n===void 0?void 0:n.form;return e==null||e.addEventListener("reset",r),()=>{e==null||e.removeEventListener("reset",r)}},[t,r])}exports.useFormReset=s;
|
package/index269.mjs
CHANGED
|
@@ -1,74 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
import E from "./index303.mjs";
|
|
19
|
-
import S from "./index304.mjs";
|
|
20
|
-
import h from "./index305.mjs";
|
|
21
|
-
import L from "./index306.mjs";
|
|
22
|
-
import T from "./index307.mjs";
|
|
23
|
-
import u from "./index308.mjs";
|
|
24
|
-
import I from "./index309.mjs";
|
|
25
|
-
import P from "./index310.mjs";
|
|
26
|
-
import U from "./index311.mjs";
|
|
27
|
-
import k from "./index312.mjs";
|
|
28
|
-
import n from "./index313.mjs";
|
|
29
|
-
import v from "./index314.mjs";
|
|
30
|
-
import K from "./index315.mjs";
|
|
31
|
-
import N from "./index316.mjs";
|
|
32
|
-
import z from "./index317.mjs";
|
|
33
|
-
import A from "./index318.mjs";
|
|
34
|
-
import B from "./index319.mjs";
|
|
35
|
-
var C = {};
|
|
36
|
-
C = {
|
|
37
|
-
"ar-AE": r,
|
|
38
|
-
"bg-BG": o,
|
|
39
|
-
"cs-CZ": f,
|
|
40
|
-
"da-DK": t,
|
|
41
|
-
"de-DE": p,
|
|
42
|
-
"el-GR": $,
|
|
43
|
-
"en-US": e,
|
|
44
|
-
"es-ES": m,
|
|
45
|
-
"et-EE": s,
|
|
46
|
-
"fi-FI": d,
|
|
47
|
-
"fr-FR": c,
|
|
48
|
-
"he-IL": i,
|
|
49
|
-
"hr-HR": x,
|
|
50
|
-
"hu-HU": a,
|
|
51
|
-
"it-IT": b,
|
|
52
|
-
"ja-JP": R,
|
|
53
|
-
"ko-KR": l,
|
|
54
|
-
"lt-LT": E,
|
|
55
|
-
"lv-LV": S,
|
|
56
|
-
"nb-NO": h,
|
|
57
|
-
"nl-NL": L,
|
|
58
|
-
"pl-PL": T,
|
|
59
|
-
"pt-BR": u,
|
|
60
|
-
"pt-PT": I,
|
|
61
|
-
"ro-RO": P,
|
|
62
|
-
"ru-RU": U,
|
|
63
|
-
"sk-SK": k,
|
|
64
|
-
"sl-SI": n,
|
|
65
|
-
"sr-SP": v,
|
|
66
|
-
"sv-SE": K,
|
|
67
|
-
"tr-TR": N,
|
|
68
|
-
"uk-UA": z,
|
|
69
|
-
"zh-CN": A,
|
|
70
|
-
"zh-TW": B
|
|
71
|
-
};
|
|
1
|
+
import { useEffectEvent as u } from "./index266.mjs";
|
|
2
|
+
import { useRef as a, useEffect as f } from "react";
|
|
3
|
+
function s(t, n, d) {
|
|
4
|
+
let i = a(n), r = u(() => {
|
|
5
|
+
d && d(i.current);
|
|
6
|
+
});
|
|
7
|
+
f(() => {
|
|
8
|
+
var o;
|
|
9
|
+
let e = t == null || (o = t.current) === null || o === void 0 ? void 0 : o.form;
|
|
10
|
+
return e == null || e.addEventListener("reset", r), () => {
|
|
11
|
+
e == null || e.removeEventListener("reset", r);
|
|
12
|
+
};
|
|
13
|
+
}, [
|
|
14
|
+
t,
|
|
15
|
+
r
|
|
16
|
+
]);
|
|
17
|
+
}
|
|
72
18
|
export {
|
|
73
|
-
|
|
19
|
+
s as useFormReset
|
|
74
20
|
};
|
package/index270.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 c="react-aria-clear-focus",e="react-aria-focus";exports.CLEAR_FOCUS_EVENT=c;exports.FOCUS_EVENT=e;
|
package/index270.mjs
CHANGED
|
@@ -1,71 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
function v(o, l = document.body) {
|
|
3
|
-
let a = new Set(o), d = /* @__PURE__ */ new Set(), u = (t) => {
|
|
4
|
-
for (let n of t.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]")) a.add(n);
|
|
5
|
-
let r = (n) => {
|
|
6
|
-
if (a.has(n) || n.parentElement && d.has(n.parentElement) && n.parentElement.getAttribute("role") !== "row") return NodeFilter.FILTER_REJECT;
|
|
7
|
-
for (let p of a)
|
|
8
|
-
if (n.contains(p)) return NodeFilter.FILTER_SKIP;
|
|
9
|
-
return NodeFilter.FILTER_ACCEPT;
|
|
10
|
-
}, e = document.createTreeWalker(t, NodeFilter.SHOW_ELEMENT, {
|
|
11
|
-
acceptNode: r
|
|
12
|
-
}), h = r(t);
|
|
13
|
-
if (h === NodeFilter.FILTER_ACCEPT && b(t), h !== NodeFilter.FILTER_REJECT) {
|
|
14
|
-
let n = e.nextNode();
|
|
15
|
-
for (; n != null; )
|
|
16
|
-
b(n), n = e.nextNode();
|
|
17
|
-
}
|
|
18
|
-
}, b = (t) => {
|
|
19
|
-
var r;
|
|
20
|
-
let e = (r = s.get(t)) !== null && r !== void 0 ? r : 0;
|
|
21
|
-
t.getAttribute("aria-hidden") === "true" && e === 0 || (e === 0 && t.setAttribute("aria-hidden", "true"), d.add(t), s.set(t, e + 1));
|
|
22
|
-
};
|
|
23
|
-
i.length && i[i.length - 1].disconnect(), u(l);
|
|
24
|
-
let c = new MutationObserver((t) => {
|
|
25
|
-
for (let r of t)
|
|
26
|
-
if (!(r.type !== "childList" || r.addedNodes.length === 0) && ![
|
|
27
|
-
...a,
|
|
28
|
-
...d
|
|
29
|
-
].some((e) => e.contains(r.target))) {
|
|
30
|
-
for (let e of r.removedNodes) e instanceof Element && (a.delete(e), d.delete(e));
|
|
31
|
-
for (let e of r.addedNodes)
|
|
32
|
-
(e instanceof HTMLElement || e instanceof SVGElement) && (e.dataset.liveAnnouncer === "true" || e.dataset.reactAriaTopLayer === "true") ? a.add(e) : e instanceof Element && u(e);
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
c.observe(l, {
|
|
36
|
-
childList: !0,
|
|
37
|
-
subtree: !0
|
|
38
|
-
});
|
|
39
|
-
let f = {
|
|
40
|
-
visibleNodes: a,
|
|
41
|
-
hiddenNodes: d,
|
|
42
|
-
observe() {
|
|
43
|
-
c.observe(l, {
|
|
44
|
-
childList: !0,
|
|
45
|
-
subtree: !0
|
|
46
|
-
});
|
|
47
|
-
},
|
|
48
|
-
disconnect() {
|
|
49
|
-
c.disconnect();
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
return i.push(f), () => {
|
|
53
|
-
c.disconnect();
|
|
54
|
-
for (let t of d) {
|
|
55
|
-
let r = s.get(t);
|
|
56
|
-
r != null && (r === 1 ? (t.removeAttribute("aria-hidden"), s.delete(t)) : s.set(t, r - 1));
|
|
57
|
-
}
|
|
58
|
-
f === i[i.length - 1] ? (i.pop(), i.length && i[i.length - 1].observe()) : i.splice(i.indexOf(f), 1);
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
function E(o) {
|
|
62
|
-
let l = i[i.length - 1];
|
|
63
|
-
if (l && !l.visibleNodes.has(o))
|
|
64
|
-
return l.visibleNodes.add(o), () => {
|
|
65
|
-
l.visibleNodes.delete(o);
|
|
66
|
-
};
|
|
67
|
-
}
|
|
1
|
+
const a = "react-aria-clear-focus", c = "react-aria-focus";
|
|
68
2
|
export {
|
|
69
|
-
|
|
70
|
-
|
|
3
|
+
a as CLEAR_FOCUS_EVENT,
|
|
4
|
+
c as FOCUS_EVENT
|
|
71
5
|
};
|
package/index271.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 r=require("./index241.js");function t(e){return r.isMac()?e.metaKey:e.ctrlKey}exports.isCtrlKeyPressed=t;
|
package/index271.mjs
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var t;
|
|
5
|
-
return (t = e(r)) !== null && t !== void 0 ? t : {};
|
|
1
|
+
import { isMac as a } from "./index241.mjs";
|
|
2
|
+
function t(e) {
|
|
3
|
+
return a() ? e.metaKey : e.ctrlKey;
|
|
6
4
|
}
|
|
7
5
|
export {
|
|
8
|
-
|
|
9
|
-
a as useUNSAFE_PortalContext
|
|
6
|
+
t as isCtrlKeyPressed
|
|
10
7
|
};
|
package/index272.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 e=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])'],b=e.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";e.push('[tabindex]:not([tabindex="-1"]):not([disabled])');function n(t){return t.matches(b)}exports.isFocusable=n;
|
package/index272.mjs
CHANGED
|
@@ -1,14 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
const e = [
|
|
2
|
+
"input:not([disabled]):not([type=hidden])",
|
|
3
|
+
"select:not([disabled])",
|
|
4
|
+
"textarea:not([disabled])",
|
|
5
|
+
"button:not([disabled])",
|
|
6
|
+
"a[href]",
|
|
7
|
+
"area[href]",
|
|
8
|
+
"summary",
|
|
9
|
+
"iframe",
|
|
10
|
+
"object",
|
|
11
|
+
"embed",
|
|
12
|
+
"audio[controls]",
|
|
13
|
+
"video[controls]",
|
|
14
|
+
'[contenteditable]:not([contenteditable^="false"])'
|
|
15
|
+
], b = e.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
|
|
16
|
+
e.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
|
|
17
|
+
function n(t) {
|
|
18
|
+
return t.matches(b);
|
|
11
19
|
}
|
|
12
20
|
export {
|
|
13
|
-
n as
|
|
21
|
+
n as isFocusable
|
|
14
22
|
};
|
package/index274.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("./index332.js"),j=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("./index332.js"),j=require("./index249.js"),N=require("./index329.js"),z=require("./index331.js"),G=require("./index177.js"),A=require("./index150.js"),L=require("./index257.js"),H=require("./index271.js"),J=require("@react-aria/focus"),v=require("react");function Q(r){let{id:b,selectionManager:t,key:o,ref:s,shouldSelectOnPressUp:C,shouldUseVirtualFocus:l,focus:D,isDisabled:c,onAction:m,allowsDifferentPressOrigin:I,linkBehavior:p="action"}=r,F=L.useRouter();b=G.useId(b);let u=e=>{if(e.pointerType==="keyboard"&&O.isNonContiguousSelectionModifier(e))t.toggleSelection(o);else{if(t.selectionMode==="none")return;if(t.isLink(o)){if(p==="selection"&&s.current){let y=t.getItemProps(o);F.open(s.current,e,y.href,y.routerOptions),t.setSelectedKeys(t.selectedKeys);return}else if(p==="override"||p==="none")return}t.selectionMode==="single"?t.isSelected(o)&&!t.disallowEmptySelection?t.toggleSelection(o):t.replaceSelection(o):e&&e.shiftKey?t.extendSelection(o):t.selectionBehavior==="toggle"||e&&(H.isCtrlKeyPressed(e)||e.pointerType==="touch"||e.pointerType==="virtual")?t.toggleSelection(o):t.replaceSelection(o)}};v.useEffect(()=>{o===t.focusedKey&&t.isFocused&&(l?J.moveVirtualFocus(s.current):D?D():document.activeElement!==s.current&&s.current&&z.focusSafely(s.current))},[s,o,t.focusedKey,t.childFocusStrategy,t.isFocused,l]),c=c||t.isDisabled(o);let d={};!l&&!c?d={tabIndex:o===t.focusedKey?0:-1,onFocus(e){e.target===s.current&&t.setFocusedKey(o)}}:c&&(d.onMouseDown=e=>{e.preventDefault()});let E=t.isLink(o)&&p==="override",K=t.isLink(o)&&p!=="selection"&&p!=="none",i=!c&&t.canSelectItem(o)&&!E,k=(m||K)&&!c,a=k&&(t.selectionBehavior==="replace"?!i:!i||t.isEmpty),h=k&&i&&t.selectionBehavior==="replace",f=a||h,P=v.useRef(null),g=f&&i,T=v.useRef(!1),w=v.useRef(!1),S=e=>{if(m&&m(),K&&s.current){let y=t.getItemProps(o);F.open(s.current,e,y.href,y.routerOptions)}},n={ref:s};C?(n.onPressStart=e=>{P.current=e.pointerType,T.current=g,e.pointerType==="keyboard"&&(!f||$())&&u(e)},I?(n.onPressUp=a?void 0:e=>{e.pointerType==="mouse"&&i&&u(e)},n.onPress=a?S:e=>{e.pointerType!=="keyboard"&&e.pointerType!=="mouse"&&i&&u(e)}):n.onPress=e=>{if(a||h&&e.pointerType!=="mouse"){if(e.pointerType==="keyboard"&&!q())return;S(e)}else e.pointerType!=="keyboard"&&i&&u(e)}):(n.onPressStart=e=>{P.current=e.pointerType,T.current=g,w.current=a,i&&(e.pointerType==="mouse"&&!a||e.pointerType==="keyboard"&&(!k||$()))&&u(e)},n.onPress=e=>{(e.pointerType==="touch"||e.pointerType==="pen"||e.pointerType==="virtual"||e.pointerType==="keyboard"&&f&&q()||e.pointerType==="mouse"&&w.current)&&(f?S(e):i&&u(e))}),d["data-collection"]=O.getCollectionId(t.collection),d["data-key"]=o,n.preventFocusOnPress=l,l&&(n=A.mergeProps(n,{onPressStart(e){e.pointerType!=="touch"&&(t.setFocused(!0),t.setFocusedKey(o))},onPress(e){e.pointerType==="touch"&&(t.setFocused(!0),t.setFocusedKey(o))}}));let{pressProps:M,isPressed:B}=j.usePress(n),R=h?e=>{P.current==="mouse"&&(e.stopPropagation(),e.preventDefault(),S(e))}:void 0,{longPressProps:U}=N.useLongPress({isDisabled:!g,onLongPress(e){e.pointerType==="touch"&&(u(e),t.setSelectionBehavior("toggle"))}}),x=e=>{P.current==="touch"&&T.current&&e.preventDefault()},V=t.isLink(o)?e=>{L.openLink.isOpening||e.preventDefault()}:void 0;return{itemProps:A.mergeProps(d,i||a||l?M:{},g?U:{},{onDoubleClick:R,onDragStartCapture:x,onClick:V,id:b},l?{onMouseDown:e=>e.preventDefault()}:void 0),isPressed:B,isSelected:t.isSelected(o),isFocused:t.isFocused&&t.focusedKey===o,isDisabled:c,allowsSelection:i,hasAction:f}}function q(){let r=window.event;return(r==null?void 0:r.key)==="Enter"}function $(){let r=window.event;return(r==null?void 0:r.key)===" "||(r==null?void 0:r.code)==="Space"}exports.useSelectableItem=Q;
|
package/index274.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { getCollectionId as R, isNonContiguousSelectionModifier as N } from "./index332.mjs";
|
|
2
|
-
import { usePress as j } from "./
|
|
2
|
+
import { usePress as j } from "./index249.mjs";
|
|
3
3
|
import { useLongPress as q } from "./index329.mjs";
|
|
4
4
|
import { focusSafely as z } from "./index331.mjs";
|
|
5
5
|
import { useId as G } from "./index177.mjs";
|
|
6
6
|
import { mergeProps as K } from "./index150.mjs";
|
|
7
|
-
import { useRouter as H, openLink as J } from "./
|
|
8
|
-
import { isCtrlKeyPressed as Q } from "./
|
|
7
|
+
import { useRouter as H, openLink as J } from "./index257.mjs";
|
|
8
|
+
import { isCtrlKeyPressed as Q } from "./index271.mjs";
|
|
9
9
|
import { moveVirtualFocus as W } from "@react-aria/focus";
|
|
10
10
|
import { useEffect as X, useRef as k } from "react";
|
|
11
11
|
function le(r) {
|
package/index276.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const F=require("./index332.js"),fe=require("./index333.js"),$=require("./index150.js"),H=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const F=require("./index332.js"),fe=require("./index333.js"),$=require("./index150.js"),H=require("./index256.js"),ae=require("./index257.js"),j=require("./index260.js"),w=require("./index265.js"),O=require("./index267.js"),G=require("./index266.js"),J=require("./index270.js"),b=require("./index271.js"),de=require("react-dom"),p=require("react"),Q=require("./index323.js"),X=require("./index331.js"),Y=require("@react-aria/focus"),ve=require("@react-aria/i18n");function ye(Z){let{selectionManager:e,keyboardDelegate:t,ref:i,autoFocus:P=!1,shouldFocusWrap:S=!1,disallowEmptySelection:_=!1,disallowSelectAll:ee=!1,escapeKeyBehavior:le="clearSelection",selectOnFocus:m=e.selectionBehavior==="replace",disallowTypeAhead:te=!1,shouldUseVirtualFocus:K,allowsTabNavigation:oe=!1,isVirtualized:L,scrollRef:f=i,linkBehavior:N="action"}=Z,{direction:T}=ve.useLocale(),re=ae.useRouter(),ue=l=>{var r;if(l.altKey&&l.key==="Tab"&&l.preventDefault(),!(!((r=i.current)===null||r===void 0)&&r.contains(l.target)))return;const u=(o,v)=>{if(o!=null){if(e.isLink(o)&&N==="selection"&&m&&!F.isNonContiguousSelectionModifier(l)){de.flushSync(()=>{e.setFocusedKey(o,v)});let y=F.getItemElement(i,o),W=e.getItemProps(o);y&&re.open(y,l,W.href,W.routerOptions);return}if(e.setFocusedKey(o,v),e.isLink(o)&&N==="override")return;l.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(o):m&&!F.isNonContiguousSelectionModifier(l)&&e.replaceSelection(o)}};switch(l.key){case"ArrowDown":if(t.getKeyBelow){var n,s,c;let o=e.focusedKey!=null?(n=t.getKeyBelow)===null||n===void 0?void 0:n.call(t,e.focusedKey):(s=t.getFirstKey)===null||s===void 0?void 0:s.call(t);o==null&&S&&(o=(c=t.getFirstKey)===null||c===void 0?void 0:c.call(t,e.focusedKey)),o!=null&&(l.preventDefault(),u(o))}break;case"ArrowUp":if(t.getKeyAbove){var a,d,k;let o=e.focusedKey!=null?(a=t.getKeyAbove)===null||a===void 0?void 0:a.call(t,e.focusedKey):(d=t.getLastKey)===null||d===void 0?void 0:d.call(t);o==null&&S&&(o=(k=t.getLastKey)===null||k===void 0?void 0:k.call(t,e.focusedKey)),o!=null&&(l.preventDefault(),u(o))}break;case"ArrowLeft":if(t.getKeyLeftOf){var q,A,M;let o=e.focusedKey!=null?(q=t.getKeyLeftOf)===null||q===void 0?void 0:q.call(t,e.focusedKey):null;o==null&&S&&(o=T==="rtl"?(A=t.getFirstKey)===null||A===void 0?void 0:A.call(t,e.focusedKey):(M=t.getLastKey)===null||M===void 0?void 0:M.call(t,e.focusedKey)),o!=null&&(l.preventDefault(),u(o,T==="rtl"?"first":"last"))}break;case"ArrowRight":if(t.getKeyRightOf){var C,x,V;let o=e.focusedKey!=null?(C=t.getKeyRightOf)===null||C===void 0?void 0:C.call(t,e.focusedKey):null;o==null&&S&&(o=T==="rtl"?(x=t.getLastKey)===null||x===void 0?void 0:x.call(t,e.focusedKey):(V=t.getFirstKey)===null||V===void 0?void 0:V.call(t,e.focusedKey)),o!=null&&(l.preventDefault(),u(o,T==="rtl"?"last":"first"))}break;case"Home":if(t.getFirstKey){if(e.focusedKey===null&&l.shiftKey)return;l.preventDefault();let o=t.getFirstKey(e.focusedKey,b.isCtrlKeyPressed(l));e.setFocusedKey(o),o!=null&&(b.isCtrlKeyPressed(l)&&l.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(o):m&&e.replaceSelection(o))}break;case"End":if(t.getLastKey){if(e.focusedKey===null&&l.shiftKey)return;l.preventDefault();let o=t.getLastKey(e.focusedKey,b.isCtrlKeyPressed(l));e.setFocusedKey(o),o!=null&&(b.isCtrlKeyPressed(l)&&l.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(o):m&&e.replaceSelection(o))}break;case"PageDown":if(t.getKeyPageBelow&&e.focusedKey!=null){let o=t.getKeyPageBelow(e.focusedKey);o!=null&&(l.preventDefault(),u(o))}break;case"PageUp":if(t.getKeyPageAbove&&e.focusedKey!=null){let o=t.getKeyPageAbove(e.focusedKey);o!=null&&(l.preventDefault(),u(o))}break;case"a":b.isCtrlKeyPressed(l)&&e.selectionMode==="multiple"&&ee!==!0&&(l.preventDefault(),e.selectAll());break;case"Escape":le==="clearSelection"&&!_&&e.selectedKeys.size!==0&&(l.stopPropagation(),l.preventDefault(),e.clearSelection());break;case"Tab":if(!oe){if(l.shiftKey)i.current.focus();else{let o=Y.getFocusableTreeWalker(i.current,{tabbable:!0}),v,y;do y=o.lastChild(),y&&(v=y);while(y);v&&!v.contains(document.activeElement)&&H.focusWithoutScrolling(v)}break}}},D=p.useRef({top:0,left:0});w.useEvent(f,"scroll",L?void 0:()=>{var l,r,u,n;D.current={top:(u=(l=f.current)===null||l===void 0?void 0:l.scrollTop)!==null&&u!==void 0?u:0,left:(n=(r=f.current)===null||r===void 0?void 0:r.scrollLeft)!==null&&n!==void 0?n:0}});let ie=l=>{if(e.isFocused){l.currentTarget.contains(l.target)||e.setFocused(!1);return}if(l.currentTarget.contains(l.target)){if(e.setFocused(!0),e.focusedKey==null){var r,u;let c=d=>{d!=null&&(e.setFocusedKey(d),m&&!e.isSelected(d)&&e.replaceSelection(d))},a=l.relatedTarget;var n,s;a&&l.currentTarget.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_FOLLOWING?c((n=e.lastSelectedKey)!==null&&n!==void 0?n:(r=t.getLastKey)===null||r===void 0?void 0:r.call(t)):c((s=e.firstSelectedKey)!==null&&s!==void 0?s:(u=t.getFirstKey)===null||u===void 0?void 0:u.call(t))}else!L&&f.current&&(f.current.scrollTop=D.current.top,f.current.scrollLeft=D.current.left);if(e.focusedKey!=null&&f.current){let c=F.getItemElement(i,e.focusedKey);c instanceof HTMLElement&&(!c.contains(document.activeElement)&&!K&&H.focusWithoutScrolling(c),Q.getInteractionModality()==="keyboard"&&O.scrollIntoViewport(c,{containingElement:i.current}))}}},ne=l=>{l.currentTarget.contains(l.relatedTarget)||e.setFocused(!1)},E=p.useRef(!1);w.useEvent(i,J.FOCUS_EVENT,K?l=>{let{detail:r}=l;l.stopPropagation(),e.setFocused(!0),(r==null?void 0:r.focusStrategy)==="first"&&(E.current=!0)}:void 0);let U=G.useEffectEvent(()=>{var l,r;let u=(r=(l=t.getFirstKey)===null||l===void 0?void 0:l.call(t))!==null&&r!==void 0?r:null;u==null?(Y.moveVirtualFocus(i.current),e.collection.size>0&&(E.current=!1)):(e.setFocusedKey(u),E.current=!1)});j.useUpdateLayoutEffect(()=>{E.current&&U()},[e.collection,U]);let g=G.useEffectEvent(()=>{e.collection.size>0&&(E.current=!1)});j.useUpdateLayoutEffect(()=>{g()},[e.focusedKey,g]),w.useEvent(i,J.CLEAR_FOCUS_EVENT,K?l=>{var r;l.stopPropagation(),e.setFocused(!1),!((r=l.detail)===null||r===void 0)&&r.clearFocusKey&&e.setFocusedKey(null)}:void 0);const B=p.useRef(P),h=p.useRef(!1);p.useEffect(()=>{if(B.current){var l,r;let s=null;var u;P==="first"&&(s=(u=(l=t.getFirstKey)===null||l===void 0?void 0:l.call(t))!==null&&u!==void 0?u:null);var n;P==="last"&&(s=(n=(r=t.getLastKey)===null||r===void 0?void 0:r.call(t))!==null&&n!==void 0?n:null);let c=e.selectedKeys;if(c.size){for(let a of c)if(e.canSelectItem(a)){s=a;break}}e.setFocused(!0),e.setFocusedKey(s),s==null&&!K&&i.current&&X.focusSafely(i.current),e.collection.size>0&&(B.current=!1,h.current=!0)}});let I=p.useRef(e.focusedKey);p.useEffect(()=>{if(e.isFocused&&e.focusedKey!=null&&(e.focusedKey!==I.current||h.current)&&f.current&&i.current){let l=Q.getInteractionModality(),r=F.getItemElement(i,e.focusedKey);if(!(r instanceof HTMLElement))return;(l==="keyboard"||h.current)&&(O.scrollIntoView(f.current,r),l!=="virtual"&&O.scrollIntoViewport(r,{containingElement:i.current}))}!K&&e.isFocused&&e.focusedKey==null&&I.current!=null&&i.current&&X.focusSafely(i.current),I.current=e.focusedKey,h.current=!1}),w.useEvent(i,"react-aria-focus-scope-restore",l=>{l.preventDefault(),e.setFocused(!0)});let R={onKeyDown:ue,onFocus:ie,onBlur:ne,onMouseDown(l){f.current===l.target&&l.preventDefault()}},{typeSelectProps:ce}=fe.useTypeSelect({keyboardDelegate:t,selectionManager:e});te||(R=$.mergeProps(ce,R));let z;K||(z=e.focusedKey==null?0:-1);let se=F.useCollectionId(e.collection);return{collectionProps:$.mergeProps(R,{tabIndex:z,"data-collection":se})}}exports.useSelectableCollection=ye;
|
package/index276.mjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { getItemElement as V, useCollectionId as fe, isNonContiguousSelectionModifier as H } from "./index332.mjs";
|
|
2
2
|
import { useTypeSelect as ae } from "./index333.mjs";
|
|
3
3
|
import { mergeProps as G } from "./index150.mjs";
|
|
4
|
-
import { focusWithoutScrolling as j } from "./
|
|
5
|
-
import { useRouter as de } from "./
|
|
6
|
-
import { useUpdateLayoutEffect as q } from "./
|
|
7
|
-
import { useEvent as S } from "./
|
|
8
|
-
import { scrollIntoView as ve, scrollIntoViewport as J } from "./
|
|
9
|
-
import { useEffectEvent as Q } from "./
|
|
10
|
-
import { FOCUS_EVENT as pe, CLEAR_FOCUS_EVENT as ye } from "./
|
|
11
|
-
import { isCtrlKeyPressed as m } from "./
|
|
4
|
+
import { focusWithoutScrolling as j } from "./index256.mjs";
|
|
5
|
+
import { useRouter as de } from "./index257.mjs";
|
|
6
|
+
import { useUpdateLayoutEffect as q } from "./index260.mjs";
|
|
7
|
+
import { useEvent as S } from "./index265.mjs";
|
|
8
|
+
import { scrollIntoView as ve, scrollIntoViewport as J } from "./index267.mjs";
|
|
9
|
+
import { useEffectEvent as Q } from "./index266.mjs";
|
|
10
|
+
import { FOCUS_EVENT as pe, CLEAR_FOCUS_EVENT as ye } from "./index270.mjs";
|
|
11
|
+
import { isCtrlKeyPressed as m } from "./index271.mjs";
|
|
12
12
|
import { flushSync as be } from "react-dom";
|
|
13
13
|
import { useRef as $, useEffect as X } from "react";
|
|
14
|
-
import { getInteractionModality as Y } from "./
|
|
14
|
+
import { getInteractionModality as Y } from "./index323.mjs";
|
|
15
15
|
import { focusSafely as Z } from "./index331.mjs";
|
|
16
16
|
import { moveVirtualFocus as Ke, getFocusableTreeWalker as me } from "@react-aria/focus";
|
|
17
17
|
import { useLocale as $e } from "@react-aria/i18n";
|
package/index277.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("./index334.js"),y=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("./index334.js"),y=require("./index229.js"),g=require("react");function K(t){var l;let[e,s]=y.useControlledState(t.selectedKey,(l=t.defaultSelectedKey)!==null&&l!==void 0?l:null,t.onSelectionChange),i=g.useMemo(()=>e!=null?[e]:[],[e]),{collection:a,disabledKeys:u,selectionManager:d}=S.useListState({...t,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:i,onSelectionChange:o=>{if(o==="all")return;var n;let c=(n=o.values().next().value)!==null&&n!==void 0?n:null;c===e&&t.onSelectionChange&&t.onSelectionChange(c),s(c)}}),r=e!=null?a.getItem(e):null;return{collection:a,disabledKeys:u,selectionManager:d,selectedKey:e,setSelectedKey:s,selectedItem:r}}exports.useSingleSelectListState=K;
|
package/index277.mjs
CHANGED
package/index320.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 t=require("react"),e=t.createContext({register:()=>{}});e.displayName="PressResponderContext";exports.PressResponderContext=e;
|