@okam/stack-ui 1.35.4 → 1.35.6

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 (315) hide show
  1. package/index107.js +1 -1
  2. package/index107.mjs +1 -1
  3. package/index108.js +1 -1
  4. package/index108.mjs +3 -3
  5. package/index109.js +1 -1
  6. package/index109.mjs +1 -1
  7. package/index114.js +1 -1
  8. package/index114.mjs +1 -1
  9. package/index116.js +1 -1
  10. package/index116.mjs +3 -3
  11. package/index117.js +1 -1
  12. package/index117.mjs +3 -3
  13. package/index118.js +1 -1
  14. package/index118.mjs +1 -1
  15. package/index119.js +1 -1
  16. package/index119.mjs +1 -1
  17. package/index120.js +1 -1
  18. package/index120.mjs +239 -37
  19. package/index122.js +2 -1
  20. package/index122.mjs +39 -9
  21. package/index123.js +1 -2
  22. package/index123.mjs +10 -38
  23. package/index124.js +1 -1
  24. package/index124.mjs +37 -21
  25. package/index125.js +1 -1
  26. package/index125.mjs +8 -42
  27. package/index126.js +1 -1
  28. package/index126.mjs +22 -25
  29. package/index127.js +1 -1
  30. package/index127.mjs +42 -40
  31. package/index128.js +1 -2
  32. package/index128.mjs +25 -57
  33. package/index129.js +1 -1
  34. package/index129.mjs +41 -39
  35. package/index130.js +2 -1
  36. package/index130.mjs +57 -30
  37. package/index131.js +1 -1
  38. package/index131.mjs +38 -19
  39. package/index132.js +1 -1
  40. package/index132.mjs +30 -8
  41. package/index133.js +1 -1
  42. package/index133.mjs +20 -30
  43. package/index134.js +1 -1
  44. package/index134.mjs +8 -14
  45. package/index135.js +1 -1
  46. package/index135.mjs +29 -16
  47. package/index136.js +1 -1
  48. package/index136.mjs +15 -21
  49. package/index137.js +1 -1
  50. package/index137.mjs +17 -11
  51. package/index138.js +1 -2
  52. package/index138.mjs +17 -44
  53. package/index139.js +1 -1
  54. package/index139.mjs +47 -21
  55. package/index140.js +2 -1
  56. package/index140.mjs +19 -18
  57. package/index141.js +1 -1
  58. package/index141.mjs +21 -6
  59. package/index142.js +1 -1
  60. package/index142.mjs +6 -57
  61. package/index144.js +1 -1
  62. package/index144.mjs +12 -46
  63. package/index145.js +1 -1
  64. package/index145.mjs +54 -238
  65. package/index146.js +1 -2
  66. package/index146.mjs +46 -13
  67. package/index147.js +2 -1
  68. package/index147.mjs +12 -29
  69. package/index148.js +1 -1
  70. package/index148.mjs +30 -12
  71. package/index149.js +1 -1
  72. package/index149.mjs +5 -21
  73. package/index150.js +2 -1
  74. package/index150.mjs +49 -5
  75. package/index151.js +1 -2
  76. package/index151.mjs +20 -48
  77. package/index153.js +1 -1
  78. package/index153.mjs +68 -22
  79. package/index154.js +1 -1
  80. package/index154.mjs +370 -62
  81. package/index155.js +1 -1
  82. package/index155.mjs +44 -379
  83. package/index156.js +1 -1
  84. package/index156.mjs +4 -47
  85. package/index157.js +1 -1
  86. package/index157.mjs +25 -4
  87. package/index158.js +1 -1
  88. package/index158.mjs +46 -23
  89. package/index159.js +1 -1
  90. package/index159.mjs +4 -46
  91. package/index160.js +1 -1
  92. package/index160.mjs +24 -5
  93. package/index161.js +1 -1
  94. package/index161.mjs +11 -23
  95. package/index162.js +1 -1
  96. package/index162.mjs +4 -12
  97. package/index163.js +1 -1
  98. package/index163.mjs +14 -4
  99. package/index164.js +1 -1
  100. package/index164.mjs +21 -14
  101. package/index165.js +1 -1
  102. package/index165.mjs +42 -21
  103. package/index166.js +1 -1
  104. package/index166.mjs +23 -41
  105. package/index167.js +1 -1
  106. package/index167.mjs +42 -24
  107. package/index168.js +1 -1
  108. package/index168.mjs +27 -41
  109. package/index169.js +1 -1
  110. package/index169.mjs +30 -27
  111. package/index170.js +1 -1
  112. package/index170.mjs +13 -30
  113. package/index171.js +1 -1
  114. package/index171.mjs +28 -14
  115. package/index172.js +1 -1
  116. package/index172.mjs +9 -28
  117. package/index173.js +1 -1
  118. package/index173.mjs +6 -9
  119. package/index174.js +1 -1
  120. package/index174.mjs +5 -6
  121. package/index175.js +1 -1
  122. package/index175.mjs +13 -5
  123. package/index176.js +1 -1
  124. package/index176.mjs +8 -13
  125. package/index177.js +1 -1
  126. package/index177.mjs +17 -8
  127. package/index178.js +1 -1
  128. package/index178.mjs +19 -17
  129. package/index179.js +1 -1
  130. package/index179.mjs +54 -19
  131. package/index18.js +1 -1
  132. package/index18.mjs +97 -25
  133. package/index180.js +1 -1
  134. package/index180.mjs +23 -50
  135. package/index181.js +1 -1
  136. package/index181.mjs +138 -122
  137. package/index182.js +1 -1
  138. package/index182.mjs +192 -129
  139. package/index183.js +1 -1
  140. package/index183.mjs +22 -44
  141. package/index184.js +1 -1
  142. package/index184.mjs +49 -14
  143. package/index185.js +1 -1
  144. package/index185.mjs +46 -93
  145. package/index186.js +1 -1
  146. package/index186.mjs +89 -98
  147. package/index187.js +1 -1
  148. package/index187.mjs +72 -5
  149. package/index188.js +1 -1
  150. package/index188.mjs +68 -3
  151. package/index189.js +1 -1
  152. package/index189.mjs +7 -125
  153. package/index19.js +1 -1
  154. package/index19.mjs +1 -1
  155. package/index190.js +1 -1
  156. package/index190.mjs +11 -29
  157. package/index191.js +1 -1
  158. package/index191.mjs +113 -40
  159. package/index192.js +1 -1
  160. package/index192.mjs +131 -41
  161. package/index193.js +1 -1
  162. package/index193.mjs +43 -36
  163. package/index194.js +1 -1
  164. package/index194.mjs +11 -110
  165. package/index195.js +1 -1
  166. package/index195.mjs +77 -59
  167. package/index196.js +1 -1
  168. package/index196.mjs +99 -94
  169. package/index197.js +1 -1
  170. package/index197.mjs +5 -98
  171. package/index198.js +1 -1
  172. package/index198.mjs +3 -140
  173. package/index199.js +1 -1
  174. package/index199.mjs +119 -191
  175. package/index200.js +1 -1
  176. package/index200.mjs +29 -22
  177. package/index201.js +1 -1
  178. package/index201.mjs +51 -49
  179. package/index202.js +1 -1
  180. package/index202.mjs +43 -47
  181. package/index203.js +1 -1
  182. package/index203.mjs +35 -95
  183. package/index204.js +1 -1
  184. package/index204.mjs +114 -72
  185. package/index205.js +1 -1
  186. package/index205.mjs +76 -67
  187. package/index206.js +1 -1
  188. package/index206.mjs +101 -7
  189. package/index207.js +1 -1
  190. package/index207.mjs +98 -12
  191. package/index23.js +1 -1
  192. package/index23.mjs +2 -2
  193. package/index235.js +1 -1
  194. package/index235.mjs +5 -5
  195. package/index236.js +1 -1
  196. package/index236.mjs +1 -1
  197. package/index237.js +1 -1
  198. package/index237.mjs +4 -4
  199. package/index238.js +1 -1
  200. package/index238.mjs +1 -1
  201. package/index239.js +1 -1
  202. package/index239.mjs +1 -1
  203. package/index24.js +1 -1
  204. package/index24.mjs +3 -3
  205. package/index240.js +1 -1
  206. package/index240.mjs +4 -4
  207. package/index241.js +1 -1
  208. package/index241.mjs +4 -4
  209. package/index242.js +1 -1
  210. package/index242.mjs +1 -1
  211. package/index243.js +1 -1
  212. package/index243.mjs +4 -4
  213. package/index244.js +1 -1
  214. package/index244.mjs +4 -4
  215. package/index245.js +1 -1
  216. package/index245.mjs +1 -1
  217. package/index246.js +1 -1
  218. package/index246.mjs +4 -4
  219. package/index247.js +1 -1
  220. package/index247.mjs +4 -4
  221. package/index248.js +1 -1
  222. package/index248.mjs +1 -1
  223. package/index249.js +1 -1
  224. package/index249.mjs +1 -1
  225. package/index25.js +1 -1
  226. package/index25.mjs +1 -1
  227. package/index250.js +1 -1
  228. package/index250.mjs +4 -4
  229. package/index251.js +1 -1
  230. package/index251.mjs +4 -4
  231. package/index252.js +1 -1
  232. package/index252.mjs +1 -1
  233. package/index253.js +1 -1
  234. package/index253.mjs +4 -4
  235. package/index254.js +1 -1
  236. package/index254.mjs +4 -4
  237. package/index255.js +1 -1
  238. package/index255.mjs +4 -4
  239. package/index256.js +1 -1
  240. package/index256.mjs +1 -1
  241. package/index257.js +1 -1
  242. package/index257.mjs +4 -4
  243. package/index258.js +1 -1
  244. package/index258.mjs +4 -4
  245. package/index259.js +1 -1
  246. package/index259.mjs +4 -4
  247. package/index26.js +1 -1
  248. package/index26.mjs +2 -2
  249. package/index260.js +1 -1
  250. package/index260.mjs +4 -4
  251. package/index261.js +1 -1
  252. package/index261.mjs +4 -4
  253. package/index262.js +1 -1
  254. package/index262.mjs +1 -1
  255. package/index263.js +1 -1
  256. package/index263.mjs +1 -1
  257. package/index264.js +1 -1
  258. package/index264.mjs +1 -1
  259. package/index265.js +1 -1
  260. package/index265.mjs +4 -4
  261. package/index266.js +1 -1
  262. package/index266.mjs +4 -4
  263. package/index267.js +1 -1
  264. package/index267.mjs +4 -4
  265. package/index268.js +1 -1
  266. package/index268.mjs +4 -4
  267. package/index269.js +1 -1
  268. package/index269.mjs +5 -5
  269. package/index278.js +1 -1
  270. package/index278.mjs +3 -3
  271. package/index28.js +1 -1
  272. package/index28.mjs +3 -3
  273. package/index280.js +1 -1
  274. package/index280.mjs +2 -2
  275. package/index281.js +1 -1
  276. package/index281.mjs +5 -5
  277. package/index284.js +1 -1
  278. package/index284.mjs +3 -3
  279. package/index287.js +1 -1
  280. package/index287.mjs +1 -1
  281. package/index288.js +1 -1
  282. package/index288.mjs +4 -4
  283. package/index29.js +1 -1
  284. package/index29.mjs +3 -3
  285. package/index30.js +1 -1
  286. package/index30.mjs +3 -3
  287. package/index32.js +1 -1
  288. package/index32.mjs +1 -1
  289. package/index34.js +1 -1
  290. package/index34.mjs +2 -2
  291. package/index35.js +1 -1
  292. package/index35.mjs +1 -1
  293. package/index37.js +1 -1
  294. package/index37.mjs +1 -1
  295. package/index38.js +1 -1
  296. package/index38.mjs +2 -2
  297. package/index42.js +1 -1
  298. package/index42.mjs +1 -1
  299. package/index70.js +1 -1
  300. package/index70.mjs +1 -1
  301. package/index71.js +1 -1
  302. package/index71.mjs +1 -1
  303. package/index72.js +1 -1
  304. package/index72.mjs +1 -1
  305. package/index74.js +1 -1
  306. package/index74.mjs +1 -1
  307. package/index75.js +1 -1
  308. package/index75.mjs +1 -1
  309. package/index76.js +1 -1
  310. package/index76.mjs +1 -1
  311. package/index77.js +1 -1
  312. package/index77.mjs +1 -1
  313. package/index84.js +1 -1
  314. package/index84.mjs +2 -2
  315. package/package.json +1 -1
package/index170.js CHANGED
@@ -1 +1 @@
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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index145.js");function d(a,t){let{id:i,"aria-label":l,"aria-labelledby":e}=a;return i=r.useId(i),e&&l?e=[...new Set([i,...e.trim().split(/\s+/)])].join(" "):e&&(e=e.trim().split(/\s+/).join(" ")),!l&&!e&&t&&(l=t),{id:i,"aria-label":l,"aria-labelledby":e}}exports.useLabels=d;
package/index170.mjs CHANGED
@@ -1,34 +1,17 @@
1
- import { useRef as c, useCallback as f, useEffect as b } from "react";
2
- function L() {
3
- let o = c(/* @__PURE__ */ new Map()), u = f((e, l, r, t) => {
4
- let n = t != null && t.once ? (...d) => {
5
- o.current.delete(r), r(...d);
6
- } : r;
7
- o.current.set(r, {
8
- type: l,
9
- eventTarget: e,
10
- fn: n,
11
- options: t
12
- }), e.addEventListener(l, n, t);
13
- }, []), a = f((e, l, r, t) => {
14
- var n;
15
- let d = ((n = o.current.get(r)) === null || n === void 0 ? void 0 : n.fn) || r;
16
- e.removeEventListener(l, d, t), o.current.delete(r);
17
- }, []), s = f(() => {
18
- o.current.forEach((e, l) => {
19
- a(e.eventTarget, e.type, l, e.options);
20
- });
21
- }, [
22
- a
23
- ]);
24
- return b(() => s, [
25
- s
26
- ]), {
27
- addGlobalListener: u,
28
- removeGlobalListener: a,
29
- removeAllGlobalListeners: s
1
+ import { useId as b } from "./index145.mjs";
2
+ function t(r, a) {
3
+ let { id: i, "aria-label": l, "aria-labelledby": e } = r;
4
+ return i = b(i), e && l ? e = [
5
+ .../* @__PURE__ */ new Set([
6
+ i,
7
+ ...e.trim().split(/\s+/)
8
+ ])
9
+ ].join(" ") : e && (e = e.trim().split(/\s+/).join(" ")), !l && !e && a && (l = a), {
10
+ id: i,
11
+ "aria-label": l,
12
+ "aria-labelledby": e
30
13
  };
31
14
  }
32
15
  export {
33
- L as useGlobalListeners
16
+ t as useLabels
34
17
  };
package/index171.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index142.js");function d(a,t){let{id:i,"aria-label":l,"aria-labelledby":e}=a;return i=r.useId(i),e&&l?e=[...new Set([i,...e.trim().split(/\s+/)])].join(" "):e&&(e=e.trim().split(/\s+/).join(" ")),!l&&!e&&t&&(l=t),{id:i,"aria-label":l,"aria-labelledby":e}}exports.useLabels=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react");function u(){return typeof window.ResizeObserver<"u"}function b(i){const{ref:e,box:s,onResize:r}=i;d.useEffect(()=>{let n=e==null?void 0:e.current;if(n)if(u()){const t=new window.ResizeObserver(o=>{o.length&&r()});return t.observe(n,{box:s}),()=>{n&&t.unobserve(n)}}else return window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1)}},[r,e,s])}exports.useResizeObserver=b;
package/index171.mjs CHANGED
@@ -1,17 +1,31 @@
1
- import { useId as b } from "./index142.mjs";
2
- function t(r, a) {
3
- let { id: i, "aria-label": l, "aria-labelledby": e } = r;
4
- return i = b(i), e && l ? e = [
5
- .../* @__PURE__ */ new Set([
6
- i,
7
- ...e.trim().split(/\s+/)
8
- ])
9
- ].join(" ") : e && (e = e.trim().split(/\s+/).join(" ")), !l && !e && a && (l = a), {
10
- id: i,
11
- "aria-label": l,
12
- "aria-labelledby": e
13
- };
1
+ import { useEffect as d } from "react";
2
+ function f() {
3
+ return typeof window.ResizeObserver < "u";
4
+ }
5
+ function u(o) {
6
+ const { ref: e, box: s, onResize: r } = o;
7
+ d(() => {
8
+ let n = e == null ? void 0 : e.current;
9
+ if (n)
10
+ if (f()) {
11
+ const i = new window.ResizeObserver((t) => {
12
+ t.length && r();
13
+ });
14
+ return i.observe(n, {
15
+ box: s
16
+ }), () => {
17
+ n && i.unobserve(n);
18
+ };
19
+ } else
20
+ return window.addEventListener("resize", r, !1), () => {
21
+ window.removeEventListener("resize", r, !1);
22
+ };
23
+ }, [
24
+ r,
25
+ e,
26
+ s
27
+ ]);
14
28
  }
15
29
  export {
16
- t as useLabels
30
+ u as useResizeObserver
17
31
  };
package/index172.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react");function u(){return typeof window.ResizeObserver<"u"}function b(i){const{ref:e,box:s,onResize:r}=i;d.useEffect(()=>{let n=e==null?void 0:e.current;if(n)if(u()){const t=new window.ResizeObserver(o=>{o.length&&r()});return t.observe(n,{box:s}),()=>{n&&t.unobserve(n)}}else return window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1)}},[r,e,s])}exports.useResizeObserver=b;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index156.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/index172.mjs CHANGED
@@ -1,31 +1,12 @@
1
- import { useEffect as d } from "react";
2
- function f() {
3
- return typeof window.ResizeObserver < "u";
4
- }
5
- function u(o) {
6
- const { ref: e, box: s, onResize: r } = o;
7
- d(() => {
8
- let n = e == null ? void 0 : e.current;
9
- if (n)
10
- if (f()) {
11
- const i = new window.ResizeObserver((t) => {
12
- t.length && r();
13
- });
14
- return i.observe(n, {
15
- box: s
16
- }), () => {
17
- n && i.unobserve(n);
18
- };
19
- } else
20
- return window.addEventListener("resize", r, !1), () => {
21
- window.removeEventListener("resize", r, !1);
22
- };
23
- }, [
24
- r,
25
- e,
26
- s
27
- ]);
1
+ import { useLayoutEffect as f } from "./index156.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
+ });
28
9
  }
29
10
  export {
30
- u as useResizeObserver
11
+ u as useSyncRef
31
12
  };
package/index173.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index157.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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index174.js");function r(n,l){let e=n;for(t.isScrollable(e,l)&&(e=e.parentElement);e&&!t.isScrollable(e,l);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}exports.getScrollParent=r;
package/index173.mjs CHANGED
@@ -1,12 +1,9 @@
1
- import { useLayoutEffect as f } from "./index157.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
- });
1
+ import { isScrollable as l } from "./index174.mjs";
2
+ function r(n, t) {
3
+ let e = n;
4
+ for (l(e, t) && (e = e.parentElement); e && !l(e, t); ) e = e.parentElement;
5
+ return e || document.scrollingElement || document.documentElement;
9
6
  }
10
7
  export {
11
- u as useSyncRef
8
+ r as getScrollParent
12
9
  };
package/index174.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index175.js");function r(n,l){let e=n;for(t.isScrollable(e,l)&&(e=e.parentElement);e&&!t.isScrollable(e,l);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}exports.getScrollParent=r;
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/index174.mjs CHANGED
@@ -1,9 +1,8 @@
1
- import { isScrollable as l } from "./index175.mjs";
2
- function r(n, t) {
3
- let e = n;
4
- for (l(e, t) && (e = e.parentElement); e && !l(e, t); ) e = e.parentElement;
5
- return e || document.scrollingElement || document.documentElement;
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;
6
5
  }
7
6
  export {
8
- r as getScrollParent
7
+ c as isScrollable
9
8
  };
package/index175.js CHANGED
@@ -1 +1 @@
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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index156.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;
package/index175.mjs CHANGED
@@ -1,8 +1,16 @@
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;
1
+ import { useLayoutEffect as f } from "./index156.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
+ }, []);
5
13
  }
6
14
  export {
7
- c as isScrollable
15
+ s as useEffectEvent
8
16
  };
package/index176.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index157.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"});const i=require("./index167.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;
package/index176.mjs CHANGED
@@ -1,16 +1,11 @@
1
- import { useLayoutEffect as f } from "./index157.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
+ import { isAndroid as i } from "./index167.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";
13
7
  }
14
8
  export {
15
- s as useEffectEvent
9
+ o as isVirtualClick,
10
+ u as isVirtualPointerEvent
16
11
  };
package/index177.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index168.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"});const l=require("./index175.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;
package/index177.mjs CHANGED
@@ -1,11 +1,20 @@
1
- import { isAndroid as i } from "./index168.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 { useEffectEvent as u } from "./index175.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
+ };
13
+ }, [
14
+ t,
15
+ r
16
+ ]);
7
17
  }
8
18
  export {
9
- o as isVirtualClick,
10
- u as isVirtualPointerEvent
19
+ s as useFormReset
11
20
  };
package/index178.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index176.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 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;
package/index178.mjs CHANGED
@@ -1,20 +1,22 @@
1
- import { useEffectEvent as u } from "./index176.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
- };
13
- }, [
14
- t,
15
- r
16
- ]);
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);
17
19
  }
18
20
  export {
19
- s as useFormReset
21
+ n as isFocusable
20
22
  };
package/index179.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"});const o=require("./index281.js"),c=require("react"),l=require("./index160.js"),m=require("./index161.js"),p=require("./index169.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;
package/index179.mjs CHANGED
@@ -1,22 +1,57 @@
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
+ import { useSyntheticBlurEvent as F, setEventTarget as W, createSyntheticEvent as v } from "./index281.mjs";
2
+ import { useRef as x, useCallback as $ } from "react";
3
+ import { getActiveElement as E, getEventTarget as T, nodeContains as B } from "./index160.mjs";
4
+ import { getOwnerDocument as G } from "./index161.mjs";
5
+ import { useGlobalListeners as L } from "./index169.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
+ };
19
54
  }
20
55
  export {
21
- n as isFocusable
56
+ S as useFocusWithin
22
57
  };
package/index18.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";const e=require("react/jsx-runtime"),k=require("react"),h=require("react-aria"),P=require("react-stately"),n=require("./index69.js"),T=require("./index75.js"),w=require("./index6.js"),y=require("./index50.js"),R=require("./index112.js"),v=require("./index3.js"),F=a=>{const{setUserSearchQuery:d}=T.useUserQueryValHook(),{label:i,themeName:s="search",tokens:m,customTheme:t,disabled:l,errorMessage:c,placeholder:x,icon:j}=a,o=P.useSearchFieldState(a);d(o.value);const u=k.useRef(null),{labelProps:p,inputProps:q,errorMessageProps:b,clearButtonProps:g}=h.useSearchField(a,o,u),r={...m,isError:c!=null},S=n(`${s}.wrapper`,r,t),$=n(`${s}.input`,r,t),N=n(`${s}.label`,r,t),f=n(`${s}.container`,r,t);return e.jsxs("div",{className:S,"aria-disabled":l,children:[i&&e.jsx("label",{...p,className:N,children:i}),e.jsxs("div",{className:f,children:[e.jsx("input",{ref:u,...q,placeholder:x,className:$,disabled:l}),e.jsx(h.FocusRing,{focusRingClass:"has-focus-ring",children:e.jsx(w.default,{handlePress:g.onPress,tokens:{isIconOnly:!0,buttonStyle:"hollow"},themeName:`${s}.icon`,"aria-label":"clear",children:j??(o.value===""?e.jsx(R,{width:"16",height:"16"}):e.jsx(y,{width:"16",height:"16"}))})})]}),c&&e.jsx(v.default,{themeName:`${s}.errorMessage`,tokens:r,...b,children:c})]})};module.exports=F;
2
+ "use strict";const e=require("react/jsx-runtime");require("./index2.js");const P=require("./index3.js");require("@react-aria/accordion");const D=require("react");require("./index74.js");const a=require("./index27.js"),c=require("react-aria");require("react-use");require("@react-spring/web");const y=require("./index69.js"),R=require("./index6.js");require("./index111.js");const w=require("react-stately");require("./index5.js");require("react-div-100vh");require("./index71.js");require("@react-aria/focus");require("./index10.js");require("./index76.js");require("./index12.js");require("./index120.js");require("sanitize-html");require("@react-aria/i18n");require("radashi");require("react-hook-form");require("./index77.js");const F=require("./index75.js"),M=require("./index50.js"),T=require("./index112.js");require("./index121.js");require("./index122.js");require("./index73.js");require("./index72.js");require("./index123.js");require("./index43.js");require("./index44.js");require("./index45.js");require("./index46.js");require("./index47.js");require("./index48.js");require("./index49.js");require("./index51.js");require("./index52.js");require("./index53.js");require("./index54.js");require("./index55.js");require("./index56.js");require("./index57.js");require("./index58.js");require("./index59.js");require("./index60.js");require("./index61.js");require("./index62.js");require("./index63.js");require("./index64.js");require("./index65.js");require("./index66.js");require("./index67.js");require("./index68.js");require("./index70.js");require("./index84.js");const v=n=>{const{setUserSearchQuery:d}=F.useUserQueryValHook(),{label:q,themeName:r="search",tokens:h,customTheme:m,disabled:b,errorMessage:u,placeholder:x,icon:f,isDisabled:p}=n,i=p||b,l={...n,isDisabled:i},t=w.useSearchFieldState(l);d(t.value);const o=D.useRef(null),{labelProps:j,inputProps:k,errorMessageProps:$,clearButtonProps:g}=c.useSearchField(l,t,o),S=u!=null,s={...h,isError:S,isDisabled:i??!1},N=y(`${r}.input`,s,m);return e.jsxs(a.default,{themeName:`${r}.wrapper`,tokens:s,"aria-disabled":i??!1,children:[q&&e.jsx(a.default,{...j,as:"label",themeName:`${r}.label`,tokens:s,children:q}),e.jsxs(a.default,{themeName:`${r}.container`,tokens:s,children:[e.jsx("input",{ref:o,...k,placeholder:x,className:N,disabled:i}),e.jsx(c.FocusRing,{focusRingClass:"has-focus-ring",children:e.jsx(R.default,{isDisabled:i,handlePress:g.onPress,tokens:{isIconOnly:!0,buttonStyle:"hollow",isDisabled:i??!1},themeName:`${r}.icon`,"aria-label":"clear",children:f??(t.value===""?e.jsx(T,{width:"16",height:"16"}):e.jsx(M,{width:"16",height:"16"}))})})]}),u&&e.jsx(P.default,{themeName:`${r}.errorMessage`,tokens:s,...$,children:u})]})};module.exports=v;
package/index18.mjs CHANGED
@@ -1,37 +1,109 @@
1
1
  "use client";
2
- import { jsxs as h, jsx as e } from "react/jsx-runtime";
3
- import k from "react";
4
- import { useSearchField as w, FocusRing as v } from "react-aria";
5
- import { useSearchFieldState as x } from "react-stately";
6
- import t from "./index69.mjs";
7
- import { useUserQueryValHook as C } from "./index75.mjs";
2
+ import { jsxs as c, jsx as r } from "react/jsx-runtime";
3
+ import "./index2.mjs";
4
+ import x from "./index3.mjs";
5
+ import "@react-aria/accordion";
6
+ import T from "react";
7
+ import "./index74.mjs";
8
+ import s from "./index27.mjs";
9
+ import { useSearchField as w, FocusRing as B } from "react-aria";
10
+ import "react-use";
11
+ import "@react-spring/web";
12
+ import C from "./index69.mjs";
8
13
  import F from "./index6.mjs";
9
- import R from "./index50.mjs";
10
- import B from "./index112.mjs";
11
- import M from "./index3.mjs";
12
- const z = (a) => {
13
- const { setUserSearchQuery: u } = C(), { label: i, themeName: r = "search", tokens: p, customTheme: s, disabled: c, errorMessage: n, placeholder: d, icon: f } = a, l = x(a);
14
- u(l.value);
15
- const m = k.useRef(null), { labelProps: b, inputProps: g, errorMessageProps: T, clearButtonProps: N } = w(a, l, m), o = { ...p, isError: n != null }, S = t(`${r}.wrapper`, o, s), y = t(`${r}.input`, o, s), P = t(`${r}.label`, o, s), $ = t(`${r}.container`, o, s);
16
- return /* @__PURE__ */ h("div", { className: S, "aria-disabled": c, children: [
17
- i && // eslint-disable-next-line jsx-a11y/label-has-associated-control
18
- /* @__PURE__ */ e("label", { ...b, className: P, children: i }),
19
- /* @__PURE__ */ h("div", { className: $, children: [
20
- /* @__PURE__ */ e("input", { ref: m, ...g, placeholder: d, className: y, disabled: c }),
21
- /* @__PURE__ */ e(v, { focusRingClass: "has-focus-ring", children: /* @__PURE__ */ e(
14
+ import "./index111.mjs";
15
+ import { useSearchFieldState as R } from "react-stately";
16
+ import "./index5.mjs";
17
+ import "react-div-100vh";
18
+ import "./index71.mjs";
19
+ import "@react-aria/focus";
20
+ import "./index10.mjs";
21
+ import "./index76.mjs";
22
+ import "./index12.mjs";
23
+ import "./index120.mjs";
24
+ import "sanitize-html";
25
+ import "@react-aria/i18n";
26
+ import "radashi";
27
+ import "react-hook-form";
28
+ import "./index77.mjs";
29
+ import { useUserQueryValHook as M } from "./index75.mjs";
30
+ import j from "./index50.mjs";
31
+ import v from "./index112.mjs";
32
+ import "./index121.mjs";
33
+ import "./index122.mjs";
34
+ import "./index73.mjs";
35
+ import "./index72.mjs";
36
+ import "./index123.mjs";
37
+ import "./index43.mjs";
38
+ import "./index44.mjs";
39
+ import "./index45.mjs";
40
+ import "./index46.mjs";
41
+ import "./index47.mjs";
42
+ import "./index48.mjs";
43
+ import "./index49.mjs";
44
+ import "./index51.mjs";
45
+ import "./index52.mjs";
46
+ import "./index53.mjs";
47
+ import "./index54.mjs";
48
+ import "./index55.mjs";
49
+ import "./index56.mjs";
50
+ import "./index57.mjs";
51
+ import "./index58.mjs";
52
+ import "./index59.mjs";
53
+ import "./index60.mjs";
54
+ import "./index61.mjs";
55
+ import "./index62.mjs";
56
+ import "./index63.mjs";
57
+ import "./index64.mjs";
58
+ import "./index65.mjs";
59
+ import "./index66.mjs";
60
+ import "./index67.mjs";
61
+ import "./index68.mjs";
62
+ import "./index70.mjs";
63
+ import "./index84.mjs";
64
+ const qr = (p) => {
65
+ const { setUserSearchQuery: h } = M(), {
66
+ label: a,
67
+ themeName: o = "search",
68
+ tokens: d,
69
+ customTheme: u,
70
+ disabled: f,
71
+ errorMessage: i,
72
+ placeholder: b,
73
+ icon: g,
74
+ isDisabled: k
75
+ } = p, t = k || f, l = { ...p, isDisabled: t }, m = R(l);
76
+ h(m.value);
77
+ const n = T.useRef(null), { labelProps: N, inputProps: P, errorMessageProps: S, clearButtonProps: y } = w(l, m, n), D = i != null, e = { ...d, isError: D, isDisabled: t ?? !1 }, $ = C(`${o}.input`, e, u);
78
+ return /* @__PURE__ */ c(s, { themeName: `${o}.wrapper`, tokens: e, "aria-disabled": t ?? !1, children: [
79
+ a && // eslint-disable-next-line jsx-a11y/label-has-associated-control
80
+ /* @__PURE__ */ r(s, { ...N, as: "label", themeName: `${o}.label`, tokens: e, children: a }),
81
+ /* @__PURE__ */ c(s, { themeName: `${o}.container`, tokens: e, children: [
82
+ /* @__PURE__ */ r(
83
+ "input",
84
+ {
85
+ ref: n,
86
+ ...P,
87
+ placeholder: b,
88
+ className: $,
89
+ disabled: t
90
+ }
91
+ ),
92
+ /* @__PURE__ */ r(B, { focusRingClass: "has-focus-ring", children: /* @__PURE__ */ r(
22
93
  F,
23
94
  {
24
- handlePress: N.onPress,
25
- tokens: { isIconOnly: !0, buttonStyle: "hollow" },
26
- themeName: `${r}.icon`,
95
+ isDisabled: t,
96
+ handlePress: y.onPress,
97
+ tokens: { isIconOnly: !0, buttonStyle: "hollow", isDisabled: t ?? !1 },
98
+ themeName: `${o}.icon`,
27
99
  "aria-label": "clear",
28
- children: f ?? (l.value === "" ? /* @__PURE__ */ e(B, { width: "16", height: "16" }) : /* @__PURE__ */ e(R, { width: "16", height: "16" }))
100
+ children: g ?? (m.value === "" ? /* @__PURE__ */ r(v, { width: "16", height: "16" }) : /* @__PURE__ */ r(j, { width: "16", height: "16" }))
29
101
  }
30
102
  ) })
31
103
  ] }),
32
- n && /* @__PURE__ */ e(M, { themeName: `${r}.errorMessage`, tokens: o, ...T, children: n })
104
+ i && /* @__PURE__ */ r(x, { themeName: `${o}.errorMessage`, tokens: e, ...S, children: i })
33
105
  ] });
34
106
  };
35
107
  export {
36
- z as default
108
+ qr as default
37
109
  };
package/index180.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index281.js"),c=require("react"),l=require("./index161.js"),m=require("./index162.js"),p=require("./index170.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("react");function m(o,p,s){let[b,u]=l.useState(o||p),i=l.useRef(o!==void 0),e=o!==void 0;l.useEffect(()=>{let t=i.current;t!==e&&process.env.NODE_ENV!=="production"&&console.warn(`WARN: A component changed from ${t?"controlled":"uncontrolled"} to ${e?"controlled":"uncontrolled"}.`),i.current=e},[e]);let n=e?o:b,S=l.useCallback((t,...f)=>{let d=(r,...c)=>{s&&(Object.is(n,r)||s(r,...c)),e||(n=r)};typeof t=="function"?(process.env.NODE_ENV!=="production"&&console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),u((c,...V)=>{let a=t(e?n:c,...V);return d(a,...f),e?c:a})):(e||u(t),d(t,...f))},[e,n,s]);return[n,S]}exports.useControlledState=m;