@okam/stack-ui 1.39.3 → 1.40.1

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 (447) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/components/fields/ComboBox/components/ComboBoxButton.d.ts +3 -0
  3. package/components/fields/ComboBox/interface.d.ts +5 -1
  4. package/index.d.ts +1 -0
  5. package/index108.js +6 -1
  6. package/index108.mjs +29 -12
  7. package/index123.js +1 -1
  8. package/index123.mjs +1 -1
  9. package/index125.js +1 -1
  10. package/index125.mjs +2 -2
  11. package/index126.js +1 -1
  12. package/index126.mjs +1 -1
  13. package/index131.js +1 -1
  14. package/index131.mjs +1 -1
  15. package/index133.js +1 -1
  16. package/index133.mjs +4 -4
  17. package/index134.js +1 -1
  18. package/index134.mjs +3 -3
  19. package/index135.js +1 -1
  20. package/index135.mjs +1 -1
  21. package/index136.js +1 -1
  22. package/index136.mjs +1 -1
  23. package/index137.js +1 -1
  24. package/index137.mjs +3 -3
  25. package/index141.js +1 -1
  26. package/index141.mjs +13 -38
  27. package/index142.js +1 -2
  28. package/index142.mjs +38 -24
  29. package/index143.js +2 -1
  30. package/index143.mjs +23 -21
  31. package/index144.js +1 -1
  32. package/index144.mjs +21 -41
  33. package/index145.js +1 -1
  34. package/index145.mjs +42 -25
  35. package/index146.js +1 -1
  36. package/index146.mjs +25 -40
  37. package/index147.js +1 -2
  38. package/index147.mjs +39 -56
  39. package/index148.js +2 -1
  40. package/index148.mjs +57 -38
  41. package/index149.js +1 -1
  42. package/index149.mjs +34 -26
  43. package/index150.js +1 -2
  44. package/index150.mjs +30 -8
  45. package/index151.js +1 -1
  46. package/index151.mjs +7 -8
  47. package/index152.js +2 -1
  48. package/index152.mjs +10 -30
  49. package/index153.js +1 -1
  50. package/index153.mjs +30 -15
  51. package/index154.js +1 -1
  52. package/index154.mjs +13 -15
  53. package/index155.js +1 -2
  54. package/index155.mjs +16 -47
  55. package/index156.js +2 -1
  56. package/index156.mjs +46 -36
  57. package/index157.js +1 -1
  58. package/index157.mjs +36 -27
  59. package/index158.js +1 -1
  60. package/index158.mjs +27 -20
  61. package/index159.js +1 -1
  62. package/index159.mjs +18 -32
  63. package/index160.js +1 -1
  64. package/index160.mjs +35 -21
  65. package/index161.js +1 -1
  66. package/index161.mjs +21 -56
  67. package/index162.js +1 -1
  68. package/index162.mjs +57 -46
  69. package/index163.js +1 -2
  70. package/index163.mjs +11 -12
  71. package/index164.js +1 -2
  72. package/index164.mjs +46 -31
  73. package/index165.js +2 -1
  74. package/index165.mjs +12 -11
  75. package/index166.js +2 -1
  76. package/index166.mjs +31 -12
  77. package/index167.js +1 -1
  78. package/index167.mjs +11 -5
  79. package/index168.js +1 -2
  80. package/index168.mjs +5 -49
  81. package/index169.js +2 -1
  82. package/index169.mjs +46 -200
  83. package/index170.js +1 -1
  84. package/index170.mjs +122 -61
  85. package/index171.js +1 -1
  86. package/index171.mjs +26 -142
  87. package/index172.js +1 -1
  88. package/index172.mjs +69 -120
  89. package/index173.js +1 -1
  90. package/index173.mjs +370 -213
  91. package/index174.js +1 -1
  92. package/index174.mjs +44 -188
  93. package/index175.js +1 -1
  94. package/index175.mjs +4 -70
  95. package/index176.js +1 -1
  96. package/index176.mjs +21 -276
  97. package/index177.js +1 -1
  98. package/index177.mjs +45 -96
  99. package/index178.js +1 -1
  100. package/index178.mjs +4 -187
  101. package/index179.js +1 -1
  102. package/index179.mjs +24 -84
  103. package/index180.js +1 -1
  104. package/index180.mjs +12 -58
  105. package/index181.js +1 -1
  106. package/index181.mjs +4 -126
  107. package/index182.js +1 -1
  108. package/index182.mjs +14 -116
  109. package/index183.js +1 -1
  110. package/index183.mjs +38 -118
  111. package/index184.js +1 -1
  112. package/index184.mjs +55 -70
  113. package/index185.js +1 -1
  114. package/index185.mjs +39 -108
  115. package/index186.js +1 -1
  116. package/index186.mjs +26 -50
  117. package/index187.js +1 -1
  118. package/index187.mjs +30 -92
  119. package/index188.js +1 -1
  120. package/index188.mjs +13 -69
  121. package/index189.js +1 -1
  122. package/index189.mjs +10 -56
  123. package/index19.js +1 -1
  124. package/index19.mjs +3 -2
  125. package/index190.js +1 -1
  126. package/index190.mjs +27 -98
  127. package/index191.js +1 -5
  128. package/index191.mjs +8 -79
  129. package/index192.js +1 -1
  130. package/index192.mjs +6 -2025
  131. package/index193.js +1 -1
  132. package/index193.mjs +5 -59
  133. package/index194.js +1 -1
  134. package/index194.mjs +7 -188
  135. package/index195.js +1 -1
  136. package/index195.mjs +26 -122
  137. package/index196.js +1 -1
  138. package/index196.mjs +14 -23
  139. package/index197.js +1 -1
  140. package/index197.mjs +12 -72
  141. package/index198.js +1 -1
  142. package/index198.mjs +39 -377
  143. package/index199.js +1 -1
  144. package/index199.mjs +8 -46
  145. package/index20.js +1 -1
  146. package/index20.mjs +1 -1
  147. package/index200.js +1 -1
  148. package/index200.mjs +18 -4
  149. package/index201.js +1 -1
  150. package/index201.mjs +3 -25
  151. package/index202.js +1 -1
  152. package/index202.mjs +4 -47
  153. package/index203.js +1 -1
  154. package/index203.mjs +19 -5
  155. package/index204.js +1 -1
  156. package/index204.mjs +54 -24
  157. package/index205.js +1 -1
  158. package/index205.mjs +123 -11
  159. package/index206.js +1 -1
  160. package/index206.mjs +134 -4
  161. package/index207.js +1 -1
  162. package/index207.mjs +44 -14
  163. package/index208.js +1 -1
  164. package/index208.mjs +12 -40
  165. package/index209.js +1 -1
  166. package/index209.mjs +91 -53
  167. package/index210.js +1 -1
  168. package/index210.mjs +107 -42
  169. package/index211.js +1 -1
  170. package/index211.mjs +4 -28
  171. package/index212.js +1 -1
  172. package/index212.mjs +3 -31
  173. package/index213.js +1 -1
  174. package/index213.mjs +125 -14
  175. package/index214.js +1 -1
  176. package/index214.mjs +29 -10
  177. package/index215.js +1 -1
  178. package/index215.mjs +50 -27
  179. package/index216.js +1 -1
  180. package/index216.mjs +44 -9
  181. package/index217.js +1 -1
  182. package/index217.mjs +37 -6
  183. package/index218.js +1 -1
  184. package/index218.mjs +113 -5
  185. package/index219.js +1 -1
  186. package/index219.mjs +77 -7
  187. package/index220.js +1 -1
  188. package/index220.mjs +101 -29
  189. package/index221.js +1 -1
  190. package/index221.mjs +98 -19
  191. package/index222.js +1 -1
  192. package/index222.mjs +139 -12
  193. package/index223.js +1 -1
  194. package/index223.mjs +195 -41
  195. package/index224.js +1 -1
  196. package/index224.mjs +22 -8
  197. package/index225.js +1 -1
  198. package/index225.mjs +47 -15
  199. package/index226.js +1 -1
  200. package/index226.mjs +49 -3
  201. package/index227.js +1 -1
  202. package/index227.mjs +97 -4
  203. package/index228.js +1 -1
  204. package/index228.mjs +72 -20
  205. package/index229.js +1 -1
  206. package/index229.mjs +64 -50
  207. package/index230.js +1 -1
  208. package/index230.mjs +7 -124
  209. package/index231.js +1 -1
  210. package/index231.mjs +10 -133
  211. package/index232.js +1 -1
  212. package/index232.mjs +202 -43
  213. package/index233.js +1 -1
  214. package/index233.mjs +64 -14
  215. package/index234.js +1 -1
  216. package/index234.mjs +134 -86
  217. package/index235.js +1 -1
  218. package/index235.mjs +120 -102
  219. package/index236.js +1 -1
  220. package/index236.mjs +224 -4
  221. package/index237.js +1 -1
  222. package/index237.mjs +190 -3
  223. package/index238.js +1 -1
  224. package/index238.mjs +67 -123
  225. package/index239.js +1 -1
  226. package/index239.mjs +273 -23
  227. package/index24.js +1 -1
  228. package/index24.mjs +1 -1
  229. package/index240.js +1 -1
  230. package/index240.mjs +93 -46
  231. package/index241.js +1 -1
  232. package/index241.mjs +187 -43
  233. package/index242.js +1 -1
  234. package/index242.mjs +83 -36
  235. package/index243.js +1 -1
  236. package/index243.mjs +54 -109
  237. package/index244.js +1 -1
  238. package/index244.mjs +125 -76
  239. package/index245.js +1 -1
  240. package/index245.mjs +116 -101
  241. package/index246.js +1 -1
  242. package/index246.mjs +123 -98
  243. package/index247.js +1 -1
  244. package/index247.mjs +67 -135
  245. package/index248.js +1 -1
  246. package/index248.mjs +101 -188
  247. package/index249.js +1 -1
  248. package/index249.mjs +52 -22
  249. package/index25.js +1 -1
  250. package/index25.mjs +3 -3
  251. package/index250.js +1 -1
  252. package/index250.mjs +90 -46
  253. package/index251.js +1 -1
  254. package/index251.mjs +69 -47
  255. package/index252.js +1 -1
  256. package/index252.mjs +55 -96
  257. package/index253.js +1 -1
  258. package/index253.mjs +100 -72
  259. package/index254.js +5 -1
  260. package/index254.mjs +76 -64
  261. package/index255.js +1 -1
  262. package/index255.mjs +2025 -7
  263. package/index256.js +1 -1
  264. package/index256.mjs +59 -11
  265. package/index257.js +1 -1
  266. package/index257.mjs +188 -5
  267. package/index258.js +1 -1
  268. package/index258.mjs +5 -121
  269. package/index259.js +1 -1
  270. package/index259.mjs +121 -43
  271. package/index26.js +1 -1
  272. package/index26.mjs +1 -1
  273. package/index260.js +1 -1
  274. package/index260.mjs +43 -230
  275. package/index261.js +1 -1
  276. package/index261.mjs +226 -27
  277. package/index262.js +1 -1
  278. package/index262.mjs +30 -129
  279. package/index263.js +1 -1
  280. package/index263.mjs +3 -190
  281. package/index264.js +1 -1
  282. package/index264.mjs +4 -9
  283. package/index265.js +1 -1
  284. package/index265.mjs +5 -4
  285. package/index266.js +1 -1
  286. package/index266.mjs +5 -37
  287. package/index267.js +1 -1
  288. package/index267.mjs +5 -6
  289. package/index268.js +1 -1
  290. package/index268.mjs +5 -30
  291. package/index269.js +1 -1
  292. package/index269.mjs +5 -7
  293. package/index27.js +1 -1
  294. package/index27.mjs +1 -1
  295. package/index270.js +1 -1
  296. package/index270.mjs +5 -4
  297. package/index271.js +1 -1
  298. package/index271.mjs +5 -5
  299. package/index272.js +1 -1
  300. package/index272.mjs +4 -4
  301. package/index273.js +1 -1
  302. package/index273.mjs +4 -4
  303. package/index274.js +1 -1
  304. package/index274.mjs +1 -1
  305. package/index275.js +1 -1
  306. package/index275.mjs +1 -1
  307. package/index276.js +1 -1
  308. package/index276.mjs +4 -4
  309. package/index277.js +1 -1
  310. package/index277.mjs +4 -4
  311. package/index278.js +1 -1
  312. package/index278.mjs +1 -1
  313. package/index279.js +1 -1
  314. package/index279.mjs +1 -1
  315. package/index280.js +1 -1
  316. package/index280.mjs +4 -4
  317. package/index281.js +1 -1
  318. package/index281.mjs +4 -4
  319. package/index282.js +1 -1
  320. package/index282.mjs +4 -4
  321. package/index283.js +1 -1
  322. package/index283.mjs +4 -4
  323. package/index284.js +1 -1
  324. package/index284.mjs +1 -1
  325. package/index285.js +1 -1
  326. package/index285.mjs +4 -4
  327. package/index286.js +1 -1
  328. package/index286.mjs +4 -4
  329. package/index287.js +1 -1
  330. package/index287.mjs +4 -4
  331. package/index288.js +1 -1
  332. package/index288.mjs +1 -1
  333. package/index289.js +1 -1
  334. package/index289.mjs +4 -4
  335. package/index29.js +1 -1
  336. package/index29.mjs +3 -3
  337. package/index290.js +1 -1
  338. package/index290.mjs +4 -4
  339. package/index291.js +1 -1
  340. package/index291.mjs +1 -1
  341. package/index292.js +1 -1
  342. package/index292.mjs +4 -4
  343. package/index293.js +1 -1
  344. package/index293.mjs +4 -4
  345. package/index294.js +1 -1
  346. package/index294.mjs +4 -4
  347. package/index295.js +1 -1
  348. package/index295.mjs +4 -4
  349. package/index296.js +1 -1
  350. package/index296.mjs +4 -4
  351. package/index297.js +1 -1
  352. package/index297.mjs +4 -4
  353. package/index298.js +1 -1
  354. package/index298.mjs +1 -1
  355. package/index299.js +1 -1
  356. package/index299.mjs +130 -4
  357. package/index30.js +1 -1
  358. package/index30.mjs +3 -3
  359. package/index300.js +1 -1
  360. package/index300.mjs +191 -5
  361. package/index301.js +1 -1
  362. package/index301.mjs +10 -5
  363. package/index302.js +1 -1
  364. package/index302.mjs +4 -5
  365. package/index303.js +1 -1
  366. package/index303.mjs +37 -5
  367. package/index304.js +1 -1
  368. package/index304.mjs +6 -5
  369. package/index305.js +1 -1
  370. package/index305.mjs +30 -5
  371. package/index306.js +1 -1
  372. package/index306.mjs +6 -62
  373. package/index307.js +1 -1
  374. package/index307.mjs +63 -7
  375. package/index308.js +1 -1
  376. package/index308.mjs +25 -23
  377. package/index309.js +1 -1
  378. package/index309.mjs +7 -93
  379. package/index31.js +1 -1
  380. package/index31.mjs +3 -3
  381. package/index310.js +1 -1
  382. package/index310.mjs +24 -6
  383. package/index311.js +1 -1
  384. package/index311.mjs +90 -23
  385. package/index312.js +1 -1
  386. package/index312.mjs +8 -32
  387. package/index313.js +1 -1
  388. package/index313.mjs +25 -6
  389. package/index314.js +1 -1
  390. package/index314.mjs +33 -6
  391. package/index315.js +1 -1
  392. package/index315.mjs +6 -50
  393. package/index316.js +1 -1
  394. package/index316.mjs +6 -29
  395. package/index317.js +1 -1
  396. package/index317.mjs +50 -14
  397. package/index318.js +1 -1
  398. package/index318.mjs +14 -21
  399. package/index319.js +1 -1
  400. package/index319.mjs +20 -28
  401. package/index320.js +1 -1
  402. package/index320.mjs +27 -64
  403. package/index321.js +1 -1
  404. package/index321.mjs +66 -53
  405. package/index322.js +1 -1
  406. package/index322.mjs +53 -54
  407. package/index323.js +1 -1
  408. package/index323.mjs +54 -281
  409. package/index324.js +1 -1
  410. package/index324.mjs +281 -20
  411. package/index325.js +1 -1
  412. package/index325.mjs +20 -3
  413. package/index326.js +1 -1
  414. package/index326.mjs +3 -4
  415. package/index327.js +1 -1
  416. package/index327.mjs +4 -8
  417. package/index328.js +1 -1
  418. package/index328.mjs +7 -4
  419. package/index329.js +1 -1
  420. package/index329.mjs +164 -27
  421. package/index33.js +1 -1
  422. package/index33.mjs +1 -1
  423. package/index330.js +1 -1
  424. package/index330.mjs +27 -164
  425. package/index331.js +1 -0
  426. package/index331.mjs +8 -0
  427. package/index35.js +1 -1
  428. package/index35.mjs +2 -2
  429. package/index36.js +1 -1
  430. package/index36.mjs +1 -1
  431. package/index39.js +1 -1
  432. package/index39.mjs +1 -1
  433. package/index43.js +1 -1
  434. package/index43.mjs +1 -1
  435. package/index45.js +1 -1
  436. package/index45.mjs +3 -3
  437. package/index47.js +1 -1
  438. package/index47.mjs +2 -2
  439. package/index48.js +1 -1
  440. package/index48.mjs +1 -1
  441. package/index49.js +1 -1
  442. package/index49.mjs +81 -82
  443. package/index51.js +1 -1
  444. package/index51.mjs +1 -1
  445. package/index95.js +1 -1
  446. package/index95.mjs +1 -1
  447. package/package.json +1 -1
package/index225.mjs CHANGED
@@ -1,20 +1,52 @@
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);
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 { isElementInChildOfActiveScope as g } from "@react-aria/focus";
2
+ import { useEffect as m } from "react";
3
+ import { useFocusWithin as v } from "./index204.mjs";
4
+ import { useInteractOutside as b } from "./index226.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
+ };
13
14
  }, [
14
- t,
15
- r
15
+ n,
16
+ i
16
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
+ };
17
49
  }
18
50
  export {
19
- s as useFormReset
51
+ C as useOverlay
20
52
  };
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 w=require("./index180.js"),v=require("./index197.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/index226.mjs CHANGED
@@ -1,5 +1,51 @@
1
- const a = "react-aria-clear-focus", c = "react-aria-focus";
1
+ import { getOwnerDocument as p } from "./index180.mjs";
2
+ import { useEffectEvent as m } from "./index197.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);
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
+ }
34
+ }, [
35
+ n,
36
+ d,
37
+ o,
38
+ f
39
+ ]);
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
+ }
2
49
  export {
3
- a as CLEAR_FOCUS_EVENT,
4
- c as FOCUS_EVENT
50
+ $ as useInteractOutside
5
51
  };
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";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("./index178.js"),E=require("./index175.js"),w=require("./index192.js"),S=require("./index185.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/index227.mjs CHANGED
@@ -1,7 +1,100 @@
1
- import { isMac as a } from "./index210.mjs";
2
- function t(e) {
3
- return a() ? e.metaKey : e.ctrlKey;
1
+ import { chain as $ } from "./index178.mjs";
2
+ import { useLayoutEffect as b } from "./index175.mjs";
3
+ import { getScrollParent as w } from "./index192.mjs";
4
+ import { isIOS as g } from "./index185.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;
4
97
  }
5
98
  export {
6
- t as isCtrlKeyPressed
99
+ C as usePreventScroll
7
100
  };
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";const e=require("./index265.js"),r=require("./index266.js"),t=require("./index267.js"),s=require("./index268.js"),u=require("./index269.js"),n=require("./index270.js"),i=require("./index271.js"),o=require("./index272.js"),c=require("./index273.js"),q=require("./index274.js"),R=require("./index275.js"),l=require("./index276.js"),E=require("./index277.js"),S=require("./index278.js"),h=require("./index279.js"),L=require("./index280.js"),T=require("./index281.js"),a=require("./index282.js"),I=require("./index283.js"),P=require("./index284.js"),U=require("./index285.js"),d=require("./index286.js"),f=require("./index287.js"),p=require("./index288.js"),k=require("./index289.js"),K=require("./index290.js"),N=require("./index291.js"),b=require("./index292.js"),v=require("./index293.js"),z=require("./index294.js"),A=require("./index295.js"),B=require("./index296.js"),C=require("./index297.js"),D=require("./index298.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/index228.mjs CHANGED
@@ -1,22 +1,74 @@
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);
19
- }
1
+ import r from "./index265.mjs";
2
+ import o from "./index266.mjs";
3
+ import f from "./index267.mjs";
4
+ import t from "./index268.mjs";
5
+ import p from "./index269.mjs";
6
+ import $ from "./index270.mjs";
7
+ import e from "./index271.mjs";
8
+ import m from "./index272.mjs";
9
+ import s from "./index273.mjs";
10
+ import d from "./index274.mjs";
11
+ import c from "./index275.mjs";
12
+ import i from "./index276.mjs";
13
+ import x from "./index277.mjs";
14
+ import a from "./index278.mjs";
15
+ import b from "./index279.mjs";
16
+ import R from "./index280.mjs";
17
+ import l from "./index281.mjs";
18
+ import E from "./index282.mjs";
19
+ import S from "./index283.mjs";
20
+ import h from "./index284.mjs";
21
+ import L from "./index285.mjs";
22
+ import T from "./index286.mjs";
23
+ import u from "./index287.mjs";
24
+ import I from "./index288.mjs";
25
+ import P from "./index289.mjs";
26
+ import U from "./index290.mjs";
27
+ import k from "./index291.mjs";
28
+ import n from "./index292.mjs";
29
+ import v from "./index293.mjs";
30
+ import K from "./index294.mjs";
31
+ import N from "./index295.mjs";
32
+ import z from "./index296.mjs";
33
+ import A from "./index297.mjs";
34
+ import B from "./index298.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
+ };
20
72
  export {
21
- n as isFocusable
73
+ C as default
22
74
  };
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"});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/index229.mjs CHANGED
@@ -1,57 +1,71 @@
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
- });
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();
34
17
  }
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
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();
47
50
  }
48
- } : {
49
- focusWithinProps: {
50
- onFocus: g,
51
- onBlur: n
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));
52
57
  }
58
+ f === i[i.length - 1] ? (i.pop(), i.length && i[i.length - 1].observe()) : i.splice(i.indexOf(f), 1);
53
59
  };
54
60
  }
61
+ function E(o) {
62
+ let l = i[i.length - 1];
63
+ if (l && !l.visibleNodes.has(o))
64
+ return l.visibleNodes.add(o), () => {
65
+ l.visibleNodes.delete(o);
66
+ };
67
+ }
55
68
  export {
56
- S as useFocusWithin
69
+ v as ariaHideOutside,
70
+ E as keepVisible
57
71
  };
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 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/index230.mjs CHANGED
@@ -1,127 +1,10 @@
1
- import { add as n, subtract as o, set as $, cycleDate as f, constrain as l, setTime as b, cycleTime as x } from "./index231.mjs";
2
- import { compareDate as m, compareTime as v } from "./index232.mjs";
3
- import { dateToString as w, dateTimeToString as D } from "./index233.mjs";
4
- import { GregorianCalendar as T } from "./index234.mjs";
5
- import { toDate as u, toCalendarDateTime as C } from "./index235.mjs";
6
- import { _ as p } from "./index236.mjs";
7
- function y(r) {
8
- let t = typeof r[0] == "object" ? r.shift() : new T(), e;
9
- if (typeof r[0] == "string") e = r.shift();
10
- else {
11
- let s = t.getEras();
12
- e = s[s.length - 1];
13
- }
14
- let a = r.shift(), i = r.shift(), h = r.shift();
15
- return [
16
- t,
17
- e,
18
- a,
19
- i,
20
- h
21
- ];
22
- }
23
- var S = /* @__PURE__ */ new WeakMap();
24
- class d {
25
- /** Returns a copy of this date. */
26
- copy() {
27
- return this.era ? new d(this.calendar, this.era, this.year, this.month, this.day) : new d(this.calendar, this.year, this.month, this.day);
28
- }
29
- /** Returns a new `CalendarDate` with the given duration added to it. */
30
- add(t) {
31
- return n(this, t);
32
- }
33
- /** Returns a new `CalendarDate` with the given duration subtracted from it. */
34
- subtract(t) {
35
- return o(this, t);
36
- }
37
- /** Returns a new `CalendarDate` with the given fields set to the provided values. Other fields will be constrained accordingly. */
38
- set(t) {
39
- return $(this, t);
40
- }
41
- /**
42
- * Returns a new `CalendarDate` with the given field adjusted by a specified amount.
43
- * When the resulting value reaches the limits of the field, it wraps around.
44
- */
45
- cycle(t, e, a) {
46
- return f(this, t, e, a);
47
- }
48
- /** Converts the date to a native JavaScript Date object, with the time set to midnight in the given time zone. */
49
- toDate(t) {
50
- return u(this, t);
51
- }
52
- /** Converts the date to an ISO 8601 formatted string. */
53
- toString() {
54
- return w(this);
55
- }
56
- /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
57
- compare(t) {
58
- return m(this, t);
59
- }
60
- constructor(...t) {
61
- p(this, S, {
62
- writable: !0,
63
- value: void 0
64
- });
65
- let [e, a, i, h, s] = y(t);
66
- this.calendar = e, this.era = a, this.year = i, this.month = h, this.day = s, l(this);
67
- }
68
- }
69
- var _ = /* @__PURE__ */ new WeakMap();
70
- class c {
71
- /** Returns a copy of this date. */
72
- copy() {
73
- return this.era ? new c(this.calendar, this.era, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond) : new c(this.calendar, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
74
- }
75
- /** Returns a new `CalendarDateTime` with the given duration added to it. */
76
- add(t) {
77
- return n(this, t);
78
- }
79
- /** Returns a new `CalendarDateTime` with the given duration subtracted from it. */
80
- subtract(t) {
81
- return o(this, t);
82
- }
83
- /** Returns a new `CalendarDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */
84
- set(t) {
85
- return $(b(this, t), t);
86
- }
87
- /**
88
- * Returns a new `CalendarDateTime` with the given field adjusted by a specified amount.
89
- * When the resulting value reaches the limits of the field, it wraps around.
90
- */
91
- cycle(t, e, a) {
92
- switch (t) {
93
- case "era":
94
- case "year":
95
- case "month":
96
- case "day":
97
- return f(this, t, e, a);
98
- default:
99
- return x(this, t, e, a);
100
- }
101
- }
102
- /** Converts the date to a native JavaScript Date object in the given time zone. */
103
- toDate(t, e) {
104
- return u(this, t, e);
105
- }
106
- /** Converts the date to an ISO 8601 formatted string. */
107
- toString() {
108
- return D(this);
109
- }
110
- /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
111
- compare(t) {
112
- let e = m(this, t);
113
- return e === 0 ? v(this, C(t)) : e;
114
- }
115
- constructor(...t) {
116
- p(this, _, {
117
- writable: !0,
118
- value: void 0
119
- });
120
- let [e, a, i, h, s] = y(t);
121
- this.calendar = e, this.era = a, this.year = i, this.month = h, this.day = s, this.hour = t.shift() || 0, this.minute = t.shift() || 0, this.second = t.shift() || 0, this.millisecond = t.shift() || 0, l(this);
122
- }
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 : {};
123
6
  }
124
7
  export {
125
- d as CalendarDate,
126
- c as CalendarDateTime
8
+ r as PortalContext,
9
+ a as useUNSAFE_PortalContext
127
10
  };
package/index231.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function $(n,e){let r=n.copy(),a="hour"in r?Y(r,e):0;f(r,e.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,n),r.month+=e.months||0,s(r),M(r),r.day+=(e.weeks||0)*7,r.day+=e.days||0,r.day+=a,b(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let c=r.calendar.getYearsInEra(r);if(r.year>c){var d,h;let o=(d=(h=r.calendar).isInverseEra)===null||d===void 0?void 0:d.call(h,r);r.year=c,r.month=o?1:r.calendar.getMonthsInYear(r),r.day=o?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let l=r.calendar.getMonthsInYear(r);return r.month>l&&(r.month=l,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function f(n,e){var r,a;!((r=(a=n.calendar).isInverseEra)===null||r===void 0)&&r.call(a,n)&&(e=-e),n.year+=e}function s(n){for(;n.month<1;)f(n,-1),n.month+=n.calendar.getMonthsInYear(n);let e=0;for(;n.month>(e=n.calendar.getMonthsInYear(n));)n.month-=e,f(n,1)}function b(n){for(;n.day<1;)n.month--,s(n),n.day+=n.calendar.getDaysInMonth(n);for(;n.day>n.calendar.getDaysInMonth(n);)n.day-=n.calendar.getDaysInMonth(n),n.month++,s(n)}function M(n){n.month=Math.max(1,Math.min(n.calendar.getMonthsInYear(n),n.month)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day))}function y(n){n.calendar.constrainDate&&n.calendar.constrainDate(n),n.year=Math.max(1,Math.min(n.calendar.getYearsInEra(n),n.year)),M(n)}function u(n){let e={};for(let r in n)typeof n[r]=="number"&&(e[r]=-n[r]);return e}function g(n,e){return $(n,u(e))}function I(n,e){let r=n.copy();return e.era!=null&&(r.era=e.era),e.year!=null&&(r.year=e.year),e.month!=null&&(r.month=e.month),e.day!=null&&(r.day=e.day),y(r),r}function x(n,e){let r=n.copy();return e.hour!=null&&(r.hour=e.hour),e.minute!=null&&(r.minute=e.minute),e.second!=null&&(r.second=e.second),e.millisecond!=null&&(r.millisecond=e.millisecond),m(r),r}function D(n){n.second+=Math.floor(n.millisecond/1e3),n.millisecond=i(n.millisecond,1e3),n.minute+=Math.floor(n.second/60),n.second=i(n.second,60),n.hour+=Math.floor(n.minute/60),n.minute=i(n.minute,60);let e=Math.floor(n.hour/24);return n.hour=i(n.hour,24),e}function m(n){n.millisecond=Math.max(0,Math.min(n.millisecond,1e3)),n.second=Math.max(0,Math.min(n.second,59)),n.minute=Math.max(0,Math.min(n.minute,59)),n.hour=Math.max(0,Math.min(n.hour,23))}function i(n,e){let r=n%e;return r<0&&(r+=e),r}function Y(n,e){return n.hour+=e.hours||0,n.minute+=e.minutes||0,n.second+=e.seconds||0,n.millisecond+=e.milliseconds||0,D(n)}function w(n,e,r,a){let c=n.copy();switch(e){case"era":{let l=n.calendar.getEras(),o=l.indexOf(n.era);if(o<0)throw new Error("Invalid era: "+n.era);o=t(o,r,0,l.length-1,a==null?void 0:a.round),c.era=l[o],y(c);break}case"year":var d,h;!((d=(h=c.calendar).isInverseEra)===null||d===void 0)&&d.call(h,c)&&(r=-r),c.year=t(n.year,r,-1/0,9999,a==null?void 0:a.round),c.year===-1/0&&(c.year=1),c.calendar.balanceYearMonth&&c.calendar.balanceYearMonth(c,n);break;case"month":c.month=t(n.month,r,1,n.calendar.getMonthsInYear(n),a==null?void 0:a.round);break;case"day":c.day=t(n.day,r,1,n.calendar.getDaysInMonth(n),a==null?void 0:a.round);break;default:throw new Error("Unsupported field "+e)}return n.calendar.balanceDate&&n.calendar.balanceDate(c),y(c),c}function k(n,e,r,a){let c=n.copy();switch(e){case"hour":{let d=n.hour,h=0,l=23;if((a==null?void 0:a.hourCycle)===12){let o=d>=12;h=o?12:0,l=o?23:11}c.hour=t(d,r,h,l,a==null?void 0:a.round);break}case"minute":c.minute=t(n.minute,r,0,59,a==null?void 0:a.round);break;case"second":c.second=t(n.second,r,0,59,a==null?void 0:a.round);break;case"millisecond":c.millisecond=t(n.millisecond,r,0,999,a==null?void 0:a.round);break;default:throw new Error("Unsupported field "+e)}return c}function t(n,e,r,a,c=!1){if(c){n+=Math.sign(e),n<r&&(n=a);let d=Math.abs(e);e>0?n=Math.ceil(n/d)*d:n=Math.floor(n/d)*d,n>a&&(n=r)}else n+=e,n<r?n=a-(r-n-1):n>a&&(n=r+(n-a-1));return n}exports.add=$;exports.constrain=y;exports.constrainTime=m;exports.cycleDate=w;exports.cycleTime=k;exports.invertDuration=u;exports.set=I;exports.setTime=x;exports.subtract=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index309.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;