@eightshift/ui-components 6.0.8 → 6.0.10
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/{Button-BXjXzdW_.js → Button-JRIu2BnS.js} +8 -8
- package/dist/{Dialog-D8bjn-nh.js → Dialog-Dd1yqNus.js} +31 -27
- package/dist/{FieldError-DwBG6m1U.js → FieldError-DmVwL6Dj.js} +2 -2
- package/dist/{FocusScope-BMk5oZCk.js → FocusScope-Dri1oBcH.js} +2 -2
- package/dist/{Heading-BmRX4BRL.js → Heading-eA6LXIKB.js} +1 -1
- package/dist/{Input-CNNksOWg.js → Input-Cuw9UbNb.js} +14 -24
- package/dist/{Label-D8a3eYb-.js → Label-DPWyf-gp.js} +1 -1
- package/dist/{List-BGHOoFf0.js → List-CWheI3JH.js} +1 -1
- package/dist/{ListBox-Dd37zMvs.js → ListBox-DT1sFY3e.js} +17 -16
- package/dist/{OverlayArrow-DokC40S3.js → OverlayArrow-DVJTTfZM.js} +67 -123
- package/dist/{RadioGroup-BVFvITWO.js → RadioGroup-Cp5cdBI_.js} +14 -14
- package/dist/{SearchField-CHYnN-jt.js → SearchField-CLhr5PGZ.js} +44 -37
- package/dist/{SelectionManager-N8X7T_4D.js → SelectionManager-DbBiF5M8.js} +41 -68
- package/dist/{SharedElementTransition-BDT84GtD.js → SharedElementTransition-B_vnQ1uR.js} +1 -1
- package/dist/{Slider-CL5CM9S8.js → Slider-CZV3HhHY.js} +119 -83
- package/dist/{Text-ztX6G1zR.js → Text-Dae33gHp.js} +1 -1
- package/dist/{VisuallyHidden-DTUuKFiI.js → VisuallyHidden-eaCBtXhE.js} +2 -2
- package/dist/animation-DY7CNkr6.js +67 -0
- package/dist/assets/style-admin.css +44 -57
- package/dist/assets/style-editor.css +44 -57
- package/dist/assets/style.css +44 -57
- package/dist/assets/wp-overrides/allow-full-width-blocks.css +1 -1
- package/dist/assets/wp-overrides/fix-label-text-case.css +1 -1
- package/dist/assets/wp-overrides/increase-sidebar-width.css +1 -1
- package/dist/assets/wp-overrides/make-block-messages-nicer.css +1 -1
- package/dist/assets/wp-overrides/replace-fonts.css +1 -1
- package/dist/assets/wp-overrides/restyle-tooltips.css +1 -1
- package/dist/assets/wp-overrides/round-corners.css +1 -1
- package/dist/assets/wp-overrides/unify-button-sizes.css +1 -1
- package/dist/{color-swatch-BEBLRxTy.js → color-swatch-CZj0jHZd.js} +4 -4
- package/dist/components/animated-visibility/animated-visibility.js +2 -2
- package/dist/components/base-control/base-control.js +1 -1
- package/dist/components/button/button.js +5 -5
- package/dist/components/checkbox/checkbox.js +10 -10
- package/dist/components/color-pickers/color-picker.js +1 -1
- package/dist/components/color-pickers/color-swatch.js +1 -1
- package/dist/components/color-pickers/gradient-editor.js +2 -2
- package/dist/components/color-pickers/solid-color-picker.js +17 -17
- package/dist/components/draggable/draggable.js +329 -156
- package/dist/components/draggable-list/draggable-list.js +1 -1
- package/dist/components/expandable/expandable.js +16 -13
- package/dist/components/index.js +1 -1
- package/dist/components/input-field/input-field.js +8 -8
- package/dist/components/link-input/link-input.js +25 -25
- package/dist/components/matrix-align/matrix-align.js +1 -1
- package/dist/components/menu/menu.js +1 -1
- package/dist/components/modal/modal.js +19 -12
- package/dist/components/number-picker/number-picker.js +9 -9
- package/dist/components/options-panel/options-panel.js +1 -1
- package/dist/components/popover/popover.js +5 -5
- package/dist/components/radio/radio.js +2 -2
- package/dist/components/repeater/repeater.js +1 -1
- package/dist/components/responsive/mini-responsive.js +1 -1
- package/dist/components/select/async-multi-select.js +10 -10
- package/dist/components/select/async-select.js +10 -10
- package/dist/components/select/multi-select.js +10 -10
- package/dist/components/select/shared.js +3 -3
- package/dist/components/select/single-select.js +10 -10
- package/dist/components/slider/column-config-slider.js +3 -3
- package/dist/components/slider/slider.js +3 -3
- package/dist/components/smart-image/smart-image.js +1 -1
- package/dist/components/smart-image/worker-inline.js +1 -1
- package/dist/components/tabs/tabs.js +36 -17
- package/dist/components/toggle/switch.js +7 -7
- package/dist/components/toggle/toggle.js +1 -1
- package/dist/components/toggle-button/toggle-button.js +6 -6
- package/dist/components/tooltip/tooltip.js +10 -8
- package/dist/{context-BQvmiUqb.js → context-DYYO3Ns3.js} +9 -6
- package/dist/{filterDOMProps-D2C6R0DK.js → filterDOMProps-eGTqWSTd.js} +1 -1
- package/dist/{general-ChNQK6O9.js → general-C8Q0dvEx.js} +15 -14
- package/dist/{index-oFgxU4zs.js → index-sSixe2j_.js} +20 -20
- package/dist/index.js +1 -1
- package/dist/{proxy-DkQpcQgI.js → proxy-CcjltLEW.js} +272 -121
- package/dist/{shared-DOxXagm0.js → shared-Bg9lx3pE.js} +20 -20
- package/dist/{textSelection-CwHUtNVX.js → textSelection-Cq_Br7RW.js} +1 -1
- package/dist/{useAsyncList-D52mQcrH.js → useAsyncList-DsZvQXls.js} +5 -2
- package/dist/{useButton-DdZrS1Kz.js → useButton-CeuyDay5.js} +4 -4
- package/dist/{useEvent-BD7Olibq.js → useEvent-DoWvho2u.js} +2 -3
- package/dist/{useFilter-bhxeEDg8.js → useFilter-DYtfYPua.js} +1 -1
- package/dist/{useFocusRing-D3b7Kh4P.js → useFocusRing-WEswknAY.js} +1 -1
- package/dist/{useFormReset-WUv2PdFO.js → useFormReset-BDF1K4E4.js} +2 -3
- package/dist/{useFormValidation-DQeXkyLm.js → useFormValidation-Dqzjv4jX.js} +2 -5
- package/dist/{useHover-Bycb7BsD.js → useHover-CG39Ci3A.js} +164 -66
- package/dist/{useLabel-Bnv4-T24.js → useLabel--3fT2XKM.js} +2 -2
- package/dist/{useLabels-B49ptFDX.js → useLabels-vzdDMGCX.js} +1 -1
- package/dist/{useListState-ZKhRO8ML.js → useListState-Bya9g7W8.js} +1 -1
- package/dist/{useLocalizedStringFormatter-NETP-8H8.js → useLocalizedStringFormatter-M3L6Ge2c.js} +3 -3
- package/dist/{useNumberField-D2fUHql3.js → useNumberField-D6lsi3Vu.js} +91 -24
- package/dist/{useNumberFormatter-DGvuRCn7.js → useNumberFormatter-BWOyCamK.js} +1 -1
- package/dist/{usePress-B8OteQMu.js → usePress-B9w0X4Ur.js} +168 -180
- package/dist/{useSingleSelectListState-BBTu4shO.js → useSingleSelectListState-D9SqGLJ0.js} +2 -2
- package/dist/{useToggle-BZhaYwZl.js → useToggle-Deq2xxQV.js} +5 -5
- package/dist/{useToggleState-VkXJjsru.js → useToggleState-j3o1PvdS.js} +1 -1
- package/dist/utilities/general.js +1 -1
- package/dist/utilities/index.js +1 -1
- package/dist/{utils-DGpXyJOJ.js → utils-HC9_3Crc.js} +20 -31
- package/dist/workers/image-analysis.worker.js +1 -1
- package/package.json +24 -28
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { a as $458b0a5536c1a7cf$export$40bfa8c7b0832715,
|
|
1
|
+
import { b as $8ae05eaa5c114e9c$export$7f54fc3180508a52, a as $458b0a5536c1a7cf$export$40bfa8c7b0832715, f as $03deb23ff14920c4$export$4eaf04e54aa8eed6, o as $a1ea59d68270f0dd$export$f8168d8dd8fd66e6, O as $c87311424ea30a05$export$186c6964ca17d99, t as $c87311424ea30a05$export$a11b0059900ceec8, c as $c87311424ea30a05$export$fedb369cb70207f1 } from "./useHover-CG39Ci3A.js";
|
|
2
2
|
import { a as $9446cca9a3875146$export$cb6e0bb50bc19463, $ as $9446cca9a3875146$export$7d15b64cf5a3a4c4 } from "./number-7sOvrqo0.js";
|
|
3
|
-
import { $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, b as $e5be200c675c3b3a$export$a763b9476acd3eb } from "./useFormValidation-
|
|
3
|
+
import { $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, b as $e5be200c675c3b3a$export$a763b9476acd3eb } from "./useFormValidation-Dqzjv4jX.js";
|
|
4
4
|
import { $ as $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5 } from "./NumberFormatter-DA8u1Ot7.js";
|
|
5
5
|
import { useCallback, useEffect, useRef, useState, useMemo } from "react";
|
|
6
|
-
import {
|
|
7
|
-
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-
|
|
8
|
-
import { $ as $99facab73266f662$export$5add1d006293d136 } from "./useFormReset-
|
|
9
|
-
import { $ as $9ab94262bd0047c7$export$420e68273165f4ec } from "./useFocusRing-
|
|
10
|
-
import { $ as $e9faafb641e167db$export$90fc3a17d93f704c } from "./useEvent-
|
|
11
|
-
import { d as $2d73ec29415bd339$export$712718f7aec83d5 } from "./Input-
|
|
12
|
-
import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-
|
|
13
|
-
import { $ as $a916eb452884faea$export$b7a616150fdb9f44 } from "./useNumberFormatter-
|
|
14
|
-
import { d as $319e236875307eab$export$d10ae4f68404609a, c as $319e236875307eab$export$a9b970dcc4ae71a9 } from "./Button-
|
|
6
|
+
import { a as $3ef42575df84b30b$export$9d1611c77c2fe928, c as $bdb11010cef70236$export$f680877a34711e37, n as $ff5963eb1fccf552$export$e08e3b67e392101e } from "./utils-HC9_3Crc.js";
|
|
7
|
+
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-eGTqWSTd.js";
|
|
8
|
+
import { $ as $99facab73266f662$export$5add1d006293d136 } from "./useFormReset-BDF1K4E4.js";
|
|
9
|
+
import { $ as $9ab94262bd0047c7$export$420e68273165f4ec } from "./useFocusRing-WEswknAY.js";
|
|
10
|
+
import { $ as $e9faafb641e167db$export$90fc3a17d93f704c } from "./useEvent-DoWvho2u.js";
|
|
11
|
+
import { d as $2d73ec29415bd339$export$712718f7aec83d5 } from "./Input-Cuw9UbNb.js";
|
|
12
|
+
import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-M3L6Ge2c.js";
|
|
13
|
+
import { $ as $a916eb452884faea$export$b7a616150fdb9f44 } from "./useNumberFormatter-BWOyCamK.js";
|
|
14
|
+
import { d as $319e236875307eab$export$d10ae4f68404609a, c as $319e236875307eab$export$a9b970dcc4ae71a9 } from "./Button-JRIu2BnS.js";
|
|
15
15
|
const $6c7bd7858deea686$var$CURRENCY_SIGN_REGEX = new RegExp("^.*\\(.*\\).*$");
|
|
16
16
|
const $6c7bd7858deea686$var$NUMBERING_SYSTEMS = [
|
|
17
17
|
"latn",
|
|
@@ -291,8 +291,7 @@ function $d841c8010a73d545$export$4f384c9210e583c3(props, state, inputRef) {
|
|
|
291
291
|
input.removeEventListener("beforeinput", onBeforeInputFallback, false);
|
|
292
292
|
};
|
|
293
293
|
}, [
|
|
294
|
-
inputRef
|
|
295
|
-
onBeforeInputFallback
|
|
294
|
+
inputRef
|
|
296
295
|
]);
|
|
297
296
|
let onBeforeInput = !$d841c8010a73d545$var$supportsNativeBeforeInputEvent() ? (e) => {
|
|
298
297
|
let nextValue = e.target.value.slice(0, e.target.selectionStart) + e.data + e.target.value.slice(e.target.selectionEnd);
|
|
@@ -665,9 +664,16 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
|
665
664
|
const _async = useRef(void 0);
|
|
666
665
|
let { value, textValue, minValue, maxValue, isDisabled, isReadOnly, isRequired, onIncrement, onIncrementPage, onDecrement, onDecrementPage, onDecrementToMin, onIncrementToMax } = props;
|
|
667
666
|
const stringFormatter = $fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault$1($a99895ee3dc79e61$exports), "@react-aria/spinbutton");
|
|
668
|
-
|
|
667
|
+
let isSpinning = useRef(false);
|
|
668
|
+
const clearAsync = useCallback(() => {
|
|
669
|
+
clearTimeout(_async.current);
|
|
670
|
+
isSpinning.current = false;
|
|
671
|
+
}, []);
|
|
672
|
+
const clearAsyncEvent = $8ae05eaa5c114e9c$export$7f54fc3180508a52(() => {
|
|
673
|
+
clearAsync();
|
|
674
|
+
});
|
|
669
675
|
useEffect(() => {
|
|
670
|
-
return () =>
|
|
676
|
+
return () => clearAsyncEvent();
|
|
671
677
|
}, []);
|
|
672
678
|
let onKeyDown = (e) => {
|
|
673
679
|
if (e.ctrlKey || e.metaKey || e.shiftKey || e.altKey || isReadOnly || e.nativeEvent.isComposing) return;
|
|
@@ -730,15 +736,22 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
|
730
736
|
}, [
|
|
731
737
|
ariaTextValue
|
|
732
738
|
]);
|
|
733
|
-
|
|
739
|
+
let onPointerCancel = useCallback(() => {
|
|
734
740
|
clearAsync();
|
|
741
|
+
}, [
|
|
742
|
+
clearAsync
|
|
743
|
+
]);
|
|
744
|
+
const onIncrementPressStart = $8ae05eaa5c114e9c$export$7f54fc3180508a52((initialStepDelay) => {
|
|
745
|
+
clearAsyncEvent();
|
|
746
|
+
isSpinning.current = true;
|
|
735
747
|
onIncrement === null || onIncrement === void 0 ? void 0 : onIncrement();
|
|
736
748
|
_async.current = window.setTimeout(() => {
|
|
737
749
|
if (maxValue === void 0 || isNaN(maxValue) || value === void 0 || isNaN(value) || value < maxValue) onIncrementPressStart(60);
|
|
738
750
|
}, initialStepDelay);
|
|
739
751
|
});
|
|
740
752
|
const onDecrementPressStart = $8ae05eaa5c114e9c$export$7f54fc3180508a52((initialStepDelay) => {
|
|
741
|
-
|
|
753
|
+
clearAsyncEvent();
|
|
754
|
+
isSpinning.current = true;
|
|
742
755
|
onDecrement === null || onDecrement === void 0 ? void 0 : onDecrement();
|
|
743
756
|
_async.current = window.setTimeout(() => {
|
|
744
757
|
if (minValue === void 0 || isNaN(minValue) || value === void 0 || isNaN(value) || value > minValue) onDecrementPressStart(60);
|
|
@@ -748,6 +761,21 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
|
748
761
|
e.preventDefault();
|
|
749
762
|
};
|
|
750
763
|
let { addGlobalListener, removeAllGlobalListeners } = $03deb23ff14920c4$export$4eaf04e54aa8eed6();
|
|
764
|
+
let isUp = useRef(false);
|
|
765
|
+
let [isIncrementPressed, setIsIncrementPressed] = useState(null);
|
|
766
|
+
useEffect(() => {
|
|
767
|
+
if (isIncrementPressed === "touch") onIncrementPressStart(60);
|
|
768
|
+
else if (isIncrementPressed) onIncrementPressStart(400);
|
|
769
|
+
}, [
|
|
770
|
+
isIncrementPressed
|
|
771
|
+
]);
|
|
772
|
+
let [isDecrementPressed, setIsDecrementPressed] = useState(null);
|
|
773
|
+
useEffect(() => {
|
|
774
|
+
if (isDecrementPressed === "touch") onDecrementPressStart(60);
|
|
775
|
+
else if (isDecrementPressed) onDecrementPressStart(400);
|
|
776
|
+
}, [
|
|
777
|
+
isDecrementPressed
|
|
778
|
+
]);
|
|
751
779
|
return {
|
|
752
780
|
spinButtonProps: {
|
|
753
781
|
role: "spinbutton",
|
|
@@ -763,25 +791,64 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
|
763
791
|
onBlur
|
|
764
792
|
},
|
|
765
793
|
incrementButtonProps: {
|
|
766
|
-
onPressStart: () => {
|
|
767
|
-
|
|
794
|
+
onPressStart: (e) => {
|
|
795
|
+
if (e.pointerType !== "touch") setIsIncrementPressed("mouse");
|
|
796
|
+
else {
|
|
797
|
+
if (_async.current) clearAsync();
|
|
798
|
+
addGlobalListener(window, "pointercancel", onPointerCancel, {
|
|
799
|
+
capture: true
|
|
800
|
+
});
|
|
801
|
+
isUp.current = false;
|
|
802
|
+
_async.current = window.setTimeout(() => {
|
|
803
|
+
setIsIncrementPressed("touch");
|
|
804
|
+
}, 600);
|
|
805
|
+
}
|
|
768
806
|
addGlobalListener(window, "contextmenu", cancelContextMenu);
|
|
769
807
|
},
|
|
770
|
-
|
|
808
|
+
onPressUp: (e) => {
|
|
809
|
+
if (e.pointerType === "touch") isUp.current = true;
|
|
771
810
|
clearAsync();
|
|
772
811
|
removeAllGlobalListeners();
|
|
812
|
+
setIsIncrementPressed(null);
|
|
813
|
+
},
|
|
814
|
+
onPressEnd: (e) => {
|
|
815
|
+
if (e.pointerType === "touch") {
|
|
816
|
+
if (!isSpinning.current && isUp.current) onIncrement === null || onIncrement === void 0 ? void 0 : onIncrement();
|
|
817
|
+
}
|
|
818
|
+
clearAsync();
|
|
819
|
+
isUp.current = false;
|
|
820
|
+
setIsIncrementPressed(null);
|
|
773
821
|
},
|
|
774
822
|
onFocus,
|
|
775
823
|
onBlur
|
|
776
824
|
},
|
|
777
825
|
decrementButtonProps: {
|
|
778
|
-
onPressStart: () => {
|
|
779
|
-
|
|
780
|
-
|
|
826
|
+
onPressStart: (e) => {
|
|
827
|
+
if (e.pointerType !== "touch") setIsDecrementPressed("mouse");
|
|
828
|
+
else {
|
|
829
|
+
if (_async.current) clearAsync();
|
|
830
|
+
addGlobalListener(window, "pointercancel", onPointerCancel, {
|
|
831
|
+
capture: true
|
|
832
|
+
});
|
|
833
|
+
isUp.current = false;
|
|
834
|
+
_async.current = window.setTimeout(() => {
|
|
835
|
+
setIsDecrementPressed("touch");
|
|
836
|
+
}, 600);
|
|
837
|
+
}
|
|
781
838
|
},
|
|
782
|
-
|
|
839
|
+
onPressUp: (e) => {
|
|
840
|
+
if (e.pointerType === "touch") isUp.current = true;
|
|
783
841
|
clearAsync();
|
|
784
842
|
removeAllGlobalListeners();
|
|
843
|
+
setIsDecrementPressed(null);
|
|
844
|
+
},
|
|
845
|
+
onPressEnd: (e) => {
|
|
846
|
+
if (e.pointerType === "touch") {
|
|
847
|
+
if (!isSpinning.current && isUp.current) onDecrement === null || onDecrement === void 0 ? void 0 : onDecrement();
|
|
848
|
+
}
|
|
849
|
+
clearAsync();
|
|
850
|
+
isUp.current = false;
|
|
851
|
+
setIsDecrementPressed(null);
|
|
785
852
|
},
|
|
786
853
|
onFocus,
|
|
787
854
|
onBlur
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-
|
|
1
|
+
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-DYYO3Ns3.js";
|
|
2
2
|
import { $ as $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5 } from "./NumberFormatter-DA8u1Ot7.js";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
function $a916eb452884faea$export$b7a616150fdb9f44(options = {}) {
|