@okam/stack-ui 1.42.1 → 1.42.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 +13 -0
- package/components/ShareButton/interface.d.ts +0 -1
- package/index151.js +1 -1
- package/index151.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/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/index167.js +1 -1
- package/index167.mjs +2 -2
- 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/index187.js +1 -1
- package/index187.mjs +5 -11
- package/index188.js +2 -1
- package/index188.mjs +49 -5
- package/index189.js +1 -2
- package/index189.mjs +11 -49
- package/index232.js +1 -1
- package/index232.mjs +132 -117
- package/index233.js +1 -1
- package/index233.mjs +196 -26
- package/index234.js +1 -1
- package/index234.mjs +18 -69
- package/index235.js +1 -1
- package/index235.mjs +4 -382
- package/index236.js +1 -1
- package/index236.mjs +28 -46
- package/index237.js +1 -1
- package/index237.mjs +50 -4
- package/index238.js +1 -1
- package/index238.mjs +52 -22
- package/index239.js +1 -1
- package/index239.mjs +46 -45
- package/index240.js +1 -1
- package/index240.mjs +96 -4
- package/index241.js +1 -1
- package/index241.mjs +5 -24
- package/index242.js +1 -1
- package/index242.mjs +6 -12
- package/index243.js +1 -1
- package/index243.mjs +41 -4
- package/index244.js +1 -1
- package/index244.mjs +72 -15
- package/index245.js +1 -1
- package/index245.mjs +14 -42
- package/index246.js +1 -1
- package/index246.mjs +66 -55
- package/index247.js +1 -1
- package/index247.mjs +7 -41
- package/index248.js +1 -1
- package/index248.mjs +10 -27
- package/index249.js +1 -1
- package/index249.mjs +46 -30
- package/index250.js +1 -1
- package/index250.mjs +124 -13
- package/index251.js +1 -1
- package/index251.mjs +27 -10
- package/index252.js +1 -1
- package/index252.mjs +69 -24
- package/index253.js +1 -1
- package/index253.mjs +380 -8
- package/index254.js +1 -1
- package/index254.mjs +46 -6
- package/index255.js +1 -1
- package/index255.mjs +24 -5
- package/index256.js +1 -1
- package/index256.mjs +24 -7
- package/index257.js +1 -1
- package/index257.mjs +12 -29
- package/index258.js +1 -1
- package/index258.mjs +4 -18
- package/index259.js +1 -1
- package/index259.mjs +14 -13
- package/index260.js +1 -1
- package/index260.mjs +37 -38
- package/index261.js +1 -1
- package/index261.mjs +56 -7
- package/index262.js +1 -1
- package/index262.mjs +27 -16
- package/index263.js +1 -1
- package/index263.mjs +32 -3
- package/index264.js +1 -1
- package/index264.mjs +10 -4
- package/index265.js +1 -1
- package/index265.mjs +9 -19
- package/index266.js +1 -1
- package/index266.mjs +5 -54
- package/index267.js +1 -1
- package/index267.mjs +7 -140
- package/index268.js +1 -1
- package/index268.mjs +28 -196
- package/index269.js +1 -1
- package/index269.mjs +14 -18
- package/index270.js +1 -1
- package/index270.mjs +12 -48
- package/index271.js +1 -1
- package/index271.mjs +40 -45
- package/index272.js +1 -1
- package/index272.mjs +7 -96
- package/index273.js +1 -1
- package/index273.mjs +18 -72
- package/index274.js +1 -1
- package/index274.mjs +3 -69
- package/index275.js +1 -1
- package/index275.mjs +4 -7
- package/index276.js +1 -1
- package/index276.mjs +19 -11
- package/index278.js +1 -1
- package/index278.mjs +3 -3
- 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 +7 -63
- package/index325.js +1 -1
- package/index325.mjs +28 -7
- package/index326.js +1 -1
- package/index326.mjs +89 -24
- package/index327.js +1 -1
- package/index327.mjs +58 -88
- package/index330.js +1 -1
- package/index330.mjs +3 -3
- package/index333.js +1 -1
- package/index333.mjs +5 -5
- package/index334.js +1 -1
- package/index334.mjs +2 -2
- 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 +1 -1
- package/index8.js +1 -1
- package/index8.mjs +32 -32
- package/package.json +1 -1
package/index259.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function n(r){var o,e,t="";if(typeof r=="string"||typeof r=="number")t+=r;else if(typeof r=="object")if(Array.isArray(r)){var u=r.length;for(o=0;o<u;o++)r[o]&&(e=n(r[o]))&&(t&&(t+=" "),t+=e)}else for(e in r)r[e]&&(t&&(t+=" "),t+=e);return t}function f(){for(var r,o,e=0,t="",u=arguments.length;e<u;e++)(r=arguments[e])&&(o=n(r))&&(t&&(t+=" "),t+=o);return t}exports.clsx=f;exports.default=f;
|
package/index259.mjs
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
},
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
function a(r) {
|
|
2
|
+
var n, f, t = "";
|
|
3
|
+
if (typeof r == "string" || typeof r == "number") t += r;
|
|
4
|
+
else if (typeof r == "object") if (Array.isArray(r)) {
|
|
5
|
+
var o = r.length;
|
|
6
|
+
for (n = 0; n < o; n++) r[n] && (f = a(r[n])) && (t && (t += " "), t += f);
|
|
7
|
+
} else for (f in r) r[f] && (t && (t += " "), t += f);
|
|
8
|
+
return t;
|
|
9
|
+
}
|
|
10
|
+
function i() {
|
|
11
|
+
for (var r, n, f = 0, t = "", o = arguments.length; f < o; f++) (r = arguments[f]) && (n = a(r)) && (t && (t += " "), t += n);
|
|
12
|
+
return t;
|
|
13
13
|
}
|
|
14
14
|
export {
|
|
15
|
-
|
|
15
|
+
i as clsx,
|
|
16
|
+
i as default
|
|
16
17
|
};
|
package/index260.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 c(l){if(n())l.focus({preventScroll:!0});else{let e=s(l);l.focus(),f(e)}}let r=null;function n(){if(r==null){r=!1;try{document.createElement("div").focus({get preventScroll(){return r=!0,!0}})}catch{}}return r}function s(l){let e=l.parentNode,o=[],t=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==t;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&o.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return t instanceof HTMLElement&&o.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),o}function f(l){for(let{element:e,scrollTop:o,scrollLeft:t}of l)e.scrollTop=o,e.scrollLeft=t}exports.focusWithoutScrolling=c;
|
package/index260.mjs
CHANGED
|
@@ -1,46 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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;
|
|
13
|
-
}
|
|
14
|
-
e = e.offsetParent;
|
|
1
|
+
function f(l) {
|
|
2
|
+
if (c()) l.focus({
|
|
3
|
+
preventScroll: !0
|
|
4
|
+
});
|
|
5
|
+
else {
|
|
6
|
+
let e = n(l);
|
|
7
|
+
l.focus(), s(e);
|
|
15
8
|
}
|
|
16
|
-
return l;
|
|
17
9
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
o == null || (t = o.scrollIntoView) === null || t === void 0 || t.call(o, {
|
|
28
|
-
block: "nearest"
|
|
10
|
+
let r = null;
|
|
11
|
+
function c() {
|
|
12
|
+
if (r == null) {
|
|
13
|
+
r = !1;
|
|
14
|
+
try {
|
|
15
|
+
document.createElement("div").focus({
|
|
16
|
+
get preventScroll() {
|
|
17
|
+
return r = !0, !0;
|
|
18
|
+
}
|
|
29
19
|
});
|
|
30
|
-
|
|
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
|
-
}
|
|
20
|
+
} catch {
|
|
40
21
|
}
|
|
41
22
|
}
|
|
23
|
+
return r;
|
|
24
|
+
}
|
|
25
|
+
function n(l) {
|
|
26
|
+
let e = l.parentNode, o = [], t = document.scrollingElement || document.documentElement;
|
|
27
|
+
for (; e instanceof HTMLElement && e !== t; )
|
|
28
|
+
(e.offsetHeight < e.scrollHeight || e.offsetWidth < e.scrollWidth) && o.push({
|
|
29
|
+
element: e,
|
|
30
|
+
scrollTop: e.scrollTop,
|
|
31
|
+
scrollLeft: e.scrollLeft
|
|
32
|
+
}), e = e.parentNode;
|
|
33
|
+
return t instanceof HTMLElement && o.push({
|
|
34
|
+
element: t,
|
|
35
|
+
scrollTop: t.scrollTop,
|
|
36
|
+
scrollLeft: t.scrollLeft
|
|
37
|
+
}), o;
|
|
38
|
+
}
|
|
39
|
+
function s(l) {
|
|
40
|
+
for (let { element: e, scrollTop: o, scrollLeft: t } of l)
|
|
41
|
+
e.scrollTop = o, e.scrollLeft = t;
|
|
42
42
|
}
|
|
43
43
|
export {
|
|
44
|
-
|
|
45
|
-
B as scrollIntoViewport
|
|
44
|
+
f as focusWithoutScrolling
|
|
46
45
|
};
|
package/index261.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 y=require("./index260.js"),a=require("./index243.js"),f=require("react"),s=f.createContext({isNative:!0,open:K,useHref:e=>e});function b(){return f.useContext(s)}function l(e,i,t=!0){var n,d;let{metaKey:r,ctrlKey:o,altKey:u,shiftKey:c}=i;a.isFirefox()&&(!((d=window.event)===null||d===void 0||(n=d.type)===null||n===void 0)&&n.startsWith("key"))&&e.target==="_blank"&&(a.isMac()?r=!0:o=!0);let v=a.isWebKit()&&a.isMac()&&!a.isIPad()&&process.env.NODE_ENV!=="test"?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:r,ctrlKey:o,altKey:u,shiftKey:c}):new MouseEvent("click",{metaKey:r,ctrlKey:o,altKey:u,shiftKey:c,bubbles:!0,cancelable:!0});l.isOpening=t,y.focusWithoutScrolling(e),e.dispatchEvent(v),l.isOpening=!1}l.isOpening=!1;function h(e,i){if(e instanceof HTMLAnchorElement)i(e);else if(e.hasAttribute("data-href")){let t=document.createElement("a");t.href=e.getAttribute("data-href"),e.hasAttribute("data-target")&&(t.target=e.getAttribute("data-target")),e.hasAttribute("data-rel")&&(t.rel=e.getAttribute("data-rel")),e.hasAttribute("data-download")&&(t.download=e.getAttribute("data-download")),e.hasAttribute("data-ping")&&(t.ping=e.getAttribute("data-ping")),e.hasAttribute("data-referrer-policy")&&(t.referrerPolicy=e.getAttribute("data-referrer-policy")),e.appendChild(t),i(t),e.removeChild(t)}}function K(e,i){h(e,t=>l(t,i))}function $(e){let i=b();var t;const n=i.useHref((t=e==null?void 0:e.href)!==null&&t!==void 0?t:"");return{href:e!=null&&e.href?n:void 0,target:e==null?void 0:e.target,rel:e==null?void 0:e.rel,download:e==null?void 0:e.download,ping:e==null?void 0:e.ping,referrerPolicy:e==null?void 0:e.referrerPolicy}}exports.openLink=l;exports.useLinkProps=$;exports.useRouter=b;
|
package/index261.mjs
CHANGED
|
@@ -1,11 +1,60 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { focusWithoutScrolling as b } from "./index260.mjs";
|
|
2
|
+
import { isFirefox as v, isMac as u, isWebKit as $, isIPad as s } from "./index243.mjs";
|
|
3
|
+
import { useContext as y, createContext as h } from "react";
|
|
4
|
+
const K = /* @__PURE__ */ h({
|
|
5
|
+
isNative: !0,
|
|
6
|
+
open: x,
|
|
7
|
+
useHref: (e) => e
|
|
8
|
+
});
|
|
9
|
+
function m() {
|
|
10
|
+
return y(K);
|
|
4
11
|
}
|
|
5
|
-
function
|
|
6
|
-
|
|
12
|
+
function n(e, i, t = !0) {
|
|
13
|
+
var a, d;
|
|
14
|
+
let { metaKey: r, ctrlKey: l, altKey: o, shiftKey: c } = i;
|
|
15
|
+
v() && (!((d = window.event) === null || d === void 0 || (a = d.type) === null || a === void 0) && a.startsWith("key")) && e.target === "_blank" && (u() ? r = !0 : l = !0);
|
|
16
|
+
let f = $() && u() && !s() && process.env.NODE_ENV !== "test" ? new KeyboardEvent("keydown", {
|
|
17
|
+
keyIdentifier: "Enter",
|
|
18
|
+
metaKey: r,
|
|
19
|
+
ctrlKey: l,
|
|
20
|
+
altKey: o,
|
|
21
|
+
shiftKey: c
|
|
22
|
+
}) : new MouseEvent("click", {
|
|
23
|
+
metaKey: r,
|
|
24
|
+
ctrlKey: l,
|
|
25
|
+
altKey: o,
|
|
26
|
+
shiftKey: c,
|
|
27
|
+
bubbles: !0,
|
|
28
|
+
cancelable: !0
|
|
29
|
+
});
|
|
30
|
+
n.isOpening = t, b(e), e.dispatchEvent(f), n.isOpening = !1;
|
|
31
|
+
}
|
|
32
|
+
n.isOpening = !1;
|
|
33
|
+
function w(e, i) {
|
|
34
|
+
if (e instanceof HTMLAnchorElement) i(e);
|
|
35
|
+
else if (e.hasAttribute("data-href")) {
|
|
36
|
+
let t = document.createElement("a");
|
|
37
|
+
t.href = e.getAttribute("data-href"), e.hasAttribute("data-target") && (t.target = e.getAttribute("data-target")), e.hasAttribute("data-rel") && (t.rel = e.getAttribute("data-rel")), e.hasAttribute("data-download") && (t.download = e.getAttribute("data-download")), e.hasAttribute("data-ping") && (t.ping = e.getAttribute("data-ping")), e.hasAttribute("data-referrer-policy") && (t.referrerPolicy = e.getAttribute("data-referrer-policy")), e.appendChild(t), i(t), e.removeChild(t);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function x(e, i) {
|
|
41
|
+
w(e, (t) => n(t, i));
|
|
42
|
+
}
|
|
43
|
+
function E(e) {
|
|
44
|
+
let i = m();
|
|
45
|
+
var t;
|
|
46
|
+
const a = i.useHref((t = e == null ? void 0 : e.href) !== null && t !== void 0 ? t : "");
|
|
47
|
+
return {
|
|
48
|
+
href: e != null && e.href ? a : void 0,
|
|
49
|
+
target: e == null ? void 0 : e.target,
|
|
50
|
+
rel: e == null ? void 0 : e.rel,
|
|
51
|
+
download: e == null ? void 0 : e.download,
|
|
52
|
+
ping: e == null ? void 0 : e.ping,
|
|
53
|
+
referrerPolicy: e == null ? void 0 : e.referrerPolicy
|
|
54
|
+
};
|
|
7
55
|
}
|
|
8
56
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
57
|
+
n as openLink,
|
|
58
|
+
E as useLinkProps,
|
|
59
|
+
m as useRouter
|
|
11
60
|
};
|
package/index262.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 n=new Map,a=new Set;function o(){if(typeof window>"u")return;function r(e){return"propertyName"in e}let d=e=>{if(!r(e)||!e.target)return;let t=n.get(e.target);t||(t=new Set,n.set(e.target,t),e.target.addEventListener("transitioncancel",i,{once:!0})),t.add(e.propertyName)},i=e=>{if(!r(e)||!e.target)return;let t=n.get(e.target);if(t&&(t.delete(e.propertyName),t.size===0&&(e.target.removeEventListener("transitioncancel",i),n.delete(e.target)),n.size===0)){for(let s of a)s();a.clear()}};document.body.addEventListener("transitionrun",d),document.body.addEventListener("transitionend",i)}typeof document<"u"&&(document.readyState!=="loading"?o():document.addEventListener("DOMContentLoaded",o));function c(r){requestAnimationFrame(()=>{n.size===0?r():a.add(r)})}exports.runAfterTransition=c;
|
package/index262.mjs
CHANGED
|
@@ -1,20 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
let n = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Set();
|
|
2
|
+
function o() {
|
|
3
|
+
if (typeof window > "u") return;
|
|
4
|
+
function r(t) {
|
|
5
|
+
return "propertyName" in t;
|
|
6
|
+
}
|
|
7
|
+
let d = (t) => {
|
|
8
|
+
if (!r(t) || !t.target) return;
|
|
9
|
+
let e = n.get(t.target);
|
|
10
|
+
e || (e = /* @__PURE__ */ new Set(), n.set(t.target, e), t.target.addEventListener("transitioncancel", i, {
|
|
11
|
+
once: !0
|
|
12
|
+
})), e.add(t.propertyName);
|
|
13
|
+
}, i = (t) => {
|
|
14
|
+
if (!r(t) || !t.target) return;
|
|
15
|
+
let e = n.get(t.target);
|
|
16
|
+
if (e && (e.delete(t.propertyName), e.size === 0 && (t.target.removeEventListener("transitioncancel", i), n.delete(t.target)), n.size === 0)) {
|
|
17
|
+
for (let s of a) s();
|
|
18
|
+
a.clear();
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
document.body.addEventListener("transitionrun", d), document.body.addEventListener("transitionend", i);
|
|
22
|
+
}
|
|
23
|
+
typeof document < "u" && (document.readyState !== "loading" ? o() : document.addEventListener("DOMContentLoaded", o));
|
|
24
|
+
function c(r) {
|
|
25
|
+
requestAnimationFrame(() => {
|
|
26
|
+
n.size === 0 ? r() : a.add(r);
|
|
6
27
|
});
|
|
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
28
|
}
|
|
18
29
|
export {
|
|
19
|
-
|
|
30
|
+
c as runAfterTransition
|
|
20
31
|
};
|
package/index263.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("react");function b(){let a=o.useRef(new Map),d=o.useCallback((e,l,t,r)=>{let n=r!=null&&r.once?(...c)=>{a.current.delete(t),t(...c)}:t;a.current.set(t,{type:l,eventTarget:e,fn:n,options:r}),e.addEventListener(l,n,r)},[]),s=o.useCallback((e,l,t,r)=>{var n;let c=((n=a.current.get(t))===null||n===void 0?void 0:n.fn)||t;e.removeEventListener(l,c,r),a.current.delete(t)},[]),u=o.useCallback(()=>{a.current.forEach((e,l)=>{s(e.eventTarget,e.type,l,e.options)})},[s]);return o.useEffect(()=>u,[u]),{addGlobalListener:d,removeGlobalListener:s,removeAllGlobalListeners:u}}exports.useGlobalListeners=b;
|
package/index263.mjs
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
|
-
|
|
1
|
+
import { useRef as c, useCallback as f, useEffect as b } from "react";
|
|
2
|
+
function L() {
|
|
3
|
+
let o = c(/* @__PURE__ */ new Map()), u = f((e, l, r, t) => {
|
|
4
|
+
let n = t != null && t.once ? (...d) => {
|
|
5
|
+
o.current.delete(r), r(...d);
|
|
6
|
+
} : r;
|
|
7
|
+
o.current.set(r, {
|
|
8
|
+
type: l,
|
|
9
|
+
eventTarget: e,
|
|
10
|
+
fn: n,
|
|
11
|
+
options: t
|
|
12
|
+
}), e.addEventListener(l, n, t);
|
|
13
|
+
}, []), a = f((e, l, r, t) => {
|
|
14
|
+
var n;
|
|
15
|
+
let d = ((n = o.current.get(r)) === null || n === void 0 ? void 0 : n.fn) || r;
|
|
16
|
+
e.removeEventListener(l, d, t), o.current.delete(r);
|
|
17
|
+
}, []), s = f(() => {
|
|
18
|
+
o.current.forEach((e, l) => {
|
|
19
|
+
a(e.eventTarget, e.type, l, e.options);
|
|
20
|
+
});
|
|
21
|
+
}, [
|
|
22
|
+
a
|
|
23
|
+
]);
|
|
24
|
+
return b(() => s, [
|
|
25
|
+
s
|
|
26
|
+
]), {
|
|
27
|
+
addGlobalListener: u,
|
|
28
|
+
removeGlobalListener: a,
|
|
29
|
+
removeAllGlobalListeners: s
|
|
30
|
+
};
|
|
31
|
+
}
|
|
2
32
|
export {
|
|
3
|
-
|
|
4
|
-
c as FOCUS_EVENT
|
|
33
|
+
L as useGlobalListeners
|
|
5
34
|
};
|
package/index264.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("./index235.js"),f=require("react");function a(c,t){const e=f.useRef(!0),u=f.useRef(null);r.useLayoutEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),r.useLayoutEffect(()=>{e.current?e.current=!1:(!u.current||t.some((s,o)=>!Object.is(s,u[o])))&&c(),u.current=t},t)}exports.useUpdateLayoutEffect=a;
|
package/index264.mjs
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { useLayoutEffect as f } from "./index235.mjs";
|
|
2
|
+
import { useRef as u } from "react";
|
|
3
|
+
function i(c, r) {
|
|
4
|
+
const t = u(!0), e = u(null);
|
|
5
|
+
f(() => (t.current = !0, () => {
|
|
6
|
+
t.current = !1;
|
|
7
|
+
}), []), f(() => {
|
|
8
|
+
t.current ? t.current = !1 : (!e.current || r.some((a, o) => !Object.is(a, e[o]))) && c(), e.current = r;
|
|
9
|
+
}, r);
|
|
4
10
|
}
|
|
5
11
|
export {
|
|
6
|
-
|
|
12
|
+
i as useUpdateLayoutEffect
|
|
7
13
|
};
|
package/index265.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 u=require("./index235.js");function f(e,r){u.useLayoutEffect(()=>{if(e&&e.ref&&r)return e.ref.current=r.current,()=>{e.ref&&(e.ref.current=null)}})}exports.useSyncRef=f;
|
package/index265.mjs
CHANGED
|
@@ -1,22 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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);
|
|
1
|
+
import { useLayoutEffect as f } from "./index235.mjs";
|
|
2
|
+
function u(r, e) {
|
|
3
|
+
f(() => {
|
|
4
|
+
if (r && r.ref && e)
|
|
5
|
+
return r.ref.current = e.current, () => {
|
|
6
|
+
r.ref && (r.ref.current = null);
|
|
7
|
+
};
|
|
8
|
+
});
|
|
19
9
|
}
|
|
20
10
|
export {
|
|
21
|
-
|
|
11
|
+
u as useSyncRef
|
|
22
12
|
};
|
package/index266.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 i(e,r){if(!e)return!1;let l=window.getComputedStyle(e),t=/(auto|scroll)/.test(l.overflow+l.overflowX+l.overflowY);return t&&r&&(t=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),t}exports.isScrollable=i;
|
package/index266.mjs
CHANGED
|
@@ -1,57 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { useGlobalListeners as L } from "./index249.mjs";
|
|
6
|
-
function S(b) {
|
|
7
|
-
let { isDisabled: h, onBlurWithin: i, onFocusWithin: o, onFocusWithinChange: t } = b, r = x({
|
|
8
|
-
isFocusWithin: !1
|
|
9
|
-
}), { addGlobalListener: c, removeAllGlobalListeners: s } = L(), n = $((e) => {
|
|
10
|
-
e.currentTarget.contains(e.target) && r.current.isFocusWithin && !e.currentTarget.contains(e.relatedTarget) && (r.current.isFocusWithin = !1, s(), i && i(e), t && t(!1));
|
|
11
|
-
}, [
|
|
12
|
-
i,
|
|
13
|
-
t,
|
|
14
|
-
r,
|
|
15
|
-
s
|
|
16
|
-
]), u = F(n), g = $((e) => {
|
|
17
|
-
if (!e.currentTarget.contains(e.target)) return;
|
|
18
|
-
const a = G(e.target), p = E(a);
|
|
19
|
-
if (!r.current.isFocusWithin && p === T(e.nativeEvent)) {
|
|
20
|
-
o && o(e), t && t(!0), r.current.isFocusWithin = !0, u(e);
|
|
21
|
-
let f = e.currentTarget;
|
|
22
|
-
c(a, "focus", (l) => {
|
|
23
|
-
if (r.current.isFocusWithin && !B(f, l.target)) {
|
|
24
|
-
let d = new a.defaultView.FocusEvent("blur", {
|
|
25
|
-
relatedTarget: l.target
|
|
26
|
-
});
|
|
27
|
-
W(d, f);
|
|
28
|
-
let m = v(d);
|
|
29
|
-
n(m);
|
|
30
|
-
}
|
|
31
|
-
}, {
|
|
32
|
-
capture: !0
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
}, [
|
|
36
|
-
o,
|
|
37
|
-
t,
|
|
38
|
-
u,
|
|
39
|
-
c,
|
|
40
|
-
n
|
|
41
|
-
]);
|
|
42
|
-
return h ? {
|
|
43
|
-
focusWithinProps: {
|
|
44
|
-
// These cannot be null, that would conflict in mergeProps
|
|
45
|
-
onFocus: void 0,
|
|
46
|
-
onBlur: void 0
|
|
47
|
-
}
|
|
48
|
-
} : {
|
|
49
|
-
focusWithinProps: {
|
|
50
|
-
onFocus: g,
|
|
51
|
-
onBlur: n
|
|
52
|
-
}
|
|
53
|
-
};
|
|
1
|
+
function c(l, r) {
|
|
2
|
+
if (!l) return !1;
|
|
3
|
+
let t = window.getComputedStyle(l), e = /(auto|scroll)/.test(t.overflow + t.overflowX + t.overflowY);
|
|
4
|
+
return e && r && (e = l.scrollHeight !== l.clientHeight || l.scrollWidth !== l.clientWidth), e;
|
|
54
5
|
}
|
|
55
6
|
export {
|
|
56
|
-
|
|
7
|
+
c as isScrollable
|
|
57
8
|
};
|
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 l=require("./index266.js");function r(e,c){const t=[];for(;e&&e!==document.documentElement;)l.isScrollable(e,c)&&t.push(e),e=e.parentElement;return t}exports.getScrollParents=r;
|
package/index267.mjs
CHANGED
|
@@ -1,143 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
let e = typeof document < "u" ? window.visualViewport : null;
|
|
8
|
-
function te(n) {
|
|
9
|
-
let { direction: y } = M(), { arrowSize: w = 0, targetRef: c, overlayRef: i, scrollRef: s = i, placement: H = "bottom", containerPadding: P = 12, shouldFlip: L = !0, boundaryElement: $ = typeof document < "u" ? document.body : null, offset: C = 0, crossOffset: B = 0, shouldUpdatePosition: S = !0, isOpen: v = !0, onClose: p, maxHeight: b, arrowBoundaryOffset: T = 0 } = n, [t, I] = J(null), F = [
|
|
10
|
-
S,
|
|
11
|
-
H,
|
|
12
|
-
i.current,
|
|
13
|
-
c.current,
|
|
14
|
-
s.current,
|
|
15
|
-
P,
|
|
16
|
-
L,
|
|
17
|
-
$,
|
|
18
|
-
C,
|
|
19
|
-
B,
|
|
20
|
-
v,
|
|
21
|
-
y,
|
|
22
|
-
b,
|
|
23
|
-
T,
|
|
24
|
-
w
|
|
25
|
-
], N = U(e == null ? void 0 : e.scale);
|
|
26
|
-
K(() => {
|
|
27
|
-
v && (N.current = e == null ? void 0 : e.scale);
|
|
28
|
-
}, [
|
|
29
|
-
v
|
|
30
|
-
]);
|
|
31
|
-
let a = j(() => {
|
|
32
|
-
if (S === !1 || !v || !i.current || !c.current || !$ || (e == null ? void 0 : e.scale) !== N.current) return;
|
|
33
|
-
let o = null;
|
|
34
|
-
if (s.current && s.current.contains(document.activeElement)) {
|
|
35
|
-
var d;
|
|
36
|
-
let r = (d = document.activeElement) === null || d === void 0 ? void 0 : d.getBoundingClientRect(), g = s.current.getBoundingClientRect();
|
|
37
|
-
var u;
|
|
38
|
-
if (o = {
|
|
39
|
-
type: "top",
|
|
40
|
-
offset: ((u = r == null ? void 0 : r.top) !== null && u !== void 0 ? u : 0) - g.top
|
|
41
|
-
}, o.offset > g.height / 2) {
|
|
42
|
-
o.type = "bottom";
|
|
43
|
-
var R;
|
|
44
|
-
o.offset = ((R = r == null ? void 0 : r.bottom) !== null && R !== void 0 ? R : 0) - g.bottom;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
let l = i.current;
|
|
48
|
-
if (!b && i.current) {
|
|
49
|
-
var O;
|
|
50
|
-
l.style.top = "0px", l.style.bottom = "";
|
|
51
|
-
var E;
|
|
52
|
-
l.style.maxHeight = ((E = (O = window.visualViewport) === null || O === void 0 ? void 0 : O.height) !== null && E !== void 0 ? E : window.innerHeight) + "px";
|
|
53
|
-
}
|
|
54
|
-
let f = D({
|
|
55
|
-
placement: W(H, y),
|
|
56
|
-
overlayNode: i.current,
|
|
57
|
-
targetNode: c.current,
|
|
58
|
-
scrollNode: s.current || i.current,
|
|
59
|
-
padding: P,
|
|
60
|
-
shouldFlip: L,
|
|
61
|
-
boundaryElement: $,
|
|
62
|
-
offset: C,
|
|
63
|
-
crossOffset: B,
|
|
64
|
-
maxHeight: b,
|
|
65
|
-
arrowSize: w,
|
|
66
|
-
arrowBoundaryOffset: T
|
|
67
|
-
});
|
|
68
|
-
if (f.position) {
|
|
69
|
-
if (l.style.top = "", l.style.bottom = "", l.style.left = "", l.style.right = "", Object.keys(f.position).forEach((r) => l.style[r] = f.position[r] + "px"), l.style.maxHeight = f.maxHeight != null ? f.maxHeight + "px" : "", o && document.activeElement && s.current) {
|
|
70
|
-
let r = document.activeElement.getBoundingClientRect(), g = s.current.getBoundingClientRect(), A = r[o.type] - g[o.type];
|
|
71
|
-
s.current.scrollTop += A - o.offset;
|
|
72
|
-
}
|
|
73
|
-
I(f);
|
|
74
|
-
}
|
|
75
|
-
}, F);
|
|
76
|
-
z(a, F), Q(a), k({
|
|
77
|
-
ref: i,
|
|
78
|
-
onResize: a
|
|
79
|
-
}), k({
|
|
80
|
-
ref: c,
|
|
81
|
-
onResize: a
|
|
82
|
-
});
|
|
83
|
-
let m = U(!1);
|
|
84
|
-
z(() => {
|
|
85
|
-
let o, d = () => {
|
|
86
|
-
m.current = !0, clearTimeout(o), o = setTimeout(() => {
|
|
87
|
-
m.current = !1;
|
|
88
|
-
}, 500), a();
|
|
89
|
-
}, u = () => {
|
|
90
|
-
m.current && d();
|
|
91
|
-
};
|
|
92
|
-
return e == null || e.addEventListener("resize", d), e == null || e.addEventListener("scroll", u), () => {
|
|
93
|
-
e == null || e.removeEventListener("resize", d), e == null || e.removeEventListener("scroll", u);
|
|
94
|
-
};
|
|
95
|
-
}, [
|
|
96
|
-
a
|
|
97
|
-
]);
|
|
98
|
-
let q = j(() => {
|
|
99
|
-
m.current || p == null || p();
|
|
100
|
-
}, [
|
|
101
|
-
p,
|
|
102
|
-
m
|
|
103
|
-
]);
|
|
104
|
-
G({
|
|
105
|
-
triggerRef: c,
|
|
106
|
-
isOpen: v,
|
|
107
|
-
onClose: p && q
|
|
108
|
-
});
|
|
109
|
-
var h, x;
|
|
110
|
-
return {
|
|
111
|
-
overlayProps: {
|
|
112
|
-
style: {
|
|
113
|
-
position: "absolute",
|
|
114
|
-
zIndex: 1e5,
|
|
115
|
-
...t == null ? void 0 : t.position,
|
|
116
|
-
maxHeight: (h = t == null ? void 0 : t.maxHeight) !== null && h !== void 0 ? h : "100vh"
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
placement: (x = t == null ? void 0 : t.placement) !== null && x !== void 0 ? x : null,
|
|
120
|
-
arrowProps: {
|
|
121
|
-
"aria-hidden": "true",
|
|
122
|
-
role: "presentation",
|
|
123
|
-
style: {
|
|
124
|
-
left: t == null ? void 0 : t.arrowOffsetLeft,
|
|
125
|
-
top: t == null ? void 0 : t.arrowOffsetTop
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
updatePosition: a
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
function Q(n) {
|
|
132
|
-
z(() => (window.addEventListener("resize", n, !1), () => {
|
|
133
|
-
window.removeEventListener("resize", n, !1);
|
|
134
|
-
}), [
|
|
135
|
-
n
|
|
136
|
-
]);
|
|
137
|
-
}
|
|
138
|
-
function W(n, y) {
|
|
139
|
-
return y === "rtl" ? n.replace("start", "right").replace("end", "left") : n.replace("start", "left").replace("end", "right");
|
|
1
|
+
import { isScrollable as r } from "./index266.mjs";
|
|
2
|
+
function s(e, t) {
|
|
3
|
+
const c = [];
|
|
4
|
+
for (; e && e !== document.documentElement; )
|
|
5
|
+
r(e, t) && c.push(e), e = e.parentElement;
|
|
6
|
+
return c;
|
|
140
7
|
}
|
|
141
8
|
export {
|
|
142
|
-
|
|
9
|
+
s as getScrollParents
|
|
143
10
|
};
|
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 o=require("./index235.js"),f=require("react");let l=0;const r=new Map;function i(t){let[u,a]=f.useState();return o.useLayoutEffect(()=>{if(!t)return;let e=r.get(t);if(e)a(e.element.id);else{let d=`react-aria-description-${l++}`;a(d);let n=document.createElement("div");n.id=d,n.style.display="none",n.textContent=t,document.body.appendChild(n),e={refCount:0,element:n},r.set(t,e)}return e.refCount++,()=>{e&&--e.refCount===0&&(e.element.remove(),r.delete(t))}},[t]),{"aria-describedby":t?u:void 0}}exports.useDescription=i;
|