@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/index273.mjs
CHANGED
|
@@ -1,20 +1,74 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import r from "./index290.mjs";
|
|
2
|
+
import o from "./index291.mjs";
|
|
3
|
+
import f from "./index292.mjs";
|
|
4
|
+
import t from "./index293.mjs";
|
|
5
|
+
import p from "./index294.mjs";
|
|
6
|
+
import $ from "./index295.mjs";
|
|
7
|
+
import e from "./index296.mjs";
|
|
8
|
+
import m from "./index297.mjs";
|
|
9
|
+
import s from "./index298.mjs";
|
|
10
|
+
import d from "./index299.mjs";
|
|
11
|
+
import c from "./index300.mjs";
|
|
12
|
+
import i from "./index301.mjs";
|
|
13
|
+
import x from "./index302.mjs";
|
|
14
|
+
import a from "./index303.mjs";
|
|
15
|
+
import b from "./index304.mjs";
|
|
16
|
+
import R from "./index305.mjs";
|
|
17
|
+
import l from "./index306.mjs";
|
|
18
|
+
import E from "./index307.mjs";
|
|
19
|
+
import S from "./index308.mjs";
|
|
20
|
+
import h from "./index309.mjs";
|
|
21
|
+
import L from "./index310.mjs";
|
|
22
|
+
import T from "./index311.mjs";
|
|
23
|
+
import u from "./index312.mjs";
|
|
24
|
+
import I from "./index313.mjs";
|
|
25
|
+
import P from "./index314.mjs";
|
|
26
|
+
import U from "./index315.mjs";
|
|
27
|
+
import k from "./index316.mjs";
|
|
28
|
+
import n from "./index317.mjs";
|
|
29
|
+
import v from "./index318.mjs";
|
|
30
|
+
import K from "./index319.mjs";
|
|
31
|
+
import N from "./index320.mjs";
|
|
32
|
+
import z from "./index321.mjs";
|
|
33
|
+
import A from "./index322.mjs";
|
|
34
|
+
import B from "./index323.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
|
+
};
|
|
18
72
|
export {
|
|
19
|
-
|
|
73
|
+
C as default
|
|
20
74
|
};
|
package/index274.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});let s=new WeakMap,i=[];function p(d,n=document.body){let o=new Set(d),a=new Set,u=t=>{for(let l of t.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))o.add(l);let r=l=>{if(o.has(l)||l.parentElement&&a.has(l.parentElement)&&l.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let h of o)if(l.contains(h))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},e=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r}),v=r(t);if(v===NodeFilter.FILTER_ACCEPT&&b(t),v!==NodeFilter.FILTER_REJECT){let l=e.nextNode();for(;l!=null;)b(l),l=e.nextNode()}},b=t=>{var r;let e=(r=s.get(t))!==null&&r!==void 0?r:0;t.getAttribute("aria-hidden")==="true"&&e===0||(e===0&&t.setAttribute("aria-hidden","true"),a.add(t),s.set(t,e+1))};i.length&&i[i.length-1].disconnect(),u(n);let c=new MutationObserver(t=>{for(let r of t)if(!(r.type!=="childList"||r.addedNodes.length===0)&&![...o,...a].some(e=>e.contains(r.target))){for(let e of r.removedNodes)e instanceof Element&&(o.delete(e),a.delete(e));for(let e of r.addedNodes)(e instanceof HTMLElement||e instanceof SVGElement)&&(e.dataset.liveAnnouncer==="true"||e.dataset.reactAriaTopLayer==="true")?o.add(e):e instanceof Element&&u(e)}});c.observe(n,{childList:!0,subtree:!0});let f={visibleNodes:o,hiddenNodes:a,observe(){c.observe(n,{childList:!0,subtree:!0})},disconnect(){c.disconnect()}};return i.push(f),()=>{c.disconnect();for(let t of a){let r=s.get(t);r!=null&&(r===1?(t.removeAttribute("aria-hidden"),s.delete(t)):s.set(t,r-1))}f===i[i.length-1]?(i.pop(),i.length&&i[i.length-1].observe()):i.splice(i.indexOf(f),1)}}function E(d){let n=i[i.length-1];if(n&&!n.visibleNodes.has(d))return n.visibleNodes.add(d),()=>{n.visibleNodes.delete(d)}}exports.ariaHideOutside=p;exports.keepVisible=E;
|
package/index274.mjs
CHANGED
|
@@ -1,5 +1,71 @@
|
|
|
1
|
-
|
|
1
|
+
let s = /* @__PURE__ */ new WeakMap(), i = [];
|
|
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
|
+
}
|
|
2
68
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
69
|
+
v as ariaHideOutside,
|
|
70
|
+
E as keepVisible
|
|
5
71
|
};
|
package/index275.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=require("react"),o=e.createContext({});function r(){var t;return(t=e.useContext(o))!==null&&t!==void 0?t:{}}exports.PortalContext=o;exports.useUNSAFE_PortalContext=r;
|
package/index275.mjs
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { useContext as e, createContext as o } from "react";
|
|
2
|
+
const r = /* @__PURE__ */ o({});
|
|
3
|
+
function a() {
|
|
4
|
+
var t;
|
|
5
|
+
return (t = e(r)) !== null && t !== void 0 ? t : {};
|
|
4
6
|
}
|
|
5
7
|
export {
|
|
6
|
-
|
|
8
|
+
r as PortalContext,
|
|
9
|
+
a as useUNSAFE_PortalContext
|
|
7
10
|
};
|
package/index276.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("./index326.js"),e=require("react");function n({children:r}){let t=e.useMemo(()=>({register:()=>{}}),[]);return e.createElement(o.PressResponderContext.Provider,{value:t},r)}exports.ClearPressResponder=n;
|
package/index276.mjs
CHANGED
|
@@ -1,22 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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);
|
|
1
|
+
import { PressResponderContext as t } from "./index326.mjs";
|
|
2
|
+
import a, { useMemo as o } from "react";
|
|
3
|
+
function n({ children: e }) {
|
|
4
|
+
let r = o(() => ({
|
|
5
|
+
register: () => {
|
|
6
|
+
}
|
|
7
|
+
}), []);
|
|
8
|
+
return /* @__PURE__ */ a.createElement(t.Provider, {
|
|
9
|
+
value: r
|
|
10
|
+
}, e);
|
|
19
11
|
}
|
|
20
12
|
export {
|
|
21
|
-
n as
|
|
13
|
+
n as ClearPressResponder
|
|
22
14
|
};
|
package/index278.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("./index336.js"),j=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("./index336.js"),j=require("./index234.js"),N=require("./index334.js"),z=require("./index335.js"),G=require("./index181.js"),A=require("./index154.js"),L=require("./index245.js"),H=require("./index263.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/index278.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { getCollectionId as R, isNonContiguousSelectionModifier as N } from "./index336.mjs";
|
|
2
|
-
import { usePress as j } from "./
|
|
3
|
-
import { useLongPress as q } from "./
|
|
2
|
+
import { usePress as j } from "./index234.mjs";
|
|
3
|
+
import { useLongPress as q } from "./index334.mjs";
|
|
4
4
|
import { focusSafely as z } from "./index335.mjs";
|
|
5
5
|
import { useId as G } from "./index181.mjs";
|
|
6
6
|
import { mergeProps as K } from "./index154.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 "./index245.mjs";
|
|
8
|
+
import { isCtrlKeyPressed as Q } from "./index263.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/index280.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const F=require("./index336.js"),fe=require("./index337.js"),$=require("./index154.js"),H=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const F=require("./index336.js"),fe=require("./index337.js"),$=require("./index154.js"),H=require("./index244.js"),ae=require("./index245.js"),j=require("./index250.js"),w=require("./index257.js"),O=require("./index259.js"),G=require("./index258.js"),J=require("./index262.js"),b=require("./index263.js"),de=require("react-dom"),p=require("react"),Q=require("./index324.js"),X=require("./index335.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/index280.mjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { getItemElement as V, useCollectionId as fe, isNonContiguousSelectionModifier as H } from "./index336.mjs";
|
|
2
2
|
import { useTypeSelect as ae } from "./index337.mjs";
|
|
3
3
|
import { mergeProps as G } from "./index154.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 "./index244.mjs";
|
|
5
|
+
import { useRouter as de } from "./index245.mjs";
|
|
6
|
+
import { useUpdateLayoutEffect as q } from "./index250.mjs";
|
|
7
|
+
import { useEvent as S } from "./index257.mjs";
|
|
8
|
+
import { scrollIntoView as ve, scrollIntoViewport as J } from "./index259.mjs";
|
|
9
|
+
import { useEffectEvent as Q } from "./index258.mjs";
|
|
10
|
+
import { FOCUS_EVENT as pe, CLEAR_FOCUS_EVENT as ye } from "./index262.mjs";
|
|
11
|
+
import { isCtrlKeyPressed as m } from "./index263.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 "./index324.mjs";
|
|
15
15
|
import { focusSafely as Z } from "./index335.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/index281.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("./index338.js"),y=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("./index338.js"),y=require("./index266.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/index281.mjs
CHANGED
package/index324.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 l=require("./index328.js"),u=require("./index241.js"),m=require("./index246.js"),L=require("./index260.js");require("react");let f=null,y=new Set,a=new Map,i=!1,c=!1;function d(e,n){for(let t of y)t(e,n)}function g(e){return!(e.metaKey||!m.isMac()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function s(e){i=!0,g(e)&&(f="keyboard",d("keyboard",e))}function o(e){f="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(i=!0,d("pointer",e))}function b(e){L.isVirtualClick(e)&&(i=!0,f="virtual")}function $(e){e.target===window||e.target===document||l.ignoreFocusEvent||!e.isTrusted||(!i&&!c&&(f="virtual",d("virtual",e)),i=!1,c=!1)}function E(){l.ignoreFocusEvent||(i=!1,c=!0)}function v(e){if(typeof window>"u"||a.get(u.getOwnerWindow(e)))return;const n=u.getOwnerWindow(e),t=u.getOwnerDocument(e);let r=n.HTMLElement.prototype.focus;n.HTMLElement.prototype.focus=function(){i=!0,r.apply(this,arguments)},t.addEventListener("keydown",s,!0),t.addEventListener("keyup",s,!0),t.addEventListener("click",b,!0),n.addEventListener("focus",$,!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",()=>{p(e)},{once:!0}),a.set(n,{focus:r})}const p=(e,n)=>{const t=u.getOwnerWindow(e),r=u.getOwnerDocument(e);n&&r.removeEventListener("DOMContentLoaded",n),a.has(t)&&(t.HTMLElement.prototype.focus=a.get(t).focus,r.removeEventListener("keydown",s,!0),r.removeEventListener("keyup",s,!0),r.removeEventListener("click",b,!0),t.removeEventListener("focus",$,!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)),a.delete(t))};function w(e){const n=u.getOwnerDocument(e);let t;return n.readyState!=="loading"?v(e):(t=()=>{v(e)},n.addEventListener("DOMContentLoaded",t)),()=>p(e,t)}typeof document<"u"&&w();function O(){return f}function k(e){f=e,d(e,null)}exports.addWindowFocusTracking=w;exports.getInteractionModality=O;exports.hasSetupGlobalListeners=a;exports.setInteractionModality=k;
|
package/index324.mjs
CHANGED
|
@@ -1,9 +1,65 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { ignoreFocusEvent as b } from "./index328.mjs";
|
|
2
|
+
import { getOwnerDocument as v, getOwnerWindow as s } from "./index241.mjs";
|
|
3
|
+
import { isMac as L } from "./index246.mjs";
|
|
4
|
+
import { isVirtualClick as y } from "./index260.mjs";
|
|
5
|
+
import "react";
|
|
6
|
+
let f = null, w = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), a = !1, c = !1;
|
|
7
|
+
function u(e, n) {
|
|
8
|
+
for (let t of w) t(e, n);
|
|
9
|
+
}
|
|
10
|
+
function g(e) {
|
|
11
|
+
return !(e.metaKey || !L() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
|
|
12
|
+
}
|
|
13
|
+
function d(e) {
|
|
14
|
+
a = !0, g(e) && (f = "keyboard", u("keyboard", e));
|
|
15
|
+
}
|
|
16
|
+
function o(e) {
|
|
17
|
+
f = "pointer", (e.type === "mousedown" || e.type === "pointerdown") && (a = !0, u("pointer", e));
|
|
18
|
+
}
|
|
19
|
+
function l(e) {
|
|
20
|
+
y(e) && (a = !0, f = "virtual");
|
|
21
|
+
}
|
|
22
|
+
function p(e) {
|
|
23
|
+
e.target === window || e.target === document || b || !e.isTrusted || (!a && !c && (f = "virtual", u("virtual", e)), a = !1, c = !1);
|
|
24
|
+
}
|
|
25
|
+
function E() {
|
|
26
|
+
b || (a = !1, c = !0);
|
|
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);
|
|
59
|
+
}
|
|
7
60
|
export {
|
|
8
|
-
|
|
61
|
+
k as addWindowFocusTracking,
|
|
62
|
+
D as getInteractionModality,
|
|
63
|
+
i as hasSetupGlobalListeners,
|
|
64
|
+
F as setInteractionModality
|
|
9
65
|
};
|
package/index325.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("./index335.js"),d=require("./index327.js"),P=require("./index329.js"),n=require("./index154.js"),x=require("./index252.js"),r=require("react");let a=r.createContext(null);function y(e){let t=r.useContext(a)||{};x.useSyncRef(t,e);let{ref:u,...o}=t;return o}function $(e,t){let{focusProps:u}=d.useFocus(e),{keyboardProps:o}=P.useKeyboard(e),f=n.mergeProps(u,o),l=y(t),i=e.isDisabled?{}:l,s=r.useRef(e.autoFocus);r.useEffect(()=>{s.current&&t.current&&b.focusSafely(t.current),s.current=!1},[t]);let c=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(c=void 0),{focusableProps:n.mergeProps({...f,tabIndex:c},i)}}exports.FocusableContext=a;exports.useFocusable=$;
|
package/index325.mjs
CHANGED
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { focusSafely as d } from "./index335.mjs";
|
|
2
|
+
import { useFocus as n } from "./index327.mjs";
|
|
3
|
+
import { useKeyboard as $ } from "./index329.mjs";
|
|
4
|
+
import { mergeProps as c } from "./index154.mjs";
|
|
5
|
+
import { useSyncRef as l } from "./index252.mjs";
|
|
6
|
+
import i, { useRef as x, useEffect as p, useContext as m } from "react";
|
|
7
|
+
let P = /* @__PURE__ */ i.createContext(null);
|
|
8
|
+
function F(e) {
|
|
9
|
+
let t = m(P) || {};
|
|
10
|
+
l(t, e);
|
|
11
|
+
let { ref: o, ...r } = t;
|
|
12
|
+
return r;
|
|
13
|
+
}
|
|
14
|
+
function S(e, t) {
|
|
15
|
+
let { focusProps: o } = n(e), { keyboardProps: r } = $(e), s = c(o, r), u = F(t), b = e.isDisabled ? {} : u, f = x(e.autoFocus);
|
|
16
|
+
p(() => {
|
|
17
|
+
f.current && t.current && d(t.current), f.current = !1;
|
|
10
18
|
}, [
|
|
11
|
-
o,
|
|
12
19
|
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
20
|
]);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
let a = e.excludeFromTabOrder ? -1 : 0;
|
|
22
|
+
return e.isDisabled && (a = void 0), {
|
|
23
|
+
focusableProps: c({
|
|
24
|
+
...s,
|
|
25
|
+
tabIndex: a
|
|
26
|
+
}, b)
|
|
26
27
|
};
|
|
27
28
|
}
|
|
28
29
|
export {
|
|
29
|
-
|
|
30
|
+
P as FocusableContext,
|
|
31
|
+
S as useFocusable
|
|
30
32
|
};
|
package/index326.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;
|
package/index326.mjs
CHANGED
|
@@ -1,95 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
});
|
|
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()));
|
|
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;
|
|
88
|
-
}
|
|
1
|
+
import e from "react";
|
|
2
|
+
const t = e.createContext({
|
|
3
|
+
register: () => {
|
|
4
|
+
}
|
|
5
|
+
});
|
|
6
|
+
t.displayName = "PressResponderContext";
|
|
89
7
|
export {
|
|
90
|
-
|
|
91
|
-
d as ignoreFocusEvent,
|
|
92
|
-
y as preventFocus,
|
|
93
|
-
h as setEventTarget,
|
|
94
|
-
I as useSyntheticBlurEvent
|
|
8
|
+
t as PressResponderContext
|
|
95
9
|
};
|