@jobber/components 7.1.2-MIKElock--7916eb4.2 → 7.2.0
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/index.cjs +2 -2
- package/dist/Autocomplete/index.mjs +5 -5
- 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/Chip.d.ts +7 -1
- package/dist/Chip/Chip.types.d.ts +7 -2
- package/dist/Chip/index.cjs +1 -1
- package/dist/Chip/index.mjs +2 -2
- package/dist/Chip-cjs.js +42 -27
- package/dist/Chip-es.js +42 -27
- package/dist/ChipDismissible-es.js +1 -1
- package/dist/Chips/InternalChipDismissible/hooks/index.mjs +1 -1
- package/dist/Combobox/components/ComboboxTrigger/index.cjs +1 -1
- package/dist/Combobox/components/ComboboxTrigger/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 +3 -7
- package/dist/Countdown-es.js +4 -8
- 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 +1 -0
- package/dist/DataList.const-es.js +2 -1
- 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/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 +81 -266
- package/dist/DatePicker-es.js +83 -268
- 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 +48 -10
- package/dist/DrawerRoot-es.js +50 -12
- 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 +6 -1
- package/dist/FormatFile-es.js +6 -1
- 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 +3 -8
- package/dist/InputFile-es.js +3 -8
- package/dist/InputNumber/index.cjs +59 -165
- package/dist/InputNumber/index.mjs +62 -168
- 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 +70 -2
- package/dist/InputText/index.mjs +1 -1
- package/dist/InputTime/index.cjs +1 -0
- package/dist/InputTime/index.mjs +2 -1
- package/dist/InputValidation-cjs.js +1 -1
- package/dist/InputValidation-es.js +1 -1
- package/dist/InternalChipDismissible-cjs.js +2 -2
- package/dist/InternalChipDismissible-es.js +3 -3
- 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 +392 -466
- package/dist/Markdown-es.js +398 -472
- package/dist/Menu-cjs.js +577 -739
- package/dist/Menu-es.js +573 -735
- package/dist/Modal/index.cjs +2 -2
- package/dist/Modal/index.mjs +2 -2
- 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 +0 -1
- package/dist/RecurringSelect/index.mjs +0 -1
- 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 +164 -298
- package/dist/Text-es2.js +164 -295
- 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 +8 -2
- package/dist/_getAllKeys-es.js +10 -4
- 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/docs/Autocomplete/AutocompleteV1.md +1 -1
- package/dist/docs/Autocomplete/AutocompleteV2.md +1 -1
- package/dist/docs/Banner/Banner.md +1 -1
- package/dist/docs/Chip/Chip.md +4 -2
- package/dist/docs/DataList/DataList.md +1 -1
- package/dist/docs/FormField/FormField.md +2 -2
- package/dist/docs/InputEmail/InputEmail.md +1 -1
- package/dist/docs/InputNumber/InputNumber.md +2 -2
- package/dist/docs/InputPhoneNumber/InputPhoneNumber.md +1 -1
- package/dist/docs/InputText/InputText.md +2 -2
- package/dist/docs/Modal/Modal.md +3 -3
- package/dist/docs/Select/Select.md +2 -2
- package/dist/floating-ui.react-cjs.js +16 -35
- package/dist/floating-ui.react-dom-es.js +2 -2
- package/dist/floating-ui.react-es.js +18 -37
- 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 +5 -37
- package/dist/omit-es.js +14 -46
- package/dist/showToast-cjs.js +1 -1
- package/dist/showToast-es.js +1 -1
- package/dist/styles.css +117 -54
- package/dist/unstyledPrimitives/index.mjs +3 -3
- package/dist/useScrollToActive-cjs.js +1 -1
- package/dist/useScrollToActive-es.js +8 -8
- package/package.json +3 -4
package/dist/Text-es2.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React__default, {
|
|
1
|
+
import React__default, { useRef, useCallback, useState, useContext, useEffect, useMemo, forwardRef, createContext } from 'react';
|
|
2
2
|
import { c as clsx } from './clsx-es.js';
|
|
3
3
|
|
|
4
4
|
/*
|
|
@@ -14,6 +14,36 @@ 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
|
+
|
|
17
47
|
/*
|
|
18
48
|
* Copyright 2020 Adobe. All rights reserved.
|
|
19
49
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -28,13 +58,10 @@ const $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = typeof document !== 'undefined
|
|
|
28
58
|
|
|
29
59
|
function $1dbecbe27a04f9af$export$14d238f342723f25(defaultValue) {
|
|
30
60
|
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);
|
|
34
61
|
let effect = (useRef)(null);
|
|
35
62
|
// Store the function in a ref so we can always access the current version
|
|
36
63
|
// which has the proper `value` in scope.
|
|
37
|
-
let nextRef = (
|
|
64
|
+
let nextRef = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(()=>{
|
|
38
65
|
if (!effect.current) return;
|
|
39
66
|
// Run the generator to the next yield.
|
|
40
67
|
let newValue = effect.current.next();
|
|
@@ -46,20 +73,17 @@ function $1dbecbe27a04f9af$export$14d238f342723f25(defaultValue) {
|
|
|
46
73
|
// If the value is the same as the current value,
|
|
47
74
|
// then continue to the next yield. Otherwise,
|
|
48
75
|
// set the value in state and wait for the next layout effect.
|
|
49
|
-
if (
|
|
76
|
+
if (value === newValue.value) nextRef();
|
|
50
77
|
else setValue(newValue.value);
|
|
51
78
|
});
|
|
52
79
|
($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
|
|
53
|
-
currValue.current = value;
|
|
54
80
|
// If there is an effect currently running, continue to the next yield.
|
|
55
|
-
if (effect.current) nextRef
|
|
81
|
+
if (effect.current) nextRef();
|
|
82
|
+
});
|
|
83
|
+
let queue = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)((fn)=>{
|
|
84
|
+
effect.current = fn(value);
|
|
85
|
+
nextRef();
|
|
56
86
|
});
|
|
57
|
-
let queue = (useCallback)((fn)=>{
|
|
58
|
-
effect.current = fn(currValue.current);
|
|
59
|
-
nextRef.current();
|
|
60
|
-
}, [
|
|
61
|
-
nextRef
|
|
62
|
-
]);
|
|
63
87
|
return [
|
|
64
88
|
value,
|
|
65
89
|
queue
|
|
@@ -300,7 +324,7 @@ function $f4e2df6bd15f8569$export$98658e8c59125e6a() {
|
|
|
300
324
|
}
|
|
301
325
|
|
|
302
326
|
// Source: https://github.com/microsoft/tabster/blob/a89fc5d7e332d48f68d03b1ca6e344489d1c3898/src/Shadowdomize/DOMFunctions.ts#L16
|
|
303
|
-
|
|
327
|
+
|
|
304
328
|
|
|
305
329
|
function $d4ee10de306f2510$export$4282f70798064fe0(node, otherNode) {
|
|
306
330
|
if (!($f4e2df6bd15f8569$export$98658e8c59125e6a)()) return otherNode && node ? node.contains(otherNode) : false;
|
|
@@ -324,55 +348,11 @@ const $d4ee10de306f2510$export$cd4e5573fbe2b576 = (doc = document)=>{
|
|
|
324
348
|
return activeElement;
|
|
325
349
|
};
|
|
326
350
|
function $d4ee10de306f2510$export$e58f029f0fbfdb29(event) {
|
|
327
|
-
if (($f4e2df6bd15f8569$export$98658e8c59125e6a)() && event.target
|
|
328
|
-
|
|
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;
|
|
351
|
+
if (($f4e2df6bd15f8569$export$98658e8c59125e6a)() && event.target.shadowRoot) {
|
|
352
|
+
if (event.composedPath) return event.composedPath()[0];
|
|
331
353
|
}
|
|
332
354
|
return event.target;
|
|
333
355
|
}
|
|
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
|
-
}
|
|
376
356
|
|
|
377
357
|
/*
|
|
378
358
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -387,7 +367,6 @@ function $5dc95899b306f630$var$setRef(ref, value) {
|
|
|
387
367
|
*/
|
|
388
368
|
|
|
389
369
|
|
|
390
|
-
|
|
391
370
|
function $3ef42575df84b30b$export$9d1611c77c2fe928(...args) {
|
|
392
371
|
// Start with a base clone of the first argument. This is a lot faster than starting
|
|
393
372
|
// with an empty object and adding properties as we go.
|
|
@@ -404,13 +383,44 @@ function $3ef42575df84b30b$export$9d1611c77c2fe928(...args) {
|
|
|
404
383
|
key[0] === 'o' && key[1] === 'n' && key.charCodeAt(2) >= /* 'A' */ 65 && key.charCodeAt(2) <= /* 'Z' */ 90) result[key] = ($ff5963eb1fccf552$export$e08e3b67e392101e)(a, b);
|
|
405
384
|
else if ((key === 'className' || key === 'UNSAFE_className') && typeof a === 'string' && typeof b === 'string') result[key] = (clsx)(a, b);
|
|
406
385
|
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);
|
|
408
386
|
else result[key] = b !== undefined ? b : a;
|
|
409
387
|
}
|
|
410
388
|
}
|
|
411
389
|
return result;
|
|
412
390
|
}
|
|
413
391
|
|
|
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
|
+
|
|
414
424
|
/*
|
|
415
425
|
* Copyright 2020 Adobe. All rights reserved.
|
|
416
426
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -487,7 +497,7 @@ const $65484d02dcb7eb3e$var$propRe = /^(data-.*)$/;
|
|
|
487
497
|
function $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, opts = {}) {
|
|
488
498
|
let { labelable: labelable, isLink: isLink, global: global, events: events = global, propNames: propNames } = opts;
|
|
489
499
|
let filteredProps = {};
|
|
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 &&
|
|
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];
|
|
491
501
|
return filteredProps;
|
|
492
502
|
}
|
|
493
503
|
|
|
@@ -612,110 +622,6 @@ const $c87311424ea30a05$export$b7d78993b74f766d = $c87311424ea30a05$var$cached(f
|
|
|
612
622
|
return $c87311424ea30a05$var$testUserAgent(/Firefox/i);
|
|
613
623
|
});
|
|
614
624
|
|
|
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
|
-
|
|
719
625
|
/*
|
|
720
626
|
* Copyright 2020 Adobe. All rights reserved.
|
|
721
627
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -732,7 +638,6 @@ function $ea8dcbcb9ea1b556$export$13aea1a3cb5e3f1f(e, router, href, routerOption
|
|
|
732
638
|
// bugs, e.g. Chrome sometimes fires both transitionend and transitioncancel rather
|
|
733
639
|
// than one or the other. So we need to track what's actually transitioning so that
|
|
734
640
|
// we can ignore these duplicate events.
|
|
735
|
-
|
|
736
641
|
let $bbed8b41f857bcc0$var$transitionsByElement = new Map();
|
|
737
642
|
// A list of callbacks to call once there are no transitioning elements.
|
|
738
643
|
let $bbed8b41f857bcc0$var$transitionCallbacks = new Set();
|
|
@@ -742,33 +647,31 @@ function $bbed8b41f857bcc0$var$setupGlobalEvents() {
|
|
|
742
647
|
return 'propertyName' in event;
|
|
743
648
|
}
|
|
744
649
|
let onTransitionStart = (e)=>{
|
|
745
|
-
|
|
746
|
-
if (!isTransitionEvent(e) || !eventTarget) return;
|
|
650
|
+
if (!isTransitionEvent(e) || !e.target) return;
|
|
747
651
|
// Add the transitioning property to the list for this element.
|
|
748
|
-
let transitions = $bbed8b41f857bcc0$var$transitionsByElement.get(
|
|
652
|
+
let transitions = $bbed8b41f857bcc0$var$transitionsByElement.get(e.target);
|
|
749
653
|
if (!transitions) {
|
|
750
654
|
transitions = new Set();
|
|
751
|
-
$bbed8b41f857bcc0$var$transitionsByElement.set(
|
|
655
|
+
$bbed8b41f857bcc0$var$transitionsByElement.set(e.target, transitions);
|
|
752
656
|
// The transitioncancel event must be registered on the element itself, rather than as a global
|
|
753
657
|
// event. This enables us to handle when the node is deleted from the document while it is transitioning.
|
|
754
658
|
// In that case, the cancel event would have nowhere to bubble to so we need to handle it directly.
|
|
755
|
-
|
|
659
|
+
e.target.addEventListener('transitioncancel', onTransitionEnd, {
|
|
756
660
|
once: true
|
|
757
661
|
});
|
|
758
662
|
}
|
|
759
663
|
transitions.add(e.propertyName);
|
|
760
664
|
};
|
|
761
665
|
let onTransitionEnd = (e)=>{
|
|
762
|
-
|
|
763
|
-
if (!isTransitionEvent(e) || !eventTarget) return;
|
|
666
|
+
if (!isTransitionEvent(e) || !e.target) return;
|
|
764
667
|
// Remove property from list of transitioning properties.
|
|
765
|
-
let properties = $bbed8b41f857bcc0$var$transitionsByElement.get(
|
|
668
|
+
let properties = $bbed8b41f857bcc0$var$transitionsByElement.get(e.target);
|
|
766
669
|
if (!properties) return;
|
|
767
670
|
properties.delete(e.propertyName);
|
|
768
671
|
// If empty, remove transitioncancel event, and remove the element from the list of transitioning elements.
|
|
769
672
|
if (properties.size === 0) {
|
|
770
|
-
|
|
771
|
-
$bbed8b41f857bcc0$var$transitionsByElement.delete(
|
|
673
|
+
e.target.removeEventListener('transitioncancel', onTransitionEnd);
|
|
674
|
+
$bbed8b41f857bcc0$var$transitionsByElement.delete(e.target);
|
|
772
675
|
}
|
|
773
676
|
// If no transitioning elements, call all of the queued callbacks.
|
|
774
677
|
if ($bbed8b41f857bcc0$var$transitionsByElement.size === 0) {
|
|
@@ -937,36 +840,6 @@ function $df56164dff5785e2$export$4338b53315abf666(ref) {
|
|
|
937
840
|
]);
|
|
938
841
|
}
|
|
939
842
|
|
|
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
|
-
|
|
970
843
|
/*
|
|
971
844
|
* Copyright 2020 Adobe. All rights reserved.
|
|
972
845
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -1015,7 +888,8 @@ function $e9faafb641e167db$export$90fc3a17d93f704c(ref, event, handler, options)
|
|
|
1015
888
|
ref,
|
|
1016
889
|
event,
|
|
1017
890
|
options,
|
|
1018
|
-
isDisabled
|
|
891
|
+
isDisabled,
|
|
892
|
+
handleEvent
|
|
1019
893
|
]);
|
|
1020
894
|
}
|
|
1021
895
|
|
|
@@ -1078,9 +952,7 @@ function $7d2416ea0959daaa$var$isAttributeVisible(element, childElement) {
|
|
|
1078
952
|
!element.hasAttribute('data-react-aria-prevent-focus') && (element.nodeName === 'DETAILS' && childElement && childElement.nodeName !== 'SUMMARY' ? element.hasAttribute('open') : true);
|
|
1079
953
|
}
|
|
1080
954
|
function $7d2416ea0959daaa$export$e989c0fffaa6b27a(element, childElement) {
|
|
1081
|
-
if ($7d2416ea0959daaa$var$supportsCheckVisibility) return element.checkVisibility(
|
|
1082
|
-
visibilityProperty: true
|
|
1083
|
-
}) && !element.closest('[data-react-aria-prevent-focus]');
|
|
955
|
+
if ($7d2416ea0959daaa$var$supportsCheckVisibility) return element.checkVisibility() && !element.closest('[data-react-aria-prevent-focus]');
|
|
1084
956
|
return element.nodeName !== '#comment' && $7d2416ea0959daaa$var$isStyleVisible(element) && $7d2416ea0959daaa$var$isAttributeVisible(element, childElement) && (!element.parentElement || $7d2416ea0959daaa$export$e989c0fffaa6b27a(element.parentElement, element));
|
|
1085
957
|
}
|
|
1086
958
|
|
|
@@ -1140,14 +1012,8 @@ function $b4b717babfbb907b$var$isInert(element) {
|
|
|
1140
1012
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
1141
1013
|
* governing permissions and limitations under the License.
|
|
1142
1014
|
*/
|
|
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 : ()=>{};
|
|
1146
1015
|
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.
|
|
1149
1016
|
let [stateValue, setStateValue] = (useState)(value || defaultValue);
|
|
1150
|
-
let valueRef = (useRef)(stateValue);
|
|
1151
1017
|
let isControlledRef = (useRef)(value !== undefined);
|
|
1152
1018
|
let isControlled = value !== undefined;
|
|
1153
1019
|
(useEffect)(()=>{
|
|
@@ -1157,28 +1023,40 @@ function $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange
|
|
|
1157
1023
|
}, [
|
|
1158
1024
|
isControlled
|
|
1159
1025
|
]);
|
|
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.
|
|
1163
1026
|
let currentValue = isControlled ? value : stateValue;
|
|
1164
|
-
$458b0a5536c1a7cf$var$useEarlyEffect(()=>{
|
|
1165
|
-
valueRef.current = currentValue;
|
|
1166
|
-
});
|
|
1167
|
-
let [, forceUpdate] = (useReducer)(()=>({}), {});
|
|
1168
1027
|
let setValue = (useCallback)((value, ...args)=>{
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
//
|
|
1176
|
-
|
|
1177
|
-
//
|
|
1178
|
-
|
|
1179
|
-
|
|
1028
|
+
let onChangeCaller = (value, ...onChangeArgs)=>{
|
|
1029
|
+
if (onChange) {
|
|
1030
|
+
if (!Object.is(currentValue, value)) onChange(value, ...onChangeArgs);
|
|
1031
|
+
}
|
|
1032
|
+
if (!isControlled) // If uncontrolled, mutate the currentValue local variable so that
|
|
1033
|
+
// calling setState multiple times with the same value only emits onChange once.
|
|
1034
|
+
// We do not use a ref for this because we specifically _do_ want the value to
|
|
1035
|
+
// reset every render, and assigning to a ref in render breaks aborted suspended renders.
|
|
1036
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1037
|
+
currentValue = value;
|
|
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);
|
|
1180
1056
|
}
|
|
1181
1057
|
}, [
|
|
1058
|
+
isControlled,
|
|
1059
|
+
currentValue,
|
|
1182
1060
|
onChange
|
|
1183
1061
|
]);
|
|
1184
1062
|
return [
|
|
@@ -1486,13 +1364,10 @@ function $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a() {
|
|
|
1486
1364
|
}, []);
|
|
1487
1365
|
// We cannot determine the browser's language on the server, so default to
|
|
1488
1366
|
// en-US. This will be updated after hydration on the client to the correct value.
|
|
1489
|
-
if (isSSR) {
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
direction: 'ltr'
|
|
1494
|
-
};
|
|
1495
|
-
}
|
|
1367
|
+
if (isSSR) return {
|
|
1368
|
+
locale: 'en-US',
|
|
1369
|
+
direction: 'ltr'
|
|
1370
|
+
};
|
|
1496
1371
|
return defaultLocale;
|
|
1497
1372
|
}
|
|
1498
1373
|
|
|
@@ -1717,22 +1592,24 @@ function $8a9cb279dc87e130$export$715c682d09d639cc(onBlur) {
|
|
|
1717
1592
|
}
|
|
1718
1593
|
};
|
|
1719
1594
|
}, []);
|
|
1595
|
+
let dispatchBlur = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)((e)=>{
|
|
1596
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
|
|
1597
|
+
});
|
|
1720
1598
|
// This function is called during a React onFocus event.
|
|
1721
1599
|
return (useCallback)((e)=>{
|
|
1722
1600
|
// React does not fire onBlur when an element is disabled. https://github.com/facebook/react/issues/9142
|
|
1723
1601
|
// Most browsers fire a native focusout event in this case, except for Firefox. In that case, we use a
|
|
1724
1602
|
// MutationObserver to watch for the disabled attribute, and dispatch these events ourselves.
|
|
1725
1603
|
// For browsers that do, focusout fires before the MutationObserver, so onBlur should not fire twice.
|
|
1726
|
-
|
|
1727
|
-
if (eventTarget instanceof HTMLButtonElement || eventTarget instanceof HTMLInputElement || eventTarget instanceof HTMLTextAreaElement || eventTarget instanceof HTMLSelectElement) {
|
|
1604
|
+
if (e.target instanceof HTMLButtonElement || e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement || e.target instanceof HTMLSelectElement) {
|
|
1728
1605
|
stateRef.current.isFocused = true;
|
|
1729
|
-
let target =
|
|
1606
|
+
let target = e.target;
|
|
1730
1607
|
let onBlurHandler = (e)=>{
|
|
1731
1608
|
stateRef.current.isFocused = false;
|
|
1732
1609
|
if (target.disabled) {
|
|
1733
1610
|
// For backward compatibility, dispatch a (fake) React synthetic event.
|
|
1734
1611
|
let event = $8a9cb279dc87e130$export$525bc4921d56d4a(e);
|
|
1735
|
-
|
|
1612
|
+
dispatchBlur(event);
|
|
1736
1613
|
}
|
|
1737
1614
|
// We no longer need the MutationObserver once the target is blurred.
|
|
1738
1615
|
if (stateRef.current.observer) {
|
|
@@ -1747,7 +1624,7 @@ function $8a9cb279dc87e130$export$715c682d09d639cc(onBlur) {
|
|
|
1747
1624
|
if (stateRef.current.isFocused && target.disabled) {
|
|
1748
1625
|
var _stateRef_current_observer;
|
|
1749
1626
|
(_stateRef_current_observer = stateRef.current.observer) === null || _stateRef_current_observer === void 0 ? void 0 : _stateRef_current_observer.disconnect();
|
|
1750
|
-
let relatedTargetEl = target ===
|
|
1627
|
+
let relatedTargetEl = target === document.activeElement ? null : document.activeElement;
|
|
1751
1628
|
target.dispatchEvent(new FocusEvent('blur', {
|
|
1752
1629
|
relatedTarget: relatedTargetEl
|
|
1753
1630
|
}));
|
|
@@ -1765,7 +1642,7 @@ function $8a9cb279dc87e130$export$715c682d09d639cc(onBlur) {
|
|
|
1765
1642
|
});
|
|
1766
1643
|
}
|
|
1767
1644
|
}, [
|
|
1768
|
-
|
|
1645
|
+
dispatchBlur
|
|
1769
1646
|
]);
|
|
1770
1647
|
}
|
|
1771
1648
|
let $8a9cb279dc87e130$export$fda7da73ab5d4c48 = false;
|
|
@@ -1778,10 +1655,10 @@ function $8a9cb279dc87e130$export$cabe61c495ee3649(target) {
|
|
|
1778
1655
|
$8a9cb279dc87e130$export$fda7da73ab5d4c48 = true;
|
|
1779
1656
|
let isRefocusing = false;
|
|
1780
1657
|
let onBlur = (e)=>{
|
|
1781
|
-
if (
|
|
1658
|
+
if (e.target === activeElement || isRefocusing) e.stopImmediatePropagation();
|
|
1782
1659
|
};
|
|
1783
1660
|
let onFocusOut = (e)=>{
|
|
1784
|
-
if (
|
|
1661
|
+
if (e.target === activeElement || isRefocusing) {
|
|
1785
1662
|
e.stopImmediatePropagation();
|
|
1786
1663
|
// If there was no focusable ancestor, we don't expect a focus event.
|
|
1787
1664
|
// Re-focus the original active element here.
|
|
@@ -1793,10 +1670,10 @@ function $8a9cb279dc87e130$export$cabe61c495ee3649(target) {
|
|
|
1793
1670
|
}
|
|
1794
1671
|
};
|
|
1795
1672
|
let onFocus = (e)=>{
|
|
1796
|
-
if (
|
|
1673
|
+
if (e.target === target || isRefocusing) e.stopImmediatePropagation();
|
|
1797
1674
|
};
|
|
1798
1675
|
let onFocusIn = (e)=>{
|
|
1799
|
-
if (
|
|
1676
|
+
if (e.target === target || isRefocusing) {
|
|
1800
1677
|
e.stopImmediatePropagation();
|
|
1801
1678
|
if (!isRefocusing) {
|
|
1802
1679
|
isRefocusing = true;
|
|
@@ -1841,7 +1718,7 @@ function $8a9cb279dc87e130$export$cabe61c495ee3649(target) {
|
|
|
1841
1718
|
|
|
1842
1719
|
|
|
1843
1720
|
let $507fabe10e71c6fb$var$currentModality = null;
|
|
1844
|
-
|
|
1721
|
+
let $507fabe10e71c6fb$var$changeHandlers = new Set();
|
|
1845
1722
|
let $507fabe10e71c6fb$export$d90243b58daecda7 = new Map(); // We use a map here to support setting event listeners across multiple document objects.
|
|
1846
1723
|
let $507fabe10e71c6fb$var$hasEventBeforeFocus = false;
|
|
1847
1724
|
let $507fabe10e71c6fb$var$hasBlurredWindowRecently = false;
|
|
@@ -1851,7 +1728,7 @@ const $507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS = {
|
|
|
1851
1728
|
Escape: true
|
|
1852
1729
|
};
|
|
1853
1730
|
function $507fabe10e71c6fb$var$triggerChangeHandlers(modality, e) {
|
|
1854
|
-
for (let handler of $507fabe10e71c6fb$
|
|
1731
|
+
for (let handler of $507fabe10e71c6fb$var$changeHandlers)handler(modality, e);
|
|
1855
1732
|
}
|
|
1856
1733
|
/**
|
|
1857
1734
|
* Helper function to determine if a KeyboardEvent is unmodified and could make keyboard focus styles visible.
|
|
@@ -1861,21 +1738,20 @@ function $507fabe10e71c6fb$var$triggerChangeHandlers(modality, e) {
|
|
|
1861
1738
|
}
|
|
1862
1739
|
function $507fabe10e71c6fb$var$handleKeyboardEvent(e) {
|
|
1863
1740
|
$507fabe10e71c6fb$var$hasEventBeforeFocus = true;
|
|
1864
|
-
if (
|
|
1741
|
+
if ($507fabe10e71c6fb$var$isValidKey(e)) {
|
|
1865
1742
|
$507fabe10e71c6fb$var$currentModality = 'keyboard';
|
|
1866
1743
|
$507fabe10e71c6fb$var$triggerChangeHandlers('keyboard', e);
|
|
1867
1744
|
}
|
|
1868
1745
|
}
|
|
1869
1746
|
function $507fabe10e71c6fb$var$handlePointerEvent(e) {
|
|
1870
1747
|
$507fabe10e71c6fb$var$currentModality = 'pointer';
|
|
1871
|
-
'pointerType' in e ? e.pointerType : 'mouse';
|
|
1872
1748
|
if (e.type === 'mousedown' || e.type === 'pointerdown') {
|
|
1873
1749
|
$507fabe10e71c6fb$var$hasEventBeforeFocus = true;
|
|
1874
1750
|
$507fabe10e71c6fb$var$triggerChangeHandlers('pointer', e);
|
|
1875
1751
|
}
|
|
1876
1752
|
}
|
|
1877
1753
|
function $507fabe10e71c6fb$var$handleClickEvent(e) {
|
|
1878
|
-
if (
|
|
1754
|
+
if (($6a7db85432448f7f$export$60278871457622de)(e)) {
|
|
1879
1755
|
$507fabe10e71c6fb$var$hasEventBeforeFocus = true;
|
|
1880
1756
|
$507fabe10e71c6fb$var$currentModality = 'virtual';
|
|
1881
1757
|
}
|
|
@@ -1884,7 +1760,7 @@ function $507fabe10e71c6fb$var$handleFocusEvent(e) {
|
|
|
1884
1760
|
// Firefox fires two extra focus events when the user first clicks into an iframe:
|
|
1885
1761
|
// first on the window, then on the document. We ignore these events so they don't
|
|
1886
1762
|
// cause keyboard focus rings to appear.
|
|
1887
|
-
if (
|
|
1763
|
+
if (e.target === window || e.target === document || ($8a9cb279dc87e130$export$fda7da73ab5d4c48) || !e.isTrusted) return;
|
|
1888
1764
|
// If a focus event occurs without a preceding keyboard or pointer event, switch to virtual modality.
|
|
1889
1765
|
// This occurs, for example, when navigating a form with the next/previous buttons on iOS.
|
|
1890
1766
|
if (!$507fabe10e71c6fb$var$hasEventBeforeFocus && !$507fabe10e71c6fb$var$hasBlurredWindowRecently) {
|
|
@@ -2004,30 +1880,27 @@ const $507fabe10e71c6fb$var$nonTextInputTypes = new Set([
|
|
|
2004
1880
|
* If this is attached to text input component, return if the event is a focus event (Tab/Escape keys pressed) so that
|
|
2005
1881
|
* focus visible style can be properly set.
|
|
2006
1882
|
*/ function $507fabe10e71c6fb$var$isKeyboardFocusEvent(isTextInput, modality, e) {
|
|
2007
|
-
let document1 = ($431fbd86ca7dc216$export$b204af158042fbac)(e
|
|
2008
|
-
|
|
2009
|
-
const
|
|
2010
|
-
const
|
|
2011
|
-
const
|
|
2012
|
-
const IKeyboardEvent = typeof window !== 'undefined' ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(eventTarget).KeyboardEvent : KeyboardEvent;
|
|
1883
|
+
let document1 = ($431fbd86ca7dc216$export$b204af158042fbac)(e === null || e === void 0 ? void 0 : e.target);
|
|
1884
|
+
const IHTMLInputElement = typeof window !== 'undefined' ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(e === null || e === void 0 ? void 0 : e.target).HTMLInputElement : HTMLInputElement;
|
|
1885
|
+
const IHTMLTextAreaElement = typeof window !== 'undefined' ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(e === null || e === void 0 ? void 0 : e.target).HTMLTextAreaElement : HTMLTextAreaElement;
|
|
1886
|
+
const IHTMLElement = typeof window !== 'undefined' ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(e === null || e === void 0 ? void 0 : e.target).HTMLElement : HTMLElement;
|
|
1887
|
+
const IKeyboardEvent = typeof window !== 'undefined' ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(e === null || e === void 0 ? void 0 : e.target).KeyboardEvent : KeyboardEvent;
|
|
2013
1888
|
// 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)
|
|
2014
1889
|
// we need to rely on the user passing isTextInput into here. This way we can skip toggling focus visiblity for said input element
|
|
2015
|
-
|
|
2016
|
-
isTextInput = isTextInput || activeElement instanceof IHTMLInputElement && !$507fabe10e71c6fb$var$nonTextInputTypes.has(activeElement.type) || activeElement instanceof IHTMLTextAreaElement || activeElement instanceof IHTMLElement && activeElement.isContentEditable;
|
|
1890
|
+
isTextInput = isTextInput || document1.activeElement instanceof IHTMLInputElement && !$507fabe10e71c6fb$var$nonTextInputTypes.has(document1.activeElement.type) || document1.activeElement instanceof IHTMLTextAreaElement || document1.activeElement instanceof IHTMLElement && document1.activeElement.isContentEditable;
|
|
2017
1891
|
return !(isTextInput && modality === 'keyboard' && e instanceof IKeyboardEvent && !$507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS[e.key]);
|
|
2018
1892
|
}
|
|
2019
1893
|
function $507fabe10e71c6fb$export$ec71b4b83ac08ec3(fn, deps, opts) {
|
|
2020
1894
|
$507fabe10e71c6fb$var$setupGlobalFocusEvents();
|
|
2021
1895
|
(useEffect)(()=>{
|
|
2022
|
-
if ((opts === null || opts === void 0 ? void 0 : opts.enabled) === false) return;
|
|
2023
1896
|
let handler = (modality, e)=>{
|
|
2024
1897
|
// We want to early return for any keyboard events that occur inside text inputs EXCEPT for Tab and Escape
|
|
2025
1898
|
if (!$507fabe10e71c6fb$var$isKeyboardFocusEvent(!!(opts === null || opts === void 0 ? void 0 : opts.isTextInput), modality, e)) return;
|
|
2026
1899
|
fn($507fabe10e71c6fb$export$b9b3dfddab17db27());
|
|
2027
1900
|
};
|
|
2028
|
-
$507fabe10e71c6fb$
|
|
1901
|
+
$507fabe10e71c6fb$var$changeHandlers.add(handler);
|
|
2029
1902
|
return ()=>{
|
|
2030
|
-
$507fabe10e71c6fb$
|
|
1903
|
+
$507fabe10e71c6fb$var$changeHandlers.delete(handler);
|
|
2031
1904
|
};
|
|
2032
1905
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2033
1906
|
}, deps);
|
|
@@ -2046,19 +1919,18 @@ function $507fabe10e71c6fb$export$ec71b4b83ac08ec3(fn, deps, opts) {
|
|
|
2046
1919
|
*/
|
|
2047
1920
|
|
|
2048
1921
|
function $3ad3f6e1647bc98d$export$80f3e147d781571c(element) {
|
|
2049
|
-
if (!element.isConnected) return;
|
|
2050
1922
|
// If the user is interacting with a virtual cursor, e.g. screen reader, then
|
|
2051
1923
|
// wait until after any animated transitions that are currently occurring on
|
|
2052
1924
|
// the page before shifting focus. This avoids issues with VoiceOver on iOS
|
|
2053
1925
|
// causing the page to scroll when moving focus if the element is transitioning
|
|
2054
1926
|
// from off the screen.
|
|
2055
1927
|
const ownerDocument = ($431fbd86ca7dc216$export$b204af158042fbac)(element);
|
|
1928
|
+
const activeElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)(ownerDocument);
|
|
2056
1929
|
if (($507fabe10e71c6fb$export$630ff653c5ada6a9)() === 'virtual') {
|
|
2057
|
-
let lastFocusedElement =
|
|
1930
|
+
let lastFocusedElement = activeElement;
|
|
2058
1931
|
($bbed8b41f857bcc0$export$24490316f764c430)(()=>{
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
if ((activeElement === lastFocusedElement || activeElement === ownerDocument.body) && element.isConnected) ($7215afc6de606d6b$export$de79e2c695e052f3)(element);
|
|
1932
|
+
// If focus did not move and the element is still in the document, focus it.
|
|
1933
|
+
if (($d4ee10de306f2510$export$cd4e5573fbe2b576)(ownerDocument) === lastFocusedElement && element.isConnected) ($7215afc6de606d6b$export$de79e2c695e052f3)(element);
|
|
2062
1934
|
});
|
|
2063
1935
|
} else ($7215afc6de606d6b$export$de79e2c695e052f3)(element);
|
|
2064
1936
|
}
|
|
@@ -2083,7 +1955,7 @@ function $3ad3f6e1647bc98d$export$80f3e147d781571c(element) {
|
|
|
2083
1955
|
function $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(props) {
|
|
2084
1956
|
let { isDisabled: isDisabled, onFocus: onFocusProp, onBlur: onBlurProp, onFocusChange: onFocusChange } = props;
|
|
2085
1957
|
const onBlur = (useCallback)((e)=>{
|
|
2086
|
-
if (
|
|
1958
|
+
if (e.target === e.currentTarget) {
|
|
2087
1959
|
if (onBlurProp) onBlurProp(e);
|
|
2088
1960
|
if (onFocusChange) onFocusChange(false);
|
|
2089
1961
|
return true;
|
|
@@ -2096,10 +1968,9 @@ function $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(props) {
|
|
|
2096
1968
|
const onFocus = (useCallback)((e)=>{
|
|
2097
1969
|
// Double check that document.activeElement actually matches e.target in case a previously chained
|
|
2098
1970
|
// focus handler already moved focus somewhere else.
|
|
2099
|
-
|
|
2100
|
-
const ownerDocument = ($431fbd86ca7dc216$export$b204af158042fbac)(eventTarget);
|
|
1971
|
+
const ownerDocument = ($431fbd86ca7dc216$export$b204af158042fbac)(e.target);
|
|
2101
1972
|
const activeElement = ownerDocument ? ($d4ee10de306f2510$export$cd4e5573fbe2b576)(ownerDocument) : ($d4ee10de306f2510$export$cd4e5573fbe2b576)();
|
|
2102
|
-
if (
|
|
1973
|
+
if (e.target === e.currentTarget && activeElement === ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e.nativeEvent)) {
|
|
2103
1974
|
if (onFocusProp) onFocusProp(e);
|
|
2104
1975
|
if (onFocusChange) onFocusChange(true);
|
|
2105
1976
|
onSyntheticFocus(e);
|
|
@@ -2247,11 +2118,11 @@ function $9ab94262bd0047c7$export$420e68273165f4ec(props) {
|
|
|
2247
2118
|
let { addGlobalListener: addGlobalListener, removeAllGlobalListeners: removeAllGlobalListeners } = ($03deb23ff14920c4$export$4eaf04e54aa8eed6)();
|
|
2248
2119
|
let onBlur = (useCallback)((e)=>{
|
|
2249
2120
|
// Ignore events bubbling through portals.
|
|
2250
|
-
if (!
|
|
2121
|
+
if (!e.currentTarget.contains(e.target)) return;
|
|
2251
2122
|
// We don't want to trigger onBlurWithin and then immediately onFocusWithin again
|
|
2252
2123
|
// when moving focus inside the element. Only trigger if the currentTarget doesn't
|
|
2253
2124
|
// include the relatedTarget (where focus is moving).
|
|
2254
|
-
if (state.current.isFocusWithin && !
|
|
2125
|
+
if (state.current.isFocusWithin && !e.currentTarget.contains(e.relatedTarget)) {
|
|
2255
2126
|
state.current.isFocusWithin = false;
|
|
2256
2127
|
removeAllGlobalListeners();
|
|
2257
2128
|
if (onBlurWithin) onBlurWithin(e);
|
|
@@ -2266,13 +2137,12 @@ function $9ab94262bd0047c7$export$420e68273165f4ec(props) {
|
|
|
2266
2137
|
let onSyntheticFocus = ($8a9cb279dc87e130$export$715c682d09d639cc)(onBlur);
|
|
2267
2138
|
let onFocus = (useCallback)((e)=>{
|
|
2268
2139
|
// Ignore events bubbling through portals.
|
|
2269
|
-
if (!
|
|
2140
|
+
if (!e.currentTarget.contains(e.target)) return;
|
|
2270
2141
|
// Double check that document.activeElement actually matches e.target in case a previously chained
|
|
2271
2142
|
// focus handler already moved focus somewhere else.
|
|
2272
|
-
|
|
2273
|
-
const ownerDocument = ($431fbd86ca7dc216$export$b204af158042fbac)(eventTarget);
|
|
2143
|
+
const ownerDocument = ($431fbd86ca7dc216$export$b204af158042fbac)(e.target);
|
|
2274
2144
|
const activeElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)(ownerDocument);
|
|
2275
|
-
if (!state.current.isFocusWithin && activeElement ===
|
|
2145
|
+
if (!state.current.isFocusWithin && activeElement === ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e.nativeEvent)) {
|
|
2276
2146
|
if (onFocusWithin) onFocusWithin(e);
|
|
2277
2147
|
if (onFocusWithinChange) onFocusWithinChange(true);
|
|
2278
2148
|
state.current.isFocusWithin = true;
|
|
@@ -2282,10 +2152,9 @@ function $9ab94262bd0047c7$export$420e68273165f4ec(props) {
|
|
|
2282
2152
|
// can manually fire onBlur.
|
|
2283
2153
|
let currentTarget = e.currentTarget;
|
|
2284
2154
|
addGlobalListener(ownerDocument, 'focus', (e)=>{
|
|
2285
|
-
|
|
2286
|
-
if (state.current.isFocusWithin && !($d4ee10de306f2510$export$4282f70798064fe0)(currentTarget, eventTarget)) {
|
|
2155
|
+
if (state.current.isFocusWithin && !($d4ee10de306f2510$export$4282f70798064fe0)(currentTarget, e.target)) {
|
|
2287
2156
|
let nativeEvent = new ownerDocument.defaultView.FocusEvent('blur', {
|
|
2288
|
-
relatedTarget:
|
|
2157
|
+
relatedTarget: e.target
|
|
2289
2158
|
});
|
|
2290
2159
|
($8a9cb279dc87e130$export$c2b7abe5d61ec696)(nativeEvent, currentTarget);
|
|
2291
2160
|
let event = ($8a9cb279dc87e130$export$525bc4921d56d4a)(nativeEvent);
|
|
@@ -2379,7 +2248,7 @@ function $6179b936705e76d3$export$ae780daf29e6d456(props) {
|
|
|
2379
2248
|
let { hoverProps: hoverProps, triggerHoverEnd: triggerHoverEnd } = (useMemo)(()=>{
|
|
2380
2249
|
let triggerHoverStart = (event, pointerType)=>{
|
|
2381
2250
|
state.pointerType = pointerType;
|
|
2382
|
-
if (isDisabled || pointerType === 'touch' || state.isHovered || !
|
|
2251
|
+
if (isDisabled || pointerType === 'touch' || state.isHovered || !event.currentTarget.contains(event.target)) return;
|
|
2383
2252
|
state.isHovered = true;
|
|
2384
2253
|
let target = event.currentTarget;
|
|
2385
2254
|
state.target = target;
|
|
@@ -2387,8 +2256,8 @@ function $6179b936705e76d3$export$ae780daf29e6d456(props) {
|
|
|
2387
2256
|
// even though the originally hovered target may have shrunk in size so it is no longer hovered.
|
|
2388
2257
|
// However, a pointerover event will be fired on the new target the mouse is over.
|
|
2389
2258
|
// In Chrome this happens immediately. In Safari and Firefox, it happens upon moving the mouse one pixel.
|
|
2390
|
-
addGlobalListener(($431fbd86ca7dc216$export$b204af158042fbac)(
|
|
2391
|
-
if (state.isHovered && state.target && !($d4ee10de306f2510$export$4282f70798064fe0)(state.target,
|
|
2259
|
+
addGlobalListener(($431fbd86ca7dc216$export$b204af158042fbac)(event.target), 'pointerover', (e)=>{
|
|
2260
|
+
if (state.isHovered && state.target && !($d4ee10de306f2510$export$4282f70798064fe0)(state.target, e.target)) triggerHoverEnd(e, e.pointerType);
|
|
2392
2261
|
}, {
|
|
2393
2262
|
capture: true
|
|
2394
2263
|
});
|
|
@@ -2422,7 +2291,7 @@ function $6179b936705e76d3$export$ae780daf29e6d456(props) {
|
|
|
2422
2291
|
triggerHoverStart(e, e.pointerType);
|
|
2423
2292
|
};
|
|
2424
2293
|
hoverProps.onPointerLeave = (e)=>{
|
|
2425
|
-
if (!isDisabled &&
|
|
2294
|
+
if (!isDisabled && e.currentTarget.contains(e.target)) triggerHoverEnd(e, e.pointerType);
|
|
2426
2295
|
};
|
|
2427
2296
|
} else if (process.env.NODE_ENV === 'test') {
|
|
2428
2297
|
hoverProps.onTouchStart = ()=>{
|
|
@@ -2433,7 +2302,7 @@ function $6179b936705e76d3$export$ae780daf29e6d456(props) {
|
|
|
2433
2302
|
state.ignoreEmulatedMouseEvents = false;
|
|
2434
2303
|
};
|
|
2435
2304
|
hoverProps.onMouseLeave = (e)=>{
|
|
2436
|
-
if (!isDisabled &&
|
|
2305
|
+
if (!isDisabled && e.currentTarget.contains(e.target)) triggerHoverEnd(e, 'mouse');
|
|
2437
2306
|
};
|
|
2438
2307
|
}
|
|
2439
2308
|
return {
|
|
@@ -2545,4 +2414,4 @@ const $514c0188e459b4c0$export$5f1af8db9871e1d6 = /*#__PURE__*/ (forwardRef)(fun
|
|
|
2545
2414
|
});
|
|
2546
2415
|
});
|
|
2547
2416
|
|
|
2548
|
-
export { $8ae05eaa5c114e9c$export$7f54fc3180508a52 as $, $64fa3d84918910a7$export$
|
|
2417
|
+
export { $8ae05eaa5c114e9c$export$7f54fc3180508a52 as $, $64fa3d84918910a7$export$4d86445c2cf5e3 as A, $514c0188e459b4c0$export$5f1af8db9871e1d6 as B, $6179b936705e76d3$export$ae780daf29e6d456 as C, $64fa3d84918910a7$export$fabf2dc03a41866e as D, $64fa3d84918910a7$export$9d4c57ee4c6ffdd8 as E, $64fa3d84918910a7$export$ef03459518577ad4 as F, $64fa3d84918910a7$export$2881499e37b75b9a as G, $514c0188e459b4c0$export$9afb8bc826b033ea as H, $f4e2df6bd15f8569$export$98658e8c59125e6a as I, $d4ee10de306f2510$export$4282f70798064fe0 as J, $c87311424ea30a05$export$b7d78993b74f766d as K, $c87311424ea30a05$export$9ac100e40613ea10 as L, $c87311424ea30a05$export$78551043582a6a98 as M, $c87311424ea30a05$export$7bef049ce92e4224 as N, $7215afc6de606d6b$export$de79e2c695e052f3 as O, $431fbd86ca7dc216$export$b204af158042fbac as P, $bbed8b41f857bcc0$export$24490316f764c430 as Q, $8a9cb279dc87e130$export$c2b7abe5d61ec696 as R, $8a9cb279dc87e130$export$525bc4921d56d4a as S, $d4ee10de306f2510$export$e58f029f0fbfdb29 as T, $6a7db85432448f7f$export$29bf1b5f2c56cf63 as U, $8a9cb279dc87e130$export$cabe61c495ee3649 as V, $6a7db85432448f7f$export$60278871457622de as W, $e7801be82b4b2a53$export$4debdb1a3f0fa79e as X, $df56164dff5785e2$export$4338b53315abf666 as Y, $b4b717babfbb907b$export$4c063cf1350e6fed as Z, $5dc95899b306f630$export$c9058316764c140e as _, $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 as a, $d4ee10de306f2510$export$cd4e5573fbe2b576 as a0, $3ad3f6e1647bc98d$export$80f3e147d781571c as a1, $b4b717babfbb907b$export$bebd5a1431fec25d as a2, $c87311424ea30a05$export$6446a186d09e379e as a3, $507fabe10e71c6fb$export$630ff653c5ada6a9 as a4, $b5e257d569688ac6$export$535bd6ca7f90a273 as a5, $c87311424ea30a05$export$e1865c3bedcd822b as a6, $46d819fcbaf35654$export$8f71654801c2f7cd as a7, $f39a9eba43920ace$export$8dc98ba7eadeaa56 as a8, $f645667febf57a63$export$f9762fab77588ecb as a9, $f39a9eba43920ace$export$b5d7cc18bb8d2b59 as aa, $64fa3d84918910a7$export$c62b8e45d58ddad9 as ab, $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, $458b0a5536c1a7cf$export$40bfa8c7b0832715 as m, $f645667febf57a63$export$4c014de7c8940b4c as n, $65484d02dcb7eb3e$export$457c3d6518dd4c6f as o, $431fbd86ca7dc216$export$f21a1ffae260145a 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, $f39a9eba43920ace$export$86427a43e3e48ebb as y, $64fa3d84918910a7$export$29f1550f4b0d4415 as z };
|