@eightshift/ui-components 8.1.0 → 8.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/{Autocomplete-BUU44AuW.js → Autocomplete-CO9aIsTe.js} +29 -25
- package/dist/{Button-_E2Z5G2l.js → Button-DO3oQfCq.js} +15 -9
- package/dist/{Dialog-3XLIaepk.js → Dialog-Bdqjmtt2.js} +293 -160
- package/dist/{Disclosure-Dh0z_DEQ.js → Disclosure-BTSsPhG9.js} +33 -29
- package/dist/{FocusScope-BKGWN6UK.js → FocusScope-Cj6cUR6X.js} +8 -6
- package/dist/{Heading-BWTs9ckA.js → Heading-BQje2nS2.js} +1 -1
- package/dist/{I18nProvider-BskRMK8G.js → I18nProvider-R_4IDnf9.js} +1 -1
- package/dist/{Label-UpU4cKPh.js → Label-C4bJkVti.js} +1 -1
- package/dist/{ListBox-DepY-52g.js → ListBox-CBvtIFuB.js} +20 -16
- package/dist/{NumberFormatter-WKBRKiEA.js → NumberFormatter-Bwdv413k.js} +4 -2
- package/dist/{RadioGroup-Br9Mn9QJ.js → RadioGroup-Dxzko0ma.js} +35 -35
- package/dist/{SearchField-q2Fj0L9K.js → SearchField-zY9JqR1c.js} +29 -26
- package/dist/{Slider-B8icnyOo.js → Slider-BXc72kE0.js} +55 -44
- package/dist/{Text-D4y19vs8.js → Text-i-ZK4MiL.js} +1 -1
- package/dist/{VisuallyHidden-B_LZ_kn7.js → VisuallyHidden-CsM0VnV1.js} +2 -2
- package/dist/{animation-DpSgtWyu.js → animation-COc9P6ap.js} +2 -4
- package/dist/assets/{image-analysis-worker-BuHru-CI.js → image-analysis-worker-CBOB71mx.js} +1 -1
- package/dist/assets/style-admin.css +1 -1
- package/dist/assets/style-editor.css +1 -1
- package/dist/assets/style.css +1 -1
- package/dist/{button-XSk_8UW7.js → button-C7mc6eS1.js} +15 -12
- package/dist/{checkbox-BYaS9tQ5.js → checkbox-DlG5DILl.js} +8 -8
- package/dist/{color-swatch-6ZEIXej3.js → color-swatch-D6xMLGU-.js} +14 -15
- package/dist/components/animated-visibility/animated-visibility.js +5 -3
- package/dist/components/base-control/base-control.js +1 -1
- package/dist/components/base-control/container.d.ts +4 -30
- package/dist/components/base-control/container.js +5 -32
- package/dist/components/breakpoint-preview/breakpoint-preview.js +1 -1
- package/dist/components/button/button.js +1 -1
- package/dist/components/checkbox/checkbox.js +1 -1
- package/dist/components/color-pickers/color-picker.js +7 -7
- package/dist/components/color-pickers/color-swatch.js +1 -1
- package/dist/components/color-pickers/gradient-editor.js +1 -1
- package/dist/components/color-pickers/solid-color-picker.js +1 -1
- package/dist/components/component-toggle/component-toggle.js +3 -3
- package/dist/components/container-panel/container-panel.js +11 -11
- package/dist/components/contextual-help/contextual-help.js +2 -2
- package/dist/components/draggable/draggable.d.ts +3 -3
- package/dist/components/draggable/draggable.js +1 -1
- package/dist/components/draggable-list/draggable-list.d.ts +3 -3
- package/dist/components/draggable-list/draggable-list.js +8 -8
- package/dist/components/expandable/expandable.js +3 -3
- package/dist/components/index.js +16 -16
- package/dist/components/input-field/input-field.js +1 -1
- package/dist/components/item-collection/item-collection.d.ts +3 -28
- package/dist/components/item-collection/item-collection.js +6 -6
- package/dist/components/link-input/link-input.d.ts +0 -2
- package/dist/components/link-input/link-input.js +1 -1
- package/dist/components/matrix-align/matrix-align.js +4 -3
- package/dist/components/menu/menu.js +10 -7
- package/dist/components/modal/modal.js +1 -1
- package/dist/components/notice/notice.js +8 -8
- package/dist/components/number-picker/number-picker.js +1 -1
- package/dist/components/option-select/option-select.d.ts +1 -1
- package/dist/components/option-select/option-select.js +21 -15
- package/dist/components/options-panel/options-panel.js +4 -4
- package/dist/components/placeholders/file-picker-shell.js +4 -3
- package/dist/components/placeholders/file-placeholder.js +2 -1
- package/dist/components/popover/popover.js +3 -3
- package/dist/components/portal-provider/portal-provider.js +2 -1
- package/dist/components/radio/radio.js +2 -2
- package/dist/components/repeater/repeater-context.d.ts +0 -1
- package/dist/components/repeater/repeater-item.js +1 -1
- package/dist/components/repeater/repeater.d.ts +5 -38
- package/dist/components/repeater/repeater.js +7 -10
- package/dist/components/responsive/mini-responsive.d.ts +0 -1
- package/dist/components/responsive/mini-responsive.js +30 -30
- package/dist/components/responsive/responsive-legacy.d.ts +0 -1
- package/dist/components/responsive/responsive-legacy.js +12 -10
- package/dist/components/responsive/responsive.d.ts +0 -1
- package/dist/components/responsive/responsive.js +28 -28
- package/dist/components/responsive-preview/responsive-preview.js +3 -3
- package/dist/components/select/async-multi-select.d.ts +12 -13
- package/dist/components/select/async-multi-select.js +39 -20
- package/dist/components/select/async-select.d.ts +12 -13
- package/dist/components/select/async-select.js +38 -20
- package/dist/components/select/multi-select.d.ts +2 -8
- package/dist/components/select/multi-select.js +19 -19
- package/dist/components/select/shared.d.ts +5 -9
- package/dist/components/select/shared.js +2 -2
- package/dist/components/select/single-select.d.ts +2 -8
- package/dist/components/select/single-select.js +16 -16
- package/dist/components/slider/column-config-slider.js +7 -5
- package/dist/components/slider/slider.js +15 -11
- package/dist/components/smart-image/smart-image.d.ts +0 -1
- package/dist/components/smart-image/smart-image.js +52 -50
- package/dist/components/tabs/tabs.js +1 -1
- package/dist/components/toggle/switch.js +1 -1
- package/dist/components/toggle/toggle.js +2 -2
- package/dist/components/toggle-button/toggle-button.js +1 -1
- package/dist/components/tooltip/tooltip.js +1 -1
- package/dist/{draggable-9MfdTVWP.js → draggable-BUfOpGSZ.js} +129 -124
- package/dist/{es-dash-DunirOmV.js → es-dash-DPtJSRjw.js} +23 -52
- package/dist/{gradient-editor-yqSw0uPA.js → gradient-editor-_q3XF10i.js} +38 -29
- package/dist/icons/block-icon.js +1 -1
- package/dist/icons/icon.d.ts +3 -3
- package/dist/icons/icon.js +21 -9
- package/dist/icons/icons.d.ts +210 -1
- package/dist/icons/index.js +1 -1
- package/dist/icons/jsx-svg.d.ts +5 -4
- package/dist/icons/jsx-svg.js +1 -1
- package/dist/index.js +16 -16
- package/dist/{input-field-nN6BO0oz.js → input-field-QzBpjm-m.js} +8 -8
- package/dist/{jsx-svg-BjGQUBLh.js → jsx-svg-DRwJdRpA.js} +171 -129
- package/dist/{keyboard-g5Amam-c.js → keyboard-BxnnQA2Z.js} +1 -1
- package/dist/{link-input-BhlPElU8.js → link-input-CElQp3lP.js} +145 -87
- package/dist/{modal-B5axB0Fc.js → modal-BeacK9N_.js} +14 -13
- package/dist/{number-picker-nnOf0XnN.js → number-picker-CK_OHBXw.js} +9 -9
- package/dist/{react-y40Dt3ab.js → react-C6Y6cCOx.js} +194 -215
- package/dist/{shared-Ba_bt4s9.js → shared-DBCipn_m.js} +59 -43
- package/dist/{solid-color-picker-CsosgTVa.js → solid-color-picker-2-X3ridX.js} +58 -53
- package/dist/{switch-BJ4_OyUm.js → switch-B87lQ1V0.js} +6 -6
- package/dist/{tabs-wAe0AAyu.js → tabs-DgkJUkIX.js} +33 -28
- package/dist/{text-helpers-2j9DuxP1.js → text-helpers-QrwKKaOh.js} +3 -2
- package/dist/{textSelection-B_Nv6Jz3.js → textSelection-5Qk8tLtm.js} +3 -3
- package/dist/{toggle-button-BLJdEp8V.js → toggle-button-B2-f2rU6.js} +8 -7
- package/dist/{tooltip-BW9nj5-V.js → tooltip-AzOLps8g.js} +68 -62
- package/dist/{useAsyncList-B3-uyJgA.js → useAsyncList-CjKVLGN0.js} +8 -4
- package/dist/{useButton-CPMVLXoX.js → useButton-BIrfoiY8.js} +3 -3
- package/dist/{useCollection-PzY6FI39.js → useCollection-LQlZnc1u.js} +267 -180
- package/dist/{useEvent-CzuFZ2HT.js → useEvent-Bih8lvtM.js} +1 -1
- package/dist/{useField-DrfR8j9h.js → useField-B_ibsWst.js} +2 -2
- package/dist/{useFilter-CiCjo6Na.js → useFilter-BFaOw4yi.js} +1 -1
- package/dist/{useFocusRing-CrYHpV7C.js → useFocusRing-ZXFsftJJ.js} +1 -1
- package/dist/{useFormReset-U6c35PHq.js → useFormReset-DDJhIIfG.js} +1 -1
- package/dist/{useFormValidation-B2q2MGWN.js → useFormValidation-BfnJKcdX.js} +2 -2
- package/dist/{useHover-CNsbAR0V.js → useHover-CbyH227W.js} +216 -39
- package/dist/{useLabel-DuxAjaic.js → useLabel-gfFDE4bn.js} +2 -2
- package/dist/{useLabels-NUsp5IW3.js → useLabels-Dcg-cEyM.js} +1 -1
- package/dist/{useListState-FLxa7R_U.js → useListState-I22DfnmE.js} +4 -2
- package/dist/{useLocalizedStringFormatter-Ccm8EL_u.js → useLocalizedStringFormatter-CTCqjYu4.js} +6 -1
- package/dist/{useNumberFieldState-DWvm7CXu.js → useNumberFieldState-C1gD0RuW.js} +79 -62
- package/dist/{useNumberFormatter-B0_D7a_o.js → useNumberFormatter-DbAt_fC_.js} +2 -2
- package/dist/{useOverlayTriggerState-zZ7homyI.js → useOverlayTriggerState-Cpc_IbQf.js} +12 -9
- package/dist/{usePress-DRoujMNm.js → usePress-BF7otjax.js} +30 -19
- package/dist/{useSlot-pRz-v9kC.js → useSlot-CnQHcvd4.js} +1 -1
- package/dist/{useTextField-e8jIFT3s.js → useTextField-CnTuCBMs.js} +6 -6
- package/dist/{useToggle-CR_ZKvr_.js → useToggle-Cgv5UXaB.js} +6 -6
- package/dist/{useToggleState-ButQxGrJ.js → useToggleState-Cy1E36QZ.js} +1 -1
- package/dist/utilities/array-helpers.d.ts +1 -1
- package/dist/utilities/array-helpers.js +4 -3
- package/dist/utilities/debounce-throttle.d.ts +9 -2
- package/dist/utilities/es-dash.d.ts +11 -8
- package/dist/utilities/es-dash.js +1 -1
- package/dist/utilities/index.js +2 -2
- package/dist/utilities/text-helpers.js +1 -1
- package/dist/utilities/web-workers.d.ts +7 -7
- package/dist/utilities/web-workers.js +5 -5
- package/dist/{utils-Czi6q2Ub.js → utils-ClM91CuL.js} +30 -19
- package/package.json +21 -25
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { g as $a4e76a5424781910$export$e08e3b67e392101e, h as $c4867b2f328c2698$export$e5c5a5f917a5871c, m as $c7eafbbe1ea5834e$export$535bd6ca7f90a273, p as $390e54f620492c70$export$f680877a34711e37, u as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./utils-
|
|
2
|
-
import { c as $8b2399d051d06d4c$export$831c820ad60f9d12, o as $b72f3f7b3b5f42c6$export$76e4e37e5339496d, r as $b72f3f7b3b5f42c6$export$2b35b76d2e30e129, s as $8b2399d051d06d4c$export$447a38995de2c711, t as $bb39c0fc1c19b34c$export$16792effe837dba3 } from "./keyboard-
|
|
3
|
-
import { A as $2add3ce32c6007eb$export$e1865c3bedcd822b, B as $23f2114a1b82827e$export$b4f377a2b6254582,
|
|
4
|
-
import { t as $600b3cf69ae46262$export$90fc3a17d93f704c } from "./useEvent-
|
|
5
|
-
import { t as $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7 } from "./I18nProvider-
|
|
1
|
+
import { g as $a4e76a5424781910$export$e08e3b67e392101e, h as $c4867b2f328c2698$export$e5c5a5f917a5871c, m as $c7eafbbe1ea5834e$export$535bd6ca7f90a273, p as $390e54f620492c70$export$f680877a34711e37, u as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./utils-ClM91CuL.js";
|
|
2
|
+
import { c as $8b2399d051d06d4c$export$831c820ad60f9d12, o as $b72f3f7b3b5f42c6$export$76e4e37e5339496d, r as $b72f3f7b3b5f42c6$export$2b35b76d2e30e129, s as $8b2399d051d06d4c$export$447a38995de2c711, t as $bb39c0fc1c19b34c$export$16792effe837dba3 } from "./keyboard-BxnnQA2Z.js";
|
|
3
|
+
import { A as $2add3ce32c6007eb$export$e1865c3bedcd822b, B as $23f2114a1b82827e$export$b4f377a2b6254582, D as $2add3ce32c6007eb$export$78551043582a6a98, K as $d447af545b77c9f1$export$b204af158042fbac, L as $3b8b240c1bf84ab9$export$bebd5a1431fec25d, O as $2add3ce32c6007eb$export$9ac100e40613ea10, R as $1969ac565cfec8d0$export$de79e2c695e052f3, S as $caaf0dd3060ed57c$export$9a302a45f65d0572, U as $23f2114a1b82827e$export$e58f029f0fbfdb29, V as $23f2114a1b82827e$export$cd4e5573fbe2b576, a as $d1116acdf220c2da$export$f9762fab77588ecb, d as $3e6197669829fe11$export$40bfa8c7b0832715, j as $2add3ce32c6007eb$export$fedb369cb70207f1, l as $f192c2f16961cbe0$export$80f3e147d781571c, n as $48a7d519b337145d$export$4eaf04e54aa8eed6, p as $8f5a2122b0992be3$export$630ff653c5ada6a9, q as $d447af545b77c9f1$export$f21a1ffae260145a, s as $8296dad1a4c5e0dc$export$8f71654801c2f7cd, x as $caaf0dd3060ed57c$export$95185d699e05d4d7, z as $23f2114a1b82827e$export$4282f70798064fe0 } from "./useHover-CbyH227W.js";
|
|
4
|
+
import { t as $600b3cf69ae46262$export$90fc3a17d93f704c } from "./useEvent-Bih8lvtM.js";
|
|
5
|
+
import { t as $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7 } from "./I18nProvider-R_4IDnf9.js";
|
|
6
6
|
import { n as $d7f64c32b702fe2c$export$8dc98ba7eadeaa56 } from "./Hidden-C4Saxkx9.js";
|
|
7
|
-
import { t as $d27d541f9569d26d$export$45712eceda6fad21 } from "./usePress-
|
|
8
|
-
import { r as $535772f9d2c1f38d$export$2d6ec8fc375ceafa } from "./FocusScope-
|
|
7
|
+
import { t as $d27d541f9569d26d$export$45712eceda6fad21 } from "./usePress-BF7otjax.js";
|
|
8
|
+
import { r as $535772f9d2c1f38d$export$2d6ec8fc375ceafa } from "./FocusScope-Cj6cUR6X.js";
|
|
9
9
|
import $3ARPR$react, { cloneElement, createContext, forwardRef, isValidElement, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
10
10
|
import { createPortal, flushSync } from "react-dom";
|
|
11
11
|
import { useSyncExternalStore } from "use-sync-external-store/shim/index.js";
|
|
@@ -536,6 +536,7 @@ var $96ead35620b8fd36$export$b34a105447964f9f = class extends $96ead35620b8fd36$
|
|
|
536
536
|
}
|
|
537
537
|
subscribe(fn) {
|
|
538
538
|
this.subscriptions.add(fn);
|
|
539
|
+
if (this.queuedRender) fn();
|
|
539
540
|
return () => this.subscriptions.delete(fn);
|
|
540
541
|
}
|
|
541
542
|
resetAfterSSR() {
|
|
@@ -610,9 +611,10 @@ function $42ceafc619f9c3ba$var$useSyncExternalStoreFallback(subscribe, getSnapsh
|
|
|
610
611
|
let isSSR = $c7eafbbe1ea5834e$export$535bd6ca7f90a273();
|
|
611
612
|
let isSSRRef = useRef(isSSR);
|
|
612
613
|
isSSRRef.current = isSSR;
|
|
613
|
-
|
|
614
|
+
let getSnapshotWrapper = useCallback(() => {
|
|
614
615
|
return isSSRRef.current ? getServerSnapshot() : getSnapshot();
|
|
615
|
-
}, [getSnapshot, getServerSnapshot])
|
|
616
|
+
}, [getSnapshot, getServerSnapshot]);
|
|
617
|
+
return useSyncExternalStore(subscribe, getSnapshotWrapper);
|
|
616
618
|
}
|
|
617
619
|
var $42ceafc619f9c3ba$var$useSyncExternalStore = typeof $3ARPR$react["useSyncExternalStore"] === "function" ? $3ARPR$react["useSyncExternalStore"] : $42ceafc619f9c3ba$var$useSyncExternalStoreFallback;
|
|
618
620
|
function $42ceafc619f9c3ba$var$useCollectionDocument(createCollection) {
|
|
@@ -835,8 +837,8 @@ function $51a3e22a5186a962$export$53a0910f038337bd(scrollView, element, opts = {
|
|
|
835
837
|
let scrollPortBottom = viewBottom - (isRoot ? 0 : borderBottomWidth) - scrollPaddingBottom - scrollBarHeight;
|
|
836
838
|
let scrollPortLeft = viewLeft + (isRoot ? 0 : borderLeftWidth) + scrollPaddingLeft;
|
|
837
839
|
let scrollPortRight = viewRight - (isRoot ? 0 : borderRightWidth) - scrollPaddingRight;
|
|
838
|
-
if (
|
|
839
|
-
else
|
|
840
|
+
if ($2add3ce32c6007eb$export$fedb369cb70207f1() && $2add3ce32c6007eb$export$78551043582a6a98() || viewStyle.direction === "ltr") scrollPortRight -= scrollBarWidth;
|
|
841
|
+
else if (viewStyle.direction === "rtl") scrollPortLeft += scrollBarWidth;
|
|
840
842
|
let shouldScrollBlock = scrollAreaTop < scrollPortTop || scrollAreaBottom > scrollPortBottom;
|
|
841
843
|
let shouldScrollInline = scrollAreaLeft < scrollPortLeft || scrollAreaRight > scrollPortRight;
|
|
842
844
|
if (shouldScrollBlock && block === "start") y += scrollAreaTop - scrollPortTop;
|
|
@@ -1041,139 +1043,189 @@ function $d667c2af82d35a98$export$d6daf82dcd84e87c(options) {
|
|
|
1041
1043
|
let { selectionManager: manager, keyboardDelegate: delegate, ref, autoFocus = false, shouldFocusWrap = false, disallowEmptySelection = false, disallowSelectAll = false, escapeKeyBehavior = "clearSelection", selectOnFocus = manager.selectionBehavior === "replace", disallowTypeAhead = false, shouldUseVirtualFocus, allowsTabNavigation = false, scrollRef = ref, linkBehavior = "action", UNSTABLE_focusOnEntry } = options;
|
|
1042
1044
|
let { direction } = $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7();
|
|
1043
1045
|
let router = $caaf0dd3060ed57c$export$9a302a45f65d0572();
|
|
1044
|
-
|
|
1045
|
-
if (
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
let itemProps = manager.getItemProps(key);
|
|
1055
|
-
if (item) router.open(item, e, itemProps.href, itemProps.routerOptions);
|
|
1046
|
+
const navigateToKey = (e, key, childFocus) => {
|
|
1047
|
+
if (key != null) {
|
|
1048
|
+
if (manager.isLink(key) && linkBehavior === "selection" && selectOnFocus && !$22bbea12c2567021$export$d3e3bd3e26688c04(e)) {
|
|
1049
|
+
flushSync(() => {
|
|
1050
|
+
manager.setFocusedKey(key, childFocus);
|
|
1051
|
+
});
|
|
1052
|
+
let item = $22bbea12c2567021$export$c3d8340acf92597f(ref, key);
|
|
1053
|
+
let itemProps = manager.getItemProps(key);
|
|
1054
|
+
if (item) {
|
|
1055
|
+
router.open(item, e, itemProps.href, itemProps.routerOptions);
|
|
1056
1056
|
return;
|
|
1057
1057
|
}
|
|
1058
|
-
|
|
1059
|
-
if (manager.isLink(key) && linkBehavior === "override") return;
|
|
1060
|
-
if (e.shiftKey && manager.selectionMode === "multiple") manager.extendSelection(key);
|
|
1061
|
-
else if (selectOnFocus && !$22bbea12c2567021$export$d3e3bd3e26688c04(e)) manager.replaceSelection(key);
|
|
1058
|
+
return false;
|
|
1062
1059
|
}
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
if (
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
let firstKey = delegate.getFirstKey(manager.focusedKey, $bb39c0fc1c19b34c$export$16792effe837dba3(e));
|
|
1110
|
-
manager.setFocusedKey(firstKey);
|
|
1111
|
-
if (firstKey != null) {
|
|
1112
|
-
if ($bb39c0fc1c19b34c$export$16792effe837dba3(e) && e.shiftKey && manager.selectionMode === "multiple") manager.extendSelection(firstKey);
|
|
1113
|
-
else if (selectOnFocus) manager.replaceSelection(firstKey);
|
|
1114
|
-
}
|
|
1115
|
-
}
|
|
1116
|
-
break;
|
|
1117
|
-
case "End":
|
|
1118
|
-
if (delegate.getLastKey) {
|
|
1119
|
-
if (manager.focusedKey === null && e.shiftKey) return;
|
|
1120
|
-
e.preventDefault();
|
|
1121
|
-
let lastKey = delegate.getLastKey(manager.focusedKey, $bb39c0fc1c19b34c$export$16792effe837dba3(e));
|
|
1122
|
-
manager.setFocusedKey(lastKey);
|
|
1123
|
-
if (lastKey != null) {
|
|
1124
|
-
if ($bb39c0fc1c19b34c$export$16792effe837dba3(e) && e.shiftKey && manager.selectionMode === "multiple") manager.extendSelection(lastKey);
|
|
1125
|
-
else if (selectOnFocus) manager.replaceSelection(lastKey);
|
|
1126
|
-
}
|
|
1127
|
-
}
|
|
1128
|
-
break;
|
|
1129
|
-
case "PageDown":
|
|
1130
|
-
if (delegate.getKeyPageBelow && manager.focusedKey != null) {
|
|
1131
|
-
let nextKey = delegate.getKeyPageBelow(manager.focusedKey);
|
|
1132
|
-
if (nextKey != null) {
|
|
1133
|
-
e.preventDefault();
|
|
1134
|
-
navigateToKey(nextKey);
|
|
1135
|
-
}
|
|
1136
|
-
}
|
|
1137
|
-
break;
|
|
1138
|
-
case "PageUp":
|
|
1139
|
-
if (delegate.getKeyPageAbove && manager.focusedKey != null) {
|
|
1140
|
-
let nextKey = delegate.getKeyPageAbove(manager.focusedKey);
|
|
1141
|
-
if (nextKey != null) {
|
|
1142
|
-
e.preventDefault();
|
|
1143
|
-
navigateToKey(nextKey);
|
|
1144
|
-
}
|
|
1145
|
-
}
|
|
1146
|
-
break;
|
|
1147
|
-
case "a":
|
|
1148
|
-
if ($bb39c0fc1c19b34c$export$16792effe837dba3(e) && manager.selectionMode === "multiple" && disallowSelectAll !== true) {
|
|
1149
|
-
e.preventDefault();
|
|
1150
|
-
manager.selectAll();
|
|
1151
|
-
}
|
|
1152
|
-
break;
|
|
1153
|
-
case "Escape":
|
|
1154
|
-
if (escapeKeyBehavior === "clearSelection" && !disallowEmptySelection && manager.selectedKeys.size !== 0) {
|
|
1155
|
-
e.stopPropagation();
|
|
1156
|
-
e.preventDefault();
|
|
1157
|
-
manager.clearSelection();
|
|
1060
|
+
manager.setFocusedKey(key, childFocus);
|
|
1061
|
+
if (manager.isLink(key) && linkBehavior === "override") return false;
|
|
1062
|
+
if (e.shiftKey && manager.selectionMode === "multiple") {
|
|
1063
|
+
manager.extendSelection(key);
|
|
1064
|
+
return;
|
|
1065
|
+
} else if (selectOnFocus && !$22bbea12c2567021$export$d3e3bd3e26688c04(e)) {
|
|
1066
|
+
manager.replaceSelection(key);
|
|
1067
|
+
return;
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
return false;
|
|
1071
|
+
};
|
|
1072
|
+
let arrowDown = (e) => {
|
|
1073
|
+
if (delegate.getKeyBelow) {
|
|
1074
|
+
let nextKey = manager.focusedKey != null ? delegate.getKeyBelow?.(manager.focusedKey) : delegate.getFirstKey?.();
|
|
1075
|
+
if (nextKey == null && shouldFocusWrap) nextKey = delegate.getFirstKey?.(manager.focusedKey);
|
|
1076
|
+
if (nextKey != null) {
|
|
1077
|
+
navigateToKey(e, nextKey);
|
|
1078
|
+
return;
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
return false;
|
|
1082
|
+
};
|
|
1083
|
+
let arrowUp = (e) => {
|
|
1084
|
+
if (delegate.getKeyAbove) {
|
|
1085
|
+
let nextKey = manager.focusedKey != null ? delegate.getKeyAbove?.(manager.focusedKey) : delegate.getLastKey?.();
|
|
1086
|
+
if (nextKey == null && shouldFocusWrap) nextKey = delegate.getLastKey?.(manager.focusedKey);
|
|
1087
|
+
if (nextKey != null) {
|
|
1088
|
+
navigateToKey(e, nextKey);
|
|
1089
|
+
return;
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
return false;
|
|
1093
|
+
};
|
|
1094
|
+
let home = (e) => {
|
|
1095
|
+
if (delegate.getFirstKey) {
|
|
1096
|
+
if (manager.focusedKey === null && e.shiftKey) return false;
|
|
1097
|
+
let firstKey = delegate.getFirstKey(manager.focusedKey, $bb39c0fc1c19b34c$export$16792effe837dba3(e));
|
|
1098
|
+
manager.setFocusedKey(firstKey);
|
|
1099
|
+
if (firstKey != null) {
|
|
1100
|
+
if ($bb39c0fc1c19b34c$export$16792effe837dba3(e) && e.shiftKey && manager.selectionMode === "multiple") {
|
|
1101
|
+
manager.extendSelection(firstKey);
|
|
1102
|
+
return;
|
|
1103
|
+
} else if (selectOnFocus) {
|
|
1104
|
+
manager.replaceSelection(firstKey);
|
|
1105
|
+
return;
|
|
1158
1106
|
}
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1109
|
+
return false;
|
|
1110
|
+
};
|
|
1111
|
+
let arrowLeft = (e) => {
|
|
1112
|
+
if (delegate.getKeyLeftOf) {
|
|
1113
|
+
let nextKey = manager.focusedKey != null ? delegate.getKeyLeftOf?.(manager.focusedKey) : delegate.getFirstKey?.();
|
|
1114
|
+
if (nextKey == null && shouldFocusWrap) nextKey = direction === "rtl" ? delegate.getFirstKey?.(manager.focusedKey) : delegate.getLastKey?.(manager.focusedKey);
|
|
1115
|
+
if (nextKey != null) {
|
|
1116
|
+
navigateToKey(e, nextKey, direction === "rtl" ? "first" : "last");
|
|
1117
|
+
return;
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
return false;
|
|
1121
|
+
};
|
|
1122
|
+
let arrowRight = (e) => {
|
|
1123
|
+
if (delegate.getKeyRightOf) {
|
|
1124
|
+
let nextKey = manager.focusedKey != null ? delegate.getKeyRightOf?.(manager.focusedKey) : delegate.getFirstKey?.();
|
|
1125
|
+
if (nextKey == null && shouldFocusWrap) nextKey = direction === "rtl" ? delegate.getLastKey?.(manager.focusedKey) : delegate.getFirstKey?.(manager.focusedKey);
|
|
1126
|
+
if (nextKey != null) {
|
|
1127
|
+
navigateToKey(e, nextKey, direction === "rtl" ? "last" : "first");
|
|
1128
|
+
return;
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
return false;
|
|
1132
|
+
};
|
|
1133
|
+
let end = (e) => {
|
|
1134
|
+
if (delegate.getLastKey) {
|
|
1135
|
+
if (manager.focusedKey === null && e.shiftKey) return false;
|
|
1136
|
+
let lastKey = delegate.getLastKey(manager.focusedKey, $bb39c0fc1c19b34c$export$16792effe837dba3(e));
|
|
1137
|
+
manager.setFocusedKey(lastKey);
|
|
1138
|
+
if (lastKey != null) {
|
|
1139
|
+
if ($bb39c0fc1c19b34c$export$16792effe837dba3(e) && e.shiftKey && manager.selectionMode === "multiple") {
|
|
1140
|
+
manager.extendSelection(lastKey);
|
|
1141
|
+
return;
|
|
1142
|
+
} else if (selectOnFocus) {
|
|
1143
|
+
manager.replaceSelection(lastKey);
|
|
1144
|
+
return;
|
|
1172
1145
|
}
|
|
1173
|
-
break;
|
|
1174
1146
|
}
|
|
1175
1147
|
}
|
|
1148
|
+
return false;
|
|
1149
|
+
};
|
|
1150
|
+
let pageDown = (e) => {
|
|
1151
|
+
if (delegate.getKeyPageBelow && manager.focusedKey != null) {
|
|
1152
|
+
let nextKey = delegate.getKeyPageBelow(manager.focusedKey);
|
|
1153
|
+
if (nextKey != null) return navigateToKey(e, nextKey);
|
|
1154
|
+
}
|
|
1155
|
+
return false;
|
|
1156
|
+
};
|
|
1157
|
+
let pageUp = (e) => {
|
|
1158
|
+
if (delegate.getKeyPageAbove && manager.focusedKey != null) {
|
|
1159
|
+
let nextKey = delegate.getKeyPageAbove(manager.focusedKey);
|
|
1160
|
+
if (nextKey != null) return navigateToKey(e, nextKey);
|
|
1161
|
+
}
|
|
1162
|
+
return false;
|
|
1163
|
+
};
|
|
1164
|
+
let aHandler = () => {
|
|
1165
|
+
if (manager.selectionMode === "multiple" && disallowSelectAll !== true) {
|
|
1166
|
+
manager.selectAll();
|
|
1167
|
+
return;
|
|
1168
|
+
}
|
|
1169
|
+
return false;
|
|
1170
|
+
};
|
|
1171
|
+
let escape = () => {
|
|
1172
|
+
if (escapeKeyBehavior === "clearSelection" && !disallowEmptySelection && manager.selectedKeys.size !== 0) {
|
|
1173
|
+
manager.clearSelection();
|
|
1174
|
+
return;
|
|
1175
|
+
}
|
|
1176
|
+
return false;
|
|
1177
|
+
};
|
|
1178
|
+
let tab = () => {
|
|
1179
|
+
if (!allowsTabNavigation && ref.current) {
|
|
1180
|
+
let walker = $535772f9d2c1f38d$export$2d6ec8fc375ceafa(ref.current, { tabbable: true });
|
|
1181
|
+
let next = void 0;
|
|
1182
|
+
let last;
|
|
1183
|
+
do {
|
|
1184
|
+
last = walker.lastChild();
|
|
1185
|
+
if (last) next = last;
|
|
1186
|
+
} while (last);
|
|
1187
|
+
let activeElement = $23f2114a1b82827e$export$cd4e5573fbe2b576();
|
|
1188
|
+
if (next && (!$23f2114a1b82827e$export$b4f377a2b6254582(next) || activeElement && !$3b8b240c1bf84ab9$export$bebd5a1431fec25d(activeElement))) $1969ac565cfec8d0$export$de79e2c695e052f3(next);
|
|
1189
|
+
}
|
|
1190
|
+
return {
|
|
1191
|
+
shouldContinuePropagation: true,
|
|
1192
|
+
shouldPreventDefault: false
|
|
1193
|
+
};
|
|
1194
|
+
};
|
|
1195
|
+
let shiftTab = () => {
|
|
1196
|
+
if (!allowsTabNavigation && ref.current) ref.current.focus();
|
|
1197
|
+
return {
|
|
1198
|
+
shouldContinuePropagation: true,
|
|
1199
|
+
shouldPreventDefault: false
|
|
1200
|
+
};
|
|
1201
|
+
};
|
|
1202
|
+
let withShiftSel = (key, callback) => {
|
|
1203
|
+
return {
|
|
1204
|
+
[$2add3ce32c6007eb$export$9ac100e40613ea10() ? key + "+Shift+Alt" : key + "+Shift+Control"]: callback,
|
|
1205
|
+
[key + "+Shift"]: callback,
|
|
1206
|
+
[$2add3ce32c6007eb$export$9ac100e40613ea10() ? key + "+Alt" : key + "+Control"]: callback,
|
|
1207
|
+
[key]: callback
|
|
1208
|
+
};
|
|
1176
1209
|
};
|
|
1210
|
+
let { keyboardProps: repeatKeyboardProps } = $8296dad1a4c5e0dc$export$8f71654801c2f7cd({
|
|
1211
|
+
shortcuts: {
|
|
1212
|
+
...withShiftSel("ArrowDown", arrowDown),
|
|
1213
|
+
...withShiftSel("ArrowUp", arrowUp),
|
|
1214
|
+
...withShiftSel("ArrowLeft", arrowLeft),
|
|
1215
|
+
...withShiftSel("ArrowRight", arrowRight),
|
|
1216
|
+
...withShiftSel("PageDown", pageDown),
|
|
1217
|
+
...withShiftSel("PageUp", pageUp)
|
|
1218
|
+
},
|
|
1219
|
+
allowRepeats: true
|
|
1220
|
+
});
|
|
1221
|
+
let { keyboardProps } = $8296dad1a4c5e0dc$export$8f71654801c2f7cd({ shortcuts: {
|
|
1222
|
+
...withShiftSel("Home", home),
|
|
1223
|
+
...withShiftSel("End", end),
|
|
1224
|
+
"Mod+A": aHandler,
|
|
1225
|
+
Escape: escape,
|
|
1226
|
+
Tab: tab,
|
|
1227
|
+
"Tab+Shift": shiftTab
|
|
1228
|
+
} });
|
|
1177
1229
|
let scrollPos = useRef({
|
|
1178
1230
|
top: 0,
|
|
1179
1231
|
left: 0
|
|
@@ -1227,14 +1279,16 @@ function $d667c2af82d35a98$export$d6daf82dcd84e87c(options) {
|
|
|
1227
1279
|
});
|
|
1228
1280
|
let firstKey = delegate.getFirstKey?.() ?? null;
|
|
1229
1281
|
$a475cdc2445827b5$export$72ef708ab07251f1(() => {
|
|
1230
|
-
if (shouldVirtualFocusFirst.current)
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1282
|
+
if (shouldVirtualFocusFirst.current) {
|
|
1283
|
+
if (firstKey == null) {
|
|
1284
|
+
let previousActiveElement = $23f2114a1b82827e$export$cd4e5573fbe2b576();
|
|
1285
|
+
$b72f3f7b3b5f42c6$export$76e4e37e5339496d(ref.current);
|
|
1286
|
+
$b72f3f7b3b5f42c6$export$2b35b76d2e30e129(previousActiveElement, null);
|
|
1287
|
+
if (manager.collection.size > 0) shouldVirtualFocusFirst.current = false;
|
|
1288
|
+
} else {
|
|
1289
|
+
manager.setFocusedKey(firstKey);
|
|
1290
|
+
shouldVirtualFocusFirst.current = false;
|
|
1291
|
+
}
|
|
1238
1292
|
}
|
|
1239
1293
|
}, [firstKey, manager.collection.size]);
|
|
1240
1294
|
$a475cdc2445827b5$export$72ef708ab07251f1(() => {
|
|
@@ -1299,7 +1353,7 @@ function $d667c2af82d35a98$export$d6daf82dcd84e87c(options) {
|
|
|
1299
1353
|
manager.setFocused(true);
|
|
1300
1354
|
});
|
|
1301
1355
|
let handlers = {
|
|
1302
|
-
|
|
1356
|
+
...$bbaa08b3cd72f041$export$9d1611c77c2fe928(keyboardProps, repeatKeyboardProps),
|
|
1303
1357
|
onFocus,
|
|
1304
1358
|
onBlur,
|
|
1305
1359
|
onMouseDown(e) {
|
|
@@ -1323,20 +1377,22 @@ function $d667c2af82d35a98$export$d6daf82dcd84e87c(options) {
|
|
|
1323
1377
|
//#region node_modules/react-aria/dist/private/interactions/useLongPress.mjs
|
|
1324
1378
|
var $7b01448eaad0fe7c$var$DEFAULT_THRESHOLD = 500;
|
|
1325
1379
|
function $7b01448eaad0fe7c$export$c24ed0104d07eab9(props) {
|
|
1326
|
-
let { isDisabled, onLongPressStart, onLongPressEnd, onLongPress, threshold = $7b01448eaad0fe7c$var$DEFAULT_THRESHOLD, accessibilityDescription } = props;
|
|
1380
|
+
let { isDisabled, pointerType, onLongPressStart, onLongPressEnd, onLongPress, threshold = $7b01448eaad0fe7c$var$DEFAULT_THRESHOLD, accessibilityDescription } = props;
|
|
1327
1381
|
const timeRef = useRef(void 0);
|
|
1328
|
-
let { addGlobalListener,
|
|
1382
|
+
let { addGlobalListener, removeAllGlobalListeners } = $48a7d519b337145d$export$4eaf04e54aa8eed6();
|
|
1383
|
+
let isAcceptedPointerType = (e) => pointerType ? e.pointerType === pointerType : e.pointerType === "mouse" || e.pointerType === "touch";
|
|
1329
1384
|
let { pressProps } = $d27d541f9569d26d$export$45712eceda6fad21({
|
|
1330
1385
|
isDisabled,
|
|
1331
1386
|
onPressStart(e) {
|
|
1332
1387
|
e.continuePropagation();
|
|
1333
|
-
if (e
|
|
1388
|
+
if (isAcceptedPointerType(e)) {
|
|
1334
1389
|
if (onLongPressStart) onLongPressStart({
|
|
1335
1390
|
...e,
|
|
1336
1391
|
type: "longpressstart"
|
|
1337
1392
|
});
|
|
1338
1393
|
timeRef.current = setTimeout(() => {
|
|
1339
1394
|
e.target.dispatchEvent(new PointerEvent("pointercancel", { bubbles: true }));
|
|
1395
|
+
addGlobalListener(e.target, "click", (e) => e.preventDefault(), { once: true });
|
|
1340
1396
|
if ($d447af545b77c9f1$export$b204af158042fbac(e.target).activeElement !== e.target) $1969ac565cfec8d0$export$de79e2c695e052f3(e.target);
|
|
1341
1397
|
if (onLongPress) onLongPress({
|
|
1342
1398
|
...e,
|
|
@@ -1344,29 +1400,25 @@ function $7b01448eaad0fe7c$export$c24ed0104d07eab9(props) {
|
|
|
1344
1400
|
});
|
|
1345
1401
|
timeRef.current = void 0;
|
|
1346
1402
|
}, threshold);
|
|
1347
|
-
if (e.pointerType === "touch") {
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
setTimeout(() => {
|
|
1355
|
-
removeGlobalListener(e.target, "contextmenu", onContextMenu);
|
|
1356
|
-
}, 30);
|
|
1357
|
-
}, { once: true });
|
|
1358
|
-
}
|
|
1403
|
+
if (e.pointerType === "touch") addGlobalListener(e.target, "contextmenu", (e) => e.preventDefault(), { once: true });
|
|
1404
|
+
let ownerWindow = $d447af545b77c9f1$export$f21a1ffae260145a(e.target);
|
|
1405
|
+
addGlobalListener(ownerWindow, "pointerup", () => {
|
|
1406
|
+
setTimeout(() => {
|
|
1407
|
+
removeAllGlobalListeners();
|
|
1408
|
+
}, 100);
|
|
1409
|
+
}, { once: true });
|
|
1359
1410
|
}
|
|
1360
1411
|
},
|
|
1361
1412
|
onPressEnd(e) {
|
|
1362
1413
|
if (timeRef.current) clearTimeout(timeRef.current);
|
|
1363
|
-
if (onLongPressEnd && (e
|
|
1414
|
+
if (onLongPressEnd && isAcceptedPointerType(e)) onLongPressEnd({
|
|
1364
1415
|
...e,
|
|
1365
1416
|
type: "longpressend"
|
|
1366
1417
|
});
|
|
1367
1418
|
}
|
|
1368
1419
|
});
|
|
1369
|
-
|
|
1420
|
+
let descriptionProps = $121970af65029459$export$f8aeda7b10753fa1(onLongPress && !isDisabled ? accessibilityDescription : void 0);
|
|
1421
|
+
return { longPressProps: $bbaa08b3cd72f041$export$9d1611c77c2fe928(pressProps, descriptionProps) };
|
|
1370
1422
|
}
|
|
1371
1423
|
//#endregion
|
|
1372
1424
|
//#region node_modules/react-aria/dist/private/selection/useSelectableItem.mjs
|
|
@@ -1386,18 +1438,21 @@ function $f6ba6936bfd098a0$export$ecf600387e221c37(options) {
|
|
|
1386
1438
|
return;
|
|
1387
1439
|
} else if (linkBehavior === "override" || linkBehavior === "none") return;
|
|
1388
1440
|
}
|
|
1389
|
-
if (manager.selectionMode === "single")
|
|
1390
|
-
|
|
1391
|
-
|
|
1441
|
+
if (manager.selectionMode === "single") {
|
|
1442
|
+
if (manager.isSelected(key) && !manager.disallowEmptySelection) manager.toggleSelection(key);
|
|
1443
|
+
else manager.replaceSelection(key);
|
|
1444
|
+
} else if (e && e.shiftKey) manager.extendSelection(key);
|
|
1392
1445
|
else if (manager.selectionBehavior === "toggle" || e && ($bb39c0fc1c19b34c$export$16792effe837dba3(e) || e.pointerType === "touch" || e.pointerType === "virtual")) manager.toggleSelection(key);
|
|
1393
1446
|
else manager.replaceSelection(key);
|
|
1394
1447
|
}
|
|
1395
1448
|
};
|
|
1396
1449
|
useEffect(() => {
|
|
1397
|
-
if (key === manager.focusedKey && manager.isFocused)
|
|
1398
|
-
if (
|
|
1399
|
-
|
|
1400
|
-
|
|
1450
|
+
if (key === manager.focusedKey && manager.isFocused) {
|
|
1451
|
+
if (!shouldUseVirtualFocus) {
|
|
1452
|
+
if (focus) focus();
|
|
1453
|
+
else if ($23f2114a1b82827e$export$cd4e5573fbe2b576() !== ref.current && ref.current) $f192c2f16961cbe0$export$80f3e147d781571c(ref.current);
|
|
1454
|
+
} else $b72f3f7b3b5f42c6$export$76e4e37e5339496d(ref.current);
|
|
1455
|
+
}
|
|
1401
1456
|
}, [
|
|
1402
1457
|
ref,
|
|
1403
1458
|
key,
|
|
@@ -1479,7 +1534,8 @@ function $f6ba6936bfd098a0$export$ecf600387e221c37(options) {
|
|
|
1479
1534
|
}
|
|
1480
1535
|
};
|
|
1481
1536
|
}
|
|
1482
|
-
|
|
1537
|
+
let collectionId = $22bbea12c2567021$export$6aeb1680a0ae8741(manager.collection);
|
|
1538
|
+
itemProps["data-collection"] = collectionId;
|
|
1483
1539
|
itemProps["data-key"] = key;
|
|
1484
1540
|
itemPressProps.preventFocusOnPress = shouldUseVirtualFocus;
|
|
1485
1541
|
if (shouldUseVirtualFocus) itemPressProps = $bbaa08b3cd72f041$export$9d1611c77c2fe928(itemPressProps, {
|
|
@@ -1529,13 +1585,41 @@ function $f6ba6936bfd098a0$export$ecf600387e221c37(options) {
|
|
|
1529
1585
|
let onClick = linkBehavior !== "none" && manager.isLink(key) ? (e) => {
|
|
1530
1586
|
if (!$caaf0dd3060ed57c$export$95185d699e05d4d7.isOpening) e.preventDefault();
|
|
1531
1587
|
} : void 0;
|
|
1588
|
+
let mergedItemProps = $bbaa08b3cd72f041$export$9d1611c77c2fe928(itemProps, allowsSelection || hasPrimaryAction || shouldUseVirtualFocus && !isDisabled ? pressProps : {}, longPressEnabled ? longPressProps : {}, {
|
|
1589
|
+
onDoubleClick,
|
|
1590
|
+
onDragStartCapture,
|
|
1591
|
+
onClick,
|
|
1592
|
+
id
|
|
1593
|
+
}, shouldUseVirtualFocus ? { onMouseDown: (e) => e.preventDefault() } : void 0);
|
|
1594
|
+
let isChildInteraction = (target) => {
|
|
1595
|
+
let el = target;
|
|
1596
|
+
while (el && el !== ref.current) {
|
|
1597
|
+
let elCollection = el.getAttribute("data-collection");
|
|
1598
|
+
if (elCollection != null) return elCollection !== collectionId;
|
|
1599
|
+
el = el.parentElement;
|
|
1600
|
+
}
|
|
1601
|
+
return $3b8b240c1bf84ab9$export$bebd5a1431fec25d(target);
|
|
1602
|
+
};
|
|
1603
|
+
let baseOnPointerDown = mergedItemProps.onPointerDown;
|
|
1604
|
+
mergedItemProps.onPointerDown = (e) => {
|
|
1605
|
+
let target = $23f2114a1b82827e$export$e58f029f0fbfdb29(e);
|
|
1606
|
+
if (target && target !== ref.current && isChildInteraction(target)) {
|
|
1607
|
+
e.stopPropagation();
|
|
1608
|
+
return;
|
|
1609
|
+
}
|
|
1610
|
+
baseOnPointerDown?.(e);
|
|
1611
|
+
};
|
|
1612
|
+
let baseOnMouseDown = mergedItemProps.onMouseDown;
|
|
1613
|
+
mergedItemProps.onMouseDown = (e) => {
|
|
1614
|
+
let target = $23f2114a1b82827e$export$e58f029f0fbfdb29(e);
|
|
1615
|
+
if (target && target !== ref.current && isChildInteraction(target)) {
|
|
1616
|
+
e.stopPropagation();
|
|
1617
|
+
return;
|
|
1618
|
+
}
|
|
1619
|
+
baseOnMouseDown?.(e);
|
|
1620
|
+
};
|
|
1532
1621
|
return {
|
|
1533
|
-
itemProps:
|
|
1534
|
-
onDoubleClick,
|
|
1535
|
-
onDragStartCapture,
|
|
1536
|
-
onClick,
|
|
1537
|
-
id
|
|
1538
|
-
}, shouldUseVirtualFocus ? { onMouseDown: (e) => e.preventDefault() } : void 0),
|
|
1622
|
+
itemProps: mergedItemProps,
|
|
1539
1623
|
isPressed,
|
|
1540
1624
|
isSelected: manager.isSelected(key),
|
|
1541
1625
|
isFocused: manager.isFocused && manager.focusedKey === key,
|
|
@@ -1618,7 +1702,9 @@ function $60f19cefd567a3e4$export$253fe78d46329472(props) {
|
|
|
1618
1702
|
let focusedKeyRef = useRef(null);
|
|
1619
1703
|
let childFocusStrategyRef = useRef(null);
|
|
1620
1704
|
let [, setFocusedKey] = useState(null);
|
|
1621
|
-
let
|
|
1705
|
+
let selectedKeysProp = useMemo(() => $60f19cefd567a3e4$var$convertSelection(props.selectedKeys), [props.selectedKeys]);
|
|
1706
|
+
let defaultSelectedKeys = useMemo(() => $60f19cefd567a3e4$var$convertSelection(props.defaultSelectedKeys, new $8b2540e09867b15e$export$52baac22726c72bf()), [props.defaultSelectedKeys]);
|
|
1707
|
+
let [selectedKeys, setSelectedKeys] = $3e6197669829fe11$export$40bfa8c7b0832715(selectedKeysProp, defaultSelectedKeys, props.onSelectionChange);
|
|
1622
1708
|
let disabledKeysProp = useMemo(() => props.disabledKeys ? new Set(props.disabledKeys) : new Set(), [props.disabledKeys]);
|
|
1623
1709
|
let [selectionBehavior, setSelectionBehavior] = useState(selectionBehaviorProp);
|
|
1624
1710
|
if (selectionBehaviorProp === "replace" && selectionBehavior === "toggle" && typeof selectedKeys === "object" && selectedKeys.size === 0) setSelectionBehavior("replace");
|
|
@@ -1902,9 +1988,10 @@ var $4a07ac835f260f78$export$6c8a5aaad13c9852 = class $4a07ac835f260f78$export$6
|
|
|
1902
1988
|
}
|
|
1903
1989
|
select(key, e) {
|
|
1904
1990
|
if (this.selectionMode === "none") return;
|
|
1905
|
-
if (this.selectionMode === "single")
|
|
1906
|
-
|
|
1907
|
-
|
|
1991
|
+
if (this.selectionMode === "single") {
|
|
1992
|
+
if (this.isSelected(key) && !this.disallowEmptySelection) this.toggleSelection(key);
|
|
1993
|
+
else this.replaceSelection(key);
|
|
1994
|
+
} else if (this.selectionBehavior === "toggle" || e && (e.pointerType === "touch" || e.pointerType === "virtual")) this.toggleSelection(key);
|
|
1908
1995
|
else this.replaceSelection(key);
|
|
1909
1996
|
}
|
|
1910
1997
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as $fe16bffc7a557bf0$export$7f54fc3180508a52 } from "./useHover-
|
|
1
|
+
import { f as $fe16bffc7a557bf0$export$7f54fc3180508a52 } from "./useHover-CbyH227W.js";
|
|
2
2
|
import { useEffect } from "react";
|
|
3
3
|
//#region node_modules/react-aria/dist/private/utils/useEvent.mjs
|
|
4
4
|
function $600b3cf69ae46262$export$90fc3a17d93f704c(ref, event, handler, options) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as $390e54f620492c70$export$b4cc09c592e8fdb8, u as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./utils-
|
|
2
|
-
import { t as $0beb20c9744a2065$export$8467354a121f1b9f } from "./useLabel-
|
|
1
|
+
import { f as $390e54f620492c70$export$b4cc09c592e8fdb8, u as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./utils-ClM91CuL.js";
|
|
2
|
+
import { t as $0beb20c9744a2065$export$8467354a121f1b9f } from "./useLabel-gfFDE4bn.js";
|
|
3
3
|
import $3ARPR$react, { createContext, forwardRef, useContext } from "react";
|
|
4
4
|
//#region node_modules/react-aria-components/dist/private/FieldError.mjs
|
|
5
5
|
var $1f3c3b1a70cec653$export$ff05c3ac10437e03 = createContext(null);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as $673d46fce3e5717d$export$a16aca283550c30d } from "./Dialog-
|
|
1
|
+
import { b as $673d46fce3e5717d$export$a16aca283550c30d } from "./Dialog-Bdqjmtt2.js";
|
|
2
2
|
import { useCallback, useMemo } from "react";
|
|
3
3
|
//#region node_modules/react-aria/dist/private/i18n/useFilter.mjs
|
|
4
4
|
function $ef182bb9912241d8$export$3274cf84b703fff(options) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { K as $d447af545b77c9f1$export$b204af158042fbac, M as $a92dc41f639950be$export$525bc4921d56d4a, N as $a92dc41f639950be$export$715c682d09d639cc, P as $a92dc41f639950be$export$c2b7abe5d61ec696, U as $23f2114a1b82827e$export$e58f029f0fbfdb29, V as $23f2114a1b82827e$export$cd4e5573fbe2b576, _ as $8f5a2122b0992be3$export$b9b3dfddab17db27, c as $1e74c67db218ce67$export$f8168d8dd8fd66e6, n as $48a7d519b337145d$export$4eaf04e54aa8eed6, v as $8f5a2122b0992be3$export$ec71b4b83ac08ec3, z as $23f2114a1b82827e$export$4282f70798064fe0 } from "./useHover-CbyH227W.js";
|
|
2
2
|
import { useCallback, useRef, useState } from "react";
|
|
3
3
|
//#region node_modules/react-aria/dist/private/interactions/useFocusWithin.mjs
|
|
4
4
|
function $2c9edc598a03d523$export$420e68273165f4ec(props) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as $fe16bffc7a557bf0$export$7f54fc3180508a52 } from "./useHover-
|
|
1
|
+
import { f as $fe16bffc7a557bf0$export$7f54fc3180508a52 } from "./useHover-CbyH227W.js";
|
|
2
2
|
import { useEffect } from "react";
|
|
3
3
|
//#region node_modules/react-aria/dist/private/utils/useFormReset.mjs
|
|
4
4
|
function $3274bf1495747a7b$export$5add1d006293d136(ref, initialValue, onReset) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { h as $c4867b2f328c2698$export$e5c5a5f917a5871c } from "./utils-
|
|
2
|
-
import {
|
|
1
|
+
import { h as $c4867b2f328c2698$export$e5c5a5f917a5871c } from "./utils-ClM91CuL.js";
|
|
2
|
+
import { U as $23f2114a1b82827e$export$e58f029f0fbfdb29, f as $fe16bffc7a557bf0$export$7f54fc3180508a52, m as $8f5a2122b0992be3$export$8397ddfc504fdb9a } from "./useHover-CbyH227W.js";
|
|
3
3
|
import { createContext, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
4
4
|
//#region node_modules/react-stately/dist/private/form/useFormValidationState.mjs
|
|
5
5
|
var $fd2148440a13ec26$export$aca958c65c314e6c = {
|