@react-aria/utils 3.0.0-nightly.2427 → 3.0.0-nightly.2431

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
@@ -1,5 +1,5 @@
1
1
  import {clamp as $4507461a1b870123$re_export$clamp, snapValueToStep as $4507461a1b870123$re_export$snapValueToStep} from "@react-stately/utils";
2
- import $12uGp$react, {useState as $12uGp$useState, useRef as $12uGp$useRef, useCallback as $12uGp$useCallback, useEffect as $12uGp$useEffect, useMemo as $12uGp$useMemo} from "react";
2
+ import $12uGp$react, {useState as $12uGp$useState, useRef as $12uGp$useRef, useCallback as $12uGp$useCallback, useEffect as $12uGp$useEffect, createContext as $12uGp$createContext, useMemo as $12uGp$useMemo, useContext as $12uGp$useContext} from "react";
3
3
  import {useSSRSafeId as $12uGp$useSSRSafeId} from "@react-aria/ssr";
4
4
  import $12uGp$clsx from "clsx";
5
5
 
@@ -268,11 +268,20 @@ const $65484d02dcb7eb3e$var$labelablePropNames = new Set([
268
268
  "aria-describedby",
269
269
  "aria-details"
270
270
  ]);
271
+ // See LinkDOMProps in dom.d.ts.
272
+ const $65484d02dcb7eb3e$var$linkPropNames = new Set([
273
+ "href",
274
+ "target",
275
+ "rel",
276
+ "download",
277
+ "ping",
278
+ "referrerPolicy"
279
+ ]);
271
280
  const $65484d02dcb7eb3e$var$propRe = /^(data-.*)$/;
272
281
  function $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, opts = {}) {
273
- let { labelable: labelable , propNames: propNames } = opts;
282
+ let { labelable: labelable , isLink: isLink , propNames: propNames } = opts;
274
283
  let filteredProps = {};
275
- for(const prop in props)if (Object.prototype.hasOwnProperty.call(props, prop) && ($65484d02dcb7eb3e$var$DOMPropNames.has(prop) || labelable && $65484d02dcb7eb3e$var$labelablePropNames.has(prop) || (propNames === null || propNames === void 0 ? void 0 : propNames.has(prop)) || $65484d02dcb7eb3e$var$propRe.test(prop))) filteredProps[prop] = props[prop];
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];
276
285
  return filteredProps;
277
286
  }
278
287
 
@@ -359,6 +368,142 @@ function $7215afc6de606d6b$var$restoreScrollPosition(scrollableElements) {
359
368
  }
360
369
 
361
370
 
371
+ /*
372
+ * Copyright 2023 Adobe. All rights reserved.
373
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
374
+ * you may not use this file except in compliance with the License. You may obtain a copy
375
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
376
+ *
377
+ * Unless required by applicable law or agreed to in writing, software distributed under
378
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
379
+ * OF ANY KIND, either express or implied. See the License for the specific language
380
+ * governing permissions and limitations under the License.
381
+ */ /*
382
+ * Copyright 2020 Adobe. All rights reserved.
383
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
384
+ * you may not use this file except in compliance with the License. You may obtain a copy
385
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
386
+ *
387
+ * Unless required by applicable law or agreed to in writing, software distributed under
388
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
389
+ * OF ANY KIND, either express or implied. See the License for the specific language
390
+ * governing permissions and limitations under the License.
391
+ */ function $c87311424ea30a05$var$testUserAgent(re) {
392
+ var _window_navigator_userAgentData;
393
+ if (typeof window === "undefined" || window.navigator == null) return false;
394
+ return ((_window_navigator_userAgentData = window.navigator["userAgentData"]) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.brands.some((brand)=>re.test(brand.brand))) || re.test(window.navigator.userAgent);
395
+ }
396
+ function $c87311424ea30a05$var$testPlatform(re) {
397
+ var _window_navigator_userAgentData;
398
+ return typeof window !== "undefined" && window.navigator != null ? re.test(((_window_navigator_userAgentData = window.navigator["userAgentData"]) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.platform) || window.navigator.platform) : false;
399
+ }
400
+ function $c87311424ea30a05$export$9ac100e40613ea10() {
401
+ return $c87311424ea30a05$var$testPlatform(/^Mac/i);
402
+ }
403
+ function $c87311424ea30a05$export$186c6964ca17d99() {
404
+ return $c87311424ea30a05$var$testPlatform(/^iPhone/i);
405
+ }
406
+ function $c87311424ea30a05$export$7bef049ce92e4224() {
407
+ return $c87311424ea30a05$var$testPlatform(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
408
+ $c87311424ea30a05$export$9ac100e40613ea10() && navigator.maxTouchPoints > 1;
409
+ }
410
+ function $c87311424ea30a05$export$fedb369cb70207f1() {
411
+ return $c87311424ea30a05$export$186c6964ca17d99() || $c87311424ea30a05$export$7bef049ce92e4224();
412
+ }
413
+ function $c87311424ea30a05$export$e1865c3bedcd822b() {
414
+ return $c87311424ea30a05$export$9ac100e40613ea10() || $c87311424ea30a05$export$fedb369cb70207f1();
415
+ }
416
+ function $c87311424ea30a05$export$78551043582a6a98() {
417
+ return $c87311424ea30a05$var$testUserAgent(/AppleWebKit/i) && !$c87311424ea30a05$export$6446a186d09e379e();
418
+ }
419
+ function $c87311424ea30a05$export$6446a186d09e379e() {
420
+ return $c87311424ea30a05$var$testUserAgent(/Chrome/i);
421
+ }
422
+ function $c87311424ea30a05$export$a11b0059900ceec8() {
423
+ return $c87311424ea30a05$var$testUserAgent(/Android/i);
424
+ }
425
+
426
+
427
+
428
+ const $ea8dcbcb9ea1b556$var$RouterContext = /*#__PURE__*/ (0, $12uGp$createContext)({
429
+ open: $ea8dcbcb9ea1b556$var$openSyntheticLink
430
+ });
431
+ function $ea8dcbcb9ea1b556$export$323e4fc2fa4753fb(props) {
432
+ let { children: children , navigate: navigate } = props;
433
+ let ctx = (0, $12uGp$useMemo)(()=>({
434
+ open: (target, modifiers)=>{
435
+ $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);
440
+ else $ea8dcbcb9ea1b556$export$95185d699e05d4d7(link, modifiers);
441
+ });
442
+ }
443
+ }), [
444
+ navigate
445
+ ]);
446
+ return /*#__PURE__*/ (0, $12uGp$react).createElement($ea8dcbcb9ea1b556$var$RouterContext.Provider, {
447
+ value: ctx
448
+ }, children);
449
+ }
450
+ function $ea8dcbcb9ea1b556$export$9a302a45f65d0572() {
451
+ return (0, $12uGp$useContext)($ea8dcbcb9ea1b556$var$RouterContext);
452
+ }
453
+ function $ea8dcbcb9ea1b556$export$95185d699e05d4d7(target, modifiers, setOpening = true) {
454
+ let { metaKey: metaKey , ctrlKey: ctrlKey , altKey: altKey , shiftKey: shiftKey } = modifiers;
455
+ // WebKit does not support firing click events with modifier keys, but does support keyboard events.
456
+ // https://github.com/WebKit/WebKit/blob/c03d0ac6e6db178f90923a0a63080b5ca210d25f/Source/WebCore/html/HTMLAnchorElement.cpp#L184
457
+ let event = (0, $c87311424ea30a05$export$78551043582a6a98)() && true ? new KeyboardEvent("keydown", {
458
+ keyIdentifier: "Enter",
459
+ metaKey: metaKey,
460
+ ctrlKey: ctrlKey,
461
+ altKey: altKey,
462
+ shiftKey: shiftKey
463
+ }) : new MouseEvent("click", {
464
+ metaKey: metaKey,
465
+ ctrlKey: ctrlKey,
466
+ altKey: altKey,
467
+ shiftKey: shiftKey,
468
+ bubbles: true,
469
+ cancelable: true
470
+ });
471
+ $ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening = setOpening;
472
+ (0, $7215afc6de606d6b$export$de79e2c695e052f3)(target);
473
+ target.dispatchEvent(event);
474
+ $ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening = false;
475
+ }
476
+ $ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening = false;
477
+ function $ea8dcbcb9ea1b556$var$getSyntheticLink(target, open) {
478
+ if (target instanceof HTMLAnchorElement) open(target);
479
+ else if (target.hasAttribute("data-href")) {
480
+ let link = document.createElement("a");
481
+ link.href = target.getAttribute("data-href");
482
+ if (target.hasAttribute("data-target")) link.target = target.getAttribute("data-target");
483
+ if (target.hasAttribute("data-rel")) link.rel = target.getAttribute("data-rel");
484
+ if (target.hasAttribute("data-download")) link.download = target.getAttribute("data-download");
485
+ if (target.hasAttribute("data-ping")) link.ping = target.getAttribute("data-ping");
486
+ if (target.hasAttribute("data-referrer-policy")) link.referrerPolicy = target.getAttribute("data-referrer-policy");
487
+ target.appendChild(link);
488
+ open(link);
489
+ target.removeChild(link);
490
+ }
491
+ }
492
+ function $ea8dcbcb9ea1b556$var$openSyntheticLink(target, modifiers) {
493
+ $ea8dcbcb9ea1b556$var$getSyntheticLink(target, (link)=>$ea8dcbcb9ea1b556$export$95185d699e05d4d7(link, modifiers));
494
+ }
495
+ function $ea8dcbcb9ea1b556$export$51437d503373d223(props) {
496
+ return {
497
+ "data-href": props.href,
498
+ "data-target": props.target,
499
+ "data-rel": props.rel,
500
+ "data-download": props.download,
501
+ "data-ping": props.ping,
502
+ "data-referrer-policy": props.referrerPolicy
503
+ };
504
+ }
505
+
506
+
362
507
  /*
363
508
  * Copyright 2020 Adobe. All rights reserved.
364
509
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
@@ -871,51 +1016,6 @@ function $ef06256079686ba0$export$f8aeda7b10753fa1(description) {
871
1016
  }
872
1017
 
873
1018
 
874
- /*
875
- * Copyright 2020 Adobe. All rights reserved.
876
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
877
- * you may not use this file except in compliance with the License. You may obtain a copy
878
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
879
- *
880
- * Unless required by applicable law or agreed to in writing, software distributed under
881
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
882
- * OF ANY KIND, either express or implied. See the License for the specific language
883
- * governing permissions and limitations under the License.
884
- */ function $c87311424ea30a05$var$testUserAgent(re) {
885
- var _window_navigator_userAgentData;
886
- if (typeof window === "undefined" || window.navigator == null) return false;
887
- return ((_window_navigator_userAgentData = window.navigator["userAgentData"]) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.brands.some((brand)=>re.test(brand.brand))) || re.test(window.navigator.userAgent);
888
- }
889
- function $c87311424ea30a05$var$testPlatform(re) {
890
- var _window_navigator_userAgentData;
891
- return typeof window !== "undefined" && window.navigator != null ? re.test(((_window_navigator_userAgentData = window.navigator["userAgentData"]) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.platform) || window.navigator.platform) : false;
892
- }
893
- function $c87311424ea30a05$export$9ac100e40613ea10() {
894
- return $c87311424ea30a05$var$testPlatform(/^Mac/i);
895
- }
896
- function $c87311424ea30a05$export$186c6964ca17d99() {
897
- return $c87311424ea30a05$var$testPlatform(/^iPhone/i);
898
- }
899
- function $c87311424ea30a05$export$7bef049ce92e4224() {
900
- return $c87311424ea30a05$var$testPlatform(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
901
- $c87311424ea30a05$export$9ac100e40613ea10() && navigator.maxTouchPoints > 1;
902
- }
903
- function $c87311424ea30a05$export$fedb369cb70207f1() {
904
- return $c87311424ea30a05$export$186c6964ca17d99() || $c87311424ea30a05$export$7bef049ce92e4224();
905
- }
906
- function $c87311424ea30a05$export$e1865c3bedcd822b() {
907
- return $c87311424ea30a05$export$9ac100e40613ea10() || $c87311424ea30a05$export$fedb369cb70207f1();
908
- }
909
- function $c87311424ea30a05$export$78551043582a6a98() {
910
- return $c87311424ea30a05$var$testUserAgent(/AppleWebKit/i) && !$c87311424ea30a05$export$6446a186d09e379e();
911
- }
912
- function $c87311424ea30a05$export$6446a186d09e379e() {
913
- return $c87311424ea30a05$var$testUserAgent(/Chrome/i);
914
- }
915
- function $c87311424ea30a05$export$a11b0059900ceec8() {
916
- return $c87311424ea30a05$var$testUserAgent(/Android/i);
917
- }
918
-
919
1019
 
920
1020
  /*
921
1021
  * Copyright 2021 Adobe. All rights reserved.
@@ -1127,5 +1227,5 @@ function $99facab73266f662$export$5add1d006293d136(ref, initialValue, onReset) {
1127
1227
 
1128
1228
 
1129
1229
 
1130
- 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, $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};
1230
+ 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};
1131
1231
  //# sourceMappingURL=module.js.map
package/dist/main.js CHANGED
@@ -19,6 +19,10 @@ $parcel$export(module.exports, "mergeRefs", () => $f05dc24eafaeb7e2$export$c9058
19
19
  $parcel$export(module.exports, "filterDOMProps", () => $8d15d0e1797d4238$export$457c3d6518dd4c6f);
20
20
  $parcel$export(module.exports, "focusWithoutScrolling", () => $1117b6c0d4c4c164$export$de79e2c695e052f3);
21
21
  $parcel$export(module.exports, "getOffset", () => $16ec41ef3e36c19c$export$622cea445a1c5b7d);
22
+ $parcel$export(module.exports, "openLink", () => $4068a0fae83b6d84$export$95185d699e05d4d7);
23
+ $parcel$export(module.exports, "getSyntheticLinkProps", () => $4068a0fae83b6d84$export$51437d503373d223);
24
+ $parcel$export(module.exports, "RouterProvider", () => $4068a0fae83b6d84$export$323e4fc2fa4753fb);
25
+ $parcel$export(module.exports, "useRouter", () => $4068a0fae83b6d84$export$9a302a45f65d0572);
22
26
  $parcel$export(module.exports, "runAfterTransition", () => $e8117ebcab55be6a$export$24490316f764c430);
23
27
  $parcel$export(module.exports, "useDrag1D", () => $28ed3fb20343b78b$export$7bbed75feba39706);
24
28
  $parcel$export(module.exports, "useGlobalListeners", () => $4571ff54ac709100$export$4eaf04e54aa8eed6);
@@ -316,11 +320,20 @@ const $8d15d0e1797d4238$var$labelablePropNames = new Set([
316
320
  "aria-describedby",
317
321
  "aria-details"
318
322
  ]);
323
+ // See LinkDOMProps in dom.d.ts.
324
+ const $8d15d0e1797d4238$var$linkPropNames = new Set([
325
+ "href",
326
+ "target",
327
+ "rel",
328
+ "download",
329
+ "ping",
330
+ "referrerPolicy"
331
+ ]);
319
332
  const $8d15d0e1797d4238$var$propRe = /^(data-.*)$/;
320
333
  function $8d15d0e1797d4238$export$457c3d6518dd4c6f(props, opts = {}) {
321
- let { labelable: labelable , propNames: propNames } = opts;
334
+ let { labelable: labelable , isLink: isLink , propNames: propNames } = opts;
322
335
  let filteredProps = {};
323
- for(const prop in props)if (Object.prototype.hasOwnProperty.call(props, prop) && ($8d15d0e1797d4238$var$DOMPropNames.has(prop) || labelable && $8d15d0e1797d4238$var$labelablePropNames.has(prop) || (propNames === null || propNames === void 0 ? void 0 : propNames.has(prop)) || $8d15d0e1797d4238$var$propRe.test(prop))) filteredProps[prop] = props[prop];
336
+ 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];
324
337
  return filteredProps;
325
338
  }
326
339
 
@@ -407,6 +420,142 @@ function $1117b6c0d4c4c164$var$restoreScrollPosition(scrollableElements) {
407
420
  }
408
421
 
409
422
 
423
+ /*
424
+ * Copyright 2023 Adobe. All rights reserved.
425
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
426
+ * you may not use this file except in compliance with the License. You may obtain a copy
427
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
428
+ *
429
+ * Unless required by applicable law or agreed to in writing, software distributed under
430
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
431
+ * OF ANY KIND, either express or implied. See the License for the specific language
432
+ * governing permissions and limitations under the License.
433
+ */ /*
434
+ * Copyright 2020 Adobe. All rights reserved.
435
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
436
+ * you may not use this file except in compliance with the License. You may obtain a copy
437
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
438
+ *
439
+ * Unless required by applicable law or agreed to in writing, software distributed under
440
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
441
+ * OF ANY KIND, either express or implied. See the License for the specific language
442
+ * governing permissions and limitations under the License.
443
+ */ function $9e20cff0af27e8cc$var$testUserAgent(re) {
444
+ var _window_navigator_userAgentData;
445
+ if (typeof window === "undefined" || window.navigator == null) return false;
446
+ return ((_window_navigator_userAgentData = window.navigator["userAgentData"]) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.brands.some((brand)=>re.test(brand.brand))) || re.test(window.navigator.userAgent);
447
+ }
448
+ function $9e20cff0af27e8cc$var$testPlatform(re) {
449
+ var _window_navigator_userAgentData;
450
+ return typeof window !== "undefined" && window.navigator != null ? re.test(((_window_navigator_userAgentData = window.navigator["userAgentData"]) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.platform) || window.navigator.platform) : false;
451
+ }
452
+ function $9e20cff0af27e8cc$export$9ac100e40613ea10() {
453
+ return $9e20cff0af27e8cc$var$testPlatform(/^Mac/i);
454
+ }
455
+ function $9e20cff0af27e8cc$export$186c6964ca17d99() {
456
+ return $9e20cff0af27e8cc$var$testPlatform(/^iPhone/i);
457
+ }
458
+ function $9e20cff0af27e8cc$export$7bef049ce92e4224() {
459
+ return $9e20cff0af27e8cc$var$testPlatform(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
460
+ $9e20cff0af27e8cc$export$9ac100e40613ea10() && navigator.maxTouchPoints > 1;
461
+ }
462
+ function $9e20cff0af27e8cc$export$fedb369cb70207f1() {
463
+ return $9e20cff0af27e8cc$export$186c6964ca17d99() || $9e20cff0af27e8cc$export$7bef049ce92e4224();
464
+ }
465
+ function $9e20cff0af27e8cc$export$e1865c3bedcd822b() {
466
+ return $9e20cff0af27e8cc$export$9ac100e40613ea10() || $9e20cff0af27e8cc$export$fedb369cb70207f1();
467
+ }
468
+ function $9e20cff0af27e8cc$export$78551043582a6a98() {
469
+ return $9e20cff0af27e8cc$var$testUserAgent(/AppleWebKit/i) && !$9e20cff0af27e8cc$export$6446a186d09e379e();
470
+ }
471
+ function $9e20cff0af27e8cc$export$6446a186d09e379e() {
472
+ return $9e20cff0af27e8cc$var$testUserAgent(/Chrome/i);
473
+ }
474
+ function $9e20cff0af27e8cc$export$a11b0059900ceec8() {
475
+ return $9e20cff0af27e8cc$var$testUserAgent(/Android/i);
476
+ }
477
+
478
+
479
+
480
+ const $4068a0fae83b6d84$var$RouterContext = /*#__PURE__*/ (0, $1Yh1N$react.createContext)({
481
+ open: $4068a0fae83b6d84$var$openSyntheticLink
482
+ });
483
+ function $4068a0fae83b6d84$export$323e4fc2fa4753fb(props) {
484
+ let { children: children , navigate: navigate } = props;
485
+ let ctx = (0, $1Yh1N$react.useMemo)(()=>({
486
+ open: (target, modifiers)=>{
487
+ $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);
492
+ else $4068a0fae83b6d84$export$95185d699e05d4d7(link, modifiers);
493
+ });
494
+ }
495
+ }), [
496
+ navigate
497
+ ]);
498
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($1Yh1N$react))).createElement($4068a0fae83b6d84$var$RouterContext.Provider, {
499
+ value: ctx
500
+ }, children);
501
+ }
502
+ function $4068a0fae83b6d84$export$9a302a45f65d0572() {
503
+ return (0, $1Yh1N$react.useContext)($4068a0fae83b6d84$var$RouterContext);
504
+ }
505
+ function $4068a0fae83b6d84$export$95185d699e05d4d7(target, modifiers, setOpening = true) {
506
+ let { metaKey: metaKey , ctrlKey: ctrlKey , altKey: altKey , shiftKey: shiftKey } = modifiers;
507
+ // WebKit does not support firing click events with modifier keys, but does support keyboard events.
508
+ // https://github.com/WebKit/WebKit/blob/c03d0ac6e6db178f90923a0a63080b5ca210d25f/Source/WebCore/html/HTMLAnchorElement.cpp#L184
509
+ let event = (0, $9e20cff0af27e8cc$export$78551043582a6a98)() && true ? new KeyboardEvent("keydown", {
510
+ keyIdentifier: "Enter",
511
+ metaKey: metaKey,
512
+ ctrlKey: ctrlKey,
513
+ altKey: altKey,
514
+ shiftKey: shiftKey
515
+ }) : new MouseEvent("click", {
516
+ metaKey: metaKey,
517
+ ctrlKey: ctrlKey,
518
+ altKey: altKey,
519
+ shiftKey: shiftKey,
520
+ bubbles: true,
521
+ cancelable: true
522
+ });
523
+ $4068a0fae83b6d84$export$95185d699e05d4d7.isOpening = setOpening;
524
+ (0, $1117b6c0d4c4c164$export$de79e2c695e052f3)(target);
525
+ target.dispatchEvent(event);
526
+ $4068a0fae83b6d84$export$95185d699e05d4d7.isOpening = false;
527
+ }
528
+ $4068a0fae83b6d84$export$95185d699e05d4d7.isOpening = false;
529
+ function $4068a0fae83b6d84$var$getSyntheticLink(target, open) {
530
+ if (target instanceof HTMLAnchorElement) open(target);
531
+ else if (target.hasAttribute("data-href")) {
532
+ let link = document.createElement("a");
533
+ link.href = target.getAttribute("data-href");
534
+ if (target.hasAttribute("data-target")) link.target = target.getAttribute("data-target");
535
+ if (target.hasAttribute("data-rel")) link.rel = target.getAttribute("data-rel");
536
+ if (target.hasAttribute("data-download")) link.download = target.getAttribute("data-download");
537
+ if (target.hasAttribute("data-ping")) link.ping = target.getAttribute("data-ping");
538
+ if (target.hasAttribute("data-referrer-policy")) link.referrerPolicy = target.getAttribute("data-referrer-policy");
539
+ target.appendChild(link);
540
+ open(link);
541
+ target.removeChild(link);
542
+ }
543
+ }
544
+ function $4068a0fae83b6d84$var$openSyntheticLink(target, modifiers) {
545
+ $4068a0fae83b6d84$var$getSyntheticLink(target, (link)=>$4068a0fae83b6d84$export$95185d699e05d4d7(link, modifiers));
546
+ }
547
+ function $4068a0fae83b6d84$export$51437d503373d223(props) {
548
+ return {
549
+ "data-href": props.href,
550
+ "data-target": props.target,
551
+ "data-rel": props.rel,
552
+ "data-download": props.download,
553
+ "data-ping": props.ping,
554
+ "data-referrer-policy": props.referrerPolicy
555
+ };
556
+ }
557
+
558
+
410
559
  /*
411
560
  * Copyright 2020 Adobe. All rights reserved.
412
561
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
@@ -919,51 +1068,6 @@ function $34da4502ea8120db$export$f8aeda7b10753fa1(description) {
919
1068
  }
920
1069
 
921
1070
 
922
- /*
923
- * Copyright 2020 Adobe. All rights reserved.
924
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
925
- * you may not use this file except in compliance with the License. You may obtain a copy
926
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
927
- *
928
- * Unless required by applicable law or agreed to in writing, software distributed under
929
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
930
- * OF ANY KIND, either express or implied. See the License for the specific language
931
- * governing permissions and limitations under the License.
932
- */ function $9e20cff0af27e8cc$var$testUserAgent(re) {
933
- var _window_navigator_userAgentData;
934
- if (typeof window === "undefined" || window.navigator == null) return false;
935
- return ((_window_navigator_userAgentData = window.navigator["userAgentData"]) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.brands.some((brand)=>re.test(brand.brand))) || re.test(window.navigator.userAgent);
936
- }
937
- function $9e20cff0af27e8cc$var$testPlatform(re) {
938
- var _window_navigator_userAgentData;
939
- return typeof window !== "undefined" && window.navigator != null ? re.test(((_window_navigator_userAgentData = window.navigator["userAgentData"]) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.platform) || window.navigator.platform) : false;
940
- }
941
- function $9e20cff0af27e8cc$export$9ac100e40613ea10() {
942
- return $9e20cff0af27e8cc$var$testPlatform(/^Mac/i);
943
- }
944
- function $9e20cff0af27e8cc$export$186c6964ca17d99() {
945
- return $9e20cff0af27e8cc$var$testPlatform(/^iPhone/i);
946
- }
947
- function $9e20cff0af27e8cc$export$7bef049ce92e4224() {
948
- return $9e20cff0af27e8cc$var$testPlatform(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
949
- $9e20cff0af27e8cc$export$9ac100e40613ea10() && navigator.maxTouchPoints > 1;
950
- }
951
- function $9e20cff0af27e8cc$export$fedb369cb70207f1() {
952
- return $9e20cff0af27e8cc$export$186c6964ca17d99() || $9e20cff0af27e8cc$export$7bef049ce92e4224();
953
- }
954
- function $9e20cff0af27e8cc$export$e1865c3bedcd822b() {
955
- return $9e20cff0af27e8cc$export$9ac100e40613ea10() || $9e20cff0af27e8cc$export$fedb369cb70207f1();
956
- }
957
- function $9e20cff0af27e8cc$export$78551043582a6a98() {
958
- return $9e20cff0af27e8cc$var$testUserAgent(/AppleWebKit/i) && !$9e20cff0af27e8cc$export$6446a186d09e379e();
959
- }
960
- function $9e20cff0af27e8cc$export$6446a186d09e379e() {
961
- return $9e20cff0af27e8cc$var$testUserAgent(/Chrome/i);
962
- }
963
- function $9e20cff0af27e8cc$export$a11b0059900ceec8() {
964
- return $9e20cff0af27e8cc$var$testUserAgent(/Android/i);
965
- }
966
-
967
1071
 
968
1072
  /*
969
1073
  * Copyright 2021 Adobe. All rights reserved.