@eightshift/ui-components 8.1.0 → 8.3.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-Dqkum3dO.js} +29 -25
- package/dist/{Button-_E2Z5G2l.js → Button-DHgs_rCq.js} +15 -9
- package/dist/{Dialog-3XLIaepk.js → Dialog-CldDJ_4u.js} +390 -189
- package/dist/{Disclosure-Dh0z_DEQ.js → Disclosure-BHNgL5Is.js} +33 -29
- package/dist/{FocusScope-BKGWN6UK.js → FocusScope-CUuL5wjz.js} +13 -8
- 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-CZXso3mJ.js} +14 -38
- package/dist/{NumberFormatter-WKBRKiEA.js → NumberFormatter-Bwdv413k.js} +4 -2
- package/dist/{RadioGroup-Br9Mn9QJ.js → RadioGroup-BTByPMrl.js} +35 -35
- package/dist/{SearchField-q2Fj0L9K.js → SearchField-DkX1vqMN.js} +29 -26
- package/dist/{Slider-B8icnyOo.js → Slider-Dw-JjfLx.js} +55 -44
- package/dist/{Text-D4y19vs8.js → Text-CA2_mHEB.js} +4 -3
- package/dist/{VisuallyHidden-B_LZ_kn7.js → VisuallyHidden-ZZwHZDro.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/assets/wp-overrides/make-block-messages-nicer.css +1 -1
- package/dist/{build-module-DG6ZK7Ty.js → build-module-BISCoQjQ.js} +4 -4
- package/dist/{button-XSk_8UW7.js → button-ldR_tlvk.js} +64 -13
- package/dist/{checkbox-BYaS9tQ5.js → checkbox-DDyLJRY8.js} +8 -8
- package/dist/{color-swatch-6ZEIXej3.js → color-swatch-DmhdOhe4.js} +15 -16
- package/dist/components/animated-visibility/animated-visibility.js +5 -3
- package/dist/components/base-control/base-control.d.ts +1 -1
- 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.d.ts +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 +8 -8
- 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.d.ts +1 -1
- package/dist/components/component-toggle/component-toggle.js +4 -4
- package/dist/components/container-panel/container-panel.js +11 -11
- package/dist/components/contextual-help/contextual-help.js +3 -3
- 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 +9 -9
- package/dist/components/expandable/expandable.js +4 -4
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +18 -17
- package/dist/components/input-field/input-field.d.ts +1 -1
- 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 +7 -7
- 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 +5 -4
- package/dist/components/menu/menu.d.ts +8 -29
- package/dist/components/menu/menu.js +11 -8
- package/dist/components/modal/modal.js +1 -1
- package/dist/components/notice/notice.js +8 -8
- package/dist/components/number-picker/number-picker.d.ts +1 -1
- 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 +22 -16
- 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 +3 -2
- package/dist/components/popover/popover.js +5 -5
- package/dist/components/portal-provider/portal-provider.js +2 -1
- package/dist/components/prompt-popover/prompt-popover.d.ts +56 -0
- package/dist/components/prompt-popover/prompt-popover.js +81 -0
- package/dist/components/radio/radio.d.ts +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 +2 -2
- package/dist/components/repeater/repeater.d.ts +5 -38
- package/dist/components/repeater/repeater.js +8 -11
- package/dist/components/responsive/mini-responsive.d.ts +0 -1
- package/dist/components/responsive/mini-responsive.js +31 -31
- package/dist/components/responsive/responsive-legacy.d.ts +0 -1
- package/dist/components/responsive/responsive-legacy.js +13 -11
- package/dist/components/responsive/responsive.d.ts +0 -1
- package/dist/components/responsive/responsive.js +29 -29
- package/dist/components/responsive-preview/responsive-preview.js +4 -4
- package/dist/components/rich-label/rich-label.d.ts +1 -1
- package/dist/components/rich-label/rich-label.js +2 -2
- package/dist/components/select/async-multi-select.d.ts +12 -13
- package/dist/components/select/async-multi-select.js +40 -21
- package/dist/components/select/async-select.d.ts +12 -13
- package/dist/components/select/async-select.js +39 -21
- package/dist/components/select/multi-select.d.ts +2 -8
- package/dist/components/select/multi-select.js +20 -20
- package/dist/components/select/shared.d.ts +7 -11
- 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 +17 -17
- package/dist/components/select/styles.d.ts +2 -2
- package/dist/components/slider/column-config-slider.js +8 -6
- package/dist/components/slider/slider.js +16 -12
- package/dist/components/slider/utils.js +1 -1
- package/dist/components/smart-image/smart-image.d.ts +1 -2
- package/dist/components/smart-image/smart-image.js +53 -51
- package/dist/components/tabs/tabs.d.ts +16 -64
- package/dist/components/tabs/tabs.js +1 -1
- package/dist/components/toggle/switch.d.ts +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.d.ts +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-oS68xcYX.js} +130 -125
- package/dist/{es-dash-DunirOmV.js → es-dash-DPtJSRjw.js} +23 -52
- package/dist/{gradient-editor-yqSw0uPA.js → gradient-editor-DP8ioFX1.js} +39 -30
- 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 +18 -17
- package/dist/{input-field-nN6BO0oz.js → input-field-C-XvZeCZ.js} +8 -8
- package/dist/{jsx-svg-BjGQUBLh.js → jsx-svg-DRwJdRpA.js} +171 -129
- package/dist/{keyboard-g5Amam-c.js → keyboard-Cdqi5ZQQ.js} +1 -1
- package/dist/{link-input-BhlPElU8.js → link-input-DdwuqoMg.js} +147 -89
- package/dist/{modal-B5axB0Fc.js → modal-DZco5MDu.js} +15 -14
- package/dist/{number-picker-nnOf0XnN.js → number-picker-XqKW0BNi.js} +9 -9
- package/dist/{react-y40Dt3ab.js → react-O71mlJXS.js} +250 -266
- package/dist/{shared-Ba_bt4s9.js → shared-YXMIX2ka.js} +60 -44
- package/dist/{solid-color-picker-CsosgTVa.js → solid-color-picker-D5LEdmDM.js} +78 -58
- package/dist/{switch-BJ4_OyUm.js → switch-Bo6nmed_.js} +8 -8
- package/dist/{tabs-wAe0AAyu.js → tabs-DE-qb7Kt.js} +35 -30
- package/dist/{text-helpers-2j9DuxP1.js → text-helpers-QrwKKaOh.js} +3 -2
- package/dist/{textSelection-B_Nv6Jz3.js → textSelection-C17LWYmO.js} +3 -3
- package/dist/{toggle-button-BLJdEp8V.js → toggle-button-Cb4yCEua.js} +39 -8
- package/dist/{tooltip-BW9nj5-V.js → tooltip-CT-vzIdz.js} +68 -62
- package/dist/{useAsyncList-B3-uyJgA.js → useAsyncList-CjKVLGN0.js} +8 -4
- package/dist/{useButton-CPMVLXoX.js → useButton-V65TBDGM.js} +3 -3
- package/dist/{useCollection-PzY6FI39.js → useCollection-DqUS7tjk.js} +281 -184
- package/dist/useEvent-C9zwSNzZ.js +18 -0
- package/dist/{useField-DrfR8j9h.js → useField-B_ibsWst.js} +2 -2
- package/dist/{useFilter-CiCjo6Na.js → useFilter-C75IzdIZ.js} +1 -1
- package/dist/{useFocusRing-CrYHpV7C.js → useFocusRing-JidySWlU.js} +1 -1
- package/dist/{useFormReset-U6c35PHq.js → useFormReset-Sp8-miDa.js} +1 -1
- package/dist/{useFormValidation-B2q2MGWN.js → useFormValidation-CpmQEh8J.js} +2 -2
- package/dist/{useHover-CNsbAR0V.js → useHover-CaY3sRjL.js} +250 -46
- 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-CzB3v6M9.js} +6 -11
- package/dist/{useLocalizedStringFormatter-Ccm8EL_u.js → useLocalizedStringFormatter-CTCqjYu4.js} +6 -1
- package/dist/{useNumberFieldState-DWvm7CXu.js → useNumberFieldState-DC3XY3DQ.js} +79 -62
- package/dist/{useNumberFormatter-B0_D7a_o.js → useNumberFormatter-DbAt_fC_.js} +2 -2
- package/dist/{useOverlayTriggerState-zZ7homyI.js → useOverlayTriggerState-BKmSTK_5.js} +16 -11
- package/dist/{usePress-DRoujMNm.js → usePress-CUCWcP-m.js} +50 -28
- package/dist/{useSlot-pRz-v9kC.js → useSlot-CnQHcvd4.js} +1 -1
- package/dist/{useTextField-e8jIFT3s.js → useTextField-C3QIkMON.js} +6 -6
- package/dist/{useToggle-CR_ZKvr_.js → useToggle-bbGRUbo4.js} +6 -6
- package/dist/{useToggleState-ButQxGrJ.js → useToggleState-D_rLMrVW.js} +1 -1
- package/dist/utilities/array-helpers.d.ts +2 -2
- 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 +23 -27
- package/dist/useEvent-CzuFZ2HT.js +0 -22
|
@@ -1,12 +1,12 @@
|
|
|
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-Cdqi5ZQQ.js";
|
|
3
|
+
import { A as $2add3ce32c6007eb$export$e1865c3bedcd822b, B as $23f2114a1b82827e$export$b4f377a2b6254582, D as $2add3ce32c6007eb$export$78551043582a6a98, J as $d447af545b77c9f1$export$f21a1ffae260145a, 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$b204af158042fbac, s as $8296dad1a4c5e0dc$export$8f71654801c2f7cd, x as $caaf0dd3060ed57c$export$95185d699e05d4d7, z as $23f2114a1b82827e$export$4282f70798064fe0 } from "./useHover-CaY3sRjL.js";
|
|
4
|
+
import { t as $600b3cf69ae46262$export$90fc3a17d93f704c } from "./useEvent-C9zwSNzZ.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-
|
|
9
|
-
import $3ARPR$react, { cloneElement, createContext, forwardRef, isValidElement, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
7
|
+
import { t as $d27d541f9569d26d$export$45712eceda6fad21 } from "./usePress-CUCWcP-m.js";
|
|
8
|
+
import { r as $535772f9d2c1f38d$export$2d6ec8fc375ceafa } from "./FocusScope-CUuL5wjz.js";
|
|
9
|
+
import $3ARPR$react, { cloneElement, createContext, forwardRef, isValidElement, useCallback, useContext, useEffect, useMemo, useRef, useState, version } from "react";
|
|
10
10
|
import { createPortal, flushSync } from "react-dom";
|
|
11
11
|
import { useSyncExternalStore } from "use-sync-external-store/shim/index.js";
|
|
12
12
|
//#region node_modules/react-aria/dist/private/collections/BaseCollection.mjs
|
|
@@ -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) {
|
|
@@ -797,11 +799,13 @@ function $76d97191f0f90600$export$94ed1c92c7beeb22(node, checkForOverflow) {
|
|
|
797
799
|
//#endregion
|
|
798
800
|
//#region node_modules/react-aria/dist/private/utils/scrollIntoView.mjs
|
|
799
801
|
function $51a3e22a5186a962$export$53a0910f038337bd(scrollView, element, opts = {}) {
|
|
800
|
-
let { block = "nearest", inline = "nearest" } = opts;
|
|
801
802
|
if (scrollView === element) return;
|
|
803
|
+
$51a3e22a5186a962$export$f064fd83a2c6e9ca(scrollView, element, element.getBoundingClientRect(), opts);
|
|
804
|
+
}
|
|
805
|
+
function $51a3e22a5186a962$export$f064fd83a2c6e9ca(scrollView, element, target, opts = {}) {
|
|
806
|
+
let { block = "nearest", inline = "nearest" } = opts;
|
|
802
807
|
let y = scrollView.scrollTop;
|
|
803
808
|
let x = scrollView.scrollLeft;
|
|
804
|
-
let target = element.getBoundingClientRect();
|
|
805
809
|
let view = scrollView.getBoundingClientRect();
|
|
806
810
|
let itemStyle = window.getComputedStyle(element);
|
|
807
811
|
let viewStyle = window.getComputedStyle(scrollView);
|
|
@@ -835,8 +839,8 @@ function $51a3e22a5186a962$export$53a0910f038337bd(scrollView, element, opts = {
|
|
|
835
839
|
let scrollPortBottom = viewBottom - (isRoot ? 0 : borderBottomWidth) - scrollPaddingBottom - scrollBarHeight;
|
|
836
840
|
let scrollPortLeft = viewLeft + (isRoot ? 0 : borderLeftWidth) + scrollPaddingLeft;
|
|
837
841
|
let scrollPortRight = viewRight - (isRoot ? 0 : borderRightWidth) - scrollPaddingRight;
|
|
838
|
-
if (
|
|
839
|
-
else
|
|
842
|
+
if ($2add3ce32c6007eb$export$fedb369cb70207f1() && $2add3ce32c6007eb$export$78551043582a6a98() || viewStyle.direction === "ltr") scrollPortRight -= scrollBarWidth;
|
|
843
|
+
else if (viewStyle.direction === "rtl") scrollPortLeft += scrollBarWidth;
|
|
840
844
|
let shouldScrollBlock = scrollAreaTop < scrollPortTop || scrollAreaBottom > scrollPortBottom;
|
|
841
845
|
let shouldScrollInline = scrollAreaLeft < scrollPortLeft || scrollAreaRight > scrollPortRight;
|
|
842
846
|
if (shouldScrollBlock && block === "start") y += scrollAreaTop - scrollPortTop;
|
|
@@ -1041,139 +1045,189 @@ function $d667c2af82d35a98$export$d6daf82dcd84e87c(options) {
|
|
|
1041
1045
|
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
1046
|
let { direction } = $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7();
|
|
1043
1047
|
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);
|
|
1048
|
+
const navigateToKey = (e, key, childFocus) => {
|
|
1049
|
+
if (key != null) {
|
|
1050
|
+
if (manager.isLink(key) && linkBehavior === "selection" && selectOnFocus && !$22bbea12c2567021$export$d3e3bd3e26688c04(e)) {
|
|
1051
|
+
flushSync(() => {
|
|
1052
|
+
manager.setFocusedKey(key, childFocus);
|
|
1053
|
+
});
|
|
1054
|
+
let item = $22bbea12c2567021$export$c3d8340acf92597f(ref, key);
|
|
1055
|
+
let itemProps = manager.getItemProps(key);
|
|
1056
|
+
if (item) {
|
|
1057
|
+
router.open(item, e, itemProps.href, itemProps.routerOptions);
|
|
1056
1058
|
return;
|
|
1057
1059
|
}
|
|
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);
|
|
1060
|
+
return false;
|
|
1062
1061
|
}
|
|
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();
|
|
1062
|
+
manager.setFocusedKey(key, childFocus);
|
|
1063
|
+
if (manager.isLink(key) && linkBehavior === "override") return false;
|
|
1064
|
+
if (e.shiftKey && manager.selectionMode === "multiple") {
|
|
1065
|
+
manager.extendSelection(key);
|
|
1066
|
+
return;
|
|
1067
|
+
} else if (selectOnFocus && !$22bbea12c2567021$export$d3e3bd3e26688c04(e)) {
|
|
1068
|
+
manager.replaceSelection(key);
|
|
1069
|
+
return;
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
return false;
|
|
1073
|
+
};
|
|
1074
|
+
let arrowDown = (e) => {
|
|
1075
|
+
if (delegate.getKeyBelow) {
|
|
1076
|
+
let nextKey = manager.focusedKey != null ? delegate.getKeyBelow?.(manager.focusedKey) : delegate.getFirstKey?.();
|
|
1077
|
+
if (nextKey == null && shouldFocusWrap) nextKey = delegate.getFirstKey?.(manager.focusedKey);
|
|
1078
|
+
if (nextKey != null) {
|
|
1079
|
+
navigateToKey(e, nextKey);
|
|
1080
|
+
return;
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
return false;
|
|
1084
|
+
};
|
|
1085
|
+
let arrowUp = (e) => {
|
|
1086
|
+
if (delegate.getKeyAbove) {
|
|
1087
|
+
let nextKey = manager.focusedKey != null ? delegate.getKeyAbove?.(manager.focusedKey) : delegate.getLastKey?.();
|
|
1088
|
+
if (nextKey == null && shouldFocusWrap) nextKey = delegate.getLastKey?.(manager.focusedKey);
|
|
1089
|
+
if (nextKey != null) {
|
|
1090
|
+
navigateToKey(e, nextKey);
|
|
1091
|
+
return;
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
return false;
|
|
1095
|
+
};
|
|
1096
|
+
let home = (e) => {
|
|
1097
|
+
if (delegate.getFirstKey) {
|
|
1098
|
+
if (manager.focusedKey === null && e.shiftKey) return false;
|
|
1099
|
+
let firstKey = delegate.getFirstKey(manager.focusedKey, $bb39c0fc1c19b34c$export$16792effe837dba3(e));
|
|
1100
|
+
manager.setFocusedKey(firstKey);
|
|
1101
|
+
if (firstKey != null) {
|
|
1102
|
+
if ($bb39c0fc1c19b34c$export$16792effe837dba3(e) && e.shiftKey && manager.selectionMode === "multiple") {
|
|
1103
|
+
manager.extendSelection(firstKey);
|
|
1104
|
+
return;
|
|
1105
|
+
} else if (selectOnFocus) {
|
|
1106
|
+
manager.replaceSelection(firstKey);
|
|
1107
|
+
return;
|
|
1158
1108
|
}
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
return false;
|
|
1112
|
+
};
|
|
1113
|
+
let arrowLeft = (e) => {
|
|
1114
|
+
if (delegate.getKeyLeftOf) {
|
|
1115
|
+
let nextKey = manager.focusedKey != null ? delegate.getKeyLeftOf?.(manager.focusedKey) : delegate.getFirstKey?.();
|
|
1116
|
+
if (nextKey == null && shouldFocusWrap) nextKey = direction === "rtl" ? delegate.getFirstKey?.(manager.focusedKey) : delegate.getLastKey?.(manager.focusedKey);
|
|
1117
|
+
if (nextKey != null) {
|
|
1118
|
+
navigateToKey(e, nextKey, direction === "rtl" ? "first" : "last");
|
|
1119
|
+
return;
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
return false;
|
|
1123
|
+
};
|
|
1124
|
+
let arrowRight = (e) => {
|
|
1125
|
+
if (delegate.getKeyRightOf) {
|
|
1126
|
+
let nextKey = manager.focusedKey != null ? delegate.getKeyRightOf?.(manager.focusedKey) : delegate.getFirstKey?.();
|
|
1127
|
+
if (nextKey == null && shouldFocusWrap) nextKey = direction === "rtl" ? delegate.getLastKey?.(manager.focusedKey) : delegate.getFirstKey?.(manager.focusedKey);
|
|
1128
|
+
if (nextKey != null) {
|
|
1129
|
+
navigateToKey(e, nextKey, direction === "rtl" ? "last" : "first");
|
|
1130
|
+
return;
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
return false;
|
|
1134
|
+
};
|
|
1135
|
+
let end = (e) => {
|
|
1136
|
+
if (delegate.getLastKey) {
|
|
1137
|
+
if (manager.focusedKey === null && e.shiftKey) return false;
|
|
1138
|
+
let lastKey = delegate.getLastKey(manager.focusedKey, $bb39c0fc1c19b34c$export$16792effe837dba3(e));
|
|
1139
|
+
manager.setFocusedKey(lastKey);
|
|
1140
|
+
if (lastKey != null) {
|
|
1141
|
+
if ($bb39c0fc1c19b34c$export$16792effe837dba3(e) && e.shiftKey && manager.selectionMode === "multiple") {
|
|
1142
|
+
manager.extendSelection(lastKey);
|
|
1143
|
+
return;
|
|
1144
|
+
} else if (selectOnFocus) {
|
|
1145
|
+
manager.replaceSelection(lastKey);
|
|
1146
|
+
return;
|
|
1172
1147
|
}
|
|
1173
|
-
break;
|
|
1174
1148
|
}
|
|
1175
1149
|
}
|
|
1150
|
+
return false;
|
|
1151
|
+
};
|
|
1152
|
+
let pageDown = (e) => {
|
|
1153
|
+
if (delegate.getKeyPageBelow && manager.focusedKey != null) {
|
|
1154
|
+
let nextKey = delegate.getKeyPageBelow(manager.focusedKey);
|
|
1155
|
+
if (nextKey != null) return navigateToKey(e, nextKey);
|
|
1156
|
+
}
|
|
1157
|
+
return false;
|
|
1158
|
+
};
|
|
1159
|
+
let pageUp = (e) => {
|
|
1160
|
+
if (delegate.getKeyPageAbove && manager.focusedKey != null) {
|
|
1161
|
+
let nextKey = delegate.getKeyPageAbove(manager.focusedKey);
|
|
1162
|
+
if (nextKey != null) return navigateToKey(e, nextKey);
|
|
1163
|
+
}
|
|
1164
|
+
return false;
|
|
1165
|
+
};
|
|
1166
|
+
let aHandler = () => {
|
|
1167
|
+
if (manager.selectionMode === "multiple" && disallowSelectAll !== true) {
|
|
1168
|
+
manager.selectAll();
|
|
1169
|
+
return;
|
|
1170
|
+
}
|
|
1171
|
+
return false;
|
|
1176
1172
|
};
|
|
1173
|
+
let escape = () => {
|
|
1174
|
+
if (escapeKeyBehavior === "clearSelection" && !disallowEmptySelection && manager.selectedKeys.size !== 0) {
|
|
1175
|
+
manager.clearSelection();
|
|
1176
|
+
return;
|
|
1177
|
+
}
|
|
1178
|
+
return false;
|
|
1179
|
+
};
|
|
1180
|
+
let tab = () => {
|
|
1181
|
+
if (!allowsTabNavigation && ref.current) {
|
|
1182
|
+
let walker = $535772f9d2c1f38d$export$2d6ec8fc375ceafa(ref.current, { tabbable: true });
|
|
1183
|
+
let next = void 0;
|
|
1184
|
+
let last;
|
|
1185
|
+
do {
|
|
1186
|
+
last = walker.lastChild();
|
|
1187
|
+
if (last) next = last;
|
|
1188
|
+
} while (last);
|
|
1189
|
+
let activeElement = $23f2114a1b82827e$export$cd4e5573fbe2b576();
|
|
1190
|
+
if (next && (!$23f2114a1b82827e$export$b4f377a2b6254582(next) || activeElement && !$3b8b240c1bf84ab9$export$bebd5a1431fec25d(activeElement))) $1969ac565cfec8d0$export$de79e2c695e052f3(next);
|
|
1191
|
+
}
|
|
1192
|
+
return {
|
|
1193
|
+
shouldContinuePropagation: true,
|
|
1194
|
+
shouldPreventDefault: false
|
|
1195
|
+
};
|
|
1196
|
+
};
|
|
1197
|
+
let shiftTab = () => {
|
|
1198
|
+
if (!allowsTabNavigation && ref.current) ref.current.focus();
|
|
1199
|
+
return {
|
|
1200
|
+
shouldContinuePropagation: true,
|
|
1201
|
+
shouldPreventDefault: false
|
|
1202
|
+
};
|
|
1203
|
+
};
|
|
1204
|
+
let withShiftSel = (key, callback) => {
|
|
1205
|
+
return {
|
|
1206
|
+
[$2add3ce32c6007eb$export$9ac100e40613ea10() ? key + "+Shift+Alt" : key + "+Shift+Control"]: callback,
|
|
1207
|
+
[key + "+Shift"]: callback,
|
|
1208
|
+
[$2add3ce32c6007eb$export$9ac100e40613ea10() ? key + "+Alt" : key + "+Control"]: callback,
|
|
1209
|
+
[key]: callback
|
|
1210
|
+
};
|
|
1211
|
+
};
|
|
1212
|
+
let { keyboardProps: repeatKeyboardProps } = $8296dad1a4c5e0dc$export$8f71654801c2f7cd({
|
|
1213
|
+
shortcuts: {
|
|
1214
|
+
...withShiftSel("ArrowDown", arrowDown),
|
|
1215
|
+
...withShiftSel("ArrowUp", arrowUp),
|
|
1216
|
+
...withShiftSel("ArrowLeft", arrowLeft),
|
|
1217
|
+
...withShiftSel("ArrowRight", arrowRight),
|
|
1218
|
+
...withShiftSel("PageDown", pageDown),
|
|
1219
|
+
...withShiftSel("PageUp", pageUp)
|
|
1220
|
+
},
|
|
1221
|
+
allowRepeats: true
|
|
1222
|
+
});
|
|
1223
|
+
let { keyboardProps } = $8296dad1a4c5e0dc$export$8f71654801c2f7cd({ shortcuts: {
|
|
1224
|
+
...withShiftSel("Home", home),
|
|
1225
|
+
...withShiftSel("End", end),
|
|
1226
|
+
"Mod+A": aHandler,
|
|
1227
|
+
Escape: escape,
|
|
1228
|
+
Tab: tab,
|
|
1229
|
+
"Tab+Shift": shiftTab
|
|
1230
|
+
} });
|
|
1177
1231
|
let scrollPos = useRef({
|
|
1178
1232
|
top: 0,
|
|
1179
1233
|
left: 0
|
|
@@ -1227,14 +1281,16 @@ function $d667c2af82d35a98$export$d6daf82dcd84e87c(options) {
|
|
|
1227
1281
|
});
|
|
1228
1282
|
let firstKey = delegate.getFirstKey?.() ?? null;
|
|
1229
1283
|
$a475cdc2445827b5$export$72ef708ab07251f1(() => {
|
|
1230
|
-
if (shouldVirtualFocusFirst.current)
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1284
|
+
if (shouldVirtualFocusFirst.current) {
|
|
1285
|
+
if (firstKey == null) {
|
|
1286
|
+
let previousActiveElement = $23f2114a1b82827e$export$cd4e5573fbe2b576();
|
|
1287
|
+
$b72f3f7b3b5f42c6$export$76e4e37e5339496d(ref.current);
|
|
1288
|
+
$b72f3f7b3b5f42c6$export$2b35b76d2e30e129(previousActiveElement, null);
|
|
1289
|
+
if (manager.collection.size > 0) shouldVirtualFocusFirst.current = false;
|
|
1290
|
+
} else {
|
|
1291
|
+
manager.setFocusedKey(firstKey);
|
|
1292
|
+
shouldVirtualFocusFirst.current = false;
|
|
1293
|
+
}
|
|
1238
1294
|
}
|
|
1239
1295
|
}, [firstKey, manager.collection.size]);
|
|
1240
1296
|
$a475cdc2445827b5$export$72ef708ab07251f1(() => {
|
|
@@ -1261,6 +1317,7 @@ function $d667c2af82d35a98$export$d6daf82dcd84e87c(options) {
|
|
|
1261
1317
|
}
|
|
1262
1318
|
manager.setFocused(true);
|
|
1263
1319
|
manager.setFocusedKey(focusedKey);
|
|
1320
|
+
if (focusedKey != null && selectOnFocus && !selectedKeys.size && manager.canSelectItem(focusedKey)) manager.replaceSelection(focusedKey);
|
|
1264
1321
|
if (focusedKey == null && !shouldUseVirtualFocus && ref.current) $f192c2f16961cbe0$export$80f3e147d781571c(ref.current);
|
|
1265
1322
|
if (manager.collection.size > 0) {
|
|
1266
1323
|
autoFocusRef.current = false;
|
|
@@ -1299,7 +1356,7 @@ function $d667c2af82d35a98$export$d6daf82dcd84e87c(options) {
|
|
|
1299
1356
|
manager.setFocused(true);
|
|
1300
1357
|
});
|
|
1301
1358
|
let handlers = {
|
|
1302
|
-
|
|
1359
|
+
...$bbaa08b3cd72f041$export$9d1611c77c2fe928(keyboardProps, repeatKeyboardProps),
|
|
1303
1360
|
onFocus,
|
|
1304
1361
|
onBlur,
|
|
1305
1362
|
onMouseDown(e) {
|
|
@@ -1323,20 +1380,22 @@ function $d667c2af82d35a98$export$d6daf82dcd84e87c(options) {
|
|
|
1323
1380
|
//#region node_modules/react-aria/dist/private/interactions/useLongPress.mjs
|
|
1324
1381
|
var $7b01448eaad0fe7c$var$DEFAULT_THRESHOLD = 500;
|
|
1325
1382
|
function $7b01448eaad0fe7c$export$c24ed0104d07eab9(props) {
|
|
1326
|
-
let { isDisabled, onLongPressStart, onLongPressEnd, onLongPress, threshold = $7b01448eaad0fe7c$var$DEFAULT_THRESHOLD, accessibilityDescription } = props;
|
|
1383
|
+
let { isDisabled, pointerType, onLongPressStart, onLongPressEnd, onLongPress, threshold = $7b01448eaad0fe7c$var$DEFAULT_THRESHOLD, accessibilityDescription } = props;
|
|
1327
1384
|
const timeRef = useRef(void 0);
|
|
1328
|
-
let { addGlobalListener,
|
|
1385
|
+
let { addGlobalListener, removeAllGlobalListeners } = $48a7d519b337145d$export$4eaf04e54aa8eed6();
|
|
1386
|
+
let isAcceptedPointerType = (e) => pointerType ? e.pointerType === pointerType : e.pointerType === "mouse" || e.pointerType === "touch";
|
|
1329
1387
|
let { pressProps } = $d27d541f9569d26d$export$45712eceda6fad21({
|
|
1330
1388
|
isDisabled,
|
|
1331
1389
|
onPressStart(e) {
|
|
1332
1390
|
e.continuePropagation();
|
|
1333
|
-
if (e
|
|
1391
|
+
if (isAcceptedPointerType(e)) {
|
|
1334
1392
|
if (onLongPressStart) onLongPressStart({
|
|
1335
1393
|
...e,
|
|
1336
1394
|
type: "longpressstart"
|
|
1337
1395
|
});
|
|
1338
1396
|
timeRef.current = setTimeout(() => {
|
|
1339
1397
|
e.target.dispatchEvent(new PointerEvent("pointercancel", { bubbles: true }));
|
|
1398
|
+
addGlobalListener(e.target, "click", (e) => e.preventDefault(), { once: true });
|
|
1340
1399
|
if ($d447af545b77c9f1$export$b204af158042fbac(e.target).activeElement !== e.target) $1969ac565cfec8d0$export$de79e2c695e052f3(e.target);
|
|
1341
1400
|
if (onLongPress) onLongPress({
|
|
1342
1401
|
...e,
|
|
@@ -1344,29 +1403,25 @@ function $7b01448eaad0fe7c$export$c24ed0104d07eab9(props) {
|
|
|
1344
1403
|
});
|
|
1345
1404
|
timeRef.current = void 0;
|
|
1346
1405
|
}, 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
|
-
}
|
|
1406
|
+
if (e.pointerType === "touch") addGlobalListener(e.target, "contextmenu", (e) => e.preventDefault(), { once: true });
|
|
1407
|
+
let ownerWindow = $d447af545b77c9f1$export$f21a1ffae260145a(e.target);
|
|
1408
|
+
addGlobalListener(ownerWindow, "pointerup", () => {
|
|
1409
|
+
setTimeout(() => {
|
|
1410
|
+
removeAllGlobalListeners();
|
|
1411
|
+
}, 100);
|
|
1412
|
+
}, { once: true });
|
|
1359
1413
|
}
|
|
1360
1414
|
},
|
|
1361
1415
|
onPressEnd(e) {
|
|
1362
1416
|
if (timeRef.current) clearTimeout(timeRef.current);
|
|
1363
|
-
if (onLongPressEnd && (e
|
|
1417
|
+
if (onLongPressEnd && isAcceptedPointerType(e)) onLongPressEnd({
|
|
1364
1418
|
...e,
|
|
1365
1419
|
type: "longpressend"
|
|
1366
1420
|
});
|
|
1367
1421
|
}
|
|
1368
1422
|
});
|
|
1369
|
-
|
|
1423
|
+
let descriptionProps = $121970af65029459$export$f8aeda7b10753fa1(onLongPress && !isDisabled ? accessibilityDescription : void 0);
|
|
1424
|
+
return { longPressProps: $bbaa08b3cd72f041$export$9d1611c77c2fe928(pressProps, descriptionProps) };
|
|
1370
1425
|
}
|
|
1371
1426
|
//#endregion
|
|
1372
1427
|
//#region node_modules/react-aria/dist/private/selection/useSelectableItem.mjs
|
|
@@ -1386,18 +1441,21 @@ function $f6ba6936bfd098a0$export$ecf600387e221c37(options) {
|
|
|
1386
1441
|
return;
|
|
1387
1442
|
} else if (linkBehavior === "override" || linkBehavior === "none") return;
|
|
1388
1443
|
}
|
|
1389
|
-
if (manager.selectionMode === "single")
|
|
1390
|
-
|
|
1391
|
-
|
|
1444
|
+
if (manager.selectionMode === "single") {
|
|
1445
|
+
if (manager.isSelected(key) && !manager.disallowEmptySelection) manager.toggleSelection(key);
|
|
1446
|
+
else manager.replaceSelection(key);
|
|
1447
|
+
} else if (e && e.shiftKey) manager.extendSelection(key);
|
|
1392
1448
|
else if (manager.selectionBehavior === "toggle" || e && ($bb39c0fc1c19b34c$export$16792effe837dba3(e) || e.pointerType === "touch" || e.pointerType === "virtual")) manager.toggleSelection(key);
|
|
1393
1449
|
else manager.replaceSelection(key);
|
|
1394
1450
|
}
|
|
1395
1451
|
};
|
|
1396
1452
|
useEffect(() => {
|
|
1397
|
-
if (key === manager.focusedKey && manager.isFocused)
|
|
1398
|
-
if (
|
|
1399
|
-
|
|
1400
|
-
|
|
1453
|
+
if (key === manager.focusedKey && manager.isFocused) {
|
|
1454
|
+
if (!shouldUseVirtualFocus) {
|
|
1455
|
+
if (focus) focus();
|
|
1456
|
+
else if ($23f2114a1b82827e$export$cd4e5573fbe2b576() !== ref.current && ref.current) $f192c2f16961cbe0$export$80f3e147d781571c(ref.current);
|
|
1457
|
+
} else $b72f3f7b3b5f42c6$export$76e4e37e5339496d(ref.current);
|
|
1458
|
+
}
|
|
1401
1459
|
}, [
|
|
1402
1460
|
ref,
|
|
1403
1461
|
key,
|
|
@@ -1479,7 +1537,8 @@ function $f6ba6936bfd098a0$export$ecf600387e221c37(options) {
|
|
|
1479
1537
|
}
|
|
1480
1538
|
};
|
|
1481
1539
|
}
|
|
1482
|
-
|
|
1540
|
+
let collectionId = $22bbea12c2567021$export$6aeb1680a0ae8741(manager.collection);
|
|
1541
|
+
itemProps["data-collection"] = collectionId;
|
|
1483
1542
|
itemProps["data-key"] = key;
|
|
1484
1543
|
itemPressProps.preventFocusOnPress = shouldUseVirtualFocus;
|
|
1485
1544
|
if (shouldUseVirtualFocus) itemPressProps = $bbaa08b3cd72f041$export$9d1611c77c2fe928(itemPressProps, {
|
|
@@ -1529,13 +1588,41 @@ function $f6ba6936bfd098a0$export$ecf600387e221c37(options) {
|
|
|
1529
1588
|
let onClick = linkBehavior !== "none" && manager.isLink(key) ? (e) => {
|
|
1530
1589
|
if (!$caaf0dd3060ed57c$export$95185d699e05d4d7.isOpening) e.preventDefault();
|
|
1531
1590
|
} : void 0;
|
|
1591
|
+
let mergedItemProps = $bbaa08b3cd72f041$export$9d1611c77c2fe928(itemProps, allowsSelection || hasPrimaryAction || shouldUseVirtualFocus && !isDisabled ? pressProps : {}, longPressEnabled ? longPressProps : {}, {
|
|
1592
|
+
onDoubleClick,
|
|
1593
|
+
onDragStartCapture,
|
|
1594
|
+
onClick,
|
|
1595
|
+
id
|
|
1596
|
+
}, shouldUseVirtualFocus ? { onMouseDown: (e) => e.preventDefault() } : void 0);
|
|
1597
|
+
let isChildInteraction = (target) => {
|
|
1598
|
+
let el = target;
|
|
1599
|
+
while (el && el !== ref.current) {
|
|
1600
|
+
let elCollection = el.getAttribute("data-collection");
|
|
1601
|
+
if (elCollection != null) return elCollection !== collectionId;
|
|
1602
|
+
el = el.parentElement;
|
|
1603
|
+
}
|
|
1604
|
+
return $3b8b240c1bf84ab9$export$bebd5a1431fec25d(target);
|
|
1605
|
+
};
|
|
1606
|
+
let baseOnPointerDown = mergedItemProps.onPointerDown;
|
|
1607
|
+
mergedItemProps.onPointerDown = (e) => {
|
|
1608
|
+
let target = $23f2114a1b82827e$export$e58f029f0fbfdb29(e);
|
|
1609
|
+
if (target && target !== ref.current && isChildInteraction(target)) {
|
|
1610
|
+
e.stopPropagation();
|
|
1611
|
+
return;
|
|
1612
|
+
}
|
|
1613
|
+
baseOnPointerDown?.(e);
|
|
1614
|
+
};
|
|
1615
|
+
let baseOnMouseDown = mergedItemProps.onMouseDown;
|
|
1616
|
+
mergedItemProps.onMouseDown = (e) => {
|
|
1617
|
+
let target = $23f2114a1b82827e$export$e58f029f0fbfdb29(e);
|
|
1618
|
+
if (target && target !== ref.current && isChildInteraction(target)) {
|
|
1619
|
+
e.stopPropagation();
|
|
1620
|
+
return;
|
|
1621
|
+
}
|
|
1622
|
+
baseOnMouseDown?.(e);
|
|
1623
|
+
};
|
|
1532
1624
|
return {
|
|
1533
|
-
itemProps:
|
|
1534
|
-
onDoubleClick,
|
|
1535
|
-
onDragStartCapture,
|
|
1536
|
-
onClick,
|
|
1537
|
-
id
|
|
1538
|
-
}, shouldUseVirtualFocus ? { onMouseDown: (e) => e.preventDefault() } : void 0),
|
|
1625
|
+
itemProps: mergedItemProps,
|
|
1539
1626
|
isPressed,
|
|
1540
1627
|
isSelected: manager.isSelected(key),
|
|
1541
1628
|
isFocused: manager.isFocused && manager.focusedKey === key,
|
|
@@ -1591,6 +1678,13 @@ function $cd5ea4b915021f1d$var$getAncestors(collection, node) {
|
|
|
1591
1678
|
return parents;
|
|
1592
1679
|
}
|
|
1593
1680
|
//#endregion
|
|
1681
|
+
//#region node_modules/react-aria/dist/private/utils/inertValue.mjs
|
|
1682
|
+
function $b24d1bc31a0f941d$export$a9d04c5684123369(value) {
|
|
1683
|
+
const pieces = version.split(".");
|
|
1684
|
+
if (parseInt(pieces[0], 10) >= 19) return value;
|
|
1685
|
+
return value ? "true" : void 0;
|
|
1686
|
+
}
|
|
1687
|
+
//#endregion
|
|
1594
1688
|
//#region node_modules/react-stately/dist/private/selection/Selection.mjs
|
|
1595
1689
|
var $8b2540e09867b15e$export$52baac22726c72bf = class $8b2540e09867b15e$export$52baac22726c72bf extends Set {
|
|
1596
1690
|
constructor(keys, anchorKey, currentKey) {
|
|
@@ -1618,7 +1712,9 @@ function $60f19cefd567a3e4$export$253fe78d46329472(props) {
|
|
|
1618
1712
|
let focusedKeyRef = useRef(null);
|
|
1619
1713
|
let childFocusStrategyRef = useRef(null);
|
|
1620
1714
|
let [, setFocusedKey] = useState(null);
|
|
1621
|
-
let
|
|
1715
|
+
let selectedKeysProp = useMemo(() => $60f19cefd567a3e4$var$convertSelection(props.selectedKeys), [props.selectedKeys]);
|
|
1716
|
+
let defaultSelectedKeys = useMemo(() => $60f19cefd567a3e4$var$convertSelection(props.defaultSelectedKeys, new $8b2540e09867b15e$export$52baac22726c72bf()), [props.defaultSelectedKeys]);
|
|
1717
|
+
let [selectedKeys, setSelectedKeys] = $3e6197669829fe11$export$40bfa8c7b0832715(selectedKeysProp, defaultSelectedKeys, props.onSelectionChange);
|
|
1622
1718
|
let disabledKeysProp = useMemo(() => props.disabledKeys ? new Set(props.disabledKeys) : new Set(), [props.disabledKeys]);
|
|
1623
1719
|
let [selectionBehavior, setSelectionBehavior] = useState(selectionBehaviorProp);
|
|
1624
1720
|
if (selectionBehaviorProp === "replace" && selectionBehavior === "toggle" && typeof selectedKeys === "object" && selectedKeys.size === 0) setSelectionBehavior("replace");
|
|
@@ -1902,9 +1998,10 @@ var $4a07ac835f260f78$export$6c8a5aaad13c9852 = class $4a07ac835f260f78$export$6
|
|
|
1902
1998
|
}
|
|
1903
1999
|
select(key, e) {
|
|
1904
2000
|
if (this.selectionMode === "none") return;
|
|
1905
|
-
if (this.selectionMode === "single")
|
|
1906
|
-
|
|
1907
|
-
|
|
2001
|
+
if (this.selectionMode === "single") {
|
|
2002
|
+
if (this.isSelected(key) && !this.disallowEmptySelection) this.toggleSelection(key);
|
|
2003
|
+
else this.replaceSelection(key);
|
|
2004
|
+
} else if (this.selectionBehavior === "toggle" || e && (e.pointerType === "touch" || e.pointerType === "virtual")) this.toggleSelection(key);
|
|
1908
2005
|
else this.replaceSelection(key);
|
|
1909
2006
|
}
|
|
1910
2007
|
/**
|
|
@@ -2133,4 +2230,4 @@ function $d03379b88399b8c5$export$6cd28814d92fa9c9(props, factory, context) {
|
|
|
2133
2230
|
]);
|
|
2134
2231
|
}
|
|
2135
2232
|
//#endregion
|
|
2136
|
-
export { $6f0c29017aeec335$export$
|
|
2233
|
+
export { $6f0c29017aeec335$export$d68d59712b04d9d1 as C, $6f0c29017aeec335$export$8258a0665a675899 as S, $42ceafc619f9c3ba$export$bf788dd355e3a401 as _, $cd5ea4b915021f1d$export$1005530eda016c13 as a, $6f0c29017aeec335$export$437f11dc9b403b78 as b, $d667c2af82d35a98$export$d6daf82dcd84e87c as c, $901761b40e390936$export$2bb74740c4e19def as d, $263ab7fc0f95ccdb$export$4feb769f8ddf26c5 as f, $42ceafc619f9c3ba$export$18af5c7a9e9b3664 as g, $263ab7fc0f95ccdb$export$d40e14dec8b060a8 as h, $b24d1bc31a0f941d$export$a9d04c5684123369 as i, $f5a4a9a3486154da$export$e32c88dfddc6e1d8 as l, $263ab7fc0f95ccdb$export$a164736487e3f0ae as m, $4a07ac835f260f78$export$6c8a5aaad13c9852 as n, $f6ba6936bfd098a0$export$ecf600387e221c37 as o, $263ab7fc0f95ccdb$export$90e00781bc59d8f9 as p, $60f19cefd567a3e4$export$253fe78d46329472 as r, $7b01448eaad0fe7c$export$c24ed0104d07eab9 as s, $d03379b88399b8c5$export$6cd28814d92fa9c9 as t, $22bbea12c2567021$export$c3d8340acf92597f as u, $42ceafc619f9c3ba$export$e953bb1cd0f19726 as v, $6f0c29017aeec335$export$fd11f34e1d07f134 as w, $6f0c29017aeec335$export$5ae2504e948afce5 as x, $42ceafc619f9c3ba$export$fb8073518f34e6ec as y };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Y as $d447af545b77c9f1$export$f531f92e2a15358f, f as $fe16bffc7a557bf0$export$7f54fc3180508a52 } from "./useHover-CaY3sRjL.js";
|
|
2
|
+
import { useEffect } from "react";
|
|
3
|
+
//#region node_modules/react-aria/dist/private/utils/useEvent.mjs
|
|
4
|
+
function $600b3cf69ae46262$export$90fc3a17d93f704c(ref, event, listener, options) {
|
|
5
|
+
let handleEvent = $fe16bffc7a557bf0$export$7f54fc3180508a52(listener);
|
|
6
|
+
let isDisabled = listener == null;
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
if (isDisabled || ref.current == null) return;
|
|
9
|
+
return $d447af545b77c9f1$export$f531f92e2a15358f(ref.current, event, handleEvent, options);
|
|
10
|
+
}, [
|
|
11
|
+
ref,
|
|
12
|
+
event,
|
|
13
|
+
options,
|
|
14
|
+
isDisabled
|
|
15
|
+
]);
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { $600b3cf69ae46262$export$90fc3a17d93f704c as t };
|