@okam/stack-ui 1.42.1 → 1.42.3

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.
Files changed (181) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/components/ShareButton/interface.d.ts +0 -1
  3. package/index100.js +1 -1
  4. package/index100.mjs +1 -1
  5. package/index101.js +1 -1
  6. package/index101.mjs +1 -1
  7. package/index102.js +1 -1
  8. package/index102.mjs +1 -1
  9. package/index151.js +1 -1
  10. package/index151.mjs +1 -1
  11. package/index153.js +1 -1
  12. package/index153.mjs +4 -4
  13. package/index154.js +1 -1
  14. package/index154.mjs +2 -2
  15. package/index155.js +1 -1
  16. package/index155.mjs +1 -1
  17. package/index156.js +1 -1
  18. package/index156.mjs +1 -1
  19. package/index161.js +1 -1
  20. package/index161.mjs +2 -2
  21. package/index163.js +1 -1
  22. package/index163.mjs +2 -2
  23. package/index164.js +1 -1
  24. package/index164.mjs +5 -5
  25. package/index165.js +1 -1
  26. package/index165.mjs +3 -3
  27. package/index167.js +1 -1
  28. package/index167.mjs +2 -2
  29. package/index172.js +1 -1
  30. package/index172.mjs +2 -2
  31. package/index176.js +1 -1
  32. package/index176.mjs +4 -4
  33. package/index177.js +1 -1
  34. package/index177.mjs +1 -1
  35. package/index178.js +1 -1
  36. package/index178.mjs +2 -2
  37. package/index179.js +1 -1
  38. package/index179.mjs +3 -3
  39. package/index181.js +1 -1
  40. package/index181.mjs +3 -3
  41. package/index187.js +1 -1
  42. package/index187.mjs +5 -11
  43. package/index188.js +2 -1
  44. package/index188.mjs +49 -5
  45. package/index189.js +1 -2
  46. package/index189.mjs +11 -49
  47. package/index232.js +1 -1
  48. package/index232.mjs +132 -117
  49. package/index233.js +1 -1
  50. package/index233.mjs +196 -26
  51. package/index234.js +1 -1
  52. package/index234.mjs +18 -69
  53. package/index235.js +1 -1
  54. package/index235.mjs +4 -382
  55. package/index236.js +1 -1
  56. package/index236.mjs +28 -46
  57. package/index237.js +1 -1
  58. package/index237.mjs +50 -4
  59. package/index238.js +1 -1
  60. package/index238.mjs +52 -22
  61. package/index239.js +1 -1
  62. package/index239.mjs +46 -45
  63. package/index240.js +1 -1
  64. package/index240.mjs +96 -4
  65. package/index241.js +1 -1
  66. package/index241.mjs +5 -24
  67. package/index242.js +1 -1
  68. package/index242.mjs +6 -12
  69. package/index243.js +1 -1
  70. package/index243.mjs +41 -4
  71. package/index244.js +1 -1
  72. package/index244.mjs +72 -15
  73. package/index245.js +1 -1
  74. package/index245.mjs +14 -42
  75. package/index246.js +1 -1
  76. package/index246.mjs +66 -55
  77. package/index247.js +1 -1
  78. package/index247.mjs +7 -41
  79. package/index248.js +1 -1
  80. package/index248.mjs +10 -27
  81. package/index249.js +1 -1
  82. package/index249.mjs +46 -30
  83. package/index250.js +1 -1
  84. package/index250.mjs +124 -13
  85. package/index251.js +1 -1
  86. package/index251.mjs +73 -10
  87. package/index252.js +1 -1
  88. package/index252.mjs +378 -25
  89. package/index253.js +1 -1
  90. package/index253.mjs +45 -8
  91. package/index254.js +1 -1
  92. package/index254.mjs +24 -6
  93. package/index255.js +1 -1
  94. package/index255.mjs +24 -5
  95. package/index256.js +1 -1
  96. package/index256.mjs +12 -7
  97. package/index257.js +1 -1
  98. package/index257.mjs +4 -29
  99. package/index258.js +1 -1
  100. package/index258.mjs +14 -18
  101. package/index259.js +1 -1
  102. package/index259.mjs +42 -13
  103. package/index260.js +1 -1
  104. package/index260.mjs +54 -40
  105. package/index261.js +1 -1
  106. package/index261.mjs +27 -7
  107. package/index262.js +1 -1
  108. package/index262.mjs +29 -15
  109. package/index263.js +1 -1
  110. package/index263.mjs +11 -3
  111. package/index264.js +1 -1
  112. package/index264.mjs +9 -4
  113. package/index265.js +1 -1
  114. package/index265.mjs +5 -19
  115. package/index266.js +1 -1
  116. package/index266.mjs +7 -54
  117. package/index267.js +1 -1
  118. package/index267.mjs +25 -136
  119. package/index268.js +1 -1
  120. package/index268.mjs +17 -196
  121. package/index269.js +1 -1
  122. package/index269.mjs +12 -21
  123. package/index270.js +1 -1
  124. package/index270.mjs +41 -47
  125. package/index271.js +1 -1
  126. package/index271.mjs +7 -47
  127. package/index272.js +1 -1
  128. package/index272.mjs +15 -95
  129. package/index273.js +1 -1
  130. package/index273.mjs +3 -72
  131. package/index274.js +1 -1
  132. package/index274.mjs +4 -68
  133. package/index275.js +1 -1
  134. package/index275.mjs +19 -7
  135. package/index276.js +1 -1
  136. package/index276.mjs +27 -11
  137. package/index277.js +1 -1
  138. package/index277.mjs +31 -5
  139. package/index278.js +1 -1
  140. package/index278.mjs +5 -121
  141. package/index279.js +1 -1
  142. package/index279.mjs +121 -43
  143. package/index280.js +1 -1
  144. package/index280.mjs +43 -230
  145. package/index281.js +1 -1
  146. package/index281.mjs +226 -27
  147. package/index324.js +1 -1
  148. package/index324.mjs +7 -63
  149. package/index325.js +1 -1
  150. package/index325.mjs +28 -7
  151. package/index326.js +1 -1
  152. package/index326.mjs +89 -24
  153. package/index327.js +1 -1
  154. package/index327.mjs +58 -88
  155. package/index330.js +1 -1
  156. package/index330.mjs +3 -3
  157. package/index333.js +1 -1
  158. package/index333.mjs +5 -5
  159. package/index334.js +1 -1
  160. package/index334.mjs +2 -2
  161. package/index335.js +1 -1
  162. package/index335.mjs +5 -5
  163. package/index336.js +1 -1
  164. package/index336.mjs +65 -20
  165. package/index337.js +1 -1
  166. package/index337.mjs +53 -29
  167. package/index338.js +1 -1
  168. package/index338.mjs +51 -63
  169. package/index339.js +1 -1
  170. package/index339.mjs +271 -43
  171. package/index340.js +1 -1
  172. package/index340.mjs +18 -52
  173. package/index341.js +1 -1
  174. package/index341.mjs +21 -281
  175. package/index342.js +1 -1
  176. package/index342.mjs +29 -20
  177. package/index8.js +1 -1
  178. package/index8.mjs +32 -32
  179. package/index99.js +1 -1
  180. package/index99.mjs +1 -1
  181. package/package.json +1 -1
package/index258.mjs CHANGED
@@ -1,21 +1,17 @@
1
- import { useEffectEvent as u } from "./index259.mjs";
2
- import { useEffect as l } from "react";
3
- function i(e, t, a, r) {
4
- let f = u(a), n = a == null;
5
- l(() => {
6
- if (n || !e.current) return;
7
- let c = e.current;
8
- return c.addEventListener(t, f, r), () => {
9
- c.removeEventListener(t, f, r);
10
- };
11
- }, [
12
- e,
13
- t,
14
- r,
15
- n,
16
- f
17
- ]);
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;
18
13
  }
19
14
  export {
20
- i as useEvent
15
+ i as clsx,
16
+ i as default
21
17
  };
package/index259.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index237.js"),r=require("react");function o(t){const u=r.useRef(null);return n.useLayoutEffect(()=>{u.current=t},[t]),r.useCallback((...c)=>{const e=u.current;return e==null?void 0:e(...c)},[])}exports.useEffectEvent=o;
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/index259.mjs CHANGED
@@ -1,16 +1,45 @@
1
- import { useLayoutEffect as f } from "./index237.mjs";
2
- import { useRef as o, useCallback as a } from "react";
3
- function s(r) {
4
- const t = o(null);
5
- return f(() => {
6
- t.current = r;
7
- }, [
8
- r
9
- ]), a((...c) => {
10
- const e = t.current;
11
- return e == null ? void 0 : e(...c);
12
- }, []);
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);
8
+ }
9
+ }
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
+ }
19
+ });
20
+ } catch {
21
+ }
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;
13
42
  }
14
43
  export {
15
- s as useEffectEvent
44
+ f as focusWithoutScrolling
16
45
  };
package/index260.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("./index256.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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./index259.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/index260.mjs CHANGED
@@ -1,46 +1,60 @@
1
- import { getScrollParents as I } from "./index256.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;
1
+ import { focusWithoutScrolling as b } from "./index259.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);
5
11
  }
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;
13
- }
14
- e = e.offsetParent;
15
- }
16
- return l;
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;
17
31
  }
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
- }
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);
41
38
  }
42
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
+ };
55
+ }
43
56
  export {
44
- W as scrollIntoView,
45
- B as scrollIntoViewport
57
+ n as openLink,
58
+ E as useLinkProps,
59
+ m as useRouter
46
60
  };
package/index261.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index247.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;
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/index261.mjs CHANGED
@@ -1,11 +1,31 @@
1
- import { isAndroid as i } from "./index247.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;
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);
4
22
  }
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";
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);
27
+ });
7
28
  }
8
29
  export {
9
- o as isVirtualClick,
10
- u as isVirtualPointerEvent
30
+ c as runAfterTransition
11
31
  };
package/index262.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index259.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;
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/index262.mjs CHANGED
@@ -1,20 +1,34 @@
1
- import { useEffectEvent as u } from "./index259.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
- };
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
+ });
13
21
  }, [
14
- t,
15
- r
22
+ a
16
23
  ]);
24
+ return b(() => s, [
25
+ s
26
+ ]), {
27
+ addGlobalListener: u,
28
+ removeGlobalListener: a,
29
+ removeAllGlobalListeners: s
30
+ };
17
31
  }
18
32
  export {
19
- s as useFormReset
33
+ L as useGlobalListeners
20
34
  };
package/index263.js CHANGED
@@ -1 +1 @@
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;
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/index263.mjs CHANGED
@@ -1,5 +1,13 @@
1
- const a = "react-aria-clear-focus", c = "react-aria-focus";
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);
10
+ }
2
11
  export {
3
- a as CLEAR_FOCUS_EVENT,
4
- c as FOCUS_EVENT
12
+ i as useUpdateLayoutEffect
5
13
  };
package/index264.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index247.js");function t(e){return r.isMac()?e.metaKey:e.ctrlKey}exports.isCtrlKeyPressed=t;
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/index264.mjs CHANGED
@@ -1,7 +1,12 @@
1
- import { isMac as a } from "./index247.mjs";
2
- function t(e) {
3
- return a() ? e.metaKey : e.ctrlKey;
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
+ });
4
9
  }
5
10
  export {
6
- t as isCtrlKeyPressed
11
+ u as useSyncRef
7
12
  };
package/index265.js CHANGED
@@ -1 +1 @@
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;
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/index265.mjs CHANGED
@@ -1,22 +1,8 @@
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);
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;
19
5
  }
20
6
  export {
21
- n as isFocusable
7
+ c as isScrollable
22
8
  };
package/index266.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index327.js"),c=require("react"),l=require("./index241.js"),m=require("./index242.js"),p=require("./index249.js");function B(b){let{isDisabled:v,onBlurWithin:i,onFocusWithin:s,onFocusWithinChange:t}=b,n=c.useRef({isFocusWithin:!1}),{addGlobalListener:a,removeAllGlobalListeners:f}=p.useGlobalListeners(),r=c.useCallback(e=>{e.currentTarget.contains(e.target)&&n.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(n.current.isFocusWithin=!1,f(),i&&i(e),t&&t(!1))},[i,t,n,f]),g=o.useSyntheticBlurEvent(r),W=c.useCallback(e=>{if(!e.currentTarget.contains(e.target))return;const u=m.getOwnerDocument(e.target),T=l.getActiveElement(u);if(!n.current.isFocusWithin&&T===l.getEventTarget(e.nativeEvent)){s&&s(e),t&&t(!0),n.current.isFocusWithin=!0,g(e);let h=e.currentTarget;a(u,"focus",d=>{if(n.current.isFocusWithin&&!l.nodeContains(h,d.target)){let F=new u.defaultView.FocusEvent("blur",{relatedTarget:d.target});o.setEventTarget(F,h);let E=o.createSyntheticEvent(F);r(E)}},{capture:!0})}},[s,t,g,a,r]);return v?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:W,onBlur:r}}}exports.useFocusWithin=B;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index265.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/index266.mjs CHANGED
@@ -1,57 +1,10 @@
1
- import { useSyntheticBlurEvent as F, setEventTarget as W, createSyntheticEvent as v } from "./index327.mjs";
2
- import { useRef as x, useCallback as $ } from "react";
3
- import { getActiveElement as E, getEventTarget as T, nodeContains as B } from "./index241.mjs";
4
- import { getOwnerDocument as G } from "./index242.mjs";
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
+ import { isScrollable as r } from "./index265.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;
54
7
  }
55
8
  export {
56
- S as useFocusWithin
9
+ s as getScrollParents
57
10
  };
package/index267.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const M=require("./index268.js"),A=require("./index269.js"),f=require("react"),P=require("./index237.js"),j=require("./index252.js"),D=require("@react-aria/i18n");let e=typeof document<"u"?window.visualViewport:null;function G(n){let{direction:h}=D.useLocale(),{arrowSize:$=0,targetRef:v,overlayRef:i,scrollRef:s=i,placement:w="bottom",containerPadding:C=12,shouldFlip:H=!0,boundaryElement:R=typeof document<"u"?document.body:null,offset:S=0,crossOffset:B=0,shouldUpdatePosition:q=!0,isOpen:p=!0,onClose:m,maxHeight:O,arrowBoundaryOffset:T=0}=n,[t,k]=f.useState(null),F=[q,w,i.current,v.current,s.current,C,H,R,S,B,p,h,O,T,$],N=f.useRef(e==null?void 0:e.scale);f.useEffect(()=>{p&&(N.current=e==null?void 0:e.scale)},[p]);let u=f.useCallback(()=>{if(q===!1||!p||!i.current||!v.current||!R||(e==null?void 0:e.scale)!==N.current)return;let o=null;if(s.current&&s.current.contains(document.activeElement)){var a;let r=(a=document.activeElement)===null||a===void 0?void 0:a.getBoundingClientRect(),g=s.current.getBoundingClientRect();var d;if(o={type:"top",offset:((d=r==null?void 0:r.top)!==null&&d!==void 0?d:0)-g.top},o.offset>g.height/2){o.type="bottom";var x;o.offset=((x=r==null?void 0:r.bottom)!==null&&x!==void 0?x:0)-g.bottom}}let l=i.current;if(!O&&i.current){var z;l.style.top="0px",l.style.bottom="";var L;l.style.maxHeight=((L=(z=window.visualViewport)===null||z===void 0?void 0:z.height)!==null&&L!==void 0?L:window.innerHeight)+"px"}let c=M.calculatePosition({placement:K(w,h),overlayNode:i.current,targetNode:v.current,scrollNode:s.current||i.current,padding:C,shouldFlip:H,boundaryElement:R,offset:S,crossOffset:B,maxHeight:O,arrowSize:$,arrowBoundaryOffset:T});if(c.position){if(l.style.top="",l.style.bottom="",l.style.left="",l.style.right="",Object.keys(c.position).forEach(r=>l.style[r]=c.position[r]+"px"),l.style.maxHeight=c.maxHeight!=null?c.maxHeight+"px":"",o&&document.activeElement&&s.current){let r=document.activeElement.getBoundingClientRect(),g=s.current.getBoundingClientRect(),I=r[o.type]-g[o.type];s.current.scrollTop+=I-o.offset}k(c)}},F);P.useLayoutEffect(u,F),J(u),j.useResizeObserver({ref:i,onResize:u}),j.useResizeObserver({ref:v,onResize:u});let y=f.useRef(!1);P.useLayoutEffect(()=>{let o,a=()=>{y.current=!0,clearTimeout(o),o=setTimeout(()=>{y.current=!1},500),u()},d=()=>{y.current&&a()};return e==null||e.addEventListener("resize",a),e==null||e.addEventListener("scroll",d),()=>{e==null||e.removeEventListener("resize",a),e==null||e.removeEventListener("scroll",d)}},[u]);let U=f.useCallback(()=>{y.current||m==null||m()},[m,y]);A.useCloseOnScroll({triggerRef:v,isOpen:p,onClose:m&&U});var b,E;return{overlayProps:{style:{position:"absolute",zIndex:1e5,...t==null?void 0:t.position,maxHeight:(b=t==null?void 0:t.maxHeight)!==null&&b!==void 0?b:"100vh"}},placement:(E=t==null?void 0:t.placement)!==null&&E!==void 0?E:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:t==null?void 0:t.arrowOffsetLeft,top:t==null?void 0:t.arrowOffsetTop}},updatePosition:u}}function J(n){P.useLayoutEffect(()=>(window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)}),[n])}function K(n,h){return h==="rtl"?n.replace("start","right").replace("end","left"):n.replace("start","left").replace("end","right")}exports.useOverlayPosition=G;
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;