@react-aria/utils 3.0.0-nightly.2440 → 3.0.0-nightly.2448

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
@@ -279,7 +279,7 @@ const $65484d02dcb7eb3e$var$linkPropNames = new Set([
279
279
  ]);
280
280
  const $65484d02dcb7eb3e$var$propRe = /^(data-.*)$/;
281
281
  function $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, opts = {}) {
282
- let { labelable: labelable , isLink: isLink , propNames: propNames } = opts;
282
+ let { labelable: labelable, isLink: isLink, propNames: propNames } = opts;
283
283
  let filteredProps = {};
284
284
  for(const prop in props)if (Object.prototype.hasOwnProperty.call(props, prop) && ($65484d02dcb7eb3e$var$DOMPropNames.has(prop) || labelable && $65484d02dcb7eb3e$var$labelablePropNames.has(prop) || isLink && $65484d02dcb7eb3e$var$linkPropNames.has(prop) || (propNames === null || propNames === void 0 ? void 0 : propNames.has(prop)) || $65484d02dcb7eb3e$var$propRe.test(prop))) filteredProps[prop] = props[prop];
285
285
  return filteredProps;
@@ -344,7 +344,7 @@ function $7215afc6de606d6b$var$getScrollableElements(element) {
344
344
  return scrollableElements;
345
345
  }
346
346
  function $7215afc6de606d6b$var$restoreScrollPosition(scrollableElements) {
347
- for (let { element: element , scrollTop: scrollTop , scrollLeft: scrollLeft } of scrollableElements){
347
+ for (let { element: element, scrollTop: scrollTop, scrollLeft: scrollLeft } of scrollableElements){
348
348
  element.scrollTop = scrollTop;
349
349
  element.scrollLeft = scrollLeft;
350
350
  }
@@ -422,21 +422,24 @@ function $c87311424ea30a05$export$6446a186d09e379e() {
422
422
  function $c87311424ea30a05$export$a11b0059900ceec8() {
423
423
  return $c87311424ea30a05$var$testUserAgent(/Android/i);
424
424
  }
425
+ function $c87311424ea30a05$export$b7d78993b74f766d() {
426
+ return $c87311424ea30a05$var$testUserAgent(/Firefox/i);
427
+ }
428
+
425
429
 
426
430
 
427
431
 
428
432
  const $ea8dcbcb9ea1b556$var$RouterContext = /*#__PURE__*/ (0, $12uGp$createContext)({
433
+ isNative: true,
429
434
  open: $ea8dcbcb9ea1b556$var$openSyntheticLink
430
435
  });
431
436
  function $ea8dcbcb9ea1b556$export$323e4fc2fa4753fb(props) {
432
- let { children: children , navigate: navigate } = props;
437
+ let { children: children, navigate: navigate } = props;
433
438
  let ctx = (0, $12uGp$useMemo)(()=>({
439
+ isNative: false,
434
440
  open: (target, modifiers)=>{
435
441
  $ea8dcbcb9ea1b556$var$getSyntheticLink(target, (link)=>{
436
- if ((!link.target || link.target === "_self") && link.origin === location.origin && !link.hasAttribute("download") && !modifiers.metaKey && // open in new tab (mac)
437
- !modifiers.ctrlKey && // open in new tab (windows)
438
- !modifiers.altKey && // download
439
- !modifiers.shiftKey) navigate(link.pathname + link.search + link.hash);
442
+ if ($ea8dcbcb9ea1b556$export$efa8c9099e530235(link, modifiers)) navigate(link.pathname + link.search + link.hash);
440
443
  else $ea8dcbcb9ea1b556$export$95185d699e05d4d7(link, modifiers);
441
444
  });
442
445
  }
@@ -450,11 +453,28 @@ function $ea8dcbcb9ea1b556$export$323e4fc2fa4753fb(props) {
450
453
  function $ea8dcbcb9ea1b556$export$9a302a45f65d0572() {
451
454
  return (0, $12uGp$useContext)($ea8dcbcb9ea1b556$var$RouterContext);
452
455
  }
456
+ function $ea8dcbcb9ea1b556$export$efa8c9099e530235(link, modifiers) {
457
+ // Use getAttribute here instead of link.target. Firefox will default link.target to "_parent" when inside an iframe.
458
+ let target = link.getAttribute("target");
459
+ return (!target || target === "_self") && link.origin === location.origin && !link.hasAttribute("download") && !modifiers.metaKey && // open in new tab (mac)
460
+ !modifiers.ctrlKey && // open in new tab (windows)
461
+ !modifiers.altKey && // download
462
+ !modifiers.shiftKey;
463
+ }
453
464
  function $ea8dcbcb9ea1b556$export$95185d699e05d4d7(target, modifiers, setOpening = true) {
454
- let { metaKey: metaKey , ctrlKey: ctrlKey , altKey: altKey , shiftKey: shiftKey } = modifiers;
465
+ var _window_event, _window_event_type;
466
+ let { metaKey: metaKey, ctrlKey: ctrlKey, altKey: altKey, shiftKey: shiftKey } = modifiers;
467
+ // Firefox does not recognize keyboard events as a user action by default, and the popup blocker
468
+ // will prevent links with target="_blank" from opening. However, it does allow the event if the
469
+ // Command/Control key is held, which opens the link in a background tab. This seems like the best we can do.
470
+ // See https://bugzilla.mozilla.org/show_bug.cgi?id=257870 and https://bugzilla.mozilla.org/show_bug.cgi?id=746640.
471
+ if ((0, $c87311424ea30a05$export$b7d78993b74f766d)() && ((_window_event = window.event) === null || _window_event === void 0 ? void 0 : (_window_event_type = _window_event.type) === null || _window_event_type === void 0 ? void 0 : _window_event_type.startsWith("key")) && target.target === "_blank") {
472
+ if ((0, $c87311424ea30a05$export$9ac100e40613ea10)()) metaKey = true;
473
+ else ctrlKey = true;
474
+ }
455
475
  // WebKit does not support firing click events with modifier keys, but does support keyboard events.
456
476
  // https://github.com/WebKit/WebKit/blob/c03d0ac6e6db178f90923a0a63080b5ca210d25f/Source/WebCore/html/HTMLAnchorElement.cpp#L184
457
- let event = (0, $c87311424ea30a05$export$78551043582a6a98)() && true ? new KeyboardEvent("keydown", {
477
+ let event = (0, $c87311424ea30a05$export$78551043582a6a98)() && (0, $c87311424ea30a05$export$9ac100e40613ea10)() && !(0, $c87311424ea30a05$export$7bef049ce92e4224)() && true ? new KeyboardEvent("keydown", {
458
478
  keyIdentifier: "Enter",
459
479
  metaKey: metaKey,
460
480
  ctrlKey: ctrlKey,
@@ -590,7 +610,7 @@ function $bbed8b41f857bcc0$export$24490316f764c430(fn) {
590
610
  const $9cc09df9fd7676be$var$draggingElements = [];
591
611
  function $9cc09df9fd7676be$export$7bbed75feba39706(props) {
592
612
  console.warn("useDrag1D is deprecated, please use `useMove` instead https://react-spectrum.adobe.com/react-aria/useMove.html");
593
- let { containerRef: containerRef , reverse: reverse , orientation: orientation , onHover: onHover , onDrag: onDrag , onPositionChange: onPositionChange , onIncrement: onIncrement , onDecrement: onDecrement , onIncrementToMax: onIncrementToMax , onDecrementToMin: onDecrementToMin , onCollapseToggle: onCollapseToggle } = props;
613
+ let { containerRef: containerRef, reverse: reverse, orientation: orientation, onHover: onHover, onDrag: onDrag, onPositionChange: onPositionChange, onIncrement: onIncrement, onDecrement: onDecrement, onIncrementToMax: onIncrementToMax, onDecrementToMin: onDecrementToMin, onCollapseToggle: onCollapseToggle } = props;
594
614
  let getPosition = (e)=>orientation === "horizontal" ? e.clientX : e.clientY;
595
615
  let getNextOffset = (e)=>{
596
616
  let containerOffset = (0, $ab71dadb03a6fb2e$export$622cea445a1c5b7d)(containerRef.current, reverse, orientation);
@@ -767,7 +787,7 @@ function $03deb23ff14920c4$export$4eaf04e54aa8eed6() {
767
787
  * governing permissions and limitations under the License.
768
788
  */
769
789
  function $313b98861ee5dd6c$export$d6875122194c7b44(props, defaultLabel) {
770
- let { id: id , "aria-label": label , "aria-labelledby": labelledBy } = props;
790
+ let { id: id, "aria-label": label, "aria-labelledby": labelledBy } = props;
771
791
  // If there is both an aria-label and aria-labelledby,
772
792
  // combine them by pointing to the element itself.
773
793
  id = (0, $bdb11010cef70236$export$f680877a34711e37)(id);
@@ -853,7 +873,7 @@ function $9daab02d461809db$var$hasResizeObserver() {
853
873
  return typeof window.ResizeObserver !== "undefined";
854
874
  }
855
875
  function $9daab02d461809db$export$683480f191c0e3ea(options) {
856
- const { ref: ref , onResize: onResize } = options;
876
+ const { ref: ref, onResize: onResize } = options;
857
877
  (0, $12uGp$useEffect)(()=>{
858
878
  let element = ref === null || ref === void 0 ? void 0 : ref.current;
859
879
  if (!element) return;
@@ -1066,7 +1086,7 @@ function $2f04cbc44ee30ce0$export$53a0910f038337bd(scrollView, element) {
1066
1086
  let x = scrollView.scrollLeft;
1067
1087
  let y = scrollView.scrollTop;
1068
1088
  // Account for top/left border offsetting the scroll top/Left
1069
- let { borderTopWidth: borderTopWidth , borderLeftWidth: borderLeftWidth } = getComputedStyle(scrollView);
1089
+ let { borderTopWidth: borderTopWidth, borderLeftWidth: borderLeftWidth } = getComputedStyle(scrollView);
1070
1090
  let borderAdjustedX = scrollView.scrollLeft + parseInt(borderLeftWidth, 10);
1071
1091
  let borderAdjustedY = scrollView.scrollTop + parseInt(borderTopWidth, 10);
1072
1092
  // Ignore end/bottom border via clientHeight/Width instead of offsetHeight/Width
@@ -1108,11 +1128,11 @@ function $2f04cbc44ee30ce0$export$c826860796309d1b(targetElement, opts) {
1108
1128
  var // use scrollIntoView({block: 'nearest'}) instead of .focus to check if the element is fully in view or not since .focus()
1109
1129
  // won't cause a scroll if the element is already focused and doesn't behave consistently when an element is partially out of view horizontally vs vertically
1110
1130
  _targetElement_scrollIntoView;
1111
- let { left: originalLeft , top: originalTop } = targetElement.getBoundingClientRect();
1131
+ let { left: originalLeft, top: originalTop } = targetElement.getBoundingClientRect();
1112
1132
  targetElement === null || targetElement === void 0 ? void 0 : (_targetElement_scrollIntoView = targetElement.scrollIntoView) === null || _targetElement_scrollIntoView === void 0 ? void 0 : _targetElement_scrollIntoView.call(targetElement, {
1113
1133
  block: "nearest"
1114
1134
  });
1115
- let { left: newLeft , top: newTop } = targetElement.getBoundingClientRect();
1135
+ let { left: newLeft, top: newTop } = targetElement.getBoundingClientRect();
1116
1136
  // Account for sub pixel differences from rounding
1117
1137
  if (Math.abs(originalLeft - newLeft) > 1 || Math.abs(originalTop - newTop) > 1) {
1118
1138
  var _opts_containingElement, _opts_containingElement_scrollIntoView, _targetElement_scrollIntoView1;
@@ -1224,5 +1244,5 @@ function $99facab73266f662$export$5add1d006293d136(ref, initialValue, onReset) {
1224
1244
 
1225
1245
 
1226
1246
 
1227
- export {$bdb11010cef70236$export$f680877a34711e37 as useId, $bdb11010cef70236$export$cd8c9cb68f842629 as mergeIds, $bdb11010cef70236$export$b4cc09c592e8fdb8 as useSlotId, $ff5963eb1fccf552$export$e08e3b67e392101e as chain, $3ef42575df84b30b$export$9d1611c77c2fe928 as mergeProps, $5dc95899b306f630$export$c9058316764c140e as mergeRefs, $65484d02dcb7eb3e$export$457c3d6518dd4c6f as filterDOMProps, $7215afc6de606d6b$export$de79e2c695e052f3 as focusWithoutScrolling, $ab71dadb03a6fb2e$export$622cea445a1c5b7d as getOffset, $ea8dcbcb9ea1b556$export$95185d699e05d4d7 as openLink, $ea8dcbcb9ea1b556$export$51437d503373d223 as getSyntheticLinkProps, $ea8dcbcb9ea1b556$export$323e4fc2fa4753fb as RouterProvider, $ea8dcbcb9ea1b556$export$9a302a45f65d0572 as useRouter, $bbed8b41f857bcc0$export$24490316f764c430 as runAfterTransition, $9cc09df9fd7676be$export$7bbed75feba39706 as useDrag1D, $03deb23ff14920c4$export$4eaf04e54aa8eed6 as useGlobalListeners, $313b98861ee5dd6c$export$d6875122194c7b44 as useLabels, $df56164dff5785e2$export$4338b53315abf666 as useObjectRef, $4f58c5f72bcf79f7$export$496315a1608d9602 as useUpdateEffect, $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c as useLayoutEffect, $9daab02d461809db$export$683480f191c0e3ea as useResizeObserver, $e7801be82b4b2a53$export$4debdb1a3f0fa79e as useSyncRef, $62d8ded9296f3872$export$cfa2225e87938781 as getScrollParent, $62d8ded9296f3872$export$2bb74740c4e19def as isScrollable, $5df64b3807dc15ee$export$d699905dd57c73ca as useViewportSize, $ef06256079686ba0$export$f8aeda7b10753fa1 as useDescription, $c87311424ea30a05$export$9ac100e40613ea10 as isMac, $c87311424ea30a05$export$186c6964ca17d99 as isIPhone, $c87311424ea30a05$export$7bef049ce92e4224 as isIPad, $c87311424ea30a05$export$fedb369cb70207f1 as isIOS, $c87311424ea30a05$export$e1865c3bedcd822b as isAppleDevice, $c87311424ea30a05$export$78551043582a6a98 as isWebKit, $c87311424ea30a05$export$6446a186d09e379e as isChrome, $c87311424ea30a05$export$a11b0059900ceec8 as isAndroid, $e9faafb641e167db$export$90fc3a17d93f704c as useEvent, $1dbecbe27a04f9af$export$14d238f342723f25 as useValueEffect, $2f04cbc44ee30ce0$export$53a0910f038337bd as scrollIntoView, $2f04cbc44ee30ce0$export$c826860796309d1b as scrollIntoViewport, $4507461a1b870123$re_export$clamp as clamp, $4507461a1b870123$re_export$snapValueToStep as snapValueToStep, $6a7db85432448f7f$export$60278871457622de as isVirtualClick, $6a7db85432448f7f$export$29bf1b5f2c56cf63 as isVirtualPointerEvent, $8ae05eaa5c114e9c$export$7f54fc3180508a52 as useEffectEvent, $5a387cc49350e6db$export$722debc0e56fea39 as useDeepMemo, $99facab73266f662$export$5add1d006293d136 as useFormReset};
1247
+ export {$bdb11010cef70236$export$f680877a34711e37 as useId, $bdb11010cef70236$export$cd8c9cb68f842629 as mergeIds, $bdb11010cef70236$export$b4cc09c592e8fdb8 as useSlotId, $ff5963eb1fccf552$export$e08e3b67e392101e as chain, $3ef42575df84b30b$export$9d1611c77c2fe928 as mergeProps, $5dc95899b306f630$export$c9058316764c140e as mergeRefs, $65484d02dcb7eb3e$export$457c3d6518dd4c6f as filterDOMProps, $7215afc6de606d6b$export$de79e2c695e052f3 as focusWithoutScrolling, $ab71dadb03a6fb2e$export$622cea445a1c5b7d as getOffset, $ea8dcbcb9ea1b556$export$95185d699e05d4d7 as openLink, $ea8dcbcb9ea1b556$export$51437d503373d223 as getSyntheticLinkProps, $ea8dcbcb9ea1b556$export$323e4fc2fa4753fb as RouterProvider, $ea8dcbcb9ea1b556$export$efa8c9099e530235 as shouldClientNavigate, $ea8dcbcb9ea1b556$export$9a302a45f65d0572 as useRouter, $bbed8b41f857bcc0$export$24490316f764c430 as runAfterTransition, $9cc09df9fd7676be$export$7bbed75feba39706 as useDrag1D, $03deb23ff14920c4$export$4eaf04e54aa8eed6 as useGlobalListeners, $313b98861ee5dd6c$export$d6875122194c7b44 as useLabels, $df56164dff5785e2$export$4338b53315abf666 as useObjectRef, $4f58c5f72bcf79f7$export$496315a1608d9602 as useUpdateEffect, $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c as useLayoutEffect, $9daab02d461809db$export$683480f191c0e3ea as useResizeObserver, $e7801be82b4b2a53$export$4debdb1a3f0fa79e as useSyncRef, $62d8ded9296f3872$export$cfa2225e87938781 as getScrollParent, $62d8ded9296f3872$export$2bb74740c4e19def as isScrollable, $5df64b3807dc15ee$export$d699905dd57c73ca as useViewportSize, $ef06256079686ba0$export$f8aeda7b10753fa1 as useDescription, $c87311424ea30a05$export$9ac100e40613ea10 as isMac, $c87311424ea30a05$export$186c6964ca17d99 as isIPhone, $c87311424ea30a05$export$7bef049ce92e4224 as isIPad, $c87311424ea30a05$export$fedb369cb70207f1 as isIOS, $c87311424ea30a05$export$e1865c3bedcd822b as isAppleDevice, $c87311424ea30a05$export$78551043582a6a98 as isWebKit, $c87311424ea30a05$export$6446a186d09e379e as isChrome, $c87311424ea30a05$export$a11b0059900ceec8 as isAndroid, $e9faafb641e167db$export$90fc3a17d93f704c as useEvent, $1dbecbe27a04f9af$export$14d238f342723f25 as useValueEffect, $2f04cbc44ee30ce0$export$53a0910f038337bd as scrollIntoView, $2f04cbc44ee30ce0$export$c826860796309d1b as scrollIntoViewport, $4507461a1b870123$re_export$clamp as clamp, $4507461a1b870123$re_export$snapValueToStep as snapValueToStep, $6a7db85432448f7f$export$60278871457622de as isVirtualClick, $6a7db85432448f7f$export$29bf1b5f2c56cf63 as isVirtualPointerEvent, $8ae05eaa5c114e9c$export$7f54fc3180508a52 as useEffectEvent, $5a387cc49350e6db$export$722debc0e56fea39 as useDeepMemo, $99facab73266f662$export$5add1d006293d136 as useFormReset};
1228
1248
  //# sourceMappingURL=module.js.map
package/dist/main.js CHANGED
@@ -22,6 +22,7 @@ $parcel$export(module.exports, "getOffset", () => $16ec41ef3e36c19c$export$622ce
22
22
  $parcel$export(module.exports, "openLink", () => $4068a0fae83b6d84$export$95185d699e05d4d7);
23
23
  $parcel$export(module.exports, "getSyntheticLinkProps", () => $4068a0fae83b6d84$export$51437d503373d223);
24
24
  $parcel$export(module.exports, "RouterProvider", () => $4068a0fae83b6d84$export$323e4fc2fa4753fb);
25
+ $parcel$export(module.exports, "shouldClientNavigate", () => $4068a0fae83b6d84$export$efa8c9099e530235);
25
26
  $parcel$export(module.exports, "useRouter", () => $4068a0fae83b6d84$export$9a302a45f65d0572);
26
27
  $parcel$export(module.exports, "runAfterTransition", () => $e8117ebcab55be6a$export$24490316f764c430);
27
28
  $parcel$export(module.exports, "useDrag1D", () => $28ed3fb20343b78b$export$7bbed75feba39706);
@@ -331,7 +332,7 @@ const $8d15d0e1797d4238$var$linkPropNames = new Set([
331
332
  ]);
332
333
  const $8d15d0e1797d4238$var$propRe = /^(data-.*)$/;
333
334
  function $8d15d0e1797d4238$export$457c3d6518dd4c6f(props, opts = {}) {
334
- let { labelable: labelable , isLink: isLink , propNames: propNames } = opts;
335
+ let { labelable: labelable, isLink: isLink, propNames: propNames } = opts;
335
336
  let filteredProps = {};
336
337
  for(const prop in props)if (Object.prototype.hasOwnProperty.call(props, prop) && ($8d15d0e1797d4238$var$DOMPropNames.has(prop) || labelable && $8d15d0e1797d4238$var$labelablePropNames.has(prop) || isLink && $8d15d0e1797d4238$var$linkPropNames.has(prop) || (propNames === null || propNames === void 0 ? void 0 : propNames.has(prop)) || $8d15d0e1797d4238$var$propRe.test(prop))) filteredProps[prop] = props[prop];
337
338
  return filteredProps;
@@ -396,7 +397,7 @@ function $1117b6c0d4c4c164$var$getScrollableElements(element) {
396
397
  return scrollableElements;
397
398
  }
398
399
  function $1117b6c0d4c4c164$var$restoreScrollPosition(scrollableElements) {
399
- for (let { element: element , scrollTop: scrollTop , scrollLeft: scrollLeft } of scrollableElements){
400
+ for (let { element: element, scrollTop: scrollTop, scrollLeft: scrollLeft } of scrollableElements){
400
401
  element.scrollTop = scrollTop;
401
402
  element.scrollLeft = scrollLeft;
402
403
  }
@@ -474,21 +475,24 @@ function $9e20cff0af27e8cc$export$6446a186d09e379e() {
474
475
  function $9e20cff0af27e8cc$export$a11b0059900ceec8() {
475
476
  return $9e20cff0af27e8cc$var$testUserAgent(/Android/i);
476
477
  }
478
+ function $9e20cff0af27e8cc$export$b7d78993b74f766d() {
479
+ return $9e20cff0af27e8cc$var$testUserAgent(/Firefox/i);
480
+ }
481
+
477
482
 
478
483
 
479
484
 
480
485
  const $4068a0fae83b6d84$var$RouterContext = /*#__PURE__*/ (0, $1Yh1N$react.createContext)({
486
+ isNative: true,
481
487
  open: $4068a0fae83b6d84$var$openSyntheticLink
482
488
  });
483
489
  function $4068a0fae83b6d84$export$323e4fc2fa4753fb(props) {
484
- let { children: children , navigate: navigate } = props;
490
+ let { children: children, navigate: navigate } = props;
485
491
  let ctx = (0, $1Yh1N$react.useMemo)(()=>({
492
+ isNative: false,
486
493
  open: (target, modifiers)=>{
487
494
  $4068a0fae83b6d84$var$getSyntheticLink(target, (link)=>{
488
- if ((!link.target || link.target === "_self") && link.origin === location.origin && !link.hasAttribute("download") && !modifiers.metaKey && // open in new tab (mac)
489
- !modifiers.ctrlKey && // open in new tab (windows)
490
- !modifiers.altKey && // download
491
- !modifiers.shiftKey) navigate(link.pathname + link.search + link.hash);
495
+ if ($4068a0fae83b6d84$export$efa8c9099e530235(link, modifiers)) navigate(link.pathname + link.search + link.hash);
492
496
  else $4068a0fae83b6d84$export$95185d699e05d4d7(link, modifiers);
493
497
  });
494
498
  }
@@ -502,11 +506,28 @@ function $4068a0fae83b6d84$export$323e4fc2fa4753fb(props) {
502
506
  function $4068a0fae83b6d84$export$9a302a45f65d0572() {
503
507
  return (0, $1Yh1N$react.useContext)($4068a0fae83b6d84$var$RouterContext);
504
508
  }
509
+ function $4068a0fae83b6d84$export$efa8c9099e530235(link, modifiers) {
510
+ // Use getAttribute here instead of link.target. Firefox will default link.target to "_parent" when inside an iframe.
511
+ let target = link.getAttribute("target");
512
+ return (!target || target === "_self") && link.origin === location.origin && !link.hasAttribute("download") && !modifiers.metaKey && // open in new tab (mac)
513
+ !modifiers.ctrlKey && // open in new tab (windows)
514
+ !modifiers.altKey && // download
515
+ !modifiers.shiftKey;
516
+ }
505
517
  function $4068a0fae83b6d84$export$95185d699e05d4d7(target, modifiers, setOpening = true) {
506
- let { metaKey: metaKey , ctrlKey: ctrlKey , altKey: altKey , shiftKey: shiftKey } = modifiers;
518
+ var _window_event, _window_event_type;
519
+ let { metaKey: metaKey, ctrlKey: ctrlKey, altKey: altKey, shiftKey: shiftKey } = modifiers;
520
+ // Firefox does not recognize keyboard events as a user action by default, and the popup blocker
521
+ // will prevent links with target="_blank" from opening. However, it does allow the event if the
522
+ // Command/Control key is held, which opens the link in a background tab. This seems like the best we can do.
523
+ // See https://bugzilla.mozilla.org/show_bug.cgi?id=257870 and https://bugzilla.mozilla.org/show_bug.cgi?id=746640.
524
+ if ((0, $9e20cff0af27e8cc$export$b7d78993b74f766d)() && ((_window_event = window.event) === null || _window_event === void 0 ? void 0 : (_window_event_type = _window_event.type) === null || _window_event_type === void 0 ? void 0 : _window_event_type.startsWith("key")) && target.target === "_blank") {
525
+ if ((0, $9e20cff0af27e8cc$export$9ac100e40613ea10)()) metaKey = true;
526
+ else ctrlKey = true;
527
+ }
507
528
  // WebKit does not support firing click events with modifier keys, but does support keyboard events.
508
529
  // https://github.com/WebKit/WebKit/blob/c03d0ac6e6db178f90923a0a63080b5ca210d25f/Source/WebCore/html/HTMLAnchorElement.cpp#L184
509
- let event = (0, $9e20cff0af27e8cc$export$78551043582a6a98)() && true ? new KeyboardEvent("keydown", {
530
+ let event = (0, $9e20cff0af27e8cc$export$78551043582a6a98)() && (0, $9e20cff0af27e8cc$export$9ac100e40613ea10)() && !(0, $9e20cff0af27e8cc$export$7bef049ce92e4224)() && true ? new KeyboardEvent("keydown", {
510
531
  keyIdentifier: "Enter",
511
532
  metaKey: metaKey,
512
533
  ctrlKey: ctrlKey,
@@ -642,7 +663,7 @@ function $e8117ebcab55be6a$export$24490316f764c430(fn) {
642
663
  const $28ed3fb20343b78b$var$draggingElements = [];
643
664
  function $28ed3fb20343b78b$export$7bbed75feba39706(props) {
644
665
  console.warn("useDrag1D is deprecated, please use `useMove` instead https://react-spectrum.adobe.com/react-aria/useMove.html");
645
- let { containerRef: containerRef , reverse: reverse , orientation: orientation , onHover: onHover , onDrag: onDrag , onPositionChange: onPositionChange , onIncrement: onIncrement , onDecrement: onDecrement , onIncrementToMax: onIncrementToMax , onDecrementToMin: onDecrementToMin , onCollapseToggle: onCollapseToggle } = props;
666
+ let { containerRef: containerRef, reverse: reverse, orientation: orientation, onHover: onHover, onDrag: onDrag, onPositionChange: onPositionChange, onIncrement: onIncrement, onDecrement: onDecrement, onIncrementToMax: onIncrementToMax, onDecrementToMin: onDecrementToMin, onCollapseToggle: onCollapseToggle } = props;
646
667
  let getPosition = (e)=>orientation === "horizontal" ? e.clientX : e.clientY;
647
668
  let getNextOffset = (e)=>{
648
669
  let containerOffset = (0, $16ec41ef3e36c19c$export$622cea445a1c5b7d)(containerRef.current, reverse, orientation);
@@ -819,7 +840,7 @@ function $4571ff54ac709100$export$4eaf04e54aa8eed6() {
819
840
  * governing permissions and limitations under the License.
820
841
  */
821
842
  function $6ec78bde395c477d$export$d6875122194c7b44(props, defaultLabel) {
822
- let { id: id , "aria-label": label , "aria-labelledby": labelledBy } = props;
843
+ let { id: id, "aria-label": label, "aria-labelledby": labelledBy } = props;
823
844
  // If there is both an aria-label and aria-labelledby,
824
845
  // combine them by pointing to the element itself.
825
846
  id = (0, $8c61827343eed941$export$f680877a34711e37)(id);
@@ -905,7 +926,7 @@ function $37733e1652f47193$var$hasResizeObserver() {
905
926
  return typeof window.ResizeObserver !== "undefined";
906
927
  }
907
928
  function $37733e1652f47193$export$683480f191c0e3ea(options) {
908
- const { ref: ref , onResize: onResize } = options;
929
+ const { ref: ref, onResize: onResize } = options;
909
930
  (0, $1Yh1N$react.useEffect)(()=>{
910
931
  let element = ref === null || ref === void 0 ? void 0 : ref.current;
911
932
  if (!element) return;
@@ -1118,7 +1139,7 @@ function $449412113267a1fe$export$53a0910f038337bd(scrollView, element) {
1118
1139
  let x = scrollView.scrollLeft;
1119
1140
  let y = scrollView.scrollTop;
1120
1141
  // Account for top/left border offsetting the scroll top/Left
1121
- let { borderTopWidth: borderTopWidth , borderLeftWidth: borderLeftWidth } = getComputedStyle(scrollView);
1142
+ let { borderTopWidth: borderTopWidth, borderLeftWidth: borderLeftWidth } = getComputedStyle(scrollView);
1122
1143
  let borderAdjustedX = scrollView.scrollLeft + parseInt(borderLeftWidth, 10);
1123
1144
  let borderAdjustedY = scrollView.scrollTop + parseInt(borderTopWidth, 10);
1124
1145
  // Ignore end/bottom border via clientHeight/Width instead of offsetHeight/Width
@@ -1160,11 +1181,11 @@ function $449412113267a1fe$export$c826860796309d1b(targetElement, opts) {
1160
1181
  var // use scrollIntoView({block: 'nearest'}) instead of .focus to check if the element is fully in view or not since .focus()
1161
1182
  // won't cause a scroll if the element is already focused and doesn't behave consistently when an element is partially out of view horizontally vs vertically
1162
1183
  _targetElement_scrollIntoView;
1163
- let { left: originalLeft , top: originalTop } = targetElement.getBoundingClientRect();
1184
+ let { left: originalLeft, top: originalTop } = targetElement.getBoundingClientRect();
1164
1185
  targetElement === null || targetElement === void 0 ? void 0 : (_targetElement_scrollIntoView = targetElement.scrollIntoView) === null || _targetElement_scrollIntoView === void 0 ? void 0 : _targetElement_scrollIntoView.call(targetElement, {
1165
1186
  block: "nearest"
1166
1187
  });
1167
- let { left: newLeft , top: newTop } = targetElement.getBoundingClientRect();
1188
+ let { left: newLeft, top: newTop } = targetElement.getBoundingClientRect();
1168
1189
  // Account for sub pixel differences from rounding
1169
1190
  if (Math.abs(originalLeft - newLeft) > 1 || Math.abs(originalTop - newTop) > 1) {
1170
1191
  var _opts_containingElement, _opts_containingElement_scrollIntoView, _targetElement_scrollIntoView1;