@react-aria/focus 3.5.2 → 3.5.3

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/module.js CHANGED
@@ -1,35 +1,35 @@
1
- import $6saFI$react, {useRef as $6saFI$useRef, useContext as $6saFI$useContext, useEffect as $6saFI$useEffect, useState as $6saFI$useState} from "react";
2
- import {useLayoutEffect as $6saFI$useLayoutEffect, runAfterTransition as $6saFI$runAfterTransition, focusWithoutScrolling as $6saFI$focusWithoutScrolling, mergeProps as $6saFI$mergeProps, useSyncRef as $6saFI$useSyncRef} from "@react-aria/utils";
3
- import {getInteractionModality as $6saFI$getInteractionModality, isFocusVisible as $6saFI$isFocusVisible, useFocusVisibleListener as $6saFI$useFocusVisibleListener, useFocus as $6saFI$useFocus, useFocusWithin as $6saFI$useFocusWithin, useKeyboard as $6saFI$useKeyboard} from "@react-aria/interactions";
4
- import $6saFI$clsx from "clsx";
1
+ import $6nfFC$react, {useRef as $6nfFC$useRef, useContext as $6nfFC$useContext, useEffect as $6nfFC$useEffect, useState as $6nfFC$useState} from "react";
2
+ import {useLayoutEffect as $6nfFC$useLayoutEffect, runAfterTransition as $6nfFC$runAfterTransition, focusWithoutScrolling as $6nfFC$focusWithoutScrolling, mergeProps as $6nfFC$mergeProps, useSyncRef as $6nfFC$useSyncRef} from "@react-aria/utils";
3
+ import {getInteractionModality as $6nfFC$getInteractionModality, isFocusVisible as $6nfFC$isFocusVisible, useFocusVisibleListener as $6nfFC$useFocusVisibleListener, useFocus as $6nfFC$useFocus, useFocusWithin as $6nfFC$useFocusWithin, useKeyboard as $6nfFC$useKeyboard} from "@react-aria/interactions";
4
+ import $6nfFC$clsx from "clsx";
5
5
 
6
6
  function $parcel$export(e, n, v, s) {
7
7
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
8
8
  }
9
- var $14e5c84cbc2e6e2e$exports = {};
9
+ var $9bf71ea28793e738$exports = {};
10
10
 
11
- $parcel$export($14e5c84cbc2e6e2e$exports, "FocusScope", () => $14e5c84cbc2e6e2e$export$20e40289641fbbb6);
12
- $parcel$export($14e5c84cbc2e6e2e$exports, "useFocusManager", () => $14e5c84cbc2e6e2e$export$10c5169755ce7bd7);
13
- $parcel$export($14e5c84cbc2e6e2e$exports, "getFocusableTreeWalker", () => $14e5c84cbc2e6e2e$export$2d6ec8fc375ceafa);
14
- $parcel$export($14e5c84cbc2e6e2e$exports, "createFocusManager", () => $14e5c84cbc2e6e2e$export$c5251b9e124bf29);
15
- var $1159c3b6ba210e4f$exports = {};
11
+ $parcel$export($9bf71ea28793e738$exports, "FocusScope", () => $9bf71ea28793e738$export$20e40289641fbbb6);
12
+ $parcel$export($9bf71ea28793e738$exports, "useFocusManager", () => $9bf71ea28793e738$export$10c5169755ce7bd7);
13
+ $parcel$export($9bf71ea28793e738$exports, "getFocusableTreeWalker", () => $9bf71ea28793e738$export$2d6ec8fc375ceafa);
14
+ $parcel$export($9bf71ea28793e738$exports, "createFocusManager", () => $9bf71ea28793e738$export$c5251b9e124bf29);
15
+ var $6a99195332edec8b$exports = {};
16
16
 
17
- $parcel$export($1159c3b6ba210e4f$exports, "focusSafely", () => $1159c3b6ba210e4f$export$80f3e147d781571c);
17
+ $parcel$export($6a99195332edec8b$exports, "focusSafely", () => $6a99195332edec8b$export$80f3e147d781571c);
18
18
 
19
19
 
20
- function $1159c3b6ba210e4f$export$80f3e147d781571c(element) {
20
+ function $6a99195332edec8b$export$80f3e147d781571c(element) {
21
21
  // If the user is interacting with a virtual cursor, e.g. screen reader, then
22
22
  // wait until after any animated transitions that are currently occurring on
23
23
  // the page before shifting focus. This avoids issues with VoiceOver on iOS
24
24
  // causing the page to scroll when moving focus if the element is transitioning
25
25
  // from off the screen.
26
- if ($6saFI$getInteractionModality() === 'virtual') {
26
+ if ($6nfFC$getInteractionModality() === 'virtual') {
27
27
  let lastFocusedElement = document.activeElement;
28
- $6saFI$runAfterTransition(()=>{
28
+ $6nfFC$runAfterTransition(()=>{
29
29
  // If focus did not move and the element is still in the document, focus it.
30
- if (document.activeElement === lastFocusedElement && document.contains(element)) $6saFI$focusWithoutScrolling(element);
30
+ if (document.activeElement === lastFocusedElement && document.contains(element)) $6nfFC$focusWithoutScrolling(element);
31
31
  });
32
- } else $6saFI$focusWithoutScrolling(element);
32
+ } else $6nfFC$focusWithoutScrolling(element);
33
33
  }
34
34
 
35
35
 
@@ -43,7 +43,7 @@ function $1159c3b6ba210e4f$export$80f3e147d781571c(element) {
43
43
  * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
44
44
  * OF ANY KIND, either express or implied. See the License for the specific language
45
45
  * governing permissions and limitations under the License.
46
- */ function $985a2847ebcbb615$var$isStyleVisible(element) {
46
+ */ function $645f2e67b85a24c9$var$isStyleVisible(element) {
47
47
  if (!(element instanceof HTMLElement) && !(element instanceof SVGElement)) return false;
48
48
  let { display: display , visibility: visibility } = element.style;
49
49
  let isVisible = display !== 'none' && visibility !== 'hidden' && visibility !== 'collapse';
@@ -54,27 +54,27 @@ function $1159c3b6ba210e4f$export$80f3e147d781571c(element) {
54
54
  }
55
55
  return isVisible;
56
56
  }
57
- function $985a2847ebcbb615$var$isAttributeVisible(element, childElement) {
57
+ function $645f2e67b85a24c9$var$isAttributeVisible(element, childElement) {
58
58
  return !element.hasAttribute('hidden') && (element.nodeName === 'DETAILS' && childElement && childElement.nodeName !== 'SUMMARY' ? element.hasAttribute('open') : true);
59
59
  }
60
- function $985a2847ebcbb615$export$e989c0fffaa6b27a(element, childElement) {
61
- return element.nodeName !== '#comment' && $985a2847ebcbb615$var$isStyleVisible(element) && $985a2847ebcbb615$var$isAttributeVisible(element, childElement) && (!element.parentElement || $985a2847ebcbb615$export$e989c0fffaa6b27a(element.parentElement, element));
60
+ function $645f2e67b85a24c9$export$e989c0fffaa6b27a(element, childElement) {
61
+ return element.nodeName !== '#comment' && $645f2e67b85a24c9$var$isStyleVisible(element) && $645f2e67b85a24c9$var$isAttributeVisible(element, childElement) && (!element.parentElement || $645f2e67b85a24c9$export$e989c0fffaa6b27a(element.parentElement, element));
62
62
  }
63
63
 
64
64
 
65
65
 
66
66
 
67
- const $14e5c84cbc2e6e2e$var$FocusContext = /*#__PURE__*/ $6saFI$react.createContext(null);
68
- let $14e5c84cbc2e6e2e$var$activeScope = null;
69
- let $14e5c84cbc2e6e2e$var$scopes = new Map();
70
- function $14e5c84cbc2e6e2e$export$20e40289641fbbb6(props) {
67
+ const $9bf71ea28793e738$var$FocusContext = /*#__PURE__*/ $6nfFC$react.createContext(null);
68
+ let $9bf71ea28793e738$var$activeScope = null;
69
+ let $9bf71ea28793e738$var$scopes = new Map();
70
+ function $9bf71ea28793e738$export$20e40289641fbbb6(props) {
71
71
  let { children: children , contain: contain , restoreFocus: restoreFocus , autoFocus: autoFocus } = props;
72
- let startRef = $6saFI$useRef();
73
- let endRef = $6saFI$useRef();
74
- let scopeRef = $6saFI$useRef([]);
75
- let ctx = $6saFI$useContext($14e5c84cbc2e6e2e$var$FocusContext);
72
+ let startRef = $6nfFC$useRef();
73
+ let endRef = $6nfFC$useRef();
74
+ let scopeRef = $6nfFC$useRef([]);
75
+ let ctx = $6nfFC$useContext($9bf71ea28793e738$var$FocusContext);
76
76
  let parentScope = ctx === null || ctx === void 0 ? void 0 : ctx.scopeRef;
77
- $6saFI$useLayoutEffect(()=>{
77
+ $6nfFC$useLayoutEffect(()=>{
78
78
  // Find all rendered nodes between the sentinels and add them to the scope.
79
79
  let node = startRef.current.nextSibling;
80
80
  let nodes = [];
@@ -87,43 +87,43 @@ function $14e5c84cbc2e6e2e$export$20e40289641fbbb6(props) {
87
87
  children,
88
88
  parentScope
89
89
  ]);
90
- $6saFI$useLayoutEffect(()=>{
91
- $14e5c84cbc2e6e2e$var$scopes.set(scopeRef, parentScope);
90
+ $6nfFC$useLayoutEffect(()=>{
91
+ $9bf71ea28793e738$var$scopes.set(scopeRef, parentScope);
92
92
  return ()=>{
93
93
  // Restore the active scope on unmount if this scope or a descendant scope is active.
94
94
  // Parent effect cleanups run before children, so we need to check if the
95
95
  // parent scope actually still exists before restoring the active scope to it.
96
- if ((scopeRef === $14e5c84cbc2e6e2e$var$activeScope || $14e5c84cbc2e6e2e$var$isAncestorScope(scopeRef, $14e5c84cbc2e6e2e$var$activeScope)) && (!parentScope || $14e5c84cbc2e6e2e$var$scopes.has(parentScope))) $14e5c84cbc2e6e2e$var$activeScope = parentScope;
97
- $14e5c84cbc2e6e2e$var$scopes.delete(scopeRef);
96
+ if ((scopeRef === $9bf71ea28793e738$var$activeScope || $9bf71ea28793e738$var$isAncestorScope(scopeRef, $9bf71ea28793e738$var$activeScope)) && (!parentScope || $9bf71ea28793e738$var$scopes.has(parentScope))) $9bf71ea28793e738$var$activeScope = parentScope;
97
+ $9bf71ea28793e738$var$scopes.delete(scopeRef);
98
98
  };
99
99
  }, [
100
100
  scopeRef,
101
101
  parentScope
102
102
  ]);
103
- $14e5c84cbc2e6e2e$var$useFocusContainment(scopeRef, contain);
104
- $14e5c84cbc2e6e2e$var$useRestoreFocus(scopeRef, restoreFocus, contain);
105
- $14e5c84cbc2e6e2e$var$useAutoFocus(scopeRef, autoFocus);
106
- let focusManager = $14e5c84cbc2e6e2e$var$createFocusManagerForScope(scopeRef);
107
- return(/*#__PURE__*/ $6saFI$react.createElement($14e5c84cbc2e6e2e$var$FocusContext.Provider, {
103
+ $9bf71ea28793e738$var$useFocusContainment(scopeRef, contain);
104
+ $9bf71ea28793e738$var$useRestoreFocus(scopeRef, restoreFocus, contain);
105
+ $9bf71ea28793e738$var$useAutoFocus(scopeRef, autoFocus);
106
+ let focusManager = $9bf71ea28793e738$var$createFocusManagerForScope(scopeRef);
107
+ return(/*#__PURE__*/ $6nfFC$react.createElement($9bf71ea28793e738$var$FocusContext.Provider, {
108
108
  value: {
109
109
  scopeRef: scopeRef,
110
110
  focusManager: focusManager
111
111
  }
112
- }, /*#__PURE__*/ $6saFI$react.createElement("span", {
112
+ }, /*#__PURE__*/ $6nfFC$react.createElement("span", {
113
113
  "data-focus-scope-start": true,
114
114
  hidden: true,
115
115
  ref: startRef
116
- }), children, /*#__PURE__*/ $6saFI$react.createElement("span", {
116
+ }), children, /*#__PURE__*/ $6nfFC$react.createElement("span", {
117
117
  "data-focus-scope-end": true,
118
118
  hidden: true,
119
119
  ref: endRef
120
120
  })));
121
121
  }
122
- function $14e5c84cbc2e6e2e$export$10c5169755ce7bd7() {
122
+ function $9bf71ea28793e738$export$10c5169755ce7bd7() {
123
123
  var ref;
124
- return (ref = $6saFI$useContext($14e5c84cbc2e6e2e$var$FocusContext)) === null || ref === void 0 ? void 0 : ref.focusManager;
124
+ return (ref = $6nfFC$useContext($9bf71ea28793e738$var$FocusContext)) === null || ref === void 0 ? void 0 : ref.focusManager;
125
125
  }
126
- function $14e5c84cbc2e6e2e$var$createFocusManagerForScope(scopeRef) {
126
+ function $9bf71ea28793e738$var$createFocusManagerForScope(scopeRef) {
127
127
  return {
128
128
  focusNext (opts = {
129
129
  }) {
@@ -131,16 +131,16 @@ function $14e5c84cbc2e6e2e$var$createFocusManagerForScope(scopeRef) {
131
131
  let { from: from , tabbable: tabbable , wrap: wrap } = opts;
132
132
  let node = from || document.activeElement;
133
133
  let sentinel = scope[0].previousElementSibling;
134
- let walker = $14e5c84cbc2e6e2e$export$2d6ec8fc375ceafa($14e5c84cbc2e6e2e$var$getScopeRoot(scope), {
134
+ let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa($9bf71ea28793e738$var$getScopeRoot(scope), {
135
135
  tabbable: tabbable
136
136
  }, scope);
137
- walker.currentNode = $14e5c84cbc2e6e2e$var$isElementInScope(node, scope) ? node : sentinel;
137
+ walker.currentNode = $9bf71ea28793e738$var$isElementInScope(node, scope) ? node : sentinel;
138
138
  let nextNode = walker.nextNode();
139
139
  if (!nextNode && wrap) {
140
140
  walker.currentNode = sentinel;
141
141
  nextNode = walker.nextNode();
142
142
  }
143
- if (nextNode) $14e5c84cbc2e6e2e$var$focusElement(nextNode, true);
143
+ if (nextNode) $9bf71ea28793e738$var$focusElement(nextNode, true);
144
144
  return nextNode;
145
145
  },
146
146
  focusPrevious (opts = {
@@ -149,45 +149,45 @@ function $14e5c84cbc2e6e2e$var$createFocusManagerForScope(scopeRef) {
149
149
  let { from: from , tabbable: tabbable , wrap: wrap } = opts;
150
150
  let node = from || document.activeElement;
151
151
  let sentinel = scope[scope.length - 1].nextElementSibling;
152
- let walker = $14e5c84cbc2e6e2e$export$2d6ec8fc375ceafa($14e5c84cbc2e6e2e$var$getScopeRoot(scope), {
152
+ let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa($9bf71ea28793e738$var$getScopeRoot(scope), {
153
153
  tabbable: tabbable
154
154
  }, scope);
155
- walker.currentNode = $14e5c84cbc2e6e2e$var$isElementInScope(node, scope) ? node : sentinel;
155
+ walker.currentNode = $9bf71ea28793e738$var$isElementInScope(node, scope) ? node : sentinel;
156
156
  let previousNode = walker.previousNode();
157
157
  if (!previousNode && wrap) {
158
158
  walker.currentNode = sentinel;
159
159
  previousNode = walker.previousNode();
160
160
  }
161
- if (previousNode) $14e5c84cbc2e6e2e$var$focusElement(previousNode, true);
161
+ if (previousNode) $9bf71ea28793e738$var$focusElement(previousNode, true);
162
162
  return previousNode;
163
163
  },
164
164
  focusFirst (opts = {
165
165
  }) {
166
166
  let scope = scopeRef.current;
167
167
  let { tabbable: tabbable } = opts;
168
- let walker = $14e5c84cbc2e6e2e$export$2d6ec8fc375ceafa($14e5c84cbc2e6e2e$var$getScopeRoot(scope), {
168
+ let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa($9bf71ea28793e738$var$getScopeRoot(scope), {
169
169
  tabbable: tabbable
170
170
  }, scope);
171
171
  walker.currentNode = scope[0].previousElementSibling;
172
172
  let nextNode = walker.nextNode();
173
- if (nextNode) $14e5c84cbc2e6e2e$var$focusElement(nextNode, true);
173
+ if (nextNode) $9bf71ea28793e738$var$focusElement(nextNode, true);
174
174
  return nextNode;
175
175
  },
176
176
  focusLast (opts = {
177
177
  }) {
178
178
  let scope = scopeRef.current;
179
179
  let { tabbable: tabbable } = opts;
180
- let walker = $14e5c84cbc2e6e2e$export$2d6ec8fc375ceafa($14e5c84cbc2e6e2e$var$getScopeRoot(scope), {
180
+ let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa($9bf71ea28793e738$var$getScopeRoot(scope), {
181
181
  tabbable: tabbable
182
182
  }, scope);
183
183
  walker.currentNode = scope[scope.length - 1].nextElementSibling;
184
184
  let previousNode = walker.previousNode();
185
- if (previousNode) $14e5c84cbc2e6e2e$var$focusElement(previousNode, true);
185
+ if (previousNode) $9bf71ea28793e738$var$focusElement(previousNode, true);
186
186
  return previousNode;
187
187
  }
188
188
  };
189
189
  }
190
- const $14e5c84cbc2e6e2e$var$focusableElements = [
190
+ const $9bf71ea28793e738$var$focusableElements = [
191
191
  'input:not([disabled]):not([type=hidden])',
192
192
  'select:not([disabled])',
193
193
  'textarea:not([disabled])',
@@ -202,25 +202,25 @@ const $14e5c84cbc2e6e2e$var$focusableElements = [
202
202
  'video[controls]',
203
203
  '[contenteditable]'
204
204
  ];
205
- const $14e5c84cbc2e6e2e$var$FOCUSABLE_ELEMENT_SELECTOR = $14e5c84cbc2e6e2e$var$focusableElements.join(':not([hidden]),') + ',[tabindex]:not([disabled]):not([hidden])';
206
- $14e5c84cbc2e6e2e$var$focusableElements.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
207
- const $14e5c84cbc2e6e2e$var$TABBABLE_ELEMENT_SELECTOR = $14e5c84cbc2e6e2e$var$focusableElements.join(':not([hidden]):not([tabindex="-1"]),');
208
- function $14e5c84cbc2e6e2e$var$getScopeRoot(scope) {
205
+ const $9bf71ea28793e738$var$FOCUSABLE_ELEMENT_SELECTOR = $9bf71ea28793e738$var$focusableElements.join(':not([hidden]),') + ',[tabindex]:not([disabled]):not([hidden])';
206
+ $9bf71ea28793e738$var$focusableElements.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
207
+ const $9bf71ea28793e738$var$TABBABLE_ELEMENT_SELECTOR = $9bf71ea28793e738$var$focusableElements.join(':not([hidden]):not([tabindex="-1"]),');
208
+ function $9bf71ea28793e738$var$getScopeRoot(scope) {
209
209
  return scope[0].parentElement;
210
210
  }
211
- function $14e5c84cbc2e6e2e$var$useFocusContainment(scopeRef, contain) {
212
- let focusedNode = $6saFI$useRef();
213
- let raf = $6saFI$useRef(null);
214
- $6saFI$useLayoutEffect(()=>{
211
+ function $9bf71ea28793e738$var$useFocusContainment(scopeRef, contain) {
212
+ let focusedNode = $6nfFC$useRef();
213
+ let raf = $6nfFC$useRef(null);
214
+ $6nfFC$useLayoutEffect(()=>{
215
215
  let scope1 = scopeRef.current;
216
216
  if (!contain) return;
217
217
  // Handle the Tab key to contain focus within the scope
218
218
  let onKeyDown = (e)=>{
219
- if (e.key !== 'Tab' || e.altKey || e.ctrlKey || e.metaKey || scopeRef !== $14e5c84cbc2e6e2e$var$activeScope) return;
219
+ if (e.key !== 'Tab' || e.altKey || e.ctrlKey || e.metaKey || scopeRef !== $9bf71ea28793e738$var$activeScope) return;
220
220
  let focusedElement = document.activeElement;
221
221
  let scope = scopeRef.current;
222
- if (!$14e5c84cbc2e6e2e$var$isElementInScope(focusedElement, scope)) return;
223
- let walker = $14e5c84cbc2e6e2e$export$2d6ec8fc375ceafa($14e5c84cbc2e6e2e$var$getScopeRoot(scope), {
222
+ if (!$9bf71ea28793e738$var$isElementInScope(focusedElement, scope)) return;
223
+ let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa($9bf71ea28793e738$var$getScopeRoot(scope), {
224
224
  tabbable: true
225
225
  }, scope);
226
226
  walker.currentNode = focusedElement;
@@ -230,27 +230,27 @@ function $14e5c84cbc2e6e2e$var$useFocusContainment(scopeRef, contain) {
230
230
  nextElement = e.shiftKey ? walker.previousNode() : walker.nextNode();
231
231
  }
232
232
  e.preventDefault();
233
- if (nextElement) $14e5c84cbc2e6e2e$var$focusElement(nextElement, true);
233
+ if (nextElement) $9bf71ea28793e738$var$focusElement(nextElement, true);
234
234
  };
235
235
  let onFocus = (e)=>{
236
236
  // If focusing an element in a child scope of the currently active scope, the child becomes active.
237
237
  // Moving out of the active scope to an ancestor is not allowed.
238
- if (!$14e5c84cbc2e6e2e$var$activeScope || $14e5c84cbc2e6e2e$var$isAncestorScope($14e5c84cbc2e6e2e$var$activeScope, scopeRef)) {
239
- $14e5c84cbc2e6e2e$var$activeScope = scopeRef;
238
+ if (!$9bf71ea28793e738$var$activeScope || $9bf71ea28793e738$var$isAncestorScope($9bf71ea28793e738$var$activeScope, scopeRef)) {
239
+ $9bf71ea28793e738$var$activeScope = scopeRef;
240
240
  focusedNode.current = e.target;
241
- } else if (scopeRef === $14e5c84cbc2e6e2e$var$activeScope && !$14e5c84cbc2e6e2e$var$isElementInChildScope(e.target, scopeRef)) {
241
+ } else if (scopeRef === $9bf71ea28793e738$var$activeScope && !$9bf71ea28793e738$var$isElementInChildScope(e.target, scopeRef)) {
242
242
  // If a focus event occurs outside the active scope (e.g. user tabs from browser location bar),
243
243
  // restore focus to the previously focused node or the first tabbable element in the active scope.
244
244
  if (focusedNode.current) focusedNode.current.focus();
245
- else if ($14e5c84cbc2e6e2e$var$activeScope) $14e5c84cbc2e6e2e$var$focusFirstInScope($14e5c84cbc2e6e2e$var$activeScope.current);
246
- } else if (scopeRef === $14e5c84cbc2e6e2e$var$activeScope) focusedNode.current = e.target;
245
+ else if ($9bf71ea28793e738$var$activeScope) $9bf71ea28793e738$var$focusFirstInScope($9bf71ea28793e738$var$activeScope.current);
246
+ } else if (scopeRef === $9bf71ea28793e738$var$activeScope) focusedNode.current = e.target;
247
247
  };
248
248
  let onBlur = (e)=>{
249
249
  // Firefox doesn't shift focus back to the Dialog properly without this
250
250
  raf.current = requestAnimationFrame(()=>{
251
251
  // Use document.activeElement instead of e.relatedTarget so we can tell if user clicked into iframe
252
- if (scopeRef === $14e5c84cbc2e6e2e$var$activeScope && !$14e5c84cbc2e6e2e$var$isElementInChildScope(document.activeElement, scopeRef)) {
253
- $14e5c84cbc2e6e2e$var$activeScope = scopeRef;
252
+ if (scopeRef === $9bf71ea28793e738$var$activeScope && !$9bf71ea28793e738$var$isElementInChildScope(document.activeElement, scopeRef)) {
253
+ $9bf71ea28793e738$var$activeScope = scopeRef;
254
254
  focusedNode.current = e.target;
255
255
  focusedNode.current.focus();
256
256
  }
@@ -275,40 +275,40 @@ function $14e5c84cbc2e6e2e$var$useFocusContainment(scopeRef, contain) {
275
275
  contain
276
276
  ]);
277
277
  // eslint-disable-next-line arrow-body-style
278
- $6saFI$useEffect(()=>{
278
+ $6nfFC$useEffect(()=>{
279
279
  return ()=>cancelAnimationFrame(raf.current)
280
280
  ;
281
281
  }, [
282
282
  raf
283
283
  ]);
284
284
  }
285
- function $14e5c84cbc2e6e2e$var$isElementInAnyScope(element) {
286
- for (let scope of $14e5c84cbc2e6e2e$var$scopes.keys()){
287
- if ($14e5c84cbc2e6e2e$var$isElementInScope(element, scope.current)) return true;
285
+ function $9bf71ea28793e738$var$isElementInAnyScope(element) {
286
+ for (let scope of $9bf71ea28793e738$var$scopes.keys()){
287
+ if ($9bf71ea28793e738$var$isElementInScope(element, scope.current)) return true;
288
288
  }
289
289
  return false;
290
290
  }
291
- function $14e5c84cbc2e6e2e$var$isElementInScope(element, scope) {
291
+ function $9bf71ea28793e738$var$isElementInScope(element, scope) {
292
292
  return scope.some((node)=>node.contains(element)
293
293
  );
294
294
  }
295
- function $14e5c84cbc2e6e2e$var$isElementInChildScope(element, scope) {
295
+ function $9bf71ea28793e738$var$isElementInChildScope(element, scope) {
296
296
  // node.contains in isElementInScope covers child scopes that are also DOM children,
297
297
  // but does not cover child scopes in portals.
298
- for (let s of $14e5c84cbc2e6e2e$var$scopes.keys()){
299
- if ((s === scope || $14e5c84cbc2e6e2e$var$isAncestorScope(scope, s)) && $14e5c84cbc2e6e2e$var$isElementInScope(element, s.current)) return true;
298
+ for (let s of $9bf71ea28793e738$var$scopes.keys()){
299
+ if ((s === scope || $9bf71ea28793e738$var$isAncestorScope(scope, s)) && $9bf71ea28793e738$var$isElementInScope(element, s.current)) return true;
300
300
  }
301
301
  return false;
302
302
  }
303
- function $14e5c84cbc2e6e2e$var$isAncestorScope(ancestor, scope) {
304
- let parent = $14e5c84cbc2e6e2e$var$scopes.get(scope);
303
+ function $9bf71ea28793e738$var$isAncestorScope(ancestor, scope) {
304
+ let parent = $9bf71ea28793e738$var$scopes.get(scope);
305
305
  if (!parent) return false;
306
306
  if (parent === ancestor) return true;
307
- return $14e5c84cbc2e6e2e$var$isAncestorScope(ancestor, parent);
307
+ return $9bf71ea28793e738$var$isAncestorScope(ancestor, parent);
308
308
  }
309
- function $14e5c84cbc2e6e2e$var$focusElement(element, scroll = false) {
309
+ function $9bf71ea28793e738$var$focusElement(element, scroll = false) {
310
310
  if (element != null && !scroll) try {
311
- $1159c3b6ba210e4f$export$80f3e147d781571c(element);
311
+ $6a99195332edec8b$export$80f3e147d781571c(element);
312
312
  } catch (err) {
313
313
  // ignore
314
314
  }
@@ -318,29 +318,29 @@ function $14e5c84cbc2e6e2e$var$focusElement(element, scroll = false) {
318
318
  // ignore
319
319
  }
320
320
  }
321
- function $14e5c84cbc2e6e2e$var$focusFirstInScope(scope) {
321
+ function $9bf71ea28793e738$var$focusFirstInScope(scope) {
322
322
  let sentinel = scope[0].previousElementSibling;
323
- let walker = $14e5c84cbc2e6e2e$export$2d6ec8fc375ceafa($14e5c84cbc2e6e2e$var$getScopeRoot(scope), {
323
+ let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa($9bf71ea28793e738$var$getScopeRoot(scope), {
324
324
  tabbable: true
325
325
  }, scope);
326
326
  walker.currentNode = sentinel;
327
- $14e5c84cbc2e6e2e$var$focusElement(walker.nextNode());
327
+ $9bf71ea28793e738$var$focusElement(walker.nextNode());
328
328
  }
329
- function $14e5c84cbc2e6e2e$var$useAutoFocus(scopeRef, autoFocus) {
330
- const autoFocusRef = $6saFI$react.useRef(autoFocus);
331
- $6saFI$useEffect(()=>{
329
+ function $9bf71ea28793e738$var$useAutoFocus(scopeRef, autoFocus) {
330
+ const autoFocusRef = $6nfFC$react.useRef(autoFocus);
331
+ $6nfFC$useEffect(()=>{
332
332
  if (autoFocusRef.current) {
333
- $14e5c84cbc2e6e2e$var$activeScope = scopeRef;
334
- if (!$14e5c84cbc2e6e2e$var$isElementInScope(document.activeElement, $14e5c84cbc2e6e2e$var$activeScope.current)) $14e5c84cbc2e6e2e$var$focusFirstInScope(scopeRef.current);
333
+ $9bf71ea28793e738$var$activeScope = scopeRef;
334
+ if (!$9bf71ea28793e738$var$isElementInScope(document.activeElement, $9bf71ea28793e738$var$activeScope.current)) $9bf71ea28793e738$var$focusFirstInScope(scopeRef.current);
335
335
  }
336
336
  autoFocusRef.current = false;
337
337
  }, []);
338
338
  }
339
- function $14e5c84cbc2e6e2e$var$useRestoreFocus(scopeRef, restoreFocus, contain) {
339
+ function $9bf71ea28793e738$var$useRestoreFocus(scopeRef, restoreFocus, contain) {
340
340
  // create a ref during render instead of useLayoutEffect so the active element is saved before a child with autoFocus=true mounts.
341
- const nodeToRestoreRef = $6saFI$useRef(typeof document !== 'undefined' ? document.activeElement : null);
341
+ const nodeToRestoreRef = $6nfFC$useRef(typeof document !== 'undefined' ? document.activeElement : null);
342
342
  // useLayoutEffect instead of useEffect so the active element is saved synchronously instead of asynchronously.
343
- $6saFI$useLayoutEffect(()=>{
343
+ $6nfFC$useLayoutEffect(()=>{
344
344
  let nodeToRestore = nodeToRestoreRef.current;
345
345
  if (!restoreFocus) return;
346
346
  // Handle the Tab key so that tabbing out of the scope goes to the next element
@@ -350,9 +350,9 @@ function $14e5c84cbc2e6e2e$var$useRestoreFocus(scopeRef, restoreFocus, contain)
350
350
  let onKeyDown = (e)=>{
351
351
  if (e.key !== 'Tab' || e.altKey || e.ctrlKey || e.metaKey) return;
352
352
  let focusedElement = document.activeElement;
353
- if (!$14e5c84cbc2e6e2e$var$isElementInScope(focusedElement, scopeRef.current)) return;
353
+ if (!$9bf71ea28793e738$var$isElementInScope(focusedElement, scopeRef.current)) return;
354
354
  // Create a DOM tree walker that matches all tabbable elements
355
- let walker = $14e5c84cbc2e6e2e$export$2d6ec8fc375ceafa(document.body, {
355
+ let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(document.body, {
356
356
  tabbable: true
357
357
  });
358
358
  // Find the next tabbable element after the currently focused element
@@ -361,26 +361,26 @@ function $14e5c84cbc2e6e2e$var$useRestoreFocus(scopeRef, restoreFocus, contain)
361
361
  if (!document.body.contains(nodeToRestore) || nodeToRestore === document.body) nodeToRestore = null;
362
362
  // If there is no next element, or it is outside the current scope, move focus to the
363
363
  // next element after the node to restore to instead.
364
- if ((!nextElement || !$14e5c84cbc2e6e2e$var$isElementInScope(nextElement, scopeRef.current)) && nodeToRestore) {
364
+ if ((!nextElement || !$9bf71ea28793e738$var$isElementInScope(nextElement, scopeRef.current)) && nodeToRestore) {
365
365
  walker.currentNode = nodeToRestore;
366
366
  // Skip over elements within the scope, in case the scope immediately follows the node to restore.
367
367
  do nextElement = e.shiftKey ? walker.previousNode() : walker.nextNode();
368
- while ($14e5c84cbc2e6e2e$var$isElementInScope(nextElement, scopeRef.current))
368
+ while ($9bf71ea28793e738$var$isElementInScope(nextElement, scopeRef.current))
369
369
  e.preventDefault();
370
370
  e.stopPropagation();
371
- if (nextElement) $14e5c84cbc2e6e2e$var$focusElement(nextElement, true);
371
+ if (nextElement) $9bf71ea28793e738$var$focusElement(nextElement, true);
372
372
  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)
373
373
  // then move focus to the body.
374
374
  // Otherwise restore focus to the nodeToRestore (e.g menu within a popover -> tabbing to close the menu should move focus to menu trigger)
375
- if (!$14e5c84cbc2e6e2e$var$isElementInAnyScope(nodeToRestore)) focusedElement.blur();
376
- else $14e5c84cbc2e6e2e$var$focusElement(nodeToRestore, true);
375
+ if (!$9bf71ea28793e738$var$isElementInAnyScope(nodeToRestore)) focusedElement.blur();
376
+ else $9bf71ea28793e738$var$focusElement(nodeToRestore, true);
377
377
  }
378
378
  };
379
379
  if (!contain) document.addEventListener('keydown', onKeyDown, true);
380
380
  return ()=>{
381
381
  if (!contain) document.removeEventListener('keydown', onKeyDown, true);
382
- if (restoreFocus && nodeToRestore && $14e5c84cbc2e6e2e$var$isElementInScope(document.activeElement, scopeRef.current)) requestAnimationFrame(()=>{
383
- if (document.body.contains(nodeToRestore)) $14e5c84cbc2e6e2e$var$focusElement(nodeToRestore);
382
+ if (restoreFocus && nodeToRestore && $9bf71ea28793e738$var$isElementInScope(document.activeElement, scopeRef.current)) requestAnimationFrame(()=>{
383
+ if (document.body.contains(nodeToRestore)) $9bf71ea28793e738$var$focusElement(nodeToRestore);
384
384
  });
385
385
  };
386
386
  }, [
@@ -389,28 +389,28 @@ function $14e5c84cbc2e6e2e$var$useRestoreFocus(scopeRef, restoreFocus, contain)
389
389
  contain
390
390
  ]);
391
391
  }
392
- function $14e5c84cbc2e6e2e$export$2d6ec8fc375ceafa(root, opts, scope) {
393
- let selector = (opts === null || opts === void 0 ? void 0 : opts.tabbable) ? $14e5c84cbc2e6e2e$var$TABBABLE_ELEMENT_SELECTOR : $14e5c84cbc2e6e2e$var$FOCUSABLE_ELEMENT_SELECTOR;
392
+ function $9bf71ea28793e738$export$2d6ec8fc375ceafa(root, opts, scope) {
393
+ let selector = (opts === null || opts === void 0 ? void 0 : opts.tabbable) ? $9bf71ea28793e738$var$TABBABLE_ELEMENT_SELECTOR : $9bf71ea28793e738$var$FOCUSABLE_ELEMENT_SELECTOR;
394
394
  let walker = document.createTreeWalker(root, NodeFilter.SHOW_ELEMENT, {
395
395
  acceptNode (node) {
396
396
  var ref;
397
397
  // Skip nodes inside the starting node.
398
398
  if (opts === null || opts === void 0 ? void 0 : (ref = opts.from) === null || ref === void 0 ? void 0 : ref.contains(node)) return NodeFilter.FILTER_REJECT;
399
- if (node.matches(selector) && $985a2847ebcbb615$export$e989c0fffaa6b27a(node) && (!scope || $14e5c84cbc2e6e2e$var$isElementInScope(node, scope))) return NodeFilter.FILTER_ACCEPT;
399
+ if (node.matches(selector) && $645f2e67b85a24c9$export$e989c0fffaa6b27a(node) && (!scope || $9bf71ea28793e738$var$isElementInScope(node, scope))) return NodeFilter.FILTER_ACCEPT;
400
400
  return NodeFilter.FILTER_SKIP;
401
401
  }
402
402
  });
403
403
  if (opts === null || opts === void 0 ? void 0 : opts.from) walker.currentNode = opts.from;
404
404
  return walker;
405
405
  }
406
- function $14e5c84cbc2e6e2e$export$c5251b9e124bf29(ref) {
406
+ function $9bf71ea28793e738$export$c5251b9e124bf29(ref) {
407
407
  return {
408
408
  focusNext (opts = {
409
409
  }) {
410
410
  let root = ref.current;
411
411
  let { from: from , tabbable: tabbable , wrap: wrap } = opts;
412
412
  let node = from || document.activeElement;
413
- let walker = $14e5c84cbc2e6e2e$export$2d6ec8fc375ceafa(root, {
413
+ let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(root, {
414
414
  tabbable: tabbable
415
415
  });
416
416
  if (root.contains(node)) walker.currentNode = node;
@@ -419,7 +419,7 @@ function $14e5c84cbc2e6e2e$export$c5251b9e124bf29(ref) {
419
419
  walker.currentNode = root;
420
420
  nextNode = walker.nextNode();
421
421
  }
422
- if (nextNode) $14e5c84cbc2e6e2e$var$focusElement(nextNode, true);
422
+ if (nextNode) $9bf71ea28793e738$var$focusElement(nextNode, true);
423
423
  return nextNode;
424
424
  },
425
425
  focusPrevious (opts = {
@@ -427,48 +427,48 @@ function $14e5c84cbc2e6e2e$export$c5251b9e124bf29(ref) {
427
427
  let root = ref.current;
428
428
  let { from: from , tabbable: tabbable , wrap: wrap } = opts;
429
429
  let node = from || document.activeElement;
430
- let walker = $14e5c84cbc2e6e2e$export$2d6ec8fc375ceafa(root, {
430
+ let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(root, {
431
431
  tabbable: tabbable
432
432
  });
433
433
  if (root.contains(node)) walker.currentNode = node;
434
434
  else {
435
- let next = $14e5c84cbc2e6e2e$var$last(walker);
436
- if (next) $14e5c84cbc2e6e2e$var$focusElement(next, true);
435
+ let next = $9bf71ea28793e738$var$last(walker);
436
+ if (next) $9bf71ea28793e738$var$focusElement(next, true);
437
437
  return next;
438
438
  }
439
439
  let previousNode = walker.previousNode();
440
440
  if (!previousNode && wrap) {
441
441
  walker.currentNode = root;
442
- previousNode = $14e5c84cbc2e6e2e$var$last(walker);
442
+ previousNode = $9bf71ea28793e738$var$last(walker);
443
443
  }
444
- if (previousNode) $14e5c84cbc2e6e2e$var$focusElement(previousNode, true);
444
+ if (previousNode) $9bf71ea28793e738$var$focusElement(previousNode, true);
445
445
  return previousNode;
446
446
  },
447
447
  focusFirst (opts = {
448
448
  }) {
449
449
  let root = ref.current;
450
450
  let { tabbable: tabbable } = opts;
451
- let walker = $14e5c84cbc2e6e2e$export$2d6ec8fc375ceafa(root, {
451
+ let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(root, {
452
452
  tabbable: tabbable
453
453
  });
454
454
  let nextNode = walker.nextNode();
455
- if (nextNode) $14e5c84cbc2e6e2e$var$focusElement(nextNode, true);
455
+ if (nextNode) $9bf71ea28793e738$var$focusElement(nextNode, true);
456
456
  return nextNode;
457
457
  },
458
458
  focusLast (opts = {
459
459
  }) {
460
460
  let root = ref.current;
461
461
  let { tabbable: tabbable } = opts;
462
- let walker = $14e5c84cbc2e6e2e$export$2d6ec8fc375ceafa(root, {
462
+ let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(root, {
463
463
  tabbable: tabbable
464
464
  });
465
- let next = $14e5c84cbc2e6e2e$var$last(walker);
466
- if (next) $14e5c84cbc2e6e2e$var$focusElement(next, true);
465
+ let next = $9bf71ea28793e738$var$last(walker);
466
+ if (next) $9bf71ea28793e738$var$focusElement(next, true);
467
467
  return next;
468
468
  }
469
469
  };
470
470
  }
471
- function $14e5c84cbc2e6e2e$var$last(walker) {
471
+ function $9bf71ea28793e738$var$last(walker) {
472
472
  let next;
473
473
  let last;
474
474
  do {
@@ -479,27 +479,27 @@ function $14e5c84cbc2e6e2e$var$last(walker) {
479
479
  }
480
480
 
481
481
 
482
- var $503734efc0922182$exports = {};
482
+ var $907718708eab68af$exports = {};
483
483
 
484
- $parcel$export($503734efc0922182$exports, "FocusRing", () => $503734efc0922182$export$1a38b4ad7f578e1d);
484
+ $parcel$export($907718708eab68af$exports, "FocusRing", () => $907718708eab68af$export$1a38b4ad7f578e1d);
485
485
 
486
486
 
487
487
 
488
- var $e63d024ca16f2165$exports = {};
488
+ var $f7dceffc5ad7768b$exports = {};
489
489
 
490
- $parcel$export($e63d024ca16f2165$exports, "useFocusRing", () => $e63d024ca16f2165$export$4e328f61c538687f);
490
+ $parcel$export($f7dceffc5ad7768b$exports, "useFocusRing", () => $f7dceffc5ad7768b$export$4e328f61c538687f);
491
491
 
492
492
 
493
493
 
494
- function $e63d024ca16f2165$export$4e328f61c538687f(props = {
494
+ function $f7dceffc5ad7768b$export$4e328f61c538687f(props = {
495
495
  }) {
496
496
  let { autoFocus: autoFocus = false , isTextInput: isTextInput , within: within } = props;
497
- let state = $6saFI$useRef({
497
+ let state = $6nfFC$useRef({
498
498
  isFocused: false,
499
- isFocusVisible: autoFocus || $6saFI$isFocusVisible()
499
+ isFocusVisible: autoFocus || $6nfFC$isFocusVisible()
500
500
  }).current;
501
- let [isFocused1, setFocused] = $6saFI$useState(false);
502
- let [isFocusVisibleState, setFocusVisible] = $6saFI$useState(()=>state.isFocused && state.isFocusVisible
501
+ let [isFocused1, setFocused] = $6nfFC$useState(false);
502
+ let [isFocusVisibleState, setFocusVisible] = $6nfFC$useState(()=>state.isFocused && state.isFocusVisible
503
503
  );
504
504
  let updateState = ()=>setFocusVisible(state.isFocused && state.isFocusVisible)
505
505
  ;
@@ -508,17 +508,17 @@ function $e63d024ca16f2165$export$4e328f61c538687f(props = {
508
508
  setFocused(isFocused);
509
509
  updateState();
510
510
  };
511
- $6saFI$useFocusVisibleListener((isFocusVisible)=>{
511
+ $6nfFC$useFocusVisibleListener((isFocusVisible)=>{
512
512
  state.isFocusVisible = isFocusVisible;
513
513
  updateState();
514
514
  }, [], {
515
515
  isTextInput: isTextInput
516
516
  });
517
- let { focusProps: focusProps } = $6saFI$useFocus({
517
+ let { focusProps: focusProps } = $6nfFC$useFocus({
518
518
  isDisabled: within,
519
519
  onFocusChange: onFocusChange
520
520
  });
521
- let { focusWithinProps: focusWithinProps } = $6saFI$useFocusWithin({
521
+ let { focusWithinProps: focusWithinProps } = $6nfFC$useFocusWithin({
522
522
  isDisabled: !within,
523
523
  onFocusWithinChange: onFocusChange
524
524
  });
@@ -530,13 +530,13 @@ function $e63d024ca16f2165$export$4e328f61c538687f(props = {
530
530
  }
531
531
 
532
532
 
533
- function $503734efc0922182$export$1a38b4ad7f578e1d(props) {
533
+ function $907718708eab68af$export$1a38b4ad7f578e1d(props) {
534
534
  let { children: children , focusClass: focusClass , focusRingClass: focusRingClass } = props;
535
- let { isFocused: isFocused , isFocusVisible: isFocusVisible , focusProps: focusProps } = $e63d024ca16f2165$export$4e328f61c538687f(props);
536
- let child = $6saFI$react.Children.only(children);
537
- return(/*#__PURE__*/ $6saFI$react.cloneElement(child, $6saFI$mergeProps(child.props, {
535
+ let { isFocused: isFocused , isFocusVisible: isFocusVisible , focusProps: focusProps } = $f7dceffc5ad7768b$export$4e328f61c538687f(props);
536
+ let child = $6nfFC$react.Children.only(children);
537
+ return(/*#__PURE__*/ $6nfFC$react.cloneElement(child, $6nfFC$mergeProps(child.props, {
538
538
  ...focusProps,
539
- className: $6saFI$clsx({
539
+ className: $6nfFC$clsx({
540
540
  [focusClass || '']: isFocused,
541
541
  [focusRingClass || '']: isFocusVisible
542
542
  })
@@ -544,49 +544,49 @@ function $503734efc0922182$export$1a38b4ad7f578e1d(props) {
544
544
  }
545
545
 
546
546
 
547
- var $391c6482f25a1991$exports = {};
547
+ var $e6afbd83fe6ebbd2$exports = {};
548
548
 
549
- $parcel$export($391c6482f25a1991$exports, "FocusableProvider", () => $391c6482f25a1991$export$13f3202a3e5ddd5);
550
- $parcel$export($391c6482f25a1991$exports, "useFocusable", () => $391c6482f25a1991$export$4c014de7c8940b4c);
549
+ $parcel$export($e6afbd83fe6ebbd2$exports, "FocusableProvider", () => $e6afbd83fe6ebbd2$export$13f3202a3e5ddd5);
550
+ $parcel$export($e6afbd83fe6ebbd2$exports, "useFocusable", () => $e6afbd83fe6ebbd2$export$4c014de7c8940b4c);
551
551
 
552
552
 
553
553
 
554
- let $391c6482f25a1991$var$FocusableContext = /*#__PURE__*/ $6saFI$react.createContext(null);
555
- function $391c6482f25a1991$var$useFocusableContext(ref) {
556
- let context = $6saFI$useContext($391c6482f25a1991$var$FocusableContext) || {
554
+ let $e6afbd83fe6ebbd2$var$FocusableContext = /*#__PURE__*/ $6nfFC$react.createContext(null);
555
+ function $e6afbd83fe6ebbd2$var$useFocusableContext(ref) {
556
+ let context = $6nfFC$useContext($e6afbd83fe6ebbd2$var$FocusableContext) || {
557
557
  };
558
- $6saFI$useSyncRef(context, ref);
558
+ $6nfFC$useSyncRef(context, ref);
559
559
  // eslint-disable-next-line
560
560
  let { ref: _ , ...otherProps } = context;
561
561
  return otherProps;
562
562
  }
563
563
  /**
564
564
  * Provides DOM props to the nearest focusable child.
565
- */ function $391c6482f25a1991$var$FocusableProvider(props, ref) {
565
+ */ function $e6afbd83fe6ebbd2$var$FocusableProvider(props, ref) {
566
566
  let { children: children , ...otherProps } = props;
567
567
  let context = {
568
568
  ...otherProps,
569
569
  ref: ref
570
570
  };
571
- return(/*#__PURE__*/ $6saFI$react.createElement($391c6482f25a1991$var$FocusableContext.Provider, {
571
+ return(/*#__PURE__*/ $6nfFC$react.createElement($e6afbd83fe6ebbd2$var$FocusableContext.Provider, {
572
572
  value: context
573
573
  }, children));
574
574
  }
575
- let $391c6482f25a1991$export$13f3202a3e5ddd5 = /*#__PURE__*/ $6saFI$react.forwardRef($391c6482f25a1991$var$FocusableProvider);
576
- function $391c6482f25a1991$export$4c014de7c8940b4c(props, domRef) {
577
- let { focusProps: focusProps } = $6saFI$useFocus(props);
578
- let { keyboardProps: keyboardProps } = $6saFI$useKeyboard(props);
579
- let interactions = $6saFI$mergeProps(focusProps, keyboardProps);
580
- let domProps = $391c6482f25a1991$var$useFocusableContext(domRef);
575
+ let $e6afbd83fe6ebbd2$export$13f3202a3e5ddd5 = /*#__PURE__*/ $6nfFC$react.forwardRef($e6afbd83fe6ebbd2$var$FocusableProvider);
576
+ function $e6afbd83fe6ebbd2$export$4c014de7c8940b4c(props, domRef) {
577
+ let { focusProps: focusProps } = $6nfFC$useFocus(props);
578
+ let { keyboardProps: keyboardProps } = $6nfFC$useKeyboard(props);
579
+ let interactions = $6nfFC$mergeProps(focusProps, keyboardProps);
580
+ let domProps = $e6afbd83fe6ebbd2$var$useFocusableContext(domRef);
581
581
  let interactionProps = props.isDisabled ? {
582
582
  } : domProps;
583
- let autoFocusRef = $6saFI$useRef(props.autoFocus);
584
- $6saFI$useEffect(()=>{
583
+ let autoFocusRef = $6nfFC$useRef(props.autoFocus);
584
+ $6nfFC$useEffect(()=>{
585
585
  if (autoFocusRef.current && domRef.current) domRef.current.focus();
586
586
  autoFocusRef.current = false;
587
587
  }, []);
588
588
  return {
589
- focusableProps: $6saFI$mergeProps({
589
+ focusableProps: $6nfFC$mergeProps({
590
590
  ...interactions,
591
591
  tabIndex: props.excludeFromTabOrder && !props.isDisabled ? -1 : undefined
592
592
  }, interactionProps)
@@ -598,5 +598,5 @@ function $391c6482f25a1991$export$4c014de7c8940b4c(props, domRef) {
598
598
 
599
599
 
600
600
 
601
- export {$14e5c84cbc2e6e2e$export$20e40289641fbbb6 as FocusScope, $14e5c84cbc2e6e2e$export$10c5169755ce7bd7 as useFocusManager, $14e5c84cbc2e6e2e$export$2d6ec8fc375ceafa as getFocusableTreeWalker, $14e5c84cbc2e6e2e$export$c5251b9e124bf29 as createFocusManager, $503734efc0922182$export$1a38b4ad7f578e1d as FocusRing, $391c6482f25a1991$export$13f3202a3e5ddd5 as FocusableProvider, $391c6482f25a1991$export$4c014de7c8940b4c as useFocusable, $e63d024ca16f2165$export$4e328f61c538687f as useFocusRing, $1159c3b6ba210e4f$export$80f3e147d781571c as focusSafely};
601
+ export {$9bf71ea28793e738$export$20e40289641fbbb6 as FocusScope, $9bf71ea28793e738$export$10c5169755ce7bd7 as useFocusManager, $9bf71ea28793e738$export$2d6ec8fc375ceafa as getFocusableTreeWalker, $9bf71ea28793e738$export$c5251b9e124bf29 as createFocusManager, $907718708eab68af$export$1a38b4ad7f578e1d as FocusRing, $e6afbd83fe6ebbd2$export$13f3202a3e5ddd5 as FocusableProvider, $e6afbd83fe6ebbd2$export$4c014de7c8940b4c as useFocusable, $f7dceffc5ad7768b$export$4e328f61c538687f as useFocusRing, $6a99195332edec8b$export$80f3e147d781571c as focusSafely};
602
602
  //# sourceMappingURL=module.js.map