@react-aria/overlays 3.31.1 → 3.32.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 (263) hide show
  1. package/dist/import.mjs +12 -12
  2. package/dist/main.js +28 -28
  3. package/dist/main.js.map +1 -1
  4. package/dist/module.js +12 -12
  5. package/dist/module.js.map +1 -1
  6. package/dist/types/src/index.d.ts +19 -0
  7. package/package.json +15 -21
  8. package/src/index.ts +19 -22
  9. package/dist/DismissButton.main.js +0 -51
  10. package/dist/DismissButton.main.js.map +0 -1
  11. package/dist/DismissButton.mjs +0 -46
  12. package/dist/DismissButton.module.js +0 -46
  13. package/dist/DismissButton.module.js.map +0 -1
  14. package/dist/Overlay.main.js +0 -73
  15. package/dist/Overlay.main.js.map +0 -1
  16. package/dist/Overlay.mjs +0 -63
  17. package/dist/Overlay.module.js +0 -63
  18. package/dist/Overlay.module.js.map +0 -1
  19. package/dist/PortalProvider.main.js +0 -41
  20. package/dist/PortalProvider.main.js.map +0 -1
  21. package/dist/PortalProvider.mjs +0 -31
  22. package/dist/PortalProvider.module.js +0 -31
  23. package/dist/PortalProvider.module.js.map +0 -1
  24. package/dist/ar-AE.main.js +0 -6
  25. package/dist/ar-AE.main.js.map +0 -1
  26. package/dist/ar-AE.mjs +0 -8
  27. package/dist/ar-AE.module.js +0 -8
  28. package/dist/ar-AE.module.js.map +0 -1
  29. package/dist/ariaHideOutside.main.js +0 -152
  30. package/dist/ariaHideOutside.main.js.map +0 -1
  31. package/dist/ariaHideOutside.mjs +0 -146
  32. package/dist/ariaHideOutside.module.js +0 -146
  33. package/dist/ariaHideOutside.module.js.map +0 -1
  34. package/dist/bg-BG.main.js +0 -6
  35. package/dist/bg-BG.main.js.map +0 -1
  36. package/dist/bg-BG.mjs +0 -8
  37. package/dist/bg-BG.module.js +0 -8
  38. package/dist/bg-BG.module.js.map +0 -1
  39. package/dist/calculatePosition.main.js +0 -414
  40. package/dist/calculatePosition.main.js.map +0 -1
  41. package/dist/calculatePosition.mjs +0 -408
  42. package/dist/calculatePosition.module.js +0 -408
  43. package/dist/calculatePosition.module.js.map +0 -1
  44. package/dist/cs-CZ.main.js +0 -6
  45. package/dist/cs-CZ.main.js.map +0 -1
  46. package/dist/cs-CZ.mjs +0 -8
  47. package/dist/cs-CZ.module.js +0 -8
  48. package/dist/cs-CZ.module.js.map +0 -1
  49. package/dist/da-DK.main.js +0 -6
  50. package/dist/da-DK.main.js.map +0 -1
  51. package/dist/da-DK.mjs +0 -8
  52. package/dist/da-DK.module.js +0 -8
  53. package/dist/da-DK.module.js.map +0 -1
  54. package/dist/de-DE.main.js +0 -6
  55. package/dist/de-DE.main.js.map +0 -1
  56. package/dist/de-DE.mjs +0 -8
  57. package/dist/de-DE.module.js +0 -8
  58. package/dist/de-DE.module.js.map +0 -1
  59. package/dist/el-GR.main.js +0 -6
  60. package/dist/el-GR.main.js.map +0 -1
  61. package/dist/el-GR.mjs +0 -8
  62. package/dist/el-GR.module.js +0 -8
  63. package/dist/el-GR.module.js.map +0 -1
  64. package/dist/en-US.main.js +0 -6
  65. package/dist/en-US.main.js.map +0 -1
  66. package/dist/en-US.mjs +0 -8
  67. package/dist/en-US.module.js +0 -8
  68. package/dist/en-US.module.js.map +0 -1
  69. package/dist/es-ES.main.js +0 -6
  70. package/dist/es-ES.main.js.map +0 -1
  71. package/dist/es-ES.mjs +0 -8
  72. package/dist/es-ES.module.js +0 -8
  73. package/dist/es-ES.module.js.map +0 -1
  74. package/dist/et-EE.main.js +0 -6
  75. package/dist/et-EE.main.js.map +0 -1
  76. package/dist/et-EE.mjs +0 -8
  77. package/dist/et-EE.module.js +0 -8
  78. package/dist/et-EE.module.js.map +0 -1
  79. package/dist/fi-FI.main.js +0 -6
  80. package/dist/fi-FI.main.js.map +0 -1
  81. package/dist/fi-FI.mjs +0 -8
  82. package/dist/fi-FI.module.js +0 -8
  83. package/dist/fi-FI.module.js.map +0 -1
  84. package/dist/fr-FR.main.js +0 -6
  85. package/dist/fr-FR.main.js.map +0 -1
  86. package/dist/fr-FR.mjs +0 -8
  87. package/dist/fr-FR.module.js +0 -8
  88. package/dist/fr-FR.module.js.map +0 -1
  89. package/dist/he-IL.main.js +0 -6
  90. package/dist/he-IL.main.js.map +0 -1
  91. package/dist/he-IL.mjs +0 -8
  92. package/dist/he-IL.module.js +0 -8
  93. package/dist/he-IL.module.js.map +0 -1
  94. package/dist/hr-HR.main.js +0 -6
  95. package/dist/hr-HR.main.js.map +0 -1
  96. package/dist/hr-HR.mjs +0 -8
  97. package/dist/hr-HR.module.js +0 -8
  98. package/dist/hr-HR.module.js.map +0 -1
  99. package/dist/hu-HU.main.js +0 -6
  100. package/dist/hu-HU.main.js.map +0 -1
  101. package/dist/hu-HU.mjs +0 -8
  102. package/dist/hu-HU.module.js +0 -8
  103. package/dist/hu-HU.module.js.map +0 -1
  104. package/dist/intlStrings.main.js +0 -108
  105. package/dist/intlStrings.main.js.map +0 -1
  106. package/dist/intlStrings.mjs +0 -110
  107. package/dist/intlStrings.module.js +0 -110
  108. package/dist/intlStrings.module.js.map +0 -1
  109. package/dist/it-IT.main.js +0 -6
  110. package/dist/it-IT.main.js.map +0 -1
  111. package/dist/it-IT.mjs +0 -8
  112. package/dist/it-IT.module.js +0 -8
  113. package/dist/it-IT.module.js.map +0 -1
  114. package/dist/ja-JP.main.js +0 -6
  115. package/dist/ja-JP.main.js.map +0 -1
  116. package/dist/ja-JP.mjs +0 -8
  117. package/dist/ja-JP.module.js +0 -8
  118. package/dist/ja-JP.module.js.map +0 -1
  119. package/dist/ko-KR.main.js +0 -6
  120. package/dist/ko-KR.main.js.map +0 -1
  121. package/dist/ko-KR.mjs +0 -8
  122. package/dist/ko-KR.module.js +0 -8
  123. package/dist/ko-KR.module.js.map +0 -1
  124. package/dist/lt-LT.main.js +0 -6
  125. package/dist/lt-LT.main.js.map +0 -1
  126. package/dist/lt-LT.mjs +0 -8
  127. package/dist/lt-LT.module.js +0 -8
  128. package/dist/lt-LT.module.js.map +0 -1
  129. package/dist/lv-LV.main.js +0 -6
  130. package/dist/lv-LV.main.js.map +0 -1
  131. package/dist/lv-LV.mjs +0 -8
  132. package/dist/lv-LV.module.js +0 -8
  133. package/dist/lv-LV.module.js.map +0 -1
  134. package/dist/nb-NO.main.js +0 -6
  135. package/dist/nb-NO.main.js.map +0 -1
  136. package/dist/nb-NO.mjs +0 -8
  137. package/dist/nb-NO.module.js +0 -8
  138. package/dist/nb-NO.module.js.map +0 -1
  139. package/dist/nl-NL.main.js +0 -6
  140. package/dist/nl-NL.main.js.map +0 -1
  141. package/dist/nl-NL.mjs +0 -8
  142. package/dist/nl-NL.module.js +0 -8
  143. package/dist/nl-NL.module.js.map +0 -1
  144. package/dist/pl-PL.main.js +0 -6
  145. package/dist/pl-PL.main.js.map +0 -1
  146. package/dist/pl-PL.mjs +0 -8
  147. package/dist/pl-PL.module.js +0 -8
  148. package/dist/pl-PL.module.js.map +0 -1
  149. package/dist/pt-BR.main.js +0 -6
  150. package/dist/pt-BR.main.js.map +0 -1
  151. package/dist/pt-BR.mjs +0 -8
  152. package/dist/pt-BR.module.js +0 -8
  153. package/dist/pt-BR.module.js.map +0 -1
  154. package/dist/pt-PT.main.js +0 -6
  155. package/dist/pt-PT.main.js.map +0 -1
  156. package/dist/pt-PT.mjs +0 -8
  157. package/dist/pt-PT.module.js +0 -8
  158. package/dist/pt-PT.module.js.map +0 -1
  159. package/dist/ro-RO.main.js +0 -6
  160. package/dist/ro-RO.main.js.map +0 -1
  161. package/dist/ro-RO.mjs +0 -8
  162. package/dist/ro-RO.module.js +0 -8
  163. package/dist/ro-RO.module.js.map +0 -1
  164. package/dist/ru-RU.main.js +0 -6
  165. package/dist/ru-RU.main.js.map +0 -1
  166. package/dist/ru-RU.mjs +0 -8
  167. package/dist/ru-RU.module.js +0 -8
  168. package/dist/ru-RU.module.js.map +0 -1
  169. package/dist/sk-SK.main.js +0 -6
  170. package/dist/sk-SK.main.js.map +0 -1
  171. package/dist/sk-SK.mjs +0 -8
  172. package/dist/sk-SK.module.js +0 -8
  173. package/dist/sk-SK.module.js.map +0 -1
  174. package/dist/sl-SI.main.js +0 -6
  175. package/dist/sl-SI.main.js.map +0 -1
  176. package/dist/sl-SI.mjs +0 -8
  177. package/dist/sl-SI.module.js +0 -8
  178. package/dist/sl-SI.module.js.map +0 -1
  179. package/dist/sr-SP.main.js +0 -6
  180. package/dist/sr-SP.main.js.map +0 -1
  181. package/dist/sr-SP.mjs +0 -8
  182. package/dist/sr-SP.module.js +0 -8
  183. package/dist/sr-SP.module.js.map +0 -1
  184. package/dist/sv-SE.main.js +0 -6
  185. package/dist/sv-SE.main.js.map +0 -1
  186. package/dist/sv-SE.mjs +0 -8
  187. package/dist/sv-SE.module.js +0 -8
  188. package/dist/sv-SE.module.js.map +0 -1
  189. package/dist/tr-TR.main.js +0 -6
  190. package/dist/tr-TR.main.js.map +0 -1
  191. package/dist/tr-TR.mjs +0 -8
  192. package/dist/tr-TR.module.js +0 -8
  193. package/dist/tr-TR.module.js.map +0 -1
  194. package/dist/types.d.ts +0 -355
  195. package/dist/types.d.ts.map +0 -1
  196. package/dist/uk-UA.main.js +0 -6
  197. package/dist/uk-UA.main.js.map +0 -1
  198. package/dist/uk-UA.mjs +0 -8
  199. package/dist/uk-UA.module.js +0 -8
  200. package/dist/uk-UA.module.js.map +0 -1
  201. package/dist/useCloseOnScroll.main.js +0 -52
  202. package/dist/useCloseOnScroll.main.js.map +0 -1
  203. package/dist/useCloseOnScroll.mjs +0 -46
  204. package/dist/useCloseOnScroll.module.js +0 -46
  205. package/dist/useCloseOnScroll.module.js.map +0 -1
  206. package/dist/useModal.main.js +0 -118
  207. package/dist/useModal.main.js.map +0 -1
  208. package/dist/useModal.mjs +0 -105
  209. package/dist/useModal.module.js +0 -105
  210. package/dist/useModal.module.js.map +0 -1
  211. package/dist/useModalOverlay.main.js +0 -57
  212. package/dist/useModalOverlay.main.js.map +0 -1
  213. package/dist/useModalOverlay.mjs +0 -52
  214. package/dist/useModalOverlay.module.js +0 -52
  215. package/dist/useModalOverlay.module.js.map +0 -1
  216. package/dist/useOverlay.main.js +0 -111
  217. package/dist/useOverlay.main.js.map +0 -1
  218. package/dist/useOverlay.mjs +0 -106
  219. package/dist/useOverlay.module.js +0 -106
  220. package/dist/useOverlay.module.js.map +0 -1
  221. package/dist/useOverlayPosition.main.js +0 -225
  222. package/dist/useOverlayPosition.main.js.map +0 -1
  223. package/dist/useOverlayPosition.mjs +0 -220
  224. package/dist/useOverlayPosition.module.js +0 -220
  225. package/dist/useOverlayPosition.module.js.map +0 -1
  226. package/dist/useOverlayTrigger.main.js +0 -54
  227. package/dist/useOverlayTrigger.main.js.map +0 -1
  228. package/dist/useOverlayTrigger.mjs +0 -49
  229. package/dist/useOverlayTrigger.module.js +0 -49
  230. package/dist/useOverlayTrigger.module.js.map +0 -1
  231. package/dist/usePopover.main.js +0 -77
  232. package/dist/usePopover.main.js.map +0 -1
  233. package/dist/usePopover.mjs +0 -72
  234. package/dist/usePopover.module.js +0 -72
  235. package/dist/usePopover.module.js.map +0 -1
  236. package/dist/usePreventScroll.main.js +0 -215
  237. package/dist/usePreventScroll.main.js.map +0 -1
  238. package/dist/usePreventScroll.mjs +0 -210
  239. package/dist/usePreventScroll.module.js +0 -210
  240. package/dist/usePreventScroll.module.js.map +0 -1
  241. package/dist/zh-CN.main.js +0 -6
  242. package/dist/zh-CN.main.js.map +0 -1
  243. package/dist/zh-CN.mjs +0 -8
  244. package/dist/zh-CN.module.js +0 -8
  245. package/dist/zh-CN.module.js.map +0 -1
  246. package/dist/zh-TW.main.js +0 -6
  247. package/dist/zh-TW.main.js.map +0 -1
  248. package/dist/zh-TW.mjs +0 -8
  249. package/dist/zh-TW.module.js +0 -8
  250. package/dist/zh-TW.module.js.map +0 -1
  251. package/src/DismissButton.tsx +0 -52
  252. package/src/Overlay.tsx +0 -95
  253. package/src/PortalProvider.tsx +0 -41
  254. package/src/ariaHideOutside.ts +0 -221
  255. package/src/calculatePosition.ts +0 -680
  256. package/src/useCloseOnScroll.ts +0 -65
  257. package/src/useModal.tsx +0 -197
  258. package/src/useModalOverlay.ts +0 -69
  259. package/src/useOverlay.ts +0 -169
  260. package/src/useOverlayPosition.ts +0 -327
  261. package/src/useOverlayTrigger.ts +0 -72
  262. package/src/usePopover.ts +0 -138
  263. package/src/usePreventScroll.ts +0 -273
package/dist/import.mjs CHANGED
@@ -1,14 +1,14 @@
1
- import {useOverlayPosition as $2a41e45df1593e64$export$d39e1813b3bdd0e1} from "./useOverlayPosition.mjs";
2
- import {useOverlay as $a11501f3d1d39e6c$export$ea8f71083e90600f} from "./useOverlay.mjs";
3
- import {useOverlayTrigger as $628037886ba31236$export$f9d5c8beee7d008d} from "./useOverlayTrigger.mjs";
4
- import {usePreventScroll as $49c51c25361d4cd2$export$ee0f7cc6afcd1c18} from "./usePreventScroll.mjs";
5
- import {ModalProvider as $f57aed4a881a3485$export$178405afcd8c5eb, OverlayContainer as $f57aed4a881a3485$export$b47c3594eab58386, OverlayProvider as $f57aed4a881a3485$export$bf688221f59024e5, useModal as $f57aed4a881a3485$export$33ffd74ebf07f060, useModalProvider as $f57aed4a881a3485$export$d9aaed4c3ece1bc0} from "./useModal.mjs";
6
- import {DismissButton as $86ea4cb521eb2e37$export$2317d149ed6f78c4} from "./DismissButton.mjs";
7
- import {ariaHideOutside as $5e3802645cc19319$export$1c3ebcada18427bf} from "./ariaHideOutside.mjs";
8
- import {usePopover as $f2f8a6077418541e$export$542a6fd13ac93354} from "./usePopover.mjs";
9
- import {useModalOverlay as $8ac8429251c45e4b$export$dbc0f175b25fb0fb} from "./useModalOverlay.mjs";
10
- import {Overlay as $337b884510726a0d$export$c6fdb837b070b4ff, useOverlayFocusContain as $337b884510726a0d$export$14c98a7594375490} from "./Overlay.mjs";
11
- import {UNSAFE_PortalProvider as $96b38030c423d352$export$78efe591171d7d45, useUNSAFE_PortalContext as $96b38030c423d352$export$9fc1347d4195ccb3} from "./PortalProvider.mjs";
1
+ import {useOverlayPosition as $b0efc2604d85c5c0$re_export$useOverlayPosition} from "react-aria/useOverlayPosition";
2
+ import {useOverlay as $b0efc2604d85c5c0$re_export$useOverlay} from "react-aria/useOverlay";
3
+ import {useOverlayTrigger as $b0efc2604d85c5c0$re_export$useOverlayTrigger} from "react-aria/useOverlayTrigger";
4
+ import {usePreventScroll as $b0efc2604d85c5c0$re_export$usePreventScroll} from "react-aria/usePreventScroll";
5
+ import {ModalProvider as $b0efc2604d85c5c0$re_export$ModalProvider, useModalProvider as $b0efc2604d85c5c0$re_export$useModalProvider, OverlayProvider as $b0efc2604d85c5c0$re_export$OverlayProvider, OverlayContainer as $b0efc2604d85c5c0$re_export$OverlayContainer, useModal as $b0efc2604d85c5c0$re_export$useModal} from "react-aria/private/overlays/useModal";
6
+ import {DismissButton as $b0efc2604d85c5c0$re_export$DismissButton, Overlay as $b0efc2604d85c5c0$re_export$Overlay} from "react-aria/Overlay";
7
+ import {ariaHideOutside as $b0efc2604d85c5c0$re_export$ariaHideOutside} from "react-aria/private/overlays/ariaHideOutside";
8
+ import {usePopover as $b0efc2604d85c5c0$re_export$usePopover} from "react-aria/usePopover";
9
+ import {useModalOverlay as $b0efc2604d85c5c0$re_export$useModalOverlay} from "react-aria/useModalOverlay";
10
+ import {useOverlayFocusContain as $b0efc2604d85c5c0$re_export$useOverlayFocusContain} from "react-aria/private/overlays/Overlay";
11
+ import {UNSAFE_PortalProvider as $b0efc2604d85c5c0$re_export$UNSAFE_PortalProvider, useUNSAFE_PortalContext as $b0efc2604d85c5c0$re_export$useUNSAFE_PortalContext} from "react-aria/PortalProvider";
12
12
 
13
13
  /*
14
14
  * Copyright 2020 Adobe. All rights reserved.
@@ -33,5 +33,5 @@ import {UNSAFE_PortalProvider as $96b38030c423d352$export$78efe591171d7d45, useU
33
33
 
34
34
 
35
35
 
36
- export {$2a41e45df1593e64$export$d39e1813b3bdd0e1 as useOverlayPosition, $a11501f3d1d39e6c$export$ea8f71083e90600f as useOverlay, $628037886ba31236$export$f9d5c8beee7d008d as useOverlayTrigger, $49c51c25361d4cd2$export$ee0f7cc6afcd1c18 as usePreventScroll, $f57aed4a881a3485$export$178405afcd8c5eb as ModalProvider, $f57aed4a881a3485$export$d9aaed4c3ece1bc0 as useModalProvider, $f57aed4a881a3485$export$bf688221f59024e5 as OverlayProvider, $f57aed4a881a3485$export$b47c3594eab58386 as OverlayContainer, $f57aed4a881a3485$export$33ffd74ebf07f060 as useModal, $86ea4cb521eb2e37$export$2317d149ed6f78c4 as DismissButton, $5e3802645cc19319$export$1c3ebcada18427bf as ariaHideOutside, $f2f8a6077418541e$export$542a6fd13ac93354 as usePopover, $8ac8429251c45e4b$export$dbc0f175b25fb0fb as useModalOverlay, $337b884510726a0d$export$c6fdb837b070b4ff as Overlay, $337b884510726a0d$export$14c98a7594375490 as useOverlayFocusContain, $96b38030c423d352$export$78efe591171d7d45 as UNSAFE_PortalProvider, $96b38030c423d352$export$9fc1347d4195ccb3 as useUNSAFE_PortalContext};
36
+ export {$b0efc2604d85c5c0$re_export$useOverlayPosition as useOverlayPosition, $b0efc2604d85c5c0$re_export$useOverlay as useOverlay, $b0efc2604d85c5c0$re_export$useOverlayTrigger as useOverlayTrigger, $b0efc2604d85c5c0$re_export$usePreventScroll as usePreventScroll, $b0efc2604d85c5c0$re_export$ModalProvider as ModalProvider, $b0efc2604d85c5c0$re_export$useModalProvider as useModalProvider, $b0efc2604d85c5c0$re_export$OverlayProvider as OverlayProvider, $b0efc2604d85c5c0$re_export$OverlayContainer as OverlayContainer, $b0efc2604d85c5c0$re_export$useModal as useModal, $b0efc2604d85c5c0$re_export$DismissButton as DismissButton, $b0efc2604d85c5c0$re_export$Overlay as Overlay, $b0efc2604d85c5c0$re_export$ariaHideOutside as ariaHideOutside, $b0efc2604d85c5c0$re_export$usePopover as usePopover, $b0efc2604d85c5c0$re_export$useModalOverlay as useModalOverlay, $b0efc2604d85c5c0$re_export$useOverlayFocusContain as useOverlayFocusContain, $b0efc2604d85c5c0$re_export$UNSAFE_PortalProvider as UNSAFE_PortalProvider, $b0efc2604d85c5c0$re_export$useUNSAFE_PortalContext as useUNSAFE_PortalContext};
37
37
  //# sourceMappingURL=module.js.map
package/dist/main.js CHANGED
@@ -1,37 +1,37 @@
1
- var $cd94b4896dd97759$exports = require("./useOverlayPosition.main.js");
2
- var $82711f9cb668ecdb$exports = require("./useOverlay.main.js");
3
- var $b4878eb6316f670a$exports = require("./useOverlayTrigger.main.js");
4
- var $5c2f5cd01815d369$exports = require("./usePreventScroll.main.js");
5
- var $0775ea8ea6a0565e$exports = require("./useModal.main.js");
6
- var $f69bb3e6457495cc$exports = require("./DismissButton.main.js");
7
- var $08ef1685902b6011$exports = require("./ariaHideOutside.main.js");
8
- var $6c2dfcdee3e15e20$exports = require("./usePopover.main.js");
9
- var $11b7e0b04b421e95$exports = require("./useModalOverlay.main.js");
10
- var $745edbb83ab4296f$exports = require("./Overlay.main.js");
11
- var $d7347c25ab757295$exports = require("./PortalProvider.main.js");
1
+ var $2hcbo$reactariauseOverlayPosition = require("react-aria/useOverlayPosition");
2
+ var $2hcbo$reactariauseOverlay = require("react-aria/useOverlay");
3
+ var $2hcbo$reactariauseOverlayTrigger = require("react-aria/useOverlayTrigger");
4
+ var $2hcbo$reactariausePreventScroll = require("react-aria/usePreventScroll");
5
+ var $2hcbo$reactariaprivateoverlaysuseModal = require("react-aria/private/overlays/useModal");
6
+ var $2hcbo$reactariaOverlay = require("react-aria/Overlay");
7
+ var $2hcbo$reactariaprivateoverlaysariaHideOutside = require("react-aria/private/overlays/ariaHideOutside");
8
+ var $2hcbo$reactariausePopover = require("react-aria/usePopover");
9
+ var $2hcbo$reactariauseModalOverlay = require("react-aria/useModalOverlay");
10
+ var $2hcbo$reactariaprivateoverlaysOverlay = require("react-aria/private/overlays/Overlay");
11
+ var $2hcbo$reactariaPortalProvider = require("react-aria/PortalProvider");
12
12
 
13
13
 
14
14
  function $parcel$export(e, n, v, s) {
15
15
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
16
16
  }
17
17
 
18
- $parcel$export(module.exports, "useOverlayPosition", () => $cd94b4896dd97759$exports.useOverlayPosition);
19
- $parcel$export(module.exports, "useOverlay", () => $82711f9cb668ecdb$exports.useOverlay);
20
- $parcel$export(module.exports, "useOverlayTrigger", () => $b4878eb6316f670a$exports.useOverlayTrigger);
21
- $parcel$export(module.exports, "usePreventScroll", () => $5c2f5cd01815d369$exports.usePreventScroll);
22
- $parcel$export(module.exports, "ModalProvider", () => $0775ea8ea6a0565e$exports.ModalProvider);
23
- $parcel$export(module.exports, "useModalProvider", () => $0775ea8ea6a0565e$exports.useModalProvider);
24
- $parcel$export(module.exports, "OverlayProvider", () => $0775ea8ea6a0565e$exports.OverlayProvider);
25
- $parcel$export(module.exports, "OverlayContainer", () => $0775ea8ea6a0565e$exports.OverlayContainer);
26
- $parcel$export(module.exports, "useModal", () => $0775ea8ea6a0565e$exports.useModal);
27
- $parcel$export(module.exports, "DismissButton", () => $f69bb3e6457495cc$exports.DismissButton);
28
- $parcel$export(module.exports, "ariaHideOutside", () => $08ef1685902b6011$exports.ariaHideOutside);
29
- $parcel$export(module.exports, "usePopover", () => $6c2dfcdee3e15e20$exports.usePopover);
30
- $parcel$export(module.exports, "useModalOverlay", () => $11b7e0b04b421e95$exports.useModalOverlay);
31
- $parcel$export(module.exports, "Overlay", () => $745edbb83ab4296f$exports.Overlay);
32
- $parcel$export(module.exports, "useOverlayFocusContain", () => $745edbb83ab4296f$exports.useOverlayFocusContain);
33
- $parcel$export(module.exports, "UNSAFE_PortalProvider", () => $d7347c25ab757295$exports.UNSAFE_PortalProvider);
34
- $parcel$export(module.exports, "useUNSAFE_PortalContext", () => $d7347c25ab757295$exports.useUNSAFE_PortalContext);
18
+ $parcel$export(module.exports, "useOverlayPosition", function () { return $2hcbo$reactariauseOverlayPosition.useOverlayPosition; });
19
+ $parcel$export(module.exports, "useOverlay", function () { return $2hcbo$reactariauseOverlay.useOverlay; });
20
+ $parcel$export(module.exports, "useOverlayTrigger", function () { return $2hcbo$reactariauseOverlayTrigger.useOverlayTrigger; });
21
+ $parcel$export(module.exports, "usePreventScroll", function () { return $2hcbo$reactariausePreventScroll.usePreventScroll; });
22
+ $parcel$export(module.exports, "ModalProvider", function () { return $2hcbo$reactariaprivateoverlaysuseModal.ModalProvider; });
23
+ $parcel$export(module.exports, "useModalProvider", function () { return $2hcbo$reactariaprivateoverlaysuseModal.useModalProvider; });
24
+ $parcel$export(module.exports, "OverlayProvider", function () { return $2hcbo$reactariaprivateoverlaysuseModal.OverlayProvider; });
25
+ $parcel$export(module.exports, "OverlayContainer", function () { return $2hcbo$reactariaprivateoverlaysuseModal.OverlayContainer; });
26
+ $parcel$export(module.exports, "useModal", function () { return $2hcbo$reactariaprivateoverlaysuseModal.useModal; });
27
+ $parcel$export(module.exports, "DismissButton", function () { return $2hcbo$reactariaOverlay.DismissButton; });
28
+ $parcel$export(module.exports, "Overlay", function () { return $2hcbo$reactariaOverlay.Overlay; });
29
+ $parcel$export(module.exports, "ariaHideOutside", function () { return $2hcbo$reactariaprivateoverlaysariaHideOutside.ariaHideOutside; });
30
+ $parcel$export(module.exports, "usePopover", function () { return $2hcbo$reactariausePopover.usePopover; });
31
+ $parcel$export(module.exports, "useModalOverlay", function () { return $2hcbo$reactariauseModalOverlay.useModalOverlay; });
32
+ $parcel$export(module.exports, "useOverlayFocusContain", function () { return $2hcbo$reactariaprivateoverlaysOverlay.useOverlayFocusContain; });
33
+ $parcel$export(module.exports, "UNSAFE_PortalProvider", function () { return $2hcbo$reactariaPortalProvider.UNSAFE_PortalProvider; });
34
+ $parcel$export(module.exports, "useUNSAFE_PortalContext", function () { return $2hcbo$reactariaPortalProvider.useUNSAFE_PortalContext; });
35
35
  /*
36
36
  * Copyright 2020 Adobe. All rights reserved.
37
37
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/overlays/src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nexport {useOverlayPosition} from './useOverlayPosition';\nexport {useOverlay} from './useOverlay';\nexport {useOverlayTrigger} from './useOverlayTrigger';\nexport {usePreventScroll} from './usePreventScroll';\nexport {ModalProvider, useModalProvider, OverlayProvider, OverlayContainer, useModal} from './useModal';\nexport {DismissButton} from './DismissButton';\nexport {ariaHideOutside} from './ariaHideOutside';\nexport {usePopover} from './usePopover';\nexport {useModalOverlay} from './useModalOverlay';\nexport {Overlay, useOverlayFocusContain} from './Overlay';\nexport {UNSAFE_PortalProvider, useUNSAFE_PortalContext} from './PortalProvider';\n\nexport type {AriaPositionProps, PositionAria} from './useOverlayPosition';\nexport type {AriaOverlayProps, OverlayAria} from './useOverlay';\nexport type {OverlayTriggerAria, OverlayTriggerProps} from './useOverlayTrigger';\nexport type {AriaModalOptions, ModalAria, ModalProviderAria, ModalProviderProps, OverlayContainerProps} from './useModal';\nexport type {DismissButtonProps} from './DismissButton';\nexport type {AriaPopoverProps, PopoverAria} from './usePopover';\nexport type {AriaModalOverlayProps, ModalOverlayAria} from './useModalOverlay';\nexport type {OverlayProps} from './Overlay';\nexport type {Placement, PlacementAxis, PositionProps} from '@react-types/overlays';\nexport type {PortalProviderProps, PortalProviderContextValue} from './PortalProvider';\n"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/overlays/src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nexport {useOverlayPosition} from 'react-aria/useOverlayPosition';\nexport {useOverlay} from 'react-aria/useOverlay';\nexport {useOverlayTrigger} from 'react-aria/useOverlayTrigger';\nexport {usePreventScroll} from 'react-aria/usePreventScroll';\nexport {ModalProvider, useModalProvider, OverlayProvider, OverlayContainer, useModal} from 'react-aria/private/overlays/useModal';\nexport {DismissButton, Overlay} from 'react-aria/Overlay';\nexport {ariaHideOutside} from 'react-aria/private/overlays/ariaHideOutside';\nexport {usePopover} from 'react-aria/usePopover';\nexport {useModalOverlay} from 'react-aria/useModalOverlay';\nexport {useOverlayFocusContain} from 'react-aria/private/overlays/Overlay';\nexport {UNSAFE_PortalProvider, useUNSAFE_PortalContext} from 'react-aria/PortalProvider';\nexport type {AriaPositionProps, PositionAria, Placement, PlacementAxis, PositionProps, Axis, SizeAxis} from 'react-aria/useOverlayPosition';\nexport type {AriaOverlayProps, OverlayAria} from 'react-aria/useOverlay';\nexport type {OverlayTriggerAria, OverlayTriggerProps} from 'react-aria/useOverlayTrigger';\nexport type {AriaModalOptions, ModalAria, ModalProviderAria, ModalProviderProps, OverlayContainerProps} from 'react-aria/private/overlays/useModal';\nexport type {DismissButtonProps, OverlayProps} from 'react-aria/Overlay';\nexport type {AriaPopoverProps, PopoverAria} from 'react-aria/usePopover';\nexport type {AriaModalOverlayProps, ModalOverlayAria} from 'react-aria/useModalOverlay';\nexport type {PortalProviderProps, PortalProviderContextValue} from 'react-aria/PortalProvider';\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -1,14 +1,14 @@
1
- import {useOverlayPosition as $2a41e45df1593e64$export$d39e1813b3bdd0e1} from "./useOverlayPosition.module.js";
2
- import {useOverlay as $a11501f3d1d39e6c$export$ea8f71083e90600f} from "./useOverlay.module.js";
3
- import {useOverlayTrigger as $628037886ba31236$export$f9d5c8beee7d008d} from "./useOverlayTrigger.module.js";
4
- import {usePreventScroll as $49c51c25361d4cd2$export$ee0f7cc6afcd1c18} from "./usePreventScroll.module.js";
5
- import {ModalProvider as $f57aed4a881a3485$export$178405afcd8c5eb, OverlayContainer as $f57aed4a881a3485$export$b47c3594eab58386, OverlayProvider as $f57aed4a881a3485$export$bf688221f59024e5, useModal as $f57aed4a881a3485$export$33ffd74ebf07f060, useModalProvider as $f57aed4a881a3485$export$d9aaed4c3ece1bc0} from "./useModal.module.js";
6
- import {DismissButton as $86ea4cb521eb2e37$export$2317d149ed6f78c4} from "./DismissButton.module.js";
7
- import {ariaHideOutside as $5e3802645cc19319$export$1c3ebcada18427bf} from "./ariaHideOutside.module.js";
8
- import {usePopover as $f2f8a6077418541e$export$542a6fd13ac93354} from "./usePopover.module.js";
9
- import {useModalOverlay as $8ac8429251c45e4b$export$dbc0f175b25fb0fb} from "./useModalOverlay.module.js";
10
- import {Overlay as $337b884510726a0d$export$c6fdb837b070b4ff, useOverlayFocusContain as $337b884510726a0d$export$14c98a7594375490} from "./Overlay.module.js";
11
- import {UNSAFE_PortalProvider as $96b38030c423d352$export$78efe591171d7d45, useUNSAFE_PortalContext as $96b38030c423d352$export$9fc1347d4195ccb3} from "./PortalProvider.module.js";
1
+ import {useOverlayPosition as $b0efc2604d85c5c0$re_export$useOverlayPosition} from "react-aria/useOverlayPosition";
2
+ import {useOverlay as $b0efc2604d85c5c0$re_export$useOverlay} from "react-aria/useOverlay";
3
+ import {useOverlayTrigger as $b0efc2604d85c5c0$re_export$useOverlayTrigger} from "react-aria/useOverlayTrigger";
4
+ import {usePreventScroll as $b0efc2604d85c5c0$re_export$usePreventScroll} from "react-aria/usePreventScroll";
5
+ import {ModalProvider as $b0efc2604d85c5c0$re_export$ModalProvider, useModalProvider as $b0efc2604d85c5c0$re_export$useModalProvider, OverlayProvider as $b0efc2604d85c5c0$re_export$OverlayProvider, OverlayContainer as $b0efc2604d85c5c0$re_export$OverlayContainer, useModal as $b0efc2604d85c5c0$re_export$useModal} from "react-aria/private/overlays/useModal";
6
+ import {DismissButton as $b0efc2604d85c5c0$re_export$DismissButton, Overlay as $b0efc2604d85c5c0$re_export$Overlay} from "react-aria/Overlay";
7
+ import {ariaHideOutside as $b0efc2604d85c5c0$re_export$ariaHideOutside} from "react-aria/private/overlays/ariaHideOutside";
8
+ import {usePopover as $b0efc2604d85c5c0$re_export$usePopover} from "react-aria/usePopover";
9
+ import {useModalOverlay as $b0efc2604d85c5c0$re_export$useModalOverlay} from "react-aria/useModalOverlay";
10
+ import {useOverlayFocusContain as $b0efc2604d85c5c0$re_export$useOverlayFocusContain} from "react-aria/private/overlays/Overlay";
11
+ import {UNSAFE_PortalProvider as $b0efc2604d85c5c0$re_export$UNSAFE_PortalProvider, useUNSAFE_PortalContext as $b0efc2604d85c5c0$re_export$useUNSAFE_PortalContext} from "react-aria/PortalProvider";
12
12
 
13
13
  /*
14
14
  * Copyright 2020 Adobe. All rights reserved.
@@ -33,5 +33,5 @@ import {UNSAFE_PortalProvider as $96b38030c423d352$export$78efe591171d7d45, useU
33
33
 
34
34
 
35
35
 
36
- export {$2a41e45df1593e64$export$d39e1813b3bdd0e1 as useOverlayPosition, $a11501f3d1d39e6c$export$ea8f71083e90600f as useOverlay, $628037886ba31236$export$f9d5c8beee7d008d as useOverlayTrigger, $49c51c25361d4cd2$export$ee0f7cc6afcd1c18 as usePreventScroll, $f57aed4a881a3485$export$178405afcd8c5eb as ModalProvider, $f57aed4a881a3485$export$d9aaed4c3ece1bc0 as useModalProvider, $f57aed4a881a3485$export$bf688221f59024e5 as OverlayProvider, $f57aed4a881a3485$export$b47c3594eab58386 as OverlayContainer, $f57aed4a881a3485$export$33ffd74ebf07f060 as useModal, $86ea4cb521eb2e37$export$2317d149ed6f78c4 as DismissButton, $5e3802645cc19319$export$1c3ebcada18427bf as ariaHideOutside, $f2f8a6077418541e$export$542a6fd13ac93354 as usePopover, $8ac8429251c45e4b$export$dbc0f175b25fb0fb as useModalOverlay, $337b884510726a0d$export$c6fdb837b070b4ff as Overlay, $337b884510726a0d$export$14c98a7594375490 as useOverlayFocusContain, $96b38030c423d352$export$78efe591171d7d45 as UNSAFE_PortalProvider, $96b38030c423d352$export$9fc1347d4195ccb3 as useUNSAFE_PortalContext};
36
+ export {$b0efc2604d85c5c0$re_export$useOverlayPosition as useOverlayPosition, $b0efc2604d85c5c0$re_export$useOverlay as useOverlay, $b0efc2604d85c5c0$re_export$useOverlayTrigger as useOverlayTrigger, $b0efc2604d85c5c0$re_export$usePreventScroll as usePreventScroll, $b0efc2604d85c5c0$re_export$ModalProvider as ModalProvider, $b0efc2604d85c5c0$re_export$useModalProvider as useModalProvider, $b0efc2604d85c5c0$re_export$OverlayProvider as OverlayProvider, $b0efc2604d85c5c0$re_export$OverlayContainer as OverlayContainer, $b0efc2604d85c5c0$re_export$useModal as useModal, $b0efc2604d85c5c0$re_export$DismissButton as DismissButton, $b0efc2604d85c5c0$re_export$Overlay as Overlay, $b0efc2604d85c5c0$re_export$ariaHideOutside as ariaHideOutside, $b0efc2604d85c5c0$re_export$usePopover as usePopover, $b0efc2604d85c5c0$re_export$useModalOverlay as useModalOverlay, $b0efc2604d85c5c0$re_export$useOverlayFocusContain as useOverlayFocusContain, $b0efc2604d85c5c0$re_export$UNSAFE_PortalProvider as UNSAFE_PortalProvider, $b0efc2604d85c5c0$re_export$useUNSAFE_PortalContext as useUNSAFE_PortalContext};
37
37
  //# sourceMappingURL=module.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/overlays/src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nexport {useOverlayPosition} from './useOverlayPosition';\nexport {useOverlay} from './useOverlay';\nexport {useOverlayTrigger} from './useOverlayTrigger';\nexport {usePreventScroll} from './usePreventScroll';\nexport {ModalProvider, useModalProvider, OverlayProvider, OverlayContainer, useModal} from './useModal';\nexport {DismissButton} from './DismissButton';\nexport {ariaHideOutside} from './ariaHideOutside';\nexport {usePopover} from './usePopover';\nexport {useModalOverlay} from './useModalOverlay';\nexport {Overlay, useOverlayFocusContain} from './Overlay';\nexport {UNSAFE_PortalProvider, useUNSAFE_PortalContext} from './PortalProvider';\n\nexport type {AriaPositionProps, PositionAria} from './useOverlayPosition';\nexport type {AriaOverlayProps, OverlayAria} from './useOverlay';\nexport type {OverlayTriggerAria, OverlayTriggerProps} from './useOverlayTrigger';\nexport type {AriaModalOptions, ModalAria, ModalProviderAria, ModalProviderProps, OverlayContainerProps} from './useModal';\nexport type {DismissButtonProps} from './DismissButton';\nexport type {AriaPopoverProps, PopoverAria} from './usePopover';\nexport type {AriaModalOverlayProps, ModalOverlayAria} from './useModalOverlay';\nexport type {OverlayProps} from './Overlay';\nexport type {Placement, PlacementAxis, PositionProps} from '@react-types/overlays';\nexport type {PortalProviderProps, PortalProviderContextValue} from './PortalProvider';\n"],"names":[],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/overlays/src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nexport {useOverlayPosition} from 'react-aria/useOverlayPosition';\nexport {useOverlay} from 'react-aria/useOverlay';\nexport {useOverlayTrigger} from 'react-aria/useOverlayTrigger';\nexport {usePreventScroll} from 'react-aria/usePreventScroll';\nexport {ModalProvider, useModalProvider, OverlayProvider, OverlayContainer, useModal} from 'react-aria/private/overlays/useModal';\nexport {DismissButton, Overlay} from 'react-aria/Overlay';\nexport {ariaHideOutside} from 'react-aria/private/overlays/ariaHideOutside';\nexport {usePopover} from 'react-aria/usePopover';\nexport {useModalOverlay} from 'react-aria/useModalOverlay';\nexport {useOverlayFocusContain} from 'react-aria/private/overlays/Overlay';\nexport {UNSAFE_PortalProvider, useUNSAFE_PortalContext} from 'react-aria/PortalProvider';\nexport type {AriaPositionProps, PositionAria, Placement, PlacementAxis, PositionProps, Axis, SizeAxis} from 'react-aria/useOverlayPosition';\nexport type {AriaOverlayProps, OverlayAria} from 'react-aria/useOverlay';\nexport type {OverlayTriggerAria, OverlayTriggerProps} from 'react-aria/useOverlayTrigger';\nexport type {AriaModalOptions, ModalAria, ModalProviderAria, ModalProviderProps, OverlayContainerProps} from 'react-aria/private/overlays/useModal';\nexport type {DismissButtonProps, OverlayProps} from 'react-aria/Overlay';\nexport type {AriaPopoverProps, PopoverAria} from 'react-aria/usePopover';\nexport type {AriaModalOverlayProps, ModalOverlayAria} from 'react-aria/useModalOverlay';\nexport type {PortalProviderProps, PortalProviderContextValue} from 'react-aria/PortalProvider';\n"],"names":[],"version":3,"file":"module.js.map"}
@@ -0,0 +1,19 @@
1
+ export { useOverlayPosition } from 'react-aria/useOverlayPosition';
2
+ export { useOverlay } from 'react-aria/useOverlay';
3
+ export { useOverlayTrigger } from 'react-aria/useOverlayTrigger';
4
+ export { usePreventScroll } from 'react-aria/usePreventScroll';
5
+ export { ModalProvider, useModalProvider, OverlayProvider, OverlayContainer, useModal } from 'react-aria/private/overlays/useModal';
6
+ export { DismissButton, Overlay } from 'react-aria/Overlay';
7
+ export { ariaHideOutside } from 'react-aria/private/overlays/ariaHideOutside';
8
+ export { usePopover } from 'react-aria/usePopover';
9
+ export { useModalOverlay } from 'react-aria/useModalOverlay';
10
+ export { useOverlayFocusContain } from 'react-aria/private/overlays/Overlay';
11
+ export { UNSAFE_PortalProvider, useUNSAFE_PortalContext } from 'react-aria/PortalProvider';
12
+ export type { AriaPositionProps, PositionAria, Placement, PlacementAxis, PositionProps, Axis, SizeAxis } from 'react-aria/useOverlayPosition';
13
+ export type { AriaOverlayProps, OverlayAria } from 'react-aria/useOverlay';
14
+ export type { OverlayTriggerAria, OverlayTriggerProps } from 'react-aria/useOverlayTrigger';
15
+ export type { AriaModalOptions, ModalAria, ModalProviderAria, ModalProviderProps, OverlayContainerProps } from 'react-aria/private/overlays/useModal';
16
+ export type { DismissButtonProps, OverlayProps } from 'react-aria/Overlay';
17
+ export type { AriaPopoverProps, PopoverAria } from 'react-aria/usePopover';
18
+ export type { AriaModalOverlayProps, ModalOverlayAria } from 'react-aria/useModalOverlay';
19
+ export type { PortalProviderProps, PortalProviderContextValue } from 'react-aria/PortalProvider';
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@react-aria/overlays",
3
- "version": "3.31.1",
3
+ "version": "3.32.0",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
7
7
  "module": "dist/module.js",
8
8
  "exports": {
9
- "source": "./src/index.ts",
10
- "types": [
11
- "./dist/types.d.ts",
12
- "./src/index.ts"
13
- ],
14
- "import": "./dist/import.mjs",
15
- "require": "./dist/main.js"
9
+ ".": {
10
+ "source": "./src/index.ts",
11
+ "types": "./dist/types/src/index.d.ts",
12
+ "import": "./dist/import.mjs",
13
+ "require": "./dist/main.js"
14
+ },
15
+ "./package.json": "./package.json"
16
16
  },
17
- "types": "dist/types.d.ts",
17
+ "types": "dist/types/src/index.d.ts",
18
18
  "source": "src/index.ts",
19
19
  "files": [
20
20
  "dist",
@@ -26,17 +26,8 @@
26
26
  "url": "https://github.com/adobe/react-spectrum"
27
27
  },
28
28
  "dependencies": {
29
- "@react-aria/focus": "^3.21.4",
30
- "@react-aria/i18n": "^3.12.15",
31
- "@react-aria/interactions": "^3.27.0",
32
- "@react-aria/ssr": "^3.9.10",
33
- "@react-aria/utils": "^3.33.0",
34
- "@react-aria/visually-hidden": "^3.8.30",
35
- "@react-stately/overlays": "^3.6.22",
36
- "@react-types/button": "^3.15.0",
37
- "@react-types/overlays": "^3.9.3",
38
- "@react-types/shared": "^3.33.0",
39
- "@swc/helpers": "^0.5.0"
29
+ "@swc/helpers": "^0.5.0",
30
+ "react-aria": "3.48.0"
40
31
  },
41
32
  "peerDependencies": {
42
33
  "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
@@ -45,5 +36,8 @@
45
36
  "publishConfig": {
46
37
  "access": "public"
47
38
  },
48
- "gitHead": "66e51757606b43a89ed02c574ca24517323a2ab9"
39
+ "targets": {
40
+ "types": false
41
+ },
42
+ "gitHead": "a6999bdf494a2e9c0381a5881908328bdd22ddae"
49
43
  }
package/src/index.ts CHANGED
@@ -9,25 +9,22 @@
9
9
  * OF ANY KIND, either express or implied. See the License for the specific language
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
- export {useOverlayPosition} from './useOverlayPosition';
13
- export {useOverlay} from './useOverlay';
14
- export {useOverlayTrigger} from './useOverlayTrigger';
15
- export {usePreventScroll} from './usePreventScroll';
16
- export {ModalProvider, useModalProvider, OverlayProvider, OverlayContainer, useModal} from './useModal';
17
- export {DismissButton} from './DismissButton';
18
- export {ariaHideOutside} from './ariaHideOutside';
19
- export {usePopover} from './usePopover';
20
- export {useModalOverlay} from './useModalOverlay';
21
- export {Overlay, useOverlayFocusContain} from './Overlay';
22
- export {UNSAFE_PortalProvider, useUNSAFE_PortalContext} from './PortalProvider';
23
-
24
- export type {AriaPositionProps, PositionAria} from './useOverlayPosition';
25
- export type {AriaOverlayProps, OverlayAria} from './useOverlay';
26
- export type {OverlayTriggerAria, OverlayTriggerProps} from './useOverlayTrigger';
27
- export type {AriaModalOptions, ModalAria, ModalProviderAria, ModalProviderProps, OverlayContainerProps} from './useModal';
28
- export type {DismissButtonProps} from './DismissButton';
29
- export type {AriaPopoverProps, PopoverAria} from './usePopover';
30
- export type {AriaModalOverlayProps, ModalOverlayAria} from './useModalOverlay';
31
- export type {OverlayProps} from './Overlay';
32
- export type {Placement, PlacementAxis, PositionProps} from '@react-types/overlays';
33
- export type {PortalProviderProps, PortalProviderContextValue} from './PortalProvider';
12
+ export {useOverlayPosition} from 'react-aria/useOverlayPosition';
13
+ export {useOverlay} from 'react-aria/useOverlay';
14
+ export {useOverlayTrigger} from 'react-aria/useOverlayTrigger';
15
+ export {usePreventScroll} from 'react-aria/usePreventScroll';
16
+ export {ModalProvider, useModalProvider, OverlayProvider, OverlayContainer, useModal} from 'react-aria/private/overlays/useModal';
17
+ export {DismissButton, Overlay} from 'react-aria/Overlay';
18
+ export {ariaHideOutside} from 'react-aria/private/overlays/ariaHideOutside';
19
+ export {usePopover} from 'react-aria/usePopover';
20
+ export {useModalOverlay} from 'react-aria/useModalOverlay';
21
+ export {useOverlayFocusContain} from 'react-aria/private/overlays/Overlay';
22
+ export {UNSAFE_PortalProvider, useUNSAFE_PortalContext} from 'react-aria/PortalProvider';
23
+ export type {AriaPositionProps, PositionAria, Placement, PlacementAxis, PositionProps, Axis, SizeAxis} from 'react-aria/useOverlayPosition';
24
+ export type {AriaOverlayProps, OverlayAria} from 'react-aria/useOverlay';
25
+ export type {OverlayTriggerAria, OverlayTriggerProps} from 'react-aria/useOverlayTrigger';
26
+ export type {AriaModalOptions, ModalAria, ModalProviderAria, ModalProviderProps, OverlayContainerProps} from 'react-aria/private/overlays/useModal';
27
+ export type {DismissButtonProps, OverlayProps} from 'react-aria/Overlay';
28
+ export type {AriaPopoverProps, PopoverAria} from 'react-aria/usePopover';
29
+ export type {AriaModalOverlayProps, ModalOverlayAria} from 'react-aria/useModalOverlay';
30
+ export type {PortalProviderProps, PortalProviderContextValue} from 'react-aria/PortalProvider';
@@ -1,51 +0,0 @@
1
- var $90f032faf016e1fb$exports = require("./intlStrings.main.js");
2
- var $21EvL$react = require("react");
3
- var $21EvL$reactariautils = require("@react-aria/utils");
4
- var $21EvL$reactariai18n = require("@react-aria/i18n");
5
- var $21EvL$reactariavisuallyhidden = require("@react-aria/visually-hidden");
6
-
7
-
8
- function $parcel$interopDefault(a) {
9
- return a && a.__esModule ? a.default : a;
10
- }
11
-
12
- function $parcel$export(e, n, v, s) {
13
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
14
- }
15
-
16
- $parcel$export(module.exports, "DismissButton", () => $f69bb3e6457495cc$export$2317d149ed6f78c4);
17
- /*
18
- * Copyright 2020 Adobe. All rights reserved.
19
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
20
- * you may not use this file except in compliance with the License. You may obtain a copy
21
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
22
- *
23
- * Unless required by applicable law or agreed to in writing, software distributed under
24
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
25
- * OF ANY KIND, either express or implied. See the License for the specific language
26
- * governing permissions and limitations under the License.
27
- */
28
-
29
-
30
-
31
-
32
- function $f69bb3e6457495cc$export$2317d149ed6f78c4(props) {
33
- let { onDismiss: onDismiss, ...otherProps } = props;
34
- let stringFormatter = (0, $21EvL$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($90f032faf016e1fb$exports))), '@react-aria/overlays');
35
- let labels = (0, $21EvL$reactariautils.useLabels)(otherProps, stringFormatter.format('dismiss'));
36
- let onClick = ()=>{
37
- if (onDismiss) onDismiss();
38
- };
39
- return /*#__PURE__*/ (0, ($parcel$interopDefault($21EvL$react))).createElement((0, $21EvL$reactariavisuallyhidden.VisuallyHidden), null, /*#__PURE__*/ (0, ($parcel$interopDefault($21EvL$react))).createElement("button", {
40
- ...labels,
41
- tabIndex: -1,
42
- onClick: onClick,
43
- style: {
44
- width: 1,
45
- height: 1
46
- }
47
- }));
48
- }
49
-
50
-
51
- //# sourceMappingURL=DismissButton.main.js.map
@@ -1 +0,0 @@
1
- {"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAoBM,SAAS,0CAAc,KAAyB;IACrD,IAAI,aAAC,SAAS,EAAE,GAAG,YAAW,GAAG;IACjC,IAAI,kBAAkB,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAEhE,IAAI,SAAS,CAAA,GAAA,+BAAQ,EAAE,YAAY,gBAAgB,MAAM,CAAC;IAE1D,IAAI,UAAU;QACZ,IAAI,WACF;IAEJ;IAEA,qBACE,0DAAC,CAAA,GAAA,6CAAa,uBACZ,0DAAC;QACE,GAAG,MAAM;QACV,UAAU;QACV,SAAS;QACT,OAAO;YAAC,OAAO;YAAG,QAAQ;QAAC;;AAGnC","sources":["packages/@react-aria/overlays/src/DismissButton.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps} from '@react-types/shared';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport React, {JSX} from 'react';\nimport {useLabels} from '@react-aria/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {VisuallyHidden} from '@react-aria/visually-hidden';\n\nexport interface DismissButtonProps extends AriaLabelingProps, DOMProps {\n /** Called when the dismiss button is activated. */\n onDismiss?: () => void\n}\n\n/**\n * A visually hidden button that can be used to allow screen reader\n * users to dismiss a modal or popup when there is no visual\n * affordance to do so.\n */\nexport function DismissButton(props: DismissButtonProps): JSX.Element {\n let {onDismiss, ...otherProps} = props;\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/overlays');\n\n let labels = useLabels(otherProps, stringFormatter.format('dismiss'));\n\n let onClick = () => {\n if (onDismiss) {\n onDismiss();\n }\n };\n\n return (\n <VisuallyHidden>\n <button\n {...labels}\n tabIndex={-1}\n onClick={onClick}\n style={{width: 1, height: 1}} />\n </VisuallyHidden>\n );\n}\n"],"names":[],"version":3,"file":"DismissButton.main.js.map"}
@@ -1,46 +0,0 @@
1
- import $iYaQO$intlStringsmodulejs from "./intlStrings.mjs";
2
- import $iYaQO$react from "react";
3
- import {useLabels as $iYaQO$useLabels} from "@react-aria/utils";
4
- import {useLocalizedStringFormatter as $iYaQO$useLocalizedStringFormatter} from "@react-aria/i18n";
5
- import {VisuallyHidden as $iYaQO$VisuallyHidden} from "@react-aria/visually-hidden";
6
-
7
-
8
- function $parcel$interopDefault(a) {
9
- return a && a.__esModule ? a.default : a;
10
- }
11
- /*
12
- * Copyright 2020 Adobe. All rights reserved.
13
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
14
- * you may not use this file except in compliance with the License. You may obtain a copy
15
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
16
- *
17
- * Unless required by applicable law or agreed to in writing, software distributed under
18
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
19
- * OF ANY KIND, either express or implied. See the License for the specific language
20
- * governing permissions and limitations under the License.
21
- */
22
-
23
-
24
-
25
-
26
- function $86ea4cb521eb2e37$export$2317d149ed6f78c4(props) {
27
- let { onDismiss: onDismiss, ...otherProps } = props;
28
- let stringFormatter = (0, $iYaQO$useLocalizedStringFormatter)((0, ($parcel$interopDefault($iYaQO$intlStringsmodulejs))), '@react-aria/overlays');
29
- let labels = (0, $iYaQO$useLabels)(otherProps, stringFormatter.format('dismiss'));
30
- let onClick = ()=>{
31
- if (onDismiss) onDismiss();
32
- };
33
- return /*#__PURE__*/ (0, $iYaQO$react).createElement((0, $iYaQO$VisuallyHidden), null, /*#__PURE__*/ (0, $iYaQO$react).createElement("button", {
34
- ...labels,
35
- tabIndex: -1,
36
- onClick: onClick,
37
- style: {
38
- width: 1,
39
- height: 1
40
- }
41
- }));
42
- }
43
-
44
-
45
- export {$86ea4cb521eb2e37$export$2317d149ed6f78c4 as DismissButton};
46
- //# sourceMappingURL=DismissButton.module.js.map
@@ -1,46 +0,0 @@
1
- import $iYaQO$intlStringsmodulejs from "./intlStrings.module.js";
2
- import $iYaQO$react from "react";
3
- import {useLabels as $iYaQO$useLabels} from "@react-aria/utils";
4
- import {useLocalizedStringFormatter as $iYaQO$useLocalizedStringFormatter} from "@react-aria/i18n";
5
- import {VisuallyHidden as $iYaQO$VisuallyHidden} from "@react-aria/visually-hidden";
6
-
7
-
8
- function $parcel$interopDefault(a) {
9
- return a && a.__esModule ? a.default : a;
10
- }
11
- /*
12
- * Copyright 2020 Adobe. All rights reserved.
13
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
14
- * you may not use this file except in compliance with the License. You may obtain a copy
15
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
16
- *
17
- * Unless required by applicable law or agreed to in writing, software distributed under
18
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
19
- * OF ANY KIND, either express or implied. See the License for the specific language
20
- * governing permissions and limitations under the License.
21
- */
22
-
23
-
24
-
25
-
26
- function $86ea4cb521eb2e37$export$2317d149ed6f78c4(props) {
27
- let { onDismiss: onDismiss, ...otherProps } = props;
28
- let stringFormatter = (0, $iYaQO$useLocalizedStringFormatter)((0, ($parcel$interopDefault($iYaQO$intlStringsmodulejs))), '@react-aria/overlays');
29
- let labels = (0, $iYaQO$useLabels)(otherProps, stringFormatter.format('dismiss'));
30
- let onClick = ()=>{
31
- if (onDismiss) onDismiss();
32
- };
33
- return /*#__PURE__*/ (0, $iYaQO$react).createElement((0, $iYaQO$VisuallyHidden), null, /*#__PURE__*/ (0, $iYaQO$react).createElement("button", {
34
- ...labels,
35
- tabIndex: -1,
36
- onClick: onClick,
37
- style: {
38
- width: 1,
39
- height: 1
40
- }
41
- }));
42
- }
43
-
44
-
45
- export {$86ea4cb521eb2e37$export$2317d149ed6f78c4 as DismissButton};
46
- //# sourceMappingURL=DismissButton.module.js.map
@@ -1 +0,0 @@
1
- {"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAoBM,SAAS,0CAAc,KAAyB;IACrD,IAAI,aAAC,SAAS,EAAE,GAAG,YAAW,GAAG;IACjC,IAAI,kBAAkB,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,oDAAW,GAAG;IAEhE,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE,YAAY,gBAAgB,MAAM,CAAC;IAE1D,IAAI,UAAU;QACZ,IAAI,WACF;IAEJ;IAEA,qBACE,gCAAC,CAAA,GAAA,qBAAa,uBACZ,gCAAC;QACE,GAAG,MAAM;QACV,UAAU;QACV,SAAS;QACT,OAAO;YAAC,OAAO;YAAG,QAAQ;QAAC;;AAGnC","sources":["packages/@react-aria/overlays/src/DismissButton.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps} from '@react-types/shared';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport React, {JSX} from 'react';\nimport {useLabels} from '@react-aria/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {VisuallyHidden} from '@react-aria/visually-hidden';\n\nexport interface DismissButtonProps extends AriaLabelingProps, DOMProps {\n /** Called when the dismiss button is activated. */\n onDismiss?: () => void\n}\n\n/**\n * A visually hidden button that can be used to allow screen reader\n * users to dismiss a modal or popup when there is no visual\n * affordance to do so.\n */\nexport function DismissButton(props: DismissButtonProps): JSX.Element {\n let {onDismiss, ...otherProps} = props;\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/overlays');\n\n let labels = useLabels(otherProps, stringFormatter.format('dismiss'));\n\n let onClick = () => {\n if (onDismiss) {\n onDismiss();\n }\n };\n\n return (\n <VisuallyHidden>\n <button\n {...labels}\n tabIndex={-1}\n onClick={onClick}\n style={{width: 1, height: 1}} />\n </VisuallyHidden>\n );\n}\n"],"names":[],"version":3,"file":"DismissButton.module.js.map"}
@@ -1,73 +0,0 @@
1
- var $d7347c25ab757295$exports = require("./PortalProvider.main.js");
2
- var $kxJqT$reactariainteractions = require("@react-aria/interactions");
3
- var $kxJqT$reactariafocus = require("@react-aria/focus");
4
- var $kxJqT$react = require("react");
5
- var $kxJqT$reactdom = require("react-dom");
6
- var $kxJqT$reactariassr = require("@react-aria/ssr");
7
- var $kxJqT$reactariautils = require("@react-aria/utils");
8
-
9
-
10
- function $parcel$interopDefault(a) {
11
- return a && a.__esModule ? a.default : a;
12
- }
13
-
14
- function $parcel$export(e, n, v, s) {
15
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
16
- }
17
-
18
- $parcel$export(module.exports, "Overlay", () => $745edbb83ab4296f$export$c6fdb837b070b4ff);
19
- $parcel$export(module.exports, "useOverlayFocusContain", () => $745edbb83ab4296f$export$14c98a7594375490);
20
- /*
21
- * Copyright 2022 Adobe. All rights reserved.
22
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
23
- * you may not use this file except in compliance with the License. You may obtain a copy
24
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
25
- *
26
- * Unless required by applicable law or agreed to in writing, software distributed under
27
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
28
- * OF ANY KIND, either express or implied. See the License for the specific language
29
- * governing permissions and limitations under the License.
30
- */
31
-
32
-
33
-
34
-
35
-
36
-
37
- const $745edbb83ab4296f$export$a2200b96afd16271 = /*#__PURE__*/ (0, ($parcel$interopDefault($kxJqT$react))).createContext(null);
38
- function $745edbb83ab4296f$export$c6fdb837b070b4ff(props) {
39
- let isSSR = (0, $kxJqT$reactariassr.useIsSSR)();
40
- let { portalContainer: portalContainer = isSSR ? null : document.body, isExiting: isExiting } = props;
41
- let [contain, setContain] = (0, $kxJqT$react.useState)(false);
42
- let contextValue = (0, $kxJqT$react.useMemo)(()=>({
43
- contain: contain,
44
- setContain: setContain
45
- }), [
46
- contain,
47
- setContain
48
- ]);
49
- let { getContainer: getContainer } = (0, $d7347c25ab757295$exports.useUNSAFE_PortalContext)();
50
- if (!props.portalContainer && getContainer) portalContainer = getContainer();
51
- if (!portalContainer) return null;
52
- let contents = props.children;
53
- if (!props.disableFocusManagement) contents = /*#__PURE__*/ (0, ($parcel$interopDefault($kxJqT$react))).createElement((0, $kxJqT$reactariafocus.FocusScope), {
54
- restoreFocus: true,
55
- contain: (props.shouldContainFocus || contain) && !isExiting
56
- }, contents);
57
- contents = /*#__PURE__*/ (0, ($parcel$interopDefault($kxJqT$react))).createElement($745edbb83ab4296f$export$a2200b96afd16271.Provider, {
58
- value: contextValue
59
- }, /*#__PURE__*/ (0, ($parcel$interopDefault($kxJqT$react))).createElement((0, $kxJqT$reactariainteractions.ClearPressResponder), null, contents));
60
- return /*#__PURE__*/ (0, ($parcel$interopDefault($kxJqT$reactdom))).createPortal(contents, portalContainer);
61
- }
62
- function $745edbb83ab4296f$export$14c98a7594375490() {
63
- let ctx = (0, $kxJqT$react.useContext)($745edbb83ab4296f$export$a2200b96afd16271);
64
- let setContain = ctx === null || ctx === void 0 ? void 0 : ctx.setContain;
65
- (0, $kxJqT$reactariautils.useLayoutEffect)(()=>{
66
- setContain === null || setContain === void 0 ? void 0 : setContain(true);
67
- }, [
68
- setContain
69
- ]);
70
- }
71
-
72
-
73
- //# sourceMappingURL=Overlay.main.js.map
@@ -1 +0,0 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAmCM,MAAM,0DACX,CAAA,GAAA,sCAAI,EAAE,aAAa,CAAuF;AAMrG,SAAS,0CAAQ,KAAmB;IACzC,IAAI,QAAQ,CAAA,GAAA,4BAAO;IACnB,IAAI,mBAAC,kBAAkB,QAAQ,OAAO,SAAS,IAAI,aAAE,SAAS,EAAC,GAAG;IAClE,IAAI,CAAC,SAAS,WAAW,GAAG,CAAA,GAAA,qBAAO,EAAE;IACrC,IAAI,eAAe,CAAA,GAAA,oBAAM,EAAE,IAAO,CAAA;qBAAC;wBAAS;QAAU,CAAA,GAAI;QAAC;QAAS;KAAW;IAE/E,IAAI,gBAAC,YAAY,EAAC,GAAG,CAAA,GAAA,iDAAsB;IAC3C,IAAI,CAAC,MAAM,eAAe,IAAI,cAC5B,kBAAkB;IAGpB,IAAI,CAAC,iBACH,OAAO;IAGT,IAAI,WAAW,MAAM,QAAQ;IAC7B,IAAI,CAAC,MAAM,sBAAsB,EAC/B,yBACE,0DAAC,CAAA,GAAA,gCAAS;QAAE,cAAA;QAAa,SAAS,AAAC,CAAA,MAAM,kBAAkB,IAAI,OAAM,KAAM,CAAC;OACzE;IAKP,yBACE,0DAAC,0CAAe,QAAQ;QAAC,OAAO;qBAC9B,0DAAC,CAAA,GAAA,gDAAkB,SAChB;IAKP,qBAAO,CAAA,GAAA,yCAAO,EAAE,YAAY,CAAC,UAAU;AACzC;AAGO,SAAS;IACd,IAAI,MAAM,CAAA,GAAA,uBAAS,EAAE;IACrB,IAAI,aAAa,gBAAA,0BAAA,IAAK,UAAU;IAChC,CAAA,GAAA,qCAAc,EAAE;QACd,uBAAA,iCAAA,WAAa;IACf,GAAG;QAAC;KAAW;AACjB","sources":["packages/@react-aria/overlays/src/Overlay.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ClearPressResponder} from '@react-aria/interactions';\nimport {FocusScope} from '@react-aria/focus';\nimport React, {ReactNode, useContext, useMemo, useState} from 'react';\nimport ReactDOM from 'react-dom';\nimport {useIsSSR} from '@react-aria/ssr';\nimport {useLayoutEffect} from '@react-aria/utils';\nimport {useUNSAFE_PortalContext} from './PortalProvider';\n\nexport interface OverlayProps {\n /**\n * The container element in which the overlay portal will be placed.\n * @default document.body\n */\n portalContainer?: Element,\n /** The overlay to render in the portal. */\n children: ReactNode,\n /**\n * Disables default focus management for the overlay, including containment and restoration.\n * This option should be used very carefully. When focus management is disabled, you must\n * implement focus containment and restoration to ensure the overlay is keyboard accessible.\n */\n disableFocusManagement?: boolean,\n /**\n * Whether to contain focus within the overlay.\n */\n shouldContainFocus?: boolean,\n /**\n * Whether the overlay is currently performing an exit animation. When true,\n * focus is allowed to move outside.\n */\n isExiting?: boolean\n}\n\nexport const OverlayContext: React.Context<{contain: boolean, setContain: React.Dispatch<React.SetStateAction<boolean>>} | null> =\n React.createContext<{contain: boolean, setContain: React.Dispatch<React.SetStateAction<boolean>>} | null>(null);\n\n/**\n * A container which renders an overlay such as a popover or modal in a portal,\n * and provides a focus scope for the child elements.\n */\nexport function Overlay(props: OverlayProps): React.ReactPortal | null {\n let isSSR = useIsSSR();\n let {portalContainer = isSSR ? null : document.body, isExiting} = props;\n let [contain, setContain] = useState(false);\n let contextValue = useMemo(() => ({contain, setContain}), [contain, setContain]);\n\n let {getContainer} = useUNSAFE_PortalContext();\n if (!props.portalContainer && getContainer) {\n portalContainer = getContainer();\n }\n\n if (!portalContainer) {\n return null;\n }\n\n let contents = props.children;\n if (!props.disableFocusManagement) {\n contents = (\n <FocusScope restoreFocus contain={(props.shouldContainFocus || contain) && !isExiting}>\n {contents}\n </FocusScope>\n );\n }\n\n contents = (\n <OverlayContext.Provider value={contextValue}>\n <ClearPressResponder>\n {contents}\n </ClearPressResponder>\n </OverlayContext.Provider>\n );\n\n return ReactDOM.createPortal(contents, portalContainer);\n}\n\n/** @private */\nexport function useOverlayFocusContain(): void {\n let ctx = useContext(OverlayContext);\n let setContain = ctx?.setContain;\n useLayoutEffect(() => {\n setContain?.(true);\n }, [setContain]);\n}\n"],"names":[],"version":3,"file":"Overlay.main.js.map"}