@jobber/components 6.123.1 → 6.123.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/AtlantisThemeContext-cjs.js +1 -1
- package/dist/AtlantisThemeContext-es.js +9 -9
- package/dist/Autocomplete/Autocomplete.types.d.ts +33 -0
- package/dist/Autocomplete/index.cjs +5 -5
- package/dist/Autocomplete/index.mjs +8 -8
- package/dist/Autocomplete/useAutocomplete.d.ts +2 -57
- package/dist/Body-cjs.js +1 -1
- package/dist/Body-es.js +2 -2
- package/dist/BottomSheet-cjs.js +1 -1
- package/dist/BottomSheet-es.js +1 -1
- package/dist/Box-cjs.js +2 -2
- package/dist/Box-es.js +2 -2
- package/dist/Button/index.mjs +1 -1
- package/dist/Button-es.js +1 -1
- package/dist/Card-cjs.js +1 -1
- package/dist/Card-es.js +1 -1
- package/dist/Checkbox/index.cjs +1 -1
- package/dist/Checkbox/index.mjs +1 -1
- package/dist/Chip/index.mjs +1 -1
- package/dist/Chip-cjs.js +2 -2
- package/dist/Chip-es.js +2 -2
- package/dist/ChipDismissible-es.js +1 -1
- package/dist/Chips/InternalChipDismissible/hooks/index.mjs +1 -1
- package/dist/Combobox-cjs.js +1 -1
- package/dist/Combobox-es.js +1 -1
- package/dist/ComboboxAction-cjs.js +1 -1
- package/dist/ComboboxAction-es.js +1 -1
- package/dist/ComboboxContent-cjs.js +1 -1
- package/dist/ComboboxContent-es.js +2 -2
- package/dist/ComboboxContentHeader-cjs.js +1 -1
- package/dist/ComboboxContentHeader-es.js +1 -1
- package/dist/ComboboxContentList-es.js +1 -1
- package/dist/ComboboxContentSearch-cjs.js +1 -1
- package/dist/ComboboxContentSearch-es.js +1 -1
- package/dist/ComboboxLoadMore-cjs.js +1 -1
- package/dist/ComboboxLoadMore-es.js +1 -1
- package/dist/ComboboxOption-cjs.js +1 -1
- package/dist/ComboboxOption-es.js +1 -1
- package/dist/Container-cjs.js +1 -1
- package/dist/Container-es.js +1 -1
- package/dist/Content-cjs.js +1 -1
- package/dist/Content-es.js +1 -1
- package/dist/ContentBlock-cjs.js +1 -1
- package/dist/ContentBlock-es.js +1 -1
- package/dist/Countdown-cjs.js +7 -3
- package/dist/Countdown-es.js +8 -4
- package/dist/Cover-cjs.js +1 -1
- package/dist/Cover-es.js +1 -1
- package/dist/DataList-es.js +3 -3
- package/dist/DataList.const-cjs.js +0 -1
- package/dist/DataList.const-es.js +1 -2
- package/dist/DataList.module-cjs.js +1 -1
- package/dist/DataList.module-es.js +1 -1
- package/dist/DataList.utils-es.js +6 -6
- package/dist/DataListAction-cjs.js +1 -1
- package/dist/DataListAction-es.js +1 -1
- package/dist/DataListActionsMenu-cjs.js +1 -1
- package/dist/DataListActionsMenu-es.js +2 -2
- package/dist/DataListBulkActions-cjs.js +1 -1
- package/dist/DataListBulkActions-es.js +1 -1
- package/dist/DataListContext-cjs.js +6 -5
- package/dist/DataListContext-es.js +6 -5
- package/dist/DataListEmptyState-cjs.js +1 -1
- package/dist/DataListEmptyState-es.js +1 -1
- package/dist/DataListHeaderTile-cjs.js +2 -2
- package/dist/DataListHeaderTile-es.js +2 -2
- package/dist/DataListItemActions-cjs.js +1 -1
- package/dist/DataListItemActions-es.js +2 -2
- package/dist/DataListLayoutActions-cjs.js +1 -1
- package/dist/DataListLayoutActions-es.js +2 -2
- package/dist/DataListLoadMore-cjs.js +1 -1
- package/dist/DataListLoadMore-es.js +1 -1
- package/dist/DataListLoadingState-cjs.js +1 -1
- package/dist/DataListLoadingState-es.js +2 -2
- package/dist/DataListOverflowFade-cjs.js +1 -1
- package/dist/DataListOverflowFade-es.js +1 -1
- package/dist/DataListSearch-cjs.js +1 -1
- package/dist/DataListSearch-es.js +1 -1
- package/dist/DataListSortingOptions-cjs.js +1 -1
- package/dist/DataListSortingOptions-es.js +1 -1
- package/dist/DataListStickyHeader-cjs.js +1 -1
- package/dist/DataListStickyHeader-es.js +1 -1
- package/dist/DataListTags-cjs.js +1 -1
- package/dist/DataListTags-es.js +1 -1
- package/dist/DataListTotalCount-cjs.js +1 -1
- package/dist/DataListTotalCount-es.js +2 -2
- package/dist/DataTable/index.mjs +1 -1
- package/dist/DataTable-cjs.js +3 -3
- package/dist/DataTable-es.js +5 -5
- package/dist/DataTableTable-cjs.js +2 -2
- package/dist/DataTableTable-es.js +3 -3
- package/dist/DatePicker-cjs.js +266 -81
- package/dist/DatePicker-es.js +268 -83
- package/dist/DayOfMonthSelect-cjs.js +5 -5
- package/dist/DayOfMonthSelect-es.js +6 -6
- package/dist/DescriptionList-cjs.js +1 -1
- package/dist/DescriptionList-es.js +1 -1
- package/dist/Disclosure-cjs.js +1 -1
- package/dist/Disclosure-es.js +1 -1
- package/dist/Divider-cjs.js +1 -1
- package/dist/Divider-es.js +1 -1
- package/dist/DrawerGrid-cjs.js +2 -2
- package/dist/DrawerGrid-es.js +2 -2
- package/dist/DrawerRoot-cjs.js +10 -48
- package/dist/DrawerRoot-es.js +12 -50
- package/dist/FeatureSwitch-cjs.js +1 -1
- package/dist/FeatureSwitch-es.js +1 -1
- package/dist/FormField/index.mjs +1 -1
- package/dist/FormField-cjs.js +1 -1
- package/dist/FormField-es.js +2 -2
- package/dist/FormatEmail-cjs.js +1 -1
- package/dist/FormatEmail-es.js +1 -1
- package/dist/FormatFile-cjs.js +1 -6
- package/dist/FormatFile-es.js +1 -6
- package/dist/Frame-cjs.js +1 -1
- package/dist/Frame-es.js +1 -1
- package/dist/Glimmer/index.mjs +1 -1
- package/dist/Glimmer-cjs.js +1 -1
- package/dist/Glimmer-es.js +2 -2
- package/dist/Grid-cjs.js +1 -1
- package/dist/Grid-es.js +1 -1
- package/dist/GridCell-cjs.js +1 -1
- package/dist/GridCell-es.js +1 -1
- package/dist/InputAvatar-cjs.js +1 -1
- package/dist/InputAvatar-es.js +1 -1
- package/dist/InputDate/index.mjs +1 -1
- package/dist/InputEmail/index.mjs +1 -1
- package/dist/InputFile-cjs.js +8 -3
- package/dist/InputFile-es.js +8 -3
- package/dist/InputNumber/index.cjs +181 -69
- package/dist/InputNumber/index.mjs +184 -72
- package/dist/InputPassword-es.js +1 -1
- package/dist/InputPhoneNumber/index.cjs +1 -1
- package/dist/InputPhoneNumber/index.mjs +2 -2
- package/dist/InputText/InputText.d.ts +2 -70
- package/dist/InputText/index.mjs +1 -1
- package/dist/InputTime/index.cjs +0 -1
- package/dist/InputTime/index.mjs +1 -2
- package/dist/InputValidation-cjs.js +1 -1
- package/dist/InputValidation-es.js +1 -1
- package/dist/InternalChipDismissible-cjs.js +1 -1
- package/dist/InternalChipDismissible-es.js +2 -2
- package/dist/LightBox-cjs.js +1 -1
- package/dist/LightBox-es.js +1 -1
- package/dist/Link-cjs.js +1 -1
- package/dist/Link-es.js +1 -1
- package/dist/List-cjs.js +3 -3
- package/dist/List-es.js +7 -7
- package/dist/Markdown-cjs.js +604 -961
- package/dist/Markdown-es.js +610 -967
- package/dist/Menu/Menu.d.ts +1 -1
- package/dist/Menu-cjs.js +859 -629
- package/dist/Menu-es.js +855 -625
- package/dist/Modal/index.cjs +2 -2
- package/dist/Modal/index.mjs +2 -2
- package/dist/Modal/useModal.d.ts +9 -29
- package/dist/MultiSelect-cjs.js +2 -2
- package/dist/MultiSelect-es.js +2 -2
- package/dist/OverlaySeparator-cjs.js +1 -1
- package/dist/OverlaySeparator-es.js +1 -1
- package/dist/Popover-cjs.js +1 -1
- package/dist/Popover-es.js +2 -2
- package/dist/ProgressBar-cjs.js +1 -1
- package/dist/ProgressBar-es.js +1 -1
- package/dist/RadioGroup-cjs.js +1 -1
- package/dist/RadioGroup-es.js +1 -1
- package/dist/RecurringSelect/components/index.mjs +1 -1
- package/dist/RecurringSelect/index.cjs +1 -0
- package/dist/RecurringSelect/index.mjs +1 -0
- package/dist/RecurringSelect-cjs.js +1 -1
- package/dist/RecurringSelect-es.js +2 -2
- package/dist/SegmentedControl-cjs.js +1 -1
- package/dist/SegmentedControl-es.js +2 -2
- package/dist/Select/index.cjs +1 -1
- package/dist/Select/index.mjs +2 -2
- package/dist/SideDrawer-cjs.js +1 -1
- package/dist/SideDrawer-es.js +1 -1
- package/dist/Spinner-cjs.js +1 -1
- package/dist/Spinner-es.js +1 -1
- package/dist/StatusIndicator-cjs.js +1 -1
- package/dist/StatusIndicator-es.js +1 -1
- package/dist/Switch-cjs.js +1 -1
- package/dist/Switch-es.js +1 -1
- package/dist/Table/index.mjs +1 -1
- package/dist/Tabs/index.mjs +1 -1
- package/dist/Tabs-cjs.js +1 -1
- package/dist/Tabs-es.js +6 -6
- package/dist/Text-cjs2.js +365 -175
- package/dist/Text-es2.js +361 -175
- package/dist/Thumbnail-cjs.js +1 -1
- package/dist/Thumbnail-es.js +2 -2
- package/dist/Tiles-cjs.js +1 -1
- package/dist/Tiles-es.js +1 -1
- package/dist/Tooltip-cjs.js +1 -1
- package/dist/Tooltip-es.js +2 -2
- package/dist/Typography-cjs.js +3 -3
- package/dist/Typography-es.js +3 -3
- package/dist/_baseEach-cjs.js +1 -1
- package/dist/_baseEach-es.js +7 -7
- package/dist/_baseFlatten-es.js +1 -1
- package/dist/_getAllKeys-cjs.js +2 -8
- package/dist/_getAllKeys-es.js +4 -10
- package/dist/_getTag-es.js +1 -1
- package/dist/_isIterateeCall-es.js +3 -3
- package/dist/_setToString-es.js +2 -2
- package/dist/debounce-es.js +4 -4
- package/dist/floating-ui.react-cjs.js +35 -16
- package/dist/floating-ui.react-dom-es.js +2 -2
- package/dist/floating-ui.react-es.js +37 -18
- package/dist/identity-es.js +5 -5
- package/dist/index-cjs.js +6 -6
- package/dist/index-es.js +6 -6
- package/dist/index.esm-es.js +1 -1
- package/dist/index.mjs +6 -6
- package/dist/isSymbol-es.js +1 -1
- package/dist/isTypedArray-cjs.js +4 -4
- package/dist/isTypedArray-es.js +6 -6
- package/dist/keysIn-cjs.js +2 -2
- package/dist/keysIn-es.js +5 -5
- package/dist/noop-es.js +4 -4
- package/dist/omit-cjs.js +37 -5
- package/dist/omit-es.js +46 -14
- package/dist/showToast-cjs.js +1 -1
- package/dist/showToast-es.js +1 -1
- package/dist/styles.css +56 -124
- package/dist/unstyledPrimitives/index.mjs +3 -3
- package/dist/useScrollToActive-cjs.js +1 -1
- package/dist/useScrollToActive-es.js +8 -8
- package/package.json +32 -15
- package/rollup.config.mjs +4 -1
package/dist/Text-es2.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React__default, { useRef, useCallback,
|
|
1
|
+
import React__default, { useState, useRef, useCallback, useContext, useEffect, createContext, useMemo, useReducer, forwardRef } from 'react';
|
|
2
2
|
import { c as clsx } from './clsx-es.js';
|
|
3
3
|
|
|
4
4
|
/*
|
|
@@ -14,36 +14,6 @@ import { c as clsx } from './clsx-es.js';
|
|
|
14
14
|
*/
|
|
15
15
|
const $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = typeof document !== 'undefined' ? (React__default).useLayoutEffect : ()=>{};
|
|
16
16
|
|
|
17
|
-
/*
|
|
18
|
-
* Copyright 2023 Adobe. All rights reserved.
|
|
19
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
20
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
21
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
22
|
-
*
|
|
23
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
24
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
25
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
26
|
-
* governing permissions and limitations under the License.
|
|
27
|
-
*/
|
|
28
|
-
|
|
29
|
-
var $8ae05eaa5c114e9c$var$_React_useInsertionEffect;
|
|
30
|
-
// Use the earliest effect type possible. useInsertionEffect runs during the mutation phase,
|
|
31
|
-
// before all layout effects, but is available only in React 18 and later.
|
|
32
|
-
const $8ae05eaa5c114e9c$var$useEarlyEffect = ($8ae05eaa5c114e9c$var$_React_useInsertionEffect = (React__default)['useInsertionEffect']) !== null && $8ae05eaa5c114e9c$var$_React_useInsertionEffect !== void 0 ? $8ae05eaa5c114e9c$var$_React_useInsertionEffect : ($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c);
|
|
33
|
-
function $8ae05eaa5c114e9c$export$7f54fc3180508a52(fn) {
|
|
34
|
-
const ref = (useRef)(null);
|
|
35
|
-
$8ae05eaa5c114e9c$var$useEarlyEffect(()=>{
|
|
36
|
-
ref.current = fn;
|
|
37
|
-
}, [
|
|
38
|
-
fn
|
|
39
|
-
]);
|
|
40
|
-
// @ts-ignore
|
|
41
|
-
return (useCallback)((...args)=>{
|
|
42
|
-
const f = ref.current;
|
|
43
|
-
return f === null || f === void 0 ? void 0 : f(...args);
|
|
44
|
-
}, []);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
17
|
/*
|
|
48
18
|
* Copyright 2020 Adobe. All rights reserved.
|
|
49
19
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -58,10 +28,13 @@ function $8ae05eaa5c114e9c$export$7f54fc3180508a52(fn) {
|
|
|
58
28
|
|
|
59
29
|
function $1dbecbe27a04f9af$export$14d238f342723f25(defaultValue) {
|
|
60
30
|
let [value, setValue] = (useState)(defaultValue);
|
|
31
|
+
// Keep an up to date copy of value in a ref so we can access the current value in the generator.
|
|
32
|
+
// This allows us to maintain a stable queue function.
|
|
33
|
+
let currValue = (useRef)(value);
|
|
61
34
|
let effect = (useRef)(null);
|
|
62
35
|
// Store the function in a ref so we can always access the current version
|
|
63
36
|
// which has the proper `value` in scope.
|
|
64
|
-
let nextRef = (
|
|
37
|
+
let nextRef = (useRef)(()=>{
|
|
65
38
|
if (!effect.current) return;
|
|
66
39
|
// Run the generator to the next yield.
|
|
67
40
|
let newValue = effect.current.next();
|
|
@@ -73,17 +46,20 @@ function $1dbecbe27a04f9af$export$14d238f342723f25(defaultValue) {
|
|
|
73
46
|
// If the value is the same as the current value,
|
|
74
47
|
// then continue to the next yield. Otherwise,
|
|
75
48
|
// set the value in state and wait for the next layout effect.
|
|
76
|
-
if (
|
|
49
|
+
if (currValue.current === newValue.value) nextRef.current();
|
|
77
50
|
else setValue(newValue.value);
|
|
78
51
|
});
|
|
79
52
|
($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
|
|
53
|
+
currValue.current = value;
|
|
80
54
|
// If there is an effect currently running, continue to the next yield.
|
|
81
|
-
if (effect.current) nextRef();
|
|
82
|
-
});
|
|
83
|
-
let queue = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)((fn)=>{
|
|
84
|
-
effect.current = fn(value);
|
|
85
|
-
nextRef();
|
|
55
|
+
if (effect.current) nextRef.current();
|
|
86
56
|
});
|
|
57
|
+
let queue = (useCallback)((fn)=>{
|
|
58
|
+
effect.current = fn(currValue.current);
|
|
59
|
+
nextRef.current();
|
|
60
|
+
}, [
|
|
61
|
+
nextRef
|
|
62
|
+
]);
|
|
87
63
|
return [
|
|
88
64
|
value,
|
|
89
65
|
queue
|
|
@@ -324,7 +300,7 @@ function $f4e2df6bd15f8569$export$98658e8c59125e6a() {
|
|
|
324
300
|
}
|
|
325
301
|
|
|
326
302
|
// Source: https://github.com/microsoft/tabster/blob/a89fc5d7e332d48f68d03b1ca6e344489d1c3898/src/Shadowdomize/DOMFunctions.ts#L16
|
|
327
|
-
|
|
303
|
+
/* eslint-disable rsp-rules/no-non-shadow-contains, rsp-rules/safe-event-target */
|
|
328
304
|
|
|
329
305
|
function $d4ee10de306f2510$export$4282f70798064fe0(node, otherNode) {
|
|
330
306
|
if (!($f4e2df6bd15f8569$export$98658e8c59125e6a)()) return otherNode && node ? node.contains(otherNode) : false;
|
|
@@ -348,11 +324,55 @@ const $d4ee10de306f2510$export$cd4e5573fbe2b576 = (doc = document)=>{
|
|
|
348
324
|
return activeElement;
|
|
349
325
|
};
|
|
350
326
|
function $d4ee10de306f2510$export$e58f029f0fbfdb29(event) {
|
|
351
|
-
if (($f4e2df6bd15f8569$export$98658e8c59125e6a)() && event.target.shadowRoot) {
|
|
352
|
-
|
|
327
|
+
if (($f4e2df6bd15f8569$export$98658e8c59125e6a)() && event.target instanceof Element && event.target.shadowRoot) {
|
|
328
|
+
var _event_composedPath_, _event_nativeEvent_composedPath_;
|
|
329
|
+
if ('composedPath' in event) return (_event_composedPath_ = event.composedPath()[0]) !== null && _event_composedPath_ !== void 0 ? _event_composedPath_ : null;
|
|
330
|
+
else if ('composedPath' in event.nativeEvent) return (_event_nativeEvent_composedPath_ = event.nativeEvent.composedPath()[0]) !== null && _event_nativeEvent_composedPath_ !== void 0 ? _event_nativeEvent_composedPath_ : null;
|
|
353
331
|
}
|
|
354
332
|
return event.target;
|
|
355
333
|
}
|
|
334
|
+
function $d4ee10de306f2510$export$b4f377a2b6254582(node) {
|
|
335
|
+
if (!node) return false;
|
|
336
|
+
// Get the active element within the node's parent shadow root (or the document). Can return null.
|
|
337
|
+
let root = node.getRootNode();
|
|
338
|
+
let ownerWindow = ($431fbd86ca7dc216$export$f21a1ffae260145a)(node);
|
|
339
|
+
if (!(root instanceof ownerWindow.Document || root instanceof ownerWindow.ShadowRoot)) return false;
|
|
340
|
+
let activeElement = root.activeElement;
|
|
341
|
+
// Check if the active element is within this node. These nodes are within the same shadow root.
|
|
342
|
+
return activeElement != null && node.contains(activeElement);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
/*
|
|
346
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
347
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
348
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
349
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
350
|
+
*
|
|
351
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
352
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
353
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
354
|
+
* governing permissions and limitations under the License.
|
|
355
|
+
*/ function $5dc95899b306f630$export$c9058316764c140e(...refs) {
|
|
356
|
+
if (refs.length === 1 && refs[0]) return refs[0];
|
|
357
|
+
return (value)=>{
|
|
358
|
+
let hasCleanup = false;
|
|
359
|
+
const cleanups = refs.map((ref)=>{
|
|
360
|
+
const cleanup = $5dc95899b306f630$var$setRef(ref, value);
|
|
361
|
+
hasCleanup || (hasCleanup = typeof cleanup == 'function');
|
|
362
|
+
return cleanup;
|
|
363
|
+
});
|
|
364
|
+
if (hasCleanup) return ()=>{
|
|
365
|
+
cleanups.forEach((cleanup, i)=>{
|
|
366
|
+
if (typeof cleanup === 'function') cleanup();
|
|
367
|
+
else $5dc95899b306f630$var$setRef(refs[i], null);
|
|
368
|
+
});
|
|
369
|
+
};
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
function $5dc95899b306f630$var$setRef(ref, value) {
|
|
373
|
+
if (typeof ref === 'function') return ref(value);
|
|
374
|
+
else if (ref != null) ref.current = value;
|
|
375
|
+
}
|
|
356
376
|
|
|
357
377
|
/*
|
|
358
378
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -367,6 +387,7 @@ function $d4ee10de306f2510$export$e58f029f0fbfdb29(event) {
|
|
|
367
387
|
*/
|
|
368
388
|
|
|
369
389
|
|
|
390
|
+
|
|
370
391
|
function $3ef42575df84b30b$export$9d1611c77c2fe928(...args) {
|
|
371
392
|
// Start with a base clone of the first argument. This is a lot faster than starting
|
|
372
393
|
// with an empty object and adding properties as we go.
|
|
@@ -383,44 +404,13 @@ function $3ef42575df84b30b$export$9d1611c77c2fe928(...args) {
|
|
|
383
404
|
key[0] === 'o' && key[1] === 'n' && key.charCodeAt(2) >= /* 'A' */ 65 && key.charCodeAt(2) <= /* 'Z' */ 90) result[key] = ($ff5963eb1fccf552$export$e08e3b67e392101e)(a, b);
|
|
384
405
|
else if ((key === 'className' || key === 'UNSAFE_className') && typeof a === 'string' && typeof b === 'string') result[key] = (clsx)(a, b);
|
|
385
406
|
else if (key === 'id' && a && b) result.id = ($bdb11010cef70236$export$cd8c9cb68f842629)(a, b);
|
|
407
|
+
else if (key === 'ref' && a && b) result.ref = ($5dc95899b306f630$export$c9058316764c140e)(a, b);
|
|
386
408
|
else result[key] = b !== undefined ? b : a;
|
|
387
409
|
}
|
|
388
410
|
}
|
|
389
411
|
return result;
|
|
390
412
|
}
|
|
391
413
|
|
|
392
|
-
/*
|
|
393
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
394
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
395
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
396
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
397
|
-
*
|
|
398
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
399
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
400
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
401
|
-
* governing permissions and limitations under the License.
|
|
402
|
-
*/ function $5dc95899b306f630$export$c9058316764c140e(...refs) {
|
|
403
|
-
if (refs.length === 1 && refs[0]) return refs[0];
|
|
404
|
-
return (value)=>{
|
|
405
|
-
let hasCleanup = false;
|
|
406
|
-
const cleanups = refs.map((ref)=>{
|
|
407
|
-
const cleanup = $5dc95899b306f630$var$setRef(ref, value);
|
|
408
|
-
hasCleanup || (hasCleanup = typeof cleanup == 'function');
|
|
409
|
-
return cleanup;
|
|
410
|
-
});
|
|
411
|
-
if (hasCleanup) return ()=>{
|
|
412
|
-
cleanups.forEach((cleanup, i)=>{
|
|
413
|
-
if (typeof cleanup === 'function') cleanup();
|
|
414
|
-
else $5dc95899b306f630$var$setRef(refs[i], null);
|
|
415
|
-
});
|
|
416
|
-
};
|
|
417
|
-
};
|
|
418
|
-
}
|
|
419
|
-
function $5dc95899b306f630$var$setRef(ref, value) {
|
|
420
|
-
if (typeof ref === 'function') return ref(value);
|
|
421
|
-
else if (ref != null) ref.current = value;
|
|
422
|
-
}
|
|
423
|
-
|
|
424
414
|
/*
|
|
425
415
|
* Copyright 2020 Adobe. All rights reserved.
|
|
426
416
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -497,7 +487,7 @@ const $65484d02dcb7eb3e$var$propRe = /^(data-.*)$/;
|
|
|
497
487
|
function $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, opts = {}) {
|
|
498
488
|
let { labelable: labelable, isLink: isLink, global: global, events: events = global, propNames: propNames } = opts;
|
|
499
489
|
let filteredProps = {};
|
|
500
|
-
for(const prop in props)if (Object.prototype.hasOwnProperty.call(props, prop) && ($65484d02dcb7eb3e$var$DOMPropNames.has(prop) || labelable && $65484d02dcb7eb3e$var$labelablePropNames.has(prop) || isLink && $65484d02dcb7eb3e$var$linkPropNames.has(prop) || global && $65484d02dcb7eb3e$var$globalAttrs.has(prop) || events && $65484d02dcb7eb3e$var$globalEvents.has(prop) || prop.endsWith('Capture') && $65484d02dcb7eb3e$var$globalEvents.has(prop.slice(0, -7)) || (propNames === null || propNames === void 0 ? void 0 : propNames.has(prop)) || $65484d02dcb7eb3e$var$propRe.test(prop))) filteredProps[prop] = props[prop];
|
|
490
|
+
for(const prop in props)if (Object.prototype.hasOwnProperty.call(props, prop) && ($65484d02dcb7eb3e$var$DOMPropNames.has(prop) || labelable && $65484d02dcb7eb3e$var$labelablePropNames.has(prop) || isLink && $65484d02dcb7eb3e$var$linkPropNames.has(prop) || global && $65484d02dcb7eb3e$var$globalAttrs.has(prop) || events && ($65484d02dcb7eb3e$var$globalEvents.has(prop) || prop.endsWith('Capture') && $65484d02dcb7eb3e$var$globalEvents.has(prop.slice(0, -7))) || (propNames === null || propNames === void 0 ? void 0 : propNames.has(prop)) || $65484d02dcb7eb3e$var$propRe.test(prop))) filteredProps[prop] = props[prop];
|
|
501
491
|
return filteredProps;
|
|
502
492
|
}
|
|
503
493
|
|
|
@@ -622,6 +612,110 @@ const $c87311424ea30a05$export$b7d78993b74f766d = $c87311424ea30a05$var$cached(f
|
|
|
622
612
|
return $c87311424ea30a05$var$testUserAgent(/Firefox/i);
|
|
623
613
|
});
|
|
624
614
|
|
|
615
|
+
/*
|
|
616
|
+
* Copyright 2023 Adobe. All rights reserved.
|
|
617
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
618
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
619
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
620
|
+
*
|
|
621
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
622
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
623
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
624
|
+
* governing permissions and limitations under the License.
|
|
625
|
+
*/
|
|
626
|
+
|
|
627
|
+
|
|
628
|
+
const $ea8dcbcb9ea1b556$var$RouterContext = /*#__PURE__*/ (createContext)({
|
|
629
|
+
isNative: true,
|
|
630
|
+
open: $ea8dcbcb9ea1b556$var$openSyntheticLink,
|
|
631
|
+
useHref: (href)=>href
|
|
632
|
+
});
|
|
633
|
+
function $ea8dcbcb9ea1b556$export$9a302a45f65d0572() {
|
|
634
|
+
return (useContext)($ea8dcbcb9ea1b556$var$RouterContext);
|
|
635
|
+
}
|
|
636
|
+
function $ea8dcbcb9ea1b556$export$efa8c9099e530235(link, modifiers) {
|
|
637
|
+
// Use getAttribute here instead of link.target. Firefox will default link.target to "_parent" when inside an iframe.
|
|
638
|
+
let target = link.getAttribute('target');
|
|
639
|
+
return (!target || target === '_self') && link.origin === location.origin && !link.hasAttribute('download') && !modifiers.metaKey && // open in new tab (mac)
|
|
640
|
+
!modifiers.ctrlKey && // open in new tab (windows)
|
|
641
|
+
!modifiers.altKey && // download
|
|
642
|
+
!modifiers.shiftKey;
|
|
643
|
+
}
|
|
644
|
+
function $ea8dcbcb9ea1b556$export$95185d699e05d4d7(target, modifiers, setOpening = true) {
|
|
645
|
+
var _window_event_type, _window_event;
|
|
646
|
+
let { metaKey: metaKey, ctrlKey: ctrlKey, altKey: altKey, shiftKey: shiftKey } = modifiers;
|
|
647
|
+
// Firefox does not recognize keyboard events as a user action by default, and the popup blocker
|
|
648
|
+
// will prevent links with target="_blank" from opening. However, it does allow the event if the
|
|
649
|
+
// Command/Control key is held, which opens the link in a background tab. This seems like the best we can do.
|
|
650
|
+
// See https://bugzilla.mozilla.org/show_bug.cgi?id=257870 and https://bugzilla.mozilla.org/show_bug.cgi?id=746640.
|
|
651
|
+
if (($c87311424ea30a05$export$b7d78993b74f766d)() && ((_window_event = window.event) === null || _window_event === void 0 ? void 0 : (_window_event_type = _window_event.type) === null || _window_event_type === void 0 ? void 0 : _window_event_type.startsWith('key')) && target.target === '_blank') {
|
|
652
|
+
if (($c87311424ea30a05$export$9ac100e40613ea10)()) metaKey = true;
|
|
653
|
+
else ctrlKey = true;
|
|
654
|
+
}
|
|
655
|
+
// WebKit does not support firing click events with modifier keys, but does support keyboard events.
|
|
656
|
+
// https://github.com/WebKit/WebKit/blob/c03d0ac6e6db178f90923a0a63080b5ca210d25f/Source/WebCore/html/HTMLAnchorElement.cpp#L184
|
|
657
|
+
let event = ($c87311424ea30a05$export$78551043582a6a98)() && ($c87311424ea30a05$export$9ac100e40613ea10)() && !($c87311424ea30a05$export$7bef049ce92e4224)() && process.env.NODE_ENV !== 'test' ? new KeyboardEvent('keydown', {
|
|
658
|
+
keyIdentifier: 'Enter',
|
|
659
|
+
metaKey: metaKey,
|
|
660
|
+
ctrlKey: ctrlKey,
|
|
661
|
+
altKey: altKey,
|
|
662
|
+
shiftKey: shiftKey
|
|
663
|
+
}) : new MouseEvent('click', {
|
|
664
|
+
metaKey: metaKey,
|
|
665
|
+
ctrlKey: ctrlKey,
|
|
666
|
+
altKey: altKey,
|
|
667
|
+
shiftKey: shiftKey,
|
|
668
|
+
detail: 1,
|
|
669
|
+
bubbles: true,
|
|
670
|
+
cancelable: true
|
|
671
|
+
});
|
|
672
|
+
$ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening = setOpening;
|
|
673
|
+
($7215afc6de606d6b$export$de79e2c695e052f3)(target);
|
|
674
|
+
target.dispatchEvent(event);
|
|
675
|
+
$ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening = false;
|
|
676
|
+
}
|
|
677
|
+
// https://github.com/parcel-bundler/parcel/issues/8724
|
|
678
|
+
$ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening = false;
|
|
679
|
+
function $ea8dcbcb9ea1b556$var$getSyntheticLink(target, open) {
|
|
680
|
+
if (target instanceof HTMLAnchorElement) open(target);
|
|
681
|
+
else if (target.hasAttribute('data-href')) {
|
|
682
|
+
let link = document.createElement('a');
|
|
683
|
+
link.href = target.getAttribute('data-href');
|
|
684
|
+
if (target.hasAttribute('data-target')) link.target = target.getAttribute('data-target');
|
|
685
|
+
if (target.hasAttribute('data-rel')) link.rel = target.getAttribute('data-rel');
|
|
686
|
+
if (target.hasAttribute('data-download')) link.download = target.getAttribute('data-download');
|
|
687
|
+
if (target.hasAttribute('data-ping')) link.ping = target.getAttribute('data-ping');
|
|
688
|
+
if (target.hasAttribute('data-referrer-policy')) link.referrerPolicy = target.getAttribute('data-referrer-policy');
|
|
689
|
+
target.appendChild(link);
|
|
690
|
+
open(link);
|
|
691
|
+
target.removeChild(link);
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
function $ea8dcbcb9ea1b556$var$openSyntheticLink(target, modifiers) {
|
|
695
|
+
$ea8dcbcb9ea1b556$var$getSyntheticLink(target, (link)=>$ea8dcbcb9ea1b556$export$95185d699e05d4d7(link, modifiers));
|
|
696
|
+
}
|
|
697
|
+
function $ea8dcbcb9ea1b556$export$7e924b3091a3bd18(props) {
|
|
698
|
+
let router = $ea8dcbcb9ea1b556$export$9a302a45f65d0572();
|
|
699
|
+
var _props_href;
|
|
700
|
+
const href = router.useHref((_props_href = props === null || props === void 0 ? void 0 : props.href) !== null && _props_href !== void 0 ? _props_href : '');
|
|
701
|
+
return {
|
|
702
|
+
href: (props === null || props === void 0 ? void 0 : props.href) ? href : undefined,
|
|
703
|
+
target: props === null || props === void 0 ? void 0 : props.target,
|
|
704
|
+
rel: props === null || props === void 0 ? void 0 : props.rel,
|
|
705
|
+
download: props === null || props === void 0 ? void 0 : props.download,
|
|
706
|
+
ping: props === null || props === void 0 ? void 0 : props.ping,
|
|
707
|
+
referrerPolicy: props === null || props === void 0 ? void 0 : props.referrerPolicy
|
|
708
|
+
};
|
|
709
|
+
}
|
|
710
|
+
function $ea8dcbcb9ea1b556$export$13aea1a3cb5e3f1f(e, router, href, routerOptions) {
|
|
711
|
+
// If a custom router is provided, prevent default and forward if this link should client navigate.
|
|
712
|
+
if (!router.isNative && e.currentTarget instanceof HTMLAnchorElement && e.currentTarget.href && // If props are applied to a router Link component, it may have already prevented default.
|
|
713
|
+
!e.isDefaultPrevented() && $ea8dcbcb9ea1b556$export$efa8c9099e530235(e.currentTarget, e) && href) {
|
|
714
|
+
e.preventDefault();
|
|
715
|
+
router.open(e.currentTarget, e, href, routerOptions);
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
|
|
625
719
|
/*
|
|
626
720
|
* Copyright 2020 Adobe. All rights reserved.
|
|
627
721
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -638,6 +732,7 @@ const $c87311424ea30a05$export$b7d78993b74f766d = $c87311424ea30a05$var$cached(f
|
|
|
638
732
|
// bugs, e.g. Chrome sometimes fires both transitionend and transitioncancel rather
|
|
639
733
|
// than one or the other. So we need to track what's actually transitioning so that
|
|
640
734
|
// we can ignore these duplicate events.
|
|
735
|
+
|
|
641
736
|
let $bbed8b41f857bcc0$var$transitionsByElement = new Map();
|
|
642
737
|
// A list of callbacks to call once there are no transitioning elements.
|
|
643
738
|
let $bbed8b41f857bcc0$var$transitionCallbacks = new Set();
|
|
@@ -647,31 +742,33 @@ function $bbed8b41f857bcc0$var$setupGlobalEvents() {
|
|
|
647
742
|
return 'propertyName' in event;
|
|
648
743
|
}
|
|
649
744
|
let onTransitionStart = (e)=>{
|
|
650
|
-
|
|
745
|
+
let eventTarget = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
746
|
+
if (!isTransitionEvent(e) || !eventTarget) return;
|
|
651
747
|
// Add the transitioning property to the list for this element.
|
|
652
|
-
let transitions = $bbed8b41f857bcc0$var$transitionsByElement.get(
|
|
748
|
+
let transitions = $bbed8b41f857bcc0$var$transitionsByElement.get(eventTarget);
|
|
653
749
|
if (!transitions) {
|
|
654
750
|
transitions = new Set();
|
|
655
|
-
$bbed8b41f857bcc0$var$transitionsByElement.set(
|
|
751
|
+
$bbed8b41f857bcc0$var$transitionsByElement.set(eventTarget, transitions);
|
|
656
752
|
// The transitioncancel event must be registered on the element itself, rather than as a global
|
|
657
753
|
// event. This enables us to handle when the node is deleted from the document while it is transitioning.
|
|
658
754
|
// In that case, the cancel event would have nowhere to bubble to so we need to handle it directly.
|
|
659
|
-
|
|
755
|
+
eventTarget.addEventListener('transitioncancel', onTransitionEnd, {
|
|
660
756
|
once: true
|
|
661
757
|
});
|
|
662
758
|
}
|
|
663
759
|
transitions.add(e.propertyName);
|
|
664
760
|
};
|
|
665
761
|
let onTransitionEnd = (e)=>{
|
|
666
|
-
|
|
762
|
+
let eventTarget = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
763
|
+
if (!isTransitionEvent(e) || !eventTarget) return;
|
|
667
764
|
// Remove property from list of transitioning properties.
|
|
668
|
-
let properties = $bbed8b41f857bcc0$var$transitionsByElement.get(
|
|
765
|
+
let properties = $bbed8b41f857bcc0$var$transitionsByElement.get(eventTarget);
|
|
669
766
|
if (!properties) return;
|
|
670
767
|
properties.delete(e.propertyName);
|
|
671
768
|
// If empty, remove transitioncancel event, and remove the element from the list of transitioning elements.
|
|
672
769
|
if (properties.size === 0) {
|
|
673
|
-
|
|
674
|
-
$bbed8b41f857bcc0$var$transitionsByElement.delete(
|
|
770
|
+
eventTarget.removeEventListener('transitioncancel', onTransitionEnd);
|
|
771
|
+
$bbed8b41f857bcc0$var$transitionsByElement.delete(eventTarget);
|
|
675
772
|
}
|
|
676
773
|
// If no transitioning elements, call all of the queued callbacks.
|
|
677
774
|
if ($bbed8b41f857bcc0$var$transitionsByElement.size === 0) {
|
|
@@ -840,6 +937,36 @@ function $df56164dff5785e2$export$4338b53315abf666(ref) {
|
|
|
840
937
|
]);
|
|
841
938
|
}
|
|
842
939
|
|
|
940
|
+
/*
|
|
941
|
+
* Copyright 2023 Adobe. All rights reserved.
|
|
942
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
943
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
944
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
945
|
+
*
|
|
946
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
947
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
948
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
949
|
+
* governing permissions and limitations under the License.
|
|
950
|
+
*/
|
|
951
|
+
|
|
952
|
+
var $8ae05eaa5c114e9c$var$_React_useInsertionEffect;
|
|
953
|
+
// Use the earliest effect type possible. useInsertionEffect runs during the mutation phase,
|
|
954
|
+
// before all layout effects, but is available only in React 18 and later.
|
|
955
|
+
const $8ae05eaa5c114e9c$var$useEarlyEffect = ($8ae05eaa5c114e9c$var$_React_useInsertionEffect = (React__default)['useInsertionEffect']) !== null && $8ae05eaa5c114e9c$var$_React_useInsertionEffect !== void 0 ? $8ae05eaa5c114e9c$var$_React_useInsertionEffect : ($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c);
|
|
956
|
+
function $8ae05eaa5c114e9c$export$7f54fc3180508a52(fn) {
|
|
957
|
+
const ref = (useRef)(null);
|
|
958
|
+
$8ae05eaa5c114e9c$var$useEarlyEffect(()=>{
|
|
959
|
+
ref.current = fn;
|
|
960
|
+
}, [
|
|
961
|
+
fn
|
|
962
|
+
]);
|
|
963
|
+
// @ts-ignore
|
|
964
|
+
return (useCallback)((...args)=>{
|
|
965
|
+
const f = ref.current;
|
|
966
|
+
return f === null || f === void 0 ? void 0 : f(...args);
|
|
967
|
+
}, []);
|
|
968
|
+
}
|
|
969
|
+
|
|
843
970
|
/*
|
|
844
971
|
* Copyright 2020 Adobe. All rights reserved.
|
|
845
972
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -888,8 +1015,7 @@ function $e9faafb641e167db$export$90fc3a17d93f704c(ref, event, handler, options)
|
|
|
888
1015
|
ref,
|
|
889
1016
|
event,
|
|
890
1017
|
options,
|
|
891
|
-
isDisabled
|
|
892
|
-
handleEvent
|
|
1018
|
+
isDisabled
|
|
893
1019
|
]);
|
|
894
1020
|
}
|
|
895
1021
|
|
|
@@ -952,7 +1078,9 @@ function $7d2416ea0959daaa$var$isAttributeVisible(element, childElement) {
|
|
|
952
1078
|
!element.hasAttribute('data-react-aria-prevent-focus') && (element.nodeName === 'DETAILS' && childElement && childElement.nodeName !== 'SUMMARY' ? element.hasAttribute('open') : true);
|
|
953
1079
|
}
|
|
954
1080
|
function $7d2416ea0959daaa$export$e989c0fffaa6b27a(element, childElement) {
|
|
955
|
-
if ($7d2416ea0959daaa$var$supportsCheckVisibility) return element.checkVisibility(
|
|
1081
|
+
if ($7d2416ea0959daaa$var$supportsCheckVisibility) return element.checkVisibility({
|
|
1082
|
+
visibilityProperty: true
|
|
1083
|
+
}) && !element.closest('[data-react-aria-prevent-focus]');
|
|
956
1084
|
return element.nodeName !== '#comment' && $7d2416ea0959daaa$var$isStyleVisible(element) && $7d2416ea0959daaa$var$isAttributeVisible(element, childElement) && (!element.parentElement || $7d2416ea0959daaa$export$e989c0fffaa6b27a(element.parentElement, element));
|
|
957
1085
|
}
|
|
958
1086
|
|
|
@@ -1012,8 +1140,14 @@ function $b4b717babfbb907b$var$isInert(element) {
|
|
|
1012
1140
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
1013
1141
|
* governing permissions and limitations under the License.
|
|
1014
1142
|
*/
|
|
1143
|
+
var $458b0a5536c1a7cf$var$_React_useInsertionEffect;
|
|
1144
|
+
// Use the earliest effect possible to reset the ref below.
|
|
1145
|
+
const $458b0a5536c1a7cf$var$useEarlyEffect = typeof document !== 'undefined' ? ($458b0a5536c1a7cf$var$_React_useInsertionEffect = (React__default)['useInsertionEffect']) !== null && $458b0a5536c1a7cf$var$_React_useInsertionEffect !== void 0 ? $458b0a5536c1a7cf$var$_React_useInsertionEffect : (React__default).useLayoutEffect : ()=>{};
|
|
1015
1146
|
function $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange) {
|
|
1147
|
+
// Store the value in both state and a ref. The state value will only be used when uncontrolled.
|
|
1148
|
+
// The ref is used to track the most current value, which is passed to the function setState callback.
|
|
1016
1149
|
let [stateValue, setStateValue] = (useState)(value || defaultValue);
|
|
1150
|
+
let valueRef = (useRef)(stateValue);
|
|
1017
1151
|
let isControlledRef = (useRef)(value !== undefined);
|
|
1018
1152
|
let isControlled = value !== undefined;
|
|
1019
1153
|
(useEffect)(()=>{
|
|
@@ -1023,40 +1157,28 @@ function $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange
|
|
|
1023
1157
|
}, [
|
|
1024
1158
|
isControlled
|
|
1025
1159
|
]);
|
|
1160
|
+
// After each render, update the ref to the current value.
|
|
1161
|
+
// This ensures that the setState callback argument is reset.
|
|
1162
|
+
// Note: the effect should not have any dependencies so that controlled values always reset.
|
|
1026
1163
|
let currentValue = isControlled ? value : stateValue;
|
|
1164
|
+
$458b0a5536c1a7cf$var$useEarlyEffect(()=>{
|
|
1165
|
+
valueRef.current = currentValue;
|
|
1166
|
+
});
|
|
1167
|
+
let [, forceUpdate] = (useReducer)(()=>({}), {});
|
|
1027
1168
|
let setValue = (useCallback)((value, ...args)=>{
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
//
|
|
1035
|
-
|
|
1036
|
-
//
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
if (typeof value === 'function') {
|
|
1040
|
-
if (process.env.NODE_ENV !== 'production') console.warn('We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320');
|
|
1041
|
-
// this supports functional updates https://reactjs.org/docs/hooks-reference.html#functional-updates
|
|
1042
|
-
// when someone using useControlledState calls setControlledState(myFunc)
|
|
1043
|
-
// this will call our useState setState with a function as well which invokes myFunc and calls onChange with the value from myFunc
|
|
1044
|
-
// if we're in an uncontrolled state, then we also return the value of myFunc which to setState looks as though it was just called with myFunc from the beginning
|
|
1045
|
-
// otherwise we just return the controlled value, which won't cause a rerender because React knows to bail out when the value is the same
|
|
1046
|
-
let updateFunction = (oldValue, ...functionArgs)=>{
|
|
1047
|
-
let interceptedValue = value(isControlled ? currentValue : oldValue, ...functionArgs);
|
|
1048
|
-
onChangeCaller(interceptedValue, ...args);
|
|
1049
|
-
if (!isControlled) return interceptedValue;
|
|
1050
|
-
return oldValue;
|
|
1051
|
-
};
|
|
1052
|
-
setStateValue(updateFunction);
|
|
1053
|
-
} else {
|
|
1054
|
-
if (!isControlled) setStateValue(value);
|
|
1055
|
-
onChangeCaller(value, ...args);
|
|
1169
|
+
// @ts-ignore - TS doesn't know that T cannot be a function.
|
|
1170
|
+
let newValue = typeof value === 'function' ? value(valueRef.current) : value;
|
|
1171
|
+
if (!Object.is(valueRef.current, newValue)) {
|
|
1172
|
+
// Update the ref so that the next setState callback has the most recent value.
|
|
1173
|
+
valueRef.current = newValue;
|
|
1174
|
+
setStateValue(newValue);
|
|
1175
|
+
// Always trigger a re-render, even when controlled, so that the layout effect above runs to reset the value.
|
|
1176
|
+
forceUpdate();
|
|
1177
|
+
// Trigger onChange. Note that if setState is called multiple times in a single event,
|
|
1178
|
+
// onChange will be called for each one instead of only once.
|
|
1179
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue, ...args);
|
|
1056
1180
|
}
|
|
1057
1181
|
}, [
|
|
1058
|
-
isControlled,
|
|
1059
|
-
currentValue,
|
|
1060
1182
|
onChange
|
|
1061
1183
|
]);
|
|
1062
1184
|
return [
|
|
@@ -1133,7 +1255,7 @@ function $64fa3d84918910a7$export$2881499e37b75b9a({ values: values, children: c
|
|
|
1133
1255
|
return children;
|
|
1134
1256
|
}
|
|
1135
1257
|
function $64fa3d84918910a7$export$4d86445c2cf5e3(props) {
|
|
1136
|
-
let { className: className, style: style, children: children, defaultClassName: defaultClassName, defaultChildren: defaultChildren, defaultStyle: defaultStyle, values: values } = props;
|
|
1258
|
+
let { className: className, style: style, children: children, defaultClassName: defaultClassName, defaultChildren: defaultChildren, defaultStyle: defaultStyle, values: values, render: render } = props;
|
|
1137
1259
|
return (useMemo)(()=>{
|
|
1138
1260
|
let computedClassName;
|
|
1139
1261
|
let computedStyle;
|
|
@@ -1161,7 +1283,8 @@ function $64fa3d84918910a7$export$4d86445c2cf5e3(props) {
|
|
|
1161
1283
|
...computedStyle
|
|
1162
1284
|
} : undefined,
|
|
1163
1285
|
children: computedChildren !== null && computedChildren !== void 0 ? computedChildren : defaultChildren,
|
|
1164
|
-
'data-rac': ''
|
|
1286
|
+
'data-rac': '',
|
|
1287
|
+
render: render ? (props)=>render(props, values) : undefined
|
|
1165
1288
|
};
|
|
1166
1289
|
}, [
|
|
1167
1290
|
className,
|
|
@@ -1170,7 +1293,8 @@ function $64fa3d84918910a7$export$4d86445c2cf5e3(props) {
|
|
|
1170
1293
|
defaultClassName,
|
|
1171
1294
|
defaultChildren,
|
|
1172
1295
|
defaultStyle,
|
|
1173
|
-
values
|
|
1296
|
+
values,
|
|
1297
|
+
render
|
|
1174
1298
|
]);
|
|
1175
1299
|
}
|
|
1176
1300
|
function $64fa3d84918910a7$export$fabf2dc03a41866e(context, slot) {
|
|
@@ -1191,7 +1315,6 @@ function $64fa3d84918910a7$export$fabf2dc03a41866e(context, slot) {
|
|
|
1191
1315
|
}
|
|
1192
1316
|
function $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, context) {
|
|
1193
1317
|
let ctx = $64fa3d84918910a7$export$fabf2dc03a41866e(context, props.slot) || {};
|
|
1194
|
-
// @ts-ignore - TS says "Type 'unique symbol' cannot be used as an index type." but not sure why.
|
|
1195
1318
|
let { ref: contextRef, ...contextProps } = ctx;
|
|
1196
1319
|
let mergedRef = ($df56164dff5785e2$export$4338b53315abf666)((useMemo)(()=>($5dc95899b306f630$export$c9058316764c140e)(ref, contextRef), [
|
|
1197
1320
|
ref,
|
|
@@ -1253,6 +1376,41 @@ function $64fa3d84918910a7$export$ef03459518577ad4(props) {
|
|
|
1253
1376
|
for(const prop in props)if (!prefix.test(prop)) filteredProps[prop] = props[prop];
|
|
1254
1377
|
return filteredProps;
|
|
1255
1378
|
}
|
|
1379
|
+
function $64fa3d84918910a7$var$DOMElement(ElementType, props, forwardedRef) {
|
|
1380
|
+
let { render: render, ...otherProps } = props;
|
|
1381
|
+
let elementRef = (useRef)(null);
|
|
1382
|
+
let ref = (useMemo)(()=>($5dc95899b306f630$export$c9058316764c140e)(forwardedRef, elementRef), [
|
|
1383
|
+
forwardedRef,
|
|
1384
|
+
elementRef
|
|
1385
|
+
]);
|
|
1386
|
+
($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
|
|
1387
|
+
if (process.env.NODE_ENV !== 'production' && render) {
|
|
1388
|
+
if (!elementRef.current) console.warn('Ref was not connected to DOM element returned by custom `render` function. Did you forget to pass through or merge the `ref`?');
|
|
1389
|
+
else if (elementRef.current.localName !== ElementType) console.warn(`Unexpected DOM element returned by custom \`render\` function. Expected <${ElementType}>, got <${elementRef.current.localName}>. This may break the component behavior and accessibility.`);
|
|
1390
|
+
}
|
|
1391
|
+
}, [
|
|
1392
|
+
ElementType,
|
|
1393
|
+
render
|
|
1394
|
+
]);
|
|
1395
|
+
let domProps = {
|
|
1396
|
+
...otherProps,
|
|
1397
|
+
ref: ref
|
|
1398
|
+
};
|
|
1399
|
+
if (render) return render(domProps, undefined);
|
|
1400
|
+
return /*#__PURE__*/ (React__default).createElement(ElementType, domProps);
|
|
1401
|
+
}
|
|
1402
|
+
const $64fa3d84918910a7$var$domComponentCache = {};
|
|
1403
|
+
const $64fa3d84918910a7$export$df3a06d6289f983e = new Proxy({}, {
|
|
1404
|
+
get (target, elementType) {
|
|
1405
|
+
if (typeof elementType !== 'string') return undefined;
|
|
1406
|
+
let res = $64fa3d84918910a7$var$domComponentCache[elementType];
|
|
1407
|
+
if (!res) {
|
|
1408
|
+
res = /*#__PURE__*/ (forwardRef)($64fa3d84918910a7$var$DOMElement.bind(null, elementType));
|
|
1409
|
+
$64fa3d84918910a7$var$domComponentCache[elementType] = res;
|
|
1410
|
+
}
|
|
1411
|
+
return res;
|
|
1412
|
+
}
|
|
1413
|
+
});
|
|
1256
1414
|
|
|
1257
1415
|
/*
|
|
1258
1416
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -1364,10 +1522,13 @@ function $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a() {
|
|
|
1364
1522
|
}, []);
|
|
1365
1523
|
// We cannot determine the browser's language on the server, so default to
|
|
1366
1524
|
// en-US. This will be updated after hydration on the client to the correct value.
|
|
1367
|
-
if (isSSR)
|
|
1368
|
-
locale
|
|
1369
|
-
|
|
1370
|
-
|
|
1525
|
+
if (isSSR) {
|
|
1526
|
+
let locale = typeof window !== 'undefined' && window[$1e5a04cdaf7d1af8$var$localeSymbol];
|
|
1527
|
+
return {
|
|
1528
|
+
locale: locale || 'en-US',
|
|
1529
|
+
direction: 'ltr'
|
|
1530
|
+
};
|
|
1531
|
+
}
|
|
1371
1532
|
return defaultLocale;
|
|
1372
1533
|
}
|
|
1373
1534
|
|
|
@@ -1592,24 +1753,22 @@ function $8a9cb279dc87e130$export$715c682d09d639cc(onBlur) {
|
|
|
1592
1753
|
}
|
|
1593
1754
|
};
|
|
1594
1755
|
}, []);
|
|
1595
|
-
let dispatchBlur = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)((e)=>{
|
|
1596
|
-
onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
|
|
1597
|
-
});
|
|
1598
1756
|
// This function is called during a React onFocus event.
|
|
1599
1757
|
return (useCallback)((e)=>{
|
|
1600
1758
|
// React does not fire onBlur when an element is disabled. https://github.com/facebook/react/issues/9142
|
|
1601
1759
|
// Most browsers fire a native focusout event in this case, except for Firefox. In that case, we use a
|
|
1602
1760
|
// MutationObserver to watch for the disabled attribute, and dispatch these events ourselves.
|
|
1603
1761
|
// For browsers that do, focusout fires before the MutationObserver, so onBlur should not fire twice.
|
|
1604
|
-
|
|
1762
|
+
let eventTarget = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
1763
|
+
if (eventTarget instanceof HTMLButtonElement || eventTarget instanceof HTMLInputElement || eventTarget instanceof HTMLTextAreaElement || eventTarget instanceof HTMLSelectElement) {
|
|
1605
1764
|
stateRef.current.isFocused = true;
|
|
1606
|
-
let target =
|
|
1765
|
+
let target = eventTarget;
|
|
1607
1766
|
let onBlurHandler = (e)=>{
|
|
1608
1767
|
stateRef.current.isFocused = false;
|
|
1609
1768
|
if (target.disabled) {
|
|
1610
1769
|
// For backward compatibility, dispatch a (fake) React synthetic event.
|
|
1611
1770
|
let event = $8a9cb279dc87e130$export$525bc4921d56d4a(e);
|
|
1612
|
-
|
|
1771
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
|
|
1613
1772
|
}
|
|
1614
1773
|
// We no longer need the MutationObserver once the target is blurred.
|
|
1615
1774
|
if (stateRef.current.observer) {
|
|
@@ -1624,7 +1783,7 @@ function $8a9cb279dc87e130$export$715c682d09d639cc(onBlur) {
|
|
|
1624
1783
|
if (stateRef.current.isFocused && target.disabled) {
|
|
1625
1784
|
var _stateRef_current_observer;
|
|
1626
1785
|
(_stateRef_current_observer = stateRef.current.observer) === null || _stateRef_current_observer === void 0 ? void 0 : _stateRef_current_observer.disconnect();
|
|
1627
|
-
let relatedTargetEl = target ===
|
|
1786
|
+
let relatedTargetEl = target === ($d4ee10de306f2510$export$cd4e5573fbe2b576)() ? null : ($d4ee10de306f2510$export$cd4e5573fbe2b576)();
|
|
1628
1787
|
target.dispatchEvent(new FocusEvent('blur', {
|
|
1629
1788
|
relatedTarget: relatedTargetEl
|
|
1630
1789
|
}));
|
|
@@ -1642,7 +1801,7 @@ function $8a9cb279dc87e130$export$715c682d09d639cc(onBlur) {
|
|
|
1642
1801
|
});
|
|
1643
1802
|
}
|
|
1644
1803
|
}, [
|
|
1645
|
-
|
|
1804
|
+
onBlur
|
|
1646
1805
|
]);
|
|
1647
1806
|
}
|
|
1648
1807
|
let $8a9cb279dc87e130$export$fda7da73ab5d4c48 = false;
|
|
@@ -1655,10 +1814,10 @@ function $8a9cb279dc87e130$export$cabe61c495ee3649(target) {
|
|
|
1655
1814
|
$8a9cb279dc87e130$export$fda7da73ab5d4c48 = true;
|
|
1656
1815
|
let isRefocusing = false;
|
|
1657
1816
|
let onBlur = (e)=>{
|
|
1658
|
-
if (e
|
|
1817
|
+
if (($d4ee10de306f2510$export$e58f029f0fbfdb29)(e) === activeElement || isRefocusing) e.stopImmediatePropagation();
|
|
1659
1818
|
};
|
|
1660
1819
|
let onFocusOut = (e)=>{
|
|
1661
|
-
if (e
|
|
1820
|
+
if (($d4ee10de306f2510$export$e58f029f0fbfdb29)(e) === activeElement || isRefocusing) {
|
|
1662
1821
|
e.stopImmediatePropagation();
|
|
1663
1822
|
// If there was no focusable ancestor, we don't expect a focus event.
|
|
1664
1823
|
// Re-focus the original active element here.
|
|
@@ -1670,10 +1829,10 @@ function $8a9cb279dc87e130$export$cabe61c495ee3649(target) {
|
|
|
1670
1829
|
}
|
|
1671
1830
|
};
|
|
1672
1831
|
let onFocus = (e)=>{
|
|
1673
|
-
if (e
|
|
1832
|
+
if (($d4ee10de306f2510$export$e58f029f0fbfdb29)(e) === target || isRefocusing) e.stopImmediatePropagation();
|
|
1674
1833
|
};
|
|
1675
1834
|
let onFocusIn = (e)=>{
|
|
1676
|
-
if (e
|
|
1835
|
+
if (($d4ee10de306f2510$export$e58f029f0fbfdb29)(e) === target || isRefocusing) {
|
|
1677
1836
|
e.stopImmediatePropagation();
|
|
1678
1837
|
if (!isRefocusing) {
|
|
1679
1838
|
isRefocusing = true;
|
|
@@ -1718,7 +1877,7 @@ function $8a9cb279dc87e130$export$cabe61c495ee3649(target) {
|
|
|
1718
1877
|
|
|
1719
1878
|
|
|
1720
1879
|
let $507fabe10e71c6fb$var$currentModality = null;
|
|
1721
|
-
|
|
1880
|
+
const $507fabe10e71c6fb$export$901e90a13c50a14e = new Set();
|
|
1722
1881
|
let $507fabe10e71c6fb$export$d90243b58daecda7 = new Map(); // We use a map here to support setting event listeners across multiple document objects.
|
|
1723
1882
|
let $507fabe10e71c6fb$var$hasEventBeforeFocus = false;
|
|
1724
1883
|
let $507fabe10e71c6fb$var$hasBlurredWindowRecently = false;
|
|
@@ -1728,7 +1887,7 @@ const $507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS = {
|
|
|
1728
1887
|
Escape: true
|
|
1729
1888
|
};
|
|
1730
1889
|
function $507fabe10e71c6fb$var$triggerChangeHandlers(modality, e) {
|
|
1731
|
-
for (let handler of $507fabe10e71c6fb$
|
|
1890
|
+
for (let handler of $507fabe10e71c6fb$export$901e90a13c50a14e)handler(modality, e);
|
|
1732
1891
|
}
|
|
1733
1892
|
/**
|
|
1734
1893
|
* Helper function to determine if a KeyboardEvent is unmodified and could make keyboard focus styles visible.
|
|
@@ -1738,20 +1897,21 @@ function $507fabe10e71c6fb$var$triggerChangeHandlers(modality, e) {
|
|
|
1738
1897
|
}
|
|
1739
1898
|
function $507fabe10e71c6fb$var$handleKeyboardEvent(e) {
|
|
1740
1899
|
$507fabe10e71c6fb$var$hasEventBeforeFocus = true;
|
|
1741
|
-
if ($507fabe10e71c6fb$var$isValidKey(e)) {
|
|
1900
|
+
if (!($ea8dcbcb9ea1b556$export$95185d699e05d4d7).isOpening && $507fabe10e71c6fb$var$isValidKey(e)) {
|
|
1742
1901
|
$507fabe10e71c6fb$var$currentModality = 'keyboard';
|
|
1743
1902
|
$507fabe10e71c6fb$var$triggerChangeHandlers('keyboard', e);
|
|
1744
1903
|
}
|
|
1745
1904
|
}
|
|
1746
1905
|
function $507fabe10e71c6fb$var$handlePointerEvent(e) {
|
|
1747
1906
|
$507fabe10e71c6fb$var$currentModality = 'pointer';
|
|
1907
|
+
'pointerType' in e ? e.pointerType : 'mouse';
|
|
1748
1908
|
if (e.type === 'mousedown' || e.type === 'pointerdown') {
|
|
1749
1909
|
$507fabe10e71c6fb$var$hasEventBeforeFocus = true;
|
|
1750
1910
|
$507fabe10e71c6fb$var$triggerChangeHandlers('pointer', e);
|
|
1751
1911
|
}
|
|
1752
1912
|
}
|
|
1753
1913
|
function $507fabe10e71c6fb$var$handleClickEvent(e) {
|
|
1754
|
-
if (($6a7db85432448f7f$export$60278871457622de)(e)) {
|
|
1914
|
+
if (!($ea8dcbcb9ea1b556$export$95185d699e05d4d7).isOpening && ($6a7db85432448f7f$export$60278871457622de)(e)) {
|
|
1755
1915
|
$507fabe10e71c6fb$var$hasEventBeforeFocus = true;
|
|
1756
1916
|
$507fabe10e71c6fb$var$currentModality = 'virtual';
|
|
1757
1917
|
}
|
|
@@ -1760,7 +1920,7 @@ function $507fabe10e71c6fb$var$handleFocusEvent(e) {
|
|
|
1760
1920
|
// Firefox fires two extra focus events when the user first clicks into an iframe:
|
|
1761
1921
|
// first on the window, then on the document. We ignore these events so they don't
|
|
1762
1922
|
// cause keyboard focus rings to appear.
|
|
1763
|
-
if (e
|
|
1923
|
+
if (($d4ee10de306f2510$export$e58f029f0fbfdb29)(e) === window || ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e) === document || ($8a9cb279dc87e130$export$fda7da73ab5d4c48) || !e.isTrusted) return;
|
|
1764
1924
|
// If a focus event occurs without a preceding keyboard or pointer event, switch to virtual modality.
|
|
1765
1925
|
// This occurs, for example, when navigating a form with the next/previous buttons on iOS.
|
|
1766
1926
|
if (!$507fabe10e71c6fb$var$hasEventBeforeFocus && !$507fabe10e71c6fb$var$hasBlurredWindowRecently) {
|
|
@@ -1880,27 +2040,30 @@ const $507fabe10e71c6fb$var$nonTextInputTypes = new Set([
|
|
|
1880
2040
|
* If this is attached to text input component, return if the event is a focus event (Tab/Escape keys pressed) so that
|
|
1881
2041
|
* focus visible style can be properly set.
|
|
1882
2042
|
*/ function $507fabe10e71c6fb$var$isKeyboardFocusEvent(isTextInput, modality, e) {
|
|
1883
|
-
let document1 = ($431fbd86ca7dc216$export$b204af158042fbac)(e
|
|
1884
|
-
|
|
1885
|
-
const
|
|
1886
|
-
const
|
|
1887
|
-
const
|
|
2043
|
+
let document1 = ($431fbd86ca7dc216$export$b204af158042fbac)(e ? ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e) : undefined);
|
|
2044
|
+
let eventTarget = e ? ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e) : undefined;
|
|
2045
|
+
const IHTMLInputElement = typeof window !== 'undefined' ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(eventTarget).HTMLInputElement : HTMLInputElement;
|
|
2046
|
+
const IHTMLTextAreaElement = typeof window !== 'undefined' ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(eventTarget).HTMLTextAreaElement : HTMLTextAreaElement;
|
|
2047
|
+
const IHTMLElement = typeof window !== 'undefined' ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(eventTarget).HTMLElement : HTMLElement;
|
|
2048
|
+
const IKeyboardEvent = typeof window !== 'undefined' ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(eventTarget).KeyboardEvent : KeyboardEvent;
|
|
1888
2049
|
// 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)
|
|
1889
2050
|
// we need to rely on the user passing isTextInput into here. This way we can skip toggling focus visiblity for said input element
|
|
1890
|
-
|
|
2051
|
+
let activeElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)(document1);
|
|
2052
|
+
isTextInput = isTextInput || activeElement instanceof IHTMLInputElement && !$507fabe10e71c6fb$var$nonTextInputTypes.has(activeElement.type) || activeElement instanceof IHTMLTextAreaElement || activeElement instanceof IHTMLElement && activeElement.isContentEditable;
|
|
1891
2053
|
return !(isTextInput && modality === 'keyboard' && e instanceof IKeyboardEvent && !$507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS[e.key]);
|
|
1892
2054
|
}
|
|
1893
2055
|
function $507fabe10e71c6fb$export$ec71b4b83ac08ec3(fn, deps, opts) {
|
|
1894
2056
|
$507fabe10e71c6fb$var$setupGlobalFocusEvents();
|
|
1895
2057
|
(useEffect)(()=>{
|
|
2058
|
+
if ((opts === null || opts === void 0 ? void 0 : opts.enabled) === false) return;
|
|
1896
2059
|
let handler = (modality, e)=>{
|
|
1897
2060
|
// We want to early return for any keyboard events that occur inside text inputs EXCEPT for Tab and Escape
|
|
1898
2061
|
if (!$507fabe10e71c6fb$var$isKeyboardFocusEvent(!!(opts === null || opts === void 0 ? void 0 : opts.isTextInput), modality, e)) return;
|
|
1899
2062
|
fn($507fabe10e71c6fb$export$b9b3dfddab17db27());
|
|
1900
2063
|
};
|
|
1901
|
-
$507fabe10e71c6fb$
|
|
2064
|
+
$507fabe10e71c6fb$export$901e90a13c50a14e.add(handler);
|
|
1902
2065
|
return ()=>{
|
|
1903
|
-
$507fabe10e71c6fb$
|
|
2066
|
+
$507fabe10e71c6fb$export$901e90a13c50a14e.delete(handler);
|
|
1904
2067
|
};
|
|
1905
2068
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1906
2069
|
}, deps);
|
|
@@ -1919,18 +2082,19 @@ function $507fabe10e71c6fb$export$ec71b4b83ac08ec3(fn, deps, opts) {
|
|
|
1919
2082
|
*/
|
|
1920
2083
|
|
|
1921
2084
|
function $3ad3f6e1647bc98d$export$80f3e147d781571c(element) {
|
|
2085
|
+
if (!element.isConnected) return;
|
|
1922
2086
|
// If the user is interacting with a virtual cursor, e.g. screen reader, then
|
|
1923
2087
|
// wait until after any animated transitions that are currently occurring on
|
|
1924
2088
|
// the page before shifting focus. This avoids issues with VoiceOver on iOS
|
|
1925
2089
|
// causing the page to scroll when moving focus if the element is transitioning
|
|
1926
2090
|
// from off the screen.
|
|
1927
2091
|
const ownerDocument = ($431fbd86ca7dc216$export$b204af158042fbac)(element);
|
|
1928
|
-
const activeElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)(ownerDocument);
|
|
1929
2092
|
if (($507fabe10e71c6fb$export$630ff653c5ada6a9)() === 'virtual') {
|
|
1930
|
-
let lastFocusedElement =
|
|
2093
|
+
let lastFocusedElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)(ownerDocument);
|
|
1931
2094
|
($bbed8b41f857bcc0$export$24490316f764c430)(()=>{
|
|
1932
|
-
|
|
1933
|
-
|
|
2095
|
+
const activeElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)(ownerDocument);
|
|
2096
|
+
// If focus did not move or focus was lost to the body, and the element is still in the document, focus it.
|
|
2097
|
+
if ((activeElement === lastFocusedElement || activeElement === ownerDocument.body) && element.isConnected) ($7215afc6de606d6b$export$de79e2c695e052f3)(element);
|
|
1934
2098
|
});
|
|
1935
2099
|
} else ($7215afc6de606d6b$export$de79e2c695e052f3)(element);
|
|
1936
2100
|
}
|
|
@@ -1955,7 +2119,7 @@ function $3ad3f6e1647bc98d$export$80f3e147d781571c(element) {
|
|
|
1955
2119
|
function $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(props) {
|
|
1956
2120
|
let { isDisabled: isDisabled, onFocus: onFocusProp, onBlur: onBlurProp, onFocusChange: onFocusChange } = props;
|
|
1957
2121
|
const onBlur = (useCallback)((e)=>{
|
|
1958
|
-
if (e
|
|
2122
|
+
if (($d4ee10de306f2510$export$e58f029f0fbfdb29)(e) === e.currentTarget) {
|
|
1959
2123
|
if (onBlurProp) onBlurProp(e);
|
|
1960
2124
|
if (onFocusChange) onFocusChange(false);
|
|
1961
2125
|
return true;
|
|
@@ -1968,9 +2132,10 @@ function $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(props) {
|
|
|
1968
2132
|
const onFocus = (useCallback)((e)=>{
|
|
1969
2133
|
// Double check that document.activeElement actually matches e.target in case a previously chained
|
|
1970
2134
|
// focus handler already moved focus somewhere else.
|
|
1971
|
-
|
|
2135
|
+
let eventTarget = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
2136
|
+
const ownerDocument = ($431fbd86ca7dc216$export$b204af158042fbac)(eventTarget);
|
|
1972
2137
|
const activeElement = ownerDocument ? ($d4ee10de306f2510$export$cd4e5573fbe2b576)(ownerDocument) : ($d4ee10de306f2510$export$cd4e5573fbe2b576)();
|
|
1973
|
-
if (
|
|
2138
|
+
if (eventTarget === e.currentTarget && eventTarget === activeElement) {
|
|
1974
2139
|
if (onFocusProp) onFocusProp(e);
|
|
1975
2140
|
if (onFocusChange) onFocusChange(true);
|
|
1976
2141
|
onSyntheticFocus(e);
|
|
@@ -2118,11 +2283,11 @@ function $9ab94262bd0047c7$export$420e68273165f4ec(props) {
|
|
|
2118
2283
|
let { addGlobalListener: addGlobalListener, removeAllGlobalListeners: removeAllGlobalListeners } = ($03deb23ff14920c4$export$4eaf04e54aa8eed6)();
|
|
2119
2284
|
let onBlur = (useCallback)((e)=>{
|
|
2120
2285
|
// Ignore events bubbling through portals.
|
|
2121
|
-
if (!e.currentTarget
|
|
2286
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
2122
2287
|
// We don't want to trigger onBlurWithin and then immediately onFocusWithin again
|
|
2123
2288
|
// when moving focus inside the element. Only trigger if the currentTarget doesn't
|
|
2124
2289
|
// include the relatedTarget (where focus is moving).
|
|
2125
|
-
if (state.current.isFocusWithin && !e.currentTarget
|
|
2290
|
+
if (state.current.isFocusWithin && !($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, e.relatedTarget)) {
|
|
2126
2291
|
state.current.isFocusWithin = false;
|
|
2127
2292
|
removeAllGlobalListeners();
|
|
2128
2293
|
if (onBlurWithin) onBlurWithin(e);
|
|
@@ -2137,12 +2302,13 @@ function $9ab94262bd0047c7$export$420e68273165f4ec(props) {
|
|
|
2137
2302
|
let onSyntheticFocus = ($8a9cb279dc87e130$export$715c682d09d639cc)(onBlur);
|
|
2138
2303
|
let onFocus = (useCallback)((e)=>{
|
|
2139
2304
|
// Ignore events bubbling through portals.
|
|
2140
|
-
if (!e.currentTarget
|
|
2305
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
2141
2306
|
// Double check that document.activeElement actually matches e.target in case a previously chained
|
|
2142
2307
|
// focus handler already moved focus somewhere else.
|
|
2143
|
-
|
|
2308
|
+
let eventTarget = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
2309
|
+
const ownerDocument = ($431fbd86ca7dc216$export$b204af158042fbac)(eventTarget);
|
|
2144
2310
|
const activeElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)(ownerDocument);
|
|
2145
|
-
if (!state.current.isFocusWithin && activeElement ===
|
|
2311
|
+
if (!state.current.isFocusWithin && activeElement === eventTarget) {
|
|
2146
2312
|
if (onFocusWithin) onFocusWithin(e);
|
|
2147
2313
|
if (onFocusWithinChange) onFocusWithinChange(true);
|
|
2148
2314
|
state.current.isFocusWithin = true;
|
|
@@ -2152,9 +2318,10 @@ function $9ab94262bd0047c7$export$420e68273165f4ec(props) {
|
|
|
2152
2318
|
// can manually fire onBlur.
|
|
2153
2319
|
let currentTarget = e.currentTarget;
|
|
2154
2320
|
addGlobalListener(ownerDocument, 'focus', (e)=>{
|
|
2155
|
-
|
|
2321
|
+
let eventTarget = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
2322
|
+
if (state.current.isFocusWithin && !($d4ee10de306f2510$export$4282f70798064fe0)(currentTarget, eventTarget)) {
|
|
2156
2323
|
let nativeEvent = new ownerDocument.defaultView.FocusEvent('blur', {
|
|
2157
|
-
relatedTarget:
|
|
2324
|
+
relatedTarget: eventTarget
|
|
2158
2325
|
});
|
|
2159
2326
|
($8a9cb279dc87e130$export$c2b7abe5d61ec696)(nativeEvent, currentTarget);
|
|
2160
2327
|
let event = ($8a9cb279dc87e130$export$525bc4921d56d4a)(nativeEvent);
|
|
@@ -2248,7 +2415,7 @@ function $6179b936705e76d3$export$ae780daf29e6d456(props) {
|
|
|
2248
2415
|
let { hoverProps: hoverProps, triggerHoverEnd: triggerHoverEnd } = (useMemo)(()=>{
|
|
2249
2416
|
let triggerHoverStart = (event, pointerType)=>{
|
|
2250
2417
|
state.pointerType = pointerType;
|
|
2251
|
-
if (isDisabled || pointerType === 'touch' || state.isHovered || !event.currentTarget
|
|
2418
|
+
if (isDisabled || pointerType === 'touch' || state.isHovered || !($d4ee10de306f2510$export$4282f70798064fe0)(event.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(event))) return;
|
|
2252
2419
|
state.isHovered = true;
|
|
2253
2420
|
let target = event.currentTarget;
|
|
2254
2421
|
state.target = target;
|
|
@@ -2256,8 +2423,8 @@ function $6179b936705e76d3$export$ae780daf29e6d456(props) {
|
|
|
2256
2423
|
// even though the originally hovered target may have shrunk in size so it is no longer hovered.
|
|
2257
2424
|
// However, a pointerover event will be fired on the new target the mouse is over.
|
|
2258
2425
|
// In Chrome this happens immediately. In Safari and Firefox, it happens upon moving the mouse one pixel.
|
|
2259
|
-
addGlobalListener(($431fbd86ca7dc216$export$b204af158042fbac)(event
|
|
2260
|
-
if (state.isHovered && state.target && !($d4ee10de306f2510$export$4282f70798064fe0)(state.target, e
|
|
2426
|
+
addGlobalListener(($431fbd86ca7dc216$export$b204af158042fbac)(($d4ee10de306f2510$export$e58f029f0fbfdb29)(event)), 'pointerover', (e)=>{
|
|
2427
|
+
if (state.isHovered && state.target && !($d4ee10de306f2510$export$4282f70798064fe0)(state.target, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) triggerHoverEnd(e, e.pointerType);
|
|
2261
2428
|
}, {
|
|
2262
2429
|
capture: true
|
|
2263
2430
|
});
|
|
@@ -2291,7 +2458,7 @@ function $6179b936705e76d3$export$ae780daf29e6d456(props) {
|
|
|
2291
2458
|
triggerHoverStart(e, e.pointerType);
|
|
2292
2459
|
};
|
|
2293
2460
|
hoverProps.onPointerLeave = (e)=>{
|
|
2294
|
-
if (!isDisabled && e.currentTarget
|
|
2461
|
+
if (!isDisabled && ($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) triggerHoverEnd(e, e.pointerType);
|
|
2295
2462
|
};
|
|
2296
2463
|
} else if (process.env.NODE_ENV === 'test') {
|
|
2297
2464
|
hoverProps.onTouchStart = ()=>{
|
|
@@ -2302,7 +2469,7 @@ function $6179b936705e76d3$export$ae780daf29e6d456(props) {
|
|
|
2302
2469
|
state.ignoreEmulatedMouseEvents = false;
|
|
2303
2470
|
};
|
|
2304
2471
|
hoverProps.onMouseLeave = (e)=>{
|
|
2305
|
-
if (!isDisabled && e.currentTarget
|
|
2472
|
+
if (!isDisabled && ($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) triggerHoverEnd(e, 'mouse');
|
|
2306
2473
|
};
|
|
2307
2474
|
}
|
|
2308
2475
|
return {
|
|
@@ -2349,15 +2516,35 @@ function $6179b936705e76d3$export$ae780daf29e6d456(props) {
|
|
|
2349
2516
|
// It will throw an error during hydration when it expects the firstChild to contain content rendered
|
|
2350
2517
|
// on the server, when in reality, the browser will have placed this inside the `content` document fragment.
|
|
2351
2518
|
// This monkey patches the firstChild property for our special hidden template elements to work around this error.
|
|
2519
|
+
// does the same for appendChild/removeChild/insertBefore as per the issue below
|
|
2352
2520
|
// See https://github.com/facebook/react/issues/19932
|
|
2353
2521
|
if (typeof HTMLTemplateElement !== 'undefined') {
|
|
2354
|
-
const getFirstChild = Object.getOwnPropertyDescriptor(Node.prototype, 'firstChild').get;
|
|
2355
2522
|
Object.defineProperty(HTMLTemplateElement.prototype, 'firstChild', {
|
|
2356
2523
|
configurable: true,
|
|
2357
2524
|
enumerable: true,
|
|
2358
2525
|
get: function() {
|
|
2359
|
-
|
|
2360
|
-
|
|
2526
|
+
return this.content.firstChild;
|
|
2527
|
+
}
|
|
2528
|
+
});
|
|
2529
|
+
Object.defineProperty(HTMLTemplateElement.prototype, 'appendChild', {
|
|
2530
|
+
configurable: true,
|
|
2531
|
+
enumerable: true,
|
|
2532
|
+
value: function(node) {
|
|
2533
|
+
return this.content.appendChild(node);
|
|
2534
|
+
}
|
|
2535
|
+
});
|
|
2536
|
+
Object.defineProperty(HTMLTemplateElement.prototype, 'removeChild', {
|
|
2537
|
+
configurable: true,
|
|
2538
|
+
enumerable: true,
|
|
2539
|
+
value: function(node) {
|
|
2540
|
+
return this.content.removeChild(node);
|
|
2541
|
+
}
|
|
2542
|
+
});
|
|
2543
|
+
Object.defineProperty(HTMLTemplateElement.prototype, 'insertBefore', {
|
|
2544
|
+
configurable: true,
|
|
2545
|
+
enumerable: true,
|
|
2546
|
+
value: function(node, child) {
|
|
2547
|
+
return this.content.insertBefore(node, child);
|
|
2361
2548
|
}
|
|
2362
2549
|
});
|
|
2363
2550
|
}
|
|
@@ -2372,9 +2559,7 @@ function $f39a9eba43920ace$export$8dc98ba7eadeaa56(props) {
|
|
|
2372
2559
|
// In SSR, portals are not supported by React. Instead, always render into a <template>
|
|
2373
2560
|
// element, which the browser will never display to the user. In addition, the
|
|
2374
2561
|
// content is not part of the accessible DOM tree, so it won't affect ids or other accessibility attributes.
|
|
2375
|
-
return /*#__PURE__*/ (React__default).createElement("template",
|
|
2376
|
-
"data-react-aria-hidden": true
|
|
2377
|
-
}, children);
|
|
2562
|
+
return /*#__PURE__*/ (React__default).createElement("template", null, children);
|
|
2378
2563
|
}
|
|
2379
2564
|
function $f39a9eba43920ace$export$86427a43e3e48ebb(fn) {
|
|
2380
2565
|
let Wrapper = (props, ref)=>{
|
|
@@ -2405,7 +2590,8 @@ function $f39a9eba43920ace$export$b5d7cc18bb8d2b59() {
|
|
|
2405
2590
|
const $514c0188e459b4c0$export$9afb8bc826b033ea = /*#__PURE__*/ (createContext)({});
|
|
2406
2591
|
const $514c0188e459b4c0$export$5f1af8db9871e1d6 = /*#__PURE__*/ (forwardRef)(function Text(props, ref) {
|
|
2407
2592
|
[props, ref] = ($64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $514c0188e459b4c0$export$9afb8bc826b033ea);
|
|
2408
|
-
let { elementType:
|
|
2593
|
+
let { elementType: elementType = 'span', ...domProps } = props;
|
|
2594
|
+
let ElementType = ($64fa3d84918910a7$export$df3a06d6289f983e)[elementType];
|
|
2409
2595
|
// @ts-ignore
|
|
2410
2596
|
return /*#__PURE__*/ (React__default).createElement(ElementType, {
|
|
2411
2597
|
className: "react-aria-Text",
|
|
@@ -2414,4 +2600,4 @@ const $514c0188e459b4c0$export$5f1af8db9871e1d6 = /*#__PURE__*/ (forwardRef)(fun
|
|
|
2414
2600
|
});
|
|
2415
2601
|
});
|
|
2416
2602
|
|
|
2417
|
-
export { $8ae05eaa5c114e9c$export$7f54fc3180508a52 as $, $64fa3d84918910a7$export$
|
|
2603
|
+
export { $8ae05eaa5c114e9c$export$7f54fc3180508a52 as $, $64fa3d84918910a7$export$29f1550f4b0d4415 as A, $64fa3d84918910a7$export$df3a06d6289f983e as B, $64fa3d84918910a7$export$4d86445c2cf5e3 as C, $514c0188e459b4c0$export$5f1af8db9871e1d6 as D, $6179b936705e76d3$export$ae780daf29e6d456 as E, $64fa3d84918910a7$export$fabf2dc03a41866e as F, $64fa3d84918910a7$export$9d4c57ee4c6ffdd8 as G, $64fa3d84918910a7$export$ef03459518577ad4 as H, $64fa3d84918910a7$export$2881499e37b75b9a as I, $514c0188e459b4c0$export$9afb8bc826b033ea as J, $f4e2df6bd15f8569$export$98658e8c59125e6a as K, $d4ee10de306f2510$export$4282f70798064fe0 as L, $c87311424ea30a05$export$9ac100e40613ea10 as M, $c87311424ea30a05$export$6446a186d09e379e as N, $c87311424ea30a05$export$78551043582a6a98 as O, $d4ee10de306f2510$export$b4f377a2b6254582 as P, $431fbd86ca7dc216$export$b204af158042fbac as Q, $bbed8b41f857bcc0$export$24490316f764c430 as R, $8a9cb279dc87e130$export$c2b7abe5d61ec696 as S, $8a9cb279dc87e130$export$525bc4921d56d4a as T, $431fbd86ca7dc216$export$f21a1ffae260145a as U, $6a7db85432448f7f$export$29bf1b5f2c56cf63 as V, $8a9cb279dc87e130$export$cabe61c495ee3649 as W, $6a7db85432448f7f$export$60278871457622de as X, $e7801be82b4b2a53$export$4debdb1a3f0fa79e as Y, $ea8dcbcb9ea1b556$export$95185d699e05d4d7 as Z, $7215afc6de606d6b$export$de79e2c695e052f3 as _, $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 as a, $df56164dff5785e2$export$4338b53315abf666 as a0, $b4b717babfbb907b$export$4c063cf1350e6fed as a1, $5dc95899b306f630$export$c9058316764c140e as a2, $b4b717babfbb907b$export$bebd5a1431fec25d as a3, $3ad3f6e1647bc98d$export$80f3e147d781571c as a4, $507fabe10e71c6fb$export$630ff653c5ada6a9 as a5, $b5e257d569688ac6$export$535bd6ca7f90a273 as a6, $c87311424ea30a05$export$e1865c3bedcd822b as a7, $ea8dcbcb9ea1b556$export$9a302a45f65d0572 as a8, $46d819fcbaf35654$export$8f71654801c2f7cd as a9, $ea8dcbcb9ea1b556$export$7e924b3091a3bd18 as aa, $ea8dcbcb9ea1b556$export$13aea1a3cb5e3f1f as ab, $f39a9eba43920ace$export$8dc98ba7eadeaa56 as ac, $f645667febf57a63$export$f9762fab77588ecb as ad, $f39a9eba43920ace$export$b5d7cc18bb8d2b59 as ae, $64fa3d84918910a7$export$c62b8e45d58ddad9 as af, $e9faafb641e167db$export$90fc3a17d93f704c as b, $507fabe10e71c6fb$export$b9b3dfddab17db27 as c, $507fabe10e71c6fb$export$ec71b4b83ac08ec3 as d, $a1ea59d68270f0dd$export$f8168d8dd8fd66e6 as e, $9ab94262bd0047c7$export$420e68273165f4ec as f, $bdb11010cef70236$export$f680877a34711e37 as g, $313b98861ee5dd6c$export$d6875122194c7b44 as h, $bdb11010cef70236$export$b4cc09c592e8fdb8 as i, $3ef42575df84b30b$export$9d1611c77c2fe928 as j, $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c as k, $507fabe10e71c6fb$export$8397ddfc504fdb9a as l, $d4ee10de306f2510$export$e58f029f0fbfdb29 as m, $458b0a5536c1a7cf$export$40bfa8c7b0832715 as n, $f645667febf57a63$export$4c014de7c8940b4c as o, $65484d02dcb7eb3e$export$457c3d6518dd4c6f as p, $9446cca9a3875146$export$cb6e0bb50bc19463 as q, $9446cca9a3875146$export$7d15b64cf5a3a4c4 as r, $fca6afa0e843324b$export$f12b703ca79dfbb1 as s, $03deb23ff14920c4$export$4eaf04e54aa8eed6 as t, $c87311424ea30a05$export$186c6964ca17d99 as u, $c87311424ea30a05$export$a11b0059900ceec8 as v, $ff5963eb1fccf552$export$e08e3b67e392101e as w, $c87311424ea30a05$export$fedb369cb70207f1 as x, $d4ee10de306f2510$export$cd4e5573fbe2b576 as y, $f39a9eba43920ace$export$86427a43e3e48ebb as z };
|