@okam/stack-ui 1.39.3 → 1.40.0

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 (337) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/index.d.ts +1 -0
  3. package/index123.js +1 -1
  4. package/index123.mjs +1 -1
  5. package/index125.js +1 -1
  6. package/index125.mjs +2 -2
  7. package/index126.js +1 -1
  8. package/index126.mjs +1 -1
  9. package/index133.js +1 -1
  10. package/index133.mjs +4 -4
  11. package/index134.js +1 -1
  12. package/index134.mjs +2 -2
  13. package/index135.js +1 -1
  14. package/index135.mjs +1 -1
  15. package/index136.js +1 -1
  16. package/index136.mjs +1 -1
  17. package/index137.js +1 -1
  18. package/index137.mjs +3 -3
  19. package/index141.js +1 -1
  20. package/index141.mjs +2 -2
  21. package/index143.js +1 -1
  22. package/index143.mjs +2 -2
  23. package/index144.js +1 -1
  24. package/index144.mjs +5 -5
  25. package/index145.js +1 -1
  26. package/index145.mjs +3 -3
  27. package/index146.js +1 -1
  28. package/index146.mjs +9 -9
  29. package/index152.js +1 -1
  30. package/index152.mjs +2 -2
  31. package/index156.js +1 -1
  32. package/index156.mjs +1 -1
  33. package/index158.js +1 -1
  34. package/index158.mjs +1 -1
  35. package/index159.js +1 -1
  36. package/index159.mjs +1 -1
  37. package/index161.js +1 -1
  38. package/index161.mjs +3 -3
  39. package/index162.js +1 -1
  40. package/index162.mjs +12 -46
  41. package/index163.js +1 -2
  42. package/index163.mjs +46 -13
  43. package/index164.js +1 -1
  44. package/index164.mjs +11 -29
  45. package/index165.js +2 -1
  46. package/index165.mjs +30 -11
  47. package/index168.js +1 -1
  48. package/index168.mjs +1 -1
  49. package/index169.js +1 -1
  50. package/index169.mjs +120 -198
  51. package/index170.js +1 -1
  52. package/index170.mjs +27 -64
  53. package/index171.js +1 -1
  54. package/index171.mjs +70 -140
  55. package/index172.js +1 -1
  56. package/index172.mjs +373 -116
  57. package/index173.js +1 -1
  58. package/index173.mjs +44 -222
  59. package/index174.js +1 -1
  60. package/index174.mjs +4 -191
  61. package/index175.js +1 -1
  62. package/index175.mjs +21 -66
  63. package/index176.js +1 -1
  64. package/index176.mjs +46 -278
  65. package/index177.js +1 -1
  66. package/index177.mjs +4 -97
  67. package/index178.js +1 -1
  68. package/index178.mjs +24 -188
  69. package/index179.js +1 -1
  70. package/index179.mjs +12 -84
  71. package/index180.js +1 -1
  72. package/index180.mjs +4 -58
  73. package/index181.js +1 -1
  74. package/index181.mjs +14 -126
  75. package/index182.js +1 -1
  76. package/index182.mjs +38 -112
  77. package/index183.js +1 -1
  78. package/index183.mjs +55 -120
  79. package/index184.js +1 -1
  80. package/index184.mjs +41 -72
  81. package/index185.js +1 -1
  82. package/index185.mjs +25 -107
  83. package/index186.js +1 -1
  84. package/index186.mjs +31 -52
  85. package/index187.js +1 -1
  86. package/index187.mjs +13 -92
  87. package/index188.js +1 -1
  88. package/index188.mjs +10 -70
  89. package/index189.js +1 -1
  90. package/index189.mjs +27 -55
  91. package/index190.js +1 -1
  92. package/index190.mjs +8 -98
  93. package/index191.js +1 -5
  94. package/index191.mjs +6 -80
  95. package/index192.js +1 -1
  96. package/index192.mjs +5 -2025
  97. package/index193.js +1 -1
  98. package/index193.mjs +7 -59
  99. package/index194.js +1 -1
  100. package/index194.mjs +27 -186
  101. package/index195.js +1 -1
  102. package/index195.mjs +15 -122
  103. package/index196.js +1 -1
  104. package/index196.mjs +12 -26
  105. package/index197.js +1 -1
  106. package/index197.mjs +40 -70
  107. package/index198.js +1 -1
  108. package/index198.mjs +7 -380
  109. package/index199.js +1 -1
  110. package/index199.mjs +16 -45
  111. package/index200.js +1 -1
  112. package/index200.mjs +3 -4
  113. package/index201.js +1 -1
  114. package/index201.mjs +4 -24
  115. package/index202.js +1 -1
  116. package/index202.mjs +19 -47
  117. package/index203.js +1 -1
  118. package/index203.mjs +53 -4
  119. package/index204.js +1 -1
  120. package/index204.mjs +123 -23
  121. package/index205.js +1 -1
  122. package/index205.mjs +133 -11
  123. package/index206.js +1 -1
  124. package/index206.mjs +44 -4
  125. package/index207.js +1 -1
  126. package/index207.mjs +13 -13
  127. package/index208.js +1 -1
  128. package/index208.mjs +92 -39
  129. package/index209.js +1 -1
  130. package/index209.mjs +102 -53
  131. package/index210.js +1 -1
  132. package/index210.mjs +4 -41
  133. package/index211.js +1 -1
  134. package/index211.mjs +3 -28
  135. package/index212.js +1 -1
  136. package/index212.mjs +125 -31
  137. package/index213.js +1 -1
  138. package/index213.mjs +29 -14
  139. package/index214.js +1 -1
  140. package/index214.mjs +51 -10
  141. package/index215.js +1 -1
  142. package/index215.mjs +44 -28
  143. package/index216.js +1 -1
  144. package/index216.mjs +37 -9
  145. package/index217.js +1 -1
  146. package/index217.mjs +113 -6
  147. package/index218.js +1 -1
  148. package/index218.mjs +77 -5
  149. package/index219.js +1 -1
  150. package/index219.mjs +101 -7
  151. package/index220.js +1 -1
  152. package/index220.mjs +98 -30
  153. package/index221.js +1 -1
  154. package/index221.mjs +137 -15
  155. package/index222.js +1 -1
  156. package/index222.mjs +197 -13
  157. package/index223.js +1 -1
  158. package/index223.mjs +22 -43
  159. package/index224.js +1 -1
  160. package/index224.mjs +49 -8
  161. package/index225.js +1 -1
  162. package/index225.mjs +45 -14
  163. package/index226.js +1 -1
  164. package/index226.mjs +98 -3
  165. package/index227.js +1 -1
  166. package/index227.mjs +72 -5
  167. package/index228.js +1 -1
  168. package/index228.mjs +68 -19
  169. package/index229.js +1 -1
  170. package/index229.mjs +7 -54
  171. package/index230.js +1 -1
  172. package/index230.mjs +10 -123
  173. package/index231.js +1 -1
  174. package/index231.mjs +198 -129
  175. package/index232.js +1 -1
  176. package/index232.mjs +63 -43
  177. package/index233.js +1 -1
  178. package/index233.mjs +143 -14
  179. package/index234.js +1 -1
  180. package/index234.mjs +117 -88
  181. package/index235.js +1 -1
  182. package/index235.mjs +220 -102
  183. package/index236.js +1 -1
  184. package/index236.mjs +190 -4
  185. package/index237.js +1 -1
  186. package/index237.mjs +69 -3
  187. package/index238.js +1 -1
  188. package/index238.mjs +269 -115
  189. package/index239.js +1 -1
  190. package/index239.mjs +93 -24
  191. package/index240.js +1 -1
  192. package/index240.mjs +180 -43
  193. package/index241.js +1 -1
  194. package/index241.mjs +84 -44
  195. package/index242.js +1 -1
  196. package/index242.mjs +57 -36
  197. package/index243.js +1 -1
  198. package/index243.mjs +122 -109
  199. package/index244.js +1 -1
  200. package/index244.mjs +113 -74
  201. package/index245.js +1 -1
  202. package/index245.mjs +122 -101
  203. package/index246.js +1 -1
  204. package/index246.mjs +73 -98
  205. package/index247.js +1 -1
  206. package/index247.mjs +107 -137
  207. package/index248.js +1 -1
  208. package/index248.mjs +52 -197
  209. package/index249.js +1 -1
  210. package/index249.mjs +93 -22
  211. package/index250.js +1 -1
  212. package/index250.mjs +67 -46
  213. package/index251.js +1 -1
  214. package/index251.mjs +55 -47
  215. package/index252.js +1 -1
  216. package/index252.mjs +98 -96
  217. package/index253.js +5 -1
  218. package/index253.mjs +81 -72
  219. package/index254.js +1 -1
  220. package/index254.mjs +2015 -58
  221. package/index255.js +1 -1
  222. package/index255.mjs +59 -7
  223. package/index256.js +1 -1
  224. package/index256.mjs +187 -10
  225. package/index258.js +1 -1
  226. package/index258.mjs +3 -3
  227. package/index260.js +1 -1
  228. package/index260.mjs +8 -8
  229. package/index261.js +1 -1
  230. package/index261.mjs +1 -1
  231. package/index262.js +1 -1
  232. package/index262.mjs +3 -130
  233. package/index263.js +1 -1
  234. package/index263.mjs +4 -190
  235. package/index264.js +1 -1
  236. package/index264.mjs +5 -10
  237. package/index265.js +1 -1
  238. package/index265.mjs +5 -4
  239. package/index266.js +1 -1
  240. package/index266.mjs +5 -37
  241. package/index267.js +1 -1
  242. package/index267.mjs +5 -6
  243. package/index268.js +1 -1
  244. package/index268.mjs +5 -30
  245. package/index269.js +1 -1
  246. package/index269.mjs +5 -7
  247. package/index270.js +1 -1
  248. package/index270.mjs +5 -4
  249. package/index271.js +1 -1
  250. package/index271.mjs +5 -5
  251. package/index272.js +1 -1
  252. package/index272.mjs +4 -4
  253. package/index273.js +1 -1
  254. package/index273.mjs +4 -4
  255. package/index274.js +1 -1
  256. package/index274.mjs +1 -1
  257. package/index275.js +1 -1
  258. package/index275.mjs +4 -4
  259. package/index276.js +1 -1
  260. package/index276.mjs +4 -4
  261. package/index277.js +1 -1
  262. package/index277.mjs +4 -4
  263. package/index278.js +1 -1
  264. package/index278.mjs +1 -1
  265. package/index279.js +1 -1
  266. package/index279.mjs +4 -4
  267. package/index280.js +1 -1
  268. package/index280.mjs +4 -4
  269. package/index281.js +1 -1
  270. package/index281.mjs +4 -4
  271. package/index282.js +1 -1
  272. package/index282.mjs +1 -1
  273. package/index283.js +1 -1
  274. package/index283.mjs +4 -4
  275. package/index284.js +1 -1
  276. package/index284.mjs +4 -4
  277. package/index285.js +1 -1
  278. package/index285.mjs +4 -4
  279. package/index286.js +1 -1
  280. package/index286.mjs +4 -4
  281. package/index287.js +1 -1
  282. package/index287.mjs +4 -4
  283. package/index288.js +1 -1
  284. package/index288.mjs +4 -4
  285. package/index289.js +1 -1
  286. package/index289.mjs +4 -4
  287. package/index290.js +1 -1
  288. package/index290.mjs +4 -4
  289. package/index291.js +1 -1
  290. package/index291.mjs +1 -1
  291. package/index292.js +1 -1
  292. package/index292.mjs +4 -4
  293. package/index293.js +1 -1
  294. package/index293.mjs +4 -4
  295. package/index294.js +1 -1
  296. package/index294.mjs +1 -1
  297. package/index295.js +1 -1
  298. package/index295.mjs +4 -4
  299. package/index296.js +1 -1
  300. package/index296.mjs +4 -4
  301. package/index297.js +1 -1
  302. package/index297.mjs +4 -4
  303. package/index298.js +1 -1
  304. package/index298.mjs +130 -4
  305. package/index299.js +1 -1
  306. package/index299.mjs +191 -5
  307. package/index300.js +1 -1
  308. package/index300.mjs +10 -5
  309. package/index301.js +1 -1
  310. package/index301.mjs +4 -5
  311. package/index302.js +1 -1
  312. package/index302.mjs +37 -5
  313. package/index303.js +1 -1
  314. package/index303.mjs +6 -5
  315. package/index304.js +1 -1
  316. package/index304.mjs +30 -5
  317. package/index305.js +1 -1
  318. package/index305.mjs +7 -5
  319. package/index306.js +1 -1
  320. package/index306.mjs +3 -3
  321. package/index308.js +1 -1
  322. package/index308.mjs +2 -2
  323. package/index309.js +1 -1
  324. package/index309.mjs +5 -5
  325. package/index312.js +1 -1
  326. package/index312.mjs +3 -3
  327. package/index315.js +1 -1
  328. package/index315.mjs +5 -5
  329. package/index316.js +1 -1
  330. package/index316.mjs +1 -1
  331. package/index317.js +1 -1
  332. package/index317.mjs +4 -4
  333. package/index318.js +1 -1
  334. package/index318.mjs +1 -1
  335. package/index322.js +1 -1
  336. package/index322.mjs +1 -1
  337. package/package.json +1 -1
package/index224.mjs CHANGED
@@ -1,11 +1,52 @@
1
- import { isAndroid as i } from "./index210.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;
4
- }
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";
1
+ import { isElementInChildOfActiveScope as g } from "@react-aria/focus";
2
+ import { useEffect as m } from "react";
3
+ import { useFocusWithin as v } from "./index203.mjs";
4
+ import { useInteractOutside as b } from "./index225.mjs";
5
+ const t = [];
6
+ function C(a, i) {
7
+ let { onClose: o, shouldCloseOnBlur: l, isOpen: n, isDismissable: d = !1, isKeyboardDismissDisabled: u = !1, shouldCloseOnInteractOutside: s } = a;
8
+ m(() => {
9
+ if (n && !t.includes(i))
10
+ return t.push(i), () => {
11
+ let e = t.indexOf(i);
12
+ e >= 0 && t.splice(e, 1);
13
+ };
14
+ }, [
15
+ n,
16
+ i
17
+ ]);
18
+ let r = () => {
19
+ t[t.length - 1] === i && o && o();
20
+ }, f = (e) => {
21
+ (!s || s(e.target)) && t[t.length - 1] === i && (e.stopPropagation(), e.preventDefault());
22
+ }, p = (e) => {
23
+ (!s || s(e.target)) && (t[t.length - 1] === i && (e.stopPropagation(), e.preventDefault()), r());
24
+ }, c = (e) => {
25
+ e.key === "Escape" && !u && !e.nativeEvent.isComposing && (e.stopPropagation(), e.preventDefault(), r());
26
+ };
27
+ b({
28
+ ref: i,
29
+ onInteractOutside: d && n ? p : void 0,
30
+ onInteractOutsideStart: f
31
+ });
32
+ let { focusWithinProps: O } = v({
33
+ isDisabled: !l,
34
+ onBlurWithin: (e) => {
35
+ !e.relatedTarget || g(e.relatedTarget) || (!s || s(e.relatedTarget)) && (o == null || o());
36
+ }
37
+ }), D = (e) => {
38
+ e.target === e.currentTarget && e.preventDefault();
39
+ };
40
+ return {
41
+ overlayProps: {
42
+ onKeyDown: c,
43
+ ...O
44
+ },
45
+ underlayProps: {
46
+ onPointerDown: D
47
+ }
48
+ };
7
49
  }
8
50
  export {
9
- o as isVirtualClick,
10
- u as isVirtualPointerEvent
51
+ C as useOverlay
11
52
  };
package/index225.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index222.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 w=require("./index179.js"),v=require("./index196.js"),m=require("react");function D(r){let{ref:n,onInteractOutside:s,isDisabled:d,onInteractOutsideStart:l}=r,E=m.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),o=v.useEffectEvent(e=>{s&&c(e,n)&&(l&&l(e),E.current.isPointerDown=!0)}),f=v.useEffectEvent(e=>{s&&s(e)});m.useEffect(()=>{let e=E.current;if(d)return;const p=n.current,t=w.getOwnerDocument(p);if(typeof PointerEvent<"u"){let i=u=>{e.isPointerDown&&c(u,n)&&f(u),e.isPointerDown=!1};return t.addEventListener("pointerdown",o,!0),t.addEventListener("pointerup",i,!0),()=>{t.removeEventListener("pointerdown",o,!0),t.removeEventListener("pointerup",i,!0)}}else if(process.env.NODE_ENV==="test"){let i=a=>{e.ignoreEmulatedMouseEvents?e.ignoreEmulatedMouseEvents=!1:e.isPointerDown&&c(a,n)&&f(a),e.isPointerDown=!1},u=a=>{e.ignoreEmulatedMouseEvents=!0,e.isPointerDown&&c(a,n)&&f(a),e.isPointerDown=!1};return t.addEventListener("mousedown",o,!0),t.addEventListener("mouseup",i,!0),t.addEventListener("touchstart",o,!0),t.addEventListener("touchend",u,!0),()=>{t.removeEventListener("mousedown",o,!0),t.removeEventListener("mouseup",i,!0),t.removeEventListener("touchstart",o,!0),t.removeEventListener("touchend",u,!0)}}},[n,d,o,f])}function c(r,n){if(r.button>0)return!1;if(r.target){const s=r.target.ownerDocument;if(!s||!s.documentElement.contains(r.target)||r.target.closest("[data-react-aria-top-layer]"))return!1}return n.current?!r.composedPath().includes(n.current):!1}exports.useInteractOutside=D;
package/index225.mjs CHANGED
@@ -1,20 +1,51 @@
1
- import { useEffectEvent as u } from "./index222.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);
1
+ import { getOwnerDocument as p } from "./index179.mjs";
2
+ import { useEffectEvent as m } from "./index196.mjs";
3
+ import { useRef as w, useEffect as D } from "react";
4
+ function $(r) {
5
+ let { ref: n, onInteractOutside: s, isDisabled: d, onInteractOutsideStart: l } = r, E = w({
6
+ isPointerDown: !1,
7
+ ignoreEmulatedMouseEvents: !1
8
+ }), o = m((e) => {
9
+ s && c(e, n) && (l && l(e), E.current.isPointerDown = !0);
10
+ }), f = m((e) => {
11
+ s && s(e);
6
12
  });
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
+ D(() => {
14
+ let e = E.current;
15
+ if (d) return;
16
+ const v = n.current, t = p(v);
17
+ if (typeof PointerEvent < "u") {
18
+ let i = (u) => {
19
+ e.isPointerDown && c(u, n) && f(u), e.isPointerDown = !1;
20
+ };
21
+ return t.addEventListener("pointerdown", o, !0), t.addEventListener("pointerup", i, !0), () => {
22
+ t.removeEventListener("pointerdown", o, !0), t.removeEventListener("pointerup", i, !0);
23
+ };
24
+ } else if (process.env.NODE_ENV === "test") {
25
+ let i = (a) => {
26
+ e.ignoreEmulatedMouseEvents ? e.ignoreEmulatedMouseEvents = !1 : e.isPointerDown && c(a, n) && f(a), e.isPointerDown = !1;
27
+ }, u = (a) => {
28
+ e.ignoreEmulatedMouseEvents = !0, e.isPointerDown && c(a, n) && f(a), e.isPointerDown = !1;
29
+ };
30
+ return t.addEventListener("mousedown", o, !0), t.addEventListener("mouseup", i, !0), t.addEventListener("touchstart", o, !0), t.addEventListener("touchend", u, !0), () => {
31
+ t.removeEventListener("mousedown", o, !0), t.removeEventListener("mouseup", i, !0), t.removeEventListener("touchstart", o, !0), t.removeEventListener("touchend", u, !0);
32
+ };
33
+ }
13
34
  }, [
14
- t,
15
- r
35
+ n,
36
+ d,
37
+ o,
38
+ f
16
39
  ]);
17
40
  }
41
+ function c(r, n) {
42
+ if (r.button > 0) return !1;
43
+ if (r.target) {
44
+ const s = r.target.ownerDocument;
45
+ if (!s || !s.documentElement.contains(r.target) || r.target.closest("[data-react-aria-top-layer]")) return !1;
46
+ }
47
+ return n.current ? !r.composedPath().includes(n.current) : !1;
48
+ }
18
49
  export {
19
- s as useFormReset
50
+ $ as useInteractOutside
20
51
  };
package/index226.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 v=require("./index177.js"),E=require("./index174.js"),w=require("./index191.js"),S=require("./index184.js"),m=typeof document<"u"&&window.visualViewport,y=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let s=0,f;function T(e={}){let{isDisabled:t}=e;E.useLayoutEffect(()=>{if(!t)return s++,s===1&&(S.isIOS()?f=x():f=b()),()=>{s--,s===0&&f()}},[t])}function b(){return v.chain(r(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),r(document.documentElement,"overflow","hidden"))}function x(){let e,t,n=c=>{e=w.getScrollParent(c.target,!0),!(e===document.documentElement&&e===document.body)&&e instanceof HTMLElement&&window.getComputedStyle(e).overscrollBehavior==="auto"&&(t=r(e,"overscrollBehavior","contain"))},o=c=>{if(!e||e===document.documentElement||e===document.body){c.preventDefault();return}e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&c.preventDefault()},u=()=>{t&&t()},a=c=>{let l=c.target;L(l)&&(h(),l.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{l.style.transform="",m&&(m.height<window.innerHeight?requestAnimationFrame(()=>{$(l)}):m.addEventListener("resize",()=>$(l),{once:!0}))}))},i=null,h=()=>{if(i)return;let c=()=>{window.scrollTo(0,0)},l=window.pageXOffset,p=window.pageYOffset;i=v.chain(d(window,"scroll",c),r(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),r(document.documentElement,"overflow","hidden"),r(document.body,"marginTop",`-${p}px`),()=>{window.scrollTo(l,p)}),window.scrollTo(0,0)},g=v.chain(d(document,"touchstart",n,{passive:!1,capture:!0}),d(document,"touchmove",o,{passive:!1,capture:!0}),d(document,"touchend",u,{passive:!1,capture:!0}),d(document,"focus",a,!0));return()=>{t==null||t(),i==null||i(),g()}}function r(e,t,n){let o=e.style[t];return e.style[t]=n,()=>{e.style[t]=o}}function d(e,t,n,o){return e.addEventListener(t,n,o),()=>{e.removeEventListener(t,n,o)}}function $(e){let t=document.scrollingElement||document.documentElement,n=e;for(;n&&n!==t;){let o=w.getScrollParent(n);if(o!==document.documentElement&&o!==document.body&&o!==n){let u=o.getBoundingClientRect().top,a=n.getBoundingClientRect().top;a>u+n.clientHeight&&(o.scrollTop+=a-u)}n=o.parentElement}}function L(e){return e instanceof HTMLInputElement&&!y.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}exports.usePreventScroll=T;
package/index226.mjs CHANGED
@@ -1,5 +1,100 @@
1
- const a = "react-aria-clear-focus", c = "react-aria-focus";
1
+ import { chain as $ } from "./index177.mjs";
2
+ import { useLayoutEffect as b } from "./index174.mjs";
3
+ import { getScrollParent as w } from "./index191.mjs";
4
+ import { isIOS as g } from "./index184.mjs";
5
+ const m = typeof document < "u" && window.visualViewport, T = /* @__PURE__ */ new Set([
6
+ "checkbox",
7
+ "radio",
8
+ "range",
9
+ "color",
10
+ "file",
11
+ "image",
12
+ "button",
13
+ "submit",
14
+ "reset"
15
+ ]);
16
+ let s = 0, f;
17
+ function C(e = {}) {
18
+ let { isDisabled: t } = e;
19
+ b(() => {
20
+ if (!t)
21
+ return s++, s === 1 && (g() ? f = S() : f = y()), () => {
22
+ s--, s === 0 && f();
23
+ };
24
+ }, [
25
+ t
26
+ ]);
27
+ }
28
+ function y() {
29
+ return $(l(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`), l(document.documentElement, "overflow", "hidden"));
30
+ }
31
+ function S() {
32
+ let e, t, n = (c) => {
33
+ e = w(c.target, !0), !(e === document.documentElement && e === document.body) && e instanceof HTMLElement && window.getComputedStyle(e).overscrollBehavior === "auto" && (t = l(e, "overscrollBehavior", "contain"));
34
+ }, o = (c) => {
35
+ if (!e || e === document.documentElement || e === document.body) {
36
+ c.preventDefault();
37
+ return;
38
+ }
39
+ e.scrollHeight === e.clientHeight && e.scrollWidth === e.clientWidth && c.preventDefault();
40
+ }, u = () => {
41
+ t && t();
42
+ }, a = (c) => {
43
+ let r = c.target;
44
+ x(r) && (h(), r.style.transform = "translateY(-2000px)", requestAnimationFrame(() => {
45
+ r.style.transform = "", m && (m.height < window.innerHeight ? requestAnimationFrame(() => {
46
+ v(r);
47
+ }) : m.addEventListener("resize", () => v(r), {
48
+ once: !0
49
+ }));
50
+ }));
51
+ }, d = null, h = () => {
52
+ if (d) return;
53
+ let c = () => {
54
+ window.scrollTo(0, 0);
55
+ }, r = window.pageXOffset, p = window.pageYOffset;
56
+ d = $(i(window, "scroll", c), l(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`), l(document.documentElement, "overflow", "hidden"), l(document.body, "marginTop", `-${p}px`), () => {
57
+ window.scrollTo(r, p);
58
+ }), window.scrollTo(0, 0);
59
+ }, E = $(i(document, "touchstart", n, {
60
+ passive: !1,
61
+ capture: !0
62
+ }), i(document, "touchmove", o, {
63
+ passive: !1,
64
+ capture: !0
65
+ }), i(document, "touchend", u, {
66
+ passive: !1,
67
+ capture: !0
68
+ }), i(document, "focus", a, !0));
69
+ return () => {
70
+ t == null || t(), d == null || d(), E();
71
+ };
72
+ }
73
+ function l(e, t, n) {
74
+ let o = e.style[t];
75
+ return e.style[t] = n, () => {
76
+ e.style[t] = o;
77
+ };
78
+ }
79
+ function i(e, t, n, o) {
80
+ return e.addEventListener(t, n, o), () => {
81
+ e.removeEventListener(t, n, o);
82
+ };
83
+ }
84
+ function v(e) {
85
+ let t = document.scrollingElement || document.documentElement, n = e;
86
+ for (; n && n !== t; ) {
87
+ let o = w(n);
88
+ if (o !== document.documentElement && o !== document.body && o !== n) {
89
+ let u = o.getBoundingClientRect().top, a = n.getBoundingClientRect().top;
90
+ a > u + n.clientHeight && (o.scrollTop += a - u);
91
+ }
92
+ n = o.parentElement;
93
+ }
94
+ }
95
+ function x(e) {
96
+ return e instanceof HTMLInputElement && !T.has(e.type) || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable;
97
+ }
2
98
  export {
3
- a as CLEAR_FOCUS_EVENT,
4
- c as FOCUS_EVENT
99
+ C as usePreventScroll
5
100
  };
package/index227.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index210.js");function t(e){return r.isMac()?e.metaKey:e.ctrlKey}exports.isCtrlKeyPressed=t;
1
+ "use strict";const e=require("./index264.js"),r=require("./index265.js"),t=require("./index266.js"),s=require("./index267.js"),u=require("./index268.js"),n=require("./index269.js"),i=require("./index270.js"),o=require("./index271.js"),c=require("./index272.js"),q=require("./index273.js"),R=require("./index274.js"),l=require("./index275.js"),E=require("./index276.js"),S=require("./index277.js"),h=require("./index278.js"),L=require("./index279.js"),T=require("./index280.js"),a=require("./index281.js"),I=require("./index282.js"),P=require("./index283.js"),U=require("./index284.js"),d=require("./index285.js"),f=require("./index286.js"),p=require("./index287.js"),k=require("./index288.js"),K=require("./index289.js"),N=require("./index290.js"),b=require("./index291.js"),v=require("./index292.js"),z=require("./index293.js"),A=require("./index294.js"),B=require("./index295.js"),C=require("./index296.js"),D=require("./index297.js");exports.default={};exports.default={"ar-AE":e,"bg-BG":r,"cs-CZ":t,"da-DK":s,"de-DE":u,"el-GR":n,"en-US":i,"es-ES":o,"et-EE":c,"fi-FI":q,"fr-FR":R,"he-IL":l,"hr-HR":E,"hu-HU":S,"it-IT":h,"ja-JP":L,"ko-KR":T,"lt-LT":a,"lv-LV":I,"nb-NO":P,"nl-NL":U,"pl-PL":d,"pt-BR":f,"pt-PT":p,"ro-RO":k,"ru-RU":K,"sk-SK":N,"sl-SI":b,"sr-SP":v,"sv-SE":z,"tr-TR":A,"uk-UA":B,"zh-CN":C,"zh-TW":D};module.exports=exports.default;
package/index227.mjs CHANGED
@@ -1,7 +1,74 @@
1
- import { isMac as a } from "./index210.mjs";
2
- function t(e) {
3
- return a() ? e.metaKey : e.ctrlKey;
4
- }
1
+ import r from "./index264.mjs";
2
+ import o from "./index265.mjs";
3
+ import f from "./index266.mjs";
4
+ import t from "./index267.mjs";
5
+ import p from "./index268.mjs";
6
+ import $ from "./index269.mjs";
7
+ import e from "./index270.mjs";
8
+ import m from "./index271.mjs";
9
+ import s from "./index272.mjs";
10
+ import d from "./index273.mjs";
11
+ import c from "./index274.mjs";
12
+ import i from "./index275.mjs";
13
+ import x from "./index276.mjs";
14
+ import a from "./index277.mjs";
15
+ import b from "./index278.mjs";
16
+ import R from "./index279.mjs";
17
+ import l from "./index280.mjs";
18
+ import E from "./index281.mjs";
19
+ import S from "./index282.mjs";
20
+ import h from "./index283.mjs";
21
+ import L from "./index284.mjs";
22
+ import T from "./index285.mjs";
23
+ import u from "./index286.mjs";
24
+ import I from "./index287.mjs";
25
+ import P from "./index288.mjs";
26
+ import U from "./index289.mjs";
27
+ import k from "./index290.mjs";
28
+ import n from "./index291.mjs";
29
+ import v from "./index292.mjs";
30
+ import K from "./index293.mjs";
31
+ import N from "./index294.mjs";
32
+ import z from "./index295.mjs";
33
+ import A from "./index296.mjs";
34
+ import B from "./index297.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
+ };
5
72
  export {
6
- t as isCtrlKeyPressed
73
+ C as default
7
74
  };
package/index228.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"});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/index228.mjs CHANGED
@@ -1,22 +1,71 @@
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
+ 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
+ };
19
67
  }
20
68
  export {
21
- n as isFocusable
69
+ v as ariaHideOutside,
70
+ E as keepVisible
22
71
  };
package/index229.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index309.js"),c=require("react"),l=require("./index204.js"),m=require("./index205.js"),p=require("./index212.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 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/index229.mjs CHANGED
@@ -1,57 +1,10 @@
1
- import { useSyntheticBlurEvent as F, setEventTarget as W, createSyntheticEvent as v } from "./index309.mjs";
2
- import { useRef as x, useCallback as $ } from "react";
3
- import { getActiveElement as E, getEventTarget as T, nodeContains as B } from "./index204.mjs";
4
- import { getOwnerDocument as G } from "./index205.mjs";
5
- import { useGlobalListeners as L } from "./index212.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 { 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 : {};
54
6
  }
55
7
  export {
56
- S as useFocusWithin
8
+ r as PortalContext,
9
+ a as useUNSAFE_PortalContext
57
10
  };
package/index230.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index231.js"),u=require("./index232.js"),d=require("./index233.js"),f=require("./index234.js"),l=require("./index235.js"),y=require("./index236.js");function m(s){let t=typeof s[0]=="object"?s.shift():new f.GregorianCalendar,e;if(typeof s[0]=="string")e=s.shift();else{let a=t.getEras();e=a[a.length-1]}let i=s.shift(),n=s.shift(),h=s.shift();return[t,e,i,n,h]}var p=new WeakMap;class c{copy(){return this.era?new c(this.calendar,this.era,this.year,this.month,this.day):new c(this.calendar,this.year,this.month,this.day)}add(t){return r.add(this,t)}subtract(t){return r.subtract(this,t)}set(t){return r.set(this,t)}cycle(t,e,i){return r.cycleDate(this,t,e,i)}toDate(t){return l.toDate(this,t)}toString(){return d.dateToString(this)}compare(t){return u.compareDate(this,t)}constructor(...t){y._(this,p,{writable:!0,value:void 0});let[e,i,n,h,a]=m(t);this.calendar=e,this.era=i,this.year=n,this.month=h,this.day=a,r.constrain(this)}}var v=new WeakMap;class o{copy(){return this.era?new o(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new o(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return r.add(this,t)}subtract(t){return r.subtract(this,t)}set(t){return r.set(r.setTime(this,t),t)}cycle(t,e,i){switch(t){case"era":case"year":case"month":case"day":return r.cycleDate(this,t,e,i);default:return r.cycleTime(this,t,e,i)}}toDate(t,e){return l.toDate(this,t,e)}toString(){return d.dateTimeToString(this)}compare(t){let e=u.compareDate(this,t);return e===0?u.compareTime(this,l.toCalendarDateTime(t)):e}constructor(...t){y._(this,v,{writable:!0,value:void 0});let[e,i,n,h,a]=m(t);this.calendar=e,this.era=i,this.year=n,this.month=h,this.day=a,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,r.constrain(this)}}exports.CalendarDate=c;exports.CalendarDateTime=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index307.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;