@elementor/editor-controls 0.3.1 → 0.4.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/CHANGELOG.md +16 -0
- package/dist/index.d.mts +23 -22
- package/dist/index.d.ts +23 -22
- package/dist/index.js +232 -192
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +199 -157
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/control-actions/control-actions-context.tsx +6 -4
- package/src/controls/background-control/background-control.tsx +57 -0
- package/src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx +89 -0
- package/src/controls/color-control.tsx +7 -1
- package/src/controls/equal-unequal-sizes-control.tsx +5 -1
- package/src/controls/text-area-control.tsx +1 -1
- package/src/controls/text-control.tsx +7 -1
- package/src/index.ts +3 -1
- package/src/controls/background-overlay-repeater-control.tsx +0 -115
package/dist/index.mjs
CHANGED
|
@@ -211,7 +211,16 @@ import { TextField } from "@elementor/ui";
|
|
|
211
211
|
var TextControl = createControl(({ placeholder }) => {
|
|
212
212
|
const { value, setValue } = useBoundProp(stringPropTypeUtil2);
|
|
213
213
|
const handleChange = (event) => setValue(event.target.value);
|
|
214
|
-
return /* @__PURE__ */ React10.createElement(ControlActions, null, /* @__PURE__ */ React10.createElement(
|
|
214
|
+
return /* @__PURE__ */ React10.createElement(ControlActions, null, /* @__PURE__ */ React10.createElement(
|
|
215
|
+
TextField,
|
|
216
|
+
{
|
|
217
|
+
size: "tiny",
|
|
218
|
+
fullWidth: true,
|
|
219
|
+
value: value ?? "",
|
|
220
|
+
onChange: handleChange,
|
|
221
|
+
placeholder
|
|
222
|
+
}
|
|
223
|
+
));
|
|
215
224
|
});
|
|
216
225
|
|
|
217
226
|
// src/controls/text-area-control.tsx
|
|
@@ -230,7 +239,7 @@ var TextAreaControl = createControl(({ placeholder }) => {
|
|
|
230
239
|
multiline: true,
|
|
231
240
|
fullWidth: true,
|
|
232
241
|
rows: 5,
|
|
233
|
-
value,
|
|
242
|
+
value: value ?? "",
|
|
234
243
|
onChange: handleChange,
|
|
235
244
|
placeholder
|
|
236
245
|
}
|
|
@@ -385,7 +394,16 @@ var ColorControl = createControl(
|
|
|
385
394
|
const handleChange = (selectedColor) => {
|
|
386
395
|
setValue(selectedColor);
|
|
387
396
|
};
|
|
388
|
-
return /* @__PURE__ */ React14.createElement(ControlActions, null, /* @__PURE__ */ React14.createElement(
|
|
397
|
+
return /* @__PURE__ */ React14.createElement(ControlActions, null, /* @__PURE__ */ React14.createElement(
|
|
398
|
+
UnstableColorField,
|
|
399
|
+
{
|
|
400
|
+
size: "tiny",
|
|
401
|
+
...props,
|
|
402
|
+
value: value ?? "",
|
|
403
|
+
onChange: handleChange,
|
|
404
|
+
fullWidth: true
|
|
405
|
+
}
|
|
406
|
+
));
|
|
389
407
|
}
|
|
390
408
|
);
|
|
391
409
|
|
|
@@ -737,82 +755,12 @@ var initialShadow = {
|
|
|
737
755
|
}
|
|
738
756
|
};
|
|
739
757
|
|
|
740
|
-
// src/controls/background-overlay-repeater-control.tsx
|
|
741
|
-
import * as React18 from "react";
|
|
742
|
-
import {
|
|
743
|
-
backgroundImagePropTypeUtil
|
|
744
|
-
} from "@elementor/editor-props";
|
|
745
|
-
import { Grid as Grid4, Stack as Stack6, Typography as Typography4, UnstableColorIndicator as UnstableColorIndicator2 } from "@elementor/ui";
|
|
746
|
-
import { __ as __6 } from "@wordpress/i18n";
|
|
747
|
-
var BackgroundOverlayRepeaterControl = createControl(() => {
|
|
748
|
-
const { value: colorOverlayValues, setValue } = useBoundProp(backgroundImagePropTypeUtil);
|
|
749
|
-
const setColorOverlay = (newValue) => {
|
|
750
|
-
setValue(newValue);
|
|
751
|
-
};
|
|
752
|
-
return /* @__PURE__ */ React18.createElement(
|
|
753
|
-
Repeater,
|
|
754
|
-
{
|
|
755
|
-
values: colorOverlayValues,
|
|
756
|
-
setValues: setColorOverlay,
|
|
757
|
-
label: __6("Overlay", "elementor"),
|
|
758
|
-
itemSettings: {
|
|
759
|
-
Icon: ItemIcon2,
|
|
760
|
-
Label: ItemLabel2,
|
|
761
|
-
Content: ItemContent2,
|
|
762
|
-
initialValues: initialGradient
|
|
763
|
-
}
|
|
764
|
-
}
|
|
765
|
-
);
|
|
766
|
-
});
|
|
767
|
-
var ItemIcon2 = ({ value }) => /* @__PURE__ */ React18.createElement(UnstableColorIndicator2, { size: "inherit", component: "span", value: value.value.color.value });
|
|
768
|
-
var ItemContent2 = ({
|
|
769
|
-
value,
|
|
770
|
-
setValue
|
|
771
|
-
}) => {
|
|
772
|
-
const setColor = (newValue) => {
|
|
773
|
-
setValue({
|
|
774
|
-
$$type: "background-overlay",
|
|
775
|
-
value: newValue
|
|
776
|
-
});
|
|
777
|
-
};
|
|
778
|
-
return /* @__PURE__ */ React18.createElement(Stack6, { gap: 1.5 }, /* @__PURE__ */ React18.createElement(
|
|
779
|
-
Control3,
|
|
780
|
-
{
|
|
781
|
-
bind: "color",
|
|
782
|
-
value: value.value.color,
|
|
783
|
-
label: __6("Color", "elementor"),
|
|
784
|
-
setValue: (v) => setColor({ ...value.value, color: v })
|
|
785
|
-
},
|
|
786
|
-
/* @__PURE__ */ React18.createElement(ColorControl, null)
|
|
787
|
-
));
|
|
788
|
-
};
|
|
789
|
-
var Control3 = ({
|
|
790
|
-
value,
|
|
791
|
-
setValue,
|
|
792
|
-
label,
|
|
793
|
-
bind,
|
|
794
|
-
children
|
|
795
|
-
}) => /* @__PURE__ */ React18.createElement(BoundPropProvider, { value, setValue, bind }, /* @__PURE__ */ React18.createElement(Grid4, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React18.createElement(Grid4, { item: true, xs: 12 }, /* @__PURE__ */ React18.createElement(Typography4, { component: "label", variant: "caption", color: "text.secondary" }, label)), /* @__PURE__ */ React18.createElement(Grid4, { item: true, xs: 12 }, children)));
|
|
796
|
-
var ItemLabel2 = ({ value }) => {
|
|
797
|
-
const color = value.value.color.value;
|
|
798
|
-
return /* @__PURE__ */ React18.createElement("span", null, color);
|
|
799
|
-
};
|
|
800
|
-
var initialGradient = {
|
|
801
|
-
$$type: "background-overlay",
|
|
802
|
-
value: {
|
|
803
|
-
color: {
|
|
804
|
-
$$type: "color",
|
|
805
|
-
value: "rgba(0, 0, 0, 0.2)"
|
|
806
|
-
}
|
|
807
|
-
}
|
|
808
|
-
};
|
|
809
|
-
|
|
810
758
|
// src/controls/toggle-control.tsx
|
|
811
|
-
import * as
|
|
759
|
+
import * as React19 from "react";
|
|
812
760
|
import { stringPropTypeUtil as stringPropTypeUtil4 } from "@elementor/editor-props";
|
|
813
761
|
|
|
814
762
|
// src/components/control-toggle-button-group.tsx
|
|
815
|
-
import * as
|
|
763
|
+
import * as React18 from "react";
|
|
816
764
|
import {
|
|
817
765
|
styled as styled2,
|
|
818
766
|
ToggleButton,
|
|
@@ -836,7 +784,7 @@ var ControlToggleButtonGroup = ({
|
|
|
836
784
|
const handleChange = (_, newValue) => {
|
|
837
785
|
onChange(newValue);
|
|
838
786
|
};
|
|
839
|
-
return /* @__PURE__ */
|
|
787
|
+
return /* @__PURE__ */ React18.createElement(
|
|
840
788
|
StyledToggleButtonGroup,
|
|
841
789
|
{
|
|
842
790
|
justify,
|
|
@@ -848,7 +796,7 @@ var ControlToggleButtonGroup = ({
|
|
|
848
796
|
}
|
|
849
797
|
},
|
|
850
798
|
items.map(
|
|
851
|
-
({ label, value: buttonValue, renderContent: Content, showTooltip }) => showTooltip ? /* @__PURE__ */
|
|
799
|
+
({ label, value: buttonValue, renderContent: Content, showTooltip }) => showTooltip ? /* @__PURE__ */ React18.createElement(Tooltip, { key: buttonValue, title: label, disableFocusListener: true, placement: "top" }, /* @__PURE__ */ React18.createElement(ToggleButton, { value: buttonValue, "aria-label": label, size, fullWidth }, /* @__PURE__ */ React18.createElement(Content, { size }))) : /* @__PURE__ */ React18.createElement(
|
|
852
800
|
ToggleButton,
|
|
853
801
|
{
|
|
854
802
|
key: buttonValue,
|
|
@@ -857,7 +805,7 @@ var ControlToggleButtonGroup = ({
|
|
|
857
805
|
size,
|
|
858
806
|
fullWidth
|
|
859
807
|
},
|
|
860
|
-
/* @__PURE__ */
|
|
808
|
+
/* @__PURE__ */ React18.createElement(Content, { size })
|
|
861
809
|
)
|
|
862
810
|
)
|
|
863
811
|
);
|
|
@@ -870,7 +818,7 @@ var ToggleControl = createControl(
|
|
|
870
818
|
const handleToggle = (option) => {
|
|
871
819
|
setValue(option);
|
|
872
820
|
};
|
|
873
|
-
return /* @__PURE__ */
|
|
821
|
+
return /* @__PURE__ */ React19.createElement(
|
|
874
822
|
ControlToggleButtonGroup,
|
|
875
823
|
{
|
|
876
824
|
items: options,
|
|
@@ -885,7 +833,7 @@ var ToggleControl = createControl(
|
|
|
885
833
|
);
|
|
886
834
|
|
|
887
835
|
// src/controls/number-control.tsx
|
|
888
|
-
import * as
|
|
836
|
+
import * as React20 from "react";
|
|
889
837
|
import { numberPropTypeUtil } from "@elementor/editor-props";
|
|
890
838
|
import { TextField as TextField4 } from "@elementor/ui";
|
|
891
839
|
var isEmptyOrNaN = (value) => value === null || value === void 0 || value === "" || Number.isNaN(Number(value));
|
|
@@ -907,7 +855,7 @@ var NumberControl = createControl(
|
|
|
907
855
|
const formattedValue = shouldForceInt ? +parseInt(eventValue) : Number(eventValue);
|
|
908
856
|
setValue(Math.min(Math.max(formattedValue, min), max));
|
|
909
857
|
};
|
|
910
|
-
return /* @__PURE__ */
|
|
858
|
+
return /* @__PURE__ */ React20.createElement(ControlActions, null, /* @__PURE__ */ React20.createElement(
|
|
911
859
|
TextField4,
|
|
912
860
|
{
|
|
913
861
|
size: "tiny",
|
|
@@ -923,13 +871,13 @@ var NumberControl = createControl(
|
|
|
923
871
|
);
|
|
924
872
|
|
|
925
873
|
// src/controls/equal-unequal-sizes-control.tsx
|
|
926
|
-
import * as
|
|
874
|
+
import * as React21 from "react";
|
|
927
875
|
import { useId as useId3, useRef as useRef2 } from "react";
|
|
928
876
|
import {
|
|
929
877
|
sizePropTypeUtil as sizePropTypeUtil2
|
|
930
878
|
} from "@elementor/editor-props";
|
|
931
|
-
import { bindPopover as bindPopover2, bindToggle, Grid as
|
|
932
|
-
import { __ as
|
|
879
|
+
import { bindPopover as bindPopover2, bindToggle, Grid as Grid4, Popover as Popover2, Stack as Stack6, ToggleButton as ToggleButton2, usePopupState as usePopupState3 } from "@elementor/ui";
|
|
880
|
+
import { __ as __6 } from "@wordpress/i18n";
|
|
933
881
|
var isEqualSizes = (values, items) => {
|
|
934
882
|
if (values.length !== items.length) {
|
|
935
883
|
return false;
|
|
@@ -951,7 +899,10 @@ function EqualUnequalSizesControl({
|
|
|
951
899
|
const { value: sizeValue, setValue: setSizeValue } = useBoundProp(sizePropTypeUtil2);
|
|
952
900
|
const { value: multiSizeValue, setValue: setMultiSizeValue } = useBoundProp(multiSizePropTypeUtil);
|
|
953
901
|
const splitEqualValue = () => {
|
|
954
|
-
|
|
902
|
+
if (!sizeValue) {
|
|
903
|
+
return {};
|
|
904
|
+
}
|
|
905
|
+
return items.reduce((acc, { bind }) => ({ ...acc, [bind]: sizePropTypeUtil2.create(sizeValue) }), {});
|
|
955
906
|
};
|
|
956
907
|
const setNestedProp = (item, newValue) => {
|
|
957
908
|
const newMappedValues = {
|
|
@@ -964,14 +915,14 @@ function EqualUnequalSizesControl({
|
|
|
964
915
|
}
|
|
965
916
|
setMultiSizeValue(newMappedValues);
|
|
966
917
|
};
|
|
967
|
-
return /* @__PURE__ */
|
|
918
|
+
return /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement(Grid4, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: controlRef }, /* @__PURE__ */ React21.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React21.createElement(ControlLabel, null, label)), /* @__PURE__ */ React21.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React21.createElement(
|
|
968
919
|
EqualSizeControl,
|
|
969
920
|
{
|
|
970
921
|
items,
|
|
971
922
|
value: sizeValue,
|
|
972
923
|
multiSizeValue,
|
|
973
924
|
setValue: setSizeValue,
|
|
974
|
-
iconButton: /* @__PURE__ */
|
|
925
|
+
iconButton: /* @__PURE__ */ React21.createElement(
|
|
975
926
|
ToggleButton2,
|
|
976
927
|
{
|
|
977
928
|
size: "tiny",
|
|
@@ -983,7 +934,7 @@ function EqualUnequalSizesControl({
|
|
|
983
934
|
icon
|
|
984
935
|
)
|
|
985
936
|
}
|
|
986
|
-
))), /* @__PURE__ */
|
|
937
|
+
))), /* @__PURE__ */ React21.createElement(
|
|
987
938
|
Popover2,
|
|
988
939
|
{
|
|
989
940
|
disablePortal: true,
|
|
@@ -1001,7 +952,7 @@ function EqualUnequalSizesControl({
|
|
|
1001
952
|
paper: { sx: { mt: 0.5, p: 2, pt: 1, width: controlRef.current?.getBoundingClientRect().width } }
|
|
1002
953
|
}
|
|
1003
954
|
},
|
|
1004
|
-
/* @__PURE__ */
|
|
955
|
+
/* @__PURE__ */ React21.createElement(Stack6, { gap: 1.5 }, /* @__PURE__ */ React21.createElement(Grid4, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React21.createElement(
|
|
1005
956
|
MultiSizeValueControl,
|
|
1006
957
|
{
|
|
1007
958
|
item: items[0],
|
|
@@ -1009,7 +960,7 @@ function EqualUnequalSizesControl({
|
|
|
1009
960
|
setNestedProp,
|
|
1010
961
|
splitEqualValue
|
|
1011
962
|
}
|
|
1012
|
-
), /* @__PURE__ */
|
|
963
|
+
), /* @__PURE__ */ React21.createElement(
|
|
1013
964
|
MultiSizeValueControl,
|
|
1014
965
|
{
|
|
1015
966
|
item: items[1],
|
|
@@ -1017,7 +968,7 @@ function EqualUnequalSizesControl({
|
|
|
1017
968
|
setNestedProp,
|
|
1018
969
|
splitEqualValue
|
|
1019
970
|
}
|
|
1020
|
-
)), /* @__PURE__ */
|
|
971
|
+
)), /* @__PURE__ */ React21.createElement(Grid4, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React21.createElement(
|
|
1021
972
|
MultiSizeValueControl,
|
|
1022
973
|
{
|
|
1023
974
|
item: items[3],
|
|
@@ -1025,7 +976,7 @@ function EqualUnequalSizesControl({
|
|
|
1025
976
|
setNestedProp,
|
|
1026
977
|
splitEqualValue
|
|
1027
978
|
}
|
|
1028
|
-
), /* @__PURE__ */
|
|
979
|
+
), /* @__PURE__ */ React21.createElement(
|
|
1029
980
|
MultiSizeValueControl,
|
|
1030
981
|
{
|
|
1031
982
|
item: items[2],
|
|
@@ -1049,7 +1000,7 @@ var MultiSizeValueControl = ({
|
|
|
1049
1000
|
}
|
|
1050
1001
|
return splitEqualValue()?.[item.bind] ?? null;
|
|
1051
1002
|
};
|
|
1052
|
-
return /* @__PURE__ */
|
|
1003
|
+
return /* @__PURE__ */ React21.createElement(BoundPropProvider, { bind: "", setValue: handleChange, value: getMultiSizeValues() }, /* @__PURE__ */ React21.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React21.createElement(Grid4, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React21.createElement(Grid4, { item: true, xs: 12 }, /* @__PURE__ */ React21.createElement(ControlLabel, null, item.label)), /* @__PURE__ */ React21.createElement(Grid4, { item: true, xs: 12 }, /* @__PURE__ */ React21.createElement(SizeControl, { startIcon: item.icon })))));
|
|
1053
1004
|
};
|
|
1054
1005
|
var EqualSizeControl = ({
|
|
1055
1006
|
value,
|
|
@@ -1070,15 +1021,15 @@ var EqualSizeControl = ({
|
|
|
1070
1021
|
return sizePropTypeUtil2.create(multiValues[0].value);
|
|
1071
1022
|
}
|
|
1072
1023
|
};
|
|
1073
|
-
return /* @__PURE__ */
|
|
1024
|
+
return /* @__PURE__ */ React21.createElement(BoundPropProvider, { bind: "", setValue: handleChange, value: getDisplayValue() ?? null }, /* @__PURE__ */ React21.createElement(Stack6, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ React21.createElement(SizeControl, { placeholder: __6("MIXED", "elementor") }), iconButton));
|
|
1074
1025
|
};
|
|
1075
1026
|
|
|
1076
1027
|
// src/controls/linked-dimensions-control.tsx
|
|
1077
|
-
import * as
|
|
1028
|
+
import * as React22 from "react";
|
|
1078
1029
|
import { linkedDimensionsPropTypeUtil } from "@elementor/editor-props";
|
|
1079
1030
|
import { DetachIcon, LinkIcon, SideBottomIcon, SideLeftIcon, SideRightIcon, SideTopIcon } from "@elementor/icons";
|
|
1080
|
-
import { Grid as
|
|
1081
|
-
import { __ as
|
|
1031
|
+
import { Grid as Grid5, Stack as Stack7, ToggleButton as ToggleButton3 } from "@elementor/ui";
|
|
1032
|
+
import { __ as __7 } from "@wordpress/i18n";
|
|
1082
1033
|
var LinkedDimensionsControl = createControl(({ label }) => {
|
|
1083
1034
|
const { value, setValue } = useBoundProp(linkedDimensionsPropTypeUtil);
|
|
1084
1035
|
const { top, right, bottom, left, isLinked = true } = value || {};
|
|
@@ -1104,61 +1055,61 @@ var LinkedDimensionsControl = createControl(({ label }) => {
|
|
|
1104
1055
|
setValue(updatedValue);
|
|
1105
1056
|
};
|
|
1106
1057
|
const LinkedIcon = isLinked ? LinkIcon : DetachIcon;
|
|
1107
|
-
return /* @__PURE__ */
|
|
1058
|
+
return /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement(Stack7, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React22.createElement(ControlLabel, null, label), /* @__PURE__ */ React22.createElement(
|
|
1108
1059
|
ToggleButton3,
|
|
1109
1060
|
{
|
|
1110
|
-
"aria-label":
|
|
1061
|
+
"aria-label": __7("Link Inputs", "elementor"),
|
|
1111
1062
|
size: "tiny",
|
|
1112
1063
|
value: "check",
|
|
1113
1064
|
selected: isLinked,
|
|
1114
1065
|
sx: { marginLeft: "auto" },
|
|
1115
1066
|
onChange: toggleLinked
|
|
1116
1067
|
},
|
|
1117
|
-
/* @__PURE__ */
|
|
1118
|
-
)), /* @__PURE__ */
|
|
1119
|
-
|
|
1068
|
+
/* @__PURE__ */ React22.createElement(LinkedIcon, { fontSize: "tiny" })
|
|
1069
|
+
)), /* @__PURE__ */ React22.createElement(Stack7, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React22.createElement(Grid5, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React22.createElement(Grid5, { item: true, xs: 12 }, /* @__PURE__ */ React22.createElement(ControlLabel, null, __7("Top", "elementor"))), /* @__PURE__ */ React22.createElement(Grid5, { item: true, xs: 12 }, /* @__PURE__ */ React22.createElement(
|
|
1070
|
+
Control3,
|
|
1120
1071
|
{
|
|
1121
1072
|
bind: "top",
|
|
1122
1073
|
value: top,
|
|
1123
1074
|
setValue: setLinkedValue,
|
|
1124
|
-
startIcon: /* @__PURE__ */
|
|
1075
|
+
startIcon: /* @__PURE__ */ React22.createElement(SideTopIcon, { fontSize: "tiny" })
|
|
1125
1076
|
}
|
|
1126
|
-
))), /* @__PURE__ */
|
|
1127
|
-
|
|
1077
|
+
))), /* @__PURE__ */ React22.createElement(Grid5, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React22.createElement(Grid5, { item: true, xs: 12 }, /* @__PURE__ */ React22.createElement(ControlLabel, null, __7("Right", "elementor"))), /* @__PURE__ */ React22.createElement(Grid5, { item: true, xs: 12 }, /* @__PURE__ */ React22.createElement(
|
|
1078
|
+
Control3,
|
|
1128
1079
|
{
|
|
1129
1080
|
bind: "right",
|
|
1130
1081
|
value: right,
|
|
1131
1082
|
setValue: setLinkedValue,
|
|
1132
|
-
startIcon: /* @__PURE__ */
|
|
1083
|
+
startIcon: /* @__PURE__ */ React22.createElement(SideRightIcon, { fontSize: "tiny" })
|
|
1133
1084
|
}
|
|
1134
|
-
)))), /* @__PURE__ */
|
|
1135
|
-
|
|
1085
|
+
)))), /* @__PURE__ */ React22.createElement(Stack7, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React22.createElement(Grid5, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React22.createElement(Grid5, { item: true, xs: 12 }, /* @__PURE__ */ React22.createElement(ControlLabel, null, __7("Bottom", "elementor"))), /* @__PURE__ */ React22.createElement(Grid5, { item: true, xs: 12 }, /* @__PURE__ */ React22.createElement(
|
|
1086
|
+
Control3,
|
|
1136
1087
|
{
|
|
1137
1088
|
bind: "bottom",
|
|
1138
1089
|
value: bottom,
|
|
1139
1090
|
setValue: setLinkedValue,
|
|
1140
|
-
startIcon: /* @__PURE__ */
|
|
1091
|
+
startIcon: /* @__PURE__ */ React22.createElement(SideBottomIcon, { fontSize: "tiny" })
|
|
1141
1092
|
}
|
|
1142
|
-
))), /* @__PURE__ */
|
|
1143
|
-
|
|
1093
|
+
))), /* @__PURE__ */ React22.createElement(Grid5, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React22.createElement(Grid5, { item: true, xs: 12 }, /* @__PURE__ */ React22.createElement(ControlLabel, null, __7("Left", "elementor"))), /* @__PURE__ */ React22.createElement(Grid5, { item: true, xs: 12 }, /* @__PURE__ */ React22.createElement(
|
|
1094
|
+
Control3,
|
|
1144
1095
|
{
|
|
1145
1096
|
bind: "left",
|
|
1146
1097
|
value: left,
|
|
1147
1098
|
setValue: setLinkedValue,
|
|
1148
|
-
startIcon: /* @__PURE__ */
|
|
1099
|
+
startIcon: /* @__PURE__ */ React22.createElement(SideLeftIcon, { fontSize: "tiny" })
|
|
1149
1100
|
}
|
|
1150
1101
|
)))));
|
|
1151
1102
|
});
|
|
1152
|
-
var
|
|
1103
|
+
var Control3 = ({
|
|
1153
1104
|
bind,
|
|
1154
1105
|
startIcon,
|
|
1155
1106
|
value,
|
|
1156
1107
|
setValue
|
|
1157
|
-
}) => /* @__PURE__ */
|
|
1108
|
+
}) => /* @__PURE__ */ React22.createElement(BoundPropProvider, { setValue: (newValue) => setValue(bind, newValue), value, bind }, /* @__PURE__ */ React22.createElement(SizeControl, { startIcon }));
|
|
1158
1109
|
|
|
1159
1110
|
// src/controls/font-family-control.tsx
|
|
1160
1111
|
import { Fragment as Fragment4, useId as useId4, useState as useState3 } from "react";
|
|
1161
|
-
import * as
|
|
1112
|
+
import * as React23 from "react";
|
|
1162
1113
|
import { stringPropTypeUtil as stringPropTypeUtil5 } from "@elementor/editor-props";
|
|
1163
1114
|
import { ChevronDownIcon, EditIcon, PhotoIcon, SearchIcon, XIcon as XIcon2 } from "@elementor/icons";
|
|
1164
1115
|
import {
|
|
@@ -1173,20 +1124,20 @@ import {
|
|
|
1173
1124
|
MenuItem as MenuItem3,
|
|
1174
1125
|
MenuList,
|
|
1175
1126
|
Popover as Popover3,
|
|
1176
|
-
Stack as
|
|
1127
|
+
Stack as Stack8,
|
|
1177
1128
|
TextField as TextField5,
|
|
1178
|
-
Typography as
|
|
1129
|
+
Typography as Typography4,
|
|
1179
1130
|
UnstableTag as UnstableTag2,
|
|
1180
1131
|
usePopupState as usePopupState4
|
|
1181
1132
|
} from "@elementor/ui";
|
|
1182
|
-
import { __ as
|
|
1133
|
+
import { __ as __9 } from "@wordpress/i18n";
|
|
1183
1134
|
|
|
1184
1135
|
// src/hooks/use-filtered-font-families.ts
|
|
1185
|
-
import { __ as
|
|
1136
|
+
import { __ as __8 } from "@wordpress/i18n";
|
|
1186
1137
|
var supportedCategories = {
|
|
1187
|
-
system:
|
|
1188
|
-
googlefonts:
|
|
1189
|
-
customfonts:
|
|
1138
|
+
system: __8("System", "elementor"),
|
|
1139
|
+
googlefonts: __8("Google Fonts", "elementor"),
|
|
1140
|
+
customfonts: __8("Custom Fonts", "elementor")
|
|
1190
1141
|
};
|
|
1191
1142
|
var useFilteredFontFamilies = (fontFamilies, searchValue) => {
|
|
1192
1143
|
const filteredFontFamilies = Object.entries(fontFamilies).reduce(
|
|
@@ -1229,16 +1180,16 @@ var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
|
1229
1180
|
setSearchValue("");
|
|
1230
1181
|
popoverState.close();
|
|
1231
1182
|
};
|
|
1232
|
-
return /* @__PURE__ */
|
|
1183
|
+
return /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement(
|
|
1233
1184
|
UnstableTag2,
|
|
1234
1185
|
{
|
|
1235
1186
|
variant: "outlined",
|
|
1236
1187
|
label: fontFamily,
|
|
1237
|
-
endIcon: /* @__PURE__ */
|
|
1188
|
+
endIcon: /* @__PURE__ */ React23.createElement(ChevronDownIcon, { fontSize: "tiny" }),
|
|
1238
1189
|
...bindTrigger3(popoverState),
|
|
1239
1190
|
fullWidth: true
|
|
1240
1191
|
}
|
|
1241
|
-
), /* @__PURE__ */
|
|
1192
|
+
), /* @__PURE__ */ React23.createElement(
|
|
1242
1193
|
Popover3,
|
|
1243
1194
|
{
|
|
1244
1195
|
disablePortal: true,
|
|
@@ -1247,21 +1198,21 @@ var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
|
1247
1198
|
...bindPopover3(popoverState),
|
|
1248
1199
|
onClose: handleClose
|
|
1249
1200
|
},
|
|
1250
|
-
/* @__PURE__ */
|
|
1201
|
+
/* @__PURE__ */ React23.createElement(Stack8, null, /* @__PURE__ */ React23.createElement(Stack8, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React23.createElement(EditIcon, { fontSize: SIZE2, sx: { mr: 0.5 } }), /* @__PURE__ */ React23.createElement(Typography4, { variant: "subtitle2" }, __9("Font Family", "elementor")), /* @__PURE__ */ React23.createElement(IconButton2, { size: SIZE2, sx: { ml: "auto" }, onClick: handleClose }, /* @__PURE__ */ React23.createElement(XIcon2, { fontSize: SIZE2 }))), /* @__PURE__ */ React23.createElement(Box2, { px: 1.5, pb: 1 }, /* @__PURE__ */ React23.createElement(
|
|
1251
1202
|
TextField5,
|
|
1252
1203
|
{
|
|
1253
1204
|
fullWidth: true,
|
|
1254
1205
|
size: SIZE2,
|
|
1255
1206
|
value: searchValue,
|
|
1256
|
-
placeholder:
|
|
1207
|
+
placeholder: __9("Search", "elementor"),
|
|
1257
1208
|
onChange: handleSearch,
|
|
1258
1209
|
InputProps: {
|
|
1259
|
-
startAdornment: /* @__PURE__ */
|
|
1210
|
+
startAdornment: /* @__PURE__ */ React23.createElement(InputAdornment3, { position: "start" }, /* @__PURE__ */ React23.createElement(SearchIcon, { fontSize: SIZE2 }))
|
|
1260
1211
|
}
|
|
1261
1212
|
}
|
|
1262
|
-
)), /* @__PURE__ */
|
|
1213
|
+
)), /* @__PURE__ */ React23.createElement(Divider, null), /* @__PURE__ */ React23.createElement(Box2, { sx: { overflowY: "auto", height: 260, width: 220 } }, filteredFontFamilies.length > 0 ? /* @__PURE__ */ React23.createElement(MenuList, { role: "listbox", tabIndex: 0 }, filteredFontFamilies.map(([category, items], index) => /* @__PURE__ */ React23.createElement(Fragment4, { key: index }, /* @__PURE__ */ React23.createElement(ListSubheader, { sx: { typography: "caption", color: "text.tertiary" } }, category), items.map((item) => {
|
|
1263
1214
|
const isSelected = item === fontFamily;
|
|
1264
|
-
return /* @__PURE__ */
|
|
1215
|
+
return /* @__PURE__ */ React23.createElement(
|
|
1265
1216
|
MenuItem3,
|
|
1266
1217
|
{
|
|
1267
1218
|
key: item,
|
|
@@ -1276,7 +1227,7 @@ var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
|
1276
1227
|
},
|
|
1277
1228
|
item
|
|
1278
1229
|
);
|
|
1279
|
-
})))) : /* @__PURE__ */
|
|
1230
|
+
})))) : /* @__PURE__ */ React23.createElement(Stack8, { alignItems: "center", p: 2.5, gap: 1.5 }, /* @__PURE__ */ React23.createElement(PhotoIcon, { fontSize: "large" }), /* @__PURE__ */ React23.createElement(Typography4, { align: "center", variant: "caption", color: "text.secondary" }, __9("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React23.createElement("br", null), "\u201C", searchValue, "\u201D."), /* @__PURE__ */ React23.createElement(Typography4, { align: "center", variant: "caption", color: "text.secondary" }, /* @__PURE__ */ React23.createElement(
|
|
1280
1231
|
Link,
|
|
1281
1232
|
{
|
|
1282
1233
|
color: "secondary",
|
|
@@ -1284,13 +1235,13 @@ var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
|
1284
1235
|
component: "button",
|
|
1285
1236
|
onClick: () => setSearchValue("")
|
|
1286
1237
|
},
|
|
1287
|
-
|
|
1288
|
-
), "\xA0",
|
|
1238
|
+
__9("Clear the filters", "elementor")
|
|
1239
|
+
), "\xA0", __9("and try again.", "elementor")))))
|
|
1289
1240
|
));
|
|
1290
1241
|
});
|
|
1291
1242
|
|
|
1292
1243
|
// src/controls/url-control.tsx
|
|
1293
|
-
import * as
|
|
1244
|
+
import * as React24 from "react";
|
|
1294
1245
|
import { TextField as TextField6 } from "@elementor/ui";
|
|
1295
1246
|
var UrlControl = createControl(({ placeholder }) => {
|
|
1296
1247
|
const { value, setValue } = useBoundProp();
|
|
@@ -1298,7 +1249,7 @@ var UrlControl = createControl(({ placeholder }) => {
|
|
|
1298
1249
|
$$type: "url",
|
|
1299
1250
|
value: event.target.value
|
|
1300
1251
|
});
|
|
1301
|
-
return /* @__PURE__ */
|
|
1252
|
+
return /* @__PURE__ */ React24.createElement(ControlActions, null, /* @__PURE__ */ React24.createElement(
|
|
1302
1253
|
TextField6,
|
|
1303
1254
|
{
|
|
1304
1255
|
size: "tiny",
|
|
@@ -1311,10 +1262,10 @@ var UrlControl = createControl(({ placeholder }) => {
|
|
|
1311
1262
|
});
|
|
1312
1263
|
|
|
1313
1264
|
// src/controls/link-control.tsx
|
|
1314
|
-
import * as
|
|
1265
|
+
import * as React25 from "react";
|
|
1315
1266
|
import { MinusIcon, PlusIcon as PlusIcon2 } from "@elementor/icons";
|
|
1316
|
-
import { Collapse, Divider as Divider2, Grid as
|
|
1317
|
-
import { __ as
|
|
1267
|
+
import { Collapse, Divider as Divider2, Grid as Grid6, IconButton as IconButton3, Stack as Stack9, Switch } from "@elementor/ui";
|
|
1268
|
+
import { __ as __10 } from "@wordpress/i18n";
|
|
1318
1269
|
var SIZE3 = "tiny";
|
|
1319
1270
|
var DEFAULT_LINK_CONTROL_VALUE = {
|
|
1320
1271
|
$$type: "link",
|
|
@@ -1339,8 +1290,8 @@ var LinkControl = createControl(() => {
|
|
|
1339
1290
|
}
|
|
1340
1291
|
});
|
|
1341
1292
|
};
|
|
1342
|
-
return /* @__PURE__ */
|
|
1343
|
-
|
|
1293
|
+
return /* @__PURE__ */ React25.createElement(Stack9, { gap: 1.5 }, /* @__PURE__ */ React25.createElement(Divider2, null), /* @__PURE__ */ React25.createElement(
|
|
1294
|
+
Stack9,
|
|
1344
1295
|
{
|
|
1345
1296
|
direction: "row",
|
|
1346
1297
|
sx: {
|
|
@@ -1348,17 +1299,17 @@ var LinkControl = createControl(() => {
|
|
|
1348
1299
|
alignItems: "center"
|
|
1349
1300
|
}
|
|
1350
1301
|
},
|
|
1351
|
-
/* @__PURE__ */
|
|
1352
|
-
/* @__PURE__ */
|
|
1353
|
-
), /* @__PURE__ */
|
|
1302
|
+
/* @__PURE__ */ React25.createElement(ControlLabel, null, __10("Link", "elementor")),
|
|
1303
|
+
/* @__PURE__ */ React25.createElement(IconButton3, { size: SIZE3, onClick: () => handleOnChange("enabled", !enabled) }, enabled ? /* @__PURE__ */ React25.createElement(MinusIcon, { fontSize: SIZE3 }) : /* @__PURE__ */ React25.createElement(PlusIcon2, { fontSize: SIZE3 }))
|
|
1304
|
+
), /* @__PURE__ */ React25.createElement(Collapse, { in: enabled, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React25.createElement(Stack9, { gap: 1.5 }, /* @__PURE__ */ React25.createElement(
|
|
1354
1305
|
BoundPropProvider,
|
|
1355
1306
|
{
|
|
1356
1307
|
value: href,
|
|
1357
1308
|
setValue: (newHref) => handleOnChange("href", newHref),
|
|
1358
1309
|
bind: "href"
|
|
1359
1310
|
},
|
|
1360
|
-
/* @__PURE__ */
|
|
1361
|
-
), /* @__PURE__ */
|
|
1311
|
+
/* @__PURE__ */ React25.createElement(UrlControl, { placeholder: __10("Paste URL or type", "elementor") })
|
|
1312
|
+
), /* @__PURE__ */ React25.createElement(
|
|
1362
1313
|
SwitchControl,
|
|
1363
1314
|
{
|
|
1364
1315
|
value: isTargetBlank,
|
|
@@ -1367,15 +1318,15 @@ var LinkControl = createControl(() => {
|
|
|
1367
1318
|
))));
|
|
1368
1319
|
});
|
|
1369
1320
|
var SwitchControl = ({ value, onSwitch }) => {
|
|
1370
|
-
return /* @__PURE__ */
|
|
1321
|
+
return /* @__PURE__ */ React25.createElement(Grid6, { container: true, alignItems: "center", flexWrap: "nowrap", justifyContent: "space-between" }, /* @__PURE__ */ React25.createElement(Grid6, { item: true }, /* @__PURE__ */ React25.createElement(ControlLabel, null, __10("Open in new tab", "elementor"))), /* @__PURE__ */ React25.createElement(Grid6, { item: true }, /* @__PURE__ */ React25.createElement(Switch, { checked: value, onChange: onSwitch })));
|
|
1371
1322
|
};
|
|
1372
1323
|
|
|
1373
1324
|
// src/controls/gap-control.tsx
|
|
1374
|
-
import * as
|
|
1325
|
+
import * as React26 from "react";
|
|
1375
1326
|
import { gapPropTypeUtil } from "@elementor/editor-props";
|
|
1376
1327
|
import { DetachIcon as DetachIcon2, LinkIcon as LinkIcon2 } from "@elementor/icons";
|
|
1377
|
-
import { Grid as
|
|
1378
|
-
import { __ as
|
|
1328
|
+
import { Grid as Grid7, Stack as Stack10, ToggleButton as ToggleButton4 } from "@elementor/ui";
|
|
1329
|
+
import { __ as __11 } from "@wordpress/i18n";
|
|
1379
1330
|
var GapControl = createControl(({ label }) => {
|
|
1380
1331
|
const { value, setValue } = useBoundProp(gapPropTypeUtil);
|
|
1381
1332
|
const { column, row, isLinked = true } = value || {};
|
|
@@ -1397,37 +1348,128 @@ var GapControl = createControl(({ label }) => {
|
|
|
1397
1348
|
setValue(updatedValue);
|
|
1398
1349
|
};
|
|
1399
1350
|
const LinkedIcon = isLinked ? LinkIcon2 : DetachIcon2;
|
|
1400
|
-
return /* @__PURE__ */
|
|
1351
|
+
return /* @__PURE__ */ React26.createElement(React26.Fragment, null, /* @__PURE__ */ React26.createElement(Stack10, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React26.createElement(ControlLabel, null, label), /* @__PURE__ */ React26.createElement(
|
|
1401
1352
|
ToggleButton4,
|
|
1402
1353
|
{
|
|
1403
|
-
"aria-label":
|
|
1354
|
+
"aria-label": __11("Link Inputs", "elementor"),
|
|
1404
1355
|
size: "tiny",
|
|
1405
1356
|
value: "check",
|
|
1406
1357
|
selected: isLinked,
|
|
1407
1358
|
sx: { marginLeft: "auto" },
|
|
1408
1359
|
onChange: toggleLinked
|
|
1409
1360
|
},
|
|
1410
|
-
/* @__PURE__ */
|
|
1411
|
-
)), /* @__PURE__ */
|
|
1361
|
+
/* @__PURE__ */ React26.createElement(LinkedIcon, { fontSize: "tiny" })
|
|
1362
|
+
)), /* @__PURE__ */ React26.createElement(Stack10, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React26.createElement(Grid7, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React26.createElement(Grid7, { item: true, xs: 12 }, /* @__PURE__ */ React26.createElement(ControlLabel, null, __11("Column", "elementor"))), /* @__PURE__ */ React26.createElement(Grid7, { item: true, xs: 12 }, /* @__PURE__ */ React26.createElement(
|
|
1412
1363
|
BoundPropProvider,
|
|
1413
1364
|
{
|
|
1414
1365
|
setValue: (newValue) => setLinkedValue("column", newValue),
|
|
1415
1366
|
value: column,
|
|
1416
1367
|
bind: "column"
|
|
1417
1368
|
},
|
|
1418
|
-
/* @__PURE__ */
|
|
1419
|
-
))), /* @__PURE__ */
|
|
1369
|
+
/* @__PURE__ */ React26.createElement(SizeControl, null)
|
|
1370
|
+
))), /* @__PURE__ */ React26.createElement(Grid7, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React26.createElement(Grid7, { item: true, xs: 12 }, /* @__PURE__ */ React26.createElement(ControlLabel, null, __11("Row", "elementor"))), /* @__PURE__ */ React26.createElement(Grid7, { item: true, xs: 12 }, /* @__PURE__ */ React26.createElement(
|
|
1420
1371
|
BoundPropProvider,
|
|
1421
1372
|
{
|
|
1422
1373
|
setValue: (newValue) => setLinkedValue("row", newValue),
|
|
1423
1374
|
value: row,
|
|
1424
1375
|
bind: "row"
|
|
1425
1376
|
},
|
|
1426
|
-
/* @__PURE__ */
|
|
1377
|
+
/* @__PURE__ */ React26.createElement(SizeControl, null)
|
|
1427
1378
|
)))));
|
|
1428
1379
|
});
|
|
1380
|
+
|
|
1381
|
+
// src/controls/background-control/background-control.tsx
|
|
1382
|
+
import * as React28 from "react";
|
|
1383
|
+
import {
|
|
1384
|
+
backgroundPropTypeUtil
|
|
1385
|
+
} from "@elementor/editor-props";
|
|
1386
|
+
import { Grid as Grid9, Stack as Stack12 } from "@elementor/ui";
|
|
1387
|
+
import { __ as __13 } from "@wordpress/i18n";
|
|
1388
|
+
|
|
1389
|
+
// src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx
|
|
1390
|
+
import * as React27 from "react";
|
|
1391
|
+
import {
|
|
1392
|
+
backgroundOverlayPropTypeUtil
|
|
1393
|
+
} from "@elementor/editor-props";
|
|
1394
|
+
import { Grid as Grid8, Stack as Stack11, UnstableColorIndicator as UnstableColorIndicator2 } from "@elementor/ui";
|
|
1395
|
+
import { __ as __12 } from "@wordpress/i18n";
|
|
1396
|
+
var initialBackgroundOverlay = {
|
|
1397
|
+
$$type: "background-color-overlay",
|
|
1398
|
+
value: "rgba(0, 0, 0, 0.2)"
|
|
1399
|
+
};
|
|
1400
|
+
var BackgroundOverlayRepeaterControl = createControl(() => {
|
|
1401
|
+
const { value: overlayValues, setValue } = useBoundProp(backgroundOverlayPropTypeUtil);
|
|
1402
|
+
const setColorOverlay = (newValue) => {
|
|
1403
|
+
setValue(newValue);
|
|
1404
|
+
};
|
|
1405
|
+
return /* @__PURE__ */ React27.createElement(
|
|
1406
|
+
Repeater,
|
|
1407
|
+
{
|
|
1408
|
+
values: overlayValues ?? [],
|
|
1409
|
+
setValues: setColorOverlay,
|
|
1410
|
+
label: __12("Overlay", "elementor"),
|
|
1411
|
+
itemSettings: {
|
|
1412
|
+
Icon: ItemIcon2,
|
|
1413
|
+
Label: ItemLabel2,
|
|
1414
|
+
Content: ItemContent2,
|
|
1415
|
+
initialValues: initialBackgroundOverlay
|
|
1416
|
+
}
|
|
1417
|
+
}
|
|
1418
|
+
);
|
|
1419
|
+
});
|
|
1420
|
+
var ItemIcon2 = ({ value }) => /* @__PURE__ */ React27.createElement(UnstableColorIndicator2, { size: "inherit", component: "span", value: value.value });
|
|
1421
|
+
var ItemContent2 = ({
|
|
1422
|
+
value,
|
|
1423
|
+
setValue
|
|
1424
|
+
}) => {
|
|
1425
|
+
const setBackgroundColorOverlay = (newValue) => {
|
|
1426
|
+
setValue({
|
|
1427
|
+
$$type: "background-color-overlay",
|
|
1428
|
+
value: newValue.value
|
|
1429
|
+
});
|
|
1430
|
+
};
|
|
1431
|
+
return /* @__PURE__ */ React27.createElement(Stack11, { gap: 1.5 }, /* @__PURE__ */ React27.createElement(
|
|
1432
|
+
BoundPropProvider,
|
|
1433
|
+
{
|
|
1434
|
+
bind: "background-color-overlay",
|
|
1435
|
+
value,
|
|
1436
|
+
setValue: setBackgroundColorOverlay
|
|
1437
|
+
},
|
|
1438
|
+
/* @__PURE__ */ React27.createElement(Grid8, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React27.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React27.createElement(ControlLabel, null, __12("Color", "elementor"))), /* @__PURE__ */ React27.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React27.createElement(ColorControl, null)))
|
|
1439
|
+
));
|
|
1440
|
+
};
|
|
1441
|
+
var ItemLabel2 = ({ value }) => {
|
|
1442
|
+
const color = value.value;
|
|
1443
|
+
return /* @__PURE__ */ React27.createElement("span", null, color);
|
|
1444
|
+
};
|
|
1445
|
+
|
|
1446
|
+
// src/controls/background-control/background-control.tsx
|
|
1447
|
+
var BackgroundControl = createControl(() => {
|
|
1448
|
+
const { value, setValue } = useBoundProp(backgroundPropTypeUtil);
|
|
1449
|
+
const setColor = (newValue) => {
|
|
1450
|
+
setValue({
|
|
1451
|
+
...value,
|
|
1452
|
+
color: newValue
|
|
1453
|
+
});
|
|
1454
|
+
};
|
|
1455
|
+
const setBackgroundColorOverlay = (newValue) => {
|
|
1456
|
+
setValue({
|
|
1457
|
+
...value,
|
|
1458
|
+
"background-overlay": newValue
|
|
1459
|
+
});
|
|
1460
|
+
};
|
|
1461
|
+
return /* @__PURE__ */ React28.createElement(Stack12, { gap: 1.5 }, /* @__PURE__ */ React28.createElement(
|
|
1462
|
+
BoundPropProvider,
|
|
1463
|
+
{
|
|
1464
|
+
bind: "background-overlay",
|
|
1465
|
+
value: value?.["background-overlay"],
|
|
1466
|
+
setValue: setBackgroundColorOverlay
|
|
1467
|
+
},
|
|
1468
|
+
/* @__PURE__ */ React28.createElement(BackgroundOverlayRepeaterControl, null)
|
|
1469
|
+
), /* @__PURE__ */ React28.createElement(BoundPropProvider, { bind: "color", value: value?.color, setValue: setColor }, /* @__PURE__ */ React28.createElement(Grid9, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React28.createElement(Grid9, { item: true, xs: 6 }, /* @__PURE__ */ React28.createElement(ControlLabel, null, __13("Color", "elementor"))), /* @__PURE__ */ React28.createElement(Grid9, { item: true, xs: 6 }, /* @__PURE__ */ React28.createElement(ColorControl, null)))));
|
|
1470
|
+
});
|
|
1429
1471
|
export {
|
|
1430
|
-
|
|
1472
|
+
BackgroundControl,
|
|
1431
1473
|
BoundPropProvider,
|
|
1432
1474
|
BoxShadowRepeaterControl,
|
|
1433
1475
|
ColorControl,
|