@eightshift/ui-components 6.2.0 → 6.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/{Button-CFnNdpNZ.js → Button-DtRmB6b8.js} +7 -6
- package/dist/{Dialog-DDfABlp4.js → Dialog-DTIxSDhz.js} +91 -37
- package/dist/{FocusScope-BJhC1-1e.js → FocusScope-CjFQ7cbd.js} +16 -16
- package/dist/{Hidden-Rfj-STx7.js → Hidden-DOH36apC.js} +23 -6
- package/dist/{Input-B4X6-x6r.js → Input-BG9DaxYN.js} +6 -6
- package/dist/{Label-BDlf9vIY.js → Label-_aSf9-8u.js} +1 -1
- package/dist/{ListBox-ByPsaVVK.js → ListBox-DXFyyj_r.js} +8 -7
- package/dist/{OverlayArrow-Dy0qw7WL.js → OverlayArrow-Fuxj-1QM.js} +27 -9
- package/dist/{RadioGroup-CjCAbUr4.js → RadioGroup-DCeiLxLK.js} +9 -9
- package/dist/{SearchField-BME59dt-.js → SearchField-B_yKFXRk.js} +11 -11
- package/dist/{SelectionManager-iru59gc4.js → SelectionManager-B02LcxLr.js} +111 -65
- package/dist/{Slider-BIbaMdUE.js → Slider-bR3fAmim.js} +7 -7
- package/dist/{VisuallyHidden-CqnizvzQ.js → VisuallyHidden-DZnWrkn8.js} +1 -1
- package/dist/assets/style-admin.css +628 -327
- package/dist/assets/style-editor.css +628 -327
- package/dist/assets/style.css +628 -327
- 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 +7 -7
- package/dist/assets/wp-overrides/replace-fonts.css +5 -5
- package/dist/assets/wp-overrides/restyle-tooltips.css +3 -3
- package/dist/assets/wp-overrides/round-corners.css +1 -1
- package/dist/assets/wp-overrides/unify-button-sizes.css +1 -1
- package/dist/components/base-control/base-control.js +1 -1
- package/dist/components/base-control/container.js +1 -1
- package/dist/components/button/button.js +12 -9
- package/dist/components/checkbox/checkbox.js +10 -10
- package/dist/components/color-pickers/solid-color-picker.js +9 -9
- package/dist/components/expandable/expandable.js +5 -5
- package/dist/components/input-field/input-field.js +6 -9
- package/dist/components/link-input/link-input.js +191 -68
- package/dist/components/matrix-align/matrix-align.js +1 -1
- package/dist/components/menu/menu.js +5 -5
- package/dist/components/modal/modal.js +11 -8
- package/dist/components/notice/notice.js +3 -3
- package/dist/components/number-picker/number-picker.js +7 -7
- package/dist/components/options-panel/options-panel.js +6 -6
- package/dist/components/popover/popover.js +8 -7
- package/dist/components/radio/radio.js +2 -2
- package/dist/components/responsive/mini-responsive.js +81 -70
- package/dist/components/responsive/responsive.js +24 -40
- package/dist/components/responsive-preview/responsive-preview.js +1 -1
- package/dist/components/rich-label/rich-label.js +6 -4
- package/dist/components/select/async-multi-select.js +16 -12
- package/dist/components/select/async-select.js +16 -13
- package/dist/components/select/multi-select.js +17 -13
- package/dist/components/select/shared.js +3 -3
- package/dist/components/select/single-select.js +14 -12
- package/dist/components/slider/column-config-slider.js +3 -3
- package/dist/components/slider/slider.js +3 -3
- package/dist/components/tabs/tabs.js +39 -8
- package/dist/components/toggle/switch.js +5 -5
- package/dist/components/toggle/toggle.js +1 -1
- package/dist/components/toggle-button/toggle-button.js +6 -6
- package/dist/components/tooltip/tooltip.js +11 -9
- package/dist/{proxy-DFlYXk07.js → proxy-CNEXmkdK.js} +205 -137
- package/dist/{shared-HdRrpnhs.js → shared-CNH8QfV9.js} +15 -14
- package/dist/{textSelection-CeoEP4rL.js → textSelection-DA3VcKpG.js} +1 -1
- package/dist/{useButton-5YL_nmpZ.js → useButton-DyMX0EVr.js} +2 -2
- package/dist/{useEvent-Zze2g7CX.js → useEvent-Bfy68GHZ.js} +1 -1
- package/dist/{useFilter-NhAlifsK.js → useFilter-Bg5C34XC.js} +1 -1
- package/dist/{useFocusRing-rUOwLdTK.js → useFocusRing-B2glEZ25.js} +9 -7
- package/dist/{useFormReset-BxtOoO5Q.js → useFormReset-BoxsKyJ9.js} +1 -1
- package/dist/{useFormValidation-DTmPrTD8.js → useFormValidation-BrbMhS2N.js} +4 -3
- package/dist/{useHover-CmyvqeWX.js → useHover-DkmPQdGE.js} +76 -58
- package/dist/{useListState-HOvCQJFf.js → useListState-BjnzKozj.js} +3 -3
- package/dist/{useNumberField-CTkI-U9a.js → useNumberField-CsygZKz9.js} +45 -15
- package/dist/{usePress-CNefMs8d.js → usePress-Ck5xMtDr.js} +21 -21
- package/dist/{useToggle-CFFOmZWi.js → useToggle-Ddc7N8pR.js} +4 -4
- package/dist/{useToggleState-BWrKKisg.js → useToggleState-H_lORSWO.js} +1 -1
- package/package.json +22 -21
- package/dist/useSingleSelectListState-BtrMHGeE.js +0 -38
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { c as $319e236875307eab$export$a9b970dcc4ae71a9, a as $d2b4bc8c273e7be6$export$24d547caef80ccd1, $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../../Button-
|
|
3
|
-
import { o as $ff5963eb1fccf552$export$e08e3b67e392101e, b as $3ef42575df84b30b$export$9d1611c77c2fe928, $ as $64fa3d84918910a7$export$29f1550f4b0d4415, e as $64fa3d84918910a7$export$fabf2dc03a41866e, f as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, g as $64fa3d84918910a7$export$ef03459518577ad4, h as $64fa3d84918910a7$export$4d86445c2cf5e3, i as $64fa3d84918910a7$export$2881499e37b75b9a, a as $64fa3d84918910a7$export$df3a06d6289f983e } from "../../utils-Cr3pLd9c.js";
|
|
2
|
+
import { c as $319e236875307eab$export$a9b970dcc4ae71a9, a as $d2b4bc8c273e7be6$export$24d547caef80ccd1, $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../../Button-DtRmB6b8.js";
|
|
3
|
+
import { o as $ff5963eb1fccf552$export$e08e3b67e392101e, b as $3ef42575df84b30b$export$9d1611c77c2fe928, d as $bdb11010cef70236$export$f680877a34711e37, $ as $64fa3d84918910a7$export$29f1550f4b0d4415, e as $64fa3d84918910a7$export$fabf2dc03a41866e, f as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, g as $64fa3d84918910a7$export$ef03459518577ad4, h as $64fa3d84918910a7$export$4d86445c2cf5e3, i as $64fa3d84918910a7$export$2881499e37b75b9a, a as $64fa3d84918910a7$export$df3a06d6289f983e } from "../../utils-Cr3pLd9c.js";
|
|
4
4
|
import { $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "../../FieldError-BPG0hKfB.js";
|
|
5
5
|
import { $ as $d3e0e05bdfcf66bd$export$c24727297075ec6a } from "../../Form-Cq3fu75_.js";
|
|
6
|
-
import { d as $2d73ec29415bd339$export$712718f7aec83d5, b as $3985021b0ad6602f$export$37fb8590cf2c088c, a as $a049562f99e7db0e$export$f9c6924e160136d1, c as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4, $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-
|
|
7
|
-
import { a as $01b77f81d0f07f68$export$75b6ee27786ba447, $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-
|
|
8
|
-
import { b as $b1f0cad8af73213b$export$3585ede4d035bf14, c as $b1f0cad8af73213b$export$9145995848b05025, d as $eed445e0843c11d0$export$7ff8f37d2d81a48d, e as $eed445e0843c11d0$export$7c5906fe4f1f2af2, $ as $eed445e0843c11d0$export$41f133550aa26f48, f as $eed445e0843c11d0$export$a11e76429ed99b4 } from "../../ListBox-
|
|
9
|
-
import { x as $168583247155ddda$export$dc9c12ed27dd1b49, u as $2a25aae57d74318e$export$a05409b8bb224a5a, t as $453cc9f0df89c0a5$export$77d5aafae4e095b2, n as $5e3802645cc19319$export$1c3ebcada18427bf, o as $de32f1b87079253c$export$d2f961adcb0afbe,
|
|
6
|
+
import { d as $2d73ec29415bd339$export$712718f7aec83d5, b as $3985021b0ad6602f$export$37fb8590cf2c088c, a as $a049562f99e7db0e$export$f9c6924e160136d1, c as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4, $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-BG9DaxYN.js";
|
|
7
|
+
import { a as $01b77f81d0f07f68$export$75b6ee27786ba447, $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-_aSf9-8u.js";
|
|
8
|
+
import { b as $b1f0cad8af73213b$export$3585ede4d035bf14, c as $b1f0cad8af73213b$export$9145995848b05025, d as $eed445e0843c11d0$export$7ff8f37d2d81a48d, e as $eed445e0843c11d0$export$7c5906fe4f1f2af2, $ as $eed445e0843c11d0$export$41f133550aa26f48, f as $eed445e0843c11d0$export$a11e76429ed99b4 } from "../../ListBox-DXFyyj_r.js";
|
|
9
|
+
import { x as $168583247155ddda$export$dc9c12ed27dd1b49, u as $2a25aae57d74318e$export$a05409b8bb224a5a, t as $453cc9f0df89c0a5$export$77d5aafae4e095b2, n as $5e3802645cc19319$export$1c3ebcada18427bf, y as $e0b6e0b68ec7f50f$export$872b660ac5a1ff98, o as $de32f1b87079253c$export$d2f961adcb0afbe, z as $07b14b47974efb58$export$9b9a0cd73afb7ca4, f as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../Dialog-DTIxSDhz.js";
|
|
10
10
|
import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "../../Text-CjFEHSfr.js";
|
|
11
|
-
import { o as $ae20dd8cbca75726$export$d6daf82dcd84e87c, s as $c5a24bc478652b5f$export$1005530eda016c13, t as $55f9b1ae81f22853$export$2b35b76d2e30e129, g as $e1995378a142960e$export$bf788dd355e3a401 } from "../../SelectionManager-
|
|
11
|
+
import { o as $ae20dd8cbca75726$export$d6daf82dcd84e87c, s as $c5a24bc478652b5f$export$1005530eda016c13, t as $55f9b1ae81f22853$export$2b35b76d2e30e129, g as $e1995378a142960e$export$bf788dd355e3a401 } from "../../SelectionManager-B02LcxLr.js";
|
|
12
12
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-eGTqWSTd.js";
|
|
13
|
-
import { $ as $fc909762b330b746$export$61c6a8c84e605fb6, d as $9daab02d461809db$export$683480f191c0e3ea } from "../../OverlayArrow-
|
|
13
|
+
import { $ as $fc909762b330b746$export$61c6a8c84e605fb6, d as $9daab02d461809db$export$683480f191c0e3ea } from "../../OverlayArrow-Fuxj-1QM.js";
|
|
14
14
|
import $dbSRa$react__default, { useRef, useEffect, useMemo, useState, useCallback, forwardRef, createContext } from "react";
|
|
15
|
-
import { $ as $bb77f239b46e8c72$export$3274cf84b703fff } from "../../useFilter-
|
|
16
|
-
import { b as $e5be200c675c3b3a$export$a763b9476acd3eb, $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10 } from "../../useFormValidation-
|
|
17
|
-
import { $ as $
|
|
18
|
-
import { c as $
|
|
19
|
-
import { b as $8ae05eaa5c114e9c$export$7f54fc3180508a52, L as $ea8dcbcb9ea1b556$export$9a302a45f65d0572, K as $c87311424ea30a05$export$e1865c3bedcd822b, i as $d4ee10de306f2510$export$cd4e5573fbe2b576, d as $431fbd86ca7dc216$export$b204af158042fbac, g as $d4ee10de306f2510$export$4282f70798064fe0, a as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "../../useHover-CmyvqeWX.js";
|
|
15
|
+
import { $ as $bb77f239b46e8c72$export$3274cf84b703fff } from "../../useFilter-Bg5C34XC.js";
|
|
16
|
+
import { b as $e5be200c675c3b3a$export$a763b9476acd3eb, $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10 } from "../../useFormValidation-BrbMhS2N.js";
|
|
17
|
+
import { a as $e72dd72e1c76a225$export$2f645645f7bca764, c as $a02d57049d202695$export$d085fb9e920b5ca7 } from "../../useListState-BjnzKozj.js";
|
|
18
|
+
import { c as $8ae05eaa5c114e9c$export$7f54fc3180508a52, M as $ea8dcbcb9ea1b556$export$9a302a45f65d0572, L as $c87311424ea30a05$export$e1865c3bedcd822b, j as $d4ee10de306f2510$export$cd4e5573fbe2b576, e as $431fbd86ca7dc216$export$b204af158042fbac, b as $d4ee10de306f2510$export$e58f029f0fbfdb29, h as $d4ee10de306f2510$export$4282f70798064fe0, a as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "../../useHover-DkmPQdGE.js";
|
|
20
19
|
import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "../../useLabels-D8O3gOdV.js";
|
|
21
|
-
import { $ as $e9faafb641e167db$export$90fc3a17d93f704c } from "../../useEvent-
|
|
22
|
-
import { $ as $99facab73266f662$export$5add1d006293d136 } from "../../useFormReset-
|
|
20
|
+
import { $ as $e9faafb641e167db$export$90fc3a17d93f704c } from "../../useEvent-Bfy68GHZ.js";
|
|
21
|
+
import { $ as $99facab73266f662$export$5add1d006293d136 } from "../../useFormReset-BoxsKyJ9.js";
|
|
23
22
|
import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "../../useLocalizedStringFormatter-CEDs0LsA.js";
|
|
24
23
|
import { _ as __ } from "../../default-i18n-CnQeC5Pl.js";
|
|
25
24
|
import { icons } from "../../icons/icons.js";
|
|
@@ -828,7 +827,7 @@ function $c350ade66beef0af$export$8c18d1b4f7232bbf(props, state) {
|
|
|
828
827
|
state.commit();
|
|
829
828
|
break;
|
|
830
829
|
case "Escape":
|
|
831
|
-
if (state.
|
|
830
|
+
if (!state.selectionManager.isEmpty || state.inputValue === "" || props.allowsCustomValue) e.continuePropagation();
|
|
832
831
|
state.revert();
|
|
833
832
|
break;
|
|
834
833
|
case "ArrowDown":
|
|
@@ -855,6 +854,10 @@ function $c350ade66beef0af$export$8c18d1b4f7232bbf(props, state) {
|
|
|
855
854
|
if (props.onFocus) props.onFocus(e);
|
|
856
855
|
state.setFocused(true);
|
|
857
856
|
};
|
|
857
|
+
let valueId = $c350ade66beef0af$var$useValueId([
|
|
858
|
+
state.selectedItems,
|
|
859
|
+
state.selectionManager.selectionMode
|
|
860
|
+
]);
|
|
858
861
|
let { isInvalid, validationErrors, validationDetails } = state.displayValidation;
|
|
859
862
|
let { labelProps, inputProps, descriptionProps, errorMessageProps } = $2d73ec29415bd339$export$712718f7aec83d5({
|
|
860
863
|
...props,
|
|
@@ -866,9 +869,13 @@ function $c350ade66beef0af$export$8c18d1b4f7232bbf(props, state) {
|
|
|
866
869
|
onFocus,
|
|
867
870
|
autoComplete: "off",
|
|
868
871
|
validate: void 0,
|
|
869
|
-
[$e5be200c675c3b3a$export$a763b9476acd3eb]: state
|
|
872
|
+
[$e5be200c675c3b3a$export$a763b9476acd3eb]: state,
|
|
873
|
+
"aria-describedby": [
|
|
874
|
+
valueId,
|
|
875
|
+
props["aria-describedby"]
|
|
876
|
+
].filter(Boolean).join(" ") || void 0
|
|
870
877
|
}, inputRef);
|
|
871
|
-
$99facab73266f662$export$5add1d006293d136(inputRef, state.
|
|
878
|
+
$99facab73266f662$export$5add1d006293d136(inputRef, state.defaultValue, state.setValue);
|
|
872
879
|
let onPress = (e) => {
|
|
873
880
|
if (e.pointerType === "touch") {
|
|
874
881
|
var _inputRef_current;
|
|
@@ -902,7 +909,7 @@ function $c350ade66beef0af$export$8c18d1b4f7232bbf(props, state) {
|
|
|
902
909
|
(_inputRef_current = inputRef.current) === null || _inputRef_current === void 0 ? void 0 : _inputRef_current.focus();
|
|
903
910
|
return;
|
|
904
911
|
}
|
|
905
|
-
let rect = e.
|
|
912
|
+
let rect = $d4ee10de306f2510$export$e58f029f0fbfdb29(e).getBoundingClientRect();
|
|
906
913
|
let touch = e.changedTouches[0];
|
|
907
914
|
let centerX = Math.ceil(rect.left + 0.5 * rect.width);
|
|
908
915
|
let centerY = Math.ceil(rect.top + 0.5 * rect.height);
|
|
@@ -984,6 +991,15 @@ function $c350ade66beef0af$export$8c18d1b4f7232bbf(props, state) {
|
|
|
984
991
|
$e9faafb641e167db$export$90fc3a17d93f704c(listBoxRef, "react-aria-item-action", state.isOpen ? () => {
|
|
985
992
|
state.close();
|
|
986
993
|
} : void 0);
|
|
994
|
+
$e0b6e0b68ec7f50f$export$872b660ac5a1ff98({
|
|
995
|
+
ref: popoverRef,
|
|
996
|
+
onInteractOutside: (e) => {
|
|
997
|
+
let target = $d4ee10de306f2510$export$e58f029f0fbfdb29(e);
|
|
998
|
+
if ($d4ee10de306f2510$export$4282f70798064fe0(buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.current, target) || $d4ee10de306f2510$export$4282f70798064fe0(inputRef.current, target)) return;
|
|
999
|
+
state.close();
|
|
1000
|
+
},
|
|
1001
|
+
isDisabled: !state.isOpen
|
|
1002
|
+
});
|
|
987
1003
|
return {
|
|
988
1004
|
labelProps,
|
|
989
1005
|
buttonProps: {
|
|
@@ -1016,6 +1032,9 @@ function $c350ade66beef0af$export$8c18d1b4f7232bbf(props, state) {
|
|
|
1016
1032
|
linkBehavior: "selection",
|
|
1017
1033
|
["UNSTABLE_itemBehavior"]: "action"
|
|
1018
1034
|
}),
|
|
1035
|
+
valueProps: {
|
|
1036
|
+
id: valueId
|
|
1037
|
+
},
|
|
1019
1038
|
descriptionProps,
|
|
1020
1039
|
errorMessageProps,
|
|
1021
1040
|
isInvalid,
|
|
@@ -1023,28 +1042,102 @@ function $c350ade66beef0af$export$8c18d1b4f7232bbf(props, state) {
|
|
|
1023
1042
|
validationDetails
|
|
1024
1043
|
};
|
|
1025
1044
|
}
|
|
1045
|
+
function $c350ade66beef0af$var$useValueId(depArray = []) {
|
|
1046
|
+
let id = $bdb11010cef70236$export$f680877a34711e37();
|
|
1047
|
+
let [exists, setExists] = useState(true);
|
|
1048
|
+
let [lastDeps, setLastDeps] = useState(depArray);
|
|
1049
|
+
if (lastDeps.some((v, i) => !Object.is(v, depArray[i]))) {
|
|
1050
|
+
setExists(true);
|
|
1051
|
+
setLastDeps(depArray);
|
|
1052
|
+
}
|
|
1053
|
+
useEffect(() => {
|
|
1054
|
+
if (exists && !document.getElementById(id))
|
|
1055
|
+
setExists(false);
|
|
1056
|
+
}, [
|
|
1057
|
+
id,
|
|
1058
|
+
exists,
|
|
1059
|
+
lastDeps
|
|
1060
|
+
]);
|
|
1061
|
+
return exists ? id : void 0;
|
|
1062
|
+
}
|
|
1063
|
+
const $a9e7382a7d111cb5$var$EMPTY_VALUE = [];
|
|
1026
1064
|
function $a9e7382a7d111cb5$export$b453a3bfd4a5fa9e(props) {
|
|
1027
1065
|
var _collection_getItem;
|
|
1028
|
-
let { defaultFilter, menuTrigger = "input", allowsEmptyCollection = false, allowsCustomValue, shouldCloseOnBlur = true } = props;
|
|
1066
|
+
let { defaultFilter, menuTrigger = "input", allowsEmptyCollection = false, allowsCustomValue, shouldCloseOnBlur = true, selectionMode = "single" } = props;
|
|
1029
1067
|
let [showAllItems, setShowAllItems] = useState(false);
|
|
1030
1068
|
let [isFocused, setFocusedState] = useState(false);
|
|
1031
1069
|
let [focusStrategy, setFocusStrategy] = useState(null);
|
|
1032
|
-
let
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1070
|
+
let defaultValue = useMemo(() => {
|
|
1071
|
+
var _props_defaultSelectedKey2;
|
|
1072
|
+
return props.defaultValue !== void 0 ? props.defaultValue : selectionMode === "single" ? (_props_defaultSelectedKey2 = props.defaultSelectedKey) !== null && _props_defaultSelectedKey2 !== void 0 ? _props_defaultSelectedKey2 : null : [];
|
|
1073
|
+
}, [
|
|
1074
|
+
props.defaultValue,
|
|
1075
|
+
props.defaultSelectedKey,
|
|
1076
|
+
selectionMode
|
|
1077
|
+
]);
|
|
1078
|
+
let value = useMemo(() => {
|
|
1079
|
+
return props.value !== void 0 ? props.value : selectionMode === "single" ? props.selectedKey : void 0;
|
|
1080
|
+
}, [
|
|
1081
|
+
props.value,
|
|
1082
|
+
props.selectedKey,
|
|
1083
|
+
selectionMode
|
|
1084
|
+
]);
|
|
1085
|
+
let [controlledValue, setControlledValue] = $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, props.onChange);
|
|
1086
|
+
let displayValue = selectionMode === "single" && Array.isArray(controlledValue) ? controlledValue[0] : controlledValue;
|
|
1087
|
+
let setValue = (value2) => {
|
|
1088
|
+
if (selectionMode === "single") {
|
|
1089
|
+
var _props_onSelectionChange;
|
|
1090
|
+
var _value_;
|
|
1091
|
+
let key = Array.isArray(value2) ? (_value_ = value2[0]) !== null && _value_ !== void 0 ? _value_ : null : value2;
|
|
1092
|
+
setControlledValue(key);
|
|
1093
|
+
if (key !== displayValue) (_props_onSelectionChange = props.onSelectionChange) === null || _props_onSelectionChange === void 0 ? void 0 : _props_onSelectionChange.call(props, key);
|
|
1094
|
+
} else {
|
|
1095
|
+
let keys = [];
|
|
1096
|
+
if (Array.isArray(value2)) keys = value2;
|
|
1097
|
+
else if (value2 != null) keys = [
|
|
1098
|
+
value2
|
|
1099
|
+
];
|
|
1100
|
+
setControlledValue(keys);
|
|
1037
1101
|
}
|
|
1038
1102
|
};
|
|
1039
1103
|
var _props_items;
|
|
1040
|
-
let { collection, selectionManager,
|
|
1104
|
+
let { collection, selectionManager, disabledKeys } = $e72dd72e1c76a225$export$2f645645f7bca764({
|
|
1041
1105
|
...props,
|
|
1042
|
-
|
|
1043
|
-
|
|
1106
|
+
items: (_props_items = props.items) !== null && _props_items !== void 0 ? _props_items : props.defaultItems,
|
|
1107
|
+
selectionMode,
|
|
1108
|
+
disallowEmptySelection: selectionMode === "single",
|
|
1109
|
+
allowDuplicateSelectionEvents: true,
|
|
1110
|
+
selectedKeys: useMemo(() => $a9e7382a7d111cb5$var$convertValue(displayValue), [
|
|
1111
|
+
displayValue
|
|
1112
|
+
]),
|
|
1113
|
+
onSelectionChange: (keys) => {
|
|
1114
|
+
if (keys === "all") return;
|
|
1115
|
+
if (selectionMode === "single") {
|
|
1116
|
+
var _keys_values_next_value;
|
|
1117
|
+
let key = (_keys_values_next_value = keys.values().next().value) !== null && _keys_values_next_value !== void 0 ? _keys_values_next_value : null;
|
|
1118
|
+
if (key === displayValue) {
|
|
1119
|
+
var _props_onSelectionChange;
|
|
1120
|
+
(_props_onSelectionChange = props.onSelectionChange) === null || _props_onSelectionChange === void 0 ? void 0 : _props_onSelectionChange.call(props, key);
|
|
1121
|
+
resetInputValue();
|
|
1122
|
+
closeMenu();
|
|
1123
|
+
} else setValue(key);
|
|
1124
|
+
} else setValue([
|
|
1125
|
+
...keys
|
|
1126
|
+
]);
|
|
1127
|
+
}
|
|
1044
1128
|
});
|
|
1129
|
+
let selectedKey = selectionMode === "single" ? selectionManager.firstSelectedKey : null;
|
|
1130
|
+
let selectedItems = useMemo(() => {
|
|
1131
|
+
return [
|
|
1132
|
+
...selectionManager.selectedKeys
|
|
1133
|
+
].map((key) => collection.getItem(key)).filter((item) => item != null);
|
|
1134
|
+
}, [
|
|
1135
|
+
selectionManager.selectedKeys,
|
|
1136
|
+
collection
|
|
1137
|
+
]);
|
|
1045
1138
|
let [inputValue, setInputValue] = $458b0a5536c1a7cf$export$40bfa8c7b0832715(props.inputValue, $a9e7382a7d111cb5$var$getDefaultInputValue(props.defaultInputValue, selectedKey, collection) || "", props.onInputChange);
|
|
1046
|
-
let [
|
|
1047
|
-
let [
|
|
1139
|
+
let [initialValue] = useState(displayValue);
|
|
1140
|
+
let [initialInputValue] = useState(inputValue);
|
|
1048
1141
|
let originalCollection = collection;
|
|
1049
1142
|
let filteredCollection = useMemo(() => (
|
|
1050
1143
|
// No default filter if items are controlled.
|
|
@@ -1118,41 +1211,42 @@ function $a9e7382a7d111cb5$export$b453a3bfd4a5fa9e(props) {
|
|
|
1118
1211
|
setLastValue(itemText);
|
|
1119
1212
|
setInputValue(itemText);
|
|
1120
1213
|
};
|
|
1121
|
-
|
|
1122
|
-
let lastSelectedKey = useRef((_ref = (_props_selectedKey = props.selectedKey) !== null && _props_selectedKey !== void 0 ? _props_selectedKey : props.defaultSelectedKey) !== null && _ref !== void 0 ? _ref : null);
|
|
1214
|
+
let lastValueRef = useRef(displayValue);
|
|
1123
1215
|
var _collection_getItem_textValue;
|
|
1124
1216
|
let lastSelectedKeyText = useRef(selectedKey != null ? (_collection_getItem_textValue = (_collection_getItem = collection.getItem(selectedKey)) === null || _collection_getItem === void 0 ? void 0 : _collection_getItem.textValue) !== null && _collection_getItem_textValue !== void 0 ? _collection_getItem_textValue : "" : "");
|
|
1125
1217
|
useEffect(() => {
|
|
1126
1218
|
var _collection_getItem2;
|
|
1127
1219
|
if (isFocused && (filteredCollection.size > 0 || allowsEmptyCollection) && !triggerState.isOpen && inputValue !== lastValue && menuTrigger !== "manual") open(null, "input");
|
|
1128
1220
|
if (!showAllItems && !allowsEmptyCollection && triggerState.isOpen && filteredCollection.size === 0) closeMenu();
|
|
1129
|
-
if (
|
|
1221
|
+
if (displayValue != null && displayValue !== lastValueRef.current && selectionMode === "single") closeMenu();
|
|
1130
1222
|
if (inputValue !== lastValue) {
|
|
1131
1223
|
selectionManager.setFocusedKey(null);
|
|
1132
1224
|
setShowAllItems(false);
|
|
1133
|
-
if (inputValue === "" && (props.inputValue === void 0 ||
|
|
1225
|
+
if (selectionMode === "single" && inputValue === "" && (props.inputValue === void 0 || value === void 0)) setValue(null);
|
|
1134
1226
|
}
|
|
1135
|
-
if (
|
|
1227
|
+
if (displayValue !== lastValueRef.current && (props.inputValue === void 0 || value === void 0)) resetInputValue();
|
|
1136
1228
|
else if (lastValue !== inputValue) setLastValue(inputValue);
|
|
1137
1229
|
var _collection_getItem_textValue2;
|
|
1138
1230
|
let selectedItemText = selectedKey != null ? (_collection_getItem_textValue2 = (_collection_getItem2 = collection.getItem(selectedKey)) === null || _collection_getItem2 === void 0 ? void 0 : _collection_getItem2.textValue) !== null && _collection_getItem_textValue2 !== void 0 ? _collection_getItem_textValue2 : "" : "";
|
|
1139
|
-
if (!isFocused && selectedKey != null && props.inputValue === void 0 && selectedKey ===
|
|
1231
|
+
if (!isFocused && selectedKey != null && props.inputValue === void 0 && selectedKey === lastValueRef.current) {
|
|
1140
1232
|
if (lastSelectedKeyText.current !== selectedItemText) {
|
|
1141
1233
|
setLastValue(selectedItemText);
|
|
1142
1234
|
setInputValue(selectedItemText);
|
|
1143
1235
|
}
|
|
1144
1236
|
}
|
|
1145
|
-
|
|
1237
|
+
lastValueRef.current = displayValue;
|
|
1146
1238
|
lastSelectedKeyText.current = selectedItemText;
|
|
1147
1239
|
});
|
|
1148
1240
|
let validation = $e5be200c675c3b3a$export$fc1a364ae1f3ff10({
|
|
1149
1241
|
...props,
|
|
1150
|
-
value: useMemo(() => ({
|
|
1242
|
+
value: useMemo(() => Array.isArray(displayValue) && displayValue.length === 0 ? null : {
|
|
1151
1243
|
inputValue,
|
|
1244
|
+
value: displayValue,
|
|
1152
1245
|
selectedKey
|
|
1153
|
-
}
|
|
1246
|
+
}, [
|
|
1154
1247
|
inputValue,
|
|
1155
|
-
selectedKey
|
|
1248
|
+
selectedKey,
|
|
1249
|
+
displayValue
|
|
1156
1250
|
])
|
|
1157
1251
|
});
|
|
1158
1252
|
let revert = () => {
|
|
@@ -1160,14 +1254,16 @@ function $a9e7382a7d111cb5$export$b453a3bfd4a5fa9e(props) {
|
|
|
1160
1254
|
else commitSelection();
|
|
1161
1255
|
};
|
|
1162
1256
|
let commitCustomValue = () => {
|
|
1163
|
-
|
|
1164
|
-
|
|
1257
|
+
let value2 = selectionMode === "multiple" ? $a9e7382a7d111cb5$var$EMPTY_VALUE : null;
|
|
1258
|
+
lastValueRef.current = value2;
|
|
1259
|
+
setValue(value2);
|
|
1165
1260
|
closeMenu();
|
|
1166
1261
|
};
|
|
1167
1262
|
let commitSelection = () => {
|
|
1168
|
-
if (
|
|
1169
|
-
var _props_onSelectionChange, _collection_getItem2;
|
|
1263
|
+
if (value !== void 0 && props.inputValue !== void 0) {
|
|
1264
|
+
var _props_onSelectionChange, _props_onChange, _collection_getItem2;
|
|
1170
1265
|
(_props_onSelectionChange = props.onSelectionChange) === null || _props_onSelectionChange === void 0 ? void 0 : _props_onSelectionChange.call(props, selectedKey);
|
|
1266
|
+
(_props_onChange = props.onChange) === null || _props_onChange === void 0 ? void 0 : _props_onChange.call(props, displayValue);
|
|
1171
1267
|
var _collection_getItem_textValue2;
|
|
1172
1268
|
let itemText = selectedKey != null ? (_collection_getItem_textValue2 = (_collection_getItem2 = collection.getItem(selectedKey)) === null || _collection_getItem2 === void 0 ? void 0 : _collection_getItem2.textValue) !== null && _collection_getItem_textValue2 !== void 0 ? _collection_getItem_textValue2 : "" : "";
|
|
1173
1269
|
setLastValue(itemText);
|
|
@@ -1188,8 +1284,8 @@ function $a9e7382a7d111cb5$export$b453a3bfd4a5fa9e(props) {
|
|
|
1188
1284
|
};
|
|
1189
1285
|
let commit = () => {
|
|
1190
1286
|
if (triggerState.isOpen && selectionManager.focusedKey != null) {
|
|
1191
|
-
if (
|
|
1192
|
-
else
|
|
1287
|
+
if (selectionManager.isSelected(selectionManager.focusedKey) && selectionMode === "single") commitSelection();
|
|
1288
|
+
else selectionManager.select(selectionManager.focusedKey);
|
|
1193
1289
|
} else commitValue();
|
|
1194
1290
|
};
|
|
1195
1291
|
let valueOnFocus = useRef(inputValue);
|
|
@@ -1216,8 +1312,8 @@ function $a9e7382a7d111cb5$export$b453a3bfd4a5fa9e(props) {
|
|
|
1216
1312
|
lastCollection
|
|
1217
1313
|
]);
|
|
1218
1314
|
var _props_defaultSelectedKey;
|
|
1219
|
-
let defaultSelectedKey = (_props_defaultSelectedKey = props.defaultSelectedKey) !== null && _props_defaultSelectedKey !== void 0 ? _props_defaultSelectedKey :
|
|
1220
|
-
var _getDefaultInputValue;
|
|
1315
|
+
let defaultSelectedKey = (_props_defaultSelectedKey = props.defaultSelectedKey) !== null && _props_defaultSelectedKey !== void 0 ? _props_defaultSelectedKey : selectionMode === "single" ? initialValue : null;
|
|
1316
|
+
var _selectedItems_, _getDefaultInputValue;
|
|
1221
1317
|
return {
|
|
1222
1318
|
...validation,
|
|
1223
1319
|
...triggerState,
|
|
@@ -1226,16 +1322,20 @@ function $a9e7382a7d111cb5$export$b453a3bfd4a5fa9e(props) {
|
|
|
1226
1322
|
open,
|
|
1227
1323
|
close: commitValue,
|
|
1228
1324
|
selectionManager,
|
|
1325
|
+
value: displayValue,
|
|
1326
|
+
defaultValue: defaultValue !== null && defaultValue !== void 0 ? defaultValue : initialValue,
|
|
1327
|
+
setValue,
|
|
1229
1328
|
selectedKey,
|
|
1329
|
+
selectedItems,
|
|
1230
1330
|
defaultSelectedKey,
|
|
1231
|
-
setSelectedKey,
|
|
1331
|
+
setSelectedKey: setValue,
|
|
1232
1332
|
disabledKeys,
|
|
1233
1333
|
isFocused,
|
|
1234
1334
|
setFocused,
|
|
1235
|
-
selectedItem,
|
|
1335
|
+
selectedItem: (_selectedItems_ = selectedItems[0]) !== null && _selectedItems_ !== void 0 ? _selectedItems_ : null,
|
|
1236
1336
|
collection: displayedCollection,
|
|
1237
1337
|
inputValue,
|
|
1238
|
-
defaultInputValue: (_getDefaultInputValue = $a9e7382a7d111cb5$var$getDefaultInputValue(props.defaultInputValue, defaultSelectedKey, collection)) !== null && _getDefaultInputValue !== void 0 ? _getDefaultInputValue :
|
|
1338
|
+
defaultInputValue: (_getDefaultInputValue = $a9e7382a7d111cb5$var$getDefaultInputValue(props.defaultInputValue, defaultSelectedKey, collection)) !== null && _getDefaultInputValue !== void 0 ? _getDefaultInputValue : initialInputValue,
|
|
1239
1339
|
setInputValue,
|
|
1240
1340
|
commit,
|
|
1241
1341
|
revert
|
|
@@ -1272,6 +1372,13 @@ function $a9e7382a7d111cb5$var$getDefaultInputValue(defaultInputValue, selectedK
|
|
|
1272
1372
|
}
|
|
1273
1373
|
return defaultInputValue;
|
|
1274
1374
|
}
|
|
1375
|
+
function $a9e7382a7d111cb5$var$convertValue(value) {
|
|
1376
|
+
if (value === void 0) return void 0;
|
|
1377
|
+
if (value === null) return [];
|
|
1378
|
+
return Array.isArray(value) ? value : [
|
|
1379
|
+
value
|
|
1380
|
+
];
|
|
1381
|
+
}
|
|
1275
1382
|
const $d01f2c01039c0eec$export$d414ccceff7063c3 = /* @__PURE__ */ createContext(null);
|
|
1276
1383
|
const $d01f2c01039c0eec$export$c02625b26074192c = /* @__PURE__ */ createContext(null);
|
|
1277
1384
|
const $d01f2c01039c0eec$export$72b9695b8216309a = /* @__PURE__ */ forwardRef(function ComboBox(props, ref) {
|
|
@@ -1336,7 +1443,7 @@ function $d01f2c01039c0eec$var$ComboBoxInner({ props, collection, comboBoxRef: r
|
|
|
1336
1443
|
let listBoxRef = useRef(null);
|
|
1337
1444
|
let popoverRef = useRef(null);
|
|
1338
1445
|
let [labelRef, label] = $64fa3d84918910a7$export$9d4c57ee4c6ffdd8(!props["aria-label"] && !props["aria-labelledby"]);
|
|
1339
|
-
let { buttonProps, inputProps, listBoxProps, labelProps, descriptionProps, errorMessageProps, ...validation } = $c350ade66beef0af$export$8c18d1b4f7232bbf({
|
|
1446
|
+
let { buttonProps, inputProps, listBoxProps, labelProps, descriptionProps, errorMessageProps, valueProps, ...validation } = $c350ade66beef0af$export$8c18d1b4f7232bbf({
|
|
1340
1447
|
...$64fa3d84918910a7$export$ef03459518577ad4(props),
|
|
1341
1448
|
label,
|
|
1342
1449
|
inputRef,
|
|
@@ -1385,7 +1492,22 @@ function $d01f2c01039c0eec$var$ComboBoxInner({ props, collection, comboBoxRef: r
|
|
|
1385
1492
|
global: true
|
|
1386
1493
|
});
|
|
1387
1494
|
delete DOMProps.id;
|
|
1388
|
-
|
|
1495
|
+
let inputs = [];
|
|
1496
|
+
if (name && formValue === "key") {
|
|
1497
|
+
let values = Array.isArray(state.value) ? state.value : [
|
|
1498
|
+
state.value
|
|
1499
|
+
];
|
|
1500
|
+
if (values.length === 0) values = [
|
|
1501
|
+
null
|
|
1502
|
+
];
|
|
1503
|
+
inputs = values.map((value, i) => /* @__PURE__ */ $dbSRa$react__default.createElement("input", {
|
|
1504
|
+
key: i,
|
|
1505
|
+
type: "hidden",
|
|
1506
|
+
name,
|
|
1507
|
+
form: props.form,
|
|
1508
|
+
value: value !== null && value !== void 0 ? value : ""
|
|
1509
|
+
}));
|
|
1510
|
+
}
|
|
1389
1511
|
return /* @__PURE__ */ $dbSRa$react__default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
|
|
1390
1512
|
values: [
|
|
1391
1513
|
[
|
|
@@ -1463,6 +1585,10 @@ function $d01f2c01039c0eec$var$ComboBoxInner({ props, collection, comboBoxRef: r
|
|
|
1463
1585
|
[
|
|
1464
1586
|
$ee014567cb39d3f0$export$ff05c3ac10437e03,
|
|
1465
1587
|
validation
|
|
1588
|
+
],
|
|
1589
|
+
[
|
|
1590
|
+
$d01f2c01039c0eec$export$5c804022b41722df,
|
|
1591
|
+
valueProps
|
|
1466
1592
|
]
|
|
1467
1593
|
]
|
|
1468
1594
|
}, /* @__PURE__ */ $dbSRa$react__default.createElement($64fa3d84918910a7$export$df3a06d6289f983e.div, {
|
|
@@ -1475,13 +1601,9 @@ function $d01f2c01039c0eec$var$ComboBoxInner({ props, collection, comboBoxRef: r
|
|
|
1475
1601
|
"data-disabled": props.isDisabled || void 0,
|
|
1476
1602
|
"data-invalid": validation.isInvalid || void 0,
|
|
1477
1603
|
"data-required": props.isRequired || void 0
|
|
1478
|
-
}
|
|
1479
|
-
type: "hidden",
|
|
1480
|
-
name,
|
|
1481
|
-
form: props.form,
|
|
1482
|
-
value: (_state_selectedKey = state.selectedKey) !== null && _state_selectedKey !== void 0 ? _state_selectedKey : ""
|
|
1483
|
-
}));
|
|
1604
|
+
}, renderProps.children, inputs));
|
|
1484
1605
|
}
|
|
1606
|
+
const $d01f2c01039c0eec$export$5c804022b41722df = /* @__PURE__ */ createContext(null);
|
|
1485
1607
|
/**
|
|
1486
1608
|
* Component that allows URL selection, with a suggestionList of suggestions and type-to-search.
|
|
1487
1609
|
*
|
|
@@ -1575,7 +1697,7 @@ const LinkInput = (props) => {
|
|
|
1575
1697
|
"es:focus-visible:text-accent-950 es:focus-visible:inset-ring-accent-500",
|
|
1576
1698
|
"es:placeholder-shown:pr-0 es:pr-10",
|
|
1577
1699
|
"es:focus:placeholder:text-surface-400",
|
|
1578
|
-
'es:font-variation-["wdth"_80,"
|
|
1700
|
+
'es:font-variation-["wdth"_80,"wght"_325,"slnt"_0,"ROND"_100] es:placeholder-shown:font-variation-["wdth"_60,"wght"_300,"slnt"_-10,"ROND"_0]',
|
|
1579
1701
|
inline && "es:min-w-48",
|
|
1580
1702
|
className
|
|
1581
1703
|
],
|
|
@@ -1700,6 +1822,7 @@ const LinkInput = (props) => {
|
|
|
1700
1822
|
{
|
|
1701
1823
|
"aria-label": __("URL suggestions", "eightshift-ui-components"),
|
|
1702
1824
|
className: ({ isEntering, isExiting }) => clsx(
|
|
1825
|
+
"es:font-sans",
|
|
1703
1826
|
"es:w-(--trigger-width)",
|
|
1704
1827
|
"es:rounded-xl es:outline-hidden es:min-w-72",
|
|
1705
1828
|
"es:has-first-selected:rounded-t-18!",
|
|
@@ -1784,7 +1907,7 @@ const LinkInput = (props) => {
|
|
|
1784
1907
|
label: title,
|
|
1785
1908
|
subtitle: url2?.replace(location.origin, "").replace(/\/$/, ""),
|
|
1786
1909
|
className: "es:select-none",
|
|
1787
|
-
subtitleClassName: 'es:font-variation-["wdth"
|
|
1910
|
+
subtitleClassName: 'es:font-variation-["wdth"_80,"wght"_250,"ROND"_100,"slnt"_-2]!',
|
|
1788
1911
|
iconClassName: "es:p-1 es:text-accent-900 es:bg-surface-50/65 es:rounded-md",
|
|
1789
1912
|
noColor: true
|
|
1790
1913
|
}
|
|
@@ -1794,17 +1917,17 @@ const LinkInput = (props) => {
|
|
|
1794
1917
|
} }),
|
|
1795
1918
|
keyboardShortcuts && /* @__PURE__ */ jsxs("div", { className: "es:flex es:flex-wrap es:items-center es:justify-end-safe es:gap-x-4 es:gap-y-0.5 es:px-2.5 es:pb-2 es:pt-0.5", children: [
|
|
1796
1919
|
/* @__PURE__ */ jsxs("div", { className: "es:flex es:gap-1 es:items-center", children: [
|
|
1797
|
-
/* @__PURE__ */ jsx("kbd", { className:
|
|
1798
|
-
/* @__PURE__ */ jsx("kbd", { className:
|
|
1799
|
-
/* @__PURE__ */ jsx("span", { className: 'es:font-variation-["wdth"
|
|
1920
|
+
/* @__PURE__ */ jsx("kbd", { className: 'es:flex es:size-4 es:items-center es:justify-center es:rounded es:bg-surface-600/10 es:text-surface-600 es:font-sans es:font-variation-["wdth"_100,"wght"_450,"ROND"_100] es:text-13 es:text-box-trim', children: "↓" }),
|
|
1921
|
+
/* @__PURE__ */ jsx("kbd", { className: 'es:flex es:size-4 es:items-center es:justify-center es:rounded es:bg-surface-600/10 es:text-surface-600 es:font-sans es:font-variation-["wdth"_100,"wght"_450,"ROND"_100] es:text-13 es:text-box-trim', children: "↑" }),
|
|
1922
|
+
/* @__PURE__ */ jsx("span", { className: 'es:font-variation-["wdth"_75,"wght"_325,"ROND"_100,"slnt"_-4] es:text-12 es:text-box-trim es:text-surface-700', children: __("Navigate", "eightshift-ui-components") })
|
|
1800
1923
|
] }),
|
|
1801
1924
|
/* @__PURE__ */ jsxs("div", { className: "es:flex es:gap-1 es:items-center", children: [
|
|
1802
|
-
/* @__PURE__ */ jsx("kbd", { className:
|
|
1803
|
-
/* @__PURE__ */ jsx("span", { className: 'es:font-variation-["wdth"
|
|
1925
|
+
/* @__PURE__ */ jsx("kbd", { className: 'es:flex es:size-4 es:items-center es:justify-center es:rounded es:bg-surface-600/10 es:text-surface-600 es:font-sans es:font-variation-["wdth"_100,"wght"_450,"ROND"_100] es:text-13 es:text-box-trim', children: "↵" }),
|
|
1926
|
+
/* @__PURE__ */ jsx("span", { className: 'es:font-variation-["wdth"_75,"wght"_325,"ROND"_100,"slnt"_-4] es:text-12 es:text-box-trim es:text-surface-700', children: __("Select", "eightshift-ui-components") })
|
|
1804
1927
|
] }),
|
|
1805
1928
|
/* @__PURE__ */ jsxs("div", { className: "es:flex es:gap-1 es:items-center", children: [
|
|
1806
|
-
/* @__PURE__ */ jsx("kbd", { className:
|
|
1807
|
-
/* @__PURE__ */ jsx("span", { className: 'es:font-variation-["wdth"
|
|
1929
|
+
/* @__PURE__ */ jsx("kbd", { className: 'es:flex es:h-4 es:items-center es:justify-center es:rounded es:bg-surface-600/10 es:text-surface-600 es:font-sans es:font-variation-["wdth"_67,"wght"_450,"ROND"_100] es:text-10 es:text-box-trim es:px-0.75', children: "Esc" }),
|
|
1930
|
+
/* @__PURE__ */ jsx("span", { className: 'es:font-variation-["wdth"_75,"wght"_325,"ROND"_100,"slnt"_-4] es:text-12 es:text-box-trim es:text-surface-700', children: __("Hide", "eightshift-ui-components") })
|
|
1808
1931
|
] })
|
|
1809
1932
|
] })
|
|
1810
1933
|
] })
|
|
@@ -5,7 +5,7 @@ import { upperFirst, camelCase } from "../../utilities/es-dash.js";
|
|
|
5
5
|
import { c as clsx } from "../../clsx-DgYk2OaC.js";
|
|
6
6
|
import { BaseControl } from "../base-control/base-control.js";
|
|
7
7
|
import { TriggeredPopover } from "../popover/popover.js";
|
|
8
|
-
import { $ as $b6c3ddc6086f204d$export$a98f0dcb43a68a25, a as $b6c3ddc6086f204d$export$d7b12c4107be0d61 } from "../../RadioGroup-
|
|
8
|
+
import { $ as $b6c3ddc6086f204d$export$a98f0dcb43a68a25, a as $b6c3ddc6086f204d$export$d7b12c4107be0d61 } from "../../RadioGroup-DCeiLxLK.js";
|
|
9
9
|
import { RichLabel } from "../rich-label/rich-label.js";
|
|
10
10
|
/**
|
|
11
11
|
* A component that can provide a 3x3 or a 2x2 grid of positions to pick from.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { $ as $3674c52c6b3c5bce$export$27d2ad3c5815583e, a as $3674c52c6b3c5bce$export$d9b273488cd8ce6f, b as $3674c52c6b3c5bce$export$2ce376c2cc3355c8, c as $3674c52c6b3c5bce$export$4b1545b4f2016d26, d as $431f98aba6844401$export$1ff3c3f08ae963c0, e as $3674c52c6b3c5bce$export$ecabc99eeffab7ca } from "../../Dialog-
|
|
2
|
+
import { $ as $3674c52c6b3c5bce$export$27d2ad3c5815583e, a as $3674c52c6b3c5bce$export$d9b273488cd8ce6f, b as $3674c52c6b3c5bce$export$2ce376c2cc3355c8, c as $3674c52c6b3c5bce$export$4b1545b4f2016d26, d as $431f98aba6844401$export$1ff3c3f08ae963c0, e as $3674c52c6b3c5bce$export$ecabc99eeffab7ca } from "../../Dialog-DTIxSDhz.js";
|
|
3
3
|
import { RichLabel } from "../rich-label/rich-label.js";
|
|
4
4
|
import { icons } from "../../icons/icons.js";
|
|
5
5
|
import { Button } from "../button/button.js";
|
|
@@ -309,7 +309,7 @@ const SubMenuItem = (props) => {
|
|
|
309
309
|
"aria-label": props["aria-label"] ?? __("Submenu", "eightshift-ui-components"),
|
|
310
310
|
offset: -1,
|
|
311
311
|
...popoverProps,
|
|
312
|
-
className: clsx("es:any-focus:outline-hidden", !manualWidth && "es:w-56", manualWidth && "es:max-w-80", popoverProps?.className),
|
|
312
|
+
className: clsx("es:font-sans", "es:any-focus:outline-hidden", !manualWidth && "es:w-56", manualWidth && "es:max-w-80", popoverProps?.className),
|
|
313
313
|
children: /* @__PURE__ */ jsx(
|
|
314
314
|
$3674c52c6b3c5bce$export$d9b273488cd8ce6f,
|
|
315
315
|
{
|
|
@@ -352,10 +352,10 @@ const MenuSectionHeader = (props) => {
|
|
|
352
352
|
{
|
|
353
353
|
...props,
|
|
354
354
|
className: clsx(
|
|
355
|
-
'es:mx-1 es:px-1 es:pt-1.5 es:pb-2 es:first:pt-2 es:flex es:min-w-44 es:items-center es:gap-1.5 es:font-variation-["wdth"
|
|
356
|
-
"es:select-none es:text-
|
|
355
|
+
'es:mx-1 es:px-1 es:pt-1.5 es:pb-2 es:first:pt-2 es:flex es:min-w-44 es:items-center es:gap-1.5 es:font-variation-["wdth"_76,"wght"_325,"ROND"_100]',
|
|
356
|
+
"es:select-none es:text-13",
|
|
357
357
|
"es:icon:shrink-0",
|
|
358
|
-
"es:text-surface-500
|
|
358
|
+
"es:text-surface-500",
|
|
359
359
|
className
|
|
360
360
|
),
|
|
361
361
|
isDisabled: true,
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { k as $a11501f3d1d39e6c$export$ea8f71083e90600f, l as $49c51c25361d4cd2$export$ee0f7cc6afcd1c18, m as $337b884510726a0d$export$14c98a7594375490, n as $5e3802645cc19319$export$1c3ebcada18427bf, o as $de32f1b87079253c$export$d2f961adcb0afbe, p as $86ea4cb521eb2e37$export$2317d149ed6f78c4, q as $337b884510726a0d$export$c6fdb837b070b4ff, h as $de32f1b87079253c$export$2e1e1122cf0cba88, g as $de32f1b87079253c$export$3ddf2d174ce01153 } from "../../Dialog-
|
|
2
|
+
import { k as $a11501f3d1d39e6c$export$ea8f71083e90600f, l as $49c51c25361d4cd2$export$ee0f7cc6afcd1c18, m as $337b884510726a0d$export$14c98a7594375490, n as $5e3802645cc19319$export$1c3ebcada18427bf, o as $de32f1b87079253c$export$d2f961adcb0afbe, p as $86ea4cb521eb2e37$export$2317d149ed6f78c4, q as $337b884510726a0d$export$c6fdb837b070b4ff, h as $de32f1b87079253c$export$2e1e1122cf0cba88, g as $de32f1b87079253c$export$3ddf2d174ce01153 } from "../../Dialog-DTIxSDhz.js";
|
|
3
3
|
import { $ as $5cb03073d3f54797$export$a8a3e93435678ff9 } from "../../Heading-CY-_gt-U.js";
|
|
4
4
|
import { m as $b5e257d569688ac6$export$535bd6ca7f90a273, b as $3ef42575df84b30b$export$9d1611c77c2fe928, $ as $64fa3d84918910a7$export$29f1550f4b0d4415, k as $df56164dff5785e2$export$4338b53315abf666, l as $5dc95899b306f630$export$c9058316764c140e, h as $64fa3d84918910a7$export$4d86445c2cf5e3, a as $64fa3d84918910a7$export$df3a06d6289f983e, i as $64fa3d84918910a7$export$2881499e37b75b9a } from "../../utils-Cr3pLd9c.js";
|
|
5
5
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-eGTqWSTd.js";
|
|
6
|
-
import { d as $21f1aa98acb08317$export$c57958e35f31ed73, e as $cc38e7bd3fc7b213$export$2bb74740c4e19def } from "../../SelectionManager-
|
|
6
|
+
import { d as $21f1aa98acb08317$export$c57958e35f31ed73, e as $cc38e7bd3fc7b213$export$2bb74740c4e19def } from "../../SelectionManager-B02LcxLr.js";
|
|
7
|
+
import { d as $c87311424ea30a05$export$fedb369cb70207f1, b as $d4ee10de306f2510$export$e58f029f0fbfdb29, j as $d4ee10de306f2510$export$cd4e5573fbe2b576 } from "../../useHover-DkmPQdGE.js";
|
|
7
8
|
import $dbSRa$react__default, { useState, useEffect, forwardRef, useContext, useRef, createContext, useMemo } from "react";
|
|
8
9
|
import { $ as $d3f049242431219c$export$45fda7c47f93fd48, a as $d3f049242431219c$export$6d3443f2c48bfc20 } from "../../animation-Dfl8uEb3.js";
|
|
9
|
-
import { $ as $fc909762b330b746$export$61c6a8c84e605fb6 } from "../../OverlayArrow-
|
|
10
|
+
import { $ as $fc909762b330b746$export$61c6a8c84e605fb6 } from "../../OverlayArrow-Fuxj-1QM.js";
|
|
10
11
|
import { Button } from "../button/button.js";
|
|
11
12
|
import { _ as __ } from "../../default-i18n-CnQeC5Pl.js";
|
|
12
13
|
import { c as clsx } from "../../clsx-DgYk2OaC.js";
|
|
@@ -34,21 +35,22 @@ function $5df64b3807dc15ee$export$d699905dd57c73ca() {
|
|
|
34
35
|
let frame;
|
|
35
36
|
let onBlur = (e) => {
|
|
36
37
|
if ($5df64b3807dc15ee$var$visualViewport && $5df64b3807dc15ee$var$visualViewport.scale > 1) return;
|
|
37
|
-
if ($21f1aa98acb08317$export$c57958e35f31ed73(e
|
|
38
|
+
if ($21f1aa98acb08317$export$c57958e35f31ed73($d4ee10de306f2510$export$e58f029f0fbfdb29(e)))
|
|
38
39
|
frame = requestAnimationFrame(() => {
|
|
39
|
-
|
|
40
|
+
let activeElement = $d4ee10de306f2510$export$cd4e5573fbe2b576();
|
|
41
|
+
if (!activeElement || !$21f1aa98acb08317$export$c57958e35f31ed73(activeElement)) updateSize({
|
|
40
42
|
width: document.documentElement.clientWidth,
|
|
41
43
|
height: document.documentElement.clientHeight
|
|
42
44
|
});
|
|
43
45
|
});
|
|
44
46
|
};
|
|
45
47
|
updateSize($5df64b3807dc15ee$var$getViewportSize());
|
|
46
|
-
window.addEventListener("blur", onBlur, true);
|
|
48
|
+
if ($c87311424ea30a05$export$fedb369cb70207f1()) window.addEventListener("blur", onBlur, true);
|
|
47
49
|
if (!$5df64b3807dc15ee$var$visualViewport) window.addEventListener("resize", onResize);
|
|
48
50
|
else $5df64b3807dc15ee$var$visualViewport.addEventListener("resize", onResize);
|
|
49
51
|
return () => {
|
|
50
52
|
cancelAnimationFrame(frame);
|
|
51
|
-
window.removeEventListener("blur", onBlur, true);
|
|
53
|
+
if ($c87311424ea30a05$export$fedb369cb70207f1()) window.removeEventListener("blur", onBlur, true);
|
|
52
54
|
if (!$5df64b3807dc15ee$var$visualViewport) window.removeEventListener("resize", onResize);
|
|
53
55
|
else $5df64b3807dc15ee$var$visualViewport.removeEventListener("resize", onResize);
|
|
54
56
|
};
|
|
@@ -332,6 +334,7 @@ const ModalInternal = (props) => {
|
|
|
332
334
|
onOpenChange,
|
|
333
335
|
isKeyboardDismissDisabled: noKeyboardDismiss,
|
|
334
336
|
className: ({ isEntering, isExiting }) => clsx(
|
|
337
|
+
"es:font-sans",
|
|
335
338
|
"es:fixed es:inset-0 es:z-9999 es:flex es:min-h-full es:items-center es:justify-center es:overflow-hidden es:p-4",
|
|
336
339
|
!noBackdrop && "es:bg-accent-950/20 es:backdrop-blur-xs",
|
|
337
340
|
isEntering && "es:motion-opacity-in es:motion-duration-150",
|
|
@@ -360,7 +363,7 @@ const ModalInternal = (props) => {
|
|
|
360
363
|
title && /* @__PURE__ */ jsx(
|
|
361
364
|
$5cb03073d3f54797$export$a8a3e93435678ff9,
|
|
362
365
|
{
|
|
363
|
-
className: 'es:text-balance es:text-
|
|
366
|
+
className: 'es:text-balance es:text-3xl! es:my-0! es:text-accent-800 es:font-variation-["wdth"_40,"wght"_425,"slnt"_-3,"ROND"_100]',
|
|
364
367
|
slot: "title",
|
|
365
368
|
children: title
|
|
366
369
|
}
|
|
@@ -114,7 +114,7 @@ const Notice = (props) => {
|
|
|
114
114
|
className: clsx(
|
|
115
115
|
"es:col-span-2 es:col-start-2 es:text-balance es:text-14",
|
|
116
116
|
subtitle ? "es:self-end" : "es:row-span-2 es:self-center-safe",
|
|
117
|
-
'es:font-variation-["wdth"
|
|
117
|
+
'es:font-variation-["wdth"_78,"wght"_325,"ROND"_100]',
|
|
118
118
|
styles[type].textColorClassName
|
|
119
119
|
),
|
|
120
120
|
children: label
|
|
@@ -124,8 +124,8 @@ const Notice = (props) => {
|
|
|
124
124
|
"span",
|
|
125
125
|
{
|
|
126
126
|
className: clsx(
|
|
127
|
-
"es:col-span-2 es:col-start-2 es:text-balance es:text-xs es:leading-
|
|
128
|
-
'es:font-variation-["wdth"
|
|
127
|
+
"es:col-span-2 es:col-start-2 es:text-balance es:text-xs es:leading-tighter es:pt-0.75",
|
|
128
|
+
'es:font-variation-["wdth"_90,"wght"_350,"slnt"_-1]',
|
|
129
129
|
styles[type].subtitleColorClassName,
|
|
130
130
|
label ? "es:self-start" : "es:row-span-2 es:self-center-safe"
|
|
131
131
|
),
|