@eightshift/ui-components 1.0.6 → 1.1.1
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/README.md +9 -0
- package/dist/{Button-eebLs4cp.js → Button-CbFrFO04.js} +5 -5
- package/dist/{Checkbox-BN0TEda-.js → Checkbox-Cv3pZDHg.js} +12 -16
- package/dist/{ColorSwatch-BrowHhTG.js → ColorSwatch-CNQmCQV8.js} +6 -7
- package/dist/{FieldError-ILxgMZy5.js → FieldError-J1-YPbi6.js} +2 -2
- package/dist/{FocusScope-B9b0VMib.js → FocusScope-Bw-IatMO.js} +79 -153
- package/dist/{GridList-CzpWxJsS.js → GridList-CEzzyr-l.js} +62 -90
- package/dist/{Group-Dkdm2-E7.js → Group-D3Qa6PrV.js} +3 -3
- package/dist/{Input-BJA4rmIo.js → Input-CX_rocyZ.js} +8 -8
- package/dist/{Label-9x5iLJ-Y.js → Label-Bg5O81Wb.js} +1 -1
- package/dist/{ListBox-D3Vr4vvC.js → ListBox-CCWXTj0t.js} +391 -598
- package/dist/{LiveAnnouncer-IsokfWQ5.js → LiveAnnouncer-D8h-3GrG.js} +12 -22
- package/dist/{NumberFormatter-LzoKy975.js → NumberFormatter-U_Gx0UDq.js} +26 -44
- package/dist/{Select-49a62830.esm-CKPmlkza.js → Select-49a62830.esm-BnlXlUnT.js} +92 -166
- package/dist/{SelectionManager-sedvcM-1.js → SelectionManager-XOAt-Ekx.js} +219 -401
- package/dist/{Separator-B6rnDabE.js → Separator-DZeg0KOr.js} +41 -72
- package/dist/{Slider-C5U5N7uM.js → Slider-fULMI0gI.js} +51 -82
- package/dist/{Text-Cyxp9ewv.js → Text-WqetJduR.js} +1 -1
- package/dist/{VisuallyHidden-BPJVSUyp.js → VisuallyHidden-Di1zXprL.js} +8 -11
- package/dist/{ariaHideOutside-ByKBPHmX.js → ariaHideOutside-Zn64-frS.js} +20 -36
- package/dist/assets/style.css +1 -1
- package/dist/assets/wp-font-enhancements.css +1 -1
- package/dist/assets/wp-ui-enhancements.css +1 -1
- package/dist/{button-idVI4jmd.js → button-CD8Q1eok.js} +17 -29
- package/dist/components/animated-visibility/animated-visibility.js +125 -113
- package/dist/components/base-control/base-control.js +3 -9
- package/dist/components/breakpoint-preview/breakpoint-preview.js +51 -108
- package/dist/components/button/button.js +6 -6
- package/dist/components/checkbox/checkbox.js +2 -2
- package/dist/components/color-pickers/color-picker.js +2 -2
- package/dist/components/color-pickers/color-swatch.js +5 -9
- package/dist/components/color-pickers/gradient-editor.js +15 -29
- package/dist/components/color-pickers/solid-color-picker.js +81 -128
- package/dist/components/component-toggle/component-toggle.js +4 -4
- package/dist/components/container-panel/container-panel.js +4 -11
- package/dist/components/draggable-list/draggable-list-item.js +4 -4
- package/dist/components/draggable-list/draggable-list.js +5 -5
- package/dist/components/expandable/expandable.js +45 -57
- package/dist/components/index.js +3 -3
- package/dist/components/input-field/input-field.js +11 -26
- package/dist/components/layout/hstack.js +2 -12
- package/dist/components/layout/vstack.js +2 -12
- package/dist/components/link-input/link-input.js +36 -53
- package/dist/components/list-box/list-box.js +4 -4
- package/dist/components/matrix-align/matrix-align.js +6 -10
- package/dist/components/menu/menu.js +101 -170
- package/dist/components/notice/notice.js +1 -1
- package/dist/components/number-picker/number-picker.js +15 -15
- package/dist/components/option-select/option-select.js +48 -64
- package/dist/components/options-panel/options-panel.js +3 -3
- package/dist/components/placeholders/file-placeholder.js +2 -2
- package/dist/components/placeholders/image-placeholder.js +1 -1
- package/dist/components/placeholders/media-placeholder.js +1 -1
- package/dist/components/popover/popover.js +4 -4
- package/dist/components/radio/radio.js +25 -38
- package/dist/components/repeater/repeater-item.js +6 -17
- package/dist/components/repeater/repeater.js +6 -7
- package/dist/components/responsive/responsive-legacy.js +6 -12
- package/dist/components/responsive/responsive.js +21 -48
- package/dist/components/responsive-preview/responsive-preview.js +1 -1
- package/dist/components/rich-label/rich-label.js +2 -8
- package/dist/components/select/async-multi-select.js +3 -3
- package/dist/components/select/async-single-select.js +2 -2
- package/dist/components/select/custom-select-default-components.js +2 -2
- package/dist/components/select/multi-select-components.js +2 -2
- package/dist/components/select/multi-select.js +3 -3
- package/dist/components/select/react-select-component-wrappers.js +9 -9
- package/dist/components/select/single-select.js +2 -2
- package/dist/components/select/styles.js +3 -10
- package/dist/components/slider/column-config-slider.js +4 -4
- package/dist/components/slider/slider.js +5 -8
- package/dist/components/slider/utils.js +2 -6
- package/dist/components/spacer/spacer.js +2 -7
- package/dist/components/tabs/tabs.js +29 -50
- package/dist/components/toggle/switch.js +8 -8
- package/dist/components/toggle/toggle.js +1 -1
- package/dist/components/toggle-button/toggle-button.js +8 -22
- package/dist/components/tooltip/tooltip.js +4 -4
- package/dist/{context-BAcFg5GO.js → context-4oSz1ItD.js} +10 -16
- package/dist/{default-i18n-Bk1GxDHz.js → default-i18n-BqwLkgZv.js} +21 -22
- package/dist/{filterDOMProps-DG2RfOUr.js → filterDOMProps-EDDcM64A.js} +1 -3
- package/dist/{focusSafely-B0hyd-S4.js → focusSafely-BS4dllCW.js} +85 -143
- package/dist/icons/generic-color-swatch.js +105 -13
- package/dist/icons/icons.js +31010 -3447
- package/dist/icons/jsx-svg.js +591 -953
- package/dist/{index-BDk0TPWz.js → index-CAPcSs9K.js} +1504 -2087
- package/dist/{index-a301f526.esm-BzTuHLdr.js → index-a301f526.esm-ByOfDxiG.js} +111 -183
- package/dist/index.js +3 -3
- package/dist/{intlStrings-Ctkp0HDc.js → intlStrings-Dxaeitoh.js} +35 -60
- package/dist/{isScrollable-PcyglExV.js → isScrollable-Dh9D9IOd.js} +1 -2
- package/dist/lite-DVmmD_-j.js +7 -0
- package/dist/{multi-select-components-nORKdJ-2.js → multi-select-components-7vKCF8dG.js} +3 -3
- package/dist/{number-rWqELA8W.js → number-CHmNj-oR.js} +3 -6
- package/dist/{popover-o2Q28Ljn.js → popover-Dk2o4S7K.js} +70 -112
- package/dist/{react-select-async.esm-CLj9uZTq.js → react-select-async.esm-5zW9Dv9E.js} +7 -11
- package/dist/{react-select.esm-3tyTZmrx.js → react-select.esm-Bi6uzjbT.js} +3 -3
- package/dist/{textSelection-BRZdHY-4.js → textSelection-exP_9srp.js} +5 -9
- package/dist/{tooltip-T6H9uF-Z.js → tooltip-BRQ4tvZL.js} +64 -111
- package/dist/{useButton-D-xACzEY.js → useButton-DbjDV_33.js} +19 -22
- package/dist/{useEvent-XlYPKgwX.js → useEvent-zvxfEnmK.js} +2 -3
- package/dist/{useFocusRing-CRx_hYC4.js → useFocusRing-SPRI0-SN.js} +1 -1
- package/dist/{useFocusable-CHfpEdlE.js → useFocusable-CLmhO94g.js} +5 -8
- package/dist/{useFormReset-aHn6-wRk.js → useFormReset-BVWgcyGO.js} +2 -3
- package/dist/{useFormValidationState-CdYmOaXI.js → useFormValidationState-CthG9Fbc.js} +20 -38
- package/dist/{useHasTabbableChild-domoFB7A.js → useHasTabbableChild--gkWUICh.js} +2 -2
- package/dist/{useLabel-DVhXVhtH.js → useLabel-g836T8kL.js} +3 -4
- package/dist/{useLabels-C7E5SkOi.js → useLabels-CfOtyOe2.js} +3 -5
- package/dist/{useListData-BelKu4kx.js → useListData-BpYQj7kK.js} +18 -32
- package/dist/{useListState-BRsq7O1C.js → useListState-DnWZa__1.js} +6 -12
- package/dist/{useLocalizedStringFormatter-WsEL47qR.js → useLocalizedStringFormatter-BQCMno9k.js} +12 -21
- package/dist/{useNumberFieldState-ZH2Qyyxh.js → useNumberFieldState-BegO5X6F.js} +75 -132
- package/dist/{useNumberFormatter-mhdYLxWQ.js → useNumberFormatter-DhOGEsEK.js} +2 -2
- package/dist/{usePress-B42RawCH.js → usePress-CScNeV3V.js} +92 -175
- package/dist/{useToggle-CExfZM8x.js → useToggle-6LnpaJ7-.js} +6 -7
- package/dist/{useToggleState-DghG5ImG.js → useToggleState-Cymkpac8.js} +3 -5
- package/dist/utilities/array-helpers.js +1 -1
- package/dist/utilities/index.js +1 -1
- package/dist/utilities/text-helpers.js +20 -20
- package/dist/{utils-DIBzm1e4.js → utils-Dc35LwuT.js} +49 -90
- package/package.json +96 -90
- package/dist/lite-pbIeT7tm.js +0 -8
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { $ as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "./Button-
|
|
1
|
+
import { $ as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "./Button-CbFrFO04.js";
|
|
2
2
|
import { $ as $4e85f108e88277b8$export$b085522c77523c51 } from "./RSPContexts-CrNYmadY.js";
|
|
3
|
-
import { k as $ef06256079686ba0$export$f8aeda7b10753fa1, l as $c5a24bc478652b5f$export$7475b2c64539e4cf, f as $880e95eb8b93ba9a$export$ecf600387e221c37, m as $2f04cbc44ee30ce0$export$c826860796309d1b, n as $7135fc7d473fd974$export$6cd28814d92fa9c9, o as $7135fc7d473fd974$export$727c8fc270210f13, j as $7135fc7d473fd974$export$e7c29ae2353b16ea } from "./SelectionManager-
|
|
4
|
-
import { e as $bdb11010cef70236$export$f680877a34711e37, d as $3ef42575df84b30b$export$9d1611c77c2fe928, k as $bdb11010cef70236$export$b4cc09c592e8fdb8, n as $ff5963eb1fccf552$export$e08e3b67e392101e, a as $64fa3d84918910a7$export$29f1550f4b0d4415, c as $64fa3d84918910a7$export$4d86445c2cf5e3, j as $64fa3d84918910a7$export$2881499e37b75b9a, l as $df56164dff5785e2$export$4338b53315abf666, s as $64fa3d84918910a7$export$c62b8e45d58ddad9 } from "./utils-
|
|
5
|
-
import { d as $eed445e0843c11d0$export$7c5906fe4f1f2af2, e as $d8f176866e6dc039$export$d188a835a7bc5783, f as $d8f176866e6dc039$export$f55761759794cf55, a as $d8f176866e6dc039$export$62ed72bc21f6b8a6 } from "./ListBox-
|
|
6
|
-
import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "./Text-
|
|
7
|
-
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-
|
|
3
|
+
import { k as $ef06256079686ba0$export$f8aeda7b10753fa1, l as $c5a24bc478652b5f$export$7475b2c64539e4cf, f as $880e95eb8b93ba9a$export$ecf600387e221c37, m as $2f04cbc44ee30ce0$export$c826860796309d1b, n as $7135fc7d473fd974$export$6cd28814d92fa9c9, o as $7135fc7d473fd974$export$727c8fc270210f13, j as $7135fc7d473fd974$export$e7c29ae2353b16ea } from "./SelectionManager-XOAt-Ekx.js";
|
|
4
|
+
import { e as $bdb11010cef70236$export$f680877a34711e37, d as $3ef42575df84b30b$export$9d1611c77c2fe928, k as $bdb11010cef70236$export$b4cc09c592e8fdb8, n as $ff5963eb1fccf552$export$e08e3b67e392101e, a as $64fa3d84918910a7$export$29f1550f4b0d4415, c as $64fa3d84918910a7$export$4d86445c2cf5e3, j as $64fa3d84918910a7$export$2881499e37b75b9a, l as $df56164dff5785e2$export$4338b53315abf666, s as $64fa3d84918910a7$export$c62b8e45d58ddad9 } from "./utils-Dc35LwuT.js";
|
|
5
|
+
import { d as $eed445e0843c11d0$export$7c5906fe4f1f2af2, e as $d8f176866e6dc039$export$d188a835a7bc5783, f as $d8f176866e6dc039$export$f55761759794cf55, a as $d8f176866e6dc039$export$62ed72bc21f6b8a6 } from "./ListBox-CCWXTj0t.js";
|
|
6
|
+
import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "./Text-WqetJduR.js";
|
|
7
|
+
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-EDDcM64A.js";
|
|
8
8
|
import React__default, { useRef, useEffect, useMemo, createContext, forwardRef, useContext } from "react";
|
|
9
|
-
import { $ as $e72dd72e1c76a225$export$2f645645f7bca764 } from "./useListState-
|
|
10
|
-
import { w as $507fabe10e71c6fb$export$98e20ec92f614cfe, h as $6a99195332edec8b$export$80f3e147d781571c, a as $507fabe10e71c6fb$export$b9b3dfddab17db27, $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "./focusSafely-
|
|
11
|
-
import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-
|
|
12
|
-
import { $ as $319e236875307eab$export$a9b970dcc4ae71a9 } from "./LiveAnnouncer-
|
|
13
|
-
import { $ as $83013635b024ae3d$export$eac1895992b9f3d6 } from "./useHasTabbableChild
|
|
14
|
-
import { $ as $982254629710d113$export$b95089534ab7c1fd, a as $2a25aae57d74318e$export$a05409b8bb224a5a } from "./Separator-
|
|
15
|
-
import { d as $ea8dcbcb9ea1b556$export$51437d503373d223 } from "./usePress-
|
|
16
|
-
import { $ as $62d8ded9296f3872$export$cfa2225e87938781 } from "./ariaHideOutside-
|
|
17
|
-
import { a as $9bf71ea28793e738$export$2d6ec8fc375ceafa, $ as $9bf71ea28793e738$export$20e40289641fbbb6 } from "./FocusScope-
|
|
18
|
-
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-
|
|
19
|
-
import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "./useFocusRing-
|
|
20
|
-
import { a as $5c3e21d68f1c4674$export$a966af930f325cab } from "./VisuallyHidden-
|
|
9
|
+
import { $ as $e72dd72e1c76a225$export$2f645645f7bca764 } from "./useListState-DnWZa__1.js";
|
|
10
|
+
import { w as $507fabe10e71c6fb$export$98e20ec92f614cfe, h as $6a99195332edec8b$export$80f3e147d781571c, a as $507fabe10e71c6fb$export$b9b3dfddab17db27, $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "./focusSafely-BS4dllCW.js";
|
|
11
|
+
import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-BQCMno9k.js";
|
|
12
|
+
import { $ as $319e236875307eab$export$a9b970dcc4ae71a9 } from "./LiveAnnouncer-D8h-3GrG.js";
|
|
13
|
+
import { $ as $83013635b024ae3d$export$eac1895992b9f3d6 } from "./useHasTabbableChild--gkWUICh.js";
|
|
14
|
+
import { $ as $982254629710d113$export$b95089534ab7c1fd, a as $2a25aae57d74318e$export$a05409b8bb224a5a } from "./Separator-DZeg0KOr.js";
|
|
15
|
+
import { d as $ea8dcbcb9ea1b556$export$51437d503373d223 } from "./usePress-CScNeV3V.js";
|
|
16
|
+
import { $ as $62d8ded9296f3872$export$cfa2225e87938781 } from "./ariaHideOutside-Zn64-frS.js";
|
|
17
|
+
import { a as $9bf71ea28793e738$export$2d6ec8fc375ceafa, $ as $9bf71ea28793e738$export$20e40289641fbbb6 } from "./FocusScope-Bw-IatMO.js";
|
|
18
|
+
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-4oSz1ItD.js";
|
|
19
|
+
import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "./useFocusRing-SPRI0-SN.js";
|
|
20
|
+
import { a as $5c3e21d68f1c4674$export$a966af930f325cab } from "./VisuallyHidden-Di1zXprL.js";
|
|
21
21
|
function $4f58c5f72bcf79f7$export$496315a1608d9602(effect, dependencies) {
|
|
22
22
|
const isInitialMount = useRef(true);
|
|
23
23
|
const lastDeps = useRef(null);
|
|
@@ -28,23 +28,19 @@ function $4f58c5f72bcf79f7$export$496315a1608d9602(effect, dependencies) {
|
|
|
28
28
|
};
|
|
29
29
|
}, []);
|
|
30
30
|
useEffect(() => {
|
|
31
|
-
if (isInitialMount.current)
|
|
32
|
-
|
|
33
|
-
else if (!lastDeps.current || dependencies.some((dep, i) => !Object.is(dep, lastDeps[i])))
|
|
34
|
-
effect();
|
|
31
|
+
if (isInitialMount.current) isInitialMount.current = false;
|
|
32
|
+
else if (!lastDeps.current || dependencies.some((dep, i) => !Object.is(dep, lastDeps[i]))) effect();
|
|
35
33
|
lastDeps.current = dependencies;
|
|
36
34
|
}, dependencies);
|
|
37
35
|
}
|
|
38
36
|
const $ce9b18daab526bbd$export$5b9bb410392e3991 = /* @__PURE__ */ new WeakMap();
|
|
39
37
|
function $ce9b18daab526bbd$export$f45c25170b9a99c2(state, key) {
|
|
40
38
|
let { id } = $ce9b18daab526bbd$export$5b9bb410392e3991.get(state);
|
|
41
|
-
if (!id)
|
|
42
|
-
throw new Error("Unknown list");
|
|
39
|
+
if (!id) throw new Error("Unknown list");
|
|
43
40
|
return `${id}-${$ce9b18daab526bbd$export$e0c709538cb8ae18(key)}`;
|
|
44
41
|
}
|
|
45
42
|
function $ce9b18daab526bbd$export$e0c709538cb8ae18(key) {
|
|
46
|
-
if (typeof key === "string")
|
|
47
|
-
return key.replace(/\s*/g, "");
|
|
43
|
+
if (typeof key === "string") return key.replace(/\s*/g, "");
|
|
48
44
|
return "" + key;
|
|
49
45
|
}
|
|
50
46
|
var $682989befd4f478d$exports = {};
|
|
@@ -551,34 +547,29 @@ function $92599c3fd427b763$export$137e594ef3218a10(props, state) {
|
|
|
551
547
|
if (state.selectionManager.selectedKeys.size === 1 && isReplace) {
|
|
552
548
|
if (state.collection.getItem(state.selectionManager.selectedKeys.keys().next().value)) {
|
|
553
549
|
let currentSelectionText = getRowText(state.selectionManager.selectedKeys.keys().next().value);
|
|
554
|
-
if (currentSelectionText)
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
}));
|
|
550
|
+
if (currentSelectionText) messages.push(stringFormatter.format("selectedItem", {
|
|
551
|
+
item: currentSelectionText
|
|
552
|
+
}));
|
|
558
553
|
}
|
|
559
554
|
} else if (addedKeys.size === 1 && removedKeys.size === 0) {
|
|
560
555
|
let addedText = getRowText(addedKeys.keys().next().value);
|
|
561
|
-
if (addedText)
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
}));
|
|
556
|
+
if (addedText) messages.push(stringFormatter.format("selectedItem", {
|
|
557
|
+
item: addedText
|
|
558
|
+
}));
|
|
565
559
|
} else if (removedKeys.size === 1 && addedKeys.size === 0) {
|
|
566
560
|
if (state.collection.getItem(removedKeys.keys().next().value)) {
|
|
567
561
|
let removedText = getRowText(removedKeys.keys().next().value);
|
|
568
|
-
if (removedText)
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
}));
|
|
562
|
+
if (removedText) messages.push(stringFormatter.format("deselectedItem", {
|
|
563
|
+
item: removedText
|
|
564
|
+
}));
|
|
572
565
|
}
|
|
573
566
|
}
|
|
574
567
|
if (state.selectionManager.selectionMode === "multiple") {
|
|
575
|
-
if (messages.length === 0 || selection === "all" || selection.size > 1 || lastSelection.current === "all" || ((_lastSelection_current = lastSelection.current) === null || _lastSelection_current === void 0 ? void 0 : _lastSelection_current.size) > 1)
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
}));
|
|
568
|
+
if (messages.length === 0 || selection === "all" || selection.size > 1 || lastSelection.current === "all" || ((_lastSelection_current = lastSelection.current) === null || _lastSelection_current === void 0 ? void 0 : _lastSelection_current.size) > 1) messages.push(selection === "all" ? stringFormatter.format("selectedAll") : stringFormatter.format("selectedCount", {
|
|
569
|
+
count: selection.size
|
|
570
|
+
}));
|
|
579
571
|
}
|
|
580
|
-
if (messages.length > 0)
|
|
581
|
-
$319e236875307eab$export$a9b970dcc4ae71a9(messages.join(" "));
|
|
572
|
+
if (messages.length > 0) $319e236875307eab$export$a9b970dcc4ae71a9(messages.join(" "));
|
|
582
573
|
lastSelection.current = selection;
|
|
583
574
|
}, [
|
|
584
575
|
selection
|
|
@@ -586,11 +577,8 @@ function $92599c3fd427b763$export$137e594ef3218a10(props, state) {
|
|
|
586
577
|
}
|
|
587
578
|
function $92599c3fd427b763$var$diffSelection(a, b) {
|
|
588
579
|
let res = /* @__PURE__ */ new Set();
|
|
589
|
-
if (a === "all" || b === "all")
|
|
590
|
-
|
|
591
|
-
for (let key of a.keys())
|
|
592
|
-
if (!b.has(key))
|
|
593
|
-
res.add(key);
|
|
580
|
+
if (a === "all" || b === "all") return res;
|
|
581
|
+
for (let key of a.keys()) if (!b.has(key)) res.add(key);
|
|
594
582
|
return res;
|
|
595
583
|
}
|
|
596
584
|
function $parcel$interopDefault$1(a) {
|
|
@@ -604,8 +592,7 @@ function $5b9b5b5723db6ae1$export$be42ebdab07ae4c2(props) {
|
|
|
604
592
|
let selectionMode = props.selectionManager.selectionMode;
|
|
605
593
|
let selectionBehavior = props.selectionManager.selectionBehavior;
|
|
606
594
|
let message = void 0;
|
|
607
|
-
if (shouldLongPress)
|
|
608
|
-
message = stringFormatter.format("longPressToSelect");
|
|
595
|
+
if (shouldLongPress) message = stringFormatter.format("longPressToSelect");
|
|
609
596
|
return selectionBehavior === "replace" && selectionMode !== "none" && props.hasItemActions ? message : void 0;
|
|
610
597
|
}, [
|
|
611
598
|
props.selectionManager.selectionMode,
|
|
@@ -640,8 +627,7 @@ function $7cb39d07f245a780$export$70e2eed1a92976ad(props, state) {
|
|
|
640
627
|
}
|
|
641
628
|
function $f47efb0c3a859cf2$export$664f9155035607eb(props, state, ref) {
|
|
642
629
|
let { isVirtualized, keyboardDelegate, onAction, linkBehavior = "action" } = props;
|
|
643
|
-
if (!props["aria-label"] && !props["aria-labelledby"])
|
|
644
|
-
console.warn("An aria-label or aria-labelledby prop is required for accessibility.");
|
|
630
|
+
if (!props["aria-label"] && !props["aria-labelledby"]) console.warn("An aria-label or aria-labelledby prop is required for accessibility.");
|
|
645
631
|
let { listProps } = $982254629710d113$export$b95089534ab7c1fd({
|
|
646
632
|
selectionManager: state.selectionManager,
|
|
647
633
|
collection: state.collection,
|
|
@@ -710,8 +696,7 @@ function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
|
|
|
710
696
|
let keyWhenFocused = useRef(null);
|
|
711
697
|
let focus = () => {
|
|
712
698
|
var _ref_current;
|
|
713
|
-
if (keyWhenFocused.current != null && node.key !== keyWhenFocused.current || !((_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.contains(document.activeElement)))
|
|
714
|
-
$6a99195332edec8b$export$80f3e147d781571c(ref.current);
|
|
699
|
+
if (keyWhenFocused.current != null && node.key !== keyWhenFocused.current || !((_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.contains(document.activeElement))) $6a99195332edec8b$export$80f3e147d781571c(ref.current);
|
|
715
700
|
};
|
|
716
701
|
let treeGridRowProps = {};
|
|
717
702
|
let hasChildRows;
|
|
@@ -720,8 +705,7 @@ function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
|
|
|
720
705
|
hasChildRows = [
|
|
721
706
|
...state.collection.getChildren(node.key)
|
|
722
707
|
].length > 1;
|
|
723
|
-
if (onAction == null && !hasLink && state.selectionManager.selectionMode === "none" && hasChildRows)
|
|
724
|
-
onAction = () => state.toggleKey(node.key);
|
|
708
|
+
if (onAction == null && !hasLink && state.selectionManager.selectionMode === "none" && hasChildRows) onAction = () => state.toggleKey(node.key);
|
|
725
709
|
let isExpanded = hasChildRows ? state.expandedKeys.has(node.key) : void 0;
|
|
726
710
|
treeGridRowProps = {
|
|
727
711
|
"aria-expanded": isExpanded,
|
|
@@ -743,8 +727,7 @@ function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
|
|
|
743
727
|
linkBehavior
|
|
744
728
|
});
|
|
745
729
|
let onKeyDown = (e) => {
|
|
746
|
-
if (!e.currentTarget.contains(e.target))
|
|
747
|
-
return;
|
|
730
|
+
if (!e.currentTarget.contains(e.target)) return;
|
|
748
731
|
let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(ref.current);
|
|
749
732
|
walker.currentNode = document.activeElement;
|
|
750
733
|
if ("expandedKeys" in state && document.activeElement === ref.current) {
|
|
@@ -832,8 +815,7 @@ function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
|
|
|
832
815
|
let onFocus = (e) => {
|
|
833
816
|
keyWhenFocused.current = node.key;
|
|
834
817
|
if (e.target !== ref.current) {
|
|
835
|
-
if (!$507fabe10e71c6fb$export$b9b3dfddab17db27())
|
|
836
|
-
state.selectionManager.setFocusedKey(node.key);
|
|
818
|
+
if (!$507fabe10e71c6fb$export$b9b3dfddab17db27()) state.selectionManager.setFocusedKey(node.key);
|
|
837
819
|
return;
|
|
838
820
|
}
|
|
839
821
|
};
|
|
@@ -849,8 +831,7 @@ function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
|
|
|
849
831
|
"aria-labelledby": descriptionId && node.textValue ? `${$ce9b18daab526bbd$export$f45c25170b9a99c2(state, node.key)} ${descriptionId}` : void 0,
|
|
850
832
|
id: $ce9b18daab526bbd$export$f45c25170b9a99c2(state, node.key)
|
|
851
833
|
});
|
|
852
|
-
if (isVirtualized)
|
|
853
|
-
rowProps["aria-rowindex"] = node.index + 1;
|
|
834
|
+
if (isVirtualized) rowProps["aria-rowindex"] = node.index + 1;
|
|
854
835
|
let gridCellProps = {
|
|
855
836
|
role: "gridcell",
|
|
856
837
|
"aria-colindex": 1
|
|
@@ -871,8 +852,7 @@ function $4e8b0456ef72939f$var$last(walker) {
|
|
|
871
852
|
let last;
|
|
872
853
|
do {
|
|
873
854
|
last = walker.lastChild();
|
|
874
|
-
if (last)
|
|
875
|
-
next = last;
|
|
855
|
+
if (last) next = last;
|
|
876
856
|
} while (last);
|
|
877
857
|
return next;
|
|
878
858
|
}
|
|
@@ -923,10 +903,8 @@ function $72e60046c03fbe42$var$GridListInner({ props, collection, gridListRef: r
|
|
|
923
903
|
let dragHooksProvided = useRef(isListDraggable);
|
|
924
904
|
let dropHooksProvided = useRef(isListDroppable);
|
|
925
905
|
useEffect(() => {
|
|
926
|
-
if (dragHooksProvided.current !== isListDraggable)
|
|
927
|
-
|
|
928
|
-
if (dropHooksProvided.current !== isListDroppable)
|
|
929
|
-
console.warn("Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.");
|
|
906
|
+
if (dragHooksProvided.current !== isListDraggable) console.warn("Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.");
|
|
907
|
+
if (dropHooksProvided.current !== isListDroppable) console.warn("Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.");
|
|
930
908
|
}, [
|
|
931
909
|
isListDraggable,
|
|
932
910
|
isListDroppable
|
|
@@ -1057,22 +1035,20 @@ function $72e60046c03fbe42$var$GridListRow({ item }) {
|
|
|
1057
1035
|
key: item.key
|
|
1058
1036
|
}, state);
|
|
1059
1037
|
let draggableItem = null;
|
|
1060
|
-
if (dragState && dragAndDropHooks)
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
}, dragState);
|
|
1038
|
+
if (dragState && dragAndDropHooks) draggableItem = dragAndDropHooks.useDraggableItem({
|
|
1039
|
+
key: item.key,
|
|
1040
|
+
hasDragButton: true
|
|
1041
|
+
}, dragState);
|
|
1065
1042
|
let dropIndicator = null;
|
|
1066
1043
|
let dropIndicatorRef = useRef(null);
|
|
1067
1044
|
let { visuallyHiddenProps } = $5c3e21d68f1c4674$export$a966af930f325cab();
|
|
1068
|
-
if (dropState && dragAndDropHooks)
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
}, dropState, dropIndicatorRef);
|
|
1045
|
+
if (dropState && dragAndDropHooks) dropIndicator = dragAndDropHooks.useDropIndicator({
|
|
1046
|
+
target: {
|
|
1047
|
+
type: "item",
|
|
1048
|
+
key: item.key,
|
|
1049
|
+
dropPosition: "on"
|
|
1050
|
+
}
|
|
1051
|
+
}, dropState, dropIndicatorRef);
|
|
1076
1052
|
let props = item.props;
|
|
1077
1053
|
let isDragging = dragState && dragState.isDragging(item.key);
|
|
1078
1054
|
let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
|
|
@@ -1096,12 +1072,10 @@ function $72e60046c03fbe42$var$GridListRow({ item }) {
|
|
|
1096
1072
|
}));
|
|
1097
1073
|
let dragButtonRef = useRef(null);
|
|
1098
1074
|
useEffect(() => {
|
|
1099
|
-
if (dragState && !dragButtonRef.current)
|
|
1100
|
-
console.warn('Draggable items in a GridList must contain a <Button slot="drag"> element so that keyboard and screen reader users can drag them.');
|
|
1075
|
+
if (dragState && !dragButtonRef.current) console.warn('Draggable items in a GridList must contain a <Button slot="drag"> element so that keyboard and screen reader users can drag them.');
|
|
1101
1076
|
}, []);
|
|
1102
1077
|
useEffect(() => {
|
|
1103
|
-
if (!item.textValue)
|
|
1104
|
-
console.warn("A `textValue` prop is required for <GridListItem> elements with non-plain text children in order to support accessibility features such as type to select.");
|
|
1078
|
+
if (!item.textValue) console.warn("A `textValue` prop is required for <GridListItem> elements with non-plain text children in order to support accessibility features such as type to select.");
|
|
1105
1079
|
}, [
|
|
1106
1080
|
item.textValue
|
|
1107
1081
|
]);
|
|
@@ -1185,8 +1159,7 @@ function $72e60046c03fbe42$var$GridListDropIndicatorWrapper(props, ref) {
|
|
|
1185
1159
|
let { dragAndDropHooks, dropState } = useContext($d8f176866e6dc039$export$d188a835a7bc5783);
|
|
1186
1160
|
let buttonRef = useRef(null);
|
|
1187
1161
|
let { dropIndicatorProps, isHidden, isDropTarget } = dragAndDropHooks.useDropIndicator(props, dropState, buttonRef);
|
|
1188
|
-
if (isHidden)
|
|
1189
|
-
return null;
|
|
1162
|
+
if (isHidden) return null;
|
|
1190
1163
|
return /* @__PURE__ */ React__default.createElement($72e60046c03fbe42$var$GridListDropIndicatorForwardRef, {
|
|
1191
1164
|
...props,
|
|
1192
1165
|
dropIndicatorProps,
|
|
@@ -1232,8 +1205,7 @@ function $72e60046c03fbe42$var$RootDropIndicator() {
|
|
|
1232
1205
|
type: "root"
|
|
1233
1206
|
});
|
|
1234
1207
|
let { visuallyHiddenProps } = $5c3e21d68f1c4674$export$a966af930f325cab();
|
|
1235
|
-
if (!isDropTarget && dropIndicatorProps["aria-hidden"])
|
|
1236
|
-
return null;
|
|
1208
|
+
if (!isDropTarget && dropIndicatorProps["aria-hidden"]) return null;
|
|
1237
1209
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
1238
1210
|
role: "row",
|
|
1239
1211
|
"aria-hidden": dropIndicatorProps["aria-hidden"],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as $64fa3d84918910a7$export$29f1550f4b0d4415, c as $64fa3d84918910a7$export$4d86445c2cf5e3, d as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./utils-
|
|
1
|
+
import { a as $64fa3d84918910a7$export$29f1550f4b0d4415, c as $64fa3d84918910a7$export$4d86445c2cf5e3, d as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./utils-Dc35LwuT.js";
|
|
2
2
|
import React__default, { forwardRef, createContext } from "react";
|
|
3
|
-
import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "./focusSafely-
|
|
4
|
-
import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "./useFocusRing-
|
|
3
|
+
import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "./focusSafely-BS4dllCW.js";
|
|
4
|
+
import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "./useFocusRing-SPRI0-SN.js";
|
|
5
5
|
const $a049562f99e7db0e$export$f9c6924e160136d1 = /* @__PURE__ */ createContext({});
|
|
6
6
|
function $a049562f99e7db0e$var$Group(props, ref) {
|
|
7
7
|
[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $a049562f99e7db0e$export$f9c6924e160136d1);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React__default, { useEffect, createContext } from "react";
|
|
2
|
-
import { e as $458b0a5536c1a7cf$export$40bfa8c7b0832715, f as $431fbd86ca7dc216$export$f21a1ffae260145a, $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "./focusSafely-
|
|
3
|
-
import { d as $3ef42575df84b30b$export$9d1611c77c2fe928, b as $64fa3d84918910a7$export$86427a43e3e48ebb, a as $64fa3d84918910a7$export$29f1550f4b0d4415, c as $64fa3d84918910a7$export$4d86445c2cf5e3 } from "./utils-
|
|
4
|
-
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-
|
|
5
|
-
import { $ as $99facab73266f662$export$5add1d006293d136 } from "./useFormReset-
|
|
6
|
-
import { a as $2baaea4c71418dea$export$294aa081a6c6f55d } from "./FieldError-
|
|
7
|
-
import { $ as $e6afbd83fe6ebbd2$export$4c014de7c8940b4c } from "./useFocusable-
|
|
8
|
-
import { $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, a as $e93e671b31057976$export$b8473d3665f3a75a } from "./useFormValidationState-
|
|
9
|
-
import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "./useFocusRing-
|
|
2
|
+
import { e as $458b0a5536c1a7cf$export$40bfa8c7b0832715, f as $431fbd86ca7dc216$export$f21a1ffae260145a, $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "./focusSafely-BS4dllCW.js";
|
|
3
|
+
import { d as $3ef42575df84b30b$export$9d1611c77c2fe928, b as $64fa3d84918910a7$export$86427a43e3e48ebb, a as $64fa3d84918910a7$export$29f1550f4b0d4415, c as $64fa3d84918910a7$export$4d86445c2cf5e3 } from "./utils-Dc35LwuT.js";
|
|
4
|
+
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-EDDcM64A.js";
|
|
5
|
+
import { $ as $99facab73266f662$export$5add1d006293d136 } from "./useFormReset-BVWgcyGO.js";
|
|
6
|
+
import { a as $2baaea4c71418dea$export$294aa081a6c6f55d } from "./FieldError-J1-YPbi6.js";
|
|
7
|
+
import { $ as $e6afbd83fe6ebbd2$export$4c014de7c8940b4c } from "./useFocusable-CLmhO94g.js";
|
|
8
|
+
import { $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, a as $e93e671b31057976$export$b8473d3665f3a75a } from "./useFormValidationState-CthG9Fbc.js";
|
|
9
|
+
import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "./useFocusRing-SPRI0-SN.js";
|
|
10
10
|
function $2d73ec29415bd339$export$712718f7aec83d5(props, ref) {
|
|
11
11
|
let { inputElementType = "input", isDisabled = false, isRequired = false, isReadOnly = false, type = "text", validationBehavior = "aria" } = props;
|
|
12
12
|
let [value, setValue] = $458b0a5536c1a7cf$export$40bfa8c7b0832715(props.value, props.defaultValue || "", props.onChange);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as $64fa3d84918910a7$export$86427a43e3e48ebb, a as $64fa3d84918910a7$export$29f1550f4b0d4415 } from "./utils-
|
|
1
|
+
import { b as $64fa3d84918910a7$export$86427a43e3e48ebb, a as $64fa3d84918910a7$export$29f1550f4b0d4415 } from "./utils-Dc35LwuT.js";
|
|
2
2
|
import React__default, { createContext } from "react";
|
|
3
3
|
const $01b77f81d0f07f68$export$75b6ee27786ba447 = /* @__PURE__ */ createContext({});
|
|
4
4
|
function $01b77f81d0f07f68$var$Label(props, ref) {
|