@react-aria/overlays 3.14.1 → 3.15.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.
package/dist/import.mjs CHANGED
@@ -711,7 +711,7 @@ function $49c51c25361d4cd2$var$preventScrollMobileSafari() {
711
711
  };
712
712
  let onTouchMove = (e)=>{
713
713
  // Prevent scrolling the window.
714
- if (scrollable === document.documentElement || scrollable === document.body) {
714
+ if (!scrollable || scrollable === document.documentElement || scrollable === document.body) {
715
715
  e.preventDefault();
716
716
  return;
717
717
  }
@@ -722,6 +722,7 @@ function $49c51c25361d4cd2$var$preventScrollMobileSafari() {
722
722
  let y = e.changedTouches[0].pageY;
723
723
  let scrollTop = scrollable.scrollTop;
724
724
  let bottom = scrollable.scrollHeight - scrollable.clientHeight;
725
+ if (bottom === 0) return;
725
726
  if (scrollTop <= 0 && y > lastY || scrollTop >= bottom && y < lastY) e.preventDefault();
726
727
  lastY = y;
727
728
  };
@@ -935,7 +936,7 @@ function $f57aed4a881a3485$export$33ffd74ebf07f060(options) {
935
936
  * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
936
937
  * OF ANY KIND, either express or implied. See the License for the specific language
937
938
  * governing permissions and limitations under the License.
938
- */ var $61fe14465afefc5e$exports = {};
939
+ */ var $a2f21f5f14f60553$exports = {};
939
940
  var $773d5888b972f1cf$exports = {};
940
941
  $773d5888b972f1cf$exports = {
941
942
  "dismiss": `تجاهل`
@@ -1140,7 +1141,7 @@ $2b2734393847c884$exports = {
1140
1141
  };
1141
1142
 
1142
1143
 
1143
- $61fe14465afefc5e$exports = {
1144
+ $a2f21f5f14f60553$exports = {
1144
1145
  "ar-AE": $773d5888b972f1cf$exports,
1145
1146
  "bg-BG": $d11f19852b941573$exports,
1146
1147
  "cs-CZ": $b983974c2ee1efb3$exports,
@@ -1184,7 +1185,7 @@ $61fe14465afefc5e$exports = {
1184
1185
 
1185
1186
  function $86ea4cb521eb2e37$export$2317d149ed6f78c4(props) {
1186
1187
  let { onDismiss: onDismiss , ...otherProps } = props;
1187
- let stringFormatter = (0, $k7QOs$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($61fe14465afefc5e$exports))));
1188
+ let stringFormatter = (0, $k7QOs$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($a2f21f5f14f60553$exports))));
1188
1189
  let labels = (0, $k7QOs$useLabels)(otherProps, stringFormatter.format("dismiss"));
1189
1190
  let onClick = ()=>{
1190
1191
  if (onDismiss) onDismiss();
@@ -1270,9 +1271,9 @@ function $5e3802645cc19319$export$1c3ebcada18427bf(targets, root = document.body
1270
1271
  visibleNodes.delete(node);
1271
1272
  hiddenNodes.delete(node);
1272
1273
  }
1273
- for (let node1 of change.addedNodes){
1274
- if ((node1 instanceof HTMLElement || node1 instanceof SVGElement) && (node1.dataset.liveAnnouncer === "true" || node1.dataset.reactAriaTopLayer === "true")) visibleNodes.add(node1);
1275
- else if (node1 instanceof Element) walk(node1);
1274
+ for (let node of change.addedNodes){
1275
+ if ((node instanceof HTMLElement || node instanceof SVGElement) && (node.dataset.liveAnnouncer === "true" || node.dataset.reactAriaTopLayer === "true")) visibleNodes.add(node);
1276
+ else if (node instanceof Element) walk(node);
1276
1277
  }
1277
1278
  }
1278
1279
  }
@@ -1405,12 +1406,16 @@ function $337b884510726a0d$export$c6fdb837b070b4ff(props) {
1405
1406
  setContain
1406
1407
  ]);
1407
1408
  if (!portalContainer) return null;
1408
- let contents = /*#__PURE__*/ (0, $k7QOs$react).createElement($337b884510726a0d$export$a2200b96afd16271.Provider, {
1409
+ let contents;
1410
+ if (!props.disableFocusManagement) contents = /*#__PURE__*/ (0, $k7QOs$react).createElement($337b884510726a0d$export$a2200b96afd16271.Provider, {
1409
1411
  value: contextValue
1410
1412
  }, /*#__PURE__*/ (0, $k7QOs$react).createElement((0, $k7QOs$FocusScope), {
1411
1413
  restoreFocus: true,
1412
1414
  contain: contain
1413
1415
  }, props.children));
1416
+ else contents = /*#__PURE__*/ (0, $k7QOs$react).createElement($337b884510726a0d$export$a2200b96afd16271.Provider, {
1417
+ value: contextValue
1418
+ }, props.children);
1414
1419
  return /*#__PURE__*/ (0, $k7QOs$reactdom).createPortal(contents, portalContainer);
1415
1420
  }
1416
1421
  function $337b884510726a0d$export$14c98a7594375490() {
package/dist/main.js CHANGED
@@ -730,7 +730,7 @@ function $5c2f5cd01815d369$var$preventScrollMobileSafari() {
730
730
  };
731
731
  let onTouchMove = (e)=>{
732
732
  // Prevent scrolling the window.
733
- if (scrollable === document.documentElement || scrollable === document.body) {
733
+ if (!scrollable || scrollable === document.documentElement || scrollable === document.body) {
734
734
  e.preventDefault();
735
735
  return;
736
736
  }
@@ -741,6 +741,7 @@ function $5c2f5cd01815d369$var$preventScrollMobileSafari() {
741
741
  let y = e.changedTouches[0].pageY;
742
742
  let scrollTop = scrollable.scrollTop;
743
743
  let bottom = scrollable.scrollHeight - scrollable.clientHeight;
744
+ if (bottom === 0) return;
744
745
  if (scrollTop <= 0 && y > lastY || scrollTop >= bottom && y < lastY) e.preventDefault();
745
746
  lastY = y;
746
747
  };
@@ -954,7 +955,7 @@ function $0775ea8ea6a0565e$export$33ffd74ebf07f060(options) {
954
955
  * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
955
956
  * OF ANY KIND, either express or implied. See the License for the specific language
956
957
  * governing permissions and limitations under the License.
957
- */ var $18d014414048a7ba$exports = {};
958
+ */ var $90f032faf016e1fb$exports = {};
958
959
  var $4393d9b86d3ad278$exports = {};
959
960
  $4393d9b86d3ad278$exports = {
960
961
  "dismiss": `تجاهل`
@@ -1159,7 +1160,7 @@ $3f3b5d798a5abdbc$exports = {
1159
1160
  };
1160
1161
 
1161
1162
 
1162
- $18d014414048a7ba$exports = {
1163
+ $90f032faf016e1fb$exports = {
1163
1164
  "ar-AE": $4393d9b86d3ad278$exports,
1164
1165
  "bg-BG": $254224013ae06959$exports,
1165
1166
  "cs-CZ": $55d3567b59d09782$exports,
@@ -1203,7 +1204,7 @@ $18d014414048a7ba$exports = {
1203
1204
 
1204
1205
  function $f69bb3e6457495cc$export$2317d149ed6f78c4(props) {
1205
1206
  let { onDismiss: onDismiss , ...otherProps } = props;
1206
- let stringFormatter = (0, $6Zb2x$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($18d014414048a7ba$exports))));
1207
+ let stringFormatter = (0, $6Zb2x$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($90f032faf016e1fb$exports))));
1207
1208
  let labels = (0, $6Zb2x$reactariautils.useLabels)(otherProps, stringFormatter.format("dismiss"));
1208
1209
  let onClick = ()=>{
1209
1210
  if (onDismiss) onDismiss();
@@ -1289,9 +1290,9 @@ function $08ef1685902b6011$export$1c3ebcada18427bf(targets, root = document.body
1289
1290
  visibleNodes.delete(node);
1290
1291
  hiddenNodes.delete(node);
1291
1292
  }
1292
- for (let node1 of change.addedNodes){
1293
- if ((node1 instanceof HTMLElement || node1 instanceof SVGElement) && (node1.dataset.liveAnnouncer === "true" || node1.dataset.reactAriaTopLayer === "true")) visibleNodes.add(node1);
1294
- else if (node1 instanceof Element) walk(node1);
1293
+ for (let node of change.addedNodes){
1294
+ if ((node instanceof HTMLElement || node instanceof SVGElement) && (node.dataset.liveAnnouncer === "true" || node.dataset.reactAriaTopLayer === "true")) visibleNodes.add(node);
1295
+ else if (node instanceof Element) walk(node);
1295
1296
  }
1296
1297
  }
1297
1298
  }
@@ -1424,12 +1425,16 @@ function $745edbb83ab4296f$export$c6fdb837b070b4ff(props) {
1424
1425
  setContain
1425
1426
  ]);
1426
1427
  if (!portalContainer) return null;
1427
- let contents = /*#__PURE__*/ (0, ($parcel$interopDefault($6Zb2x$react))).createElement($745edbb83ab4296f$export$a2200b96afd16271.Provider, {
1428
+ let contents;
1429
+ if (!props.disableFocusManagement) contents = /*#__PURE__*/ (0, ($parcel$interopDefault($6Zb2x$react))).createElement($745edbb83ab4296f$export$a2200b96afd16271.Provider, {
1428
1430
  value: contextValue
1429
1431
  }, /*#__PURE__*/ (0, ($parcel$interopDefault($6Zb2x$react))).createElement((0, $6Zb2x$reactariafocus.FocusScope), {
1430
1432
  restoreFocus: true,
1431
1433
  contain: contain
1432
1434
  }, props.children));
1435
+ else contents = /*#__PURE__*/ (0, ($parcel$interopDefault($6Zb2x$react))).createElement($745edbb83ab4296f$export$a2200b96afd16271.Provider, {
1436
+ value: contextValue
1437
+ }, props.children);
1433
1438
  return /*#__PURE__*/ (0, ($parcel$interopDefault($6Zb2x$reactdom))).createPortal(contents, portalContainer);
1434
1439
  }
1435
1440
  function $745edbb83ab4296f$export$14c98a7594375490() {