@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/import.mjs CHANGED
@@ -1,3 +1,37 @@
1
+ import $773d5888b972f1cf$exports from "./ar-AE.mjs";
2
+ import $d11f19852b941573$exports from "./bg-BG.mjs";
3
+ import $b983974c2ee1efb3$exports from "./cs-CZ.mjs";
4
+ import $5809cc9d4e92de73$exports from "./da-DK.mjs";
5
+ import $c68c2e4fc74398d1$exports from "./de-DE.mjs";
6
+ import $0898b4c153db2b77$exports from "./el-GR.mjs";
7
+ import $6d74810286a15183$exports from "./en-US.mjs";
8
+ import $309d73dc65f78055$exports from "./es-ES.mjs";
9
+ import $44ad94f7205cf593$exports from "./et-EE.mjs";
10
+ import $7c28f5687f0779a9$exports from "./fi-FI.mjs";
11
+ import $e6d75df4b68bd73a$exports from "./fr-FR.mjs";
12
+ import $87505c9dab186d0f$exports from "./he-IL.mjs";
13
+ import $553439c3ffb3e492$exports from "./hr-HR.mjs";
14
+ import $74cf411061b983a2$exports from "./hu-HU.mjs";
15
+ import $e933f298574dc435$exports from "./it-IT.mjs";
16
+ import $ac91fc9fe02f71f6$exports from "./ja-JP.mjs";
17
+ import $52b96f86422025af$exports from "./ko-KR.mjs";
18
+ import $c0d724c3e51dafa6$exports from "./lt-LT.mjs";
19
+ import $c92899672a3fe72e$exports from "./lv-LV.mjs";
20
+ import $9f576b39d8e7a9d6$exports from "./nb-NO.mjs";
21
+ import $9d025808aeec81a7$exports from "./nl-NL.mjs";
22
+ import $fce709921e2c0fa6$exports from "./pl-PL.mjs";
23
+ import $2599cf0c4ab37f59$exports from "./pt-BR.mjs";
24
+ import $3c220ae7ef8a35fd$exports from "./pt-PT.mjs";
25
+ import $93562b5094072f54$exports from "./ro-RO.mjs";
26
+ import $cd9e2abd0d06c7b4$exports from "./ru-RU.mjs";
27
+ import $45375701f409adf1$exports from "./sk-SK.mjs";
28
+ import $27fab53a576de9dd$exports from "./sl-SI.mjs";
29
+ import $4438748d9952e7c7$exports from "./sr-SP.mjs";
30
+ import $0936d7347ef4da4c$exports from "./sv-SE.mjs";
31
+ import $29700c92185d38f8$exports from "./tr-TR.mjs";
32
+ import $662ccaf2be4c25b3$exports from "./uk-UA.mjs";
33
+ import $d80a27deda7cdb3c$exports from "./zh-CN.mjs";
34
+ import $2b2734393847c884$exports from "./zh-TW.mjs";
1
35
  import $k7QOs$react, {useState as $k7QOs$useState, useCallback as $k7QOs$useCallback, useRef as $k7QOs$useRef, useEffect as $k7QOs$useEffect, useContext as $k7QOs$useContext, useMemo as $k7QOs$useMemo} from "react";
2
36
  import {useLayoutEffect as $k7QOs$useLayoutEffect, useResizeObserver as $k7QOs$useResizeObserver, clamp as $k7QOs$clamp, useId as $k7QOs$useId, isIOS as $k7QOs$isIOS, chain as $k7QOs$chain, getScrollParent as $k7QOs$getScrollParent, useLabels as $k7QOs$useLabels, mergeProps as $k7QOs$mergeProps} from "@react-aria/utils";
3
37
  import {useLocale as $k7QOs$useLocale, useLocalizedStringFormatter as $k7QOs$useLocalizedStringFormatter} from "@react-aria/i18n";
@@ -7,6 +41,7 @@ import $k7QOs$reactdom from "react-dom";
7
41
  import {useIsSSR as $k7QOs$useIsSSR} from "@react-aria/ssr";
8
42
  import {VisuallyHidden as $k7QOs$VisuallyHidden} from "@react-aria/visually-hidden";
9
43
 
44
+
10
45
  function $parcel$interopDefault(a) {
11
46
  return a && a.__esModule ? a.default : a;
12
47
  }
@@ -530,7 +565,7 @@ function $a11501f3d1d39e6c$export$ea8f71083e90600f(props, ref) {
530
565
  isOpen,
531
566
  ref
532
567
  ]);
533
- // Only hide the overlay when it is the topmost visible overlay in the stack.
568
+ // Only hide the overlay when it is the topmost visible overlay in the stack
534
569
  let onHide = ()=>{
535
570
  if ($a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length - 1] === ref && onClose) onClose();
536
571
  };
@@ -562,7 +597,7 @@ function $a11501f3d1d39e6c$export$ea8f71083e90600f(props, ref) {
562
597
  // Handle clicking outside the overlay to close it
563
598
  (0, $k7QOs$useInteractOutside)({
564
599
  ref: ref,
565
- onInteractOutside: isDismissable ? onInteractOutside : null,
600
+ onInteractOutside: isDismissable && isOpen ? onInteractOutside : null,
566
601
  onInteractOutsideStart: onInteractOutsideStart
567
602
  });
568
603
  let { focusWithinProps: focusWithinProps } = (0, $k7QOs$useFocusWithin)({
@@ -705,8 +740,9 @@ function $49c51c25361d4cd2$var$preventScrollStandard() {
705
740
  //
706
741
  // 1. Prevent default on `touchmove` events that are not in a scrollable element. This prevents touch scrolling
707
742
  // on the window.
708
- // 2. Prevent default on `touchmove` events inside a scrollable element when the scroll position is at the
709
- // top or bottom. This avoids the whole page scrolling instead, but does prevent overscrolling.
743
+ // 2. Set `overscroll-behavior: contain` on nested scrollable regions so they do not scroll the page when at
744
+ // the top or bottom. Work around a bug where this does not work when the element does not actually overflow
745
+ // by preventing default in a `touchmove` event.
710
746
  // 3. Prevent default on `touchend` events on input elements and handle focusing the element ourselves.
711
747
  // 4. When focusing an input, apply a transform to trick Safari into thinking the input is at the top
712
748
  // of the page, which prevents it from scrolling the page. After the input is focused, scroll the element
@@ -718,12 +754,15 @@ function $49c51c25361d4cd2$var$preventScrollStandard() {
718
754
  // to navigate to an input with the next/previous buttons that's outside a modal.
719
755
  function $49c51c25361d4cd2$var$preventScrollMobileSafari() {
720
756
  let scrollable;
721
- let lastY = 0;
757
+ let restoreScrollableStyles;
722
758
  let onTouchStart = (e)=>{
723
759
  // Store the nearest scrollable parent element from the element that the user touched.
724
- scrollable = (0, $k7QOs$getScrollParent)(e.target);
760
+ scrollable = (0, $k7QOs$getScrollParent)(e.target, true);
725
761
  if (scrollable === document.documentElement && scrollable === document.body) return;
726
- lastY = e.changedTouches[0].pageY;
762
+ // Prevent scrolling up when at the top and scrolling down when at the bottom
763
+ // of a nested scrollable area, otherwise mobile Safari will start scrolling
764
+ // the window instead.
765
+ if (scrollable instanceof HTMLElement && window.getComputedStyle(scrollable).overscrollBehavior === "auto") restoreScrollableStyles = $49c51c25361d4cd2$var$setStyle(scrollable, "overscrollBehavior", "contain");
727
766
  };
728
767
  let onTouchMove = (e)=>{
729
768
  // Prevent scrolling the window.
@@ -731,22 +770,20 @@ function $49c51c25361d4cd2$var$preventScrollMobileSafari() {
731
770
  e.preventDefault();
732
771
  return;
733
772
  }
734
- // Prevent scrolling up when at the top and scrolling down when at the bottom
735
- // of a nested scrollable area, otherwise mobile Safari will start scrolling
736
- // the window instead. Unfortunately, this disables bounce scrolling when at
737
- // the top but it's the best we can do.
738
- let y = e.changedTouches[0].pageY;
739
- let scrollTop = scrollable.scrollTop;
740
- let bottom = scrollable.scrollHeight - scrollable.clientHeight;
741
- if (bottom === 0) return;
742
- if (scrollTop <= 0 && y > lastY || scrollTop >= bottom && y < lastY) e.preventDefault();
743
- lastY = y;
773
+ // overscroll-behavior should prevent scroll chaining, but currently does not
774
+ // if the element doesn't actually overflow. https://bugs.webkit.org/show_bug.cgi?id=243452
775
+ // This checks that both the width and height do not overflow, otherwise we might
776
+ // block horizontal scrolling too. In that case, adding `touch-action: pan-x` to
777
+ // the element will prevent vertical page scrolling. We can't add that automatically
778
+ // because it must be set before the touchstart event.
779
+ if (scrollable.scrollHeight === scrollable.clientHeight && scrollable.scrollWidth === scrollable.clientWidth) e.preventDefault();
744
780
  };
745
781
  let onTouchEnd = (e)=>{
746
782
  let target = e.target;
747
783
  // Apply this change if we're not already focused on the target element
748
784
  if ($49c51c25361d4cd2$var$willOpenKeyboard(target) && target !== document.activeElement) {
749
785
  e.preventDefault();
786
+ setupStyles();
750
787
  // Apply a transform to trick Safari into thinking the input is at the top of the page
751
788
  // so it doesn't try to scroll it into view. When tapping on an input, this needs to
752
789
  // be done before the "focus" event, so we have to focus the element ourselves.
@@ -756,10 +793,12 @@ function $49c51c25361d4cd2$var$preventScrollMobileSafari() {
756
793
  target.style.transform = "";
757
794
  });
758
795
  }
796
+ if (restoreScrollableStyles) restoreScrollableStyles();
759
797
  };
760
798
  let onFocus = (e)=>{
761
799
  let target = e.target;
762
800
  if ($49c51c25361d4cd2$var$willOpenKeyboard(target)) {
801
+ setupStyles();
763
802
  // Transform also needs to be applied in the focus event in cases where focus moves
764
803
  // other than tapping on an input directly, e.g. the next/previous buttons in the
765
804
  // software keyboard. In these cases, it seems applying the transform in the focus event
@@ -784,19 +823,25 @@ function $49c51c25361d4cd2$var$preventScrollMobileSafari() {
784
823
  });
785
824
  }
786
825
  };
787
- let onWindowScroll = ()=>{
788
- // Last resort. If the window scrolled, scroll it back to the top.
789
- // It should always be at the top because the body will have a negative margin (see below).
826
+ let restoreStyles = null;
827
+ let setupStyles = ()=>{
828
+ if (restoreStyles) return;
829
+ let onWindowScroll = ()=>{
830
+ // Last resort. If the window scrolled, scroll it back to the top.
831
+ // It should always be at the top because the body will have a negative margin (see below).
832
+ window.scrollTo(0, 0);
833
+ };
834
+ // Record the original scroll position so we can restore it.
835
+ // Then apply a negative margin to the body to offset it by the scroll position. This will
836
+ // enable us to scroll the window to the top, which is required for the rest of this to work.
837
+ let scrollX = window.pageXOffset;
838
+ let scrollY = window.pageYOffset;
839
+ restoreStyles = (0, $k7QOs$chain)($49c51c25361d4cd2$var$addEvent(window, "scroll", onWindowScroll), $49c51c25361d4cd2$var$setStyle(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`), $49c51c25361d4cd2$var$setStyle(document.documentElement, "overflow", "hidden"), $49c51c25361d4cd2$var$setStyle(document.body, "marginTop", `-${scrollY}px`), ()=>{
840
+ window.scrollTo(scrollX, scrollY);
841
+ });
842
+ // Scroll to the top. The negative margin on the body will make this appear the same.
790
843
  window.scrollTo(0, 0);
791
844
  };
792
- // Record the original scroll position so we can restore it.
793
- // Then apply a negative margin to the body to offset it by the scroll position. This will
794
- // enable us to scroll the window to the top, which is required for the rest of this to work.
795
- let scrollX = window.pageXOffset;
796
- let scrollY = window.pageYOffset;
797
- let restoreStyles = (0, $k7QOs$chain)($49c51c25361d4cd2$var$setStyle(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`), $49c51c25361d4cd2$var$setStyle(document.documentElement, "overflow", "hidden"), $49c51c25361d4cd2$var$setStyle(document.body, "marginTop", `-${scrollY}px`));
798
- // Scroll to the top. The negative margin on the body will make this appear the same.
799
- window.scrollTo(0, 0);
800
845
  let removeEvents = (0, $k7QOs$chain)($49c51c25361d4cd2$var$addEvent(document, "touchstart", onTouchStart, {
801
846
  passive: false,
802
847
  capture: true
@@ -806,12 +851,12 @@ function $49c51c25361d4cd2$var$preventScrollMobileSafari() {
806
851
  }), $49c51c25361d4cd2$var$addEvent(document, "touchend", onTouchEnd, {
807
852
  passive: false,
808
853
  capture: true
809
- }), $49c51c25361d4cd2$var$addEvent(document, "focus", onFocus, true), $49c51c25361d4cd2$var$addEvent(window, "scroll", onWindowScroll));
854
+ }), $49c51c25361d4cd2$var$addEvent(document, "focus", onFocus, true));
810
855
  return ()=>{
811
856
  // Restore styles and scroll the page back to where it was.
812
- restoreStyles();
857
+ restoreScrollableStyles === null || restoreScrollableStyles === void 0 ? void 0 : restoreScrollableStyles();
858
+ restoreStyles === null || restoreStyles === void 0 ? void 0 : restoreStyles();
813
859
  removeEvents();
814
- window.scrollTo(scrollX, scrollY);
815
860
  };
816
861
  }
817
862
  // Sets a CSS property on an element, and returns a function to revert it to the previous value.
@@ -953,208 +998,38 @@ function $f57aed4a881a3485$export$33ffd74ebf07f060(options) {
953
998
  * OF ANY KIND, either express or implied. See the License for the specific language
954
999
  * governing permissions and limitations under the License.
955
1000
  */ var $a2f21f5f14f60553$exports = {};
956
- var $773d5888b972f1cf$exports = {};
957
- $773d5888b972f1cf$exports = {
958
- "dismiss": `تجاهل`
959
- };
960
-
961
-
962
- var $d11f19852b941573$exports = {};
963
- $d11f19852b941573$exports = {
964
- "dismiss": `Отхвърляне`
965
- };
966
-
967
-
968
- var $b983974c2ee1efb3$exports = {};
969
- $b983974c2ee1efb3$exports = {
970
- "dismiss": `Odstranit`
971
- };
972
-
973
-
974
- var $5809cc9d4e92de73$exports = {};
975
- $5809cc9d4e92de73$exports = {
976
- "dismiss": `Luk`
977
- };
978
-
979
-
980
- var $c68c2e4fc74398d1$exports = {};
981
- $c68c2e4fc74398d1$exports = {
982
- "dismiss": `Schließen`
983
- };
984
-
985
-
986
- var $0898b4c153db2b77$exports = {};
987
- $0898b4c153db2b77$exports = {
988
- "dismiss": `Απόρριψη`
989
- };
990
-
991
-
992
- var $6d74810286a15183$exports = {};
993
- $6d74810286a15183$exports = {
994
- "dismiss": `Dismiss`
995
- };
996
-
997
-
998
- var $309d73dc65f78055$exports = {};
999
- $309d73dc65f78055$exports = {
1000
- "dismiss": `Descartar`
1001
- };
1002
-
1003
-
1004
- var $44ad94f7205cf593$exports = {};
1005
- $44ad94f7205cf593$exports = {
1006
- "dismiss": `Lõpeta`
1007
- };
1008
-
1009
-
1010
- var $7c28f5687f0779a9$exports = {};
1011
- $7c28f5687f0779a9$exports = {
1012
- "dismiss": `Hylkää`
1013
- };
1014
-
1015
-
1016
- var $e6d75df4b68bd73a$exports = {};
1017
- $e6d75df4b68bd73a$exports = {
1018
- "dismiss": `Rejeter`
1019
- };
1020
1001
 
1021
1002
 
1022
- var $87505c9dab186d0f$exports = {};
1023
- $87505c9dab186d0f$exports = {
1024
- "dismiss": `התעלם`
1025
- };
1026
-
1027
-
1028
- var $553439c3ffb3e492$exports = {};
1029
- $553439c3ffb3e492$exports = {
1030
- "dismiss": `Odbaci`
1031
- };
1032
-
1033
-
1034
- var $74cf411061b983a2$exports = {};
1035
- $74cf411061b983a2$exports = {
1036
- "dismiss": `Elutasítás`
1037
- };
1038
-
1039
-
1040
- var $e933f298574dc435$exports = {};
1041
- $e933f298574dc435$exports = {
1042
- "dismiss": `Ignora`
1043
- };
1044
-
1045
-
1046
- var $ac91fc9fe02f71f6$exports = {};
1047
- $ac91fc9fe02f71f6$exports = {
1048
- "dismiss": `閉じる`
1049
- };
1050
-
1051
-
1052
- var $52b96f86422025af$exports = {};
1053
- $52b96f86422025af$exports = {
1054
- "dismiss": `무시`
1055
- };
1056
-
1057
-
1058
- var $c0d724c3e51dafa6$exports = {};
1059
- $c0d724c3e51dafa6$exports = {
1060
- "dismiss": `Atmesti`
1061
- };
1062
1003
 
1063
1004
 
1064
- var $c92899672a3fe72e$exports = {};
1065
- $c92899672a3fe72e$exports = {
1066
- "dismiss": `Nerādīt`
1067
- };
1068
1005
 
1069
1006
 
1070
- var $9f576b39d8e7a9d6$exports = {};
1071
- $9f576b39d8e7a9d6$exports = {
1072
- "dismiss": `Lukk`
1073
- };
1074
1007
 
1075
1008
 
1076
- var $9d025808aeec81a7$exports = {};
1077
- $9d025808aeec81a7$exports = {
1078
- "dismiss": `Negeren`
1079
- };
1080
1009
 
1081
1010
 
1082
- var $fce709921e2c0fa6$exports = {};
1083
- $fce709921e2c0fa6$exports = {
1084
- "dismiss": `Zignoruj`
1085
- };
1086
1011
 
1087
1012
 
1088
- var $2599cf0c4ab37f59$exports = {};
1089
- $2599cf0c4ab37f59$exports = {
1090
- "dismiss": `Descartar`
1091
- };
1092
1013
 
1093
1014
 
1094
- var $3c220ae7ef8a35fd$exports = {};
1095
- $3c220ae7ef8a35fd$exports = {
1096
- "dismiss": `Dispensar`
1097
- };
1098
1015
 
1099
1016
 
1100
- var $93562b5094072f54$exports = {};
1101
- $93562b5094072f54$exports = {
1102
- "dismiss": `Revocare`
1103
- };
1104
1017
 
1105
1018
 
1106
- var $cd9e2abd0d06c7b4$exports = {};
1107
- $cd9e2abd0d06c7b4$exports = {
1108
- "dismiss": `Пропустить`
1109
- };
1110
1019
 
1111
1020
 
1112
- var $45375701f409adf1$exports = {};
1113
- $45375701f409adf1$exports = {
1114
- "dismiss": `Zrušiť`
1115
- };
1116
1021
 
1117
1022
 
1118
- var $27fab53a576de9dd$exports = {};
1119
- $27fab53a576de9dd$exports = {
1120
- "dismiss": `Opusti`
1121
- };
1122
1023
 
1123
1024
 
1124
- var $4438748d9952e7c7$exports = {};
1125
- $4438748d9952e7c7$exports = {
1126
- "dismiss": `Odbaci`
1127
- };
1128
1025
 
1129
1026
 
1130
- var $0936d7347ef4da4c$exports = {};
1131
- $0936d7347ef4da4c$exports = {
1132
- "dismiss": `Avvisa`
1133
- };
1134
1027
 
1135
1028
 
1136
- var $29700c92185d38f8$exports = {};
1137
- $29700c92185d38f8$exports = {
1138
- "dismiss": `Kapat`
1139
- };
1140
1029
 
1141
1030
 
1142
- var $662ccaf2be4c25b3$exports = {};
1143
- $662ccaf2be4c25b3$exports = {
1144
- "dismiss": `Скасувати`
1145
- };
1146
1031
 
1147
1032
 
1148
- var $d80a27deda7cdb3c$exports = {};
1149
- $d80a27deda7cdb3c$exports = {
1150
- "dismiss": `取消`
1151
- };
1152
-
1153
-
1154
- var $2b2734393847c884$exports = {};
1155
- $2b2734393847c884$exports = {
1156
- "dismiss": `關閉`
1157
- };
1158
1033
 
1159
1034
 
1160
1035
  $a2f21f5f14f60553$exports = {
@@ -1201,7 +1076,7 @@ $a2f21f5f14f60553$exports = {
1201
1076
 
1202
1077
  function $86ea4cb521eb2e37$export$2317d149ed6f78c4(props) {
1203
1078
  let { onDismiss: onDismiss, ...otherProps } = props;
1204
- let stringFormatter = (0, $k7QOs$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($a2f21f5f14f60553$exports))));
1079
+ let stringFormatter = (0, $k7QOs$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($a2f21f5f14f60553$exports))), "@react-aria/overlays");
1205
1080
  let labels = (0, $k7QOs$useLabels)(otherProps, stringFormatter.format("dismiss"));
1206
1081
  let onClick = ()=>{
1207
1082
  if (onDismiss) onDismiss();
@@ -1209,7 +1084,11 @@ function $86ea4cb521eb2e37$export$2317d149ed6f78c4(props) {
1209
1084
  return /*#__PURE__*/ (0, $k7QOs$react).createElement((0, $k7QOs$VisuallyHidden), null, /*#__PURE__*/ (0, $k7QOs$react).createElement("button", {
1210
1085
  ...labels,
1211
1086
  tabIndex: -1,
1212
- onClick: onClick
1087
+ onClick: onClick,
1088
+ style: {
1089
+ width: 1,
1090
+ height: 1
1091
+ }
1213
1092
  }));
1214
1093
  }
1215
1094
 
@@ -1344,23 +1223,24 @@ function $5e3802645cc19319$export$1c3ebcada18427bf(targets, root = document.body
1344
1223
 
1345
1224
 
1346
1225
  function $f2f8a6077418541e$export$542a6fd13ac93354(props, state) {
1347
- let { triggerRef: triggerRef, popoverRef: popoverRef, isNonModal: isNonModal, isKeyboardDismissDisabled: isKeyboardDismissDisabled, ...otherProps } = props;
1226
+ let { triggerRef: triggerRef, popoverRef: popoverRef, isNonModal: isNonModal, isKeyboardDismissDisabled: isKeyboardDismissDisabled, shouldCloseOnInteractOutside: shouldCloseOnInteractOutside, ...otherProps } = props;
1348
1227
  let { overlayProps: overlayProps, underlayProps: underlayProps } = (0, $a11501f3d1d39e6c$export$ea8f71083e90600f)({
1349
1228
  isOpen: state.isOpen,
1350
1229
  onClose: state.close,
1351
1230
  shouldCloseOnBlur: true,
1352
1231
  isDismissable: !isNonModal,
1353
- isKeyboardDismissDisabled: isKeyboardDismissDisabled
1232
+ isKeyboardDismissDisabled: isKeyboardDismissDisabled,
1233
+ shouldCloseOnInteractOutside: shouldCloseOnInteractOutside
1354
1234
  }, popoverRef);
1355
1235
  let { overlayProps: positionProps, arrowProps: arrowProps, placement: placement } = (0, $2a41e45df1593e64$export$d39e1813b3bdd0e1)({
1356
1236
  ...otherProps,
1357
1237
  targetRef: triggerRef,
1358
1238
  overlayRef: popoverRef,
1359
1239
  isOpen: state.isOpen,
1360
- onClose: null
1240
+ onClose: isNonModal ? state.close : null
1361
1241
  });
1362
1242
  (0, $49c51c25361d4cd2$export$ee0f7cc6afcd1c18)({
1363
- isDisabled: isNonModal
1243
+ isDisabled: isNonModal || !state.isOpen
1364
1244
  });
1365
1245
  (0, $k7QOs$useLayoutEffect)(()=>{
1366
1246
  if (state.isOpen && !isNonModal && popoverRef.current) return (0, $5e3802645cc19319$export$1c3ebcada18427bf)([
@@ -0,0 +1,6 @@
1
+ module.exports = {
2
+ "dismiss": `Ignora`
3
+ };
4
+
5
+
6
+ //# sourceMappingURL=it-IT.main.js.map
@@ -0,0 +1 @@
1
+ {"mappings":"AAAA,iBAAiB;IAAG,WAAW,CAAC,MAAM,CAAC;AACvC","sources":["packages/@react-aria/overlays/intl/it-IT.json"],"sourcesContent":["{\n \"dismiss\": \"Ignora\"\n}\n"],"names":[],"version":3,"file":"it-IT.main.js.map"}
package/dist/it-IT.mjs ADDED
@@ -0,0 +1,8 @@
1
+ var $e933f298574dc435$exports = {};
2
+ $e933f298574dc435$exports = {
3
+ "dismiss": `Ignora`
4
+ };
5
+
6
+
7
+ export {$e933f298574dc435$exports as default};
8
+ //# sourceMappingURL=it-IT.module.js.map
@@ -0,0 +1,8 @@
1
+ var $e933f298574dc435$exports = {};
2
+ $e933f298574dc435$exports = {
3
+ "dismiss": `Ignora`
4
+ };
5
+
6
+
7
+ export {$e933f298574dc435$exports as default};
8
+ //# sourceMappingURL=it-IT.module.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";AAAA,4BAAiB;IAAG,WAAW,CAAC,MAAM,CAAC;AACvC","sources":["packages/@react-aria/overlays/intl/it-IT.json"],"sourcesContent":["{\n \"dismiss\": \"Ignora\"\n}\n"],"names":[],"version":3,"file":"it-IT.module.js.map"}
@@ -0,0 +1,6 @@
1
+ module.exports = {
2
+ "dismiss": `\u{9589}\u{3058}\u{308B}`
3
+ };
4
+
5
+
6
+ //# sourceMappingURL=ja-JP.main.js.map
@@ -0,0 +1 @@
1
+ {"mappings":"AAAA,iBAAiB;IAAG,WAAW,CAAC,wBAAG,CAAC;AACpC","sources":["packages/@react-aria/overlays/intl/ja-JP.json"],"sourcesContent":["{\n \"dismiss\": \"閉じる\"\n}\n"],"names":[],"version":3,"file":"ja-JP.main.js.map"}
package/dist/ja-JP.mjs ADDED
@@ -0,0 +1,8 @@
1
+ var $ac91fc9fe02f71f6$exports = {};
2
+ $ac91fc9fe02f71f6$exports = {
3
+ "dismiss": `\u{9589}\u{3058}\u{308B}`
4
+ };
5
+
6
+
7
+ export {$ac91fc9fe02f71f6$exports as default};
8
+ //# sourceMappingURL=ja-JP.module.js.map
@@ -0,0 +1,8 @@
1
+ var $ac91fc9fe02f71f6$exports = {};
2
+ $ac91fc9fe02f71f6$exports = {
3
+ "dismiss": `\u{9589}\u{3058}\u{308B}`
4
+ };
5
+
6
+
7
+ export {$ac91fc9fe02f71f6$exports as default};
8
+ //# sourceMappingURL=ja-JP.module.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";AAAA,4BAAiB;IAAG,WAAW,CAAC,wBAAG,CAAC;AACpC","sources":["packages/@react-aria/overlays/intl/ja-JP.json"],"sourcesContent":["{\n \"dismiss\": \"閉じる\"\n}\n"],"names":[],"version":3,"file":"ja-JP.module.js.map"}
@@ -0,0 +1,6 @@
1
+ module.exports = {
2
+ "dismiss": `\u{BB34}\u{C2DC}`
3
+ };
4
+
5
+
6
+ //# sourceMappingURL=ko-KR.main.js.map
@@ -0,0 +1 @@
1
+ {"mappings":"AAAA,iBAAiB;IAAG,WAAW,CAAC,gBAAE,CAAC;AACnC","sources":["packages/@react-aria/overlays/intl/ko-KR.json"],"sourcesContent":["{\n \"dismiss\": \"무시\"\n}\n"],"names":[],"version":3,"file":"ko-KR.main.js.map"}
package/dist/ko-KR.mjs ADDED
@@ -0,0 +1,8 @@
1
+ var $52b96f86422025af$exports = {};
2
+ $52b96f86422025af$exports = {
3
+ "dismiss": `\u{BB34}\u{C2DC}`
4
+ };
5
+
6
+
7
+ export {$52b96f86422025af$exports as default};
8
+ //# sourceMappingURL=ko-KR.module.js.map
@@ -0,0 +1,8 @@
1
+ var $52b96f86422025af$exports = {};
2
+ $52b96f86422025af$exports = {
3
+ "dismiss": `\u{BB34}\u{C2DC}`
4
+ };
5
+
6
+
7
+ export {$52b96f86422025af$exports as default};
8
+ //# sourceMappingURL=ko-KR.module.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";AAAA,4BAAiB;IAAG,WAAW,CAAC,gBAAE,CAAC;AACnC","sources":["packages/@react-aria/overlays/intl/ko-KR.json"],"sourcesContent":["{\n \"dismiss\": \"무시\"\n}\n"],"names":[],"version":3,"file":"ko-KR.module.js.map"}
@@ -0,0 +1,6 @@
1
+ module.exports = {
2
+ "dismiss": `Atmesti`
3
+ };
4
+
5
+
6
+ //# sourceMappingURL=lt-LT.main.js.map
@@ -0,0 +1 @@
1
+ {"mappings":"AAAA,iBAAiB;IAAG,WAAW,CAAC,OAAO,CAAC;AACxC","sources":["packages/@react-aria/overlays/intl/lt-LT.json"],"sourcesContent":["{\n \"dismiss\": \"Atmesti\"\n}\n"],"names":[],"version":3,"file":"lt-LT.main.js.map"}
package/dist/lt-LT.mjs ADDED
@@ -0,0 +1,8 @@
1
+ var $c0d724c3e51dafa6$exports = {};
2
+ $c0d724c3e51dafa6$exports = {
3
+ "dismiss": `Atmesti`
4
+ };
5
+
6
+
7
+ export {$c0d724c3e51dafa6$exports as default};
8
+ //# sourceMappingURL=lt-LT.module.js.map
@@ -0,0 +1,8 @@
1
+ var $c0d724c3e51dafa6$exports = {};
2
+ $c0d724c3e51dafa6$exports = {
3
+ "dismiss": `Atmesti`
4
+ };
5
+
6
+
7
+ export {$c0d724c3e51dafa6$exports as default};
8
+ //# sourceMappingURL=lt-LT.module.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";AAAA,4BAAiB;IAAG,WAAW,CAAC,OAAO,CAAC;AACxC","sources":["packages/@react-aria/overlays/intl/lt-LT.json"],"sourcesContent":["{\n \"dismiss\": \"Atmesti\"\n}\n"],"names":[],"version":3,"file":"lt-LT.module.js.map"}
@@ -0,0 +1,6 @@
1
+ module.exports = {
2
+ "dismiss": `Ner\u{101}d\u{12B}t`
3
+ };
4
+
5
+
6
+ //# sourceMappingURL=lv-LV.main.js.map
@@ -0,0 +1 @@
1
+ {"mappings":"AAAA,iBAAiB;IAAG,WAAW,CAAC,mBAAO,CAAC;AACxC","sources":["packages/@react-aria/overlays/intl/lv-LV.json"],"sourcesContent":["{\n \"dismiss\": \"Nerādīt\"\n}\n"],"names":[],"version":3,"file":"lv-LV.main.js.map"}
package/dist/lv-LV.mjs ADDED
@@ -0,0 +1,8 @@
1
+ var $c92899672a3fe72e$exports = {};
2
+ $c92899672a3fe72e$exports = {
3
+ "dismiss": `Ner\u{101}d\u{12B}t`
4
+ };
5
+
6
+
7
+ export {$c92899672a3fe72e$exports as default};
8
+ //# sourceMappingURL=lv-LV.module.js.map
@@ -0,0 +1,8 @@
1
+ var $c92899672a3fe72e$exports = {};
2
+ $c92899672a3fe72e$exports = {
3
+ "dismiss": `Ner\u{101}d\u{12B}t`
4
+ };
5
+
6
+
7
+ export {$c92899672a3fe72e$exports as default};
8
+ //# sourceMappingURL=lv-LV.module.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";AAAA,4BAAiB;IAAG,WAAW,CAAC,mBAAO,CAAC;AACxC","sources":["packages/@react-aria/overlays/intl/lv-LV.json"],"sourcesContent":["{\n \"dismiss\": \"Nerādīt\"\n}\n"],"names":[],"version":3,"file":"lv-LV.module.js.map"}