@elementor/editor-controls 0.20.0 → 0.21.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 +12 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +294 -260
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +225 -191
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/components/control-form-label.tsx +6 -0
- package/src/components/control-label.tsx +12 -3
- package/src/components/repeater.tsx +9 -2
- package/src/controls/background-control/background-control.tsx +2 -2
- package/src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-attachment.tsx +2 -2
- package/src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx +2 -2
- package/src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-repeat.tsx +2 -2
- package/src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-size.tsx +2 -2
- package/src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx +18 -4
- package/src/controls/color-control.tsx +1 -1
- package/src/controls/equal-unequal-sizes-control.tsx +2 -1
- package/src/controls/gap-control.tsx +3 -2
- package/src/controls/image-control.tsx +3 -3
- package/src/controls/link-control.tsx +4 -4
- package/src/controls/linked-dimensions-control.tsx +7 -6
- package/src/controls/stroke-control.tsx +2 -2
- package/src/controls/svg-media-control.tsx +2 -2
- package/src/index.ts +2 -1
- package/src/control-adornments/control-label-with-adornments.tsx +0 -15
package/dist/index.mjs
CHANGED
|
@@ -153,10 +153,10 @@ var resolveUnionPropType = (propType, key) => {
|
|
|
153
153
|
return resolvedPropType;
|
|
154
154
|
};
|
|
155
155
|
|
|
156
|
-
// src/components/control-label.tsx
|
|
156
|
+
// src/components/control-form-label.tsx
|
|
157
157
|
import * as React3 from "react";
|
|
158
158
|
import { FormLabel } from "@elementor/ui";
|
|
159
|
-
var
|
|
159
|
+
var ControlFormLabel = ({ children }) => {
|
|
160
160
|
return /* @__PURE__ */ React3.createElement(FormLabel, { size: "tiny" }, children);
|
|
161
161
|
};
|
|
162
162
|
|
|
@@ -363,7 +363,7 @@ var ImageControl = createControl(
|
|
|
363
363
|
const propContext = useBoundProp(imagePropTypeUtil);
|
|
364
364
|
const { data: allowSvgUpload } = useUnfilteredFilesUpload();
|
|
365
365
|
const mediaTypes = allowSvgUpload ? ["image", "svg"] : ["image"];
|
|
366
|
-
return /* @__PURE__ */ React10.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React10.createElement(Stack2, { gap: 1.5 }, /* @__PURE__ */ React10.createElement(PropKeyProvider, { bind: "src" }, /* @__PURE__ */ React10.createElement(
|
|
366
|
+
return /* @__PURE__ */ React10.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React10.createElement(Stack2, { gap: 1.5 }, /* @__PURE__ */ React10.createElement(PropKeyProvider, { bind: "src" }, /* @__PURE__ */ React10.createElement(ControlFormLabel, null, " ", __2("Image", "elementor"), " "), /* @__PURE__ */ React10.createElement(ImageMediaControl, { mediaTypes })), /* @__PURE__ */ React10.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React10.createElement(Grid, { container: true, gap: 1.5, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React10.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React10.createElement(ControlFormLabel, null, " ", resolutionLabel, " ")), /* @__PURE__ */ React10.createElement(Grid, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React10.createElement(SelectControl, { options: sizes }))))));
|
|
367
367
|
}
|
|
368
368
|
);
|
|
369
369
|
|
|
@@ -607,7 +607,7 @@ import { UnstableColorField } from "@elementor/ui";
|
|
|
607
607
|
var ColorControl = createControl(({ propTypeUtil = colorPropTypeUtil, ...props }) => {
|
|
608
608
|
const { value, setValue } = useBoundProp(propTypeUtil);
|
|
609
609
|
const handleChange = (selectedColor) => {
|
|
610
|
-
setValue(selectedColor);
|
|
610
|
+
setValue(selectedColor || null);
|
|
611
611
|
};
|
|
612
612
|
return /* @__PURE__ */ React16.createElement(ControlActions, null, /* @__PURE__ */ React16.createElement(UnstableColorField, { size: "tiny", ...props, value: value ?? "", onChange: handleChange, fullWidth: true }));
|
|
613
613
|
});
|
|
@@ -618,10 +618,10 @@ var StrokeControl = createControl(() => {
|
|
|
618
618
|
const propContext = useBoundProp(strokePropTypeUtil);
|
|
619
619
|
return /* @__PURE__ */ React17.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React17.createElement(SectionContent, null, /* @__PURE__ */ React17.createElement(Control, { bind: "width", label: __3("Stroke width", "elementor") }, /* @__PURE__ */ React17.createElement(SizeControl, { units })), /* @__PURE__ */ React17.createElement(Control, { bind: "color", label: __3("Stroke color", "elementor") }, /* @__PURE__ */ React17.createElement(ColorControl, null))));
|
|
620
620
|
});
|
|
621
|
-
var Control = ({ bind, label, children }) => /* @__PURE__ */ React17.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React17.createElement(Grid2, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React17.createElement(Grid2, { item: true, xs: 6 }, /* @__PURE__ */ React17.createElement(
|
|
621
|
+
var Control = ({ bind, label, children }) => /* @__PURE__ */ React17.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React17.createElement(Grid2, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React17.createElement(Grid2, { item: true, xs: 6 }, /* @__PURE__ */ React17.createElement(ControlFormLabel, null, label)), /* @__PURE__ */ React17.createElement(Grid2, { item: true, xs: 6 }, children)));
|
|
622
622
|
|
|
623
623
|
// src/controls/box-shadow-repeater-control.tsx
|
|
624
|
-
import * as
|
|
624
|
+
import * as React24 from "react";
|
|
625
625
|
import { boxShadowPropTypeUtil, shadowPropTypeUtil } from "@elementor/editor-props";
|
|
626
626
|
import { FormLabel as FormLabel2, Grid as Grid4, UnstableColorIndicator } from "@elementor/ui";
|
|
627
627
|
import { __ as __5 } from "@wordpress/i18n";
|
|
@@ -642,7 +642,7 @@ var PopoverGridContainer = ({
|
|
|
642
642
|
}) => /* @__PURE__ */ React19.createElement(Grid3, { container: true, gap, alignItems, flexWrap }, children);
|
|
643
643
|
|
|
644
644
|
// src/components/repeater.tsx
|
|
645
|
-
import * as
|
|
645
|
+
import * as React23 from "react";
|
|
646
646
|
import { useEffect as useEffect2, useState as useState2 } from "react";
|
|
647
647
|
import { CopyIcon, EyeIcon, EyeOffIcon, PlusIcon, XIcon } from "@elementor/icons";
|
|
648
648
|
import {
|
|
@@ -659,8 +659,30 @@ import {
|
|
|
659
659
|
} from "@elementor/ui";
|
|
660
660
|
import { __ as __4 } from "@wordpress/i18n";
|
|
661
661
|
|
|
662
|
-
// src/
|
|
662
|
+
// src/control-adornments/control-adornments.tsx
|
|
663
|
+
import * as React21 from "react";
|
|
664
|
+
|
|
665
|
+
// src/control-adornments/control-adornments-context.tsx
|
|
663
666
|
import * as React20 from "react";
|
|
667
|
+
import { createContext as createContext5, useContext as useContext5 } from "react";
|
|
668
|
+
var Context2 = createContext5(null);
|
|
669
|
+
var ControlAdornmentsProvider = ({ children, items }) => /* @__PURE__ */ React20.createElement(Context2.Provider, { value: { items } }, children);
|
|
670
|
+
var useControlAdornments = () => {
|
|
671
|
+
const context = useContext5(Context2);
|
|
672
|
+
return context?.items ?? [];
|
|
673
|
+
};
|
|
674
|
+
|
|
675
|
+
// src/control-adornments/control-adornments.tsx
|
|
676
|
+
function ControlAdornments() {
|
|
677
|
+
const items = useControlAdornments();
|
|
678
|
+
if (items?.length === 0) {
|
|
679
|
+
return null;
|
|
680
|
+
}
|
|
681
|
+
return /* @__PURE__ */ React21.createElement(React21.Fragment, null, items.map(({ Adornment, id }) => /* @__PURE__ */ React21.createElement(Adornment, { key: id })));
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
// src/components/sortable.tsx
|
|
685
|
+
import * as React22 from "react";
|
|
664
686
|
import { GripVerticalIcon } from "@elementor/icons";
|
|
665
687
|
import {
|
|
666
688
|
Divider,
|
|
@@ -671,10 +693,10 @@ import {
|
|
|
671
693
|
UnstableSortableProvider
|
|
672
694
|
} from "@elementor/ui";
|
|
673
695
|
var SortableProvider = (props) => {
|
|
674
|
-
return /* @__PURE__ */
|
|
696
|
+
return /* @__PURE__ */ React22.createElement(List, { sx: { p: 0, my: -0.5, mx: 0 } }, /* @__PURE__ */ React22.createElement(UnstableSortableProvider, { restrictAxis: true, disableDragOverlay: false, variant: "static", ...props }));
|
|
675
697
|
};
|
|
676
698
|
var SortableItem = ({ id, children }) => {
|
|
677
|
-
return /* @__PURE__ */
|
|
699
|
+
return /* @__PURE__ */ React22.createElement(
|
|
678
700
|
UnstableSortableItem,
|
|
679
701
|
{
|
|
680
702
|
id,
|
|
@@ -687,16 +709,16 @@ var SortableItem = ({ id, children }) => {
|
|
|
687
709
|
showDropIndication,
|
|
688
710
|
dropIndicationStyle
|
|
689
711
|
}) => {
|
|
690
|
-
return /* @__PURE__ */
|
|
712
|
+
return /* @__PURE__ */ React22.createElement(
|
|
691
713
|
StyledListItem,
|
|
692
714
|
{
|
|
693
715
|
...itemProps,
|
|
694
716
|
style: itemStyle,
|
|
695
717
|
sx: { backgroundColor: isDragOverlay ? "background.paper" : void 0 }
|
|
696
718
|
},
|
|
697
|
-
/* @__PURE__ */
|
|
719
|
+
/* @__PURE__ */ React22.createElement(SortableTrigger, { ...triggerProps, style: triggerStyle }),
|
|
698
720
|
children,
|
|
699
|
-
showDropIndication && /* @__PURE__ */
|
|
721
|
+
showDropIndication && /* @__PURE__ */ React22.createElement(StyledDivider, { style: dropIndicationStyle })
|
|
700
722
|
);
|
|
701
723
|
}
|
|
702
724
|
}
|
|
@@ -726,7 +748,7 @@ var StyledListItem = styled2(ListItem)`
|
|
|
726
748
|
}
|
|
727
749
|
}
|
|
728
750
|
`;
|
|
729
|
-
var SortableTrigger = (props) => /* @__PURE__ */
|
|
751
|
+
var SortableTrigger = (props) => /* @__PURE__ */ React22.createElement("div", { ...props, role: "button", className: "class-item-sortable-trigger" }, /* @__PURE__ */ React22.createElement(GripVerticalIcon, { fontSize: "tiny" }));
|
|
730
752
|
var StyledDivider = styled2(Divider)`
|
|
731
753
|
height: 0px;
|
|
732
754
|
border: none;
|
|
@@ -818,24 +840,33 @@ var Repeater = ({
|
|
|
818
840
|
});
|
|
819
841
|
});
|
|
820
842
|
};
|
|
821
|
-
return /* @__PURE__ */
|
|
843
|
+
return /* @__PURE__ */ React23.createElement(SectionContent, null, /* @__PURE__ */ React23.createElement(Stack5, { direction: "row", justifyContent: "start", alignItems: "center", gap: 1 }, /* @__PURE__ */ React23.createElement(Typography, { component: "label", variant: "caption", color: "text.secondary" }, label), /* @__PURE__ */ React23.createElement(ControlAdornments, null), /* @__PURE__ */ React23.createElement(
|
|
844
|
+
IconButton,
|
|
845
|
+
{
|
|
846
|
+
sx: { ml: "auto" },
|
|
847
|
+
size: SIZE,
|
|
848
|
+
onClick: addRepeaterItem,
|
|
849
|
+
"aria-label": __4("Add item", "elementor")
|
|
850
|
+
},
|
|
851
|
+
/* @__PURE__ */ React23.createElement(PlusIcon, { fontSize: SIZE })
|
|
852
|
+
)), 0 < uniqueKeys.length && /* @__PURE__ */ React23.createElement(SortableProvider, { value: uniqueKeys, onChange: onChangeOrder }, uniqueKeys.map((key, index) => {
|
|
822
853
|
const value = items[index];
|
|
823
854
|
if (!value) {
|
|
824
855
|
return null;
|
|
825
856
|
}
|
|
826
|
-
return /* @__PURE__ */
|
|
857
|
+
return /* @__PURE__ */ React23.createElement(SortableItem, { id: key, key: `sortable-${key}` }, /* @__PURE__ */ React23.createElement(
|
|
827
858
|
RepeaterItem,
|
|
828
859
|
{
|
|
829
860
|
bind: String(index),
|
|
830
861
|
disabled: value?.disabled,
|
|
831
|
-
label: /* @__PURE__ */
|
|
832
|
-
startIcon: /* @__PURE__ */
|
|
862
|
+
label: /* @__PURE__ */ React23.createElement(itemSettings.Label, { value }),
|
|
863
|
+
startIcon: /* @__PURE__ */ React23.createElement(itemSettings.Icon, { value }),
|
|
833
864
|
removeItem: () => removeRepeaterItem(index),
|
|
834
865
|
duplicateItem: () => duplicateRepeaterItem(index),
|
|
835
866
|
toggleDisableItem: () => toggleDisableRepeaterItem(index),
|
|
836
867
|
openOnMount: openOnAdd && openItem === key
|
|
837
868
|
},
|
|
838
|
-
(props) => /* @__PURE__ */
|
|
869
|
+
(props) => /* @__PURE__ */ React23.createElement(itemSettings.Content, { ...props, value, bind: String(index) })
|
|
839
870
|
));
|
|
840
871
|
})));
|
|
841
872
|
};
|
|
@@ -854,7 +885,7 @@ var RepeaterItem = ({
|
|
|
854
885
|
const duplicateLabel = __4("Duplicate", "elementor");
|
|
855
886
|
const toggleLabel = disabled ? __4("Show", "elementor") : __4("Hide", "elementor");
|
|
856
887
|
const removeLabel = __4("Remove", "elementor");
|
|
857
|
-
return /* @__PURE__ */
|
|
888
|
+
return /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement(
|
|
858
889
|
UnstableTag,
|
|
859
890
|
{
|
|
860
891
|
label,
|
|
@@ -865,10 +896,10 @@ var RepeaterItem = ({
|
|
|
865
896
|
"aria-label": __4("Open item", "elementor"),
|
|
866
897
|
...bindTrigger2(popoverState),
|
|
867
898
|
startIcon,
|
|
868
|
-
actions: /* @__PURE__ */
|
|
899
|
+
actions: /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement(Tooltip, { title: duplicateLabel, placement: "top" }, /* @__PURE__ */ React23.createElement(IconButton, { size: SIZE, onClick: duplicateItem, "aria-label": duplicateLabel }, /* @__PURE__ */ React23.createElement(CopyIcon, { fontSize: SIZE }))), /* @__PURE__ */ React23.createElement(Tooltip, { title: toggleLabel, placement: "top" }, /* @__PURE__ */ React23.createElement(IconButton, { size: SIZE, onClick: toggleDisableItem, "aria-label": toggleLabel }, disabled ? /* @__PURE__ */ React23.createElement(EyeOffIcon, { fontSize: SIZE }) : /* @__PURE__ */ React23.createElement(EyeIcon, { fontSize: SIZE }))), /* @__PURE__ */ React23.createElement(Tooltip, { title: removeLabel, placement: "top" }, /* @__PURE__ */ React23.createElement(IconButton, { size: SIZE, onClick: removeItem, "aria-label": removeLabel }, /* @__PURE__ */ React23.createElement(XIcon, { fontSize: SIZE })))),
|
|
869
900
|
sx: { backgroundColor: "background.paper" }
|
|
870
901
|
}
|
|
871
|
-
), /* @__PURE__ */
|
|
902
|
+
), /* @__PURE__ */ React23.createElement(
|
|
872
903
|
Popover,
|
|
873
904
|
{
|
|
874
905
|
disablePortal: true,
|
|
@@ -882,7 +913,7 @@ var RepeaterItem = ({
|
|
|
882
913
|
...popoverProps,
|
|
883
914
|
anchorEl: ref
|
|
884
915
|
},
|
|
885
|
-
/* @__PURE__ */
|
|
916
|
+
/* @__PURE__ */ React23.createElement(Box, null, children({ anchorEl }))
|
|
886
917
|
));
|
|
887
918
|
};
|
|
888
919
|
var usePopover = (openOnMount) => {
|
|
@@ -905,7 +936,7 @@ var usePopover = (openOnMount) => {
|
|
|
905
936
|
// src/controls/box-shadow-repeater-control.tsx
|
|
906
937
|
var BoxShadowRepeaterControl = createControl(() => {
|
|
907
938
|
const { propType, value, setValue } = useBoundProp(boxShadowPropTypeUtil);
|
|
908
|
-
return /* @__PURE__ */
|
|
939
|
+
return /* @__PURE__ */ React24.createElement(PropProvider, { propType, value, setValue }, /* @__PURE__ */ React24.createElement(
|
|
909
940
|
Repeater,
|
|
910
941
|
{
|
|
911
942
|
openOnAdd: true,
|
|
@@ -921,13 +952,13 @@ var BoxShadowRepeaterControl = createControl(() => {
|
|
|
921
952
|
}
|
|
922
953
|
));
|
|
923
954
|
});
|
|
924
|
-
var ItemIcon = ({ value }) => /* @__PURE__ */
|
|
955
|
+
var ItemIcon = ({ value }) => /* @__PURE__ */ React24.createElement(UnstableColorIndicator, { size: "inherit", component: "span", value: value.value.color.value });
|
|
925
956
|
var ItemContent = ({ anchorEl, bind }) => {
|
|
926
|
-
return /* @__PURE__ */
|
|
957
|
+
return /* @__PURE__ */ React24.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React24.createElement(Content, { anchorEl }));
|
|
927
958
|
};
|
|
928
959
|
var Content = ({ anchorEl }) => {
|
|
929
960
|
const { propType, value, setValue } = useBoundProp(shadowPropTypeUtil);
|
|
930
|
-
return /* @__PURE__ */
|
|
961
|
+
return /* @__PURE__ */ React24.createElement(PropProvider, { propType, value, setValue }, /* @__PURE__ */ React24.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React24.createElement(PopoverGridContainer, null, /* @__PURE__ */ React24.createElement(Control2, { bind: "color", label: __5("Color", "elementor") }, /* @__PURE__ */ React24.createElement(
|
|
931
962
|
ColorControl,
|
|
932
963
|
{
|
|
933
964
|
slotProps: {
|
|
@@ -944,7 +975,7 @@ var Content = ({ anchorEl }) => {
|
|
|
944
975
|
}
|
|
945
976
|
}
|
|
946
977
|
}
|
|
947
|
-
)), /* @__PURE__ */
|
|
978
|
+
)), /* @__PURE__ */ React24.createElement(Control2, { bind: "position", label: __5("Position", "elementor"), sx: { overflow: "hidden" } }, /* @__PURE__ */ React24.createElement(
|
|
948
979
|
SelectControl,
|
|
949
980
|
{
|
|
950
981
|
options: [
|
|
@@ -952,14 +983,14 @@ var Content = ({ anchorEl }) => {
|
|
|
952
983
|
{ label: __5("Outset", "elementor"), value: null }
|
|
953
984
|
]
|
|
954
985
|
}
|
|
955
|
-
))), /* @__PURE__ */
|
|
986
|
+
))), /* @__PURE__ */ React24.createElement(PopoverGridContainer, null, /* @__PURE__ */ React24.createElement(Control2, { bind: "hOffset", label: __5("Horizontal", "elementor") }, /* @__PURE__ */ React24.createElement(SizeControl, null)), /* @__PURE__ */ React24.createElement(Control2, { bind: "vOffset", label: __5("Vertical", "elementor") }, /* @__PURE__ */ React24.createElement(SizeControl, null))), /* @__PURE__ */ React24.createElement(PopoverGridContainer, null, /* @__PURE__ */ React24.createElement(Control2, { bind: "blur", label: __5("Blur", "elementor") }, /* @__PURE__ */ React24.createElement(SizeControl, null)), /* @__PURE__ */ React24.createElement(Control2, { bind: "spread", label: __5("Spread", "elementor") }, /* @__PURE__ */ React24.createElement(SizeControl, null)))));
|
|
956
987
|
};
|
|
957
988
|
var Control2 = ({
|
|
958
989
|
label,
|
|
959
990
|
bind,
|
|
960
991
|
children,
|
|
961
992
|
sx
|
|
962
|
-
}) => /* @__PURE__ */
|
|
993
|
+
}) => /* @__PURE__ */ React24.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React24.createElement(Grid4, { item: true, xs: 6, sx }, /* @__PURE__ */ React24.createElement(Grid4, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React24.createElement(Grid4, { item: true, xs: 12 }, /* @__PURE__ */ React24.createElement(FormLabel2, { size: "tiny" }, label)), /* @__PURE__ */ React24.createElement(Grid4, { item: true, xs: 12 }, children))));
|
|
963
994
|
var ItemLabel = ({ value }) => {
|
|
964
995
|
const { position, hOffset, vOffset, blur, spread } = value.value;
|
|
965
996
|
const { size: blurSize = "", unit: blurUnit = "" } = blur?.value || {};
|
|
@@ -973,7 +1004,7 @@ var ItemLabel = ({ value }) => {
|
|
|
973
1004
|
blurSize + blurUnit,
|
|
974
1005
|
spreadSize + spreadUnit
|
|
975
1006
|
].join(" ");
|
|
976
|
-
return /* @__PURE__ */
|
|
1007
|
+
return /* @__PURE__ */ React24.createElement("span", { style: { textTransform: "capitalize" } }, positionLabel, ": ", sizes);
|
|
977
1008
|
};
|
|
978
1009
|
var initialShadow = {
|
|
979
1010
|
$$type: "shadow",
|
|
@@ -1003,11 +1034,11 @@ var initialShadow = {
|
|
|
1003
1034
|
};
|
|
1004
1035
|
|
|
1005
1036
|
// src/controls/toggle-control.tsx
|
|
1006
|
-
import * as
|
|
1037
|
+
import * as React26 from "react";
|
|
1007
1038
|
import { stringPropTypeUtil as stringPropTypeUtil5 } from "@elementor/editor-props";
|
|
1008
1039
|
|
|
1009
1040
|
// src/components/control-toggle-button-group.tsx
|
|
1010
|
-
import * as
|
|
1041
|
+
import * as React25 from "react";
|
|
1011
1042
|
import {
|
|
1012
1043
|
styled as styled3,
|
|
1013
1044
|
ToggleButton,
|
|
@@ -1031,7 +1062,7 @@ var ControlToggleButtonGroup = ({
|
|
|
1031
1062
|
const handleChange = (_, newValue) => {
|
|
1032
1063
|
onChange(newValue);
|
|
1033
1064
|
};
|
|
1034
|
-
return /* @__PURE__ */
|
|
1065
|
+
return /* @__PURE__ */ React25.createElement(
|
|
1035
1066
|
StyledToggleButtonGroup,
|
|
1036
1067
|
{
|
|
1037
1068
|
justify,
|
|
@@ -1046,7 +1077,7 @@ var ControlToggleButtonGroup = ({
|
|
|
1046
1077
|
}
|
|
1047
1078
|
},
|
|
1048
1079
|
items.map(
|
|
1049
|
-
({ label, value: buttonValue, renderContent: Content3, showTooltip }) => showTooltip ? /* @__PURE__ */
|
|
1080
|
+
({ label, value: buttonValue, renderContent: Content3, showTooltip }) => showTooltip ? /* @__PURE__ */ React25.createElement(Tooltip2, { key: buttonValue, title: label, disableFocusListener: true, placement: "top" }, /* @__PURE__ */ React25.createElement(ToggleButton, { value: buttonValue, "aria-label": label, size, fullWidth }, /* @__PURE__ */ React25.createElement(Content3, { size }))) : /* @__PURE__ */ React25.createElement(
|
|
1050
1081
|
ToggleButton,
|
|
1051
1082
|
{
|
|
1052
1083
|
key: buttonValue,
|
|
@@ -1055,7 +1086,7 @@ var ControlToggleButtonGroup = ({
|
|
|
1055
1086
|
size,
|
|
1056
1087
|
fullWidth
|
|
1057
1088
|
},
|
|
1058
|
-
/* @__PURE__ */
|
|
1089
|
+
/* @__PURE__ */ React25.createElement(Content3, { size })
|
|
1059
1090
|
)
|
|
1060
1091
|
)
|
|
1061
1092
|
);
|
|
@@ -1082,7 +1113,7 @@ var ToggleControl = createControl(
|
|
|
1082
1113
|
fullWidth,
|
|
1083
1114
|
size
|
|
1084
1115
|
};
|
|
1085
|
-
return exclusive ? /* @__PURE__ */
|
|
1116
|
+
return exclusive ? /* @__PURE__ */ React26.createElement(
|
|
1086
1117
|
ControlToggleButtonGroup,
|
|
1087
1118
|
{
|
|
1088
1119
|
...toggleButtonGroupProps,
|
|
@@ -1090,7 +1121,7 @@ var ToggleControl = createControl(
|
|
|
1090
1121
|
onChange: setValue,
|
|
1091
1122
|
exclusive: true
|
|
1092
1123
|
}
|
|
1093
|
-
) : /* @__PURE__ */
|
|
1124
|
+
) : /* @__PURE__ */ React26.createElement(
|
|
1094
1125
|
ControlToggleButtonGroup,
|
|
1095
1126
|
{
|
|
1096
1127
|
...toggleButtonGroupProps,
|
|
@@ -1103,7 +1134,7 @@ var ToggleControl = createControl(
|
|
|
1103
1134
|
);
|
|
1104
1135
|
|
|
1105
1136
|
// src/controls/number-control.tsx
|
|
1106
|
-
import * as
|
|
1137
|
+
import * as React27 from "react";
|
|
1107
1138
|
import { numberPropTypeUtil } from "@elementor/editor-props";
|
|
1108
1139
|
import { TextField as TextField4 } from "@elementor/ui";
|
|
1109
1140
|
var isEmptyOrNaN = (value) => value === null || value === void 0 || value === "" || Number.isNaN(Number(value));
|
|
@@ -1125,7 +1156,7 @@ var NumberControl = createControl(
|
|
|
1125
1156
|
const formattedValue = shouldForceInt ? +parseInt(eventValue) : Number(eventValue);
|
|
1126
1157
|
setValue(Math.min(Math.max(formattedValue, min), max));
|
|
1127
1158
|
};
|
|
1128
|
-
return /* @__PURE__ */
|
|
1159
|
+
return /* @__PURE__ */ React27.createElement(ControlActions, null, /* @__PURE__ */ React27.createElement(
|
|
1129
1160
|
TextField4,
|
|
1130
1161
|
{
|
|
1131
1162
|
size: "tiny",
|
|
@@ -1141,11 +1172,20 @@ var NumberControl = createControl(
|
|
|
1141
1172
|
);
|
|
1142
1173
|
|
|
1143
1174
|
// src/controls/equal-unequal-sizes-control.tsx
|
|
1144
|
-
import * as
|
|
1175
|
+
import * as React29 from "react";
|
|
1145
1176
|
import { useId as useId2, useRef } from "react";
|
|
1146
1177
|
import { sizePropTypeUtil as sizePropTypeUtil2 } from "@elementor/editor-props";
|
|
1147
|
-
import { bindPopover as bindPopover2, bindToggle, Grid as Grid5, Popover as Popover2, Stack as
|
|
1178
|
+
import { bindPopover as bindPopover2, bindToggle, Grid as Grid5, Popover as Popover2, Stack as Stack7, ToggleButton as ToggleButton2, Tooltip as Tooltip3, usePopupState as usePopupState3 } from "@elementor/ui";
|
|
1148
1179
|
import { __ as __6 } from "@wordpress/i18n";
|
|
1180
|
+
|
|
1181
|
+
// src/components/control-label.tsx
|
|
1182
|
+
import * as React28 from "react";
|
|
1183
|
+
import { Stack as Stack6 } from "@elementor/ui";
|
|
1184
|
+
var ControlLabel = ({ children }) => {
|
|
1185
|
+
return /* @__PURE__ */ React28.createElement(Stack6, { direction: "row", alignItems: "center", justifyItems: "start", gap: 1 }, /* @__PURE__ */ React28.createElement(ControlFormLabel, null, children), /* @__PURE__ */ React28.createElement(ControlAdornments, null));
|
|
1186
|
+
};
|
|
1187
|
+
|
|
1188
|
+
// src/controls/equal-unequal-sizes-control.tsx
|
|
1149
1189
|
var isEqualSizes = (propValue, items) => {
|
|
1150
1190
|
const values = Object.values(propValue);
|
|
1151
1191
|
if (values.length !== items.length) {
|
|
@@ -1199,7 +1239,7 @@ function EqualUnequalSizesControl({
|
|
|
1199
1239
|
return splitEqualValue() ?? null;
|
|
1200
1240
|
};
|
|
1201
1241
|
const isMixed = !!multiSizeValue;
|
|
1202
|
-
return /* @__PURE__ */
|
|
1242
|
+
return /* @__PURE__ */ React29.createElement(React29.Fragment, null, /* @__PURE__ */ React29.createElement(Grid5, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap", ref: controlRef }, /* @__PURE__ */ React29.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React29.createElement(ControlLabel, null, label)), /* @__PURE__ */ React29.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React29.createElement(Stack7, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ React29.createElement(SizeControl, { placeholder: isMixed ? __6("Mixed", "elementor") : void 0 }), /* @__PURE__ */ React29.createElement(Tooltip3, { title: tooltipLabel, placement: "top" }, /* @__PURE__ */ React29.createElement(
|
|
1203
1243
|
ToggleButton2,
|
|
1204
1244
|
{
|
|
1205
1245
|
size: "tiny",
|
|
@@ -1210,7 +1250,7 @@ function EqualUnequalSizesControl({
|
|
|
1210
1250
|
"aria-label": tooltipLabel
|
|
1211
1251
|
},
|
|
1212
1252
|
icon
|
|
1213
|
-
))))), /* @__PURE__ */
|
|
1253
|
+
))))), /* @__PURE__ */ React29.createElement(
|
|
1214
1254
|
Popover2,
|
|
1215
1255
|
{
|
|
1216
1256
|
disablePortal: true,
|
|
@@ -1229,16 +1269,16 @@ function EqualUnequalSizesControl({
|
|
|
1229
1269
|
paper: { sx: { mt: 0.5, width: controlRef.current?.getBoundingClientRect().width } }
|
|
1230
1270
|
}
|
|
1231
1271
|
},
|
|
1232
|
-
/* @__PURE__ */
|
|
1272
|
+
/* @__PURE__ */ React29.createElement(PropProvider, { propType: multiSizePropType, value: getMultiSizeValues(), setValue: setNestedProp }, /* @__PURE__ */ React29.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React29.createElement(PopoverGridContainer, null, /* @__PURE__ */ React29.createElement(MultiSizeValueControl, { item: items[0] }), /* @__PURE__ */ React29.createElement(MultiSizeValueControl, { item: items[1] })), /* @__PURE__ */ React29.createElement(PopoverGridContainer, null, /* @__PURE__ */ React29.createElement(MultiSizeValueControl, { item: items[2] }), /* @__PURE__ */ React29.createElement(MultiSizeValueControl, { item: items[3] }))))
|
|
1233
1273
|
));
|
|
1234
1274
|
}
|
|
1235
|
-
var MultiSizeValueControl = ({ item }) => /* @__PURE__ */
|
|
1275
|
+
var MultiSizeValueControl = ({ item }) => /* @__PURE__ */ React29.createElement(PropKeyProvider, { bind: item.bind }, /* @__PURE__ */ React29.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React29.createElement(Grid5, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React29.createElement(Grid5, { item: true, xs: 12 }, /* @__PURE__ */ React29.createElement(ControlFormLabel, null, item.label)), /* @__PURE__ */ React29.createElement(Grid5, { item: true, xs: 12 }, /* @__PURE__ */ React29.createElement(SizeControl, { startIcon: item.icon })))));
|
|
1236
1276
|
|
|
1237
1277
|
// src/controls/linked-dimensions-control.tsx
|
|
1238
|
-
import * as
|
|
1278
|
+
import * as React30 from "react";
|
|
1239
1279
|
import { dimensionsPropTypeUtil, sizePropTypeUtil as sizePropTypeUtil3 } from "@elementor/editor-props";
|
|
1240
1280
|
import { DetachIcon, LinkIcon, SideBottomIcon, SideLeftIcon, SideRightIcon, SideTopIcon } from "@elementor/icons";
|
|
1241
|
-
import { Grid as Grid6, Stack as
|
|
1281
|
+
import { Grid as Grid6, Stack as Stack8, ToggleButton as ToggleButton3, Tooltip as Tooltip4 } from "@elementor/ui";
|
|
1242
1282
|
import { __ as __7 } from "@wordpress/i18n";
|
|
1243
1283
|
var LinkedDimensionsControl = createControl(
|
|
1244
1284
|
({
|
|
@@ -1270,7 +1310,7 @@ var LinkedDimensionsControl = createControl(
|
|
|
1270
1310
|
const LinkedIcon = isLinked ? LinkIcon : DetachIcon;
|
|
1271
1311
|
const linkedLabel = __7("Link %s", "elementor").replace("%s", tooltipLabel);
|
|
1272
1312
|
const unlinkedLabel = __7("Unlink %s", "elementor").replace("%s", tooltipLabel);
|
|
1273
|
-
return /* @__PURE__ */
|
|
1313
|
+
return /* @__PURE__ */ React30.createElement(PropProvider, { propType, value: dimensionsValue, setValue: setDimensionsValue }, /* @__PURE__ */ React30.createElement(Stack8, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React30.createElement(ControlLabel, null, label), /* @__PURE__ */ React30.createElement(Tooltip4, { title: isLinked ? unlinkedLabel : linkedLabel, placement: "top" }, /* @__PURE__ */ React30.createElement(
|
|
1274
1314
|
ToggleButton3,
|
|
1275
1315
|
{
|
|
1276
1316
|
"aria-label": isLinked ? unlinkedLabel : linkedLabel,
|
|
@@ -1280,36 +1320,36 @@ var LinkedDimensionsControl = createControl(
|
|
|
1280
1320
|
sx: { marginLeft: "auto" },
|
|
1281
1321
|
onChange: onLinkToggle
|
|
1282
1322
|
},
|
|
1283
|
-
/* @__PURE__ */
|
|
1284
|
-
))), /* @__PURE__ */
|
|
1323
|
+
/* @__PURE__ */ React30.createElement(LinkedIcon, { fontSize: "tiny" })
|
|
1324
|
+
))), /* @__PURE__ */ React30.createElement(Stack8, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React30.createElement(Grid6, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React30.createElement(Grid6, { item: true, xs: 12 }, /* @__PURE__ */ React30.createElement(ControlFormLabel, null, __7("Top", "elementor"))), /* @__PURE__ */ React30.createElement(Grid6, { item: true, xs: 12 }, /* @__PURE__ */ React30.createElement(
|
|
1285
1325
|
Control3,
|
|
1286
1326
|
{
|
|
1287
1327
|
bind: "block-start",
|
|
1288
|
-
startIcon: /* @__PURE__ */
|
|
1328
|
+
startIcon: /* @__PURE__ */ React30.createElement(SideTopIcon, { fontSize: "tiny" }),
|
|
1289
1329
|
isLinked,
|
|
1290
1330
|
extendedValues
|
|
1291
1331
|
}
|
|
1292
|
-
))), /* @__PURE__ */
|
|
1332
|
+
))), /* @__PURE__ */ React30.createElement(Grid6, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React30.createElement(Grid6, { item: true, xs: 12 }, /* @__PURE__ */ React30.createElement(ControlFormLabel, null, isSiteRtl ? __7("Left", "elementor") : __7("Right", "elementor"))), /* @__PURE__ */ React30.createElement(Grid6, { item: true, xs: 12 }, /* @__PURE__ */ React30.createElement(
|
|
1293
1333
|
Control3,
|
|
1294
1334
|
{
|
|
1295
1335
|
bind: "inline-end",
|
|
1296
|
-
startIcon: isSiteRtl ? /* @__PURE__ */
|
|
1336
|
+
startIcon: isSiteRtl ? /* @__PURE__ */ React30.createElement(SideLeftIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React30.createElement(SideRightIcon, { fontSize: "tiny" }),
|
|
1297
1337
|
isLinked,
|
|
1298
1338
|
extendedValues
|
|
1299
1339
|
}
|
|
1300
|
-
)))), /* @__PURE__ */
|
|
1340
|
+
)))), /* @__PURE__ */ React30.createElement(Stack8, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React30.createElement(Grid6, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React30.createElement(Grid6, { item: true, xs: 12 }, /* @__PURE__ */ React30.createElement(ControlFormLabel, null, __7("Bottom", "elementor"))), /* @__PURE__ */ React30.createElement(Grid6, { item: true, xs: 12 }, /* @__PURE__ */ React30.createElement(
|
|
1301
1341
|
Control3,
|
|
1302
1342
|
{
|
|
1303
1343
|
bind: "block-end",
|
|
1304
|
-
startIcon: /* @__PURE__ */
|
|
1344
|
+
startIcon: /* @__PURE__ */ React30.createElement(SideBottomIcon, { fontSize: "tiny" }),
|
|
1305
1345
|
isLinked,
|
|
1306
1346
|
extendedValues
|
|
1307
1347
|
}
|
|
1308
|
-
))), /* @__PURE__ */
|
|
1348
|
+
))), /* @__PURE__ */ React30.createElement(Grid6, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React30.createElement(Grid6, { item: true, xs: 12 }, /* @__PURE__ */ React30.createElement(ControlFormLabel, null, isSiteRtl ? __7("Right", "elementor") : __7("Left", "elementor"))), /* @__PURE__ */ React30.createElement(Grid6, { item: true, xs: 12 }, /* @__PURE__ */ React30.createElement(
|
|
1309
1349
|
Control3,
|
|
1310
1350
|
{
|
|
1311
1351
|
bind: "inline-start",
|
|
1312
|
-
startIcon: isSiteRtl ? /* @__PURE__ */
|
|
1352
|
+
startIcon: isSiteRtl ? /* @__PURE__ */ React30.createElement(SideRightIcon, { fontSize: "tiny" }) : /* @__PURE__ */ React30.createElement(SideLeftIcon, { fontSize: "tiny" }),
|
|
1313
1353
|
isLinked,
|
|
1314
1354
|
extendedValues
|
|
1315
1355
|
}
|
|
@@ -1323,13 +1363,13 @@ var Control3 = ({
|
|
|
1323
1363
|
extendedValues
|
|
1324
1364
|
}) => {
|
|
1325
1365
|
if (isLinked) {
|
|
1326
|
-
return /* @__PURE__ */
|
|
1366
|
+
return /* @__PURE__ */ React30.createElement(SizeControl, { startIcon, extendedValues });
|
|
1327
1367
|
}
|
|
1328
|
-
return /* @__PURE__ */
|
|
1368
|
+
return /* @__PURE__ */ React30.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React30.createElement(SizeControl, { startIcon, extendedValues }));
|
|
1329
1369
|
};
|
|
1330
1370
|
|
|
1331
1371
|
// src/controls/font-family-control/font-family-control.tsx
|
|
1332
|
-
import * as
|
|
1372
|
+
import * as React31 from "react";
|
|
1333
1373
|
import { useEffect as useEffect3, useRef as useRef2, useState as useState3 } from "react";
|
|
1334
1374
|
import { stringPropTypeUtil as stringPropTypeUtil6 } from "@elementor/editor-props";
|
|
1335
1375
|
import { ChevronDownIcon, SearchIcon, TextIcon, XIcon as XIcon2 } from "@elementor/icons";
|
|
@@ -1344,7 +1384,7 @@ import {
|
|
|
1344
1384
|
MenuList,
|
|
1345
1385
|
MenuSubheader,
|
|
1346
1386
|
Popover as Popover3,
|
|
1347
|
-
Stack as
|
|
1387
|
+
Stack as Stack9,
|
|
1348
1388
|
styled as styled4,
|
|
1349
1389
|
TextField as TextField5,
|
|
1350
1390
|
Typography as Typography2,
|
|
@@ -1391,16 +1431,16 @@ var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
|
1391
1431
|
setSearchValue("");
|
|
1392
1432
|
popoverState.close();
|
|
1393
1433
|
};
|
|
1394
|
-
return /* @__PURE__ */
|
|
1434
|
+
return /* @__PURE__ */ React31.createElement(React31.Fragment, null, /* @__PURE__ */ React31.createElement(
|
|
1395
1435
|
UnstableTag2,
|
|
1396
1436
|
{
|
|
1397
1437
|
variant: "outlined",
|
|
1398
1438
|
label: fontFamily,
|
|
1399
|
-
endIcon: /* @__PURE__ */
|
|
1439
|
+
endIcon: /* @__PURE__ */ React31.createElement(ChevronDownIcon, { fontSize: "tiny" }),
|
|
1400
1440
|
...bindTrigger3(popoverState),
|
|
1401
1441
|
fullWidth: true
|
|
1402
1442
|
}
|
|
1403
|
-
), /* @__PURE__ */
|
|
1443
|
+
), /* @__PURE__ */ React31.createElement(
|
|
1404
1444
|
Popover3,
|
|
1405
1445
|
{
|
|
1406
1446
|
disablePortal: true,
|
|
@@ -1409,7 +1449,7 @@ var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
|
1409
1449
|
...bindPopover3(popoverState),
|
|
1410
1450
|
onClose: handleClose
|
|
1411
1451
|
},
|
|
1412
|
-
/* @__PURE__ */
|
|
1452
|
+
/* @__PURE__ */ React31.createElement(Stack9, null, /* @__PURE__ */ React31.createElement(Stack9, { direction: "row", alignItems: "center", pl: 1.5, pr: 0.5, py: 1.5 }, /* @__PURE__ */ React31.createElement(TextIcon, { fontSize: SIZE2, sx: { mr: 0.5 } }), /* @__PURE__ */ React31.createElement(Typography2, { variant: "subtitle2" }, __8("Font Family", "elementor")), /* @__PURE__ */ React31.createElement(IconButton2, { size: SIZE2, sx: { ml: "auto" }, onClick: handleClose }, /* @__PURE__ */ React31.createElement(XIcon2, { fontSize: SIZE2 }))), /* @__PURE__ */ React31.createElement(Box2, { px: 1.5, pb: 1 }, /* @__PURE__ */ React31.createElement(
|
|
1413
1453
|
TextField5,
|
|
1414
1454
|
{
|
|
1415
1455
|
fullWidth: true,
|
|
@@ -1418,10 +1458,10 @@ var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
|
1418
1458
|
placeholder: __8("Search", "elementor"),
|
|
1419
1459
|
onChange: handleSearch,
|
|
1420
1460
|
InputProps: {
|
|
1421
|
-
startAdornment: /* @__PURE__ */
|
|
1461
|
+
startAdornment: /* @__PURE__ */ React31.createElement(InputAdornment3, { position: "start" }, /* @__PURE__ */ React31.createElement(SearchIcon, { fontSize: SIZE2 }))
|
|
1422
1462
|
}
|
|
1423
1463
|
}
|
|
1424
|
-
)), /* @__PURE__ */
|
|
1464
|
+
)), /* @__PURE__ */ React31.createElement(Divider2, null), filteredFontFamilies.length > 0 ? /* @__PURE__ */ React31.createElement(
|
|
1425
1465
|
FontList,
|
|
1426
1466
|
{
|
|
1427
1467
|
fontListItems: filteredFontFamilies,
|
|
@@ -1429,7 +1469,7 @@ var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
|
1429
1469
|
handleClose,
|
|
1430
1470
|
fontFamily
|
|
1431
1471
|
}
|
|
1432
|
-
) : /* @__PURE__ */
|
|
1472
|
+
) : /* @__PURE__ */ React31.createElement(Box2, { sx: { overflowY: "auto", height: 260, width: 220 } }, /* @__PURE__ */ React31.createElement(Stack9, { alignItems: "center", p: 2.5, gap: 1.5, overflow: "hidden" }, /* @__PURE__ */ React31.createElement(TextIcon, { fontSize: "large" }), /* @__PURE__ */ React31.createElement(Box2, { sx: { maxWidth: 160, overflow: "hidden" } }, /* @__PURE__ */ React31.createElement(Typography2, { align: "center", variant: "subtitle2", color: "text.secondary" }, __8("Sorry, nothing matched", "elementor")), /* @__PURE__ */ React31.createElement(
|
|
1433
1473
|
Typography2,
|
|
1434
1474
|
{
|
|
1435
1475
|
variant: "subtitle2",
|
|
@@ -1440,16 +1480,16 @@ var FontFamilyControl = createControl(({ fontFamilies }) => {
|
|
|
1440
1480
|
justifyContent: "center"
|
|
1441
1481
|
}
|
|
1442
1482
|
},
|
|
1443
|
-
/* @__PURE__ */
|
|
1444
|
-
/* @__PURE__ */
|
|
1483
|
+
/* @__PURE__ */ React31.createElement("span", null, "\u201C"),
|
|
1484
|
+
/* @__PURE__ */ React31.createElement(
|
|
1445
1485
|
"span",
|
|
1446
1486
|
{
|
|
1447
1487
|
style: { maxWidth: "80%", overflow: "hidden", textOverflow: "ellipsis" }
|
|
1448
1488
|
},
|
|
1449
1489
|
searchValue
|
|
1450
1490
|
),
|
|
1451
|
-
/* @__PURE__ */
|
|
1452
|
-
)), /* @__PURE__ */
|
|
1491
|
+
/* @__PURE__ */ React31.createElement("span", null, "\u201D.")
|
|
1492
|
+
)), /* @__PURE__ */ React31.createElement(Typography2, { align: "center", variant: "caption", color: "text.secondary" }, __8("Try something else.", "elementor"), /* @__PURE__ */ React31.createElement(
|
|
1453
1493
|
Link,
|
|
1454
1494
|
{
|
|
1455
1495
|
color: "secondary",
|
|
@@ -1489,7 +1529,7 @@ var FontList = ({ fontListItems, setFontFamily, handleClose, fontFamily }) => {
|
|
|
1489
1529
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1490
1530
|
[fontFamily]
|
|
1491
1531
|
);
|
|
1492
|
-
return /* @__PURE__ */
|
|
1532
|
+
return /* @__PURE__ */ React31.createElement(
|
|
1493
1533
|
Box2,
|
|
1494
1534
|
{
|
|
1495
1535
|
ref: containerRef,
|
|
@@ -1499,7 +1539,7 @@ var FontList = ({ fontListItems, setFontFamily, handleClose, fontFamily }) => {
|
|
|
1499
1539
|
width: 220
|
|
1500
1540
|
}
|
|
1501
1541
|
},
|
|
1502
|
-
/* @__PURE__ */
|
|
1542
|
+
/* @__PURE__ */ React31.createElement(
|
|
1503
1543
|
StyledMenuList,
|
|
1504
1544
|
{
|
|
1505
1545
|
role: "listbox",
|
|
@@ -1515,7 +1555,7 @@ var FontList = ({ fontListItems, setFontFamily, handleClose, fontFamily }) => {
|
|
|
1515
1555
|
const isSelected = selectedItem?.value === item.value;
|
|
1516
1556
|
const tabIndexFallback = !selectedItem ? 0 : -1;
|
|
1517
1557
|
if (item.type === "category") {
|
|
1518
|
-
return /* @__PURE__ */
|
|
1558
|
+
return /* @__PURE__ */ React31.createElement(
|
|
1519
1559
|
MenuSubheader,
|
|
1520
1560
|
{
|
|
1521
1561
|
key: virtualRow.key,
|
|
@@ -1526,7 +1566,7 @@ var FontList = ({ fontListItems, setFontFamily, handleClose, fontFamily }) => {
|
|
|
1526
1566
|
item.value
|
|
1527
1567
|
);
|
|
1528
1568
|
}
|
|
1529
|
-
return /* @__PURE__ */
|
|
1569
|
+
return /* @__PURE__ */ React31.createElement(
|
|
1530
1570
|
"li",
|
|
1531
1571
|
{
|
|
1532
1572
|
key: virtualRow.key,
|
|
@@ -1593,13 +1633,13 @@ var useDebounce = (fn, delay) => {
|
|
|
1593
1633
|
};
|
|
1594
1634
|
|
|
1595
1635
|
// src/controls/url-control.tsx
|
|
1596
|
-
import * as
|
|
1636
|
+
import * as React32 from "react";
|
|
1597
1637
|
import { urlPropTypeUtil } from "@elementor/editor-props";
|
|
1598
1638
|
import { TextField as TextField6 } from "@elementor/ui";
|
|
1599
1639
|
var UrlControl = createControl(({ placeholder }) => {
|
|
1600
1640
|
const { value, setValue } = useBoundProp(urlPropTypeUtil);
|
|
1601
1641
|
const handleChange = (event) => setValue(event.target.value);
|
|
1602
|
-
return /* @__PURE__ */
|
|
1642
|
+
return /* @__PURE__ */ React32.createElement(ControlActions, null, /* @__PURE__ */ React32.createElement(
|
|
1603
1643
|
TextField6,
|
|
1604
1644
|
{
|
|
1605
1645
|
size: "tiny",
|
|
@@ -1612,7 +1652,7 @@ var UrlControl = createControl(({ placeholder }) => {
|
|
|
1612
1652
|
});
|
|
1613
1653
|
|
|
1614
1654
|
// src/controls/link-control.tsx
|
|
1615
|
-
import * as
|
|
1655
|
+
import * as React34 from "react";
|
|
1616
1656
|
import { useMemo, useState as useState4 } from "react";
|
|
1617
1657
|
import { getAncestorWithAnchorTag, getDescendantWithAnchorTag } from "@elementor/editor-elements";
|
|
1618
1658
|
import {
|
|
@@ -1625,12 +1665,12 @@ import {
|
|
|
1625
1665
|
import { httpService as httpService2 } from "@elementor/http";
|
|
1626
1666
|
import { MinusIcon, PlusIcon as PlusIcon2 } from "@elementor/icons";
|
|
1627
1667
|
import { useSessionStorage } from "@elementor/session";
|
|
1628
|
-
import { Collapse, Divider as Divider3, Grid as Grid7, IconButton as IconButton4, Stack as
|
|
1668
|
+
import { Collapse, Divider as Divider3, Grid as Grid7, IconButton as IconButton4, Stack as Stack10, Switch } from "@elementor/ui";
|
|
1629
1669
|
import { debounce as debounce2 } from "@elementor/utils";
|
|
1630
1670
|
import { __ as __9 } from "@wordpress/i18n";
|
|
1631
1671
|
|
|
1632
1672
|
// src/components/autocomplete.tsx
|
|
1633
|
-
import * as
|
|
1673
|
+
import * as React33 from "react";
|
|
1634
1674
|
import { forwardRef as forwardRef2 } from "react";
|
|
1635
1675
|
import { XIcon as XIcon3 } from "@elementor/icons";
|
|
1636
1676
|
import {
|
|
@@ -1656,7 +1696,7 @@ var Autocomplete = forwardRef2((props, ref) => {
|
|
|
1656
1696
|
const muiWarningPreventer = allowCustomValues || !!value?.toString()?.length;
|
|
1657
1697
|
const isOptionEqualToValue = muiWarningPreventer ? void 0 : () => true;
|
|
1658
1698
|
const isValueFromOptions = typeof value === "number" && !!findMatchingOption(options, value);
|
|
1659
|
-
return /* @__PURE__ */
|
|
1699
|
+
return /* @__PURE__ */ React33.createElement(
|
|
1660
1700
|
AutocompleteBase,
|
|
1661
1701
|
{
|
|
1662
1702
|
...restProps,
|
|
@@ -1674,8 +1714,8 @@ var Autocomplete = forwardRef2((props, ref) => {
|
|
|
1674
1714
|
groupBy: isCategorizedOptionPool(options) ? (optionId) => findMatchingOption(options, optionId)?.groupLabel || optionId : void 0,
|
|
1675
1715
|
isOptionEqualToValue,
|
|
1676
1716
|
filterOptions: () => optionKeys,
|
|
1677
|
-
renderOption: (optionProps, optionId) => /* @__PURE__ */
|
|
1678
|
-
renderInput: (params) => /* @__PURE__ */
|
|
1717
|
+
renderOption: (optionProps, optionId) => /* @__PURE__ */ React33.createElement(Box3, { component: "li", ...optionProps, key: optionProps.id }, findMatchingOption(options, optionId)?.label ?? optionId),
|
|
1718
|
+
renderInput: (params) => /* @__PURE__ */ React33.createElement(
|
|
1679
1719
|
TextInput,
|
|
1680
1720
|
{
|
|
1681
1721
|
params,
|
|
@@ -1698,7 +1738,7 @@ var TextInput = ({
|
|
|
1698
1738
|
const onChange = (event) => {
|
|
1699
1739
|
handleChange(event.target.value);
|
|
1700
1740
|
};
|
|
1701
|
-
return /* @__PURE__ */
|
|
1741
|
+
return /* @__PURE__ */ React33.createElement(
|
|
1702
1742
|
TextField7,
|
|
1703
1743
|
{
|
|
1704
1744
|
...params,
|
|
@@ -1711,7 +1751,7 @@ var TextInput = ({
|
|
|
1711
1751
|
},
|
|
1712
1752
|
InputProps: {
|
|
1713
1753
|
...params.InputProps,
|
|
1714
|
-
endAdornment: /* @__PURE__ */
|
|
1754
|
+
endAdornment: /* @__PURE__ */ React33.createElement(ClearButton, { params, allowClear, handleChange })
|
|
1715
1755
|
}
|
|
1716
1756
|
}
|
|
1717
1757
|
);
|
|
@@ -1720,7 +1760,7 @@ var ClearButton = ({
|
|
|
1720
1760
|
allowClear,
|
|
1721
1761
|
handleChange,
|
|
1722
1762
|
params
|
|
1723
|
-
}) => /* @__PURE__ */
|
|
1763
|
+
}) => /* @__PURE__ */ React33.createElement(InputAdornment4, { position: "end" }, allowClear && /* @__PURE__ */ React33.createElement(IconButton3, { size: params.size, onClick: () => handleChange(null), sx: { cursor: "pointer" } }, /* @__PURE__ */ React33.createElement(XIcon3, { fontSize: params.size })));
|
|
1724
1764
|
function findMatchingOption(options, optionId = null) {
|
|
1725
1765
|
const formattedOption = (optionId || "").toString();
|
|
1726
1766
|
return options.find(({ id }) => formattedOption === id.toString());
|
|
@@ -1804,8 +1844,8 @@ var LinkControl = createControl((props) => {
|
|
|
1804
1844
|
),
|
|
1805
1845
|
[endpoint]
|
|
1806
1846
|
);
|
|
1807
|
-
return /* @__PURE__ */
|
|
1808
|
-
|
|
1847
|
+
return /* @__PURE__ */ React34.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React34.createElement(Stack10, { gap: 1.5 }, /* @__PURE__ */ React34.createElement(Divider3, null), /* @__PURE__ */ React34.createElement(
|
|
1848
|
+
Stack10,
|
|
1809
1849
|
{
|
|
1810
1850
|
direction: "row",
|
|
1811
1851
|
sx: {
|
|
@@ -1813,8 +1853,8 @@ var LinkControl = createControl((props) => {
|
|
|
1813
1853
|
alignItems: "center"
|
|
1814
1854
|
}
|
|
1815
1855
|
},
|
|
1816
|
-
/* @__PURE__ */
|
|
1817
|
-
/* @__PURE__ */
|
|
1856
|
+
/* @__PURE__ */ React34.createElement(ControlFormLabel, null, __9("Link", "elementor")),
|
|
1857
|
+
/* @__PURE__ */ React34.createElement(
|
|
1818
1858
|
ToggleIconControl,
|
|
1819
1859
|
{
|
|
1820
1860
|
enabled: isEnabled,
|
|
@@ -1822,28 +1862,28 @@ var LinkControl = createControl((props) => {
|
|
|
1822
1862
|
label: __9("Toggle link", "elementor")
|
|
1823
1863
|
}
|
|
1824
1864
|
)
|
|
1825
|
-
), /* @__PURE__ */
|
|
1865
|
+
), /* @__PURE__ */ React34.createElement(Collapse, { in: isEnabled, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React34.createElement(Stack10, { gap: 1.5 }, /* @__PURE__ */ React34.createElement(PropKeyProvider, { bind: "destination" }, /* @__PURE__ */ React34.createElement(ControlActions, null, /* @__PURE__ */ React34.createElement(
|
|
1826
1866
|
Autocomplete,
|
|
1827
1867
|
{
|
|
1828
1868
|
options,
|
|
1829
1869
|
allowCustomValues,
|
|
1830
1870
|
placeholder,
|
|
1831
|
-
value: value?.destination?.value,
|
|
1871
|
+
value: value?.destination?.value?.settings?.label || value?.destination?.value,
|
|
1832
1872
|
onOptionChange,
|
|
1833
1873
|
onTextChange,
|
|
1834
1874
|
minInputLength
|
|
1835
1875
|
}
|
|
1836
|
-
))), /* @__PURE__ */
|
|
1876
|
+
))), /* @__PURE__ */ React34.createElement(PropKeyProvider, { bind: "isTargetBlank" }, /* @__PURE__ */ React34.createElement(SwitchControl, null))))));
|
|
1837
1877
|
});
|
|
1838
1878
|
var ToggleIconControl = ({ enabled, onIconClick, label }) => {
|
|
1839
|
-
return /* @__PURE__ */
|
|
1879
|
+
return /* @__PURE__ */ React34.createElement(IconButton4, { size: SIZE3, onClick: onIconClick, "aria-label": label }, enabled ? /* @__PURE__ */ React34.createElement(MinusIcon, { fontSize: SIZE3 }) : /* @__PURE__ */ React34.createElement(PlusIcon2, { fontSize: SIZE3 }));
|
|
1840
1880
|
};
|
|
1841
1881
|
var SwitchControl = () => {
|
|
1842
1882
|
const { value = false, setValue } = useBoundProp(booleanPropTypeUtil);
|
|
1843
1883
|
const onClick = () => {
|
|
1844
1884
|
setValue(!value);
|
|
1845
1885
|
};
|
|
1846
|
-
return /* @__PURE__ */
|
|
1886
|
+
return /* @__PURE__ */ React34.createElement(Grid7, { container: true, alignItems: "center", flexWrap: "nowrap", justifyContent: "space-between" }, /* @__PURE__ */ React34.createElement(Grid7, { item: true }, /* @__PURE__ */ React34.createElement(ControlFormLabel, null, __9("Open in a new tab", "elementor"))), /* @__PURE__ */ React34.createElement(Grid7, { item: true }, /* @__PURE__ */ React34.createElement(Switch, { checked: value, onClick })));
|
|
1847
1887
|
};
|
|
1848
1888
|
async function fetchOptions(ajaxUrl, params) {
|
|
1849
1889
|
if (!params || !ajaxUrl) {
|
|
@@ -1875,10 +1915,10 @@ function generateFirstLoadedOption(unionValue) {
|
|
|
1875
1915
|
}
|
|
1876
1916
|
|
|
1877
1917
|
// src/controls/gap-control.tsx
|
|
1878
|
-
import * as
|
|
1918
|
+
import * as React35 from "react";
|
|
1879
1919
|
import { layoutDirectionPropTypeUtil, sizePropTypeUtil as sizePropTypeUtil4 } from "@elementor/editor-props";
|
|
1880
1920
|
import { DetachIcon as DetachIcon2, LinkIcon as LinkIcon2 } from "@elementor/icons";
|
|
1881
|
-
import { Grid as Grid8, Stack as
|
|
1921
|
+
import { Grid as Grid8, Stack as Stack11, ToggleButton as ToggleButton4, Tooltip as Tooltip5 } from "@elementor/ui";
|
|
1882
1922
|
import { __ as __10 } from "@wordpress/i18n";
|
|
1883
1923
|
var GapControl = createControl(({ label }) => {
|
|
1884
1924
|
const {
|
|
@@ -1903,7 +1943,7 @@ var GapControl = createControl(({ label }) => {
|
|
|
1903
1943
|
const LinkedIcon = isLinked ? LinkIcon2 : DetachIcon2;
|
|
1904
1944
|
const linkedLabel = __10("Link %s", "elementor").replace("%s", tooltipLabel);
|
|
1905
1945
|
const unlinkedLabel = __10("Unlink %s", "elementor").replace("%s", tooltipLabel);
|
|
1906
|
-
return /* @__PURE__ */
|
|
1946
|
+
return /* @__PURE__ */ React35.createElement(PropProvider, { propType, value: directionValue, setValue: setDirectionValue }, /* @__PURE__ */ React35.createElement(Stack11, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React35.createElement(ControlLabel, null, label), /* @__PURE__ */ React35.createElement(Tooltip5, { title: isLinked ? unlinkedLabel : linkedLabel, placement: "top" }, /* @__PURE__ */ React35.createElement(
|
|
1907
1947
|
ToggleButton4,
|
|
1908
1948
|
{
|
|
1909
1949
|
"aria-label": isLinked ? unlinkedLabel : linkedLabel,
|
|
@@ -1913,27 +1953,27 @@ var GapControl = createControl(({ label }) => {
|
|
|
1913
1953
|
sx: { marginLeft: "auto" },
|
|
1914
1954
|
onChange: onLinkToggle
|
|
1915
1955
|
},
|
|
1916
|
-
/* @__PURE__ */
|
|
1917
|
-
))), /* @__PURE__ */
|
|
1956
|
+
/* @__PURE__ */ React35.createElement(LinkedIcon, { fontSize: "tiny" })
|
|
1957
|
+
))), /* @__PURE__ */ React35.createElement(Stack11, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React35.createElement(Grid8, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React35.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React35.createElement(ControlFormLabel, null, __10("Column", "elementor"))), /* @__PURE__ */ React35.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React35.createElement(Control4, { bind: "column", isLinked }))), /* @__PURE__ */ React35.createElement(Grid8, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React35.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React35.createElement(ControlFormLabel, null, __10("Row", "elementor"))), /* @__PURE__ */ React35.createElement(Grid8, { item: true, xs: 12 }, /* @__PURE__ */ React35.createElement(Control4, { bind: "row", isLinked })))));
|
|
1918
1958
|
});
|
|
1919
1959
|
var Control4 = ({ bind, isLinked }) => {
|
|
1920
1960
|
if (isLinked) {
|
|
1921
|
-
return /* @__PURE__ */
|
|
1961
|
+
return /* @__PURE__ */ React35.createElement(SizeControl, null);
|
|
1922
1962
|
}
|
|
1923
|
-
return /* @__PURE__ */
|
|
1963
|
+
return /* @__PURE__ */ React35.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React35.createElement(SizeControl, null));
|
|
1924
1964
|
};
|
|
1925
1965
|
|
|
1926
1966
|
// src/controls/svg-media-control.tsx
|
|
1927
|
-
import * as
|
|
1967
|
+
import * as React37 from "react";
|
|
1928
1968
|
import { useState as useState6 } from "react";
|
|
1929
1969
|
import { imageSrcPropTypeUtil as imageSrcPropTypeUtil2 } from "@elementor/editor-props";
|
|
1930
1970
|
import { UploadIcon as UploadIcon2 } from "@elementor/icons";
|
|
1931
|
-
import { Button as Button4, Card as Card2, CardMedia as CardMedia2, CardOverlay as CardOverlay2, CircularProgress as CircularProgress3, Stack as
|
|
1971
|
+
import { Button as Button4, Card as Card2, CardMedia as CardMedia2, CardOverlay as CardOverlay2, CircularProgress as CircularProgress3, Stack as Stack12, styled as styled5 } from "@elementor/ui";
|
|
1932
1972
|
import { useWpMediaAttachment as useWpMediaAttachment2, useWpMediaFrame as useWpMediaFrame2 } from "@elementor/wp-media";
|
|
1933
1973
|
import { __ as __12 } from "@wordpress/i18n";
|
|
1934
1974
|
|
|
1935
1975
|
// src/components/enable-unfiltered-modal.tsx
|
|
1936
|
-
import * as
|
|
1976
|
+
import * as React36 from "react";
|
|
1937
1977
|
import { useState as useState5 } from "react";
|
|
1938
1978
|
import { useCurrentUserCapabilities } from "@elementor/editor-current-user";
|
|
1939
1979
|
import {
|
|
@@ -1986,9 +2026,9 @@ var EnableUnfilteredModal = (props) => {
|
|
|
1986
2026
|
}
|
|
1987
2027
|
};
|
|
1988
2028
|
const dialogProps = { ...props, isPending, handleEnable, isError, onClose };
|
|
1989
|
-
return canManageOptions ? /* @__PURE__ */
|
|
2029
|
+
return canManageOptions ? /* @__PURE__ */ React36.createElement(AdminDialog, { ...dialogProps }) : /* @__PURE__ */ React36.createElement(NonAdminDialog, { ...dialogProps });
|
|
1990
2030
|
};
|
|
1991
|
-
var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @__PURE__ */
|
|
2031
|
+
var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @__PURE__ */ React36.createElement(Dialog, { open, maxWidth: "sm", onClose: () => onClose(false) }, /* @__PURE__ */ React36.createElement(DialogHeader, { logo: false }, /* @__PURE__ */ React36.createElement(DialogTitle, null, ADMIN_TITLE_TEXT)), /* @__PURE__ */ React36.createElement(Divider4, null), /* @__PURE__ */ React36.createElement(DialogContent, null, /* @__PURE__ */ React36.createElement(DialogContentText, null, isError ? /* @__PURE__ */ React36.createElement(React36.Fragment, null, ADMIN_FAILED_CONTENT_TEXT_PT1, " ", /* @__PURE__ */ React36.createElement("br", null), " ", ADMIN_FAILED_CONTENT_TEXT_PT2) : ADMIN_CONTENT_TEXT)), /* @__PURE__ */ React36.createElement(DialogActions, null, /* @__PURE__ */ React36.createElement(Button3, { size: "medium", color: "secondary", onClick: () => onClose(false) }, __11("Cancel", "elementor")), /* @__PURE__ */ React36.createElement(
|
|
1992
2032
|
Button3,
|
|
1993
2033
|
{
|
|
1994
2034
|
size: "medium",
|
|
@@ -1997,9 +2037,9 @@ var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @_
|
|
|
1997
2037
|
color: "primary",
|
|
1998
2038
|
disabled: isPending
|
|
1999
2039
|
},
|
|
2000
|
-
isPending ? /* @__PURE__ */
|
|
2040
|
+
isPending ? /* @__PURE__ */ React36.createElement(CircularProgress2, { size: 24 }) : __11("Enable", "elementor")
|
|
2001
2041
|
)));
|
|
2002
|
-
var NonAdminDialog = ({ open, onClose }) => /* @__PURE__ */
|
|
2042
|
+
var NonAdminDialog = ({ open, onClose }) => /* @__PURE__ */ React36.createElement(Dialog, { open, maxWidth: "sm", onClose: () => onClose(false) }, /* @__PURE__ */ React36.createElement(DialogHeader, { logo: false }, /* @__PURE__ */ React36.createElement(DialogTitle, null, NON_ADMIN_TITLE_TEXT)), /* @__PURE__ */ React36.createElement(Divider4, null), /* @__PURE__ */ React36.createElement(DialogContent, null, /* @__PURE__ */ React36.createElement(DialogContentText, null, NON_ADMIN_CONTENT_TEXT)), /* @__PURE__ */ React36.createElement(DialogActions, null, /* @__PURE__ */ React36.createElement(Button3, { size: "medium", onClick: () => onClose(false), variant: "contained", color: "primary" }, __11("Got it", "elementor"))));
|
|
2003
2043
|
|
|
2004
2044
|
// src/controls/svg-media-control.tsx
|
|
2005
2045
|
var TILE_SIZE = 8;
|
|
@@ -2015,7 +2055,7 @@ var StyledCard = styled5(Card2)`
|
|
|
2015
2055
|
${TILE_SIZE / 2}px ${TILE_SIZE / 2}px;
|
|
2016
2056
|
border: none;
|
|
2017
2057
|
`;
|
|
2018
|
-
var StyledCardMediaContainer = styled5(
|
|
2058
|
+
var StyledCardMediaContainer = styled5(Stack12)`
|
|
2019
2059
|
position: relative;
|
|
2020
2060
|
height: 140px;
|
|
2021
2061
|
object-fit: contain;
|
|
@@ -2060,7 +2100,7 @@ var SvgMediaControl = createControl(() => {
|
|
|
2060
2100
|
open(openOptions);
|
|
2061
2101
|
}
|
|
2062
2102
|
};
|
|
2063
|
-
return /* @__PURE__ */
|
|
2103
|
+
return /* @__PURE__ */ React37.createElement(Stack12, { gap: 1 }, /* @__PURE__ */ React37.createElement(EnableUnfilteredModal, { open: unfilteredModalOpenState, onClose: onCloseUnfilteredModal }), /* @__PURE__ */ React37.createElement(ControlFormLabel, null, " ", __12("SVG", "elementor"), " "), /* @__PURE__ */ React37.createElement(ControlActions, null, /* @__PURE__ */ React37.createElement(StyledCard, { variant: "outlined" }, /* @__PURE__ */ React37.createElement(StyledCardMediaContainer, null, isFetching ? /* @__PURE__ */ React37.createElement(CircularProgress3, { role: "progressbar" }) : /* @__PURE__ */ React37.createElement(
|
|
2064
2104
|
CardMedia2,
|
|
2065
2105
|
{
|
|
2066
2106
|
component: "img",
|
|
@@ -2068,7 +2108,7 @@ var SvgMediaControl = createControl(() => {
|
|
|
2068
2108
|
alt: __12("Preview SVG", "elementor"),
|
|
2069
2109
|
sx: { maxHeight: "140px", width: "50px" }
|
|
2070
2110
|
}
|
|
2071
|
-
)), /* @__PURE__ */
|
|
2111
|
+
)), /* @__PURE__ */ React37.createElement(
|
|
2072
2112
|
CardOverlay2,
|
|
2073
2113
|
{
|
|
2074
2114
|
sx: {
|
|
@@ -2077,7 +2117,7 @@ var SvgMediaControl = createControl(() => {
|
|
|
2077
2117
|
}
|
|
2078
2118
|
}
|
|
2079
2119
|
},
|
|
2080
|
-
/* @__PURE__ */
|
|
2120
|
+
/* @__PURE__ */ React37.createElement(Stack12, { gap: 1 }, /* @__PURE__ */ React37.createElement(
|
|
2081
2121
|
Button4,
|
|
2082
2122
|
{
|
|
2083
2123
|
size: "tiny",
|
|
@@ -2086,13 +2126,13 @@ var SvgMediaControl = createControl(() => {
|
|
|
2086
2126
|
onClick: () => handleClick(MODE_BROWSE)
|
|
2087
2127
|
},
|
|
2088
2128
|
__12("Select SVG", "elementor")
|
|
2089
|
-
), /* @__PURE__ */
|
|
2129
|
+
), /* @__PURE__ */ React37.createElement(
|
|
2090
2130
|
Button4,
|
|
2091
2131
|
{
|
|
2092
2132
|
size: "tiny",
|
|
2093
2133
|
variant: "text",
|
|
2094
2134
|
color: "inherit",
|
|
2095
|
-
startIcon: /* @__PURE__ */
|
|
2135
|
+
startIcon: /* @__PURE__ */ React37.createElement(UploadIcon2, null),
|
|
2096
2136
|
onClick: () => handleClick(MODE_UPLOAD)
|
|
2097
2137
|
},
|
|
2098
2138
|
__12("Upload", "elementor")
|
|
@@ -2101,20 +2141,20 @@ var SvgMediaControl = createControl(() => {
|
|
|
2101
2141
|
});
|
|
2102
2142
|
|
|
2103
2143
|
// src/controls/background-control/background-control.tsx
|
|
2104
|
-
import * as
|
|
2144
|
+
import * as React44 from "react";
|
|
2105
2145
|
import { backgroundPropTypeUtil } from "@elementor/editor-props";
|
|
2106
2146
|
import { Grid as Grid14 } from "@elementor/ui";
|
|
2107
2147
|
import { __ as __18 } from "@wordpress/i18n";
|
|
2108
2148
|
|
|
2109
2149
|
// src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx
|
|
2110
|
-
import * as
|
|
2150
|
+
import * as React43 from "react";
|
|
2111
2151
|
import {
|
|
2112
2152
|
backgroundColorOverlayPropTypeUtil as backgroundColorOverlayPropTypeUtil2,
|
|
2113
2153
|
backgroundImageOverlayPropTypeUtil as backgroundImageOverlayPropTypeUtil2,
|
|
2114
2154
|
backgroundOverlayPropTypeUtil,
|
|
2115
2155
|
colorPropTypeUtil as colorPropTypeUtil3
|
|
2116
2156
|
} from "@elementor/editor-props";
|
|
2117
|
-
import { Box as Box4, CardMedia as CardMedia3, Grid as Grid13, Tab, TabPanel, Tabs, UnstableColorIndicator as UnstableColorIndicator2 } from "@elementor/ui";
|
|
2157
|
+
import { Box as Box4, CardMedia as CardMedia3, Grid as Grid13, styled as styled6, Tab, TabPanel, Tabs, UnstableColorIndicator as UnstableColorIndicator2 } from "@elementor/ui";
|
|
2118
2158
|
import { useWpMediaAttachment as useWpMediaAttachment3 } from "@elementor/wp-media";
|
|
2119
2159
|
import { __ as __17 } from "@wordpress/i18n";
|
|
2120
2160
|
|
|
@@ -2123,7 +2163,7 @@ import { parseEnv } from "@elementor/env";
|
|
|
2123
2163
|
var { env } = parseEnv("@elementor/editor-controls");
|
|
2124
2164
|
|
|
2125
2165
|
// src/controls/background-control/background-gradient-color-control.tsx
|
|
2126
|
-
import * as
|
|
2166
|
+
import * as React38 from "react";
|
|
2127
2167
|
import {
|
|
2128
2168
|
backgroundGradientOverlayPropTypeUtil,
|
|
2129
2169
|
colorPropTypeUtil as colorPropTypeUtil2,
|
|
@@ -2170,7 +2210,7 @@ var BackgroundGradientColorControl = createControl(() => {
|
|
|
2170
2210
|
positions: positions?.value.split(" ")
|
|
2171
2211
|
};
|
|
2172
2212
|
};
|
|
2173
|
-
return /* @__PURE__ */
|
|
2213
|
+
return /* @__PURE__ */ React38.createElement(ControlActions, null, /* @__PURE__ */ React38.createElement(
|
|
2174
2214
|
UnstableGradientBox,
|
|
2175
2215
|
{
|
|
2176
2216
|
sx: { width: "auto", padding: 1.5 },
|
|
@@ -2195,7 +2235,7 @@ var initialBackgroundGradientOverlay = backgroundGradientOverlayPropTypeUtil.cre
|
|
|
2195
2235
|
});
|
|
2196
2236
|
|
|
2197
2237
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-attachment.tsx
|
|
2198
|
-
import * as
|
|
2238
|
+
import * as React39 from "react";
|
|
2199
2239
|
import { PinIcon, PinnedOffIcon } from "@elementor/icons";
|
|
2200
2240
|
import { Grid as Grid9 } from "@elementor/ui";
|
|
2201
2241
|
import { __ as __13 } from "@wordpress/i18n";
|
|
@@ -2203,22 +2243,22 @@ var attachmentControlOptions = [
|
|
|
2203
2243
|
{
|
|
2204
2244
|
value: "fixed",
|
|
2205
2245
|
label: __13("Fixed", "elementor"),
|
|
2206
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2246
|
+
renderContent: ({ size }) => /* @__PURE__ */ React39.createElement(PinIcon, { fontSize: size }),
|
|
2207
2247
|
showTooltip: true
|
|
2208
2248
|
},
|
|
2209
2249
|
{
|
|
2210
2250
|
value: "scroll",
|
|
2211
2251
|
label: __13("Scroll", "elementor"),
|
|
2212
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2252
|
+
renderContent: ({ size }) => /* @__PURE__ */ React39.createElement(PinnedOffIcon, { fontSize: size }),
|
|
2213
2253
|
showTooltip: true
|
|
2214
2254
|
}
|
|
2215
2255
|
];
|
|
2216
2256
|
var BackgroundImageOverlayAttachment = () => {
|
|
2217
|
-
return /* @__PURE__ */
|
|
2257
|
+
return /* @__PURE__ */ React39.createElement(PopoverGridContainer, null, /* @__PURE__ */ React39.createElement(Grid9, { item: true, xs: 6 }, /* @__PURE__ */ React39.createElement(ControlFormLabel, null, __13("Attachment", "elementor"))), /* @__PURE__ */ React39.createElement(Grid9, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React39.createElement(ToggleControl, { options: attachmentControlOptions })));
|
|
2218
2258
|
};
|
|
2219
2259
|
|
|
2220
2260
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx
|
|
2221
|
-
import * as
|
|
2261
|
+
import * as React40 from "react";
|
|
2222
2262
|
import { backgroundImagePositionOffsetPropTypeUtil, stringPropTypeUtil as stringPropTypeUtil9 } from "@elementor/editor-props";
|
|
2223
2263
|
import { MenuListItem as MenuListItem3 } from "@elementor/editor-ui";
|
|
2224
2264
|
import { LetterXIcon, LetterYIcon } from "@elementor/icons";
|
|
@@ -2248,7 +2288,7 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
2248
2288
|
stringPropContext.setValue(value);
|
|
2249
2289
|
}
|
|
2250
2290
|
};
|
|
2251
|
-
return /* @__PURE__ */
|
|
2291
|
+
return /* @__PURE__ */ React40.createElement(Grid10, { container: true, spacing: 1.5 }, /* @__PURE__ */ React40.createElement(Grid10, { item: true, xs: 12 }, /* @__PURE__ */ React40.createElement(PopoverGridContainer, null, /* @__PURE__ */ React40.createElement(Grid10, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(ControlFormLabel, null, __14("Position", "elementor"))), /* @__PURE__ */ React40.createElement(Grid10, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React40.createElement(
|
|
2252
2292
|
Select2,
|
|
2253
2293
|
{
|
|
2254
2294
|
size: "tiny",
|
|
@@ -2256,12 +2296,12 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
2256
2296
|
onChange: handlePositionChange,
|
|
2257
2297
|
fullWidth: true
|
|
2258
2298
|
},
|
|
2259
|
-
backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */
|
|
2260
|
-
)))), isCustom ? /* @__PURE__ */
|
|
2299
|
+
backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */ React40.createElement(MenuListItem3, { key: value, value: value ?? "" }, label))
|
|
2300
|
+
)))), isCustom ? /* @__PURE__ */ React40.createElement(PropProvider, { ...backgroundImageOffsetContext }, /* @__PURE__ */ React40.createElement(Grid10, { item: true, xs: 12 }, /* @__PURE__ */ React40.createElement(Grid10, { container: true, spacing: 1.5 }, /* @__PURE__ */ React40.createElement(Grid10, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(PropKeyProvider, { bind: "x" }, /* @__PURE__ */ React40.createElement(SizeControl, { startIcon: /* @__PURE__ */ React40.createElement(LetterXIcon, { fontSize: "tiny" }) }))), /* @__PURE__ */ React40.createElement(Grid10, { item: true, xs: 6 }, /* @__PURE__ */ React40.createElement(PropKeyProvider, { bind: "y" }, /* @__PURE__ */ React40.createElement(SizeControl, { startIcon: /* @__PURE__ */ React40.createElement(LetterYIcon, { fontSize: "tiny" }) })))))) : null);
|
|
2261
2301
|
};
|
|
2262
2302
|
|
|
2263
2303
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-repeat.tsx
|
|
2264
|
-
import * as
|
|
2304
|
+
import * as React41 from "react";
|
|
2265
2305
|
import { DotsHorizontalIcon, DotsVerticalIcon, GridDotsIcon, XIcon as XIcon4 } from "@elementor/icons";
|
|
2266
2306
|
import { Grid as Grid11 } from "@elementor/ui";
|
|
2267
2307
|
import { __ as __15 } from "@wordpress/i18n";
|
|
@@ -2269,34 +2309,34 @@ var repeatControlOptions = [
|
|
|
2269
2309
|
{
|
|
2270
2310
|
value: "repeat",
|
|
2271
2311
|
label: __15("Repeat", "elementor"),
|
|
2272
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2312
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(GridDotsIcon, { fontSize: size }),
|
|
2273
2313
|
showTooltip: true
|
|
2274
2314
|
},
|
|
2275
2315
|
{
|
|
2276
2316
|
value: "repeat-x",
|
|
2277
2317
|
label: __15("Repeat-x", "elementor"),
|
|
2278
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2318
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(DotsHorizontalIcon, { fontSize: size }),
|
|
2279
2319
|
showTooltip: true
|
|
2280
2320
|
},
|
|
2281
2321
|
{
|
|
2282
2322
|
value: "repeat-y",
|
|
2283
2323
|
label: __15("Repeat-y", "elementor"),
|
|
2284
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2324
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(DotsVerticalIcon, { fontSize: size }),
|
|
2285
2325
|
showTooltip: true
|
|
2286
2326
|
},
|
|
2287
2327
|
{
|
|
2288
2328
|
value: "no-repeat",
|
|
2289
2329
|
label: __15("No-repeat", "elementor"),
|
|
2290
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2330
|
+
renderContent: ({ size }) => /* @__PURE__ */ React41.createElement(XIcon4, { fontSize: size }),
|
|
2291
2331
|
showTooltip: true
|
|
2292
2332
|
}
|
|
2293
2333
|
];
|
|
2294
2334
|
var BackgroundImageOverlayRepeat = () => {
|
|
2295
|
-
return /* @__PURE__ */
|
|
2335
|
+
return /* @__PURE__ */ React41.createElement(PopoverGridContainer, null, /* @__PURE__ */ React41.createElement(Grid11, { item: true, xs: 6 }, /* @__PURE__ */ React41.createElement(ControlFormLabel, null, __15("Repeat", "elementor"))), /* @__PURE__ */ React41.createElement(Grid11, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React41.createElement(ToggleControl, { options: repeatControlOptions })));
|
|
2296
2336
|
};
|
|
2297
2337
|
|
|
2298
2338
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-size.tsx
|
|
2299
|
-
import * as
|
|
2339
|
+
import * as React42 from "react";
|
|
2300
2340
|
import { backgroundImageSizeScalePropTypeUtil, stringPropTypeUtil as stringPropTypeUtil10 } from "@elementor/editor-props";
|
|
2301
2341
|
import {
|
|
2302
2342
|
ArrowBarBothIcon,
|
|
@@ -2312,25 +2352,25 @@ var sizeControlOptions = [
|
|
|
2312
2352
|
{
|
|
2313
2353
|
value: "auto",
|
|
2314
2354
|
label: __16("Auto", "elementor"),
|
|
2315
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2355
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(LetterAIcon, { fontSize: size }),
|
|
2316
2356
|
showTooltip: true
|
|
2317
2357
|
},
|
|
2318
2358
|
{
|
|
2319
2359
|
value: "cover",
|
|
2320
2360
|
label: __16("Cover", "elementor"),
|
|
2321
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2361
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(ArrowsMaximizeIcon, { fontSize: size }),
|
|
2322
2362
|
showTooltip: true
|
|
2323
2363
|
},
|
|
2324
2364
|
{
|
|
2325
2365
|
value: "contain",
|
|
2326
2366
|
label: __16("Contain", "elementor"),
|
|
2327
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2367
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(ArrowBarBothIcon, { fontSize: size }),
|
|
2328
2368
|
showTooltip: true
|
|
2329
2369
|
},
|
|
2330
2370
|
{
|
|
2331
2371
|
value: "custom",
|
|
2332
2372
|
label: __16("Custom", "elementor"),
|
|
2333
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
2373
|
+
renderContent: ({ size }) => /* @__PURE__ */ React42.createElement(PencilIcon, { fontSize: size }),
|
|
2334
2374
|
showTooltip: true
|
|
2335
2375
|
}
|
|
2336
2376
|
];
|
|
@@ -2345,7 +2385,7 @@ var BackgroundImageOverlaySize = () => {
|
|
|
2345
2385
|
stringPropContext.setValue(size);
|
|
2346
2386
|
}
|
|
2347
2387
|
};
|
|
2348
|
-
return /* @__PURE__ */
|
|
2388
|
+
return /* @__PURE__ */ React42.createElement(Grid12, { container: true, spacing: 1.5 }, /* @__PURE__ */ React42.createElement(Grid12, { item: true, xs: 12 }, /* @__PURE__ */ React42.createElement(PopoverGridContainer, null, /* @__PURE__ */ React42.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(ControlFormLabel, null, __16("Size", "elementor"))), /* @__PURE__ */ React42.createElement(Grid12, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React42.createElement(
|
|
2349
2389
|
ControlToggleButtonGroup,
|
|
2350
2390
|
{
|
|
2351
2391
|
exclusive: true,
|
|
@@ -2353,16 +2393,16 @@ var BackgroundImageOverlaySize = () => {
|
|
|
2353
2393
|
value: backgroundImageScaleContext.value ? "custom" : stringPropContext.value,
|
|
2354
2394
|
onChange: handleSizeChange
|
|
2355
2395
|
}
|
|
2356
|
-
)))), isCustom ? /* @__PURE__ */
|
|
2396
|
+
)))), isCustom ? /* @__PURE__ */ React42.createElement(PropProvider, { ...backgroundImageScaleContext }, /* @__PURE__ */ React42.createElement(Grid12, { item: true, xs: 12 }, /* @__PURE__ */ React42.createElement(PopoverGridContainer, null, /* @__PURE__ */ React42.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(PropKeyProvider, { bind: "width" }, /* @__PURE__ */ React42.createElement(
|
|
2357
2397
|
SizeControl,
|
|
2358
2398
|
{
|
|
2359
|
-
startIcon: /* @__PURE__ */
|
|
2399
|
+
startIcon: /* @__PURE__ */ React42.createElement(ArrowsMoveHorizontalIcon, { fontSize: "tiny" }),
|
|
2360
2400
|
extendedValues: ["auto"]
|
|
2361
2401
|
}
|
|
2362
|
-
))), /* @__PURE__ */
|
|
2402
|
+
))), /* @__PURE__ */ React42.createElement(Grid12, { item: true, xs: 6 }, /* @__PURE__ */ React42.createElement(PropKeyProvider, { bind: "height" }, /* @__PURE__ */ React42.createElement(
|
|
2363
2403
|
SizeControl,
|
|
2364
2404
|
{
|
|
2365
|
-
startIcon: /* @__PURE__ */
|
|
2405
|
+
startIcon: /* @__PURE__ */ React42.createElement(ArrowsMoveVerticalIcon, { fontSize: "tiny" }),
|
|
2366
2406
|
extendedValues: ["auto"]
|
|
2367
2407
|
}
|
|
2368
2408
|
)))))) : null);
|
|
@@ -2469,7 +2509,7 @@ var backgroundResolutionOptions = [
|
|
|
2469
2509
|
];
|
|
2470
2510
|
var BackgroundOverlayRepeaterControl = createControl(() => {
|
|
2471
2511
|
const { propType, value: overlayValues, setValue } = useBoundProp(backgroundOverlayPropTypeUtil);
|
|
2472
|
-
return /* @__PURE__ */
|
|
2512
|
+
return /* @__PURE__ */ React43.createElement(PropProvider, { propType, value: overlayValues, setValue }, /* @__PURE__ */ React43.createElement(
|
|
2473
2513
|
Repeater,
|
|
2474
2514
|
{
|
|
2475
2515
|
openOnAdd: true,
|
|
@@ -2486,7 +2526,7 @@ var BackgroundOverlayRepeaterControl = createControl(() => {
|
|
|
2486
2526
|
));
|
|
2487
2527
|
});
|
|
2488
2528
|
var ItemContent2 = ({ bind }) => {
|
|
2489
|
-
return /* @__PURE__ */
|
|
2529
|
+
return /* @__PURE__ */ React43.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React43.createElement(Content2, null));
|
|
2490
2530
|
};
|
|
2491
2531
|
var Content2 = () => {
|
|
2492
2532
|
const { getTabsProps, getTabProps, getTabPanelProps } = useBackgroundTabsHistory({
|
|
@@ -2494,7 +2534,7 @@ var Content2 = () => {
|
|
|
2494
2534
|
color: initialBackgroundColorOverlay.value,
|
|
2495
2535
|
gradient: initialBackgroundGradientOverlay.value
|
|
2496
2536
|
});
|
|
2497
|
-
return /* @__PURE__ */
|
|
2537
|
+
return /* @__PURE__ */ React43.createElement(Box4, { sx: { width: "100%" } }, /* @__PURE__ */ React43.createElement(Box4, { sx: { borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React43.createElement(
|
|
2498
2538
|
Tabs,
|
|
2499
2539
|
{
|
|
2500
2540
|
size: "small",
|
|
@@ -2502,19 +2542,19 @@ var Content2 = () => {
|
|
|
2502
2542
|
...getTabsProps(),
|
|
2503
2543
|
"aria-label": __17("Background Overlay", "elementor")
|
|
2504
2544
|
},
|
|
2505
|
-
/* @__PURE__ */
|
|
2506
|
-
/* @__PURE__ */
|
|
2507
|
-
/* @__PURE__ */
|
|
2508
|
-
)), /* @__PURE__ */
|
|
2545
|
+
/* @__PURE__ */ React43.createElement(Tab, { label: __17("Image", "elementor"), ...getTabProps("image") }),
|
|
2546
|
+
/* @__PURE__ */ React43.createElement(Tab, { label: __17("Gradient", "elementor"), ...getTabProps("gradient") }),
|
|
2547
|
+
/* @__PURE__ */ React43.createElement(Tab, { label: __17("Color", "elementor"), ...getTabProps("color") })
|
|
2548
|
+
)), /* @__PURE__ */ React43.createElement(TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("image") }, /* @__PURE__ */ React43.createElement(PopoverContent, null, /* @__PURE__ */ React43.createElement(ImageOverlayContent, null))), /* @__PURE__ */ React43.createElement(TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("gradient") }, /* @__PURE__ */ React43.createElement(BackgroundGradientColorControl, null)), /* @__PURE__ */ React43.createElement(TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("color") }, /* @__PURE__ */ React43.createElement(PopoverContent, null, /* @__PURE__ */ React43.createElement(ColorOverlayContent, null))));
|
|
2509
2549
|
};
|
|
2510
2550
|
var ItemIcon2 = ({ value }) => {
|
|
2511
2551
|
switch (value.$$type) {
|
|
2512
2552
|
case "background-image-overlay":
|
|
2513
|
-
return /* @__PURE__ */
|
|
2553
|
+
return /* @__PURE__ */ React43.createElement(ItemIconImage, { value });
|
|
2514
2554
|
case "background-color-overlay":
|
|
2515
|
-
return /* @__PURE__ */
|
|
2555
|
+
return /* @__PURE__ */ React43.createElement(ItemIconColor, { value });
|
|
2516
2556
|
case "background-gradient-overlay":
|
|
2517
|
-
return /* @__PURE__ */
|
|
2557
|
+
return /* @__PURE__ */ React43.createElement(ItemIconGradient, { value });
|
|
2518
2558
|
default:
|
|
2519
2559
|
return null;
|
|
2520
2560
|
}
|
|
@@ -2527,56 +2567,70 @@ var extractColorFrom = (prop) => {
|
|
|
2527
2567
|
};
|
|
2528
2568
|
var ItemIconColor = ({ value: prop }) => {
|
|
2529
2569
|
const color = extractColorFrom(prop);
|
|
2530
|
-
return /* @__PURE__ */
|
|
2570
|
+
return /* @__PURE__ */ React43.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: color });
|
|
2531
2571
|
};
|
|
2532
2572
|
var ItemIconImage = ({ value }) => {
|
|
2533
2573
|
const { imageUrl } = useImage(value);
|
|
2534
|
-
return /* @__PURE__ */
|
|
2574
|
+
return /* @__PURE__ */ React43.createElement(
|
|
2575
|
+
CardMedia3,
|
|
2576
|
+
{
|
|
2577
|
+
image: imageUrl,
|
|
2578
|
+
sx: (theme) => ({
|
|
2579
|
+
height: "1em",
|
|
2580
|
+
width: "1em",
|
|
2581
|
+
borderRadius: `${theme.shape.borderRadius / 2}px`,
|
|
2582
|
+
outline: `1px solid ${theme.palette.action.disabled}`
|
|
2583
|
+
})
|
|
2584
|
+
}
|
|
2585
|
+
);
|
|
2535
2586
|
};
|
|
2536
2587
|
var ItemIconGradient = ({ value }) => {
|
|
2537
2588
|
const gradient = getGradientValue(value);
|
|
2538
|
-
return /* @__PURE__ */
|
|
2589
|
+
return /* @__PURE__ */ React43.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: gradient });
|
|
2539
2590
|
};
|
|
2540
2591
|
var ItemLabel2 = ({ value }) => {
|
|
2541
2592
|
switch (value.$$type) {
|
|
2542
2593
|
case "background-image-overlay":
|
|
2543
|
-
return /* @__PURE__ */
|
|
2594
|
+
return /* @__PURE__ */ React43.createElement(ItemLabelImage, { value });
|
|
2544
2595
|
case "background-color-overlay":
|
|
2545
|
-
return /* @__PURE__ */
|
|
2596
|
+
return /* @__PURE__ */ React43.createElement(ItemLabelColor, { value });
|
|
2546
2597
|
case "background-gradient-overlay":
|
|
2547
|
-
return /* @__PURE__ */
|
|
2598
|
+
return /* @__PURE__ */ React43.createElement(ItemLabelGradient, { value });
|
|
2548
2599
|
default:
|
|
2549
2600
|
return null;
|
|
2550
2601
|
}
|
|
2551
2602
|
};
|
|
2552
2603
|
var ItemLabelColor = ({ value: prop }) => {
|
|
2553
2604
|
const color = extractColorFrom(prop);
|
|
2554
|
-
return /* @__PURE__ */
|
|
2605
|
+
return /* @__PURE__ */ React43.createElement("span", null, color);
|
|
2555
2606
|
};
|
|
2556
2607
|
var ItemLabelImage = ({ value }) => {
|
|
2557
2608
|
const { imageTitle } = useImage(value);
|
|
2558
|
-
return /* @__PURE__ */
|
|
2609
|
+
return /* @__PURE__ */ React43.createElement("span", null, imageTitle);
|
|
2559
2610
|
};
|
|
2560
2611
|
var ItemLabelGradient = ({ value }) => {
|
|
2561
2612
|
if (value.value.type.value === "linear") {
|
|
2562
|
-
return /* @__PURE__ */
|
|
2613
|
+
return /* @__PURE__ */ React43.createElement("span", null, __17("Linear Gradient", "elementor"));
|
|
2563
2614
|
}
|
|
2564
|
-
return /* @__PURE__ */
|
|
2615
|
+
return /* @__PURE__ */ React43.createElement("span", null, __17("Radial Gradient", "elementor"));
|
|
2565
2616
|
};
|
|
2566
2617
|
var ColorOverlayContent = () => {
|
|
2567
2618
|
const propContext = useBoundProp(backgroundColorOverlayPropTypeUtil2);
|
|
2568
|
-
return /* @__PURE__ */
|
|
2619
|
+
return /* @__PURE__ */ React43.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React43.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React43.createElement(ColorControl, null)));
|
|
2569
2620
|
};
|
|
2570
2621
|
var ImageOverlayContent = () => {
|
|
2571
2622
|
const propContext = useBoundProp(backgroundImageOverlayPropTypeUtil2);
|
|
2572
|
-
return /* @__PURE__ */
|
|
2623
|
+
return /* @__PURE__ */ React43.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React43.createElement(PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React43.createElement(Grid13, { container: true, spacing: 1, alignItems: "center" }, /* @__PURE__ */ React43.createElement(Grid13, { item: true, xs: 12 }, /* @__PURE__ */ React43.createElement(
|
|
2573
2624
|
ImageControl,
|
|
2574
2625
|
{
|
|
2575
2626
|
resolutionLabel: __17("Resolution", "elementor"),
|
|
2576
2627
|
sizes: backgroundResolutionOptions
|
|
2577
2628
|
}
|
|
2578
|
-
)))), /* @__PURE__ */
|
|
2629
|
+
)))), /* @__PURE__ */ React43.createElement(PropKeyProvider, { bind: "position" }, /* @__PURE__ */ React43.createElement(BackgroundImageOverlayPosition, null)), /* @__PURE__ */ React43.createElement(PropKeyProvider, { bind: "repeat" }, /* @__PURE__ */ React43.createElement(BackgroundImageOverlayRepeat, null)), /* @__PURE__ */ React43.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React43.createElement(BackgroundImageOverlaySize, null)), /* @__PURE__ */ React43.createElement(PropKeyProvider, { bind: "attachment" }, /* @__PURE__ */ React43.createElement(BackgroundImageOverlayAttachment, null)));
|
|
2579
2630
|
};
|
|
2631
|
+
var StyledUnstableColorIndicator = styled6(UnstableColorIndicator2)(({ theme }) => ({
|
|
2632
|
+
borderRadius: `${theme.shape.borderRadius / 2}px`
|
|
2633
|
+
}));
|
|
2580
2634
|
var useImage = (image) => {
|
|
2581
2635
|
let imageTitle, imageUrl = null;
|
|
2582
2636
|
const imageSrc = image?.value.image.value?.src.value;
|
|
@@ -2603,28 +2657,8 @@ var getGradientValue = (value) => {
|
|
|
2603
2657
|
// src/controls/background-control/background-control.tsx
|
|
2604
2658
|
var BackgroundControl = createControl(() => {
|
|
2605
2659
|
const propContext = useBoundProp(backgroundPropTypeUtil);
|
|
2606
|
-
return /* @__PURE__ */
|
|
2660
|
+
return /* @__PURE__ */ React44.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React44.createElement(SectionContent, null, /* @__PURE__ */ React44.createElement(PropKeyProvider, { bind: "background-overlay" }, /* @__PURE__ */ React44.createElement(BackgroundOverlayRepeaterControl, null)), /* @__PURE__ */ React44.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React44.createElement(Grid14, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React44.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(ControlFormLabel, null, __18("Color", "elementor"))), /* @__PURE__ */ React44.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React44.createElement(ColorControl, null))))));
|
|
2607
2661
|
});
|
|
2608
|
-
|
|
2609
|
-
// src/control-adornments/control-adornments-context.tsx
|
|
2610
|
-
import * as React42 from "react";
|
|
2611
|
-
import { createContext as createContext5, useContext as useContext5 } from "react";
|
|
2612
|
-
var Context2 = createContext5(null);
|
|
2613
|
-
var ControlAdornmentsProvider = ({ children, items }) => /* @__PURE__ */ React42.createElement(Context2.Provider, { value: { items } }, children);
|
|
2614
|
-
var useControlAdornments = () => {
|
|
2615
|
-
const context = useContext5(Context2);
|
|
2616
|
-
return context?.items ?? [];
|
|
2617
|
-
};
|
|
2618
|
-
|
|
2619
|
-
// src/control-adornments/control-adornments.tsx
|
|
2620
|
-
import * as React43 from "react";
|
|
2621
|
-
function ControlAdornments() {
|
|
2622
|
-
const items = useControlAdornments();
|
|
2623
|
-
if (items?.length === 0) {
|
|
2624
|
-
return null;
|
|
2625
|
-
}
|
|
2626
|
-
return /* @__PURE__ */ React43.createElement(React43.Fragment, null, items.map(({ Adornment, id }) => /* @__PURE__ */ React43.createElement(Adornment, { key: id })));
|
|
2627
|
-
}
|
|
2628
2662
|
export {
|
|
2629
2663
|
BackgroundControl,
|
|
2630
2664
|
BoxShadowRepeaterControl,
|
|
@@ -2632,7 +2666,7 @@ export {
|
|
|
2632
2666
|
ControlActionsProvider,
|
|
2633
2667
|
ControlAdornments,
|
|
2634
2668
|
ControlAdornmentsProvider,
|
|
2635
|
-
|
|
2669
|
+
ControlFormLabel,
|
|
2636
2670
|
ControlReplacementProvider,
|
|
2637
2671
|
ControlToggleButtonGroup,
|
|
2638
2672
|
EqualUnequalSizesControl,
|