@react-aria/focus 3.0.0-nightly.1386 → 3.0.0-nightly.1398

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