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