@okam/stack-ui 1.36.0 → 1.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (271) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/components/Lightbox/interface.d.ts +2 -0
  3. package/index111.js +1 -1
  4. package/index111.mjs +1 -1
  5. package/index113.js +1 -1
  6. package/index113.mjs +1 -1
  7. package/index114.js +1 -1
  8. package/index114.mjs +2 -2
  9. package/index115.js +1 -1
  10. package/index115.mjs +1 -1
  11. package/index122.js +1 -1
  12. package/index122.mjs +3 -3
  13. package/index123.js +1 -1
  14. package/index123.mjs +3 -3
  15. package/index124.js +1 -1
  16. package/index124.mjs +1 -1
  17. package/index125.js +1 -1
  18. package/index125.mjs +1 -1
  19. package/index130.js +1 -1
  20. package/index130.mjs +1 -1
  21. package/index132.js +1 -1
  22. package/index132.mjs +2 -2
  23. package/index133.js +1 -1
  24. package/index133.mjs +5 -5
  25. package/index134.js +1 -1
  26. package/index134.mjs +3 -3
  27. package/index135.js +1 -1
  28. package/index135.mjs +9 -9
  29. package/index141.js +1 -1
  30. package/index141.mjs +1 -1
  31. package/index145.js +1 -1
  32. package/index145.mjs +2 -2
  33. package/index147.js +1 -1
  34. package/index147.mjs +1 -1
  35. package/index148.js +1 -1
  36. package/index148.mjs +2 -2
  37. package/index152.js +1 -1
  38. package/index152.mjs +46 -12
  39. package/index153.js +2 -1
  40. package/index153.mjs +13 -46
  41. package/index154.js +1 -2
  42. package/index154.mjs +29 -12
  43. package/index155.js +1 -1
  44. package/index155.mjs +57 -30
  45. package/index156.js +1 -1
  46. package/index156.mjs +12 -57
  47. package/index159.js +1 -1
  48. package/index159.mjs +1 -1
  49. package/index161.js +1 -1
  50. package/index161.mjs +68 -22
  51. package/index162.js +1 -1
  52. package/index162.mjs +370 -62
  53. package/index163.js +1 -1
  54. package/index163.mjs +44 -379
  55. package/index164.js +1 -1
  56. package/index164.mjs +4 -47
  57. package/index165.js +1 -1
  58. package/index165.mjs +25 -4
  59. package/index166.js +1 -1
  60. package/index166.mjs +46 -23
  61. package/index167.js +1 -1
  62. package/index167.mjs +4 -46
  63. package/index168.js +1 -1
  64. package/index168.mjs +24 -5
  65. package/index169.js +1 -1
  66. package/index169.mjs +11 -23
  67. package/index170.js +1 -1
  68. package/index170.mjs +4 -12
  69. package/index171.js +1 -1
  70. package/index171.mjs +14 -4
  71. package/index172.js +1 -1
  72. package/index172.mjs +21 -14
  73. package/index173.js +1 -1
  74. package/index173.mjs +42 -21
  75. package/index174.js +1 -1
  76. package/index174.mjs +52 -37
  77. package/index175.js +1 -1
  78. package/index175.mjs +39 -55
  79. package/index176.js +1 -1
  80. package/index176.mjs +27 -40
  81. package/index177.js +1 -1
  82. package/index177.mjs +30 -27
  83. package/index178.js +1 -1
  84. package/index178.mjs +13 -30
  85. package/index179.js +1 -1
  86. package/index179.mjs +10 -14
  87. package/index18.js +1 -1
  88. package/index18.mjs +45 -42
  89. package/index180.js +1 -1
  90. package/index180.mjs +28 -10
  91. package/index181.js +1 -1
  92. package/index181.mjs +9 -28
  93. package/index182.js +1 -1
  94. package/index182.mjs +6 -9
  95. package/index183.js +1 -1
  96. package/index183.mjs +5 -6
  97. package/index184.js +1 -1
  98. package/index184.mjs +7 -5
  99. package/index185.js +1 -1
  100. package/index185.mjs +29 -7
  101. package/index186.js +1 -1
  102. package/index186.mjs +16 -27
  103. package/index187.js +1 -1
  104. package/index187.mjs +12 -17
  105. package/index188.js +1 -1
  106. package/index188.mjs +43 -13
  107. package/index189.js +1 -1
  108. package/index189.mjs +7 -42
  109. package/index190.js +1 -1
  110. package/index190.mjs +17 -8
  111. package/index191.js +1 -1
  112. package/index191.mjs +3 -18
  113. package/index192.js +1 -1
  114. package/index192.mjs +5 -3
  115. package/index193.js +1 -1
  116. package/index193.mjs +19 -4
  117. package/index194.js +1 -1
  118. package/index194.mjs +54 -19
  119. package/index195.js +1 -1
  120. package/index195.mjs +23 -50
  121. package/index196.js +1 -1
  122. package/index196.mjs +122 -138
  123. package/index197.js +1 -1
  124. package/index197.mjs +129 -192
  125. package/index198.js +1 -1
  126. package/index198.mjs +44 -22
  127. package/index199.js +1 -1
  128. package/index199.mjs +14 -49
  129. package/index200.js +1 -1
  130. package/index200.mjs +93 -46
  131. package/index201.js +1 -1
  132. package/index201.mjs +98 -89
  133. package/index202.js +1 -1
  134. package/index202.mjs +5 -72
  135. package/index203.js +1 -1
  136. package/index203.mjs +3 -68
  137. package/index204.js +1 -1
  138. package/index204.mjs +125 -7
  139. package/index205.js +1 -1
  140. package/index205.mjs +29 -11
  141. package/index206.js +1 -1
  142. package/index206.mjs +40 -113
  143. package/index207.js +1 -1
  144. package/index207.mjs +41 -131
  145. package/index208.js +1 -1
  146. package/index208.mjs +36 -43
  147. package/index209.js +1 -1
  148. package/index209.mjs +110 -11
  149. package/index210.js +1 -1
  150. package/index210.mjs +59 -77
  151. package/index211.js +1 -1
  152. package/index211.mjs +94 -99
  153. package/index212.js +1 -1
  154. package/index212.mjs +98 -5
  155. package/index213.js +1 -1
  156. package/index213.mjs +140 -3
  157. package/index214.js +1 -1
  158. package/index214.mjs +191 -119
  159. package/index215.js +1 -1
  160. package/index215.mjs +22 -29
  161. package/index216.js +1 -1
  162. package/index216.mjs +49 -51
  163. package/index217.js +1 -1
  164. package/index217.mjs +47 -43
  165. package/index218.js +1 -1
  166. package/index218.mjs +95 -35
  167. package/index219.js +1 -1
  168. package/index219.mjs +72 -114
  169. package/index220.js +1 -1
  170. package/index220.mjs +67 -76
  171. package/index221.js +1 -1
  172. package/index221.mjs +7 -101
  173. package/index222.js +1 -1
  174. package/index222.mjs +12 -98
  175. package/index250.js +1 -1
  176. package/index250.mjs +4 -4
  177. package/index252.js +1 -1
  178. package/index252.mjs +8 -8
  179. package/index253.js +1 -1
  180. package/index253.mjs +1 -1
  181. package/index255.js +1 -1
  182. package/index255.mjs +5 -5
  183. package/index256.js +1 -1
  184. package/index256.mjs +1 -1
  185. package/index257.js +1 -1
  186. package/index257.mjs +4 -4
  187. package/index258.js +1 -1
  188. package/index258.mjs +1 -1
  189. package/index259.js +1 -1
  190. package/index259.mjs +1 -1
  191. package/index260.js +1 -1
  192. package/index260.mjs +4 -4
  193. package/index261.js +1 -1
  194. package/index261.mjs +4 -4
  195. package/index262.js +1 -1
  196. package/index262.mjs +1 -1
  197. package/index263.js +1 -1
  198. package/index263.mjs +4 -4
  199. package/index264.js +1 -1
  200. package/index264.mjs +4 -4
  201. package/index265.js +1 -1
  202. package/index265.mjs +1 -1
  203. package/index266.js +1 -1
  204. package/index266.mjs +4 -4
  205. package/index267.js +1 -1
  206. package/index267.mjs +4 -4
  207. package/index268.js +1 -1
  208. package/index268.mjs +1 -1
  209. package/index269.js +1 -1
  210. package/index269.mjs +1 -1
  211. package/index270.js +1 -1
  212. package/index270.mjs +4 -4
  213. package/index271.js +1 -1
  214. package/index271.mjs +4 -4
  215. package/index272.js +1 -1
  216. package/index272.mjs +1 -1
  217. package/index273.js +1 -1
  218. package/index273.mjs +4 -4
  219. package/index274.js +1 -1
  220. package/index274.mjs +4 -4
  221. package/index275.js +1 -1
  222. package/index275.mjs +4 -4
  223. package/index276.js +1 -1
  224. package/index276.mjs +1 -1
  225. package/index277.js +1 -1
  226. package/index277.mjs +4 -4
  227. package/index278.js +1 -1
  228. package/index278.mjs +4 -4
  229. package/index279.js +1 -1
  230. package/index279.mjs +4 -4
  231. package/index280.js +1 -1
  232. package/index280.mjs +4 -4
  233. package/index281.js +1 -1
  234. package/index281.mjs +4 -4
  235. package/index282.js +1 -1
  236. package/index282.mjs +1 -1
  237. package/index283.js +1 -1
  238. package/index283.mjs +1 -1
  239. package/index284.js +1 -1
  240. package/index284.mjs +1 -1
  241. package/index285.js +1 -1
  242. package/index285.mjs +4 -4
  243. package/index286.js +1 -1
  244. package/index286.mjs +4 -4
  245. package/index287.js +1 -1
  246. package/index287.mjs +4 -4
  247. package/index288.js +1 -1
  248. package/index288.mjs +4 -4
  249. package/index289.js +1 -1
  250. package/index289.mjs +5 -5
  251. package/index298.js +1 -1
  252. package/index298.mjs +3 -3
  253. package/index300.js +1 -1
  254. package/index300.mjs +2 -2
  255. package/index301.js +1 -1
  256. package/index301.mjs +5 -5
  257. package/index304.js +1 -1
  258. package/index304.mjs +3 -3
  259. package/index307.js +1 -1
  260. package/index307.mjs +5 -5
  261. package/index308.js +1 -1
  262. package/index308.mjs +1 -1
  263. package/index309.js +1 -1
  264. package/index309.mjs +4 -4
  265. package/index310.js +1 -1
  266. package/index310.mjs +2 -2
  267. package/index314.js +1 -1
  268. package/index314.mjs +1 -1
  269. package/index9.js +1 -1
  270. package/index9.mjs +28 -26
  271. package/package.json +1 -1
package/index188.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index165.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 W=require("./index184.js");function L(e,o){let d=T(e,o,"left"),t=T(e,o,"top"),l=o.offsetWidth,f=o.offsetHeight,r=e.scrollLeft,n=e.scrollTop,{borderTopWidth:i,borderLeftWidth:s,scrollPaddingTop:c,scrollPaddingRight:a,scrollPaddingBottom:$,scrollPaddingLeft:S}=getComputedStyle(e),I=r+parseInt(s,10),u=n+parseInt(i,10),b=I+e.clientWidth,P=u+e.clientHeight,p=parseInt(c,10)||0,v=parseInt($,10)||0,h=parseInt(a,10)||0,g=parseInt(S,10)||0;d<=r+g?r=d-parseInt(s,10)-g:d+l>b-h&&(r+=d+l-b+h),t<=u+p?n=t-parseInt(i,10)-p:t+f>P-v&&(n+=t+f-P+v),e.scrollLeft=r,e.scrollTop=n}function T(e,o,d){const t=d==="left"?"offsetLeft":"offsetTop";let l=0;for(;o.offsetParent&&(l+=o[t],o.offsetParent!==e);){if(o.offsetParent.contains(e)){l-=e[t];break}o=o.offsetParent}return l}function k(e,o){if(e&&document.contains(e)){let r=document.scrollingElement||document.documentElement;if(window.getComputedStyle(r).overflow==="hidden"){let i=W.getScrollParents(e);for(let s of i)L(s,e)}else{var d;let{left:i,top:s}=e.getBoundingClientRect();e==null||(d=e.scrollIntoView)===null||d===void 0||d.call(e,{block:"nearest"});let{left:c,top:a}=e.getBoundingClientRect();if(Math.abs(i-c)>1||Math.abs(s-a)>1){var t,l,f;o==null||(l=o.containingElement)===null||l===void 0||(t=l.scrollIntoView)===null||t===void 0||t.call(l,{block:"center",inline:"center"}),(f=e.scrollIntoView)===null||f===void 0||f.call(e,{block:"nearest"})}}}}exports.scrollIntoView=L;exports.scrollIntoViewport=k;
package/index188.mjs CHANGED
@@ -1,16 +1,46 @@
1
- import { useLayoutEffect as f } from "./index165.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 { getScrollParents as I } from "./index184.mjs";
2
+ function W(o, e) {
3
+ let t = L(o, e, "left"), d = L(o, e, "top"), l = e.offsetWidth, r = e.offsetHeight, f = o.scrollLeft, c = o.scrollTop, { borderTopWidth: i, borderLeftWidth: s, scrollPaddingTop: n, scrollPaddingRight: a, scrollPaddingBottom: T, scrollPaddingLeft: g } = getComputedStyle(o), x = f + parseInt(s, 10), u = c + parseInt(i, 10), b = x + o.clientWidth, p = u + o.clientHeight, P = parseInt(n, 10) || 0, v = parseInt(T, 10) || 0, h = parseInt(a, 10) || 0, $ = parseInt(g, 10) || 0;
4
+ t <= f + $ ? f = t - parseInt(s, 10) - $ : t + l > b - h && (f += t + l - b + h), d <= u + P ? c = d - parseInt(i, 10) - P : d + r > p - v && (c += d + r - p + v), o.scrollLeft = f, o.scrollTop = c;
5
+ }
6
+ function L(o, e, t) {
7
+ const d = t === "left" ? "offsetLeft" : "offsetTop";
8
+ let l = 0;
9
+ for (; e.offsetParent && (l += e[d], e.offsetParent !== o); ) {
10
+ if (e.offsetParent.contains(o)) {
11
+ l -= o[d];
12
+ break;
13
+ }
14
+ e = e.offsetParent;
15
+ }
16
+ return l;
17
+ }
18
+ function B(o, e) {
19
+ if (o && document.contains(o)) {
20
+ let f = document.scrollingElement || document.documentElement;
21
+ if (window.getComputedStyle(f).overflow === "hidden") {
22
+ let i = I(o);
23
+ for (let s of i) W(s, o);
24
+ } else {
25
+ var t;
26
+ let { left: i, top: s } = o.getBoundingClientRect();
27
+ o == null || (t = o.scrollIntoView) === null || t === void 0 || t.call(o, {
28
+ block: "nearest"
29
+ });
30
+ let { left: n, top: a } = o.getBoundingClientRect();
31
+ if (Math.abs(i - n) > 1 || Math.abs(s - a) > 1) {
32
+ var d, l, r;
33
+ e == null || (l = e.containingElement) === null || l === void 0 || (d = l.scrollIntoView) === null || d === void 0 || d.call(l, {
34
+ block: "center",
35
+ inline: "center"
36
+ }), (r = o.scrollIntoView) === null || r === void 0 || r.call(o, {
37
+ block: "nearest"
38
+ });
39
+ }
40
+ }
41
+ }
13
42
  }
14
43
  export {
15
- s as useEffectEvent
44
+ W as scrollIntoView,
45
+ B as scrollIntoViewport
16
46
  };
package/index189.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("./index185.js");function L(e,o){let d=T(e,o,"left"),t=T(e,o,"top"),l=o.offsetWidth,f=o.offsetHeight,r=e.scrollLeft,n=e.scrollTop,{borderTopWidth:i,borderLeftWidth:s,scrollPaddingTop:c,scrollPaddingRight:a,scrollPaddingBottom:$,scrollPaddingLeft:S}=getComputedStyle(e),I=r+parseInt(s,10),u=n+parseInt(i,10),b=I+e.clientWidth,P=u+e.clientHeight,p=parseInt(c,10)||0,v=parseInt($,10)||0,h=parseInt(a,10)||0,g=parseInt(S,10)||0;d<=r+g?r=d-parseInt(s,10)-g:d+l>b-h&&(r+=d+l-b+h),t<=u+p?n=t-parseInt(i,10)-p:t+f>P-v&&(n+=t+f-P+v),e.scrollLeft=r,e.scrollTop=n}function T(e,o,d){const t=d==="left"?"offsetLeft":"offsetTop";let l=0;for(;o.offsetParent&&(l+=o[t],o.offsetParent!==e);){if(o.offsetParent.contains(e)){l-=e[t];break}o=o.offsetParent}return l}function k(e,o){if(e&&document.contains(e)){let r=document.scrollingElement||document.documentElement;if(window.getComputedStyle(r).overflow==="hidden"){let i=W.getScrollParents(e);for(let s of i)L(s,e)}else{var d;let{left:i,top:s}=e.getBoundingClientRect();e==null||(d=e.scrollIntoView)===null||d===void 0||d.call(e,{block:"nearest"});let{left:c,top:a}=e.getBoundingClientRect();if(Math.abs(i-c)>1||Math.abs(s-a)>1){var t,l,f;o==null||(l=o.containingElement)===null||l===void 0||(t=l.scrollIntoView)===null||t===void 0||t.call(l,{block:"center",inline:"center"}),(f=e.scrollIntoView)===null||f===void 0||f.call(e,{block:"nearest"})}}}}exports.scrollIntoView=L;exports.scrollIntoViewport=k;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index175.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/index189.mjs CHANGED
@@ -1,46 +1,11 @@
1
- import { getScrollParents as I } from "./index185.mjs";
2
- function W(o, e) {
3
- let t = L(o, e, "left"), d = L(o, e, "top"), l = e.offsetWidth, r = e.offsetHeight, f = o.scrollLeft, c = o.scrollTop, { borderTopWidth: i, borderLeftWidth: s, scrollPaddingTop: n, scrollPaddingRight: a, scrollPaddingBottom: T, scrollPaddingLeft: g } = getComputedStyle(o), x = f + parseInt(s, 10), u = c + parseInt(i, 10), b = x + o.clientWidth, p = u + o.clientHeight, P = parseInt(n, 10) || 0, v = parseInt(T, 10) || 0, h = parseInt(a, 10) || 0, $ = parseInt(g, 10) || 0;
4
- t <= f + $ ? f = t - parseInt(s, 10) - $ : t + l > b - h && (f += t + l - b + h), d <= u + P ? c = d - parseInt(i, 10) - P : d + r > p - v && (c += d + r - p + v), o.scrollLeft = f, o.scrollTop = c;
1
+ import { isAndroid as i } from "./index175.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;
5
4
  }
6
- function L(o, e, t) {
7
- const d = t === "left" ? "offsetLeft" : "offsetTop";
8
- let l = 0;
9
- for (; e.offsetParent && (l += e[d], e.offsetParent !== o); ) {
10
- if (e.offsetParent.contains(o)) {
11
- l -= o[d];
12
- break;
13
- }
14
- e = e.offsetParent;
15
- }
16
- return l;
17
- }
18
- function B(o, e) {
19
- if (o && document.contains(o)) {
20
- let f = document.scrollingElement || document.documentElement;
21
- if (window.getComputedStyle(f).overflow === "hidden") {
22
- let i = I(o);
23
- for (let s of i) W(s, o);
24
- } else {
25
- var t;
26
- let { left: i, top: s } = o.getBoundingClientRect();
27
- o == null || (t = o.scrollIntoView) === null || t === void 0 || t.call(o, {
28
- block: "nearest"
29
- });
30
- let { left: n, top: a } = o.getBoundingClientRect();
31
- if (Math.abs(i - n) > 1 || Math.abs(s - a) > 1) {
32
- var d, l, r;
33
- e == null || (l = e.containingElement) === null || l === void 0 || (d = l.scrollIntoView) === null || d === void 0 || d.call(l, {
34
- block: "center",
35
- inline: "center"
36
- }), (r = o.scrollIntoView) === null || r === void 0 || r.call(o, {
37
- block: "nearest"
38
- });
39
- }
40
- }
41
- }
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";
42
7
  }
43
8
  export {
44
- W as scrollIntoView,
45
- B as scrollIntoViewport
9
+ o as isVirtualClick,
10
+ u as isVirtualPointerEvent
46
11
  };
package/index190.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index176.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("./index187.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/index190.mjs CHANGED
@@ -1,11 +1,20 @@
1
- import { isAndroid as i } from "./index176.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 "./index187.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/index191.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index188.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 c="react-aria-clear-focus",e="react-aria-focus";exports.CLEAR_FOCUS_EVENT=c;exports.FOCUS_EVENT=e;
package/index191.mjs CHANGED
@@ -1,20 +1,5 @@
1
- import { useEffectEvent as u } from "./index188.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
- ]);
17
- }
1
+ const a = "react-aria-clear-focus", c = "react-aria-focus";
18
2
  export {
19
- s as useFormReset
3
+ a as CLEAR_FOCUS_EVENT,
4
+ c as FOCUS_EVENT
20
5
  };
package/index192.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c="react-aria-clear-focus",e="react-aria-focus";exports.CLEAR_FOCUS_EVENT=c;exports.FOCUS_EVENT=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index175.js");function t(e){return r.isMac()?e.metaKey:e.ctrlKey}exports.isCtrlKeyPressed=t;
package/index192.mjs CHANGED
@@ -1,5 +1,7 @@
1
- const a = "react-aria-clear-focus", c = "react-aria-focus";
1
+ import { isMac as a } from "./index175.mjs";
2
+ function t(e) {
3
+ return a() ? e.metaKey : e.ctrlKey;
4
+ }
2
5
  export {
3
- a as CLEAR_FOCUS_EVENT,
4
- c as FOCUS_EVENT
6
+ t as isCtrlKeyPressed
5
7
  };
package/index193.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index176.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 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/index193.mjs CHANGED
@@ -1,7 +1,22 @@
1
- import { isMac as a } from "./index176.mjs";
2
- function t(e) {
3
- return a() ? e.metaKey : e.ctrlKey;
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);
4
19
  }
5
20
  export {
6
- t as isCtrlKeyPressed
21
+ n as isFocusable
7
22
  };
package/index194.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("./index301.js"),c=require("react"),l=require("./index168.js"),m=require("./index169.js"),p=require("./index177.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/index194.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 "./index301.mjs";
2
+ import { useRef as x, useCallback as $ } from "react";
3
+ import { getActiveElement as E, getEventTarget as T, nodeContains as B } from "./index168.mjs";
4
+ import { getOwnerDocument as G } from "./index169.mjs";
5
+ import { useGlobalListeners as L } from "./index177.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/index195.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index301.js"),c=require("react"),l=require("./index169.js"),m=require("./index170.js"),p=require("./index178.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;
package/index195.mjs CHANGED
@@ -1,57 +1,30 @@
1
- import { useSyntheticBlurEvent as F, setEventTarget as W, createSyntheticEvent as v } from "./index301.mjs";
2
- import { useRef as x, useCallback as $ } from "react";
3
- import { getActiveElement as E, getEventTarget as T, nodeContains as B } from "./index169.mjs";
4
- import { getOwnerDocument as G } from "./index170.mjs";
5
- import { useGlobalListeners as L } from "./index178.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));
1
+ import { useState as V, useRef as C, useEffect as E, useCallback as N } from "react";
2
+ function S(n, a, l) {
3
+ let [p, s] = V(n || a), i = C(n !== void 0), e = n !== void 0;
4
+ E(() => {
5
+ let t = i.current;
6
+ t !== e && process.env.NODE_ENV !== "production" && console.warn(`WARN: A component changed from ${t ? "controlled" : "uncontrolled"} to ${e ? "controlled" : "uncontrolled"}.`), i.current = e;
11
7
  }, [
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
- }
8
+ e
9
+ ]);
10
+ let o = e ? n : p, b = N((t, ...u) => {
11
+ let f = (r, ...c) => {
12
+ l && (Object.is(o, r) || l(r, ...c)), e || (o = r);
13
+ };
14
+ 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"), s((c, ...m) => {
15
+ let d = t(e ? o : c, ...m);
16
+ return f(d, ...u), e ? c : d;
17
+ })) : (e || s(t), f(t, ...u));
35
18
  }, [
19
+ e,
36
20
  o,
37
- t,
38
- u,
39
- c,
40
- n
21
+ l
41
22
  ]);
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
- };
23
+ return [
24
+ o,
25
+ b
26
+ ];
54
27
  }
55
28
  export {
56
- S as useFocusWithin
29
+ S as useControlledState
57
30
  };
package/index196.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const M=require("./index197.js"),A=require("./index198.js"),f=require("react"),P=require("./index165.js"),j=require("./index181.js"),D=require("@react-aria/i18n");let e=typeof document<"u"?window.visualViewport:null;function G(n){let{direction:h}=D.useLocale(),{arrowSize:$=0,targetRef:v,overlayRef:i,scrollRef:s=i,placement:w="bottom",containerPadding:C=12,shouldFlip:H=!0,boundaryElement:R=typeof document<"u"?document.body:null,offset:S=0,crossOffset:B=0,shouldUpdatePosition:q=!0,isOpen:p=!0,onClose:m,maxHeight:O,arrowBoundaryOffset:T=0}=n,[t,k]=f.useState(null),F=[q,w,i.current,v.current,s.current,C,H,R,S,B,p,h,O,T,$],N=f.useRef(e==null?void 0:e.scale);f.useEffect(()=>{p&&(N.current=e==null?void 0:e.scale)},[p]);let u=f.useCallback(()=>{if(q===!1||!p||!i.current||!v.current||!R||(e==null?void 0:e.scale)!==N.current)return;let o=null;if(s.current&&s.current.contains(document.activeElement)){var a;let r=(a=document.activeElement)===null||a===void 0?void 0:a.getBoundingClientRect(),g=s.current.getBoundingClientRect();var d;if(o={type:"top",offset:((d=r==null?void 0:r.top)!==null&&d!==void 0?d:0)-g.top},o.offset>g.height/2){o.type="bottom";var x;o.offset=((x=r==null?void 0:r.bottom)!==null&&x!==void 0?x:0)-g.bottom}}let l=i.current;if(!O&&i.current){var z;l.style.top="0px",l.style.bottom="";var L;l.style.maxHeight=((L=(z=window.visualViewport)===null||z===void 0?void 0:z.height)!==null&&L!==void 0?L:window.innerHeight)+"px"}let c=M.calculatePosition({placement:K(w,h),overlayNode:i.current,targetNode:v.current,scrollNode:s.current||i.current,padding:C,shouldFlip:H,boundaryElement:R,offset:S,crossOffset:B,maxHeight:O,arrowSize:$,arrowBoundaryOffset:T});if(c.position){if(l.style.top="",l.style.bottom="",l.style.left="",l.style.right="",Object.keys(c.position).forEach(r=>l.style[r]=c.position[r]+"px"),l.style.maxHeight=c.maxHeight!=null?c.maxHeight+"px":"",o&&document.activeElement&&s.current){let r=document.activeElement.getBoundingClientRect(),g=s.current.getBoundingClientRect(),I=r[o.type]-g[o.type];s.current.scrollTop+=I-o.offset}k(c)}},F);P.useLayoutEffect(u,F),J(u),j.useResizeObserver({ref:i,onResize:u}),j.useResizeObserver({ref:v,onResize:u});let y=f.useRef(!1);P.useLayoutEffect(()=>{let o,a=()=>{y.current=!0,clearTimeout(o),o=setTimeout(()=>{y.current=!1},500),u()},d=()=>{y.current&&a()};return e==null||e.addEventListener("resize",a),e==null||e.addEventListener("scroll",d),()=>{e==null||e.removeEventListener("resize",a),e==null||e.removeEventListener("scroll",d)}},[u]);let U=f.useCallback(()=>{y.current||m==null||m()},[m,y]);A.useCloseOnScroll({triggerRef:v,isOpen:p,onClose:m&&U});var b,E;return{overlayProps:{style:{position:"absolute",zIndex:1e5,...t==null?void 0:t.position,maxHeight:(b=t==null?void 0:t.maxHeight)!==null&&b!==void 0?b:"100vh"}},placement:(E=t==null?void 0:t.placement)!==null&&E!==void 0?E:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:t==null?void 0:t.arrowOffsetLeft,top:t==null?void 0:t.arrowOffsetTop}},updatePosition:u}}function J(n){P.useLayoutEffect(()=>(window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)}),[n])}function K(n,h){return h==="rtl"?n.replace("start","right").replace("end","left"):n.replace("start","left").replace("end","right")}exports.useOverlayPosition=G;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index197.js"),u=require("./index198.js"),d=require("./index199.js"),f=require("./index200.js"),l=require("./index201.js"),y=require("./index202.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;