@react-aria/overlays 3.18.1 → 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 +87 -207
  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 +88 -207
  98. package/dist/main.js.map +1 -1
  99. package/dist/module.js +87 -207
  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 +12 -12
  179. package/src/DismissButton.tsx +3 -2
  180. package/src/useOverlay.ts +5 -5
  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");
@@ -7,9 +41,11 @@ var $6Zb2x$reactdom = require("react-dom");
7
41
  var $6Zb2x$reactariassr = require("@react-aria/ssr");
8
42
  var $6Zb2x$reactariavisuallyhidden = require("@react-aria/visually-hidden");
9
43
 
44
+
10
45
  function $parcel$export(e, n, v, s) {
11
46
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
12
47
  }
48
+
13
49
  function $parcel$interopDefault(a) {
14
50
  return a && a.__esModule ? a.default : a;
15
51
  }
@@ -549,7 +585,7 @@ function $82711f9cb668ecdb$export$ea8f71083e90600f(props, ref) {
549
585
  isOpen,
550
586
  ref
551
587
  ]);
552
- // 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
553
589
  let onHide = ()=>{
554
590
  if ($82711f9cb668ecdb$var$visibleOverlays[$82711f9cb668ecdb$var$visibleOverlays.length - 1] === ref && onClose) onClose();
555
591
  };
@@ -581,7 +617,7 @@ function $82711f9cb668ecdb$export$ea8f71083e90600f(props, ref) {
581
617
  // Handle clicking outside the overlay to close it
582
618
  (0, $6Zb2x$reactariainteractions.useInteractOutside)({
583
619
  ref: ref,
584
- onInteractOutside: isDismissable ? onInteractOutside : null,
620
+ onInteractOutside: isDismissable && isOpen ? onInteractOutside : null,
585
621
  onInteractOutsideStart: onInteractOutsideStart
586
622
  });
587
623
  let { focusWithinProps: focusWithinProps } = (0, $6Zb2x$reactariainteractions.useFocusWithin)({
@@ -724,8 +760,9 @@ function $5c2f5cd01815d369$var$preventScrollStandard() {
724
760
  //
725
761
  // 1. Prevent default on `touchmove` events that are not in a scrollable element. This prevents touch scrolling
726
762
  // on the window.
727
- // 2. Prevent default on `touchmove` events inside a scrollable element when the scroll position is at the
728
- // 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.
729
766
  // 3. Prevent default on `touchend` events on input elements and handle focusing the element ourselves.
730
767
  // 4. When focusing an input, apply a transform to trick Safari into thinking the input is at the top
731
768
  // of the page, which prevents it from scrolling the page. After the input is focused, scroll the element
@@ -737,12 +774,15 @@ function $5c2f5cd01815d369$var$preventScrollStandard() {
737
774
  // to navigate to an input with the next/previous buttons that's outside a modal.
738
775
  function $5c2f5cd01815d369$var$preventScrollMobileSafari() {
739
776
  let scrollable;
740
- let lastY = 0;
777
+ let restoreScrollableStyles;
741
778
  let onTouchStart = (e)=>{
742
779
  // Store the nearest scrollable parent element from the element that the user touched.
743
- scrollable = (0, $6Zb2x$reactariautils.getScrollParent)(e.target);
780
+ scrollable = (0, $6Zb2x$reactariautils.getScrollParent)(e.target, true);
744
781
  if (scrollable === document.documentElement && scrollable === document.body) return;
745
- 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");
746
786
  };
747
787
  let onTouchMove = (e)=>{
748
788
  // Prevent scrolling the window.
@@ -750,22 +790,20 @@ function $5c2f5cd01815d369$var$preventScrollMobileSafari() {
750
790
  e.preventDefault();
751
791
  return;
752
792
  }
753
- // Prevent scrolling up when at the top and scrolling down when at the bottom
754
- // of a nested scrollable area, otherwise mobile Safari will start scrolling
755
- // the window instead. Unfortunately, this disables bounce scrolling when at
756
- // the top but it's the best we can do.
757
- let y = e.changedTouches[0].pageY;
758
- let scrollTop = scrollable.scrollTop;
759
- let bottom = scrollable.scrollHeight - scrollable.clientHeight;
760
- if (bottom === 0) return;
761
- if (scrollTop <= 0 && y > lastY || scrollTop >= bottom && y < lastY) e.preventDefault();
762
- 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();
763
800
  };
764
801
  let onTouchEnd = (e)=>{
765
802
  let target = e.target;
766
803
  // Apply this change if we're not already focused on the target element
767
804
  if ($5c2f5cd01815d369$var$willOpenKeyboard(target) && target !== document.activeElement) {
768
805
  e.preventDefault();
806
+ setupStyles();
769
807
  // Apply a transform to trick Safari into thinking the input is at the top of the page
770
808
  // so it doesn't try to scroll it into view. When tapping on an input, this needs to
771
809
  // be done before the "focus" event, so we have to focus the element ourselves.
@@ -775,10 +813,12 @@ function $5c2f5cd01815d369$var$preventScrollMobileSafari() {
775
813
  target.style.transform = "";
776
814
  });
777
815
  }
816
+ if (restoreScrollableStyles) restoreScrollableStyles();
778
817
  };
779
818
  let onFocus = (e)=>{
780
819
  let target = e.target;
781
820
  if ($5c2f5cd01815d369$var$willOpenKeyboard(target)) {
821
+ setupStyles();
782
822
  // Transform also needs to be applied in the focus event in cases where focus moves
783
823
  // other than tapping on an input directly, e.g. the next/previous buttons in the
784
824
  // software keyboard. In these cases, it seems applying the transform in the focus event
@@ -803,19 +843,25 @@ function $5c2f5cd01815d369$var$preventScrollMobileSafari() {
803
843
  });
804
844
  }
805
845
  };
806
- let onWindowScroll = ()=>{
807
- // Last resort. If the window scrolled, scroll it back to the top.
808
- // 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.
809
863
  window.scrollTo(0, 0);
810
864
  };
811
- // Record the original scroll position so we can restore it.
812
- // Then apply a negative margin to the body to offset it by the scroll position. This will
813
- // enable us to scroll the window to the top, which is required for the rest of this to work.
814
- let scrollX = window.pageXOffset;
815
- let scrollY = window.pageYOffset;
816
- 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`));
817
- // Scroll to the top. The negative margin on the body will make this appear the same.
818
- window.scrollTo(0, 0);
819
865
  let removeEvents = (0, $6Zb2x$reactariautils.chain)($5c2f5cd01815d369$var$addEvent(document, "touchstart", onTouchStart, {
820
866
  passive: false,
821
867
  capture: true
@@ -825,12 +871,12 @@ function $5c2f5cd01815d369$var$preventScrollMobileSafari() {
825
871
  }), $5c2f5cd01815d369$var$addEvent(document, "touchend", onTouchEnd, {
826
872
  passive: false,
827
873
  capture: true
828
- }), $5c2f5cd01815d369$var$addEvent(document, "focus", onFocus, true), $5c2f5cd01815d369$var$addEvent(window, "scroll", onWindowScroll));
874
+ }), $5c2f5cd01815d369$var$addEvent(document, "focus", onFocus, true));
829
875
  return ()=>{
830
876
  // Restore styles and scroll the page back to where it was.
831
- restoreStyles();
877
+ restoreScrollableStyles === null || restoreScrollableStyles === void 0 ? void 0 : restoreScrollableStyles();
878
+ restoreStyles === null || restoreStyles === void 0 ? void 0 : restoreStyles();
832
879
  removeEvents();
833
- window.scrollTo(scrollX, scrollY);
834
880
  };
835
881
  }
836
882
  // Sets a CSS property on an element, and returns a function to revert it to the previous value.
@@ -972,209 +1018,39 @@ function $0775ea8ea6a0565e$export$33ffd74ebf07f060(options) {
972
1018
  * OF ANY KIND, either express or implied. See the License for the specific language
973
1019
  * governing permissions and limitations under the License.
974
1020
  */ var $90f032faf016e1fb$exports = {};
975
- var $4393d9b86d3ad278$exports = {};
976
- $4393d9b86d3ad278$exports = {
977
- "dismiss": `تجاهل`
978
- };
979
1021
 
980
1022
 
981
- var $254224013ae06959$exports = {};
982
- $254224013ae06959$exports = {
983
- "dismiss": `Отхвърляне`
984
- };
985
1023
 
986
1024
 
987
- var $55d3567b59d09782$exports = {};
988
- $55d3567b59d09782$exports = {
989
- "dismiss": `Odstranit`
990
- };
991
1025
 
992
1026
 
993
- var $0e419a7be7773c16$exports = {};
994
- $0e419a7be7773c16$exports = {
995
- "dismiss": `Luk`
996
- };
997
1027
 
998
1028
 
999
- var $be606513c8356c34$exports = {};
1000
- $be606513c8356c34$exports = {
1001
- "dismiss": `Schließen`
1002
- };
1003
1029
 
1004
1030
 
1005
- var $7d99787e5bd26f87$exports = {};
1006
- $7d99787e5bd26f87$exports = {
1007
- "dismiss": `Απόρριψη`
1008
- };
1009
1031
 
1010
1032
 
1011
- var $0360f2a6534752c1$exports = {};
1012
- $0360f2a6534752c1$exports = {
1013
- "dismiss": `Dismiss`
1014
- };
1015
1033
 
1016
1034
 
1017
- var $92bf4fdecfeb6a61$exports = {};
1018
- $92bf4fdecfeb6a61$exports = {
1019
- "dismiss": `Descartar`
1020
- };
1021
1035
 
1022
1036
 
1023
- var $7c02fa9b9c598043$exports = {};
1024
- $7c02fa9b9c598043$exports = {
1025
- "dismiss": `Lõpeta`
1026
- };
1027
1037
 
1028
1038
 
1029
- var $ba53535dcca59343$exports = {};
1030
- $ba53535dcca59343$exports = {
1031
- "dismiss": `Hylkää`
1032
- };
1033
1039
 
1034
1040
 
1035
- var $2fbbcddf7d252cb7$exports = {};
1036
- $2fbbcddf7d252cb7$exports = {
1037
- "dismiss": `Rejeter`
1038
- };
1039
1041
 
1040
1042
 
1041
- var $0a1f0520e07d3596$exports = {};
1042
- $0a1f0520e07d3596$exports = {
1043
- "dismiss": `התעלם`
1044
- };
1045
1043
 
1046
1044
 
1047
- var $f7be5df1487823a9$exports = {};
1048
- $f7be5df1487823a9$exports = {
1049
- "dismiss": `Odbaci`
1050
- };
1051
-
1052
-
1053
- var $8dbe4363bfbba3f9$exports = {};
1054
- $8dbe4363bfbba3f9$exports = {
1055
- "dismiss": `Elutasítás`
1056
- };
1057
-
1058
1045
 
1059
- var $90a445da1ad273e7$exports = {};
1060
- $90a445da1ad273e7$exports = {
1061
- "dismiss": `Ignora`
1062
- };
1063
1046
 
1064
1047
 
1065
- var $e1ebf18259c9b1ee$exports = {};
1066
- $e1ebf18259c9b1ee$exports = {
1067
- "dismiss": `閉じる`
1068
- };
1069
1048
 
1070
1049
 
1071
- var $765893642f3b4f72$exports = {};
1072
- $765893642f3b4f72$exports = {
1073
- "dismiss": `무시`
1074
- };
1075
1050
 
1076
1051
 
1077
- var $af73ba24f63febd1$exports = {};
1078
- $af73ba24f63febd1$exports = {
1079
- "dismiss": `Atmesti`
1080
- };
1081
1052
 
1082
1053
 
1083
- var $97aac9f6740ee412$exports = {};
1084
- $97aac9f6740ee412$exports = {
1085
- "dismiss": `Nerādīt`
1086
- };
1087
-
1088
-
1089
- var $92fbe76e196d7e0a$exports = {};
1090
- $92fbe76e196d7e0a$exports = {
1091
- "dismiss": `Lukk`
1092
- };
1093
-
1094
-
1095
- var $44399897afb701ce$exports = {};
1096
- $44399897afb701ce$exports = {
1097
- "dismiss": `Negeren`
1098
- };
1099
-
1100
-
1101
- var $d679e258664d7384$exports = {};
1102
- $d679e258664d7384$exports = {
1103
- "dismiss": `Zignoruj`
1104
- };
1105
-
1106
-
1107
- var $b51fc2992648966b$exports = {};
1108
- $b51fc2992648966b$exports = {
1109
- "dismiss": `Descartar`
1110
- };
1111
-
1112
-
1113
- var $6abbc540dcd5f78c$exports = {};
1114
- $6abbc540dcd5f78c$exports = {
1115
- "dismiss": `Dispensar`
1116
- };
1117
-
1118
-
1119
- var $6cbc0c9bf574473b$exports = {};
1120
- $6cbc0c9bf574473b$exports = {
1121
- "dismiss": `Revocare`
1122
- };
1123
-
1124
-
1125
- var $009edbe58be6525b$exports = {};
1126
- $009edbe58be6525b$exports = {
1127
- "dismiss": `Пропустить`
1128
- };
1129
-
1130
-
1131
- var $01cf6095489e78f7$exports = {};
1132
- $01cf6095489e78f7$exports = {
1133
- "dismiss": `Zrušiť`
1134
- };
1135
-
1136
-
1137
- var $33fd5a1a3753e83f$exports = {};
1138
- $33fd5a1a3753e83f$exports = {
1139
- "dismiss": `Opusti`
1140
- };
1141
-
1142
-
1143
- var $6b9373a558e74e84$exports = {};
1144
- $6b9373a558e74e84$exports = {
1145
- "dismiss": `Odbaci`
1146
- };
1147
-
1148
-
1149
- var $90008194c3db7fce$exports = {};
1150
- $90008194c3db7fce$exports = {
1151
- "dismiss": `Avvisa`
1152
- };
1153
-
1154
-
1155
- var $e29d21290b4ce15c$exports = {};
1156
- $e29d21290b4ce15c$exports = {
1157
- "dismiss": `Kapat`
1158
- };
1159
-
1160
-
1161
- var $96139c59e8ba3f85$exports = {};
1162
- $96139c59e8ba3f85$exports = {
1163
- "dismiss": `Скасувати`
1164
- };
1165
-
1166
-
1167
- var $052554192ea8e826$exports = {};
1168
- $052554192ea8e826$exports = {
1169
- "dismiss": `取消`
1170
- };
1171
-
1172
-
1173
- var $3f3b5d798a5abdbc$exports = {};
1174
- $3f3b5d798a5abdbc$exports = {
1175
- "dismiss": `關閉`
1176
- };
1177
-
1178
1054
 
1179
1055
  $90f032faf016e1fb$exports = {
1180
1056
  "ar-AE": $4393d9b86d3ad278$exports,
@@ -1220,7 +1096,7 @@ $90f032faf016e1fb$exports = {
1220
1096
 
1221
1097
  function $f69bb3e6457495cc$export$2317d149ed6f78c4(props) {
1222
1098
  let { onDismiss: onDismiss, ...otherProps } = props;
1223
- 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");
1224
1100
  let labels = (0, $6Zb2x$reactariautils.useLabels)(otherProps, stringFormatter.format("dismiss"));
1225
1101
  let onClick = ()=>{
1226
1102
  if (onDismiss) onDismiss();
@@ -1228,7 +1104,11 @@ function $f69bb3e6457495cc$export$2317d149ed6f78c4(props) {
1228
1104
  return /*#__PURE__*/ (0, ($parcel$interopDefault($6Zb2x$react))).createElement((0, $6Zb2x$reactariavisuallyhidden.VisuallyHidden), null, /*#__PURE__*/ (0, ($parcel$interopDefault($6Zb2x$react))).createElement("button", {
1229
1105
  ...labels,
1230
1106
  tabIndex: -1,
1231
- onClick: onClick
1107
+ onClick: onClick,
1108
+ style: {
1109
+ width: 1,
1110
+ height: 1
1111
+ }
1232
1112
  }));
1233
1113
  }
1234
1114
 
@@ -1363,23 +1243,24 @@ function $08ef1685902b6011$export$1c3ebcada18427bf(targets, root = document.body
1363
1243
 
1364
1244
 
1365
1245
  function $6c2dfcdee3e15e20$export$542a6fd13ac93354(props, state) {
1366
- 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;
1367
1247
  let { overlayProps: overlayProps, underlayProps: underlayProps } = (0, $82711f9cb668ecdb$export$ea8f71083e90600f)({
1368
1248
  isOpen: state.isOpen,
1369
1249
  onClose: state.close,
1370
1250
  shouldCloseOnBlur: true,
1371
1251
  isDismissable: !isNonModal,
1372
- isKeyboardDismissDisabled: isKeyboardDismissDisabled
1252
+ isKeyboardDismissDisabled: isKeyboardDismissDisabled,
1253
+ shouldCloseOnInteractOutside: shouldCloseOnInteractOutside
1373
1254
  }, popoverRef);
1374
1255
  let { overlayProps: positionProps, arrowProps: arrowProps, placement: placement } = (0, $cd94b4896dd97759$export$d39e1813b3bdd0e1)({
1375
1256
  ...otherProps,
1376
1257
  targetRef: triggerRef,
1377
1258
  overlayRef: popoverRef,
1378
1259
  isOpen: state.isOpen,
1379
- onClose: null
1260
+ onClose: isNonModal ? state.close : null
1380
1261
  });
1381
1262
  (0, $5c2f5cd01815d369$export$ee0f7cc6afcd1c18)({
1382
- isDisabled: isNonModal
1263
+ isDisabled: isNonModal || !state.isOpen
1383
1264
  });
1384
1265
  (0, $6Zb2x$reactariautils.useLayoutEffect)(()=>{
1385
1266
  if (state.isOpen && !isNonModal && popoverRef.current) return (0, $08ef1685902b6011$export$1c3ebcada18427bf)([