@react-aria/overlays 3.19.0 → 3.20.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 (182) hide show
  1. package/dist/ar-AE.main.js +6 -0
  2. package/dist/ar-AE.main.js.map +1 -0
  3. package/dist/ar-AE.mjs +8 -0
  4. package/dist/ar-AE.module.js +8 -0
  5. package/dist/ar-AE.module.js.map +1 -0
  6. package/dist/bg-BG.main.js +6 -0
  7. package/dist/bg-BG.main.js.map +1 -0
  8. package/dist/bg-BG.mjs +8 -0
  9. package/dist/bg-BG.module.js +8 -0
  10. package/dist/bg-BG.module.js.map +1 -0
  11. package/dist/cs-CZ.main.js +6 -0
  12. package/dist/cs-CZ.main.js.map +1 -0
  13. package/dist/cs-CZ.mjs +8 -0
  14. package/dist/cs-CZ.module.js +8 -0
  15. package/dist/cs-CZ.module.js.map +1 -0
  16. package/dist/da-DK.main.js +6 -0
  17. package/dist/da-DK.main.js.map +1 -0
  18. package/dist/da-DK.mjs +8 -0
  19. package/dist/da-DK.module.js +8 -0
  20. package/dist/da-DK.module.js.map +1 -0
  21. package/dist/de-DE.main.js +6 -0
  22. package/dist/de-DE.main.js.map +1 -0
  23. package/dist/de-DE.mjs +8 -0
  24. package/dist/de-DE.module.js +8 -0
  25. package/dist/de-DE.module.js.map +1 -0
  26. package/dist/el-GR.main.js +6 -0
  27. package/dist/el-GR.main.js.map +1 -0
  28. package/dist/el-GR.mjs +8 -0
  29. package/dist/el-GR.module.js +8 -0
  30. package/dist/el-GR.module.js.map +1 -0
  31. package/dist/en-US.main.js +6 -0
  32. package/dist/en-US.main.js.map +1 -0
  33. package/dist/en-US.mjs +8 -0
  34. package/dist/en-US.module.js +8 -0
  35. package/dist/en-US.module.js.map +1 -0
  36. package/dist/es-ES.main.js +6 -0
  37. package/dist/es-ES.main.js.map +1 -0
  38. package/dist/es-ES.mjs +8 -0
  39. package/dist/es-ES.module.js +8 -0
  40. package/dist/es-ES.module.js.map +1 -0
  41. package/dist/et-EE.main.js +6 -0
  42. package/dist/et-EE.main.js.map +1 -0
  43. package/dist/et-EE.mjs +8 -0
  44. package/dist/et-EE.module.js +8 -0
  45. package/dist/et-EE.module.js.map +1 -0
  46. package/dist/fi-FI.main.js +6 -0
  47. package/dist/fi-FI.main.js.map +1 -0
  48. package/dist/fi-FI.mjs +8 -0
  49. package/dist/fi-FI.module.js +8 -0
  50. package/dist/fi-FI.module.js.map +1 -0
  51. package/dist/fr-FR.main.js +6 -0
  52. package/dist/fr-FR.main.js.map +1 -0
  53. package/dist/fr-FR.mjs +8 -0
  54. package/dist/fr-FR.module.js +8 -0
  55. package/dist/fr-FR.module.js.map +1 -0
  56. package/dist/he-IL.main.js +6 -0
  57. package/dist/he-IL.main.js.map +1 -0
  58. package/dist/he-IL.mjs +8 -0
  59. package/dist/he-IL.module.js +8 -0
  60. package/dist/he-IL.module.js.map +1 -0
  61. package/dist/hr-HR.main.js +6 -0
  62. package/dist/hr-HR.main.js.map +1 -0
  63. package/dist/hr-HR.mjs +8 -0
  64. package/dist/hr-HR.module.js +8 -0
  65. package/dist/hr-HR.module.js.map +1 -0
  66. package/dist/hu-HU.main.js +6 -0
  67. package/dist/hu-HU.main.js.map +1 -0
  68. package/dist/hu-HU.mjs +8 -0
  69. package/dist/hu-HU.module.js +8 -0
  70. package/dist/hu-HU.module.js.map +1 -0
  71. package/dist/import.mjs +85 -206
  72. package/dist/it-IT.main.js +6 -0
  73. package/dist/it-IT.main.js.map +1 -0
  74. package/dist/it-IT.mjs +8 -0
  75. package/dist/it-IT.module.js +8 -0
  76. package/dist/it-IT.module.js.map +1 -0
  77. package/dist/ja-JP.main.js +6 -0
  78. package/dist/ja-JP.main.js.map +1 -0
  79. package/dist/ja-JP.mjs +8 -0
  80. package/dist/ja-JP.module.js +8 -0
  81. package/dist/ja-JP.module.js.map +1 -0
  82. package/dist/ko-KR.main.js +6 -0
  83. package/dist/ko-KR.main.js.map +1 -0
  84. package/dist/ko-KR.mjs +8 -0
  85. package/dist/ko-KR.module.js +8 -0
  86. package/dist/ko-KR.module.js.map +1 -0
  87. package/dist/lt-LT.main.js +6 -0
  88. package/dist/lt-LT.main.js.map +1 -0
  89. package/dist/lt-LT.mjs +8 -0
  90. package/dist/lt-LT.module.js +8 -0
  91. package/dist/lt-LT.module.js.map +1 -0
  92. package/dist/lv-LV.main.js +6 -0
  93. package/dist/lv-LV.main.js.map +1 -0
  94. package/dist/lv-LV.mjs +8 -0
  95. package/dist/lv-LV.module.js +8 -0
  96. package/dist/lv-LV.module.js.map +1 -0
  97. package/dist/main.js +85 -206
  98. package/dist/main.js.map +1 -1
  99. package/dist/module.js +85 -206
  100. package/dist/module.js.map +1 -1
  101. package/dist/nb-NO.main.js +6 -0
  102. package/dist/nb-NO.main.js.map +1 -0
  103. package/dist/nb-NO.mjs +8 -0
  104. package/dist/nb-NO.module.js +8 -0
  105. package/dist/nb-NO.module.js.map +1 -0
  106. package/dist/nl-NL.main.js +6 -0
  107. package/dist/nl-NL.main.js.map +1 -0
  108. package/dist/nl-NL.mjs +8 -0
  109. package/dist/nl-NL.module.js +8 -0
  110. package/dist/nl-NL.module.js.map +1 -0
  111. package/dist/pl-PL.main.js +6 -0
  112. package/dist/pl-PL.main.js.map +1 -0
  113. package/dist/pl-PL.mjs +8 -0
  114. package/dist/pl-PL.module.js +8 -0
  115. package/dist/pl-PL.module.js.map +1 -0
  116. package/dist/pt-BR.main.js +6 -0
  117. package/dist/pt-BR.main.js.map +1 -0
  118. package/dist/pt-BR.mjs +8 -0
  119. package/dist/pt-BR.module.js +8 -0
  120. package/dist/pt-BR.module.js.map +1 -0
  121. package/dist/pt-PT.main.js +6 -0
  122. package/dist/pt-PT.main.js.map +1 -0
  123. package/dist/pt-PT.mjs +8 -0
  124. package/dist/pt-PT.module.js +8 -0
  125. package/dist/pt-PT.module.js.map +1 -0
  126. package/dist/ro-RO.main.js +6 -0
  127. package/dist/ro-RO.main.js.map +1 -0
  128. package/dist/ro-RO.mjs +8 -0
  129. package/dist/ro-RO.module.js +8 -0
  130. package/dist/ro-RO.module.js.map +1 -0
  131. package/dist/ru-RU.main.js +6 -0
  132. package/dist/ru-RU.main.js.map +1 -0
  133. package/dist/ru-RU.mjs +8 -0
  134. package/dist/ru-RU.module.js +8 -0
  135. package/dist/ru-RU.module.js.map +1 -0
  136. package/dist/sk-SK.main.js +6 -0
  137. package/dist/sk-SK.main.js.map +1 -0
  138. package/dist/sk-SK.mjs +8 -0
  139. package/dist/sk-SK.module.js +8 -0
  140. package/dist/sk-SK.module.js.map +1 -0
  141. package/dist/sl-SI.main.js +6 -0
  142. package/dist/sl-SI.main.js.map +1 -0
  143. package/dist/sl-SI.mjs +8 -0
  144. package/dist/sl-SI.module.js +8 -0
  145. package/dist/sl-SI.module.js.map +1 -0
  146. package/dist/sr-SP.main.js +6 -0
  147. package/dist/sr-SP.main.js.map +1 -0
  148. package/dist/sr-SP.mjs +8 -0
  149. package/dist/sr-SP.module.js +8 -0
  150. package/dist/sr-SP.module.js.map +1 -0
  151. package/dist/sv-SE.main.js +6 -0
  152. package/dist/sv-SE.main.js.map +1 -0
  153. package/dist/sv-SE.mjs +8 -0
  154. package/dist/sv-SE.module.js +8 -0
  155. package/dist/sv-SE.module.js.map +1 -0
  156. package/dist/tr-TR.main.js +6 -0
  157. package/dist/tr-TR.main.js.map +1 -0
  158. package/dist/tr-TR.mjs +8 -0
  159. package/dist/tr-TR.module.js +8 -0
  160. package/dist/tr-TR.module.js.map +1 -0
  161. package/dist/types.d.ts +7 -0
  162. package/dist/types.d.ts.map +1 -1
  163. package/dist/uk-UA.main.js +6 -0
  164. package/dist/uk-UA.main.js.map +1 -0
  165. package/dist/uk-UA.mjs +8 -0
  166. package/dist/uk-UA.module.js +8 -0
  167. package/dist/uk-UA.module.js.map +1 -0
  168. package/dist/zh-CN.main.js +6 -0
  169. package/dist/zh-CN.main.js.map +1 -0
  170. package/dist/zh-CN.mjs +8 -0
  171. package/dist/zh-CN.module.js +8 -0
  172. package/dist/zh-CN.module.js.map +1 -0
  173. package/dist/zh-TW.main.js +6 -0
  174. package/dist/zh-TW.main.js.map +1 -0
  175. package/dist/zh-TW.mjs +8 -0
  176. package/dist/zh-TW.module.js +8 -0
  177. package/dist/zh-TW.module.js.map +1 -0
  178. package/package.json +8 -8
  179. package/src/DismissButton.tsx +3 -2
  180. package/src/useOverlay.ts +1 -1
  181. package/src/usePopover.ts +13 -4
  182. package/src/usePreventScroll.ts +56 -41
package/dist/main.js CHANGED
@@ -1,3 +1,37 @@
1
+ var $4393d9b86d3ad278$exports = require("./ar-AE.main.js");
2
+ var $254224013ae06959$exports = require("./bg-BG.main.js");
3
+ var $55d3567b59d09782$exports = require("./cs-CZ.main.js");
4
+ var $0e419a7be7773c16$exports = require("./da-DK.main.js");
5
+ var $be606513c8356c34$exports = require("./de-DE.main.js");
6
+ var $7d99787e5bd26f87$exports = require("./el-GR.main.js");
7
+ var $0360f2a6534752c1$exports = require("./en-US.main.js");
8
+ var $92bf4fdecfeb6a61$exports = require("./es-ES.main.js");
9
+ var $7c02fa9b9c598043$exports = require("./et-EE.main.js");
10
+ var $ba53535dcca59343$exports = require("./fi-FI.main.js");
11
+ var $2fbbcddf7d252cb7$exports = require("./fr-FR.main.js");
12
+ var $0a1f0520e07d3596$exports = require("./he-IL.main.js");
13
+ var $f7be5df1487823a9$exports = require("./hr-HR.main.js");
14
+ var $8dbe4363bfbba3f9$exports = require("./hu-HU.main.js");
15
+ var $90a445da1ad273e7$exports = require("./it-IT.main.js");
16
+ var $e1ebf18259c9b1ee$exports = require("./ja-JP.main.js");
17
+ var $765893642f3b4f72$exports = require("./ko-KR.main.js");
18
+ var $af73ba24f63febd1$exports = require("./lt-LT.main.js");
19
+ var $97aac9f6740ee412$exports = require("./lv-LV.main.js");
20
+ var $92fbe76e196d7e0a$exports = require("./nb-NO.main.js");
21
+ var $44399897afb701ce$exports = require("./nl-NL.main.js");
22
+ var $d679e258664d7384$exports = require("./pl-PL.main.js");
23
+ var $b51fc2992648966b$exports = require("./pt-BR.main.js");
24
+ var $6abbc540dcd5f78c$exports = require("./pt-PT.main.js");
25
+ var $6cbc0c9bf574473b$exports = require("./ro-RO.main.js");
26
+ var $009edbe58be6525b$exports = require("./ru-RU.main.js");
27
+ var $01cf6095489e78f7$exports = require("./sk-SK.main.js");
28
+ var $33fd5a1a3753e83f$exports = require("./sl-SI.main.js");
29
+ var $6b9373a558e74e84$exports = require("./sr-SP.main.js");
30
+ var $90008194c3db7fce$exports = require("./sv-SE.main.js");
31
+ var $e29d21290b4ce15c$exports = require("./tr-TR.main.js");
32
+ var $96139c59e8ba3f85$exports = require("./uk-UA.main.js");
33
+ var $052554192ea8e826$exports = require("./zh-CN.main.js");
34
+ var $3f3b5d798a5abdbc$exports = require("./zh-TW.main.js");
1
35
  var $6Zb2x$react = require("react");
2
36
  var $6Zb2x$reactariautils = require("@react-aria/utils");
3
37
  var $6Zb2x$reactariai18n = require("@react-aria/i18n");
@@ -551,7 +585,7 @@ function $82711f9cb668ecdb$export$ea8f71083e90600f(props, ref) {
551
585
  isOpen,
552
586
  ref
553
587
  ]);
554
- // Only hide the overlay when it is the topmost visible overlay in the stack.
588
+ // Only hide the overlay when it is the topmost visible overlay in the stack
555
589
  let onHide = ()=>{
556
590
  if ($82711f9cb668ecdb$var$visibleOverlays[$82711f9cb668ecdb$var$visibleOverlays.length - 1] === ref && onClose) onClose();
557
591
  };
@@ -726,8 +760,9 @@ function $5c2f5cd01815d369$var$preventScrollStandard() {
726
760
  //
727
761
  // 1. Prevent default on `touchmove` events that are not in a scrollable element. This prevents touch scrolling
728
762
  // on the window.
729
- // 2. Prevent default on `touchmove` events inside a scrollable element when the scroll position is at the
730
- // top or bottom. This avoids the whole page scrolling instead, but does prevent overscrolling.
763
+ // 2. Set `overscroll-behavior: contain` on nested scrollable regions so they do not scroll the page when at
764
+ // the top or bottom. Work around a bug where this does not work when the element does not actually overflow
765
+ // by preventing default in a `touchmove` event.
731
766
  // 3. Prevent default on `touchend` events on input elements and handle focusing the element ourselves.
732
767
  // 4. When focusing an input, apply a transform to trick Safari into thinking the input is at the top
733
768
  // of the page, which prevents it from scrolling the page. After the input is focused, scroll the element
@@ -739,12 +774,15 @@ function $5c2f5cd01815d369$var$preventScrollStandard() {
739
774
  // to navigate to an input with the next/previous buttons that's outside a modal.
740
775
  function $5c2f5cd01815d369$var$preventScrollMobileSafari() {
741
776
  let scrollable;
742
- let lastY = 0;
777
+ let restoreScrollableStyles;
743
778
  let onTouchStart = (e)=>{
744
779
  // Store the nearest scrollable parent element from the element that the user touched.
745
- scrollable = (0, $6Zb2x$reactariautils.getScrollParent)(e.target);
780
+ scrollable = (0, $6Zb2x$reactariautils.getScrollParent)(e.target, true);
746
781
  if (scrollable === document.documentElement && scrollable === document.body) return;
747
- lastY = e.changedTouches[0].pageY;
782
+ // Prevent scrolling up when at the top and scrolling down when at the bottom
783
+ // of a nested scrollable area, otherwise mobile Safari will start scrolling
784
+ // the window instead.
785
+ if (scrollable instanceof HTMLElement && window.getComputedStyle(scrollable).overscrollBehavior === "auto") restoreScrollableStyles = $5c2f5cd01815d369$var$setStyle(scrollable, "overscrollBehavior", "contain");
748
786
  };
749
787
  let onTouchMove = (e)=>{
750
788
  // Prevent scrolling the window.
@@ -752,22 +790,20 @@ function $5c2f5cd01815d369$var$preventScrollMobileSafari() {
752
790
  e.preventDefault();
753
791
  return;
754
792
  }
755
- // Prevent scrolling up when at the top and scrolling down when at the bottom
756
- // of a nested scrollable area, otherwise mobile Safari will start scrolling
757
- // the window instead. Unfortunately, this disables bounce scrolling when at
758
- // the top but it's the best we can do.
759
- let y = e.changedTouches[0].pageY;
760
- let scrollTop = scrollable.scrollTop;
761
- let bottom = scrollable.scrollHeight - scrollable.clientHeight;
762
- if (bottom === 0) return;
763
- if (scrollTop <= 0 && y > lastY || scrollTop >= bottom && y < lastY) e.preventDefault();
764
- lastY = y;
793
+ // overscroll-behavior should prevent scroll chaining, but currently does not
794
+ // if the element doesn't actually overflow. https://bugs.webkit.org/show_bug.cgi?id=243452
795
+ // This checks that both the width and height do not overflow, otherwise we might
796
+ // block horizontal scrolling too. In that case, adding `touch-action: pan-x` to
797
+ // the element will prevent vertical page scrolling. We can't add that automatically
798
+ // because it must be set before the touchstart event.
799
+ if (scrollable.scrollHeight === scrollable.clientHeight && scrollable.scrollWidth === scrollable.clientWidth) e.preventDefault();
765
800
  };
766
801
  let onTouchEnd = (e)=>{
767
802
  let target = e.target;
768
803
  // Apply this change if we're not already focused on the target element
769
804
  if ($5c2f5cd01815d369$var$willOpenKeyboard(target) && target !== document.activeElement) {
770
805
  e.preventDefault();
806
+ setupStyles();
771
807
  // Apply a transform to trick Safari into thinking the input is at the top of the page
772
808
  // so it doesn't try to scroll it into view. When tapping on an input, this needs to
773
809
  // be done before the "focus" event, so we have to focus the element ourselves.
@@ -777,10 +813,12 @@ function $5c2f5cd01815d369$var$preventScrollMobileSafari() {
777
813
  target.style.transform = "";
778
814
  });
779
815
  }
816
+ if (restoreScrollableStyles) restoreScrollableStyles();
780
817
  };
781
818
  let onFocus = (e)=>{
782
819
  let target = e.target;
783
820
  if ($5c2f5cd01815d369$var$willOpenKeyboard(target)) {
821
+ setupStyles();
784
822
  // Transform also needs to be applied in the focus event in cases where focus moves
785
823
  // other than tapping on an input directly, e.g. the next/previous buttons in the
786
824
  // software keyboard. In these cases, it seems applying the transform in the focus event
@@ -805,19 +843,25 @@ function $5c2f5cd01815d369$var$preventScrollMobileSafari() {
805
843
  });
806
844
  }
807
845
  };
808
- let onWindowScroll = ()=>{
809
- // Last resort. If the window scrolled, scroll it back to the top.
810
- // It should always be at the top because the body will have a negative margin (see below).
846
+ let restoreStyles = null;
847
+ let setupStyles = ()=>{
848
+ if (restoreStyles) return;
849
+ let onWindowScroll = ()=>{
850
+ // Last resort. If the window scrolled, scroll it back to the top.
851
+ // It should always be at the top because the body will have a negative margin (see below).
852
+ window.scrollTo(0, 0);
853
+ };
854
+ // Record the original scroll position so we can restore it.
855
+ // Then apply a negative margin to the body to offset it by the scroll position. This will
856
+ // enable us to scroll the window to the top, which is required for the rest of this to work.
857
+ let scrollX = window.pageXOffset;
858
+ let scrollY = window.pageYOffset;
859
+ restoreStyles = (0, $6Zb2x$reactariautils.chain)($5c2f5cd01815d369$var$addEvent(window, "scroll", onWindowScroll), $5c2f5cd01815d369$var$setStyle(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`), $5c2f5cd01815d369$var$setStyle(document.documentElement, "overflow", "hidden"), $5c2f5cd01815d369$var$setStyle(document.body, "marginTop", `-${scrollY}px`), ()=>{
860
+ window.scrollTo(scrollX, scrollY);
861
+ });
862
+ // Scroll to the top. The negative margin on the body will make this appear the same.
811
863
  window.scrollTo(0, 0);
812
864
  };
813
- // Record the original scroll position so we can restore it.
814
- // Then apply a negative margin to the body to offset it by the scroll position. This will
815
- // enable us to scroll the window to the top, which is required for the rest of this to work.
816
- let scrollX = window.pageXOffset;
817
- let scrollY = window.pageYOffset;
818
- let restoreStyles = (0, $6Zb2x$reactariautils.chain)($5c2f5cd01815d369$var$setStyle(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`), $5c2f5cd01815d369$var$setStyle(document.documentElement, "overflow", "hidden"), $5c2f5cd01815d369$var$setStyle(document.body, "marginTop", `-${scrollY}px`));
819
- // Scroll to the top. The negative margin on the body will make this appear the same.
820
- window.scrollTo(0, 0);
821
865
  let removeEvents = (0, $6Zb2x$reactariautils.chain)($5c2f5cd01815d369$var$addEvent(document, "touchstart", onTouchStart, {
822
866
  passive: false,
823
867
  capture: true
@@ -827,12 +871,12 @@ function $5c2f5cd01815d369$var$preventScrollMobileSafari() {
827
871
  }), $5c2f5cd01815d369$var$addEvent(document, "touchend", onTouchEnd, {
828
872
  passive: false,
829
873
  capture: true
830
- }), $5c2f5cd01815d369$var$addEvent(document, "focus", onFocus, true), $5c2f5cd01815d369$var$addEvent(window, "scroll", onWindowScroll));
874
+ }), $5c2f5cd01815d369$var$addEvent(document, "focus", onFocus, true));
831
875
  return ()=>{
832
876
  // Restore styles and scroll the page back to where it was.
833
- restoreStyles();
877
+ restoreScrollableStyles === null || restoreScrollableStyles === void 0 ? void 0 : restoreScrollableStyles();
878
+ restoreStyles === null || restoreStyles === void 0 ? void 0 : restoreStyles();
834
879
  removeEvents();
835
- window.scrollTo(scrollX, scrollY);
836
880
  };
837
881
  }
838
882
  // Sets a CSS property on an element, and returns a function to revert it to the previous value.
@@ -974,208 +1018,38 @@ function $0775ea8ea6a0565e$export$33ffd74ebf07f060(options) {
974
1018
  * OF ANY KIND, either express or implied. See the License for the specific language
975
1019
  * governing permissions and limitations under the License.
976
1020
  */ var $90f032faf016e1fb$exports = {};
977
- var $4393d9b86d3ad278$exports = {};
978
- $4393d9b86d3ad278$exports = {
979
- "dismiss": `\u{62A}\u{62C}\u{627}\u{647}\u{644}`
980
- };
981
-
982
-
983
- var $254224013ae06959$exports = {};
984
- $254224013ae06959$exports = {
985
- "dismiss": `\u{41E}\u{442}\u{445}\u{432}\u{44A}\u{440}\u{43B}\u{44F}\u{43D}\u{435}`
986
- };
987
-
988
-
989
- var $55d3567b59d09782$exports = {};
990
- $55d3567b59d09782$exports = {
991
- "dismiss": `Odstranit`
992
- };
993
-
994
-
995
- var $0e419a7be7773c16$exports = {};
996
- $0e419a7be7773c16$exports = {
997
- "dismiss": `Luk`
998
- };
999
-
1000
-
1001
- var $be606513c8356c34$exports = {};
1002
- $be606513c8356c34$exports = {
1003
- "dismiss": `Schlie\xdfen`
1004
- };
1005
1021
 
1006
1022
 
1007
- var $7d99787e5bd26f87$exports = {};
1008
- $7d99787e5bd26f87$exports = {
1009
- "dismiss": `\u{391}\u{3C0}\u{3CC}\u{3C1}\u{3C1}\u{3B9}\u{3C8}\u{3B7}`
1010
- };
1011
1023
 
1012
1024
 
1013
- var $0360f2a6534752c1$exports = {};
1014
- $0360f2a6534752c1$exports = {
1015
- "dismiss": `Dismiss`
1016
- };
1017
1025
 
1018
1026
 
1019
- var $92bf4fdecfeb6a61$exports = {};
1020
- $92bf4fdecfeb6a61$exports = {
1021
- "dismiss": `Descartar`
1022
- };
1023
1027
 
1024
1028
 
1025
- var $7c02fa9b9c598043$exports = {};
1026
- $7c02fa9b9c598043$exports = {
1027
- "dismiss": `L\xf5peta`
1028
- };
1029
1029
 
1030
1030
 
1031
- var $ba53535dcca59343$exports = {};
1032
- $ba53535dcca59343$exports = {
1033
- "dismiss": `Hylk\xe4\xe4`
1034
- };
1035
1031
 
1036
1032
 
1037
- var $2fbbcddf7d252cb7$exports = {};
1038
- $2fbbcddf7d252cb7$exports = {
1039
- "dismiss": `Rejeter`
1040
- };
1041
1033
 
1042
1034
 
1043
- var $0a1f0520e07d3596$exports = {};
1044
- $0a1f0520e07d3596$exports = {
1045
- "dismiss": `\u{5D4}\u{5EA}\u{5E2}\u{5DC}\u{5DD}`
1046
- };
1047
1035
 
1048
1036
 
1049
- var $f7be5df1487823a9$exports = {};
1050
- $f7be5df1487823a9$exports = {
1051
- "dismiss": `Odbaci`
1052
- };
1053
1037
 
1054
1038
 
1055
- var $8dbe4363bfbba3f9$exports = {};
1056
- $8dbe4363bfbba3f9$exports = {
1057
- "dismiss": `Elutas\xedt\xe1s`
1058
- };
1059
1039
 
1060
1040
 
1061
- var $90a445da1ad273e7$exports = {};
1062
- $90a445da1ad273e7$exports = {
1063
- "dismiss": `Ignora`
1064
- };
1065
1041
 
1066
1042
 
1067
- var $e1ebf18259c9b1ee$exports = {};
1068
- $e1ebf18259c9b1ee$exports = {
1069
- "dismiss": `\u{9589}\u{3058}\u{308B}`
1070
- };
1071
1043
 
1072
1044
 
1073
- var $765893642f3b4f72$exports = {};
1074
- $765893642f3b4f72$exports = {
1075
- "dismiss": `\u{BB34}\u{C2DC}`
1076
- };
1077
1045
 
1078
1046
 
1079
- var $af73ba24f63febd1$exports = {};
1080
- $af73ba24f63febd1$exports = {
1081
- "dismiss": `Atmesti`
1082
- };
1083
1047
 
1084
1048
 
1085
- var $97aac9f6740ee412$exports = {};
1086
- $97aac9f6740ee412$exports = {
1087
- "dismiss": `Ner\u{101}d\u{12B}t`
1088
- };
1089
1049
 
1090
1050
 
1091
- var $92fbe76e196d7e0a$exports = {};
1092
- $92fbe76e196d7e0a$exports = {
1093
- "dismiss": `Lukk`
1094
- };
1095
1051
 
1096
1052
 
1097
- var $44399897afb701ce$exports = {};
1098
- $44399897afb701ce$exports = {
1099
- "dismiss": `Negeren`
1100
- };
1101
-
1102
-
1103
- var $d679e258664d7384$exports = {};
1104
- $d679e258664d7384$exports = {
1105
- "dismiss": `Zignoruj`
1106
- };
1107
-
1108
-
1109
- var $b51fc2992648966b$exports = {};
1110
- $b51fc2992648966b$exports = {
1111
- "dismiss": `Descartar`
1112
- };
1113
-
1114
-
1115
- var $6abbc540dcd5f78c$exports = {};
1116
- $6abbc540dcd5f78c$exports = {
1117
- "dismiss": `Dispensar`
1118
- };
1119
-
1120
-
1121
- var $6cbc0c9bf574473b$exports = {};
1122
- $6cbc0c9bf574473b$exports = {
1123
- "dismiss": `Revocare`
1124
- };
1125
-
1126
-
1127
- var $009edbe58be6525b$exports = {};
1128
- $009edbe58be6525b$exports = {
1129
- "dismiss": `\u{41F}\u{440}\u{43E}\u{43F}\u{443}\u{441}\u{442}\u{438}\u{442}\u{44C}`
1130
- };
1131
-
1132
-
1133
- var $01cf6095489e78f7$exports = {};
1134
- $01cf6095489e78f7$exports = {
1135
- "dismiss": `Zru\u{161}i\u{165}`
1136
- };
1137
-
1138
-
1139
- var $33fd5a1a3753e83f$exports = {};
1140
- $33fd5a1a3753e83f$exports = {
1141
- "dismiss": `Opusti`
1142
- };
1143
-
1144
-
1145
- var $6b9373a558e74e84$exports = {};
1146
- $6b9373a558e74e84$exports = {
1147
- "dismiss": `Odbaci`
1148
- };
1149
-
1150
-
1151
- var $90008194c3db7fce$exports = {};
1152
- $90008194c3db7fce$exports = {
1153
- "dismiss": `Avvisa`
1154
- };
1155
-
1156
-
1157
- var $e29d21290b4ce15c$exports = {};
1158
- $e29d21290b4ce15c$exports = {
1159
- "dismiss": `Kapat`
1160
- };
1161
-
1162
-
1163
- var $96139c59e8ba3f85$exports = {};
1164
- $96139c59e8ba3f85$exports = {
1165
- "dismiss": `\u{421}\u{43A}\u{430}\u{441}\u{443}\u{432}\u{430}\u{442}\u{438}`
1166
- };
1167
-
1168
-
1169
- var $052554192ea8e826$exports = {};
1170
- $052554192ea8e826$exports = {
1171
- "dismiss": `\u{53D6}\u{6D88}`
1172
- };
1173
-
1174
-
1175
- var $3f3b5d798a5abdbc$exports = {};
1176
- $3f3b5d798a5abdbc$exports = {
1177
- "dismiss": `\u{95DC}\u{9589}`
1178
- };
1179
1053
 
1180
1054
 
1181
1055
  $90f032faf016e1fb$exports = {
@@ -1222,7 +1096,7 @@ $90f032faf016e1fb$exports = {
1222
1096
 
1223
1097
  function $f69bb3e6457495cc$export$2317d149ed6f78c4(props) {
1224
1098
  let { onDismiss: onDismiss, ...otherProps } = props;
1225
- let stringFormatter = (0, $6Zb2x$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($90f032faf016e1fb$exports))));
1099
+ let stringFormatter = (0, $6Zb2x$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($90f032faf016e1fb$exports))), "@react-aria/overlays");
1226
1100
  let labels = (0, $6Zb2x$reactariautils.useLabels)(otherProps, stringFormatter.format("dismiss"));
1227
1101
  let onClick = ()=>{
1228
1102
  if (onDismiss) onDismiss();
@@ -1230,7 +1104,11 @@ function $f69bb3e6457495cc$export$2317d149ed6f78c4(props) {
1230
1104
  return /*#__PURE__*/ (0, ($parcel$interopDefault($6Zb2x$react))).createElement((0, $6Zb2x$reactariavisuallyhidden.VisuallyHidden), null, /*#__PURE__*/ (0, ($parcel$interopDefault($6Zb2x$react))).createElement("button", {
1231
1105
  ...labels,
1232
1106
  tabIndex: -1,
1233
- onClick: onClick
1107
+ onClick: onClick,
1108
+ style: {
1109
+ width: 1,
1110
+ height: 1
1111
+ }
1234
1112
  }));
1235
1113
  }
1236
1114
 
@@ -1365,23 +1243,24 @@ function $08ef1685902b6011$export$1c3ebcada18427bf(targets, root = document.body
1365
1243
 
1366
1244
 
1367
1245
  function $6c2dfcdee3e15e20$export$542a6fd13ac93354(props, state) {
1368
- let { triggerRef: triggerRef, popoverRef: popoverRef, isNonModal: isNonModal, isKeyboardDismissDisabled: isKeyboardDismissDisabled, ...otherProps } = props;
1246
+ let { triggerRef: triggerRef, popoverRef: popoverRef, isNonModal: isNonModal, isKeyboardDismissDisabled: isKeyboardDismissDisabled, shouldCloseOnInteractOutside: shouldCloseOnInteractOutside, ...otherProps } = props;
1369
1247
  let { overlayProps: overlayProps, underlayProps: underlayProps } = (0, $82711f9cb668ecdb$export$ea8f71083e90600f)({
1370
1248
  isOpen: state.isOpen,
1371
1249
  onClose: state.close,
1372
1250
  shouldCloseOnBlur: true,
1373
1251
  isDismissable: !isNonModal,
1374
- isKeyboardDismissDisabled: isKeyboardDismissDisabled
1252
+ isKeyboardDismissDisabled: isKeyboardDismissDisabled,
1253
+ shouldCloseOnInteractOutside: shouldCloseOnInteractOutside
1375
1254
  }, popoverRef);
1376
1255
  let { overlayProps: positionProps, arrowProps: arrowProps, placement: placement } = (0, $cd94b4896dd97759$export$d39e1813b3bdd0e1)({
1377
1256
  ...otherProps,
1378
1257
  targetRef: triggerRef,
1379
1258
  overlayRef: popoverRef,
1380
1259
  isOpen: state.isOpen,
1381
- onClose: null
1260
+ onClose: isNonModal ? state.close : null
1382
1261
  });
1383
1262
  (0, $5c2f5cd01815d369$export$ee0f7cc6afcd1c18)({
1384
- isDisabled: isNonModal
1263
+ isDisabled: isNonModal || !state.isOpen
1385
1264
  });
1386
1265
  (0, $6Zb2x$reactariautils.useLayoutEffect)(()=>{
1387
1266
  if (state.isOpen && !isNonModal && popoverRef.current) return (0, $08ef1685902b6011$export$1c3ebcada18427bf)([