@planningcenter/tapestry 3.2.2-rc.9 → 3.2.2
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/components/NumberStepper/NumberStepper.d.ts +8 -16
- package/dist/components/NumberStepper/NumberStepper.d.ts.map +1 -1
- package/dist/components/NumberStepper/NumberStepper.js +2 -2
- package/dist/components/NumberStepper/NumberStepper.js.map +1 -1
- package/dist/components/date-picker/DatePicker.d.ts +7 -5
- package/dist/components/date-picker/DatePicker.d.ts.map +1 -1
- package/dist/components/date-picker/DatePicker.js +130 -6
- package/dist/components/date-picker/DatePicker.js.map +1 -1
- package/dist/components/select/Select.d.ts +2 -2
- package/dist/components/select/Select.d.ts.map +1 -1
- package/dist/components/select/Select.js +4 -1
- package/dist/components/select/Select.js.map +1 -1
- package/dist/components/select/SelectNative.d.ts +2 -2
- package/dist/components/select/SelectNative.d.ts.map +1 -1
- package/dist/components/select/SelectNative.js.map +1 -1
- package/dist/components/select/SelectPopover.d.ts +2 -1
- package/dist/components/select/SelectPopover.d.ts.map +1 -1
- package/dist/components/select/SelectPopover.js.map +1 -1
- package/dist/ext/@internationalized/date/dist/CalendarDate.js +62 -4
- package/dist/ext/@internationalized/date/dist/CalendarDate.js.map +1 -1
- package/dist/ext/@internationalized/date/dist/conversion.js +33 -2
- package/dist/ext/@internationalized/date/dist/conversion.js.map +1 -1
- package/dist/ext/@internationalized/date/dist/manipulation.js +117 -1
- package/dist/ext/@internationalized/date/dist/manipulation.js.map +1 -1
- package/dist/ext/@internationalized/date/dist/queries.js +9 -1
- package/dist/ext/@internationalized/date/dist/queries.js.map +1 -1
- package/dist/ext/@internationalized/date/dist/string.js +14 -1
- package/dist/ext/@internationalized/date/dist/string.js.map +1 -1
- package/dist/ext/@react-aria/focus/dist/FocusScope.js +664 -0
- package/dist/ext/@react-aria/focus/dist/FocusScope.js.map +1 -0
- package/dist/ext/@react-aria/interactions/dist/focusSafely.js +38 -0
- package/dist/ext/@react-aria/interactions/dist/focusSafely.js.map +1 -0
- package/dist/ext/@react-aria/interactions/dist/useFocusVisible.js +165 -0
- package/dist/ext/@react-aria/interactions/dist/useFocusVisible.js.map +1 -0
- package/dist/ext/@react-aria/interactions/dist/utils.js +6 -0
- package/dist/ext/@react-aria/interactions/dist/utils.js.map +1 -0
- package/dist/ext/@react-aria/utils/dist/DOMFunctions.js +38 -0
- package/dist/ext/@react-aria/utils/dist/DOMFunctions.js.map +1 -0
- package/dist/ext/@react-aria/utils/dist/ShadowTreeWalker.js +193 -0
- package/dist/ext/@react-aria/utils/dist/ShadowTreeWalker.js.map +1 -0
- package/dist/ext/@react-aria/utils/dist/domHelpers.js +20 -0
- package/dist/ext/@react-aria/utils/dist/domHelpers.js.map +1 -0
- package/dist/ext/@react-aria/utils/dist/focusWithoutScrolling.js +66 -0
- package/dist/ext/@react-aria/utils/dist/focusWithoutScrolling.js.map +1 -0
- package/dist/ext/@react-aria/utils/dist/isElementVisible.js +39 -0
- package/dist/ext/@react-aria/utils/dist/isElementVisible.js.map +1 -0
- package/dist/ext/@react-aria/utils/dist/isFocusable.js +49 -0
- package/dist/ext/@react-aria/utils/dist/isFocusable.js.map +1 -0
- package/dist/ext/@react-aria/utils/dist/isVirtualEvent.js +25 -0
- package/dist/ext/@react-aria/utils/dist/isVirtualEvent.js.map +1 -0
- package/dist/ext/@react-aria/utils/dist/openLink.js +42 -0
- package/dist/ext/@react-aria/utils/dist/openLink.js.map +1 -0
- package/dist/ext/@react-aria/utils/dist/platform.js +59 -0
- package/dist/ext/@react-aria/utils/dist/platform.js.map +1 -0
- package/dist/ext/@react-aria/utils/dist/runAfterTransition.js +91 -0
- package/dist/ext/@react-aria/utils/dist/runAfterTransition.js.map +1 -0
- package/dist/ext/@react-aria/utils/dist/useLayoutEffect.js +17 -0
- package/dist/ext/@react-aria/utils/dist/useLayoutEffect.js.map +1 -0
- package/dist/ext/@react-stately/flags/dist/import.js +7 -0
- package/dist/ext/@react-stately/flags/dist/import.js.map +1 -0
- package/dist/reactRender.css +756 -622
- package/dist/reactRender.css.map +1 -1
- package/dist/reactRenderLegacy.css +756 -622
- package/dist/reactRenderLegacy.css.map +1 -1
- package/dist/unstable.css +137 -3
- package/dist/unstable.css.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FocusScope.js","sources":["../../../../../../../node_modules/@react-aria/focus/dist/FocusScope.mjs"],"sourcesContent":["import {useLayoutEffect as $cgawC$useLayoutEffect, getActiveElement as $cgawC$getActiveElement, getOwnerDocument as $cgawC$getOwnerDocument, getOwnerWindow as $cgawC$getOwnerWindow, getEventTarget as $cgawC$getEventTarget, isAndroid as $cgawC$isAndroid, isChrome as $cgawC$isChrome, nodeContains as $cgawC$nodeContains, isTabbable as $cgawC$isTabbable, isFocusable as $cgawC$isFocusable, createShadowTreeWalker as $cgawC$createShadowTreeWalker} from \"@react-aria/utils\";\nimport {getInteractionModality as $cgawC$getInteractionModality, focusSafely as $cgawC$focusSafely} from \"@react-aria/interactions\";\nimport $cgawC$react, {useRef as $cgawC$useRef, useContext as $cgawC$useContext, useMemo as $cgawC$useMemo, useEffect as $cgawC$useEffect} from \"react\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\nconst $9bf71ea28793e738$var$FocusContext = /*#__PURE__*/ (0, $cgawC$react).createContext(null);\nconst $9bf71ea28793e738$var$RESTORE_FOCUS_EVENT = 'react-aria-focus-scope-restore';\nlet $9bf71ea28793e738$var$activeScope = null;\nfunction $9bf71ea28793e738$export$20e40289641fbbb6(props) {\n let { children: children, contain: contain, restoreFocus: restoreFocus, autoFocus: autoFocus } = props;\n let startRef = (0, $cgawC$useRef)(null);\n let endRef = (0, $cgawC$useRef)(null);\n let scopeRef = (0, $cgawC$useRef)([]);\n let { parentNode: parentNode } = (0, $cgawC$useContext)($9bf71ea28793e738$var$FocusContext) || {};\n // Create a tree node here so we can add children to it even before it is added to the tree.\n let node = (0, $cgawC$useMemo)(()=>new $9bf71ea28793e738$var$TreeNode({\n scopeRef: scopeRef\n }), [\n scopeRef\n ]);\n (0, $cgawC$useLayoutEffect)(()=>{\n // If a new scope mounts outside the active scope, (e.g. DialogContainer launched from a menu),\n // use the active scope as the parent instead of the parent from context. Layout effects run bottom\n // up, so if the parent is not yet added to the tree, don't do this. Only the outer-most FocusScope\n // that is being added should get the activeScope as its parent.\n let parent = parentNode || $9bf71ea28793e738$export$d06fae2ee68b101e.root;\n if ($9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(parent.scopeRef) && $9bf71ea28793e738$var$activeScope && !$9bf71ea28793e738$var$isAncestorScope($9bf71ea28793e738$var$activeScope, parent.scopeRef)) {\n let activeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($9bf71ea28793e738$var$activeScope);\n if (activeNode) parent = activeNode;\n }\n // Add the node to the parent, and to the tree.\n parent.addChild(node);\n $9bf71ea28793e738$export$d06fae2ee68b101e.addNode(node);\n }, [\n node,\n parentNode\n ]);\n (0, $cgawC$useLayoutEffect)(()=>{\n let node = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef);\n if (node) node.contain = !!contain;\n }, [\n contain\n ]);\n (0, $cgawC$useLayoutEffect)(()=>{\n var _startRef_current;\n // Find all rendered nodes between the sentinels and add them to the scope.\n let node = (_startRef_current = startRef.current) === null || _startRef_current === void 0 ? void 0 : _startRef_current.nextSibling;\n let nodes = [];\n let stopPropagation = (e)=>e.stopPropagation();\n while(node && node !== endRef.current){\n nodes.push(node);\n // Stop custom restore focus event from propagating to parent focus scopes.\n node.addEventListener($9bf71ea28793e738$var$RESTORE_FOCUS_EVENT, stopPropagation);\n node = node.nextSibling;\n }\n scopeRef.current = nodes;\n return ()=>{\n for (let node of nodes)node.removeEventListener($9bf71ea28793e738$var$RESTORE_FOCUS_EVENT, stopPropagation);\n };\n }, [\n children\n ]);\n $9bf71ea28793e738$var$useActiveScopeTracker(scopeRef, restoreFocus, contain);\n $9bf71ea28793e738$var$useFocusContainment(scopeRef, contain);\n $9bf71ea28793e738$var$useRestoreFocus(scopeRef, restoreFocus, contain);\n $9bf71ea28793e738$var$useAutoFocus(scopeRef, autoFocus);\n // This needs to be an effect so that activeScope is updated after the FocusScope tree is complete.\n // It cannot be a useLayoutEffect because the parent of this node hasn't been attached in the tree yet.\n (0, $cgawC$useEffect)(()=>{\n const activeElement = (0, $cgawC$getActiveElement)((0, $cgawC$getOwnerDocument)(scopeRef.current ? scopeRef.current[0] : undefined));\n let scope = null;\n if ($9bf71ea28793e738$var$isElementInScope(activeElement, scopeRef.current)) {\n // We need to traverse the focusScope tree and find the bottom most scope that\n // contains the active element and set that as the activeScope.\n for (let node of $9bf71ea28793e738$export$d06fae2ee68b101e.traverse())if (node.scopeRef && $9bf71ea28793e738$var$isElementInScope(activeElement, node.scopeRef.current)) scope = node;\n if (scope === $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef)) $9bf71ea28793e738$var$activeScope = scope.scopeRef;\n }\n }, [\n scopeRef\n ]);\n // This layout effect cleanup is so that the tree node is removed synchronously with react before the RAF\n // in useRestoreFocus cleanup runs.\n (0, $cgawC$useLayoutEffect)(()=>{\n return ()=>{\n var _focusScopeTree_getTreeNode_parent, _focusScopeTree_getTreeNode;\n var _focusScopeTree_getTreeNode_parent_scopeRef;\n // Scope may have been re-parented.\n let parentScope = (_focusScopeTree_getTreeNode_parent_scopeRef = (_focusScopeTree_getTreeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef)) === null || _focusScopeTree_getTreeNode === void 0 ? void 0 : (_focusScopeTree_getTreeNode_parent = _focusScopeTree_getTreeNode.parent) === null || _focusScopeTree_getTreeNode_parent === void 0 ? void 0 : _focusScopeTree_getTreeNode_parent.scopeRef) !== null && _focusScopeTree_getTreeNode_parent_scopeRef !== void 0 ? _focusScopeTree_getTreeNode_parent_scopeRef : null;\n if ((scopeRef === $9bf71ea28793e738$var$activeScope || $9bf71ea28793e738$var$isAncestorScope(scopeRef, $9bf71ea28793e738$var$activeScope)) && (!parentScope || $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(parentScope))) $9bf71ea28793e738$var$activeScope = parentScope;\n $9bf71ea28793e738$export$d06fae2ee68b101e.removeTreeNode(scopeRef);\n };\n }, [\n scopeRef\n ]);\n let focusManager = (0, $cgawC$useMemo)(()=>$9bf71ea28793e738$var$createFocusManagerForScope(scopeRef), []);\n let value = (0, $cgawC$useMemo)(()=>({\n focusManager: focusManager,\n parentNode: node\n }), [\n node,\n focusManager\n ]);\n return /*#__PURE__*/ (0, $cgawC$react).createElement($9bf71ea28793e738$var$FocusContext.Provider, {\n value: value\n }, /*#__PURE__*/ (0, $cgawC$react).createElement(\"span\", {\n \"data-focus-scope-start\": true,\n hidden: true,\n ref: startRef\n }), children, /*#__PURE__*/ (0, $cgawC$react).createElement(\"span\", {\n \"data-focus-scope-end\": true,\n hidden: true,\n ref: endRef\n }));\n}\nfunction $9bf71ea28793e738$export$10c5169755ce7bd7() {\n var _useContext;\n return (_useContext = (0, $cgawC$useContext)($9bf71ea28793e738$var$FocusContext)) === null || _useContext === void 0 ? void 0 : _useContext.focusManager;\n}\nfunction $9bf71ea28793e738$var$createFocusManagerForScope(scopeRef) {\n return {\n focusNext (opts = {}) {\n let scope = scopeRef.current;\n let { from: from, tabbable: tabbable, wrap: wrap, accept: accept } = opts;\n var _scope_;\n let node = from || (0, $cgawC$getActiveElement)((0, $cgawC$getOwnerDocument)((_scope_ = scope[0]) !== null && _scope_ !== void 0 ? _scope_ : undefined));\n let sentinel = scope[0].previousElementSibling;\n let scopeRoot = $9bf71ea28793e738$var$getScopeRoot(scope);\n let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(scopeRoot, {\n tabbable: tabbable,\n accept: accept\n }, scope);\n walker.currentNode = $9bf71ea28793e738$var$isElementInScope(node, scope) ? node : sentinel;\n let nextNode = walker.nextNode();\n if (!nextNode && wrap) {\n walker.currentNode = sentinel;\n nextNode = walker.nextNode();\n }\n if (nextNode) $9bf71ea28793e738$var$focusElement(nextNode, true);\n return nextNode;\n },\n focusPrevious (opts = {}) {\n let scope = scopeRef.current;\n let { from: from, tabbable: tabbable, wrap: wrap, accept: accept } = opts;\n var _scope_;\n let node = from || (0, $cgawC$getActiveElement)((0, $cgawC$getOwnerDocument)((_scope_ = scope[0]) !== null && _scope_ !== void 0 ? _scope_ : undefined));\n let sentinel = scope[scope.length - 1].nextElementSibling;\n let scopeRoot = $9bf71ea28793e738$var$getScopeRoot(scope);\n let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(scopeRoot, {\n tabbable: tabbable,\n accept: accept\n }, scope);\n walker.currentNode = $9bf71ea28793e738$var$isElementInScope(node, scope) ? node : sentinel;\n let previousNode = walker.previousNode();\n if (!previousNode && wrap) {\n walker.currentNode = sentinel;\n previousNode = walker.previousNode();\n }\n if (previousNode) $9bf71ea28793e738$var$focusElement(previousNode, true);\n return previousNode;\n },\n focusFirst (opts = {}) {\n let scope = scopeRef.current;\n let { tabbable: tabbable, accept: accept } = opts;\n let scopeRoot = $9bf71ea28793e738$var$getScopeRoot(scope);\n let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(scopeRoot, {\n tabbable: tabbable,\n accept: accept\n }, scope);\n walker.currentNode = scope[0].previousElementSibling;\n let nextNode = walker.nextNode();\n if (nextNode) $9bf71ea28793e738$var$focusElement(nextNode, true);\n return nextNode;\n },\n focusLast (opts = {}) {\n let scope = scopeRef.current;\n let { tabbable: tabbable, accept: accept } = opts;\n let scopeRoot = $9bf71ea28793e738$var$getScopeRoot(scope);\n let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(scopeRoot, {\n tabbable: tabbable,\n accept: accept\n }, scope);\n walker.currentNode = scope[scope.length - 1].nextElementSibling;\n let previousNode = walker.previousNode();\n if (previousNode) $9bf71ea28793e738$var$focusElement(previousNode, true);\n return previousNode;\n }\n };\n}\nfunction $9bf71ea28793e738$var$getScopeRoot(scope) {\n return scope[0].parentElement;\n}\nfunction $9bf71ea28793e738$var$shouldContainFocus(scopeRef) {\n let scope = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($9bf71ea28793e738$var$activeScope);\n while(scope && scope.scopeRef !== scopeRef){\n if (scope.contain) return false;\n scope = scope.parent;\n }\n return true;\n}\nfunction $9bf71ea28793e738$var$getRadiosInGroup(element) {\n if (!element.form) // Radio buttons outside a form - query the document\n return Array.from((0, $cgawC$getOwnerDocument)(element).querySelectorAll(`input[type=\"radio\"][name=\"${CSS.escape(element.name)}\"]`)).filter((radio)=>!radio.form);\n // namedItem returns RadioNodeList (iterable) for 2+ elements, but a single Element for exactly 1.\n // https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormControlsCollection/namedItem\n const radioList = element.form.elements.namedItem(element.name);\n let ownerWindow = (0, $cgawC$getOwnerWindow)(element);\n if (radioList instanceof ownerWindow.RadioNodeList) return Array.from(radioList).filter((el)=>el instanceof ownerWindow.HTMLInputElement);\n if (radioList instanceof ownerWindow.HTMLInputElement) return [\n radioList\n ];\n return [];\n}\nfunction $9bf71ea28793e738$var$isTabbableRadio(element) {\n if (element.checked) return true;\n const radios = $9bf71ea28793e738$var$getRadiosInGroup(element);\n return radios.length > 0 && !radios.some((radio)=>radio.checked);\n}\nfunction $9bf71ea28793e738$var$useFocusContainment(scopeRef, contain) {\n let focusedNode = (0, $cgawC$useRef)(undefined);\n let raf = (0, $cgawC$useRef)(undefined);\n (0, $cgawC$useLayoutEffect)(()=>{\n let scope = scopeRef.current;\n if (!contain) {\n // if contain was changed, then we should cancel any ongoing waits to pull focus back into containment\n if (raf.current) {\n cancelAnimationFrame(raf.current);\n raf.current = undefined;\n }\n return;\n }\n const ownerDocument = (0, $cgawC$getOwnerDocument)(scope ? scope[0] : undefined);\n // Handle the Tab key to contain focus within the scope\n let onKeyDown = (e)=>{\n if (e.key !== 'Tab' || e.altKey || e.ctrlKey || e.metaKey || !$9bf71ea28793e738$var$shouldContainFocus(scopeRef) || e.isComposing) return;\n let focusedElement = (0, $cgawC$getActiveElement)(ownerDocument);\n let scope = scopeRef.current;\n if (!scope || !$9bf71ea28793e738$var$isElementInScope(focusedElement, scope)) return;\n let scopeRoot = $9bf71ea28793e738$var$getScopeRoot(scope);\n let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(scopeRoot, {\n tabbable: true\n }, scope);\n if (!focusedElement) return;\n walker.currentNode = focusedElement;\n let nextElement = e.shiftKey ? walker.previousNode() : walker.nextNode();\n if (!nextElement) {\n walker.currentNode = e.shiftKey ? scope[scope.length - 1].nextElementSibling : scope[0].previousElementSibling;\n nextElement = e.shiftKey ? walker.previousNode() : walker.nextNode();\n }\n e.preventDefault();\n if (nextElement) $9bf71ea28793e738$var$focusElement(nextElement, true);\n };\n let onFocus = (e)=>{\n // If focusing an element in a child scope of the currently active scope, the child becomes active.\n // Moving out of the active scope to an ancestor is not allowed.\n if ((!$9bf71ea28793e738$var$activeScope || $9bf71ea28793e738$var$isAncestorScope($9bf71ea28793e738$var$activeScope, scopeRef)) && $9bf71ea28793e738$var$isElementInScope((0, $cgawC$getEventTarget)(e), scopeRef.current)) {\n $9bf71ea28793e738$var$activeScope = scopeRef;\n focusedNode.current = (0, $cgawC$getEventTarget)(e);\n } else if ($9bf71ea28793e738$var$shouldContainFocus(scopeRef) && !$9bf71ea28793e738$var$isElementInChildScope((0, $cgawC$getEventTarget)(e), scopeRef)) {\n // If a focus event occurs outside the active scope (e.g. user tabs from browser location bar),\n // restore focus to the previously focused node or the first tabbable element in the active scope.\n if (focusedNode.current) focusedNode.current.focus();\n else if ($9bf71ea28793e738$var$activeScope && $9bf71ea28793e738$var$activeScope.current) $9bf71ea28793e738$var$focusFirstInScope($9bf71ea28793e738$var$activeScope.current);\n } else if ($9bf71ea28793e738$var$shouldContainFocus(scopeRef)) focusedNode.current = (0, $cgawC$getEventTarget)(e);\n };\n let onBlur = (e)=>{\n // Firefox doesn't shift focus back to the Dialog properly without this\n if (raf.current) cancelAnimationFrame(raf.current);\n raf.current = requestAnimationFrame(()=>{\n // Patches infinite focus coersion loop for Android Talkback where the user isn't able to move the virtual cursor\n // if within a containing focus scope. Bug filed against Chrome: https://issuetracker.google.com/issues/384844019.\n // Note that this means focus can leave focus containing modals due to this, but it is isolated to Chrome Talkback.\n let modality = (0, $cgawC$getInteractionModality)();\n let shouldSkipFocusRestore = (modality === 'virtual' || modality === null) && (0, $cgawC$isAndroid)() && (0, $cgawC$isChrome)();\n // Use document.activeElement instead of e.relatedTarget so we can tell if user clicked into iframe\n let activeElement = (0, $cgawC$getActiveElement)(ownerDocument);\n if (!shouldSkipFocusRestore && activeElement && $9bf71ea28793e738$var$shouldContainFocus(scopeRef) && !$9bf71ea28793e738$var$isElementInChildScope(activeElement, scopeRef)) {\n $9bf71ea28793e738$var$activeScope = scopeRef;\n let target = (0, $cgawC$getEventTarget)(e);\n if (target && target.isConnected) {\n var _focusedNode_current;\n focusedNode.current = target;\n (_focusedNode_current = focusedNode.current) === null || _focusedNode_current === void 0 ? void 0 : _focusedNode_current.focus();\n } else if ($9bf71ea28793e738$var$activeScope.current) $9bf71ea28793e738$var$focusFirstInScope($9bf71ea28793e738$var$activeScope.current);\n }\n });\n };\n ownerDocument.addEventListener('keydown', onKeyDown, false);\n ownerDocument.addEventListener('focusin', onFocus, false);\n scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.addEventListener('focusin', onFocus, false));\n scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.addEventListener('focusout', onBlur, false));\n return ()=>{\n ownerDocument.removeEventListener('keydown', onKeyDown, false);\n ownerDocument.removeEventListener('focusin', onFocus, false);\n scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.removeEventListener('focusin', onFocus, false));\n scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.removeEventListener('focusout', onBlur, false));\n };\n }, [\n scopeRef,\n contain\n ]);\n // This is a useLayoutEffect so it is guaranteed to run before our async synthetic blur\n (0, $cgawC$useLayoutEffect)(()=>{\n return ()=>{\n if (raf.current) cancelAnimationFrame(raf.current);\n };\n }, [\n raf\n ]);\n}\nfunction $9bf71ea28793e738$var$isElementInAnyScope(element) {\n return $9bf71ea28793e738$var$isElementInChildScope(element);\n}\nfunction $9bf71ea28793e738$var$isElementInScope(element, scope) {\n if (!element) return false;\n if (!scope) return false;\n return scope.some((node)=>(0, $cgawC$nodeContains)(node, element));\n}\nfunction $9bf71ea28793e738$var$isElementInChildScope(element, scope = null) {\n // If the element is within a top layer element (e.g. toasts), always allow moving focus there.\n if (element instanceof Element && element.closest('[data-react-aria-top-layer]')) return true;\n // node.contains in isElementInScope covers child scopes that are also DOM children,\n // but does not cover child scopes in portals.\n for (let { scopeRef: s } of $9bf71ea28793e738$export$d06fae2ee68b101e.traverse($9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scope))){\n if (s && $9bf71ea28793e738$var$isElementInScope(element, s.current)) return true;\n }\n return false;\n}\nfunction $9bf71ea28793e738$export$1258395f99bf9cbf(element) {\n return $9bf71ea28793e738$var$isElementInChildScope(element, $9bf71ea28793e738$var$activeScope);\n}\nfunction $9bf71ea28793e738$var$isAncestorScope(ancestor, scope) {\n var _focusScopeTree_getTreeNode;\n let parent = (_focusScopeTree_getTreeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scope)) === null || _focusScopeTree_getTreeNode === void 0 ? void 0 : _focusScopeTree_getTreeNode.parent;\n while(parent){\n if (parent.scopeRef === ancestor) return true;\n parent = parent.parent;\n }\n return false;\n}\nfunction $9bf71ea28793e738$var$focusElement(element, scroll = false) {\n if (element != null && !scroll) try {\n (0, $cgawC$focusSafely)(element);\n } catch {\n // ignore\n }\n else if (element != null) try {\n element.focus();\n } catch {\n // ignore\n }\n}\nfunction $9bf71ea28793e738$var$getFirstInScope(scope, tabbable = true) {\n let sentinel = scope[0].previousElementSibling;\n let scopeRoot = $9bf71ea28793e738$var$getScopeRoot(scope);\n let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(scopeRoot, {\n tabbable: tabbable\n }, scope);\n walker.currentNode = sentinel;\n let nextNode = walker.nextNode();\n // If the scope does not contain a tabbable element, use the first focusable element.\n if (tabbable && !nextNode) {\n scopeRoot = $9bf71ea28793e738$var$getScopeRoot(scope);\n walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(scopeRoot, {\n tabbable: false\n }, scope);\n walker.currentNode = sentinel;\n nextNode = walker.nextNode();\n }\n return nextNode;\n}\nfunction $9bf71ea28793e738$var$focusFirstInScope(scope, tabbable = true) {\n $9bf71ea28793e738$var$focusElement($9bf71ea28793e738$var$getFirstInScope(scope, tabbable));\n}\nfunction $9bf71ea28793e738$var$useAutoFocus(scopeRef, autoFocus) {\n const autoFocusRef = (0, $cgawC$react).useRef(autoFocus);\n (0, $cgawC$useEffect)(()=>{\n if (autoFocusRef.current) {\n $9bf71ea28793e738$var$activeScope = scopeRef;\n const ownerDocument = (0, $cgawC$getOwnerDocument)(scopeRef.current ? scopeRef.current[0] : undefined);\n if (!$9bf71ea28793e738$var$isElementInScope((0, $cgawC$getActiveElement)(ownerDocument), $9bf71ea28793e738$var$activeScope.current) && scopeRef.current) $9bf71ea28793e738$var$focusFirstInScope(scopeRef.current);\n }\n autoFocusRef.current = false;\n }, [\n scopeRef\n ]);\n}\nfunction $9bf71ea28793e738$var$useActiveScopeTracker(scopeRef, restore, contain) {\n // tracks the active scope, in case restore and contain are both false.\n // if either are true, this is tracked in useRestoreFocus or useFocusContainment.\n (0, $cgawC$useLayoutEffect)(()=>{\n if (restore || contain) return;\n let scope = scopeRef.current;\n const ownerDocument = (0, $cgawC$getOwnerDocument)(scope ? scope[0] : undefined);\n let onFocus = (e)=>{\n let target = (0, $cgawC$getEventTarget)(e);\n if ($9bf71ea28793e738$var$isElementInScope(target, scopeRef.current)) $9bf71ea28793e738$var$activeScope = scopeRef;\n else if (!$9bf71ea28793e738$var$isElementInAnyScope(target)) $9bf71ea28793e738$var$activeScope = null;\n };\n ownerDocument.addEventListener('focusin', onFocus, false);\n scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.addEventListener('focusin', onFocus, false));\n return ()=>{\n ownerDocument.removeEventListener('focusin', onFocus, false);\n scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.removeEventListener('focusin', onFocus, false));\n };\n }, [\n scopeRef,\n restore,\n contain\n ]);\n}\nfunction $9bf71ea28793e738$var$shouldRestoreFocus(scopeRef) {\n let scope = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($9bf71ea28793e738$var$activeScope);\n while(scope && scope.scopeRef !== scopeRef){\n if (scope.nodeToRestore) return false;\n scope = scope.parent;\n }\n return (scope === null || scope === void 0 ? void 0 : scope.scopeRef) === scopeRef;\n}\nfunction $9bf71ea28793e738$var$useRestoreFocus(scopeRef, restoreFocus, contain) {\n // create a ref during render instead of useLayoutEffect so the active element is saved before a child with autoFocus=true mounts.\n // eslint-disable-next-line no-restricted-globals\n const nodeToRestoreRef = (0, $cgawC$useRef)(typeof document !== 'undefined' ? (0, $cgawC$getActiveElement)((0, $cgawC$getOwnerDocument)(scopeRef.current ? scopeRef.current[0] : undefined)) : null);\n // restoring scopes should all track if they are active regardless of contain, but contain already tracks it plus logic to contain the focus\n // restoring-non-containing scopes should only care if they become active so they can perform the restore\n (0, $cgawC$useLayoutEffect)(()=>{\n let scope = scopeRef.current;\n const ownerDocument = (0, $cgawC$getOwnerDocument)(scope ? scope[0] : undefined);\n if (!restoreFocus || contain) return;\n let onFocus = ()=>{\n // If focusing an element in a child scope of the currently active scope, the child becomes active.\n // Moving out of the active scope to an ancestor is not allowed.\n if ((!$9bf71ea28793e738$var$activeScope || $9bf71ea28793e738$var$isAncestorScope($9bf71ea28793e738$var$activeScope, scopeRef)) && $9bf71ea28793e738$var$isElementInScope((0, $cgawC$getActiveElement)(ownerDocument), scopeRef.current)) $9bf71ea28793e738$var$activeScope = scopeRef;\n };\n ownerDocument.addEventListener('focusin', onFocus, false);\n scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.addEventListener('focusin', onFocus, false));\n return ()=>{\n ownerDocument.removeEventListener('focusin', onFocus, false);\n scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.removeEventListener('focusin', onFocus, false));\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n scopeRef,\n contain\n ]);\n (0, $cgawC$useLayoutEffect)(()=>{\n const ownerDocument = (0, $cgawC$getOwnerDocument)(scopeRef.current ? scopeRef.current[0] : undefined);\n if (!restoreFocus) return;\n // Handle the Tab key so that tabbing out of the scope goes to the next element\n // after the node that had focus when the scope mounted. This is important when\n // using portals for overlays, so that focus goes to the expected element when\n // tabbing out of the overlay.\n let onKeyDown = (e)=>{\n if (e.key !== 'Tab' || e.altKey || e.ctrlKey || e.metaKey || !$9bf71ea28793e738$var$shouldContainFocus(scopeRef) || e.isComposing) return;\n let focusedElement = ownerDocument.activeElement;\n if (!$9bf71ea28793e738$var$isElementInChildScope(focusedElement, scopeRef) || !$9bf71ea28793e738$var$shouldRestoreFocus(scopeRef)) return;\n let treeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef);\n if (!treeNode) return;\n let nodeToRestore = treeNode.nodeToRestore;\n // Create a DOM tree walker that matches all tabbable elements\n let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(ownerDocument.body, {\n tabbable: true\n });\n // Find the next tabbable element after the currently focused element\n walker.currentNode = focusedElement;\n let nextElement = e.shiftKey ? walker.previousNode() : walker.nextNode();\n if (!nodeToRestore || !nodeToRestore.isConnected || nodeToRestore === ownerDocument.body) {\n nodeToRestore = undefined;\n treeNode.nodeToRestore = undefined;\n }\n // If there is no next element, or it is outside the current scope, move focus to the\n // next element after the node to restore to instead.\n if ((!nextElement || !$9bf71ea28793e738$var$isElementInChildScope(nextElement, scopeRef)) && nodeToRestore) {\n walker.currentNode = nodeToRestore;\n // Skip over elements within the scope, in case the scope immediately follows the node to restore.\n do nextElement = e.shiftKey ? walker.previousNode() : walker.nextNode();\n while ($9bf71ea28793e738$var$isElementInChildScope(nextElement, scopeRef));\n e.preventDefault();\n e.stopPropagation();\n if (nextElement) $9bf71ea28793e738$var$focusElement(nextElement, true);\n else // If there is no next element and the nodeToRestore isn't within a FocusScope (i.e. we are leaving the top level focus scope)\n // then move focus to the body.\n // Otherwise restore focus to the nodeToRestore (e.g menu within a popover -> tabbing to close the menu should move focus to menu trigger)\n if (!$9bf71ea28793e738$var$isElementInAnyScope(nodeToRestore)) focusedElement.blur();\n else $9bf71ea28793e738$var$focusElement(nodeToRestore, true);\n }\n };\n if (!contain) ownerDocument.addEventListener('keydown', onKeyDown, true);\n return ()=>{\n if (!contain) ownerDocument.removeEventListener('keydown', onKeyDown, true);\n };\n }, [\n scopeRef,\n restoreFocus,\n contain\n ]);\n // useLayoutEffect instead of useEffect so the active element is saved synchronously instead of asynchronously.\n (0, $cgawC$useLayoutEffect)(()=>{\n const ownerDocument = (0, $cgawC$getOwnerDocument)(scopeRef.current ? scopeRef.current[0] : undefined);\n if (!restoreFocus) return;\n let treeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef);\n if (!treeNode) return;\n var _nodeToRestoreRef_current;\n treeNode.nodeToRestore = (_nodeToRestoreRef_current = nodeToRestoreRef.current) !== null && _nodeToRestoreRef_current !== void 0 ? _nodeToRestoreRef_current : undefined;\n return ()=>{\n let treeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef);\n if (!treeNode) return;\n let nodeToRestore = treeNode.nodeToRestore;\n // if we already lost focus to the body and this was the active scope, then we should attempt to restore\n let activeElement = (0, $cgawC$getActiveElement)(ownerDocument);\n if (restoreFocus && nodeToRestore && (activeElement && $9bf71ea28793e738$var$isElementInChildScope(activeElement, scopeRef) || activeElement === ownerDocument.body && $9bf71ea28793e738$var$shouldRestoreFocus(scopeRef))) {\n // freeze the focusScopeTree so it persists after the raf, otherwise during unmount nodes are removed from it\n let clonedTree = $9bf71ea28793e738$export$d06fae2ee68b101e.clone();\n requestAnimationFrame(()=>{\n // Only restore focus if we've lost focus to the body, the alternative is that focus has been purposefully moved elsewhere\n if (ownerDocument.activeElement === ownerDocument.body) {\n // look up the tree starting with our scope to find a nodeToRestore still in the DOM\n let treeNode = clonedTree.getTreeNode(scopeRef);\n while(treeNode){\n if (treeNode.nodeToRestore && treeNode.nodeToRestore.isConnected) {\n $9bf71ea28793e738$var$restoreFocusToElement(treeNode.nodeToRestore);\n return;\n }\n treeNode = treeNode.parent;\n }\n // If no nodeToRestore was found, focus the first element in the nearest\n // ancestor scope that is still in the tree.\n treeNode = clonedTree.getTreeNode(scopeRef);\n while(treeNode){\n if (treeNode.scopeRef && treeNode.scopeRef.current && $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(treeNode.scopeRef)) {\n let node = $9bf71ea28793e738$var$getFirstInScope(treeNode.scopeRef.current, true);\n $9bf71ea28793e738$var$restoreFocusToElement(node);\n return;\n }\n treeNode = treeNode.parent;\n }\n }\n });\n }\n };\n }, [\n scopeRef,\n restoreFocus\n ]);\n}\nfunction $9bf71ea28793e738$var$restoreFocusToElement(node) {\n // Dispatch a custom event that parent elements can intercept to customize focus restoration.\n // For example, virtualized collection components reuse DOM elements, so the original element\n // might still exist in the DOM but representing a different item.\n if (node.dispatchEvent(new CustomEvent($9bf71ea28793e738$var$RESTORE_FOCUS_EVENT, {\n bubbles: true,\n cancelable: true\n }))) $9bf71ea28793e738$var$focusElement(node);\n}\nfunction $9bf71ea28793e738$export$2d6ec8fc375ceafa(root, opts, scope) {\n let filter = (opts === null || opts === void 0 ? void 0 : opts.tabbable) ? (0, $cgawC$isTabbable) : (0, $cgawC$isFocusable);\n // Ensure that root is an Element or fall back appropriately\n let rootElement = (root === null || root === void 0 ? void 0 : root.nodeType) === Node.ELEMENT_NODE ? root : null;\n // Determine the document to use\n let doc = (0, $cgawC$getOwnerDocument)(rootElement);\n // Create a TreeWalker, ensuring the root is an Element or Document\n let walker = (0, $cgawC$createShadowTreeWalker)(doc, root || doc, NodeFilter.SHOW_ELEMENT, {\n acceptNode (node) {\n // Skip nodes inside the starting node.\n if ((0, $cgawC$nodeContains)(opts === null || opts === void 0 ? void 0 : opts.from, node)) return NodeFilter.FILTER_REJECT;\n if ((opts === null || opts === void 0 ? void 0 : opts.tabbable) && node.tagName === 'INPUT' && node.getAttribute('type') === 'radio') {\n // If the radio is in a form, we can get all the other radios by name\n if (!$9bf71ea28793e738$var$isTabbableRadio(node)) return NodeFilter.FILTER_REJECT;\n // If the radio is in the same group as the current node and none are selected, we can skip it\n if (walker.currentNode.tagName === 'INPUT' && walker.currentNode.type === 'radio' && walker.currentNode.name === node.name) return NodeFilter.FILTER_REJECT;\n }\n if (filter(node) && (!scope || $9bf71ea28793e738$var$isElementInScope(node, scope)) && (!(opts === null || opts === void 0 ? void 0 : opts.accept) || opts.accept(node))) return NodeFilter.FILTER_ACCEPT;\n return NodeFilter.FILTER_SKIP;\n }\n });\n if (opts === null || opts === void 0 ? void 0 : opts.from) walker.currentNode = opts.from;\n return walker;\n}\nfunction $9bf71ea28793e738$export$c5251b9e124bf29(ref, defaultOptions = {}) {\n return {\n focusNext (opts = {}) {\n let root = ref.current;\n if (!root) return null;\n let { from: from, tabbable: tabbable = defaultOptions.tabbable, wrap: wrap = defaultOptions.wrap, accept: accept = defaultOptions.accept } = opts;\n let node = from || (0, $cgawC$getActiveElement)((0, $cgawC$getOwnerDocument)(root));\n let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(root, {\n tabbable: tabbable,\n accept: accept\n });\n if ((0, $cgawC$nodeContains)(root, node)) walker.currentNode = node;\n let nextNode = walker.nextNode();\n if (!nextNode && wrap) {\n walker.currentNode = root;\n nextNode = walker.nextNode();\n }\n if (nextNode) $9bf71ea28793e738$var$focusElement(nextNode, true);\n return nextNode;\n },\n focusPrevious (opts = defaultOptions) {\n let root = ref.current;\n if (!root) return null;\n let { from: from, tabbable: tabbable = defaultOptions.tabbable, wrap: wrap = defaultOptions.wrap, accept: accept = defaultOptions.accept } = opts;\n let node = from || (0, $cgawC$getActiveElement)((0, $cgawC$getOwnerDocument)(root));\n let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(root, {\n tabbable: tabbable,\n accept: accept\n });\n if ((0, $cgawC$nodeContains)(root, node)) walker.currentNode = node;\n else {\n let next = $9bf71ea28793e738$var$last(walker);\n if (next) $9bf71ea28793e738$var$focusElement(next, true);\n return next !== null && next !== void 0 ? next : null;\n }\n let previousNode = walker.previousNode();\n if (!previousNode && wrap) {\n walker.currentNode = root;\n let lastNode = $9bf71ea28793e738$var$last(walker);\n if (!lastNode) // couldn't wrap\n return null;\n previousNode = lastNode;\n }\n if (previousNode) $9bf71ea28793e738$var$focusElement(previousNode, true);\n return previousNode !== null && previousNode !== void 0 ? previousNode : null;\n },\n focusFirst (opts = defaultOptions) {\n let root = ref.current;\n if (!root) return null;\n let { tabbable: tabbable = defaultOptions.tabbable, accept: accept = defaultOptions.accept } = opts;\n let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(root, {\n tabbable: tabbable,\n accept: accept\n });\n let nextNode = walker.nextNode();\n if (nextNode) $9bf71ea28793e738$var$focusElement(nextNode, true);\n return nextNode;\n },\n focusLast (opts = defaultOptions) {\n let root = ref.current;\n if (!root) return null;\n let { tabbable: tabbable = defaultOptions.tabbable, accept: accept = defaultOptions.accept } = opts;\n let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(root, {\n tabbable: tabbable,\n accept: accept\n });\n let next = $9bf71ea28793e738$var$last(walker);\n if (next) $9bf71ea28793e738$var$focusElement(next, true);\n return next !== null && next !== void 0 ? next : null;\n }\n };\n}\nfunction $9bf71ea28793e738$var$last(walker) {\n let next = undefined;\n let last;\n do {\n last = walker.lastChild();\n if (last) next = last;\n }while (last);\n return next;\n}\nclass $9bf71ea28793e738$var$Tree {\n get size() {\n return this.fastMap.size;\n }\n getTreeNode(data) {\n return this.fastMap.get(data);\n }\n addTreeNode(scopeRef, parent, nodeToRestore) {\n let parentNode = this.fastMap.get(parent !== null && parent !== void 0 ? parent : null);\n if (!parentNode) return;\n let node = new $9bf71ea28793e738$var$TreeNode({\n scopeRef: scopeRef\n });\n parentNode.addChild(node);\n node.parent = parentNode;\n this.fastMap.set(scopeRef, node);\n if (nodeToRestore) node.nodeToRestore = nodeToRestore;\n }\n addNode(node) {\n this.fastMap.set(node.scopeRef, node);\n }\n removeTreeNode(scopeRef) {\n // never remove the root\n if (scopeRef === null) return;\n let node = this.fastMap.get(scopeRef);\n if (!node) return;\n let parentNode = node.parent;\n // when we remove a scope, check if any sibling scopes are trying to restore focus to something inside the scope we're removing\n // if we are, then replace the siblings restore with the restore from the scope we're removing\n for (let current of this.traverse())if (current !== node && node.nodeToRestore && current.nodeToRestore && node.scopeRef && node.scopeRef.current && $9bf71ea28793e738$var$isElementInScope(current.nodeToRestore, node.scopeRef.current)) current.nodeToRestore = node.nodeToRestore;\n let children = node.children;\n if (parentNode) {\n parentNode.removeChild(node);\n if (children.size > 0) children.forEach((child)=>parentNode && parentNode.addChild(child));\n }\n this.fastMap.delete(node.scopeRef);\n }\n // Pre Order Depth First\n *traverse(node = this.root) {\n if (node.scopeRef != null) yield node;\n if (node.children.size > 0) for (let child of node.children)yield* this.traverse(child);\n }\n clone() {\n var _node_parent;\n let newTree = new $9bf71ea28793e738$var$Tree();\n var _node_parent_scopeRef;\n for (let node of this.traverse())newTree.addTreeNode(node.scopeRef, (_node_parent_scopeRef = (_node_parent = node.parent) === null || _node_parent === void 0 ? void 0 : _node_parent.scopeRef) !== null && _node_parent_scopeRef !== void 0 ? _node_parent_scopeRef : null, node.nodeToRestore);\n return newTree;\n }\n constructor(){\n this.fastMap = new Map();\n this.root = new $9bf71ea28793e738$var$TreeNode({\n scopeRef: null\n });\n this.fastMap.set(null, this.root);\n }\n}\nclass $9bf71ea28793e738$var$TreeNode {\n addChild(node) {\n this.children.add(node);\n node.parent = this;\n }\n removeChild(node) {\n this.children.delete(node);\n node.parent = undefined;\n }\n constructor(props){\n this.children = new Set();\n this.contain = false;\n this.scopeRef = props.scopeRef;\n }\n}\nlet $9bf71ea28793e738$export$d06fae2ee68b101e = new $9bf71ea28793e738$var$Tree();\n\n\nexport {$9bf71ea28793e738$export$20e40289641fbbb6 as FocusScope, $9bf71ea28793e738$export$d06fae2ee68b101e as focusScopeTree, $9bf71ea28793e738$export$10c5169755ce7bd7 as useFocusManager, $9bf71ea28793e738$export$2d6ec8fc375ceafa as getFocusableTreeWalker, $9bf71ea28793e738$export$1258395f99bf9cbf as isElementInChildOfActiveScope, $9bf71ea28793e738$export$c5251b9e124bf29 as createFocusManager};\n//# sourceMappingURL=FocusScope.module.js.map\n"],"names":["$cgawC$react","$cgawC$useRef","$cgawC$useContext","$cgawC$useMemo","$cgawC$useLayoutEffect","$cgawC$useEffect","$cgawC$getActiveElement","$cgawC$getOwnerDocument","$cgawC$getOwnerWindow","$cgawC$getEventTarget","$cgawC$getInteractionModality","$cgawC$isAndroid","$cgawC$isChrome","$cgawC$nodeContains","$cgawC$focusSafely","$cgawC$isTabbable","$cgawC$isFocusable","$cgawC$createShadowTreeWalker"],"mappings":";;;;;;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,MAAM,kCAAkC,iBAAiB,CAAIA,cAAY,EAAE,aAAa,CAAC,IAAI,CAAC;AAC9F,MAAM,yCAAyC,GAAG,gCAAgC;AAClF,IAAI,iCAAiC,GAAG,IAAI;AAC5C,SAAS,yCAAyC,CAAC,KAAK,EAAE;AAC1D,IAAI,IAAI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Y,QAAQ,EAAE;AACtB,SAAS,CAAC;AACV,QAAQ,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC;AACzC,IAAI;AACJ;AACA,MAAM,8BAA8B,CAAC;AACrC,IAAI,QAAQ,CAAC,IAAI,EAAE;AACnB,QAAQ,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC;AAC/B,QAAQ,IAAI,CAAC,MAAM,GAAG,IAAI;AAC1B,IAAI;AACJ,IAAI,WAAW,CAAC,IAAI,EAAE;AACtB,QAAQ,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC;AAClC,QAAQ,IAAI,CAAC,MAAM,GAAG,SAAS;AAC/B,IAAI;AACJ,IAAI,WAAW,CAAC,KAAK,CAAC;AACtB,QAAQ,IAAI,CAAC,QAAQ,GAAG,IAAI,GAAG,EAAE;AACjC,QAAQ,IAAI,CAAC,OAAO,GAAG,KAAK;AAC5B,QAAQ,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ;AACtC,IAAI;AACJ;AACG,IAAC,yCAAyC,GAAG,IAAI,0BAA0B;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { getInteractionModality as $507fabe10e71c6fb$export$630ff653c5ada6a9 } from './useFocusVisible.js';
|
|
2
|
+
import { getActiveElement as $d4ee10de306f2510$export$cd4e5573fbe2b576 } from '../../utils/dist/DOMFunctions.js';
|
|
3
|
+
import { getOwnerDocument as $431fbd86ca7dc216$export$b204af158042fbac } from '../../utils/dist/domHelpers.js';
|
|
4
|
+
import { focusWithoutScrolling as $7215afc6de606d6b$export$de79e2c695e052f3 } from '../../utils/dist/focusWithoutScrolling.js';
|
|
5
|
+
import { runAfterTransition as $bbed8b41f857bcc0$export$24490316f764c430 } from '../../utils/dist/runAfterTransition.js';
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
9
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the 'License');
|
|
10
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
11
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
14
|
+
* the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
15
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
16
|
+
* governing permissions and limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
function $3ad3f6e1647bc98d$export$80f3e147d781571c(element) {
|
|
20
|
+
if (!element.isConnected) return;
|
|
21
|
+
// If the user is interacting with a virtual cursor, e.g. screen reader, then
|
|
22
|
+
// wait until after any animated transitions that are currently occurring on
|
|
23
|
+
// the page before shifting focus. This avoids issues with VoiceOver on iOS
|
|
24
|
+
// causing the page to scroll when moving focus if the element is transitioning
|
|
25
|
+
// from off the screen.
|
|
26
|
+
const ownerDocument = ($431fbd86ca7dc216$export$b204af158042fbac)(element);
|
|
27
|
+
if (($507fabe10e71c6fb$export$630ff653c5ada6a9)() === 'virtual') {
|
|
28
|
+
let lastFocusedElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)(ownerDocument);
|
|
29
|
+
($bbed8b41f857bcc0$export$24490316f764c430)(()=>{
|
|
30
|
+
const activeElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)(ownerDocument);
|
|
31
|
+
// If focus did not move or focus was lost to the body, and the element is still in the document, focus it.
|
|
32
|
+
if ((activeElement === lastFocusedElement || activeElement === ownerDocument.body) && element.isConnected) ($7215afc6de606d6b$export$de79e2c695e052f3)(element);
|
|
33
|
+
});
|
|
34
|
+
} else ($7215afc6de606d6b$export$de79e2c695e052f3)(element);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { $3ad3f6e1647bc98d$export$80f3e147d781571c as focusSafely };
|
|
38
|
+
//# sourceMappingURL=focusSafely.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focusSafely.js","sources":["../../../../../../../node_modules/@react-aria/interactions/dist/focusSafely.mjs"],"sourcesContent":["import {getInteractionModality as $507fabe10e71c6fb$export$630ff653c5ada6a9} from \"./useFocusVisible.mjs\";\nimport {getOwnerDocument as $k50bp$getOwnerDocument, getActiveElement as $k50bp$getActiveElement, runAfterTransition as $k50bp$runAfterTransition, focusWithoutScrolling as $k50bp$focusWithoutScrolling} from \"@react-aria/utils\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the 'License');\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nfunction $3ad3f6e1647bc98d$export$80f3e147d781571c(element) {\n if (!element.isConnected) return;\n // If the user is interacting with a virtual cursor, e.g. screen reader, then\n // wait until after any animated transitions that are currently occurring on\n // the page before shifting focus. This avoids issues with VoiceOver on iOS\n // causing the page to scroll when moving focus if the element is transitioning\n // from off the screen.\n const ownerDocument = (0, $k50bp$getOwnerDocument)(element);\n if ((0, $507fabe10e71c6fb$export$630ff653c5ada6a9)() === 'virtual') {\n let lastFocusedElement = (0, $k50bp$getActiveElement)(ownerDocument);\n (0, $k50bp$runAfterTransition)(()=>{\n const activeElement = (0, $k50bp$getActiveElement)(ownerDocument);\n // If focus did not move or focus was lost to the body, and the element is still in the document, focus it.\n if ((activeElement === lastFocusedElement || activeElement === ownerDocument.body) && element.isConnected) (0, $k50bp$focusWithoutScrolling)(element);\n });\n } else (0, $k50bp$focusWithoutScrolling)(element);\n}\n\n\nexport {$3ad3f6e1647bc98d$export$80f3e147d781571c as focusSafely};\n//# sourceMappingURL=focusSafely.module.js.map\n"],"names":["$k50bp$getOwnerDocument","$k50bp$getActiveElement","$k50bp$runAfterTransition","$k50bp$focusWithoutScrolling"],"mappings":";;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAS,yCAAyC,CAAC,OAAO,EAAE;AAC5D,IAAI,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE;AAC9B;AACA;AACA;AACA;AACA;AACA,IAAI,MAAM,aAAa,GAAG,CAAIA,yCAAuB,EAAE,OAAO,CAAC;AAC/D,IAAI,IAAI,CAAI,yCAAyC,GAAG,KAAK,SAAS,EAAE;AACxE,QAAQ,IAAI,kBAAkB,GAAG,CAAIC,yCAAuB,EAAE,aAAa,CAAC;AAC5E,QAAQ,CAAIC,yCAAyB,EAAE,IAAI;AAC3C,YAAY,MAAM,aAAa,GAAG,CAAID,yCAAuB,EAAE,aAAa,CAAC;AAC7E;AACA,YAAY,IAAI,CAAC,aAAa,KAAK,kBAAkB,IAAI,aAAa,KAAK,aAAa,CAAC,IAAI,KAAK,OAAO,CAAC,WAAW,EAAE,CAAIE,yCAA4B,EAAE,OAAO,CAAC;AACjK,QAAQ,CAAC,CAAC;AACV,IAAI,CAAC,MAAM,CAAIA,yCAA4B,EAAE,OAAO,CAAC;AACrD;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { ignoreFocusEvent as $8a9cb279dc87e130$export$fda7da73ab5d4c48 } from './utils.js';
|
|
2
|
+
import { getEventTarget as $d4ee10de306f2510$export$e58f029f0fbfdb29 } from '../../utils/dist/DOMFunctions.js';
|
|
3
|
+
import { getOwnerDocument as $431fbd86ca7dc216$export$b204af158042fbac, getOwnerWindow as $431fbd86ca7dc216$export$f21a1ffae260145a } from '../../utils/dist/domHelpers.js';
|
|
4
|
+
import { openLink as $ea8dcbcb9ea1b556$export$95185d699e05d4d7 } from '../../utils/dist/openLink.js';
|
|
5
|
+
import { isMac as $c87311424ea30a05$export$9ac100e40613ea10 } from '../../utils/dist/platform.js';
|
|
6
|
+
import { isVirtualClick as $6a7db85432448f7f$export$60278871457622de } from '../../utils/dist/isVirtualEvent.js';
|
|
7
|
+
import 'react';
|
|
8
|
+
|
|
9
|
+
/*
|
|
10
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
11
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
12
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
13
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
16
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
17
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
18
|
+
* governing permissions and limitations under the License.
|
|
19
|
+
*/ // Portions of the code in this file are based on code from react.
|
|
20
|
+
// Original licensing for the following can be found in the
|
|
21
|
+
// NOTICE file in the root directory of this source tree.
|
|
22
|
+
// See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
let $507fabe10e71c6fb$var$currentModality = null;
|
|
28
|
+
const $507fabe10e71c6fb$export$901e90a13c50a14e = new Set();
|
|
29
|
+
let $507fabe10e71c6fb$export$d90243b58daecda7 = new Map(); // We use a map here to support setting event listeners across multiple document objects.
|
|
30
|
+
let $507fabe10e71c6fb$var$hasEventBeforeFocus = false;
|
|
31
|
+
let $507fabe10e71c6fb$var$hasBlurredWindowRecently = false;
|
|
32
|
+
function $507fabe10e71c6fb$var$triggerChangeHandlers(modality, e) {
|
|
33
|
+
for (let handler of $507fabe10e71c6fb$export$901e90a13c50a14e)handler(modality, e);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Helper function to determine if a KeyboardEvent is unmodified and could make keyboard focus styles visible.
|
|
37
|
+
*/ function $507fabe10e71c6fb$var$isValidKey(e) {
|
|
38
|
+
// Control and Shift keys trigger when navigating back to the tab with keyboard.
|
|
39
|
+
return !(e.metaKey || !($c87311424ea30a05$export$9ac100e40613ea10)() && e.altKey || e.ctrlKey || e.key === 'Control' || e.key === 'Shift' || e.key === 'Meta');
|
|
40
|
+
}
|
|
41
|
+
function $507fabe10e71c6fb$var$handleKeyboardEvent(e) {
|
|
42
|
+
$507fabe10e71c6fb$var$hasEventBeforeFocus = true;
|
|
43
|
+
if (!($ea8dcbcb9ea1b556$export$95185d699e05d4d7).isOpening && $507fabe10e71c6fb$var$isValidKey(e)) {
|
|
44
|
+
$507fabe10e71c6fb$var$currentModality = 'keyboard';
|
|
45
|
+
$507fabe10e71c6fb$var$triggerChangeHandlers('keyboard', e);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function $507fabe10e71c6fb$var$handlePointerEvent(e) {
|
|
49
|
+
$507fabe10e71c6fb$var$currentModality = 'pointer';
|
|
50
|
+
'pointerType' in e ? e.pointerType : 'mouse';
|
|
51
|
+
if (e.type === 'mousedown' || e.type === 'pointerdown') {
|
|
52
|
+
$507fabe10e71c6fb$var$hasEventBeforeFocus = true;
|
|
53
|
+
$507fabe10e71c6fb$var$triggerChangeHandlers('pointer', e);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function $507fabe10e71c6fb$var$handleClickEvent(e) {
|
|
57
|
+
if (!($ea8dcbcb9ea1b556$export$95185d699e05d4d7).isOpening && ($6a7db85432448f7f$export$60278871457622de)(e)) {
|
|
58
|
+
$507fabe10e71c6fb$var$hasEventBeforeFocus = true;
|
|
59
|
+
$507fabe10e71c6fb$var$currentModality = 'virtual';
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function $507fabe10e71c6fb$var$handleFocusEvent(e) {
|
|
63
|
+
// Firefox fires two extra focus events when the user first clicks into an iframe:
|
|
64
|
+
// first on the window, then on the document. We ignore these events so they don't
|
|
65
|
+
// cause keyboard focus rings to appear.
|
|
66
|
+
if (($d4ee10de306f2510$export$e58f029f0fbfdb29)(e) === window || ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e) === document || ($8a9cb279dc87e130$export$fda7da73ab5d4c48) || !e.isTrusted) return;
|
|
67
|
+
// If a focus event occurs without a preceding keyboard or pointer event, switch to virtual modality.
|
|
68
|
+
// This occurs, for example, when navigating a form with the next/previous buttons on iOS.
|
|
69
|
+
if (!$507fabe10e71c6fb$var$hasEventBeforeFocus && !$507fabe10e71c6fb$var$hasBlurredWindowRecently) {
|
|
70
|
+
$507fabe10e71c6fb$var$currentModality = 'virtual';
|
|
71
|
+
$507fabe10e71c6fb$var$triggerChangeHandlers('virtual', e);
|
|
72
|
+
}
|
|
73
|
+
$507fabe10e71c6fb$var$hasEventBeforeFocus = false;
|
|
74
|
+
$507fabe10e71c6fb$var$hasBlurredWindowRecently = false;
|
|
75
|
+
}
|
|
76
|
+
function $507fabe10e71c6fb$var$handleWindowBlur() {
|
|
77
|
+
// When the window is blurred, reset state. This is necessary when tabbing out of the window,
|
|
78
|
+
// for example, since a subsequent focus event won't be fired.
|
|
79
|
+
$507fabe10e71c6fb$var$hasEventBeforeFocus = false;
|
|
80
|
+
$507fabe10e71c6fb$var$hasBlurredWindowRecently = true;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Setup global event listeners to control when keyboard focus style should be visible.
|
|
84
|
+
*/ function $507fabe10e71c6fb$var$setupGlobalFocusEvents(element) {
|
|
85
|
+
if (typeof window === 'undefined' || typeof document === 'undefined' || $507fabe10e71c6fb$export$d90243b58daecda7.get(($431fbd86ca7dc216$export$f21a1ffae260145a)(element))) return;
|
|
86
|
+
const windowObject = ($431fbd86ca7dc216$export$f21a1ffae260145a)(element);
|
|
87
|
+
const documentObject = ($431fbd86ca7dc216$export$b204af158042fbac)(element);
|
|
88
|
+
// Programmatic focus() calls shouldn't affect the current input modality.
|
|
89
|
+
// However, we need to detect other cases when a focus event occurs without
|
|
90
|
+
// a preceding user event (e.g. screen reader focus). Overriding the focus
|
|
91
|
+
// method on HTMLElement.prototype is a bit hacky, but works.
|
|
92
|
+
let focus = windowObject.HTMLElement.prototype.focus;
|
|
93
|
+
windowObject.HTMLElement.prototype.focus = function() {
|
|
94
|
+
$507fabe10e71c6fb$var$hasEventBeforeFocus = true;
|
|
95
|
+
focus.apply(this, arguments);
|
|
96
|
+
};
|
|
97
|
+
documentObject.addEventListener('keydown', $507fabe10e71c6fb$var$handleKeyboardEvent, true);
|
|
98
|
+
documentObject.addEventListener('keyup', $507fabe10e71c6fb$var$handleKeyboardEvent, true);
|
|
99
|
+
documentObject.addEventListener('click', $507fabe10e71c6fb$var$handleClickEvent, true);
|
|
100
|
+
// Register focus events on the window so they are sure to happen
|
|
101
|
+
// before React's event listeners (registered on the document).
|
|
102
|
+
windowObject.addEventListener('focus', $507fabe10e71c6fb$var$handleFocusEvent, true);
|
|
103
|
+
windowObject.addEventListener('blur', $507fabe10e71c6fb$var$handleWindowBlur, false);
|
|
104
|
+
if (typeof PointerEvent !== 'undefined') {
|
|
105
|
+
documentObject.addEventListener('pointerdown', $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
106
|
+
documentObject.addEventListener('pointermove', $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
107
|
+
documentObject.addEventListener('pointerup', $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
108
|
+
} else if (process.env.NODE_ENV === 'test') {
|
|
109
|
+
documentObject.addEventListener('mousedown', $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
110
|
+
documentObject.addEventListener('mousemove', $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
111
|
+
documentObject.addEventListener('mouseup', $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
112
|
+
}
|
|
113
|
+
// Add unmount handler
|
|
114
|
+
windowObject.addEventListener('beforeunload', ()=>{
|
|
115
|
+
$507fabe10e71c6fb$var$tearDownWindowFocusTracking(element);
|
|
116
|
+
}, {
|
|
117
|
+
once: true
|
|
118
|
+
});
|
|
119
|
+
$507fabe10e71c6fb$export$d90243b58daecda7.set(windowObject, {
|
|
120
|
+
focus: focus
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
const $507fabe10e71c6fb$var$tearDownWindowFocusTracking = (element, loadListener)=>{
|
|
124
|
+
const windowObject = ($431fbd86ca7dc216$export$f21a1ffae260145a)(element);
|
|
125
|
+
const documentObject = ($431fbd86ca7dc216$export$b204af158042fbac)(element);
|
|
126
|
+
if (loadListener) documentObject.removeEventListener('DOMContentLoaded', loadListener);
|
|
127
|
+
if (!$507fabe10e71c6fb$export$d90243b58daecda7.has(windowObject)) return;
|
|
128
|
+
windowObject.HTMLElement.prototype.focus = $507fabe10e71c6fb$export$d90243b58daecda7.get(windowObject).focus;
|
|
129
|
+
documentObject.removeEventListener('keydown', $507fabe10e71c6fb$var$handleKeyboardEvent, true);
|
|
130
|
+
documentObject.removeEventListener('keyup', $507fabe10e71c6fb$var$handleKeyboardEvent, true);
|
|
131
|
+
documentObject.removeEventListener('click', $507fabe10e71c6fb$var$handleClickEvent, true);
|
|
132
|
+
windowObject.removeEventListener('focus', $507fabe10e71c6fb$var$handleFocusEvent, true);
|
|
133
|
+
windowObject.removeEventListener('blur', $507fabe10e71c6fb$var$handleWindowBlur, false);
|
|
134
|
+
if (typeof PointerEvent !== 'undefined') {
|
|
135
|
+
documentObject.removeEventListener('pointerdown', $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
136
|
+
documentObject.removeEventListener('pointermove', $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
137
|
+
documentObject.removeEventListener('pointerup', $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
138
|
+
} else if (process.env.NODE_ENV === 'test') {
|
|
139
|
+
documentObject.removeEventListener('mousedown', $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
140
|
+
documentObject.removeEventListener('mousemove', $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
141
|
+
documentObject.removeEventListener('mouseup', $507fabe10e71c6fb$var$handlePointerEvent, true);
|
|
142
|
+
}
|
|
143
|
+
$507fabe10e71c6fb$export$d90243b58daecda7.delete(windowObject);
|
|
144
|
+
};
|
|
145
|
+
function $507fabe10e71c6fb$export$2f1888112f558a7d(element) {
|
|
146
|
+
const documentObject = ($431fbd86ca7dc216$export$b204af158042fbac)(element);
|
|
147
|
+
let loadListener;
|
|
148
|
+
if (documentObject.readyState !== 'loading') $507fabe10e71c6fb$var$setupGlobalFocusEvents(element);
|
|
149
|
+
else {
|
|
150
|
+
loadListener = ()=>{
|
|
151
|
+
$507fabe10e71c6fb$var$setupGlobalFocusEvents(element);
|
|
152
|
+
};
|
|
153
|
+
documentObject.addEventListener('DOMContentLoaded', loadListener);
|
|
154
|
+
}
|
|
155
|
+
return ()=>$507fabe10e71c6fb$var$tearDownWindowFocusTracking(element, loadListener);
|
|
156
|
+
}
|
|
157
|
+
// Server-side rendering does not have the document object defined
|
|
158
|
+
// eslint-disable-next-line no-restricted-globals
|
|
159
|
+
if (typeof document !== 'undefined') $507fabe10e71c6fb$export$2f1888112f558a7d();
|
|
160
|
+
function $507fabe10e71c6fb$export$630ff653c5ada6a9() {
|
|
161
|
+
return $507fabe10e71c6fb$var$currentModality;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export { $507fabe10e71c6fb$export$2f1888112f558a7d as addWindowFocusTracking, $507fabe10e71c6fb$export$901e90a13c50a14e as changeHandlers, $507fabe10e71c6fb$export$630ff653c5ada6a9 as getInteractionModality, $507fabe10e71c6fb$export$d90243b58daecda7 as hasSetupGlobalListeners };
|
|
165
|
+
//# sourceMappingURL=useFocusVisible.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFocusVisible.js","sources":["../../../../../../../node_modules/@react-aria/interactions/dist/useFocusVisible.mjs"],"sourcesContent":["import {ignoreFocusEvent as $8a9cb279dc87e130$export$fda7da73ab5d4c48} from \"./utils.mjs\";\nimport {isMac as $28AnR$isMac, openLink as $28AnR$openLink, isVirtualClick as $28AnR$isVirtualClick, getEventTarget as $28AnR$getEventTarget, getOwnerWindow as $28AnR$getOwnerWindow, getOwnerDocument as $28AnR$getOwnerDocument, getActiveElement as $28AnR$getActiveElement} from \"@react-aria/utils\";\nimport {useState as $28AnR$useState, useEffect as $28AnR$useEffect} from \"react\";\nimport {useIsSSR as $28AnR$useIsSSR} from \"@react-aria/ssr\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ // Portions of the code in this file are based on code from react.\n// Original licensing for the following can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions\n\n\n\n\nlet $507fabe10e71c6fb$var$currentModality = null;\nlet $507fabe10e71c6fb$var$currentPointerType = 'keyboard';\nconst $507fabe10e71c6fb$export$901e90a13c50a14e = new Set();\nlet $507fabe10e71c6fb$export$d90243b58daecda7 = new Map(); // We use a map here to support setting event listeners across multiple document objects.\nlet $507fabe10e71c6fb$var$hasEventBeforeFocus = false;\nlet $507fabe10e71c6fb$var$hasBlurredWindowRecently = false;\n// Only Tab or Esc keys will make focus visible on text input elements\nconst $507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS = {\n Tab: true,\n Escape: true\n};\nfunction $507fabe10e71c6fb$var$triggerChangeHandlers(modality, e) {\n for (let handler of $507fabe10e71c6fb$export$901e90a13c50a14e)handler(modality, e);\n}\n/**\n * Helper function to determine if a KeyboardEvent is unmodified and could make keyboard focus styles visible.\n */ function $507fabe10e71c6fb$var$isValidKey(e) {\n // Control and Shift keys trigger when navigating back to the tab with keyboard.\n return !(e.metaKey || !(0, $28AnR$isMac)() && e.altKey || e.ctrlKey || e.key === 'Control' || e.key === 'Shift' || e.key === 'Meta');\n}\nfunction $507fabe10e71c6fb$var$handleKeyboardEvent(e) {\n $507fabe10e71c6fb$var$hasEventBeforeFocus = true;\n if (!(0, $28AnR$openLink).isOpening && $507fabe10e71c6fb$var$isValidKey(e)) {\n $507fabe10e71c6fb$var$currentModality = 'keyboard';\n $507fabe10e71c6fb$var$currentPointerType = 'keyboard';\n $507fabe10e71c6fb$var$triggerChangeHandlers('keyboard', e);\n }\n}\nfunction $507fabe10e71c6fb$var$handlePointerEvent(e) {\n $507fabe10e71c6fb$var$currentModality = 'pointer';\n $507fabe10e71c6fb$var$currentPointerType = 'pointerType' in e ? e.pointerType : 'mouse';\n if (e.type === 'mousedown' || e.type === 'pointerdown') {\n $507fabe10e71c6fb$var$hasEventBeforeFocus = true;\n $507fabe10e71c6fb$var$triggerChangeHandlers('pointer', e);\n }\n}\nfunction $507fabe10e71c6fb$var$handleClickEvent(e) {\n if (!(0, $28AnR$openLink).isOpening && (0, $28AnR$isVirtualClick)(e)) {\n $507fabe10e71c6fb$var$hasEventBeforeFocus = true;\n $507fabe10e71c6fb$var$currentModality = 'virtual';\n $507fabe10e71c6fb$var$currentPointerType = 'virtual';\n }\n}\nfunction $507fabe10e71c6fb$var$handleFocusEvent(e) {\n // Firefox fires two extra focus events when the user first clicks into an iframe:\n // first on the window, then on the document. We ignore these events so they don't\n // cause keyboard focus rings to appear.\n if ((0, $28AnR$getEventTarget)(e) === window || (0, $28AnR$getEventTarget)(e) === document || (0, $8a9cb279dc87e130$export$fda7da73ab5d4c48) || !e.isTrusted) return;\n // If a focus event occurs without a preceding keyboard or pointer event, switch to virtual modality.\n // This occurs, for example, when navigating a form with the next/previous buttons on iOS.\n if (!$507fabe10e71c6fb$var$hasEventBeforeFocus && !$507fabe10e71c6fb$var$hasBlurredWindowRecently) {\n $507fabe10e71c6fb$var$currentModality = 'virtual';\n $507fabe10e71c6fb$var$currentPointerType = 'virtual';\n $507fabe10e71c6fb$var$triggerChangeHandlers('virtual', e);\n }\n $507fabe10e71c6fb$var$hasEventBeforeFocus = false;\n $507fabe10e71c6fb$var$hasBlurredWindowRecently = false;\n}\nfunction $507fabe10e71c6fb$var$handleWindowBlur() {\n if (0, $8a9cb279dc87e130$export$fda7da73ab5d4c48) return;\n // When the window is blurred, reset state. This is necessary when tabbing out of the window,\n // for example, since a subsequent focus event won't be fired.\n $507fabe10e71c6fb$var$hasEventBeforeFocus = false;\n $507fabe10e71c6fb$var$hasBlurredWindowRecently = true;\n}\n/**\n * Setup global event listeners to control when keyboard focus style should be visible.\n */ function $507fabe10e71c6fb$var$setupGlobalFocusEvents(element) {\n if (typeof window === 'undefined' || typeof document === 'undefined' || $507fabe10e71c6fb$export$d90243b58daecda7.get((0, $28AnR$getOwnerWindow)(element))) return;\n const windowObject = (0, $28AnR$getOwnerWindow)(element);\n const documentObject = (0, $28AnR$getOwnerDocument)(element);\n // Programmatic focus() calls shouldn't affect the current input modality.\n // However, we need to detect other cases when a focus event occurs without\n // a preceding user event (e.g. screen reader focus). Overriding the focus\n // method on HTMLElement.prototype is a bit hacky, but works.\n let focus = windowObject.HTMLElement.prototype.focus;\n windowObject.HTMLElement.prototype.focus = function() {\n $507fabe10e71c6fb$var$hasEventBeforeFocus = true;\n focus.apply(this, arguments);\n };\n documentObject.addEventListener('keydown', $507fabe10e71c6fb$var$handleKeyboardEvent, true);\n documentObject.addEventListener('keyup', $507fabe10e71c6fb$var$handleKeyboardEvent, true);\n documentObject.addEventListener('click', $507fabe10e71c6fb$var$handleClickEvent, true);\n // Register focus events on the window so they are sure to happen\n // before React's event listeners (registered on the document).\n windowObject.addEventListener('focus', $507fabe10e71c6fb$var$handleFocusEvent, true);\n windowObject.addEventListener('blur', $507fabe10e71c6fb$var$handleWindowBlur, false);\n if (typeof PointerEvent !== 'undefined') {\n documentObject.addEventListener('pointerdown', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.addEventListener('pointermove', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.addEventListener('pointerup', $507fabe10e71c6fb$var$handlePointerEvent, true);\n } else if (process.env.NODE_ENV === 'test') {\n documentObject.addEventListener('mousedown', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.addEventListener('mousemove', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.addEventListener('mouseup', $507fabe10e71c6fb$var$handlePointerEvent, true);\n }\n // Add unmount handler\n windowObject.addEventListener('beforeunload', ()=>{\n $507fabe10e71c6fb$var$tearDownWindowFocusTracking(element);\n }, {\n once: true\n });\n $507fabe10e71c6fb$export$d90243b58daecda7.set(windowObject, {\n focus: focus\n });\n}\nconst $507fabe10e71c6fb$var$tearDownWindowFocusTracking = (element, loadListener)=>{\n const windowObject = (0, $28AnR$getOwnerWindow)(element);\n const documentObject = (0, $28AnR$getOwnerDocument)(element);\n if (loadListener) documentObject.removeEventListener('DOMContentLoaded', loadListener);\n if (!$507fabe10e71c6fb$export$d90243b58daecda7.has(windowObject)) return;\n windowObject.HTMLElement.prototype.focus = $507fabe10e71c6fb$export$d90243b58daecda7.get(windowObject).focus;\n documentObject.removeEventListener('keydown', $507fabe10e71c6fb$var$handleKeyboardEvent, true);\n documentObject.removeEventListener('keyup', $507fabe10e71c6fb$var$handleKeyboardEvent, true);\n documentObject.removeEventListener('click', $507fabe10e71c6fb$var$handleClickEvent, true);\n windowObject.removeEventListener('focus', $507fabe10e71c6fb$var$handleFocusEvent, true);\n windowObject.removeEventListener('blur', $507fabe10e71c6fb$var$handleWindowBlur, false);\n if (typeof PointerEvent !== 'undefined') {\n documentObject.removeEventListener('pointerdown', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.removeEventListener('pointermove', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.removeEventListener('pointerup', $507fabe10e71c6fb$var$handlePointerEvent, true);\n } else if (process.env.NODE_ENV === 'test') {\n documentObject.removeEventListener('mousedown', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.removeEventListener('mousemove', $507fabe10e71c6fb$var$handlePointerEvent, true);\n documentObject.removeEventListener('mouseup', $507fabe10e71c6fb$var$handlePointerEvent, true);\n }\n $507fabe10e71c6fb$export$d90243b58daecda7.delete(windowObject);\n};\nfunction $507fabe10e71c6fb$export$2f1888112f558a7d(element) {\n const documentObject = (0, $28AnR$getOwnerDocument)(element);\n let loadListener;\n if (documentObject.readyState !== 'loading') $507fabe10e71c6fb$var$setupGlobalFocusEvents(element);\n else {\n loadListener = ()=>{\n $507fabe10e71c6fb$var$setupGlobalFocusEvents(element);\n };\n documentObject.addEventListener('DOMContentLoaded', loadListener);\n }\n return ()=>$507fabe10e71c6fb$var$tearDownWindowFocusTracking(element, loadListener);\n}\n// Server-side rendering does not have the document object defined\n// eslint-disable-next-line no-restricted-globals\nif (typeof document !== 'undefined') $507fabe10e71c6fb$export$2f1888112f558a7d();\nfunction $507fabe10e71c6fb$export$b9b3dfddab17db27() {\n return $507fabe10e71c6fb$var$currentModality !== 'pointer';\n}\nfunction $507fabe10e71c6fb$export$630ff653c5ada6a9() {\n return $507fabe10e71c6fb$var$currentModality;\n}\nfunction $507fabe10e71c6fb$export$8397ddfc504fdb9a(modality) {\n $507fabe10e71c6fb$var$currentModality = modality;\n $507fabe10e71c6fb$var$currentPointerType = modality === 'pointer' ? 'mouse' : modality;\n $507fabe10e71c6fb$var$triggerChangeHandlers(modality, null);\n}\nfunction $507fabe10e71c6fb$export$887a228355cf7d95() {\n return $507fabe10e71c6fb$var$currentPointerType;\n}\nfunction $507fabe10e71c6fb$export$98e20ec92f614cfe() {\n $507fabe10e71c6fb$var$setupGlobalFocusEvents();\n let [modality, setModality] = (0, $28AnR$useState)($507fabe10e71c6fb$var$currentModality);\n (0, $28AnR$useEffect)(()=>{\n let handler = ()=>{\n setModality($507fabe10e71c6fb$var$currentModality);\n };\n $507fabe10e71c6fb$export$901e90a13c50a14e.add(handler);\n return ()=>{\n $507fabe10e71c6fb$export$901e90a13c50a14e.delete(handler);\n };\n }, []);\n return (0, $28AnR$useIsSSR)() ? null : modality;\n}\nconst $507fabe10e71c6fb$var$nonTextInputTypes = new Set([\n 'checkbox',\n 'radio',\n 'range',\n 'color',\n 'file',\n 'image',\n 'button',\n 'submit',\n 'reset'\n]);\n/**\n * If this is attached to text input component, return if the event is a focus event (Tab/Escape keys pressed) so that\n * focus visible style can be properly set.\n */ function $507fabe10e71c6fb$var$isKeyboardFocusEvent(isTextInput, modality, e) {\n let document1 = (0, $28AnR$getOwnerDocument)(e ? (0, $28AnR$getEventTarget)(e) : undefined);\n let eventTarget = e ? (0, $28AnR$getEventTarget)(e) : undefined;\n const IHTMLInputElement = typeof window !== 'undefined' ? (0, $28AnR$getOwnerWindow)(eventTarget).HTMLInputElement : HTMLInputElement;\n const IHTMLTextAreaElement = typeof window !== 'undefined' ? (0, $28AnR$getOwnerWindow)(eventTarget).HTMLTextAreaElement : HTMLTextAreaElement;\n const IHTMLElement = typeof window !== 'undefined' ? (0, $28AnR$getOwnerWindow)(eventTarget).HTMLElement : HTMLElement;\n const IKeyboardEvent = typeof window !== 'undefined' ? (0, $28AnR$getOwnerWindow)(eventTarget).KeyboardEvent : KeyboardEvent;\n // For keyboard events that occur on a non-input element that will move focus into input element (aka ArrowLeft going from Datepicker button to the main input group)\n // we need to rely on the user passing isTextInput into here. This way we can skip toggling focus visiblity for said input element\n let activeElement = (0, $28AnR$getActiveElement)(document1);\n isTextInput = isTextInput || activeElement instanceof IHTMLInputElement && !$507fabe10e71c6fb$var$nonTextInputTypes.has(activeElement.type) || activeElement instanceof IHTMLTextAreaElement || activeElement instanceof IHTMLElement && activeElement.isContentEditable;\n return !(isTextInput && modality === 'keyboard' && e instanceof IKeyboardEvent && !$507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS[e.key]);\n}\nfunction $507fabe10e71c6fb$export$ffd9e5021c1fb2d6(props = {}) {\n let { isTextInput: isTextInput, autoFocus: autoFocus } = props;\n let [isFocusVisibleState, setFocusVisible] = (0, $28AnR$useState)(autoFocus || $507fabe10e71c6fb$export$b9b3dfddab17db27());\n $507fabe10e71c6fb$export$ec71b4b83ac08ec3((isFocusVisible)=>{\n setFocusVisible(isFocusVisible);\n }, [\n isTextInput\n ], {\n isTextInput: isTextInput\n });\n return {\n isFocusVisible: isFocusVisibleState\n };\n}\nfunction $507fabe10e71c6fb$export$ec71b4b83ac08ec3(fn, deps, opts) {\n $507fabe10e71c6fb$var$setupGlobalFocusEvents();\n (0, $28AnR$useEffect)(()=>{\n if ((opts === null || opts === void 0 ? void 0 : opts.enabled) === false) return;\n let handler = (modality, e)=>{\n // We want to early return for any keyboard events that occur inside text inputs EXCEPT for Tab and Escape\n if (!$507fabe10e71c6fb$var$isKeyboardFocusEvent(!!(opts === null || opts === void 0 ? void 0 : opts.isTextInput), modality, e)) return;\n fn($507fabe10e71c6fb$export$b9b3dfddab17db27());\n };\n $507fabe10e71c6fb$export$901e90a13c50a14e.add(handler);\n return ()=>{\n $507fabe10e71c6fb$export$901e90a13c50a14e.delete(handler);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, deps);\n}\n\n\nexport {$507fabe10e71c6fb$export$901e90a13c50a14e as changeHandlers, $507fabe10e71c6fb$export$d90243b58daecda7 as hasSetupGlobalListeners, $507fabe10e71c6fb$export$2f1888112f558a7d as addWindowFocusTracking, $507fabe10e71c6fb$export$b9b3dfddab17db27 as isFocusVisible, $507fabe10e71c6fb$export$630ff653c5ada6a9 as getInteractionModality, $507fabe10e71c6fb$export$8397ddfc504fdb9a as setInteractionModality, $507fabe10e71c6fb$export$887a228355cf7d95 as getPointerType, $507fabe10e71c6fb$export$98e20ec92f614cfe as useInteractionModality, $507fabe10e71c6fb$export$ffd9e5021c1fb2d6 as useFocusVisible, $507fabe10e71c6fb$export$ec71b4b83ac08ec3 as useFocusVisibleListener};\n//# sourceMappingURL=useFocusVisible.module.js.map\n"],"names":["$28AnR$isMac","$28AnR$openLink","$28AnR$isVirtualClick","$28AnR$getEventTarget","$28AnR$getOwnerWindow","$28AnR$getOwnerDocument"],"mappings":";;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA,IAAI,qCAAqC,GAAG,IAAI;AAE3C,MAAC,yCAAyC,GAAG,IAAI,GAAG;AACtD,IAAC,yCAAyC,GAAG,IAAI,GAAG,GAAG;AAC1D,IAAI,yCAAyC,GAAG,KAAK;AACrD,IAAI,8CAA8C,GAAG,KAAK;AAM1D,SAAS,2CAA2C,CAAC,QAAQ,EAAE,CAAC,EAAE;AAClE,IAAI,KAAK,IAAI,OAAO,IAAI,yCAAyC,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;AACtF;AACA;AACA;AACA,IAAI,SAAS,gCAAgC,CAAC,CAAC,EAAE;AACjD;AACA,IAAI,OAAO,EAAE,CAAC,CAAC,OAAO,IAAI,CAAC,CAAIA,yCAAY,GAAG,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,GAAG,KAAK,SAAS,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,IAAI,CAAC,CAAC,GAAG,KAAK,MAAM,CAAC;AACxI;AACA,SAAS,yCAAyC,CAAC,CAAC,EAAE;AACtD,IAAI,yCAAyC,GAAG,IAAI;AACpD,IAAI,IAAI,CAAC,CAAIC,yCAAe,EAAE,SAAS,IAAI,gCAAgC,CAAC,CAAC,CAAC,EAAE;AAChF,QAAQ,qCAAqC,GAAG,UAAU;AAE1D,QAAQ,2CAA2C,CAAC,UAAU,EAAE,CAAC,CAAC;AAClE,IAAI;AACJ;AACA,SAAS,wCAAwC,CAAC,CAAC,EAAE;AACrD,IAAI,qCAAqC,GAAG,SAAS;A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K,WAAW,EAAE,yCAAyC,EAAE;AAIhF,SAAS,yCAAyC,GAAG;AACrD,IAAI,OAAO,qCAAqC;AAChD;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../../../../node_modules/@react-aria/interactions/dist/utils.mjs"],"sourcesContent":["import {useLayoutEffect as $6dfIe$useLayoutEffect, getEventTarget as $6dfIe$getEventTarget, getActiveElement as $6dfIe$getActiveElement, isFocusable as $6dfIe$isFocusable, getOwnerWindow as $6dfIe$getOwnerWindow, focusWithoutScrolling as $6dfIe$focusWithoutScrolling} from \"@react-aria/utils\";\nimport {useRef as $6dfIe$useRef, useCallback as $6dfIe$useCallback} from \"react\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nfunction $8a9cb279dc87e130$export$525bc4921d56d4a(nativeEvent) {\n let event = nativeEvent;\n event.nativeEvent = nativeEvent;\n event.isDefaultPrevented = ()=>event.defaultPrevented;\n // cancelBubble is technically deprecated in the spec, but still supported in all browsers.\n event.isPropagationStopped = ()=>event.cancelBubble;\n event.persist = ()=>{};\n return event;\n}\nfunction $8a9cb279dc87e130$export$c2b7abe5d61ec696(event, target) {\n Object.defineProperty(event, 'target', {\n value: target\n });\n Object.defineProperty(event, 'currentTarget', {\n value: target\n });\n}\nfunction $8a9cb279dc87e130$export$715c682d09d639cc(onBlur) {\n let stateRef = (0, $6dfIe$useRef)({\n isFocused: false,\n observer: null\n });\n // Clean up MutationObserver on unmount. See below.\n (0, $6dfIe$useLayoutEffect)(()=>{\n const state = stateRef.current;\n return ()=>{\n if (state.observer) {\n state.observer.disconnect();\n state.observer = null;\n }\n };\n }, []);\n // This function is called during a React onFocus event.\n return (0, $6dfIe$useCallback)((e)=>{\n // React does not fire onBlur when an element is disabled. https://github.com/facebook/react/issues/9142\n // Most browsers fire a native focusout event in this case, except for Firefox. In that case, we use a\n // MutationObserver to watch for the disabled attribute, and dispatch these events ourselves.\n // For browsers that do, focusout fires before the MutationObserver, so onBlur should not fire twice.\n let eventTarget = (0, $6dfIe$getEventTarget)(e);\n if (eventTarget instanceof HTMLButtonElement || eventTarget instanceof HTMLInputElement || eventTarget instanceof HTMLTextAreaElement || eventTarget instanceof HTMLSelectElement) {\n stateRef.current.isFocused = true;\n let target = eventTarget;\n let onBlurHandler = (e)=>{\n stateRef.current.isFocused = false;\n if (target.disabled) {\n // For backward compatibility, dispatch a (fake) React synthetic event.\n let event = $8a9cb279dc87e130$export$525bc4921d56d4a(e);\n onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);\n }\n // We no longer need the MutationObserver once the target is blurred.\n if (stateRef.current.observer) {\n stateRef.current.observer.disconnect();\n stateRef.current.observer = null;\n }\n };\n target.addEventListener('focusout', onBlurHandler, {\n once: true\n });\n stateRef.current.observer = new MutationObserver(()=>{\n if (stateRef.current.isFocused && target.disabled) {\n var _stateRef_current_observer;\n (_stateRef_current_observer = stateRef.current.observer) === null || _stateRef_current_observer === void 0 ? void 0 : _stateRef_current_observer.disconnect();\n let relatedTargetEl = target === (0, $6dfIe$getActiveElement)() ? null : (0, $6dfIe$getActiveElement)();\n target.dispatchEvent(new FocusEvent('blur', {\n relatedTarget: relatedTargetEl\n }));\n target.dispatchEvent(new FocusEvent('focusout', {\n bubbles: true,\n relatedTarget: relatedTargetEl\n }));\n }\n });\n stateRef.current.observer.observe(target, {\n attributes: true,\n attributeFilter: [\n 'disabled'\n ]\n });\n }\n }, [\n onBlur\n ]);\n}\nlet $8a9cb279dc87e130$export$fda7da73ab5d4c48 = false;\nfunction $8a9cb279dc87e130$export$cabe61c495ee3649(target) {\n // The browser will focus the nearest focusable ancestor of our target.\n while(target && !(0, $6dfIe$isFocusable)(target))target = target.parentElement;\n let window = (0, $6dfIe$getOwnerWindow)(target);\n let activeElement = window.document.activeElement;\n if (!activeElement || activeElement === target) return;\n $8a9cb279dc87e130$export$fda7da73ab5d4c48 = true;\n let isRefocusing = false;\n let onBlur = (e)=>{\n if ((0, $6dfIe$getEventTarget)(e) === activeElement || isRefocusing) e.stopImmediatePropagation();\n };\n let onFocusOut = (e)=>{\n if ((0, $6dfIe$getEventTarget)(e) === activeElement || isRefocusing) {\n e.stopImmediatePropagation();\n // If there was no focusable ancestor, we don't expect a focus event.\n // Re-focus the original active element here.\n if (!target && !isRefocusing) {\n isRefocusing = true;\n (0, $6dfIe$focusWithoutScrolling)(activeElement);\n cleanup();\n }\n }\n };\n let onFocus = (e)=>{\n if ((0, $6dfIe$getEventTarget)(e) === target || isRefocusing) e.stopImmediatePropagation();\n };\n let onFocusIn = (e)=>{\n if ((0, $6dfIe$getEventTarget)(e) === target || isRefocusing) {\n e.stopImmediatePropagation();\n if (!isRefocusing) {\n isRefocusing = true;\n (0, $6dfIe$focusWithoutScrolling)(activeElement);\n cleanup();\n }\n }\n };\n window.addEventListener('blur', onBlur, true);\n window.addEventListener('focusout', onFocusOut, true);\n window.addEventListener('focusin', onFocusIn, true);\n window.addEventListener('focus', onFocus, true);\n let cleanup = ()=>{\n cancelAnimationFrame(raf);\n window.removeEventListener('blur', onBlur, true);\n window.removeEventListener('focusout', onFocusOut, true);\n window.removeEventListener('focusin', onFocusIn, true);\n window.removeEventListener('focus', onFocus, true);\n $8a9cb279dc87e130$export$fda7da73ab5d4c48 = false;\n isRefocusing = false;\n };\n let raf = requestAnimationFrame(cleanup);\n return cleanup;\n}\n\n\nexport {$8a9cb279dc87e130$export$525bc4921d56d4a as createSyntheticEvent, $8a9cb279dc87e130$export$c2b7abe5d61ec696 as setEventTarget, $8a9cb279dc87e130$export$715c682d09d639cc as useSyntheticBlurEvent, $8a9cb279dc87e130$export$fda7da73ab5d4c48 as ignoreFocusEvent, $8a9cb279dc87e130$export$cabe61c495ee3649 as preventFocus};\n//# sourceMappingURL=utils.module.js.map\n"],"names":[],"mappings":";;AAkGG,IAAC,yCAAyC,GAAG;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { isShadowRoot as $431fbd86ca7dc216$export$af51f0f06c0f328a } from './domHelpers.js';
|
|
2
|
+
import { shadowDOM as $f4e2df6bd15f8569$export$98658e8c59125e6a } from '../../../@react-stately/flags/dist/import.js';
|
|
3
|
+
|
|
4
|
+
// Source: https://github.com/microsoft/tabster/blob/a89fc5d7e332d48f68d03b1ca6e344489d1c3898/src/Shadowdomize/DOMFunctions.ts#L16
|
|
5
|
+
/* eslint-disable rsp-rules/no-non-shadow-contains, rsp-rules/safe-event-target */
|
|
6
|
+
|
|
7
|
+
function $d4ee10de306f2510$export$4282f70798064fe0(node, otherNode) {
|
|
8
|
+
if (!($f4e2df6bd15f8569$export$98658e8c59125e6a)()) return otherNode && node ? node.contains(otherNode) : false;
|
|
9
|
+
if (!node || !otherNode) return false;
|
|
10
|
+
let currentNode = otherNode;
|
|
11
|
+
while(currentNode !== null){
|
|
12
|
+
if (currentNode === node) return true;
|
|
13
|
+
if (currentNode.tagName === 'SLOT' && currentNode.assignedSlot) // Element is slotted
|
|
14
|
+
currentNode = currentNode.assignedSlot.parentNode;
|
|
15
|
+
else if (($431fbd86ca7dc216$export$af51f0f06c0f328a)(currentNode)) // Element is in shadow root
|
|
16
|
+
currentNode = currentNode.host;
|
|
17
|
+
else currentNode = currentNode.parentNode;
|
|
18
|
+
}
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
const $d4ee10de306f2510$export$cd4e5573fbe2b576 = (doc = document)=>{
|
|
22
|
+
var _activeElement_shadowRoot;
|
|
23
|
+
if (!($f4e2df6bd15f8569$export$98658e8c59125e6a)()) return doc.activeElement;
|
|
24
|
+
let activeElement = doc.activeElement;
|
|
25
|
+
while(activeElement && 'shadowRoot' in activeElement && ((_activeElement_shadowRoot = activeElement.shadowRoot) === null || _activeElement_shadowRoot === void 0 ? void 0 : _activeElement_shadowRoot.activeElement))activeElement = activeElement.shadowRoot.activeElement;
|
|
26
|
+
return activeElement;
|
|
27
|
+
};
|
|
28
|
+
function $d4ee10de306f2510$export$e58f029f0fbfdb29(event) {
|
|
29
|
+
if (($f4e2df6bd15f8569$export$98658e8c59125e6a)() && event.target instanceof Element && event.target.shadowRoot) {
|
|
30
|
+
var _event_composedPath_, _event_nativeEvent_composedPath_;
|
|
31
|
+
if ('composedPath' in event) return (_event_composedPath_ = event.composedPath()[0]) !== null && _event_composedPath_ !== void 0 ? _event_composedPath_ : null;
|
|
32
|
+
else if ('composedPath' in event.nativeEvent) return (_event_nativeEvent_composedPath_ = event.nativeEvent.composedPath()[0]) !== null && _event_nativeEvent_composedPath_ !== void 0 ? _event_nativeEvent_composedPath_ : null;
|
|
33
|
+
}
|
|
34
|
+
return event.target;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { $d4ee10de306f2510$export$cd4e5573fbe2b576 as getActiveElement, $d4ee10de306f2510$export$e58f029f0fbfdb29 as getEventTarget, $d4ee10de306f2510$export$4282f70798064fe0 as nodeContains };
|
|
38
|
+
//# sourceMappingURL=DOMFunctions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DOMFunctions.js","sources":["../../../../../../../node_modules/@react-aria/utils/dist/DOMFunctions.mjs"],"sourcesContent":["import {getOwnerWindow as $431fbd86ca7dc216$export$f21a1ffae260145a, isShadowRoot as $431fbd86ca7dc216$export$af51f0f06c0f328a} from \"./domHelpers.mjs\";\nimport {shadowDOM as $lcSu5$shadowDOM} from \"@react-stately/flags\";\n\n// Source: https://github.com/microsoft/tabster/blob/a89fc5d7e332d48f68d03b1ca6e344489d1c3898/src/Shadowdomize/DOMFunctions.ts#L16\n/* eslint-disable rsp-rules/no-non-shadow-contains, rsp-rules/safe-event-target */ \n\nfunction $d4ee10de306f2510$export$4282f70798064fe0(node, otherNode) {\n if (!(0, $lcSu5$shadowDOM)()) return otherNode && node ? node.contains(otherNode) : false;\n if (!node || !otherNode) return false;\n let currentNode = otherNode;\n while(currentNode !== null){\n if (currentNode === node) return true;\n if (currentNode.tagName === 'SLOT' && currentNode.assignedSlot) // Element is slotted\n currentNode = currentNode.assignedSlot.parentNode;\n else if ((0, $431fbd86ca7dc216$export$af51f0f06c0f328a)(currentNode)) // Element is in shadow root\n currentNode = currentNode.host;\n else currentNode = currentNode.parentNode;\n }\n return false;\n}\nconst $d4ee10de306f2510$export$cd4e5573fbe2b576 = (doc = document)=>{\n var _activeElement_shadowRoot;\n if (!(0, $lcSu5$shadowDOM)()) return doc.activeElement;\n let activeElement = doc.activeElement;\n while(activeElement && 'shadowRoot' in activeElement && ((_activeElement_shadowRoot = activeElement.shadowRoot) === null || _activeElement_shadowRoot === void 0 ? void 0 : _activeElement_shadowRoot.activeElement))activeElement = activeElement.shadowRoot.activeElement;\n return activeElement;\n};\nfunction $d4ee10de306f2510$export$e58f029f0fbfdb29(event) {\n if ((0, $lcSu5$shadowDOM)() && event.target instanceof Element && event.target.shadowRoot) {\n var _event_composedPath_, _event_nativeEvent_composedPath_;\n if ('composedPath' in event) return (_event_composedPath_ = event.composedPath()[0]) !== null && _event_composedPath_ !== void 0 ? _event_composedPath_ : null;\n else if ('composedPath' in event.nativeEvent) return (_event_nativeEvent_composedPath_ = event.nativeEvent.composedPath()[0]) !== null && _event_nativeEvent_composedPath_ !== void 0 ? _event_nativeEvent_composedPath_ : null;\n }\n return event.target;\n}\nfunction $d4ee10de306f2510$export$b4f377a2b6254582(node) {\n if (!node) return false;\n // Get the active element within the node's parent shadow root (or the document). Can return null.\n let root = node.getRootNode();\n let ownerWindow = (0, $431fbd86ca7dc216$export$f21a1ffae260145a)(node);\n if (!(root instanceof ownerWindow.Document || root instanceof ownerWindow.ShadowRoot)) return false;\n let activeElement = root.activeElement;\n // Check if the active element is within this node. These nodes are within the same shadow root.\n return activeElement != null && node.contains(activeElement);\n}\n\n\nexport {$d4ee10de306f2510$export$4282f70798064fe0 as nodeContains, $d4ee10de306f2510$export$cd4e5573fbe2b576 as getActiveElement, $d4ee10de306f2510$export$e58f029f0fbfdb29 as getEventTarget, $d4ee10de306f2510$export$b4f377a2b6254582 as isFocusWithin};\n//# sourceMappingURL=DOMFunctions.module.js.map\n"],"names":["$lcSu5$shadowDOM"],"mappings":";;;AAGA;AACA;;AAEA,SAAS,yCAAyC,CAAC,IAAI,EAAE,SAAS,EAAE;AACpE,IAAI,IAAI,CAAC,CAAIA,yCAAgB,GAAG,EAAE,OAAO,SAAS,IAAI,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,KAAK;AAC7F,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,SAAS,EAAE,OAAO,KAAK;AACzC,IAAI,IAAI,WAAW,GAAG,SAAS;AAC/B,IAAI,MAAM,WAAW,KAAK,IAAI,CAAC;AAC/B,QAAQ,IAAI,WAAW,KAAK,IAAI,EAAE,OAAO,IAAI;AAC7C,QAAQ,IAAI,WAAW,CAAC,OAAO,KAAK,MAAM,IAAI,WAAW,CAAC,YAAY;AACtE,QAAQ,WAAW,GAAG,WAAW,CAAC,YAAY,CAAC,UAAU;AACzD,aAAa,IAAI,CAAI,yCAAyC,EAAE,WAAW,CAAC;AAC5E,QAAQ,WAAW,GAAG,WAAW,CAAC,IAAI;AACtC,aAAa,WAAW,GAAG,WAAW,CAAC,UAAU;AACjD,IAAI;AACJ,IAAI,OAAO,KAAK;AAChB;AACK,MAAC,yCAAyC,GAAG,CAAC,GAAG,GAAG,QAAQ,GAAG;AACpE,IAAI,IAAI,yBAAyB;AACjC,IAAI,IAAI,CAAC,CAAIA,yCAAgB,GAAG,EAAE,OAAO,GAAG,CAAC,aAAa;AAC1D,IAAI,IAAI,aAAa,GAAG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