@elementor/editor-controls 0.3.1 → 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 +8 -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 +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/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.js
CHANGED
|
@@ -30,7 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/index.ts
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
|
-
|
|
33
|
+
BackgroundControl: () => BackgroundControl,
|
|
34
34
|
BoundPropProvider: () => BoundPropProvider,
|
|
35
35
|
BoxShadowRepeaterControl: () => BoxShadowRepeaterControl,
|
|
36
36
|
ColorControl: () => ColorControl,
|
|
@@ -272,7 +272,16 @@ var import_ui7 = require("@elementor/ui");
|
|
|
272
272
|
var TextControl = createControl(({ placeholder }) => {
|
|
273
273
|
const { value, setValue } = useBoundProp(import_editor_props4.stringPropTypeUtil);
|
|
274
274
|
const handleChange = (event) => setValue(event.target.value);
|
|
275
|
-
return /* @__PURE__ */ React10.createElement(ControlActions, null, /* @__PURE__ */ React10.createElement(
|
|
275
|
+
return /* @__PURE__ */ React10.createElement(ControlActions, null, /* @__PURE__ */ React10.createElement(
|
|
276
|
+
import_ui7.TextField,
|
|
277
|
+
{
|
|
278
|
+
size: "tiny",
|
|
279
|
+
fullWidth: true,
|
|
280
|
+
value: value ?? "",
|
|
281
|
+
onChange: handleChange,
|
|
282
|
+
placeholder
|
|
283
|
+
}
|
|
284
|
+
));
|
|
276
285
|
});
|
|
277
286
|
|
|
278
287
|
// src/controls/text-area-control.tsx
|
|
@@ -291,7 +300,7 @@ var TextAreaControl = createControl(({ placeholder }) => {
|
|
|
291
300
|
multiline: true,
|
|
292
301
|
fullWidth: true,
|
|
293
302
|
rows: 5,
|
|
294
|
-
value,
|
|
303
|
+
value: value ?? "",
|
|
295
304
|
onChange: handleChange,
|
|
296
305
|
placeholder
|
|
297
306
|
}
|
|
@@ -446,7 +455,16 @@ var ColorControl = createControl(
|
|
|
446
455
|
const handleChange = (selectedColor) => {
|
|
447
456
|
setValue(selectedColor);
|
|
448
457
|
};
|
|
449
|
-
return /* @__PURE__ */ React14.createElement(ControlActions, null, /* @__PURE__ */ React14.createElement(
|
|
458
|
+
return /* @__PURE__ */ React14.createElement(ControlActions, null, /* @__PURE__ */ React14.createElement(
|
|
459
|
+
import_ui11.UnstableColorField,
|
|
460
|
+
{
|
|
461
|
+
size: "tiny",
|
|
462
|
+
...props,
|
|
463
|
+
value: value ?? "",
|
|
464
|
+
onChange: handleChange,
|
|
465
|
+
fullWidth: true
|
|
466
|
+
}
|
|
467
|
+
));
|
|
450
468
|
}
|
|
451
469
|
);
|
|
452
470
|
|
|
@@ -786,82 +804,14 @@ var initialShadow = {
|
|
|
786
804
|
}
|
|
787
805
|
};
|
|
788
806
|
|
|
789
|
-
// src/controls/background-overlay-repeater-control.tsx
|
|
790
|
-
var React18 = __toESM(require("react"));
|
|
791
|
-
var import_editor_props10 = require("@elementor/editor-props");
|
|
792
|
-
var import_ui15 = require("@elementor/ui");
|
|
793
|
-
var import_i18n6 = require("@wordpress/i18n");
|
|
794
|
-
var BackgroundOverlayRepeaterControl = createControl(() => {
|
|
795
|
-
const { value: colorOverlayValues, setValue } = useBoundProp(import_editor_props10.backgroundImagePropTypeUtil);
|
|
796
|
-
const setColorOverlay = (newValue) => {
|
|
797
|
-
setValue(newValue);
|
|
798
|
-
};
|
|
799
|
-
return /* @__PURE__ */ React18.createElement(
|
|
800
|
-
Repeater,
|
|
801
|
-
{
|
|
802
|
-
values: colorOverlayValues,
|
|
803
|
-
setValues: setColorOverlay,
|
|
804
|
-
label: (0, import_i18n6.__)("Overlay", "elementor"),
|
|
805
|
-
itemSettings: {
|
|
806
|
-
Icon: ItemIcon2,
|
|
807
|
-
Label: ItemLabel2,
|
|
808
|
-
Content: ItemContent2,
|
|
809
|
-
initialValues: initialGradient
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
);
|
|
813
|
-
});
|
|
814
|
-
var ItemIcon2 = ({ value }) => /* @__PURE__ */ React18.createElement(import_ui15.UnstableColorIndicator, { size: "inherit", component: "span", value: value.value.color.value });
|
|
815
|
-
var ItemContent2 = ({
|
|
816
|
-
value,
|
|
817
|
-
setValue
|
|
818
|
-
}) => {
|
|
819
|
-
const setColor = (newValue) => {
|
|
820
|
-
setValue({
|
|
821
|
-
$$type: "background-overlay",
|
|
822
|
-
value: newValue
|
|
823
|
-
});
|
|
824
|
-
};
|
|
825
|
-
return /* @__PURE__ */ React18.createElement(import_ui15.Stack, { gap: 1.5 }, /* @__PURE__ */ React18.createElement(
|
|
826
|
-
Control3,
|
|
827
|
-
{
|
|
828
|
-
bind: "color",
|
|
829
|
-
value: value.value.color,
|
|
830
|
-
label: (0, import_i18n6.__)("Color", "elementor"),
|
|
831
|
-
setValue: (v) => setColor({ ...value.value, color: v })
|
|
832
|
-
},
|
|
833
|
-
/* @__PURE__ */ React18.createElement(ColorControl, null)
|
|
834
|
-
));
|
|
835
|
-
};
|
|
836
|
-
var Control3 = ({
|
|
837
|
-
value,
|
|
838
|
-
setValue,
|
|
839
|
-
label,
|
|
840
|
-
bind,
|
|
841
|
-
children
|
|
842
|
-
}) => /* @__PURE__ */ React18.createElement(BoundPropProvider, { value, setValue, bind }, /* @__PURE__ */ React18.createElement(import_ui15.Grid, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React18.createElement(import_ui15.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React18.createElement(import_ui15.Typography, { component: "label", variant: "caption", color: "text.secondary" }, label)), /* @__PURE__ */ React18.createElement(import_ui15.Grid, { item: true, xs: 12 }, children)));
|
|
843
|
-
var ItemLabel2 = ({ value }) => {
|
|
844
|
-
const color = value.value.color.value;
|
|
845
|
-
return /* @__PURE__ */ React18.createElement("span", null, color);
|
|
846
|
-
};
|
|
847
|
-
var initialGradient = {
|
|
848
|
-
$$type: "background-overlay",
|
|
849
|
-
value: {
|
|
850
|
-
color: {
|
|
851
|
-
$$type: "color",
|
|
852
|
-
value: "rgba(0, 0, 0, 0.2)"
|
|
853
|
-
}
|
|
854
|
-
}
|
|
855
|
-
};
|
|
856
|
-
|
|
857
807
|
// src/controls/toggle-control.tsx
|
|
858
|
-
var
|
|
859
|
-
var
|
|
808
|
+
var React19 = __toESM(require("react"));
|
|
809
|
+
var import_editor_props10 = require("@elementor/editor-props");
|
|
860
810
|
|
|
861
811
|
// src/components/control-toggle-button-group.tsx
|
|
862
|
-
var
|
|
863
|
-
var
|
|
864
|
-
var StyledToggleButtonGroup = (0,
|
|
812
|
+
var React18 = __toESM(require("react"));
|
|
813
|
+
var import_ui15 = require("@elementor/ui");
|
|
814
|
+
var StyledToggleButtonGroup = (0, import_ui15.styled)(import_ui15.ToggleButtonGroup)`
|
|
865
815
|
${({ justify }) => `justify-content: ${justify};`}
|
|
866
816
|
`;
|
|
867
817
|
var ControlToggleButtonGroup = ({
|
|
@@ -873,11 +823,11 @@ var ControlToggleButtonGroup = ({
|
|
|
873
823
|
exclusive = false,
|
|
874
824
|
fullWidth = false
|
|
875
825
|
}) => {
|
|
876
|
-
const isRtl = "rtl" === (0,
|
|
826
|
+
const isRtl = "rtl" === (0, import_ui15.useTheme)().direction;
|
|
877
827
|
const handleChange = (_, newValue) => {
|
|
878
828
|
onChange(newValue);
|
|
879
829
|
};
|
|
880
|
-
return /* @__PURE__ */
|
|
830
|
+
return /* @__PURE__ */ React18.createElement(
|
|
881
831
|
StyledToggleButtonGroup,
|
|
882
832
|
{
|
|
883
833
|
justify,
|
|
@@ -889,8 +839,8 @@ var ControlToggleButtonGroup = ({
|
|
|
889
839
|
}
|
|
890
840
|
},
|
|
891
841
|
items.map(
|
|
892
|
-
({ label, value: buttonValue, renderContent: Content, showTooltip }) => showTooltip ? /* @__PURE__ */
|
|
893
|
-
|
|
842
|
+
({ label, value: buttonValue, renderContent: Content, showTooltip }) => showTooltip ? /* @__PURE__ */ React18.createElement(import_ui15.Tooltip, { key: buttonValue, title: label, disableFocusListener: true, placement: "top" }, /* @__PURE__ */ React18.createElement(import_ui15.ToggleButton, { value: buttonValue, "aria-label": label, size, fullWidth }, /* @__PURE__ */ React18.createElement(Content, { size }))) : /* @__PURE__ */ React18.createElement(
|
|
843
|
+
import_ui15.ToggleButton,
|
|
894
844
|
{
|
|
895
845
|
key: buttonValue,
|
|
896
846
|
value: buttonValue,
|
|
@@ -898,7 +848,7 @@ var ControlToggleButtonGroup = ({
|
|
|
898
848
|
size,
|
|
899
849
|
fullWidth
|
|
900
850
|
},
|
|
901
|
-
/* @__PURE__ */
|
|
851
|
+
/* @__PURE__ */ React18.createElement(Content, { size })
|
|
902
852
|
)
|
|
903
853
|
)
|
|
904
854
|
);
|
|
@@ -907,11 +857,11 @@ var ControlToggleButtonGroup = ({
|
|
|
907
857
|
// src/controls/toggle-control.tsx
|
|
908
858
|
var ToggleControl = createControl(
|
|
909
859
|
({ options, fullWidth = false, size = "tiny" }) => {
|
|
910
|
-
const { value, setValue } = useBoundProp(
|
|
860
|
+
const { value, setValue } = useBoundProp(import_editor_props10.stringPropTypeUtil);
|
|
911
861
|
const handleToggle = (option) => {
|
|
912
862
|
setValue(option);
|
|
913
863
|
};
|
|
914
|
-
return /* @__PURE__ */
|
|
864
|
+
return /* @__PURE__ */ React19.createElement(
|
|
915
865
|
ControlToggleButtonGroup,
|
|
916
866
|
{
|
|
917
867
|
items: options,
|
|
@@ -926,9 +876,9 @@ var ToggleControl = createControl(
|
|
|
926
876
|
);
|
|
927
877
|
|
|
928
878
|
// src/controls/number-control.tsx
|
|
929
|
-
var
|
|
930
|
-
var
|
|
931
|
-
var
|
|
879
|
+
var React20 = __toESM(require("react"));
|
|
880
|
+
var import_editor_props11 = require("@elementor/editor-props");
|
|
881
|
+
var import_ui16 = require("@elementor/ui");
|
|
932
882
|
var isEmptyOrNaN = (value) => value === null || value === void 0 || value === "" || Number.isNaN(Number(value));
|
|
933
883
|
var NumberControl = createControl(
|
|
934
884
|
({
|
|
@@ -938,7 +888,7 @@ var NumberControl = createControl(
|
|
|
938
888
|
step = 1,
|
|
939
889
|
shouldForceInt = false
|
|
940
890
|
}) => {
|
|
941
|
-
const { value, setValue } = useBoundProp(
|
|
891
|
+
const { value, setValue } = useBoundProp(import_editor_props11.numberPropTypeUtil);
|
|
942
892
|
const handleChange = (event) => {
|
|
943
893
|
const eventValue = event.target.value;
|
|
944
894
|
if (isEmptyOrNaN(eventValue)) {
|
|
@@ -948,8 +898,8 @@ var NumberControl = createControl(
|
|
|
948
898
|
const formattedValue = shouldForceInt ? +parseInt(eventValue) : Number(eventValue);
|
|
949
899
|
setValue(Math.min(Math.max(formattedValue, min), max));
|
|
950
900
|
};
|
|
951
|
-
return /* @__PURE__ */
|
|
952
|
-
|
|
901
|
+
return /* @__PURE__ */ React20.createElement(ControlActions, null, /* @__PURE__ */ React20.createElement(
|
|
902
|
+
import_ui16.TextField,
|
|
953
903
|
{
|
|
954
904
|
size: "tiny",
|
|
955
905
|
type: "number",
|
|
@@ -964,11 +914,11 @@ var NumberControl = createControl(
|
|
|
964
914
|
);
|
|
965
915
|
|
|
966
916
|
// src/controls/equal-unequal-sizes-control.tsx
|
|
967
|
-
var
|
|
917
|
+
var React21 = __toESM(require("react"));
|
|
968
918
|
var import_react7 = require("react");
|
|
969
|
-
var
|
|
970
|
-
var
|
|
971
|
-
var
|
|
919
|
+
var import_editor_props12 = require("@elementor/editor-props");
|
|
920
|
+
var import_ui17 = require("@elementor/ui");
|
|
921
|
+
var import_i18n6 = require("@wordpress/i18n");
|
|
972
922
|
var isEqualSizes = (values, items) => {
|
|
973
923
|
if (values.length !== items.length) {
|
|
974
924
|
return false;
|
|
@@ -986,11 +936,14 @@ function EqualUnequalSizesControl({
|
|
|
986
936
|
}) {
|
|
987
937
|
const popupId = (0, import_react7.useId)();
|
|
988
938
|
const controlRef = (0, import_react7.useRef)(null);
|
|
989
|
-
const popupState = (0,
|
|
990
|
-
const { value: sizeValue, setValue: setSizeValue } = useBoundProp(
|
|
939
|
+
const popupState = (0, import_ui17.usePopupState)({ variant: "popover", popupId });
|
|
940
|
+
const { value: sizeValue, setValue: setSizeValue } = useBoundProp(import_editor_props12.sizePropTypeUtil);
|
|
991
941
|
const { value: multiSizeValue, setValue: setMultiSizeValue } = useBoundProp(multiSizePropTypeUtil);
|
|
992
942
|
const splitEqualValue = () => {
|
|
993
|
-
|
|
943
|
+
if (!sizeValue) {
|
|
944
|
+
return {};
|
|
945
|
+
}
|
|
946
|
+
return items.reduce((acc, { bind }) => ({ ...acc, [bind]: import_editor_props12.sizePropTypeUtil.create(sizeValue) }), {});
|
|
994
947
|
};
|
|
995
948
|
const setNestedProp = (item, newValue) => {
|
|
996
949
|
const newMappedValues = {
|
|
@@ -1003,27 +956,27 @@ function EqualUnequalSizesControl({
|
|
|
1003
956
|
}
|
|
1004
957
|
setMultiSizeValue(newMappedValues);
|
|
1005
958
|
};
|
|
1006
|
-
return /* @__PURE__ */
|
|
959
|
+
return /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement(import_ui17.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: controlRef }, /* @__PURE__ */ React21.createElement(import_ui17.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React21.createElement(ControlLabel, null, label)), /* @__PURE__ */ React21.createElement(import_ui17.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React21.createElement(
|
|
1007
960
|
EqualSizeControl,
|
|
1008
961
|
{
|
|
1009
962
|
items,
|
|
1010
963
|
value: sizeValue,
|
|
1011
964
|
multiSizeValue,
|
|
1012
965
|
setValue: setSizeValue,
|
|
1013
|
-
iconButton: /* @__PURE__ */
|
|
1014
|
-
|
|
966
|
+
iconButton: /* @__PURE__ */ React21.createElement(
|
|
967
|
+
import_ui17.ToggleButton,
|
|
1015
968
|
{
|
|
1016
969
|
size: "tiny",
|
|
1017
970
|
value: "check",
|
|
1018
971
|
sx: { marginLeft: "auto" },
|
|
1019
|
-
...(0,
|
|
972
|
+
...(0, import_ui17.bindToggle)(popupState),
|
|
1020
973
|
selected: popupState.isOpen
|
|
1021
974
|
},
|
|
1022
975
|
icon
|
|
1023
976
|
)
|
|
1024
977
|
}
|
|
1025
|
-
))), /* @__PURE__ */
|
|
1026
|
-
|
|
978
|
+
))), /* @__PURE__ */ React21.createElement(
|
|
979
|
+
import_ui17.Popover,
|
|
1027
980
|
{
|
|
1028
981
|
disablePortal: true,
|
|
1029
982
|
disableScrollLock: true,
|
|
@@ -1035,12 +988,12 @@ function EqualUnequalSizesControl({
|
|
|
1035
988
|
vertical: "top",
|
|
1036
989
|
horizontal: "right"
|
|
1037
990
|
},
|
|
1038
|
-
...(0,
|
|
991
|
+
...(0, import_ui17.bindPopover)(popupState),
|
|
1039
992
|
slotProps: {
|
|
1040
993
|
paper: { sx: { mt: 0.5, p: 2, pt: 1, width: controlRef.current?.getBoundingClientRect().width } }
|
|
1041
994
|
}
|
|
1042
995
|
},
|
|
1043
|
-
/* @__PURE__ */
|
|
996
|
+
/* @__PURE__ */ React21.createElement(import_ui17.Stack, { gap: 1.5 }, /* @__PURE__ */ React21.createElement(import_ui17.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React21.createElement(
|
|
1044
997
|
MultiSizeValueControl,
|
|
1045
998
|
{
|
|
1046
999
|
item: items[0],
|
|
@@ -1048,7 +1001,7 @@ function EqualUnequalSizesControl({
|
|
|
1048
1001
|
setNestedProp,
|
|
1049
1002
|
splitEqualValue
|
|
1050
1003
|
}
|
|
1051
|
-
), /* @__PURE__ */
|
|
1004
|
+
), /* @__PURE__ */ React21.createElement(
|
|
1052
1005
|
MultiSizeValueControl,
|
|
1053
1006
|
{
|
|
1054
1007
|
item: items[1],
|
|
@@ -1056,7 +1009,7 @@ function EqualUnequalSizesControl({
|
|
|
1056
1009
|
setNestedProp,
|
|
1057
1010
|
splitEqualValue
|
|
1058
1011
|
}
|
|
1059
|
-
)), /* @__PURE__ */
|
|
1012
|
+
)), /* @__PURE__ */ React21.createElement(import_ui17.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React21.createElement(
|
|
1060
1013
|
MultiSizeValueControl,
|
|
1061
1014
|
{
|
|
1062
1015
|
item: items[3],
|
|
@@ -1064,7 +1017,7 @@ function EqualUnequalSizesControl({
|
|
|
1064
1017
|
setNestedProp,
|
|
1065
1018
|
splitEqualValue
|
|
1066
1019
|
}
|
|
1067
|
-
), /* @__PURE__ */
|
|
1020
|
+
), /* @__PURE__ */ React21.createElement(
|
|
1068
1021
|
MultiSizeValueControl,
|
|
1069
1022
|
{
|
|
1070
1023
|
item: items[2],
|
|
@@ -1088,7 +1041,7 @@ var MultiSizeValueControl = ({
|
|
|
1088
1041
|
}
|
|
1089
1042
|
return splitEqualValue()?.[item.bind] ?? null;
|
|
1090
1043
|
};
|
|
1091
|
-
return /* @__PURE__ */
|
|
1044
|
+
return /* @__PURE__ */ React21.createElement(BoundPropProvider, { bind: "", setValue: handleChange, value: getMultiSizeValues() }, /* @__PURE__ */ React21.createElement(import_ui17.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React21.createElement(import_ui17.Grid, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React21.createElement(import_ui17.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React21.createElement(ControlLabel, null, item.label)), /* @__PURE__ */ React21.createElement(import_ui17.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React21.createElement(SizeControl, { startIcon: item.icon })))));
|
|
1092
1045
|
};
|
|
1093
1046
|
var EqualSizeControl = ({
|
|
1094
1047
|
value,
|
|
@@ -1102,24 +1055,24 @@ var EqualSizeControl = ({
|
|
|
1102
1055
|
};
|
|
1103
1056
|
const getDisplayValue = () => {
|
|
1104
1057
|
if (value) {
|
|
1105
|
-
return
|
|
1058
|
+
return import_editor_props12.sizePropTypeUtil.create(value);
|
|
1106
1059
|
}
|
|
1107
1060
|
const multiValues = Object.values(multiSizeValue ?? {});
|
|
1108
1061
|
if (isEqualSizes(multiValues, items)) {
|
|
1109
|
-
return
|
|
1062
|
+
return import_editor_props12.sizePropTypeUtil.create(multiValues[0].value);
|
|
1110
1063
|
}
|
|
1111
1064
|
};
|
|
1112
|
-
return /* @__PURE__ */
|
|
1065
|
+
return /* @__PURE__ */ React21.createElement(BoundPropProvider, { bind: "", setValue: handleChange, value: getDisplayValue() ?? null }, /* @__PURE__ */ React21.createElement(import_ui17.Stack, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ React21.createElement(SizeControl, { placeholder: (0, import_i18n6.__)("MIXED", "elementor") }), iconButton));
|
|
1113
1066
|
};
|
|
1114
1067
|
|
|
1115
1068
|
// src/controls/linked-dimensions-control.tsx
|
|
1116
|
-
var
|
|
1117
|
-
var
|
|
1069
|
+
var React22 = __toESM(require("react"));
|
|
1070
|
+
var import_editor_props13 = require("@elementor/editor-props");
|
|
1118
1071
|
var import_icons3 = require("@elementor/icons");
|
|
1119
|
-
var
|
|
1120
|
-
var
|
|
1072
|
+
var import_ui18 = require("@elementor/ui");
|
|
1073
|
+
var import_i18n7 = require("@wordpress/i18n");
|
|
1121
1074
|
var LinkedDimensionsControl = createControl(({ label }) => {
|
|
1122
|
-
const { value, setValue } = useBoundProp(
|
|
1075
|
+
const { value, setValue } = useBoundProp(import_editor_props13.linkedDimensionsPropTypeUtil);
|
|
1123
1076
|
const { top, right, bottom, left, isLinked = true } = value || {};
|
|
1124
1077
|
const setLinkedValue = (position, newValue) => {
|
|
1125
1078
|
const updatedValue = {
|
|
@@ -1143,72 +1096,72 @@ var LinkedDimensionsControl = createControl(({ label }) => {
|
|
|
1143
1096
|
setValue(updatedValue);
|
|
1144
1097
|
};
|
|
1145
1098
|
const LinkedIcon = isLinked ? import_icons3.LinkIcon : import_icons3.DetachIcon;
|
|
1146
|
-
return /* @__PURE__ */
|
|
1147
|
-
|
|
1099
|
+
return /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement(import_ui18.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React22.createElement(ControlLabel, null, label), /* @__PURE__ */ React22.createElement(
|
|
1100
|
+
import_ui18.ToggleButton,
|
|
1148
1101
|
{
|
|
1149
|
-
"aria-label": (0,
|
|
1102
|
+
"aria-label": (0, import_i18n7.__)("Link Inputs", "elementor"),
|
|
1150
1103
|
size: "tiny",
|
|
1151
1104
|
value: "check",
|
|
1152
1105
|
selected: isLinked,
|
|
1153
1106
|
sx: { marginLeft: "auto" },
|
|
1154
1107
|
onChange: toggleLinked
|
|
1155
1108
|
},
|
|
1156
|
-
/* @__PURE__ */
|
|
1157
|
-
)), /* @__PURE__ */
|
|
1158
|
-
|
|
1109
|
+
/* @__PURE__ */ React22.createElement(LinkedIcon, { fontSize: "tiny" })
|
|
1110
|
+
)), /* @__PURE__ */ React22.createElement(import_ui18.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React22.createElement(import_ui18.Grid, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React22.createElement(import_ui18.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React22.createElement(ControlLabel, null, (0, import_i18n7.__)("Top", "elementor"))), /* @__PURE__ */ React22.createElement(import_ui18.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React22.createElement(
|
|
1111
|
+
Control3,
|
|
1159
1112
|
{
|
|
1160
1113
|
bind: "top",
|
|
1161
1114
|
value: top,
|
|
1162
1115
|
setValue: setLinkedValue,
|
|
1163
|
-
startIcon: /* @__PURE__ */
|
|
1116
|
+
startIcon: /* @__PURE__ */ React22.createElement(import_icons3.SideTopIcon, { fontSize: "tiny" })
|
|
1164
1117
|
}
|
|
1165
|
-
))), /* @__PURE__ */
|
|
1166
|
-
|
|
1118
|
+
))), /* @__PURE__ */ React22.createElement(import_ui18.Grid, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React22.createElement(import_ui18.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React22.createElement(ControlLabel, null, (0, import_i18n7.__)("Right", "elementor"))), /* @__PURE__ */ React22.createElement(import_ui18.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React22.createElement(
|
|
1119
|
+
Control3,
|
|
1167
1120
|
{
|
|
1168
1121
|
bind: "right",
|
|
1169
1122
|
value: right,
|
|
1170
1123
|
setValue: setLinkedValue,
|
|
1171
|
-
startIcon: /* @__PURE__ */
|
|
1124
|
+
startIcon: /* @__PURE__ */ React22.createElement(import_icons3.SideRightIcon, { fontSize: "tiny" })
|
|
1172
1125
|
}
|
|
1173
|
-
)))), /* @__PURE__ */
|
|
1174
|
-
|
|
1126
|
+
)))), /* @__PURE__ */ React22.createElement(import_ui18.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React22.createElement(import_ui18.Grid, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React22.createElement(import_ui18.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React22.createElement(ControlLabel, null, (0, import_i18n7.__)("Bottom", "elementor"))), /* @__PURE__ */ React22.createElement(import_ui18.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React22.createElement(
|
|
1127
|
+
Control3,
|
|
1175
1128
|
{
|
|
1176
1129
|
bind: "bottom",
|
|
1177
1130
|
value: bottom,
|
|
1178
1131
|
setValue: setLinkedValue,
|
|
1179
|
-
startIcon: /* @__PURE__ */
|
|
1132
|
+
startIcon: /* @__PURE__ */ React22.createElement(import_icons3.SideBottomIcon, { fontSize: "tiny" })
|
|
1180
1133
|
}
|
|
1181
|
-
))), /* @__PURE__ */
|
|
1182
|
-
|
|
1134
|
+
))), /* @__PURE__ */ React22.createElement(import_ui18.Grid, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React22.createElement(import_ui18.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React22.createElement(ControlLabel, null, (0, import_i18n7.__)("Left", "elementor"))), /* @__PURE__ */ React22.createElement(import_ui18.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React22.createElement(
|
|
1135
|
+
Control3,
|
|
1183
1136
|
{
|
|
1184
1137
|
bind: "left",
|
|
1185
1138
|
value: left,
|
|
1186
1139
|
setValue: setLinkedValue,
|
|
1187
|
-
startIcon: /* @__PURE__ */
|
|
1140
|
+
startIcon: /* @__PURE__ */ React22.createElement(import_icons3.SideLeftIcon, { fontSize: "tiny" })
|
|
1188
1141
|
}
|
|
1189
1142
|
)))));
|
|
1190
1143
|
});
|
|
1191
|
-
var
|
|
1144
|
+
var Control3 = ({
|
|
1192
1145
|
bind,
|
|
1193
1146
|
startIcon,
|
|
1194
1147
|
value,
|
|
1195
1148
|
setValue
|
|
1196
|
-
}) => /* @__PURE__ */
|
|
1149
|
+
}) => /* @__PURE__ */ React22.createElement(BoundPropProvider, { setValue: (newValue) => setValue(bind, newValue), value, bind }, /* @__PURE__ */ React22.createElement(SizeControl, { startIcon }));
|
|
1197
1150
|
|
|
1198
1151
|
// src/controls/font-family-control.tsx
|
|
1199
1152
|
var import_react8 = require("react");
|
|
1200
|
-
var
|
|
1201
|
-
var
|
|
1153
|
+
var React23 = __toESM(require("react"));
|
|
1154
|
+
var import_editor_props14 = require("@elementor/editor-props");
|
|
1202
1155
|
var import_icons4 = require("@elementor/icons");
|
|
1203
|
-
var
|
|
1204
|
-
var
|
|
1156
|
+
var import_ui19 = require("@elementor/ui");
|
|
1157
|
+
var import_i18n9 = require("@wordpress/i18n");
|
|
1205
1158
|
|
|
1206
1159
|
// src/hooks/use-filtered-font-families.ts
|
|
1207
|
-
var
|
|
1160
|
+
var import_i18n8 = require("@wordpress/i18n");
|
|
1208
1161
|
var supportedCategories = {
|
|
1209
|
-
system: (0,
|
|
1210
|
-
googlefonts: (0,
|
|
1211
|
-
customfonts: (0,
|
|
1162
|
+
system: (0, import_i18n8.__)("System", "elementor"),
|
|
1163
|
+
googlefonts: (0, import_i18n8.__)("Google Fonts", "elementor"),
|
|
1164
|
+
customfonts: (0, import_i18n8.__)("Custom Fonts", "elementor")
|
|
1212
1165
|
};
|
|
1213
1166
|
var useFilteredFontFamilies = (fontFamilies, searchValue) => {
|
|
1214
1167
|
const filteredFontFamilies = Object.entries(fontFamilies).reduce(
|
|
@@ -1237,9 +1190,9 @@ var useFilteredFontFamilies = (fontFamilies, searchValue) => {
|
|
|
1237
1190
|
var SIZE2 = "tiny";
|
|
1238
1191
|
var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
1239
1192
|
const [searchValue, setSearchValue] = (0, import_react8.useState)("");
|
|
1240
|
-
const { value: fontFamily, setValue: setFontFamily } = useBoundProp(
|
|
1193
|
+
const { value: fontFamily, setValue: setFontFamily } = useBoundProp(import_editor_props14.stringPropTypeUtil);
|
|
1241
1194
|
const popupId = (0, import_react8.useId)();
|
|
1242
|
-
const popoverState = (0,
|
|
1195
|
+
const popoverState = (0, import_ui19.usePopupState)({ variant: "popover", popupId });
|
|
1243
1196
|
const filteredFontFamilies = useFilteredFontFamilies(fontFamilies, searchValue);
|
|
1244
1197
|
if (!filteredFontFamilies) {
|
|
1245
1198
|
return null;
|
|
@@ -1251,40 +1204,40 @@ var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
|
1251
1204
|
setSearchValue("");
|
|
1252
1205
|
popoverState.close();
|
|
1253
1206
|
};
|
|
1254
|
-
return /* @__PURE__ */
|
|
1255
|
-
|
|
1207
|
+
return /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement(
|
|
1208
|
+
import_ui19.UnstableTag,
|
|
1256
1209
|
{
|
|
1257
1210
|
variant: "outlined",
|
|
1258
1211
|
label: fontFamily,
|
|
1259
|
-
endIcon: /* @__PURE__ */
|
|
1260
|
-
...(0,
|
|
1212
|
+
endIcon: /* @__PURE__ */ React23.createElement(import_icons4.ChevronDownIcon, { fontSize: "tiny" }),
|
|
1213
|
+
...(0, import_ui19.bindTrigger)(popoverState),
|
|
1261
1214
|
fullWidth: true
|
|
1262
1215
|
}
|
|
1263
|
-
), /* @__PURE__ */
|
|
1264
|
-
|
|
1216
|
+
), /* @__PURE__ */ React23.createElement(
|
|
1217
|
+
import_ui19.Popover,
|
|
1265
1218
|
{
|
|
1266
1219
|
disablePortal: true,
|
|
1267
1220
|
disableScrollLock: true,
|
|
1268
1221
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
1269
|
-
...(0,
|
|
1222
|
+
...(0, import_ui19.bindPopover)(popoverState),
|
|
1270
1223
|
onClose: handleClose
|
|
1271
1224
|
},
|
|
1272
|
-
/* @__PURE__ */
|
|
1273
|
-
|
|
1225
|
+
/* @__PURE__ */ React23.createElement(import_ui19.Stack, null, /* @__PURE__ */ React23.createElement(import_ui19.Stack, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React23.createElement(import_icons4.EditIcon, { fontSize: SIZE2, sx: { mr: 0.5 } }), /* @__PURE__ */ React23.createElement(import_ui19.Typography, { variant: "subtitle2" }, (0, import_i18n9.__)("Font Family", "elementor")), /* @__PURE__ */ React23.createElement(import_ui19.IconButton, { size: SIZE2, sx: { ml: "auto" }, onClick: handleClose }, /* @__PURE__ */ React23.createElement(import_icons4.XIcon, { fontSize: SIZE2 }))), /* @__PURE__ */ React23.createElement(import_ui19.Box, { px: 1.5, pb: 1 }, /* @__PURE__ */ React23.createElement(
|
|
1226
|
+
import_ui19.TextField,
|
|
1274
1227
|
{
|
|
1275
1228
|
fullWidth: true,
|
|
1276
1229
|
size: SIZE2,
|
|
1277
1230
|
value: searchValue,
|
|
1278
|
-
placeholder: (0,
|
|
1231
|
+
placeholder: (0, import_i18n9.__)("Search", "elementor"),
|
|
1279
1232
|
onChange: handleSearch,
|
|
1280
1233
|
InputProps: {
|
|
1281
|
-
startAdornment: /* @__PURE__ */
|
|
1234
|
+
startAdornment: /* @__PURE__ */ React23.createElement(import_ui19.InputAdornment, { position: "start" }, /* @__PURE__ */ React23.createElement(import_icons4.SearchIcon, { fontSize: SIZE2 }))
|
|
1282
1235
|
}
|
|
1283
1236
|
}
|
|
1284
|
-
)), /* @__PURE__ */
|
|
1237
|
+
)), /* @__PURE__ */ React23.createElement(import_ui19.Divider, null), /* @__PURE__ */ React23.createElement(import_ui19.Box, { sx: { overflowY: "auto", height: 260, width: 220 } }, filteredFontFamilies.length > 0 ? /* @__PURE__ */ React23.createElement(import_ui19.MenuList, { role: "listbox", tabIndex: 0 }, filteredFontFamilies.map(([category, items], index) => /* @__PURE__ */ React23.createElement(import_react8.Fragment, { key: index }, /* @__PURE__ */ React23.createElement(import_ui19.ListSubheader, { sx: { typography: "caption", color: "text.tertiary" } }, category), items.map((item) => {
|
|
1285
1238
|
const isSelected = item === fontFamily;
|
|
1286
|
-
return /* @__PURE__ */
|
|
1287
|
-
|
|
1239
|
+
return /* @__PURE__ */ React23.createElement(
|
|
1240
|
+
import_ui19.MenuItem,
|
|
1288
1241
|
{
|
|
1289
1242
|
key: item,
|
|
1290
1243
|
selected: isSelected,
|
|
@@ -1298,30 +1251,30 @@ var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
|
1298
1251
|
},
|
|
1299
1252
|
item
|
|
1300
1253
|
);
|
|
1301
|
-
})))) : /* @__PURE__ */
|
|
1302
|
-
|
|
1254
|
+
})))) : /* @__PURE__ */ React23.createElement(import_ui19.Stack, { alignItems: "center", p: 2.5, gap: 1.5 }, /* @__PURE__ */ React23.createElement(import_icons4.PhotoIcon, { fontSize: "large" }), /* @__PURE__ */ React23.createElement(import_ui19.Typography, { align: "center", variant: "caption", color: "text.secondary" }, (0, import_i18n9.__)("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React23.createElement("br", null), "\u201C", searchValue, "\u201D."), /* @__PURE__ */ React23.createElement(import_ui19.Typography, { align: "center", variant: "caption", color: "text.secondary" }, /* @__PURE__ */ React23.createElement(
|
|
1255
|
+
import_ui19.Link,
|
|
1303
1256
|
{
|
|
1304
1257
|
color: "secondary",
|
|
1305
1258
|
variant: "caption",
|
|
1306
1259
|
component: "button",
|
|
1307
1260
|
onClick: () => setSearchValue("")
|
|
1308
1261
|
},
|
|
1309
|
-
(0,
|
|
1310
|
-
), "\xA0", (0,
|
|
1262
|
+
(0, import_i18n9.__)("Clear the filters", "elementor")
|
|
1263
|
+
), "\xA0", (0, import_i18n9.__)("and try again.", "elementor")))))
|
|
1311
1264
|
));
|
|
1312
1265
|
});
|
|
1313
1266
|
|
|
1314
1267
|
// src/controls/url-control.tsx
|
|
1315
|
-
var
|
|
1316
|
-
var
|
|
1268
|
+
var React24 = __toESM(require("react"));
|
|
1269
|
+
var import_ui20 = require("@elementor/ui");
|
|
1317
1270
|
var UrlControl = createControl(({ placeholder }) => {
|
|
1318
1271
|
const { value, setValue } = useBoundProp();
|
|
1319
1272
|
const handleChange = (event) => setValue({
|
|
1320
1273
|
$$type: "url",
|
|
1321
1274
|
value: event.target.value
|
|
1322
1275
|
});
|
|
1323
|
-
return /* @__PURE__ */
|
|
1324
|
-
|
|
1276
|
+
return /* @__PURE__ */ React24.createElement(ControlActions, null, /* @__PURE__ */ React24.createElement(
|
|
1277
|
+
import_ui20.TextField,
|
|
1325
1278
|
{
|
|
1326
1279
|
size: "tiny",
|
|
1327
1280
|
fullWidth: true,
|
|
@@ -1333,10 +1286,10 @@ var UrlControl = createControl(({ placeholder }) => {
|
|
|
1333
1286
|
});
|
|
1334
1287
|
|
|
1335
1288
|
// src/controls/link-control.tsx
|
|
1336
|
-
var
|
|
1289
|
+
var React25 = __toESM(require("react"));
|
|
1337
1290
|
var import_icons5 = require("@elementor/icons");
|
|
1338
|
-
var
|
|
1339
|
-
var
|
|
1291
|
+
var import_ui21 = require("@elementor/ui");
|
|
1292
|
+
var import_i18n10 = require("@wordpress/i18n");
|
|
1340
1293
|
var SIZE3 = "tiny";
|
|
1341
1294
|
var DEFAULT_LINK_CONTROL_VALUE = {
|
|
1342
1295
|
$$type: "link",
|
|
@@ -1361,8 +1314,8 @@ var LinkControl = createControl(() => {
|
|
|
1361
1314
|
}
|
|
1362
1315
|
});
|
|
1363
1316
|
};
|
|
1364
|
-
return /* @__PURE__ */
|
|
1365
|
-
|
|
1317
|
+
return /* @__PURE__ */ React25.createElement(import_ui21.Stack, { gap: 1.5 }, /* @__PURE__ */ React25.createElement(import_ui21.Divider, null), /* @__PURE__ */ React25.createElement(
|
|
1318
|
+
import_ui21.Stack,
|
|
1366
1319
|
{
|
|
1367
1320
|
direction: "row",
|
|
1368
1321
|
sx: {
|
|
@@ -1370,17 +1323,17 @@ var LinkControl = createControl(() => {
|
|
|
1370
1323
|
alignItems: "center"
|
|
1371
1324
|
}
|
|
1372
1325
|
},
|
|
1373
|
-
/* @__PURE__ */
|
|
1374
|
-
/* @__PURE__ */
|
|
1375
|
-
), /* @__PURE__ */
|
|
1326
|
+
/* @__PURE__ */ React25.createElement(ControlLabel, null, (0, import_i18n10.__)("Link", "elementor")),
|
|
1327
|
+
/* @__PURE__ */ React25.createElement(import_ui21.IconButton, { size: SIZE3, onClick: () => handleOnChange("enabled", !enabled) }, enabled ? /* @__PURE__ */ React25.createElement(import_icons5.MinusIcon, { fontSize: SIZE3 }) : /* @__PURE__ */ React25.createElement(import_icons5.PlusIcon, { fontSize: SIZE3 }))
|
|
1328
|
+
), /* @__PURE__ */ React25.createElement(import_ui21.Collapse, { in: enabled, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React25.createElement(import_ui21.Stack, { gap: 1.5 }, /* @__PURE__ */ React25.createElement(
|
|
1376
1329
|
BoundPropProvider,
|
|
1377
1330
|
{
|
|
1378
1331
|
value: href,
|
|
1379
1332
|
setValue: (newHref) => handleOnChange("href", newHref),
|
|
1380
1333
|
bind: "href"
|
|
1381
1334
|
},
|
|
1382
|
-
/* @__PURE__ */
|
|
1383
|
-
), /* @__PURE__ */
|
|
1335
|
+
/* @__PURE__ */ React25.createElement(UrlControl, { placeholder: (0, import_i18n10.__)("Paste URL or type", "elementor") })
|
|
1336
|
+
), /* @__PURE__ */ React25.createElement(
|
|
1384
1337
|
SwitchControl,
|
|
1385
1338
|
{
|
|
1386
1339
|
value: isTargetBlank,
|
|
@@ -1389,17 +1342,17 @@ var LinkControl = createControl(() => {
|
|
|
1389
1342
|
))));
|
|
1390
1343
|
});
|
|
1391
1344
|
var SwitchControl = ({ value, onSwitch }) => {
|
|
1392
|
-
return /* @__PURE__ */
|
|
1345
|
+
return /* @__PURE__ */ React25.createElement(import_ui21.Grid, { container: true, alignItems: "center", flexWrap: "nowrap", justifyContent: "space-between" }, /* @__PURE__ */ React25.createElement(import_ui21.Grid, { item: true }, /* @__PURE__ */ React25.createElement(ControlLabel, null, (0, import_i18n10.__)("Open in new tab", "elementor"))), /* @__PURE__ */ React25.createElement(import_ui21.Grid, { item: true }, /* @__PURE__ */ React25.createElement(import_ui21.Switch, { checked: value, onChange: onSwitch })));
|
|
1393
1346
|
};
|
|
1394
1347
|
|
|
1395
1348
|
// src/controls/gap-control.tsx
|
|
1396
|
-
var
|
|
1397
|
-
var
|
|
1349
|
+
var React26 = __toESM(require("react"));
|
|
1350
|
+
var import_editor_props15 = require("@elementor/editor-props");
|
|
1398
1351
|
var import_icons6 = require("@elementor/icons");
|
|
1399
|
-
var
|
|
1400
|
-
var
|
|
1352
|
+
var import_ui22 = require("@elementor/ui");
|
|
1353
|
+
var import_i18n11 = require("@wordpress/i18n");
|
|
1401
1354
|
var GapControl = createControl(({ label }) => {
|
|
1402
|
-
const { value, setValue } = useBoundProp(
|
|
1355
|
+
const { value, setValue } = useBoundProp(import_editor_props15.gapPropTypeUtil);
|
|
1403
1356
|
const { column, row, isLinked = true } = value || {};
|
|
1404
1357
|
const setLinkedValue = (gap, newValue) => {
|
|
1405
1358
|
const updatedValue = {
|
|
@@ -1419,38 +1372,125 @@ var GapControl = createControl(({ label }) => {
|
|
|
1419
1372
|
setValue(updatedValue);
|
|
1420
1373
|
};
|
|
1421
1374
|
const LinkedIcon = isLinked ? import_icons6.LinkIcon : import_icons6.DetachIcon;
|
|
1422
|
-
return /* @__PURE__ */
|
|
1423
|
-
|
|
1375
|
+
return /* @__PURE__ */ React26.createElement(React26.Fragment, null, /* @__PURE__ */ React26.createElement(import_ui22.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React26.createElement(ControlLabel, null, label), /* @__PURE__ */ React26.createElement(
|
|
1376
|
+
import_ui22.ToggleButton,
|
|
1424
1377
|
{
|
|
1425
|
-
"aria-label": (0,
|
|
1378
|
+
"aria-label": (0, import_i18n11.__)("Link Inputs", "elementor"),
|
|
1426
1379
|
size: "tiny",
|
|
1427
1380
|
value: "check",
|
|
1428
1381
|
selected: isLinked,
|
|
1429
1382
|
sx: { marginLeft: "auto" },
|
|
1430
1383
|
onChange: toggleLinked
|
|
1431
1384
|
},
|
|
1432
|
-
/* @__PURE__ */
|
|
1433
|
-
)), /* @__PURE__ */
|
|
1385
|
+
/* @__PURE__ */ React26.createElement(LinkedIcon, { fontSize: "tiny" })
|
|
1386
|
+
)), /* @__PURE__ */ React26.createElement(import_ui22.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React26.createElement(import_ui22.Grid, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React26.createElement(import_ui22.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React26.createElement(ControlLabel, null, (0, import_i18n11.__)("Column", "elementor"))), /* @__PURE__ */ React26.createElement(import_ui22.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React26.createElement(
|
|
1434
1387
|
BoundPropProvider,
|
|
1435
1388
|
{
|
|
1436
1389
|
setValue: (newValue) => setLinkedValue("column", newValue),
|
|
1437
1390
|
value: column,
|
|
1438
1391
|
bind: "column"
|
|
1439
1392
|
},
|
|
1440
|
-
/* @__PURE__ */
|
|
1441
|
-
))), /* @__PURE__ */
|
|
1393
|
+
/* @__PURE__ */ React26.createElement(SizeControl, null)
|
|
1394
|
+
))), /* @__PURE__ */ React26.createElement(import_ui22.Grid, { container: true, gap: 1, alignItems: "center" }, /* @__PURE__ */ React26.createElement(import_ui22.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React26.createElement(ControlLabel, null, (0, import_i18n11.__)("Row", "elementor"))), /* @__PURE__ */ React26.createElement(import_ui22.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React26.createElement(
|
|
1442
1395
|
BoundPropProvider,
|
|
1443
1396
|
{
|
|
1444
1397
|
setValue: (newValue) => setLinkedValue("row", newValue),
|
|
1445
1398
|
value: row,
|
|
1446
1399
|
bind: "row"
|
|
1447
1400
|
},
|
|
1448
|
-
/* @__PURE__ */
|
|
1401
|
+
/* @__PURE__ */ React26.createElement(SizeControl, null)
|
|
1449
1402
|
)))));
|
|
1450
1403
|
});
|
|
1404
|
+
|
|
1405
|
+
// src/controls/background-control/background-control.tsx
|
|
1406
|
+
var React28 = __toESM(require("react"));
|
|
1407
|
+
var import_editor_props17 = require("@elementor/editor-props");
|
|
1408
|
+
var import_ui24 = require("@elementor/ui");
|
|
1409
|
+
var import_i18n13 = require("@wordpress/i18n");
|
|
1410
|
+
|
|
1411
|
+
// src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx
|
|
1412
|
+
var React27 = __toESM(require("react"));
|
|
1413
|
+
var import_editor_props16 = require("@elementor/editor-props");
|
|
1414
|
+
var import_ui23 = require("@elementor/ui");
|
|
1415
|
+
var import_i18n12 = require("@wordpress/i18n");
|
|
1416
|
+
var initialBackgroundOverlay = {
|
|
1417
|
+
$$type: "background-color-overlay",
|
|
1418
|
+
value: "rgba(0, 0, 0, 0.2)"
|
|
1419
|
+
};
|
|
1420
|
+
var BackgroundOverlayRepeaterControl = createControl(() => {
|
|
1421
|
+
const { value: overlayValues, setValue } = useBoundProp(import_editor_props16.backgroundOverlayPropTypeUtil);
|
|
1422
|
+
const setColorOverlay = (newValue) => {
|
|
1423
|
+
setValue(newValue);
|
|
1424
|
+
};
|
|
1425
|
+
return /* @__PURE__ */ React27.createElement(
|
|
1426
|
+
Repeater,
|
|
1427
|
+
{
|
|
1428
|
+
values: overlayValues ?? [],
|
|
1429
|
+
setValues: setColorOverlay,
|
|
1430
|
+
label: (0, import_i18n12.__)("Overlay", "elementor"),
|
|
1431
|
+
itemSettings: {
|
|
1432
|
+
Icon: ItemIcon2,
|
|
1433
|
+
Label: ItemLabel2,
|
|
1434
|
+
Content: ItemContent2,
|
|
1435
|
+
initialValues: initialBackgroundOverlay
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1438
|
+
);
|
|
1439
|
+
});
|
|
1440
|
+
var ItemIcon2 = ({ value }) => /* @__PURE__ */ React27.createElement(import_ui23.UnstableColorIndicator, { size: "inherit", component: "span", value: value.value });
|
|
1441
|
+
var ItemContent2 = ({
|
|
1442
|
+
value,
|
|
1443
|
+
setValue
|
|
1444
|
+
}) => {
|
|
1445
|
+
const setBackgroundColorOverlay = (newValue) => {
|
|
1446
|
+
setValue({
|
|
1447
|
+
$$type: "background-color-overlay",
|
|
1448
|
+
value: newValue.value
|
|
1449
|
+
});
|
|
1450
|
+
};
|
|
1451
|
+
return /* @__PURE__ */ React27.createElement(import_ui23.Stack, { gap: 1.5 }, /* @__PURE__ */ React27.createElement(
|
|
1452
|
+
BoundPropProvider,
|
|
1453
|
+
{
|
|
1454
|
+
bind: "background-color-overlay",
|
|
1455
|
+
value,
|
|
1456
|
+
setValue: setBackgroundColorOverlay
|
|
1457
|
+
},
|
|
1458
|
+
/* @__PURE__ */ React27.createElement(import_ui23.Grid, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React27.createElement(import_ui23.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React27.createElement(ControlLabel, null, (0, import_i18n12.__)("Color", "elementor"))), /* @__PURE__ */ React27.createElement(import_ui23.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React27.createElement(ColorControl, null)))
|
|
1459
|
+
));
|
|
1460
|
+
};
|
|
1461
|
+
var ItemLabel2 = ({ value }) => {
|
|
1462
|
+
const color = value.value;
|
|
1463
|
+
return /* @__PURE__ */ React27.createElement("span", null, color);
|
|
1464
|
+
};
|
|
1465
|
+
|
|
1466
|
+
// src/controls/background-control/background-control.tsx
|
|
1467
|
+
var BackgroundControl = createControl(() => {
|
|
1468
|
+
const { value, setValue } = useBoundProp(import_editor_props17.backgroundPropTypeUtil);
|
|
1469
|
+
const setColor = (newValue) => {
|
|
1470
|
+
setValue({
|
|
1471
|
+
...value,
|
|
1472
|
+
color: newValue
|
|
1473
|
+
});
|
|
1474
|
+
};
|
|
1475
|
+
const setBackgroundColorOverlay = (newValue) => {
|
|
1476
|
+
setValue({
|
|
1477
|
+
...value,
|
|
1478
|
+
"background-overlay": newValue
|
|
1479
|
+
});
|
|
1480
|
+
};
|
|
1481
|
+
return /* @__PURE__ */ React28.createElement(import_ui24.Stack, { gap: 1.5 }, /* @__PURE__ */ React28.createElement(
|
|
1482
|
+
BoundPropProvider,
|
|
1483
|
+
{
|
|
1484
|
+
bind: "background-overlay",
|
|
1485
|
+
value: value?.["background-overlay"],
|
|
1486
|
+
setValue: setBackgroundColorOverlay
|
|
1487
|
+
},
|
|
1488
|
+
/* @__PURE__ */ React28.createElement(BackgroundOverlayRepeaterControl, null)
|
|
1489
|
+
), /* @__PURE__ */ React28.createElement(BoundPropProvider, { bind: "color", value: value?.color, setValue: setColor }, /* @__PURE__ */ React28.createElement(import_ui24.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React28.createElement(import_ui24.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React28.createElement(ControlLabel, null, (0, import_i18n13.__)("Color", "elementor"))), /* @__PURE__ */ React28.createElement(import_ui24.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React28.createElement(ColorControl, null)))));
|
|
1490
|
+
});
|
|
1451
1491
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1452
1492
|
0 && (module.exports = {
|
|
1453
|
-
|
|
1493
|
+
BackgroundControl,
|
|
1454
1494
|
BoundPropProvider,
|
|
1455
1495
|
BoxShadowRepeaterControl,
|
|
1456
1496
|
ColorControl,
|