@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-cjs2.js
CHANGED
|
@@ -16,6 +16,36 @@ var clsx = require('./clsx-cjs.js');
|
|
|
16
16
|
*/
|
|
17
17
|
const $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = typeof document !== 'undefined' ? (React).useLayoutEffect : ()=>{};
|
|
18
18
|
|
|
19
|
+
/*
|
|
20
|
+
* Copyright 2023 Adobe. All rights reserved.
|
|
21
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
22
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
23
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
24
|
+
*
|
|
25
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
26
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
27
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
28
|
+
* governing permissions and limitations under the License.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
var $8ae05eaa5c114e9c$var$_React_useInsertionEffect;
|
|
32
|
+
// Use the earliest effect type possible. useInsertionEffect runs during the mutation phase,
|
|
33
|
+
// before all layout effects, but is available only in React 18 and later.
|
|
34
|
+
const $8ae05eaa5c114e9c$var$useEarlyEffect = ($8ae05eaa5c114e9c$var$_React_useInsertionEffect = (React)['useInsertionEffect']) !== null && $8ae05eaa5c114e9c$var$_React_useInsertionEffect !== void 0 ? $8ae05eaa5c114e9c$var$_React_useInsertionEffect : ($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c);
|
|
35
|
+
function $8ae05eaa5c114e9c$export$7f54fc3180508a52(fn) {
|
|
36
|
+
const ref = (React.useRef)(null);
|
|
37
|
+
$8ae05eaa5c114e9c$var$useEarlyEffect(()=>{
|
|
38
|
+
ref.current = fn;
|
|
39
|
+
}, [
|
|
40
|
+
fn
|
|
41
|
+
]);
|
|
42
|
+
// @ts-ignore
|
|
43
|
+
return (React.useCallback)((...args)=>{
|
|
44
|
+
const f = ref.current;
|
|
45
|
+
return f === null || f === void 0 ? void 0 : f(...args);
|
|
46
|
+
}, []);
|
|
47
|
+
}
|
|
48
|
+
|
|
19
49
|
/*
|
|
20
50
|
* Copyright 2020 Adobe. All rights reserved.
|
|
21
51
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -30,13 +60,10 @@ const $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = typeof document !== 'undefined
|
|
|
30
60
|
|
|
31
61
|
function $1dbecbe27a04f9af$export$14d238f342723f25(defaultValue) {
|
|
32
62
|
let [value, setValue] = (React.useState)(defaultValue);
|
|
33
|
-
// Keep an up to date copy of value in a ref so we can access the current value in the generator.
|
|
34
|
-
// This allows us to maintain a stable queue function.
|
|
35
|
-
let currValue = (React.useRef)(value);
|
|
36
63
|
let effect = (React.useRef)(null);
|
|
37
64
|
// Store the function in a ref so we can always access the current version
|
|
38
65
|
// which has the proper `value` in scope.
|
|
39
|
-
let nextRef = (
|
|
66
|
+
let nextRef = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(()=>{
|
|
40
67
|
if (!effect.current) return;
|
|
41
68
|
// Run the generator to the next yield.
|
|
42
69
|
let newValue = effect.current.next();
|
|
@@ -48,20 +75,17 @@ function $1dbecbe27a04f9af$export$14d238f342723f25(defaultValue) {
|
|
|
48
75
|
// If the value is the same as the current value,
|
|
49
76
|
// then continue to the next yield. Otherwise,
|
|
50
77
|
// set the value in state and wait for the next layout effect.
|
|
51
|
-
if (
|
|
78
|
+
if (value === newValue.value) nextRef();
|
|
52
79
|
else setValue(newValue.value);
|
|
53
80
|
});
|
|
54
81
|
($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
|
|
55
|
-
currValue.current = value;
|
|
56
82
|
// If there is an effect currently running, continue to the next yield.
|
|
57
|
-
if (effect.current) nextRef
|
|
83
|
+
if (effect.current) nextRef();
|
|
84
|
+
});
|
|
85
|
+
let queue = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)((fn)=>{
|
|
86
|
+
effect.current = fn(value);
|
|
87
|
+
nextRef();
|
|
58
88
|
});
|
|
59
|
-
let queue = (React.useCallback)((fn)=>{
|
|
60
|
-
effect.current = fn(currValue.current);
|
|
61
|
-
nextRef.current();
|
|
62
|
-
}, [
|
|
63
|
-
nextRef
|
|
64
|
-
]);
|
|
65
89
|
return [
|
|
66
90
|
value,
|
|
67
91
|
queue
|
|
@@ -302,7 +326,7 @@ function $f4e2df6bd15f8569$export$98658e8c59125e6a() {
|
|
|
302
326
|
}
|
|
303
327
|
|
|
304
328
|
// Source: https://github.com/microsoft/tabster/blob/a89fc5d7e332d48f68d03b1ca6e344489d1c3898/src/Shadowdomize/DOMFunctions.ts#L16
|
|
305
|
-
|
|
329
|
+
|
|
306
330
|
|
|
307
331
|
function $d4ee10de306f2510$export$4282f70798064fe0(node, otherNode) {
|
|
308
332
|
if (!($f4e2df6bd15f8569$export$98658e8c59125e6a)()) return otherNode && node ? node.contains(otherNode) : false;
|
|
@@ -326,55 +350,11 @@ const $d4ee10de306f2510$export$cd4e5573fbe2b576 = (doc = document)=>{
|
|
|
326
350
|
return activeElement;
|
|
327
351
|
};
|
|
328
352
|
function $d4ee10de306f2510$export$e58f029f0fbfdb29(event) {
|
|
329
|
-
if (($f4e2df6bd15f8569$export$98658e8c59125e6a)() && event.target
|
|
330
|
-
|
|
331
|
-
if ('composedPath' in event) return (_event_composedPath_ = event.composedPath()[0]) !== null && _event_composedPath_ !== void 0 ? _event_composedPath_ : null;
|
|
332
|
-
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
|
+
if (($f4e2df6bd15f8569$export$98658e8c59125e6a)() && event.target.shadowRoot) {
|
|
354
|
+
if (event.composedPath) return event.composedPath()[0];
|
|
333
355
|
}
|
|
334
356
|
return event.target;
|
|
335
357
|
}
|
|
336
|
-
function $d4ee10de306f2510$export$b4f377a2b6254582(node) {
|
|
337
|
-
if (!node) return false;
|
|
338
|
-
// Get the active element within the node's parent shadow root (or the document). Can return null.
|
|
339
|
-
let root = node.getRootNode();
|
|
340
|
-
let ownerWindow = ($431fbd86ca7dc216$export$f21a1ffae260145a)(node);
|
|
341
|
-
if (!(root instanceof ownerWindow.Document || root instanceof ownerWindow.ShadowRoot)) return false;
|
|
342
|
-
let activeElement = root.activeElement;
|
|
343
|
-
// Check if the active element is within this node. These nodes are within the same shadow root.
|
|
344
|
-
return activeElement != null && node.contains(activeElement);
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
/*
|
|
348
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
349
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
350
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
351
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
352
|
-
*
|
|
353
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
354
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
355
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
356
|
-
* governing permissions and limitations under the License.
|
|
357
|
-
*/ function $5dc95899b306f630$export$c9058316764c140e(...refs) {
|
|
358
|
-
if (refs.length === 1 && refs[0]) return refs[0];
|
|
359
|
-
return (value)=>{
|
|
360
|
-
let hasCleanup = false;
|
|
361
|
-
const cleanups = refs.map((ref)=>{
|
|
362
|
-
const cleanup = $5dc95899b306f630$var$setRef(ref, value);
|
|
363
|
-
hasCleanup || (hasCleanup = typeof cleanup == 'function');
|
|
364
|
-
return cleanup;
|
|
365
|
-
});
|
|
366
|
-
if (hasCleanup) return ()=>{
|
|
367
|
-
cleanups.forEach((cleanup, i)=>{
|
|
368
|
-
if (typeof cleanup === 'function') cleanup();
|
|
369
|
-
else $5dc95899b306f630$var$setRef(refs[i], null);
|
|
370
|
-
});
|
|
371
|
-
};
|
|
372
|
-
};
|
|
373
|
-
}
|
|
374
|
-
function $5dc95899b306f630$var$setRef(ref, value) {
|
|
375
|
-
if (typeof ref === 'function') return ref(value);
|
|
376
|
-
else if (ref != null) ref.current = value;
|
|
377
|
-
}
|
|
378
358
|
|
|
379
359
|
/*
|
|
380
360
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -389,7 +369,6 @@ function $5dc95899b306f630$var$setRef(ref, value) {
|
|
|
389
369
|
*/
|
|
390
370
|
|
|
391
371
|
|
|
392
|
-
|
|
393
372
|
function $3ef42575df84b30b$export$9d1611c77c2fe928(...args) {
|
|
394
373
|
// Start with a base clone of the first argument. This is a lot faster than starting
|
|
395
374
|
// with an empty object and adding properties as we go.
|
|
@@ -406,13 +385,44 @@ function $3ef42575df84b30b$export$9d1611c77c2fe928(...args) {
|
|
|
406
385
|
key[0] === 'o' && key[1] === 'n' && key.charCodeAt(2) >= /* 'A' */ 65 && key.charCodeAt(2) <= /* 'Z' */ 90) result[key] = ($ff5963eb1fccf552$export$e08e3b67e392101e)(a, b);
|
|
407
386
|
else if ((key === 'className' || key === 'UNSAFE_className') && typeof a === 'string' && typeof b === 'string') result[key] = (clsx.clsx)(a, b);
|
|
408
387
|
else if (key === 'id' && a && b) result.id = ($bdb11010cef70236$export$cd8c9cb68f842629)(a, b);
|
|
409
|
-
else if (key === 'ref' && a && b) result.ref = ($5dc95899b306f630$export$c9058316764c140e)(a, b);
|
|
410
388
|
else result[key] = b !== undefined ? b : a;
|
|
411
389
|
}
|
|
412
390
|
}
|
|
413
391
|
return result;
|
|
414
392
|
}
|
|
415
393
|
|
|
394
|
+
/*
|
|
395
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
396
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
397
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
398
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
399
|
+
*
|
|
400
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
401
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
402
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
403
|
+
* governing permissions and limitations under the License.
|
|
404
|
+
*/ function $5dc95899b306f630$export$c9058316764c140e(...refs) {
|
|
405
|
+
if (refs.length === 1 && refs[0]) return refs[0];
|
|
406
|
+
return (value)=>{
|
|
407
|
+
let hasCleanup = false;
|
|
408
|
+
const cleanups = refs.map((ref)=>{
|
|
409
|
+
const cleanup = $5dc95899b306f630$var$setRef(ref, value);
|
|
410
|
+
hasCleanup || (hasCleanup = typeof cleanup == 'function');
|
|
411
|
+
return cleanup;
|
|
412
|
+
});
|
|
413
|
+
if (hasCleanup) return ()=>{
|
|
414
|
+
cleanups.forEach((cleanup, i)=>{
|
|
415
|
+
if (typeof cleanup === 'function') cleanup();
|
|
416
|
+
else $5dc95899b306f630$var$setRef(refs[i], null);
|
|
417
|
+
});
|
|
418
|
+
};
|
|
419
|
+
};
|
|
420
|
+
}
|
|
421
|
+
function $5dc95899b306f630$var$setRef(ref, value) {
|
|
422
|
+
if (typeof ref === 'function') return ref(value);
|
|
423
|
+
else if (ref != null) ref.current = value;
|
|
424
|
+
}
|
|
425
|
+
|
|
416
426
|
/*
|
|
417
427
|
* Copyright 2020 Adobe. All rights reserved.
|
|
418
428
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -489,7 +499,7 @@ const $65484d02dcb7eb3e$var$propRe = /^(data-.*)$/;
|
|
|
489
499
|
function $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, opts = {}) {
|
|
490
500
|
let { labelable: labelable, isLink: isLink, global: global, events: events = global, propNames: propNames } = opts;
|
|
491
501
|
let filteredProps = {};
|
|
492
|
-
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 &&
|
|
502
|
+
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];
|
|
493
503
|
return filteredProps;
|
|
494
504
|
}
|
|
495
505
|
|
|
@@ -614,110 +624,6 @@ const $c87311424ea30a05$export$b7d78993b74f766d = $c87311424ea30a05$var$cached(f
|
|
|
614
624
|
return $c87311424ea30a05$var$testUserAgent(/Firefox/i);
|
|
615
625
|
});
|
|
616
626
|
|
|
617
|
-
/*
|
|
618
|
-
* Copyright 2023 Adobe. All rights reserved.
|
|
619
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
620
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
621
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
622
|
-
*
|
|
623
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
624
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
625
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
626
|
-
* governing permissions and limitations under the License.
|
|
627
|
-
*/
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
const $ea8dcbcb9ea1b556$var$RouterContext = /*#__PURE__*/ (React.createContext)({
|
|
631
|
-
isNative: true,
|
|
632
|
-
open: $ea8dcbcb9ea1b556$var$openSyntheticLink,
|
|
633
|
-
useHref: (href)=>href
|
|
634
|
-
});
|
|
635
|
-
function $ea8dcbcb9ea1b556$export$9a302a45f65d0572() {
|
|
636
|
-
return (React.useContext)($ea8dcbcb9ea1b556$var$RouterContext);
|
|
637
|
-
}
|
|
638
|
-
function $ea8dcbcb9ea1b556$export$efa8c9099e530235(link, modifiers) {
|
|
639
|
-
// Use getAttribute here instead of link.target. Firefox will default link.target to "_parent" when inside an iframe.
|
|
640
|
-
let target = link.getAttribute('target');
|
|
641
|
-
return (!target || target === '_self') && link.origin === location.origin && !link.hasAttribute('download') && !modifiers.metaKey && // open in new tab (mac)
|
|
642
|
-
!modifiers.ctrlKey && // open in new tab (windows)
|
|
643
|
-
!modifiers.altKey && // download
|
|
644
|
-
!modifiers.shiftKey;
|
|
645
|
-
}
|
|
646
|
-
function $ea8dcbcb9ea1b556$export$95185d699e05d4d7(target, modifiers, setOpening = true) {
|
|
647
|
-
var _window_event_type, _window_event;
|
|
648
|
-
let { metaKey: metaKey, ctrlKey: ctrlKey, altKey: altKey, shiftKey: shiftKey } = modifiers;
|
|
649
|
-
// Firefox does not recognize keyboard events as a user action by default, and the popup blocker
|
|
650
|
-
// will prevent links with target="_blank" from opening. However, it does allow the event if the
|
|
651
|
-
// Command/Control key is held, which opens the link in a background tab. This seems like the best we can do.
|
|
652
|
-
// See https://bugzilla.mozilla.org/show_bug.cgi?id=257870 and https://bugzilla.mozilla.org/show_bug.cgi?id=746640.
|
|
653
|
-
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') {
|
|
654
|
-
if (($c87311424ea30a05$export$9ac100e40613ea10)()) metaKey = true;
|
|
655
|
-
else ctrlKey = true;
|
|
656
|
-
}
|
|
657
|
-
// WebKit does not support firing click events with modifier keys, but does support keyboard events.
|
|
658
|
-
// https://github.com/WebKit/WebKit/blob/c03d0ac6e6db178f90923a0a63080b5ca210d25f/Source/WebCore/html/HTMLAnchorElement.cpp#L184
|
|
659
|
-
let event = ($c87311424ea30a05$export$78551043582a6a98)() && ($c87311424ea30a05$export$9ac100e40613ea10)() && !($c87311424ea30a05$export$7bef049ce92e4224)() && process.env.NODE_ENV !== 'test' ? new KeyboardEvent('keydown', {
|
|
660
|
-
keyIdentifier: 'Enter',
|
|
661
|
-
metaKey: metaKey,
|
|
662
|
-
ctrlKey: ctrlKey,
|
|
663
|
-
altKey: altKey,
|
|
664
|
-
shiftKey: shiftKey
|
|
665
|
-
}) : new MouseEvent('click', {
|
|
666
|
-
metaKey: metaKey,
|
|
667
|
-
ctrlKey: ctrlKey,
|
|
668
|
-
altKey: altKey,
|
|
669
|
-
shiftKey: shiftKey,
|
|
670
|
-
detail: 1,
|
|
671
|
-
bubbles: true,
|
|
672
|
-
cancelable: true
|
|
673
|
-
});
|
|
674
|
-
$ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening = setOpening;
|
|
675
|
-
($7215afc6de606d6b$export$de79e2c695e052f3)(target);
|
|
676
|
-
target.dispatchEvent(event);
|
|
677
|
-
$ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening = false;
|
|
678
|
-
}
|
|
679
|
-
// https://github.com/parcel-bundler/parcel/issues/8724
|
|
680
|
-
$ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening = false;
|
|
681
|
-
function $ea8dcbcb9ea1b556$var$getSyntheticLink(target, open) {
|
|
682
|
-
if (target instanceof HTMLAnchorElement) open(target);
|
|
683
|
-
else if (target.hasAttribute('data-href')) {
|
|
684
|
-
let link = document.createElement('a');
|
|
685
|
-
link.href = target.getAttribute('data-href');
|
|
686
|
-
if (target.hasAttribute('data-target')) link.target = target.getAttribute('data-target');
|
|
687
|
-
if (target.hasAttribute('data-rel')) link.rel = target.getAttribute('data-rel');
|
|
688
|
-
if (target.hasAttribute('data-download')) link.download = target.getAttribute('data-download');
|
|
689
|
-
if (target.hasAttribute('data-ping')) link.ping = target.getAttribute('data-ping');
|
|
690
|
-
if (target.hasAttribute('data-referrer-policy')) link.referrerPolicy = target.getAttribute('data-referrer-policy');
|
|
691
|
-
target.appendChild(link);
|
|
692
|
-
open(link);
|
|
693
|
-
target.removeChild(link);
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
|
-
function $ea8dcbcb9ea1b556$var$openSyntheticLink(target, modifiers) {
|
|
697
|
-
$ea8dcbcb9ea1b556$var$getSyntheticLink(target, (link)=>$ea8dcbcb9ea1b556$export$95185d699e05d4d7(link, modifiers));
|
|
698
|
-
}
|
|
699
|
-
function $ea8dcbcb9ea1b556$export$7e924b3091a3bd18(props) {
|
|
700
|
-
let router = $ea8dcbcb9ea1b556$export$9a302a45f65d0572();
|
|
701
|
-
var _props_href;
|
|
702
|
-
const href = router.useHref((_props_href = props === null || props === void 0 ? void 0 : props.href) !== null && _props_href !== void 0 ? _props_href : '');
|
|
703
|
-
return {
|
|
704
|
-
href: (props === null || props === void 0 ? void 0 : props.href) ? href : undefined,
|
|
705
|
-
target: props === null || props === void 0 ? void 0 : props.target,
|
|
706
|
-
rel: props === null || props === void 0 ? void 0 : props.rel,
|
|
707
|
-
download: props === null || props === void 0 ? void 0 : props.download,
|
|
708
|
-
ping: props === null || props === void 0 ? void 0 : props.ping,
|
|
709
|
-
referrerPolicy: props === null || props === void 0 ? void 0 : props.referrerPolicy
|
|
710
|
-
};
|
|
711
|
-
}
|
|
712
|
-
function $ea8dcbcb9ea1b556$export$13aea1a3cb5e3f1f(e, router, href, routerOptions) {
|
|
713
|
-
// If a custom router is provided, prevent default and forward if this link should client navigate.
|
|
714
|
-
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.
|
|
715
|
-
!e.isDefaultPrevented() && $ea8dcbcb9ea1b556$export$efa8c9099e530235(e.currentTarget, e) && href) {
|
|
716
|
-
e.preventDefault();
|
|
717
|
-
router.open(e.currentTarget, e, href, routerOptions);
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
|
|
721
627
|
/*
|
|
722
628
|
* Copyright 2020 Adobe. All rights reserved.
|
|
723
629
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -734,7 +640,6 @@ function $ea8dcbcb9ea1b556$export$13aea1a3cb5e3f1f(e, router, href, routerOption
|
|
|
734
640
|
// bugs, e.g. Chrome sometimes fires both transitionend and transitioncancel rather
|
|
735
641
|
// than one or the other. So we need to track what's actually transitioning so that
|
|
736
642
|
// we can ignore these duplicate events.
|
|
737
|
-
|
|
738
643
|
let $bbed8b41f857bcc0$var$transitionsByElement = new Map();
|
|
739
644
|
// A list of callbacks to call once there are no transitioning elements.
|
|
740
645
|
let $bbed8b41f857bcc0$var$transitionCallbacks = new Set();
|
|
@@ -744,33 +649,31 @@ function $bbed8b41f857bcc0$var$setupGlobalEvents() {
|
|
|
744
649
|
return 'propertyName' in event;
|
|
745
650
|
}
|
|
746
651
|
let onTransitionStart = (e)=>{
|
|
747
|
-
|
|
748
|
-
if (!isTransitionEvent(e) || !eventTarget) return;
|
|
652
|
+
if (!isTransitionEvent(e) || !e.target) return;
|
|
749
653
|
// Add the transitioning property to the list for this element.
|
|
750
|
-
let transitions = $bbed8b41f857bcc0$var$transitionsByElement.get(
|
|
654
|
+
let transitions = $bbed8b41f857bcc0$var$transitionsByElement.get(e.target);
|
|
751
655
|
if (!transitions) {
|
|
752
656
|
transitions = new Set();
|
|
753
|
-
$bbed8b41f857bcc0$var$transitionsByElement.set(
|
|
657
|
+
$bbed8b41f857bcc0$var$transitionsByElement.set(e.target, transitions);
|
|
754
658
|
// The transitioncancel event must be registered on the element itself, rather than as a global
|
|
755
659
|
// event. This enables us to handle when the node is deleted from the document while it is transitioning.
|
|
756
660
|
// In that case, the cancel event would have nowhere to bubble to so we need to handle it directly.
|
|
757
|
-
|
|
661
|
+
e.target.addEventListener('transitioncancel', onTransitionEnd, {
|
|
758
662
|
once: true
|
|
759
663
|
});
|
|
760
664
|
}
|
|
761
665
|
transitions.add(e.propertyName);
|
|
762
666
|
};
|
|
763
667
|
let onTransitionEnd = (e)=>{
|
|
764
|
-
|
|
765
|
-
if (!isTransitionEvent(e) || !eventTarget) return;
|
|
668
|
+
if (!isTransitionEvent(e) || !e.target) return;
|
|
766
669
|
// Remove property from list of transitioning properties.
|
|
767
|
-
let properties = $bbed8b41f857bcc0$var$transitionsByElement.get(
|
|
670
|
+
let properties = $bbed8b41f857bcc0$var$transitionsByElement.get(e.target);
|
|
768
671
|
if (!properties) return;
|
|
769
672
|
properties.delete(e.propertyName);
|
|
770
673
|
// If empty, remove transitioncancel event, and remove the element from the list of transitioning elements.
|
|
771
674
|
if (properties.size === 0) {
|
|
772
|
-
|
|
773
|
-
$bbed8b41f857bcc0$var$transitionsByElement.delete(
|
|
675
|
+
e.target.removeEventListener('transitioncancel', onTransitionEnd);
|
|
676
|
+
$bbed8b41f857bcc0$var$transitionsByElement.delete(e.target);
|
|
774
677
|
}
|
|
775
678
|
// If no transitioning elements, call all of the queued callbacks.
|
|
776
679
|
if ($bbed8b41f857bcc0$var$transitionsByElement.size === 0) {
|
|
@@ -939,36 +842,6 @@ function $df56164dff5785e2$export$4338b53315abf666(ref) {
|
|
|
939
842
|
]);
|
|
940
843
|
}
|
|
941
844
|
|
|
942
|
-
/*
|
|
943
|
-
* Copyright 2023 Adobe. All rights reserved.
|
|
944
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
945
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
946
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
947
|
-
*
|
|
948
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
949
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
950
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
951
|
-
* governing permissions and limitations under the License.
|
|
952
|
-
*/
|
|
953
|
-
|
|
954
|
-
var $8ae05eaa5c114e9c$var$_React_useInsertionEffect;
|
|
955
|
-
// Use the earliest effect type possible. useInsertionEffect runs during the mutation phase,
|
|
956
|
-
// before all layout effects, but is available only in React 18 and later.
|
|
957
|
-
const $8ae05eaa5c114e9c$var$useEarlyEffect = ($8ae05eaa5c114e9c$var$_React_useInsertionEffect = (React)['useInsertionEffect']) !== null && $8ae05eaa5c114e9c$var$_React_useInsertionEffect !== void 0 ? $8ae05eaa5c114e9c$var$_React_useInsertionEffect : ($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c);
|
|
958
|
-
function $8ae05eaa5c114e9c$export$7f54fc3180508a52(fn) {
|
|
959
|
-
const ref = (React.useRef)(null);
|
|
960
|
-
$8ae05eaa5c114e9c$var$useEarlyEffect(()=>{
|
|
961
|
-
ref.current = fn;
|
|
962
|
-
}, [
|
|
963
|
-
fn
|
|
964
|
-
]);
|
|
965
|
-
// @ts-ignore
|
|
966
|
-
return (React.useCallback)((...args)=>{
|
|
967
|
-
const f = ref.current;
|
|
968
|
-
return f === null || f === void 0 ? void 0 : f(...args);
|
|
969
|
-
}, []);
|
|
970
|
-
}
|
|
971
|
-
|
|
972
845
|
/*
|
|
973
846
|
* Copyright 2020 Adobe. All rights reserved.
|
|
974
847
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -1017,7 +890,8 @@ function $e9faafb641e167db$export$90fc3a17d93f704c(ref, event, handler, options)
|
|
|
1017
890
|
ref,
|
|
1018
891
|
event,
|
|
1019
892
|
options,
|
|
1020
|
-
isDisabled
|
|
893
|
+
isDisabled,
|
|
894
|
+
handleEvent
|
|
1021
895
|
]);
|
|
1022
896
|
}
|
|
1023
897
|
|
|
@@ -1080,9 +954,7 @@ function $7d2416ea0959daaa$var$isAttributeVisible(element, childElement) {
|
|
|
1080
954
|
!element.hasAttribute('data-react-aria-prevent-focus') && (element.nodeName === 'DETAILS' && childElement && childElement.nodeName !== 'SUMMARY' ? element.hasAttribute('open') : true);
|
|
1081
955
|
}
|
|
1082
956
|
function $7d2416ea0959daaa$export$e989c0fffaa6b27a(element, childElement) {
|
|
1083
|
-
if ($7d2416ea0959daaa$var$supportsCheckVisibility) return element.checkVisibility(
|
|
1084
|
-
visibilityProperty: true
|
|
1085
|
-
}) && !element.closest('[data-react-aria-prevent-focus]');
|
|
957
|
+
if ($7d2416ea0959daaa$var$supportsCheckVisibility) return element.checkVisibility() && !element.closest('[data-react-aria-prevent-focus]');
|
|
1086
958
|
return element.nodeName !== '#comment' && $7d2416ea0959daaa$var$isStyleVisible(element) && $7d2416ea0959daaa$var$isAttributeVisible(element, childElement) && (!element.parentElement || $7d2416ea0959daaa$export$e989c0fffaa6b27a(element.parentElement, element));
|
|
1087
959
|
}
|
|
1088
960
|
|
|
@@ -1142,14 +1014,8 @@ function $b4b717babfbb907b$var$isInert(element) {
|
|
|
1142
1014
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
1143
1015
|
* governing permissions and limitations under the License.
|
|
1144
1016
|
*/
|
|
1145
|
-
var $458b0a5536c1a7cf$var$_React_useInsertionEffect;
|
|
1146
|
-
// Use the earliest effect possible to reset the ref below.
|
|
1147
|
-
const $458b0a5536c1a7cf$var$useEarlyEffect = typeof document !== 'undefined' ? ($458b0a5536c1a7cf$var$_React_useInsertionEffect = (React)['useInsertionEffect']) !== null && $458b0a5536c1a7cf$var$_React_useInsertionEffect !== void 0 ? $458b0a5536c1a7cf$var$_React_useInsertionEffect : (React).useLayoutEffect : ()=>{};
|
|
1148
1017
|
function $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange) {
|
|
1149
|
-
// Store the value in both state and a ref. The state value will only be used when uncontrolled.
|
|
1150
|
-
// The ref is used to track the most current value, which is passed to the function setState callback.
|
|
1151
1018
|
let [stateValue, setStateValue] = (React.useState)(value || defaultValue);
|
|
1152
|
-
let valueRef = (React.useRef)(stateValue);
|
|
1153
1019
|
let isControlledRef = (React.useRef)(value !== undefined);
|
|
1154
1020
|
let isControlled = value !== undefined;
|
|
1155
1021
|
(React.useEffect)(()=>{
|
|
@@ -1159,28 +1025,40 @@ function $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange
|
|
|
1159
1025
|
}, [
|
|
1160
1026
|
isControlled
|
|
1161
1027
|
]);
|
|
1162
|
-
// After each render, update the ref to the current value.
|
|
1163
|
-
// This ensures that the setState callback argument is reset.
|
|
1164
|
-
// Note: the effect should not have any dependencies so that controlled values always reset.
|
|
1165
1028
|
let currentValue = isControlled ? value : stateValue;
|
|
1166
|
-
$458b0a5536c1a7cf$var$useEarlyEffect(()=>{
|
|
1167
|
-
valueRef.current = currentValue;
|
|
1168
|
-
});
|
|
1169
|
-
let [, forceUpdate] = (React.useReducer)(()=>({}), {});
|
|
1170
1029
|
let setValue = (React.useCallback)((value, ...args)=>{
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
//
|
|
1178
|
-
|
|
1179
|
-
//
|
|
1180
|
-
|
|
1181
|
-
|
|
1030
|
+
let onChangeCaller = (value, ...onChangeArgs)=>{
|
|
1031
|
+
if (onChange) {
|
|
1032
|
+
if (!Object.is(currentValue, value)) onChange(value, ...onChangeArgs);
|
|
1033
|
+
}
|
|
1034
|
+
if (!isControlled) // If uncontrolled, mutate the currentValue local variable so that
|
|
1035
|
+
// calling setState multiple times with the same value only emits onChange once.
|
|
1036
|
+
// We do not use a ref for this because we specifically _do_ want the value to
|
|
1037
|
+
// reset every render, and assigning to a ref in render breaks aborted suspended renders.
|
|
1038
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1039
|
+
currentValue = value;
|
|
1040
|
+
};
|
|
1041
|
+
if (typeof value === 'function') {
|
|
1042
|
+
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');
|
|
1043
|
+
// this supports functional updates https://reactjs.org/docs/hooks-reference.html#functional-updates
|
|
1044
|
+
// when someone using useControlledState calls setControlledState(myFunc)
|
|
1045
|
+
// this will call our useState setState with a function as well which invokes myFunc and calls onChange with the value from myFunc
|
|
1046
|
+
// 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
|
|
1047
|
+
// 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
|
|
1048
|
+
let updateFunction = (oldValue, ...functionArgs)=>{
|
|
1049
|
+
let interceptedValue = value(isControlled ? currentValue : oldValue, ...functionArgs);
|
|
1050
|
+
onChangeCaller(interceptedValue, ...args);
|
|
1051
|
+
if (!isControlled) return interceptedValue;
|
|
1052
|
+
return oldValue;
|
|
1053
|
+
};
|
|
1054
|
+
setStateValue(updateFunction);
|
|
1055
|
+
} else {
|
|
1056
|
+
if (!isControlled) setStateValue(value);
|
|
1057
|
+
onChangeCaller(value, ...args);
|
|
1182
1058
|
}
|
|
1183
1059
|
}, [
|
|
1060
|
+
isControlled,
|
|
1061
|
+
currentValue,
|
|
1184
1062
|
onChange
|
|
1185
1063
|
]);
|
|
1186
1064
|
return [
|
|
@@ -1488,13 +1366,10 @@ function $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a() {
|
|
|
1488
1366
|
}, []);
|
|
1489
1367
|
// We cannot determine the browser's language on the server, so default to
|
|
1490
1368
|
// en-US. This will be updated after hydration on the client to the correct value.
|
|
1491
|
-
if (isSSR) {
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
direction: 'ltr'
|
|
1496
|
-
};
|
|
1497
|
-
}
|
|
1369
|
+
if (isSSR) return {
|
|
1370
|
+
locale: 'en-US',
|
|
1371
|
+
direction: 'ltr'
|
|
1372
|
+
};
|
|
1498
1373
|
return defaultLocale;
|
|
1499
1374
|
}
|
|
1500
1375
|
|
|
@@ -1719,22 +1594,24 @@ function $8a9cb279dc87e130$export$715c682d09d639cc(onBlur) {
|
|
|
1719
1594
|
}
|
|
1720
1595
|
};
|
|
1721
1596
|
}, []);
|
|
1597
|
+
let dispatchBlur = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)((e)=>{
|
|
1598
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
|
|
1599
|
+
});
|
|
1722
1600
|
// This function is called during a React onFocus event.
|
|
1723
1601
|
return (React.useCallback)((e)=>{
|
|
1724
1602
|
// React does not fire onBlur when an element is disabled. https://github.com/facebook/react/issues/9142
|
|
1725
1603
|
// Most browsers fire a native focusout event in this case, except for Firefox. In that case, we use a
|
|
1726
1604
|
// MutationObserver to watch for the disabled attribute, and dispatch these events ourselves.
|
|
1727
1605
|
// For browsers that do, focusout fires before the MutationObserver, so onBlur should not fire twice.
|
|
1728
|
-
|
|
1729
|
-
if (eventTarget instanceof HTMLButtonElement || eventTarget instanceof HTMLInputElement || eventTarget instanceof HTMLTextAreaElement || eventTarget instanceof HTMLSelectElement) {
|
|
1606
|
+
if (e.target instanceof HTMLButtonElement || e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement || e.target instanceof HTMLSelectElement) {
|
|
1730
1607
|
stateRef.current.isFocused = true;
|
|
1731
|
-
let target =
|
|
1608
|
+
let target = e.target;
|
|
1732
1609
|
let onBlurHandler = (e)=>{
|
|
1733
1610
|
stateRef.current.isFocused = false;
|
|
1734
1611
|
if (target.disabled) {
|
|
1735
1612
|
// For backward compatibility, dispatch a (fake) React synthetic event.
|
|
1736
1613
|
let event = $8a9cb279dc87e130$export$525bc4921d56d4a(e);
|
|
1737
|
-
|
|
1614
|
+
dispatchBlur(event);
|
|
1738
1615
|
}
|
|
1739
1616
|
// We no longer need the MutationObserver once the target is blurred.
|
|
1740
1617
|
if (stateRef.current.observer) {
|
|
@@ -1749,7 +1626,7 @@ function $8a9cb279dc87e130$export$715c682d09d639cc(onBlur) {
|
|
|
1749
1626
|
if (stateRef.current.isFocused && target.disabled) {
|
|
1750
1627
|
var _stateRef_current_observer;
|
|
1751
1628
|
(_stateRef_current_observer = stateRef.current.observer) === null || _stateRef_current_observer === void 0 ? void 0 : _stateRef_current_observer.disconnect();
|
|
1752
|
-
let relatedTargetEl = target ===
|
|
1629
|
+
let relatedTargetEl = target === document.activeElement ? null : document.activeElement;
|
|
1753
1630
|
target.dispatchEvent(new FocusEvent('blur', {
|
|
1754
1631
|
relatedTarget: relatedTargetEl
|
|
1755
1632
|
}));
|
|
@@ -1767,7 +1644,7 @@ function $8a9cb279dc87e130$export$715c682d09d639cc(onBlur) {
|
|
|
1767
1644
|
});
|
|
1768
1645
|
}
|
|
1769
1646
|
}, [
|
|
1770
|
-
|
|
1647
|
+
dispatchBlur
|
|
1771
1648
|
]);
|
|
1772
1649
|
}
|
|
1773
1650
|
let $8a9cb279dc87e130$export$fda7da73ab5d4c48 = false;
|
|
@@ -1780,10 +1657,10 @@ function $8a9cb279dc87e130$export$cabe61c495ee3649(target) {
|
|
|
1780
1657
|
$8a9cb279dc87e130$export$fda7da73ab5d4c48 = true;
|
|
1781
1658
|
let isRefocusing = false;
|
|
1782
1659
|
let onBlur = (e)=>{
|
|
1783
|
-
if (
|
|
1660
|
+
if (e.target === activeElement || isRefocusing) e.stopImmediatePropagation();
|
|
1784
1661
|
};
|
|
1785
1662
|
let onFocusOut = (e)=>{
|
|
1786
|
-
if (
|
|
1663
|
+
if (e.target === activeElement || isRefocusing) {
|
|
1787
1664
|
e.stopImmediatePropagation();
|
|
1788
1665
|
// If there was no focusable ancestor, we don't expect a focus event.
|
|
1789
1666
|
// Re-focus the original active element here.
|
|
@@ -1795,10 +1672,10 @@ function $8a9cb279dc87e130$export$cabe61c495ee3649(target) {
|
|
|
1795
1672
|
}
|
|
1796
1673
|
};
|
|
1797
1674
|
let onFocus = (e)=>{
|
|
1798
|
-
if (
|
|
1675
|
+
if (e.target === target || isRefocusing) e.stopImmediatePropagation();
|
|
1799
1676
|
};
|
|
1800
1677
|
let onFocusIn = (e)=>{
|
|
1801
|
-
if (
|
|
1678
|
+
if (e.target === target || isRefocusing) {
|
|
1802
1679
|
e.stopImmediatePropagation();
|
|
1803
1680
|
if (!isRefocusing) {
|
|
1804
1681
|
isRefocusing = true;
|
|
@@ -1843,7 +1720,7 @@ function $8a9cb279dc87e130$export$cabe61c495ee3649(target) {
|
|
|
1843
1720
|
|
|
1844
1721
|
|
|
1845
1722
|
let $507fabe10e71c6fb$var$currentModality = null;
|
|
1846
|
-
|
|
1723
|
+
let $507fabe10e71c6fb$var$changeHandlers = new Set();
|
|
1847
1724
|
let $507fabe10e71c6fb$export$d90243b58daecda7 = new Map(); // We use a map here to support setting event listeners across multiple document objects.
|
|
1848
1725
|
let $507fabe10e71c6fb$var$hasEventBeforeFocus = false;
|
|
1849
1726
|
let $507fabe10e71c6fb$var$hasBlurredWindowRecently = false;
|
|
@@ -1853,7 +1730,7 @@ const $507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS = {
|
|
|
1853
1730
|
Escape: true
|
|
1854
1731
|
};
|
|
1855
1732
|
function $507fabe10e71c6fb$var$triggerChangeHandlers(modality, e) {
|
|
1856
|
-
for (let handler of $507fabe10e71c6fb$
|
|
1733
|
+
for (let handler of $507fabe10e71c6fb$var$changeHandlers)handler(modality, e);
|
|
1857
1734
|
}
|
|
1858
1735
|
/**
|
|
1859
1736
|
* Helper function to determine if a KeyboardEvent is unmodified and could make keyboard focus styles visible.
|
|
@@ -1863,21 +1740,20 @@ function $507fabe10e71c6fb$var$triggerChangeHandlers(modality, e) {
|
|
|
1863
1740
|
}
|
|
1864
1741
|
function $507fabe10e71c6fb$var$handleKeyboardEvent(e) {
|
|
1865
1742
|
$507fabe10e71c6fb$var$hasEventBeforeFocus = true;
|
|
1866
|
-
if (
|
|
1743
|
+
if ($507fabe10e71c6fb$var$isValidKey(e)) {
|
|
1867
1744
|
$507fabe10e71c6fb$var$currentModality = 'keyboard';
|
|
1868
1745
|
$507fabe10e71c6fb$var$triggerChangeHandlers('keyboard', e);
|
|
1869
1746
|
}
|
|
1870
1747
|
}
|
|
1871
1748
|
function $507fabe10e71c6fb$var$handlePointerEvent(e) {
|
|
1872
1749
|
$507fabe10e71c6fb$var$currentModality = 'pointer';
|
|
1873
|
-
'pointerType' in e ? e.pointerType : 'mouse';
|
|
1874
1750
|
if (e.type === 'mousedown' || e.type === 'pointerdown') {
|
|
1875
1751
|
$507fabe10e71c6fb$var$hasEventBeforeFocus = true;
|
|
1876
1752
|
$507fabe10e71c6fb$var$triggerChangeHandlers('pointer', e);
|
|
1877
1753
|
}
|
|
1878
1754
|
}
|
|
1879
1755
|
function $507fabe10e71c6fb$var$handleClickEvent(e) {
|
|
1880
|
-
if (
|
|
1756
|
+
if (($6a7db85432448f7f$export$60278871457622de)(e)) {
|
|
1881
1757
|
$507fabe10e71c6fb$var$hasEventBeforeFocus = true;
|
|
1882
1758
|
$507fabe10e71c6fb$var$currentModality = 'virtual';
|
|
1883
1759
|
}
|
|
@@ -1886,7 +1762,7 @@ function $507fabe10e71c6fb$var$handleFocusEvent(e) {
|
|
|
1886
1762
|
// Firefox fires two extra focus events when the user first clicks into an iframe:
|
|
1887
1763
|
// first on the window, then on the document. We ignore these events so they don't
|
|
1888
1764
|
// cause keyboard focus rings to appear.
|
|
1889
|
-
if (
|
|
1765
|
+
if (e.target === window || e.target === document || ($8a9cb279dc87e130$export$fda7da73ab5d4c48) || !e.isTrusted) return;
|
|
1890
1766
|
// If a focus event occurs without a preceding keyboard or pointer event, switch to virtual modality.
|
|
1891
1767
|
// This occurs, for example, when navigating a form with the next/previous buttons on iOS.
|
|
1892
1768
|
if (!$507fabe10e71c6fb$var$hasEventBeforeFocus && !$507fabe10e71c6fb$var$hasBlurredWindowRecently) {
|
|
@@ -2006,30 +1882,27 @@ const $507fabe10e71c6fb$var$nonTextInputTypes = new Set([
|
|
|
2006
1882
|
* If this is attached to text input component, return if the event is a focus event (Tab/Escape keys pressed) so that
|
|
2007
1883
|
* focus visible style can be properly set.
|
|
2008
1884
|
*/ function $507fabe10e71c6fb$var$isKeyboardFocusEvent(isTextInput, modality, e) {
|
|
2009
|
-
let document1 = ($431fbd86ca7dc216$export$b204af158042fbac)(e
|
|
2010
|
-
|
|
2011
|
-
const
|
|
2012
|
-
const
|
|
2013
|
-
const
|
|
2014
|
-
const IKeyboardEvent = typeof window !== 'undefined' ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(eventTarget).KeyboardEvent : KeyboardEvent;
|
|
1885
|
+
let document1 = ($431fbd86ca7dc216$export$b204af158042fbac)(e === null || e === void 0 ? void 0 : e.target);
|
|
1886
|
+
const IHTMLInputElement = typeof window !== 'undefined' ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(e === null || e === void 0 ? void 0 : e.target).HTMLInputElement : HTMLInputElement;
|
|
1887
|
+
const IHTMLTextAreaElement = typeof window !== 'undefined' ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(e === null || e === void 0 ? void 0 : e.target).HTMLTextAreaElement : HTMLTextAreaElement;
|
|
1888
|
+
const IHTMLElement = typeof window !== 'undefined' ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(e === null || e === void 0 ? void 0 : e.target).HTMLElement : HTMLElement;
|
|
1889
|
+
const IKeyboardEvent = typeof window !== 'undefined' ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(e === null || e === void 0 ? void 0 : e.target).KeyboardEvent : KeyboardEvent;
|
|
2015
1890
|
// 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)
|
|
2016
1891
|
// we need to rely on the user passing isTextInput into here. This way we can skip toggling focus visiblity for said input element
|
|
2017
|
-
|
|
2018
|
-
isTextInput = isTextInput || activeElement instanceof IHTMLInputElement && !$507fabe10e71c6fb$var$nonTextInputTypes.has(activeElement.type) || activeElement instanceof IHTMLTextAreaElement || activeElement instanceof IHTMLElement && activeElement.isContentEditable;
|
|
1892
|
+
isTextInput = isTextInput || document1.activeElement instanceof IHTMLInputElement && !$507fabe10e71c6fb$var$nonTextInputTypes.has(document1.activeElement.type) || document1.activeElement instanceof IHTMLTextAreaElement || document1.activeElement instanceof IHTMLElement && document1.activeElement.isContentEditable;
|
|
2019
1893
|
return !(isTextInput && modality === 'keyboard' && e instanceof IKeyboardEvent && !$507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS[e.key]);
|
|
2020
1894
|
}
|
|
2021
1895
|
function $507fabe10e71c6fb$export$ec71b4b83ac08ec3(fn, deps, opts) {
|
|
2022
1896
|
$507fabe10e71c6fb$var$setupGlobalFocusEvents();
|
|
2023
1897
|
(React.useEffect)(()=>{
|
|
2024
|
-
if ((opts === null || opts === void 0 ? void 0 : opts.enabled) === false) return;
|
|
2025
1898
|
let handler = (modality, e)=>{
|
|
2026
1899
|
// We want to early return for any keyboard events that occur inside text inputs EXCEPT for Tab and Escape
|
|
2027
1900
|
if (!$507fabe10e71c6fb$var$isKeyboardFocusEvent(!!(opts === null || opts === void 0 ? void 0 : opts.isTextInput), modality, e)) return;
|
|
2028
1901
|
fn($507fabe10e71c6fb$export$b9b3dfddab17db27());
|
|
2029
1902
|
};
|
|
2030
|
-
$507fabe10e71c6fb$
|
|
1903
|
+
$507fabe10e71c6fb$var$changeHandlers.add(handler);
|
|
2031
1904
|
return ()=>{
|
|
2032
|
-
$507fabe10e71c6fb$
|
|
1905
|
+
$507fabe10e71c6fb$var$changeHandlers.delete(handler);
|
|
2033
1906
|
};
|
|
2034
1907
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2035
1908
|
}, deps);
|
|
@@ -2048,19 +1921,18 @@ function $507fabe10e71c6fb$export$ec71b4b83ac08ec3(fn, deps, opts) {
|
|
|
2048
1921
|
*/
|
|
2049
1922
|
|
|
2050
1923
|
function $3ad3f6e1647bc98d$export$80f3e147d781571c(element) {
|
|
2051
|
-
if (!element.isConnected) return;
|
|
2052
1924
|
// If the user is interacting with a virtual cursor, e.g. screen reader, then
|
|
2053
1925
|
// wait until after any animated transitions that are currently occurring on
|
|
2054
1926
|
// the page before shifting focus. This avoids issues with VoiceOver on iOS
|
|
2055
1927
|
// causing the page to scroll when moving focus if the element is transitioning
|
|
2056
1928
|
// from off the screen.
|
|
2057
1929
|
const ownerDocument = ($431fbd86ca7dc216$export$b204af158042fbac)(element);
|
|
1930
|
+
const activeElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)(ownerDocument);
|
|
2058
1931
|
if (($507fabe10e71c6fb$export$630ff653c5ada6a9)() === 'virtual') {
|
|
2059
|
-
let lastFocusedElement =
|
|
1932
|
+
let lastFocusedElement = activeElement;
|
|
2060
1933
|
($bbed8b41f857bcc0$export$24490316f764c430)(()=>{
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
if ((activeElement === lastFocusedElement || activeElement === ownerDocument.body) && element.isConnected) ($7215afc6de606d6b$export$de79e2c695e052f3)(element);
|
|
1934
|
+
// If focus did not move and the element is still in the document, focus it.
|
|
1935
|
+
if (($d4ee10de306f2510$export$cd4e5573fbe2b576)(ownerDocument) === lastFocusedElement && element.isConnected) ($7215afc6de606d6b$export$de79e2c695e052f3)(element);
|
|
2064
1936
|
});
|
|
2065
1937
|
} else ($7215afc6de606d6b$export$de79e2c695e052f3)(element);
|
|
2066
1938
|
}
|
|
@@ -2085,7 +1957,7 @@ function $3ad3f6e1647bc98d$export$80f3e147d781571c(element) {
|
|
|
2085
1957
|
function $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(props) {
|
|
2086
1958
|
let { isDisabled: isDisabled, onFocus: onFocusProp, onBlur: onBlurProp, onFocusChange: onFocusChange } = props;
|
|
2087
1959
|
const onBlur = (React.useCallback)((e)=>{
|
|
2088
|
-
if (
|
|
1960
|
+
if (e.target === e.currentTarget) {
|
|
2089
1961
|
if (onBlurProp) onBlurProp(e);
|
|
2090
1962
|
if (onFocusChange) onFocusChange(false);
|
|
2091
1963
|
return true;
|
|
@@ -2098,10 +1970,9 @@ function $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(props) {
|
|
|
2098
1970
|
const onFocus = (React.useCallback)((e)=>{
|
|
2099
1971
|
// Double check that document.activeElement actually matches e.target in case a previously chained
|
|
2100
1972
|
// focus handler already moved focus somewhere else.
|
|
2101
|
-
|
|
2102
|
-
const ownerDocument = ($431fbd86ca7dc216$export$b204af158042fbac)(eventTarget);
|
|
1973
|
+
const ownerDocument = ($431fbd86ca7dc216$export$b204af158042fbac)(e.target);
|
|
2103
1974
|
const activeElement = ownerDocument ? ($d4ee10de306f2510$export$cd4e5573fbe2b576)(ownerDocument) : ($d4ee10de306f2510$export$cd4e5573fbe2b576)();
|
|
2104
|
-
if (
|
|
1975
|
+
if (e.target === e.currentTarget && activeElement === ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e.nativeEvent)) {
|
|
2105
1976
|
if (onFocusProp) onFocusProp(e);
|
|
2106
1977
|
if (onFocusChange) onFocusChange(true);
|
|
2107
1978
|
onSyntheticFocus(e);
|
|
@@ -2249,11 +2120,11 @@ function $9ab94262bd0047c7$export$420e68273165f4ec(props) {
|
|
|
2249
2120
|
let { addGlobalListener: addGlobalListener, removeAllGlobalListeners: removeAllGlobalListeners } = ($03deb23ff14920c4$export$4eaf04e54aa8eed6)();
|
|
2250
2121
|
let onBlur = (React.useCallback)((e)=>{
|
|
2251
2122
|
// Ignore events bubbling through portals.
|
|
2252
|
-
if (!
|
|
2123
|
+
if (!e.currentTarget.contains(e.target)) return;
|
|
2253
2124
|
// We don't want to trigger onBlurWithin and then immediately onFocusWithin again
|
|
2254
2125
|
// when moving focus inside the element. Only trigger if the currentTarget doesn't
|
|
2255
2126
|
// include the relatedTarget (where focus is moving).
|
|
2256
|
-
if (state.current.isFocusWithin && !
|
|
2127
|
+
if (state.current.isFocusWithin && !e.currentTarget.contains(e.relatedTarget)) {
|
|
2257
2128
|
state.current.isFocusWithin = false;
|
|
2258
2129
|
removeAllGlobalListeners();
|
|
2259
2130
|
if (onBlurWithin) onBlurWithin(e);
|
|
@@ -2268,13 +2139,12 @@ function $9ab94262bd0047c7$export$420e68273165f4ec(props) {
|
|
|
2268
2139
|
let onSyntheticFocus = ($8a9cb279dc87e130$export$715c682d09d639cc)(onBlur);
|
|
2269
2140
|
let onFocus = (React.useCallback)((e)=>{
|
|
2270
2141
|
// Ignore events bubbling through portals.
|
|
2271
|
-
if (!
|
|
2142
|
+
if (!e.currentTarget.contains(e.target)) return;
|
|
2272
2143
|
// Double check that document.activeElement actually matches e.target in case a previously chained
|
|
2273
2144
|
// focus handler already moved focus somewhere else.
|
|
2274
|
-
|
|
2275
|
-
const ownerDocument = ($431fbd86ca7dc216$export$b204af158042fbac)(eventTarget);
|
|
2145
|
+
const ownerDocument = ($431fbd86ca7dc216$export$b204af158042fbac)(e.target);
|
|
2276
2146
|
const activeElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)(ownerDocument);
|
|
2277
|
-
if (!state.current.isFocusWithin && activeElement ===
|
|
2147
|
+
if (!state.current.isFocusWithin && activeElement === ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e.nativeEvent)) {
|
|
2278
2148
|
if (onFocusWithin) onFocusWithin(e);
|
|
2279
2149
|
if (onFocusWithinChange) onFocusWithinChange(true);
|
|
2280
2150
|
state.current.isFocusWithin = true;
|
|
@@ -2284,10 +2154,9 @@ function $9ab94262bd0047c7$export$420e68273165f4ec(props) {
|
|
|
2284
2154
|
// can manually fire onBlur.
|
|
2285
2155
|
let currentTarget = e.currentTarget;
|
|
2286
2156
|
addGlobalListener(ownerDocument, 'focus', (e)=>{
|
|
2287
|
-
|
|
2288
|
-
if (state.current.isFocusWithin && !($d4ee10de306f2510$export$4282f70798064fe0)(currentTarget, eventTarget)) {
|
|
2157
|
+
if (state.current.isFocusWithin && !($d4ee10de306f2510$export$4282f70798064fe0)(currentTarget, e.target)) {
|
|
2289
2158
|
let nativeEvent = new ownerDocument.defaultView.FocusEvent('blur', {
|
|
2290
|
-
relatedTarget:
|
|
2159
|
+
relatedTarget: e.target
|
|
2291
2160
|
});
|
|
2292
2161
|
($8a9cb279dc87e130$export$c2b7abe5d61ec696)(nativeEvent, currentTarget);
|
|
2293
2162
|
let event = ($8a9cb279dc87e130$export$525bc4921d56d4a)(nativeEvent);
|
|
@@ -2381,7 +2250,7 @@ function $6179b936705e76d3$export$ae780daf29e6d456(props) {
|
|
|
2381
2250
|
let { hoverProps: hoverProps, triggerHoverEnd: triggerHoverEnd } = (React.useMemo)(()=>{
|
|
2382
2251
|
let triggerHoverStart = (event, pointerType)=>{
|
|
2383
2252
|
state.pointerType = pointerType;
|
|
2384
|
-
if (isDisabled || pointerType === 'touch' || state.isHovered || !
|
|
2253
|
+
if (isDisabled || pointerType === 'touch' || state.isHovered || !event.currentTarget.contains(event.target)) return;
|
|
2385
2254
|
state.isHovered = true;
|
|
2386
2255
|
let target = event.currentTarget;
|
|
2387
2256
|
state.target = target;
|
|
@@ -2389,8 +2258,8 @@ function $6179b936705e76d3$export$ae780daf29e6d456(props) {
|
|
|
2389
2258
|
// even though the originally hovered target may have shrunk in size so it is no longer hovered.
|
|
2390
2259
|
// However, a pointerover event will be fired on the new target the mouse is over.
|
|
2391
2260
|
// In Chrome this happens immediately. In Safari and Firefox, it happens upon moving the mouse one pixel.
|
|
2392
|
-
addGlobalListener(($431fbd86ca7dc216$export$b204af158042fbac)(
|
|
2393
|
-
if (state.isHovered && state.target && !($d4ee10de306f2510$export$4282f70798064fe0)(state.target,
|
|
2261
|
+
addGlobalListener(($431fbd86ca7dc216$export$b204af158042fbac)(event.target), 'pointerover', (e)=>{
|
|
2262
|
+
if (state.isHovered && state.target && !($d4ee10de306f2510$export$4282f70798064fe0)(state.target, e.target)) triggerHoverEnd(e, e.pointerType);
|
|
2394
2263
|
}, {
|
|
2395
2264
|
capture: true
|
|
2396
2265
|
});
|
|
@@ -2424,7 +2293,7 @@ function $6179b936705e76d3$export$ae780daf29e6d456(props) {
|
|
|
2424
2293
|
triggerHoverStart(e, e.pointerType);
|
|
2425
2294
|
};
|
|
2426
2295
|
hoverProps.onPointerLeave = (e)=>{
|
|
2427
|
-
if (!isDisabled &&
|
|
2296
|
+
if (!isDisabled && e.currentTarget.contains(e.target)) triggerHoverEnd(e, e.pointerType);
|
|
2428
2297
|
};
|
|
2429
2298
|
} else if (process.env.NODE_ENV === 'test') {
|
|
2430
2299
|
hoverProps.onTouchStart = ()=>{
|
|
@@ -2435,7 +2304,7 @@ function $6179b936705e76d3$export$ae780daf29e6d456(props) {
|
|
|
2435
2304
|
state.ignoreEmulatedMouseEvents = false;
|
|
2436
2305
|
};
|
|
2437
2306
|
hoverProps.onMouseLeave = (e)=>{
|
|
2438
|
-
if (!isDisabled &&
|
|
2307
|
+
if (!isDisabled && e.currentTarget.contains(e.target)) triggerHoverEnd(e, 'mouse');
|
|
2439
2308
|
};
|
|
2440
2309
|
}
|
|
2441
2310
|
return {
|
|
@@ -2592,21 +2461,18 @@ exports.$bdb11010cef70236$export$f680877a34711e37 = $bdb11010cef70236$export$f68
|
|
|
2592
2461
|
exports.$c87311424ea30a05$export$186c6964ca17d99 = $c87311424ea30a05$export$186c6964ca17d99;
|
|
2593
2462
|
exports.$c87311424ea30a05$export$6446a186d09e379e = $c87311424ea30a05$export$6446a186d09e379e;
|
|
2594
2463
|
exports.$c87311424ea30a05$export$78551043582a6a98 = $c87311424ea30a05$export$78551043582a6a98;
|
|
2464
|
+
exports.$c87311424ea30a05$export$7bef049ce92e4224 = $c87311424ea30a05$export$7bef049ce92e4224;
|
|
2595
2465
|
exports.$c87311424ea30a05$export$9ac100e40613ea10 = $c87311424ea30a05$export$9ac100e40613ea10;
|
|
2596
2466
|
exports.$c87311424ea30a05$export$a11b0059900ceec8 = $c87311424ea30a05$export$a11b0059900ceec8;
|
|
2467
|
+
exports.$c87311424ea30a05$export$b7d78993b74f766d = $c87311424ea30a05$export$b7d78993b74f766d;
|
|
2597
2468
|
exports.$c87311424ea30a05$export$e1865c3bedcd822b = $c87311424ea30a05$export$e1865c3bedcd822b;
|
|
2598
2469
|
exports.$c87311424ea30a05$export$fedb369cb70207f1 = $c87311424ea30a05$export$fedb369cb70207f1;
|
|
2599
2470
|
exports.$d4ee10de306f2510$export$4282f70798064fe0 = $d4ee10de306f2510$export$4282f70798064fe0;
|
|
2600
|
-
exports.$d4ee10de306f2510$export$b4f377a2b6254582 = $d4ee10de306f2510$export$b4f377a2b6254582;
|
|
2601
2471
|
exports.$d4ee10de306f2510$export$cd4e5573fbe2b576 = $d4ee10de306f2510$export$cd4e5573fbe2b576;
|
|
2602
2472
|
exports.$d4ee10de306f2510$export$e58f029f0fbfdb29 = $d4ee10de306f2510$export$e58f029f0fbfdb29;
|
|
2603
2473
|
exports.$df56164dff5785e2$export$4338b53315abf666 = $df56164dff5785e2$export$4338b53315abf666;
|
|
2604
2474
|
exports.$e7801be82b4b2a53$export$4debdb1a3f0fa79e = $e7801be82b4b2a53$export$4debdb1a3f0fa79e;
|
|
2605
2475
|
exports.$e9faafb641e167db$export$90fc3a17d93f704c = $e9faafb641e167db$export$90fc3a17d93f704c;
|
|
2606
|
-
exports.$ea8dcbcb9ea1b556$export$13aea1a3cb5e3f1f = $ea8dcbcb9ea1b556$export$13aea1a3cb5e3f1f;
|
|
2607
|
-
exports.$ea8dcbcb9ea1b556$export$7e924b3091a3bd18 = $ea8dcbcb9ea1b556$export$7e924b3091a3bd18;
|
|
2608
|
-
exports.$ea8dcbcb9ea1b556$export$95185d699e05d4d7 = $ea8dcbcb9ea1b556$export$95185d699e05d4d7;
|
|
2609
|
-
exports.$ea8dcbcb9ea1b556$export$9a302a45f65d0572 = $ea8dcbcb9ea1b556$export$9a302a45f65d0572;
|
|
2610
2476
|
exports.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c;
|
|
2611
2477
|
exports.$f39a9eba43920ace$export$86427a43e3e48ebb = $f39a9eba43920ace$export$86427a43e3e48ebb;
|
|
2612
2478
|
exports.$f39a9eba43920ace$export$8dc98ba7eadeaa56 = $f39a9eba43920ace$export$8dc98ba7eadeaa56;
|